@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,8 +1,8 @@
1
- import { __name } from "./chunk-AGHRB4JF.js";
2
1
  import select_default from "../../../../d3-selection/src/select.js";
2
+ import { __name } from "./chunk-AGHRB4JF.js";
3
3
  import "../../../../d3/src/index.js";
4
- var getDiagramElement = /* @__PURE__ */ __name((e, n) => {
4
+ var getDiagramElement = /* @__PURE__ */ __name((t, n) => {
5
5
  let r;
6
- return n === "sandbox" && (r = select_default("#i" + e)), select_default(n === "sandbox" ? r.nodes()[0].contentDocument.body : "body").select(`[id="${e}"]`);
6
+ return n === "sandbox" && (r = select_default("#i" + t)), select_default(n === "sandbox" ? r.nodes()[0].contentDocument.body : "body").select(`[id="${t}"]`);
7
7
  }, "getDiagramElement");
8
8
  export { getDiagramElement };
@@ -1,6 +1,6 @@
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, detectType, directiveRegex, sanitizeDirective } from "./chunk-CSCIHK7Q.js";
3
- import select_default from "../../../../d3-selection/src/select.js";
4
4
  import linear_default from "../../../../d3-shape/src/curve/linear.js";
5
5
  import { bumpX, bumpY } from "../../../../d3-shape/src/curve/bump.js";
6
6
  import basis_default from "../../../../d3-shape/src/curve/basis.js";
@@ -43,33 +43,33 @@ var import_dist = require_dist(), ZERO_WIDTH_SPACE = "​", d3CurveTypes = {
43
43
  curveStepAfter: stepAfter,
44
44
  curveStepBefore: stepBefore
45
45
  }, directiveWithoutOpen = /\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi, detectInit = /* @__PURE__ */ __name(function(p, H) {
46
- let W = detectDirective(p, /(?:init\b)|(?:initialize\b)/), K = {};
47
- if (Array.isArray(W)) {
48
- let p = W.map((p) => p.args);
49
- sanitizeDirective(p), K = assignWithDepth_default(K, [...p]);
50
- } else K = W.args;
51
- if (!K) return;
52
- let J = detectType(p, H), Y = "config";
53
- return K[Y] !== void 0 && (J === "flowchart-v2" && (J = "flowchart"), K[J] = K[Y], delete K[Y]), K;
54
- }, "detectInit"), detectDirective = /* @__PURE__ */ __name(function(p, U = null) {
46
+ let U = detectDirective(p, /(?:init\b)|(?:initialize\b)/), G = {};
47
+ if (Array.isArray(U)) {
48
+ let p = U.map((p) => p.args);
49
+ sanitizeDirective(p), G = assignWithDepth_default(G, [...p]);
50
+ } else G = U.args;
51
+ if (!G) return;
52
+ let q = detectType(p, H), Y = "config";
53
+ return G[Y] !== void 0 && (q === "flowchart-v2" && (q = "flowchart"), G[q] = G[Y], delete G[Y]), G;
54
+ }, "detectInit"), detectDirective = /* @__PURE__ */ __name(function(p, H = null) {
55
55
  try {
56
56
  let W = RegExp(`[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).*
57
57
  `, "ig");
58
- p = p.trim().replace(W, "").replace(/'/gm, "\""), log.debug(`Detecting diagram directive${U === null ? "" : " type:" + U} based on the text:${p}`);
59
- let G, q = [];
60
- for (; (G = directiveRegex.exec(p)) !== null;) if (G.index === directiveRegex.lastIndex && directiveRegex.lastIndex++, G && !U || U && G[1]?.match(U) || U && G[2]?.match(U)) {
58
+ p = p.trim().replace(W, "").replace(/'/gm, "\""), log.debug(`Detecting diagram directive${H === null ? "" : " type:" + H} based on the text:${p}`);
59
+ let G, K = [];
60
+ for (; (G = directiveRegex.exec(p)) !== null;) if (G.index === directiveRegex.lastIndex && directiveRegex.lastIndex++, G && !H || H && G[1]?.match(H) || H && G[2]?.match(H)) {
61
61
  let p = G[1] ? G[1] : G[2], H = G[3] ? G[3].trim() : G[4] ? JSON.parse(G[4].trim()) : null;
62
- q.push({
62
+ K.push({
63
63
  type: p,
64
64
  args: H
65
65
  });
66
66
  }
67
- return q.length === 0 ? {
67
+ return K.length === 0 ? {
68
68
  type: p,
69
69
  args: null
70
- } : q.length === 1 ? q[0] : q;
70
+ } : K.length === 1 ? K[0] : K;
71
71
  } catch (W) {
72
- return log.error(`ERROR: ${W.message} - Unable to parse directive type: '${U}' based on the text: '${p}'`), {
72
+ return log.error(`ERROR: ${W.message} - Unable to parse directive type: '${H}' based on the text: '${p}'`), {
73
73
  type: void 0,
74
74
  args: null
75
75
  };
@@ -89,13 +89,13 @@ function formatUrl(p, H) {
89
89
  if (U) return H.securityLevel === "loose" ? U : (0, import_dist.sanitizeUrl)(U);
90
90
  }
91
91
  __name(formatUrl, "formatUrl");
92
- var runFunc = /* @__PURE__ */ __name((p, ...U) => {
92
+ var runFunc = /* @__PURE__ */ __name((p, ...H) => {
93
93
  let W = p.split("."), G = W.length - 1, K = W[G], q = window;
94
- for (let U = 0; U < G; U++) if (q = q[W[U]], !q) {
94
+ for (let H = 0; H < G; H++) if (q = q[W[H]], !q) {
95
95
  log.error(`Function name: ${p} not found in window`);
96
96
  return;
97
97
  }
98
- q[K](...U);
98
+ q[K](...H);
99
99
  }, "runFunc");
100
100
  function distance(p, H) {
101
101
  return !p || !H ? 0 : Math.sqrt((H.x - p.x) ** 2 + (H.y - p.y) ** 2);
@@ -138,22 +138,22 @@ var roundNumber = /* @__PURE__ */ __name((p, H = 2) => {
138
138
  U = H;
139
139
  }
140
140
  throw Error("Could not find a suitable point for the given distance");
141
- }, "calculatePoint"), calcCardinalityPosition = /* @__PURE__ */ __name((p, U, W) => {
142
- log.info(`our points ${JSON.stringify(U)}`), U[0] !== W && (U = U.reverse());
143
- let G = calculatePoint(U, 25), K = p ? 10 : 5, q = Math.atan2(U[0].y - G.y, U[0].x - G.x), J = {
141
+ }, "calculatePoint"), calcCardinalityPosition = /* @__PURE__ */ __name((p, H, W) => {
142
+ log.info(`our points ${JSON.stringify(H)}`), H[0] !== W && (H = H.reverse());
143
+ let G = calculatePoint(H, 25), K = p ? 10 : 5, q = Math.atan2(H[0].y - G.y, H[0].x - G.x), J = {
144
144
  x: 0,
145
145
  y: 0
146
146
  };
147
- return J.x = Math.sin(q) * K + (U[0].x + G.x) / 2, J.y = -Math.cos(q) * K + (U[0].y + G.y) / 2, J;
147
+ return J.x = Math.sin(q) * K + (H[0].x + G.x) / 2, J.y = -Math.cos(q) * K + (H[0].y + G.y) / 2, J;
148
148
  }, "calcCardinalityPosition");
149
- function calcTerminalLabelPosition(p, U, W) {
149
+ function calcTerminalLabelPosition(p, H, W) {
150
150
  let G = structuredClone(W);
151
- log.info("our points", G), U !== "start_left" && U !== "start_right" && G.reverse();
151
+ log.info("our points", G), H !== "start_left" && H !== "start_right" && G.reverse();
152
152
  let K = calculatePoint(G, 25 + p), q = 10 + p * .5, J = Math.atan2(G[0].y - K.y, G[0].x - K.x), Y = {
153
153
  x: 0,
154
154
  y: 0
155
155
  };
156
- return U === "start_left" ? (Y.x = Math.sin(J + Math.PI) * q + (G[0].x + K.x) / 2, Y.y = -Math.cos(J + Math.PI) * q + (G[0].y + K.y) / 2) : U === "end_right" ? (Y.x = Math.sin(J - Math.PI) * q + (G[0].x + K.x) / 2 - 5, Y.y = -Math.cos(J - Math.PI) * q + (G[0].y + K.y) / 2 - 5) : U === "end_left" ? (Y.x = Math.sin(J) * q + (G[0].x + K.x) / 2 - 5, Y.y = -Math.cos(J) * q + (G[0].y + K.y) / 2 - 5) : (Y.x = Math.sin(J) * q + (G[0].x + K.x) / 2, Y.y = -Math.cos(J) * q + (G[0].y + K.y) / 2), Y;
156
+ return H === "start_left" ? (Y.x = Math.sin(J + Math.PI) * q + (G[0].x + K.x) / 2, Y.y = -Math.cos(J + Math.PI) * q + (G[0].y + K.y) / 2) : H === "end_right" ? (Y.x = Math.sin(J - Math.PI) * q + (G[0].x + K.x) / 2 - 5, Y.y = -Math.cos(J - Math.PI) * q + (G[0].y + K.y) / 2 - 5) : H === "end_left" ? (Y.x = Math.sin(J) * q + (G[0].x + K.x) / 2 - 5, Y.y = -Math.cos(J) * q + (G[0].y + K.y) / 2 - 5) : (Y.x = Math.sin(J) * q + (G[0].x + K.x) / 2, Y.y = -Math.cos(J) * q + (G[0].y + K.y) / 2), Y;
157
157
  }
158
158
  __name(calcTerminalLabelPosition, "calcTerminalLabelPosition");
159
159
  function getStylesFromArray(p) {
@@ -188,8 +188,8 @@ var random = /* @__PURE__ */ __name((p) => makeRandomHex(p.length), "random"), g
188
188
  text: ""
189
189
  };
190
190
  }, "getTextObj"), drawSimpleText = /* @__PURE__ */ __name(function(p, H) {
191
- let U = H.text.replace(common_default.lineBreakRegex, " "), [, G] = parseFontSize(H.fontSize), K = p.append("text");
192
- K.attr("x", H.x), K.attr("y", H.y), K.style("text-anchor", H.anchor), K.style("font-family", H.fontFamily), K.style("font-size", G), K.style("font-weight", H.fontWeight), K.attr("fill", H.fill), H.class !== void 0 && K.attr("class", H.class);
191
+ let U = H.text.replace(common_default.lineBreakRegex, " "), [, W] = parseFontSize(H.fontSize), K = p.append("text");
192
+ K.attr("x", H.x), K.attr("y", H.y), K.style("text-anchor", H.anchor), K.style("font-family", H.fontFamily), K.style("font-size", W), K.style("font-weight", H.fontWeight), K.attr("fill", H.fill), H.class !== void 0 && K.attr("class", H.class);
193
193
  let q = K.append("tspan");
194
194
  return q.attr("x", H.x + H.textMargin * 2), q.attr("fill", H.fill), q.text(U), K;
195
195
  }, "drawSimpleText"), wrapLabel = memoize((p, H, U) => {
@@ -199,14 +199,14 @@ var random = /* @__PURE__ */ __name((p) => makeRandomHex(p.length), "random"), g
199
199
  fontFamily: "Arial",
200
200
  joinWith: "<br/>"
201
201
  }, U), common_default.lineBreakRegex.test(p))) return p;
202
- let G = p.split(" ").filter(Boolean), K = [], q = "";
203
- return G.forEach((p, W) => {
202
+ let W = p.split(" ").filter(Boolean), K = [], q = "";
203
+ return W.forEach((p, G) => {
204
204
  let J = calculateTextWidth(`${p} `, U), Y = calculateTextWidth(q, U);
205
205
  if (J > H) {
206
206
  let { hyphenatedStrings: W, remainingWord: G } = breakString(p, H, "-", U);
207
207
  K.push(q, ...W), q = G;
208
208
  } else Y + J >= H ? (K.push(q), q = p) : q = [q, p].filter(Boolean).join(" ");
209
- W + 1 === G.length && K.push(q);
209
+ G + 1 === W.length && K.push(q);
210
210
  }), K.filter((p) => p !== "").join(U.joinWith);
211
211
  }, (p, H, U) => `${p}${H}${U.fontSize}${U.fontWeight}${U.fontFamily}${U.joinWith}`), breakString = memoize((p, H, U = "-", W) => {
212
212
  W = Object.assign({
@@ -235,13 +235,13 @@ function calculateTextWidth(p, H) {
235
235
  return calculateTextDimensions(p, H).width;
236
236
  }
237
237
  __name(calculateTextWidth, "calculateTextWidth");
238
- var calculateTextDimensions = memoize((p, H) => {
239
- let { fontSize: U = 12, fontFamily: G = "Arial", fontWeight: K = 400 } = H;
240
- if (!p) return {
238
+ var calculateTextDimensions = memoize((H, U) => {
239
+ let { fontSize: W = 12, fontFamily: K = "Arial", fontWeight: q = 400 } = U;
240
+ if (!H) return {
241
241
  width: 0,
242
242
  height: 0
243
243
  };
244
- let [, q] = parseFontSize(U), Y = ["sans-serif", G], X = p.split(common_default.lineBreakRegex), Z = [], Q = select_default("body");
244
+ let [, J] = parseFontSize(W), Y = ["sans-serif", K], X = H.split(common_default.lineBreakRegex), Z = [], Q = select_default("body");
245
245
  if (!Q.remove) return {
246
246
  width: 0,
247
247
  height: 0,
@@ -257,7 +257,7 @@ var calculateTextDimensions = memoize((p, H) => {
257
257
  for (let W of X) {
258
258
  let G = getTextObj();
259
259
  G.text = W || "​";
260
- let J = drawSimpleText($, G).style("font-size", q).style("font-weight", K).style("font-family", p), Y = (J._groups || J)[0][0].getBBox();
260
+ let K = drawSimpleText($, G).style("font-size", J).style("font-weight", q).style("font-family", p), Y = (K._groups || K)[0][0].getBBox();
261
261
  if (Y.width === 0 && Y.height === 0) throw Error("svg element not in render tree");
262
262
  U.width = Math.round(Math.max(U.width, Y.width)), H = Math.round(Y.height), U.height += H, U.lineHeight = Math.round(Math.max(U.lineHeight, H));
263
263
  }