@syntrologie/runtime-sdk 1.0.1 → 2.0.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 (122) hide show
  1. package/CAPABILITIES.md +630 -463
  2. package/README.md +285 -62
  3. package/dist/RuntimeProvider.d.ts +51 -0
  4. package/dist/RuntimeProvider.js +114 -0
  5. package/dist/RuntimeProvider.js.map +1 -0
  6. package/dist/SmartCanvasApp.d.ts +9 -3
  7. package/dist/SmartCanvasApp.js +36 -38
  8. package/dist/SmartCanvasApp.js.map +1 -1
  9. package/dist/actions/ActionEngine.d.ts +11 -0
  10. package/dist/actions/ActionEngine.js +274 -0
  11. package/dist/actions/ActionEngine.js.map +1 -0
  12. package/dist/actions/executors/index.d.ts +118 -0
  13. package/dist/actions/executors/index.js +242 -0
  14. package/dist/actions/executors/index.js.map +1 -0
  15. package/dist/actions/executors/tour.d.ts +18 -0
  16. package/dist/actions/executors/tour.js +332 -0
  17. package/dist/actions/executors/tour.js.map +1 -0
  18. package/dist/actions/index.d.ts +10 -0
  19. package/dist/actions/index.js +12 -0
  20. package/dist/actions/index.js.map +1 -0
  21. package/dist/actions/types.d.ts +399 -0
  22. package/dist/actions/types.js +8 -0
  23. package/dist/actions/types.js.map +1 -0
  24. package/dist/actions/validation.d.ts +14 -0
  25. package/dist/actions/validation.js +603 -0
  26. package/dist/actions/validation.js.map +1 -0
  27. package/dist/api.d.ts +32 -18
  28. package/dist/api.js +56 -39
  29. package/dist/api.js.map +1 -1
  30. package/dist/apps/AppContext.d.ts +31 -0
  31. package/dist/apps/AppContext.js +93 -0
  32. package/dist/apps/AppContext.js.map +1 -0
  33. package/dist/apps/AppLoader.d.ts +84 -0
  34. package/dist/apps/AppLoader.js +250 -0
  35. package/dist/apps/AppLoader.js.map +1 -0
  36. package/dist/apps/AppRegistry.d.ts +102 -0
  37. package/dist/apps/AppRegistry.js +317 -0
  38. package/dist/apps/AppRegistry.js.map +1 -0
  39. package/dist/apps/examples/gamification-app.example.d.ts +305 -0
  40. package/dist/apps/examples/gamification-app.example.js +329 -0
  41. package/dist/apps/examples/gamification-app.example.js.map +1 -0
  42. package/dist/apps/index.d.ts +18 -0
  43. package/dist/apps/index.js +26 -0
  44. package/dist/apps/index.js.map +1 -0
  45. package/dist/apps/types.d.ts +231 -0
  46. package/dist/apps/types.js +8 -0
  47. package/dist/apps/types.js.map +1 -0
  48. package/dist/bootstrap.d.ts +24 -0
  49. package/dist/bootstrap.js +133 -33
  50. package/dist/bootstrap.js.map +1 -1
  51. package/dist/components/ShadowCanvasOverlay.js +36 -9
  52. package/dist/components/ShadowCanvasOverlay.js.map +1 -1
  53. package/dist/components/TileCard.js +37 -18
  54. package/dist/components/TileCard.js.map +1 -1
  55. package/dist/context/schema.d.ts +16 -16
  56. package/dist/decisions/schema.d.ts +96 -96
  57. package/dist/earlyPatcher.d.ts +8 -20
  58. package/dist/earlyPatcher.js +13 -62
  59. package/dist/earlyPatcher.js.map +1 -1
  60. package/dist/editorLoader.d.ts +2 -0
  61. package/dist/editorLoader.js +46 -7
  62. package/dist/editorLoader.js.map +1 -1
  63. package/dist/events/normalizers/posthog.d.ts +24 -0
  64. package/dist/events/normalizers/posthog.js.map +1 -1
  65. package/dist/events/schema.d.ts +8 -8
  66. package/dist/events/types.d.ts +6 -0
  67. package/dist/events/types.js +8 -0
  68. package/dist/events/types.js.map +1 -1
  69. package/dist/hooks/useCanvasOverlays.d.ts +4 -1
  70. package/dist/hooks/useCanvasOverlays.js +53 -6
  71. package/dist/hooks/useCanvasOverlays.js.map +1 -1
  72. package/dist/hooks/useShadowCanvasConfig.d.ts +3 -7
  73. package/dist/hooks/useShadowCanvasConfig.js +2 -3
  74. package/dist/hooks/useShadowCanvasConfig.js.map +1 -1
  75. package/dist/index.d.ts +5 -0
  76. package/dist/index.js +10 -0
  77. package/dist/index.js.map +1 -1
  78. package/dist/overlays/schema.d.ts +153 -153
  79. package/dist/runtime.d.ts +24 -0
  80. package/dist/runtime.js +75 -1
  81. package/dist/runtime.js.map +1 -1
  82. package/dist/smart-canvas.esm.js +162 -55
  83. package/dist/smart-canvas.esm.js.map +4 -4
  84. package/dist/smart-canvas.js +21133 -17957
  85. package/dist/smart-canvas.js.map +4 -4
  86. package/dist/smart-canvas.min.js +162 -55
  87. package/dist/smart-canvas.min.js.map +4 -4
  88. package/dist/store/example.d.ts +1 -0
  89. package/dist/store/example.js +43 -0
  90. package/dist/store/example.js.map +1 -0
  91. package/dist/store/mini-effector.d.ts +46 -0
  92. package/dist/store/mini-effector.js +90 -0
  93. package/dist/store/mini-effector.js.map +1 -0
  94. package/dist/surfaces/Surfaces.d.ts +11 -0
  95. package/dist/surfaces/Surfaces.js +361 -0
  96. package/dist/surfaces/Surfaces.js.map +1 -0
  97. package/dist/surfaces/index.d.ts +9 -0
  98. package/dist/surfaces/index.js +12 -0
  99. package/dist/surfaces/index.js.map +1 -0
  100. package/dist/surfaces/positioning.d.ts +50 -0
  101. package/dist/surfaces/positioning.js +231 -0
  102. package/dist/surfaces/positioning.js.map +1 -0
  103. package/dist/surfaces/types.d.ts +167 -0
  104. package/dist/surfaces/types.js +23 -0
  105. package/dist/surfaces/types.js.map +1 -0
  106. package/dist/telemetry/adapters/posthog.d.ts +6 -0
  107. package/dist/telemetry/adapters/posthog.js +9 -0
  108. package/dist/telemetry/adapters/posthog.js.map +1 -1
  109. package/dist/types-only.d.ts +32 -0
  110. package/dist/types-only.js +11 -0
  111. package/dist/types-only.js.map +1 -0
  112. package/dist/types.d.ts +26 -14
  113. package/dist/types.js +1 -1
  114. package/dist/types.js.map +1 -1
  115. package/dist/widgets/WidgetRegistry.d.ts +139 -0
  116. package/dist/widgets/WidgetRegistry.js +182 -0
  117. package/dist/widgets/WidgetRegistry.js.map +1 -0
  118. package/dist/widgets/index.d.ts +7 -0
  119. package/dist/widgets/index.js +7 -0
  120. package/dist/widgets/index.js.map +1 -0
  121. package/package.json +13 -3
  122. package/schema/canvas-config.schema.json +444 -254
