@beyondwork/docx-react-component 1.0.29 → 1.0.31

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 (383) hide show
  1. package/package.json +65 -96
  2. package/src/README.md +85 -0
  3. package/src/api/README.md +26 -0
  4. package/src/api/public-types.ts +1952 -0
  5. package/src/api/session-state.ts +62 -0
  6. package/src/compare/diff-engine.ts +623 -0
  7. package/src/compare/export-redlines.ts +280 -0
  8. package/src/compare/index.ts +25 -0
  9. package/src/compare/snapshot.ts +97 -0
  10. package/src/component-inventory.md +99 -0
  11. package/src/core/README.md +10 -0
  12. package/src/core/commands/README.md +3 -0
  13. package/{dist/chunk-TJBP2K4T.js → src/core/commands/formatting-commands.ts} +536 -196
  14. package/src/core/commands/image-commands.ts +373 -0
  15. package/src/core/commands/index.ts +1879 -0
  16. package/src/core/commands/list-commands.ts +565 -0
  17. package/src/core/commands/paragraph-layout-commands.ts +339 -0
  18. package/src/core/commands/review-commands.ts +108 -0
  19. package/{dist/core/commands/section-layout-commands.cjs → src/core/commands/section-layout-commands.ts} +340 -137
  20. package/src/core/commands/structural-helpers.ts +309 -0
  21. package/{dist/core/commands/style-commands.cjs → src/core/commands/style-commands.ts} +113 -65
  22. package/src/core/commands/table-structure-commands.ts +854 -0
  23. package/{dist/chunk-UZXBISGO.js → src/core/commands/text-commands.ts} +142 -86
  24. package/src/core/schema/README.md +3 -0
  25. package/src/core/schema/text-schema.ts +516 -0
  26. package/src/core/search/search-text.ts +357 -0
  27. package/src/core/selection/README.md +3 -0
  28. package/src/core/selection/mapping.ts +289 -0
  29. package/src/core/selection/review-anchors.ts +183 -0
  30. package/src/core/state/README.md +3 -0
  31. package/src/core/state/editor-state.ts +892 -0
  32. package/src/core/state/text-transaction.ts +869 -0
  33. package/src/formats/xlsx/io/parse-shared-strings.ts +41 -0
  34. package/src/formats/xlsx/io/parse-sheet.ts +459 -0
  35. package/src/formats/xlsx/io/parse-styles.ts +59 -0
  36. package/src/formats/xlsx/io/parse-workbook.ts +75 -0
  37. package/src/formats/xlsx/io/serialize-shared-strings.ts +72 -0
  38. package/src/formats/xlsx/io/serialize-sheet.ts +333 -0
  39. package/src/formats/xlsx/io/serialize-styles.ts +98 -0
  40. package/src/formats/xlsx/io/serialize-workbook.ts +429 -0
  41. package/src/formats/xlsx/io/xlsx-session.ts +314 -0
  42. package/src/formats/xlsx/model/cell.ts +189 -0
  43. package/src/formats/xlsx/model/sheet.ts +326 -0
  44. package/src/formats/xlsx/model/styles.ts +118 -0
  45. package/src/formats/xlsx/model/workbook.ts +453 -0
  46. package/src/formats/xlsx/runtime/cell-commands.ts +567 -0
  47. package/src/formats/xlsx/runtime/sheet-commands.ts +206 -0
  48. package/src/formats/xlsx/runtime/workbook-runtime.ts +177 -0
  49. package/src/formats/xlsx/runtime/workbook-transaction.ts +822 -0
  50. package/src/index.ts +142 -0
  51. package/src/io/README.md +10 -0
  52. package/src/io/docx-session.ts +3175 -0
  53. package/src/io/export/README.md +3 -0
  54. package/src/io/export/export-session.ts +220 -0
  55. package/src/io/export/minimal-docx.ts +115 -0
  56. package/src/io/export/reattach-preserved-parts.ts +54 -0
  57. package/src/io/export/serialize-comments.ts +947 -0
  58. package/src/io/export/serialize-footnotes.ts +394 -0
  59. package/src/io/export/serialize-headers-footers.ts +368 -0
  60. package/src/io/export/serialize-main-document.ts +1342 -0
  61. package/src/io/export/serialize-numbering.ts +218 -0
  62. package/src/io/export/serialize-revisions.ts +389 -0
  63. package/src/io/export/serialize-runtime-revisions.ts +463 -0
  64. package/src/io/export/serialize-tables.ts +174 -0
  65. package/src/io/export/split-review-boundaries.ts +356 -0
  66. package/src/io/export/split-story-blocks-for-runtime-revisions.ts +252 -0
  67. package/src/io/export/table-properties-xml.ts +318 -0
  68. package/src/io/normalize/README.md +3 -0
  69. package/src/io/normalize/normalize-text.ts +670 -0
  70. package/src/io/ooxml/README.md +3 -0
  71. package/src/io/ooxml/highlight-colors.ts +39 -0
  72. package/src/io/ooxml/numbering-sentinels.ts +44 -0
  73. package/src/io/ooxml/parse-comments.ts +852 -0
  74. package/src/io/ooxml/parse-complex-content.ts +287 -0
  75. package/src/io/ooxml/parse-fields.ts +834 -0
  76. package/src/io/ooxml/parse-footnotes.ts +952 -0
  77. package/src/io/ooxml/parse-headers-footers.ts +1212 -0
  78. package/src/io/ooxml/parse-inline-media.ts +461 -0
  79. package/src/io/ooxml/parse-main-document.ts +2947 -0
  80. package/src/io/ooxml/parse-numbering.ts +747 -0
  81. package/src/io/ooxml/parse-revisions.ts +1045 -0
  82. package/src/io/ooxml/parse-settings.ts +184 -0
  83. package/src/io/ooxml/parse-shapes.ts +296 -0
  84. package/src/io/ooxml/parse-styles.ts +639 -0
  85. package/src/io/ooxml/parse-tables.ts +627 -0
  86. package/src/io/ooxml/parse-theme.ts +346 -0
  87. package/src/io/ooxml/part-manifest.ts +136 -0
  88. package/src/io/ooxml/revision-boundaries.ts +475 -0
  89. package/src/io/ooxml/workflow-payload.ts +544 -0
  90. package/src/io/opc/README.md +3 -0
  91. package/src/io/opc/corrupt-package.ts +166 -0
  92. package/src/io/opc/docx-package.ts +74 -0
  93. package/src/io/opc/package-reader.ts +325 -0
  94. package/src/io/opc/package-writer.ts +273 -0
  95. package/src/io/source-package-provenance.ts +241 -0
  96. package/{dist/chunk-RMH72RZI.js → src/legal/bookmarks.ts} +130 -44
  97. package/src/legal/cross-references.ts +414 -0
  98. package/src/legal/defined-terms.ts +203 -0
  99. package/src/legal/index.ts +32 -0
  100. package/src/legal/signature-blocks.ts +259 -0
  101. package/src/model/README.md +3 -0
  102. package/src/model/canonical-document.ts +2722 -0
  103. package/src/model/cds-1.0.0.ts +212 -0
  104. package/src/model/snapshot.ts +760 -0
  105. package/src/preservation/README.md +3 -0
  106. package/src/preservation/markup-compatibility.ts +48 -0
  107. package/src/preservation/opaque-fragment-store.ts +89 -0
  108. package/src/preservation/opaque-region.ts +233 -0
  109. package/src/preservation/package-preservation.ts +113 -0
  110. package/src/preservation/preserved-part-manifest.ts +56 -0
  111. package/src/preservation/relationship-retention.ts +57 -0
  112. package/src/preservation/store.ts +255 -0
  113. package/src/review/README.md +16 -0
  114. package/src/review/store/README.md +3 -0
  115. package/src/review/store/comment-anchors.ts +70 -0
  116. package/src/review/store/comment-remapping.ts +154 -0
  117. package/src/review/store/comment-store.ts +349 -0
  118. package/src/review/store/comment-thread.ts +109 -0
  119. package/src/review/store/revision-actions.ts +423 -0
  120. package/src/review/store/revision-store.ts +323 -0
  121. package/src/review/store/revision-types.ts +182 -0
  122. package/src/review/store/runtime-comment-store.ts +43 -0
  123. package/src/runtime/README.md +3 -0
  124. package/src/runtime/ai-action-policy.ts +764 -0
  125. package/src/runtime/context-analytics.ts +824 -0
  126. package/src/runtime/document-layout.ts +332 -0
  127. package/src/runtime/document-locations.ts +521 -0
  128. package/src/runtime/document-navigation.ts +616 -0
  129. package/src/runtime/document-outline.ts +440 -0
  130. package/src/runtime/document-runtime.ts +4055 -0
  131. package/src/runtime/document-search.ts +145 -0
  132. package/src/runtime/event-refresh-hints.ts +137 -0
  133. package/src/runtime/numbering-prefix.ts +244 -0
  134. package/src/runtime/page-layout-estimation.ts +305 -0
  135. package/src/runtime/read-only-diagnostics-runtime.ts +241 -0
  136. package/src/runtime/resolved-numbering-geometry.ts +293 -0
  137. package/src/runtime/review-runtime.ts +44 -0
  138. package/src/runtime/revision-runtime.ts +107 -0
  139. package/src/runtime/session-capabilities.ts +192 -0
  140. package/src/runtime/story-context.ts +164 -0
  141. package/src/runtime/story-targeting.ts +162 -0
  142. package/src/runtime/suggestions-snapshot.ts +137 -0
  143. package/src/runtime/surface-projection.ts +1553 -0
  144. package/src/runtime/table-commands.ts +173 -0
  145. package/src/runtime/table-schema.ts +309 -0
  146. package/src/runtime/table-style-resolver.ts +409 -0
  147. package/src/runtime/view-state.ts +493 -0
  148. package/src/runtime/virtualized-rendering.ts +258 -0
  149. package/src/runtime/workflow-markup.ts +393 -0
  150. package/src/ui/README.md +30 -0
  151. package/src/ui/WordReviewEditor.tsx +5268 -0
  152. package/src/ui/browser-export.ts +52 -0
  153. package/src/ui/comments/README.md +3 -0
  154. package/src/ui/compatibility/README.md +3 -0
  155. package/src/ui/editor-command-bag.ts +127 -0
  156. package/src/ui/editor-runtime-boundary.ts +1558 -0
  157. package/src/ui/editor-shell-view.tsx +144 -0
  158. package/src/ui/editor-surface/README.md +3 -0
  159. package/src/ui/editor-surface-controller.tsx +66 -0
  160. package/src/ui/headless/comment-decoration-model.ts +124 -0
  161. package/src/ui/headless/preserve-editor-selection.ts +5 -0
  162. package/src/ui/headless/revision-decoration-model.ts +128 -0
  163. package/src/ui/headless/selection-helpers.ts +54 -0
  164. package/src/ui/headless/selection-tool-context.ts +19 -0
  165. package/src/ui/headless/selection-tool-resolver.ts +752 -0
  166. package/src/ui/headless/selection-tool-types.ts +129 -0
  167. package/src/ui/headless/selection-toolbar-model.ts +11 -0
  168. package/src/ui/headless/use-editor-keyboard.ts +103 -0
  169. package/src/ui/review/README.md +3 -0
  170. package/src/ui/runtime-shortcut-dispatch.ts +365 -0
  171. package/src/ui/runtime-snapshot-selectors.ts +197 -0
  172. package/src/ui/shared/revision-filters.ts +31 -0
  173. package/src/ui/status/README.md +3 -0
  174. package/src/ui/theme/README.md +3 -0
  175. package/src/ui/toolbar/README.md +3 -0
  176. package/src/ui/workflow-surface-blocked-rails.ts +94 -0
  177. package/src/ui-tailwind/chrome/chrome-preset-model.ts +107 -0
  178. package/src/ui-tailwind/chrome/chrome-preset-toolbar.tsx +15 -0
  179. package/src/ui-tailwind/chrome/responsive-chrome.ts +46 -0
  180. package/src/ui-tailwind/chrome/review-queue-bar.tsx +97 -0
  181. package/src/ui-tailwind/chrome/tw-alert-banner.tsx +64 -0
  182. package/src/ui-tailwind/chrome/tw-context-analytics-summary.tsx +122 -0
  183. package/src/ui-tailwind/chrome/tw-image-context-toolbar.tsx +121 -0
  184. package/src/ui-tailwind/chrome/tw-layout-panel.tsx +114 -0
  185. package/src/ui-tailwind/chrome/tw-object-context-toolbar.tsx +30 -0
  186. package/src/ui-tailwind/chrome/tw-page-ruler.tsx +365 -0
  187. package/src/ui-tailwind/chrome/tw-selection-tool-blocked.tsx +23 -0
  188. package/src/ui-tailwind/chrome/tw-selection-tool-comment.tsx +35 -0
  189. package/src/ui-tailwind/chrome/tw-selection-tool-formatting.tsx +37 -0
  190. package/src/ui-tailwind/chrome/tw-selection-tool-host.tsx +303 -0
  191. package/src/ui-tailwind/chrome/tw-selection-tool-structure.tsx +116 -0
  192. package/src/ui-tailwind/chrome/tw-selection-tool-suggestion.tsx +29 -0
  193. package/src/ui-tailwind/chrome/tw-selection-tool-workflow.tsx +27 -0
  194. package/src/ui-tailwind/chrome/tw-selection-toolbar.tsx +186 -0
  195. package/src/ui-tailwind/chrome/tw-suggestion-card.tsx +139 -0
  196. package/src/ui-tailwind/chrome/tw-table-context-toolbar.tsx +250 -0
  197. package/src/ui-tailwind/chrome/tw-unsaved-modal.tsx +58 -0
  198. package/src/ui-tailwind/chrome/use-before-unload.ts +20 -0
  199. package/src/ui-tailwind/editor-surface/perf-probe.ts +179 -0
  200. package/src/ui-tailwind/editor-surface/pm-command-bridge.ts +189 -0
  201. package/src/ui-tailwind/editor-surface/pm-contextual-ui.ts +31 -0
  202. package/src/ui-tailwind/editor-surface/pm-decorations.ts +411 -0
  203. package/src/ui-tailwind/editor-surface/pm-position-map.ts +123 -0
  204. package/src/ui-tailwind/editor-surface/pm-schema.ts +927 -0
  205. package/src/ui-tailwind/editor-surface/pm-state-from-snapshot.ts +567 -0
  206. package/src/ui-tailwind/editor-surface/search-plugin.ts +168 -0
  207. package/src/ui-tailwind/editor-surface/surface-build-keys.ts +63 -0
  208. package/src/ui-tailwind/editor-surface/tw-caret.tsx +12 -0
  209. package/src/ui-tailwind/editor-surface/tw-editor-surface.tsx +150 -0
  210. package/src/ui-tailwind/editor-surface/tw-inline-token.tsx +129 -0
  211. package/src/ui-tailwind/editor-surface/tw-opaque-block.tsx +58 -0
  212. package/src/ui-tailwind/editor-surface/tw-paragraph-block.tsx +151 -0
  213. package/src/ui-tailwind/editor-surface/tw-prosemirror-surface.tsx +1047 -0
  214. package/src/ui-tailwind/editor-surface/tw-segment-view.tsx +111 -0
  215. package/src/ui-tailwind/editor-surface/tw-table-node-view.tsx +503 -0
  216. package/src/ui-tailwind/index.ts +62 -0
  217. package/src/ui-tailwind/page-chrome-model.ts +27 -0
  218. package/src/ui-tailwind/review/tw-comment-sidebar.tsx +406 -0
  219. package/src/ui-tailwind/review/tw-health-panel.tsx +149 -0
  220. package/src/ui-tailwind/review/tw-review-rail.tsx +130 -0
  221. package/src/ui-tailwind/review/tw-revision-sidebar.tsx +164 -0
  222. package/src/ui-tailwind/status/tw-status-bar.tsx +65 -0
  223. package/{dist → src}/ui-tailwind/theme/editor-theme.css +58 -40
  224. package/src/ui-tailwind/toolbar/toolbar-layout.ts +47 -0
  225. package/src/ui-tailwind/toolbar/tw-toolbar-icon-button.tsx +52 -0
  226. package/src/ui-tailwind/toolbar/tw-toolbar.tsx +1478 -0
  227. package/src/ui-tailwind/tw-review-workspace.tsx +1587 -0
  228. package/src/validation/README.md +3 -0
  229. package/src/validation/compatibility-engine.ts +878 -0
  230. package/src/validation/compatibility-report.ts +161 -0
  231. package/src/validation/diagnostics.ts +204 -0
  232. package/src/validation/docx-comment-proof.ts +720 -0
  233. package/src/validation/import-diagnostics.ts +128 -0
  234. package/src/validation/low-priority-word-surfaces.ts +373 -0
  235. package/dist/canonical-document-BLEbzL2J.d.cts +0 -844
  236. package/dist/canonical-document-BLEbzL2J.d.ts +0 -844
  237. package/dist/chunk-2FJS5GZM.js +0 -763
  238. package/dist/chunk-2FJS5GZM.js.map +0 -1
  239. package/dist/chunk-2OQBZS3F.js +0 -446
  240. package/dist/chunk-2OQBZS3F.js.map +0 -1
  241. package/dist/chunk-2S7W4KFO.js +0 -127
  242. package/dist/chunk-2S7W4KFO.js.map +0 -1
  243. package/dist/chunk-2TG72QSW.js +0 -3874
  244. package/dist/chunk-2TG72QSW.js.map +0 -1
  245. package/dist/chunk-36QNIZBO.js +0 -532
  246. package/dist/chunk-36QNIZBO.js.map +0 -1
  247. package/dist/chunk-4AQOYAW4.js +0 -3069
  248. package/dist/chunk-4AQOYAW4.js.map +0 -1
  249. package/dist/chunk-4D5EWJ3P.js +0 -77
  250. package/dist/chunk-4D5EWJ3P.js.map +0 -1
  251. package/dist/chunk-5FN54NDH.js +0 -2257
  252. package/dist/chunk-5FN54NDH.js.map +0 -1
  253. package/dist/chunk-BOYGQYRQ.js +0 -7306
  254. package/dist/chunk-BOYGQYRQ.js.map +0 -1
  255. package/dist/chunk-CN3XMECL.js +0 -212
  256. package/dist/chunk-CN3XMECL.js.map +0 -1
  257. package/dist/chunk-EBI3BX6U.js +0 -164
  258. package/dist/chunk-EBI3BX6U.js.map +0 -1
  259. package/dist/chunk-EILUG3VB.js +0 -1275
  260. package/dist/chunk-EILUG3VB.js.map +0 -1
  261. package/dist/chunk-FUDY333O.js +0 -70
  262. package/dist/chunk-FUDY333O.js.map +0 -1
  263. package/dist/chunk-GBVOWFIK.js +0 -1237
  264. package/dist/chunk-GBVOWFIK.js.map +0 -1
  265. package/dist/chunk-H4TQ3H3Y.js +0 -262
  266. package/dist/chunk-H4TQ3H3Y.js.map +0 -1
  267. package/dist/chunk-JGB3IXZO.js +0 -189
  268. package/dist/chunk-JGB3IXZO.js.map +0 -1
  269. package/dist/chunk-KD2QRQPY.js +0 -4342
  270. package/dist/chunk-KD2QRQPY.js.map +0 -1
  271. package/dist/chunk-KLMXQVYK.js +0 -369
  272. package/dist/chunk-KLMXQVYK.js.map +0 -1
  273. package/dist/chunk-KZUG5KFQ.js +0 -214
  274. package/dist/chunk-KZUG5KFQ.js.map +0 -1
  275. package/dist/chunk-QDAQ4CJU.js +0 -345
  276. package/dist/chunk-QDAQ4CJU.js.map +0 -1
  277. package/dist/chunk-RMH72RZI.js.map +0 -1
  278. package/dist/chunk-SWKWQZXM.js +0 -117
  279. package/dist/chunk-SWKWQZXM.js.map +0 -1
  280. package/dist/chunk-TJBP2K4T.js.map +0 -1
  281. package/dist/chunk-TLCEAQDQ.js +0 -542
  282. package/dist/chunk-TLCEAQDQ.js.map +0 -1
  283. package/dist/chunk-UZXBISGO.js.map +0 -1
  284. package/dist/chunk-WGBAKP3Q.js +0 -3220
  285. package/dist/chunk-WGBAKP3Q.js.map +0 -1
  286. package/dist/compare/index.cjs +0 -5475
  287. package/dist/compare/index.cjs.map +0 -1
  288. package/dist/compare/index.d.cts +0 -114
  289. package/dist/compare/index.d.ts +0 -114
  290. package/dist/compare/index.js +0 -731
  291. package/dist/compare/index.js.map +0 -1
  292. package/dist/core/commands/formatting-commands.cjs +0 -828
  293. package/dist/core/commands/formatting-commands.cjs.map +0 -1
  294. package/dist/core/commands/formatting-commands.d.cts +0 -63
  295. package/dist/core/commands/formatting-commands.d.ts +0 -63
  296. package/dist/core/commands/formatting-commands.js +0 -37
  297. package/dist/core/commands/formatting-commands.js.map +0 -1
  298. package/dist/core/commands/image-commands.cjs +0 -2023
  299. package/dist/core/commands/image-commands.cjs.map +0 -1
  300. package/dist/core/commands/image-commands.d.cts +0 -58
  301. package/dist/core/commands/image-commands.d.ts +0 -58
  302. package/dist/core/commands/image-commands.js +0 -18
  303. package/dist/core/commands/image-commands.js.map +0 -1
  304. package/dist/core/commands/section-layout-commands.cjs.map +0 -1
  305. package/dist/core/commands/section-layout-commands.d.cts +0 -62
  306. package/dist/core/commands/section-layout-commands.d.ts +0 -62
  307. package/dist/core/commands/section-layout-commands.js +0 -21
  308. package/dist/core/commands/section-layout-commands.js.map +0 -1
  309. package/dist/core/commands/style-commands.cjs.map +0 -1
  310. package/dist/core/commands/style-commands.d.cts +0 -13
  311. package/dist/core/commands/style-commands.d.ts +0 -13
  312. package/dist/core/commands/style-commands.js +0 -9
  313. package/dist/core/commands/style-commands.js.map +0 -1
  314. package/dist/core/commands/table-structure-commands.cjs +0 -1883
  315. package/dist/core/commands/table-structure-commands.cjs.map +0 -1
  316. package/dist/core/commands/table-structure-commands.d.cts +0 -59
  317. package/dist/core/commands/table-structure-commands.d.ts +0 -59
  318. package/dist/core/commands/table-structure-commands.js +0 -12
  319. package/dist/core/commands/table-structure-commands.js.map +0 -1
  320. package/dist/core/commands/text-commands.cjs +0 -2391
  321. package/dist/core/commands/text-commands.cjs.map +0 -1
  322. package/dist/core/commands/text-commands.d.cts +0 -24
  323. package/dist/core/commands/text-commands.d.ts +0 -24
  324. package/dist/core/commands/text-commands.js +0 -28
  325. package/dist/core/commands/text-commands.js.map +0 -1
  326. package/dist/core/selection/mapping.cjs +0 -200
  327. package/dist/core/selection/mapping.cjs.map +0 -1
  328. package/dist/core/selection/mapping.d.cts +0 -2
  329. package/dist/core/selection/mapping.d.ts +0 -2
  330. package/dist/core/selection/mapping.js +0 -31
  331. package/dist/core/selection/mapping.js.map +0 -1
  332. package/dist/core/state/editor-state.cjs +0 -2278
  333. package/dist/core/state/editor-state.cjs.map +0 -1
  334. package/dist/core/state/editor-state.d.cts +0 -2
  335. package/dist/core/state/editor-state.d.ts +0 -2
  336. package/dist/core/state/editor-state.js +0 -26
  337. package/dist/core/state/editor-state.js.map +0 -1
  338. package/dist/index.cjs +0 -38553
  339. package/dist/index.cjs.map +0 -1
  340. package/dist/index.d.cts +0 -15
  341. package/dist/index.d.ts +0 -15
  342. package/dist/index.js +0 -7856
  343. package/dist/index.js.map +0 -1
  344. package/dist/io/docx-session.cjs +0 -16236
  345. package/dist/io/docx-session.cjs.map +0 -1
  346. package/dist/io/docx-session.d.cts +0 -21
  347. package/dist/io/docx-session.d.ts +0 -21
  348. package/dist/io/docx-session.js +0 -18
  349. package/dist/io/docx-session.js.map +0 -1
  350. package/dist/legal/index.cjs +0 -3900
  351. package/dist/legal/index.cjs.map +0 -1
  352. package/dist/legal/index.d.cts +0 -86
  353. package/dist/legal/index.d.ts +0 -86
  354. package/dist/legal/index.js +0 -616
  355. package/dist/legal/index.js.map +0 -1
  356. package/dist/public-types-7ZL_94cz.d.ts +0 -1573
  357. package/dist/public-types-CeMaDueh.d.cts +0 -1573
  358. package/dist/public-types.cjs +0 -19
  359. package/dist/public-types.cjs.map +0 -1
  360. package/dist/public-types.d.cts +0 -2
  361. package/dist/public-types.d.ts +0 -2
  362. package/dist/public-types.js +0 -1
  363. package/dist/public-types.js.map +0 -1
  364. package/dist/runtime/document-runtime.cjs +0 -11140
  365. package/dist/runtime/document-runtime.cjs.map +0 -1
  366. package/dist/runtime/document-runtime.d.cts +0 -231
  367. package/dist/runtime/document-runtime.d.ts +0 -231
  368. package/dist/runtime/document-runtime.js +0 -21
  369. package/dist/runtime/document-runtime.js.map +0 -1
  370. package/dist/structural-helpers-CilgOVhh.d.cts +0 -10
  371. package/dist/structural-helpers-q0Gd-eBN.d.ts +0 -10
  372. package/dist/ui-tailwind/editor-surface/search-plugin.cjs +0 -313
  373. package/dist/ui-tailwind/editor-surface/search-plugin.cjs.map +0 -1
  374. package/dist/ui-tailwind/editor-surface/search-plugin.d.cts +0 -67
  375. package/dist/ui-tailwind/editor-surface/search-plugin.d.ts +0 -67
  376. package/dist/ui-tailwind/editor-surface/search-plugin.js +0 -23
  377. package/dist/ui-tailwind/editor-surface/search-plugin.js.map +0 -1
  378. package/dist/ui-tailwind/index.cjs +0 -4833
  379. package/dist/ui-tailwind/index.cjs.map +0 -1
  380. package/dist/ui-tailwind/index.d.cts +0 -617
  381. package/dist/ui-tailwind/index.d.ts +0 -617
  382. package/dist/ui-tailwind/index.js +0 -575
  383. package/dist/ui-tailwind/index.js.map +0 -1
