@runtypelabs/persona 3.7.0 → 3.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +40 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -4
- package/dist/index.d.ts +43 -4
- package/dist/index.global.js +59 -59
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +40 -40
- package/dist/index.js.map +1 -1
- package/dist/theme-editor.cjs +199 -24
- package/dist/theme-editor.d.cts +43 -4
- package/dist/theme-editor.d.ts +43 -4
- package/dist/theme-editor.js +199 -24
- package/dist/theme-reference.cjs +1 -1
- package/dist/theme-reference.d.cts +34 -0
- package/dist/theme-reference.d.ts +34 -0
- package/dist/widget.css +4 -0
- package/package.json +1 -1
- package/src/components/artifact-card.ts +1 -1
- package/src/components/header-builder.ts +3 -0
- package/src/components/launcher.ts +7 -2
- package/src/components/panel.ts +3 -1
- package/src/runtime/host-layout.test.ts +1 -1
- package/src/runtime/host-layout.ts +2 -1
- package/src/styles/widget.css +4 -0
- package/src/types/theme.ts +35 -0
- package/src/types.ts +9 -4
- package/src/ui.overlay-z-index.test.ts +34 -2
- package/src/ui.ts +88 -8
- package/src/utils/constants.ts +13 -0
- package/src/utils/dropdown.ts +2 -1
- package/src/utils/overlay-host-stacking.test.ts +61 -0
- package/src/utils/overlay-host-stacking.ts +38 -0
- package/src/utils/scroll-lock.test.ts +64 -0
- package/src/utils/scroll-lock.ts +62 -0
- package/src/utils/tokens.ts +63 -0
package/dist/theme-editor.cjs
CHANGED
|
@@ -404,7 +404,8 @@ var DEFAULT_COMPONENTS = {
|
|
|
404
404
|
borderRadius: "palette.radius.lg",
|
|
405
405
|
border: "palette.colors.gray.200",
|
|
406
406
|
shadow: "palette.shadows.sm"
|
|
407
|
-
}
|
|
407
|
+
},
|
|
408
|
+
border: "semantic.colors.border"
|
|
408
409
|
},
|
|
409
410
|
toolBubble: {
|
|
410
411
|
shadow: "palette.shadows.sm"
|
|
@@ -426,8 +427,30 @@ var DEFAULT_COMPONENTS = {
|
|
|
426
427
|
},
|
|
427
428
|
prose: {
|
|
428
429
|
fontFamily: "inherit"
|
|
430
|
+
},
|
|
431
|
+
codeBlock: {
|
|
432
|
+
background: "semantic.colors.container",
|
|
433
|
+
borderColor: "semantic.colors.border",
|
|
434
|
+
textColor: "inherit"
|
|
435
|
+
},
|
|
436
|
+
table: {
|
|
437
|
+
headerBackground: "semantic.colors.container",
|
|
438
|
+
borderColor: "semantic.colors.border"
|
|
439
|
+
},
|
|
440
|
+
hr: {
|
|
441
|
+
color: "semantic.colors.divider"
|
|
442
|
+
},
|
|
443
|
+
blockquote: {
|
|
444
|
+
borderColor: "palette.colors.gray.900",
|
|
445
|
+
background: "transparent",
|
|
446
|
+
textColor: "palette.colors.gray.500"
|
|
429
447
|
}
|
|
430
448
|
},
|
|
449
|
+
collapsibleWidget: {
|
|
450
|
+
container: "palette.colors.gray.50",
|
|
451
|
+
surface: "semantic.colors.surface",
|
|
452
|
+
border: "semantic.colors.border"
|
|
453
|
+
},
|
|
431
454
|
voice: {
|
|
432
455
|
recording: {
|
|
433
456
|
indicator: "palette.colors.error.500",
|
|
@@ -660,7 +683,7 @@ function createTheme(userConfig, options = {}) {
|
|
|
660
683
|
return theme;
|
|
661
684
|
}
|
|
662
685
|
function themeToCssVariables(theme) {
|
|
663
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa;
|
|
686
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa, _Ta, _Ua, _Va, _Wa, _Xa, _Ya, _Za, __a, _$a, _ab, _bb;
|
|
664
687
|
const resolved = resolveTokens(theme);
|
|
665
688
|
const cssVars = {};
|
|
666
689
|
for (const [path, token] of Object.entries(resolved)) {
|
|
@@ -761,6 +784,19 @@ function themeToCssVariables(theme) {
|
|
|
761
784
|
if (mdProseFont && mdProseFont !== "inherit") {
|
|
762
785
|
cssVars["--persona-md-prose-font-family"] = mdProseFont;
|
|
763
786
|
}
|
|
787
|
+
cssVars["--persona-md-code-block-bg"] = (_La = cssVars["--persona-components-markdown-codeBlock-background"]) != null ? _La : cssVars["--persona-container"];
|
|
788
|
+
cssVars["--persona-md-code-block-border-color"] = (_Ma = cssVars["--persona-components-markdown-codeBlock-borderColor"]) != null ? _Ma : cssVars["--persona-border"];
|
|
789
|
+
cssVars["--persona-md-code-block-text-color"] = (_Na = cssVars["--persona-components-markdown-codeBlock-textColor"]) != null ? _Na : "inherit";
|
|
790
|
+
cssVars["--persona-md-table-header-bg"] = (_Oa = cssVars["--persona-components-markdown-table-headerBackground"]) != null ? _Oa : cssVars["--persona-container"];
|
|
791
|
+
cssVars["--persona-md-table-border-color"] = (_Pa = cssVars["--persona-components-markdown-table-borderColor"]) != null ? _Pa : cssVars["--persona-border"];
|
|
792
|
+
cssVars["--persona-md-hr-color"] = (_Qa = cssVars["--persona-components-markdown-hr-color"]) != null ? _Qa : cssVars["--persona-divider"];
|
|
793
|
+
cssVars["--persona-md-blockquote-border-color"] = (_Ra = cssVars["--persona-components-markdown-blockquote-borderColor"]) != null ? _Ra : cssVars["--persona-palette-colors-gray-900"];
|
|
794
|
+
cssVars["--persona-md-blockquote-bg"] = (_Sa = cssVars["--persona-components-markdown-blockquote-background"]) != null ? _Sa : "transparent";
|
|
795
|
+
cssVars["--persona-md-blockquote-text-color"] = (_Ta = cssVars["--persona-components-markdown-blockquote-textColor"]) != null ? _Ta : cssVars["--persona-palette-colors-gray-500"];
|
|
796
|
+
cssVars["--cw-container"] = (_Ua = cssVars["--persona-components-collapsibleWidget-container"]) != null ? _Ua : cssVars["--persona-surface"];
|
|
797
|
+
cssVars["--cw-surface"] = (_Va = cssVars["--persona-components-collapsibleWidget-surface"]) != null ? _Va : cssVars["--persona-surface"];
|
|
798
|
+
cssVars["--cw-border"] = (_Wa = cssVars["--persona-components-collapsibleWidget-border"]) != null ? _Wa : cssVars["--persona-border"];
|
|
799
|
+
cssVars["--persona-message-border"] = (_Xa = cssVars["--persona-components-message-border"]) != null ? _Xa : cssVars["--persona-border"];
|
|
764
800
|
const components = theme.components;
|
|
765
801
|
const iconBtn = components == null ? void 0 : components.iconButton;
|
|
766
802
|
if (iconBtn) {
|
|
@@ -807,23 +843,23 @@ function themeToCssVariables(theme) {
|
|
|
807
843
|
if (t.copyPadding) cssVars["--persona-artifact-toolbar-copy-padding"] = t.copyPadding;
|
|
808
844
|
if (t.copyMenuBackground) {
|
|
809
845
|
cssVars["--persona-artifact-toolbar-copy-menu-bg"] = t.copyMenuBackground;
|
|
810
|
-
cssVars["--persona-dropdown-bg"] = (
|
|
846
|
+
cssVars["--persona-dropdown-bg"] = (_Ya = cssVars["--persona-dropdown-bg"]) != null ? _Ya : t.copyMenuBackground;
|
|
811
847
|
}
|
|
812
848
|
if (t.copyMenuBorder) {
|
|
813
849
|
cssVars["--persona-artifact-toolbar-copy-menu-border"] = t.copyMenuBorder;
|
|
814
|
-
cssVars["--persona-dropdown-border"] = (
|
|
850
|
+
cssVars["--persona-dropdown-border"] = (_Za = cssVars["--persona-dropdown-border"]) != null ? _Za : t.copyMenuBorder;
|
|
815
851
|
}
|
|
816
852
|
if (t.copyMenuShadow) {
|
|
817
853
|
cssVars["--persona-artifact-toolbar-copy-menu-shadow"] = t.copyMenuShadow;
|
|
818
|
-
cssVars["--persona-dropdown-shadow"] = (
|
|
854
|
+
cssVars["--persona-dropdown-shadow"] = (__a = cssVars["--persona-dropdown-shadow"]) != null ? __a : t.copyMenuShadow;
|
|
819
855
|
}
|
|
820
856
|
if (t.copyMenuBorderRadius) {
|
|
821
857
|
cssVars["--persona-artifact-toolbar-copy-menu-radius"] = t.copyMenuBorderRadius;
|
|
822
|
-
cssVars["--persona-dropdown-radius"] = (
|
|
858
|
+
cssVars["--persona-dropdown-radius"] = (_$a = cssVars["--persona-dropdown-radius"]) != null ? _$a : t.copyMenuBorderRadius;
|
|
823
859
|
}
|
|
824
860
|
if (t.copyMenuItemHoverBackground) {
|
|
825
861
|
cssVars["--persona-artifact-toolbar-copy-menu-item-hover-bg"] = t.copyMenuItemHoverBackground;
|
|
826
|
-
cssVars["--persona-dropdown-item-hover-bg"] = (
|
|
862
|
+
cssVars["--persona-dropdown-item-hover-bg"] = (_ab = cssVars["--persona-dropdown-item-hover-bg"]) != null ? _ab : t.copyMenuItemHoverBackground;
|
|
827
863
|
}
|
|
828
864
|
if (t.iconBackground) cssVars["--persona-artifact-toolbar-icon-bg"] = t.iconBackground;
|
|
829
865
|
if (t.toolbarBorder) cssVars["--persona-artifact-toolbar-border"] = t.toolbarBorder;
|
|
@@ -843,7 +879,7 @@ function themeToCssVariables(theme) {
|
|
|
843
879
|
if (artifact == null ? void 0 : artifact.pane) {
|
|
844
880
|
const t = artifact.pane;
|
|
845
881
|
if (t.toolbarBackground) {
|
|
846
|
-
const toolbarBg = (
|
|
882
|
+
const toolbarBg = (_bb = resolveTokenValue(theme, t.toolbarBackground)) != null ? _bb : t.toolbarBackground;
|
|
847
883
|
cssVars["--persona-artifact-toolbar-bg"] = toolbarBg;
|
|
848
884
|
}
|
|
849
885
|
}
|
|
@@ -7799,6 +7835,70 @@ var statusCopy = {
|
|
|
7799
7835
|
connected: "Streaming\u2026",
|
|
7800
7836
|
error: "Offline"
|
|
7801
7837
|
};
|
|
7838
|
+
var DEFAULT_OVERLAY_Z_INDEX = 1e5;
|
|
7839
|
+
var PORTALED_OVERLAY_Z_INDEX = DEFAULT_OVERLAY_Z_INDEX + 1;
|
|
7840
|
+
|
|
7841
|
+
// src/utils/overlay-host-stacking.ts
|
|
7842
|
+
function syncOverlayHostStacking(host, zIndex = DEFAULT_OVERLAY_Z_INDEX) {
|
|
7843
|
+
const originalPosition = host.style.position;
|
|
7844
|
+
const originalZIndex = host.style.zIndex;
|
|
7845
|
+
const originalIsolation = host.style.isolation;
|
|
7846
|
+
const computed = getComputedStyle(host);
|
|
7847
|
+
const positionWasSet = computed.position === "static" || computed.position === "";
|
|
7848
|
+
if (positionWasSet) {
|
|
7849
|
+
host.style.position = "relative";
|
|
7850
|
+
}
|
|
7851
|
+
host.style.zIndex = String(zIndex);
|
|
7852
|
+
host.style.isolation = "isolate";
|
|
7853
|
+
return () => {
|
|
7854
|
+
if (positionWasSet) {
|
|
7855
|
+
host.style.position = originalPosition;
|
|
7856
|
+
}
|
|
7857
|
+
host.style.zIndex = originalZIndex;
|
|
7858
|
+
host.style.isolation = originalIsolation;
|
|
7859
|
+
};
|
|
7860
|
+
}
|
|
7861
|
+
|
|
7862
|
+
// src/utils/scroll-lock.ts
|
|
7863
|
+
var lockCount = 0;
|
|
7864
|
+
var savedState = null;
|
|
7865
|
+
function acquireScrollLock(doc = document) {
|
|
7866
|
+
var _a;
|
|
7867
|
+
lockCount++;
|
|
7868
|
+
if (lockCount === 1) {
|
|
7869
|
+
const body = doc.body;
|
|
7870
|
+
const win = (_a = doc.defaultView) != null ? _a : window;
|
|
7871
|
+
const scrollY = win.scrollY || doc.documentElement.scrollTop;
|
|
7872
|
+
savedState = {
|
|
7873
|
+
originalOverflow: body.style.overflow,
|
|
7874
|
+
originalPosition: body.style.position,
|
|
7875
|
+
originalTop: body.style.top,
|
|
7876
|
+
originalWidth: body.style.width,
|
|
7877
|
+
scrollY
|
|
7878
|
+
};
|
|
7879
|
+
body.style.overflow = "hidden";
|
|
7880
|
+
body.style.position = "fixed";
|
|
7881
|
+
body.style.top = `-${scrollY}px`;
|
|
7882
|
+
body.style.width = "100%";
|
|
7883
|
+
}
|
|
7884
|
+
let released = false;
|
|
7885
|
+
return () => {
|
|
7886
|
+
var _a2;
|
|
7887
|
+
if (released) return;
|
|
7888
|
+
released = true;
|
|
7889
|
+
lockCount = Math.max(0, lockCount - 1);
|
|
7890
|
+
if (lockCount === 0 && savedState) {
|
|
7891
|
+
const body = doc.body;
|
|
7892
|
+
const win = (_a2 = doc.defaultView) != null ? _a2 : window;
|
|
7893
|
+
body.style.overflow = savedState.originalOverflow;
|
|
7894
|
+
body.style.position = savedState.originalPosition;
|
|
7895
|
+
body.style.top = savedState.originalTop;
|
|
7896
|
+
body.style.width = savedState.originalWidth;
|
|
7897
|
+
win.scrollTo(0, savedState.scrollY);
|
|
7898
|
+
savedState = null;
|
|
7899
|
+
}
|
|
7900
|
+
};
|
|
7901
|
+
}
|
|
7802
7902
|
|
|
7803
7903
|
// src/utils/dock.ts
|
|
7804
7904
|
var DEFAULT_DOCK_CONFIG = {
|
|
@@ -7845,7 +7945,7 @@ var createLauncherButton = (config, onToggle) => {
|
|
|
7845
7945
|
`;
|
|
7846
7946
|
button.addEventListener("click", onToggle);
|
|
7847
7947
|
const update = (newConfig) => {
|
|
7848
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
7948
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
7849
7949
|
const launcher = (_a = newConfig.launcher) != null ? _a : {};
|
|
7850
7950
|
const dockedMode = isDockedMountMode(newConfig);
|
|
7851
7951
|
const titleEl = button.querySelector("[data-role='launcher-title']");
|
|
@@ -7956,13 +8056,16 @@ var createLauncherButton = (config, onToggle) => {
|
|
|
7956
8056
|
}
|
|
7957
8057
|
}
|
|
7958
8058
|
const positionClass = launcher.position && positionMap[launcher.position] ? positionMap[launcher.position] : positionMap["bottom-right"];
|
|
7959
|
-
const floatingBase = "persona-fixed persona-flex persona-items-center persona-gap-3 persona-rounded-launcher persona-bg-persona-surface persona-py-2.5 persona-pl-3 persona-pr-3 persona-transition hover:persona-translate-y-[-2px] persona-cursor-pointer
|
|
8059
|
+
const floatingBase = "persona-fixed persona-flex persona-items-center persona-gap-3 persona-rounded-launcher persona-bg-persona-surface persona-py-2.5 persona-pl-3 persona-pr-3 persona-transition hover:persona-translate-y-[-2px] persona-cursor-pointer";
|
|
7960
8060
|
const dockedBase = "persona-relative persona-mt-4 persona-mb-4 persona-mx-auto persona-flex persona-items-center persona-justify-center persona-rounded-launcher persona-bg-persona-surface persona-transition hover:persona-translate-y-[-2px] persona-cursor-pointer";
|
|
7961
8061
|
button.className = dockedMode ? dockedBase : `${floatingBase} ${positionClass}`;
|
|
8062
|
+
if (!dockedMode) {
|
|
8063
|
+
button.style.zIndex = String((_k = launcher.zIndex) != null ? _k : DEFAULT_OVERLAY_Z_INDEX);
|
|
8064
|
+
}
|
|
7962
8065
|
const defaultBorder = "1px solid var(--persona-border, #e5e7eb)";
|
|
7963
8066
|
const defaultShadow = "var(--persona-shadow, 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1))";
|
|
7964
|
-
button.style.border = (
|
|
7965
|
-
button.style.boxShadow = (
|
|
8067
|
+
button.style.border = (_l = launcher.border) != null ? _l : defaultBorder;
|
|
8068
|
+
button.style.boxShadow = (_m = launcher.shadow) != null ? _m : defaultShadow;
|
|
7966
8069
|
if (dockedMode) {
|
|
7967
8070
|
button.style.width = "0";
|
|
7968
8071
|
button.style.minWidth = "0";
|
|
@@ -7974,7 +8077,7 @@ var createLauncherButton = (config, onToggle) => {
|
|
|
7974
8077
|
} else {
|
|
7975
8078
|
button.style.width = "";
|
|
7976
8079
|
button.style.minWidth = "";
|
|
7977
|
-
button.style.maxWidth = (
|
|
8080
|
+
button.style.maxWidth = (_n = launcher.collapsedMaxWidth) != null ? _n : "";
|
|
7978
8081
|
button.style.justifyContent = "";
|
|
7979
8082
|
button.style.padding = "";
|
|
7980
8083
|
button.style.overflow = "";
|
|
@@ -8144,6 +8247,7 @@ var buildHeader = (context) => {
|
|
|
8144
8247
|
portaledTooltip.appendChild(arrow);
|
|
8145
8248
|
const buttonRect = clearChatButton.getBoundingClientRect();
|
|
8146
8249
|
portaledTooltip.style.position = "fixed";
|
|
8250
|
+
portaledTooltip.style.zIndex = String(PORTALED_OVERLAY_Z_INDEX);
|
|
8147
8251
|
portaledTooltip.style.left = `${buttonRect.left + buttonRect.width / 2}px`;
|
|
8148
8252
|
portaledTooltip.style.top = `${buttonRect.top - 8}px`;
|
|
8149
8253
|
portaledTooltip.style.transform = "translate(-50%, -100%)";
|
|
@@ -8255,6 +8359,7 @@ var buildHeader = (context) => {
|
|
|
8255
8359
|
portaledTooltip.appendChild(arrow);
|
|
8256
8360
|
const buttonRect = closeButton.getBoundingClientRect();
|
|
8257
8361
|
portaledTooltip.style.position = "fixed";
|
|
8362
|
+
portaledTooltip.style.zIndex = String(PORTALED_OVERLAY_Z_INDEX);
|
|
8258
8363
|
portaledTooltip.style.left = `${buttonRect.left + buttonRect.width / 2}px`;
|
|
8259
8364
|
portaledTooltip.style.top = `${buttonRect.top - 8}px`;
|
|
8260
8365
|
portaledTooltip.style.transform = "translate(-50%, -100%)";
|
|
@@ -8316,7 +8421,7 @@ function createDropdownMenu(options) {
|
|
|
8316
8421
|
menu.setAttribute("data-persona-theme-zone", "dropdown");
|
|
8317
8422
|
if (portal) {
|
|
8318
8423
|
menu.style.position = "fixed";
|
|
8319
|
-
menu.style.zIndex =
|
|
8424
|
+
menu.style.zIndex = String(PORTALED_OVERLAY_Z_INDEX);
|
|
8320
8425
|
} else {
|
|
8321
8426
|
menu.style.position = "absolute";
|
|
8322
8427
|
menu.style.top = "100%";
|
|
@@ -9159,7 +9264,7 @@ var buildComposer = (context) => {
|
|
|
9159
9264
|
|
|
9160
9265
|
// src/components/panel.ts
|
|
9161
9266
|
var createWrapper = (config) => {
|
|
9162
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
9267
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
9163
9268
|
const launcherEnabled = (_b = (_a = config == null ? void 0 : config.launcher) == null ? void 0 : _a.enabled) != null ? _b : true;
|
|
9164
9269
|
const dockedMode = isDockedMountMode(config);
|
|
9165
9270
|
if (dockedMode) {
|
|
@@ -9193,13 +9298,14 @@ var createWrapper = (config) => {
|
|
|
9193
9298
|
const position = launcher.position && positionMap[launcher.position] ? positionMap[launcher.position] : positionMap["bottom-right"];
|
|
9194
9299
|
const wrapper = createElement(
|
|
9195
9300
|
"div",
|
|
9196
|
-
`persona-widget-wrapper persona-fixed ${position} persona-
|
|
9301
|
+
`persona-widget-wrapper persona-fixed ${position} persona-transition`
|
|
9197
9302
|
);
|
|
9303
|
+
wrapper.style.zIndex = String((_g = (_f = config == null ? void 0 : config.launcher) == null ? void 0 : _f.zIndex) != null ? _g : DEFAULT_OVERLAY_Z_INDEX);
|
|
9198
9304
|
const panel = createElement(
|
|
9199
9305
|
"div",
|
|
9200
9306
|
"persona-widget-panel persona-relative persona-min-h-[320px]"
|
|
9201
9307
|
);
|
|
9202
|
-
const launcherWidth = (
|
|
9308
|
+
const launcherWidth = (_i = (_h = config == null ? void 0 : config.launcher) == null ? void 0 : _h.width) != null ? _i : config == null ? void 0 : config.launcherWidth;
|
|
9203
9309
|
const width = launcherWidth != null ? launcherWidth : "min(400px, calc(100vw - 24px))";
|
|
9204
9310
|
panel.style.width = width;
|
|
9205
9311
|
panel.style.maxWidth = width;
|
|
@@ -11421,7 +11527,7 @@ function renderDefaultArtifactCard(props, _context) {
|
|
|
11421
11527
|
const root = document.createElement("div");
|
|
11422
11528
|
root.className = "persona-flex persona-w-full persona-max-w-full persona-items-center persona-gap-3 persona-rounded-xl persona-px-4 persona-py-3";
|
|
11423
11529
|
root.style.border = "1px solid var(--persona-border, #e5e7eb)";
|
|
11424
|
-
root.style.backgroundColor = "var(--persona-
|
|
11530
|
+
root.style.backgroundColor = "var(--persona-surface, #ffffff)";
|
|
11425
11531
|
root.style.cursor = "pointer";
|
|
11426
11532
|
root.tabIndex = 0;
|
|
11427
11533
|
root.setAttribute("role", "button");
|
|
@@ -13702,6 +13808,7 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
13702
13808
|
if (openPrevented === true) return;
|
|
13703
13809
|
event.preventDefault();
|
|
13704
13810
|
event.stopPropagation();
|
|
13811
|
+
artifactsPaneUserHidden = false;
|
|
13705
13812
|
session.selectArtifact(artifactId);
|
|
13706
13813
|
syncArtifactPane();
|
|
13707
13814
|
});
|
|
@@ -13919,7 +14026,7 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
13919
14026
|
}
|
|
13920
14027
|
mount.appendChild(wrapper);
|
|
13921
14028
|
const applyFullHeightStyles = () => {
|
|
13922
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t2, _u2, _v2;
|
|
14029
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t2, _u2, _v2, _w2;
|
|
13923
14030
|
const dockedMode = isDockedMountMode(config);
|
|
13924
14031
|
const sidebarMode = (_b2 = (_a2 = config.launcher) == null ? void 0 : _a2.sidebarMode) != null ? _b2 : false;
|
|
13925
14032
|
const fullHeight = dockedMode || sidebarMode || ((_d2 = (_c2 = config.launcher) == null ? void 0 : _c2.fullHeight) != null ? _d2 : false);
|
|
@@ -13938,7 +14045,7 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
13938
14045
|
const shouldGoFullscreen = mobileFullscreen && isMobileViewport && launcherEnabled;
|
|
13939
14046
|
const position = (_n2 = (_m2 = config.launcher) == null ? void 0 : _m2.position) != null ? _n2 : "bottom-left";
|
|
13940
14047
|
const isLeftSidebar = position === "bottom-left" || position === "top-left";
|
|
13941
|
-
const overlayZIndex = (_p2 = (_o2 = config.launcher) == null ? void 0 : _o2.zIndex) != null ? _p2 :
|
|
14048
|
+
const overlayZIndex = (_p2 = (_o2 = config.launcher) == null ? void 0 : _o2.zIndex) != null ? _p2 : DEFAULT_OVERLAY_Z_INDEX;
|
|
13942
14049
|
let defaultPanelBorder = sidebarMode || shouldGoFullscreen ? "none" : "1px solid var(--persona-border)";
|
|
13943
14050
|
let defaultPanelShadow = shouldGoFullscreen ? "none" : sidebarMode ? isLeftSidebar ? "var(--persona-palette-shadows-sidebar-left, 2px 0 12px rgba(0, 0, 0, 0.08))" : "var(--persona-palette-shadows-sidebar-right, -2px 0 12px rgba(0, 0, 0, 0.08))" : "var(--persona-palette-shadows-xl, 0 25px 50px -12px rgba(0, 0, 0, 0.25))";
|
|
13944
14051
|
if (dockedMode && !shouldGoFullscreen) {
|
|
@@ -14149,7 +14256,7 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
14149
14256
|
if (!isInlineEmbed && !dockedMode) {
|
|
14150
14257
|
const maxHeightStyles = "max-height: -moz-available !important; max-height: stretch !important;";
|
|
14151
14258
|
const paddingStyles = sidebarMode ? "" : "padding-top: 1.25em !important;";
|
|
14152
|
-
const zIndexStyles = !sidebarMode
|
|
14259
|
+
const zIndexStyles = !sidebarMode ? `z-index: ${(_w2 = (_v2 = config.launcher) == null ? void 0 : _v2.zIndex) != null ? _w2 : DEFAULT_OVERLAY_Z_INDEX} !important;` : "";
|
|
14153
14260
|
wrapper.style.cssText += maxHeightStyles + paddingStyles + zIndexStyles;
|
|
14154
14261
|
}
|
|
14155
14262
|
};
|
|
@@ -14158,6 +14265,14 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
14158
14265
|
applyArtifactLayoutCssVars(mount, config);
|
|
14159
14266
|
applyArtifactPaneAppearance(mount, config);
|
|
14160
14267
|
const destroyCallbacks = [];
|
|
14268
|
+
let teardownHostStacking = null;
|
|
14269
|
+
let releaseScrollLock = null;
|
|
14270
|
+
destroyCallbacks.push(() => {
|
|
14271
|
+
teardownHostStacking == null ? void 0 : teardownHostStacking();
|
|
14272
|
+
teardownHostStacking = null;
|
|
14273
|
+
releaseScrollLock == null ? void 0 : releaseScrollLock();
|
|
14274
|
+
releaseScrollLock = null;
|
|
14275
|
+
});
|
|
14161
14276
|
if (artifactPanelResizeObs) {
|
|
14162
14277
|
destroyCallbacks.push(() => {
|
|
14163
14278
|
artifactPanelResizeObs == null ? void 0 : artifactPanelResizeObs.disconnect();
|
|
@@ -14323,7 +14438,8 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
14323
14438
|
container.appendChild(scrollToBottomButton);
|
|
14324
14439
|
}
|
|
14325
14440
|
updateScrollToBottomButtonOffset();
|
|
14326
|
-
|
|
14441
|
+
const hasOverflow = getScrollBottomOffset(body) > 0;
|
|
14442
|
+
scrollToBottomButton.style.display = autoFollow.isFollowing() || !hasOverflow ? "none" : "";
|
|
14327
14443
|
};
|
|
14328
14444
|
const pauseAutoScroll = () => {
|
|
14329
14445
|
if (!autoFollow.pause()) return;
|
|
@@ -14770,11 +14886,42 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
14770
14886
|
}
|
|
14771
14887
|
};
|
|
14772
14888
|
const setOpenState = (nextOpen, source = "user") => {
|
|
14889
|
+
var _a2, _b2;
|
|
14773
14890
|
if (!launcherEnabled) return;
|
|
14774
14891
|
if (open === nextOpen) return;
|
|
14775
14892
|
const prevOpen = open;
|
|
14776
14893
|
open = nextOpen;
|
|
14777
14894
|
updateOpenState();
|
|
14895
|
+
const isViewportCovering = (() => {
|
|
14896
|
+
var _a3, _b3, _c2, _d2, _e2, _f2, _g2;
|
|
14897
|
+
const sm = (_b3 = (_a3 = config.launcher) == null ? void 0 : _a3.sidebarMode) != null ? _b3 : false;
|
|
14898
|
+
const ow = (_c2 = mount.ownerDocument.defaultView) != null ? _c2 : window;
|
|
14899
|
+
const mf = (_e2 = (_d2 = config.launcher) == null ? void 0 : _d2.mobileFullscreen) != null ? _e2 : true;
|
|
14900
|
+
const mb = (_g2 = (_f2 = config.launcher) == null ? void 0 : _f2.mobileBreakpoint) != null ? _g2 : 640;
|
|
14901
|
+
const isMobile = ow.innerWidth <= mb;
|
|
14902
|
+
const dockedMF = isDockedMountMode(config) && mf && isMobile;
|
|
14903
|
+
return sm || mf && isMobile && launcherEnabled || dockedMF;
|
|
14904
|
+
})();
|
|
14905
|
+
if (open && isViewportCovering) {
|
|
14906
|
+
if (!teardownHostStacking) {
|
|
14907
|
+
const root = mount.getRootNode();
|
|
14908
|
+
const hostEl = root instanceof ShadowRoot ? root.host : mount.closest(".persona-host");
|
|
14909
|
+
if (hostEl) {
|
|
14910
|
+
teardownHostStacking = syncOverlayHostStacking(
|
|
14911
|
+
hostEl,
|
|
14912
|
+
(_b2 = (_a2 = config.launcher) == null ? void 0 : _a2.zIndex) != null ? _b2 : DEFAULT_OVERLAY_Z_INDEX
|
|
14913
|
+
);
|
|
14914
|
+
}
|
|
14915
|
+
}
|
|
14916
|
+
if (!releaseScrollLock) {
|
|
14917
|
+
releaseScrollLock = acquireScrollLock(mount.ownerDocument);
|
|
14918
|
+
}
|
|
14919
|
+
} else if (!open) {
|
|
14920
|
+
teardownHostStacking == null ? void 0 : teardownHostStacking();
|
|
14921
|
+
teardownHostStacking = null;
|
|
14922
|
+
releaseScrollLock == null ? void 0 : releaseScrollLock();
|
|
14923
|
+
releaseScrollLock = null;
|
|
14924
|
+
}
|
|
14778
14925
|
if (open) {
|
|
14779
14926
|
recalcPanelHeight();
|
|
14780
14927
|
scheduleAutoScroll(true);
|
|
@@ -15466,7 +15613,7 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
15466
15613
|
}
|
|
15467
15614
|
}
|
|
15468
15615
|
const recalcPanelHeight = () => {
|
|
15469
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2;
|
|
15616
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t2, _u2, _v2;
|
|
15470
15617
|
const dockedMode = isDockedMountMode(config);
|
|
15471
15618
|
const sidebarMode = (_b2 = (_a2 = config.launcher) == null ? void 0 : _a2.sidebarMode) != null ? _b2 : false;
|
|
15472
15619
|
const fullHeight = dockedMode || sidebarMode || ((_d2 = (_c2 = config.launcher) == null ? void 0 : _c2.fullHeight) != null ? _d2 : false);
|
|
@@ -15510,6 +15657,30 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
15510
15657
|
} finally {
|
|
15511
15658
|
updateScrollToBottomButtonOffset();
|
|
15512
15659
|
updateOpenState();
|
|
15660
|
+
if (open && launcherEnabled) {
|
|
15661
|
+
const ow = (_n2 = mount.ownerDocument.defaultView) != null ? _n2 : window;
|
|
15662
|
+
const isMobile = ow.innerWidth <= ((_p2 = (_o2 = config.launcher) == null ? void 0 : _o2.mobileBreakpoint) != null ? _p2 : 640);
|
|
15663
|
+
const sm = (_r2 = (_q2 = config.launcher) == null ? void 0 : _q2.sidebarMode) != null ? _r2 : false;
|
|
15664
|
+
const mf = (_t2 = (_s2 = config.launcher) == null ? void 0 : _s2.mobileFullscreen) != null ? _t2 : true;
|
|
15665
|
+
const dockedMF = isDockedMountMode(config) && mf && isMobile;
|
|
15666
|
+
const isVC = sm || mf && isMobile && launcherEnabled || dockedMF;
|
|
15667
|
+
if (isVC && !releaseScrollLock) {
|
|
15668
|
+
const root = mount.getRootNode();
|
|
15669
|
+
const hostEl = root instanceof ShadowRoot ? root.host : mount.closest(".persona-host");
|
|
15670
|
+
if (hostEl && !teardownHostStacking) {
|
|
15671
|
+
teardownHostStacking = syncOverlayHostStacking(
|
|
15672
|
+
hostEl,
|
|
15673
|
+
(_v2 = (_u2 = config.launcher) == null ? void 0 : _u2.zIndex) != null ? _v2 : DEFAULT_OVERLAY_Z_INDEX
|
|
15674
|
+
);
|
|
15675
|
+
}
|
|
15676
|
+
releaseScrollLock = acquireScrollLock(mount.ownerDocument);
|
|
15677
|
+
} else if (!isVC) {
|
|
15678
|
+
teardownHostStacking == null ? void 0 : teardownHostStacking();
|
|
15679
|
+
teardownHostStacking = null;
|
|
15680
|
+
releaseScrollLock == null ? void 0 : releaseScrollLock();
|
|
15681
|
+
releaseScrollLock = null;
|
|
15682
|
+
}
|
|
15683
|
+
}
|
|
15513
15684
|
}
|
|
15514
15685
|
};
|
|
15515
15686
|
recalcPanelHeight();
|
|
@@ -15596,6 +15767,7 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
15596
15767
|
clearChatButton.addEventListener("click", () => {
|
|
15597
15768
|
session.clearMessages();
|
|
15598
15769
|
messageCache.clear();
|
|
15770
|
+
resumeAutoScroll();
|
|
15599
15771
|
try {
|
|
15600
15772
|
localStorage.removeItem(DEFAULT_CHAT_HISTORY_STORAGE_KEY);
|
|
15601
15773
|
if (config.debug) {
|
|
@@ -16044,6 +16216,7 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
16044
16216
|
portaledTooltip.appendChild(arrow);
|
|
16045
16217
|
const buttonRect = closeButton.getBoundingClientRect();
|
|
16046
16218
|
portaledTooltip.style.position = "fixed";
|
|
16219
|
+
portaledTooltip.style.zIndex = String(PORTALED_OVERLAY_Z_INDEX);
|
|
16047
16220
|
portaledTooltip.style.left = `${buttonRect.left + buttonRect.width / 2}px`;
|
|
16048
16221
|
portaledTooltip.style.top = `${buttonRect.top - 8}px`;
|
|
16049
16222
|
portaledTooltip.style.transform = "translate(-50%, -100%)";
|
|
@@ -16195,6 +16368,7 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
16195
16368
|
portaledTooltip.appendChild(arrow);
|
|
16196
16369
|
const buttonRect = clearChatButton.getBoundingClientRect();
|
|
16197
16370
|
portaledTooltip.style.position = "fixed";
|
|
16371
|
+
portaledTooltip.style.zIndex = String(PORTALED_OVERLAY_Z_INDEX);
|
|
16198
16372
|
portaledTooltip.style.left = `${buttonRect.left + buttonRect.width / 2}px`;
|
|
16199
16373
|
portaledTooltip.style.top = `${buttonRect.top - 8}px`;
|
|
16200
16374
|
portaledTooltip.style.transform = "translate(-50%, -100%)";
|
|
@@ -16601,6 +16775,7 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
16601
16775
|
artifactsPaneUserHidden = false;
|
|
16602
16776
|
session.clearMessages();
|
|
16603
16777
|
messageCache.clear();
|
|
16778
|
+
resumeAutoScroll();
|
|
16604
16779
|
try {
|
|
16605
16780
|
localStorage.removeItem(DEFAULT_CHAT_HISTORY_STORAGE_KEY);
|
|
16606
16781
|
if (config.debug) {
|
|
@@ -17224,7 +17399,7 @@ var applyDockStyles = (shell, pushTrack, contentSlot, dockSlot, host, config, ex
|
|
|
17224
17399
|
dockSlot.style.minWidth = "0";
|
|
17225
17400
|
dockSlot.style.minHeight = "0";
|
|
17226
17401
|
dockSlot.style.overflow = "hidden";
|
|
17227
|
-
dockSlot.style.zIndex = String((_f = (_e = config == null ? void 0 : config.launcher) == null ? void 0 : _e.zIndex) != null ? _f :
|
|
17402
|
+
dockSlot.style.zIndex = String((_f = (_e = config == null ? void 0 : config.launcher) == null ? void 0 : _e.zIndex) != null ? _f : DEFAULT_OVERLAY_Z_INDEX);
|
|
17228
17403
|
dockSlot.style.transform = "none";
|
|
17229
17404
|
dockSlot.style.transition = "none";
|
|
17230
17405
|
dockSlot.style.pointerEvents = "auto";
|
package/dist/theme-editor.d.cts
CHANGED
|
@@ -214,6 +214,17 @@ interface MessageTokens {
|
|
|
214
214
|
/** Assistant bubble box-shadow (token ref or raw CSS, e.g. `none`). */
|
|
215
215
|
shadow?: string;
|
|
216
216
|
};
|
|
217
|
+
/** Border color between messages in the thread. */
|
|
218
|
+
border?: TokenReference<'color'>;
|
|
219
|
+
}
|
|
220
|
+
/** Collapsible widget chrome (tool bubbles, reasoning bubbles, approval bubbles). */
|
|
221
|
+
interface CollapsibleWidgetTokens {
|
|
222
|
+
/** Background for content areas. */
|
|
223
|
+
container?: TokenReference<'color'>;
|
|
224
|
+
/** Background for code blocks inside collapsible sections. */
|
|
225
|
+
surface?: TokenReference<'color'>;
|
|
226
|
+
/** Border color for collapsible sections. */
|
|
227
|
+
border?: TokenReference<'color'>;
|
|
217
228
|
}
|
|
218
229
|
interface MarkdownTokens {
|
|
219
230
|
inlineCode: {
|
|
@@ -242,6 +253,27 @@ interface MarkdownTokens {
|
|
|
242
253
|
fontWeight?: string;
|
|
243
254
|
};
|
|
244
255
|
};
|
|
256
|
+
/** Fenced code block styling. */
|
|
257
|
+
codeBlock?: {
|
|
258
|
+
background?: TokenReference<'color'>;
|
|
259
|
+
borderColor?: TokenReference<'color'>;
|
|
260
|
+
textColor?: TokenReference<'color'>;
|
|
261
|
+
};
|
|
262
|
+
/** Table styling. */
|
|
263
|
+
table?: {
|
|
264
|
+
headerBackground?: TokenReference<'color'>;
|
|
265
|
+
borderColor?: TokenReference<'color'>;
|
|
266
|
+
};
|
|
267
|
+
/** Horizontal rule styling. */
|
|
268
|
+
hr?: {
|
|
269
|
+
color?: TokenReference<'color'>;
|
|
270
|
+
};
|
|
271
|
+
/** Blockquote styling. */
|
|
272
|
+
blockquote?: {
|
|
273
|
+
borderColor?: TokenReference<'color'>;
|
|
274
|
+
background?: TokenReference<'color'>;
|
|
275
|
+
textColor?: TokenReference<'color'>;
|
|
276
|
+
};
|
|
245
277
|
}
|
|
246
278
|
interface VoiceTokens {
|
|
247
279
|
recording: {
|
|
@@ -404,6 +436,8 @@ interface ComponentTokens {
|
|
|
404
436
|
tab?: ArtifactTabTokens;
|
|
405
437
|
pane?: ArtifactPaneTokens;
|
|
406
438
|
};
|
|
439
|
+
/** Collapsible widget chrome (tool/reasoning/approval bubbles). */
|
|
440
|
+
collapsibleWidget?: CollapsibleWidgetTokens;
|
|
407
441
|
}
|
|
408
442
|
interface PaletteExtras {
|
|
409
443
|
transitions?: Record<string, string>;
|
|
@@ -1319,11 +1353,16 @@ type AgentWidgetLauncherConfig = {
|
|
|
1319
1353
|
*/
|
|
1320
1354
|
mobileBreakpoint?: number;
|
|
1321
1355
|
/**
|
|
1322
|
-
* CSS z-index applied to the widget wrapper
|
|
1323
|
-
* (floating panel, mobile fullscreen,
|
|
1324
|
-
*
|
|
1356
|
+
* CSS z-index applied to the widget wrapper and launcher button in all
|
|
1357
|
+
* positioned modes (floating panel, mobile fullscreen, sidebar, docked
|
|
1358
|
+
* mobile fullscreen). Increase this value if other elements on the host
|
|
1359
|
+
* page appear on top of the widget.
|
|
1360
|
+
*
|
|
1361
|
+
* In viewport-covering modes (sidebar, mobile fullscreen), the widget
|
|
1362
|
+
* also elevates the host element's stacking context and locks
|
|
1363
|
+
* document scroll to prevent background scrolling.
|
|
1325
1364
|
*
|
|
1326
|
-
* @default
|
|
1365
|
+
* @default 100000
|
|
1327
1366
|
*/
|
|
1328
1367
|
zIndex?: number;
|
|
1329
1368
|
callToActionIconText?: string;
|
package/dist/theme-editor.d.ts
CHANGED
|
@@ -214,6 +214,17 @@ interface MessageTokens {
|
|
|
214
214
|
/** Assistant bubble box-shadow (token ref or raw CSS, e.g. `none`). */
|
|
215
215
|
shadow?: string;
|
|
216
216
|
};
|
|
217
|
+
/** Border color between messages in the thread. */
|
|
218
|
+
border?: TokenReference<'color'>;
|
|
219
|
+
}
|
|
220
|
+
/** Collapsible widget chrome (tool bubbles, reasoning bubbles, approval bubbles). */
|
|
221
|
+
interface CollapsibleWidgetTokens {
|
|
222
|
+
/** Background for content areas. */
|
|
223
|
+
container?: TokenReference<'color'>;
|
|
224
|
+
/** Background for code blocks inside collapsible sections. */
|
|
225
|
+
surface?: TokenReference<'color'>;
|
|
226
|
+
/** Border color for collapsible sections. */
|
|
227
|
+
border?: TokenReference<'color'>;
|
|
217
228
|
}
|
|
218
229
|
interface MarkdownTokens {
|
|
219
230
|
inlineCode: {
|
|
@@ -242,6 +253,27 @@ interface MarkdownTokens {
|
|
|
242
253
|
fontWeight?: string;
|
|
243
254
|
};
|
|
244
255
|
};
|
|
256
|
+
/** Fenced code block styling. */
|
|
257
|
+
codeBlock?: {
|
|
258
|
+
background?: TokenReference<'color'>;
|
|
259
|
+
borderColor?: TokenReference<'color'>;
|
|
260
|
+
textColor?: TokenReference<'color'>;
|
|
261
|
+
};
|
|
262
|
+
/** Table styling. */
|
|
263
|
+
table?: {
|
|
264
|
+
headerBackground?: TokenReference<'color'>;
|
|
265
|
+
borderColor?: TokenReference<'color'>;
|
|
266
|
+
};
|
|
267
|
+
/** Horizontal rule styling. */
|
|
268
|
+
hr?: {
|
|
269
|
+
color?: TokenReference<'color'>;
|
|
270
|
+
};
|
|
271
|
+
/** Blockquote styling. */
|
|
272
|
+
blockquote?: {
|
|
273
|
+
borderColor?: TokenReference<'color'>;
|
|
274
|
+
background?: TokenReference<'color'>;
|
|
275
|
+
textColor?: TokenReference<'color'>;
|
|
276
|
+
};
|
|
245
277
|
}
|
|
246
278
|
interface VoiceTokens {
|
|
247
279
|
recording: {
|
|
@@ -404,6 +436,8 @@ interface ComponentTokens {
|
|
|
404
436
|
tab?: ArtifactTabTokens;
|
|
405
437
|
pane?: ArtifactPaneTokens;
|
|
406
438
|
};
|
|
439
|
+
/** Collapsible widget chrome (tool/reasoning/approval bubbles). */
|
|
440
|
+
collapsibleWidget?: CollapsibleWidgetTokens;
|
|
407
441
|
}
|
|
408
442
|
interface PaletteExtras {
|
|
409
443
|
transitions?: Record<string, string>;
|
|
@@ -1319,11 +1353,16 @@ type AgentWidgetLauncherConfig = {
|
|
|
1319
1353
|
*/
|
|
1320
1354
|
mobileBreakpoint?: number;
|
|
1321
1355
|
/**
|
|
1322
|
-
* CSS z-index applied to the widget wrapper
|
|
1323
|
-
* (floating panel, mobile fullscreen,
|
|
1324
|
-
*
|
|
1356
|
+
* CSS z-index applied to the widget wrapper and launcher button in all
|
|
1357
|
+
* positioned modes (floating panel, mobile fullscreen, sidebar, docked
|
|
1358
|
+
* mobile fullscreen). Increase this value if other elements on the host
|
|
1359
|
+
* page appear on top of the widget.
|
|
1360
|
+
*
|
|
1361
|
+
* In viewport-covering modes (sidebar, mobile fullscreen), the widget
|
|
1362
|
+
* also elevates the host element's stacking context and locks
|
|
1363
|
+
* document scroll to prevent background scrolling.
|
|
1325
1364
|
*
|
|
1326
|
-
* @default
|
|
1365
|
+
* @default 100000
|
|
1327
1366
|
*/
|
|
1328
1367
|
zIndex?: number;
|
|
1329
1368
|
callToActionIconText?: string;
|