@openspecui/web 3.2.0 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/assets/CanvasRenderer-BtLppj7_.js +1 -0
  2. package/dist/assets/WebGLRenderer-nCk7jk2Z.js +1 -0
  3. package/dist/assets/WebGPURenderer-_UsC4alI.js +1 -0
  4. package/dist/assets/browserAll-DAhverDE.js +1 -0
  5. package/dist/assets/dist-Ac4yA3M_.js +1 -0
  6. package/dist/assets/{dist-7k138I3b.js → dist-BPKmDQiw.js} +1 -1
  7. package/dist/assets/{dist-BzbBXneV.js → dist-BicqBDv3.js} +1 -1
  8. package/dist/assets/{dist-DRGtOQjb.js → dist-Bk4Jg4eO.js} +1 -1
  9. package/dist/assets/dist-CGorlcUk.js +1 -0
  10. package/dist/assets/{dist-BariEsM_.js → dist-CeZGHI2P.js} +1 -1
  11. package/dist/assets/dist-D5vd6U3w.js +1 -0
  12. package/dist/assets/{dist-BHKv931g.js → dist-DK_RcTzA.js} +1 -1
  13. package/dist/assets/{dist-DQThlm_b.js → dist-DLlwI018.js} +1 -1
  14. package/dist/assets/{dist-BrbcaPf-.js → dist-DO6ZBK2U.js} +1 -1
  15. package/dist/assets/{dist-BrjB1GC1.js → dist-Dja1k4z3.js} +1 -1
  16. package/dist/assets/{dist-DXyIaDey.js → dist-F8MUiu4J.js} +1 -1
  17. package/dist/assets/{ghostty-web-BRd9kQ63.js → ghostty-web-02Mxn6DW.js} +1 -1
  18. package/dist/assets/{index-lPENGJEo.js → index-BE9UP1rS.js} +145 -154
  19. package/dist/assets/index-CJqeUtB4.css +1 -0
  20. package/dist/assets/{init-D_t0u2tz.js → init-Dw5X88Rr.js} +1 -1
  21. package/dist/assets/trpc-ClVlhSRF.js +1 -0
  22. package/dist/assets/webworkerAll-DyUg89C9.js +1 -0
  23. package/dist/index.html +2 -2
  24. package/dist-ssg/client/.vite/ssr-manifest.json +18 -15
  25. package/dist-ssg/client/assets/CanvasRenderer-D9X3OXp_.js +1 -0
  26. package/dist-ssg/client/assets/WebGLRenderer-DazMZ-UH.js +1 -0
  27. package/dist-ssg/client/assets/WebGPURenderer-Bdimghfz.js +1 -0
  28. package/dist-ssg/client/assets/browserAll-Dzfxkovh.js +1 -0
  29. package/dist-ssg/client/assets/{dist-BqMNhK51.js → dist-40xjGIL0.js} +1 -1
  30. package/dist-ssg/client/assets/{dist-D2lAo5W7.js → dist-7Bvtx_qv.js} +1 -1
  31. package/dist-ssg/client/assets/{dist-B8BDPpOd.js → dist-BIpSLpok.js} +1 -1
  32. package/dist-ssg/client/assets/{dist-CHoC8-TH.js → dist-BMMg3UNv.js} +1 -1
  33. package/dist-ssg/client/assets/{dist-B__u8Rc8.js → dist-C05OJeJ3.js} +1 -1
  34. package/dist-ssg/client/assets/{dist-hJ0-WGHz.js → dist-C2-dVfwV.js} +1 -1
  35. package/dist-ssg/client/assets/{dist-DbQusMtr.js → dist-CHSKhUU7.js} +1 -1
  36. package/dist-ssg/client/assets/dist-CwMFPmZN.js +1 -0
  37. package/dist-ssg/client/assets/{dist-BhGF0tu4.js → dist-DNzIHL_u.js} +1 -1
  38. package/dist-ssg/client/assets/{dist-Bc_Aiu7K.js → dist-DPF79lwo.js} +1 -1
  39. package/dist-ssg/client/assets/dist-DQz6qSRZ.js +1 -0
  40. package/dist-ssg/client/assets/dist-D_OdCarj.js +1 -0
  41. package/dist-ssg/client/assets/{ghostty-web-CVgMjiXP.js → ghostty-web-CdfY5nPg.js} +1 -1
  42. package/dist-ssg/client/assets/index-B8AzCEti.css +2 -0
  43. package/dist-ssg/client/assets/{index.ssg-CUVE3Tl-.js → index.ssg-BFU9Xt_-.js} +100 -109
  44. package/dist-ssg/client/assets/{init-CTvfU5B_.js → init-Bpyko6ax.js} +1 -1
  45. package/dist-ssg/client/assets/trpc-DyyVp7PI.js +1 -0
  46. package/dist-ssg/client/assets/webworkerAll-DRi5n8n7.js +1 -0
  47. package/dist-ssg/client/index.ssg.html +2 -2
  48. package/dist-ssg/server/entry-server.js +148 -104
  49. package/package.json +1 -1
  50. package/dist/assets/CanvasRenderer-B0YOZN7k.js +0 -1
  51. package/dist/assets/WebGLRenderer-CDOD_LtU.js +0 -1
  52. package/dist/assets/WebGPURenderer-DWgIHmo0.js +0 -1
  53. package/dist/assets/browserAll-DyYp9U9L.js +0 -1
  54. package/dist/assets/dist-B6ubLakN.js +0 -1
  55. package/dist/assets/dist-BWNW4dVV.js +0 -1
  56. package/dist/assets/dist-Da_ehLaL.js +0 -1
  57. package/dist/assets/index-BJbD6w0w.css +0 -1
  58. package/dist/assets/trpc-Df0NyJ69.js +0 -1
  59. package/dist/assets/webworkerAll-Bx6jeHfb.js +0 -1
  60. package/dist-ssg/client/assets/CanvasRenderer-C-yXBRVi.js +0 -1
  61. package/dist-ssg/client/assets/WebGLRenderer-DHfp0nbG.js +0 -1
  62. package/dist-ssg/client/assets/WebGPURenderer-CCm3mBFB.js +0 -1
  63. package/dist-ssg/client/assets/browserAll-CgNj5vUZ.js +0 -1
  64. package/dist-ssg/client/assets/dist-DPBrLaPF.js +0 -1
  65. package/dist-ssg/client/assets/dist-DrnlK6Qw.js +0 -1
  66. package/dist-ssg/client/assets/dist-tYuA3Xpq.js +0 -1
  67. package/dist-ssg/client/assets/index-Uf645ICs.css +0 -2
  68. package/dist-ssg/client/assets/trpc-C1n2nR2r.js +0 -1
  69. package/dist-ssg/client/assets/webworkerAll-C5uLuBgA.js +0 -1
