@nebutra/theme 0.2.1 → 0.2.2
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/dist/brand-package-surface.d.ts +1 -0
- package/dist/brand-package-surface.js +34 -0
- package/dist/brand-package-surface.js.map +1 -0
- package/dist/chunk-YJGDBU5Y.js +215 -0
- package/dist/chunk-YJGDBU5Y.js.map +1 -0
- package/dist/chunk-ZSOVG5W4.js +89 -0
- package/dist/chunk-ZSOVG5W4.js.map +1 -0
- package/dist/client.d.ts +3 -0
- package/dist/client.js +43 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +47 -0
- package/dist/index.js.map +1 -0
- package/dist/languages.d.ts +54 -0
- package/dist/languages.js +19 -0
- package/dist/languages.js.map +1 -0
- package/package.json +37 -10
- package/skins.css +207 -834
- package/.turbo/turbo-build.log +0 -10
- package/.turbo/turbo-typecheck.log +0 -4
- package/AGENTS.md +0 -28
- package/DESIGN.md +0 -124
- package/scripts/sync-languages.mjs +0 -189
- package/scripts/sync-skins.mjs +0 -83
- package/scripts/sync-themes.mjs +0 -40
- package/src/__tests__/apply-language.test.ts +0 -70
- package/src/__tests__/languages.test.ts +0 -100
- package/src/__tests__/theme-registry.test.ts +0 -27
- package/src/apply-language.ts +0 -87
- package/src/brand-package-surface.ts +0 -30
- package/src/built-in-packages.generated.ts +0 -39
- package/src/built-in-packages.ts +0 -14
- package/src/client.ts +0 -35
- package/src/index.ts +0 -53
- package/src/languages.meta.json +0 -62
- package/src/languages.ts +0 -70
- package/src/registry.json +0 -7
- package/tsconfig.json +0 -10
- package/turbo.json +0 -25
package/src/apply-language.ts
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Runtime design-language switch — Create Center / SaaS global theme swap.
|
|
3
|
-
*
|
|
4
|
-
* Light/dark remains class="dark" on @nebutra/tokens ThemeProvider.
|
|
5
|
-
* Design language is html[data-brand] + Brand Package CSS inject.
|
|
6
|
-
*
|
|
7
|
-
* Built-in languages load Brand Packages automatically; pass `package` only for
|
|
8
|
-
* custom / compile-time packages (Create Center preview).
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import {
|
|
12
|
-
type ApplyBrandOptions,
|
|
13
|
-
applyBrandPackage,
|
|
14
|
-
type BrandPackage,
|
|
15
|
-
clearBrand,
|
|
16
|
-
getActiveBrandId,
|
|
17
|
-
normalizeBrandPackage,
|
|
18
|
-
validateBrandPackage,
|
|
19
|
-
} from "@nebutra/tokens/brand-package";
|
|
20
|
-
import { getBuiltInBrandPackage } from "./built-in-packages";
|
|
21
|
-
import { type DesignLanguageEntry, getLanguageById } from "./languages";
|
|
22
|
-
|
|
23
|
-
export type { ApplyBrandOptions };
|
|
24
|
-
|
|
25
|
-
export interface ApplyLanguageOptions extends ApplyBrandOptions {
|
|
26
|
-
/**
|
|
27
|
-
* Preloaded Brand Package (Create Center compile result or override).
|
|
28
|
-
* When omitted, built-in languages resolve from brands/<id>/brand.json.
|
|
29
|
-
*/
|
|
30
|
-
package?: BrandPackage;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Apply a design language by id.
|
|
35
|
-
* - `factory` / unknown without package → clearBrand (tokens SSOT)
|
|
36
|
-
* - built-in id without package → load shipped Brand Package
|
|
37
|
-
* - with `package` → applyBrandPackage (full carrier swap)
|
|
38
|
-
*/
|
|
39
|
-
export function applyLanguage(
|
|
40
|
-
languageId: string,
|
|
41
|
-
options: ApplyLanguageOptions = {},
|
|
42
|
-
): DesignLanguageEntry | null {
|
|
43
|
-
const entry = getLanguageById(languageId);
|
|
44
|
-
|
|
45
|
-
if (!entry || entry.id === "factory" || entry.brandPath == null) {
|
|
46
|
-
if (options.package) {
|
|
47
|
-
const v = validateBrandPackage(options.package);
|
|
48
|
-
if (!v.ok) {
|
|
49
|
-
throw new Error(`Invalid Brand Package: ${v.errors.join("; ")}`);
|
|
50
|
-
}
|
|
51
|
-
applyBrandPackage(normalizeBrandPackage(options.package), options);
|
|
52
|
-
return entry ?? null;
|
|
53
|
-
}
|
|
54
|
-
clearBrand(options);
|
|
55
|
-
return entry ?? getLanguageById("factory") ?? null;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const pkg = options.package ?? getBuiltInBrandPackage(languageId);
|
|
59
|
-
if (!pkg) {
|
|
60
|
-
throw new Error(
|
|
61
|
-
`Language "${languageId}" has no built-in Brand Package and no options.package. ` +
|
|
62
|
-
`Load @nebutra/tokens/${entry.brandPath} or compileReferoTokens(), then ` +
|
|
63
|
-
`applyLanguage("${languageId}", { package }). ` +
|
|
64
|
-
`Or import the single skin CSS: ${entry.install.cssImport ?? "(none)"}.`,
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const v = validateBrandPackage(pkg);
|
|
69
|
-
if (!v.ok) {
|
|
70
|
-
throw new Error(`Invalid Brand Package for ${languageId}: ${v.errors.join("; ")}`);
|
|
71
|
-
}
|
|
72
|
-
const normalized = normalizeBrandPackage({
|
|
73
|
-
...pkg,
|
|
74
|
-
id: languageId,
|
|
75
|
-
});
|
|
76
|
-
applyBrandPackage(normalized, options);
|
|
77
|
-
return entry;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/** Restore factory product chrome (clear data-brand + injected skin). */
|
|
81
|
-
export function clearLanguage(options: ApplyBrandOptions = {}): void {
|
|
82
|
-
clearBrand(options);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export function getActiveLanguageId(doc?: Document): string {
|
|
86
|
-
return getActiveBrandId(doc) ?? "factory";
|
|
87
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tooling / Create Center surface — compile + iframe preview + emit.
|
|
3
|
-
* Prefer `@nebutra/tokens/brand-package` in new code; this re-export keeps
|
|
4
|
-
* historical `@nebutra/theme` compile entry points without bloating the root.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
export {
|
|
8
|
-
applyBrandCss,
|
|
9
|
-
applyBrandPackage,
|
|
10
|
-
applyBrandToIframe,
|
|
11
|
-
BRAND_STORAGE_KEY,
|
|
12
|
-
type BrandPackage,
|
|
13
|
-
type BrandPackageInput,
|
|
14
|
-
type BrandRecipe,
|
|
15
|
-
type BrandRecipeInput,
|
|
16
|
-
type CompileResult,
|
|
17
|
-
clearBrand,
|
|
18
|
-
compileReferoTokens,
|
|
19
|
-
type EmitBrandCssMode,
|
|
20
|
-
type EmitBrandCssOptions,
|
|
21
|
-
emitBrandCss,
|
|
22
|
-
emitGlobalSkinSelector,
|
|
23
|
-
getActiveBrandId,
|
|
24
|
-
normalizeBrandPackage,
|
|
25
|
-
restorePersistedBrand,
|
|
26
|
-
useBrand,
|
|
27
|
-
useBrandIframePreview,
|
|
28
|
-
type ValidationResult,
|
|
29
|
-
validateBrandPackage,
|
|
30
|
-
} from "@nebutra/tokens/brand-package";
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AUTO-GENERATED by scripts/sync-languages.mjs — DO NOT EDIT.
|
|
3
|
-
* Built-in Brand Packages for applyLanguage(id) without manual JSON import.
|
|
4
|
-
* Source: packages/design/tokens/brands/<id>/brand.json
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { type BrandPackage, normalizeBrandPackage } from "@nebutra/tokens/brand-package";
|
|
8
|
-
import gsap from "@nebutra/tokens/brands/gsap/brand.json" with { type: "json" };
|
|
9
|
-
import linear from "@nebutra/tokens/brands/linear/brand.json" with { type: "json" };
|
|
10
|
-
import notion from "@nebutra/tokens/brands/notion/brand.json" with { type: "json" };
|
|
11
|
-
import raycast from "@nebutra/tokens/brands/raycast/brand.json" with { type: "json" };
|
|
12
|
-
import stripe from "@nebutra/tokens/brands/stripe/brand.json" with { type: "json" };
|
|
13
|
-
import vanta from "@nebutra/tokens/brands/vanta/brand.json" with { type: "json" };
|
|
14
|
-
import vercel from "@nebutra/tokens/brands/vercel/brand.json" with { type: "json" };
|
|
15
|
-
|
|
16
|
-
const RAW_BUILT_IN: Record<string, BrandPackage> = {
|
|
17
|
-
gsap: gsap as BrandPackage,
|
|
18
|
-
linear: linear as BrandPackage,
|
|
19
|
-
notion: notion as BrandPackage,
|
|
20
|
-
raycast: raycast as BrandPackage,
|
|
21
|
-
stripe: stripe as BrandPackage,
|
|
22
|
-
vanta: vanta as BrandPackage,
|
|
23
|
-
vercel: vercel as BrandPackage,
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
/** Normalized package for a shipped design-language id, or undefined. */
|
|
27
|
-
export function getBuiltInBrandPackage(id: string): BrandPackage | undefined {
|
|
28
|
-
const raw = RAW_BUILT_IN[id];
|
|
29
|
-
if (!raw) return undefined;
|
|
30
|
-
return normalizeBrandPackage({ ...raw, id });
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export function listBuiltInBrandIds(): string[] {
|
|
34
|
-
return Object.keys(RAW_BUILT_IN);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export function hasBuiltInBrandPackage(id: string): boolean {
|
|
38
|
-
return id in RAW_BUILT_IN;
|
|
39
|
-
}
|
package/src/built-in-packages.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Built-in Brand Packages for design-language ids.
|
|
3
|
-
*
|
|
4
|
-
* Implementation is AUTO-GENERATED — see built-in-packages.generated.ts
|
|
5
|
-
* (pnpm --filter @nebutra/theme sync:languages).
|
|
6
|
-
*
|
|
7
|
-
* SSOT remains packages/design/tokens/brands/<id>/brand.json.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
getBuiltInBrandPackage,
|
|
12
|
-
hasBuiltInBrandPackage,
|
|
13
|
-
listBuiltInBrandIds,
|
|
14
|
-
} from "./built-in-packages.generated";
|
package/src/client.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Explicit client entry — same lean surface as package root.
|
|
3
|
-
* Use: `import { applyLanguage } from "@nebutra/theme/client"`
|
|
4
|
-
*
|
|
5
|
-
* Light/dark: `import { ThemeProvider, useTheme } from "@nebutra/tokens"`
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
applyBrandPackage,
|
|
10
|
-
type BrandPackage,
|
|
11
|
-
clearBrand,
|
|
12
|
-
normalizeBrandPackage,
|
|
13
|
-
} from "@nebutra/tokens/brand-package";
|
|
14
|
-
export {
|
|
15
|
-
type ApplyLanguageOptions,
|
|
16
|
-
applyLanguage,
|
|
17
|
-
clearLanguage,
|
|
18
|
-
getActiveLanguageId,
|
|
19
|
-
} from "./apply-language";
|
|
20
|
-
export {
|
|
21
|
-
getBuiltInBrandPackage,
|
|
22
|
-
hasBuiltInBrandPackage,
|
|
23
|
-
listBuiltInBrandIds,
|
|
24
|
-
} from "./built-in-packages";
|
|
25
|
-
export {
|
|
26
|
-
BUILT_IN_LANGUAGE_IDS,
|
|
27
|
-
DEFAULT_LANGUAGE,
|
|
28
|
-
type DesignLanguageEntry,
|
|
29
|
-
type DesignLanguageRegistry,
|
|
30
|
-
getLanguageById,
|
|
31
|
-
isLanguageId,
|
|
32
|
-
LANGUAGE_IDS,
|
|
33
|
-
LANGUAGE_REGISTRY,
|
|
34
|
-
listSkinLanguages,
|
|
35
|
-
} from "./languages";
|
package/src/index.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @nebutra/theme — Design-language switch surface (client-safe root)
|
|
3
|
-
*
|
|
4
|
-
* Root exports are intentionally lean for app bundles:
|
|
5
|
-
* applyLanguage / LANGUAGE_REGISTRY / built-in packages
|
|
6
|
-
*
|
|
7
|
-
* Light/dark ThemeProvider: import from `@nebutra/tokens` only (not here).
|
|
8
|
-
*
|
|
9
|
-
* Compile & Create Center tooling:
|
|
10
|
-
* @nebutra/tokens/brand-package (preferred)
|
|
11
|
-
* @nebutra/theme/brand-package (re-export alias)
|
|
12
|
-
*
|
|
13
|
-
* Layers:
|
|
14
|
-
* @nebutra/tokens product chrome SSOT (styles.css + recipe.css + ThemeProvider)
|
|
15
|
-
* @nebutra/theme LANGUAGE_REGISTRY + applyLanguage + skins.css
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
// Re-export apply helpers used with applyLanguage({ package })
|
|
19
|
-
export {
|
|
20
|
-
type ApplyBrandOptions,
|
|
21
|
-
applyBrandPackage,
|
|
22
|
-
type BrandPackage,
|
|
23
|
-
clearBrand,
|
|
24
|
-
getActiveBrandId,
|
|
25
|
-
normalizeBrandPackage,
|
|
26
|
-
type ValidationResult,
|
|
27
|
-
validateBrandPackage,
|
|
28
|
-
} from "@nebutra/tokens/brand-package";
|
|
29
|
-
export {
|
|
30
|
-
type ApplyLanguageOptions,
|
|
31
|
-
applyLanguage,
|
|
32
|
-
clearLanguage,
|
|
33
|
-
getActiveLanguageId,
|
|
34
|
-
} from "./apply-language";
|
|
35
|
-
export {
|
|
36
|
-
getBuiltInBrandPackage,
|
|
37
|
-
hasBuiltInBrandPackage,
|
|
38
|
-
listBuiltInBrandIds,
|
|
39
|
-
} from "./built-in-packages";
|
|
40
|
-
export {
|
|
41
|
-
BUILT_IN_LANGUAGE_IDS,
|
|
42
|
-
DEFAULT_LANGUAGE,
|
|
43
|
-
type DesignLanguageCompatibility,
|
|
44
|
-
type DesignLanguageEntry,
|
|
45
|
-
type DesignLanguageInstall,
|
|
46
|
-
type DesignLanguageRegistry,
|
|
47
|
-
getLanguageById,
|
|
48
|
-
isLanguageId,
|
|
49
|
-
LANGUAGE_IDS,
|
|
50
|
-
LANGUAGE_REGISTRY,
|
|
51
|
-
type LanguageId,
|
|
52
|
-
listSkinLanguages,
|
|
53
|
-
} from "./languages";
|
package/src/languages.meta.json
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$comment": "Human catalog metadata for design languages. Merged with brands/*/brand.json by scripts/sync-languages.mjs → languages.json (AUTO-GENERATED).",
|
|
3
|
-
"version": "2026.07",
|
|
4
|
-
"defaultLanguage": "factory",
|
|
5
|
-
"description": "Design-language catalog for global product chrome swap (Create Center / SaaS theme). Not color moods — full Brand Packages (roles + recipe + elev + zones).",
|
|
6
|
-
"factory": {
|
|
7
|
-
"name": "Nebutra Factory",
|
|
8
|
-
"description": "Default product chrome from @nebutra/tokens (no skin). Clear data-brand to restore.",
|
|
9
|
-
"proves": ["factory HSL SSOT", "recipe defaults", "action≡brand-mark until skin"],
|
|
10
|
-
"darkDefault": true
|
|
11
|
-
},
|
|
12
|
-
"languages": {
|
|
13
|
-
"linear": {
|
|
14
|
-
"description": "Dual-mode: dark void default + light paper; solid acid-lime CTA, compact density.",
|
|
15
|
-
"proves": ["chromatic solid action", "dark product chrome", "dual-mode light/dark palettes"]
|
|
16
|
-
},
|
|
17
|
-
"gsap": {
|
|
18
|
-
"description": "Dark cream-on-void; shockingly-green is accent — CTA is gradient-stroke/outline, not solid green fill.",
|
|
19
|
-
"proves": [
|
|
20
|
-
"outline / gradient-stroke recipe",
|
|
21
|
-
"category extensions",
|
|
22
|
-
"marketing display zone"
|
|
23
|
-
]
|
|
24
|
-
},
|
|
25
|
-
"raycast": {
|
|
26
|
-
"description": "Neutral Mist/Iron filled CTA; Coral is brand-mark only. Key elevation stack.",
|
|
27
|
-
"proves": ["action ≠ brand-mark", "elevation=key free CSS"]
|
|
28
|
-
},
|
|
29
|
-
"vercel": {
|
|
30
|
-
"description": "Monochrome dual-mode: light paper + Obsidian CTA; dark carbon + white CTA; hairline elevation (no chromatic CTA).",
|
|
31
|
-
"proves": ["light monochrome action", "elevation=hairline", "dual-mode light/dark palettes"]
|
|
32
|
-
},
|
|
33
|
-
"vanta": {
|
|
34
|
-
"description": "Editorial violet on parchment; Vivid Violet action ≠ Indigo Ink brand-mark; full pills; elevation=none (carbon hairlines).",
|
|
35
|
-
"proves": [
|
|
36
|
-
"action ≠ brand-mark (chromatic)",
|
|
37
|
-
"elevation=none border-only",
|
|
38
|
-
"999px pill controls",
|
|
39
|
-
"serif display + sans UI zones"
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
"stripe": {
|
|
43
|
-
"description": "Indigo-ink ledger on frost glass; Indigo action ≠ Midnight brand-mark; 4px controls; elevation=none (tint + frost rules).",
|
|
44
|
-
"proves": [
|
|
45
|
-
"action ≠ brand-mark (chromatic indigo vs midnight)",
|
|
46
|
-
"elevation=none tint-ladder depth",
|
|
47
|
-
"4px squared controls (not pill)",
|
|
48
|
-
"whisper heading weight 300"
|
|
49
|
-
]
|
|
50
|
-
},
|
|
51
|
-
"notion": {
|
|
52
|
-
"description": "Warm paper notebook; Notion Blue sole filled CTA ≠ Ink brand-mark; 8px buttons / 12px cards; elev=none + hairline; accent hues decorative only.",
|
|
53
|
-
"proves": [
|
|
54
|
-
"action ≠ brand-mark (blue vs ink)",
|
|
55
|
-
"canvas≠card (paper-warmth vs pure-white)",
|
|
56
|
-
"elevation=none content cards + raised nav shadow slot",
|
|
57
|
-
"table radius priority (8/12 over tertiary 4px)",
|
|
58
|
-
"decorative accents never product CTA"
|
|
59
|
-
]
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
package/src/languages.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Design-language catalog — the real product surface of @nebutra/theme.
|
|
3
|
-
*
|
|
4
|
-
* A "language" is a full Brand Package (roles + recipe + elev + zones), proven by
|
|
5
|
-
* external DS stress tests (Linear / GSAP / Raycast / Vercel / Vanta / Stripe / Notion).
|
|
6
|
-
* Swapping `html[data-brand]` (or applyLanguage) recolors product chrome without
|
|
7
|
-
* call-site edits.
|
|
8
|
-
*
|
|
9
|
-
* Multi-mood oklch catalog was removed. Use LANGUAGE_REGISTRY / isLanguageId only.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/** Generated by scripts/sync-languages.mjs from brands + languages.meta.json */
|
|
13
|
-
import languagesJson from "./languages.json" with { type: "json" };
|
|
14
|
-
|
|
15
|
-
export interface DesignLanguageInstall {
|
|
16
|
-
command: string;
|
|
17
|
-
/** Single-skin import for demos; null for factory */
|
|
18
|
-
cssImport: string | null;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface DesignLanguageCompatibility {
|
|
22
|
-
tailwind: "4";
|
|
23
|
-
cssVariables: boolean;
|
|
24
|
-
brandPackage: boolean;
|
|
25
|
-
dataBrand: boolean;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface DesignLanguageEntry {
|
|
29
|
-
id: string;
|
|
30
|
-
name: string;
|
|
31
|
-
kind: "design-language";
|
|
32
|
-
description: string;
|
|
33
|
-
/** Contract proofs this fixture exercises */
|
|
34
|
-
proves: string[];
|
|
35
|
-
darkDefault: boolean;
|
|
36
|
-
/** Relative to @nebutra/tokens package root; null = factory (no override) */
|
|
37
|
-
brandPath: string | null;
|
|
38
|
-
skinPath: string | null;
|
|
39
|
-
install: DesignLanguageInstall;
|
|
40
|
-
compatibility: DesignLanguageCompatibility;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface DesignLanguageRegistry {
|
|
44
|
-
$schema: string;
|
|
45
|
-
version: string;
|
|
46
|
-
defaultLanguage: string;
|
|
47
|
-
description: string;
|
|
48
|
-
languages: DesignLanguageEntry[];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export const LANGUAGE_REGISTRY = languagesJson as DesignLanguageRegistry;
|
|
52
|
-
export const LANGUAGE_IDS = LANGUAGE_REGISTRY.languages.map((l) => l.id);
|
|
53
|
-
export const DEFAULT_LANGUAGE = LANGUAGE_REGISTRY.defaultLanguage;
|
|
54
|
-
/** Alias — “theme” in product speak = design language */
|
|
55
|
-
export const BUILT_IN_LANGUAGE_IDS = LANGUAGE_IDS;
|
|
56
|
-
|
|
57
|
-
export type LanguageId = string;
|
|
58
|
-
|
|
59
|
-
export function isLanguageId(id: string): boolean {
|
|
60
|
-
return LANGUAGE_IDS.includes(id);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export function getLanguageById(id: string): DesignLanguageEntry | undefined {
|
|
64
|
-
return LANGUAGE_REGISTRY.languages.find((l) => l.id === id);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/** Fixture languages that ship a Brand Package (excludes factory). */
|
|
68
|
-
export function listSkinLanguages(): DesignLanguageEntry[] {
|
|
69
|
-
return LANGUAGE_REGISTRY.languages.filter((l) => l.brandPath != null);
|
|
70
|
-
}
|
package/src/registry.json
DELETED
package/tsconfig.json
DELETED
package/turbo.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": ["//"],
|
|
3
|
-
"tasks": {
|
|
4
|
-
"build": {
|
|
5
|
-
"dependsOn": ["@nebutra/design-tokens#build", "@nebutra/tokens#build"],
|
|
6
|
-
"inputs": [
|
|
7
|
-
"$TURBO_EXTENDS$",
|
|
8
|
-
"scripts/sync-skins.mjs",
|
|
9
|
-
"scripts/sync-languages.mjs",
|
|
10
|
-
"src/languages.meta.json",
|
|
11
|
-
"../tokens/brands/**",
|
|
12
|
-
"../tokens/skins/**",
|
|
13
|
-
"../tokens/scripts/emit-skins.mjs",
|
|
14
|
-
"../tokens/scripts/emit-skins-run.ts"
|
|
15
|
-
],
|
|
16
|
-
"outputs": [
|
|
17
|
-
"skins.css",
|
|
18
|
-
"keyframes.css",
|
|
19
|
-
"themes.css",
|
|
20
|
-
"src/languages.json",
|
|
21
|
-
"src/built-in-packages.generated.ts"
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|