ooxml-ui 1.13.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +379 -4
- package/dist/{chunk-D7JPVAYS.js → chunk-C3MXKNNK.js} +2139 -136
- package/dist/{chunk-EL2A3BDM.js → chunk-C5F7454A.js} +2 -2
- package/dist/{chunk-3XST4F6J.js → chunk-DSQBXLMO.js} +1 -1
- package/dist/{chunk-BFPHRWEB.js → chunk-LAVVSCRJ.js} +85 -44
- package/dist/controls.js +1 -1
- package/dist/dialog/options-dialog.d.ts +41 -0
- package/dist/dialog/options-dialog.d.ts.map +1 -1
- package/dist/docx/content-control-calendar.d.ts +7 -0
- package/dist/docx/content-control-dialog.d.ts +7 -0
- package/dist/docx/content-control-view.d.ts +2 -0
- package/dist/docx/editor-core.d.ts +7 -0
- package/dist/docx/equation-commands.d.ts +17 -0
- package/dist/docx/equation-dialog.d.ts +7 -0
- package/dist/docx/format-dialogs.d.ts +1 -1
- package/dist/docx/insert-controller.d.ts +4 -0
- package/dist/docx/locales/en.d.ts +118 -0
- package/dist/docx/locales/objects.d.ts +37 -0
- package/dist/docx/locales/shapes.d.ts +101 -0
- package/dist/docx/localization-strings.d.ts +118 -0
- package/dist/docx/note-editor.d.ts +7 -1
- package/dist/docx/parts-controller.d.ts +27 -1
- package/dist/docx/print-caret-affinity.d.ts +15 -0
- package/dist/docx/print-editing-index.d.ts +1 -0
- package/dist/docx/print-editing.d.ts +2 -1
- package/dist/docx/print-float-geometry.d.ts +28 -0
- package/dist/docx/print-float-locate.d.ts +25 -0
- package/dist/docx/print-float-selection.d.ts +24 -0
- package/dist/docx/print-float-text.d.ts +8 -0
- package/dist/docx/print-keyboard-navigation.d.ts +4 -3
- package/dist/docx/print-layout-view.d.ts +6 -0
- package/dist/docx/print-layout.d.ts +1 -1
- package/dist/docx/print-note-editing.d.ts +47 -0
- package/dist/docx/print-page-window.d.ts +2 -1
- package/dist/docx/print-picture.d.ts +7 -0
- package/dist/docx/print-story-editing.d.ts +16 -0
- package/dist/docx/print-vertical-step.d.ts +7 -0
- package/dist/docx/ribbon-action.d.ts +15 -0
- package/dist/docx/ribbon-icons.d.ts +3 -0
- package/dist/docx/schema.d.ts +1 -1
- package/dist/docx/shape-commands.d.ts +40 -0
- package/dist/docx/shape-draw.d.ts +12 -0
- package/dist/docx/shape-format-ribbon.d.ts +4 -0
- package/dist/docx/shape-node-view.d.ts +4 -0
- package/dist/docx/shape-picker.d.ts +5 -0
- package/dist/docx/shape-text-dialog.d.ts +4 -0
- package/dist/docx/table-model-adapter.d.ts +1 -1
- package/dist/docx/table-navigation.d.ts +8 -0
- package/dist/docx.js +3046 -376
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/pptx/{chart-3d-view-scene-MYQRQDNF.mjs → chart-3d-view-scene-BEAJCQIS.mjs} +2 -2
- package/dist/pptx/{chart-3d-view-scene-WX23DR2E.cjs → chart-3d-view-scene-CFUVOILD.cjs} +38 -38
- package/dist/pptx/{chunk-VFPVEVF4.cjs → chunk-2JTHIDMD.cjs} +173 -873
- package/dist/pptx/{chunk-J3GEBMYK.cjs → chunk-4NBVWV6I.cjs} +83 -0
- package/dist/pptx/{chunk-J4HVGXPW.cjs → chunk-5DUBDWOU.cjs} +4544 -2587
- package/dist/pptx/{chunk-C5OJXCCB.cjs → chunk-5UGJC25J.cjs} +1 -1
- package/dist/pptx/{chunk-NAFUYAQP.mjs → chunk-DWUC6LZK.mjs} +1 -1
- package/dist/pptx/{chunk-DZUSNYRA.mjs → chunk-GUAP5VUN.mjs} +3775 -1854
- package/dist/pptx/{chunk-K3S2A64B.cjs → chunk-HULZNSHL.cjs} +13 -13
- package/dist/pptx/{chunk-CB2DZVKL.mjs → chunk-OJXPN2WX.mjs} +83 -0
- package/dist/pptx/{chunk-QCP2XYJW.mjs → chunk-P3YE5LT2.mjs} +1 -1
- package/dist/pptx/{chunk-DPOES4WM.mjs → chunk-VXKFXPCU.mjs} +116 -829
- package/dist/pptx/dom/index.cjs +253 -253
- package/dist/pptx/dom/index.mjs +8 -8
- package/dist/pptx/export/html2canvas-clone.cjs +2 -2
- package/dist/pptx/export/html2canvas-clone.mjs +1 -1
- package/dist/pptx/i18n/index.cjs +6 -6
- package/dist/pptx/i18n/index.mjs +1 -1
- package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
- package/dist/pptx/index.cjs +3235 -3099
- package/dist/pptx/index.mjs +5 -5
- package/dist/pptx/render/chart-auto-title.d.ts +10 -15
- package/dist/pptx/render/chart-auto-title.d.ts.map +1 -1
- package/dist/pptx/render/chart-cartesian-bubbles.d.ts.map +1 -1
- package/dist/pptx/render/chart-combo-stock.cjs +3 -3
- package/dist/pptx/render/chart-combo-stock.mjs +1 -1
- package/dist/pptx/render/chart-data-label-text.d.ts +1 -1
- package/dist/pptx/render/chart-error-bars.d.ts.map +1 -1
- package/dist/pptx/render/chart-helpers.d.ts +3 -10
- package/dist/pptx/render/chart-helpers.d.ts.map +1 -1
- package/dist/pptx/render/chart-overlays-trendline-fit.d.ts +7 -9
- package/dist/pptx/render/chart-overlays-trendline-fit.d.ts.map +1 -1
- package/dist/pptx/render/chart-overlays.cjs +7 -7
- package/dist/pptx/render/chart-overlays.mjs +1 -1
- package/dist/pptx/render/chart-stock-candles.d.ts +0 -21
- package/dist/pptx/render/chart-stock-candles.d.ts.map +1 -1
- package/dist/pptx/render/chart-style-palette.d.ts +3 -28
- package/dist/pptx/render/chart-style-palette.d.ts.map +1 -1
- package/dist/pptx/render/chart-sunburst-hierarchy.d.ts +8 -28
- package/dist/pptx/render/chart-sunburst-hierarchy.d.ts.map +1 -1
- package/dist/pptx/render/chart-surface-treemap.cjs +4 -4
- package/dist/pptx/render/chart-surface-treemap.mjs +1 -1
- package/dist/pptx/render/chart-treemap-hierarchy.d.ts +7 -9
- package/dist/pptx/render/chart-treemap-hierarchy.d.ts.map +1 -1
- package/dist/pptx/render/chart-trendlines.d.ts +3 -17
- package/dist/pptx/render/chart-trendlines.d.ts.map +1 -1
- package/dist/pptx/render/chart-view-model-points.d.ts +2 -23
- package/dist/pptx/render/chart-view-model-points.d.ts.map +1 -1
- package/dist/pptx/render/chart-view-model.cjs +44 -44
- package/dist/pptx/render/chart-view-model.mjs +1 -1
- package/dist/pptx/render/chart-waterfall-map.cjs +6 -6
- package/dist/pptx/render/chart-waterfall-map.mjs +1 -1
- package/dist/pptx/render/customization/customization-catalog.d.ts +9 -2
- package/dist/pptx/render/customization/customization-catalog.d.ts.map +1 -1
- package/dist/pptx/render/customization/customization-controller.d.ts +9 -1
- package/dist/pptx/render/customization/customization-controller.d.ts.map +1 -1
- package/dist/pptx/render/customization/customization-descriptions.d.ts +5 -1
- package/dist/pptx/render/customization/customization-descriptions.d.ts.map +1 -1
- package/dist/pptx/render/customization/customization-entry-points.d.ts +46 -0
- package/dist/pptx/render/customization/customization-entry-points.d.ts.map +1 -0
- package/dist/pptx/render/customization/customization-reference.d.ts.map +1 -1
- package/dist/pptx/render/customization/customization-regions.d.ts +131 -0
- package/dist/pptx/render/customization/customization-regions.d.ts.map +1 -0
- package/dist/pptx/render/customization/customization-resolve-regions.d.ts +11 -0
- package/dist/pptx/render/customization/customization-resolve-regions.d.ts.map +1 -0
- package/dist/pptx/render/customization/customization-resolve.d.ts +21 -2
- package/dist/pptx/render/customization/customization-resolve.d.ts.map +1 -1
- package/dist/pptx/render/customization/customization-surfaces.d.ts +21 -0
- package/dist/pptx/render/customization/customization-surfaces.d.ts.map +1 -1
- package/dist/pptx/render/customization/customization-types.d.ts +28 -2
- package/dist/pptx/render/customization/customization-types.d.ts.map +1 -1
- package/dist/pptx/render/customization/index.d.ts +2 -0
- package/dist/pptx/render/customization/index.d.ts.map +1 -1
- package/dist/pptx/render/customization/ribbon-control-catalog-core.d.ts +34 -2
- package/dist/pptx/render/customization/ribbon-control-catalog-core.d.ts.map +1 -1
- package/dist/pptx/render/customization/ribbon-control-catalog.d.ts +34 -2
- package/dist/pptx/render/customization/ribbon-control-catalog.d.ts.map +1 -1
- package/dist/pptx/render/customization/ribbon-control-visibility.d.ts +6 -1
- package/dist/pptx/render/customization/ribbon-control-visibility.d.ts.map +1 -1
- package/dist/pptx/render/editor-chrome/ribbon-css.d.ts +1 -1
- package/dist/pptx/render/editor-chrome/ribbon-css.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +1 -1
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/morph-plan.d.ts.map +1 -1
- package/dist/pptx/render/ole-actions.d.ts +5 -3
- package/dist/pptx/render/ole-actions.d.ts.map +1 -1
- package/dist/pptx/render/options/index.d.ts +2 -0
- package/dist/pptx/render/options/index.d.ts.map +1 -1
- package/dist/pptx/render/options/options-dialog-binding.d.ts +60 -0
- package/dist/pptx/render/options/options-dialog-binding.d.ts.map +1 -0
- package/dist/pptx/render/options/options-dialog-model.d.ts +35 -0
- package/dist/pptx/render/options/options-dialog-model.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-insert-layout.d.ts +56 -0
- package/dist/pptx/render/ribbon-insert-layout.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-insert-state.d.ts +42 -2
- package/dist/pptx/render/ribbon-insert-state.d.ts.map +1 -1
- package/dist/pptx/render/viewer-props-manifest.d.ts +54 -0
- package/dist/pptx/render/viewer-props-manifest.d.ts.map +1 -0
- package/dist/pptx/web-components/index.d.ts.map +1 -1
- package/dist/pptx/web-components/office-aliases.d.ts +13 -0
- package/dist/pptx/web-components/office-aliases.d.ts.map +1 -1
- package/dist/pptx/web-components/office-token-bridge.d.ts +1 -1
- package/dist/pptx/web-components/office-token-bridge.d.ts.map +1 -1
- package/dist/pptx/web-components/options-dialog.d.ts +7 -0
- package/dist/pptx/web-components/options-dialog.d.ts.map +1 -0
- package/dist/pptx/web-components/ribbon-insert-dom.d.ts +28 -1
- package/dist/pptx/web-components/ribbon-insert-dom.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-insert-icons.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-insert-styles.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-insert-table-picker.d.ts +16 -0
- package/dist/pptx/web-components/ribbon-insert-table-picker.d.ts.map +1 -0
- package/dist/pptx/web-components/ribbon-insert-view.d.ts +2 -1
- package/dist/pptx/web-components/ribbon-insert-view.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-overflow.d.ts.map +1 -1
- package/dist/teams/activity-feed.d.ts +36 -0
- package/dist/teams/app/calendar-app.d.ts +2 -0
- package/dist/teams/app/chat-app.d.ts +11 -0
- package/dist/teams/app/chat-people-dialog.d.ts +38 -0
- package/dist/teams/app/controller.d.ts +3 -2
- package/dist/teams/app/dialog-base.d.ts +18 -0
- package/dist/teams/app/meeting-details.d.ts +63 -0
- package/dist/teams/app/meeting-dialog.d.ts +103 -0
- package/dist/teams/app/new-chat-dialog.d.ts +42 -0
- package/dist/teams/app/notify-delivery.d.ts +28 -0
- package/dist/teams/app/settings-notifications.d.ts +9 -0
- package/dist/teams/app/store.d.ts +1 -1
- package/dist/teams/app/teams-app.d.ts +65 -3
- package/dist/teams/app/teams-settings.d.ts +5 -1
- package/dist/teams/app/thread-pane.d.ts +1 -1
- package/dist/teams/app-rail.d.ts +15 -3
- package/dist/teams/base.d.ts +2 -0
- package/dist/teams/calendar-agenda.d.ts +30 -0
- package/dist/teams/calendar-view.d.ts +61 -0
- package/dist/teams/chat-composer.d.ts +32 -2
- package/dist/teams/chat-list.d.ts +32 -2
- package/dist/teams/chat-sidebar.d.ts +25 -0
- package/dist/teams/index.d.ts +6 -1
- package/dist/teams/people-picker.d.ts +37 -0
- package/dist/teams.js +2 -2
- package/dist/visio/locales/de-commands.d.ts +2 -0
- package/dist/visio/locales/de-text.d.ts +2 -0
- package/dist/visio/locales/en-commands.d.ts +2 -0
- package/dist/visio/locales/en-text.d.ts +2 -0
- package/dist/visio/locales/es-commands.d.ts +2 -0
- package/dist/visio/locales/es-text.d.ts +2 -0
- package/dist/visio/locales/fr-commands.d.ts +2 -0
- package/dist/visio/locales/fr-text.d.ts +2 -0
- package/dist/visio/locales/zh-CN-commands.d.ts +2 -0
- package/dist/visio/locales/zh-CN-text.d.ts +2 -0
- package/dist/visio/ribbon-home.d.ts +1 -1
- package/dist/visio/ribbon-locale.d.ts +11 -0
- package/dist/visio/ribbon-localize.d.ts +9 -0
- package/dist/visio/ribbon-tab-cue.d.ts +8 -0
- package/dist/visio/shapes-document.d.ts +5 -0
- package/dist/visio/shapes-files-ui.d.ts +13 -0
- package/dist/visio/shapes-master-list.d.ts +5 -0
- package/dist/visio/shapes-sections.d.ts +1 -4
- package/dist/visio/stencil-files.d.ts +36 -0
- package/dist/visio/styles.d.ts +1 -1
- package/dist/visio/viewer-chrome.d.ts +3 -3
- package/dist/visio/viewer-element.d.ts +2 -0
- package/dist/visio.js +2110 -150
- package/dist/xlsx/commands/slicers.d.ts +9 -0
- package/dist/xlsx/commands/view.d.ts +3 -0
- package/dist/xlsx/dialogs/pivot-field-settings.d.ts +7 -0
- package/dist/xlsx/dialogs/pivot-group-dates.d.ts +6 -0
- package/dist/xlsx/dialogs/pivot-group.d.ts +3 -0
- package/dist/xlsx/dialogs/pivot-rows.d.ts +21 -0
- package/dist/xlsx/dialogs/pivot-values.d.ts +1 -1
- package/dist/xlsx/dialogs/scenario-manager.d.ts +2 -0
- package/dist/xlsx/dialogs/slicers.d.ts +9 -0
- package/dist/xlsx/dialogs/styles.d.ts +1 -1
- package/dist/xlsx/dialogs/what-if.d.ts +5 -0
- package/dist/xlsx/grid/page-break-layer.d.ts +3 -0
- package/dist/xlsx/grid/slicer.d.ts +22 -0
- package/dist/xlsx/grid/styles.d.ts +1 -1
- package/dist/xlsx/grid/timeline.d.ts +12 -0
- package/dist/xlsx/modules.d.ts +1 -0
- package/dist/xlsx/page-views/index.d.ts +7 -0
- package/dist/xlsx/page-views/page-layout-bands.d.ts +17 -0
- package/dist/xlsx/page-views/page-layout-css.d.ts +1 -0
- package/dist/xlsx/page-views/page-layout-editor.d.ts +21 -0
- package/dist/xlsx/page-views/page-layout-rulers.d.ts +3 -0
- package/dist/xlsx/page-views/page-layout-view.d.ts +8 -0
- package/dist/xlsx/print-pages.d.ts +7 -1
- package/dist/xlsx/ribbon/tabs/contextual.d.ts +4 -0
- package/dist/xlsx.js +2718 -359
- package/package.json +2 -2
- package/dist/pptx/render/chart-number-format-pattern.d.ts +0 -35
- package/dist/pptx/render/chart-number-format-pattern.d.ts.map +0 -1
- package/dist/pptx/render/chart-number-format.d.ts +0 -21
- package/dist/pptx/render/chart-number-format.d.ts.map +0 -1
- package/dist/pptx/render/chart-waterfall-layout.d.ts +0 -20
- package/dist/pptx/render/chart-waterfall-layout.d.ts.map +0 -1
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/** Insert > Shapes, the Shape Format tab and the shape dialogs. Keys are the English UI text. */
|
|
2
|
+
export declare const enShapes: {
|
|
3
|
+
readonly 'tab.shape-format': 'Shape Format';
|
|
4
|
+
readonly Shapes: 'Shapes';
|
|
5
|
+
readonly Lines: 'Lines';
|
|
6
|
+
readonly Rectangles: 'Rectangles';
|
|
7
|
+
readonly 'Basic Shapes': 'Basic Shapes';
|
|
8
|
+
readonly 'Block Arrows': 'Block Arrows';
|
|
9
|
+
readonly Flowchart: 'Flowchart';
|
|
10
|
+
readonly Callouts: 'Callouts';
|
|
11
|
+
readonly 'Stars and Banners': 'Stars and Banners';
|
|
12
|
+
readonly Line: 'Line';
|
|
13
|
+
readonly 'Straight Connector': 'Straight Connector';
|
|
14
|
+
readonly 'Elbow Connector': 'Elbow Connector';
|
|
15
|
+
readonly 'Curved Connector': 'Curved Connector';
|
|
16
|
+
readonly Rectangle: 'Rectangle';
|
|
17
|
+
readonly 'Rounded Rectangle': 'Rounded Rectangle';
|
|
18
|
+
readonly 'Snip Single Corner': 'Snip Single Corner';
|
|
19
|
+
readonly 'Round Same-Side Corners': 'Round Same-Side Corners';
|
|
20
|
+
readonly Oval: 'Oval';
|
|
21
|
+
readonly Triangle: 'Triangle';
|
|
22
|
+
readonly 'Right Triangle': 'Right Triangle';
|
|
23
|
+
readonly Parallelogram: 'Parallelogram';
|
|
24
|
+
readonly Trapezoid: 'Trapezoid';
|
|
25
|
+
readonly Diamond: 'Diamond';
|
|
26
|
+
readonly Pentagon: 'Pentagon';
|
|
27
|
+
readonly Hexagon: 'Hexagon';
|
|
28
|
+
readonly Octagon: 'Octagon';
|
|
29
|
+
readonly Cross: 'Cross';
|
|
30
|
+
readonly Heart: 'Heart';
|
|
31
|
+
readonly 'Smiley Face': 'Smiley Face';
|
|
32
|
+
readonly Sun: 'Sun';
|
|
33
|
+
readonly Moon: 'Moon';
|
|
34
|
+
readonly 'Lightning Bolt': 'Lightning Bolt';
|
|
35
|
+
readonly Cylinder: 'Cylinder';
|
|
36
|
+
readonly Cube: 'Cube';
|
|
37
|
+
readonly 'Right Arrow': 'Right Arrow';
|
|
38
|
+
readonly 'Left Arrow': 'Left Arrow';
|
|
39
|
+
readonly 'Up Arrow': 'Up Arrow';
|
|
40
|
+
readonly 'Down Arrow': 'Down Arrow';
|
|
41
|
+
readonly 'Left-Right Arrow': 'Left-Right Arrow';
|
|
42
|
+
readonly 'Up-Down Arrow': 'Up-Down Arrow';
|
|
43
|
+
readonly 'Bent Arrow': 'Bent Arrow';
|
|
44
|
+
readonly 'U-Turn Arrow': 'U-Turn Arrow';
|
|
45
|
+
readonly Chevron: 'Chevron';
|
|
46
|
+
readonly 'Pentagon Arrow': 'Pentagon Arrow';
|
|
47
|
+
readonly 'Flowchart: Process': 'Flowchart: Process';
|
|
48
|
+
readonly 'Flowchart: Alternate Process': 'Flowchart: Alternate Process';
|
|
49
|
+
readonly 'Flowchart: Decision': 'Flowchart: Decision';
|
|
50
|
+
readonly 'Flowchart: Data': 'Flowchart: Data';
|
|
51
|
+
readonly 'Flowchart: Predefined Process': 'Flowchart: Predefined Process';
|
|
52
|
+
readonly 'Flowchart: Document': 'Flowchart: Document';
|
|
53
|
+
readonly 'Flowchart: Terminator': 'Flowchart: Terminator';
|
|
54
|
+
readonly 'Flowchart: Connector': 'Flowchart: Connector';
|
|
55
|
+
readonly 'Flowchart: Preparation': 'Flowchart: Preparation';
|
|
56
|
+
readonly 'Speech Bubble: Rectangle': 'Speech Bubble: Rectangle';
|
|
57
|
+
readonly 'Speech Bubble: Rectangle with Corners Rounded': 'Speech Bubble: Rectangle with Corners Rounded';
|
|
58
|
+
readonly 'Speech Bubble: Oval': 'Speech Bubble: Oval';
|
|
59
|
+
readonly 'Thought Bubble: Cloud': 'Thought Bubble: Cloud';
|
|
60
|
+
readonly 'Callout: Line': 'Callout: Line';
|
|
61
|
+
readonly 'Star: 4 Points': 'Star: 4 Points';
|
|
62
|
+
readonly 'Star: 5 Points': 'Star: 5 Points';
|
|
63
|
+
readonly 'Star: 6 Points': 'Star: 6 Points';
|
|
64
|
+
readonly 'Star: 8 Points': 'Star: 8 Points';
|
|
65
|
+
readonly 'Shape Styles': 'Shape Styles';
|
|
66
|
+
readonly 'Shape fill': 'Shape fill';
|
|
67
|
+
readonly 'Shape outline': 'Shape outline';
|
|
68
|
+
readonly 'Shape outline weight': 'Shape outline weight';
|
|
69
|
+
readonly 'No Fill': 'No Fill';
|
|
70
|
+
readonly 'No Outline': 'No Outline';
|
|
71
|
+
readonly 'Add Text': 'Add Text';
|
|
72
|
+
readonly Arrange: 'Arrange';
|
|
73
|
+
readonly 'Wrap text': 'Wrap text';
|
|
74
|
+
readonly 'In Line with Text': 'In Line with Text';
|
|
75
|
+
readonly Square: 'Square';
|
|
76
|
+
readonly Tight: 'Tight';
|
|
77
|
+
readonly Through: 'Through';
|
|
78
|
+
readonly 'Top and Bottom': 'Top and Bottom';
|
|
79
|
+
readonly 'Behind Text': 'Behind Text';
|
|
80
|
+
readonly 'In Front of Text': 'In Front of Text';
|
|
81
|
+
readonly 'Shape height (inches)': 'Shape height (inches)';
|
|
82
|
+
readonly 'Shape width (inches)': 'Shape width (inches)';
|
|
83
|
+
readonly '0.25 pt': '0.25 pt';
|
|
84
|
+
readonly '0.5 pt': '0.5 pt';
|
|
85
|
+
readonly '0.75 pt': '0.75 pt';
|
|
86
|
+
readonly '1 pt': '1 pt';
|
|
87
|
+
readonly '1.5 pt': '1.5 pt';
|
|
88
|
+
readonly '2.25 pt': '2.25 pt';
|
|
89
|
+
readonly '3 pt': '3 pt';
|
|
90
|
+
readonly '4.5 pt': '4.5 pt';
|
|
91
|
+
readonly '6 pt': '6 pt';
|
|
92
|
+
readonly 'Select a shape first.': 'Select a shape first.';
|
|
93
|
+
readonly 'This shape has formatted text that the editor cannot change.': 'This shape has formatted text that the editor cannot change.';
|
|
94
|
+
};
|
|
95
|
+
type Keys = keyof typeof enShapes;
|
|
96
|
+
export type ShapeStrings = Record<Keys, string>;
|
|
97
|
+
export declare const frShapes: ShapeStrings;
|
|
98
|
+
export declare const deShapes: ShapeStrings;
|
|
99
|
+
export declare const esShapes: ShapeStrings;
|
|
100
|
+
export declare const zhShapes: ShapeStrings;
|
|
101
|
+
export {};
|
|
@@ -43,6 +43,124 @@ export declare const strings: {
|
|
|
43
43
|
readonly 'Suppress for Current Paragraph': 'Suppress for Current Paragraph';
|
|
44
44
|
readonly 'Line Numbering Options\u2026': 'Line Numbering Options…';
|
|
45
45
|
readonly 'Enter whole numbers from 1 to 32767 and a distance from 0 to 22 inches.': 'Enter whole numbers from 1 to 32767 and a distance from 0 to 22 inches.';
|
|
46
|
+
readonly 'Content control': 'Content control';
|
|
47
|
+
readonly 'Rich text': 'Rich text';
|
|
48
|
+
readonly 'Plain text': 'Plain text';
|
|
49
|
+
readonly 'Check box': 'Check box';
|
|
50
|
+
readonly 'Drop-down list': 'Drop-down list';
|
|
51
|
+
readonly 'Combo box': 'Combo box';
|
|
52
|
+
readonly 'Date picker': 'Date picker';
|
|
53
|
+
readonly 'Properties\u2026': 'Properties…';
|
|
54
|
+
readonly 'Content control properties': 'Content control properties';
|
|
55
|
+
readonly Tag: 'Tag';
|
|
56
|
+
readonly 'Content control cannot be deleted': 'Content control cannot be deleted';
|
|
57
|
+
readonly 'Contents cannot be edited': 'Contents cannot be edited';
|
|
58
|
+
readonly 'Drop-down list entries (one per line)': 'Drop-down list entries (one per line)';
|
|
59
|
+
readonly 'Date display format': 'Date display format';
|
|
60
|
+
readonly 'Select a content control to edit its properties.': 'Select a content control to edit its properties.';
|
|
61
|
+
readonly 'Previous month': 'Previous month';
|
|
62
|
+
readonly 'Next month': 'Next month';
|
|
63
|
+
readonly Today: 'Today';
|
|
64
|
+
readonly 'Insert or Edit Equation\u2026': 'Insert or Edit Equation…';
|
|
65
|
+
readonly 'Area of Circle': 'Area of Circle';
|
|
66
|
+
readonly 'Quadratic Formula': 'Quadratic Formula';
|
|
67
|
+
readonly 'Pythagorean Theorem': 'Pythagorean Theorem';
|
|
68
|
+
readonly 'Binomial Theorem': 'Binomial Theorem';
|
|
69
|
+
readonly 'LaTeX equation': 'LaTeX equation';
|
|
70
|
+
readonly 'Display equation on its own line': 'Display equation on its own line';
|
|
71
|
+
readonly 'Type a LaTeX equation to see a preview.': 'Type a LaTeX equation to see a preview.';
|
|
72
|
+
readonly 'This LaTeX could not be converted to an equation.': 'This LaTeX could not be converted to an equation.';
|
|
73
|
+
readonly 'tab.shape-format': 'Shape Format';
|
|
74
|
+
readonly Shapes: 'Shapes';
|
|
75
|
+
readonly Lines: 'Lines';
|
|
76
|
+
readonly Rectangles: 'Rectangles';
|
|
77
|
+
readonly 'Basic Shapes': 'Basic Shapes';
|
|
78
|
+
readonly 'Block Arrows': 'Block Arrows';
|
|
79
|
+
readonly Flowchart: 'Flowchart';
|
|
80
|
+
readonly Callouts: 'Callouts';
|
|
81
|
+
readonly 'Stars and Banners': 'Stars and Banners';
|
|
82
|
+
readonly Line: 'Line';
|
|
83
|
+
readonly 'Straight Connector': 'Straight Connector';
|
|
84
|
+
readonly 'Elbow Connector': 'Elbow Connector';
|
|
85
|
+
readonly 'Curved Connector': 'Curved Connector';
|
|
86
|
+
readonly Rectangle: 'Rectangle';
|
|
87
|
+
readonly 'Rounded Rectangle': 'Rounded Rectangle';
|
|
88
|
+
readonly 'Snip Single Corner': 'Snip Single Corner';
|
|
89
|
+
readonly 'Round Same-Side Corners': 'Round Same-Side Corners';
|
|
90
|
+
readonly Oval: 'Oval';
|
|
91
|
+
readonly Triangle: 'Triangle';
|
|
92
|
+
readonly 'Right Triangle': 'Right Triangle';
|
|
93
|
+
readonly Parallelogram: 'Parallelogram';
|
|
94
|
+
readonly Trapezoid: 'Trapezoid';
|
|
95
|
+
readonly Diamond: 'Diamond';
|
|
96
|
+
readonly Pentagon: 'Pentagon';
|
|
97
|
+
readonly Hexagon: 'Hexagon';
|
|
98
|
+
readonly Octagon: 'Octagon';
|
|
99
|
+
readonly Cross: 'Cross';
|
|
100
|
+
readonly Heart: 'Heart';
|
|
101
|
+
readonly 'Smiley Face': 'Smiley Face';
|
|
102
|
+
readonly Sun: 'Sun';
|
|
103
|
+
readonly Moon: 'Moon';
|
|
104
|
+
readonly 'Lightning Bolt': 'Lightning Bolt';
|
|
105
|
+
readonly Cylinder: 'Cylinder';
|
|
106
|
+
readonly Cube: 'Cube';
|
|
107
|
+
readonly 'Right Arrow': 'Right Arrow';
|
|
108
|
+
readonly 'Left Arrow': 'Left Arrow';
|
|
109
|
+
readonly 'Up Arrow': 'Up Arrow';
|
|
110
|
+
readonly 'Down Arrow': 'Down Arrow';
|
|
111
|
+
readonly 'Left-Right Arrow': 'Left-Right Arrow';
|
|
112
|
+
readonly 'Up-Down Arrow': 'Up-Down Arrow';
|
|
113
|
+
readonly 'Bent Arrow': 'Bent Arrow';
|
|
114
|
+
readonly 'U-Turn Arrow': 'U-Turn Arrow';
|
|
115
|
+
readonly Chevron: 'Chevron';
|
|
116
|
+
readonly 'Pentagon Arrow': 'Pentagon Arrow';
|
|
117
|
+
readonly 'Flowchart: Process': 'Flowchart: Process';
|
|
118
|
+
readonly 'Flowchart: Alternate Process': 'Flowchart: Alternate Process';
|
|
119
|
+
readonly 'Flowchart: Decision': 'Flowchart: Decision';
|
|
120
|
+
readonly 'Flowchart: Data': 'Flowchart: Data';
|
|
121
|
+
readonly 'Flowchart: Predefined Process': 'Flowchart: Predefined Process';
|
|
122
|
+
readonly 'Flowchart: Document': 'Flowchart: Document';
|
|
123
|
+
readonly 'Flowchart: Terminator': 'Flowchart: Terminator';
|
|
124
|
+
readonly 'Flowchart: Connector': 'Flowchart: Connector';
|
|
125
|
+
readonly 'Flowchart: Preparation': 'Flowchart: Preparation';
|
|
126
|
+
readonly 'Speech Bubble: Rectangle': 'Speech Bubble: Rectangle';
|
|
127
|
+
readonly 'Speech Bubble: Rectangle with Corners Rounded': 'Speech Bubble: Rectangle with Corners Rounded';
|
|
128
|
+
readonly 'Speech Bubble: Oval': 'Speech Bubble: Oval';
|
|
129
|
+
readonly 'Thought Bubble: Cloud': 'Thought Bubble: Cloud';
|
|
130
|
+
readonly 'Callout: Line': 'Callout: Line';
|
|
131
|
+
readonly 'Star: 4 Points': 'Star: 4 Points';
|
|
132
|
+
readonly 'Star: 5 Points': 'Star: 5 Points';
|
|
133
|
+
readonly 'Star: 6 Points': 'Star: 6 Points';
|
|
134
|
+
readonly 'Star: 8 Points': 'Star: 8 Points';
|
|
135
|
+
readonly 'Shape Styles': 'Shape Styles';
|
|
136
|
+
readonly 'Shape fill': 'Shape fill';
|
|
137
|
+
readonly 'Shape outline': 'Shape outline';
|
|
138
|
+
readonly 'Shape outline weight': 'Shape outline weight';
|
|
139
|
+
readonly 'No Fill': 'No Fill';
|
|
140
|
+
readonly 'No Outline': 'No Outline';
|
|
141
|
+
readonly 'Add Text': 'Add Text';
|
|
142
|
+
readonly Arrange: 'Arrange';
|
|
143
|
+
readonly 'Wrap text': 'Wrap text';
|
|
144
|
+
readonly 'In Line with Text': 'In Line with Text';
|
|
145
|
+
readonly Square: 'Square';
|
|
146
|
+
readonly Tight: 'Tight';
|
|
147
|
+
readonly Through: 'Through';
|
|
148
|
+
readonly 'Top and Bottom': 'Top and Bottom';
|
|
149
|
+
readonly 'Behind Text': 'Behind Text';
|
|
150
|
+
readonly 'In Front of Text': 'In Front of Text';
|
|
151
|
+
readonly 'Shape height (inches)': 'Shape height (inches)';
|
|
152
|
+
readonly 'Shape width (inches)': 'Shape width (inches)';
|
|
153
|
+
readonly '0.25 pt': '0.25 pt';
|
|
154
|
+
readonly '0.5 pt': '0.5 pt';
|
|
155
|
+
readonly '0.75 pt': '0.75 pt';
|
|
156
|
+
readonly '1 pt': '1 pt';
|
|
157
|
+
readonly '1.5 pt': '1.5 pt';
|
|
158
|
+
readonly '2.25 pt': '2.25 pt';
|
|
159
|
+
readonly '3 pt': '3 pt';
|
|
160
|
+
readonly '4.5 pt': '4.5 pt';
|
|
161
|
+
readonly '6 pt': '6 pt';
|
|
162
|
+
readonly 'Select a shape first.': 'Select a shape first.';
|
|
163
|
+
readonly 'This shape has formatted text that the editor cannot change.': 'This shape has formatted text that the editor cannot change.';
|
|
46
164
|
readonly File: 'File';
|
|
47
165
|
readonly Alignment: 'Alignment';
|
|
48
166
|
readonly 'Quick access': 'Quick access';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Block, Note } from 'ooxml-core/docx';
|
|
1
|
+
import type { Block, Note, TextRun } from 'ooxml-core/docx';
|
|
2
2
|
import { type InlineEditorOptions } from './header-footer-editor.js';
|
|
3
3
|
import type { NoteKind } from './note-commands.js';
|
|
4
4
|
export interface NoteEditingOptions {
|
|
@@ -7,5 +7,11 @@ export interface NoteEditingOptions {
|
|
|
7
7
|
change(kind: NoteKind, id: string, blocks: Block[]): void;
|
|
8
8
|
editable(): boolean;
|
|
9
9
|
}
|
|
10
|
+
/** Splits off the note's automatic number mark so it can't be edited away. */
|
|
11
|
+
export declare function withoutMark(blocks: Block[]): {
|
|
12
|
+
editable: Block[];
|
|
13
|
+
mark?: TextRun;
|
|
14
|
+
};
|
|
15
|
+
export declare function withMark(blocks: Block[], mark: TextRun | undefined): Block[];
|
|
10
16
|
/** Double-click a footnote or endnote to edit its text in place. */
|
|
11
17
|
export declare function attachNoteEditing(root: HTMLElement, options: NoteEditingOptions): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReviewDisplayMode } from 'ooxml-core/docx';
|
|
1
|
+
import type { Block, ReviewDisplayMode } from 'ooxml-core/docx';
|
|
2
2
|
import { type Plugin } from 'prosemirror-state';
|
|
3
3
|
import type { EditorView } from 'prosemirror-view';
|
|
4
4
|
import type { EditorHost } from './editor-host.js';
|
|
@@ -36,6 +36,32 @@ export declare class PartsController {
|
|
|
36
36
|
/** Page-number insertion follows the first/even/default story currently being edited. */
|
|
37
37
|
activeHeaderFooterSlot(): HeaderFooterSlotName | undefined;
|
|
38
38
|
headerFooterContext(): HeaderFooterContext | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Edits a header or footer in place on a Print Layout page: `container` is that page's element.
|
|
41
|
+
* The ribbon then targets it (Header & Footer tab) until it closes, which calls `closed`.
|
|
42
|
+
*/
|
|
43
|
+
editOnPage(story: {
|
|
44
|
+
container: HTMLElement;
|
|
45
|
+
kind: 'headers' | 'footers';
|
|
46
|
+
slot: HeaderFooterSlotName;
|
|
47
|
+
sectionIndex: number;
|
|
48
|
+
blocks: Block[];
|
|
49
|
+
closed(): void;
|
|
50
|
+
}): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Edits a footnote or endnote in place on a Print Layout page: `container` is the element the
|
|
53
|
+
* note is drawn in. The ribbon targets the note until it closes (Escape, or focus leaving), which
|
|
54
|
+
* calls `closed`. `opened` receives the editor so the caller can place the caret.
|
|
55
|
+
*/
|
|
56
|
+
editNoteOnPage(story: {
|
|
57
|
+
container: HTMLElement;
|
|
58
|
+
kind: NoteKind;
|
|
59
|
+
id: string;
|
|
60
|
+
opened?(view: EditorView): void;
|
|
61
|
+
closed(): void;
|
|
62
|
+
}): boolean;
|
|
63
|
+
/** Closes the open header, footer or note editor, leaving the body focused. */
|
|
64
|
+
closeOpenStory(): void;
|
|
39
65
|
closeHeaderFooter(canvas?: HTMLElement, paper?: HTMLElement): void;
|
|
40
66
|
navigate(target: 'header' | 'footer' | 'previous' | 'next', canvas?: HTMLElement, paper?: HTMLElement): void;
|
|
41
67
|
toggleLink(): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which side of a boundary the caret sits on when one text offset belongs to two rendered lines
|
|
3
|
+
* (the end of a wrapped line and the start of the next, across a column or a page). Upstream is the
|
|
4
|
+
* end of the earlier line; downstream is the start of the later one.
|
|
5
|
+
*/
|
|
6
|
+
export type CaretAffinity = 'upstream' | 'downstream';
|
|
7
|
+
/** Lines of a block whose source range holds the offset, in reading order. */
|
|
8
|
+
export declare function candidateLines(block: readonly HTMLElement[], offset: number): HTMLElement[];
|
|
9
|
+
/** Pick the line a caret at `offset` is drawn on. */
|
|
10
|
+
export declare function lineForCaret(block: readonly HTMLElement[], offset: number, affinity: CaretAffinity): HTMLElement | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Affinity a caret placed at `offset` on `line` has: upstream when the offset is the line's end and
|
|
13
|
+
* a later line of the same block starts there, downstream otherwise.
|
|
14
|
+
*/
|
|
15
|
+
export declare function affinityOnLine(line: HTMLElement, offset: number, block: readonly HTMLElement[]): CaretAffinity;
|
|
@@ -24,6 +24,7 @@ export declare class PrintEditingIndex {
|
|
|
24
24
|
between(from: number, to: number): Iterable<PrintParagraphPosition>;
|
|
25
25
|
at(pos: number): PrintParagraphPosition | undefined;
|
|
26
26
|
block(id: string): readonly HTMLElement[];
|
|
27
|
+
has(line: HTMLElement): boolean;
|
|
27
28
|
adjacent(line: HTMLElement, direction: number): HTMLElement;
|
|
28
29
|
pageStep(line: HTMLElement, direction: number): HTMLElement;
|
|
29
30
|
nearest(x: number, y: number): HTMLElement | undefined;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { type CaretAffinity } from './print-caret-affinity.js';
|
|
1
2
|
import type { EditorView } from 'prosemirror-view';
|
|
2
3
|
export interface PrintEditingBridge {
|
|
3
4
|
setActive(active: boolean): void;
|
|
4
5
|
refresh(): void;
|
|
5
6
|
destroy(): void;
|
|
6
|
-
select(blockId: string, offset: number, extend?: boolean): boolean;
|
|
7
|
+
select(blockId: string, offset: number, extend?: boolean, affinity?: CaretAffinity): boolean;
|
|
7
8
|
/** Place the caret on the line nearest a viewport point (the gutter beside the pages). */
|
|
8
9
|
selectNearest(clientX: number, clientY: number): boolean;
|
|
9
10
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { PicturePlacement } from 'ooxml-core/docx';
|
|
2
|
+
/** A floating object's rectangle on its page, in CSS pixels. */
|
|
3
|
+
export interface FloatBox {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
}
|
|
9
|
+
export type FloatHandle = 'nw' | 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w';
|
|
10
|
+
export declare const FLOAT_HANDLES: readonly FloatHandle[];
|
|
11
|
+
export declare const MIN_FLOAT_SIZE = 16;
|
|
12
|
+
/** One arrow press moves a selected float by this much (Ctrl+arrow moves 1px). */
|
|
13
|
+
export declare const NUDGE_PX = 6;
|
|
14
|
+
/**
|
|
15
|
+
* Resizes `start` by dragging `handle` by (`dx`, `dy`). Corner handles keep the aspect ratio when
|
|
16
|
+
* `lockAspect` is set (pictures), averaging the two axes the way Word's proportional resize
|
|
17
|
+
* feels; edge handles change one dimension. The opposite edge or corner stays fixed.
|
|
18
|
+
*/
|
|
19
|
+
export declare function resizeBox(start: FloatBox, handle: FloatHandle, dx: number, dy: number, lockAspect: boolean): FloatBox;
|
|
20
|
+
export declare function moveBox(start: FloatBox, dx: number, dy: number): FloatBox;
|
|
21
|
+
/**
|
|
22
|
+
* The placement that puts a float at `box`: offsets from the frame origin, with any alignment
|
|
23
|
+
* dropped (the offset now says where it is). Wrapping, anchoring and frames are kept.
|
|
24
|
+
*/
|
|
25
|
+
export declare function placementAt(placement: PicturePlacement | undefined, box: FloatBox, origin: {
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
}): PicturePlacement;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { PicturePlacement, ShapeSpec } from 'ooxml-core/docx';
|
|
2
|
+
import type { Node as ProseMirrorNode } from 'prosemirror-model';
|
|
3
|
+
import { type EditorState } from 'prosemirror-state';
|
|
4
|
+
import type { FloatBox, FloatHandle } from './print-float-geometry.js';
|
|
5
|
+
export interface Located {
|
|
6
|
+
pos: number;
|
|
7
|
+
node: ProseMirrorNode;
|
|
8
|
+
blockId: string;
|
|
9
|
+
index: number;
|
|
10
|
+
}
|
|
11
|
+
/** A float the page can select: an anchored picture with media bytes, or an anchored shape. */
|
|
12
|
+
export declare const isFloat: (node: ProseMirrorNode) => boolean;
|
|
13
|
+
/** Whether a float is a drawing shape or text box rather than a picture. */
|
|
14
|
+
export declare const isShapeFloat: (node: ProseMirrorNode) => boolean;
|
|
15
|
+
/** The shape spec of a float, when it is a shape. */
|
|
16
|
+
export declare function shapeSpecOf(node: ProseMirrorNode): ShapeSpec | undefined;
|
|
17
|
+
/** The float `index` of a paragraph, in run order. */
|
|
18
|
+
export declare function locateFloat(doc: ProseMirrorNode, blockId: string, index: number): Located | undefined;
|
|
19
|
+
/** The floating object a node selection holds, with its paragraph id and index. */
|
|
20
|
+
export declare function selectedFloat(state: EditorState): Located | undefined;
|
|
21
|
+
export declare const number: (value: string | undefined) => number;
|
|
22
|
+
export declare function boxOf(element: HTMLElement): FloatBox;
|
|
23
|
+
export declare function place(element: HTMLElement, box: FloatBox): void;
|
|
24
|
+
export declare const CURSORS: Record<FloatHandle, string>;
|
|
25
|
+
export declare function parsePlacement(value: unknown): PicturePlacement | undefined;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { EditorView } from 'prosemirror-view';
|
|
2
|
+
export { locateFloat, selectedFloat } from './print-float-locate.js';
|
|
3
|
+
export interface PrintFloatHost {
|
|
4
|
+
/** The `.dve-print-pages` element. */
|
|
5
|
+
pages: HTMLElement;
|
|
6
|
+
/** The editing surface whose keys a selected float takes over. */
|
|
7
|
+
paper: HTMLElement;
|
|
8
|
+
view(): EditorView | undefined;
|
|
9
|
+
printActive(): boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface PrintFloats {
|
|
12
|
+
/** Redraws the selection frame; call after transactions and layouts. */
|
|
13
|
+
refresh(): void;
|
|
14
|
+
destroy(): void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Floating pictures, shapes and text boxes on Print Layout pages are selectable like in Word: a press selects the object
|
|
18
|
+
* (the same node selection the Draft surface uses) and draws a frame with eight handles; dragging
|
|
19
|
+
* moves it, corner handles resize it (keeping the aspect ratio for pictures; a second press on a shape
|
|
20
|
+
* that holds text, or a double-click on any shape, edits its text in place), arrow keys nudge it and Delete
|
|
21
|
+
* removes it. Each gesture is one transaction, so it is one undo step. Pictures behind the text
|
|
22
|
+
* are only taken where no text is, so a press on text still places the caret.
|
|
23
|
+
*/
|
|
24
|
+
export declare function attachPrintFloatSelection(host: PrintFloatHost): PrintFloats;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EditorView } from 'prosemirror-view';
|
|
2
|
+
/**
|
|
3
|
+
* Edits the text of a floating shape or text box in place on its page: a textarea laid over the
|
|
4
|
+
* shape, one paragraph per line. Enter adds a line, Escape cancels, Ctrl+Enter or leaving the
|
|
5
|
+
* field applies it as one transaction (one undo step). Returns a function that applies and closes the editor
|
|
6
|
+
* ; undefined when the shape's text cannot be edited.
|
|
7
|
+
*/
|
|
8
|
+
export declare function editShapeText(view: EditorView, element: HTMLElement, lines: string[], onClose: () => void): (() => void) | undefined;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import type { EditorView } from 'prosemirror-view';
|
|
2
2
|
import type { PrintEditingIndex } from './print-editing-index.js';
|
|
3
|
+
import { type CaretAffinity } from './print-caret-affinity.js';
|
|
3
4
|
interface Options {
|
|
4
5
|
active(): boolean;
|
|
5
6
|
getView(): EditorView | undefined;
|
|
6
7
|
index: PrintEditingIndex;
|
|
7
8
|
position(id: string, offset: number): number | undefined;
|
|
8
|
-
select(id: string, offset: number, extend?: boolean): boolean;
|
|
9
|
+
select(id: string, offset: number, extend?: boolean, affinity?: CaretAffinity): boolean;
|
|
9
10
|
resolveHit(target: Element, x: number): {
|
|
10
11
|
blockId: string;
|
|
11
12
|
offset: number;
|
|
12
13
|
} | null;
|
|
13
14
|
scrollContainer: HTMLElement;
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
/** Affinity of the current caret. */
|
|
16
|
+
affinity(): CaretAffinity;
|
|
16
17
|
}
|
|
17
18
|
export declare function printKeyboardNavigation(options: Options): (event: KeyboardEvent) => void;
|
|
18
19
|
export {};
|
|
@@ -32,6 +32,12 @@ export interface PrintLayoutController {
|
|
|
32
32
|
approximations(): string[];
|
|
33
33
|
/** Lays out immediately (no debounce) and opens the browser print dialog for the paginated render. */
|
|
34
34
|
print(model: DocumentModel, note: (message: string) => void): void;
|
|
35
|
+
/**
|
|
36
|
+
* Holds layout while an in-page header, footer or note editor is open (a relayout would replace
|
|
37
|
+
* the page it lives in); releasing lays out the latest model. `page` (a zero-based index) stays
|
|
38
|
+
* mounted while held, so scrolling a long document does not tear the open editor down.
|
|
39
|
+
*/
|
|
40
|
+
holdLayout(held: boolean, page?: number): void;
|
|
35
41
|
destroy(): void;
|
|
36
42
|
}
|
|
37
43
|
export declare function createPrintLayoutController(scrollContainer: HTMLElement, onRequestCursor: (blockId: string, offset: number) => void, pictureUrl?: PictureUrl, onLayout?: () => void, getReviewMode?: () => ReviewDisplayMode, isEditing?: () => boolean): PrintLayoutController;
|
|
@@ -8,7 +8,7 @@ export interface PrintLayoutHandle {
|
|
|
8
8
|
/** The scrollable element holding one sheet per page; mount this in the DOM. */
|
|
9
9
|
element: HTMLElement;
|
|
10
10
|
pageCount: number;
|
|
11
|
-
showPages(center: number, pinned?: number): void;
|
|
11
|
+
showPages(center: number, pinned?: number | readonly (number | undefined)[]): void;
|
|
12
12
|
renderAll(): void;
|
|
13
13
|
pageSnapshot(index: number): HTMLElement | undefined;
|
|
14
14
|
/**
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { DocumentModel } from 'ooxml-core/docx';
|
|
2
|
+
import type { EditorView } from 'prosemirror-view';
|
|
3
|
+
import type { NoteKind } from './note-commands.js';
|
|
4
|
+
import type { PartsController } from './parts-controller.js';
|
|
5
|
+
export interface PrintNoteHost {
|
|
6
|
+
/** The `.dve-print-pages` element. */
|
|
7
|
+
pages: HTMLElement;
|
|
8
|
+
parts: Pick<PartsController, 'editNoteOnPage' | 'closeOpenStory'>;
|
|
9
|
+
model(): DocumentModel;
|
|
10
|
+
/** The body editor, which keeps the caret outside the note. */
|
|
11
|
+
view(): EditorView | undefined;
|
|
12
|
+
printActive(): boolean;
|
|
13
|
+
/** `page` is the zero-based index of the page the open editor lives on. */
|
|
14
|
+
holdLayout(held: boolean, page?: number): void;
|
|
15
|
+
/** Mounts the page that holds a paragraph (virtualised documents). */
|
|
16
|
+
showBlock(id: string, offset: number): void;
|
|
17
|
+
}
|
|
18
|
+
interface NoteRef {
|
|
19
|
+
kind: NoteKind;
|
|
20
|
+
id: string;
|
|
21
|
+
/** Id of the note's first paragraph (where the automatic number mark sits). */
|
|
22
|
+
firstId: string;
|
|
23
|
+
}
|
|
24
|
+
/** Paragraph id to owning note, for every footnote and endnote paragraph in the model. */
|
|
25
|
+
export declare function noteParagraphs(model: DocumentModel): Map<string, NoteRef>;
|
|
26
|
+
/** The note a body reference mark under `target` points at, when it is one. */
|
|
27
|
+
export declare function referenceUnder(view: EditorView, target: Element): {
|
|
28
|
+
kind: NoteKind;
|
|
29
|
+
id: string;
|
|
30
|
+
} | undefined;
|
|
31
|
+
/** Position just after the body reference to a note, with the id of its paragraph. */
|
|
32
|
+
export declare function referencePosition(view: EditorView, ref: {
|
|
33
|
+
kind: NoteKind;
|
|
34
|
+
id: string;
|
|
35
|
+
}): {
|
|
36
|
+
pos: number;
|
|
37
|
+
blockId: string;
|
|
38
|
+
offset: number;
|
|
39
|
+
} | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Notes on Print Layout pages. A press on a note's text opens the note's own editor over it with
|
|
42
|
+
* the caret there; Escape, or a press anywhere else, returns to the body. Double-clicking a
|
|
43
|
+
* reference mark in the body jumps to its note, and double-clicking the number in the note jumps
|
|
44
|
+
* back to the reference, as in Word.
|
|
45
|
+
*/
|
|
46
|
+
export declare function attachPrintNoteEditing(host: PrintNoteHost): () => void;
|
|
47
|
+
export {};
|
|
@@ -10,7 +10,8 @@ export declare class PrintPageWindow {
|
|
|
10
10
|
mount(index: number): void;
|
|
11
11
|
private unmount;
|
|
12
12
|
private changed;
|
|
13
|
-
|
|
13
|
+
/** Mounts the pages around `center`; `pinned` pages stay mounted wherever the window is. */
|
|
14
|
+
show(center: number, pinned?: number | readonly (number | undefined)[]): void;
|
|
14
15
|
all(): void;
|
|
15
16
|
snapshot(index: number): HTMLElement | undefined;
|
|
16
17
|
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/** Resolves a package picture part to a displayable URL; undefined draws a placeholder box. */
|
|
2
2
|
export type PictureUrl = (partName: string, contentType: string) => string | undefined;
|
|
3
|
+
/**
|
|
4
|
+
* Strips the active content from a chart SVG before it is imported into the
|
|
5
|
+
* page: `<script>` and `<foreignObject>` elements, every `on*` event-handler
|
|
6
|
+
* attribute, and `href` / `xlink:href` values other than fragments or
|
|
7
|
+
* `data:image` URLs. Mirrors the rules of `src/core/docx/ui/chart-spec.ts`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function sanitizeChartSvg(svg: Element): void;
|
|
3
10
|
export declare function pictureElement(object: {
|
|
4
11
|
partName: string;
|
|
5
12
|
contentType: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DocumentModel } from 'ooxml-core/docx';
|
|
2
|
+
import type { PartsController } from './parts-controller.js';
|
|
3
|
+
export interface PrintStoryHost {
|
|
4
|
+
/** The `.dve-print-pages` element. */
|
|
5
|
+
pages: HTMLElement;
|
|
6
|
+
parts: Pick<PartsController, 'editOnPage' | 'closeOpenStory'>;
|
|
7
|
+
model(): DocumentModel;
|
|
8
|
+
printActive(): boolean;
|
|
9
|
+
/** `page` is the zero-based index of the page the open editor lives on. */
|
|
10
|
+
holdLayout(held: boolean, page?: number): void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Double-clicking a page's header or footer area edits it in place, as in Word: the body dims, the
|
|
14
|
+
* Header & Footer ribbon tab appears, and Escape or a double-click on the body closes it.
|
|
15
|
+
*/
|
|
16
|
+
export declare function attachPrintStoryEditing(host: PrintStoryHost): () => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PrintEditingIndex } from './print-editing-index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The line one step up or down from `line`. Outside tables that is the next rendered line; inside a
|
|
4
|
+
* table it stays in the cell, then moves to the cell of the next row under the same x, and leaves
|
|
5
|
+
* the table past its last or first row. Entering a table lands in the cell under `x`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function stepVertical(index: PrintEditingIndex, line: HTMLElement, direction: number, x: number): HTMLElement;
|
|
@@ -167,6 +167,21 @@ export type RibbonAction = {
|
|
|
167
167
|
key: 'toggle' | 'add' | 'delete' | 'previous' | 'next';
|
|
168
168
|
} | {
|
|
169
169
|
type: 'insertPicture';
|
|
170
|
+
} | {
|
|
171
|
+
type: 'shapePicker';
|
|
172
|
+
} | {
|
|
173
|
+
type: 'drawShape';
|
|
174
|
+
preset: string;
|
|
175
|
+
} | {
|
|
176
|
+
type: 'shape';
|
|
177
|
+
key: 'fill' | 'outline' | 'weight' | 'width' | 'height' | 'wrap';
|
|
178
|
+
value: string | number;
|
|
179
|
+
} | {
|
|
180
|
+
type: 'insertEquation';
|
|
181
|
+
id: 'area' | 'quadratic' | 'pythagorean' | 'binomial';
|
|
182
|
+
} | {
|
|
183
|
+
type: 'insertContentControl';
|
|
184
|
+
value: 'richText' | 'text' | 'checkbox' | 'dropDownList' | 'comboBox' | 'date';
|
|
170
185
|
} | {
|
|
171
186
|
type: 'formatPicture';
|
|
172
187
|
} | {
|
|
@@ -118,6 +118,9 @@ declare const paths: {
|
|
|
118
118
|
readonly watermark: 'M5 18L19 6 M7 8h4 M13 16h4';
|
|
119
119
|
readonly pageBorders: 'M4 4h16v16H4z M7 7h10v10H7z';
|
|
120
120
|
readonly textBox: 'M4 5h16v14H4z M8 10h8 M8 14h5';
|
|
121
|
+
readonly shapes: 'M4 14h8v6H4z M17 7.5a4 4 0 1 0 0 .01 M10 11l4-8 4 8z';
|
|
122
|
+
readonly equation: 'M18 5H7l6 7-6 7h11';
|
|
123
|
+
readonly contentControl: 'M4 7h16v12H4z M4 7V4h7v3 M8 12h8 M8 15h5';
|
|
121
124
|
readonly pageColor: 'M6 3h9l3 3v15H6z M9 11h6v6H9z';
|
|
122
125
|
readonly hyphenation: 'M4 6h16 M4 11h9 M16 11h4 M4 16h16 M13 11h3';
|
|
123
126
|
readonly caret: 'M7 10l5 5 5-5';
|
package/dist/docx/schema.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export { wordHighlightColors } from 'ooxml-core/docx/ui';
|
|
|
3
3
|
/** Single line spacing as a multiple of the font size, close to Calibri's and Arial's metrics. */
|
|
4
4
|
export declare const NATURAL_LINE_HEIGHT = 1.2;
|
|
5
5
|
export declare function paragraphStyle(attrs: Record<string, unknown>): string;
|
|
6
|
-
export declare const schema: Schema<"doc" | "equation" | "fieldMarker" | "hardBreak" | "image" | "nestedTablePreview" | "noteReference" | "pageBreak" | "paragraph" | "table" | "tableCell" | "tableRow" | "text", "bold" | "characterStyle" | "comment" | "deletion" | "field" | "font" | "highlight" | "inlineCommentAnchors" | "insertion" | "italic" | "language" | "link" | "runProperties" | "runRtl" | "strike" | "underline" | "verticalAlign">;
|
|
6
|
+
export declare const schema: Schema<"doc" | "equation" | "fieldMarker" | "hardBreak" | "image" | "nestedTablePreview" | "noteReference" | "pageBreak" | "paragraph" | "table" | "tableCell" | "tableRow" | "text", "bold" | "characterStyle" | "comment" | "contentControl" | "deletion" | "field" | "font" | "highlight" | "inlineCommentAnchors" | "insertion" | "italic" | "language" | "link" | "runProperties" | "runRtl" | "strike" | "underline" | "verticalAlign">;
|