@syntrologie/runtime-sdk 2.4.0-canary.24 → 2.4.0-canary.26
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/dist/actions/schema.js +2 -2
- package/dist/{chunk-LD22WJ44.js → chunk-E26VPJAS.js} +138 -59
- package/dist/chunk-E26VPJAS.js.map +7 -0
- package/dist/{chunk-NM5Y27GX.js → chunk-R5DNAIRI.js} +2 -2
- package/dist/{chunk-WILWIL6L.js → chunk-XDYJ64IN.js} +18 -4
- package/dist/chunk-XDYJ64IN.js.map +7 -0
- package/dist/config/schema.d.ts +3127 -6
- package/dist/config/schema.js +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +2 -2
- package/dist/react.js +3 -3
- package/dist/smart-canvas.esm.js +35 -35
- package/dist/smart-canvas.esm.js.map +3 -3
- package/dist/smart-canvas.js +135 -48
- package/dist/smart-canvas.js.map +2 -2
- package/dist/smart-canvas.min.js +35 -35
- package/dist/smart-canvas.min.js.map +3 -3
- package/dist/version.d.ts +1 -1
- package/package.json +7 -7
- package/schema/canvas-config.schema.json +331 -5
- package/scripts/validate-config.mjs +102 -0
- package/dist/chunk-LD22WJ44.js.map +0 -7
- package/dist/chunk-WILWIL6L.js.map +0 -7
- /package/dist/{chunk-NM5Y27GX.js.map → chunk-R5DNAIRI.js.map} +0 -0
package/dist/smart-canvas.js
CHANGED
|
@@ -13082,8 +13082,19 @@ var SyntrologieSDK = (() => {
|
|
|
13082
13082
|
} };
|
|
13083
13083
|
}
|
|
13084
13084
|
const sanitizedHtml = sanitizeHtml(action.html);
|
|
13085
|
+
const dedupAttr = "data-syntro-insert-label";
|
|
13086
|
+
const label = action.label;
|
|
13087
|
+
if (label) {
|
|
13088
|
+
const escapedLabel = CSS.escape(label);
|
|
13089
|
+
const searchRoot = anchorEl.parentElement ?? anchorEl;
|
|
13090
|
+
const existing = searchRoot.querySelector(`[${dedupAttr}="${escapedLabel}"]`);
|
|
13091
|
+
if (existing)
|
|
13092
|
+
existing.remove();
|
|
13093
|
+
}
|
|
13085
13094
|
const container = document.createElement("div");
|
|
13086
13095
|
container.setAttribute("data-syntro-action-id", context.generateId());
|
|
13096
|
+
if (label)
|
|
13097
|
+
container.setAttribute(dedupAttr, label);
|
|
13087
13098
|
container.innerHTML = sanitizedHtml;
|
|
13088
13099
|
let originalContent = null;
|
|
13089
13100
|
switch (action.position) {
|
|
@@ -16449,26 +16460,40 @@ var SyntrologieSDK = (() => {
|
|
|
16449
16460
|
}
|
|
16450
16461
|
const attachTrigger = () => {
|
|
16451
16462
|
if (opts.trigger === "hover") {
|
|
16452
|
-
|
|
16463
|
+
let hideTimeout = null;
|
|
16464
|
+
const show = () => {
|
|
16465
|
+
if (hideTimeout) {
|
|
16466
|
+
clearTimeout(hideTimeout);
|
|
16467
|
+
hideTimeout = null;
|
|
16468
|
+
}
|
|
16453
16469
|
div.style.visibility = "visible";
|
|
16454
16470
|
div.style.opacity = "1";
|
|
16455
16471
|
};
|
|
16456
|
-
const
|
|
16457
|
-
|
|
16458
|
-
|
|
16472
|
+
const scheduleHide = () => {
|
|
16473
|
+
hideTimeout = setTimeout(() => {
|
|
16474
|
+
div.style.visibility = "hidden";
|
|
16475
|
+
div.style.opacity = "0";
|
|
16476
|
+
hideTimeout = null;
|
|
16477
|
+
}, 100);
|
|
16459
16478
|
};
|
|
16460
16479
|
div.style.visibility = "hidden";
|
|
16461
16480
|
div.style.opacity = "0";
|
|
16462
16481
|
div.style.transition = "opacity 200ms ease, visibility 200ms";
|
|
16463
|
-
anchorEl.addEventListener("mouseenter",
|
|
16464
|
-
anchorEl.addEventListener("mouseleave",
|
|
16465
|
-
|
|
16466
|
-
|
|
16482
|
+
anchorEl.addEventListener("mouseenter", show);
|
|
16483
|
+
anchorEl.addEventListener("mouseleave", scheduleHide);
|
|
16484
|
+
div.addEventListener("mouseenter", show);
|
|
16485
|
+
div.addEventListener("mouseleave", scheduleHide);
|
|
16486
|
+
anchorEl.addEventListener("focus", show);
|
|
16487
|
+
anchorEl.addEventListener("blur", scheduleHide);
|
|
16467
16488
|
return () => {
|
|
16468
|
-
|
|
16469
|
-
|
|
16470
|
-
anchorEl.removeEventListener("
|
|
16471
|
-
anchorEl.removeEventListener("
|
|
16489
|
+
if (hideTimeout)
|
|
16490
|
+
clearTimeout(hideTimeout);
|
|
16491
|
+
anchorEl.removeEventListener("mouseenter", show);
|
|
16492
|
+
anchorEl.removeEventListener("mouseleave", scheduleHide);
|
|
16493
|
+
div.removeEventListener("mouseenter", show);
|
|
16494
|
+
div.removeEventListener("mouseleave", scheduleHide);
|
|
16495
|
+
anchorEl.removeEventListener("focus", show);
|
|
16496
|
+
anchorEl.removeEventListener("blur", scheduleHide);
|
|
16472
16497
|
};
|
|
16473
16498
|
}
|
|
16474
16499
|
if (opts.trigger === "click") {
|
|
@@ -16803,11 +16828,26 @@ var SyntrologieSDK = (() => {
|
|
|
16803
16828
|
return { cleanup: () => {
|
|
16804
16829
|
} };
|
|
16805
16830
|
}
|
|
16831
|
+
const existing = anchorEl.getAttribute("data-syntro-highlight");
|
|
16832
|
+
if (existing) {
|
|
16833
|
+
const prev = context.overlayRoot.querySelectorAll(".syntro-spotlight-scrim, .syntro-spotlight-ring");
|
|
16834
|
+
prev.forEach((el) => el.remove());
|
|
16835
|
+
}
|
|
16836
|
+
anchorEl.setAttribute("data-syntro-highlight", "true");
|
|
16837
|
+
let ringColor = action.style?.color;
|
|
16838
|
+
if (!ringColor) {
|
|
16839
|
+
try {
|
|
16840
|
+
const primary = getComputedStyle(context.overlayRoot).getPropertyValue("--sc-color-primary")?.trim();
|
|
16841
|
+
if (primary)
|
|
16842
|
+
ringColor = primary;
|
|
16843
|
+
} catch {
|
|
16844
|
+
}
|
|
16845
|
+
}
|
|
16806
16846
|
const handle = showHighlight(anchorEl, context.overlayRoot, {
|
|
16807
16847
|
paddingPx: action.style?.paddingPx ?? 12,
|
|
16808
16848
|
radiusPx: action.style?.radiusPx ?? 12,
|
|
16809
16849
|
scrimOpacity: action.style?.scrimOpacity ?? 0.55,
|
|
16810
|
-
ringColor
|
|
16850
|
+
ringColor,
|
|
16811
16851
|
blocking: action.blocking ?? false,
|
|
16812
16852
|
onClickOutside: action.onClickOutside ?? true,
|
|
16813
16853
|
onEsc: action.onEsc ?? true
|
|
@@ -16820,6 +16860,7 @@ var SyntrologieSDK = (() => {
|
|
|
16820
16860
|
return {
|
|
16821
16861
|
cleanup: () => {
|
|
16822
16862
|
handle.destroy();
|
|
16863
|
+
anchorEl.removeAttribute("data-syntro-highlight");
|
|
16823
16864
|
}
|
|
16824
16865
|
};
|
|
16825
16866
|
};
|
|
@@ -18517,7 +18558,7 @@ var SyntrologieSDK = (() => {
|
|
|
18517
18558
|
};
|
|
18518
18559
|
const renderItems = (items) => items.map((q2, index2) => (0, import_jsx_runtime4.jsx)(FAQItem, { item: q2, isExpanded: expandedIds.has(q2.config.id), isHighlighted: highlightId === q2.config.id, isLast: index2 === items.length - 1, onToggle: () => handleToggle(q2.config.id), theme: resolvedTheme, feedbackConfig, feedbackValue: feedbackState.get(q2.config.id), onFeedback: handleFeedback }, q2.config.id));
|
|
18519
18560
|
if (visibleQuestions.length === 0) {
|
|
18520
|
-
return (0, import_jsx_runtime4.jsx)("div", { style: containerStyle, "data-adaptive-id": instanceId, "data-adaptive-type": "adaptive-faq", children: (0, import_jsx_runtime4.jsx)("div", { style: emptyStateStyle, children: "
|
|
18561
|
+
return (0, import_jsx_runtime4.jsx)("div", { style: containerStyle, "data-adaptive-id": instanceId, "data-adaptive-type": "adaptive-faq", children: (0, import_jsx_runtime4.jsx)("div", { style: emptyStateStyle, children: "You're all set for now! We'll surface answers here when they're relevant to what you're doing." }) });
|
|
18521
18562
|
}
|
|
18522
18563
|
return (0, import_jsx_runtime4.jsxs)("div", { style: containerStyle, "data-adaptive-id": instanceId, "data-adaptive-type": "adaptive-faq", children: [config.searchable && (0, import_jsx_runtime4.jsxs)("div", { style: baseStyles.searchWrapper, children: [(0, import_jsx_runtime4.jsx)("style", { children: `[data-adaptive-id="${instanceId}"] input::placeholder { color: var(--sc-content-search-color, inherit); opacity: 0.7; }` }), (0, import_jsx_runtime4.jsx)("input", { type: "text", placeholder: "Search questions...", value: searchQuery, onChange: (e2) => setSearchQuery(e2.target.value), style: searchInputStyle })] }), (0, import_jsx_runtime4.jsx)("div", { style: baseStyles.accordion, children: hasCategories ? Array.from(categoryGroups.entries()).map(([category, items]) => (0, import_jsx_runtime4.jsxs)(import_react4.default.Fragment, { children: [category && (0, import_jsx_runtime4.jsx)("div", { style: categoryHeaderStyle, "data-category-header": category, children: category }), renderItems(items)] }, category ?? "__ungrouped")) : renderItems(filteredQuestions) }), config.searchable && filteredQuestions.length === 0 && searchQuery && (0, import_jsx_runtime4.jsxs)("div", { style: { ...baseStyles.noResults, ...themeStyles[resolvedTheme].emptyState }, children: ['No questions found matching "', searchQuery, '"'] })] });
|
|
18523
18564
|
}
|
|
@@ -18947,7 +18988,7 @@ var SyntrologieSDK = (() => {
|
|
|
18947
18988
|
};
|
|
18948
18989
|
const renderItems = (items) => items.map((tip, index2) => (0, import_jsx_runtime5.jsx)(NavTipItem, { item: tip, isExpanded: expandedIds.has(tip.config.id), isLast: index2 === items.length - 1, onToggle: () => handleToggle(tip.config.id), onNavigate: handleNavigate, theme: resolvedTheme }, tip.config.id));
|
|
18949
18990
|
if (visibleTips.length === 0) {
|
|
18950
|
-
return (0, import_jsx_runtime5.jsx)("div", { style: containerStyle, "data-adaptive-id": instanceId, "data-adaptive-type": "adaptive-nav", children: (0, import_jsx_runtime5.jsx)("div", { style: emptyStateStyle, children: "
|
|
18991
|
+
return (0, import_jsx_runtime5.jsx)("div", { style: containerStyle, "data-adaptive-id": instanceId, "data-adaptive-type": "adaptive-nav", children: (0, import_jsx_runtime5.jsx)("div", { style: emptyStateStyle, children: "You're all set for now! We'll share helpful tips here when they're relevant to what you're doing." }) });
|
|
18951
18992
|
}
|
|
18952
18993
|
return (0, import_jsx_runtime5.jsx)("div", { style: containerStyle, "data-adaptive-id": instanceId, "data-adaptive-type": "adaptive-nav", children: (0, import_jsx_runtime5.jsx)("div", { style: baseStyles2.accordion, children: hasCategories ? Array.from(categoryGroups.entries()).map(([category, items]) => (0, import_jsx_runtime5.jsxs)(import_react5.default.Fragment, { children: [category && (0, import_jsx_runtime5.jsx)("div", { style: categoryHeaderStyle, "data-category-header": category, children: category }), renderItems(items)] }, category ?? "__ungrouped")) : renderItems(visibleTips) }) });
|
|
18953
18994
|
}
|
|
@@ -19244,7 +19285,7 @@ var SyntrologieSDK = (() => {
|
|
|
19244
19285
|
}
|
|
19245
19286
|
|
|
19246
19287
|
// src/version.ts
|
|
19247
|
-
var SDK_VERSION = "2.4.0-canary.
|
|
19288
|
+
var SDK_VERSION = "2.4.0-canary.26";
|
|
19248
19289
|
|
|
19249
19290
|
// src/types.ts
|
|
19250
19291
|
var SDK_SCHEMA_VERSION = "2.0";
|
|
@@ -20788,7 +20829,10 @@ var SyntrologieSDK = (() => {
|
|
|
20788
20829
|
background: withAlpha(slateGrey[1], 0.6),
|
|
20789
20830
|
blur: "blur(24px)",
|
|
20790
20831
|
border: "none",
|
|
20791
|
-
width: "clamp(380px, 25vw, 520px)"
|
|
20832
|
+
width: "clamp(380px, 25vw, 520px)",
|
|
20833
|
+
transitionDuration: "300ms",
|
|
20834
|
+
transitionEasing: "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
20835
|
+
transitionFade: "6%"
|
|
20792
20836
|
},
|
|
20793
20837
|
launcher: {
|
|
20794
20838
|
background: button.primary.backgroundDefault,
|
|
@@ -20868,7 +20912,10 @@ var SyntrologieSDK = (() => {
|
|
|
20868
20912
|
background: withAlpha(slateGrey[12], 0.7),
|
|
20869
20913
|
blur: "blur(24px)",
|
|
20870
20914
|
border: "none",
|
|
20871
|
-
width: "clamp(380px, 25vw, 520px)"
|
|
20915
|
+
width: "clamp(380px, 25vw, 520px)",
|
|
20916
|
+
transitionDuration: "300ms",
|
|
20917
|
+
transitionEasing: "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
20918
|
+
transitionFade: "6%"
|
|
20872
20919
|
},
|
|
20873
20920
|
launcher: {
|
|
20874
20921
|
background: brand[3],
|
|
@@ -21288,10 +21335,12 @@ ${cssRules}
|
|
|
21288
21335
|
var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
|
|
21289
21336
|
function WidgetMount({ widgetId, props }) {
|
|
21290
21337
|
const runtime7 = useRuntime();
|
|
21291
|
-
const
|
|
21338
|
+
const parentRef = (0, import_react13.useRef)(null);
|
|
21292
21339
|
const handleRef = (0, import_react13.useRef)(null);
|
|
21293
21340
|
const registry = runtime7?.widgets;
|
|
21294
21341
|
const widgetAvailable = registry?.has(widgetId) ?? false;
|
|
21342
|
+
const propsRef = (0, import_react13.useRef)(props);
|
|
21343
|
+
propsRef.current = props;
|
|
21295
21344
|
const [, forceUpdate] = (0, import_react13.useReducer)((x2) => x2 + 1, 0);
|
|
21296
21345
|
(0, import_react13.useEffect)(() => {
|
|
21297
21346
|
if (!registry || widgetAvailable) return;
|
|
@@ -21302,14 +21351,26 @@ ${cssRules}
|
|
|
21302
21351
|
});
|
|
21303
21352
|
}, [registry, widgetId, widgetAvailable]);
|
|
21304
21353
|
(0, import_react13.useEffect)(() => {
|
|
21305
|
-
if (!
|
|
21306
|
-
const
|
|
21354
|
+
if (!parentRef.current || !registry || !widgetAvailable) return;
|
|
21355
|
+
const container = document.createElement("div");
|
|
21356
|
+
container.style.width = "100%";
|
|
21357
|
+
container.style.minHeight = "40px";
|
|
21358
|
+
parentRef.current.appendChild(container);
|
|
21359
|
+
const handle = registry.mount(widgetId, container, propsRef.current);
|
|
21307
21360
|
handleRef.current = handle;
|
|
21308
21361
|
return () => {
|
|
21309
21362
|
handle.unmount();
|
|
21310
21363
|
handleRef.current = null;
|
|
21364
|
+
container.remove();
|
|
21311
21365
|
};
|
|
21312
|
-
}, [registry, widgetId,
|
|
21366
|
+
}, [registry, widgetId, widgetAvailable]);
|
|
21367
|
+
const propsJson = JSON.stringify(props);
|
|
21368
|
+
const prevPropsJsonRef = (0, import_react13.useRef)(propsJson);
|
|
21369
|
+
(0, import_react13.useEffect)(() => {
|
|
21370
|
+
if (prevPropsJsonRef.current === propsJson) return;
|
|
21371
|
+
prevPropsJsonRef.current = propsJson;
|
|
21372
|
+
handleRef.current?.update(propsRef.current);
|
|
21373
|
+
}, [propsJson]);
|
|
21313
21374
|
if (!registry || !registry.has(widgetId)) {
|
|
21314
21375
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
21315
21376
|
"div",
|
|
@@ -21327,7 +21388,7 @@ ${cssRules}
|
|
|
21327
21388
|
}
|
|
21328
21389
|
);
|
|
21329
21390
|
}
|
|
21330
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ref:
|
|
21391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ref: parentRef });
|
|
21331
21392
|
}
|
|
21332
21393
|
function TileCard({
|
|
21333
21394
|
config,
|
|
@@ -21603,14 +21664,17 @@ ${cssRules}
|
|
|
21603
21664
|
const isFocused = displayMode === "focused";
|
|
21604
21665
|
const isRight = config.canvas.position === "right";
|
|
21605
21666
|
const isPush = config.canvas.layout === "push";
|
|
21667
|
+
const canvasBorder = config.canvas.border ?? "none";
|
|
21606
21668
|
const containerRef = (0, import_react14.useRef)(null);
|
|
21607
21669
|
const zIndex = 2147483600;
|
|
21608
21670
|
(0, import_react14.useEffect)(() => {
|
|
21609
21671
|
if (!isPush) return;
|
|
21610
21672
|
const root = document.documentElement;
|
|
21611
21673
|
const prop = isRight ? "marginRight" : "marginLeft";
|
|
21674
|
+
const duration = config.canvas.transitionDuration ?? "300ms";
|
|
21675
|
+
const easing = config.canvas.transitionEasing ?? "cubic-bezier(0.16, 1, 0.3, 1)";
|
|
21612
21676
|
const prevTransition = root.style.transition;
|
|
21613
|
-
root.style.transition = `${prop}
|
|
21677
|
+
root.style.transition = `${prop} ${duration} ${easing}`;
|
|
21614
21678
|
if (isOpen) {
|
|
21615
21679
|
const width = containerRef.current?.offsetWidth ?? 380;
|
|
21616
21680
|
root.style[prop] = `${width}px`;
|
|
@@ -21621,7 +21685,7 @@ ${cssRules}
|
|
|
21621
21685
|
root.style[prop] = "";
|
|
21622
21686
|
root.style.transition = prevTransition;
|
|
21623
21687
|
};
|
|
21624
|
-
}, [isPush, isOpen, isRight]);
|
|
21688
|
+
}, [isPush, isOpen, isRight, config.canvas.transitionDuration, config.canvas.transitionEasing]);
|
|
21625
21689
|
(0, import_react14.useEffect)(() => {
|
|
21626
21690
|
if (!isPush || !isOpen) return;
|
|
21627
21691
|
const container = containerRef.current;
|
|
@@ -21642,19 +21706,28 @@ ${cssRules}
|
|
|
21642
21706
|
maxHeight: "100%",
|
|
21643
21707
|
pointerEvents: "auto",
|
|
21644
21708
|
opacity: isOpen ? 1 : 0,
|
|
21645
|
-
transition:
|
|
21709
|
+
transition: (() => {
|
|
21710
|
+
const dur = config.canvas.transitionDuration ?? "300ms";
|
|
21711
|
+
const ease = config.canvas.transitionEasing ?? "cubic-bezier(0.16, 1, 0.3, 1)";
|
|
21712
|
+
return isOpen ? `transform ${dur} ${ease}, opacity ${dur} ease-out` : `transform ${dur} ${ease}, opacity ${dur} ease-in`;
|
|
21713
|
+
})(),
|
|
21646
21714
|
color: "var(--sc-overlay-text-color)",
|
|
21647
|
-
|
|
21648
|
-
// Focused mode:
|
|
21649
|
-
|
|
21650
|
-
|
|
21651
|
-
|
|
21652
|
-
|
|
21653
|
-
|
|
21654
|
-
|
|
21655
|
-
|
|
21656
|
-
|
|
21657
|
-
|
|
21715
|
+
background: "var(--sc-canvas-background)",
|
|
21716
|
+
// Standard mode: config blur only. Focused mode: config blur + saturate boost.
|
|
21717
|
+
...(() => {
|
|
21718
|
+
const blur = config.canvas.blur ?? "blur(24px)";
|
|
21719
|
+
const filter = isFocused && blur !== "none" ? `${blur} saturate(1.2)` : blur;
|
|
21720
|
+
return { backdropFilter: filter, WebkitBackdropFilter: filter };
|
|
21721
|
+
})(),
|
|
21722
|
+
// Tight fade mask so blur cuts off sharply at the leading edge.
|
|
21723
|
+
// Disabled when a visible border is configured (mask would fade the border).
|
|
21724
|
+
...(() => {
|
|
21725
|
+
if (isFocused || canvasBorder && canvasBorder !== "none") return {};
|
|
21726
|
+
const fade = config.canvas.transitionFade ?? "6%";
|
|
21727
|
+
const mask = isRight ? `linear-gradient(to right, transparent, black ${fade})` : `linear-gradient(to left, transparent, black ${fade})`;
|
|
21728
|
+
return { maskImage: mask, WebkitMaskImage: mask };
|
|
21729
|
+
})(),
|
|
21730
|
+
border: canvasBorder,
|
|
21658
21731
|
borderRadius: "var(--sc-overlay-border-radius, 0)",
|
|
21659
21732
|
boxShadow: "none",
|
|
21660
21733
|
// Transform logic
|
|
@@ -21938,7 +22011,7 @@ ${cssRules}
|
|
|
21938
22011
|
),
|
|
21939
22012
|
portalRoot
|
|
21940
22013
|
),
|
|
21941
|
-
|
|
22014
|
+
(0, import_react_dom.createPortal)(content, portalRoot)
|
|
21942
22015
|
] });
|
|
21943
22016
|
}
|
|
21944
22017
|
|
|
@@ -22187,6 +22260,7 @@ ${cssRules}
|
|
|
22187
22260
|
}, [controller, hasContent, configState.isLoading]);
|
|
22188
22261
|
const batchHandleRef = (0, import_react16.useRef)(initialBatchHandle ?? null);
|
|
22189
22262
|
const adoptedInitialRef = (0, import_react16.useRef)(!!initialBatchHandle);
|
|
22263
|
+
const runVersionRef = (0, import_react16.useRef)(0);
|
|
22190
22264
|
(0, import_react16.useEffect)(() => {
|
|
22191
22265
|
if (!runtime7?.actions) return;
|
|
22192
22266
|
if (adoptedInitialRef.current) {
|
|
@@ -22195,7 +22269,8 @@ ${cssRules}
|
|
|
22195
22269
|
}
|
|
22196
22270
|
return;
|
|
22197
22271
|
}
|
|
22198
|
-
|
|
22272
|
+
const version = ++runVersionRef.current;
|
|
22273
|
+
const stale = () => version !== runVersionRef.current;
|
|
22199
22274
|
const run = async () => {
|
|
22200
22275
|
if (batchHandleRef.current) {
|
|
22201
22276
|
try {
|
|
@@ -22205,17 +22280,17 @@ ${cssRules}
|
|
|
22205
22280
|
}
|
|
22206
22281
|
batchHandleRef.current = null;
|
|
22207
22282
|
}
|
|
22208
|
-
if (
|
|
22283
|
+
if (stale()) return;
|
|
22209
22284
|
if (configState.actions.length > 0) {
|
|
22210
22285
|
try {
|
|
22211
22286
|
const handle = await runtime7.actions.applyBatch(configState.actions);
|
|
22212
|
-
if (
|
|
22287
|
+
if (stale()) {
|
|
22213
22288
|
await handle.revertAll();
|
|
22214
22289
|
} else {
|
|
22215
22290
|
batchHandleRef.current = handle;
|
|
22216
22291
|
}
|
|
22217
22292
|
} catch (err) {
|
|
22218
|
-
if (!
|
|
22293
|
+
if (!stale()) {
|
|
22219
22294
|
console.error("[SmartCanvasApp] Failed to apply actions:", err);
|
|
22220
22295
|
}
|
|
22221
22296
|
}
|
|
@@ -22223,7 +22298,6 @@ ${cssRules}
|
|
|
22223
22298
|
};
|
|
22224
22299
|
run();
|
|
22225
22300
|
return () => {
|
|
22226
|
-
cancelled = true;
|
|
22227
22301
|
if (batchHandleRef.current) {
|
|
22228
22302
|
batchHandleRef.current.revertAll().catch((err) => {
|
|
22229
22303
|
console.error("[SmartCanvasApp] Failed to revert actions on cleanup:", err);
|
|
@@ -36049,7 +36123,10 @@ ${cssRules}
|
|
|
36049
36123
|
background: external_exports.string().optional(),
|
|
36050
36124
|
blur: external_exports.string().optional(),
|
|
36051
36125
|
border: external_exports.string().optional(),
|
|
36052
|
-
width: external_exports.string().optional()
|
|
36126
|
+
width: external_exports.string().optional(),
|
|
36127
|
+
transitionDuration: external_exports.string().optional(),
|
|
36128
|
+
transitionEasing: external_exports.string().optional(),
|
|
36129
|
+
transitionFade: external_exports.string().optional()
|
|
36053
36130
|
});
|
|
36054
36131
|
var LauncherElementConfigZ = external_exports.object({
|
|
36055
36132
|
background: external_exports.string().optional(),
|
|
@@ -36152,7 +36229,17 @@ ${cssRules}
|
|
|
36152
36229
|
actions: external_exports.array(external_exports.any()),
|
|
36153
36230
|
theme: CanvasThemeConfigZ.optional(),
|
|
36154
36231
|
launcher: LauncherConfigZ.optional(),
|
|
36155
|
-
|
|
36232
|
+
meta: external_exports.object({
|
|
36233
|
+
verificationSteps: external_exports.array(
|
|
36234
|
+
external_exports.union([
|
|
36235
|
+
external_exports.string(),
|
|
36236
|
+
external_exports.object({
|
|
36237
|
+
text: external_exports.string(),
|
|
36238
|
+
check: ConditionZ.optional()
|
|
36239
|
+
})
|
|
36240
|
+
])
|
|
36241
|
+
).optional()
|
|
36242
|
+
}).passthrough().optional()
|
|
36156
36243
|
}).strict();
|
|
36157
36244
|
|
|
36158
36245
|
// src/actions/schema.ts
|
|
@@ -36792,7 +36879,7 @@ ${cssRules}
|
|
|
36792
36879
|
switch (condition.type) {
|
|
36793
36880
|
case "page_url": {
|
|
36794
36881
|
const { url } = condition;
|
|
36795
|
-
const currentUrl = context.page.url;
|
|
36882
|
+
const currentUrl = context.page.url.split("?")[0].split("#")[0];
|
|
36796
36883
|
const pattern = url.replace(/\*\*/g, "\0GLOBSTAR\0").replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, "[^/]*").replace(/\0GLOBSTAR\0/g, ".*");
|
|
36797
36884
|
const regex = new RegExp(`^${pattern}$`);
|
|
36798
36885
|
return regex.test(currentUrl);
|
|
@@ -38469,7 +38556,7 @@ ${cssRules}
|
|
|
38469
38556
|
function matchRoutePattern(pathname, pattern) {
|
|
38470
38557
|
const normalizedPattern = pattern.replace(/\/$/, "") || "/";
|
|
38471
38558
|
if (pathname === normalizedPattern) return true;
|
|
38472
|
-
const regexPattern = normalizedPattern.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(
|
|
38559
|
+
const regexPattern = normalizedPattern.replace(/\*\*/g, "\0GLOBSTAR\0").replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, "[^/]*").replace(/\0GLOBSTAR\0/g, ".*").replace(/:[^/]+/g, "[^/]+");
|
|
38473
38560
|
const regex = new RegExp(`^${regexPattern}$`);
|
|
38474
38561
|
return regex.test(pathname);
|
|
38475
38562
|
}
|
|
@@ -39262,7 +39349,7 @@ ${cssRules}
|
|
|
39262
39349
|
}
|
|
39263
39350
|
|
|
39264
39351
|
// src/index.ts
|
|
39265
|
-
var RUNTIME_SDK_BUILD = true ? `${"2026-03-
|
|
39352
|
+
var RUNTIME_SDK_BUILD = true ? `${"2026-03-04T23:23:37.890Z"} (${"a49ba3d7ef"})` : "dev";
|
|
39266
39353
|
if (typeof window !== "undefined") {
|
|
39267
39354
|
console.log(`[Syntro Runtime] Build: ${RUNTIME_SDK_BUILD}`);
|
|
39268
39355
|
const existing = window.SynOS;
|