ooxml-ui 1.19.0 → 1.21.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/README.md +42 -39
- package/custom-elements.json +13 -2
- package/dist/{chunk-SVRIVUWC.js → chunk-C7B7TJ2J.js} +1 -1
- package/dist/{chunk-ANPFMQ6E.js → chunk-QBXYGKPB.js} +1 -1
- package/dist/{chunk-CWBSXK7P.js → chunk-QLHCGV4C.js} +1 -1
- package/dist/{chunk-6Y7KR2I3.js → chunk-T5ARELU2.js} +1 -1
- package/dist/{chunk-SPRZIHUH.js → chunk-TJ245GDD.js} +37 -24
- package/dist/{chunk-QEIGB73C.js → chunk-VWN37QJI.js} +6 -5
- package/dist/{chunk-LD3K2RDN.js → chunk-XL77FR4B.js} +2 -0
- package/dist/{chunk-KNC2UEUR.js → chunk-YZH2QS7J.js} +1 -1
- package/dist/{chunk-KH2ZG3N6.js → chunk-ZUDY7TXD.js} +5 -5
- package/dist/controls.d.ts +1 -1
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +4 -4
- package/dist/docx/building-blocks-actions.d.ts +54 -0
- package/dist/docx/building-blocks-status.d.ts +34 -0
- package/dist/docx/building-blocks.d.ts +20 -4
- package/dist/docx/collaboration-room.d.ts +46 -0
- package/dist/docx/collaboration-session.d.ts +2 -0
- package/dist/docx/collaboration-types.d.ts +13 -0
- package/dist/docx/component.d.ts +13 -0
- package/dist/docx/editor-core.d.ts +8 -0
- package/dist/docx/element-api.d.ts +15 -0
- package/dist/docx/events.d.ts +4 -1
- package/dist/docx/field-update.d.ts +8 -4
- package/dist/docx/form-field-view.d.ts +3 -0
- package/dist/docx/index.d.ts +4 -1
- package/dist/docx/insert-controller.d.ts +2 -0
- package/dist/docx/locales/en-app.d.ts +1 -0
- package/dist/docx/locales/en.d.ts +1 -0
- package/dist/docx/localization-strings.d.ts +1 -0
- package/dist/docx/ribbon-popover.d.ts +5 -4
- package/dist/docx/surface-navigation.d.ts +8 -0
- package/dist/docx/table-model-adapter.d.ts +2 -0
- package/dist/docx.js +19915 -19031
- package/dist/form/color-grid.d.ts +21 -2
- package/dist/form/color-grid.d.ts.map +1 -1
- package/dist/index.js +9 -9
- package/dist/pptx/{chunk-NDAE3JFO.cjs → chunk-3ESFHUZI.cjs} +2 -0
- package/dist/pptx/{chunk-OQQQ2GBW.cjs → chunk-F4IP3UEX.cjs} +2310 -1361
- package/dist/pptx/{chunk-NLUVYOKN.mjs → chunk-L4HCXIRC.mjs} +2249 -1331
- package/dist/pptx/{chunk-UTFFX4M7.mjs → chunk-MK2ASJSY.mjs} +2 -0
- package/dist/pptx/dom/elements/text-warp.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +217 -216
- package/dist/pptx/dom/index.mjs +16 -15
- package/dist/pptx/index.cjs +3006 -2882
- package/dist/pptx/index.mjs +2 -2
- package/dist/pptx/render/collaboration-options.d.ts +31 -0
- package/dist/pptx/render/collaboration-options.d.ts.map +1 -0
- package/dist/pptx/render/collaboration-owned-session.d.ts +34 -0
- package/dist/pptx/render/collaboration-owned-session.d.ts.map +1 -0
- package/dist/pptx/render/collaboration-state.d.ts +37 -0
- package/dist/pptx/render/collaboration-state.d.ts.map +1 -0
- package/dist/pptx/render/embedded-font-bytes.d.ts +27 -0
- package/dist/pptx/render/embedded-font-bytes.d.ts.map +1 -0
- package/dist/pptx/render/embedded-font-trust.d.ts +48 -0
- package/dist/pptx/render/embedded-font-trust.d.ts.map +1 -0
- package/dist/pptx/render/embedded-fonts.d.ts +8 -18
- package/dist/pptx/render/embedded-fonts.d.ts.map +1 -1
- package/dist/pptx/render/font-weight-names.d.ts +66 -0
- package/dist/pptx/render/font-weight-names.d.ts.map +1 -0
- package/dist/pptx/render/google-webfonts.d.ts +9 -4
- package/dist/pptx/render/google-webfonts.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +5 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/morph-animation.d.ts +5 -1
- package/dist/pptx/render/morph-animation.d.ts.map +1 -1
- package/dist/pptx/render/morph-image-alpha.d.ts +49 -0
- package/dist/pptx/render/morph-image-alpha.d.ts.map +1 -0
- package/dist/pptx/render/morph-predicates.d.ts +7 -0
- package/dist/pptx/render/morph-predicates.d.ts.map +1 -1
- package/dist/pptx/render/paragraph-bullet-marker-style.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/gallery-placements.d.ts +2 -0
- package/dist/pptx/render/ribbon-galleries/gallery-placements.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/gallery-registry.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/gallery-types.d.ts +3 -1
- package/dist/pptx/render/ribbon-galleries/gallery-types.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/index.d.ts +1 -0
- package/dist/pptx/render/ribbon-galleries/index.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/text-warp-gallery.d.ts +19 -0
- package/dist/pptx/render/ribbon-galleries/text-warp-gallery.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-help-commands.d.ts +13 -0
- package/dist/pptx/render/ribbon-help-commands.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-record-commands.d.ts +4 -1
- package/dist/pptx/render/ribbon-record-commands.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-slide-show-commands.d.ts +6 -0
- package/dist/pptx/render/ribbon-slide-show-commands.d.ts.map +1 -1
- package/dist/pptx/render/slide-transition-css.d.ts.map +1 -1
- package/dist/pptx/render/table-cell-css.d.ts +12 -0
- package/dist/pptx/render/table-cell-css.d.ts.map +1 -1
- package/dist/pptx/render/table-style.d.ts +10 -1
- package/dist/pptx/render/table-style.d.ts.map +1 -1
- package/dist/pptx/render/text-block-style.d.ts.map +1 -1
- package/dist/pptx/render/text-east-asian-breaks.d.ts.map +1 -1
- package/dist/pptx/render/text-metric-tracking.d.ts.map +1 -1
- package/dist/pptx/render/text-run-gradient-span.d.ts.map +1 -1
- package/dist/pptx/render/text-run-style.d.ts.map +1 -1
- package/dist/pptx/render/text-tab-layout.d.ts.map +1 -1
- package/dist/pptx/render/text-warp-envelope-measure.d.ts.map +1 -1
- package/dist/pptx/render/text-warp-outline-font-cache.d.ts +2 -1
- package/dist/pptx/render/text-warp-outline-font-cache.d.ts.map +1 -1
- package/dist/pptx/render/text-warp-outline-webfont-fetch.d.ts.map +1 -1
- package/dist/pptx/render/theme-color-grid.d.ts +20 -0
- package/dist/pptx/render/theme-color-grid.d.ts.map +1 -0
- package/dist/pptx/render/used-fonts.d.ts.map +1 -1
- package/dist/pptx/render/viewer-props-manifest.d.ts.map +1 -1
- package/dist/pptx/theme/index.cjs +18 -18
- package/dist/pptx/theme/index.mjs +1 -1
- package/dist/pptx/types.d.ts +19 -1
- package/dist/pptx/types.d.ts.map +1 -1
- package/dist/pptx/web-components/index.d.ts +1 -0
- package/dist/pptx/web-components/index.d.ts.map +1 -1
- package/dist/pptx/web-components/office-aliases.d.ts +9 -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/ribbon-gallery.d.ts +1 -0
- package/dist/pptx/web-components/ribbon-gallery.d.ts.map +1 -1
- package/dist/presence.js +3 -3
- package/dist/ribbon/gallery.d.ts +4 -2
- package/dist/ribbon/gallery.d.ts.map +1 -1
- package/dist/smartart.js +3 -3
- package/dist/teams.js +6 -6
- package/dist/theme.js +2 -2
- package/dist/tokens.d.ts +1 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/visio/building-blocks-shapes.d.ts +9 -0
- package/dist/visio/building-blocks-toolbar.d.ts +87 -0
- package/dist/visio/building-blocks.d.ts +9 -32
- package/dist/visio/canvas-editing.d.ts +36 -0
- package/dist/visio/canvas-keys.d.ts +9 -0
- package/dist/visio/canvas-services.d.ts +18 -0
- package/dist/visio/collaboration-types.d.ts +3 -0
- package/dist/visio/controller.d.ts +25 -0
- package/dist/visio/diagram-tool.d.ts +6 -0
- package/dist/visio/index.d.ts +2 -1
- package/dist/visio/viewer-clipboard.d.ts +7 -1
- package/dist/visio/viewer-delete.d.ts +10 -0
- package/dist/visio/viewer-element.d.ts +13 -0
- package/dist/visio/viewer-presence-overlay.d.ts +12 -0
- package/dist/visio/viewer-presence.d.ts +19 -0
- package/dist/visio/viewer-share-sync.d.ts +27 -0
- package/dist/visio/viewer-share.d.ts +23 -7
- package/dist/visio/viewer-stencil.d.ts +8 -0
- package/dist/visio/viewer-write-back.d.ts +27 -0
- package/dist/visio.js +19771 -18982
- package/dist/xlsx/building-blocks.d.ts +32 -0
- package/dist/xlsx/collaboration-types.d.ts +7 -35
- package/dist/xlsx/editor-core.d.ts +8 -0
- package/dist/xlsx/element-api.d.ts +12 -1
- package/dist/xlsx/events.d.ts +12 -1
- package/dist/xlsx/index.d.ts +2 -1
- package/dist/xlsx/surface-actions.d.ts +26 -0
- package/dist/xlsx.js +154 -81
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineSmartArt } from './chunk-
|
|
2
|
-
import { TEAMS_TAGS, registerTeams } from './chunk-
|
|
3
|
-
import { installOfficeUiTheme } from './chunk-
|
|
4
|
-
import { registerControls } from './chunk-
|
|
5
|
-
import { definePresence } from './chunk-
|
|
1
|
+
import { defineSmartArt } from './chunk-QBXYGKPB.js';
|
|
2
|
+
import { TEAMS_TAGS, registerTeams } from './chunk-VWN37QJI.js';
|
|
3
|
+
import { installOfficeUiTheme } from './chunk-T5ARELU2.js';
|
|
4
|
+
import { registerControls } from './chunk-TJ245GDD.js';
|
|
5
|
+
import { definePresence } from './chunk-YZH2QS7J.js';
|
|
6
6
|
|
|
7
7
|
// src/index.ts
|
|
8
8
|
var OFFICE_UI_TAGS = [
|
package/dist/controls.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ import { defineColorCustom } from './form/color-custom.js';
|
|
|
44
44
|
import { defineChartPicker } from './dialog/chart-picker.js';
|
|
45
45
|
export { defineAccount, defineDialogFooter, definePasteOptions, defineRadio, defineReadOnlyBanner, defineRibbonToggle, defineSearchField, defineToasts, defineBackstage, defineCommentsPane, defineFindBar, defineGallery, definePrintPreview, defineRibbon, defineRibbonActions, defineRuler, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineTaskPane, defineTitleBar, defineToolbar, defineZoomSlider, defineSymbolPicker, defineColorGrid, defineColorCustom, defineChartPicker, };
|
|
46
46
|
export { OFFICE_SYMBOLS, parseOfficeSymbolCode } from './form/symbol-picker.js';
|
|
47
|
-
export type { OfficeColorPick, OfficeColorPickEvent, OfficeColorSource, OfficeUiColorGrid, } from './form/color-grid.js';
|
|
47
|
+
export type { OfficeColorPick, OfficeColorPickEvent, OfficeColorSource, OfficeThemeSwatchPosition, OfficeUiColorGrid, } from './form/color-grid.js';
|
|
48
48
|
export type { OfficeCommandEvent } from './ribbon/button.js';
|
|
49
49
|
export type { OfficeDialogCloseEvent, OfficeDialogCloseReason } from './dialog/dialog.js';
|
|
50
50
|
export type { OfficeSelectOption } from './form/select.js';
|
package/dist/controls.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../src/controls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EACN,qBA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oB,EACpB,KAAK,cAAc,EACnB,KAAK,eAAe,GACpB,MAAM,6BAA6B,CAAC;AAErC,mCAAmC;AACnC,eAAO,MAAM,gBAAgB,uvCA2CnB,CAAC;AAEX,kDAAkD;AAClD,wBAAgB,gBAAgB,CAAC,QAAQ,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAEvE"}
|
package/dist/controls.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { CONTROL_DEFINERS, DEFAULT_COMMENTS_LABELS, DEFAULT_OFFICE_PROFILE, EMPTY_MENU_STATE, OFFICE_AVATAR_SWATCHES, OFFICE_COLOR_SWATCHES, OFFICE_COLOR_SWATCH_HEXES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_SYMBOLS, OFFICE_TITLE_BAR_SEARCH_LIMIT, OFFICE_TOAST_VISIBLE_LIMIT, assignKeyTips, attachKeyTips, attachRibbonGroupOverflow, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, commentInitials, createRibbonOverflow, defineAccount, defineBackstage, defineButton, defineChartPicker, defineCheckbox, defineColorCustom, defineColorGrid, defineCommandSearch, defineCommentsPane, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineGallery, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonActions, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineSymbolPicker, defineTabStrip, defineTaskPane, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, fitRibbonGroups, formatCommentTime, nextEnabledIndex, optionText, optionsLabels, parseOfficeSymbolCode, parseSvgPreview, personalizeSection, profileInitials, readOfficeProfile, registerControls, rulerDivisions, runKeyTips, sanitizeOfficeProfile, typeAheadIndex, unavailableCategory, unavailableControl, userInterfaceSection, writeOfficeProfile } from './chunk-
|
|
1
|
+
export { CONTROL_DEFINERS, DEFAULT_COMMENTS_LABELS, DEFAULT_OFFICE_PROFILE, EMPTY_MENU_STATE, OFFICE_AVATAR_SWATCHES, OFFICE_COLOR_SWATCHES, OFFICE_COLOR_SWATCH_HEXES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_SYMBOLS, OFFICE_TITLE_BAR_SEARCH_LIMIT, OFFICE_TOAST_VISIBLE_LIMIT, assignKeyTips, attachKeyTips, attachRibbonGroupOverflow, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, commentInitials, createRibbonOverflow, defineAccount, defineBackstage, defineButton, defineChartPicker, defineCheckbox, defineColorCustom, defineColorGrid, defineCommandSearch, defineCommentsPane, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineGallery, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonActions, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineSymbolPicker, defineTabStrip, defineTaskPane, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, fitRibbonGroups, formatCommentTime, nextEnabledIndex, optionText, optionsLabels, parseOfficeSymbolCode, parseSvgPreview, personalizeSection, profileInitials, readOfficeProfile, registerControls, rulerDivisions, runKeyTips, sanitizeOfficeProfile, typeAheadIndex, unavailableCategory, unavailableControl, userInterfaceSection, writeOfficeProfile } from './chunk-TJ245GDD.js';
|
|
2
2
|
import './chunk-M6GF5ED2.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
3
|
+
import './chunk-YZH2QS7J.js';
|
|
4
|
+
import './chunk-QLHCGV4C.js';
|
|
5
|
+
import './chunk-XL77FR4B.js';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { EditorCore } from './editor-core.js';
|
|
2
|
+
import { type SearchStatus } from './search-controller.js';
|
|
3
|
+
/** What a host dialog gets to edit the link at the selection. The host draws the dialog. */
|
|
4
|
+
export interface HyperlinkRequest {
|
|
5
|
+
/** The link target at the selection, or null when the selection is not a link. */
|
|
6
|
+
readonly href: string | null;
|
|
7
|
+
/** The selected text, which becomes the link text. */
|
|
8
|
+
readonly text: string;
|
|
9
|
+
/** Applies `href`; `text` replaces the selection (or inserts at the caret) when given. */
|
|
10
|
+
apply(href: string, text?: string): boolean;
|
|
11
|
+
remove(): boolean;
|
|
12
|
+
}
|
|
13
|
+
/** Find and replace over the document. Find works while read-only; replace needs edit permission. */
|
|
14
|
+
export interface FindReplaceRequest {
|
|
15
|
+
readonly status: SearchStatus;
|
|
16
|
+
readonly canReplace: boolean;
|
|
17
|
+
search(query: string, caseSensitive?: boolean): SearchStatus;
|
|
18
|
+
findNext(): boolean;
|
|
19
|
+
findPrevious(): boolean;
|
|
20
|
+
replaceOne(replacement: string): boolean;
|
|
21
|
+
replaceAll(replacement: string): number;
|
|
22
|
+
}
|
|
23
|
+
/** A host picture picker hands the chosen file back through `insert`. */
|
|
24
|
+
export interface ImagePickerRequest {
|
|
25
|
+
insert(file: File): Promise<boolean>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Host-owned workflows for the surface. Each is named like the PowerPoint building blocks'
|
|
29
|
+
* `onOpen...` callbacks. A workflow without its callback reports as not enabled; the library never
|
|
30
|
+
* mounts a dialog of its own in surface mode.
|
|
31
|
+
*/
|
|
32
|
+
export interface SurfaceHostActions {
|
|
33
|
+
onOpenHyperlinkDialog?: ((request: HyperlinkRequest) => void) | undefined;
|
|
34
|
+
onOpenFindReplace?: ((request: FindReplaceRequest) => void) | undefined;
|
|
35
|
+
onOpenImagePicker?: ((request: ImagePickerRequest) => void) | undefined;
|
|
36
|
+
}
|
|
37
|
+
/** Enabled flags and openers for the host's link, find/replace and picture workflows. */
|
|
38
|
+
export declare function wordHostActionProps(core: EditorCore): {
|
|
39
|
+
/** Which workflows the host supplied a callback for, whether or not they are usable now. */
|
|
40
|
+
hostWorkflows: {
|
|
41
|
+
hyperlink: boolean;
|
|
42
|
+
findReplace: boolean;
|
|
43
|
+
picture: boolean;
|
|
44
|
+
};
|
|
45
|
+
canInsertLink: boolean;
|
|
46
|
+
canFindReplace: boolean;
|
|
47
|
+
canInsertPicture: boolean;
|
|
48
|
+
/** Opens the host's link dialog for the selection. Returns false when not enabled. */
|
|
49
|
+
openHyperlinkDialog: () => boolean;
|
|
50
|
+
/** Opens the host's find and replace workflow. Returns false when not enabled. */
|
|
51
|
+
openFindReplace: () => boolean;
|
|
52
|
+
/** Opens the host's picture picker. Returns false when not enabled. */
|
|
53
|
+
openImagePicker: () => boolean;
|
|
54
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { EditorCore } from './editor-core.js';
|
|
2
|
+
/**
|
|
3
|
+
* Page navigation state for custom controls. Pages exist only in Print Layout; in Draft the
|
|
4
|
+
* document is one continuous page and `pagesAvailable` is false.
|
|
5
|
+
*/
|
|
6
|
+
export declare function wordNavigationProps(core: EditorCore): {
|
|
7
|
+
labels: Record<string, string>;
|
|
8
|
+
viewMode: "draft" | "print";
|
|
9
|
+
/** False in Draft, where there are no pages to move between. */
|
|
10
|
+
pagesAvailable: boolean;
|
|
11
|
+
page: number;
|
|
12
|
+
pageCount: number;
|
|
13
|
+
pageText: string;
|
|
14
|
+
canGoPrevious: boolean;
|
|
15
|
+
canGoNext: boolean;
|
|
16
|
+
onGoToPage: (target: number) => boolean;
|
|
17
|
+
onPreviousPage: () => boolean;
|
|
18
|
+
onNextPage: () => boolean;
|
|
19
|
+
onViewModeChange: (mode: 'draft' | 'print') => boolean;
|
|
20
|
+
};
|
|
21
|
+
export type WordNavigationProps = ReturnType<typeof wordNavigationProps>;
|
|
22
|
+
/** Word count and zoom state for custom status controls. */
|
|
23
|
+
export declare function wordStatusProps(core: EditorCore): {
|
|
24
|
+
labels: Record<string, string>;
|
|
25
|
+
words: number;
|
|
26
|
+
wordText: string;
|
|
27
|
+
zoom: number;
|
|
28
|
+
minZoom: number;
|
|
29
|
+
maxZoom: number;
|
|
30
|
+
onZoomChange: (percent: number) => boolean;
|
|
31
|
+
onZoomIn: () => boolean;
|
|
32
|
+
onZoomOut: () => boolean;
|
|
33
|
+
};
|
|
34
|
+
export type WordStatusProps = ReturnType<typeof wordStatusProps>;
|
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
import type { EditorCore } from './editor-core.js';
|
|
2
|
+
export type WordAlignment = 'left' | 'center' | 'right' | 'justify';
|
|
3
|
+
/** The list kinds a control can apply; `remove` takes a paragraph out of its list. */
|
|
4
|
+
export type WordListChoice = 'bullet' | 'number';
|
|
5
|
+
/** The list the selection is in: a kind a control can apply, `other` for custom lists, or none. */
|
|
6
|
+
export type WordListState = WordListChoice | 'other' | null;
|
|
2
7
|
/** A snapshot of the current editor selection, with commands bound to the same editor. */
|
|
3
8
|
export declare function wordToolbarProps(core: EditorCore): {
|
|
9
|
+
hostWorkflows: {
|
|
10
|
+
hyperlink: boolean;
|
|
11
|
+
findReplace: boolean;
|
|
12
|
+
picture: boolean;
|
|
13
|
+
};
|
|
14
|
+
canInsertLink: boolean;
|
|
15
|
+
canFindReplace: boolean;
|
|
16
|
+
canInsertPicture: boolean;
|
|
17
|
+
openHyperlinkDialog: () => boolean;
|
|
18
|
+
openFindReplace: () => boolean;
|
|
19
|
+
openImagePicker: () => boolean;
|
|
4
20
|
labels: {
|
|
5
21
|
[k: string]: string;
|
|
6
22
|
};
|
|
7
23
|
canEdit: boolean;
|
|
8
|
-
list:
|
|
24
|
+
list: WordListState;
|
|
9
25
|
selection: {
|
|
10
26
|
from: number;
|
|
11
27
|
to: number;
|
|
@@ -15,7 +31,7 @@ export declare function wordToolbarProps(core: EditorCore): {
|
|
|
15
31
|
underline: boolean | null;
|
|
16
32
|
fontFamily: string | null;
|
|
17
33
|
fontSize: number | null;
|
|
18
|
-
alignment:
|
|
34
|
+
alignment: WordAlignment | null;
|
|
19
35
|
canUndo: boolean;
|
|
20
36
|
canRedo: boolean;
|
|
21
37
|
onBold: () => boolean;
|
|
@@ -23,8 +39,8 @@ export declare function wordToolbarProps(core: EditorCore): {
|
|
|
23
39
|
onUnderline: () => boolean;
|
|
24
40
|
onFontFamilyChange: (family: string) => boolean;
|
|
25
41
|
onFontSizeChange: (size: number) => boolean;
|
|
26
|
-
onAlignmentChange: (alignment:
|
|
27
|
-
onListChange: (kind:
|
|
42
|
+
onAlignmentChange: (alignment: WordAlignment) => boolean;
|
|
43
|
+
onListChange: (kind: WordListChoice | 'remove') => boolean;
|
|
28
44
|
onUndo: () => boolean;
|
|
29
45
|
onRedo: () => boolean;
|
|
30
46
|
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type CollabSession } from 'ooxml-core/collab';
|
|
2
|
+
import type { WordYjsOptions } from 'ooxml-core/docx/ui';
|
|
3
|
+
import type { EditorCore } from './editor-core.js';
|
|
4
|
+
import { type DocxCollaborationOptions, type DocxCollaborationState } from './collaboration-types.js';
|
|
5
|
+
/** What the controller needs from the editor. */
|
|
6
|
+
export interface RoomHost {
|
|
7
|
+
/** The editor is mounted with a view the document can be bound to. */
|
|
8
|
+
ready(): boolean;
|
|
9
|
+
/** A document is being loaded; joining waits for it. */
|
|
10
|
+
loading(): boolean;
|
|
11
|
+
author(): string;
|
|
12
|
+
join(session: CollabSession, options: WordYjsOptions): void;
|
|
13
|
+
leave(): void;
|
|
14
|
+
error(error: Error): void;
|
|
15
|
+
changed(state: DocxCollaborationState): void;
|
|
16
|
+
}
|
|
17
|
+
export declare class DocxRoom {
|
|
18
|
+
#private;
|
|
19
|
+
private readonly host;
|
|
20
|
+
constructor(host: RoomHost);
|
|
21
|
+
/** The options of the declarative `collaboration` property, if set. */
|
|
22
|
+
get wanted(): DocxCollaborationOptions | undefined;
|
|
23
|
+
/** Joined or joining through the property. */
|
|
24
|
+
get busy(): boolean;
|
|
25
|
+
/** The session of a join still waiting to bind, for `reconnectCollaboration`. */
|
|
26
|
+
get pendingSession(): CollabSession | undefined;
|
|
27
|
+
/** Declarative sharing: while set, the open document is shared; undefined leaves. */
|
|
28
|
+
want(options: DocxCollaborationOptions | undefined): void;
|
|
29
|
+
/** Forgets the property and leaves. True when there was anything to leave. */
|
|
30
|
+
stop(): boolean;
|
|
31
|
+
/** Leaves before the document is replaced; true when it was shared through the property. */
|
|
32
|
+
suspend(): boolean;
|
|
33
|
+
/** Joins the wanted room with the document now open. */
|
|
34
|
+
resume(): void;
|
|
35
|
+
/** The Yjs binding started or stopped (through the property or `startYjsCollaboration`). */
|
|
36
|
+
yjsChanged(session: CollabSession | undefined): void;
|
|
37
|
+
state(): DocxCollaborationState;
|
|
38
|
+
/** Leaves the room; a session the host passed in stays alive, one made here is destroyed. */
|
|
39
|
+
leave(): void;
|
|
40
|
+
}
|
|
41
|
+
/** Binds the open document to a synchronized session (the body of `startYjsCollaboration`). */
|
|
42
|
+
export declare function joinYjs(core: EditorCore, session: CollabSession, options: WordYjsOptions): void;
|
|
43
|
+
/** Detaches the Yjs binding, keeping its current content, comments and new picture parts. */
|
|
44
|
+
export declare function leaveYjs(core: EditorCore): void;
|
|
45
|
+
/** The controller of one editor, reporting through its events and error channel. */
|
|
46
|
+
export declare function roomFor(core: EditorCore): DocxRoom;
|
|
@@ -12,6 +12,8 @@ export declare class CollaborationSession {
|
|
|
12
12
|
yjs?: WordYjsCollaboration | undefined;
|
|
13
13
|
presence?: EditorPresence | undefined;
|
|
14
14
|
ids?: ((kind: string) => string) | undefined;
|
|
15
|
+
/** Called after a Yjs binding starts (with its session) or stops (undefined). */
|
|
16
|
+
onYjsChange?: ((session: CollabSession | undefined) => void) | undefined;
|
|
15
17
|
private sendScheduled;
|
|
16
18
|
constructor(element: HTMLElement, getView: () => EditorView | undefined);
|
|
17
19
|
get active(): boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CollaborationOptions, CollaborationState, Collaborator } from 'ooxml-core/collab';
|
|
2
|
+
/**
|
|
3
|
+
* How to join a shared document (see `CollaborationOptions`): `session`, `provider`, `serverUrl`,
|
|
4
|
+
* else a BroadcastChannel. The user name defaults to `reviewAuthor`. The room name doubles as the
|
|
5
|
+
* Word `documentId`, so every participant must have loaded the same source package. `intent:
|
|
6
|
+
* 'join'` never seeds an empty room; anything else lets this window seed it.
|
|
7
|
+
*/
|
|
8
|
+
export type DocxCollaborationOptions = CollaborationOptions;
|
|
9
|
+
/** One person in the room, as `collaboration-change` lists them. */
|
|
10
|
+
export type DocxCollaborator = Collaborator;
|
|
11
|
+
/** Collaboration state, reported by `collaborationState` and the `collaboration-change` event. */
|
|
12
|
+
export type DocxCollaborationState = CollaborationState;
|
|
13
|
+
export declare const OFF_STATE: DocxCollaborationState;
|
package/dist/docx/component.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DocumentModel } from 'ooxml-core/docx';
|
|
2
2
|
import type { CollaborationConfig, ClientReceiveResult, StepBatch } from 'ooxml-core/docx/ui';
|
|
3
3
|
import { type EditorTheme, type EditorThemeMode } from 'ooxml-core/docx/ui';
|
|
4
|
+
import type { DocxCollaborationOptions } from './collaboration-types.js';
|
|
4
5
|
import { EditorCore, type LoadedDocument } from './editor-core.js';
|
|
5
6
|
import { DocxEditorApi } from './element-api.js';
|
|
6
7
|
import { type DocxEditorEventMap } from './events.js';
|
|
@@ -42,6 +43,18 @@ export declare class DocxEditorElement extends DocxEditorApi {
|
|
|
42
43
|
set documentModel(value: DocumentModel | null);
|
|
43
44
|
get readOnly(): boolean;
|
|
44
45
|
set readOnly(value: boolean);
|
|
46
|
+
/**
|
|
47
|
+
* Shares the loaded document in a room while set; `null` leaves (see
|
|
48
|
+
* `DocxCollaborationOptions`). A document loaded later is shared too: the editor leaves
|
|
49
|
+
* before it is replaced and rejoins after. With `intent: 'join'` an empty room is never seeded.
|
|
50
|
+
* Race: with the default `create`, two windows that open one empty room at the same moment both
|
|
51
|
+
* seed it and the room holds both bodies, so give exactly one window `create` and the others
|
|
52
|
+
* `join`. A room name is also the Word `documentId`: nothing verifies that every window
|
|
53
|
+
* loaded the same source package. A viewer `user.role` blocks local edits (advisory).
|
|
54
|
+
* Leaving keeps the content; a session the editor opened is destroyed, a host `session` is not.
|
|
55
|
+
*/
|
|
56
|
+
get collaboration(): DocxCollaborationOptions | null;
|
|
57
|
+
set collaboration(value: DocxCollaborationOptions | null | undefined);
|
|
45
58
|
connectedCallback(): void;
|
|
46
59
|
disconnectedCallback(): void;
|
|
47
60
|
load(input: Uint8Array | ArrayBuffer): Promise<void>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SurfaceHostActions } from './building-blocks-actions.js';
|
|
1
2
|
import type { RibbonAddInTab } from '../ribbon/add-in-tabs.js';
|
|
2
3
|
import { FormatDialogs } from './format-dialogs.js';
|
|
3
4
|
import type { EditorState, Transaction } from 'prosemirror-state';
|
|
@@ -6,6 +7,7 @@ import type { DocumentModel } from 'ooxml-core/docx';
|
|
|
6
7
|
import type { loadDocument } from 'ooxml-core/docx/load';
|
|
7
8
|
import type { SearchPanelHandle } from './search-panel.js';
|
|
8
9
|
import { CollaborationSession } from './collaboration-session.js';
|
|
10
|
+
import { type DocxRoom } from './collaboration-room.js';
|
|
9
11
|
import type { EditorTheme, EditorThemeMode } from 'ooxml-core/docx/ui';
|
|
10
12
|
import type { EditorLocale } from './localization.js';
|
|
11
13
|
import type { PrintEditingBridge } from './print-editing.js';
|
|
@@ -41,6 +43,8 @@ export interface ShellParts {
|
|
|
41
43
|
printNoteEditing?: () => void;
|
|
42
44
|
/** Selection frame and gestures for floating pictures on the pages. */
|
|
43
45
|
printFloats?: PrintFloats;
|
|
46
|
+
/** Detaches read-only selection and keyboard navigation of the surface. */
|
|
47
|
+
surfaceNavigation?: () => void;
|
|
44
48
|
navigator?: PageNavigator;
|
|
45
49
|
headings?: HeadingNavigator;
|
|
46
50
|
}
|
|
@@ -61,6 +65,8 @@ export declare class EditorCore {
|
|
|
61
65
|
readOnly: boolean;
|
|
62
66
|
/** Set before mounting to render only the document surface. */
|
|
63
67
|
surfaceOnly: boolean;
|
|
68
|
+
/** Host-owned workflows for surface mode (link, find and replace, picture picker). */
|
|
69
|
+
surfaceActions: SurfaceHostActions;
|
|
64
70
|
locale: EditorLocale;
|
|
65
71
|
reviewAuthor: string;
|
|
66
72
|
theme: EditorThemeMode;
|
|
@@ -71,6 +77,8 @@ export declare class EditorCore {
|
|
|
71
77
|
pendingFileName?: string;
|
|
72
78
|
readonly shell: ShellParts;
|
|
73
79
|
readonly collab: CollaborationSession;
|
|
80
|
+
/** The declarative `collaboration` property and the Yjs state reporting. */
|
|
81
|
+
readonly room: DocxRoom;
|
|
74
82
|
readonly inserts: InsertController;
|
|
75
83
|
readonly formatDialogs: FormatDialogs;
|
|
76
84
|
readonly imageMedia: ImageMediaCache;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { RibbonAddInTab } from '../ribbon/add-in-tabs.js';
|
|
2
2
|
import type { CollabSession } from 'ooxml-core/collab';
|
|
3
3
|
import type { WordYjsOptions } from 'ooxml-core/docx/ui';
|
|
4
|
+
import type { DocxCollaborationState } from './collaboration-types.js';
|
|
4
5
|
import type { EditorCore } from './editor-core.js';
|
|
5
6
|
import { type RibbonActionId, type RibbonActionInput } from 'ooxml-core/docx/ui';
|
|
6
7
|
import { type WordToolbarProps } from './building-blocks.js';
|
|
8
|
+
import { type WordNavigationProps, type WordStatusProps } from './building-blocks-status.js';
|
|
9
|
+
import type { SurfaceHostActions } from './building-blocks-actions.js';
|
|
7
10
|
declare const HTMLElementBase: typeof HTMLElement;
|
|
8
11
|
/**
|
|
9
12
|
* Save, collaboration, dirty-tracking and UI-customisation surface of `<docx-editor>`.
|
|
@@ -14,6 +17,16 @@ export declare abstract class DocxEditorApi extends HTMLElementBase {
|
|
|
14
17
|
get surfaceOnly(): boolean;
|
|
15
18
|
set surfaceOnly(value: boolean);
|
|
16
19
|
getToolbarProps(): WordToolbarProps;
|
|
20
|
+
/** Page, view mode and navigation callbacks for custom page controls. */
|
|
21
|
+
getNavigationProps(): WordNavigationProps;
|
|
22
|
+
/** Word count and zoom for custom status controls. */
|
|
23
|
+
getStatusProps(): WordStatusProps;
|
|
24
|
+
/**
|
|
25
|
+
* Host-owned dialogs for surface mode: `onOpenHyperlinkDialog`, `onOpenFindReplace` and
|
|
26
|
+
* `onOpenImagePicker`. A workflow without its callback is reported as not enabled.
|
|
27
|
+
*/
|
|
28
|
+
get surfaceActions(): SurfaceHostActions;
|
|
29
|
+
set surfaceActions(value: SurfaceHostActions);
|
|
17
30
|
get loading(): boolean;
|
|
18
31
|
/** Selection and formatting updates, including changes which do not dirty the document. */
|
|
19
32
|
subscribeEditorState(listener: () => void): () => void;
|
|
@@ -22,6 +35,8 @@ export declare abstract class DocxEditorApi extends HTMLElementBase {
|
|
|
22
35
|
abstract reviewAuthor: string;
|
|
23
36
|
/** Join a synchronized Yjs room after loading its matching source package. */
|
|
24
37
|
startYjsCollaboration(session: CollabSession, options: WordYjsOptions): void;
|
|
38
|
+
/** Who is in the room, and whether it is synced; the off state when not sharing. */
|
|
39
|
+
get collaborationState(): DocxCollaborationState;
|
|
25
40
|
reconnectCollaboration(): void;
|
|
26
41
|
resyncCollaboration(): boolean;
|
|
27
42
|
publishPresence(profile: {
|
package/dist/docx/events.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DocumentModel } from 'ooxml-core/docx';
|
|
2
2
|
import type { RibbonAddInCommandDetail } from 'ooxml-core/ribbon';
|
|
3
3
|
import type { StepBatch } from 'ooxml-core/docx/ui';
|
|
4
|
+
import type { DocxCollaborationState } from './collaboration-types.js';
|
|
4
5
|
import type { FileCommandDetail } from './file-commands.js';
|
|
5
6
|
import type { PageChangeDetail } from './page-sync.js';
|
|
6
7
|
import type { PresenceMessage } from './presence.js';
|
|
@@ -29,6 +30,8 @@ export interface DocxEditorEventMap {
|
|
|
29
30
|
'presence-send': CustomEvent<PresenceMessage>;
|
|
30
31
|
/** Local steps are pending; transport the batch to the collaboration authority. */
|
|
31
32
|
'collaboration-send': CustomEvent<StepBatch>;
|
|
33
|
+
/** Sharing started, stopped, reconnected, synced or the people in the room changed. */
|
|
34
|
+
'collaboration-change': CustomEvent<DocxCollaborationState>;
|
|
32
35
|
/** A command of a host tab (`ribbonAddIns`) was chosen. */
|
|
33
36
|
'office-ribbon-add-in': CustomEvent<RibbonAddInCommandDetail>;
|
|
34
37
|
}
|
|
@@ -36,7 +39,7 @@ export type DocxEditorEventName = keyof DocxEditorEventMap;
|
|
|
36
39
|
/** Detail payload type of the named event. */
|
|
37
40
|
export type DocxEditorEventDetail<K extends DocxEditorEventName> = DocxEditorEventMap[K] extends CustomEvent<infer D> ? D : never;
|
|
38
41
|
/** Runtime list of every event name; the `satisfies` check keeps it a subset of the map. */
|
|
39
|
-
export declare const DOCX_EDITOR_EVENTS: readonly ["document-change", "document-error", "document-warning", "readonly-change", "ribbon-action", "ribbon-customize", "file-command", "page-change", "dirty-change", "presence-send", "collaboration-send", "office-ribbon-add-in"];
|
|
42
|
+
export declare const DOCX_EDITOR_EVENTS: readonly ["document-change", "document-error", "document-warning", "readonly-change", "ribbon-action", "ribbon-customize", "file-command", "page-change", "dirty-change", "presence-send", "collaboration-send", "collaboration-change", "office-ribbon-add-in"];
|
|
40
43
|
/** Typed listener for plain elements (such as the ribbon) that are not a `<docx-editor>`. */
|
|
41
44
|
export declare function on<K extends DocxEditorEventName>(target: EventTarget, name: K, listener: (event: DocxEditorEventMap[K]) => void): void;
|
|
42
45
|
/**
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
+
import { type DocumentModel } from 'ooxml-core/docx';
|
|
1
2
|
import type { Transaction } from 'prosemirror-state';
|
|
2
3
|
import type { EditorView } from 'prosemirror-view';
|
|
3
4
|
/**
|
|
4
5
|
* Word's Update Field for the whole body: every `SEQ` caption is renumbered, then `REF` results
|
|
5
6
|
* follow their bookmarked paragraph and `PAGEREF` results take the page from `pageOf`. A REF that
|
|
6
7
|
* pointed at a caption's label and number keeps showing the label; a longer result is treated as
|
|
7
|
-
* the entire caption.
|
|
8
|
-
*
|
|
8
|
+
* the entire caption. With the document's `model`, `STYLEREF` results take the nearest text in
|
|
9
|
+
* their style before the field, else after it, which an empty paragraph in the style makes empty
|
|
10
|
+
* (the field stays, with its instruction, and a later update fills it). Fields with other
|
|
11
|
+
* switches or a missing bookmark or style are left as they are. One undoable step; returns
|
|
12
|
+
* whether anything changed.
|
|
9
13
|
*/
|
|
10
|
-
export declare function updateFields(view: EditorView, pageOf: (id: string) => string | undefined): boolean;
|
|
14
|
+
export declare function updateFields(view: EditorView, pageOf: (id: string) => string | undefined, model?: DocumentModel): boolean;
|
|
11
15
|
/**
|
|
12
16
|
* The refresh behind `updateFields`, applied to `tr` so other commands (a new caption) can include
|
|
13
17
|
* it in their own undo step. Without `pageOf`, `PAGEREF` results are left alone: pages need a layout.
|
|
14
18
|
* With `captionsOnly`, only references that quote a caption are refreshed.
|
|
15
19
|
*/
|
|
16
|
-
export declare function refreshFieldResults(tr: Transaction, pageOf?: (id: string) => string | undefined, captionsOnly?: boolean): Transaction;
|
|
20
|
+
export declare function refreshFieldResults(tr: Transaction, pageOf?: (id: string) => string | undefined, captionsOnly?: boolean, model?: DocumentModel): Transaction;
|
package/dist/docx/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { DocxEditorElement, registerDocxEditor } from './component.js';
|
|
2
|
-
export type { WordToolbarProps } from './building-blocks.js';
|
|
2
|
+
export type { WordAlignment, WordListChoice, WordListState, WordToolbarProps, } from './building-blocks.js';
|
|
3
|
+
export type { WordNavigationProps, WordStatusProps } from './building-blocks-status.js';
|
|
4
|
+
export type { FindReplaceRequest, HyperlinkRequest, ImagePickerRequest, SurfaceHostActions, } from './building-blocks-actions.js';
|
|
3
5
|
export { DOCX_EDITOR_EVENTS } from './events.js';
|
|
4
6
|
export type { RibbonAction } from './ribbon.js';
|
|
5
7
|
export { RIBBON_ACTION_IDS, RIBBON_ACTION_LABELS, normalizeRibbonActions, isRibbonActionId, } from 'ooxml-core/docx/ui';
|
|
@@ -12,6 +14,7 @@ export type { DocxEditorAttribute } from './editor-attributes.js';
|
|
|
12
14
|
export { CollaborationClient, CollaborationAuthority } from 'ooxml-core/docx/ui';
|
|
13
15
|
export type { CollaborationConfig, StepBatch, ClientReceiveResult, AuthorityResult, } from 'ooxml-core/docx/ui';
|
|
14
16
|
export type { CollaborationAuthorityConfig } from 'ooxml-core/docx/ui';
|
|
17
|
+
export type { DocxCollaborationOptions, DocxCollaborationState, DocxCollaborator, } from './collaboration-types.js';
|
|
15
18
|
export type { WordYjsOptions } from 'ooxml-core/docx/ui';
|
|
16
19
|
export { createCollaborationAuthority } from './collaboration-model.js';
|
|
17
20
|
export { PresenceClient, PRESENCE_PALETTE } from './presence.js';
|
|
@@ -50,4 +50,6 @@ export declare class InsertController {
|
|
|
50
50
|
private applyRulerChange;
|
|
51
51
|
private setShowHidden;
|
|
52
52
|
private insertSelectedPicture;
|
|
53
|
+
/** Stages `file` and inserts it at the selection; false when it could not be inserted. */
|
|
54
|
+
insertPictureFile(file: File): Promise<boolean>;
|
|
53
55
|
}
|
|
@@ -124,6 +124,7 @@ export declare const enApp: {
|
|
|
124
124
|
readonly 'Next page section break': 'Next page section break';
|
|
125
125
|
readonly 'Continuous section break': 'Continuous section break';
|
|
126
126
|
readonly 'Next page': 'Next page';
|
|
127
|
+
readonly 'Previous page': 'Previous page';
|
|
127
128
|
readonly Continuous: 'Continuous';
|
|
128
129
|
readonly 'Page numbers': 'Page numbers';
|
|
129
130
|
readonly 'Page number format': 'Page number format';
|
|
@@ -287,6 +287,7 @@ export declare const en: {
|
|
|
287
287
|
readonly 'Next page section break': 'Next page section break';
|
|
288
288
|
readonly 'Continuous section break': 'Continuous section break';
|
|
289
289
|
readonly 'Next page': 'Next page';
|
|
290
|
+
readonly 'Previous page': 'Previous page';
|
|
290
291
|
readonly Continuous: 'Continuous';
|
|
291
292
|
readonly 'Page numbers': 'Page numbers';
|
|
292
293
|
readonly 'Page number format': 'Page number format';
|
|
@@ -284,6 +284,7 @@ export declare const strings: {
|
|
|
284
284
|
readonly 'Next page section break': 'Next page section break';
|
|
285
285
|
readonly 'Continuous section break': 'Continuous section break';
|
|
286
286
|
readonly 'Next page': 'Next page';
|
|
287
|
+
readonly 'Previous page': 'Previous page';
|
|
287
288
|
readonly Continuous: 'Continuous';
|
|
288
289
|
readonly 'Page numbers': 'Page numbers';
|
|
289
290
|
readonly 'Page number format': 'Page number format';
|
|
@@ -9,8 +9,9 @@ export declare function mountPopover(anchor: HTMLElement, pop: HTMLElement, expa
|
|
|
9
9
|
/** Opens a swatch grid under the caret button `anchor`. */
|
|
10
10
|
export declare function openSwatchPopover(anchor: HTMLElement, choices: Array<[string, string]>, choose: (value: string) => void): void;
|
|
11
11
|
/**
|
|
12
|
-
* Opens a scrolling list of `items` under a combo box, with `current`
|
|
13
|
-
* Up/Down move through the entries, Enter
|
|
14
|
-
* own font face.
|
|
12
|
+
* Opens a scrolling list of `items` under a combo box, with `current` (an entry, or its index when
|
|
13
|
+
* entries can repeat) marked and scrolled into view. Up/Down move through the entries, Enter
|
|
14
|
+
* chooses, Escape closes. `preview` sets each entry in its own font face. `choose` gets the entry
|
|
15
|
+
* and its index.
|
|
15
16
|
*/
|
|
16
|
-
export declare function openListPopover(anchor: HTMLElement, items: readonly string[], current: string, preview: boolean, choose: (value: string) => void): void;
|
|
17
|
+
export declare function openListPopover(anchor: HTMLElement, items: readonly string[], current: string | number, preview: boolean, choose: (value: string, index: number) => void): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EditorCore } from './editor-core.js';
|
|
2
|
+
/**
|
|
3
|
+
* A read-only surface still lets the reader focus the document, select text, move a caret with the
|
|
4
|
+
* keyboard and copy. ProseMirror renders a non-editable document without a caret, so the browser's
|
|
5
|
+
* own selection is followed and mirrored into the editor state: custom controls then see it through
|
|
6
|
+
* `selection` and the formatting snapshot. Nothing here writes to the document. Returns a disposer.
|
|
7
|
+
*/
|
|
8
|
+
export declare function attachSurfaceNavigation(core: EditorCore): () => void;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Node as ProseMirrorNode } from 'prosemirror-model';
|
|
2
2
|
import type { Paragraph, Table, TableStyleCatalog } from 'ooxml-core/docx';
|
|
3
3
|
export declare function tableNode(block: Table, paragraphNode: (paragraph: Paragraph) => ProseMirrorNode, tableStyles?: TableStyleCatalog, nested?: boolean): ProseMirrorNode;
|
|
4
|
+
/** The block control around a table as the editor holds it. */
|
|
5
|
+
export declare const tableControl: (node: ProseMirrorNode, prior?: Table) => Pick<Table, 'contentControl'>;
|
|
4
6
|
/** Reads editable formatting from nodes rather than a stale prior model. */
|
|
5
7
|
export declare function tableFormattingFromNode(node: ProseMirrorNode): {
|
|
6
8
|
rowProperties: Table['rowProperties'];
|