@syntrologie/runtime-sdk 2.4.0-canary.2 → 2.4.0-canary.21

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 +116 -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 +58243 -201
  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-2UYZ5DWI.js +126 -0
  13. package/dist/chunk-2UYZ5DWI.js.map +7 -0
  14. package/dist/{chunk-DOJR7R46.js → chunk-HF3D7YFQ.js} +49 -31
  15. package/dist/chunk-HF3D7YFQ.js.map +7 -0
  16. package/dist/{chunk-ZDZ3IYFN.js → chunk-IPU3WVPY.js} +3449 -2110
  17. package/dist/chunk-IPU3WVPY.js.map +7 -0
  18. package/dist/{chunk-BIYMC56J.js → chunk-P5G4KT2U.js} +54 -6
  19. package/dist/chunk-P5G4KT2U.js.map +7 -0
  20. package/dist/components/ShadowCanvasOverlay.d.ts +1 -20
  21. package/dist/config/schema.d.ts +1797 -267
  22. package/dist/config/schema.js +19 -62
  23. package/dist/config/schema.js.map +3 -3
  24. package/dist/context/schema.d.ts +8 -8
  25. package/dist/decisions/schema.d.ts +506 -1490
  26. package/dist/decisions/schema.js +5 -2
  27. package/dist/decisions/types.d.ts +22 -0
  28. package/dist/events/registerConfigPredicates.d.ts +7 -10
  29. package/dist/events/schema.d.ts +12 -12
  30. package/dist/experiments/adapters/growthbook.d.ts +2 -0
  31. package/dist/experiments/types.d.ts +7 -0
  32. package/dist/hooks/useShadowCanvasConfig.d.ts +4 -2
  33. package/dist/index.d.ts +1 -0
  34. package/dist/index.js +72 -98
  35. package/dist/index.js.map +3 -3
  36. package/dist/overlays/schema.d.ts +48 -48
  37. package/dist/react.js +4 -3
  38. package/dist/react.js.map +1 -1
  39. package/dist/runtime.d.ts +3 -0
  40. package/dist/smart-canvas.esm.js +62 -66
  41. package/dist/smart-canvas.esm.js.map +4 -4
  42. package/dist/smart-canvas.js +2591 -1167
  43. package/dist/smart-canvas.js.map +4 -4
  44. package/dist/smart-canvas.min.js +62 -66
  45. package/dist/smart-canvas.min.js.map +4 -4
  46. package/dist/surfaces/types.d.ts +2 -1
  47. package/dist/theme/ThemeProvider.d.ts +11 -16
  48. package/dist/theme/defaultTheme.d.ts +6 -1
  49. package/dist/theme/index.d.ts +3 -4
  50. package/dist/theme/types.d.ts +10 -0
  51. package/dist/version.d.ts +1 -1
  52. package/package.json +7 -7
  53. package/schema/canvas-config.schema.json +9418 -790
  54. package/scripts/validate-config.mjs +78 -0
  55. package/dist/actions/executors/tour.d.ts +0 -18
  56. package/dist/chunk-BIYMC56J.js.map +0 -7
  57. package/dist/chunk-DOJR7R46.js.map +0 -7
  58. package/dist/chunk-JMHRHAEL.js +0 -18
  59. package/dist/chunk-JMHRHAEL.js.map +0 -7
  60. package/dist/chunk-ZDZ3IYFN.js.map +0 -7
  61. package/dist/hooks/useHostPatches.d.ts +0 -9
  62. package/dist/theme/extractHostTheme.d.ts +0 -14
