ooxml-ui 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/README.md +38 -36
  2. package/custom-elements.json +372 -4
  3. package/dist/chrome/ruler.d.ts +60 -2
  4. package/dist/chrome/ruler.d.ts.map +1 -1
  5. package/dist/chrome/status-bar.d.ts +3 -1
  6. package/dist/chrome/status-bar.d.ts.map +1 -1
  7. package/dist/{chunk-JFJXBYRD.js → chunk-2WLRFPMW.js} +9 -0
  8. package/dist/{chunk-X7RINDJQ.js → chunk-56A2JK63.js} +1 -1
  9. package/dist/{chunk-KVKKXRL7.js → chunk-5OFAJDMQ.js} +93 -14
  10. package/dist/{chunk-M5DTJSOV.js → chunk-723JC3OC.js} +461 -16
  11. package/dist/{chunk-USDLALB5.js → chunk-IY7QJLQG.js} +1 -1
  12. package/dist/{chunk-BOX43CZD.js → chunk-M6GF5ED2.js} +2 -1
  13. package/dist/{chunk-BEN3453I.js → chunk-NYRRH2MD.js} +1 -1
  14. package/dist/{chunk-3FPW7M6U.js → chunk-TWQ45BFL.js} +1 -1
  15. package/dist/{chunk-ZU7GX4SY.js → chunk-V6P6KZCO.js} +7 -5
  16. package/dist/comments/comments-pane.d.ts +116 -0
  17. package/dist/comments/comments-pane.d.ts.map +1 -0
  18. package/dist/comments/types.d.ts +80 -0
  19. package/dist/comments/types.d.ts.map +1 -0
  20. package/dist/controls.d.ts +6 -2
  21. package/dist/controls.d.ts.map +1 -1
  22. package/dist/controls.js +5 -5
  23. package/dist/docx/comments-panel.d.ts +8 -1
  24. package/dist/docx/editor-chrome.d.ts +8 -1
  25. package/dist/docx/file-commands.d.ts +1 -1
  26. package/dist/docx/image-media.d.ts +1 -1
  27. package/dist/docx/locales/en-app.d.ts +1 -0
  28. package/dist/docx/locales/en-ribbon.d.ts +1 -0
  29. package/dist/docx/locales/en.d.ts +2 -0
  30. package/dist/docx/localization-strings.d.ts +2 -0
  31. package/dist/docx/localization.d.ts +7 -0
  32. package/dist/docx/print-layout.d.ts +2 -2
  33. package/dist/docx/print-picture.d.ts +12 -0
  34. package/dist/docx/review-controller.d.ts +2 -0
  35. package/dist/docx/ribbon-actions.d.ts +22 -0
  36. package/dist/docx/ruler.d.ts +7 -10
  37. package/dist/docx/title-bar.d.ts +3 -5
  38. package/dist/docx.js +342 -362
  39. package/dist/form/gradient-preset-gallery.d.ts +2 -2
  40. package/dist/icons.d.ts.map +1 -1
  41. package/dist/icons.js +1 -1
  42. package/dist/index.d.ts +1 -1
  43. package/dist/index.js +9 -9
  44. package/dist/pptx/{chart-3d-view-scene-2KRQ5667.mjs → chart-3d-view-scene-OYJ4CDCO.mjs} +4 -5
  45. package/dist/pptx/{chart-3d-view-scene-36DMZWZ3.cjs → chart-3d-view-scene-SE2Y6QRE.cjs} +38 -39
  46. package/dist/pptx/{chunk-YOGDIDPB.mjs → chunk-CIVA3MLN.mjs} +8 -2
  47. package/dist/pptx/{chunk-KPZWYF44.cjs → chunk-FPE5PZMI.cjs} +789 -491
  48. package/dist/pptx/{chunk-AIL3BNZS.cjs → chunk-IURZJAWP.cjs} +529 -387
  49. package/dist/pptx/{chunk-YHA6XAB3.cjs → chunk-KRMMJUCO.cjs} +83 -1
  50. package/dist/pptx/{chunk-Y2W4SZER.mjs → chunk-MWHGUEIJ.mjs} +637 -348
  51. package/dist/pptx/{chunk-YARCML7O.mjs → chunk-STLXPKJJ.mjs} +519 -388
  52. package/dist/pptx/{chunk-ADOC5JLI.mjs → chunk-TC7HCF5M.mjs} +76 -2
  53. package/dist/pptx/{chunk-CJU4P5FT.cjs → chunk-WKLHJEPD.cjs} +18 -12
  54. package/dist/pptx/dom/element-styles.d.ts.map +1 -1
  55. package/dist/pptx/dom/elements/chart.d.ts +2 -3
  56. package/dist/pptx/dom/elements/chart.d.ts.map +1 -1
  57. package/dist/pptx/dom/elements/connector.d.ts.map +1 -1
  58. package/dist/pptx/dom/elements/shape-filter-defs.d.ts.map +1 -1
  59. package/dist/pptx/dom/elements/table.d.ts.map +1 -1
  60. package/dist/pptx/dom/index.cjs +272 -261
  61. package/dist/pptx/dom/index.mjs +46 -35
  62. package/dist/pptx/dom/slide-stage.d.ts.map +1 -1
  63. package/dist/pptx/export/html2canvas-clone.cjs +2 -2
  64. package/dist/pptx/export/html2canvas-clone.mjs +1 -1
  65. package/dist/pptx/index.cjs +3065 -2993
  66. package/dist/pptx/index.mjs +4 -4
  67. package/dist/pptx/render/chart-3d-oblique-layout.d.ts.map +1 -1
  68. package/dist/pptx/render/chart-3d-persp-bars.d.ts.map +1 -1
  69. package/dist/pptx/render/chart-3d-persp-layout.d.ts.map +1 -1
  70. package/dist/pptx/render/chart-axis-range.d.ts +7 -0
  71. package/dist/pptx/render/chart-axis-range.d.ts.map +1 -1
  72. package/dist/pptx/render/chart-axis-render.d.ts +3 -1
  73. package/dist/pptx/render/chart-axis-render.d.ts.map +1 -1
  74. package/dist/pptx/render/chart-axis-style.d.ts +5 -0
  75. package/dist/pptx/render/chart-axis-style.d.ts.map +1 -1
  76. package/dist/pptx/render/chart-axis.d.ts +1 -1
  77. package/dist/pptx/render/chart-axis.d.ts.map +1 -1
  78. package/dist/pptx/render/chart-bar-cluster-geometry.d.ts +1 -1
  79. package/dist/pptx/render/chart-bar-cluster-geometry.d.ts.map +1 -1
  80. package/dist/pptx/render/chart-cartesian-area.d.ts.map +1 -1
  81. package/dist/pptx/render/chart-cartesian-axes.d.ts.map +1 -1
  82. package/dist/pptx/render/chart-cartesian-bars.d.ts +3 -3
  83. package/dist/pptx/render/chart-cartesian-line-area.d.ts.map +1 -1
  84. package/dist/pptx/render/chart-cartesian-percent-stacked.d.ts.map +1 -1
  85. package/dist/pptx/render/chart-cartesian-stacked-labels.d.ts +11 -7
  86. package/dist/pptx/render/chart-cartesian-stacked-labels.d.ts.map +1 -1
  87. package/dist/pptx/render/chart-cartesian.d.ts.map +1 -1
  88. package/dist/pptx/render/chart-combo-stock.cjs +3 -3
  89. package/dist/pptx/render/chart-combo-stock.mjs +1 -1
  90. package/dist/pptx/render/chart-combo.d.ts.map +1 -1
  91. package/dist/pptx/render/chart-data-label-anchor.d.ts +4 -1
  92. package/dist/pptx/render/chart-data-label-anchor.d.ts.map +1 -1
  93. package/dist/pptx/render/chart-gridlines-toggle.d.ts +13 -1
  94. package/dist/pptx/render/chart-gridlines-toggle.d.ts.map +1 -1
  95. package/dist/pptx/render/chart-helpers.d.ts +13 -13
  96. package/dist/pptx/render/chart-helpers.d.ts.map +1 -1
  97. package/dist/pptx/render/chart-horizontal-bars-helpers.d.ts +7 -3
  98. package/dist/pptx/render/chart-horizontal-bars-helpers.d.ts.map +1 -1
  99. package/dist/pptx/render/chart-horizontal-bars.d.ts.map +1 -1
  100. package/dist/pptx/render/chart-interaction-stacked.d.ts.map +1 -1
  101. package/dist/pptx/render/chart-line-path.d.ts +9 -0
  102. package/dist/pptx/render/chart-line-path.d.ts.map +1 -1
  103. package/dist/pptx/render/chart-overlays.cjs +7 -7
  104. package/dist/pptx/render/chart-overlays.mjs +1 -1
  105. package/dist/pptx/render/chart-palette.d.ts +5 -14
  106. package/dist/pptx/render/chart-palette.d.ts.map +1 -1
  107. package/dist/pptx/render/chart-plot-clip.d.ts +37 -0
  108. package/dist/pptx/render/chart-plot-clip.d.ts.map +1 -0
  109. package/dist/pptx/render/chart-quick-action-styles.d.ts +5 -3
  110. package/dist/pptx/render/chart-quick-action-styles.d.ts.map +1 -1
  111. package/dist/pptx/render/chart-scatter-x-axis.d.ts.map +1 -1
  112. package/dist/pptx/render/chart-style-palette.d.ts +52 -0
  113. package/dist/pptx/render/chart-style-palette.d.ts.map +1 -0
  114. package/dist/pptx/render/chart-surface-treemap.cjs +4 -4
  115. package/dist/pptx/render/chart-surface-treemap.mjs +1 -1
  116. package/dist/pptx/render/chart-view-model-bars.d.ts +32 -1
  117. package/dist/pptx/render/chart-view-model-bars.d.ts.map +1 -1
  118. package/dist/pptx/render/chart-view-model-build.d.ts.map +1 -1
  119. package/dist/pptx/render/chart-view-model.cjs +53 -41
  120. package/dist/pptx/render/chart-view-model.mjs +1 -1
  121. package/dist/pptx/render/chart-waterfall-map.cjs +6 -6
  122. package/dist/pptx/render/chart-waterfall-map.mjs +1 -1
  123. package/dist/pptx/render/device-pixel-stroke.d.ts +101 -0
  124. package/dist/pptx/render/device-pixel-stroke.d.ts.map +1 -0
  125. package/dist/pptx/render/export-clone.d.ts +4 -0
  126. package/dist/pptx/render/export-clone.d.ts.map +1 -1
  127. package/dist/pptx/render/foreign-object-svg-document.d.ts +12 -0
  128. package/dist/pptx/render/foreign-object-svg-document.d.ts.map +1 -1
  129. package/dist/pptx/render/index.d.ts +3 -0
  130. package/dist/pptx/render/index.d.ts.map +1 -1
  131. package/dist/pptx/render/stroke-outline.d.ts +6 -0
  132. package/dist/pptx/render/stroke-outline.d.ts.map +1 -1
  133. package/dist/pptx/render/stroke-style.d.ts +8 -2
  134. package/dist/pptx/render/stroke-style.d.ts.map +1 -1
  135. package/dist/pptx/render/tab-row-actions.d.ts +40 -0
  136. package/dist/pptx/render/tab-row-actions.d.ts.map +1 -0
  137. package/dist/pptx/render/table-cell-css.d.ts +3 -2
  138. package/dist/pptx/render/table-cell-css.d.ts.map +1 -1
  139. package/dist/pptx/render/table-cell-edit.d.ts +1 -1
  140. package/dist/pptx/render/table-cell-edit.d.ts.map +1 -1
  141. package/dist/pptx/render/table-cell-paragraphs.d.ts +29 -0
  142. package/dist/pptx/render/table-cell-paragraphs.d.ts.map +1 -0
  143. package/dist/pptx/render/table-style-borders.d.ts.map +1 -1
  144. package/dist/pptx/render/table-style.d.ts +2 -0
  145. package/dist/pptx/render/table-style.d.ts.map +1 -1
  146. package/dist/pptx/render/title-bar.d.ts +5 -0
  147. package/dist/pptx/render/title-bar.d.ts.map +1 -1
  148. package/dist/pptx/render/viewer-root-options.d.ts +11 -3
  149. package/dist/pptx/render/viewer-root-options.d.ts.map +1 -1
  150. package/dist/pptx/web-components/index.d.ts.map +1 -1
  151. package/dist/pptx/web-components/office-token-bridge.d.ts +1 -1
  152. package/dist/pptx/web-components/office-token-bridge.d.ts.map +1 -1
  153. package/dist/pptx/web-components/ribbon-actions.d.ts +8 -0
  154. package/dist/pptx/web-components/ribbon-actions.d.ts.map +1 -0
  155. package/dist/presence.js +3 -3
  156. package/dist/ribbon/ribbon-actions.d.ts +119 -0
  157. package/dist/ribbon/ribbon-actions.d.ts.map +1 -0
  158. package/dist/ribbon/ribbon-tabs.d.ts +2 -1
  159. package/dist/ribbon/ribbon-tabs.d.ts.map +1 -1
  160. package/dist/smartart/smartart-svg.d.ts +3 -2
  161. package/dist/smartart.js +3 -3
  162. package/dist/suite/attachment-store.d.ts +13 -0
  163. package/dist/suite/document-store.d.ts +31 -0
  164. package/dist/suite/index.d.ts +2 -0
  165. package/dist/suite.js +132 -1
  166. package/dist/teams/app/channel-tab.d.ts +5 -0
  167. package/dist/teams/chat-composer.d.ts +3 -0
  168. package/dist/teams.js +7 -7
  169. package/dist/theme.js +2 -2
  170. package/dist/tokens.d.ts +9 -0
  171. package/dist/tokens.d.ts.map +1 -1
  172. package/dist/visio/styles/index.d.ts +2 -0
  173. package/dist/visio/styles/theme.d.ts +11 -0
  174. package/dist/visio/styles.d.ts +2 -2
  175. package/dist/visio.js +66 -21
  176. package/dist/xlsx/backstage/index.d.ts +4 -1
  177. package/dist/xlsx/backstage/pages-share.d.ts +19 -0
  178. package/dist/xlsx/backstage/parts.d.ts +3 -0
  179. package/dist/xlsx/calc-preparation.d.ts +44 -0
  180. package/dist/xlsx/chart-fill-binding.d.ts +2 -2
  181. package/dist/xlsx/chart-series-gradient-type.d.ts +3 -2
  182. package/dist/xlsx/collaboration-session.d.ts +9 -0
  183. package/dist/xlsx/collaboration-types.d.ts +41 -0
  184. package/dist/xlsx/collaboration.d.ts +56 -0
  185. package/dist/xlsx/component.d.ts +8 -0
  186. package/dist/xlsx/dialogs/comments-list.d.ts +4 -0
  187. package/dist/xlsx/dialogs/help-dialogs.d.ts +1 -1
  188. package/dist/xlsx/editor-core.d.ts +6 -0
  189. package/dist/xlsx/element-api.d.ts +19 -1
  190. package/dist/xlsx/events.d.ts +4 -1
  191. package/dist/xlsx/grid/remote-layer.d.ts +3 -0
  192. package/dist/xlsx/grid/sparkline.d.ts +3 -0
  193. package/dist/xlsx/grid/styles.d.ts +1 -1
  194. package/dist/xlsx/index.d.ts +1 -0
  195. package/dist/xlsx/ribbon-actions.d.ts +22 -0
  196. package/dist/xlsx/shell-commands.d.ts +1 -1
  197. package/dist/xlsx/title-bar.d.ts +4 -2
  198. package/dist/xlsx.js +801 -92
  199. package/package.json +2 -2
  200. package/dist/pptx/web-components/status-bar-styles.d.ts +0 -3
  201. package/dist/pptx/web-components/status-bar-styles.d.ts.map +0 -1
  202. package/dist/pptx/web-components/title-bar-styles.d.ts +0 -7
  203. package/dist/pptx/web-components/title-bar-styles.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- import { TOUCH, tok, OFFICE_TOKENS } from './chunk-JFJXBYRD.js';