@@ -0,0 +1,139 @@
1
+ /**
2
+ * Widget Registry
3
+ *
4
+ * Extensible registry for mountable widget components.
5
+ * Apps can register custom widgets that can be rendered via mountWidget actions.
6
+ */
7
+ /**
8
+ * Cleanup function returned when unmounting a widget.
9
+ */
10
+ export type WidgetCleanup = () => void;
11
+ /**
12
+ * Mountable widget component interface.
13
+ *
14
+ * Widgets must implement this interface to be registered and mounted
15
+ * via the Surfaces system or mountWidget actions.
16
+ */
17
+ export interface MountableWidget {
18
+ /**
19
+ * Mount the widget into a container element.
20
+ *
21
+ * @param container - The DOM element to mount into
22
+ * @param config - Configuration/props for the widget
23
+ * @returns A cleanup function to unmount the widget, or void
24
+ */
25
+ mount(container: HTMLElement, config?: Record<string, unknown>): WidgetCleanup | void;
26
+ /**
27
+ * Optional: Update the widget with new config.
28
+ * If not provided, the widget will be unmounted and remounted on updates.
29
+ *
30
+ * @param container - The DOM element containing the widget
31
+ * @param config - New configuration/props
32
+ */
33
+ update?(container: HTMLElement, config?: Record<string, unknown>): void;
34
+ }
35
+ /**
36
+ * Widget registration entry.
37
+ */
38
+ export interface WidgetRegistration {
39
+ /** Widget ID (e.g., "gamification:leaderboard") */
40
+ id: string;
41
+ /** The widget component */
42
+ widget: MountableWidget;
43
+ /** Source app ID or "built-in" */
44
+ source: "built-in" | string;
45
+ /** Optional metadata */
46
+ metadata?: {
47
+ name?: string;
48
+ description?: string;
49
+ icon?: string;
50
+ };
51
+ }
52
+ /**
53
+ * Mounted widget handle.
54
+ */
55
+ export interface MountedWidgetHandle {
56
+ /** The widget ID */
57
+ widgetId: string;
58
+ /** The container element */
59
+ container: HTMLElement;
60
+ /** Unmount the widget */
61
+ unmount: () => void;
62
+ /** Update the widget config */
63
+ update: (config?: Record<string, unknown>) => void;
64
+ }
65
+ /**
66
+ * Extensible registry for widget components.
67
+ *
68
+ * Allows apps to register custom widgets that can be rendered via
69
+ * mountWidget actions or directly through the Surfaces system.
70
+ */
71
+ export declare class WidgetRegistry {
72
+ private widgets;
73
+ private mountedWidgets;
74
+ private mountIdCounter;
75
+ constructor();
76
+ /**
77
+ * Register a widget.
78
+ *
79
+ * @param id - The widget ID (e.g., "gamification:leaderboard")
80
+ * @param widget - The widget component
81
+ * @param source - The source app ID (for tracking)
82
+ * @param metadata - Optional metadata about the widget
83
+ */
84
+ register(id: string, widget: MountableWidget, source?: string, metadata?: WidgetRegistration["metadata"]): void;
85
+ /**
86
+ * Unregister a widget.
87
+ *
88
+ * @param id - The widget ID to unregister
89
+ * @returns true if the widget was unregistered, false if not found or built-in
90
+ */
91
+ unregister(id: string): boolean;
92
+ /**
93
+ * Unregister all widgets from a specific source.
94
+ *
95
+ * @param source - The source app ID
96
+ */
97
+ unregisterBySource(source: string): void;
98
+ /**
99
+ * Get a widget by ID.
100
+ */
101
+ get(id: string): MountableWidget | undefined;
102
+ /**
103
+ * Get the full registration for a widget.
104
+ */
105
+ getRegistration(id: string): WidgetRegistration | undefined;
106
+ /**
107
+ * Check if a widget exists.
108
+ */
109
+ has(id: string): boolean;
110
+ /**
111
+ * Mount a widget into a container.
112
+ *
113
+ * @param id - The widget ID
114
+ * @param container - The DOM element to mount into
115
+ * @param config - Configuration/props for the widget
116
+ * @returns A handle for managing the mounted widget
117
+ */
118
+ mount(id: string, container: HTMLElement, config?: Record<string, unknown>): MountedWidgetHandle;
119
+ /**
120
+ * List all registered widget IDs.
121
+ */
122
+ list(): string[];
123
+ /**
124
+ * List all registrations.
125
+ */
126
+ listRegistrations(): WidgetRegistration[];
127
+ /**
128
+ * Get all widgets from a specific source.
129
+ */
130
+ getBySource(source: string): WidgetRegistration[];
131
+ /**
132
+ * Clean up all mounted widgets.
133
+ */
134
+ destroy(): void;
135
+ }
136
+ /**
137
+ * Default singleton instance of WidgetRegistry.
138
+ */
139
+ export declare const widgetRegistry: WidgetRegistry;
@@ -0,0 +1,182 @@
1
+ /**
2
+ * Widget Registry
3
+ *
4
+ * Extensible registry for mountable widget components.
5
+ * Apps can register custom widgets that can be rendered via mountWidget actions.
6
+ */
7
+ /**
8
+ * Extensible registry for widget components.
9
+ *
10
+ * Allows apps to register custom widgets that can be rendered via
11
+ * mountWidget actions or directly through the Surfaces system.
12
+ */
13
+ export class WidgetRegistry {
14
+ constructor() {
15
+ this.widgets = new Map();
16
+ this.mountedWidgets = new Map();
17
+ this.mountIdCounter = 0;
18
+ // Built-in widgets can be registered here if needed
19
+ }
20
+ /**
21
+ * Register a widget.
22
+ *
23
+ * @param id - The widget ID (e.g., "gamification:leaderboard")
24
+ * @param widget - The widget component
25
+ * @param source - The source app ID (for tracking)
26
+ * @param metadata - Optional metadata about the widget
27
+ */
28
+ register(id, widget, source = "custom", metadata) {
29
+ if (this.widgets.has(id)) {
30
+ const existing = this.widgets.get(id);
31
+ if (existing.source === "built-in") {
32
+ throw new Error(`Cannot override built-in widget: ${id}`);
33
+ }
34
+ console.warn(`[WidgetRegistry] Overriding widget: ${id}`);
35
+ }
36
+ this.widgets.set(id, {
37
+ id,
38
+ widget,
39
+ source,
40
+ metadata,
41
+ });
42
+ }
43
+ /**
44
+ * Unregister a widget.
45
+ *
46
+ * @param id - The widget ID to unregister
47
+ * @returns true if the widget was unregistered, false if not found or built-in
48
+ */
49
+ unregister(id) {
50
+ const existing = this.widgets.get(id);
51
+ if (!existing) {
52
+ return false;
53
+ }
54
+ if (existing.source === "built-in") {
55
+ console.warn(`[WidgetRegistry] Cannot unregister built-in widget: ${id}`);
56
+ return false;
57
+ }
58
+ this.widgets.delete(id);
59
+ return true;
60
+ }
61
+ /**
62
+ * Unregister all widgets from a specific source.
63
+ *
64
+ * @param source - The source app ID
65
+ */
66
+ unregisterBySource(source) {
67
+ for (const [id, registration] of this.widgets.entries()) {
68
+ if (registration.source === source) {
69
+ this.widgets.delete(id);
70
+ }
71
+ }
72
+ }
73
+ /**
74
+ * Get a widget by ID.
75
+ */
76
+ get(id) {
77
+ var _a;
78
+ return (_a = this.widgets.get(id)) === null || _a === void 0 ? void 0 : _a.widget;
79
+ }
80
+ /**
81
+ * Get the full registration for a widget.
82
+ */
83
+ getRegistration(id) {
84
+ return this.widgets.get(id);
85
+ }
86
+ /**
87
+ * Check if a widget exists.
88
+ */
89
+ has(id) {
90
+ return this.widgets.has(id);
91
+ }
92
+ /**
93
+ * Mount a widget into a container.
94
+ *
95
+ * @param id - The widget ID
96
+ * @param container - The DOM element to mount into
97
+ * @param config - Configuration/props for the widget
98
+ * @returns A handle for managing the mounted widget
99
+ */
100
+ mount(id, container, config) {
101
+ const registration = this.widgets.get(id);
102
+ if (!registration) {
103
+ throw new Error(`Widget not found: ${id}`);
104
+ }
105
+ const mountId = `widget-mount-${++this.mountIdCounter}`;
106
+ container.setAttribute("data-widget-mount-id", mountId);
107
+ container.setAttribute("data-widget-id", id);
108
+ // Mount the widget
109
+ const cleanup = registration.widget.mount(container, config);
110
+ // Track the mounted widget
111
+ this.mountedWidgets.set(mountId, {
112
+ cleanup: cleanup !== null && cleanup !== void 0 ? cleanup : undefined,
113
+ container,
114
+ });
115
+ const handle = {
116
+ widgetId: id,
117
+ container,
118
+ unmount: () => {
119
+ var _a;
120
+ const mounted = this.mountedWidgets.get(mountId);
121
+ if (mounted) {
122
+ (_a = mounted.cleanup) === null || _a === void 0 ? void 0 : _a.call(mounted);
123
+ this.mountedWidgets.delete(mountId);
124
+ container.removeAttribute("data-widget-mount-id");
125
+ container.removeAttribute("data-widget-id");
126
+ container.innerHTML = "";
127
+ }
128
+ },
129
+ update: (newConfig) => {
130
+ var _a;
131
+ if (registration.widget.update) {
132
+ registration.widget.update(container, newConfig);
133
+ }
134
+ else {
135
+ // Unmount and remount with new config
136
+ const mounted = this.mountedWidgets.get(mountId);
137
+ if (mounted) {
138
+ (_a = mounted.cleanup) === null || _a === void 0 ? void 0 : _a.call(mounted);
139
+ container.innerHTML = "";
140
+ const newCleanup = registration.widget.mount(container, newConfig);
141
+ mounted.cleanup = newCleanup !== null && newCleanup !== void 0 ? newCleanup : undefined;
142
+ }
143
+ }
144
+ },
145
+ };
146
+ return handle;
147
+ }
148
+ /**
149
+ * List all registered widget IDs.
150
+ */
151
+ list() {
152
+ return Array.from(this.widgets.keys());
153
+ }
154
+ /**
155
+ * List all registrations.
156
+ */
157
+ listRegistrations() {
158
+ return Array.from(this.widgets.values());
159
+ }
160
+ /**
161
+ * Get all widgets from a specific source.
162
+ */
163
+ getBySource(source) {
164
+ return Array.from(this.widgets.values()).filter((registration) => registration.source === source);
165
+ }
166
+ /**
167
+ * Clean up all mounted widgets.
168
+ */
169
+ destroy() {
170
+ var _a;
171
+ for (const [mountId, mounted] of this.mountedWidgets.entries()) {
172
+ (_a = mounted.cleanup) === null || _a === void 0 ? void 0 : _a.call(mounted);
173
+ mounted.container.innerHTML = "";
174
+ }
175
+ this.mountedWidgets.clear();
176
+ }
177
+ }
178
+ /**
179
+ * Default singleton instance of WidgetRegistry.
180
+ */
181
+ export const widgetRegistry = new WidgetRegistry();
182
+ //# sourceMappingURL=WidgetRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WidgetRegistry.js","sourceRoot":"","sources":["../../src/widgets/WidgetRegistry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiEH;;;;;GAKG;AACH,MAAM,OAAO,cAAc;IAKzB;QAJQ,YAAO,GAAG,IAAI,GAAG,EAA8B,CAAC;QAChD,mBAAc,GAAG,IAAI,GAAG,EAA+D,CAAC;QACxF,mBAAc,GAAG,CAAC,CAAC;QAGzB,oDAAoD;IACtD,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CACN,EAAU,EACV,MAAuB,EACvB,SAAiB,QAAQ,EACzB,QAAyC;QAEzC,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;YACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAE,CAAC;YACvC,IAAI,QAAQ,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;gBACnC,MAAM,IAAI,KAAK,CAAC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AK,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,EAAE,CAAC;YAC/D,MAAA,OAAO,CAAC,OAAO,uDAAI,CAAC;YACpB,OAAO,CAAC,SAAS,CAAC,SAAS,GAAG,EAAE,CAAC;QACnC,CAAC;QACD,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Widgets Module
3
+ *
4
+ * Extensible widget registry for mountable components.
5
+ */
6
+ export { WidgetRegistry, widgetRegistry, } from "./WidgetRegistry";
7
+ export type { MountableWidget, WidgetRegistration, MountedWidgetHandle, WidgetCleanup, } from "./WidgetRegistry";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Widgets Module
3
+ *
4
+ * Extensible widget registry for mountable components.
5
+ */
6
+ export { WidgetRegistry, widgetRegistry, } from "./WidgetRegistry";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/widgets/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,cAAc,GACf,MAAM,kBAAkB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syntrologie/runtime-sdk",
3
- "version": "1.0.1",
3
+ "version": "2.0.0-canary.1",
4
4
  "description": "Syntrologie Runtime SDK for web experimentation and analytics",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -23,6 +23,10 @@
