@prodivix/themes 0.0.1
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/LICENSE +21 -0
- package/dist/css/createCssVariables.d.ts +7 -0
- package/dist/css/createCssVariables.d.ts.map +1 -0
- package/dist/css/createThemeStyleText.d.ts +8 -0
- package/dist/css/createThemeStyleText.d.ts.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +384 -0
- package/dist/palette/defaultPalette.d.ts +4 -0
- package/dist/palette/defaultPalette.d.ts.map +1 -0
- package/dist/palette/defaultPalette.json +82 -0
- package/dist/resolver/detectTokenCycles.d.ts +7 -0
- package/dist/resolver/detectTokenCycles.d.ts.map +1 -0
- package/dist/resolver/resolveThemeManifest.d.ts +6 -0
- package/dist/resolver/resolveThemeManifest.d.ts.map +1 -0
- package/dist/resolver/resolveTokenReferences.d.ts +6 -0
- package/dist/resolver/resolveTokenReferences.d.ts.map +1 -0
- package/dist/schema/themeManifest.schema.json +98 -0
- package/dist/schema/themeManifest.types.d.ts +59 -0
- package/dist/schema/themeManifest.types.d.ts.map +1 -0
- package/dist/tokens/defaultFallback.d.ts +8 -0
- package/dist/tokens/defaultFallback.d.ts.map +1 -0
- package/dist/tokens/tokenPaths.d.ts +8 -0
- package/dist/tokens/tokenPaths.d.ts.map +1 -0
- package/dist/validation/validateThemeManifest.d.ts +6 -0
- package/dist/validation/validateThemeManifest.d.ts.map +1 -0
- package/manifests/official/monochrome-dark-high-contrast.json +166 -0
- package/manifests/official/monochrome-dark.json +166 -0
- package/manifests/official/monochrome-light-high-contrast.json +166 -0
- package/manifests/official/monochrome-light.json +166 -0
- package/package.json +33 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Minsecrus 2025
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ThemeManifest } from '../schema/themeManifest.types';
|
|
2
|
+
export type ThemeCssVariableMap = Record<`--${string}`, string>;
|
|
3
|
+
export type CreateCssVariablesOptions = {
|
|
4
|
+
includeRgbChannels?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const createCssVariables: (manifest: ThemeManifest, options?: CreateCssVariablesOptions) => ThemeCssVariableMap;
|
|
7
|
+
//# sourceMappingURL=createCssVariables.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCssVariables.d.ts","sourceRoot":"","sources":["../../src/css/createCssVariables.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAId,MAAM,+BAA+B,CAAC;AAOvC,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,KAAK,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC;AAEhE,MAAM,MAAM,yBAAyB,GAAG;IACtC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC7B,UAAU,aAAa,EACvB,UAAS,yBAA8B,KACtC,mBAiBF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ThemeManifest } from '../schema/themeManifest.types';
|
|
2
|
+
import { type CreateCssVariablesOptions } from './createCssVariables';
|
|
3
|
+
export type CreateThemeStyleTextOptions = CreateCssVariablesOptions & {
|
|
4
|
+
selector?: string;
|
|
5
|
+
includeRootSelector?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const createThemeStyleText: (manifest: ThemeManifest, options?: CreateThemeStyleTextOptions) => string;
|
|
8
|
+
//# sourceMappingURL=createThemeStyleText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createThemeStyleText.d.ts","sourceRoot":"","sources":["../../src/css/createThemeStyleText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,2BAA2B,GAAG,yBAAyB,GAAG;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,UAAU,aAAa,EACvB,UAAS,2BAAgC,WAa1C,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { CURRENT_THEME_SCHEMA_VERSION } from './schema/themeManifest.types';
|
|
2
|
+
export type { ResolvedThemeManifest, ThemeColorScale, ThemeDensityTokens, ThemeManifest, ThemeMode, ThemeMotionTokens, ThemePalette, ThemeProductTokens, ThemeRadiusTokens, ThemeSchemaVersion, ThemeScaleStep, ThemeSemanticTokens, ThemeShadowTokens, ThemeSource, ThemeTokenIndex, ThemeTokenPath, ThemeTokenPrimitive, ThemeTokenSection, ThemeTokenTree, ThemeTypographyTokens, ThemeValidationIssue, ThemeValidationResult, } from './schema/themeManifest.types';
|
|
3
|
+
export { defaultFallbackTheme, officialMonochromeDarkHighContrastTheme, officialMonochromeDarkTheme, officialMonochromeLightHighContrastTheme, officialMonochromeLightTheme, officialThemes, } from './tokens/defaultFallback';
|
|
4
|
+
export { DEFAULT_PALETTE, DEFAULT_PALETTE_SCALES, } from './palette/defaultPalette';
|
|
5
|
+
export { THEME_TOKEN_SECTIONS, extractReferencePath, flattenThemeTokens, isThemeTokenPrimitive, isThemeTokenTree, tokenPathToCssVariable, } from './tokens/tokenPaths';
|
|
6
|
+
export { ThemeTokenResolutionError, resolveTokenReferences, } from './resolver/resolveTokenReferences';
|
|
7
|
+
export { detectTokenCycles, type ThemeTokenCycle, } from './resolver/detectTokenCycles';
|
|
8
|
+
export { resolveThemeManifest, type ResolveThemeManifestOptions, } from './resolver/resolveThemeManifest';
|
|
9
|
+
export { createCssVariables, type CreateCssVariablesOptions, type ThemeCssVariableMap, } from './css/createCssVariables';
|
|
10
|
+
export { createThemeStyleText, type CreateThemeStyleTextOptions, } from './css/createThemeStyleText';
|
|
11
|
+
export { validateThemeManifest, type ValidateThemeManifestOptions, } from './validation/validateThemeManifest';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAC5E,YAAY,EACV,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,oBAAoB,EACpB,uCAAuC,EACvC,2BAA2B,EAC3B,wCAAwC,EACxC,4BAA4B,EAC5B,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,eAAe,EACf,sBAAsB,GACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,iBAAiB,EACjB,KAAK,eAAe,GACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,oBAAoB,EACpB,KAAK,2BAA2B,GACjC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,GACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,oBAAoB,EACpB,KAAK,2BAA2B,GACjC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,qBAAqB,EACrB,KAAK,4BAA4B,GAClC,MAAM,oCAAoC,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
const et = "1.0";
|
|
2
|
+
const S = "official.monochrome.light", B = "Monochrome Light", C = "Prodivix", I = "official", M = "light", E = { surface: { canvas: "{palette.gray.0}", panel: "{palette.gray.1}", raised: "{palette.gray.2}" }, text: { primary: "{palette.gray.13}", secondary: "{palette.gray.10}", muted: "{palette.gray.7}", inverse: "{palette.gray.0}" }, border: { subtle: "{palette.gray.3}", default: "{palette.gray.4}", strong: "{palette.gray.7}" }, accent: { default: "{palette.gray.13}", hover: "{palette.gray.11}" }, success: { default: "{palette.green.8}", hover: "{palette.green.9}", subtle: "{palette.green.2}", subtleHover: "{palette.green.3}" }, danger: { default: "{palette.red.7}", hover: "{palette.red.8}", subtle: "{palette.red.3}", subtleHover: "{palette.red.2}" }, warning: { default: "{palette.yellow.6}", hover: "{palette.yellow.7}", subtle: "{palette.yellow.3}", subtleHover: "{palette.yellow.2}" }, info: { default: "{palette.blue.7}", hover: "{palette.blue.8}", subtle: "{palette.blue.2}", subtleHover: "{palette.blue.3}" } }, W = { editor: { canvasBackground: "{semantic.surface.canvas}", selectionOutline: "{semantic.accent.default}", dropIndicator: "{semantic.accent.default}" }, editorBar: { background: "{palette.gray.11}", icon: "{palette.gray.2}", iconHover: "{palette.gray.0}", iconHoverBackground: "rgb(255 255 255 / 0.08)" }, inspector: { rowHover: "{palette.gray.2}", fieldLabel: "{semantic.text.secondary}", fieldControl: "{semantic.text.primary}" }, nodeGraph: { nodeBackground: "{semantic.surface.panel}", nodeBorder: "{semantic.border.default}", portColor: "{semantic.text.secondary}" }, home: { logo: "{palette.gray.13}", heroText: "{palette.gray.12}", heroHighlight: "{palette.gray.13}", subtitle: "{palette.gray.8}", navIcon: "{palette.gray.10}", navIconHoverBg: "{palette.gray.1}", navIconHoverText: "{palette.gray.13}", profileBg: "{palette.gray.1}", profileHoverShadow: "0 10px 18px rgb(0 0 0 / 0.12)", footerText: "{palette.gray.10}" } }, R = { fontFamily: { ui: "Inter, 'HarmonyOS Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif", mono: "JetBrains Mono, Consolas, monospace", canvas: "{typography.fontFamily.ui}" }, fontSize: { micro: "10px", caption: "11px", "2xs": "10px", xs: "12px", sm: "13px", md: "14px", lg: "16px", xl: "18px", "2xl": "20px", "3xl": "24px", "4xl": "30px", "5xl": "36px", hero: "64px" }, fontWeight: { regular: "400", medium: "500", semibold: "600", bold: "700", extrabold: "800" }, lineHeight: { tight: "1", compact: "1.3", editor: "1.45", normal: "1.5" } }, O = { none: "0", sm: "4px", md: "8px", lg: "12px", full: "9999px" }, V = { sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)", md: "0 4px 6px -1px rgb(0 0 0 / 0.1)", lg: "0 10px 15px -3px rgb(0 0 0 / 0.1)" }, _ = { spacing: { none: "0", xs: "4px", sm: "8px", md: "16px", lg: "24px", xl: "32px", "2xl": "48px" }, controlHeight: { sm: "24px", md: "28px", lg: "32px" } }, A = { duration: { fast: "150ms", normal: "300ms" }, easing: { standard: "ease" } }, P = { description: "Default monochrome light theme with multi-color 0-13 palette scales.", tags: ["official", "monochrome", "light"], license: "MIT" }, L = {
|
|
3
|
+
schemaVersion: "1.0",
|
|
4
|
+
id: S,
|
|
5
|
+
name: B,
|
|
6
|
+
author: C,
|
|
7
|
+
source: I,
|
|
8
|
+
mode: M,
|
|
9
|
+
semantic: E,
|
|
10
|
+
product: W,
|
|
11
|
+
typography: R,
|
|
12
|
+
radius: O,
|
|
13
|
+
shadow: V,
|
|
14
|
+
density: _,
|
|
15
|
+
motion: A,
|
|
16
|
+
metadata: P
|
|
17
|
+
}, F = "1.0", j = "official.monochrome.dark", z = "Monochrome Dark", D = "Prodivix", U = "official", N = "dark", G = { surface: { canvas: "{palette.gray.12}", panel: "{palette.gray.11}", raised: "{palette.gray.10}" }, text: { primary: "{palette.gray.0}", secondary: "{palette.gray.4}", muted: "{palette.gray.7}", inverse: "{palette.gray.13}" }, border: { subtle: "{palette.gray.10}", default: "{palette.gray.9}", strong: "{palette.gray.7}" }, accent: { default: "{palette.gray.0}", hover: "{palette.gray.2}" }, success: { default: "{palette.green.5}", hover: "{palette.green.4}", subtle: "{palette.green.11}", subtleHover: "{palette.green.10}" }, danger: { default: "{palette.red.5}", hover: "{palette.red.4}", subtle: "{palette.red.11}", subtleHover: "{palette.red.10}" }, warning: { default: "{palette.yellow.5}", hover: "{palette.yellow.4}", subtle: "{palette.yellow.11}", subtleHover: "{palette.yellow.10}" }, info: { default: "{palette.blue.5}", hover: "{palette.blue.4}", subtle: "{palette.blue.11}", subtleHover: "{palette.blue.10}" } }, J = { editor: { canvasBackground: "{semantic.surface.canvas}", selectionOutline: "{semantic.accent.default}", dropIndicator: "{semantic.accent.default}" }, editorBar: { background: "{palette.gray.13}", icon: "{palette.gray.3}", iconHover: "{palette.gray.0}", iconHoverBackground: "rgb(255 255 255 / 0.08)" }, inspector: { rowHover: "{palette.gray.10}", fieldLabel: "{semantic.text.secondary}", fieldControl: "{semantic.text.primary}" }, nodeGraph: { nodeBackground: "{semantic.surface.panel}", nodeBorder: "{semantic.border.default}", portColor: "{semantic.text.secondary}" }, home: { logo: "{palette.gray.0}", heroText: "{palette.gray.1}", heroHighlight: "{palette.gray.0}", subtitle: "{palette.gray.6}", navIcon: "{palette.gray.4}", navIconHoverBg: "{palette.gray.11}", navIconHoverText: "{palette.gray.0}", profileBg: "{palette.gray.11}", profileHoverShadow: "0 10px 18px rgb(0 0 0 / 0.32)", footerText: "{palette.gray.4}" } }, q = { fontFamily: { ui: "Inter, 'HarmonyOS Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif", mono: "JetBrains Mono, Consolas, monospace", canvas: "{typography.fontFamily.ui}" }, fontSize: { micro: "10px", caption: "11px", "2xs": "10px", xs: "12px", sm: "13px", md: "14px", lg: "16px", xl: "18px", "2xl": "20px", "3xl": "24px", "4xl": "30px", "5xl": "36px", hero: "64px" }, fontWeight: { regular: "400", medium: "500", semibold: "600", bold: "700", extrabold: "800" }, lineHeight: { tight: "1", compact: "1.3", editor: "1.45", normal: "1.5" } }, Z = { none: "0", sm: "4px", md: "8px", lg: "12px", full: "9999px" }, K = { sm: "0 1px 2px 0 rgb(0 0 0 / 0.28)", md: "0 4px 6px -1px rgb(0 0 0 / 0.32)", lg: "0 10px 15px -3px rgb(0 0 0 / 0.36)" }, Q = { spacing: { none: "0", xs: "4px", sm: "8px", md: "16px", lg: "24px", xl: "32px", "2xl": "48px" }, controlHeight: { sm: "24px", md: "28px", lg: "32px" } }, X = { duration: { fast: "150ms", normal: "300ms" }, easing: { standard: "ease" } }, Y = { description: "Default monochrome dark theme with stable multi-color 0-13 palette scales.", tags: ["official", "monochrome", "dark"], license: "MIT" }, ee = {
|
|
18
|
+
schemaVersion: F,
|
|
19
|
+
id: j,
|
|
20
|
+
name: z,
|
|
21
|
+
author: D,
|
|
22
|
+
source: U,
|
|
23
|
+
mode: N,
|
|
24
|
+
semantic: G,
|
|
25
|
+
product: J,
|
|
26
|
+
typography: q,
|
|
27
|
+
radius: Z,
|
|
28
|
+
shadow: K,
|
|
29
|
+
density: Q,
|
|
30
|
+
motion: X,
|
|
31
|
+
metadata: Y
|
|
32
|
+
}, te = "1.0", oe = "official.monochrome.light-high-contrast", ae = "Monochrome Light High Contrast", re = "Prodivix", ne = "official", se = "light", ie = { surface: { canvas: "{palette.gray.0}", panel: "{palette.gray.0}", raised: "{palette.gray.0}" }, text: { primary: "{palette.gray.13}", secondary: "{palette.gray.13}", muted: "{palette.gray.11}", inverse: "{palette.gray.0}" }, border: { subtle: "{palette.gray.13}", default: "{palette.gray.13}", strong: "{palette.gray.13}" }, accent: { default: "{palette.gray.13}", hover: "{palette.gray.11}" }, success: { default: "{palette.green.11}", hover: "{palette.green.13}", subtle: "{palette.green.2}", subtleHover: "{palette.green.3}" }, danger: { default: "{palette.red.11}", hover: "{palette.red.13}", subtle: "{palette.red.2}", subtleHover: "{palette.red.3}" }, warning: { default: "{palette.yellow.11}", hover: "{palette.yellow.13}", subtle: "{palette.yellow.2}", subtleHover: "{palette.yellow.3}" }, info: { default: "{palette.blue.11}", hover: "{palette.blue.13}", subtle: "{palette.blue.2}", subtleHover: "{palette.blue.3}" } }, ce = { editor: { canvasBackground: "{semantic.surface.canvas}", selectionOutline: "{semantic.accent.default}", dropIndicator: "{semantic.accent.default}" }, editorBar: { background: "{palette.gray.13}", icon: "{palette.gray.0}", iconHover: "{palette.gray.0}", iconHoverBackground: "rgb(255 255 255 / 0.18)" }, inspector: { rowHover: "{palette.gray.3}", fieldLabel: "{semantic.text.primary}", fieldControl: "{semantic.text.primary}" }, nodeGraph: { nodeBackground: "{semantic.surface.panel}", nodeBorder: "{semantic.border.strong}", portColor: "{semantic.text.primary}" }, home: { logo: "{palette.gray.13}", heroText: "{palette.gray.13}", heroHighlight: "{palette.gray.13}", subtitle: "{palette.gray.11}", navIcon: "{palette.gray.13}", navIconHoverBg: "{palette.gray.3}", navIconHoverText: "{palette.gray.13}", profileBg: "{palette.gray.0}", profileHoverShadow: "0 0 0 2px rgb(0 0 0 / 1)", footerText: "{palette.gray.13}" } }, le = { fontFamily: { ui: "Inter, 'HarmonyOS Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif", mono: "JetBrains Mono, Consolas, monospace", canvas: "{typography.fontFamily.ui}" }, fontSize: { micro: "10px", caption: "11px", "2xs": "10px", xs: "12px", sm: "13px", md: "14px", lg: "16px", xl: "18px", "2xl": "20px", "3xl": "24px", "4xl": "30px", "5xl": "36px", hero: "64px" }, fontWeight: { regular: "500", medium: "600", semibold: "700", bold: "800", extrabold: "900" }, lineHeight: { tight: "1", compact: "1.3", editor: "1.45", normal: "1.5" } }, pe = { none: "0", sm: "4px", md: "8px", lg: "12px", full: "9999px" }, de = { sm: "0 0 0 1px rgb(0 0 0 / 1)", md: "0 0 0 2px rgb(0 0 0 / 1)", lg: "0 0 0 3px rgb(0 0 0 / 1)" }, ge = { spacing: { none: "0", xs: "4px", sm: "8px", md: "16px", lg: "24px", xl: "32px", "2xl": "48px" }, controlHeight: { sm: "24px", md: "28px", lg: "32px" } }, me = { duration: { fast: "150ms", normal: "300ms" }, easing: { standard: "ease" } }, ue = { description: "High contrast light theme with maximum text and border contrast for accessibility.", tags: ["official", "monochrome", "light", "high-contrast", "a11y"], license: "MIT" }, fe = {
|
|
33
|
+
schemaVersion: te,
|
|
34
|
+
id: oe,
|
|
35
|
+
name: ae,
|
|
36
|
+
author: re,
|
|
37
|
+
source: ne,
|
|
38
|
+
mode: se,
|
|
39
|
+
semantic: ie,
|
|
40
|
+
product: ce,
|
|
41
|
+
typography: le,
|
|
42
|
+
radius: pe,
|
|
43
|
+
shadow: de,
|
|
44
|
+
density: ge,
|
|
45
|
+
motion: me,
|
|
46
|
+
metadata: ue
|
|
47
|
+
}, he = "1.0", ye = "official.monochrome.dark-high-contrast", xe = "Monochrome Dark High Contrast", be = "Prodivix", ve = "official", $e = "dark", He = { surface: { canvas: "{palette.gray.13}", panel: "{palette.gray.13}", raised: "{palette.gray.13}" }, text: { primary: "{palette.gray.0}", secondary: "{palette.gray.0}", muted: "{palette.gray.2}", inverse: "{palette.gray.13}" }, border: { subtle: "{palette.gray.0}", default: "{palette.gray.0}", strong: "{palette.gray.0}" }, accent: { default: "{palette.gray.0}", hover: "{palette.gray.2}" }, success: { default: "{palette.green.4}", hover: "{palette.green.2}", subtle: "{palette.green.12}", subtleHover: "{palette.green.11}" }, danger: { default: "{palette.red.4}", hover: "{palette.red.2}", subtle: "{palette.red.12}", subtleHover: "{palette.red.11}" }, warning: { default: "{palette.yellow.4}", hover: "{palette.yellow.2}", subtle: "{palette.yellow.12}", subtleHover: "{palette.yellow.11}" }, info: { default: "{palette.blue.4}", hover: "{palette.blue.2}", subtle: "{palette.blue.12}", subtleHover: "{palette.blue.11}" } }, Te = { editor: { canvasBackground: "{semantic.surface.canvas}", selectionOutline: "{semantic.accent.default}", dropIndicator: "{semantic.accent.default}" }, editorBar: { background: "{palette.gray.0}", icon: "{palette.gray.13}", iconHover: "{palette.gray.13}", iconHoverBackground: "rgb(0 0 0 / 0.18)" }, inspector: { rowHover: "{palette.gray.11}", fieldLabel: "{semantic.text.primary}", fieldControl: "{semantic.text.primary}" }, nodeGraph: { nodeBackground: "{semantic.surface.panel}", nodeBorder: "{semantic.border.strong}", portColor: "{semantic.text.primary}" }, home: { logo: "{palette.gray.0}", heroText: "{palette.gray.0}", heroHighlight: "{palette.gray.0}", subtitle: "{palette.gray.2}", navIcon: "{palette.gray.0}", navIconHoverBg: "{palette.gray.11}", navIconHoverText: "{palette.gray.0}", profileBg: "{palette.gray.13}", profileHoverShadow: "0 0 0 2px rgb(255 255 255 / 1)", footerText: "{palette.gray.0}" } }, ke = { fontFamily: { ui: "Inter, 'HarmonyOS Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif", mono: "JetBrains Mono, Consolas, monospace", canvas: "{typography.fontFamily.ui}" }, fontSize: { micro: "10px", caption: "11px", "2xs": "10px", xs: "12px", sm: "13px", md: "14px", lg: "16px", xl: "18px", "2xl": "20px", "3xl": "24px", "4xl": "30px", "5xl": "36px", hero: "64px" }, fontWeight: { regular: "500", medium: "600", semibold: "700", bold: "800", extrabold: "900" }, lineHeight: { tight: "1", compact: "1.3", editor: "1.45", normal: "1.5" } }, we = { none: "0", sm: "4px", md: "8px", lg: "12px", full: "9999px" }, Se = { sm: "0 0 0 1px rgb(255 255 255 / 1)", md: "0 0 0 2px rgb(255 255 255 / 1)", lg: "0 0 0 3px rgb(255 255 255 / 1)" }, Be = { spacing: { none: "0", xs: "4px", sm: "8px", md: "16px", lg: "24px", xl: "32px", "2xl": "48px" }, controlHeight: { sm: "24px", md: "28px", lg: "32px" } }, Ce = { duration: { fast: "150ms", normal: "300ms" }, easing: { standard: "ease" } }, Ie = { description: "High contrast dark theme with maximum text and border contrast for accessibility.", tags: ["official", "monochrome", "dark", "high-contrast", "a11y"], license: "MIT" }, Me = {
|
|
48
|
+
schemaVersion: he,
|
|
49
|
+
id: ye,
|
|
50
|
+
name: xe,
|
|
51
|
+
author: be,
|
|
52
|
+
source: ve,
|
|
53
|
+
mode: $e,
|
|
54
|
+
semantic: He,
|
|
55
|
+
product: Te,
|
|
56
|
+
typography: ke,
|
|
57
|
+
radius: we,
|
|
58
|
+
shadow: Se,
|
|
59
|
+
density: Be,
|
|
60
|
+
motion: Ce,
|
|
61
|
+
metadata: Ie
|
|
62
|
+
}, h = L, Ee = ee, We = fe, Re = Me, tt = [
|
|
63
|
+
h,
|
|
64
|
+
Ee,
|
|
65
|
+
We,
|
|
66
|
+
Re
|
|
67
|
+
], y = h, Oe = { 0: "#ffffff", 1: "#fcfcfc", 2: "#f7f7f7", 3: "#f0f0f0", 4: "#e5e5e5", 5: "#d4d4d4", 6: "#b8b8b8", 7: "#999999", 8: "#737373", 9: "#525252", 10: "#404040", 11: "#262626", 12: "#171717", 13: "#000000" }, Ve = { 0: "#fffafa", 1: "#fff1f1", 2: "#ffe4e5", 3: "#ffcdd0", 4: "#ffa4aa", 5: "#ff7a83", 6: "#f25560", 7: "#e33d49", 8: "#cf2431", 9: "#b91c28", 10: "#991722", 11: "#7f121b", 12: "#650d14", 13: "#4c0609" }, _e = { 0: "#fbfffc", 1: "#f0fdf4", 2: "#dcfce7", 3: "#bbf7d0", 4: "#86efac", 5: "#4ade80", 6: "#22c55e", 7: "#16a34a", 8: "#15803d", 9: "#166534", 10: "#14532d", 11: "#0f3f24", 12: "#0a2e1a", 13: "#051f10" }, Ae = { 0: "#fffdf5", 1: "#fffbeb", 2: "#fef3c7", 3: "#fde68a", 4: "#fcd34d", 5: "#fbbf24", 6: "#f59e0b", 7: "#d97706", 8: "#b45309", 9: "#92400e", 10: "#78350f", 11: "#5f2a0c", 12: "#472007", 13: "#301504" }, Pe = { 0: "#f8fbff", 1: "#eff6ff", 2: "#dbeafe", 3: "#bfdbfe", 4: "#93c5fd", 5: "#60a5fa", 6: "#3b82f6", 7: "#2563eb", 8: "#1d4ed8", 9: "#1e40af", 10: "#1e3a8a", 11: "#172f70", 12: "#102456", 13: "#0a183d" }, Le = {
|
|
68
|
+
gray: Oe,
|
|
69
|
+
red: Ve,
|
|
70
|
+
green: _e,
|
|
71
|
+
yellow: Ae,
|
|
72
|
+
blue: Pe
|
|
73
|
+
}, x = Le, ot = Object.keys(
|
|
74
|
+
x
|
|
75
|
+
), Fe = [
|
|
76
|
+
"semantic",
|
|
77
|
+
"product",
|
|
78
|
+
"typography",
|
|
79
|
+
"radius",
|
|
80
|
+
"shadow",
|
|
81
|
+
"density",
|
|
82
|
+
"motion"
|
|
83
|
+
], je = {
|
|
84
|
+
"semantic.surface.canvas": "--bg-canvas",
|
|
85
|
+
"semantic.surface.panel": "--bg-panel",
|
|
86
|
+
"semantic.surface.raised": "--bg-raised",
|
|
87
|
+
"semantic.text.primary": "--text-primary",
|
|
88
|
+
"semantic.text.secondary": "--text-secondary",
|
|
89
|
+
"semantic.text.muted": "--text-muted",
|
|
90
|
+
"semantic.text.inverse": "--text-inverse",
|
|
91
|
+
"semantic.border.subtle": "--border-subtle",
|
|
92
|
+
"semantic.border.default": "--border-default",
|
|
93
|
+
"semantic.border.strong": "--border-strong",
|
|
94
|
+
"semantic.accent.default": "--accent-color",
|
|
95
|
+
"semantic.accent.hover": "--accent-hover",
|
|
96
|
+
"semantic.success.default": "--success-color",
|
|
97
|
+
"semantic.success.hover": "--success-hover",
|
|
98
|
+
"semantic.success.subtle": "--success-subtle",
|
|
99
|
+
"semantic.success.subtleHover": "--success-subtle-hover",
|
|
100
|
+
"semantic.danger.default": "--danger-color",
|
|
101
|
+
"semantic.danger.hover": "--danger-hover",
|
|
102
|
+
"semantic.danger.subtle": "--danger-subtle",
|
|
103
|
+
"semantic.danger.subtleHover": "--danger-subtle-hover",
|
|
104
|
+
"semantic.warning.default": "--warning-color",
|
|
105
|
+
"semantic.warning.hover": "--warning-hover",
|
|
106
|
+
"semantic.warning.subtle": "--warning-subtle",
|
|
107
|
+
"semantic.warning.subtleHover": "--warning-subtle-hover",
|
|
108
|
+
"semantic.info.default": "--info-color",
|
|
109
|
+
"semantic.info.hover": "--info-hover",
|
|
110
|
+
"semantic.info.subtle": "--info-subtle",
|
|
111
|
+
"semantic.info.subtleHover": "--info-subtle-hover"
|
|
112
|
+
}, ze = {
|
|
113
|
+
"product.editor.canvasBackground": "--editor-canvas-bg",
|
|
114
|
+
"product.editor.selectionOutline": "--editor-selection-outline",
|
|
115
|
+
"product.editor.dropIndicator": "--editor-drop-indicator",
|
|
116
|
+
"product.editorBar.background": "--editor-bar-bg",
|
|
117
|
+
"product.editorBar.icon": "--editor-bar-icon",
|
|
118
|
+
"product.editorBar.iconHover": "--editor-bar-icon-hover",
|
|
119
|
+
"product.editorBar.iconHoverBackground": "--editor-bar-icon-hover-bg",
|
|
120
|
+
"product.inspector.rowHover": "--inspector-row-hover",
|
|
121
|
+
"product.inspector.fieldLabel": "--inspector-field-label",
|
|
122
|
+
"product.inspector.fieldControl": "--inspector-field-control",
|
|
123
|
+
"product.nodeGraph.nodeBackground": "--node-bg",
|
|
124
|
+
"product.nodeGraph.nodeBorder": "--node-border",
|
|
125
|
+
"product.nodeGraph.portColor": "--node-port-color",
|
|
126
|
+
"product.home.logo": "--home-logo",
|
|
127
|
+
"product.home.heroText": "--home-hero-text",
|
|
128
|
+
"product.home.heroHighlight": "--home-hero-highlight",
|
|
129
|
+
"product.home.subtitle": "--home-subtitle",
|
|
130
|
+
"product.home.navIcon": "--home-nav-icon",
|
|
131
|
+
"product.home.navIconHoverBg": "--home-nav-icon-hover-bg",
|
|
132
|
+
"product.home.navIconHoverText": "--home-nav-icon-hover-text",
|
|
133
|
+
"product.home.profileBg": "--home-profile-bg",
|
|
134
|
+
"product.home.profileHoverShadow": "--home-profile-hover-shadow",
|
|
135
|
+
"product.home.footerText": "--home-footer-text"
|
|
136
|
+
}, m = (e) => typeof e == "object" && e !== null && !Array.isArray(e), b = (e) => typeof e == "string" || typeof e == "number", d = (e) => {
|
|
137
|
+
const a = {};
|
|
138
|
+
u("palette", x, a);
|
|
139
|
+
for (const t of Fe) {
|
|
140
|
+
const o = e[t];
|
|
141
|
+
m(o) && u(t, o, a);
|
|
142
|
+
}
|
|
143
|
+
return a;
|
|
144
|
+
}, v = (e) => {
|
|
145
|
+
if (e.startsWith("palette."))
|
|
146
|
+
return `--palette-${c(e.replace(/^palette\./, ""))}`;
|
|
147
|
+
const a = je[e];
|
|
148
|
+
if (a)
|
|
149
|
+
return a;
|
|
150
|
+
const t = ze[e];
|
|
151
|
+
return t || (e.startsWith("typography.fontFamily.") ? `--font-family-${c(
|
|
152
|
+
e.replace(/^typography\.fontFamily\./, "")
|
|
153
|
+
)}` : e.startsWith("typography.fontSize.") ? `--font-size-${c(
|
|
154
|
+
e.replace(/^typography\.fontSize\./, "")
|
|
155
|
+
)}` : e.startsWith("typography.lineHeight.") ? `--line-height-${c(
|
|
156
|
+
e.replace(/^typography\.lineHeight\./, "")
|
|
157
|
+
)}` : e.startsWith("typography.fontWeight.") ? `--font-weight-${c(
|
|
158
|
+
e.replace(/^typography\.fontWeight\./, "")
|
|
159
|
+
)}` : e.startsWith("radius.") ? `--radius-${c(e.replace(/^radius\./, ""))}` : e.startsWith("shadow.") ? `--shadow-${c(e.replace(/^shadow\./, ""))}` : e.startsWith("density.spacing.") ? `--spacing-${c(e.replace(/^density\.spacing\./, ""))}` : e.startsWith("density.controlHeight.") ? `--control-height-${c(
|
|
160
|
+
e.replace(/^density\.controlHeight\./, "")
|
|
161
|
+
)}` : e.startsWith("motion.duration.") ? `--motion-duration-${c(
|
|
162
|
+
e.replace(/^motion\.duration\./, "")
|
|
163
|
+
)}` : e.startsWith("motion.easing.") ? `--motion-easing-${c(
|
|
164
|
+
e.replace(/^motion\.easing\./, "")
|
|
165
|
+
)}` : `--${c(e)}`);
|
|
166
|
+
}, g = (e) => typeof e != "string" ? void 0 : e.match(/^\{([a-zA-Z0-9._-]+)\}$/)?.[1], u = (e, a, t) => {
|
|
167
|
+
for (const [o, r] of Object.entries(a)) {
|
|
168
|
+
const n = `${e}.${o}`;
|
|
169
|
+
if (b(r)) {
|
|
170
|
+
t[n] = r;
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
u(n, r, t);
|
|
174
|
+
}
|
|
175
|
+
}, c = (e) => e.replace(/\./g, "-").replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/_/g, "-").toLowerCase();
|
|
176
|
+
class $ extends Error {
|
|
177
|
+
constructor(a) {
|
|
178
|
+
super(a), this.name = "ThemeTokenResolutionError";
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
const H = (e, a = {}) => {
|
|
182
|
+
const t = {}, o = /* @__PURE__ */ new Set();
|
|
183
|
+
for (const r of Object.keys(e))
|
|
184
|
+
t[r] = T(r, e, a, {
|
|
185
|
+
resolvedTokens: t,
|
|
186
|
+
resolving: o
|
|
187
|
+
});
|
|
188
|
+
return t;
|
|
189
|
+
}, T = (e, a, t, o) => {
|
|
190
|
+
const r = o.resolvedTokens[e];
|
|
191
|
+
if (r !== void 0)
|
|
192
|
+
return r;
|
|
193
|
+
if (o.resolving.has(e))
|
|
194
|
+
throw new $(
|
|
195
|
+
`Circular theme token reference detected at "${e}".`
|
|
196
|
+
);
|
|
197
|
+
const n = De(e, a, t);
|
|
198
|
+
o.resolving.add(e);
|
|
199
|
+
const s = g(n), l = s ? T(s, a, t, o) : n;
|
|
200
|
+
return o.resolving.delete(e), o.resolvedTokens[e] = l, l;
|
|
201
|
+
}, De = (e, a, t) => {
|
|
202
|
+
const o = a[e] ?? t[e];
|
|
203
|
+
if (o === void 0)
|
|
204
|
+
throw new $(
|
|
205
|
+
`Unknown theme token reference "${e}".`
|
|
206
|
+
);
|
|
207
|
+
return o;
|
|
208
|
+
}, Ue = (e, a = {}) => {
|
|
209
|
+
const t = [], o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
210
|
+
for (const n of Object.keys(e))
|
|
211
|
+
k(n, e, a, {
|
|
212
|
+
cycles: t,
|
|
213
|
+
stack: [],
|
|
214
|
+
visited: o,
|
|
215
|
+
visiting: r
|
|
216
|
+
});
|
|
217
|
+
return t;
|
|
218
|
+
}, k = (e, a, t, o) => {
|
|
219
|
+
if (o.visited.has(e))
|
|
220
|
+
return;
|
|
221
|
+
if (o.visiting.has(e)) {
|
|
222
|
+
o.cycles.push({
|
|
223
|
+
path: e,
|
|
224
|
+
chain: [...o.stack, e]
|
|
225
|
+
});
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
const r = a[e] ?? t[e];
|
|
229
|
+
if (r === void 0)
|
|
230
|
+
return;
|
|
231
|
+
o.visiting.add(e), o.stack.push(e);
|
|
232
|
+
const n = g(r);
|
|
233
|
+
n && k(n, a, t, o), o.stack.pop(), o.visiting.delete(e), o.visited.add(e);
|
|
234
|
+
}, at = (e, a = {}) => {
|
|
235
|
+
const t = a.fallbackManifest ?? y, o = d(e), r = t.id === e.id ? {} : d(t), n = H(o, r);
|
|
236
|
+
return {
|
|
237
|
+
manifest: e,
|
|
238
|
+
rawTokens: o,
|
|
239
|
+
resolvedTokens: n
|
|
240
|
+
};
|
|
241
|
+
}, Ne = (e, a = {}) => {
|
|
242
|
+
const t = a.includeRgbChannels ?? !0, o = d(e), r = {};
|
|
243
|
+
for (const n of Object.keys(o)) {
|
|
244
|
+
const s = v(n), l = Ge(o[n]);
|
|
245
|
+
r[s] = l, t && Je(s, o[n], o, r);
|
|
246
|
+
}
|
|
247
|
+
return r;
|
|
248
|
+
}, Ge = (e) => {
|
|
249
|
+
const a = g(e);
|
|
250
|
+
return a ? `var(${v(a)})` : String(e);
|
|
251
|
+
}, Je = (e, a, t, o) => {
|
|
252
|
+
if (!qe(e))
|
|
253
|
+
return;
|
|
254
|
+
const r = w(a, t);
|
|
255
|
+
r && (o[`${e}-rgb`] = r);
|
|
256
|
+
}, qe = (e) => e.startsWith("--palette-") || e.startsWith("--bg-") || e.startsWith("--text-") || e.startsWith("--border-") || e.startsWith("--accent-") || e.startsWith("--success-") || e.startsWith("--danger-") || e.startsWith("--warning-") || e.startsWith("--info-") || e.startsWith("--editor-") || e.startsWith("--inspector-") || e.startsWith("--node-") || e.startsWith("--home-"), w = (e, a) => {
|
|
257
|
+
const t = g(e);
|
|
258
|
+
if (t) {
|
|
259
|
+
const o = a[t];
|
|
260
|
+
return o === void 0 ? void 0 : w(o, a);
|
|
261
|
+
}
|
|
262
|
+
if (typeof e == "string")
|
|
263
|
+
return Ze(e);
|
|
264
|
+
}, Ze = (e) => {
|
|
265
|
+
const a = e.trim(), t = a.match(/^#([0-9a-f]{3})$/i), o = a.match(/^#([0-9a-f]{6})([0-9a-f]{2})?$/i);
|
|
266
|
+
if (t)
|
|
267
|
+
return t[1].split("").map((i) => parseInt(`${i}${i}`, 16)).join(" ");
|
|
268
|
+
if (!o)
|
|
269
|
+
return;
|
|
270
|
+
const r = o[1], n = parseInt(r.slice(0, 2), 16), s = parseInt(r.slice(2, 4), 16), l = parseInt(r.slice(4, 6), 16);
|
|
271
|
+
return `${n} ${s} ${l}`;
|
|
272
|
+
}, rt = (e, a = {}) => {
|
|
273
|
+
const t = Ne(e, a), o = a.selector ?? `[data-theme-id='${Ke(e.id)}']`, r = a.includeRootSelector ? [":root", o] : [o], n = Object.entries(t).map(([s, l]) => ` ${s}: ${l};`).join(`
|
|
274
|
+
`);
|
|
275
|
+
return `${r.join(`,
|
|
276
|
+
`)} {
|
|
277
|
+
${n}
|
|
278
|
+
}`;
|
|
279
|
+
}, Ke = (e) => e.replace(/\\/g, "\\\\").replace(/'/g, "\\'"), Qe = /^[a-z][a-z0-9]*(\.[a-z0-9][a-z0-9-]*)+$/, nt = (e, a = {}) => {
|
|
280
|
+
const t = [];
|
|
281
|
+
if (!Xe(e))
|
|
282
|
+
return {
|
|
283
|
+
valid: !1,
|
|
284
|
+
errors: [{ path: "$", message: "Theme manifest must be an object." }]
|
|
285
|
+
};
|
|
286
|
+
p(e, "schemaVersion", t), p(e, "id", t), p(e, "name", t), p(e, "source", t), p(e, "mode", t), e.schemaVersion !== "1.0" && t.push({
|
|
287
|
+
path: "$.schemaVersion",
|
|
288
|
+
message: 'Theme manifest schemaVersion must be "1.0".'
|
|
289
|
+
}), typeof e.id == "string" && !Qe.test(e.id) && t.push({
|
|
290
|
+
path: "$.id",
|
|
291
|
+
message: "Theme id must use a stable dot-separated identifier."
|
|
292
|
+
}), ["official", "custom", "community"].includes(String(e.source)) || t.push({
|
|
293
|
+
path: "$.source",
|
|
294
|
+
message: "Theme source must be official, custom, or community."
|
|
295
|
+
}), ["light", "dark", "adaptive"].includes(String(e.mode)) || t.push({
|
|
296
|
+
path: "$.mode",
|
|
297
|
+
message: "Theme mode must be light, dark, or adaptive."
|
|
298
|
+
}), e.palette !== void 0 && t.push({
|
|
299
|
+
path: "$.palette",
|
|
300
|
+
message: "Theme manifests must not define palette; the palette is fixed and shared."
|
|
301
|
+
}), f(e.semantic, "$.semantic", t);
|
|
302
|
+
for (const i of [
|
|
303
|
+
"product",
|
|
304
|
+
"typography",
|
|
305
|
+
"radius",
|
|
306
|
+
"shadow",
|
|
307
|
+
"density",
|
|
308
|
+
"motion"
|
|
309
|
+
])
|
|
310
|
+
e[i] !== void 0 && f(e[i], `$.${i}`, t);
|
|
311
|
+
if (t.length > 0)
|
|
312
|
+
return {
|
|
313
|
+
valid: !1,
|
|
314
|
+
errors: t
|
|
315
|
+
};
|
|
316
|
+
const o = e, r = a.fallbackManifest ?? y, n = d(o), s = r.id === o.id ? {} : d(r), l = Ue(n, s);
|
|
317
|
+
for (const i of l)
|
|
318
|
+
t.push({
|
|
319
|
+
path: Ye(i.path),
|
|
320
|
+
message: `Circular theme token reference detected: ${i.chain.join(" -> ")}.`
|
|
321
|
+
});
|
|
322
|
+
try {
|
|
323
|
+
H(n, s);
|
|
324
|
+
} catch (i) {
|
|
325
|
+
t.push({
|
|
326
|
+
path: "$",
|
|
327
|
+
message: i instanceof Error ? i.message : "Failed to resolve theme tokens."
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
return t.length === 0 ? { valid: !0, errors: [] } : {
|
|
331
|
+
valid: !1,
|
|
332
|
+
errors: t
|
|
333
|
+
};
|
|
334
|
+
}, p = (e, a, t) => {
|
|
335
|
+
(typeof e[a] != "string" || e[a] === "") && t.push({
|
|
336
|
+
path: `$.${a}`,
|
|
337
|
+
message: `${a} is required and must be a non-empty string.`
|
|
338
|
+
});
|
|
339
|
+
}, f = (e, a, t) => {
|
|
340
|
+
if (!m(e)) {
|
|
341
|
+
t.push({
|
|
342
|
+
path: a,
|
|
343
|
+
message: "Theme token section must be an object."
|
|
344
|
+
});
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
for (const [o, r] of Object.entries(e)) {
|
|
348
|
+
const n = `${a}.${o}`;
|
|
349
|
+
if (!b(r)) {
|
|
350
|
+
if (m(r)) {
|
|
351
|
+
f(r, n, t);
|
|
352
|
+
continue;
|
|
353
|
+
}
|
|
354
|
+
t.push({
|
|
355
|
+
path: n,
|
|
356
|
+
message: "Theme token value must be a string, number, or nested object."
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}, Xe = (e) => typeof e == "object" && e !== null && !Array.isArray(e), Ye = (e) => `$.${e}`;
|
|
361
|
+
export {
|
|
362
|
+
et as CURRENT_THEME_SCHEMA_VERSION,
|
|
363
|
+
x as DEFAULT_PALETTE,
|
|
364
|
+
ot as DEFAULT_PALETTE_SCALES,
|
|
365
|
+
Fe as THEME_TOKEN_SECTIONS,
|
|
366
|
+
$ as ThemeTokenResolutionError,
|
|
367
|
+
Ne as createCssVariables,
|
|
368
|
+
rt as createThemeStyleText,
|
|
369
|
+
y as defaultFallbackTheme,
|
|
370
|
+
Ue as detectTokenCycles,
|
|
371
|
+
g as extractReferencePath,
|
|
372
|
+
d as flattenThemeTokens,
|
|
373
|
+
b as isThemeTokenPrimitive,
|
|
374
|
+
m as isThemeTokenTree,
|
|
375
|
+
Re as officialMonochromeDarkHighContrastTheme,
|
|
376
|
+
Ee as officialMonochromeDarkTheme,
|
|
377
|
+
We as officialMonochromeLightHighContrastTheme,
|
|
378
|
+
h as officialMonochromeLightTheme,
|
|
379
|
+
tt as officialThemes,
|
|
380
|
+
at as resolveThemeManifest,
|
|
381
|
+
H as resolveTokenReferences,
|
|
382
|
+
v as tokenPathToCssVariable,
|
|
383
|
+
nt as validateThemeManifest
|
|
384
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultPalette.d.ts","sourceRoot":"","sources":["../../src/palette/defaultPalette.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,eAAO,MAAM,eAAe,EAAkB,YAAY,CAAC;AAE3D,eAAO,MAAM,sBAAsB,EAE9B,SAAS,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"gray": {
|
|
3
|
+
"0": "#ffffff",
|
|
4
|
+
"1": "#fcfcfc",
|
|
5
|
+
"2": "#f7f7f7",
|
|
6
|
+
"3": "#f0f0f0",
|
|
7
|
+
"4": "#e5e5e5",
|
|
8
|
+
"5": "#d4d4d4",
|
|
9
|
+
"6": "#b8b8b8",
|
|
10
|
+
"7": "#999999",
|
|
11
|
+
"8": "#737373",
|
|
12
|
+
"9": "#525252",
|
|
13
|
+
"10": "#404040",
|
|
14
|
+
"11": "#262626",
|
|
15
|
+
"12": "#171717",
|
|
16
|
+
"13": "#000000"
|
|
17
|
+
},
|
|
18
|
+
"red": {
|
|
19
|
+
"0": "#fffafa",
|
|
20
|
+
"1": "#fff1f1",
|
|
21
|
+
"2": "#ffe4e5",
|
|
22
|
+
"3": "#ffcdd0",
|
|
23
|
+
"4": "#ffa4aa",
|
|
24
|
+
"5": "#ff7a83",
|
|
25
|
+
"6": "#f25560",
|
|
26
|
+
"7": "#e33d49",
|
|
27
|
+
"8": "#cf2431",
|
|
28
|
+
"9": "#b91c28",
|
|
29
|
+
"10": "#991722",
|
|
30
|
+
"11": "#7f121b",
|
|
31
|
+
"12": "#650d14",
|
|
32
|
+
"13": "#4c0609"
|
|
33
|
+
},
|
|
34
|
+
"green": {
|
|
35
|
+
"0": "#fbfffc",
|
|
36
|
+
"1": "#f0fdf4",
|
|
37
|
+
"2": "#dcfce7",
|
|
38
|
+
"3": "#bbf7d0",
|
|
39
|
+
"4": "#86efac",
|
|
40
|
+
"5": "#4ade80",
|
|
41
|
+
"6": "#22c55e",
|
|
42
|
+
"7": "#16a34a",
|
|
43
|
+
"8": "#15803d",
|
|
44
|
+
"9": "#166534",
|
|
45
|
+
"10": "#14532d",
|
|
46
|
+
"11": "#0f3f24",
|
|
47
|
+
"12": "#0a2e1a",
|
|
48
|
+
"13": "#051f10"
|
|
49
|
+
},
|
|
50
|
+
"yellow": {
|
|
51
|
+
"0": "#fffdf5",
|
|
52
|
+
"1": "#fffbeb",
|
|
53
|
+
"2": "#fef3c7",
|
|
54
|
+
"3": "#fde68a",
|
|
55
|
+
"4": "#fcd34d",
|
|
56
|
+
"5": "#fbbf24",
|
|
57
|
+
"6": "#f59e0b",
|
|
58
|
+
"7": "#d97706",
|
|
59
|
+
"8": "#b45309",
|
|
60
|
+
"9": "#92400e",
|
|
61
|
+
"10": "#78350f",
|
|
62
|
+
"11": "#5f2a0c",
|
|
63
|
+
"12": "#472007",
|
|
64
|
+
"13": "#301504"
|
|
65
|
+
},
|
|
66
|
+
"blue": {
|
|
67
|
+
"0": "#f8fbff",
|
|
68
|
+
"1": "#eff6ff",
|
|
69
|
+
"2": "#dbeafe",
|
|
70
|
+
"3": "#bfdbfe",
|
|
71
|
+
"4": "#93c5fd",
|
|
72
|
+
"5": "#60a5fa",
|
|
73
|
+
"6": "#3b82f6",
|
|
74
|
+
"7": "#2563eb",
|
|
75
|
+
"8": "#1d4ed8",
|
|
76
|
+
"9": "#1e40af",
|
|
77
|
+
"10": "#1e3a8a",
|
|
78
|
+
"11": "#172f70",
|
|
79
|
+
"12": "#102456",
|
|
80
|
+
"13": "#0a183d"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ThemeTokenIndex, ThemeTokenPath } from '../schema/themeManifest.types';
|
|
2
|
+
export type ThemeTokenCycle = {
|
|
3
|
+
path: ThemeTokenPath;
|
|
4
|
+
chain: ThemeTokenPath[];
|
|
5
|
+
};
|
|
6
|
+
export declare const detectTokenCycles: (tokens: ThemeTokenIndex, fallbackTokens?: ThemeTokenIndex) => ThemeTokenCycle[];
|
|
7
|
+
//# sourceMappingURL=detectTokenCycles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detectTokenCycles.d.ts","sourceRoot":"","sources":["../../src/resolver/detectTokenCycles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACf,MAAM,+BAA+B,CAAC;AAGvC,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,eAAe,EACvB,iBAAgB,eAAuC,sBAgBxD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ResolvedThemeManifest, ThemeManifest } from '../schema/themeManifest.types';
|
|
2
|
+
export type ResolveThemeManifestOptions = {
|
|
3
|
+
fallbackManifest?: ThemeManifest;
|
|
4
|
+
};
|
|
5
|
+
export declare const resolveThemeManifest: (manifest: ThemeManifest, options?: ResolveThemeManifestOptions) => ResolvedThemeManifest;
|
|
6
|
+
//# sourceMappingURL=resolveThemeManifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveThemeManifest.d.ts","sourceRoot":"","sources":["../../src/resolver/resolveThemeManifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,aAAa,EACd,MAAM,+BAA+B,CAAC;AAKvC,MAAM,MAAM,2BAA2B,GAAG;IACxC,gBAAgB,CAAC,EAAE,aAAa,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,UAAU,aAAa,EACvB,UAAS,2BAAgC,KACxC,qBAcF,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ThemeTokenIndex } from '../schema/themeManifest.types';
|
|
2
|
+
export declare class ThemeTokenResolutionError extends Error {
|
|
3
|
+
constructor(message: string);
|
|
4
|
+
}
|
|
5
|
+
export declare const resolveTokenReferences: (tokens: ThemeTokenIndex, fallbackTokens?: ThemeTokenIndex) => ThemeTokenIndex;
|
|
6
|
+
//# sourceMappingURL=resolveTokenReferences.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveTokenReferences.d.ts","sourceRoot":"","sources":["../../src/resolver/resolveTokenReferences.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EAGhB,MAAM,+BAA+B,CAAC;AAGvC,qBAAa,yBAA0B,SAAQ,KAAK;gBACtC,OAAO,EAAE,MAAM;CAI5B;AAED,eAAO,MAAM,sBAAsB,GACjC,QAAQ,eAAe,EACvB,iBAAgB,eAAuC,KACtD,eAYF,CAAC"}
|