@tangle-network/sandbox-ui 0.13.0 → 0.15.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.
Files changed (106) hide show
  1. package/dist/auth.d.ts +1 -74
  2. package/dist/auth.js +1 -4
  3. package/dist/chat.d.ts +1 -136
  4. package/dist/chat.js +2 -15
  5. package/dist/chunk-2BUPSB7O.js +0 -0
  6. package/dist/chunk-3J6FG3FJ.js +18 -0
  7. package/dist/chunk-76IQLPW2.js +206 -0
  8. package/dist/chunk-7ZA5SEK3.js +239 -0
  9. package/dist/{chunk-ESVYBDGA.js → chunk-AG7QDC2Q.js} +182 -2
  10. package/dist/chunk-AHBZCBDO.js +2960 -0
  11. package/dist/chunk-AZ3AWMTM.js +8 -0
  12. package/dist/chunk-CMY7W45U.js +380 -0
  13. package/dist/{chunk-QMU2PWOU.js → chunk-DNZ4DTNA.js} +71 -17
  14. package/dist/chunk-EI44GEQ5.js +6 -0
  15. package/dist/{chunk-5OQ27N57.js → chunk-GPT7VKK6.js} +34 -38
  16. package/dist/chunk-JBGKGLD7.js +16 -0
  17. package/dist/chunk-NJNME4J4.js +14 -0
  18. package/dist/chunk-QPAJR74X.js +20 -0
  19. package/dist/chunk-TK46XFLM.js +28 -0
  20. package/dist/chunk-WID73FPH.js +89 -0
  21. package/dist/chunk-YVXK4XRO.js +30 -0
  22. package/dist/dashboard.d.ts +538 -4
  23. package/dist/dashboard.js +15 -886
  24. package/dist/editor.d.ts +1 -120
  25. package/dist/editor.js +1 -5
  26. package/dist/files.d.ts +1 -129
  27. package/dist/files.js +2 -7
  28. package/dist/globals.css +5 -1265
  29. package/dist/hooks.d.ts +114 -11
  30. package/dist/hooks.js +17 -88
  31. package/dist/index.d.ts +24 -99
  32. package/dist/index.js +247 -252
  33. package/dist/markdown.d.ts +1 -29
  34. package/dist/markdown.js +2 -2
  35. package/dist/openui.d.ts +8 -115
  36. package/dist/openui.js +1 -6
  37. package/dist/pages.d.ts +1 -2
  38. package/dist/pages.js +68 -66
  39. package/dist/primitives.d.ts +14 -49
  40. package/dist/primitives.js +69 -77
  41. package/dist/run.d.ts +1 -14
  42. package/dist/run.js +2 -22
  43. package/dist/sdk-hooks.d.ts +3 -283
  44. package/dist/sdk-hooks.js +10 -14
  45. package/dist/stores.d.ts +2 -14
  46. package/dist/stores.js +11 -39
  47. package/dist/styles.css +5 -1265
  48. package/dist/{usage-chart-CPTcNlGs.d.ts → template-card-UhV3pmRC.d.ts} +16 -1
  49. package/dist/terminal.js +39 -2
  50. package/dist/types.d.ts +11 -8
  51. package/dist/types.js +1 -0
  52. package/dist/utils.d.ts +1 -44
  53. package/dist/utils.js +6 -12
  54. package/dist/workspace.d.ts +5 -10
  55. package/dist/workspace.js +3 -19
  56. package/package.json +23 -54
  57. package/dist/active-sessions-store-CeOmXgv5.d.ts +0 -85
  58. package/dist/artifact-pane-Bh45Ssco.d.ts +0 -24
  59. package/dist/branding-DCi5VEik.d.ts +0 -13
  60. package/dist/button-CMQuQEW_.d.ts +0 -17
  61. package/dist/chat-container-f4yEs6KN.d.ts +0 -106
  62. package/dist/chunk-34A66VBG.js +0 -214
  63. package/dist/chunk-34I7UFSX.js +0 -92
  64. package/dist/chunk-36QY2W5G.js +0 -802
  65. package/dist/chunk-4CLN43XT.js +0 -45
  66. package/dist/chunk-54SQQMMM.js +0 -156
  67. package/dist/chunk-66EZOYZR.js +0 -102
  68. package/dist/chunk-BX6AQMUS.js +0 -183
  69. package/dist/chunk-DI3NZ5ZX.js +0 -192
  70. package/dist/chunk-DPGIXDAI.js +0 -220
  71. package/dist/chunk-DXMIEK4K.js +0 -1426
  72. package/dist/chunk-GSZA3TSY.js +0 -79
  73. package/dist/chunk-HB5Y37YU.js +0 -54
  74. package/dist/chunk-LQNEZDRM.js +0 -109
  75. package/dist/chunk-MA7YKRUP.js +0 -131
  76. package/dist/chunk-MKTSMWVD.js +0 -109
  77. package/dist/chunk-MQXABZTB.js +0 -1348
  78. package/dist/chunk-MT5FJ3ZT.js +0 -186
  79. package/dist/chunk-NKUPJC34.js +0 -2070
  80. package/dist/chunk-OEX7NZE3.js +0 -321
  81. package/dist/chunk-OKLQVY3Y.js +0 -139
  82. package/dist/chunk-Q56BYXQF.js +0 -61
  83. package/dist/chunk-QD4QE5P5.js +0 -40
  84. package/dist/chunk-QDH5GEGY.js +0 -630
  85. package/dist/chunk-QID2OOMG.js +0 -133
  86. package/dist/chunk-RQHJBTEU.js +0 -10
  87. package/dist/chunk-T7HMZEVO.js +0 -216
  88. package/dist/chunk-U6QTHMY6.js +0 -1290
  89. package/dist/chunk-US6JKJKH.js +0 -124
  90. package/dist/chunk-VX3XOUEB.js +0 -63
  91. package/dist/chunk-XLG757B6.js +0 -933
  92. package/dist/chunk-ZMNSRDMH.js +0 -127
  93. package/dist/chunk-ZNCEM5CD.js +0 -316
  94. package/dist/document-editor-pane-A70-EhdQ.d.ts +0 -124
  95. package/dist/document-editor-pane-TLPVRBBU.js +0 -11
  96. package/dist/expanded-tool-detail-Dh99mcbY.d.ts +0 -63
  97. package/dist/file-tabs-BLfxfmAH.d.ts +0 -51
  98. package/dist/parts-CyGkM6Fp.d.ts +0 -50
  99. package/dist/run-CtFZ6s-D.d.ts +0 -41
  100. package/dist/sidebar-drop-zone-tDBsuOH5.d.ts +0 -301
  101. package/dist/sidecar-CFU2W9j1.d.ts +0 -8
  102. package/dist/template-card-BAtvcAkU.d.ts +0 -18
  103. package/dist/tool-call-feed-Bs3MyQMT.d.ts +0 -68
  104. package/dist/tool-display-Ct9nFAzJ.d.ts +0 -32
  105. package/dist/use-sandbox-metrics-B64diPqN.d.ts +0 -141
  106. package/dist/variant-list-BrHYcBCk.d.ts +0 -540