1
+ import { TOUCH, tok, OFFICE_TOKENS } from './chunk-2WLRFPMW.js';
2
2
  import { unsafeCSS, LitElement } from 'lit';
3
3
 
4
4
  // src/registry.ts
@@ -68,7 +68,8 @@ var BUILT_IN = {
68
68
  warning: "M10 3l7.5 13H2.5ZM10 8v3.5M10 14v.1",
69
69
  info: "M3 10a7 7 0 1 0 14 0 7 7 0 1 0-14 0M10 9v4.5M10 6.3v.1",
70
70
  restore: "M3.5 10a6.5 6.5 0 1 0 2-4.6M3.5 3v3.5H7M10 6.5v3.8l2.5 1.6",
71
- print: "M5.5 7.5V3h9v4.5M5.5 14.5H3V8h14v6.5h-2.5M5.5 12h9v5h-9Z"
71
+ print: "M5.5 7.5V3h9v4.5M5.5 14.5H3V8h14v6.5h-2.5M5.5 12h9v5h-9Z",
72
+ share: "m12 4 5 5-5 5M17 9h-6a7 7 0 0 0-7 7"
72
73
  };
73
74
  for (const [name, d] of Object.entries(BUILT_IN)) registry.set(name, { d });
74
75
  function registerIcon(name, icon) {
@@ -1,4 +1,4 @@
1
- import { OfficeElement, controlStyles, definer } from './chunk-USDLALB5.js';
1
+ import { OfficeElement, controlStyles, definer } from './chunk-IY7QJLQG.js';
2
2
  import { html } from 'lit';
3
3
  import { hexToRgbChannels } from 'ooxml-core/color';
4
4
  import { resolveDrawingColor } from 'ooxml-core/diagram';
@@ -1,4 +1,4 @@
1
- import { OfficeElement, controlStyles, definer } from './chunk-USDLALB5.js';
1
+ import { OfficeElement, controlStyles, definer } from './chunk-IY7QJLQG.js';
2
2
  import { html } from 'lit';
3
3
 
4
4
  // raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/presence/presence.css?raw
@@ -1,8 +1,8 @@
1
- import { defineSmartArt } from './chunk-BEN3453I.js';
2
- import { TEAMS_TAGS, registerTeams } from './chunk-KVKKXRL7.js';
3
- import { installOfficeUiTheme } from './chunk-X7RINDJQ.js';
4
- import { registerControls } from './chunk-M5DTJSOV.js';
5
- import { definePresence } from './chunk-3FPW7M6U.js';
1
+ import { defineSmartArt } from './chunk-NYRRH2MD.js';
2
+ import { TEAMS_TAGS, registerTeams } from './chunk-5OFAJDMQ.js';
3
+ import { installOfficeUiTheme } from './chunk-56A2JK63.js';
4
+ import { registerControls } from './chunk-723JC3OC.js';
5
+ import { definePresence } from './chunk-TWQ45BFL.js';
6
6
 
7
7
  // src/index.ts
8
8
  var OFFICE_UI_TAGS = [
@@ -27,6 +27,7 @@ var OFFICE_UI_TAGS = [
27
27
  "office-ui-options-dialog",
28
28
  "office-ui-account",
29
29
  "office-ui-ribbon",
30
+ "office-ui-ribbon-actions",
30
31
  "office-ui-find-bar",
31
32
  "office-ui-ruler",
32
33
  "office-ui-backstage",
@@ -41,6 +42,7 @@ var OFFICE_UI_TAGS = [
41
42
  "office-ui-title-bar",
42
43
  "office-ui-ribbon-section",
43
44
  "office-ui-gallery",
45
+ "office-ui-comments-pane",
44
46
  "office-ui-presence",
45
47
  "office-ui-smartart",
46
48
  ...TEAMS_TAGS
@@ -0,0 +1,116 @@
1
+ import { type TemplateResult } from 'lit';
2
+ import { OfficeElement } from '../base.js';
3
+ import { type OfficeCommentThread, type OfficeCommentsClassNames, type OfficeCommentsLabels } from './types.js';
4
+ /**
5
+ * `<office-ui-comments-pane>`: Office's comments pane, one UX for Word, Excel and PowerPoint.
6
+ * Threads show each comment's avatar initials, author, time and text, with Reply,
7
+ * Resolve/Reopen, Edit (own comments, by `currentAuthor`) and Delete, under a new-comment box.
8
+ * The pane never changes its threads: every action is an event and the product sets `threads`
9
+ * again. Arrow keys, Home and End move between threads; Enter or Space (or a click) selects one
10
+ * (`thread-select`) so the product can go to its anchor. Escape is left to the host.
11
+ *
12
+ * Properties: `threads`, `activeThreadId`, `readOnly` (controls shown but disabled),
13
+ * `listOnly` (no composer, replies or actions: a navigation list), `closable`, `addDisabled`,
14
+ * `currentAuthor`, `labels` (partial, English defaults), `classNames` (product hook classes),
15
+ * `locale` (time formatting). Events (bubbling, composed): `comment-add` `{ text }`,
16
+ * `comment-reply` `{ threadId, text }`, `comment-edit` `{ threadId, commentId, text }`,
17
+ * `comment-delete` `{ threadId, commentId }`, `thread-resolve`, `thread-reopen` and
18
+ * `thread-select` `{ threadId }`, `comments-close`.
19
+ */
20
+ export declare class OfficeUiCommentsPane extends OfficeElement {
21
+ static styles: import("lit").CSSResult[];
22
+ static properties: {
23
+ threads: {
24
+ attribute: boolean;
25
+ };
26
+ activeThreadId: {
27
+ attribute: string;
28
+ type: StringConstructor;
29
+ };
30
+ readOnly: {
31
+ type: BooleanConstructor;
32
+ reflect: true;
33
+ converter: {
34
+ fromAttribute: (value: string | null) => boolean;
35
+ toAttribute: (value: unknown) => string | null;
36
+ };
37
+ attribute: string;
38
+ };
39
+ listOnly: {
40
+ type: BooleanConstructor;
41
+ reflect: true;
42
+ converter: {
43
+ fromAttribute: (value: string | null) => boolean;
44
+ toAttribute: (value: unknown) => string | null;
45
+ };
46
+ attribute: string;
47
+ };
48
+ closable: {
49
+ type: BooleanConstructor;
50
+ reflect: true;
51
+ converter: {
52
+ fromAttribute: (value: string | null) => boolean;
53
+ toAttribute: (value: unknown) => string | null;
54
+ };
55
+ };
56
+ addDisabled: {
57
+ type: BooleanConstructor;
58
+ reflect: true;
59
+ converter: {
60
+ fromAttribute: (value: string | null) => boolean;
61
+ toAttribute: (value: unknown) => string | null;
62
+ };
63
+ attribute: string;
64
+ };
65
+ currentAuthor: {
66
+ attribute: string;
67
+ type: StringConstructor;
68
+ };
69
+ labels: {
70
+ attribute: boolean;
71
+ };
72
+ classNames: {
73
+ attribute: boolean;
74
+ };
75
+ locale: {
76
+ type: StringConstructor;
77
+ };
78
+ };
79
+ threads: readonly OfficeCommentThread[];
80
+ activeThreadId: string | null;
81
+ readOnly: boolean;
82
+ listOnly: boolean;
83
+ closable: boolean;
84
+ addDisabled: boolean;
85
+ currentAuthor: string | null;
86
+ labels: Partial<OfficeCommentsLabels>;
87
+ classNames: OfficeCommentsClassNames;
88
+ locale: string | null;
89
+ private focusedId;
90
+ private editingId;
91
+ constructor();
92
+ private get text();
93
+ private get locked();
94
+ /** The thread that takes Tab focus: the last one focused, else the active one, else the first. */
95
+ private get rovingId();
96
+ private card;
97
+ /** Focus the current thread, or the new-comment box when there is none. */
98
+ focus(options?: FocusOptions): void;
99
+ private submitNew;
100
+ private submitReply;
101
+ private startEdit;
102
+ private stopEdit;
103
+ private saveEdit;
104
+ /** Ctrl+Enter (Cmd+Enter) posts from any box, like Office. */
105
+ private onBoxKey;
106
+ private onEditKey;
107
+ private select;
108
+ private onThreadClick;
109
+ private onListKey;
110
+ private renderActions;
111
+ private renderComment;
112
+ private renderThread;
113
+ protected render(): TemplateResult<1>;
114
+ }
115
+ export declare const defineCommentsPane: import("../registry.js").Definer;
116
+ //# sourceMappingURL=comments-pane.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comments-pane.d.ts","sourceRoot":"","sources":["../../src/comments/comments-pane.ts"],"names":[],"mappings":"AAAA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hB,OAAO,CAAC,QAAQ;IAQhB,8DAA8D;IAC9D,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,SAAS;IAQjB,OAAO,CAAC,MAAM;IAMd,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,SAAS;IAwBjB,OAAO,CAAC,aAAa;IAkBrB,OAAO,CAAC,aAAa;IA4CrB,OAAO,CAAC,YAAY;IAwCpB,UAAmB,MAAM,sBAsCxB;CACD;AAED,eAAO,MAAM,kBAAkB,+BAAiE,CAAC"}
@@ -0,0 +1,80 @@
1
+ /** One comment of a thread: the opening comment or a reply. */
2
+ export interface OfficeComment {
3
+ id: string;
4
+ author: string;
5
+ /** Avatar initials; derived from `author` when absent. */
6
+ initials?: string;
7
+ /** Avatar colour (any CSS colour); the accent colour when absent. */
8
+ color?: string;
9
+ /** When it was written: an ISO 8601 date-time is formatted, any other text is shown as is. */
10
+ created?: string;
11
+ /** Plain text; `@mentions` stay text. */
12
+ text: string;
13
+ edited?: boolean;
14
+ }
15
+ /** A conversation anchored to one place in the document: its first comment and the replies. */
16
+ export interface OfficeCommentThread {
17
+ id: string;
18
+ /** Where the thread is anchored, shown above it (a cell address, a slide, a quote). */
19
+ anchorLabel?: string;
20
+ resolved: boolean;
21
+ /** Oldest first; the first entry opens the thread. */
22
+ comments: OfficeComment[];
23
+ }
24
+ /** Every string the pane shows or announces. The shared package has no dictionary. */
25
+ export interface OfficeCommentsLabels {
26
+ /** Pane heading; empty hides it (for a pane inside a titled dialog). */
27
+ heading: string;
28
+ /** Accessible name of the thread list. */
29
+ list: string;
30
+ /** The close button (shown with `closable`). */
31
+ close: string;
32
+ /** Label and placeholder of the new-comment box. */
33
+ newComment: string;
34
+ /** The button that posts a new comment. */
35
+ add: string;
36
+ /** Label and placeholder of a thread's reply box, and its button. */
37
+ reply: string;
38
+ resolve: string;
39
+ reopen: string;
40
+ /** Badge on a resolved thread; empty hides it. */
41
+ resolved: string;
42
+ edit: string;
43
+ save: string;
44
+ cancel: string;
45
+ delete: string;
46
+ /** Marker after an edited comment's time. */
47
+ edited: string;
48
+ /** Shown when there are no threads. */
49
+ empty: string;
50
+ }
51
+ export declare const DEFAULT_COMMENTS_LABELS: OfficeCommentsLabels;
52
+ /** Product hook classes added to the pane's parts, so a product keeps its own selectors. */
53
+ export interface OfficeCommentsClassNames {
54
+ thread?: string;
55
+ comment?: string;
56
+ }
57
+ export interface OfficeCommentAddDetail {
58
+ text: string;
59
+ }
60
+ export interface OfficeCommentReplyDetail {
61
+ threadId: string;
62
+ text: string;
63
+ }
64
+ export interface OfficeCommentEditDetail {
65
+ threadId: string;
66
+ commentId: string;
67
+ text: string;
68
+ }
69
+ export interface OfficeCommentDeleteDetail {
70
+ threadId: string;
71
+ commentId: string;
72
+ }
73
+ export interface OfficeThreadDetail {
74
+ threadId: string;
75
+ }
76
+ /** Up to two initials from an author's name ("Ada Lovelace" is "AL", "grace" is "G"). */
77
+ export declare function commentInitials(author: string): string;
78
+ /** A comment's time for display: ISO date-times are formatted for `locale`, other text is kept. */
79
+ export declare function formatCommentTime(created: string | undefined, locale?: string): string;
80
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/comments/types.ts"],"names":[],"mappings":"AAIA,+DAA+D;AAC/D,MAAM,WAAW,aAAa;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8FAA8F;IAC9F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,+FAA+F;AAC/F,MAAM,WAAW,mBAAmB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,uFAAuF;IACvF,WAAW,CAA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,SAAS,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,kBAAkB;IAClC,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,yFAAyF;AACzF,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAOtD;AAED,mGAAmG;AACnG,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAYtF"}
@@ -8,8 +8,10 @@ import { defineRibbonToggle } from './ribbon/ribbon-toggle.js';
8
8
  import { defineSearchField } from './form/search-field.js';
9
9
  import { defineBackstage } from './chrome/backstage.js';
10
10
  import { defineFindBar } from './chrome/find-bar.js';
11
+ import { defineCommentsPane } from './comments/comments-pane.js';
11
12
  import { definePrintPreview } from './chrome/print-preview.js';
12
13
  import { defineRibbon } from './ribbon/ribbon-tabs.js';
14
+ import { defineRibbonActions } from './ribbon/ribbon-actions.js';
13
15
  import { defineRibbonSection } from './ribbon/ribbon-section.js';
14
16
  import { defineGallery } from './ribbon/gallery.js';
15
17
  import { defineRuler } from './chrome/ruler.js';
@@ -34,7 +36,7 @@ import { defineStatusItem } from './chrome/status-item.js';
34
36
  import { defineTabStrip } from './chrome/tab-strip.js';
35
37
  import { defineTitleBar } from './chrome/title-bar.js';
36
38
  import { defineZoomSlider } from './form/zoom-slider.js';
37
- export { defineAccount, defineDialogFooter, definePasteOptions, defineRadio, defineReadOnlyBanner, defineRibbonToggle, defineSearchField, defineToasts, defineBackstage, defineFindBar, defineGallery, definePrintPreview, defineRibbon, defineRuler, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineTitleBar, defineToolbar, defineZoomSlider, };
39
+ export { defineAccount, defineDialogFooter, definePasteOptions, defineRadio, defineReadOnlyBanner, defineRibbonToggle, defineSearchField, defineToasts, defineBackstage, defineCommentsPane, defineFindBar, defineGallery, definePrintPreview, defineRibbon, defineRibbonActions, defineRuler, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineTitleBar, defineToolbar, defineZoomSlider, };
38
40
  export type { OfficeCommandEvent } from './ribbon/button.js';
39
41
  export type { OfficeDialogCloseEvent, OfficeDialogCloseReason } from './dialog/dialog.js';
40
42
  export type { OfficeSelectOption } from './form/select.js';
@@ -46,11 +48,13 @@ export { attachKeyTips, type KeyTipsHandle } from './keytips.js';
46
48
  export type { OfficeBackstageCloseEvent, OfficeBackstageItem, OfficeBackstageSelectEvent, } from './chrome/backstage.js';
47
49
  export type { OfficeFindInputEvent, OfficeFindStepEvent } from './chrome/find-bar.js';
48
50
  export type { OfficePrintPreviewPageEvent } from './chrome/print-preview.js';
51
+ export { commentInitials, DEFAULT_COMMENTS_LABELS, formatCommentTime, type OfficeComment, type OfficeCommentAddDetail, type OfficeCommentDeleteDetail, type OfficeCommentEditDetail, type OfficeCommentReplyDetail, type OfficeCommentsClassNames, type OfficeCommentsLabels, type OfficeCommentThread, type OfficeThreadDetail, } from './comments/types.js';
49
52
  export { assignKeyTips, runKeyTips } from './ribbon/keytip-run.js';
50
53
  export type { KeyTipTarget } from './ribbon/keytip-run.js';
51
54
  export { createRibbonOverflow } from './ribbon/overflow.js';
52
55
  export type { RibbonOverflow, RibbonOverflowOptions } from './ribbon/overflow.js';
53
56
  export type { OfficeRibbonSelectEvent } from './ribbon/ribbon-tabs.js';
57
+ export type { OfficeRibbonActionsMode, OfficeRibbonModeEvent } from './ribbon/ribbon-actions.js';
54
58
  export type { OfficeRibbonCommandView, OfficeRibbonGroupView } from './ribbon/ribbon-section.js';
55
59
  export { parseSvgPreview, type OfficeGalleryItem, type OfficeGalleryPickEvent, type OfficeGallerySection, type OfficeGalleryState, } from './ribbon/gallery.js';
56
60
  export { rulerDivisions } from './chrome/ruler.js';
@@ -62,7 +66,7 @@ export type { OfficeReadOnlyBannerIntent, OfficeReadOnlyBannerState, } from './n
62
66
  export { clearOfficeProfile, DEFAULT_OFFICE_PROFILE, OFFICE_AVATAR_SWATCHES, OFFICE_PROFILE_STORAGE_KEY, profileInitials, readOfficeProfile, sanitizeOfficeProfile, writeOfficeProfile, type OfficeProfile, type OfficeProfileChangeEvent, } from './chrome/account-profile.js';
63
67
  export { clampOptionNumber, type OfficeOptionCategory, type OfficeOptionChoice, type OfficeOptionControl, type OfficeOptionSection, type OfficeOptionsChangeEvent, type OfficeOptionValue, type OfficeOptionValues, } from './dialog/options-dialog.js';
64
68
  /** Every control of this entry. */
65
- export declare const CONTROL_DEFINERS: readonly [import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer];
69
+ export declare const CONTROL_DEFINERS: readonly [import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer];
66
70
  /** Idempotent, SSR-safe (no-op without a DOM). */
67
71
  export declare function registerControls(registry?: CustomElementRegistry): void;
68
72
  //# sourceMappingURL=controls.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../src/controls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EACN,qBAAqB,EACrB,yBAAyB,EACzB,KAAK,iBAAiB,GACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAA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Ac,EACnB,KAAK,eAAe,GACpB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACX,wBAAwB,EACxB,uBAAuB,EACvB,yBAAyB,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,0BAA0B,EAC1B,KAAK,WAAW,EAChB,KAAK,iBAAiB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,YAAY,EACX,0BAA0B,EAC1B,yBAAyB,GACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,KAAK,aAAa,EAClB,KAAK,wBAAwB,GAC7B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACN,iBAAiB,EACjB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,GACvB,MAAM,yBAAyB,CAAC;AAEjC,mCAAmC;AACnC,eAAO,MAAM,gBAAgB,imCAsCnB,CAAC;AAEX,kDAAkD;AAClD,wBAAgB,gBAAgB,CAAC,QAAQ,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAEvE"}
package/dist/controls.js CHANGED
@@ -1,5 +1,5 @@
1
- export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, EMPTY_MENU_STATE, OFFICE_AVATAR_SWATCHES, OFFICE_COLOR_SWATCHES, OFFICE_COLOR_SWATCH_HEXES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_TITLE_BAR_SEARCH_LIMIT, OFFICE_TOAST_VISIBLE_LIMIT, assignKeyTips, attachKeyTips, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, createRibbonOverflow, defineAccount, defineBackstage, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineGallery, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, nextEnabledIndex, parseSvgPreview, profileInitials, readOfficeProfile, registerControls, rulerDivisions, runKeyTips, sanitizeOfficeProfile, typeAheadIndex, writeOfficeProfile } from './chunk-M5DTJSOV.js';
2
- import './chunk-BOX43CZD.js';
3
- import './chunk-3FPW7M6U.js';
4
- import './chunk-USDLALB5.js';
5
- import './chunk-JFJXBYRD.js';
1
+ export { CONTROL_DEFINERS, DEFAULT_COMMENTS_LABELS, DEFAULT_OFFICE_PROFILE, EMPTY_MENU_STATE, OFFICE_AVATAR_SWATCHES, OFFICE_COLOR_SWATCHES, OFFICE_COLOR_SWATCH_HEXES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_TITLE_BAR_SEARCH_LIMIT, OFFICE_TOAST_VISIBLE_LIMIT, assignKeyTips, attachKeyTips, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, commentInitials, createRibbonOverflow, defineAccount, defineBackstage, defineButton, defineCheckbox, defineCommandSearch, defineCommentsPane, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineGallery, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonActions, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, formatCommentTime, nextEnabledIndex, parseSvgPreview, profileInitials, readOfficeProfile, registerControls, rulerDivisions, runKeyTips, sanitizeOfficeProfile, typeAheadIndex, writeOfficeProfile } from './chunk-723JC3OC.js';
2
+ import './chunk-M6GF5ED2.js';
3
+ import './chunk-TWQ45BFL.js';
4
+ import './chunk-IY7QJLQG.js';
5
+ import './chunk-2WLRFPMW.js';
@@ -1,12 +1,17 @@
1
- import type { DocumentModel } from 'ooxml-core/docx';
1
+ import type { Comment, DocumentModel } from 'ooxml-core/docx';
2
+ import type { OfficeCommentThread } from '../comments/types.js';
2
3
  export interface CommentsPanelOptions {
3
4
  getModel: () => DocumentModel;
4
5
  canAdd: () => boolean;
5
6
  canEdit?: () => boolean;
7
+ /** The thread anchored at the caret, highlighted in the pane. */
8
+ activeId?: () => string | undefined;
6
9
  onAdd: (text: string) => void;
7
10
  onReply: (parentId: string, text: string) => void;
8
11
  onResolve: (id: string, resolved: boolean) => void;
9
12
  onDelete: (id: string) => void;
13
+ /** A thread was chosen in the pane: go to its anchor. */
14
+ onSelect?: (id: string) => void;
10
15
  onClose?: () => void;
11
16
  }
12
17
  export interface CommentsPanelHandle {
@@ -17,4 +22,6 @@ export interface CommentsPanelHandle {
17
22
  setLocale(locale: string): void;
18
23
  readonly isOpen: boolean;
19
24
  }
25
+ /** Word comments as neutral threads: each top-level comment with its direct replies. */
26
+ export declare function wordCommentThreads(comments: readonly Comment[]): OfficeCommentThread[];
20
27
  export declare function createCommentsPanel(options: CommentsPanelOptions): CommentsPanelHandle;
@@ -3,6 +3,7 @@ import { type Backstage } from './backstage.js';
3
3
  import type { BackstageOptions, BackstageOptionKey } from './backstage-options.js';
4
4
  import { type FileCommand } from './file-commands.js';
5
5
  import { type EditorLocale } from './localization.js';
6
+ import { type RibbonActions } from './ribbon-actions.js';
6
7
  import { type StatusBar } from './status-bar.js';
7
8
  import { type SaveState, type TitleBar } from './title-bar.js';
8
9
  /** What the chrome needs from the editor element; keeps component.ts free of chrome details. */
@@ -20,6 +21,8 @@ export interface ChromeHost {
20
21
  print(): void;
21
22
  history(key: 'undo' | 'redo'): void;
22
23
  toggleComments(): void;
24
+ /** Whether a collaboration session is live (Share then reads pressed). */
25
+ collaborating(): boolean;
23
26
  setViewMode(mode: 'draft' | 'print'): void;
24
27
  setZoom(percent: number): void;
25
28
  reportError(error: Error): void;
@@ -32,10 +35,14 @@ export interface ChromeHost {
32
35
  setHiddenActions(ids: string[]): void;
33
36
  }
34
37
  export declare const DEFAULT_FILE_NAME = "Document1.docx";
35
- /** Title bar, File tab/backstage, status bar and the default browser file workflow. */
38
+ /**
39
+ * Title bar, ribbon tab-row actions (editing mode, Comments, Share), File tab/backstage, status
40
+ * bar and the default browser file workflow.
41
+ */
36
42
  export declare class EditorChrome {
37
43
  private readonly host;
38
44
  readonly titleBar: TitleBar;
45
+ readonly ribbonActions: RibbonActions;
39
46
  readonly backstage: Backstage;
40
47
  readonly statusBar: StatusBar;
41
48
  readonly fileInput: HTMLInputElement;
@@ -1,4 +1,4 @@
1
- export type FileCommand = 'new' | 'open' | 'save' | 'saveAs' | 'export' | 'exportText' | 'print';
1
+ export type FileCommand = 'new' | 'open' | 'save' | 'saveAs' | 'export' | 'exportText' | 'print' | 'share';
2
2
  export interface FileCommandDetail {
3
3
  command: FileCommand;
4
4
  /** Save As: the name the user chose. */
@@ -21,7 +21,7 @@ export interface ImageNodeViewOptions {
21
21
  editPicture?(pos: number): void;
22
22
  /** The widest a picture may be resized to, in CSS pixels. */
23
23
  maxWidth?(): number;
24
- /** The document theme, for resolving SmartArt colours. */
24
+ /** The document theme, for resolving SmartArt and chart colours. */
25
25
  theme?(): ThemeCatalog | undefined;
26
26
  }
27
27
  /** Sets a picture's size in the document, keeping every other attribute. */
@@ -9,6 +9,7 @@ export declare const enApp: {
9
9
  readonly Editing: 'Editing';
10
10
  readonly Viewing: 'Viewing';
11
11
  readonly 'Show comments': 'Show comments';
12
+ readonly Share: 'Share';
12
13
  readonly 'Unsaved changes': 'Unsaved changes';
13
14
  readonly Saved: 'Saved';
14
15
  readonly 'Saving…': 'Saving…';
@@ -369,6 +369,7 @@ export declare const enRibbon: {
369
369
  readonly Reply: 'Reply';
370
370
  readonly Resolve: 'Resolve';
371
371
  readonly Reopen: 'Reopen';
372
+ readonly Resolved: 'Resolved';
372
373
  readonly Delete: 'Delete';
373
374
  readonly 'No comments': 'No comments yet.';
374
375
  readonly Tracking: 'Tracking';
@@ -51,6 +51,7 @@ export declare const en: {
51
51
  readonly Editing: 'Editing';
52
52
  readonly Viewing: 'Viewing';
53
53
  readonly 'Show comments': 'Show comments';
54
+ readonly Share: 'Share';
54
55
  readonly 'Unsaved changes': 'Unsaved changes';
55
56
  readonly Saved: 'Saved';
56
57
  readonly 'Saving\u2026': 'Saving…';
@@ -668,6 +669,7 @@ export declare const en: {
668
669
  readonly Reply: 'Reply';
669
670
  readonly Resolve: 'Resolve';
670
671
  readonly Reopen: 'Reopen';
672
+ readonly Resolved: 'Resolved';
671
673
  readonly Delete: 'Delete';
672
674
  readonly 'No comments': 'No comments yet.';
673
675
  readonly Tracking: 'Tracking';
@@ -48,6 +48,7 @@ export declare const strings: {
48
48
  readonly Editing: 'Editing';
49
49
  readonly Viewing: 'Viewing';
50
50
  readonly 'Show comments': 'Show comments';
51
+ readonly Share: 'Share';
51
52
  readonly 'Unsaved changes': 'Unsaved changes';
52
53
  readonly Saved: 'Saved';
53
54
  readonly 'Saving\u2026': 'Saving…';
@@ -665,6 +666,7 @@ export declare const strings: {
665
666
  readonly Reply: 'Reply';
666
667
  readonly Resolve: 'Resolve';
667
668
  readonly Reopen: 'Reopen';
669
+ readonly Resolved: 'Resolved';
668
670
  readonly Delete: 'Delete';
669
671
  readonly 'No comments': 'No comments yet.';
670
672
  readonly Tracking: 'Tracking';
@@ -20,4 +20,11 @@ export declare function formatPageStatus(locale: EditorLocale, current: number,
20
20
  export declare function localeOf(element: Element): EditorLocale;
21
21
  /** Translate literal UI labels in-place while retaining action data and current control state. */
22
22
  export declare function localizeElement(root: HTMLElement, locale: EditorLocale): void;
23
+ /**
24
+ * Finds a toolbar control by its English label (`aria-label`, or the original
25
+ * label kept in `data-localearialabel` once translated). The editor looks up a
26
+ * few dozen controls on every transaction, and an attribute selector scans the
27
+ * whole toolbar each time, so the hit is remembered per root and reused while
28
+ * it is still connected and still carries the label.
29
+ */
23
30
  export declare function findLocalizedControl<T extends HTMLElement>(root: ParentNode, label: string): T | null;
@@ -1,6 +1,8 @@
1
1
  import type { PageBorders } from 'ooxml-core/docx';
2
2
  import { type LayoutResult } from 'ooxml-core/docx/layout';
3
3
  import { type PrintLineNumbering } from './print-line-numbers.js';
4
+ import { type PictureUrl } from './print-picture.js';
5
+ export type { PictureUrl } from './print-picture.js';
4
6
  export type { PrintLineNumbering } from './print-line-numbers.js';
5
7
  export interface PrintLayoutHandle {
6
8
  /** The scrollable element holding one sheet per page; mount this in the DOM. */
@@ -18,8 +20,6 @@ export interface PrintLayoutHandle {
18
20
  offset: number;
19
21
  } | null;
20
22
  }
21
- /** Resolves a package picture part to a displayable URL; undefined draws a placeholder box. */
22
- export type PictureUrl = (partName: string, contentType: string) => string | undefined;
23
23
  export interface PrintLayoutOptions {
24
24
  /** Line numbering by section index; sections without an entry print no numbers. */
25
25
  lineNumbers?: ReadonlyArray<PrintLineNumbering | undefined>;
@@ -0,0 +1,12 @@
1
+ /** Resolves a package picture part to a displayable URL; undefined draws a placeholder box. */
2
+ export type PictureUrl = (partName: string, contentType: string) => string | undefined;
3
+ export declare function pictureElement(object: {
4
+ partName: string;
5
+ contentType: string;
6
+ widthPx: number;
7
+ heightPx: number;
8
+ chart?: {
9
+ svg?: string;
10
+ label: string;
11
+ };
12
+ }, pictureUrl: PictureUrl | undefined): HTMLElement;
@@ -22,6 +22,8 @@ export declare class ReviewController {
22
22
  constructor(host: ReviewHost);
23
23
  get commentsOpen(): boolean;
24
24
  setLocale(locale: string): void;
25
+ /** Moves the caret to the start of a thread's anchored text (the pane keeps focus). */
26
+ private goToAnchor;
25
27
  /** Removes a comment, its replies and its anchored range in one go. */
26
28
  private deleteById;
27
29
  private updateComments;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The controls at the right end of Word's ribbon tab row: the Editing / Viewing selector, the
3
+ * Comments toggle and Share, in that order, as Word 365 places them (Excel uses the same
4
+ * `office-ui-ribbon-actions` element). They sit in the shared ribbon's `actions` slot; the title
5
+ * bar keeps the quick access toolbar, the file name and "Tell me".
6
+ */
7
+ import { type OfficeUiRibbonActions } from '../ribbon/ribbon-actions.js';
8
+ import { type EditorLocale } from './localization.js';
9
+ export interface RibbonActionsHandlers {
10
+ setReadOnly(readOnly: boolean): void;
11
+ toggleComments(): void;
12
+ share(): void;
13
+ }
14
+ export interface RibbonActions {
15
+ readonly element: OfficeUiRibbonActions;
16
+ setReadOnly(readOnly: boolean): void;
17
+ setCommentsOpen(open: boolean): void;
18
+ /** Share reads pressed while a collaboration session is live. */
19
+ setSharing(active: boolean): void;
20
+ relocalize(locale: EditorLocale): void;
21
+ }
22
+ export declare function createRibbonActions(handlers: RibbonActionsHandlers): RibbonActions;
@@ -17,20 +17,17 @@ export declare function markerPositions(geometry: RulerGeometry): {
17
17
  left: number;
18
18
  right: number;
19
19
  };
20
- /** Whole-inch labels of the ruler: 0 at the left margin, counting toward the right margin. */
21
- export declare function inchLabels(geometry: RulerGeometry): Array<{
22
- at: number;
23
- text: string;
24
- }>;
25
20
  export type RulerMarker = 'first-line' | 'left' | 'right';
26
21
  /** The paragraph fields a marker dragged to `x` (px from the page's left edge) changes. */
27
22
  export declare function markerChange(marker: RulerMarker, x: number, geometry: RulerGeometry): Partial<Pick<ParagraphFormat, 'leftInches' | 'rightInches' | 'special' | 'specialInches'>>;
23
+ type RulerChange = ReturnType<typeof markerChange>;
28
24
  /**
29
- * Word's horizontal ruler above the page: inch ticks counted from the left margin, the margins
30
- * shaded, and draggable markers for the current paragraph's first-line, left and right indents.
31
- * Dragging snaps to sixteenths of an inch and applies as one undoable step on release. Margin
32
- * edges and tab stops are not draggable.
25
+ * Word's horizontal ruler above the page, on the shared `office-ui-ruler`: inch ticks counted
26
+ * from the left margin, the margins shaded, and draggable markers for the current paragraph's
27
+ * first-line, left and right indents. Dragging snaps to sixteenths of an inch and applies as one
28
+ * undoable step on release (`onChange`). Margin edges and tab stops are not draggable.
33
29
  */
34
- export declare function createRuler(onChange?: (change: ReturnType<typeof markerChange>) => void): HTMLElement;
30
+ export declare function createRuler(onChange?: (change: RulerChange) => void): HTMLElement;
35
31
  /** Positions the ruler's parts for `geometry`; `zoom` matches the page's CSS zoom. */
36
32
  export declare function updateRuler(ruler: HTMLElement, geometry: RulerGeometry, zoom: number): void;
33
+ export {};
@@ -3,8 +3,6 @@ export type SaveState = 'saved' | 'dirty' | 'saving' | 'saved-local';
3
3
  export interface TitleBarHandlers {
4
4
  fileCommand(command: FileCommand): void;
5
5
  history(key: 'undo' | 'redo'): void;
6
- toggleComments(): void;
7
- setReadOnly(readOnly: boolean): void;
8
6
  /** The ribbon root, searched by the "Tell me" box for runnable commands. */
9
7
  ribbon(): HTMLElement | undefined;
10
8
  }
@@ -13,13 +11,13 @@ export interface TitleBar {
13
11
  setFileName(name: string): void;
14
12
  setSaveState(state: SaveState): void;
15
13
  setReadOnly(readOnly: boolean): void;
16
- setCommentsOpen(open: boolean): void;
17
14
  /** Redraws every label after the editor locale changed. */
18
15
  relocalize(): void;
19
16
  }
20
17
  /**
21
18
  * Word-style title bar: quick access toolbar, document name/state and "Tell me". The shared
22
- * `office-ui-title-bar` draws it from translated state; the comments toggle and view mode stay
23
- * docx controls placed in its `account` slot.
19
+ * `office-ui-title-bar` draws it from translated state. The editing mode, Comments and Share sit
20
+ * at the right end of the ribbon tab row (ribbon-actions.ts), as in Word 365; the bar's `account`
21
+ * and `collaboration` slots stay free for a host's account and presence.
24
22
  */
25
23
  export declare function createTitleBar(handlers: TitleBarHandlers): TitleBar;