@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
|
@@ -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
|
};
|