@loopstack/loopstack-studio 0.29.5 → 0.31.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/layout/StudioSidebar.js +116 -131
- package/dist/components/lists/ListView.js +46 -46
- 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/dashboard/AppLauncher.js +84 -0
- 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 +73 -73
- 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 +74 -109
- 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 +166 -136
- 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 +119 -18
- package/dist/index.js +10 -9
- 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/DashboardPage.js +20 -74
- 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/dist/routing/LocalRouter.js +1 -1
- package/package.json +2 -2
- package/dist/features/dashboard/Dashboard.js +0 -125
- package/dist/features/dashboard/RunItem.js +0 -78
- package/dist/features/dashboard/RunList.js +0 -32
- package/dist/hooks/useDashboard.js +0 -16
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';
|
|
@@ -202,7 +203,7 @@ export declare interface Column {
|
|
|
202
203
|
label: string;
|
|
203
204
|
minWidth?: number;
|
|
204
205
|
align?: 'right' | 'left' | 'center';
|
|
205
|
-
format?: (value: unknown) => default_2.ReactNode;
|
|
206
|
+
format?: (value: unknown, row?: unknown) => default_2.ReactNode;
|
|
206
207
|
}
|
|
207
208
|
|
|
208
209
|
export declare const CompletionMessagePaper: default_2.FC<CompletionMessagePaperProps>;
|
|
@@ -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;
|
|
@@ -433,7 +440,7 @@ export declare const CreateWorkspace: ({ types, workspace, onSuccess }: CreateWo
|
|
|
433
440
|
export declare interface CreateWorkspaceProps {
|
|
434
441
|
types: AppConfigInterface[];
|
|
435
442
|
workspace?: WorkspaceItemInterface;
|
|
436
|
-
onSuccess: () => void;
|
|
443
|
+
onSuccess: (workspace?: WorkspaceItemInterface) => void;
|
|
437
444
|
}
|
|
438
445
|
|
|
439
446
|
export declare const CustomItemListView: <T extends Item_2>({ loading, error, items, totalItems, filterConfig, onClick, handleNew, setPage, setRowsPerPage, setSearchTerm, setFilters, searchTerm, filters, page, rowsPerPage, batchActions, batchDelete, enableBatchActions, rowActions, itemRenderer, newButtonLabel, }: ListViewProps_2<T>) => JSX.Element;
|
|
@@ -660,7 +667,7 @@ export declare function DropdownMenuTrigger({ ...props }: React_2.ComponentProps
|
|
|
660
667
|
export declare interface EditWorkspaceProps {
|
|
661
668
|
types: AppConfigInterface[];
|
|
662
669
|
workspace: WorkspaceItemInterface;
|
|
663
|
-
onSuccess: () => void;
|
|
670
|
+
onSuccess: (workspace?: WorkspaceItemInterface) => void;
|
|
664
671
|
}
|
|
665
672
|
|
|
666
673
|
export declare function EmbedWorkbenchPage(): JSX.Element;
|
|
@@ -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";
|
|
@@ -63,15 +64,19 @@ import ErrorSnackbar_default from "./components/feedback/ErrorSnackbar.js";
|
|
|
63
64
|
import ErrorAlert_default from "./components/feedback/ErrorAlert.js";
|
|
64
65
|
import "./components/index.js";
|
|
65
66
|
import DebugPage_default from "./pages/DebugPage.js";
|
|
66
|
-
import DashboardPage from "./pages/DashboardPage.js";
|
|
67
67
|
import { EnvironmentSlotSelector } from "./features/workspaces/components/EnvironmentSlotSelector.js";
|
|
68
68
|
import CreateWorkspace_default from "./features/workspaces/components/CreateWorkspace.js";
|
|
69
|
+
import DashboardPage from "./pages/DashboardPage.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) {
|