ooxml-ui 1.0.0 → 1.1.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 +2 -0
- package/dist/{chunk-OXKWNNNJ.js → chunk-3FPW7M6U.js} +1 -1
- package/dist/{chunk-XDUYS4KK.js → chunk-BEN3453I.js} +1 -1
- package/dist/{chunk-FLHM5Q4O.js → chunk-KVKKXRL7.js} +3 -3
- package/dist/{chunk-T3HB5LMH.js → chunk-M5DTJSOV.js} +2 -2
- package/dist/{chunk-ZV2Z4IWH.js → chunk-USDLALB5.js} +4 -1
- package/dist/{chunk-4QQASR5A.js → chunk-ZU7GX4SY.js} +4 -4
- package/dist/controls.js +3 -3
- package/dist/docx/localization-strings.d.ts +1 -1
- package/dist/docx/localization.d.ts +0 -1
- package/dist/docx.js +11 -21
- package/dist/index.js +6 -6
- package/dist/pptx/{chunk-FEFQTZDM.cjs → chunk-KPZWYF44.cjs} +62 -97
- package/dist/pptx/{chunk-XQZWZMGZ.cjs → chunk-SM3CWDIQ.cjs} +7 -17
- package/dist/pptx/{chunk-JSBGBVBH.mjs → chunk-VRFNAF3Q.mjs} +7 -17
- package/dist/pptx/{chunk-XWE5GSE7.mjs → chunk-Y2W4SZER.mjs} +57 -95
- package/dist/pptx/dom/index.cjs +196 -196
- package/dist/pptx/dom/index.mjs +4 -4
- package/dist/pptx/i18n/index.cjs +6 -6
- package/dist/pptx/i18n/index.mjs +1 -1
- package/dist/pptx/i18n/translator.d.ts.map +1 -1
- package/dist/pptx/index.cjs +2700 -2688
- package/dist/pptx/index.mjs +2 -2
- package/dist/pptx/render/connector-elbow-geometry.d.ts +7 -43
- package/dist/pptx/render/connector-elbow-geometry.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +1 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/viewer-root-options.d.ts +46 -0
- package/dist/pptx/render/viewer-root-options.d.ts.map +1 -0
- package/dist/pptx/web-components/registration-contract.d.ts.map +1 -1
- package/dist/presence.js +2 -2
- package/dist/registry.d.ts +2 -0
- package/dist/registry.d.ts.map +1 -1
- package/dist/smartart.js +2 -2
- package/dist/teams.js +4 -4
- package/dist/visio.js +14 -8
- package/dist/xlsx.js +7 -7
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -251,6 +251,8 @@ importing its source into the strict UI project would bypass that boundary.
|
|
|
251
251
|
The UI build first stages PowerPoint declarations in the ignored `.types-pptx`
|
|
252
252
|
directory, so the strict Teams build can consume the DOM adapter's declarations
|
|
253
253
|
without importing legacy source or overwriting its declaration inputs.
|
|
254
|
+
`bun run typecheck` stages the same declarations first, so it needs no prior
|
|
255
|
+
build; the vitest config resolves `ooxml-ui/pptx/dom` to source for the same reason.
|
|
254
256
|
|
|
255
257
|
## Documentation
|
|
256
258
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OfficeElement, controlStyles, definer } from './chunk-
|
|
1
|
+
import { OfficeElement, controlStyles, definer } from './chunk-USDLALB5.js';
|
|
2
2
|
import { html } from 'lit';
|
|
3
3
|
import { hexToRgbChannels } from 'ooxml-core/color';
|
|
4
4
|
import { resolveDrawingColor } from 'ooxml-core/diagram';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { THEME_CSS, installOfficeUiTheme } from './chunk-X7RINDJQ.js';
|
|
2
|
-
import { defineMenuButton, defineMenuItem, registerControls, defineSwitch } from './chunk-
|
|
2
|
+
import { defineMenuButton, defineMenuItem, registerControls, defineSwitch } from './chunk-M5DTJSOV.js';
|
|
3
3
|
import { registerIcon, getIcon } from './chunk-BOX43CZD.js';
|
|
4
|
-
import { initialsOf, definePresence } from './chunk-
|
|
5
|
-
import { definer, OfficeElement, controlStyles } from './chunk-
|
|
4
|
+
import { initialsOf, definePresence } from './chunk-3FPW7M6U.js';
|
|
5
|
+
import { definer, OfficeElement, controlStyles } from './chunk-USDLALB5.js';
|
|
6
6
|
import { html, nothing, LitElement, unsafeCSS, svg } from 'lit';
|
|
7
7
|
import { repeat } from 'lit/directives/repeat.js';
|
|
8
8
|
import { live } from 'lit/directives/live.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createIconSvg, paintIcon, getIcon } from './chunk-BOX43CZD.js';
|
|
2
|
-
import { initialsOf } from './chunk-
|
|
3
|
-
import { OfficeElement, controlStyles, definer, valueOn, flag, present, triState, withTokens } from './chunk-
|
|
2
|
+
import { initialsOf } from './chunk-3FPW7M6U.js';
|
|
3
|
+
import { OfficeElement, controlStyles, definer, valueOn, flag, present, triState, withTokens } from './chunk-USDLALB5.js';
|
|
4
4
|
import { tok, OFFICE_TOKENS } from './chunk-JFJXBYRD.js';
|
|
5
5
|
import { html, LitElement, nothing, render, svg } from 'lit';
|
|
6
6
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
@@ -16,9 +16,12 @@ function defineOnce(registry, tag, make) {
|
|
|
16
16
|
assertContract(registry, tag);
|
|
17
17
|
if (registry.get(tag)) return;
|
|
18
18
|
const ctor = make();
|
|
19
|
-
|
|
19
|
+
markContract(ctor);
|
|
20
20
|
registry.define(tag, ctor);
|
|
21
21
|
}
|
|
22
|
+
function markContract(ctor) {
|
|
23
|
+
Object.defineProperty(ctor, CONTRACT_KEY, { value: CONTRACT_REVISION });
|
|
24
|
+
}
|
|
22
25
|
function browserRegistry() {
|
|
23
26
|
return typeof window === "undefined" ? void 0 : window.customElements;
|
|
24
27
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineSmartArt } from './chunk-
|
|
2
|
-
import { TEAMS_TAGS, registerTeams } from './chunk-
|
|
1
|
+
import { defineSmartArt } from './chunk-BEN3453I.js';
|
|
2
|
+
import { TEAMS_TAGS, registerTeams } from './chunk-KVKKXRL7.js';
|
|
3
3
|
import { installOfficeUiTheme } from './chunk-X7RINDJQ.js';
|
|
4
|
-
import { registerControls } from './chunk-
|
|
5
|
-
import { definePresence } from './chunk-
|
|
4
|
+
import { registerControls } from './chunk-M5DTJSOV.js';
|
|
5
|
+
import { definePresence } from './chunk-3FPW7M6U.js';
|
|
6
6
|
|
|
7
7
|
// src/index.ts
|
|
8
8
|
var OFFICE_UI_TAGS = [
|
package/dist/controls.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, EMPTY_MENU_STATE, OFFICE_AVATAR_SWATCHES, OFFICE_COLOR_SWATCHES, OFFICE_COLOR_SWATCH_HEXES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_TITLE_BAR_SEARCH_LIMIT, OFFICE_TOAST_VISIBLE_LIMIT, assignKeyTips, attachKeyTips, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, createRibbonOverflow, defineAccount, defineBackstage, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineGallery, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, nextEnabledIndex, parseSvgPreview, profileInitials, readOfficeProfile, registerControls, rulerDivisions, runKeyTips, sanitizeOfficeProfile, typeAheadIndex, writeOfficeProfile } from './chunk-
|
|
1
|
+
export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, EMPTY_MENU_STATE, OFFICE_AVATAR_SWATCHES, OFFICE_COLOR_SWATCHES, OFFICE_COLOR_SWATCH_HEXES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_TITLE_BAR_SEARCH_LIMIT, OFFICE_TOAST_VISIBLE_LIMIT, assignKeyTips, attachKeyTips, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, createRibbonOverflow, defineAccount, defineBackstage, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineGallery, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, nextEnabledIndex, parseSvgPreview, profileInitials, readOfficeProfile, registerControls, rulerDivisions, runKeyTips, sanitizeOfficeProfile, typeAheadIndex, writeOfficeProfile } from './chunk-M5DTJSOV.js';
|
|
2
2
|
import './chunk-BOX43CZD.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-3FPW7M6U.js';
|
|
4
|
+
import './chunk-USDLALB5.js';
|
|
5
5
|
import './chunk-JFJXBYRD.js';
|
|
@@ -745,4 +745,4 @@ export declare const strings: {
|
|
|
745
745
|
readonly 'zh-CN': import("./localization-strings.js").LocaleStrings;
|
|
746
746
|
};
|
|
747
747
|
/** Canonical codes of the supported display locales, in menu order. */
|
|
748
|
-
export declare const EDITOR_LOCALES: readonly [
|
|
748
|
+
export declare const EDITOR_LOCALES: readonly ["en", "fr", "de", "es", "zh-CN"];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/** Display-language strings for the shared editor UI. This locale never changes DOCX language marks. */
|
|
2
1
|
import { EDITOR_LOCALES, type LocalizationKey } from './localization-strings.js';
|
|
3
2
|
export type EditorLocale = (typeof EDITOR_LOCALES)[number];
|
|
4
3
|
/** A locale code a host may pass: a canonical code (autocompleted) or any BCP 47 tag such as `de-DE`. */
|
package/dist/docx.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineSmartArt } from './chunk-
|
|
1
|
+
import { defineSmartArt } from './chunk-BEN3453I.js';
|
|
2
2
|
import { shadcnBridge } from './chunk-X7RINDJQ.js';
|
|
3
|
-
import { createRibbonOverflow, defineRibbon, defineDialog, defineSearchField, defineSwitch, defineTitleBar, defineBackstage, defineStatusBar, defineZoomSlider, defineContextMenu, runKeyTips, assignKeyTips } from './chunk-
|
|
3
|
+
import { createRibbonOverflow, defineRibbon, defineDialog, defineSearchField, defineSwitch, defineTitleBar, defineBackstage, defineStatusBar, defineZoomSlider, defineContextMenu, runKeyTips, assignKeyTips } from './chunk-M5DTJSOV.js';
|
|
4
4
|
import { registerIcon } from './chunk-BOX43CZD.js';
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
5
|
+
import './chunk-3FPW7M6U.js';
|
|
6
|
+
import './chunk-USDLALB5.js';
|
|
7
7
|
import './chunk-JFJXBYRD.js';
|
|
8
|
-
import {
|
|
8
|
+
import { normalizeLocale, SUPPORTED_OFFICE_LOCALES, interpolate } from 'ooxml-core/i18n';
|
|
9
|
+
import { createDocument, saveDocx, sectionsFromLayout, sectionLayoutJson, sectionsOf, pageSizeOf, columnPreset, applyPageSetup, withSection, computeListLabels, numberNotesInOrder, tocEntries, tableOfFiguresInstruction, findTableOfContents, ensureListDefinition, resolveNumberingLevel, equalColumnDraft, readColumnDraft, PAGE_SIZE_OPTIONS, PAGE_SIZES, readPageSetup, isRunHiddenForReview, resolveTableStyleFormatting, resolveParagraphFormatting, displayListLabel, setTitlePage, setLineNumbering, setVerticalAlign, setPageNumbering, ST_NumberFormat, unequalColumnPreset, setColumns, setOrientation, setPageSize, setMargins, lineSpacingLabel, formatNoteNumber, reviewDocumentFormatting, reviewFormattingWarnings, listRevisions, plainText, tocHyperlinks, DEFAULT_TOC_INSTRUCTION, tocBookmarks, buildTableOfContents, tocCaptionLabel, isFieldLocked, twips as twips$1, signedTwips, formatListNumber, columnTextWidth, validColumnDraft, validatePageSetup, presetOf, LIGATURE_VALUES, isLigatures, reviewRunFormatting, resolveRunFormatting, reviewParagraphFormatting, resolveThemeColorReference, lineSpacingValue, isStHighlightColor, transformCase, DEFAULT_TABLE_BORDERS, parseLineSpacingValue, twipsAttr, twipsFromPixels, headingLevel, isValidLanguageTag, WORD, isHeadingListKind, fieldName, lineSpacingOptions, halfPointsFromPoints, changeColumnWidth, changeColumnGap, createListDefinition, linkStylesToList, headingListLevels, documentStats } from 'ooxml-core/docx';
|
|
9
10
|
import { Schema, DOMSerializer, Fragment } from 'prosemirror-model';
|
|
10
11
|
import { markSpecs, imageNodeSpec, fieldMarkerNodeSpec, noteReferenceNodeSpec, pageBreakNodeSpec, hardBreakNodeSpec, commentHistoryAttributes, tableCellStyle, tableStyle, createToggleFormat, expectDefined, paragraphBoxCss, themeToCssVars, lightTheme, darkTheme, normalizeThemeMode, applyThemeColors, refreshWordYjsPresence, normalizeRibbonActions, DirtyState, isWordYjsRemoteTransaction, REMOTE_TRANSACTION_META, repairCollaborativeDocumentIds, HEADER_FOOTER_INPUT, restoreSectionParts, commentThreadsFromDoc, restoreNoteParts, CollaborationClient, createCollaborationIdGenerator, WordYjsCollaboration, sectionPartsJson, NotePartsStep, notePartsJson, SectionPartsStep, fitZoomPercent, hasChangeAtCursor, hasAnyChange, commentIdsAtSelection, commentAnchors, countWords, fieldGuardPlugin, trackChangesPlugin, wordYjsPresencePlugin, placementClass, removeCommentThread, removeCommentAnchor, deleteComment, updateCommentThreads, addComment, toggleTrackChanges, goToNextChange, goToPreviousChange, rejectAllChanges, acceptAllChanges, rejectChangeAtCursor, acceptChangeAtCursor, goToComment, appendInlineNode, sameJson, sameRuns, PARAGRAPH_KEEP_KEYS, paragraphFromAttrs, parseBordersJson, isNavigableHref, wordYjsPluginKey, setReviewRecordingPreferences, nodeNumbering, paragraphFormattingRevision, inlineNodeRun, formattingRevision, insertWordHardBreak, paragraphAttrs, resolveCellVisuals, themeDrawing, ribbonActionIdForLabel, removeWordLink, fieldResultRanges, wordLinkRangeAt, ligatureCss as ligatureCss$1, wordYjsRedo, wordYjsUndo, runToInlineNodes as runToInlineNodes$1, backstageFocus, applyRunFormattingPatch, clearDirectRunFormatting, applyWordLink, ligatureStyle, wordHighlightColors, swatchColor, cssBorderSide, deleteFieldSelection, resolveComment, replyToComment, CollaborationAuthority } from 'ooxml-core/docx/ui';
|
|
11
12
|
export { CollaborationAuthority, CollaborationClient, RIBBON_ACTION_IDS, RIBBON_ACTION_LABELS, createCollaborationIdGenerator, darkTheme, isRibbonActionId, lightTheme, normalizeRibbonActions, repairCollaborativeDocumentIds, themeToCssVars } from 'ooxml-core/docx/ui';
|
|
@@ -3949,30 +3950,17 @@ var zhCN = {
|
|
|
3949
3950
|
|
|
3950
3951
|
// src/docx/localization-strings.ts
|
|
3951
3952
|
var strings = { en, fr, de, es, "zh-CN": zhCN };
|
|
3952
|
-
var EDITOR_LOCALES =
|
|
3953
|
+
var EDITOR_LOCALES = SUPPORTED_OFFICE_LOCALES;
|
|
3953
3954
|
|
|
3954
3955
|
// src/docx/localization.ts
|
|
3955
3956
|
function normalizeEditorLocale(value) {
|
|
3956
|
-
|
|
3957
|
-
switch (parts[0]) {
|
|
3958
|
-
case "fr":
|
|
3959
|
-
case "de":
|
|
3960
|
-
case "es":
|
|
3961
|
-
return parts[0];
|
|
3962
|
-
case "zh":
|
|
3963
|
-
return parts.some((part) => ["hant", "tw", "hk", "mo"].includes(part)) ? "en" : "zh-CN";
|
|
3964
|
-
default:
|
|
3965
|
-
return "en";
|
|
3966
|
-
}
|
|
3957
|
+
return normalizeLocale(value, EDITOR_LOCALES, "en");
|
|
3967
3958
|
}
|
|
3968
3959
|
function translate(locale, key2) {
|
|
3969
3960
|
return strings[locale][key2] ?? strings.en[key2] ?? key2;
|
|
3970
3961
|
}
|
|
3971
3962
|
function translateTemplate(locale, key2, values2) {
|
|
3972
|
-
return translate(locale, key2)
|
|
3973
|
-
/\{(\w+)\}/g,
|
|
3974
|
-
(match, name) => name in values2 ? String(values2[name]) : match
|
|
3975
|
-
);
|
|
3963
|
+
return interpolate(translate(locale, key2), values2);
|
|
3976
3964
|
}
|
|
3977
3965
|
function translateDynamic(locale, text) {
|
|
3978
3966
|
if (locale === "en") return text;
|
|
@@ -9787,6 +9775,7 @@ function refreshFieldResults(tr, pageOf, captionsOnly = false) {
|
|
|
9787
9775
|
const targets = bookmarkTargets(tr.doc);
|
|
9788
9776
|
const changes = [];
|
|
9789
9777
|
for (const run of fieldResultRanges(tr.doc)) {
|
|
9778
|
+
if (isFieldLocked(inlineNodeRun(schema.text("x", run.marks)))) continue;
|
|
9790
9779
|
const match = REFERENCE.exec(String(run.mark.attrs.instr ?? ""));
|
|
9791
9780
|
if (!match || !plainSwitches(match[3] ?? "")) continue;
|
|
9792
9781
|
const target = targets.get((match[2] ?? "").replace(/^"|"$/g, ""));
|
|
@@ -9822,6 +9811,7 @@ function renumberCaptions(tr, label) {
|
|
|
9822
9811
|
});
|
|
9823
9812
|
for (let index = fields.length - 1; index >= 0; index--) {
|
|
9824
9813
|
const { from: from2, to, node } = fields[index];
|
|
9814
|
+
if (isFieldLocked(inlineNodeRun(node))) continue;
|
|
9825
9815
|
if (node.text !== String(index + 1))
|
|
9826
9816
|
tr.replaceWith(from2, to, schema.text(String(index + 1), node.marks));
|
|
9827
9817
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { OFFICE_UI_TAGS, registerOfficeUi } from './chunk-
|
|
2
|
-
export { OfficeUiSmartArt, defineSmartArt, renderDiagramDrawing } from './chunk-
|
|
3
|
-
export { EMOJI, OfficeUiAppRail, OfficeUiAvatar, OfficeUiCallControls, OfficeUiCallGrid, OfficeUiChannelList, OfficeUiChatComposer, OfficeUiChatList, OfficeUiPrejoin, QUICK_REACTIONS, TEAMS_TAGS, TeamsApp, TeamsChannelTab, TeamsContentPreview, TeamsController, TeamsElement, TeamsFilesPanel, TeamsSettings, applyTeamsProps, colorFor, createTeams, dayLabel, defineAppRail, defineAvatar, defineCallControls, defineCallGrid, defineChannelList, defineChatComposer, defineChatList, definePrejoin, defineTeamsApp, defineTeamsChannelTab, defineTeamsContentPreview, defineTeamsFilesPanel, defineTeamsSettings, formatElapsed, formatSize, formatTime, icon, listenTeamsEvents, loadConfig, loadIdentity, parseIceLines, registerTeams, safeStorage, saveConfig, saveIdentity, withStyles } from './chunk-
|
|
1
|
+
export { OFFICE_UI_TAGS, registerOfficeUi } from './chunk-ZU7GX4SY.js';
|
|
2
|
+
export { OfficeUiSmartArt, defineSmartArt, renderDiagramDrawing } from './chunk-BEN3453I.js';
|
|
3
|
+
export { EMOJI, OfficeUiAppRail, OfficeUiAvatar, OfficeUiCallControls, OfficeUiCallGrid, OfficeUiChannelList, OfficeUiChatComposer, OfficeUiChatList, OfficeUiPrejoin, QUICK_REACTIONS, TEAMS_TAGS, TeamsApp, TeamsChannelTab, TeamsContentPreview, TeamsController, TeamsElement, TeamsFilesPanel, TeamsSettings, applyTeamsProps, colorFor, createTeams, dayLabel, defineAppRail, defineAvatar, defineCallControls, defineCallGrid, defineChannelList, defineChatComposer, defineChatList, definePrejoin, defineTeamsApp, defineTeamsChannelTab, defineTeamsContentPreview, defineTeamsFilesPanel, defineTeamsSettings, formatElapsed, formatSize, formatTime, icon, listenTeamsEvents, loadConfig, loadIdentity, parseIceLines, registerTeams, safeStorage, saveConfig, saveIdentity, withStyles } from './chunk-KVKKXRL7.js';
|
|
4
4
|
export { TeamsPresentationPreview, defineTeamsPresentationPreview } from './chunk-SNV6YKPC.js';
|
|
5
5
|
export { THEME_CSS, THEME_STYLE_ID, installOfficeUiTheme, shadcnBridge, themeBridge } from './chunk-X7RINDJQ.js';
|
|
6
|
-
export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, EMPTY_MENU_STATE, OFFICE_AVATAR_SWATCHES, OFFICE_COLOR_SWATCHES, OFFICE_COLOR_SWATCH_HEXES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_TITLE_BAR_SEARCH_LIMIT, OFFICE_TOAST_VISIBLE_LIMIT, assignKeyTips, attachKeyTips, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, createRibbonOverflow, defineAccount, defineBackstage, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineGallery, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, glyph, nextEnabledIndex, parseSvgPreview, profileInitials, readOfficeProfile, registerControls, rulerDivisions, runKeyTips, sanitizeOfficeProfile, typeAheadIndex, writeOfficeProfile } from './chunk-
|
|
6
|
+
export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, EMPTY_MENU_STATE, OFFICE_AVATAR_SWATCHES, OFFICE_COLOR_SWATCHES, OFFICE_COLOR_SWATCH_HEXES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_TITLE_BAR_SEARCH_LIMIT, OFFICE_TOAST_VISIBLE_LIMIT, assignKeyTips, attachKeyTips, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, createRibbonOverflow, defineAccount, defineBackstage, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineGallery, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, glyph, nextEnabledIndex, parseSvgPreview, profileInitials, readOfficeProfile, registerControls, rulerDivisions, runKeyTips, sanitizeOfficeProfile, typeAheadIndex, writeOfficeProfile } from './chunk-M5DTJSOV.js';
|
|
7
7
|
export { createIconSvg, getIcon, listIcons, paintIcon, registerIcon } from './chunk-BOX43CZD.js';
|
|
8
|
-
export { OfficeUiPresence, definePresence, initialsOf, participantsFromAwareness } from './chunk-
|
|
9
|
-
export { CONTRACT_REVISION, OfficeElement, controlStyles, flag, readFlag, triState, valueOn, withTokens } from './chunk-
|
|
8
|
+
export { OfficeUiPresence, definePresence, initialsOf, participantsFromAwareness } from './chunk-3FPW7M6U.js';
|
|
9
|
+
export { CONTRACT_REVISION, OfficeElement, controlStyles, flag, readFlag, triState, valueOn, withTokens } from './chunk-USDLALB5.js';
|
|
10
10
|
export { COMPACT, FOCUS_RING, OFFICE_TOKENS, TOUCH, tok } from './chunk-JFJXBYRD.js';
|
|
@@ -20,7 +20,7 @@ var chunkX4FNVH7J_cjs = require('./chunk-X4FNVH7J.cjs');
|
|
|
20
20
|
var chunkUPN5FFKP_cjs = require('./chunk-UPN5FFKP.cjs');
|
|
21
21
|
var chunkY4LTLCQP_cjs = require('./chunk-Y4LTLCQP.cjs');
|
|
22
22
|
var chunkUSBRSEJK_cjs = require('./chunk-USBRSEJK.cjs');
|
|
23
|
-
var
|
|
23
|
+
var chunkSM3CWDIQ_cjs = require('./chunk-SM3CWDIQ.cjs');
|
|
24
24
|
var chunkOGJRSAGH_cjs = require('./chunk-OGJRSAGH.cjs');
|
|
25
25
|
var chunkEW5DW5KR_cjs = require('./chunk-EW5DW5KR.cjs');
|
|
26
26
|
var pptx = require('ooxml-core/pptx');
|
|
@@ -22663,7 +22663,7 @@ function createTemplateContext(options = {}) {
|
|
|
22663
22663
|
const scheme = { ...pptx.DEFAULT_SCHEME_COLOR_MAP, ...options.scheme ?? {} };
|
|
22664
22664
|
let counter = 0;
|
|
22665
22665
|
const idFor = options.idFor ?? ((index) => `template-el-${Date.now()}-${index}`);
|
|
22666
|
-
const dictionary =
|
|
22666
|
+
const dictionary = chunkSM3CWDIQ_cjs.translationsEn;
|
|
22667
22667
|
const translate = options.translate ?? ((key) => dictionary[key] ?? key);
|
|
22668
22668
|
return {
|
|
22669
22669
|
scheme,
|
|
@@ -30769,8 +30769,6 @@ function clampFlyoutPosition(input) {
|
|
|
30769
30769
|
top: Math.max(margin, input.height > 0 ? Math.min(input.y, maxTop) : input.y)
|
|
30770
30770
|
};
|
|
30771
30771
|
}
|
|
30772
|
-
|
|
30773
|
-
// src/pptx/render/connector-elbow-geometry.ts
|
|
30774
30772
|
function connectorAdjustmentFraction(element, key, fallback = 0.5) {
|
|
30775
30773
|
const adj = element.shapeAdjustments;
|
|
30776
30774
|
const raw = adj?.[key] ?? adj?.adj;
|
|
@@ -30783,80 +30781,19 @@ function connectorAdjustmentFraction(element, key, fallback = 0.5) {
|
|
|
30783
30781
|
function connectorBendFraction(element) {
|
|
30784
30782
|
return connectorAdjustmentFraction(element, "adj1", 0.5);
|
|
30785
30783
|
}
|
|
30786
|
-
function elbowSegmentCount(lowerShapeType) {
|
|
30787
|
-
if (lowerShapeType.includes("connector4")) {
|
|
30788
|
-
return 4;
|
|
30789
|
-
}
|
|
30790
|
-
if (lowerShapeType.includes("connector5")) {
|
|
30791
|
-
return 5;
|
|
30792
|
-
}
|
|
30793
|
-
return 3;
|
|
30794
|
-
}
|
|
30795
|
-
function axisMapper(horizontalPrimary) {
|
|
30796
|
-
return (u, v) => ({ x: u, y: v }) ;
|
|
30797
|
-
}
|
|
30798
30784
|
function elbowWaypoints(x1, y1, x2, y2, segments, adj1, adj2, adj3) {
|
|
30799
|
-
|
|
30800
|
-
|
|
30801
|
-
|
|
30802
|
-
|
|
30803
|
-
|
|
30804
|
-
|
|
30805
|
-
|
|
30806
|
-
|
|
30807
|
-
|
|
30808
|
-
|
|
30809
|
-
|
|
30810
|
-
|
|
30811
|
-
return [toXY(u1, v1), toXY(mu, v1), toXY(mu, mv2), toXY(u2, mv2), toXY(u2, v2)];
|
|
30812
|
-
}
|
|
30813
|
-
const mu1 = u1 + (u2 - u1) * adj1;
|
|
30814
|
-
const mv = v1 + (v2 - v1) * adj2;
|
|
30815
|
-
const mu2 = u1 + (u2 - u1) * adj3;
|
|
30816
|
-
return [toXY(u1, v1), toXY(mu1, v1), toXY(mu1, mv), toXY(mu2, mv), toXY(mu2, v2), toXY(u2, v2)];
|
|
30817
|
-
}
|
|
30818
|
-
function fmt3(p) {
|
|
30819
|
-
return `${p.x},${p.y}`;
|
|
30820
|
-
}
|
|
30821
|
-
function curveTo(ctrl, end) {
|
|
30822
|
-
return `C${fmt3(ctrl)} ${fmt3(ctrl)} ${fmt3(end)}`;
|
|
30823
|
-
}
|
|
30824
|
-
function curvedElbowPathD(x1, y1, x2, y2, segments, adj1, adj2, adj3) {
|
|
30825
|
-
const u1 = x1 ;
|
|
30826
|
-
const v1 = y1 ;
|
|
30827
|
-
const u2 = x2 ;
|
|
30828
|
-
const v2 = y2 ;
|
|
30829
|
-
const toXY = axisMapper();
|
|
30830
|
-
const start = toXY(u1, v1);
|
|
30831
|
-
if (segments === 3) {
|
|
30832
|
-
const mu = u1 + (u2 - u1) * adj1;
|
|
30833
|
-
return `M${fmt3(start)} C${fmt3(toXY(mu, v1))} ${fmt3(toXY(mu, v2))} ${fmt3(toXY(u2, v2))}`;
|
|
30834
|
-
}
|
|
30835
|
-
if (segments === 4) {
|
|
30836
|
-
const mu = u1 + (u2 - u1) * adj1;
|
|
30837
|
-
const mv2 = v1 + (v2 - v1) * adj2;
|
|
30838
|
-
const vq = v1 + (mv2 - v1) * 0.5;
|
|
30839
|
-
const midU2 = (mu + u2) / 2;
|
|
30840
|
-
return [
|
|
30841
|
-
`M${fmt3(start)}`,
|
|
30842
|
-
curveTo(toXY(mu, v1), toXY(mu, vq)),
|
|
30843
|
-
curveTo(toXY(mu, mv2), toXY(midU2, mv2)),
|
|
30844
|
-
curveTo(toXY(u2, mv2), toXY(u2, v2))
|
|
30845
|
-
].join(" ");
|
|
30846
|
-
}
|
|
30847
|
-
const mu1 = u1 + (u2 - u1) * adj1;
|
|
30848
|
-
const mv = v1 + (v2 - v1) * adj2;
|
|
30849
|
-
const mu2 = u1 + (u2 - u1) * adj3;
|
|
30850
|
-
const vq1 = v1 + (mv - v1) * 0.5;
|
|
30851
|
-
const vq2 = mv + (v2 - mv) * 0.5;
|
|
30852
|
-
const midU = (mu1 + mu2) / 2;
|
|
30853
|
-
return [
|
|
30854
|
-
`M${fmt3(start)}`,
|
|
30855
|
-
curveTo(toXY(mu1, v1), toXY(mu1, vq1)),
|
|
30856
|
-
curveTo(toXY(mu1, mv), toXY(midU, mv)),
|
|
30857
|
-
curveTo(toXY(mu2, mv), toXY(mu2, vq2)),
|
|
30858
|
-
curveTo(toXY(mu2, v2), toXY(u2, v2))
|
|
30859
|
-
].join(" ");
|
|
30785
|
+
return geometry.elbowWaypoints(
|
|
30786
|
+
x1,
|
|
30787
|
+
y1,
|
|
30788
|
+
x2,
|
|
30789
|
+
y2,
|
|
30790
|
+
Math.abs(x2 - x1),
|
|
30791
|
+
Math.abs(y2 - y1),
|
|
30792
|
+
segments,
|
|
30793
|
+
adj1,
|
|
30794
|
+
adj2,
|
|
30795
|
+
adj3
|
|
30796
|
+
).map(([x, y]) => ({ x, y }));
|
|
30860
30797
|
}
|
|
30861
30798
|
|
|
30862
30799
|
// src/pptx/render/connector-hit-target.ts
|
|
@@ -30970,15 +30907,15 @@ function buildConnectorPathD(shapeType, x1, y1, x2, y2, bend, bend2 = 0.5, bend3
|
|
|
30970
30907
|
if (t.includes("bentconnector2")) {
|
|
30971
30908
|
return `M${x1},${y1} L${x2},${y1} L${x2},${y2}`;
|
|
30972
30909
|
}
|
|
30973
|
-
const segments2 = elbowSegmentCount(t);
|
|
30910
|
+
const segments2 = geometry.elbowSegmentCount(t);
|
|
30974
30911
|
const points = elbowWaypoints(x1, y1, x2, y2, segments2, bend, bend2, bend3);
|
|
30975
30912
|
return waypointsToPathD(points);
|
|
30976
30913
|
}
|
|
30977
30914
|
if (t.includes("curvedconnector2")) {
|
|
30978
30915
|
return `M${x1},${y1} Q${x2},${y1} ${x2},${y2}`;
|
|
30979
30916
|
}
|
|
30980
|
-
const segments = elbowSegmentCount(t);
|
|
30981
|
-
return curvedElbowPathD(x1, y1, x2, y2, segments, bend, bend2, bend3);
|
|
30917
|
+
const segments = geometry.elbowSegmentCount(t);
|
|
30918
|
+
return geometry.curvedElbowPathD(x1, y1, x2, y2, segments, bend, bend2, bend3);
|
|
30982
30919
|
}
|
|
30983
30920
|
function connectorWrapperTransform(element) {
|
|
30984
30921
|
return element.rotation ? `rotate(${element.rotation}deg)` : void 0;
|
|
@@ -59892,7 +59829,7 @@ function editGeometryBounds(geometry) {
|
|
|
59892
59829
|
}
|
|
59893
59830
|
return { minX, minY, maxX, maxY };
|
|
59894
59831
|
}
|
|
59895
|
-
function
|
|
59832
|
+
function fmt3(value) {
|
|
59896
59833
|
return String(Math.round(value * 1e3) / 1e3);
|
|
59897
59834
|
}
|
|
59898
59835
|
function editGeometryToPaths(geometry, ox, oy, width, height, scale2 = EDIT_POINTS_PATH_SCALE) {
|
|
@@ -59907,7 +59844,7 @@ function editGeometryToPaths(geometry, ox, oy, width, height, scale2 = EDIT_POIN
|
|
|
59907
59844
|
const segments = [];
|
|
59908
59845
|
const start = pt(sub.nodes[0]);
|
|
59909
59846
|
segments.push({ type: "moveTo", pt: start });
|
|
59910
|
-
svg2.push(`M ${
|
|
59847
|
+
svg2.push(`M ${fmt3(start.x)} ${fmt3(start.y)}`);
|
|
59911
59848
|
sub.segments.forEach((seg, i) => {
|
|
59912
59849
|
if (sub.closed && seg.kind === "line" && i === sub.segments.length - 1) {
|
|
59913
59850
|
return;
|
|
@@ -59915,13 +59852,13 @@ function editGeometryToPaths(geometry, ox, oy, width, height, scale2 = EDIT_POIN
|
|
|
59915
59852
|
const end = pt(sub.nodes[(i + 1) % sub.nodes.length]);
|
|
59916
59853
|
if (seg.kind === "line") {
|
|
59917
59854
|
segments.push({ type: "lineTo", pt: end });
|
|
59918
|
-
svg2.push(`L ${
|
|
59855
|
+
svg2.push(`L ${fmt3(end.x)} ${fmt3(end.y)}`);
|
|
59919
59856
|
} else {
|
|
59920
59857
|
const c1 = pt(seg.c1);
|
|
59921
59858
|
const c2 = pt(seg.c2);
|
|
59922
59859
|
segments.push({ type: "cubicBezTo", pts: [c1, c2, end] });
|
|
59923
59860
|
svg2.push(
|
|
59924
|
-
`C ${
|
|
59861
|
+
`C ${fmt3(c1.x)} ${fmt3(c1.y)} ${fmt3(c2.x)} ${fmt3(c2.y)} ${fmt3(end.x)} ${fmt3(end.y)}`
|
|
59925
59862
|
);
|
|
59926
59863
|
}
|
|
59927
59864
|
});
|
|
@@ -61406,7 +61343,7 @@ var HANDLE_ANCHORS = [
|
|
|
61406
61343
|
["sw", 0, 1],
|
|
61407
61344
|
["w", 0, 0.5]
|
|
61408
61345
|
];
|
|
61409
|
-
function
|
|
61346
|
+
function fmt4(n) {
|
|
61410
61347
|
return String(Math.round(n * 1e3) / 1e3);
|
|
61411
61348
|
}
|
|
61412
61349
|
function handleFor(id, fx, fy, frameW, frameH, len, thick) {
|
|
@@ -61415,7 +61352,7 @@ function handleFor(id, fx, fy, frameW, frameH, len, thick) {
|
|
|
61415
61352
|
const height = fy === 0.5 ? len : isCorner ? len : thick;
|
|
61416
61353
|
const left = fx === 0 ? 0 : fx === 1 ? frameW - width : frameW / 2 - width / 2;
|
|
61417
61354
|
const top = fy === 0 ? 0 : fy === 1 ? frameH - height : frameH / 2 - height / 2;
|
|
61418
|
-
let path = `M0 0 H${
|
|
61355
|
+
let path = `M0 0 H${fmt4(width)} V${fmt4(height)} H0 Z`;
|
|
61419
61356
|
if (isCorner) {
|
|
61420
61357
|
const x0 = fx === 0 ? 0 : len;
|
|
61421
61358
|
const y0 = fy === 0 ? 0 : len;
|
|
@@ -61429,7 +61366,7 @@ function handleFor(id, fx, fy, frameW, frameH, len, thick) {
|
|
|
61429
61366
|
[x0 + sx * thick, y0 + sy * len],
|
|
61430
61367
|
[x0, y0 + sy * len]
|
|
61431
61368
|
];
|
|
61432
|
-
path = `M${pts.map(([x, y]) => `${
|
|
61369
|
+
path = `M${pts.map(([x, y]) => `${fmt4(x)} ${fmt4(y)}`).join(" L")} Z`;
|
|
61433
61370
|
}
|
|
61434
61371
|
return { id, left, top, width, height, path, cursor: CURSORS[id] };
|
|
61435
61372
|
}
|
|
@@ -61447,8 +61384,8 @@ function buildCropOverlay(el, zoom = 1) {
|
|
|
61447
61384
|
};
|
|
61448
61385
|
const hx = frame.x - image.x;
|
|
61449
61386
|
const hy = frame.y - image.y;
|
|
61450
|
-
const outer2 = `M0 0 H${
|
|
61451
|
-
const hole = `M${
|
|
61387
|
+
const outer2 = `M0 0 H${fmt4(image.width)} V${fmt4(image.height)} H0 Z`;
|
|
61388
|
+
const hole = `M${fmt4(hx)} ${fmt4(hy)} H${fmt4(hx + frame.width)} V${fmt4(hy + frame.height)} H${fmt4(hx)} Z`;
|
|
61452
61389
|
const flips = [
|
|
61453
61390
|
start.flipHorizontal ? "scaleX(-1)" : "",
|
|
61454
61391
|
start.flipVertical ? "scaleY(-1)" : ""
|
|
@@ -64489,6 +64426,28 @@ function applySorterAction(state, slides, action, active2) {
|
|
|
64489
64426
|
}
|
|
64490
64427
|
}
|
|
64491
64428
|
|
|
64429
|
+
// src/pptx/render/viewer-root-options.ts
|
|
64430
|
+
var VIEWER_ROOT_OPTION_DEFAULTS = Object.freeze({
|
|
64431
|
+
initialSlide: 0,
|
|
64432
|
+
showToolbar: true,
|
|
64433
|
+
showThumbnails: true
|
|
64434
|
+
});
|
|
64435
|
+
function resolveViewerRootOptions(options) {
|
|
64436
|
+
const initialSlide = options?.initialSlide;
|
|
64437
|
+
return {
|
|
64438
|
+
initialSlide: typeof initialSlide === "number" && Number.isFinite(initialSlide) ? initialSlide : VIEWER_ROOT_OPTION_DEFAULTS.initialSlide,
|
|
64439
|
+
showToolbar: options?.showToolbar ?? VIEWER_ROOT_OPTION_DEFAULTS.showToolbar,
|
|
64440
|
+
showThumbnails: options?.showThumbnails ?? VIEWER_ROOT_OPTION_DEFAULTS.showThumbnails
|
|
64441
|
+
};
|
|
64442
|
+
}
|
|
64443
|
+
function resolveInitialSlideIndex(initialSlide, slideCount) {
|
|
64444
|
+
if (!(slideCount > 0)) {
|
|
64445
|
+
return 0;
|
|
64446
|
+
}
|
|
64447
|
+
const requested = resolveViewerRootOptions({ initialSlide }).initialSlide;
|
|
64448
|
+
return Math.min(Math.max(Math.trunc(requested), 0), Math.trunc(slideCount) - 1);
|
|
64449
|
+
}
|
|
64450
|
+
|
|
64492
64451
|
// src/pptx/web-components/control-styles.ts
|
|
64493
64452
|
var sheetsByDocument = /* @__PURE__ */ new WeakMap();
|
|
64494
64453
|
function attachControlStyles(root, css) {
|
|
@@ -65452,9 +65411,12 @@ function defineOnce(registry2, tag, make) {
|
|
|
65452
65411
|
assertContract(registry2, tag);
|
|
65453
65412
|
if (registry2.get(tag)) return;
|
|
65454
65413
|
const ctor = make();
|
|
65455
|
-
|
|
65414
|
+
markContract(ctor);
|
|
65456
65415
|
registry2.define(tag, ctor);
|
|
65457
65416
|
}
|
|
65417
|
+
function markContract(ctor) {
|
|
65418
|
+
Object.defineProperty(ctor, CONTRACT_KEY, { value: CONTRACT_REVISION });
|
|
65419
|
+
}
|
|
65458
65420
|
function browserRegistry() {
|
|
65459
65421
|
return typeof window === "undefined" ? void 0 : window.customElements;
|
|
65460
65422
|
}
|
|
@@ -69666,21 +69628,21 @@ function definePptxPresenterConsole(registry2) {
|
|
|
69666
69628
|
}
|
|
69667
69629
|
|
|
69668
69630
|
// src/pptx/web-components/registration-contract.ts
|
|
69669
|
-
var
|
|
69670
|
-
var CONTRACT_KEY2 = /* @__PURE__ */ Symbol.for("pptx-viewer.web-control-contract");
|
|
69631
|
+
var LEGACY_KEY = /* @__PURE__ */ Symbol.for("pptx-viewer.web-control-contract");
|
|
69671
69632
|
function assertWebControlContract(registry2, names) {
|
|
69672
69633
|
for (const name of names) {
|
|
69673
|
-
|
|
69674
|
-
const revision =
|
|
69675
|
-
if (revision !== void 0 && revision !==
|
|
69634
|
+
assertContract(registry2, name);
|
|
69635
|
+
const revision = registry2.get(name)?.[LEGACY_KEY];
|
|
69636
|
+
if (revision !== void 0 && revision !== CONTRACT_REVISION) {
|
|
69676
69637
|
throw new Error(
|
|
69677
|
-
`Incompatible ${name} contract (${revision}; expected ${
|
|
69638
|
+
`Incompatible ${name} contract (${revision}; expected ${CONTRACT_REVISION}). Use matching viewer bindings in this window.`
|
|
69678
69639
|
);
|
|
69679
69640
|
}
|
|
69680
69641
|
}
|
|
69681
69642
|
}
|
|
69682
69643
|
function markWebControlContract(ctor) {
|
|
69683
|
-
|
|
69644
|
+
markContract(ctor);
|
|
69645
|
+
Object.defineProperty(ctor, LEGACY_KEY, { value: CONTRACT_REVISION });
|
|
69684
69646
|
}
|
|
69685
69647
|
|
|
69686
69648
|
// src/pptx/web-components/ribbon-scoped-styles.ts
|
|
@@ -77632,6 +77594,7 @@ exports.VIEWER_PANEL_DESCRIPTIONS = VIEWER_PANEL_DESCRIPTIONS;
|
|
|
77632
77594
|
exports.VIEWER_PANEL_IDS = VIEWER_PANEL_IDS;
|
|
77633
77595
|
exports.VIEWER_PREFERENCE_TOGGLES = VIEWER_PREFERENCE_TOGGLES;
|
|
77634
77596
|
exports.VIEWER_PREFS_STORAGE_KEY = VIEWER_PREFS_STORAGE_KEY;
|
|
77597
|
+
exports.VIEWER_ROOT_OPTION_DEFAULTS = VIEWER_ROOT_OPTION_DEFAULTS;
|
|
77635
77598
|
exports.VIEWER_SHORTCUT_REFERENCE = VIEWER_SHORTCUT_REFERENCE;
|
|
77636
77599
|
exports.VIEW_EDITABLE_COMMANDS = VIEW_EDITABLE_COMMANDS;
|
|
77637
77600
|
exports.WARP_PATH_GENERATORS = WARP_PATH_GENERATORS;
|
|
@@ -79068,6 +79031,7 @@ exports.resolveHistoryDepth = resolveHistoryDepth;
|
|
|
79068
79031
|
exports.resolveHyperlinkTargetAttrs = resolveHyperlinkTargetAttrs;
|
|
79069
79032
|
exports.resolveImageResolutionPpi = resolveImageResolutionPpi;
|
|
79070
79033
|
exports.resolveImageResolutionScale = resolveImageResolutionScale;
|
|
79034
|
+
exports.resolveInitialSlideIndex = resolveInitialSlideIndex;
|
|
79071
79035
|
exports.resolveInlineEditAutoFitHeight = resolveInlineEditAutoFitHeight;
|
|
79072
79036
|
exports.resolveInlineEditNormAutofitShrink = resolveInlineEditNormAutofitShrink;
|
|
79073
79037
|
exports.resolveInsertedFieldText = resolveInsertedFieldText;
|
|
@@ -79152,6 +79116,7 @@ exports.resolveVertOverflowEllipsisStyle = resolveVertOverflowEllipsisStyle;
|
|
|
79152
79116
|
exports.resolveVerticalAnchorJustifyContent = resolveVerticalAnchorJustifyContent;
|
|
79153
79117
|
exports.resolveViewerAddinRows = resolveViewerAddinRows;
|
|
79154
79118
|
exports.resolveViewerAddinStatus = resolveViewerAddinStatus;
|
|
79119
|
+
exports.resolveViewerRootOptions = resolveViewerRootOptions;
|
|
79155
79120
|
exports.resolveViewportFitOptions = resolveViewportFitOptions;
|
|
79156
79121
|
exports.resolveVisibleRibbonTabs = resolveVisibleRibbonTabs;
|
|
79157
79122
|
exports.resolveWheelSpokeCount = resolveWheelSpokeCount;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var i18n = require('ooxml-core/i18n');
|
|
4
|
+
|
|
3
5
|
// src/pptx/i18n/translations-en-animation-presets.ts
|
|
4
6
|
var animationPresetTranslationsEn = {
|
|
5
7
|
// Editor preset tokens the dictionary never named.
|
|
@@ -4265,24 +4267,12 @@ var ALIGNMENT_LABEL_KEYS = {
|
|
|
4265
4267
|
middle: "pptx.ribbon.alignMiddle",
|
|
4266
4268
|
bottom: "pptx.ribbon.alignBottom"
|
|
4267
4269
|
};
|
|
4268
|
-
|
|
4269
|
-
// src/pptx/i18n/translator.ts
|
|
4270
|
-
function interpolate(template, params) {
|
|
4271
|
-
if (!params) {
|
|
4272
|
-
return template;
|
|
4273
|
-
}
|
|
4274
|
-
return template.replace(/\{\{\s*(\w+)\s*\}\}/gu, (match, name) => {
|
|
4275
|
-
const value = params[name];
|
|
4276
|
-
return value === void 0 ? match : String(value);
|
|
4277
|
-
});
|
|
4278
|
-
}
|
|
4279
4270
|
function createTranslator(locale = "en", messages) {
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
};
|
|
4271
|
+
return i18n.createTranslator(
|
|
4272
|
+
messages?.[locale],
|
|
4273
|
+
[locale !== "en" ? messages?.en : void 0, translationsEn],
|
|
4274
|
+
{ placeholder: "double", missing: keyToLabel }
|
|
4275
|
+
);
|
|
4286
4276
|
}
|
|
4287
4277
|
|
|
4288
4278
|
exports.ALIGNMENT_LABEL_KEYS = ALIGNMENT_LABEL_KEYS;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { createTranslator as createTranslator$1 } from 'ooxml-core/i18n';
|
|
2
|
+
|
|
1
3
|
// src/pptx/i18n/translations-en-animation-presets.ts
|
|
2
4
|
var animationPresetTranslationsEn = {
|
|
3
5
|
// Editor preset tokens the dictionary never named.
|
|
@@ -4263,24 +4265,12 @@ var ALIGNMENT_LABEL_KEYS = {
|
|
|
4263
4265
|
middle: "pptx.ribbon.alignMiddle",
|
|
4264
4266
|
bottom: "pptx.ribbon.alignBottom"
|
|
4265
4267
|
};
|
|
4266
|
-
|
|
4267
|
-
// src/pptx/i18n/translator.ts
|
|
4268
|
-
function interpolate(template, params) {
|
|
4269
|
-
if (!params) {
|
|
4270
|
-
return template;
|
|
4271
|
-
}
|
|
4272
|
-
return template.replace(/\{\{\s*(\w+)\s*\}\}/gu, (match, name) => {
|
|
4273
|
-
const value = params[name];
|
|
4274
|
-
return value === void 0 ? match : String(value);
|
|
4275
|
-
});
|
|
4276
|
-
}
|
|
4277
4268
|
function createTranslator(locale = "en", messages) {
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
};
|
|
4269
|
+
return createTranslator$1(
|
|
4270
|
+
messages?.[locale],
|
|
4271
|
+
[locale !== "en" ? messages?.en : void 0, translationsEn],
|
|
4272
|
+
{ placeholder: "double", missing: keyToLabel }
|
|
4273
|
+
);
|
|
4284
4274
|
}
|
|
4285
4275
|
|
|
4286
4276
|
export { ALIGNMENT_LABEL_KEYS, LOCALE_CATALOG, createTranslator, keyToLabel, translationsEn };
|