@syntrologie/runtime-sdk 2.8.0-canary.13 → 2.8.0-canary.130
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/CAPABILITIES.md +321 -173
- package/README.md +3 -0
- package/dist/SmartCanvasApp.d.ts +4 -1
- package/dist/SmartCanvasElementLit.d.ts +166 -0
- package/dist/actions/schema.d.ts +783 -783
- package/dist/actions/schema.js +3 -3
- package/dist/actions/types.d.ts +9 -3
- package/dist/actions/validation-core.d.ts +24 -0
- package/dist/actions/validation-rules.d.ts +74 -0
- package/dist/actions/validation.d.ts +5 -11
- package/dist/anchor/AnchorResolver.d.ts +1 -0
- package/dist/api-lit.d.ts +84 -0
- package/dist/api.d.ts +3 -0
- package/dist/apps/builtinRuntimeModules-lit.d.ts +20 -0
- package/dist/bootstrap-init.d.ts +35 -0
- package/dist/bootstrap-runtime.d.ts +7 -0
- package/dist/bootstrap-types.d.ts +100 -0
- package/dist/bootstrap.d.ts +19 -83
- package/dist/chunk-2IQ2PTLJ.js +871 -0
- package/dist/chunk-2IQ2PTLJ.js.map +7 -0
- package/dist/chunk-4HXPGXUC.js +226 -0
- package/dist/chunk-4HXPGXUC.js.map +7 -0
- package/dist/{chunk-37TTQRH5.js → chunk-GX7BBYX6.js} +4 -4
- package/dist/chunk-GX7BBYX6.js.map +7 -0
- package/dist/{chunk-G4PH7C7H.js → chunk-SC5B3YCG.js} +2702 -1442
- package/dist/chunk-SC5B3YCG.js.map +7 -0
- package/dist/{chunk-NBFQGKSV.js → chunk-XVRDKBYF.js} +4 -4
- package/dist/{chunk-NBFQGKSV.js.map → chunk-XVRDKBYF.js.map} +2 -2
- package/dist/components/ShadowCanvasOverlay.d.ts +1 -2
- package/dist/components/SyntroCanvasOverlay.d.ts +100 -0
- package/dist/components/SyntroDrawer.d.ts +110 -0
- package/dist/components/SyntroLauncher.d.ts +105 -0
- package/dist/components/SyntroTileCard.d.ts +74 -0
- package/dist/components/SyntroTileWheel.d.ts +51 -0
- package/dist/config/schema.d.ts +147 -136
- package/dist/config/schema.js +2 -2
- package/dist/controllers/DecisionController.d.ts +48 -0
- package/dist/controllers/NotificationsController.d.ts +59 -0
- package/dist/controllers/RuntimeController.d.ts +52 -0
- package/dist/controllers/RuntimeEventsController.d.ts +42 -0
- package/dist/controllers/ThemeController.d.ts +110 -0
- package/dist/controllers/index.d.ts +13 -0
- package/dist/decisions/schema.d.ts +47 -47
- package/dist/decisions/schema.js +1 -1
- package/dist/decisions/types.d.ts +4 -0
- package/dist/editorLoader.d.ts +5 -0
- package/dist/events/EventBus.d.ts +27 -1
- package/dist/events/history.d.ts +9 -0
- package/dist/events/index.d.ts +3 -0
- package/dist/events/types.d.ts +24 -0
- package/dist/events/validation.d.ts +7 -0
- package/dist/fetchers/experimentsFetcher.d.ts +3 -3
- package/dist/fetchers/mergeConfigs.d.ts +7 -7
- package/dist/index-lit.d.ts +40 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.js +2435 -2022
- package/dist/index.js.map +4 -4
- package/dist/interop/LitInReact.d.ts +27 -0
- package/dist/interop/ReactInLit.d.ts +42 -0
- package/dist/interop/index.d.ts +7 -0
- package/dist/metrics/sessionMetrics.d.ts +4 -0
- package/dist/notifications/SyntroToastStack.d.ts +43 -0
- package/dist/overlays/runtime/overlay/overlay-runner.d.ts +4 -0
- package/dist/overlays/runtime/overlay/overlay-state.d.ts +21 -0
- package/dist/overlays/types.d.ts +3 -1
- package/dist/platform/PlatformAdapter.d.ts +46 -0
- package/dist/platform/ShopifyAdapter.d.ts +36 -0
- package/dist/platform/ShopifyAnchorResolver.d.ts +31 -0
- package/dist/platform/ShopifyAntiFlicker.d.ts +21 -0
- package/dist/platform/ShopifyPixelBridge.d.ts +37 -0
- package/dist/platform/detect.d.ts +9 -0
- package/dist/platform/index.d.ts +10 -0
- package/dist/platform/shopify-cookie-contract.d.ts +39 -0
- package/dist/react-compat.d.ts +114 -0
- package/dist/react.js +7 -4
- package/dist/react.js.map +2 -2
- package/dist/shopify-pixel-entry.d.ts +68 -0
- package/dist/shopify-pixel.js +77 -0
- package/dist/shopify-pixel.js.map +7 -0
- package/dist/shopify-pixel.min.js +2 -0
- package/dist/shopify-pixel.min.js.map +7 -0
- package/dist/smart-canvas.esm.js +858 -258
- package/dist/smart-canvas.esm.js.map +4 -4
- package/dist/smart-canvas.js +28024 -36411
- package/dist/smart-canvas.js.map +4 -4
- package/dist/smart-canvas.min.js +857 -258
- package/dist/smart-canvas.min.js.map +4 -4
- package/dist/telemetry/InterventionTracker.d.ts +23 -0
- package/dist/telemetry/adapters/posthog.d.ts +5 -10
- package/dist/telemetry/index.d.ts +1 -0
- package/dist/test/setup.d.ts +1 -0
- package/dist/theme/index.js +30 -0
- package/dist/theme/index.js.map +7 -0
- package/dist/token.d.ts +2 -0
- package/dist/version.d.ts +1 -1
- package/package.json +32 -29
- package/schema/canvas-config.schema.json +2345 -11394
- package/scripts/syntroReactPlugin.mjs +3 -0
- package/scripts/validate-config.mjs +42 -0
- package/dist/chunk-37TTQRH5.js.map +0 -7
- package/dist/chunk-G4PH7C7H.js.map +0 -7
- package/dist/chunk-Q77NT67W.js +0 -203
- package/dist/chunk-Q77NT67W.js.map +0 -7
- package/dist/replayMirror-QZ3GQ527.js +0 -32
- package/dist/replayMirror-QZ3GQ527.js.map +0 -7
- package/dist/telemetry/replayMirror.d.ts +0 -7
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { TelemetryClient } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Tracks 4 intervention metrics via PostHog:
|
|
4
|
+
* - served: config delivered to browser
|
|
5
|
+
* - seen: intervention visible in viewport
|
|
6
|
+
* - triggered: activation conditions met
|
|
7
|
+
* - interacted: user clicked/engaged
|
|
8
|
+
*
|
|
9
|
+
* Deduplication: "seen" and "triggered" fire once per intervention per page.
|
|
10
|
+
* "served" fires once per fetch. "interacted" fires every time.
|
|
11
|
+
*/
|
|
12
|
+
export declare class InterventionTracker {
|
|
13
|
+
private telemetry;
|
|
14
|
+
private variantId;
|
|
15
|
+
private seenSet;
|
|
16
|
+
private triggeredSet;
|
|
17
|
+
constructor(telemetry: TelemetryClient, variantId: string);
|
|
18
|
+
trackServed(tiles: number, actions: number): void;
|
|
19
|
+
trackSeen(interventionId: string, interventionKind: string): void;
|
|
20
|
+
trackTriggered(interventionId: string, interventionKind: string): void;
|
|
21
|
+
trackInteracted(interventionId: string, interventionKind: string, interactionType: string): void;
|
|
22
|
+
resetPage(): void;
|
|
23
|
+
}
|
|
@@ -32,10 +32,12 @@ export interface PostHogAdapterOptions {
|
|
|
32
32
|
*/
|
|
33
33
|
sessionRecording?: boolean;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
35
|
+
* Pageview capture mode.
|
|
36
|
+
* - true: capture only on initial page load
|
|
37
|
+
* - 'history_change': auto-capture on SPA navigation (pushState/replaceState)
|
|
38
|
+
* @default "history_change"
|
|
37
39
|
*/
|
|
38
|
-
capturePageview?: boolean;
|
|
40
|
+
capturePageview?: boolean | 'history_change';
|
|
39
41
|
/**
|
|
40
42
|
* Enable page leave capture.
|
|
41
43
|
* @default true
|
|
@@ -77,12 +79,6 @@ export interface PostHogAdapterOptions {
|
|
|
77
79
|
* @default false
|
|
78
80
|
*/
|
|
79
81
|
behavioralSignals?: boolean | Record<string, number>;
|
|
80
|
-
/**
|
|
81
|
-
* Endpoint URL to mirror session recording payloads.
|
|
82
|
-
* When set, recording requests to PostHog's /s/ endpoint are also
|
|
83
|
-
* sent (fire-and-forget) to this URL.
|
|
84
|
-
*/
|
|
85
|
-
replayMirrorEndpoint?: string;
|
|
86
82
|
/**
|
|
87
83
|
* Callback for raw rrweb events from session recording.
|
|
88
84
|
* Called with each rrweb eventWithTime before PostHog processes it.
|
|
@@ -103,7 +99,6 @@ export declare class PostHogAdapter implements TelemetryClient {
|
|
|
103
99
|
private featureFlagsCallback?;
|
|
104
100
|
private captureCallback?;
|
|
105
101
|
private rrwebCallback?;
|
|
106
|
-
private consentUnsub?;
|
|
107
102
|
constructor(options?: PostHogAdapterOptions);
|
|
108
103
|
/**
|
|
109
104
|
* Initialize the PostHog client. Called immediately (no consent gate)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { createNoopClient } from './adapters/noop';
|
|
2
2
|
export type { PostHogAdapterOptions } from './adapters/posthog';
|
|
3
3
|
export { createPostHogClient } from './adapters/posthog';
|
|
4
|
+
export { InterventionTracker } from './InterventionTracker';
|
|
4
5
|
export type { CanvasSurface, TelemetryClient } from './types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom/vitest';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ThemeProvider,
|
|
3
|
+
darkDefaults,
|
|
4
|
+
darkTheme,
|
|
5
|
+
flattenThemeConfig,
|
|
6
|
+
getDefaultTheme,
|
|
7
|
+
lightDefaults,
|
|
8
|
+
lightTheme,
|
|
9
|
+
mergeThemeConfig,
|
|
10
|
+
mergeThemeWithWorkspace,
|
|
11
|
+
themeToCssVariables,
|
|
12
|
+
useTheme,
|
|
13
|
+
withAlpha
|
|
14
|
+
} from "../chunk-2IQ2PTLJ.js";
|
|
15
|
+
import "../chunk-JMHRHAEL.js";
|
|
16
|
+
export {
|
|
17
|
+
ThemeProvider,
|
|
18
|
+
darkDefaults,
|
|
19
|
+
darkTheme,
|
|
20
|
+
flattenThemeConfig,
|
|
21
|
+
getDefaultTheme,
|
|
22
|
+
lightDefaults,
|
|
23
|
+
lightTheme,
|
|
24
|
+
mergeThemeConfig,
|
|
25
|
+
mergeThemeWithWorkspace,
|
|
26
|
+
themeToCssVariables,
|
|
27
|
+
useTheme,
|
|
28
|
+
withAlpha
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
package/dist/token.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export interface SyntroTokenPayload {
|
|
|
20
20
|
f?: string;
|
|
21
21
|
/** Fetcher-specific options (e.g., configId for cdn fetcher) */
|
|
22
22
|
o?: Record<string, string>;
|
|
23
|
+
/** Geo worker URL (e.g., "https://dev-geo.syntrologie.com" for dev) */
|
|
24
|
+
g?: string;
|
|
23
25
|
/** Debug mode - enables console logging (default: false) */
|
|
24
26
|
d?: boolean;
|
|
25
27
|
}
|
package/dist/version.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syntrologie/runtime-sdk",
|
|
3
|
-
"version": "2.8.0-canary.
|
|
3
|
+
"version": "2.8.0-canary.130",
|
|
4
4
|
"description": "Syntrologie Runtime SDK for web experimentation and analytics",
|
|
5
5
|
"license": "Proprietary",
|
|
6
6
|
"private": false,
|
|
@@ -27,6 +27,10 @@
|
|
|
27
27
|
"types": "./dist/types-only.d.ts",
|
|
28
28
|
"import": "./dist/types-only.js"
|
|
29
29
|
},
|
|
30
|
+
"./theme": {
|
|
31
|
+
"types": "./dist/theme/index.d.ts",
|
|
32
|
+
"import": "./dist/theme/index.js"
|
|
33
|
+
},
|
|
30
34
|
"./react": {
|
|
31
35
|
"types": "./dist/react.d.ts",
|
|
32
36
|
"import": "./dist/react.js",
|
|
@@ -61,47 +65,46 @@
|
|
|
61
65
|
"validate-config": "node ./scripts/validate-config.mjs",
|
|
62
66
|
"typecheck": "tsc --noEmit -p tsconfig.build.json",
|
|
63
67
|
"test": "vitest run",
|
|
64
|
-
"
|
|
68
|
+
"strip-internal-deps": "node ./scripts/strip-internal-deps.mjs",
|
|
69
|
+
"prepublishOnly": "npm run clean && npm run build && npm run strip-internal-deps"
|
|
65
70
|
},
|
|
66
71
|
"dependencies": {
|
|
67
|
-
"@floating-ui/dom": "
|
|
72
|
+
"@floating-ui/dom": "1.7.5",
|
|
68
73
|
"@growthbook/growthbook": "~1.6.2",
|
|
69
|
-
"@growthbook/growthbook-react": "
|
|
70
|
-
"@
|
|
71
|
-
"@
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"@syntrologie/event-processor": "*",
|
|
77
|
-
"lucide-react": "^0.576.0",
|
|
78
|
-
"posthog-js": "~1.302.2",
|
|
79
|
-
"zod": "^3.25.76"
|
|
74
|
+
"@growthbook/growthbook-react": "1.6.4",
|
|
75
|
+
"@lit/context": "1.1.6",
|
|
76
|
+
"@lit/task": "1.0.3",
|
|
77
|
+
"lit": "3.3.2",
|
|
78
|
+
"lucide-react": "0.576.0",
|
|
79
|
+
"posthog-js": "1.341.0",
|
|
80
|
+
"zod": "3.25.76"
|
|
80
81
|
},
|
|
81
82
|
"peerDependencies": {
|
|
82
83
|
"react": ">=18.0.0",
|
|
83
84
|
"react-dom": ">=18.0.0"
|
|
84
85
|
},
|
|
85
86
|
"devDependencies": {
|
|
87
|
+
"@open-wc/testing": "4.0.0",
|
|
88
|
+
"@open-wc/testing-helpers": "3.0.1",
|
|
86
89
|
"@semantic-release/exec": "~7.1.0",
|
|
87
90
|
"@semantic-release/github": "~12.0.3",
|
|
88
91
|
"@semantic-release/npm": "~13.1.3",
|
|
89
92
|
"@syntro/design-system": "*",
|
|
90
|
-
"@testing-library/dom": "
|
|
91
|
-
"@testing-library/jest-dom": "
|
|
92
|
-
"@testing-library/react": "
|
|
93
|
-
"@types/node": "
|
|
94
|
-
"@types/react": "
|
|
95
|
-
"@types/react-dom": "
|
|
96
|
-
"ajv": "
|
|
97
|
-
"ajv-formats": "
|
|
98
|
-
"esbuild": "
|
|
99
|
-
"jsdom": "
|
|
100
|
-
"react": "
|
|
101
|
-
"react-dom": "
|
|
93
|
+
"@testing-library/dom": "10.4.1",
|
|
94
|
+
"@testing-library/jest-dom": "6.9.1",
|
|
95
|
+
"@testing-library/react": "16.3.2",
|
|
96
|
+
"@types/node": "22.19.7",
|
|
97
|
+
"@types/react": "19.2.14",
|
|
98
|
+
"@types/react-dom": "19.2.3",
|
|
99
|
+
"ajv": "8.18.0",
|
|
100
|
+
"ajv-formats": "3.0.1",
|
|
101
|
+
"esbuild": "0.27.2",
|
|
102
|
+
"jsdom": "26.1.0",
|
|
103
|
+
"react": "19.2.1",
|
|
104
|
+
"react-dom": "19.2.1",
|
|
102
105
|
"semantic-release": "~25.0.3",
|
|
103
|
-
"typescript": "
|
|
104
|
-
"vitest": "
|
|
105
|
-
"zod-to-json-schema": "
|
|
106
|
+
"typescript": "5.9.3",
|
|
107
|
+
"vitest": "4.0.18",
|
|
108
|
+
"zod-to-json-schema": "3.25.1"
|
|
106
109
|
}
|
|
107
110
|
}
|