@syntrologie/runtime-sdk 2.0.0 → 2.0.1-canary.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/CAPABILITIES.md +232 -138
- package/README.md +76 -57
- package/dist/RuntimeProvider.d.ts +6 -6
- package/dist/RuntimeProvider.js +2 -3
- package/dist/RuntimeProvider.js.map +1 -1
- package/dist/SmartCanvasApp.d.ts +8 -8
- package/dist/SmartCanvasApp.js +16 -18
- package/dist/SmartCanvasApp.js.map +1 -1
- package/dist/SmartCanvasElement.d.ts +5 -5
- package/dist/SmartCanvasElement.js +13 -13
- package/dist/SmartCanvasElement.js.map +1 -1
- package/dist/SmartCanvasPortal.d.ts +2 -2
- package/dist/SmartCanvasPortal.js +2 -2
- package/dist/actions/ActionEngine.d.ts +1 -1
- package/dist/actions/ActionEngine.js +24 -24
- package/dist/actions/ActionEngine.js.map +1 -1
- package/dist/actions/executors/index.d.ts +6 -6
- package/dist/actions/executors/index.js +22 -22
- package/dist/actions/executors/index.js.map +1 -1
- package/dist/actions/executors/tour.d.ts +1 -1
- package/dist/actions/executors/tour.js +19 -19
- package/dist/actions/executors/tour.js.map +1 -1
- package/dist/actions/index.d.ts +5 -5
- package/dist/actions/index.js +3 -3
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/types.d.ts +37 -37
- package/dist/actions/validation.d.ts +1 -1
- package/dist/actions/validation.js +195 -196
- package/dist/actions/validation.js.map +1 -1
- package/dist/antiFlicker.js +1 -1
- package/dist/api.d.ts +10 -10
- package/dist/api.js +11 -11
- package/dist/api.js.map +1 -1
- package/dist/apps/AppContext.d.ts +2 -2
- package/dist/apps/AppContext.js +1 -1
- package/dist/apps/AppContext.js.map +1 -1
- package/dist/apps/AppLoader.d.ts +2 -2
- package/dist/apps/AppLoader.js +24 -24
- package/dist/apps/AppLoader.js.map +1 -1
- package/dist/apps/AppRegistry.d.ts +2 -2
- package/dist/apps/AppRegistry.js +28 -28
- package/dist/apps/AppRegistry.js.map +1 -1
- package/dist/apps/adaptive-chatbot/index.js +7 -0
- package/dist/apps/adaptive-chatbot/index.js.map +7 -0
- package/dist/apps/examples/gamification-app.example.d.ts +3 -3
- package/dist/apps/examples/gamification-app.example.js +94 -94
- package/dist/apps/examples/gamification-app.example.js.map +1 -1
- package/dist/apps/faq/index.js.map +3 -3
- package/dist/apps/gamification/index.js.map +3 -3
- package/dist/apps/index.d.ts +10 -10
- package/dist/apps/index.js +6 -6
- package/dist/apps/nav/index.js.map +3 -3
- package/dist/apps/types.d.ts +10 -10
- package/dist/blocks/data/ComparisonBlock.d.ts +1 -1
- package/dist/blocks/data/ComparisonBlock.js +40 -40
- package/dist/blocks/data/ComparisonBlock.js.map +1 -1
- package/dist/blocks/data/StatsBlock.d.ts +1 -1
- package/dist/blocks/data/StatsBlock.js +41 -41
- package/dist/blocks/data/StatsBlock.js.map +1 -1
- package/dist/blocks/data/index.d.ts +2 -2
- package/dist/blocks/data/index.js +2 -2
- package/dist/blocks/index.d.ts +5 -5
- package/dist/blocks/index.js +29 -29
- package/dist/blocks/index.js.map +1 -1
- package/dist/blocks/interactive/ChecklistBlock.d.ts +1 -1
- package/dist/blocks/interactive/ChecklistBlock.js +60 -60
- package/dist/blocks/interactive/ChecklistBlock.js.map +1 -1
- package/dist/blocks/interactive/RatingBlock.d.ts +1 -1
- package/dist/blocks/interactive/RatingBlock.js +75 -65
- package/dist/blocks/interactive/RatingBlock.js.map +1 -1
- package/dist/blocks/interactive/index.d.ts +2 -2
- package/dist/blocks/interactive/index.js +2 -2
- package/dist/blocks/notification/NotificationBlock.d.ts +2 -2
- package/dist/blocks/notification/NotificationBlock.js +67 -63
- package/dist/blocks/notification/NotificationBlock.js.map +1 -1
- package/dist/blocks/notification/index.d.ts +1 -1
- package/dist/blocks/notification/index.js +1 -1
- package/dist/bootstrap.d.ts +10 -10
- package/dist/bootstrap.js +54 -40
- package/dist/bootstrap.js.map +1 -1
- package/dist/components/ShadowCanvasOverlay.d.ts +6 -6
- package/dist/components/ShadowCanvasOverlay.js +117 -107
- package/dist/components/ShadowCanvasOverlay.js.map +1 -1
- package/dist/components/TileCard.d.ts +5 -5
- package/dist/components/TileCard.js +174 -143
- package/dist/components/TileCard.js.map +1 -1
- package/dist/components/TileWheel.d.ts +3 -3
- package/dist/components/TileWheel.js +7 -7
- package/dist/components/TileWheel.js.map +1 -1
- package/dist/configFetcher.d.ts +2 -2
- package/dist/configFetcher.js +10 -7
- package/dist/configFetcher.js.map +1 -1
- package/dist/context/ContextManager.d.ts +3 -3
- package/dist/context/ContextManager.js +15 -15
- package/dist/context/ContextManager.js.map +1 -1
- package/dist/context/index.d.ts +4 -4
- package/dist/context/index.js +3 -3
- package/dist/context/schema.d.ts +1 -1
- package/dist/context/schema.js +1 -1
- package/dist/decisions/engine.d.ts +5 -5
- package/dist/decisions/engine.js +13 -13
- package/dist/decisions/index.d.ts +6 -6
- package/dist/decisions/index.js +5 -5
- package/dist/decisions/schema.d.ts +1 -1
- package/dist/decisions/schema.js +20 -20
- package/dist/decisions/strategies/rules.d.ts +1 -1
- package/dist/decisions/strategies/rules.js +24 -24
- package/dist/decisions/strategies/rules.js.map +1 -1
- package/dist/decisions/strategies/score.d.ts +1 -1
- package/dist/decisions/strategies/score.js +3 -3
- package/dist/decisions/types.d.ts +19 -19
- package/dist/editorLoader.js +20 -20
- package/dist/editorLoader.js.map +1 -1
- package/dist/events/EventBus.d.ts +3 -3
- package/dist/events/EventBus.js +5 -7
- package/dist/events/EventBus.js.map +1 -1
- package/dist/events/index.d.ts +6 -6
- package/dist/events/index.js +5 -5
- package/dist/events/normalizers/canvas.d.ts +2 -2
- package/dist/events/normalizers/canvas.js +3 -3
- package/dist/events/normalizers/canvas.js.map +1 -1
- package/dist/events/normalizers/posthog.d.ts +1 -1
- package/dist/events/normalizers/posthog.js +34 -27
- package/dist/events/normalizers/posthog.js.map +1 -1
- package/dist/events/schema.d.ts +1 -1
- package/dist/events/schema.js +2 -2
- package/dist/events/types.d.ts +1 -1
- package/dist/events/types.js +27 -27
- package/dist/experiments/adapters/growthbook.d.ts +4 -4
- package/dist/experiments/adapters/growthbook.js +5 -5
- package/dist/experiments/adapters/growthbook.js.map +1 -1
- package/dist/experiments/index.d.ts +3 -3
- package/dist/experiments/index.js +1 -1
- package/dist/experiments/registry.d.ts +2 -2
- package/dist/experiments/registry.js +2 -2
- package/dist/experiments/types.d.ts +5 -1
- package/dist/fetchers/cdnFetcher.d.ts +1 -1
- package/dist/fetchers/cdnFetcher.js +4 -8
- package/dist/fetchers/cdnFetcher.js.map +1 -1
- package/dist/fetchers/experimentsFetcher.d.ts +2 -2
- package/dist/fetchers/experimentsFetcher.js +7 -7
- package/dist/fetchers/experimentsFetcher.js.map +1 -1
- package/dist/fetchers/index.d.ts +3 -3
- package/dist/fetchers/index.js +2 -2
- package/dist/fetchers/index.js.map +1 -1
- package/dist/fetchers/registry.d.ts +1 -1
- package/dist/fetchers/registry.js +4 -4
- package/dist/fetchers/types.d.ts +1 -1
- package/dist/hooks/useCanvasOverlays.d.ts +5 -5
- package/dist/hooks/useCanvasOverlays.js +15 -13
- package/dist/hooks/useCanvasOverlays.js.map +1 -1
- package/dist/hooks/useHostPatches.d.ts +2 -2
- package/dist/hooks/useHostPatches.js +8 -8
- package/dist/hooks/useHostPatches.js.map +1 -1
- package/dist/hooks/useShadowCanvasConfig.d.ts +3 -3
- package/dist/hooks/useShadowCanvasConfig.js +5 -2
- package/dist/hooks/useShadowCanvasConfig.js.map +1 -1
- package/dist/hostPatcher/core/patcher.d.ts +1 -1
- package/dist/hostPatcher/core/patcher.js +18 -9
- package/dist/hostPatcher/core/patcher.js.map +1 -1
- package/dist/hostPatcher/core/sanitizer.js +24 -3
- package/dist/hostPatcher/core/sanitizer.js.map +1 -1
- package/dist/hostPatcher/policy/defaultPolicy.js +15 -5
- package/dist/hostPatcher/policy/defaultPolicy.js.map +1 -1
- package/dist/hostPatcher/utils/anchors.js +4 -6
- package/dist/hostPatcher/utils/anchors.js.map +1 -1
- package/dist/index.d.ts +32 -32
- package/dist/index.js +29 -29
- package/dist/index.js.map +1 -1
- package/dist/metrics/index.d.ts +1 -1
- package/dist/metrics/index.js +1 -1
- package/dist/metrics/sessionMetrics.d.ts +1 -1
- package/dist/metrics/sessionMetrics.js +6 -6
- package/dist/overlays/fetcher.d.ts +2 -2
- package/dist/overlays/fetcher.js +4 -4
- package/dist/overlays/recipeRegistry.js +2 -2
- package/dist/overlays/recipeRegistry.js.map +1 -1
- package/dist/overlays/runtime/anchor/resolve.js +1 -1
- package/dist/overlays/runtime/anchor/resolve.js.map +1 -1
- package/dist/overlays/runtime/index.d.ts +7 -7
- package/dist/overlays/runtime/index.js +7 -7
- package/dist/overlays/runtime/overlay/highlight.js +39 -39
- package/dist/overlays/runtime/overlay/highlight.js.map +1 -1
- package/dist/overlays/runtime/overlay/modal.js +5 -5
- package/dist/overlays/runtime/overlay/modal.js.map +1 -1
- package/dist/overlays/runtime/overlay/root.js +1 -1
- package/dist/overlays/runtime/overlay/runner.js +70 -23
- package/dist/overlays/runtime/overlay/runner.js.map +1 -1
- package/dist/overlays/runtime/overlay/tooltip.d.ts +1 -1
- package/dist/overlays/runtime/overlay/tooltip.js +10 -10
- package/dist/overlays/runtime/overlay/tooltip.js.map +1 -1
- package/dist/overlays/runtime/utils/dom.js +4 -1
- package/dist/overlays/runtime/utils/dom.js.map +1 -1
- package/dist/overlays/schema.js +12 -8
- package/dist/overlays/schema.js.map +1 -1
- package/dist/react.d.ts +7 -7
- package/dist/react.js +4 -4
- package/dist/react.js.map +1 -1
- package/dist/render/RenderContext.d.ts +2 -2
- package/dist/render/RenderContext.js +5 -5
- package/dist/render/RenderContext.js.map +1 -1
- package/dist/render/index.d.ts +3 -3
- package/dist/render/index.js +1 -1
- package/dist/render/types.d.ts +4 -4
- package/dist/runtime.d.ts +12 -12
- package/dist/runtime.js +20 -20
- package/dist/runtime.js.map +1 -1
- package/dist/smart-canvas.esm.js +16 -16
- package/dist/smart-canvas.esm.js.map +4 -4
- package/dist/smart-canvas.js +644 -491
- package/dist/smart-canvas.js.map +4 -4
- package/dist/smart-canvas.min.js +15 -15
- package/dist/smart-canvas.min.js.map +4 -4
- package/dist/state/StateStore.d.ts +1 -1
- package/dist/state/StateStore.js +9 -9
- package/dist/state/StateStore.js.map +1 -1
- package/dist/state/helpers/cooldowns.d.ts +1 -1
- package/dist/state/helpers/cooldowns.js +1 -1
- package/dist/state/helpers/dismissals.d.ts +1 -1
- package/dist/state/helpers/dismissals.js +1 -1
- package/dist/state/helpers/frequency.d.ts +1 -1
- package/dist/state/helpers/frequency.js +1 -1
- package/dist/state/index.d.ts +4 -4
- package/dist/state/index.js +3 -3
- package/dist/state/schema.d.ts +1 -1
- package/dist/state/schema.js +1 -1
- package/dist/store/example.js +13 -13
- package/dist/store/example.js.map +1 -1
- package/dist/store/mini-effector.js +6 -8
- package/dist/store/mini-effector.js.map +1 -1
- package/dist/surfaces/Surfaces.d.ts +1 -1
- package/dist/surfaces/Surfaces.js +25 -25
- package/dist/surfaces/Surfaces.js.map +1 -1
- package/dist/surfaces/index.d.ts +4 -4
- package/dist/surfaces/index.js +3 -3
- package/dist/surfaces/positioning.d.ts +2 -2
- package/dist/surfaces/positioning.js +74 -77
- package/dist/surfaces/positioning.js.map +1 -1
- package/dist/surfaces/types.d.ts +9 -9
- package/dist/surfaces/types.js +7 -7
- package/dist/surfaces/types.js.map +1 -1
- package/dist/telemetry/adapters/noop.d.ts +12 -0
- package/dist/telemetry/adapters/noop.js +42 -0
- package/dist/telemetry/adapters/noop.js.map +1 -0
- package/dist/telemetry/adapters/posthog.d.ts +2 -2
- package/dist/telemetry/adapters/posthog.js +29 -16
- package/dist/telemetry/adapters/posthog.js.map +1 -1
- package/dist/telemetry/index.d.ts +4 -3
- package/dist/telemetry/index.js +3 -2
- package/dist/telemetry/index.js.map +1 -1
- package/dist/telemetry/registry.d.ts +2 -2
- package/dist/telemetry/registry.js +4 -2
- package/dist/telemetry/registry.js.map +1 -1
- package/dist/telemetry/types.d.ts +1 -1
- package/dist/theme/ThemeProvider.d.ts +2 -2
- package/dist/theme/ThemeProvider.js +21 -21
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/theme/defaultTheme.d.ts +2 -2
- package/dist/theme/defaultTheme.js +111 -111
- package/dist/theme/defaultTheme.js.map +1 -1
- package/dist/theme/extractHostTheme.d.ts +1 -1
- package/dist/theme/extractHostTheme.js +42 -44
- package/dist/theme/extractHostTheme.js.map +1 -1
- package/dist/theme/index.d.ts +5 -5
- package/dist/theme/index.js +3 -3
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/types.d.ts +2 -2
- package/dist/token.js +3 -6
- package/dist/token.js.map +1 -1
- package/dist/types-only.d.ts +1 -1
- package/dist/types.d.ts +43 -43
- package/dist/widgets/WidgetRegistry.d.ts +2 -2
- package/dist/widgets/WidgetRegistry.js +11 -11
- package/dist/widgets/WidgetRegistry.js.map +1 -1
- package/dist/widgets/index.d.ts +2 -2
- package/dist/widgets/index.js +1 -1
- package/dist/widgets/index.js.map +1 -1
- package/package.json +4 -2
- package/schema/canvas-config.schema.json +51 -7
- package/schema/runtime-context.schema.json +1 -5
package/dist/smart-canvas.js
CHANGED
|
@@ -39,9 +39,9 @@ var SyntrologieSDK = (() => {
|
|
|
39
39
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
40
40
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
41
41
|
|
|
42
|
-
//
|
|
42
|
+
// node_modules/react/cjs/react.development.js
|
|
43
43
|
var require_react_development = __commonJS({
|
|
44
|
-
"
|
|
44
|
+
"node_modules/react/cjs/react.development.js"(exports, module) {
|
|
45
45
|
"use strict";
|
|
46
46
|
if (true) {
|
|
47
47
|
(function() {
|
|
@@ -524,7 +524,7 @@ var SyntrologieSDK = (() => {
|
|
|
524
524
|
}
|
|
525
525
|
return element;
|
|
526
526
|
};
|
|
527
|
-
function
|
|
527
|
+
function createElement(type, config, children) {
|
|
528
528
|
var propName;
|
|
529
529
|
var props = {};
|
|
530
530
|
var key = null;
|
|
@@ -798,7 +798,7 @@ var SyntrologieSDK = (() => {
|
|
|
798
798
|
}
|
|
799
799
|
return children;
|
|
800
800
|
}
|
|
801
|
-
function
|
|
801
|
+
function createContext2(defaultValue) {
|
|
802
802
|
var context = {
|
|
803
803
|
$$typeof: REACT_CONTEXT_TYPE,
|
|
804
804
|
// As a workaround to support multiple concurrent renderers, we categorize
|
|
@@ -1084,7 +1084,7 @@ var SyntrologieSDK = (() => {
|
|
|
1084
1084
|
}
|
|
1085
1085
|
return dispatcher;
|
|
1086
1086
|
}
|
|
1087
|
-
function
|
|
1087
|
+
function useContext2(Context) {
|
|
1088
1088
|
var dispatcher = resolveDispatcher();
|
|
1089
1089
|
{
|
|
1090
1090
|
if (Context._context !== void 0) {
|
|
@@ -1098,7 +1098,7 @@ var SyntrologieSDK = (() => {
|
|
|
1098
1098
|
}
|
|
1099
1099
|
return dispatcher.useContext(Context);
|
|
1100
1100
|
}
|
|
1101
|
-
function
|
|
1101
|
+
function useState10(initialState) {
|
|
1102
1102
|
var dispatcher = resolveDispatcher();
|
|
1103
1103
|
return dispatcher.useState(initialState);
|
|
1104
1104
|
}
|
|
@@ -1106,11 +1106,11 @@ var SyntrologieSDK = (() => {
|
|
|
1106
1106
|
var dispatcher = resolveDispatcher();
|
|
1107
1107
|
return dispatcher.useReducer(reducer, initialArg, init2);
|
|
1108
1108
|
}
|
|
1109
|
-
function
|
|
1109
|
+
function useRef2(initialValue) {
|
|
1110
1110
|
var dispatcher = resolveDispatcher();
|
|
1111
1111
|
return dispatcher.useRef(initialValue);
|
|
1112
1112
|
}
|
|
1113
|
-
function
|
|
1113
|
+
function useEffect8(create, deps) {
|
|
1114
1114
|
var dispatcher = resolveDispatcher();
|
|
1115
1115
|
return dispatcher.useEffect(create, deps);
|
|
1116
1116
|
}
|
|
@@ -1126,7 +1126,7 @@ var SyntrologieSDK = (() => {
|
|
|
1126
1126
|
var dispatcher = resolveDispatcher();
|
|
1127
1127
|
return dispatcher.useCallback(callback, deps);
|
|
1128
1128
|
}
|
|
1129
|
-
function
|
|
1129
|
+
function useMemo6(create, deps) {
|
|
1130
1130
|
var dispatcher = resolveDispatcher();
|
|
1131
1131
|
return dispatcher.useMemo(create, deps);
|
|
1132
1132
|
}
|
|
@@ -1623,7 +1623,7 @@ var SyntrologieSDK = (() => {
|
|
|
1623
1623
|
error2("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
|
1624
1624
|
}
|
|
1625
1625
|
}
|
|
1626
|
-
var element =
|
|
1626
|
+
var element = createElement.apply(this, arguments);
|
|
1627
1627
|
if (element == null) {
|
|
1628
1628
|
return element;
|
|
1629
1629
|
}
|
|
@@ -1879,7 +1879,7 @@ var SyntrologieSDK = (() => {
|
|
|
1879
1879
|
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
|
|
1880
1880
|
exports.act = act;
|
|
1881
1881
|
exports.cloneElement = cloneElement$1;
|
|
1882
|
-
exports.createContext =
|
|
1882
|
+
exports.createContext = createContext2;
|
|
1883
1883
|
exports.createElement = createElement$1;
|
|
1884
1884
|
exports.createFactory = createFactory;
|
|
1885
1885
|
exports.createRef = createRef;
|
|
@@ -1890,18 +1890,18 @@ var SyntrologieSDK = (() => {
|
|
|
1890
1890
|
exports.startTransition = startTransition;
|
|
1891
1891
|
exports.unstable_act = act;
|
|
1892
1892
|
exports.useCallback = useCallback4;
|
|
1893
|
-
exports.useContext =
|
|
1893
|
+
exports.useContext = useContext2;
|
|
1894
1894
|
exports.useDebugValue = useDebugValue;
|
|
1895
1895
|
exports.useDeferredValue = useDeferredValue;
|
|
1896
|
-
exports.useEffect =
|
|
1896
|
+
exports.useEffect = useEffect8;
|
|
1897
1897
|
exports.useId = useId;
|
|
1898
1898
|
exports.useImperativeHandle = useImperativeHandle;
|
|
1899
1899
|
exports.useInsertionEffect = useInsertionEffect;
|
|
1900
1900
|
exports.useLayoutEffect = useLayoutEffect2;
|
|
1901
|
-
exports.useMemo =
|
|
1901
|
+
exports.useMemo = useMemo6;
|
|
1902
1902
|
exports.useReducer = useReducer;
|
|
1903
|
-
exports.useRef =
|
|
1904
|
-
exports.useState =
|
|
1903
|
+
exports.useRef = useRef2;
|
|
1904
|
+
exports.useState = useState10;
|
|
1905
1905
|
exports.useSyncExternalStore = useSyncExternalStore;
|
|
1906
1906
|
exports.useTransition = useTransition;
|
|
1907
1907
|
exports.version = ReactVersion;
|
|
@@ -1913,9 +1913,9 @@ var SyntrologieSDK = (() => {
|
|
|
1913
1913
|
}
|
|
1914
1914
|
});
|
|
1915
1915
|
|
|
1916
|
-
//
|
|
1916
|
+
// node_modules/react/index.js
|
|
1917
1917
|
var require_react = __commonJS({
|
|
1918
|
-
"
|
|
1918
|
+
"node_modules/react/index.js"(exports, module) {
|
|
1919
1919
|
"use strict";
|
|
1920
1920
|
if (false) {
|
|
1921
1921
|
module.exports = null;
|
|
@@ -1925,14 +1925,14 @@ var SyntrologieSDK = (() => {
|
|
|
1925
1925
|
}
|
|
1926
1926
|
});
|
|
1927
1927
|
|
|
1928
|
-
//
|
|
1928
|
+
// node_modules/react/cjs/react-jsx-runtime.development.js
|
|
1929
1929
|
var require_react_jsx_runtime_development = __commonJS({
|
|
1930
|
-
"
|
|
1930
|
+
"node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
|
|
1931
1931
|
"use strict";
|
|
1932
1932
|
if (true) {
|
|
1933
1933
|
(function() {
|
|
1934
1934
|
"use strict";
|
|
1935
|
-
var
|
|
1935
|
+
var React = require_react();
|
|
1936
1936
|
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
|
|
1937
1937
|
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
|
1938
1938
|
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
@@ -1958,7 +1958,7 @@ var SyntrologieSDK = (() => {
|
|
|
1958
1958
|
}
|
|
1959
1959
|
return null;
|
|
1960
1960
|
}
|
|
1961
|
-
var ReactSharedInternals =
|
|
1961
|
+
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
1962
1962
|
function error2(format) {
|
|
1963
1963
|
{
|
|
1964
1964
|
{
|
|
@@ -2818,9 +2818,9 @@ var SyntrologieSDK = (() => {
|
|
|
2818
2818
|
}
|
|
2819
2819
|
});
|
|
2820
2820
|
|
|
2821
|
-
//
|
|
2821
|
+
// node_modules/react/jsx-runtime.js
|
|
2822
2822
|
var require_jsx_runtime = __commonJS({
|
|
2823
|
-
"
|
|
2823
|
+
"node_modules/react/jsx-runtime.js"(exports, module) {
|
|
2824
2824
|
"use strict";
|
|
2825
2825
|
if (false) {
|
|
2826
2826
|
module.exports = null;
|
|
@@ -2830,9 +2830,9 @@ var SyntrologieSDK = (() => {
|
|
|
2830
2830
|
}
|
|
2831
2831
|
});
|
|
2832
2832
|
|
|
2833
|
-
//
|
|
2833
|
+
// node_modules/scheduler/cjs/scheduler.development.js
|
|
2834
2834
|
var require_scheduler_development = __commonJS({
|
|
2835
|
-
"
|
|
2835
|
+
"node_modules/scheduler/cjs/scheduler.development.js"(exports) {
|
|
2836
2836
|
"use strict";
|
|
2837
2837
|
if (true) {
|
|
2838
2838
|
(function() {
|
|
@@ -3280,9 +3280,9 @@ var SyntrologieSDK = (() => {
|
|
|
3280
3280
|
}
|
|
3281
3281
|
});
|
|
3282
3282
|
|
|
3283
|
-
//
|
|
3283
|
+
// node_modules/scheduler/index.js
|
|
3284
3284
|
var require_scheduler = __commonJS({
|
|
3285
|
-
"
|
|
3285
|
+
"node_modules/scheduler/index.js"(exports, module) {
|
|
3286
3286
|
"use strict";
|
|
3287
3287
|
if (false) {
|
|
3288
3288
|
module.exports = null;
|
|
@@ -3292,9 +3292,9 @@ var SyntrologieSDK = (() => {
|
|
|
3292
3292
|
}
|
|
3293
3293
|
});
|
|
3294
3294
|
|
|
3295
|
-
//
|
|
3295
|
+
// node_modules/react-dom/cjs/react-dom.development.js
|
|
3296
3296
|
var require_react_dom_development = __commonJS({
|
|
3297
|
-
"
|
|
3297
|
+
"node_modules/react-dom/cjs/react-dom.development.js"(exports) {
|
|
3298
3298
|
"use strict";
|
|
3299
3299
|
if (true) {
|
|
3300
3300
|
(function() {
|
|
@@ -3302,9 +3302,9 @@ var SyntrologieSDK = (() => {
|
|
|
3302
3302
|
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
|
|
3303
3303
|
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
3304
3304
|
}
|
|
3305
|
-
var
|
|
3305
|
+
var React = require_react();
|
|
3306
3306
|
var Scheduler = require_scheduler();
|
|
3307
|
-
var ReactSharedInternals =
|
|
3307
|
+
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
3308
3308
|
var suppressWarning = false;
|
|
3309
3309
|
function setSuppressWarning(newSuppressWarning) {
|
|
3310
3310
|
{
|
|
@@ -3353,7 +3353,7 @@ var SyntrologieSDK = (() => {
|
|
|
3353
3353
|
var HostPortal = 4;
|
|
3354
3354
|
var HostComponent = 5;
|
|
3355
3355
|
var HostText = 6;
|
|
3356
|
-
var
|
|
3356
|
+
var Fragment2 = 7;
|
|
3357
3357
|
var Mode = 8;
|
|
3358
3358
|
var ContextConsumer = 9;
|
|
3359
3359
|
var ContextProvider = 10;
|
|
@@ -4510,7 +4510,7 @@ var SyntrologieSDK = (() => {
|
|
|
4510
4510
|
return "DehydratedFragment";
|
|
4511
4511
|
case ForwardRef:
|
|
4512
4512
|
return getWrappedName$1(type, type.render, "ForwardRef");
|
|
4513
|
-
case
|
|
4513
|
+
case Fragment2:
|
|
4514
4514
|
return "Fragment";
|
|
4515
4515
|
case HostComponent:
|
|
4516
4516
|
return type;
|
|
@@ -4911,7 +4911,7 @@ var SyntrologieSDK = (() => {
|
|
|
4911
4911
|
{
|
|
4912
4912
|
if (props.value == null) {
|
|
4913
4913
|
if (typeof props.children === "object" && props.children !== null) {
|
|
4914
|
-
|
|
4914
|
+
React.Children.forEach(props.children, function(child) {
|
|
4915
4915
|
if (child == null) {
|
|
4916
4916
|
return;
|
|
4917
4917
|
}
|
|
@@ -10335,7 +10335,7 @@ var SyntrologieSDK = (() => {
|
|
|
10335
10335
|
}
|
|
10336
10336
|
}
|
|
10337
10337
|
}
|
|
10338
|
-
function
|
|
10338
|
+
function createElement(type, props, rootContainerElement, parentNamespace) {
|
|
10339
10339
|
var isCustomComponentTag;
|
|
10340
10340
|
var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);
|
|
10341
10341
|
var domElement;
|
|
@@ -11205,7 +11205,7 @@ var SyntrologieSDK = (() => {
|
|
|
11205
11205
|
}
|
|
11206
11206
|
parentNamespace = hostContextDev.namespace;
|
|
11207
11207
|
}
|
|
11208
|
-
var domElement =
|
|
11208
|
+
var domElement = createElement(type, props, rootContainerInstance, parentNamespace);
|
|
11209
11209
|
precacheFiberNode(internalInstanceHandle, domElement);
|
|
11210
11210
|
updateFiberProps(domElement, props);
|
|
11211
11211
|
return domElement;
|
|
@@ -12939,7 +12939,7 @@ var SyntrologieSDK = (() => {
|
|
|
12939
12939
|
}
|
|
12940
12940
|
}
|
|
12941
12941
|
function updateFragment2(returnFiber, current2, fragment, lanes, key) {
|
|
12942
|
-
if (current2 === null || current2.tag !==
|
|
12942
|
+
if (current2 === null || current2.tag !== Fragment2) {
|
|
12943
12943
|
var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
|
|
12944
12944
|
created.return = returnFiber;
|
|
12945
12945
|
return created;
|
|
@@ -13342,7 +13342,7 @@ var SyntrologieSDK = (() => {
|
|
|
13342
13342
|
if (child.key === key) {
|
|
13343
13343
|
var elementType = element.type;
|
|
13344
13344
|
if (elementType === REACT_FRAGMENT_TYPE) {
|
|
13345
|
-
if (child.tag ===
|
|
13345
|
+
if (child.tag === Fragment2) {
|
|
13346
13346
|
deleteRemainingChildren(returnFiber, child.sibling);
|
|
13347
13347
|
var existing = useFiber(child, element.props.children);
|
|
13348
13348
|
existing.return = returnFiber;
|
|
@@ -18818,7 +18818,7 @@ var SyntrologieSDK = (() => {
|
|
|
18818
18818
|
var _resolvedProps2 = workInProgress2.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
|
|
18819
18819
|
return updateForwardRef(current2, workInProgress2, type, _resolvedProps2, renderLanes2);
|
|
18820
18820
|
}
|
|
18821
|
-
case
|
|
18821
|
+
case Fragment2:
|
|
18822
18822
|
return updateFragment(current2, workInProgress2, renderLanes2);
|
|
18823
18823
|
case Mode:
|
|
18824
18824
|
return updateMode(current2, workInProgress2, renderLanes2);
|
|
@@ -19090,7 +19090,7 @@ var SyntrologieSDK = (() => {
|
|
|
19090
19090
|
case SimpleMemoComponent:
|
|
19091
19091
|
case FunctionComponent:
|
|
19092
19092
|
case ForwardRef:
|
|
19093
|
-
case
|
|
19093
|
+
case Fragment2:
|
|
19094
19094
|
case Mode:
|
|
19095
19095
|
case Profiler:
|
|
19096
19096
|
case ContextConsumer:
|
|
@@ -23351,7 +23351,7 @@ var SyntrologieSDK = (() => {
|
|
|
23351
23351
|
return fiber;
|
|
23352
23352
|
}
|
|
23353
23353
|
function createFiberFromFragment(elements2, mode, lanes, key) {
|
|
23354
|
-
var fiber = createFiber(
|
|
23354
|
+
var fiber = createFiber(Fragment2, elements2, key, mode);
|
|
23355
23355
|
fiber.lanes = lanes;
|
|
23356
23356
|
return fiber;
|
|
23357
23357
|
}
|
|
@@ -24456,9 +24456,9 @@ var SyntrologieSDK = (() => {
|
|
|
24456
24456
|
}
|
|
24457
24457
|
});
|
|
24458
24458
|
|
|
24459
|
-
//
|
|
24459
|
+
// node_modules/react-dom/index.js
|
|
24460
24460
|
var require_react_dom = __commonJS({
|
|
24461
|
-
"
|
|
24461
|
+
"node_modules/react-dom/index.js"(exports, module) {
|
|
24462
24462
|
"use strict";
|
|
24463
24463
|
if (false) {
|
|
24464
24464
|
checkDCE();
|
|
@@ -24469,9 +24469,9 @@ var SyntrologieSDK = (() => {
|
|
|
24469
24469
|
}
|
|
24470
24470
|
});
|
|
24471
24471
|
|
|
24472
|
-
//
|
|
24472
|
+
// node_modules/react-dom/client.js
|
|
24473
24473
|
var require_client = __commonJS({
|
|
24474
|
-
"
|
|
24474
|
+
"node_modules/react-dom/client.js"(exports) {
|
|
24475
24475
|
"use strict";
|
|
24476
24476
|
var m2 = require_react_dom();
|
|
24477
24477
|
if (false) {
|
|
@@ -24573,6 +24573,7 @@ var SyntrologieSDK = (() => {
|
|
|
24573
24573
|
createDecisionEngine: () => createDecisionEngine,
|
|
24574
24574
|
createEventBus: () => createEventBus,
|
|
24575
24575
|
createGrowthBookClient: () => createGrowthBookClient,
|
|
24576
|
+
createNoopClient: () => createNoopClient,
|
|
24576
24577
|
createOverlayRecipeFetcher: () => createOverlayRecipeFetcher,
|
|
24577
24578
|
createPostHogClient: () => createPostHogClient,
|
|
24578
24579
|
createPostHogNormalizer: () => createPostHogNormalizer,
|
|
@@ -29171,48 +29172,60 @@ var SyntrologieSDK = (() => {
|
|
|
29171
29172
|
this.featureFlagsCallback = options.onFeatureFlagsLoaded;
|
|
29172
29173
|
this.captureCallback = options.onCapture;
|
|
29173
29174
|
if (!this.client && typeof window !== "undefined" && options.apiKey) {
|
|
29174
|
-
this.client = Uo;
|
|
29175
29175
|
const enableFeatureFlags = options.enableFeatureFlags ?? true;
|
|
29176
|
-
|
|
29177
|
-
|
|
29178
|
-
|
|
29179
|
-
|
|
29180
|
-
|
|
29181
|
-
|
|
29182
|
-
|
|
29183
|
-
|
|
29184
|
-
|
|
29185
|
-
|
|
29186
|
-
|
|
29187
|
-
|
|
29188
|
-
|
|
29189
|
-
|
|
29190
|
-
|
|
29191
|
-
|
|
29192
|
-
|
|
29193
|
-
|
|
29194
|
-
|
|
29195
|
-
|
|
29196
|
-
|
|
29197
|
-
|
|
29198
|
-
|
|
29199
|
-
|
|
29200
|
-
|
|
29201
|
-
|
|
29202
|
-
|
|
29203
|
-
|
|
29204
|
-
|
|
29205
|
-
|
|
29176
|
+
const instanceName = "syntro_" + (options.apiKey.slice(-6) || "sdk");
|
|
29177
|
+
this.client = Uo.init(
|
|
29178
|
+
options.apiKey,
|
|
29179
|
+
{
|
|
29180
|
+
api_host: options.apiHost ?? "https://telemetry.syntrologie.com",
|
|
29181
|
+
// Feature flags for segment membership (in_segment_* flags)
|
|
29182
|
+
// When enabled, /decide is called to get segment flags
|
|
29183
|
+
advanced_disable_feature_flags: !enableFeatureFlags,
|
|
29184
|
+
advanced_disable_feature_flags_on_first_load: !enableFeatureFlags,
|
|
29185
|
+
// Full-page tracking - all ON by default
|
|
29186
|
+
autocapture: options.autocapture ?? true,
|
|
29187
|
+
capture_pageview: options.capturePageview ?? true,
|
|
29188
|
+
capture_pageleave: options.capturePageleave ?? true,
|
|
29189
|
+
disable_session_recording: !(options.sessionRecording ?? true),
|
|
29190
|
+
// CRITICAL: Disable user agent filtering to allow headless Chrome
|
|
29191
|
+
// PostHog blocks "HeadlessChrome" user agents by default as bot detection
|
|
29192
|
+
// This enables session recording in Playwright/crawler sessions
|
|
29193
|
+
opt_out_useragent_filter: true,
|
|
29194
|
+
// Cross-domain iframe recording for embeds
|
|
29195
|
+
session_recording: {
|
|
29196
|
+
recordCrossDomainIFrames: true
|
|
29197
|
+
},
|
|
29198
|
+
// Capture performance metrics
|
|
29199
|
+
capture_performance: true,
|
|
29200
|
+
// Enable web vitals
|
|
29201
|
+
enable_recording_console_log: true,
|
|
29202
|
+
// Bootstrap callback for when flags are loaded
|
|
29203
|
+
loaded: (ph) => {
|
|
29204
|
+
if (enableFeatureFlags && this.featureFlagsCallback) {
|
|
29205
|
+
ph.onFeatureFlags(() => {
|
|
29206
|
+
const allFlags = this.getAllFeatureFlags();
|
|
29207
|
+
if (allFlags && this.featureFlagsCallback) {
|
|
29208
|
+
this.featureFlagsCallback(allFlags);
|
|
29209
|
+
}
|
|
29210
|
+
});
|
|
29211
|
+
const existingFlags = this.getAllFeatureFlags();
|
|
29212
|
+
if (existingFlags && Object.keys(existingFlags).length > 0) {
|
|
29213
|
+
this.featureFlagsCallback(existingFlags);
|
|
29206
29214
|
}
|
|
29207
|
-
}
|
|
29208
|
-
|
|
29209
|
-
|
|
29210
|
-
|
|
29211
|
-
|
|
29212
|
-
|
|
29215
|
+
}
|
|
29216
|
+
if (this.captureCallback) {
|
|
29217
|
+
ph.on("eventCaptured", (data) => {
|
|
29218
|
+
const eventName = typeof data === "string" ? data : data?.event;
|
|
29219
|
+
const properties = typeof data === "string" ? void 0 : data?.properties;
|
|
29220
|
+
if (typeof eventName === "string") {
|
|
29221
|
+
this.captureCallback?.(eventName, properties);
|
|
29222
|
+
}
|
|
29223
|
+
});
|
|
29224
|
+
}
|
|
29213
29225
|
}
|
|
29214
|
-
}
|
|
29215
|
-
|
|
29226
|
+
},
|
|
29227
|
+
instanceName
|
|
29228
|
+
);
|
|
29216
29229
|
}
|
|
29217
29230
|
}
|
|
29218
29231
|
/**
|
|
@@ -29293,6 +29306,58 @@ var SyntrologieSDK = (() => {
|
|
|
29293
29306
|
return new PostHogAdapter(options);
|
|
29294
29307
|
}
|
|
29295
29308
|
|
|
29309
|
+
// src/telemetry/adapters/noop.ts
|
|
29310
|
+
function randomId() {
|
|
29311
|
+
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
29312
|
+
let id = "";
|
|
29313
|
+
for (let i2 = 0; i2 < 16; i2++) {
|
|
29314
|
+
id += chars[Math.floor(Math.random() * chars.length)];
|
|
29315
|
+
}
|
|
29316
|
+
return id;
|
|
29317
|
+
}
|
|
29318
|
+
var NoopAdapter = class {
|
|
29319
|
+
constructor() {
|
|
29320
|
+
__publicField(this, "sessionId");
|
|
29321
|
+
this.sessionId = randomId();
|
|
29322
|
+
console.log(
|
|
29323
|
+
`[Syntro Telemetry] Using noop adapter (no telemetry configured). sessionId=${this.sessionId}`
|
|
29324
|
+
);
|
|
29325
|
+
}
|
|
29326
|
+
trackCanvasOpened(_surface) {
|
|
29327
|
+
}
|
|
29328
|
+
trackCanvasClosed(_surface) {
|
|
29329
|
+
}
|
|
29330
|
+
trackRectangleViewed(_rectangleId, _surface) {
|
|
29331
|
+
}
|
|
29332
|
+
trackAction(_action, _rectangleId, _surface) {
|
|
29333
|
+
}
|
|
29334
|
+
register(_properties) {
|
|
29335
|
+
}
|
|
29336
|
+
getSessionId() {
|
|
29337
|
+
return this.sessionId;
|
|
29338
|
+
}
|
|
29339
|
+
startSessionRecording() {
|
|
29340
|
+
}
|
|
29341
|
+
trackExperiment(_key, _variationId, _variationName) {
|
|
29342
|
+
}
|
|
29343
|
+
setPersonProperties(_properties) {
|
|
29344
|
+
}
|
|
29345
|
+
setPersonPropertiesOnce(_properties) {
|
|
29346
|
+
}
|
|
29347
|
+
getDistinctId() {
|
|
29348
|
+
return "demo-user";
|
|
29349
|
+
}
|
|
29350
|
+
getAllFeatureFlags() {
|
|
29351
|
+
return {};
|
|
29352
|
+
}
|
|
29353
|
+
getSegmentFlags() {
|
|
29354
|
+
return {};
|
|
29355
|
+
}
|
|
29356
|
+
};
|
|
29357
|
+
function createNoopClient() {
|
|
29358
|
+
return new NoopAdapter();
|
|
29359
|
+
}
|
|
29360
|
+
|
|
29296
29361
|
// ../../node_modules/@growthbook/growthbook/dist/esm/util.mjs
|
|
29297
29362
|
var polyfills = {
|
|
29298
29363
|
fetch: globalThis.fetch ? globalThis.fetch.bind(globalThis) : void 0,
|
|
@@ -32132,30 +32197,6 @@ var SyntrologieSDK = (() => {
|
|
|
32132
32197
|
}
|
|
32133
32198
|
};
|
|
32134
32199
|
|
|
32135
|
-
// ../../node_modules/@growthbook/growthbook-react/dist/esm/index.js
|
|
32136
|
-
var React = __toESM(require_react());
|
|
32137
|
-
function _extends() {
|
|
32138
|
-
return _extends = Object.assign ? Object.assign.bind() : function(n2) {
|
|
32139
|
-
for (var e2 = 1; e2 < arguments.length; e2++) {
|
|
32140
|
-
var t2 = arguments[e2];
|
|
32141
|
-
for (var r2 in t2) ({}).hasOwnProperty.call(t2, r2) && (n2[r2] = t2[r2]);
|
|
32142
|
-
}
|
|
32143
|
-
return n2;
|
|
32144
|
-
}, _extends.apply(null, arguments);
|
|
32145
|
-
}
|
|
32146
|
-
var GrowthBookContext = /* @__PURE__ */ React.createContext({});
|
|
32147
|
-
var withRunExperiment = (Component) => {
|
|
32148
|
-
const withRunExperimentWrapper = (props) => /* @__PURE__ */ React.createElement(GrowthBookContext.Consumer, null, ({
|
|
32149
|
-
growthbook
|
|
32150
|
-
}) => {
|
|
32151
|
-
return /* @__PURE__ */ React.createElement(Component, _extends({}, props, {
|
|
32152
|
-
runExperiment: (exp) => growthbook.run(exp)
|
|
32153
|
-
}));
|
|
32154
|
-
});
|
|
32155
|
-
return withRunExperimentWrapper;
|
|
32156
|
-
};
|
|
32157
|
-
withRunExperiment.displayName = "WithRunExperiment";
|
|
32158
|
-
|
|
32159
32200
|
// src/experiments/adapters/growthbook.ts
|
|
32160
32201
|
var DEFAULT_EXPERIMENT_API_HOST = "https://experiment.syntrologie.com";
|
|
32161
32202
|
var GrowthBookAdapter = class {
|
|
@@ -32232,6 +32273,53 @@ var SyntrologieSDK = (() => {
|
|
|
32232
32273
|
|
|
32233
32274
|
// src/hooks/useShadowCanvasConfig.ts
|
|
32234
32275
|
var import_react = __toESM(require_react(), 1);
|
|
32276
|
+
|
|
32277
|
+
// src/logger.ts
|
|
32278
|
+
var debugEnabled = false;
|
|
32279
|
+
function checkUrlParam() {
|
|
32280
|
+
if (typeof window === "undefined") return false;
|
|
32281
|
+
try {
|
|
32282
|
+
const params = new URLSearchParams(window.location.search);
|
|
32283
|
+
return params.get("syntro_debug") === "true";
|
|
32284
|
+
} catch {
|
|
32285
|
+
return false;
|
|
32286
|
+
}
|
|
32287
|
+
}
|
|
32288
|
+
function initLogger(tokenDebug) {
|
|
32289
|
+
if (checkUrlParam()) {
|
|
32290
|
+
debugEnabled = true;
|
|
32291
|
+
return;
|
|
32292
|
+
}
|
|
32293
|
+
debugEnabled = tokenDebug ?? false;
|
|
32294
|
+
}
|
|
32295
|
+
function isDebugEnabled() {
|
|
32296
|
+
if (checkUrlParam()) return true;
|
|
32297
|
+
return debugEnabled;
|
|
32298
|
+
}
|
|
32299
|
+
function debug(prefix, message, data) {
|
|
32300
|
+
if (!isDebugEnabled()) return;
|
|
32301
|
+
if (data !== void 0) {
|
|
32302
|
+
console.log(`[${prefix}]`, message, data);
|
|
32303
|
+
} else {
|
|
32304
|
+
console.log(`[${prefix}]`, message);
|
|
32305
|
+
}
|
|
32306
|
+
}
|
|
32307
|
+
function warn(prefix, message, data) {
|
|
32308
|
+
if (data !== void 0) {
|
|
32309
|
+
console.warn(`[${prefix}]`, message, data);
|
|
32310
|
+
} else {
|
|
32311
|
+
console.warn(`[${prefix}]`, message);
|
|
32312
|
+
}
|
|
32313
|
+
}
|
|
32314
|
+
function error(prefix, message, data) {
|
|
32315
|
+
if (data !== void 0) {
|
|
32316
|
+
console.error(`[${prefix}]`, message, data);
|
|
32317
|
+
} else {
|
|
32318
|
+
console.error(`[${prefix}]`, message);
|
|
32319
|
+
}
|
|
32320
|
+
}
|
|
32321
|
+
|
|
32322
|
+
// src/hooks/useShadowCanvasConfig.ts
|
|
32235
32323
|
var sortTiles = (tiles) => [...tiles].sort((a2, b2) => (a2.order ?? 0) - (b2.order ?? 0));
|
|
32236
32324
|
function useShadowCanvasConfig({
|
|
32237
32325
|
fetcher,
|
|
@@ -32248,6 +32336,7 @@ var SyntrologieSDK = (() => {
|
|
|
32248
32336
|
try {
|
|
32249
32337
|
setState((prev) => ({ ...prev, isLoading: true, error: void 0 }));
|
|
32250
32338
|
const response = await fetcher();
|
|
32339
|
+
debug("SmartCanvas Config", "Raw config response", response);
|
|
32251
32340
|
let tiles = response.tiles || [];
|
|
32252
32341
|
if (runtime4 && response.routes) {
|
|
32253
32342
|
runtime4.setRoutes(response.routes);
|
|
@@ -32260,6 +32349,7 @@ var SyntrologieSDK = (() => {
|
|
|
32260
32349
|
} else if (experiments) {
|
|
32261
32350
|
tiles = tiles.filter((tile) => experiments.shouldRenderRectangle(tile));
|
|
32262
32351
|
}
|
|
32352
|
+
debug("SmartCanvas Config", `Tile count after filtering: ${tiles.length}`);
|
|
32263
32353
|
setState({
|
|
32264
32354
|
tiles: sortTiles(tiles),
|
|
32265
32355
|
actions: response.actions || [],
|
|
@@ -32411,7 +32501,7 @@ var SyntrologieSDK = (() => {
|
|
|
32411
32501
|
function NotificationBlock({
|
|
32412
32502
|
content,
|
|
32413
32503
|
onDismiss,
|
|
32414
|
-
accentColor
|
|
32504
|
+
accentColor: _accentColor
|
|
32415
32505
|
}) {
|
|
32416
32506
|
const [isDismissed, setIsDismissed] = (0, import_react2.useState)(false);
|
|
32417
32507
|
const [countdown, setCountdown] = (0, import_react2.useState)(
|
|
@@ -32783,15 +32873,7 @@ var SyntrologieSDK = (() => {
|
|
|
32783
32873
|
}
|
|
32784
32874
|
);
|
|
32785
32875
|
}
|
|
32786
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: containerStyle, children: processedItems.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
32787
|
-
ComparisonItemCard,
|
|
32788
|
-
{
|
|
32789
|
-
item,
|
|
32790
|
-
accentColor: primaryColor,
|
|
32791
|
-
layout
|
|
32792
|
-
},
|
|
32793
|
-
idx
|
|
32794
|
-
)) });
|
|
32876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: containerStyle, children: processedItems.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ComparisonItemCard, { item, accentColor: primaryColor, layout }, idx)) });
|
|
32795
32877
|
}
|
|
32796
32878
|
|
|
32797
32879
|
// src/blocks/interactive/RatingBlock.tsx
|
|
@@ -32825,15 +32907,24 @@ var SyntrologieSDK = (() => {
|
|
|
32825
32907
|
transform: hovered === starValue ? "scale(1.15)" : "scale(1)"
|
|
32826
32908
|
},
|
|
32827
32909
|
"aria-label": `Rate ${starValue} out of ${maxValue}`,
|
|
32828
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
32829
|
-
"
|
|
32830
|
-
{
|
|
32831
|
-
|
|
32832
|
-
|
|
32833
|
-
|
|
32834
|
-
|
|
32910
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
32911
|
+
"svg",
|
|
32912
|
+
{
|
|
32913
|
+
width: "28",
|
|
32914
|
+
height: "28",
|
|
32915
|
+
viewBox: "0 0 24 24",
|
|
32916
|
+
fill: isFilled ? "currentColor" : "none",
|
|
32917
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
32918
|
+
"path",
|
|
32919
|
+
{
|
|
32920
|
+
d: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z",
|
|
32921
|
+
stroke: "currentColor",
|
|
32922
|
+
strokeWidth: "1.5",
|
|
32923
|
+
strokeLinejoin: "round"
|
|
32924
|
+
}
|
|
32925
|
+
)
|
|
32835
32926
|
}
|
|
32836
|
-
)
|
|
32927
|
+
)
|
|
32837
32928
|
},
|
|
32838
32929
|
i2
|
|
32839
32930
|
);
|
|
@@ -32856,32 +32947,26 @@ var SyntrologieSDK = (() => {
|
|
|
32856
32947
|
transition: "all 0.15s ease"
|
|
32857
32948
|
});
|
|
32858
32949
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: { display: "flex", gap: "12px" }, children: [
|
|
32859
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
32860
|
-
"
|
|
32950
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { onClick: () => onChange(1), style: buttonStyle(value === 1), "aria-label": "Thumbs up", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
32951
|
+
"path",
|
|
32861
32952
|
{
|
|
32862
|
-
|
|
32863
|
-
|
|
32864
|
-
|
|
32865
|
-
|
|
32866
|
-
|
|
32867
|
-
|
|
32868
|
-
d: "M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3H14zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3",
|
|
32869
|
-
stroke: "currentColor",
|
|
32870
|
-
strokeWidth: "1.5",
|
|
32871
|
-
strokeLinecap: "round",
|
|
32872
|
-
strokeLinejoin: "round",
|
|
32873
|
-
fill: value === 1 ? "currentColor" : "none"
|
|
32874
|
-
}
|
|
32875
|
-
) })
|
|
32953
|
+
d: "M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3H14zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3",
|
|
32954
|
+
stroke: "currentColor",
|
|
32955
|
+
strokeWidth: "1.5",
|
|
32956
|
+
strokeLinecap: "round",
|
|
32957
|
+
strokeLinejoin: "round",
|
|
32958
|
+
fill: value === 1 ? "currentColor" : "none"
|
|
32876
32959
|
}
|
|
32877
|
-
),
|
|
32878
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
32879
|
-
"
|
|
32960
|
+
) }) }),
|
|
32961
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { onClick: () => onChange(0), style: buttonStyle(value === 0), "aria-label": "Thumbs down", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
32962
|
+
"svg",
|
|
32880
32963
|
{
|
|
32881
|
-
|
|
32882
|
-
|
|
32883
|
-
|
|
32884
|
-
|
|
32964
|
+
width: "32",
|
|
32965
|
+
height: "32",
|
|
32966
|
+
viewBox: "0 0 24 24",
|
|
32967
|
+
fill: "none",
|
|
32968
|
+
style: { transform: "rotate(180deg)" },
|
|
32969
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
32885
32970
|
"path",
|
|
32886
32971
|
{
|
|
32887
32972
|
d: "M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3H14zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3",
|
|
@@ -32891,9 +32976,9 @@ var SyntrologieSDK = (() => {
|
|
|
32891
32976
|
strokeLinejoin: "round",
|
|
32892
32977
|
fill: value === 0 ? "currentColor" : "none"
|
|
32893
32978
|
}
|
|
32894
|
-
)
|
|
32979
|
+
)
|
|
32895
32980
|
}
|
|
32896
|
-
)
|
|
32981
|
+
) })
|
|
32897
32982
|
] });
|
|
32898
32983
|
}
|
|
32899
32984
|
function NpsRating({
|
|
@@ -32929,8 +33014,26 @@ var SyntrologieSDK = (() => {
|
|
|
32929
33014
|
);
|
|
32930
33015
|
}) }),
|
|
32931
33016
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: { display: "flex", justifyContent: "space-between", padding: "0 2px" }, children: [
|
|
32932
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
32933
|
-
|
|
33017
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
33018
|
+
"span",
|
|
33019
|
+
{
|
|
33020
|
+
style: {
|
|
33021
|
+
fontSize: "var(--sc-font-size-xs, 0.7rem)",
|
|
33022
|
+
color: "var(--sc-color-text-muted, #8e8e93)"
|
|
33023
|
+
},
|
|
33024
|
+
children: "Not likely"
|
|
33025
|
+
}
|
|
33026
|
+
),
|
|
33027
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
33028
|
+
"span",
|
|
33029
|
+
{
|
|
33030
|
+
style: {
|
|
33031
|
+
fontSize: "var(--sc-font-size-xs, 0.7rem)",
|
|
33032
|
+
color: "var(--sc-color-text-muted, #8e8e93)"
|
|
33033
|
+
},
|
|
33034
|
+
children: "Very likely"
|
|
33035
|
+
}
|
|
33036
|
+
)
|
|
32934
33037
|
] })
|
|
32935
33038
|
] });
|
|
32936
33039
|
}
|
|
@@ -33000,7 +33103,15 @@ var SyntrologieSDK = (() => {
|
|
|
33000
33103
|
}
|
|
33001
33104
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: containerStyle, children: [
|
|
33002
33105
|
content.question && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { style: questionStyle, children: content.question }),
|
|
33003
|
-
content.variant === "stars" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
33106
|
+
content.variant === "stars" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
33107
|
+
StarRating,
|
|
33108
|
+
{
|
|
33109
|
+
value,
|
|
33110
|
+
maxValue,
|
|
33111
|
+
onChange: handleChange,
|
|
33112
|
+
color: primaryColor
|
|
33113
|
+
}
|
|
33114
|
+
),
|
|
33004
33115
|
content.variant === "thumbs" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ThumbsRating, { value, onChange: handleChange, color: primaryColor }),
|
|
33005
33116
|
content.variant === "nps" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(NpsRating, { value, maxValue, onChange: handleChange, color: primaryColor }),
|
|
33006
33117
|
content.variant === "emoji" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(EmojiRating, { value, onChange: handleChange, color: primaryColor }),
|
|
@@ -33222,13 +33333,7 @@ var SyntrologieSDK = (() => {
|
|
|
33222
33333
|
);
|
|
33223
33334
|
}
|
|
33224
33335
|
if (isChecklistContent(content)) {
|
|
33225
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
33226
|
-
ChecklistBlock,
|
|
33227
|
-
{
|
|
33228
|
-
content,
|
|
33229
|
-
accentColor: options.accentColor
|
|
33230
|
-
}
|
|
33231
|
-
);
|
|
33336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ChecklistBlock, { content, accentColor: options.accentColor });
|
|
33232
33337
|
}
|
|
33233
33338
|
return null;
|
|
33234
33339
|
}
|
|
@@ -33278,10 +33383,7 @@ var SyntrologieSDK = (() => {
|
|
|
33278
33383
|
});
|
|
33279
33384
|
return unsubscribe2;
|
|
33280
33385
|
}, [runtime4]);
|
|
33281
|
-
const value = (0, import_react5.useMemo)(
|
|
33282
|
-
() => ({ runtime: runtime4, context }),
|
|
33283
|
-
[runtime4, context]
|
|
33284
|
-
);
|
|
33386
|
+
const value = (0, import_react5.useMemo)(() => ({ runtime: runtime4, context }), [runtime4, context]);
|
|
33285
33387
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(RuntimeReactContext.Provider, { value, children });
|
|
33286
33388
|
}
|
|
33287
33389
|
function useRuntime() {
|
|
@@ -33457,11 +33559,7 @@ var SyntrologieSDK = (() => {
|
|
|
33457
33559
|
|
|
33458
33560
|
// src/components/TileCard.tsx
|
|
33459
33561
|
var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
|
|
33460
|
-
function ChatbotBlock({
|
|
33461
|
-
config,
|
|
33462
|
-
telemetry,
|
|
33463
|
-
surface
|
|
33464
|
-
}) {
|
|
33562
|
+
function ChatbotBlock({ config, telemetry, surface }) {
|
|
33465
33563
|
const [messages, setMessages] = (0, import_react6.useState)([
|
|
33466
33564
|
{ author: "Lumi", text: "Hi! Need clarity on a deduction?" }
|
|
33467
33565
|
]);
|
|
@@ -33488,21 +33586,27 @@ var SyntrologieSDK = (() => {
|
|
|
33488
33586
|
setInput("");
|
|
33489
33587
|
};
|
|
33490
33588
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem", height: "100%" }, children: [
|
|
33491
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
33492
|
-
|
|
33493
|
-
|
|
33494
|
-
|
|
33495
|
-
|
|
33496
|
-
|
|
33497
|
-
|
|
33498
|
-
|
|
33499
|
-
|
|
33500
|
-
|
|
33501
|
-
|
|
33502
|
-
|
|
33503
|
-
|
|
33504
|
-
|
|
33505
|
-
|
|
33589
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
33590
|
+
"div",
|
|
33591
|
+
{
|
|
33592
|
+
style: {
|
|
33593
|
+
flex: 1,
|
|
33594
|
+
overflowY: "auto",
|
|
33595
|
+
padding: "0.75rem",
|
|
33596
|
+
background: "rgba(0, 0, 0, 0.2)",
|
|
33597
|
+
borderRadius: "8px",
|
|
33598
|
+
fontSize: "0.85rem"
|
|
33599
|
+
},
|
|
33600
|
+
children: messages.map((message, idx) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { style: { margin: "0 0 0.5rem" }, children: [
|
|
33601
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { style: { fontWeight: 600, color: "#94a3b8" }, children: [
|
|
33602
|
+
message.author,
|
|
33603
|
+
":"
|
|
33604
|
+
] }),
|
|
33605
|
+
" ",
|
|
33606
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { color: "#e2e8f0" }, children: message.text })
|
|
33607
|
+
] }, `${message.author}-${idx}`))
|
|
33608
|
+
}
|
|
33609
|
+
),
|
|
33506
33610
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("form", { onSubmit: handleSubmit, style: { display: "flex", gap: "0.5rem" }, children: [
|
|
33507
33611
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
33508
33612
|
"input",
|
|
@@ -33547,16 +33651,23 @@ var SyntrologieSDK = (() => {
|
|
|
33547
33651
|
config,
|
|
33548
33652
|
surface,
|
|
33549
33653
|
telemetry,
|
|
33550
|
-
isExpanded
|
|
33654
|
+
isExpanded,
|
|
33655
|
+
runtime: runtime4
|
|
33551
33656
|
}) {
|
|
33552
33657
|
const containerRef = (0, import_react6.useRef)(null);
|
|
33553
33658
|
(0, import_react6.useEffect)(() => {
|
|
33554
33659
|
if (!containerRef.current) return;
|
|
33555
|
-
const cleanup = renderer.mount(containerRef.current, {
|
|
33660
|
+
const cleanup = renderer.mount(containerRef.current, {
|
|
33661
|
+
config,
|
|
33662
|
+
surface,
|
|
33663
|
+
telemetry,
|
|
33664
|
+
isExpanded,
|
|
33665
|
+
runtime: runtime4
|
|
33666
|
+
});
|
|
33556
33667
|
return () => {
|
|
33557
33668
|
if (cleanup) cleanup();
|
|
33558
33669
|
};
|
|
33559
|
-
}, [renderer, config, surface, telemetry, isExpanded]);
|
|
33670
|
+
}, [renderer, config, surface, telemetry, isExpanded, runtime4]);
|
|
33560
33671
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { ref: containerRef, style: { width: "100%", height: "100%" } });
|
|
33561
33672
|
}
|
|
33562
33673
|
function TileCard({
|
|
@@ -33570,13 +33681,16 @@ var SyntrologieSDK = (() => {
|
|
|
33570
33681
|
}) {
|
|
33571
33682
|
const { title, subtitle, content, style: configStyle } = config;
|
|
33572
33683
|
const runtime4 = useRuntime();
|
|
33573
|
-
const trackAction = (0, import_react6.useCallback)(
|
|
33574
|
-
|
|
33575
|
-
|
|
33576
|
-
|
|
33577
|
-
|
|
33578
|
-
|
|
33579
|
-
|
|
33684
|
+
const trackAction = (0, import_react6.useCallback)(
|
|
33685
|
+
(actionId) => {
|
|
33686
|
+
telemetry?.trackAction(actionId, config.id, surface);
|
|
33687
|
+
if (runtime4) {
|
|
33688
|
+
const event = CanvasEvents.tileAction(config.id, actionId, surface);
|
|
33689
|
+
runtime4.events.publish(event.name, event.props, event.source);
|
|
33690
|
+
}
|
|
33691
|
+
},
|
|
33692
|
+
[telemetry, runtime4, config.id, surface]
|
|
33693
|
+
);
|
|
33580
33694
|
const accentColor = configStyle?.accentColor ?? "#6366f1";
|
|
33581
33695
|
const collapsedHeight = "72px";
|
|
33582
33696
|
const cardStyle = {
|
|
@@ -33656,7 +33770,7 @@ var SyntrologieSDK = (() => {
|
|
|
33656
33770
|
onDismiss: () => {
|
|
33657
33771
|
trackAction("block_dismissed");
|
|
33658
33772
|
},
|
|
33659
|
-
onRatingSubmit: (
|
|
33773
|
+
onRatingSubmit: (_value) => {
|
|
33660
33774
|
trackAction("rating_submitted");
|
|
33661
33775
|
}
|
|
33662
33776
|
});
|
|
@@ -33669,16 +33783,33 @@ var SyntrologieSDK = (() => {
|
|
|
33669
33783
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { height: "200px" }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ChatbotBlock, { config, surface, telemetry }) });
|
|
33670
33784
|
case "metric":
|
|
33671
33785
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { textAlign: "center", padding: "0.5rem 0" }, children: [
|
|
33672
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
33673
|
-
|
|
33674
|
-
|
|
33675
|
-
|
|
33676
|
-
|
|
33677
|
-
|
|
33678
|
-
|
|
33679
|
-
|
|
33680
|
-
|
|
33681
|
-
|
|
33786
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
33787
|
+
"p",
|
|
33788
|
+
{
|
|
33789
|
+
style: {
|
|
33790
|
+
fontSize: "3rem",
|
|
33791
|
+
fontWeight: 700,
|
|
33792
|
+
color: accentColor,
|
|
33793
|
+
margin: 0,
|
|
33794
|
+
letterSpacing: "-0.02em"
|
|
33795
|
+
},
|
|
33796
|
+
children: [
|
|
33797
|
+
content.metricValue,
|
|
33798
|
+
content.metricUnit && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
33799
|
+
"span",
|
|
33800
|
+
{
|
|
33801
|
+
style: {
|
|
33802
|
+
fontSize: "1.25rem",
|
|
33803
|
+
fontWeight: 400,
|
|
33804
|
+
color: "#8e8e93",
|
|
33805
|
+
marginLeft: "0.5rem"
|
|
33806
|
+
},
|
|
33807
|
+
children: content.metricUnit
|
|
33808
|
+
}
|
|
33809
|
+
)
|
|
33810
|
+
]
|
|
33811
|
+
}
|
|
33812
|
+
),
|
|
33682
33813
|
content.headline && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { fontSize: "0.85rem", color: "#8e8e93", margin: "0.5rem 0 0" }, children: content.headline })
|
|
33683
33814
|
] });
|
|
33684
33815
|
case "embed":
|
|
@@ -33713,7 +33844,8 @@ var SyntrologieSDK = (() => {
|
|
|
33713
33844
|
config,
|
|
33714
33845
|
surface,
|
|
33715
33846
|
telemetry,
|
|
33716
|
-
isExpanded
|
|
33847
|
+
isExpanded,
|
|
33848
|
+
runtime: runtime4
|
|
33717
33849
|
}
|
|
33718
33850
|
);
|
|
33719
33851
|
}
|
|
@@ -33721,7 +33853,18 @@ var SyntrologieSDK = (() => {
|
|
|
33721
33853
|
default: {
|
|
33722
33854
|
const legacyContent = content;
|
|
33723
33855
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { padding: "0.25rem 0" }, children: [
|
|
33724
|
-
legacyContent.headline && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
33856
|
+
legacyContent.headline && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
33857
|
+
"p",
|
|
33858
|
+
{
|
|
33859
|
+
style: {
|
|
33860
|
+
fontSize: "1rem",
|
|
33861
|
+
fontWeight: 600,
|
|
33862
|
+
color: "#f5f5f7",
|
|
33863
|
+
margin: "0 0 0.5rem"
|
|
33864
|
+
},
|
|
33865
|
+
children: legacyContent.headline
|
|
33866
|
+
}
|
|
33867
|
+
),
|
|
33725
33868
|
legacyContent.body && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { fontSize: "0.9rem", color: "#8e8e93", margin: 0, lineHeight: 1.5 }, children: legacyContent.body })
|
|
33726
33869
|
] });
|
|
33727
33870
|
}
|
|
@@ -33740,37 +33883,61 @@ var SyntrologieSDK = (() => {
|
|
|
33740
33883
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: headerStyle, children: [
|
|
33741
33884
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: iconStyle, children: getIcon() }),
|
|
33742
33885
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
33743
|
-
subtitle && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
33744
|
-
|
|
33745
|
-
|
|
33746
|
-
|
|
33747
|
-
|
|
33748
|
-
|
|
33749
|
-
|
|
33750
|
-
|
|
33751
|
-
|
|
33752
|
-
|
|
33753
|
-
|
|
33754
|
-
|
|
33755
|
-
|
|
33756
|
-
|
|
33757
|
-
|
|
33758
|
-
|
|
33759
|
-
|
|
33760
|
-
|
|
33761
|
-
|
|
33762
|
-
|
|
33763
|
-
|
|
33764
|
-
|
|
33765
|
-
|
|
33766
|
-
|
|
33886
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
33887
|
+
"p",
|
|
33888
|
+
{
|
|
33889
|
+
style: {
|
|
33890
|
+
fontSize: "0.7rem",
|
|
33891
|
+
textTransform: "uppercase",
|
|
33892
|
+
letterSpacing: "0.05em",
|
|
33893
|
+
color: "#8e8e93",
|
|
33894
|
+
margin: 0
|
|
33895
|
+
},
|
|
33896
|
+
children: subtitle
|
|
33897
|
+
}
|
|
33898
|
+
),
|
|
33899
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
33900
|
+
"h3",
|
|
33901
|
+
{
|
|
33902
|
+
style: {
|
|
33903
|
+
fontSize: "0.95rem",
|
|
33904
|
+
fontWeight: 600,
|
|
33905
|
+
color: "#f5f5f7",
|
|
33906
|
+
margin: "0.125rem 0 0",
|
|
33907
|
+
whiteSpace: "nowrap",
|
|
33908
|
+
overflow: "hidden",
|
|
33909
|
+
textOverflow: "ellipsis"
|
|
33910
|
+
},
|
|
33911
|
+
children: title
|
|
33912
|
+
}
|
|
33913
|
+
),
|
|
33914
|
+
!isExpanded && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
33915
|
+
"p",
|
|
33916
|
+
{
|
|
33917
|
+
style: {
|
|
33918
|
+
fontSize: "0.8rem",
|
|
33919
|
+
color: "#8e8e93",
|
|
33920
|
+
margin: "0.125rem 0 0",
|
|
33921
|
+
whiteSpace: "nowrap",
|
|
33922
|
+
overflow: "hidden",
|
|
33923
|
+
textOverflow: "ellipsis"
|
|
33924
|
+
},
|
|
33925
|
+
children: getPreview()
|
|
33926
|
+
}
|
|
33927
|
+
)
|
|
33767
33928
|
] }),
|
|
33768
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
33769
|
-
|
|
33770
|
-
|
|
33771
|
-
|
|
33772
|
-
|
|
33773
|
-
|
|
33929
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
33930
|
+
"div",
|
|
33931
|
+
{
|
|
33932
|
+
style: {
|
|
33933
|
+
color: "#8e8e93",
|
|
33934
|
+
fontSize: "0.85rem",
|
|
33935
|
+
transform: isExpanded ? "rotate(180deg)" : "rotate(0deg)",
|
|
33936
|
+
transition: "transform 0.2s ease"
|
|
33937
|
+
},
|
|
33938
|
+
children: "\u25BC"
|
|
33939
|
+
}
|
|
33940
|
+
)
|
|
33774
33941
|
] }),
|
|
33775
33942
|
isExpanded && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
33776
33943
|
"div",
|
|
@@ -33783,61 +33950,70 @@ var SyntrologieSDK = (() => {
|
|
|
33783
33950
|
onClick: (e2) => e2.stopPropagation(),
|
|
33784
33951
|
children: [
|
|
33785
33952
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { paddingTop: "0.875rem" }, children: renderExpandedContent() }),
|
|
33786
|
-
"actions" in content && content.actions && content.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
33787
|
-
|
|
33788
|
-
paddingTop: "0.75rem",
|
|
33789
|
-
borderTop: "1px solid rgba(255, 255, 255, 0.06)",
|
|
33790
|
-
display: "flex",
|
|
33791
|
-
gap: "0.5rem"
|
|
33792
|
-
}, children: content.actions.map((action, idx) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
33793
|
-
"button",
|
|
33953
|
+
"actions" in content && content.actions && content.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
33954
|
+
"div",
|
|
33794
33955
|
{
|
|
33795
|
-
onClick: (e2) => {
|
|
33796
|
-
e2.stopPropagation();
|
|
33797
|
-
if (action.href && typeof window !== "undefined") {
|
|
33798
|
-
window.open(action.href, "_blank", "noreferrer");
|
|
33799
|
-
}
|
|
33800
|
-
if (action.onClickId) {
|
|
33801
|
-
trackAction(action.onClickId);
|
|
33802
|
-
if (action.onClickId.startsWith("syntro:restart-tour:") || action.onClickId.startsWith("syntro:start-tour:")) {
|
|
33803
|
-
const tourId = action.onClickId.replace("syntro:restart-tour:", "").replace("syntro:start-tour:", "");
|
|
33804
|
-
try {
|
|
33805
|
-
localStorage.removeItem("syntro_active_tour");
|
|
33806
|
-
localStorage.setItem("syntro_active_tour", JSON.stringify({
|
|
33807
|
-
tourId,
|
|
33808
|
-
currentStepId: "",
|
|
33809
|
-
startedAt: Date.now()
|
|
33810
|
-
}));
|
|
33811
|
-
console.log(`[SmartCanvas] Starting tour "${tourId}"...`);
|
|
33812
|
-
window.location.reload();
|
|
33813
|
-
} catch (err) {
|
|
33814
|
-
console.warn("[SmartCanvas] Failed to start tour:", err);
|
|
33815
|
-
}
|
|
33816
|
-
}
|
|
33817
|
-
}
|
|
33818
|
-
},
|
|
33819
33956
|
style: {
|
|
33820
|
-
|
|
33821
|
-
|
|
33822
|
-
|
|
33823
|
-
|
|
33824
|
-
|
|
33825
|
-
cursor: "pointer",
|
|
33826
|
-
border: "none",
|
|
33827
|
-
background: idx === 0 ? accentColor : "rgba(255, 255, 255, 0.1)",
|
|
33828
|
-
color: "#fff",
|
|
33829
|
-
transition: "opacity 0.15s ease"
|
|
33830
|
-
},
|
|
33831
|
-
onMouseEnter: (e2) => {
|
|
33832
|
-
e2.currentTarget.style.opacity = "0.85";
|
|
33833
|
-
},
|
|
33834
|
-
onMouseLeave: (e2) => {
|
|
33835
|
-
e2.currentTarget.style.opacity = "1";
|
|
33957
|
+
marginTop: "1rem",
|
|
33958
|
+
paddingTop: "0.75rem",
|
|
33959
|
+
borderTop: "1px solid rgba(255, 255, 255, 0.06)",
|
|
33960
|
+
display: "flex",
|
|
33961
|
+
gap: "0.5rem"
|
|
33836
33962
|
},
|
|
33837
|
-
children: action.
|
|
33838
|
-
|
|
33839
|
-
|
|
33840
|
-
|
|
33963
|
+
children: content.actions.map((action, idx) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
33964
|
+
"button",
|
|
33965
|
+
{
|
|
33966
|
+
onClick: (e2) => {
|
|
33967
|
+
e2.stopPropagation();
|
|
33968
|
+
if (action.href && typeof window !== "undefined") {
|
|
33969
|
+
window.open(action.href, "_blank", "noreferrer");
|
|
33970
|
+
}
|
|
33971
|
+
if (action.onClickId) {
|
|
33972
|
+
trackAction(action.onClickId);
|
|
33973
|
+
if (action.onClickId.startsWith("syntro:restart-tour:") || action.onClickId.startsWith("syntro:start-tour:")) {
|
|
33974
|
+
const tourId = action.onClickId.replace("syntro:restart-tour:", "").replace("syntro:start-tour:", "");
|
|
33975
|
+
try {
|
|
33976
|
+
localStorage.removeItem("syntro_active_tour");
|
|
33977
|
+
localStorage.setItem(
|
|
33978
|
+
"syntro_active_tour",
|
|
33979
|
+
JSON.stringify({
|
|
33980
|
+
tourId,
|
|
33981
|
+
currentStepId: "",
|
|
33982
|
+
startedAt: Date.now()
|
|
33983
|
+
})
|
|
33984
|
+
);
|
|
33985
|
+
console.log(`[SmartCanvas] Starting tour "${tourId}"...`);
|
|
33986
|
+
window.location.reload();
|
|
33987
|
+
} catch (err) {
|
|
33988
|
+
console.warn("[SmartCanvas] Failed to start tour:", err);
|
|
33989
|
+
}
|
|
33990
|
+
}
|
|
33991
|
+
}
|
|
33992
|
+
},
|
|
33993
|
+
style: {
|
|
33994
|
+
flex: 1,
|
|
33995
|
+
padding: "0.625rem 1rem",
|
|
33996
|
+
borderRadius: "8px",
|
|
33997
|
+
fontSize: "0.85rem",
|
|
33998
|
+
fontWeight: 600,
|
|
33999
|
+
cursor: "pointer",
|
|
34000
|
+
border: "none",
|
|
34001
|
+
background: idx === 0 ? accentColor : "rgba(255, 255, 255, 0.1)",
|
|
34002
|
+
color: "#fff",
|
|
34003
|
+
transition: "opacity 0.15s ease"
|
|
34004
|
+
},
|
|
34005
|
+
onMouseEnter: (e2) => {
|
|
34006
|
+
e2.currentTarget.style.opacity = "0.85";
|
|
34007
|
+
},
|
|
34008
|
+
onMouseLeave: (e2) => {
|
|
34009
|
+
e2.currentTarget.style.opacity = "1";
|
|
34010
|
+
},
|
|
34011
|
+
children: action.label
|
|
34012
|
+
},
|
|
34013
|
+
action.label
|
|
34014
|
+
))
|
|
34015
|
+
}
|
|
34016
|
+
)
|
|
33841
34017
|
]
|
|
33842
34018
|
}
|
|
33843
34019
|
)
|
|
@@ -33901,7 +34077,7 @@ var SyntrologieSDK = (() => {
|
|
|
33901
34077
|
telemetry,
|
|
33902
34078
|
launcherLabel = "Adaptives",
|
|
33903
34079
|
launcherAnimate = false,
|
|
33904
|
-
launcherAnimationStyle = "pulse",
|
|
34080
|
+
launcherAnimationStyle: _launcherAnimationStyle = "pulse",
|
|
33905
34081
|
footerSlot,
|
|
33906
34082
|
tiles,
|
|
33907
34083
|
isLoading,
|
|
@@ -33915,14 +34091,17 @@ var SyntrologieSDK = (() => {
|
|
|
33915
34091
|
const [expandedId, setExpandedId] = (0, import_react7.useState)(null);
|
|
33916
34092
|
const runtime4 = useRuntime();
|
|
33917
34093
|
const theme = { ...DEFAULT_THEME, ...themeOverride };
|
|
33918
|
-
const handleTileClick = (0, import_react7.useCallback)(
|
|
33919
|
-
|
|
33920
|
-
|
|
33921
|
-
|
|
33922
|
-
|
|
33923
|
-
|
|
33924
|
-
|
|
33925
|
-
|
|
34094
|
+
const handleTileClick = (0, import_react7.useCallback)(
|
|
34095
|
+
(id) => {
|
|
34096
|
+
const wasExpanded = expandedId === id;
|
|
34097
|
+
setExpandedId(wasExpanded ? null : id);
|
|
34098
|
+
if (runtime4) {
|
|
34099
|
+
const event = wasExpanded ? CanvasEvents.tileCollapsed(id, "overlay") : CanvasEvents.tileExpanded(id, "overlay");
|
|
34100
|
+
runtime4.events.publish(event.name, event.props, event.source);
|
|
34101
|
+
}
|
|
34102
|
+
},
|
|
34103
|
+
[expandedId, runtime4]
|
|
34104
|
+
);
|
|
33926
34105
|
(0, import_react7.useEffect)(() => {
|
|
33927
34106
|
if (!isOpen) return;
|
|
33928
34107
|
tiles.forEach((tile) => {
|
|
@@ -33964,21 +34143,23 @@ var SyntrologieSDK = (() => {
|
|
|
33964
34143
|
minWidth: "320px",
|
|
33965
34144
|
height: "100%",
|
|
33966
34145
|
maxHeight: "100%",
|
|
33967
|
-
background: isLightMode ? lightGradient : darkGradient,
|
|
33968
|
-
backdropFilter: `blur(${theme.backdropBlur})`,
|
|
33969
|
-
WebkitBackdropFilter: `blur(${theme.backdropBlur})`,
|
|
33970
34146
|
pointerEvents: "auto",
|
|
33971
34147
|
opacity: isOpen ? 1 : 0.8,
|
|
33972
34148
|
transition: "all 340ms cubic-bezier(0.16, 1, 0.3, 1)",
|
|
33973
34149
|
color: theme.colorText || "#f5f5f7",
|
|
33974
|
-
//
|
|
33975
|
-
|
|
34150
|
+
// In standard mode: transparent container (cards have their own styling)
|
|
34151
|
+
// In focused mode: full panel with gradient background
|
|
34152
|
+
background: isFocused ? isLightMode ? lightGradient : darkGradient : "transparent",
|
|
34153
|
+
backdropFilter: isFocused ? `blur(${theme.backdropBlur})` : void 0,
|
|
34154
|
+
WebkitBackdropFilter: isFocused ? `blur(${theme.backdropBlur})` : void 0,
|
|
34155
|
+
// Borders - only in focused mode
|
|
34156
|
+
border: isFocused ? isRight ? void 0 : `1px solid ${isLightMode ? "rgba(0, 0, 0, 0.06)" : "rgba(255, 255, 255, 0.06)"}` : "none",
|
|
33976
34157
|
borderLeft: isFocused && isRight ? `1px solid ${isLightMode ? "rgba(0, 0, 0, 0.08)" : "rgba(255, 255, 255, 0.08)"}` : void 0,
|
|
33977
34158
|
borderRight: isFocused && !isRight ? `1px solid ${isLightMode ? "rgba(0, 0, 0, 0.08)" : "rgba(255, 255, 255, 0.08)"}` : void 0,
|
|
33978
|
-
// Rounded corners -
|
|
33979
|
-
borderRadius: isFocused ? "0" :
|
|
33980
|
-
// Shadow
|
|
33981
|
-
boxShadow: isFocused ? "none" :
|
|
34159
|
+
// Rounded corners - only in focused mode
|
|
34160
|
+
borderRadius: isFocused ? "0" : void 0,
|
|
34161
|
+
// Shadow - only in focused mode
|
|
34162
|
+
boxShadow: isFocused ? "none" : void 0,
|
|
33982
34163
|
// Transform logic
|
|
33983
34164
|
transform: isOpen ? "translateX(0)" : isRight ? "translateX(120%)" : "translateX(-120%)"
|
|
33984
34165
|
};
|
|
@@ -34003,8 +34184,26 @@ var SyntrologieSDK = (() => {
|
|
|
34003
34184
|
},
|
|
34004
34185
|
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: wrapperStyle, children: [
|
|
34005
34186
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: containerStyle, children: [
|
|
34006
|
-
|
|
34007
|
-
|
|
34187
|
+
isFocused && canvasTitle && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("header", { style: { color: "white", padding: "1.5rem 1.5rem 0" }, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
34188
|
+
"p",
|
|
34189
|
+
{
|
|
34190
|
+
style: {
|
|
34191
|
+
margin: 0,
|
|
34192
|
+
fontSize: "0.7rem",
|
|
34193
|
+
textTransform: "uppercase",
|
|
34194
|
+
letterSpacing: "0.5em",
|
|
34195
|
+
color: "rgba(255, 255, 255, 0.6)"
|
|
34196
|
+
},
|
|
34197
|
+
children: canvasTitle
|
|
34198
|
+
}
|
|
34199
|
+
) }),
|
|
34200
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: { flex: 1, overflowY: "auto", padding: isFocused ? "0" : "1rem" }, children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
34201
|
+
"div",
|
|
34202
|
+
{
|
|
34203
|
+
style: { color: "rgba(255, 255, 255, 0.85)", padding: isFocused ? "1rem" : "0" },
|
|
34204
|
+
children: "Loading..."
|
|
34205
|
+
}
|
|
34206
|
+
) : error2 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: { color: "#fecdd3", padding: isFocused ? "1rem" : "0" }, children: [
|
|
34008
34207
|
"Failed to load: ",
|
|
34009
34208
|
error2
|
|
34010
34209
|
] }) : isFocused ? (
|
|
@@ -34023,38 +34222,28 @@ var SyntrologieSDK = (() => {
|
|
|
34023
34222
|
}
|
|
34024
34223
|
) : null
|
|
34025
34224
|
) : (
|
|
34026
|
-
/* Standard Mode:
|
|
34225
|
+
/* Standard Mode: Stacked floating cards */
|
|
34027
34226
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
34028
34227
|
"div",
|
|
34029
34228
|
{
|
|
34030
34229
|
style: {
|
|
34031
|
-
display: "
|
|
34032
|
-
|
|
34033
|
-
gap: "0.
|
|
34230
|
+
display: "flex",
|
|
34231
|
+
flexDirection: "column",
|
|
34232
|
+
gap: "0.75rem",
|
|
34034
34233
|
width: "100%"
|
|
34035
34234
|
},
|
|
34036
34235
|
children: tiles.map((tile) => {
|
|
34037
|
-
const isHalf = tile.size === "half";
|
|
34038
34236
|
const isExpanded = expandedId === tile.id;
|
|
34039
34237
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
34040
|
-
|
|
34238
|
+
TileCard,
|
|
34041
34239
|
{
|
|
34042
|
-
|
|
34043
|
-
|
|
34044
|
-
|
|
34045
|
-
|
|
34046
|
-
|
|
34047
|
-
|
|
34048
|
-
|
|
34049
|
-
config: tile,
|
|
34050
|
-
surface: "overlay",
|
|
34051
|
-
telemetry,
|
|
34052
|
-
customRenderers,
|
|
34053
|
-
isExpanded,
|
|
34054
|
-
onToggleExpand: () => handleTileClick(tile.id),
|
|
34055
|
-
style: { width: "100%" }
|
|
34056
|
-
}
|
|
34057
|
-
)
|
|
34240
|
+
config: tile,
|
|
34241
|
+
surface: "overlay",
|
|
34242
|
+
telemetry,
|
|
34243
|
+
customRenderers,
|
|
34244
|
+
isExpanded,
|
|
34245
|
+
onToggleExpand: () => handleTileClick(tile.id),
|
|
34246
|
+
style: { width: "100%" }
|
|
34058
34247
|
},
|
|
34059
34248
|
tile.id
|
|
34060
34249
|
);
|
|
@@ -34163,7 +34352,17 @@ var SyntrologieSDK = (() => {
|
|
|
34163
34352
|
}
|
|
34164
34353
|
),
|
|
34165
34354
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: { display: "flex", flexDirection: "column", textAlign: "left" }, children: [
|
|
34166
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
34355
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
34356
|
+
"span",
|
|
34357
|
+
{
|
|
34358
|
+
style: {
|
|
34359
|
+
fontSize: "0.55rem",
|
|
34360
|
+
letterSpacing: "0.35em",
|
|
34361
|
+
color: "rgba(255,255,255,0.7)"
|
|
34362
|
+
},
|
|
34363
|
+
children: isOpen ? "Hide" : "Open"
|
|
34364
|
+
}
|
|
34365
|
+
),
|
|
34167
34366
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { style: { fontSize: "0.85rem", letterSpacing: "0.25em" }, children: launcherLabel })
|
|
34168
34367
|
] })
|
|
34169
34368
|
]
|
|
@@ -34180,11 +34379,7 @@ var SyntrologieSDK = (() => {
|
|
|
34180
34379
|
// src/components/TileWheel.tsx
|
|
34181
34380
|
var import_react8 = __toESM(require_react(), 1);
|
|
34182
34381
|
var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
|
|
34183
|
-
function TileWheel({
|
|
34184
|
-
tiles,
|
|
34185
|
-
intervalMs = 7e3,
|
|
34186
|
-
telemetry
|
|
34187
|
-
}) {
|
|
34382
|
+
function TileWheel({ tiles, intervalMs = 7e3, telemetry }) {
|
|
34188
34383
|
const [index2, setIndex] = (0, import_react8.useState)(0);
|
|
34189
34384
|
const ordered = (0, import_react8.useMemo)(
|
|
34190
34385
|
() => [...tiles].filter((tile) => tile.size !== "half").sort((a2, b2) => (a2.order ?? 0) - (b2.order ?? 0)),
|
|
@@ -34218,14 +34413,7 @@ var SyntrologieSDK = (() => {
|
|
|
34218
34413
|
{
|
|
34219
34414
|
className: "flex transition-transform duration-700 ease-out",
|
|
34220
34415
|
style: { transform: `translateX(-${index2 * 100}%)`, width: `${ordered.length * 100}%` },
|
|
34221
|
-
children: ordered.map((tile) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "w-full shrink-0 px-4", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
34222
|
-
TileCard,
|
|
34223
|
-
{
|
|
34224
|
-
config: { ...tile, size: "half" },
|
|
34225
|
-
surface: "wheel",
|
|
34226
|
-
telemetry
|
|
34227
|
-
}
|
|
34228
|
-
) }, tile.id))
|
|
34416
|
+
children: ordered.map((tile) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "w-full shrink-0 px-4", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TileCard, { config: { ...tile, size: "half" }, surface: "wheel", telemetry }) }, tile.id))
|
|
34229
34417
|
}
|
|
34230
34418
|
),
|
|
34231
34419
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "mt-4 flex justify-center gap-2", children: ordered.map((tile, idx) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
@@ -34334,11 +34522,13 @@ var SyntrologieSDK = (() => {
|
|
|
34334
34522
|
if (experiments && configFeatureKey) {
|
|
34335
34523
|
const directConfig = experiments.getFeatureValue?.(configFeatureKey, null);
|
|
34336
34524
|
if (directConfig && typeof directConfig === "object") {
|
|
34525
|
+
debug("SmartCanvas Config", "Resolved config directly from feature flag", directConfig);
|
|
34337
34526
|
return directConfig;
|
|
34338
34527
|
}
|
|
34339
34528
|
}
|
|
34340
34529
|
const uri = resolveConfigUri({ configUri, experiments, featureKey });
|
|
34341
34530
|
if (!uri) {
|
|
34531
|
+
debug("SmartCanvas Config", "No config available \u2014 returning empty config");
|
|
34342
34532
|
return { tiles: [], overlays: [] };
|
|
34343
34533
|
}
|
|
34344
34534
|
if (!validateConfigUri(uri)) {
|
|
@@ -34349,7 +34539,9 @@ var SyntrologieSDK = (() => {
|
|
|
34349
34539
|
if (!response.ok) {
|
|
34350
34540
|
throw new Error(`SmartCanvas: failed to fetch config (${response.status})`);
|
|
34351
34541
|
}
|
|
34352
|
-
|
|
34542
|
+
const config = await response.json();
|
|
34543
|
+
debug("SmartCanvas Config", "Fetched config from URI", config);
|
|
34544
|
+
return config;
|
|
34353
34545
|
};
|
|
34354
34546
|
};
|
|
34355
34547
|
|
|
@@ -34454,13 +34646,13 @@ var SyntrologieSDK = (() => {
|
|
|
34454
34646
|
experiments,
|
|
34455
34647
|
telemetry,
|
|
34456
34648
|
runtime: runtime4,
|
|
34457
|
-
overlayFetcher,
|
|
34458
|
-
overlayConfigUri,
|
|
34459
|
-
overlayConfigFeatureKey = "smart-canvas-overlay-uri",
|
|
34460
|
-
overlayFetchCredentials = "include",
|
|
34649
|
+
overlayFetcher: _overlayFetcher,
|
|
34650
|
+
overlayConfigUri: _overlayConfigUri,
|
|
34651
|
+
overlayConfigFeatureKey: _overlayConfigFeatureKey = "smart-canvas-overlay-uri",
|
|
34652
|
+
overlayFetchCredentials: _overlayFetchCredentials = "include",
|
|
34461
34653
|
footerSlot,
|
|
34462
34654
|
launcherLabel,
|
|
34463
|
-
canvasHost,
|
|
34655
|
+
canvasHost: _canvasHost,
|
|
34464
34656
|
customRenderers,
|
|
34465
34657
|
theme
|
|
34466
34658
|
}) {
|
|
@@ -34584,11 +34776,15 @@ var SyntrologieSDK = (() => {
|
|
|
34584
34776
|
if (document.body) {
|
|
34585
34777
|
document.body.appendChild(root);
|
|
34586
34778
|
} else {
|
|
34587
|
-
document.addEventListener(
|
|
34588
|
-
|
|
34589
|
-
|
|
34590
|
-
|
|
34591
|
-
|
|
34779
|
+
document.addEventListener(
|
|
34780
|
+
"DOMContentLoaded",
|
|
34781
|
+
() => {
|
|
34782
|
+
if (!root.parentNode) {
|
|
34783
|
+
document.body.appendChild(root);
|
|
34784
|
+
}
|
|
34785
|
+
},
|
|
34786
|
+
{ once: true }
|
|
34787
|
+
);
|
|
34592
34788
|
}
|
|
34593
34789
|
}
|
|
34594
34790
|
return root;
|
|
@@ -34746,51 +34942,6 @@ var SyntrologieSDK = (() => {
|
|
|
34746
34942
|
})();`;
|
|
34747
34943
|
}
|
|
34748
34944
|
|
|
34749
|
-
// src/logger.ts
|
|
34750
|
-
var debugEnabled = false;
|
|
34751
|
-
function checkUrlParam() {
|
|
34752
|
-
if (typeof window === "undefined") return false;
|
|
34753
|
-
try {
|
|
34754
|
-
const params = new URLSearchParams(window.location.search);
|
|
34755
|
-
return params.get("syntro_debug") === "true";
|
|
34756
|
-
} catch {
|
|
34757
|
-
return false;
|
|
34758
|
-
}
|
|
34759
|
-
}
|
|
34760
|
-
function initLogger(tokenDebug) {
|
|
34761
|
-
if (checkUrlParam()) {
|
|
34762
|
-
debugEnabled = true;
|
|
34763
|
-
return;
|
|
34764
|
-
}
|
|
34765
|
-
debugEnabled = tokenDebug ?? false;
|
|
34766
|
-
}
|
|
34767
|
-
function isDebugEnabled() {
|
|
34768
|
-
if (checkUrlParam()) return true;
|
|
34769
|
-
return debugEnabled;
|
|
34770
|
-
}
|
|
34771
|
-
function debug(prefix, message, data) {
|
|
34772
|
-
if (!isDebugEnabled()) return;
|
|
34773
|
-
if (data !== void 0) {
|
|
34774
|
-
console.log(`[${prefix}]`, message, data);
|
|
34775
|
-
} else {
|
|
34776
|
-
console.log(`[${prefix}]`, message);
|
|
34777
|
-
}
|
|
34778
|
-
}
|
|
34779
|
-
function warn(prefix, message, data) {
|
|
34780
|
-
if (data !== void 0) {
|
|
34781
|
-
console.warn(`[${prefix}]`, message, data);
|
|
34782
|
-
} else {
|
|
34783
|
-
console.warn(`[${prefix}]`, message);
|
|
34784
|
-
}
|
|
34785
|
-
}
|
|
34786
|
-
function error(prefix, message, data) {
|
|
34787
|
-
if (data !== void 0) {
|
|
34788
|
-
console.error(`[${prefix}]`, message, data);
|
|
34789
|
-
} else {
|
|
34790
|
-
console.error(`[${prefix}]`, message);
|
|
34791
|
-
}
|
|
34792
|
-
}
|
|
34793
|
-
|
|
34794
34945
|
// src/editorLoader.ts
|
|
34795
34946
|
var DEFAULT_EDITOR_URL = "https://cdn.syntrologie.com/editor-sdk/latest/editor-sdk.js";
|
|
34796
34947
|
var ALLOWED_EDITOR_HOSTS = [
|
|
@@ -34928,7 +35079,10 @@ var SyntrologieSDK = (() => {
|
|
|
34928
35079
|
const baseEditorUrl = urlParamEditorSdk || derivedEditorSdk || options.editorUrl || DEFAULT_EDITOR_URL;
|
|
34929
35080
|
const token = getTokenFromUrl();
|
|
34930
35081
|
if (!token) {
|
|
34931
|
-
warn(
|
|
35082
|
+
warn(
|
|
35083
|
+
"Syntro Runtime",
|
|
35084
|
+
"\u274C No token found in URL params. SDK requires editor_token or audit_token."
|
|
35085
|
+
);
|
|
34932
35086
|
debug("Syntro Runtime", "================================");
|
|
34933
35087
|
return;
|
|
34934
35088
|
}
|
|
@@ -35094,7 +35248,7 @@ var SyntrologieSDK = (() => {
|
|
|
35094
35248
|
console.error("[SmartCanvas] Error fetching config:", error2);
|
|
35095
35249
|
}
|
|
35096
35250
|
}
|
|
35097
|
-
return currentConfig;
|
|
35251
|
+
return currentConfig ?? { tiles: [], actions: [], fetchedAt: "" };
|
|
35098
35252
|
},
|
|
35099
35253
|
updateConfig: async (newConfig) => {
|
|
35100
35254
|
currentConfig = newConfig;
|
|
@@ -39853,6 +40007,9 @@ var SyntrologieSDK = (() => {
|
|
|
39853
40007
|
if (tagName === "input" || tagName === "textarea") return StandardEvents.UI_INPUT;
|
|
39854
40008
|
return StandardEvents.UI_CLICK;
|
|
39855
40009
|
}
|
|
40010
|
+
if (typeof eventName !== "string") {
|
|
40011
|
+
return "posthog.unknown";
|
|
40012
|
+
}
|
|
39856
40013
|
if (!eventName.startsWith("$")) {
|
|
39857
40014
|
return `posthog.${eventName}`;
|
|
39858
40015
|
}
|
|
@@ -39894,6 +40051,7 @@ var SyntrologieSDK = (() => {
|
|
|
39894
40051
|
}
|
|
39895
40052
|
function shouldNormalizeEvent(phEvent) {
|
|
39896
40053
|
const eventName = phEvent.event;
|
|
40054
|
+
if (typeof eventName !== "string") return false;
|
|
39897
40055
|
const skipEvents = [
|
|
39898
40056
|
"$feature_flag_called",
|
|
39899
40057
|
"$feature_flags",
|
|
@@ -39917,6 +40075,7 @@ var SyntrologieSDK = (() => {
|
|
|
39917
40075
|
}
|
|
39918
40076
|
function createPostHogNormalizer(publishFn) {
|
|
39919
40077
|
return (eventName, properties) => {
|
|
40078
|
+
if (typeof eventName !== "string") return;
|
|
39920
40079
|
const phEvent = {
|
|
39921
40080
|
event: eventName,
|
|
39922
40081
|
properties,
|
|
@@ -40337,9 +40496,7 @@ var SyntrologieSDK = (() => {
|
|
|
40337
40496
|
return context.page.routeId === condition.routeId;
|
|
40338
40497
|
}
|
|
40339
40498
|
case "anchor_visible": {
|
|
40340
|
-
const anchor = context.anchors?.find(
|
|
40341
|
-
(a2) => a2.anchorId === condition.anchorId
|
|
40342
|
-
);
|
|
40499
|
+
const anchor = context.anchors?.find((a2) => a2.anchorId === condition.anchorId);
|
|
40343
40500
|
switch (condition.state) {
|
|
40344
40501
|
case "visible":
|
|
40345
40502
|
return anchor?.visible === true;
|
|
@@ -40362,14 +40519,10 @@ var SyntrologieSDK = (() => {
|
|
|
40362
40519
|
}
|
|
40363
40520
|
case "viewport": {
|
|
40364
40521
|
const { width, height } = context.viewport;
|
|
40365
|
-
if (condition.minWidth !== void 0 && width < condition.minWidth)
|
|
40366
|
-
|
|
40367
|
-
if (condition.
|
|
40368
|
-
|
|
40369
|
-
if (condition.minHeight !== void 0 && height < condition.minHeight)
|
|
40370
|
-
return false;
|
|
40371
|
-
if (condition.maxHeight !== void 0 && height > condition.maxHeight)
|
|
40372
|
-
return false;
|
|
40522
|
+
if (condition.minWidth !== void 0 && width < condition.minWidth) return false;
|
|
40523
|
+
if (condition.maxWidth !== void 0 && width > condition.maxWidth) return false;
|
|
40524
|
+
if (condition.minHeight !== void 0 && height < condition.minHeight) return false;
|
|
40525
|
+
if (condition.maxHeight !== void 0 && height > condition.maxHeight) return false;
|
|
40373
40526
|
return true;
|
|
40374
40527
|
}
|
|
40375
40528
|
case "session_metric": {
|
|
@@ -42597,7 +42750,7 @@ var SyntrologieSDK = (() => {
|
|
|
42597
42750
|
handle.destroy();
|
|
42598
42751
|
};
|
|
42599
42752
|
window.addEventListener("keydown", onKey);
|
|
42600
|
-
|
|
42753
|
+
const originalInert = [];
|
|
42601
42754
|
if (opts.blocking) {
|
|
42602
42755
|
Array.from(document.body.children).forEach((el) => {
|
|
42603
42756
|
if (el !== overlayRoot && el.getAttribute("inert") === null) {
|
|
@@ -43092,8 +43245,8 @@ var SyntrologieSDK = (() => {
|
|
|
43092
43245
|
if (!anchorEl) {
|
|
43093
43246
|
throw new Error(`Anchor not found: ${action.anchorId}`);
|
|
43094
43247
|
}
|
|
43095
|
-
const
|
|
43096
|
-
const
|
|
43248
|
+
const _scrollXBefore = window.scrollX;
|
|
43249
|
+
const _scrollYBefore = window.scrollY;
|
|
43097
43250
|
anchorEl.scrollIntoView({
|
|
43098
43251
|
behavior: action.behavior ?? "smooth",
|
|
43099
43252
|
block: action.block ?? "center",
|
|
@@ -43177,9 +43330,7 @@ var SyntrologieSDK = (() => {
|
|
|
43177
43330
|
if (!step.route) return true;
|
|
43178
43331
|
const currentRoute = getCurrentRoute();
|
|
43179
43332
|
if (step.route.includes("*")) {
|
|
43180
|
-
const pattern = new RegExp(
|
|
43181
|
-
"^" + step.route.replace(/\*/g, ".*") + "$"
|
|
43182
|
-
);
|
|
43333
|
+
const pattern = new RegExp("^" + step.route.replace(/\*/g, ".*") + "$");
|
|
43183
43334
|
return pattern.test(currentRoute);
|
|
43184
43335
|
}
|
|
43185
43336
|
return currentRoute === step.route;
|
|
@@ -43307,30 +43458,24 @@ var SyntrologieSDK = (() => {
|
|
|
43307
43458
|
return;
|
|
43308
43459
|
}
|
|
43309
43460
|
if (step.onAction && context.subscribeEvent) {
|
|
43310
|
-
eventUnsubscribe = context.subscribeEvent(
|
|
43311
|
-
|
|
43312
|
-
(
|
|
43313
|
-
const
|
|
43314
|
-
if (
|
|
43315
|
-
|
|
43316
|
-
if (nextStepId) {
|
|
43317
|
-
advanceToStep(nextStepId);
|
|
43318
|
-
}
|
|
43461
|
+
eventUnsubscribe = context.subscribeEvent("action.modal_cta_clicked", (props) => {
|
|
43462
|
+
const actionId = props?.actionId;
|
|
43463
|
+
if (actionId && step.onAction) {
|
|
43464
|
+
const nextStepId = step.onAction[actionId];
|
|
43465
|
+
if (nextStepId) {
|
|
43466
|
+
advanceToStep(nextStepId);
|
|
43319
43467
|
}
|
|
43320
43468
|
}
|
|
43321
|
-
);
|
|
43322
|
-
const tooltipUnsubscribe = context.subscribeEvent(
|
|
43323
|
-
|
|
43324
|
-
(
|
|
43325
|
-
const
|
|
43326
|
-
if (
|
|
43327
|
-
|
|
43328
|
-
if (nextStepId) {
|
|
43329
|
-
advanceToStep(nextStepId);
|
|
43330
|
-
}
|
|
43469
|
+
});
|
|
43470
|
+
const tooltipUnsubscribe = context.subscribeEvent("action.tooltip_cta_clicked", (props) => {
|
|
43471
|
+
const actionId = props?.actionId;
|
|
43472
|
+
if (actionId && step.onAction) {
|
|
43473
|
+
const nextStepId = step.onAction[actionId];
|
|
43474
|
+
if (nextStepId) {
|
|
43475
|
+
advanceToStep(nextStepId);
|
|
43331
43476
|
}
|
|
43332
43477
|
}
|
|
43333
|
-
);
|
|
43478
|
+
});
|
|
43334
43479
|
const originalUnsubscribe = eventUnsubscribe;
|
|
43335
43480
|
eventUnsubscribe = () => {
|
|
43336
43481
|
originalUnsubscribe();
|
|
@@ -43747,7 +43892,7 @@ var SyntrologieSDK = (() => {
|
|
|
43747
43892
|
});
|
|
43748
43893
|
}
|
|
43749
43894
|
}
|
|
43750
|
-
function validateTooltipAction(action, errors,
|
|
43895
|
+
function validateTooltipAction(action, errors, _warnings) {
|
|
43751
43896
|
if (!action.content || typeof action.content !== "object") {
|
|
43752
43897
|
errors.push({
|
|
43753
43898
|
code: "MISSING_CONTENT",
|
|
@@ -43764,7 +43909,7 @@ var SyntrologieSDK = (() => {
|
|
|
43764
43909
|
});
|
|
43765
43910
|
}
|
|
43766
43911
|
}
|
|
43767
|
-
function validateInsertHtmlAction(action, errors,
|
|
43912
|
+
function validateInsertHtmlAction(action, errors, _warnings) {
|
|
43768
43913
|
if (!action.html || typeof action.html !== "string") {
|
|
43769
43914
|
errors.push({
|
|
43770
43915
|
code: "MISSING_HTML",
|
|
@@ -43787,7 +43932,7 @@ var SyntrologieSDK = (() => {
|
|
|
43787
43932
|
});
|
|
43788
43933
|
}
|
|
43789
43934
|
}
|
|
43790
|
-
function validateSetTextAction(action, errors,
|
|
43935
|
+
function validateSetTextAction(action, errors, _warnings) {
|
|
43791
43936
|
if (action.text === void 0 || action.text === null) {
|
|
43792
43937
|
errors.push({
|
|
43793
43938
|
code: "MISSING_TEXT",
|
|
@@ -43796,7 +43941,7 @@ var SyntrologieSDK = (() => {
|
|
|
43796
43941
|
});
|
|
43797
43942
|
}
|
|
43798
43943
|
}
|
|
43799
|
-
function validateSetAttrAction(action, errors,
|
|
43944
|
+
function validateSetAttrAction(action, errors, _warnings) {
|
|
43800
43945
|
if (!action.attr || typeof action.attr !== "string") {
|
|
43801
43946
|
errors.push({
|
|
43802
43947
|
code: "MISSING_ATTR",
|
|
@@ -43833,7 +43978,7 @@ var SyntrologieSDK = (() => {
|
|
|
43833
43978
|
});
|
|
43834
43979
|
}
|
|
43835
43980
|
}
|
|
43836
|
-
function validateSetStyleAction(action, errors,
|
|
43981
|
+
function validateSetStyleAction(action, errors, _warnings) {
|
|
43837
43982
|
if (!action.styles || typeof action.styles !== "object") {
|
|
43838
43983
|
errors.push({
|
|
43839
43984
|
code: "MISSING_STYLES",
|
|
@@ -43860,7 +44005,7 @@ var SyntrologieSDK = (() => {
|
|
|
43860
44005
|
}
|
|
43861
44006
|
}
|
|
43862
44007
|
}
|
|
43863
|
-
function validateMountWidgetAction(action, errors,
|
|
44008
|
+
function validateMountWidgetAction(action, errors, _warnings) {
|
|
43864
44009
|
if (!action.slot || typeof action.slot !== "string") {
|
|
43865
44010
|
errors.push({
|
|
43866
44011
|
code: "MISSING_SLOT",
|
|
@@ -43882,7 +44027,7 @@ var SyntrologieSDK = (() => {
|
|
|
43882
44027
|
});
|
|
43883
44028
|
}
|
|
43884
44029
|
}
|
|
43885
|
-
function validateWaitAction(action, errors,
|
|
44030
|
+
function validateWaitAction(action, errors, _warnings) {
|
|
43886
44031
|
if (action.durationMs === void 0 && !action.event) {
|
|
43887
44032
|
errors.push({
|
|
43888
44033
|
code: "MISSING_WAIT_CONFIG",
|
|
@@ -43994,7 +44139,7 @@ var SyntrologieSDK = (() => {
|
|
|
43994
44139
|
}
|
|
43995
44140
|
}
|
|
43996
44141
|
}
|
|
43997
|
-
function validateModalAction(action, errors,
|
|
44142
|
+
function validateModalAction(action, errors, _warnings) {
|
|
43998
44143
|
if (!action.content || typeof action.content !== "object") {
|
|
43999
44144
|
errors.push({
|
|
44000
44145
|
code: "MISSING_CONTENT",
|
|
@@ -44106,7 +44251,7 @@ var SyntrologieSDK = (() => {
|
|
|
44106
44251
|
}
|
|
44107
44252
|
}
|
|
44108
44253
|
if (step.onAction) {
|
|
44109
|
-
for (const [
|
|
44254
|
+
for (const [_actionId, targetStepId] of Object.entries(step.onAction)) {
|
|
44110
44255
|
if (targetStepId !== "end" && !action.steps.some((s2) => s2.id === targetStepId)) {
|
|
44111
44256
|
warnings.push({
|
|
44112
44257
|
code: "UNKNOWN_TARGET_STEP",
|
|
@@ -44181,10 +44326,7 @@ var SyntrologieSDK = (() => {
|
|
|
44181
44326
|
applyAction: apply,
|
|
44182
44327
|
// Allow composite executors to subscribe to events
|
|
44183
44328
|
subscribeEvent: eventBus ? (name, callback) => {
|
|
44184
|
-
return eventBus.subscribe(
|
|
44185
|
-
{ names: [name] },
|
|
44186
|
-
(event) => callback(event.props)
|
|
44187
|
-
);
|
|
44329
|
+
return eventBus.subscribe({ names: [name] }, (event) => callback(event.props));
|
|
44188
44330
|
} : void 0
|
|
44189
44331
|
};
|
|
44190
44332
|
}
|
|
@@ -44408,7 +44550,27 @@ var SyntrologieSDK = (() => {
|
|
|
44408
44550
|
tpl.innerHTML = html2;
|
|
44409
44551
|
const root = tpl.content;
|
|
44410
44552
|
const walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT, null);
|
|
44411
|
-
const allowed = /* @__PURE__ */ new Set([
|
|
44553
|
+
const allowed = /* @__PURE__ */ new Set([
|
|
44554
|
+
"b",
|
|
44555
|
+
"strong",
|
|
44556
|
+
"i",
|
|
44557
|
+
"em",
|
|
44558
|
+
"u",
|
|
44559
|
+
"span",
|
|
44560
|
+
"div",
|
|
44561
|
+
"p",
|
|
44562
|
+
"br",
|
|
44563
|
+
"ul",
|
|
44564
|
+
"ol",
|
|
44565
|
+
"li",
|
|
44566
|
+
"code",
|
|
44567
|
+
"pre",
|
|
44568
|
+
"small",
|
|
44569
|
+
"sup",
|
|
44570
|
+
"sub",
|
|
44571
|
+
"a",
|
|
44572
|
+
"button"
|
|
44573
|
+
]);
|
|
44412
44574
|
const toRemove = [];
|
|
44413
44575
|
while (walker.nextNode()) {
|
|
44414
44576
|
const el = walker.currentNode;
|
|
@@ -45087,10 +45249,7 @@ var SyntrologieSDK = (() => {
|
|
|
45087
45249
|
}
|
|
45088
45250
|
};
|
|
45089
45251
|
var ANIMATION_KEYFRAMES = {
|
|
45090
|
-
fade: [
|
|
45091
|
-
{ opacity: 0 },
|
|
45092
|
-
{ opacity: 1 }
|
|
45093
|
-
],
|
|
45252
|
+
fade: [{ opacity: 0 }, { opacity: 1 }],
|
|
45094
45253
|
slide: [
|
|
45095
45254
|
{ opacity: 0, transform: "translateY(10px)" },
|
|
45096
45255
|
{ opacity: 1, transform: "translateY(0)" }
|
|
@@ -45288,11 +45447,7 @@ var SyntrologieSDK = (() => {
|
|
|
45288
45447
|
container.style.zIndex = String(getSlotZIndex(slot));
|
|
45289
45448
|
let positionCleanup;
|
|
45290
45449
|
if (slotType === "static") {
|
|
45291
|
-
applyStaticSlotStyles(
|
|
45292
|
-
container,
|
|
45293
|
-
slot,
|
|
45294
|
-
opts?.constraints
|
|
45295
|
-
);
|
|
45450
|
+
applyStaticSlotStyles(container, slot, opts?.constraints);
|
|
45296
45451
|
overlayRoot.appendChild(container);
|
|
45297
45452
|
} else if (slotType === "inline") {
|
|
45298
45453
|
const anchorId = getSlotAnchorId(slot);
|
|
@@ -45640,7 +45795,7 @@ var SyntrologieSDK = (() => {
|
|
|
45640
45795
|
* Clean up all mounted widgets.
|
|
45641
45796
|
*/
|
|
45642
45797
|
destroy() {
|
|
45643
|
-
for (const [
|
|
45798
|
+
for (const [_mountId, mounted] of this.mountedWidgets.entries()) {
|
|
45644
45799
|
mounted.cleanup?.();
|
|
45645
45800
|
mounted.container.innerHTML = "";
|
|
45646
45801
|
}
|
|
@@ -45652,7 +45807,7 @@ var SyntrologieSDK = (() => {
|
|
|
45652
45807
|
// src/apps/AppContext.ts
|
|
45653
45808
|
function createAppContext(options) {
|
|
45654
45809
|
const { appId, runtime: runtime4, isBuiltIn = false } = options;
|
|
45655
|
-
const
|
|
45810
|
+
const _statePrefix = `app:${appId}:`;
|
|
45656
45811
|
const registeredActions = [];
|
|
45657
45812
|
const registeredWidgets = [];
|
|
45658
45813
|
const appStorage = runtime4.state.ns(`app:${appId}`);
|
|
@@ -45715,12 +45870,7 @@ var SyntrologieSDK = (() => {
|
|
|
45715
45870
|
},
|
|
45716
45871
|
// Widget registration
|
|
45717
45872
|
registerWidget: (definition) => {
|
|
45718
|
-
runtime4.widgets.register(
|
|
45719
|
-
definition.id,
|
|
45720
|
-
definition.component,
|
|
45721
|
-
appId,
|
|
45722
|
-
definition.metadata
|
|
45723
|
-
);
|
|
45873
|
+
runtime4.widgets.register(definition.id, definition.component, appId, definition.metadata);
|
|
45724
45874
|
registeredWidgets.push(definition.id);
|
|
45725
45875
|
}
|
|
45726
45876
|
};
|
|
@@ -45972,9 +46122,7 @@ var SyntrologieSDK = (() => {
|
|
|
45972
46122
|
* List all apps with editor modules.
|
|
45973
46123
|
*/
|
|
45974
46124
|
listEditable() {
|
|
45975
|
-
return Array.from(this.apps.values()).filter(
|
|
45976
|
-
(r2) => r2.manifest.editor !== void 0
|
|
45977
|
-
);
|
|
46125
|
+
return Array.from(this.apps.values()).filter((r2) => r2.manifest.editor !== void 0);
|
|
45978
46126
|
}
|
|
45979
46127
|
/**
|
|
45980
46128
|
* Subscribe to registry events.
|
|
@@ -46163,9 +46311,7 @@ var SyntrologieSDK = (() => {
|
|
|
46163
46311
|
if (requiredApps.length === 0) {
|
|
46164
46312
|
return [];
|
|
46165
46313
|
}
|
|
46166
|
-
const results = await Promise.all(
|
|
46167
|
-
requiredApps.map((appId) => loadApp(appId))
|
|
46168
|
-
);
|
|
46314
|
+
const results = await Promise.all(requiredApps.map((appId) => loadApp(appId)));
|
|
46169
46315
|
return results;
|
|
46170
46316
|
}
|
|
46171
46317
|
async function preloadApps(appIds) {
|
|
@@ -46653,7 +46799,8 @@ var SyntrologieSDK = (() => {
|
|
|
46653
46799
|
|
|
46654
46800
|
// src/telemetry/registry.ts
|
|
46655
46801
|
var adapters2 = {
|
|
46656
|
-
posthog: (config) => createPostHogClient(config)
|
|
46802
|
+
posthog: (config) => createPostHogClient(config),
|
|
46803
|
+
noop: () => createNoopClient()
|
|
46657
46804
|
};
|
|
46658
46805
|
function createTelemetryClient(provider, config) {
|
|
46659
46806
|
const factory = adapters2[provider];
|
|
@@ -46666,11 +46813,7 @@ var SyntrologieSDK = (() => {
|
|
|
46666
46813
|
}
|
|
46667
46814
|
|
|
46668
46815
|
// src/fetchers/cdnFetcher.ts
|
|
46669
|
-
var ALLOWED_CDN_HOSTS = [
|
|
46670
|
-
"cdn.syntrologie.com",
|
|
46671
|
-
"localhost",
|
|
46672
|
-
"127.0.0.1"
|
|
46673
|
-
];
|
|
46816
|
+
var ALLOWED_CDN_HOSTS = ["cdn.syntrologie.com", "localhost", "127.0.0.1"];
|
|
46674
46817
|
function validateCdnUrl(url) {
|
|
46675
46818
|
try {
|
|
46676
46819
|
const parsed = new URL(url);
|
|
@@ -46709,9 +46852,7 @@ var SyntrologieSDK = (() => {
|
|
|
46709
46852
|
cache: "default"
|
|
46710
46853
|
});
|
|
46711
46854
|
if (!response.ok) {
|
|
46712
|
-
throw new Error(
|
|
46713
|
-
`[SmartCanvas] Failed to fetch config from CDN (${response.status})`
|
|
46714
|
-
);
|
|
46855
|
+
throw new Error(`[SmartCanvas] Failed to fetch config from CDN (${response.status})`);
|
|
46715
46856
|
}
|
|
46716
46857
|
const text = await response.text();
|
|
46717
46858
|
if (this.integrity) {
|
|
@@ -46931,7 +47072,10 @@ var SyntrologieSDK = (() => {
|
|
|
46931
47072
|
payload = decodeToken(options.token);
|
|
46932
47073
|
initLogger(payload.d);
|
|
46933
47074
|
} else if (!sdkMode) {
|
|
46934
|
-
error(
|
|
47075
|
+
error(
|
|
47076
|
+
"Syntro Bootstrap",
|
|
47077
|
+
"\u274C Token does not start with syn_ and NOT in editor/audit mode!"
|
|
47078
|
+
);
|
|
46935
47079
|
error("Syntro Bootstrap", "Token received:", options.token);
|
|
46936
47080
|
throw new Error("Invalid Syntro token: must start with 'syn_'");
|
|
46937
47081
|
} else {
|
|
@@ -46968,7 +47112,8 @@ var SyntrologieSDK = (() => {
|
|
|
46968
47112
|
};
|
|
46969
47113
|
let telemetry;
|
|
46970
47114
|
if (payload?.t) {
|
|
46971
|
-
|
|
47115
|
+
const provider = payload.t === "noop" ? "noop" : "posthog";
|
|
47116
|
+
telemetry = createTelemetryClient(provider, {
|
|
46972
47117
|
apiKey: payload.t,
|
|
46973
47118
|
apiHost: telemetryHost,
|
|
46974
47119
|
// undefined falls back to adapter default
|
|
@@ -46979,7 +47124,7 @@ var SyntrologieSDK = (() => {
|
|
|
46979
47124
|
// Wire up event capture to feed into EventBus
|
|
46980
47125
|
onCapture: postHogNormalizer
|
|
46981
47126
|
});
|
|
46982
|
-
console.log(
|
|
47127
|
+
console.log(`[Syntro Bootstrap] Telemetry client created (${provider}) with EventBus wiring`);
|
|
46983
47128
|
}
|
|
46984
47129
|
let sessionMetrics;
|
|
46985
47130
|
if (payload?.e) {
|
|
@@ -47046,6 +47191,14 @@ var SyntrologieSDK = (() => {
|
|
|
47046
47191
|
};
|
|
47047
47192
|
debug("Syntro Bootstrap", "Global SynOS object exposed");
|
|
47048
47193
|
}
|
|
47194
|
+
if (experiments?.refreshFeatures) {
|
|
47195
|
+
try {
|
|
47196
|
+
await experiments.refreshFeatures();
|
|
47197
|
+
debug("Syntro Bootstrap", "GrowthBook features loaded");
|
|
47198
|
+
} catch (err) {
|
|
47199
|
+
warn("Syntro Bootstrap", "Failed to load GrowthBook features:", err);
|
|
47200
|
+
}
|
|
47201
|
+
}
|
|
47049
47202
|
let baseFetcher;
|
|
47050
47203
|
if (options.fetcher) {
|
|
47051
47204
|
baseFetcher = options.fetcher;
|