@@ -1,1237 +0,0 @@
1
- import {
2
- parseTextStory
3
- } from "./chunk-KLMXQVYK.js";
4
- import {
5
- createEditorSurfaceSnapshot,
6
- resolveSectionVariants,
7
- sectionSupportsStoryTarget,
8
- storyTargetKey
9
- } from "./chunk-EILUG3VB.js";
10
- import {
11
- createSelectionSnapshot
12
- } from "./chunk-5FN54NDH.js";
13
- import {
14
- MAIN_STORY_TARGET,
15
- createDetachedAnchor,
16
- mapAnchor,
17
- normalizeRange
18
- } from "./chunk-EBI3BX6U.js";
19
-
20
- // src/core/selection/review-anchors.ts
21
- function detachReviewAnchor(lastKnownRange, reason) {
22
- return createDetachedAnchor(lastKnownRange, reason);
23
- }
24
- function mapReviewAnchor(anchor, mapping) {
25
- return mapAnchor(anchor, mapping);
26
- }
27
- function getAnchorRange(anchor) {
28
- if (anchor.kind === "range") {
29
- return normalizeRange(anchor.range);
30
- }
31
- if (anchor.kind === "node") {
32
- return { from: anchor.at, to: anchor.at };
33
- }
34
- return normalizeRange(anchor.lastKnownRange);
35
- }
36
- function mappingTouchesAnchorContent(anchor, mapping) {
37
- const range = getAnchorRange(anchor);
38
- if (range.from === range.to) {
39
- return mapping.steps.some(
40
- (step) => step.from <= range.from && step.to >= range.to
41
- );
42
- }
43
- return mapping.steps.some(
44
- (step) => step.from < range.to && step.to > range.from
45
- );
46
- }
47
- function rangeStaysWithinSingleParagraph(content, range) {
48
- const normalized = normalizeRange(range);
49
- if (normalized.from === normalized.to) {
50
- return true;
51
- }
52
- const surfaceBlocks = readSurfaceBlocks(content);
53
- if (surfaceBlocks) {
54
- return surfaceBlocks.some(
55
- (block) => block.kind === "paragraph" && normalized.from >= block.from && normalized.to <= block.to
56
- );
57
- }
58
- const story = parseTextStory(content);
59
- const upperBound = Math.min(normalized.to, story.units.length);
60
- for (let index = Math.max(0, normalized.from); index < upperBound; index += 1) {
61
- const unit = story.units[index];
62
- if (!unit) {
63
- continue;
64
- }
65
- if (unit.kind === "paragraph_break" || unit.kind === "opaque_block") {
66
- return false;
67
- }
68
- }
69
- return true;
70
- }
71
- function canCreateDocxCommentAnchor(content, anchor) {
72
- if (anchor.kind !== "range") {
73
- return false;
74
- }
75
- const normalized = normalizeRange(anchor.range);
76
- if (normalized.from === normalized.to) {
77
- return false;
78
- }
79
- return rangeStaysWithinSingleParagraph(content, normalized);
80
- }
81
- function readSurfaceBlocks(content) {
82
- if (!content || typeof content !== "object" || !("blocks" in content)) {
83
- return void 0;
84
- }
85
- const blocks = content.blocks;
86
- if (!Array.isArray(blocks)) {
87
- return void 0;
88
- }
89
- const normalized = flattenSurfaceBlocks(blocks);
90
- return normalized.length > 0 ? normalized : void 0;
91
- }
92
- function flattenSurfaceBlocks(blocks) {
93
- const flattened = [];
94
- for (const block of blocks) {
95
- if (!block || typeof block !== "object" || typeof block.kind !== "string" || typeof block.from !== "number" || typeof block.to !== "number") {
96
- continue;
97
- }
98
- flattened.push({
99
- kind: block.kind,
100
- from: block.from,
101
- to: block.to
102
- });
103
- if (block.kind === "table" && Array.isArray(block.rows)) {
104
- for (const row of block.rows) {
105
- for (const cell of row.cells ?? []) {
106
- if (cell && typeof cell === "object" && Array.isArray(cell.content)) {
107
- flattened.push(...flattenSurfaceBlocks(cell.content));
108
- }
109
- }
110
- }
111
- }
112
- if (block.kind === "sdt_block" && Array.isArray(block.children)) {
113
- flattened.push(...flattenSurfaceBlocks(block.children));
114
- }
115
- }
116
- return flattened;
117
- }
118
-
119
- // src/runtime/document-layout.ts
120
- function buildResolvedSections(document) {
121
- const mainSurface = createEditorSurfaceSnapshot(
122
- document,
123
- createSelectionSnapshot(0, 0),
124
- MAIN_STORY_TARGET
125
- );
126
- const sections = [];
127
- let sectionStart = 0;
128
- let sectionIndex = 0;
129
- for (const [index, block] of document.content.children.entries()) {
130
- if (block.type !== "section_break") {
131
- continue;
132
- }
133
- const surfaceBlock = mainSurface.blocks[index];
134
- sections.push({
135
- index: sectionIndex,
136
- start: sectionStart,
137
- end: surfaceBlock?.from ?? sectionStart,
138
- properties: block.sectionProperties
139
- });
140
- sectionStart = surfaceBlock?.to ?? sectionStart;
141
- sectionIndex += 1;
142
- }
143
- sections.push({
144
- index: sectionIndex,
145
- start: sectionStart,
146
- end: mainSurface.storySize,
147
- properties: document.subParts?.finalSectionProperties
148
- });
149
- return sections;
150
- }
151
- function findSectionForPosition(sections, position) {
152
- for (const section of sections) {
153
- if (position < section.end) {
154
- return section;
155
- }
156
- }
157
- return sections[sections.length - 1] ?? {
158
- index: 0,
159
- start: 0,
160
- end: 0
161
- };
162
- }
163
- function buildPageLayoutSnapshot(sectionIndex, properties, subParts) {
164
- const pageSize = properties?.pageSize ?? {
165
- width: 12240,
166
- height: 15840,
167
- orientation: "portrait"
168
- };
169
- const margins = properties?.pageMargins ?? {
170
- top: 1440,
171
- right: 1440,
172
- bottom: 1440,
173
- left: 1440,
174
- header: 720,
175
- footer: 720,
176
- gutter: 0
177
- };
178
- const columns = properties?.columns;
179
- const explicitColumns = columns?.columns ?? [];
180
- const differentOddEvenPages = Boolean(subParts?.settings?.evenAndOddHeaders);
181
- return {
182
- sectionIndex,
183
- ...properties?.sectionType ? { sectionType: properties.sectionType } : {},
184
- pageWidth: pageSize.width,
185
- pageHeight: pageSize.height,
186
- marginTop: margins.top,
187
- marginBottom: margins.bottom,
188
- marginLeft: margins.left,
189
- marginRight: margins.right,
190
- headerMargin: margins.header ?? 720,
191
- footerMargin: margins.footer ?? 720,
192
- gutter: margins.gutter ?? 0,
193
- orientation: pageSize.orientation ?? "portrait",
194
- columns: explicitColumns.length > 0 ? explicitColumns.length : columns?.count ?? 1,
195
- differentFirstPage: Boolean(properties?.titlePage),
196
- differentOddEvenPages,
197
- ...properties?.pageNumbering ? {
198
- pageNumbering: {
199
- ...properties.pageNumbering.format ? { format: properties.pageNumbering.format } : {},
200
- ...properties.pageNumbering.start !== void 0 ? { start: properties.pageNumbering.start } : {},
201
- ...properties.pageNumbering.chapStyle ? { chapterStyle: properties.pageNumbering.chapStyle } : {},
202
- ...properties.pageNumbering.chapSep ? { chapterSeparator: properties.pageNumbering.chapSep } : {}
203
- }
204
- } : {},
205
- ...properties?.lineNumbering ? {
206
- lineNumbering: {
207
- ...properties.lineNumbering.countBy !== void 0 ? { countBy: properties.lineNumbering.countBy } : {},
208
- ...properties.lineNumbering.start !== void 0 ? { start: properties.lineNumbering.start } : {},
209
- ...properties.lineNumbering.distance !== void 0 ? { distance: properties.lineNumbering.distance } : {},
210
- ...properties.lineNumbering.restart ? { restart: properties.lineNumbering.restart } : {}
211
- }
212
- } : {},
213
- ...properties?.pageBorders ? {
214
- pageBorders: {
215
- ...properties.pageBorders.top ? { top: { ...properties.pageBorders.top } } : {},
216
- ...properties.pageBorders.left ? { left: { ...properties.pageBorders.left } } : {},
217
- ...properties.pageBorders.bottom ? { bottom: { ...properties.pageBorders.bottom } } : {},
218
- ...properties.pageBorders.right ? { right: { ...properties.pageBorders.right } } : {},
219
- ...properties.pageBorders.offsetFrom ? { offsetFrom: properties.pageBorders.offsetFrom } : {},
220
- ...properties.pageBorders.display ? { display: properties.pageBorders.display } : {},
221
- ...properties.pageBorders.zOrder ? { zOrder: properties.pageBorders.zOrder } : {}
222
- }
223
- } : {},
224
- ...properties?.documentGrid ? {
225
- documentGrid: {
226
- ...properties.documentGrid.type ? { type: properties.documentGrid.type } : {},
227
- ...properties.documentGrid.linePitch !== void 0 ? { linePitch: properties.documentGrid.linePitch } : {},
228
- ...properties.documentGrid.charSpace !== void 0 ? { charSpace: properties.documentGrid.charSpace } : {}
229
- }
230
- } : {},
231
- columnDefinitions: explicitColumns,
232
- equalWidthColumns: columns?.equalWidth ?? (explicitColumns.length === 0 || explicitColumns.length <= 1),
233
- columnSeparator: Boolean(columns?.separator),
234
- headerVariants: resolveSectionVariants(
235
- "header",
236
- sectionIndex,
237
- properties?.headerReferences,
238
- subParts?.headers ?? []
239
- ),
240
- footerVariants: resolveSectionVariants(
241
- "footer",
242
- sectionIndex,
243
- properties?.footerReferences,
244
- subParts?.footers ?? []
245
- )
246
- };
247
- }
248
- function resolveSectionForStoryTarget(document, sections, target) {
249
- if (target.kind === "main" || sections.length === 0) {
250
- return sections[0];
251
- }
252
- if (target.kind === "header") {
253
- if (target.sectionIndex !== void 0) {
254
- const section = sections.find((candidate) => candidate.index === target.sectionIndex);
255
- return section && sectionSupportsStoryTarget(document, target.sectionIndex, target) ? section : void 0;
256
- }
257
- return findSectionByStoryReference(
258
- document,
259
- sections,
260
- target,
261
- "header"
262
- ) ?? sections[0];
263
- }
264
- if (target.kind === "footer") {
265
- if (target.sectionIndex !== void 0) {
266
- const section = sections.find((candidate) => candidate.index === target.sectionIndex);
267
- return section && sectionSupportsStoryTarget(document, target.sectionIndex, target) ? section : void 0;
268
- }
269
- return findSectionByStoryReference(
270
- document,
271
- sections,
272
- target,
273
- "footer"
274
- ) ?? sections[0];
275
- }
276
- return void 0;
277
- }
278
- function resolveActiveSection(state, activeStory, sections, storySelections) {
279
- if (sections.length === 0) {
280
- return void 0;
281
- }
282
- if (activeStory.kind === "main") {
283
- return findSectionForPosition(sections, state.selection.head);
284
- }
285
- const referencedSection = resolveSectionForStoryTarget(
286
- state.document,
287
- sections,
288
- activeStory
289
- );
290
- if (referencedSection) {
291
- return referencedSection;
292
- }
293
- const mainSelection = storySelections?.get(storyTargetKey(MAIN_STORY_TARGET)) ?? state.selection;
294
- return findSectionForPosition(sections, mainSelection.head);
295
- }
296
- function findSectionByStoryReference(document, sections, target, kind) {
297
- const propertyKey = kind === "header" ? "headerReferences" : "footerReferences";
298
- const documents = kind === "header" ? document.subParts?.headers ?? [] : document.subParts?.footers ?? [];
299
- return sections.find(
300
- (section) => section.properties?.[propertyKey]?.some(
301
- (ref) => ref.relationshipId === target.relationshipId && ref.variant === target.variant
302
- )
303
- ) ?? sections.find(
304
- (section) => documents.some(
305
- (entry) => entry.relationshipId === target.relationshipId && entry.variant === target.variant && entry.sectionIndex === section.index
306
- )
307
- );
308
- }
309
-
310
- // src/runtime/view-state.ts
311
- var MIN_ZOOM_PERCENT = 50;
312
- var MAX_ZOOM_PERCENT = 200;
313
- var DEFAULT_VIEW_STATE = {
314
- viewMode: "editing",
315
- documentMode: "editing",
316
- workspaceMode: "canvas",
317
- zoomLevel: 100,
318
- isFocused: false,
319
- caretAffinity: "none",
320
- activePageRegion: null,
321
- activeObjectFrame: null
322
- };
323
- function createViewState(initial) {
324
- return { ...DEFAULT_VIEW_STATE, ...initial };
325
- }
326
- function setViewMode(state, mode) {
327
- if (state.viewMode === mode) return state;
328
- return { ...state, viewMode: mode };
329
- }
330
- function setDocumentMode(state, mode) {
331
- if (state.documentMode === mode) return state;
332
- return { ...state, documentMode: mode };
333
- }
334
- function setWorkspaceMode(state, workspaceMode) {
335
- if (state.workspaceMode === workspaceMode) {
336
- return state;
337
- }
338
- return { ...state, workspaceMode };
339
- }
340
- function setZoomLevel(state, zoomLevel) {
341
- const normalizedZoom = normalizeZoomLevel(zoomLevel, state.zoomLevel);
342
- if (state.zoomLevel === normalizedZoom) {
343
- return state;
344
- }
345
- return { ...state, zoomLevel: normalizedZoom };
346
- }
347
- function setFocused(state, focused) {
348
- if (state.isFocused === focused) return state;
349
- return { ...state, isFocused: focused };
350
- }
351
- function deriveActiveListContext(surface, selectionHead, numberingCatalog) {
352
- if (!surface) return null;
353
- const block = findBlockAtPosition(surface.blocks, selectionHead);
354
- if (!block || block.kind !== "paragraph" || !block.numbering) return null;
355
- const isOrdered = resolveListOrdering(block.numbering, numberingCatalog);
356
- return {
357
- numberingInstanceId: block.numbering.numberingInstanceId,
358
- level: block.numbering.level,
359
- isOrdered,
360
- ...block.numberingPrefix ? { markerText: block.numberingPrefix } : {}
361
- };
362
- }
363
- function deriveActiveNoteContext(activeStory, mainSurface) {
364
- if (activeStory.kind !== "footnote" && activeStory.kind !== "endnote") {
365
- return null;
366
- }
367
- const referencePosition = findNoteReferencePosition(mainSurface, activeStory);
368
- return {
369
- noteKind: activeStory.kind,
370
- noteId: activeStory.noteId,
371
- referencePosition
372
- };
373
- }
374
- function deriveLayoutMeasurement(surface, selectionOrPosition, viewState) {
375
- const selectionHead = typeof selectionOrPosition === "number" ? selectionOrPosition : selectionOrPosition.activeRange.kind === "node" ? selectionOrPosition.activeRange.at : selectionOrPosition.head;
376
- const block = surface ? findBlockAtPosition(surface.blocks, selectionHead) : null;
377
- const tabStops = block?.kind === "paragraph" && block.tabStops ? block.tabStops : [];
378
- const listMarkerLane = deriveListMarkerLane(block);
379
- return {
380
- pageRegions: viewState.activePageRegion ? [viewState.activePageRegion] : [],
381
- caretAffinity: viewState.caretAffinity,
382
- tabStops,
383
- listMarkerLane: listMarkerLane ?? void 0,
384
- objectFrame: viewState.activeObjectFrame ?? void 0
385
- };
386
- }
387
- function createEditorViewStateSnapshot(viewState, activeStory, selection, surface, mainSurface, pageLayout, numberingCatalog) {
388
- const selectionPosition = selection.activeRange.kind === "node" ? selection.activeRange.at : selection.head;
389
- const derivedViewState = deriveInteractionViewState(
390
- viewState,
391
- activeStory,
392
- selection,
393
- surface,
394
- pageLayout
395
- );
396
- const activeListContext = deriveActiveListContext(surface, selectionPosition, numberingCatalog);
397
- const activeNoteContext = deriveActiveNoteContext(activeStory, mainSurface);
398
- const measurement = deriveLayoutMeasurement(surface, selection, derivedViewState);
399
- return {
400
- viewMode: derivedViewState.viewMode,
401
- documentMode: derivedViewState.documentMode,
402
- workspaceMode: derivedViewState.workspaceMode,
403
- zoomLevel: derivedViewState.zoomLevel,
404
- activeStory,
405
- selection,
406
- caretAffinity: derivedViewState.caretAffinity,
407
- activeListContext,
408
- activeNoteContext,
409
- activePageRegion: derivedViewState.activePageRegion,
410
- activeObjectFrame: derivedViewState.activeObjectFrame,
411
- measurement,
412
- isFocused: derivedViewState.isFocused
413
- };
414
- }
415
- function findBlockAtPosition(blocks, position) {
416
- for (const block of blocks) {
417
- if (position >= block.from && position <= block.to) {
418
- if (block.kind === "sdt_block") {
419
- const inner = findBlockAtPosition(block.children, position);
420
- if (inner) return inner;
421
- }
422
- if (block.kind === "table") {
423
- for (const row of block.rows) {
424
- for (const cell of row.cells) {
425
- const inner = findBlockAtPosition(cell.content, position);
426
- if (inner) return inner;
427
- }
428
- }
429
- }
430
- return block;
431
- }
432
- }
433
- return null;
434
- }
435
- function resolveListOrdering(numbering, numberingCatalog) {
436
- if (!numberingCatalog) {
437
- return true;
438
- }
439
- const instance = numberingCatalog.instances[numbering.numberingInstanceId];
440
- const definition = instance ? numberingCatalog.abstractDefinitions[instance.abstractNumberingId] : void 0;
441
- const levelDefinition = definition?.levels.find((level) => level.level === numbering.level);
442
- if (!levelDefinition) {
443
- return true;
444
- }
445
- return levelDefinition.format !== "bullet";
446
- }
447
- function deriveInteractionViewState(viewState, activeStory, selection, surface, pageLayout) {
448
- const activePageRegion = deriveActivePageRegion(activeStory, pageLayout) ?? viewState.activePageRegion;
449
- const activeObjectFrame = deriveActiveObjectFrame(surface, selection);
450
- const caretAffinity = deriveCaretAffinity(surface, selection);
451
- return {
452
- ...viewState,
453
- caretAffinity,
454
- activePageRegion,
455
- activeObjectFrame
456
- };
457
- }
458
- function deriveActivePageRegion(activeStory, pageLayout) {
459
- if (!pageLayout) {
460
- return null;
461
- }
462
- const sectionIndex = pageLayout?.sectionIndex ?? 0;
463
- switch (activeStory.kind) {
464
- case "header":
465
- return { region: "header", sectionIndex, columnIndex: 0 };
466
- case "footer":
467
- return { region: "footer", sectionIndex, columnIndex: 0 };
468
- default:
469
- return { region: "body", sectionIndex, columnIndex: 0 };
470
- }
471
- }
472
- function deriveActiveObjectFrame(surface, selection) {
473
- if (!surface) {
474
- return null;
475
- }
476
- const position = selection.activeRange.kind === "node" ? selection.activeRange.at : selection.head;
477
- const block = findBlockAtPosition(surface.blocks, position);
478
- if (!block || block.kind !== "paragraph") {
479
- return null;
480
- }
481
- const segment = findObjectSegmentAtPosition(block.segments, position);
482
- if (!segment) {
483
- return null;
484
- }
485
- if (segment.kind === "image") {
486
- return {
487
- kind: "image",
488
- anchorPos: segment.from,
489
- display: segment.display === "floating" ? "floating" : "inline"
490
- };
491
- }
492
- const objectKind = inferOpaqueObjectKind(segment);
493
- if (!objectKind) {
494
- return null;
495
- }
496
- return {
497
- kind: objectKind,
498
- anchorPos: segment.from,
499
- display: "inline"
500
- };
501
- }
502
- function deriveCaretAffinity(surface, selection) {
503
- if (selection.activeRange.kind === "node") {
504
- return selection.activeRange.assoc < 0 ? "backward" : "forward";
505
- }
506
- if (!selection.isCollapsed || !surface) {
507
- return "none";
508
- }
509
- const block = findBlockAtPosition(surface.blocks, selection.head);
510
- if (!block || block.kind !== "paragraph") {
511
- return "none";
512
- }
513
- for (const segment of block.segments) {
514
- if (!isObjectLikeSegment(segment)) {
515
- continue;
516
- }
517
- if (selection.head === segment.from) {
518
- return "forward";
519
- }
520
- if (selection.head === segment.to) {
521
- return "backward";
522
- }
523
- }
524
- return "none";
525
- }
526
- function findNoteReferencePosition(mainSurface, target) {
527
- if (!mainSurface) return 0;
528
- for (const block of mainSurface.blocks) {
529
- if (block.kind === "paragraph") {
530
- for (const segment of block.segments) {
531
- if (segment.kind === "note_ref" && segment.noteKind === target.kind && segment.noteId === target.noteId) {
532
- return segment.from;
533
- }
534
- if (segment.kind === "opaque_inline" && segment.label.toLowerCase().includes(target.kind) && segment.detail.includes(target.noteId)) {
535
- return segment.from;
536
- }
537
- }
538
- }
539
- }
540
- return 0;
541
- }
542
- function normalizeZoomLevel(zoomLevel, currentZoom) {
543
- if (zoomLevel === "pageWidth" || zoomLevel === "onePage") {
544
- return zoomLevel;
545
- }
546
- if (!Number.isFinite(zoomLevel) || zoomLevel <= 0) {
547
- return currentZoom;
548
- }
549
- return Math.max(
550
- MIN_ZOOM_PERCENT,
551
- Math.min(MAX_ZOOM_PERCENT, Math.round(zoomLevel))
552
- );
553
- }
554
- function findObjectSegmentAtPosition(segments, position) {
555
- for (const segment of segments) {
556
- if (!isObjectLikeSegment(segment)) {
557
- continue;
558
- }
559
- if (position >= segment.from && position <= segment.to) {
560
- return segment;
561
- }
562
- }
563
- return null;
564
- }
565
- function isObjectLikeSegment(segment) {
566
- if (segment.kind === "image") {
567
- return true;
568
- }
569
- if (segment.kind !== "opaque_inline") {
570
- return false;
571
- }
572
- return inferOpaqueObjectKind(segment) !== null;
573
- }
574
- function inferOpaqueObjectKind(segment) {
575
- if (segment.label === "Text box") {
576
- return "textbox";
577
- }
578
- if (segment.label === "Drawing shape") {
579
- return "shape";
580
- }
581
- if (segment.label === "Legacy VML drawing") {
582
- return segment.detail.includes("#_x0000_t202") ? "textbox" : "shape";
583
- }
584
- return null;
585
- }
586
- function deriveListMarkerLane(block) {
587
- if (!block || block.kind !== "paragraph" || !block.numbering) return null;
588
- const indent = block.indentation?.hanging ?? block.indentation?.left ?? 360;
589
- return {
590
- indent,
591
- markerWidth: Math.min(indent, 360)
592
- };
593
- }
594
-
595
- // src/runtime/page-layout-estimation.ts
596
- var DEFAULT_FONT_SIZE_POINTS = 12;
597
- var DEFAULT_LINE_HEIGHT_TWIPS = 280;
598
- var MIN_BLOCK_HEIGHT_TWIPS = 240;
599
- var TABLE_ROW_PADDING_TWIPS = 120;
600
- var DEFAULT_PAGE_ESTIMATE_PX_PER_TWIP = 1 / 15;
601
- function estimateBlockHeight(block, columnWidth) {
602
- if (!block) {
603
- return 0;
604
- }
605
- switch (block.kind) {
606
- case "paragraph":
607
- return estimateParagraphHeight(block, columnWidth);
608
- case "table":
609
- return estimateTableHeight(block, columnWidth);
610
- case "sdt_block":
611
- return Math.max(
612
- MIN_BLOCK_HEIGHT_TWIPS,
613
- block.children.reduce((total, child) => total + estimateBlockHeight(child, columnWidth), 0)
614
- );
615
- case "opaque_block":
616
- return block.label === "Section break" ? 0 : MIN_BLOCK_HEIGHT_TWIPS;
617
- }
618
- }
619
- function estimateParagraphHeight(block, columnWidth) {
620
- const lineHeight = estimateParagraphLineHeight(block);
621
- const lineCount = estimateParagraphLineCount(block, columnWidth);
622
- const spacingBefore = block.spacing?.before ?? 0;
623
- const spacingAfter = block.spacing?.after ?? 0;
624
- return Math.max(
625
- MIN_BLOCK_HEIGHT_TWIPS,
626
- lineHeight * lineCount + spacingBefore + spacingAfter
627
- );
628
- }
629
- function estimateParagraphLineHeight(block) {
630
- const explicitLine = block.spacing?.line;
631
- if (typeof explicitLine === "number" && explicitLine > 0) {
632
- return explicitLine;
633
- }
634
- const fontSizeHalfPoints = block.segments.find(
635
- (segment) => segment.kind === "text" && typeof segment.markAttrs?.fontSize === "number"
636
- )?.markAttrs?.fontSize;
637
- const fontSizePoints = typeof fontSizeHalfPoints === "number" ? fontSizeHalfPoints / 2 : DEFAULT_FONT_SIZE_POINTS;
638
- return Math.max(
639
- DEFAULT_LINE_HEIGHT_TWIPS,
640
- Math.round(fontSizePoints * 20 * 1.35)
641
- );
642
- }
643
- function estimateParagraphLineCount(block, columnWidth) {
644
- const averageCharWidth = estimateAverageCharWidth(block);
645
- const charsPerLine = Math.max(12, Math.floor(columnWidth / averageCharWidth));
646
- let lineCount = 1;
647
- let currentLineChars = estimatedPrefixLength(block);
648
- for (const segment of block.segments) {
649
- switch (segment.kind) {
650
- case "text":
651
- currentLineChars += Array.from(segment.text).length;
652
- while (currentLineChars > charsPerLine) {
653
- lineCount += 1;
654
- currentLineChars -= charsPerLine;
655
- }
656
- break;
657
- case "tab":
658
- currentLineChars += 4;
659
- break;
660
- case "hard_break":
661
- lineCount += 1;
662
- currentLineChars = 0;
663
- break;
664
- case "image":
665
- lineCount += Math.max(1, Math.round(segment.display === "floating" ? 2 : 1));
666
- currentLineChars = 0;
667
- break;
668
- case "note_ref":
669
- currentLineChars += 1;
670
- break;
671
- case "opaque_inline":
672
- if (segment.presentation !== "quiet-marker") {
673
- currentLineChars += segment.label.length > 0 ? 1 : 0;
674
- }
675
- break;
676
- }
677
- }
678
- return Math.max(1, lineCount);
679
- }
680
- function getUsablePageHeight(layout) {
681
- return Math.max(
682
- 1440,
683
- layout.pageHeight - layout.marginTop - layout.marginBottom
684
- );
685
- }
686
- function getUsableColumnMetrics(layout) {
687
- const usableWidth = Math.max(
688
- 1440,
689
- layout.pageWidth - layout.marginLeft - layout.marginRight - layout.gutter
690
- );
691
- const columnCount = Math.max(1, layout.columns);
692
- if (!layout.equalWidthColumns && layout.columnDefinitions.length > 0) {
693
- return layout.columnDefinitions.map((column, index) => ({
694
- width: Math.max(720, column.width),
695
- space: index < layout.columnDefinitions.length - 1 ? Math.max(0, column.space ?? 0) : 0
696
- }));
697
- }
698
- const width = columnCount <= 1 ? usableWidth : Math.max(720, Math.floor(usableWidth / columnCount));
699
- return Array.from({ length: columnCount }, () => ({
700
- width,
701
- space: 0
702
- }));
703
- }
704
- function getUsableColumnWidth(layout) {
705
- return getUsableColumnMetrics(layout)[0]?.width ?? 1440;
706
- }
707
- function estimateTableHeight(block, columnWidth) {
708
- let totalHeight = 0;
709
- for (const row of block.rows) {
710
- const explicitHeight = row.height ?? 0;
711
- if (explicitHeight > 0) {
712
- totalHeight += explicitHeight;
713
- continue;
714
- }
715
- let rowHeight = MIN_BLOCK_HEIGHT_TWIPS;
716
- for (const cell of row.cells) {
717
- const cellHeight = cell.content.reduce(
718
- (total, child) => total + estimateBlockHeight(child, columnWidth),
719
- 0
720
- );
721
- rowHeight = Math.max(rowHeight, cellHeight + TABLE_ROW_PADDING_TWIPS);
722
- }
723
- totalHeight += rowHeight;
724
- }
725
- return Math.max(MIN_BLOCK_HEIGHT_TWIPS, totalHeight);
726
- }
727
- function estimateAverageCharWidth(block) {
728
- const fontSizeHalfPoints = block.segments.find(
729
- (segment) => segment.kind === "text" && typeof segment.markAttrs?.fontSize === "number"
730
- )?.markAttrs?.fontSize;
731
- const fontSizePoints = typeof fontSizeHalfPoints === "number" ? fontSizeHalfPoints / 2 : DEFAULT_FONT_SIZE_POINTS;
732
- return Math.max(96, Math.round(fontSizePoints * 12));
733
- }
734
- function estimatedPrefixLength(block) {
735
- const prefix = block.numberingPrefix ?? "";
736
- const suffix = block.numberingSuffix === "space" ? 1 : block.numberingSuffix === "tab" ? 4 : 0;
737
- return prefix.length + suffix;
738
- }
739
-
740
- // src/runtime/document-navigation.ts
741
- var MIN_BLOCK_HEIGHT_TWIPS2 = 240;
742
- var FOOTNOTE_REFERENCE_RESERVATION_TWIPS = 180;
743
- var navigationBaseCache = /* @__PURE__ */ new WeakMap();
744
- function createDocumentNavigationSnapshot(document, selectionHead, activeStory) {
745
- const base = getNavigationBaseSnapshot(document);
746
- const navigationContext = resolveActiveNavigationContext(
747
- document,
748
- base.pages,
749
- base.sections,
750
- base.mainSurface,
751
- selectionHead,
752
- activeStory
753
- );
754
- return {
755
- pageCount: base.pages.length,
756
- pages: base.pages,
757
- headings: base.headings,
758
- activePageIndex: navigationContext.activePageIndex,
759
- activeSectionIndex: navigationContext.activeSectionIndex
760
- };
761
- }
762
- function getNavigationBaseSnapshot(document) {
763
- const cached = navigationBaseCache.get(document.content);
764
- if (cached && cached.styles === document.styles && cached.subParts === document.subParts) {
765
- return cached;
766
- }
767
- const mainSurface = createEditorSurfaceSnapshot(
768
- document,
769
- createSelectionSnapshot(0, 0),
770
- MAIN_STORY_TARGET
771
- );
772
- const sections = buildResolvedSections(document);
773
- const pages = buildPageStack(document, sections, mainSurface);
774
- const headings = buildHeadingOutline(document, mainSurface, sections, pages);
775
- const next = {
776
- mainSurface,
777
- sections,
778
- pages,
779
- headings,
780
- styles: document.styles,
781
- subParts: document.subParts
782
- };
783
- navigationBaseCache.set(document.content, next);
784
- return next;
785
- }
786
- function findPageForOffset(pages, offset) {
787
- for (let i = 0; i < pages.length; i++) {
788
- if (offset < pages[i].endOffset) {
789
- return i;
790
- }
791
- }
792
- return Math.max(0, pages.length - 1);
793
- }
794
- function findSectionForOffset(sections, offset) {
795
- return sections.length > 0 ? findSectionForPosition(sections, offset).index : 0;
796
- }
797
- function buildPageStack(document, sections, mainSurface) {
798
- const pages = [];
799
- let globalPageIndex = 0;
800
- for (const section of sections) {
801
- const layout = buildPageLayoutSnapshot(
802
- section.index,
803
- section.properties ?? document.subParts?.finalSectionProperties,
804
- document.subParts
805
- );
806
- const sectionBlocks = collectSectionBlocks(mainSurface.blocks, section.start, section.end);
807
- const paginated = paginateSectionBlocks(
808
- section,
809
- sectionBlocks,
810
- layout,
811
- document.subParts?.footnoteCollection
812
- );
813
- for (const page of paginated) {
814
- pages.push({
815
- ...page,
816
- pageIndex: globalPageIndex
817
- });
818
- globalPageIndex += 1;
819
- }
820
- }
821
- if (pages.length === 0) {
822
- pages.push({
823
- pageIndex: 0,
824
- sectionIndex: 0,
825
- pageInSection: 0,
826
- startOffset: 0,
827
- endOffset: mainSurface.storySize,
828
- layout: buildPageLayoutSnapshot(
829
- 0,
830
- document.subParts?.finalSectionProperties,
831
- document.subParts
832
- )
833
- });
834
- }
835
- return pages;
836
- }
837
- function collectSectionBlocks(blocks, start, end) {
838
- return blocks.filter((block) => block.to > start && block.from < end);
839
- }
840
- function paginateSectionBlocks(section, blocks, layout, footnotes) {
841
- if (blocks.length === 0) {
842
- return [
843
- {
844
- sectionIndex: section.index,
845
- pageInSection: 0,
846
- startOffset: section.start,
847
- endOffset: section.end,
848
- layout
849
- }
850
- ];
851
- }
852
- const pages = [];
853
- const usableHeight = getUsablePageHeight(layout);
854
- const columnMetrics = getUsableColumnMetrics(layout);
855
- const maxColumns = Math.max(1, columnMetrics.length);
856
- let pageStart = section.start;
857
- let columnHeight = 0;
858
- let columnIndex = 0;
859
- let pageInSection = 0;
860
- let reservedNoteHeight = 0;
861
- const reservedNotes = /* @__PURE__ */ new Set();
862
- const pushPage = (endOffset) => {
863
- const boundedEnd = Math.max(pageStart, Math.min(endOffset, section.end));
864
- if (boundedEnd === pageStart && pages.length > 0) {
865
- return;
866
- }
867
- pages.push({
868
- sectionIndex: section.index,
869
- pageInSection,
870
- startOffset: pageStart,
871
- endOffset: boundedEnd,
872
- layout
873
- });
874
- pageInSection += 1;
875
- pageStart = boundedEnd;
876
- columnHeight = 0;
877
- columnIndex = 0;
878
- reservedNoteHeight = 0;
879
- reservedNotes.clear();
880
- };
881
- for (let index = 0; index < blocks.length; index += 1) {
882
- const block = blocks[index];
883
- const nextBoundary = blocks[index + 1]?.from ?? section.end;
884
- while (true) {
885
- const columnWidth = columnMetrics[Math.min(columnIndex, columnMetrics.length - 1)]?.width ?? getUsableColumnWidth(layout);
886
- const baseHeight = estimateBlockHeight(block, columnWidth);
887
- const keepWithNextHeight = block.kind === "paragraph" && block.keepNext ? baseHeight + estimateBlockHeight(blocks[index + 1], columnWidth) : baseHeight;
888
- const noteHeight = estimateFootnoteReservation(block, footnotes, columnWidth, reservedNotes);
889
- const projectedHeight = columnHeight + keepWithNextHeight + reservedNoteHeight + noteHeight;
890
- if (block.kind === "paragraph" && block.pageBreakBefore && pageStart < block.from) {
891
- pushPage(block.from);
892
- continue;
893
- }
894
- if (projectedHeight > usableHeight && pageStart < block.from) {
895
- if (columnIndex < maxColumns - 1) {
896
- columnIndex += 1;
897
- columnHeight = 0;
898
- reservedNoteHeight = 0;
899
- reservedNotes.clear();
900
- continue;
901
- }
902
- pushPage(block.from);
903
- continue;
904
- }
905
- const effectiveNoteHeight = estimateFootnoteReservation(
906
- block,
907
- footnotes,
908
- columnWidth,
909
- reservedNotes
910
- );
911
- columnHeight += baseHeight;
912
- reservedNoteHeight += effectiveNoteHeight;
913
- currentPageNoteIds(block).forEach((noteKey) => reservedNotes.add(noteKey));
914
- if (hasColumnBreak(block)) {
915
- if (columnIndex < maxColumns - 1) {
916
- columnIndex += 1;
917
- columnHeight = 0;
918
- reservedNoteHeight = 0;
919
- reservedNotes.clear();
920
- } else {
921
- pushPage(nextBoundary);
922
- }
923
- break;
924
- }
925
- if (index === blocks.length - 1) {
926
- pushPage(section.end);
927
- }
928
- break;
929
- }
930
- }
931
- return pages.length > 0 ? pages : [
932
- {
933
- sectionIndex: section.index,
934
- pageInSection: 0,
935
- startOffset: section.start,
936
- endOffset: section.end,
937
- layout
938
- }
939
- ];
940
- }
941
- function resolveActiveNavigationContext(document, pages, sections, mainSurface, selectionHead, activeStory) {
942
- if (activeStory.kind === "main") {
943
- const activePageIndex = findPageForOffset(pages, selectionHead);
944
- return {
945
- activePageIndex,
946
- activeSectionIndex: pages[activePageIndex]?.sectionIndex ?? 0
947
- };
948
- }
949
- if (activeStory.kind === "header" || activeStory.kind === "footer") {
950
- const section = resolveSectionForStoryTarget(document, sections, activeStory);
951
- if (section) {
952
- return {
953
- activePageIndex: findFirstPageIndexForSection(pages, section.index),
954
- activeSectionIndex: section.index
955
- };
956
- }
957
- }
958
- if (activeStory.kind === "footnote" || activeStory.kind === "endnote") {
959
- const referencePosition = findNoteReferencePosition(mainSurface, activeStory);
960
- const activePageIndex = findPageForOffset(pages, referencePosition);
961
- return {
962
- activePageIndex,
963
- activeSectionIndex: pages[activePageIndex]?.sectionIndex ?? findSectionForOffset(sections, referencePosition)
964
- };
965
- }
966
- return {
967
- activePageIndex: 0,
968
- activeSectionIndex: 0
969
- };
970
- }
971
- function findFirstPageIndexForSection(pages, sectionIndex) {
972
- const match = pages.findIndex((page) => page.sectionIndex === sectionIndex);
973
- return match >= 0 ? match : 0;
974
- }
975
- function estimateFootnoteReservation(block, footnotes, columnWidth, reservedNotes) {
976
- if (!footnotes || block.kind !== "paragraph") {
977
- return 0;
978
- }
979
- let reservation = 0;
980
- for (const noteKey of currentPageNoteIds(block)) {
981
- if (reservedNotes.has(noteKey)) {
982
- continue;
983
- }
984
- const [noteKind, noteId] = noteKey.split(":");
985
- const noteCollection = noteKind === "endnote" ? footnotes.endnotes : footnotes.footnotes;
986
- const note = noteCollection[noteId];
987
- reservation += FOOTNOTE_REFERENCE_RESERVATION_TWIPS;
988
- if (note) {
989
- reservation += note.blocks.reduce(
990
- (total, child) => total + estimateCanonicalNoteBlockHeight(child, columnWidth),
991
- 0
992
- );
993
- }
994
- }
995
- return reservation;
996
- }
997
- function estimateCanonicalNoteBlockHeight(block, columnWidth) {
998
- switch (block.type) {
999
- case "paragraph":
1000
- return estimateParagraphHeight(
1001
- {
1002
- blockId: "note",
1003
- kind: "paragraph",
1004
- from: 0,
1005
- to: 0,
1006
- ...block.styleId ? { styleId: block.styleId } : {},
1007
- segments: createEstimatedNoteSegments(block.children)
1008
- },
1009
- columnWidth
1010
- );
1011
- case "table":
1012
- return MIN_BLOCK_HEIGHT_TWIPS2 * Math.max(1, block.rows.length);
1013
- default:
1014
- return MIN_BLOCK_HEIGHT_TWIPS2;
1015
- }
1016
- }
1017
- function createEstimatedNoteSegments(children) {
1018
- const segments = [];
1019
- children.forEach((child, index) => {
1020
- if (child.type === "text") {
1021
- segments.push({
1022
- segmentId: `note-${index}`,
1023
- kind: "text",
1024
- from: 0,
1025
- to: Array.from(child.text).length,
1026
- text: child.text
1027
- });
1028
- return;
1029
- }
1030
- if (child.type === "hard_break" || child.type === "tab") {
1031
- segments.push({
1032
- segmentId: `note-${index}`,
1033
- kind: child.type,
1034
- from: 0,
1035
- to: 1
1036
- });
1037
- }
1038
- });
1039
- return segments;
1040
- }
1041
- function currentPageNoteIds(block) {
1042
- const notes = /* @__PURE__ */ new Set();
1043
- if (block.kind !== "paragraph") {
1044
- return notes;
1045
- }
1046
- for (const segment of block.segments) {
1047
- if (segment.kind === "note_ref" && segment.noteId) {
1048
- notes.add(`${segment.noteKind}:${segment.noteId}`);
1049
- }
1050
- }
1051
- return notes;
1052
- }
1053
- function hasColumnBreak(block) {
1054
- return block.kind === "paragraph" && block.segments.some(
1055
- (segment) => segment.kind === "opaque_inline" && segment.label === "Column break"
1056
- );
1057
- }
1058
- var HEADING_STYLE_PATTERN = /^heading\s*(\d+)$/i;
1059
- function headingLevelFromStyleId(styleId) {
1060
- if (!styleId) return null;
1061
- const match = HEADING_STYLE_PATTERN.exec(styleId);
1062
- if (match) {
1063
- const level = parseInt(match[1], 10);
1064
- return level >= 1 && level <= 9 ? level : null;
1065
- }
1066
- return null;
1067
- }
1068
- function buildHeadingOutline(document, mainSurface, sections, pages) {
1069
- const headings = [];
1070
- for (const block of mainSurface.blocks) {
1071
- if (block.kind !== "paragraph") continue;
1072
- const outlineLevel = block.outlineLevel;
1073
- const styleLevel = resolveHeadingLevelFromStyle(document, block.styleId);
1074
- const level = outlineLevel !== void 0 && outlineLevel >= 0 ? outlineLevel + 1 : styleLevel;
1075
- if (level === null) continue;
1076
- const text = extractParagraphText(block);
1077
- if (!text.trim()) continue;
1078
- const offset = block.from;
1079
- const pageIndex = findPageForOffset(pages, offset);
1080
- const sectionIndex = findSectionForOffset(sections, offset);
1081
- headings.push({
1082
- headingId: `heading-${block.blockId}-${offset}`,
1083
- level,
1084
- text: text.trim(),
1085
- offset,
1086
- pageIndex,
1087
- sectionIndex
1088
- });
1089
- }
1090
- return headings;
1091
- }
1092
- function resolveHeadingLevelFromStyle(document, styleId) {
1093
- if (!styleId) {
1094
- return null;
1095
- }
1096
- const visited = /* @__PURE__ */ new Set();
1097
- let currentStyleId = styleId;
1098
- while (currentStyleId && !visited.has(currentStyleId)) {
1099
- visited.add(currentStyleId);
1100
- const style = document.styles.paragraphs[currentStyleId];
1101
- if (!style) {
1102
- break;
1103
- }
1104
- if (typeof style.outlineLevel === "number" && style.outlineLevel >= 0 && style.outlineLevel <= 8) {
1105
- return style.outlineLevel + 1;
1106
- }
1107
- currentStyleId = style.basedOn;
1108
- }
1109
- return headingLevelFromStyleId(styleId);
1110
- }
1111
- function extractParagraphText(block) {
1112
- let text = "";
1113
- for (const segment of block.segments) {
1114
- switch (segment.kind) {
1115
- case "text":
1116
- text += segment.text;
1117
- break;
1118
- case "tab":
1119
- text += " ";
1120
- break;
1121
- case "hard_break":
1122
- text += "\n";
1123
- break;
1124
- }
1125
- }
1126
- return text;
1127
- }
1128
-
1129
- // src/ui-tailwind/editor-surface/perf-probe.ts
1130
- function startPerfProbe(kind) {
1131
- const state = getEnabledState();
1132
- if (!state) {
1133
- return null;
1134
- }
1135
- const token = `${kind}-${state.nextToken ?? 0}`;
1136
- state.nextToken = (state.nextToken ?? 0) + 1;
1137
- state.pending ??= {};
1138
- state.pending[token] = {
1139
- kind,
1140
- startedAt: performance.now()
1141
- };
1142
- return token;
1143
- }
1144
- function finishPerfProbe(token) {
1145
- if (!token) {
1146
- return null;
1147
- }
1148
- const state = getEnabledState();
1149
- if (!state?.pending?.[token]) {
1150
- return null;
1151
- }
1152
- const pending = state.pending[token];
1153
- delete state.pending[token];
1154
- const sample = {
1155
- token,
1156
- kind: pending.kind,
1157
- durationMs: performance.now() - pending.startedAt,
1158
- recordedAt: Date.now()
1159
- };
1160
- pushSample(state, sample);
1161
- return sample;
1162
- }
1163
- function recordPerfSample(kind, durationMs = 0) {
1164
- const state = getEnabledState();
1165
- if (!state) {
1166
- return null;
1167
- }
1168
- const token = `${kind}-${state.nextToken ?? 0}`;
1169
- state.nextToken = (state.nextToken ?? 0) + 1;
1170
- const sample = {
1171
- token,
1172
- kind,
1173
- durationMs,
1174
- recordedAt: Date.now()
1175
- };
1176
- pushSample(state, sample);
1177
- return sample;
1178
- }
1179
- function incrementInvalidationCounter(counter, amount = 1) {
1180
- const state = getEnabledState();
1181
- if (!state) {
1182
- return 0;
1183
- }
1184
- state.invalidationCounts ??= {};
1185
- state.invalidationCounts[counter] = (state.invalidationCounts[counter] ?? 0) + amount;
1186
- return state.invalidationCounts[counter];
1187
- }
1188
- function getEnabledState() {
1189
- if (typeof window === "undefined") {
1190
- return null;
1191
- }
1192
- const state = window.__DOCX_REACT_PERF_PROBE__;
1193
- if (!state?.enabled) {
1194
- return null;
1195
- }
1196
- return state;
1197
- }
1198
- function pushSample(state, sample) {
1199
- state.samples ??= [];
1200
- state.samples.push(sample);
1201
- const maxSamples = state.maxSamples ?? 20;
1202
- if (state.samples.length > maxSamples) {
1203
- state.samples.splice(0, state.samples.length - maxSamples);
1204
- }
1205
- }
1206
-
1207
- export {
1208
- detachReviewAnchor,
1209
- mapReviewAnchor,
1210
- getAnchorRange,
1211
- mappingTouchesAnchorContent,
1212
- rangeStaysWithinSingleParagraph,
1213
- canCreateDocxCommentAnchor,
1214
- DEFAULT_PAGE_ESTIMATE_PX_PER_TWIP,
1215
- estimateBlockHeight,
1216
- estimateParagraphLineHeight,
1217
- estimateParagraphLineCount,
1218
- getUsableColumnWidth,
1219
- buildResolvedSections,
1220
- buildPageLayoutSnapshot,
1221
- resolveSectionForStoryTarget,
1222
- resolveActiveSection,
1223
- createViewState,
1224
- setViewMode,
1225
- setDocumentMode,
1226
- setWorkspaceMode,
1227
- setZoomLevel,
1228
- setFocused,
1229
- createEditorViewStateSnapshot,
1230
- createDocumentNavigationSnapshot,
1231
- findPageForOffset,
1232
- startPerfProbe,
1233
- finishPerfProbe,
1234
- recordPerfSample,
1235
- incrementInvalidationCounter
1236
- };
1237
- //# sourceMappingURL=chunk-GBVOWFIK.js.map