@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.
Files changed (122) hide show
  1. package/dist/_virtual/rolldown_runtime.js +3 -1
  2. package/dist/api/config.js +5 -4
  3. package/dist/api/environments.js +5 -1
  4. package/dist/api/processor.js +4 -1
  5. package/dist/app/EnvironmentEmbedRoot.js +22 -30
  6. package/dist/components/ai-elements/code-block.js +4 -4
  7. package/dist/components/dynamic-form/CodeContent.js +1 -1
  8. package/dist/components/dynamic-form/FormBody.js +1 -1
  9. package/dist/components/layout/StudioSidebar.js +116 -131
  10. package/dist/components/lists/ListView.js +46 -46
  11. package/dist/components/motion/FadeIn.js +72 -0
  12. package/dist/components/motion/StreamingText.js +49 -0
  13. package/dist/components/ui/accordion.js +2 -2
  14. package/dist/components/ui-widgets/UiWidget.js +11 -10
  15. package/dist/components/ui-widgets/widgets/AiPromptInput.js +31 -28
  16. package/dist/events/sse-client-events.js +7 -1
  17. package/dist/features/code-explorer/components/FileContentViewer.js +2 -2
  18. package/dist/features/dashboard/AppLauncher.js +84 -0
  19. package/dist/features/debug/components/WorkflowFlowViewer.js +49 -51
  20. package/dist/features/documents/DocumentRenderer.js +18 -17
  21. package/dist/features/documents/components/DocumentItem.js +42 -20
  22. package/dist/features/documents/components/DocumentList.js +34 -36
  23. package/dist/features/documents/components/DocumentMetadataPills.js +102 -49
  24. package/dist/features/documents/document-details/DocumentDetails.js +577 -377
  25. package/dist/features/documents/document-details/PromptDetails.js +118 -130
  26. package/dist/features/documents/document-details/document-debug-utils.js +100 -0
  27. package/dist/features/documents/renderers/ChoicesRenderer.js +41 -38
  28. package/dist/features/documents/renderers/ConfirmPromptRenderer.js +31 -28
  29. package/dist/features/documents/renderers/DocumentFormRenderer.js +62 -70
  30. package/dist/features/documents/renderers/LlmMessage.js +52 -47
  31. package/dist/features/documents/renderers/TextPromptRenderer.js +32 -29
  32. package/dist/features/documents/renderers/useDocumentTransition.js +4 -4
  33. package/dist/features/feature-registry/FeatureRegistryProvider.js +32 -10
  34. package/dist/features/feature-registry/available-features.js +12 -0
  35. package/dist/features/feature-registry/index.js +2 -1
  36. package/dist/features/file-explorer/components/FileExplorerPanel.js +55 -51
  37. package/dist/features/git/components/GitBranchBadge.js +31 -0
  38. package/dist/features/git/components/GitCommitList.js +46 -0
  39. package/dist/features/git/components/GitRemoteStatus.js +84 -0
  40. package/dist/features/git/components/WorkbenchGitPanel.js +81 -0
  41. package/dist/features/git/git-feature.js +12 -0
  42. package/dist/features/git/hooks/useGit.js +78 -0
  43. package/dist/features/git/index.js +1 -0
  44. package/dist/features/oauth/OAuthPromptRenderer.js +137 -142
  45. package/dist/features/runs/Runs.js +73 -73
  46. package/dist/features/secrets/components/WorkbenchSecretsPanel.js +1 -1
  47. package/dist/features/secrets/renderers/SecretInputRenderer.js +30 -29
  48. package/dist/features/workbench/Workbench.js +25 -33
  49. package/dist/features/workbench/WorkflowItem.js +9 -9
  50. package/dist/features/workbench/WorkflowList.js +61 -62
  51. package/dist/features/workbench/components/NewRunDialog.js +237 -209
  52. package/dist/features/workbench/components/RecentRunItem.js +3 -3
  53. package/dist/features/workbench/components/WorkbenchEnvironmentPanel.js +8 -8
  54. package/dist/features/workbench/components/WorkbenchIconSidebar.js +74 -109
  55. package/dist/features/workbench/components/WorkbenchSidebarShell.js +3 -3
  56. package/dist/features/workbench/components/WorkflowForms.js +11 -10
  57. package/dist/features/workbench/components/WorkflowHistoryItem.js +16 -36
  58. package/dist/features/workbench/components/WorkflowHistoryList.js +19 -17
  59. package/dist/features/workbench/components/buttons/WorkflowButtons.js +3 -3
  60. package/dist/features/workbench/hooks/useLlmStreamingDocuments.js +159 -0
  61. package/dist/features/workbench/hooks/useWorkflowData.js +58 -31
  62. package/dist/features/workbench/index.js +2 -2
  63. package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +53 -53
  64. package/dist/features/workspaces/Workspaces.js +166 -136
  65. package/dist/features/workspaces/components/CreateWorkspace.js +115 -107
  66. package/dist/features/workspaces/components/ExecutionTimeline.js +2 -2
  67. package/dist/features/workspaces/components/WorkflowRunForm.js +127 -104
  68. package/dist/features/workspaces/components/WorkspaceHomePage.js +6 -89
  69. package/dist/features/workspaces/components/workflow-form/ArgumentsView.js +1 -1
  70. package/dist/features/workspaces/components/workflow-form/SelectionView.js +15 -15
  71. package/dist/hooks/index.js +3 -2
  72. package/dist/hooks/query-keys.js +43 -30
  73. package/dist/hooks/useConfig.js +28 -22
  74. package/dist/hooks/useEnvironments.js +27 -2
  75. package/dist/hooks/useProcessor.js +14 -1
  76. package/dist/hooks/useWorkflows.js +4 -4
  77. package/dist/index.d.ts +119 -18
  78. package/dist/index.js +10 -9
  79. package/dist/node_modules/d3/src/index.js +13 -13
  80. package/dist/node_modules/d3-scale/src/continuous.js +16 -16
  81. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-3BPJPVTR.js +43 -43
  82. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-GPEHLZMM.js +270 -270
  83. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAUBKEIU.js +90 -90
  84. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-3OPIFGDE.js +458 -458
  85. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.js +3 -3
  86. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5ZQYHXKU.js +37 -37
  87. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-727SXJPM.js +208 -208
  88. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-KSCS5N6A.js +145 -145
  89. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ND2GUHAM.js +7 -7
  90. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-O5CBEL6O.js +41 -41
  91. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-WU5MYG2G.js +3 -3
  92. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.js +6 -6
  93. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-KO2AKTUF.js +30 -30
  94. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-OG6HWLK6.js +82 -82
  95. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-TEJ5UH35.js +65 -65
  96. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-I6XJVG4X.js +227 -227
  97. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-6RSMTGT7.js +104 -104
  98. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-PVQCEYII.js +104 -104
  99. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-JHISSGLW.js +49 -49
  100. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-W4KKPZXB.js +101 -101
  101. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-5OEKKPKP.js +20 -20
  102. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-3UESZ5HK.js +354 -354
  103. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-AJRCARHV.js +53 -53
  104. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-PNZ67QCA.js +113 -113
  105. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-CIIHVFJN.js +90 -90
  106. package/dist/node_modules/mermaid/dist/mermaid.core.js +156 -156
  107. package/dist/node_modules/motion/dist/es/react.js +9 -2
  108. package/dist/pages/DashboardPage.js +20 -74
  109. package/dist/pages/DebugWorkflowDetailsPage.js +2 -2
  110. package/dist/pages/DebugWorkflowsPage.js +76 -106
  111. package/dist/pages/EmbedWorkbenchPage.js +1 -1
  112. package/dist/pages/PreviewWorkbenchPage.js +6 -6
  113. package/dist/pages/WorkbenchPage.js +43 -47
  114. package/dist/pages/WorkflowDebugPage.js +6 -12
  115. package/dist/pages/WorkspacePage.js +40 -66
  116. package/dist/pages/WorkspaceRunsPage.js +24 -31
  117. package/dist/routing/LocalRouter.js +1 -1
  118. package/package.json +2 -2
  119. package/dist/features/dashboard/Dashboard.js +0 -125
  120. package/dist/features/dashboard/RunItem.js +0 -78
  121. package/dist/features/dashboard/RunList.js +0 -32
  122. package/dist/hooks/useDashboard.js +0 -16
