@web-ppt/edit-core 0.5.0-beta.1 → 0.5.0-beta.7

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 (367) hide show
  1. package/CHANGELOG.md +188 -0
  2. package/README.md +165 -22
  3. package/dist/alt-text.d.ts +5 -0
  4. package/dist/appearance/index.d.ts +12 -0
  5. package/dist/appearance/materialize.d.ts +4 -0
  6. package/dist/appearance/types.d.ts +26 -0
  7. package/dist/appearance/values.d.ts +9 -0
  8. package/dist/appearance.js +301 -0
  9. package/dist/cfb/index.d.ts +5 -0
  10. package/dist/cfb/read.d.ts +16 -0
  11. package/dist/cfb/write.d.ts +3 -0
  12. package/dist/cfb.js +208 -0
  13. package/dist/change-classification.d.ts +3 -3
  14. package/dist/chart/category-binding.d.ts +4 -0
  15. package/dist/chart/category-commands.d.ts +23 -0
  16. package/dist/chart/category-levels.d.ts +14 -0
  17. package/dist/chart/category-matrix.d.ts +2 -0
  18. package/dist/chart/category-value.d.ts +2 -0
  19. package/dist/chart/category-workbook.d.ts +13 -0
  20. package/dist/chart/commands.d.ts +28 -0
  21. package/dist/chart/context.d.ts +12 -0
  22. package/dist/chart/dataset-merge.d.ts +5 -0
  23. package/dist/chart/formula.d.ts +13 -0
  24. package/dist/chart/identity-frames.d.ts +4 -0
  25. package/dist/chart/identity-scopes.d.ts +6 -0
  26. package/dist/chart/identity.d.ts +24 -0
  27. package/dist/chart/index.d.ts +8 -0
  28. package/dist/chart/limits.d.ts +6 -0
  29. package/dist/chart/locator.d.ts +4 -0
  30. package/dist/chart/materialize.d.ts +7 -0
  31. package/dist/chart/ordering.d.ts +9 -0
  32. package/dist/chart/part-graph.d.ts +5 -0
  33. package/dist/chart/patch-validation.d.ts +3 -0
  34. package/dist/chart/plot-kinds.d.ts +2 -0
  35. package/dist/chart/projection.d.ts +8 -0
  36. package/dist/chart/save.d.ts +4 -0
  37. package/dist/chart/shared-added-plan.d.ts +19 -0
  38. package/dist/chart/shared-added-records.d.ts +8 -0
  39. package/dist/chart/shared-address.d.ts +5 -0
  40. package/dist/chart/shared-allocate.d.ts +7 -0
  41. package/dist/chart/shared-cache-codec.d.ts +5 -0
  42. package/dist/chart/shared-cache-identities.d.ts +3 -0
  43. package/dist/chart/shared-cache-migration.d.ts +7 -0
  44. package/dist/chart/shared-cache-save.d.ts +3 -0
  45. package/dist/chart/shared-cache-scopes.d.ts +13 -0
  46. package/dist/chart/shared-cache.d.ts +11 -0
  47. package/dist/chart/shared-category.d.ts +4 -0
  48. package/dist/chart/shared-cell.d.ts +9 -0
  49. package/dist/chart/shared-family.d.ts +26 -0
  50. package/dist/chart/shared-fields.d.ts +18 -0
  51. package/dist/chart/shared-graph.d.ts +19 -0
  52. package/dist/chart/shared-growth-space.d.ts +5 -0
  53. package/dist/chart/shared-inserted-cells.d.ts +14 -0
  54. package/dist/chart/shared-inserted-command.d.ts +7 -0
  55. package/dist/chart/shared-inserted-layout.d.ts +16 -0
  56. package/dist/chart/shared-inserted-project.d.ts +14 -0
  57. package/dist/chart/shared-inserted-records.d.ts +16 -0
  58. package/dist/chart/shared-inserted-save.d.ts +6 -0
  59. package/dist/chart/shared-joint-command.d.ts +9 -0
  60. package/dist/chart/shared-joint-records.d.ts +9 -0
  61. package/dist/chart/shared-record-axis.d.ts +25 -0
  62. package/dist/chart/shared-record-remove.d.ts +13 -0
  63. package/dist/chart/shared-record-stage.d.ts +2 -0
  64. package/dist/chart/shared-records.d.ts +2 -0
  65. package/dist/chart/shared-rows.d.ts +17 -0
  66. package/dist/chart/shared-runtime.d.ts +19 -0
  67. package/dist/chart/shared-save-plan.d.ts +4 -0
  68. package/dist/chart/shared-save.d.ts +3 -0
  69. package/dist/chart/shared-series.d.ts +6 -0
  70. package/dist/chart/shared-source-cache.d.ts +4 -0
  71. package/dist/chart/shared-topology.d.ts +9 -0
  72. package/dist/chart/shared-unresolved.d.ts +3 -0
  73. package/dist/chart/shared-validation.d.ts +6 -0
  74. package/dist/chart/shared-workbook-source.d.ts +6 -0
  75. package/dist/chart/shared-xy-command.d.ts +7 -0
  76. package/dist/chart/shared-xy-family.d.ts +16 -0
  77. package/dist/chart/shared-xy-project.d.ts +6 -0
  78. package/dist/chart/shared-xy-records.d.ts +23 -0
  79. package/dist/chart/shared-xy-save.d.ts +5 -0
  80. package/dist/chart/shared-xy-source.d.ts +39 -0
  81. package/dist/chart/shared.d.ts +13 -0
  82. package/dist/chart/source.d.ts +11 -0
  83. package/dist/chart/types.d.ts +86 -0
  84. package/dist/chart/validation.d.ts +24 -0
  85. package/dist/chart/workbook-range.d.ts +16 -0
  86. package/dist/chart/workbook-read.d.ts +7 -0
  87. package/dist/chart/workbook-write.d.ts +9 -0
  88. package/dist/chart/workbook.d.ts +25 -0
  89. package/dist/chart/xml-data.d.ts +14 -0
  90. package/dist/chart/xml-namespaces.d.ts +16 -0
  91. package/dist/chart-design/index.d.ts +10 -0
  92. package/dist/chart-design/types.d.ts +11 -0
  93. package/dist/chart-design/xml.d.ts +2 -0
  94. package/dist/chart-design.js +361 -0
  95. package/dist/chart-ex/index.d.ts +15 -0
  96. package/dist/chart-ex/workbook.d.ts +6 -0
  97. package/dist/chart-ex/xml.d.ts +14 -0
  98. package/dist/chart-ex.js +457 -0
  99. package/dist/chart-shared/index.d.ts +12 -0
  100. package/dist/chart-shared.js +1 -0
  101. package/dist/chart.js +1 -0
  102. package/dist/clipboard-links-GuPtqr1z.js +778 -0
  103. package/dist/clipboard-package.d.ts +4 -0
  104. package/dist/clipboard-source.d.ts +6 -2
  105. package/dist/clipboard-trees.d.ts +9 -0
  106. package/dist/collaboration-identity.d.ts +3 -0
  107. package/dist/commands/add-slide-identity.d.ts +4 -0
  108. package/dist/commands/bullet-image-resource.d.ts +11 -0
  109. package/dist/commands/clear-format.d.ts +4 -0
  110. package/dist/commands/common-object-slide-patch.d.ts +4 -0
  111. package/dist/commands/common-object-slide-types.d.ts +68 -0
  112. package/dist/commands/convert-to-custom-geometry.d.ts +4 -0
  113. package/dist/commands/direct-format-patches.d.ts +11 -5
  114. package/dist/commands/distribute-elements.d.ts +4 -0
  115. package/dist/commands/edit-table-grid.d.ts +10 -0
  116. package/dist/commands/element-alt-text.d.ts +8 -0
  117. package/dist/commands/element-arrangement.d.ts +17 -0
  118. package/dist/commands/element-effects.d.ts +1 -1
  119. package/dist/commands/element-fill.d.ts +1 -1
  120. package/dist/commands/element-geometry.d.ts +9 -0
  121. package/dist/commands/element-hierarchy.d.ts +6 -0
  122. package/dist/commands/element-image-content.d.ts +2 -2
  123. package/dist/commands/element-link.d.ts +1 -1
  124. package/dist/commands/element-name.d.ts +1 -1
  125. package/dist/commands/element-stroke.d.ts +1 -1
  126. package/dist/commands/element-table-style.d.ts +5 -0
  127. package/dist/commands/element-text.d.ts +1 -1
  128. package/dist/commands/element-transform.d.ts +2 -2
  129. package/dist/commands/frame-decomposition.d.ts +10 -0
  130. package/dist/commands/generated-creation-defaults.d.ts +4 -0
  131. package/dist/commands/geometry-types.d.ts +44 -0
  132. package/dist/commands/group-types.d.ts +24 -0
  133. package/dist/commands/group.d.ts +4 -0
  134. package/dist/commands/hierarchy-record.d.ts +5 -0
  135. package/dist/commands/image-resource.d.ts +8 -1
  136. package/dist/commands/insertion-host.d.ts +16 -0
  137. package/dist/commands/insertion-rect.d.ts +2 -0
  138. package/dist/commands/layout-property.d.ts +7 -0
  139. package/dist/commands/master-property.d.ts +5 -0
  140. package/dist/commands/master-text-style-types.d.ts +27 -0
  141. package/dist/commands/master-text-style.d.ts +7 -0
  142. package/dist/commands/paste-resources.d.ts +9 -5
  143. package/dist/commands/patch-apply.d.ts +3 -0
  144. package/dist/commands/patch-count.d.ts +1 -0
  145. package/dist/commands/patch-invalidation.d.ts +4 -0
  146. package/dist/commands/patch-stage.d.ts +4 -0
  147. package/dist/commands/patch.d.ts +4 -0
  148. package/dist/commands/record-clone.d.ts +3 -0
  149. package/dist/commands/record-override.d.ts +5 -0
  150. package/dist/commands/replace-image.d.ts +6 -1
  151. package/dist/commands/sections.d.ts +10 -0
  152. package/dist/commands/set-geometry.d.ts +4 -0
  153. package/dist/commands/set-preset.d.ts +5 -0
  154. package/dist/commands/set-table-style.d.ts +3 -0
  155. package/dist/commands/slide-property-types.d.ts +55 -5
  156. package/dist/commands/slide-size.d.ts +7 -0
  157. package/dist/commands/spid.d.ts +2 -1
  158. package/dist/commands/table-grid-patch.d.ts +12 -0
  159. package/dist/commands/table-style-types.d.ts +28 -0
  160. package/dist/commands/text-target.d.ts +3 -2
  161. package/dist/commands/theme-types.d.ts +47 -0
  162. package/dist/commands/theme.d.ts +9 -0
  163. package/dist/commands/types.d.ts +219 -17
  164. package/dist/commands/ungroup-source.d.ts +3 -0
  165. package/dist/commands/ungroup.d.ts +4 -0
  166. package/dist/comments/index.d.ts +35 -0
  167. package/dist/comments/save.d.ts +3 -0
  168. package/dist/comments/state.d.ts +10 -0
  169. package/dist/comments/xml.d.ts +12 -0
  170. package/dist/comments.js +782 -0
  171. package/dist/common-object-slide-types.d.ts +34 -0
  172. package/dist/custom-geometry-path.d.ts +3 -0
  173. package/dist/custom-geometry.d.ts +12 -0
  174. package/dist/data-validation.d.ts +1 -1
  175. package/dist/describe/budget.d.ts +3 -0
  176. package/dist/describe/index.d.ts +5 -0
  177. package/dist/describe/read.d.ts +4 -0
  178. package/dist/describe/types.d.ts +103 -0
  179. package/dist/describe.js +192 -0
  180. package/dist/design-dependencies.d.ts +8 -0
  181. package/dist/design-projection-package.d.ts +10 -0
  182. package/dist/design-target.d.ts +10 -0
  183. package/dist/design.d.ts +3 -0
  184. package/dist/document-extensions.d.ts +9 -0
  185. package/dist/document.d.ts +1 -1
  186. package/dist/dynamic-projection.d.ts +6 -0
  187. package/dist/edit-core.js +5680 -3413
  188. package/dist/editor.d.ts +19 -2
  189. package/dist/element-source.d.ts +11 -0
  190. package/dist/element-spids.d.ts +4 -0
  191. package/dist/extension-address-journal.d.ts +9 -0
  192. package/dist/extension-address-remap.d.ts +14 -0
  193. package/dist/extension-addresses.d.ts +20 -0
  194. package/dist/extension-copy-history.d.ts +7 -0
  195. package/dist/extension-copy.d.ts +16 -0
  196. package/dist/extension-migration-receipt.d.ts +34 -0
  197. package/dist/extension-recovery-context.d.ts +5 -0
  198. package/dist/extension-runtime.d.ts +64 -0
  199. package/dist/generate/comments.d.ts +3 -0
  200. package/dist/generate/compatibility-parts.d.ts +14 -0
  201. package/dist/generate/compatibility-references.d.ts +3 -0
  202. package/dist/generate/compatibility.d.ts +4 -0
  203. package/dist/generate/custom-geometry.d.ts +2 -0
  204. package/dist/generate/index.d.ts +13 -0
  205. package/dist/generate/links.d.ts +3 -0
  206. package/dist/generate/master-defaults.d.ts +4 -0
  207. package/dist/generate/materialize.d.ts +2 -0
  208. package/dist/generate/math.d.ts +3 -0
  209. package/dist/generate/media.d.ts +13 -0
  210. package/dist/generate/portable-clipboard.d.ts +4 -0
  211. package/dist/generate/projection-tree.d.ts +8 -0
  212. package/dist/generate/table.d.ts +4 -0
  213. package/dist/generate/template.d.ts +70 -0
  214. package/dist/generate/text-body.d.ts +2 -0
  215. package/dist/generate/text-effects.d.ts +5 -0
  216. package/dist/generate/text-override.d.ts +8 -0
  217. package/dist/generate/validation.d.ts +3 -0
  218. package/dist/generate/warp.d.ts +2 -0
  219. package/dist/generate.js +1464 -0
  220. package/dist/history.d.ts +11 -1
  221. package/dist/hyperlink.d.ts +2 -0
  222. package/dist/identities.d.ts +4 -0
  223. package/dist/identity-allocation.d.ts +12 -0
  224. package/dist/identity-watermark.d.ts +4 -0
  225. package/dist/image-content.d.ts +5 -2
  226. package/dist/image-resource-history.d.ts +2 -0
  227. package/dist/index-C2r7c6G6.js +714 -0
  228. package/dist/index-CYDvbiwF.js +1 -0
  229. package/dist/index.d.ts +43 -7
  230. package/dist/ink/index.d.ts +27 -0
  231. package/dist/ink/model.d.ts +4 -0
  232. package/dist/ink/save.d.ts +3 -0
  233. package/dist/ink/source.d.ts +7 -0
  234. package/dist/ink.js +324 -0
  235. package/dist/layout-assets.d.ts +3 -1
  236. package/dist/layout-projection.d.ts +19 -5
  237. package/dist/layout-state.d.ts +2 -0
  238. package/dist/layout-types.d.ts +42 -0
  239. package/dist/layout.d.ts +5 -0
  240. package/dist/lint/color.d.ts +5 -0
  241. package/dist/lint/index.d.ts +7 -0
  242. package/dist/lint/prompts.d.ts +3 -0
  243. package/dist/lint/report.d.ts +21 -0
  244. package/dist/lint/sampler-batch.d.ts +4 -0
  245. package/dist/lint/sampler-images.d.ts +2 -0
  246. package/dist/lint/sampler.d.ts +9 -0
  247. package/dist/lint/snapshot.d.ts +34 -0
  248. package/dist/lint/types.d.ts +67 -0
  249. package/dist/lint-sampler.js +187 -0
  250. package/dist/lint.js +659 -0
  251. package/dist/master-state.d.ts +3 -0
  252. package/dist/master-text-style-state.d.ts +3 -0
  253. package/dist/master-types.d.ts +55 -0
  254. package/dist/master.d.ts +5 -0
  255. package/dist/media/audio-icon.d.ts +2 -0
  256. package/dist/media/commands.d.ts +3 -0
  257. package/dist/media/index.d.ts +10 -0
  258. package/dist/media/markup.d.ts +10 -0
  259. package/dist/media/mp4-boxes.d.ts +12 -0
  260. package/dist/media/mp4-fragments.d.ts +8 -0
  261. package/dist/media/mp4-samples.d.ts +4 -0
  262. package/dist/media/mp4.d.ts +2 -0
  263. package/dist/media/poster.d.ts +2 -0
  264. package/dist/media/replace-poster.d.ts +3 -0
  265. package/dist/media/resource.d.ts +4 -0
  266. package/dist/media/source.d.ts +14 -0
  267. package/dist/media/types.d.ts +33 -0
  268. package/dist/media-properties.d.ts +4 -0
  269. package/dist/media.js +1630 -0
  270. package/dist/model-invariants-BM19JVxy.js +8980 -0
  271. package/dist/object-source.d.ts +11 -0
  272. package/dist/ole/container.d.ts +14 -0
  273. package/dist/ole/content.d.ts +94 -0
  274. package/dist/ole/index.d.ts +20 -0
  275. package/dist/ole/preview.d.ts +3 -0
  276. package/dist/ole/save.d.ts +2 -0
  277. package/dist/ole/state.d.ts +16 -0
  278. package/dist/ole.js +870 -0
  279. package/dist/opc/patch.d.ts +2 -0
  280. package/dist/opc.js +1 -1
  281. package/dist/paragraph-level.d.ts +11 -0
  282. package/dist/paragraph-property-schema.d.ts +5 -2
  283. package/dist/{patch-DO8497wO.js → patch-BwhfBbYE.js} +112 -95
  284. package/dist/patch-change.d.ts +4 -0
  285. package/dist/patch-events.d.ts +16 -0
  286. package/dist/ppt/appearance.d.ts +11 -0
  287. package/dist/ppt/binary.d.ts +20 -0
  288. package/dist/ppt/drawing.d.ts +18 -0
  289. package/dist/ppt/geometry.d.ts +4 -0
  290. package/dist/ppt/index.d.ts +12 -0
  291. package/dist/ppt/pictures.d.ts +11 -0
  292. package/dist/ppt/text.d.ts +9 -0
  293. package/dist/ppt.js +774 -0
  294. package/dist/preset-geometry.d.ts +6 -0
  295. package/dist/projection.d.ts +2 -0
  296. package/dist/query-BHLjWjnu.js +903 -0
  297. package/dist/recovery-identity.d.ts +3 -1
  298. package/dist/recovery-migrations.d.ts +3 -0
  299. package/dist/recovery.d.ts +3 -0
  300. package/dist/resize/index.d.ts +6 -0
  301. package/dist/resize/text.d.ts +4 -0
  302. package/dist/resize.js +5090 -0
  303. package/dist/retained-element-origins.d.ts +6 -0
  304. package/dist/run-property-fields.d.ts +12 -0
  305. package/dist/run-property-schema.d.ts +3 -1
  306. package/dist/run-style.d.ts +15 -0
  307. package/dist/save/alt-text.d.ts +4 -0
  308. package/dist/save/comments.d.ts +3 -0
  309. package/dist/save/effects.d.ts +2 -1
  310. package/dist/save/extension-availability.d.ts +3 -0
  311. package/dist/save/extension-elements.d.ts +26 -0
  312. package/dist/save/geometry.d.ts +5 -0
  313. package/dist/save/index.d.ts +6 -1
  314. package/dist/save/insertion.d.ts +7 -3
  315. package/dist/save/layout-properties.d.ts +4 -0
  316. package/dist/save/master-properties.d.ts +5 -0
  317. package/dist/save/notes.d.ts +2 -0
  318. package/dist/save/paragraph-overrides.d.ts +3 -0
  319. package/dist/save/run-overrides.d.ts +10 -0
  320. package/dist/save/shape-format.d.ts +3 -0
  321. package/dist/save/slide-parts.d.ts +1 -0
  322. package/dist/save/table-style-part.d.ts +11 -0
  323. package/dist/save/table.d.ts +5 -0
  324. package/dist/save/text-source-less.d.ts +6 -0
  325. package/dist/save/xfrm.d.ts +8 -2
  326. package/dist/save.js +502 -1480
  327. package/dist/sections.d.ts +8 -0
  328. package/dist/session-assets.d.ts +4 -0
  329. package/dist/slide-parts-D0o_DDhi.js +1331 -0
  330. package/dist/slide-size.d.ts +6 -0
  331. package/dist/smartart/drawing.d.ts +3 -0
  332. package/dist/smartart/index.d.ts +16 -0
  333. package/dist/smartart/model.d.ts +18 -0
  334. package/dist/smartart/save.d.ts +3 -0
  335. package/dist/smartart.js +604 -0
  336. package/dist/source-retention.d.ts +7 -0
  337. package/dist/space.d.ts +37 -0
  338. package/dist/table-cell.d.ts +7 -1
  339. package/dist/table-direct-markup.d.ts +7 -1
  340. package/dist/table-grid-projection.d.ts +6 -0
  341. package/dist/table-grid.d.ts +45 -0
  342. package/dist/table-invariants.d.ts +4 -0
  343. package/dist/table-rows.d.ts +2 -1
  344. package/dist/table-scale.d.ts +4 -0
  345. package/dist/table-style.d.ts +21 -0
  346. package/dist/templates/index.d.ts +4 -0
  347. package/dist/templates/recipes.d.ts +5 -0
  348. package/dist/templates/types.d.ts +17 -0
  349. package/dist/templates.js +543 -0
  350. package/dist/text-flatten.d.ts +6 -0
  351. package/dist/text-fragment.d.ts +5 -0
  352. package/dist/text-model.d.ts +8 -8
  353. package/dist/text-override-validation.d.ts +6 -2
  354. package/dist/text-selection.d.ts +4 -0
  355. package/dist/theme-projection.d.ts +8 -0
  356. package/dist/theme-xml.d.ts +3 -0
  357. package/dist/theme.d.ts +14 -0
  358. package/dist/types.d.ts +217 -8
  359. package/dist/xml/index.d.ts +1 -1
  360. package/dist/xml/nodes.d.ts +2 -2
  361. package/dist/xml/shape-ids.d.ts +3 -0
  362. package/dist/xml.js +19 -16
  363. package/package.json +77 -5
  364. package/schemas/describe.schema.json +479 -0
  365. package/schemas/lint.schema.json +145 -0
  366. package/dist/index-D4ZTaYOa.js +0 -706
  367. package/dist/insertion-DabLme_U.js +0 -5471
