@web-ppt/edit-core 0.5.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 (179) hide show
  1. package/CHANGELOG.md +274 -0
  2. package/LICENSE +21 -0
  3. package/README.md +474 -0
  4. package/dist/animation-catalog.d.ts +21 -0
  5. package/dist/body-properties.d.ts +8 -0
  6. package/dist/body-property-schema.d.ts +3 -0
  7. package/dist/change-classification.d.ts +10 -0
  8. package/dist/clipboard-binary.d.ts +4 -0
  9. package/dist/clipboard-links.d.ts +11 -0
  10. package/dist/clipboard-source.d.ts +23 -0
  11. package/dist/clipboard.d.ts +4 -0
  12. package/dist/commands/add-image.d.ts +4 -0
  13. package/dist/commands/add-shape.d.ts +4 -0
  14. package/dist/commands/add-slide-identity.d.ts +8 -0
  15. package/dist/commands/add-slide-template.d.ts +9 -0
  16. package/dist/commands/add-slide.d.ts +3 -0
  17. package/dist/commands/add-table.d.ts +4 -0
  18. package/dist/commands/align-elements.d.ts +4 -0
  19. package/dist/commands/apply-format.d.ts +4 -0
  20. package/dist/commands/clipboard-types.d.ts +91 -0
  21. package/dist/commands/direct-format-patches.d.ts +8 -0
  22. package/dist/commands/dispatch.d.ts +7 -0
  23. package/dist/commands/duplicate-slide.d.ts +3 -0
  24. package/dist/commands/edit-text.d.ts +3 -0
  25. package/dist/commands/element-effects.d.ts +5 -0
  26. package/dist/commands/element-fill.d.ts +5 -0
  27. package/dist/commands/element-image-content.d.ts +17 -0
  28. package/dist/commands/element-interaction.d.ts +11 -0
  29. package/dist/commands/element-link.d.ts +5 -0
  30. package/dist/commands/element-name.d.ts +8 -0
  31. package/dist/commands/element-order.d.ts +7 -0
  32. package/dist/commands/element-stroke.d.ts +5 -0
  33. package/dist/commands/element-text.d.ts +6 -0
  34. package/dist/commands/element-transform.d.ts +5 -0
  35. package/dist/commands/element-tree.d.ts +8 -0
  36. package/dist/commands/fit-text-shape.d.ts +3 -0
  37. package/dist/commands/format-painter-types.d.ts +17 -0
  38. package/dist/commands/image-format.d.ts +7 -0
  39. package/dist/commands/image-resource.d.ts +4 -0
  40. package/dist/commands/insert-row.d.ts +3 -0
  41. package/dist/commands/insertion-rect.d.ts +9 -0
  42. package/dist/commands/paste-elements.d.ts +4 -0
  43. package/dist/commands/paste-resources.d.ts +18 -0
  44. package/dist/commands/patch.d.ts +6 -0
  45. package/dist/commands/remove-slide.d.ts +3 -0
  46. package/dist/commands/replace-image.d.ts +3 -0
  47. package/dist/commands/replace-text.d.ts +5 -0
  48. package/dist/commands/set-animations.d.ts +3 -0
  49. package/dist/commands/set-body-props.d.ts +3 -0
  50. package/dist/commands/set-crop.d.ts +3 -0
  51. package/dist/commands/set-effects.d.ts +3 -0
  52. package/dist/commands/set-fill.d.ts +3 -0
  53. package/dist/commands/set-flip.d.ts +4 -0
  54. package/dist/commands/set-link.d.ts +3 -0
  55. package/dist/commands/set-para-props.d.ts +3 -0
  56. package/dist/commands/set-run-props.d.ts +3 -0
  57. package/dist/commands/set-slide-properties.d.ts +7 -0
  58. package/dist/commands/set-stroke.d.ts +3 -0
  59. package/dist/commands/set-xfrm.d.ts +3 -0
  60. package/dist/commands/set-z.d.ts +5 -0
  61. package/dist/commands/slide-image.d.ts +4 -0
  62. package/dist/commands/slide-layout.d.ts +8 -0
  63. package/dist/commands/slide-notes.d.ts +8 -0
  64. package/dist/commands/slide-order.d.ts +7 -0
  65. package/dist/commands/slide-property-types.d.ts +135 -0
  66. package/dist/commands/slide-property.d.ts +20 -0
  67. package/dist/commands/slide-tree.d.ts +6 -0
  68. package/dist/commands/spid.d.ts +4 -0
  69. package/dist/commands/table-row.d.ts +5 -0
  70. package/dist/commands/text-target.d.ts +25 -0
  71. package/dist/commands/types.d.ts +509 -0
  72. package/dist/commands/xfrm.d.ts +8 -0
  73. package/dist/data-validation.d.ts +7 -0
  74. package/dist/document.d.ts +17 -0
  75. package/dist/dynamic-slide-fields.d.ts +6 -0
  76. package/dist/edit-core.js +5321 -0
  77. package/dist/editor.d.ts +38 -0
  78. package/dist/element-ancestry.d.ts +3 -0
  79. package/dist/element-name.d.ts +4 -0
  80. package/dist/element-order.d.ts +7 -0
  81. package/dist/field-text.d.ts +3 -0
  82. package/dist/fractional-index.d.ts +10 -0
  83. package/dist/history.d.ts +50 -0
  84. package/dist/hyperlink.d.ts +10 -0
  85. package/dist/image-content.d.ts +7 -0
  86. package/dist/image-resource-history.d.ts +6 -0
  87. package/dist/index-D4ZTaYOa.js +706 -0
  88. package/dist/index.d.ts +46 -0
  89. package/dist/insertion-DabLme_U.js +5471 -0
  90. package/dist/insertion-invariants.d.ts +5 -0
  91. package/dist/layout-assets.d.ts +10 -0
  92. package/dist/layout-projection.d.ts +24 -0
  93. package/dist/layout-text-rebase.d.ts +3 -0
  94. package/dist/model-invariants.d.ts +5 -0
  95. package/dist/notes-part.d.ts +2 -0
  96. package/dist/opc/bytes.d.ts +1 -0
  97. package/dist/opc/crc32.d.ts +1 -0
  98. package/dist/opc/index.d.ts +3 -0
  99. package/dist/opc/package-owner.d.ts +4 -0
  100. package/dist/opc/patch.d.ts +6 -0
  101. package/dist/opc/types.d.ts +12 -0
  102. package/dist/opc/zip.d.ts +28 -0
  103. package/dist/opc-owner-protocol.d.ts +5 -0
  104. package/dist/opc.js +5 -0
  105. package/dist/paragraph-properties.d.ts +4 -0
  106. package/dist/paragraph-property-schema.d.ts +4 -0
  107. package/dist/patch-DO8497wO.js +322 -0
  108. package/dist/projection.d.ts +19 -0
  109. package/dist/recovery-identity.d.ts +35 -0
  110. package/dist/recovery-types.d.ts +30 -0
  111. package/dist/recovery.d.ts +28 -0
  112. package/dist/run-links.d.ts +3 -0
  113. package/dist/run-properties.d.ts +4 -0
  114. package/dist/run-property-schema.d.ts +3 -0
  115. package/dist/save/animation.d.ts +6 -0
  116. package/dist/save/background-image.d.ts +8 -0
  117. package/dist/save/clipboard-parts.d.ts +11 -0
  118. package/dist/save/drawing-color.d.ts +2 -0
  119. package/dist/save/duplicate-slide-parts.d.ts +15 -0
  120. package/dist/save/effects.d.ts +6 -0
  121. package/dist/save/hyperlink.d.ts +18 -0
  122. package/dist/save/image-content.d.ts +4 -0
  123. package/dist/save/index.d.ts +5 -0
  124. package/dist/save/insertion.d.ts +14 -0
  125. package/dist/save/layout-fallback-source.d.ts +4 -0
  126. package/dist/save/layout-fallback.d.ts +7 -0
  127. package/dist/save/materialize.d.ts +5 -0
  128. package/dist/save/name.d.ts +5 -0
  129. package/dist/save/notes.d.ts +12 -0
  130. package/dist/save/order.d.ts +5 -0
  131. package/dist/save/remove-element.d.ts +4 -0
  132. package/dist/save/remove-slide-parts.d.ts +11 -0
  133. package/dist/save/shape-format.d.ts +14 -0
  134. package/dist/save/slide-parts.d.ts +11 -0
  135. package/dist/save/slide-properties.d.ts +4 -0
  136. package/dist/save/table.d.ts +7 -0
  137. package/dist/save/text-body.d.ts +4 -0
  138. package/dist/save/text.d.ts +6 -0
  139. package/dist/save/transition.d.ts +4 -0
  140. package/dist/save/xfrm.d.ts +22 -0
  141. package/dist/save/xml-element.d.ts +3 -0
  142. package/dist/save.js +1559 -0
  143. package/dist/selection-pane.d.ts +18 -0
  144. package/dist/selection.d.ts +11 -0
  145. package/dist/session-assets.d.ts +20 -0
  146. package/dist/shape-effects.d.ts +6 -0
  147. package/dist/shape-fill.d.ts +12 -0
  148. package/dist/shape-stroke.d.ts +9 -0
  149. package/dist/slide-animation.d.ts +15 -0
  150. package/dist/slide-background-source.d.ts +13 -0
  151. package/dist/slide-notes.d.ts +2 -0
  152. package/dist/slide-properties.d.ts +4 -0
  153. package/dist/slide-transition.d.ts +19 -0
  154. package/dist/space.d.ts +47 -0
  155. package/dist/table-cell.d.ts +10 -0
  156. package/dist/table-direct-markup.d.ts +3 -0
  157. package/dist/table-insertion-policy.d.ts +5 -0
  158. package/dist/table-row-append-validation.d.ts +3 -0
  159. package/dist/table-rows.d.ts +12 -0
  160. package/dist/text-model.d.ts +28 -0
  161. package/dist/text-override-projection.d.ts +8 -0
  162. package/dist/text-override-validation.d.ts +7 -0
  163. package/dist/text-position.d.ts +8 -0
  164. package/dist/text-search-types.d.ts +46 -0
  165. package/dist/text-search.d.ts +5 -0
  166. package/dist/transaction-validation.d.ts +5 -0
  167. package/dist/types.d.ts +519 -0
  168. package/dist/xml/index.d.ts +9 -0
  169. package/dist/xml/mutate.d.ts +7 -0
  170. package/dist/xml/namespace.d.ts +5 -0
  171. package/dist/xml/nodes.d.ts +22 -0
  172. package/dist/xml/order.d.ts +15 -0
  173. package/dist/xml/qname.d.ts +15 -0
  174. package/dist/xml/query.d.ts +10 -0
  175. package/dist/xml/state.d.ts +30 -0
  176. package/dist/xml/tree.d.ts +8 -0
  177. package/dist/xml/types.d.ts +46 -0
  178. package/dist/xml.js +19 -0
  179. package/package.json +67 -0
