ooxml-core 1.7.0 → 1.8.1
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.
- package/dist/automation/index.cjs +10903 -5961
- package/dist/automation/index.mjs +10903 -5961
- package/dist/collab/session.d.ts.map +1 -1
- package/dist/color/index.cjs +103 -0
- package/dist/color/index.d.ts +1 -0
- package/dist/color/index.d.ts.map +1 -1
- package/dist/color/index.mjs +94 -1
- package/dist/color/theme-palette.d.ts +55 -0
- package/dist/color/theme-palette.d.ts.map +1 -0
- package/dist/docx/layout/page-cursor.d.ts.map +1 -1
- package/dist/docx/model.d.ts +2 -2
- package/dist/docx/model.d.ts.map +1 -1
- package/dist/docx/style-numbering-package.d.ts.map +1 -1
- package/dist/docx/tab-stops.d.ts.map +1 -1
- package/dist/docx/table-styles.d.ts.map +1 -1
- package/dist/docx/write-drawing.d.ts.map +1 -1
- package/dist/docx/write-table.d.ts.map +1 -1
- package/dist/geometry/connector-router-astar.d.ts +24 -0
- package/dist/geometry/connector-router-astar.d.ts.map +1 -0
- package/dist/geometry/connector-router-graph.d.ts +38 -0
- package/dist/geometry/connector-router-graph.d.ts.map +1 -0
- package/dist/geometry/connector-router-types.d.ts +53 -0
- package/dist/geometry/connector-router-types.d.ts.map +1 -0
- package/dist/geometry/connector-router.d.ts +35 -0
- package/dist/geometry/connector-router.d.ts.map +1 -0
- package/dist/geometry/guide-formula-api.d.ts.map +1 -1
- package/dist/geometry/index.cjs +319 -0
- package/dist/geometry/index.d.ts +1 -0
- package/dist/geometry/index.d.ts.map +1 -1
- package/dist/geometry/index.mjs +304 -1
- package/dist/geometry/preset-shape-definitions-chart-marks.d.ts.map +1 -1
- package/dist/geometry/preset-shape-paths.d.ts +1 -1
- package/dist/geometry/preset-shape-paths.d.ts.map +1 -1
- package/dist/index.cjs +510 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +510 -4
- package/dist/math/omml-to-latex.d.ts.map +1 -1
- package/dist/pptx/automation/index.d.ts.map +1 -1
- package/dist/pptx/chunks/index-Cn-GzYGp.d.ts.map +1 -1
- package/dist/pptx/signature-node/index.cjs +37 -7
- package/dist/pptx/signature-node/index.d.ts.map +1 -1
- package/dist/pptx/signature-node/index.mjs +37 -7
- package/dist/pptx/ui/index.cjs +22 -24
- package/dist/pptx/ui/index.d.ts +14 -7
- package/dist/pptx/ui/index.d.ts.map +1 -1
- package/dist/pptx/ui/index.mjs +22 -24
- package/dist/ribbon/add-in.d.ts +53 -0
- package/dist/ribbon/add-in.d.ts.map +1 -0
- package/dist/ribbon/index.cjs +28 -0
- package/dist/ribbon/index.d.ts +2 -0
- package/dist/ribbon/index.d.ts.map +1 -0
- package/dist/ribbon/index.mjs +23 -0
- package/dist/teams/files.d.ts.map +1 -1
- package/dist/teams/index.cjs +29 -15
- package/dist/teams/index.mjs +29 -15
- package/dist/text/font-metrics/advance-width.d.ts +9 -0
- package/dist/text/font-metrics/advance-width.d.ts.map +1 -0
- package/dist/text/font-metrics/design-advances.generated.d.ts +12 -0
- package/dist/text/font-metrics/design-advances.generated.d.ts.map +1 -0
- package/dist/text/index.cjs +53 -0
- package/dist/text/index.d.ts +1 -0
- package/dist/text/index.d.ts.map +1 -1
- package/dist/text/index.mjs +52 -1
- package/dist/visio/clipboard-types.d.ts +8 -0
- package/dist/visio/clipboard-types.d.ts.map +1 -1
- package/dist/visio/clipboard-xml.d.ts.map +1 -1
- package/dist/visio/clipboard.d.ts.map +1 -1
- package/dist/visio/connector-route-avoid.d.ts +24 -0
- package/dist/visio/connector-route-avoid.d.ts.map +1 -0
- package/dist/visio/connector-route-walk.d.ts +37 -0
- package/dist/visio/connector-route-walk.d.ts.map +1 -0
- package/dist/visio/connector-route.d.ts +5 -2
- package/dist/visio/connector-route.d.ts.map +1 -1
- package/dist/visio/create-document.d.ts +6 -0
- package/dist/visio/create-document.d.ts.map +1 -1
- package/dist/visio/edit-change-shape-builtin.d.ts +18 -0
- package/dist/visio/edit-change-shape-builtin.d.ts.map +1 -0
- package/dist/visio/edit-change-shape-commands.d.ts +10 -4
- package/dist/visio/edit-change-shape-commands.d.ts.map +1 -1
- package/dist/visio/edit-change-shape.d.ts +3 -1
- package/dist/visio/edit-change-shape.d.ts.map +1 -1
- package/dist/visio/edit-commands.d.ts +5 -1
- package/dist/visio/edit-commands.d.ts.map +1 -1
- package/dist/visio/edit-connector-layout.d.ts +2 -2
- package/dist/visio/edit-connector-layout.d.ts.map +1 -1
- package/dist/visio/edit-connector-obstacles.d.ts +14 -0
- package/dist/visio/edit-connector-obstacles.d.ts.map +1 -0
- package/dist/visio/edit-connector-reroute.d.ts +7 -0
- package/dist/visio/edit-connector-reroute.d.ts.map +1 -1
- package/dist/visio/edit-connector.d.ts +2 -0
- package/dist/visio/edit-connector.d.ts.map +1 -1
- package/dist/visio/edit-delete.d.ts +4 -2
- package/dist/visio/edit-delete.d.ts.map +1 -1
- package/dist/visio/edit-duplicate-scope.d.ts +7 -2
- package/dist/visio/edit-duplicate-scope.d.ts.map +1 -1
- package/dist/visio/edit-duplicate.d.ts.map +1 -1
- package/dist/visio/edit-formatting-cell-admission.d.ts.map +1 -1
- package/dist/visio/edit-formatting-commands.d.ts +17 -0
- package/dist/visio/edit-formatting-commands.d.ts.map +1 -1
- package/dist/visio/edit-formatting-paint.d.ts.map +1 -1
- package/dist/visio/edit-formatting-scope.d.ts +6 -1
- package/dist/visio/edit-formatting-scope.d.ts.map +1 -1
- package/dist/visio/edit-formatting-text.d.ts.map +1 -1
- package/dist/visio/edit-formatting.d.ts.map +1 -1
- package/dist/visio/edit-group-formulas.d.ts +22 -0
- package/dist/visio/edit-group-formulas.d.ts.map +1 -0
- package/dist/visio/edit-group-rotation.d.ts +3 -1
- package/dist/visio/edit-group-rotation.d.ts.map +1 -1
- package/dist/visio/edit-group.d.ts +10 -3
- package/dist/visio/edit-group.d.ts.map +1 -1
- package/dist/visio/edit-instance-checks.d.ts +18 -0
- package/dist/visio/edit-instance-checks.d.ts.map +1 -0
- package/dist/visio/edit-instance-clipboard.d.ts +22 -0
- package/dist/visio/edit-instance-clipboard.d.ts.map +1 -0
- package/dist/visio/edit-instance-delete.d.ts +19 -0
- package/dist/visio/edit-instance-delete.d.ts.map +1 -0
- package/dist/visio/edit-instance-duplicate.d.ts +17 -0
- package/dist/visio/edit-instance-duplicate.d.ts.map +1 -0
- package/dist/visio/edit-instance-format.d.ts +31 -0
- package/dist/visio/edit-instance-format.d.ts.map +1 -0
- package/dist/visio/edit-instance-geometry.d.ts +21 -0
- package/dist/visio/edit-instance-geometry.d.ts.map +1 -0
- package/dist/visio/edit-instance-group.d.ts +18 -0
- package/dist/visio/edit-instance-group.d.ts.map +1 -0
- package/dist/visio/edit-instance-order.d.ts +16 -0
- package/dist/visio/edit-instance-order.d.ts.map +1 -0
- package/dist/visio/edit-instance-recalculate.d.ts +32 -0
- package/dist/visio/edit-instance-recalculate.d.ts.map +1 -0
- package/dist/visio/edit-instance-replace.d.ts +18 -0
- package/dist/visio/edit-instance-replace.d.ts.map +1 -0
- package/dist/visio/edit-instance-scope.d.ts +29 -0
- package/dist/visio/edit-instance-scope.d.ts.map +1 -0
- package/dist/visio/edit-instance-shape.d.ts +52 -0
- package/dist/visio/edit-instance-shape.d.ts.map +1 -0
- package/dist/visio/edit-instance-sheet.d.ts +52 -0
- package/dist/visio/edit-instance-sheet.d.ts.map +1 -0
- package/dist/visio/edit-master-drop.d.ts +39 -0
- package/dist/visio/edit-master-drop.d.ts.map +1 -0
- package/dist/visio/edit-master-index.d.ts.map +1 -1
- package/dist/visio/edit-master-instance-extras.d.ts +15 -0
- package/dist/visio/edit-master-instance-extras.d.ts.map +1 -0
- package/dist/visio/edit-master-instance-group.d.ts +25 -0
- package/dist/visio/edit-master-instance-group.d.ts.map +1 -0
- package/dist/visio/edit-master-instance.d.ts +42 -0
- package/dist/visio/edit-master-instance.d.ts.map +1 -0
- package/dist/visio/edit-master-scope.d.ts.map +1 -1
- package/dist/visio/edit-page-auto-size.d.ts.map +1 -1
- package/dist/visio/edit-page-layout.d.ts +15 -0
- package/dist/visio/edit-page-layout.d.ts.map +1 -0
- package/dist/visio/edit-page-setup-commands.d.ts +3 -1
- package/dist/visio/edit-page-setup-commands.d.ts.map +1 -1
- package/dist/visio/edit-page-theme-refresh.d.ts +4 -0
- package/dist/visio/edit-page-theme-refresh.d.ts.map +1 -0
- package/dist/visio/edit-page-theme.d.ts.map +1 -1
- package/dist/visio/edit-pages.d.ts.map +1 -1
- package/dist/visio/edit-paste.d.ts +3 -1
- package/dist/visio/edit-paste.d.ts.map +1 -1
- package/dist/visio/edit-recalculate-index.d.ts.map +1 -1
- package/dist/visio/edit-recalculate-values.d.ts.map +1 -1
- package/dist/visio/edit-shape-order.d.ts +19 -4
- package/dist/visio/edit-shape-order.d.ts.map +1 -1
- package/dist/visio/edit-snap-glue.d.ts +16 -0
- package/dist/visio/edit-snap-glue.d.ts.map +1 -0
- package/dist/visio/edit-stencil-connector-drop.d.ts +9 -0
- package/dist/visio/edit-stencil-connector-drop.d.ts.map +1 -0
- package/dist/visio/edit-stencil-connector-layout.d.ts +14 -0
- package/dist/visio/edit-stencil-connector-layout.d.ts.map +1 -0
- package/dist/visio/edit-stencil-connector-write.d.ts +16 -0
- package/dist/visio/edit-stencil-connector-write.d.ts.map +1 -0
- package/dist/visio/edit-stencil-connector.d.ts +29 -0
- package/dist/visio/edit-stencil-connector.d.ts.map +1 -0
- package/dist/visio/edit-stencil-master.d.ts +17 -0
- package/dist/visio/edit-stencil-master.d.ts.map +1 -0
- package/dist/visio/edit-text-size-formula.d.ts +17 -0
- package/dist/visio/edit-text-size-formula.d.ts.map +1 -0
- package/dist/visio/edit-text-size.d.ts +34 -0
- package/dist/visio/edit-text-size.d.ts.map +1 -0
- package/dist/visio/edit.d.ts +1 -1
- package/dist/visio/edit.d.ts.map +1 -1
- package/dist/visio/formula-evaluate.d.ts +2 -0
- package/dist/visio/formula-evaluate.d.ts.map +1 -1
- package/dist/visio/formula-functions.d.ts +13 -0
- package/dist/visio/formula-functions.d.ts.map +1 -0
- package/dist/visio/formula-numeric-functions.d.ts.map +1 -1
- package/dist/visio/formula.d.ts +14 -0
- package/dist/visio/formula.d.ts.map +1 -1
- package/dist/visio/index.cjs +11004 -5929
- package/dist/visio/index.d.ts +11 -1
- package/dist/visio/index.d.ts.map +1 -1
- package/dist/visio/index.mjs +10978 -5930
- package/dist/visio/line-jumps.d.ts +21 -0
- package/dist/visio/line-jumps.d.ts.map +1 -0
- package/dist/visio/master-list.d.ts +20 -0
- package/dist/visio/master-list.d.ts.map +1 -0
- package/dist/visio/model.d.ts +41 -0
- package/dist/visio/model.d.ts.map +1 -1
- package/dist/visio/page-layout.d.ts +40 -0
- package/dist/visio/page-layout.d.ts.map +1 -0
- package/dist/visio/page-theme.d.ts.map +1 -1
- package/dist/visio/parser.d.ts.map +1 -1
- package/dist/visio/shape-connections.d.ts +2 -2
- package/dist/visio/shape-connections.d.ts.map +1 -1
- package/dist/visio/snap-glue.d.ts +49 -0
- package/dist/visio/snap-glue.d.ts.map +1 -0
- package/dist/visio/stencil-master-part.d.ts +15 -0
- package/dist/visio/stencil-master-part.d.ts.map +1 -0
- package/dist/visio/stencil-masters.d.ts +19 -0
- package/dist/visio/stencil-masters.d.ts.map +1 -0
- package/dist/visio/stencil-windows.d.ts +20 -0
- package/dist/visio/stencil-windows.d.ts.map +1 -0
- package/dist/visio/stencils.d.ts +2 -0
- package/dist/visio/stencils.d.ts.map +1 -1
- package/dist/visio/style.d.ts +5 -0
- package/dist/visio/style.d.ts.map +1 -1
- package/dist/visio/text-extent.d.ts +40 -0
- package/dist/visio/text-extent.d.ts.map +1 -0
- package/dist/visio/text-fields.d.ts.map +1 -1
- package/dist/visio/theme-color-ref.d.ts +33 -0
- package/dist/visio/theme-color-ref.d.ts.map +1 -0
- package/dist/visio/ui/auto-connect.d.ts +80 -0
- package/dist/visio/ui/auto-connect.d.ts.map +1 -0
- package/dist/visio/ui/connection-points.d.ts +7 -2
- package/dist/visio/ui/connection-points.d.ts.map +1 -1
- package/dist/visio/ui/connector-preview.d.ts +3 -2
- package/dist/visio/ui/connector-preview.d.ts.map +1 -1
- package/dist/visio/ui/contract.d.ts +7 -2
- package/dist/visio/ui/contract.d.ts.map +1 -1
- package/dist/visio/ui/data-graphics.d.ts +6 -2
- package/dist/visio/ui/data-graphics.d.ts.map +1 -1
- package/dist/visio/ui/edit-commands.d.ts.map +1 -1
- package/dist/visio/ui/formatting.d.ts +27 -0
- package/dist/visio/ui/formatting.d.ts.map +1 -1
- package/dist/visio/ui/guides.d.ts +11 -2
- package/dist/visio/ui/guides.d.ts.map +1 -1
- package/dist/visio/ui/index.cjs +22141 -16751
- package/dist/visio/ui/index.d.ts +3 -0
- package/dist/visio/ui/index.d.ts.map +1 -1
- package/dist/visio/ui/index.mjs +22112 -16752
- package/dist/visio/ui/master-drop.d.ts +38 -0
- package/dist/visio/ui/master-drop.d.ts.map +1 -0
- package/dist/visio/ui/page-edit.d.ts.map +1 -1
- package/dist/visio/ui/ruler-grid.d.ts +45 -0
- package/dist/visio/ui/ruler-grid.d.ts.map +1 -0
- package/dist/visio/ui/sample-drawing.d.ts +3 -2
- package/dist/visio/ui/sample-drawing.d.ts.map +1 -1
- package/dist/visio/ui/scene-validation.d.ts.map +1 -1
- package/dist/visio/ui/shape-change.d.ts +16 -4
- package/dist/visio/ui/shape-change.d.ts.map +1 -1
- package/dist/visio/ui/shape-clipboard.d.ts.map +1 -1
- package/dist/visio/ui/shape-duplicate.d.ts +7 -1
- package/dist/visio/ui/shape-duplicate.d.ts.map +1 -1
- package/dist/visio/ui/shape-group.d.ts.map +1 -1
- package/dist/visio/ui/shape-order.d.ts +6 -1
- package/dist/visio/ui/shape-order.d.ts.map +1 -1
- package/dist/visio/ui/shape-resize.d.ts.map +1 -1
- package/dist/visio/ui/shape-rotation.d.ts +10 -1
- package/dist/visio/ui/shape-rotation.d.ts.map +1 -1
- package/dist/visio/ui/size-position.d.ts.map +1 -1
- package/dist/visio/ui/snapshot-scene.d.ts.map +1 -1
- package/dist/xlsx/conditional-extensions.d.ts.map +1 -1
- package/dist/xlsx/edit/cell-shift.d.ts.map +1 -1
- package/dist/xlsx/edit/insert-guard.d.ts +6 -0
- package/dist/xlsx/edit/insert-guard.d.ts.map +1 -0
- package/dist/xlsx/edit/shift-preserved.d.ts +2 -0
- package/dist/xlsx/edit/shift-preserved.d.ts.map +1 -1
- package/dist/xlsx/edit/shift-rule-anchors.d.ts +9 -0
- package/dist/xlsx/edit/shift-rule-anchors.d.ts.map +1 -0
- package/dist/xlsx/edit/shift-sheet.d.ts.map +1 -1
- package/dist/xlsx/edit/structure.d.ts.map +1 -1
- package/dist/xlsx/edit/table-edits.d.ts.map +1 -1
- package/dist/xlsx/formula/engine-util.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +118 -16
- package/dist/xlsx/index.mjs +118 -16
- package/dist/xlsx/load/index.cjs +70 -16
- package/dist/xlsx/load/index.mjs +70 -16
- package/dist/xlsx/load/text-decode.d.ts.map +1 -1
- package/dist/xlsx/model.d.ts +2 -0
- package/dist/xlsx/model.d.ts.map +1 -1
- package/dist/xlsx/read/package.d.ts.map +1 -1
- package/dist/xlsx/read/tables.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/number.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/util.d.ts.map +1 -1
- package/dist/xlsx/ui/index.cjs +100 -1
- package/dist/xlsx/ui/index.mjs +100 -1
- package/dist/xlsx/ui/locales/de/grid.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/en/grid.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/es/grid.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/fr/grid.d.ts.map +1 -1
- package/dist/xlsx/ui/locales/zh-CN/grid.d.ts.map +1 -1
- package/dist/xlsx/ui/ribbon/parts.d.ts.map +1 -1
- package/dist/xlsx/write/conditional.d.ts.map +1 -1
- package/dist/xlsx/write/styles.d.ts.map +1 -1
- package/dist/xlsx/write/table-patch.d.ts.map +1 -1
- package/package.json +6 -1
|
@@ -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.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-instance-sheet.d.ts","sourceRoot":"","sources":["../../visio/edit-instance-sheet.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAI3D,wGAAwG;AACxG,MAAM,WAAW,YAAY;IAC5B,+FAA+F;IAC/F,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,2FAA2F;IAC3F,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wFAAwF;IACxF,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IAC/B,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CAC1C;AA4DD;;;;GAIG;AACH,wBAAgB,aAAa,CAC5B,QAAQ,EAAE,OAAO,EACjB,QAAQ,EAAE,OAAO;AACjB,+EAA+E;AAC/E,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAC/B,aAAa,CA8Ff;AAED,kGAAkG;AAClG,eAAO,MAAM,aAAa,SAAU,YAAY,KAAG,OAAO,GAAG,SACkB,CAAC;AAEhF,sGAAsG;AACtG,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAMvE;AAKD;;;GAGG;AACH,wBAAgB,iBAAiB,CAChC,KAAK,EAAE,aAAa,EACpB,IAAI,EAAE,YAAY,EAClB,KAAK,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,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,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACV;AAED,KAAK,IAAI,GAAG,uBAAuB,GAAG,0BAA0B,CAAC;AACjE,eAAO,MAAM,iBAAiB,SAAU;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,KAAG,IAAI,IAAI,IACW,CAAC;AAI/E,gFAAgF;AAChF,wBAAgB,yBAAyB,CACxC,IAAI,EAAE,0BAA0B,GAC9B,0BAA0B,CAkB5B;AAED,wFAAwF;AACxF,MAAM,MAAM,kBAAkB,GAAG,CAChC,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,uBAAuB,EAC7B,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,KACtC,OAAO,CAAC,cAAc,CAAC,CAAC;AAE7B;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACxC,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,SAAS,SAAS,EAAE,EAC9B,OAAO,EAAE,eAAe,EACxB,IAAI,EAAE,kBAAkB,EACxB,KAAK,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,SAAS,EAAE,KAAK,OAAO,CAAC,cAAc,CAAC,GAChF,OAAO,CAAC,cAAc,CAAC,CAoFzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit-master-index.d.ts","sourceRoot":"","sources":["../../visio/edit-master-index.ts"],"names":[],"mappings":"AA2BA,wBAAgB,WAAW,CAC1B,KAAK,EAAE,OAAO,GAAG,SAAS,EAC1B,MAAM,GAAE,MAAM,IAAe,GAC3B,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"edit-master-index.d.ts","sourceRoot":"","sources":["../../visio/edit-master-index.ts"],"names":[],"mappings":"AA2BA,wBAAgB,WAAW,CAC1B,KAAK,EAAE,OAAO,GAAG,SAAS,EAC1B,MAAM,GAAE,MAAM,IAAe,GAC3B,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAuDtB;AACD,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,CAYrD;AACD,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,EAC3B,KAAK,EAAE,MAAM,IAAI,GACf,IAAI,CASN;AACD,wBAAgB,gBAAgB,CAC/B,QAAQ,EAAE,OAAO,EACjB,QAAQ,EAAE,OAAO,EACjB,QAAQ,EAAE,OAAO,GAAG,SAAS,EAC7B,KAAK,EAAE,MAAM,IAAI,EACjB,MAAM,GAAE,MAAM,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"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { VisioPackage } from './package.js';
|
|
2
|
+
import { type VisioPackageLimits } from './package-common.js';
|
|
3
|
+
import type { EditVsdxResult } from './edit.js';
|
|
4
|
+
/**
|
|
5
|
+
* Drop a master of the drawing's document stencil on a page, as Visio does: a shape that names the
|
|
6
|
+
* master and carries only its pin, so size, geometry, text and formatting stay inherited. It is
|
|
7
|
+
* named after the master ("Process", then "Process.7") and joins the master's layers. A master
|
|
8
|
+
* with several top-level shapes becomes a group of them (`edit-master-instance-group.ts`).
|
|
9
|
+
* Drawing inches, bottom-left origin; `x`/`y` is where the master's pin (the group's centre)
|
|
10
|
+
* lands. Other edits of the same transaction run after every drop of it.
|
|
11
|
+
*/
|
|
12
|
+
export interface VisioMasterInstanceEdit {
|
|
13
|
+
type: 'insert-master-instance';
|
|
14
|
+
pageId: string;
|
|
15
|
+
/** ID of the new shape; sub-shapes of a group master take the next free IDs. */
|
|
16
|
+
shapeId: string;
|
|
17
|
+
masterId: string;
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
/**
|
|
21
|
+
* For a connector master (Visio's Dynamic connector): where its ends go. Without them the
|
|
22
|
+
* connector keeps the master's own ends around the drop point, as a drop in Visio does.
|
|
23
|
+
*/
|
|
24
|
+
begin?: {
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
};
|
|
28
|
+
end?: {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/** Copy and validate the command; page and master admission stay with the transaction. */
|
|
34
|
+
export declare function snapshotMasterInstance(edit: VisioMasterInstanceEdit): VisioMasterInstanceEdit;
|
|
35
|
+
/** Add the instance shape, its inherited sub-shapes and the page's relationship to the master. */
|
|
36
|
+
export declare function editVsdxMasterInstance(pkg: VisioPackage, parts: Map<string, Uint8Array>, pages: ReadonlyMap<string, string>, edit: VisioMasterInstanceEdit, limits: VisioPackageLimits, maxOutput: number, deadline: number, check: () => void,
|
|
37
|
+
/** Filled with what the caller needs to finish the drop: the master's layers and kind. */
|
|
38
|
+
info?: {
|
|
39
|
+
layers: string[];
|
|
40
|
+
group: boolean;
|
|
41
|
+
}): Promise<EditVsdxResult>;
|
|
42
|
+
//# sourceMappingURL=edit-master-instance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-master-instance.d.ts","sourceRoot":"","sources":["../../visio/edit-master-instance.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAQ,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAQjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAY7C;;;;;;;GAOG;AACH,MAAM,WAAW,uBAAuB;IACvC,IAAI,EAAE,wBAAwB,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,gFAAgF;IAChF,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV;;;OAGG;IACH,KAAK,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,GAAG,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/B;AAID,0FAA0F;AAC1F,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,uBAAuB,GAAG,uBAAuB,CA0B7F;AA0BD,kGAAkG;AAClG,wBAAsB,sBAAsB,CAC3C,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,EAC9B,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,IAAI,EAAE,uBAAuB,EAC7B,MAAM,EAAE,kBAAkB,EAC1B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,IAAI;AACjB,0FAA0F;AAC1F,IAAI,CAAC,EAAE;IAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GACzC,OAAO,CAAC,cAAc,CAAC,CAoLzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit-master-scope.d.ts","sourceRoot":"","sources":["../../visio/edit-master-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAO9C,OAAO,EAGN,KAAK,eAAe,EACpB,MAAM,oBAAoB,CAAC;AAwB5B;;GAEG;AACH,wBAAsB,6BAA6B,CAClD,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,EACtC,KAAK,EAAE,MAAM,IAAI,GACf,OAAO,CAAC,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"edit-master-scope.d.ts","sourceRoot":"","sources":["../../visio/edit-master-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAO9C,OAAO,EAGN,KAAK,eAAe,EACpB,MAAM,oBAAoB,CAAC;AAwB5B;;GAEG;AACH,wBAAsB,6BAA6B,CAClD,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,EACtC,KAAK,EAAE,MAAM,IAAI,GACf,OAAO,CAAC,eAAe,CAAC,CAiU1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit-page-auto-size.d.ts","sourceRoot":"","sources":["../../visio/edit-page-auto-size.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAgBzC,+FAA+F;AAC/F,wBAAsB,eAAe,CACpC,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,SAAS,SAAS,EAAE,GACzB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"edit-page-auto-size.d.ts","sourceRoot":"","sources":["../../visio/edit-page-auto-size.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAgBzC,+FAA+F;AAC/F,wBAAsB,eAAe,CACpC,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,SAAS,SAAS,EAAE,GACzB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAkBtB;AAqBD,+FAA+F;AAC/F,wBAAgB,mBAAmB,CAClC,IAAI,EAAE,SAAS,GACb;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAU/C;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACtC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,EAC5B,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,SAAS,EAAE,KAAK,OAAO,CAAC,cAAc,CAAC,GAChF,OAAO,CAAC,cAAc,CAAC,CAwCzB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { VisioPackage } from './package.js';
|
|
2
|
+
import { type VisioPageLayout } from './page-layout.js';
|
|
3
|
+
/**
|
|
4
|
+
* Page Setup > Layout and Routing line jumps and the Ruler & Grid dialog, as PageSheet cells.
|
|
5
|
+
* Every field is optional; only the given cells change. Lengths are inches.
|
|
6
|
+
*/
|
|
7
|
+
export interface VisioPageLayoutEdit extends Partial<VisioPageLayout> {
|
|
8
|
+
type: 'set-page-layout';
|
|
9
|
+
pageId: string;
|
|
10
|
+
}
|
|
11
|
+
/** Copy and validate a page layout command; source admission remains authoritative. */
|
|
12
|
+
export declare function snapshotPageLayoutEdit(edit: VisioPageLayoutEdit): VisioPageLayoutEdit;
|
|
13
|
+
/** Write the line jump, grid and ruler cells that differ from the page's current values. */
|
|
14
|
+
export declare function setVisioPageLayout(pkg: VisioPackage, pagesPart: string, pages: Element, pagePaths: ReadonlyMap<string, string>, dirty: Map<string, Element>, command: VisioPageLayoutEdit, check: () => void): Promise<void>;
|
|
15
|
+
//# sourceMappingURL=edit-page-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-page-layout.d.ts","sourceRoot":"","sources":["../../visio/edit-page-layout.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAIN,KAAK,eAAe,EACpB,MAAM,eAAe,CAAC;AAEvB;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,OAAO,CAAC,eAAe,CAAC;IACpE,IAAI,EAAE,iBAAiB,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;CACf;AAqCD,uFAAuF;AACvF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,mBAAmB,GAAG,mBAAmB,CAOrF;AAED,4FAA4F;AAC5F,wBAAsB,kBAAkB,CACvC,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EACtC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3B,OAAO,EAAE,mBAAmB,EAC5B,KAAK,EAAE,MAAM,IAAI,GACf,OAAO,CAAC,IAAI,CAAC,CAgCf"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type VisioPageLayoutEdit } from './edit-page-layout.js';
|
|
2
|
+
import { type VisioSnapGlueEdit } from './edit-snap-glue.js';
|
|
1
3
|
import { type VisioBackgroundStyle, type VisioBorderStyle } from './page-decoration.js';
|
|
2
4
|
/** DrawingScale display units the Page Setup dialog writes; values stay internal inches. */
|
|
3
5
|
export declare const VISIO_SCALE_UNITS: readonly ["IN", "FT", "MM", "CM", "M"];
|
|
@@ -48,7 +50,7 @@ export type VisioPageDecorationEdit = {
|
|
|
48
50
|
style: VisioBorderStyle | null;
|
|
49
51
|
title?: string;
|
|
50
52
|
});
|
|
51
|
-
export type VisioPageSetupEdits = VisioPageSetupEdit | VisioPagePropertiesEdit | VisioPageDecorationEdit;
|
|
53
|
+
export type VisioPageSetupEdits = VisioPageSetupEdit | VisioPagePropertiesEdit | VisioPageDecorationEdit | VisioPageLayoutEdit | VisioSnapGlueEdit;
|
|
52
54
|
export declare const isVisioPageSetupEdit: (edit: {
|
|
53
55
|
type: string;
|
|
54
56
|
}) => edit is VisioPageSetupEdits;
|