ooxml-core 1.5.0 → 1.6.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 (303) hide show
  1. package/dist/{PptxHandler-ZPJNHEZZ.mjs → PptxHandler-DDEJ6CKU.mjs} +2 -2
  2. package/dist/automation/index.cjs +15757 -8955
  3. package/dist/automation/index.mjs +15757 -8955
  4. package/dist/{chunk-XGLKW3JJ.mjs → chunk-5L4DHJV3.mjs} +23 -3
  5. package/dist/{chunk-IVDC75E5.mjs → chunk-EPNLABIU.mjs} +1 -1
  6. package/dist/{chunk-BB55ASTX.mjs → chunk-Q52O7SXQ.mjs} +3 -3
  7. package/dist/{chunk-QPQDLSJQ.mjs → chunk-QXZJOUW4.mjs} +1 -1
  8. package/dist/{chunk-H4TPDZV4.mjs → chunk-UQQGC6O3.mjs} +1 -1
  9. package/dist/drawingml/index.cjs +102 -24
  10. package/dist/drawingml/index.d.ts +1 -0
  11. package/dist/drawingml/index.d.ts.map +1 -1
  12. package/dist/drawingml/index.mjs +102 -25
  13. package/dist/drawingml/write-theme.d.ts +17 -0
  14. package/dist/drawingml/write-theme.d.ts.map +1 -0
  15. package/dist/geometry/auto-align.d.ts +32 -0
  16. package/dist/geometry/auto-align.d.ts.map +1 -0
  17. package/dist/geometry/graph-layout.d.ts +37 -0
  18. package/dist/geometry/graph-layout.d.ts.map +1 -0
  19. package/dist/geometry/index.cjs +361 -7
  20. package/dist/geometry/index.d.ts +2 -0
  21. package/dist/geometry/index.d.ts.map +1 -1
  22. package/dist/geometry/index.mjs +359 -8
  23. package/dist/index.cjs +624 -122
  24. package/dist/index.mjs +624 -122
  25. package/dist/pptx/automation/index.cjs +23 -2
  26. package/dist/pptx/automation/index.mjs +5 -5
  27. package/dist/pptx/cli/index.cjs +23 -2
  28. package/dist/pptx/cli/index.mjs +4 -4
  29. package/dist/pptx/converter/index.mjs +2 -2
  30. package/dist/pptx/index.cjs +23 -2
  31. package/dist/pptx/index.mjs +5 -5
  32. package/dist/text/change-case.d.ts +20 -0
  33. package/dist/text/change-case.d.ts.map +1 -0
  34. package/dist/text/index.cjs +70 -0
  35. package/dist/text/index.d.ts +1 -0
  36. package/dist/text/index.d.ts.map +1 -1
  37. package/dist/text/index.mjs +68 -1
  38. package/dist/visio/arrow-shapes.d.ts +16 -0
  39. package/dist/visio/arrow-shapes.d.ts.map +1 -0
  40. package/dist/visio/basic-shapes.d.ts +2 -0
  41. package/dist/visio/basic-shapes.d.ts.map +1 -1
  42. package/dist/visio/comments.d.ts +39 -0
  43. package/dist/visio/comments.d.ts.map +1 -0
  44. package/dist/visio/connector-route.d.ts +31 -0
  45. package/dist/visio/connector-route.d.ts.map +1 -0
  46. package/dist/visio/data-recordsets.d.ts +66 -0
  47. package/dist/visio/data-recordsets.d.ts.map +1 -0
  48. package/dist/visio/edit-change-shape-commands.d.ts +17 -0
  49. package/dist/visio/edit-change-shape-commands.d.ts.map +1 -0
  50. package/dist/visio/edit-change-shape.d.ts +4 -0
  51. package/dist/visio/edit-change-shape.d.ts.map +1 -0
  52. package/dist/visio/edit-commands.d.ts +41 -6
  53. package/dist/visio/edit-commands.d.ts.map +1 -1
  54. package/dist/visio/edit-comment-commands.d.ts +32 -0
  55. package/dist/visio/edit-comment-commands.d.ts.map +1 -0
  56. package/dist/visio/edit-comments.d.ts +7 -0
  57. package/dist/visio/edit-comments.d.ts.map +1 -0
  58. package/dist/visio/edit-connection-points.d.ts +19 -0
  59. package/dist/visio/edit-connection-points.d.ts.map +1 -0
  60. package/dist/visio/edit-connector-commands.d.ts +57 -0
  61. package/dist/visio/edit-connector-commands.d.ts.map +1 -0
  62. package/dist/visio/edit-connector-glue.d.ts +43 -0
  63. package/dist/visio/edit-connector-glue.d.ts.map +1 -0
  64. package/dist/visio/edit-connector-layout.d.ts +37 -0
  65. package/dist/visio/edit-connector-layout.d.ts.map +1 -0
  66. package/dist/visio/edit-connector-reroute.d.ts +30 -0
  67. package/dist/visio/edit-connector-reroute.d.ts.map +1 -0
  68. package/dist/visio/edit-connector.d.ts +42 -0
  69. package/dist/visio/edit-connector.d.ts.map +1 -0
  70. package/dist/visio/edit-data-commands.d.ts +49 -0
  71. package/dist/visio/edit-data-commands.d.ts.map +1 -0
  72. package/dist/visio/edit-data-parts.d.ts +34 -0
  73. package/dist/visio/edit-data-parts.d.ts.map +1 -0
  74. package/dist/visio/edit-data.d.ts +8 -0
  75. package/dist/visio/edit-data.d.ts.map +1 -0
  76. package/dist/visio/edit-delete.d.ts.map +1 -1
  77. package/dist/visio/edit-diagram-parts-commands.d.ts +55 -0
  78. package/dist/visio/edit-diagram-parts-commands.d.ts.map +1 -0
  79. package/dist/visio/edit-diagram-parts.d.ts +16 -0
  80. package/dist/visio/edit-diagram-parts.d.ts.map +1 -0
  81. package/dist/visio/edit-ellipse-geometry.d.ts +2 -0
  82. package/dist/visio/edit-ellipse-geometry.d.ts.map +1 -1
  83. package/dist/visio/edit-foreign-bitmap.d.ts +7 -0
  84. package/dist/visio/edit-foreign-bitmap.d.ts.map +1 -0
  85. package/dist/visio/edit-formatting-cell-admission.d.ts +2 -0
  86. package/dist/visio/edit-formatting-cell-admission.d.ts.map +1 -1
  87. package/dist/visio/edit-formatting-commands.d.ts +14 -1
  88. package/dist/visio/edit-formatting-commands.d.ts.map +1 -1
  89. package/dist/visio/edit-formatting-effects.d.ts +50 -0
  90. package/dist/visio/edit-formatting-effects.d.ts.map +1 -0
  91. package/dist/visio/edit-formatting-glow.d.ts +43 -0
  92. package/dist/visio/edit-formatting-glow.d.ts.map +1 -0
  93. package/dist/visio/edit-formatting-paint-scope.d.ts.map +1 -1
  94. package/dist/visio/edit-formatting-paint.d.ts +6 -0
  95. package/dist/visio/edit-formatting-paint.d.ts.map +1 -1
  96. package/dist/visio/edit-formatting-scope.d.ts.map +1 -1
  97. package/dist/visio/edit-formatting-text-commands.d.ts +56 -0
  98. package/dist/visio/edit-formatting-text-commands.d.ts.map +1 -0
  99. package/dist/visio/edit-formatting-text-extra.d.ts +11 -0
  100. package/dist/visio/edit-formatting-text-extra.d.ts.map +1 -0
  101. package/dist/visio/edit-formatting-text.d.ts.map +1 -1
  102. package/dist/visio/edit-formatting-theme-context.d.ts +14 -0
  103. package/dist/visio/edit-formatting-theme-context.d.ts.map +1 -0
  104. package/dist/visio/edit-formatting.d.ts +2 -0
  105. package/dist/visio/edit-formatting.d.ts.map +1 -1
  106. package/dist/visio/edit-geometry-admission.d.ts +1 -1
  107. package/dist/visio/edit-geometry-admission.d.ts.map +1 -1
  108. package/dist/visio/edit-geometry.d.ts.map +1 -1
  109. package/dist/visio/edit-group-commands.d.ts +22 -0
  110. package/dist/visio/edit-group-commands.d.ts.map +1 -0
  111. package/dist/visio/edit-group-rotation.d.ts +7 -1
  112. package/dist/visio/edit-group-rotation.d.ts.map +1 -1
  113. package/dist/visio/edit-group.d.ts +17 -0
  114. package/dist/visio/edit-group.d.ts.map +1 -0
  115. package/dist/visio/edit-guide-commands.d.ts +26 -0
  116. package/dist/visio/edit-guide-commands.d.ts.map +1 -0
  117. package/dist/visio/edit-guides.d.ts +4 -0
  118. package/dist/visio/edit-guides.d.ts.map +1 -0
  119. package/dist/visio/edit-layer-commands.d.ts +20 -0
  120. package/dist/visio/edit-layer-commands.d.ts.map +1 -0
  121. package/dist/visio/edit-layers.d.ts +7 -0
  122. package/dist/visio/edit-layers.d.ts.map +1 -0
  123. package/dist/visio/edit-metadata-commands.d.ts +46 -0
  124. package/dist/visio/edit-metadata-commands.d.ts.map +1 -0
  125. package/dist/visio/edit-metadata.d.ts +4 -0
  126. package/dist/visio/edit-metadata.d.ts.map +1 -0
  127. package/dist/visio/edit-page-auto-size.d.ts +19 -0
  128. package/dist/visio/edit-page-auto-size.d.ts.map +1 -0
  129. package/dist/visio/edit-page-create.d.ts +24 -0
  130. package/dist/visio/edit-page-create.d.ts.map +1 -0
  131. package/dist/visio/edit-page-decoration.d.ts +14 -0
  132. package/dist/visio/edit-page-decoration.d.ts.map +1 -0
  133. package/dist/visio/edit-page-setup-commands.d.ts +57 -0
  134. package/dist/visio/edit-page-setup-commands.d.ts.map +1 -0
  135. package/dist/visio/edit-page-setup.d.ts +13 -0
  136. package/dist/visio/edit-page-setup.d.ts.map +1 -0
  137. package/dist/visio/edit-page-size.d.ts +4 -0
  138. package/dist/visio/edit-page-size.d.ts.map +1 -1
  139. package/dist/visio/edit-page-theme-commands.d.ts +15 -0
  140. package/dist/visio/edit-page-theme-commands.d.ts.map +1 -0
  141. package/dist/visio/edit-page-theme-recolor.d.ts +3 -0
  142. package/dist/visio/edit-page-theme-recolor.d.ts.map +1 -0
  143. package/dist/visio/edit-page-theme.d.ts +10 -0
  144. package/dist/visio/edit-page-theme.d.ts.map +1 -0
  145. package/dist/visio/edit-pages.d.ts.map +1 -1
  146. package/dist/visio/edit-path-commands.d.ts +19 -0
  147. package/dist/visio/edit-path-commands.d.ts.map +1 -0
  148. package/dist/visio/edit-path-create.d.ts +23 -0
  149. package/dist/visio/edit-path-create.d.ts.map +1 -0
  150. package/dist/visio/edit-picture.d.ts +7 -0
  151. package/dist/visio/edit-picture.d.ts.map +1 -0
  152. package/dist/visio/edit-recalculate-index.d.ts +2 -0
  153. package/dist/visio/edit-recalculate-index.d.ts.map +1 -1
  154. package/dist/visio/edit-resize-anchor.d.ts +1 -1
  155. package/dist/visio/edit-resize-anchor.d.ts.map +1 -1
  156. package/dist/visio/edit-scope.d.ts.map +1 -1
  157. package/dist/visio/edit-shape-create.d.ts +8 -0
  158. package/dist/visio/edit-shape-create.d.ts.map +1 -1
  159. package/dist/visio/edit-shape-data-commands.d.ts +34 -0
  160. package/dist/visio/edit-shape-data-commands.d.ts.map +1 -0
  161. package/dist/visio/edit-shape-data.d.ts +22 -0
  162. package/dist/visio/edit-shape-data.d.ts.map +1 -0
  163. package/dist/visio/edit-shape-order.d.ts.map +1 -1
  164. package/dist/visio/edit-subprocess-commands.d.ts +27 -0
  165. package/dist/visio/edit-subprocess-commands.d.ts.map +1 -0
  166. package/dist/visio/edit-subprocess.d.ts +9 -0
  167. package/dist/visio/edit-subprocess.d.ts.map +1 -0
  168. package/dist/visio/edit-text-field-commands.d.ts +21 -0
  169. package/dist/visio/edit-text-field-commands.d.ts.map +1 -0
  170. package/dist/visio/edit-text-field.d.ts +5 -0
  171. package/dist/visio/edit-text-field.d.ts.map +1 -0
  172. package/dist/visio/edit-text-range-plan.d.ts.map +1 -1
  173. package/dist/visio/edit-text-ranges.d.ts.map +1 -1
  174. package/dist/visio/edit-text.d.ts.map +1 -1
  175. package/dist/visio/edit.d.ts +2 -1
  176. package/dist/visio/edit.d.ts.map +1 -1
  177. package/dist/visio/effects.d.ts +13 -0
  178. package/dist/visio/effects.d.ts.map +1 -0
  179. package/dist/visio/formula-evaluate.d.ts.map +1 -1
  180. package/dist/visio/index.cjs +26474 -19318
  181. package/dist/visio/index.d.ts +25 -1
  182. package/dist/visio/index.d.ts.map +1 -1
  183. package/dist/visio/index.mjs +26406 -19319
  184. package/dist/visio/model.d.ts +125 -0
  185. package/dist/visio/model.d.ts.map +1 -1
  186. package/dist/visio/page-decoration.d.ts +66 -0
  187. package/dist/visio/page-decoration.d.ts.map +1 -0
  188. package/dist/visio/page-scale.d.ts.map +1 -1
  189. package/dist/visio/page-setup.d.ts +8 -0
  190. package/dist/visio/page-setup.d.ts.map +1 -0
  191. package/dist/visio/page-theme.d.ts +9 -0
  192. package/dist/visio/page-theme.d.ts.map +1 -0
  193. package/dist/visio/paper-sizes.d.ts +24 -0
  194. package/dist/visio/paper-sizes.d.ts.map +1 -0
  195. package/dist/visio/parser.d.ts.map +1 -1
  196. package/dist/visio/path-fit.d.ts +69 -0
  197. package/dist/visio/path-fit.d.ts.map +1 -0
  198. package/dist/visio/shadow.d.ts +9 -0
  199. package/dist/visio/shadow.d.ts.map +1 -0
  200. package/dist/visio/shape-connections.d.ts +5 -0
  201. package/dist/visio/shape-connections.d.ts.map +1 -0
  202. package/dist/visio/shape-metadata.d.ts +3 -0
  203. package/dist/visio/shape-metadata.d.ts.map +1 -1
  204. package/dist/visio/shape-structure.d.ts +10 -0
  205. package/dist/visio/shape-structure.d.ts.map +1 -0
  206. package/dist/visio/shapes.d.ts.map +1 -1
  207. package/dist/visio/stencil-shapes.d.ts +20 -0
  208. package/dist/visio/stencil-shapes.d.ts.map +1 -0
  209. package/dist/visio/stencils.d.ts +30 -0
  210. package/dist/visio/stencils.d.ts.map +1 -0
  211. package/dist/visio/style.d.ts +3 -0
  212. package/dist/visio/style.d.ts.map +1 -1
  213. package/dist/visio/text-character.d.ts +5 -0
  214. package/dist/visio/text-character.d.ts.map +1 -0
  215. package/dist/visio/text-field-context.d.ts +6 -0
  216. package/dist/visio/text-field-context.d.ts.map +1 -0
  217. package/dist/visio/text-field-display.d.ts +12 -0
  218. package/dist/visio/text-field-display.d.ts.map +1 -0
  219. package/dist/visio/text-fields.d.ts +65 -0
  220. package/dist/visio/text-fields.d.ts.map +1 -0
  221. package/dist/visio/theme-builtins.d.ts +32 -0
  222. package/dist/visio/theme-builtins.d.ts.map +1 -0
  223. package/dist/visio/theme-write.d.ts +4 -0
  224. package/dist/visio/theme-write.d.ts.map +1 -0
  225. package/dist/visio/theme.d.ts +2 -0
  226. package/dist/visio/theme.d.ts.map +1 -1
  227. package/dist/visio/ui/auto-layout.d.ts +38 -0
  228. package/dist/visio/ui/auto-layout.d.ts.map +1 -0
  229. package/dist/visio/ui/change-case.d.ts +12 -0
  230. package/dist/visio/ui/change-case.d.ts.map +1 -0
  231. package/dist/visio/ui/connection-points.d.ts +45 -0
  232. package/dist/visio/ui/connection-points.d.ts.map +1 -0
  233. package/dist/visio/ui/connector-preview.d.ts +24 -0
  234. package/dist/visio/ui/connector-preview.d.ts.map +1 -0
  235. package/dist/visio/ui/data-graphic-rules.d.ts +45 -0
  236. package/dist/visio/ui/data-graphic-rules.d.ts.map +1 -0
  237. package/dist/visio/ui/data-graphics.d.ts +15 -0
  238. package/dist/visio/ui/data-graphics.d.ts.map +1 -0
  239. package/dist/visio/ui/data-table.d.ts +33 -0
  240. package/dist/visio/ui/data-table.d.ts.map +1 -0
  241. package/dist/visio/ui/diagram-check.d.ts +32 -0
  242. package/dist/visio/ui/diagram-check.d.ts.map +1 -0
  243. package/dist/visio/ui/diagram-parts.d.ts +20 -0
  244. package/dist/visio/ui/diagram-parts.d.ts.map +1 -0
  245. package/dist/visio/ui/draw-path-plan.d.ts +21 -0
  246. package/dist/visio/ui/draw-path-plan.d.ts.map +1 -0
  247. package/dist/visio/ui/draw-plan.d.ts +11 -3
  248. package/dist/visio/ui/draw-plan.d.ts.map +1 -1
  249. package/dist/visio/ui/edit-commands.d.ts.map +1 -1
  250. package/dist/visio/ui/format-painter.d.ts +25 -0
  251. package/dist/visio/ui/format-painter.d.ts.map +1 -0
  252. package/dist/visio/ui/guides.d.ts +34 -0
  253. package/dist/visio/ui/guides.d.ts.map +1 -0
  254. package/dist/visio/ui/index.cjs +8006 -2705
  255. package/dist/visio/ui/index.d.ts +25 -0
  256. package/dist/visio/ui/index.d.ts.map +1 -1
  257. package/dist/visio/ui/index.mjs +7894 -2706
  258. package/dist/visio/ui/insert.d.ts +26 -0
  259. package/dist/visio/ui/insert.d.ts.map +1 -0
  260. package/dist/visio/ui/layer-assign.d.ts +31 -0
  261. package/dist/visio/ui/layer-assign.d.ts.map +1 -0
  262. package/dist/visio/ui/page-edit.d.ts.map +1 -1
  263. package/dist/visio/ui/page-setup.d.ts +50 -0
  264. package/dist/visio/ui/page-setup.d.ts.map +1 -0
  265. package/dist/visio/ui/page-size.d.ts +2 -11
  266. package/dist/visio/ui/page-size.d.ts.map +1 -1
  267. package/dist/visio/ui/paste-text.d.ts +13 -0
  268. package/dist/visio/ui/paste-text.d.ts.map +1 -0
  269. package/dist/visio/ui/scene-data.d.ts +4 -0
  270. package/dist/visio/ui/scene-data.d.ts.map +1 -0
  271. package/dist/visio/ui/scene-details.d.ts.map +1 -1
  272. package/dist/visio/ui/scene-validation-text.d.ts +8 -0
  273. package/dist/visio/ui/scene-validation-text.d.ts.map +1 -0
  274. package/dist/visio/ui/scene-validation.d.ts.map +1 -1
  275. package/dist/visio/ui/select-by-type.d.ts +35 -0
  276. package/dist/visio/ui/select-by-type.d.ts.map +1 -0
  277. package/dist/visio/ui/shape-arrange.d.ts.map +1 -1
  278. package/dist/visio/ui/shape-change.d.ts +11 -0
  279. package/dist/visio/ui/shape-change.d.ts.map +1 -0
  280. package/dist/visio/ui/shape-effects.d.ts +14 -0
  281. package/dist/visio/ui/shape-effects.d.ts.map +1 -0
  282. package/dist/visio/ui/shape-formatting.d.ts +5 -0
  283. package/dist/visio/ui/shape-formatting.d.ts.map +1 -1
  284. package/dist/visio/ui/shape-group.d.ts +9 -0
  285. package/dist/visio/ui/shape-group.d.ts.map +1 -0
  286. package/dist/visio/ui/shape-move.d.ts +5 -2
  287. package/dist/visio/ui/shape-move.d.ts.map +1 -1
  288. package/dist/visio/ui/shape-report.d.ts +37 -0
  289. package/dist/visio/ui/shape-report.d.ts.map +1 -0
  290. package/dist/visio/ui/shape-resize.d.ts.map +1 -1
  291. package/dist/visio/ui/shape-rotation.d.ts.map +1 -1
  292. package/dist/visio/ui/snapshot-scene.d.ts.map +1 -1
  293. package/dist/visio/ui/subprocess.d.ts +13 -0
  294. package/dist/visio/ui/subprocess.d.ts.map +1 -0
  295. package/dist/visio/ui/text-block.d.ts +42 -0
  296. package/dist/visio/ui/text-block.d.ts.map +1 -0
  297. package/dist/visio/ui/text-dialog.d.ts +54 -0
  298. package/dist/visio/ui/text-dialog.d.ts.map +1 -0
  299. package/dist/visio/ui/text-draft.d.ts +25 -0
  300. package/dist/visio/ui/text-draft.d.ts.map +1 -0
  301. package/dist/visio/ui/text-field-catalog.d.ts +17 -0
  302. package/dist/visio/ui/text-field-catalog.d.ts.map +1 -0
  303. package/package.json +1 -1
