ooxml-core 1.2.1 → 1.3.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 (149) hide show
  1. package/dist/{PptxHandler-VQQS4VS6.mjs → PptxHandler-ZPJNHEZZ.mjs} +2 -2
  2. package/dist/automation/index.cjs +2235 -333
  3. package/dist/automation/index.mjs +2235 -333
  4. package/dist/{chunk-5U27IVB7.mjs → chunk-BB55ASTX.mjs} +3 -3
  5. package/dist/{chunk-V2BIGIH4.mjs → chunk-H4TPDZV4.mjs} +1 -1
  6. package/dist/{chunk-5VLNF4OX.mjs → chunk-IVDC75E5.mjs} +1 -1
  7. package/dist/{chunk-XBNSBDNT.mjs → chunk-QPQDLSJQ.mjs} +1 -1
  8. package/dist/{chunk-XSFHGZFH.mjs → chunk-XGLKW3JJ.mjs} +5 -3
  9. package/dist/pptx/automation/index.cjs +4 -2
  10. package/dist/pptx/automation/index.mjs +5 -5
  11. package/dist/pptx/cli/index.cjs +4 -2
  12. package/dist/pptx/cli/index.mjs +4 -4
  13. package/dist/pptx/converter/index.mjs +2 -2
  14. package/dist/pptx/index.cjs +4 -2
  15. package/dist/pptx/index.mjs +5 -5
  16. package/dist/teams/index.cjs +19 -10
  17. package/dist/teams/index.mjs +19 -10
  18. package/dist/visio/clipboard-resources.d.ts +11 -0
  19. package/dist/visio/clipboard-resources.d.ts.map +1 -0
  20. package/dist/visio/clipboard-types.d.ts +26 -0
  21. package/dist/visio/clipboard-types.d.ts.map +1 -0
  22. package/dist/visio/clipboard-xml.d.ts +8 -0
  23. package/dist/visio/clipboard-xml.d.ts.map +1 -0
  24. package/dist/visio/clipboard.d.ts +7 -0
  25. package/dist/visio/clipboard.d.ts.map +1 -0
  26. package/dist/visio/create-document.d.ts +8 -0
  27. package/dist/visio/create-document.d.ts.map +1 -0
  28. package/dist/visio/edit-commands.d.ts +19 -2
  29. package/dist/visio/edit-commands.d.ts.map +1 -1
  30. package/dist/visio/edit-delete.d.ts +9 -0
  31. package/dist/visio/edit-delete.d.ts.map +1 -0
  32. package/dist/visio/edit-duplicate-commands.d.ts +14 -0
  33. package/dist/visio/edit-duplicate-commands.d.ts.map +1 -0
  34. package/dist/visio/edit-duplicate-scope.d.ts +4 -0
  35. package/dist/visio/edit-duplicate-scope.d.ts.map +1 -0
  36. package/dist/visio/edit-duplicate.d.ts +10 -0
  37. package/dist/visio/edit-duplicate.d.ts.map +1 -0
  38. package/dist/visio/edit-formatting-cell-admission.d.ts +3 -0
  39. package/dist/visio/edit-formatting-cell-admission.d.ts.map +1 -0
  40. package/dist/visio/edit-formatting-commands.d.ts +46 -0
  41. package/dist/visio/edit-formatting-commands.d.ts.map +1 -0
  42. package/dist/visio/edit-formatting-font.d.ts +6 -0
  43. package/dist/visio/edit-formatting-font.d.ts.map +1 -0
  44. package/dist/visio/edit-formatting-paint-scope.d.ts +6 -0
  45. package/dist/visio/edit-formatting-paint-scope.d.ts.map +1 -0
  46. package/dist/visio/edit-formatting-paint.d.ts +6 -0
  47. package/dist/visio/edit-formatting-paint.d.ts.map +1 -0
  48. package/dist/visio/edit-formatting-rows.d.ts +14 -0
  49. package/dist/visio/edit-formatting-rows.d.ts.map +1 -0
  50. package/dist/visio/edit-formatting-scope.d.ts +6 -0
  51. package/dist/visio/edit-formatting-scope.d.ts.map +1 -0
  52. package/dist/visio/edit-formatting-text.d.ts +8 -0
  53. package/dist/visio/edit-formatting-text.d.ts.map +1 -0
  54. package/dist/visio/edit-formatting.d.ts +12 -0
  55. package/dist/visio/edit-formatting.d.ts.map +1 -0
  56. package/dist/visio/edit-geometry.d.ts.map +1 -1
  57. package/dist/visio/edit-paste-commands.d.ts +15 -0
  58. package/dist/visio/edit-paste-commands.d.ts.map +1 -0
  59. package/dist/visio/edit-paste.d.ts +5 -0
  60. package/dist/visio/edit-paste.d.ts.map +1 -0
  61. package/dist/visio/edit-recalculate.d.ts +3 -1
  62. package/dist/visio/edit-recalculate.d.ts.map +1 -1
  63. package/dist/visio/edit-resize-anchor.d.ts +8 -0
  64. package/dist/visio/edit-resize-anchor.d.ts.map +1 -0
  65. package/dist/visio/edit-scope.d.ts.map +1 -1
  66. package/dist/visio/edit-shape-create.d.ts +1 -1
  67. package/dist/visio/edit-shape-create.d.ts.map +1 -1
  68. package/dist/visio/edit-shape-order.d.ts +7 -0
  69. package/dist/visio/edit-shape-order.d.ts.map +1 -0
  70. package/dist/visio/edit-style-admission.d.ts +17 -0
  71. package/dist/visio/edit-style-admission.d.ts.map +1 -0
  72. package/dist/visio/edit-text-scope.d.ts +7 -0
  73. package/dist/visio/edit-text-scope.d.ts.map +1 -0
  74. package/dist/visio/edit-text.d.ts +1 -1
  75. package/dist/visio/edit-text.d.ts.map +1 -1
  76. package/dist/visio/edit.d.ts +1 -1
  77. package/dist/visio/edit.d.ts.map +1 -1
  78. package/dist/visio/index.cjs +3245 -1077
  79. package/dist/visio/index.d.ts +3 -1
  80. package/dist/visio/index.d.ts.map +1 -1
  81. package/dist/visio/index.mjs +3241 -1079
  82. package/dist/visio/line-pattern.d.ts +1 -1
  83. package/dist/visio/line-pattern.d.ts.map +1 -1
  84. package/dist/visio/line-style.d.ts.map +1 -1
  85. package/dist/visio/model.d.ts +23 -3
  86. package/dist/visio/model.d.ts.map +1 -1
  87. package/dist/visio/parser.d.ts.map +1 -1
  88. package/dist/visio/plain-text.d.ts +5 -0
  89. package/dist/visio/plain-text.d.ts.map +1 -0
  90. package/dist/visio/resize-anchor.d.ts +27 -0
  91. package/dist/visio/resize-anchor.d.ts.map +1 -0
  92. package/dist/visio/source-paint.d.ts +5 -0
  93. package/dist/visio/source-paint.d.ts.map +1 -0
  94. package/dist/visio/style.d.ts.map +1 -1
  95. package/dist/visio/theme-root.d.ts.map +1 -1
  96. package/dist/visio/ui/contract.d.ts +10 -6
  97. package/dist/visio/ui/contract.d.ts.map +1 -1
  98. package/dist/visio/ui/draw-plan.d.ts +32 -0
  99. package/dist/visio/ui/draw-plan.d.ts.map +1 -0
  100. package/dist/visio/ui/edit-commands.d.ts.map +1 -1
  101. package/dist/visio/ui/formatting.d.ts +28 -0
  102. package/dist/visio/ui/formatting.d.ts.map +1 -0
  103. package/dist/visio/ui/index.cjs +1305 -15
  104. package/dist/visio/ui/index.d.ts +15 -0
  105. package/dist/visio/ui/index.d.ts.map +1 -1
  106. package/dist/visio/ui/index.mjs +1261 -16
  107. package/dist/visio/ui/line-dash.d.ts +4 -0
  108. package/dist/visio/ui/line-dash.d.ts.map +1 -0
  109. package/dist/visio/ui/marquee.d.ts +15 -0
  110. package/dist/visio/ui/marquee.d.ts.map +1 -0
  111. package/dist/visio/ui/page-edit.d.ts.map +1 -1
  112. package/dist/visio/ui/scene-validation.d.ts.map +1 -1
  113. package/dist/visio/ui/selection.d.ts +12 -0
  114. package/dist/visio/ui/selection.d.ts.map +1 -0
  115. package/dist/visio/ui/shape-arrange.d.ts +17 -0
  116. package/dist/visio/ui/shape-arrange.d.ts.map +1 -0
  117. package/dist/visio/ui/shape-clipboard.d.ts +10 -0
  118. package/dist/visio/ui/shape-clipboard.d.ts.map +1 -0
  119. package/dist/visio/ui/shape-duplicate.d.ts +5 -0
  120. package/dist/visio/ui/shape-duplicate.d.ts.map +1 -0
  121. package/dist/visio/ui/shape-formatting.d.ts +14 -0
  122. package/dist/visio/ui/shape-formatting.d.ts.map +1 -0
  123. package/dist/visio/ui/shape-move.d.ts +14 -0
  124. package/dist/visio/ui/shape-move.d.ts.map +1 -0
  125. package/dist/visio/ui/shape-order.d.ts +4 -0
  126. package/dist/visio/ui/shape-order.d.ts.map +1 -0
  127. package/dist/visio/ui/shape-resize.d.ts +61 -0
  128. package/dist/visio/ui/shape-resize.d.ts.map +1 -0
  129. package/dist/visio/ui/size-position.d.ts +19 -0
  130. package/dist/visio/ui/size-position.d.ts.map +1 -0
  131. package/dist/visio/ui/snapshot-scene.d.ts.map +1 -1
  132. package/dist/visio/ui/svg-stroke.d.ts +8 -0
  133. package/dist/visio/ui/svg-stroke.d.ts.map +1 -0
  134. package/dist/visio/ui/text-replace-selection.d.ts +9 -0
  135. package/dist/visio/ui/text-replace-selection.d.ts.map +1 -0
  136. package/dist/visio/ui/text-replace-snapshot.d.ts +14 -0
  137. package/dist/visio/ui/text-replace-snapshot.d.ts.map +1 -0
  138. package/dist/visio/ui/text-replace-types.d.ts +48 -0
  139. package/dist/visio/ui/text-replace-types.d.ts.map +1 -0
  140. package/dist/visio/ui/text-replace.d.ts +18 -0
  141. package/dist/visio/ui/text-replace.d.ts.map +1 -0
  142. package/dist/xlsx/formula/lexemes.d.ts.map +1 -1
  143. package/dist/xlsx/index.cjs +18 -9
  144. package/dist/xlsx/index.mjs +18 -9
  145. package/dist/xlsx/load/index.cjs +18 -9
  146. package/dist/xlsx/load/index.mjs +18 -9
  147. package/dist/xlsx/ui/index.cjs +18 -9
  148. package/dist/xlsx/ui/index.mjs +18 -9
  149. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ import type { VisioStyle } from '../model.js';
