Compare commits
5 Commits
abacus-rea
...
abacus-rea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
618f5d2cb0 | ||
|
|
8e1648737d | ||
|
|
d4fbdd1463 | ||
|
|
b82e9bb9d6 | ||
|
|
3fa11c4fbc |
13
.github/workflows/publish-abacus-react.yml
vendored
13
.github/workflows/publish-abacus-react.yml
vendored
@@ -12,6 +12,7 @@ permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
pull-requests: write
|
||||
packages: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
@@ -134,8 +135,16 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Explicitly set registry for this publish command
|
||||
npm publish --registry=https://npm.pkg.github.com
|
||||
# Debug and publish to GitHub Packages
|
||||
echo "Contents of .npmrc file:"
|
||||
cat .npmrc
|
||||
echo "Environment variables for npm:"
|
||||
echo "NPM_CONFIG_USERCONFIG: $NPM_CONFIG_USERCONFIG"
|
||||
echo "NODE_AUTH_TOKEN is set: $([ -n "$NODE_AUTH_TOKEN" ] && echo "yes" || echo "no")"
|
||||
|
||||
# Set authentication and registry for GitHub Packages
|
||||
echo "Publishing with explicit authentication..."
|
||||
NPM_CONFIG_USERCONFIG=.npmrc NODE_AUTH_TOKEN="${{ secrets.GITHUB_TOKEN }}" npm publish --registry=https://npm.pkg.github.com
|
||||
else
|
||||
echo "No new abacus-react version tag found, skipping publish"
|
||||
fi
|
||||
@@ -4,6 +4,7 @@ import { AbacusDisplayProvider } from '@/contexts/AbacusDisplayContext'
|
||||
import { UserProfileProvider } from '@/contexts/UserProfileContext'
|
||||
import { GameModeProvider } from '@/contexts/GameModeContext'
|
||||
import { FullscreenProvider } from '@/contexts/FullscreenContext'
|
||||
import { GameThemeProvider } from '@/contexts/GameThemeContext'
|
||||
import { AppNavBar } from '@/components/AppNavBar'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
@@ -29,8 +30,10 @@ export default function RootLayout({
|
||||
<UserProfileProvider>
|
||||
<GameModeProvider>
|
||||
<FullscreenProvider>
|
||||
<AppNavBar />
|
||||
{children}
|
||||
<GameThemeProvider>
|
||||
<AppNavBar />
|
||||
{children}
|
||||
</GameThemeProvider>
|
||||
</FullscreenProvider>
|
||||
</GameModeProvider>
|
||||
</UserProfileProvider>
|
||||
|
||||
33
apps/web/src/contexts/GameThemeContext.tsx
Normal file
33
apps/web/src/contexts/GameThemeContext.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
'use client'
|
||||
|
||||
import { createContext, useContext, useState, ReactNode } from 'react'
|
||||
|
||||
export interface GameTheme {
|
||||
gameName: string
|
||||
backgroundColor: string
|
||||
}
|
||||
|
||||
interface GameThemeContextType {
|
||||
theme: GameTheme | null
|
||||
setTheme: (theme: GameTheme | null) => void
|
||||
}
|
||||
|
||||
const GameThemeContext = createContext<GameThemeContextType | undefined>(undefined)
|
||||
|
||||
export function GameThemeProvider({ children }: { children: ReactNode }) {
|
||||
const [theme, setTheme] = useState<GameTheme | null>(null)
|
||||
|
||||
return (
|
||||
<GameThemeContext.Provider value={{ theme, setTheme }}>
|
||||
{children}
|
||||
</GameThemeContext.Provider>
|
||||
)
|
||||
}
|
||||
|
||||
export function useGameTheme() {
|
||||
const context = useContext(GameThemeContext)
|
||||
if (context === undefined) {
|
||||
throw new Error('useGameTheme must be used within a GameThemeProvider')
|
||||
}
|
||||
return context
|
||||
}
|
||||
@@ -1,3 +1,17 @@
|
||||
# [1.2.0](https://github.com/antialias/soroban-abacus-flashcards/compare/abacus-react-v1.1.3...abacus-react-v1.2.0) (2025-09-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **abacus-react:** add debugging and explicit authentication for npm publish ([b82e9bb](https://github.com/antialias/soroban-abacus-flashcards/commit/b82e9bb9d6adf3793065067f96c6fbbfd1a78bca))
|
||||
* **abacus-react:** add packages: write permission for GitHub Packages publishing ([8e16487](https://github.com/antialias/soroban-abacus-flashcards/commit/8e1648737de9305f82872cb9b86b98b5045f77a7))
|
||||
* add missing GameThemeContext file for themed navigation ([d4fbdd1](https://github.com/antialias/soroban-abacus-flashcards/commit/d4fbdd14630e2f2fcdbc0de23ccc4ccd9eb74b48))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* implement game theming system with context-based navigation chrome ([3fa11c4](https://github.com/antialias/soroban-abacus-flashcards/commit/3fa11c4fbcbeabeb3bdd0db38374fb9a13cbb754))
|
||||
|
||||
## [1.1.3](https://github.com/antialias/soroban-abacus-flashcards/compare/abacus-react-v1.1.2...abacus-react-v1.1.3) (2025-09-28)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user