Compare commits

..

5 Commits

Author SHA1 Message Date
semantic-release-bot
618f5d2cb0 chore(abacus-react): release v1.2.0 [skip ci]
# [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](b82e9bb9d6))
* **abacus-react:** add packages: write permission for GitHub Packages publishing ([8e16487](8e1648737d))
* add missing GameThemeContext file for themed navigation ([d4fbdd1](d4fbdd1463))

### Features

* implement game theming system with context-based navigation chrome ([3fa11c4](3fa11c4fbc))
2025-09-28 17:02:36 +00:00
Thomas Hallock
8e1648737d fix(abacus-react): add packages: write permission for GitHub Packages publishing
- Add missing packages: write permission to workflow permissions
- This is required for publishing to GitHub Packages registry
- Should resolve 403 Forbidden permission_denied error

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 12:01:57 -05:00
Thomas Hallock
d4fbdd1463 fix: add missing GameThemeContext file for themed navigation
The GameThemeContext.tsx file was referenced in layout.tsx but wasn't properly committed. This context enables games to declare their theming that flows through the navigation chrome.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 12:00:09 -05:00
Thomas Hallock
b82e9bb9d6 fix(abacus-react): add debugging and explicit authentication for npm publish
- Add debugging output to see .npmrc contents and environment
- Set NODE_AUTH_TOKEN explicitly for npm publish command
- Override NPM_CONFIG_USERCONFIG to use local .npmrc file

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 12:00:01 -05:00
Thomas Hallock
3fa11c4fbc feat: implement game theming system with context-based navigation chrome
Add GameThemeContext to allow games to declare their visual identity (name and background color) that flows through to navigation and layout chrome, creating a cohesive themed experience across games.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 11:59:08 -05:00
4 changed files with 63 additions and 4 deletions

View File

@@ -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

View File

@@ -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>

View 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
}

View File

@@ -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)