@tangle-network/sandbox-ui 1.1.8 → 2.0.0

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 (39) hide show
  1. package/README.md +1 -1
  2. package/dist/{AgentGraph-DxAeQQch.d.ts → AgentGraph-B4uWLXlD.d.ts} +12 -17
  3. package/dist/AgentGraph-C1DsA-Rd.js +1369 -0
  4. package/dist/{AgentGraphCanvas-CMdOlSlh.js → AgentGraphCanvas-Bcxq-e6E.js} +557 -383
  5. package/dist/{WorkflowGraph-DZ3xejKE.js → WorkflowGraph-BDjc7V_U.js} +3 -2
  6. package/dist/canvas-theme-DGd0fm1H.js +58 -0
  7. package/dist/{chat-4OZD23RA.js → chat-BrlLa4rg.js} +2 -2
  8. package/dist/chat.d.ts +2 -2
  9. package/dist/chat.js +1 -1
  10. package/dist/{dashboard-ClKA3opr.js → dashboard-FMrtIe9S.js} +3 -3
  11. package/dist/dashboard.js +1 -1
  12. package/dist/globals.css +2366 -1801
  13. package/dist/{index-ucJHuuVZ.d.ts → index-5zOVKgDT.d.ts} +2 -2
  14. package/dist/index-BK8KKLNY.d.ts +26 -0
  15. package/dist/{index-72uBu5lu.d.ts → index-D9-IiEpQ.d.ts} +21 -6
  16. package/dist/index.d.ts +5 -6
  17. package/dist/index.js +8 -291
  18. package/dist/integrations.d.ts +2 -1
  19. package/dist/integrations.js +6 -1
  20. package/dist/latest-events-B34ElSTE.js +190 -0
  21. package/dist/{AgentGraph-DJEQrKTs.js → node-ui-Bfnh08U3.js} +40 -1194
  22. package/dist/primitives-CCdx5Hh_.js +23 -0
  23. package/dist/primitives.d.ts +2 -3
  24. package/dist/primitives.js +1 -2
  25. package/dist/{run-Qern6muT.js → run-BqpdpP1K.js} +161 -60
  26. package/dist/run.d.ts +2 -2
  27. package/dist/run.js +3 -1
  28. package/dist/styles.css +2366 -1801
  29. package/dist/tailwind.css +74 -60
  30. package/dist/tokens.css +452 -851
  31. package/dist/{workbench-DOgYO3Zg.js → workbench-BVnZNhP2.js} +1 -1
  32. package/dist/workbench.js +1 -1
  33. package/dist/workflows.d.ts +3 -7
  34. package/dist/workflows.js +2 -1
  35. package/package.json +11 -10
  36. package/dist/elk-loader-Dl9S7jQk.js +0 -12
  37. package/dist/index-BAEvGqrn.d.ts +0 -26
  38. package/dist/primitives-CiwDp4-0.js +0 -32
  39. package/dist/rolldown-runtime-782esTHO.js +0 -26
package/dist/tailwind.css CHANGED
@@ -14,29 +14,17 @@
14
14
  *
15
15
  * The same file is the source of the precompiled `./styles` bundle:
16
16
  * src/styles/globals.css wraps it with `@import "tailwindcss"` and this repo's
17
- * own source globs. Edit runtime CSS here, never in globals.css. */
17
+ * own source globs. Authored Sandbox rules belong in globals.css; the style
18
+ * build also includes those rules in the published Tailwind source entry. */
18
19
 
19
- /* Fonts are loaded by the consumer, not this library. See README
20
- * "Fonts" for the list of font families sandbox-ui references
21
- * (Geist, Geist Mono, Outfit, Manrope, Inter) and the recommended
22
- * loading strategies (@fontsource packages or an HTML <link>).
23
- *
24
- * Historical note: previous versions shipped
25
- * @import url("https://fonts.googleapis.com/css2?family=Geist...")
26
- * at the top of this file. That pattern broke in downstream apps that
27
- * used CSS chain `@import`s — once the dist CSS is inlined after any
28
- * rule, the URL @import is no longer at the top of the merged
29
- * stylesheet and the CSS spec disallows it (PostCSS rejects the
30
- * build). Shipping fonts as a library concern is also undesirable
31
- * for privacy (third-party Google Fonts request) and network-failure
32
- * reasons. Consumers own font loading now. */
33
-
34
- @import "@tangle-network/brand/styles/tokens.css";
20
+ /* Brand defaults sit below the host's theme refinements. Font loading stays
21
+ * with the consumer; this entry makes no remote requests. */
22
+ @import "@tangle-network/brand/styles/tokens.css" layer(theme.brand);
35
23
  /* Brand's named themes (`data-theme="<name>"`). They re-skin the surface ladder
36
24
  * and nothing else — the Tangle accent stays put. Imported here so a consuming
37
25
  * app opting into one resolves it through the single composed entry point,
38
26
  * rather than reaching into brand for a second stylesheet. */