@@ -1 +1 @@
1
- import{it as e}from"./Geometry-CNDxiJq_.js";import{a as t,i as n}from"./index.ssg-CUVE3Tl-.js";e.add(n),e.add(t);
1
+ import{it as e}from"./Geometry-CNDxiJq_.js";import{a as t,i as n}from"./index.ssg-BFU9Xt_-.js";e.add(n),e.add(t);
@@ -0,0 +1 @@
1
+ import{F as e}from"./index.ssg-BFU9Xt_-.js";export{e as trpcClient};
@@ -0,0 +1 @@
1
+ import"./Geometry-CNDxiJq_.js";import"./index.ssg-BFU9Xt_-.js";import"./init-Bpyko6ax.js";
@@ -35,7 +35,7 @@
35
35
  document.head.append(preconnectApi, preconnectStatic, stylesheet)
36
36
  })()
37
37
  </script>
38
- <script type="module" crossorigin src="/assets/index.ssg-CUVE3Tl-.js"></script>
38
+ <script type="module" crossorigin src="/assets/index.ssg-BFU9Xt_-.js"></script>
39
39
  <link rel="modulepreload" crossorigin href="/assets/chunk-DECur_0Z.js">
40
40
  <link rel="modulepreload" crossorigin href="/assets/dist-QUHuPJsA.js">
41
41
  <link rel="modulepreload" crossorigin href="/assets/dist-BGaHY1kO.js">
@@ -45,7 +45,7 @@
45
45
  <link rel="modulepreload" crossorigin href="/assets/getTextureBatchBindGroup-CqvclRGr.js">
46
46
  <link rel="modulepreload" crossorigin href="/assets/BufferResource-DKNednNt.js">
47
47
  <link rel="modulepreload" crossorigin href="/assets/ImageSource-DsthkIsU.js">
48
- <link rel="stylesheet" crossorigin href="/assets/index-Uf645ICs.css">
48
+ <link rel="stylesheet" crossorigin href="/assets/index-B8AzCEti.css">
49
49
  </head>
50
50
  <body>
51
51
  <div id="root"><!--app-html--></div>
@@ -84161,15 +84161,6 @@ var tabsStyleText = (id) => {
84161
84161
  transform: scaleX(0.5);
84162
84162
  }
84163
84163
 
