ooxml-core 1.6.2 → 1.8.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 (308) hide show
  1. package/dist/automation/index.cjs +11143 -6014
  2. package/dist/automation/index.mjs +11143 -6014
  3. package/dist/collab/session.d.ts.map +1 -1
  4. package/dist/color/index.cjs +103 -0
  5. package/dist/color/index.d.ts +1 -0
  6. package/dist/color/index.d.ts.map +1 -1
  7. package/dist/color/index.mjs +94 -1
  8. package/dist/color/theme-palette.d.ts +55 -0
  9. package/dist/color/theme-palette.d.ts.map +1 -0
  10. package/dist/docx/layout/page-cursor.d.ts.map +1 -1
  11. package/dist/docx/model.d.ts +2 -2
  12. package/dist/docx/model.d.ts.map +1 -1
  13. package/dist/docx/style-numbering-package.d.ts.map +1 -1
  14. package/dist/docx/tab-stops.d.ts.map +1 -1
  15. package/dist/docx/table-styles.d.ts.map +1 -1
  16. package/dist/docx/write-drawing.d.ts.map +1 -1
  17. package/dist/docx/write-table.d.ts.map +1 -1
  18. package/dist/geometry/connector-router-astar.d.ts +24 -0
  19. package/dist/geometry/connector-router-astar.d.ts.map +1 -0
  20. package/dist/geometry/connector-router-graph.d.ts +38 -0
  21. package/dist/geometry/connector-router-graph.d.ts.map +1 -0
  22. package/dist/geometry/connector-router-types.d.ts +53 -0
  23. package/dist/geometry/connector-router-types.d.ts.map +1 -0
  24. package/dist/geometry/connector-router.d.ts +35 -0
  25. package/dist/geometry/connector-router.d.ts.map +1 -0
  26. package/dist/geometry/guide-formula-api.d.ts.map +1 -1
  27. package/dist/geometry/index.cjs +344 -0
  28. package/dist/geometry/index.d.ts +2 -0
  29. package/dist/geometry/index.d.ts.map +1 -1
  30. package/dist/geometry/index.mjs +327 -1
  31. package/dist/geometry/nudge.d.ts +12 -0
  32. package/dist/geometry/nudge.d.ts.map +1 -0
  33. package/dist/geometry/preset-shape-definitions-chart-marks.d.ts.map +1 -1
  34. package/dist/geometry/preset-shape-paths.d.ts +1 -1
  35. package/dist/geometry/preset-shape-paths.d.ts.map +1 -1
  36. package/dist/geometry/rotation-drag.d.ts +6 -0
  37. package/dist/geometry/rotation-drag.d.ts.map +1 -1
  38. package/dist/index.cjs +535 -3
  39. package/dist/index.d.ts +1 -0
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.mjs +535 -4
  42. package/dist/math/omml-to-latex.d.ts.map +1 -1
  43. package/dist/pptx/automation/index.cjs +7 -2
  44. package/dist/pptx/automation/index.d.ts.map +1 -1
  45. package/dist/pptx/chunks/index-Cn-GzYGp.d.ts.map +1 -1
  46. package/dist/pptx/cli/index.cjs +7 -2
  47. package/dist/pptx/converter/index.cjs +7 -2
  48. package/dist/pptx/index.cjs +7 -2
  49. package/dist/pptx/signature-node/index.cjs +37 -7
  50. package/dist/pptx/signature-node/index.d.ts.map +1 -1
  51. package/dist/pptx/signature-node/index.mjs +37 -7
  52. package/dist/pptx/ui/index.cjs +22 -24
  53. package/dist/pptx/ui/index.d.ts +14 -7
  54. package/dist/pptx/ui/index.d.ts.map +1 -1
  55. package/dist/pptx/ui/index.mjs +22 -24
  56. package/dist/ribbon/add-in.d.ts +53 -0
  57. package/dist/ribbon/add-in.d.ts.map +1 -0
  58. package/dist/ribbon/index.cjs +28 -0
  59. package/dist/ribbon/index.d.ts +2 -0
  60. package/dist/ribbon/index.d.ts.map +1 -0
  61. package/dist/ribbon/index.mjs +23 -0
  62. package/dist/teams/files.d.ts.map +1 -1
  63. package/dist/teams/index.cjs +36 -17
  64. package/dist/teams/index.mjs +36 -17
  65. package/dist/text/font-metrics/advance-width.d.ts +9 -0
  66. package/dist/text/font-metrics/advance-width.d.ts.map +1 -0
  67. package/dist/text/font-metrics/design-advances.generated.d.ts +12 -0
  68. package/dist/text/font-metrics/design-advances.generated.d.ts.map +1 -0
  69. package/dist/text/index.cjs +53 -0
  70. package/dist/text/index.d.ts +1 -0
  71. package/dist/text/index.d.ts.map +1 -1
  72. package/dist/text/index.mjs +52 -1
  73. package/dist/visio/clipboard-types.d.ts +8 -0
  74. package/dist/visio/clipboard-types.d.ts.map +1 -1
  75. package/dist/visio/clipboard-xml.d.ts.map +1 -1
  76. package/dist/visio/clipboard.d.ts.map +1 -1
  77. package/dist/visio/connector-route-avoid.d.ts +24 -0
  78. package/dist/visio/connector-route-avoid.d.ts.map +1 -0
  79. package/dist/visio/connector-route-walk.d.ts +37 -0
  80. package/dist/visio/connector-route-walk.d.ts.map +1 -0
  81. package/dist/visio/connector-route.d.ts +5 -2
  82. package/dist/visio/connector-route.d.ts.map +1 -1
  83. package/dist/visio/create-document.d.ts +6 -0
  84. package/dist/visio/create-document.d.ts.map +1 -1
  85. package/dist/visio/edit-change-shape-builtin.d.ts +18 -0
  86. package/dist/visio/edit-change-shape-builtin.d.ts.map +1 -0
  87. package/dist/visio/edit-change-shape-commands.d.ts +10 -4
  88. package/dist/visio/edit-change-shape-commands.d.ts.map +1 -1
  89. package/dist/visio/edit-change-shape.d.ts +3 -1
  90. package/dist/visio/edit-change-shape.d.ts.map +1 -1
  91. package/dist/visio/edit-commands.d.ts +7 -1
  92. package/dist/visio/edit-commands.d.ts.map +1 -1
  93. package/dist/visio/edit-connector-layout.d.ts +2 -2
  94. package/dist/visio/edit-connector-layout.d.ts.map +1 -1
  95. package/dist/visio/edit-connector-obstacles.d.ts +14 -0
  96. package/dist/visio/edit-connector-obstacles.d.ts.map +1 -0
  97. package/dist/visio/edit-connector-reroute.d.ts +7 -0
  98. package/dist/visio/edit-connector-reroute.d.ts.map +1 -1
  99. package/dist/visio/edit-connector.d.ts +2 -0
  100. package/dist/visio/edit-connector.d.ts.map +1 -1
  101. package/dist/visio/edit-delete.d.ts +4 -2
  102. package/dist/visio/edit-delete.d.ts.map +1 -1
  103. package/dist/visio/edit-duplicate-scope.d.ts +7 -2
  104. package/dist/visio/edit-duplicate-scope.d.ts.map +1 -1
  105. package/dist/visio/edit-duplicate.d.ts.map +1 -1
  106. package/dist/visio/edit-formatting-cell-admission.d.ts.map +1 -1
  107. package/dist/visio/edit-formatting-commands.d.ts +17 -0
  108. package/dist/visio/edit-formatting-commands.d.ts.map +1 -1
  109. package/dist/visio/edit-formatting-paint.d.ts.map +1 -1
  110. package/dist/visio/edit-formatting-scope.d.ts +6 -1
  111. package/dist/visio/edit-formatting-scope.d.ts.map +1 -1
  112. package/dist/visio/edit-formatting-text.d.ts.map +1 -1
  113. package/dist/visio/edit-formatting.d.ts.map +1 -1
  114. package/dist/visio/edit-group-formulas.d.ts +22 -0
  115. package/dist/visio/edit-group-formulas.d.ts.map +1 -0
  116. package/dist/visio/edit-group-rotation.d.ts +3 -1
  117. package/dist/visio/edit-group-rotation.d.ts.map +1 -1
  118. package/dist/visio/edit-group.d.ts +10 -3
  119. package/dist/visio/edit-group.d.ts.map +1 -1
  120. package/dist/visio/edit-instance-checks.d.ts +18 -0
  121. package/dist/visio/edit-instance-checks.d.ts.map +1 -0
  122. package/dist/visio/edit-instance-clipboard.d.ts +22 -0
  123. package/dist/visio/edit-instance-clipboard.d.ts.map +1 -0
  124. package/dist/visio/edit-instance-delete.d.ts +19 -0
  125. package/dist/visio/edit-instance-delete.d.ts.map +1 -0
  126. package/dist/visio/edit-instance-duplicate.d.ts +17 -0
  127. package/dist/visio/edit-instance-duplicate.d.ts.map +1 -0
  128. package/dist/visio/edit-instance-format.d.ts +31 -0
  129. package/dist/visio/edit-instance-format.d.ts.map +1 -0
  130. package/dist/visio/edit-instance-geometry.d.ts +21 -0
  131. package/dist/visio/edit-instance-geometry.d.ts.map +1 -0
  132. package/dist/visio/edit-instance-group.d.ts +18 -0
  133. package/dist/visio/edit-instance-group.d.ts.map +1 -0
  134. package/dist/visio/edit-instance-order.d.ts +16 -0
  135. package/dist/visio/edit-instance-order.d.ts.map +1 -0
  136. package/dist/visio/edit-instance-recalculate.d.ts +32 -0
  137. package/dist/visio/edit-instance-recalculate.d.ts.map +1 -0
  138. package/dist/visio/edit-instance-replace.d.ts +18 -0
  139. package/dist/visio/edit-instance-replace.d.ts.map +1 -0
  140. package/dist/visio/edit-instance-scope.d.ts +29 -0
  141. package/dist/visio/edit-instance-scope.d.ts.map +1 -0
  142. package/dist/visio/edit-instance-shape.d.ts +52 -0
  143. package/dist/visio/edit-instance-shape.d.ts.map +1 -0
  144. package/dist/visio/edit-instance-sheet.d.ts +52 -0
  145. package/dist/visio/edit-instance-sheet.d.ts.map +1 -0
  146. package/dist/visio/edit-layer-properties.d.ts +22 -0
  147. package/dist/visio/edit-layer-properties.d.ts.map +1 -0
  148. package/dist/visio/edit-master-drop.d.ts +39 -0
  149. package/dist/visio/edit-master-drop.d.ts.map +1 -0
  150. package/dist/visio/edit-master-index.d.ts.map +1 -1
  151. package/dist/visio/edit-master-instance-extras.d.ts +15 -0
  152. package/dist/visio/edit-master-instance-extras.d.ts.map +1 -0
  153. package/dist/visio/edit-master-instance-group.d.ts +25 -0
  154. package/dist/visio/edit-master-instance-group.d.ts.map +1 -0
  155. package/dist/visio/edit-master-instance.d.ts +42 -0
  156. package/dist/visio/edit-master-instance.d.ts.map +1 -0
  157. package/dist/visio/edit-master-scope.d.ts.map +1 -1
  158. package/dist/visio/edit-page-auto-size.d.ts.map +1 -1
  159. package/dist/visio/edit-page-layout.d.ts +15 -0
  160. package/dist/visio/edit-page-layout.d.ts.map +1 -0
  161. package/dist/visio/edit-page-setup-commands.d.ts +3 -1
  162. package/dist/visio/edit-page-setup-commands.d.ts.map +1 -1
  163. package/dist/visio/edit-page-theme-refresh.d.ts +4 -0
  164. package/dist/visio/edit-page-theme-refresh.d.ts.map +1 -0
  165. package/dist/visio/edit-page-theme.d.ts.map +1 -1
  166. package/dist/visio/edit-pages.d.ts.map +1 -1
  167. package/dist/visio/edit-paste.d.ts +3 -1
  168. package/dist/visio/edit-paste.d.ts.map +1 -1
  169. package/dist/visio/edit-recalculate-index.d.ts.map +1 -1
  170. package/dist/visio/edit-recalculate-values.d.ts.map +1 -1
  171. package/dist/visio/edit-shape-order.d.ts +19 -4
  172. package/dist/visio/edit-shape-order.d.ts.map +1 -1
  173. package/dist/visio/edit-snap-glue.d.ts +16 -0
  174. package/dist/visio/edit-snap-glue.d.ts.map +1 -0
  175. package/dist/visio/edit-stencil-connector-drop.d.ts +9 -0
  176. package/dist/visio/edit-stencil-connector-drop.d.ts.map +1 -0
  177. package/dist/visio/edit-stencil-connector-layout.d.ts +14 -0
  178. package/dist/visio/edit-stencil-connector-layout.d.ts.map +1 -0
  179. package/dist/visio/edit-stencil-connector-write.d.ts +16 -0
  180. package/dist/visio/edit-stencil-connector-write.d.ts.map +1 -0
  181. package/dist/visio/edit-stencil-connector.d.ts +29 -0
  182. package/dist/visio/edit-stencil-connector.d.ts.map +1 -0
  183. package/dist/visio/edit-stencil-master.d.ts +17 -0
  184. package/dist/visio/edit-stencil-master.d.ts.map +1 -0
  185. package/dist/visio/edit-text-instance.d.ts +21 -0
  186. package/dist/visio/edit-text-instance.d.ts.map +1 -0
  187. package/dist/visio/edit-text-ranges.d.ts.map +1 -1
  188. package/dist/visio/edit-text-scope.d.ts +6 -1
  189. package/dist/visio/edit-text-scope.d.ts.map +1 -1
  190. package/dist/visio/edit-text-size-formula.d.ts +17 -0
  191. package/dist/visio/edit-text-size-formula.d.ts.map +1 -0
  192. package/dist/visio/edit-text-size.d.ts +34 -0
  193. package/dist/visio/edit-text-size.d.ts.map +1 -0
  194. package/dist/visio/edit-text-target.d.ts +11 -1
  195. package/dist/visio/edit-text-target.d.ts.map +1 -1
  196. package/dist/visio/edit-text.d.ts +2 -1
  197. package/dist/visio/edit-text.d.ts.map +1 -1
  198. package/dist/visio/edit.d.ts +1 -1
  199. package/dist/visio/edit.d.ts.map +1 -1
  200. package/dist/visio/formula-evaluate.d.ts +2 -0
  201. package/dist/visio/formula-evaluate.d.ts.map +1 -1
  202. package/dist/visio/formula-functions.d.ts +13 -0
  203. package/dist/visio/formula-functions.d.ts.map +1 -0
  204. package/dist/visio/formula-numeric-functions.d.ts.map +1 -1
  205. package/dist/visio/formula.d.ts +14 -0
  206. package/dist/visio/formula.d.ts.map +1 -1
  207. package/dist/visio/index.cjs +11307 -5982
  208. package/dist/visio/index.d.ts +11 -1
  209. package/dist/visio/index.d.ts.map +1 -1
  210. package/dist/visio/index.mjs +11281 -5983
  211. package/dist/visio/line-jumps.d.ts +21 -0
  212. package/dist/visio/line-jumps.d.ts.map +1 -0
  213. package/dist/visio/master-list.d.ts +20 -0
  214. package/dist/visio/master-list.d.ts.map +1 -0
  215. package/dist/visio/model.d.ts +41 -0
  216. package/dist/visio/model.d.ts.map +1 -1
  217. package/dist/visio/page-layout.d.ts +40 -0
  218. package/dist/visio/page-layout.d.ts.map +1 -0
  219. package/dist/visio/page-theme.d.ts.map +1 -1
  220. package/dist/visio/parser.d.ts.map +1 -1
  221. package/dist/visio/shape-connections.d.ts +2 -2
  222. package/dist/visio/shape-connections.d.ts.map +1 -1
  223. package/dist/visio/snap-glue.d.ts +49 -0
  224. package/dist/visio/snap-glue.d.ts.map +1 -0
  225. package/dist/visio/stencil-master-part.d.ts +15 -0
  226. package/dist/visio/stencil-master-part.d.ts.map +1 -0
  227. package/dist/visio/stencil-masters.d.ts +19 -0
  228. package/dist/visio/stencil-masters.d.ts.map +1 -0
  229. package/dist/visio/stencil-windows.d.ts +20 -0
  230. package/dist/visio/stencil-windows.d.ts.map +1 -0
  231. package/dist/visio/stencils.d.ts +2 -0
  232. package/dist/visio/stencils.d.ts.map +1 -1
  233. package/dist/visio/style.d.ts +5 -0
  234. package/dist/visio/style.d.ts.map +1 -1
  235. package/dist/visio/text-extent.d.ts +40 -0
  236. package/dist/visio/text-extent.d.ts.map +1 -0
  237. package/dist/visio/text-fields.d.ts.map +1 -1
  238. package/dist/visio/theme-color-ref.d.ts +33 -0
  239. package/dist/visio/theme-color-ref.d.ts.map +1 -0
  240. package/dist/visio/ui/auto-connect.d.ts +80 -0
  241. package/dist/visio/ui/auto-connect.d.ts.map +1 -0
  242. package/dist/visio/ui/connection-points.d.ts +7 -2
  243. package/dist/visio/ui/connection-points.d.ts.map +1 -1
  244. package/dist/visio/ui/connector-preview.d.ts +3 -2
  245. package/dist/visio/ui/connector-preview.d.ts.map +1 -1
  246. package/dist/visio/ui/contract.d.ts +7 -2
  247. package/dist/visio/ui/contract.d.ts.map +1 -1
  248. package/dist/visio/ui/data-graphics.d.ts +6 -2
  249. package/dist/visio/ui/data-graphics.d.ts.map +1 -1
  250. package/dist/visio/ui/edit-commands.d.ts.map +1 -1
  251. package/dist/visio/ui/edit-error.d.ts +4 -1
  252. package/dist/visio/ui/edit-error.d.ts.map +1 -1
  253. package/dist/visio/ui/formatting.d.ts +27 -0
  254. package/dist/visio/ui/formatting.d.ts.map +1 -1
  255. package/dist/visio/ui/guides.d.ts +14 -0
  256. package/dist/visio/ui/guides.d.ts.map +1 -1
  257. package/dist/visio/ui/index.cjs +27125 -3841
  258. package/dist/visio/ui/index.d.ts +4 -0
  259. package/dist/visio/ui/index.d.ts.map +1 -1
  260. package/dist/visio/ui/index.mjs +27090 -3842
  261. package/dist/visio/ui/master-drop.d.ts +38 -0
  262. package/dist/visio/ui/master-drop.d.ts.map +1 -0
  263. package/dist/visio/ui/page-edit.d.ts.map +1 -1
  264. package/dist/visio/ui/ruler-grid.d.ts +45 -0
  265. package/dist/visio/ui/ruler-grid.d.ts.map +1 -0
  266. package/dist/visio/ui/sample-drawing.d.ts +9 -0
  267. package/dist/visio/ui/sample-drawing.d.ts.map +1 -0
  268. package/dist/visio/ui/scene-validation.d.ts.map +1 -1
  269. package/dist/visio/ui/shape-change.d.ts +16 -4
  270. package/dist/visio/ui/shape-change.d.ts.map +1 -1
  271. package/dist/visio/ui/shape-clipboard.d.ts.map +1 -1
  272. package/dist/visio/ui/shape-duplicate.d.ts +7 -1
  273. package/dist/visio/ui/shape-duplicate.d.ts.map +1 -1
  274. package/dist/visio/ui/shape-group.d.ts.map +1 -1
  275. package/dist/visio/ui/shape-move.d.ts +6 -0
  276. package/dist/visio/ui/shape-move.d.ts.map +1 -1
  277. package/dist/visio/ui/shape-order.d.ts +6 -1
  278. package/dist/visio/ui/shape-order.d.ts.map +1 -1
  279. package/dist/visio/ui/shape-resize.d.ts.map +1 -1
  280. package/dist/visio/ui/shape-rotation.d.ts +10 -1
  281. package/dist/visio/ui/shape-rotation.d.ts.map +1 -1
  282. package/dist/visio/ui/size-position.d.ts.map +1 -1
  283. package/dist/visio/ui/snapshot-scene.d.ts.map +1 -1
  284. package/dist/xlsx/conditional-extensions.d.ts.map +1 -1
  285. package/dist/xlsx/edit/cell-shift.d.ts.map +1 -1
  286. package/dist/xlsx/edit/shift-rule-anchors.d.ts +9 -0
  287. package/dist/xlsx/edit/shift-rule-anchors.d.ts.map +1 -0
  288. package/dist/xlsx/edit/structure.d.ts.map +1 -1
  289. package/dist/xlsx/edit/table-edits.d.ts.map +1 -1
  290. package/dist/xlsx/formula/engine-util.d.ts.map +1 -1
  291. package/dist/xlsx/index.cjs +55 -15
  292. package/dist/xlsx/index.mjs +55 -15
  293. package/dist/xlsx/load/index.cjs +70 -16
  294. package/dist/xlsx/load/index.mjs +70 -16
  295. package/dist/xlsx/load/text-decode.d.ts.map +1 -1
  296. package/dist/xlsx/model.d.ts +2 -0
  297. package/dist/xlsx/model.d.ts.map +1 -1
  298. package/dist/xlsx/read/package.d.ts.map +1 -1
  299. package/dist/xlsx/read/tables.d.ts.map +1 -1
  300. package/dist/xlsx/ui/commands/number.d.ts.map +1 -1
  301. package/dist/xlsx/ui/commands/util.d.ts.map +1 -1
  302. package/dist/xlsx/ui/index.cjs +26 -0
  303. package/dist/xlsx/ui/index.mjs +26 -0
  304. package/dist/xlsx/ui/ribbon/parts.d.ts.map +1 -1
  305. package/dist/xlsx/write/conditional.d.ts.map +1 -1
  306. package/dist/xlsx/write/styles.d.ts.map +1 -1
  307. package/dist/xlsx/write/table-patch.d.ts.map +1 -1
  308. package/package.json +7 -1
