@a3s-lab/office 0.2.2 → 0.4.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 (277) hide show
  1. package/COLLABORATION_ROADMAP.md +426 -0
  2. package/README.md +649 -10
  3. package/dist/0~1403.js +1 -1
  4. package/dist/0~2805.js +1279 -0
  5. package/dist/{0~use-office-draft.js → 0~345.js} +30 -1
  6. package/dist/0~3539.js +1 -1
  7. package/dist/0~3557.js +1 -1
  8. package/dist/0~3635.js +1 -1
  9. package/dist/0~4595.js +123 -12
  10. package/dist/0~4980.js +154 -0
  11. package/dist/0~5050.js +124 -113
  12. package/dist/{0~9512.js → 0~6090.js} +540 -3
  13. package/dist/0~7048.js +92 -66
  14. package/dist/0~7614.js +2 -1
  15. package/dist/0~7754.js +5653 -0
  16. package/dist/0~9445.js +1 -1
  17. package/dist/0~document-editor.js +4992 -3323
  18. package/dist/0~markdown-editor.js +250 -44
  19. package/dist/0~pdf-viewer.js +1016 -24
  20. package/dist/0~presentation-editor.js +179 -8
  21. package/dist/0~spreadsheet-editor.js +3371 -578
  22. package/dist/0~work-docx-export.js +6801 -658
  23. package/dist/0~work-docx-import.js +1388 -795
  24. package/dist/0~work-office-diagnostics.js +524 -30
  25. package/dist/0~work-pptx-export.js +2 -1
  26. package/dist/0~work-pptx-import.js +1 -2
  27. package/dist/0~work-presentation-charts.js +1 -1
  28. package/dist/2591.js +197 -0
  29. package/dist/3818.js +1090 -0
  30. package/dist/4104.js +970 -60
  31. package/dist/432.js +171 -14
  32. package/dist/4476.js +2008 -0
  33. package/dist/4560.js +674 -0
  34. package/dist/4650.js +70 -0
  35. package/dist/{1134.js → 5184.js} +183 -1
  36. package/dist/6489.js +18 -18
  37. package/dist/7060.js +132 -0
  38. package/dist/8715.js +2 -136
  39. package/dist/8928.js +16778 -0
  40. package/dist/9787.js +209 -0
  41. package/dist/core.d.ts +29 -9
  42. package/dist/core.js +10 -2
  43. package/dist/index.js +13 -3
  44. package/dist/internal/collaboration/office-collaboration-flat-json.d.ts +13 -0
  45. package/dist/internal/collaboration/office-collaboration-json.d.ts +4 -0
  46. package/dist/internal/collaboration/office-collaboration-presence.d.ts +86 -0
  47. package/dist/internal/collaboration/office-collaboration-transport.d.ts +42 -0
  48. package/dist/internal/collaboration/office-collaboration.d.ts +85 -0
  49. package/dist/internal/collaboration/office-document-collaboration-bibliography.d.ts +7 -0
  50. package/dist/internal/collaboration/office-document-collaboration-claims.d.ts +9 -0
  51. package/dist/internal/collaboration/office-document-collaboration-comments.d.ts +7 -0
  52. package/dist/internal/collaboration/office-document-collaboration-sidecar-utils.d.ts +27 -0
  53. package/dist/internal/collaboration/office-document-collaboration-sidecars.d.ts +16 -0
  54. package/dist/internal/collaboration/office-document-collaboration.d.ts +45 -0
  55. package/dist/internal/collaboration/office-markdown-collaboration.d.ts +31 -0
  56. package/dist/internal/collaboration/office-pdf-collaboration-claims.d.ts +4 -0
  57. package/dist/internal/collaboration/office-pdf-collaboration-conflicts.d.ts +2 -0
  58. package/dist/internal/collaboration/office-pdf-collaboration-model.d.ts +26 -0
  59. package/dist/internal/collaboration/office-pdf-collaboration-records.d.ts +21 -0
  60. package/dist/internal/collaboration/office-pdf-collaboration-types.d.ts +91 -0
  61. package/dist/internal/collaboration/office-pdf-collaboration-validation.d.ts +4 -0
  62. package/dist/internal/collaboration/office-pdf-collaboration.d.ts +35 -0
  63. package/dist/internal/collaboration/office-presentation-collaboration-model.d.ts +25 -0
  64. package/dist/internal/collaboration/office-presentation-collaboration-records.d.ts +22 -0
  65. package/dist/internal/collaboration/office-presentation-collaboration-validation.d.ts +4 -0
  66. package/dist/internal/collaboration/office-presentation-collaboration.d.ts +32 -0
  67. package/dist/internal/collaboration/office-spreadsheet-collaboration-cells.d.ts +13 -0
  68. package/dist/internal/collaboration/office-spreadsheet-collaboration-claims.d.ts +4 -0
  69. package/dist/internal/collaboration/office-spreadsheet-collaboration-conflicts.d.ts +2 -0
  70. package/dist/internal/collaboration/office-spreadsheet-collaboration-flat-json.d.ts +10 -0
  71. package/dist/internal/collaboration/office-spreadsheet-collaboration-model.d.ts +31 -0
  72. package/dist/internal/collaboration/office-spreadsheet-collaboration-records.d.ts +17 -0
  73. package/dist/internal/collaboration/office-spreadsheet-collaboration-validation.d.ts +4 -0
  74. package/dist/internal/collaboration/office-spreadsheet-collaboration.d.ts +32 -0
  75. package/dist/internal/design-system/primitives/navigation/tabs.d.ts +3 -1
  76. package/dist/internal/features/work/components/work-document-page-border.d.ts +6 -0
  77. package/dist/internal/features/work/editors/document-command-catalog.d.ts +536 -0
  78. package/dist/internal/features/work/editors/document-editor-focus.d.ts +1 -1
  79. package/dist/internal/features/work/editors/document-editor-support.d.ts +7 -3
  80. package/dist/internal/features/work/editors/document-editor.d.ts +8 -2
  81. package/dist/internal/features/work/editors/document-external-content.d.ts +14 -0
  82. package/dist/internal/features/work/editors/document-format-clipboard.d.ts +6 -0
  83. package/dist/internal/features/work/editors/document-format-tools.d.ts +4 -0
  84. package/dist/internal/features/work/editors/document-layout-panel.d.ts +4 -1
  85. package/dist/internal/features/work/editors/document-page-chrome-wps-shortcuts.d.ts +2 -0
  86. package/dist/internal/features/work/editors/document-page-layout-ribbon.d.ts +14 -0
  87. package/dist/internal/features/work/editors/document-page-stack.d.ts +10 -1
  88. package/dist/internal/features/work/editors/document-page-thumbnail.d.ts +2 -0
  89. package/dist/internal/features/work/editors/document-pagination-run-coordinator.d.ts +26 -0
  90. package/dist/internal/features/work/editors/document-picture-properties-dialog-model.d.ts +20 -1
  91. package/dist/internal/features/work/editors/document-review-navigation.d.ts +9 -0
  92. package/dist/internal/features/work/editors/document-statistics-dialog.d.ts +7 -0
  93. package/dist/internal/features/work/editors/document-status-bar.d.ts +2 -1
  94. package/dist/internal/features/work/editors/document-table-properties-dialog-model.d.ts +4 -1
  95. package/dist/internal/features/work/editors/document-toolbar.d.ts +19 -42
  96. package/dist/internal/features/work/editors/document-wps-shortcuts.d.ts +12 -0
  97. package/dist/internal/features/work/editors/document-zoom.d.ts +17 -0
  98. package/dist/internal/features/work/editors/markdown-editor-focus.d.ts +1 -1
  99. package/dist/internal/features/work/editors/markdown-editor.d.ts +5 -1
  100. package/dist/internal/features/work/editors/markdown-toolbar.d.ts +2 -1
  101. package/dist/internal/features/work/editors/office-collaboration-participants.d.ts +3 -0
  102. package/dist/internal/features/work/editors/office-collaboration-presence-context.d.ts +17 -0
  103. package/dist/internal/features/work/editors/office-collaboration-presence-ui.d.ts +25 -0
  104. package/dist/internal/features/work/editors/office-editor-focus-handoff.d.ts +27 -0
  105. package/dist/internal/features/work/editors/pdf-annotation-controller.d.ts +5 -0
  106. package/dist/internal/features/work/editors/pdf-collaboration-presence.d.ts +3 -0
  107. package/dist/internal/features/work/editors/pdf-collaboration-projection.d.ts +10 -0
  108. package/dist/internal/features/work/editors/pdf-evidence-contract.d.ts +36 -0
  109. package/dist/internal/features/work/editors/pdf-evidence-overlay.d.ts +37 -0
  110. package/dist/internal/features/work/editors/pdf-toolbar.d.ts +2 -1
  111. package/dist/internal/features/work/editors/pdf-viewer-controller.d.ts +7 -1
  112. package/dist/internal/features/work/editors/pdf-viewer.d.ts +11 -1
  113. package/dist/internal/features/work/editors/presentation-collaboration-presence.d.ts +5 -0
  114. package/dist/internal/features/work/editors/presentation-editor-focus.d.ts +3 -2
  115. package/dist/internal/features/work/editors/presentation-editor-types.d.ts +3 -0
  116. package/dist/internal/features/work/editors/presentation-editor.d.ts +1 -1
  117. package/dist/internal/features/work/editors/spreadsheet-auto-filter.d.ts +9 -0
  118. package/dist/internal/features/work/editors/spreadsheet-cell-clear.d.ts +3 -0
  119. package/dist/internal/features/work/editors/spreadsheet-cell-merge.d.ts +12 -0
  120. package/dist/internal/features/work/editors/spreadsheet-clipboard-shortcuts.d.ts +3 -7
  121. package/dist/internal/features/work/editors/spreadsheet-collaboration-presence.d.ts +9 -0
  122. package/dist/internal/features/work/editors/spreadsheet-command-catalog.d.ts +464 -0
  123. package/dist/internal/features/work/editors/spreadsheet-command-controller.d.ts +45 -9
  124. package/dist/internal/features/work/editors/spreadsheet-context-menu.d.ts +2 -0
  125. package/dist/internal/features/work/editors/spreadsheet-editor-ribbon.d.ts +9 -28
  126. package/dist/internal/features/work/editors/spreadsheet-editor.d.ts +8 -2
  127. package/dist/internal/features/work/editors/spreadsheet-format-painter.d.ts +27 -0
  128. package/dist/internal/features/work/editors/spreadsheet-freeze-panes.d.ts +14 -0
  129. package/dist/internal/features/work/editors/use-document-insert-commands.d.ts +3 -2
  130. package/dist/internal/features/work/editors/use-document-pagination.d.ts +6 -1
  131. package/dist/internal/features/work/editors/use-document-review-conflicts.d.ts +28 -0
  132. package/dist/internal/features/work/editors/use-spreadsheet-auto-filter.d.ts +21 -0
  133. package/dist/internal/features/work/editors/use-spreadsheet-collaboration.d.ts +27 -0
  134. package/dist/internal/features/work/editors/use-spreadsheet-format-painter.d.ts +18 -0
  135. package/dist/internal/features/work/editors/work-office-chrome.d.ts +22 -3
  136. package/dist/internal/features/work/editors/work-office-ribbon-overflow.d.ts +2 -0
  137. package/dist/internal/features/work/work-document-bookmark-references.d.ts +37 -0
  138. package/dist/internal/features/work/work-document-bookmarks.d.ts +29 -0
  139. package/dist/internal/features/work/work-document-caption-nodes.d.ts +4 -1
  140. package/dist/internal/features/work/work-document-comments.d.ts +1 -1
  141. package/dist/internal/features/work/work-document-equations.d.ts +513 -0
  142. package/dist/internal/features/work/work-document-extensions.d.ts +1 -0
  143. package/dist/internal/features/work/work-document-field-identity.d.ts +2 -0
  144. package/dist/internal/features/work/work-document-field-node.d.ts +2 -2
  145. package/dist/internal/features/work/work-document-fields.d.ts +7 -0
  146. package/dist/internal/features/work/work-document-image-identity.d.ts +30 -0
  147. package/dist/internal/features/work/work-document-image-layout.d.ts +46 -1
  148. package/dist/internal/features/work/work-document-image-wrap-contour.d.ts +16 -0
  149. package/dist/internal/features/work/work-document-incremental-layout.d.ts +2 -2
  150. package/dist/internal/features/work/work-document-model-codec.d.ts +4 -1
  151. package/dist/internal/features/work/work-document-note-integrity.d.ts +2 -0
  152. package/dist/internal/features/work/work-document-page-borders.d.ts +25 -0
  153. package/dist/internal/features/work/work-document-page-capture.d.ts +8 -0
  154. package/dist/internal/features/work/work-document-page-frames.d.ts +15 -0
  155. package/dist/internal/features/work/work-document-page-margins.d.ts +56 -0
  156. package/dist/internal/features/work/work-document-page-size.d.ts +47 -0
  157. package/dist/internal/features/work/work-document-pagination-measurement.d.ts +1 -2
  158. package/dist/internal/features/work/work-document-pagination-types.d.ts +7 -2
  159. package/dist/internal/features/work/work-document-pagination.d.ts +2 -2
  160. package/dist/internal/features/work/work-document-paragraph-borders.d.ts +32 -0
  161. package/dist/internal/features/work/work-document-paragraph-identity.d.ts +26 -0
  162. package/dist/internal/features/work/work-document-paragraph-shading.d.ts +18 -0
  163. package/dist/internal/features/work/work-document-review-conflicts.d.ts +35 -0
  164. package/dist/internal/features/work/work-document-section.d.ts +4 -0
  165. package/dist/internal/features/work/work-document-snapshot.d.ts +19 -0
  166. package/dist/internal/features/work/work-document-source.d.ts +23 -0
  167. package/dist/internal/features/work/work-document-table-column-widths.d.ts +7 -0
  168. package/dist/internal/features/work/work-document-table-property-changes.d.ts +3 -0
  169. package/dist/internal/features/work/work-document-table-row-identity.d.ts +15 -0
  170. package/dist/internal/features/work/work-document-table-sizing.d.ts +3 -0
  171. package/dist/internal/features/work/work-document-text-layout.d.ts +3 -1
  172. package/dist/internal/features/work/work-document-word-line-metrics.d.ts +2 -0
  173. package/dist/internal/features/work/work-docx-bookmark-diagnostics.d.ts +3 -0
  174. package/dist/internal/features/work/work-docx-bookmark-import.d.ts +24 -0
  175. package/dist/internal/features/work/work-docx-bookmarks.d.ts +17 -0
  176. package/dist/internal/features/work/work-docx-comment-durable-id-preservation.d.ts +2 -0
  177. package/dist/internal/features/work/work-docx-comment-export.d.ts +3 -0
  178. package/dist/internal/features/work/work-docx-comment-metadata.d.ts +2 -0
  179. package/dist/internal/features/work/work-docx-drawing-extension-preservation.d.ts +4 -0
  180. package/dist/internal/features/work/work-docx-equation-diagnostics.d.ts +3 -0
  181. package/dist/internal/features/work/work-docx-equation-export.d.ts +14 -0
  182. package/dist/internal/features/work/work-docx-equation-import.d.ts +30 -0
  183. package/dist/internal/features/work/work-docx-equation-story.d.ts +9 -0
  184. package/dist/internal/features/work/work-docx-export-formatting.d.ts +3 -1
  185. package/dist/internal/features/work/work-docx-export-image.d.ts +5 -1
  186. package/dist/internal/features/work/work-docx-export.d.ts +1 -1
  187. package/dist/internal/features/work/work-docx-field-instructions.d.ts +8 -0
  188. package/dist/internal/features/work/work-docx-font-table-preservation.d.ts +3 -0
  189. package/dist/internal/features/work/work-docx-ignorable-extension-preservation.d.ts +15 -0
  190. package/dist/internal/features/work/work-docx-image-crop.d.ts +12 -0
  191. package/dist/internal/features/work/work-docx-image-identity.d.ts +17 -0
  192. package/dist/internal/features/work/work-docx-image-layer.d.ts +12 -0
  193. package/dist/internal/features/work/work-docx-image-layout-import.d.ts +14 -2
  194. package/dist/internal/features/work/work-docx-image-wrap.d.ts +15 -0
  195. package/dist/internal/features/work/work-docx-import.d.ts +13 -3
  196. package/dist/internal/features/work/work-docx-list-export.d.ts +18 -0
  197. package/dist/internal/features/work/work-docx-list-import.d.ts +14 -0
  198. package/dist/internal/features/work/work-docx-note-comment-content-control-block-preservation.d.ts +18 -0
  199. package/dist/internal/features/work/work-docx-note-comment-content-control-model.d.ts +47 -0
  200. package/dist/internal/features/work/work-docx-note-comment-content-control-preservation.d.ts +4 -0
  201. package/dist/internal/features/work/work-docx-note-comment-content-control-properties.d.ts +17 -0
  202. package/dist/internal/features/work/work-docx-note-comment-content-control-table-model.d.ts +17 -0
  203. package/dist/internal/features/work/work-docx-note-comment-content-control-xml.d.ts +14 -0
  204. package/dist/internal/features/work/work-docx-note-comment-extension-preservation.d.ts +2 -0
  205. package/dist/internal/features/work/work-docx-note-comment-hyperlink-content.d.ts +40 -0
  206. package/dist/internal/features/work/work-docx-note-comment-hyperlink-preservation.d.ts +5 -0
  207. package/dist/internal/features/work/work-docx-note-comment-hyperlink-relationships.d.ts +35 -0
  208. package/dist/internal/features/work/work-docx-note-comment-identity.d.ts +15 -0
  209. package/dist/internal/features/work/work-docx-note-comment-run-preservation.d.ts +4 -0
  210. package/dist/internal/features/work/work-docx-note-comment-run-properties.d.ts +2 -0
  211. package/dist/internal/features/work/work-docx-note-image-import.d.ts +12 -0
  212. package/dist/internal/features/work/work-docx-note-image-relationships.d.ts +1 -0
  213. package/dist/internal/features/work/work-docx-numbering-extension-preservation.d.ts +6 -0
  214. package/dist/internal/features/work/work-docx-numbering.d.ts +1 -0
  215. package/dist/internal/features/work/work-docx-page-borders-diagnostics.d.ts +3 -0
  216. package/dist/internal/features/work/work-docx-page-borders-import.d.ts +10 -0
  217. package/dist/internal/features/work/work-docx-page-margins-diagnostics.d.ts +3 -0
  218. package/dist/internal/features/work/work-docx-page-margins-import.d.ts +18 -0
  219. package/dist/internal/features/work/work-docx-page-size-diagnostics.d.ts +2 -0
  220. package/dist/internal/features/work/work-docx-page-size-import.d.ts +17 -0
  221. package/dist/internal/features/work/work-docx-paragraph-borders-diagnostics.d.ts +3 -0
  222. package/dist/internal/features/work/work-docx-paragraph-borders-export.d.ts +18 -0
  223. package/dist/internal/features/work/work-docx-paragraph-borders-import.d.ts +24 -0
  224. package/dist/internal/features/work/work-docx-paragraph-default-collapsed.d.ts +19 -0
  225. package/dist/internal/features/work/work-docx-paragraph-extension-preservation.d.ts +2 -0
  226. package/dist/internal/features/work/work-docx-paragraph-identity-import.d.ts +10 -0
  227. package/dist/internal/features/work/work-docx-paragraph-identity.d.ts +18 -0
  228. package/dist/internal/features/work/work-docx-paragraph-pagination-import.d.ts +6 -1
  229. package/dist/internal/features/work/work-docx-paragraph-shading-diagnostics.d.ts +3 -0
  230. package/dist/internal/features/work/work-docx-paragraph-shading-export.d.ts +5 -0
  231. package/dist/internal/features/work/work-docx-paragraph-shading-import.d.ts +18 -0
  232. package/dist/internal/features/work/work-docx-run-formatting-import.d.ts +3 -0
  233. package/dist/internal/features/work/work-docx-settings-preservation.d.ts +10 -0
  234. package/dist/internal/features/work/work-docx-settings-xml.d.ts +16 -0
  235. package/dist/internal/features/work/work-docx-style-extension-preservation.d.ts +2 -0
  236. package/dist/internal/features/work/work-docx-table-cell-export.d.ts +2 -1
  237. package/dist/internal/features/work/work-docx-table-cell-import.d.ts +3 -0
  238. package/dist/internal/features/work/work-docx-table-extension-preservation.d.ts +2 -0
  239. package/dist/internal/features/work/work-docx-table-row-import.d.ts +2 -0
  240. package/dist/internal/features/work/work-docx-table-sizing-import.d.ts +1 -0
  241. package/dist/internal/features/work/work-docx-theme-reference.d.ts +23 -0
  242. package/dist/internal/features/work/work-docx-theme.d.ts +4 -1
  243. package/dist/internal/features/work/work-docx-twips.d.ts +12 -0
  244. package/dist/internal/features/work/work-file-contract.d.ts +1 -0
  245. package/dist/internal/features/work/work-file-io.d.ts +1 -1
  246. package/dist/internal/features/work/work-markdown-extensions.d.ts +4 -1
  247. package/dist/internal/features/work/work-ooxml-package-preservation.d.ts +12 -0
  248. package/dist/internal/features/work/work-ooxml-package-security.d.ts +6 -0
  249. package/dist/internal/features/work/work-ooxml-relationship-preservation.d.ts +10 -0
  250. package/dist/internal/features/work/work-ooxml-xml.d.ts +2 -0
  251. package/dist/internal/features/work/work-pdf-export.d.ts +10 -0
  252. package/dist/internal/features/work/work-repository.d.ts +2 -0
  253. package/dist/internal/features/work/work-types.d.ts +15 -2
  254. package/dist/internal/kernel/office-kernel-client-types.d.ts +1 -0
  255. package/dist/internal/kernel/office-kernel-protocol.d.ts +7 -0
  256. package/dist/internal/kernel/office-kernel-version.d.ts +1 -1
  257. package/dist/office-kernel.wasm +0 -0
  258. package/dist/office-kernel.worker.js +93 -41
  259. package/dist/react.d.ts +18 -12
  260. package/dist/react.js +1 -1
  261. package/dist/styles.css +1367 -16
  262. package/dist/vue.d.ts +48 -5
  263. package/dist/vue.js +42 -3
  264. package/dist/web-component.d.ts +24 -2
  265. package/dist/web-component.js +101 -2
  266. package/docs/latest/en/browser-editor-architecture.md +262 -47
  267. package/package.json +29 -4
  268. package/dist/0~152.js +0 -94
  269. package/dist/0~2582.js +0 -485
  270. package/dist/0~4750.js +0 -939
  271. package/dist/0~5861.js +0 -596
  272. package/dist/0~work-document-extensions.js +0 -3045
  273. package/dist/0~work-document-model-codec.js +0 -42
  274. package/dist/0~work-docx-bibliography.js +0 -347
  275. package/dist/0~work-docx-page-color.js +0 -42
  276. package/dist/2881.js +0 -1455
  277. package/dist/8728.js +0 -723
