@ttoss/fsl-theme 1.1.11

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.
Files changed (40) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +390 -0
  3. package/dist/Types-6tR0_2Ss.d.ts +1452 -0
  4. package/dist/css.d.ts +164 -0
  5. package/dist/dataviz/index.d.ts +62 -0
  6. package/dist/dtcg.d.ts +49 -0
  7. package/dist/esm/chunk-4Q4P3JBB.js +185 -0
  8. package/dist/esm/chunk-5PWPAQMC.js +9 -0
  9. package/dist/esm/chunk-BXKVVQEP.js +29 -0
  10. package/dist/esm/chunk-DU4QDQUC.js +29 -0
  11. package/dist/esm/chunk-FBVUI2PK.js +147 -0
  12. package/dist/esm/chunk-HRNXVRS3.js +54 -0
  13. package/dist/esm/chunk-IJGA42O6.js +141 -0
  14. package/dist/esm/chunk-PQPQNZ73.js +262 -0
  15. package/dist/esm/chunk-SE5Z52RE.js +1898 -0
  16. package/dist/esm/chunk-TPMN75JM.js +29 -0
  17. package/dist/esm/chunk-UMRQ4OTX.js +11 -0
  18. package/dist/esm/chunk-VL6EGE6Z.js +222 -0
  19. package/dist/esm/chunk-WVQSTQD5.js +192 -0
  20. package/dist/esm/css.js +6 -0
  21. package/dist/esm/dataviz/index.js +19 -0
  22. package/dist/esm/dtcg.js +65 -0
  23. package/dist/esm/index.js +10 -0
  24. package/dist/esm/react.js +8 -0
  25. package/dist/esm/runtime-entry.js +4 -0
  26. package/dist/esm/themes/bruttal.js +6 -0
  27. package/dist/esm/themes/corporate.js +6 -0
  28. package/dist/esm/themes/oca.js +6 -0
  29. package/dist/esm/themes/ventures.js +6 -0
  30. package/dist/esm/vars.js +28 -0
  31. package/dist/index.d.ts +86 -0
  32. package/dist/react.d.ts +346 -0
  33. package/dist/runtime-entry.d.ts +95 -0
  34. package/dist/themes/bruttal.d.ts +5 -0
  35. package/dist/themes/corporate.d.ts +5 -0
  36. package/dist/themes/oca.d.ts +5 -0
  37. package/dist/themes/ventures.d.ts +5 -0
  38. package/dist/vars.d.ts +127 -0
  39. package/llms.txt +731 -0
  40. package/package.json +88 -0