39
- @import "@tangle-network/brand/styles/named-themes.css";
27
+ @import "@tangle-network/brand/styles/named-themes.css" layer(theme.brand);
40
28
 
41
29
  /* Canonical font, radius and semantic-color utility registrations, imported as
42
30
  * DEFAULT theme values. A default registration still emits every Brand utility,
@@ -893,49 +881,75 @@
893
881
  border-left: 1px solid var(--border-subtle);
894
882
  }
895
883
 
896
- /* AgentGraph live cards, scoped under `.ag-live` on the package theme tokens. Type 11/12/13/14 px, 4 px grid. */
884
+ .agent-graph { container-type: inline-size; }
897
885
  .ag-live { --ag-fg: hsl(var(--foreground)); --ag-muted: hsl(var(--muted-foreground)); --ag-surface: hsl(var(--card)); --ag-border: hsl(var(--border)); }
898
- .ag-live .ag-live-card { position: relative; display: flex; flex-direction: column; gap: 8px; width: 100%; height: 100%; padding: 12px; border: 1px solid var(--ag-border);
899
- border-radius: 14px; background: var(--ag-surface); color: var(--ag-fg); cursor: pointer; overflow: hidden; animation: ag-live-grow 420ms cubic-bezier(.2,.8,.2,1) both; transform-origin: 50% 0;
900
- transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms cubic-bezier(.2,.8,.2,1); }
901
- .ag-live .ag-live-card:hover { transform: translateY(-1px); }
902
- /* A running agent's card carries a thin travelling sheen along its top edge: work in progress without a glowing border. */
903
- .ag-live .ag-live-card[data-status="running"]::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px;
904
- background: linear-gradient(90deg, transparent, var(--ag-status), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: ag-live-sheen 2.4s ease-in-out infinite; }
905
- .ag-live .ag-live-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
906
- .ag-live .ag-live-names { display: flex; flex-direction: column; min-width: 0; flex: 1; }
907
- .ag-live .ag-live-name { font-size: 14px; line-height: 18px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
908
- .ag-live .ag-live-meta, .ag-live .ag-live-stats { font-size: 11px; line-height: 14px; color: var(--ag-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
909
- .ag-live .ag-live-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-variant-numeric: tabular-nums; flex: none; }
910
- .ag-live .ag-live-pill { display: inline-flex; align-items: center; gap: 4px; height: 16px; padding: 0 6px; border-radius: 8px; font-weight: 600; color: var(--ag-status);
911
- background: color-mix(in oklab, var(--ag-status) 14%, transparent); }
912
- .ag-live .ag-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ag-status); }
913
- .ag-live [data-status="running"] .ag-live-dot { animation: ag-live-breathe 1.6s ease-in-out infinite; }
914
- .ag-live .ag-live-thinking { flex: none; margin: 0; font-size: 13px; line-height: 17px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; animation: ag-live-in 260ms ease-out both; }
915
- .ag-live .ag-live-quiet { color: var(--ag-muted); }
916
- .ag-live .ag-live-failure { color: var(--ag-status); }
917
- .ag-live .ag-live-events { margin: auto 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
918
- .ag-live .ag-live-events li { display: flex; align-items: center; gap: 6px; height: 16px; font: 11px/16px var(--font-mono, ui-monospace, monospace); color: var(--ag-muted);
919
- animation: ag-live-in 260ms cubic-bezier(.2,.8,.2,1) both; }
920
- .ag-live .ag-live-events li svg { flex: none; opacity: .8; }
921
- /* Older lines fade back so the newest reads first, as a log tail does. */
922
- .ag-live .ag-live-events li:nth-last-child(3) { opacity: .55; }
923
- .ag-live .ag-live-events li:nth-last-child(2) { opacity: .8; }
924
- .ag-live .ag-live-events li:last-child { color: var(--ag-fg); animation: ag-live-in 260ms cubic-bezier(.2,.8,.2,1) both, ag-live-flash 1.2s ease-out both; }
925
- .ag-live .ag-live-event-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
926
- .ag-live .ag-live-event-at { flex: none; font-family: inherit; color: var(--ag-muted); font-variant-numeric: tabular-nums; }
927
- .ag-live .ag-live-slot { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
928
- .ag-live .ag-live-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; height: 32px; padding: 0 12px; border: 1px solid var(--ag-border); border-radius: 16px;
929
- background: var(--ag-surface); color: var(--ag-muted); font-size: 12px; cursor: pointer; animation: ag-live-settle 320ms cubic-bezier(.2,.8,.2,1) both; }
930
- .ag-live .ag-live-chip-name { color: var(--ag-fg); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
931
- .ag-live .ag-live-chip-result { color: var(--ag-fg); font-weight: 500; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
932
- @keyframes ag-live-sheen { from { background-position: -40% 0; } to { background-position: 140% 0; } }
933
- @keyframes ag-live-breathe { 50% { opacity: .35; transform: scale(.8); } }
934
- @keyframes ag-live-flash { from { background: color-mix(in oklab, var(--ag-status) 16%, transparent); } to { background: transparent; } }
935
- @keyframes ag-live-grow { from { opacity: 0; transform: scale(.92) translateY(-8px); } }
936
- @keyframes ag-live-in { from { opacity: 0; transform: translateY(6px); } }
937
- @keyframes ag-live-settle { from { opacity: 1; transform: scale(1.08); } }
938
- @media (prefers-reduced-motion: reduce) { .ag-live *, .ag-live *::before { animation: none !important; } .ag-live .ag-live-card:hover { transform: none; } }
886
+ .ag-live-slot { display: flex; align-items: center; width: 100%; height: 100%; }
887
+ .ag-live-card { position: relative; display: flex; flex-direction: column; gap: 4px; box-sizing: border-box; width: 100%; height: 100%; padding: 10px; border: 1px solid var(--ag-border);
888
+ border-radius: var(--radius-card); animation: agent-arrive var(--motion-arrive) both; background: var(--ag-surface); color: var(--ag-fg); overflow: hidden;
889
+ transition: height var(--motion-surface), border-radius var(--motion-surface), border-color var(--motion-control), box-shadow var(--motion-control); }
890
+ .ag-live-head { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; column-gap: 8px; min-width: 0; }
891
+ .ag-live-head > :first-child { grid-column: 1; grid-row: 1 / 3; }
892
+ .ag-live-names, .ag-live-stats { display: contents; }
893
+ .ag-live-name { grid-column: 2; grid-row: 1; font-size: 14px; line-height: 18px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
894
+ .ag-live-meta, .ag-live-stats { font-size: 12px; line-height: 16px; color: var(--ag-muted); }
895
+ .ag-live-meta { grid-column: 2 / -1; grid-row: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
896
+ .ag-live-accounting { grid-column: 2 / -1; grid-row: 3; font-variant-numeric: tabular-nums; }
897
+ .ag-live-pill { grid-column: 3; grid-row: 1; justify-self: end; display: inline-flex; align-items: center; gap: 4px; color: var(--ag-status); }
898
+ .ag-running-dot { display: inline-block; flex: none; width: 6px; height: 6px; border-radius: var(--radius-pill); background: var(--surface-info-text); }
899
+ [data-activity="quiet"] .ag-running-dot { background: var(--surface-warning-text); animation: none !important; }
900
+ .ag-live-thinking-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
901
+ .ag-live-thinking { flex: 1; min-width: 0; margin: 0; font-size: 13px; line-height: 17px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
902
+ .ag-live-failure { color: var(--surface-danger-text); }
903
+ .ag-live-quiet { color: var(--surface-warning-text); font-size: 12px; line-height: 16px; }
904
+ .ag-live-inspect { border: 0; padding: 0; background: transparent; font: inherit; cursor: pointer; }
905
+ .ag-live-inspect > span:last-child { text-decoration: underline; }
906
+ .ag-live-respond { height: 28px; min-height: 28px; flex: none; border: 1px solid currentColor; border-radius: var(--radius-control); padding: 0 8px; color: var(--surface-warning-text); background: transparent; cursor: pointer; }
907
+ .ag-live-events-clip { margin-top: auto; height: 48px; min-height: 48px; overflow: hidden; }
908
+ .ag-live-events { margin: 0; padding: 0; list-style: none; min-height: 64px; display: flex; flex-direction: column; justify-content: flex-end; transform: translateY(-16px); }
909
+ .ag-live-events li { display: flex; align-items: center; gap: 6px; min-height: 16px; font: 11px/16px var(--font-mono, monospace); color: var(--ag-muted); transition: color var(--motion-stream); }
910
+ .ag-live-events li svg { flex: none; width: 12px; height: 12px; }
911
+ .ag-live-events li:last-child { color: var(--ag-fg); }
912
+ .ag-live-event-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
913
+ .ag-live-event-at { flex: none; min-width: 3ch; text-align: right; font-variant-numeric: tabular-nums; }
914
+ .ag-live-chip { height: 40px; flex-direction: row; align-items: center; gap: 8px; border-radius: var(--radius-pill); opacity: 1; }
915
+ .ag-live-chip .ag-live-head { display: flex; flex: none; max-width: 45%; }
916
+ .ag-live-chip .ag-live-names { display: flex; min-width: 0; }
917
+ .ag-live-chip .ag-live-stats, .ag-live-chip .ag-live-head > :first-child { display: none; }
918
+ .ag-live-chip-result { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 16px; font-weight: 500; }
919
+ .ag-phone-list { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 8px; list-style: none; }
920
+ .ag-phone-list > li { min-width: 0; padding-left: min(calc(var(--depth) * 16px), 32px); border-left: 1px solid var(--ag-border); }
921
+ .ag-phone-select { width: 100%; height: 100%; text-align: left; background: transparent; padding: 0; border: 0; color: inherit; cursor: pointer; }
922
+ .agent-graph .react-flow__node-liveAgent:focus-visible .ag-live-card, .agent-graph .react-flow__node-agent:focus-visible > div, .ag-phone-select:focus-visible { outline: 2px solid hsl(var(--foreground) / .7); outline-offset: 2px; }
923
+ @media (prefers-reduced-motion: reduce) { .ag-live-card { animation: none; transition: opacity var(--duration-fast); } }
924
+ @container (width < 600px) {
925
+ .ag-live-card { height: auto; min-height: 164px; }
926
+ .ag-live-card[data-sparse="true"] { min-height: 88px; }
927
+ .ag-phone-select .ag-agent-card { height: auto; min-height: 88px; }
928
+ .ag-caption-target { display: none; }
929
+ .ag-live-card.ag-live-chip { min-height: 40px; height: 40px; }
930
+ }
931
+ .ag-live-accounting { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
932
+ .ag-live-chip-status { flex: none; font-size: 12px; color: var(--ag-status); }
933
+ .ag-live-chip-cost { flex: none; font-size: 12px; color: var(--ag-muted); font-variant-numeric: tabular-nums; }
934
+ .ag-parent-label { color: var(--ag-muted); font-size: 12px; font-weight: 400; }
935
+ .ag-agent-card[data-status="needs-you"] p { -webkit-line-clamp: 1; }
936
+ .ag-status-button { display: inline-flex; align-items: center; min-width: 0; gap: 6px; }
937
+ .ag-caption-target { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
938
+ .ag-latest { flex: none; min-width: 0; border-bottom: 1px solid hsl(var(--border)); padding: 8px 12px; color: hsl(var(--foreground)); font-size: 12px; line-height: 16px; }
939
+ .ag-latest header { display: flex; align-items: center; min-height: 24px; gap: 8px; }
940
+ .ag-latest header > span { color: hsl(var(--muted-foreground)); }
941
+ .ag-latest header > button { margin-left: auto; padding: 0; border: 0; background: transparent; text-decoration: underline; font: inherit; color: inherit; cursor: pointer; }
942
+ .ag-latest ol { list-style: none; margin: 0; padding: 0; overflow: auto; }
943
+ .ag-latest li { height: 28px; }
944
+ .ag-latest li > button { display: flex; align-items: center; gap: 6px; width: 100%; height: 28px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
945
+ .ag-latest li > button:disabled { cursor: default; }
946
+ .ag-latest strong { font-weight: 600; }
947
+ .ag-latest li strong { flex: none; max-width: 22%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
948
+ .ag-latest-dot { box-sizing: border-box; width: 8px; height: 8px; flex: none; border-radius: var(--radius-pill); }
949
+ .ag-latest-state { display: inline-flex; align-items: center; gap: 4px; flex: none; }
950
+ .ag-latest-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 11px/16px var(--font-mono, monospace); }
951
+ .ag-latest time { flex: none; color: hsl(var(--muted-foreground)); font: 11px/16px var(--font-mono, monospace); font-variant-numeric: tabular-nums; }
952
+ .ag-latest-empty { display: flex; align-items: center; color: hsl(var(--muted-foreground)); }
939
953
 
940
954
  /* Published sources: this package's dist and its @tangle-network/ui peer. */
941
955
  @source "./**/*.js";