@oxyhq/bloom 0.38.0 → 0.39.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/lib/commonjs/design-tokens/theme-css.js +3 -0
- package/lib/commonjs/design-tokens/theme-css.js.map +1 -1
- package/lib/commonjs/design-tokens/theme.css +3 -0
- package/lib/commonjs/prompt-input/Attachments.js +2 -2
- package/lib/commonjs/prompt-input/Attachments.js.map +1 -1
- package/lib/commonjs/theme/adaptive-colors.js +6 -0
- package/lib/commonjs/theme/adaptive-colors.js.map +1 -1
- package/lib/commonjs/theme/build-theme.js +5 -1
- package/lib/commonjs/theme/build-theme.js.map +1 -1
- package/lib/commonjs/theme/color-scope/seed-scope.js +99 -0
- package/lib/commonjs/theme/color-scope/seed-scope.js.map +1 -0
- package/lib/commonjs/theme/preset-vars.js +4 -0
- package/lib/commonjs/theme/preset-vars.js.map +1 -1
- package/lib/commonjs/theme/token-registry.js +1 -1
- package/lib/commonjs/theme/token-registry.js.map +1 -1
- package/lib/module/design-tokens/theme-css.js +3 -0
- package/lib/module/design-tokens/theme-css.js.map +1 -1
- package/lib/module/design-tokens/theme.css +3 -0
- package/lib/module/prompt-input/Attachments.js +2 -2
- package/lib/module/prompt-input/Attachments.js.map +1 -1
- package/lib/module/theme/adaptive-colors.js +6 -0
- package/lib/module/theme/adaptive-colors.js.map +1 -1
- package/lib/module/theme/build-theme.js +5 -1
- package/lib/module/theme/build-theme.js.map +1 -1
- package/lib/module/theme/color-scope/seed-scope.js +95 -0
- package/lib/module/theme/color-scope/seed-scope.js.map +1 -0
- package/lib/module/theme/preset-vars.js +4 -0
- package/lib/module/theme/preset-vars.js.map +1 -1
- package/lib/module/theme/token-registry.js +1 -1
- package/lib/module/theme/token-registry.js.map +1 -1
- package/lib/typescript/commonjs/design-tokens/theme-css.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/adaptive-colors.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/build-theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/color-scope/seed-scope.d.ts +43 -0
- package/lib/typescript/commonjs/theme/color-scope/seed-scope.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/preset-vars.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/token-registry.d.ts +1 -1
- package/lib/typescript/commonjs/theme/token-registry.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/types.d.ts +5 -1
- package/lib/typescript/commonjs/theme/types.d.ts.map +1 -1
- package/lib/typescript/module/design-tokens/theme-css.d.ts.map +1 -1
- package/lib/typescript/module/theme/adaptive-colors.d.ts.map +1 -1
- package/lib/typescript/module/theme/build-theme.d.ts.map +1 -1
- package/lib/typescript/module/theme/color-scope/seed-scope.d.ts +43 -0
- package/lib/typescript/module/theme/color-scope/seed-scope.d.ts.map +1 -0
- package/lib/typescript/module/theme/preset-vars.d.ts.map +1 -1
- package/lib/typescript/module/theme/token-registry.d.ts +1 -1
- package/lib/typescript/module/theme/token-registry.d.ts.map +1 -1
- package/lib/typescript/module/theme/types.d.ts +5 -1
- package/lib/typescript/module/theme/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/design-tokens/theme-css.ts +3 -0
- package/src/design-tokens/theme.css +3 -0
- package/src/prompt-input/Attachments.tsx +2 -2
- package/src/theme/__tests__/__snapshots__/visual-gallery.test.tsx.snap +78 -0
- package/src/theme/__tests__/seed-scope-parity.test.ts +27 -0
- package/src/theme/adaptive-colors.ts +6 -0
- package/src/theme/build-theme.ts +5 -1
- package/src/theme/color-scope/seed-scope.ts +105 -0
- package/src/theme/preset-vars.ts +4 -0
- package/src/theme/token-registry.ts +2 -0
- package/src/theme/types.ts +5 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { generateRoleColors } from "../color-engine/index.js";
|
|
4
|
+
import { CANONICAL_TOKENS } from "../token-registry.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The canonical role → token assignment, sourced from an arbitrary seed's role
|
|
8
|
+
* set instead of a named preset.
|
|
9
|
+
*
|
|
10
|
+
* This MUST stay byte-for-byte identical to the mapping in `getPresetVars`
|
|
11
|
+
* (`preset-vars.ts`): a named preset is just a fixed seed, so scoping a subtree
|
|
12
|
+
* to a preset via `buildScopeVars` and scoping it to that preset's seed hex via
|
|
13
|
+
* `buildSeedScopeVars` are required to produce the same tokens. The parity test
|
|
14
|
+
* (`__tests__/seed-scope-parity.test.ts`) fails CI if the two ever drift.
|
|
15
|
+
*
|
|
16
|
+
* Values are full `rgb(r g b)` strings straight from the engine — no HSL-triple
|
|
17
|
+
* intermediate, so they flow through the scope pipeline unchanged (same as the
|
|
18
|
+
* preset path after `getResolvedTokens`).
|
|
19
|
+
*/
|
|
20
|
+
export function roleColorsToPresetTokens(r) {
|
|
21
|
+
return {
|
|
22
|
+
// --- base shadcn palette ---
|
|
23
|
+
'--background': r.background,
|
|
24
|
+
'--foreground': r.onBackground,
|
|
25
|
+
'--surface': r.surfaceContainerLow,
|
|
26
|
+
'--surface-foreground': r.onSurface,
|
|
27
|
+
'--popover': r.surfaceContainer,
|
|
28
|
+
'--popover-foreground': r.onSurface,
|
|
29
|
+
'--primary': r.primary,
|
|
30
|
+
'--primary-foreground': r.onPrimary,
|
|
31
|
+
'--secondary': r.secondary,
|
|
32
|
+
'--secondary-foreground': r.onSecondary,
|
|
33
|
+
'--tertiary': r.tertiary,
|
|
34
|
+
'--tertiary-foreground': r.onTertiary,
|
|
35
|
+
'--muted': r.surfaceContainerHigh,
|
|
36
|
+
'--muted-foreground': r.onSurfaceVariant,
|
|
37
|
+
'--accent': r.secondaryContainer,
|
|
38
|
+
'--accent-foreground': r.onSecondaryContainer,
|
|
39
|
+
'--destructive': r.error,
|
|
40
|
+
'--border': r.outlineVariant,
|
|
41
|
+
'--input': r.outlineVariant,
|
|
42
|
+
'--ring': r.primary,
|
|
43
|
+
'--sidebar': r.surfaceContainerLow,
|
|
44
|
+
// --- extended tokens ---
|
|
45
|
+
'--card': r.surfaceContainerLowest,
|
|
46
|
+
'--card-foreground': r.onSurface,
|
|
47
|
+
'--chart-1': r.primary,
|
|
48
|
+
'--chart-2': r.secondary,
|
|
49
|
+
'--chart-3': r.tertiary,
|
|
50
|
+
'--chart-4': r.primaryContainer,
|
|
51
|
+
'--chart-5': r.tertiaryContainer,
|
|
52
|
+
'--content-area': r.background,
|
|
53
|
+
'--sidebar-foreground': r.onSurface,
|
|
54
|
+
'--sidebar-primary': r.primary,
|
|
55
|
+
'--sidebar-primary-foreground': r.onPrimary,
|
|
56
|
+
'--sidebar-accent': r.secondaryContainer,
|
|
57
|
+
'--sidebar-accent-foreground': r.onSecondaryContainer,
|
|
58
|
+
'--sidebar-border': r.outlineVariant,
|
|
59
|
+
'--sidebar-ring': r.primary
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** Options for deriving scope vars directly from a seed colour. */
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Build the CSS custom-property map for an ARBITRARY seed colour — the dynamic
|
|
67
|
+
* (non-preset) counterpart of `buildScopeVars`. Feeds the seed through the
|
|
68
|
+
* colour engine's `generateRoleColors` and assigns the roles to Bloom's
|
|
69
|
+
* canonical token names, then adds the Tailwind v4 `--color-x` aliases (required
|
|
70
|
+
* on web so scoped utilities resolve against the subtree instead of the document
|
|
71
|
+
* root).
|
|
72
|
+
*
|
|
73
|
+
* Scope the returned record onto an element (web: inline `style`; native:
|
|
74
|
+
* NativeWind `VariableContextProvider`) to tint just that subtree — e.g. the
|
|
75
|
+
* ambient region behind album/artist artwork — without re-theming the whole app.
|
|
76
|
+
*/
|
|
77
|
+
export function buildSeedScopeVars(options) {
|
|
78
|
+
const roles = generateRoleColors({
|
|
79
|
+
seed: options.seed,
|
|
80
|
+
isDark: options.mode === 'dark',
|
|
81
|
+
contrastLevel: options.contrastLevel ?? 0
|
|
82
|
+
});
|
|
83
|
+
const tokens = roleColorsToPresetTokens(roles);
|
|
84
|
+
const vars = {
|
|
85
|
+
...tokens
|
|
86
|
+
};
|
|
87
|
+
for (const token of CANONICAL_TOKENS) {
|
|
88
|
+
const value = tokens[`--${token}`];
|
|
89
|
+
if (value !== undefined) {
|
|
90
|
+
vars[`--color-${token}`] = value;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return vars;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=seed-scope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["generateRoleColors","CANONICAL_TOKENS","roleColorsToPresetTokens","r","background","onBackground","surfaceContainerLow","onSurface","surfaceContainer","primary","onPrimary","secondary","onSecondary","tertiary","onTertiary","surfaceContainerHigh","onSurfaceVariant","secondaryContainer","onSecondaryContainer","error","outlineVariant","surfaceContainerLowest","primaryContainer","tertiaryContainer","buildSeedScopeVars","options","roles","seed","isDark","mode","contrastLevel","tokens","vars","token","value","undefined"],"sourceRoot":"../../../../src","sources":["theme/color-scope/seed-scope.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAA6C,0BAAiB;AACzF,SAASC,gBAAgB,QAAQ,sBAAmB;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,wBAAwBA,CAACC,CAAa,EAA0B;EAC9E,OAAO;IACL;IACA,cAAc,EAAEA,CAAC,CAACC,UAAU;IAC5B,cAAc,EAAED,CAAC,CAACE,YAAY;IAC9B,WAAW,EAAEF,CAAC,CAACG,mBAAmB;IAClC,sBAAsB,EAAEH,CAAC,CAACI,SAAS;IACnC,WAAW,EAAEJ,CAAC,CAACK,gBAAgB;IAC/B,sBAAsB,EAAEL,CAAC,CAACI,SAAS;IACnC,WAAW,EAAEJ,CAAC,CAACM,OAAO;IACtB,sBAAsB,EAAEN,CAAC,CAACO,SAAS;IACnC,aAAa,EAAEP,CAAC,CAACQ,SAAS;IAC1B,wBAAwB,EAAER,CAAC,CA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C;IAC/B2B,IAAI,EAAEF,OAAO,CAACE,IAAI;IAClBC,MAAM,EAAEH,OAAO,CAACI,IAAI,KAAK,MAAM;IAC/BC,aAAa,EAAEL,OAAO,CAACK,aAAa,IAAI;EAC1C,CAAC,CAAC;EACF,MAAMC,MAAM,GAAG7B,wBAAwB,CAACwB,KAAK,CAAC;EAC9C,MAAMM,IAA4B,GAAG;IAAE,GAAGD;EAAO,CAAC;EAElD,KAAK,MAAME,KAAK,IAAIhC,gBAAgB,EAAE;IACpC,MAAMiC,KAAK,GAAGH,MAAM,CAAC,KAAKE,KAAK,EAAE,CAAC;IAClC,IAAIC,KAAK,KAAKC,SAAS,EAAE;MACvBH,IAAI,CAAC,WAAWC,KAAK,EAAE,CAAC,GAAGC,KAAK;IAClC;EACF;EAEA,OAAOF,IAAI;AACb","ignoreList":[]}
|
|
@@ -46,6 +46,10 @@ export function getPresetVars(colorName, mode) {
|
|
|
46
46
|
// role), not a mirror of `primary`.
|
|
47
47
|
'--secondary': r.secondary,
|
|
48
48
|
'--secondary-foreground': r.onSecondary,
|
|
49
|
+
// The third accent of the M3 trio, exposed so `bg-tertiary` / `colors.tertiary`
|
|
50
|
+
// work alongside primary + secondary.
|
|
51
|
+
'--tertiary': r.tertiary,
|
|
52
|
+
'--tertiary-foreground': r.onTertiary,
|
|
49
53
|
'--muted': r.surfaceContainerHigh,
|
|
50
54
|
'--muted-foreground': r.onSurfaceVariant,
|
|
51
55
|
'--accent': r.secondaryContainer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["APP_COLOR_PRESETS","generateRoleColors","getResolvedTokens","getPresetVars","colorName","mode","preset","r","seed","hex","variant","isDark","background","onBackground","surfaceContainerLow","onSurface","surfaceContainer","primary","onPrimary","secondary","onSecondary","surfaceContainerHigh","onSurfaceVariant","secondaryContainer","onSecondaryContainer","error","outlineVariant","surfaceContainerLowest","
|
|
1
|
+
{"version":3,"names":["APP_COLOR_PRESETS","generateRoleColors","getResolvedTokens","getPresetVars","colorName","mode","preset","r","seed","hex","variant","isDark","background","onBackground","surfaceContainerLow","onSurface","surfaceContainer","primary","onPrimary","secondary","onSecondary","tertiary","onTertiary","surfaceContainerHigh","onSurfaceVariant","secondaryContainer","onSecondaryContainer","error","outlineVariant","surfaceContainerLowest","primaryContainer","tertiaryContainer","applyPresetVarsToDocument","document","vars","root","documentElement","style","key","value","Object","entries","setProperty"],"sourceRoot":"../../../src","sources":["theme/preset-vars.ts"],"mappings":";;AAAA,SAASA,iBAAiB,QAA8C,oBAAiB;AACzF,SAASC,kBAAkB,QAAyB,yBAAgB;AACpE;AACA;AACA;AACA;AACA,SAASC,iBAAiB,QAAQ,qBAAkB;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAC3BC,SAAuB,EACvBC,IAAsB,EACR;EACd,MAAMC,MAAM,GAAGN,iBAAiB,CAACI,SAAS,CAAC;EAC3C,MAAMG,CAAa,GAAGN,kBAAkB,CAAC;IACvCO,IAAI,EAAEF,MAAM,CAACG,GAAG;IAChBC,OAAO,EAAEJ,MAAM,CAACI,OAAO;IACvBC,MAAM,EAAEN,IAAI,KAAK;EACnB,CAAC,CAAC;EAEF,OAAO;IACL;IACA,cAAc,EAAEE,CAAC,CAACK,UAAU;IAC5B,cAAc,EAAEL,CAAC,CAACM,YAAY;IAC9B,WAAW,EAAEN,CAAC,CAACO,mBAAmB;IAClC,sBAAsB,EAAEP,CAAC,CAACQ,SAAS;IACnC,WAAW,EAAER,CAAC,CAACS,gBAAgB;IAC/B,sBAAsB,EAAET,CAAC,CAACQ,SAAS;IACnC,WAAW,EAAER,CAAC,CAACU,OAAO;IACtB,sBAAsB,EAAEV,CAAC,CAACW,SAAS;IACnC;IACA;IACA,aAAa,EAAEX,CAAC,CAACY,SAAS;IAC1B,wBAAwB,EAAEZ,CAAC,CAACa,WAAW;IACvC;IACA;IACA,YAAY,E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B,QAAQ,KAAK,WAAW,EAAE;EAErC,MAAMC,IAAI,GAAGhC,iBAAiB,CAACE,SAAS,EAAEC,IAAI,CAAC;EAC/C,MAAM8B,IAAI,GAAGF,QAAQ,CAACG,eAAe,CAACC,KAAK;EAC3C,KAAK,MAAM,CAACC,GAAG,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACP,IAAI,CAAC,EAAE;IAC/CC,IAAI,CAACO,WAAW,CAACJ,GAAG,EAAEC,KAAK,CAAC;EAC9B;AACF","ignoreList":[]}
|
|
@@ -16,7 +16,7 @@ import { getPresetVars } from "./preset-vars.js";
|
|
|
16
16
|
* Order mirrors `getPresetVars`'s insertion order: base tokens first (in the
|
|
17
17
|
* order they appear in the preset data), then the synthesized extended tokens.
|
|
18
18
|
*/
|
|
19
|
-
export const CANONICAL_TOKENS = ['background', 'foreground', 'surface', 'surface-foreground', 'popover', 'popover-foreground', 'primary', 'primary-foreground', 'secondary', 'secondary-foreground', 'muted', 'muted-foreground', 'accent', 'accent-foreground', 'destructive', 'border', 'input', 'ring', 'sidebar', 'card', 'card-foreground', 'chart-1', 'chart-2', 'chart-3', 'chart-4', 'chart-5', 'content-area', 'sidebar-foreground', 'sidebar-primary', 'sidebar-primary-foreground', 'sidebar-accent', 'sidebar-accent-foreground', 'sidebar-border', 'sidebar-ring'];
|
|
19
|
+
export const CANONICAL_TOKENS = ['background', 'foreground', 'surface', 'surface-foreground', 'popover', 'popover-foreground', 'primary', 'primary-foreground', 'secondary', 'secondary-foreground', 'tertiary', 'tertiary-foreground', 'muted', 'muted-foreground', 'accent', 'accent-foreground', 'destructive', 'border', 'input', 'ring', 'sidebar', 'card', 'card-foreground', 'chart-1', 'chart-2', 'chart-3', 'chart-4', 'chart-5', 'content-area', 'sidebar-foreground', 'sidebar-primary', 'sidebar-primary-foreground', 'sidebar-accent', 'sidebar-accent-foreground', 'sidebar-border', 'sidebar-ring'];
|
|
20
20
|
|
|
21
21
|
/** A canonical token name (no leading `--`). */
|
|
22
22
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["APP_COLOR_NAMES","getPresetVars","CANONICAL_TOKENS","RAW_HSL_TRIPLE","hslToSrgb","triple","colorPart","alphaPart","split","map","part","trim","channels","filter","Boolean","hue","parseFloat","replace","sat","light","h","Number","isFinite","s","l","chroma","Math","abs","huePrime","second","r","g","b","match","red","round","green","blue","undefined","alpha","endsWith","safeAlpha","getResolvedTokens","preset","mode","raw","resolved","key","value","Object","entries","test"],"sourceRoot":"../../../src","sources":["theme/token-registry.ts"],"mappings":";;AAAA,SAASA,eAAe,QAA2B,oBAAiB;AACpE,SAASC,aAAa,QAAQ,kBAAe;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAG,CAC9B,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,SAAS,EACT,oBAAoB,EACpB,SAAS,EACT,oBAAoB,EACpB,WAAW,EACX,sBAAsB,EACtB,OAAO,EACP,kBAAkB,EAClB,QAAQ,EACR,mBAAmB,EACnB,aAAa,EACb,QAAQ,EACR,OAAO,EACP,MAAM,EACN,SAAS,EACT,MAAM,EACN,iBAAiB,EACjB,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,4BAA4B,EAC5B,gBAAgB,EAChB,2BAA2B,EAC3B,gBAAgB,EAChB,cAAc,CACN;;AAEV;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAG,uBAAuB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,SAASA,CAACC,MAAc,EAAU;EAChD,MAAM,CAACC,SAAS,EAAEC,SAAS,CAAC,GAAGF,MAAM,CAACG,KAAK,CA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AAK,CAAC,CAACH,CAAC,GAAGC,KAAK,IAAI,GAAG,CAAC;EAE1C,IAAI1B,SAAS,KAAK+B,SAAS,IAAI/B,SAAS,KAAK,EAAE,EAAE;IAC/C,MAAMgC,KAAK,GAAGhC,SAAS,CAACiC,QAAQ,CAAC,GAAG,CAAC,GACjCxB,UAAU,CAACT,SAAS,CAAC,GAAG,GAAG,GAC3BS,UAAU,CAACT,SAAS,CAAC;IACzB,MAAMkC,SAAS,GAAGpB,MAAM,CAACC,QAAQ,CAACiB,KAAK,CAAC,GAAGA,KAAK,GAAG,CAAC;IACpD,OAAO,OAAOL,GAAG,IAAIE,KAAK,IAAIC,IAAI,MAAMI,SAAS,GAAG;EACtD;EAEA,OAAO,OAAOP,GAAG,IAAIE,KAAK,IAAIC,IAAI,GAAG;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASK,iBAAiBA,CAC/BC,MAAoB,EACpBC,IAAsB,EACE;EACxB,MAAMC,GAAG,GAAG5C,aAAa,CAAC0C,MAAM,EAAEC,IAAI,CAAC;EACvC,MAAME,QAAgC,GAAG,CAAC,CAAC;EAC3C,KAAK,MAAM,CAACC,GAAG,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACL,GAAG,CAAC,EAAE;IAC9CC,QAAQ,CAACC,GAAG,CAAC,GAAG5C,cAAc,CAACgD,IAAI,CAACH,KAAK,CAAC,GAAG5C,SAAS,CAAC4C,KAAK,CAAC,GAAGA,KAAK;EACvE;EACA,OAAOF,QAAQ;AACjB;AAEA,SAAS9C,eAAe","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["APP_COLOR_NAMES","getPresetVars","CANONICAL_TOKENS","RAW_HSL_TRIPLE","hslToSrgb","triple","colorPart","alphaPart","split","map","part","trim","channels","filter","Boolean","hue","parseFloat","replace","sat","light","h","Number","isFinite","s","l","chroma","Math","abs","huePrime","second","r","g","b","match","red","round","green","blue","undefined","alpha","endsWith","safeAlpha","getResolvedTokens","preset","mode","raw","resolved","key","value","Object","entries","test"],"sourceRoot":"../../../src","sources":["theme/token-registry.ts"],"mappings":";;AAAA,SAASA,eAAe,QAA2B,oBAAiB;AACpE,SAASC,aAAa,QAAQ,kBAAe;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAG,CAC9B,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,SAAS,EACT,oBAAoB,EACpB,SAAS,EACT,oBAAoB,EACpB,WAAW,EACX,sBAAsB,EACtB,UAAU,EACV,qBAAqB,EACrB,OAAO,EACP,kBAAkB,EAClB,QAAQ,EACR,mBAAmB,EACnB,aAAa,EACb,QAAQ,EACR,OAAO,EACP,MAAM,EACN,SAAS,EACT,MAAM,EACN,iBAAiB,EACjB,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,4BAA4B,EAC5B,gBAAgB,EAChB,2BAA2B,EAC3B,gBAAgB,EAChB,cAAc,CACN;;AAEV;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAG,uBAAuB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,SAASA,CAACC,MAAc,EAAU;EAChD,MAAM,CAACC,SAAS,EAAEC,SAAS,CAAC,GAAGF,MAAM,CAACG,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAAEC,IAAI,IAAKA,IAAI,CAACC,IAAI,CAAC,CAAC,CAAC;EAC3E,MAAMC,QAAQ,GAAG,CAACN,SAAS,IAAI,EAAE,EAAEE,KAAK,CAAC,KAAK,CAAC,CAACK,MAAM,CAACC,OAAO,CAAC;EAE/D,MAAMC,GAAG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,CAAC,GAAG,GAAG,GAC3BS,UAAU,CAACT,SAAS,CAAC;IACzB,MAAMkC,SAAS,GAAGpB,MAAM,CAACC,QAAQ,CAACiB,KAAK,CAAC,GAAGA,KAAK,GAAG,CAAC;IACpD,OAAO,OAAOL,GAAG,IAAIE,KAAK,IAAIC,IAAI,MAAMI,SAAS,GAAG;EACtD;EAEA,OAAO,OAAOP,GAAG,IAAIE,KAAK,IAAIC,IAAI,GAAG;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASK,iBAAiBA,CAC/BC,MAAoB,EACpBC,IAAsB,EACE;EACxB,MAAMC,GAAG,GAAG5C,aAAa,CAAC0C,MAAM,EAAEC,IAAI,CAAC;EACvC,MAAME,QAAgC,GAAG,CAAC,CAAC;EAC3C,KAAK,MAAM,CAACC,GAAG,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACL,GAAG,CAAC,EAAE;IAC9CC,QAAQ,CAACC,GAAG,CAAC,GAAG5C,cAAc,CAACgD,IAAI,CAACH,KAAK,CAAC,GAAG5C,SAAS,CAAC4C,KAAK,CAAC,GAAGA,KAAK;EACvE;EACA,OAAOF,QAAQ;AACjB;AAEA,SAAS9C,eAAe","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-css.d.ts","sourceRoot":"","sources":["../../../../src/design-tokens/theme-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAcH;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"theme-css.d.ts","sourceRoot":"","sources":["../../../../src/design-tokens/theme-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAcH;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAiEtC;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,IAAI,MAAM,CAExC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adaptive-colors.d.ts","sourceRoot":"","sources":["../../../../src/theme/adaptive-colors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"adaptive-colors.d.ts","sourceRoot":"","sources":["../../../../src/theme/adaptive-colors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAgG3C,wBAAgB,iBAAiB,IAAI,WAAW,GAAG,IAAI,CAItD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-theme.d.ts","sourceRoot":"","sources":["../../../../src/theme/build-theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAKvE,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,SAAS,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;
|
|
1
|
+
{"version":3,"file":"build-theme.d.ts","sourceRoot":"","sources":["../../../../src/theme/build-theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAKvE,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,SAAS,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AAgFX;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,OAAO,GAAG,MAAM,EAC1B,UAAU,GAAE,OAAe,GAC1B,KAAK,CAWP"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type RoleColors, type SchemeVariant } from '../color-engine';
|
|
2
|
+
/**
|
|
3
|
+
* The canonical role → token assignment, sourced from an arbitrary seed's role
|
|
4
|
+
* set instead of a named preset.
|
|
5
|
+
*
|
|
6
|
+
* This MUST stay byte-for-byte identical to the mapping in `getPresetVars`
|
|
7
|
+
* (`preset-vars.ts`): a named preset is just a fixed seed, so scoping a subtree
|
|
8
|
+
* to a preset via `buildScopeVars` and scoping it to that preset's seed hex via
|
|
9
|
+
* `buildSeedScopeVars` are required to produce the same tokens. The parity test
|
|
10
|
+
* (`__tests__/seed-scope-parity.test.ts`) fails CI if the two ever drift.
|
|
11
|
+
*
|
|
12
|
+
* Values are full `rgb(r g b)` strings straight from the engine — no HSL-triple
|
|
13
|
+
* intermediate, so they flow through the scope pipeline unchanged (same as the
|
|
14
|
+
* preset path after `getResolvedTokens`).
|
|
15
|
+
*/
|
|
16
|
+
export declare function roleColorsToPresetTokens(r: RoleColors): Record<string, string>;
|
|
17
|
+
/** Options for deriving scope vars directly from a seed colour. */
|
|
18
|
+
export interface SeedScopeOptions {
|
|
19
|
+
/** The seed colour, `#rrggbb`. */
|
|
20
|
+
seed: string;
|
|
21
|
+
mode: 'light' | 'dark';
|
|
22
|
+
/**
|
|
23
|
+
* The tonal scheme variant. Defaults to `'vibrant'` — the same variant every
|
|
24
|
+
* named Bloom preset uses, so a preset's seed reproduces that preset exactly.
|
|
25
|
+
*/
|
|
26
|
+
variant?: SchemeVariant;
|
|
27
|
+
/** −1 (low) … 0 (normal) … 1 (high). Defaults to 0. */
|
|
28
|
+
contrastLevel?: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Build the CSS custom-property map for an ARBITRARY seed colour — the dynamic
|
|
32
|
+
* (non-preset) counterpart of `buildScopeVars`. Feeds the seed through the
|
|
33
|
+
* colour engine's `generateRoleColors` and assigns the roles to Bloom's
|
|
34
|
+
* canonical token names, then adds the Tailwind v4 `--color-x` aliases (required
|
|
35
|
+
* on web so scoped utilities resolve against the subtree instead of the document
|
|
36
|
+
* root).
|
|
37
|
+
*
|
|
38
|
+
* Scope the returned record onto an element (web: inline `style`; native:
|
|
39
|
+
* NativeWind `VariableContextProvider`) to tint just that subtree — e.g. the
|
|
40
|
+
* ambient region behind album/artist artwork — without re-theming the whole app.
|
|
41
|
+
*/
|
|
42
|
+
export declare function buildSeedScopeVars(options: SeedScopeOptions): Record<string, string>;
|
|
43
|
+
//# sourceMappingURL=seed-scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seed-scope.d.ts","sourceRoot":"","sources":["../../../../../src/theme/color-scope/seed-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAG1F;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA0C9E;AAED,mEAAmE;AACnE,MAAM,WAAW,gBAAgB;IAC/B,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAiBpF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset-vars.d.ts","sourceRoot":"","sources":["../../../../src/theme/preset-vars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAQ1F;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,YAAY,EACvB,IAAI,EAAE,OAAO,GAAG,MAAM,GACrB,YAAY,
|
|
1
|
+
{"version":3,"file":"preset-vars.d.ts","sourceRoot":"","sources":["../../../../src/theme/preset-vars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAQ1F;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,YAAY,EACvB,IAAI,EAAE,OAAO,GAAG,MAAM,GACrB,YAAY,CAwDd;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,YAAY,EACvB,IAAI,EAAE,OAAO,GAAG,MAAM,GACrB,IAAI,CAYN"}
|
|
@@ -12,7 +12,7 @@ import { APP_COLOR_NAMES, type AppColorName } from './color-presets';
|
|
|
12
12
|
* Order mirrors `getPresetVars`'s insertion order: base tokens first (in the
|
|
13
13
|
* order they appear in the preset data), then the synthesized extended tokens.
|
|
14
14
|
*/
|
|
15
|
-
export declare const CANONICAL_TOKENS: readonly ["background", "foreground", "surface", "surface-foreground", "popover", "popover-foreground", "primary", "primary-foreground", "secondary", "secondary-foreground", "muted", "muted-foreground", "accent", "accent-foreground", "destructive", "border", "input", "ring", "sidebar", "card", "card-foreground", "chart-1", "chart-2", "chart-3", "chart-4", "chart-5", "content-area", "sidebar-foreground", "sidebar-primary", "sidebar-primary-foreground", "sidebar-accent", "sidebar-accent-foreground", "sidebar-border", "sidebar-ring"];
|
|
15
|
+
export declare const CANONICAL_TOKENS: readonly ["background", "foreground", "surface", "surface-foreground", "popover", "popover-foreground", "primary", "primary-foreground", "secondary", "secondary-foreground", "tertiary", "tertiary-foreground", "muted", "muted-foreground", "accent", "accent-foreground", "destructive", "border", "input", "ring", "sidebar", "card", "card-foreground", "chart-1", "chart-2", "chart-3", "chart-4", "chart-5", "content-area", "sidebar-foreground", "sidebar-primary", "sidebar-primary-foreground", "sidebar-accent", "sidebar-accent-foreground", "sidebar-border", "sidebar-ring"];
|
|
16
16
|
/** A canonical token name (no leading `--`). */
|
|
17
17
|
export type CanonicalToken = (typeof CANONICAL_TOKENS)[number];
|
|
18
18
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-registry.d.ts","sourceRoot":"","sources":["../../../../src/theme/token-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGrE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"token-registry.d.ts","sourceRoot":"","sources":["../../../../src/theme/token-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGrE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,6jBAqCnB,CAAC;AAEX,gDAAgD;AAChD,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAW/D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CA+ChD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,OAAO,GAAG,MAAM,GACrB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOxB;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -14,8 +14,12 @@ export interface ThemeColors {
|
|
|
14
14
|
primaryLight: string;
|
|
15
15
|
/** Legacy alias: the page background (`--background`), NOT the focus ring. */
|
|
16
16
|
primaryDark: string;
|
|
17
|
-
/**
|
|
17
|
+
/** The M3 secondary accent — a real contrast colour (no longer a mirror of primary). */
|
|
18
18
|
secondary: string;
|
|
19
|
+
secondaryForeground: string;
|
|
20
|
+
/** The M3 tertiary accent, completing the primary/secondary/tertiary trio. */
|
|
21
|
+
tertiary: string;
|
|
22
|
+
tertiaryForeground: string;
|
|
19
23
|
tint: string;
|
|
20
24
|
icon: string;
|
|
21
25
|
iconActive: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/theme/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEjE,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAE3B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IAErB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IAEpB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,6EAA6E;IAC7E,YAAY,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,WAAW,EAAE,MAAM,CAAC;IAEpB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/theme/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEjE,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAE3B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IAErB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IAEpB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,6EAA6E;IAC7E,YAAY,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,WAAW,EA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;;;;;;;;;;;;;;;;;;;;GAuBG;AAcH;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"theme-css.d.ts","sourceRoot":"","sources":["../../../../src/design-tokens/theme-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAcH;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAiEtC;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,IAAI,MAAM,CAExC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adaptive-colors.d.ts","sourceRoot":"","sources":["../../../../src/theme/adaptive-colors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"adaptive-colors.d.ts","sourceRoot":"","sources":["../../../../src/theme/adaptive-colors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAgG3C,wBAAgB,iBAAiB,IAAI,WAAW,GAAG,IAAI,CAItD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-theme.d.ts","sourceRoot":"","sources":["../../../../src/theme/build-theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAKvE,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,SAAS,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;
|
|
1
|
+
{"version":3,"file":"build-theme.d.ts","sourceRoot":"","sources":["../../../../src/theme/build-theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAKvE,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,SAAS,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AAgFX;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,OAAO,GAAG,MAAM,EAC1B,UAAU,GAAE,OAAe,GAC1B,KAAK,CAWP"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type RoleColors, type SchemeVariant } from '../color-engine';
|
|
2
|
+
/**
|
|
3
|
+
* The canonical role → token assignment, sourced from an arbitrary seed's role
|
|
4
|
+
* set instead of a named preset.
|
|
5
|
+
*
|
|
6
|
+
* This MUST stay byte-for-byte identical to the mapping in `getPresetVars`
|
|
7
|
+
* (`preset-vars.ts`): a named preset is just a fixed seed, so scoping a subtree
|
|
8
|
+
* to a preset via `buildScopeVars` and scoping it to that preset's seed hex via
|
|
9
|
+
* `buildSeedScopeVars` are required to produce the same tokens. The parity test
|
|
10
|
+
* (`__tests__/seed-scope-parity.test.ts`) fails CI if the two ever drift.
|
|
11
|
+
*
|
|
12
|
+
* Values are full `rgb(r g b)` strings straight from the engine — no HSL-triple
|
|
13
|
+
* intermediate, so they flow through the scope pipeline unchanged (same as the
|
|
14
|
+
* preset path after `getResolvedTokens`).
|
|
15
|
+
*/
|
|
16
|
+
export declare function roleColorsToPresetTokens(r: RoleColors): Record<string, string>;
|
|
17
|
+
/** Options for deriving scope vars directly from a seed colour. */
|
|
18
|
+
export interface SeedScopeOptions {
|
|
19
|
+
/** The seed colour, `#rrggbb`. */
|
|
20
|
+
seed: string;
|
|
21
|
+
mode: 'light' | 'dark';
|
|
22
|
+
/**
|
|
23
|
+
* The tonal scheme variant. Defaults to `'vibrant'` — the same variant every
|
|
24
|
+
* named Bloom preset uses, so a preset's seed reproduces that preset exactly.
|
|
25
|
+
*/
|
|
26
|
+
variant?: SchemeVariant;
|
|
27
|
+
/** −1 (low) … 0 (normal) … 1 (high). Defaults to 0. */
|
|
28
|
+
contrastLevel?: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Build the CSS custom-property map for an ARBITRARY seed colour — the dynamic
|
|
32
|
+
* (non-preset) counterpart of `buildScopeVars`. Feeds the seed through the
|
|
33
|
+
* colour engine's `generateRoleColors` and assigns the roles to Bloom's
|
|
34
|
+
* canonical token names, then adds the Tailwind v4 `--color-x` aliases (required
|
|
35
|
+
* on web so scoped utilities resolve against the subtree instead of the document
|
|
36
|
+
* root).
|
|
37
|
+
*
|
|
38
|
+
* Scope the returned record onto an element (web: inline `style`; native:
|
|
39
|
+
* NativeWind `VariableContextProvider`) to tint just that subtree — e.g. the
|
|
40
|
+
* ambient region behind album/artist artwork — without re-theming the whole app.
|
|
41
|
+
*/
|
|
42
|
+
export declare function buildSeedScopeVars(options: SeedScopeOptions): Record<string, string>;
|
|
43
|
+
//# sourceMappingURL=seed-scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seed-scope.d.ts","sourceRoot":"","sources":["../../../../../src/theme/color-scope/seed-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAG1F;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA0C9E;AAED,mEAAmE;AACnE,MAAM,WAAW,gBAAgB;IAC/B,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAiBpF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset-vars.d.ts","sourceRoot":"","sources":["../../../../src/theme/preset-vars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAQ1F;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,YAAY,EACvB,IAAI,EAAE,OAAO,GAAG,MAAM,GACrB,YAAY,
|
|
1
|
+
{"version":3,"file":"preset-vars.d.ts","sourceRoot":"","sources":["../../../../src/theme/preset-vars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAQ1F;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,YAAY,EACvB,IAAI,EAAE,OAAO,GAAG,MAAM,GACrB,YAAY,CAwDd;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,YAAY,EACvB,IAAI,EAAE,OAAO,GAAG,MAAM,GACrB,IAAI,CAYN"}
|
|
@@ -12,7 +12,7 @@ import { APP_COLOR_NAMES, type AppColorName } from './color-presets';
|
|
|
12
12
|
* Order mirrors `getPresetVars`'s insertion order: base tokens first (in the
|
|
13
13
|
* order they appear in the preset data), then the synthesized extended tokens.
|
|
14
14
|
*/
|
|
15
|
-
export declare const CANONICAL_TOKENS: readonly ["background", "foreground", "surface", "surface-foreground", "popover", "popover-foreground", "primary", "primary-foreground", "secondary", "secondary-foreground", "muted", "muted-foreground", "accent", "accent-foreground", "destructive", "border", "input", "ring", "sidebar", "card", "card-foreground", "chart-1", "chart-2", "chart-3", "chart-4", "chart-5", "content-area", "sidebar-foreground", "sidebar-primary", "sidebar-primary-foreground", "sidebar-accent", "sidebar-accent-foreground", "sidebar-border", "sidebar-ring"];
|
|
15
|
+
export declare const CANONICAL_TOKENS: readonly ["background", "foreground", "surface", "surface-foreground", "popover", "popover-foreground", "primary", "primary-foreground", "secondary", "secondary-foreground", "tertiary", "tertiary-foreground", "muted", "muted-foreground", "accent", "accent-foreground", "destructive", "border", "input", "ring", "sidebar", "card", "card-foreground", "chart-1", "chart-2", "chart-3", "chart-4", "chart-5", "content-area", "sidebar-foreground", "sidebar-primary", "sidebar-primary-foreground", "sidebar-accent", "sidebar-accent-foreground", "sidebar-border", "sidebar-ring"];
|
|
16
16
|
/** A canonical token name (no leading `--`). */
|
|
17
17
|
export type CanonicalToken = (typeof CANONICAL_TOKENS)[number];
|
|
18
18
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-registry.d.ts","sourceRoot":"","sources":["../../../../src/theme/token-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGrE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"token-registry.d.ts","sourceRoot":"","sources":["../../../../src/theme/token-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGrE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,6jBAqCnB,CAAC;AAEX,gDAAgD;AAChD,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAW/D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CA+ChD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,OAAO,GAAG,MAAM,GACrB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOxB;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -14,8 +14,12 @@ export interface ThemeColors {
|
|
|
14
14
|
primaryLight: string;
|
|
15
15
|
/** Legacy alias: the page background (`--background`), NOT the focus ring. */
|
|
16
16
|
primaryDark: string;
|
|
17
|
-
/**
|
|
17
|
+
/** The M3 secondary accent — a real contrast colour (no longer a mirror of primary). */
|
|
18
18
|
secondary: string;
|
|
19
|
+
secondaryForeground: string;
|
|
20
|
+
/** The M3 tertiary accent, completing the primary/secondary/tertiary trio. */
|
|
21
|
+
tertiary: string;
|
|
22
|
+
tertiaryForeground: string;
|
|
19
23
|
tint: string;
|
|
20
24
|
icon: string;
|
|
21
25
|
iconActive: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/theme/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEjE,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAE3B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IAErB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IAEpB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,6EAA6E;IAC7E,YAAY,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,WAAW,EAAE,MAAM,CAAC;IAEpB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/theme/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEjE,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MA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AAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,WAAW,CAAC;IACpB,yFAAyF;IACzF,SAAS,EAAE,cAAc,CAAC;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB"}
|
package/package.json
CHANGED
|
@@ -73,6 +73,9 @@ export function bloomThemeCss(): string {
|
|
|
73
73
|
// `destructive` carries no themed foreground token; its text is always the
|
|
74
74
|
// fixed light-on-error colour.
|
|
75
75
|
lines.push(' --color-destructive-foreground: #ffffff;');
|
|
76
|
+
// `divider` is a semantic alias of the border token (M3 outlineVariant) so
|
|
77
|
+
// `bg-divider` / `border-divider` read intentionally in list/section UIs.
|
|
78
|
+
lines.push(' --color-divider: var(--border);');
|
|
76
79
|
|
|
77
80
|
// Spacing.
|
|
78
81
|
for (const [key, value] of Object.entries(SPACING)) {
|
|
@@ -36,6 +36,8 @@
|
|
|
36
36
|
--color-primary-foreground: var(--primary-foreground);
|
|
37
37
|
--color-secondary: var(--secondary);
|
|
38
38
|
--color-secondary-foreground: var(--secondary-foreground);
|
|
39
|
+
--color-tertiary: var(--tertiary);
|
|
40
|
+
--color-tertiary-foreground: var(--tertiary-foreground);
|
|
39
41
|
--color-muted: var(--muted);
|
|
40
42
|
--color-muted-foreground: var(--muted-foreground);
|
|
41
43
|
--color-accent: var(--accent);
|
|
@@ -61,6 +63,7 @@
|
|
|
61
63
|
--color-sidebar-border: var(--sidebar-border);
|
|
62
64
|
--color-sidebar-ring: var(--sidebar-ring);
|
|
63
65
|
--color-destructive-foreground: #ffffff;
|
|
66
|
+
--color-divider: var(--border);
|
|
64
67
|
--spacing-space-2: 2px;
|
|
65
68
|
--spacing-space-4: 4px;
|
|
66
69
|
--spacing-space-8: 8px;
|
|
@@ -101,7 +101,7 @@ function ImageAttachmentItem({
|
|
|
101
101
|
height: 120,
|
|
102
102
|
borderRadius: 16,
|
|
103
103
|
overflow: 'hidden',
|
|
104
|
-
backgroundColor: theme.colors.
|
|
104
|
+
backgroundColor: theme.colors.card,
|
|
105
105
|
borderWidth: 1,
|
|
106
106
|
borderColor: theme.colors.border,
|
|
107
107
|
}}
|
|
@@ -168,7 +168,7 @@ function DocumentAttachmentItem({
|
|
|
168
168
|
borderWidth: 1,
|
|
169
169
|
borderColor: theme.colors.border,
|
|
170
170
|
overflow: 'hidden',
|
|
171
|
-
backgroundColor: theme.colors.
|
|
171
|
+
backgroundColor: theme.colors.card,
|
|
172
172
|
}}
|
|
173
173
|
>
|
|
174
174
|
<View
|