@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
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import select_default from "../../../../d3-selection/src/select.js";
|
|
1
2
|
import { __name, log } from "./chunk-AGHRB4JF.js";
|
|
2
3
|
import { assignWithDepth_default, common_default, configureSvgSize, getAccDescription, getAccTitle, getConfig2, sanitizeText, setAccDescription, setAccTitle } from "./chunk-CSCIHK7Q.js";
|
|
3
|
-
import select_default from "../../../../d3-selection/src/select.js";
|
|
4
4
|
import "../../../../d3/src/index.js";
|
|
5
5
|
import { require_dist } from "../../../../@braintree/sanitize-url/dist/index.js";
|
|
6
6
|
import { calculateTextHeight, calculateTextWidth, wrapLabel } from "./chunk-5ZQYHXKU.js";
|
|
7
7
|
import { drawRect, getNoteRect } from "./chunk-ND2GUHAM.js";
|
|
8
8
|
var import_dist = require_dist(), parser = (function() {
|
|
9
|
-
var
|
|
9
|
+
var e = /* @__PURE__ */ __name(function(e, t, n, r) {
|
|
10
10
|
for (n ||= {}, r = e.length; r--; n[e[r]] = t);
|
|
11
11
|
return n;
|
|
12
12
|
}, "o"), n = [1, 24], r = [1, 25], i = [1, 26], a = [1, 27], o = [1, 28], s = [1, 63], l = [1, 64], u = [1, 65], d = [1, 66], f = [1, 67], p = [1, 68], m = [1, 69], h = [1, 29], g = [1, 30], _ = [1, 31], v = [1, 32], y = [1, 33], b = [1, 34], x = [1, 35], S = [1, 36], C = [1, 37], w = [1, 38], T = [1, 39], E = [1, 40], D = [1, 41], O = [1, 42], k = [1, 43], A = [1, 44], j = [1, 45], M = [1, 46], N = [1, 47], P = [1, 48], F = [1, 50], I = [1, 51], L = [1, 52], R = [1, 53], z = [1, 54], B = [1, 55], V = [1, 56], H = [1, 57], U = [1, 58], W = [1, 59], G = [1, 60], K = [14, 42], Fe = [
|
|
@@ -846,7 +846,7 @@ var import_dist = require_dist(), parser = (function() {
|
|
|
846
846
|
74: G
|
|
847
847
|
},
|
|
848
848
|
{ 14: [1, 74] },
|
|
849
|
-
|
|
849
|
+
e(K, [2, 13], {
|
|
850
850
|
43: 23,
|
|
851
851
|
29: 49,
|
|
852
852
|
30: 61,
|
|
@@ -891,14 +891,14 @@ var import_dist = require_dist(), parser = (function() {
|
|
|
891
891
|
73: W,
|
|
892
892
|
74: G
|
|
893
893
|
}),
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
894
|
+
e(K, [2, 14]),
|
|
895
|
+
e(Fe, [2, 16], { 12: [1, 76] }),
|
|
896
|
+
e(K, [2, 36], { 12: [1, 77] }),
|
|
897
|
+
e(q, [2, 19]),
|
|
898
|
+
e(q, [2, 20]),
|
|
899
899
|
{ 25: [1, 78] },
|
|
900
900
|
{ 27: [1, 79] },
|
|
901
|
-
|
|
901
|
+
e(q, [2, 23]),
|
|
902
902
|
{
|
|
903
903
|
35: 80,
|
|
904
904
|
75: 81,
|
|
@@ -1059,7 +1059,7 @@ var import_dist = require_dist(), parser = (function() {
|
|
|
1059
1059
|
79: X,
|
|
1060
1060
|
80: Z
|
|
1061
1061
|
},
|
|
1062
|
-
|
|
1062
|
+
e(Q, [2, 59]),
|
|
1063
1063
|
{
|
|
1064
1064
|
35: 105,
|
|
1065
1065
|
75: 81,
|
|
@@ -1258,8 +1258,8 @@ var import_dist = require_dist(), parser = (function() {
|
|
|
1258
1258
|
{ 14: [1, 128] },
|
|
1259
1259
|
{ 14: [1, 129] },
|
|
1260
1260
|
{ 1: [2, 8] },
|
|
1261
|
-
|
|
1262
|
-
|
|
1261
|
+
e(K, [2, 15]),
|
|
1262
|
+
e(Fe, [2, 17], {
|
|
1263
1263
|
21: 22,
|
|
1264
1264
|
19: 130,
|
|
1265
1265
|
22: n,
|
|
@@ -1268,7 +1268,7 @@ var import_dist = require_dist(), parser = (function() {
|
|
|
1268
1268
|
26: a,
|
|
1269
1269
|
28: o
|
|
1270
1270
|
}),
|
|
1271
|
-
|
|
1271
|
+
e(K, [2, 37], {
|
|
1272
1272
|
19: 20,
|
|
1273
1273
|
20: 21,
|
|
1274
1274
|
21: 22,
|
|
@@ -1321,10 +1321,10 @@ var import_dist = require_dist(), parser = (function() {
|
|
|
1321
1321
|
73: W,
|
|
1322
1322
|
74: G
|
|
1323
1323
|
}),
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1324
|
+
e(q, [2, 21]),
|
|
1325
|
+
e(q, [2, 22]),
|
|
1326
|
+
e(Q, [2, 39]),
|
|
1327
|
+
e(Ie, [2, 71], {
|
|
1328
1328
|
75: 81,
|
|
1329
1329
|
35: 132,
|
|
1330
1330
|
76: J,
|
|
@@ -1332,66 +1332,66 @@ var import_dist = require_dist(), parser = (function() {
|
|
|
1332
1332
|
79: X,
|
|
1333
1333
|
80: Z
|
|
1334
1334
|
}),
|
|
1335
|
-
|
|
1335
|
+
e(Le, [2, 73]),
|
|
1336
1336
|
{ 78: [1, 133] },
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1337
|
+
e(Le, [2, 75]),
|
|
1338
|
+
e(Le, [2, 76]),
|
|
1339
|
+
e(Q, [2, 40]),
|
|
1340
|
+
e(Q, [2, 41]),
|
|
1341
|
+
e(Q, [2, 42]),
|
|
1342
|
+
e(Q, [2, 43]),
|
|
1343
|
+
e(Q, [2, 44]),
|
|
1344
|
+
e(Q, [2, 45]),
|
|
1345
|
+
e(Q, [2, 46]),
|
|
1346
|
+
e(Q, [2, 47]),
|
|
1347
|
+
e(Q, [2, 48]),
|
|
1348
|
+
e(Q, [2, 49]),
|
|
1349
|
+
e(Q, [2, 50]),
|
|
1350
|
+
e(Q, [2, 51]),
|
|
1351
|
+
e(Q, [2, 52]),
|
|
1352
|
+
e(Q, [2, 53]),
|
|
1353
|
+
e(Q, [2, 54]),
|
|
1354
|
+
e(Q, [2, 55]),
|
|
1355
|
+
e(Q, [2, 56]),
|
|
1356
|
+
e(Q, [2, 57]),
|
|
1357
|
+
e(Q, [2, 58]),
|
|
1358
|
+
e(Q, [2, 60]),
|
|
1359
|
+
e(Q, [2, 61]),
|
|
1360
|
+
e(Q, [2, 62]),
|
|
1361
|
+
e(Q, [2, 63]),
|
|
1362
|
+
e(Q, [2, 64]),
|
|
1363
|
+
e(Q, [2, 65]),
|
|
1364
|
+
e(Q, [2, 66]),
|
|
1365
|
+
e(Q, [2, 67]),
|
|
1366
|
+
e(Q, [2, 68]),
|
|
1367
|
+
e(Q, [2, 69]),
|
|
1368
|
+
e(Q, [2, 70]),
|
|
1369
1369
|
{
|
|
1370
1370
|
31: 134,
|
|
1371
1371
|
42: [1, 135]
|
|
1372
1372
|
},
|
|
1373
1373
|
{ 12: [1, 136] },
|
|
1374
1374
|
{ 33: [1, 137] },
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1375
|
+
e($, [2, 28]),
|
|
1376
|
+
e($, [2, 29]),
|
|
1377
|
+
e($, [2, 30]),
|
|
1378
|
+
e($, [2, 31]),
|
|
1379
|
+
e($, [2, 32]),
|
|
1380
|
+
e($, [2, 33]),
|
|
1381
|
+
e($, [2, 34]),
|
|
1382
1382
|
{ 1: [2, 9] },
|
|
1383
1383
|
{ 1: [2, 10] },
|
|
1384
1384
|
{ 1: [2, 11] },
|
|
1385
1385
|
{ 1: [2, 12] },
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1386
|
+
e(Fe, [2, 18]),
|
|
1387
|
+
e(K, [2, 38]),
|
|
1388
|
+
e(Ie, [2, 72]),
|
|
1389
|
+
e(Le, [2, 74]),
|
|
1390
|
+
e(Q, [2, 24]),
|
|
1391
|
+
e(Q, [2, 35]),
|
|
1392
|
+
e(Re, [2, 25]),
|
|
1393
|
+
e(Re, [2, 26], { 12: [1, 138] }),
|
|
1394
|
+
e(Re, [2, 27])
|
|
1395
1395
|
],
|
|
1396
1396
|
defaultActions: {
|
|
1397
1397
|
2: [2, 1],
|
|
@@ -1414,10 +1414,10 @@ var import_dist = require_dist(), parser = (function() {
|
|
|
1414
1414
|
throw n.hash = t, n;
|
|
1415
1415
|
}
|
|
1416
1416
|
}, "parseError"),
|
|
1417
|
-
parse: /* @__PURE__ */ __name(function(
|
|
1417
|
+
parse: /* @__PURE__ */ __name(function(e) {
|
|
1418
1418
|
var n = this, r = [0], i = [], a = [null], o = [], s = this.table, l = "", u = 0, d = 0, f = 0, p = 2, m = 1, h = o.slice.call(arguments, 1), g = Object.create(this.lexer), _ = { yy: {} };
|
|
1419
1419
|
for (var v in this.yy) Object.prototype.hasOwnProperty.call(this.yy, v) && (_.yy[v] = this.yy[v]);
|
|
1420
|
-
g.setInput(
|
|
1420
|
+
g.setInput(e, _.yy), _.yy.lexer = g, _.yy.parser = this, g.yylloc === void 0 && (g.yylloc = {});
|
|
1421
1421
|
var y = g.yylloc;
|
|
1422
1422
|
o.push(y);
|
|
1423
1423
|
var b = g.options && g.options.ranges;
|
|
@@ -2734,28 +2734,28 @@ var c4Diagram_default = parser, c4ShapeArray = [], boundaryParseStack = [""], cu
|
|
|
2734
2734
|
fontSize: e[t + "FontSize"],
|
|
2735
2735
|
fontWeight: e[t + "FontWeight"]
|
|
2736
2736
|
}), "getC4ShapeFont"), _drawTextCandidateFunc = /* @__PURE__ */ (function() {
|
|
2737
|
-
function
|
|
2737
|
+
function e(e, t, n, r, i, o, s) {
|
|
2738
2738
|
a(t.append("text").attr("x", n + i / 2).attr("y", r + o / 2 + 5).style("text-anchor", "middle").text(e), s);
|
|
2739
2739
|
}
|
|
2740
|
-
__name(
|
|
2741
|
-
function n(e, t, n,
|
|
2740
|
+
__name(e, "byText");
|
|
2741
|
+
function n(e, t, n, r, o, s, l, u) {
|
|
2742
2742
|
let { fontSize: d, fontFamily: f, fontWeight: p } = u, m = e.split(common_default.lineBreakRegex);
|
|
2743
2743
|
for (let e = 0; e < m.length; e++) {
|
|
2744
|
-
let
|
|
2745
|
-
s.append("tspan").attr("dy",
|
|
2744
|
+
let i = e * d - d * (m.length - 1) / 2, s = t.append("text").attr("x", n + o / 2).attr("y", r).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", d).style("font-weight", p).style("font-family", f);
|
|
2745
|
+
s.append("tspan").attr("dy", i).text(m[e]).attr("alignment-baseline", "mathematical"), a(s, l);
|
|
2746
2746
|
}
|
|
2747
2747
|
}
|
|
2748
2748
|
__name(n, "byTspan");
|
|
2749
|
-
function
|
|
2749
|
+
function r(e, t, r, i, o, s, l, u) {
|
|
2750
2750
|
let d = t.append("switch"), f = d.append("foreignObject").attr("x", r).attr("y", i).attr("width", o).attr("height", s).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
2751
2751
|
f.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(e), n(e, d, r, i, o, s, l, u), a(f, l);
|
|
2752
2752
|
}
|
|
2753
|
-
__name(
|
|
2753
|
+
__name(r, "byFo");
|
|
2754
2754
|
function a(e, t) {
|
|
2755
2755
|
for (let n in t) t.hasOwnProperty(n) && e.attr(n, t[n]);
|
|
2756
2756
|
}
|
|
2757
|
-
return __name(a, "_setTextAttrs"), function(
|
|
2758
|
-
return
|
|
2757
|
+
return __name(a, "_setTextAttrs"), function(t) {
|
|
2758
|
+
return t.textPlacement === "fo" ? r : t.textPlacement === "old" ? e : n;
|
|
2759
2759
|
};
|
|
2760
2760
|
})(), svgDraw_default = {
|
|
2761
2761
|
drawRect: drawRect2,
|
|
@@ -2821,14 +2821,14 @@ var conf = {}, Bounds = class {
|
|
|
2821
2821
|
fontSize: e.messageFontSize,
|
|
2822
2822
|
fontWeight: e.messageFontWeight
|
|
2823
2823
|
}), "messageFont");
|
|
2824
|
-
function calcC4ShapeTextWH(e, t, n,
|
|
2825
|
-
if (!t[e].width) if (n) t[e].text = wrapLabel(t[e].text, a,
|
|
2824
|
+
function calcC4ShapeTextWH(e, t, n, r, a) {
|
|
2825
|
+
if (!t[e].width) if (n) t[e].text = wrapLabel(t[e].text, a, r), t[e].textLines = t[e].text.split(common_default.lineBreakRegex).length, t[e].width = a, t[e].height = calculateTextHeight(t[e].text, r);
|
|
2826
2826
|
else {
|
|
2827
2827
|
let n = t[e].text.split(common_default.lineBreakRegex);
|
|
2828
2828
|
t[e].textLines = n.length;
|
|
2829
2829
|
let a = 0;
|
|
2830
2830
|
t[e].height = 0, t[e].width = 0;
|
|
2831
|
-
for (let
|
|
2831
|
+
for (let i of n) t[e].width = Math.max(calculateTextWidth(i, r), t[e].width), a = calculateTextHeight(i, r), t[e].height = t[e].height + a;
|
|
2832
2832
|
}
|
|
2833
2833
|
}
|
|
2834
2834
|
__name(calcC4ShapeTextWH, "calcC4ShapeTextWH");
|
|
@@ -2924,18 +2924,18 @@ var c4Renderer_default = {
|
|
|
2924
2924
|
drawPersonOrSystemArray: drawC4ShapeArray,
|
|
2925
2925
|
drawBoundary: drawBoundary2,
|
|
2926
2926
|
setConf,
|
|
2927
|
-
draw: /* @__PURE__ */ __name(function(
|
|
2927
|
+
draw: /* @__PURE__ */ __name(function(t, r, i, o) {
|
|
2928
2928
|
conf = getConfig2().c4;
|
|
2929
|
-
let
|
|
2930
|
-
|
|
2931
|
-
let
|
|
2932
|
-
|
|
2933
|
-
let p =
|
|
2934
|
-
svgDraw_default.insertComputerIcon(p,
|
|
2935
|
-
let m = new Bounds(
|
|
2929
|
+
let s = getConfig2().securityLevel, u;
|
|
2930
|
+
s === "sandbox" && (u = select_default("#i" + r));
|
|
2931
|
+
let d = select_default(s === "sandbox" ? u.nodes()[0].contentDocument.body : "body"), f = o.db;
|
|
2932
|
+
o.db.setWrap(conf.wrap), c4ShapeInRow2 = f.getC4ShapeInRow(), c4BoundaryInRow2 = f.getC4BoundaryInRow(), log.debug(`C:${JSON.stringify(conf, null, 2)}`);
|
|
2933
|
+
let p = s === "sandbox" ? d.select(`[id="${r}"]`) : select_default(`[id="${r}"]`);
|
|
2934
|
+
svgDraw_default.insertComputerIcon(p, r), svgDraw_default.insertDatabaseIcon(p, r), svgDraw_default.insertClockIcon(p, r);
|
|
2935
|
+
let m = new Bounds(o);
|
|
2936
2936
|
m.setData(conf.diagramMarginX, conf.diagramMarginX, conf.diagramMarginY, conf.diagramMarginY), m.data.widthLimit = screen.availWidth, globalBoundaryMaxX = conf.diagramMarginX, globalBoundaryMaxY = conf.diagramMarginY;
|
|
2937
|
-
let h =
|
|
2938
|
-
drawInsideBoundary(p, "", m,
|
|
2937
|
+
let h = o.db.getTitle();
|
|
2938
|
+
drawInsideBoundary(p, "", m, o.db.getBoundaries(""), o), svgDraw_default.insertArrowHead(p, r), svgDraw_default.insertArrowEnd(p, r), svgDraw_default.insertArrowCrossHead(p, r), svgDraw_default.insertArrowFilledHead(p, r), drawRels2(p, o.db.getRels(), o.db.getC4Shape, o, r), m.data.stopx = globalBoundaryMaxX, m.data.stopy = globalBoundaryMaxY;
|
|
2939
2939
|
let g = m.data, _ = g.stopy - g.starty + 2 * conf.diagramMarginY, v = g.stopx - g.startx + 2 * conf.diagramMarginX;
|
|
2940
2940
|
h && p.append("text").text(h).attr("x", (g.stopx - g.startx) / 2 - 4 * conf.diagramMarginX).attr("y", g.starty + conf.diagramMarginY), configureSvgSize(p, _, v, conf.useMaxWidth);
|
|
2941
2941
|
let y = h ? 60 : 0;
|