velo-text 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (490) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/LICENSE +21 -0
  3. package/README.md +122 -0
  4. package/dist/adapters/backend/index.d.ts +4 -0
  5. package/dist/adapters/backend/index.d.ts.map +1 -0
  6. package/dist/adapters/backend/index.js +3 -0
  7. package/dist/adapters/backend/index.js.map +1 -0
  8. package/dist/adapters/backend/pdf-http.d.ts +48 -0
  9. package/dist/adapters/backend/pdf-http.d.ts.map +1 -0
  10. package/dist/adapters/backend/pdf-http.js +117 -0
  11. package/dist/adapters/backend/pdf-http.js.map +1 -0
  12. package/dist/adapters/backend/sinks.d.ts +7 -0
  13. package/dist/adapters/backend/sinks.d.ts.map +1 -0
  14. package/dist/adapters/backend/sinks.js +43 -0
  15. package/dist/adapters/backend/sinks.js.map +1 -0
  16. package/dist/adapters/browser/index.d.ts +11 -0
  17. package/dist/adapters/browser/index.d.ts.map +1 -0
  18. package/dist/adapters/browser/index.js +51 -0
  19. package/dist/adapters/browser/index.js.map +1 -0
  20. package/dist/adapters/postgres-contract/index.d.ts +45 -0
  21. package/dist/adapters/postgres-contract/index.d.ts.map +1 -0
  22. package/dist/adapters/postgres-contract/index.js +108 -0
  23. package/dist/adapters/postgres-contract/index.js.map +1 -0
  24. package/dist/adapters/s3-compatible/index.d.ts +46 -0
  25. package/dist/adapters/s3-compatible/index.d.ts.map +1 -0
  26. package/dist/adapters/s3-compatible/index.js +106 -0
  27. package/dist/adapters/s3-compatible/index.js.map +1 -0
  28. package/dist/adapters/vanilla.d.ts +5 -0
  29. package/dist/adapters/vanilla.d.ts.map +1 -0
  30. package/dist/adapters/vanilla.js +6 -0
  31. package/dist/adapters/vanilla.js.map +1 -0
  32. package/dist/assets/dimensions/index.d.ts +12 -0
  33. package/dist/assets/dimensions/index.d.ts.map +1 -0
  34. package/dist/assets/dimensions/index.js +46 -0
  35. package/dist/assets/dimensions/index.js.map +1 -0
  36. package/dist/assets/hashing/index.d.ts +7 -0
  37. package/dist/assets/hashing/index.d.ts.map +1 -0
  38. package/dist/assets/hashing/index.js +21 -0
  39. package/dist/assets/hashing/index.js.map +1 -0
  40. package/dist/assets/icons/index.d.ts +25 -0
  41. package/dist/assets/icons/index.d.ts.map +1 -0
  42. package/dist/assets/icons/index.js +107 -0
  43. package/dist/assets/icons/index.js.map +1 -0
  44. package/dist/assets/png/placeholder.d.ts +4 -0
  45. package/dist/assets/png/placeholder.d.ts.map +1 -0
  46. package/dist/assets/png/placeholder.js +13 -0
  47. package/dist/assets/png/placeholder.js.map +1 -0
  48. package/dist/assets/sniff/index.d.ts +13 -0
  49. package/dist/assets/sniff/index.d.ts.map +1 -0
  50. package/dist/assets/sniff/index.js +41 -0
  51. package/dist/assets/sniff/index.js.map +1 -0
  52. package/dist/assets/store/index.d.ts +56 -0
  53. package/dist/assets/store/index.d.ts.map +1 -0
  54. package/dist/assets/store/index.js +102 -0
  55. package/dist/assets/store/index.js.map +1 -0
  56. package/dist/assets/svg/index.d.ts +7 -0
  57. package/dist/assets/svg/index.d.ts.map +1 -0
  58. package/dist/assets/svg/index.js +82 -0
  59. package/dist/assets/svg/index.js.map +1 -0
  60. package/dist/core/equation/html.d.ts +3 -0
  61. package/dist/core/equation/html.d.ts.map +1 -0
  62. package/dist/core/equation/html.js +138 -0
  63. package/dist/core/equation/html.js.map +1 -0
  64. package/dist/core/equation/index.d.ts +19 -0
  65. package/dist/core/equation/index.d.ts.map +1 -0
  66. package/dist/core/equation/index.js +107 -0
  67. package/dist/core/equation/index.js.map +1 -0
  68. package/dist/core/events/index.d.ts +13 -0
  69. package/dist/core/events/index.d.ts.map +1 -0
  70. package/dist/core/events/index.js +18 -0
  71. package/dist/core/events/index.js.map +1 -0
  72. package/dist/core/history/history.d.ts +29 -0
  73. package/dist/core/history/history.d.ts.map +1 -0
  74. package/dist/core/history/history.js +55 -0
  75. package/dist/core/history/history.js.map +1 -0
  76. package/dist/core/history/index.d.ts +2 -0
  77. package/dist/core/history/index.d.ts.map +1 -0
  78. package/dist/core/history/index.js +2 -0
  79. package/dist/core/history/index.js.map +1 -0
  80. package/dist/core/model/block.d.ts +121 -0
  81. package/dist/core/model/block.d.ts.map +1 -0
  82. package/dist/core/model/block.js +2 -0
  83. package/dist/core/model/block.js.map +1 -0
  84. package/dist/core/model/document.d.ts +70 -0
  85. package/dist/core/model/document.d.ts.map +1 -0
  86. package/dist/core/model/document.js +2 -0
  87. package/dist/core/model/document.js.map +1 -0
  88. package/dist/core/model/factories.d.ts +35 -0
  89. package/dist/core/model/factories.d.ts.map +1 -0
  90. package/dist/core/model/factories.js +115 -0
  91. package/dist/core/model/factories.js.map +1 -0
  92. package/dist/core/model/index.d.ts +4 -0
  93. package/dist/core/model/index.d.ts.map +1 -0
  94. package/dist/core/model/index.js +4 -0
  95. package/dist/core/model/index.js.map +1 -0
  96. package/dist/core/model/inline.d.ts +43 -0
  97. package/dist/core/model/inline.d.ts.map +1 -0
  98. package/dist/core/model/inline.js +2 -0
  99. package/dist/core/model/inline.js.map +1 -0
  100. package/dist/core/model/primitives.d.ts +36 -0
  101. package/dist/core/model/primitives.d.ts.map +1 -0
  102. package/dist/core/model/primitives.js +3 -0
  103. package/dist/core/model/primitives.js.map +1 -0
  104. package/dist/core/model/table-look.d.ts +12 -0
  105. package/dist/core/model/table-look.d.ts.map +1 -0
  106. package/dist/core/model/table-look.js +99 -0
  107. package/dist/core/model/table-look.js.map +1 -0
  108. package/dist/core/model/types.d.ts +5 -0
  109. package/dist/core/model/types.d.ts.map +1 -0
  110. package/dist/core/model/types.js +5 -0
  111. package/dist/core/model/types.js.map +1 -0
  112. package/dist/core/normalize/index.d.ts +2 -0
  113. package/dist/core/normalize/index.d.ts.map +1 -0
  114. package/dist/core/normalize/index.js +2 -0
  115. package/dist/core/normalize/index.js.map +1 -0
  116. package/dist/core/normalize/normalize.d.ts +8 -0
  117. package/dist/core/normalize/normalize.d.ts.map +1 -0
  118. package/dist/core/normalize/normalize.js +145 -0
  119. package/dist/core/normalize/normalize.js.map +1 -0
  120. package/dist/core/operations/index.d.ts +2 -0
  121. package/dist/core/operations/index.d.ts.map +1 -0
  122. package/dist/core/operations/index.js +2 -0
  123. package/dist/core/operations/index.js.map +1 -0
  124. package/dist/core/operations/operations.d.ts +53 -0
  125. package/dist/core/operations/operations.d.ts.map +1 -0
  126. package/dist/core/operations/operations.js +92 -0
  127. package/dist/core/operations/operations.js.map +1 -0
  128. package/dist/core/plugin/index.d.ts +84 -0
  129. package/dist/core/plugin/index.d.ts.map +1 -0
  130. package/dist/core/plugin/index.js +137 -0
  131. package/dist/core/plugin/index.js.map +1 -0
  132. package/dist/core/schema/canonical.d.ts +6 -0
  133. package/dist/core/schema/canonical.d.ts.map +1 -0
  134. package/dist/core/schema/canonical.js +42 -0
  135. package/dist/core/schema/canonical.js.map +1 -0
  136. package/dist/core/schema/index.d.ts +3 -0
  137. package/dist/core/schema/index.d.ts.map +1 -0
  138. package/dist/core/schema/index.js +3 -0
  139. package/dist/core/schema/index.js.map +1 -0
  140. package/dist/core/schema/validator.d.ts +23 -0
  141. package/dist/core/schema/validator.d.ts.map +1 -0
  142. package/dist/core/schema/validator.js +276 -0
  143. package/dist/core/schema/validator.js.map +1 -0
  144. package/dist/core/selection/index.d.ts +2 -0
  145. package/dist/core/selection/index.d.ts.map +1 -0
  146. package/dist/core/selection/index.js +2 -0
  147. package/dist/core/selection/index.js.map +1 -0
  148. package/dist/core/selection/selection.d.ts +12 -0
  149. package/dist/core/selection/selection.d.ts.map +1 -0
  150. package/dist/core/selection/selection.js +38 -0
  151. package/dist/core/selection/selection.js.map +1 -0
  152. package/dist/editor-web/accessibility/index.d.ts +40 -0
  153. package/dist/editor-web/accessibility/index.d.ts.map +1 -0
  154. package/dist/editor-web/accessibility/index.js +170 -0
  155. package/dist/editor-web/accessibility/index.js.map +1 -0
  156. package/dist/editor-web/clipboard/index.d.ts +52 -0
  157. package/dist/editor-web/clipboard/index.d.ts.map +1 -0
  158. package/dist/editor-web/clipboard/index.js +154 -0
  159. package/dist/editor-web/clipboard/index.js.map +1 -0
  160. package/dist/editor-web/controller/column-presets.d.ts +9 -0
  161. package/dist/editor-web/controller/column-presets.d.ts.map +1 -0
  162. package/dist/editor-web/controller/column-presets.js +11 -0
  163. package/dist/editor-web/controller/column-presets.js.map +1 -0
  164. package/dist/editor-web/controller/column-resize.d.ts +6 -0
  165. package/dist/editor-web/controller/column-resize.d.ts.map +1 -0
  166. package/dist/editor-web/controller/column-resize.js +119 -0
  167. package/dist/editor-web/controller/column-resize.js.map +1 -0
  168. package/dist/editor-web/controller/columns-ui.d.ts +5 -0
  169. package/dist/editor-web/controller/columns-ui.d.ts.map +1 -0
  170. package/dist/editor-web/controller/columns-ui.js +107 -0
  171. package/dist/editor-web/controller/columns-ui.js.map +1 -0
  172. package/dist/editor-web/controller/commands.d.ts +27 -0
  173. package/dist/editor-web/controller/commands.d.ts.map +1 -0
  174. package/dist/editor-web/controller/commands.js +198 -0
  175. package/dist/editor-web/controller/commands.js.map +1 -0
  176. package/dist/editor-web/controller/format-commands.d.ts +12 -0
  177. package/dist/editor-web/controller/format-commands.d.ts.map +1 -0
  178. package/dist/editor-web/controller/format-commands.js +77 -0
  179. package/dist/editor-web/controller/format-commands.js.map +1 -0
  180. package/dist/editor-web/controller/handles.d.ts +7 -0
  181. package/dist/editor-web/controller/handles.d.ts.map +1 -0
  182. package/dist/editor-web/controller/handles.js +205 -0
  183. package/dist/editor-web/controller/handles.js.map +1 -0
  184. package/dist/editor-web/controller/host.d.ts +8 -0
  185. package/dist/editor-web/controller/host.d.ts.map +1 -0
  186. package/dist/editor-web/controller/host.js +48 -0
  187. package/dist/editor-web/controller/host.js.map +1 -0
  188. package/dist/editor-web/controller/image-resize.d.ts +9 -0
  189. package/dist/editor-web/controller/image-resize.d.ts.map +1 -0
  190. package/dist/editor-web/controller/image-resize.js +163 -0
  191. package/dist/editor-web/controller/image-resize.js.map +1 -0
  192. package/dist/editor-web/controller/index.d.ts +6 -0
  193. package/dist/editor-web/controller/index.d.ts.map +1 -0
  194. package/dist/editor-web/controller/index.js +190 -0
  195. package/dist/editor-web/controller/index.js.map +1 -0
  196. package/dist/editor-web/controller/nesting.d.ts +27 -0
  197. package/dist/editor-web/controller/nesting.d.ts.map +1 -0
  198. package/dist/editor-web/controller/nesting.js +218 -0
  199. package/dist/editor-web/controller/nesting.js.map +1 -0
  200. package/dist/editor-web/controller/place-overlay.d.ts +6 -0
  201. package/dist/editor-web/controller/place-overlay.d.ts.map +1 -0
  202. package/dist/editor-web/controller/place-overlay.js +55 -0
  203. package/dist/editor-web/controller/place-overlay.js.map +1 -0
  204. package/dist/editor-web/controller/size-picker.d.ts +28 -0
  205. package/dist/editor-web/controller/size-picker.d.ts.map +1 -0
  206. package/dist/editor-web/controller/size-picker.js +177 -0
  207. package/dist/editor-web/controller/size-picker.js.map +1 -0
  208. package/dist/editor-web/controller/table-resize.d.ts +14 -0
  209. package/dist/editor-web/controller/table-resize.d.ts.map +1 -0
  210. package/dist/editor-web/controller/table-resize.js +178 -0
  211. package/dist/editor-web/controller/table-resize.js.map +1 -0
  212. package/dist/editor-web/controller/table-ui.d.ts +5 -0
  213. package/dist/editor-web/controller/table-ui.d.ts.map +1 -0
  214. package/dist/editor-web/controller/table-ui.js +214 -0
  215. package/dist/editor-web/controller/table-ui.js.map +1 -0
  216. package/dist/editor-web/controller/types.d.ts +95 -0
  217. package/dist/editor-web/controller/types.d.ts.map +1 -0
  218. package/dist/editor-web/controller/types.js +4 -0
  219. package/dist/editor-web/controller/types.js.map +1 -0
  220. package/dist/editor-web/controller/variable-ui.d.ts +5 -0
  221. package/dist/editor-web/controller/variable-ui.d.ts.map +1 -0
  222. package/dist/editor-web/controller/variable-ui.js +75 -0
  223. package/dist/editor-web/controller/variable-ui.js.map +1 -0
  224. package/dist/editor-web/images/index.d.ts +9 -0
  225. package/dist/editor-web/images/index.d.ts.map +1 -0
  226. package/dist/editor-web/images/index.js +18 -0
  227. package/dist/editor-web/images/index.js.map +1 -0
  228. package/dist/editor-web/index.d.ts +10 -0
  229. package/dist/editor-web/index.d.ts.map +1 -0
  230. package/dist/editor-web/index.js +10 -0
  231. package/dist/editor-web/index.js.map +1 -0
  232. package/dist/editor-web/input/index.d.ts +75 -0
  233. package/dist/editor-web/input/index.d.ts.map +1 -0
  234. package/dist/editor-web/input/index.js +151 -0
  235. package/dist/editor-web/input/index.js.map +1 -0
  236. package/dist/editor-web/tables/index.d.ts +47 -0
  237. package/dist/editor-web/tables/index.d.ts.map +1 -0
  238. package/dist/editor-web/tables/index.js +159 -0
  239. package/dist/editor-web/tables/index.js.map +1 -0
  240. package/dist/editor-web/toolbar/index.d.ts +17 -0
  241. package/dist/editor-web/toolbar/index.d.ts.map +1 -0
  242. package/dist/editor-web/toolbar/index.js +36 -0
  243. package/dist/editor-web/toolbar/index.js.map +1 -0
  244. package/dist/editor-web/ux/attach.d.ts +21 -0
  245. package/dist/editor-web/ux/attach.d.ts.map +1 -0
  246. package/dist/editor-web/ux/attach.js +61 -0
  247. package/dist/editor-web/ux/attach.js.map +1 -0
  248. package/dist/editor-web/ux/command-palette.d.ts +11 -0
  249. package/dist/editor-web/ux/command-palette.d.ts.map +1 -0
  250. package/dist/editor-web/ux/command-palette.js +135 -0
  251. package/dist/editor-web/ux/command-palette.js.map +1 -0
  252. package/dist/editor-web/ux/equation-editor.d.ts +11 -0
  253. package/dist/editor-web/ux/equation-editor.d.ts.map +1 -0
  254. package/dist/editor-web/ux/equation-editor.js +130 -0
  255. package/dist/editor-web/ux/equation-editor.js.map +1 -0
  256. package/dist/editor-web/ux/equation-palette.d.ts +11 -0
  257. package/dist/editor-web/ux/equation-palette.d.ts.map +1 -0
  258. package/dist/editor-web/ux/equation-palette.js +90 -0
  259. package/dist/editor-web/ux/equation-palette.js.map +1 -0
  260. package/dist/editor-web/ux/find-replace.d.ts +6 -0
  261. package/dist/editor-web/ux/find-replace.d.ts.map +1 -0
  262. package/dist/editor-web/ux/find-replace.js +125 -0
  263. package/dist/editor-web/ux/find-replace.js.map +1 -0
  264. package/dist/editor-web/ux/find-text.d.ts +10 -0
  265. package/dist/editor-web/ux/find-text.d.ts.map +1 -0
  266. package/dist/editor-web/ux/find-text.js +101 -0
  267. package/dist/editor-web/ux/find-text.js.map +1 -0
  268. package/dist/editor-web/ux/image-drop.d.ts +7 -0
  269. package/dist/editor-web/ux/image-drop.d.ts.map +1 -0
  270. package/dist/editor-web/ux/image-drop.js +198 -0
  271. package/dist/editor-web/ux/image-drop.js.map +1 -0
  272. package/dist/editor-web/ux/link-ui.d.ts +6 -0
  273. package/dist/editor-web/ux/link-ui.d.ts.map +1 -0
  274. package/dist/editor-web/ux/link-ui.js +50 -0
  275. package/dist/editor-web/ux/link-ui.js.map +1 -0
  276. package/dist/editor-web/ux/outline.d.ts +9 -0
  277. package/dist/editor-web/ux/outline.d.ts.map +1 -0
  278. package/dist/editor-web/ux/outline.js +48 -0
  279. package/dist/editor-web/ux/outline.js.map +1 -0
  280. package/dist/editor-web/ux/page-preview.d.ts +6 -0
  281. package/dist/editor-web/ux/page-preview.d.ts.map +1 -0
  282. package/dist/editor-web/ux/page-preview.js +90 -0
  283. package/dist/editor-web/ux/page-preview.js.map +1 -0
  284. package/dist/editor-web/ux/selection-bubble.d.ts +6 -0
  285. package/dist/editor-web/ux/selection-bubble.d.ts.map +1 -0
  286. package/dist/editor-web/ux/selection-bubble.js +79 -0
  287. package/dist/editor-web/ux/selection-bubble.js.map +1 -0
  288. package/dist/editor-web/ux/shortcuts-sheet.d.ts +6 -0
  289. package/dist/editor-web/ux/shortcuts-sheet.d.ts.map +1 -0
  290. package/dist/editor-web/ux/shortcuts-sheet.js +58 -0
  291. package/dist/editor-web/ux/shortcuts-sheet.js.map +1 -0
  292. package/dist/editor-web/view/index.d.ts +3 -0
  293. package/dist/editor-web/view/index.d.ts.map +1 -0
  294. package/dist/editor-web/view/index.js +3 -0
  295. package/dist/editor-web/view/index.js.map +1 -0
  296. package/dist/editor-web/view/parse-inlines.d.ts +15 -0
  297. package/dist/editor-web/view/parse-inlines.d.ts.map +1 -0
  298. package/dist/editor-web/view/parse-inlines.js +107 -0
  299. package/dist/editor-web/view/parse-inlines.js.map +1 -0
  300. package/dist/editor-web/view/parse.d.ts +8 -0
  301. package/dist/editor-web/view/parse.d.ts.map +1 -0
  302. package/dist/editor-web/view/parse.js +238 -0
  303. package/dist/editor-web/view/parse.js.map +1 -0
  304. package/dist/editor-web/view/reconcile.d.ts +26 -0
  305. package/dist/editor-web/view/reconcile.d.ts.map +1 -0
  306. package/dist/editor-web/view/reconcile.js +142 -0
  307. package/dist/editor-web/view/reconcile.js.map +1 -0
  308. package/dist/editor-web/view/render.d.ts +14 -0
  309. package/dist/editor-web/view/render.d.ts.map +1 -0
  310. package/dist/editor-web/view/render.js +162 -0
  311. package/dist/editor-web/view/render.js.map +1 -0
  312. package/dist/export/docx/document-xml.d.ts +3 -0
  313. package/dist/export/docx/document-xml.d.ts.map +1 -0
  314. package/dist/export/docx/document-xml.js +218 -0
  315. package/dist/export/docx/document-xml.js.map +1 -0
  316. package/dist/export/docx/package-parts.d.ts +9 -0
  317. package/dist/export/docx/package-parts.d.ts.map +1 -0
  318. package/dist/export/docx/package-parts.js +91 -0
  319. package/dist/export/docx/package-parts.js.map +1 -0
  320. package/dist/export/docx/writer.d.ts +17 -0
  321. package/dist/export/docx/writer.d.ts.map +1 -0
  322. package/dist/export/docx/writer.js +48 -0
  323. package/dist/export/docx/writer.js.map +1 -0
  324. package/dist/export/images/downsample.d.ts +19 -0
  325. package/dist/export/images/downsample.d.ts.map +1 -0
  326. package/dist/export/images/downsample.js +64 -0
  327. package/dist/export/images/downsample.js.map +1 -0
  328. package/dist/export/images/png-encode.d.ts +4 -0
  329. package/dist/export/images/png-encode.d.ts.map +1 -0
  330. package/dist/export/images/png-encode.js +86 -0
  331. package/dist/export/images/png-encode.js.map +1 -0
  332. package/dist/export/images/prepare.d.ts +22 -0
  333. package/dist/export/images/prepare.d.ts.map +1 -0
  334. package/dist/export/images/prepare.js +29 -0
  335. package/dist/export/images/prepare.js.map +1 -0
  336. package/dist/export/images/rasterize.d.ts +7 -0
  337. package/dist/export/images/rasterize.d.ts.map +1 -0
  338. package/dist/export/images/rasterize.js +62 -0
  339. package/dist/export/images/rasterize.js.map +1 -0
  340. package/dist/export/index.d.ts +45 -0
  341. package/dist/export/index.d.ts.map +1 -0
  342. package/dist/export/index.js +52 -0
  343. package/dist/export/index.js.map +1 -0
  344. package/dist/export/layout/index.d.ts +23 -0
  345. package/dist/export/layout/index.d.ts.map +1 -0
  346. package/dist/export/layout/index.js +18 -0
  347. package/dist/export/layout/index.js.map +1 -0
  348. package/dist/export/layout/layout-blocks.d.ts +5 -0
  349. package/dist/export/layout/layout-blocks.d.ts.map +1 -0
  350. package/dist/export/layout/layout-blocks.js +91 -0
  351. package/dist/export/layout/layout-blocks.js.map +1 -0
  352. package/dist/export/layout/layout-flow.d.ts +25 -0
  353. package/dist/export/layout/layout-flow.d.ts.map +1 -0
  354. package/dist/export/layout/layout-flow.js +23 -0
  355. package/dist/export/layout/layout-flow.js.map +1 -0
  356. package/dist/export/layout/layout-structured.d.ts +4 -0
  357. package/dist/export/layout/layout-structured.d.ts.map +1 -0
  358. package/dist/export/layout/layout-structured.js +153 -0
  359. package/dist/export/layout/layout-structured.js.map +1 -0
  360. package/dist/export/layout/layout-types.d.ts +35 -0
  361. package/dist/export/layout/layout-types.d.ts.map +1 -0
  362. package/dist/export/layout/layout-types.js +2 -0
  363. package/dist/export/layout/layout-types.js.map +1 -0
  364. package/dist/export/layout/pagination.d.ts +9 -0
  365. package/dist/export/layout/pagination.d.ts.map +1 -0
  366. package/dist/export/layout/pagination.js +38 -0
  367. package/dist/export/layout/pagination.js.map +1 -0
  368. package/dist/export/layout/text.d.ts +47 -0
  369. package/dist/export/layout/text.d.ts.map +1 -0
  370. package/dist/export/layout/text.js +119 -0
  371. package/dist/export/layout/text.js.map +1 -0
  372. package/dist/export/layout/units.d.ts +30 -0
  373. package/dist/export/layout/units.d.ts.map +1 -0
  374. package/dist/export/layout/units.js +55 -0
  375. package/dist/export/layout/units.js.map +1 -0
  376. package/dist/export/odt/writer.d.ts +24 -0
  377. package/dist/export/odt/writer.d.ts.map +1 -0
  378. package/dist/export/odt/writer.js +258 -0
  379. package/dist/export/odt/writer.js.map +1 -0
  380. package/dist/export/pdf/assemble.d.ts +9 -0
  381. package/dist/export/pdf/assemble.d.ts.map +1 -0
  382. package/dist/export/pdf/assemble.js +105 -0
  383. package/dist/export/pdf/assemble.js.map +1 -0
  384. package/dist/export/pdf/diagnostics.d.ts +11 -0
  385. package/dist/export/pdf/diagnostics.d.ts.map +1 -0
  386. package/dist/export/pdf/diagnostics.js +88 -0
  387. package/dist/export/pdf/diagnostics.js.map +1 -0
  388. package/dist/export/pdf/equation.d.ts +55 -0
  389. package/dist/export/pdf/equation.d.ts.map +1 -0
  390. package/dist/export/pdf/equation.js +301 -0
  391. package/dist/export/pdf/equation.js.map +1 -0
  392. package/dist/export/pdf/export-pdf.d.ts +33 -0
  393. package/dist/export/pdf/export-pdf.d.ts.map +1 -0
  394. package/dist/export/pdf/export-pdf.js +54 -0
  395. package/dist/export/pdf/export-pdf.js.map +1 -0
  396. package/dist/export/pdf/fonts.d.ts +7 -0
  397. package/dist/export/pdf/fonts.d.ts.map +1 -0
  398. package/dist/export/pdf/fonts.js +15 -0
  399. package/dist/export/pdf/fonts.js.map +1 -0
  400. package/dist/export/pdf/image.d.ts +27 -0
  401. package/dist/export/pdf/image.d.ts.map +1 -0
  402. package/dist/export/pdf/image.js +271 -0
  403. package/dist/export/pdf/image.js.map +1 -0
  404. package/dist/export/pdf/layout-pages.d.ts +9 -0
  405. package/dist/export/pdf/layout-pages.d.ts.map +1 -0
  406. package/dist/export/pdf/layout-pages.js +174 -0
  407. package/dist/export/pdf/layout-pages.js.map +1 -0
  408. package/dist/export/pdf/layout-table.d.ts +29 -0
  409. package/dist/export/pdf/layout-table.d.ts.map +1 -0
  410. package/dist/export/pdf/layout-table.js +216 -0
  411. package/dist/export/pdf/layout-table.js.map +1 -0
  412. package/dist/export/pdf/page-metrics.d.ts +11 -0
  413. package/dist/export/pdf/page-metrics.d.ts.map +1 -0
  414. package/dist/export/pdf/page-metrics.js +14 -0
  415. package/dist/export/pdf/page-metrics.js.map +1 -0
  416. package/dist/export/pdf/pdf-model.d.ts +36 -0
  417. package/dist/export/pdf/pdf-model.d.ts.map +1 -0
  418. package/dist/export/pdf/pdf-model.js +4 -0
  419. package/dist/export/pdf/pdf-model.js.map +1 -0
  420. package/dist/export/pdf/stream.d.ts +6 -0
  421. package/dist/export/pdf/stream.d.ts.map +1 -0
  422. package/dist/export/pdf/stream.js +213 -0
  423. package/dist/export/pdf/stream.js.map +1 -0
  424. package/dist/export/pdf/writer.d.ts +26 -0
  425. package/dist/export/pdf/writer.d.ts.map +1 -0
  426. package/dist/export/pdf/writer.js +31 -0
  427. package/dist/export/pdf/writer.js.map +1 -0
  428. package/dist/export/validate.d.ts +29 -0
  429. package/dist/export/validate.d.ts.map +1 -0
  430. package/dist/export/validate.js +127 -0
  431. package/dist/export/validate.js.map +1 -0
  432. package/dist/export/xml/writer.d.ts +19 -0
  433. package/dist/export/xml/writer.d.ts.map +1 -0
  434. package/dist/export/xml/writer.js +57 -0
  435. package/dist/export/xml/writer.js.map +1 -0
  436. package/dist/export/zip/crc32.d.ts +2 -0
  437. package/dist/export/zip/crc32.d.ts.map +1 -0
  438. package/dist/export/zip/crc32.js +20 -0
  439. package/dist/export/zip/crc32.js.map +1 -0
  440. package/dist/export/zip/deflate.d.ts +15 -0
  441. package/dist/export/zip/deflate.d.ts.map +1 -0
  442. package/dist/export/zip/deflate.js +28 -0
  443. package/dist/export/zip/deflate.js.map +1 -0
  444. package/dist/export/zip/index.d.ts +3 -0
  445. package/dist/export/zip/index.d.ts.map +1 -0
  446. package/dist/export/zip/index.js +3 -0
  447. package/dist/export/zip/index.js.map +1 -0
  448. package/dist/export/zip/zipWriter.d.ts +23 -0
  449. package/dist/export/zip/zipWriter.d.ts.map +1 -0
  450. package/dist/export/zip/zipWriter.js +123 -0
  451. package/dist/export/zip/zipWriter.js.map +1 -0
  452. package/dist/public-api/index.d.ts +46 -0
  453. package/dist/public-api/index.d.ts.map +1 -0
  454. package/dist/public-api/index.js +40 -0
  455. package/dist/public-api/index.js.map +1 -0
  456. package/dist/template/diagnostics/index.d.ts +8 -0
  457. package/dist/template/diagnostics/index.d.ts.map +1 -0
  458. package/dist/template/diagnostics/index.js +4 -0
  459. package/dist/template/diagnostics/index.js.map +1 -0
  460. package/dist/template/formatter/index.d.ts +9 -0
  461. package/dist/template/formatter/index.d.ts.map +1 -0
  462. package/dist/template/formatter/index.js +27 -0
  463. package/dist/template/formatter/index.js.map +1 -0
  464. package/dist/template/index.d.ts +3 -0
  465. package/dist/template/index.d.ts.map +1 -0
  466. package/dist/template/index.js +3 -0
  467. package/dist/template/index.js.map +1 -0
  468. package/dist/template/parser/parser.d.ts +42 -0
  469. package/dist/template/parser/parser.d.ts.map +1 -0
  470. package/dist/template/parser/parser.js +135 -0
  471. package/dist/template/parser/parser.js.map +1 -0
  472. package/dist/template/resolver/format.d.ts +11 -0
  473. package/dist/template/resolver/format.d.ts.map +1 -0
  474. package/dist/template/resolver/format.js +80 -0
  475. package/dist/template/resolver/format.js.map +1 -0
  476. package/dist/template/resolver/resolver.d.ts +31 -0
  477. package/dist/template/resolver/resolver.d.ts.map +1 -0
  478. package/dist/template/resolver/resolver.js +218 -0
  479. package/dist/template/resolver/resolver.js.map +1 -0
  480. package/dist/theme/index.d.ts +26 -0
  481. package/dist/theme/index.d.ts.map +1 -0
  482. package/dist/theme/index.js +87 -0
  483. package/dist/theme/index.js.map +1 -0
  484. package/package.json +110 -0
  485. package/schemas/portable-doc-v1.json +250 -0
  486. package/themes/base.css +71 -0
  487. package/themes/components.css +135 -0
  488. package/themes/editor-chrome.css +174 -0
  489. package/themes/editor-columns.css +121 -0
  490. package/themes/editor-overlays.css +464 -0
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Conformance validators — Phase 7.2 / 8.2 / 9.2
3
+ * Validates PDF xref, ODT manifest/package and DOCX relationships without external dependencies.
4
+ * Used in CI to block releases if any export produces unreadable content.
5
+ */
6
+ export interface ValidationIssue {
7
+ code: string;
8
+ severity: "error" | "warn";
9
+ message: string;
10
+ }
11
+ /**
12
+ * PDF: validate xref offsets, trailer, catalog and pages count.
13
+ * Minimal parser — checks that xref entries point to correct object offsets and that trailer Size matches.
14
+ */
15
+ export declare function validatePdf(bytes: Uint8Array): ValidationIssue[];
16
+ /**
17
+ * ODT: validate ZIP structure (mimetype first STORE), manifest completeness and well-formed XML.
18
+ */
19
+ export declare function validateOdt(bytes: Uint8Array): ValidationIssue[];
20
+ /**
21
+ * DOCX: validate [Content_Types], _rels/.rels, document.xml, rels and media.
22
+ */
23
+ export declare function validateDocx(bytes: Uint8Array): ValidationIssue[];
24
+ /**
25
+ * Golden file helpers — normalize XML for comparison (sort attributes, remove whitespace differences).
26
+ */
27
+ export declare function normalizeXml(xml: string): string;
28
+ export declare function hashBytes(bytes: Uint8Array): string;
29
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/export/validate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,eAAe,EAAE,CAsChE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,eAAe,EAAE,CAkBhE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,eAAe,EAAE,CAkBjE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAMhD;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAInD"}
@@ -0,0 +1,127 @@
1
+ /**
2
+ * Conformance validators — Phase 7.2 / 8.2 / 9.2
3
+ * Validates PDF xref, ODT manifest/package and DOCX relationships without external dependencies.
4
+ * Used in CI to block releases if any export produces unreadable content.
5
+ */
6
+ /**
7
+ * PDF: validate xref offsets, trailer, catalog and pages count.
8
+ * Minimal parser — checks that xref entries point to correct object offsets and that trailer Size matches.
9
+ */
10
+ export function validatePdf(bytes) {
11
+ const issues = [];
12
+ const text = new TextDecoder().decode(bytes);
13
+ if (!text.startsWith("%PDF-"))
14
+ issues.push({ code: "pdf-header", severity: "error", message: "Missing PDF header" });
15
+ if (!text.includes("trailer"))
16
+ issues.push({ code: "pdf-trailer", severity: "error", message: "Missing trailer" });
17
+ if (!text.includes("startxref"))
18
+ issues.push({ code: "pdf-xref", severity: "error", message: "Missing startxref" });
19
+ if (!text.includes("/Catalog"))
20
+ issues.push({ code: "pdf-catalog", severity: "error", message: "Missing Catalog" });
21
+ if (!text.includes("/Pages"))
22
+ issues.push({ code: "pdf-pages", severity: "error", message: "Missing Pages" });
23
+ // Xref entry count vs Size
24
+ const xrefMatch = text.match(/xref\s+0\s+(\d+)/);
25
+ const sizeMatch = text.match(/\/Size\s+(\d+)/);
26
+ if (xrefMatch && sizeMatch) {
27
+ const xrefCount = Number(xrefMatch[1]);
28
+ const size = Number(sizeMatch[1]);
29
+ if (xrefCount !== size)
30
+ issues.push({ code: "pdf-size-mismatch", severity: "error", message: `xref count ${xrefCount} != Size ${size}` });
31
+ }
32
+ // Check that each object offset actually points to "N 0 obj"
33
+ const xrefOffset = text.lastIndexOf("xref");
34
+ if (xrefOffset !== -1) {
35
+ const xrefSection = text.slice(xrefOffset);
36
+ const lines = xrefSection.split("\n");
37
+ // Skip first two lines: "xref" and "0 N"
38
+ for (let i = 2; i < lines.length; i++) {
39
+ const line = lines[i];
40
+ if (line.startsWith("trailer"))
41
+ break;
42
+ const m = line.match(/^(\d{10}) 00000 n/);
43
+ if (m) {
44
+ const offset = Number(m[1]);
45
+ const snippet = text.slice(offset, offset + 20);
46
+ if (!/^\d+ 0 obj/.test(snippet))
47
+ issues.push({ code: "pdf-xref-offset", severity: "error", message: `Bad xref offset ${offset} -> "${snippet.slice(0, 10)}"` });
48
+ }
49
+ }
50
+ }
51
+ return issues;
52
+ }
53
+ /**
54
+ * ODT: validate ZIP structure (mimetype first STORE), manifest completeness and well-formed XML.
55
+ */
56
+ export function validateOdt(bytes) {
57
+ const issues = [];
58
+ // Check PK header
59
+ if (bytes[0] !== 0x50 || bytes[1] !== 0x4b)
60
+ issues.push({ code: "odt-not-zip", severity: "error", message: "Not a ZIP" });
61
+ const text = new TextDecoder().decode(bytes.slice(0, 5000));
62
+ // mimetype must be first entry and contain correct string
63
+ const mimetypeIdx = text.indexOf("mimetype");
64
+ if (mimetypeIdx === -1)
65
+ issues.push({ code: "odt-mimetype-missing", severity: "error", message: "mimetype not found" });
66
+ else if (mimetypeIdx > 100)
67
+ issues.push({ code: "odt-mimetype-not-first", severity: "error", message: "mimetype not first" });
68
+ if (!text.includes("application/vnd.oasis.opendocument.text"))
69
+ issues.push({ code: "odt-mimetype-wrong", severity: "error", message: "Wrong mimetype" });
70
+ if (!text.includes("META-INF/manifest.xml"))
71
+ issues.push({ code: "odt-manifest-missing", severity: "error", message: "manifest missing" });
72
+ if (!text.includes("content.xml"))
73
+ issues.push({ code: "odt-content-missing", severity: "error", message: "content.xml missing" });
74
+ // Well-formed XML check (simple tag balance for content.xml)
75
+ const xml = text;
76
+ const openTags = (xml.match(/<[^/!?][^>]*>/g) ?? []).length;
77
+ const closeTags = (xml.match(/<\/[^>]+>/g) ?? []).length;
78
+ if (Math.abs(openTags - closeTags) > 5)
79
+ issues.push({ code: "odt-xml-unbalanced", severity: "warn", message: `Unbalanced tags open ${openTags} close ${closeTags}` });
80
+ return issues;
81
+ }
82
+ /**
83
+ * DOCX: validate [Content_Types], _rels/.rels, document.xml, rels and media.
84
+ */
85
+ export function validateDocx(bytes) {
86
+ const issues = [];
87
+ if (bytes[0] !== 0x50 || bytes[1] !== 0x4b)
88
+ issues.push({ code: "docx-not-zip", severity: "error", message: "Not a ZIP" });
89
+ const text = new TextDecoder().decode(bytes.slice(0, 8000));
90
+ if (!text.includes("[Content_Types].xml"))
91
+ issues.push({ code: "docx-content-types-missing", severity: "error", message: "Missing [Content_Types].xml" });
92
+ if (!text.includes("_rels/.rels"))
93
+ issues.push({ code: "docx-rels-missing", severity: "error", message: "Missing _rels/.rels" });
94
+ if (!text.includes("word/document.xml"))
95
+ issues.push({ code: "docx-document-missing", severity: "error", message: "Missing word/document.xml" });
96
+ if (!text.includes("w:document"))
97
+ issues.push({ code: "docx-w-document", severity: "error", message: "Missing w:document" });
98
+ // Check rels IDs are unique and targets exist
99
+ const relIds = [...text.matchAll(/Id="([^"]+)"/g)].map((m) => m[1]);
100
+ const dup = relIds.filter((id, i) => relIds.indexOf(id) !== i);
101
+ if (dup.length)
102
+ issues.push({ code: "docx-dup-rel-id", severity: "error", message: `Duplicate rel Id ${dup[0]}` });
103
+ // Check that every rId in document.xml has a matching rel (simplified: check rId_ prefix)
104
+ const rIdsInDoc = [...text.matchAll(/r:embed="([^"]+)"/g)].map((m) => m[1]);
105
+ for (const rId of rIdsInDoc) {
106
+ if (!relIds.includes(rId))
107
+ issues.push({ code: "docx-broken-rel", severity: "error", message: `Broken rel ${rId}` });
108
+ }
109
+ return issues;
110
+ }
111
+ /**
112
+ * Golden file helpers — normalize XML for comparison (sort attributes, remove whitespace differences).
113
+ */
114
+ export function normalizeXml(xml) {
115
+ return xml
116
+ .replace(/>\s+</g, "><")
117
+ .replace(/\s+/g, " ")
118
+ .replace(/\s*=\s*"/g, '="')
119
+ .trim();
120
+ }
121
+ export function hashBytes(bytes) {
122
+ let h = 0;
123
+ for (const b of bytes)
124
+ h = (h * 31 + b) >>> 0;
125
+ return h.toString(16).padStart(8, "0");
126
+ }
127
+ //# sourceMappingURL=validate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/export/validate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAiB;IAC3C,MAAM,MAAM,GAAsB,EAAE,CAAC;IACrC,MAAM,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAE7C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC,CAAC;IACrH,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;QAAE,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC,CAAC;IACnH,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;QAAE,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,CAAC,CAAC;IACpH,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;QAAE,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC,CAAC;IACpH,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,QA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C,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACzC,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * XmlWriter — Phase 8.1.1 / 9.1 centralizado
3
+ * Centralized escaping, namespaces, stable names
4
+ */
5
+ export declare class XmlWriter {
6
+ private parts;
7
+ private stack;
8
+ static escape(str: string): string;
9
+ static escapeAttr(str: string): string;
10
+ declaration(): this;
11
+ open(tag: string, attrs?: Record<string, string | number | undefined>): this;
12
+ selfClose(tag: string, attrs?: Record<string, string | number | undefined>): this;
13
+ close(): this;
14
+ text(str: string): this;
15
+ raw(str: string): this;
16
+ toString(): string;
17
+ toBytes(): Uint8Array;
18
+ }
19
+ //# sourceMappingURL=writer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../../../src/export/xml/writer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,KAAK,CAAgB;IAC7B,OAAO,CAAC,KAAK,CAAgB;IAE7B,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAGlC,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAItC,WAAW,IAAI,IAAI;IAKnB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAM,GAAG,IAAI;IAUhF,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAM,GAAG,IAAI;IASrF,KAAK,IAAI,IAAI;IAOb,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKvB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKtB,QAAQ,IAAI,MAAM;IAIlB,OAAO,IAAI,UAAU;CAGtB"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * XmlWriter — Phase 8.1.1 / 9.1 centralizado
3
+ * Centralized escaping, namespaces, stable names
4
+ */
5
+ export class XmlWriter {
6
+ parts = [];
7
+ stack = [];
8
+ static escape(str) {
9
+ return String(str).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
10
+ }
11
+ static escapeAttr(str) {
12
+ return XmlWriter.escape(str);
13
+ }
14
+ declaration() {
15
+ this.parts.push(`<?xml version="1.0" encoding="UTF-8"?>`);
16
+ return this;
17
+ }
18
+ open(tag, attrs = {}) {
19
+ const attrStr = Object.entries(attrs)
20
+ .filter(([, v]) => v != null)
21
+ .map(([k, v]) => ` ${k}="${XmlWriter.escapeAttr(String(v))}"`)
22
+ .join("");
23
+ this.parts.push(`<${tag}${attrStr}>`);
24
+ this.stack.push(tag);
25
+ return this;
26
+ }
27
+ selfClose(tag, attrs = {}) {
28
+ const attrStr = Object.entries(attrs)
29
+ .filter(([, v]) => v != null)
30
+ .map(([k, v]) => ` ${k}="${XmlWriter.escapeAttr(String(v))}"`)
31
+ .join("");
32
+ this.parts.push(`<${tag}${attrStr}/>`);
33
+ return this;
34
+ }
35
+ close() {
36
+ const tag = this.stack.pop();
37
+ if (!tag)
38
+ throw new Error("unbalanced close");
39
+ this.parts.push(`</${tag}>`);
40
+ return this;
41
+ }
42
+ text(str) {
43
+ this.parts.push(XmlWriter.escape(str));
44
+ return this;
45
+ }
46
+ raw(str) {
47
+ this.parts.push(str);
48
+ return this;
49
+ }
50
+ toString() {
51
+ return this.parts.join("");
52
+ }
53
+ toBytes() {
54
+ return new TextEncoder().encode(this.toString());
55
+ }
56
+ }
57
+ //# sourceMappingURL=writer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"writer.js","sourceRoot":"","sources":["../../../src/export/xml/writer.ts"],"names":[],"mappings":"AAAA;;;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# sourceMappingURL=crc32.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crc32.d.ts","sourceRoot":"","sources":["../../../src/export/zip/crc32.ts"],"names":[],"mappings":"AAaA,wBAAgB,KAAK,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,CAI7C"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * CRC-32 — Phase 10.6
3
+ * Self-contained implementation with no dependencies.
4
+ */
5
+ const TABLE = new Uint32Array(256);
6
+ (function init() {
7
+ for (let i = 0; i < 256; i++) {
8
+ let c = i;
9
+ for (let k = 0; k < 8; k++)
10
+ c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;
11
+ TABLE[i] = c >>> 0;
12
+ }
13
+ })();
14
+ export function crc32(buf) {
15
+ let crc = 0xffffffff;
16
+ for (let i = 0; i < buf.length; i++)
17
+ crc = TABLE[(crc ^ buf[i]) & 0xff] ^ (crc >>> 8);
18
+ return (crc ^ 0xffffffff) >>> 0;
19
+ }
20
+ //# sourceMappingURL=crc32.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crc32.js","sourceRoot":"","sources":["../../../src/export/zip/crc32.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,GAAG,CAAC,CAAC;AACnC,CAAC,SAAS,IAAI;IACZ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;QAC7B,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;YAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACzE,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;AACH,CAAC,CAAC,EAAE,CAAC;AAEL,MAAM,UAAU,KAAK,CAAC,GAAe;IACnC,IAAI,GAAG,GAAG,UAAU,CAAC;IACrB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE;QAAE,GAAG,GAAG,KAAK,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAE,CAAC,GAAG,IAAI,CAAE,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;IACxF,OAAO,CAAC,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * DEFLATE capability — Phase 10.6
3
+ * Optional compression. The project includes a STORE fallback so packages are valid without DEFLATE,
4
+ * at the cost of larger files. If a native or injected DEFLATE implementation is available, it is used.
5
+ *
6
+ * For Node, we can use zlib.deflateRawSync when available; for browsers, CompressionStream if present.
7
+ * The interface is injected to keep core zero-deps and to allow deterministic tests (no compression).
8
+ */
9
+ export interface DeflateCapability {
10
+ deflate(data: Uint8Array): Uint8Array | Promise<Uint8Array>;
11
+ method: number;
12
+ }
13
+ export declare function getNodeDeflate(): Promise<DeflateCapability | null>;
14
+ export declare function getWebDeflate(): Promise<DeflateCapability | null>;
15
+ //# sourceMappingURL=deflate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deflate.d.ts","sourceRoot":"","sources":["../../../src/export/zip/deflate.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAC5D,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAUxE;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAKvE"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * DEFLATE capability — Phase 10.6
3
+ * Optional compression. The project includes a STORE fallback so packages are valid without DEFLATE,
4
+ * at the cost of larger files. If a native or injected DEFLATE implementation is available, it is used.
5
+ *
6
+ * For Node, we can use zlib.deflateRawSync when available; for browsers, CompressionStream if present.
7
+ * The interface is injected to keep core zero-deps and to allow deterministic tests (no compression).
8
+ */
9
+ export async function getNodeDeflate() {
10
+ try {
11
+ const zlib = await import("node:zlib");
12
+ return {
13
+ method: 8,
14
+ deflate: (data) => new Uint8Array(zlib.deflateRawSync(data)),
15
+ };
16
+ }
17
+ catch {
18
+ return null;
19
+ }
20
+ }
21
+ export async function getWebDeflate() {
22
+ const g = globalThis;
23
+ if (!g.CompressionStream)
24
+ return null;
25
+ // Not implemented for MVP — would require async streaming
26
+ return null;
27
+ }
28
+ //# sourceMappingURL=deflate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deflate.js","sourceRoot":"","sources":["../../../src/export/zip/deflate.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,MAAM,CAAC,KAAK,UAAU,cAAc;IAClC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC;QACvC,OAAO;YACL,MAAM,EAAE,CAAC;YACT,OAAO,EAAE,CAAC,IAAgB,EAAE,EAAE,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;SACzE,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,MAAM,CAAC,GAAG,UAA6E,CAAC;IACxF,IAAI,CAAC,CAAC,CAAC,iBAAiB;QAAE,OAAO,IAAI,CAAC;IACtC,0DAA0D;IAC1D,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./crc32.js";
2
+ export * from "./zipWriter.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/export/zip/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./crc32.js";
2
+ export * from "./zipWriter.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/export/zip/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { BinarySink } from "../../core/model/types.js";
2
+ export interface ZipWriterOptions {
3
+ deflate?: {
4
+ deflate: (data: Uint8Array) => Uint8Array | Promise<Uint8Array>;
5
+ method: number;
6
+ };
7
+ defaultMtime?: Date;
8
+ }
9
+ export declare class ZipWriter {
10
+ private readonly opts;
11
+ private files;
12
+ constructor(opts?: ZipWriterOptions);
13
+ add(name: string, data: Uint8Array | string, opts?: {
14
+ method?: number;
15
+ mtime?: Date;
16
+ comment?: string;
17
+ }): void;
18
+ /** If DEFLATE is available and requested, compress synchronously for build() */
19
+ private getCompressed;
20
+ build(): Uint8Array;
21
+ writeToSink(sink: BinarySink): Promise<number>;
22
+ }
23
+ //# sourceMappingURL=zipWriter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zipWriter.d.ts","sourceRoot":"","sources":["../../../src/export/zip/zipWriter.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAqB5D,MAAM,WAAW,gBAAgB;IAE/B,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAE9F,YAAY,CAAC,EAAE,IAAI,CAAC;CACrB;AAED,qBAAa,SAAS;IAER,OAAO,CAAC,QAAQ,CAAC,IAAI;IADjC,OAAO,CAAC,KAAK,CAAkB;gBACF,IAAI,GAAE,gBAAqB;IAExD,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,EAAE,IAAI,GAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,IAAI,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,IAAI;IASlH,gFAAgF;IAChF,OAAO,CAAC,aAAa;IAcrB,KAAK,IAAI,UAAU;IA0Eb,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;CAMrD"}
@@ -0,0 +1,123 @@
1
+ /**
2
+ * ZipWriter — Phase 10.6
3
+ * STORE mandatory, DEFLATE optional via injected capability, streaming when sink allows.
4
+ * The mimetype entry must be first and uncompressed (STORE) for ODT compliance.
5
+ */
6
+ import { crc32 } from "./crc32.js";
7
+ function encodeUtf8(str) {
8
+ return new TextEncoder().encode(str);
9
+ }
10
+ function writeUint16LE(arr, v) {
11
+ arr.push(v & 0xff, (v >>> 8) & 0xff);
12
+ }
13
+ function writeUint32LE(arr, v) {
14
+ arr.push(v & 0xff, (v >>> 8) & 0xff, (v >>> 16) & 0xff, (v >>> 24) & 0xff);
15
+ }
16
+ export class ZipWriter {
17
+ opts;
18
+ files = [];
19
+ constructor(opts = {}) {
20
+ this.opts = opts;
21
+ }
22
+ add(name, data, opts = {}) {
23
+ let bytes = typeof data === "string" ? encodeUtf8(data) : data;
24
+ if (!(bytes instanceof Uint8Array))
25
+ bytes = new Uint8Array(bytes);
26
+ // Enforce STORE for mimetype (ODT spec)
27
+ const method = name === "mimetype" ? 0 : (opts.method ?? 0);
28
+ const crc = crc32(bytes);
29
+ this.files.push({ name, data: bytes, method, mtime: opts.mtime ?? this.opts.defaultMtime ?? new Date(), crc });
30
+ }
31
+ /** If DEFLATE is available and requested, compress synchronously for build() */
32
+ getCompressed(entry) {
33
+ if (entry.method === 8 && this.opts.deflate) {
34
+ try {
35
+ const res = this.opts.deflate.deflate(entry.data);
36
+ // If async, fallback to STORE for sync build()
37
+ if (res instanceof Promise)
38
+ return { data: entry.data, method: 0 };
39
+ return { data: res, method: 8 };
40
+ }
41
+ catch {
42
+ return { data: entry.data, method: 0 };
43
+ }
44
+ }
45
+ return { data: entry.data, method: 0 };
46
+ }
47
+ build() {
48
+ const out = [];
49
+ const central = [];
50
+ let offset = 0;
51
+ const mtimeToDos = (d) => {
52
+ const time = ((d.getHours() << 11) | (d.getMinutes() << 5) | (d.getSeconds() >> 1)) & 0xffff;
53
+ const date = (((d.getFullYear() - 1980) << 9) | ((d.getMonth() + 1) << 5) | d.getDate()) & 0xffff;
54
+ return { time, date };
55
+ };
56
+ for (const f of this.files) {
57
+ const nameBytes = encodeUtf8(f.name);
58
+ const { data: compressed, method: actualMethod } = this.getCompressed(f);
59
+ const { time, date } = mtimeToDos(f.mtime);
60
+ const localHeader = [];
61
+ writeUint32LE(localHeader, 0x04034b50);
62
+ writeUint16LE(localHeader, 20);
63
+ writeUint16LE(localHeader, 0x0800); // utf8
64
+ writeUint16LE(localHeader, actualMethod);
65
+ writeUint16LE(localHeader, time);
66
+ writeUint16LE(localHeader, date);
67
+ writeUint32LE(localHeader, f.crc);
68
+ writeUint32LE(localHeader, compressed.length); // compressed size
69
+ writeUint32LE(localHeader, f.data.length); // uncompressed size
70
+ writeUint16LE(localHeader, nameBytes.length);
71
+ writeUint16LE(localHeader, 0);
72
+ const localStart = offset;
73
+ out.push(...localHeader, ...nameBytes);
74
+ offset += localHeader.length + nameBytes.length;
75
+ out.push(...compressed);
76
+ offset += compressed.length;
77
+ const cd = [];
78
+ writeUint32LE(cd, 0x02014b50);
79
+ writeUint16LE(cd, 20);
80
+ writeUint16LE(cd, 20);
81
+ writeUint16LE(cd, 0x0800);
82
+ writeUint16LE(cd, actualMethod);
83
+ writeUint16LE(cd, time);
84
+ writeUint16LE(cd, date);
85
+ writeUint32LE(cd, f.crc);
86
+ writeUint32LE(cd, compressed.length);
87
+ writeUint32LE(cd, f.data.length);
88
+ writeUint16LE(cd, nameBytes.length);
89
+ writeUint16LE(cd, 0);
90
+ writeUint16LE(cd, 0);
91
+ writeUint16LE(cd, 0);
92
+ writeUint16LE(cd, 0);
93
+ writeUint32LE(cd, 0);
94
+ writeUint32LE(cd, localStart);
95
+ central.push({ bytes: new Uint8Array([...cd, ...nameBytes]), offset: localStart });
96
+ }
97
+ const centralStart = offset;
98
+ let centralSize = 0;
99
+ for (const c of central) {
100
+ out.push(...c.bytes);
101
+ offset += c.bytes.length;
102
+ centralSize += c.bytes.length;
103
+ }
104
+ const eocd = [];
105
+ writeUint32LE(eocd, 0x06054b50);
106
+ writeUint16LE(eocd, 0);
107
+ writeUint16LE(eocd, 0);
108
+ writeUint16LE(eocd, this.files.length);
109
+ writeUint16LE(eocd, this.files.length);
110
+ writeUint32LE(eocd, centralSize);
111
+ writeUint32LE(eocd, centralStart);
112
+ writeUint16LE(eocd, 0);
113
+ out.push(...eocd);
114
+ return new Uint8Array(out);
115
+ }
116
+ async writeToSink(sink) {
117
+ const bytes = this.build();
118
+ await sink.write(bytes);
119
+ await sink.close?.();
120
+ return bytes.length;
121
+ }
122
+ }
123
+ //# sourceMappingURL=zipWriter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zipWriter.js","sourceRoot":"","sources":["../../../src/export/zip/zipWriter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAGnC,SAAS,UAAU,CAAC,GAAW;IAC7B,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AACvC,CAAC;AACD,SAAS,aAAa,CAA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 * Public API — Phase 12.1
3
+ * Minimal exported surface
4
+ */
5
+ export { createDocument, createIdGenerator, createSystemClock, createParagraph, createHeading, createText, createVariable, createImageBlock, createTable, createEquation, createEquationBlock, createColumns, } from "../core/model/factories.js";
6
+ export { validateDocument, assertValid } from "../core/schema/validator.js";
7
+ export { canonicalStringify, canonicalBytes, contentHashHex } from "../core/schema/canonical.js";
8
+ export { normalizeDocument, isIdempotent } from "../core/normalize/normalize.js";
9
+ export { createTransaction } from "../core/operations/operations.js";
10
+ export { createCollapsedSelection, createRangeSelection, isCollapsed, mapSelectionThroughOps } from "../core/selection/selection.js";
11
+ export { History } from "../core/history/history.js";
12
+ export { parseVariableSource, tokenizeVariablesInText } from "../template/parser/parser.js";
13
+ export { safeResolve, formatValue, renderTemplate, inspectVariables } from "../template/resolver/resolver.js";
14
+ export { XmlWriter } from "../export/xml/writer.js";
15
+ export { crc32 } from "../export/zip/crc32.js";
16
+ export { ZipWriter } from "../export/zip/zipWriter.js";
17
+ export { PdfWriter } from "../export/pdf/writer.js";
18
+ export { OdtWriter } from "../export/odt/writer.js";
19
+ export { DocxWriter } from "../export/docx/writer.js";
20
+ export { exportPdf } from "../export/pdf/export-pdf.js";
21
+ export { collectPdfDiagnostics } from "../export/pdf/diagnostics.js";
22
+ export { exportDocument } from "../export/index.js";
23
+ export { sniffImage, isAllowedMediaType } from "../assets/sniff/index.js";
24
+ export { getDimensions } from "../assets/dimensions/index.js";
25
+ export { sanitizeSvg } from "../assets/svg/index.js";
26
+ export { getIconSvg, getAllIcons, iconCss } from "../assets/icons/index.js";
27
+ export { validateLatex, latexToHtml, latexToPlainText, equationCss } from "../core/equation/index.js";
28
+ export { themes, themeCss, allThemesCss } from "../theme/index.js";
29
+ export { renderDocumentToHtml, renderBlocksToHtml, reconcileDom } from "../editor-web/view/index.js";
30
+ export { createEditor, openSizePicker, openMosaicPicker, clampTableSize, placeOverlay } from "../editor-web/controller/index.js";
31
+ export { mountVanillaEditor } from "../adapters/vanilla.js";
32
+ export { createInMemoryRepository } from "../adapters/postgres-contract/index.js";
33
+ export { collectOutline } from "../editor-web/ux/outline.js";
34
+ export { findTextHits, replaceTextInDocument } from "../editor-web/ux/find-text.js";
35
+ export { COLUMN_PRESETS } from "../editor-web/controller/column-presets.js";
36
+ export { registerCommand, getCommand, listCommands } from "../editor-web/toolbar/index.js";
37
+ export { makeToolbarNavigable } from "../editor-web/accessibility/index.js";
38
+ export { intentToOperation } from "../editor-web/input/index.js";
39
+ export { registerPlugin, unregisterPlugin, getPlugin, listPlugins, getNodeTypePlugin, isPluginNodeType, validatePluginCoverage, registerNodeType, registerFormatter, } from "../core/plugin/index.js";
40
+ export type { ThemeName, ThemeTokens } from "../theme/index.js";
41
+ export type { ExportFormat, ExportRequest, ExportResult } from "../export/index.js";
42
+ export type { ExportPdfResult, PdfDiag } from "../export/pdf/export-pdf.js";
43
+ export type { IconName, IconOptions } from "../assets/icons/index.js";
44
+ export type { PluginDef } from "../core/plugin/index.js";
45
+ export type { Editor, EditorOptions } from "../editor-web/controller/types.js";
46
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/public-api/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,aAAa,GACd,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACjG,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAA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B,CAAC;AACrG,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjI,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACpF,YAAY,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC5E,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACtE,YAAY,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Public API — Phase 12.1
3
+ * Minimal exported surface
4
+ */
5
+ export { createDocument, createIdGenerator, createSystemClock, createParagraph, createHeading, createText, createVariable, createImageBlock, createTable, createEquation, createEquationBlock, createColumns, } from "../core/model/factories.js";
6
+ export { validateDocument, assertValid } from "../core/schema/validator.js";
7
+ export { canonicalStringify, canonicalBytes, contentHashHex } from "../core/schema/canonical.js";
8
+ export { normalizeDocument, isIdempotent } from "../core/normalize/normalize.js";
9
+ export { createTransaction } from "../core/operations/operations.js";
10
+ export { createCollapsedSelection, createRangeSelection, isCollapsed, mapSelectionThroughOps } from "../core/selection/selection.js";
11
+ export { History } from "../core/history/history.js";
12
+ export { parseVariableSource, tokenizeVariablesInText } from "../template/parser/parser.js";
13
+ export { safeResolve, formatValue, renderTemplate, inspectVariables } from "../template/resolver/resolver.js";
14
+ export { XmlWriter } from "../export/xml/writer.js";
15
+ export { crc32 } from "../export/zip/crc32.js";
16
+ export { ZipWriter } from "../export/zip/zipWriter.js";
17
+ export { PdfWriter } from "../export/pdf/writer.js";
18
+ export { OdtWriter } from "../export/odt/writer.js";
19
+ export { DocxWriter } from "../export/docx/writer.js";
20
+ export { exportPdf } from "../export/pdf/export-pdf.js";
21
+ export { collectPdfDiagnostics } from "../export/pdf/diagnostics.js";
22
+ export { exportDocument } from "../export/index.js";
23
+ export { sniffImage, isAllowedMediaType } from "../assets/sniff/index.js";
24
+ export { getDimensions } from "../assets/dimensions/index.js";
25
+ export { sanitizeSvg } from "../assets/svg/index.js";
26
+ export { getIconSvg, getAllIcons, iconCss } from "../assets/icons/index.js";
27
+ export { validateLatex, latexToHtml, latexToPlainText, equationCss } from "../core/equation/index.js";
28
+ export { themes, themeCss, allThemesCss } from "../theme/index.js";
29
+ export { renderDocumentToHtml, renderBlocksToHtml, reconcileDom } from "../editor-web/view/index.js";
30
+ export { createEditor, openSizePicker, openMosaicPicker, clampTableSize, placeOverlay } from "../editor-web/controller/index.js";
31
+ export { mountVanillaEditor } from "../adapters/vanilla.js";
32
+ export { createInMemoryRepository } from "../adapters/postgres-contract/index.js";
33
+ export { collectOutline } from "../editor-web/ux/outline.js";
34
+ export { findTextHits, replaceTextInDocument } from "../editor-web/ux/find-text.js";
35
+ export { COLUMN_PRESETS } from "../editor-web/controller/column-presets.js";
36
+ export { registerCommand, getCommand, listCommands } from "../editor-web/toolbar/index.js";
37
+ export { makeToolbarNavigable } from "../editor-web/accessibility/index.js";
38
+ export { intentToOperation } from "../editor-web/input/index.js";
39
+ export { registerPlugin, unregisterPlugin, getPlugin, listPlugins, getNodeTypePlugin, isPluginNodeType, validatePluginCoverage, registerNodeType, registerFormatter, } from "../core/plugin/index.js";
40
+ //# sourceMappingURL=index.js.map