package/dist/css.d.ts ADDED
@@ -0,0 +1,164 @@
1
+ import { T as ThemeTokens, a as ThemeBundle } from './Types-6tR0_2Ss.js';
2
+
3
+ /**
4
+ * Flatten a `ThemeTokens` into a `Record<string, string | number>` with
5
+ * every `{ref}` recursively resolved to its final raw value where possible.
6
+ *
7
+ * By default, unresolvable references (missing target or circular dependency)
8
+ * are preserved as-is in the output. Pass `{ strict: true }` to instead throw
9
+ * on any unresolved reference — useful in tests and build steps that must
10
+ * fail loudly on palette drift.
11
+ *
12
+ * This is the universal primitive — every root is derived from this.
13
+ */
14
+ declare const toFlatTokens: (theme: ThemeTokens, options?: {
15
+ strict?: boolean;
16
+ }) => Record<string, string | number>;
17
+ /**
18
+ * A flat map of dot-path token keys to resolved raw values.
19
+ *
20
+ * Most `{ref}` values are recursively resolved. Unresolvable or circular
21
+ * references are preserved as their original `{path}` string.
22
+ */
23
+ type FlatTokenMap = Record<string, string | number>;
24
+
25
+ /**
26
+ * Convert a full token path to a CSS custom property name.
27
+ *
28
+ * `core.colors.brand.500` → `--tt-core-colors-brand-500`
29
+ * `semantic.colors.action.primary.background.default` → `--tt-colors-action-primary-background-default`
30
+ */
31
+ declare const toCssVarName: (tokenPath: string) => string;
32
+ /**
33
+ * Options for `toCssVars()`.
34
+ */
35
+ interface CssVarsOptions {
36
+ /**
37
+ * Theme identifier for scoping. Generates `[data-tt-theme="<themeId>"]` selector.
38
+ * When omitted, uses `:root`.
39
+ */
40
+ themeId?: string;
41
+ /**
42
+ * Mode for scoping. Adds `[data-tt-mode="<mode>"]` to the selector.
43
+ * Only effective when `themeId` is also set.
44
+ */
45
+ mode?: 'light' | 'dark';
46
+ /**
47
+ * Custom CSS selector override. Takes precedence over `themeId`/`mode`.
48
+ */
49
+ selector?: string;
50
+ /**
51
+ * Sets the `color-scheme` CSS property in the generated block.
52
+ * Helps native elements (inputs, scrollbars) respect the active mode.
53
+ */
54
+ colorScheme?: 'light' | 'dark' | 'light dark';
55
+ }
56
+ /**
57
+ * Return type of `toCssVars()`.
58
+ */
59
+ interface CssVarsResult {
60
+ /** Flat map of CSS custom property names → values (original, including CQ units). */
61
+ cssVars: Record<string, string | number>;
62
+ /**
63
+ * Overrides for `hit.*` tokens when `any-pointer: coarse` is active.
64
+ * Apply these inside `@media (any-pointer: coarse) { :root { ... } }`.
65
+ * Emitted automatically by `toCssString()`.
66
+ */
67
+ coarseHitVars: Record<string, string>;
68
+ /**
69
+ * Overrides for semantic motion duration tokens under reduced-motion.
70
+ * All durations are set to `var(--tt-core-motion-duration-none)` (0ms).
71
+ * Apply these inside `@media (prefers-reduced-motion: reduce) { :root { ... } }`.
72
+ * Emitted automatically by `toCssString()`.
73
+ */
74
+ reducedMotionVars: Record<string, string>;
75
+ /**
76
+ * CSS vars whose values contain container query units (cqi, cqb, etc.).
77
+ * Emitted inside `@supports (width: 1cqi)` by `toCssString()`.
78
+ * The base block uses viewport-safe fallbacks for these vars.
79
+ */
80
+ containerQueryVars: Record<string, string | number>;
81
+ /** The CSS selector used for scoping. */
82
+ selector: string;
83
+ /** Generates a complete CSS block string. */
84
+ toCssString: () => string;
85
+ }
86
+ /**
87
+ * Options for `bundleToCssVars()`.
88
+ */
89
+ interface BundleCssVarsOptions {
90
+ /**
91
+ * Theme identifier for scoping. Generates `[data-tt-theme="<themeId>"]` selectors.
92
+ * When omitted, CSS targets `:root` (canonical 1-theme model). The alternate mode
93
+ * selector becomes `:root[data-tt-mode="dark"]`. Use `themeId` only for
94
+ * multi-theme scenarios (Storybook, micro-frontends).
95
+ */
96
+ themeId?: string;
97
+ }
98
+ /**
99
+ * Return type of `bundleToCssVars()`.
100
+ */
101
+ interface BundleCssVarsResult {
102
+ /** CSS result for the base mode (all vars). */
103
+ base: CssVarsResult;
104
+ /** CSS result for the alternate mode (diff-only vars). Undefined if no alternate. */
105
+ alternate?: CssVarsResult;
106
+ /** Generates a complete CSS string with base + alternate + coarse blocks. */
107
+ toCssString: () => string;
108
+ }
109
+ /**
110
+ * Convert a theme (tokens or bundle) into CSS custom properties.
111
+ *
112
+ * **Overload 1 — ThemeTokens**: returns a single `CssVarsResult`.
113
+ * **Overload 2 — ThemeBundle**: returns a `BundleCssVarsResult` with
114
+ * base + alternate blocks and optimized diff output.
115
+ *
116
+ * @example
117
+ * ```ts
118
+ * import { toCssVars } from '@ttoss/fsl-theme/css';
119
+ * import { createTheme } from '@ttoss/fsl-theme';
120
+ *
121
+ * const myBundle = createTheme();
122
+ *
123
+ * // Single theme tokens
124
+ * const css = toCssVars(myBundle.base).toCssString();
125
+ *
126
+ * // Full bundle (base + dark alternate)
127
+ * const bundleCss = toCssVars(myBundle, { themeId: 'default' }).toCssString();
128
+ * ```
129
+ */
130
+ declare function toCssVars(theme: ThemeTokens, options?: CssVarsOptions): CssVarsResult;
131
+ declare function toCssVars(bundle: ThemeBundle, options?: BundleCssVarsOptions): BundleCssVarsResult;
132
+
133
+ /**
134
+ * Returns the full CSS string for a theme bundle — all `--tt-*` custom
135
+ * properties, coarse-pointer overrides, reduced-motion overrides, and
136
+ * container query progressive enhancement — ready to inject into a
137
+ * `<style>` tag or serve as a static `.css` file.
138
+ *
139
+ * Symmetric counterpart to `getThemeScriptContent()` for CSS.
140
+ * Use `<ThemeStyles>` from `@ttoss/fsl-theme/react` for React apps.
141
+ *
142
+ * When `themeId` is omitted (canonical 1-theme model), CSS targets `:root` and
143
+ * the alternate mode selector becomes `:root[data-tt-mode="dark"]`. Pass
144
+ * `themeId` only for multi-theme scenarios (Storybook, micro-frontends).
145
+ *
146
+ * @example
147
+ * ```ts
148
+ * // Canonical: no themeId needed (CSS goes to :root)
149
+ * import { createTheme } from '@ttoss/fsl-theme';
150
+ * import { getThemeStylesContent } from '@ttoss/fsl-theme/css';
151
+ *
152
+ * const myBundle = createTheme();
153
+ *
154
+ * app.get('/theme.css', (_, res) => {
155
+ * res.type('text/css').send(getThemeStylesContent(myBundle));
156
+ * });
157
+ *
158
+ * // Multi-theme: explicit themeId for scoping
159
+ * res.type('text/css').send(getThemeStylesContent(myBundle, 'myTheme'));
160
+ * ```
161
+ */
162
+ declare const getThemeStylesContent: (bundle: ThemeBundle, themeId?: string) => string;
163
+
164
+ export { type BundleCssVarsOptions, type BundleCssVarsResult, type CssVarsOptions, type CssVarsResult, type FlatTokenMap, getThemeStylesContent, toCssVarName, toCssVars, toFlatTokens };
@@ -0,0 +1,62 @@
1
+ import { C as CoreDataviz, b as SemanticDataviz, a as ThemeBundle } from '../Types-6tR0_2Ss.js';
2
+
3
+ /**
4
+ * **Default** dataviz encoding primitives — non-color, value-only.
5
+ *
6
+ * Analytical color comes from `core.colors.*` — see `semanticDataviz` below.
7
+ */
8
+ declare const coreDataviz: CoreDataviz;
9
+ declare const semanticDataviz: SemanticDataviz;
10
+
11
+ /**
12
+ * Access the current theme's **dataviz semantic tokens**.
13
+ *
14
+ * Requires `<ThemeProvider theme={...}>` with a bundle whose theme includes
15
+ * the dataviz extension (`core.dataviz` + `semantic.dataviz`).
16
+ *
17
+ * Throws a descriptive error when the active theme has no dataviz extension,
18
+ * making misconfiguration immediately visible during development.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * import { useDatavizTokens } from '@ttoss/fsl-theme/dataviz';
23
+ *
24
+ * const ChartLegend = ({ categories }: { categories: string[] }) => {
25
+ * const dataviz = useDatavizTokens();
26
+ * // Full type-safety, no optional chaining
27
+ * return categories.map((name, i) => (
28
+ * <span key={name} style={{ color: `var(--tt-dataviz-color-series-${i + 1})` }}>
29
+ * {name}
30
+ * </span>
31
+ * ));
32
+ * };
33
+ * ```
34
+ *
35
+ * @see {@link useTokens} — access full semantic tokens (dataviz will be on `tokens.dataviz?`)
36
+ */
37
+ declare const useDatavizTokens: () => SemanticDataviz;
38
+
39
+ /**
40
+ * Extend a `ThemeBundle` with the dataviz token layer.
41
+ *
42
+ * Applies `core.dataviz` (encoding primitives) and `semantic.dataviz` on top
43
+ * of the bundle's base theme. Semantic color mappings reference `core.colors.*`
44
+ * from the base theme, so brand-aligned dataviz palettes are automatic.
45
+ * The dark-mode alternate (if any) is preserved as-is.
46
+ *
47
+ * @param bundle - Bundle to extend (return value of `createTheme`).
48
+ * @returns A new `ThemeBundle` with dataviz tokens included.
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * import { createTheme } from '@ttoss/fsl-theme';
53
+ * import { withDataviz } from '@ttoss/fsl-theme/dataviz';
54
+ *
55
+ * export const myTheme = withDataviz(createTheme({
56
+ * overrides: { core: { colors: { brand: { 500: '#FF0000' } } } },
57
+ * }));
58
+ * ```
59
+ */
60
+ declare const withDataviz: (bundle: ThemeBundle) => ThemeBundle;
61
+
62
+ export { CoreDataviz, SemanticDataviz, coreDataviz, semanticDataviz, useDatavizTokens, withDataviz };
package/dist/dtcg.d.ts ADDED
@@ -0,0 +1,49 @@
1
+ import { T as ThemeTokens } from './Types-6tR0_2Ss.js';
2
+
3
+ /**
4
+ * A single DTCG token node with `$value` and `$type`.
5
+ *
6
+ * Follows the W3C Design Tokens Community Group format:
7
+ * https://design-tokens.github.io/community-group/format/
8
+ */
9
+ interface DTCGToken {
10
+ $value: string | number;
11
+ $type: string;
12
+ $extensions?: Record<string, unknown>;
13
+ }
14
+ /**
15
+ * A recursive tree where every leaf is a `DTCGToken`.
16
+ */
17
+ type DTCGTokenTree = DTCGToken | {
18
+ [key: string]: DTCGTokenTree;
19
+ };
20
+ /**
21
+ * Root 3 — W3C Design Tokens (DTCG JSON).
22
+ *
23
+ * Convert a `ThemeTokens` into a structured token tree following the
24
+ * W3C Design Tokens Community Group format. Every leaf node has `$value`
25
+ * (fully resolved) and `$type` (inferred from the token path).
26
+ *
27
+ * Semantic hit tokens (`semantic.sizing.hit.*`) include a `$extensions`
28
+ * field declaring their coarse-pointer override value, so non-CSS consumers
29
+ * can apply touch-target ergonomics without reading the CSS emitter source.
30
+ *
31
+ * This is the interchange format for design tools (Tokens Studio, Figma,
32
+ * Style Dictionary, Specify, Supernova) and CI/CD token pipelines.
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * import { toDTCG } from '@ttoss/fsl-theme/dtcg';
37
+ * import { createTheme } from '@ttoss/fsl-theme';
38
+ *
39
+ * const myBundle = createTheme();
40
+ * const tokens = toDTCG(myBundle.base);
41
+ * // tokens.core.colors.brand['500'] === { $value: '#0469E3', $type: 'color' }
42
+ *
43
+ * // Write to file (build script / token pipeline)
44
+ * await fs.writeFile('tokens.json', JSON.stringify(tokens, null, 2));
45
+ * ```
46
+ */
47
+ declare const toDTCG: (theme: ThemeTokens) => DTCGTokenTree;
48
+
49
+ export { type DTCGToken, type DTCGTokenTree, toDTCG };
@@ -0,0 +1,185 @@
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
+
3
+ // src/roots/tokenRegistry.ts
4
+ var TOKEN_PATH_REGISTRY = [
5
+ // -- Core dataviz (longer/more-specific entries first) --------------------
6
+ {
7
+ path: "core.dataviz.color.",
8
+ cssPrefix: "--tt-core-dataviz-color-",
9
+ dtcgType: "color"
10
+ }, {
11
+ path: "core.dataviz.opacity.",
12
+ cssPrefix: "--tt-core-dataviz-opacity-",
13
+ dtcgType: "number"
14
+ }, {
15
+ path: "core.dataviz.",
16
+ cssPrefix: "--tt-core-dataviz-",
17
+ dtcgType: "string"
18
+ },
19
+ // -- Semantic dataviz (longer/more-specific entries first) ----------------
20
+ {
21
+ path: "semantic.dataviz.color.",
22
+ cssPrefix: "--tt-dataviz-",
23
+ dtcgType: "color"
24
+ }, {
25
+ path: "semantic.dataviz.encoding.opacity.",
26
+ cssPrefix: "--tt-dataviz-",
27
+ dtcgType: "number"
28
+ }, {
29
+ path: "semantic.dataviz.geo.",
30
+ cssPrefix: "--tt-dataviz-",
31
+ dtcgType: "color"
32
+ }, {
33
+ path: "semantic.dataviz.encoding.",
34
+ cssPrefix: "--tt-dataviz-",
35
+ dtcgType: "string"
36
+ }, {
37
+ path: "semantic.dataviz.",
38
+ cssPrefix: "--tt-dataviz-",
39
+ dtcgType: "string"
40
+ },
41
+ // -- Core paths -----------------------------------------------------------
42
+ {
43
+ path: "core.colors.",
44
+ cssPrefix: "--tt-core-colors-",
45
+ dtcgType: "color"
46
+ }, {
47
+ path: "core.elevation.emphatic.",
48
+ cssPrefix: "--tt-core-elevation-emphatic-",
49
+ dtcgType: "shadow"
50
+ }, {
51
+ path: "core.elevation.level.",
52
+ cssPrefix: "--tt-core-elevation-",
53
+ dtcgType: "shadow"
54
+ }, {
55
+ path: "core.font.family.",
56
+ cssPrefix: "--tt-core-font-family-",
57
+ dtcgType: "fontFamily"
58
+ }, {
59
+ path: "core.font.weight.",
60
+ cssPrefix: "--tt-core-font-weight-",
61
+ dtcgType: "fontWeight"
62
+ }, {
63
+ path: "core.font.leading.",
64
+ cssPrefix: "--tt-core-font-leading-",
65
+ dtcgType: "number"
66
+ }, {
67
+ path: "core.font.tracking.",
68
+ cssPrefix: "--tt-core-font-tracking-",
69
+ dtcgType: "dimension"
70
+ }, {
71
+ path: "core.font.optical.",
72
+ cssPrefix: "--tt-core-font-optical-",
73
+ dtcgType: "string"
74
+ }, {
75
+ path: "core.font.numeric.",
76
+ cssPrefix: "--tt-core-font-numeric-",
77
+ dtcgType: "string"
78
+ }, {
79
+ path: "core.font.scale.",
80
+ cssPrefix: "--tt-core-font-scale-",
81
+ dtcgType: "dimension"
82
+ }, {
83
+ path: "core.spacing.",
84
+ cssPrefix: "--tt-core-spacing-",
85
+ dtcgType: "dimension"
86
+ },
87
+ // CSS keywords (auto, fit-content, etc.) are not DTCG dimensions — more-specific entry first.
88
+ {
89
+ path: "core.sizing.behavior.",
90
+ cssPrefix: "--tt-core-sizing-behavior-",
91
+ dtcgType: "string"
92
+ }, {
93
+ path: "core.sizing.",
94
+ cssPrefix: "--tt-core-sizing-",
95
+ dtcgType: "dimension"
96
+ }, {
97
+ path: "core.radii.",
98
+ cssPrefix: "--tt-core-radii-",
99
+ dtcgType: "dimension"
100
+ }, {
101
+ path: "core.border.width.",
102
+ cssPrefix: "--tt-core-border-width-",
103
+ dtcgType: "dimension"
104
+ }, {
105
+ path: "core.border.style.",
106
+ cssPrefix: "--tt-core-border-style-",
107
+ dtcgType: "string"
108
+ }, {
109
+ path: "core.opacity.",
110
+ cssPrefix: "--tt-core-opacity-",
111
+ dtcgType: "number"
112
+ }, {
113
+ path: "core.motion.duration.",
114
+ cssPrefix: "--tt-core-motion-duration-",
115
+ dtcgType: "duration"
116
+ }, {
117
+ path: "core.motion.easing.",
118
+ cssPrefix: "--tt-core-motion-easing-",
119
+ dtcgType: "string"
120
+ }, {
121
+ path: "core.zIndex.level.",
122
+ cssPrefix: "--tt-core-z-index-",
123
+ dtcgType: "number"
124
+ }, {
125
+ path: "core.breakpoints.",
126
+ cssPrefix: "--tt-core-breakpoints-",
127
+ dtcgType: "dimension"
128
+ },
129
+ // -- Semantic paths -------------------------------------------------------
130
+ {
131
+ path: "semantic.colors.",
132
+ cssPrefix: "--tt-colors-",
133
+ dtcgType: "color"
134
+ }, {
135
+ path: "semantic.elevation.",
136
+ cssPrefix: "--tt-elevation-",
137
+ dtcgType: "shadow"
138
+ }, {
139
+ path: "semantic.text.",
140
+ cssPrefix: "--tt-text-",
141
+ dtcgType: "string"
142
+ }, {
143
+ path: "semantic.spacing.",
144
+ cssPrefix: "--tt-spacing-",
145
+ dtcgType: "dimension"
146
+ }, {
147
+ path: "semantic.sizing.",
148
+ cssPrefix: "--tt-sizing-",
149
+ dtcgType: "dimension"
150
+ }, {
151
+ path: "semantic.radii.",
152
+ cssPrefix: "--tt-radii-",
153
+ dtcgType: "dimension"
154
+ }, {
155
+ path: "semantic.focus.",
156
+ cssPrefix: "--tt-focus-",
157
+ dtcgType: "string"
158
+ }, {
159
+ path: "semantic.overlay.",
160
+ cssPrefix: "--tt-overlay-",
161
+ dtcgType: "color"
162
+ }, {
163
+ path: "semantic.border.",
164
+ cssPrefix: "--tt-border-",
165
+ dtcgType: "string"
166
+ }, {
167
+ path: "semantic.opacity.",
168
+ cssPrefix: "--tt-opacity-",
169
+ dtcgType: "number"
170
+ }, {
171
+ path: "semantic.motion.",
172
+ cssPrefix: "--tt-motion-",
173
+ dtcgType: "string"
174
+ }, {
175
+ path: "semantic.zIndex.layer.",
176
+ cssPrefix: "--tt-z-index-",
177
+ dtcgType: "number"
178
+ }];
179
+ var CSS_PATH_PREFIXES = TOKEN_PATH_REGISTRY.map(e => {
180
+ return [e.path, e.cssPrefix];
181
+ });
182
+ var DTCG_TYPE_PREFIXES = TOKEN_PATH_REGISTRY.map(e => {
183
+ return [e.path, e.dtcgType];
184
+ });
185
+ export { CSS_PATH_PREFIXES, DTCG_TYPE_PREFIXES };
@@ -0,0 +1,9 @@
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
+ import { baseTheme, createTheme, darkAlternate } from "./chunk-SE5Z52RE.js";
3
+
4
+ // src/baseBundle.ts
5
+ var baseBundle = createTheme({
6
+ base: baseTheme,
7
+ alternate: darkAlternate
8
+ });
9
+ export { baseBundle };
@@ -0,0 +1,29 @@
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
+ import { withDataviz } from "./chunk-FBVUI2PK.js";
3
+ import { createTheme } from "./chunk-SE5Z52RE.js";
4
+
5
+ // src/themes/ventures.ts
6
+ var bundle = createTheme({
7
+ overrides: {
8
+ core: {
9
+ colors: {
10
+ brand: {
11
+ 50: "#EEF1F8",
12
+ 100: "#CDD5EA",
13
+ 200: "#9BAED5",
14
+ 300: "#6887BF",
15
+ 400: "#3A61A8",
16
+ 500: "#1A3D8F",
17
+ 600: "#142E6E",
18
+ 700: "#0E2050",
19
+ 800: "#081333",
20
+ 900: "#03091A"
21
+ }
22
+ }
23
+ },
24
+ semantic: {}
25
+ },
26
+ alternate: void 0
27
+ });
28
+ var ventures = withDataviz(bundle);
29
+ export { ventures };
@@ -0,0 +1,29 @@
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
+ import { withDataviz } from "./chunk-FBVUI2PK.js";
3
+ import { createTheme } from "./chunk-SE5Z52RE.js";
4
+
5
+ // src/themes/oca.ts
6
+ var bundle = createTheme({
7
+ overrides: {
8
+ core: {
9
+ colors: {
10
+ brand: {
11
+ 50: "#F5FBEA",
12
+ 100: "#E4F6C2",
13
+ 200: "#CAED8A",
14
+ 300: "#ABDF4E",
15
+ 400: "#8ECE1F",
16
+ 500: "#6DB800",
17
+ 600: "#549100",
18
+ 700: "#3C6A00",
19
+ 800: "#254300",
20
+ 900: "#111F00"
21
+ }
22
+ }
23
+ },
24
+ semantic: {}
25
+ },
26
+ alternate: void 0
27
+ });
28
+ var oca = withDataviz(bundle);
29
+ export { oca };
@@ -0,0 +1,147 @@
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
+ import { buildTheme } from "./chunk-SE5Z52RE.js";
3
+ import { __name } from "./chunk-WVQSTQD5.js";
4
+
5
+ // src/dataviz/baseTheme.ts
6
+ var coreDataviz = {
7
+ shape: {
8
+ 1: "circle",
9
+ 2: "square",
10
+ 3: "triangle",
11
+ 4: "diamond",
12
+ 5: "cross",
13
+ 6: "star",
14
+ 7: "wye",
15
+ 8: "pentagon"
16
+ },
17
+ pattern: {
18
+ 1: "solid",
19
+ 2: "diagonal-stripes",
20
+ 3: "horizontal-stripes",
21
+ 4: "vertical-stripes",
22
+ 5: "dots",
23
+ 6: "cross-hatch"
24
+ },
25
+ stroke: {
26
+ solid: "none",
27
+ dashed: "6 3",
28
+ dotted: "2 2"
29
+ },
30
+ opacity: {
31
+ context: 0.15,
32
+ muted: 0.35,
33
+ uncertainty: 0.25
34
+ }
35
+ };
36
+ var semanticDataviz = {
37
+ color: {
38
+ series: {
39
+ 1: "{core.colors.brand.500}",
40
+ 2: "{core.colors.orange.500}",
41
+ 3: "{core.colors.red.500}",
42
+ 4: "{core.colors.teal.500}",
43
+ 5: "{core.colors.green.500}",
44
+ 6: "{core.colors.yellow.500}",
45
+ 7: "{core.colors.purple.500}",
46
+ 8: "{core.colors.pink.500}"
47
+ },
48
+ scale: {
49
+ sequential: {
50
+ 1: "{core.colors.brand.50}",
51
+ 2: "{core.colors.brand.100}",
52
+ 3: "{core.colors.brand.200}",
53
+ 4: "{core.colors.brand.300}",
54
+ 5: "{core.colors.brand.500}",
55
+ 6: "{core.colors.brand.700}",
56
+ 7: "{core.colors.brand.900}"
57
+ },
58
+ diverging: {
59
+ neg3: "{core.colors.red.700}",
60
+ neg2: "{core.colors.red.500}",
61
+ neg1: "{core.colors.orange.300}",
62
+ neutral: "{core.colors.neutral.50}",
63
+ pos1: "{core.colors.brand.200}",
64
+ pos2: "{core.colors.brand.500}",
65
+ pos3: "{core.colors.brand.700}"
66
+ }
67
+ },
68
+ reference: {
69
+ baseline: "{core.colors.neutral.500}",
70
+ target: "{core.colors.orange.700}"
71
+ },
72
+ state: {
73
+ highlight: "{core.colors.yellow.500}",
74
+ muted: "{core.colors.neutral.300}",
75
+ selected: "{core.colors.brand.500}"
76
+ },
77
+ status: {
78
+ missing: "{core.colors.neutral.200}",
79
+ suppressed: "{core.colors.neutral.700}",
80
+ na: "{core.colors.neutral.500}"
81
+ }
82
+ },
83
+ encoding: {
84
+ shape: {
85
+ series: {
86
+ 1: "{core.dataviz.shape.1}",
87
+ 2: "{core.dataviz.shape.2}",
88
+ 3: "{core.dataviz.shape.3}",
89
+ 4: "{core.dataviz.shape.4}",
90
+ 5: "{core.dataviz.shape.5}",
91
+ 6: "{core.dataviz.shape.6}",
92
+ 7: "{core.dataviz.shape.7}",
93
+ 8: "{core.dataviz.shape.8}"
94
+ }
95
+ },
96
+ pattern: {
97
+ series: {
98
+ 1: "{core.dataviz.pattern.1}",
99
+ 2: "{core.dataviz.pattern.2}",
100
+ 3: "{core.dataviz.pattern.3}",
101
+ 4: "{core.dataviz.pattern.4}",
102
+ 5: "{core.dataviz.pattern.5}",
103
+ 6: "{core.dataviz.pattern.6}"
104
+ }
105
+ },
106
+ stroke: {
107
+ reference: "{core.dataviz.stroke.dashed}",
108
+ forecast: "{core.dataviz.stroke.dashed}",
109
+ uncertainty: "{core.dataviz.stroke.dotted}"
110
+ },
111
+ opacity: {
112
+ context: "{core.dataviz.opacity.context}",
113
+ muted: "{core.dataviz.opacity.muted}",
114
+ uncertainty: "{core.dataviz.opacity.uncertainty}"
115
+ }
116
+ },
117
+ geo: {
118
+ context: {
119
+ muted: "{core.colors.neutral.50}",
120
+ boundary: "{core.colors.neutral.300}",
121
+ label: "{core.colors.neutral.500}"
122
+ },
123
+ state: {
124
+ selection: "{core.colors.brand.500}",
125
+ focus: "{core.colors.brand.700}"
126
+ }
127
+ }
128
+ };
129
+
130
+ // src/dataviz/withDataviz.ts
131
+ var withDataviz = /* @__PURE__ */__name(bundle => {
132
+ return {
133
+ ...bundle,
134
+ base: buildTheme({
135
+ base: bundle.base,
136
+ overrides: {
137
+ core: {
138
+ dataviz: coreDataviz
139
+ },
140
+ semantic: {
141
+ dataviz: semanticDataviz
142
+ }
143
+ }
144
+ })
145
+ };
146
+ }, "withDataviz");
147
+ export { coreDataviz, semanticDataviz, withDataviz };