@tangle-network/sandbox-ui 0.113.2 → 0.113.4
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/{chunk-OUHP3YN4.js → chunk-JZCRK2BJ.js} +32 -10
- package/dist/{chunk-K4Q4E7D7.js → chunk-LDAKIKTV.js} +2 -2
- package/dist/{chunk-RDUYWQQ7.js → chunk-XFEJ66AG.js} +1 -1
- package/dist/dashboard.js +1 -1
- package/dist/globals.css +19 -0
- package/dist/index.js +3 -3
- package/dist/styles.css +19 -0
- package/dist/workbench.js +2 -2
- package/dist/workspace.d.ts +7 -1
- package/dist/workspace.js +1 -1
- package/package.json +7 -7
|
@@ -6,13 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-EI44GEQ5.js";
|
|
7
7
|
|
|
8
8
|
// src/workspace/workspace-layout.tsx
|
|
9
|
-
import {
|
|
10
|
-
useCallback,
|
|
11
|
-
useEffect,
|
|
12
|
-
useMemo,
|
|
13
|
-
useRef,
|
|
14
|
-
useState
|
|
15
|
-
} from "react";
|
|
9
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
16
10
|
import {
|
|
17
11
|
PanelBottomClose,
|
|
18
12
|
PanelBottomOpen,
|
|
@@ -215,6 +209,7 @@ function WorkspaceLayout({
|
|
|
215
209
|
maxLeftWidth = 420,
|
|
216
210
|
minRightWidth = 320,
|
|
217
211
|
maxRightWidth = 720,
|
|
212
|
+
minCenterWidth = 400,
|
|
218
213
|
minBottomHeight = 100,
|
|
219
214
|
maxBottomHeight = 500,
|
|
220
215
|
persistenceKey,
|
|
@@ -332,8 +327,35 @@ function WorkspaceLayout({
|
|
|
332
327
|
window.removeEventListener("pointercancel", handlePointerUp);
|
|
333
328
|
};
|
|
334
329
|
}, [desktop, maxBottomHeight, maxLeftWidth, maxRightWidth, minBottomHeight, minLeftWidth, minRightWidth]);
|
|
335
|
-
const
|
|
336
|
-
const
|
|
330
|
+
const shellRef = useRef(null);
|
|
331
|
+
const [shellWidth, setShellWidth] = useState(null);
|
|
332
|
+
useEffect(() => {
|
|
333
|
+
const shell = shellRef.current;
|
|
334
|
+
if (!shell || typeof ResizeObserver === "undefined") return;
|
|
335
|
+
const observer = new ResizeObserver((entries) => {
|
|
336
|
+
const width = entries[0]?.contentRect.width;
|
|
337
|
+
if (typeof width === "number") setShellWidth(width);
|
|
338
|
+
});
|
|
339
|
+
observer.observe(shell);
|
|
340
|
+
return () => observer.disconnect();
|
|
341
|
+
}, []);
|
|
342
|
+
const { leftPx, rightPx } = useMemo(() => {
|
|
343
|
+
const leftShown = desktop && hasLeft && leftOpen;
|
|
344
|
+
const rightShown = desktop && hasRight && rightOpen;
|
|
345
|
+
let leftPx2 = leftWidth;
|
|
346
|
+
let rightPx2 = rightWidth;
|
|
347
|
+
if (shellWidth === null) return { leftPx: leftPx2, rightPx: rightPx2 };
|
|
348
|
+
const room = () => shellWidth - (leftShown ? leftPx2 : 0) - (rightShown ? rightPx2 : 0);
|
|
349
|
+
if (rightShown && room() < minCenterWidth) {
|
|
350
|
+
rightPx2 = Math.max(minRightWidth, rightPx2 - (minCenterWidth - room()));
|
|
351
|
+
}
|
|
352
|
+
if (leftShown && room() < minCenterWidth) {
|
|
353
|
+
leftPx2 = Math.max(minLeftWidth, leftPx2 - (minCenterWidth - room()));
|
|
354
|
+
}
|
|
355
|
+
return { leftPx: leftPx2, rightPx: rightPx2 };
|
|
356
|
+
}, [desktop, hasLeft, hasRight, leftOpen, leftWidth, minCenterWidth, minLeftWidth, minRightWidth, rightOpen, rightWidth, shellWidth]);
|
|
357
|
+
const leftStyle = useMemo(() => ({ width: `${leftPx}px` }), [leftPx]);
|
|
358
|
+
const rightStyle = useMemo(() => ({ width: `${rightPx}px` }), [rightPx]);
|
|
337
359
|
const startResize = (side, pointerStartX) => {
|
|
338
360
|
dragStateRef.current = {
|
|
339
361
|
side,
|
|
@@ -371,7 +393,7 @@ function WorkspaceLayout({
|
|
|
371
393
|
className
|
|
372
394
|
),
|
|
373
395
|
children: [
|
|
374
|
-
/* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-1", children: [
|
|
396
|
+
/* @__PURE__ */ jsxs("div", { ref: shellRef, className: "flex min-h-0 flex-1", children: [
|
|
375
397
|
desktop && left && leftOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
376
398
|
/* @__PURE__ */ jsxs(
|
|
377
399
|
"aside",
|
|
@@ -3950,7 +3950,7 @@ function PortsList({ ports, onExposePort, onRemovePort, isExposing = false, clas
|
|
|
3950
3950
|
value: newPort,
|
|
3951
3951
|
onChange: (e) => setNewPort(e.target.value),
|
|
3952
3952
|
onKeyDown: (e) => e.key === "Enter" && handleExpose(),
|
|
3953
|
-
className: "flex-1 rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container-low px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus-visible:ring-
|
|
3953
|
+
className: "flex-1 rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container-low px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-ring"
|
|
3954
3954
|
}
|
|
3955
3955
|
),
|
|
3956
3956
|
/* @__PURE__ */ jsxs22(
|
|
@@ -3959,7 +3959,7 @@ function PortsList({ ports, onExposePort, onRemovePort, isExposing = false, clas
|
|
|
3959
3959
|
type: "button",
|
|
3960
3960
|
onClick: handleExpose,
|
|
3961
3961
|
disabled: !newPort || isExposing,
|
|
3962
|
-
className: "inline-flex items-center gap-2 rounded-lg bg-primary
|
|
3962
|
+
className: "inline-flex items-center gap-2 rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-primary-foreground shadow-sm transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:bg-primary/55 disabled:text-primary-foreground/90 disabled:shadow-none",
|
|
3963
3963
|
children: [
|
|
3964
3964
|
/* @__PURE__ */ jsx25(Plus4, { className: "h-4 w-4" }),
|
|
3965
3965
|
"Expose"
|
package/dist/dashboard.js
CHANGED
package/dist/globals.css
CHANGED
|
@@ -4362,6 +4362,9 @@
|
|
|
4362
4362
|
.focus-visible\:border-\[var\(--border-accent\)\]:focus-visible {
|
|
4363
4363
|
border-color: var(--border-accent);
|
|
4364
4364
|
}
|
|
4365
|
+
.focus-visible\:border-primary:focus-visible {
|
|
4366
|
+
border-color: var(--color-primary);
|
|
4367
|
+
}
|
|
4365
4368
|
.focus-visible\:border-primary\/50:focus-visible {
|
|
4366
4369
|
border-color: color-mix(in srgb, hsl(var(--primary)) 50%, transparent);
|
|
4367
4370
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -4465,6 +4468,18 @@
|
|
|
4465
4468
|
.disabled\:cursor-not-allowed:disabled {
|
|
4466
4469
|
cursor: not-allowed;
|
|
4467
4470
|
}
|
|
4471
|
+
.disabled\:bg-primary\/55:disabled {
|
|
4472
|
+
background-color: color-mix(in srgb, hsl(var(--primary)) 55%, transparent);
|
|
4473
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
4474
|
+
background-color: color-mix(in oklab, var(--color-primary) 55%, transparent);
|
|
4475
|
+
}
|
|
4476
|
+
}
|
|
4477
|
+
.disabled\:text-primary-foreground\/90:disabled {
|
|
4478
|
+
color: color-mix(in srgb, hsl(var(--primary-foreground)) 90%, transparent);
|
|
4479
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
4480
|
+
color: color-mix(in oklab, var(--color-primary-foreground) 90%, transparent);
|
|
4481
|
+
}
|
|
4482
|
+
}
|
|
4468
4483
|
.disabled\:opacity-30:disabled {
|
|
4469
4484
|
opacity: 30%;
|
|
4470
4485
|
}
|
|
@@ -4477,6 +4492,10 @@
|
|
|
4477
4492
|
.disabled\:opacity-60:disabled {
|
|
4478
4493
|
opacity: 60%;
|
|
4479
4494
|
}
|
|
4495
|
+
.disabled\:shadow-none:disabled {
|
|
4496
|
+
--tw-shadow: 0 0 #0000;
|
|
4497
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
4498
|
+
}
|
|
4480
4499
|
.data-\[disabled\]\:pointer-events-none[data-disabled] {
|
|
4481
4500
|
pointer-events: none;
|
|
4482
4501
|
}
|
package/dist/index.js
CHANGED
|
@@ -133,7 +133,7 @@ import {
|
|
|
133
133
|
formatRelativeAge,
|
|
134
134
|
shellShouldRevalidate,
|
|
135
135
|
useOptimisticSessionItems
|
|
136
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-JZCRK2BJ.js";
|
|
137
137
|
import {
|
|
138
138
|
BRAND_PRISM_THEME,
|
|
139
139
|
ChangesPane,
|
|
@@ -150,7 +150,7 @@ import {
|
|
|
150
150
|
buildUnifiedPatch,
|
|
151
151
|
computeDiffStats,
|
|
152
152
|
resolveLanguage
|
|
153
|
-
} from "./chunk-
|
|
153
|
+
} from "./chunk-XFEJ66AG.js";
|
|
154
154
|
import {
|
|
155
155
|
FileArtifactPane,
|
|
156
156
|
FilePreview,
|
|
@@ -226,7 +226,7 @@ import {
|
|
|
226
226
|
chatCapableHarnesses,
|
|
227
227
|
parseInsufficientBalance,
|
|
228
228
|
useSidebar
|
|
229
|
-
} from "./chunk-
|
|
229
|
+
} from "./chunk-LDAKIKTV.js";
|
|
230
230
|
import {
|
|
231
231
|
BillingDashboard,
|
|
232
232
|
InfoPanel,
|
package/dist/styles.css
CHANGED
|
@@ -4362,6 +4362,9 @@
|
|
|
4362
4362
|
.focus-visible\:border-\[var\(--border-accent\)\]:focus-visible {
|
|
4363
4363
|
border-color: var(--border-accent);
|
|
4364
4364
|
}
|
|
4365
|
+
.focus-visible\:border-primary:focus-visible {
|
|
4366
|
+
border-color: var(--color-primary);
|
|
4367
|
+
}
|
|
4365
4368
|
.focus-visible\:border-primary\/50:focus-visible {
|
|
4366
4369
|
border-color: color-mix(in srgb, hsl(var(--primary)) 50%, transparent);
|
|
4367
4370
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -4465,6 +4468,18 @@
|
|
|
4465
4468
|
.disabled\:cursor-not-allowed:disabled {
|
|
4466
4469
|
cursor: not-allowed;
|
|
4467
4470
|
}
|
|
4471
|
+
.disabled\:bg-primary\/55:disabled {
|
|
4472
|
+
background-color: color-mix(in srgb, hsl(var(--primary)) 55%, transparent);
|
|
4473
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
4474
|
+
background-color: color-mix(in oklab, var(--color-primary) 55%, transparent);
|
|
4475
|
+
}
|
|
4476
|
+
}
|
|
4477
|
+
.disabled\:text-primary-foreground\/90:disabled {
|
|
4478
|
+
color: color-mix(in srgb, hsl(var(--primary-foreground)) 90%, transparent);
|
|
4479
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
4480
|
+
color: color-mix(in oklab, var(--color-primary-foreground) 90%, transparent);
|
|
4481
|
+
}
|
|
4482
|
+
}
|
|
4468
4483
|
.disabled\:opacity-30:disabled {
|
|
4469
4484
|
opacity: 30%;
|
|
4470
4485
|
}
|
|
@@ -4477,6 +4492,10 @@
|
|
|
4477
4492
|
.disabled\:opacity-60:disabled {
|
|
4478
4493
|
opacity: 60%;
|
|
4479
4494
|
}
|
|
4495
|
+
.disabled\:shadow-none:disabled {
|
|
4496
|
+
--tw-shadow: 0 0 #0000;
|
|
4497
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
4498
|
+
}
|
|
4480
4499
|
.data-\[disabled\]\:pointer-events-none[data-disabled] {
|
|
4481
4500
|
pointer-events: none;
|
|
4482
4501
|
}
|
package/dist/workbench.js
CHANGED
|
@@ -14,9 +14,9 @@ import {
|
|
|
14
14
|
buildUnifiedPatch,
|
|
15
15
|
computeDiffStats,
|
|
16
16
|
resolveLanguage
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-XFEJ66AG.js";
|
|
18
18
|
import "./chunk-PZVUIUUW.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-LDAKIKTV.js";
|
|
20
20
|
import "./chunk-OMUIPJQZ.js";
|
|
21
21
|
import "./chunk-IACRDXER.js";
|
|
22
22
|
import "./chunk-MYZAW4RX.js";
|
package/dist/workspace.d.ts
CHANGED
|
@@ -46,6 +46,12 @@ interface WorkspaceLayoutProps {
|
|
|
46
46
|
minRightWidth?: number;
|
|
47
47
|
/** Maximum right panel width in px */
|
|
48
48
|
maxRightWidth?: number;
|
|
49
|
+
/**
|
|
50
|
+
* Width in px the center column keeps on desktop. When the shell is too
|
|
51
|
+
* narrow for the stored pane widths, the right pane yields down to its
|
|
52
|
+
* minimum first, then the left; the stored widths return when room does.
|
|
53
|
+
*/
|
|
54
|
+
minCenterWidth?: number;
|
|
49
55
|
/** Minimum bottom panel height in px */
|
|
50
56
|
minBottomHeight?: number;
|
|
51
57
|
/** Maximum bottom panel height in px */
|
|
@@ -99,7 +105,7 @@ interface WorkspaceLayoutProps {
|
|
|
99
105
|
centerHeaderVisibility?: "always" | "auto";
|
|
100
106
|
className?: string;
|
|
101
107
|
}
|
|
102
|
-
declare function WorkspaceLayout({ left, leftHeader, center, centerHeader, centerFooter, right, rightHeader, bottom, bottomHeader, defaultLeftOpen, defaultRightOpen, defaultBottomOpen, defaultLeftWidth, defaultRightWidth, defaultBottomHeight, minLeftWidth, maxLeftWidth, minRightWidth, maxRightWidth, minBottomHeight, maxBottomHeight, persistenceKey, resizable, theme, density, leftLabel, rightLabel, bottomLabel, leftOpen: leftOpenProp, onLeftOpenChange, rightOpen: rightOpenProp, onRightOpenChange, keyboardShortcuts, leftCollapsedControl, leftContentClassName, rightContentClassName, centerHeaderVisibility, className, }: WorkspaceLayoutProps): React$1.JSX.Element;
|
|
108
|
+
declare function WorkspaceLayout({ left, leftHeader, center, centerHeader, centerFooter, right, rightHeader, bottom, bottomHeader, defaultLeftOpen, defaultRightOpen, defaultBottomOpen, defaultLeftWidth, defaultRightWidth, defaultBottomHeight, minLeftWidth, maxLeftWidth, minRightWidth, maxRightWidth, minCenterWidth, minBottomHeight, maxBottomHeight, persistenceKey, resizable, theme, density, leftLabel, rightLabel, bottomLabel, leftOpen: leftOpenProp, onLeftOpenChange, rightOpen: rightOpenProp, onRightOpenChange, keyboardShortcuts, leftCollapsedControl, leftContentClassName, rightContentClassName, centerHeaderVisibility, className, }: WorkspaceLayoutProps): React$1.JSX.Element;
|
|
103
109
|
|
|
104
110
|
type WorkspacePaneHeaderProps = HTMLAttributes<HTMLDivElement>;
|
|
105
111
|
/**
|
package/dist/workspace.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox-ui",
|
|
3
|
-
"version": "0.113.
|
|
3
|
+
"version": "0.113.4",
|
|
4
4
|
"description": "Unified UI component library for Tangle Sandbox — primitives, chat, dashboard, terminal, editor, and workspace components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -205,11 +205,11 @@
|
|
|
205
205
|
"@testing-library/jest-dom": "^7.0.0",
|
|
206
206
|
"@testing-library/react": "^16.3.2",
|
|
207
207
|
"@testing-library/user-event": "^14.6.1",
|
|
208
|
-
"@tiptap/core": "^3.
|
|
209
|
-
"@tiptap/extension-collaboration": "^3.
|
|
210
|
-
"@tiptap/extension-collaboration-caret": "^3.
|
|
211
|
-
"@tiptap/react": "^3.
|
|
212
|
-
"@tiptap/starter-kit": "^3.
|
|
208
|
+
"@tiptap/core": "^3.30.4",
|
|
209
|
+
"@tiptap/extension-collaboration": "^3.30.4",
|
|
210
|
+
"@tiptap/extension-collaboration-caret": "^3.30.4",
|
|
211
|
+
"@tiptap/react": "^3.30.4",
|
|
212
|
+
"@tiptap/starter-kit": "^3.30.4",
|
|
213
213
|
"@tiptap/y-tiptap": "^3.0.7",
|
|
214
214
|
"@types/react": "^19.2.17",
|
|
215
215
|
"@types/react-dom": "^19.1.2",
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
"@xyflow/react": "^12.11.2",
|
|
221
221
|
"jsdom": "^29.1.1",
|
|
222
222
|
"playwright": "^1.62.1",
|
|
223
|
-
"postcss": "^8.5.
|
|
223
|
+
"postcss": "^8.5.23",
|
|
224
224
|
"postcss-import": "^16.1.1",
|
|
225
225
|
"react": "^19.2.8",
|
|
226
226
|
"react-dom": "^19.2.8",
|