ooxml-core 0.2.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 (586) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +3 -0
  3. package/README.md +125 -0
  4. package/THIRD-PARTY-LICENSES +26 -0
  5. package/dist/collab/assets.d.ts +42 -0
  6. package/dist/collab/assets.d.ts.map +1 -0
  7. package/dist/collab/awareness.d.ts +65 -0
  8. package/dist/collab/awareness.d.ts.map +1 -0
  9. package/dist/collab/binding.d.ts +36 -0
  10. package/dist/collab/binding.d.ts.map +1 -0
  11. package/dist/collab/codec.d.ts +37 -0
  12. package/dist/collab/codec.d.ts.map +1 -0
  13. package/dist/collab/emitter.d.ts +11 -0
  14. package/dist/collab/emitter.d.ts.map +1 -0
  15. package/dist/collab/external-provider.d.ts +50 -0
  16. package/dist/collab/external-provider.d.ts.map +1 -0
  17. package/dist/collab/identity.d.ts +48 -0
  18. package/dist/collab/identity.d.ts.map +1 -0
  19. package/dist/collab/index.cjs +1328 -0
  20. package/dist/collab/index.d.ts +18 -0
  21. package/dist/collab/index.d.ts.map +1 -0
  22. package/dist/collab/index.mjs +1225 -0
  23. package/dist/collab/lifecycle.d.ts +62 -0
  24. package/dist/collab/lifecycle.d.ts.map +1 -0
  25. package/dist/collab/memory-transport.d.ts +19 -0
  26. package/dist/collab/memory-transport.d.ts.map +1 -0
  27. package/dist/collab/ordering.d.ts +53 -0
  28. package/dist/collab/ordering.d.ts.map +1 -0
  29. package/dist/collab/policy.d.ts +39 -0
  30. package/dist/collab/policy.d.ts.map +1 -0
  31. package/dist/collab/presence.d.ts +61 -0
  32. package/dist/collab/presence.d.ts.map +1 -0
  33. package/dist/collab/provider.d.ts +55 -0
  34. package/dist/collab/provider.d.ts.map +1 -0
  35. package/dist/collab/session.d.ts +70 -0
  36. package/dist/collab/session.d.ts.map +1 -0
  37. package/dist/collab/transport-provider.d.ts +13 -0
  38. package/dist/collab/transport-provider.d.ts.map +1 -0
  39. package/dist/collab/validation.d.ts +38 -0
  40. package/dist/collab/validation.d.ts.map +1 -0
  41. package/dist/collab/websocket-transport.d.ts +33 -0
  42. package/dist/collab/websocket-transport.d.ts.map +1 -0
  43. package/dist/color/color-linear.d.ts +5 -0
  44. package/dist/color/color-linear.d.ts.map +1 -0
  45. package/dist/color/color-primitives.d.ts +183 -0
  46. package/dist/color/color-primitives.d.ts.map +1 -0
  47. package/dist/color/index.cjs +177 -0
  48. package/dist/color/index.d.ts +3 -0
  49. package/dist/color/index.d.ts.map +1 -0
  50. package/dist/color/index.mjs +161 -0
  51. package/dist/diagram/attributes.d.ts +12 -0
  52. package/dist/diagram/attributes.d.ts.map +1 -0
  53. package/dist/diagram/data-model.d.ts +18 -0
  54. package/dist/diagram/data-model.d.ts.map +1 -0
  55. package/dist/diagram/definitions.d.ts +14 -0
  56. package/dist/diagram/definitions.d.ts.map +1 -0
  57. package/dist/diagram/dom.d.ts +15 -0
  58. package/dist/diagram/dom.d.ts.map +1 -0
  59. package/dist/diagram/drawing-color.d.ts +28 -0
  60. package/dist/diagram/drawing-color.d.ts.map +1 -0
  61. package/dist/diagram/drawing-fill.d.ts +9 -0
  62. package/dist/diagram/drawing-fill.d.ts.map +1 -0
  63. package/dist/diagram/drawing-geometry.d.ts +23 -0
  64. package/dist/diagram/drawing-geometry.d.ts.map +1 -0
  65. package/dist/diagram/drawing-text.d.ts +5 -0
  66. package/dist/diagram/drawing-text.d.ts.map +1 -0
  67. package/dist/diagram/drawing.d.ts +7 -0
  68. package/dist/diagram/drawing.d.ts.map +1 -0
  69. package/dist/diagram/index.cjs +1193 -0
  70. package/dist/diagram/index.d.ts +14 -0
  71. package/dist/diagram/index.d.ts.map +1 -0
  72. package/dist/diagram/index.mjs +1161 -0
  73. package/dist/diagram/layout-category.d.ts +8 -0
  74. package/dist/diagram/layout-category.d.ts.map +1 -0
  75. package/dist/diagram/load.d.ts +36 -0
  76. package/dist/diagram/load.d.ts.map +1 -0
  77. package/dist/diagram/relationships.d.ts +35 -0
  78. package/dist/diagram/relationships.d.ts.map +1 -0
  79. package/dist/diagram/types.d.ts +306 -0
  80. package/dist/diagram/types.d.ts.map +1 -0
  81. package/dist/docx/block-parser.d.ts +13 -0
  82. package/dist/docx/block-parser.d.ts.map +1 -0
  83. package/dist/docx/bookmarks.d.ts +18 -0
  84. package/dist/docx/bookmarks.d.ts.map +1 -0
  85. package/dist/docx/breaks.d.ts +11 -0
  86. package/dist/docx/breaks.d.ts.map +1 -0
  87. package/dist/docx/character-styles.d.ts +4 -0
  88. package/dist/docx/character-styles.d.ts.map +1 -0
  89. package/dist/docx/comment-spans.d.ts +19 -0
  90. package/dist/docx/comment-spans.d.ts.map +1 -0
  91. package/dist/docx/comments.d.ts +4 -0
  92. package/dist/docx/comments.d.ts.map +1 -0
  93. package/dist/docx/core-properties.d.ts +18 -0
  94. package/dist/docx/core-properties.d.ts.map +1 -0
  95. package/dist/docx/default-styles.d.ts +8 -0
  96. package/dist/docx/default-styles.d.ts.map +1 -0
  97. package/dist/docx/defined-props.d.ts +9 -0
  98. package/dist/docx/defined-props.d.ts.map +1 -0
  99. package/dist/docx/diagram-document.d.ts +9 -0
  100. package/dist/docx/diagram-document.d.ts.map +1 -0
  101. package/dist/docx/diagram-theme.d.ts +8 -0
  102. package/dist/docx/diagram-theme.d.ts.map +1 -0
  103. package/dist/docx/diagram.d.ts +89 -0
  104. package/dist/docx/diagram.d.ts.map +1 -0
  105. package/dist/docx/docpr-ids.d.ts +14 -0
  106. package/dist/docx/docpr-ids.d.ts.map +1 -0
  107. package/dist/docx/document-parts.d.ts +18 -0
  108. package/dist/docx/document-parts.d.ts.map +1 -0
  109. package/dist/docx/drawing.d.ts +13 -0
  110. package/dist/docx/drawing.d.ts.map +1 -0
  111. package/dist/docx/element-order.d.ts +13 -0
  112. package/dist/docx/element-order.d.ts.map +1 -0
  113. package/dist/docx/embedded.cjs +7646 -0
  114. package/dist/docx/embedded.d.ts +5 -0
  115. package/dist/docx/embedded.d.ts.map +1 -0
  116. package/dist/docx/embedded.mjs +7639 -0
  117. package/dist/docx/expect-defined.d.ts +3 -0
  118. package/dist/docx/expect-defined.d.ts.map +1 -0
  119. package/dist/docx/field-date.d.ts +10 -0
  120. package/dist/docx/field-date.d.ts.map +1 -0
  121. package/dist/docx/field-runs.d.ts +10 -0
  122. package/dist/docx/field-runs.d.ts.map +1 -0
  123. package/dist/docx/generated/wml-simple-types.d.ts +298 -0
  124. package/dist/docx/generated/wml-simple-types.d.ts.map +1 -0
  125. package/dist/docx/heading-list-kinds.d.ts +10 -0
  126. package/dist/docx/heading-list-kinds.d.ts.map +1 -0
  127. package/dist/docx/highlight.d.ts +5 -0
  128. package/dist/docx/highlight.d.ts.map +1 -0
  129. package/dist/docx/hyperlink.d.ts +8 -0
  130. package/dist/docx/hyperlink.d.ts.map +1 -0
  131. package/dist/docx/index.cjs +9784 -0
  132. package/dist/docx/index.d.ts +40 -0
  133. package/dist/docx/index.d.ts.map +1 -0
  134. package/dist/docx/index.mjs +9456 -0
  135. package/dist/docx/inline-model.d.ts +68 -0
  136. package/dist/docx/inline-model.d.ts.map +1 -0
  137. package/dist/docx/language.d.ts +3 -0
  138. package/dist/docx/language.d.ts.map +1 -0
  139. package/dist/docx/layout/adapt-drop-cap.d.ts +10 -0
  140. package/dist/docx/layout/adapt-drop-cap.d.ts.map +1 -0
  141. package/dist/docx/layout/adapt-floats.d.ts +8 -0
  142. package/dist/docx/layout/adapt-floats.d.ts.map +1 -0
  143. package/dist/docx/layout/adapt-notes.d.ts +13 -0
  144. package/dist/docx/layout/adapt-notes.d.ts.map +1 -0
  145. package/dist/docx/layout/adapt-paragraph-box.d.ts +12 -0
  146. package/dist/docx/layout/adapt-paragraph-box.d.ts.map +1 -0
  147. package/dist/docx/layout/adapt-table.d.ts +12 -0
  148. package/dist/docx/layout/adapt-table.d.ts.map +1 -0
  149. package/dist/docx/layout/adapter.d.ts +5 -0
  150. package/dist/docx/layout/adapter.d.ts.map +1 -0
  151. package/dist/docx/layout/floats.d.ts +20 -0
  152. package/dist/docx/layout/floats.d.ts.map +1 -0
  153. package/dist/docx/layout/flow-paragraph.d.ts +26 -0
  154. package/dist/docx/layout/flow-paragraph.d.ts.map +1 -0
  155. package/dist/docx/layout/flow-table.d.ts +12 -0
  156. package/dist/docx/layout/flow-table.d.ts.map +1 -0
  157. package/dist/docx/layout/fonts.d.ts +3 -0
  158. package/dist/docx/layout/fonts.d.ts.map +1 -0
  159. package/dist/docx/layout/index.cjs +2537 -0
  160. package/dist/docx/layout/index.d.ts +20 -0
  161. package/dist/docx/layout/index.d.ts.map +1 -0
  162. package/dist/docx/layout/index.mjs +2503 -0
  163. package/dist/docx/layout/input.d.ts +206 -0
  164. package/dist/docx/layout/input.d.ts.map +1 -0
  165. package/dist/docx/layout/keep-rules.d.ts +24 -0
  166. package/dist/docx/layout/keep-rules.d.ts.map +1 -0
  167. package/dist/docx/layout/layout.d.ts +9 -0
  168. package/dist/docx/layout/layout.d.ts.map +1 -0
  169. package/dist/docx/layout/ligatures.d.ts +4 -0
  170. package/dist/docx/layout/ligatures.d.ts.map +1 -0
  171. package/dist/docx/layout/line-metrics.d.ts +21 -0
  172. package/dist/docx/layout/line-metrics.d.ts.map +1 -0
  173. package/dist/docx/layout/measure.d.ts +34 -0
  174. package/dist/docx/layout/measure.d.ts.map +1 -0
  175. package/dist/docx/layout/page-cursor.d.ts +45 -0
  176. package/dist/docx/layout/page-cursor.d.ts.map +1 -0
  177. package/dist/docx/layout/page-flow.d.ts +7 -0
  178. package/dist/docx/layout/page-flow.d.ts.map +1 -0
  179. package/dist/docx/layout/paragraph-fragments.d.ts +6 -0
  180. package/dist/docx/layout/paragraph-fragments.d.ts.map +1 -0
  181. package/dist/docx/layout/paragraph-layout.d.ts +37 -0
  182. package/dist/docx/layout/paragraph-layout.d.ts.map +1 -0
  183. package/dist/docx/layout/paragraph-tokens.d.ts +27 -0
  184. package/dist/docx/layout/paragraph-tokens.d.ts.map +1 -0
  185. package/dist/docx/layout/result.d.ts +139 -0
  186. package/dist/docx/layout/result.d.ts.map +1 -0
  187. package/dist/docx/layout/tab-stops.d.ts +14 -0
  188. package/dist/docx/layout/tab-stops.d.ts.map +1 -0
  189. package/dist/docx/layout/table-layout.d.ts +30 -0
  190. package/dist/docx/layout/table-layout.d.ts.map +1 -0
  191. package/dist/docx/layout/test-helpers.d.ts +3 -0
  192. package/dist/docx/layout/test-helpers.d.ts.map +1 -0
  193. package/dist/docx/layout/text-breaks.d.ts +56 -0
  194. package/dist/docx/layout/text-breaks.d.ts.map +1 -0
  195. package/dist/docx/layout/units.d.ts +17 -0
  196. package/dist/docx/layout/units.d.ts.map +1 -0
  197. package/dist/docx/layout/wrap.d.ts +22 -0
  198. package/dist/docx/layout/wrap.d.ts.map +1 -0
  199. package/dist/docx/ligatures.d.ts +9 -0
  200. package/dist/docx/ligatures.d.ts.map +1 -0
  201. package/dist/docx/load/detect.d.ts +6 -0
  202. package/dist/docx/load/detect.d.ts.map +1 -0
  203. package/dist/docx/load/index.cjs +8869 -0
  204. package/dist/docx/load/index.d.ts +3 -0
  205. package/dist/docx/load/index.d.ts.map +1 -0
  206. package/dist/docx/load/index.mjs +8860 -0
  207. package/dist/docx/load/legacy-doc.d.ts +7 -0
  208. package/dist/docx/load/legacy-doc.d.ts.map +1 -0
  209. package/dist/docx/model-paragraph.d.ts +100 -0
  210. package/dist/docx/model-paragraph.d.ts.map +1 -0
  211. package/dist/docx/model-run.d.ts +110 -0
  212. package/dist/docx/model-run.d.ts.map +1 -0
  213. package/dist/docx/model.d.ts +114 -0
  214. package/dist/docx/model.d.ts.map +1 -0
  215. package/dist/docx/notes.d.ts +9 -0
  216. package/dist/docx/notes.d.ts.map +1 -0
  217. package/dist/docx/numbering-editing.d.ts +30 -0
  218. package/dist/docx/numbering-editing.d.ts.map +1 -0
  219. package/dist/docx/numbering-format.d.ts +17 -0
  220. package/dist/docx/numbering-format.d.ts.map +1 -0
  221. package/dist/docx/numbering-model.d.ts +73 -0
  222. package/dist/docx/numbering-model.d.ts.map +1 -0
  223. package/dist/docx/numbering-package.d.ts +12 -0
  224. package/dist/docx/numbering-package.d.ts.map +1 -0
  225. package/dist/docx/numbering-parse.d.ts +8 -0
  226. package/dist/docx/numbering-parse.d.ts.map +1 -0
  227. package/dist/docx/numbering-parts.d.ts +4 -0
  228. package/dist/docx/numbering-parts.d.ts.map +1 -0
  229. package/dist/docx/numbering-text.d.ts +20 -0
  230. package/dist/docx/numbering-text.d.ts.map +1 -0
  231. package/dist/docx/numbering-write.d.ts +5 -0
  232. package/dist/docx/numbering-write.d.ts.map +1 -0
  233. package/dist/docx/package-parts.d.ts +4 -0
  234. package/dist/docx/package-parts.d.ts.map +1 -0
  235. package/dist/docx/page-background.d.ts +9 -0
  236. package/dist/docx/page-background.d.ts.map +1 -0
  237. package/dist/docx/page-borders.d.ts +9 -0
  238. package/dist/docx/page-borders.d.ts.map +1 -0
  239. package/dist/docx/paragraph-alignment.d.ts +21 -0
  240. package/dist/docx/paragraph-alignment.d.ts.map +1 -0
  241. package/dist/docx/paragraph-styles.d.ts +15 -0
  242. package/dist/docx/paragraph-styles.d.ts.map +1 -0
  243. package/dist/docx/parse-diagnostics.d.ts +10 -0
  244. package/dist/docx/parse-diagnostics.d.ts.map +1 -0
  245. package/dist/docx/parse-revisions.d.ts +36 -0
  246. package/dist/docx/parse-revisions.d.ts.map +1 -0
  247. package/dist/docx/parse-table.d.ts +5 -0
  248. package/dist/docx/parse-table.d.ts.map +1 -0
  249. package/dist/docx/parse-warnings.d.ts +9 -0
  250. package/dist/docx/parse-warnings.d.ts.map +1 -0
  251. package/dist/docx/parse.d.ts +13 -0
  252. package/dist/docx/parse.d.ts.map +1 -0
  253. package/dist/docx/part-relationships.d.ts +12 -0
  254. package/dist/docx/part-relationships.d.ts.map +1 -0
  255. package/dist/docx/relationship-allocator.d.ts +32 -0
  256. package/dist/docx/relationship-allocator.d.ts.map +1 -0
  257. package/dist/docx/relationships.d.ts +3 -0
  258. package/dist/docx/relationships.d.ts.map +1 -0
  259. package/dist/docx/resolve-table.d.ts +8 -0
  260. package/dist/docx/resolve-table.d.ts.map +1 -0
  261. package/dist/docx/revision-commands.d.ts +27 -0
  262. package/dist/docx/revision-commands.d.ts.map +1 -0
  263. package/dist/docx/revision-ids.d.ts +10 -0
  264. package/dist/docx/revision-ids.d.ts.map +1 -0
  265. package/dist/docx/run-formatting.d.ts +16 -0
  266. package/dist/docx/run-formatting.d.ts.map +1 -0
  267. package/dist/docx/run-properties.d.ts +5 -0
  268. package/dist/docx/run-properties.d.ts.map +1 -0
  269. package/dist/docx/run-style-model.d.ts +21 -0
  270. package/dist/docx/run-style-model.d.ts.map +1 -0
  271. package/dist/docx/save.d.ts +5 -0
  272. package/dist/docx/save.d.ts.map +1 -0
  273. package/dist/docx/section-model.d.ts +97 -0
  274. package/dist/docx/section-model.d.ts.map +1 -0
  275. package/dist/docx/sections.d.ts +18 -0
  276. package/dist/docx/sections.d.ts.map +1 -0
  277. package/dist/docx/settings.d.ts +11 -0
  278. package/dist/docx/settings.d.ts.map +1 -0
  279. package/dist/docx/simple-types.d.ts +37 -0
  280. package/dist/docx/simple-types.d.ts.map +1 -0
  281. package/dist/docx/style-numbering-package.d.ts +11 -0
  282. package/dist/docx/style-numbering-package.d.ts.map +1 -0
  283. package/dist/docx/tab-stops.d.ts +8 -0
  284. package/dist/docx/tab-stops.d.ts.map +1 -0
  285. package/dist/docx/table-borders.d.ts +15 -0
  286. package/dist/docx/table-borders.d.ts.map +1 -0
  287. package/dist/docx/table-cell-write.d.ts +12 -0
  288. package/dist/docx/table-cell-write.d.ts.map +1 -0
  289. package/dist/docx/table-defaults.d.ts +20 -0
  290. package/dist/docx/table-defaults.d.ts.map +1 -0
  291. package/dist/docx/table-model.d.ts +101 -0
  292. package/dist/docx/table-model.d.ts.map +1 -0
  293. package/dist/docx/table-of-contents.d.ts +67 -0
  294. package/dist/docx/table-of-contents.d.ts.map +1 -0
  295. package/dist/docx/table-of-figures.d.ts +10 -0
  296. package/dist/docx/table-of-figures.d.ts.map +1 -0
  297. package/dist/docx/table-styles.d.ts +4 -0
  298. package/dist/docx/table-styles.d.ts.map +1 -0
  299. package/dist/docx/table-visuals.d.ts +22 -0
  300. package/dist/docx/table-visuals.d.ts.map +1 -0
  301. package/dist/docx/test-support/access.d.ts +14 -0
  302. package/dist/docx/test-support/access.d.ts.map +1 -0
  303. package/dist/docx/test-support/heading-numbering-fixture.d.ts +5 -0
  304. package/dist/docx/test-support/heading-numbering-fixture.d.ts.map +1 -0
  305. package/dist/docx/test-support/restart-fixture.d.ts +17 -0
  306. package/dist/docx/test-support/restart-fixture.d.ts.map +1 -0
  307. package/dist/docx/test-support/schema-validation.d.ts +24 -0
  308. package/dist/docx/test-support/schema-validation.d.ts.map +1 -0
  309. package/dist/docx/theme-color.d.ts +16 -0
  310. package/dist/docx/theme-color.d.ts.map +1 -0
  311. package/dist/docx/theme-model.d.ts +31 -0
  312. package/dist/docx/theme-model.d.ts.map +1 -0
  313. package/dist/docx/theme.d.ts +6 -0
  314. package/dist/docx/theme.d.ts.map +1 -0
  315. package/dist/docx/underline.d.ts +5 -0
  316. package/dist/docx/underline.d.ts.map +1 -0
  317. package/dist/docx/units.d.ts +2 -0
  318. package/dist/docx/units.d.ts.map +1 -0
  319. package/dist/docx/validate-issues.d.ts +40 -0
  320. package/dist/docx/validate-issues.d.ts.map +1 -0
  321. package/dist/docx/validate-model.d.ts +8 -0
  322. package/dist/docx/validate-model.d.ts.map +1 -0
  323. package/dist/docx/validate-paragraph.d.ts +10 -0
  324. package/dist/docx/validate-paragraph.d.ts.map +1 -0
  325. package/dist/docx/validate-structure.d.ts +10 -0
  326. package/dist/docx/validate-structure.d.ts.map +1 -0
  327. package/dist/docx/watermark.d.ts +14 -0
  328. package/dist/docx/watermark.d.ts.map +1 -0
  329. package/dist/docx/write-comments.d.ts +12 -0
  330. package/dist/docx/write-comments.d.ts.map +1 -0
  331. package/dist/docx/write-drawing.d.ts +12 -0
  332. package/dist/docx/write-drawing.d.ts.map +1 -0
  333. package/dist/docx/write-header-footer.d.ts +21 -0
  334. package/dist/docx/write-header-footer.d.ts.map +1 -0
  335. package/dist/docx/write-inline.d.ts +23 -0
  336. package/dist/docx/write-inline.d.ts.map +1 -0
  337. package/dist/docx/write-notes.d.ts +5 -0
  338. package/dist/docx/write-notes.d.ts.map +1 -0
  339. package/dist/docx/write-paragraph-decoration.d.ts +5 -0
  340. package/dist/docx/write-paragraph-decoration.d.ts.map +1 -0
  341. package/dist/docx/write-paragraph-properties.d.ts +4 -0
  342. package/dist/docx/write-paragraph-properties.d.ts.map +1 -0
  343. package/dist/docx/write-paragraph.d.ts +8 -0
  344. package/dist/docx/write-paragraph.d.ts.map +1 -0
  345. package/dist/docx/write-ranges.d.ts +42 -0
  346. package/dist/docx/write-ranges.d.ts.map +1 -0
  347. package/dist/docx/write-revisions.d.ts +10 -0
  348. package/dist/docx/write-revisions.d.ts.map +1 -0
  349. package/dist/docx/write-run-extra.d.ts +5 -0
  350. package/dist/docx/write-run-extra.d.ts.map +1 -0
  351. package/dist/docx/write-run-validation.d.ts +4 -0
  352. package/dist/docx/write-run-validation.d.ts.map +1 -0
  353. package/dist/docx/write-run.d.ts +7 -0
  354. package/dist/docx/write-run.d.ts.map +1 -0
  355. package/dist/docx/write-sections.d.ts +10 -0
  356. package/dist/docx/write-sections.d.ts.map +1 -0
  357. package/dist/docx/write-table-properties.d.ts +13 -0
  358. package/dist/docx/write-table-properties.d.ts.map +1 -0
  359. package/dist/docx/write-table.d.ts +9 -0
  360. package/dist/docx/write-table.d.ts.map +1 -0
  361. package/dist/docx/write-text-box.d.ts +15 -0
  362. package/dist/docx/write-text-box.d.ts.map +1 -0
  363. package/dist/docx/write.d.ts +25 -0
  364. package/dist/docx/write.d.ts.map +1 -0
  365. package/dist/docx/xml.d.ts +14 -0
  366. package/dist/docx/xml.d.ts.map +1 -0
  367. package/dist/docx/zip-parts.d.ts +5 -0
  368. package/dist/docx/zip-parts.d.ts.map +1 -0
  369. package/dist/geometry/adjustment-aware-shapes.d.ts +63 -0
  370. package/dist/geometry/adjustment-aware-shapes.d.ts.map +1 -0
  371. package/dist/geometry/callout-geometry.d.ts +65 -0
  372. package/dist/geometry/callout-geometry.d.ts.map +1 -0
  373. package/dist/geometry/cloud-bezier-paths.d.ts +55 -0
  374. package/dist/geometry/cloud-bezier-paths.d.ts.map +1 -0
  375. package/dist/geometry/com-avlst-ground-truth.d.ts +48 -0
  376. package/dist/geometry/com-avlst-ground-truth.d.ts.map +1 -0
  377. package/dist/geometry/connector-elbow-geometry.d.ts +41 -0
  378. package/dist/geometry/connector-elbow-geometry.d.ts.map +1 -0
  379. package/dist/geometry/guide-formula-api.d.ts +55 -0
  380. package/dist/geometry/guide-formula-api.d.ts.map +1 -0
  381. package/dist/geometry/guide-formula-eval.d.ts +85 -0
  382. package/dist/geometry/guide-formula-eval.d.ts.map +1 -0
  383. package/dist/geometry/index.cjs +15031 -0
  384. package/dist/geometry/index.d.ts +80 -0
  385. package/dist/geometry/index.d.ts.map +1 -0
  386. package/dist/geometry/index.mjs +14897 -0
  387. package/dist/geometry/indexed.d.ts +6 -0
  388. package/dist/geometry/indexed.d.ts.map +1 -0
  389. package/dist/geometry/preset-clip-paths-core.d.ts +20 -0
  390. package/dist/geometry/preset-clip-paths-core.d.ts.map +1 -0
  391. package/dist/geometry/preset-clip-paths-extended.d.ts +19 -0
  392. package/dist/geometry/preset-clip-paths-extended.d.ts.map +1 -0
  393. package/dist/geometry/preset-connection-sites-action-buttons.d.ts +14 -0
  394. package/dist/geometry/preset-connection-sites-action-buttons.d.ts.map +1 -0
  395. package/dist/geometry/preset-connection-sites-arrows-curved.d.ts +12 -0
  396. package/dist/geometry/preset-connection-sites-arrows-curved.d.ts.map +1 -0
  397. package/dist/geometry/preset-connection-sites-arrows-misc.d.ts +13 -0
  398. package/dist/geometry/preset-connection-sites-arrows-misc.d.ts.map +1 -0
  399. package/dist/geometry/preset-connection-sites-arrows.d.ts +13 -0
  400. package/dist/geometry/preset-connection-sites-arrows.d.ts.map +1 -0
  401. package/dist/geometry/preset-connection-sites-basic-a.d.ts +12 -0
  402. package/dist/geometry/preset-connection-sites-basic-a.d.ts.map +1 -0
  403. package/dist/geometry/preset-connection-sites-basic-b.d.ts +12 -0
  404. package/dist/geometry/preset-connection-sites-basic-b.d.ts.map +1 -0
  405. package/dist/geometry/preset-connection-sites-braces.d.ts +12 -0
  406. package/dist/geometry/preset-connection-sites-braces.d.ts.map +1 -0
  407. package/dist/geometry/preset-connection-sites-callouts-arrow.d.ts +14 -0
  408. package/dist/geometry/preset-connection-sites-callouts-arrow.d.ts.map +1 -0
  409. package/dist/geometry/preset-connection-sites-callouts-basic.d.ts +12 -0
  410. package/dist/geometry/preset-connection-sites-callouts-basic.d.ts.map +1 -0
  411. package/dist/geometry/preset-connection-sites-circular-arrow.d.ts +14 -0
  412. package/dist/geometry/preset-connection-sites-circular-arrow.d.ts.map +1 -0
  413. package/dist/geometry/preset-connection-sites-flowchart.d.ts +19 -0
  414. package/dist/geometry/preset-connection-sites-flowchart.d.ts.map +1 -0
  415. package/dist/geometry/preset-connection-sites-gear9.d.ts +12 -0
  416. package/dist/geometry/preset-connection-sites-gear9.d.ts.map +1 -0
  417. package/dist/geometry/preset-connection-sites-left-circular-arrow.d.ts +12 -0
  418. package/dist/geometry/preset-connection-sites-left-circular-arrow.d.ts.map +1 -0
  419. package/dist/geometry/preset-connection-sites-left-right-circular-arrow.d.ts +13 -0
  420. package/dist/geometry/preset-connection-sites-left-right-circular-arrow.d.ts.map +1 -0
  421. package/dist/geometry/preset-connection-sites-math.d.ts +12 -0
  422. package/dist/geometry/preset-connection-sites-math.d.ts.map +1 -0
  423. package/dist/geometry/preset-connection-sites-misc.d.ts +14 -0
  424. package/dist/geometry/preset-connection-sites-misc.d.ts.map +1 -0
  425. package/dist/geometry/preset-connection-sites-polygons.d.ts +12 -0
  426. package/dist/geometry/preset-connection-sites-polygons.d.ts.map +1 -0
  427. package/dist/geometry/preset-connection-sites-quads.d.ts +14 -0
  428. package/dist/geometry/preset-connection-sites-quads.d.ts.map +1 -0
  429. package/dist/geometry/preset-connection-sites-rects.d.ts +14 -0
  430. package/dist/geometry/preset-connection-sites-rects.d.ts.map +1 -0
  431. package/dist/geometry/preset-connection-sites-ribbons.d.ts +12 -0
  432. package/dist/geometry/preset-connection-sites-ribbons.d.ts.map +1 -0
  433. package/dist/geometry/preset-connection-sites-stars.d.ts +13 -0
  434. package/dist/geometry/preset-connection-sites-stars.d.ts.map +1 -0
  435. package/dist/geometry/preset-connection-sites-table.d.ts +23 -0
  436. package/dist/geometry/preset-connection-sites-table.d.ts.map +1 -0
  437. package/dist/geometry/preset-connection-sites-tabs.d.ts +11 -0
  438. package/dist/geometry/preset-connection-sites-tabs.d.ts.map +1 -0
  439. package/dist/geometry/preset-connection-sites-types.d.ts +52 -0
  440. package/dist/geometry/preset-connection-sites-types.d.ts.map +1 -0
  441. package/dist/geometry/preset-geometry-names.d.ts +53 -0
  442. package/dist/geometry/preset-geometry-names.d.ts.map +1 -0
  443. package/dist/geometry/preset-shape-clip-paths.d.ts +13 -0
  444. package/dist/geometry/preset-shape-clip-paths.d.ts.map +1 -0
  445. package/dist/geometry/preset-shape-definitions-action-buttons.d.ts +45 -0
  446. package/dist/geometry/preset-shape-definitions-action-buttons.d.ts.map +1 -0
  447. package/dist/geometry/preset-shape-definitions-arrow-callouts.d.ts +55 -0
  448. package/dist/geometry/preset-shape-definitions-arrow-callouts.d.ts.map +1 -0
  449. package/dist/geometry/preset-shape-definitions-arrows-refined.d.ts +45 -0
  450. package/dist/geometry/preset-shape-definitions-arrows-refined.d.ts.map +1 -0
  451. package/dist/geometry/preset-shape-definitions-arrows.d.ts +52 -0
  452. package/dist/geometry/preset-shape-definitions-arrows.d.ts.map +1 -0
  453. package/dist/geometry/preset-shape-definitions-chart-marks.d.ts +23 -0
  454. package/dist/geometry/preset-shape-definitions-chart-marks.d.ts.map +1 -0
  455. package/dist/geometry/preset-shape-definitions-cloud-callout.d.ts +28 -0
  456. package/dist/geometry/preset-shape-definitions-cloud-callout.d.ts.map +1 -0
  457. package/dist/geometry/preset-shape-definitions-connectors-brackets.d.ts +37 -0
  458. package/dist/geometry/preset-shape-definitions-connectors-brackets.d.ts.map +1 -0
  459. package/dist/geometry/preset-shape-definitions-curved-arrows-connectors.d.ts +43 -0
  460. package/dist/geometry/preset-shape-definitions-curved-arrows-connectors.d.ts.map +1 -0
  461. package/dist/geometry/preset-shape-definitions-curved-arrows-exact.d.ts +30 -0
  462. package/dist/geometry/preset-shape-definitions-curved-arrows-exact.d.ts.map +1 -0
  463. package/dist/geometry/preset-shape-definitions-flowchart.d.ts +29 -0
  464. package/dist/geometry/preset-shape-definitions-flowchart.d.ts.map +1 -0
  465. package/dist/geometry/preset-shape-definitions-gear6.d.ts +38 -0
  466. package/dist/geometry/preset-shape-definitions-gear6.d.ts.map +1 -0
  467. package/dist/geometry/preset-shape-definitions-gear9.d.ts +24 -0
  468. package/dist/geometry/preset-shape-definitions-gear9.d.ts.map +1 -0
  469. package/dist/geometry/preset-shape-definitions-misc.d.ts +38 -0
  470. package/dist/geometry/preset-shape-definitions-misc.d.ts.map +1 -0
  471. package/dist/geometry/preset-shape-definitions-rects-snips.d.ts +28 -0
  472. package/dist/geometry/preset-shape-definitions-rects-snips.d.ts.map +1 -0
  473. package/dist/geometry/preset-shape-definitions-scrolls-accent-callouts.d.ts +45 -0
  474. package/dist/geometry/preset-shape-definitions-scrolls-accent-callouts.d.ts.map +1 -0
  475. package/dist/geometry/preset-shape-definitions-table.d.ts +121 -0
  476. package/dist/geometry/preset-shape-definitions-table.d.ts.map +1 -0
  477. package/dist/geometry/preset-shape-definitions-tabs-decorations.d.ts +48 -0
  478. package/dist/geometry/preset-shape-definitions-tabs-decorations.d.ts.map +1 -0
  479. package/dist/geometry/preset-shape-definitions.d.ts +28 -0
  480. package/dist/geometry/preset-shape-definitions.d.ts.map +1 -0
  481. package/dist/geometry/preset-shape-paths.d.ts +13 -0
  482. package/dist/geometry/preset-shape-paths.d.ts.map +1 -0
  483. package/dist/geometry/preset-shape-types.d.ts +33 -0
  484. package/dist/geometry/preset-shape-types.d.ts.map +1 -0
  485. package/dist/geometry/preset-text-rect-action-buttons.d.ts +13 -0
  486. package/dist/geometry/preset-text-rect-action-buttons.d.ts.map +1 -0
  487. package/dist/geometry/preset-text-rect-arrows.d.ts +3 -0
  488. package/dist/geometry/preset-text-rect-arrows.d.ts.map +1 -0
  489. package/dist/geometry/preset-text-rect-braces.d.ts +3 -0
  490. package/dist/geometry/preset-text-rect-braces.d.ts.map +1 -0
  491. package/dist/geometry/preset-text-rect-callouts.d.ts +3 -0
  492. package/dist/geometry/preset-text-rect-callouts.d.ts.map +1 -0
  493. package/dist/geometry/preset-text-rect-circular-arrows.d.ts +3 -0
  494. package/dist/geometry/preset-text-rect-circular-arrows.d.ts.map +1 -0
  495. package/dist/geometry/preset-text-rect-flowchart.d.ts +3 -0
  496. package/dist/geometry/preset-text-rect-flowchart.d.ts.map +1 -0
  497. package/dist/geometry/preset-text-rect-misc-a.d.ts +3 -0
  498. package/dist/geometry/preset-text-rect-misc-a.d.ts.map +1 -0
  499. package/dist/geometry/preset-text-rect-misc-b.d.ts +3 -0
  500. package/dist/geometry/preset-text-rect-misc-b.d.ts.map +1 -0
  501. package/dist/geometry/preset-text-rect-polygons.d.ts +3 -0
  502. package/dist/geometry/preset-text-rect-polygons.d.ts.map +1 -0
  503. package/dist/geometry/preset-text-rect-quads.d.ts +3 -0
  504. package/dist/geometry/preset-text-rect-quads.d.ts.map +1 -0
  505. package/dist/geometry/preset-text-rect-ribbons.d.ts +3 -0
  506. package/dist/geometry/preset-text-rect-ribbons.d.ts.map +1 -0
  507. package/dist/geometry/preset-text-rect-stars.d.ts +3 -0
  508. package/dist/geometry/preset-text-rect-stars.d.ts.map +1 -0
  509. package/dist/geometry/preset-text-rect-table.d.ts +20 -0
  510. package/dist/geometry/preset-text-rect-table.d.ts.map +1 -0
  511. package/dist/geometry/preset-text-rect-tabs.d.ts +3 -0
  512. package/dist/geometry/preset-text-rect-tabs.d.ts.map +1 -0
  513. package/dist/geometry/preset-text-rect-types.d.ts +46 -0
  514. package/dist/geometry/preset-text-rect-types.d.ts.map +1 -0
  515. package/dist/geometry/shape-boolean-clipping.d.ts +70 -0
  516. package/dist/geometry/shape-boolean-clipping.d.ts.map +1 -0
  517. package/dist/geometry/shape-boolean-ops.d.ts +142 -0
  518. package/dist/geometry/shape-boolean-ops.d.ts.map +1 -0
  519. package/dist/geometry/shape-boolean-svg.d.ts +31 -0
  520. package/dist/geometry/shape-boolean-svg.d.ts.map +1 -0
  521. package/dist/geometry/shape-boolean-types.d.ts +91 -0
  522. package/dist/geometry/shape-boolean-types.d.ts.map +1 -0
  523. package/dist/geometry/shape-boolean-union.d.ts +79 -0
  524. package/dist/geometry/shape-boolean-union.d.ts.map +1 -0
  525. package/dist/geometry/shape-boolean.d.ts +22 -0
  526. package/dist/geometry/shape-boolean.d.ts.map +1 -0
  527. package/dist/geometry/shape-definitions-extended.d.ts +18 -0
  528. package/dist/geometry/shape-definitions-extended.d.ts.map +1 -0
  529. package/dist/geometry/shape-definitions-primary.d.ts +19 -0
  530. package/dist/geometry/shape-definitions-primary.d.ts.map +1 -0
  531. package/dist/index.cjs +16618 -0
  532. package/dist/index.d.ts +7 -0
  533. package/dist/index.d.ts.map +1 -0
  534. package/dist/index.mjs +16611 -0
  535. package/dist/opc/content-types.d.ts +14 -0
  536. package/dist/opc/content-types.d.ts.map +1 -0
  537. package/dist/opc/index.cjs +228 -0
  538. package/dist/opc/index.d.ts +6 -0
  539. package/dist/opc/index.d.ts.map +1 -0
  540. package/dist/opc/index.mjs +212 -0
  541. package/dist/opc/package.d.ts +14 -0
  542. package/dist/opc/package.d.ts.map +1 -0
  543. package/dist/opc/relationship-types.d.ts +34 -0
  544. package/dist/opc/relationship-types.d.ts.map +1 -0
  545. package/dist/opc/relationships.d.ts +29 -0
  546. package/dist/opc/relationships.d.ts.map +1 -0
  547. package/dist/opc/safe-href.d.ts +3 -0
  548. package/dist/opc/safe-href.d.ts.map +1 -0
  549. package/dist/pptx/chunks/index-CojJtI77.d.ts +9627 -0
  550. package/dist/pptx/chunks/index-CojJtI77.d.ts.map +1 -0
  551. package/dist/pptx/chunks/signature-inspection-status-Bh2oap7B.d.ts +220 -0
  552. package/dist/pptx/chunks/signature-inspection-status-Bh2oap7B.d.ts.map +1 -0
  553. package/dist/pptx/chunks/text-operations-IlJiffp7.d.ts +11122 -0
  554. package/dist/pptx/chunks/text-operations-IlJiffp7.d.ts.map +1 -0
  555. package/dist/pptx/cli/index.cjs +138457 -0
  556. package/dist/pptx/cli/index.d.ts +139 -0
  557. package/dist/pptx/cli/index.d.ts.map +1 -0
  558. package/dist/pptx/cli/index.mjs +138424 -0
  559. package/dist/pptx/converter/index.cjs +32084 -0
  560. package/dist/pptx/converter/index.d.ts +2 -0
  561. package/dist/pptx/converter/index.mjs +32060 -0
  562. package/dist/pptx/index.cjs +172307 -0
  563. package/dist/pptx/index.d.ts +9692 -0
  564. package/dist/pptx/index.d.ts.map +1 -0
  565. package/dist/pptx/index.mjs +171623 -0
  566. package/dist/pptx/signature-node/index.cjs +1299 -0
  567. package/dist/pptx/signature-node/index.d.ts +172 -0
  568. package/dist/pptx/signature-node/index.d.ts.map +1 -0
  569. package/dist/pptx/signature-node/index.mjs +1236 -0
  570. package/dist/units/constants.d.ts +13 -0
  571. package/dist/units/constants.d.ts.map +1 -0
  572. package/dist/units/index.cjs +76 -0
  573. package/dist/units/index.d.ts +3 -0
  574. package/dist/units/index.d.ts.map +1 -0
  575. package/dist/units/index.mjs +45 -0
  576. package/dist/units/units.d.ts +52 -0
  577. package/dist/units/units.d.ts.map +1 -0
  578. package/dist/xml/index.cjs +98 -0
  579. package/dist/xml/index.d.ts +3 -0
  580. package/dist/xml/index.d.ts.map +1 -0
  581. package/dist/xml/index.mjs +85 -0
  582. package/dist/xml/namespaces.d.ts +47 -0
  583. package/dist/xml/namespaces.d.ts.map +1 -0
  584. package/dist/xml/xml.d.ts +31 -0
  585. package/dist/xml/xml.d.ts.map +1 -0
  586. package/package.json +192 -0
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2025-present pptx-viewer contributors
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,3 @@
1
+ ooxml-core contains modern OOXML modules extracted from ChristopherVR/docx-viewer and ChristopherVR/pptx-viewer, Copyright ChristopherVR, licensed under the Apache License, Version 2.0. The Apache License text is included in LICENSE. PROVENANCE.md records where each module came from.
2
+
3
+ The pptx area also contains PowerPoint glyph-advance measurements (font-advance-widths*.generated.ts: numeric widths measured through COM automation; no font software is included). Third-party runtime dependencies are listed in THIRD-PARTY-LICENSES.
package/README.md ADDED
@@ -0,0 +1,125 @@
1
+ <div align="center">
2
+
3
+ # ooxml-core
4
+
5
+ **Read, edit, validate and write Office Open XML documents in TypeScript.**
6
+ One package, one XML model, every format: Word, PowerPoint and the shared building blocks beneath them. Spreadsheets, Visio and more are planned.
7
+
8
+ [![license](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
9
+ [![CI](https://github.com/ChristopherVR/ooxml/actions/workflows/ci.yml/badge.svg)](https://github.com/ChristopherVR/ooxml/actions/workflows/ci.yml)
10
+ [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
11
+
12
+ [**Try the apps**](https://christophervr.github.io/ooxml/) &nbsp;&middot;&nbsp;
13
+ [**Packages and areas**](#one-package-many-areas) &nbsp;&middot;&nbsp;
14
+ [**Install**](#install) &nbsp;&middot;&nbsp;
15
+ [**Examples**](#examples) &nbsp;&middot;&nbsp;
16
+ [**Roadmap**](#roadmap) &nbsp;&middot;&nbsp;
17
+ [**Contributing**](CONTRIBUTING.md)
18
+
19
+ </div>
20
+
21
+ ## Why ooxml-core?
22
+
23
+ - **No UI, no framework.** Everything runs in browsers, Node.js, Bun, workers and serverless functions. The viewer apps ([docx-viewer](https://github.com/ChristopherVR/docx-viewer), [pptx-viewer](https://github.com/ChristopherVR/pptx-viewer)) are thin interfaces on top of it, and so can your application be.
24
+ - **One package, one structure.** All formats share the same XML model, packaging layer, units, colours and geometry. Each format is an _area_ of this one package, not a separate dependency to keep in step.
25
+ - **Round-trips without losing what it does not understand.** Documents are loaded into a model, edited, and written back. Untouched parts stay byte-for-byte, unknown markup is preserved, and edits that would damage unsupported content are rejected instead of silently dropped.
26
+ - **Strict by default.** New code is strict TypeScript with branded measurement units, the shared `xml` area parses strictly (no DTD or entity expansion), and the `docx` area is checked against the ECMA-376 schemas in the test suite.
27
+ - **Honest about its limits.** Unsupported features are reported, never hidden, and nothing here claims Office parity or lossless export without evidence.
28
+
29
+ ## One package, many areas
30
+
31
+ `ooxml-core` is a **single published package**. Every area is a subpath import, so you only load what you use, and the formats are symmetrical: `docx` and `pptx` are each imported through their own subpaths, and the root entry groups only the shared building blocks by namespace.
32
+
33
+ ```ts
34
+ import { parseXml } from 'ooxml-core/xml'; // one area
35
+ import { xml, opc } from 'ooxml-core'; // or by namespace (shared building blocks)
36
+ ```
37
+
38
+ | Area | What it is |
39
+ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
40
+ | `xml` | The shared XML model: strict DOM parsing and serialization, namespaces, namespace-aware helpers. |
41
+ | `opc` | Open Packaging Conventions: relationships, content types, part paths, zip helpers, safe hyperlinks. |
42
+ | `units` | Branded EMU, twip and point types, constants and conversions. |
43
+ | `color` | Hex, RGB, HSL and linear colour primitives, OOXML percent and angle parsing. |
44
+ | `geometry` | DrawingML preset shapes, connection sites, clip paths, callouts and boolean shape operations. |
45
+ | `diagram` | SmartArt (DiagramML), format-neutral: data model, layout/colour/quick-style parts, the cached `dsp:drawing` shape tree, relationship resolution and a loader. Used by `docx`; `pptx` re-imports its parsers. |
46
+ | `collab` | Format-neutral real-time collaboration on Yjs: session and provider lifecycle, awareness/presence, transport-neutral sync (WebSocket, in-memory, any byte channel), update codecs, ordering helpers, asset sync and the product adapter seam. See `docs/collab-area.md`. |
47
+ | `docx` | WordprocessingML: model, parser, preserving serializer, editing, validation. Also `/docx/embedded`. `/docx/layout` is the DOM-free pagination engine (an approximation of Word, not parity) and `/docx/load` detects and loads DOCX and legacy .doc (ole2 inlined). |
48
+ | `pptx` | PresentationML: model, parser, serializer, editing, charts, SmartArt, converters, CLI, signatures. Subpaths `/pptx/converter`, `/pptx/cli`, `/pptx/signature-node`. |
49
+
50
+ Legacy binary formats (`.doc`, `.xls`, `.ppt`) and the compound-file container live in the sibling package [`ole2`](https://github.com/ChristopherVR/ole2); this package never contains binary codecs, and `ole2` never contains modern OOXML.
51
+
52
+ ## Install
53
+
54
+ ```bash
55
+ npm install ooxml-core
56
+ ```
57
+
58
+ Optional peer dependencies enable specific features: `node-forge` and `xml-crypto` for digital signatures (`/pptx/signature-node`), and `@napi-rs/canvas` for server-side rasterisation.
59
+
60
+ ## Examples
61
+
62
+ **Open a Word document, change it, save it**
63
+
64
+ ```ts
65
+ import { loadDocx } from 'ooxml-core/docx';
66
+
67
+ const loaded = await loadDocx(bytes); // Uint8Array | ArrayBuffer
68
+ loaded.model.blocks; // paragraphs and tables
69
+ const edited = await loaded.save(); // original package parts are preserved
70
+ ```
71
+
72
+ **Build or edit a PowerPoint deck**
73
+
74
+ ```ts
75
+ import { PptxHandler } from 'ooxml-core/pptx';
76
+
77
+ const { handler, data, createSlide } = await PptxHandler.create({ title: 'Quarterly Review' });
78
+ data.slides.push(
79
+ createSlide().addText('Hello World', { x: 100, y: 100, width: 600, height: 80 }).build(),
80
+ );
81
+ const bytes = await handler.save(data.slides); // a valid .pptx
82
+ ```
83
+
84
+ **Work at the package level**
85
+
86
+ ```ts
87
+ import { parseXml } from 'ooxml-core/xml';
88
+ import { parseRelationships, resolvePartPath } from 'ooxml-core/opc';
89
+
90
+ const rels = parseRelationships(relsXml);
91
+ const part = resolvePartPath('word/document.xml', rels.get('rId5')!.target);
92
+ ```
93
+
94
+ ## Roadmap
95
+
96
+ The shared areas come first, then more formats on the same foundation:
97
+
98
+ - **Shared layers:** DrawingML (fills, lines, effects, text, theme), charts, diagrams (SmartArt), maths, encryption primitives and schema-generated types, each as an area, written once for every format.
99
+ - **More formats:** `xlsx` (SpreadsheetML), Visio (`.vsdx`, also an OPC package), and further Office Open XML parts as they are needed. Each arrives as its own area.
100
+ - **One XML model:** the `pptx` area still uses its own XML object model and is compiled with relaxed TypeScript flags while it is migrated onto the shared `xml` area and tightened. New code is strict.
101
+ - **Collaboration:** the Yjs and sync protocol that the viewers share will live here as a `collab` area.
102
+
103
+ ## Development
104
+
105
+ You need [Bun](https://bun.sh/) and Node.js 22 or newer.
106
+
107
+ ```bash
108
+ bun install
109
+ bun run typecheck # strict project and the pptx project
110
+ bun run test
111
+ bun run build
112
+ bun run test:package # packs the build and imports every entry point from a clean install
113
+ ```
114
+
115
+ The working agreements are in [AGENTS.md](AGENTS.md), and [PROVENANCE.md](PROVENANCE.md) records where each module came from.
116
+
117
+ ## Related projects
118
+
119
+ - [docx-viewer](https://github.com/ChristopherVR/docx-viewer) and [pptx-viewer](https://github.com/ChristopherVR/pptx-viewer): the editors and viewers built on this package.
120
+ - [OOXML Office](https://christophervr.github.io/ooxml/): the suite's launcher page (`site/`), which opens the demos those viewers deploy to their own GitHub Pages sites.
121
+ - [ole2](https://github.com/ChristopherVR/ole2): the compound-file container and legacy binary Office codecs.
122
+
123
+ ## License
124
+
125
+ [Apache-2.0](LICENSE). Third-party notices are in [NOTICE](NOTICE) and [THIRD-PARTY-LICENSES](THIRD-PARTY-LICENSES).
@@ -0,0 +1,26 @@
1
+ Third-Party Licenses
2
+ ====================
3
+
4
+ Runtime dependencies of ooxml-core (installed from npm, not
5
+ copied into this repository) and the legacy Office codecs inlined into the
6
+ pptx bundle. Licenses as declared by the versions resolved in bun.lock.
7
+
8
+ jszip (MIT OR GPL-3.0-or-later; used under MIT) https://github.com/Stuk/jszip
9
+ fast-xml-parser MIT https://github.com/NaturalIntelligence/fast-xml-parser
10
+ @xmldom/xmldom MIT https://github.com/xmldom/xmldom
11
+ utif MIT https://github.com/photopea/UTIF.js
12
+ pako (via utif) (MIT AND Zlib) https://github.com/nodeca/pako
13
+ emf-converter Apache-2.0 https://github.com/ChristopherVR/pptx-viewer
14
+ mtx-decompressor MPL-2.0 https://github.com/ChristopherVR/pptx-viewer
15
+ @christophervr/ole2 Apache-2.0 (inlined in the pptx bundle) https://github.com/ChristopherVR/ole2
16
+
17
+ Optional peer dependencies (not installed by default):
18
+
19
+ node-forge (BSD-3-Clause OR GPL-2.0; used under BSD-3) https://github.com/digitalbazaar/forge
20
+ xml-crypto MIT https://github.com/node-saml/xml-crypto
21
+ @napi-rs/canvas MIT https://github.com/Brooooooklyn/canvas
22
+
23
+ mtx-decompressor is a port of libeot (https://github.com/nicowilliams/libeot) by
24
+ Brennan T. Vincent, licensed under MPL-2.0. It stays a separate package; its
25
+ source is available at the URL above under the Mozilla Public License 2.0
26
+ (https://mozilla.org/MPL/2.0/).
@@ -0,0 +1,42 @@
1
+ /** Structural view of a `Y.Map` (a real `Y.Map` satisfies it). */
2
+ export interface YMapLike {
3
+ get: (key: string) => unknown;
4
+ set: (key: string, value: unknown) => void;
5
+ delete: (key: string) => void;
6
+ forEach: (cb: (value: unknown, key: string) => void) => void;
7
+ }
8
+ export interface AssetSpec {
9
+ /** Name of the root Y.Map holding the payloads (for example `pptx:assets`). */
10
+ mapName: string;
11
+ /** Field name to the ref-pointer key stored on the owner's map (`mediaData` to `_mdRef`). */
12
+ fields: Readonly<Record<string, string>>;
13
+ /** Suffix of the per-field version counter; defaults to `__v`. */
14
+ versionSuffix?: string;
15
+ }
16
+ export interface AssetSync {
17
+ readonly spec: AssetSpec;
18
+ /** Fields routed through the asset map. */
19
+ isAssetField: (field: string) => boolean;
20
+ /** Whether `key` is one of the ref-pointer keys this spec owns. */
21
+ isRefKey: (key: string) => boolean;
22
+ /** Whether `key` is an internal version counter (never a model field). */
23
+ isVersionKey: (key: string) => boolean;
24
+ assetKey: (ownerId: string, field: string) => string;
25
+ getMap: (doc: {
26
+ getMap: (name: string) => YMapLike;
27
+ }) => YMapLike;
28
+ /**
29
+ * Write present asset fields of `record` into `assets`, storing only a ref on `owner`. Never reads
30
+ * `owner`, so it is safe on a brand-new, not yet integrated map (Yjs throws on reading one).
31
+ */
32
+ write: (ownerId: string, record: Record<string, unknown>, owner: YMapLike, assets: YMapLike) => void;
33
+ /**
34
+ * Variant for an already integrated owner: skips redundant sets, bumps the version counter on an
35
+ * in-place payload swap, and clears the ref and the payload when the field was removed.
36
+ */
37
+ reconcile: (ownerId: string, record: Record<string, unknown>, owner: YMapLike, assets: YMapLike) => void;
38
+ /** Rehydrate the asset fields referenced by `owner` onto `target`. */
39
+ read: (owner: YMapLike, assets: YMapLike, target: Record<string, unknown>) => void;
40
+ }
41
+ export declare function createAssetSync(spec: AssetSpec): AssetSync;
42
+ //# sourceMappingURL=assets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/collab/assets.ts"],"names":[],"mappings":"AAWA,kEAAkE;AAClE,MAAM,WAAW,QAAQ;IACxB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAC9B,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,KAAK,IAAI,CAAC;CAC7D;AAED,MAAM,WAAW,SAAS;IACzB,+EAA+E;IAC/E,OAAO,EAAE,MAAM,CAAC;IAChB,6FAA6F;IAC7F,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACzC,kEAAkE;IAClE,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,SAAS;IACzB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,2CAA2C;IAC3C,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACzC,mEAAmE;IACnE,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IACnC,0EAA0E;IAC1E,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IACvC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACrD,MAAM,EAAE,CAAC,GAAG,EAAE;QAAE,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,QAAQ,CAAA;KAAE,KAAK,QAAQ,CAAC;IAClE;;;OAGG;IACH,KAAK,EAAE,CACN,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,KAAK,EAAE,QAAQ,EACf,MAAM,EAAE,QAAQ,KACZ,IAAI,CAAC;IACV;;;OAGG;IACH,SAAS,EAAE,CACV,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,KAAK,EAAE,QAAQ,EACf,MAAM,EAAE,QAAQ,KACZ,IAAI,CAAC;IACV,sEAAsE;IACtE,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACnF;AAKD,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,CAwD1D"}
@@ -0,0 +1,65 @@
1
+ import { type PresenceIdentity } from './presence.js';
2
+ /** The slice of y-protocols `Awareness` the publisher needs; the real class satisfies it. */
3
+ export interface AwarenessLike {
4
+ clientID?: number;
5
+ setLocalStateField: (field: string, value: unknown) => void;
6
+ getStates: () => Map<number, Record<string, unknown>>;
7
+ on: (event: string, cb: (...args: never[]) => void) => void;
8
+ off?: (event: string, cb: (...args: never[]) => void) => void;
9
+ }
10
+ export interface PresencePublisher<S extends object> {
11
+ /** Merge a partial state patch and publish (throttled; a no-op patch is dropped). */
12
+ update: (patch: Partial<S>) => void;
13
+ /** Re-publish immediately (heartbeat). Never dropped, or peers would time us out. */
14
+ flush: () => void;
15
+ /** Cancel any pending throttled publish. */
16
+ dispose: () => void;
17
+ }
18
+ export interface PresencePublisherOptions {
19
+ throttleMs?: number;
20
+ now?: () => number;
21
+ }
22
+ /**
23
+ * Throttled writer of the local `presence` awareness field: identity (fixed) merged with the
24
+ * product payload `S` (cursor, selection, page...). Leading edge plus a trailing flush; patches that
25
+ * change nothing never reach the wire (they would re-stamp `lastUpdated` and re-render every peer).
26
+ * The initial presence is announced synchronously.
27
+ */
28
+ export declare function createPresencePublisher<S extends object>(awareness: AwarenessLike, identity: PresenceIdentity, initial: S, options?: PresencePublisherOptions): PresencePublisher<S>;
29
+ /** The public y-protocols Awareness surface a borrowed session needs. */
30
+ export interface HostAwareness extends AwarenessLike {
31
+ clientID: number;
32
+ getLocalState: () => Record<string, unknown> | null;
33
+ setLocalState: (state: Record<string, unknown> | null) => void;
34
+ off: (event: string, cb: (...args: never[]) => void) => void;
35
+ }
36
+ /** Listener/publisher view of a host awareness, deliberately without lifecycle methods. */
37
+ export interface BorrowedAwareness extends AwarenessLike {
38
+ clientID: number;
39
+ off: (event: string, cb: (...args: never[]) => void) => void;
40
+ }
41
+ /**
42
+ * Give a presence publisher a borrowed view of a host-owned awareness. Only the `presence` field
43
+ * last written through the lease is restored on dispose; unrelated host fields and later host
44
+ * presence writes are preserved, and a departed host is never brought back by viewer cleanup.
45
+ */
46
+ export declare function borrowAwareness(host: HostAwareness): {
47
+ awareness: BorrowedAwareness;
48
+ dispose: () => void;
49
+ };
50
+ /** Withdraw the local awareness state so peers drop us at once (call before destroying the provider). */
51
+ export declare function clearLocalAwareness(awareness: {
52
+ setLocalState?: (state: null) => void;
53
+ } | null | undefined): void;
54
+ /** The slice of an `Awareness` needed to drop a departed peer locally. */
55
+ export interface AwarenessStatesLike {
56
+ clientID?: number;
57
+ states?: Map<number, Record<string, unknown>>;
58
+ emit?: (name: string, args: unknown[]) => void;
59
+ }
60
+ /**
61
+ * Drop `clients` from `awareness` locally and notify its observers, mirroring y-protocols'
62
+ * `removeAwarenessStates` for remote clients. Returns the ids actually removed.
63
+ */
64
+ export declare function removeAwarenessStatesLocally(awareness: AwarenessStatesLike | null | undefined, clients: readonly number[]): number[];
65
+ //# sourceMappingURL=awareness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"awareness.d.ts","sourceRoot":"","sources":["../../src/collab/awareness.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,gBAAgB,EAAyC,MAAM,eAAe,CAAC;AAE7F,6FAA6F;AAC7F,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5D,SAAS,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACtD,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,IAAI,KAAK,IAAI,CAAC;IAC5D,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,IAAI,KAAK,IAAI,CAAC;CAC9D;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,MAAM;IAClD,qFAAqF;IACrF,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IACpC,qFAAqF;IACrF,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,4CAA4C;IAC5C,OAAO,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,MAAM,EACvD,SAAS,EAAE,aAAa,EACxB,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,EAAE,CAAC,EACV,OAAO,GAAE,wBAA6B,GACpC,iBAAiB,CAAC,CAAC,CAAC,CA4CtB;AAED,yEAAyE;AACzE,MAAM,WAAW,aAAc,SAAQ,aAAa;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACpD,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/D,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,IAAI,KAAK,IAAI,CAAC;CAC7D;AAED,2FAA2F;AAC3F,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACvD,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,IAAI,KAAK,IAAI,CAAC;CAC7D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,GAAG;IACrD,SAAS,EAAE,iBAAiB,CAAC;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;CACpB,CAuCA;AAED,yGAAyG;AACzG,wBAAgB,mBAAmB,CAClC,SAAS,EAAE;IAAE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,IAAI,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GACrE,IAAI,CAEN;AAED,0EAA0E;AAC1E,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC9C,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CAC/C;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC3C,SAAS,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,EACjD,OAAO,EAAE,SAAS,MAAM,EAAE,GACxB,MAAM,EAAE,CAUV"}
@@ -0,0 +1,36 @@
1
+ import type * as Y from 'yjs';
2
+ import { type LoadOrigin } from './policy.js';
3
+ import type { CollabSession } from './session.js';
4
+ /** Transaction origin used for the adapter's own writes, so observers can skip echoes. */
5
+ export declare const LOCAL_ORIGIN: unique symbol;
6
+ export interface DocumentAdapter<TModel> {
7
+ /** True when nothing has been seeded into the shared document yet. */
8
+ isEmpty: (doc: Y.Doc) => boolean;
9
+ /** Materialise the shared document as the product model. */
10
+ read: (doc: Y.Doc) => TModel;
11
+ /**
12
+ * Write `model` into the document inside `doc.transact(fn, origin)`. Prefer reconciling only what
13
+ * changed over replacing the whole structure so concurrent edits merge per field.
14
+ */
15
+ write: (doc: Y.Doc, model: TModel, origin: typeof LOCAL_ORIGIN) => void;
16
+ /** Observe changes (deep); return an unsubscribe. The handler receives the transaction origin. */
17
+ observe: (doc: Y.Doc, onChange: (origin: unknown) => void) => () => void;
18
+ }
19
+ export interface BindingOptions<TModel> {
20
+ /** The product's current local model, used to seed an empty room. */
21
+ getLocalModel: () => TModel;
22
+ /** The shared document changed remotely (or the room replaced the bootstrap model): adopt it. */
23
+ onRemoteModel: (model: TModel) => void;
24
+ }
25
+ export interface DocumentBinding<TModel> {
26
+ /** Publish a local edit. Returns false (and writes nothing) while writes are not allowed. */
27
+ push: (model: TModel) => boolean;
28
+ /**
29
+ * A load finished. Returns true when the room replaced it (bootstrap into a non-empty room);
30
+ * otherwise a user load is published to the room.
31
+ */
32
+ handleLoad: (origin: LoadOrigin | undefined, model: TModel) => boolean;
33
+ dispose: () => void;
34
+ }
35
+ export declare function bindDocument<TModel, P extends object>(session: CollabSession<P>, adapter: DocumentAdapter<TModel>, options: BindingOptions<TModel>): DocumentBinding<TModel>;
36
+ //# sourceMappingURL=binding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"binding.d.ts","sourceRoot":"","sources":["../../src/collab/binding.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,CAAC,MAAM,KAAK,CAAC;AAC9B,OAAO,EAAE,KAAK,UAAU,EAAyB,MAAM,aAAa,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,0FAA0F;AAC1F,eAAO,MAAM,YAAY,EAAE,OAAO,MAA0C,CAAC;AAE7E,MAAM,WAAW,eAAe,CAAC,MAAM;IACtC,sEAAsE;IACtE,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,KAAK,OAAO,CAAC;IACjC,4DAA4D;IAC5D,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,KAAK,MAAM,CAAC;IAC7B;;;OAGG;IACH,KAAK,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,YAAY,KAAK,IAAI,CAAC;IACxE,kGAAkG;IAClG,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;CACzE;AAED,MAAM,WAAW,cAAc,CAAC,MAAM;IACrC,qEAAqE;IACrE,aAAa,EAAE,MAAM,MAAM,CAAC;IAC5B,iGAAiG;IACjG,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,eAAe,CAAC,MAAM;IACtC,6FAA6F;IAC7F,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACjC;;;OAGG;IACH,UAAU,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACvE,OAAO,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,CAAC,SAAS,MAAM,EACpD,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,EACzB,OAAO,EAAE,eAAe,CAAC,MAAM,CAAC,EAChC,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,GAC7B,eAAe,CAAC,MAAM,CAAC,CAsCzB"}
@@ -0,0 +1,37 @@
1
+ import * as Y from 'yjs';
2
+ /** Default upper bound for one inbound update or snapshot (32 MiB). */
3
+ export declare const MAX_UPDATE_BYTES: number;
4
+ export type ApplyResult = {
5
+ ok: true;
6
+ } | {
7
+ ok: false;
8
+ reason: string;
9
+ };
10
+ export interface ApplyOptions {
11
+ /** Reject payloads larger than this. Default {@link MAX_UPDATE_BYTES}. */
12
+ maxBytes?: number;
13
+ /** Structurally decode the update before touching the document. Default true. */
14
+ validate?: boolean;
15
+ }
16
+ /** Encode the whole document state as one update (usable as a persisted snapshot). */
17
+ export declare function encodeSnapshot(doc: Y.Doc): Uint8Array;
18
+ /** Encode what `doc` has that a peer with state vector `peerStateVector` lacks. */
19
+ export declare function encodeDiff(doc: Y.Doc, peerStateVector?: Uint8Array): Uint8Array;
20
+ export declare function encodeStateVector(doc: Y.Doc): Uint8Array;
21
+ /**
22
+ * Check that `update` is a well-formed Yjs update without applying it. Decoding happens before any
23
+ * integration, so a payload that fails here can never half-apply (a malformed delete set would
24
+ * otherwise throw only after structs were integrated).
25
+ */
26
+ export declare function validateUpdate(update: unknown, maxBytes?: number): ApplyResult;
27
+ /** Apply a possibly hostile update; never throws, reports why a payload was rejected. */
28
+ export declare function applyUpdateSafe(doc: Y.Doc, update: unknown, origin?: unknown, options?: ApplyOptions): ApplyResult;
29
+ /** Build a fresh document from a snapshot; throws when the snapshot is invalid. */
30
+ export declare function restoreSnapshot(snapshot: Uint8Array, options?: ApplyOptions): Y.Doc;
31
+ /** Merge several updates into one without a document (compaction of an update log). */
32
+ export declare function mergeUpdates(updates: readonly Uint8Array[]): Uint8Array;
33
+ /** Base64 for transports that carry text (JSON, postMessage); works without Buffer or DOM. */
34
+ export declare function toBase64(bytes: Uint8Array): string;
35
+ /** Inverse of {@link toBase64}; returns `null` for input that is not valid base64. */
36
+ export declare function fromBase64(text: string): Uint8Array | null;
37
+ //# sourceMappingURL=codec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../src/collab/codec.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,uEAAuE;AACvE,eAAO,MAAM,gBAAgB,QAAmB,CAAC;AAEjD,MAAM,MAAM,WAAW,GAAG;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvE,MAAM,WAAW,YAAY;IAC5B,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,sFAAsF;AACtF,wBAAgB,cAAc,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,GAAG,UAAU,CAErD;AAED,mFAAmF;AACnF,wBAAgB,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,eAAe,CAAC,EAAE,UAAU,GAAG,UAAU,CAE/E;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,GAAG,UAAU,CAExD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAE,MAAyB,GAAG,WAAW,CAchG;AAED,yFAAyF;AACzF,wBAAgB,eAAe,CAC9B,GAAG,EAAE,CAAC,CAAC,GAAG,EACV,MAAM,EAAE,OAAO,EACf,MAAM,CAAC,EAAE,OAAO,EAChB,OAAO,GAAE,YAAiB,GACxB,WAAW,CAiBb;AAED,mFAAmF;AACnF,wBAAgB,eAAe,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,GAAE,YAAiB,GAAG,CAAC,CAAC,GAAG,CAQvF;AAED,uFAAuF;AACvF,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,GAAG,UAAU,CAEvE;AAID,8FAA8F;AAC9F,wBAAgB,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAKlD;AAED,sFAAsF;AACtF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAS1D"}
@@ -0,0 +1,11 @@
1
+ export type Unsubscribe = () => void;
2
+ export declare class Emitter<Events extends {
3
+ [K in keyof Events]: unknown;
4
+ }> {
5
+ private readonly listeners;
6
+ on<K extends keyof Events>(event: K, listener: (payload: Events[K]) => void): Unsubscribe;
7
+ off<K extends keyof Events>(event: K, listener: (payload: Events[K]) => void): void;
8
+ emit<K extends keyof Events>(event: K, payload: Events[K]): void;
9
+ clear(): void;
10
+ }
11
+ //# sourceMappingURL=emitter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emitter.d.ts","sourceRoot":"","sources":["../../src/collab/emitter.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC;AAErC,qBAAa,OAAO,CAAC,MAAM,SAAS;KAAG,CAAC,IAAI,MAAM,MAAM,GAAG,OAAO;CAAE;IACnE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA0D;IAEpF,EAAE,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,WAAW;IAOzF,GAAG,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,IAAI;IAInF,IAAI,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAahE,KAAK,IAAI,IAAI;CAGb"}
@@ -0,0 +1,50 @@
1
+ import type * as Y from 'yjs';
2
+ import type { HostAwareness } from './awareness.js';
3
+ import type { ConnectionStatus, SyncProvider } from './provider.js';
4
+ /** The event surface shared by y-websocket and y-webrtc providers. */
5
+ export interface YjsProviderLike {
6
+ on: (event: string, listener: (payload: never) => void) => void;
7
+ off?: (event: string, listener: (payload: never) => void) => void;
8
+ connect?: () => void;
9
+ disconnect?: () => void;
10
+ destroy?: () => void;
11
+ /** y-websocket: socket currently open. */
12
+ wsconnected?: boolean;
13
+ /** y-websocket: `synced`; y-webrtc: `synced`. */
14
+ synced?: boolean;
15
+ /** y-webrtc: `connected`. */
16
+ connected?: boolean;
17
+ /** y-websocket: `wsconnecting`. */
18
+ wsconnecting?: boolean;
19
+ }
20
+ /**
21
+ * Wrap a y-websocket or y-webrtc provider as a {@link SyncProvider}. Status maps from the
22
+ * provider's `status` events (`{status}` for y-websocket, `{connected}` for y-webrtc) and
23
+ * `connection-error`; `synced` from `sync` (y-websocket) or `synced` (y-webrtc). The wrapper owns
24
+ * the provider: `destroy` destroys it.
25
+ */
26
+ export declare function adaptYjsProvider(provider: YjsProviderLike): SyncProvider;
27
+ /** Connection state a host reports for a borrowed session. */
28
+ export interface ExternalSnapshot {
29
+ status: ConnectionStatus;
30
+ /**
31
+ * The host has loaded the authoritative document and permits local edits. Never inferred from
32
+ * `status` and never opened by a timeout; keep true while offline to allow ordinary offline edits.
33
+ */
34
+ synced: boolean;
35
+ }
36
+ /** Host-owned Yjs resources. The host creates, connects and destroys them. */
37
+ export interface ExternalSession {
38
+ readonly doc: Y.Doc;
39
+ /** Must belong to `doc`. One viewer publishes presence at a time. */
40
+ readonly awareness: HostAwareness;
41
+ getSnapshot: () => ExternalSnapshot;
42
+ /** Subscribe to status or synced changes; returns an unsubscribe function. */
43
+ subscribe: (listener: () => void) => () => void;
44
+ }
45
+ /**
46
+ * Observe a host-owned session. Subscribes before reading so a sync that completes during
47
+ * attachment is not lost; the initial snapshot is delivered synchronously, then only changes.
48
+ */
49
+ export declare function observeExternalSession(session: ExternalSession, onSnapshot: (snapshot: ExternalSnapshot) => void): () => void;
50
+ //# sourceMappingURL=external-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"external-provider.d.ts","sourceRoot":"","sources":["../../src/collab/external-provider.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,CAAC,MAAM,KAAK,CAAC;AAE9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAkB,YAAY,EAAE,MAAM,eAAe,CAAC;AAEpF,sEAAsE;AACtE,MAAM,WAAW,eAAe;IAC/B,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,KAAK,KAAK,IAAI,KAAK,IAAI,CAAC;IAChE,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,KAAK,KAAK,IAAI,KAAK,IAAI,CAAC;IAClE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iDAAiD;IACjD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mCAAmC;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,YAAY,CAyDxE;AAED,8DAA8D;AAC9D,MAAM,WAAW,gBAAgB;IAChC,MAAM,EAAE,gBAAgB,CAAC;IACzB;;;OAGG;IACH,MAAM,EAAE,OAAO,CAAC;CAChB;AAED,8EAA8E;AAC9E,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC;IACpB,qEAAqE;IACrE,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;IAClC,WAAW,EAAE,MAAM,gBAAgB,CAAC;IACpC,8EAA8E;IAC9E,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;CAChD;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACrC,OAAO,EAAE,eAAe,EACxB,UAAU,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,IAAI,GAC9C,MAAM,IAAI,CA0BZ"}