ooxml-ui 1.8.0 → 1.8.2
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/dist/{chunk-KF72ZA6V.js → chunk-BUO3MMTH.js} +2 -2
- package/dist/{chunk-7US5GCXF.js → chunk-IXRO2SFS.js} +1 -1
- package/dist/{chunk-BCH2ZLWI.js → chunk-S6ZXU442.js} +20 -1
- package/dist/docx.js +1 -1
- package/dist/index.js +3 -3
- package/dist/teams.js +2 -2
- package/dist/theme-bridge.d.ts +6 -2
- package/dist/theme.js +1 -1
- package/dist/visio.js +74 -21
- package/dist/xlsx.js +4 -4
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineSmartArt } from './chunk-PXIYHFZ5.js';
|
|
2
|
-
import { TEAMS_TAGS, registerTeams } from './chunk-
|
|
3
|
-
import { installOfficeUiTheme } from './chunk-
|
|
2
|
+
import { TEAMS_TAGS, registerTeams } from './chunk-IXRO2SFS.js';
|
|
3
|
+
import { installOfficeUiTheme } from './chunk-S6ZXU442.js';
|
|
4
4
|
import { registerControls } from './chunk-O7APCA5N.js';
|
|
5
5
|
import { definePresence } from './chunk-L7JV5FVE.js';
|
|
6
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { THEME_CSS, installOfficeUiTheme } from './chunk-
|
|
1
|
+
import { THEME_CSS, installOfficeUiTheme } from './chunk-S6ZXU442.js';
|
|
2
2
|
import { defineMenuButton, defineMenuItem, registerControls, defineSwitch } from './chunk-O7APCA5N.js';
|
|
3
3
|
import { registerIcon, getIcon } from './chunk-M6GF5ED2.js';
|
|
4
4
|
import { initialsOf, definePresence } from './chunk-L7JV5FVE.js';
|
|
@@ -17,8 +17,27 @@ var SHADCN_NAMES = [
|
|
|
17
17
|
["--office-danger", "destructive"],
|
|
18
18
|
["--office-danger-foreground", "destructive-foreground"]
|
|
19
19
|
];
|
|
20
|
+
var reads = (value) => [...value.matchAll(/var\((--office-[\w-]+)/g)].map((m) => m[1]);
|
|
21
|
+
function derivedTokens(bridged) {
|
|
22
|
+
const derived = /* @__PURE__ */ new Map();
|
|
23
|
+
let grew = true;
|
|
24
|
+
while (grew) {
|
|
25
|
+
grew = false;
|
|
26
|
+
for (const [name, value] of Object.entries(OFFICE_TOKENS)) {
|
|
27
|
+
if (bridged.has(name) || derived.has(name)) continue;
|
|
28
|
+
if (reads(value).some((token) => bridged.has(token) || derived.has(token))) {
|
|
29
|
+
derived.set(name, value);
|
|
30
|
+
grew = true;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return [...derived];
|
|
35
|
+
}
|
|
20
36
|
function themeBridge(selector, map) {
|
|
21
|
-
const
|
|
37
|
+
const mapped = Object.entries(map).filter((entry) => !!entry[1]);
|
|
38
|
+
const lines = [...mapped, ...derivedTokens(new Set(mapped.map(([name]) => name)))].map(
|
|
39
|
+
([name, value]) => ` ${name}: ${value};`
|
|
40
|
+
);
|
|
22
41
|
return `${selector} {
|
|
23
42
|
${lines.join("\n")}
|
|
24
43
|
}
|
package/dist/docx.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { syncRibbonAddIns } from './chunk-W6AV3GHC.js';
|
|
2
2
|
export { RIBBON_ADD_IN_EVENT } from './chunk-W6AV3GHC.js';
|
|
3
3
|
import { defineSmartArt } from './chunk-PXIYHFZ5.js';
|
|
4
|
-
import { shadcnBridge } from './chunk-
|
|
4
|
+
import { shadcnBridge } from './chunk-S6ZXU442.js';
|
|
5
5
|
import { createRibbonOverflow, defineRibbon, defineRuler, defineCommentsPane, defineDialog, defineSearchField, defineSwitch, defineTitleBar, defineRibbonActions, defineBackstage, defineStatusBar, defineZoomSlider, defineContextMenu, defineColorGrid, runKeyTips, assignKeyTips } from './chunk-O7APCA5N.js';
|
|
6
6
|
import { registerIcon } from './chunk-M6GF5ED2.js';
|
|
7
7
|
import './chunk-L7JV5FVE.js';
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { OFFICE_UI_TAGS, registerOfficeUi } from './chunk-
|
|
1
|
+
export { OFFICE_UI_TAGS, registerOfficeUi } from './chunk-BUO3MMTH.js';
|
|
2
2
|
export { RIBBON_ADD_IN_EVENT, defineRibbonAddInElements, syncRibbonAddIns } from './chunk-W6AV3GHC.js';
|
|
3
3
|
export { OfficeUiSmartArt, defineSmartArt, renderDiagramDrawing } from './chunk-PXIYHFZ5.js';
|
|
4
|
-
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-
|
|
4
|
+
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-IXRO2SFS.js';
|
|
5
5
|
export { TeamsPresentationPreview, defineTeamsPresentationPreview } from './chunk-SNV6YKPC.js';
|
|
6
|
-
export { THEME_CSS, THEME_STYLE_ID, installOfficeUiTheme, shadcnBridge, themeBridge } from './chunk-
|
|
6
|
+
export { THEME_CSS, THEME_STYLE_ID, installOfficeUiTheme, shadcnBridge, themeBridge } from './chunk-S6ZXU442.js';
|
|
7
7
|
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, glyph, nextEnabledIndex, parseOfficeSymbolCode, parseSvgPreview, profileInitials, readOfficeProfile, registerControls, rulerDivisions, runKeyTips, sanitizeOfficeProfile, typeAheadIndex, writeOfficeProfile } from './chunk-O7APCA5N.js';
|
|
8
8
|
export { createIconSvg, getIcon, listIcons, paintIcon, registerIcon } from './chunk-M6GF5ED2.js';
|
|
9
9
|
export { OfficeUiPresence, definePresence, initialsOf, participantsFromAwareness } from './chunk-L7JV5FVE.js';
|
package/dist/teams.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
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 { 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-IXRO2SFS.js';
|
|
2
2
|
export { TeamsPresentationPreview, defineTeamsPresentationPreview } from './chunk-SNV6YKPC.js';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-S6ZXU442.js';
|
|
4
4
|
import './chunk-O7APCA5N.js';
|
|
5
5
|
import './chunk-M6GF5ED2.js';
|
|
6
6
|
import './chunk-L7JV5FVE.js';
|
package/dist/theme-bridge.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type OfficeToken } from './tokens.js';
|
|
2
2
|
/**
|
|
3
3
|
* Feeds the `--office-*` tokens from a product's own theme, so the shared elements follow it.
|
|
4
4
|
* Products (docx, xlsx, pptx, visio) already name their theme after shadcn/ui
|
|
@@ -10,7 +10,11 @@ import type { OfficeToken } from './tokens.js';
|
|
|
10
10
|
* so a nested theme, a dark scheme or a host override keeps working. Pure strings, no DOM.
|
|
11
11
|
*/
|
|
12
12
|
export type ThemeBridgeMap = Partial<Record<OfficeToken, string>>;
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* `selector { --office-x: value; ... }` for a mapping; entries without a value are skipped. The
|
|
15
|
+
* tokens derived from a mapped one are declared again on the selector with their defaults, so they
|
|
16
|
+
* follow the product's colours instead of the page's.
|
|
17
|
+
*/
|
|
14
18
|
export declare function themeBridge(selector: string, map: ThemeBridgeMap): string;
|
|
15
19
|
export interface ShadcnBridgeOptions {
|
|
16
20
|
/** Extra or overriding `--office-*` values, for example `{ '--office-font': '...' }`. */
|
package/dist/theme.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { THEME_CSS, THEME_STYLE_ID, installOfficeUiTheme, shadcnBridge, themeBridge } from './chunk-
|
|
1
|
+
export { THEME_CSS, THEME_STYLE_ID, installOfficeUiTheme, shadcnBridge, themeBridge } from './chunk-S6ZXU442.js';
|
|
2
2
|
export { COMPACT, FOCUS_RING, OFFICE_TOKENS, TOUCH, tok } from './chunk-SPNWHKSR.js';
|
package/dist/visio.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { syncRibbonAddIns } from './chunk-W6AV3GHC.js';
|
|
2
2
|
export { RIBBON_ADD_IN_EVENT } from './chunk-W6AV3GHC.js';
|
|
3
|
-
import { themeBridge, installOfficeUiTheme } from './chunk-
|
|
3
|
+
import { themeBridge, installOfficeUiTheme } from './chunk-S6ZXU442.js';
|
|
4
4
|
import { attachKeyTips, registerControls, readOfficeProfile, sanitizeOfficeProfile, writeOfficeProfile, attachRibbonGroupOverflow, commentInitials } from './chunk-O7APCA5N.js';
|
|
5
5
|
import { getIcon, registerIcon } from './chunk-M6GF5ED2.js';
|
|
6
6
|
import { definePresence } from './chunk-L7JV5FVE.js';
|
|
@@ -7951,15 +7951,25 @@ var ViewerPointerGestures = class {
|
|
|
7951
7951
|
return this.options.snap?.(drag.page, ids, delta) ?? delta;
|
|
7952
7952
|
}
|
|
7953
7953
|
#cancel() {
|
|
7954
|
+
this.#release()();
|
|
7955
|
+
}
|
|
7956
|
+
/**
|
|
7957
|
+
* Ends the gesture and returns the removal of its previews. A finished move keeps showing the
|
|
7958
|
+
* preview until its source edit settles; removing it first showed the shape back at its old
|
|
7959
|
+
* position for as long as the edit took.
|
|
7960
|
+
*/
|
|
7961
|
+
#release() {
|
|
7954
7962
|
const drag = this.#drag;
|
|
7955
7963
|
this.#drag = void 0;
|
|
7956
7964
|
if (drag?.started) this.#cancelClick = true;
|
|
7957
|
-
drag?.preview?.dispose();
|
|
7958
|
-
drag?.showOverlays?.();
|
|
7959
|
-
drag?.marquee?.remove();
|
|
7960
|
-
if (drag?.preview) this.options.clearSnap?.();
|
|
7961
7965
|
if (drag && this.viewport.hasPointerCapture?.(drag.pointer))
|
|
7962
7966
|
this.viewport.releasePointerCapture(drag.pointer);
|
|
7967
|
+
return () => {
|
|
7968
|
+
drag?.preview?.dispose();
|
|
7969
|
+
drag?.showOverlays?.();
|
|
7970
|
+
drag?.marquee?.remove();
|
|
7971
|
+
if (drag?.preview) this.options.clearSnap?.();
|
|
7972
|
+
};
|
|
7963
7973
|
}
|
|
7964
7974
|
async #finish(event) {
|
|
7965
7975
|
const drag = this.#drag;
|
|
@@ -7971,7 +7981,8 @@ var ViewerPointerGestures = class {
|
|
|
7971
7981
|
const point = pagePoint(drag.svg, drag.page, event, pointOptions);
|
|
7972
7982
|
event.preventDefault();
|
|
7973
7983
|
event.stopImmediatePropagation();
|
|
7974
|
-
this.#
|
|
7984
|
+
const settle = this.#release();
|
|
7985
|
+
if (!point || !this.#current(drag) || !drag.target) settle();
|
|
7975
7986
|
if (!point || !this.#current(drag)) return;
|
|
7976
7987
|
if (!drag.target) {
|
|
7977
7988
|
const box2 = visioMarqueeBox(drag.start, point);
|
|
@@ -7992,7 +8003,10 @@ var ViewerPointerGestures = class {
|
|
|
7992
8003
|
this.#delta(drag, point)
|
|
7993
8004
|
);
|
|
7994
8005
|
this.options.clearSnap?.();
|
|
7995
|
-
if (!edits?.length || !this.#current(drag))
|
|
8006
|
+
if (!edits?.length || !this.#current(drag)) {
|
|
8007
|
+
settle();
|
|
8008
|
+
return;
|
|
8009
|
+
}
|
|
7996
8010
|
const request = ++this.#request;
|
|
7997
8011
|
try {
|
|
7998
8012
|
await this.controller.applySelectionEdits(edits);
|
|
@@ -8000,6 +8014,8 @@ var ViewerPointerGestures = class {
|
|
|
8000
8014
|
} catch (error) {
|
|
8001
8015
|
if (request === this.#request && !isEditCancellation(error))
|
|
8002
8016
|
this.options.announce(editErrorMessage(error));
|
|
8017
|
+
} finally {
|
|
8018
|
+
settle();
|
|
8003
8019
|
}
|
|
8004
8020
|
}
|
|
8005
8021
|
};
|
|
@@ -19132,12 +19148,19 @@ var ViewerLineEndpoints = class {
|
|
|
19132
19148
|
}
|
|
19133
19149
|
}
|
|
19134
19150
|
#cancel() {
|
|
19151
|
+
this.#release()();
|
|
19152
|
+
}
|
|
19153
|
+
/**
|
|
19154
|
+
* Ends the gesture and returns the removal of its previews, which a finished drag keeps until its
|
|
19155
|
+
* source edit settles (removing them first showed the old geometry for as long as the edit took).
|
|
19156
|
+
*/
|
|
19157
|
+
#release() {
|
|
19135
19158
|
const drag = this.#drag;
|
|
19136
19159
|
this.#drag = void 0;
|
|
19137
19160
|
this.#target(void 0);
|
|
19138
|
-
drag?.preview.remove();
|
|
19139
19161
|
if (drag && this.viewport.hasPointerCapture?.(drag.pointer))
|
|
19140
19162
|
this.viewport.releasePointerCapture(drag.pointer);
|
|
19163
|
+
return () => drag?.preview.remove();
|
|
19141
19164
|
}
|
|
19142
19165
|
async #finish(event) {
|
|
19143
19166
|
const drag = this.#drag;
|
|
@@ -19150,9 +19173,11 @@ var ViewerLineEndpoints = class {
|
|
|
19150
19173
|
event.stopImmediatePropagation();
|
|
19151
19174
|
const point = pagePoint(drag.svg, drag.page, event, pointOptions2);
|
|
19152
19175
|
const glue = this.#glueAt(drag, event);
|
|
19153
|
-
this.#
|
|
19154
|
-
if (!point || Math.hypot(event.clientX - drag.startX, event.clientY - drag.startY) < 0.5 || this.controller.state.document !== drag.document)
|
|
19176
|
+
const settle = this.#release();
|
|
19177
|
+
if (!point || Math.hypot(event.clientX - drag.startX, event.clientY - drag.startY) < 0.5 || this.controller.state.document !== drag.document) {
|
|
19178
|
+
settle();
|
|
19155
19179
|
return;
|
|
19180
|
+
}
|
|
19156
19181
|
const request = ++this.#request;
|
|
19157
19182
|
const edit = glue ? {
|
|
19158
19183
|
type: "glue-connector",
|
|
@@ -19178,6 +19203,8 @@ var ViewerLineEndpoints = class {
|
|
|
19178
19203
|
} catch (error) {
|
|
19179
19204
|
if (request === this.#request && !isEditCancellation(error))
|
|
19180
19205
|
this.options.announce(editErrorMessage(error));
|
|
19206
|
+
} finally {
|
|
19207
|
+
settle();
|
|
19181
19208
|
}
|
|
19182
19209
|
}
|
|
19183
19210
|
};
|
|
@@ -19395,13 +19422,22 @@ var ViewerRotationHandle = class {
|
|
|
19395
19422
|
event.stopImmediatePropagation();
|
|
19396
19423
|
}
|
|
19397
19424
|
#cancel() {
|
|
19425
|
+
this.#release()();
|
|
19426
|
+
}
|
|
19427
|
+
/**
|
|
19428
|
+
* Ends the gesture and returns the removal of its previews, which a finished drag keeps until its
|
|
19429
|
+
* source edit settles (removing them first showed the old geometry for as long as the edit took).
|
|
19430
|
+
*/
|
|
19431
|
+
#release() {
|
|
19398
19432
|
const drag = this.#drag;
|
|
19399
19433
|
this.#drag = void 0;
|
|
19400
|
-
drag?.preview.remove();
|
|
19401
|
-
drag?.shapePreview.dispose();
|
|
19402
|
-
drag?.showOverlays();
|
|
19403
19434
|
if (drag && this.viewport.hasPointerCapture?.(drag.pointer))
|
|
19404
19435
|
this.viewport.releasePointerCapture(drag.pointer);
|
|
19436
|
+
return () => {
|
|
19437
|
+
drag?.preview.remove();
|
|
19438
|
+
drag?.shapePreview.dispose();
|
|
19439
|
+
drag?.showOverlays();
|
|
19440
|
+
};
|
|
19405
19441
|
}
|
|
19406
19442
|
async #finish(event) {
|
|
19407
19443
|
const drag = this.#drag;
|
|
@@ -19414,9 +19450,11 @@ var ViewerRotationHandle = class {
|
|
|
19414
19450
|
event.stopImmediatePropagation();
|
|
19415
19451
|
const point = pagePoint(drag.svg, drag.page, event, pointOptions3);
|
|
19416
19452
|
const angle = point ? radians(drag.rotate(point), event.shiftKey) : void 0;
|
|
19417
|
-
this.#
|
|
19418
|
-
if (angle === void 0 || Math.hypot(event.clientX - drag.startX, event.clientY - drag.startY) < 0.5 || this.controller.state.document !== drag.document)
|
|
19453
|
+
const settle = this.#release();
|
|
19454
|
+
if (angle === void 0 || Math.hypot(event.clientX - drag.startX, event.clientY - drag.startY) < 0.5 || this.controller.state.document !== drag.document) {
|
|
19455
|
+
settle();
|
|
19419
19456
|
return;
|
|
19457
|
+
}
|
|
19420
19458
|
const request = ++this.#request;
|
|
19421
19459
|
try {
|
|
19422
19460
|
await this.controller.applyEdits([
|
|
@@ -19426,6 +19464,8 @@ var ViewerRotationHandle = class {
|
|
|
19426
19464
|
} catch (error) {
|
|
19427
19465
|
if (request === this.#request && !isEditCancellation(error))
|
|
19428
19466
|
this.options.announce(editErrorMessage(error));
|
|
19467
|
+
} finally {
|
|
19468
|
+
settle();
|
|
19429
19469
|
}
|
|
19430
19470
|
}
|
|
19431
19471
|
};
|
|
@@ -19571,15 +19611,24 @@ var ViewerResizeHandles = class {
|
|
|
19571
19611
|
event.stopImmediatePropagation();
|
|
19572
19612
|
}
|
|
19573
19613
|
#cancel() {
|
|
19614
|
+
this.#release()();
|
|
19615
|
+
}
|
|
19616
|
+
/**
|
|
19617
|
+
* Ends the gesture and returns the removal of its previews, which a finished drag keeps until its
|
|
19618
|
+
* source edit settles (removing them first showed the old geometry for as long as the edit took).
|
|
19619
|
+
*/
|
|
19620
|
+
#release() {
|
|
19574
19621
|
const drag = this.#drag;
|
|
19575
19622
|
this.#drag = void 0;
|
|
19576
|
-
if (drag) {
|
|
19623
|
+
if (!drag) return () => {
|
|
19624
|
+
};
|
|
19625
|
+
if (this.viewport.hasPointerCapture?.(drag.pointer))
|
|
19626
|
+
this.viewport.releasePointerCapture(drag.pointer);
|
|
19627
|
+
if (this.#frame === drag.frame) this.#frame = void 0;
|
|
19628
|
+
return () => {
|
|
19577
19629
|
drag.showOverlays?.();
|
|
19578
19630
|
drag.frame.dispose();
|
|
19579
|
-
|
|
19580
|
-
if (this.viewport.hasPointerCapture?.(drag.pointer))
|
|
19581
|
-
this.viewport.releasePointerCapture(drag.pointer);
|
|
19582
|
-
}
|
|
19631
|
+
};
|
|
19583
19632
|
}
|
|
19584
19633
|
async #finish(event) {
|
|
19585
19634
|
const drag = this.#drag;
|
|
@@ -19588,13 +19637,15 @@ var ViewerResizeHandles = class {
|
|
|
19588
19637
|
const resized = point && this.#current(drag) && visioResizeDrag(drag.page, drag.shapeId, drag.handle, drag.start, point);
|
|
19589
19638
|
event.preventDefault();
|
|
19590
19639
|
event.stopImmediatePropagation();
|
|
19591
|
-
this.#
|
|
19640
|
+
const settle = this.#release();
|
|
19592
19641
|
if (!resized || !this.#current(drag)) {
|
|
19642
|
+
settle();
|
|
19593
19643
|
this.render(this.controller.state);
|
|
19594
19644
|
return;
|
|
19595
19645
|
}
|
|
19596
19646
|
const original = drag.page.shapes.find((shape) => shape.id === drag.shapeId);
|
|
19597
19647
|
if (Math.abs(resized.frame.width - original.width) < 1e-10 && Math.abs(resized.frame.height - original.height) < 1e-10) {
|
|
19648
|
+
settle();
|
|
19598
19649
|
this.render(this.controller.state);
|
|
19599
19650
|
return;
|
|
19600
19651
|
}
|
|
@@ -19605,6 +19656,8 @@ var ViewerResizeHandles = class {
|
|
|
19605
19656
|
} catch (error) {
|
|
19606
19657
|
if (request === this.#request && !isEditCancellation(error))
|
|
19607
19658
|
this.options.announce(editErrorMessage(error));
|
|
19659
|
+
} finally {
|
|
19660
|
+
settle();
|
|
19608
19661
|
}
|
|
19609
19662
|
}
|
|
19610
19663
|
};
|
package/dist/xlsx.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import './chunk-
|
|
1
|
+
import './chunk-BUO3MMTH.js';
|
|
2
2
|
import { syncRibbonAddIns } from './chunk-W6AV3GHC.js';
|
|
3
3
|
export { RIBBON_ADD_IN_EVENT } from './chunk-W6AV3GHC.js';
|
|
4
4
|
import { defineSmartArt } from './chunk-PXIYHFZ5.js';
|
|
5
|
-
import { withExtension, saveExtension, downloadBytes, emit, emitEvent, blobFor, announceFileCommand, pickFile } from './chunk-
|
|
6
|
-
export { XLSX_EDITOR_EVENTS } from './chunk-
|
|
5
|
+
import { withExtension, saveExtension, downloadBytes, emit, emitEvent, blobFor, announceFileCommand, pickFile } from './chunk-IXRO2SFS.js';
|
|
6
|
+
export { XLSX_EDITOR_EVENTS } from './chunk-IXRO2SFS.js';
|
|
7
7
|
import './chunk-SNV6YKPC.js';
|
|
8
|
-
import { shadcnBridge } from './chunk-
|
|
8
|
+
import { shadcnBridge } from './chunk-S6ZXU442.js';
|
|
9
9
|
import { range_control_default, createRibbonOverflow, defineBackstage, defineRibbon, defineRibbonActions, defineTitleBar, defineStatusBar, defineZoomSlider, rangeControl, defineDialog, runKeyTips, assignKeyTips, defineCheckbox, defineGallery, defineColorGrid, defineContextMenu, defineCommentsPane, parseSvgPreview } from './chunk-O7APCA5N.js';
|
|
10
10
|
import { getIcon, registerIcon } from './chunk-M6GF5ED2.js';
|
|
11
11
|
import { definePresence } from './chunk-L7JV5FVE.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ooxml-ui",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.2",
|
|
4
4
|
"description": "Shared, format-neutral web components and styles for the Office viewers (Word, PowerPoint, Excel)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"custom-elements",
|
|
@@ -137,16 +137,16 @@
|
|
|
137
137
|
"build": "node scripts/build.mjs",
|
|
138
138
|
"prepack": "node scripts/ensure-built.mjs",
|
|
139
139
|
"typecheck": "tsc -p tsconfig.pptx.json --outDir .types-pptx && tsc -p tsconfig.json --noEmit && tsc -p tsconfig.pptx.json --noEmit",
|
|
140
|
-
"test": "vitest run
|
|
140
|
+
"test": "vitest run",
|
|
141
141
|
"test:package": "node scripts/package-smoke.mjs",
|
|
142
142
|
"gen:manifest": "node scripts/gen-manifest.mjs",
|
|
143
|
-
"test:pptx": "vitest run --
|
|
143
|
+
"test:pptx": "vitest run --project pptx --project pptx-isolated"
|
|
144
144
|
},
|
|
145
145
|
"dependencies": {
|
|
146
146
|
"dompurify": "^3.4.16",
|
|
147
147
|
"emf-converter": "4.11.2",
|
|
148
148
|
"lit": "^3.3.3",
|
|
149
|
-
"ooxml-core": "^1.8.
|
|
149
|
+
"ooxml-core": "^1.8.1",
|
|
150
150
|
"opentype.js": "^2.0.0",
|
|
151
151
|
"prosemirror-collab": "^1.3.1",
|
|
152
152
|
"prosemirror-commands": "^1.7.2",
|