@@ -15476,11 +15476,11 @@ function createRotationDrag(center, startPointer, startRotation, options = {}) {
15476
15476
 
15477
15477
  // geometry/rotate-handle-placement.ts
15478
15478
  function resolveRotateHandlePlacement(input) {
15479
- const { preferred, selection, bounds, hitWidth, hitHeight, obstacles } = input;
15479
+ const { preferred, selection, bounds: bounds2, hitWidth, hitHeight, obstacles } = input;
15480
15480
  if (![
15481
15481
  ...Object.values(preferred),
15482
15482
  ...Object.values(selection),
15483
- ...Object.values(bounds),
15483
+ ...Object.values(bounds2),
15484
15484
  hitWidth,
15485
15485
  hitHeight
15486
15486
  ].every(Number.isFinite) || hitWidth <= 0 || hitHeight <= 0) {
@@ -15494,7 +15494,7 @@ function resolveRotateHandlePlacement(input) {
15494
15494
  };
15495
15495
  const fits = ({ x, y }) => {
15496
15496
  const rect2 = { left: x - halfX, right: x + halfX, top: y - halfY, bottom: y + halfY };
15497
- return rect2.left >= bounds.left + 1 && rect2.right <= bounds.right - 1 && rect2.top >= bounds.top + 1 && rect2.bottom <= bounds.bottom - 1 && // A target over the rotation center has no usable initial bearing.
15497
+ return rect2.left >= bounds2.left + 1 && rect2.right <= bounds2.right - 1 && rect2.top >= bounds2.top + 1 && rect2.bottom <= bounds2.bottom - 1 && // A target over the rotation center has no usable initial bearing.
15498
15498
  !(center.x >= rect2.left && center.x <= rect2.right && center.y >= rect2.top && center.y <= rect2.bottom) && !obstacles.some(
15499
15499
  (other) => rect2.left < other.right + 2 && rect2.right > other.left - 2 && rect2.top < other.bottom + 2 && rect2.bottom > other.top - 2
15500
15500
  );
@@ -15522,10 +15522,10 @@ function resolveRotateHandlePlacement(input) {
15522
15522
  { x: center.x, y: selection.bottom + padY },
15523
15523
  { x: selection.left - padX, y: center.y }
15524
15524
  ];
15525
- const left = Math.max(selection.left, bounds.left) + halfX + 3;
15526
- const right = Math.min(selection.right, bounds.right) - halfX - 3;
15527
- const top = Math.max(selection.top, bounds.top) + halfY + 3;
15528
- const bottom = Math.min(selection.bottom, bounds.bottom) - halfY - 3;
15525
+ const left = Math.max(selection.left, bounds2.left) + halfX + 3;
15526
+ const right = Math.min(selection.right, bounds2.right) - halfX - 3;
15527
+ const top = Math.max(selection.top, bounds2.top) + halfY + 3;
15528
+ const bottom = Math.min(selection.bottom, bounds2.bottom) - halfY - 3;
15529
15529
  if (left <= right && top <= bottom) {
15530
15530
  for (const fraction of [0.25, 0.75]) {
15531
15531
  const x = left + (right - left) * fraction;
@@ -15539,4 +15539,355 @@ function resolveRotateHandlePlacement(input) {
15539
15539
  })[0] ?? null;
15540
15540
  }
15541
15541
 
15542
- export { ACTION_BUTTON_CONNECTION_SITES, ACTION_BUTTON_PRESET_DEFINITIONS, ACTION_BUTTON_TEXT_RECTS, ANGLE_SCALE, ARROW_CALLOUT_CONNECTION_SITES, ARROW_CALLOUT_PRESET_DEFINITIONS, ARROW_CONNECTION_SITES, ARROW_PRESET_DEFINITIONS, ARROW_TEXT_RECTS, BASIC_SHAPE_CONNECTION_SITES_A, BASIC_SHAPE_CONNECTION_SITES_B, BRACE_CONNECTION_SITES, BRACE_TEXT_RECTS, CALLOUT_CONNECTION_SITES, CALLOUT_TEXT_RECTS, CARDINAL_SITES, CHART_MARK_PRESET_DEFINITIONS, CIRCULAR_ARROW_CONNECTION_SITES, CIRCULAR_ARROW_TEXT_RECTS, CLIP_PATHS_CORE, CLIP_PATHS_EXTENDED, CLOUD_CALLOUT_PRESET_DEFINITIONS, CLOUD_CALLOUT_TAIL_COUNT, CLOUD_LOBE_COUNT, COM_AVLST_GROUND_TRUTH, CONNECTORS_BRACKETS_PRESET_DEFINITIONS, CURVED_ARROWS_CONNECTORS_PRESET_DEFINITIONS, CURVED_ARROW_CONNECTION_SITES, EPSILON, EXACT_CURVED_ARROW_PRESET_DEFINITIONS, EXTENDED_SHAPE_DEFINITIONS, FLOWCHART_CONNECTION_SITES, FLOWCHART_PRESET_DEFINITIONS, FLOWCHART_TEXT_RECTS, GEAR9_CONNECTION_SITES, IDENTITY_AFFINE, LEFT_CIRCULAR_ARROW_CONNECTION_SITES, LEFT_RIGHT_CIRCULAR_ARROW_CONNECTION_SITES, MATH_SYMBOL_CONNECTION_SITES, MISC_ARROW_CONNECTION_SITES, MISC_PRESET_DEFINITIONS, MISC_SHAPE_CONNECTION_SITES, MISC_TEXT_RECTS_A, MISC_TEXT_RECTS_B, POLYGON_CONNECTION_SITES, POLYGON_TEXT_RECTS, PRESET_GEOMETRY_ALIASES, PRESET_SHAPE_CATEGORY_LABELS, PRESET_SHAPE_CLIP_PATHS, PRESET_SHAPE_DEFINITIONS, PRESET_SHAPE_GEOMETRY_TABLE, PRIMARY_SHAPE_DEFINITIONS, QUAD_CONNECTION_SITES, QUAD_TEXT_RECTS, RECTS_SNIPS_PRESET_DEFINITIONS, RECT_VARIANT_CONNECTION_SITES, REFINED_ARROW_PRESET_DEFINITIONS, RIBBON_CONNECTION_SITES, RIBBON_TEXT_RECTS, SCROLLS_ACCENT_CALLOUTS_PRESET_DEFINITIONS, SNAP_THRESHOLD, STAR_CONNECTION_SITES, STAR_TEXT_RECTS, ST_SHAPE_TYPE_VALUES, TABS_DECORATIONS_PRESET_DEFINITIONS, TAB_CONNECTION_SITES, TAB_TEXT_RECTS, _internalForTests, alignElements, angleToRadians, at, buildCalloutLeaderLineSvgPath, clipPolygons, combineShapes, composeAffine, computeAlign, computeDistribute, computeRotation, computeSnap, computeSnapToShape, computeUnionWalk, convexHull, createBuiltinVariables, createRotationDrag, cross2, curvedElbowPathD, cxn, dedupPoly, distributeElements, elbowCurveSegments, elbowSegmentCount, elbowWaypoints, ensureCCW, ensureCW, evaluateFormula, evaluateGuides, findAllIntersections, flattenSvgPath, fmtNum, fragmentShapes, gd, gear6, gear9, getAdjustmentAwareClipPath, getCalloutLeaderLineGeometry, getCalloutTier, getCalloutViewBoxBounds, getCloudCalloutClipPath, getCloudClipPath, getPresetConnectionSites, getPresetShapeClipPath, getPresetTextRect, insertIntersections, intersectPolygons, intersectShapes, intersectSvgPaths, isCalloutShape, isConvex, isHorizontalPrimaryAxis, isStShapeType, lineIntersection, lookupPresetConnectionSites, lookupPresetTextRectOverride, mergeOverlappingPolygons, mergeShapes, normalizeStShapeType, parseAdjustmentValues, parseFormula, parseGuideDefinitions, pointInPolygon, pointInTriangle, polygonArea, polygonsToSvgPath, resolveAlignReferenceBox, resolveCoordinate, resolveOperand, resolveRotateHandlePlacement, segmentIntersection, signedArea, snapBox, snapToGridStep, snapValue, subtractPolygons, subtractShapes, subtractSvgPaths, sutherlandHodgman, svgPathToPolygons, triangulate, unionPolygons, unionShapes, unionSvgPaths, usesSlideReference, vec2Eq };
15542
+ // geometry/graph-layout.ts
15543
+ var GRAPH_LAYOUT_STYLES = [
15544
+ "flowchart-tb",
15545
+ "flowchart-lr",
15546
+ "hierarchy",
15547
+ "compact-tree",
15548
+ "circular"
15549
+ ];
15550
+ function components(graph) {
15551
+ const seen = /* @__PURE__ */ new Set();
15552
+ const connected = [];
15553
+ const isolated = [];
15554
+ for (const node of graph.nodes) {
15555
+ if (seen.has(node.id)) continue;
15556
+ const ids = [];
15557
+ const stack = [node.id];
15558
+ seen.add(node.id);
15559
+ while (stack.length) {
15560
+ const id = stack.pop();
15561
+ ids.push(id);
15562
+ for (const next of [...graph.out.get(id), ...graph.into.get(id)])
15563
+ if (!seen.has(next)) {
15564
+ seen.add(next);
15565
+ stack.push(next);
15566
+ }
15567
+ }
15568
+ if (ids.length === 1) isolated.push(node.id);
15569
+ else {
15570
+ const order = new Map(graph.nodes.map((entry, index) => [entry.id, index]));
15571
+ connected.push(ids.sort((a, b) => order.get(a) - order.get(b)));
15572
+ }
15573
+ }
15574
+ return { connected, isolated };
15575
+ }
15576
+ function roots(ids, graph) {
15577
+ const found = ids.filter((id) => !graph.into.get(id).some((from) => ids.includes(from)));
15578
+ return found.length ? found : [ids[0]];
15579
+ }
15580
+ function forwardEdges(ids, graph) {
15581
+ const state = /* @__PURE__ */ new Map();
15582
+ const forward = new Map(ids.map((id) => [id, []]));
15583
+ const visit = (start) => {
15584
+ const stack = [{ id: start, next: 0 }];
15585
+ state.set(start, 1);
15586
+ while (stack.length) {
15587
+ const top = stack.at(-1);
15588
+ const targets = graph.out.get(top.id);
15589
+ if (top.next >= targets.length) {
15590
+ state.set(top.id, 2);
15591
+ stack.pop();
15592
+ continue;
15593
+ }
15594
+ const target = targets[top.next++];
15595
+ const mark = state.get(target);
15596
+ if (mark === 1) continue;
15597
+ forward.get(top.id).push(target);
15598
+ if (mark === void 0) {
15599
+ state.set(target, 1);
15600
+ stack.push({ id: target, next: 0 });
15601
+ }
15602
+ }
15603
+ };
15604
+ for (const root of roots(ids, graph)) if (!state.has(root)) visit(root);
15605
+ for (const id of ids) if (!state.has(id)) visit(id);
15606
+ return forward;
15607
+ }
15608
+ function layers(ids, forward, shortest) {
15609
+ const rank = /* @__PURE__ */ new Map();
15610
+ const incoming = new Map(ids.map((id) => [id, 0]));
15611
+ for (const targets of forward.values())
15612
+ for (const target of targets) incoming.set(target, incoming.get(target) + 1);
15613
+ const queue = ids.filter((id) => incoming.get(id) === 0);
15614
+ for (const id of queue) rank.set(id, 0);
15615
+ for (let index = 0; index < queue.length; index++) {
15616
+ const id = queue[index];
15617
+ for (const target of forward.get(id)) {
15618
+ const candidate = rank.get(id) + 1;
15619
+ if (shortest) {
15620
+ if (!rank.has(target)) rank.set(target, candidate);
15621
+ } else rank.set(target, Math.max(rank.get(target) ?? 0, candidate));
15622
+ incoming.set(target, incoming.get(target) - 1);
15623
+ if (incoming.get(target) === 0) queue.push(target);
15624
+ }
15625
+ }
15626
+ const result = [];
15627
+ for (const id of ids) {
15628
+ const level = rank.get(id) ?? 0;
15629
+ (result[level] ??= []).push(id);
15630
+ }
15631
+ return result.filter((layer) => layer.length);
15632
+ }
15633
+ function orderLayers(layered, graph) {
15634
+ const result = layered.map((layer) => [...layer]);
15635
+ const position = /* @__PURE__ */ new Map();
15636
+ const index = () => result.forEach((layer) => layer.forEach((id, at2) => position.set(id, at2)));
15637
+ index();
15638
+ for (let sweep = 0; sweep < 4; sweep++) {
15639
+ const down = sweep % 2 === 0;
15640
+ const range = down ? result.map((_, at2) => at2).slice(1) : result.map((_, at2) => at2).slice(0, -1).reverse();
15641
+ for (const at2 of range) {
15642
+ const neighbour = new Set(result[down ? at2 - 1 : at2 + 1]);
15643
+ const weight = (id) => {
15644
+ const linked = [...graph.out.get(id), ...graph.into.get(id)].filter(
15645
+ (other) => neighbour.has(other)
15646
+ );
15647
+ return linked.length ? linked.reduce((sum, other) => sum + position.get(other), 0) / linked.length : position.get(id);
15648
+ };
15649
+ const weights = new Map(result[at2].map((id) => [id, weight(id)]));
15650
+ result[at2].sort(
15651
+ (a, b) => weights.get(a) - weights.get(b) || position.get(a) - position.get(b)
15652
+ );
15653
+ index();
15654
+ }
15655
+ }
15656
+ return result;
15657
+ }
15658
+ function placeLayers(ordered, size, horizontal, spacing, layerSpacing) {
15659
+ const placed = [];
15660
+ const along = (node) => horizontal ? node.width : node.height;
15661
+ const across = (node) => horizontal ? node.height : node.width;
15662
+ let cursor = 0;
15663
+ for (const layer of ordered) {
15664
+ const nodes = layer.map((id) => size.get(id));
15665
+ const depth = Math.max(...nodes.map(along));
15666
+ const span = nodes.reduce((sum, node) => sum + across(node), 0) + spacing * (nodes.length - 1);
15667
+ let offset = -span / 2;
15668
+ for (const node of nodes) {
15669
+ const centre = offset + across(node) / 2;
15670
+ const primary = cursor + depth / 2;
15671
+ placed.push({
15672
+ id: node.id,
15673
+ x: horizontal ? primary : centre,
15674
+ y: horizontal ? centre : primary,
15675
+ width: node.width,
15676
+ height: node.height
15677
+ });
15678
+ offset += across(node) + spacing;
15679
+ }
15680
+ cursor += depth + layerSpacing;
15681
+ }
15682
+ return placed;
15683
+ }
15684
+ function placeCompactTree(ids, forward, graph, size, spacing, layerSpacing) {
15685
+ const placed = [];
15686
+ const seen = /* @__PURE__ */ new Set();
15687
+ const indent = Math.max(...ids.map((id) => size.get(id).width)) / 2 + layerSpacing / 2;
15688
+ let y = 0;
15689
+ const visit = (start) => {
15690
+ const stack = [{ id: start, depth: 0 }];
15691
+ while (stack.length) {
15692
+ const { id, depth } = stack.pop();
15693
+ if (seen.has(id)) continue;
15694
+ seen.add(id);
15695
+ const node = size.get(id);
15696
+ placed.push({
15697
+ id,
15698
+ x: depth * indent + node.width / 2,
15699
+ y: y + node.height / 2,
15700
+ width: node.width,
15701
+ height: node.height
15702
+ });
15703
+ y += node.height + spacing;
15704
+ const children = forward.get(id).filter((child) => !seen.has(child));
15705
+ for (const child of children.reverse()) stack.push({ id: child, depth: depth + 1 });
15706
+ }
15707
+ };
15708
+ for (const root of roots(ids, graph)) visit(root);
15709
+ for (const id of ids) visit(id);
15710
+ return placed;
15711
+ }
15712
+ function placeCircle(ids, forward, size, spacing) {
15713
+ const order = [];
15714
+ const seen = /* @__PURE__ */ new Set();
15715
+ for (const start of ids) {
15716
+ const stack = [start];
15717
+ while (stack.length) {
15718
+ const id = stack.pop();
15719
+ if (seen.has(id)) continue;
15720
+ seen.add(id);
15721
+ order.push(id);
15722
+ stack.push(...[...forward.get(id)].reverse());
15723
+ }
15724
+ }
15725
+ const extent = (id) => Math.hypot(size.get(id).width, size.get(id).height);
15726
+ const circumference = order.reduce((sum, id) => sum + extent(id) + spacing, 0);
15727
+ const radius = Math.max(circumference / (2 * Math.PI), Math.max(...order.map(extent)));
15728
+ return order.map((id, index) => {
15729
+ const angle = -Math.PI / 2 + 2 * Math.PI * index / order.length;
15730
+ const node = size.get(id);
15731
+ return {
15732
+ id,
15733
+ x: radius * Math.cos(angle),
15734
+ y: radius * Math.sin(angle),
15735
+ width: node.width,
15736
+ height: node.height
15737
+ };
15738
+ });
15739
+ }
15740
+ function bounds(placed) {
15741
+ const left = Math.min(...placed.map((box) => box.x - box.width / 2));
15742
+ const top = Math.min(...placed.map((box) => box.y - box.height / 2));
15743
+ const right = Math.max(...placed.map((box) => box.x + box.width / 2));
15744
+ const bottom = Math.max(...placed.map((box) => box.y + box.height / 2));
15745
+ return { left, top, width: right - left, height: bottom - top };
15746
+ }
15747
+ function placeGrid(ids, size, spacing) {
15748
+ const columns = Math.ceil(Math.sqrt(ids.length));
15749
+ const cellWidth = Math.max(...ids.map((id) => size.get(id).width));
15750
+ const cellHeight = Math.max(...ids.map((id) => size.get(id).height));
15751
+ return ids.map((id, index) => ({
15752
+ id,
15753
+ x: index % columns * (cellWidth + spacing) + cellWidth / 2,
15754
+ y: Math.floor(index / columns) * (cellHeight + spacing) + cellHeight / 2,
15755
+ width: size.get(id).width,
15756
+ height: size.get(id).height
15757
+ }));
15758
+ }
15759
+ function layoutGraph(nodes, edges, style, options = {}) {
15760
+ if (!GRAPH_LAYOUT_STYLES.includes(style)) throw new Error("Unknown graph layout style.");
15761
+ const spacing = options.spacing ?? 0.5;
15762
+ const layerSpacing = options.layerSpacing ?? spacing;
15763
+ if (![spacing, layerSpacing].every((value) => Number.isFinite(value) && value >= 0))
15764
+ throw new Error("Layout spacing must be finite and not negative.");
15765
+ const size = /* @__PURE__ */ new Map();
15766
+ for (const node of nodes) {
15767
+ if (size.has(node.id)) throw new Error("Layout node IDs must be unique.");
15768
+ if (![node.width, node.height].every((value) => Number.isFinite(value) && value >= 0))
15769
+ throw new Error("Layout node sizes must be finite and not negative.");
15770
+ size.set(node.id, node);
15771
+ }
15772
+ const graph = {
15773
+ nodes,
15774
+ out: new Map(nodes.map((node) => [node.id, []])),
15775
+ into: new Map(nodes.map((node) => [node.id, []]))
15776
+ };
15777
+ for (const edge of edges) {
15778
+ if (!size.has(edge.from) || !size.has(edge.to) || edge.from === edge.to) continue;
15779
+ if (graph.out.get(edge.from).includes(edge.to)) continue;
15780
+ graph.out.get(edge.from).push(edge.to);
15781
+ graph.into.get(edge.to).push(edge.from);
15782
+ }
15783
+ const { connected, isolated } = components(graph);
15784
+ const horizontal = style === "flowchart-lr";
15785
+ const blocks = connected.map((ids) => {
15786
+ const forward = forwardEdges(ids, graph);
15787
+ if (style === "circular") return placeCircle(ids, forward, size, spacing);
15788
+ if (style === "compact-tree")
15789
+ return placeCompactTree(ids, forward, graph, size, spacing, layerSpacing);
15790
+ const ordered = orderLayers(layers(ids, forward, style === "hierarchy"), graph);
15791
+ return placeLayers(ordered, size, horizontal, spacing, layerSpacing);
15792
+ });
15793
+ const result = /* @__PURE__ */ new Map();
15794
+ let cursor = 0;
15795
+ let extent = 0;
15796
+ for (const block of blocks) {
15797
+ const box = bounds(block);
15798
+ for (const item of block)
15799
+ result.set(item.id, {
15800
+ x: item.x - box.left + (horizontal ? 0 : cursor),
15801
+ y: item.y - box.top + (horizontal ? cursor : 0)
15802
+ });
15803
+ cursor += (horizontal ? box.height : box.width) + spacing * 2;
15804
+ extent = Math.max(extent, horizontal ? box.width : box.height);
15805
+ }
15806
+ if (isolated.length) {
15807
+ const grid = placeGrid(isolated, size, spacing);
15808
+ const offset = blocks.length ? extent + layerSpacing * 2 : 0;
15809
+ for (const item of grid)
15810
+ result.set(item.id, {
15811
+ x: item.x + (horizontal ? offset : 0),
15812
+ y: item.y + (horizontal ? 0 : offset)
15813
+ });
15814
+ }
15815
+ return result;
15816
+ }
15817
+
15818
+ // geometry/auto-align.ts
15819
+ var median = (values) => {
15820
+ const sorted = [...values].sort((a, b) => a - b);
15821
+ const middle = Math.floor(sorted.length / 2);
15822
+ return sorted.length % 2 ? sorted[middle] : (sorted[middle - 1] + sorted[middle]) / 2;
15823
+ };
15824
+ function clusters(boxes, centre, tolerance) {
15825
+ const sorted = [...boxes].sort((a, b) => centre(a) - centre(b));
15826
+ const result = [];
15827
+ let mean = 0;
15828
+ for (const box of sorted) {
15829
+ const current = result.at(-1);
15830
+ if (current && Math.abs(centre(box) - mean) <= tolerance) {
15831
+ current.push(box);
15832
+ mean += (centre(box) - mean) / current.length;
15833
+ } else {
15834
+ result.push([box]);
15835
+ mean = centre(box);
15836
+ }
15837
+ }
15838
+ return result;
15839
+ }
15840
+ function space(groups, start, size, minimumGap) {
15841
+ const extents = groups.map((group) => {
15842
+ const centre = group.reduce((sum, box) => sum + start(box) + size(box) / 2, 0) / group.length;
15843
+ const half = Math.max(...group.map((box) => size(box) / 2));
15844
+ return { centre, half };
15845
+ });
15846
+ const gaps = extents.slice(1).map(
15847
+ (extent, index) => extent.centre - extent.half - extents[index].centre - extents[index].half
15848
+ );
15849
+ const gap = Math.max(
15850
+ minimumGap,
15851
+ gaps.length ? gaps.reduce((sum, value) => sum + value, 0) / gaps.length : 0
15852
+ );
15853
+ const result = /* @__PURE__ */ new Map();
15854
+ let cursor = extents[0] ? extents[0].centre - extents[0].half : 0;
15855
+ groups.forEach((group, index) => {
15856
+ const { half } = extents[index];
15857
+ for (const box of group) result.set(box.id, cursor + half);
15858
+ cursor += half * 2 + gap;
15859
+ });
15860
+ return result;
15861
+ }
15862
+ function autoAlignBoxes(boxes, options = {}) {
15863
+ if (new Set(boxes.map((box) => box.id)).size !== boxes.length)
15864
+ throw new Error("Auto align box IDs must be unique.");
15865
+ if (!boxes.every(
15866
+ (box) => [box.x, box.y, box.width, box.height].every((value) => Number.isFinite(value))
15867
+ ))
15868
+ throw new Error("Auto align boxes must be finite.");
15869
+ const result = /* @__PURE__ */ new Map();
15870
+ if (!boxes.length) return result;
15871
+ const toleranceX = options.tolerance?.x ?? median(boxes.map((box) => box.width)) / 2;
15872
+ const toleranceY = options.tolerance?.y ?? median(boxes.map((box) => box.height)) / 2;
15873
+ const minimumGap = options.minimumGap ?? 0;
15874
+ const rows = clusters(boxes, (box) => box.y + box.height / 2, toleranceY);
15875
+ const columns = clusters(boxes, (box) => box.x + box.width / 2, toleranceX);
15876
+ const ys = space(
15877
+ rows,
15878
+ (box) => box.y,
15879
+ (box) => box.height,
15880
+ minimumGap
15881
+ );
15882
+ const xs = space(
15883
+ columns,
15884
+ (box) => box.x,
15885
+ (box) => box.width,
15886
+ minimumGap
15887
+ );
15888
+ for (const box of boxes)
15889
+ result.set(box.id, { x: xs.get(box.id) - box.width / 2, y: ys.get(box.id) - box.height / 2 });
15890
+ return result;
15891
+ }
15892
+
15893
+ export { ACTION_BUTTON_CONNECTION_SITES, ACTION_BUTTON_PRESET_DEFINITIONS, ACTION_BUTTON_TEXT_RECTS, ANGLE_SCALE, ARROW_CALLOUT_CONNECTION_SITES, ARROW_CALLOUT_PRESET_DEFINITIONS, ARROW_CONNECTION_SITES, ARROW_PRESET_DEFINITIONS, ARROW_TEXT_RECTS, BASIC_SHAPE_CONNECTION_SITES_A, BASIC_SHAPE_CONNECTION_SITES_B, BRACE_CONNECTION_SITES, BRACE_TEXT_RECTS, CALLOUT_CONNECTION_SITES, CALLOUT_TEXT_RECTS, CARDINAL_SITES, CHART_MARK_PRESET_DEFINITIONS, CIRCULAR_ARROW_CONNECTION_SITES, CIRCULAR_ARROW_TEXT_RECTS, CLIP_PATHS_CORE, CLIP_PATHS_EXTENDED, CLOUD_CALLOUT_PRESET_DEFINITIONS, CLOUD_CALLOUT_TAIL_COUNT, CLOUD_LOBE_COUNT, COM_AVLST_GROUND_TRUTH, CONNECTORS_BRACKETS_PRESET_DEFINITIONS, CURVED_ARROWS_CONNECTORS_PRESET_DEFINITIONS, CURVED_ARROW_CONNECTION_SITES, EPSILON, EXACT_CURVED_ARROW_PRESET_DEFINITIONS, EXTENDED_SHAPE_DEFINITIONS, FLOWCHART_CONNECTION_SITES, FLOWCHART_PRESET_DEFINITIONS, FLOWCHART_TEXT_RECTS, GEAR9_CONNECTION_SITES, GRAPH_LAYOUT_STYLES, IDENTITY_AFFINE, LEFT_CIRCULAR_ARROW_CONNECTION_SITES, LEFT_RIGHT_CIRCULAR_ARROW_CONNECTION_SITES, MATH_SYMBOL_CONNECTION_SITES, MISC_ARROW_CONNECTION_SITES, MISC_PRESET_DEFINITIONS, MISC_SHAPE_CONNECTION_SITES, MISC_TEXT_RECTS_A, MISC_TEXT_RECTS_B, POLYGON_CONNECTION_SITES, POLYGON_TEXT_RECTS, PRESET_GEOMETRY_ALIASES, PRESET_SHAPE_CATEGORY_LABELS, PRESET_SHAPE_CLIP_PATHS, PRESET_SHAPE_DEFINITIONS, PRESET_SHAPE_GEOMETRY_TABLE, PRIMARY_SHAPE_DEFINITIONS, QUAD_CONNECTION_SITES, QUAD_TEXT_RECTS, RECTS_SNIPS_PRESET_DEFINITIONS, RECT_VARIANT_CONNECTION_SITES, REFINED_ARROW_PRESET_DEFINITIONS, RIBBON_CONNECTION_SITES, RIBBON_TEXT_RECTS, SCROLLS_ACCENT_CALLOUTS_PRESET_DEFINITIONS, SNAP_THRESHOLD, STAR_CONNECTION_SITES, STAR_TEXT_RECTS, ST_SHAPE_TYPE_VALUES, TABS_DECORATIONS_PRESET_DEFINITIONS, TAB_CONNECTION_SITES, TAB_TEXT_RECTS, _internalForTests, alignElements, angleToRadians, at, autoAlignBoxes, buildCalloutLeaderLineSvgPath, clipPolygons, combineShapes, composeAffine, computeAlign, computeDistribute, computeRotation, computeSnap, computeSnapToShape, computeUnionWalk, convexHull, createBuiltinVariables, createRotationDrag, cross2, curvedElbowPathD, cxn, dedupPoly, distributeElements, elbowCurveSegments, elbowSegmentCount, elbowWaypoints, ensureCCW, ensureCW, evaluateFormula, evaluateGuides, findAllIntersections, flattenSvgPath, fmtNum, fragmentShapes, gd, gear6, gear9, getAdjustmentAwareClipPath, getCalloutLeaderLineGeometry, getCalloutTier, getCalloutViewBoxBounds, getCloudCalloutClipPath, getCloudClipPath, getPresetConnectionSites, getPresetShapeClipPath, getPresetTextRect, insertIntersections, intersectPolygons, intersectShapes, intersectSvgPaths, isCalloutShape, isConvex, isHorizontalPrimaryAxis, isStShapeType, layoutGraph, lineIntersection, lookupPresetConnectionSites, lookupPresetTextRectOverride, mergeOverlappingPolygons, mergeShapes, normalizeStShapeType, parseAdjustmentValues, parseFormula, parseGuideDefinitions, pointInPolygon, pointInTriangle, polygonArea, polygonsToSvgPath, resolveAlignReferenceBox, resolveCoordinate, resolveOperand, resolveRotateHandlePlacement, segmentIntersection, signedArea, snapBox, snapToGridStep, snapValue, subtractPolygons, subtractShapes, subtractSvgPaths, sutherlandHodgman, svgPathToPolygons, triangulate, unionPolygons, unionShapes, unionSvgPaths, usesSlideReference, vec2Eq };