@@ -1,6 +1,8 @@
1
1
  import type { VisioGroupShapesEdit, VisioUngroupShapeEdit } from './edit-group-commands.js';
2
+ import type { GroupInstance } from './edit-instance-group.js';
3
+ type Instances = ReadonlyMap<Element, GroupInstance>;
2
4
  /** The page-space bounds of top-level sheets' alignment boxes (through pin, rotation and flips). */
3
- export declare function visioShapeBounds(shapes: readonly Element[]): {
5
+ export declare function visioShapeBounds(shapes: readonly Element[], instances?: Instances): {
4
6
  minX: number;
5
7
  minY: number;
6
8
  maxX: number;
@@ -8,10 +10,15 @@ export declare function visioShapeBounds(shapes: readonly Element[]): {
8
10
  };
9
11
  /** Native Group: the new sheet bounds the members' alignment boxes and owns them in its
10
12
  * Shapes container. Member pins move into group-local inches; every other cell is preserved.
13
+ * `instances` are the stencil members the caller proved (`groupInstances`): each stays an
14
+ * instance of its master and takes its group-local pin as a local value.
11
15
  */
12
- export declare function groupVisioShapes(root: Element, document: Element, edit: VisioGroupShapesEdit, check: () => void): boolean;
16
+ export declare function groupVisioShapes(root: Element, document: Element, edit: VisioGroupShapesEdit, check: () => void, instances?: Instances): boolean;
13
17
  /** Native Ungroup: direct members return to page coordinates through the group's pin,
14
18
  * rotation and flips; the group sheet (with its own data) is removed. Returns member IDs.
19
+ * A stencil member (`instances`) takes its page pin as a local value; it cannot yet leave a
20
+ * rotated or flipped group, because its angle would have to change with it.
15
21
  */
16
- export declare function ungroupVisioShape(root: Element, document: Element, edit: VisioUngroupShapeEdit, check: () => void): readonly string[];
22
+ export declare function ungroupVisioShape(root: Element, document: Element, edit: VisioUngroupShapeEdit, check: () => void, instances?: Instances): readonly string[];
23
+ export {};
17
24
  //# sourceMappingURL=edit-group.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"edit-group.d.ts","sourceRoot":"","sources":["../../visio/edit-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAkFzF,oGAAoG;AACpG,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,GAAG;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,I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AC3B,KAAK,EAAE,MAAM,IAAI,EACjB,SAAS,GAAE,SAAgB,GACzB,SAAS,MAAM,EAAE,CAgHnB"}
@@ -0,0 +1,18 @@
1
+ import type { InstanceCacheWrite } from './edit-instance-recalculate.js';
2
+ import type { InstanceScope } from './edit-instance-scope.js';
3
+ /**
4
+ * Formulas of other shapes on the page that read the cells this edit changes are not
5
+ * recalculated. `changed` is keyed by page shape ID: the instance and, in a group, its sub-shapes.
6
+ */
7
+ export declare function assertNoPageDependents(root: Element, instance: Element, changed: ReadonlyMap<string, ReadonlySet<string>>, check: () => void): void;
8
+ /**
9
+ * A sub-shape that keeps a size or a place of its own, with no formula tying it to the group, is
10
+ * scaled by Visio when the group is resized. That scaling is not reproduced here.
11
+ */
12
+ export declare function assertPartsFollow(scope: InstanceScope): void;
13
+ /**
14
+ * As Visio: a refreshed length whose master cell is tagged as a drawing length, or (outside the
15
+ * data sections, where a bare number may be anything) not tagged at all, is tagged inches.
16
+ */
17
+ export declare function inchTagged(write: InstanceCacheWrite): boolean;
18
+ //# sourceMappingURL=edit-instance-checks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-instance-checks.d.ts","sourceRoot":"","sources":["../../visio/edit-instance-checks.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAM3D;;;GAGG;AACH,wBAAgB,sBAAsB,CACrC,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,OAAO,EACjB,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,EACjD,KAAK,EAAE,MAAM,IAAI,GACf,IAAI,CA4BN;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAU5D;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAQ7D"}
@@ -0,0 +1,22 @@
1
+ import type { VisioClipboardSnapshot } from './clipboard-types.js';
2
+ import type { VisioPackage } from './package.js';
3
+ /** The master IDs the top-level shapes of `root` are instances of. */
4
+ export declare function instanceMasterIds(root: Element): string[];
5
+ /**
6
+ * What tells one master from another under the same ID: Visio gives every master a UniqueID
7
+ * and keeps the BaseID of the stencil master it was copied from.
8
+ */
9
+ export declare function masterIdentities(pkg: VisioPackage, masterIds: readonly string[]): Promise<NonNullable<VisioClipboardSnapshot['masters']>>;
10
+ /**
11
+ * A pasted stencil shape stays an instance of its master, so the target drawing must hold that
12
+ * very master under the same ID and the page must already be related to it. Anything else is a
13
+ * paste between drawings, which would have to bring the master along.
14
+ */
15
+ export declare function assertClipboardMasters(pkg: VisioPackage, pagePath: string, source: Element, captured: VisioClipboardSnapshot['masters']): Promise<void>;
16
+ /**
17
+ * Formula scope of a captured stencil shape, read by syntax because its formulas may use
18
+ * functions the analyser does not parse: no reference to a sheet outside the capture, and no
19
+ * reference built from text.
20
+ */
21
+ export declare function assertInstanceClipboardScope(shape: Element, ids: ReadonlySet<string>): void;
22
+ //# sourceMappingURL=edit-instance-clipboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-instance-clipboard.d.ts","sourceRoot":"","sources":["../../visio/edit-instance-clipboard.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAGhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAS9C,sEAAsE;AACtE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,EAAE,CAQzD;AAYD;;;GAGG;AACH,wBAAsB,gBAAgB,CACrC,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,SAAS,MAAM,EAAE,GAC1B,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC,CAAC,CAazD;AAED;;;;GAIG;AACH,wBAAsB,sBAAsB,CAC3C,GAAG,EAAE,YAAY,EACjB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,sBAAsB,CAAC,SAAS,CAAC,GACzC,OAAO,CAAC,IAAI,CAAC,CAiBf;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,IAAI,CAmB3F"}
@@ -0,0 +1,19 @@
1
+ import type { MasterTemplate } from './edit-text-instance.js';
2
+ import type { VisioPackage } from './package.js';
3
+ /**
4
+ * The stencil instances among deletion targets, each proved deletable: not protected against
5
+ * deletion and not on a locked layer. Visio removes the shape with its sub-shapes and leaves the
6
+ * master in the document stencil; so does this editor.
7
+ */
8
+ export declare function admitInstanceDeletes(pkg: VisioPackage, roots: ReadonlyMap<string, Element>, edits: readonly {
9
+ pageId: string;
10
+ shapeId: string;
11
+ }[], template: MasterTemplate, check: () => void): Promise<Set<Element>>;
12
+ /**
13
+ * Before deletion: release the glue of stencil connectors (Visio's Dynamic connector is a master
14
+ * instance). A deleted connector loses its Connect rows. A connector that stays and was glued to
15
+ * a deleted shape keeps the end where it was: the glue formulas and the trigger become plain
16
+ * values and the Connect row goes, which is what Visio saves.
17
+ */
18
+ export declare function releaseStencilGlue(roots: ReadonlyMap<string, Element>, removed: ReadonlyMap<string, ReadonlySet<string>>): void;
19
+ //# sourceMappingURL=edit-instance-delete.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-instance-delete.d.ts","sourceRoot":"","sources":["../../visio/edit-instance-delete.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAI9C;;;;GAIG;AACH,wBAAsB,oBAAoB,CACzC,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,KAAK,EAAE,SAAS;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,EACrD,QAAQ,EAAE,cAAc,EACxB,KAAK,EAAE,MAAM,IAAI,GACf,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAWvB;AAOD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,GAC/C,IAAI,CA8CN"}
@@ -0,0 +1,17 @@
1
+ import { type StencilInstance } from './edit-instance-shape.js';
2
+ import type { VisioPackage } from './package.js';
3
+ /**
4
+ * Admit one stencil instance as the source of a copy and return where the copy's pin goes. Visio
5
+ * duplicates the instance as it is: same master, same local cells, a new sheet ID and name. A
6
+ * connector glued to the source stays with the source; the copy has no glue.
7
+ */
8
+ export declare function planInstanceCopy(pkg: VisioPackage, pageId: string, sourceRoot: Element, target: StencilInstance, offsetX: number, offsetY: number, code?: string): Promise<{
9
+ x: number;
10
+ y: number;
11
+ }>;
12
+ /**
13
+ * Finish a cloned instance: its sub-shapes (a group master) take the next free sheet IDs, with
14
+ * the copy's own `Sheet.N!` references following, and the pin moves to (`x`, `y`).
15
+ */
16
+ export declare function finishInstanceCopy(clone: Element, template: Element, x: number, y: number, taken: Set<string>, check: () => void): string[];
17
+ //# sourceMappingURL=edit-instance-duplicate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-instance-duplicate.d.ts","sourceRoot":"","sources":["../../visio/edit-instance-duplicate.ts"],"names":[],"mappings":"AAEA,OAAO,EAKN,KAAK,eAAe,EACpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAI9C;;;;GAIG;AACH,wBAAsB,gBAAgB,CACrC,GAAG,EAAE,YAAY,EACjB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,OAAO,EACnB,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,IAAI,SAA0B,GAC5B,OAAO,CAAC;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAcnC;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,OAAO,EACjB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,EAClB,KAAK,EAAE,MAAM,IAAI,GACf,MAAM,EAAE,CAsCV"}
@@ -0,0 +1,31 @@
1
+ import type { MasterTemplate } from './edit-text-instance.js';
2
+ import type { VisioPackage } from './package.js';
3
+ /**
4
+ * A stencil instance prepared for formatting: `view` is a detached copy of the master shape with
5
+ * the instance's own cells, rows, styles and text laid over it, so the planners and protection
6
+ * checks written for local shapes see the effective sheet. Nothing is written to it for good:
7
+ * `commitInstanceFormatting` copies the changed cells onto the instance as local overrides.
8
+ */
9
+ export interface FormattingInstance {
10
+ instance: Element;
11
+ template: Element;
12
+ view: Element;
13
+ /** The group of a group instance, or one of its sub-shapes. */
14
+ member?: boolean;
15
+ }
16
+ /**
17
+ * The stencil shapes a formatting command for `shapeId` reaches, as Visio applies it: a plain
18
+ * instance alone; an instance of a group master with every sub-shape; a sub-shape of a group
19
+ * instance (Visio's sub-selection) alone, with its own sub-shapes when it is a nested group.
20
+ * `undefined` when `shapeId` is not part of a stencil instance.
21
+ */
22
+ export declare function formattingInstances(root: Element, shapeId: string, template: MasterTemplate): Promise<FormattingInstance[] | undefined>;
23
+ export declare function formattingInstance(root: Element, shapeId: string, template: MasterTemplate): Promise<FormattingInstance | undefined>;
24
+ /** Copy the cells `names` (`Cell` or `Section.row.Cell`) from the view onto the instance. */
25
+ export declare function commitInstanceFormatting(target: FormattingInstance, names: Iterable<string>): void;
26
+ /**
27
+ * Stencil shapes sit on their stencil's layer. Formatting and resizing them is allowed, as in
28
+ * Visio, unless one of those layers is locked.
29
+ */
30
+ export declare function assertInstanceLayersUnlocked(pkg: VisioPackage, pageId: string, layerMember: string | undefined): Promise<void>;
31
+ //# sourceMappingURL=edit-instance-format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-instance-format.d.ts","sourceRoot":"","sources":["../../visio/edit-instance-format.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAK9C;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;IACd,+DAA+D;IAC/D,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAmCD;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACxC,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,cAAc,GACtB,OAAO,CAAC,kBAAkB,EAAE,GAAG,SAAS,CAAC,CAqD3C;AAED,wBAAsB,kBAAkB,CACvC,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,cAAc,GACtB,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC,CAIzC;AAiED,6FAA6F;AAC7F,wBAAgB,wBAAwB,CACvC,MAAM,EAAE,kBAAkB,EAC1B,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,GACrB,IAAI,CAoCN;AAED;;;GAGG;AACH,wBAAsB,4BAA4B,CACjD,GAAG,EAAE,YAAY,EACjB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,GAAG,SAAS,GAC7B,OAAO,CAAC,IAAI,CAAC,CAoBf"}
@@ -0,0 +1,21 @@
1
+ import type { VisioGeometryEdit } from './edit-commands.js';
2
+ import type { MasterTemplate } from './edit-text-instance.js';
3
+ export type InstanceGeometryEdit = Extract<VisioGeometryEdit, {
4
+ type: 'move-shape' | 'resize-shape' | 'rotate-shape' | 'flip-shape';
5
+ }>;
6
+ /** A move, resize, rotation or flip whose target is a top-level stencil (master) instance. */
7
+ export declare function isInstanceGeometryEdit(roots: ReadonlyMap<string, Element>, edit: VisioGeometryEdit): edit is InstanceGeometryEdit;
8
+ /** Whether the target is an instance of a group master. */
9
+ export declare function isGroupInstanceEdit(roots: ReadonlyMap<string, Element>, edit: VisioGeometryEdit): boolean;
10
+ /** Whether a connector is glued to the shape: its move then has connectors to follow or leave. */
11
+ export declare function isGlueTarget(roots: ReadonlyMap<string, Element>, edit: VisioGeometryEdit): boolean;
12
+ /**
13
+ * Resize, rotate or flip a stencil instance the way Visio saves it: the changed cells become
14
+ * local values on the instance, and every inherited cell whose value follows from them (geometry
15
+ * rows, the text block, connection points and, in an instance of a group master, the sub-shapes'
16
+ * pins, sizes and geometry) gets a refreshed cache marked `F="Inh"`, so the master's formulas
17
+ * stay in effect. Recorded with `scripts/record-visio-instance-geometry.ps1` and
18
+ * `scripts/record-visio-group-instance.ps1`.
19
+ */
20
+ export declare function applyInstanceGeometryEdit(roots: ReadonlyMap<string, Element>, edit: InstanceGeometryEdit, template: MasterTemplate, check: () => void): Promise<readonly string[]>;
21
+ //# sourceMappingURL=edit-instance-geometry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-instance-geometry.d.ts","sourceRoot":"","sources":["../../visio/edit-instance-geometry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAYzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAO3D,MAAM,MAAM,oBAAoB,GAAG,OAAO,CACzC,iBAAiB,EACjB;IAAE,IAAI,EAAE,YAAY,GAAG,cAAc,GAAG,cAAc,GAAG,YAAY,CAAA;CAAE,CACvE,CAAC;AAEF,8FAA8F;AAC9F,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,IAAI,EAAE,iBAAiB,GACrB,IAAI,IAAI,oBAAoB,CAO9B;AAED,2DAA2D;AAC3D,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,IAAI,EAAE,iBAAiB,GACrB,OAAO,CAST;AAED,kGAAkG;AAClG,wBAAgB,YAAY,CAC3B,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,IAAI,EAAE,iBAAiB,GACrB,OAAO,CAQT;AAoDD;;;;;;;GAOG;AACH,wBAAsB,yBAAyB,CAC9C,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,IAAI,EAAE,oBAAoB,EAC1B,QAAQ,EAAE,cAAc,EACxB,KAAK,EAAE,MAAM,IAAI,GACf,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CA+J5B"}
@@ -0,0 +1,18 @@
1
+ import type { VisioEdit } from './edit-commands.js';
2
+ import { type StencilInstance } from './edit-instance-shape.js';
3
+ import type { MasterTemplate } from './edit-text-instance.js';
4
+ import type { VisioPackage } from './package.js';
5
+ /** Functions whose value depends on which sheet is the parent: grouping changes it. */
6
+ export declare const VISIO_PARENT_FUNCTIONS: ReadonlySet<string>;
7
+ /** A stencil member of a group, with a stand-in that carries its transform cells in effect. */
8
+ export interface GroupInstance extends StencilInstance {
9
+ view: Element;
10
+ }
11
+ /**
12
+ * The stencil instances that group, ungroup, move or rotate commands reach: members to be
13
+ * grouped, and the instances inside a group that is ungrouped, moved or rotated. Each is proved
14
+ * to be a 2D shape of a resolvable master, free to group and off locked layers. Visio keeps a
15
+ * grouped stencil shape an instance of its master, and so does this editor.
16
+ */
17
+ export declare function groupInstances(pkg: VisioPackage, roots: ReadonlyMap<string, Element>, commands: readonly VisioEdit[], template: MasterTemplate, check: () => void): Promise<Map<Element, GroupInstance>>;
18
+ //# sourceMappingURL=edit-instance-group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-instance-group.d.ts","sourceRoot":"","sources":["../../visio/edit-instance-group.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,OAAO,EAKN,KAAK,eAAe,EACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAI9C,uFAAuF;AACvF,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAAC,MAAM,CAOrD,CAAC;AAeH,+FAA+F;AAC/F,MAAM,WAAW,aAAc,SAAQ,eAAe;IACrD,IAAI,EAAE,OAAO,CAAC;CACd;AA8DD;;;;;GAKG;AACH,wBAAsB,cAAc,CACnC,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,QAAQ,EAAE,SAAS,SAAS,EAAE,EAC9B,QAAQ,EAAE,cAAc,EACxB,KAAK,EAAE,MAAM,IAAI,GACf,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,CA8BtC"}
@@ -0,0 +1,16 @@
1
+ import type { VisioEdit } from './edit-commands.js';
2
+ import type { MasterTemplate } from './edit-text-instance.js';
3
+ import type { VisioPackage } from './package.js';
4
+ /**
5
+ * Whether any shape these reorder, group or ungroup commands act on is a container or a list
6
+ * (by its own rows or its master's); see `assertShapeOrderPackageScope`.
7
+ */
8
+ export declare function orderTargetsAreStructural(roots: ReadonlyMap<string, Element>, commands: readonly VisioEdit[], template: MasterTemplate): Promise<boolean>;
9
+ /**
10
+ * What ordering needs from the stencil instances of a page: for each one, a stand-in carrying
11
+ * the display band and protection cells in effect (its own, else its master's). The shape being
12
+ * moved must also not sit on a locked layer. Visio changes nothing but the position of the
13
+ * shape among its siblings, for a stencil shape as for a drawn one.
14
+ */
15
+ export declare function instanceOrderViews(pkg: VisioPackage, pageId: string, root: Element, shapeId: string, template: MasterTemplate, check: () => void): Promise<Map<Element, Element>>;
16
+ //# sourceMappingURL=edit-instance-order.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-instance-order.d.ts","sourceRoot":"","sources":["../../visio/edit-instance-order.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAQjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAG9C;;;GAGG;AACH,wBAAsB,yBAAyB,CAC9C,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,QAAQ,EAAE,SAAS,SAAS,EAAE,EAC9B,QAAQ,EAAE,cAAc,GACtB,OAAO,CAAC,OAAO,CAAC,CAelB;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACvC,GAAG,EAAE,YAAY,EACjB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,cAAc,EACxB,KAAK,EAAE,MAAM,IAAI,GACf,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAYhC"}
@@ -0,0 +1,32 @@
1
+ import { type InstanceScope } from './edit-instance-scope.js';
2
+ import { type InstanceCell, type InstanceSheet } from './edit-instance-sheet.js';
3
+ import { type VisioFormulaLimits } from './formula.js';
4
+ export interface InstanceCacheWrite {
5
+ /** The sheet the cell belongs to: the instance, or a sub-shape of a group instance. */
6
+ sheet: InstanceSheet;
7
+ cell: InstanceCell;
8
+ value: number;
9
+ /** The value is a length in inches. */
10
+ length: boolean;
11
+ }
12
+ /**
13
+ * The inherited caches that change when `overrides` become local values of the instance. Only
14
+ * what master geometry normally uses is evaluated: arithmetic, comparisons, IF, MIN, MAX and the
15
+ * like over cells of the same shape and, in a group instance, of its other sub-shapes
16
+ * (`Sheet.5!Width`). A drawn cell (transform, text block, geometry, connection
17
+ * point, formatting) that depends on anything else refuses the edit.
18
+ */
19
+ export declare function recalculateInstanceCaches(target: InstanceSheet | InstanceScope, changed: ReadonlyMap<InstanceCell, number>, check: () => void,
20
+ /** Cells that become local values too when they would otherwise follow a changed cell. */
21
+ pins?: ReadonlyMap<InstanceCell, number>,
22
+ /**
23
+ * The shape's text was edited: cells that measure it are computed again with these extents,
24
+ * and so is everything that follows from them.
25
+ */
26
+ text?: NonNullable<VisioFormulaLimits['text']>): {
27
+ writes: InstanceCacheWrite[];
28
+ pinned: ReadonlyMap<InstanceCell, number>;
29
+ };
30
+ /** Whether a cell's effective formula is one this editor may replace with a local value. */
31
+ export declare function assertOverridable(cell: InstanceCell | undefined, what: string): void;
32
+ //# sourceMappingURL=edit-instance-recalculate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-instance-recalculate.d.ts","sourceRoot":"","sources":["../../visio/edit-instance-recalculate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAGN,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAMN,KAAK,kBAAkB,EAGvB,MAAM,WAAW,CAAC;AA6DnB,MAAM,WAAW,kBAAkB;IAClC,uFAAuF;IACvF,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,MAAM,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACxC,MAAM,EAAE,aAAa,GAAG,aAAa,EACrC,OAAO,EAAE,WAAW,CAAC,YAAY,EAAE,MAAM,CAAC,EAC1C,KAAK,EAAE,MAAM,IAAI;AACjB,0FAA0F;AAC1F,IAAI,GAAE,WAAW,CAAC,YAAY,EAAE,MAAM,CAAa;AACnD;;;GAGG;AACH,IAAI,CAAC,EAAE,WAAW,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,GAC5C;IAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAAC,MAAM,EAAE,WAAW,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;CAAE,CAwK7E;AAED,4FAA4F;AAC5F,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAapF"}
@@ -0,0 +1,18 @@
1
+ import type { MasterTemplate } from './edit-text-instance.js';
2
+ import type { VisioPackage } from './package.js';
3
+ import { type VisioPackageLimits } from './package-common.js';
4
+ export interface VisioReplaceMasterEdit {
5
+ type: 'change-shape';
6
+ pageId: string;
7
+ shapeId: string;
8
+ masterId: string;
9
+ }
10
+ /**
11
+ * Home > Change Shape on a stencil shape: it becomes an instance of another master of the
12
+ * drawing. As in Visio, the shape keeps its position, its size when it has one of its own, its
13
+ * text, formatting, data and layers; everything it inherited now comes from the new master.
14
+ * Visio also gives the shape a new sheet ID; this editor keeps the ID, so glue and references to
15
+ * it stay valid as they are.
16
+ */
17
+ export declare function replaceInstanceMaster(pkg: VisioPackage, parts: Map<string, Uint8Array>, pagePath: string, root: Element, edit: VisioReplaceMasterEdit, template: MasterTemplate, limits: VisioPackageLimits, check: () => void): Promise<boolean>;
18
+ //# sourceMappingURL=edit-instance-replace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-instance-replace.d.ts","sourceRoot":"","sources":["../../visio/edit-instance-replace.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAI3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAA2B,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAWpF,MAAM,WAAW,sBAAsB;IACtC,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CACjB;AA4ED;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CAC1C,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,EAC9B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,sBAAsB,EAC5B,QAAQ,EAAE,cAAc,EACxB,MAAM,EAAE,kBAAkB,EAC1B,KAAK,EAAE,MAAM,IAAI,GACf,OAAO,CAAC,OAAO,CAAC,CAyGlB"}
@@ -0,0 +1,29 @@
1
+ import { type InstanceCell, type InstanceSheet } from './edit-instance-sheet.js';
2
+ import type { MasterTemplate } from './edit-text-instance.js';
3
+ /**
4
+ * The sheets one edit of a stencil instance can reach: the instance itself and, for an instance
5
+ * of a group master, every sub-shape at any depth. A master's formulas name the master's shape
6
+ * IDs (`Sheet.5!Width`), a formula written on the page names the page's (`Sheet.12!Width`);
7
+ * `resolve` maps both onto the instance's sheets.
8
+ */
9
+ export interface InstanceScope {
10
+ root: InstanceSheet;
11
+ sheets: readonly InstanceSheet[];
12
+ cells: readonly InstanceCell[];
13
+ owner(cell: InstanceCell): InstanceSheet;
14
+ /** `local`: the formula was written on the page, so `shapeId` is a page shape ID. */
15
+ resolve(from: InstanceCell, name: string, shapeId: string | undefined, local: boolean): InstanceCell | undefined;
16
+ }
17
+ /** The scope of an instance of a single-shape master. */
18
+ export declare function singleScope(sheet: InstanceSheet): InstanceScope;
19
+ /** Whether a top-level stencil instance is a group: it has sub-shapes of its own. */
20
+ export declare const isGroupInstance: (instance: Element) => boolean;
21
+ /**
22
+ * The scope of a top-level instance of a group master. A master with several top-level shapes
23
+ * has no shape of its own for the group Visio makes on the drop: that group's cells are all
24
+ * local, so its sheet is laid over an empty template.
25
+ */
26
+ export declare function groupScope(instance: Element, template: MasterTemplate, code?: string): Promise<InstanceScope>;
27
+ /** The scope of the top-level stencil instance `shapeId`: one sheet, or a group's. */
28
+ export declare function instanceScope(root: Element, shapeId: string, template: MasterTemplate, code?: string): Promise<InstanceScope | undefined>;
29
+ //# sourceMappingURL=edit-instance-scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-instance-scope.d.ts","sourceRoot":"","sources":["../../visio/edit-instance-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAO3D;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,SAAS,aAAa,EAAE,CAAC;IACjC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IAC/B,KAAK,CAAC,IAAI,EAAE,YAAY,GAAG,aAAa,CAAC;IACzC,qFAAqF;IACrF,OAAO,CACN,IAAI,EAAE,YAAY,EAClB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,KAAK,EAAE,OAAO,GACZ,YAAY,GAAG,SAAS,CAAC;CAC5B;AA0BD,yDAAyD;AACzD,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,aAAa,CAG/D;AAKD,qFAAqF;AACrF,eAAO,MAAM,eAAe,aAAc,OAAO,KAAG,OACoB,CAAC;AAEzE;;;;GAIG;AACH,wBAAsB,UAAU,CAC/B,QAAQ,EAAE,OAAO,EACjB,QAAQ,EAAE,cAAc,EACxB,IAAI,SAA8B,GAChC,OAAO,CAAC,aAAa,CAAC,CAkDxB;AAED,sFAAsF;AACtF,wBAAsB,aAAa,CAClC,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,cAAc,EACxB,IAAI,SAA8B,GAChC,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAWpC"}
@@ -0,0 +1,52 @@
1
+ import type { MasterTemplate } from './edit-text-instance.js';
2
+ import type { VisioPackage } from './package.js';
3
+ /**
4
+ * Whole-shape commands on stencil (master) instances: what Delete, Duplicate, Paste, ordering,
5
+ * grouping and layers need to know about a shape whose cells mostly live in its master. Recorded
6
+ * with `scripts/record-visio-instance-shape.ps1`.
7
+ */
8
+ export interface StencilInstance {
9
+ instance: Element;
10
+ /** The master's top-level shape. */
11
+ template: Element;
12
+ }
13
+ /** The top-level shapes of a page. */
14
+ export declare const pageShapes: (root: Element) => Element[];
15
+ /** The top-level shape `shapeId` when it is a stencil instance, with its master shape. */
16
+ export declare function stencilInstance(root: Element, shapeId: string, template: MasterTemplate, code?: string): Promise<StencilInstance | undefined>;
17
+ /** The cell in effect for a top-level cell name: the instance's own value, else the master's. */
18
+ export declare function instanceCell(target: StencilInstance, name: string): Element | undefined;
19
+ /** A protection or state flag in effect; an error or non-number counts as set. */
20
+ export declare function instanceFlag(target: StencilInstance, name: string): number;
21
+ /**
22
+ * A detached stand-in for checks written for local shapes: the master shape's attributes with the
23
+ * instance's own style references, and the cells in effect for `names`. Style inheritance then
24
+ * resolves as it does for the instance.
25
+ */
26
+ export declare function instanceView(target: StencilInstance, names: readonly string[]): Element;
27
+ /** Refuse when the shape protects itself against `what`, or sits on a locked layer. */
28
+ export declare function assertInstanceUnlocked(pkg: VisioPackage, pageId: string, target: StencilInstance, locks: readonly string[], what: string): Promise<void>;
29
+ /**
30
+ * Moving, resizing, rotating or flipping a stencil shape is refused while it sits on a locked
31
+ * layer. The interface greys the commands out; this is the check for every other caller.
32
+ */
33
+ export declare function assertInstanceLayerUnlocked(pkg: VisioPackage, root: Element | undefined, pageId: string, shapeId: string): Promise<void>;
34
+ /**
35
+ * Whether a shape is a container or a list, by its own rows or its master's. A master that
36
+ * cannot be read counts as one: the caller then keeps its strictest checks.
37
+ */
38
+ export declare function shapeIsStructural(shape: Element, template: MasterTemplate): Promise<boolean>;
39
+ /** Every shape ID inside a shape, itself included. */
40
+ export declare function shapeIds(shape: Element): string[];
41
+ /**
42
+ * Put an instance's pin at (`x`, `y`): local PinX and PinY, and a refreshed `F="Inh"` cache for
43
+ * every inherited cell that follows them. A group instance takes plain local pins, which is all
44
+ * Visio writes for it; a pin the shape computes itself is refused.
45
+ */
46
+ export declare function placeInstance(target: StencilInstance, x: number, y: number, check: () => void): void;
47
+ /** The pin in effect, in the coordinates of the instance's parent. */
48
+ export declare function instancePin(target: StencilInstance): {
49
+ x: number;
50
+ y: number;
51
+ };
52
+ //# sourceMappingURL=edit-instance-shape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-instance-shape.d.ts","sourceRoot":"","sources":["../../visio/edit-instance-shape.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAI9C;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,oCAAoC;IACpC,QAAQ,EAAE,OAAO,CAAC;CAClB;AAID,sCAAsC;AACtC,eAAO,MAAM,UAAU,SAAU,OAAO,KAAG,OAAO,EAC4B,CAAC;AAE/E,0FAA0F;AAC1F,wBAAsB,eAAe,CACpC,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,cAAc,EACxB,IAAI,SAA8B,GAChC,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CAatC;AAQD,iGAAiG;AACjG,wBAAgB,YAAY,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAGvF;AAED,kFAAkF;AAClF,wBAAgB,YAAY,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAS1E;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAsBvF;AAED,uFAAuF;AACvF,wBAAsB,sBAAsB,CAC3C,GAAG,EAAE,YAAY,EACjB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,eAAe,EACvB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,IAAI,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,CAAC,CASf;AAED;;;GAGG;AACH,wBAAsB,2BAA2B,CAChD,GAAG,EAAE,YAAY,EACjB,IAAI,EAAE,OAAO,GAAG,SAAS,EACzB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAQf;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CACtC,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,cAAc,GACtB,OAAO,CAAC,OAAO,CAAC,CASlB;AAED,sDAAsD;AACtD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAUjD;AAID;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,IAAI,QA4D7F;AAED,sEAAsE;AACtE,wBAAgB,WAAW,CAAC,MAAM,EAAE,eAAe,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAY7E"}
@@ -0,0 +1,52 @@
1
+ import type { MasterTemplate } from './edit-text-instance.js';
2
+ /** One effective ShapeSheet cell of a stencil instance: the master's, and the local override if any. */
3
+ export interface InstanceCell {
4
+ /** ShapeSheet reference names in lower case (`geometry1.x2`, `user.row`, `user.row.value`). */
5
+ names: readonly string[];
6
+ /** XML cell name. */
7
+ name: string;
8
+ section?: {
9
+ name: string;
10
+ index?: string;
11
+ };
12
+ /** The master (or local) row, whose T, N and IX identify a row created on the instance. */
13
+ row?: Element;
14
+ local?: Element;
15
+ inherited?: Element;
16
+ /** True for cells of Rel* geometry rows, whose values are fractions and not lengths. */
17
+ relative: boolean;
18
+ }
19
+ export interface InstanceSheet {
20
+ instance: Element;
21
+ template: Element;
22
+ cells: readonly InstanceCell[];
23
+ byName: ReadonlyMap<string, InstanceCell>;
24
+ }
25
+ /**
26
+ * The effective sheet of a stencil instance over its master shape. Anything this editor cannot
27
+ * merge exactly is refused: foreign data, locally deleted sections or rows, chained masters and,
28
+ * unless `group` says the caller handles the sub-shapes (`edit-instance-scope.ts`), groups.
29
+ */
30
+ export declare function instanceSheet(instance: Element, template: Element,
31
+ /** A member of a group instance: the group itself or one of its sub-shapes. */
32
+ options?: {
33
+ group?: boolean;
34
+ }): InstanceSheet;
35
+ /** The cell whose cached value is in effect: a local one with a value, otherwise the master's. */
36
+ export declare const effectiveNode: (cell: InstanceCell) => Element | undefined;
37
+ /** The formula in effect. A local value without a formula is a constant; `Inh` keeps the master's. */
38
+ export declare function effectiveFormula(cell: InstanceCell): string | undefined;
39
+ /**
40
+ * Write a cell on the instance, creating its section and row when the master's are inherited.
41
+ * `formula` is `Inh` for a refreshed cache of an inherited formula and absent for a local value.
42
+ */
43
+ export declare function writeInstanceCell(sheet: InstanceSheet, cell: InstanceCell, value: string, options?: {
44
+ unit?: string;
45
+ formula?: 'Inh';
46
+ }): Element;
47
+ /** The top-level stencil instance `shapeId` and the master shape it inherits from. */
48
+ export declare function instanceTarget(root: Element, shapeId: string, template: MasterTemplate, code?: string): Promise<{
49
+ instance: Element;
50
+ template: Element;
51
+ } | undefined>;
52
+ //# sourceMappingURL=edit-instance-sheet.d.ts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K,EAAE,MAAM,EACb,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAA;CAAO,GAC9C,OAAO,CAwDT;AAED,sFAAsF;AACtF,wBAAsB,cAAc,CACnC,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,cAAc,EACxB,IAAI,SAA8B,GAChC,OAAO,CAAC;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,CAAC,CAgB/D"}
@@ -0,0 +1,22 @@
1
+ import { VisioPackage } from './package.js';
2
+ import { type VisioPackageLimits } from './package-common.js';
3
+ import type { EditVsdxResult } from './edit.js';
4
+ /**
5
+ * Home > Editing > Layers > Layer Properties: set a page layer's Visible, Print or Lock flag. These
6
+ * are the Visible, Print and Lock cells of the layer's row in the page's Layer section. Omitted
7
+ * flags are left as they are.
8
+ */
9
+ export interface VisioLayerPropertiesEdit {
10
+ type: 'set-layer-properties';
11
+ pageId: string;
12
+ /** The page layer ID (Layer row IX). */
13
+ layerId: string;
14
+ visible?: boolean;
15
+ print?: boolean;
16
+ lock?: boolean;
17
+ }
18
+ /** Copy and validate the command; page admission stays with the transaction. */
19
+ export declare function snapshotLayerProperties(edit: VisioLayerPropertiesEdit): VisioLayerPropertiesEdit;
20
+ /** Layer rows live in pages.xml, in each page's PageSheet; only that part changes. */
21
+ export declare function editVsdxLayerProperties(pkg: VisioPackage, parts: Map<string, Uint8Array>, pages: ReadonlyMap<string, string>, edits: readonly VisioLayerPropertiesEdit[], limits: VisioPackageLimits, maxOutput: number, deadline: number, check: () => void): Promise<EditVsdxResult>;
22
+ //# sourceMappingURL=edit-layer-properties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-layer-properties.d.ts","sourceRoot":"","sources":["../../visio/edit-layer-properties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAQ,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAMjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACxC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAQD,gFAAgF;AAChF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,wBAAwB,GAAG,wBAAwB,CAmBhG;AAED,sFAAsF;AACtF,wBAAsB,uBAAuB,CAC5C,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,EAC9B,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,KAAK,EAAE,SAAS,wBAAwB,EAAE,EAC1C,MAAM,EAAE,kBAAkB,EAC1B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,IAAI,GACf,OAAO,CAAC,cAAc,CAAC,CAiEzB"}
@@ -0,0 +1,39 @@
1
+ import type { VisioMasterInstanceEdit } from './edit-master-instance.js';
2
+ import type { EditVsdxOptions, EditVsdxResult, VisioEdit } from './edit.js';
3
+ /**
4
+ * Drop a master of a built-in stencil (Basic Shapes, Basic Flowchart Shapes, Arrow Shapes...) on
5
+ * a page, as Visio does: the master is copied into the drawing's document stencil the first time,
6
+ * and the page gets an instance of it. `master` is the stencil master id (`rectangle`,
7
+ * `flowchart-process`); `x`/`y` is where its pin lands, in drawing inches from the bottom left.
8
+ * Other edits of the same transaction run after every drop of it, so a drop can be styled or
9
+ * connected in one call.
10
+ */
11
+ export interface VisioStencilMasterDropEdit {
12
+ type: 'drop-stencil-master';
13
+ pageId: string;
14
+ /** ID of the new shape. */
15
+ shapeId: string;
16
+ master: string;
17
+ x: number;
18
+ y: number;
19
+ }
20
+ type Drop = VisioMasterInstanceEdit | VisioStencilMasterDropEdit;
21
+ export declare const isVisioMasterDrop: (edit: {
22
+ type: string;
23
+ }) => edit is Drop;
24
+ /** Copy and validate the command; page admission stays with the transaction. */
25
+ export declare function snapshotStencilMasterDrop(edit: VisioStencilMasterDropEdit): VisioStencilMasterDropEdit;
26
+ /** Runs one `insert-master-instance` alone and reports the master's layers and kind. */
27
+ export type LoneMasterInstance = (bytes: Uint8Array, edit: VisioMasterInstanceEdit, info: {
28
+ layers: string[];
29
+ group: boolean;
30
+ }) => Promise<EditVsdxResult>;
31
+ /**
32
+ * A transaction with master drops: each drop in order (the master added to the drawing when it
33
+ * comes from a built-in stencil, the instance, then its layers), the remaining edits as one
34
+ * transaction after them, and Auto Size last. Any refusal fails the whole call; the caller's
35
+ * bytes are never changed.
36
+ */
37
+ export declare function editVsdxMasterDrops(source: Uint8Array, commands: readonly VisioEdit[], options: EditVsdxOptions, lone: LoneMasterInstance, apply: (bytes: Uint8Array, edits: readonly VisioEdit[]) => Promise<EditVsdxResult>): Promise<EditVsdxResult>;
38
+ export {};
39
+ //# sourceMappingURL=edit-master-drop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-master-drop.d.ts","sourceRoot":"","sources":["../../visio/edit-master-drop.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEzE;;;;;;;GAOG;AACH,MAAM,WAAW,0BAA0B;IAC1C,IAAI,EAAE,qBAAqB,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB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AM,IAAe,EAC7B,wBAAwB,UAAQ,GAC9B,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CA6DtB;AAED,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;CACxC;AACD,wBAAgB,OAAO,CACtB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,EACpC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAC9B,MAAM,EAAE,MAAM,IAAI,GAChB,IAAI,CA2CN"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Name a dropped instance as Visio does: the master's name while no other shape of the page has
3
+ * it, and "Name.ID" after that.
4
+ */
5
+ export declare function nameMasterInstance(root: Element, shape: Element, master: Element): void;
6
+ /**
7
+ * Keep the master's size beside the pin as inherited caches (`F="Inh"`), the form Visio itself
8
+ * saves for an inherited cell and keeps when it saves the drawing again. The instance still
9
+ * follows its master; edits that read a shape's box from the page alone (containers, Align,
10
+ * Position, layout) then take a dropped shape like a drawn one.
11
+ */
12
+ export declare function cacheMasterInstanceSize(shape: Element, base: Element): void;
13
+ /** Names of the master's layers its top-level shape belongs to, in the master's own order. */
14
+ export declare function masterInstanceLayers(master: Element, base: Element): string[];
15
+ //# sourceMappingURL=edit-master-instance-extras.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-master-instance-extras.d.ts","sourceRoot":"","sources":["../../visio/edit-master-instance-extras.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAYvF;AAKD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAgB3E;AAED,8FAA8F;AAC9F,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,EAAE,CAoB7E"}
@@ -0,0 +1,25 @@
1
+ /** One top-level shape of a master, placed in the group Visio makes when the master is dropped. */
2
+ export interface MasterGroupPart {
3
+ shape: Element;
4
+ /** Pin and size in the group's own coordinates, in inches. */
5
+ pinX: number;
6
+ pinY: number;
7
+ width: number;
8
+ height: number;
9
+ }
10
+ export interface MasterGroupLayout {
11
+ width: number;
12
+ height: number;
13
+ parts: readonly MasterGroupPart[];
14
+ }
15
+ /**
16
+ * A master with several top-level shapes has no shape of its own to instance. Visio drops it as a
17
+ * group that names the master: the group is as large as the shapes together, and each shape
18
+ * becomes a sub-shape whose pin and size follow the group's (`Sheet.N!Width*0.25`). Recorded with
19
+ * `scripts/record-visio-group-instance.ps1` (multiroot.vsdx). Turned or flipped shapes are
20
+ * refused: their bounds were not recorded.
21
+ */
22
+ export declare function masterGroupLayout(roots: readonly Element[]): MasterGroupLayout;
23
+ /** A fraction of the group's size, as Visio writes it: `Sheet.4!Width*0.8125`. */
24
+ export declare function groupFraction(groupId: string, cell: 'Width' | 'Height', ratio: number): string;
25
+ //# sourceMappingURL=edit-master-instance-group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-master-instance-group.d.ts","sourceRoot":"","sources":["../../visio/edit-master-instance-group.ts"],"names":[],"mappings":"AAIA,mGAAmG;AACnG,MAAM,WAAW,eAAe;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,SAAS,eAAe,EAAE,CAAC;CAClC;AAkBD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,OAAO,EAAE,GAAG,iBAAiB,CAgC9E;AAED,kFAAkF;AAClF,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE9F"}