2
+ /** Native dash lengths in physical page inches, including fixed square-cap dots. */
3
+ export declare function visioLineDashLengths(style: Pick<VisioStyle, 'lineDash' | 'lineWidth' | 'lineDashDotLength'>): number[] | undefined;
4
+ //# sourceMappingURL=line-dash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"line-dash.d.ts","sourceRoot":"","sources":["../../../visio/ui/line-dash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,oFAAoF;AACpF,wBAAgB,oBAAoB,CACnC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,WAAW,GAAG,mBAAmB,CAAC,GACrE,MAAM,EAAE,GAAG,SAAS,CAItB"}
@@ -0,0 +1,15 @@
1
+ import type { VisioPage, VisioShape } from '../model.js';
2
+ import type { VisioShapeSelection } from './contract.js';
3
+ import type { VisioPagePoint } from './shape-move.js';
4
+ export interface VisioPageBox {
5
+ x: number;
6
+ y: number;
7
+ width: number;
8
+ height: number;
9
+ }
10
+ export declare function visioMarqueeBox(start: VisioPagePoint, end: VisioPagePoint): VisioPageBox | undefined;
11
+ /** A transformed rectangular selection extent in physical, downward-positive page inches. */
12
+ export declare function visioShapePageBox(page: VisioPage, shape: VisioShape): VisioPageBox | undefined;
13
+ /** Full enclosure of visible current-page top-level shapes; background sources are excluded. */
14
+ export declare function visioMarqueeSelection(page: VisioPage, box: VisioPageBox, visible?: WeakMap<VisioShape, boolean>): VisioShapeSelection[];
15
+ //# sourceMappingURL=marquee.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marquee.d.ts","sourceRoot":"","sources":["../../../visio/ui/marquee.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,WAAW,YAAY;IAC5B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf;AACD,wBAAgB,eAAe,CAC9B,KAAK,EAAE,cAAc,EACrB,GAAG,EAAE,cAAc,GACjB,YAAY,GAAG,SAAS,CAS1B;AACD,6FAA6F;AAC7F,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,GAAG,YAAY,GAAG,SAAS,CAsB9F;AACD,gGAAgG;AAChG,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,SAAS,EACf,GAAG,EAAE,YAAY,EACjB,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,GACpC,mBAAmB,EAAE,CAmBvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"page-edit.d.ts","sourceRoot":"","sources":["../../../visio/ui/page-edit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzD,qFAAqF;AACrF,wBAAgB,sBAAsB,CACrC,QAAQ,EAAE,aAAa,EACvB,WAAW,EAAE,MAAM,GACjB,eAAe,CAYjB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,SAAS,CAyClF"}
1
+ {"version":3,"file":"page-edit.d.ts","sourceRoot":"","sources":["../../../visio/ui/page-edit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzD,qFAAqF;AACrF,wBAAgB,sBAAsB,CACrC,QAAQ,EAAE,aAAa,EACvB,WAAW,EAAE,MAAM,GACjB,eAAe,CAYjB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,SAAS,CA0ClF"}
@@ -1 +1 @@
1
- {"version":3,"file":"scene-validation.d.ts","sourceRoot":"","sources":["../../../visio/ui/scene-validation.ts"],"names":[],"mappings":"AACA,OAAO,EAGN,KAAK,aAAa,EAGlB,MAAM,UAAU,CAAC;AAIlB,eAAO,MAAM,eAAe,QAAmB,CAAC;AAUhD,sFAAsF;AACtF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAkSjE"}
1
+ {"version":3,"file":"scene-validation.d.ts","sourceRoot":"","sources":["../../../visio/ui/scene-validation.ts"],"names":[],"mappings":"AACA,OAAO,EAGN,KAAK,aAAa,EAGlB,MAAM,UAAU,CAAC;AAIlB,eAAO,MAAM,eAAe,QAAmB,CAAC;AAUhD,sFAAsF;AACtF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CA8TjE"}
@@ -0,0 +1,12 @@
1
+ import type { VisioDocument, VisioShape } from '../model.js';
2
+ import type { VisioShapeSelection } from './contract.js';
3
+ export declare const EMPTY_SELECTION: readonly VisioShapeSelection[];
4
+ export declare const selectionKey: (shape: Pick<VisioShapeSelection, 'id' | 'pageId'>, pageId: string) => string;
5
+ /** Omitted source page means the displayed page; background identities remain distinct. */
6
+ export declare function visioSelectionIsOnPage(selection: Pick<VisioShapeSelection, 'pageId'> | null | undefined, pageId: string): boolean;
7
+ export declare function sameSelection(left: readonly VisioShapeSelection[], right: readonly VisioShapeSelection[]): boolean;
8
+ /** Snapshot displayed targets once, and keep selected groups from also selecting descendants. */
9
+ export declare function snapshotSelection(model: VisioDocument | null, pageIndex: number, input: readonly VisioShapeSelection[], visible: WeakMap<VisioShape, boolean>): readonly VisioShapeSelection[];
10
+ /** Rendering eligibility shared by selection and SVG containers; no format interpretation. */
11
+ export declare function hasVisibleShapeContent(shape: VisioShape, visible: WeakMap<VisioShape, boolean> | undefined, cache?: WeakMap<VisioShape, boolean>): boolean;
12
+ //# sourceMappingURL=selection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../visio/ui/selection.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,eAAO,MAAM,eAAe,EAAE,SAAS,mBAAmB,EAAsB,CAAC;AACjF,eAAO,MAAM,YAAY,UAAW,IAAI,CAAC,mBAAmB,EAAE,IAAI,GAAG,QAAQ,CAAC,UAAU,MAAM,WAC3C,CAAC;AAEpD,2FAA2F;AAC3F,wBAAgB,sBAAsB,CACrC,SAAS,EAAE,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,GAAG,IAAI,GAAG,SAAS,EACjE,MAAM,EAAE,MAAM,GACZ,OAAO,CAET;AACD,wBAAgB,aAAa,CAC5B,IAAI,EAAE,SAAS,mBAAmB,EAAE,EACpC,KAAK,EAAE,SAAS,mBAAmB,EAAE,GACnC,OAAO,CAQT;AAED,iGAAiG;AACjG,wBAAgB,iBAAiB,CAChC,KAAK,EAAE,aAAa,GAAG,IAAI,EAC3B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,SAAS,mBAAmB,EAAE,EACrC,OAAO,EAAE,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,GACnC,SAAS,mBAAmB,EAAE,CA8ChC;AAED,8FAA8F;AAC9F,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,GAAG,SAAS,EACjD,KAAK,+BAAqC,GACxC,OAAO,CAeT"}
@@ -0,0 +1,17 @@
1
+ import type { VisioEdit } from '../edit-commands.js';
2
+ import type { VisioPage } from '../model.js';
3
+ export type VisioArrangement = {
4
+ type: 'align';
5
+ edge: 'left' | 'center' | 'right' | 'top' | 'middle' | 'bottom';
6
+ } | {
7
+ type: 'distribute';
8
+ axis: 'horizontal' | 'vertical';
9
+ };
10
+ /**
11
+ * Align to the first selected primary shape, or distribute equal edge gaps without guide glue.
12
+ * https://learn.microsoft.com/en-us/office/vba/api/visio.selection.align
13
+ * https://learn.microsoft.com/en-us/office/vba/api/visio.selection.distribute
14
+ * Coarse candidates only: source locks, glue, formulas and dependencies remain authoritative.
15
+ */
16
+ export declare function visioArrangeCommands(page: VisioPage, shapeIds: readonly string[], action: VisioArrangement): VisioEdit[] | undefined;
17
+ //# sourceMappingURL=shape-arrange.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shape-arrange.d.ts","sourceRoot":"","sources":["../../../visio/ui/shape-arrange.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,UAAU,CAAC;AAItD,MAAM,MAAM,gBAAgB,GACzB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAA;CAAE,GAClF;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,YAAY,GAAG,UAAU,CAAA;CAAE,CAAC;AAsD3D;;;;;GAKG;AACH,wBAAgB,oBAAoB,CACnC,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,MAAM,EAAE,gBAAgB,GACtB,SAAS,EAAE,GAAG,SAAS,CAsEzB"}
@@ -0,0 +1,10 @@
1
+ import type { VisioPage, VisioShape } from '../model.js';
2
+ import type { VisioClipboardSnapshot } from '../clipboard-types.js';
3
+ import type { VisioPasteShapesEdit } from '../edit-paste-commands.js';
4
+ /** Coarse scene eligibility only; capture validates source locks, formulas and resources. */
5
+ export declare function visioClipboardShape(page: VisioPage, shapeId: string): VisioShape | undefined;
6
+ export declare function visioPasteCommand(page: VisioPage, value: VisioClipboardSnapshot, offset?: {
7
+ x: number;
8
+ y: number;
9
+ }): VisioPasteShapesEdit | undefined;
10
+ //# sourceMappingURL=shape-clipboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shape-clipboard.d.ts","sourceRoot":"","sources":["../../../visio/ui/shape-clipboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAInE,6FAA6F;AAC7F,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAa5F;AACD,wBAAgB,iBAAiB,CAChC,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,sBAAsB,EAC7B,MAAM,GAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAA0B,GACtD,oBAAoB,GAAG,SAAS,CAsBlC"}
@@ -0,0 +1,5 @@
1
+ import type { VisioPage } from '../model.js';
2
+ import type { VisioDuplicateShapesEdit } from '../edit-duplicate-commands.js';
3
+ /** Allocate against the complete page tree; source guards remain authoritative. */
4
+ export declare function visioDuplicateCommand(page: VisioPage, shapeIds: readonly string[]): VisioDuplicateShapesEdit | undefined;
5
+ //# sourceMappingURL=shape-duplicate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shape-duplicate.d.ts","sourceRoot":"","sources":["../../../visio/ui/shape-duplicate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAI3E,mFAAmF;AACnF,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,SAAS,MAAM,EAAE,GACzB,wBAAwB,GAAG,SAAS,CAuCtC"}
@@ -0,0 +1,14 @@
1
+ import type { VisioShape } from '../model.js';
2
+ export interface VisioShapeFormattingState {
3
+ linePattern: number | undefined;
4
+ fillPatternIndex: number | undefined;
5
+ fillBackgroundColor: string | undefined;
6
+ fillForegroundTransparency: number | undefined;
7
+ fillBackgroundTransparency: number | undefined;
8
+ /** Mixed foreground/background values are undefined, including within one shape. */
9
+ fillTransparency: number | undefined;
10
+ lineTransparency: number | undefined;
11
+ }
12
+ /** Source paint values stay independent of gradient and bitmap rendering multipliers. */
13
+ export declare function visioShapeFormattingState(shapes: readonly VisioShape[]): VisioShapeFormattingState;
14
+ //# sourceMappingURL=shape-formatting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shape-formatting.d.ts","sourceRoot":"","sources":["../../../visio/ui/shape-formatting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,WAAW,yBAAyB;IACzC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,0BAA0B,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/C,0BAA0B,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/C,oFAAoF;IACpF,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AACD,yFAAyF;AACzF,wBAAgB,yBAAyB,CACxC,MAAM,EAAE,SAAS,UAAU,EAAE,GAC3B,yBAAyB,CA8B3B"}
@@ -0,0 +1,14 @@
1
+ import type { VisioEdit } from '../edit-commands.js';
2
+ import type { VisioMatrix, VisioPage, VisioShape } from '../model.js';
3
+ export interface VisioPagePoint {
4
+ x: number;
5
+ y: number;
6
+ }
7
+ /** Source admission remains authoritative for locks, formulas, geometry and dependencies. */
8
+ export declare function visioMovementShape(page: VisioPage, id: string): VisioShape | undefined;
9
+ /** Client points have been converted to physical SVG page inches; commands use upward y. */
10
+ export declare function visioPageDragDelta(start: VisioPagePoint, end: VisioPagePoint): VisioPagePoint;
11
+ export declare function visioMovePreviewTransform(shape: VisioShape, delta: VisioPagePoint): VisioMatrix | undefined;
12
+ /** One common translation over the entire eligible selection; callers commit it atomically. */
13
+ export declare function visioMoveCommands(page: VisioPage, ids: readonly string[], delta: VisioPagePoint): VisioEdit[] | undefined;
14
+ //# sourceMappingURL=shape-move.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shape-move.d.ts","sourceRoot":"","sources":["../../../visio/ui/shape-move.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAInE,MAAM,WAAW,cAAc;IAC9B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACV;AACD,6FAA6F;AAC7F,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAoBtF;AACD,4FAA4F;AAC5F,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,cAAc,GAAG,cAAc,CAE7F;AACD,wBAAgB,yBAAyB,CACxC,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,cAAc,GACnB,WAAW,GAAG,SAAS,CAKzB;AACD,+FAA+F;AAC/F,wBAAgB,iBAAiB,CAChC,IAAI,EAAE,SAAS,EACf,GAAG,EAAE,SAAS,MAAM,EAAE,EACtB,KAAK,EAAE,cAAc,GACnB,SAAS,EAAE,GAAG,SAAS,CA6BzB"}
@@ -0,0 +1,4 @@
1
+ import type { VisioPage, VisioShape } from '../model.js';
2
+ /** Coarse scene admission; source display bands and protection are checked by editVsdx. */
3
+ export declare function visioOrderingShape(page: VisioPage, shapeId: string): VisioShape | undefined;
4
+ //# sourceMappingURL=shape-order.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shape-order.d.ts","sourceRoot":"","sources":["../../../visio/ui/shape-order.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtD,2FAA2F;AAC3F,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAc3F"}
@@ -0,0 +1,61 @@
1
+ import type { VisioPage, VisioShape, VisioMatrix } from '../model.js';
2
+ import type { VisioEdit } from '../edit-commands.js';
3
+ import { type VisioResizeAnchor } from '../resize-anchor.js';
4
+ import { type VisioPagePoint } from './shape-move.js';
5
+ export declare const VISIO_RESIZE_HANDLES: readonly [{
6
+ readonly id: 'sw';
7
+ readonly x: 0;
8
+ readonly y: 0;
9
+ }, {
10
+ readonly id: 's';
11
+ readonly x: 0.5;
12
+ readonly y: 0;
13
+ }, {
14
+ readonly id: 'se';
15
+ readonly x: 1;
16
+ readonly y: 0;
17
+ }, {
18
+ readonly id: 'e';
19
+ readonly x: 1;
20
+ readonly y: 0.5;
21
+ }, {
22
+ readonly id: 'ne';
23
+ readonly x: 1;
24
+ readonly y: 1;
25
+ }, {
26
+ readonly id: 'n';
27
+ readonly x: 0.5;
28
+ readonly y: 1;
29
+ }, {
30
+ readonly id: 'nw';
31
+ readonly x: 0;
32
+ readonly y: 1;
33
+ }, {
34
+ readonly id: 'w';
35
+ readonly x: 0;
36
+ readonly y: 0.5;
37
+ }];
38
+ export type VisioResizeHandle = (typeof VISIO_RESIZE_HANDLES)[number]['id'];
39
+ export interface VisioResizeFrame {
40
+ width: number;
41
+ height: number;
42
+ transform: VisioMatrix;
43
+ pinX: number;
44
+ pinY: number;
45
+ }
46
+ /** Only orthonormal ordinary local shapes have a scene-proven rectangular resize frame. */
47
+ export declare function visioResizeShape(page: VisioPage, id: string): VisioShape | undefined;
48
+ export declare function visioResizeFrame(shape: VisioShape, size: {
49
+ width: number;
50
+ height: number;
51
+ }, anchor: VisioResizeAnchor): VisioResizeFrame | undefined;
52
+ /** Drag in physical page coordinates along the saved rotated/reflected local axes.
53
+ * Crossing the opposite handle clamps at 1/16 physical inch; it does not silently change flips.
54
+ */
55
+ export declare function visioResizeDrag(page: VisioPage, id: string, handle: VisioResizeHandle, start: VisioPagePoint, end: VisioPagePoint): {
56
+ frame: VisioResizeFrame;
57
+ command: Extract<VisioEdit, {
58
+ type: 'resize-shape';
59
+ }>;
60
+ } | undefined;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AAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACb;AACD,2FAA2F;AAC3F,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAMpF;AACD,wBAAgB,gBAAgB,CAC/B,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACvC,MAAM,EAAE,iBAAiB,GACvB,gBAAgB,GAAG,SAAS,CAgB9B;AACD;;GAEG;AACH,wBAAgB,eAAe,CAC9B,IAAI,EAAE,SAAS,EACf,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,iBAAiB,EACzB,KAAK,EAAE,cAAc,EACrB,GAAG,EAAE,cAAc,GACjB;IAAE,KAAK,EAAE,gBAAgB,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC,SAAS,EAAE;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC,CAAA;CAAE,GAAG,SAAS,CAuChG"}
@@ -0,0 +1,19 @@
1
+ import type { VisioEdit } from '../edit-commands.js';
2
+ import type { VisioPage } from '../model.js';
3
+ export type VisioSizePositionField = 'x' | 'y' | 'width' | 'height' | 'angle';
4
+ export interface VisioSizePositionState {
5
+ readonly pageId: string;
6
+ readonly shapeId: string;
7
+ /** Drawing inches, measured from the bottom-left page origin. */
8
+ readonly x: number;
9
+ readonly y: number;
10
+ readonly width: number;
11
+ readonly height: number;
12
+ /** Degrees, positive counterclockwise. */
13
+ readonly angle: number;
14
+ }
15
+ /** Coarse scene eligibility only. Source formulas, locks and dependencies remain authoritative. */
16
+ export declare function visioSizePositionState(page: VisioPage, id: string): VisioSizePositionState | undefined;
17
+ /** Numeric pane input already uses drawing inches/degrees. No-op input keeps formulas untouched. */
18
+ export declare function visioSizePositionCommand(page: VisioPage, id: string, field: VisioSizePositionField, value: number): VisioEdit[] | undefined;
19
+ //# sourceMappingURL=size-position.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"size-position.d.ts","sourceRoot":"","sources":["../../../visio/ui/size-position.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,MAAM,MAAM,sBAAsB,GAAG,GAAG,GAAG,GAAG,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC9E,MAAM,WAAW,sBAAsB;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,iEAAiE;IACjE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,0CAA0C;IAC1C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACvB;AAGD,mGAAmG;AACnG,wBAAgB,sBAAsB,CACrC,IAAI,EAAE,SAAS,EACf,EAAE,EAAE,MAAM,GACR,sBAAsB,GAAG,SAAS,CAoBpC;AAED,oGAAoG;AACpG,wBAAgB,wBAAwB,CACvC,IAAI,EAAE,SAAS,EACf,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,sBAAsB,EAC7B,KAAK,EAAE,MAAM,GACX,SAAS,EAAE,GAAG,SAAS,CA8BzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"snapshot-scene.d.ts","sourceRoot":"","sources":["../../../visio/ui/snapshot-scene.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,aAAa,EAOb,MAAM,UAAU,CAAC;AAwBlB;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,GAAG,aAAa,CAoNrE"}
1
+ {"version":3,"file":"snapshot-scene.d.ts","sourceRoot":"","sources":["../../../visio/ui/snapshot-scene.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,aAAa,EAOb,MAAM,UAAU,CAAC;AAwBlB;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,GAAG,aAAa,CAuOrE"}
@@ -0,0 +1,8 @@
1
+ import type { VisioStyle } from '../model.js';
2
+ /**
3
+ * Native SVG export substitutes 0.75 points for an exactly zero saved line weight.
4
+ * Keep this output policy separate from source values and raster/device hairlines.
5
+ * Nonzero weights, including weights below 0.75 points, remain literal.
6
+ */
7
+ export declare function visioSvgStrokeStyle(style: VisioStyle): VisioStyle;
8
+ //# sourceMappingURL=svg-stroke.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"svg-stroke.d.ts","sourceRoot":"","sources":["../../../visio/ui/svg-stroke.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CAEjE"}
@@ -0,0 +1,9 @@
1
+ import type { VisioDocument } from '../model.js';
2
+ import type { VisioShapeSelection } from './contract.js';
3
+ import { type VisioTextOccurrence } from './text-replace-types.js';
4
+ /** Own a bounded navigation target. The controller still applies visibility and intent guards. */
5
+ export declare function visioTextOccurrenceSelection(model: VisioDocument, occurrence: VisioTextOccurrence): {
6
+ readonly pageIndex: number;
7
+ readonly selection: VisioShapeSelection;
8
+ } | undefined;
9
+ //# sourceMappingURL=text-replace-selection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-replace-selection.d.ts","sourceRoot":"","sources":["../../../visio/ui/text-replace-selection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEjF,kGAAkG;AAClG,wBAAgB,4BAA4B,CAC3C,KAAK,EAAE,aAAa,EACpB,UAAU,EAAE,mBAAmB,GAC7B;IAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAA;CAAE,GAAG,SAAS,CAkBrF"}
@@ -0,0 +1,14 @@
1
+ import type { VisioDocument } from '../model.js';
2
+ import { type VisioTextReplaceScope } from './text-replace-types.js';
3
+ export interface ReplaceEntry {
4
+ pageId: string;
5
+ shapeId: string;
6
+ name: string;
7
+ pageIndex: number;
8
+ text: string;
9
+ end: number;
10
+ }
11
+ export declare function snapshotReplaceScope(input: VisioTextReplaceScope): VisioTextReplaceScope;
12
+ /** Own only text and identities; no geometry, previews, host iterators or mutable shape records. */
13
+ export declare function replaceEntries(model: VisioDocument, scope: VisioTextReplaceScope, requirePage?: boolean): ReplaceEntry[];
14
+ //# sourceMappingURL=text-replace-snapshot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-replace-snapshot.d.ts","sourceRoot":"","sources":["../../../visio/ui/text-replace-snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAc,MAAM,UAAU,CAAC;AAC1D,OAAO,EAKN,KAAK,qBAAqB,EAC1B,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,YAAY;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACZ;AACD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,qBAAqB,GAAG,qBAAqB,CAgCxF;AAED,oGAAoG;AACpG,wBAAgB,cAAc,CAC7B,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,qBAAqB,EAC5B,WAAW,UAAO,GAChB,YAAY,EAAE,CAsEhB"}
@@ -0,0 +1,48 @@
1
+ import type { VisioTextEdit } from '../edit-commands.js';
2
+ /** UTF-16 bounds; oversized inputs fail instead of producing partial replacements. */
3
+ export declare const VISIO_TEXT_REPLACE_LIMITS: Readonly<{
4
+ query: 256;
5
+ replacement: 32768;
6
+ text: 2000000;
7
+ names: 1000000;
8
+ output: 1000000;
9
+ matches: 10000;
10
+ commands: 1000;
11
+ shapes: 25000;
12
+ pages: 256;
13
+ depth: 64;
14
+ }>;
15
+ export interface VisioTextReplaceScope {
16
+ query: string;
17
+ /** Literal case-sensitive matching. Unicode case folding is not supported. */
18
+ matchCase: true;
19
+ scope: 'selection' | 'current-page' | 'all-pages';
20
+ pageId: string;
21
+ selection?: readonly {
22
+ id: string;
23
+ pageId?: string;
24
+ }[];
25
+ }
26
+ export interface VisioTextOccurrence {
27
+ readonly pageId: string;
28
+ readonly shapeId: string;
29
+ /** Zero-based UTF-16 range, excluding end. */
30
+ readonly start: number;
31
+ readonly end: number;
32
+ }
33
+ export interface VisioTextReplaceRequest extends VisioTextReplaceScope {
34
+ replacement: string;
35
+ mode: 'current' | 'all';
36
+ /** Omitted selects the first occurrence. Supplied ranges must still match exactly. */
37
+ current?: VisioTextOccurrence;
38
+ }
39
+ export interface VisioTextReplacePlan {
40
+ readonly occurrences: readonly VisioTextOccurrence[];
41
+ readonly replacementCount: number;
42
+ readonly edits: readonly Readonly<VisioTextEdit>[];
43
+ readonly nextOccurrence: VisioTextOccurrence | undefined;
44
+ }
45
+ export declare const textReplaceError: (message: string) => never;
46
+ export declare function replaceString(value: unknown, maximum: number, label: string): string;
47
+ export declare function replaceIdentity(value: unknown): string;
48
+ //# sourceMappingURL=text-replace-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-replace-types.d.ts","sourceRoot":"","sources":["../../../visio/ui/text-replace-types.ts"],"names":[],"mappings":"AAAA,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G,MAAM,CAIpF;AACD,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAItD"}
@@ -0,0 +1,18 @@
1
+ import type { VisioDocument } from '../model.js';
2
+ import type { VisioTextEdit } from '../edit-commands.js';
3
+ import { type VisioTextOccurrence, type VisioTextReplacePlan, type VisioTextReplaceRequest, type VisioTextReplaceScope } from './text-replace-types.js';
4
+ export type { VisioTextOccurrence, VisioTextReplacePlan, VisioTextReplaceRequest, VisioTextReplaceScope, } from './text-replace-types.js';
5
+ export { VISIO_TEXT_REPLACE_LIMITS } from './text-replace-types.js';
6
+ export { visioTextOccurrenceSelection } from './text-replace-selection.js';
7
+ /** Full literal occurrences, independent of the bounded preview-oriented Find index. */
8
+ export declare function visioTextReplaceOccurrences(model: VisioDocument, input: VisioTextReplaceScope): readonly VisioTextOccurrence[];
9
+ /** Next occurrence in bounded source order, wrapping after the last occurrence. */
10
+ export declare function visioTextReplaceFindNext(model: VisioDocument, input: VisioTextReplaceScope, current?: VisioTextOccurrence): VisioTextOccurrence | undefined;
11
+ /** Selected groups include their subtree, deduplicated in ordered-selection/source order.
12
+ * Source editing remains authoritative for rich text, fields, inheritance and protection.
13
+ * Callers must also bind application source revisions when applying these scene-derived plans.
14
+ */
15
+ export declare function visioTextReplacePlan(model: VisioDocument, input: VisioTextReplaceRequest): VisioTextReplacePlan;
16
+ /** Reject forged and stale scene plans before returning independently owned atomic commands. */
17
+ export declare function visioTextReplaceCommands(model: VisioDocument, plan: VisioTextReplacePlan): VisioTextEdit[];
18
+ //# sourceMappingURL=text-replace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-replace.d.ts","sourceRoot":"","sources":["../../../visio/ui/text-replace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EAKN,KAAK,mBAAmB,EACxB,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AAS,CAmCrD;AAED,0FAA0F;AAC1F,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAclD"}
@@ -2268,14 +2268,13 @@ function splitSheets(text3) {
2268
2268
  if (book !== void 0) out.book = book;
2269
2269
  return out;
2270
2270
  }
2271
- var PREFIX_AT = /(\[\d+\])?([A-Za-z0-9_.\u00A1-\uFFFF]+)(?::([A-Za-z0-9_.\u00A1-\uFFFF]+))?!/y;
2272
2271
  function readPrefix(source2, at) {
2273
2272
  const ch = source2[at];
2274
2273
  if (ch === "'") {
2275
2274
  const quoted = readQuoted(source2, at);
2276
2275
  if (source2[at + quoted.length] !== "!") return void 0;
2277
- const length = quoted.length + 1;
2278
- return { prefix: { text: source2.slice(at, at + length), ...splitSheets(quoted.name) }, length };
2276
+ const length2 = quoted.length + 1;
2277
+ return { prefix: { text: source2.slice(at, at + length2), ...splitSheets(quoted.name) }, length: length2 };
2279
2278
  }
2280
2279
  let i2 = at;
2281
2280
  if (ch === "[") {
@@ -2284,13 +2283,23 @@ function readPrefix(source2, at) {
2284
2283
  if (i2 === at + 1 || source2[i2] !== "]") return void 0;
2285
2284
  i2++;
2286
2285
  }
2286
+ const sheetFrom = i2;
2287
2287
  while (i2 < source2.length && isSheetCharCode(source2.charCodeAt(i2))) i2++;
2288
- if (source2[i2] !== "!" && source2[i2] !== ":") return void 0;
2289
- const m = matchAt(PREFIX_AT, source2, at);
2290
- if (!m) return void 0;
2291
- if (!m[1] && /^\d/.test(m[2] ?? "") && !m[3]) return void 0;
2292
- const raw2 = m[0].slice(0, -1);
2293
- return { prefix: { text: m[0], ...splitSheets(raw2) }, length: m[0].length };
2288
+ if (i2 === sheetFrom) return void 0;
2289
+ let lastFrom = -1;
2290
+ if (source2[i2] === ":") {
2291
+ lastFrom = i2 + 1;
2292
+ i2 = lastFrom;
2293
+ while (i2 < source2.length && isSheetCharCode(source2.charCodeAt(i2))) i2++;
2294
+ if (i2 === lastFrom) return void 0;
2295
+ }
2296
+ if (source2[i2] !== "!") return void 0;
2297
+ if (ch !== "[" && lastFrom < 0 && isDigitCode(source2.charCodeAt(sheetFrom))) return void 0;
2298
+ const length = i2 + 1 - at;
2299
+ return {
2300
+ prefix: { text: source2.slice(at, at + length), ...splitSheets(source2.slice(at, i2)) },
2301
+ length
2302
+ };
2294
2303
  }
2295
2304
  function numberLiteral(text3) {
2296
2305
  if (text3.length <= 15) return Number(text3);
@@ -2262,14 +2262,13 @@ function splitSheets(text3) {
2262
2262
  if (book !== void 0) out.book = book;
2263
2263
  return out;
2264
2264
  }
2265
- var PREFIX_AT = /(\[\d+\])?([A-Za-z0-9_.\u00A1-\uFFFF]+)(?::([A-Za-z0-9_.\u00A1-\uFFFF]+))?!/y;
2266
2265
  function readPrefix(source2, at) {
2267
2266
  const ch = source2[at];
2268
2267
  if (ch === "'") {
2269
2268
  const quoted = readQuoted(source2, at);
2270
2269
  if (source2[at + quoted.length] !== "!") return void 0;
2271
- const length = quoted.length + 1;
2272
- return { prefix: { text: source2.slice(at, at + length), ...splitSheets(quoted.name) }, length };
2270
+ const length2 = quoted.length + 1;
2271
+ return { prefix: { text: source2.slice(at, at + length2), ...splitSheets(quoted.name) }, length: length2 };
2273
2272
  }
2274
2273
  let i2 = at;
2275
2274
  if (ch === "[") {
@@ -2278,13 +2277,23 @@ function readPrefix(source2, at) {
2278
2277
  if (i2 === at + 1 || source2[i2] !== "]") return void 0;
2279
2278
  i2++;
2280
2279
  }
2280
+ const sheetFrom = i2;
2281
2281
  while (i2 < source2.length && isSheetCharCode(source2.charCodeAt(i2))) i2++;
2282
- if (source2[i2] !== "!" && source2[i2] !== ":") return void 0;
2283
- const m = matchAt(PREFIX_AT, source2, at);
2284
- if (!m) return void 0;
2285
- if (!m[1] && /^\d/.test(m[2] ?? "") && !m[3]) return void 0;
2286
- const raw2 = m[0].slice(0, -1);
2287
- return { prefix: { text: m[0], ...splitSheets(raw2) }, length: m[0].length };
2282
+ if (i2 === sheetFrom) return void 0;
2283
+ let lastFrom = -1;
2284
+ if (source2[i2] === ":") {
2285
+ lastFrom = i2 + 1;
2286
+ i2 = lastFrom;
2287
+ while (i2 < source2.length && isSheetCharCode(source2.charCodeAt(i2))) i2++;
2288
+ if (i2 === lastFrom) return void 0;
2289
+ }
2290
+ if (source2[i2] !== "!") return void 0;
2291
+ if (ch !== "[" && lastFrom < 0 && isDigitCode(source2.charCodeAt(sheetFrom))) return void 0;
2292
+ const length = i2 + 1 - at;
2293
+ return {
2294
+ prefix: { text: source2.slice(at, at + length), ...splitSheets(source2.slice(at, i2)) },
2295
+ length
2296
+ };
2288
2297
  }
2289
2298
  function numberLiteral(text3) {
2290
2299
  if (text3.length <= 15) return Number(text3);
@@ -5199,14 +5199,13 @@ function splitSheets(text) {
5199
5199
  if (book !== void 0) out.book = book;
5200
5200
  return out;
5201
5201
  }
5202
- var PREFIX_AT = /(\[\d+\])?([A-Za-z0-9_.\u00A1-\uFFFF]+)(?::([A-Za-z0-9_.\u00A1-\uFFFF]+))?!/y;
5203
5202
  function readPrefix(source2, at) {
5204
5203
  const ch = source2[at];
5205
5204
  if (ch === "'") {
5206
5205
  const quoted = readQuoted(source2, at);
5207
5206
  if (source2[at + quoted.length] !== "!") return void 0;
5208
- const length = quoted.length + 1;
5209
- return { prefix: { text: source2.slice(at, at + length), ...splitSheets(quoted.name) }, length };
5207
+ const length2 = quoted.length + 1;
5208
+ return { prefix: { text: source2.slice(at, at + length2), ...splitSheets(quoted.name) }, length: length2 };
5210
5209
  }
5211
5210
  let i2 = at;
5212
5211
  if (ch === "[") {
@@ -5215,13 +5214,23 @@ function readPrefix(source2, at) {
5215
5214
  if (i2 === at + 1 || source2[i2] !== "]") return void 0;
5216
5215
  i2++;
5217
5216
  }
5217
+ const sheetFrom = i2;
5218
5218
  while (i2 < source2.length && isSheetCharCode(source2.charCodeAt(i2))) i2++;
5219
- if (source2[i2] !== "!" && source2[i2] !== ":") return void 0;
5220
- const m = matchAt(PREFIX_AT, source2, at);
5221
- if (!m) return void 0;
5222
- if (!m[1] && /^\d/.test(m[2] ?? "") && !m[3]) return void 0;
5223
- const raw2 = m[0].slice(0, -1);
5224
- return { prefix: { text: m[0], ...splitSheets(raw2) }, length: m[0].length };
5219
+ if (i2 === sheetFrom) return void 0;
5220
+ let lastFrom = -1;
5221
+ if (source2[i2] === ":") {
5222
+ lastFrom = i2 + 1;
5223
+ i2 = lastFrom;
5224
+ while (i2 < source2.length && isSheetCharCode(source2.charCodeAt(i2))) i2++;
5225
+ if (i2 === lastFrom) return void 0;
5226
+ }
5227
+ if (source2[i2] !== "!") return void 0;
5228
+ if (ch !== "[" && lastFrom < 0 && isDigitCode(source2.charCodeAt(sheetFrom))) return void 0;
5229
+ const length = i2 + 1 - at;
5230
+ return {
5231
+ prefix: { text: source2.slice(at, at + length), ...splitSheets(source2.slice(at, i2)) },
5232
+ length
5233
+ };
5225
5234
  }
5226
5235
  function numberLiteral(text) {
5227
5236
  if (text.length <= 15) return Number(text);
@@ -5193,14 +5193,13 @@ function splitSheets(text) {
5193
5193
  if (book !== void 0) out.book = book;
5194
5194
  return out;
5195
5195
  }
5196
- var PREFIX_AT = /(\[\d+\])?([A-Za-z0-9_.\u00A1-\uFFFF]+)(?::([A-Za-z0-9_.\u00A1-\uFFFF]+))?!/y;
5197
5196
  function readPrefix(source2, at) {
5198
5197
  const ch = source2[at];
5199
5198
  if (ch === "'") {
5200
5199
  const quoted = readQuoted(source2, at);
5201
5200
  if (source2[at + quoted.length] !== "!") return void 0;
5202
- const length = quoted.length + 1;
5203
- return { prefix: { text: source2.slice(at, at + length), ...splitSheets(quoted.name) }, length };
5201
+ const length2 = quoted.length + 1;
5202
+ return { prefix: { text: source2.slice(at, at + length2), ...splitSheets(quoted.name) }, length: length2 };
5204
5203
  }
5205
5204
  let i2 = at;
5206
5205
  if (ch === "[") {
@@ -5209,13 +5208,23 @@ function readPrefix(source2, at) {
5209
5208
  if (i2 === at + 1 || source2[i2] !== "]") return void 0;
5210
5209
  i2++;
5211
5210
  }
5211
+ const sheetFrom = i2;
5212
5212
  while (i2 < source2.length && isSheetCharCode(source2.charCodeAt(i2))) i2++;
5213
- if (source2[i2] !== "!" && source2[i2] !== ":") return void 0;
5214
- const m = matchAt(PREFIX_AT, source2, at);
5215
- if (!m) return void 0;
5216
- if (!m[1] && /^\d/.test(m[2] ?? "") && !m[3]) return void 0;
5217
- const raw2 = m[0].slice(0, -1);
5218
- return { prefix: { text: m[0], ...splitSheets(raw2) }, length: m[0].length };
5213
+ if (i2 === sheetFrom) return void 0;
5214
+ let lastFrom = -1;
5215
+ if (source2[i2] === ":") {
5216
+ lastFrom = i2 + 1;
5217
+ i2 = lastFrom;
5218
+ while (i2 < source2.length && isSheetCharCode(source2.charCodeAt(i2))) i2++;
5219
+ if (i2 === lastFrom) return void 0;
5220
+ }
5221
+ if (source2[i2] !== "!") return void 0;
5222
+ if (ch !== "[" && lastFrom < 0 && isDigitCode(source2.charCodeAt(sheetFrom))) return void 0;
5223
+ const length = i2 + 1 - at;
5224
+ return {
5225
+ prefix: { text: source2.slice(at, at + length), ...splitSheets(source2.slice(at, i2)) },
5226
+ length
5227
+ };
5219
5228
  }
5220
5229
  function numberLiteral(text) {
5221
5230
  if (text.length <= 15) return Number(text);