package/dist/editor.d.ts CHANGED
@@ -1,120 +1 @@
1
- import { C as Collaborator, a as ConnectionState } from './document-editor-pane-A70-EhdQ.js';
2
- export { D as DocumentEditorBackend, b as DocumentEditorMode, c as DocumentEditorPane, d as DocumentEditorPaneCollaborationConfig, e as DocumentEditorPaneProps, E as EditorContextValue, f as EditorProvider, g as EditorProviderProps, i as EditorTokenRefreshResult, h as EditorUser, u as useEditorContext } from './document-editor-pane-A70-EhdQ.js';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { Editor } from '@tiptap/react';
5
- import { HocuspocusProvider } from '@hocuspocus/provider';
6
- import 'react';
7
- import './artifact-pane-Bh45Ssco.js';
8
- import 'yjs';
9
-
10
- /**
11
- * Editor toolbar component.
12
- * Provides basic formatting controls.
13
- */
14
- declare function EditorToolbar({ editor, className, }: {
15
- editor: Editor | null;
16
- className?: string;
17
- }): react_jsx_runtime.JSX.Element | null;
18
-
19
- /**
20
- * Props for TiptapEditor component.
21
- */
22
- interface TiptapEditorProps {
23
- /** Initial content for new documents (markdown string) */
24
- initialContent?: string;
25
- /** Placeholder text when editor is empty */
26
- placeholder?: string;
27
- /** Whether the editor is read-only */
28
- readOnly?: boolean;
29
- /** Whether to auto-focus on mount */
30
- autoFocus?: boolean;
31
- /** Custom className for the editor wrapper */
32
- className?: string;
33
- /** Custom className for the editor content area */
34
- contentClassName?: string;
35
- /** Callback when content changes */
36
- onUpdate?: (editor: Editor) => void;
37
- /** Callback when selection changes */
38
- onSelectionUpdate?: (editor: Editor) => void;
39
- /** Callback when editor is ready */
40
- onReady?: (editor: Editor) => void;
41
- }
42
- /**
43
- * TiptapEditor - Collaborative markdown editor with Y.js sync.
44
- * Must be used within an EditorProvider.
45
- */
46
- declare function TiptapEditor({ initialContent, placeholder, readOnly, autoFocus, className, contentClassName, onUpdate, onSelectionUpdate, onReady, }: TiptapEditorProps): react_jsx_runtime.JSX.Element;
47
- /**
48
- * Collaborators list component.
49
- * Shows active users in the document.
50
- */
51
- declare function CollaboratorsList({ collaborators, className, }: {
52
- collaborators: Collaborator[];
53
- className?: string;
54
- }): react_jsx_runtime.JSX.Element | null;
55
-
56
- /**
57
- * Hook to get the current connection state and helpers.
58
- */
59
- declare function useEditorConnection(): {
60
- /** Current connection state string */
61
- state: ConnectionState;
62
- /** Whether connected to the server (connected or synced) */
63
- isConnected: boolean;
64
- /** Whether currently attempting to connect */
65
- isConnecting: boolean;
66
- /** Whether disconnected from the server */
67
- isDisconnected: boolean;
68
- /** Whether the document is synced with the server */
69
- isSynced: boolean;
70
- /** Connect to the collaboration server */
71
- connect: () => void;
72
- /** Disconnect from the collaboration server */
73
- disconnect: () => void;
74
- };
75
- /**
76
- * Hook to get the list of active collaborators.
77
- */
78
- declare function useCollaborators(): {
79
- /** List of active collaborators (excluding self) */
80
- collaborators: Collaborator[];
81
- /** Number of other collaborators */
82
- count: number;
83
- /** Whether there are other collaborators present */
84
- hasOthers: boolean;
85
- };
86
- /**
87
- * Hook to track a specific collaborator's presence.
88
- */
89
- declare function useCollaboratorPresence(userId: string): Collaborator | null;
90
- /**
91
- * Hook to sync local state with the Y.Doc.
92
- * Useful for persisting editor metadata.
93
- */
94
- declare function useYjsState<T>(key: string, initialValue: T): [T, (value: T) => void];
95
- /**
96
- * Hook to track document changes.
97
- * Returns true if there are unsaved changes since the last save.
98
- */
99
- declare function useDocumentChanges(onSave?: () => Promise<void>): {
100
- /** Whether there are unsaved changes */
101
- isDirty: boolean;
102
- /** Whether save is in progress */
103
- isSaving: boolean;
104
- /** When the document was last saved */
105
- lastSaved: Date | null;
106
- /** Save the document */
107
- save: () => Promise<void>;
108
- };
109
- /**
110
- * Hook to get awareness state for presence features.
111
- * Provides lower-level access to the Hocuspocus awareness.
112
- */
113
- declare function useAwareness(): {
114
- localState: Record<string, unknown>;
115
- setLocalState: (state: Record<string, unknown>) => void;
116
- setLocalStateField: (field: string, value: unknown) => void;
117
- awareness: HocuspocusProvider["awareness"] | undefined;
118
- };
119
-
120
- export { Collaborator, CollaboratorsList, ConnectionState, EditorToolbar, TiptapEditor, type TiptapEditorProps, useAwareness, useCollaboratorPresence, useCollaborators, useDocumentChanges, useEditorConnection, useYjsState };
1
+ export { Collaborator, CollaboratorsList, ConnectionState, DocumentEditorBackend, DocumentEditorMode, DocumentEditorPane, DocumentEditorPaneCollaborationConfig, DocumentEditorPaneProps, EditorContextValue, EditorProvider, EditorProviderProps, EditorTokenRefreshResult, EditorToolbar, EditorUser, TiptapEditor, TiptapEditorProps, useAwareness, useCollaboratorPresence, useCollaborators, useDocumentChanges, useEditorConnection, useEditorContext, useYjsState } from '@tangle-network/ui/editor';
package/dist/editor.js CHANGED
@@ -11,11 +11,7 @@ import {
11
11
  useEditorConnection,
12
12
  useEditorContext,
13
13
  useYjsState
14
- } from "./chunk-U6QTHMY6.js";
15
- import "./chunk-Q56BYXQF.js";
16
- import "./chunk-HB5Y37YU.js";
17
- import "./chunk-T7HMZEVO.js";
18
- import "./chunk-RQHJBTEU.js";
14
+ } from "./chunk-YVXK4XRO.js";
19
15
  export {
20
16
  CollaboratorsList,
21
17
  DocumentEditorPane,
package/dist/files.d.ts CHANGED
@@ -1,129 +1 @@
1
- import { F as FileNode, a as FileTabData } from './file-tabs-BLfxfmAH.js';
2
- export { b as FileTabs, c as FileTabsProps, d as FileTree, e as FileTreeProps, f as FileTreeVisibilityOptions, g as filterFileTree } from './file-tabs-BLfxfmAH.js';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { GitStatusEntry, ContextMenuItem, ContextMenuOpenContext, GitStatus } from '@pierre/trees';
5
- import { ReactNode, CSSProperties } from 'react';
6
- import { b as DocumentEditorMode, D as DocumentEditorBackend, d as DocumentEditorPaneCollaborationConfig } from './document-editor-pane-A70-EhdQ.js';
7
- import { A as ArtifactPaneProps } from './artifact-pane-Bh45Ssco.js';
8
- import '@hocuspocus/provider';
9
- import 'yjs';
10
-
11
- /**
12
- * Re-export Pierre's git-status union under a stable name so consumers
13
- * don't import directly from the dep. If we ever swap the underlying
14
- * implementation, only this file changes.
15
- */
16
- type RichFileTreeGitStatus = GitStatus;
17
- type RichFileTreeGitEntry = GitStatusEntry;
18
- interface RichFileTreeProps {
19
- /**
20
- * Either a recursive `FileNode` tree (matches the existing FileTree
21
- * input) or a flat list of canonical paths. Pass exactly one.
22
- */
23
- root?: FileNode;
24
- paths?: ReadonlyArray<string>;
25
- /** Currently-selected path. Pierre supports multi-select internally; the
26
- * wrapper exposes a single string for parity with FileTree. */
27
- selectedPath?: string;
28
- /** Called whenever the selection changes (single-select fan-out). */
29
- onSelect?: (path: string) => void;
30
- /** Show the inline search input. Defaults to true. */
31
- search?: boolean;
32
- /** Open / closed initial expansion. Defaults to "open" — match FileTree. */
33
- initialExpansion?: "open" | "closed";
34
- /** Optional git-status decorations per path. */
35
- gitStatus?: ReadonlyArray<RichFileTreeGitEntry>;
36
- /**
37
- * Right-click / button-lane menu content. Receives the row and the
38
- * trigger context (which interaction opened the menu).
39
- */
40
- renderContextMenu?: (item: ContextMenuItem, context: ContextMenuOpenContext) => ReactNode;
41
- /** Optional header rendered above the tree rows. */
42
- header?: ReactNode;
43
- /**
44
- * Theme override map for shadow-DOM CSS variables. Most consumers can
45
- * leave this — defaults derive from the host element's computed
46
- * tokens via `cssVarFromToken()`.
47
- */
48
- themeOverrides?: Partial<RichFileTreeThemeVars>;
49
- className?: string;
50
- style?: CSSProperties;
51
- /** Inline height (or set via `style.height`). Defaults to 100% of parent. */
52
- height?: number | string;
53
- }
54
- interface RichFileTreeThemeVars {
55
- /** Selected-row background. */
56
- selectedBg: string;
57
- /** Selected-row foreground. */
58
- selectedFg: string;
59
- /** Default row foreground. */
60
- fg: string;
61
- /** Hover background. */
62
- hoverBg: string;
63
- /** Border / divider color. */
64
- border: string;
65
- /** Muted (parent path, breadcrumb) foreground. */
66
- mutedFg: string;
67
- }
68
- declare function RichFileTree({ root, paths, selectedPath, onSelect, search, initialExpansion, gitStatus, renderContextMenu, header, themeOverrides, className, style, height, }: RichFileTreeProps): react_jsx_runtime.JSX.Element;
69
-
70
- /**
71
- * FilePreview — universal file renderer.
72
- *
73
- * Renders any file type beautifully:
74
- * - PDF: embedded viewer
75
- * - CSV/XLSX: tabular preview
76
- * - Code (py/json/yaml/ts/js): line-numbered viewer
77
- * - Markdown: rendered prose
78
- * - Images: inline display
79
- * - Text: monospace preview
80
- */
81
- interface FilePreviewProps {
82
- filename: string;
83
- content?: string;
84
- blobUrl?: string;
85
- mimeType?: string;
86
- onClose?: () => void;
87
- onDownload?: () => void;
88
- hideHeader?: boolean;
89
- className?: string;
90
- }
91
- declare function FilePreview({ filename, content, blobUrl, mimeType, onClose, onDownload, hideHeader, className, }: FilePreviewProps): react_jsx_runtime.JSX.Element;
92
-
93
- interface FileArtifactPaneEditorOptions {
94
- enabled?: boolean;
95
- mode?: DocumentEditorMode;
96
- defaultMode?: DocumentEditorMode;
97
- onModeChange?: (mode: DocumentEditorMode) => void;
98
- backend?: DocumentEditorBackend;
99
- collaboration?: DocumentEditorPaneCollaborationConfig;
100
- placeholder?: string;
101
- autoFocus?: boolean;
102
- readOnly?: boolean;
103
- saving?: boolean;
104
- saveLabel?: string;
105
- onChange?: (markdown: string) => void;
106
- onSave?: (markdown: string) => Promise<void> | void;
107
- previewClassName?: string;
108
- editorClassName?: string;
109
- }
110
- interface FileArtifactPaneProps extends Omit<FilePreviewProps, "className"> {
111
- path?: string;
112
- tabs?: FileTabData[];
113
- activeTabId?: string;
114
- onTabSelect?: (id: string) => void;
115
- onTabClose?: (id: string) => void;
116
- eyebrow?: ArtifactPaneProps["eyebrow"];
117
- meta?: ArtifactPaneProps["meta"];
118
- toolbar?: ArtifactPaneProps["toolbar"];
119
- footer?: ArtifactPaneProps["footer"];
120
- className?: string;
121
- editor?: FileArtifactPaneEditorOptions;
122
- }
123
- /**
124
- * FileArtifactPane — opinionated artifact frame for file previews with tabs and
125
- * header actions.
126
- */
127
- declare function FileArtifactPane({ filename, content, blobUrl, mimeType, onClose, onDownload, path, tabs, activeTabId, onTabSelect, onTabClose, eyebrow, meta, toolbar, footer, className, editor, }: FileArtifactPaneProps): react_jsx_runtime.JSX.Element;
128
-
129
- export { FileArtifactPane, type FileArtifactPaneProps, FileNode, FilePreview, type FilePreviewProps, FileTabData, RichFileTree, type RichFileTreeGitEntry, type RichFileTreeGitStatus, type RichFileTreeProps, type RichFileTreeThemeVars };
1
+ export { FileArtifactPane, FileArtifactPaneProps, FileNode, FilePreview, FilePreviewProps, FileTabData, FileTabs, FileTabsProps, FileTree, FileTreeProps, FileTreeVisibilityOptions, RichFileTree, RichFileTreeGitEntry, RichFileTreeGitStatus, RichFileTreeProps, RichFileTreeThemeVars, filterFileTree } from '@tangle-network/ui/files';
package/dist/files.js CHANGED
@@ -1,16 +1,11 @@
1
- import {
2
- RichFileTree
3
- } from "./chunk-LQNEZDRM.js";
4
1
  import {
5
2
  FileArtifactPane,
6
3
  FilePreview,
7
4
  FileTabs,
8
5
  FileTree,
6
+ RichFileTree,
9
7
  filterFileTree
10
- } from "./chunk-QDH5GEGY.js";
11
- import "./chunk-HB5Y37YU.js";
12
- import "./chunk-T7HMZEVO.js";
13
- import "./chunk-RQHJBTEU.js";
8
+ } from "./chunk-3J6FG3FJ.js";
14
9
  export {
15
10
  FileArtifactPane,
16
11
  FilePreview,