@cavuno/board 1.39.0 → 1.40.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/dist/{_spec-DxC1ze93.d.mts → _spec-DRbgPIlN.d.mts} +351 -0
- package/dist/{_spec-DxC1ze93.d.ts → _spec-DRbgPIlN.d.ts} +351 -0
- package/dist/bin.mjs +242 -18
- package/dist/{board-RfZEAJse.d.ts → board-BxPUtrOl.d.ts} +1 -1
- package/dist/{board-CqYibYUA.d.mts → board-DCiNpgFf.d.mts} +1 -1
- package/dist/doctor.js +238 -14
- package/dist/doctor.mjs +238 -14
- package/dist/filters.d.mts +2 -2
- package/dist/filters.d.ts +2 -2
- package/dist/format.d.mts +3 -3
- package/dist/format.d.ts +3 -3
- package/dist/index.d.mts +55 -10
- package/dist/index.d.ts +55 -10
- package/dist/index.js +50 -1
- package/dist/index.mjs +50 -1
- package/dist/{jobs-CLLIvtMc.d.ts → jobs-DAGAVHQL.d.ts} +1 -1
- package/dist/{jobs-DPPA1Nev.d.mts → jobs-DhePKSRe.d.mts} +1 -1
- package/dist/{salaries-Rb5h_eVZ.d.mts → salaries-D6SUVMmt.d.mts} +2 -2
- package/dist/{salaries-DK4RnJnw.d.ts → salaries-cqb78kg0.d.ts} +2 -2
- package/dist/{search-DBoMM-gE.d.ts → search-BalPAS0P.d.ts} +1 -1
- package/dist/{search-CqBa1Qc4.d.mts → search-DYUQzCq_.d.mts} +1 -1
- package/dist/seo.d.mts +4 -4
- package/dist/seo.d.ts +4 -4
- package/dist/server.d.mts +56 -6
- package/dist/server.d.ts +56 -6
- package/dist/server.js +41 -0
- package/dist/server.mjs +41 -0
- package/dist/sitemap.d.mts +5 -5
- package/dist/sitemap.d.ts +5 -5
- package/dist/suggest.d.mts +2 -2
- package/dist/suggest.d.ts +2 -2
- package/dist/theme.d.mts +49 -1
- package/dist/theme.d.ts +49 -1
- package/dist/theme.js +60 -26
- package/dist/theme.mjs +60 -26
- package/package.json +1 -1
- package/skills/manifest.json +1 -1
package/dist/theme.d.ts
CHANGED
|
@@ -40,6 +40,54 @@ interface ThemeInput {
|
|
|
40
40
|
* lives in exactly one place.
|
|
41
41
|
*/
|
|
42
42
|
declare function isSafeThemeColorValue(value: string): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Email-safe snapshot keys (platform brand snapshot / MIG-04).
|
|
45
|
+
* Light-only subset consumed by Convex email branding.
|
|
46
|
+
*/
|
|
47
|
+
type EmailSafeSnapshotColorKey = 'buttonPrimary' | 'buttonPrimaryText' | 'background' | 'mutedBackground' | 'border' | 'text' | 'textMuted' | 'brandColor';
|
|
48
|
+
/**
|
|
49
|
+
* Inverse of the email-safe subset of `tokenLines`: for each snapshot
|
|
50
|
+
* color key, the ordered list of CSS custom property names (no `--`)
|
|
51
|
+
* that may supply it. First PRESENT property wins when DIFFERENT CSS
|
|
52
|
+
* names map to one snapshot key (e.g. muted > secondary for
|
|
53
|
+
* mutedBackground). Within one CSS property name, multi-`:root` cascade
|
|
54
|
+
* is last-wins and is resolved before this table is consulted.
|
|
55
|
+
*
|
|
56
|
+
* Additive export for the platform brand-snapshot deriver (MIG-04) —
|
|
57
|
+
* keeps the CSS ↔ board contract next to its forward twin.
|
|
58
|
+
*/
|
|
59
|
+
declare const EMAIL_SAFE_SNAPSHOT_FROM_CSS: {
|
|
60
|
+
readonly [K in EmailSafeSnapshotColorKey]: readonly string[];
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Board key → CSS custom property name(s) (no `--` prefix).
|
|
64
|
+
*
|
|
65
|
+
* The forward write contract for the builder theme tab (MIG-05) and the
|
|
66
|
+
* emission table for `boardThemeToCss` / `tokenLines` — one table, so a
|
|
67
|
+
* tab edit and a render path cannot drift. When a board key fans out to
|
|
68
|
+
* several CSS names (e.g. `text` → foreground + card-foreground + …),
|
|
69
|
+
* a single tab edit writes every name with the same hex value.
|
|
70
|
+
*
|
|
71
|
+
* Fallbacks that only apply at *emit* time when a preferred key is
|
|
72
|
+
* absent (`destructive` ← buttonDanger ?? textError; `ring` ← brandColor
|
|
73
|
+
* ?? buttonPrimary) stay in `tokenLines` — they are not owned write
|
|
74
|
+
* targets of the fallback key.
|
|
75
|
+
*/
|
|
76
|
+
declare const BOARD_COLOR_TO_CSS_TOKENS: {
|
|
77
|
+
readonly [K in BoardColorKey]: readonly string[];
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* CSS custom property names (no `--`) that fan out from *optional*
|
|
81
|
+
* ColorTokensSchema keys (`textSubtle`, `textDisabled`). Production
|
|
82
|
+
* starter `tokens.css` may omit these declarations; the builder theme
|
|
83
|
+
* batch lane SKIPS missing optional declarations rather than escalating
|
|
84
|
+
* the whole preset to the model (MIG-05). Required declarations still
|
|
85
|
+
* escalate on absence — never invent (L5-B).
|
|
86
|
+
*/
|
|
87
|
+
declare const OPTIONAL_THEME_DECLARATIONS: readonly ["foreground-subtle", "foreground-disabled"];
|
|
88
|
+
type OptionalThemeDeclaration = (typeof OPTIONAL_THEME_DECLARATIONS)[number];
|
|
89
|
+
/** True when a CSS custom property name (with or without `--`) is optional. */
|
|
90
|
+
declare function isOptionalThemeDeclaration(token: string): boolean;
|
|
43
91
|
/**
|
|
44
92
|
* Render the board theme as `:root` (+ `.dark`) CSS-variable overrides.
|
|
45
93
|
* Inject once at the app shell, after the static theme stylesheet.
|
|
@@ -67,4 +115,4 @@ declare function themeFontFamily(fontKey: string): string;
|
|
|
67
115
|
/** One Google Fonts request covering the sans + heading families. */
|
|
68
116
|
declare function googleFontsUrl(theme: ThemeInput | null): string | null;
|
|
69
117
|
|
|
70
|
-
export { BOARD_COLOR_KEYS, type BoardColorKey, THEME_FONT_GOOGLE_FAMILIES, type ThemeInput, boardThemeToCss, googleFontsUrl, isSafeThemeColorValue, themeFontFamily, themeMode };
|
|
118
|
+
export { BOARD_COLOR_KEYS, BOARD_COLOR_TO_CSS_TOKENS, type BoardColorKey, EMAIL_SAFE_SNAPSHOT_FROM_CSS, type EmailSafeSnapshotColorKey, OPTIONAL_THEME_DECLARATIONS, type OptionalThemeDeclaration, THEME_FONT_GOOGLE_FAMILIES, type ThemeInput, boardThemeToCss, googleFontsUrl, isOptionalThemeDeclaration, isSafeThemeColorValue, themeFontFamily, themeMode };
|
package/dist/theme.js
CHANGED
|
@@ -21,9 +21,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var theme_exports = {};
|
|
22
22
|
__export(theme_exports, {
|
|
23
23
|
BOARD_COLOR_KEYS: () => BOARD_COLOR_KEYS,
|
|
24
|
+
BOARD_COLOR_TO_CSS_TOKENS: () => BOARD_COLOR_TO_CSS_TOKENS,
|
|
25
|
+
EMAIL_SAFE_SNAPSHOT_FROM_CSS: () => EMAIL_SAFE_SNAPSHOT_FROM_CSS,
|
|
26
|
+
OPTIONAL_THEME_DECLARATIONS: () => OPTIONAL_THEME_DECLARATIONS,
|
|
24
27
|
THEME_FONT_GOOGLE_FAMILIES: () => THEME_FONT_GOOGLE_FAMILIES,
|
|
25
28
|
boardThemeToCss: () => boardThemeToCss,
|
|
26
29
|
googleFontsUrl: () => googleFontsUrl,
|
|
30
|
+
isOptionalThemeDeclaration: () => isOptionalThemeDeclaration,
|
|
27
31
|
isSafeThemeColorValue: () => isSafeThemeColorValue,
|
|
28
32
|
themeFontFamily: () => themeFontFamily,
|
|
29
33
|
themeMode: () => themeMode
|
|
@@ -56,37 +60,67 @@ function color(colors, key) {
|
|
|
56
60
|
if (typeof value !== "string" || !value) return void 0;
|
|
57
61
|
return isSafeThemeColorValue(value) ? value : void 0;
|
|
58
62
|
}
|
|
63
|
+
var EMAIL_SAFE_SNAPSHOT_FROM_CSS = {
|
|
64
|
+
buttonPrimary: ["primary"],
|
|
65
|
+
buttonPrimaryText: ["primary-foreground"],
|
|
66
|
+
background: ["background"],
|
|
67
|
+
// muted wins; secondary fills only when --muted is absent (A3).
|
|
68
|
+
mutedBackground: ["muted", "secondary"],
|
|
69
|
+
border: ["border"],
|
|
70
|
+
text: ["foreground"],
|
|
71
|
+
textMuted: ["muted-foreground"],
|
|
72
|
+
brandColor: ["ring"]
|
|
73
|
+
};
|
|
74
|
+
var BOARD_COLOR_TO_CSS_TOKENS = {
|
|
75
|
+
background: ["background"],
|
|
76
|
+
text: [
|
|
77
|
+
"foreground",
|
|
78
|
+
"card-foreground",
|
|
79
|
+
"popover-foreground",
|
|
80
|
+
"secondary-foreground",
|
|
81
|
+
"accent-foreground"
|
|
82
|
+
],
|
|
83
|
+
surfaceBackground: ["card", "popover"],
|
|
84
|
+
mutedBackground: ["secondary", "muted"],
|
|
85
|
+
highlightBackground: ["accent"],
|
|
86
|
+
buttonPrimary: ["primary"],
|
|
87
|
+
buttonPrimaryText: ["primary-foreground"],
|
|
88
|
+
buttonDanger: ["destructive"],
|
|
89
|
+
textMuted: ["muted-foreground"],
|
|
90
|
+
border: ["border", "input"],
|
|
91
|
+
brandColor: ["ring"],
|
|
92
|
+
contrastBackground: ["contrast-background"],
|
|
93
|
+
contrastText: ["contrast-foreground"],
|
|
94
|
+
textSubtle: ["foreground-subtle"],
|
|
95
|
+
textDisabled: ["foreground-disabled"],
|
|
96
|
+
textError: ["foreground-error"]
|
|
97
|
+
};
|
|
98
|
+
var OPTIONAL_THEME_DECLARATIONS = [
|
|
99
|
+
"foreground-subtle",
|
|
100
|
+
"foreground-disabled"
|
|
101
|
+
];
|
|
102
|
+
function isOptionalThemeDeclaration(token) {
|
|
103
|
+
const name = token.startsWith("--") ? token.slice(2) : token;
|
|
104
|
+
return OPTIONAL_THEME_DECLARATIONS.includes(name);
|
|
105
|
+
}
|
|
59
106
|
function tokenLines(colors) {
|
|
60
107
|
const lines = [];
|
|
61
108
|
const set = (token, value) => {
|
|
62
109
|
if (value) lines.push(` --${token}: ${value};`);
|
|
63
110
|
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
set("accent-foreground", color(colors, "text"));
|
|
78
|
-
set(
|
|
79
|
-
"destructive",
|
|
80
|
-
color(colors, "buttonDanger") ?? color(colors, "textError")
|
|
81
|
-
);
|
|
82
|
-
set("border", color(colors, "border"));
|
|
83
|
-
set("input", color(colors, "border"));
|
|
84
|
-
set("ring", color(colors, "brandColor") ?? color(colors, "buttonPrimary"));
|
|
85
|
-
set("contrast-background", color(colors, "contrastBackground"));
|
|
86
|
-
set("contrast-foreground", color(colors, "contrastText"));
|
|
87
|
-
set("foreground-subtle", color(colors, "textSubtle"));
|
|
88
|
-
set("foreground-disabled", color(colors, "textDisabled"));
|
|
89
|
-
set("foreground-error", color(colors, "textError"));
|
|
111
|
+
for (const boardKey of BOARD_COLOR_KEYS) {
|
|
112
|
+
const value = color(colors, boardKey);
|
|
113
|
+
if (!value) continue;
|
|
114
|
+
for (const cssToken of BOARD_COLOR_TO_CSS_TOKENS[boardKey]) {
|
|
115
|
+
set(cssToken, value);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (!color(colors, "buttonDanger") && color(colors, "textError")) {
|
|
119
|
+
set("destructive", color(colors, "textError"));
|
|
120
|
+
}
|
|
121
|
+
if (!color(colors, "brandColor") && color(colors, "buttonPrimary")) {
|
|
122
|
+
set("ring", color(colors, "buttonPrimary"));
|
|
123
|
+
}
|
|
90
124
|
return lines;
|
|
91
125
|
}
|
|
92
126
|
function boardThemeToCss(theme) {
|
package/dist/theme.mjs
CHANGED
|
@@ -26,37 +26,67 @@ function color(colors, key) {
|
|
|
26
26
|
if (typeof value !== "string" || !value) return void 0;
|
|
27
27
|
return isSafeThemeColorValue(value) ? value : void 0;
|
|
28
28
|
}
|
|
29
|
+
var EMAIL_SAFE_SNAPSHOT_FROM_CSS = {
|
|
30
|
+
buttonPrimary: ["primary"],
|
|
31
|
+
buttonPrimaryText: ["primary-foreground"],
|
|
32
|
+
background: ["background"],
|
|
33
|
+
// muted wins; secondary fills only when --muted is absent (A3).
|
|
34
|
+
mutedBackground: ["muted", "secondary"],
|
|
35
|
+
border: ["border"],
|
|
36
|
+
text: ["foreground"],
|
|
37
|
+
textMuted: ["muted-foreground"],
|
|
38
|
+
brandColor: ["ring"]
|
|
39
|
+
};
|
|
40
|
+
var BOARD_COLOR_TO_CSS_TOKENS = {
|
|
41
|
+
background: ["background"],
|
|
42
|
+
text: [
|
|
43
|
+
"foreground",
|
|
44
|
+
"card-foreground",
|
|
45
|
+
"popover-foreground",
|
|
46
|
+
"secondary-foreground",
|
|
47
|
+
"accent-foreground"
|
|
48
|
+
],
|
|
49
|
+
surfaceBackground: ["card", "popover"],
|
|
50
|
+
mutedBackground: ["secondary", "muted"],
|
|
51
|
+
highlightBackground: ["accent"],
|
|
52
|
+
buttonPrimary: ["primary"],
|
|
53
|
+
buttonPrimaryText: ["primary-foreground"],
|
|
54
|
+
buttonDanger: ["destructive"],
|
|
55
|
+
textMuted: ["muted-foreground"],
|
|
56
|
+
border: ["border", "input"],
|
|
57
|
+
brandColor: ["ring"],
|
|
58
|
+
contrastBackground: ["contrast-background"],
|
|
59
|
+
contrastText: ["contrast-foreground"],
|
|
60
|
+
textSubtle: ["foreground-subtle"],
|
|
61
|
+
textDisabled: ["foreground-disabled"],
|
|
62
|
+
textError: ["foreground-error"]
|
|
63
|
+
};
|
|
64
|
+
var OPTIONAL_THEME_DECLARATIONS = [
|
|
65
|
+
"foreground-subtle",
|
|
66
|
+
"foreground-disabled"
|
|
67
|
+
];
|
|
68
|
+
function isOptionalThemeDeclaration(token) {
|
|
69
|
+
const name = token.startsWith("--") ? token.slice(2) : token;
|
|
70
|
+
return OPTIONAL_THEME_DECLARATIONS.includes(name);
|
|
71
|
+
}
|
|
29
72
|
function tokenLines(colors) {
|
|
30
73
|
const lines = [];
|
|
31
74
|
const set = (token, value) => {
|
|
32
75
|
if (value) lines.push(` --${token}: ${value};`);
|
|
33
76
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
set("accent-foreground", color(colors, "text"));
|
|
48
|
-
set(
|
|
49
|
-
"destructive",
|
|
50
|
-
color(colors, "buttonDanger") ?? color(colors, "textError")
|
|
51
|
-
);
|
|
52
|
-
set("border", color(colors, "border"));
|
|
53
|
-
set("input", color(colors, "border"));
|
|
54
|
-
set("ring", color(colors, "brandColor") ?? color(colors, "buttonPrimary"));
|
|
55
|
-
set("contrast-background", color(colors, "contrastBackground"));
|
|
56
|
-
set("contrast-foreground", color(colors, "contrastText"));
|
|
57
|
-
set("foreground-subtle", color(colors, "textSubtle"));
|
|
58
|
-
set("foreground-disabled", color(colors, "textDisabled"));
|
|
59
|
-
set("foreground-error", color(colors, "textError"));
|
|
77
|
+
for (const boardKey of BOARD_COLOR_KEYS) {
|
|
78
|
+
const value = color(colors, boardKey);
|
|
79
|
+
if (!value) continue;
|
|
80
|
+
for (const cssToken of BOARD_COLOR_TO_CSS_TOKENS[boardKey]) {
|
|
81
|
+
set(cssToken, value);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
if (!color(colors, "buttonDanger") && color(colors, "textError")) {
|
|
85
|
+
set("destructive", color(colors, "textError"));
|
|
86
|
+
}
|
|
87
|
+
if (!color(colors, "brandColor") && color(colors, "buttonPrimary")) {
|
|
88
|
+
set("ring", color(colors, "buttonPrimary"));
|
|
89
|
+
}
|
|
60
90
|
return lines;
|
|
61
91
|
}
|
|
62
92
|
function boardThemeToCss(theme) {
|
|
@@ -131,9 +161,13 @@ function googleFontsUrl(theme) {
|
|
|
131
161
|
}
|
|
132
162
|
export {
|
|
133
163
|
BOARD_COLOR_KEYS,
|
|
164
|
+
BOARD_COLOR_TO_CSS_TOKENS,
|
|
165
|
+
EMAIL_SAFE_SNAPSHOT_FROM_CSS,
|
|
166
|
+
OPTIONAL_THEME_DECLARATIONS,
|
|
134
167
|
THEME_FONT_GOOGLE_FAMILIES,
|
|
135
168
|
boardThemeToCss,
|
|
136
169
|
googleFontsUrl,
|
|
170
|
+
isOptionalThemeDeclaration,
|
|
137
171
|
isSafeThemeColorValue,
|
|
138
172
|
themeFontFamily,
|
|
139
173
|
themeMode
|
package/package.json
CHANGED
package/skills/manifest.json
CHANGED