@pya-platform/i18n 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # @pya/i18n
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - a9ca6bf: Initial release of the Pya platform packages. Extracted from `pyaeats-app`, consumed by `pyaeats-app` (food delivery) and `pyaserv` (services classifieds).
8
+
9
+ Each package exposes a Hono router factory (auth/cms/reviews/comments) or a typed helper (email/audit/cf) parameterised over Cloudflare D1 + KV bindings. UI primitives ship as Lit web components on top of `@pya/tokens` (CSS custom properties). See `ROADMAP.md` and `docs/phase-6-rollout.md` for the consumer cutover plan.
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@pya-platform/i18n",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "publishConfig": {
6
+ "registry": "https://registry.npmjs.org",
7
+ "access": "public"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/undeadliner/pya-platform.git"
12
+ },
13
+ "type": "module",
14
+ "description": "i18n dictionary helper — getT, locale routing, missing-key reporting.",
15
+ "exports": {
16
+ ".": "./src/index.ts"
17
+ },
18
+ "scripts": {
19
+ "type-check": "tsc --noEmit",
20
+ "test": "echo '@pya/i18n has no tests yet'"
21
+ }
22
+ }
package/src/index.ts ADDED
@@ -0,0 +1,11 @@
1
+ // @pya-platform/i18n — extraction target. Phase 5 brings the full getT helper from
2
+ // pyaeats-app/apps/site/src/i18n/dict.ts. For now we expose only the public
3
+ // Locale type so downstream packages can compile against the future shape.
4
+
5
+ export type Locale = 'es' | 'en'
6
+
7
+ export interface Dict {
8
+ readonly [key: string]: string | Dict
9
+ }
10
+
11
+ export const isLocale = (s: string): s is Locale => s === 'es' || s === 'en'
package/tsconfig.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "rootDir": "src",
5
+ "outDir": "dist",
6
+ "noEmit": true
7
+ },
8
+ "include": ["src/**/*.ts"]
9
+ }