@jini-ai/ui 0.7.3-next.1 → 0.7.3-next.3
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 +9 -0
- package/README.md +3 -3
- package/dist/browser/index.d.ts +2 -0
- package/dist/browser/index.js +2 -0
- package/dist/browser/mount-renderer.d.ts +33 -0
- package/dist/browser/mount-renderer.js +14 -0
- package/dist/browser/useDismissibleDropdown.d.ts +50 -0
- package/dist/browser/useDismissibleDropdown.js +49 -0
- package/dist/core.d.ts +4 -4
- package/dist/core.js +4 -1
- package/dist/features/admin-widgets/components/InfoTip.js +5 -5
- package/dist/features/admin-widgets/components/InfoTip.rules.d.ts +1 -1
- package/dist/features/admin-widgets/components/InfoTip.rules.js +1 -1
- package/dist/features/admin-widgets/components/SeeMore/SeeMore.js +3 -3
- package/dist/features/admin-widgets/components/Select/Select.js +7 -7
- package/dist/features/app-shell/SiteToast.d.ts +24 -0
- package/dist/features/app-shell/SiteToast.js +9 -0
- package/dist/features/app-shell/copyable-details.d.ts +12 -0
- package/dist/features/app-shell/copyable-details.js +17 -0
- package/dist/features/app-shell/expanded-mode.d.ts +76 -0
- package/dist/features/app-shell/expanded-mode.js +70 -0
- package/dist/features/app-shell/index.d.ts +8 -0
- package/dist/features/app-shell/index.js +8 -0
- package/dist/features/app-shell/use-delete-confirmation.hooks.d.ts +48 -0
- package/dist/features/app-shell/use-delete-confirmation.hooks.js +57 -0
- package/dist/features/app-shell/use-expanded-mode.hooks.d.ts +19 -0
- package/dist/features/app-shell/use-expanded-mode.hooks.js +39 -0
- package/dist/features/app-shell/use-site-toast.hooks.d.ts +56 -0
- package/dist/features/app-shell/use-site-toast.hooks.js +44 -0
- package/dist/features/app-shell/use-theme-preference.hooks.d.ts +30 -0
- package/dist/features/app-shell/use-theme-preference.hooks.js +42 -0
- package/dist/features/app-version/use-app-version.d.ts +53 -0
- package/dist/features/app-version/use-app-version.js +42 -0
- package/dist/features/asset-grid/react/components/AssetGrid.d.ts +1 -1
- package/dist/features/asset-grid/react/components/AssetGrid.js +1 -1
- package/dist/features/asset-grid/react/components/DeleteConfirmDialog.d.ts +1 -1
- package/dist/features/asset-grid/react/components/DeleteConfirmDialog.js +1 -1
- package/dist/features/asset-tree-browser/react/components/AssetTreeBrowser.d.ts +2 -2
- package/dist/features/asset-tree-browser/react/components/AssetTreeBrowser.js +1 -1
- package/dist/features/asset-tree-browser/react/components/FilePreviewPane.d.ts +1 -1
- package/dist/features/browser-chrome/react/components/BrowserViewportControls.d.ts +1 -1
- package/dist/features/browser-chrome/react/components/BrowserViewportControls.js +1 -1
- package/dist/features/charts/catalog-manifests.js +1 -1
- package/dist/features/charts/contract.d.ts +1 -1
- package/dist/features/charts/contract.js +1 -1
- package/dist/features/charts/registry.js +1 -1
- package/dist/features/charts/table.js +4 -4
- package/dist/features/charts/wire.d.ts +1 -1
- package/dist/features/charts/wire.js +1 -1
- package/dist/features/command-palette/index.d.ts +1 -0
- package/dist/features/command-palette/index.js +1 -0
- package/dist/features/command-palette/react/components/CommandPalette.d.ts +9 -9
- package/dist/features/command-palette/react/components/CommandPalette.hooks.js +28 -1
- package/dist/features/command-palette/react/components/CommandPalette.js +3 -5
- package/dist/features/connectors/ConnectorsBrowser.d.ts +1 -1
- package/dist/features/connectors/ConnectorsBrowser.js +2 -2
- package/dist/features/connectors/components/ConnectorCard.hooks.js +2 -2
- package/dist/features/connectors/components/ConnectorCard.js +4 -4
- package/dist/features/connectors/components/ConnectorDetailDrawer.d.ts +1 -1
- package/dist/features/connectors/components/ConnectorDetailDrawer.js +7 -7
- package/dist/features/connectors/components/ConnectorGrid.js +1 -1
- package/dist/features/connectors/components/ConnectorLogo.js +1 -1
- package/dist/features/connectors/components/ConnectorSearchBar.js +1 -1
- package/dist/features/connectors/components/ProviderTabBar.js +1 -1
- package/dist/features/execution/claude/env-fields.d.ts +1 -1
- package/dist/features/execution/codex/env-fields.d.ts +1 -1
- package/dist/features/execution/constants.d.ts +2 -2
- package/dist/features/execution/constants.js +1 -1
- package/dist/features/execution/dependencies.d.ts +2 -3
- package/dist/features/execution/http-adapter.d.ts +2 -3
- package/dist/features/execution/index.d.ts +0 -2
- package/dist/features/execution/react/components/AgentCliEnvFields.d.ts +1 -1
- package/dist/features/execution/react/components/AgentDiagnosticRow.d.ts +1 -1
- package/dist/features/execution/react/components/AgentDiagnosticRow.js +3 -1
- package/dist/features/execution/react/components/ByokProviderForm.d.ts +10 -2
- package/dist/features/execution/react/components/ByokProviderForm.hooks.d.ts +2 -2
- package/dist/features/execution/react/components/ByokProviderForm.js +15 -4
- package/dist/features/execution/react/components/ExecutionTab.d.ts +2 -3
- package/dist/features/execution/react/components/ExecutionTab.hooks.d.ts +14 -4
- package/dist/features/execution/react/components/ExecutionTab.hooks.js +66 -9
- package/dist/features/execution/react/components/ExecutionTab.js +27 -10
- package/dist/features/execution/react/components/LocalCliAgentCard.d.ts +4 -4
- package/dist/features/execution/react/components/LocalCliAgentList.d.ts +4 -4
- package/dist/features/execution/react/components/LocalCliAgentList.hooks.d.ts +3 -3
- package/dist/features/execution/react/components/LocalCliAgentSettings.d.ts +2 -2
- package/dist/features/execution/react/components/ProviderChipGroup.d.ts +1 -1
- package/dist/features/execution/react/components/SearchableModelSelect.d.ts +1 -1
- package/dist/features/execution/react/hooks/use-byok-field-validation.hooks.d.ts +2 -2
- package/dist/features/execution/react/hooks/use-execution-credential.hooks.d.ts +1 -1
- package/dist/features/execution/react/hooks/useExecutionTab.d.ts +2 -3
- package/dist/features/execution/react/hooks/useLocalCliAgentCard.d.ts +4 -4
- package/dist/features/execution/react/hooks/useLocalCliAgentList.d.ts +4 -4
- package/dist/features/execution/react/hooks/useReasoningControl.d.ts +3 -3
- package/dist/features/execution/rules.d.ts +6 -6
- package/dist/features/execution/rules.js +1 -1
- package/dist/features/external-mcp/react/components/ExternalMcpTab.js +4 -4
- package/dist/features/file-dropzone/react/components/FileDropzone.d.ts +1 -1
- package/dist/features/file-dropzone/react/components/FileDropzone.js +1 -1
- package/dist/features/find/find-bar-state.d.ts +58 -0
- package/dist/features/find/find-bar-state.js +45 -0
- package/dist/features/find/find-focus-clock.d.ts +19 -0
- package/dist/features/find/find-focus-clock.js +9 -0
- package/dist/features/find/find-input-focus.d.ts +88 -0
- package/dist/features/find/find-input-focus.js +88 -0
- package/dist/features/find/find-target.d.ts +141 -0
- package/dist/features/find/find-target.js +160 -0
- package/dist/features/find/index.d.ts +10 -0
- package/dist/features/find/index.js +10 -0
- package/dist/features/find/use-find-bar-effects.hooks.d.ts +14 -0
- package/dist/features/find/use-find-bar-effects.hooks.js +92 -0
- package/dist/features/find/use-find-bar-state.hooks.d.ts +43 -0
- package/dist/features/find/use-find-bar-state.hooks.js +49 -0
- package/dist/features/find/use-find-focus-reclaim.hooks.d.ts +21 -0
- package/dist/features/find/use-find-focus-reclaim.hooks.js +64 -0
- package/dist/features/find/use-find-input-binding.hooks.d.ts +18 -0
- package/dist/features/find/use-find-input-binding.hooks.js +76 -0
- package/dist/features/find-bar/FindBar.d.ts +41 -0
- package/dist/features/find-bar/FindBar.js +31 -0
- package/dist/features/find-bar/index.d.ts +2 -0
- package/dist/features/find-bar/index.js +2 -0
- package/dist/features/folder-path-drop/index.d.ts +3 -1
- package/dist/features/folder-path-drop/index.js +1 -0
- package/dist/features/folder-path-drop/react/hooks/useClassifiedPathDrop.d.ts +50 -0
- package/dist/features/folder-path-drop/react/hooks/useClassifiedPathDrop.js +50 -0
- package/dist/features/folder-path-drop/types.d.ts +14 -0
- package/dist/features/i18n/context.d.ts +1 -1
- package/dist/features/i18n/context.js +1 -1
- package/dist/features/iframe-pool/react/dom-sync.d.ts +13 -3
- package/dist/features/iframe-pool/react/dom-sync.js +7 -7
- package/dist/features/import-handoff/use-import-handoff.d.ts +38 -0
- package/dist/features/import-handoff/use-import-handoff.js +40 -0
- package/dist/features/integrations/rules.js +39 -41
- package/dist/features/interactive-ui/interactive-ui.css +1 -1
- package/dist/features/interactive-ui/providers/native/data-table.js +1 -1
- package/dist/features/interactive-ui/providers/native/data-table.manifest.d.ts +1 -1
- package/dist/features/interactive-ui/providers/native/data-table.manifest.js +1 -1
- package/dist/features/interactive-ui/providers/shadcn/action-button.manifest.d.ts +1 -1
- package/dist/features/interactive-ui/providers/shadcn/action-button.manifest.js +1 -1
- package/dist/features/interactive-ui/providers/shadcn/checkbox-field.js +1 -1
- package/dist/features/interactive-ui/providers/shadcn/checkbox-field.manifest.d.ts +1 -1
- package/dist/features/interactive-ui/providers/shadcn/checkbox-field.manifest.js +1 -1
- package/dist/features/interactive-ui/providers/shadcn/content-card.manifest.d.ts +1 -1
- package/dist/features/interactive-ui/providers/shadcn/content-card.manifest.js +1 -1
- package/dist/features/interactive-ui/providers/shadcn/data-table.js +3 -3
- package/dist/features/interactive-ui/providers/shadcn/data-table.manifest.d.ts +1 -1
- package/dist/features/interactive-ui/providers/shadcn/data-table.manifest.js +1 -1
- package/dist/features/interactive-ui/providers/shadcn/radio-group-field.js +1 -1
- package/dist/features/interactive-ui/providers/shadcn/radio-group-field.manifest.d.ts +1 -1
- package/dist/features/interactive-ui/providers/shadcn/radio-group-field.manifest.js +1 -1
- package/dist/features/interactive-ui/providers/shadcn/select-field.manifest.d.ts +1 -1
- package/dist/features/interactive-ui/providers/shadcn/select-field.manifest.js +1 -1
- package/dist/features/interactive-ui/providers/shadcn/text-input-field.manifest.d.ts +1 -1
- package/dist/features/interactive-ui/providers/shadcn/text-input-field.manifest.js +1 -1
- package/dist/features/interactive-ui/types.d.ts +1 -1
- package/dist/features/live-views/index.d.ts +6 -0
- package/dist/features/live-views/index.js +6 -0
- package/dist/features/live-views/use-live-views.d.ts +31 -0
- package/dist/features/live-views/use-live-views.js +88 -0
- package/dist/features/live-views/use-site-view-preference.d.ts +33 -0
- package/dist/features/live-views/use-site-view-preference.js +32 -0
- package/dist/features/live-views/use-webview-load-failure.d.ts +90 -0
- package/dist/features/live-views/use-webview-load-failure.js +122 -0
- package/dist/features/mcp-ui/credential-card.d.ts +1 -0
- package/dist/features/mcp-ui/credential-card.js +1 -1
- package/dist/features/mcp-ui/surfaces/tool-approval.d.ts +10 -0
- package/dist/features/mcp-ui/surfaces/tool-approval.js +15 -0
- package/dist/features/media-providers/dependencies.d.ts +7 -1
- package/dist/features/media-providers/dependencies.js +43 -0
- package/dist/features/media-providers/index.d.ts +2 -2
- package/dist/features/media-providers/index.js +1 -1
- package/dist/features/media-providers/ports.d.ts +39 -5
- package/dist/features/media-providers/react/components/MediaProvidersTab.d.ts +4 -3
- package/dist/features/media-providers/react/components/MediaProvidersTab.js +1 -1
- package/dist/features/media-providers/react/hooks/useMediaProvidersTab.d.ts +3 -2
- package/dist/features/media-providers/react/hooks/useMediaProvidersTab.js +41 -3
- package/dist/features/memory/react/components/MemoryConnectedPanel.js +2 -2
- package/dist/features/memory/react/components/MemoryEntryCard.js +1 -1
- package/dist/features/memory/react/components/MemoryHooksPanel.js +2 -2
- package/dist/features/memory/react/components/MemoryList.js +2 -2
- package/dist/features/memory/react/components/MemorySettingsPanel.js +2 -2
- package/dist/features/memory/react/components/MemorySuggestionPanel.js +1 -1
- package/dist/features/memory/react/hooks/useMemoryConnectors.hooks.js +3 -3
- package/dist/features/memory/react/hooks/useMemoryConnectors.rules.d.ts +4 -1
- package/dist/features/memory/react/hooks/useMemoryConnectors.rules.js +1 -1
- package/dist/features/memory/react/render-markdown.js +1 -1
- package/dist/features/nav-availability/nav-availability.d.ts +18 -0
- package/dist/features/nav-availability/nav-availability.js +12 -0
- package/dist/features/number-stepper/NumberStepper.d.ts +39 -0
- package/dist/features/number-stepper/NumberStepper.js +16 -0
- package/dist/features/number-stepper/index.d.ts +5 -0
- package/dist/features/number-stepper/index.js +5 -0
- package/dist/features/number-stepper/number-stepper.d.ts +34 -0
- package/dist/features/number-stepper/number-stepper.js +32 -0
- package/dist/features/number-stepper/use-number-stepper.hooks.d.ts +20 -0
- package/dist/features/number-stepper/use-number-stepper.hooks.js +29 -0
- package/dist/features/number-stepper/use-optimistic-number-setting.hooks.d.ts +36 -0
- package/dist/features/number-stepper/use-optimistic-number-setting.hooks.js +25 -0
- package/dist/features/panel-kit/ErrorNotice.js +8 -1
- package/dist/features/panel-kit/helpers/standing-draft-local-backup.d.ts +1 -1
- package/dist/features/panel-kit/helpers/standing-draft-recovery-message.d.ts +1 -1
- package/dist/features/panel-kit/hooks/use-standing-draft-autosave.hooks.d.ts +1 -37
- package/dist/features/panel-kit/hooks/use-standing-draft-recovery.hooks.d.ts +2 -1
- package/dist/features/panel-kit/hooks/use-standing-draft-state.hooks.d.ts +2 -1
- package/dist/features/panel-kit/hooks/use-standing-draft-writes.hooks.d.ts +2 -1
- package/dist/features/panel-kit/index.d.ts +2 -1
- package/dist/features/privacy/react/components/PrivacyTab.d.ts +1 -1
- package/dist/features/privacy/react/components/PrivacyTab.js +1 -1
- package/dist/features/progress-card/components/ProgressCard.d.ts +1 -1
- package/dist/features/progress-card/components/ProgressCard.js +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceBoard.d.ts +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceBoardToolbar.d.ts +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceBoardToolbar.js +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceCardParts.d.ts +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceCardParts.js +7 -2
- package/dist/features/resource-dashboard/react/components/ResourceRowListView.d.ts +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceRowListView.js +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceRunHistoryList.d.ts +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceRunHistoryList.js +1 -1
- package/dist/features/resource-dashboard/react/components/StatusPill.d.ts +1 -1
- package/dist/features/resource-dashboard/react/components/StatusPill.js +1 -1
- package/dist/features/resource-dashboard/react/hooks/useResourceBoard.js +6 -1
- package/dist/features/resource-monitor/ResourceTable.d.ts +67 -0
- package/dist/features/resource-monitor/ResourceTable.js +25 -0
- package/dist/features/resource-monitor/index.d.ts +4 -0
- package/dist/features/resource-monitor/index.js +4 -0
- package/dist/features/resource-monitor/resource-stop.d.ts +16 -0
- package/dist/features/resource-monitor/resource-stop.js +11 -0
- package/dist/features/resource-monitor/use-resource-readings.hooks.d.ts +44 -0
- package/dist/features/resource-monitor/use-resource-readings.hooks.js +91 -0
- package/dist/features/settings/dialog/styles/settings-dialog.css +251 -251
- package/dist/features/site-card/index.d.ts +4 -1
- package/dist/features/site-card/index.js +3 -0
- package/dist/features/site-card/use-created-site-return.hooks.d.ts +36 -0
- package/dist/features/site-card/use-created-site-return.hooks.js +43 -0
- package/dist/features/site-card/use-site-card-preview.hooks.d.ts +39 -0
- package/dist/features/site-card/use-site-card-preview.hooks.js +31 -0
- package/dist/features/site-card/use-site-list-prefs.hooks.d.ts +29 -8
- package/dist/features/site-card/use-site-list-prefs.hooks.js +56 -9
- package/dist/features/site-card/use-site-preview.hooks.d.ts +67 -0
- package/dist/features/site-card/use-site-preview.hooks.js +94 -0
- package/dist/features/sketch-editor/react/components/SketchEditor.d.ts +2 -2
- package/dist/features/sketch-editor/react/components/SketchEditor.js +1 -1
- package/dist/features/skills/react/components/SkillRow.js +1 -1
- package/dist/features/source-config-list/react/components/SourceConfigAddForm.js +2 -2
- package/dist/features/source-config-list/react/components/SourceConfigField.js +1 -1
- package/dist/features/source-config-list/react/components/SourceConfigItemCard.js +5 -5
- package/dist/features/source-config-list/react/components/SourceConfigList.d.ts +1 -1
- package/dist/features/source-config-list/react/components/SourceConfigList.js +1 -1
- package/dist/features/source-config-list/react/components/SourceConfigListView.js +3 -3
- package/dist/features/source-config-list/react/components/SourceConfigTestControl.d.ts +1 -1
- package/dist/features/source-config-list/react/components/SourceConfigTestControl.js +1 -1
- package/dist/features/tab-launcher-menu/react/components/TabLauncherMenu.d.ts +1 -1
- package/dist/features/tab-launcher-menu/react/components/TabLauncherMenu.js +1 -1
- package/dist/features/tab-strip/react/components/TabBar.js +2 -2
- package/dist/features/tab-strip/react/components/TabStrip.d.ts +1 -1
- package/dist/features/tab-strip/react/components/TabStrip.js +1 -1
- package/dist/features/tab-strip/scrollable.js +0 -2
- package/dist/features/tabbed-dialog/react/components/TabbedDialog.d.ts +1 -1
- package/dist/features/tabbed-dialog/react/components/TabbedDialog.js +1 -1
- package/dist/features/version-manager/react/components/VersionManagerModal.d.ts +1 -1
- package/dist/features/version-manager/react/components/VersionManagerModal.js +1 -1
- package/dist/features/viewer-shell/react/components/CommentSidePanel.d.ts +2 -2
- package/dist/features/viewer-shell/react/components/CommentSidePanel.js +1 -1
- package/dist/features/viewer-shell/react/components/MarkdownSplitPane.d.ts +1 -1
- package/dist/features/viewer-shell/react/components/MarkdownSplitPane.js +1 -1
- package/dist/features/viewer-shell/react/components/SegmentedToggle.d.ts +1 -1
- package/dist/features/viewer-shell/react/components/SegmentedToggle.js +1 -1
- package/dist/features/viewer-shell/react/components/ViewportSwitcher.d.ts +1 -1
- package/dist/features/viewer-shell/react/components/ViewportSwitcher.js +1 -1
- package/dist/features/viewer-shell/react/components/ViewportToggleGroup.d.ts +1 -1
- package/dist/features/viewer-shell/react/components/ViewportToggleGroup.js +1 -1
- package/dist/features/zoom/use-zoom.d.ts +141 -0
- package/dist/features/zoom/use-zoom.js +204 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/react/components/ComponentKitPreview.d.ts +1 -1
- package/dist/react/components/ComponentKitPreview.js +1 -1
- package/dist/react/components/CustomSelect.js +1 -1
- package/dist/react/components/ExportDiagnosticsButton.d.ts +6 -2
- package/dist/react/components/ExportDiagnosticsButton.js +3 -3
- package/dist/react/components/FileImportPanel.js +1 -1
- package/dist/react/components/IconFrame.d.ts +15 -0
- package/dist/react/components/IconFrame.js +11 -0
- package/dist/react/components/ImportChoice.js +1 -1
- package/dist/react/components/Notice.js +1 -1
- package/dist/react/components/OnboardingDropdown.js +1 -1
- package/dist/react/components/PaletteTweaks.js +1 -1
- package/dist/react/components/TooltipLayer.d.ts +13 -3
- package/dist/react/components/TooltipLayer.js +12 -12
- package/dist/react/mcp-ui/host-message-source.d.ts +3 -1
- package/dist/react/mcp-ui/host-message-source.js +1 -1
- package/dist/react/testing.js +3 -1
- package/dist/renderers/annotation-canvas/rules.js +30 -27
- package/dist/renderers/react/components/ArtifactView.js +1 -1
- package/dist/renderers/renderers/markdown.d.ts +3 -1
- package/dist/renderers/renderers/markdown.js +2 -2
- package/dist/styles/admin.css +54 -54
- package/dist/utils/zip.js +43 -36
- package/package.json +70 -13
- package/dist/features/execution/ports.d.ts +0 -71
- package/dist/features/execution/ports.js +0 -2
- package/dist/features/execution/types.d.ts +0 -472
- package/dist/features/execution/types.js +0 -2
- package/dist/react/components/CustomSelectMarkup.d.ts +0 -27
- package/dist/react/components/CustomSelectMarkup.js +0 -35
|
@@ -2,6 +2,9 @@ export { SiteCard, SiteCardStatus, type SiteCardProps, type SiteCardTone } from
|
|
|
2
2
|
export { SiteCardPin, SiteListToolbar, type SiteListToolbarCopy } from "./SiteListToolbar.js";
|
|
3
3
|
export { useSiteListView, type SiteListController } from "./use-site-list-view.hooks.js";
|
|
4
4
|
export { DEFAULT_SITE_LIST_PREFS, parseSiteListPrefs, type SiteListFilter, type SiteListItem, type SiteListPrefs, type SiteListSort } from "./site-list-view.js";
|
|
5
|
-
export { useSiteListPrefs, type SiteListPrefsController, type SiteListPrefsPort } from "./use-site-list-prefs.hooks.js";
|
|
5
|
+
export { useSiteListPrefs, type SiteListPrefsController, type SiteListPrefsPort, type UseSiteListPrefsOptions } from "./use-site-list-prefs.hooks.js";
|
|
6
6
|
export { isCardOpenKey, cardOpenProps, closeMenuThen, duplicateDisplayNames, type CardOpenKeyEvent } from "./rules.js";
|
|
7
|
+
export { useSitePreview, previewFetchPlan, nextPreviewUrl, type PreviewFetchPlan, type SitePreviewBridge } from "./use-site-preview.hooks.js";
|
|
8
|
+
export { resolveSiteCardPreview, useSiteCardPreview, type SiteCardPreviewArgs, type SiteCardPreviewSite, type SiteCardPreviewSnapshot, type SiteCardPreviewUrl, type SiteCardPreviewView } from "./use-site-card-preview.hooks.js";
|
|
9
|
+
export { useReturnToSiteListOnCreate } from "./use-created-site-return.hooks.js";
|
|
7
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -4,4 +4,7 @@ export { useSiteListView } from "./use-site-list-view.hooks.js";
|
|
|
4
4
|
export { DEFAULT_SITE_LIST_PREFS, parseSiteListPrefs } from "./site-list-view.js";
|
|
5
5
|
export { useSiteListPrefs } from "./use-site-list-prefs.hooks.js";
|
|
6
6
|
export { isCardOpenKey, cardOpenProps, closeMenuThen, duplicateDisplayNames } from "./rules.js";
|
|
7
|
+
export { useSitePreview, previewFetchPlan, nextPreviewUrl } from "./use-site-preview.hooks.js";
|
|
8
|
+
export { resolveSiteCardPreview, useSiteCardPreview } from "./use-site-card-preview.hooks.js";
|
|
9
|
+
export { useReturnToSiteListOnCreate } from "./use-created-site-return.hooks.js";
|
|
7
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file The one behavior the owner named that neither the controller nor the markup owns on its
|
|
3
|
+
* own: **a successful create returns to the "All sites" tab, where the new site's card is.**
|
|
4
|
+
*
|
|
5
|
+
* Her words: *"the new website will be a tab with a list that will create a new website. That
|
|
6
|
+
* should go back to the first tab, and then we should see the new website created there."*
|
|
7
|
+
*
|
|
8
|
+
* It lives here rather than in the host's sites controller hook because that controller knows nothing about
|
|
9
|
+
* tabs or the router — it reports `createdName` and stops — and it cannot live in the host's Sites screen,
|
|
10
|
+
* which carries no logic of its own (the host's `.tsx` rule). A separate hook also keeps the
|
|
11
|
+
* removal reversible: deleting this one call restores the previous "stay on the form" behavior
|
|
12
|
+
* without touching the create path itself.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Calls `returnToList` on the TRANSITION into a created state, never on the state itself.
|
|
16
|
+
*
|
|
17
|
+
* The distinction is the whole point. A plain `if (createdName !== null)` effect would also fire on
|
|
18
|
+
* MOUNT whenever `createdName` is already set — a remount while a "Created" line is still up, or a
|
|
19
|
+
* test rendering that state directly — and yank the operator off whichever tab they deliberately
|
|
20
|
+
* opened. Seeding the ref with the value present at mount makes the first run a no-op by
|
|
21
|
+
* construction rather than by a separate `mounted` flag.
|
|
22
|
+
*
|
|
23
|
+
* `createSite`'s success handler sets a fresh `createdName` on every create, and `setCreateName`
|
|
24
|
+
* clears it back to `null` on the next edit, so two creates in a row are two distinct transitions
|
|
25
|
+
* (`null` -> `a`, `null` -> `b`) rather than one.
|
|
26
|
+
*
|
|
27
|
+
* @param required.createdName The controller's `createdName` — the site the last successful create made.
|
|
28
|
+
* @param required.returnToList Navigates to the "All sites" tab. Must be referentially stable (a
|
|
29
|
+
* module-level function in the host's Sites screen), or the effect re-runs every render.
|
|
30
|
+
* @complexity Time/space: O(1).
|
|
31
|
+
*/
|
|
32
|
+
export declare function useReturnToSiteListOnCreate({ createdName, returnToList }: {
|
|
33
|
+
createdName: string | null;
|
|
34
|
+
returnToList: () => void;
|
|
35
|
+
}, _optional?: {}): void;
|
|
36
|
+
//# sourceMappingURL=use-created-site-return.hooks.d.ts.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useEffect, useRef } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* @file The one behavior the owner named that neither the controller nor the markup owns on its
|
|
4
|
+
* own: **a successful create returns to the "All sites" tab, where the new site's card is.**
|
|
5
|
+
*
|
|
6
|
+
* Her words: *"the new website will be a tab with a list that will create a new website. That
|
|
7
|
+
* should go back to the first tab, and then we should see the new website created there."*
|
|
8
|
+
*
|
|
9
|
+
* It lives here rather than in the host's sites controller hook because that controller knows nothing about
|
|
10
|
+
* tabs or the router — it reports `createdName` and stops — and it cannot live in the host's Sites screen,
|
|
11
|
+
* which carries no logic of its own (the host's `.tsx` rule). A separate hook also keeps the
|
|
12
|
+
* removal reversible: deleting this one call restores the previous "stay on the form" behavior
|
|
13
|
+
* without touching the create path itself.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Calls `returnToList` on the TRANSITION into a created state, never on the state itself.
|
|
17
|
+
*
|
|
18
|
+
* The distinction is the whole point. A plain `if (createdName !== null)` effect would also fire on
|
|
19
|
+
* MOUNT whenever `createdName` is already set — a remount while a "Created" line is still up, or a
|
|
20
|
+
* test rendering that state directly — and yank the operator off whichever tab they deliberately
|
|
21
|
+
* opened. Seeding the ref with the value present at mount makes the first run a no-op by
|
|
22
|
+
* construction rather than by a separate `mounted` flag.
|
|
23
|
+
*
|
|
24
|
+
* `createSite`'s success handler sets a fresh `createdName` on every create, and `setCreateName`
|
|
25
|
+
* clears it back to `null` on the next edit, so two creates in a row are two distinct transitions
|
|
26
|
+
* (`null` -> `a`, `null` -> `b`) rather than one.
|
|
27
|
+
*
|
|
28
|
+
* @param required.createdName The controller's `createdName` — the site the last successful create made.
|
|
29
|
+
* @param required.returnToList Navigates to the "All sites" tab. Must be referentially stable (a
|
|
30
|
+
* module-level function in the host's Sites screen), or the effect re-runs every render.
|
|
31
|
+
* @complexity Time/space: O(1).
|
|
32
|
+
*/
|
|
33
|
+
export function useReturnToSiteListOnCreate({ createdName, returnToList }, _optional = {}) {
|
|
34
|
+
const lastSeen = useRef(createdName);
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
const previous = lastSeen.current;
|
|
37
|
+
lastSeen.current = createdName;
|
|
38
|
+
if (createdName === null || createdName === previous)
|
|
39
|
+
return;
|
|
40
|
+
returnToList();
|
|
41
|
+
}, [createdName, returnToList]);
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=use-created-site-return.hooks.js.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** The one field of a listed site the preview reads. */
|
|
2
|
+
export interface SiteCardPreviewSite {
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
|
+
/** The one field of the host's listing snapshot the preview reads. */
|
|
6
|
+
export interface SiteCardPreviewSnapshot {
|
|
7
|
+
/** Capture version per site name; absent from an older server, missing for a never-captured site. */
|
|
8
|
+
previewVersions?: Record<string, number>;
|
|
9
|
+
}
|
|
10
|
+
/** Host-built address of a site's captured preview at one version. */
|
|
11
|
+
export type SiteCardPreviewUrl = (args: {
|
|
12
|
+
name: string;
|
|
13
|
+
version: number;
|
|
14
|
+
}) => string;
|
|
15
|
+
export interface SiteCardPreviewView {
|
|
16
|
+
/** The image to show, or `null` for the placeholder (no capture yet, or an older server). */
|
|
17
|
+
src: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface SiteCardPreviewArgs {
|
|
20
|
+
site: SiteCardPreviewSite;
|
|
21
|
+
snapshot: SiteCardPreviewSnapshot;
|
|
22
|
+
/** Injected by the host: the preview address for a site name and capture version. */
|
|
23
|
+
urlFor: SiteCardPreviewUrl;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Pure: the card preview for `site` from the listing's version tokens.
|
|
27
|
+
* @complexity O(1).
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveSiteCardPreview({ site, snapshot, urlFor }: SiteCardPreviewArgs, _optional?: Record<string, never>): SiteCardPreviewView;
|
|
30
|
+
/**
|
|
31
|
+
* {@link resolveSiteCardPreview} plus the one piece of state it needs: an image URL that failed to
|
|
32
|
+
* load falls back to the placeholder until a new capture changes the URL, so a broken or deleted
|
|
33
|
+
* file never leaves the browser's broken-image glyph on a card.
|
|
34
|
+
* @complexity O(1) per render.
|
|
35
|
+
*/
|
|
36
|
+
export declare function useSiteCardPreview(required: SiteCardPreviewArgs, _optional?: Record<string, never>): SiteCardPreviewView & {
|
|
37
|
+
onError: () => void;
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=use-site-card-preview.hooks.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file A site card's preview image: which URL to show, and the placeholder when there is none.
|
|
3
|
+
*
|
|
4
|
+
* The host's listing snapshot carries only a version token per site (`previewVersions`), never the
|
|
5
|
+
* bytes; the image is fetched by the browser itself from a URL that embeds that version, so a
|
|
6
|
+
* repeated listing poll re-renders the same `src` and costs no request, and a new capture is a new
|
|
7
|
+
* URL. The host's server decides when to capture, and the host builds the address (`urlFor`): this
|
|
8
|
+
* feature never knows the host's routes or workspace layout.
|
|
9
|
+
*/
|
|
10
|
+
import { useCallback, useState } from "react";
|
|
11
|
+
/**
|
|
12
|
+
* Pure: the card preview for `site` from the listing's version tokens.
|
|
13
|
+
* @complexity O(1).
|
|
14
|
+
*/
|
|
15
|
+
export function resolveSiteCardPreview({ site, snapshot, urlFor }, _optional = {}) {
|
|
16
|
+
const version = snapshot.previewVersions?.[site.name];
|
|
17
|
+
return { src: version === undefined ? null : urlFor({ name: site.name, version }) };
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* {@link resolveSiteCardPreview} plus the one piece of state it needs: an image URL that failed to
|
|
21
|
+
* load falls back to the placeholder until a new capture changes the URL, so a broken or deleted
|
|
22
|
+
* file never leaves the browser's broken-image glyph on a card.
|
|
23
|
+
* @complexity O(1) per render.
|
|
24
|
+
*/
|
|
25
|
+
export function useSiteCardPreview(required, _optional = {}) {
|
|
26
|
+
const view = resolveSiteCardPreview(required);
|
|
27
|
+
const [failedSrc, setFailedSrc] = useState(null);
|
|
28
|
+
const onError = useCallback(() => setFailedSrc(view.src), [view.src]);
|
|
29
|
+
return { src: view.src === failedSrc ? null : view.src, onError };
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=use-site-card-preview.hooks.js.map
|
|
@@ -6,9 +6,10 @@ import { type SiteListPrefs } from "./site-list-view.js";
|
|
|
6
6
|
*/
|
|
7
7
|
export interface SiteListPrefsPort {
|
|
8
8
|
load(): Promise<unknown>;
|
|
9
|
+
/** A store that saves synchronously may return nothing: that save is complete when it returns. */
|
|
9
10
|
save(required: {
|
|
10
11
|
next: SiteListPrefs;
|
|
11
|
-
}, optional?: Record<string, never>): Promise<void
|
|
12
|
+
}, optional?: Record<string, never>): Promise<void> | void;
|
|
12
13
|
}
|
|
13
14
|
export interface SiteListPrefsController {
|
|
14
15
|
prefs: SiteListPrefs;
|
|
@@ -20,17 +21,37 @@ export interface SiteListPrefsController {
|
|
|
20
21
|
/** The reason the last change could not be saved, or `null`. */
|
|
21
22
|
saveError: string | null;
|
|
22
23
|
}
|
|
24
|
+
type DescribeError = (required: {
|
|
25
|
+
error: unknown;
|
|
26
|
+
}) => string;
|
|
27
|
+
export interface UseSiteListPrefsOptions {
|
|
28
|
+
describeError?: DescribeError | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* A synchronous read of the stored choices, for a host whose store answers at once (browser storage
|
|
31
|
+
* on a one-person machine). Given one, the first render already shows the stored choices, `ready`
|
|
32
|
+
* starts `true`, and `port.load` is never called: the seed is the read. A seed that throws (storage
|
|
33
|
+
* denied) gives the defaults and `loadError`, the same as a failed `load`, so a change still applies
|
|
34
|
+
* for this session but is never saved.
|
|
35
|
+
*/
|
|
36
|
+
seed?: (() => unknown) | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Start a change's save in the same turn when no save is in flight, instead of queuing it behind
|
|
39
|
+
* the previous one. For a host whose store saves synchronously (returns nothing): each click is then
|
|
40
|
+
* written before its handler returns, and back-to-back clicks reach it in order. Off by default, so
|
|
41
|
+
* an async store's save starts on the next microtask as it always has.
|
|
42
|
+
*/
|
|
43
|
+
immediateFirstSave?: boolean | undefined;
|
|
44
|
+
}
|
|
23
45
|
/**
|
|
24
46
|
* Applies a change at once and saves it behind the previous save, so two quick clicks cannot land out
|
|
25
|
-
* of order.
|
|
26
|
-
*
|
|
47
|
+
* of order. With `immediateFirstSave` and no save in flight the save starts in the same turn, and a
|
|
48
|
+
* store that saves synchronously (returns nothing) is done before the click handler returns, so
|
|
49
|
+
* back-to-back changes reach it in order without waiting on a promise. After a failed read nothing is
|
|
50
|
+
* saved: the defaults on screen would overwrite the person's real pins.
|
|
27
51
|
* @returns The current choices and their save state. @complexity O(1) per change.
|
|
28
52
|
*/
|
|
29
53
|
export declare function useSiteListPrefs({ port }: {
|
|
30
54
|
port: SiteListPrefsPort;
|
|
31
|
-
}, { describeError }?:
|
|
32
|
-
|
|
33
|
-
error: unknown;
|
|
34
|
-
}) => string) | undefined;
|
|
35
|
-
}): SiteListPrefsController;
|
|
55
|
+
}, { describeError, seed, immediateFirstSave }?: UseSiteListPrefsOptions): SiteListPrefsController;
|
|
56
|
+
export {};
|
|
36
57
|
//# sourceMappingURL=use-site-list-prefs.hooks.d.ts.map
|
|
@@ -3,19 +3,52 @@ import { DEFAULT_SITE_LIST_PREFS, parseSiteListPrefs } from "./site-list-view.js
|
|
|
3
3
|
function defaultDescribeError({ error }) {
|
|
4
4
|
return error instanceof Error ? error.message : String(error);
|
|
5
5
|
}
|
|
6
|
+
/** The first render's state: the defaults until `load` answers, or the seed's answer at once. */
|
|
7
|
+
function initialPrefs({ seed, describeError }) {
|
|
8
|
+
if (seed === undefined)
|
|
9
|
+
return { prefs: DEFAULT_SITE_LIST_PREFS, ready: false, loadError: null };
|
|
10
|
+
try {
|
|
11
|
+
return { prefs: parseSiteListPrefs({ stored: seed() }), ready: true, loadError: null };
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
// Denied storage must not blank the list: show the defaults and say why they were not read.
|
|
15
|
+
return { prefs: DEFAULT_SITE_LIST_PREFS, ready: true, loadError: describeError({ error }) };
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Calls `save` now. Returns `null` when a synchronous store already finished, else the save's
|
|
20
|
+
* promise, with a synchronous throw turned into a rejection like a chained call would.
|
|
21
|
+
*/
|
|
22
|
+
function startSave(save) {
|
|
23
|
+
try {
|
|
24
|
+
const result = save();
|
|
25
|
+
return result === undefined ? null : Promise.resolve(result);
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
return Promise.reject(error);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
6
31
|
/**
|
|
7
32
|
* Applies a change at once and saves it behind the previous save, so two quick clicks cannot land out
|
|
8
|
-
* of order.
|
|
9
|
-
*
|
|
33
|
+
* of order. With `immediateFirstSave` and no save in flight the save starts in the same turn, and a
|
|
34
|
+
* store that saves synchronously (returns nothing) is done before the click handler returns, so
|
|
35
|
+
* back-to-back changes reach it in order without waiting on a promise. After a failed read nothing is
|
|
36
|
+
* saved: the defaults on screen would overwrite the person's real pins.
|
|
10
37
|
* @returns The current choices and their save state. @complexity O(1) per change.
|
|
11
38
|
*/
|
|
12
|
-
export function useSiteListPrefs({ port }, { describeError = defaultDescribeError } = {}) {
|
|
13
|
-
const [
|
|
14
|
-
const [
|
|
15
|
-
const [
|
|
39
|
+
export function useSiteListPrefs({ port }, { describeError = defaultDescribeError, seed, immediateFirstSave = false } = {}) {
|
|
40
|
+
const [initial] = useState(() => initialPrefs({ seed, describeError }));
|
|
41
|
+
const [prefs, setPrefs] = useState(initial.prefs);
|
|
42
|
+
const [ready, setReady] = useState(initial.ready);
|
|
43
|
+
const [loadError, setLoadError] = useState(initial.loadError);
|
|
16
44
|
const [saveError, setSaveError] = useState(null);
|
|
17
45
|
const lastSave = useRef(Promise.resolve());
|
|
46
|
+
const pendingSaves = useRef(0);
|
|
47
|
+
// Fixed at mount: a seeded list never switches to the async read part-way.
|
|
48
|
+
const seeded = initial.ready;
|
|
18
49
|
useEffect(() => {
|
|
50
|
+
if (seeded)
|
|
51
|
+
return undefined;
|
|
19
52
|
let current = true;
|
|
20
53
|
port.load().then((stored) => { if (current) {
|
|
21
54
|
setPrefs(parseSiteListPrefs({ stored }));
|
|
@@ -25,13 +58,27 @@ export function useSiteListPrefs({ port }, { describeError = defaultDescribeErro
|
|
|
25
58
|
setReady(true);
|
|
26
59
|
} });
|
|
27
60
|
return () => { current = false; };
|
|
28
|
-
}, [port, describeError]);
|
|
61
|
+
}, [port, describeError, seeded]);
|
|
29
62
|
const onPrefsChange = useCallback((next) => {
|
|
30
63
|
setPrefs(next);
|
|
31
64
|
if (loadError !== null)
|
|
32
65
|
return;
|
|
33
|
-
|
|
34
|
-
|
|
66
|
+
const save = () => port.save({ next });
|
|
67
|
+
const onSaved = () => setSaveError(null);
|
|
68
|
+
const onFailed = (error) => setSaveError(describeError({ error }));
|
|
69
|
+
if (!immediateFirstSave) {
|
|
70
|
+
// Queued even when nothing is in flight: an async store's save starts on the next microtask.
|
|
71
|
+
lastSave.current = lastSave.current.then(save).then(onSaved, onFailed);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const started = pendingSaves.current === 0 ? startSave(save) : lastSave.current.then(save);
|
|
75
|
+
if (started === null) {
|
|
76
|
+
onSaved();
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
pendingSaves.current += 1;
|
|
80
|
+
lastSave.current = started.then(onSaved, onFailed).finally(() => { pendingSaves.current -= 1; });
|
|
81
|
+
}, [port, loadError, describeError, immediateFirstSave]);
|
|
35
82
|
return { prefs, ready, onPrefsChange, loadError, saveError };
|
|
36
83
|
}
|
|
37
84
|
//# sourceMappingURL=use-site-list-prefs.hooks.js.map
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/** The one bridge method this hook calls; channel names stay with the host. */
|
|
2
|
+
export interface SitePreviewBridge {
|
|
3
|
+
getSitePreview: (required: {
|
|
4
|
+
id: string;
|
|
5
|
+
}) => Promise<string | null>;
|
|
6
|
+
}
|
|
7
|
+
export type PreviewFetchPlan = {
|
|
8
|
+
readonly kind: "clear";
|
|
9
|
+
} | {
|
|
10
|
+
readonly kind: "skip";
|
|
11
|
+
} | {
|
|
12
|
+
readonly kind: "fetch";
|
|
13
|
+
readonly bridge: SitePreviewBridge;
|
|
14
|
+
readonly id: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* What this effect run should do: clear the shown preview (no capture exists for this version, so
|
|
18
|
+
* any URL held from a PRIOR id/version must not keep rendering under a card it no longer belongs
|
|
19
|
+
* to), skip entirely (there IS a version to show, but no desktop bridge to ask), or fetch (the
|
|
20
|
+
* bridge and id to ask it with). Checked in that order — a null version wins even when a bridge is
|
|
21
|
+
* present, matching what the effect must do either way: show nothing.
|
|
22
|
+
*
|
|
23
|
+
* @complexity O(1).
|
|
24
|
+
*/
|
|
25
|
+
export declare function previewFetchPlan({ id, previewVersion, bridge }: {
|
|
26
|
+
id: string;
|
|
27
|
+
previewVersion: number | null;
|
|
28
|
+
bridge: SitePreviewBridge | undefined;
|
|
29
|
+
}, _options?: Record<string, never>): PreviewFetchPlan;
|
|
30
|
+
/**
|
|
31
|
+
* What `setUrl` should be called with once `getSitePreview` settles, or `undefined` for "call
|
|
32
|
+
* nothing at all" — this effect run was cancelled (a newer `id`/`previewVersion` started a fresh
|
|
33
|
+
* request) before its own came back, and a stale result must not clobber whatever the newer run is
|
|
34
|
+
* about to show.
|
|
35
|
+
*
|
|
36
|
+
* `outcome` is the settlement itself: `{ ok: true, url }` for a resolved `getSitePreview` (`url` is
|
|
37
|
+
* `null` when there is genuinely no capture yet, which renders identically to a fetch that has not
|
|
38
|
+
* resolved or one that failed — see this file's own `useSitePreview` doc), `{ ok: false }` for a
|
|
39
|
+
* rejected one.
|
|
40
|
+
*
|
|
41
|
+
* @complexity O(1).
|
|
42
|
+
*/
|
|
43
|
+
export declare function nextPreviewUrl({ cancelled, outcome }: {
|
|
44
|
+
cancelled: boolean;
|
|
45
|
+
outcome: {
|
|
46
|
+
readonly ok: true;
|
|
47
|
+
readonly url: string | null;
|
|
48
|
+
} | {
|
|
49
|
+
readonly ok: false;
|
|
50
|
+
};
|
|
51
|
+
}, _options?: Record<string, never>): string | null | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* `null` until a capture exists, the fetch has not resolved yet, or the fetch failed — all three
|
|
54
|
+
* render identically, as no image, which is exactly the card tile's existing fallback (the
|
|
55
|
+
* placeholder). The caller does not need to tell those apart: whichever it is, there is nothing to show.
|
|
56
|
+
*
|
|
57
|
+
* `getBridge` is the host's preload bridge lookup. Keep it stable: it is an effect dependency, so a
|
|
58
|
+
* new function each render would refetch each render.
|
|
59
|
+
*
|
|
60
|
+
* @complexity O(1) plus one IPC round trip per distinct `previewVersion`.
|
|
61
|
+
*/
|
|
62
|
+
export declare function useSitePreview({ id, previewVersion, getBridge }: {
|
|
63
|
+
id: string;
|
|
64
|
+
previewVersion: number | null;
|
|
65
|
+
getBridge: () => SitePreviewBridge | undefined;
|
|
66
|
+
}, _options?: Record<string, never>): string | null;
|
|
67
|
+
//# sourceMappingURL=use-site-preview.hooks.d.ts.map
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Fetches one site's cached preview image on demand.
|
|
3
|
+
*
|
|
4
|
+
* The host's site record carries a `previewVersion` — a version token, never the image: a frequent
|
|
5
|
+
* site-list poll cannot carry an image payload. This hook is the on-demand fetch that token exists to
|
|
6
|
+
* trigger: it asks the injected bridge once per distinct version rather than once per poll.
|
|
7
|
+
*
|
|
8
|
+
* Refetches when `previewVersion` CHANGES, not when it "increases". The token is a filesystem
|
|
9
|
+
* mtime (the host's preview store), and a restored backup or a clock-skewed capture can move it
|
|
10
|
+
* backward as easily as forward — a growth check would silently keep serving a stale image in
|
|
11
|
+
* exactly that case. React's dependency-array comparison (`Object.is`) already does the right thing
|
|
12
|
+
* here for free; the only discipline this file owes is not "improving" it into a `>` comparison.
|
|
13
|
+
*
|
|
14
|
+
* `previewFetchPlan` and `nextPreviewUrl` are pulled out as plain functions so every decision the
|
|
15
|
+
* effect makes is testable without a renderer. Between them they cover every decision the effect
|
|
16
|
+
* makes; the ONE thing that stays inline is the `[id, previewVersion, getBridge]` dependency array
|
|
17
|
+
* itself, because a dependency array is React's own wiring — there is no way to observe "did this
|
|
18
|
+
* effect re-run" without a renderer to run it in.
|
|
19
|
+
*/
|
|
20
|
+
import { useEffect, useState } from "react";
|
|
21
|
+
/**
|
|
22
|
+
* What this effect run should do: clear the shown preview (no capture exists for this version, so
|
|
23
|
+
* any URL held from a PRIOR id/version must not keep rendering under a card it no longer belongs
|
|
24
|
+
* to), skip entirely (there IS a version to show, but no desktop bridge to ask), or fetch (the
|
|
25
|
+
* bridge and id to ask it with). Checked in that order — a null version wins even when a bridge is
|
|
26
|
+
* present, matching what the effect must do either way: show nothing.
|
|
27
|
+
*
|
|
28
|
+
* @complexity O(1).
|
|
29
|
+
*/
|
|
30
|
+
export function previewFetchPlan({ id, previewVersion, bridge }, _options = {}) {
|
|
31
|
+
if (previewVersion === null)
|
|
32
|
+
return { kind: "clear" };
|
|
33
|
+
if (bridge === undefined)
|
|
34
|
+
return { kind: "skip" };
|
|
35
|
+
return { kind: "fetch", bridge, id };
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* What `setUrl` should be called with once `getSitePreview` settles, or `undefined` for "call
|
|
39
|
+
* nothing at all" — this effect run was cancelled (a newer `id`/`previewVersion` started a fresh
|
|
40
|
+
* request) before its own came back, and a stale result must not clobber whatever the newer run is
|
|
41
|
+
* about to show.
|
|
42
|
+
*
|
|
43
|
+
* `outcome` is the settlement itself: `{ ok: true, url }` for a resolved `getSitePreview` (`url` is
|
|
44
|
+
* `null` when there is genuinely no capture yet, which renders identically to a fetch that has not
|
|
45
|
+
* resolved or one that failed — see this file's own `useSitePreview` doc), `{ ok: false }` for a
|
|
46
|
+
* rejected one.
|
|
47
|
+
*
|
|
48
|
+
* @complexity O(1).
|
|
49
|
+
*/
|
|
50
|
+
export function nextPreviewUrl({ cancelled, outcome }, _options = {}) {
|
|
51
|
+
if (cancelled)
|
|
52
|
+
return undefined;
|
|
53
|
+
return outcome.ok ? outcome.url : null;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* `null` until a capture exists, the fetch has not resolved yet, or the fetch failed — all three
|
|
57
|
+
* render identically, as no image, which is exactly the card tile's existing fallback (the
|
|
58
|
+
* placeholder). The caller does not need to tell those apart: whichever it is, there is nothing to show.
|
|
59
|
+
*
|
|
60
|
+
* `getBridge` is the host's preload bridge lookup. Keep it stable: it is an effect dependency, so a
|
|
61
|
+
* new function each render would refetch each render.
|
|
62
|
+
*
|
|
63
|
+
* @complexity O(1) plus one IPC round trip per distinct `previewVersion`.
|
|
64
|
+
*/
|
|
65
|
+
export function useSitePreview({ id, previewVersion, getBridge }, _options = {}) {
|
|
66
|
+
const [url, setUrl] = useState(null);
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
const plan = previewFetchPlan({ id, previewVersion, bridge: getBridge() });
|
|
69
|
+
if (plan.kind === "clear") {
|
|
70
|
+
setUrl(null);
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
if (plan.kind === "skip")
|
|
74
|
+
return undefined;
|
|
75
|
+
let cancelled = false;
|
|
76
|
+
plan.bridge
|
|
77
|
+
.getSitePreview({ id: plan.id })
|
|
78
|
+
.then((result) => {
|
|
79
|
+
const next = nextPreviewUrl({ cancelled, outcome: { ok: true, url: result } });
|
|
80
|
+
if (next !== undefined)
|
|
81
|
+
setUrl(next);
|
|
82
|
+
})
|
|
83
|
+
.catch(() => {
|
|
84
|
+
const next = nextPreviewUrl({ cancelled, outcome: { ok: false } });
|
|
85
|
+
if (next !== undefined)
|
|
86
|
+
setUrl(next);
|
|
87
|
+
});
|
|
88
|
+
return () => {
|
|
89
|
+
cancelled = true;
|
|
90
|
+
};
|
|
91
|
+
}, [id, previewVersion, getBridge]);
|
|
92
|
+
return url;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=use-site-preview.hooks.js.map
|
|
@@ -21,7 +21,7 @@ export interface SketchEditorProps {
|
|
|
21
21
|
/** Overrides the default locale → Excalidraw `langCode` mapping. */
|
|
22
22
|
excalidrawLangCode?: (locale: string) => string;
|
|
23
23
|
/** Host translations for Excalidraw's own baked-in English UI text — no
|
|
24
|
-
* default translated copy ships (see `
|
|
24
|
+
* default translated copy ships (see `070311a07^:packages/ui/source-map.md` (section "features/sketch-editor/")). */
|
|
25
25
|
domTextOverrides?: SketchDomTextOverrides;
|
|
26
26
|
tooltipTargets?: readonly SketchTooltipTarget[];
|
|
27
27
|
contextMenuActionOrder?: readonly string[];
|
|
@@ -55,7 +55,7 @@ export interface SketchEditorProps {
|
|
|
55
55
|
* orchestration with content-signature deduping, and a DOM-enhancement
|
|
56
56
|
* toolkit (tooltips, simplified context menu, DOM text overrides, portal
|
|
57
57
|
* polish) that makes embedding a third-party editor with no extension
|
|
58
|
-
* hooks feel native. See `
|
|
58
|
+
* hooks feel native. See `070311a07^:packages/ui/source-map.md` (section "features/sketch-editor/") for what stayed
|
|
59
59
|
* behind (the source product's legacy pre-Excalidraw item migration, its
|
|
60
60
|
* `.sketch.json` naming convention, and its own translated copy).
|
|
61
61
|
*/
|
|
@@ -50,7 +50,7 @@ function SketchCanvas({ props, engine, theme, sceneState, workflow, hasContent,
|
|
|
50
50
|
* orchestration with content-signature deduping, and a DOM-enhancement
|
|
51
51
|
* toolkit (tooltips, simplified context menu, DOM text overrides, portal
|
|
52
52
|
* polish) that makes embedding a third-party editor with no extension
|
|
53
|
-
* hooks feel native. See `
|
|
53
|
+
* hooks feel native. See `070311a07^:packages/ui/source-map.md` (section "features/sketch-editor/") for what stayed
|
|
54
54
|
* behind (the source product's legacy pre-Excalidraw item migration, its
|
|
55
55
|
* `.sketch.json` naming convention, and its own translated copy).
|
|
56
56
|
*/
|
|
@@ -23,7 +23,7 @@ export function SkillRow({ skill, locale, enabled, expanded, editing, body, body
|
|
|
23
23
|
}
|
|
24
24
|
/** The header's right side: delete confirmation or edit/delete, then the enable switch. */
|
|
25
25
|
function SkillRowActions({ skill, enabled, confirmDelete, editActionLabel, onStartEdit, onArmDelete, onCancelDelete, onCommitDelete, onToggleEnabled, labels: l, agentHandle }) {
|
|
26
|
-
return (_jsxs("div", { className: "jini-skills-row-actions", children: [isDeletableSkill(skill) && confirmDelete ? (_jsx(SkillRowDeleteConfirm, { onCommitDelete: onCommitDelete, onCancelDelete: onCancelDelete, labels: l, agentHandle: agentHandle })) : (_jsx(SkillRowEditDeleteActions, { skill: skill, editActionLabel: editActionLabel, onStartEdit: onStartEdit, onArmDelete: onArmDelete, labels: l, agentHandle: agentHandle })), _jsxs("label", { className: "toggle-switch toggle-switch-sm jini-skills-row-enable", title: l.enableToggleLabel, children: [_jsx("input", { type: "checkbox", checked: enabled, onChange: (event) => onToggleEnabled(event.target.checked), "aria-label": l.enableToggleLabel, ...agentHandleProps({}, { base: agentHandle, action: 'enabled', role: 'checkbox', label: l.enableToggleLabel }) }), _jsx("span", { className: "toggle-slider" })] })] }));
|
|
26
|
+
return (_jsxs("div", { className: "jini-skills-row-actions", children: [isDeletableSkill(skill) && confirmDelete ? (_jsx(SkillRowDeleteConfirm, { onCommitDelete: onCommitDelete, onCancelDelete: onCancelDelete, labels: l, agentHandle: agentHandle })) : (_jsx(SkillRowEditDeleteActions, { skill: skill, editActionLabel: editActionLabel, onStartEdit: onStartEdit, onArmDelete: onArmDelete, labels: l, agentHandle: agentHandle })), _jsxs("label", { className: "jini-ui-toggle-switch jini-ui-toggle-switch-sm jini-skills-row-enable", title: l.enableToggleLabel, children: [_jsx("input", { type: "checkbox", checked: enabled, onChange: (event) => onToggleEnabled(event.target.checked), "aria-label": l.enableToggleLabel, ...agentHandleProps({}, { base: agentHandle, action: 'enabled', role: 'checkbox', label: l.enableToggleLabel }) }), _jsx("span", { className: "jini-ui-toggle-slider" })] })] }));
|
|
27
27
|
}
|
|
28
28
|
function skillRowClassName({ enabled, expanded }) {
|
|
29
29
|
return `jini-skills-row${enabled ? '' : ' jini-skills-row-disabled'}${expanded ? ' jini-skills-row-expanded' : ''}`;
|
|
@@ -36,7 +36,7 @@ export function SourceConfigAddForm({ useTHook = useT, ...props }) {
|
|
|
36
36
|
const { addLabel, onSubmit, agentHandle, submitError } = props;
|
|
37
37
|
const t = useTHook();
|
|
38
38
|
const submitLabel = addLabel ? t(addLabel) : t('Add source');
|
|
39
|
-
return (_jsxs("form", { className: "source-config-add-form", ...sourceConfigAgentProps({ base: agentHandle, role: 'form', label: submitLabel }), onSubmit: (event) => {
|
|
39
|
+
return (_jsxs("form", { className: "jini-ui-source-config-add-form", ...sourceConfigAgentProps({ base: agentHandle, role: 'form', label: submitLabel }), onSubmit: (event) => {
|
|
40
40
|
event.preventDefault();
|
|
41
41
|
onSubmit();
|
|
42
42
|
}, children: [_jsx(AddFormFields, { ...props }), _jsx(AddFormTrustSelect, { ...props }), _jsx(AddFormTestControl, { ...props }), submitError ? (_jsx("div", { className: "jini-source-config-add-form-error", role: "alert", children: t(submitError) })) : null, _jsx(AddFormActions, { ...props, submitLabel: submitLabel })] }));
|
|
@@ -58,7 +58,7 @@ function AddFormTrustSelect({ useTHook = useT, ...props }) {
|
|
|
58
58
|
return null;
|
|
59
59
|
const { trustOptions, trust, submitting, onTrustChange, agentHandle } = props;
|
|
60
60
|
const trustLabel = t('Trust level');
|
|
61
|
-
return (_jsxs("label", { className: "source-config-field", htmlFor: "source-config-add-form-trust", children: [_jsx("span", { className: "source-config-field-label", children: trustLabel }), _jsx("select", { id: "source-config-add-form-trust", value: trust ?? '', disabled: submitting, "aria-label": trustLabel, ...sourceConfigAgentProps({ base: agentHandle, role: 'field', label: trustLabel, action: 'trust' }), onChange: (event) => onTrustChange(event.target.value), children: _jsx(SourceConfigTrustOptions, { trust: trust, trustOptions: trustOptions }) })] }));
|
|
61
|
+
return (_jsxs("label", { className: "jini-ui-source-config-field", htmlFor: "source-config-add-form-trust", children: [_jsx("span", { className: "jini-ui-source-config-field-label", children: trustLabel }), _jsx("select", { id: "source-config-add-form-trust", value: trust ?? '', disabled: submitting, "aria-label": trustLabel, ...sourceConfigAgentProps({ base: agentHandle, role: 'field', label: trustLabel, action: 'trust' }), onChange: (event) => onTrustChange(event.target.value), children: _jsx(SourceConfigTrustOptions, { trust: trust, trustOptions: trustOptions }) })] }));
|
|
62
62
|
}
|
|
63
63
|
/** Test-before-save: only when the host can test (`canTest`) and wired `onTest`; disabled while the draft is invalid. */
|
|
64
64
|
function AddFormTestControl({ canTest = false, onTest, testing = false, submitting, validation, testResult, agentHandle }) {
|
|
@@ -57,7 +57,7 @@ export function SourceConfigField({ spec, value, error, disabled = false, idPref
|
|
|
57
57
|
action: 'reveal',
|
|
58
58
|
});
|
|
59
59
|
const reveal = { revealed, disabled, agentProps: revealAgentProps, onToggle: toggleRevealed };
|
|
60
|
-
return (_jsxs("div", { className: "source-config-field", children: [_jsxs("label", { className: "source-config-field-label", htmlFor: inputId, children: [fieldLabel, spec.required ? (_jsx("span", { className: "source-config-field-required", "aria-label": t('required'), children: "*" })) : null] }), _jsx(SourceConfigFieldControl, { spec: spec, value: value, inputId: inputId, shared: shared, reveal: reveal, isLockedSecret: isLockedSecret }), error ? (_jsx("span", { id: errorId, className: "jini-source-config-field-error", role: "alert", children: error })) : null] }));
|
|
60
|
+
return (_jsxs("div", { className: "jini-ui-source-config-field", children: [_jsxs("label", { className: "jini-ui-source-config-field-label", htmlFor: inputId, children: [fieldLabel, spec.required ? (_jsx("span", { className: "jini-ui-source-config-field-required", "aria-label": t('required'), children: "*" })) : null] }), _jsx(SourceConfigFieldControl, { spec: spec, value: value, inputId: inputId, shared: shared, reveal: reveal, isLockedSecret: isLockedSecret }), error ? (_jsx("span", { id: errorId, className: "jini-source-config-field-error", role: "alert", children: error })) : null] }));
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* The `password`/`secret-textarea` show-hide state. The toggle is small local
|
|
@@ -46,7 +46,7 @@ export function SourceConfigItemCard({ useItemCardEditHook = useItemCardEdit, ..
|
|
|
46
46
|
const [expanded, setExpanded] = useState(false);
|
|
47
47
|
const edit = useItemCardEditHook(props);
|
|
48
48
|
const label = sourceDisplayLabel({ source, fieldSpecs });
|
|
49
|
-
return (_jsxs("article", { className: `source-config-item-card${expanded ? ' is-expanded' : ''}`, "data-testid": "source-config-item-card", ...sourceConfigAgentProps({ base: agentHandle, role: 'region', label }), children: [_jsxs("div", { className: "source-config-item-card-head", children: [_jsx(ItemCardEnabledToggle, { ...props, label: label }), _jsx(ItemCardSummary, { ...props, label: label, expanded: expanded, onToggle: () => setExpanded((current) => !current) }), _jsx(ItemCardActions, { ...props, label: label })] }), expanded ? _jsx(ItemCardBody, { ...props, label: label, edit: edit }) : null] }));
|
|
49
|
+
return (_jsxs("article", { className: `jini-ui-source-config-item-card${expanded ? ' is-expanded' : ''}`, "data-testid": "source-config-item-card", ...sourceConfigAgentProps({ base: agentHandle, role: 'region', label }), children: [_jsxs("div", { className: "jini-ui-source-config-item-card-head", children: [_jsx(ItemCardEnabledToggle, { ...props, label: label }), _jsx(ItemCardSummary, { ...props, label: label, expanded: expanded, onToggle: () => setExpanded((current) => !current) }), _jsx(ItemCardActions, { ...props, label: label })] }), expanded ? _jsx(ItemCardBody, { ...props, label: label, edit: edit }) : null] }));
|
|
50
50
|
}
|
|
51
51
|
function isAnyActionPending({ removing, refreshing, settingTrust, updating }) {
|
|
52
52
|
return removing || refreshing || settingTrust || updating;
|
|
@@ -57,7 +57,7 @@ function ItemCardEnabledToggle({ source, capabilities, updating, onUpdate, agent
|
|
|
57
57
|
if (source.enabled === undefined || !capabilities.canUpdate)
|
|
58
58
|
return null;
|
|
59
59
|
const enabledLabel = t('Enable {name}', { name: label });
|
|
60
|
-
return (_jsx("label", { className: "source-config-item-card-enabled-toggle", title: source.enabled ? t('Enabled') : t('Disabled'), children: _jsx("input", { type: "checkbox", checked: source.enabled, disabled: updating, "aria-label": enabledLabel, ...sourceConfigAgentProps({ base: agentHandle, role: 'checkbox', label: enabledLabel, action: 'enabled' }), onChange: (event) => onUpdate({ enabled: event.target.checked }) }) }));
|
|
60
|
+
return (_jsx("label", { className: "jini-ui-source-config-item-card-enabled-toggle", title: source.enabled ? t('Enabled') : t('Disabled'), children: _jsx("input", { type: "checkbox", checked: source.enabled, disabled: updating, "aria-label": enabledLabel, ...sourceConfigAgentProps({ base: agentHandle, role: 'checkbox', label: enabledLabel, action: 'enabled' }), onChange: (event) => onUpdate({ enabled: event.target.checked }) }) }));
|
|
61
61
|
}
|
|
62
62
|
function ItemCardSummary({ source, trustOptions, agentHandle, label, expanded, onToggle, useTHook = useT, }) {
|
|
63
63
|
const t = useTHook();
|
|
@@ -67,14 +67,14 @@ function ItemCardSummary({ source, trustOptions, agentHandle, label, expanded, o
|
|
|
67
67
|
// Stable ontology, so it must not read "Collapse" once expanded — see `agent-handles.ts`.
|
|
68
68
|
label: t('Show or hide details for {name}', { name: label }),
|
|
69
69
|
action: 'expand',
|
|
70
|
-
}), onClick: onToggle, "aria-expanded": expanded, children: [_jsx("span", { className: "source-config-item-card-label", children: label }), source.trust ? _jsx("span", { className: "jini-source-config-item-card-trust-badge", children: t(trustOption?.label ?? source.trust) }) : null] }));
|
|
70
|
+
}), onClick: onToggle, "aria-expanded": expanded, children: [_jsx("span", { className: "jini-ui-source-config-item-card-label", children: label }), source.trust ? _jsx("span", { className: "jini-source-config-item-card-trust-badge", children: t(trustOption?.label ?? source.trust) }) : null] }));
|
|
71
71
|
}
|
|
72
72
|
/** The trust selector (capability- and options-gated), Refresh (capability-gated) and the always-present Remove. */
|
|
73
73
|
function ItemCardActions({ useTHook = useT, ...props }) {
|
|
74
74
|
const { capabilities, refreshing, removing, onRefresh, onRemove, agentHandle } = props;
|
|
75
75
|
const t = useTHook();
|
|
76
76
|
const anyActionPending = isAnyActionPending(props);
|
|
77
|
-
return (_jsxs("div", { className: "source-config-item-card-actions", children: [_jsx(ItemCardTrustSelect, { ...props }), capabilities.canRefresh ? (_jsx("button", { type: "button", ...sourceConfigAgentProps({ base: agentHandle, role: 'button', label: t('Refresh'), action: 'refresh' }), onClick: onRefresh, disabled: anyActionPending, children: refreshing ? t('Refreshing…') : t('Refresh') })) : null, _jsx("button", { type: "button", className: "jini-source-config-item-card-remove", ...sourceConfigAgentProps({ base: agentHandle, role: 'button', label: t('Remove'), action: 'remove' }), onClick: onRemove, disabled: anyActionPending, children: removing ? t('Removing…') : t('Remove') })] }));
|
|
77
|
+
return (_jsxs("div", { className: "jini-ui-source-config-item-card-actions", children: [_jsx(ItemCardTrustSelect, { ...props }), capabilities.canRefresh ? (_jsx("button", { type: "button", ...sourceConfigAgentProps({ base: agentHandle, role: 'button', label: t('Refresh'), action: 'refresh' }), onClick: onRefresh, disabled: anyActionPending, children: refreshing ? t('Refreshing…') : t('Refresh') })) : null, _jsx("button", { type: "button", className: "jini-source-config-item-card-remove", ...sourceConfigAgentProps({ base: agentHandle, role: 'button', label: t('Remove'), action: 'remove' }), onClick: onRemove, disabled: anyActionPending, children: removing ? t('Removing…') : t('Remove') })] }));
|
|
78
78
|
}
|
|
79
79
|
function ItemCardTrustSelect({ useTHook = useT, ...props }) {
|
|
80
80
|
const t = useTHook();
|
|
@@ -136,7 +136,7 @@ function ItemCardEditToggle({ useTHook = useT, ...props }) {
|
|
|
136
136
|
}
|
|
137
137
|
function ItemCardEditFields({ source, fieldSpecs, agentHandle, label, edit, useTHook = useT }) {
|
|
138
138
|
const t = useTHook();
|
|
139
|
-
return (_jsxs("div", { className: "jini-source-config-item-card-edit-fields", children: [_jsxs("label", { className: "source-config-field", htmlFor: `source-config-item-card-${source.id}-label`, children: [_jsx("span", { className: "source-config-field-label", children: t('Label') }), _jsx("input", { id: `source-config-item-card-${source.id}-label`, type: "text", value: edit.editLabel, placeholder: label, ...sourceConfigAgentProps({ base: agentHandle, role: 'field', label: t('Label'), action: 'label' }), onChange: (event) => edit.setEditLabel(event.target.value) })] }), fieldSpecs.map((spec) => {
|
|
139
|
+
return (_jsxs("div", { className: "jini-source-config-item-card-edit-fields", children: [_jsxs("label", { className: "jini-ui-source-config-field", htmlFor: `source-config-item-card-${source.id}-label`, children: [_jsx("span", { className: "jini-ui-source-config-field-label", children: t('Label') }), _jsx("input", { id: `source-config-item-card-${source.id}-label`, type: "text", value: edit.editLabel, placeholder: label, ...sourceConfigAgentProps({ base: agentHandle, role: 'field', label: t('Label'), action: 'label' }), onChange: (event) => edit.setEditLabel(event.target.value) })] }), fieldSpecs.map((spec) => {
|
|
140
140
|
// Same `{label}`-template wrapping the add form uses — `rules.ts`
|
|
141
141
|
// stays hook-free and returns i18n templates, not sentences.
|
|
142
142
|
const issue = edit.saveAttempted ? issueForField({ validation: edit.editValidation, fieldKey: spec.key }) : undefined;
|
|
@@ -28,7 +28,7 @@ export interface SourceConfigListProps<TSource extends SourceConfigItem> {
|
|
|
28
28
|
* trust, list, per-item test/refresh/remove" primitive. Consolidates the
|
|
29
29
|
* shape independently found in the origin product's `McpClientSection.tsx`,
|
|
30
30
|
* `byok/*`, `PluginsView.tsx`'s `SourcesPanel`, and `EntryShell.tsx`'s
|
|
31
|
-
* `OnboardingByokSetupPanel` — see `
|
|
31
|
+
* `OnboardingByokSetupPanel` — see `070311a07^:packages/ui/source-map.md` (section "features/source-config-list/") for full
|
|
32
32
|
* per-source provenance and every dropped behavior.
|
|
33
33
|
*
|
|
34
34
|
* Composes the two feature hooks + the presentational `SourceConfigListView`
|
|
@@ -8,7 +8,7 @@ import { SourceConfigListView } from './SourceConfigListView.js';
|
|
|
8
8
|
* trust, list, per-item test/refresh/remove" primitive. Consolidates the
|
|
9
9
|
* shape independently found in the origin product's `McpClientSection.tsx`,
|
|
10
10
|
* `byok/*`, `PluginsView.tsx`'s `SourcesPanel`, and `EntryShell.tsx`'s
|
|
11
|
-
* `OnboardingByokSetupPanel` — see `
|
|
11
|
+
* `OnboardingByokSetupPanel` — see `070311a07^:packages/ui/source-map.md` (section "features/source-config-list/") for full
|
|
12
12
|
* per-source provenance and every dropped behavior.
|
|
13
13
|
*
|
|
14
14
|
* Composes the two feature hooks + the presentational `SourceConfigListView`
|