23
23
  "import": "./dist/index.js",
24
24
  "require": "./dist/index.js"
25
25
  },
26
+ "./types": {
27
+ "types": "./dist/types-only.d.ts",
28
+ "import": "./dist/types-only.js"
29
+ },
26
30
  "./react": {
27
31
  "types": "./dist/react.d.ts",
28
32
  "import": "./dist/react.js",
@@ -37,12 +41,12 @@
37
41
  "dist",
38
42
  "schema",
39
43
  "scripts/validate-config.mjs",
40
- "README.md",
41
44
  "CAPABILITIES.md"
42
45
  ],
43
46
  "scripts": {
44
47
  "clean": "rm -rf dist",
45
- "build": "npm run build:lib && npm run build:cdn",
48
+ "aggregate-capabilities": "node ./scripts/aggregate-capabilities.mjs",
49
+ "build": "npm run aggregate-capabilities && npm run build:lib && npm run build:cdn",
46
50
  "build:lib": "tsc --project tsconfig.build.json",
47
51
  "build:cdn": "node ./scripts/build-cdn.js",
48
52
  "validate-config": "node ./scripts/validate-config.mjs",
@@ -52,6 +56,12 @@
52
56
  "@floating-ui/dom": "~1.6.13",
53
57
  "@growthbook/growthbook": "~1.6.2",
54
58
  "@growthbook/growthbook-react": "~1.6.2",
59
+ "@syntrologie/app-content": "*",
60
+ "@syntrologie/app-faq": "*",
61
+ "@syntrologie/app-gamification": "*",
62
+ "@syntrologie/app-nav": "*",
63
+ "@syntrologie/app-navigation": "*",
64
+ "@syntrologie/app-overlays": "*",
55
65
  "posthog-js": "~1.302.2",
56
66
  "react": ">=18.0.0",
57
67
  "react-dom": ">=18.0.0",