@syntrologie/runtime-sdk 2.4.1 → 2.6.0-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/CAPABILITIES.md +66 -1
  2. package/dist/SmartCanvasApp.d.ts +5 -3
  3. package/dist/actions/executors/index.d.ts +1 -2
  4. package/dist/actions/index.d.ts +2 -2
  5. package/dist/actions/schema.d.ts +19111 -20709
  6. package/dist/actions/schema.js +5 -2
  7. package/dist/actions/types.d.ts +45 -48
  8. package/dist/anchor/AnchorResolver.d.ts +18 -0
  9. package/dist/anchor/index.d.ts +2 -0
  10. package/dist/api.d.ts +3 -8
  11. package/dist/apps/examples/gamification-app.example.d.ts +8 -8
  12. package/dist/{chunk-4NYS7GAW.js → chunk-BU4Z6PD7.js} +45 -7
  13. package/dist/chunk-BU4Z6PD7.js.map +7 -0
  14. package/dist/{chunk-QGWATS3Z.js → chunk-Q4WGXNKC.js} +2775 -1052
  15. package/dist/chunk-Q4WGXNKC.js.map +7 -0
  16. package/dist/{chunk-OGTCFYR3.js → chunk-R5DNAIRI.js} +45 -34
  17. package/dist/chunk-R5DNAIRI.js.map +7 -0
  18. package/dist/chunk-XDYJ64IN.js +178 -0
  19. package/dist/chunk-XDYJ64IN.js.map +7 -0
  20. package/dist/components/ShadowCanvasOverlay.d.ts +2 -20
  21. package/dist/components/TileIcon.d.ts +14 -0
  22. package/dist/config/schema.d.ts +5529 -3620
  23. package/dist/config/schema.js +21 -61
  24. package/dist/config/schema.js.map +3 -3
  25. package/dist/context/schema.d.ts +16 -16
  26. package/dist/decisions/schema.d.ts +357 -2789
  27. package/dist/decisions/schema.js +7 -1
  28. package/dist/decisions/types.d.ts +24 -2
  29. package/dist/events/registerConfigPredicates.d.ts +7 -10
  30. package/dist/events/schema.d.ts +12 -12
  31. package/dist/experiments/adapters/growthbook.d.ts +2 -0
  32. package/dist/experiments/types.d.ts +7 -0
  33. package/dist/hooks/useShadowCanvasConfig.d.ts +6 -4
  34. package/dist/index.d.ts +1 -0
  35. package/dist/index.js +154 -186
  36. package/dist/index.js.map +3 -3
  37. package/dist/overlays/schema.d.ts +70 -70
  38. package/dist/react.js +4 -3
  39. package/dist/react.js.map +1 -1
  40. package/dist/runtime.d.ts +3 -0
  41. package/dist/smart-canvas.esm.js +123 -84
  42. package/dist/smart-canvas.esm.js.map +4 -4
  43. package/dist/smart-canvas.js +3271 -1210
  44. package/dist/smart-canvas.js.map +4 -4
  45. package/dist/smart-canvas.min.js +123 -84
  46. package/dist/smart-canvas.min.js.map +4 -4
  47. package/dist/surfaces/types.d.ts +2 -1
  48. package/dist/theme/ThemeProvider.d.ts +11 -16
  49. package/dist/theme/defaultTheme.d.ts +6 -1
  50. package/dist/theme/index.d.ts +3 -4
  51. package/dist/theme/types.d.ts +11 -0
  52. package/dist/version.d.ts +1 -1
  53. package/dist/widgets/WidgetRegistry.d.ts +1 -0
  54. package/package.json +9 -8
  55. package/schema/canvas-config.schema.json +10583 -1049
  56. package/scripts/validate-config.mjs +180 -0
  57. package/dist/actions/executors/tour.d.ts +0 -18
  58. package/dist/chunk-4NYS7GAW.js.map +0 -7
  59. package/dist/chunk-OGTCFYR3.js.map +0 -7
  60. package/dist/chunk-QGWATS3Z.js.map +0 -7
  61. package/dist/hooks/useHostPatches.d.ts +0 -9
  62. package/dist/theme/extractHostTheme.d.ts +0 -14
@@ -1,10 +1,19 @@
1
1
  import {
2
- ActivationConfigZ
3
- } from "./chunk-4NYS7GAW.js";
2
+ NotificationDeepLinkZ
3
+ } from "./chunk-XDYJ64IN.js";
4
+ import {
5
+ TriggerWhenZ
6
+ } from "./chunk-BU4Z6PD7.js";
4
7
 
5
8
  // src/actions/schema.ts
6
9
  import { z } from "zod";
7
- var ActionActivationZ = { activation: ActivationConfigZ.optional() };
10
+ var ActionTriggerZ = {
11
+ triggerWhen: TriggerWhenZ
12
+ };
13
+ var AnchorIdZ = z.object({
14
+ selector: z.string(),
15
+ route: z.union([z.string(), z.array(z.string())])
16
+ }).strict();
8
17
  var HighlightStyleZ = z.object({
9
18
  color: z.string().optional(),
10
19
  scrimOpacity: z.number().min(0).max(1).optional(),
@@ -52,76 +61,77 @@ var TourStepForSchemaZ = z.object({
52
61
  action: z.any(),
53
62
  route: z.string().optional(),
54
63
  onAction: z.record(z.string()).optional()
55
- }).strict();
64
+ }).passthrough();
56
65
  var ScrollBehaviorZ = z.enum(["auto", "smooth", "instant"]);
57
66
  var ScrollLogicalPositionZ = z.enum(["start", "center", "end", "nearest"]);
