ooxml-core 1.11.0 → 1.12.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.
Files changed (59) hide show
  1. package/dist/automation/index.cjs +210 -20
  2. package/dist/automation/index.mjs +210 -20
  3. package/dist/docx/embedded.cjs +1 -1
  4. package/dist/docx/embedded.mjs +1 -1
  5. package/dist/docx/index.cjs +1 -1
  6. package/dist/docx/index.mjs +1 -1
  7. package/dist/docx/layout/adapt-table.d.ts.map +1 -1
  8. package/dist/docx/layout/flow-table.d.ts.map +1 -1
  9. package/dist/docx/layout/index.cjs +145 -9
  10. package/dist/docx/layout/index.d.ts +1 -0
  11. package/dist/docx/layout/index.d.ts.map +1 -1
  12. package/dist/docx/layout/index.mjs +145 -10
  13. package/dist/docx/layout/input.d.ts +5 -0
  14. package/dist/docx/layout/input.d.ts.map +1 -1
  15. package/dist/docx/layout/layout-session.d.ts +10 -0
  16. package/dist/docx/layout/layout-session.d.ts.map +1 -0
  17. package/dist/docx/layout/nested-fragment-edges.d.ts.map +1 -1
  18. package/dist/docx/layout/paragraph-cache.d.ts +8 -0
  19. package/dist/docx/layout/paragraph-cache.d.ts.map +1 -0
  20. package/dist/docx/layout/paragraph-layout.d.ts.map +1 -1
  21. package/dist/docx/layout/paragraph-tokens.d.ts +1 -1
  22. package/dist/docx/layout/paragraph-tokens.d.ts.map +1 -1
  23. package/dist/docx/layout/table-paragraph-keeps.d.ts +14 -0
  24. package/dist/docx/layout/table-paragraph-keeps.d.ts.map +1 -0
  25. package/dist/docx/load/index.cjs +1 -1
  26. package/dist/docx/load/index.mjs +1 -1
  27. package/dist/docx/ui/index.cjs +98 -9
  28. package/dist/docx/ui/index.mjs +98 -10
  29. package/dist/docx/ui/review-commands.d.ts.map +1 -1
  30. package/dist/docx/ui/ribbon-action-ids.d.ts +1 -1
  31. package/dist/docx/ui/ribbon-action-ids.d.ts.map +1 -1
  32. package/dist/docx/ui/word-count.d.ts +3 -0
  33. package/dist/docx/ui/word-count.d.ts.map +1 -1
  34. package/dist/geometry/element-transform.d.ts +90 -0
  35. package/dist/geometry/element-transform.d.ts.map +1 -0
  36. package/dist/geometry/index.cjs +90 -0
  37. package/dist/geometry/index.d.ts +1 -0
  38. package/dist/geometry/index.d.ts.map +1 -1
  39. package/dist/geometry/index.mjs +83 -1
  40. package/dist/index.cjs +90 -0
  41. package/dist/index.mjs +90 -0
  42. package/dist/visio/index.cjs +314 -39
  43. package/dist/visio/index.d.ts +1 -0
  44. package/dist/visio/index.d.ts.map +1 -1
  45. package/dist/visio/index.mjs +313 -40
  46. package/dist/visio/model.d.ts +12 -0
  47. package/dist/visio/model.d.ts.map +1 -1
  48. package/dist/visio/paper-sizes.d.ts +5 -0
  49. package/dist/visio/paper-sizes.d.ts.map +1 -1
  50. package/dist/visio/parser.d.ts.map +1 -1
  51. package/dist/visio/print-count.d.ts +20 -0
  52. package/dist/visio/print-count.d.ts.map +1 -0
  53. package/dist/visio/print-settings.d.ts +14 -0
  54. package/dist/visio/print-settings.d.ts.map +1 -0
  55. package/dist/visio/ui/index.cjs +194 -4
  56. package/dist/visio/ui/index.mjs +194 -4
  57. package/dist/xlsx/ui/ribbon/parts.d.ts +1 -0
  58. package/dist/xlsx/ui/ribbon/parts.d.ts.map +1 -1
  59. package/package.json +1 -1