package/dist/0~7048.js CHANGED
@@ -2,7 +2,8 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useCallback, useEffect, useId, useRef, useState } from "react";
3
3
  import { Check, ChevronDown, ChevronUp } from "lucide-react";
4
4
  import { Dialog } from "./0~4595.js";
5
- import { button_Button, office_text_field_OfficeTextField, office_text_field_OfficeTextArea } from "./0~9512.js";
5
+ import { button_Button, office_text_field_OfficeTextField, office_text_field_OfficeTextArea } from "./0~6090.js";
6
+ import { OFFICE_KERNEL_SPREADSHEET_MAX_ROWS as office_kernel_spreadsheet_protocol_OFFICE_KERNEL_SPREADSHEET_MAX_ROWS, isOfficeKernelSpreadsheetError } from "./5184.js";
6
7
  function CollectionState({ children, icon, actions, tone = 'neutral', role, className = '' }) {
7
8
  return /*#__PURE__*/ jsxs("div", {
8
9
  className: `ds-collection-state ${tone}${className ? ` ${className}` : ''}`,
@@ -667,29 +668,36 @@ function normalizeOfficeFontFamily(value) {
667
668
  return officeFontFamilyLabel(value).toLocaleLowerCase();
668
669
  }
669
670
  const MAX_LAYOUT_BLOCKS = 10000;
671
+ const MAX_LAYOUT_PAGE_STYLES = MAX_LAYOUT_BLOCKS;
670
672
  const MAX_LAYOUT_EXTENT = 1000000;
671
673
  const MAX_LAYOUT_PAGE_INDEX = 1000000;
672
674
  function layoutOfficeDocumentInJavaScript(request) {
673
675
  validateLayoutRequest(request);
674
- const availableHeight = Math.max(1, request.page.height - request.page.marginTop - request.page.marginBottom);
676
+ const pageStyles = new Map((request.pageStyles ?? []).map(({ id, page })=>[
677
+ id,
678
+ page
679
+ ]));
680
+ const firstPage = pageMetricsForBlock(request.blocks[0], request.page, pageStyles);
675
681
  const pages = [
676
- emptyPage(request.startPageIndex, availableHeight)
682
+ emptyPage(request.startPageIndex, firstPage)
677
683
  ];
678
684
  let index = 0;
679
685
  while(index < request.blocks.length){
680
686
  const block = request.blocks[index];
687
+ const page = pageMetricsForBlock(block, request.page, pageStyles);
688
+ ensurePageMetrics(pages, page);
681
689
  if (void 0 !== block.flowCount) {
682
690
  const end = index + block.flowCount;
683
- layoutFlow(request.blocks.slice(index, end), request.blocks.slice(end), pages, availableHeight, end < request.blocks.length);
691
+ layoutFlow(request.blocks.slice(index, end), request.blocks.slice(end), pages, page, request.page, pageStyles, end < request.blocks.length);
684
692
  index = end;
685
693
  } else {
686
- layoutSingleBlock(block, request.blocks.slice(index + 1), pages, availableHeight, index + 1 < request.blocks.length);
694
+ layoutSingleBlock(block, request.blocks.slice(index + 1), pages, page, request.page, pageStyles, index + 1 < request.blocks.length);
687
695
  index += 1;
688
696
  }
689
697
  }
690
698
  if (pages.length > 1 && pages.at(-1)?.placements.length === 0) pages.pop();
691
699
  return {
692
- protocol: 15,
700
+ protocol: 16,
693
701
  kind: 'layoutResult',
694
702
  requestId: request.requestId,
695
703
  revision: request.revision,
@@ -697,66 +705,76 @@ function layoutOfficeDocumentInJavaScript(request) {
697
705
  startPageIndex: request.startPageIndex,
698
706
  engine: "javascript",
699
707
  pages,
700
- breaks: layoutBreaks(pages, request)
708
+ breaks: layoutBreaks(pages)
701
709
  };
702
710
  }
703
711
  function validateLayoutRequest(request) {
704
- if (15 !== request.protocol) throw kernelError('office.kernel.protocol_unsupported', `Office kernel protocol ${request.protocol} is unsupported.`);
712
+ if (16 !== request.protocol) throw kernelError('office.kernel.protocol_unsupported', `Office kernel protocol ${request.protocol} is unsupported.`);
705
713
  if ('layout' !== request.kind) throw kernelError('office.kernel.request_kind_invalid', 'The Office kernel only accepts layout requests at this boundary.');
706
714
  if (!Number.isSafeInteger(request.requestId) || request.requestId < 0 || !Number.isSafeInteger(request.revision) || request.revision < 0 || !Number.isSafeInteger(request.documentRevision) || request.documentRevision < 0 || !Number.isSafeInteger(request.startPageIndex) || request.startPageIndex < 0) throw kernelError('office.kernel.revision_invalid', 'Request, layout, and document revisions must be non-negative safe integers.');
707
715
  if (request.startPageIndex > MAX_LAYOUT_PAGE_INDEX) throw kernelError('office.kernel.page_index_invalid', `startPageIndex may not exceed ${MAX_LAYOUT_PAGE_INDEX}.`);
708
716
  if (request.blocks.length > MAX_LAYOUT_BLOCKS) throw kernelError('office.kernel.block_limit_exceeded', `A layout request may contain at most ${MAX_LAYOUT_BLOCKS} blocks.`);
709
- for (const [name, value] of Object.entries(request.page))validateExtent(`page.${name}`, value);
710
- if (request.page.width <= request.page.marginLeft + request.page.marginRight) throw kernelError('office.kernel.page_width_invalid', 'Page width must be greater than its horizontal margins.');
711
- if (request.page.height <= request.page.marginTop + request.page.marginBottom) throw kernelError('office.kernel.page_height_invalid', 'Page height must leave a positive body area.');
717
+ validatePageMetrics('page', request.page);
718
+ const pageStyles = request.pageStyles ?? [];
719
+ if (pageStyles.length > MAX_LAYOUT_PAGE_STYLES) throw kernelError('office.kernel.page_style_limit_exceeded', `A layout request may contain at most ${MAX_LAYOUT_PAGE_STYLES} page styles.`);
720
+ const pageStyleIds = new Set();
721
+ for (const style of pageStyles){
722
+ if (!style.id.trim() || style.id.length > 256) throw kernelError('office.kernel.page_style_id_invalid', 'Every page style requires a non-empty ID of at most 256 bytes.');
723
+ if (pageStyleIds.has(style.id)) throw kernelError('office.kernel.page_style_id_duplicate', `Page style ID '${style.id}' is duplicated.`);
724
+ pageStyleIds.add(style.id);
725
+ validatePageMetrics(`pageStyles.${style.id}.page`, style.page);
726
+ }
712
727
  const blockIds = new Set();
713
728
  for (const block of request.blocks){
714
729
  if (!block.id.trim() || block.id.length > 256) throw kernelError('office.kernel.block_id_invalid', 'Every layout block requires a non-empty ID of at most 256 bytes.');
715
730
  if (blockIds.has(block.id)) throw kernelError('office.kernel.block_id_duplicate', `Layout block ID '${block.id}' is duplicated.`);
716
731
  blockIds.add(block.id);
732
+ if (void 0 !== block.pageStyleId && (!block.pageStyleId.trim() || block.pageStyleId.length > 256 || !pageStyleIds.has(block.pageStyleId))) throw kernelError('office.kernel.page_style_reference_invalid', `Layout block '${block.id}' references an unknown page style.`);
717
733
  validateExtent('block.height', block.height);
718
734
  validateFlowMetadata(block);
719
735
  }
720
736
  validateFlowSequences(request.blocks);
721
737
  }
722
- function layoutSingleBlock(block, next, pages, availableHeight, hasMoreBlocks) {
738
+ function layoutSingleBlock(block, next, pages, page, defaultPage, pageStyles, hasMoreBlocks) {
739
+ const availableHeight = pageBodyHeight(page);
723
740
  let current = pages.at(-1);
724
741
  let currentHasContent = current.placements.length > 0;
725
742
  if (block.breakBefore && currentHasContent) {
726
- current = emptyPage(nextPageIndex(pages), availableHeight);
743
+ current = emptyPage(nextPageIndex(pages), page);
727
744
  pages.push(current);
728
745
  currentHasContent = false;
729
746
  }
730
747
  const remaining = Math.max(0, availableHeight - current.usedHeight);
731
- const nextHeight = nextBlockPreviewHeight(next);
748
+ const nextHeight = nextBlockPreviewHeight(next, page, defaultPage, pageStyles);
732
749
  const groupedHeight = block.height + (block.keepWithNext ? nextHeight : 0);
733
750
  const shouldAdvance = currentHasContent && (block.height > remaining || (block.keepTogether || block.keepWithNext) && groupedHeight <= availableHeight && groupedHeight > remaining);
734
751
  if (shouldAdvance) {
735
- current = emptyPage(nextPageIndex(pages), availableHeight);
752
+ current = emptyPage(nextPageIndex(pages), page);
736
753
  pages.push(current);
737
754
  }
738
755
  placeFragment(block, current, availableHeight);
739
- if (block.breakAfter && hasMoreBlocks) pages.push(emptyPage(nextPageIndex(pages), availableHeight));
756
+ if (block.breakAfter && hasMoreBlocks) pages.push(emptyPage(nextPageIndex(pages), page));
740
757
  }
741
- function layoutFlow(blocks, next, pages, availableHeight, hasMoreBlocks) {
758
+ function layoutFlow(blocks, next, pages, page, defaultPage, pageStyles, hasMoreBlocks) {
759
+ const availableHeight = pageBodyHeight(page);
742
760
  const first = blocks[0];
743
761
  const last = blocks.at(-1);
744
- if (first.breakBefore && pages.at(-1)?.placements.length) pages.push(emptyPage(nextPageIndex(pages), availableHeight));
762
+ if (first.breakBefore && pages.at(-1)?.placements.length) pages.push(emptyPage(nextPageIndex(pages), page));
745
763
  const totalHeight = fragmentHeight(blocks, 0, blocks.length);
746
- const nextHeight = last.keepWithNext ? nextBlockPreviewHeight(next) : 0;
764
+ const nextHeight = last.keepWithNext ? nextBlockPreviewHeight(next, page, defaultPage, pageStyles) : 0;
747
765
  let current = pages.at(-1);
748
766
  const repeatHeaderCount = first.repeatHeaderCount ?? 0;
749
767
  const repeatHeaderHeight = first.repeatHeaderHeight ?? 0;
750
768
  const groupedHeight = totalHeight + nextHeight;
751
769
  if (first.keepTogether && current.placements.length && groupedHeight <= availableHeight && groupedHeight > Math.max(0, availableHeight - current.usedHeight)) {
752
- current = emptyPage(nextPageIndex(pages), availableHeight);
770
+ current = emptyPage(nextPageIndex(pages), page);
753
771
  pages.push(current);
754
772
  }
755
773
  if (repeatHeaderCount > 0 && repeatHeaderCount < blocks.length) {
756
774
  const leadingHeight = fragmentHeight(blocks, 0, repeatHeaderCount + 1);
757
775
  const remainingHeight = Math.max(0, availableHeight - current.usedHeight);
758
776
  if (current.placements.length > 0 && leadingHeight <= availableHeight && leadingHeight > remainingHeight) {
759
- current = emptyPage(nextPageIndex(pages), availableHeight);
777
+ current = emptyPage(nextPageIndex(pages), page);
760
778
  pages.push(current);
761
779
  }
762
780
  }
@@ -770,7 +788,7 @@ function layoutFlow(blocks, next, pages, availableHeight, hasMoreBlocks) {
770
788
  const remainingFragments = blocks.length - cursor;
771
789
  const remainingFlowHeight = fragmentHeight(blocks, cursor, blocks.length);
772
790
  if (nextHeight > 0 && currentHasContent && remainingFlowHeight <= remainingHeight && remainingFlowHeight + nextHeight > remainingHeight && remainingFlowHeight + nextHeight <= availableHeight) {
773
- pages.push(emptyPage(nextPageIndex(pages), availableHeight));
791
+ pages.push(emptyPage(nextPageIndex(pages), page));
774
792
  continue;
775
793
  }
776
794
  let fitting = fragmentsFitting(blocks, cursor, blocks.length, remainingHeight);
@@ -781,7 +799,7 @@ function layoutFlow(blocks, next, pages, availableHeight, hasMoreBlocks) {
781
799
  }
782
800
  if (0 === fitting) {
783
801
  if (currentHasContent) {
784
- pages.push(emptyPage(nextPageIndex(pages), availableHeight));
802
+ pages.push(emptyPage(nextPageIndex(pages), page));
785
803
  continue;
786
804
  }
787
805
  fitting = 1;
@@ -789,19 +807,20 @@ function layoutFlow(blocks, next, pages, availableHeight, hasMoreBlocks) {
789
807
  if (remainingFragments > minimum) fitting = Math.min(fitting, remainingFragments - minimum);
790
808
  const minimumHere = Math.min(minimum, remainingFragments);
791
809
  if (fitting < minimumHere && currentHasContent) {
792
- pages.push(emptyPage(nextPageIndex(pages), availableHeight));
810
+ pages.push(emptyPage(nextPageIndex(pages), page));
793
811
  continue;
794
812
  }
795
813
  fitting = Math.max(1, fitting);
796
814
  placeFragments(blocks, cursor, cursor + fitting, current, availableHeight);
797
815
  cursor += fitting;
798
- if (cursor < blocks.length) pages.push(emptyPage(nextPageIndex(pages), availableHeight));
816
+ if (cursor < blocks.length) pages.push(emptyPage(nextPageIndex(pages), page));
799
817
  }
800
- if (last.breakAfter && hasMoreBlocks) pages.push(emptyPage(nextPageIndex(pages), availableHeight));
818
+ if (last.breakAfter && hasMoreBlocks) pages.push(emptyPage(nextPageIndex(pages), page));
801
819
  }
802
- function nextBlockPreviewHeight(blocks) {
820
+ function nextBlockPreviewHeight(blocks, currentPage, defaultPage, pageStyles) {
803
821
  const first = blocks[0];
804
822
  if (!first || first.breakBefore) return 0;
823
+ if (!pageMetricsEqual(currentPage, pageMetricsForBlock(first, defaultPage, pageStyles))) return 0;
805
824
  const count = Math.min(2, first.flowCount ?? 1);
806
825
  return fragmentHeight(blocks, 0, count);
807
826
  }
@@ -874,25 +893,28 @@ function validateFlowSequences(blocks) {
874
893
  const flow = blocks.slice(index, index + count);
875
894
  if (flow.length !== count) throw kernelError('office.kernel.flow_sequence_invalid', 'A layout flow must contain its declared number of fragments.');
876
895
  flow.forEach((fragment, flowIndex)=>{
877
- if (fragment.flowId !== block.flowId || fragment.flowIndex !== flowIndex || fragment.flowCount !== count || fragment.minimumFragmentsPerPage !== block.minimumFragmentsPerPage || fragment.repeatHeaderCount !== repeatHeaderCount || fragment.repeatHeaderHeight !== repeatHeaderHeight) throw kernelError('office.kernel.flow_sequence_invalid', 'Layout flow fragments must be consecutive and consistently indexed.');
896
+ if (fragment.flowId !== block.flowId || fragment.flowIndex !== flowIndex || fragment.flowCount !== count || fragment.minimumFragmentsPerPage !== block.minimumFragmentsPerPage || fragment.repeatHeaderCount !== repeatHeaderCount || fragment.repeatHeaderHeight !== repeatHeaderHeight || fragment.pageStyleId !== block.pageStyleId) throw kernelError('office.kernel.flow_sequence_invalid', 'Layout flow fragments must be consecutive and consistently indexed.');
878
897
  if (flowIndex > 0 && fragment.breakBefore) throw kernelError('office.kernel.flow_break_invalid', 'Only the first flow fragment may request breakBefore.');
879
898
  if (flowIndex + 1 < count && fragment.breakAfter) throw kernelError('office.kernel.flow_break_invalid', 'Only the last flow fragment may request breakAfter.');
880
899
  });
881
900
  index += count;
882
901
  }
883
902
  }
884
- function emptyPage(index, availableHeight) {
903
+ function emptyPage(index, page) {
885
904
  return {
886
905
  index,
906
+ page: {
907
+ ...page
908
+ },
887
909
  usedHeight: 0,
888
- availableHeight,
910
+ availableHeight: pageBodyHeight(page),
889
911
  placements: []
890
912
  };
891
913
  }
892
914
  function nextPageIndex(pages) {
893
915
  return (pages.at(-1)?.index ?? -1) + 1;
894
916
  }
895
- function layoutBreaks(pages, request) {
917
+ function layoutBreaks(pages) {
896
918
  return pages.slice(1).flatMap((page, localIndex)=>{
897
919
  const beforeBlockId = page.placements[0]?.blockId;
898
920
  const previous = pages[localIndex];
@@ -903,11 +925,37 @@ function layoutBreaks(pages, request) {
903
925
  beforeBlockId,
904
926
  pageIndex: page.index,
905
927
  remainingBodyHeight,
906
- spacerHeight: remainingBodyHeight + request.page.marginBottom + request.page.pageGap + request.page.marginTop
928
+ spacerHeight: remainingBodyHeight + previous.page.marginBottom + previous.page.pageGap + page.page.marginTop
907
929
  }
908
930
  ];
909
931
  });
910
932
  }
933
+ function ensurePageMetrics(pages, page) {
934
+ const current = pages.at(-1);
935
+ if (pageMetricsEqual(current.page, page)) return;
936
+ if (0 === current.placements.length && 0 === current.usedHeight) {
937
+ current.page = {
938
+ ...page
939
+ };
940
+ current.availableHeight = pageBodyHeight(page);
941
+ return;
942
+ }
943
+ pages.push(emptyPage(nextPageIndex(pages), page));
944
+ }
945
+ function pageMetricsForBlock(block, defaultPage, pageStyles) {
946
+ return block?.pageStyleId ? pageStyles.get(block.pageStyleId) ?? defaultPage : defaultPage;
947
+ }
948
+ function pageBodyHeight(page) {
949
+ return Math.max(1, page.height - page.marginTop - page.marginBottom);
950
+ }
951
+ function pageMetricsEqual(left, right) {
952
+ return left.width === right.width && left.height === right.height && left.marginTop === right.marginTop && left.marginRight === right.marginRight && left.marginBottom === right.marginBottom && left.marginLeft === right.marginLeft && left.headerHeight === right.headerHeight && left.footerHeight === right.footerHeight && left.pageGap === right.pageGap;
953
+ }
954
+ function validatePageMetrics(name, page) {
955
+ for (const [property, value] of Object.entries(page))validateExtent(`${name}.${property}`, value);
956
+ if (page.width <= page.marginLeft + page.marginRight) throw kernelError('office.kernel.page_width_invalid', 'Page width must be greater than its horizontal margins.');
957
+ if (page.height <= page.marginTop + page.marginBottom) throw kernelError('office.kernel.page_height_invalid', 'Page height must leave a positive body area.');
958
+ }
911
959
  function validateExtent(name, value) {
912
960
  if (!Number.isFinite(value) || value < 0 || value > MAX_LAYOUT_EXTENT) throw kernelError('office.kernel.extent_invalid', `${name} must be a finite non-negative number.`);
913
961
  }
@@ -929,7 +977,7 @@ function resolveOfficePresentationGeometryInJavaScript(request) {
929
977
  guides: []
930
978
  } : snapPresentationElement(request.elements, operation.movingElementId, operation.mode, operation.thresholdX, operation.thresholdY);
931
979
  return {
932
- protocol: 15,
980
+ protocol: 16,
933
981
  kind: 'presentationGeometryResult',
934
982
  requestId: request.requestId,
935
983
  revision: request.revision,
@@ -1077,7 +1125,7 @@ function clampPresentationExtent(value, maximum) {
1077
1125
  return Math.min(Math.max(value, 0), Math.max(0, maximum));
1078
1126
  }
1079
1127
  function validatePresentationGeometryRequest(request) {
1080
- if (15 !== request.protocol) throw office_kernel_presentation_fallback_kernelError('office.kernel.protocol_unsupported', `Office kernel protocol ${request.protocol} is unsupported.`);
1128
+ if (16 !== request.protocol) throw office_kernel_presentation_fallback_kernelError('office.kernel.protocol_unsupported', `Office kernel protocol ${request.protocol} is unsupported.`);
1081
1129
  if ('presentationGeometry' !== request.kind) throw office_kernel_presentation_fallback_kernelError('office.kernel.request_kind_invalid', 'The presentation geometry kernel received an invalid request kind.');
1082
1130
  for (const [name, value] of [
1083
1131
  [
@@ -1383,36 +1431,13 @@ function isAsciiFormulaNameStart(value) {
1383
1431
  function isAsciiFormulaNameContinue(value) {
1384
1432
  return /[A-Za-z0-9_.]/u.test(value);
1385
1433
  }
1386
- const office_kernel_spreadsheet_protocol_OFFICE_KERNEL_SPREADSHEET_MAX_ROWS = 1048576;
1387
- const spreadsheetErrors = new Set([
1388
- '#BLOCKED!',
1389
- '#BUSY!',
1390
- '#CALC!',
1391
- '#CONNECT!',
1392
- '#DIV/0!',
1393
- '#FIELD!',
1394
- '#GETTING_DATA',
1395
- '#N/A',
1396
- '#NAME?',
1397
- '#NULL!',
1398
- '#NUM!',
1399
- '#PYTHON!',
1400
- '#REF!',
1401
- '#SPILL!',
1402
- '#UNKNOWN!',
1403
- '#VALUE!'
1404
- ]);
1405
- new TextEncoder();
1406
- function isOfficeKernelSpreadsheetError(value) {
1407
- return 'string' == typeof value && spreadsheetErrors.has(value);
1408
- }
1409
1434
  const MAX_SPREADSHEET_INPUT_CELLS = 100000;
1410
1435
  const MAX_SPREADSHEET_FORMULA_CHARACTERS = 8192;
1411
1436
  const MAX_SPREADSHEET_SHEETS = 1024;
1412
1437
  const MAX_SPREADSHEET_IDENTIFIER_BYTES = 256;
1413
1438
  const MAX_UNSIGNED_32_BIT_INTEGER = 4294967295;
1414
1439
  function validateSpreadsheetCalculationRequest(request) {
1415
- if (15 !== request.protocol) throw office_kernel_spreadsheet_fallback_validation_kernelError('office.kernel.protocol_unsupported', `Office kernel protocol ${request.protocol} is unsupported.`);
1440
+ if (16 !== request.protocol) throw office_kernel_spreadsheet_fallback_validation_kernelError('office.kernel.protocol_unsupported', `Office kernel protocol ${request.protocol} is unsupported.`);
1416
1441
  if ('spreadsheetCalculation' !== request.kind) throw office_kernel_spreadsheet_fallback_validation_kernelError('office.kernel.request_kind_invalid', 'The Spreadsheet kernel only accepts calculation requests.');
1417
1442
  if (!unsigned32BitInteger(request.requestId) || !unsigned32BitInteger(request.revision) || !nonNegativeSafeInteger(request.documentRevision)) throw office_kernel_spreadsheet_fallback_validation_kernelError('office.kernel.revision_invalid', 'Request, calculation, and document revisions must be non-negative safe integers.');
1418
1443
  if (request.sheets.length > MAX_SPREADSHEET_SHEETS) throw office_kernel_spreadsheet_fallback_validation_kernelError('office.kernel.spreadsheet.sheet_limit_exceeded', `A Spreadsheet calculation request may contain at most ${MAX_SPREADSHEET_SHEETS} sheets.`);
@@ -1575,7 +1600,7 @@ class JavaScriptSpreadsheetEvaluator {
1575
1600
  ] : [];
1576
1601
  });
1577
1602
  return {
1578
- protocol: 15,
1603
+ protocol: 16,
1579
1604
  kind: 'spreadsheetCalculationResult',
1580
1605
  requestId: this.request.requestId,
1581
1606
  revision: this.request.revision,
@@ -1804,7 +1829,7 @@ async function calculateSpreadsheetSessionInJavaScript(request, sheets) {
1804
1829
  }
1805
1830
  function layoutOfficeTextInJavaScript(request) {
1806
1831
  return {
1807
- protocol: 15,
1832
+ protocol: 16,
1808
1833
  kind: 'textLayoutResult',
1809
1834
  requestId: request.requestId,
1810
1835
  revision: request.revision,
@@ -1847,13 +1872,14 @@ class BrowserOfficeKernelClient {
1847
1872
  layout(input, signal) {
1848
1873
  if (this.disposed) return Promise.reject(disposedError());
1849
1874
  const request = {
1850
- protocol: 15,
1875
+ protocol: 16,
1851
1876
  kind: 'layout',
1852
1877
  requestId: this.nextRequestId++,
1853
1878
  revision: input.revision,
1854
1879
  documentRevision: input.documentRevision,
1855
1880
  startPageIndex: input.startPageIndex ?? 0,
1856
1881
  page: input.page,
1882
+ pageStyles: input.pageStyles,
1857
1883
  blocks: input.blocks
1858
1884
  };
1859
1885
  if (signal?.aborted) return Promise.reject(abortError());
@@ -1874,7 +1900,7 @@ class BrowserOfficeKernelClient {
1874
1900
  presentationGeometry(input, signal) {
1875
1901
  if (this.disposed) return Promise.reject(disposedError());
1876
1902
  const request = {
1877
- protocol: 15,
1903
+ protocol: 16,
1878
1904
  kind: 'presentationGeometry',
1879
1905
  requestId: this.nextRequestId++,
1880
1906
  revision: input.revision,
@@ -1900,7 +1926,7 @@ class BrowserOfficeKernelClient {
1900
1926
  textLayout(input, signal) {
1901
1927
  if (this.disposed) return Promise.reject(disposedError());
1902
1928
  const request = {
1903
- protocol: 15,
1929
+ protocol: 16,
1904
1930
  kind: 'textLayout',
1905
1931
  requestId: this.nextRequestId++,
1906
1932
  revision: input.revision,
@@ -1925,7 +1951,7 @@ class BrowserOfficeKernelClient {
1925
1951
  spreadsheetCalculation(input, signal) {
1926
1952
  if (this.disposed) return Promise.reject(disposedError());
1927
1953
  const request = {
1928
- protocol: 15,
1954
+ protocol: 16,
1929
1955
  kind: 'spreadsheetCalculation',
1930
1956
  requestId: this.nextRequestId++,
1931
1957
  revision: input.revision,
@@ -1951,7 +1977,7 @@ class BrowserOfficeKernelClient {
1951
1977
  spreadsheetSessionCalculation(input, signal) {
1952
1978
  if (this.disposed) return Promise.reject(disposedError());
1953
1979
  const request = {
1954
- protocol: 15,
1980
+ protocol: 16,
1955
1981
  kind: 'spreadsheetSessionCalculation',
1956
1982
  requestId: this.nextRequestId++,
1957
1983
  revision: input.revision,
@@ -2109,4 +2135,4 @@ function abortError() {
2109
2135
  function disposedError() {
2110
2136
  return new Error('Office kernel client is disposed.');
2111
2137
  }
2112
- export { CollectionState, CommittedOfficeNumberField, OfficeCheckbox, OfficeNumberField, createOfficeKernelClient, handleOfficeTaskPaneKeyDown, isOfficeKernelSpreadsheetError, normalizeOfficeFontFamily, officeFontFamilies, officeFontFamilyLabel, office_kernel_spreadsheet_protocol_OFFICE_KERNEL_SPREADSHEET_MAX_ROWS, useOfficeDialog, useOfficeTaskPaneEscape, useOfficeTaskPaneModal };
2138
+ export { CollectionState, CommittedOfficeNumberField, OfficeCheckbox, OfficeNumberField, createOfficeKernelClient, handleOfficeTaskPaneKeyDown, normalizeOfficeFontFamily, officeFontFamilies, officeFontFamilyLabel, useOfficeDialog, useOfficeTaskPaneEscape, useOfficeTaskPaneModal };
package/dist/0~7614.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import jszip from "jszip";
2
- import { workSpreadsheetChartSupportsErrorBars, workSpreadsheetChartSupportsGrouping, parseXml, firstDescendant, normalizeWorkSpreadsheetChartSmoothLines, workSpreadsheetChartSupportsSeriesAnalysis, descendants, normalizeWorkSpreadsheetChartSeriesStyle, attribute, directChildren, xmlNamespacePrefix, normalizeWorkSpreadsheetChartOverlap, normalizeWorkSpreadsheetErrorBars, normalizeWorkSpreadsheetChartLegendOverlay, normalizeWorkSpreadsheetChartGapWidth, workSpreadsheetChartSupportsBarSpacing, directChild, normalizeWorkSpreadsheetChartGrouping, workSpreadsheetChartSupportsSmoothLines, normalizeWorkSpreadsheetTrendline, workSpreadsheetChartUsesNumericXAxis, workSpreadsheetChartSupportsTrendlines } from "./8715.js";
2
+ import { descendants, directChildren, directChild, xmlNamespacePrefix, attribute, firstDescendant, parseXml } from "./5184.js";
3
3
  import { normalizePresentationChartDataLabelPosition, normalizePresentationChartDataLabels, normalizePresentationChartSeriesStyle } from "./0~work-presentation-charts.js";
4
4
  import { parseXlsxChartSeriesStyle, xlsxChartSeriesMarkerXml, parseXlsxTrendline, isSupportedXlsxChartLegend, isSupportedXlsxChartPlotLayout, isSupportedXlsxChartSeriesFormatting, parseXlsxChartPlotLayout, parseXlsxChartLegend, xlsxChartSeriesShapePropertiesXml, parseXlsxErrorBars } from "./4104.js";
5
+ import { workSpreadsheetChartSupportsErrorBars, workSpreadsheetChartSupportsGrouping, normalizeWorkSpreadsheetChartSmoothLines, workSpreadsheetChartSupportsSeriesAnalysis, normalizeWorkSpreadsheetChartSeriesStyle, normalizeWorkSpreadsheetErrorBars, normalizeWorkSpreadsheetChartOverlap, workSpreadsheetChartUsesNumericXAxis, workSpreadsheetChartSupportsBarSpacing, normalizeWorkSpreadsheetChartLegendOverlay, normalizeWorkSpreadsheetChartGapWidth, normalizeWorkSpreadsheetChartGrouping, workSpreadsheetChartSupportsTrendlines, workSpreadsheetChartSupportsSmoothLines, normalizeWorkSpreadsheetTrendline } from "./8715.js";
5
6
  import { createWorkSlideTransition } from "./0~work-presentation-transition.js";
6
7
  const PRESENTATION_NAMESPACE = 'http://schemas.openxmlformats.org/presentationml/2006/main';
7
8
  const DRAWING_NAMESPACE = 'http://schemas.openxmlformats.org/drawingml/2006/main';