@loopstack/loopstack-studio 0.29.5 → 0.30.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/dist/_virtual/rolldown_runtime.js +3 -1
- package/dist/api/config.js +5 -4
- package/dist/api/environments.js +5 -1
- package/dist/api/processor.js +4 -1
- package/dist/app/EnvironmentEmbedRoot.js +22 -30
- package/dist/components/ai-elements/code-block.js +4 -4
- package/dist/components/dynamic-form/CodeContent.js +1 -1
- package/dist/components/dynamic-form/FormBody.js +1 -1
- package/dist/components/motion/FadeIn.js +72 -0
- package/dist/components/motion/StreamingText.js +49 -0
- package/dist/components/ui/accordion.js +2 -2
- package/dist/components/ui-widgets/UiWidget.js +11 -10
- package/dist/components/ui-widgets/widgets/AiPromptInput.js +31 -28
- package/dist/events/sse-client-events.js +7 -1
- package/dist/features/code-explorer/components/FileContentViewer.js +2 -2
- package/dist/features/debug/components/WorkflowFlowViewer.js +49 -51
- package/dist/features/documents/DocumentRenderer.js +18 -17
- package/dist/features/documents/components/DocumentItem.js +42 -20
- package/dist/features/documents/components/DocumentList.js +34 -36
- package/dist/features/documents/components/DocumentMetadataPills.js +102 -49
- package/dist/features/documents/document-details/DocumentDetails.js +577 -377
- package/dist/features/documents/document-details/PromptDetails.js +118 -130
- package/dist/features/documents/document-details/document-debug-utils.js +100 -0
- package/dist/features/documents/renderers/ChoicesRenderer.js +41 -38
- package/dist/features/documents/renderers/ConfirmPromptRenderer.js +31 -28
- package/dist/features/documents/renderers/DocumentFormRenderer.js +62 -70
- package/dist/features/documents/renderers/LlmMessage.js +52 -47
- package/dist/features/documents/renderers/TextPromptRenderer.js +32 -29
- package/dist/features/documents/renderers/useDocumentTransition.js +4 -4
- package/dist/features/feature-registry/FeatureRegistryProvider.js +32 -10
- package/dist/features/feature-registry/available-features.js +12 -0
- package/dist/features/feature-registry/index.js +2 -1
- package/dist/features/file-explorer/components/FileExplorerPanel.js +55 -51
- package/dist/features/git/components/GitBranchBadge.js +31 -0
- package/dist/features/git/components/GitCommitList.js +46 -0
- package/dist/features/git/components/GitRemoteStatus.js +84 -0
- package/dist/features/git/components/WorkbenchGitPanel.js +81 -0
- package/dist/features/git/git-feature.js +12 -0
- package/dist/features/git/hooks/useGit.js +78 -0
- package/dist/features/git/index.js +1 -0
- package/dist/features/oauth/OAuthPromptRenderer.js +137 -142
- package/dist/features/runs/Runs.js +4 -4
- package/dist/features/secrets/components/WorkbenchSecretsPanel.js +1 -1
- package/dist/features/secrets/renderers/SecretInputRenderer.js +30 -29
- package/dist/features/workbench/Workbench.js +25 -33
- package/dist/features/workbench/WorkflowItem.js +9 -9
- package/dist/features/workbench/WorkflowList.js +61 -62
- package/dist/features/workbench/components/NewRunDialog.js +237 -209
- package/dist/features/workbench/components/RecentRunItem.js +3 -3
- package/dist/features/workbench/components/WorkbenchEnvironmentPanel.js +8 -8
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +1 -1
- package/dist/features/workbench/components/WorkbenchSidebarShell.js +3 -3
- package/dist/features/workbench/components/WorkflowForms.js +11 -10
- package/dist/features/workbench/components/WorkflowHistoryItem.js +16 -36
- package/dist/features/workbench/components/WorkflowHistoryList.js +19 -17
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +3 -3
- package/dist/features/workbench/hooks/useLlmStreamingDocuments.js +159 -0
- package/dist/features/workbench/hooks/useWorkflowData.js +58 -31
- package/dist/features/workbench/index.js +2 -2
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +53 -53
- package/dist/features/workspaces/Workspaces.js +134 -125
- package/dist/features/workspaces/components/CreateWorkspace.js +115 -107
- package/dist/features/workspaces/components/ExecutionTimeline.js +2 -2
- package/dist/features/workspaces/components/WorkflowRunForm.js +127 -104
- package/dist/features/workspaces/components/WorkspaceHomePage.js +6 -89
- package/dist/features/workspaces/components/workflow-form/ArgumentsView.js +1 -1
- package/dist/features/workspaces/components/workflow-form/SelectionView.js +15 -15
- package/dist/hooks/index.js +3 -2
- package/dist/hooks/query-keys.js +43 -30
- package/dist/hooks/useConfig.js +28 -22
- package/dist/hooks/useEnvironments.js +27 -2
- package/dist/hooks/useProcessor.js +14 -1
- package/dist/hooks/useWorkflows.js +4 -4
- package/dist/index.d.ts +116 -15
- package/dist/index.js +9 -8
- package/dist/node_modules/d3/src/index.js +13 -13
- package/dist/node_modules/d3-scale/src/continuous.js +16 -16
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-3BPJPVTR.js +43 -43
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-GPEHLZMM.js +270 -270
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAUBKEIU.js +90 -90
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-3OPIFGDE.js +458 -458
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.js +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5ZQYHXKU.js +37 -37
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-727SXJPM.js +208 -208
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-KSCS5N6A.js +145 -145
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ND2GUHAM.js +7 -7
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-O5CBEL6O.js +41 -41
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-WU5MYG2G.js +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.js +6 -6
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-KO2AKTUF.js +30 -30
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-OG6HWLK6.js +82 -82
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-TEJ5UH35.js +65 -65
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-I6XJVG4X.js +227 -227
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-6RSMTGT7.js +104 -104
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-PVQCEYII.js +104 -104
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-JHISSGLW.js +49 -49
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-W4KKPZXB.js +101 -101
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-5OEKKPKP.js +20 -20
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-3UESZ5HK.js +354 -354
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-AJRCARHV.js +53 -53
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-PNZ67QCA.js +113 -113
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-CIIHVFJN.js +90 -90
- package/dist/node_modules/mermaid/dist/mermaid.core.js +156 -156
- package/dist/node_modules/motion/dist/es/react.js +9 -2
- package/dist/pages/DebugWorkflowDetailsPage.js +2 -2
- package/dist/pages/DebugWorkflowsPage.js +76 -106
- package/dist/pages/EmbedWorkbenchPage.js +1 -1
- package/dist/pages/PreviewWorkbenchPage.js +6 -6
- package/dist/pages/WorkbenchPage.js +43 -47
- package/dist/pages/WorkflowDebugPage.js +6 -12
- package/dist/pages/WorkspacePage.js +40 -66
- package/dist/pages/WorkspaceRunsPage.js +24 -31
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ import * as SelectPrimitive from '@radix-ui/react-select';
|
|
|
37
37
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
38
38
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
39
39
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
40
|
+
import { ToolConfigInterface } from '@loopstack/contracts/api';
|
|
40
41
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
41
42
|
import { UseMutationResult } from '@tanstack/react-query';
|
|
42
43
|
import { useNavigate } from 'react-router-dom';
|
|
@@ -252,16 +253,17 @@ declare function createApi(http: AxiosInstance): {
|
|
|
252
253
|
logout: () => Promise<void>;
|
|
253
254
|
};
|
|
254
255
|
config: {
|
|
255
|
-
|
|
256
|
-
getWorkflowTypesByApp: (params: {
|
|
257
|
-
appBlockName: string;
|
|
258
|
-
}) => Promise<WorkflowConfigInterface[]>;
|
|
256
|
+
getApps: () => Promise<StudioAppConfig[]>;
|
|
259
257
|
getWorkflowConfig: (params: {
|
|
260
|
-
|
|
258
|
+
workflowName: string;
|
|
261
259
|
}) => Promise<WorkflowConfigInterface>;
|
|
262
260
|
getWorkflowSource: (params: {
|
|
263
|
-
|
|
261
|
+
workflowName: string;
|
|
264
262
|
}) => Promise<WorkflowSourceInterface>;
|
|
263
|
+
getToolConfigs: () => Promise<ToolConfigInterface[]>;
|
|
264
|
+
getToolConfig: (params: {
|
|
265
|
+
toolName: string;
|
|
266
|
+
}) => Promise<ToolConfigInterface>;
|
|
265
267
|
getAvailableEnvironments: () => Promise<AvailableEnvironmentInterface[]>;
|
|
266
268
|
};
|
|
267
269
|
dashboard: {
|
|
@@ -279,6 +281,8 @@ declare function createApi(http: AxiosInstance): {
|
|
|
279
281
|
}) => Promise<PaginatedInterface<DocumentItemInterface_2>>;
|
|
280
282
|
};
|
|
281
283
|
environments: {
|
|
284
|
+
getByWorkspace: (workspaceId: string) => Promise<WorkspaceEnvironmentInterface[]>;
|
|
285
|
+
replaceEnvironments: (workspaceId: string, environments: WorkspaceEnvironmentInterface[]) => Promise<WorkspaceEnvironmentInterface[]>;
|
|
282
286
|
resetEnvironment: (params: {
|
|
283
287
|
workspaceId: string;
|
|
284
288
|
slotId: string;
|
|
@@ -315,6 +319,9 @@ declare function createApi(http: AxiosInstance): {
|
|
|
315
319
|
}>;
|
|
316
320
|
};
|
|
317
321
|
processor: {
|
|
322
|
+
startWorkflow: (params: {
|
|
323
|
+
payload: StartWorkflowPayload;
|
|
324
|
+
}) => Promise<WorkflowRunResult>;
|
|
318
325
|
runWorkflow: (params: {
|
|
319
326
|
workflowId: string;
|
|
320
327
|
runWorkflowPayloadDto: RunWorkflowPayloadInterface;
|
|
@@ -731,6 +738,7 @@ declare class EventEmitter {
|
|
|
731
738
|
export declare function FeatureRegistryProvider({ features, children }: FeatureRegistryProviderProps): JSX.Element;
|
|
732
739
|
|
|
733
740
|
export declare interface FeatureRegistryProviderProps {
|
|
741
|
+
/** Static feature list (fallback when no backend features are available). */
|
|
734
742
|
features?: StudioFeature[];
|
|
735
743
|
children: ReactNode;
|
|
736
744
|
}
|
|
@@ -795,6 +803,12 @@ export declare function getMeCacheKey(envKey: string): string[];
|
|
|
795
803
|
|
|
796
804
|
export declare function getSecretsCacheKey(envKey: string, workspaceId: string): string[];
|
|
797
805
|
|
|
806
|
+
export declare function getStudioAppsCacheKey(envKey: string): string[];
|
|
807
|
+
|
|
808
|
+
export declare function getToolConfigCacheKey(envKey: string, toolName: string): string[];
|
|
809
|
+
|
|
810
|
+
export declare function getToolConfigsCacheKey(envKey: string): string[];
|
|
811
|
+
|
|
798
812
|
export declare function getWorkflowCacheKey(envKey: string, id: string): string[];
|
|
799
813
|
|
|
800
814
|
export declare function getWorkflowConfigCacheKey(envKey: string, alias: string): string[];
|
|
@@ -1205,6 +1219,31 @@ export declare const Snackbar: default_2.FC<BaseSnackbarProps>;
|
|
|
1205
1219
|
|
|
1206
1220
|
export declare function SseProvider(): null;
|
|
1207
1221
|
|
|
1222
|
+
declare interface StartWorkflowPayload {
|
|
1223
|
+
workflowName: string;
|
|
1224
|
+
workspaceId: string;
|
|
1225
|
+
args?: Record<string, unknown>;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
declare interface StaticDocumentMeta {
|
|
1229
|
+
hidden?: boolean;
|
|
1230
|
+
mimeType?: string;
|
|
1231
|
+
level?: 'debug' | 'info' | 'warning' | 'error';
|
|
1232
|
+
enableAtPlaces?: string[];
|
|
1233
|
+
hideAtPlaces?: string[];
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
declare interface StudioAppConfig {
|
|
1237
|
+
appName: string;
|
|
1238
|
+
title: string;
|
|
1239
|
+
description?: string;
|
|
1240
|
+
ui?: StudioUiConfig;
|
|
1241
|
+
features: StudioFeatureRegistration[];
|
|
1242
|
+
extensions?: Record<string, unknown[]>;
|
|
1243
|
+
workflows: StudioWorkflowConfig[];
|
|
1244
|
+
documents: StudioDocumentConfig[];
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1208
1247
|
declare interface StudioContext {
|
|
1209
1248
|
router: StudioRouter;
|
|
1210
1249
|
environment: Environment;
|
|
@@ -1212,12 +1251,30 @@ declare interface StudioContext {
|
|
|
1212
1251
|
|
|
1213
1252
|
declare const StudioContext: Context<StudioContext | null>;
|
|
1214
1253
|
|
|
1254
|
+
declare interface StudioDocumentConfig {
|
|
1255
|
+
documentName: string;
|
|
1256
|
+
title?: string;
|
|
1257
|
+
description?: string;
|
|
1258
|
+
ui?: {
|
|
1259
|
+
widgets?: StudioWidgetConfig[];
|
|
1260
|
+
};
|
|
1261
|
+
tags?: string[];
|
|
1262
|
+
meta?: StaticDocumentMeta;
|
|
1263
|
+
schema?: Record<string, unknown>;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1215
1266
|
export declare interface StudioFeature {
|
|
1216
1267
|
id: string;
|
|
1217
1268
|
documentRenderers?: Record<string, ComponentType<DocumentRendererProps>>;
|
|
1218
1269
|
sidebarPanel?: StudioFeatureSidebarPanel;
|
|
1219
1270
|
}
|
|
1220
1271
|
|
|
1272
|
+
declare interface StudioFeatureRegistration {
|
|
1273
|
+
id: string;
|
|
1274
|
+
enabled: boolean;
|
|
1275
|
+
config: Record<string, unknown>;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1221
1278
|
export declare interface StudioFeatureSidebarPanel {
|
|
1222
1279
|
id: string;
|
|
1223
1280
|
label: string;
|
|
@@ -1282,6 +1339,26 @@ export declare interface StudioRouter {
|
|
|
1282
1339
|
|
|
1283
1340
|
export declare const StudioSidebar: () => JSX.Element;
|
|
1284
1341
|
|
|
1342
|
+
declare interface StudioUiConfig {
|
|
1343
|
+
widgets?: StudioWidgetConfig[];
|
|
1344
|
+
sidebar?: boolean;
|
|
1345
|
+
workflowHistory?: boolean;
|
|
1346
|
+
workflowNavigation?: boolean;
|
|
1347
|
+
debugWorkflow?: boolean;
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
declare interface StudioWidgetConfig {
|
|
1351
|
+
widget: string;
|
|
1352
|
+
options?: Record<string, unknown>;
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
declare interface StudioWorkflowConfig {
|
|
1356
|
+
workflowName: string;
|
|
1357
|
+
title?: string;
|
|
1358
|
+
description?: string;
|
|
1359
|
+
schema?: Record<string, unknown>;
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1285
1362
|
export declare function Switch({ className, ...props }: React_2.ComponentProps<typeof SwitchPrimitive.Root>): JSX.Element;
|
|
1286
1363
|
|
|
1287
1364
|
export declare function Table({ className, ...props }: React_2.ComponentProps<'table'>): JSX.Element;
|
|
@@ -1317,7 +1394,7 @@ export declare function useApiClient(): {
|
|
|
1317
1394
|
api: ApiClient;
|
|
1318
1395
|
};
|
|
1319
1396
|
|
|
1320
|
-
export declare function
|
|
1397
|
+
export declare function useAppsConfig(): UseQueryResult<StudioAppConfig[], Error>;
|
|
1321
1398
|
|
|
1322
1399
|
export declare function useAvailableEnvironments(options?: {
|
|
1323
1400
|
enabled?: boolean;
|
|
@@ -1355,6 +1432,12 @@ export declare function useDeleteWorkflow(): UseMutationResult<void, Error, stri
|
|
|
1355
1432
|
|
|
1356
1433
|
export declare function useDeleteWorkspace(): UseMutationResult<void, Error, string, unknown>;
|
|
1357
1434
|
|
|
1435
|
+
/**
|
|
1436
|
+
* Returns a Map of document configs keyed by documentName.
|
|
1437
|
+
* Document configs are fetched as part of the apps config and are global (same across all apps).
|
|
1438
|
+
*/
|
|
1439
|
+
export declare function useDocumentConfigs(): Map<string, StudioDocumentConfig>;
|
|
1440
|
+
|
|
1358
1441
|
/**
|
|
1359
1442
|
* Fetch a filtered, sorted, paginated list of workflows.
|
|
1360
1443
|
*/
|
|
@@ -1366,6 +1449,19 @@ export declare function useIsMobile(): boolean;
|
|
|
1366
1449
|
|
|
1367
1450
|
export declare function useOptionalStudioPreferences(): StudioPreferencesContextType | null;
|
|
1368
1451
|
|
|
1452
|
+
export declare function useReplaceEnvironments(): UseMutationResult<WorkspaceEnvironmentInterface[], Error, {
|
|
1453
|
+
workspaceId: string;
|
|
1454
|
+
environments: WorkspaceEnvironmentInterface[];
|
|
1455
|
+
}, unknown>;
|
|
1456
|
+
|
|
1457
|
+
export declare function useResetEnvironment(): UseMutationResult< {
|
|
1458
|
+
success: boolean;
|
|
1459
|
+
message: string;
|
|
1460
|
+
}, Error, {
|
|
1461
|
+
workspaceId: string;
|
|
1462
|
+
slotId: string;
|
|
1463
|
+
}, unknown>;
|
|
1464
|
+
|
|
1369
1465
|
export declare const useRouter: (envId: string, embedPrefix?: string) => StudioRouter;
|
|
1370
1466
|
|
|
1371
1467
|
export declare function useSetFavouriteWorkspace(): UseMutationResult<void, Error, {
|
|
@@ -1404,24 +1500,23 @@ export declare function useWorkflow(id: string | undefined): UseQueryResult<Work
|
|
|
1404
1500
|
*/
|
|
1405
1501
|
export declare function useWorkflowCheckpoints(workflowId: string): UseQueryResult<WorkflowCheckpoint[], Error>;
|
|
1406
1502
|
|
|
1407
|
-
export declare function useWorkflowConfig(appBlockName: string | undefined): UseQueryResult<WorkflowConfigInterface[], Error>;
|
|
1408
|
-
|
|
1409
1503
|
/**
|
|
1410
|
-
* Fetch workflow config by
|
|
1504
|
+
* Fetch workflow config by workflow name (the identifier stored on the workflow entity).
|
|
1411
1505
|
*/
|
|
1412
|
-
export declare function useWorkflowConfigByName(
|
|
1506
|
+
export declare function useWorkflowConfigByName(workflowName: string | undefined): UseQueryResult<WorkflowConfigInterface, Error>;
|
|
1413
1507
|
|
|
1414
1508
|
/**
|
|
1415
|
-
* Fetch workflow source by
|
|
1509
|
+
* Fetch workflow source by workflow name (class name).
|
|
1416
1510
|
*/
|
|
1417
|
-
export declare function useWorkflowSource(
|
|
1511
|
+
export declare function useWorkflowSource(workflowName: string | undefined): UseQueryResult<WorkflowSourceInterface, Error>;
|
|
1418
1512
|
|
|
1419
1513
|
export declare function useWorkspace(id: string | undefined): UseQueryResult<WorkspaceInterface, Error>;
|
|
1420
1514
|
|
|
1421
|
-
export declare function
|
|
1515
|
+
export declare function useWorkspaceEnvironments(workspaceId?: string): UseQueryResult<WorkspaceEnvironmentInterface[], Error>;
|
|
1516
|
+
|
|
1517
|
+
export declare function WorkbenchPage({ getPreviewUrl, getEnvironmentPreviewUrl, }?: {
|
|
1422
1518
|
getPreviewUrl?: (workflowId: string) => string;
|
|
1423
1519
|
getEnvironmentPreviewUrl?: (env: WorkspaceEnvironmentInterface, workflowId?: string) => string;
|
|
1424
|
-
environments?: WorkspaceEnvironmentInterface[];
|
|
1425
1520
|
}): JSX.Element;
|
|
1426
1521
|
|
|
1427
1522
|
declare interface WorkflowCheckpoint {
|
|
@@ -1435,6 +1530,12 @@ declare interface WorkflowCheckpoint {
|
|
|
1435
1530
|
|
|
1436
1531
|
export declare const WorkflowDebugPage: default_2.FC;
|
|
1437
1532
|
|
|
1533
|
+
declare interface WorkflowRunResult {
|
|
1534
|
+
workflowId: string;
|
|
1535
|
+
workspaceId: string;
|
|
1536
|
+
status: string;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1438
1539
|
export declare const WorkspacePage: () => JSX.Element;
|
|
1439
1540
|
|
|
1440
1541
|
export declare const WorkspaceRunsPage: () => JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { getAppTypesCacheKey, getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspacesCacheKey } from "./hooks/query-keys.js";
|
|
1
|
+
import { getAppTypesCacheKey, getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getStudioAppsCacheKey, getToolConfigCacheKey, getToolConfigsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspacesCacheKey } from "./hooks/query-keys.js";
|
|
2
2
|
import { createApiClient } from "./services/createApiClient.js";
|
|
3
3
|
import { eventBus } from "./services/eventEmitter.js";
|
|
4
4
|
import "./services/index.js";
|
|
5
5
|
import { StudioProvider, useStudio, useStudioOptional } from "./providers/StudioProvider.js";
|
|
6
6
|
import { useApiClient } from "./hooks/useApi.js";
|
|
7
7
|
import { useIsMobile } from "./hooks/use-mobile.js";
|
|
8
|
-
import {
|
|
8
|
+
import { useAppsConfig, useAvailableEnvironments, useDocumentConfigs } from "./hooks/useConfig.js";
|
|
9
|
+
import { useReplaceEnvironments, useResetEnvironment, useWorkspaceEnvironments } from "./hooks/useEnvironments.js";
|
|
9
10
|
import { useBatchDeleteWorkflows, useChildWorkflows, useCreateWorkflow, useDeleteWorkflow, useFilterWorkflows, useUpdateWorkflow, useWorkflow, useWorkflowCheckpoints, useWorkflowConfigByName, useWorkflowSource } from "./hooks/useWorkflows.js";
|
|
10
11
|
import { useBatchDeleteWorkspaces, useCreateWorkspace, useDeleteWorkspace, useFilterWorkspaces, useSetFavouriteWorkspace, useUpdateWorkspace, useWorkspace } from "./hooks/useWorkspaces.js";
|
|
11
12
|
import "./hooks/index.js";
|
|
@@ -67,11 +68,15 @@ import DashboardPage from "./pages/DashboardPage.js";
|
|
|
67
68
|
import { EnvironmentSlotSelector } from "./features/workspaces/components/EnvironmentSlotSelector.js";
|
|
68
69
|
import CreateWorkspace_default from "./features/workspaces/components/CreateWorkspace.js";
|
|
69
70
|
import WorkspacesPage from "./pages/WorkspacesPage.js";
|
|
71
|
+
import "./features/workspaces/index.js";
|
|
72
|
+
import { fileExplorerFeature } from "./features/file-explorer/file-explorer-feature.js";
|
|
73
|
+
import "./features/file-explorer/index.js";
|
|
74
|
+
import { secretsFeature } from "./features/secrets/secrets-feature.js";
|
|
75
|
+
import "./features/secrets/index.js";
|
|
70
76
|
import { FeatureRegistryProvider } from "./features/feature-registry/FeatureRegistryProvider.js";
|
|
71
77
|
import "./features/feature-registry/index.js";
|
|
72
78
|
import WorkspacePage_default from "./pages/WorkspacePage.js";
|
|
73
79
|
import WorkspaceRunsPage_default from "./pages/WorkspaceRunsPage.js";
|
|
74
|
-
import "./features/workspaces/index.js";
|
|
75
80
|
import WorkbenchPage from "./pages/WorkbenchPage.js";
|
|
76
81
|
import WorkflowDebugPage_default from "./pages/WorkflowDebugPage.js";
|
|
77
82
|
import DebugWorkflowsPage from "./pages/DebugWorkflowsPage.js";
|
|
@@ -81,12 +86,8 @@ import PreviewWorkbenchPage from "./pages/PreviewWorkbenchPage.js";
|
|
|
81
86
|
import RunsPage from "./pages/RunsPage.js";
|
|
82
87
|
import RunsListPage from "./pages/RunsListPage.js";
|
|
83
88
|
import StudioLandingPage from "./pages/StudioLandingPage.js";
|
|
84
|
-
import { fileExplorerFeature } from "./features/file-explorer/file-explorer-feature.js";
|
|
85
|
-
import "./features/file-explorer/index.js";
|
|
86
89
|
import LocalHealthCheck_default from "./features/health/LocalHealthCheck.js";
|
|
87
|
-
import { secretsFeature } from "./features/secrets/secrets-feature.js";
|
|
88
|
-
import "./features/secrets/index.js";
|
|
89
90
|
import EnvironmentEmbedRoot from "./app/EnvironmentEmbedRoot.js";
|
|
90
91
|
import { StudioSidebar } from "./components/layout/StudioSidebar.js";
|
|
91
92
|
import "./features/health/index.js";
|
|
92
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, CompletionMessagePaper_default as CompletionMessagePaper, ComponentOverridesProvider, ConfirmDialog_default as ConfirmDialog, CreateWorkspace_default as CreateWorkspace, CustomListView_default as CustomItemListView, DashboardPage, DataList, DataTable, DataTableBatchAction_default as DataTableBatchActions, DataTableFilters_default as DataTableFilters, DataTablePagination_default as DataTablePagination, DataTableToolbar_default as DataTableToolbar, DebugPage_default as DebugPage, DebugWorkflowDetailsPage, DebugWorkflowsPage, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiscordLogo, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmbedWorkbenchPage, EnvironmentEmbedRoot, EnvironmentSlotSelector, ErrorAlert_default as ErrorAlert, ErrorBoundary, ErrorSnackbar_default as ErrorSnackbar, FeatureRegistryProvider, GoogleLogo, Input, InvalidationEventsProvider, ListView_default as ItemListView, Label, LoadingCentered_default as LoadingCentered, LocalHealthCheck_default as LocalHealthCheck, LocalRouter, MainLayout_default as MainLayout, PageBreadcrumbs_default as PageBreadcrumbs, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreviewWorkbenchPage, RadioGroup, RadioGroupItem, RunsListPage, RunsPage, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarInsetDiv, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuDiv, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Snackbar_default as Snackbar, SseProvider, StudioLandingPage, StudioPreferencesProvider, StudioProvider, StudioSidebar, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, WorkbenchPage, WorkflowDebugPage_default as WorkflowDebugPage, WorkspacePage_default as WorkspacePage, WorkspaceRunsPage_default as WorkspaceRunsPage, WorkspacesPage, badgeVariants, buttonVariants, createApiClient, eventBus, fileExplorerFeature, getAppTypesCacheKey, getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspacesCacheKey, secretsFeature, useApiClient,
|
|
93
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, CompletionMessagePaper_default as CompletionMessagePaper, ComponentOverridesProvider, ConfirmDialog_default as ConfirmDialog, CreateWorkspace_default as CreateWorkspace, CustomListView_default as CustomItemListView, DashboardPage, DataList, DataTable, DataTableBatchAction_default as DataTableBatchActions, DataTableFilters_default as DataTableFilters, DataTablePagination_default as DataTablePagination, DataTableToolbar_default as DataTableToolbar, DebugPage_default as DebugPage, DebugWorkflowDetailsPage, DebugWorkflowsPage, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiscordLogo, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmbedWorkbenchPage, EnvironmentEmbedRoot, EnvironmentSlotSelector, ErrorAlert_default as ErrorAlert, ErrorBoundary, ErrorSnackbar_default as ErrorSnackbar, FeatureRegistryProvider, GoogleLogo, Input, InvalidationEventsProvider, ListView_default as ItemListView, Label, LoadingCentered_default as LoadingCentered, LocalHealthCheck_default as LocalHealthCheck, LocalRouter, MainLayout_default as MainLayout, PageBreadcrumbs_default as PageBreadcrumbs, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreviewWorkbenchPage, RadioGroup, RadioGroupItem, RunsListPage, RunsPage, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarInsetDiv, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuDiv, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Snackbar_default as Snackbar, SseProvider, StudioLandingPage, StudioPreferencesProvider, StudioProvider, StudioSidebar, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, WorkbenchPage, WorkflowDebugPage_default as WorkflowDebugPage, WorkspacePage_default as WorkspacePage, WorkspaceRunsPage_default as WorkspaceRunsPage, WorkspacesPage, badgeVariants, buttonVariants, createApiClient, eventBus, fileExplorerFeature, getAppTypesCacheKey, getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getStudioAppsCacheKey, getToolConfigCacheKey, getToolConfigsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspacesCacheKey, secretsFeature, useApiClient, useAppsConfig, useAvailableEnvironments, useBatchDeleteWorkflows, useBatchDeleteWorkspaces, useChildWorkflows, useComponentOverrides, useCreateWorkflow, useCreateWorkspace, useDeleteWorkflow, useDeleteWorkspace, useDocumentConfigs, useFilterWorkflows, useFilterWorkspaces, useIsMobile, useOptionalStudioPreferences, useReplaceEnvironments, useResetEnvironment, useRouter, useSetFavouriteWorkspace, useSidebar, useStudio, useStudioOptional, useStudioPreferences, useUpdateWorkflow, useUpdateWorkspace, useWorkflow, useWorkflowCheckpoints, useWorkflowConfigByName, useWorkflowSource, useWorkspace, useWorkspaceEnvironments };
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import ascending from "../../d3-array/src/ascending.js";
|
|
2
|
-
import descending from "../../d3-array/src/descending.js";
|
|
3
|
-
import bisector from "../../d3-array/src/bisector.js";
|
|
4
|
-
import bisect_default, { bisectRight } from "../../d3-array/src/bisect.js";
|
|
5
|
-
import { InternMap } from "../../internmap/src/index.js";
|
|
6
|
-
import ticks, { tickIncrement, tickStep } from "../../d3-array/src/ticks.js";
|
|
7
|
-
import max from "../../d3-array/src/max.js";
|
|
8
|
-
import min from "../../d3-array/src/min.js";
|
|
9
|
-
import range from "../../d3-array/src/range.js";
|
|
10
|
-
import { axisBottom, axisTop } from "../../d3-axis/src/axis.js";
|
|
11
1
|
import dispatch_default from "../../d3-dispatch/src/dispatch.js";
|
|
12
2
|
import namespaces_default from "../../d3-selection/src/namespaces.js";
|
|
13
3
|
import namespace_default from "../../d3-selection/src/namespace.js";
|
|
@@ -43,6 +33,19 @@ import interrupt_default from "../../d3-transition/src/interrupt.js";
|
|
|
43
33
|
import transition from "../../d3-transition/src/transition/index.js";
|
|
44
34
|
import { cubicInOut } from "../../d3-ease/src/cubic.js";
|
|
45
35
|
import "../../d3-transition/src/index.js";
|
|
36
|
+
import transform, { Transform, identity } from "../../d3-zoom/src/transform.js";
|
|
37
|
+
import zoom_default$1 from "../../d3-zoom/src/zoom.js";
|
|
38
|
+
import "../../d3-zoom/src/index.js";
|
|
39
|
+
import ascending from "../../d3-array/src/ascending.js";
|
|
40
|
+
import descending from "../../d3-array/src/descending.js";
|
|
41
|
+
import bisector from "../../d3-array/src/bisector.js";
|
|
42
|
+
import bisect_default, { bisectRight } from "../../d3-array/src/bisect.js";
|
|
43
|
+
import { InternMap } from "../../internmap/src/index.js";
|
|
44
|
+
import ticks, { tickIncrement, tickStep } from "../../d3-array/src/ticks.js";
|
|
45
|
+
import max from "../../d3-array/src/max.js";
|
|
46
|
+
import min from "../../d3-array/src/min.js";
|
|
47
|
+
import range from "../../d3-array/src/range.js";
|
|
48
|
+
import { axisBottom, axisTop } from "../../d3-axis/src/axis.js";
|
|
46
49
|
import "../../d3-brush/src/index.js";
|
|
47
50
|
import { Path, path } from "../../d3-path/src/path.js";
|
|
48
51
|
import formatSpecifier, { FormatSpecifier } from "../../d3-format/src/formatSpecifier.js";
|
|
@@ -93,6 +96,3 @@ import linearClosed_default from "../../d3-shape/src/curve/linearClosed.js";
|
|
|
93
96
|
import { monotoneX, monotoneY } from "../../d3-shape/src/curve/monotone.js";
|
|
94
97
|
import natural_default from "../../d3-shape/src/curve/natural.js";
|
|
95
98
|
import step_default, { stepAfter, stepBefore } from "../../d3-shape/src/curve/step.js";
|
|
96
|
-
import transform, { Transform, identity } from "../../d3-zoom/src/transform.js";
|
|
97
|
-
import zoom_default$1 from "../../d3-zoom/src/zoom.js";
|
|
98
|
-
import "../../d3-zoom/src/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import bisect_default from "../../d3-array/src/bisect.js";
|
|
2
1
|
import number_default from "../../d3-interpolate/src/number.js";
|
|
3
2
|
import value_default from "../../d3-interpolate/src/value.js";
|
|
4
3
|
import round_default from "../../d3-interpolate/src/round.js";
|
|
4
|
+
import bisect_default from "../../d3-array/src/bisect.js";
|
|
5
5
|
import constants from "./constant.js";
|
|
6
6
|
import number from "./number.js";
|
|
7
7
|
var unit = [0, 1];
|
|
@@ -25,30 +25,30 @@ function bimap(e, i, a) {
|
|
|
25
25
|
return c(o(e));
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
function polymap(i, a
|
|
29
|
-
var s = Math.min(
|
|
30
|
-
for (
|
|
31
|
-
return function(
|
|
32
|
-
var
|
|
33
|
-
return l[
|
|
28
|
+
function polymap(e, i, a) {
|
|
29
|
+
var s = Math.min(e.length, i.length) - 1, c = Array(s), l = Array(s), u = -1;
|
|
30
|
+
for (e[s] < e[0] && (e = e.slice().reverse(), i = i.slice().reverse()); ++u < s;) c[u] = normalize(e[u], e[u + 1]), l[u] = a(i[u], i[u + 1]);
|
|
31
|
+
return function(i) {
|
|
32
|
+
var a = bisect_default(e, i, 1, s) - 1;
|
|
33
|
+
return l[a](c[a](i));
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
function copy(e, i) {
|
|
37
37
|
return i.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());
|
|
38
38
|
}
|
|
39
39
|
function transformer() {
|
|
40
|
-
var
|
|
40
|
+
var o = unit, s = unit, d = value_default, f, p, m, h = identity, g, _, v;
|
|
41
41
|
function y() {
|
|
42
|
-
var
|
|
43
|
-
return h !== identity && (h = clamper(
|
|
42
|
+
var e = Math.min(o.length, s.length);
|
|
43
|
+
return h !== identity && (h = clamper(o[0], o[e - 1])), g = e > 2 ? polymap : bimap, _ = v = null, b;
|
|
44
44
|
}
|
|
45
|
-
function b(
|
|
46
|
-
return
|
|
45
|
+
function b(e) {
|
|
46
|
+
return e == null || isNaN(e = +e) ? m : (_ ||= g(o.map(f), s, d))(f(h(e)));
|
|
47
47
|
}
|
|
48
|
-
return b.invert = function(
|
|
49
|
-
return h(p((v ||= g(s,
|
|
50
|
-
}, b.domain = function(
|
|
51
|
-
return arguments.length ? (
|
|
48
|
+
return b.invert = function(i) {
|
|
49
|
+
return h(p((v ||= g(s, o.map(f), number_default))(i)));
|
|
50
|
+
}, b.domain = function(e) {
|
|
51
|
+
return arguments.length ? (o = Array.from(e, number), y()) : o.slice();
|
|
52
52
|
}, b.range = function(e) {
|
|
53
53
|
return arguments.length ? (s = Array.from(e), y()) : s.slice();
|
|
54
54
|
}, b.rangeRound = function(e) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __toESM } from "../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
+
import select_default from "../../../../d3-selection/src/select.js";
|
|
2
3
|
import { __name, log } from "./chunk-AGHRB4JF.js";
|
|
3
4
|
import { clear, defaultConfig_default, getAccDescription, getAccTitle, getConfig, getConfig2, getDiagramTitle, sanitizeText, setAccDescription, setAccTitle, setDiagramTitle, setupGraphViewbox } from "./chunk-CSCIHK7Q.js";
|
|
4
|
-
import select_default from "../../../../d3-selection/src/select.js";
|
|
5
5
|
import "../../../../d3/src/index.js";
|
|
6
6
|
import { selectSvgElement } from "./chunk-WU5MYG2G.js";
|
|
7
7
|
import { cleanAndMerge, getEdgeId } from "./chunk-5ZQYHXKU.js";
|
|
@@ -158,7 +158,7 @@ var import_cytoscape_fcose = /* @__PURE__ */ __toESM(require_cytoscape_fcose(),
|
|
|
158
158
|
}
|
|
159
159
|
getDataStructures() {
|
|
160
160
|
if (this.dataStructures === void 0) {
|
|
161
|
-
let e = {},
|
|
161
|
+
let e = {}, O = Object.entries(this.nodes).reduce((O, [k, A]) => (O[k] = A.edges.reduce((O, A) => {
|
|
162
162
|
let j = this.getNode(A.lhsId)?.in, M = this.getNode(A.rhsId)?.in;
|
|
163
163
|
if (j && M && j !== M) {
|
|
164
164
|
let O = getArchitectureDirectionAlignment(A.lhsDir, A.rhsDir);
|
|
@@ -172,26 +172,26 @@ var import_cytoscape_fcose = /* @__PURE__ */ __toESM(require_cytoscape_fcose(),
|
|
|
172
172
|
e && (O[e] = A.lhsId);
|
|
173
173
|
}
|
|
174
174
|
return O;
|
|
175
|
-
}, {}), O), {}), A = Object.keys(
|
|
175
|
+
}, {}), O), {}), A = Object.keys(O)[0], j = { [A]: 1 }, M = Object.keys(O).reduce((e, O) => O === A ? e : {
|
|
176
176
|
...e,
|
|
177
177
|
[O]: 1
|
|
178
178
|
}, {}), N = /* @__PURE__ */ __name((e) => {
|
|
179
|
-
let
|
|
179
|
+
let k = { [e]: [0, 0] }, A = [e];
|
|
180
180
|
for (; A.length > 0;) {
|
|
181
181
|
let e = A.shift();
|
|
182
182
|
if (e) {
|
|
183
183
|
j[e] = 1, delete M[e];
|
|
184
|
-
let N =
|
|
185
|
-
Object.entries(N).forEach(([e,
|
|
186
|
-
j[
|
|
184
|
+
let N = O[e], [P, F] = k[e];
|
|
185
|
+
Object.entries(N).forEach(([e, O]) => {
|
|
186
|
+
j[O] || (k[O] = shiftPositionByArchitectureDirectionPair([P, F], e), A.push(O));
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
return
|
|
190
|
+
return k;
|
|
191
191
|
}, "BFS"), P = [N(A)];
|
|
192
192
|
for (; Object.keys(M).length > 0;) P.push(N(Object.keys(M)[0]));
|
|
193
193
|
this.dataStructures = {
|
|
194
|
-
adjList:
|
|
194
|
+
adjList: O,
|
|
195
195
|
spatialMaps: P,
|
|
196
196
|
groupAlignments: e
|
|
197
197
|
};
|
|
@@ -226,9 +226,9 @@ var import_cytoscape_fcose = /* @__PURE__ */ __toESM(require_cytoscape_fcose(),
|
|
|
226
226
|
parse: /* @__PURE__ */ __name(async (e) => {
|
|
227
227
|
let O = await parse("architecture", e);
|
|
228
228
|
log.debug(O);
|
|
229
|
-
let
|
|
230
|
-
if (!(
|
|
231
|
-
populateDb(O,
|
|
229
|
+
let k = parser.parser?.yy;
|
|
230
|
+
if (!(k instanceof ArchitectureDB)) throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
|
|
231
|
+
populateDb(O, k);
|
|
232
232
|
}, "parse")
|
|
233
233
|
}, architectureStyles_default = /* @__PURE__ */ __name((e) => `
|
|
234
234
|
.edge {
|
|
@@ -275,17 +275,17 @@ var import_cytoscape_fcose = /* @__PURE__ */ __toESM(require_cytoscape_fcose(),
|
|
|
275
275
|
blank: { body: wrapIcon("") }
|
|
276
276
|
}
|
|
277
277
|
}, drawEdges = /* @__PURE__ */ __name(async function(e, O, k, A) {
|
|
278
|
-
let j = k.getConfigField("padding"), M = k.getConfigField("iconSize"), N = M / 2, P = M / 6,
|
|
278
|
+
let j = k.getConfigField("padding"), M = k.getConfigField("iconSize"), N = M / 2, P = M / 6, F = P / 2;
|
|
279
279
|
await Promise.all(O.edges().map(async (O) => {
|
|
280
280
|
let { source: M, sourceDir: L, sourceArrow: R, sourceGroup: z, target: B, targetDir: V, targetArrow: H, targetGroup: U, label: W } = edgeData(O), { x: q, y: J } = O[0].sourceEndpoint(), { x: Y, y: X } = O[0].midpoint(), { x: Z, y: Q } = O[0].targetEndpoint(), $ = j + 4;
|
|
281
281
|
if (z && (isArchitectureDirectionX(L) ? q += L === "L" ? -$ : $ : J += L === "T" ? -$ : $ + 18), U && (isArchitectureDirectionX(V) ? Z += V === "L" ? -$ : $ : Q += V === "T" ? -$ : $ + 18), !z && k.getNode(M)?.type === "junction" && (isArchitectureDirectionX(L) ? q += L === "L" ? N : -N : J += L === "T" ? N : -N), !U && k.getNode(B)?.type === "junction" && (isArchitectureDirectionX(V) ? Z += V === "L" ? N : -N : Q += V === "T" ? N : -N), O[0]._private.rscratch) {
|
|
282
282
|
let O = e.insert("g");
|
|
283
283
|
if (O.insert("path").attr("d", `M ${q},${J} L ${Y},${X} L${Z},${Q} `).attr("class", "edge").attr("id", `${A}-${getEdgeId(M, B, { prefix: "L" })}`), R) {
|
|
284
|
-
let e = isArchitectureDirectionX(L) ? ArchitectureDirectionArrowShift[L](q, P) : q -
|
|
284
|
+
let e = isArchitectureDirectionX(L) ? ArchitectureDirectionArrowShift[L](q, P) : q - F, k = isArchitectureDirectionY(L) ? ArchitectureDirectionArrowShift[L](J, P) : J - F;
|
|
285
285
|
O.insert("polygon").attr("points", ArchitectureDirectionArrow[L](P)).attr("transform", `translate(${e},${k})`).attr("class", "arrow");
|
|
286
286
|
}
|
|
287
287
|
if (H) {
|
|
288
|
-
let e = isArchitectureDirectionX(V) ? ArchitectureDirectionArrowShift[V](Z, P) : Z -
|
|
288
|
+
let e = isArchitectureDirectionX(V) ? ArchitectureDirectionArrowShift[V](Z, P) : Z - F, k = isArchitectureDirectionY(V) ? ArchitectureDirectionArrowShift[V](Q, P) : Q - F;
|
|
289
289
|
O.insert("polygon").attr("points", ArchitectureDirectionArrow[V](P)).attr("transform", `translate(${e},${k})`).attr("class", "arrow");
|
|
290
290
|
}
|
|
291
291
|
if (W) {
|
|
@@ -319,8 +319,8 @@ var import_cytoscape_fcose = /* @__PURE__ */ __toESM(require_cytoscape_fcose(),
|
|
|
319
319
|
await Promise.all(O.nodes().map(async (O) => {
|
|
320
320
|
let P = nodeData(O);
|
|
321
321
|
if (P.type === "group") {
|
|
322
|
-
let { h:
|
|
323
|
-
B.attr("id", `${A}-group-${P.id}`).attr("x", R + N).attr("y", z + N).attr("width", L).attr("height",
|
|
322
|
+
let { h: F, w: L, x1: R, y1: z } = O.boundingBox(), B = e.append("rect");
|
|
323
|
+
B.attr("id", `${A}-group-${P.id}`).attr("x", R + N).attr("y", z + N).attr("width", L).attr("height", F).attr("class", "node-bkg");
|
|
324
324
|
let V = e.append("g"), H = R, U = z;
|
|
325
325
|
if (P.icon) {
|
|
326
326
|
let e = V.append("g");
|
|
@@ -466,7 +466,7 @@ function addEdges(e, O) {
|
|
|
466
466
|
});
|
|
467
467
|
}
|
|
468
468
|
__name(addEdges, "addEdges");
|
|
469
|
-
function getAlignments(e,
|
|
469
|
+
function getAlignments(e, O, A) {
|
|
470
470
|
let j = /* @__PURE__ */ __name((e, O) => Object.entries(e).reduce((e, [k, j]) => {
|
|
471
471
|
let M = 0, N = Object.entries(j);
|
|
472
472
|
if (N.length === 1) return e[k] = N[0][1], e;
|
|
@@ -490,7 +490,7 @@ function getAlignments(e, k, A) {
|
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
492
|
return e;
|
|
493
|
-
}, {}), "flattenAlignments"), [M, N] =
|
|
493
|
+
}, {}), "flattenAlignments"), [M, N] = O.map((O) => {
|
|
494
494
|
let k = {}, A = {};
|
|
495
495
|
return Object.entries(O).forEach(([O, [j, M]]) => {
|
|
496
496
|
let N = e.getNode(O)?.in ?? "default";
|
|
@@ -506,10 +506,10 @@ function getAlignments(e, k, A) {
|
|
|
506
506
|
};
|
|
507
507
|
}
|
|
508
508
|
__name(getAlignments, "getAlignments");
|
|
509
|
-
function getRelativeConstraints(e,
|
|
509
|
+
function getRelativeConstraints(e, O) {
|
|
510
510
|
let A = [], j = /* @__PURE__ */ __name((e) => `${e[0]},${e[1]}`, "posToStr"), M = /* @__PURE__ */ __name((e) => e.split(",").map((e) => parseInt(e)), "strToPos");
|
|
511
511
|
return e.forEach((e) => {
|
|
512
|
-
let
|
|
512
|
+
let k = Object.fromEntries(Object.entries(e).map(([e, O]) => [j(O), e])), N = [j([0, 0])], P = {}, F = {
|
|
513
513
|
L: [-1, 0],
|
|
514
514
|
R: [1, 0],
|
|
515
515
|
T: [0, 1],
|
|
@@ -519,15 +519,15 @@ function getRelativeConstraints(e, k) {
|
|
|
519
519
|
let e = N.shift();
|
|
520
520
|
if (e) {
|
|
521
521
|
P[e] = 1;
|
|
522
|
-
let I =
|
|
522
|
+
let I = k[e];
|
|
523
523
|
if (I) {
|
|
524
524
|
let L = M(e);
|
|
525
525
|
Object.entries(F).forEach(([e, M]) => {
|
|
526
|
-
let F = j([L[0] + M[0], L[1] + M[1]]), R =
|
|
526
|
+
let F = j([L[0] + M[0], L[1] + M[1]]), R = k[F];
|
|
527
527
|
R && !P[F] && (N.push(F), A.push({
|
|
528
528
|
[ArchitectureDirectionName[e]]: R,
|
|
529
529
|
[ArchitectureDirectionName[getOppositeArchitectureDirection(e)]]: I,
|
|
530
|
-
gap: 1.5 *
|
|
530
|
+
gap: 1.5 * O.getConfigField("iconSize")
|
|
531
531
|
}));
|
|
532
532
|
});
|
|
533
533
|
}
|
|
@@ -536,9 +536,9 @@ function getRelativeConstraints(e, k) {
|
|
|
536
536
|
}), A;
|
|
537
537
|
}
|
|
538
538
|
__name(getRelativeConstraints, "getRelativeConstraints");
|
|
539
|
-
function layoutArchitecture(e,
|
|
540
|
-
return new Promise((
|
|
541
|
-
let
|
|
539
|
+
function layoutArchitecture(e, j, M, N, P, { spatialMaps: F, groupAlignments: I }) {
|
|
540
|
+
return new Promise((L) => {
|
|
541
|
+
let R = select_default("body").append("div").attr("id", "cy").attr("style", "display:none"), z = cytoscape({
|
|
542
542
|
container: document.getElementById("cy"),
|
|
543
543
|
style: [
|
|
544
544
|
{
|
|
@@ -573,7 +573,7 @@ function layoutArchitecture(e, A, j, M, N, { spatialMaps: P, groupAlignments: F
|
|
|
573
573
|
style: {
|
|
574
574
|
"text-valign": "bottom",
|
|
575
575
|
"text-halign": "center",
|
|
576
|
-
"font-size": `${
|
|
576
|
+
"font-size": `${P.getConfigField("fontSize")}px`
|
|
577
577
|
}
|
|
578
578
|
},
|
|
579
579
|
{
|
|
@@ -593,7 +593,7 @@ function layoutArchitecture(e, A, j, M, N, { spatialMaps: P, groupAlignments: F
|
|
|
593
593
|
},
|
|
594
594
|
{
|
|
595
595
|
selector: ".node-group",
|
|
596
|
-
style: { padding: `${
|
|
596
|
+
style: { padding: `${P.getConfigField("padding")}px` }
|
|
597
597
|
}
|
|
598
598
|
],
|
|
599
599
|
layout: {
|
|
@@ -606,13 +606,13 @@ function layoutArchitecture(e, A, j, M, N, { spatialMaps: P, groupAlignments: F
|
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
608
|
});
|
|
609
|
-
|
|
610
|
-
let
|
|
609
|
+
R.remove(), addGroups(M, z), addServices(e, z, P), addJunctions(j, z, P), addEdges(N, z);
|
|
610
|
+
let B = getAlignments(P, F, I), V = getRelativeConstraints(F, P), H = P.getConfigField("iconSize"), U = P.getConfigField("idealEdgeLengthMultiplier") * H, W = .5 * H, G = P.getConfigField("edgeElasticity"), K = z.layout({
|
|
611
611
|
name: "fcose",
|
|
612
612
|
quality: "proof",
|
|
613
|
-
randomize:
|
|
614
|
-
nodeSeparation:
|
|
615
|
-
numIter:
|
|
613
|
+
randomize: P.getConfigField("randomize"),
|
|
614
|
+
nodeSeparation: P.getConfigField("nodeSeparation"),
|
|
615
|
+
numIter: P.getConfigField("numIter"),
|
|
616
616
|
styleEnabled: !1,
|
|
617
617
|
animate: !1,
|
|
618
618
|
nodeDimensionsIncludeLabels: !1,
|
|
@@ -624,8 +624,8 @@ function layoutArchitecture(e, A, j, M, N, { spatialMaps: P, groupAlignments: F
|
|
|
624
624
|
let [O, k] = e.connectedNodes(), { parent: A } = nodeData(O), { parent: j } = nodeData(k);
|
|
625
625
|
return A === j ? G : .001;
|
|
626
626
|
},
|
|
627
|
-
alignmentConstraint:
|
|
628
|
-
relativePlacementConstraint:
|
|
627
|
+
alignmentConstraint: B,
|
|
628
|
+
relativePlacementConstraint: V
|
|
629
629
|
});
|
|
630
630
|
K.one("layoutstop", () => {
|
|
631
631
|
function e(e, O, k, A) {
|
|
@@ -656,17 +656,17 @@ function layoutArchitecture(e, A, j, M, N, { spatialMaps: P, groupAlignments: F
|
|
|
656
656
|
weights: j
|
|
657
657
|
};
|
|
658
658
|
}
|
|
659
|
-
__name(e, "getSegmentWeights"),
|
|
660
|
-
for (let O of Object.values(
|
|
659
|
+
__name(e, "getSegmentWeights"), z.startBatch();
|
|
660
|
+
for (let O of Object.values(z.edges())) if (O.data?.()) {
|
|
661
661
|
let { x: k, y: A } = O.source().position(), { x: j, y: M } = O.target().position();
|
|
662
662
|
if (k !== j && A !== M) {
|
|
663
663
|
let k = O.sourceEndpoint(), A = O.targetEndpoint(), { sourceDir: j } = edgeData(O), [M, N] = isArchitectureDirectionY(j) ? [k.x, A.y] : [A.x, k.y], { weights: P, distances: F } = e(k, A, M, N);
|
|
664
664
|
O.style("segment-distances", F), O.style("segment-weights", P);
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
|
-
|
|
668
|
-
}), K.run(),
|
|
669
|
-
log.info("Ready", e),
|
|
667
|
+
z.endBatch(), K.run();
|
|
668
|
+
}), K.run(), z.ready((e) => {
|
|
669
|
+
log.info("Ready", e), L(z);
|
|
670
670
|
});
|
|
671
671
|
});
|
|
672
672
|
}
|
|
@@ -685,8 +685,8 @@ var diagram = {
|
|
|
685
685
|
z.attr("class", "architecture-services");
|
|
686
686
|
let B = L.append("g");
|
|
687
687
|
B.attr("class", "architecture-groups"), await drawServices(j, z, M, O), drawJunctions(j, z, N, O);
|
|
688
|
-
let
|
|
689
|
-
await drawEdges(R,
|
|
688
|
+
let V = await layoutArchitecture(M, N, P, F, j, I);
|
|
689
|
+
await drawEdges(R, V, j, O), await drawGroups(B, V, j, O), positionNodes(j, V), setupGraphViewbox(void 0, L, j.getConfigField("padding"), j.getConfigField("useMaxWidth"));
|
|
690
690
|
}, "draw") },
|
|
691
691
|
styles: architectureStyles_default
|
|
692
692
|
};
|