@@ -1,17 +1,17 @@
1
+ import select_default from "../../../../d3-selection/src/select.js";
1
2
  import { __name } from "./chunk-AGHRB4JF.js";
2
3
  import is_dark_default from "../../../../khroma/dist/methods/is_dark.js";
3
4
  import lighten_default from "../../../../khroma/dist/methods/lighten.js";
4
5
  import darken_default from "../../../../khroma/dist/methods/darken.js";
5
6
  import transparentize_default from "../../../../khroma/dist/methods/transparentize.js";
6
7
  import { clear, configureSvgSize, defaultConfig_default, getAccDescription, getAccTitle, getConfig, getDiagramTitle, setAccDescription, setAccTitle, setDiagramTitle } from "./chunk-CSCIHK7Q.js";
7
- import select_default from "../../../../d3-selection/src/select.js";
8
8
  import "../../../../d3/src/index.js";
9
9
  import { selectSvgElement } from "./chunk-WU5MYG2G.js";
10
10
  import { cleanAndMerge } from "./chunk-5ZQYHXKU.js";
11
11
  import { at } from "../../../../roughjs/bundled/rough.esm.js";
12
12
  import { VennDiagram, layout } from "../../../../@upsetjs/venn.js/build/venn.esm.js";
13
13
  var parser = (function() {
14
- var f = /* @__PURE__ */ __name(function(e, f, p, m) {
14
+ var e = /* @__PURE__ */ __name(function(e, f, p, m) {
15
15
  for (p ||= {}, m = e.length; m--; p[e[m]] = f);
16
16
  return p;
17
17
  }, "o"), p = [5, 8], m = [
@@ -278,7 +278,7 @@ var parser = (function() {
278
278
  }
279
279
  }, "anonymous"),
280
280
  table: [
281
- f(p, [2, 2], {
281
+ e(p, [2, 2], {
282
282
  3: 1,
283
283
  4: 2
284
284
  }),
@@ -287,8 +287,8 @@ var parser = (function() {
287
287
  5: [1, 3],
288
288
  8: [1, 4]
289
289
  },
290
- f(m, [2, 4], { 6: 5 }),
291
- f(p, [2, 3]),
290
+ e(m, [2, 4], { 6: 5 }),
291
+ e(p, [2, 3]),
292
292
  {
293
293
  7: [1, 6],
294
294
  8: [1, 8],
@@ -302,10 +302,10 @@ var parser = (function() {
302
302
  24: [1, 15]
303
303
  },
304
304
  { 1: [2, 1] },
305
- f(m, [2, 5]),
306
- f(m, [2, 6]),
307
- f(m, [2, 7]),
308
- f(m, [2, 8]),
305
+ e(m, [2, 5]),
306
+ e(m, [2, 6]),
307
+ e(m, [2, 7]),
308
+ e(m, [2, 8]),
309
309
  {
310
310
  13: 16,
311
311
  20: h,
@@ -335,58 +335,58 @@ var parser = (function() {
335
335
  20: h,
336
336
  21: g
337
337
  },
338
- f(m, [2, 9], {
338
+ e(m, [2, 9], {
339
339
  14: [1, 27],
340
340
  15: [1, 28]
341
341
  }),
342
- f(_, [2, 43]),
343
- f(_, [2, 44]),
344
- f(m, [2, 13], {
342
+ e(_, [2, 43]),
343
+ e(_, [2, 44]),
344
+ e(m, [2, 13], {
345
345
  14: [1, 29],
346
346
  15: [1, 30],
347
347
  27: v
348
348
  }),
349
- f(_, [2, 41]),
349
+ e(_, [2, 41]),
350
350
  {
351
351
  16: [1, 34],
352
352
  20: [1, 32],
353
353
  21: [1, 33],
354
354
  27: v
355
355
  },
356
- f(m, [2, 22]),
357
- f(m, [2, 24], { 14: [1, 35] }),
358
- f(m, [2, 25], { 14: [1, 36] }),
359
- f(m, [2, 26]),
356
+ e(m, [2, 22]),
357
+ e(m, [2, 24], { 14: [1, 35] }),
358
+ e(m, [2, 25], { 14: [1, 36] }),
359
+ e(m, [2, 26]),
360
360
  {
361
361
  20: y,
362
362
  25: 37,
363
363
  26: 38,
364
364
  27: v
365
365
  },
366
- f(m, [2, 10], { 15: [1, 40] }),
366
+ e(m, [2, 10], { 15: [1, 40] }),
367
367
  { 16: [1, 41] },
368
- f(m, [2, 14], { 15: [1, 42] }),
368
+ e(m, [2, 14], { 15: [1, 42] }),
369
369
  { 16: [1, 43] },
370
370
  {
371
371
  13: 44,
372
372
  20: h,
373
373
  21: g
374
374
  },
375
- f(m, [2, 17], { 14: [1, 45] }),
376
- f(m, [2, 18], { 14: [1, 46] }),
377
- f(m, [2, 19]),
378
- f(m, [2, 27]),
379
- f(m, [2, 28]),
380
- f(m, [2, 23], { 27: [1, 47] }),
381
- f(b, [2, 29]),
375
+ e(m, [2, 17], { 14: [1, 45] }),
376
+ e(m, [2, 18], { 14: [1, 46] }),
377
+ e(m, [2, 19]),
378
+ e(m, [2, 27]),
379
+ e(m, [2, 28]),
380
+ e(m, [2, 23], { 27: [1, 47] }),
381
+ e(b, [2, 29]),
382
382
  { 15: [1, 48] },
383
383
  { 16: [1, 49] },
384
- f(m, [2, 11]),
384
+ e(m, [2, 11]),
385
385
  { 16: [1, 50] },
386
- f(m, [2, 15]),
387
- f(_, [2, 42]),
388
- f(m, [2, 20]),
389
- f(m, [2, 21]),
386
+ e(m, [2, 15]),
387
+ e(_, [2, 42]),
388
+ e(m, [2, 20]),
389
+ e(m, [2, 21]),
390
390
  {
391
391
  20: y,
392
392
  26: 51
@@ -402,12 +402,12 @@ var parser = (function() {
402
402
  32: w,
403
403
  33: T
404
404
  },
405
- f(m, [2, 12]),
406
- f(m, [2, 16]),
407
- f(b, [2, 30]),
408
- f(b, [2, 31]),
409
- f(b, [2, 32]),
410
- f(b, [2, 33], {
405
+ e(m, [2, 12]),
406
+ e(m, [2, 16]),
407
+ e(b, [2, 30]),
408
+ e(b, [2, 31]),
409
+ e(b, [2, 32]),
410
+ e(b, [2, 33], {
411
411
  30: 61,
412
412
  16: x,
413
413
  20: S,
@@ -415,13 +415,13 @@ var parser = (function() {
415
415
  32: w,
416
416
  33: T
417
417
  }),
418
- f(E, [2, 34]),
419
- f(E, [2, 36]),
420
- f(E, [2, 37]),
421
- f(E, [2, 38]),
422
- f(E, [2, 39]),
423
- f(E, [2, 40]),
424
- f(E, [2, 35])
418
+ e(E, [2, 34]),
419
+ e(E, [2, 36]),
420
+ e(E, [2, 37]),
421
+ e(E, [2, 38]),
422
+ e(E, [2, 39]),
423
+ e(E, [2, 40]),
424
+ e(E, [2, 35])
425
425
  ],
426
426
  defaultActions: { 6: [2, 1] },
427
427
  parseError: /* @__PURE__ */ __name(function(e, f) {
@@ -431,10 +431,10 @@ var parser = (function() {
431
431
  throw p.hash = f, p;
432
432
  }
433
433
  }, "parseError"),
434
- parse: /* @__PURE__ */ __name(function(f) {
434
+ parse: /* @__PURE__ */ __name(function(e) {
435
435
  var p = this, m = [0], h = [], g = [null], _ = [], v = this.table, y = "", b = 0, x = 0, S = 0, C = 2, w = 1, T = _.slice.call(arguments, 1), E = Object.create(this.lexer), D = { yy: {} };
436
436
  for (var O in this.yy) Object.prototype.hasOwnProperty.call(this.yy, O) && (D.yy[O] = this.yy[O]);
437
- E.setInput(f, D.yy), D.yy.lexer = E, D.yy.parser = this, E.yylloc === void 0 && (E.yylloc = {});
437
+ E.setInput(e, D.yy), D.yy.lexer = E, D.yy.parser = this, E.yylloc === void 0 && (E.yylloc = {});
438
438
  var k = E.yylloc;
439
439
  _.push(k);
440
440
  var A = E.options && E.options.ranges;
@@ -842,76 +842,76 @@ function buildStyleByKey(e) {
842
842
  return f;
843
843
  }
844
844
  __name(buildStyleByKey, "buildStyleByKey");
845
- var draw = /* @__PURE__ */ __name((e, g, v, y) => {
846
- let b = y.db, S = b.getConfig?.(), { themeVariables: C, look: w, handDrawnSeed: T } = getConfig(), O = w === "handDrawn", M = [
847
- C.venn1,
848
- C.venn2,
849
- C.venn3,
850
- C.venn4,
851
- C.venn5,
852
- C.venn6,
853
- C.venn7,
854
- C.venn8
855
- ].filter(Boolean), N = b.getDiagramTitle?.(), P = b.getSubsetData(), F = b.getTextData(), I = buildStyleByKey(b.getStyleData()), L = S?.width ?? 800, R = S?.height ?? 450, z = L / 1600, B = N ? 48 * z : 0, V = C.primaryTextColor ?? C.textColor, H = selectSvgElement(g);
856
- H.attr("viewBox", `0 0 ${L} ${R}`), N && H.append("text").text(N).attr("class", "venn-title").attr("font-size", `${32 * z}px`).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("x", "50%").attr("y", 32 * z).style("fill", C.vennTitleTextColor || C.titleColor);
845
+ var draw = /* @__PURE__ */ __name((f, _, y, b) => {
846
+ let x = b.db, C = x.getConfig?.(), { themeVariables: w, look: T, handDrawnSeed: E } = getConfig(), O = T === "handDrawn", M = [
847
+ w.venn1,
848
+ w.venn2,
849
+ w.venn3,
850
+ w.venn4,
851
+ w.venn5,
852
+ w.venn6,
853
+ w.venn7,
854
+ w.venn8
855
+ ].filter(Boolean), N = x.getDiagramTitle?.(), P = x.getSubsetData(), F = x.getTextData(), I = buildStyleByKey(x.getStyleData()), L = C?.width ?? 800, R = C?.height ?? 450, z = L / 1600, B = N ? 48 * z : 0, V = w.primaryTextColor ?? w.textColor, H = selectSvgElement(_);
856
+ H.attr("viewBox", `0 0 ${L} ${R}`), N && H.append("text").text(N).attr("class", "venn-title").attr("font-size", `${32 * z}px`).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("x", "50%").attr("y", 32 * z).style("fill", w.vennTitleTextColor || w.titleColor);
857
857
  let U = select_default(document.createElement("div")), W = VennDiagram().width(L).height(R - B);
858
858
  U.datum(P).call(W);
859
859
  let G = O ? at.svg(U.select("svg").node()) : void 0, K = layout(P, {
860
860
  width: L,
861
861
  height: R - B,
862
- padding: S?.padding ?? 15
862
+ padding: C?.padding ?? 15
863
863
  }), q = /* @__PURE__ */ new Map();
864
864
  for (let e of K) {
865
865
  let f = stableSetsKey([...e.data.sets].sort());
866
866
  q.set(f, e);
867
867
  }
868
- F.length > 0 && renderTextNodes(S, q, U, F, z, I);
869
- let J = is_dark_default(C.background || "#f4f4f4");
870
- U.selectAll(".venn-circle").each(function(e, f) {
871
- let g = select_default(this), _ = stableSetsKey([...e.sets].sort()), v = I.get(_), y = v?.fill || M[f % M.length] || C.primaryColor;
872
- g.classed(`venn-set-${f % 8}`, !0);
873
- let b = v?.["fill-opacity"] ?? .1, x = v?.stroke || y, S = v?.["stroke-width"] || `${5 * z}`;
868
+ F.length > 0 && renderTextNodes(C, q, U, F, z, I);
869
+ let J = is_dark_default(w.background || "#f4f4f4");
870
+ U.selectAll(".venn-circle").each(function(f, p) {
871
+ let _ = select_default(this), v = stableSetsKey([...f.sets].sort()), y = I.get(v), b = y?.fill || M[p % M.length] || w.primaryColor;
872
+ _.classed(`venn-set-${p % 8}`, !0);
873
+ let x = y?.["fill-opacity"] ?? .1, S = y?.stroke || b, C = y?.["stroke-width"] || `${5 * z}`;
874
874
  if (O && G) {
875
- let e = q.get(_);
875
+ let e = q.get(v);
876
876
  if (e && e.circles.length > 0) {
877
- let p = e.circles[0], m = G.circle(p.x, p.y, p.radius * 2, {
877
+ let f = e.circles[0], m = G.circle(f.x, f.y, f.radius * 2, {
878
878
  roughness: .7,
879
- seed: T,
880
- fill: transparentize_default(y, .7),
879
+ seed: E,
880
+ fill: transparentize_default(b, .7),
881
881
  fillStyle: "hachure",
882
882
  fillWeight: 2,
883
883
  hachureGap: 8,
884
- hachureAngle: -41 + f * 60,
885
- stroke: x,
886
- strokeWidth: parseFloat(String(S))
884
+ hachureAngle: -41 + p * 60,
885
+ stroke: S,
886
+ strokeWidth: parseFloat(String(C))
887
887
  });
888
- g.select("path").remove(), g.node()?.insertBefore(m, g.select("text").node());
888
+ _.select("path").remove(), _.node()?.insertBefore(m, _.select("text").node());
889
889
  }
890
- } else g.select("path").style("fill", y).style("fill-opacity", b).style("stroke", x).style("stroke-width", S).style("stroke-opacity", .95);
891
- let w = v?.color || (J ? lighten_default(y, 30) : darken_default(y, 30));
892
- g.select("text").style("font-size", `${48 * z}px`).style("fill", w);
893
- }), O && G ? U.selectAll(".venn-intersection").each(function(e) {
894
- let f = select_default(this), p = stableSetsKey([...e.sets].sort()), m = I.get(p), g = m?.fill;
895
- if (g) {
896
- let e = f.select("path"), p = e.attr("d");
897
- if (p) {
898
- let f = G.path(p, {
890
+ } else _.select("path").style("fill", b).style("fill-opacity", x).style("stroke", S).style("stroke-width", C).style("stroke-opacity", .95);
891
+ let T = y?.color || (J ? lighten_default(b, 30) : darken_default(b, 30));
892
+ _.select("text").style("font-size", `${48 * z}px`).style("fill", T);
893
+ }), O && G ? U.selectAll(".venn-intersection").each(function(f) {
894
+ let p = select_default(this), m = stableSetsKey([...f.sets].sort()), h = I.get(m), _ = h?.fill;
895
+ if (_) {
896
+ let e = p.select("path"), f = e.attr("d");
897
+ if (f) {
898
+ let p = G.path(f, {
899
899
  roughness: .7,
900
- seed: T,
901
- fill: transparentize_default(g, .3),
900
+ seed: E,
901
+ fill: transparentize_default(_, .3),
902
902
  fillStyle: "cross-hatch",
903
903
  fillWeight: 2,
904
904
  hachureGap: 6,
905
905
  hachureAngle: 60,
906
906
  stroke: "none"
907
907
  }), m = e.node();
908
- m?.parentNode?.insertBefore(f, m), e.remove();
908
+ m?.parentNode?.insertBefore(p, m), e.remove();
909
909
  }
910
- } else f.select("path").style("fill-opacity", 0);
911
- f.select("text").style("font-size", `${48 * z}px`).style("fill", m?.color ?? C.vennSetTextColor ?? V);
910
+ } else p.select("path").style("fill-opacity", 0);
911
+ p.select("text").style("font-size", `${48 * z}px`).style("fill", h?.color ?? w.vennSetTextColor ?? V);
912
912
  }) : (U.selectAll(".venn-intersection text").style("font-size", `${48 * z}px`).style("fill", (e) => {
913
913
  let f = stableSetsKey([...e.sets].sort());
914
- return I.get(f)?.color ?? C.vennSetTextColor ?? V;
914
+ return I.get(f)?.color ?? w.vennSetTextColor ?? V;
915
915
  }), U.selectAll(".venn-intersection path").style("fill-opacity", (e) => {
916
916
  let f = stableSetsKey([...e.sets].sort());
917
917
  return I.get(f)?.fill ? 1 : 0;
@@ -921,7 +921,7 @@ var draw = /* @__PURE__ */ __name((e, g, v, y) => {
921
921
  }));
922
922
  let Y = H.append("g").attr("transform", `translate(0, ${B})`), X = U.select("svg").node();
923
923
  if (X && "childNodes" in X) for (let e of [...X.childNodes]) Y.node()?.appendChild(e);
924
- configureSvgSize(H, R, L, S?.useMaxWidth ?? !0);
924
+ configureSvgSize(H, R, L, C?.useMaxWidth ?? !0);
925
925
  }, "draw");
926
926
  function stableSetsKey(e) {
927
927
  return e.join("|");