ooxml-ui 1.4.0 → 1.4.1
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-NYRRH2MD.js → chunk-6YEWVS7I.js} +1 -1
- package/dist/{chunk-56A2JK63.js → chunk-BCH2ZLWI.js} +1 -1
- package/dist/{chunk-R3LV6SGC.js → chunk-CEBFGUMT.js} +5 -5
- package/dist/{chunk-IY7QJLQG.js → chunk-CXOK5QWQ.js} +1 -1
- package/dist/{chunk-L4XGRNHF.js → chunk-F23XSUJD.js} +4 -4
- package/dist/{chunk-TWQ45BFL.js → chunk-FN3MBKHE.js} +1 -1
- package/dist/{chunk-BOIZWKM7.js → chunk-J2WUY2Q4.js} +7 -5
- package/dist/{chunk-2WLRFPMW.js → chunk-SPNWHKSR.js} +2 -0
- package/dist/clipboard-worker.js +1 -0
- package/dist/controls.js +4 -4
- package/dist/docx.js +6 -6
- package/dist/index.js +8 -8
- package/dist/pptx/{chunk-KRMMJUCO.cjs → chunk-7DMJEYQJ.cjs} +13 -5
- package/dist/pptx/{chunk-TC7HCF5M.mjs → chunk-LHNTMJSK.mjs} +13 -5
- package/dist/pptx/{chunk-FPE5PZMI.cjs → chunk-SOHTHDYV.cjs} +147 -45
- package/dist/pptx/{chunk-MWHGUEIJ.mjs → chunk-TLLEKXWQ.mjs} +130 -36
- package/dist/pptx/dom/elements/table-editable.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +238 -207
- package/dist/pptx/dom/index.mjs +41 -10
- package/dist/pptx/export/html2canvas-clone.cjs +2 -2
- package/dist/pptx/export/html2canvas-clone.mjs +1 -1
- package/dist/pptx/index.cjs +2758 -2726
- package/dist/pptx/index.mjs +2 -2
- package/dist/pptx/render/device-pixel-stroke.d.ts +10 -3
- package/dist/pptx/render/device-pixel-stroke.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/morph-heuristics.d.ts.map +1 -1
- package/dist/pptx/render/morph-matching.d.ts.map +1 -1
- package/dist/pptx/render/morph-predicates.d.ts +21 -0
- package/dist/pptx/render/morph-predicates.d.ts.map +1 -1
- package/dist/pptx/render/table-resize-merge.d.ts +59 -0
- package/dist/pptx/render/table-resize-merge.d.ts.map +1 -0
- package/dist/presence.js +3 -3
- package/dist/ribbon/overflow.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 +2 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/visio.js +5 -5
- package/dist/xlsx.js +11 -10
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
[Try the apps](https://christophervr.github.io/ooxml/) | [npm](https://www.npmjs.com/package/ooxml-ui) | [Full docs](https://christophervr.github.io/ooxml/) | [Source](https://github.com/ChristopherVR/ooxml)
|
|
10
10
|
|
|
11
|
+
Part of [ooxml](https://github.com/ChristopherVR/ooxml#readme): **[Office](https://github.com/ChristopherVR/ooxml#ooxml-office-the-whole-suite-in-one-app)** · [Word](https://github.com/ChristopherVR/ooxml/tree/main/viewers/docx#readme) · [Excel](https://github.com/ChristopherVR/ooxml/tree/main/viewers/xlsx#readme) · [PowerPoint](https://github.com/ChristopherVR/ooxml/tree/main/viewers/pptx#readme) · [Visio](https://github.com/ChristopherVR/ooxml/tree/main/viewers/visio#readme) · [OpenTeams](https://github.com/ChristopherVR/ooxml/tree/main/viewers/teams#readme) · [Core](https://github.com/ChristopherVR/ooxml/tree/main/src/core#readme)
|
|
12
|
+
|
|
11
13
|
Shared, format-neutral web components and styles for the Office viewers (Word, PowerPoint and
|
|
12
14
|
Excel). Custom elements with shadow-root controls and typed events, no framework. The runtime
|
|
13
15
|
dependencies are `ooxml-core` (types and a few pure helpers) and `lit`, which every element is built on
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OfficeElement, controlStyles, definer } from './chunk-
|
|
1
|
+
import { OfficeElement, controlStyles, definer } from './chunk-CXOK5QWQ.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
|
-
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-6YEWVS7I.js';
|
|
2
|
+
import { TEAMS_TAGS, registerTeams } from './chunk-F23XSUJD.js';
|
|
3
|
+
import { installOfficeUiTheme } from './chunk-BCH2ZLWI.js';
|
|
4
|
+
import { registerControls } from './chunk-J2WUY2Q4.js';
|
|
5
|
+
import { definePresence } from './chunk-FN3MBKHE.js';
|
|
6
6
|
|
|
7
7
|
// src/index.ts
|
|
8
8
|
var OFFICE_UI_TAGS = [
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { THEME_CSS, installOfficeUiTheme } from './chunk-
|
|
2
|
-
import { defineMenuButton, defineMenuItem, registerControls, defineSwitch } from './chunk-
|
|
1
|
+
import { THEME_CSS, installOfficeUiTheme } from './chunk-BCH2ZLWI.js';
|
|
2
|
+
import { defineMenuButton, defineMenuItem, registerControls, defineSwitch } from './chunk-J2WUY2Q4.js';
|
|
3
3
|
import { registerIcon, getIcon } from './chunk-M6GF5ED2.js';
|
|
4
|
-
import { initialsOf, definePresence } from './chunk-
|
|
5
|
-
import { definer, OfficeElement, controlStyles } from './chunk-
|
|
4
|
+
import { initialsOf, definePresence } from './chunk-FN3MBKHE.js';
|
|
5
|
+
import { definer, OfficeElement, controlStyles } from './chunk-CXOK5QWQ.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,7 +1,7 @@
|
|
|
1
1
|
import { createIconSvg, paintIcon, getIcon } from './chunk-M6GF5ED2.js';
|
|
2
|
-
import { initialsOf } from './chunk-
|
|
3
|
-
import { OfficeElement, controlStyles, definer, valueOn, flag, present, triState, withTokens } from './chunk-
|
|
4
|
-
import { tok, OFFICE_TOKENS } from './chunk-
|
|
2
|
+
import { initialsOf } from './chunk-FN3MBKHE.js';
|
|
3
|
+
import { OfficeElement, controlStyles, definer, valueOn, flag, present, triState, withTokens } from './chunk-CXOK5QWQ.js';
|
|
4
|
+
import { tok, OFFICE_TOKENS } from './chunk-SPNWHKSR.js';
|
|
5
5
|
import { html, LitElement, nothing, render, svg } from 'lit';
|
|
6
6
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
7
7
|
import { repeat } from 'lit/directives/repeat.js';
|
|
@@ -873,7 +873,7 @@ var OfficeUiBackstage = class extends OfficeElement {
|
|
|
873
873
|
var defineBackstage = definer("office-ui-backstage", () => OfficeUiBackstage);
|
|
874
874
|
|
|
875
875
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/chrome/find-bar.css?raw
|
|
876
|
-
var find_bar_default = ":host {\n display: flex;\n align-items: center;\n gap: var(--office-space-2);\n min-height: var(--office-find-bar-height);\n padding: var(--office-space-1) var(--office-space-2) var(--office-space-1) var(--office-space-3);\n border-bottom: var(--office-border-width) solid var(--office-border);\n background: var(--office-surface);\n color: var(--office-foreground);\n font: var(--office-font-size-sm) var(--office-font);\n}\n:host(:not([open])) {\n display: none;\n}\n.find-content {\n flex: 1;\n min-width: 0;\n}\n.replace-fields {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--office-space-2);\n margin-top: var(--office-space-2);\n}\n.replace-fields label {\n flex: 0 1 auto;\n}\n.replace-fields label:first-child {\n flex: 1;\n}\n.replace-fields textarea {\n min-width:
|
|
876
|
+
var find_bar_default = ":host {\n display: flex;\n align-items: center;\n gap: var(--office-space-2);\n min-height: var(--office-find-bar-height);\n padding: var(--office-space-1) var(--office-space-2) var(--office-space-1) var(--office-space-3);\n border-bottom: var(--office-border-width) solid var(--office-border);\n background: var(--office-surface);\n color: var(--office-foreground);\n font: var(--office-font-size-sm) var(--office-font);\n}\n:host(:not([open])) {\n display: none;\n}\n.find-content {\n flex: 1;\n min-width: 0;\n}\n.replace-fields {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--office-space-2);\n margin-top: var(--office-space-2);\n}\n.replace-fields label {\n flex: 0 1 auto;\n}\n.replace-fields label:first-child {\n flex: 1;\n}\n.replace-fields textarea {\n min-width: var(--office-find-replace-field-min-width);\n width: 100%;\n box-sizing: border-box;\n min-height: var(--office-input-height);\n padding: var(--office-space-1);\n font: inherit;\n color: inherit;\n border: var(--office-border-width) solid var(--office-border);\n border-radius: var(--office-radius-sm);\n background: var(--office-background);\n}\n.replace-fields office-ui-select {\n min-width: var(--office-find-replace-select-min-width);\n}\n.find-error {\n color: var(--office-danger);\n margin-bottom: 0;\n}\n[role='search'] {\n display: flex;\n flex: 1;\n align-items: center;\n gap: var(--office-space-1);\n min-width: 0;\n max-width: var(--office-find-max-width);\n}\nlabel {\n display: flex;\n flex: 1;\n align-items: center;\n gap: var(--office-space-1-5);\n min-width: 0;\n}\ninput {\n flex: 1;\n min-width: 0;\n min-height: var(--office-input-height);\n padding: var(--office-space-0) var(--office-space-1-5);\n font: inherit;\n color: inherit;\n border: var(--office-border-width) solid var(--office-border);\n border-radius: var(--office-radius-sm);\n background: var(--office-background);\n}\nbutton {\n min-height: var(--office-input-height);\n padding: var(--office-space-0) var(--office-space-2);\n font: inherit;\n color: inherit;\n cursor: pointer;\n border: var(--office-border-width) solid var(--office-border);\n border-radius: var(--office-radius-sm);\n background: var(--office-background);\n}\nbutton:disabled {\n opacity: 0.5;\n cursor: default;\n}\n.status {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n color: var(--office-muted-foreground);\n}\n.close {\n margin-inline-start: auto;\n width: var(--office-target-size);\n padding: 0;\n border-color: transparent;\n background: transparent;\n font-size: var(--office-font-size-xl);\n line-height: 1;\n}\ninput:focus-visible,\nbutton:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: calc(var(--office-focus-offset) / 2);\n}\n@media (max-width: 760px) {\n :host {\n flex-wrap: wrap;\n }\n [role='search'] {\n flex-wrap: wrap;\n }\n}\n";
|
|
877
877
|
function findReplaceFields(state) {
|
|
878
878
|
return html`<div class="replace-fields">
|
|
879
879
|
<label
|
|
@@ -5426,7 +5426,9 @@ function createRibbonOverflow(options) {
|
|
|
5426
5426
|
button.focus();
|
|
5427
5427
|
};
|
|
5428
5428
|
pop.addEventListener("click", (event) => {
|
|
5429
|
-
|
|
5429
|
+
const command = event.target.closest(options.command);
|
|
5430
|
+
const popup = command?.getAttribute("aria-haspopup");
|
|
5431
|
+
if (command && (!popup || popup === "false")) setTimeout(() => closeOpen?.(), 0);
|
|
5430
5432
|
});
|
|
5431
5433
|
doc.addEventListener("pointerdown", outside, true);
|
|
5432
5434
|
doc.addEventListener("keydown", escape, true);
|
|
@@ -208,6 +208,8 @@ var OFFICE_TOKENS = {
|
|
|
208
208
|
"--office-print-preview-width": "420px",
|
|
209
209
|
"--office-find-max-width": "640px",
|
|
210
210
|
"--office-find-bar-height": "40px",
|
|
211
|
+
"--office-find-replace-field-min-width": "120px",
|
|
212
|
+
"--office-find-replace-select-min-width": "150px",
|
|
211
213
|
"--office-ruler-size": "18px",
|
|
212
214
|
"--office-avatar-size": "48px",
|
|
213
215
|
"--office-avatar-color": "var(--office-muted-foreground, #6b7280)",
|
package/dist/clipboard-worker.js
CHANGED
|
@@ -2,6 +2,7 @@ import { captureVisioClipboard, serializeVisioClipboard } from 'ooxml-core/visio
|
|
|
2
2
|
|
|
3
3
|
// src/visio/clipboard-worker.ts
|
|
4
4
|
self.onmessage = async (event) => {
|
|
5
|
+
if (event.origin && event.origin !== self.location.origin) return;
|
|
5
6
|
try {
|
|
6
7
|
const request = event.data;
|
|
7
8
|
const snapshot = await captureVisioClipboard(
|
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_TITLE_BAR_SEARCH_LIMIT, OFFICE_TOAST_VISIBLE_LIMIT, assignKeyTips, attachKeyTips, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, commentInitials, createRibbonOverflow, defineAccount, defineBackstage, defineButton, defineCheckbox, 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, defineTabStrip, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, formatCommentTime, nextEnabledIndex, 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_TITLE_BAR_SEARCH_LIMIT, OFFICE_TOAST_VISIBLE_LIMIT, assignKeyTips, attachKeyTips, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, commentInitials, createRibbonOverflow, defineAccount, defineBackstage, defineButton, defineCheckbox, 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, defineTabStrip, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, formatCommentTime, nextEnabledIndex, parseSvgPreview, profileInitials, readOfficeProfile, registerControls, rulerDivisions, runKeyTips, sanitizeOfficeProfile, typeAheadIndex, writeOfficeProfile } from './chunk-J2WUY2Q4.js';
|
|
2
2
|
import './chunk-M6GF5ED2.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
3
|
+
import './chunk-FN3MBKHE.js';
|
|
4
|
+
import './chunk-CXOK5QWQ.js';
|
|
5
|
+
import './chunk-SPNWHKSR.js';
|
package/dist/docx.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineSmartArt } from './chunk-
|
|
2
|
-
import { shadcnBridge } from './chunk-
|
|
3
|
-
import { createRibbonOverflow, defineRibbon, defineRuler, defineCommentsPane, defineDialog, defineSearchField, defineSwitch, defineTitleBar, defineRibbonActions, defineBackstage, defineStatusBar, defineZoomSlider, defineContextMenu, runKeyTips, assignKeyTips } from './chunk-
|
|
1
|
+
import { defineSmartArt } from './chunk-6YEWVS7I.js';
|
|
2
|
+
import { shadcnBridge } from './chunk-BCH2ZLWI.js';
|
|
3
|
+
import { createRibbonOverflow, defineRibbon, defineRuler, defineCommentsPane, defineDialog, defineSearchField, defineSwitch, defineTitleBar, defineRibbonActions, defineBackstage, defineStatusBar, defineZoomSlider, defineContextMenu, runKeyTips, assignKeyTips } from './chunk-J2WUY2Q4.js';
|
|
4
4
|
import { registerIcon } from './chunk-M6GF5ED2.js';
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
5
|
+
import './chunk-FN3MBKHE.js';
|
|
6
|
+
import './chunk-CXOK5QWQ.js';
|
|
7
|
+
import './chunk-SPNWHKSR.js';
|
|
8
8
|
import { normalizeLocale, SUPPORTED_OFFICE_LOCALES, interpolate } from 'ooxml-core/i18n';
|
|
9
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';
|
|
10
10
|
import { Schema, DOMSerializer, Fragment } from 'prosemirror-model';
|
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-CEBFGUMT.js';
|
|
2
|
+
export { OfficeUiSmartArt, defineSmartArt, renderDiagramDrawing } from './chunk-6YEWVS7I.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-F23XSUJD.js';
|
|
4
4
|
export { TeamsPresentationPreview, defineTeamsPresentationPreview } from './chunk-SNV6YKPC.js';
|
|
5
|
-
export { THEME_CSS, THEME_STYLE_ID, installOfficeUiTheme, shadcnBridge, themeBridge } from './chunk-
|
|
6
|
-
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_TITLE_BAR_SEARCH_LIMIT, OFFICE_TOAST_VISIBLE_LIMIT, assignKeyTips, attachKeyTips, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, commentInitials, createRibbonOverflow, defineAccount, defineBackstage, defineButton, defineCheckbox, 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, defineTabStrip, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, formatCommentTime, glyph, nextEnabledIndex, parseSvgPreview, profileInitials, readOfficeProfile, registerControls, rulerDivisions, runKeyTips, sanitizeOfficeProfile, typeAheadIndex, writeOfficeProfile } from './chunk-
|
|
5
|
+
export { THEME_CSS, THEME_STYLE_ID, installOfficeUiTheme, shadcnBridge, themeBridge } from './chunk-BCH2ZLWI.js';
|
|
6
|
+
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_TITLE_BAR_SEARCH_LIMIT, OFFICE_TOAST_VISIBLE_LIMIT, assignKeyTips, attachKeyTips, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, commentInitials, createRibbonOverflow, defineAccount, defineBackstage, defineButton, defineCheckbox, 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, defineTabStrip, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, formatCommentTime, glyph, nextEnabledIndex, parseSvgPreview, profileInitials, readOfficeProfile, registerControls, rulerDivisions, runKeyTips, sanitizeOfficeProfile, typeAheadIndex, writeOfficeProfile } from './chunk-J2WUY2Q4.js';
|
|
7
7
|
export { createIconSvg, getIcon, listIcons, paintIcon, registerIcon } from './chunk-M6GF5ED2.js';
|
|
8
|
-
export { OfficeUiPresence, definePresence, initialsOf, participantsFromAwareness } from './chunk-
|
|
9
|
-
export { CONTRACT_REVISION, OfficeElement, controlStyles, flag, readFlag, triState, valueOn, withTokens } from './chunk-
|
|
10
|
-
export { COMPACT, FOCUS_RING, OFFICE_TOKENS, TOUCH, tok } from './chunk-
|
|
8
|
+
export { OfficeUiPresence, definePresence, initialsOf, participantsFromAwareness } from './chunk-FN3MBKHE.js';
|
|
9
|
+
export { CONTRACT_REVISION, OfficeElement, controlStyles, flag, readFlag, triState, valueOn, withTokens } from './chunk-CXOK5QWQ.js';
|
|
10
|
+
export { COMPACT, FOCUS_RING, OFFICE_TOKENS, TOUCH, tok } from './chunk-SPNWHKSR.js';
|
|
@@ -59,18 +59,26 @@ function neutralizeDeviceStrokes(root) {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
function withAuthoredStrokeWidths(root, read) {
|
|
62
|
-
const saved = carriers(root).map((el) => ({
|
|
62
|
+
const saved = carriers(root).map((el) => ({
|
|
63
|
+
el,
|
|
64
|
+
hadStyle: el.hasAttribute("style"),
|
|
65
|
+
value: el.style?.getPropertyValue(DEVICE_PX_VAR) ?? "",
|
|
66
|
+
priority: el.style?.getPropertyPriority(DEVICE_PX_VAR) ?? ""
|
|
67
|
+
}));
|
|
63
68
|
for (const { el } of saved) {
|
|
64
69
|
el.style?.setProperty(DEVICE_PX_VAR, "0px");
|
|
65
70
|
}
|
|
66
71
|
try {
|
|
67
72
|
return read();
|
|
68
73
|
} finally {
|
|
69
|
-
for (const { el,
|
|
70
|
-
if (
|
|
71
|
-
el.
|
|
74
|
+
for (const { el, hadStyle, value, priority } of saved) {
|
|
75
|
+
if (value) {
|
|
76
|
+
el.style?.setProperty(DEVICE_PX_VAR, value, priority);
|
|
72
77
|
} else {
|
|
73
|
-
el.
|
|
78
|
+
el.style?.removeProperty(DEVICE_PX_VAR);
|
|
79
|
+
}
|
|
80
|
+
if (!hadStyle && !el.getAttribute("style")) {
|
|
81
|
+
el.removeAttribute("style");
|
|
74
82
|
}
|
|
75
83
|
}
|
|
76
84
|
}
|
|
@@ -57,18 +57,26 @@ function neutralizeDeviceStrokes(root) {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
function withAuthoredStrokeWidths(root, read) {
|
|
60
|
-
const saved = carriers(root).map((el) => ({
|
|
60
|
+
const saved = carriers(root).map((el) => ({
|
|
61
|
+
el,
|
|
62
|
+
hadStyle: el.hasAttribute("style"),
|
|
63
|
+
value: el.style?.getPropertyValue(DEVICE_PX_VAR) ?? "",
|
|
64
|
+
priority: el.style?.getPropertyPriority(DEVICE_PX_VAR) ?? ""
|
|
65
|
+
}));
|
|
61
66
|
for (const { el } of saved) {
|
|
62
67
|
el.style?.setProperty(DEVICE_PX_VAR, "0px");
|
|
63
68
|
}
|
|
64
69
|
try {
|
|
65
70
|
return read();
|
|
66
71
|
} finally {
|
|
67
|
-
for (const { el,
|
|
68
|
-
if (
|
|
69
|
-
el.
|
|
72
|
+
for (const { el, hadStyle, value, priority } of saved) {
|
|
73
|
+
if (value) {
|
|
74
|
+
el.style?.setProperty(DEVICE_PX_VAR, value, priority);
|
|
70
75
|
} else {
|
|
71
|
-
el.
|
|
76
|
+
el.style?.removeProperty(DEVICE_PX_VAR);
|
|
77
|
+
}
|
|
78
|
+
if (!hadStyle && !el.getAttribute("style")) {
|
|
79
|
+
el.removeAttribute("style");
|
|
72
80
|
}
|
|
73
81
|
}
|
|
74
82
|
}
|
|
@@ -15,7 +15,7 @@ var chunkW3X2UVYQ_cjs = require('./chunk-W3X2UVYQ.cjs');
|
|
|
15
15
|
var chunkIURZJAWP_cjs = require('./chunk-IURZJAWP.cjs');
|
|
16
16
|
var chunkFOE75Z6N_cjs = require('./chunk-FOE75Z6N.cjs');
|
|
17
17
|
var chunkNTXHQHCS_cjs = require('./chunk-NTXHQHCS.cjs');
|
|
18
|
-
var
|
|
18
|
+
var chunk7DMJEYQJ_cjs = require('./chunk-7DMJEYQJ.cjs');
|
|
19
19
|
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');
|
|
@@ -1278,12 +1278,12 @@ function getPresetShapeVectorGeometry(shapeType, width, height, adjustments) {
|
|
|
1278
1278
|
function outlineStrands(compoundLine, strokeWidth) {
|
|
1279
1279
|
const offsets2 = getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
1280
1280
|
if (offsets2.length <= 1) {
|
|
1281
|
-
return [{ strokeWidth, cssStrokeWidth:
|
|
1281
|
+
return [{ strokeWidth, cssStrokeWidth: chunk7DMJEYQJ_cjs.screenStrokeWidth(strokeWidth), offset: 0 }];
|
|
1282
1282
|
}
|
|
1283
1283
|
const widths = getCompoundLineWidths(compoundLine, strokeWidth);
|
|
1284
1284
|
return offsets2.map((offset, idx) => {
|
|
1285
1285
|
const width = widths[idx] ?? strokeWidth;
|
|
1286
|
-
return { strokeWidth: width, cssStrokeWidth:
|
|
1286
|
+
return { strokeWidth: width, cssStrokeWidth: chunk7DMJEYQJ_cjs.screenStrokeWidth(width), offset };
|
|
1287
1287
|
});
|
|
1288
1288
|
}
|
|
1289
1289
|
function needsCenteredStrokeOverlay(element, style, declaredWidth) {
|
|
@@ -1511,10 +1511,10 @@ function getComputedStrokeStyle(element) {
|
|
|
1511
1511
|
const borderColor = style.strokeOpacity === void 0 ? rawColor : chunkIURZJAWP_cjs.colorWithOpacity(chunkIURZJAWP_cjs.normalizeHexColor(rawColor, chunkIURZJAWP_cjs.DEFAULT_STROKE_COLOR), style.strokeOpacity);
|
|
1512
1512
|
return {
|
|
1513
1513
|
borderWidth,
|
|
1514
|
-
cssBorderWidth:
|
|
1514
|
+
cssBorderWidth: chunk7DMJEYQJ_cjs.screenStrokeWidth(borderWidth),
|
|
1515
1515
|
borderStyle,
|
|
1516
1516
|
borderColor,
|
|
1517
|
-
border:
|
|
1517
|
+
border: chunk7DMJEYQJ_cjs.screenBorder(borderWidth, borderStyle ?? "solid", borderColor),
|
|
1518
1518
|
...joins
|
|
1519
1519
|
};
|
|
1520
1520
|
}
|
|
@@ -19550,7 +19550,7 @@ function borderToCss(border2, resolve) {
|
|
|
19550
19550
|
const width = border2.width ?? 1;
|
|
19551
19551
|
const dash = ooxmlDashToCssBorderStyle(border2.dash);
|
|
19552
19552
|
const color = border2.color ?? resolve(border2.fill) ?? "#000000";
|
|
19553
|
-
return
|
|
19553
|
+
return chunk7DMJEYQJ_cjs.screenBorder(width, dash, color);
|
|
19554
19554
|
}
|
|
19555
19555
|
function collectSections(entry5, tableData, pos) {
|
|
19556
19556
|
const { rowIndex, cellIndex, rowCount, columnCount } = pos;
|
|
@@ -21006,7 +21006,7 @@ function cellStyleToCss(style) {
|
|
|
21006
21006
|
const w = edge.width ?? 1;
|
|
21007
21007
|
const c = edge.color ?? style.borderColor ?? "#000000";
|
|
21008
21008
|
const s = ooxmlDashToCssBorderStyle(edge.dash);
|
|
21009
|
-
css[edge.prefix] =
|
|
21009
|
+
css[edge.prefix] = chunk7DMJEYQJ_cjs.screenBorder(w, s, c);
|
|
21010
21010
|
}
|
|
21011
21011
|
}
|
|
21012
21012
|
Object.assign(css, cellPaddingCss(style));
|
|
@@ -21626,6 +21626,93 @@ function evenRowHeights(rows) {
|
|
|
21626
21626
|
const avg = Math.round(rows.reduce((s, r) => s + (r.height ?? DEFAULT_ROW_HEIGHT), 0) / count);
|
|
21627
21627
|
return rows.map((r) => ({ ...r, height: avg }));
|
|
21628
21628
|
}
|
|
21629
|
+
|
|
21630
|
+
// src/pptx/render/table-resize-merge.ts
|
|
21631
|
+
function computeTableMergeCrossings(rows, columnCount) {
|
|
21632
|
+
const rowCount = rows.length;
|
|
21633
|
+
const rowCrossings = Array.from(
|
|
21634
|
+
{ length: Math.max(0, rowCount - 1) },
|
|
21635
|
+
() => Array.from({ length: columnCount }, () => false)
|
|
21636
|
+
);
|
|
21637
|
+
const columnCrossings = Array.from(
|
|
21638
|
+
{ length: Math.max(0, columnCount - 1) },
|
|
21639
|
+
() => Array.from({ length: rowCount }, () => false)
|
|
21640
|
+
);
|
|
21641
|
+
rows.forEach((row, r) => {
|
|
21642
|
+
row.cells.forEach((cell, c) => {
|
|
21643
|
+
if (cell.hMerge || cell.vMerge) {
|
|
21644
|
+
return;
|
|
21645
|
+
}
|
|
21646
|
+
const rowEnd = Math.min(rowCount, r + Math.max(1, cell.rowSpan ?? 1)) - 1;
|
|
21647
|
+
const colEnd = Math.min(columnCount, c + Math.max(1, cell.gridSpan ?? 1)) - 1;
|
|
21648
|
+
for (let rr = r; rr <= rowEnd; rr++) {
|
|
21649
|
+
for (let cc = c; cc <= colEnd; cc++) {
|
|
21650
|
+
if (rr < rowEnd) {
|
|
21651
|
+
rowCrossings[rr][cc] = true;
|
|
21652
|
+
}
|
|
21653
|
+
if (cc < colEnd) {
|
|
21654
|
+
columnCrossings[cc][rr] = true;
|
|
21655
|
+
}
|
|
21656
|
+
}
|
|
21657
|
+
}
|
|
21658
|
+
});
|
|
21659
|
+
});
|
|
21660
|
+
return { rows: rowCrossings, columns: columnCrossings };
|
|
21661
|
+
}
|
|
21662
|
+
function openBoundaryRuns(crossed) {
|
|
21663
|
+
const runs = [];
|
|
21664
|
+
let start = -1;
|
|
21665
|
+
crossed.forEach((isCrossed, i) => {
|
|
21666
|
+
if (!isCrossed && start < 0) {
|
|
21667
|
+
start = i;
|
|
21668
|
+
} else if (isCrossed && start >= 0) {
|
|
21669
|
+
runs.push({ start, end: i - 1 });
|
|
21670
|
+
start = -1;
|
|
21671
|
+
}
|
|
21672
|
+
});
|
|
21673
|
+
if (start >= 0) {
|
|
21674
|
+
runs.push({ start, end: crossed.length - 1 });
|
|
21675
|
+
}
|
|
21676
|
+
return runs;
|
|
21677
|
+
}
|
|
21678
|
+
function rowHandleSegments(crossed, columnWidths) {
|
|
21679
|
+
const total = columnWidths.reduce((sum, width) => sum + width, 0) || 1;
|
|
21680
|
+
const offset = (index) => columnWidths.slice(0, index).reduce((sum, width) => sum + width, 0) / total * 100;
|
|
21681
|
+
const edges = columnWidths.map((_, i) => crossed[i] === true);
|
|
21682
|
+
return openBoundaryRuns(edges).map(({ start, end }) => {
|
|
21683
|
+
const leftPct = offset(start);
|
|
21684
|
+
return { leftPct, widthPct: offset(end + 1) - leftPct };
|
|
21685
|
+
});
|
|
21686
|
+
}
|
|
21687
|
+
function columnHandleSegments(crossed, rowBounds, tableHeight) {
|
|
21688
|
+
const edges = Array.from({ length: rowBounds.length + 1 }, (_, i) => crossed[i] === true);
|
|
21689
|
+
return openBoundaryRuns(edges).map(({ start, end }) => {
|
|
21690
|
+
const top = start === 0 ? 0 : rowBounds[start - 1] ?? 0;
|
|
21691
|
+
const bottom = rowBounds[end] ?? tableHeight;
|
|
21692
|
+
return { top, height: Math.max(0, bottom - top) };
|
|
21693
|
+
});
|
|
21694
|
+
}
|
|
21695
|
+
function columnIndexAtFraction(columnWidths, fraction) {
|
|
21696
|
+
const total = columnWidths.reduce((sum, width) => sum + width, 0) || 1;
|
|
21697
|
+
let cumulative = 0;
|
|
21698
|
+
for (let i = 0; i < columnWidths.length; i++) {
|
|
21699
|
+
cumulative += columnWidths[i] / total;
|
|
21700
|
+
if (fraction < cumulative) {
|
|
21701
|
+
return i;
|
|
21702
|
+
}
|
|
21703
|
+
}
|
|
21704
|
+
return Math.max(0, columnWidths.length - 1);
|
|
21705
|
+
}
|
|
21706
|
+
function rowIndexAtOffset(rowBounds, offset) {
|
|
21707
|
+
const index = rowBounds.findIndex((bound) => offset < bound);
|
|
21708
|
+
return index < 0 ? rowBounds.length : index;
|
|
21709
|
+
}
|
|
21710
|
+
function isRowBoundaryMergedAt(crossings, boundary, columnWidths, xFraction) {
|
|
21711
|
+
return crossings.rows[boundary]?.[columnIndexAtFraction(columnWidths, xFraction)] === true;
|
|
21712
|
+
}
|
|
21713
|
+
function isColumnBoundaryMergedAt(crossings, boundary, rowBounds, offset) {
|
|
21714
|
+
return crossings.columns[boundary]?.[rowIndexAtOffset(rowBounds, offset)] === true;
|
|
21715
|
+
}
|
|
21629
21716
|
var RESIZE_HANDLES = [
|
|
21630
21717
|
"nw",
|
|
21631
21718
|
"n",
|
|
@@ -28704,6 +28791,21 @@ function appearanceSignature(el) {
|
|
|
28704
28791
|
parts.push(mediaIdentity(el) ?? "");
|
|
28705
28792
|
return parts.join("|");
|
|
28706
28793
|
}
|
|
28794
|
+
function proximityAccepts(a, b) {
|
|
28795
|
+
if (a.type !== b.type || differentText(a, b) || conflictingMorphNames(a, b)) {
|
|
28796
|
+
return false;
|
|
28797
|
+
}
|
|
28798
|
+
const ratio = (p, q) => Math.max(p, q, 1) / Math.max(Math.min(p, q), 1);
|
|
28799
|
+
if (ratio(a.width, b.width) > PROXIMITY_SIZE_RATIO_LIMIT || ratio(a.height, b.height) > PROXIMITY_SIZE_RATIO_LIMIT) {
|
|
28800
|
+
return false;
|
|
28801
|
+
}
|
|
28802
|
+
return centreDistance(a, b) < PROXIMITY_THRESHOLD;
|
|
28803
|
+
}
|
|
28804
|
+
function hasCloserProximityRival(fromEl, toEl, fromElements, toElements, usedFrom, usedTo) {
|
|
28805
|
+
const dist2 = centreDistance(fromEl, toEl);
|
|
28806
|
+
const closer = (a, b) => centreDistance(a, b) < dist2 && proximityAccepts(a, b);
|
|
28807
|
+
return toElements.some((other) => other !== toEl && !usedTo.has(other.id) && closer(fromEl, other)) || fromElements.some((other) => other !== fromEl && !usedFrom.has(other.id) && closer(other, toEl));
|
|
28808
|
+
}
|
|
28707
28809
|
|
|
28708
28810
|
// src/pptx/render/morph-heuristics.ts
|
|
28709
28811
|
function matchSameMedia(fromElements, toElements, usedFrom, usedTo) {
|
|
@@ -28797,6 +28899,9 @@ function matchNamedTextTwins(fromElements, toElements, usedFrom, usedTo) {
|
|
|
28797
28899
|
if (differentText(fromEl, toEl)) {
|
|
28798
28900
|
continue;
|
|
28799
28901
|
}
|
|
28902
|
+
if (hasCloserProximityRival(fromEl, toEl, fromElements, toElements, usedFrom, usedTo)) {
|
|
28903
|
+
continue;
|
|
28904
|
+
}
|
|
28800
28905
|
const dist2 = centreDistance(fromEl, toEl);
|
|
28801
28906
|
if (!best || dist2 < best.dist) {
|
|
28802
28907
|
best = { toEl, dist: dist2 };
|
|
@@ -28823,6 +28928,9 @@ function matchGroupTwins(fromElements, toElements, usedFrom, usedTo) {
|
|
|
28823
28928
|
if (!sameSizedTwinCasts(fromEl, toEl)) {
|
|
28824
28929
|
continue;
|
|
28825
28930
|
}
|
|
28931
|
+
if (hasCloserProximityRival(fromEl, toEl, fromElements, toElements, usedFrom, usedTo)) {
|
|
28932
|
+
continue;
|
|
28933
|
+
}
|
|
28826
28934
|
pairs.push({ fromElement: fromEl, toElement: toEl });
|
|
28827
28935
|
usedFrom.add(fromEl.id);
|
|
28828
28936
|
usedTo.add(toEl.id);
|
|
@@ -28832,36 +28940,37 @@ function matchGroupTwins(fromElements, toElements, usedFrom, usedTo) {
|
|
|
28832
28940
|
return pairs;
|
|
28833
28941
|
}
|
|
28834
28942
|
function matchIdenticalTwins(fromElements, toElements, usedFrom, usedTo) {
|
|
28835
|
-
const
|
|
28943
|
+
const candidates = [];
|
|
28836
28944
|
for (const fromEl of fromElements) {
|
|
28837
|
-
if (usedFrom.has(fromEl.id)) {
|
|
28838
|
-
continue;
|
|
28839
|
-
}
|
|
28840
|
-
if (!hasDeclaredPaint(fromEl)) {
|
|
28945
|
+
if (usedFrom.has(fromEl.id) || !hasDeclaredPaint(fromEl)) {
|
|
28841
28946
|
continue;
|
|
28842
28947
|
}
|
|
28843
28948
|
const fromSignature = appearanceSignature(fromEl);
|
|
28844
28949
|
for (const toEl of toElements) {
|
|
28845
|
-
if (usedTo.has(toEl.id)) {
|
|
28846
|
-
continue;
|
|
28847
|
-
}
|
|
28848
|
-
if (appearanceSignature(toEl) !== fromSignature) {
|
|
28950
|
+
if (usedTo.has(toEl.id) || appearanceSignature(toEl) !== fromSignature) {
|
|
28849
28951
|
continue;
|
|
28850
28952
|
}
|
|
28851
28953
|
if (fromEl.width !== toEl.width || fromEl.height !== toEl.height) {
|
|
28852
28954
|
continue;
|
|
28853
28955
|
}
|
|
28854
|
-
if (differentText(fromEl, toEl)) {
|
|
28956
|
+
if (differentText(fromEl, toEl) || conflictingMorphNames(fromEl, toEl)) {
|
|
28855
28957
|
continue;
|
|
28856
28958
|
}
|
|
28857
|
-
if (
|
|
28959
|
+
if (hasCloserProximityRival(fromEl, toEl, fromElements, toElements, usedFrom, usedTo)) {
|
|
28858
28960
|
continue;
|
|
28859
28961
|
}
|
|
28860
|
-
|
|
28861
|
-
|
|
28862
|
-
|
|
28863
|
-
|
|
28962
|
+
candidates.push({ fromEl, toEl, dist: centreDistance(fromEl, toEl) });
|
|
28963
|
+
}
|
|
28964
|
+
}
|
|
28965
|
+
candidates.sort((a, b) => a.dist - b.dist);
|
|
28966
|
+
const pairs = [];
|
|
28967
|
+
for (const { fromEl, toEl } of candidates) {
|
|
28968
|
+
if (usedFrom.has(fromEl.id) || usedTo.has(toEl.id)) {
|
|
28969
|
+
continue;
|
|
28864
28970
|
}
|
|
28971
|
+
pairs.push({ fromElement: fromEl, toElement: toEl });
|
|
28972
|
+
usedFrom.add(fromEl.id);
|
|
28973
|
+
usedTo.add(toEl.id);
|
|
28865
28974
|
}
|
|
28866
28975
|
return pairs;
|
|
28867
28976
|
}
|
|
@@ -29005,25 +29114,8 @@ function matchMorphElementsFull(fromSlide, toSlide) {
|
|
|
29005
29114
|
if (usedTo.has(toEl.id)) {
|
|
29006
29115
|
continue;
|
|
29007
29116
|
}
|
|
29008
|
-
if (fromEl
|
|
29009
|
-
|
|
29010
|
-
}
|
|
29011
|
-
if (differentText(fromEl, toEl)) {
|
|
29012
|
-
continue;
|
|
29013
|
-
}
|
|
29014
|
-
if (conflictingMorphNames(fromEl, toEl)) {
|
|
29015
|
-
continue;
|
|
29016
|
-
}
|
|
29017
|
-
const widthRatio = Math.max(fromEl.width, toEl.width, 1) / Math.max(Math.min(fromEl.width, toEl.width), 1);
|
|
29018
|
-
const heightRatio = Math.max(fromEl.height, toEl.height, 1) / Math.max(Math.min(fromEl.height, toEl.height), 1);
|
|
29019
|
-
if (widthRatio > PROXIMITY_SIZE_RATIO_LIMIT || heightRatio > PROXIMITY_SIZE_RATIO_LIMIT) {
|
|
29020
|
-
continue;
|
|
29021
|
-
}
|
|
29022
|
-
const dx = fromEl.x - toEl.x;
|
|
29023
|
-
const dy = fromEl.y - toEl.y;
|
|
29024
|
-
const dist2 = Math.sqrt(dx * dx + dy * dy);
|
|
29025
|
-
if (dist2 < PROXIMITY_THRESHOLD) {
|
|
29026
|
-
candidates.push({ fromEl, toEl, dist: dist2 });
|
|
29117
|
+
if (proximityAccepts(fromEl, toEl)) {
|
|
29118
|
+
candidates.push({ fromEl, toEl, dist: centreDistance(fromEl, toEl) });
|
|
29027
29119
|
}
|
|
29028
29120
|
}
|
|
29029
29121
|
}
|
|
@@ -59147,14 +59239,14 @@ async function buildForeignObjectSvgBody(element, doc, options) {
|
|
|
59147
59239
|
backgroundColor,
|
|
59148
59240
|
readComputedStyle = (el) => window.getComputedStyle(el)
|
|
59149
59241
|
} = options;
|
|
59150
|
-
await
|
|
59242
|
+
await chunk7DMJEYQJ_cjs.settleThreeViews(element);
|
|
59151
59243
|
const clone = element.cloneNode(true);
|
|
59152
|
-
|
|
59244
|
+
chunk7DMJEYQJ_cjs.withAuthoredStrokeWidths(
|
|
59153
59245
|
element,
|
|
59154
59246
|
() => inlineComputedStylesOnClone(element, clone, readComputedStyle)
|
|
59155
59247
|
);
|
|
59156
|
-
|
|
59157
|
-
|
|
59248
|
+
chunk7DMJEYQJ_cjs.snapshotThreeViewsIntoClone(element, clone);
|
|
59249
|
+
chunk7DMJEYQJ_cjs.prepareExportClone(clone);
|
|
59158
59250
|
const [{ allEmbedded: imagesEmbedded }, externalFonts] = await Promise.all([
|
|
59159
59251
|
embedImagesOnClone(clone),
|
|
59160
59252
|
collectExternalFontFaceCss(doc, fetchAsDataUrl)
|
|
@@ -65831,6 +65923,8 @@ var OFFICE_TOKENS = {
|
|
|
65831
65923
|
"--office-print-preview-width": "420px",
|
|
65832
65924
|
"--office-find-max-width": "640px",
|
|
65833
65925
|
"--office-find-bar-height": "40px",
|
|
65926
|
+
"--office-find-replace-field-min-width": "120px",
|
|
65927
|
+
"--office-find-replace-select-min-width": "150px",
|
|
65834
65928
|
"--office-ruler-size": "18px",
|
|
65835
65929
|
"--office-avatar-size": "48px",
|
|
65836
65930
|
"--office-avatar-color": "var(--office-muted-foreground, #6b7280)",
|
|
@@ -78281,6 +78375,8 @@ exports.collectFontsFromElement = collectFontsFromElement;
|
|
|
78281
78375
|
exports.collectReferencedFontFamilies = collectReferencedFontFamilies;
|
|
78282
78376
|
exports.collectUsedFonts = collectUsedFonts;
|
|
78283
78377
|
exports.colorDistance = colorDistance;
|
|
78378
|
+
exports.columnHandleSegments = columnHandleSegments;
|
|
78379
|
+
exports.columnIndexAtFraction = columnIndexAtFraction;
|
|
78284
78380
|
exports.combineTileRowPixels = combineTileRowPixels;
|
|
78285
78381
|
exports.commentMarkerTitle = commentMarkerTitle;
|
|
78286
78382
|
exports.commentMentionQuery = commentMentionQuery;
|
|
@@ -78334,6 +78430,7 @@ exports.computeSmartArtElementLayout = computeSmartArtElementLayout;
|
|
|
78334
78430
|
exports.computeSmartArtLayout = computeSmartArtLayout;
|
|
78335
78431
|
exports.computeTabSize = computeTabSize;
|
|
78336
78432
|
exports.computeTabbedLayout = computeTabbedLayout;
|
|
78433
|
+
exports.computeTableMergeCrossings = computeTableMergeCrossings;
|
|
78337
78434
|
exports.computeTargetLayout = computeTargetLayout;
|
|
78338
78435
|
exports.computeTimelineLayout = computeTimelineLayout;
|
|
78339
78436
|
exports.computeTrendlinePoints = computeTrendlinePoints;
|
|
@@ -78859,6 +78956,7 @@ exports.isBrowserOpenableMime = isBrowserOpenableMime;
|
|
|
78859
78956
|
exports.isChart3DViewEnabled = isChart3DViewEnabled;
|
|
78860
78957
|
exports.isChartTitleEvent = isChartTitleEvent;
|
|
78861
78958
|
exports.isClickAdvanceAllowed = isClickAdvanceAllowed;
|
|
78959
|
+
exports.isColumnBoundaryMergedAt = isColumnBoundaryMergedAt;
|
|
78862
78960
|
exports.isCornerHandle = isCornerHandle;
|
|
78863
78961
|
exports.isDensePanelCompact = isDensePanelCompact;
|
|
78864
78962
|
exports.isDialogAvailable = isDialogAvailable;
|
|
@@ -78918,6 +79016,7 @@ exports.isRibbonControlVisible = isRibbonControlVisible;
|
|
|
78918
79016
|
exports.isRibbonGroupId = isRibbonGroupId;
|
|
78919
79017
|
exports.isRibbonGroupVisible = isRibbonGroupVisible;
|
|
78920
79018
|
exports.isRoutedToLegacyBevelShadow = isRoutedToLegacyBevelShadow;
|
|
79019
|
+
exports.isRowBoundaryMergedAt = isRowBoundaryMergedAt;
|
|
78921
79020
|
exports.isSafeSvgMarkup = isSafeSvgMarkup;
|
|
78922
79021
|
exports.isSameArtisticEffect = isSameArtisticEffect;
|
|
78923
79022
|
exports.isSeriesUsingSecondaryAxis = isSeriesUsingSecondaryAxis;
|
|
@@ -79073,6 +79172,7 @@ exports.observeExternalCollaborationSession = observeExternalCollaborationSessio
|
|
|
79073
79172
|
exports.oleActionsVisible = oleActionsVisible;
|
|
79074
79173
|
exports.ooxmlDashToCssBorderStyle = ooxmlDashToCssBorderStyle;
|
|
79075
79174
|
exports.openAutosaveDb = openAutosaveDb;
|
|
79175
|
+
exports.openBoundaryRuns = openBoundaryRuns;
|
|
79076
79176
|
exports.openEditPathAtNode = openEditPathAtNode;
|
|
79077
79177
|
exports.openFilePicker = openFilePicker;
|
|
79078
79178
|
exports.openNativeEyeDropper = openNativeEyeDropper;
|
|
@@ -79446,6 +79546,8 @@ exports.roundedRectOutline = roundedRectOutline;
|
|
|
79446
79546
|
exports.routeConnector = routeConnector;
|
|
79447
79547
|
exports.routeEditLayerPointerToNodes = routeEditLayerPointerToNodes;
|
|
79448
79548
|
exports.routeOrthogonalConnector = routeOrthogonalConnector;
|
|
79549
|
+
exports.rowHandleSegments = rowHandleSegments;
|
|
79550
|
+
exports.rowIndexAtOffset = rowIndexAtOffset;
|
|
79449
79551
|
exports.rulerDragToGuidePosition = rulerDragToGuidePosition;
|
|
79450
79552
|
exports.runEditPointsCommand = runEditPointsCommand;
|
|
79451
79553
|
exports.runEquationMathMl = runEquationMathMl;
|