gbpptx 0.6.0 → 0.6.2

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 (50) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +253 -253
  3. package/package.json +48 -47
  4. package/src/index.js +29 -29
  5. package/src/kernel/model.js +651 -651
  6. package/src/kernel/parts.js +173 -173
  7. package/src/kernel/pptx.js +72 -72
  8. package/src/kernel/print.js +76 -76
  9. package/src/kernel/read.js +1018 -1018
  10. package/src/kernel/roundtrip.js +174 -174
  11. package/src/kernel/text.js +278 -278
  12. package/src/kernel/write.js +385 -385
  13. package/web/app/main.js +8 -8
  14. package/web/app/slides/arrange.js +101 -101
  15. package/web/app/slides/clipboard.js +93 -93
  16. package/web/app/slides/file.js +240 -240
  17. package/web/app/slides/find.js +201 -201
  18. package/web/app/slides/history.js +100 -100
  19. package/web/app/slides/keys.js +187 -187
  20. package/web/app/slides/menus.js +105 -105
  21. package/web/app/slides/objects.js +254 -254
  22. package/web/app/slides/render.js +183 -183
  23. package/web/app/slides/shared.js +85 -85
  24. package/web/app/slides/slides.js +103 -103
  25. package/web/app/slides/table.js +102 -102
  26. package/web/app/slides/text.js +418 -418
  27. package/web/app/slides/view.js +182 -182
  28. package/web/app/slides-app.js +354 -354
  29. package/web/app/ui/canvas.js +769 -769
  30. package/web/app/ui/color-panel.js +58 -58
  31. package/web/app/ui/dialogs.js +120 -120
  32. package/web/app/ui/file-io.js +116 -116
  33. package/web/app/ui/format-pane.js +427 -427
  34. package/web/app/ui/icons.js +241 -133
  35. package/web/app/ui/menu.js +77 -75
  36. package/web/app/ui/notify.js +45 -45
  37. package/web/app/ui/page-view.js +221 -221
  38. package/web/app/ui/popup.js +80 -80
  39. package/web/app/ui/present.js +292 -292
  40. package/web/app/ui/ribbon.js +855 -855
  41. package/web/app/ui/slide-pane.js +197 -197
  42. package/web/app/ui/statusbar.js +93 -93
  43. package/web/app/ui/text-styles.js +84 -84
  44. package/web/app/ui/titlebar.js +253 -250
  45. package/web/app/ui/transition.js +30 -30
  46. package/web/index.html +30 -29
  47. package/web/serve.mjs +26 -23
  48. package/web/styles/office.css +463 -463
  49. package/web/styles/slides.css +97 -97
  50. package/web/styles/tokens.css +154 -154