84164
- #${id} .tabs-strip {
84165
- background-image: linear-gradient(
84166
- to bottom,
84167
- transparent,
84168
- transparent calc(100% - 1px),
84169
- var(--border) calc(100% - 1px),
84170
- var(--border)
84171
- );
84172
- }
84173
84164
  `;
84174
84165
  };
84175
84166
  function buildReorderedTabIds(currentTabIds, draggedTabId, targetTabId, position) {
@@ -84192,7 +84183,7 @@ function buildStableContentTabIds(previousTabIds, currentTabIds) {
84192
84183
  * Hidden tabs are pre-rendered at lower priority and preserve their state.
84193
84184
  * Supports both controlled and uncontrolled active tab.
84194
84185
  */
84195
- function TabsImpl({ tabs, selectedTab: controlled, onTabChange, onTabClose, onTabOrderChange, actions, onTabBarDoubleClick, className = "", variant = "default" }, ref) {
84186
+ function TabsImpl({ tabs, selectedTab: controlled, onTabChange, onTabClose, onTabOrderChange, actions, onTabBarDoubleClick, className = "", classNames, showHeaderShell = true, showSelectionIndicator = true, decorateStrip = true, selectionIndicatorLayout = "underline" }, ref) {
84196
84187
  const [uncontrolled, setUncontrolled] = (0, import_react.useState)(tabs[0]?.id ?? "");
84197
84188
  const [dropIndicator, setDropIndicator] = (0, import_react.useState)(null);
84198
84189
  const dropIndicatorRef = (0, import_react.useRef)(null);
@@ -84201,6 +84192,8 @@ function TabsImpl({ tabs, selectedTab: controlled, onTabChange, onTabClose, onTa
84201
84192
  const headerRef = (0, import_react.useRef)(null);
84202
84193
  const headerShellRef = (0, import_react.useRef)(null);
84203
84194
  const headerForegroundRef = (0, import_react.useRef)(null);
84195
+ const headerFrameRef = (0, import_react.useRef)(null);
84196
+ const stripRef = (0, import_react.useRef)(null);
84204
84197
  const selectionIndicatorRef = (0, import_react.useRef)(null);
84205
84198
  const tabsButtonRef = (0, import_react.useRef)(null);
84206
84199
  const triggerRefs = (0, import_react.useRef)(/* @__PURE__ */ new Map());
@@ -84229,7 +84222,7 @@ function TabsImpl({ tabs, selectedTab: controlled, onTabChange, onTabClose, onTa
84229
84222
  return panelRefs.current.get(tabId) ?? null;
84230
84223
  },
84231
84224
  getHeaderShell() {
84232
- return headerShellRef.current;
84225
+ return headerShellRef.current ?? stripRef.current;
84233
84226
  },
84234
84227
  getHeaderForeground() {
84235
84228
  return headerForegroundRef.current;
@@ -84243,28 +84236,44 @@ function TabsImpl({ tabs, selectedTab: controlled, onTabChange, onTabClose, onTa
84243
84236
  }), [activeTab]);
84244
84237
  const syncSelectionIndicator = (0, import_react.useCallback)(() => {
84245
84238
  const indicator = selectionIndicatorRef.current;
84246
- const header = headerRef.current;
84239
+ const strip = stripRef.current ?? headerFrameRef.current;
84247
84240
  const activeTrigger = activeTab ? triggerRefs.current.get(activeTab) : null;
84248
84241
  if (!indicator) return;
84249
- if (variant !== "default" || !header || !activeTrigger) {
84242
+ if (!showSelectionIndicator || !strip || !activeTrigger) {
84250
84243
  indicator.style.opacity = "0";
84251
84244
  indicator.style.width = "0px";
84252
- indicator.style.height = "0px";
84253
- indicator.style.transform = "translate(0px, 0px)";
84245
+ indicator.style.height = selectionIndicatorLayout === "overlay" ? "0px" : "";
84246
+ indicator.style.transform = selectionIndicatorLayout === "overlay" ? "translate(0px, 0px)" : "translateX(0px)";
84254
84247
  return;
84255
84248
  }
84256
- const headerRect = header.getBoundingClientRect();
84249
+ const stripRect = strip.getBoundingClientRect();
84257
84250
  const triggerRect = activeTrigger.getBoundingClientRect();
84251
+ if (selectionIndicatorLayout === "underline") {
84252
+ const indicatorStyle = getComputedStyle(indicator);
84253
+ const inlineInset = parseFloat(indicatorStyle.getPropertyValue("--tabs-selection-inline-inset")) || 10;
84254
+ const minWidth = parseFloat(indicatorStyle.getPropertyValue("--tabs-selection-min-width")) || 40;
84255
+ const width = Math.max(minWidth, triggerRect.width - inlineInset * 2);
84256
+ const translateX = triggerRect.left - stripRect.left + (triggerRect.width - width) / 2;
84257
+ indicator.style.opacity = "1";
84258
+ indicator.style.width = `${width}px`;
84259
+ indicator.style.height = "";
84260
+ indicator.style.transform = `translateX(${translateX}px)`;
84261
+ return;
84262
+ }
84258
84263
  indicator.style.opacity = "1";
84259
84264
  indicator.style.width = `${triggerRect.width}px`;
84260
- indicator.style.height = `${triggerRect.height}px`;
84261
- indicator.style.transform = `translate(${triggerRect.left - headerRect.left}px, ${triggerRect.top - headerRect.top}px)`;
84262
- }, [activeTab, variant]);
84265
+ indicator.style.height = `${triggerRect.height + 1}px`;
84266
+ indicator.style.transform = `translate(${triggerRect.left - stripRect.left}px, ${triggerRect.top - stripRect.top}px)`;
84267
+ }, [
84268
+ activeTab,
84269
+ selectionIndicatorLayout,
84270
+ showSelectionIndicator
84271
+ ]);
84263
84272
  (0, import_react.useLayoutEffect)(() => {
84264
84273
  syncSelectionIndicator();
84265
84274
  }, [syncSelectionIndicator, tabLayoutSignature]);
84266
84275
  (0, import_react.useLayoutEffect)(() => {
84267
- if (variant !== "default") return;
84276
+ if (!showSelectionIndicator) return;
84268
84277
  const tabsButton = tabsButtonRef.current;
84269
84278
  if (!tabsButton) return;
84270
84279
  const handleScroll = () => {
@@ -84279,6 +84288,8 @@ function TabsImpl({ tabs, selectedTab: controlled, onTabChange, onTabClose, onTa
84279
84288
  });
84280
84289
  observer.observe(tabsButton);
84281
84290
  if (headerRef.current) observer.observe(headerRef.current);
84291
+ if (stripRef.current) observer.observe(stripRef.current);
84292
+ if (headerFrameRef.current) observer.observe(headerFrameRef.current);
84282
84293
  const activeTrigger = activeTab ? triggerRefs.current.get(activeTab) : null;
84283
84294
  if (activeTrigger) observer.observe(activeTrigger);
84284
84295
  return () => {
@@ -84287,9 +84298,9 @@ function TabsImpl({ tabs, selectedTab: controlled, onTabChange, onTabClose, onTa
84287
84298
  };
84288
84299
  }, [
84289
84300
  activeTab,
84301
+ showSelectionIndicator,
84290
84302
  syncSelectionIndicator,
84291
- tabLayoutSignature,
84292
- variant
84303
+ tabLayoutSignature
84293
84304
  ]);
84294
84305
  const handleChange = (id) => {
84295
84306
  if (!controlled) setUncontrolled(id);
@@ -84370,13 +84381,23 @@ function TabsImpl({ tabs, selectedTab: controlled, onTabChange, onTabClose, onTa
84370
84381
  event.dataTransfer.dropEffect = "move";
84371
84382
  }, [reorderable]);
84372
84383
  if (tabs.length === 0) return null;
84373
- const headerClassName = variant === "terminal" ? "tabs-header bg-terminal text-terminal-foreground sticky top-0 z-20 flex min-w-0 items-stretch" : "tabs-header relative sticky top-0 z-20 min-w-0";
84374
- const stripClassName = variant === "terminal" ? "tabs-strip min-w-0 flex-1 bg-terminal px-4" : "tabs-strip min-w-0 flex-1 rounded-l-md px-4";
84375
- const listClassName = variant === "terminal" ? "tabs-button scrollbar-none flex min-w-0 gap-1 overflow-x-auto pt-2" : "tabs-button scrollbar-none flex min-w-0 gap-1 overflow-x-auto";
84376
- const buttonBaseClassName = `group relative z-10 m-0 flex h-full shrink-0 items-center gap-2 px-2 text-sm font-medium transition-colors ${variant === "terminal" ? "rounded-t-[8px] py-1" : "py-2"}`;
84377
- const activeButtonClassName = variant === "terminal" ? "tab-selected bg-background text-foreground" : "tab-selected text-foreground";
84378
- const inactiveButtonClassName = variant === "terminal" ? "bg-terminal text-terminal-foreground/80 hover:bg-terminal hover:text-terminal-foreground" : "text-muted-foreground hover:bg-background/35 hover:text-foreground";
84379
- const actionsClassName = variant === "terminal" ? "tabs-actions border-border bg-terminal text-terminal-foreground flex shrink-0 items-center border-b px-1" : "tabs-actions border-zinc-500/15 flex shrink-0 items-center rounded-r-md border-l px-1";
84384
+ const headerClassName = cn$1("tabs-header relative sticky top-0 z-20 flex min-w-0 items-stretch", classNames?.header);
84385
+ const headerShellClassName = cn$1(selectionIndicatorLayout === "underline" ? "tabs-header-shell bg-card/95 pointer-events-none absolute inset-0 z-0 rounded-t-md rounded-b-none border border-b-0 border-zinc-500/15 backdrop-blur-sm" : "tabs-header-shell bg-card/95 pointer-events-none absolute inset-0 z-0 rounded-md border border-zinc-500/15 shadow-[inset_0_-1px_0_color-mix(in_srgb,var(--border)_85%,transparent)] backdrop-blur-sm", classNames?.headerShell);
84386
+ const headerForegroundClassName = cn$1("tabs-header-foreground relative z-20 flex min-w-0 flex-1", classNames?.headerForeground);
84387
+ const headerFrameClassName = cn$1("tabs-header-frame relative flex min-w-0 flex-1 items-stretch", classNames?.headerFrame);
84388
+ const stripClassName = cn$1("tabs-strip relative flex min-w-0 flex-1 items-stretch px-4", classNames?.strip);
84389
+ const listClassName = cn$1("tabs-button scrollbar-none flex min-w-0 flex-1 gap-1 overflow-x-auto", classNames?.list);
84390
+ const buttonBaseClassName = cn$1("group relative z-10 m-0 flex h-full shrink-0 px-2 py-2 text-sm font-medium transition-colors", classNames?.buttonBase);
84391
+ const buttonInnerClassName = cn$1("inline-flex h-full items-center gap-2", classNames?.buttonInner);
84392
+ const activeButtonClassName = cn$1("tab-selected text-foreground", classNames?.activeButton);
84393
+ const inactiveButtonClassName = cn$1("text-muted-foreground hover:text-foreground", classNames?.inactiveButton);
84394
+ const activeButtonInnerClassName = cn$1(classNames?.activeButtonInner);
84395
+ const inactiveButtonInnerClassName = cn$1(classNames?.inactiveButtonInner);
84396
+ const actionsClassName = cn$1("tabs-actions relative flex shrink-0 items-center px-1", classNames?.actions);
84397
+ const actionsDividerClassName = cn$1("tabs-actions-divider bg-border/60 absolute inset-y-0 left-0 w-px", classNames?.actionsDivider);
84398
+ const selectionTrackClassName = cn$1("tabs-selection-track bg-border/85 pointer-events-none absolute inset-x-0 bottom-0 h-px", classNames?.selectionTrack);
84399
+ const selectionIndicatorViewportClassName = cn$1(selectionIndicatorLayout === "underline" ? "pointer-events-none absolute inset-x-0 top-0 bottom-[-1px] z-10 overflow-hidden" : "pointer-events-none absolute inset-0 z-10 overflow-hidden", classNames?.selectionIndicatorViewport);
84400
+ const selectionIndicatorClassName = cn$1(selectionIndicatorLayout === "underline" ? "tabs-selection-indicator absolute bottom-0 left-0 h-[3px] rounded-full bg-primary opacity-0 transition-[transform,width,opacity] duration-280 ease-[cubic-bezier(0.22,1,0.36,1)] [--tabs-selection-inline-inset:10px] [--tabs-selection-min-width:40px]" : "tabs-selection-indicator border-primary bg-background/70 duration-280 absolute left-0 top-0 border-b opacity-0 transition-[transform,width,height,opacity] ease-[cubic-bezier(0.22,1,0.36,1)]", classNames?.selectionIndicator);
84380
84401
  const handleTabBarDoubleClick = (event) => {
84381
84402
  if (!onTabBarDoubleClick) return;
84382
84403
  if (event.target.closest("[data-tab-item=\"true\"]")) return;
@@ -84384,7 +84405,7 @@ function TabsImpl({ tabs, selectedTab: controlled, onTabChange, onTabClose, onTa
84384
84405
  };
84385
84406
  const tabButtons = tabs.map((tab) => {
84386
84407
  const dragIndicatorStyle = dropIndicator?.tabId === tab.id ? { boxShadow: dropIndicator.position === "before" ? "inset 2px 0 0 var(--border)" : "inset -2px 0 0 var(--border)" } : void 0;
84387
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
84408
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
84388
84409
  ref: (element) => {
84389
84410
  triggerRefs.current.set(tab.id, element);
84390
84411
  },
@@ -84398,86 +84419,87 @@ function TabsImpl({ tabs, selectedTab: controlled, onTabChange, onTabClose, onTa
84398
84419
  onDrop: (event) => handleItemDrop(event, tab.id),
84399
84420
  className: `${buttonBaseClassName} ${activeTab === tab.id ? activeButtonClassName : inactiveButtonClassName} ${reorderable ? "cursor-grab active:cursor-grabbing" : ""}`,
84400
84421
  style: dragIndicatorStyle,
84401
- children: [
84402
- tab.icon,
84403
- tab.label,
84404
- tab.closable && onTabClose && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
84405
- role: "button",
84406
- tabIndex: 0,
84407
- onClick: (event) => {
84408
- event.stopPropagation();
84409
- onTabClose(tab.id);
84410
- },
84411
- onKeyDown: (event) => {
84412
- if (event.key === "Enter" || event.key === " ") {
84422
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
84423
+ "data-tabs-button-inner": "true",
84424
+ className: `${buttonInnerClassName} ${activeTab === tab.id ? activeButtonInnerClassName : inactiveButtonInnerClassName}`,
84425
+ children: [
84426
+ tab.icon,
84427
+ tab.label,
84428
+ tab.closable && onTabClose && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
84429
+ role: "button",
84430
+ tabIndex: 0,
84431
+ onClick: (event) => {
84413
84432
  event.stopPropagation();
84414
84433
  onTabClose(tab.id);
84415
- }
84416
- },
84417
- draggable: false,
84418
- className: `hover:text-foreground -mr-1 rounded p-0.5 transition ${tab.closeButtonVisibility === "always" ? "opacity-100" : "opacity-0 group-hover:opacity-100 [button:hover>&]:opacity-100"} ${activeTab === tab.id ? "text-current/80" : "text-muted-foreground"}`,
84419
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(X$2, { className: "h-3 w-3" })
84420
- })
84421
- ]
84434
+ },
84435
+ onKeyDown: (event) => {
84436
+ if (event.key === "Enter" || event.key === " ") {
84437
+ event.stopPropagation();
84438
+ onTabClose(tab.id);
84439
+ }
84440
+ },
84441
+ draggable: false,
84442
+ className: `-mr-1 rounded p-0.5 transition ${tab.closeButtonVisibility === "always" ? "opacity-100" : "opacity-0 group-hover:opacity-100 [button:hover>&]:opacity-100"} ${activeTab === tab.id ? cn$1("text-current/80 hover:text-foreground", classNames?.closeButtonActive) : cn$1("text-muted-foreground hover:text-foreground", classNames?.closeButtonInactive)}`,
84443
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(X$2, { className: "h-3 w-3" })
84444
+ })
84445
+ ]
84446
+ })
84422
84447
  }, tab.id);
84423
84448
  });
84424
84449
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
84425
84450
  id,
84426
84451
  ref: rootRef,
84427
- "data-tabs-variant": variant,
84452
+ "data-tabs-strip-decoration": decorateStrip ? "on" : "off",
84428
84453
  className: `relative isolate flex min-h-0 min-w-0 flex-1 flex-col ${className}`,
84429
84454
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
84430
84455
  ref: headerRef,
84431
84456
  className: headerClassName,
84432
- children: variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
84433
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
84434
- ref: headerShellRef,
84435
- "data-tabs-header-shell": "true",
84436
- className: "tabs-header-shell bg-card/95 pointer-events-none absolute inset-0 z-0 rounded-md border border-zinc-500/15 shadow-[inset_0_-1px_0_color-mix(in_srgb,var(--border)_85%,transparent)] backdrop-blur-sm"
84437
- }),
84438
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
84439
- className: "pointer-events-none absolute inset-0 z-10",
84440
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
84441
- ref: selectionIndicatorRef,
84442
- "data-tabs-selection-indicator": "true",
84443
- "aria-hidden": "true",
84444
- className: "tabs-selection-indicator border-primary bg-background/70 duration-280 absolute left-0 top-0 border-b-4 opacity-0 transition-[transform,width,height,opacity] ease-[cubic-bezier(0.22,1,0.36,1)]"
84445
- })
84446
- }),
84447
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
84448
- ref: headerForegroundRef,
84449
- "data-tabs-header-foreground": "true",
84450
- className: "tabs-header-foreground relative z-20 flex min-w-0 items-stretch",
84451
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
84452
- className: stripClassName,
84453
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
84454
- ref: tabsButtonRef,
84455
- className: listClassName,
84456
- onDoubleClick: handleTabBarDoubleClick,
84457
- onDragOver: handleListDragOver,
84458
- onDrop: handleListDrop,
84459
- children: tabButtons
84457
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [showHeaderShell && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
84458
+ ref: headerShellRef,
84459
+ "data-tabs-header-shell": "true",
84460
+ className: headerShellClassName
84461
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
84462
+ ref: headerForegroundRef,
84463
+ "data-tabs-header-foreground": "true",
84464
+ className: headerForegroundClassName,
84465
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
84466
+ ref: headerFrameRef,
84467
+ className: headerFrameClassName,
84468
+ children: [
84469
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
84470
+ ref: stripRef,
84471
+ className: stripClassName,
84472
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
84473
+ ref: tabsButtonRef,
84474
+ className: listClassName,
84475
+ onDoubleClick: handleTabBarDoubleClick,
84476
+ onDragOver: handleListDragOver,
84477
+ onDrop: handleListDrop,
84478
+ children: tabButtons
84479
+ }), showSelectionIndicator && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
84480
+ className: selectionIndicatorViewportClassName,
84481
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
84482
+ ref: selectionIndicatorRef,
84483
+ "data-tabs-selection-indicator": "true",
84484
+ "aria-hidden": "true",
84485
+ className: selectionIndicatorClassName
84486
+ })
84487
+ })]
84488
+ }),
84489
+ actions && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
84490
+ "data-tabs-actions": "true",
84491
+ className: actionsClassName,
84492
+ children: [decorateStrip && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
84493
+ "aria-hidden": "true",
84494
+ className: actionsDividerClassName
84495
+ }), actions]
84496
+ }),
84497
+ decorateStrip && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
84498
+ "aria-hidden": "true",
84499
+ className: selectionTrackClassName
84460
84500
  })
84461
- }), actions && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
84462
- "data-tabs-actions": "true",
84463
- className: actionsClassName,
84464
- children: actions
84465
- })]
84466
- })
84467
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
84468
- className: stripClassName,
84469
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
84470
- ref: tabsButtonRef,
84471
- className: listClassName,
84472
- onDoubleClick: handleTabBarDoubleClick,
84473
- onDragOver: handleListDragOver,
84474
- onDrop: handleListDrop,
84475
- children: tabButtons
84501
+ ]
84476
84502
  })
84477
- }), actions && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
84478
- "data-tabs-actions": "true",
84479
- className: actionsClassName,
84480
- children: actions
84481
84503
  })] })
84482
84504
  }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
84483
84505
  className: "relative flex min-h-0 flex-1 overflow-hidden",
@@ -84504,6 +84526,14 @@ function TabsImpl({ tabs, selectedTab: controlled, onTabChange, onTabClose, onTa
84504
84526
  }
84505
84527
  var Tabs = (0, import_react.forwardRef)(TabsImpl);
84506
84528
  //#endregion
84529
+ //#region src/lib/view-transitions/tab-direction.ts
84530
+ function resolveTabCarouselDirection(tabs, currentTabId, nextTabId) {
84531
+ const currentIndex = tabs.findIndex((tab) => tab.id === currentTabId);
84532
+ const nextIndex = tabs.findIndex((tab) => tab.id === nextTabId);
84533
+ if (currentIndex < 0 || nextIndex < 0 || currentIndex === nextIndex) return null;
84534
+ return nextIndex > currentIndex ? "forward" : "backward";
84535
+ }
84536
+ //#endregion
84507
84537
  //#region src/lib/view-transitions/tab-scroll-freeze.ts
84508
84538
  var DATA_VISIBLE_HEIGHT = "tabVisibleHeight";
84509
84539
  var DATA_TOP_INSET = "tabTopInset";
@@ -85015,11 +85045,16 @@ function useRoutedCarouselTabs({ queryKey, tabs, initialTab, area, history = "re
85015
85045
  commitSelection();
85016
85046
  return;
85017
85047
  }
85048
+ const direction = resolveTabCarouselDirection(latestTabs, currentTab, nextTabId);
85049
+ if (!direction) {
85050
+ commitSelection();
85051
+ return;
85052
+ }
85018
85053
  runViewTransition({
85019
85054
  intent: {
85020
85055
  area: resolveTabArea(latestLocation.pathname, latestArea),
85021
85056
  kind: "tab-carousel",
85022
- direction: "forward"
85057
+ direction
85023
85058
  },
85024
85059
  collectBeforeEntries: () => collectTabEntries(tabsRef.current, currentTab),
85025
85060
  collectAfterEntries: () => collectTabEntries(tabsRef.current, nextTabId),
@@ -85027,7 +85062,8 @@ function useRoutedCarouselTabs({ queryKey, tabs, initialTab, area, history = "re
85027
85062
  });
85028
85063
  return;
85029
85064
  }
85030
- const runSelectionWithScrollTransfer = (animated) => {
85065
+ const direction = resolveTabCarouselDirection(latestTabs, currentTab, nextTabId);
85066
+ const runSelectionWithScrollTransfer = (animated, direction) => {
85031
85067
  const outgoingSnapshot = captureTabSnapshot(currentTab, latestViewportSelector);
85032
85068
  const incomingSeedSnapshot = scrollMemoryByTabRef.current.get(nextTabId) ?? outgoingSnapshot ?? captureTabSnapshot(nextTabId, latestViewportSelector);
85033
85069
  const outgoingToken = captureOutgoingTab(currentTab, latestViewportSelector, outgoingSnapshot);
@@ -85063,14 +85099,11 @@ function useRoutedCarouselTabs({ queryKey, tabs, initialTab, area, history = "re
85063
85099
  runSelectionWithScrollTransfer(false);
85064
85100
  return;
85065
85101
  }
85066
- const currentIndex = latestTabs.findIndex((tab) => tab.id === currentTab);
85067
- const nextIndex = latestTabs.findIndex((tab) => tab.id === nextTabId);
85068
- if (currentIndex < 0 || nextIndex < 0) {
85102
+ if (!direction) {
85069
85103
  runSelectionWithScrollTransfer(false);
85070
85104
  return;
85071
85105
  }
85072
- const direction = nextIndex >= currentIndex ? "forward" : "backward";
85073
- runSelectionWithScrollTransfer(true);
85106
+ runSelectionWithScrollTransfer(true, direction);
85074
85107
  }, [
85075
85108
  captureOutgoingTab,
85076
85109
  captureTabSnapshot,
@@ -145072,6 +145105,13 @@ var TerminalController = class {
145072
145105
  ghosttyInitPromise = null;
145073
145106
  appDarkMode = false;
145074
145107
  systemDarkMode = false;
145108
+ resolvedTheme = resolveTerminalTheme({
145109
+ useTheme: DEFAULT_TERMINAL_CONFIG.useTheme,
145110
+ lightTheme: DEFAULT_TERMINAL_CONFIG.lightTheme,
145111
+ darkTheme: DEFAULT_TERMINAL_CONFIG.darkTheme,
145112
+ appDarkMode: false,
145113
+ systemDarkMode: false
145114
+ });
145075
145115
  ws = null;
145076
145116
  wsConnected = false;
145077
145117
  reconnectTimer = null;
@@ -145488,6 +145528,9 @@ var TerminalController = class {
145488
145528
  getConfig() {
145489
145529
  return { ...this.config };
145490
145530
  }
145531
+ getResolvedTheme() {
145532
+ return this.resolvedTheme;
145533
+ }
145491
145534
  setThemeContext(input) {
145492
145535
  if (!(this.appDarkMode !== input.appDarkMode || this.systemDarkMode !== input.systemDarkMode)) return;
145493
145536
  this.appDarkMode = input.appDarkMode;
@@ -145519,6 +145562,7 @@ var TerminalController = class {
145519
145562
  appDarkMode: this.appDarkMode,
145520
145563
  systemDarkMode: this.systemDarkMode
145521
145564
  });
145565
+ this.resolvedTheme = resolvedTheme;
145522
145566
  for (const instance of this.instances.values()) {
145523
145567
  instance.terminal.options.theme = resolvedTheme.definition.palette;
145524
145568
  instance.terminal.options.allowTransparency = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openspecui/web",
3
- "version": "3.2.0",
3
+ "version": "3.2.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "openspecui-ssg": "./dist-ssg/ssg-cli.mjs"
@@ -1 +0,0 @@
1
- import"./Geometry-CNDxiJq_.js";import{r as e}from"./index-lPENGJEo.js";export{e as CanvasRenderer};
@@ -1 +0,0 @@
1
- import"./Geometry-CNDxiJq_.js";import{n as e}from"./index-lPENGJEo.js";export{e as WebGLRenderer};
@@ -1 +0,0 @@
1
- import"./Geometry-CNDxiJq_.js";import{t as e}from"./index-lPENGJEo.js";export{e as WebGPURenderer};
@@ -1 +0,0 @@
1
- import{it as e,x as t}from"./Geometry-CNDxiJq_.js";import{c as n,l as r,o as i,s as a}from"./index-lPENGJEo.js";import"./init-D_t0u2tz.js";e.add(r),e.mixin(t,n),e.add(a),e.mixin(t,i);
@@ -1 +0,0 @@
1
- import"./dist-QUHuPJsA.js";import{u as e}from"./index-lPENGJEo.js";export{e as yaml};
@@ -1 +0,0 @@
1
- import"./dist-QUHuPJsA.js";import{k as e}from"./index-lPENGJEo.js";export{e as json};
@@ -1 +0,0 @@
1
- import"./dist-QUHuPJsA.js";import{T as e}from"./index-lPENGJEo.js";export{e as css};