58
67
  var SetTextZ = z.object({
59
68
  kind: z.literal("content:setText"),
60
- anchorId: z.string(),
69
+ anchorId: AnchorIdZ,
61
70
  text: z.string(),
62
71
  label: z.string().optional()
63
- }).extend(ActionActivationZ).strict();
72
+ }).extend(ActionTriggerZ).strict();
64
73
  var SetAttrZ = z.object({
65
74
  kind: z.literal("content:setAttr"),
66
- anchorId: z.string(),
75
+ anchorId: AnchorIdZ,
67
76
  attr: z.string(),
68
77
  value: z.string(),
69
78
  label: z.string().optional()
70
- }).extend(ActionActivationZ).strict();
79
+ }).extend(ActionTriggerZ).strict();
71
80
  var AddClassZ = z.object({
72
81
  kind: z.literal("content:addClass"),
73
- anchorId: z.string(),
82
+ anchorId: AnchorIdZ,
74
83
  className: z.string(),
75
84
  label: z.string().optional()
76
- }).extend(ActionActivationZ).strict();
85
+ }).extend(ActionTriggerZ).strict();
77
86
  var RemoveClassZ = z.object({
78
87
  kind: z.literal("content:removeClass"),
79
- anchorId: z.string(),
88
+ anchorId: AnchorIdZ,
80
89
  className: z.string(),
81
90
  label: z.string().optional()
82
- }).extend(ActionActivationZ).strict();
91
+ }).extend(ActionTriggerZ).strict();
83
92
  var SetStyleZ = z.object({
84
93
  kind: z.literal("content:setStyle"),
85
- anchorId: z.string(),
94
+ anchorId: AnchorIdZ,
86
95
  styles: z.record(z.string()),
87
96
  label: z.string().optional()
88
- }).extend(ActionActivationZ).strict();
97
+ }).extend(ActionTriggerZ).strict();
89
98
  var InsertHtmlZ = z.object({
90
99
  kind: z.literal("content:insertHtml"),
91
- anchorId: z.string(),
100
+ anchorId: AnchorIdZ,
92
101
  html: z.string(),
93
102
  position: InsertPositionZ,
103
+ deepLink: NotificationDeepLinkZ.optional(),
94
104
  label: z.string().optional()
95
- }).extend(ActionActivationZ).strict();
105
+ }).extend(ActionTriggerZ).strict();
96
106
  var HighlightZ = z.object({
97
107
  kind: z.literal("overlays:highlight"),
98
- anchorId: z.string(),
108
+ anchorId: AnchorIdZ,
99
109
  style: HighlightStyleZ.optional(),
100
110
  duration: z.number().optional(),
101
111
  label: z.string().optional()
102
- }).extend(ActionActivationZ).strict();
112
+ }).extend(ActionTriggerZ).strict();
103
113
  var PulseZ = z.object({
104
114
  kind: z.literal("overlays:pulse"),
105
- anchorId: z.string(),
115
+ anchorId: AnchorIdZ,
106
116
  duration: z.number().optional(),
107
117
  label: z.string().optional()
108
- }).extend(ActionActivationZ).strict();
118
+ }).extend(ActionTriggerZ).strict();
109
119
  var BadgeZ = z.object({
110
120
  kind: z.literal("overlays:badge"),
111
- anchorId: z.string(),
121
+ anchorId: AnchorIdZ,
112
122
  content: z.string(),
113
123
  position: BadgePositionZ.optional(),
114
124
  label: z.string().optional()
115
- }).extend(ActionActivationZ).strict();
125
+ }).extend(ActionTriggerZ).strict();
116
126
  var TooltipZ = z.object({
117
127
  kind: z.literal("overlays:tooltip"),
118
- anchorId: z.string(),
128
+ anchorId: AnchorIdZ,
119
129
  content: TooltipContentZ,
120
130
  trigger: TooltipTriggerZ.optional(),
121
131
  placement: PlacementZ.optional(),
122
132
  waitFor: z.string().optional(),
123
133
  label: z.string().optional()
124
- }).extend(ActionActivationZ).strict();
134
+ }).extend(ActionTriggerZ).strict();
125
135
  var ModalZ = z.object({
126
136
  kind: z.literal("overlays:modal"),
127
137
  content: ModalContentZ,
@@ -138,44 +148,44 @@ var ModalZ = z.object({
138
148
  ctaButtons: z.array(CtaButtonZ).optional(),
139
149
  waitFor: z.string().optional(),
140
150
  label: z.string().optional()
141
- }).extend(ActionActivationZ).strict();
151
+ }).extend(ActionTriggerZ).strict();
142
152
  var ScrollToZ = z.object({
143
153
  kind: z.literal("navigation:scrollTo"),
144
- anchorId: z.string(),
154
+ anchorId: AnchorIdZ,
145
155
  behavior: ScrollBehaviorZ.optional(),
146
156
  block: ScrollLogicalPositionZ.optional(),
147
157
  inline: ScrollLogicalPositionZ.optional(),
148
158
  label: z.string().optional()
149
- }).extend(ActionActivationZ).strict();
159
+ }).extend(ActionTriggerZ).strict();
150
160
  var NavigateZ = z.object({
151
161
  kind: z.literal("navigation:navigate"),
152
162
  url: z.string(),
153
163
  target: z.enum(["_self", "_blank"]).optional(),
154
164
  label: z.string().optional()
155
- }).extend(ActionActivationZ).strict();
165
+ }).extend(ActionTriggerZ).strict();
156
166
  var MountWidgetZ = z.object({
157
167
  kind: z.literal("core:mountWidget"),
158
168
  slot: z.string(),
159
169
  widget: WidgetConfigZ,
160
170
  label: z.string().optional()
161
- }).extend(ActionActivationZ).strict();
171
+ }).extend(ActionTriggerZ).strict();
162
172
  var WaitZ = z.object({
163
173
  kind: z.literal("core:wait"),
164
174
  durationMs: z.number().min(0).optional(),
165
175
  event: z.string().optional(),
166
176
  label: z.string().optional()
167
- }).extend(ActionActivationZ).strict();
177
+ }).extend(ActionTriggerZ).strict();
168
178
  var SequenceZ = z.object({
169
179
  kind: z.literal("core:sequence"),
170
180
  actions: z.array(z.any()),
171
181
  label: z.string().optional()
172
- }).extend(ActionActivationZ).strict();
182
+ }).extend(ActionTriggerZ).strict();
173
183
  var ParallelZ = z.object({
174
184
  kind: z.literal("core:parallel"),
175
185
  actions: z.array(z.any()),
176
186
  waitFor: z.enum(["all", "any"]).optional(),
177
187
  label: z.string().optional()
178
- }).extend(ActionActivationZ).strict();
188
+ }).extend(ActionTriggerZ).strict();
179
189
  var TourZ = z.object({
180
190
  kind: z.literal("core:tour"),
181
191
  tourId: z.string(),
@@ -183,7 +193,7 @@ var TourZ = z.object({
183
193
  startStep: z.string().optional(),
184
194
  autoStart: z.boolean().optional(),
185
195
  label: z.string().optional()
186
- }).extend(ActionActivationZ).strict();
196
+ }).extend(ActionTriggerZ).passthrough();
187
197
  var coreActionStepSchemas = [
188
198
  { defName: "setText", schema: SetTextZ },
189
199
  { defName: "setAttr", schema: SetAttrZ },
@@ -206,6 +216,7 @@ var coreActionStepSchemas = [
206
216
  ];
207
217
 
208
218
  export {
219
+ AnchorIdZ,
209
220
  HighlightStyleZ,
210
221
  BadgePositionZ,
211
222
  PlacementZ,
@@ -238,4 +249,4 @@ export {
238
249
  TourZ,
239
250
  coreActionStepSchemas
240
251
  };
241
- //# sourceMappingURL=chunk-OGTCFYR3.js.map
252
+ //# sourceMappingURL=chunk-R5DNAIRI.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/actions/schema.ts"],
4
+ "sourcesContent": ["/**\n * Core Action Zod Schemas\n *\n * Single source of truth for the shape of all 18 core action types.\n * These schemas are converted to JSON Schema during build and merged\n * into the unified canvas-config.schema.json.\n *\n * Design decisions:\n * - `.strict()` on most objects \u2192 `additionalProperties: false` in JSON Schema\n * - Tour/TourStep use `.passthrough()` to allow adaptive-specific extensions (e.g. `workflow`)\n * - Matches `types.ts` exactly (fixes all drift from the old manual JSON defs)\n * - Recursive ActionStep references use `z.any()` as placeholder; the generator\n * replaces `{}` with `{ \"$ref\": \"#/$defs/actionStep\" }` post-conversion\n */\n\nimport { z } from 'zod';\nimport { NotificationDeepLinkZ } from '../config/schema';\nimport { TriggerWhenZ } from '../decisions/schema';\n\n// ============================================================================\n// Shared Sub-Types\n// ============================================================================\n\n/**\n * Conditional execution for actions.\n *\n * Actions use `triggerWhen` (DecisionStrategy) exclusively.\n * NOTE: `activation` (with routes/strategy) is for TILES only \u2014 it is evaluated\n * by `runtime.filterTiles()` in useShadowCanvasConfig but is NEVER checked by\n * ActionEngine. Do not add `activation` here; use `triggerWhen` with a\n * `page_url` condition instead.\n */\nconst ActionTriggerZ = {\n triggerWhen: TriggerWhenZ,\n};\n\n/** Route-scoped anchor identifier */\nconst AnchorIdZ = z\n .object({\n selector: z.string(),\n route: z.union([z.string(), z.array(z.string())]),\n })\n .strict();\n\n/** Highlight style configuration */\nconst HighlightStyleZ = z\n .object({\n color: z.string().optional(),\n scrimOpacity: z.number().min(0).max(1).optional(),\n paddingPx: z.number().optional(),\n radiusPx: z.number().optional(),\n })\n .strict();\n\n/** Badge position relative to anchor */\nconst BadgePositionZ = z.enum(['top-left', 'top-right', 'bottom-left', 'bottom-right']);\n\n/**\n * Floating-ui Placement \u2014 all 12 values.\n * Matches `@floating-ui/dom` `Placement` type.\n */\nconst PlacementZ = z.enum([\n 'top',\n 'top-start',\n 'top-end',\n 'bottom',\n 'bottom-start',\n 'bottom-end',\n 'left',\n 'left-start',\n 'left-end',\n 'right',\n 'right-start',\n 'right-end',\n]);\n\n/** CTA button configuration for tooltips/modals */\nconst CtaButtonZ = z\n .object({\n label: z.string(),\n actionId: z.string(),\n primary: z.boolean().optional(),\n })\n .strict();\n\n/**\n * Tooltip content (schema-safe version).\n * Omits `cta` (legacy field with recursive ActionStep; never in JSON schema).\n */\nconst TooltipContentZ = z\n .object({\n title: z.string().optional(),\n body: z.string(),\n ctaButtons: z.array(CtaButtonZ).optional(),\n })\n .strict();\n\n/** Modal content configuration */\nconst ModalContentZ = z\n .object({\n title: z.string().optional(),\n body: z.string(),\n })\n .strict();\n\n/** Position where HTML/content should be inserted */\nconst InsertPositionZ = z.enum(['before', 'after', 'prepend', 'append', 'replace']);\n\n/** Tooltip trigger mode */\nconst TooltipTriggerZ = z.enum(['immediate', 'hover', 'click']);\n\n/** Widget configuration for surface mounting */\nconst WidgetConfigZ = z\n .object({\n widgetId: z.string(),\n props: z.record(z.unknown()).optional(),\n priority: z.number().optional(),\n })\n .strict();\n\n/**\n * Tour step (schema-safe version).\n * Uses `z.any()` for the `action` field \u2014 the generator replaces it with a $ref.\n */\nconst TourStepForSchemaZ = z\n .object({\n id: z.string(),\n action: z.any(),\n route: z.string().optional(),\n onAction: z.record(z.string()).optional(),\n })\n .passthrough();\n\n// ============================================================================\n// ScrollBehavior / ScrollLogicalPosition (DOM built-in types as Zod enums)\n// ============================================================================\n\nconst ScrollBehaviorZ = z.enum(['auto', 'smooth', 'instant']);\nconst ScrollLogicalPositionZ = z.enum(['start', 'center', 'end', 'nearest']);\n\n// ============================================================================\n// Core Action Schemas (18 total)\n// ============================================================================\n\n// --- Content Actions ---\n\nconst SetTextZ = z\n .object({\n kind: z.literal('content:setText'),\n anchorId: AnchorIdZ,\n text: z.string(),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .strict();\n\nconst SetAttrZ = z\n .object({\n kind: z.literal('content:setAttr'),\n anchorId: AnchorIdZ,\n attr: z.string(),\n value: z.string(),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .strict();\n\nconst AddClassZ = z\n .object({\n kind: z.literal('content:addClass'),\n anchorId: AnchorIdZ,\n className: z.string(),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .strict();\n\nconst RemoveClassZ = z\n .object({\n kind: z.literal('content:removeClass'),\n anchorId: AnchorIdZ,\n className: z.string(),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .strict();\n\nconst SetStyleZ = z\n .object({\n kind: z.literal('content:setStyle'),\n anchorId: AnchorIdZ,\n styles: z.record(z.string()),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .strict();\n\nconst InsertHtmlZ = z\n .object({\n kind: z.literal('content:insertHtml'),\n anchorId: AnchorIdZ,\n html: z.string(),\n position: InsertPositionZ,\n deepLink: NotificationDeepLinkZ.optional(),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .strict();\n\n// --- Overlay Actions ---\n\nconst HighlightZ = z\n .object({\n kind: z.literal('overlays:highlight'),\n anchorId: AnchorIdZ,\n style: HighlightStyleZ.optional(),\n duration: z.number().optional(),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .strict();\n\nconst PulseZ = z\n .object({\n kind: z.literal('overlays:pulse'),\n anchorId: AnchorIdZ,\n duration: z.number().optional(),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .strict();\n\nconst BadgeZ = z\n .object({\n kind: z.literal('overlays:badge'),\n anchorId: AnchorIdZ,\n content: z.string(),\n position: BadgePositionZ.optional(),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .strict();\n\nconst TooltipZ = z\n .object({\n kind: z.literal('overlays:tooltip'),\n anchorId: AnchorIdZ,\n content: TooltipContentZ,\n trigger: TooltipTriggerZ.optional(),\n placement: PlacementZ.optional(),\n waitFor: z.string().optional(),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .strict();\n\nconst ModalZ = z\n .object({\n kind: z.literal('overlays:modal'),\n content: ModalContentZ,\n size: z.enum(['sm', 'md', 'lg']).optional(),\n blocking: z.boolean().optional(),\n scrim: z\n .object({\n opacity: z.number().min(0).max(1).optional(),\n })\n .strict()\n .optional(),\n dismiss: z\n .object({\n onEsc: z.boolean().optional(),\n closeButton: z.boolean().optional(),\n timeoutMs: z.number().min(0).optional(),\n })\n .strict()\n .optional(),\n ctaButtons: z.array(CtaButtonZ).optional(),\n waitFor: z.string().optional(),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .strict();\n\n// --- Navigation Actions ---\n\nconst ScrollToZ = z\n .object({\n kind: z.literal('navigation:scrollTo'),\n anchorId: AnchorIdZ,\n behavior: ScrollBehaviorZ.optional(),\n block: ScrollLogicalPositionZ.optional(),\n inline: ScrollLogicalPositionZ.optional(),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .strict();\n\nconst NavigateZ = z\n .object({\n kind: z.literal('navigation:navigate'),\n url: z.string(),\n target: z.enum(['_self', '_blank']).optional(),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .strict();\n\n// --- Core Primitives ---\n\nconst MountWidgetZ = z\n .object({\n kind: z.literal('core:mountWidget'),\n slot: z.string(),\n widget: WidgetConfigZ,\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .strict();\n\nconst WaitZ = z\n .object({\n kind: z.literal('core:wait'),\n durationMs: z.number().min(0).optional(),\n event: z.string().optional(),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .strict();\n\n/**\n * Sequence \u2014 executes actions serially.\n * `actions` uses `z.any()` as placeholder for recursive ActionStep refs.\n */\nconst SequenceZ = z\n .object({\n kind: z.literal('core:sequence'),\n actions: z.array(z.any()),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .strict();\n\n/**\n * Parallel \u2014 executes actions concurrently.\n * `actions` uses `z.any()` as placeholder for recursive ActionStep refs.\n */\nconst ParallelZ = z\n .object({\n kind: z.literal('core:parallel'),\n actions: z.array(z.any()),\n waitFor: z.enum(['all', 'any']).optional(),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .strict();\n\n/**\n * Tour \u2014 orchestrate sequential steps with cross-page state.\n * `steps` contains TourStepForSchemaZ which uses z.any() for step.action.\n */\nconst TourZ = z\n .object({\n kind: z.literal('core:tour'),\n tourId: z.string(),\n steps: z.array(TourStepForSchemaZ).min(1),\n startStep: z.string().optional(),\n autoStart: z.boolean().optional(),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .passthrough();\n\n// ============================================================================\n// Export: Array for unified schema generation\n// ============================================================================\n\n/**\n * All 18 core action step schemas for unified JSON Schema generation.\n * The generator imports this array and converts each to JSON Schema,\n * then merges them into `$defs` and `actionStep.oneOf`.\n *\n * `defName` values match the existing `$defs` keys for backward compat.\n */\nexport const coreActionStepSchemas = [\n { defName: 'setText', schema: SetTextZ },\n { defName: 'setAttr', schema: SetAttrZ },\n { defName: 'addClass', schema: AddClassZ },\n { defName: 'removeClass', schema: RemoveClassZ },\n { defName: 'setStyle', schema: SetStyleZ },\n { defName: 'insertHtml', schema: InsertHtmlZ },\n { defName: 'highlight', schema: HighlightZ },\n { defName: 'pulse', schema: PulseZ },\n { defName: 'badge', schema: BadgeZ },\n { defName: 'tooltip', schema: TooltipZ },\n { defName: 'modal', schema: ModalZ },\n { defName: 'scrollTo', schema: ScrollToZ },\n { defName: 'navigate', schema: NavigateZ },\n { defName: 'mountWidget', schema: MountWidgetZ },\n { defName: 'wait', schema: WaitZ },\n { defName: 'sequence', schema: SequenceZ },\n { defName: 'parallel', schema: ParallelZ },\n { defName: 'tour', schema: TourZ },\n];\n\n// ============================================================================\n// Named Exports (for unit tests and direct usage)\n// ============================================================================\n\nexport {\n // Sub-types\n AnchorIdZ,\n HighlightStyleZ,\n BadgePositionZ,\n PlacementZ,\n CtaButtonZ,\n TooltipContentZ,\n ModalContentZ,\n InsertPositionZ,\n TooltipTriggerZ,\n WidgetConfigZ,\n TourStepForSchemaZ,\n ScrollBehaviorZ,\n ScrollLogicalPositionZ,\n // Actions\n SetTextZ,\n SetAttrZ,\n AddClassZ,\n RemoveClassZ,\n SetStyleZ,\n InsertHtmlZ,\n HighlightZ,\n PulseZ,\n BadgeZ,\n TooltipZ,\n ModalZ,\n ScrollToZ,\n NavigateZ,\n MountWidgetZ,\n WaitZ,\n SequenceZ,\n ParallelZ,\n TourZ,\n};\n"],
5
+ "mappings": ";;;;;;;;AAeA,SAAS,SAAS;AAiBlB,IAAM,iBAAiB;AAAA,EACrB,aAAa;AACf;AAGA,IAAM,YAAY,EACf,OAAO;AAAA,EACN,UAAU,EAAE,OAAO;AAAA,EACnB,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAClD,CAAC,EACA,OAAO;AAGV,IAAM,kBAAkB,EACrB,OAAO;AAAA,EACN,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,cAAc,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA,EAChD,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA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O,EAAE,SAAS;AAC7B,CAAC,EACA,OAAO,cAAc,EACrB,YAAY;AAaR,IAAM,wBAAwB;AAAA,EACnC,EAAE,SAAS,WAAW,QAAQ,SAAS;AAAA,EACvC,EAAE,SAAS,WAAW,QAAQ,SAAS;AAAA,EACvC,EAAE,SAAS,YAAY,QAAQ,UAAU;AAAA,EACzC,EAAE,SAAS,eAAe,QAAQ,aAAa;AAAA,EAC/C,EAAE,SAAS,YAAY,QAAQ,UAAU;AAAA,EACzC,EAAE,SAAS,cAAc,QAAQ,YAAY;AAAA,EAC7C,EAAE,SAAS,aAAa,QAAQ,WAAW;AAAA,EAC3C,EAAE,SAAS,SAAS,QAAQ,OAAO;AAAA,EACnC,EAAE,SAAS,SAAS,QAAQ,OAAO;AAAA,EACnC,EAAE,SAAS,WAAW,QAAQ,SAAS;AAAA,EACvC,EAAE,SAAS,SAAS,QAAQ,OAAO;AAAA,EACnC,EAAE,SAAS,YAAY,QAAQ,UAAU;AAAA,EACzC,EAAE,SAAS,YAAY,QAAQ,UAAU;AAAA,EACzC,EAAE,SAAS,eAAe,QAAQ,aAAa;AAAA,EAC/C,EAAE,SAAS,QAAQ,QAAQ,MAAM;AAAA,EACjC,EAAE,SAAS,YAAY,QAAQ,UAAU;AAAA,EACzC,EAAE,SAAS,YAAY,QAAQ,UAAU;AAAA,EACzC,EAAE,SAAS,QAAQ,QAAQ,MAAM;AACnC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,178 @@
1
+ import {
2
+ ActivationConfigZ,
3
+ ConditionZ
4
+ } from "./chunk-BU4Z6PD7.js";
5
+
6
+ // src/config/schema.ts
7
+ import { z } from "zod";
8
+ var NotificationDeepLinkZ = z.object({
9
+ tileId: z.string(),
10
+ itemId: z.string().optional()
11
+ }).strict();
12
+ var TileNotificationRuleZ = z.object({
13
+ on: z.string(),
14
+ title: z.string(),
15
+ body: z.string().optional(),
16
+ icon: z.string().optional(),
17
+ ttl: z.number().optional(),
18
+ cooldown: z.number().optional(),
19
+ deepLink: NotificationDeepLinkZ.optional()
20
+ }).strict();
21
+ var TileZ = z.object({
22
+ id: z.string(),
23
+ title: z.string().optional(),
24
+ subtitle: z.string().optional(),
25
+ icon: z.string().optional(),
26
+ priority: z.number().optional(),
27
+ widget: z.string(),
28
+ props: z.record(z.unknown()).optional(),
29
+ activation: ActivationConfigZ.optional(),
30
+ notifications: z.array(TileNotificationRuleZ).optional()
31
+ }).strict();
32
+ var CanvasElementConfigZ = z.object({
33
+ position: z.enum(["left", "right"]).optional(),
34
+ layout: z.enum(["overlay", "push"]).optional(),
35
+ background: z.string().optional(),
36
+ blur: z.string().optional(),
37
+ border: z.string().optional(),
38
+ width: z.string().optional(),
39
+ transitionDuration: z.string().optional(),
40
+ transitionEasing: z.string().optional(),
41
+ transitionFade: z.string().optional()
42
+ });
43
+ var LauncherElementConfigZ = z.object({
44
+ background: z.string().optional(),
45
+ backgroundHover: z.string().optional(),
46
+ color: z.string().optional(),
47
+ size: z.string().optional(),
48
+ shadow: z.string().optional(),
49
+ borderRadius: z.string().optional()
50
+ });
51
+ var TileElementConfigZ = z.object({
52
+ background: z.string().optional(),
53
+ backgroundHover: z.string().optional(),
54
+ border: z.string().optional(),
55
+ borderRadius: z.string().optional(),
56
+ shadow: z.string().optional(),
57
+ titleColor: z.string().optional(),
58
+ textColor: z.string().optional(),
59
+ iconBackground: z.string().optional(),
60
+ iconShadow: z.string().optional(),
61
+ headerPadding: z.string().optional(),
62
+ bodyPadding: z.string().optional(),
63
+ gap: z.string().optional()
64
+ });
65
+ var OverlayElementConfigZ = z.object({
66
+ background: z.string().optional(),
67
+ textColor: z.string().optional(),
68
+ titleColor: z.string().optional(),
69
+ arrowColor: z.string().optional(),
70
+ arrowSize: z.string().optional(),
71
+ border: z.string().optional(),
72
+ borderRadius: z.string().optional(),
73
+ scrimOpacity: z.string().optional(),
74
+ highlightRing: z.string().optional()
75
+ });
76
+ var NotificationElementConfigZ = z.object({
77
+ background: z.string().optional(),
78
+ textColor: z.string().optional(),
79
+ textSecondaryColor: z.string().optional(),
80
+ border: z.string().optional(),
81
+ borderRadius: z.string().optional(),
82
+ successColor: z.string().optional(),
83
+ warningColor: z.string().optional(),
84
+ errorColor: z.string().optional(),
85
+ iconBackground: z.string().optional(),
86
+ progressGradient: z.string().optional()
87
+ });
88
+ var ContentElementConfigZ = z.object({
89
+ background: z.string().optional(),
90
+ backgroundHover: z.string().optional(),
91
+ border: z.string().optional(),
92
+ borderRadius: z.string().optional(),
93
+ textColor: z.string().optional(),
94
+ textSecondaryColor: z.string().optional(),
95
+ // Accordion layout
96
+ itemDivider: z.string().optional(),
97
+ itemGap: z.string().optional(),
98
+ itemPadding: z.string().optional(),
99
+ itemFontSize: z.string().optional(),
100
+ // Expanded content
101
+ bodyPadding: z.string().optional(),
102
+ bodyFontSize: z.string().optional(),
103
+ // Category headers
104
+ categoryPadding: z.string().optional(),
105
+ categoryGap: z.string().optional(),
106
+ categoryFontSize: z.string().optional(),
107
+ // Search
108
+ searchBackground: z.string().optional(),
109
+ searchColor: z.string().optional(),
110
+ // Chevron
111
+ chevronColor: z.string().optional()
112
+ });
113
+ var CanvasThemeConfigZ = z.object({
114
+ mode: z.enum(["dark", "light"]).optional(),
115
+ fontFamily: z.string().optional(),
116
+ colorPrimary: z.string().optional(),
117
+ colorPrimaryHover: z.string().optional(),
118
+ borderRadius: z.string().optional(),
119
+ canvas: CanvasElementConfigZ.optional(),
120
+ launcher: LauncherElementConfigZ.optional(),
121
+ tile: TileElementConfigZ.optional(),
122
+ overlay: OverlayElementConfigZ.optional(),
123
+ notification: NotificationElementConfigZ.optional(),
124
+ content: ContentElementConfigZ.optional()
125
+ }).strict();
126
+ var LauncherConfigZ = z.object({
127
+ enabled: z.boolean().optional(),
128
+ label: z.string().optional(),
129
+ icon: z.string().optional(),
130
+ position: z.string().optional(),
131
+ animate: z.boolean().optional(),
132
+ animationStyle: z.enum(["pulse", "bounce", "glow"]).optional(),
133
+ notificationCount: z.number().optional()
134
+ }).strict();
135
+ var CanvasConfigResponseZ = z.object({
136
+ schemaVersion: z.string().optional(),
137
+ fetchedAt: z.string().datetime(),
138
+ configVersion: z.string().optional(),
139
+ canvasTitle: z.string().optional(),
140
+ tiles: z.array(TileZ),
141
+ actions: z.array(z.any()),
142
+ theme: CanvasThemeConfigZ.optional(),
143
+ launcher: LauncherConfigZ.optional(),
144
+ meta: z.object({
145
+ verificationSteps: z.array(
146
+ z.union([
147
+ z.string(),
148
+ z.object({
149
+ text: z.string(),
150
+ check: ConditionZ.optional()
151
+ })
152
+ ])
153
+ ).optional()
154
+ }).passthrough().optional()
155
+ }).strict();
156
+ var configSchemas = [
157
+ { defName: "tile", schema: TileZ },
158
+ { defName: "themeConfig", schema: CanvasThemeConfigZ },
159
+ { defName: "launcherConfig", schema: LauncherConfigZ },
160
+ { defName: "canvasConfigResponse", schema: CanvasConfigResponseZ }
161
+ ];
162
+
163
+ export {
164
+ NotificationDeepLinkZ,
165
+ TileNotificationRuleZ,
166
+ TileZ,
167
+ CanvasElementConfigZ,
168
+ LauncherElementConfigZ,
169
+ TileElementConfigZ,
170
+ OverlayElementConfigZ,
171
+ NotificationElementConfigZ,
172
+ ContentElementConfigZ,
173
+ CanvasThemeConfigZ,
174
+ LauncherConfigZ,
175
+ CanvasConfigResponseZ,
176
+ configSchemas
177
+ };
178
+ //# sourceMappingURL=chunk-XDYJ64IN.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/config/schema.ts"],
4
+ "sourcesContent": ["/**\n * Zod schemas for canvas configuration types.\n *\n * Single source of truth for tile, theme, launcher, and top-level\n * CanvasConfigResponse shapes. These schemas are converted to JSON Schema\n * during build and merged into the unified canvas-config.schema.json.\n *\n * Design decisions:\n * - `.strict()` on top-level objects \u2192 `additionalProperties: false` in JSON Schema\n * - Element sub-schemas (canvas, tile, etc.) are NOT strict to allow future expansion\n */\n\nimport { z } from 'zod';\nimport { ActivationConfigZ, ConditionZ } from '../decisions/schema';\n\n// ============================================================================\n// Tile Notification Sub-Types\n// ============================================================================\n\nconst NotificationDeepLinkZ = z\n .object({\n tileId: z.string(),\n itemId: z.string().optional(),\n })\n .strict();\n\nconst TileNotificationRuleZ = z\n .object({\n on: z.string(),\n title: z.string(),\n body: z.string().optional(),\n icon: z.string().optional(),\n ttl: z.number().optional(),\n cooldown: z.number().optional(),\n deepLink: NotificationDeepLinkZ.optional(),\n })\n .strict();\n\n// ============================================================================\n// Tile\n// ============================================================================\n\nexport const TileZ = z\n .object({\n id: z.string(),\n title: z.string().optional(),\n subtitle: z.string().optional(),\n icon: z.string().optional(),\n priority: z.number().optional(),\n widget: z.string(),\n props: z.record(z.unknown()).optional(),\n activation: ActivationConfigZ.optional(),\n notifications: z.array(TileNotificationRuleZ).optional(),\n })\n .strict();\n\n// ============================================================================\n// Theme Config \u2014 Element Sub-Schemas\n// ============================================================================\n\nexport const CanvasElementConfigZ = z.object({\n position: z.enum(['left', 'right']).optional(),\n layout: z.enum(['overlay', 'push']).optional(),\n background: z.string().optional(),\n blur: z.string().optional(),\n border: z.string().optional(),\n width: z.string().optional(),\n transitionDuration: z.string().optional(),\n transitionEasing: z.string().optional(),\n transitionFade: z.string().optional(),\n});\n\nexport const LauncherElementConfigZ = z.object({\n background: z.string().optional(),\n backgroundHover: z.string().optional(),\n color: z.string().optional(),\n size: z.string().optional(),\n shadow: z.string().optional(),\n borderRadius: z.string().optional(),\n});\n\nexport const TileElementConfigZ = z.object({\n background: z.string().optional(),\n backgroundHover: z.string().optional(),\n border: z.string().optional(),\n borderRadius: z.string().optional(),\n shadow: z.string().optional(),\n titleColor: z.string().optional(),\n textColor: z.string().optional(),\n iconBackground: z.string().optional(),\n iconShadow: z.string().optional(),\n headerPadding: z.string().optional(),\n bodyPadding: z.string().optional(),\n gap: z.string().optional(),\n});\n\nexport const OverlayElementConfigZ = z.object({\n background: z.string().optional(),\n textColor: z.string().optional(),\n titleColor: z.string().optional(),\n arrowColor: z.string().optional(),\n arrowSize: z.string().optional(),\n border: z.string().optional(),\n borderRadius: z.string().optional(),\n scrimOpacity: z.string().optional(),\n highlightRing: z.string().optional(),\n});\n\nexport const NotificationElementConfigZ = z.object({\n background: z.string().optional(),\n textColor: z.string().optional(),\n textSecondaryColor: z.string().optional(),\n border: z.string().optional(),\n borderRadius: z.string().optional(),\n successColor: z.string().optional(),\n warningColor: z.string().optional(),\n errorColor: z.string().optional(),\n iconBackground: z.string().optional(),\n progressGradient: z.string().optional(),\n});\n\nexport const ContentElementConfigZ = z.object({\n background: z.string().optional(),\n backgroundHover: z.string().optional(),\n border: z.string().optional(),\n borderRadius: z.string().optional(),\n textColor: z.string().optional(),\n textSecondaryColor: z.string().optional(),\n // Accordion layout\n itemDivider: z.string().optional(),\n itemGap: z.string().optional(),\n itemPadding: z.string().optional(),\n itemFontSize: z.string().optional(),\n // Expanded content\n bodyPadding: z.string().optional(),\n bodyFontSize: z.string().optional(),\n // Category headers\n categoryPadding: z.string().optional(),\n categoryGap: z.string().optional(),\n categoryFontSize: z.string().optional(),\n // Search\n searchBackground: z.string().optional(),\n searchColor: z.string().optional(),\n // Chevron\n chevronColor: z.string().optional(),\n});\n\n// ============================================================================\n// Theme Config \u2014 Top-Level\n// ============================================================================\n\nexport const CanvasThemeConfigZ = z\n .object({\n mode: z.enum(['dark', 'light']).optional(),\n fontFamily: z.string().optional(),\n colorPrimary: z.string().optional(),\n colorPrimaryHover: z.string().optional(),\n borderRadius: z.string().optional(),\n canvas: CanvasElementConfigZ.optional(),\n launcher: LauncherElementConfigZ.optional(),\n tile: TileElementConfigZ.optional(),\n overlay: OverlayElementConfigZ.optional(),\n notification: NotificationElementConfigZ.optional(),\n content: ContentElementConfigZ.optional(),\n })\n .strict();\n\n// ============================================================================\n// Launcher Config\n// ============================================================================\n\nexport const LauncherConfigZ = z\n .object({\n enabled: z.boolean().optional(),\n label: z.string().optional(),\n icon: z.string().optional(),\n position: z.string().optional(),\n animate: z.boolean().optional(),\n animationStyle: z.enum(['pulse', 'bounce', 'glow']).optional(),\n notificationCount: z.number().optional(),\n })\n .strict();\n\n// ============================================================================\n// Canvas Config Response (top-level)\n// ============================================================================\n\nexport const CanvasConfigResponseZ = z\n .object({\n schemaVersion: z.string().optional(),\n fetchedAt: z.string().datetime(),\n configVersion: z.string().optional(),\n canvasTitle: z.string().optional(),\n tiles: z.array(TileZ),\n actions: z.array(z.any()),\n theme: CanvasThemeConfigZ.optional(),\n launcher: LauncherConfigZ.optional(),\n meta: z\n .object({\n verificationSteps: z\n .array(\n z.union([\n z.string(),\n z.object({\n text: z.string(),\n check: ConditionZ.optional(),\n }),\n ])\n )\n .optional(),\n })\n .passthrough()\n .optional(),\n })\n .strict();\n\n// ============================================================================\n// Export: Array for unified schema generation\n// ============================================================================\n\n/**\n * Config schemas for unified JSON Schema generation.\n * The generator imports this array and converts each to a JSON Schema $def.\n */\nexport const configSchemas = [\n { defName: 'tile', schema: TileZ },\n { defName: 'themeConfig', schema: CanvasThemeConfigZ },\n { defName: 'launcherConfig', schema: LauncherConfigZ },\n { defName: 'canvasConfigResponse', schema: CanvasConfigResponseZ },\n];\n\n// ============================================================================\n// Named Exports\n// ============================================================================\n\nexport { NotificationDeepLinkZ, TileNotificationRuleZ };\n"],
5
+ "mappings": ";;;;;;AAYA,SAAS,SAAS;AAOlB,IAAM,wBAAwB,EAC3B,OAAO;AAAA,EACN,QAAQ,EAAE,OAAO;AAAA,EACjB,QAAQ,EAAE,OAAO,EAAE,SAAS;AAC9B,CAAC,EACA,OAAO;AAEV,IAAM,wBAAwB,EAC3B,OAAO;AAAA,EACN,IAAI,EAAE,OAAO;AAAA,EACb,OAAO,EAAE,OAAO;AAAA,EAChB,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA,EAC1B,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA,EAC1B,KAAK,EAAE,OAAO,EAAE,SAAS;AAAA,EACzB,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,UAAU,sBAAsB,SAAS;AAC3C,C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UACP,MAAM,EAAE,OAAO;AAAA,UACf,OAAO,WAAW,SAAS;AAAA,QAC7B,CAAC;AAAA,MACH,CAAC;AAAA,IACH,EACC,SAAS;AAAA,EACd,CAAC,EACA,YAAY,EACZ,SAAS;AACd,CAAC,EACA,OAAO;AAUH,IAAM,gBAAgB;AAAA,EAC3B,EAAE,SAAS,QAAQ,QAAQ,MAAM;AAAA,EACjC,EAAE,SAAS,eAAe,QAAQ,mBAAmB;AAAA,EACrD,EAAE,SAAS,kBAAkB,QAAQ,gBAAgB;AAAA,EACrD,EAAE,SAAS,wBAAwB,QAAQ,sBAAsB;AACnE;",
6
+ "names": []
7
+ }
@@ -1,29 +1,12 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import type { TelemetryClient } from '../telemetry/types';
3
3
  import type { TileConfig } from '../types';
4
- export interface CanvasTheme {
5
- position: 'left' | 'right';
6
- baseWidth: string;
7
- expandedWidth: string;
8
- zIndex: number;
9
- backdropBlur: string;
10
- /** Color theming from workspace settings */
11
- mode?: 'dark' | 'light';
12
- colorPrimary?: string;
13
- colorBackground?: string;
14
- colorText?: string;
15
- colorTextSecondary?: string;
16
- borderRadius?: string;
17
- /** Glass morphism */
18
- glassBackground?: string;
19
- glassBlur?: string;
20
- glassSaturate?: string;
21
- }
22
4
  export interface ShadowCanvasOverlayProps {
23
5
  isOpen: boolean;
24
6
  onToggle: () => void;
25
7
  telemetry?: TelemetryClient;
26
8
  launcherLabel?: string;
9
+ launcherIcon?: string;
27
10
  launcherAnimate?: boolean;
28
11
  launcherAnimationStyle?: 'pulse' | 'bounce' | 'glow';
29
12
  notificationCount?: number;
@@ -33,6 +16,5 @@ export interface ShadowCanvasOverlayProps {
33
16
  error?: string;
34
17
  canvasTitle?: string;
35
18
  displayMode?: 'standard' | 'focused';
36
- theme?: Partial<CanvasTheme>;
37
19
  }
38
- export declare function ShadowCanvasOverlay({ isOpen, onToggle, telemetry, launcherLabel: _launcherLabel, launcherAnimate, launcherAnimationStyle: _launcherAnimationStyle, notificationCount: _notificationCount, footerSlot, tiles, isLoading, error, canvasTitle, displayMode, theme: themeOverride, }: ShadowCanvasOverlayProps): import("react/jsx-runtime").JSX.Element | null;
20
+ export declare function ShadowCanvasOverlay({ isOpen, onToggle, telemetry, launcherLabel: _launcherLabel, launcherIcon, launcherAnimate, launcherAnimationStyle: _launcherAnimationStyle, notificationCount: _notificationCount, footerSlot, tiles, isLoading, error, canvasTitle, displayMode, }: ShadowCanvasOverlayProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * TileIcon — maps emoji identifiers to Lucide icons.
3
+ *
4
+ * Uses the same emoji-to-icon associations as the editor's AdaptiveIcon
5
+ * so tiles render the same icons as the editor sidebar.
6
+ */
7
+ import type { ReactElement } from 'react';
8
+ interface TileIconProps {
9
+ emoji: string;
10
+ size?: number;
11
+ color?: string;
12
+ }
13
+ export declare function TileIcon({ emoji, size, color, }: TileIconProps): ReactElement;
14
+ export {};