package/package.json CHANGED
@@ -1,47 +1,48 @@
1
- {
2
- "name": "gbpptx",
3
- "version": "0.6.0",
4
- "description": "Office-style PowerPoint (pptx) editor: real PresentationML read/write, ribbon UI, slide sorter, presenter view.",
5
- "type": "module",
6
- "license": "MIT",
7
- "sideEffects": false,
8
- "main": "./src/index.js",
9
- "exports": {
10
- ".": "./src/index.js",
11
- "./model": "./src/kernel/model.js",
12
- "./pptx": "./src/kernel/pptx.js",
13
- "./package.json": "./package.json",
14
- "./web/*": "./web/*",
15
- "./*": "./src/*.js"
16
- },
17
- "files": [
18
- "src",
19
- "web",
20
- "LICENSE"
21
- ],
22
- "keywords": [
23
- "pptx",
24
- "presentation",
25
- "powerpoint",
26
- "ooxml",
27
- "slides",
28
- "editor",
29
- "office",
30
- "ribbon"
31
- ],
32
- "engines": {
33
- "node": ">=18"
34
- },
35
- "scripts": {
36
- "start": "node web/serve.mjs",
37
- "test": "node --test test/roundtrip.test.js test/external-import.test.js test/ui-zoom.test.js test/mode.test.js"
38
- },
39
- "dependencies": {
40
- "gbooxml": "^0.1.0",
41
- "gbofficeui": "^0.3.0",
42
- "guabiutils": "^0.3.0"
43
- },
44
- "devDependencies": {
45
- "jsdom": "^30.1.3"
46
- }
47
- }
1
+ {
2
+ "name": "gbpptx",
3
+ "version": "0.6.2",
4
+ "description": "Office-style PowerPoint (pptx) editor: real PresentationML read/write, ribbon UI, slide sorter, presenter view.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "sideEffects": false,
8
+ "main": "./src/index.js",
9
+ "exports": {
10
+ ".": "./src/index.js",
11
+ "./model": "./src/kernel/model.js",
12
+ "./pptx": "./src/kernel/pptx.js",
13
+ "./package.json": "./package.json",
14
+ "./web/*": "./web/*",
15
+ "./*": "./src/*.js"
16
+ },
17
+ "files": [
18
+ "src",
19
+ "web",
20
+ "LICENSE"
21
+ ],
22
+ "keywords": [
23
+ "pptx",
24
+ "presentation",
25
+ "powerpoint",
26
+ "ooxml",
27
+ "slides",
28
+ "editor",
29
+ "office",
30
+ "ribbon"
31
+ ],
32
+ "engines": {
33
+ "node": ">=18"
34
+ },
35
+ "scripts": {
36
+ "start": "node web/serve.mjs",
37
+ "test": "node --test test/roundtrip.test.js test/external-import.test.js test/ui-zoom.test.js test/mode.test.js"
38
+ },
39
+ "dependencies": {
40
+ "gbooxml": "^0.1.0",
41
+ "gbofficeui": "^0.3.0",
42
+ "guabiutils": "^0.3.0",
43
+ "gbicons": "^0.1.0"
44
+ },
45
+ "devDependencies": {
46
+ "jsdom": "^30.1.3"
47
+ }
48
+ }
package/src/index.js CHANGED
@@ -1,29 +1,29 @@
1
- // [文件] gbpptx·统一入口 —— 画布模型 + 真实 .pptx 读写 + 打印 能力聚合再导出
2
-
3
- /* 画布对象模型 */
4
- export {
5
- SNAPSHOT_VERSION, SLIDE_W, SLIDE_H, SLIDE_SIZES, DEFAULT_SIZE,
6
- normalizeSize, sizeOf, sizePresetKey,
7
- THEMES, THEME_KEYS, themeOf,
8
- TABLE_STYLES, tableStyleColors, contrastText,
9
- TRANSITIONS, DEFAULT_TRANSITION, normalizeTransition, transitionOf,
10
- SHAPE_KINDS, SHAPE_KIND_KEYS, shapeKindLabel, shapePreset, TYPE_NAMES,
11
- cloneObject, copySlide, createSlide, topZ,
12
- createTextObject, createImageObject, createShapeObject, createLineObject, createTableObject,
13
- objectRect, objectBoxStyle, unionRect, shapePath, DASH_STYLES, DASH_KEYS,
14
- isBlankHtml, htmlToPlain, plainToHtml,
15
- clearInlineFontSizes, setObjectFontSize, normalizeSnapshot,
16
- SLIDE_LAYOUTS, createSlideWithLayout, scaleSnapshotSize, createDraft,
17
- } from './kernel/model.js';
18
-
19
- /* pptx 读写(唯一出入口) */
20
- export { parsePptx } from './kernel/read.js';
21
- export { buildPptx } from './kernel/write.js';
22
- export { buildPptxVerified } from './kernel/roundtrip.js';
23
- export { isPptx, KIND_TO_PRST, PRST_TO_KIND, fontSizeToSz, szToFontSize, themeLabel } from './kernel/pptx.js';
24
-
25
- /* 文本转换(富文本/项目符号往返) */
26
- export { htmlToParas, parasToHTML, parasPlainText, parasPlainLines, parasOfPlain } from './kernel/text.js';
27
-
28
- /* 打印 */
29
- export { printSlides } from './kernel/print.js';
1
+ // [文件] gbpptx·统一入口 —— 画布模型 + 真实 .pptx 读写 + 打印 能力聚合再导出
2
+
3
+ /* 画布对象模型 */
4
+ export {
5
+ SNAPSHOT_VERSION, SLIDE_W, SLIDE_H, SLIDE_SIZES, DEFAULT_SIZE,
6
+ normalizeSize, sizeOf, sizePresetKey,
7
+ THEMES, THEME_KEYS, themeOf,
8
+ TABLE_STYLES, tableStyleColors, contrastText,
9
+ TRANSITIONS, DEFAULT_TRANSITION, normalizeTransition, transitionOf,
10
+ SHAPE_KINDS, SHAPE_KIND_KEYS, shapeKindLabel, shapePreset, TYPE_NAMES,
11
+ cloneObject, copySlide, createSlide, topZ,
12
+ createTextObject, createImageObject, createShapeObject, createLineObject, createTableObject,
13
+ objectRect, objectBoxStyle, unionRect, shapePath, DASH_STYLES, DASH_KEYS,
14
+ isBlankHtml, htmlToPlain, plainToHtml,
15
+ clearInlineFontSizes, setObjectFontSize, normalizeSnapshot,
16
+ SLIDE_LAYOUTS, createSlideWithLayout, scaleSnapshotSize, createDraft,
17
+ } from './kernel/model.js';
18
+
19
+ /* pptx 读写(唯一出入口) */
20
+ export { parsePptx } from './kernel/read.js';
21
+ export { buildPptx } from './kernel/write.js';
22
+ export { buildPptxVerified } from './kernel/roundtrip.js';
23
+ export { isPptx, KIND_TO_PRST, PRST_TO_KIND, fontSizeToSz, szToFontSize, themeLabel } from './kernel/pptx.js';
24
+
25
+ /* 文本转换(富文本/项目符号往返) */
26
+ export { htmlToParas, parasToHTML, parasPlainText, parasPlainLines, parasOfPlain } from './kernel/text.js';
27
+
28
+ /* 打印 */
29
+ export { printSlides } from './kernel/print.js';