Files
gsc-web-kit/package.json
Claude 71bce1bd56 Add i18n factory + AdminShell My Profile + LogoutButton anchor
- src/i18n/server.ts: createI18nConfig factory consolidating the locale
  resolution chain (cookie → access_token preferred_language claim →
  Accept-Language → default). Reusable across apps; previously each
  frontend reimplemented it.
- AdminShell: thread signoutPath + myProfileUrl (default
  https://my.gosec.internal/profile) into the navbar; render My Profile
  link alongside logout.
- LogoutButton: replace two-step fetch+signOut+redirect with a plain
  anchor pointing at signoutPath — the NextAuth POST-only signout
  endpoint plus form-CSRF flow doesn't need client JS.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 20:50:37 +02:00

119 lines
3.2 KiB
JSON

{
"name": "@gsc/web-kit",
"version": "0.5.1",
"description": "GSC web app skeleton — layout, auth, data, forms, feedback, navigation, chrome. Built on @limitless/ui. Drop into a Next.js app and just write pages.",
"license": "MIT",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist",
"migrations"
],
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"./css": "./dist/styles/index.css",
"./layout": {
"types": "./dist/layout/index.d.ts",
"import": "./dist/layout/index.js"
},
"./auth": {
"types": "./dist/auth/index.d.ts",
"import": "./dist/auth/index.js"
},
"./auth/server": {
"types": "./dist/auth/server.d.ts",
"import": "./dist/auth/server.js"
},
"./auth/middleware": {
"types": "./dist/auth/middleware.d.ts",
"import": "./dist/auth/middleware.js"
},
"./shell": {
"types": "./dist/shell/index.d.ts",
"import": "./dist/shell/index.js"
},
"./shell/server": {
"types": "./dist/shell/server.d.ts",
"import": "./dist/shell/server.js"
},
"./chrome": {
"types": "./dist/chrome/index.d.ts",
"import": "./dist/chrome/index.js"
},
"./data": {
"types": "./dist/data/index.d.ts",
"import": "./dist/data/index.js"
},
"./forms": {
"types": "./dist/forms/index.d.ts",
"import": "./dist/forms/index.js"
},
"./feedback": {
"types": "./dist/feedback/index.d.ts",
"import": "./dist/feedback/index.js"
},
"./navigation": {
"types": "./dist/navigation/index.d.ts",
"import": "./dist/navigation/index.js"
},
"./api": {
"types": "./dist/api/index.d.ts",
"import": "./dist/api/index.js"
},
"./i18n": {
"types": "./dist/i18n/index.d.ts",
"import": "./dist/i18n/index.js"
},
"./i18n/server": {
"types": "./dist/i18n/server.d.ts",
"import": "./dist/i18n/server.js"
},
"./utils": {
"types": "./dist/utils/index.d.ts",
"import": "./dist/utils/index.js"
},
"./migrations/nav-schema.up.sql": "./migrations/nav-schema.up.sql",
"./migrations/nav-apps-seed.up.sql": "./migrations/nav-apps-seed.up.sql",
"./migrations/nav-menu-items-template.sql": "./migrations/nav-menu-items-template.sql"
},
"sideEffects": [
"**/*.css"
],
"scripts": {
"build": "tsc -p tsconfig.json --noEmit false",
"postbuild": "node ./scripts/postbuild.cjs",
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"dependencies": {
"@limitless/ui": "file:../limitless-ui",
"zod": "^3.23.0"
},
"peerDependencies": {
"@gsc/chat": "*",
"bootstrap": "^5.3.3",
"next": ">=15.0.0",
"next-auth": "^5.0.0-beta.25",
"next-intl": "^4.6.0",
"react": "^18.2.0 || ^19.0.0",
"react-dom": "^18.2.0 || ^19.0.0"
},
"peerDependenciesMeta": {
"bootstrap": { "optional": true },
"@gsc/chat": { "optional": true }
},
"devDependencies": {
"@types/node": "^20.11.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"next": "16.1.1",
"next-auth": "^5.0.0-beta.25",
"next-intl": "^4.6.1",
"typescript": "^5.4.0"
}
}