@@ -0,0 +1,14 @@
1
+ import type { LayoutParagraph, LayoutTable } from './input.js';
2
+ import type { RowLayout } from './table-layout.js';
3
+ /** Source-backed admission for the measured ordinary, note-free keep-lines profile. */
4
+ export declare function tableParagraphKeeps(table: LayoutTable): TableParagraphKeeps | undefined;
5
+ /** Uses existing paragraph boxes and source tokens; it does not lay out or paginate another story. */
6
+ export declare class TableParagraphKeeps {
7
+ private readonly sources;
8
+ constructor(sources: ReadonlyMap<string, LayoutParagraph>);
9
+ /** Before an ordinary row starts, a first kept paragraph can defer the entire row. */
10
+ startupMinimum(row: RowLayout): number;
11
+ /** Defer an unstarted paragraph and its following cell content, leaving other cells independent. */
12
+ cuts(row: RowLayout, available: number, fresh: boolean): Map<string, number> | undefined;
13
+ }
14
+ //# sourceMappingURL=table-paragraph-keeps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-paragraph-keeps.d.ts","sourceRoot":"","sources":["../../../docx/layout/table-paragraph-keeps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAIhD,uFAAuF;AACvF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,WAAW,GAAG,mBAAmB,GAAG,SAAS,CAgDvF;AAED,sGAAsG;AACtG,qBAAa,mBAAmB;IACnB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAApC,YAA6B,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,EAAI;IAC9E,sFAAsF;IACtF,cAAc,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,CAUrC;IACD,oGAAoG;IACpG,IAAI,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAoBvF;CACD"}
@@ -11859,7 +11859,7 @@ function parseRowProperties(row) {
11859
11859
  const result = {};
11860
11860
  const height = first2(trPr, "trHeight");
11861
11861
  const heightTwips = dxa(getW(height, "val"));
11862
- if (heightTwips) {
11862
+ if (heightTwips !== void 0) {
11863
11863
  result.heightTwips = heightTwips;
11864
11864
  result.heightRule = getW(height, "hRule") === "exact" ? "exact" : "atLeast";
11865
11865
  }
@@ -11853,7 +11853,7 @@ function parseRowProperties(row) {
11853
11853
  const result = {};
11854
11854
  const height = first2(trPr, "trHeight");
11855
11855
  const heightTwips = dxa(getW(height, "val"));
11856
- if (heightTwips) {
11856
+ if (heightTwips !== void 0) {
11857
11857
  result.heightTwips = heightTwips;
11858
11858
  result.heightRule = getW(height, "hRule") === "exact" ? "exact" : "atLeast";
11859
11859
  }
@@ -9420,6 +9420,15 @@ function resolveSectionPartRevisions(doc, mode) {
9420
9420
  }
9421
9421
 
9422
9422
  // docx/ui/review-commands.ts
9423
+ var reviewQueries = /* @__PURE__ */ new WeakMap();
9424
+ function reviewQuery(doc) {
9425
+ let cached2 = reviewQueries.get(doc);
9426
+ if (!cached2) {
9427
+ cached2 = { ranges: collectRevisionRanges(doc) };
9428
+ reviewQueries.set(doc, cached2);
9429
+ }
9430
+ return cached2;
9431
+ }
9423
9432
  function collectRevisionRanges(doc) {
9424
9433
  const ranges = [];
9425
9434
  doc.descendants((node, pos) => {
@@ -9475,13 +9484,16 @@ function collectRevisionRanges(doc) {
9475
9484
  return ranges.sort((a, b) => a.from - b.from);
9476
9485
  }
9477
9486
  function revisionNear(view) {
9478
- const ranges = collectRevisionRanges(view.state.doc);
9487
+ const { ranges } = reviewQuery(view.state.doc);
9479
9488
  const { from, to } = view.state.selection;
9480
9489
  return ranges.find((range) => range.from < to && range.to > from) ?? ranges.find((r) => r.from >= to);
9481
9490
  }
9482
9491
  function hasAnyChange(view) {
9483
- return Boolean(
9484
- view && (collectRevisionRanges(view.state.doc).length || hasNoteRevisions(view.state.doc) || hasSectionPartRevisions(view.state.doc))
9492
+ if (!view) return false;
9493
+ const doc = view.state.doc;
9494
+ const cached2 = reviewQuery(doc);
9495
+ return cached2.anyChange ??= Boolean(
9496
+ cached2.ranges.length || hasNoteRevisions(doc) || hasSectionPartRevisions(doc)
9485
9497
  );
9486
9498
  }
9487
9499
  function hasChangeAtCursor(view) {
@@ -9690,6 +9702,33 @@ function createToggleFormat(schema, getModel = () => void 0) {
9690
9702
  // docx/ui/ribbon-action-ids.ts
9691
9703
  var RIBBON_ACTION_IDS = [
9692
9704
  "paste",
9705
+ "paste-options",
9706
+ "underline-style",
9707
+ "bullets-options",
9708
+ "numbering-options",
9709
+ "document-themes",
9710
+ "document-colors",
9711
+ "document-fonts",
9712
+ "document-paragraph-spacing",
9713
+ "document-effects",
9714
+ "set-default-formatting",
9715
+ "envelopes",
9716
+ "labels",
9717
+ "start-mail-merge",
9718
+ "select-recipients",
9719
+ "edit-recipient-list",
9720
+ "highlight-merge-fields",
9721
+ "address-block",
9722
+ "greeting-line",
9723
+ "insert-merge-field",
9724
+ "merge-rules",
9725
+ "match-fields",
9726
+ "update-labels",
9727
+ "preview-results",
9728
+ "find-recipient",
9729
+ "check-merge-errors",
9730
+ "finish-merge",
9731
+ "help",
9693
9732
  "delete-comment",
9694
9733
  "previous-comment",
9695
9734
  "next-comment",
@@ -9836,6 +9875,33 @@ var RIBBON_ACTION_IDS = [
9836
9875
  ];
9837
9876
  var RIBBON_ACTION_LABELS = {
9838
9877
  paste: "Paste",
9878
+ "paste-options": "Paste options",
9879
+ "underline-style": "Underline style",
9880
+ "bullets-options": "Bullets options",
9881
+ "numbering-options": "Numbering options",
9882
+ "document-themes": "Themes",
9883
+ "document-colors": "Colors",
9884
+ "document-fonts": "Fonts",
9885
+ "document-paragraph-spacing": "Paragraph spacing",
9886
+ "document-effects": "Effects",
9887
+ "set-default-formatting": "Set as Default",
9888
+ envelopes: "Envelopes",
9889
+ labels: "Labels",
9890
+ "start-mail-merge": "Start Mail Merge",
9891
+ "select-recipients": "Select Recipients",
9892
+ "edit-recipient-list": "Edit Recipient List",
9893
+ "highlight-merge-fields": "Highlight Merge Fields",
9894
+ "address-block": "Address Block",
9895
+ "greeting-line": "Greeting Line",
9896
+ "insert-merge-field": "Insert Merge Field",
9897
+ "merge-rules": "Rules",
9898
+ "match-fields": "Match Fields",
9899
+ "update-labels": "Update Labels",
9900
+ "preview-results": "Preview Results",
9901
+ "find-recipient": "Find Recipient",
9902
+ "check-merge-errors": "Check for Errors",
9903
+ "finish-merge": "Finish & Merge",
9904
+ help: "Help",
9839
9905
  "delete-comment": "Delete comment",
9840
9906
  "previous-comment": "Previous comment",
9841
9907
  "next-comment": "Next comment",
@@ -10512,18 +10578,40 @@ function applyThemeColors(host, previous, colors) {
10512
10578
  }
10513
10579
 
10514
10580
  // docx/ui/word-count.ts
10581
+ var segmenters = /* @__PURE__ */ new Map();
10582
+ var documentCounts = /* @__PURE__ */ new WeakMap();
10515
10583
  function countWords(text2, locale) {
10516
10584
  if (typeof Intl.Segmenter === "function") {
10517
- let segmenter;
10518
- try {
10519
- segmenter = new Intl.Segmenter(locale || void 0, { granularity: "word" });
10520
- } catch {
10521
- segmenter = new Intl.Segmenter(void 0, { granularity: "word" });
10585
+ const key = locale || "";
10586
+ let segmenter = segmenters.get(key);
10587
+ if (!segmenter) {
10588
+ try {
10589
+ segmenter = new Intl.Segmenter(locale || void 0, { granularity: "word" });
10590
+ } catch {
10591
+ segmenter = new Intl.Segmenter(void 0, { granularity: "word" });
10592
+ }
10593
+ if (segmenters.size >= 16) segmenters.clear();
10594
+ segmenters.set(key, segmenter);
10522
10595
  }
10523
- return [...segmenter.segment(text2)].filter((part) => part.isWordLike).length;
10596
+ let count = 0;
10597
+ for (const part of segmenter.segment(text2)) if (part.isWordLike) count++;
10598
+ return count;
10524
10599
  }
10525
10600
  return text2.match(/[\p{L}\p{N}][\p{L}\p{M}\p{N}'’]*/gu)?.length ?? 0;
10526
10601
  }
10602
+ function documentWordCount(node, locale) {
10603
+ const key = locale || "";
10604
+ const cached2 = documentCounts.get(node);
10605
+ const value = cached2?.get(key);
10606
+ if (value !== void 0) return value;
10607
+ let count = 0;
10608
+ if (node.isTextblock) count = countWords(node.textBetween(0, node.content.size, " "), locale);
10609
+ else node.forEach((child) => count += documentWordCount(child, locale));
10610
+ const counts = cached2 ?? /* @__PURE__ */ new Map();
10611
+ counts.set(key, count);
10612
+ documentCounts.set(node, counts);
10613
+ return count;
10614
+ }
10527
10615
 
10528
10616
  // docx/ui/zoom-fit.ts
10529
10617
  var PAGE_GAP = 24;
@@ -10580,6 +10668,7 @@ exports.deleteAroundMarkers = deleteAroundMarkers;
10580
10668
  exports.deleteComment = deleteComment;
10581
10669
  exports.deleteFieldSelection = deleteFieldSelection;
10582
10670
  exports.dispatchIsolatedCommand = dispatchIsolatedCommand;
10671
+ exports.documentWordCount = documentWordCount;
10583
10672
  exports.expectDefined = expectDefined;
10584
10673
  exports.explicitOffFields = explicitOffFields;
10585
10674
  exports.extraRunFields = extraRunFields;
@@ -9398,6 +9398,15 @@ function resolveSectionPartRevisions(doc, mode) {
9398
9398
  }
9399
9399
 
9400
9400
  // docx/ui/review-commands.ts
9401
+ var reviewQueries = /* @__PURE__ */ new WeakMap();
9402
+ function reviewQuery(doc) {
9403
+ let cached2 = reviewQueries.get(doc);
9404
+ if (!cached2) {
9405
+ cached2 = { ranges: collectRevisionRanges(doc) };
9406
+ reviewQueries.set(doc, cached2);
9407
+ }
9408
+ return cached2;
9409
+ }
9401
9410
  function collectRevisionRanges(doc) {
9402
9411
  const ranges = [];
9403
9412
  doc.descendants((node, pos) => {
@@ -9453,13 +9462,16 @@ function collectRevisionRanges(doc) {
9453
9462
  return ranges.sort((a, b) => a.from - b.from);
9454
9463
  }
9455
9464
  function revisionNear(view) {
9456
- const ranges = collectRevisionRanges(view.state.doc);
9465
+ const { ranges } = reviewQuery(view.state.doc);
9457
9466
  const { from, to } = view.state.selection;
9458
9467
  return ranges.find((range) => range.from < to && range.to > from) ?? ranges.find((r) => r.from >= to);
9459
9468
  }
9460
9469
  function hasAnyChange(view) {
9461
- return Boolean(
9462
- view && (collectRevisionRanges(view.state.doc).length || hasNoteRevisions(view.state.doc) || hasSectionPartRevisions(view.state.doc))
9470
+ if (!view) return false;
9471
+ const doc = view.state.doc;
9472
+ const cached2 = reviewQuery(doc);
9473
+ return cached2.anyChange ??= Boolean(
9474
+ cached2.ranges.length || hasNoteRevisions(doc) || hasSectionPartRevisions(doc)
9463
9475
  );
9464
9476
  }
9465
9477
  function hasChangeAtCursor(view) {
@@ -9668,6 +9680,33 @@ function createToggleFormat(schema, getModel = () => void 0) {
9668
9680
  // docx/ui/ribbon-action-ids.ts
9669
9681
  var RIBBON_ACTION_IDS = [
9670
9682
  "paste",
9683
+ "paste-options",
9684
+ "underline-style",
9685
+ "bullets-options",
9686
+ "numbering-options",
9687
+ "document-themes",
9688
+ "document-colors",
9689
+ "document-fonts",
9690
+ "document-paragraph-spacing",
9691
+ "document-effects",
9692
+ "set-default-formatting",
9693
+ "envelopes",
9694
+ "labels",
9695
+ "start-mail-merge",
9696
+ "select-recipients",
9697
+ "edit-recipient-list",
9698
+ "highlight-merge-fields",
9699
+ "address-block",
9700
+ "greeting-line",
9701
+ "insert-merge-field",
9702
+ "merge-rules",
9703
+ "match-fields",
9704
+ "update-labels",
9705
+ "preview-results",
9706
+ "find-recipient",
9707
+ "check-merge-errors",
9708
+ "finish-merge",
9709
+ "help",
9671
9710
  "delete-comment",
9672
9711
  "previous-comment",
9673
9712
  "next-comment",
@@ -9814,6 +9853,33 @@ var RIBBON_ACTION_IDS = [
9814
9853
  ];
9815
9854
  var RIBBON_ACTION_LABELS = {
9816
9855
  paste: "Paste",
9856
+ "paste-options": "Paste options",
9857
+ "underline-style": "Underline style",
9858
+ "bullets-options": "Bullets options",
9859
+ "numbering-options": "Numbering options",
9860
+ "document-themes": "Themes",
9861
+ "document-colors": "Colors",
9862
+ "document-fonts": "Fonts",
9863
+ "document-paragraph-spacing": "Paragraph spacing",
9864
+ "document-effects": "Effects",
9865
+ "set-default-formatting": "Set as Default",
9866
+ envelopes: "Envelopes",
9867
+ labels: "Labels",
9868
+ "start-mail-merge": "Start Mail Merge",
9869
+ "select-recipients": "Select Recipients",
9870
+ "edit-recipient-list": "Edit Recipient List",
9871
+ "highlight-merge-fields": "Highlight Merge Fields",
9872
+ "address-block": "Address Block",
9873
+ "greeting-line": "Greeting Line",
9874
+ "insert-merge-field": "Insert Merge Field",
9875
+ "merge-rules": "Rules",
9876
+ "match-fields": "Match Fields",
9877
+ "update-labels": "Update Labels",
9878
+ "preview-results": "Preview Results",
9879
+ "find-recipient": "Find Recipient",
9880
+ "check-merge-errors": "Check for Errors",
9881
+ "finish-merge": "Finish & Merge",
9882
+ help: "Help",
9817
9883
  "delete-comment": "Delete comment",
9818
9884
  "previous-comment": "Previous comment",
9819
9885
  "next-comment": "Next comment",
@@ -10490,18 +10556,40 @@ function applyThemeColors(host, previous, colors) {
10490
10556
  }
10491
10557
 
10492
10558
  // docx/ui/word-count.ts
10559
+ var segmenters = /* @__PURE__ */ new Map();
10560
+ var documentCounts = /* @__PURE__ */ new WeakMap();
10493
10561
  function countWords(text2, locale) {
10494
10562
  if (typeof Intl.Segmenter === "function") {
10495
- let segmenter;
10496
- try {
10497
- segmenter = new Intl.Segmenter(locale || void 0, { granularity: "word" });
10498
- } catch {
10499
- segmenter = new Intl.Segmenter(void 0, { granularity: "word" });
10563
+ const key = locale || "";
10564
+ let segmenter = segmenters.get(key);
10565
+ if (!segmenter) {
10566
+ try {
10567
+ segmenter = new Intl.Segmenter(locale || void 0, { granularity: "word" });
10568
+ } catch {
10569
+ segmenter = new Intl.Segmenter(void 0, { granularity: "word" });
10570
+ }
10571
+ if (segmenters.size >= 16) segmenters.clear();
10572
+ segmenters.set(key, segmenter);
10500
10573
  }
10501
- return [...segmenter.segment(text2)].filter((part) => part.isWordLike).length;
10574
+ let count = 0;
10575
+ for (const part of segmenter.segment(text2)) if (part.isWordLike) count++;
10576
+ return count;
10502
10577
  }
10503
10578
  return text2.match(/[\p{L}\p{N}][\p{L}\p{M}\p{N}'’]*/gu)?.length ?? 0;
10504
10579
  }
10580
+ function documentWordCount(node, locale) {
10581
+ const key = locale || "";
10582
+ const cached2 = documentCounts.get(node);
10583
+ const value = cached2?.get(key);
10584
+ if (value !== void 0) return value;
10585
+ let count = 0;
10586
+ if (node.isTextblock) count = countWords(node.textBetween(0, node.content.size, " "), locale);
10587
+ else node.forEach((child) => count += documentWordCount(child, locale));
10588
+ const counts = cached2 ?? /* @__PURE__ */ new Map();
10589
+ counts.set(key, count);
10590
+ documentCounts.set(node, counts);
10591
+ return count;
10592
+ }
10505
10593
 
10506
10594
  // docx/ui/zoom-fit.ts
10507
10595
  var PAGE_GAP = 24;
@@ -10512,4 +10600,4 @@ function fitZoomPercent(mode, viewport, page) {
10512
10600
  return Math.max(10, Math.min(500, Math.floor(ratio * 100)));
10513
10601
  }
10514
10602
 
10515
- export { CollaborationAuthority, CollaborationClient, DirtyState, EDITOR_THEME_MODES, FIELD_RESULT_REPAIR_META, HEADER_FOOTER_INPUT, NotePartsStep, PAGE_GAP, PARAGRAPH_KEEP_KEYS, REMOTE_TRANSACTION_META, RIBBON_ACTION_IDS, RIBBON_ACTION_LABELS, SectionPartsStep, THEME_KEYS, WordYjsCollaboration, WordYjsComments, WordYjsMedia, acceptAllChanges, acceptChangeAtCursor, acceptRevisionRange, addComment, appendInlineNode, applyMarkFormatting, applyRunFormattingPatch, applyThemeColors, applyWordLink, authorColor, backstageFocus, chartNodeSpec, clearDirectRunFormatting, collectRevisionRanges, commentAnchors, commentHistoryAttributes, commentIdsAtSelection, commentIdsFromMarks, commentIdsFromNode, commentThreadsFromDoc, countWords, createCollaborationIdGenerator, createToggleFormat, cssBorderSide, darkTheme, deleteAroundMarkers, deleteComment, deleteFieldSelection, dispatchIsolatedCommand, expectDefined, explicitOffFields, extraRunFields, extraRunProperties, fieldGuardPlugin, fieldMarkerNodeSpec, fieldResultRanges, fieldsBalanced, fitZoomPercent, formattingRevision, freezeBatch, goToComment, goToNextChange, goToPreviousChange, hardBreakNodeSpec, hasAnyChange, hasChangeAtCursor, hasNoteRevisions, imageNodeSpec, inlineNodeRun, insertWordHardBreak, isNavigableHref, isRibbonActionId, isWordYjsRemoteTransaction, ligatureCss, ligatureStyle, lightTheme, linkFromMarks, linkMarkSpec, markSpecs, marksForRun, moveName, nodeChart, nodeNumbering, normalizeRibbonActions, normalizeThemeMode, notePartsJson, noteReferenceNodeSpec, pageBreakNodeSpec, paragraphAttrs, paragraphBoxCss, paragraphFormattingRevision, paragraphFromAttrs, parseBatch, parseBordersJson, placementClass, refreshWordYjsPresence, rejectAllChanges, rejectChangeAtCursor, rejectRevisionRange, removeCommentAnchor, removeCommentThread, removeWordLink, repairCollaborativeDocumentIds, repairCollaborativeParagraphIds, replaceAroundMarkers, replyToComment, resolveCellVisuals, resolveComment, resolveNoteRevisions, restoreNoteParts, restoreSectionParts, reviewMarks, ribbonActionIdForLabel, runPropertiesMark, runToInlineNodes, sameJson2 as sameJson, sameRuns, sectionPartsJson, setCommentThreads, setReviewRecordingPreferences, svgMarkupSpec, swatchColor, tableCellStyle, tableStructureGuardPlugin, tableStyle, themeDrawing, themeToCssVars, toggleTrackChanges, toggleTrackFormatting, toggleTrackMoves, trackChangesPlugin, trackChangesPluginKey, updateCommentThreads, wordHighlightColors, wordLinkRangeAt, wordYjsPluginKey, wordYjsPresencePlugin, wordYjsRedo, wordYjsUndo };
10603
+ export { CollaborationAuthority, CollaborationClient, DirtyState, EDITOR_THEME_MODES, FIELD_RESULT_REPAIR_META, HEADER_FOOTER_INPUT, NotePartsStep, PAGE_GAP, PARAGRAPH_KEEP_KEYS, REMOTE_TRANSACTION_META, RIBBON_ACTION_IDS, RIBBON_ACTION_LABELS, SectionPartsStep, THEME_KEYS, WordYjsCollaboration, WordYjsComments, WordYjsMedia, acceptAllChanges, acceptChangeAtCursor, acceptRevisionRange, addComment, appendInlineNode, applyMarkFormatting, applyRunFormattingPatch, applyThemeColors, applyWordLink, authorColor, backstageFocus, chartNodeSpec, clearDirectRunFormatting, collectRevisionRanges, commentAnchors, commentHistoryAttributes, commentIdsAtSelection, commentIdsFromMarks, commentIdsFromNode, commentThreadsFromDoc, countWords, createCollaborationIdGenerator, createToggleFormat, cssBorderSide, darkTheme, deleteAroundMarkers, deleteComment, deleteFieldSelection, dispatchIsolatedCommand, documentWordCount, expectDefined, explicitOffFields, extraRunFields, extraRunProperties, fieldGuardPlugin, fieldMarkerNodeSpec, fieldResultRanges, fieldsBalanced, fitZoomPercent, formattingRevision, freezeBatch, goToComment, goToNextChange, goToPreviousChange, hardBreakNodeSpec, hasAnyChange, hasChangeAtCursor, hasNoteRevisions, imageNodeSpec, inlineNodeRun, insertWordHardBreak, isNavigableHref, isRibbonActionId, isWordYjsRemoteTransaction, ligatureCss, ligatureStyle, lightTheme, linkFromMarks, linkMarkSpec, markSpecs, marksForRun, moveName, nodeChart, nodeNumbering, normalizeRibbonActions, normalizeThemeMode, notePartsJson, noteReferenceNodeSpec, pageBreakNodeSpec, paragraphAttrs, paragraphBoxCss, paragraphFormattingRevision, paragraphFromAttrs, parseBatch, parseBordersJson, placementClass, refreshWordYjsPresence, rejectAllChanges, rejectChangeAtCursor, rejectRevisionRange, removeCommentAnchor, removeCommentThread, removeWordLink, repairCollaborativeDocumentIds, repairCollaborativeParagraphIds, replaceAroundMarkers, replyToComment, resolveCellVisuals, resolveComment, resolveNoteRevisions, restoreNoteParts, restoreSectionParts, reviewMarks, ribbonActionIdForLabel, runPropertiesMark, runToInlineNodes, sameJson2 as sameJson, sameRuns, sectionPartsJson, setCommentThreads, setReviewRecordingPreferences, svgMarkupSpec, swatchColor, tableCellStyle, tableStructureGuardPlugin, tableStyle, themeDrawing, themeToCssVars, toggleTrackChanges, toggleTrackFormatting, toggleTrackMoves, trackChangesPlugin, trackChangesPluginKey, updateCommentThreads, wordHighlightColors, wordLinkRangeAt, wordYjsPluginKey, wordYjsPresencePlugin, wordYjsRedo, wordYjsUndo };
@@ -1 +1 @@
1
- {"version":3,"file":"review-commands.d.ts","sourceRoot":"","sources":["../../../docx/ui/review-commands.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAcnD,MAAM,WAAW,aAAa;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,cAAc,GAAG,iBAAiB,GAAG,eAAe,CAAC;IACjF,qFAAqF;IACrF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX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AAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,wFAAwF;IACxF,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAeD,sFAAsF;AACtF,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,mBAAmB,EAAE,IAAI,GAAG,aAAa,EAAE,CAgE5F;AAUD,wBAAgB,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAOlE;AACD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAEvE;AAsDD,wGAAwG;AACxG,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,GAAG,IAAI,CAQhF;AACD,2GAA2G;AAC3G,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,GAAG,IAAI,CAQhF;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAM9D;AACD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAM9D;AAcD,eAAO,MAAM,gBAAgB,SAAU,UAAU,KAAG,OAAqC,CAAC;AAC1F,eAAO,MAAM,gBAAgB,SAAU,UAAU,KAAG,OAAqC,CAAC;AAmB1F,eAAO,MAAM,cAAc,SAAU,UAAU,KAAG,OAAiC,CAAC;AACpF,eAAO,MAAM,kBAAkB,SAAU,UAAU,KAAG,OAAqC,CAAC"}
@@ -5,7 +5,7 @@ import type { LegacyRibbonLabel } from './ribbon-legacy-labels.js';
5
5
  * `element-api.test.ts` fails when a control is added to or removed from the ribbon without
6
6
  * updating this list.
7
7
  */
8
- export declare const RIBBON_ACTION_IDS: readonly ['paste', 'delete-comment', 'previous-comment', 'next-comment', 'insert-caption', 'cross-reference', 'ruler', 'page-setup-dialog', 'cover-page', 'bookmark', 'sort', 'find-options', 'select-options', 'add-text', 'blank-page', 'read-aloud', 'gridlines', 'navigation-pane', 'shading', 'borders', 'header', 'footer', 'page-number', 'header-footer-link', 'header-footer-close', 'header-footer-go-header', 'header-footer-go-footer', 'header-footer-previous', 'header-footer-next', 'header-from-top', 'footer-from-bottom', 'page-size', 'font-dialog', 'paragraph-dialog', 'indent-left', 'indent-right', 'zoom-actual-size', 'multiple-pages', 'page-width', 'one-page', 'word-count', 'spelling', 'symbol', 'date-and-time', 'line-numbers', 'multilevel-list', 'drop-cap', 'change-case', 'format-painter', 'show-paragraph-marks', 'select-all', 'replace', 'cut', 'copy', 'grow-font', 'shrink-font', 'font-family', 'font-size', 'bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'font-color', 'text-highlight', 'clear-formatting', 'decrease-indent', 'increase-indent', 'spacing-after', 'spacing-before', 'line-spacing', 'bulleted-list', 'numbered-list', 'decrease-list-level', 'increase-list-level', 'remove-list', 'align-left', 'align-center', 'align-right', 'justify', 'find-and-replace', 'insert-table', 'insert-picture', 'format-picture', 'insert-link', 'insert-page-break', 'insert-column-break', 'margins', 'orientation', 'vertical-alignment', 'columns', 'page-color', 'text-box', 'page-borders', 'watermark', 'hyphenation', 'page-number-format', 'page-numbering', 'different-first-page', 'different-odd-and-even-pages', 'next-page-section-break', 'continuous-section-break', 'even-page-section-break', 'odd-page-section-break', 'insert-table-of-contents', 'update-table-of-contents', 'update-fields', 'insert-table-of-figures', 'insert-footnote', 'insert-endnote', 'paragraph-direction', 'text-language', 'custom-text-language-tag', 'east-asian-language', 'custom-east-asian-language-tag', 'complex-script-language', 'custom-complex-script-language-tag', 'run-direction', 'track-changes', 'tracking-options', 'display-for-review', 'previous-change', 'next-change', 'accept', 'reject', 'accept-all', 'reject-all', 'add-comment', 'comments', 'show-hidden-text', 'page-thumbnails', 'zoom', 'zoom-dialog', 'layout-view', 'print', 'insert-row-above', 'insert-row-below', 'delete-row', 'insert-column-left', 'insert-column-right', 'delete-column', 'delete-table', 'table-properties'];
8
+ export declare const RIBBON_ACTION_IDS: readonly ['paste', 'paste-options', 'underline-style', 'bullets-options', 'numbering-options', 'document-themes', 'document-colors', 'document-fonts', 'document-paragraph-spacing', 'document-effects', 'set-default-formatting', 'envelopes', 'labels', 'start-mail-merge', 'select-recipients', 'edit-recipient-list', 'highlight-merge-fields', 'address-block', 'greeting-line', 'insert-merge-field', 'merge-rules', 'match-fields', 'update-labels', 'preview-results', 'find-recipient', 'check-merge-errors', 'finish-merge', 'help', 'delete-comment', 'previous-comment', 'next-comment', 'insert-caption', 'cross-reference', 'ruler', 'page-setup-dialog', 'cover-page', 'bookmark', 'sort', 'find-options', 'select-options', 'add-text', 'blank-page', 'read-aloud', 'gridlines', 'navigation-pane', 'shading', 'borders', 'header', 'footer', 'page-number', 'header-footer-link', 'header-footer-close', 'header-footer-go-header', 'header-footer-go-footer', 'header-footer-previous', 'header-footer-next', 'header-from-top', 'footer-from-bottom', 'page-size', 'font-dialog', 'paragraph-dialog', 'indent-left', 'indent-right', 'zoom-actual-size', 'multiple-pages', 'page-width', 'one-page', 'word-count', 'spelling', 'symbol', 'date-and-time', 'line-numbers', 'multilevel-list', 'drop-cap', 'change-case', 'format-painter', 'show-paragraph-marks', 'select-all', 'replace', 'cut', 'copy', 'grow-font', 'shrink-font', 'font-family', 'font-size', 'bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'font-color', 'text-highlight', 'clear-formatting', 'decrease-indent', 'increase-indent', 'spacing-after', 'spacing-before', 'line-spacing', 'bulleted-list', 'numbered-list', 'decrease-list-level', 'increase-list-level', 'remove-list', 'align-left', 'align-center', 'align-right', 'justify', 'find-and-replace', 'insert-table', 'insert-picture', 'format-picture', 'insert-link', 'insert-page-break', 'insert-column-break', 'margins', 'orientation', 'vertical-alignment', 'columns', 'page-color', 'text-box', 'page-borders', 'watermark', 'hyphenation', 'page-number-format', 'page-numbering', 'different-first-page', 'different-odd-and-even-pages', 'next-page-section-break', 'continuous-section-break', 'even-page-section-break', 'odd-page-section-break', 'insert-table-of-contents', 'update-table-of-contents', 'update-fields', 'insert-table-of-figures', 'insert-footnote', 'insert-endnote', 'paragraph-direction', 'text-language', 'custom-text-language-tag', 'east-asian-language', 'custom-east-asian-language-tag', 'complex-script-language', 'custom-complex-script-language-tag', 'run-direction', 'track-changes', 'tracking-options', 'display-for-review', 'previous-change', 'next-change', 'accept', 'reject', 'accept-all', 'reject-all', 'add-comment', 'comments', 'show-hidden-text', 'page-thumbnails', 'zoom', 'zoom-dialog', 'layout-view', 'print', 'insert-row-above', 'insert-row-below', 'delete-row', 'insert-column-left', 'insert-column-right', 'delete-column', 'delete-table', 'table-properties'];
9
9
  export type RibbonActionId = (typeof RIBBON_ACTION_IDS)[number];
10
10
  /** English control label of each action, the lookup key into the locale strings. Display-only. */
11
11
  export declare const RIBBON_ACTION_LABELS: Readonly<Record<RibbonActionId, string>>;
@@ -1 +1 @@
1
- {"version":3,"file":"ribbon-action-ids.d.ts","sourceRoot":"","sources":["../../../docx/ui/ribbon-action-ids.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,YAC7B,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,OAAO,EACP,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,MAAM,EACN,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,SAAS,EACT,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACxB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,kBAAkB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BAAsB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG;IACjE,GAAG,EAAE,cAAc,EAAE,CAAC;IACtB,MAAM,EAAE,MAAM,EAAE,CAAC;CACjB,CAcA"}
@@ -1,3 +1,6 @@
1
+ import type { Node } from 'prosemirror-model';
1
2
  /** Unicode-aware word counting; segmentation is provided by the host's ICU data. */
2
3
  export declare function countWords(text: string, locale?: string): number;
4
+ /** Immutable editor subtrees retain their counts across typing, selection changes and undo. */
5
+ export declare function documentWordCount(node: Node, locale?: string): number;
3
6
  //# sourceMappingURL=word-count.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"word-count.d.ts","sourceRoot":"","sources":["../../../docx/ui/word-count.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAYhE"}
1
+ {"version":3,"file":"word-count.d.ts","sourceRoot":"","sources":["../../../docx/ui/word-count.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAK9C,oFAAoF;AACpF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAmBhE;AAED,+FAA+F;AAC/F,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAYrE"}
@@ -0,0 +1,90 @@
1
+ /** Format-neutral move and resize geometry, extracted from the PowerPoint editing overlay. */
2
+ export declare const DEFAULT_INTERACTION_MIN_SIZE = 12;
3
+ /** Axis-aligned box in element (unscaled) coordinate space, plus rotation. */
4
+ export interface InteractionBox {
5
+ x: number;
6
+ y: number;
7
+ width: number;
8
+ height: number;
9
+ /** Degrees. Defaults to 0 when omitted. */
10
+ rotation?: number;
11
+ }
12
+ /** Result of a drag/resize/rotate computation. */
13
+ export interface BoxTransform {
14
+ x: number;
15
+ y: number;
16
+ width: number;
17
+ height: number;
18
+ rotation: number;
19
+ }
20
+ /** The eight resize handles, named by compass direction. */
21
+ export type ResizeHandleId = 'nw' | 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w';
22
+ export declare const RESIZE_HANDLES: readonly ResizeHandleId[];
23
+ /** Where one resize handle sits on the box, and the cursor it shows. */
24
+ export interface ResizeHandleGeometry {
25
+ /** CSS cursor value (not a class name). */
26
+ cursor: string;
27
+ /** Fractional x within the box: 0 = left edge, 1 = right edge. */
28
+ fx: number;
29
+ /** Fractional y within the box: 0 = top edge, 1 = bottom edge. */
30
+ fy: number;
31
+ }
32
+ /**
33
+ * The canonical placement + cursor for all eight handles.
34
+ *
35
+ * All five bindings had their own copy of this table: Vue as `HANDLE_META`,
36
+ * Svelte and Vanilla as a `HANDLE_CURSORS` / `HANDLE_POSITIONS` pair, Angular
37
+ * as a `switch` plus a string-matching `handleAnchor`, and React as `cursor-*`
38
+ * Tailwind classes on hand-placed corner/edge lists. Five copies of eight
39
+ * constants is five chances for one binding to put a handle on the wrong corner
40
+ * or show a resize cursor pointing the wrong way, with nothing to catch it.
41
+ */
42
+ export declare const RESIZE_HANDLE_GEOMETRY: Readonly<Record<ResizeHandleId, ResizeHandleGeometry>>;
43
+ /**
44
+ * Rotate-handle stem length in SCREEN px, i.e. constant at any zoom.
45
+ *
46
+ * The overlay lives inside the zoom-scaled stage, so this is divided by the
47
+ * zoom wherever it is applied; a stem that scaled with the zoom would drift
48
+ * away from the box as the user zoomed out.
49
+ */
50
+ export declare const ROTATE_STEM_PX = 24;
51
+ export interface Point {
52
+ x: number;
53
+ y: number;
54
+ }
55
+ export interface ResizeOptions {
56
+ /** Minimum width/height in element px. Defaults to `DEFAULT_INTERACTION_MIN_SIZE`. */
57
+ minSize?: number;
58
+ }
59
+ /**
60
+ * Rotate a screen-space delta into element-local space.
61
+ *
62
+ * Given a vector expressed in the canvas (screen) frame and the element's
63
+ * rotation in degrees, return the same vector expressed in the element's local
64
+ * (un-rotated) frame. This is the inverse rotation of `rotationDeg`.
65
+ */
66
+ export declare function rotateDelta(dx: number, dy: number, rotationDeg: number): Point;
67
+ /** Center point of a box in element coordinates. */
68
+ export declare function boxCenter(box: InteractionBox): Point;
69
+ /**
70
+ * Apply a screen-space pointer delta as a plain move of the whole box.
71
+ *
72
+ * Position is stored axis-aligned, so rotation does NOT affect a move - we only
73
+ * scale the screen delta down by `zoom` to get element px.
74
+ */
75
+ export declare function applyDragDelta(box: InteractionBox, dxScreen: number, dyScreen: number, zoom: number): BoxTransform;
76
+ /**
77
+ * Compute the new geometry for a resize drag on a given handle.
78
+ *
79
+ * `dxScreen`/`dyScreen` are the *total* pointer delta from the gesture start,
80
+ * in screen px. They are scaled by `zoom` into element px and (when the element
81
+ * is rotated) rotated into the element's local frame so the handle behaves
82
+ * intuitively. The min-size clamp uses `opts.minSize` (default
83
+ * `DEFAULT_INTERACTION_MIN_SIZE`).
84
+ *
85
+ * The returned box keeps the element's `rotation` unchanged. x/y describe the
86
+ * new axis-aligned top-left in element space; for rotated elements this matches
87
+ * the React behaviour of resizing in local space under a CSS transform.
88
+ */
89
+ export declare function applyResize(box: InteractionBox, handle: ResizeHandleId, dxScreen: number, dyScreen: number, zoom: number, opts?: ResizeOptions): BoxTransform;
90
+ //# sourceMappingURL=element-transform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element-transform.d.ts","sourceRoot":"","sources":["../../geometry/element-transform.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAE/C,8EAA8E;AAC9E,MAAM,WAAW,cAAc;IAC9B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,kDAAkD;AAClD,MA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Y,CASd;AAMD;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAC1B,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE,aAAkB,GACtB,YAAY,CAmCd"}
@@ -16218,6 +16218,88 @@ function arrowKeyDelta(key, step) {
16218
16218
  }
16219
16219
  }
16220
16220
 
16221
+ // geometry/element-transform.ts
16222
+ var DEFAULT_INTERACTION_MIN_SIZE = 12;
16223
+ var RESIZE_HANDLES = [
16224
+ "nw",
16225
+ "n",
16226
+ "ne",
16227
+ "e",
16228
+ "se",
16229
+ "s",
16230
+ "sw",
16231
+ "w"
16232
+ ];
16233
+ var RESIZE_HANDLE_GEOMETRY = {
16234
+ nw: { cursor: "nwse-resize", fx: 0, fy: 0 },
16235
+ n: { cursor: "ns-resize", fx: 0.5, fy: 0 },
16236
+ ne: { cursor: "nesw-resize", fx: 1, fy: 0 },
16237
+ e: { cursor: "ew-resize", fx: 1, fy: 0.5 },
16238
+ se: { cursor: "nwse-resize", fx: 1, fy: 1 },
16239
+ s: { cursor: "ns-resize", fx: 0.5, fy: 1 },
16240
+ sw: { cursor: "nesw-resize", fx: 0, fy: 1 },
16241
+ w: { cursor: "ew-resize", fx: 0, fy: 0.5 }
16242
+ };
16243
+ var ROTATE_STEM_PX = 24;
16244
+ var DEG_TO_RAD = Math.PI / 180;
16245
+ function rotationOf(box) {
16246
+ return box.rotation ?? 0;
16247
+ }
16248
+ function rotateDelta(dx, dy, rotationDeg) {
16249
+ if (!rotationDeg) {
16250
+ return { x: dx, y: dy };
16251
+ }
16252
+ const rad = -rotationDeg * DEG_TO_RAD;
16253
+ const cos = Math.cos(rad);
16254
+ const sin = Math.sin(rad);
16255
+ return {
16256
+ x: dx * cos - dy * sin,
16257
+ y: dx * sin + dy * cos
16258
+ };
16259
+ }
16260
+ function boxCenter(box) {
16261
+ return { x: box.x + box.width / 2, y: box.y + box.height / 2 };
16262
+ }
16263
+ function applyDragDelta(box, dxScreen, dyScreen, zoom) {
16264
+ const scale = zoom || 1;
16265
+ return {
16266
+ x: box.x + dxScreen / scale,
16267
+ y: box.y + dyScreen / scale,
16268
+ width: box.width,
16269
+ height: box.height,
16270
+ rotation: rotationOf(box)
16271
+ };
16272
+ }
16273
+ function applyResize(box, handle, dxScreen, dyScreen, zoom, opts = {}) {
16274
+ const scale = zoom || 1;
16275
+ const minSize = opts.minSize ?? DEFAULT_INTERACTION_MIN_SIZE;
16276
+ const rotation = rotationOf(box);
16277
+ const local = rotateDelta(dxScreen / scale, dyScreen / scale, rotation);
16278
+ const dx = local.x;
16279
+ const dy = local.y;
16280
+ let newX = box.x;
16281
+ let newY = box.y;
16282
+ let newW = box.width;
16283
+ let newH = box.height;
16284
+ const affectsLeft = handle === "nw" || handle === "w" || handle === "sw";
16285
+ const affectsRight = handle === "ne" || handle === "e" || handle === "se";
16286
+ const affectsTop = handle === "nw" || handle === "n" || handle === "ne";
16287
+ const affectsBottom = handle === "sw" || handle === "s" || handle === "se";
16288
+ if (affectsRight) {
16289
+ newW = Math.max(minSize, box.width + dx);
16290
+ } else if (affectsLeft) {
16291
+ newW = Math.max(minSize, box.width - dx);
16292
+ newX = box.x + (box.width - newW);
16293
+ }
16294
+ if (affectsBottom) {
16295
+ newH = Math.max(minSize, box.height + dy);
16296
+ } else if (affectsTop) {
16297
+ newH = Math.max(minSize, box.height - dy);
16298
+ newY = box.y + (box.height - newH);
16299
+ }
16300
+ return { x: newX, y: newY, width: newW, height: newH, rotation };
16301
+ }
16302
+
16221
16303
  exports.ACTION_BUTTON_CONNECTION_SITES = ACTION_BUTTON_CONNECTION_SITES;
16222
16304
  exports.ACTION_BUTTON_PRESET_DEFINITIONS = ACTION_BUTTON_PRESET_DEFINITIONS;
16223
16305
  exports.ACTION_BUTTON_TEXT_RECTS = ACTION_BUTTON_TEXT_RECTS;
@@ -16247,6 +16329,7 @@ exports.COM_AVLST_GROUND_TRUTH = COM_AVLST_GROUND_TRUTH;
16247
16329
  exports.CONNECTORS_BRACKETS_PRESET_DEFINITIONS = CONNECTORS_BRACKETS_PRESET_DEFINITIONS;
16248
16330
  exports.CURVED_ARROWS_CONNECTORS_PRESET_DEFINITIONS = CURVED_ARROWS_CONNECTORS_PRESET_DEFINITIONS;
16249
16331
  exports.CURVED_ARROW_CONNECTION_SITES = CURVED_ARROW_CONNECTION_SITES;
16332
+ exports.DEFAULT_INTERACTION_MIN_SIZE = DEFAULT_INTERACTION_MIN_SIZE;
16250
16333
  exports.EPSILON = EPSILON;
16251
16334
  exports.EXACT_CURVED_ARROW_PRESET_DEFINITIONS = EXACT_CURVED_ARROW_PRESET_DEFINITIONS;
16252
16335
  exports.EXTENDED_SHAPE_DEFINITIONS = EXTENDED_SHAPE_DEFINITIONS;
@@ -16278,8 +16361,11 @@ exports.QUAD_TEXT_RECTS = QUAD_TEXT_RECTS;
16278
16361
  exports.RECTS_SNIPS_PRESET_DEFINITIONS = RECTS_SNIPS_PRESET_DEFINITIONS;
16279
16362
  exports.RECT_VARIANT_CONNECTION_SITES = RECT_VARIANT_CONNECTION_SITES;
16280
16363
  exports.REFINED_ARROW_PRESET_DEFINITIONS = REFINED_ARROW_PRESET_DEFINITIONS;
16364
+ exports.RESIZE_HANDLES = RESIZE_HANDLES;
16365
+ exports.RESIZE_HANDLE_GEOMETRY = RESIZE_HANDLE_GEOMETRY;
16281
16366
  exports.RIBBON_CONNECTION_SITES = RIBBON_CONNECTION_SITES;
16282
16367
  exports.RIBBON_TEXT_RECTS = RIBBON_TEXT_RECTS;
16368
+ exports.ROTATE_STEM_PX = ROTATE_STEM_PX;
16283
16369
  exports.ROUTING_PADDING_DEFAULT = ROUTING_PADDING_DEFAULT;
16284
16370
  exports.SCROLLS_ACCENT_CALLOUTS_PRESET_DEFINITIONS = SCROLLS_ACCENT_CALLOUTS_PRESET_DEFINITIONS;
16285
16371
  exports.SNAP_THRESHOLD = SNAP_THRESHOLD;
@@ -16293,9 +16379,12 @@ exports._internalForTests = _internalForTests;
16293
16379
  exports.aStarOrthogonal = aStarOrthogonal;
16294
16380
  exports.alignElements = alignElements;
16295
16381
  exports.angleToRadians = angleToRadians;
16382
+ exports.applyDragDelta = applyDragDelta;
16383
+ exports.applyResize = applyResize;
16296
16384
  exports.arrowKeyDelta = arrowKeyDelta;
16297
16385
  exports.at = at;
16298
16386
  exports.autoAlignBoxes = autoAlignBoxes;
16387
+ exports.boxCenter = boxCenter;
16299
16388
  exports.buildCalloutLeaderLineSvgPath = buildCalloutLeaderLineSvgPath;
16300
16389
  exports.buildGraphNodes = buildGraphNodes;
16301
16390
  exports.clipPolygons = clipPolygons;
@@ -16369,6 +16458,7 @@ exports.resolveAlignReferenceBox = resolveAlignReferenceBox;
16369
16458
  exports.resolveCoordinate = resolveCoordinate;
16370
16459
  exports.resolveOperand = resolveOperand;
16371
16460
  exports.resolveRotateHandlePlacement = resolveRotateHandlePlacement;
16461
+ exports.rotateDelta = rotateDelta;
16372
16462
  exports.routeConnector = routeConnector;
16373
16463
  exports.routeOrthogonalConnector = routeOrthogonalConnector;
16374
16464
  exports.segmentIntersection = segmentIntersection;