ooxml-core 1.6.2 → 1.7.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 (52) hide show
  1. package/dist/automation/index.cjs +481 -231
  2. package/dist/automation/index.mjs +481 -231
  3. package/dist/geometry/index.cjs +25 -0
  4. package/dist/geometry/index.d.ts +1 -0
  5. package/dist/geometry/index.d.ts.map +1 -1
  6. package/dist/geometry/index.mjs +24 -1
  7. package/dist/geometry/nudge.d.ts +12 -0
  8. package/dist/geometry/nudge.d.ts.map +1 -0
  9. package/dist/geometry/rotation-drag.d.ts +6 -0
  10. package/dist/geometry/rotation-drag.d.ts.map +1 -1
  11. package/dist/index.cjs +25 -0
  12. package/dist/index.mjs +25 -0
  13. package/dist/pptx/automation/index.cjs +7 -2
  14. package/dist/pptx/cli/index.cjs +7 -2
  15. package/dist/pptx/converter/index.cjs +7 -2
  16. package/dist/pptx/index.cjs +7 -2
  17. package/dist/teams/index.cjs +7 -2
  18. package/dist/teams/index.mjs +7 -2
  19. package/dist/visio/edit-commands.d.ts +3 -1
  20. package/dist/visio/edit-commands.d.ts.map +1 -1
  21. package/dist/visio/edit-layer-properties.d.ts +22 -0
  22. package/dist/visio/edit-layer-properties.d.ts.map +1 -0
  23. package/dist/visio/edit-text-instance.d.ts +21 -0
  24. package/dist/visio/edit-text-instance.d.ts.map +1 -0
  25. package/dist/visio/edit-text-ranges.d.ts.map +1 -1
  26. package/dist/visio/edit-text-scope.d.ts +6 -1
  27. package/dist/visio/edit-text-scope.d.ts.map +1 -1
  28. package/dist/visio/edit-text-target.d.ts +11 -1
  29. package/dist/visio/edit-text-target.d.ts.map +1 -1
  30. package/dist/visio/edit-text.d.ts +2 -1
  31. package/dist/visio/edit-text.d.ts.map +1 -1
  32. package/dist/visio/edit.d.ts +1 -1
  33. package/dist/visio/edit.d.ts.map +1 -1
  34. package/dist/visio/index.cjs +470 -220
  35. package/dist/visio/index.d.ts +1 -1
  36. package/dist/visio/index.d.ts.map +1 -1
  37. package/dist/visio/index.mjs +470 -220
  38. package/dist/visio/text-fields.d.ts.map +1 -1
  39. package/dist/visio/ui/edit-commands.d.ts.map +1 -1
  40. package/dist/visio/ui/edit-error.d.ts +4 -1
  41. package/dist/visio/ui/edit-error.d.ts.map +1 -1
  42. package/dist/visio/ui/guides.d.ts +5 -0
  43. package/dist/visio/ui/guides.d.ts.map +1 -1
  44. package/dist/visio/ui/index.cjs +19768 -1874
  45. package/dist/visio/ui/index.d.ts +1 -0
  46. package/dist/visio/ui/index.d.ts.map +1 -1
  47. package/dist/visio/ui/index.mjs +19765 -1877
  48. package/dist/visio/ui/sample-drawing.d.ts +8 -0
  49. package/dist/visio/ui/sample-drawing.d.ts.map +1 -0
  50. package/dist/visio/ui/shape-move.d.ts +6 -0
  51. package/dist/visio/ui/shape-move.d.ts.map +1 -1
  52. package/package.json +2 -1
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The sample drawing as a real VSDX package, built through the same edit API the editor uses, so
3
+ * every shape in it can be selected, moved, retyped and saved. An original drawing, not a
4
+ * Visio-authored reference fixture. Page and shape edits need separate transactions, so this is
5
+ * two edits after the blank drawing.
6
+ */
7
+ export declare function createSampleVsdx(): Promise<Uint8Array>;
8
+ //# sourceMappingURL=sample-drawing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sample-drawing.d.ts","sourceRoot":"","sources":["../../../visio/ui/sample-drawing.ts"],"names":[],"mappings":"AAoJA;;;;;GAKG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,UAAU,CAAC,CAgB5D"}
@@ -14,4 +14,10 @@ export declare function visioMoveTargets(page: VisioPage, ids: readonly string[]
14
14
  /** One common translation over the entire eligible selection (and the members of selected
15
15
  * containers); callers commit it atomically. */
16
16
  export declare function visioMoveCommands(page: VisioPage, selection: readonly string[], delta: VisioPagePoint): VisioEdit[] | undefined;
17
+ /**
18
+ * Arrow-key nudge: move the selection `step` page inches in the arrow's screen direction (Visio
19
+ * nudges by a small step, and Shift+arrow by one screen pixel). `null` for any other key,
20
+ * `undefined` when the selection cannot move.
21
+ */
22
+ export declare function visioNudgeCommands(page: VisioPage, selection: readonly string[], key: string, step: number): VisioEdit[] | undefined | null;
17
23
  //# sourceMappingURL=shape-move.d.ts.map
@@ -1 +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;AAMnE,MAAM,WAAW,cAAc;IAC9B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACV;AAaD,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,2FAA2F;AAC3F,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAGlF;AACD;gDACgD;AAChD,wBAAgB,iBAAiB,CAChC,IAAI,EAAE,SAAS,EACf,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,KAAK,EAAE,cAAc,GACnB,SAAS,EAAE,GAAG,SAAS,CA8BzB"}
1
+ {"version":3,"file":"shape-move.d.ts","sourceRoot":"","sources":["../../../visio/ui/shape-move.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAMnE,MAAM,WAAW,cAAc;IAC9B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACV;AAaD,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,2FAA2F;AAC3F,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAGlF;AACD;gDACgD;AAChD,wBAAgB,iBAAiB,CAChC,IAAI,EAAE,SAAS,EACf,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,KAAK,EAAE,cAAc,GACnB,SAAS,EAAE,GAAG,SAAS,CA8BzB;AACD;;;;GAIG;AACH,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,SAAS,EACf,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GACV,SAAS,EAAE,GAAG,SAAS,GAAG,IAAI,CAMhC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ooxml-core",
3
- "version": "1.6.2",
3
+ "version": "1.7.0",
4
4
  "description": "Shared OOXML logic for the Word, PowerPoint and Excel viewers: everything except the UI",
5
5
  "keywords": [
6
6
  "charts",
@@ -282,6 +282,7 @@
282
282
  "@types/node": "^22.20.5",
283
283
  "@types/node-forge": "^1.3.14",
284
284
  "@types/utif": "3.0.6",
285
+ "fast-check": "^4.10.2",
285
286
  "node-forge": "^1.4.0",
286
287
  "tsdown": "^0.23.0",
287
288
  "tsup": "^8.5.1",