@fses/workbench-app 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +9 -0
- package/dist/Workspace-DP3xr4Jp.js +42979 -0
- package/dist/adapters/defaults.d.ts +15 -0
- package/dist/adapters/index.d.ts +8 -0
- package/dist/adapters/testDoubles.d.ts +12 -0
- package/dist/adapters/types.d.ts +84 -0
- package/dist/canvas/api/types.d.ts +117 -0
- package/dist/canvas/bridge/workbenchCanvasBus.d.ts +7 -0
- package/dist/canvas/layout/logicalLayoutEngine.d.ts +85 -0
- package/dist/canvas/persistence/canvasSnapshotStorage.d.ts +3 -0
- package/dist/card/index.d.ts +8 -0
- package/dist/card/index.js +17 -0
- package/dist/chat/index.d.ts +9 -0
- package/dist/chat/index.js +12 -0
- package/dist/components/WorkbenchAppHost.vue.d.ts +28 -0
- package/dist/components/WorkbenchApplication.vue.d.ts +13 -0
- package/dist/components/WorkbenchShell.vue.d.ts +32 -0
- package/dist/components/WorkbenchWorkspaceCore.vue.d.ts +20 -0
- package/dist/config/workbenchAppConfig.d.ts +43 -0
- package/dist/contracts/index.d.ts +7 -0
- package/dist/contracts/index.js +6 -0
- package/dist/extensions/index.d.ts +59 -0
- package/dist/fde-runtime/runtime/fdeSkillDisplayLabel.d.ts +15 -0
- package/dist/fses-workbench-app.js +91 -0
- package/dist/index-A8Vg4UXL.js +1091 -0
- package/dist/index.d.ts +39 -0
- package/dist/internal/personal-workbench/canvas-runtime/api/canvasFacade.d.ts +2 -0
- package/dist/internal/personal-workbench/canvas-runtime/api/types.d.ts +6 -0
- package/dist/internal/personal-workbench/canvas-runtime/factory/cardFactory.d.ts +25 -0
- package/dist/internal/personal-workbench/canvas-runtime/layout/logicalLayoutEngine.d.ts +6 -0
- package/dist/internal/personal-workbench/canvas-runtime/layout/recommendedCardPlacement.d.ts +54 -0
- package/dist/internal/personal-workbench/canvas-runtime/lifecycle/cardLifecycleService.d.ts +12 -0
- package/dist/internal/personal-workbench/canvas-runtime/primitive/primitivePolicyGate.d.ts +9 -0
- package/dist/internal/personal-workbench/components/runtime/RuntimeCapabilitySlots.vue.d.ts +14 -0
- package/dist/internal/personal-workbench/components/workbench/ChartLinkageConfigModal.vue.d.ts +23 -0
- package/dist/internal/personal-workbench/components/workbench/ConversationTurnCard.vue.d.ts +23 -0
- package/dist/internal/personal-workbench/components/workbench/GridStackCanvas.vue.d.ts +91 -0
- package/dist/internal/personal-workbench/components/workbench/GridStackCardShell.vue.d.ts +49 -0
- package/dist/internal/personal-workbench/components/workbench/GridStackContainer.vue.d.ts +39 -0
- package/dist/internal/personal-workbench/components/workbench/LayoutPicker.vue.d.ts +13 -0
- package/dist/internal/personal-workbench/components/workbench/StudioComposer.vue.d.ts +24 -0
- package/dist/internal/personal-workbench/components/workbench/SystemCardPreviewPopover.vue.d.ts +17 -0
- package/dist/internal/personal-workbench/components/workbench/WelcomeBanner.vue.d.ts +19 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchAccessDenied.vue.d.ts +7 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchCanvas.vue.d.ts +290 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchCanvasSettingsMenu.vue.d.ts +40 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchCardConfigDialog.vue.d.ts +14 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchDropdownPortal.vue.d.ts +32 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchFdeCardCatalog.vue.d.ts +12 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchListPopover.vue.d.ts +15 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchMetricFilterBindingEditor.vue.d.ts +14 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchRecommendationFieldConfigDialog.vue.d.ts +14 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchStudio.vue.d.ts +301 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchThemePicker.vue.d.ts +10 -0
- package/dist/internal/personal-workbench/components/workbench/helpers.d.ts +18 -0
- package/dist/internal/personal-workbench/components/workbench/showcase/WorkbenchShowcase.vue.d.ts +273 -0
- package/dist/internal/personal-workbench/composables/useWorkbenchRuntime.d.ts +9 -0
- package/dist/internal/personal-workbench/extensions/cards/customCardCatalog.d.ts +27 -0
- package/dist/internal/personal-workbench/extensions/cards/customComponentRegistry.d.ts +7 -0
- package/dist/internal/personal-workbench/extensions/cards/userCustomCardInsertion.d.ts +21 -0
- package/dist/internal/personal-workbench/extensions/fde/fdeGeneratedCards.d.ts +2 -0
- package/dist/internal/personal-workbench/extensions/fde/fdeGeneratedDashboard.d.ts +1 -0
- package/dist/internal/personal-workbench/extensions/fde/fdeGeneratedTemplatePage.d.ts +1 -0
- package/dist/internal/personal-workbench/extensions/fde/fdeSkillWorkbenchTheme.d.ts +1 -0
- package/dist/internal/personal-workbench/extensions/runtimeExtensions.d.ts +37 -0
- package/dist/internal/personal-workbench/extensions/workbenchAdapters.d.ts +1 -0
- package/dist/internal/personal-workbench/extensions/workbenchConfig.d.ts +1 -0
- package/dist/internal/personal-workbench/extensions/workbenchExtensions.d.ts +1 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillCardsHost.vue.d.ts +2 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillChartCard.vue.d.ts +57 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardCockpitHeader.vue.d.ts +6 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardCockpitTitle.vue.d.ts +5 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardGrid.vue.d.ts +57 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardHeaderBand.vue.d.ts +6 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardHost.vue.d.ts +2 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardKpiItem.vue.d.ts +6 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardMarqueeList.vue.d.ts +6 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardShell.vue.d.ts +21 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardSummaryHeader.vue.d.ts +6 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardWidget.vue.d.ts +56 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDrilldownModal.vue.d.ts +20 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillFilterBar.vue.d.ts +18 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillHeaderCard.vue.d.ts +6 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillListCard.vue.d.ts +21 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillMetricChartToolbar.vue.d.ts +20 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillNumberCard.vue.d.ts +21 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillProtocolChartRenderer.vue.d.ts +18 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillQueryCard.vue.d.ts +23 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillTemplatePageHost.vue.d.ts +2 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillCardTypes.d.ts +514 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillChartDataRequestMeta.d.ts +13 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillChartDensityFit.d.ts +67 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillChartOptions.d.ts +14 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillChartTheme.d.ts +51 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardContext.d.ts +19 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardDrilldown.d.ts +21 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardKpi.d.ts +36 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardLayout.d.ts +39 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardRefresh.d.ts +24 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardThemes.d.ts +108 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardTypes.d.ts +87 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardViewport.d.ts +71 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDataRefresh.d.ts +59 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDisplayLabel.d.ts +6 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillFilterBarBridge.d.ts +100 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillFilterDefaults.d.ts +21 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillFilterOptions.d.ts +95 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillFloatingAction.d.ts +19 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillJson.d.ts +11 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillListMarquee.d.ts +32 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillMetricChartDrilldown.d.ts +101 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillMetricNumberDetail.d.ts +19 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillNumberFormat.d.ts +17 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillProtocolChart.d.ts +37 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillProtocolChartApi.d.ts +17 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillProtocolChartDisplayData.d.ts +10 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillProtocolChartDrilldown.d.ts +68 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillProtocolChartLinkage.d.ts +19 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillProtocolChartRefresh.d.ts +19 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillQueryFilters.d.ts +82 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillServiceDrilldown.d.ts +89 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillServiceFields.d.ts +17 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillTemplatePageMount.d.ts +37 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillTemplatePageTypes.d.ts +59 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillTimeRangeDefault.d.ts +45 -0
- package/dist/internal/personal-workbench/lib/agentMemoryClient.d.ts +376 -0
- package/dist/internal/personal-workbench/lib/aiChartProtocol.d.ts +31 -0
- package/dist/internal/personal-workbench/lib/aiMetricCardSpec.d.ts +89 -0
- package/dist/internal/personal-workbench/lib/artifactRules.d.ts +15 -0
- package/dist/internal/personal-workbench/lib/assistantPersona.d.ts +28 -0
- package/dist/internal/personal-workbench/lib/assistantPersonaProfiles.d.ts +21 -0
- package/dist/internal/personal-workbench/lib/businessGroupClient.d.ts +25 -0
- package/dist/internal/personal-workbench/lib/canonicalLayoutContext.d.ts +38 -0
- package/dist/internal/personal-workbench/lib/cardContractDemo.d.ts +20 -0
- package/dist/internal/personal-workbench/lib/cardDisplay.d.ts +1 -0
- package/dist/internal/personal-workbench/lib/cardSizeConfig.d.ts +29 -0
- package/dist/internal/personal-workbench/lib/cardStyleConfig.d.ts +128 -0
- package/dist/internal/personal-workbench/lib/conversationScreenContext.d.ts +30 -0
- package/dist/internal/personal-workbench/lib/deepAgentApi.d.ts +133 -0
- package/dist/internal/personal-workbench/lib/deepAgentProcessGroups.d.ts +6 -0
- package/dist/internal/personal-workbench/lib/deepAgentProgressMessage.d.ts +6 -0
- package/dist/internal/personal-workbench/lib/deepAgentToolDisplayName.d.ts +6 -0
- package/dist/internal/personal-workbench/lib/deepAgentWorkbenchCardMutation.d.ts +39 -0
- package/dist/internal/personal-workbench/lib/deepAgentWorkbenchCardRecommendation.d.ts +66 -0
- package/dist/internal/personal-workbench/lib/dynamicEchartOption.d.ts +14 -0
- package/dist/internal/personal-workbench/lib/echartsOptionEditorBridge.d.ts +34 -0
- package/dist/internal/personal-workbench/lib/echartsProtocolDataSlimming.d.ts +24 -0
- package/dist/internal/personal-workbench/lib/echartsTemplateAssets.d.ts +24 -0
- package/dist/internal/personal-workbench/lib/echartsTemplateMaterializer.d.ts +31 -0
- package/dist/internal/personal-workbench/lib/fdeWorkbenchAssetPackage.d.ts +107 -0
- package/dist/internal/personal-workbench/lib/fdeWorkbenchConfigClient.d.ts +96 -0
- package/dist/internal/personal-workbench/lib/formatters.d.ts +5 -0
- package/dist/internal/personal-workbench/lib/historyCardBindingRestore.fixture.d.ts +15 -0
- package/dist/internal/personal-workbench/lib/platformFetchClient.d.ts +105 -0
- package/dist/internal/personal-workbench/lib/queryTraceDisplay.d.ts +30 -0
- package/dist/internal/personal-workbench/lib/runtimeCapabilities.d.ts +8 -0
- package/dist/internal/personal-workbench/lib/runtimeIdentity.d.ts +36 -0
- package/dist/internal/personal-workbench/lib/runtimePrimitiveRegistry.d.ts +51 -0
- package/dist/internal/personal-workbench/lib/summaryPreview.d.ts +18 -0
- package/dist/internal/personal-workbench/lib/systemCardPreviewProfile.d.ts +23 -0
- package/dist/internal/personal-workbench/lib/userVisibleTextGuard.d.ts +23 -0
- package/dist/internal/personal-workbench/lib/utils.d.ts +46 -0
- package/dist/internal/personal-workbench/lib/vueRuntimeAdapters.d.ts +450 -0
- package/dist/internal/personal-workbench/lib/workbenchApi.d.ts +686 -0
- package/dist/internal/personal-workbench/lib/workbenchAttachmentUpload.d.ts +47 -0
- package/dist/internal/personal-workbench/lib/workbenchAutoRefreshSession.d.ts +21 -0
- package/dist/internal/personal-workbench/lib/workbenchBusinessGapDiagnostics.d.ts +16 -0
- package/dist/internal/personal-workbench/lib/workbenchCanvasBusinessGapChecklist.d.ts +106 -0
- package/dist/internal/personal-workbench/lib/workbenchCanvasClassification.d.ts +119 -0
- package/dist/internal/personal-workbench/lib/workbenchCanvasDiagnostics.d.ts +100 -0
- package/dist/internal/personal-workbench/lib/workbenchCanvasImageCardVisual.d.ts +168 -0
- package/dist/internal/personal-workbench/lib/workbenchCanvasImageCompose.d.ts +106 -0
- package/dist/internal/personal-workbench/lib/workbenchCanvasLayoutOverride.d.ts +46 -0
- package/dist/internal/personal-workbench/lib/workbenchCardConfigProfile.d.ts +45 -0
- package/dist/internal/personal-workbench/lib/workbenchCardRecommendationBinding.d.ts +64 -0
- package/dist/internal/personal-workbench/lib/workbenchCardRecommendationFallback.d.ts +24 -0
- package/dist/internal/personal-workbench/lib/workbenchCardRecommendationViews.d.ts +24 -0
- package/dist/internal/personal-workbench/lib/workbenchCardUsabilityProfile.d.ts +33 -0
- package/dist/internal/personal-workbench/lib/workbenchChatHistory.d.ts +19 -0
- package/dist/internal/personal-workbench/lib/workbenchChatHistoryReplay.d.ts +25 -0
- package/dist/internal/personal-workbench/lib/workbenchChatMessageOrdering.d.ts +6 -0
- package/dist/internal/personal-workbench/lib/workbenchChatPendingTurn.d.ts +21 -0
- package/dist/internal/personal-workbench/lib/workbenchChatReplyBridge.d.ts +55 -0
- package/dist/internal/personal-workbench/lib/workbenchChatStatusCompletion.d.ts +6 -0
- package/dist/internal/personal-workbench/lib/workbenchChatTurnSignature.d.ts +6 -0
- package/dist/internal/personal-workbench/lib/workbenchConfigDraftReseed.d.ts +18 -0
- package/dist/internal/personal-workbench/lib/workbenchCustomCardCatalog.d.ts +16 -0
- package/dist/internal/personal-workbench/lib/workbenchCustomComponentRegistry.d.ts +4 -0
- package/dist/internal/personal-workbench/lib/workbenchDataBindingBadge.d.ts +19 -0
- package/dist/internal/personal-workbench/lib/workbenchDataBindingRefreshPolicy.d.ts +6 -0
- package/dist/internal/personal-workbench/lib/workbenchDataBindingRefreshTarget.d.ts +47 -0
- package/dist/internal/personal-workbench/lib/workbenchDeleteLayoutCompact.d.ts +41 -0
- package/dist/internal/personal-workbench/lib/workbenchEntryParams.d.ts +50 -0
- package/dist/internal/personal-workbench/lib/workbenchGridstackAdapter.d.ts +231 -0
- package/dist/internal/personal-workbench/lib/workbenchGridstackSaveLayout.d.ts +48 -0
- package/dist/internal/personal-workbench/lib/workbenchImageCanvasSizing.d.ts +45 -0
- package/dist/internal/personal-workbench/lib/workbenchImageComposeEntry.d.ts +53 -0
- package/dist/internal/personal-workbench/lib/workbenchImageGridstackRowRecovery.d.ts +93 -0
- package/dist/internal/personal-workbench/lib/workbenchLayout.d.ts +174 -0
- package/dist/internal/personal-workbench/lib/workbenchManualReplacement.d.ts +87 -0
- package/dist/internal/personal-workbench/lib/workbenchMetricChartDetail.d.ts +75 -0
- package/dist/internal/personal-workbench/lib/workbenchMetricDetailApi.d.ts +62 -0
- package/dist/internal/personal-workbench/lib/workbenchMetricFilterBinding.d.ts +85 -0
- package/dist/internal/personal-workbench/lib/workbenchMetricFilterLinkage.d.ts +30 -0
- package/dist/internal/personal-workbench/lib/workbenchPendingPatch.d.ts +54 -0
- package/dist/internal/personal-workbench/lib/workbenchRemoteClient.d.ts +39 -0
- package/dist/internal/personal-workbench/lib/workbenchShellSplit.d.ts +107 -0
- package/dist/internal/personal-workbench/lib/workbenchShowcase.d.ts +60 -0
- package/dist/internal/personal-workbench/lib/workbenchSocketClient.d.ts +28 -0
- package/dist/internal/personal-workbench/lib/workbenchStorage.d.ts +67 -0
- package/dist/internal/personal-workbench/lib/workbenchSystemCardPreviews.d.ts +31 -0
- package/dist/internal/personal-workbench/lib/workbenchSystemCardPrompt.d.ts +36 -0
- package/dist/internal/personal-workbench/lib/workbenchTextIntent.d.ts +11 -0
- package/dist/internal/personal-workbench/lib/workbenchThemes.d.ts +6 -0
- package/dist/internal/personal-workbench/lib/workbenchV2Adapter.d.ts +49 -0
- package/dist/internal/personal-workbench/pages/Workspace.vue.d.ts +7 -0
- package/dist/internal/personal-workbench/stores/workbenchRuntime.d.ts +170 -0
- package/dist/internal/personal-workbench/themes/index.d.ts +6 -0
- package/dist/internal/personal-workbench/themes/workbenchThemeDefinitions.d.ts +78 -0
- package/dist/internal/personal-workbench/types/workbenchV2.d.ts +211 -0
- package/dist/internal/personal-workbench/vue-types/workbenchRuntime.d.ts +191 -0
- package/dist/runtime/context/workbenchAppContext.d.ts +32 -0
- package/dist/runtime/conversation/workbenchChatMessageOrdering.d.ts +50 -0
- package/dist/runtime/conversation/workbenchChatStatusCompletion.d.ts +27 -0
- package/dist/runtime/conversation/workbenchChatTurnSignature.d.ts +11 -0
- package/dist/runtime/data-binding/workbenchDataBindingRefreshPolicy.d.ts +36 -0
- package/dist/runtime/deep-agent/deepAgentProcessGroups.d.ts +84 -0
- package/dist/runtime/deep-agent/deepAgentProgressMessage.d.ts +22 -0
- package/dist/runtime/deep-agent/deepAgentToolDisplayName.d.ts +12 -0
- package/dist/runtime/index.d.ts +8 -0
- package/dist/runtime/index.js +5 -0
- package/dist/runtime/store/workbenchRuntimeFacade.d.ts +16 -0
- package/dist/style.css +1 -0
- package/dist/types/index.d.ts +19 -0
- package/dist/useWorkbenchRuntime-Pekhufen.js +26338 -0
- package/package.json +143 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview 工作台 iframe 入口参数解析 - 兼容 hash 路由和静态页面 query 入参。
|
|
3
|
+
* @author seadon
|
|
4
|
+
* @created 2026-05-18
|
|
5
|
+
*/
|
|
6
|
+
export interface WorkbenchEntryParamsInput {
|
|
7
|
+
routeQuery?: Record<string, unknown>;
|
|
8
|
+
locationPathname?: string;
|
|
9
|
+
locationSearch?: string;
|
|
10
|
+
locationHash?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface WorkbenchEntryParams {
|
|
13
|
+
workspaceId: string;
|
|
14
|
+
userId: string;
|
|
15
|
+
tenantId: string;
|
|
16
|
+
appId: string;
|
|
17
|
+
roleId: string;
|
|
18
|
+
mode: string;
|
|
19
|
+
fdeMode: string;
|
|
20
|
+
workbenchEditable: string;
|
|
21
|
+
conversationId: string;
|
|
22
|
+
resourceId: string;
|
|
23
|
+
fdeResourceId: string;
|
|
24
|
+
path: string;
|
|
25
|
+
fdePath: string;
|
|
26
|
+
name: string;
|
|
27
|
+
fdeName: string;
|
|
28
|
+
}
|
|
29
|
+
declare global {
|
|
30
|
+
interface Window {
|
|
31
|
+
__BT_WORKBENCH_USER__?: {
|
|
32
|
+
userId?: string;
|
|
33
|
+
roleId?: string;
|
|
34
|
+
};
|
|
35
|
+
__BT_RUNTIME_IDENTITY__?: Record<string, unknown>;
|
|
36
|
+
__BT_RUNTIME_CONTEXT__?: Record<string, unknown>;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* 从 Vue Router query、页面 search、hash query 中解析工作台入口参数。
|
|
41
|
+
* @param input - 路由和浏览器地址栏参数。
|
|
42
|
+
* @returns 标准化后的入口参数。
|
|
43
|
+
*/
|
|
44
|
+
export declare function resolveWorkbenchEntryParams(input?: WorkbenchEntryParamsInput): WorkbenchEntryParams;
|
|
45
|
+
/**
|
|
46
|
+
* 从浏览器当前地址解析工作台入口参数。
|
|
47
|
+
* @param routeQuery - Vue Router 当前 query 对象。
|
|
48
|
+
* @returns 标准化后的入口参数。
|
|
49
|
+
*/
|
|
50
|
+
export declare function resolveBrowserWorkbenchEntryParams(routeQuery?: Record<string, unknown>): WorkbenchEntryParams;
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview GridStack 布局适配器 - 提供工作台 V4 外层布局协议与旧布局桥接。
|
|
3
|
+
* @author seadon
|
|
4
|
+
* @created 2026-05-23
|
|
5
|
+
*/
|
|
6
|
+
import type { GridStackWidget } from 'gridstack';
|
|
7
|
+
import type { BlockLayout, CustomCanvasData, CustomCanvasNestedBlock, LayoutConfig, MaterializedBlock, WorkbenchGridLayoutNode, WorkbenchLayoutV4, WorkbenchSnapshot } from '@fses/workbench-app/types';
|
|
8
|
+
export declare const WORKBENCH_LAYOUT_V4_VERSION = 4;
|
|
9
|
+
export declare const WORKBENCH_GRIDSTACK_COLUMNS = 100;
|
|
10
|
+
export declare const WORKBENCH_GRIDSTACK_NESTED_COLUMNS = 12;
|
|
11
|
+
export declare const WORKBENCH_GRIDSTACK_ROW_HEIGHT = 8;
|
|
12
|
+
export declare const WORKBENCH_GRIDSTACK_GAP = 6;
|
|
13
|
+
export declare const WORKBENCH_GRIDSTACK_NESTED_GAP = 4;
|
|
14
|
+
export declare const WORKBENCH_NESTED_CONTAINER_CAPABILITY_ID = "card.custom.nestedContainer";
|
|
15
|
+
export declare const WORKBENCH_NESTED_CONTAINER_ROLE = "nested-card-container";
|
|
16
|
+
/**
|
|
17
|
+
* Normalizes a nested child after it has been promoted onto the top-level GridStack.
|
|
18
|
+
* @param node - Top-level node emitted by GridStack for the promoted child.
|
|
19
|
+
* @param previousParentNode - Previous top-level parent node that owned the child.
|
|
20
|
+
* @returns Top-level layout stripped of nested-only ownership and constraints.
|
|
21
|
+
*/
|
|
22
|
+
export declare function promotedNestedTopLevelLayout(node: WorkbenchGridLayoutNode, previousParentNode: WorkbenchGridLayoutNode | undefined, previousNestedNode: WorkbenchGridLayoutNode | undefined): BlockLayout;
|
|
23
|
+
type CompactImageGridstackHeaderSuccessorGapOptions = {
|
|
24
|
+
isHeader: (node: WorkbenchGridLayoutNode) => boolean;
|
|
25
|
+
isSuccessorStrip: (node: WorkbenchGridLayoutNode) => boolean;
|
|
26
|
+
maxGapRows?: number;
|
|
27
|
+
targetGapRows?: number;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Removes large source-screenshot blank bands between a compact image header and its first KPI/list row.
|
|
31
|
+
* @param nodes - GridStack render nodes in current canvas coordinates.
|
|
32
|
+
* @param options - Predicates that identify the compact header and the first business strip after it.
|
|
33
|
+
* @returns Nodes with the successor strip and later top-level rows shifted upward when a large blank band exists.
|
|
34
|
+
*/
|
|
35
|
+
export declare function compactImageGridstackHeaderSuccessorGap(nodes: WorkbenchGridLayoutNode[], options: CompactImageGridstackHeaderSuccessorGapOptions): WorkbenchGridLayoutNode[];
|
|
36
|
+
/**
|
|
37
|
+
* Repairs source-order image rows before GridStack can push a compacted header below KPI cards.
|
|
38
|
+
* @param nodes - Normalized V4 nodes.
|
|
39
|
+
* @param preserveNodeIds - Manual image node ids that must keep user-authored coordinates.
|
|
40
|
+
* @returns Nodes with later image rows shifted below earlier overlapping rows.
|
|
41
|
+
*/
|
|
42
|
+
export declare function repairImageGridstackSourceOrderOverlaps(nodes: WorkbenchGridLayoutNode[], preserveNodeIds?: ReadonlySet<string>): WorkbenchGridLayoutNode[];
|
|
43
|
+
/**
|
|
44
|
+
* Recovers collapsed source-bbox image GridStack geometry from normalized display/layoutBasis geometry.
|
|
45
|
+
* @param sourceTree - GridStack tree derived from source screenshot bboxes.
|
|
46
|
+
* @param displayTree - GridStack tree derived from normalized display/layoutBasis blocks.
|
|
47
|
+
* @returns Source tree with collapsed image nodes replaced by display geometry while preserving source row metrics.
|
|
48
|
+
*/
|
|
49
|
+
export declare function recoverCollapsedImageSourceGridstackTreeFromDisplay(sourceTree: WorkbenchLayoutV4, displayTree: WorkbenchLayoutV4 | null | undefined): WorkbenchLayoutV4;
|
|
50
|
+
/**
|
|
51
|
+
* Converts a legacy block layout into a GridStack V4 node.
|
|
52
|
+
* @param layout - Legacy block layout.
|
|
53
|
+
* @param sourceCols - Column count used by the source layout.
|
|
54
|
+
* @param targetCols - Target GridStack columns.
|
|
55
|
+
* @param parentId - Optional parent node id.
|
|
56
|
+
* @returns GridStack layout node.
|
|
57
|
+
*/
|
|
58
|
+
export declare function blockLayoutToGridNode(layout: BlockLayout, sourceCols: number, targetCols?: number, parentId?: string): WorkbenchGridLayoutNode;
|
|
59
|
+
/**
|
|
60
|
+
* 将 V3 物化区块列表转换为 V4 顶层布局树。
|
|
61
|
+
* @param blocks - 当前快照中的物化区块
|
|
62
|
+
* @param layoutConfig - 旧版布局配置
|
|
63
|
+
* @returns V4 外层布局树
|
|
64
|
+
*/
|
|
65
|
+
export declare function v3BlocksToLayoutV4(blocks: readonly MaterializedBlock[], layoutConfig: LayoutConfig): WorkbenchLayoutV4;
|
|
66
|
+
type NormalizeGridstackLayoutTreeOptions = {
|
|
67
|
+
fallbackTree?: WorkbenchLayoutV4;
|
|
68
|
+
missingNodeFallbackTree?: WorkbenchLayoutV4;
|
|
69
|
+
maxItemRows?: number;
|
|
70
|
+
repairStaleImageFallback?: boolean;
|
|
71
|
+
preserveManualImageNodeIds?: ReadonlySet<string>;
|
|
72
|
+
preserveManualNestedImageParentIds?: ReadonlySet<string>;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Normalizes a V4 GridStack tree before it is rendered or saved.
|
|
76
|
+
* @param layoutTree - Persisted or draft V4 layout tree.
|
|
77
|
+
* @param options - Fallback tree and sanity limits.
|
|
78
|
+
* @returns Tree migrated to the current integer GridStack basis.
|
|
79
|
+
*/
|
|
80
|
+
export declare function normalizeGridstackLayoutTree(layoutTree: WorkbenchLayoutV4, options?: NormalizeGridstackLayoutTreeOptions): WorkbenchLayoutV4;
|
|
81
|
+
/**
|
|
82
|
+
* 将 V4 顶层节点导出为旧版布局数组,供现有画布逻辑桥接使用。
|
|
83
|
+
* @param layoutTree - V4 布局树
|
|
84
|
+
* @returns 不含嵌套子节点的顶层旧布局
|
|
85
|
+
*/
|
|
86
|
+
/**
|
|
87
|
+
* Clears persisted static locks before rendering a layout tree in config mode.
|
|
88
|
+
* @param layoutTree - Candidate V4 layout tree entering an editable GridStack.
|
|
89
|
+
* @returns Editable tree whose top-level and nested nodes can be moved and resized.
|
|
90
|
+
*/
|
|
91
|
+
export declare function unlockGridstackLayoutTreeForEditing(layoutTree: WorkbenchLayoutV4): WorkbenchLayoutV4;
|
|
92
|
+
export declare function layoutV4ToLegacyTopLevelLayouts(layoutTree: WorkbenchLayoutV4): BlockLayout[];
|
|
93
|
+
/**
|
|
94
|
+
* 将 V4 布局节点转换为 GridStack widget 配置。
|
|
95
|
+
* @param node - V4 布局节点
|
|
96
|
+
* @returns GridStack 可加载的 widget
|
|
97
|
+
*/
|
|
98
|
+
export declare function layoutNodeToGridStackWidget(node: WorkbenchGridLayoutNode): GridStackWidget;
|
|
99
|
+
/**
|
|
100
|
+
* 读取 GridStack 保存结果并合并回当前 V4 布局树。
|
|
101
|
+
* @param widgets - GridStack.save(false) 返回的顶层 widget 列表
|
|
102
|
+
* @param currentTree - 当前 V4 布局树,用于保留嵌套 children
|
|
103
|
+
* @returns 合并位置后的 V4 布局树
|
|
104
|
+
*/
|
|
105
|
+
type GridStackSaveToLayoutV4Options = {
|
|
106
|
+
editedWidgetIds?: ReadonlySet<string>;
|
|
107
|
+
};
|
|
108
|
+
export declare function gridStackSaveToLayoutV4(widgets: readonly GridStackWidget[], currentTree: WorkbenchLayoutV4, options?: GridStackSaveToLayoutV4Options): WorkbenchLayoutV4;
|
|
109
|
+
/**
|
|
110
|
+
* 从现有布局配置生成 GridStack 外层布局配置。
|
|
111
|
+
* @param current - 当前旧版布局配置
|
|
112
|
+
* @returns V4 GridStack 布局配置
|
|
113
|
+
*/
|
|
114
|
+
export declare function gridstackLayoutConfigFrom(current: LayoutConfig): LayoutConfig;
|
|
115
|
+
/**
|
|
116
|
+
* 将 V4 布局树写入快照 visualConfig,并保留原有视觉配置。
|
|
117
|
+
* @param current - 当前快照视觉配置
|
|
118
|
+
* @param layoutTree - 待写入的 V4 布局树
|
|
119
|
+
* @returns 带 layoutTree 的视觉配置
|
|
120
|
+
*/
|
|
121
|
+
export declare function visualConfigWithLayoutTree(current: WorkbenchSnapshot['visualConfig'] | null | undefined, layoutTree: WorkbenchLayoutV4): WorkbenchSnapshot['visualConfig'];
|
|
122
|
+
/**
|
|
123
|
+
* Checks whether a materialized block is the system nested-card container.
|
|
124
|
+
* @param block - Candidate materialized block.
|
|
125
|
+
* @returns True when registry metadata or persisted data marks the block as a nested container.
|
|
126
|
+
*/
|
|
127
|
+
export declare function isNestedCardContainerBlock(block: MaterializedBlock): boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Removes top-level duplicates for nodes that already have nested ownership.
|
|
130
|
+
* @param layoutTree - Candidate V4 layout tree.
|
|
131
|
+
* @returns Layout tree whose child ids appear in only one ownership scope.
|
|
132
|
+
*/
|
|
133
|
+
export declare function normalizeGridstackNestedOwnership(layoutTree: WorkbenchLayoutV4): WorkbenchLayoutV4;
|
|
134
|
+
/**
|
|
135
|
+
* Checks whether a block data payload is customCanvas data.
|
|
136
|
+
* @param value - Block data.
|
|
137
|
+
* @returns True when value has the customCanvas shape.
|
|
138
|
+
*/
|
|
139
|
+
export declare function isCustomCanvasData(value: unknown): value is CustomCanvasData;
|
|
140
|
+
/**
|
|
141
|
+
* Checks whether a customCanvas block should keep its nested children in the legacy renderer.
|
|
142
|
+
* @param block - Parent materialized block.
|
|
143
|
+
* @returns True when nested GridStack editing must be disabled.
|
|
144
|
+
*/
|
|
145
|
+
export declare function shouldLockNestedGrid(block: MaterializedBlock): boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Checks whether a materialized block can render its nested children as an editable GridStack.
|
|
148
|
+
* @param block - Candidate materialized block.
|
|
149
|
+
* @returns True when the block is customCanvas and not locked by visual/layout policy.
|
|
150
|
+
*/
|
|
151
|
+
export declare function isEditableGridContainerBlock(block: MaterializedBlock): boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Converts a customCanvas nested preview record into a renderer-ready materialized block.
|
|
154
|
+
* @param nestedBlock - Nested preview record saved inside parent customCanvas data.
|
|
155
|
+
* @param parentBlock - Parent customCanvas materialized block.
|
|
156
|
+
* @returns Materialized child block suitable for WorkbenchBlockRenderer.
|
|
157
|
+
*/
|
|
158
|
+
export declare function nestedBlockToMaterializedBlock(nestedBlock: CustomCanvasNestedBlock, parentBlock: MaterializedBlock): MaterializedBlock;
|
|
159
|
+
type NestedConversionOptions = {
|
|
160
|
+
parentId?: string;
|
|
161
|
+
layout?: BlockLayout | WorkbenchGridLayoutNode;
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* Converts a top-level workbench card into a customCanvas nested block without losing runtime metadata.
|
|
165
|
+
* @param block - Top-level materialized card being moved into a parent container.
|
|
166
|
+
* @param options - Parent-local layout and ownership options.
|
|
167
|
+
* @returns Nested block payload suitable for parent customCanvas data.
|
|
168
|
+
*/
|
|
169
|
+
export declare function materializedBlockToNestedBlock(block: MaterializedBlock, options?: NestedConversionOptions): CustomCanvasNestedBlock;
|
|
170
|
+
/**
|
|
171
|
+
* Restores a nested customCanvas child into a top-level materialized block.
|
|
172
|
+
* @param nestedBlock - Nested child payload being promoted to the canvas.
|
|
173
|
+
* @param parentBlock - Parent customCanvas card that previously owned the child.
|
|
174
|
+
* @param options - Top-level layout override.
|
|
175
|
+
* @returns Materialized card that can live in snapshot.blocks.
|
|
176
|
+
*/
|
|
177
|
+
export declare function nestedBlockToTopLevelBlock(nestedBlock: CustomCanvasNestedBlock, parentBlock: MaterializedBlock, options?: NestedConversionOptions): MaterializedBlock;
|
|
178
|
+
type RepairOverlappingImageNestedGridChildrenOptions = {
|
|
179
|
+
parentRows?: number;
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Repairs image-composed nested children that the vision model projected onto the same parent-local slot.
|
|
183
|
+
* @param children - Parent-local nested children from customCanvas nestedBlocks.
|
|
184
|
+
* @param options - Optional parent row budget used to size the repaired grid.
|
|
185
|
+
* @returns A readable grid when severe sibling overlap exists; otherwise cloned original children.
|
|
186
|
+
*/
|
|
187
|
+
export declare function repairOverlappingImageNestedGridChildren(children: readonly WorkbenchGridLayoutNode[], options?: RepairOverlappingImageNestedGridChildrenOptions): WorkbenchGridLayoutNode[];
|
|
188
|
+
type CompactSparseImageNestedGridChildrenOptions = {
|
|
189
|
+
parentRows?: number;
|
|
190
|
+
};
|
|
191
|
+
/**
|
|
192
|
+
* Compacts sparse image nested children into an even matrix while preserving child ids and bindings.
|
|
193
|
+
* @param children - Parent-local nested children.
|
|
194
|
+
* @param options - Optional parent row span used to detect sparse shells.
|
|
195
|
+
* @returns Children arranged as two or three compact columns when the source layout is too sparse.
|
|
196
|
+
*/
|
|
197
|
+
export declare function compactSparseImageNestedGridChildren(children: readonly WorkbenchGridLayoutNode[], options?: CompactSparseImageNestedGridChildrenOptions): WorkbenchGridLayoutNode[];
|
|
198
|
+
/**
|
|
199
|
+
* Returns the compact parent row span required by image nested child cards.
|
|
200
|
+
* @param children - Parent-local nested children after display compaction.
|
|
201
|
+
* @returns Parent row span including card chrome.
|
|
202
|
+
*/
|
|
203
|
+
export declare function imageNestedGridCompactParentRows(children: readonly WorkbenchGridLayoutNode[]): number;
|
|
204
|
+
/**
|
|
205
|
+
* Returns whether persisted image nested children came from a stale edit layout.
|
|
206
|
+
* @param existingChildren - Children currently carried by persisted or draft V4 layout.
|
|
207
|
+
* @param fallbackChildren - Children derived from the current image nested payload.
|
|
208
|
+
* @returns True when edit mode should seed from fallback children instead of persisted geometry.
|
|
209
|
+
*/
|
|
210
|
+
export declare function shouldReplaceStaleImageNestedChildren(existingChildren: readonly WorkbenchGridLayoutNode[] | undefined, fallbackChildren: readonly WorkbenchGridLayoutNode[]): boolean;
|
|
211
|
+
/**
|
|
212
|
+
* Converts a customCanvas block's nestedBlocks into parent-local V4 children.
|
|
213
|
+
* @param block - Parent materialized block.
|
|
214
|
+
* @returns Children using the nested 12-column grid.
|
|
215
|
+
*/
|
|
216
|
+
export declare function customCanvasNestedBlocksToChildren(block: MaterializedBlock): WorkbenchGridLayoutNode[];
|
|
217
|
+
/**
|
|
218
|
+
* Rebuilds customCanvas nestedBlocks from V4 children while preserving nested content payloads when possible.
|
|
219
|
+
* @param parentBlock - Parent materialized block.
|
|
220
|
+
* @param children - Children that now belong to this parent.
|
|
221
|
+
* @returns Nested block records with updated parent-local layouts.
|
|
222
|
+
*/
|
|
223
|
+
export declare function childrenToCustomCanvasNestedBlocks(parentBlock: MaterializedBlock, children: readonly WorkbenchGridLayoutNode[], nestedPayloadById?: ReadonlyMap<string, CustomCanvasNestedBlock>): CustomCanvasNestedBlock[];
|
|
224
|
+
/**
|
|
225
|
+
* Merges top-level and nested V4 positions back into materialized blocks.
|
|
226
|
+
* @param blocks - Current materialized blocks.
|
|
227
|
+
* @param layoutTree - V4 layout tree.
|
|
228
|
+
* @returns Blocks with top-level layout and nestedBlocks updated.
|
|
229
|
+
*/
|
|
230
|
+
export declare function mergeLayoutV4IntoBlocks(blocks: readonly MaterializedBlock[], layoutTree: WorkbenchLayoutV4): MaterializedBlock[];
|
|
231
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview GridStack 布局保存选择 - 统一决定配置保存时使用的布局树来源
|
|
3
|
+
* @author seadon
|
|
4
|
+
* @created 2026-07-03
|
|
5
|
+
*/
|
|
6
|
+
import type { WorkbenchLayoutV4 } from '@fses/workbench-app/types';
|
|
7
|
+
export type GridstackLayoutTreeForSaveInput = {
|
|
8
|
+
programmaticLayoutTree: WorkbenchLayoutV4 | null;
|
|
9
|
+
draftUserEdited: boolean;
|
|
10
|
+
latestRenderedLayoutTree: () => WorkbenchLayoutV4 | null;
|
|
11
|
+
draftLayoutTree: WorkbenchLayoutV4 | null;
|
|
12
|
+
activeLayoutTree: WorkbenchLayoutV4;
|
|
13
|
+
};
|
|
14
|
+
export type GridstackAutoArrangeSaveState = {
|
|
15
|
+
draftLayoutTree: WorkbenchLayoutV4;
|
|
16
|
+
programmaticLayoutTreeForSave: WorkbenchLayoutV4;
|
|
17
|
+
draftUserEdited: true;
|
|
18
|
+
};
|
|
19
|
+
export type GridstackDeleteSaveState = GridstackAutoArrangeSaveState;
|
|
20
|
+
export type GridstackUserEditSaveState = {
|
|
21
|
+
draftLayoutTree: WorkbenchLayoutV4;
|
|
22
|
+
programmaticLayoutTreeForSave: null;
|
|
23
|
+
draftUserEdited: true;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* 选择配置保存时应持久化的 GridStack 布局树。
|
|
27
|
+
* @param input - 保存布局候选来源。
|
|
28
|
+
* @returns 本次保存应使用的 V4 布局树,或无可用布局时返回 null。
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveGridstackLayoutTreeForSave(input: GridstackLayoutTreeForSaveInput): WorkbenchLayoutV4 | null;
|
|
31
|
+
/**
|
|
32
|
+
* 生成自动排列后的 GridStack 保存状态。
|
|
33
|
+
* @param arrangedLayoutTree - 自动排列产生的目标布局树。
|
|
34
|
+
* @returns 同时写入草稿和程序化保存槽的状态。
|
|
35
|
+
*/
|
|
36
|
+
export declare function resolveGridstackAutoArrangeSaveState(arrangedLayoutTree: WorkbenchLayoutV4): GridstackAutoArrangeSaveState;
|
|
37
|
+
/**
|
|
38
|
+
* 生成删除卡片压缩后的 GridStack 保存状态。
|
|
39
|
+
* @param compactedLayoutTree - 删除卡片后压缩产生的目标布局树。
|
|
40
|
+
* @returns 同时写入草稿和程序化保存槽的状态。
|
|
41
|
+
*/
|
|
42
|
+
export declare function resolveGridstackDeleteSaveState(compactedLayoutTree: WorkbenchLayoutV4): GridstackDeleteSaveState;
|
|
43
|
+
/**
|
|
44
|
+
* 生成用户直接拖拽/缩放后的 GridStack 保存状态。
|
|
45
|
+
* @param editedLayoutTree - 用户交互产生的最新布局树。
|
|
46
|
+
* @returns 清空程序化保存槽后的用户编辑状态。
|
|
47
|
+
*/
|
|
48
|
+
export declare function resolveGridstackUserEditSaveState(editedLayoutTree: WorkbenchLayoutV4): GridstackUserEditSaveState;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Image-composed workbench canvas sizing - resolves responsive display and stable edit widths.
|
|
3
|
+
* @author seadon
|
|
4
|
+
* @created 2026-06-09
|
|
5
|
+
*/
|
|
6
|
+
interface ImageCanvasWidthOptions {
|
|
7
|
+
availableWidth: number;
|
|
8
|
+
sourceContentWidth: number;
|
|
9
|
+
maxWidth: number;
|
|
10
|
+
configMode: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface ImageCanvasHeightOptions {
|
|
13
|
+
layoutHeight: number;
|
|
14
|
+
sourceFrameHeight?: number;
|
|
15
|
+
sourceScale?: number;
|
|
16
|
+
renderedContentHeight?: number;
|
|
17
|
+
fallbackHeight?: number;
|
|
18
|
+
configMode: boolean;
|
|
19
|
+
sourceBoxSafetyFallbackActive: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface ImageGridstackCanvasMinHeightOptions {
|
|
22
|
+
requestedMinHeight: number;
|
|
23
|
+
renderedLayoutBottom: number;
|
|
24
|
+
configMode: boolean;
|
|
25
|
+
preserveSourceMinHeight: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Resolves image-composed board width for responsive display while preserving edit-mode source width.
|
|
29
|
+
* @param options - Available viewport, source frame, and edit-mode sizing inputs.
|
|
30
|
+
* @returns Board width in CSS pixels.
|
|
31
|
+
*/
|
|
32
|
+
export declare function resolveImageComposeCanvasWidth(options: ImageCanvasWidthOptions): number;
|
|
33
|
+
/**
|
|
34
|
+
* Resolves image-composed board height without keeping stale full-source blank space in display mode.
|
|
35
|
+
* @param options - Layout, source-frame, and safety-fallback sizing inputs.
|
|
36
|
+
* @returns Board height in CSS pixels.
|
|
37
|
+
*/
|
|
38
|
+
export declare function resolveImageComposeCanvasHeight(options: ImageCanvasHeightOptions): number;
|
|
39
|
+
/**
|
|
40
|
+
* Resolves the final GridStack canvas min-height for image-composed dashboards.
|
|
41
|
+
* @param options - Requested parent min-height, rendered card bottom, and mode flags.
|
|
42
|
+
* @returns GridStack canvas min-height in CSS pixels.
|
|
43
|
+
*/
|
|
44
|
+
export declare function resolveImageComposeGridstackCanvasMinHeight(options: ImageGridstackCanvasMinHeightOptions): number;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Workbench image compose entry helpers - normalizes AI chat image upload payloads for V2 compose.
|
|
3
|
+
* @author seadon
|
|
4
|
+
* @created 2026-05-12
|
|
5
|
+
*/
|
|
6
|
+
export declare const defaultWorkbenchImageComposePrompt = "\u8BF7\u8BC6\u522B\u622A\u56FE\u5E76\u751F\u6210 V2 \u5DE5\u4F5C\u53F0\u5361\u7247";
|
|
7
|
+
export interface WorkbenchImageUploadEntryPayload {
|
|
8
|
+
base64: string;
|
|
9
|
+
file?: File;
|
|
10
|
+
fileName?: string;
|
|
11
|
+
messageId?: string;
|
|
12
|
+
mimeType: string;
|
|
13
|
+
text?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface WorkbenchImageComposeV2Payload {
|
|
16
|
+
content: string;
|
|
17
|
+
image: {
|
|
18
|
+
base64: string;
|
|
19
|
+
mimeType: string;
|
|
20
|
+
};
|
|
21
|
+
imageContext?: {
|
|
22
|
+
fileName?: string;
|
|
23
|
+
originalWidth?: number;
|
|
24
|
+
originalHeight?: number;
|
|
25
|
+
optimizedWidth?: number;
|
|
26
|
+
optimizedHeight?: number;
|
|
27
|
+
};
|
|
28
|
+
messageId?: string;
|
|
29
|
+
}
|
|
30
|
+
export type WorkbenchImageComposeOptimizer = (image: {
|
|
31
|
+
base64: string;
|
|
32
|
+
mimeType: string;
|
|
33
|
+
}) => Promise<{
|
|
34
|
+
base64: string;
|
|
35
|
+
mimeType: string;
|
|
36
|
+
originalWidth?: number;
|
|
37
|
+
originalHeight?: number;
|
|
38
|
+
optimizedWidth?: number;
|
|
39
|
+
optimizedHeight?: number;
|
|
40
|
+
}>;
|
|
41
|
+
/**
|
|
42
|
+
* Builds the V2 compose request shape from the AI chat image-upload event payload.
|
|
43
|
+
* @param payload - Image payload emitted by the shared AI chat component.
|
|
44
|
+
* @returns Normalized runtime payload for composeImageV2.
|
|
45
|
+
*/
|
|
46
|
+
export declare function buildWorkbenchImageComposeV2Payload(payload: WorkbenchImageUploadEntryPayload): WorkbenchImageComposeV2Payload;
|
|
47
|
+
/**
|
|
48
|
+
* Builds a V2 compose payload and lets the workbench page optimize large screenshots before model upload.
|
|
49
|
+
* @param payload - Image payload emitted by the shared AI chat component.
|
|
50
|
+
* @param optimizer - Optional image optimizer for browser canvas compression.
|
|
51
|
+
* @returns Runtime payload for composeImageV2.
|
|
52
|
+
*/
|
|
53
|
+
export declare function buildOptimizedWorkbenchImageComposeV2Payload(payload: WorkbenchImageUploadEntryPayload, optimizer?: WorkbenchImageComposeOptimizer): Promise<WorkbenchImageComposeV2Payload>;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview 图生卡 GridStack 行恢复工具 - 归并同源截图行并生成整齐的 24 列布局
|
|
3
|
+
* @author seadon
|
|
4
|
+
* @created 2026-06-23
|
|
5
|
+
*/
|
|
6
|
+
import type { WorkbenchGridLayoutNode } from '@fses/workbench-app/types';
|
|
7
|
+
/**
|
|
8
|
+
* Checks whether a sparse metric row is the tail of the previous dense KPI row.
|
|
9
|
+
* @param previousRow - Dense upper metric row.
|
|
10
|
+
* @param currentRow - Candidate lower sparse metric row.
|
|
11
|
+
* @returns True when the rows should render as one responsive KPI strip.
|
|
12
|
+
*/
|
|
13
|
+
export declare function shouldMergeSplitImageMetricSummaryGridstackRow(previousRow: readonly WorkbenchGridLayoutNode[], currentRow: readonly WorkbenchGridLayoutNode[]): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Merges split KPI tail rows before render-time width normalization.
|
|
16
|
+
* @param rows - Visual metric rows ordered from top to bottom.
|
|
17
|
+
* @returns Rows with dense KPI tails folded into the preceding row.
|
|
18
|
+
*/
|
|
19
|
+
export declare function mergeSplitImageMetricSummaryGridstackRows(rows: readonly WorkbenchGridLayoutNode[][]): WorkbenchGridLayoutNode[][];
|
|
20
|
+
export type ImageLayoutBasisGridstackRowBasis = {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
w: number;
|
|
24
|
+
h: number;
|
|
25
|
+
baseCols?: number;
|
|
26
|
+
};
|
|
27
|
+
export type ImageLayoutBasisGridstackRowCandidate = {
|
|
28
|
+
basis: ImageLayoutBasisGridstackRowBasis;
|
|
29
|
+
};
|
|
30
|
+
export type ImageLayoutBasisGridstackRowPlacement = {
|
|
31
|
+
x: number;
|
|
32
|
+
w: number;
|
|
33
|
+
};
|
|
34
|
+
export type ImageSparseCustomCanvasParentRowsMetrics = {
|
|
35
|
+
childCount: number;
|
|
36
|
+
totalChildRows: number;
|
|
37
|
+
sourceRows: number;
|
|
38
|
+
paddingRows: number;
|
|
39
|
+
preserveSourceRows?: boolean;
|
|
40
|
+
};
|
|
41
|
+
export type ImageGridstackParentRowsForNestedChildrenOptions = {
|
|
42
|
+
minRows?: number;
|
|
43
|
+
paddingRows?: number;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Computes the parent rows required by nested image cards.
|
|
47
|
+
* @param children - Parent-local nested GridStack children.
|
|
48
|
+
* @param options - Minimum parent rows and chrome padding rows.
|
|
49
|
+
* @returns Parent row span that covers the nested child bounding box.
|
|
50
|
+
*/
|
|
51
|
+
export declare function imageGridstackParentRowsForNestedChildren(children: readonly WorkbenchGridLayoutNode[], options?: ImageGridstackParentRowsForNestedChildrenOptions): number;
|
|
52
|
+
/**
|
|
53
|
+
* Computes readable rows for sparse image customCanvas parents.
|
|
54
|
+
* @param metrics - Child count, child row usage, source bbox rows, and chrome padding.
|
|
55
|
+
* @returns Parent rows that compact whitespace without clipping nested child cards.
|
|
56
|
+
*/
|
|
57
|
+
export declare function imageSparseCustomCanvasParentRowsFromMetrics(metrics: ImageSparseCustomCanvasParentRowsMetrics): number;
|
|
58
|
+
/**
|
|
59
|
+
* 判断 layoutBasis 候选是否属于当前截图源行。
|
|
60
|
+
* @param row - 当前已归并的源行候选。
|
|
61
|
+
* @param entry - 待追加候选。
|
|
62
|
+
* @returns 同源且宽度预算可容纳时返回 true。
|
|
63
|
+
*/
|
|
64
|
+
export declare function canAppendImageLayoutBasisGridstackRow<T extends ImageLayoutBasisGridstackRowCandidate>(row: T[], entry: T): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* 为同源截图行计算 24 列 GridStack 位置,密集多卡行按整行均分。
|
|
67
|
+
* @param row - 已归并的同源行候选。
|
|
68
|
+
* @returns 每个候选对应的 x/w 位置。
|
|
69
|
+
*/
|
|
70
|
+
export declare function imageLayoutBasisGridstackRowPlacements<T extends ImageLayoutBasisGridstackRowCandidate>(row: T[]): ImageLayoutBasisGridstackRowPlacement[];
|
|
71
|
+
/**
|
|
72
|
+
* 将行内位置写回 GridStack 节点,并保持原节点其它交互属性。
|
|
73
|
+
* @param row - 同源候选行。
|
|
74
|
+
* @param rowHeight - 该行统一高度。
|
|
75
|
+
* @param cursorY - 当前输出行 y 坐标。
|
|
76
|
+
* @returns 恢复后的 GridStack 节点。
|
|
77
|
+
*/
|
|
78
|
+
export declare function recoverImageLayoutBasisGridstackRowNodes<T extends ImageLayoutBasisGridstackRowCandidate & {
|
|
79
|
+
node: WorkbenchGridLayoutNode;
|
|
80
|
+
}>(row: T[], rowHeight: number, cursorY: number): {
|
|
81
|
+
x: number;
|
|
82
|
+
y: number;
|
|
83
|
+
w: number;
|
|
84
|
+
h: number;
|
|
85
|
+
parentId?: string;
|
|
86
|
+
children?: WorkbenchGridLayoutNode[];
|
|
87
|
+
i: string;
|
|
88
|
+
minW?: number;
|
|
89
|
+
minH?: number;
|
|
90
|
+
maxW?: number;
|
|
91
|
+
maxH?: number;
|
|
92
|
+
static?: boolean;
|
|
93
|
+
}[];
|