@@ -0,0 +1,46 @@
1
+ export type XmlQuote = '"' | "'";
2
+ export interface XmlAttribute {
3
+ readonly name: string;
4
+ readonly prefix: string | null;
5
+ readonly localName: string;
6
+ readonly namespaceUri: string | null;
7
+ readonly value: string;
8
+ readonly quote: XmlQuote;
9
+ }
10
+ export interface XmlElement {
11
+ readonly type: 'element';
12
+ readonly name: string;
13
+ readonly prefix: string | null;
14
+ readonly localName: string;
15
+ readonly namespaceUri: string | null;
16
+ readonly attributes: readonly XmlAttribute[];
17
+ readonly children: readonly XmlNode[];
18
+ readonly selfClosing: boolean;
19
+ }
20
+ export interface XmlText {
21
+ readonly type: 'text';
22
+ readonly value: string;
23
+ }
24
+ export interface XmlCdata {
25
+ readonly type: 'cdata';
26
+ readonly value: string;
27
+ }
28
+ export interface XmlComment {
29
+ readonly type: 'comment';
30
+ readonly value: string;
31
+ }
32
+ export interface XmlProcessingInstruction {
33
+ readonly type: 'processing-instruction';
34
+ readonly target: string;
35
+ readonly value: string;
36
+ }
37
+ export interface XmlDeclaration {
38
+ readonly type: 'declaration';
39
+ readonly value: string;
40
+ }
41
+ export type XmlNode = XmlElement | XmlText | XmlCdata | XmlComment | XmlProcessingInstruction | XmlDeclaration;
42
+ export interface XmlDocument {
43
+ readonly type: 'document';
44
+ readonly children: readonly XmlNode[];
45
+ readonly root: XmlElement;
46
+ }
package/dist/xml.js ADDED
@@ -0,0 +1,19 @@
1
+ import { w as s, c as l, g as a, f as m, d as t, h as i, u as X, k as d, p as n, r as h, b as C, e as f, y as o, s as b, a as c, x as u } from "./index-D4ZTaYOa.js";
2
+ export {
3
+ s as OOXML_CHILD_ORDER,
4
+ l as createXmlElement,
5
+ a as createXmlText,
6
+ m as findXmlAttribute,
7
+ t as findXmlChild,
8
+ i as findXmlDescendant,
9
+ X as insertXmlChild,
10
+ d as insertXmlInOrder,
11
+ n as parseXmlTree,
12
+ h as removeXmlAttribute,
13
+ C as removeXmlChild,
14
+ f as reorderXmlChildren,
15
+ o as serializeXmlTree,
16
+ b as serializeXmlTreeBytes,
17
+ c as setXmlAttribute,
18
+ u as xmlElementChildren
19
+ };
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@web-ppt/edit-core",
3
+ "version": "0.5.0-beta.1",
4
+ "description": "Headless, framework-agnostic editing document model and render projection for Web-PPT.",
5
+ "keywords": [
6
+ "pptx",
7
+ "ppt",
8
+ "powerpoint",
9
+ "editor",
10
+ "headless",
11
+ "browser",
12
+ "ooxml",
13
+ "typescript"
14
+ ],
15
+ "license": "MIT",
16
+ "author": "unStone",
17
+ "homepage": "https://github.com/unStone/web-ppt#readme",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/unStone/web-ppt.git",
21
+ "directory": "packages/edit-core"
22
+ },
23
+ "type": "module",
24
+ "sideEffects": false,
25
+ "main": "./dist/edit-core.js",
26
+ "module": "./dist/edit-core.js",
27
+ "types": "./dist/index.d.ts",
28
+ "exports": {
29
+ ".": {
30
+ "types": "./dist/index.d.ts",
31
+ "import": "./dist/edit-core.js"
32
+ },
33
+ "./xml": {
34
+ "types": "./dist/xml/index.d.ts",
35
+ "import": "./dist/xml.js"
36
+ },
37
+ "./opc": {
38
+ "types": "./dist/opc/index.d.ts",
39
+ "import": "./dist/opc.js"
40
+ },
41
+ "./save": {
42
+ "types": "./dist/save/index.d.ts",
43
+ "import": "./dist/save.js"
44
+ },
45
+ "./package.json": "./package.json"
46
+ },
47
+ "files": [
48
+ "dist",
49
+ "README.md",
50
+ "CHANGELOG.md",
51
+ "LICENSE"
52
+ ],
53
+ "scripts": {
54
+ "build": "vite build && tsc -p tsconfig.build.json",
55
+ "prepublishOnly": "npm run build",
56
+ "prepack": "node ../../tooling/sync-package-docs.mjs"
57
+ },
58
+ "peerDependencies": {
59
+ "@web-ppt/core": "^0.5.0-beta.1"
60
+ },
61
+ "dependencies": {
62
+ "fflate": "^0.8.2"
63
+ },
64
+ "publishConfig": {
65
+ "access": "public"
66
+ }
67
+ }