@workbench-kit/react 0.0.2-prototype.0.1.2 → 0.0.2-prototype.0.2.2
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/package.json +31 -23
- package/src/brand/TilepaperAppIcon.tsx +181 -0
- package/src/brand/index.ts +2 -0
- package/src/brand/tilepaper-app-icon-geometry.ts +201 -0
- package/src/icons/WorkbenchIcon.tsx +57 -0
- package/src/icons/WorkbenchIconContext.tsx +25 -0
- package/src/icons/file-icon.ts +154 -0
- package/src/icons/index.ts +17 -0
- package/src/icons/resolveWorkbenchIcon.ts +48 -0
- package/src/icons/types.ts +28 -0
- package/src/index.ts +261 -71
- package/src/jdw/JdwPreview.tsx +165 -8
- package/src/jdw/JdwPreviewViewport.tsx +190 -0
- package/src/jdw/JsonCodeEditorPane.tsx +165 -15
- package/src/jdw/builtins/renderBuiltinWidgetLeaf.tsx +101 -0
- package/src/jdw/createBuiltinJdwRegistry.ts +330 -5
- package/src/jdw/cssRenderBackend.tsx +96 -7
- package/src/jdw/document.ts +0 -3
- package/src/jdw/fixtures/jdw-sample-screens.ts +10 -8
- package/src/jdw/index.ts +9 -4
- package/src/jdw/jdw-preview-viewport.css +41 -0
- package/src/jdw/renderJdw.tsx +49 -8
- package/src/json-config/JsonConfigWorkbench.tsx +11 -14
- package/src/layout/ViewEmptyState.tsx +14 -0
- package/src/layout/WorkbenchCanvas.tsx +113 -6
- package/src/layout/WorkbenchLayout.tsx +3 -0
- package/src/layout/WorkbenchLayoutBase.tsx +43 -2
- package/src/layout/WorkbenchMediaPreviewViewport.tsx +122 -0
- package/src/layout/WorkbenchPropertyOverrideLabel.tsx +90 -0
- package/src/layout/WorkbenchPropertyPanel.tsx +153 -17
- package/src/layout/WorkbenchPropertySearch.tsx +51 -0
- package/src/layout/WorkbenchTree.tsx +9 -10
- package/src/layout/canvas/canvas-drag-ghost.css +21 -0
- package/src/layout/canvas/canvas-drag-preview-frame.css +15 -0
- package/src/layout/canvas/canvas-drop-indicator.css +16 -0
- package/src/layout/canvas/canvas-frame-handle.css +37 -0
- package/src/layout/canvas/canvas-frame-surface.css +24 -0
- package/src/layout/canvas/canvas-guide-block.css +17 -0
- package/src/layout/canvas/canvas-guide-layer.css +6 -0
- package/src/layout/canvas/canvas-guide-line.css +22 -0
- package/src/layout/canvas/canvas-item-badge.css +23 -0
- package/src/layout/canvas/canvas-item-frame.css +54 -0
- package/src/layout/canvas/canvas-pane-surface.css +9 -0
- package/src/layout/canvas/canvas-placeholder.css +21 -0
- package/src/layout/canvas/canvas-resize-frame.css +9 -0
- package/src/layout/canvas/canvas-resize-handle.css +74 -0
- package/src/layout/canvas/canvas-resize-preview.css +11 -0
- package/src/layout/canvas/canvas-selection-marquee.css +14 -0
- package/src/layout/canvas/canvas-viewport.css +18 -0
- package/src/layout/canvas/index.css +19 -0
- package/src/layout/canvas/preview-canvas.css +144 -0
- package/src/layout/editor/editor-body.css +9 -0
- package/src/layout/editor/editor-bottom-panel.css +44 -0
- package/src/layout/editor/editor-frame.css +14 -0
- package/src/layout/editor/editor-viewport.css +7 -0
- package/src/layout/editor/floating-menu.css +91 -0
- package/src/layout/editor/index.css +10 -0
- package/src/layout/editor/parse-error.css +9 -0
- package/src/layout/editor/problem-item.css +52 -0
- package/src/layout/editor/problem-list.css +7 -0
- package/src/layout/editor/render-surface.css +13 -0
- package/src/layout/fillScrollContract.ts +49 -0
- package/src/layout/fullscreen/fullscreen-backdrop.css +31 -0
- package/src/layout/fullscreen/fullscreen-button.css +44 -0
- package/src/layout/fullscreen/fullscreen-carousel.css +20 -0
- package/src/layout/fullscreen/fullscreen-content.css +8 -0
- package/src/layout/fullscreen/fullscreen-empty.css +16 -0
- package/src/layout/fullscreen/fullscreen-header.css +77 -0
- package/src/layout/fullscreen/fullscreen-hero.css +41 -0
- package/src/layout/fullscreen/fullscreen-nav-button.css +29 -0
- package/src/layout/fullscreen/fullscreen-option.css +83 -0
- package/src/layout/fullscreen/fullscreen-pill-row.css +6 -0
- package/src/layout/fullscreen/fullscreen-pill.css +10 -0
- package/src/layout/fullscreen/fullscreen-root.css +11 -0
- package/src/layout/fullscreen/index.css +13 -0
- package/src/layout/index.ts +156 -0
- package/src/layout/layout-base/banner.css +32 -0
- package/src/layout/layout-base/center.css +7 -0
- package/src/layout/layout-base/column.css +7 -0
- package/src/layout/layout-base/divider.css +5 -0
- package/src/layout/layout-base/empty.css +12 -0
- package/src/layout/layout-base/fill-scroll.css +36 -0
- package/src/layout/layout-base/fill.css +18 -0
- package/src/layout/layout-base/index.css +13 -0
- package/src/layout/layout-base/pane.css +6 -0
- package/src/layout/layout-base/panel-scroll.css +5 -0
- package/src/layout/layout-base/panel-surface.css +14 -0
- package/src/layout/layout-base/root.css +9 -0
- package/src/layout/layout-base/section-title.css +8 -0
- package/src/layout/layout.css +10 -0
- package/src/layout/layoutHelpers.ts +4 -2
- package/src/layout/media/index.css +2 -0
- package/src/layout/media/media-preview-viewport.css +69 -0
- package/src/layout/{Panel.tsx → panel/Panel.tsx} +29 -40
- package/src/layout/panel/TemplateGallery.tsx +90 -0
- package/src/layout/panel/WorkbenchAuthoringShell.tsx +57 -0
- package/src/layout/panel/WorkbenchLabeledPane.tsx +81 -0
- package/src/layout/panel/WorkbenchSidebarStack.tsx +15 -0
- package/src/layout/panel/filter-bar.css +59 -0
- package/src/layout/panel/index.css +7 -0
- package/src/layout/panel/index.ts +70 -0
- package/src/layout/panel/preview-pane.css +63 -0
- package/src/layout/panel/template-gallery.css +131 -0
- package/src/layout/panel/workbench-authoring-shell.css +48 -0
- package/src/layout/panel/workbench-labeled-pane.css +69 -0
- package/src/layout/panel/workbench-sidebar-stack.css +18 -0
- package/src/layout/property/color-input.css +8 -0
- package/src/layout/property/color-row.css +6 -0
- package/src/layout/property/index.css +15 -0
- package/src/layout/property/property-card.css +8 -0
- package/src/layout/property/property-grid.css +24 -0
- package/src/layout/property/property-hint.css +4 -0
- package/src/layout/property/property-inline.css +10 -0
- package/src/layout/property/property-key-value.css +29 -0
- package/src/layout/property/property-override-label.css +34 -0
- package/src/layout/property/property-panel.css +20 -0
- package/src/layout/property/property-row.css +17 -0
- package/src/layout/property/property-search.css +43 -0
- package/src/layout/property/property-section.css +97 -0
- package/src/layout/property/property-stack.css +11 -0
- package/src/layout/property/property-toggle.css +14 -0
- package/src/layout/propertyFieldFilter.ts +84 -0
- package/src/layout/sidebar/SideBarViewFrame.tsx +235 -0
- package/src/layout/sidebar/SideBarViewTabStrip.tsx +60 -0
- package/src/layout/sidebar/SideBarViewTitleMenu.tsx +75 -0
- package/src/layout/sidebar/SidebarActionIconBar.tsx +242 -0
- package/src/layout/sidebar/SidebarSectionNestingContext.tsx +21 -0
- package/src/layout/sidebar/SidebarSlotChrome.tsx +32 -0
- package/src/layout/sidebar/SidebarToolbar.tsx +10 -0
- package/src/layout/sidebar/WorkbenchActionSidebar.tsx +73 -0
- package/src/layout/{WorkbenchSidebarActions.tsx → sidebar/WorkbenchSidebarActions.tsx} +105 -51
- package/src/layout/sidebar/WorkbenchSidebarSectionStack.tsx +165 -0
- package/src/layout/sidebar/index.css +5 -0
- package/src/layout/sidebar/index.ts +55 -0
- package/src/layout/sidebar/sidebar-chrome.css +95 -0
- package/src/layout/sidebar/sidebar-section-stack.css +25 -0
- package/src/layout/sidebar/sidebar-section.css +124 -0
- package/src/layout/sidebar/sidebar-view.css +290 -0
- package/src/layout/tree/drag-preview.css +25 -0
- package/src/layout/tree/index.css +10 -0
- package/src/layout/tree/template-glyph.css +96 -0
- package/src/layout/tree/tree-action.css +20 -0
- package/src/layout/tree/tree-drag-overlay.css +13 -0
- package/src/layout/tree/tree-drop-line.css +17 -0
- package/src/layout/tree/tree-drop-zone.css +13 -0
- package/src/layout/tree/tree-expander.css +23 -0
- package/src/layout/tree/tree-item.css +93 -0
- package/src/layout/tree/tree.css +49 -0
- package/src/layout/usePreviewViewport.ts +428 -0
- package/src/modal/ConfirmDialog.tsx +1 -1
- package/src/modal/Modal.tsx +148 -305
- package/src/modal/ModalResizeHandles.tsx +40 -0
- package/src/modal/ModalTitlebar.tsx +86 -0
- package/src/modal/modal.css +291 -0
- package/src/modal/modalContainer.ts +36 -0
- package/src/modal/modalPosition.ts +36 -0
- package/src/modal/modalSize.ts +84 -0
- package/src/modal/modalTypes.ts +13 -0
- package/src/modal/useModalContainerViewport.ts +41 -0
- package/src/modal/useModalDrag.ts +118 -0
- package/src/modal/useModalResize.ts +122 -0
- package/src/modal/useModalWindowFrame.ts +122 -0
- package/src/overlay/ContextMenu.tsx +28 -50
- package/src/overlay/clampFixedOverlayPosition.ts +22 -0
- package/src/overlay/context-menu.css +127 -0
- package/src/overlay/index.ts +31 -0
- package/src/overlay/measureAnchoredOverlayPanel.ts +107 -0
- package/src/overlay/overlay.css +2 -0
- package/src/overlay/pointerPassthroughRegion.ts +83 -0
- package/src/overlay/useAnchoredOverlayPanel.ts +222 -0
- package/src/overlay/useClampedFixedOverlayPosition.ts +27 -0
- package/src/overlay/useContextMenuState.ts +59 -0
- package/src/overlay/useFixedOverlayDismiss.ts +49 -0
- package/src/overlay/usePointerPassthroughRegion.ts +85 -0
- package/src/primitives/{AbsoluteBox.tsx → absolute-box/AbsoluteBox.tsx} +1 -1
- package/src/primitives/absolute-box/index.ts +1 -0
- package/src/primitives/{Badge.tsx → badge/Badge.tsx} +4 -2
- package/src/primitives/badge/badge.css +20 -0
- package/src/primitives/badge/index.ts +1 -0
- package/src/primitives/{Button.tsx → button/Button.tsx} +3 -2
- package/src/primitives/button/button.css +76 -0
- package/src/primitives/button/index.ts +1 -0
- package/src/primitives/catalog-browse-card/CatalogBrowseCard.tsx +121 -0
- package/src/primitives/catalog-browse-card/catalog-browse-card.css +175 -0
- package/src/primitives/catalog-browse-card/index.ts +1 -0
- package/src/primitives/catalog-browse-pane/CatalogBrowseFacetChips.tsx +59 -0
- package/src/primitives/catalog-browse-pane/CatalogBrowsePane.tsx +360 -0
- package/src/primitives/catalog-browse-pane/catalog-browse-facet-chips.css +8 -0
- package/src/primitives/catalog-browse-pane/catalog-browse-pane.css +84 -0
- package/src/primitives/catalog-browse-pane/filterCatalogBrowseItems.ts +27 -0
- package/src/primitives/catalog-browse-pane/index.ts +3 -0
- package/src/primitives/catalog-filter-overlay/CatalogFilterOverlay.tsx +73 -0
- package/src/primitives/catalog-filter-overlay/catalog-filter-overlay.css +65 -0
- package/src/primitives/catalog-filter-overlay/index.ts +1 -0
- package/src/primitives/checkbox/Checkbox.tsx +40 -0
- package/src/primitives/checkbox/checkbox.css +81 -0
- package/src/primitives/checkbox/index.ts +1 -0
- package/src/primitives/chip/Chip.tsx +43 -0
- package/src/primitives/chip/chip.css +110 -0
- package/src/primitives/chip/index.ts +2 -0
- package/src/primitives/clearable-text-input/ClearableTextInput.tsx +78 -0
- package/src/primitives/clearable-text-input/clearable-text-input.css +15 -0
- package/src/primitives/clearable-text-input/index.ts +1 -0
- package/src/primitives/codicon/Codicon.tsx +20 -0
- package/src/primitives/codicon/index.ts +1 -0
- package/src/primitives/{EmptyState.tsx → empty-state/EmptyState.tsx} +9 -3
- package/src/primitives/empty-state/empty-state.css +20 -0
- package/src/primitives/empty-state/index.ts +1 -0
- package/src/primitives/external-link-button/ExternalLinkButton.tsx +56 -0
- package/src/primitives/external-link-button/index.ts +1 -0
- package/src/primitives/{Field.tsx → field/Field.tsx} +2 -1
- package/src/primitives/field/field.css +51 -0
- package/src/primitives/field/index.ts +1 -0
- package/src/primitives/file-icon/FileIcon.tsx +21 -0
- package/src/primitives/file-icon/index.ts +1 -0
- package/src/primitives/{IconButton.tsx → icon-button/IconButton.tsx} +6 -4
- package/src/primitives/icon-button/icon-button.css +46 -0
- package/src/primitives/icon-button/index.ts +1 -0
- package/src/primitives/index.ts +210 -50
- package/src/primitives/library-detail-layout/LibraryDetailLayout.tsx +135 -0
- package/src/primitives/library-detail-layout/index.ts +1 -0
- package/src/primitives/library-detail-layout/library-detail-layout.css +169 -0
- package/src/primitives/library-facet-filter-panel/LibraryFacetFilterPanel.tsx +454 -0
- package/src/primitives/library-facet-filter-panel/index.ts +1 -0
- package/src/primitives/library-facet-filter-panel/library-facet-filter-panel.css +205 -0
- package/src/primitives/library-facet-filter-strip/LibraryFacetFilterStrip.tsx +527 -0
- package/src/primitives/library-facet-filter-strip/index.ts +1 -0
- package/src/primitives/library-facet-filter-strip/library-facet-filter-strip.css +31 -0
- package/src/primitives/{List.tsx → list/List.tsx} +15 -6
- package/src/primitives/list/index.ts +1 -0
- package/src/primitives/list/list-empty-state.css +10 -0
- package/src/primitives/list/list-item.css +93 -0
- package/src/primitives/list/list.css +6 -0
- package/src/primitives/number-input/NumberInput.tsx +235 -0
- package/src/primitives/number-input/index.ts +1 -0
- package/src/primitives/number-input/number-input.css +105 -0
- package/src/primitives/panel-loading/PanelLoading.tsx +29 -0
- package/src/primitives/panel-loading/index.ts +1 -0
- package/src/primitives/panel-loading/panel-loading.css +16 -0
- package/src/primitives/panel-surface/panel-surface.css +77 -0
- package/src/primitives/primitives.css +36 -0
- package/src/primitives/record-media-hero/RecordMediaHero.tsx +81 -0
- package/src/primitives/record-media-hero/index.ts +1 -0
- package/src/primitives/record-media-hero/record-media-hero.css +84 -0
- package/src/primitives/scroll-area/ScrollArea.tsx +200 -0
- package/src/primitives/scroll-area/index.ts +1 -0
- package/src/primitives/scroll-area/scroll-area-overlay.css +69 -0
- package/src/primitives/scroll-area-infinite-load/ScrollAreaInfiniteSentinel.tsx +22 -0
- package/src/primitives/scroll-area-infinite-load/index.ts +2 -0
- package/src/primitives/scroll-area-infinite-load/scroll-area-infinite-sentinel.css +6 -0
- package/src/primitives/scroll-area-infinite-load/useScrollAreaInfiniteLoad.ts +84 -0
- package/src/primitives/searchable-multi-select/SearchableMultiSelect.tsx +378 -0
- package/src/primitives/searchable-multi-select/index.ts +9 -0
- package/src/primitives/searchable-multi-select/overlay.ts +125 -0
- package/src/primitives/searchable-multi-select/searchable-multi-select.css +129 -0
- package/src/primitives/select/Select.tsx +21 -3
- package/src/primitives/select/overlay.ts +23 -4
- package/src/primitives/select/select.app.css +5 -2
- package/src/primitives/select/select.css +49 -12
- package/src/primitives/styles.css +3 -952
- package/src/primitives/tabbed-panels/TabbedPanels.tsx +68 -0
- package/src/primitives/tabbed-panels/index.ts +2 -0
- package/src/primitives/tabbed-panels/tabbed-panels.css +58 -0
- package/src/primitives/{TextArea.tsx → text-area/TextArea.tsx} +2 -1
- package/src/primitives/text-area/index.ts +1 -0
- package/src/primitives/{TextInput.tsx → text-input/TextInput.tsx} +2 -1
- package/src/primitives/text-input/index.ts +1 -0
- package/src/primitives/text-input/input.css +54 -0
- package/src/primitives/{Toolbar.tsx → toolbar/Toolbar.tsx} +1 -1
- package/src/primitives/toolbar/index.ts +1 -0
- package/src/primitives/visually-hidden/visually-hidden.css +11 -0
- package/src/primitives/{WorkbenchEditor.tsx → workbench-editor/WorkbenchEditor.tsx} +81 -43
- package/src/primitives/workbench-editor/button-group.css +10 -0
- package/src/primitives/workbench-editor/editor-tabs.css +201 -0
- package/src/primitives/workbench-editor/index.ts +1 -0
- package/src/primitives/workbench-editor/resizable-panels.css +53 -0
- package/src/primitives/workbench-editor/segmented-control.css +98 -0
- package/src/primitives/workbench-media-slot/WorkbenchMediaPlaceholder.tsx +25 -0
- package/src/primitives/workbench-media-slot/WorkbenchMediaSlot.tsx +60 -0
- package/src/primitives/workbench-media-slot/index.ts +2 -0
- package/src/primitives/workbench-media-slot/media-slot.css +72 -0
- package/src/primitives/workbench-thumbnail/WorkbenchThumbnail.tsx +38 -0
- package/src/primitives/workbench-thumbnail/index.ts +1 -0
- package/src/primitives/workbench-thumbnail/thumbnail.css +69 -0
- package/src/scrollbars.css +77 -2
- package/src/styles.css +14 -7735
- package/src/test-utils/workbenchMonacoMock.tsx +37 -0
- package/src/utils/dragMime.ts +89 -0
- package/src/utils/useWorkbenchMediaImage.ts +37 -0
- package/src/widget-asset/WidgetAssetEditor.tsx +9 -7
- package/src/widget-asset/WidgetAssetModeControls.tsx +1 -1
- package/src/widget-asset/WidgetAssetWorkbench.tsx +5 -6
- package/src/widget-studio/create-widget-studio-workspace-editor.tsx +1 -2
- package/src/widget-studio/index.ts +4 -1
- package/src/widget-studio/resolve-widget-studio-asset-catalog.ts +27 -10
- package/src/widget-tree/WidgetAssetPalette.tsx +35 -7
- package/src/widget-tree/WidgetInspectorPanel.tsx +53 -3
- package/src/widget-tree/WidgetSourceEditor.tsx +90 -3
- package/src/widget-tree/WidgetTreeCanvasPreview.tsx +875 -0
- package/src/widget-tree/WidgetTreeLab.tsx +411 -83
- package/src/widget-tree/WidgetTreeModeControls.tsx +30 -1
- package/src/widget-tree/WidgetTreeSidePanel.tsx +24 -34
- package/src/widget-tree/WidgetTreeView.tsx +711 -11
- package/src/widget-tree/WidgetTreeWorkbench.tsx +59 -15
- package/src/widget-tree/WidgetTreeWorkspaceShell.tsx +26 -8
- package/src/widget-tree/index.ts +22 -4
- package/src/widget-tree/widget-placement-asset-dnd.ts +35 -0
- package/src/widget-tree/widget-tree-document.ts +3 -9
- package/src/widget-tree/widget-tree-editor-state.ts +40 -0
- package/src/widget-tree/widget-tree-layout.ts +48 -3
- package/src/widget-tree/widget-tree-play-helpers.ts +69 -58
- package/src/workbench/ActivityBar.tsx +128 -21
- package/src/workbench/ArtifactShell.tsx +8 -8
- package/src/workbench/CommandGroupShell.tsx +131 -0
- package/src/workbench/CommandList.tsx +167 -0
- package/src/workbench/CommandPalette.tsx +194 -596
- package/src/workbench/ConfirmationFlow.tsx +3 -5
- package/src/workbench/MarkdownPreview.tsx +8 -12
- package/src/workbench/ShortcutCommandBridge.tsx +1 -4
- package/src/workbench/SplitView.tsx +385 -36
- package/src/workbench/StatusBar.tsx +4 -2
- package/src/workbench/StructuredArtifactEditor.tsx +3 -3
- package/src/workbench/Timeline.tsx +2 -7
- package/src/workbench/WorkbenchCanvasShell.defaults.ts +106 -0
- package/src/workbench/WorkbenchCanvasShell.model.ts +46 -0
- package/src/workbench/WorkbenchCanvasShell.tsx +32 -146
- package/src/workbench/WorkbenchDesktopTitleBar.tsx +126 -0
- package/src/workbench/WorkbenchEditorTabs.tsx +52 -0
- package/src/workbench/WorkbenchModalPortal.tsx +52 -0
- package/src/workbench/WorkbenchPlatformContext.tsx +31 -0
- package/src/workbench/WorkbenchShell.tsx +144 -26
- package/src/workbench/WorkbenchShellTitleBarLayoutControls.tsx +80 -0
- package/src/workbench/WorkbenchStandaloneShell.tsx +327 -41
- package/src/workbench/WorkbenchThemeProvider.tsx +142 -0
- package/src/workbench/WorkbenchViewEditor.tsx +75 -0
- package/src/workbench/WorkbenchViewSidebar.tsx +85 -0
- package/src/workbench/WorkbenchWindowChromeControls.tsx +290 -0
- package/src/workbench/activityBarOrder.ts +98 -0
- package/src/workbench/appearanceLabels.ts +28 -0
- package/src/workbench/auth/WorkbenchLoginView.tsx +4 -6
- package/src/workbench/auth/auth-flows.css +440 -0
- package/src/workbench/auth/auth.css +3 -0
- package/src/workbench/auth/profile-modals.css +115 -0
- package/src/workbench/bootstrap/WorkbenchBootstrapGate.tsx +45 -0
- package/src/workbench/bootstrap/WorkbenchBootstrapView.tsx +100 -0
- package/src/workbench/bootstrap/index.ts +12 -0
- package/src/workbench/bootstrap/useWorkbenchBootstrap.ts +130 -0
- package/src/workbench/chat/ChatCommandProposalCard.tsx +115 -0
- package/src/workbench/chat/ChatComposer.tsx +32 -34
- package/src/workbench/chat/ChatConversationBar.tsx +134 -0
- package/src/workbench/chat/ChatHistoryMenu.tsx +171 -0
- package/src/workbench/chat/ChatHistoryMenuRow.tsx +74 -0
- package/src/workbench/chat/ChatMessageCollapsible.tsx +115 -0
- package/src/workbench/chat/ChatMessageItem.tsx +293 -19
- package/src/workbench/chat/ChatMessageList.tsx +109 -24
- package/src/workbench/chat/ChatPanel.tsx +132 -19
- package/src/workbench/chat/ChatPhasedRunProgress.tsx +202 -0
- package/src/workbench/chat/ChatRenameDialog.tsx +77 -0
- package/src/workbench/chat/chat-conversation.css +273 -0
- package/src/workbench/chat/chat-ui.css +1124 -0
- package/src/workbench/chat/chat.css +3 -0
- package/src/workbench/chat/chatConversation.ts +46 -0
- package/src/workbench/chat/chatHistoryRowMenuItems.ts +29 -0
- package/src/workbench/chat/chatMessageMeta.tsx +252 -0
- package/src/workbench/chat/chatScroll.ts +22 -0
- package/src/workbench/chat/index.ts +47 -1
- package/src/workbench/chat/slashCommand.ts +5 -7
- package/src/workbench/chat/types.ts +35 -0
- package/src/workbench/chat/useCancelRuntimeOnUnmount.ts +60 -0
- package/src/workbench/chat/useChatPrependPagination.ts +233 -0
- package/src/workbench/chat/useChatRuntimeState.ts +3 -15
- package/src/workbench/chat/useSlashCommandSuggest.ts +76 -23
- package/src/workbench/chrome/index.css +6 -0
- package/src/workbench/chrome/workbench-desktop-titlebar.css +60 -0
- package/src/workbench/chrome/workbench-host.css +85 -0
- package/src/workbench/chrome/workbench-layout-regions.css +42 -0
- package/src/workbench/chrome/workbench-platform-chrome.css +142 -0
- package/src/workbench/chrome/workbench-shell-titlebar.css +124 -0
- package/src/workbench/command-execution-policy.ts +61 -0
- package/src/workbench/command-model.ts +275 -0
- package/src/workbench/command-palette/command-palette.css +156 -0
- package/src/workbench/commands.ts +62 -6
- package/src/workbench/editor-tabs/index.ts +22 -0
- package/src/workbench/editor-tabs-dnd.ts +162 -0
- package/src/workbench/editorTabContextMenu.ts +111 -0
- package/src/workbench/hardReset.ts +64 -0
- package/src/workbench/index.ts +234 -2
- package/src/workbench/jdw/jdw-editors.css +4 -0
- package/src/workbench/jdw/jdw.css +2 -0
- package/src/workbench/management/AccountManagementPanel.tsx +82 -0
- package/src/workbench/management/CommandInspectorPanel.tsx +127 -0
- package/src/workbench/management/CommandManagementPanel.tsx +129 -0
- package/src/workbench/management/CommandManagementSidebar.tsx +318 -0
- package/src/workbench/management/ExtensionManagementPanel.tsx +498 -0
- package/src/workbench/management/ExtensionManagementSidebar.tsx +492 -0
- package/src/workbench/management/IntegrationCommandActions.tsx +78 -0
- package/src/workbench/management/IntegrationSettingsSurface.tsx +290 -0
- package/src/workbench/management/IntegrationsShell.tsx +53 -0
- package/src/workbench/management/KeybindingCaptureField.tsx +142 -0
- package/src/workbench/management/KeybindingManagementPanel.tsx +120 -0
- package/src/workbench/management/LibraryCatalogPickerDialog.tsx +208 -0
- package/src/workbench/management/LibraryFacetFilterDialog.tsx +62 -0
- package/src/workbench/management/ManagementCard.tsx +89 -0
- package/src/workbench/management/ManagementFilterChips.tsx +41 -0
- package/src/workbench/management/ManagementGroup.tsx +56 -0
- package/src/workbench/management/ManagementPanelControls.tsx +43 -0
- package/src/workbench/management/ManagementPanelFrame.tsx +109 -0
- package/src/workbench/management/WorkbenchDialogFrame.tsx +148 -0
- package/src/workbench/management/WorkbenchNotice.tsx +211 -0
- package/src/workbench/management/build-command-management-groups.ts +157 -0
- package/src/workbench/management/command-inspector-uri.ts +26 -0
- package/src/workbench/management/extension-category-display.ts +42 -0
- package/src/workbench/management/format-command-run-state.ts +19 -0
- package/src/workbench/management/index.ts +130 -0
- package/src/workbench/management/integration-command-action.ts +25 -0
- package/src/workbench/management/library-catalog-picker-dialog.css +56 -0
- package/src/workbench/management/library-facet-filter-dialog.css +8 -0
- package/src/workbench/management/management-panel.css +444 -0
- package/src/workbench/management/management.css +4 -0
- package/src/workbench/management/types.ts +126 -0
- package/src/workbench/markdownRemarkPlugins.ts +4 -0
- package/src/workbench/schema/index.ts +0 -1
- package/src/workbench/settings/NavigationPanel.tsx +41 -2
- package/src/workbench/settings/SchemaForm.tsx +20 -7
- package/src/workbench/settings/SectionTabPanel.tsx +172 -0
- package/src/workbench/settings/SectionedPanel.tsx +40 -286
- package/src/workbench/settings/StructuredDataForm.tsx +106 -26
- package/src/workbench/settings/StructuredDataSchemaPanel.tsx +345 -93
- package/src/workbench/settings/StructuredDataTableView.tsx +2 -2
- package/src/workbench/settings/WorkbenchPanelRegion.tsx +1 -1
- package/src/workbench/settings/WorkbenchSettingsModal.tsx +116 -62
- package/src/workbench/settings/WorkbenchSettingsNav.tsx +3 -3
- package/src/workbench/settings/extensionSettingsForm.ts +34 -0
- package/src/workbench/settings/index.ts +36 -1
- package/src/workbench/settings/navigation-panel.css +59 -0
- package/src/workbench/settings/panel-region.css +3 -2
- package/src/workbench/settings/schema-form.css +36 -0
- package/src/workbench/settings/schemaFormSettingSpec.ts +177 -0
- package/src/workbench/settings/schemaFormSettingsCategory.tsx +21 -0
- package/src/workbench/settings/section-tab-panel.css +157 -0
- package/src/workbench/settings/sectionScrollSpyDom.ts +139 -0
- package/src/workbench/settings/sectioned-panel.css +162 -0
- package/src/workbench/settings/sectionedPanelScrollSpy.ts +158 -28
- package/src/workbench/settings/settings-responsive.css +58 -0
- package/src/workbench/settings/settings.css +11 -0
- package/src/workbench/settings/settingsCommit.tsx +55 -0
- package/src/workbench/settings/structured-data-form.css +114 -0
- package/src/workbench/settings/structured-data-schema-panel.css +33 -19
- package/src/workbench/settings/structuredDataFormModel.ts +140 -0
- package/src/workbench/settings/structuredDataSchema.ts +111 -658
- package/src/workbench/settings/structuredDataSchemaDate.ts +197 -0
- package/src/workbench/settings/structuredDataSchemaField.ts +105 -0
- package/src/workbench/settings/structuredDataSchemaSection.ts +74 -0
- package/src/workbench/settings/structuredDataSchemaTable.ts +120 -0
- package/src/workbench/settings/structuredDataSchemaTypes.ts +308 -0
- package/src/workbench/settings/structuredDataSchemaValidation.ts +166 -0
- package/src/workbench/settings/useSectionScrollSpy.ts +420 -0
- package/src/workbench/settings/workbench-settings-modal.css +273 -0
- package/src/workbench/shell/activity-bar.css +245 -0
- package/src/workbench/shell/confirmation-flow.css +87 -0
- package/src/workbench/shell/index.css +5 -0
- package/src/workbench/shell/split-view.css +188 -0
- package/src/workbench/shell/status-bar.css +141 -0
- package/src/workbench/shell.ts +133 -2
- package/src/workbench/shellPresets.ts +36 -0
- package/src/workbench/shellState.ts +16 -23
- package/src/workbench/shellViewModel.ts +160 -0
- package/src/workbench/sidebarViewPlacementDnd.ts +61 -0
- package/src/workbench/standalone.ts +9 -9
- package/src/workbench/status.ts +10 -6
- package/src/workbench/theme.ts +8 -2
- package/src/workbench/themePresets.ts +191 -0
- package/src/workbench/useDeferredWorkbenchMount.ts +71 -0
- package/src/workbench/useEditorTabsStripDnd.ts +262 -0
- package/src/workbench/useWorkbenchAppearanceDocumentSync.tsx +17 -0
- package/src/workbench/useWorkbenchEditorTabContextMenu.tsx +66 -0
- package/src/workbench/useWorkbenchSidebarActionBarDnd.ts +227 -0
- package/src/workbench/useWorkbenchSidebarLayout.tsx +232 -0
- package/src/workbench/useWorkbenchSidebarViewPlacementDropZone.ts +194 -0
- package/src/workbench/useWorkbenchStandaloneShellStateSync.tsx +112 -0
- package/src/workbench/views/action-list.css +144 -0
- package/src/workbench/views/artifact-preview.css +184 -0
- package/src/workbench/views/command-inspector.css +98 -0
- package/src/workbench/views/command-list.css +356 -0
- package/src/workbench/views/commands-sidebar.css +51 -0
- package/src/workbench/views/extensions-sidebar.css +175 -0
- package/src/workbench/views/multi-provider-explorer.css +182 -0
- package/src/workbench/views/search.css +10 -0
- package/src/workbench/views/timeline.css +239 -0
- package/src/workbench/views/view-hosts.css +37 -0
- package/src/workbench/views/view-sidebar.css +21 -0
- package/src/workbench/views/views.css +12 -0
- package/src/workbench/widgets/widget-tree.css +598 -0
- package/src/workbench/widgets/widgets.css +2 -0
- package/src/workbench/workbench-chrome.css +4 -0
- package/src/workbench/workbenchContextMenu.ts +18 -0
- package/src/workbench/workbenchModalViewState.ts +52 -0
- package/src/workbench/workbenchOverlaysContext.tsx +21 -0
- package/src/workbench/workbenchPlatformChrome.ts +40 -0
- package/src/workbench/workbenchSidebarLayoutContext.ts +46 -0
- package/src/workbench/workbenchStandaloneShellReactContext.tsx +80 -0
- package/src/workbench/workbenchViewRouteState.ts +151 -0
- package/src/workbench/workspace/WorkspaceDraftsContext.tsx +59 -71
- package/src/workbench/workspace/WorkspaceEditor.tsx +27 -123
- package/src/workbench/workspace/WorkspaceEditorPanel.tsx +67 -8
- package/src/workbench/workspace/WorkspaceExplorer.tsx +149 -51
- package/src/workbench/workspace/WorkspaceExplorerPanel.tsx +73 -0
- package/src/workbench/workspace/WorkspaceFileIcon.tsx +4 -160
- package/src/workbench/workspace/WorkspacePathLabel.tsx +42 -0
- package/src/workbench/workspace/WorkspaceSearchPanel.tsx +18 -15
- package/src/workbench/workspace/WorkspaceSearchResults.tsx +6 -2
- package/src/workbench/workspace/build-workspace-explorer-nodes.ts +44 -0
- package/src/workbench/workspace/createVirtualWorkspaceExplorerPort.ts +141 -0
- package/src/workbench/workspace/explorer-tree-style.ts +18 -0
- package/src/workbench/workspace/index.ts +45 -32
- package/src/workbench/workspace/json-config-workbench.css +57 -0
- package/src/workbench/workspace/monaco-panel.css +71 -0
- package/src/workbench/workspace/path.ts +2 -0
- package/src/workbench/workspace/useWorkspaceExplorerController.ts +490 -0
- package/src/workbench/workspace/workspace-editor.css +235 -0
- package/src/workbench/workspace/workspace-explorer-panel.css +33 -0
- package/src/workbench/workspace/workspace.css +5 -0
- package/src/workbench/workspace/workspaceExplorerController.ts +193 -0
- package/src/workbench/workspace/workspaceJsonDiagnostics.ts +2 -2
- package/src/workbench-menu-surfaces.css +57 -0
- package/src/jdw/builtins/renderBuiltinWidgetNode.tsx +0 -126
- package/src/layout/SideBarViewFrame.tsx +0 -367
- package/src/primitives/Checkbox.tsx +0 -21
- package/src/primitives/NumberInput.tsx +0 -38
- package/src/primitives/ScrollArea.tsx +0 -42
- package/src/primitives/Select.tsx +0 -1
- package/src/primitives/StatusBar.tsx +0 -46
- package/src/primitives/WorkbenchChrome.tsx +0 -424
- package/src/workbench/workspace/MultiProviderExplorer.tsx +0 -625
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
export const WORKBENCH_SECTIONED_PANEL_SCROLL_SPY_OFFSET = 24;
|
|
2
|
+
export const WORKBENCH_SECTIONED_PANEL_SCROLL_SPY_ACTIVE_LINE_BIAS = 20;
|
|
2
3
|
export const WORKBENCH_SECTIONED_PANEL_SCROLL_THRESHOLD = 2;
|
|
4
|
+
/** Fixed-duration programmatic section scroll (smooth tab/nav clicks). */
|
|
5
|
+
export const WORKBENCH_SECTIONED_PANEL_PROGRAMMATIC_SCROLL_SETTLE_MS_SMOOTH = 700;
|
|
6
|
+
export const WORKBENCH_SECTIONED_PANEL_PROGRAMMATIC_SCROLL_SETTLE_MS_INSTANT = 0;
|
|
7
|
+
|
|
8
|
+
export function resolveWorkbenchSectionedPanelProgrammaticScrollSettleMs(
|
|
9
|
+
behavior: ScrollBehavior = 'smooth',
|
|
10
|
+
): number {
|
|
11
|
+
return behavior === 'smooth'
|
|
12
|
+
? WORKBENCH_SECTIONED_PANEL_PROGRAMMATIC_SCROLL_SETTLE_MS_SMOOTH
|
|
13
|
+
: WORKBENCH_SECTIONED_PANEL_PROGRAMMATIC_SCROLL_SETTLE_MS_INSTANT;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function resolveWorkbenchSectionedPanelClampedScrollTarget({
|
|
17
|
+
clientSize,
|
|
18
|
+
scrollSize,
|
|
19
|
+
targetScrollPosition,
|
|
20
|
+
}: {
|
|
21
|
+
clientSize: number;
|
|
22
|
+
scrollSize: number;
|
|
23
|
+
targetScrollPosition: number;
|
|
24
|
+
}): number {
|
|
25
|
+
const maxScroll = Math.max(0, scrollSize - clientSize);
|
|
26
|
+
return Math.min(Math.max(0, targetScrollPosition), maxScroll);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const WORKBENCH_SECTIONED_PANEL_INTERSECTION_THRESHOLDS = [0, 0.25, 0.5, 0.75, 1] as const;
|
|
30
|
+
|
|
31
|
+
export type WorkbenchSectionedPanelScrollSpyAxis = 'vertical' | 'horizontal';
|
|
3
32
|
|
|
4
33
|
export interface WorkbenchSectionedPanelIntersectionEntry {
|
|
5
34
|
intersectionRatio: number;
|
|
@@ -9,43 +38,108 @@ export interface WorkbenchSectionedPanelIntersectionEntry {
|
|
|
9
38
|
|
|
10
39
|
export interface WorkbenchSectionedPanelScrollPosition {
|
|
11
40
|
anchorId: string;
|
|
12
|
-
top
|
|
41
|
+
/** Section start along the active scroll axis (top or left). */
|
|
42
|
+
start: number;
|
|
43
|
+
/** Section end along the active scroll axis (bottom or right). */
|
|
44
|
+
end: number;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface WorkbenchSectionedPanelScrollMetrics {
|
|
48
|
+
clientSize: number;
|
|
49
|
+
scrollPosition: number;
|
|
50
|
+
scrollSize: number;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function readWorkbenchSectionedPanelScrollMetrics(
|
|
54
|
+
element: HTMLElement,
|
|
55
|
+
axis: WorkbenchSectionedPanelScrollSpyAxis = 'vertical',
|
|
56
|
+
): WorkbenchSectionedPanelScrollMetrics {
|
|
57
|
+
if (axis === 'horizontal') {
|
|
58
|
+
return {
|
|
59
|
+
clientSize: element.clientWidth,
|
|
60
|
+
scrollSize: element.scrollWidth,
|
|
61
|
+
scrollPosition: element.scrollLeft,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
clientSize: element.clientHeight,
|
|
67
|
+
scrollSize: element.scrollHeight,
|
|
68
|
+
scrollPosition: element.scrollTop,
|
|
69
|
+
};
|
|
13
70
|
}
|
|
14
71
|
|
|
15
72
|
export function isWorkbenchSectionedPanelScrollable({
|
|
16
|
-
|
|
17
|
-
|
|
73
|
+
axis = 'vertical',
|
|
74
|
+
clientSize,
|
|
75
|
+
scrollSize,
|
|
18
76
|
threshold = WORKBENCH_SECTIONED_PANEL_SCROLL_THRESHOLD,
|
|
19
77
|
}: {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
78
|
+
axis?: WorkbenchSectionedPanelScrollSpyAxis | undefined;
|
|
79
|
+
clientSize: number;
|
|
80
|
+
scrollSize: number;
|
|
81
|
+
threshold?: number | undefined;
|
|
23
82
|
}): boolean {
|
|
24
|
-
|
|
83
|
+
void axis;
|
|
84
|
+
return scrollSize > clientSize + threshold;
|
|
25
85
|
}
|
|
26
86
|
|
|
87
|
+
export function isWorkbenchSectionedPanelAtScrollStart({
|
|
88
|
+
scrollPosition,
|
|
89
|
+
startThreshold = WORKBENCH_SECTIONED_PANEL_SCROLL_THRESHOLD,
|
|
90
|
+
}: {
|
|
91
|
+
scrollPosition: number;
|
|
92
|
+
startThreshold?: number | undefined;
|
|
93
|
+
}): boolean {
|
|
94
|
+
return scrollPosition <= startThreshold;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function isWorkbenchSectionedPanelAtScrollEnd({
|
|
98
|
+
bottomThreshold = WORKBENCH_SECTIONED_PANEL_SCROLL_THRESHOLD,
|
|
99
|
+
clientSize,
|
|
100
|
+
scrollPosition,
|
|
101
|
+
scrollSize,
|
|
102
|
+
}: {
|
|
103
|
+
bottomThreshold?: number | undefined;
|
|
104
|
+
clientSize: number;
|
|
105
|
+
scrollPosition: number;
|
|
106
|
+
scrollSize: number;
|
|
107
|
+
}): boolean {
|
|
108
|
+
return scrollPosition + clientSize >= scrollSize - bottomThreshold;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** @deprecated Use `isWorkbenchSectionedPanelAtScrollStart`. */
|
|
27
112
|
export function isWorkbenchSectionedPanelAtScrollTop({
|
|
28
113
|
scrollTop,
|
|
29
114
|
topThreshold = WORKBENCH_SECTIONED_PANEL_SCROLL_THRESHOLD,
|
|
30
115
|
}: {
|
|
31
116
|
scrollTop: number;
|
|
32
|
-
topThreshold?: number;
|
|
117
|
+
topThreshold?: number | undefined;
|
|
33
118
|
}): boolean {
|
|
34
|
-
return
|
|
119
|
+
return isWorkbenchSectionedPanelAtScrollStart({
|
|
120
|
+
scrollPosition: scrollTop,
|
|
121
|
+
startThreshold: topThreshold,
|
|
122
|
+
});
|
|
35
123
|
}
|
|
36
124
|
|
|
125
|
+
/** @deprecated Use `isWorkbenchSectionedPanelAtScrollEnd`. */
|
|
37
126
|
export function isWorkbenchSectionedPanelAtScrollBottom({
|
|
38
127
|
bottomThreshold = WORKBENCH_SECTIONED_PANEL_SCROLL_THRESHOLD,
|
|
39
128
|
clientHeight,
|
|
40
129
|
scrollHeight,
|
|
41
130
|
scrollTop,
|
|
42
131
|
}: {
|
|
43
|
-
bottomThreshold?: number;
|
|
132
|
+
bottomThreshold?: number | undefined;
|
|
44
133
|
clientHeight: number;
|
|
45
134
|
scrollHeight: number;
|
|
46
135
|
scrollTop: number;
|
|
47
136
|
}): boolean {
|
|
48
|
-
return
|
|
137
|
+
return isWorkbenchSectionedPanelAtScrollEnd({
|
|
138
|
+
bottomThreshold,
|
|
139
|
+
clientSize: clientHeight,
|
|
140
|
+
scrollPosition: scrollTop,
|
|
141
|
+
scrollSize: scrollHeight,
|
|
142
|
+
});
|
|
49
143
|
}
|
|
50
144
|
|
|
51
145
|
export function resolveWorkbenchSectionedPanelActiveAnchorFromIntersection({
|
|
@@ -79,20 +173,22 @@ export function resolveWorkbenchSectionedPanelActiveAnchorFromIntersection({
|
|
|
79
173
|
}
|
|
80
174
|
|
|
81
175
|
export function resolveWorkbenchSectionedPanelActiveAnchorFromScroll({
|
|
176
|
+
activeLineBias = WORKBENCH_SECTIONED_PANEL_SCROLL_SPY_ACTIVE_LINE_BIAS,
|
|
82
177
|
anchorOrder,
|
|
83
|
-
|
|
178
|
+
clientSize,
|
|
84
179
|
fallbackAnchorId,
|
|
85
180
|
offset = WORKBENCH_SECTIONED_PANEL_SCROLL_SPY_OFFSET,
|
|
86
|
-
|
|
87
|
-
|
|
181
|
+
scrollPosition,
|
|
182
|
+
scrollSize,
|
|
88
183
|
sectionPositions,
|
|
89
184
|
}: {
|
|
185
|
+
activeLineBias?: number | undefined;
|
|
90
186
|
anchorOrder: readonly string[];
|
|
91
|
-
|
|
187
|
+
clientSize: number;
|
|
92
188
|
fallbackAnchorId?: string | undefined;
|
|
93
|
-
offset?: number;
|
|
94
|
-
|
|
95
|
-
|
|
189
|
+
offset?: number | undefined;
|
|
190
|
+
scrollPosition: number;
|
|
191
|
+
scrollSize: number;
|
|
96
192
|
sectionPositions: readonly WorkbenchSectionedPanelScrollPosition[];
|
|
97
193
|
}): string | undefined {
|
|
98
194
|
if (sectionPositions.length === 0) return fallbackAnchorId;
|
|
@@ -100,25 +196,25 @@ export function resolveWorkbenchSectionedPanelActiveAnchorFromScroll({
|
|
|
100
196
|
const firstAnchorId = anchorOrder[0];
|
|
101
197
|
const lastAnchorId = anchorOrder[anchorOrder.length - 1];
|
|
102
198
|
|
|
103
|
-
if (
|
|
199
|
+
if (isWorkbenchSectionedPanelAtScrollStart({ scrollPosition })) {
|
|
104
200
|
return firstAnchorId ?? fallbackAnchorId;
|
|
105
201
|
}
|
|
106
202
|
|
|
107
203
|
if (
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
204
|
+
isWorkbenchSectionedPanelAtScrollEnd({
|
|
205
|
+
clientSize,
|
|
206
|
+
scrollPosition,
|
|
207
|
+
scrollSize,
|
|
112
208
|
})
|
|
113
209
|
) {
|
|
114
210
|
return lastAnchorId ?? fallbackAnchorId;
|
|
115
211
|
}
|
|
116
212
|
|
|
117
|
-
const activeLine =
|
|
118
|
-
let nextActive = fallbackAnchorId;
|
|
213
|
+
const activeLine = scrollPosition + offset + activeLineBias;
|
|
214
|
+
let nextActive = sectionPositions[0]?.anchorId ?? fallbackAnchorId;
|
|
119
215
|
|
|
120
216
|
for (const section of sectionPositions) {
|
|
121
|
-
if (section.
|
|
217
|
+
if (section.start <= activeLine) {
|
|
122
218
|
nextActive = section.anchorId;
|
|
123
219
|
}
|
|
124
220
|
}
|
|
@@ -126,18 +222,52 @@ export function resolveWorkbenchSectionedPanelActiveAnchorFromScroll({
|
|
|
126
222
|
return nextActive ?? fallbackAnchorId;
|
|
127
223
|
}
|
|
128
224
|
|
|
225
|
+
export function shouldPreserveNavClickActiveAnchor({
|
|
226
|
+
pinnedScrollPosition,
|
|
227
|
+
pinnedScrollSize,
|
|
228
|
+
scrollPosition,
|
|
229
|
+
scrollSize,
|
|
230
|
+
threshold = WORKBENCH_SECTIONED_PANEL_SCROLL_THRESHOLD,
|
|
231
|
+
}: {
|
|
232
|
+
pinnedScrollPosition: number;
|
|
233
|
+
pinnedScrollSize: number;
|
|
234
|
+
scrollPosition: number;
|
|
235
|
+
scrollSize: number;
|
|
236
|
+
threshold?: number | undefined;
|
|
237
|
+
}): boolean {
|
|
238
|
+
return (
|
|
239
|
+
Math.abs(scrollPosition - pinnedScrollPosition) <= threshold && scrollSize === pinnedScrollSize
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export function resolveWorkbenchSectionedPanelScrollTarget({
|
|
244
|
+
offset = WORKBENCH_SECTIONED_PANEL_SCROLL_SPY_OFFSET,
|
|
245
|
+
sectionStart,
|
|
246
|
+
}: {
|
|
247
|
+
offset?: number | undefined;
|
|
248
|
+
sectionStart: number;
|
|
249
|
+
}): number {
|
|
250
|
+
return Math.max(0, sectionStart - offset);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/** @deprecated Use `resolveWorkbenchSectionedPanelScrollTarget`. */
|
|
129
254
|
export function resolveWorkbenchSectionedPanelScrollTop({
|
|
130
255
|
offset = WORKBENCH_SECTIONED_PANEL_SCROLL_SPY_OFFSET,
|
|
131
256
|
sectionTop,
|
|
132
257
|
}: {
|
|
133
|
-
offset?: number;
|
|
258
|
+
offset?: number | undefined;
|
|
134
259
|
sectionTop: number;
|
|
135
260
|
}): number {
|
|
136
|
-
return
|
|
261
|
+
return resolveWorkbenchSectionedPanelScrollTarget({ offset, sectionStart: sectionTop });
|
|
137
262
|
}
|
|
138
263
|
|
|
139
264
|
export function createWorkbenchSectionedPanelIntersectionRootMargin(
|
|
140
265
|
offset = WORKBENCH_SECTIONED_PANEL_SCROLL_SPY_OFFSET,
|
|
266
|
+
axis: WorkbenchSectionedPanelScrollSpyAxis = 'vertical',
|
|
141
267
|
) {
|
|
268
|
+
if (axis === 'horizontal') {
|
|
269
|
+
return `0px -55% 0px -${offset}px`;
|
|
270
|
+
}
|
|
271
|
+
|
|
142
272
|
return `-${offset}px 0px -55% 0px`;
|
|
143
273
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
@media (max-width: 760px) {
|
|
2
|
+
.workbench-settings-modal {
|
|
3
|
+
--ui-modal-max-width: 100vw;
|
|
4
|
+
--ui-modal-max-height: 100vh;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.ui-workbench-navigation-panel,
|
|
8
|
+
.ui-workbench-navigation-panel[data-has-nav='true'] {
|
|
9
|
+
grid-template-columns: minmax(0, 1fr);
|
|
10
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.ui-workbench-navigation-panel__nav {
|
|
14
|
+
height: auto;
|
|
15
|
+
border-right: 0;
|
|
16
|
+
border-bottom: 1px solid var(--color-border);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ui-workbench-navigation-panel__nav-scroll.ui-scroll-area--vertical {
|
|
20
|
+
overflow-x: auto;
|
|
21
|
+
overflow-y: hidden;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.workbench-settings-sidebar {
|
|
25
|
+
flex-direction: row;
|
|
26
|
+
padding: 8px 12px;
|
|
27
|
+
border-bottom: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.workbench-settings-nav-item {
|
|
31
|
+
width: auto;
|
|
32
|
+
flex: 0 0 auto;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.workbench-settings-content > .ui-workbench-navigation-panel__content-scroll > * {
|
|
36
|
+
padding-inline: var(--workbench-panel-padding-inline-compact);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ui-workbench-sectioned-panel__nav {
|
|
40
|
+
display: flex;
|
|
41
|
+
padding: 8px 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.ui-workbench-section-tab-panel__scroll,
|
|
45
|
+
.ui-workbench-sectioned-panel__scroll {
|
|
46
|
+
padding-left: var(--workbench-panel-padding-inline-compact);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ui-workbench-structured-data-form__section {
|
|
50
|
+
max-width: none;
|
|
51
|
+
padding: var(--workbench-panel-padding-block-start)
|
|
52
|
+
var(--workbench-panel-padding-inline-compact) var(--workbench-panel-padding-block-end);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ui-workbench-structured-data-form__actions {
|
|
56
|
+
padding-inline: 12px;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* workbench/settings feature styles — Plan A import hub */
|
|
2
|
+
@import './navigation-panel.css';
|
|
3
|
+
@import './sectioned-panel.css';
|
|
4
|
+
@import './section-tab-panel.css';
|
|
5
|
+
@import './structured-data-schema-panel.css';
|
|
6
|
+
@import './structured-data-table-view.css';
|
|
7
|
+
@import './panel-region.css';
|
|
8
|
+
@import './schema-form.css';
|
|
9
|
+
@import './structured-data-form.css';
|
|
10
|
+
@import './workbench-settings-modal.css';
|
|
11
|
+
@import './settings-responsive.css';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { createContext, useContext, type ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* How settings edits are committed from {@link WorkbenchSettingsModal}.
|
|
5
|
+
*
|
|
6
|
+
* - `explicit` (default): host footer Apply/Cancel (or form actions) remain; commit on submit.
|
|
7
|
+
* - `immediate`: hide the modal footer; emit {@link WorkbenchSettingsPreferenceChange} on each edit
|
|
8
|
+
* (VS Code–style apply-on-change). Category content should persist via `onPreferenceChange`
|
|
9
|
+
* or {@link useWorkbenchSettingsCommit}.
|
|
10
|
+
*/
|
|
11
|
+
export type WorkbenchSettingsCommitMode = 'explicit' | 'immediate';
|
|
12
|
+
|
|
13
|
+
export interface WorkbenchSettingsPreferenceChange {
|
|
14
|
+
/** Active settings category id when the change was emitted. */
|
|
15
|
+
categoryId: string;
|
|
16
|
+
/** Preference or field key. */
|
|
17
|
+
key: string;
|
|
18
|
+
/** New value for the key. */
|
|
19
|
+
value: unknown;
|
|
20
|
+
/** Active scope id when the modal exposes scopes. */
|
|
21
|
+
scopeId?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface WorkbenchSettingsCommitContextValue {
|
|
25
|
+
categoryId: string;
|
|
26
|
+
commitMode: WorkbenchSettingsCommitMode;
|
|
27
|
+
onPreferenceChange?: ((change: WorkbenchSettingsPreferenceChange) => void) | undefined;
|
|
28
|
+
scopeId: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const WorkbenchSettingsCommitContext = createContext<WorkbenchSettingsCommitContextValue | null>(
|
|
32
|
+
null,
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
export function WorkbenchSettingsCommitProvider({
|
|
36
|
+
children,
|
|
37
|
+
value,
|
|
38
|
+
}: {
|
|
39
|
+
children: ReactNode;
|
|
40
|
+
value: WorkbenchSettingsCommitContextValue;
|
|
41
|
+
}) {
|
|
42
|
+
return (
|
|
43
|
+
<WorkbenchSettingsCommitContext.Provider value={value}>
|
|
44
|
+
{children}
|
|
45
|
+
</WorkbenchSettingsCommitContext.Provider>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Reads the active settings commit contract from {@link WorkbenchSettingsModal}.
|
|
51
|
+
* Returns `null` when rendered outside the modal.
|
|
52
|
+
*/
|
|
53
|
+
export function useWorkbenchSettingsCommit(): WorkbenchSettingsCommitContextValue | null {
|
|
54
|
+
return useContext(WorkbenchSettingsCommitContext);
|
|
55
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
.ui-workbench-structured-data-form {
|
|
2
|
+
min-width: 0;
|
|
3
|
+
min-height: 0;
|
|
4
|
+
height: 100%;
|
|
5
|
+
display: grid;
|
|
6
|
+
grid-template-rows: minmax(0, 1fr) auto;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.ui-workbench-structured-data-form__panel {
|
|
10
|
+
min-height: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.ui-workbench-structured-data-form__section {
|
|
14
|
+
max-width: 860px;
|
|
15
|
+
padding: var(--workbench-panel-padding-block-start) var(--workbench-panel-padding-inline)
|
|
16
|
+
var(--workbench-panel-padding-block-end) 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ui-workbench-structured-data-form__section + .ui-workbench-structured-data-form__section {
|
|
20
|
+
border-top: 1px solid var(--color-border);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ui-workbench-structured-data-form__section h2 {
|
|
24
|
+
margin: 0;
|
|
25
|
+
color: var(--color-text);
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
letter-spacing: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ui-workbench-structured-data-form__section h2 {
|
|
31
|
+
font-size: 1.2rem;
|
|
32
|
+
line-height: 1.25;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ui-workbench-structured-data-form__section > p {
|
|
36
|
+
max-width: 680px;
|
|
37
|
+
margin: 8px 0 18px;
|
|
38
|
+
color: var(--color-text-muted);
|
|
39
|
+
font-size: var(--font-size-sm);
|
|
40
|
+
line-height: 1.5;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ui-workbench-structured-data-form__fields {
|
|
44
|
+
max-width: 680px;
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
gap: 2px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ui-workbench-structured-data-form__field .ui-field {
|
|
51
|
+
margin-bottom: 14px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.ui-workbench-structured-data-form__field[data-field-type='checkbox'] .ui-field {
|
|
55
|
+
margin-bottom: 10px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ui-workbench-structured-data-form__array-field.ui-field {
|
|
59
|
+
margin-bottom: 14px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ui-workbench-structured-data-form__array {
|
|
63
|
+
display: grid;
|
|
64
|
+
gap: 8px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.ui-workbench-structured-data-form__array-row {
|
|
68
|
+
display: grid;
|
|
69
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
70
|
+
align-items: center;
|
|
71
|
+
gap: 8px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.ui-workbench-structured-data-form__array-empty {
|
|
75
|
+
color: var(--color-text-muted);
|
|
76
|
+
font-size: var(--font-size-sm);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.ui-workbench-structured-data-form__error {
|
|
80
|
+
margin: -8px 0 14px;
|
|
81
|
+
color: var(--color-danger);
|
|
82
|
+
font-size: var(--font-size-xs);
|
|
83
|
+
line-height: 1.4;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.ui-workbench-structured-data-form__warning {
|
|
87
|
+
margin: -8px 0 14px;
|
|
88
|
+
color: var(--color-warning);
|
|
89
|
+
font-size: var(--font-size-xs);
|
|
90
|
+
line-height: 1.4;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.ui-workbench-structured-data-schema-field-input--invalid :is(.ui-input, .ui-select, .ui-textarea) {
|
|
94
|
+
border-color: var(--color-warning);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.ui-workbench-structured-data-form__table-section {
|
|
98
|
+
margin-top: 24px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.ui-workbench-structured-data-form__actions {
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
justify-content: flex-end;
|
|
105
|
+
gap: 8px;
|
|
106
|
+
padding: 12px 16px;
|
|
107
|
+
border-top: 1px solid var(--color-border);
|
|
108
|
+
background: var(--color-bg);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.ui-workbench-structured-data-form[data-readonly='true']
|
|
112
|
+
.ui-workbench-structured-data-form__actions {
|
|
113
|
+
opacity: 0.82;
|
|
114
|
+
}
|
|
@@ -104,19 +104,19 @@
|
|
|
104
104
|
gap: 6px;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
.ui-workbench-
|
|
107
|
+
.ui-workbench-structured-data-schema-panel--fill {
|
|
108
108
|
min-height: 0;
|
|
109
109
|
height: 100%;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
.ui-workbench-sectioned-panel.ui-workbench-structured-data-schema-panel--fill
|
|
113
113
|
.ui-workbench-sectioned-panel__nav-links {
|
|
114
|
-
padding-top:
|
|
114
|
+
padding-top: 0;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
.ui-workbench-
|
|
117
|
+
.ui-workbench-structured-data-schema-panel--fill
|
|
118
118
|
.ui-workbench-structured-data-schema-panel__section:first-child {
|
|
119
|
-
padding-top:
|
|
119
|
+
padding-top: 30px;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
.ui-workbench-structured-data-schema-panel__section {
|
|
@@ -126,13 +126,15 @@
|
|
|
126
126
|
scroll-margin-top: 12px;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
.ui-workbench-
|
|
129
|
+
.ui-workbench-structured-data-schema-panel
|
|
130
|
+
:is(.ui-workbench-section-tab-panel__scroll, .ui-workbench-sectioned-panel__scroll)
|
|
130
131
|
.ui-workbench-structured-data-schema-panel__section
|
|
131
132
|
+ .ui-workbench-structured-data-schema-panel__section {
|
|
132
133
|
border-top: 1px solid var(--color-border);
|
|
133
134
|
}
|
|
134
135
|
|
|
135
|
-
.ui-workbench-
|
|
136
|
+
.ui-workbench-structured-data-schema-panel
|
|
137
|
+
:is(.ui-workbench-section-tab-panel__scroll, .ui-workbench-sectioned-panel__scroll)
|
|
136
138
|
.ui-workbench-structured-data-schema-panel__section:last-child {
|
|
137
139
|
padding-bottom: 16px;
|
|
138
140
|
}
|
|
@@ -229,20 +231,18 @@
|
|
|
229
231
|
line-height: 1.45;
|
|
230
232
|
}
|
|
231
233
|
|
|
232
|
-
.ui-workbench-
|
|
234
|
+
.ui-workbench-structured-data-schema-panel[data-readonly='true']
|
|
233
235
|
:is(.ui-input, .ui-select, .ui-textarea),
|
|
234
|
-
.ui-workbench-
|
|
236
|
+
.ui-workbench-structured-data-schema-panel
|
|
235
237
|
:is(.ui-input:disabled, .ui-select:disabled, .ui-textarea:disabled),
|
|
236
|
-
.ui-workbench-
|
|
237
|
-
:is(.ui-input[readonly], .ui-textarea[readonly]) {
|
|
238
|
+
.ui-workbench-structured-data-schema-panel :is(.ui-input[readonly], .ui-textarea[readonly]) {
|
|
238
239
|
color: var(--color-text-muted);
|
|
239
240
|
background: var(--color-surface);
|
|
240
241
|
}
|
|
241
242
|
|
|
242
|
-
.ui-workbench-
|
|
243
|
+
.ui-workbench-structured-data-schema-panel[data-readonly='true']
|
|
243
244
|
:is(.ui-input, .ui-select, .ui-textarea):focus,
|
|
244
|
-
.ui-workbench-
|
|
245
|
-
:is(.ui-input[readonly], .ui-textarea[readonly]):focus {
|
|
245
|
+
.ui-workbench-structured-data-schema-panel :is(.ui-input[readonly], .ui-textarea[readonly]):focus {
|
|
246
246
|
border-color: var(--color-border);
|
|
247
247
|
outline: none;
|
|
248
248
|
}
|
|
@@ -269,13 +269,12 @@
|
|
|
269
269
|
display: grid;
|
|
270
270
|
grid-auto-columns: minmax(124px, 1fr);
|
|
271
271
|
grid-auto-flow: column;
|
|
272
|
-
align-items:
|
|
273
|
-
border-bottom: 1px solid var(--color-border);
|
|
272
|
+
align-items: stretch;
|
|
274
273
|
color: var(--color-text-muted);
|
|
275
274
|
font-size: 12px;
|
|
276
275
|
}
|
|
277
276
|
|
|
278
|
-
.ui-workbench-structured-data-schema-panel__table-row:last-child {
|
|
277
|
+
.ui-workbench-structured-data-schema-panel__table-row:last-child > span {
|
|
279
278
|
border-bottom: 0;
|
|
280
279
|
}
|
|
281
280
|
|
|
@@ -286,19 +285,25 @@
|
|
|
286
285
|
color: var(--color-text);
|
|
287
286
|
background: var(--color-surface);
|
|
288
287
|
font-weight: 600;
|
|
289
|
-
box-shadow: 0 1px 0 var(--color-border);
|
|
290
288
|
}
|
|
291
289
|
|
|
292
290
|
.ui-workbench-structured-data-schema-panel__table-row--head > span {
|
|
291
|
+
min-height: 36px;
|
|
292
|
+
align-content: center;
|
|
293
293
|
color: var(--color-text-subtle);
|
|
294
294
|
}
|
|
295
295
|
|
|
296
296
|
.ui-workbench-structured-data-schema-panel__table-row > span {
|
|
297
|
+
box-sizing: border-box;
|
|
297
298
|
min-width: 0;
|
|
298
|
-
|
|
299
|
-
|
|
299
|
+
min-height: 44px;
|
|
300
|
+
display: grid;
|
|
301
|
+
align-content: start;
|
|
302
|
+
gap: 5px;
|
|
300
303
|
padding: 8px;
|
|
301
304
|
border-right: 1px solid var(--color-border);
|
|
305
|
+
border-bottom: 1px solid var(--color-border);
|
|
306
|
+
overflow-wrap: anywhere;
|
|
302
307
|
}
|
|
303
308
|
|
|
304
309
|
.ui-workbench-structured-data-schema-panel__table-row > span:last-child {
|
|
@@ -308,10 +313,19 @@
|
|
|
308
313
|
.ui-workbench-structured-data-schema-panel__table-row
|
|
309
314
|
> span
|
|
310
315
|
:is(.ui-input, .ui-select, .ui-textarea) {
|
|
316
|
+
width: 100%;
|
|
311
317
|
min-height: 26px;
|
|
312
318
|
font-size: 12px;
|
|
313
319
|
}
|
|
314
320
|
|
|
321
|
+
.ui-workbench-structured-data-schema-panel__table-row
|
|
322
|
+
> span
|
|
323
|
+
:is(.ui-workbench-structured-data-form__error, .ui-workbench-structured-data-form__warning) {
|
|
324
|
+
margin: 0;
|
|
325
|
+
font-size: 12px;
|
|
326
|
+
line-height: 1.35;
|
|
327
|
+
}
|
|
328
|
+
|
|
315
329
|
.ui-workbench-structured-data-schema-panel__table-actions {
|
|
316
330
|
display: flex;
|
|
317
331
|
justify-content: center;
|