ooxml-ui 1.12.2 → 1.13.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 +19 -4
- package/dist/chrome/status-layout.d.ts +23 -0
- package/dist/{chunk-GI3WX6LZ.js → chunk-3XST4F6J.js} +1 -1
- package/dist/{chunk-S6ZXU442.js → chunk-7E3HU7RL.js} +1 -1
- package/dist/{chunk-PXIYHFZ5.js → chunk-ANPFMQ6E.js} +1 -1
- package/dist/{chunk-FUQYUUIQ.js → chunk-BFPHRWEB.js} +356 -99
- package/dist/{chunk-OGNNNTKI.js → chunk-CWBSXK7P.js} +1 -1
- package/dist/{chunk-3H5NR32A.js → chunk-D7JPVAYS.js} +319 -202
- package/dist/{chunk-NLJVBHLG.js → chunk-EL2A3BDM.js} +5 -5
- package/dist/{chunk-L7JV5FVE.js → chunk-KNC2UEUR.js} +1 -1
- package/dist/{chunk-SPNWHKSR.js → chunk-LD3K2RDN.js} +7 -5
- package/dist/chunk-UBBC5FH7.js +31 -0
- package/dist/{chunk-HZSYGNNB.js → chunk-VRVFLYGI.js} +1 -0
- package/dist/controls.d.ts +2 -1
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +4 -4
- package/dist/dialog/options-categories.d.ts +39 -0
- package/dist/dialog/options-categories.d.ts.map +1 -0
- package/dist/dialog/options-controls.d.ts +49 -0
- package/dist/dialog/options-controls.d.ts.map +1 -0
- package/dist/dialog/options-dialog.d.ts +35 -41
- package/dist/dialog/options-dialog.d.ts.map +1 -1
- package/dist/docx/auto-fit.d.ts +10 -0
- package/dist/docx/backstage-customize.d.ts +7 -0
- package/dist/docx/backstage-options.d.ts +13 -3
- package/dist/docx/backstage-pages.d.ts +0 -6
- package/dist/docx/backstage.d.ts +3 -0
- package/dist/docx/canvas-click.d.ts +7 -0
- package/dist/docx/locales/en-app.d.ts +1 -0
- package/dist/docx/locales/en.d.ts +5 -0
- package/dist/docx/locales/options.d.ts +11 -0
- package/dist/docx/localization-strings.d.ts +5 -0
- package/dist/docx/page-controller.d.ts +17 -3
- package/dist/docx/print-editing.d.ts +2 -0
- package/dist/docx/print-layout-view.d.ts +2 -0
- package/dist/docx/status-bar.d.ts +1 -1
- package/dist/docx.js +531 -218
- package/dist/form/color-swatches.d.ts +8 -5
- package/dist/form/color-swatches.d.ts.map +1 -1
- package/dist/index.js +10 -10
- package/dist/pptx/{chunk-5AD3V3PA.mjs → chunk-CB2DZVKL.mjs} +127 -1
- package/dist/pptx/{chunk-4EHNTVSN.mjs → chunk-DZUSNYRA.mjs} +1310 -216
- package/dist/pptx/{chunk-Y7CDPPMZ.cjs → chunk-J3GEBMYK.cjs} +127 -1
- package/dist/pptx/{chunk-LMZK4UNY.cjs → chunk-J4HVGXPW.cjs} +1333 -213
- package/dist/pptx/dom/elements/table.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +209 -206
- package/dist/pptx/dom/index.mjs +8 -5
- package/dist/pptx/dom/load-presentation.d.ts +3 -1
- package/dist/pptx/dom/load-presentation.d.ts.map +1 -1
- package/dist/pptx/dom/slide-stage.d.ts +3 -1
- package/dist/pptx/dom/slide-stage.d.ts.map +1 -1
- package/dist/pptx/dom/types.d.ts +6 -1
- package/dist/pptx/dom/types.d.ts.map +1 -1
- package/dist/pptx/i18n/index.cjs +6 -6
- package/dist/pptx/i18n/index.mjs +1 -1
- package/dist/pptx/i18n/translations-en-galleries-data.d.ts.map +1 -1
- package/dist/pptx/i18n/translations-en-table-layout.d.ts +3 -0
- package/dist/pptx/i18n/translations-en-table-layout.d.ts.map +1 -0
- package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
- package/dist/pptx/index.cjs +2838 -2758
- package/dist/pptx/index.mjs +2 -2
- package/dist/pptx/render/action-buttons.d.ts +2 -0
- package/dist/pptx/render/action-buttons.d.ts.map +1 -1
- package/dist/pptx/render/comment-navigation.d.ts +51 -0
- package/dist/pptx/render/comment-navigation.d.ts.map +1 -0
- package/dist/pptx/render/customization/ribbon-control-catalog-tail.d.ts +61 -0
- package/dist/pptx/render/customization/ribbon-control-catalog-tail.d.ts.map +1 -1
- package/dist/pptx/render/customization/ribbon-control-catalog.d.ts +61 -0
- package/dist/pptx/render/customization/ribbon-control-catalog.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +2 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/review-comment-commands.d.ts +42 -0
- package/dist/pptx/render/review-comment-commands.d.ts.map +1 -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 +17 -1
- package/dist/pptx/render/ribbon-galleries/gallery-types.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/gallery-view.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/index.d.ts +2 -0
- package/dist/pptx/render/ribbon-galleries/index.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/shape-styles-gallery.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/table-layout-commands.d.ts +7 -0
- package/dist/pptx/render/ribbon-galleries/table-layout-commands.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-galleries/table-layout-ops.d.ts +64 -0
- package/dist/pptx/render/ribbon-galleries/table-layout-ops.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-galleries/table-style-tile-svg.d.ts +7 -3
- package/dist/pptx/render/ribbon-galleries/table-style-tile-svg.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/table-styles-gallery.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/table-text-direction-gallery.d.ts +3 -0
- package/dist/pptx/render/ribbon-galleries/table-text-direction-gallery.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-galleries/theme-colors-gallery.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/theme-fonts-gallery.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-home-families-objects.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-home-spec.d.ts +10 -6
- package/dist/pptx/render/ribbon-home-spec.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-review-commands.d.ts +7 -0
- package/dist/pptx/render/ribbon-review-commands.d.ts.map +1 -1
- package/dist/pptx/render/shape-quick-styles.d.ts +6 -0
- package/dist/pptx/render/shape-quick-styles.d.ts.map +1 -1
- package/dist/pptx/render/table-style-borders.d.ts.map +1 -1
- package/dist/pptx/render/table-style-builtins-data.d.ts +7 -1
- package/dist/pptx/render/table-style-builtins-data.d.ts.map +1 -1
- package/dist/pptx/render/table-style-scheme.d.ts +2 -0
- package/dist/pptx/render/table-style-scheme.d.ts.map +1 -1
- package/dist/pptx/render/table-style-theme-refs.d.ts +16 -0
- package/dist/pptx/render/table-style-theme-refs.d.ts.map +1 -0
- package/dist/pptx/render/table-style.d.ts +7 -1
- package/dist/pptx/render/table-style.d.ts.map +1 -1
- package/dist/pptx/render/theme-color-swatches.d.ts +1 -1
- package/dist/pptx/render/theme-color-swatches.d.ts.map +1 -1
- package/dist/pptx/render/toolbar-actions.d.ts +1 -1
- package/dist/pptx/render/toolbar-actions.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-draw-view.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-home-colour.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-insert-view.d.ts.map +1 -1
- package/dist/presence.js +3 -3
- package/dist/{presentation-preview-VIIU7E2S.js → presentation-preview-HVKJ3KJN.js} +1 -1
- package/dist/ribbon/auto-collapse.d.ts +8 -0
- package/dist/ribbon/auto-collapse.d.ts.map +1 -0
- package/dist/ribbon/group-overflow.d.ts +7 -0
- package/dist/ribbon/group-overflow.d.ts.map +1 -1
- package/dist/ribbon/overflow.d.ts +7 -0
- package/dist/ribbon/overflow.d.ts.map +1 -1
- package/dist/ribbon/ribbon-tabs.d.ts +5 -0
- package/dist/ribbon/ribbon-tabs.d.ts.map +1 -1
- package/dist/ribbon/scroll-more.d.ts +17 -0
- package/dist/ribbon/scroll-more.d.ts.map +1 -0
- package/dist/smartart.js +3 -3
- package/dist/teams/app/activity.d.ts +5 -0
- package/dist/teams/app/pinned-bar.d.ts +24 -0
- package/dist/teams/app/profile-menu.d.ts +18 -1
- package/dist/teams/app/teams-app.d.ts +8 -3
- package/dist/teams/app-rail.d.ts +3 -1
- package/dist/teams/avatar.d.ts +2 -2
- package/dist/teams/chat-list.d.ts +10 -2
- package/dist/teams.js +7 -7
- package/dist/theme.js +2 -2
- package/dist/tokens.d.ts +7 -5
- package/dist/tokens.d.ts.map +1 -1
- package/dist/visio/viewer-gesture-state.d.ts +54 -0
- package/dist/visio/viewer-options-categories.d.ts +8 -0
- package/dist/visio/viewer-options.d.ts +3 -7
- package/dist/visio/viewer-touch-gestures.d.ts +17 -0
- package/dist/visio/viewer-touch-hit.d.ts +3 -0
- package/dist/visio/viewer-touch-long-press.d.ts +13 -0
- package/dist/visio/viewer-touch-math.d.ts +44 -0
- package/dist/visio.js +319 -149
- package/dist/xlsx/backstage/index.d.ts +3 -0
- package/dist/xlsx/backstage/options-customize.d.ts +7 -0
- package/dist/xlsx/backstage/options-dialog.d.ts +13 -0
- package/dist/xlsx/ribbon/ribbon.d.ts +1 -1
- package/dist/xlsx/status-bar.d.ts +1 -1
- package/dist/xlsx.js +282 -172
- package/package.json +2 -2
- package/dist/teams/app/navigation-drawer.d.ts +0 -26
- package/dist/xlsx/backstage/pages-options.d.ts +0 -7
|
@@ -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-ANPFMQ6E.js';
|
|
2
|
+
import { TEAMS_TAGS, registerTeams } from './chunk-D7JPVAYS.js';
|
|
3
|
+
import { installOfficeUiTheme } from './chunk-7E3HU7RL.js';
|
|
4
|
+
import { registerControls } from './chunk-BFPHRWEB.js';
|
|
5
|
+
import { definePresence } from './chunk-KNC2UEUR.js';
|
|
6
6
|
|
|
7
7
|
// src/index.ts
|
|
8
8
|
var OFFICE_UI_TAGS = [
|
|
@@ -174,12 +174,14 @@ var OFFICE_TOKENS = {
|
|
|
174
174
|
"--office-dialog-max-height": "90vh",
|
|
175
175
|
"--office-dialog-min-width": "min(320px, 100vw)",
|
|
176
176
|
"--office-dialog-button-min-width": "76px",
|
|
177
|
-
"--office-options-width": "min(
|
|
178
|
-
"--office-options-nav-width": "
|
|
179
|
-
"--office-options-
|
|
180
|
-
"--office-options-
|
|
177
|
+
"--office-options-width": "min(728px, 92vw)",
|
|
178
|
+
"--office-options-nav-width": "172px",
|
|
179
|
+
"--office-options-height": "510px",
|
|
180
|
+
"--office-options-chrome-height": "130px",
|
|
181
|
+
"--office-options-text-width": "180px",
|
|
181
182
|
"--office-options-row-height": "30px",
|
|
182
|
-
"--office-options-number-width": "
|
|
183
|
+
"--office-options-number-width": "112px",
|
|
184
|
+
"--office-options-check-size": "16px",
|
|
183
185
|
"--office-info-size": "15px",
|
|
184
186
|
"--office-selection-bar-width": "3px",
|
|
185
187
|
"--office-backstage-nav-width": "200px",
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// src/chrome/status-layout.ts
|
|
2
|
+
function statusLayout(width) {
|
|
3
|
+
if (!(width > 0))
|
|
4
|
+
return { words: true, language: true, views: true, compactPage: false, stats: Infinity };
|
|
5
|
+
return {
|
|
6
|
+
words: width >= 440,
|
|
7
|
+
language: width >= 640,
|
|
8
|
+
views: width >= 480,
|
|
9
|
+
compactPage: width < 520,
|
|
10
|
+
stats: width >= 760 ? Infinity : width >= 560 ? 2 : width >= 440 ? 1 : 0
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function watchStatusWidth(element, onChange) {
|
|
14
|
+
if (typeof ResizeObserver === "undefined") return () => {
|
|
15
|
+
};
|
|
16
|
+
let last = -1;
|
|
17
|
+
const observer = new ResizeObserver(() => {
|
|
18
|
+
const width = element.clientWidth;
|
|
19
|
+
if (width === last) return;
|
|
20
|
+
last = width;
|
|
21
|
+
onChange(width);
|
|
22
|
+
});
|
|
23
|
+
observer.observe(element);
|
|
24
|
+
return () => observer.disconnect();
|
|
25
|
+
}
|
|
26
|
+
function compactPageText(text) {
|
|
27
|
+
const numbers = text.match(/\d+/g);
|
|
28
|
+
return numbers && numbers.length === 2 ? numbers.join("/") : text;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { compactPageText, statusLayout, watchStatusWidth };
|
|
@@ -142,6 +142,7 @@ var TeamsPresentationPreview = class extends LitElement {
|
|
|
142
142
|
t: renderer.createTranslator(),
|
|
143
143
|
...data.colorScheme ? { colorScheme: data.colorScheme } : {},
|
|
144
144
|
...data.fontScheme ? { fontScheme: data.fontScheme } : {},
|
|
145
|
+
...data.formatScheme ? { formatScheme: data.formatScheme } : {},
|
|
145
146
|
...data.tableStyleMap ? { tableStyleMap: data.tableStyleMap } : {},
|
|
146
147
|
fieldContext: renderer.buildFieldSubstitutionContext({
|
|
147
148
|
headerFooter: data.headerFooter,
|
package/dist/controls.d.ts
CHANGED
|
@@ -73,7 +73,8 @@ export { OFFICE_TOAST_VISIBLE_LIMIT, type OfficeToast, type OfficeToastsState, }
|
|
|
73
73
|
export type { OfficePasteOption, OfficePasteOptionsState } from './notices/paste-options.js';
|
|
74
74
|
export type { OfficeReadOnlyBannerIntent, OfficeReadOnlyBannerState, } from './notices/read-only-banner.js';
|
|
75
75
|
export { clearOfficeProfile, DEFAULT_OFFICE_PROFILE, OFFICE_AVATAR_SWATCHES, OFFICE_PROFILE_STORAGE_KEY, profileInitials, readOfficeProfile, sanitizeOfficeProfile, writeOfficeProfile, type OfficeProfile, type OfficeProfileChangeEvent, } from './chrome/account-profile.js';
|
|
76
|
-
export { clampOptionNumber, type OfficeOptionCategory, type OfficeOptionChoice, type OfficeOptionControl, type OfficeOptionSection, type OfficeOptionsChangeEvent, type OfficeOptionValue, type OfficeOptionValues, } from './dialog/options-dialog.js';
|
|
76
|
+
export { clampOptionNumber, type OfficeOptionCategory, type OfficeOptionChoice, type OfficeOptionControl, type OfficeOptionSection, type OfficeOptionsChangeEvent, type OfficeOptionsLabels, type OfficeOptionValue, type OfficeOptionValues, } from './dialog/options-dialog.js';
|
|
77
|
+
export { optionsLabels, optionText, personalizeSection, unavailableCategory, unavailableControl, userInterfaceSection, type OptionsContext, type UnavailableKind, } from './dialog/options-categories.js';
|
|
77
78
|
/** Every control of this entry. */
|
|
78
79
|
export declare const CONTROL_DEFINERS: readonly [import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer];
|
|
79
80
|
/** Idempotent, SSR-safe (no-op without a DOM). */
|
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,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AAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,YAAY,EACX,0BAA0B,EAC1B,yBAAyB,GACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,KAAK,aAAa,EAClB,KAAK,wBAAwB,GAC7B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACN,iBAAiB,EACjB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,GACvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,cAAc,EACnB,KAAK,eAAe,GACpB,MAAM,6BAA6B,CAAC;AAErC,mCAAmC;AACnC,eAAO,MAAM,gBAAgB,ytCA0CnB,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, 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, parseOfficeSymbolCode, parseSvgPreview, profileInitials, readOfficeProfile, registerControls, rulerDivisions, runKeyTips, sanitizeOfficeProfile, typeAheadIndex, 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, 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-BFPHRWEB.js';
|
|
2
2
|
import './chunk-M6GF5ED2.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
3
|
+
import './chunk-KNC2UEUR.js';
|
|
4
|
+
import './chunk-CWBSXK7P.js';
|
|
5
|
+
import './chunk-LD3K2RDN.js';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { OfficeOptionCategory, OfficeOptionControl, OfficeOptionSection, OfficeOptionsLabels } from './options-dialog.js';
|
|
2
|
+
/**
|
|
3
|
+
* The File > Options categories every product shares, as builders over the product's translate
|
|
4
|
+
* function (English keys, see `optionStrings` in `ooxml-core/i18n`). A product supplies the
|
|
5
|
+
* settings it really honours and takes the rest from here: the Office category order, and the
|
|
6
|
+
* honest "not available yet" panes for what it cannot do, so Word, Excel and Visio read like
|
|
7
|
+
* PowerPoint's Options. Nothing here pretends to work.
|
|
8
|
+
*/
|
|
9
|
+
export interface OptionsContext {
|
|
10
|
+
/** Product name for the `{product}` placeholders: "Word", "Excel", "Visio". */
|
|
11
|
+
product: string;
|
|
12
|
+
/** Display-language lookup; identity for English-only products. */
|
|
13
|
+
t(text: string): string;
|
|
14
|
+
}
|
|
15
|
+
export type UnavailableKind = 'proofing' | 'save' | 'language' | 'accessibility' | 'advanced' | 'ribbon' | 'qat' | 'addins' | 'trust';
|
|
16
|
+
interface UnavailableText {
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
description: string;
|
|
20
|
+
reason: string;
|
|
21
|
+
}
|
|
22
|
+
/** A pane's English text with `{product}` filled in, translated first. */
|
|
23
|
+
export declare function optionText(context: OptionsContext, text: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* A category the product cannot offer yet: it keeps its place in the list and says why. `text`
|
|
26
|
+
* replaces the shared wording where a product has something more specific to say (its text goes
|
|
27
|
+
* through `t` like the rest).
|
|
28
|
+
*/
|
|
29
|
+
export declare function unavailableCategory(context: OptionsContext, kind: UnavailableKind, text?: Partial<Pick<UnavailableText, 'description' | 'reason'>>): OfficeOptionCategory;
|
|
30
|
+
/** A disabled row for something Office offers that this product does not do yet. */
|
|
31
|
+
export declare function unavailableControl(context: OptionsContext, control: OfficeOptionControl, reason: string): OfficeOptionControl;
|
|
32
|
+
/** "User Interface options": Office's three display settings, none of which are drawn yet. */
|
|
33
|
+
export declare function userInterfaceSection(context: OptionsContext): OfficeOptionSection;
|
|
34
|
+
/** "Personalize your copy of Microsoft Office": the product's own name, theme and the like. */
|
|
35
|
+
export declare function personalizeSection(context: OptionsContext, controls: readonly OfficeOptionControl[], description?: string): OfficeOptionSection;
|
|
36
|
+
/** The dialog's own buttons in the product's language. */
|
|
37
|
+
export declare function optionsLabels(context: OptionsContext): OfficeOptionsLabels;
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=options-categories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options-categories.d.ts","sourceRoot":"","sources":["../../src/dialog/options-categories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,MAAM,kBAAkB,CAAC;AAE1B;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC9B,+EAA+E;IAC/E,OAAO,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,eAAe,GACxB,UAAU,GACV,MAAM,GACN,UAAU,GACV,eAAe,GACf,UAAU,GACV,QAAQ,GACR,KAAK,GACL,QAAQ,GACR,OAAO,CAAC;AAEX,UAAU,eAAe;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CACf;AA2DD,0EAA0E;AAC1E,wBAAgB,UAAU,CAAC,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAExE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAClC,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,eAAe,EACrB,IAAI,GAAE,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,aAAa,GAAG,QAAQ,CAAC,CAAM,GACjE,oBAAoB,CAStB;AAED,oFAAoF;AACpF,wBAAgB,kBAAkB,CACjC,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,MAAM,GACZ,mBAAmB,CAErB;AAED,8FAA8F;AAC9F,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,cAAc,GAAG,mBAAmB,CA6BjF;AAED,+FAA+F;AAC/F,wBAAgB,kBAAkB,CACjC,OAAO,EAAE,cAAc,EACvB,QAAQ,EAAE,SAAS,mBAAmB,EAAE,EACxC,WAAW,CAAC,EAAE,MAAM,GAClB,mBAAmB,CAOrB;AAED,0DAA0D;AAC1D,wBAAgB,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,mBAAmB,CAS1E"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type TemplateResult } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* The control rows of the shared File > Options dialog: toggle, select, number and text, each a
|
|
4
|
+
* `label` row (label start, control end) in the PowerPoint arrangement. Pure templates over a
|
|
5
|
+
* draft record, so the dialog element stays about state and layout.
|
|
6
|
+
*/
|
|
7
|
+
export type OfficeOptionValue = boolean | number | string;
|
|
8
|
+
export type OfficeOptionValues = Record<string, OfficeOptionValue>;
|
|
9
|
+
export interface OfficeOptionChoice {
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}
|
|
13
|
+
interface OptionBase {
|
|
14
|
+
/** Key into the values record. */
|
|
15
|
+
key: string;
|
|
16
|
+
label: string;
|
|
17
|
+
/** Optional "(i)" tooltip, as Office's info bubbles. */
|
|
18
|
+
info?: string;
|
|
19
|
+
/** Renders indented under the preceding control. */
|
|
20
|
+
indent?: boolean;
|
|
21
|
+
/** Shown disabled with this reason, for settings the product cannot honour yet. */
|
|
22
|
+
disabled?: string;
|
|
23
|
+
/** Enabled only while the toggle with this key is on (Excel's iterative calculation fields). */
|
|
24
|
+
enabledBy?: string;
|
|
25
|
+
}
|
|
26
|
+
export type OfficeOptionControl = (OptionBase & {
|
|
27
|
+
kind: 'toggle';
|
|
28
|
+
}) | (OptionBase & {
|
|
29
|
+
kind: 'select';
|
|
30
|
+
choices: readonly OfficeOptionChoice[];
|
|
31
|
+
}) | (OptionBase & {
|
|
32
|
+
kind: 'number';
|
|
33
|
+
min: number;
|
|
34
|
+
max: number;
|
|
35
|
+
step?: number;
|
|
36
|
+
unit?: string;
|
|
37
|
+
}) | (OptionBase & {
|
|
38
|
+
kind: 'text';
|
|
39
|
+
maxLength?: number;
|
|
40
|
+
});
|
|
41
|
+
/** Clamp a number edit into range; `undefined` when it is not a finite number. */
|
|
42
|
+
export declare function clampOptionNumber(raw: string, min: number, max: number): number | undefined;
|
|
43
|
+
export interface OptionRowHost {
|
|
44
|
+
readonly draft: OfficeOptionValues;
|
|
45
|
+
set(key: string, value: OfficeOptionValue): void;
|
|
46
|
+
}
|
|
47
|
+
export declare function optionRow(host: OptionRowHost, control: OfficeOptionControl): TemplateResult;
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=options-controls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options-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AAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAK3F;AAED,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC;IACnC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,GAAG,IAAI,CAAC;CACjD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,mBAAmB,GAAG,cAAc,CAqE3F"}
|
|
@@ -1,42 +1,14 @@
|
|
|
1
1
|
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
2
2
|
import { OfficeElement } from '../base.js';
|
|
3
|
+
import { type OfficeOptionControl, type OfficeOptionValue, type OfficeOptionValues } from './options-controls.js';
|
|
3
4
|
/**
|
|
4
5
|
* Office File > Options dialog. Products describe their categories as data; the element renders
|
|
5
|
-
* the category list, the pane and
|
|
6
|
-
* pptx-viewer's `VIEWER_OPTIONS_SCHEMA` dialog (render/options) so every viewer shares one
|
|
6
|
+
* the category list, the pane and Reset/Cancel/OK, and reports the edited values. Generalised from
|
|
7
|
+
* pptx-viewer's `VIEWER_OPTIONS_SCHEMA` dialog (render/options) so every viewer shares one, in the
|
|
8
|
+
* same arrangement: a category rail, a headline, small uppercase section titles and rows with the
|
|
9
|
+
* label at the start and the control at the end.
|
|
7
10
|
*/
|
|
8
|
-
export type OfficeOptionValue
|
|
9
|
-
export type OfficeOptionValues = Record<string, OfficeOptionValue>;
|
|
10
|
-
export interface OfficeOptionChoice {
|
|
11
|
-
value: string;
|
|
12
|
-
label: string;
|
|
13
|
-
}
|
|
14
|
-
interface OptionBase {
|
|
15
|
-
/** Key into the values record. */
|
|
16
|
-
key: string;
|
|
17
|
-
label: string;
|
|
18
|
-
/** Optional "(i)" tooltip, as Office's info bubbles. */
|
|
19
|
-
info?: string;
|
|
20
|
-
/** Renders indented under the preceding control. */
|
|
21
|
-
indent?: boolean;
|
|
22
|
-
/** Shown disabled with this reason, for settings the product cannot honour yet. */
|
|
23
|
-
disabled?: string;
|
|
24
|
-
}
|
|
25
|
-
export type OfficeOptionControl = (OptionBase & {
|
|
26
|
-
kind: 'toggle';
|
|
27
|
-
}) | (OptionBase & {
|
|
28
|
-
kind: 'select';
|
|
29
|
-
choices: readonly OfficeOptionChoice[];
|
|
30
|
-
}) | (OptionBase & {
|
|
31
|
-
kind: 'number';
|
|
32
|
-
min: number;
|
|
33
|
-
max: number;
|
|
34
|
-
step?: number;
|
|
35
|
-
unit?: string;
|
|
36
|
-
}) | (OptionBase & {
|
|
37
|
-
kind: 'text';
|
|
38
|
-
maxLength?: number;
|
|
39
|
-
});
|
|
11
|
+
export { clampOptionNumber, type OfficeOptionChoice, type OfficeOptionControl, type OfficeOptionValue, type OfficeOptionValues, } from './options-controls.js';
|
|
40
12
|
export interface OfficeOptionSection {
|
|
41
13
|
id: string;
|
|
42
14
|
title: string;
|
|
@@ -51,18 +23,31 @@ export interface OfficeOptionCategory {
|
|
|
51
23
|
sections: readonly OfficeOptionSection[];
|
|
52
24
|
/** The whole category is not available yet; the pane explains why. */
|
|
53
25
|
disabled?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The product supplies this pane itself (Customize Ribbon): put an element with
|
|
28
|
+
* `slot="pane-<id>"` in the dialog and it shows under the sections while the category is open.
|
|
29
|
+
*/
|
|
30
|
+
custom?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/** Translatable chrome of the dialog (English when unset). */
|
|
33
|
+
export interface OfficeOptionsLabels {
|
|
34
|
+
ok: string;
|
|
35
|
+
cancel: string;
|
|
36
|
+
reset: string;
|
|
37
|
+
categories: string;
|
|
38
|
+
close: string;
|
|
54
39
|
}
|
|
55
40
|
/** Emitted on OK with every value and the keys that changed. */
|
|
56
41
|
export type OfficeOptionsChangeEvent = CustomEvent<{
|
|
57
42
|
values: OfficeOptionValues;
|
|
58
43
|
changed: string[];
|
|
59
44
|
}>;
|
|
60
|
-
/** Clamp a number edit into range; `undefined` when it is not a finite number. */
|
|
61
|
-
export declare function clampOptionNumber(raw: string, min: number, max: number): number | undefined;
|
|
62
45
|
/**
|
|
63
46
|
* `<office-ui-options-dialog>`: set `categories` and `values`, then `show()` (or the `open`
|
|
64
47
|
* attribute). Edits stay in a draft until OK, which emits `office-options-change` and closes;
|
|
65
|
-
* Cancel, Escape and the close button discard them
|
|
48
|
+
* Cancel, Escape and the close button discard them and emit `office-options-cancel`. "Reset all options" (shown when `defaults` is
|
|
49
|
+
* set) puts the defaults in the draft. `heading` defaults to "Options"; `labels` translates the
|
|
50
|
+
* buttons.
|
|
66
51
|
*/
|
|
67
52
|
export declare class OfficeUiOptionsDialog extends OfficeElement {
|
|
68
53
|
static styles: import("lit").CSSResult[];
|
|
@@ -81,6 +66,12 @@ export declare class OfficeUiOptionsDialog extends OfficeElement {
|
|
|
81
66
|
categories: {
|
|
82
67
|
attribute: boolean;
|
|
83
68
|
};
|
|
69
|
+
defaults: {
|
|
70
|
+
attribute: boolean;
|
|
71
|
+
};
|
|
72
|
+
labels: {
|
|
73
|
+
attribute: boolean;
|
|
74
|
+
};
|
|
84
75
|
active: {
|
|
85
76
|
state: boolean;
|
|
86
77
|
};
|
|
@@ -88,25 +79,28 @@ export declare class OfficeUiOptionsDialog extends OfficeElement {
|
|
|
88
79
|
open: boolean;
|
|
89
80
|
heading: string | null;
|
|
90
81
|
categories: readonly OfficeOptionCategory[];
|
|
82
|
+
defaults: OfficeOptionValues | null;
|
|
83
|
+
labels: Partial<OfficeOptionsLabels>;
|
|
91
84
|
active: string;
|
|
92
85
|
private committed;
|
|
93
|
-
private
|
|
86
|
+
private draftValues;
|
|
94
87
|
constructor();
|
|
88
|
+
get draft(): OfficeOptionValues;
|
|
95
89
|
get values(): OfficeOptionValues;
|
|
96
90
|
set values(value: OfficeOptionValues);
|
|
97
91
|
/** The selected category id. */
|
|
98
92
|
get category(): string;
|
|
99
93
|
set category(id: string);
|
|
100
94
|
show(): void;
|
|
95
|
+
/** Closes without applying: the draft is dropped and `office-options-cancel` is emitted. */
|
|
101
96
|
close(): void;
|
|
102
97
|
private commit;
|
|
98
|
+
private resetAll;
|
|
103
99
|
private onNavKey;
|
|
104
100
|
protected willUpdate(changed: PropertyValues<this>): void;
|
|
105
|
-
|
|
106
|
-
private control;
|
|
101
|
+
set(key: string, next: OfficeOptionValue): void;
|
|
107
102
|
private pane;
|
|
108
103
|
protected render(): TemplateResult<1>;
|
|
109
104
|
}
|
|
110
105
|
export declare const defineOptionsDialog: import("../registry.js").Definer;
|
|
111
|
-
export {};
|
|
112
106
|
//# sourceMappingURL=options-dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options-dialog.d.ts","sourceRoot":"","sources":["../../src/dialog/options-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAErE,OAAO,EAAE,aAAa,EAAuB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"options-dialog.d.ts","sourceRoot":"","sources":["../../src/dialog/options-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAErE,OAAO,EAAE,aAAa,EAAuB,MAAM,SAAS,CAAC;AAG7D,OAAO,EAEN,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,MAAM,oBAAoB,CAAC;AAG5B;;;;;;GAMG;AACH,OAAO,EACN,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,GACvB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,mBAAmB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ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AQC;IAED,IAAI,KAAK,IAAI,kBAAkB,CAE9B;IAED,IAAI,MAAM,IAAI,kBAAkB,CAE/B;IACD,IAAI,MAAM,CAAC,KAAK,EAAE,kBAAkB,EAInC;IAED,gCAAgC;IAChC,IAAI,QAAQ,IAAI,MAAM,CAErB;IACD,IAAI,QAAQ,CAAC,EAAE,EAAE,MAAM,EAEtB;IAED,IAAI,IAAI,IAAI,CAEX;IAED,4FAA4F;IAC5F,KAAK,IAAI,IAAI,CAIZ;IAED,OAAO,CAAC,MAAM;IASd,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,QAAQ;IAkBhB,UAAmB,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI,CAKjE;IAED,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAI9C;IAED,OAAO,CAAC,IAAI;IAiBZ,UAAmB,MAAM,sBA6DxB;CACD;AAED,eAAO,MAAM,mBAAmB,+BAI/B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Smallest zoom the automatic fit may choose; the status bar slider reaches it as well. */
|
|
2
|
+
export declare const AUTO_FIT_MIN = 25;
|
|
3
|
+
/**
|
|
4
|
+
* The zoom Word for the web and mobile apply on their own: a page wider than the space the canvas
|
|
5
|
+
* offers is scaled to that width, anything else stays at 100%. Returns undefined when the canvas has
|
|
6
|
+
* not been laid out yet (zero width), so callers keep the current zoom.
|
|
7
|
+
*/
|
|
8
|
+
export declare function autoFitZoom(availableWidth: number, pageWidth: number): number | undefined;
|
|
9
|
+
/** Pinch scale applied to the zoom at the gesture start, rounded and kept inside the slider range. */
|
|
10
|
+
export declare function pinchZoom(startPercent: number, scale: number, min: number, max: number): number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BackstageHandlers } from './backstage-pages.js';
|
|
2
|
+
/**
|
|
3
|
+
* Word's Customize Ribbon, reduced to showing and hiding: every tab, group and command with a
|
|
4
|
+
* checkbox. Unchecked commands go into `hiddenActions`; groups and tabs left empty disappear.
|
|
5
|
+
* Drawn into `host`, the pane the File > Options dialog shows for the Customize Ribbon category.
|
|
6
|
+
*/
|
|
7
|
+
export declare function renderCustomizeRibbon(host: HTMLElement, handlers: BackstageHandlers, t: (text: string) => string): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BackstageHandlers } from './backstage-pages.js';
|
|
2
2
|
export interface BackstageOptions {
|
|
3
3
|
locale: string;
|
|
4
4
|
theme: string;
|
|
@@ -9,5 +9,15 @@ export interface BackstageOptions {
|
|
|
9
9
|
showThumbnails?: boolean;
|
|
10
10
|
}
|
|
11
11
|
export type BackstageOptionKey = keyof BackstageOptions;
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
export interface WordOptions {
|
|
13
|
+
readonly element: HTMLElement;
|
|
14
|
+
/** Opens File > Options on a category (General when unset). */
|
|
15
|
+
show(category?: string): void;
|
|
16
|
+
/** Rebuilds the text after the display language changed. */
|
|
17
|
+
relocalize(): void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The shared Options dialog filled with Word's settings. OK applies the edited values through
|
|
21
|
+
* `handlers.setOption`; Customize Ribbon applies as it is edited and Cancel puts the ribbon back.
|
|
22
|
+
*/
|
|
23
|
+
export declare function createWordOptions(handlers: BackstageHandlers, t: (text: string) => string): WordOptions;
|
|
@@ -2,7 +2,6 @@ import { PROPERTY_FIELDS, type DocumentModel } from 'ooxml-core/docx';
|
|
|
2
2
|
import type { DocumentStats } from 'ooxml-core/docx';
|
|
3
3
|
import type { FileCommand } from './file-commands.js';
|
|
4
4
|
import type { BackstageOptions, BackstageOptionKey } from './backstage-options.js';
|
|
5
|
-
export { renderOptions } from './backstage-options.js';
|
|
6
5
|
/** What the File view needs from the editor; every value is read when a page opens. */
|
|
7
6
|
export interface BackstageHandlers {
|
|
8
7
|
fileCommand(command: FileCommand, fileName?: string): void;
|
|
@@ -34,8 +33,3 @@ export declare function renderOpen({ handlers, t, content }: PageContext): void;
|
|
|
34
33
|
export declare function renderSaveAs({ handlers, t, content }: PageContext): void;
|
|
35
34
|
export declare function renderPrint({ handlers, t, content }: PageContext): void;
|
|
36
35
|
export declare function renderExport({ handlers, t, content }: PageContext): void;
|
|
37
|
-
/**
|
|
38
|
-
* Word's Customize Ribbon, reduced to showing and hiding: every tab, group and command with a
|
|
39
|
-
* checkbox. Unchecked commands go into `hiddenActions`; groups and tabs left empty disappear.
|
|
40
|
-
*/
|
|
41
|
-
export declare function renderCustomize({ handlers, t, content }: PageContext): void;
|
package/dist/docx/backstage.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { type BackstageHandlers } from './backstage-pages.js';
|
|
2
2
|
export type { BackstageHandlers } from './backstage-pages.js';
|
|
3
|
+
/** The File view's pages; `options` and `customize` open the Options dialog instead. */
|
|
3
4
|
export type BackstagePage = 'home' | 'info' | 'new' | 'open' | 'saveAs' | 'print' | 'export' | 'options' | 'customize';
|
|
4
5
|
export interface Backstage {
|
|
5
6
|
element: HTMLElement;
|
|
7
|
+
/** File > Options: a dialog over the document, as PowerPoint and Visio show it. */
|
|
8
|
+
optionsDialog: HTMLElement;
|
|
6
9
|
open(page?: BackstagePage): void;
|
|
7
10
|
close(): void;
|
|
8
11
|
readonly isOpen: boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EditorCore } from './editor-core.js';
|
|
2
|
+
/**
|
|
3
|
+
* A press on the bare canvas (the gutter beside the pages, or around the Draft paper) lands on no
|
|
4
|
+
* text, so the browser would focus the canvas and leave typing nowhere. Word puts the caret at the
|
|
5
|
+
* nearest text instead; do the same in both surfaces.
|
|
6
|
+
*/
|
|
7
|
+
export declare function attachCanvasClick(core: EditorCore): void;
|
|
@@ -180,6 +180,7 @@ export declare const enApp: {
|
|
|
180
180
|
readonly 'Theme Colors': 'Theme Colors';
|
|
181
181
|
readonly 'Standard Colors': 'Standard Colors';
|
|
182
182
|
readonly 'More Colors…': 'More Colors…';
|
|
183
|
+
readonly More: 'More';
|
|
183
184
|
readonly 'No Color': 'No Color';
|
|
184
185
|
readonly 'Dark Red': 'Dark Red';
|
|
185
186
|
readonly 'Light Green': 'Light Green';
|
|
@@ -5,6 +5,10 @@ import { enRibbon } from './en-ribbon.js';
|
|
|
5
5
|
* localizer looks up (or dotted ids for templates); every other locale must define every key.
|
|
6
6
|
*/
|
|
7
7
|
export declare const en: {
|
|
8
|
+
readonly 'Change how document content is displayed on the screen.': string;
|
|
9
|
+
readonly 'Page display options': string;
|
|
10
|
+
readonly 'Formatting marks': string;
|
|
11
|
+
readonly 'Check spelling as you type': string;
|
|
8
12
|
readonly Column: 'Column';
|
|
9
13
|
readonly 'More Columns\u2026': 'More Columns…';
|
|
10
14
|
readonly 'Equal column width': 'Equal column width';
|
|
@@ -221,6 +225,7 @@ export declare const en: {
|
|
|
221
225
|
readonly 'Theme Colors': 'Theme Colors';
|
|
222
226
|
readonly 'Standard Colors': 'Standard Colors';
|
|
223
227
|
readonly 'More Colors\u2026': 'More Colors…';
|
|
228
|
+
readonly More: 'More';
|
|
224
229
|
readonly 'No Color': 'No Color';
|
|
225
230
|
readonly 'Dark Red': 'Dark Red';
|
|
226
231
|
readonly 'Light Green': 'Light Green';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** File > Options: the shared Office option strings plus the Display and Proofing panes of Word. */
|
|
2
|
+
export declare const enOptions: {
|
|
3
|
+
'Change how document content is displayed on the screen.': string;
|
|
4
|
+
'Page display options': string;
|
|
5
|
+
'Formatting marks': string;
|
|
6
|
+
'Check spelling as you type': string;
|
|
7
|
+
};
|
|
8
|
+
export declare const frOptions: typeof enOptions;
|
|
9
|
+
export declare const deOptions: typeof enOptions;
|
|
10
|
+
export declare const esOptions: typeof enOptions;
|
|
11
|
+
export declare const zhOptions: typeof enOptions;
|
|
@@ -2,6 +2,10 @@ export type { LocaleStrings, LocalizationKey } from './locales/en.js';
|
|
|
2
2
|
/** Every display locale, keyed by its canonical code. `en` defines the key set. */
|
|
3
3
|
export declare const strings: {
|
|
4
4
|
readonly en: {
|
|
5
|
+
readonly 'Change how document content is displayed on the screen.': string;
|
|
6
|
+
readonly 'Page display options': string;
|
|
7
|
+
readonly 'Formatting marks': string;
|
|
8
|
+
readonly 'Check spelling as you type': string;
|
|
5
9
|
readonly Column: 'Column';
|
|
6
10
|
readonly 'More Columns\u2026': 'More Columns…';
|
|
7
11
|
readonly 'Equal column width': 'Equal column width';
|
|
@@ -218,6 +222,7 @@ export declare const strings: {
|
|
|
218
222
|
readonly 'Theme Colors': 'Theme Colors';
|
|
219
223
|
readonly 'Standard Colors': 'Standard Colors';
|
|
220
224
|
readonly 'More Colors\u2026': 'More Colors…';
|
|
225
|
+
readonly More: 'More';
|
|
221
226
|
readonly 'No Color': 'No Color';
|
|
222
227
|
readonly 'Dark Red': 'Dark Red';
|
|
223
228
|
readonly 'Light Green': 'Light Green';
|
|
@@ -18,6 +18,9 @@ export declare class PageController {
|
|
|
18
18
|
private readonly host;
|
|
19
19
|
zoom: number;
|
|
20
20
|
viewMode: 'draft' | 'print';
|
|
21
|
+
/** True once the user picked a zoom; the automatic fit to a narrow viewport then stays out. */
|
|
22
|
+
private userZoomed;
|
|
23
|
+
private observed?;
|
|
21
24
|
constructor(host: PageControllerHost);
|
|
22
25
|
/** Page setup applies to the section holding the selection, as in Word, and is undoable. */
|
|
23
26
|
changePageSetup(key: Extract<RibbonAction, {
|
|
@@ -57,11 +60,22 @@ export declare class PageController {
|
|
|
57
60
|
refreshPageStyles(): void;
|
|
58
61
|
/** Zoom to 100%, the page width or a whole page, from the section holding the selection. */
|
|
59
62
|
zoomTo(mode: ZoomFit): void;
|
|
60
|
-
/**
|
|
63
|
+
/** A zoom the user chose (slider, ribbon, dialog, pinch); it ends the automatic fit. */
|
|
61
64
|
setZoom(percent: number, sideBySide?: boolean): void;
|
|
65
|
+
/**
|
|
66
|
+
* Fits the page to the canvas width while the user has not chosen a zoom, so a phone or a narrow
|
|
67
|
+
* window shows the whole page width (as Word for the web and mobile do) and the zoom returns to
|
|
68
|
+
* 100% when the window grows. Runs on resize and orientation change.
|
|
69
|
+
*/
|
|
70
|
+
autoFit(): void;
|
|
71
|
+
private observeViewport;
|
|
72
|
+
/** Two-finger pinch over the canvas zooms the page; one finger keeps scrolling. */
|
|
73
|
+
private watchPinch;
|
|
74
|
+
/** `sideBySide` lays Print Layout's pages out two across (View > Multiple Pages). */
|
|
75
|
+
private applyZoom;
|
|
62
76
|
/** Switches between continuous and paginated presentations of the existing editor. */
|
|
63
77
|
setViewMode(mode: 'draft' | 'print'): void;
|
|
64
|
-
/** Re-lays out Print Layout after a model change (coalesced
|
|
65
|
-
relayout(): void;
|
|
78
|
+
/** Re-lays out Print Layout after a model change (coalesced unless `immediate`, for a swapped document). */
|
|
79
|
+
relayout(immediate?: boolean): void;
|
|
66
80
|
print(): void;
|
|
67
81
|
}
|
|
@@ -4,6 +4,8 @@ export interface PrintEditingBridge {
|
|
|
4
4
|
refresh(): void;
|
|
5
5
|
destroy(): void;
|
|
6
6
|
select(blockId: string, offset: number, extend?: boolean): boolean;
|
|
7
|
+
/** Place the caret on the line nearest a viewport point (the gutter beside the pages). */
|
|
8
|
+
selectNearest(clientX: number, clientY: number): boolean;
|
|
7
9
|
}
|
|
8
10
|
/** Keep native ProseMirror input, composition, clipboard and history behind the page projection. */
|
|
9
11
|
export declare function createPrintEditingBridge(pages: HTMLElement, paper: HTMLElement, getView: () => EditorView | undefined, resolveHit: (target: Element, clientX: number) => {
|
|
@@ -12,6 +12,8 @@ export interface PrintLayoutController {
|
|
|
12
12
|
offset: number;
|
|
13
13
|
} | null;
|
|
14
14
|
scheduleRelayout(model: DocumentModel): void;
|
|
15
|
+
/** Lays out now, dropping a pending debounced layout (a document swap must not show stale pages). */
|
|
16
|
+
relayoutNow(model: DocumentModel): void;
|
|
15
17
|
/** Recomputes which page is most visible; call on the scroll container's `scroll` event. */
|
|
16
18
|
refreshCurrentPage(): void;
|
|
17
19
|
pageStatus(): {
|
|
@@ -13,7 +13,7 @@ export interface StatusBar {
|
|
|
13
13
|
/** Redraws every label after the editor locale changed. */
|
|
14
14
|
relocalize(): void;
|
|
15
15
|
}
|
|
16
|
-
export declare const ZOOM_MIN =
|
|
16
|
+
export declare const ZOOM_MIN = 25;
|
|
17
17
|
export declare const ZOOM_MAX = 200;
|
|
18
18
|
/**
|
|
19
19
|
* Word-style status bar: page/words/language on the left, views and zoom on the right. The shared
|