@tangle-network/agent-app 0.45.23 → 0.45.24
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/{DesignCanvas-ZG7DJS7C.js → DesignCanvas-3RRPVPCP.js} +2 -2
- package/dist/{DesignCanvasEditor-SLFMHOII.js → DesignCanvasEditor-KAMMEX7E.js} +4 -4
- package/dist/{TimelineEditor-6PV42FLG.js → TimelineEditor-IIBVCAZV.js} +2 -2
- package/dist/VaultPane-MUWGYVJ7.js +7 -0
- package/dist/assistant/index.d.ts +11 -0
- package/dist/assistant/index.js +89 -56
- package/dist/assistant/index.js.map +1 -1
- package/dist/chat-react/index.js +4 -1
- package/dist/chat-react/index.js.map +1 -1
- package/dist/{chunk-MLACJ6DB.js → chunk-7O4FZAFP.js} +10 -10
- package/dist/chunk-7O4FZAFP.js.map +1 -0
- package/dist/{chunk-OASVAPRL.js → chunk-AWPK7ZDS.js} +3 -3
- package/dist/{chunk-YTMKRL3L.js → chunk-HZ4WCA37.js} +3 -2
- package/dist/chunk-HZ4WCA37.js.map +1 -0
- package/dist/{chunk-FVJP2RTC.js → chunk-JJJEO4ND.js} +91 -36
- package/dist/chunk-JJJEO4ND.js.map +1 -0
- package/dist/{chunk-7PFFFRVU.js → chunk-KOMP6NDW.js} +172 -43
- package/dist/chunk-KOMP6NDW.js.map +1 -0
- package/dist/{chunk-TZO3SOUL.js → chunk-LSQR6HM6.js} +49 -33
- package/dist/chunk-LSQR6HM6.js.map +1 -0
- package/dist/{chunk-3IHYJIDJ.js → chunk-NC2V63EL.js} +15 -15
- package/dist/chunk-NC2V63EL.js.map +1 -0
- package/dist/{chunk-73CQJOIU.js → chunk-OYGM5WLD.js} +5 -5
- package/dist/chunk-OYGM5WLD.js.map +1 -0
- package/dist/chunk-YIQHOAHN.js +340 -0
- package/dist/chunk-YIQHOAHN.js.map +1 -0
- package/dist/design-canvas-react/index.d.ts +2 -2
- package/dist/design-canvas-react/index.js +9 -9
- package/dist/design-canvas-react/index.js.map +1 -1
- package/dist/design-canvas-react/lazy.js +1 -1
- package/dist/sequences-react/index.js +2 -2
- package/dist/theme/index.d.ts +27 -1
- package/dist/theme/index.js +1 -1
- package/dist/theme/tailwind-preset.d.ts +25 -0
- package/dist/theme/tailwind-preset.js +55 -1
- package/dist/theme/tailwind-preset.js.map +1 -1
- package/dist/theme/tokens.css +298 -40
- package/dist/vault/index.js +1 -1
- package/dist/vault/lazy.js +1 -1
- package/dist/web-react/async/index.js +19 -307
- package/dist/web-react/async/index.js.map +1 -1
- package/dist/web-react/index.d.ts +73 -6
- package/dist/web-react/index.js +2 -2
- package/dist/work-product-react/index.js +1 -1
- package/package.json +1 -1
- package/dist/VaultPane-HFH734K6.js +0 -7
- package/dist/chunk-3IHYJIDJ.js.map +0 -1
- package/dist/chunk-73CQJOIU.js.map +0 -1
- package/dist/chunk-7PFFFRVU.js.map +0 -1
- package/dist/chunk-FVJP2RTC.js.map +0 -1
- package/dist/chunk-MLACJ6DB.js.map +0 -1
- package/dist/chunk-TZO3SOUL.js.map +0 -1
- package/dist/chunk-YTMKRL3L.js.map +0 -1
- /package/dist/{DesignCanvas-ZG7DJS7C.js.map → DesignCanvas-3RRPVPCP.js.map} +0 -0
- /package/dist/{DesignCanvasEditor-SLFMHOII.js.map → DesignCanvasEditor-KAMMEX7E.js.map} +0 -0
- /package/dist/{TimelineEditor-6PV42FLG.js.map → TimelineEditor-IIBVCAZV.js.map} +0 -0
- /package/dist/{VaultPane-HFH734K6.js.map → VaultPane-MUWGYVJ7.js.map} +0 -0
- /package/dist/{chunk-OASVAPRL.js.map → chunk-AWPK7ZDS.js.map} +0 -0
|
@@ -1,29 +1,32 @@
|
|
|
1
1
|
// src/theme/theme.ts
|
|
2
2
|
var lightTheme = {
|
|
3
3
|
background: "0 0% 100%",
|
|
4
|
-
foreground: "
|
|
5
|
-
card: "
|
|
6
|
-
cardForeground: "
|
|
4
|
+
foreground: "240.1 6.8% 5.5%",
|
|
5
|
+
card: "239.6 17.2% 96.5%",
|
|
6
|
+
cardForeground: "240.1 6.8% 5.5%",
|
|
7
7
|
popover: "0 0% 100%",
|
|
8
|
-
popoverForeground: "
|
|
8
|
+
popoverForeground: "240.1 6.8% 5.5%",
|
|
9
9
|
primary: "245 62% 57%",
|
|
10
10
|
primaryForeground: "0 0% 100%",
|
|
11
|
-
secondary: "
|
|
12
|
-
secondaryForeground: "
|
|
13
|
-
muted: "
|
|
14
|
-
mutedForeground: "
|
|
15
|
-
accent: "
|
|
16
|
-
accentForeground: "
|
|
11
|
+
secondary: "239.6 8% 92.6%",
|
|
12
|
+
secondaryForeground: "239.9 3.8% 10.7%",
|
|
13
|
+
muted: "239.6 8% 92.6%",
|
|
14
|
+
mutedForeground: "239.7 1.3% 38.2%",
|
|
15
|
+
accent: "239.6 8% 92.6%",
|
|
16
|
+
accentForeground: "239.9 3.8% 10.7%",
|
|
17
17
|
destructive: "0 72% 41%",
|
|
18
18
|
destructiveForeground: "0 0% 100%",
|
|
19
|
-
border: "
|
|
20
|
-
input: "
|
|
19
|
+
border: "239.6 5.2% 88.7%",
|
|
20
|
+
input: "239.6 5.2% 88.7%",
|
|
21
21
|
ring: "245 62% 57%",
|
|
22
22
|
success: "160 84% 26%",
|
|
23
23
|
successForeground: "0 0% 100%",
|
|
24
24
|
warning: "41 96% 38%",
|
|
25
25
|
warningForeground: "38 92% 12%",
|
|
26
|
-
|
|
26
|
+
warningStrong: "41 96% 28%",
|
|
27
|
+
canvasBackdrop: "hsl(239.6 5.2% 88.7%)",
|
|
28
|
+
borderSoft: "color-mix(in oklch, hsl(var(--border)) 40%, transparent)",
|
|
29
|
+
cardEdge: "color-mix(in oklch, hsl(var(--border)) 60%, transparent)",
|
|
27
30
|
canvasRender: {
|
|
28
31
|
grid: "#c0c0c0",
|
|
29
32
|
snapGrid: "#a0a0a0",
|
|
@@ -39,30 +42,35 @@ var lightTheme = {
|
|
|
39
42
|
}
|
|
40
43
|
};
|
|
41
44
|
var darkTheme = {
|
|
42
|
-
background: "240 8% 5%",
|
|
43
|
-
foreground: "
|
|
44
|
-
card: "240
|
|
45
|
-
cardForeground: "
|
|
46
|
-
popover: "
|
|
47
|
-
popoverForeground: "
|
|
45
|
+
background: "240.1 6.8% 5.5%",
|
|
46
|
+
foreground: "239.6 8% 92.6%",
|
|
47
|
+
card: "240 4.9% 8%",
|
|
48
|
+
cardForeground: "239.6 8% 92.6%",
|
|
49
|
+
popover: "239.9 3.1% 13.5%",
|
|
50
|
+
popoverForeground: "239.6 8% 92.6%",
|
|
48
51
|
primary: "239 84% 74%",
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
// Inverted, not copied from light: white on this fill measures 3.02:1.
|
|
53
|
+
primaryForeground: "240.1 6.8% 5.5%",
|
|
54
|
+
secondary: "239.9 3.8% 10.7%",
|
|
55
|
+
secondaryForeground: "239.6 8% 92.6%",
|
|
56
|
+
muted: "239.9 3.8% 10.7%",
|
|
57
|
+
mutedForeground: "239.6 1.5% 62.5%",
|
|
58
|
+
accent: "239.9 3.8% 10.7%",
|
|
59
|
+
accentForeground: "239.6 8% 92.6%",
|
|
56
60
|
destructive: "348 90% 68%",
|
|
57
|
-
destructiveForeground: "
|
|
58
|
-
border: "
|
|
59
|
-
input: "
|
|
61
|
+
destructiveForeground: "239.9 3.1% 13.5%",
|
|
62
|
+
border: "239.9 3.1% 13.5%",
|
|
63
|
+
input: "239.9 3.8% 10.7%",
|
|
60
64
|
ring: "239 84% 74%",
|
|
61
65
|
success: "160 70% 52%",
|
|
62
66
|
successForeground: "160 84% 10%",
|
|
63
67
|
warning: "40 94% 56%",
|
|
64
68
|
warningForeground: "38 92% 12%",
|
|
65
|
-
|
|
69
|
+
warningStrong: "40 94% 56%",
|
|
70
|
+
canvasBackdrop: "hsl(240.1 6.8% 5.5%)",
|
|
71
|
+
// The inversion: dark keeps both tiers at full strength (see tokens.css).
|
|
72
|
+
borderSoft: "hsl(var(--border))",
|
|
73
|
+
cardEdge: "hsl(var(--border))",
|
|
66
74
|
canvasRender: {
|
|
67
75
|
grid: "#3a3a3a",
|
|
68
76
|
snapGrid: "#5a5a5a",
|
|
@@ -78,7 +86,7 @@ var darkTheme = {
|
|
|
78
86
|
}
|
|
79
87
|
};
|
|
80
88
|
function themeColor(value) {
|
|
81
|
-
return
|
|
89
|
+
return /^(hsl|rgb|oklch|oklab|lch|lab|color|color-mix|#)/.test(value) ? value : `hsl(${value})`;
|
|
82
90
|
}
|
|
83
91
|
function themeToCssVars(theme) {
|
|
84
92
|
return {
|
|
@@ -105,6 +113,10 @@ function themeToCssVars(theme) {
|
|
|
105
113
|
"--success-foreground": theme.successForeground,
|
|
106
114
|
"--warning": theme.warning,
|
|
107
115
|
"--warning-foreground": theme.warningForeground,
|
|
116
|
+
// Falls back to the pairing the tinted surfaces used before this token
|
|
117
|
+
// existed, so an unset value restores the previous look rather than an
|
|
118
|
+
// unthemed one.
|
|
119
|
+
"--warning-strong": theme.warningStrong ?? theme.warningForeground,
|
|
108
120
|
"--bg-input": `hsl(${theme.card})`,
|
|
109
121
|
"--text-primary": `hsl(${theme.foreground})`,
|
|
110
122
|
"--text-secondary": `hsl(${theme.secondaryForeground})`,
|
|
@@ -114,7 +126,11 @@ function themeToCssVars(theme) {
|
|
|
114
126
|
"--brand-primary": `hsl(${theme.primary})`,
|
|
115
127
|
"--editor-selection-background": `hsl(${theme.primary})`,
|
|
116
128
|
"--editor-selection-foreground": `hsl(${theme.background})`,
|
|
117
|
-
"--canvas-backdrop": theme.canvasBackdrop
|
|
129
|
+
"--canvas-backdrop": theme.canvasBackdrop,
|
|
130
|
+
// Full strength is the safe default: an unset tier can under-draw an edge,
|
|
131
|
+
// never erase one.
|
|
132
|
+
"--border-soft": theme.borderSoft ?? `hsl(${theme.border})`,
|
|
133
|
+
"--card-edge": theme.cardEdge ?? `hsl(${theme.border})`
|
|
118
134
|
};
|
|
119
135
|
}
|
|
120
136
|
|
|
@@ -124,4 +140,4 @@ export {
|
|
|
124
140
|
themeColor,
|
|
125
141
|
themeToCssVars
|
|
126
142
|
};
|
|
127
|
-
//# sourceMappingURL=chunk-
|
|
143
|
+
//# sourceMappingURL=chunk-LSQR6HM6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/theme/theme.ts"],"sourcesContent":["/**\n * Typed mirror of tokens.css for runtime/JS theming. The canonical source is\n * tokens.css (`import '@tangle-network/agent-app/styles'`); this module is for\n * apps that compute theme variables in JS, or read color values where CSS\n * custom properties cannot reach — notably Konva canvas render code, which\n * paints to a bitmap and cannot resolve `var(--…)`.\n *\n * Values are shadcn-style HSL channel triples (\"H S% L%\"); wrap with `color()`.\n *\n * The neutral triples are the RESOLVED form of tokens.css's `--neutral-*` ramp\n * (that file states them as `var(--neutral-NN-hsl)`; JS has no cascade to\n * resolve through, so they are inlined here). `tests/theme/tokens-contract.test.ts`\n * resolves the CSS one level and fails if this mirror has drifted.\n */\n\nexport interface AgentAppTheme {\n background: string\n foreground: string\n card: string\n cardForeground: string\n popover: string\n popoverForeground: string\n primary: string\n primaryForeground: string\n secondary: string\n secondaryForeground: string\n muted: string\n mutedForeground: string\n accent: string\n accentForeground: string\n destructive: string\n destructiveForeground: string\n border: string\n input: string\n ring: string\n success: string\n successForeground: string\n warning: string\n warningForeground: string\n /**\n * Warning as TEXT on a warning-TINTED surface, as a channel triple. Optional\n * so a consumer's existing `AgentAppTheme` literal still type-checks;\n * {@link themeToCssVars} falls back to `warningForeground`, which is what the\n * surface used before this token existed.\n */\n warningStrong?: string\n /** Full CSS color (not a triple) — the canvas/scene backdrop. */\n canvasBackdrop: string\n /**\n * Border tiers as FULL CSS colors (they are `color-mix()` results, not\n * triples). Optional so a consumer's existing `AgentAppTheme` literal still\n * type-checks; {@link themeToCssVars} falls back to full-strength\n * `hsl(var(--border))`, which can never erase an edge.\n */\n borderSoft?: string\n /** @see borderSoft */\n cardEdge?: string\n /** Konva render palette — full hex colors the bitmap canvas paints with\n * (it cannot resolve `var(--…)`). NOT emitted by themeToCssVars. */\n canvasRender: CanvasRenderPalette\n}\n\n/**\n * Colors the Konva design-canvas paints directly. Konva renders to a bitmap\n * and cannot read CSS custom properties, so these are full hex strings sourced\n * from the active theme and threaded through the canvas components.\n */\nexport interface CanvasRenderPalette {\n /** Grid line color (GridLayer). */\n grid: string\n /** Grid-snap guide line (SnapGuidesOverlay, kind 'grid'). */\n snapGrid: string\n /** Saved ruler-guide snap line (kind 'guide'). */\n snapGuide: string\n /** Page edge/center snap line (kinds 'page-edge'/'page-center'). */\n snapPage: string\n /** Element edge/center snap line (kinds 'element-edge'/'element-center'). */\n snapElement: string\n /** Transformer border + anchor stroke (SelectionLayer). */\n selectionStroke: string\n /** Transformer anchor fill (SelectionLayer). */\n selectionAnchorFill: string\n /** Video placeholder fill (ElementNode VideoNode). */\n placeholderFill: string\n /** Video placeholder stroke (ElementNode VideoNode). */\n placeholderStroke: string\n /** Broken/loading image placeholder fill (ElementNode ImageNode). */\n brokenFill: string\n /** Broken/loading image placeholder stroke (ElementNode ImageNode). */\n brokenStroke: string\n}\n\n/** Define a light color theme with specific background, foreground, and accent color values */\nexport const lightTheme: AgentAppTheme = {\n background: '0 0% 100%',\n foreground: '240.1 6.8% 5.5%',\n card: '239.6 17.2% 96.5%',\n cardForeground: '240.1 6.8% 5.5%',\n popover: '0 0% 100%',\n popoverForeground: '240.1 6.8% 5.5%',\n primary: '245 62% 57%',\n primaryForeground: '0 0% 100%',\n secondary: '239.6 8% 92.6%',\n secondaryForeground: '239.9 3.8% 10.7%',\n muted: '239.6 8% 92.6%',\n mutedForeground: '239.7 1.3% 38.2%',\n accent: '239.6 8% 92.6%',\n accentForeground: '239.9 3.8% 10.7%',\n destructive: '0 72% 41%',\n destructiveForeground: '0 0% 100%',\n border: '239.6 5.2% 88.7%',\n input: '239.6 5.2% 88.7%',\n ring: '245 62% 57%',\n success: '160 84% 26%',\n successForeground: '0 0% 100%',\n warning: '41 96% 38%',\n warningForeground: '38 92% 12%',\n warningStrong: '41 96% 28%',\n canvasBackdrop: 'hsl(239.6 5.2% 88.7%)',\n borderSoft: 'color-mix(in oklch, hsl(var(--border)) 40%, transparent)',\n cardEdge: 'color-mix(in oklch, hsl(var(--border)) 60%, transparent)',\n canvasRender: {\n grid: '#c0c0c0',\n snapGrid: '#a0a0a0',\n snapGuide: '#3b82f6',\n snapPage: '#f59e0b',\n snapElement: '#f43f5e',\n selectionStroke: '#00a1ff',\n selectionAnchorFill: '#ffffff',\n placeholderFill: '#1f2937',\n placeholderStroke: '#374151',\n brokenFill: '#e5e7eb',\n brokenStroke: '#9ca3af',\n },\n}\n\n/** Define a dark color scheme for the Agent app interface with specific background and foreground hues */\nexport const darkTheme: AgentAppTheme = {\n background: '240.1 6.8% 5.5%',\n foreground: '239.6 8% 92.6%',\n card: '240 4.9% 8%',\n cardForeground: '239.6 8% 92.6%',\n popover: '239.9 3.1% 13.5%',\n popoverForeground: '239.6 8% 92.6%',\n primary: '239 84% 74%',\n // Inverted, not copied from light: white on this fill measures 3.02:1.\n primaryForeground: '240.1 6.8% 5.5%',\n secondary: '239.9 3.8% 10.7%',\n secondaryForeground: '239.6 8% 92.6%',\n muted: '239.9 3.8% 10.7%',\n mutedForeground: '239.6 1.5% 62.5%',\n accent: '239.9 3.8% 10.7%',\n accentForeground: '239.6 8% 92.6%',\n destructive: '348 90% 68%',\n destructiveForeground: '239.9 3.1% 13.5%',\n border: '239.9 3.1% 13.5%',\n input: '239.9 3.8% 10.7%',\n ring: '239 84% 74%',\n success: '160 70% 52%',\n successForeground: '160 84% 10%',\n warning: '40 94% 56%',\n warningForeground: '38 92% 12%',\n warningStrong: '40 94% 56%',\n canvasBackdrop: 'hsl(240.1 6.8% 5.5%)',\n // The inversion: dark keeps both tiers at full strength (see tokens.css).\n borderSoft: 'hsl(var(--border))',\n cardEdge: 'hsl(var(--border))',\n canvasRender: {\n grid: '#3a3a3a',\n snapGrid: '#5a5a5a',\n snapGuide: '#3b82f6',\n snapPage: '#f59e0b',\n snapElement: '#f43f5e',\n selectionStroke: '#00a1ff',\n selectionAnchorFill: '#e5e7eb',\n placeholderFill: '#2a2f3a',\n placeholderStroke: '#3f4654',\n brokenFill: '#262b33',\n brokenStroke: '#4b5563',\n },\n}\n\n/**\n * Wrap a channel triple in `hsl()`; pass through values already in a color form.\n * `oklch(…)` / `oklab(…)` / `color-mix(…)` are recognised because the ramp is\n * authored in oklch and the border tiers are colour mixes — wrapping either in\n * `hsl()` yields an invalid colour that paints as nothing.\n */\nexport function themeColor(value: string): string {\n return /^(hsl|rgb|oklch|oklab|lch|lab|color|color-mix|#)/.test(value) ? value : `hsl(${value})`\n}\n\n/**\n * Map a theme to the full CSS-variable set (shadcn triples + canvas/sequences\n * aliases + canvas surface). Apply at runtime to scope a theme without loading\n * tokens.css: `Object.assign(el.style, themeToCssVars(darkTheme))`.\n */\nexport function themeToCssVars(theme: AgentAppTheme): Record<string, string> {\n return {\n '--background': theme.background,\n '--foreground': theme.foreground,\n '--card': theme.card,\n '--card-foreground': theme.cardForeground,\n '--popover': theme.popover,\n '--popover-foreground': theme.popoverForeground,\n '--primary': theme.primary,\n '--primary-foreground': theme.primaryForeground,\n '--secondary': theme.secondary,\n '--secondary-foreground': theme.secondaryForeground,\n '--muted': theme.muted,\n '--muted-foreground': theme.mutedForeground,\n '--accent': theme.accent,\n '--accent-foreground': theme.accentForeground,\n '--destructive': theme.destructive,\n '--destructive-foreground': theme.destructiveForeground,\n '--border': theme.border,\n '--input': theme.input,\n '--ring': theme.ring,\n '--success': theme.success,\n '--success-foreground': theme.successForeground,\n '--warning': theme.warning,\n '--warning-foreground': theme.warningForeground,\n // Falls back to the pairing the tinted surfaces used before this token\n // existed, so an unset value restores the previous look rather than an\n // unthemed one.\n '--warning-strong': theme.warningStrong ?? theme.warningForeground,\n '--bg-input': `hsl(${theme.card})`,\n '--text-primary': `hsl(${theme.foreground})`,\n '--text-secondary': `hsl(${theme.secondaryForeground})`,\n '--text-muted': `hsl(${theme.mutedForeground})`,\n '--text-danger': `hsl(${theme.destructive})`,\n '--border-default': `hsl(${theme.border})`,\n '--brand-primary': `hsl(${theme.primary})`,\n '--editor-selection-background': `hsl(${theme.primary})`,\n '--editor-selection-foreground': `hsl(${theme.background})`,\n '--canvas-backdrop': theme.canvasBackdrop,\n // Full strength is the safe default: an unset tier can under-draw an edge,\n // never erase one.\n '--border-soft': theme.borderSoft ?? `hsl(${theme.border})`,\n '--card-edge': theme.cardEdge ?? `hsl(${theme.border})`,\n }\n}\n"],"mappings":"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","names":[]}
|
|
@@ -353,7 +353,7 @@ var ShapesGlyph = glyph(
|
|
|
353
353
|
// src/design-canvas-react/components/icon-button.tsx
|
|
354
354
|
import { forwardRef } from "react";
|
|
355
355
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
356
|
-
var BTN_BASE = "items-center justify-center rounded border border-[var(--border-default)] text-[var(--text-secondary)] transition hover:text-[var(--text-primary)]
|
|
356
|
+
var BTN_BASE = "items-center justify-center rounded border border-[var(--border-default)] text-[var(--text-secondary)] transition hover:text-[var(--text-primary)] disabled:cursor-default disabled:opacity-40";
|
|
357
357
|
var BTN_ACTIVE_EXTRA = " border-[var(--brand-primary)] text-[var(--brand-primary)] hover:text-[var(--brand-primary)]";
|
|
358
358
|
var BTN = `flex h-7 w-7 ${BTN_BASE}`;
|
|
359
359
|
var BTN_ACTIVE = BTN + BTN_ACTIVE_EXTRA;
|
|
@@ -459,7 +459,7 @@ function PagesStrip({
|
|
|
459
459
|
"aria-label": `Page ${index + 1}: ${page.name}${isActive ? " (active)" : ""}`,
|
|
460
460
|
"aria-pressed": isActive,
|
|
461
461
|
onClick: () => onSelectPage(page.id),
|
|
462
|
-
className: "flex cursor-pointer flex-col items-center gap-1 rounded
|
|
462
|
+
className: "flex cursor-pointer flex-col items-center gap-1 rounded",
|
|
463
463
|
children: [
|
|
464
464
|
/* @__PURE__ */ jsx5(
|
|
465
465
|
"div",
|
|
@@ -521,7 +521,7 @@ function PagesStrip({
|
|
|
521
521
|
type: "button",
|
|
522
522
|
"aria-label": "Add page",
|
|
523
523
|
onClick: onAddPage,
|
|
524
|
-
className: "flex h-[72px] w-[80px] shrink-0 flex-col items-center justify-center gap-1 rounded border border-dashed border-[var(--border-default)] text-[var(--text-muted)] transition hover:border-[var(--brand-primary)] hover:text-[var(--brand-primary)]
|
|
524
|
+
className: "flex h-[72px] w-[80px] shrink-0 flex-col items-center justify-center gap-1 rounded border border-dashed border-[var(--border-default)] text-[var(--text-muted)] transition hover:border-[var(--brand-primary)] hover:text-[var(--brand-primary)]",
|
|
525
525
|
children: [
|
|
526
526
|
/* @__PURE__ */ jsx5(PlusGlyph, { className: "h-4 w-4" }),
|
|
527
527
|
/* @__PURE__ */ jsx5("span", { className: "text-[10px]", children: "Add page" })
|
|
@@ -847,7 +847,7 @@ function NumberInput({
|
|
|
847
847
|
if (event.key === "Enter") commit(event.target.value);
|
|
848
848
|
if (event.key === "Escape") setRaw(null);
|
|
849
849
|
},
|
|
850
|
-
className: `${className} rounded border border-[var(--border-default)] bg-[var(--bg-input)] px-1 py-0.5 text-center text-[12px] text-[var(--text-primary)]
|
|
850
|
+
className: `${className} rounded border border-[var(--border-default)] bg-[var(--bg-input)] px-1 py-0.5 text-center text-[12px] text-[var(--text-primary)] focus:border-[var(--brand-primary)]`
|
|
851
851
|
}
|
|
852
852
|
)
|
|
853
853
|
] });
|
|
@@ -877,7 +877,7 @@ function SelectControl({
|
|
|
877
877
|
"aria-haspopup": "listbox",
|
|
878
878
|
"aria-expanded": open,
|
|
879
879
|
onClick: () => setOpen((v) => !v),
|
|
880
|
-
className: `${buttonClassName} flex items-center justify-between gap-1 rounded border border-[var(--border-default)] bg-[var(--bg-input)] px-2 py-0.5 text-left text-[12px] text-[var(--text-primary)]
|
|
880
|
+
className: `${buttonClassName} flex items-center justify-between gap-1 rounded border border-[var(--border-default)] bg-[var(--bg-input)] px-2 py-0.5 text-left text-[12px] text-[var(--text-primary)] hover:border-[var(--brand-primary)] disabled:cursor-default disabled:opacity-40`,
|
|
881
881
|
children: [
|
|
882
882
|
/* @__PURE__ */ jsx7("span", { className: "truncate", children: current?.label ?? value }),
|
|
883
883
|
/* @__PURE__ */ jsx7("span", { className: "text-[8px] text-[var(--text-muted)]", children: "\u25BE" })
|
|
@@ -931,7 +931,7 @@ function FontPicker({
|
|
|
931
931
|
"aria-expanded": open,
|
|
932
932
|
"aria-label": "Font family",
|
|
933
933
|
onClick: () => setOpen((v) => !v),
|
|
934
|
-
className: "flex w-28 items-center justify-between gap-1 rounded border border-[var(--border-default)] bg-[var(--bg-input)] px-2 py-0.5 text-left text-[12px] text-[var(--text-primary)]
|
|
934
|
+
className: "flex w-28 items-center justify-between gap-1 rounded border border-[var(--border-default)] bg-[var(--bg-input)] px-2 py-0.5 text-left text-[12px] text-[var(--text-primary)] hover:border-[var(--brand-primary)] disabled:cursor-default disabled:opacity-40",
|
|
935
935
|
style: { fontFamily: value },
|
|
936
936
|
children: [
|
|
937
937
|
/* @__PURE__ */ jsx7("span", { className: "truncate", children: value }),
|
|
@@ -948,7 +948,7 @@ function FontPicker({
|
|
|
948
948
|
onChange: (event) => setQuery(event.target.value),
|
|
949
949
|
placeholder: "Search fonts",
|
|
950
950
|
"aria-label": "Search fonts",
|
|
951
|
-
className: "m-1 rounded border border-[var(--border-default)] bg-transparent px-2 py-1 text-[12px] text-[var(--text-primary)]
|
|
951
|
+
className: "m-1 rounded border border-[var(--border-default)] bg-transparent px-2 py-1 text-[12px] text-[var(--text-primary)] focus:border-[var(--brand-primary)]"
|
|
952
952
|
}
|
|
953
953
|
),
|
|
954
954
|
/* @__PURE__ */ jsx7("div", { role: "listbox", className: "max-h-60 overflow-y-auto py-1", children: filtered.length === 0 ? /* @__PURE__ */ jsx7("div", { className: "px-3 py-2 text-[11px] text-[var(--text-muted)]", children: "No matches" }) : filtered.map((family) => /* @__PURE__ */ jsx7(
|
|
@@ -1012,7 +1012,7 @@ function ColorSwatch({ label, value, onCommit, disabled }) {
|
|
|
1012
1012
|
"aria-label": `${label} hex value`,
|
|
1013
1013
|
value,
|
|
1014
1014
|
onChange: (event) => onCommit(event.target.value),
|
|
1015
|
-
className: "rounded border border-[var(--border-default)] bg-transparent px-2 py-1 text-[12px] text-[var(--text-primary)]
|
|
1015
|
+
className: "rounded border border-[var(--border-default)] bg-transparent px-2 py-1 text-[12px] text-[var(--text-primary)] focus:border-[var(--brand-primary)]"
|
|
1016
1016
|
}
|
|
1017
1017
|
)
|
|
1018
1018
|
] })
|
|
@@ -1216,7 +1216,7 @@ function SelectionControls({
|
|
|
1216
1216
|
value: slotInput,
|
|
1217
1217
|
onChange: (event) => setSlotInput(event.target.value),
|
|
1218
1218
|
placeholder: "slot-name",
|
|
1219
|
-
className: "rounded border border-[var(--border-default)] bg-transparent px-2 py-1 text-[12px] text-[var(--text-primary)]
|
|
1219
|
+
className: "rounded border border-[var(--border-default)] bg-transparent px-2 py-1 text-[12px] text-[var(--text-primary)] focus:border-[var(--brand-primary)]"
|
|
1220
1220
|
}
|
|
1221
1221
|
),
|
|
1222
1222
|
/* @__PURE__ */ jsxs5("div", { className: "flex gap-2", children: [
|
|
@@ -1363,7 +1363,7 @@ function ImageControls({ element, canWrite, onPatch }) {
|
|
|
1363
1363
|
onChange: (event) => setSwapUrl(event.target.value),
|
|
1364
1364
|
placeholder: "https://\u2026 image URL",
|
|
1365
1365
|
"aria-label": "New image URL",
|
|
1366
|
-
className: "rounded border border-[var(--border-default)] bg-transparent px-2 py-1 text-[12px] text-[var(--text-primary)]
|
|
1366
|
+
className: "rounded border border-[var(--border-default)] bg-transparent px-2 py-1 text-[12px] text-[var(--text-primary)] focus:border-[var(--brand-primary)]"
|
|
1367
1367
|
}
|
|
1368
1368
|
),
|
|
1369
1369
|
/* @__PURE__ */ jsxs5("div", { className: "flex gap-2", children: [
|
|
@@ -1418,7 +1418,7 @@ function PagePropsControls({ page, canWrite, onSetPageProps, onSetPageGuides, pa
|
|
|
1418
1418
|
value: page.name,
|
|
1419
1419
|
disabled: !canWrite,
|
|
1420
1420
|
onChange: (event) => onSetPageProps({ name: event.target.value }),
|
|
1421
|
-
className: "w-28 rounded border border-[var(--border-default)] bg-[var(--bg-input)] px-2 py-0.5 text-[12px] text-[var(--text-primary)]
|
|
1421
|
+
className: "w-28 rounded border border-[var(--border-default)] bg-[var(--bg-input)] px-2 py-0.5 text-[12px] text-[var(--text-primary)] focus:border-[var(--brand-primary)]"
|
|
1422
1422
|
}
|
|
1423
1423
|
),
|
|
1424
1424
|
SEP,
|
|
@@ -1450,7 +1450,7 @@ function PagePropsControls({ page, canWrite, onSetPageProps, onSetPageGuides, pa
|
|
|
1450
1450
|
if (event.key === "Enter") commitDimension("width", event.target.value);
|
|
1451
1451
|
if (event.key === "Escape") setCustomW(null);
|
|
1452
1452
|
},
|
|
1453
|
-
className: "w-16 rounded border border-[var(--border-default)] bg-[var(--bg-input)] px-1 py-0.5 text-center text-[12px] text-[var(--text-primary)]
|
|
1453
|
+
className: "w-16 rounded border border-[var(--border-default)] bg-[var(--bg-input)] px-1 py-0.5 text-center text-[12px] text-[var(--text-primary)] focus:border-[var(--brand-primary)]"
|
|
1454
1454
|
}
|
|
1455
1455
|
)
|
|
1456
1456
|
] }),
|
|
@@ -1470,7 +1470,7 @@ function PagePropsControls({ page, canWrite, onSetPageProps, onSetPageGuides, pa
|
|
|
1470
1470
|
if (event.key === "Enter") commitDimension("height", event.target.value);
|
|
1471
1471
|
if (event.key === "Escape") setCustomH(null);
|
|
1472
1472
|
},
|
|
1473
|
-
className: "w-16 rounded border border-[var(--border-default)] bg-[var(--bg-input)] px-1 py-0.5 text-center text-[12px] text-[var(--text-primary)]
|
|
1473
|
+
className: "w-16 rounded border border-[var(--border-default)] bg-[var(--bg-input)] px-1 py-0.5 text-center text-[12px] text-[var(--text-primary)] focus:border-[var(--brand-primary)]"
|
|
1474
1474
|
}
|
|
1475
1475
|
)
|
|
1476
1476
|
] }),
|
|
@@ -1571,7 +1571,7 @@ function ZoomControls({ zoom, onZoom, onFit, fitLabel = "Fit to screen" }) {
|
|
|
1571
1571
|
type: "button",
|
|
1572
1572
|
"aria-label": "Reset to 100%",
|
|
1573
1573
|
onClick: resetHundred,
|
|
1574
|
-
className: "rounded px-1.5 py-0.5 font-mono text-[11px] tabular-nums text-[var(--text-secondary)] transition hover:bg-[var(--border-default)] hover:text-[var(--text-primary)]
|
|
1574
|
+
className: "rounded px-1.5 py-0.5 font-mono text-[11px] tabular-nums text-[var(--text-secondary)] transition hover:bg-[var(--border-default)] hover:text-[var(--text-primary)]",
|
|
1575
1575
|
title: "Reset to 100%",
|
|
1576
1576
|
children: [
|
|
1577
1577
|
Math.round(zoom * 100),
|
|
@@ -2192,4 +2192,4 @@ export {
|
|
|
2192
2192
|
ExportControl,
|
|
2193
2193
|
DesignCanvas
|
|
2194
2194
|
};
|
|
2195
|
-
//# sourceMappingURL=chunk-
|
|
2195
|
+
//# sourceMappingURL=chunk-NC2V63EL.js.map
|