symbiote-ui 0.3.0-alpha.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/CHANGELOG.md +46 -0
- package/LICENSE +21 -0
- package/README.md +76 -0
- package/canvas/AutoLayout.js +731 -0
- package/canvas/Breadcrumb/Breadcrumb.css.js +75 -0
- package/canvas/Breadcrumb/Breadcrumb.js +96 -0
- package/canvas/Breadcrumb/Breadcrumb.tpl.js +7 -0
- package/canvas/CanvasConnectionRenderer.js +971 -0
- package/canvas/CanvasGraph/CanvasGraph.css.js +29 -0
- package/canvas/CanvasGraph/CanvasGraph.js +1697 -0
- package/canvas/CanvasGraph/CanvasGraphDrawState.js +280 -0
- package/canvas/CanvasGraph/CanvasGraphGeometry.js +194 -0
- package/canvas/CanvasViewport.js +550 -0
- package/canvas/ConnectionRenderer.js +1283 -0
- package/canvas/FlowSimulator.js +326 -0
- package/canvas/ForceLayout.js +226 -0
- package/canvas/ForceWorker.js +1303 -0
- package/canvas/FrameManager.js +223 -0
- package/canvas/GraphExplorerShell/GraphExplorerShell.css.js +136 -0
- package/canvas/GraphExplorerShell/GraphExplorerShell.js +129 -0
- package/canvas/GraphExplorerShell/GraphExplorerShell.tpl.js +12 -0
- package/canvas/GraphTabs/GraphTabs.css.js +101 -0
- package/canvas/GraphTabs/GraphTabs.js +189 -0
- package/canvas/GraphTabs/GraphTabs.tpl.js +12 -0
- package/canvas/LODManager.js +88 -0
- package/canvas/Minimap/Minimap.css.js +73 -0
- package/canvas/Minimap/Minimap.js +210 -0
- package/canvas/Minimap/Minimap.tpl.js +7 -0
- package/canvas/NodeCanvas/NodeCanvas.css.js +398 -0
- package/canvas/NodeCanvas/NodeCanvas.js +1499 -0
- package/canvas/NodeCanvas/NodeCanvas.tpl.js +22 -0
- package/canvas/NodeSearch/NodeSearch.css.js +97 -0
- package/canvas/NodeSearch/NodeSearch.js +140 -0
- package/canvas/NodeSearch/NodeSearch.tpl.js +25 -0
- package/canvas/NodeViewManager.js +748 -0
- package/canvas/PcbRouteDiagnostics.js +463 -0
- package/canvas/PcbRouter.js +1127 -0
- package/canvas/PinExpansion.js +134 -0
- package/canvas/PseudoConnection.js +84 -0
- package/canvas/SelectionSync.js +163 -0
- package/canvas/SubgraphManager.js +203 -0
- package/canvas/SubgraphRouter.js +452 -0
- package/canvas/ViewportActions.js +473 -0
- package/canvas/graph-explorer.js +339 -0
- package/canvas/graph-layout.js +148 -0
- package/canvas/graph-model.js +68 -0
- package/canvas/html-in-canvas.js +202 -0
- package/canvas/project-graph-builder.js +440 -0
- package/canvas/project-graph-model.js +183 -0
- package/chat/ChatComposer/ChatComposer.css.js +652 -0
- package/chat/ChatComposer/ChatComposer.js +304 -0
- package/chat/ChatList/ChatList.css.js +102 -0
- package/chat/ChatList/ChatList.js +99 -0
- package/chat/ChatList/ChatList.tpl.js +20 -0
- package/chat/ChatListItem/ChatListItem.css.js +117 -0
- package/chat/ChatListItem/ChatListItem.js +32 -0
- package/chat/ChatListItem/ChatListItem.tpl.js +17 -0
- package/chat/ChatMessageItem/ChatMessageItem.css.js +628 -0
- package/chat/ChatMessageItem/ChatMessageItem.js +156 -0
- package/chat/ChatSidebar/ChatSidebar.css.js +150 -0
- package/chat/ChatSidebar/ChatSidebar.js +230 -0
- package/chat/ChatSidebar/ChatSidebar.tpl.js +18 -0
- package/chat/ChatSidebar/constants.js +11 -0
- package/chat/ChatSidebarItem/ChatSidebarItem.css.js +445 -0
- package/chat/ChatSidebarItem/ChatSidebarItem.js +304 -0
- package/chat/ChatTranscript/ChatTranscript.css.js +90 -0
- package/chat/ChatTranscript/ChatTranscript.js +244 -0
- package/chat/chat-context.js +123 -0
- package/chat/message-model.js +156 -0
- package/cli.js +20 -0
- package/control/Button/Button.css.js +93 -0
- package/control/Button/Button.js +78 -0
- package/control/Button/Button.tpl.js +3 -0
- package/control/Field/Field.css.js +91 -0
- package/control/Field/Field.js +17 -0
- package/control/Field/Field.tpl.js +3 -0
- package/core/Connection.js +47 -0
- package/core/Editor.js +449 -0
- package/core/Frame.js +33 -0
- package/core/GraphMermaid.js +348 -0
- package/core/GraphText.js +228 -0
- package/core/Node.js +145 -0
- package/core/Portal.js +106 -0
- package/core/Socket.js +187 -0
- package/core/SubgraphNode.js +121 -0
- package/core/base-path.js +55 -0
- package/core/dom-utils.js +14 -0
- package/core/index.js +18 -0
- package/core/local-cache.js +26 -0
- package/core/state-sync.js +227 -0
- package/custom-elements.json +6380 -0
- package/discover.js +240 -0
- package/display/Badge/Badge.css.js +44 -0
- package/display/Badge/Badge.js +17 -0
- package/display/Badge/Badge.tpl.js +3 -0
- package/display/Banner/Banner.css.js +61 -0
- package/display/Banner/Banner.js +17 -0
- package/display/Banner/Banner.tpl.js +3 -0
- package/display/CodeBlock/CodeBlock.css.js +194 -0
- package/display/CodeBlock/CodeBlock.js +220 -0
- package/display/CodeBlock/CodeBlock.tpl.js +11 -0
- package/display/DataTable/DataTable.css.js +101 -0
- package/display/DataTable/DataTable.js +136 -0
- package/display/DataTable/DataTable.tpl.js +13 -0
- package/display/EmptyState/EmptyState.css.js +33 -0
- package/display/EmptyState/EmptyState.js +17 -0
- package/display/EmptyState/EmptyState.tpl.js +3 -0
- package/display/EventFeed/EventFeed.css.js +145 -0
- package/display/EventFeed/EventFeed.js +64 -0
- package/display/EventFeed/EventFeed.tpl.js +14 -0
- package/display/EventFeed/EventFeedItem.js +116 -0
- package/display/EventFeed/EventFeedItem.tpl.js +22 -0
- package/display/LoadingOverlay/LoadingOverlay.css.js +91 -0
- package/display/LoadingOverlay/LoadingOverlay.js +48 -0
- package/display/LoadingOverlay/LoadingOverlay.tpl.js +12 -0
- package/display/Metric/Metric.css.js +60 -0
- package/display/Metric/Metric.js +17 -0
- package/display/Metric/Metric.tpl.js +6 -0
- package/display/OutputGraphPreview/OutputGraphPreview.css.js +122 -0
- package/display/OutputGraphPreview/OutputGraphPreview.js +89 -0
- package/display/OutputGraphPreview/OutputGraphPreview.tpl.js +13 -0
- package/display/OutputListPreview/OutputListPreview.css.js +109 -0
- package/display/OutputListPreview/OutputListPreview.js +77 -0
- package/display/OutputListPreview/OutputListPreview.tpl.js +13 -0
- package/display/SourceEditor/SourceEditor.css.js +39 -0
- package/display/SourceEditor/SourceEditor.js +129 -0
- package/display/SourceEditor/SourceEditor.tpl.js +10 -0
- package/display/SourceViewer/SourceViewer.css.js +80 -0
- package/display/SourceViewer/SourceViewer.js +418 -0
- package/display/SourceViewer/SourceViewer.tpl.js +17 -0
- package/display/StatusRibbon/StatusRibbon.css.js +73 -0
- package/display/StatusRibbon/StatusRibbon.js +87 -0
- package/display/StatusRibbon/StatusRibbon.tpl.js +7 -0
- package/display/event-feed-adapter.js +72 -0
- package/display/format-utils.js +29 -0
- package/display/highlight.js +659 -0
- package/display/icons.js +37 -0
- package/display/markdown-formatter.js +60 -0
- package/display/network-approval-page.js +487 -0
- package/display/output-preview.js +261 -0
- package/effects/CellBg/CellBg.css.js +33 -0
- package/effects/CellBg/CellBg.js +410 -0
- package/effects/CellBg/CellBg.tpl.js +5 -0
- package/graph/canvas-adapter.js +223 -0
- package/graph/graph-algorithms.js +31 -0
- package/graph/index.js +46 -0
- package/graph/model.js +176 -0
- package/graph/project-graph-build.js +66 -0
- package/graph/project-graph-metadata.js +253 -0
- package/graph/project-package.js +128 -0
- package/graph/project-runtime.js +116 -0
- package/graph/project-transaction.js +284 -0
- package/graph/skeleton-utils.js +84 -0
- package/graph/theme-contract.js +36 -0
- package/graph/transaction-parser.js +56 -0
- package/icons/MaterialSymbols.js +69 -0
- package/icons/material-symbols-outlined-400.ttf +0 -0
- package/icons/material-symbols.css +24 -0
- package/index.js +95 -0
- package/inspector/InspectorPanel/InspectorPanel.css.js +375 -0
- package/inspector/InspectorPanel/InspectorPanel.js +368 -0
- package/inspector/InspectorPanel/InspectorPanel.tpl.js +96 -0
- package/inspector/TemplatePreview/TemplatePreview.css.js +104 -0
- package/inspector/TemplatePreview/TemplatePreview.js +145 -0
- package/inspector/TemplatePreview/TemplatePreview.tpl.js +33 -0
- package/interactions/ConnectFlow.js +304 -0
- package/interactions/Drag.js +104 -0
- package/interactions/Selector.js +133 -0
- package/interactions/SnapGrid.js +66 -0
- package/interactions/Zoom.js +139 -0
- package/layout/ActionZone/ActionZone.css.js +88 -0
- package/layout/ActionZone/ActionZone.js +261 -0
- package/layout/ActionZone/ActionZone.tpl.js +11 -0
- package/layout/CrossLayoutPortalBridge/CrossLayoutPortalBridge.js +255 -0
- package/layout/Layout/Layout.css.js +91 -0
- package/layout/Layout/Layout.js +637 -0
- package/layout/Layout/Layout.tpl.js +27 -0
- package/layout/LayoutNode/LayoutNode.css.js +302 -0
- package/layout/LayoutNode/LayoutNode.js +509 -0
- package/layout/LayoutNode/LayoutNode.tpl.js +39 -0
- package/layout/LayoutPreview/LayoutPreview.css.js +46 -0
- package/layout/LayoutPreview/LayoutPreview.js +102 -0
- package/layout/LayoutPreview/LayoutPreview.tpl.js +6 -0
- package/layout/LayoutRouter/LayoutRouter.js +274 -0
- package/layout/LayoutRouter/SectionRegistry.js +135 -0
- package/layout/LayoutRouter/routerSync.js +250 -0
- package/layout/LayoutSidebar/LayoutSidebar.css.js +411 -0
- package/layout/LayoutSidebar/LayoutSidebar.js +368 -0
- package/layout/LayoutSidebar/LayoutSidebar.tpl.js +26 -0
- package/layout/LayoutSidebar/SidebarSection.css.js +20 -0
- package/layout/LayoutSidebar/SidebarSection.js +184 -0
- package/layout/LayoutSidebar/SidebarSection.tpl.js +22 -0
- package/layout/LayoutTree.js +373 -0
- package/layout/PanelMenu/PanelMenu.css.js +43 -0
- package/layout/PanelMenu/PanelMenu.js +95 -0
- package/layout/PanelMenu/PanelMenu.tpl.js +17 -0
- package/layout/ProjectTabs/ProjectTabs.css.js +188 -0
- package/layout/ProjectTabs/ProjectTabs.js +77 -0
- package/layout/ProjectTabs/ProjectTabs.tpl.js +15 -0
- package/layout/index.js +40 -0
- package/list/ListDetailShell/ListDetailShell.css.js +128 -0
- package/list/ListDetailShell/ListDetailShell.js +72 -0
- package/list/ListDetailShell/ListDetailShell.tpl.js +36 -0
- package/list/ListItem/ListItem.css.js +111 -0
- package/list/ListItem/ListItem.js +66 -0
- package/list/ListItem/ListItem.tpl.js +18 -0
- package/locale/index.js +503 -0
- package/manifest/component-registry.js +2446 -0
- package/manifest/graph-schema.js +285 -0
- package/manifest/index.js +6 -0
- package/manifest/project-schema-catalog.js +246 -0
- package/manifest/rule-catalog.js +201 -0
- package/manifest/theme-catalog.js +2149 -0
- package/manifest/ui-schema-catalog.js +334 -0
- package/menu/ContextMenu/ContextMenu.css.js +61 -0
- package/menu/ContextMenu/ContextMenu.js +82 -0
- package/menu/ContextMenu/ContextMenu.tpl.js +19 -0
- package/navigation/QuickOpen/QuickOpen.css.js +92 -0
- package/navigation/QuickOpen/QuickOpen.js +185 -0
- package/navigation/QuickOpen/QuickOpen.tpl.js +15 -0
- package/navigation/quick-open-utils.js +101 -0
- package/node/CtrlItem/CtrlItem.css.js +41 -0
- package/node/CtrlItem/CtrlItem.js +24 -0
- package/node/CtrlItem/CtrlItem.tpl.js +17 -0
- package/node/GraphFrame/GraphFrame.css.js +66 -0
- package/node/GraphFrame/GraphFrame.js +32 -0
- package/node/GraphFrame/GraphFrame.tpl.js +13 -0
- package/node/GraphNode/GraphNode.css.js +815 -0
- package/node/GraphNode/GraphNode.js +173 -0
- package/node/GraphNode/GraphNode.tpl.js +33 -0
- package/node/NodeCallout/NodeCallout.css.js +91 -0
- package/node/NodeCallout/NodeCallout.js +281 -0
- package/node/NodeCallout/NodeCallout.tpl.js +8 -0
- package/node/NodeSocket/NodeSocket.css.js +68 -0
- package/node/NodeSocket/NodeSocket.js +26 -0
- package/node/NodeSocket/NodeSocket.tpl.js +7 -0
- package/node/PortItem/PortItem.css.js +93 -0
- package/node/PortItem/PortItem.js +87 -0
- package/node/PortItem/PortItem.tpl.js +10 -0
- package/package.json +165 -0
- package/palette/PaletteBrowser/PaletteBrowser.css.js +143 -0
- package/palette/PaletteBrowser/PaletteBrowser.js +152 -0
- package/palette/PaletteBrowser/PaletteBrowser.tpl.js +23 -0
- package/plugins/History.js +408 -0
- package/plugins/Readonly.js +60 -0
- package/rules/symbiote-3x.json +170 -0
- package/schemas/component-descriptor-v1.json +91 -0
- package/schemas/component-descriptor-v2.json +145 -0
- package/schemas/graph-model-v1.json +179 -0
- package/schemas/graph-v1.json +91 -0
- package/schemas/project-package-v1.json +102 -0
- package/schemas/project-transaction-v1.json +114 -0
- package/schemas/runtime-ui-v1.json +80 -0
- package/schemas/theme-rule-block-v1.json +73 -0
- package/shapes/CircleShape.js +79 -0
- package/shapes/CommentShape.js +35 -0
- package/shapes/DiamondShape.js +130 -0
- package/shapes/NodeShape.js +79 -0
- package/shapes/PillShape.js +91 -0
- package/shapes/RectShape.js +84 -0
- package/shapes/SVGShape.js +525 -0
- package/shapes/index.js +63 -0
- package/surface/Card/Card.css.js +57 -0
- package/surface/Card/Card.js +17 -0
- package/surface/Card/Card.tpl.js +3 -0
- package/themes/Palette.js +30 -0
- package/themes/Skin.js +113 -0
- package/themes/Theme.js +82 -0
- package/themes/carbon.js +135 -0
- package/themes/dark.js +140 -0
- package/themes/default-dark.js +714 -0
- package/themes/default-provider.css +635 -0
- package/themes/default-provider.js +718 -0
- package/themes/ebook.js +136 -0
- package/themes/grey.js +137 -0
- package/themes/light.js +139 -0
- package/themes/neon.js +138 -0
- package/themes/pcb.js +273 -0
- package/themes/synthwave.js +138 -0
- package/tokens/base.json +29 -0
- package/tokens/themes/carbon.json +11 -0
- package/tokens/themes/dark.json +12 -0
- package/tokens/themes/default-dark.json +1543 -0
- package/tokens/themes/default-provider.json +1543 -0
- package/tokens/themes/ebook.json +11 -0
- package/tokens/themes/grey.json +11 -0
- package/tokens/themes/light.json +12 -0
- package/tokens/themes/neon.json +11 -0
- package/tokens/themes/pcb.json +11 -0
- package/tokens/themes/synthwave.json +11 -0
- package/toolbar/QuickToolbar/QuickToolbar.css.js +152 -0
- package/toolbar/QuickToolbar/QuickToolbar.js +529 -0
- package/toolbar/QuickToolbar/QuickToolbar.tpl.js +34 -0
- package/tree/TreePanel/TreePanel.css.js +112 -0
- package/tree/TreePanel/TreePanel.js +147 -0
- package/tree/TreePanel/TreePanel.tpl.js +18 -0
- package/tree/TreeView/TreeView.css.js +122 -0
- package/tree/TreeView/TreeView.js +365 -0
- package/tree/TreeView/TreeView.tpl.js +10 -0
- package/ui/dialogs.js +221 -0
- package/ui/host-adapters.js +114 -0
- package/ui/index.js +660 -0
- package/ui/locale.js +50 -0
- package/ui/overlay-stack.js +89 -0
- package/ui/shared-styles.js +26 -0
- package/webmcp.js +37 -0
- package/xr/deep-graph.js +646 -0
- package/xr/emulation.js +198 -0
- package/xr/gesture.js +228 -0
- package/xr/html-canvas-renderer.js +472 -0
- package/xr/index.js +15 -0
- package/xr/layout-projection.js +1046 -0
- package/xr/panel-frame.js +128 -0
- package/xr/panel-host.js +267 -0
- package/xr/pointer.js +258 -0
- package/xr/scene-controller.js +242 -0
- package/xr/spatial-scene.js +212 -0
- package/xr/theme-bridge.js +105 -0
- package/xr/three-webxr-adapter.js +3439 -0
- package/xr/webgl-layer-renderer.js +419 -0
- package/xr/webxr.js +679 -0
- package/xr/workbench.js +516 -0
package/ui/index.js
ADDED
|
@@ -0,0 +1,660 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser/UI API for symbiote-ui.
|
|
3
|
+
*
|
|
4
|
+
* Import this entrypoint in applications that need Web Components, layout
|
|
5
|
+
* widgets, router helpers, panels, and browser canvas modules.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export * from '../core/index.js';
|
|
9
|
+
export * from '../graph/index.js';
|
|
10
|
+
export * from '../locale/index.js';
|
|
11
|
+
export { configureBrowserLocalization, detectBrowserLocale } from './locale.js';
|
|
12
|
+
|
|
13
|
+
import { getComponent, listComponents } from '../manifest/component-registry.js';
|
|
14
|
+
import { configureBrowserLocalization } from './locale.js';
|
|
15
|
+
|
|
16
|
+
export { Drag } from '../interactions/Drag.js';
|
|
17
|
+
export { Zoom } from '../interactions/Zoom.js';
|
|
18
|
+
export { Selector } from '../interactions/Selector.js';
|
|
19
|
+
export { SnapGrid } from '../interactions/SnapGrid.js';
|
|
20
|
+
export { ConnectFlow } from '../interactions/ConnectFlow.js';
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
NodeShape,
|
|
24
|
+
RectShape,
|
|
25
|
+
PillShape,
|
|
26
|
+
CircleShape,
|
|
27
|
+
DiamondShape,
|
|
28
|
+
CommentShape,
|
|
29
|
+
getShape,
|
|
30
|
+
registerShape,
|
|
31
|
+
SVGShape,
|
|
32
|
+
createSVGShape,
|
|
33
|
+
SVG_PRESETS,
|
|
34
|
+
} from '../shapes/index.js';
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
applyTheme,
|
|
38
|
+
extractTheme,
|
|
39
|
+
DEFAULT_PROVIDER_THEME,
|
|
40
|
+
DEFAULT_THEME,
|
|
41
|
+
} from '../themes/Theme.js';
|
|
42
|
+
|
|
43
|
+
export {
|
|
44
|
+
applyPalette,
|
|
45
|
+
DEFAULT_PROVIDER_PALETTE,
|
|
46
|
+
DEFAULT_PALETTE,
|
|
47
|
+
} from '../themes/Palette.js';
|
|
48
|
+
|
|
49
|
+
export { applySkin, MODERN_SKIN, COMPACT_SKIN, ROUNDED_SKIN } from '../themes/Skin.js';
|
|
50
|
+
export { CARBON, CARBON_PALETTE } from '../themes/carbon.js';
|
|
51
|
+
export { PCB_DARK } from '../themes/pcb.js';
|
|
52
|
+
export { EBOOK, EBOOK_PALETTE } from '../themes/ebook.js';
|
|
53
|
+
export { NEON_PALETTE } from '../themes/neon.js';
|
|
54
|
+
export { configureMaterialSymbols, ensureMaterialSymbols } from '../icons/MaterialSymbols.js';
|
|
55
|
+
|
|
56
|
+
export { FocusController, GraphHistory } from 'symbiote-engine';
|
|
57
|
+
export { Readonly } from '../plugins/Readonly.js';
|
|
58
|
+
export { History } from '../plugins/History.js';
|
|
59
|
+
|
|
60
|
+
export { FlowSimulator } from '../canvas/FlowSimulator.js';
|
|
61
|
+
export * as LayoutTree from '../layout/LayoutTree.js';
|
|
62
|
+
export { matchesSection } from '../layout/LayoutTree.js';
|
|
63
|
+
export {
|
|
64
|
+
SECTION_SCOPES,
|
|
65
|
+
SectionRegistry,
|
|
66
|
+
createSectionRegistry,
|
|
67
|
+
normalizeSectionScope,
|
|
68
|
+
sectionMatchesScope,
|
|
69
|
+
withGlobalPanel,
|
|
70
|
+
registerSection,
|
|
71
|
+
getSection,
|
|
72
|
+
getSections,
|
|
73
|
+
getHomeSections,
|
|
74
|
+
getProjectSections,
|
|
75
|
+
getSectionsForScope,
|
|
76
|
+
getLayout,
|
|
77
|
+
hasSection,
|
|
78
|
+
clearSections,
|
|
79
|
+
} from '../layout/LayoutRouter/SectionRegistry.js';
|
|
80
|
+
export {
|
|
81
|
+
updateHashParam,
|
|
82
|
+
getGraphSearchString,
|
|
83
|
+
getGraphUrlParams,
|
|
84
|
+
parseGraphHash,
|
|
85
|
+
} from '../layout/LayoutRouter/LayoutRouter.js';
|
|
86
|
+
export { computeAutoLayout, computeTreeLayout } from '../canvas/AutoLayout.js';
|
|
87
|
+
export { SubgraphManager } from '../canvas/SubgraphManager.js';
|
|
88
|
+
export { SubgraphRouter } from '../canvas/SubgraphRouter.js';
|
|
89
|
+
export { LODManager } from '../canvas/LODManager.js';
|
|
90
|
+
export { PinExpansion } from '../canvas/PinExpansion.js';
|
|
91
|
+
export { ForceLayout } from '../canvas/ForceLayout.js';
|
|
92
|
+
export {
|
|
93
|
+
createCanvasGraphStore,
|
|
94
|
+
normalizeCanvasGraphModel,
|
|
95
|
+
} from '../canvas/graph-model.js';
|
|
96
|
+
export {
|
|
97
|
+
computeInitialGraphPositions,
|
|
98
|
+
createForceLayoutPayload,
|
|
99
|
+
findForceNodeGroup,
|
|
100
|
+
getDrillableFiles,
|
|
101
|
+
getForceLayoutOptions,
|
|
102
|
+
getGraphCacheKey,
|
|
103
|
+
getOrBuildGraph,
|
|
104
|
+
} from '../canvas/graph-layout.js';
|
|
105
|
+
export {
|
|
106
|
+
GRAPH_DIRECTORY_FRAME_COLORS,
|
|
107
|
+
GRAPH_PATH_STYLES,
|
|
108
|
+
addGraphDirectoryFrames,
|
|
109
|
+
buildFlatPathHash,
|
|
110
|
+
getFileSelectionNodeId,
|
|
111
|
+
getFlatFocusRestoreKey,
|
|
112
|
+
getGraphHashNavigationState,
|
|
113
|
+
getGraphPathStyleDisplay,
|
|
114
|
+
getNextGraphPathStyle,
|
|
115
|
+
renderGraphPathStyleButton,
|
|
116
|
+
renderGraphViewModeButton,
|
|
117
|
+
resolveFlatHashChange,
|
|
118
|
+
resolveInitialGraphViewMode,
|
|
119
|
+
selectGraphLabelMode,
|
|
120
|
+
setGraphLayerVisible,
|
|
121
|
+
shouldClearFocusOnSelection,
|
|
122
|
+
shouldFitForceLayoutInitialTick,
|
|
123
|
+
shouldRestoreFlatFocus,
|
|
124
|
+
toggleGraphLayerButtonState,
|
|
125
|
+
resolveGraphNodeClick,
|
|
126
|
+
resolveToolbarAction,
|
|
127
|
+
renderClusterPanel,
|
|
128
|
+
renderGraphStats,
|
|
129
|
+
} from '../canvas/graph-explorer.js';
|
|
130
|
+
export {
|
|
131
|
+
HTML_IN_CANVAS_APIS,
|
|
132
|
+
HTML_IN_CANVAS_RENDERER,
|
|
133
|
+
HTML_IN_CANVAS_RENDERER_NAME,
|
|
134
|
+
captureHtmlElementImage,
|
|
135
|
+
closeHtmlElementImage,
|
|
136
|
+
copyHtmlElementToWebGPUTexture,
|
|
137
|
+
createHtmlInCanvasAdapter,
|
|
138
|
+
drawHtmlElement2d,
|
|
139
|
+
getHtmlInCanvasChangedElements,
|
|
140
|
+
getHtmlElementCanvasTransform,
|
|
141
|
+
getHtmlInCanvasSupport,
|
|
142
|
+
requestHtmlInCanvasPaint,
|
|
143
|
+
setupHtmlInCanvas,
|
|
144
|
+
uploadHtmlElementToWebGLTexture,
|
|
145
|
+
} from '../canvas/html-in-canvas.js';
|
|
146
|
+
export * from '../xr/index.js';
|
|
147
|
+
|
|
148
|
+
export let NodeCanvas;
|
|
149
|
+
export let CanvasGraph;
|
|
150
|
+
export let GraphExplorerShell;
|
|
151
|
+
export let ContextMenu;
|
|
152
|
+
export let GraphNode;
|
|
153
|
+
export let NodeCallout;
|
|
154
|
+
export let GraphFrame;
|
|
155
|
+
export let NodeSocket;
|
|
156
|
+
export let QuickToolbar;
|
|
157
|
+
export let InspectorPanel;
|
|
158
|
+
export let Minimap;
|
|
159
|
+
export let NodeSearch;
|
|
160
|
+
export let Layout;
|
|
161
|
+
export let LayoutNode;
|
|
162
|
+
export let LayoutSidebar;
|
|
163
|
+
export let CrossLayoutPortalBridge;
|
|
164
|
+
export let ProjectTabs;
|
|
165
|
+
export let CodeBlock;
|
|
166
|
+
export let SourceViewer;
|
|
167
|
+
export let SourceEditor;
|
|
168
|
+
export let LoadingOverlay;
|
|
169
|
+
export let StatusBadge;
|
|
170
|
+
export let StatusBanner;
|
|
171
|
+
export let EmptyState;
|
|
172
|
+
export let MetricItem;
|
|
173
|
+
export let DataTable;
|
|
174
|
+
export let EventFeed;
|
|
175
|
+
export let getSourceLanguage;
|
|
176
|
+
export let isDirectoryLikePath;
|
|
177
|
+
export let buildDirectoryInfo;
|
|
178
|
+
export let QuickOpen;
|
|
179
|
+
export let navigate;
|
|
180
|
+
export let updateParams;
|
|
181
|
+
export let parseQuery;
|
|
182
|
+
export let buildHash;
|
|
183
|
+
export let buildQuery;
|
|
184
|
+
export let getRoute;
|
|
185
|
+
export let setDefaultPanel;
|
|
186
|
+
export let registerGlobalParam;
|
|
187
|
+
export let setGlobalParam;
|
|
188
|
+
export let syncWithRouter;
|
|
189
|
+
export let setupPanelRouting;
|
|
190
|
+
export let PaletteBrowser;
|
|
191
|
+
export let GraphTabs;
|
|
192
|
+
export let Breadcrumb;
|
|
193
|
+
export let CellBg;
|
|
194
|
+
export let ChatMessageItem;
|
|
195
|
+
export let ChatTranscript;
|
|
196
|
+
export let ChatComposer;
|
|
197
|
+
export let ChatList;
|
|
198
|
+
export let ChatListItem;
|
|
199
|
+
export let ChatSidebarShell;
|
|
200
|
+
export let ChatSidebarItem;
|
|
201
|
+
export let ChatSidebarSubItem;
|
|
202
|
+
export let ListItem;
|
|
203
|
+
export let ListDetailShell;
|
|
204
|
+
export let TreeView;
|
|
205
|
+
export let TreePanel;
|
|
206
|
+
export let ActionButton;
|
|
207
|
+
export let FormField;
|
|
208
|
+
export let SurfaceCard;
|
|
209
|
+
export let OutputListPreview;
|
|
210
|
+
export let OutputGraphPreview;
|
|
211
|
+
export let StatusRibbon;
|
|
212
|
+
export let stringifyBlock;
|
|
213
|
+
export let truncateResult;
|
|
214
|
+
export { sharedUiStyles } from './shared-styles.js';
|
|
215
|
+
export { bringOverlayToFront, nextOverlayZIndex, resetOverlayStack } from './overlay-stack.js';
|
|
216
|
+
export { escapeHtml } from '../display/markdown-formatter.js';
|
|
217
|
+
export { normalizeOutputList, normalizePreviewGraph } from '../display/output-preview.js';
|
|
218
|
+
export { createNetworkApprovalPageStyles, renderNetworkApprovalPage } from '../display/network-approval-page.js';
|
|
219
|
+
export { uiAlert, uiConfirm, uiPrompt } from './dialogs.js';
|
|
220
|
+
export {
|
|
221
|
+
bindListItemSelect,
|
|
222
|
+
collapseTree,
|
|
223
|
+
highlightTreePath,
|
|
224
|
+
setTreeItems,
|
|
225
|
+
setupTreePanel,
|
|
226
|
+
showTree,
|
|
227
|
+
showTreePlaceholder,
|
|
228
|
+
syncListItem,
|
|
229
|
+
syncTreeFilter,
|
|
230
|
+
} from './host-adapters.js';
|
|
231
|
+
export {
|
|
232
|
+
buildChatMessageItems,
|
|
233
|
+
buildSessionMetaHtml,
|
|
234
|
+
buildWorkMetaHtml,
|
|
235
|
+
buildWorkSummaryHtml,
|
|
236
|
+
findPreviousAgentText,
|
|
237
|
+
toChatMessageItem,
|
|
238
|
+
} from '../chat/message-model.js';
|
|
239
|
+
export { collectQuickOpenFilesFromSkeleton, fuzzyScore, searchQuickOpenItems } from '../navigation/quick-open-utils.js';
|
|
240
|
+
|
|
241
|
+
const runtimeModules = new Map();
|
|
242
|
+
const runtimeModuleAliases = new Map();
|
|
243
|
+
|
|
244
|
+
const hasDOMGlobals =
|
|
245
|
+
typeof window !== 'undefined' &&
|
|
246
|
+
typeof document !== 'undefined' &&
|
|
247
|
+
typeof HTMLElement !== 'undefined' &&
|
|
248
|
+
typeof customElements !== 'undefined';
|
|
249
|
+
|
|
250
|
+
function normalizeModuleName(name) {
|
|
251
|
+
return String(name || '').trim();
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
function canUseCustomElements() {
|
|
255
|
+
return typeof customElements !== 'undefined' && typeof customElements.get === 'function';
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
function findCatalogComponent(name) {
|
|
259
|
+
let normalized = normalizeModuleName(name);
|
|
260
|
+
if (!normalized) return null;
|
|
261
|
+
let byTag = getComponent(normalized);
|
|
262
|
+
if (byTag) return byTag;
|
|
263
|
+
return listComponents({ includeInternal: true, includeExperimental: true }).find((component) => {
|
|
264
|
+
return component.exportName === normalized || component.className === normalized;
|
|
265
|
+
}) || null;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
function resolveModuleRecord(name) {
|
|
269
|
+
let normalized = normalizeModuleName(name);
|
|
270
|
+
if (!normalized) return null;
|
|
271
|
+
let tagName = runtimeModuleAliases.get(normalized) || normalized;
|
|
272
|
+
return runtimeModules.get(tagName) || null;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
function toModuleDescriptor(record, component = null) {
|
|
276
|
+
let tagName = record?.tagName || component?.tagName;
|
|
277
|
+
let ComponentClass = record?.ComponentClass;
|
|
278
|
+
let defined = Boolean(tagName && canUseCustomElements() && customElements.get(tagName));
|
|
279
|
+
return {
|
|
280
|
+
name: tagName,
|
|
281
|
+
tagName,
|
|
282
|
+
exportName: record?.exportName ?? component?.exportName ?? null,
|
|
283
|
+
className: record?.className ?? component?.className ?? ComponentClass?.name ?? null,
|
|
284
|
+
category: record?.category ?? component?.category ?? null,
|
|
285
|
+
visibility: record?.visibility ?? component?.visibility ?? 'public',
|
|
286
|
+
internal: Boolean(record?.internal ?? component?.internal),
|
|
287
|
+
experimental: (record?.visibility ?? component?.visibility) === 'experimental',
|
|
288
|
+
specifier: record?.specifier ?? component?.specifier ?? 'symbiote-ui/ui',
|
|
289
|
+
module: record?.module ?? component?.module ?? null,
|
|
290
|
+
defined,
|
|
291
|
+
registered: Boolean(record?.ComponentClass),
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
function registerModuleAlias(alias, tagName) {
|
|
296
|
+
if (alias) runtimeModuleAliases.set(alias, tagName);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
function moduleVisible(record, options = {}) {
|
|
300
|
+
let visibility = record?.visibility ?? 'public';
|
|
301
|
+
let internal = Boolean(record?.internal ?? visibility === 'internal');
|
|
302
|
+
let experimental = Boolean(record?.experimental ?? visibility === 'experimental');
|
|
303
|
+
if (internal && !options.includeInternal) return false;
|
|
304
|
+
if (experimental && !options.includeExperimental) return false;
|
|
305
|
+
return true;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export function registerModule(name, ComponentClass, options = {}) {
|
|
309
|
+
let normalized = normalizeModuleName(name);
|
|
310
|
+
if (!normalized) {
|
|
311
|
+
throw new TypeError('registerModule(name, ComponentClass) requires a module name.');
|
|
312
|
+
}
|
|
313
|
+
if (typeof ComponentClass !== 'function') {
|
|
314
|
+
throw new TypeError(`registerModule("${normalized}") requires a component class.`);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
let component = findCatalogComponent(normalized);
|
|
318
|
+
let tagName = normalizeModuleName(options.tagName || component?.tagName || normalized);
|
|
319
|
+
let exportName = options.exportName ?? component?.exportName ?? ComponentClass.name ?? null;
|
|
320
|
+
let visibility = options.visibility ?? component?.visibility ?? 'public';
|
|
321
|
+
let record = {
|
|
322
|
+
tagName,
|
|
323
|
+
exportName,
|
|
324
|
+
className: options.className ?? component?.className ?? ComponentClass.name ?? null,
|
|
325
|
+
category: options.category ?? component?.category ?? null,
|
|
326
|
+
visibility,
|
|
327
|
+
internal: Boolean(options.internal ?? component?.internal ?? visibility === 'internal'),
|
|
328
|
+
specifier: options.specifier ?? component?.specifier ?? 'symbiote-ui/ui',
|
|
329
|
+
module: options.module ?? component?.module ?? null,
|
|
330
|
+
ComponentClass,
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
runtimeModules.set(tagName, record);
|
|
334
|
+
registerModuleAlias(normalized, tagName);
|
|
335
|
+
registerModuleAlias(tagName, tagName);
|
|
336
|
+
registerModuleAlias(exportName, tagName);
|
|
337
|
+
registerModuleAlias(record.className, tagName);
|
|
338
|
+
return toModuleDescriptor(record, component);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export function getModule(name, options = {}) {
|
|
342
|
+
let record = resolveModuleRecord(name);
|
|
343
|
+
if (record?.ComponentClass) {
|
|
344
|
+
return moduleVisible(record, options) ? record.ComponentClass : undefined;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
let component = findCatalogComponent(name);
|
|
348
|
+
if (!moduleVisible(component, options)) return undefined;
|
|
349
|
+
if (component?.tagName && canUseCustomElements()) {
|
|
350
|
+
return customElements.get(component.tagName);
|
|
351
|
+
}
|
|
352
|
+
return undefined;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export function listModules(options = {}) {
|
|
356
|
+
let { includeInternal = false, includeExperimental = false } = options;
|
|
357
|
+
let descriptors = [];
|
|
358
|
+
let seen = new Set();
|
|
359
|
+
|
|
360
|
+
for (let component of listComponents({ includeInternal: true, includeExperimental: true })) {
|
|
361
|
+
if (!includeInternal && component.internal) continue;
|
|
362
|
+
if (!includeExperimental && component.visibility === 'experimental') continue;
|
|
363
|
+
let record = runtimeModules.get(component.tagName);
|
|
364
|
+
descriptors.push(toModuleDescriptor(record, component));
|
|
365
|
+
seen.add(component.tagName);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
for (let record of runtimeModules.values()) {
|
|
369
|
+
if (seen.has(record.tagName)) continue;
|
|
370
|
+
if (!includeInternal && record.internal) continue;
|
|
371
|
+
if (!includeExperimental && record.visibility === 'experimental') continue;
|
|
372
|
+
descriptors.push(toModuleDescriptor(record));
|
|
373
|
+
seen.add(record.tagName);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
return descriptors;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
export function defineModule(name, options = {}) {
|
|
380
|
+
if (!canUseCustomElements()) return undefined;
|
|
381
|
+
|
|
382
|
+
let component = findCatalogComponent(name);
|
|
383
|
+
let record = resolveModuleRecord(name);
|
|
384
|
+
let visibility = options.visibility ?? record?.visibility ?? component?.visibility ?? 'public';
|
|
385
|
+
let internal = Boolean(record?.internal ?? component?.internal ?? visibility === 'internal');
|
|
386
|
+
let experimental = visibility === 'experimental';
|
|
387
|
+
let tagName = normalizeModuleName(options.tagName || record?.tagName || component?.tagName || name);
|
|
388
|
+
|
|
389
|
+
if (internal && !options.includeInternal) {
|
|
390
|
+
throw new Error(`UI module "${tagName}" is internal. Pass includeInternal: true to define it.`);
|
|
391
|
+
}
|
|
392
|
+
if (experimental && !options.includeExperimental) {
|
|
393
|
+
throw new Error(`UI module "${tagName}" is experimental. Pass includeExperimental: true to define it.`);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
let existing = customElements.get(tagName);
|
|
397
|
+
if (existing) return existing;
|
|
398
|
+
|
|
399
|
+
let ComponentClass = record?.ComponentClass || getModule(name, options);
|
|
400
|
+
if (!ComponentClass) {
|
|
401
|
+
throw new Error(`UI module "${tagName}" is not registered.`);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
customElements.define(tagName, ComponentClass, options.defineOptions);
|
|
405
|
+
return customElements.get(tagName) || ComponentClass;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
function registerCatalogModules(exportsByName) {
|
|
409
|
+
for (let component of listComponents({ includeInternal: true, includeExperimental: true })) {
|
|
410
|
+
if (!component.exportName) continue;
|
|
411
|
+
let ComponentClass = exportsByName[component.exportName];
|
|
412
|
+
if (!ComponentClass) continue;
|
|
413
|
+
registerModule(component.tagName, ComponentClass, {
|
|
414
|
+
tagName: component.tagName,
|
|
415
|
+
exportName: component.exportName,
|
|
416
|
+
className: component.className,
|
|
417
|
+
category: component.category,
|
|
418
|
+
visibility: component.visibility,
|
|
419
|
+
internal: component.internal,
|
|
420
|
+
specifier: component.specifier,
|
|
421
|
+
module: component.module,
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
if (hasDOMGlobals) {
|
|
427
|
+
configureBrowserLocalization();
|
|
428
|
+
|
|
429
|
+
const [
|
|
430
|
+
nodeCanvas,
|
|
431
|
+
canvasGraph,
|
|
432
|
+
graphExplorerShell,
|
|
433
|
+
contextMenu,
|
|
434
|
+
graphNode,
|
|
435
|
+
nodeCallout,
|
|
436
|
+
graphFrame,
|
|
437
|
+
nodeSocket,
|
|
438
|
+
quickToolbar,
|
|
439
|
+
inspectorPanel,
|
|
440
|
+
minimap,
|
|
441
|
+
nodeSearch,
|
|
442
|
+
layout,
|
|
443
|
+
layoutNode,
|
|
444
|
+
layoutSidebar,
|
|
445
|
+
crossLayoutPortalBridge,
|
|
446
|
+
projectTabs,
|
|
447
|
+
codeBlock,
|
|
448
|
+
sourceViewer,
|
|
449
|
+
sourceEditor,
|
|
450
|
+
loadingOverlay,
|
|
451
|
+
statusBadge,
|
|
452
|
+
statusBanner,
|
|
453
|
+
emptyState,
|
|
454
|
+
metricItem,
|
|
455
|
+
dataTable,
|
|
456
|
+
eventFeed,
|
|
457
|
+
quickOpen,
|
|
458
|
+
layoutRouter,
|
|
459
|
+
routerSync,
|
|
460
|
+
paletteBrowser,
|
|
461
|
+
graphTabs,
|
|
462
|
+
breadcrumb,
|
|
463
|
+
cellBg,
|
|
464
|
+
chatMessageItem,
|
|
465
|
+
chatTranscript,
|
|
466
|
+
chatComposer,
|
|
467
|
+
chatList,
|
|
468
|
+
chatListItem,
|
|
469
|
+
chatSidebar,
|
|
470
|
+
chatSidebarItem,
|
|
471
|
+
listItem,
|
|
472
|
+
listDetailShell,
|
|
473
|
+
treeView,
|
|
474
|
+
treePanel,
|
|
475
|
+
actionButton,
|
|
476
|
+
formField,
|
|
477
|
+
surfaceCard,
|
|
478
|
+
outputListPreview,
|
|
479
|
+
outputGraphPreview,
|
|
480
|
+
statusRibbon,
|
|
481
|
+
] = await Promise.all([
|
|
482
|
+
import('../canvas/NodeCanvas/NodeCanvas.js'),
|
|
483
|
+
import('../canvas/CanvasGraph/CanvasGraph.js'),
|
|
484
|
+
import('../canvas/GraphExplorerShell/GraphExplorerShell.js'),
|
|
485
|
+
import('../menu/ContextMenu/ContextMenu.js'),
|
|
486
|
+
import('../node/GraphNode/GraphNode.js'),
|
|
487
|
+
import('../node/NodeCallout/NodeCallout.js'),
|
|
488
|
+
import('../node/GraphFrame/GraphFrame.js'),
|
|
489
|
+
import('../node/NodeSocket/NodeSocket.js'),
|
|
490
|
+
import('../toolbar/QuickToolbar/QuickToolbar.js'),
|
|
491
|
+
import('../inspector/InspectorPanel/InspectorPanel.js'),
|
|
492
|
+
import('../canvas/Minimap/Minimap.js'),
|
|
493
|
+
import('../canvas/NodeSearch/NodeSearch.js'),
|
|
494
|
+
import('../layout/Layout/Layout.js'),
|
|
495
|
+
import('../layout/LayoutNode/LayoutNode.js'),
|
|
496
|
+
import('../layout/LayoutSidebar/LayoutSidebar.js'),
|
|
497
|
+
import('../layout/CrossLayoutPortalBridge/CrossLayoutPortalBridge.js'),
|
|
498
|
+
import('../layout/ProjectTabs/ProjectTabs.js'),
|
|
499
|
+
import('../display/CodeBlock/CodeBlock.js'),
|
|
500
|
+
import('../display/SourceViewer/SourceViewer.js'),
|
|
501
|
+
import('../display/SourceEditor/SourceEditor.js'),
|
|
502
|
+
import('../display/LoadingOverlay/LoadingOverlay.js'),
|
|
503
|
+
import('../display/Badge/Badge.js'),
|
|
504
|
+
import('../display/Banner/Banner.js'),
|
|
505
|
+
import('../display/EmptyState/EmptyState.js'),
|
|
506
|
+
import('../display/Metric/Metric.js'),
|
|
507
|
+
import('../display/DataTable/DataTable.js'),
|
|
508
|
+
import('../display/EventFeed/EventFeed.js'),
|
|
509
|
+
import('../navigation/QuickOpen/QuickOpen.js'),
|
|
510
|
+
import('../layout/LayoutRouter/LayoutRouter.js'),
|
|
511
|
+
import('../layout/LayoutRouter/routerSync.js'),
|
|
512
|
+
import('../palette/PaletteBrowser/PaletteBrowser.js'),
|
|
513
|
+
import('../canvas/GraphTabs/GraphTabs.js'),
|
|
514
|
+
import('../canvas/Breadcrumb/Breadcrumb.js'),
|
|
515
|
+
import('../effects/CellBg/CellBg.js'),
|
|
516
|
+
import('../chat/ChatMessageItem/ChatMessageItem.js'),
|
|
517
|
+
import('../chat/ChatTranscript/ChatTranscript.js'),
|
|
518
|
+
import('../chat/ChatComposer/ChatComposer.js'),
|
|
519
|
+
import('../chat/ChatList/ChatList.js'),
|
|
520
|
+
import('../chat/ChatListItem/ChatListItem.js'),
|
|
521
|
+
import('../chat/ChatSidebar/ChatSidebar.js'),
|
|
522
|
+
import('../chat/ChatSidebarItem/ChatSidebarItem.js'),
|
|
523
|
+
import('../list/ListItem/ListItem.js'),
|
|
524
|
+
import('../list/ListDetailShell/ListDetailShell.js'),
|
|
525
|
+
import('../tree/TreeView/TreeView.js'),
|
|
526
|
+
import('../tree/TreePanel/TreePanel.js'),
|
|
527
|
+
import('../control/Button/Button.js'),
|
|
528
|
+
import('../control/Field/Field.js'),
|
|
529
|
+
import('../surface/Card/Card.js'),
|
|
530
|
+
import('../display/OutputListPreview/OutputListPreview.js'),
|
|
531
|
+
import('../display/OutputGraphPreview/OutputGraphPreview.js'),
|
|
532
|
+
import('../display/StatusRibbon/StatusRibbon.js'),
|
|
533
|
+
]);
|
|
534
|
+
|
|
535
|
+
({ NodeCanvas } = nodeCanvas);
|
|
536
|
+
({ CanvasGraph } = canvasGraph);
|
|
537
|
+
({ GraphExplorerShell } = graphExplorerShell);
|
|
538
|
+
({ ContextMenu } = contextMenu);
|
|
539
|
+
({ GraphNode } = graphNode);
|
|
540
|
+
({ NodeCallout } = nodeCallout);
|
|
541
|
+
({ GraphFrame } = graphFrame);
|
|
542
|
+
({ NodeSocket } = nodeSocket);
|
|
543
|
+
({ QuickToolbar } = quickToolbar);
|
|
544
|
+
({ InspectorPanel } = inspectorPanel);
|
|
545
|
+
({ Minimap } = minimap);
|
|
546
|
+
({ NodeSearch } = nodeSearch);
|
|
547
|
+
({ Layout } = layout);
|
|
548
|
+
({ LayoutNode } = layoutNode);
|
|
549
|
+
({ LayoutSidebar } = layoutSidebar);
|
|
550
|
+
({ CrossLayoutPortalBridge } = crossLayoutPortalBridge);
|
|
551
|
+
({ ProjectTabs } = projectTabs);
|
|
552
|
+
({ CodeBlock } = codeBlock);
|
|
553
|
+
({ SourceViewer, getSourceLanguage, isDirectoryLikePath, buildDirectoryInfo } = sourceViewer);
|
|
554
|
+
({ SourceEditor } = sourceEditor);
|
|
555
|
+
({ LoadingOverlay } = loadingOverlay);
|
|
556
|
+
({ StatusBadge } = statusBadge);
|
|
557
|
+
({ StatusBanner } = statusBanner);
|
|
558
|
+
({ EmptyState } = emptyState);
|
|
559
|
+
({ MetricItem } = metricItem);
|
|
560
|
+
({ DataTable } = dataTable);
|
|
561
|
+
({ EventFeed } = eventFeed);
|
|
562
|
+
({ QuickOpen } = quickOpen);
|
|
563
|
+
({
|
|
564
|
+
navigate,
|
|
565
|
+
updateParams,
|
|
566
|
+
parseQuery,
|
|
567
|
+
buildHash,
|
|
568
|
+
buildQuery,
|
|
569
|
+
getRoute,
|
|
570
|
+
setDefaultPanel,
|
|
571
|
+
registerGlobalParam,
|
|
572
|
+
setGlobalParam,
|
|
573
|
+
} = layoutRouter);
|
|
574
|
+
({ syncWithRouter, setupPanelRouting } = routerSync);
|
|
575
|
+
({ PaletteBrowser } = paletteBrowser);
|
|
576
|
+
({ GraphTabs } = graphTabs);
|
|
577
|
+
({ Breadcrumb } = breadcrumb);
|
|
578
|
+
({ CellBg } = cellBg);
|
|
579
|
+
({ ChatMessageItem, stringifyBlock, truncateResult } = chatMessageItem);
|
|
580
|
+
({ ChatTranscript } = chatTranscript);
|
|
581
|
+
({ ChatComposer } = chatComposer);
|
|
582
|
+
({ ChatList } = chatList);
|
|
583
|
+
({ ChatListItem } = chatListItem);
|
|
584
|
+
({ ChatSidebarShell } = chatSidebar);
|
|
585
|
+
({ ChatSidebarItem, ChatSidebarSubItem } = chatSidebarItem);
|
|
586
|
+
({ ListItem } = listItem);
|
|
587
|
+
({ ListDetailShell } = listDetailShell);
|
|
588
|
+
({ TreeView } = treeView);
|
|
589
|
+
({ TreePanel } = treePanel);
|
|
590
|
+
({ ActionButton } = actionButton);
|
|
591
|
+
({ FormField } = formField);
|
|
592
|
+
({ SurfaceCard } = surfaceCard);
|
|
593
|
+
({ OutputListPreview } = outputListPreview);
|
|
594
|
+
({ OutputGraphPreview } = outputGraphPreview);
|
|
595
|
+
({ StatusRibbon } = statusRibbon);
|
|
596
|
+
|
|
597
|
+
registerCatalogModules({
|
|
598
|
+
NodeCanvas,
|
|
599
|
+
CanvasGraph,
|
|
600
|
+
GraphExplorerShell,
|
|
601
|
+
ContextMenu,
|
|
602
|
+
GraphNode,
|
|
603
|
+
NodeCallout,
|
|
604
|
+
GraphFrame,
|
|
605
|
+
NodeSocket,
|
|
606
|
+
QuickToolbar,
|
|
607
|
+
InspectorPanel,
|
|
608
|
+
Minimap,
|
|
609
|
+
NodeSearch,
|
|
610
|
+
Layout,
|
|
611
|
+
LayoutNode,
|
|
612
|
+
LayoutSidebar,
|
|
613
|
+
CrossLayoutPortalBridge,
|
|
614
|
+
ProjectTabs,
|
|
615
|
+
CodeBlock,
|
|
616
|
+
SourceViewer,
|
|
617
|
+
SourceEditor,
|
|
618
|
+
LoadingOverlay,
|
|
619
|
+
StatusBadge,
|
|
620
|
+
StatusBanner,
|
|
621
|
+
EmptyState,
|
|
622
|
+
MetricItem,
|
|
623
|
+
DataTable,
|
|
624
|
+
EventFeed,
|
|
625
|
+
QuickOpen,
|
|
626
|
+
PaletteBrowser,
|
|
627
|
+
GraphTabs,
|
|
628
|
+
Breadcrumb,
|
|
629
|
+
CellBg,
|
|
630
|
+
ChatMessageItem,
|
|
631
|
+
ChatTranscript,
|
|
632
|
+
ChatComposer,
|
|
633
|
+
ChatList,
|
|
634
|
+
ChatListItem,
|
|
635
|
+
ChatSidebarShell,
|
|
636
|
+
ChatSidebarItem,
|
|
637
|
+
ChatSidebarSubItem,
|
|
638
|
+
ListItem,
|
|
639
|
+
ListDetailShell,
|
|
640
|
+
TreeView,
|
|
641
|
+
TreePanel,
|
|
642
|
+
ActionButton,
|
|
643
|
+
FormField,
|
|
644
|
+
SurfaceCard,
|
|
645
|
+
OutputListPreview,
|
|
646
|
+
OutputGraphPreview,
|
|
647
|
+
StatusRibbon,
|
|
648
|
+
});
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
export {
|
|
652
|
+
DEFAULT_NAV_WIDTH,
|
|
653
|
+
MIN_NAV_WIDTH,
|
|
654
|
+
MAX_NAV_WIDTH,
|
|
655
|
+
COLLAPSED_NAV_WIDTH,
|
|
656
|
+
COLLAPSE_DRAG_THRESHOLD,
|
|
657
|
+
AUTO_COLLAPSE_WIDTH,
|
|
658
|
+
AUTO_UNCOLLAPSE_WIDTH,
|
|
659
|
+
clampChatSidebarWidth,
|
|
660
|
+
} from '../chat/ChatSidebar/constants.js';
|
package/ui/locale.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
configureLocalization,
|
|
3
|
+
getLocalization,
|
|
4
|
+
isLocalizationExplicit,
|
|
5
|
+
normalizeLocaleMode,
|
|
6
|
+
resolveLocale,
|
|
7
|
+
} from '../locale/index.js';
|
|
8
|
+
|
|
9
|
+
export function detectBrowserLocale(source = globalThis.navigator) {
|
|
10
|
+
if (!source) return 'en';
|
|
11
|
+
let languages = Array.isArray(source.languages) ? source.languages : [];
|
|
12
|
+
let preferences = languages.length > 0 ? languages : [source.language];
|
|
13
|
+
return resolveLocale(preferences);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function configureBrowserLocalization(options = {}) {
|
|
17
|
+
let mode = normalizeLocaleMode(options.mode, { fallback: '' });
|
|
18
|
+
if (mode) {
|
|
19
|
+
let source = options.navigator ?? globalThis.navigator;
|
|
20
|
+
let languages = Array.isArray(source?.languages) ? source.languages : [];
|
|
21
|
+
let preferences = options.preferences
|
|
22
|
+
?? (languages.length > 0 ? languages : [source?.language]);
|
|
23
|
+
return configureLocalization({
|
|
24
|
+
mode,
|
|
25
|
+
preferences,
|
|
26
|
+
messages: options.messages,
|
|
27
|
+
explicit: options.explicit,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (options.locale != null) {
|
|
32
|
+
return configureLocalization({
|
|
33
|
+
locale: options.locale,
|
|
34
|
+
messages: options.messages,
|
|
35
|
+
explicit: options.explicit,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (options.force !== true && isLocalizationExplicit()) {
|
|
40
|
+
return getLocalization();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
let locale = detectBrowserLocale(options.navigator ?? globalThis.navigator);
|
|
44
|
+
return configureLocalization({
|
|
45
|
+
mode: 'auto',
|
|
46
|
+
preferences: [locale],
|
|
47
|
+
messages: options.messages,
|
|
48
|
+
explicit: options.explicit ?? false,
|
|
49
|
+
});
|
|
50
|
+
}
|