@@ -0,0 +1,16 @@
1
+ import type { SharedGroup } from './shared-graph';
2
+ import type { ChartDatasetState } from './types';
3
+ import type { SharedRecordAxis } from './shared-record-axis';
4
+ import type { SharedXYAxisOwner } from './shared-xy-source';
5
+ export { sharedXYAxis } from './shared-xy-source';
6
+ export type { SharedXYOwner, SharedXYAxisOwner } from './shared-xy-source';
7
+ export interface SharedXYFamily extends SharedRecordAxis {
8
+ readonly owners: readonly SharedXYAxisOwner[];
9
+ readonly identities: ReadonlySet<string>;
10
+ readonly positions: ReadonlySet<number>;
11
+ readonly anchors: ReadonlySet<number>;
12
+ }
13
+ export declare function sharedXYFamily(shared: SharedGroup, chartId: string, seriesId: string): SharedXYFamily;
14
+ export declare function sharedXYFamilyByKey(shared: SharedGroup, key: string): SharedXYFamily;
15
+ export declare const sharedXYCell: (family: SharedRecordAxis, lane: number, axis: number) => string;
16
+ export declare const xyOwnersForState: (family: SharedXYFamily, state: ChartDatasetState) => SharedXYAxisOwner[];
@@ -0,0 +1,6 @@
1
+ import type { ChartDatasetState } from './types';
2
+ import type { SharedGroup } from './shared-graph';
3
+ import type { XYResource } from './shared-xy-records';
4
+ import type { WorkbookCellValue } from './workbook-read';
5
+ /** 每个视图只取自身来源范围内的插入;共享记录的坐标和身份由整条轴统一决定。 */
6
+ export declare function projectSharedXY(shared: SharedGroup, state: ChartDatasetState, original: ChartDatasetState, resource: XYResource, baseline: ReadonlyMap<string, WorkbookCellValue>): void;
@@ -0,0 +1,23 @@
1
+ import type { DocumentExtensionPatch } from '../commands/types';
2
+ import type { SharedGroup } from './shared-graph';
3
+ import type { SharedXYFamily } from './shared-xy-family';
4
+ import type { InsertedResource } from './shared-inserted-project';
5
+ export interface XYAxisRecords {
6
+ readonly insertions?: Readonly<Record<string, unknown>>;
7
+ readonly removed?: Readonly<Record<string, unknown>>;
8
+ }
9
+ export type SharedXYRecords = Readonly<Record<string, XYAxisRecords>>;
10
+ export interface XYResource extends InsertedResource {
11
+ readonly xyRecords?: SharedXYRecords;
12
+ }
13
+ export declare function validateXYPatch(shared: SharedGroup, patch: DocumentExtensionPatch): void;
14
+ export declare function validateXYRecords(shared: SharedGroup, records: unknown): void;
15
+ export declare function xyRecordLayout(family: SharedXYFamily, records: XYAxisRecords): {
16
+ key: (lane: number, axis: number) => string;
17
+ records: readonly import("./shared-inserted-records").InsertedRow[];
18
+ active: import("./shared-inserted-records").InsertedRow[];
19
+ deleted: number[];
20
+ originalAxis: (axis: number) => number;
21
+ insertedAxis: (row: import("./shared-inserted-records").InsertedRow) => number;
22
+ end: number;
23
+ };
@@ -0,0 +1,5 @@
1
+ import type { EditDoc } from '../types';
2
+ import type { SharedGroup } from './shared-graph';
3
+ import type { XYResource } from './shared-xy-records';
4
+ import type { WorkbookCellValue } from './workbook-read';
5
+ export declare function writeSharedXY(doc: EditDoc, shared: SharedGroup, resource: XYResource, baseline: ReadonlyMap<string, WorkbookCellValue>, write: (key: string, value: string | number | null) => void): void;
@@ -0,0 +1,39 @@
1
+ import type { SharedGroup } from './shared-graph';
2
+ import type { ChartDatasetState, ChartPointId, ChartSeriesId } from './types';
3
+ export interface SharedXYOwner {
4
+ readonly chart: SharedGroup['charts'][number];
5
+ readonly seriesId: ChartSeriesId;
6
+ readonly references: ReadonlySet<string>;
7
+ }
8
+ export interface SharedXYAxisOwner extends SharedXYOwner {
9
+ readonly positions: ReadonlyMap<ChartPointId, number>;
10
+ readonly lanes: ReadonlyMap<'x' | 'value' | 'size', number>;
11
+ readonly start: number;
12
+ readonly end: number;
13
+ }
14
+ export declare function xyOwners(shared: SharedGroup): SharedXYOwner[];
15
+ /** 空缓存和已保存的系列模板仍可从各维度位置恢复方向,不依赖活跃消费者集合。 */
16
+ export declare function sharedXYAxis(series: ChartDatasetState['series'][ChartSeriesId]): {
17
+ sheet: string;
18
+ horizontal: boolean;
19
+ };
20
+ export declare function connectedXYOwners(shared: SharedGroup, chartId: string, seriesId: string): {
21
+ target: SharedXYOwner;
22
+ selected: Set<SharedXYOwner>;
23
+ references: Set<string>;
24
+ };
25
+ export declare function xyAxisOwners(owners: readonly SharedXYOwner[], sheet: string, horizontal: boolean): {
26
+ members: {
27
+ positions: Map<ChartPointId, number>;
28
+ lanes: Map<"size" | "x" | "value", number>;
29
+ start: number;
30
+ end: number;
31
+ chart: SharedGroup["charts"][number];
32
+ seriesId: ChartSeriesId;
33
+ references: ReadonlySet<string>;
34
+ }[];
35
+ keys: Set<string>;
36
+ lanes: Set<number>;
37
+ axes: Set<number>;
38
+ anchors: Set<number>;
39
+ };
@@ -0,0 +1,13 @@
1
+ import type { EditDoc, ElementId } from '../types';
2
+ import type { CommandPatches, DocumentExtensionPatch } from '../commands/types';
3
+ import type { ChartDatasetState } from './types';
4
+ import type { SharedGroup } from './shared-graph';
5
+ export type { SharedGroup } from './shared-graph';
6
+ export declare const ownsSharedChart: (doc: EditDoc, id: ElementId) => boolean;
7
+ /** 单元格覆盖只有一份,图表缓存始终由同一份覆盖投影,避免并发编辑留下两套真值。 */
8
+ export declare function sharedDatasetState(doc: EditDoc, id: ElementId, state: ChartDatasetState): ChartDatasetState;
9
+ export declare function projectSharedDataset(doc: EditDoc, shared: SharedGroup, state: ChartDatasetState): ChartDatasetState;
10
+ export declare function sharedCommandPatches(doc: EditDoc, id: ElementId, local: CommandPatches, origin: string): CommandPatches;
11
+ export declare function sharedChartElements(doc: EditDoc, patch?: DocumentExtensionPatch): ElementId[];
12
+ export declare function validateSharedChartPatch(doc: EditDoc, patch: DocumentExtensionPatch): void;
13
+ export declare function validateSharedDocument(doc: EditDoc): void;
@@ -0,0 +1,11 @@
1
+ import type { EditDoc, ElementId } from '../types';
2
+ import type { ChartDataset, ChartDatasetState } from './types';
3
+ export declare const currentChartDatasetState: (doc: EditDoc, id: ElementId) => ChartDatasetState;
4
+ export declare const chartDatasetStatesEqual: (left: ChartDatasetState, right: ChartDatasetState) => boolean;
5
+ export declare function chartStateMatchesSource(doc: EditDoc, id: ElementId): boolean;
6
+ export declare function chartStateHasEffectiveChanges(doc: EditDoc, id: ElementId): boolean;
7
+ export declare function readChartDataset(doc: EditDoc, id: ElementId): ChartDataset;
8
+ export declare function hydrateChartDataset(doc: EditDoc, id: ElementId, deferWorkbookPlanning?: boolean): ChartDatasetState;
9
+ export declare const NATIVE_CHART_ID = "shared-native";
10
+ export declare function hydrateChartPart(doc: EditDoc, part: string): ChartDatasetState;
11
+ export declare function chartRecordIds(doc: EditDoc): ElementId[];
@@ -0,0 +1,86 @@
1
+ import type { ElementId, FractionalIndex } from '../types';
2
+ export type ChartSeriesId = string & {
3
+ readonly __chartSeriesId: unique symbol;
4
+ };
5
+ export type ChartPointId = string & {
6
+ readonly __chartPointId: unique symbol;
7
+ };
8
+ export type ChartPlotKind = 'bar' | 'line' | 'pie' | 'doughnut' | 'area' | 'scatter' | 'radar' | 'bubble' | 'stock' | 'ofPie' | 'surface' | 'other';
9
+ export interface ChartFormulaBinding {
10
+ readonly formula: string | null;
11
+ readonly cache: 'number' | 'string' | 'literal' | 'missing';
12
+ readonly hierarchy?: {
13
+ readonly levels: number;
14
+ readonly orientation: 'rows' | 'columns';
15
+ };
16
+ }
17
+ export interface ChartDataBinding {
18
+ readonly chartPart: string;
19
+ readonly workbookPart: string | null;
20
+ readonly mode: 'workbook' | 'cache' | 'readonly';
21
+ readonly reason?: string;
22
+ /** 旧编辑或共享覆盖无法解释时,不返回可被误认为当前数据的来源缓存。 */
23
+ readonly unresolved?: true;
24
+ }
25
+ export interface ChartCategory {
26
+ readonly id: ChartPointId;
27
+ readonly order: FractionalIndex;
28
+ readonly label: string;
29
+ /** 从根到叶的原生槽位;父级 null 延续组,叶级 null 是缺失标签,空字符串是显式空值。 */
30
+ readonly levels?: readonly (string | null)[];
31
+ readonly removed?: true;
32
+ }
33
+ export interface ChartPoint {
34
+ readonly id: ChartPointId;
35
+ readonly order: FractionalIndex;
36
+ readonly value: number | null;
37
+ readonly x?: number | null;
38
+ readonly size?: number | null;
39
+ readonly removed?: true;
40
+ }
41
+ export interface ChartSeries {
42
+ readonly id: ChartSeriesId;
43
+ readonly order: FractionalIndex;
44
+ readonly sourceIndex: number;
45
+ readonly plotKind: ChartPlotKind;
46
+ readonly name: string;
47
+ readonly points: readonly ChartPoint[];
48
+ readonly bindings: {
49
+ readonly name: ChartFormulaBinding;
50
+ readonly categories?: ChartFormulaBinding;
51
+ readonly values?: ChartFormulaBinding;
52
+ readonly x?: ChartFormulaBinding;
53
+ readonly y?: ChartFormulaBinding;
54
+ readonly size?: ChartFormulaBinding;
55
+ };
56
+ readonly removed?: true;
57
+ }
58
+ export interface ChartDataset {
59
+ readonly chartId: ElementId;
60
+ readonly kind: 'category' | 'xy' | 'mixed';
61
+ /** 来源绘图区能安全复用的系列类型;删空后仍可据此重建。 */
62
+ readonly plotKinds: readonly ChartPlotKind[];
63
+ readonly categories: readonly ChartCategory[];
64
+ readonly series: readonly ChartSeries[];
65
+ readonly binding: ChartDataBinding;
66
+ }
67
+ export interface EditableChart {
68
+ readonly id: ElementId;
69
+ readonly name: string;
70
+ readonly binding: ChartDataBinding;
71
+ }
72
+ export interface ChartDatasetState {
73
+ kind: ChartDataset['kind'];
74
+ binding: ChartDataBinding;
75
+ categories: Record<ChartPointId, ChartCategory & {
76
+ /** 新增类别创建时的前驱;墓碑保留分组,但不能让后来新增的类别复活已删除的组。 */
77
+ levelParent?: ChartPointId | null;
78
+ /** 清空组首时接受的前驱;后续删除前驱也不能改变已经选择的分组。 */
79
+ levelClears?: Readonly<Record<string, ChartPointId | null>>;
80
+ }>;
81
+ series: Record<ChartSeriesId, Omit<ChartSeries, 'points'> & {
82
+ points: Record<ChartPointId, ChartPoint>;
83
+ /** 仅表示 wppt 持久模板;其公式必须先按未受信来源通过工作簿占用检查。 */
84
+ sourceTemplate?: true;
85
+ }>;
86
+ }
@@ -0,0 +1,24 @@
1
+ import type { FractionalIndex } from '../types';
2
+ import type { ChartCategory, ChartPlotKind, ChartPoint, ChartSeries, ChartSeriesId } from './types';
3
+ export { MAX_CHART_NAME, MAX_CHART_IDENTITY, MAX_CHART_POINTS, MAX_CHART_SERIES, MAX_CHART_CELLS } from './limits';
4
+ export declare const CHART_PLOT_KINDS: Set<ChartPlotKind>;
5
+ export declare function assertChartName(value: unknown, label: string): asserts value is string;
6
+ export declare function assertChartNumber(value: unknown, label: string): asserts value is number | null;
7
+ export declare function assertChartDictionary(value: unknown, label: string): asserts value is Record<string, unknown>;
8
+ export declare function assertChartRecord(value: unknown, keys: readonly string[], label: string): asserts value is Record<string, unknown>;
9
+ export declare function assertChartIdentity(value: unknown, expected: string, label: string): asserts value is string;
10
+ export declare function assertChartOrder(value: unknown, label: string): asserts value is FractionalIndex;
11
+ export declare function assertChartPointRecord(value: unknown, expectedId: string, label: string): asserts value is ChartPoint;
12
+ export declare function assertChartCategoryRecord(value: unknown, expectedId: string, label: string): asserts value is ChartCategory;
13
+ export declare function assertCategoryLevels(value: unknown, depth?: number): asserts value is readonly (string | null)[];
14
+ export declare function assertChartSeriesRecord(value: unknown, expectedId: string, label: string, literalOnly?: boolean): asserts value is Omit<ChartSeries, 'points'> & {
15
+ points: Record<string, ChartPoint>;
16
+ };
17
+ type StoredSeries = Omit<ChartSeries, 'points'> & {
18
+ points: Record<string, ChartPoint>;
19
+ sourceTemplate?: true;
20
+ };
21
+ export declare function validateMaterializedRecords(categories: Record<string, ChartCategory>, series: Record<ChartSeriesId, Omit<ChartSeries, 'points'> & {
22
+ points: Record<string, ChartPoint>;
23
+ sourceTemplate?: true;
24
+ }>, sourceCategories: Readonly<Record<string, ChartCategory>>, sourceSeries: Readonly<Record<string, StoredSeries>>): boolean;
@@ -0,0 +1,16 @@
1
+ export declare function addressParts(address: string): {
2
+ column: number;
3
+ row: number;
4
+ };
5
+ export declare function worksheetRangeBounds(reference: string): {
6
+ readonly start: {
7
+ column: number;
8
+ row: number;
9
+ };
10
+ readonly end: {
11
+ column: number;
12
+ row: number;
13
+ };
14
+ };
15
+ export declare function worksheetRangeCells(reference: string): string[];
16
+ export declare function rangeCells(formula: string | null): string[];
@@ -0,0 +1,7 @@
1
+ import type { WorkbookMap } from './workbook';
2
+ export interface WorkbookCellValue {
3
+ readonly kind: 'number' | 'string' | 'blank' | 'unsupported';
4
+ readonly value: string | number | null;
5
+ }
6
+ export declare const workbookCellKey: (sheet: string, address: string) => string;
7
+ export declare function readWorkbookCells(parts: Readonly<Record<string, Uint8Array>>, map: WorkbookMap): Map<string, WorkbookCellValue>;
@@ -0,0 +1,9 @@
1
+ import type { ChartDatasetState } from './types';
2
+ import type { WorkbookMap } from './workbook';
3
+ type CellValue = {
4
+ readonly kind: 'string' | 'number';
5
+ readonly value: string | number | null;
6
+ };
7
+ export declare function writeChartWorkbook(sourceBytes: Uint8Array, parts: Readonly<Record<string, Uint8Array>>, map: WorkbookMap, source: ChartDatasetState, planned: ChartDatasetState): Uint8Array;
8
+ export declare function writeWorkbookCells(sourceBytes: Uint8Array, parts: Readonly<Record<string, Uint8Array>>, map: WorkbookMap, writes: ReadonlyMap<string, ReadonlyMap<string, CellValue>>): Uint8Array;
9
+ export {};
@@ -0,0 +1,25 @@
1
+ import type { ChartDatasetState } from './types';
2
+ export declare function unzipWorkbook(bytes: Uint8Array): Record<string, Uint8Array>;
3
+ export interface WorkbookMap {
4
+ readonly sheets: Map<string, string>;
5
+ readonly sharedStrings: string | null;
6
+ }
7
+ type DatasetValues = Pick<ChartDatasetState, 'categories' | 'series'>;
8
+ export declare function workbookMap(parts: Readonly<Record<string, Uint8Array>>): WorkbookMap;
9
+ export declare function workbookCanSync(workbook: Uint8Array | undefined, state: DatasetValues, verifyCache?: boolean, companions?: readonly DatasetValues[] | false): {
10
+ ok: true;
11
+ } | {
12
+ ok: false;
13
+ reason: string;
14
+ };
15
+ interface WorkbookOccupancy {
16
+ readonly occupied: Map<string, Set<string>>;
17
+ readonly merged: Map<string, Set<string>>;
18
+ readonly unsafe: Map<string, Set<string>>;
19
+ }
20
+ export declare function occupiedCells(parts: Readonly<Record<string, Uint8Array>>, map: WorkbookMap): WorkbookOccupancy;
21
+ export declare function patchChartWorkbook(sourceBytes: Uint8Array, sourceState: ChartDatasetState): {
22
+ readonly bytes: Uint8Array;
23
+ readonly state: ChartDatasetState;
24
+ };
25
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { XmlElement, XmlNode } from '@web-ppt/edit-core/xml';
2
+ export declare const chartXml: {
3
+ child: (node: XmlElement | null, name: string) => XmlElement | null;
4
+ children: (node: XmlElement | null, name?: string) => XmlElement[];
5
+ };
6
+ export declare const worksheetXml: {
7
+ child: (node: XmlElement | null, name: string) => XmlElement | null;
8
+ children: (node: XmlElement | null, name?: string) => XmlElement[];
9
+ };
10
+ export declare const xmlAttribute: (node: XmlElement | null, name: string) => string | null;
11
+ export declare const xmlContent: (node: XmlElement | null) => string;
12
+ export declare function appendXml(parent: XmlElement, node: XmlNode, before?: XmlNode | null): void;
13
+ export declare function makeDataElement(parent: XmlElement, name: string, attributes?: readonly (readonly [string, string])[]): XmlElement;
14
+ export declare function setDataText(node: XmlElement, value: string): void;
@@ -0,0 +1,16 @@
1
+ export declare const CHART_NS = "http://schemas.openxmlformats.org/drawingml/2006/chart";
2
+ export declare const DRAWING_NS = "http://schemas.openxmlformats.org/drawingml/2006/main";
3
+ export declare const PRESENTATION_NS = "http://schemas.openxmlformats.org/presentationml/2006/main";
4
+ export declare const OFFICE_REL_NS = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
5
+ export declare const PACKAGE_REL_NS = "http://schemas.openxmlformats.org/package/2006/relationships";
6
+ export declare const SPREADSHEET_NS = "http://schemas.openxmlformats.org/spreadsheetml/2006/main";
7
+ export declare const STRICT_CHART_NS = "http://purl.oclc.org/ooxml/drawingml/chart";
8
+ export declare const STRICT_DRAWING_NS = "http://purl.oclc.org/ooxml/drawingml/main";
9
+ export declare const STRICT_PRESENTATION_NS = "http://purl.oclc.org/ooxml/presentationml/main";
10
+ export declare const STRICT_OFFICE_REL_NS = "http://purl.oclc.org/ooxml/officeDocument/relationships";
11
+ export declare const STRICT_SPREADSHEET_NS = "http://purl.oclc.org/ooxml/spreadsheetml/main";
12
+ export declare const isChartNamespace: (value: string | null) => boolean;
13
+ export declare const isDrawingNamespace: (value: string | null) => boolean;
14
+ export declare const isPresentationNamespace: (value: string | null) => boolean;
15
+ export declare const isOfficeRelationshipNamespace: (value: string | null) => boolean;
16
+ export declare const isSpreadsheetNamespace: (value: string | null) => boolean;
@@ -0,0 +1,10 @@
1
+ import type { Editor } from '../editor';
2
+ import type { EditDoc, ElementId } from '../types';
3
+ import type { ChartDesign } from './types';
4
+ export { CHART_TYPES } from './types';
5
+ export type { ChartDesign, ChartType } from './types';
6
+ export declare function queryChartDesign(doc: EditDoc, id: ElementId): ChartDesign;
7
+ export declare function createChartDesignEditor(editor: Pick<Editor, 'doc' | 'exec'>): {
8
+ query: (id: ElementId) => ChartDesign;
9
+ set(id: ElementId, design: ChartDesign | null): import("..").TransactionResult;
10
+ };
@@ -0,0 +1,11 @@
1
+ export declare const CHART_TYPES: readonly ["bar", "line", "area", "pie", "doughnut", "radar", "scatter", "bubble"];
2
+ export type ChartType = typeof CHART_TYPES[number];
3
+ export interface ChartDesign {
4
+ type?: ChartType;
5
+ horizontal?: boolean;
6
+ grouping?: 'standard' | 'stacked' | 'percentStacked';
7
+ palette?: readonly string[];
8
+ legend?: 'none' | 'left' | 'right' | 'top' | 'bottom';
9
+ labels?: boolean;
10
+ title?: string;
11
+ }
@@ -0,0 +1,2 @@
1
+ import type { ChartDesign } from './types';
2
+ export declare function applyChartDesign(xml: string | Uint8Array, design: ChartDesign): string;