@tangle-network/agent-app 0.29.0 → 0.30.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/{DesignCanvasEditor-IB2FMBBD.js → DesignCanvasEditor-QQNAZRJQ.js} +3 -3
- package/dist/{chunk-Y2SZVW35.js → chunk-LVD37K5V.js} +41 -41
- package/dist/chunk-LVD37K5V.js.map +1 -0
- package/dist/{chunk-S5CAJX6O.js → chunk-WOVCWPFF.js} +2 -2
- package/dist/{chunk-N4ZFKQ5C.js → chunk-YYYXGLLQ.js} +2 -2
- package/dist/design-canvas-react/index.js +3 -3
- package/dist/design-canvas-react/lazy.js +1 -1
- package/dist/index.js +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/theme/tokens.css +50 -48
- package/dist/web-react/index.d.ts +6 -1
- package/dist/web-react/index.js +8 -14
- package/dist/web-react/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-Y2SZVW35.js.map +0 -1
- /package/dist/{DesignCanvasEditor-IB2FMBBD.js.map → DesignCanvasEditor-QQNAZRJQ.js.map} +0 -0
- /package/dist/{chunk-S5CAJX6O.js.map → chunk-WOVCWPFF.js.map} +0 -0
- /package/dist/{chunk-N4ZFKQ5C.js.map → chunk-YYYXGLLQ.js.map} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DesignCanvasEditor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YYYXGLLQ.js";
|
|
4
4
|
import "./chunk-YEWTVDDT.js";
|
|
5
5
|
import "./chunk-V5XZKHCL.js";
|
|
6
6
|
import "./chunk-XWJXZ6WE.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-LVD37K5V.js";
|
|
8
8
|
import "./chunk-M2EBUDZ7.js";
|
|
9
9
|
import "./chunk-HFC4BTWJ.js";
|
|
10
10
|
export {
|
|
11
11
|
DesignCanvasEditor
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=DesignCanvasEditor-
|
|
13
|
+
//# sourceMappingURL=DesignCanvasEditor-QQNAZRJQ.js.map
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
// src/theme/theme.ts
|
|
2
2
|
var lightTheme = {
|
|
3
3
|
background: "0 0% 100%",
|
|
4
|
-
foreground: "
|
|
5
|
-
card: "
|
|
6
|
-
cardForeground: "
|
|
4
|
+
foreground: "0 0% 5%",
|
|
5
|
+
card: "240 7% 97%",
|
|
6
|
+
cardForeground: "0 0% 5%",
|
|
7
7
|
popover: "0 0% 100%",
|
|
8
|
-
popoverForeground: "
|
|
9
|
-
primary: "
|
|
8
|
+
popoverForeground: "0 0% 5%",
|
|
9
|
+
primary: "245 62% 57%",
|
|
10
10
|
primaryForeground: "0 0% 100%",
|
|
11
|
-
secondary: "
|
|
12
|
-
secondaryForeground: "
|
|
13
|
-
muted: "
|
|
14
|
-
mutedForeground: "
|
|
15
|
-
accent: "
|
|
16
|
-
accentForeground: "
|
|
17
|
-
destructive: "0 72%
|
|
11
|
+
secondary: "240 6% 93%",
|
|
12
|
+
secondaryForeground: "0 0% 10%",
|
|
13
|
+
muted: "240 6% 93%",
|
|
14
|
+
mutedForeground: "240 5% 38%",
|
|
15
|
+
accent: "240 6% 93%",
|
|
16
|
+
accentForeground: "0 0% 10%",
|
|
17
|
+
destructive: "0 72% 41%",
|
|
18
18
|
destructiveForeground: "0 0% 100%",
|
|
19
|
-
border: "
|
|
20
|
-
input: "
|
|
21
|
-
ring: "
|
|
22
|
-
success: "
|
|
19
|
+
border: "240 6% 89%",
|
|
20
|
+
input: "240 6% 89%",
|
|
21
|
+
ring: "245 62% 57%",
|
|
22
|
+
success: "160 84% 26%",
|
|
23
23
|
successForeground: "0 0% 100%",
|
|
24
|
-
warning: "
|
|
24
|
+
warning: "41 96% 38%",
|
|
25
25
|
warningForeground: "38 92% 12%",
|
|
26
|
-
canvasBackdrop: "hsl(
|
|
26
|
+
canvasBackdrop: "hsl(240 7% 90%)",
|
|
27
27
|
canvasRender: {
|
|
28
28
|
grid: "#c0c0c0",
|
|
29
29
|
snapGrid: "#a0a0a0",
|
|
@@ -39,30 +39,30 @@ var lightTheme = {
|
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
var darkTheme = {
|
|
42
|
-
background: "
|
|
43
|
-
foreground: "
|
|
44
|
-
card: "
|
|
45
|
-
cardForeground: "
|
|
46
|
-
popover: "
|
|
47
|
-
popoverForeground: "
|
|
48
|
-
primary: "
|
|
49
|
-
primaryForeground: "
|
|
50
|
-
secondary: "
|
|
51
|
-
secondaryForeground: "
|
|
52
|
-
muted: "
|
|
53
|
-
mutedForeground: "
|
|
54
|
-
accent: "
|
|
55
|
-
accentForeground: "
|
|
56
|
-
destructive: "
|
|
42
|
+
background: "240 8% 5%",
|
|
43
|
+
foreground: "240 6% 93%",
|
|
44
|
+
card: "240 5% 8%",
|
|
45
|
+
cardForeground: "240 6% 93%",
|
|
46
|
+
popover: "240 4% 13%",
|
|
47
|
+
popoverForeground: "240 6% 93%",
|
|
48
|
+
primary: "239 84% 74%",
|
|
49
|
+
primaryForeground: "0 0% 100%",
|
|
50
|
+
secondary: "240 5% 11%",
|
|
51
|
+
secondaryForeground: "240 6% 93%",
|
|
52
|
+
muted: "240 5% 11%",
|
|
53
|
+
mutedForeground: "240 4% 62%",
|
|
54
|
+
accent: "240 5% 11%",
|
|
55
|
+
accentForeground: "240 6% 93%",
|
|
56
|
+
destructive: "348 90% 68%",
|
|
57
57
|
destructiveForeground: "0 0% 12%",
|
|
58
|
-
border: "
|
|
59
|
-
input: "
|
|
60
|
-
ring: "
|
|
61
|
-
success: "
|
|
62
|
-
successForeground: "
|
|
63
|
-
warning: "
|
|
58
|
+
border: "240 3% 13%",
|
|
59
|
+
input: "240 5% 11%",
|
|
60
|
+
ring: "239 84% 74%",
|
|
61
|
+
success: "160 70% 52%",
|
|
62
|
+
successForeground: "160 84% 10%",
|
|
63
|
+
warning: "40 94% 56%",
|
|
64
64
|
warningForeground: "38 92% 12%",
|
|
65
|
-
canvasBackdrop: "hsl(
|
|
65
|
+
canvasBackdrop: "hsl(240 8% 5%)",
|
|
66
66
|
canvasRender: {
|
|
67
67
|
grid: "#3a3a3a",
|
|
68
68
|
snapGrid: "#5a5a5a",
|
|
@@ -122,4 +122,4 @@ export {
|
|
|
122
122
|
themeColor,
|
|
123
123
|
themeToCssVars
|
|
124
124
|
};
|
|
125
|
-
//# sourceMappingURL=chunk-
|
|
125
|
+
//# sourceMappingURL=chunk-LVD37K5V.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\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 /** Full CSS color (not a triple) — the canvas/scene backdrop. */\n canvasBackdrop: 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\nexport const lightTheme: AgentAppTheme = {\n background: '0 0% 100%',\n foreground: '0 0% 5%',\n card: '240 7% 97%',\n cardForeground: '0 0% 5%',\n popover: '0 0% 100%',\n popoverForeground: '0 0% 5%',\n primary: '245 62% 57%',\n primaryForeground: '0 0% 100%',\n secondary: '240 6% 93%',\n secondaryForeground: '0 0% 10%',\n muted: '240 6% 93%',\n mutedForeground: '240 5% 38%',\n accent: '240 6% 93%',\n accentForeground: '0 0% 10%',\n destructive: '0 72% 41%',\n destructiveForeground: '0 0% 100%',\n border: '240 6% 89%',\n input: '240 6% 89%',\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 canvasBackdrop: 'hsl(240 7% 90%)',\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\nexport const darkTheme: AgentAppTheme = {\n background: '240 8% 5%',\n foreground: '240 6% 93%',\n card: '240 5% 8%',\n cardForeground: '240 6% 93%',\n popover: '240 4% 13%',\n popoverForeground: '240 6% 93%',\n primary: '239 84% 74%',\n primaryForeground: '0 0% 100%',\n secondary: '240 5% 11%',\n secondaryForeground: '240 6% 93%',\n muted: '240 5% 11%',\n mutedForeground: '240 4% 62%',\n accent: '240 5% 11%',\n accentForeground: '240 6% 93%',\n destructive: '348 90% 68%',\n destructiveForeground: '0 0% 12%',\n border: '240 3% 13%',\n input: '240 5% 11%',\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 canvasBackdrop: 'hsl(240 8% 5%)',\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/** Wrap a channel triple in `hsl()`; pass through values already in a color form. */\nexport function themeColor(value: string): string {\n return value.startsWith('hsl') || value.startsWith('#') || value.startsWith('rgb')\n ? value\n : `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 '--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 '--canvas-backdrop': theme.canvasBackdrop,\n }\n}\n"],"mappings":"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","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/design-canvas-react/lazy.tsx
|
|
2
2
|
import { lazy } from "react";
|
|
3
3
|
var DesignCanvasLazy = lazy(
|
|
4
|
-
() => import("./DesignCanvasEditor-
|
|
4
|
+
() => import("./DesignCanvasEditor-QQNAZRJQ.js").then((m) => ({ default: m.DesignCanvasEditor }))
|
|
5
5
|
);
|
|
6
6
|
var DesignCanvasChromeLazy = lazy(
|
|
7
7
|
() => import("./DesignCanvas-AOIVN3SJ.js").then((m) => ({ default: m.DesignCanvas }))
|
|
@@ -11,4 +11,4 @@ export {
|
|
|
11
11
|
DesignCanvasLazy,
|
|
12
12
|
DesignCanvasChromeLazy
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=chunk-
|
|
14
|
+
//# sourceMappingURL=chunk-WOVCWPFF.js.map
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./chunk-XWJXZ6WE.js";
|
|
25
25
|
import {
|
|
26
26
|
lightTheme
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-LVD37K5V.js";
|
|
28
28
|
import {
|
|
29
29
|
SCENE_SCHEMA_VERSION,
|
|
30
30
|
boundsIntersect,
|
|
@@ -1772,4 +1772,4 @@ export {
|
|
|
1772
1772
|
Workspace,
|
|
1773
1773
|
DesignCanvasEditor
|
|
1774
1774
|
};
|
|
1775
|
-
//# sourceMappingURL=chunk-
|
|
1775
|
+
//# sourceMappingURL=chunk-YYYXGLLQ.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
downloadDataUrl,
|
|
12
12
|
exportDocumentJson,
|
|
13
13
|
exportPageDataUrl
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-YYYXGLLQ.js";
|
|
15
15
|
import {
|
|
16
16
|
BTN,
|
|
17
17
|
BTN_ACTIVE,
|
|
@@ -85,8 +85,8 @@ import {
|
|
|
85
85
|
import {
|
|
86
86
|
DesignCanvasChromeLazy,
|
|
87
87
|
DesignCanvasLazy
|
|
88
|
-
} from "../chunk-
|
|
89
|
-
import "../chunk-
|
|
88
|
+
} from "../chunk-WOVCWPFF.js";
|
|
89
|
+
import "../chunk-LVD37K5V.js";
|
|
90
90
|
import {
|
|
91
91
|
assertSceneMediaSrc,
|
|
92
92
|
bleedAwareExportBounds,
|
package/dist/index.js
CHANGED
package/dist/theme/index.js
CHANGED
package/dist/theme/tokens.css
CHANGED
|
@@ -18,36 +18,36 @@
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
:root {
|
|
21
|
-
/* shadcn channel triples — "H S% L%", consumed as hsl(var(--name))
|
|
21
|
+
/* shadcn channel triples — "H S% L%", consumed as hsl(var(--name)).
|
|
22
|
+
Values mirror @tangle-network/brand (Tangle Quiet) so agent-app surfaces
|
|
23
|
+
match sandbox-ui in the same app. agent-app keeps its own light-default /
|
|
24
|
+
[data-theme="dark"] scope model (brand is dark-default), so /theme stays
|
|
25
|
+
dependency-free — only the values are shared, not the cascade. */
|
|
22
26
|
--background: 0 0% 100%;
|
|
23
|
-
--foreground:
|
|
24
|
-
--card:
|
|
25
|
-
--card-foreground:
|
|
27
|
+
--foreground: 0 0% 5%;
|
|
28
|
+
--card: 240 7% 97%;
|
|
29
|
+
--card-foreground: 0 0% 5%;
|
|
26
30
|
--popover: 0 0% 100%;
|
|
27
|
-
--popover-foreground:
|
|
28
|
-
--primary:
|
|
31
|
+
--popover-foreground: 0 0% 5%;
|
|
32
|
+
--primary: 245 62% 57%;
|
|
29
33
|
--primary-foreground: 0 0% 100%;
|
|
30
|
-
--secondary:
|
|
31
|
-
--secondary-foreground:
|
|
32
|
-
--muted:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
--
|
|
36
|
-
--
|
|
37
|
-
--accent-foreground: 222 47% 11%;
|
|
38
|
-
--destructive: 0 72% 45%;
|
|
34
|
+
--secondary: 240 6% 93%;
|
|
35
|
+
--secondary-foreground: 0 0% 10%;
|
|
36
|
+
--muted: 240 6% 93%;
|
|
37
|
+
--muted-foreground: 240 5% 38%;
|
|
38
|
+
--accent: 240 6% 93%;
|
|
39
|
+
--accent-foreground: 0 0% 10%;
|
|
40
|
+
--destructive: 0 72% 41%;
|
|
39
41
|
--destructive-foreground: 0 0% 100%;
|
|
40
|
-
--border:
|
|
41
|
-
--input:
|
|
42
|
-
--ring:
|
|
43
|
-
/*
|
|
44
|
-
WCAG AA
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
chips, dots, and solid buttons via the Tailwind preset's success/warning). */
|
|
48
|
-
--success: 142 72% 29%;
|
|
42
|
+
--border: 240 6% 89%;
|
|
43
|
+
--input: 240 6% 89%;
|
|
44
|
+
--ring: 245 62% 57%;
|
|
45
|
+
/* status colors — brand hues (teal/gold/red), but lightness kept dark enough
|
|
46
|
+
to clear WCAG AA when used AS TEXT on tinted chips. Brand's own status
|
|
47
|
+
accents are dot/surface colors and are not text-contrast-tuned. */
|
|
48
|
+
--success: 160 84% 26%;
|
|
49
49
|
--success-foreground: 0 0% 100%;
|
|
50
|
-
--warning:
|
|
50
|
+
--warning: 41 96% 38%;
|
|
51
51
|
--warning-foreground: 38 92% 12%;
|
|
52
52
|
|
|
53
53
|
/* canvas/sequences aliases — full colors, resolve to the triples above */
|
|
@@ -62,34 +62,36 @@
|
|
|
62
62
|
|
|
63
63
|
/* canvas-only surfaces (not part of the shadcn vocabulary). Name matches the
|
|
64
64
|
`--canvas-backdrop` the design-canvas Workspace references (with a #1a1a1a fallback). */
|
|
65
|
-
--canvas-backdrop: hsl(
|
|
65
|
+
--canvas-backdrop: hsl(240 7% 90%);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
[data-theme='dark'],
|
|
69
69
|
.dark {
|
|
70
|
-
--background:
|
|
71
|
-
--foreground:
|
|
72
|
-
--card:
|
|
73
|
-
--card-foreground:
|
|
74
|
-
--popover:
|
|
75
|
-
--popover-foreground:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
--
|
|
79
|
-
--
|
|
80
|
-
--
|
|
81
|
-
--
|
|
82
|
-
--
|
|
83
|
-
--
|
|
84
|
-
--
|
|
70
|
+
--background: 240 8% 5%;
|
|
71
|
+
--foreground: 240 6% 93%;
|
|
72
|
+
--card: 240 5% 8%;
|
|
73
|
+
--card-foreground: 240 6% 93%;
|
|
74
|
+
--popover: 240 4% 13%;
|
|
75
|
+
--popover-foreground: 240 6% 93%;
|
|
76
|
+
/* 74% L (brand's #818CF8 intent) so primary clears AA as TEXT on a primary/10
|
|
77
|
+
tint in dark; the solid primary button pairs it with a light foreground. */
|
|
78
|
+
--primary: 239 84% 74%;
|
|
79
|
+
--primary-foreground: 0 0% 100%;
|
|
80
|
+
--secondary: 240 5% 11%;
|
|
81
|
+
--secondary-foreground: 240 6% 93%;
|
|
82
|
+
--muted: 240 5% 11%;
|
|
83
|
+
--muted-foreground: 240 4% 62%;
|
|
84
|
+
--accent: 240 5% 11%;
|
|
85
|
+
--accent-foreground: 240 6% 93%;
|
|
86
|
+
--destructive: 348 90% 68%;
|
|
85
87
|
--destructive-foreground: 0 0% 12%;
|
|
86
|
-
--border:
|
|
87
|
-
--input:
|
|
88
|
-
--ring:
|
|
89
|
-
--success:
|
|
90
|
-
--success-foreground:
|
|
91
|
-
--warning:
|
|
88
|
+
--border: 240 3% 13%;
|
|
89
|
+
--input: 240 5% 11%;
|
|
90
|
+
--ring: 239 84% 74%;
|
|
91
|
+
--success: 160 70% 52%;
|
|
92
|
+
--success-foreground: 160 84% 10%;
|
|
93
|
+
--warning: 40 94% 56%;
|
|
92
94
|
--warning-foreground: 38 92% 12%;
|
|
93
95
|
|
|
94
|
-
--canvas-backdrop: hsl(
|
|
96
|
+
--canvas-backdrop: hsl(240 8% 5%);
|
|
95
97
|
}
|
|
@@ -260,13 +260,18 @@ interface SeatPaywallProps {
|
|
|
260
260
|
tagline?: string;
|
|
261
261
|
/** CTA label. Default "Unlock {product}". */
|
|
262
262
|
ctaLabel?: string;
|
|
263
|
+
/** Value-prop bullets. Default = product/usage-derived only; pass your own to
|
|
264
|
+
* supply product-specific value props (the shell bakes no GTM copy). */
|
|
265
|
+
benefits?: ReactNode[];
|
|
266
|
+
/** Optional fine print under the CTA (e.g. "Cancel anytime."). Omitted by default. */
|
|
267
|
+
footnote?: ReactNode;
|
|
263
268
|
}
|
|
264
269
|
/**
|
|
265
270
|
* Centered card paywall. The price line reads
|
|
266
271
|
* "$100/mo · includes $50/mo of AI usage" so the included allowance anchors the
|
|
267
272
|
* value without ever exposing the ratio.
|
|
268
273
|
*/
|
|
269
|
-
declare function SeatPaywall({ product, onCheckout, priceUsd, includedUsageUsd, tagline, ctaLabel, }: SeatPaywallProps): ReactNode;
|
|
274
|
+
declare function SeatPaywall({ product, onCheckout, priceUsd, includedUsageUsd, tagline, ctaLabel, benefits, footnote, }: SeatPaywallProps): ReactNode;
|
|
270
275
|
|
|
271
276
|
/**
|
|
272
277
|
* Keyboard + pointer model for a trigger-and-popover pair, dependency-free.
|
package/dist/web-react/index.js
CHANGED
|
@@ -895,7 +895,9 @@ function SeatPaywall({
|
|
|
895
895
|
priceUsd = 100,
|
|
896
896
|
includedUsageUsd = 50,
|
|
897
897
|
tagline,
|
|
898
|
-
ctaLabel
|
|
898
|
+
ctaLabel,
|
|
899
|
+
benefits,
|
|
900
|
+
footnote
|
|
899
901
|
}) {
|
|
900
902
|
const { pending, run } = usePending();
|
|
901
903
|
return /* @__PURE__ */ jsx4("div", { className: "flex min-h-[60vh] w-full items-center justify-center p-6", children: /* @__PURE__ */ jsxs4("div", { className: "w-full max-w-md rounded-2xl border border-border bg-card p-8 shadow-sm", children: [
|
|
@@ -917,18 +919,10 @@ function SeatPaywall({
|
|
|
917
919
|
includedUsageUsd,
|
|
918
920
|
"/mo of AI usage"
|
|
919
921
|
] }),
|
|
920
|
-
/* @__PURE__ */
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
] }),
|
|
925
|
-
/* @__PURE__ */ jsxs4(Benefit, { children: [
|
|
926
|
-
"$",
|
|
927
|
-
includedUsageUsd,
|
|
928
|
-
"/mo of AI usage included, every month"
|
|
929
|
-
] }),
|
|
930
|
-
/* @__PURE__ */ jsx4(Benefit, { children: "One Tangle wallet across every product you run" })
|
|
931
|
-
] }),
|
|
922
|
+
/* @__PURE__ */ jsx4("ul", { className: "mt-6 space-y-2.5", children: (benefits ?? [
|
|
923
|
+
`Full access to ${product}`,
|
|
924
|
+
`$${includedUsageUsd}/mo of AI usage included, every month`
|
|
925
|
+
]).map((benefit, i) => /* @__PURE__ */ jsx4(Benefit, { children: benefit }, i)) }),
|
|
932
926
|
/* @__PURE__ */ jsx4(
|
|
933
927
|
"button",
|
|
934
928
|
{
|
|
@@ -939,7 +933,7 @@ function SeatPaywall({
|
|
|
939
933
|
children: pending ? "Opening checkout\u2026" : ctaLabel ?? `Unlock ${product}`
|
|
940
934
|
}
|
|
941
935
|
),
|
|
942
|
-
/* @__PURE__ */ jsx4("p", { className: "mt-3 text-center text-xs text-muted-foreground/70", children:
|
|
936
|
+
footnote && /* @__PURE__ */ jsx4("p", { className: "mt-3 text-center text-xs text-muted-foreground/70", children: footnote })
|
|
943
937
|
] }) });
|
|
944
938
|
}
|
|
945
939
|
|