@@ -1,71 +1,28 @@
1
1
  import {
2
- ActivationConfigZ
3
- } from "../chunk-BIYMC56J.js";
4
- import "../chunk-JMHRHAEL.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
- priority: z.number().optional(),
25
- widget: z.string(),
26
- props: z.record(z.unknown()).optional(),
27
- activation: ActivationConfigZ.optional(),
28
- notifications: z.array(TileNotificationRuleZ).optional()
29
- }).strict();
30
- var CanvasThemeConfigZ = z.object({
31
- name: z.string().optional(),
32
- mode: z.enum(["dark", "light"]).optional(),
33
- position: z.enum(["left", "right"]).optional(),
34
- colorPrimary: z.string().optional(),
35
- colorBackground: z.string().optional(),
36
- colorText: z.string().optional(),
37
- colorTextSecondary: z.string().optional(),
38
- borderRadius: z.string().optional()
39
- }).strict();
40
- var LauncherConfigZ = z.object({
41
- enabled: z.boolean().optional(),
42
- label: z.string().optional(),
43
- position: z.string().optional(),
44
- animate: z.boolean().optional(),
45
- animationStyle: z.enum(["pulse", "bounce", "glow"]).optional(),
46
- notificationCount: z.number().optional()
47
- }).strict();
48
- var CanvasConfigResponseZ = z.object({
49
- schemaVersion: z.string().optional(),
50
- fetchedAt: z.string().datetime(),
51
- configVersion: z.string().optional(),
52
- canvasTitle: z.string().optional(),
53
- tiles: z.array(TileZ),
54
- actions: z.array(z.any()),
55
- theme: CanvasThemeConfigZ.optional(),
56
- launcher: LauncherConfigZ.optional()
57
- }).strict();
58
- var configSchemas = [
59
- { defName: "tile", schema: TileZ },
60
- { defName: "themeConfig", schema: CanvasThemeConfigZ },
61
- { defName: "launcherConfig", schema: LauncherConfigZ },
62
- { defName: "canvasConfigResponse", schema: CanvasConfigResponseZ }
63
- ];
2
+ CanvasConfigResponseZ,
3
+ CanvasElementConfigZ,
4
+ CanvasThemeConfigZ,
5
+ LauncherConfigZ,
6
+ LauncherElementConfigZ,
7
+ NotificationDeepLinkZ,
8
+ NotificationElementConfigZ,
9
+ OverlayElementConfigZ,
10
+ TileElementConfigZ,
11
+ TileNotificationRuleZ,
12
+ TileZ,
13
+ configSchemas
14
+ } from "../chunk-2UYZ5DWI.js";
15
+ import "../chunk-P5G4KT2U.js";
64
16
  export {
65
17
  CanvasConfigResponseZ,
18
+ CanvasElementConfigZ,
66
19
  CanvasThemeConfigZ,
67
20
  LauncherConfigZ,
21
+ LauncherElementConfigZ,
68
22
  NotificationDeepLinkZ,
23
+ NotificationElementConfigZ,
24
+ OverlayElementConfigZ,
25
+ TileElementConfigZ,
69
26
  TileNotificationRuleZ,
70
27
  TileZ,
71
28
  configSchemas
@@ -1,7 +1,7 @@
1
1
  {
2
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 every object \u2192 `additionalProperties: false` in JSON Schema\n * - Matches runtime usage (includes fields like colorTextSecondary, schemaVersion\n * that were previously missing from the hand-written JSON schema)\n */\n\nimport { z } from 'zod';\nimport { ActivationConfigZ } 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 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\n// ============================================================================\n\nexport const CanvasThemeConfigZ = z\n .object({\n name: z.string().optional(),\n mode: z.enum(['dark', 'light']).optional(),\n position: z.enum(['left', 'right']).optional(),\n colorPrimary: z.string().optional(),\n colorBackground: z.string().optional(),\n colorText: z.string().optional(),\n colorTextSecondary: z.string().optional(),\n borderRadius: z.string().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 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 })\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": ";;;;;;AAaA,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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S;AAAA,EAC7D,mBAAmB,EAAE,OAAO,EAAE,SAAS;AACzC,CAAC,EACA,OAAO;AAMH,IAAM,wBAAwB,EAClC,OAAO;AAAA,EACN,eAAe,EAAE,OAAO,EAAE,SAAS;AAAA,EACnC,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,eAAe,EAAE,OAAO,EAAE,SAAS;AAAA,EACnC,aAAa,EAAE,OAAO,EAAE,SAAS;AAAA,EACjC,OAAO,EAAE,MAAM,KAAK;AAAA,EACpB,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC;AAAA,EACxB,OAAO,mBAAmB,SAAS;AAAA,EACnC,UAAU,gBAAgB,SAAS;AACrC,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;",
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
6
  "names": []
7
7
  }
@@ -103,8 +103,8 @@ export declare const AnchorStateZ: z.ZodObject<{
103
103
  h: number;
104
104
  }>>;
105
105
  }, "strip", z.ZodTypeAny, {
106
- anchorId: string;
107
106
  present: boolean;
107
+ anchorId: string;
108
108
  visible?: boolean | undefined;
109
109
  boundingBox?: {
110
110
  x: number;
@@ -113,8 +113,8 @@ export declare const AnchorStateZ: z.ZodObject<{
113
113
  h: number;
114
114
  } | undefined;
115
115
  }, {
116
- anchorId: string;
117
116
  present: boolean;
117
+ anchorId: string;
118
118
  visible?: boolean | undefined;
119
119
  boundingBox?: {
120
120
  x: number;
@@ -200,8 +200,8 @@ export declare const RuntimeContextZ: z.ZodObject<{
200
200
  h: number;
201
201
  }>>;
202
202
  }, "strip", z.ZodTypeAny, {
203
- anchorId: string;
204
203
  present: boolean;
204
+ anchorId: string;
205
205
  visible?: boolean | undefined;
206
206
  boundingBox?: {
207
207
  x: number;
@@ -210,8 +210,8 @@ export declare const RuntimeContextZ: z.ZodObject<{
210
210
  h: number;
211
211
  } | undefined;
212
212
  }, {
213
- anchorId: string;
214
213
  present: boolean;
214
+ anchorId: string;
215
215
  visible?: boolean | undefined;
216
216
  boundingBox?: {
217
217
  x: number;
@@ -241,8 +241,8 @@ export declare const RuntimeContextZ: z.ZodObject<{
241
241
  }[] | undefined;
242
242
  };
243
243
  anchors?: {
244
- anchorId: string;
245
244
  present: boolean;
245
+ anchorId: string;
246
246
  visible?: boolean | undefined;
247
247
  boundingBox?: {
248
248
  x: number;
@@ -272,8 +272,8 @@ export declare const RuntimeContextZ: z.ZodObject<{
272
272
  }[] | undefined;
273
273
  };
274
274
  anchors?: {
275
- anchorId: string;
276
275
  present: boolean;
276
+ anchorId: string;
277
277
  visible?: boolean | undefined;
278
278
  boundingBox?: {
279
279
  x: number;
@@ -307,8 +307,8 @@ export declare function validateRuntimeContext(data: unknown): z.SafeParseReturn
307
307
  }[] | undefined;
308
308
  };
309
309
  anchors?: {
310
- anchorId: string;
311
310
  present: boolean;
311
+ anchorId: string;
312
312
  visible?: boolean | undefined;
313
313
  boundingBox?: {
314
314
  x: number;
@@ -338,8 +338,8 @@ export declare function validateRuntimeContext(data: unknown): z.SafeParseReturn
338
338
  }[] | undefined;
339
339
  };
340
340
  anchors?: {
341
- anchorId: string;
342
341
  present: boolean;
342
+ anchorId: string;
343
343
  visible?: boolean | undefined;
344
344
  boundingBox?: {
345
345
  x: number;