@tangle-network/sandbox-ui 7.0.4 → 7.0.5

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 (30) hide show
  1. package/README.md +2 -0
  2. package/dist/{AgentTree-Dzy6lrfP.js → AgentTree-B1iTTYNe.js} +1 -1
  3. package/dist/{use-follow-tail-Df965WQi.js → ConversationRowView-C4TXICBT.js} +2 -2
  4. package/dist/{ResearchReport-DKWDmzdK.js → ResearchReport-kYGwgHC7.js} +2 -2
  5. package/dist/globals.css +14 -0
  6. package/dist/{index-PolYo7h9.d.ts → index-CGHJonni.d.ts} +65 -2
  7. package/dist/index.d.ts +2 -2
  8. package/dist/index.js +7 -7
  9. package/dist/record/ResearchReport.js +1 -1
  10. package/dist/{record-Cc_WNtG8.js → record-Dmyq0jfl.js} +2 -2
  11. package/dist/record.js +1 -1
  12. package/dist/report-viewer.js +75 -75
  13. package/dist/run/live.js +1 -1
  14. package/dist/run/record.js +3 -3
  15. package/dist/run-CcyjQN7y.js +238 -0
  16. package/dist/run.d.ts +2 -2
  17. package/dist/run.js +6 -6
  18. package/dist/runtime-viewer/AgentGraphCanvas-P_PFS2Ko-XoCELgxL.js +563 -0
  19. package/dist/runtime-viewer/{latest-events-CMbdBLcT-uhVN4JLh.js → latest-events-wofY6ifW-4IMNEe7c.js} +576 -107
  20. package/dist/styles.css +14 -0
  21. package/dist/terminal.js +1 -1
  22. package/dist/{trace-workspace-EArXc0uP.js → trace-workspace-HCTpp-qw.js} +77 -37
  23. package/dist/{workbench-D0ALR40M.js → workbench-CugraIbl.js} +2 -1
  24. package/dist/workbench.js +1 -1
  25. package/dist/workspace-viewer.js +10510 -10366
  26. package/package.json +6 -4
  27. package/tests/visual/content-share.mjs +35 -0
  28. package/dist/run-CpJ_COuz.js +0 -5
  29. package/dist/runtime-viewer/AgentGraphCanvas-xHVW-YRV-Ch1fnK9k.js +0 -957
  30. /package/dist/{terminal-nUCznZRj.js → terminal-view-nUCznZRj.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox-ui",
3
- "version": "7.0.4",
3
+ "version": "7.0.5",
4
4
  "license": "MIT",
5
5
  "description": "Unified UI component library for Tangle Sandbox — primitives, chat, dashboard, terminal, editor, and workspace components",
6
6
  "repository": {
@@ -127,6 +127,7 @@
127
127
  "./globals.css": "./dist/globals.css",
128
128
  "./tokens.css": "./dist/tokens.css",
129
129
  "./tailwind.css": "./dist/tailwind.css",
130
+ "./content-share": "./tests/visual/content-share.mjs",
130
131
  "./tailwind": "./tailwind.config.cjs",
131
132
  "./run/record": {
132
133
  "import": "./dist/run/record.js",
@@ -149,7 +150,8 @@
149
150
  },
150
151
  "files": [
151
152
  "dist",
152
- "tailwind.config.cjs"
153
+ "tailwind.config.cjs",
154
+ "tests/visual/content-share.mjs"
153
155
  ],
154
156
  "peerDependencies": {
155
157
  "@drewstone/agent-record": "^2.0.0 || ^3.0.0",
@@ -157,7 +159,7 @@
157
159
  "@nanostores/react": ">=0.8.4 <2.0.0",
158
160
  "@tangle-network/agent-interface": "^1.0.0 || ^2.0.0 || ^3.0.0 || ^5.2.0",
159
161
  "@tangle-network/brand": "^1.31.3",
160
- "@tangle-network/charts": "^4.0.15",
162
+ "@tangle-network/charts": "^4.0.21",
161
163
  "@tangle-network/ui": "^11.51.12",
162
164
  "@tanstack/react-query": "^5.0.0",
163
165
  "@tiptap/core": ">=3.20.4 <4.0.0",
@@ -266,7 +268,7 @@
266
268
  "@tangle-network/agent-interface": "5.10.2",
267
269
  "@tangle-network/agent-runtime": "3.0.32",
268
270
  "@tangle-network/brand": "^1.31.3",
269
- "@tangle-network/charts": "^4.0.15",
271
+ "@tangle-network/charts": "^4.0.21",
270
272
  "@tangle-network/ui": "^11.51.12",
271
273
  "@tanstack/react-query": "^5.104.5",
272
274
  "@testing-library/dom": "^10.4.2",
@@ -0,0 +1,35 @@
1
+ /** Primary content owns the screen (Drew 11-04, 11-06): the open panel sits under one bar of at most 48 px, fills at
2
+ * least 85 % of the viewport, and above its first chart, table, canvas, grid, code or conversation sits at most one title
3
+ * and that chart's legend (112 px), never stacked page, section or filter headers. One measure for every app's proof;
4
+ * moved here from the Lab viewer (tangle-network/disco #3159) so the Lab page and disco.tangle.tools read the same rule. */
5
+ export const BAR_MAX = 48, SHARE_MIN = 0.85, INSET_MAX = 112
6
+
7
+ /** The open panel: a shown tab panel, or whatever the host marks `data-content-panel`. */
8
+ export const PANEL = '[role="tabpanel"]:not([hidden]), [data-content-panel]'
9
+ /** What counts as content: a drawing, a table, a log, an agent graph or grid, code, or a conversation (`data-primary-content`). */
10
+ export const CONTENT = 'svg, canvas, table, [role="log"], [role="tree"], .react-flow, .ag-grid, .sandbox-code-view, [data-primary-content]'
11
+
12
+ export const measureContentShare = (page, panel = PANEL, content = CONTENT) => page.evaluate(([panelSelector, contentSelector]) => {
13
+ const vh = innerHeight, vw = innerWidth
14
+ const panel = document.querySelector(panelSelector)
15
+ if (!panel) return { panel: null }
16
+ const box = panel.getBoundingClientRect()
17
+ const top = Math.max(0, box.top), bottom = Math.min(vh, box.bottom)
18
+ let first = null
19
+ for (const element of panel.querySelectorAll(contentSelector)) {
20
+ const rect = element.getBoundingClientRect()
21
+ if (rect.width < vw * 0.25 || rect.height < 40 || rect.bottom <= 0 || rect.top >= vh) continue
22
+ first = Math.min(first ?? Infinity, Math.max(0, rect.top))
23
+ }
24
+ return { panel: { top: Math.round(top), bottom: Math.round(bottom) }, share: +((bottom - top) / vh).toFixed(3), contentTop: first === null ? null : Math.round(first), viewport: [vw, vh] }
25
+ }, [panel, content])
26
+
27
+ export const contentShareFailures = (where, m) => {
28
+ if (!m.panel) return [`${where}: no open content panel`]
29
+ const failures = []
30
+ if (m.panel.top > BAR_MAX) failures.push(`${where}: ${m.panel.top} px of chrome above the panel (at most ${BAR_MAX})`)
31
+ if (m.share < SHARE_MIN) failures.push(`${where}: panel fills ${(m.share * 100).toFixed(1)}% of the viewport (at least ${SHARE_MIN * 100}%)`)
32
+ if (m.contentTop === null) failures.push(`${where}: no chart, table, canvas, grid, code or conversation at least a quarter of the viewport wide`)
33
+ else if (m.contentTop - m.panel.top > INSET_MAX) failures.push(`${where}: first content starts ${m.contentTop - m.panel.top} px into the panel (at most ${INSET_MAX})`)
34
+ return failures
35
+ }
@@ -1,5 +0,0 @@
1
- import "./trace-workspace-EArXc0uP.js";
2
- import "./record-Cc_WNtG8.js";
3
- import { ApprovalCard, ApprovalDiffSummary, ExpandedToolDetail, InlineThinkingItem, InlineToolItem, LiveDuration, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon as RunStatusIcon$1, TaskList, ToolCallFeed, isOpen, parseToolEvent, runStatus as runStatus$1, showsTaskPriority, statusMeta as statusMeta$1, taskProgress, taskStatus } from "@tangle-network/ui/run";
4
- import { LatestEvents } from "@tangle-network/charts/react/agent-graph";
5
- export { showsTaskPriority as _, InlineToolItem as a, taskStatus as b, RunPhaseList as c, RunStatusIcon$1 as d, TaskList as f, runStatus$1 as g, parseToolEvent as h, InlineThinkingItem as i, RunRowShell as l, isOpen as m, ApprovalDiffSummary as n, LiveDuration as o, ToolCallFeed as p, ExpandedToolDetail as r, RunGroup as s, ApprovalCard as t, RunRowStatusDot as u, statusMeta$1 as v, LatestEvents as x, taskProgress as y };