ooxml-ui 1.52.1 → 1.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +5 -1
- package/dist/base.d.ts +0 -1
- package/dist/building-block-styles.d.ts +1 -0
- package/dist/chart/data-sheet-keys.d.ts +0 -1
- package/dist/chart/format-pane-advanced-space.d.ts +5 -2
- package/dist/chart/format-pane-advanced-space.d.ts.map +1 -1
- package/dist/chart/format-pane-analysis.d.ts +1 -0
- package/dist/chart/format-pane-analysis.d.ts.map +1 -1
- package/dist/chart/format-pane-fields.d.ts +0 -1
- package/dist/chart/format-pane-fill-kinds.d.ts +1 -0
- package/dist/chart/format-pane-locales/de.d.ts +1 -0
- package/dist/chart/format-pane-locales/de.d.ts.map +1 -1
- package/dist/chart/format-pane-locales/en.d.ts +0 -1
- package/dist/chart/format-pane-locales/en.d.ts.map +1 -1
- package/dist/chart/format-pane-locales/es.d.ts +1 -0
- package/dist/chart/format-pane-locales/es.d.ts.map +1 -1
- package/dist/chart/format-pane-locales/fr.d.ts +1 -0
- package/dist/chart/format-pane-locales/fr.d.ts.map +1 -1
- package/dist/chart/format-pane-locales/index.d.ts +1 -0
- package/dist/chart/format-pane-locales/ja.d.ts +1 -0
- package/dist/chart/format-pane-locales/ja.d.ts.map +1 -1
- package/dist/chart/format-pane-locales/ko.d.ts.map +1 -1
- package/dist/chart/format-pane-locales/zh-CN.d.ts +1 -0
- package/dist/chart/format-pane-locales/zh-CN.d.ts.map +1 -1
- package/dist/chart/format-pane-model.d.ts +0 -1
- package/dist/chart/format-pane-space.d.ts +10 -3
- package/dist/chart/format-pane-space.d.ts.map +1 -1
- package/dist/chart/format-pane-targets.d.ts +1 -0
- package/dist/chart/format-pane-trendlines.d.ts +17 -0
- package/dist/chart/format-pane-trendlines.d.ts.map +1 -0
- package/dist/chart/format-pane-types.d.ts +1 -0
- package/dist/chart/format-pane-view.d.ts +10 -1
- package/dist/chart/format-pane-view.d.ts.map +1 -1
- package/dist/chart/format-pane.d.ts +1 -2
- package/dist/chart-format-locales.js +1 -1
- package/dist/chrome/backstage.d.ts +1 -2
- package/dist/chrome/find-replace-fields.d.ts +0 -1
- package/dist/chrome/print-preview.d.ts +2 -1
- package/dist/chrome/ruler.d.ts +1 -2
- package/dist/chrome/tab-strip.d.ts +1 -2
- package/dist/chrome/title-bar.d.ts +1 -2
- package/dist/{chunk-ELVHRXWE.js → chunk-2EBZ6IV6.js} +3 -3
- package/dist/{chunk-2N6QBIKM.js → chunk-J36LIYGS.js} +1 -1
- package/dist/{chunk-GSO4HLIY.js → chunk-JI4ZNPEK.js} +42 -7
- package/dist/{chunk-3TF5IIIJ.js → chunk-NSBQACCO.js} +241 -149
- package/dist/{chunk-QDU4GLWK.js → chunk-X464LPTR.js} +152 -47
- package/dist/{chunk-FP45SLBV.js → chunk-XQIZWJEV.js} +1 -1
- package/dist/{chunk-QGRJJUH7.js → chunk-Y535PPSZ.js} +1 -1
- package/dist/comments/comments-pane.d.ts +1 -2
- package/dist/comments/types.d.ts +1 -0
- package/dist/controls.js +2 -2
- package/dist/dialog/message-dialog.d.ts +2 -1
- package/dist/dialog/progress-dialog.d.ts +1 -2
- package/dist/docx.js +36 -42
- package/dist/embedding/region-host.d.ts +1 -0
- package/dist/export/pdf-font-faces.d.ts +1 -0
- package/dist/export/pdf-image.d.ts +0 -1
- package/dist/export/pdf-path.d.ts +0 -1
- package/dist/export/pdf-svg-notes.d.ts +0 -1
- package/dist/export/pdf-svg-text.d.ts +1 -0
- package/dist/files/cloud-files-labels.d.ts +0 -1
- package/dist/files/cloud-files.d.ts +2 -1
- package/dist/files/connected-services.d.ts +1 -2
- package/dist/fonts/webfonts.d.ts +1 -0
- package/dist/form/checkable.d.ts +0 -1
- package/dist/form/checkbox.d.ts +2 -1
- package/dist/form/color-swatches.d.ts +1 -0
- package/dist/form/switch.d.ts +1 -2
- package/dist/glyph.d.ts +1 -0
- package/dist/icons.d.ts +1 -0
- package/dist/image-native-size.d.ts +0 -1
- package/dist/index.js +6 -6
- package/dist/look.d.ts +1 -0
- package/dist/menu/menu-button.d.ts +1 -2
- package/dist/menu/menu-model.d.ts +0 -1
- package/dist/notices/paste-options.d.ts +2 -1
- package/dist/notices/read-only-banner.d.ts +2 -1
- package/dist/notices/toasts.d.ts +1 -2
- package/dist/picture-artistic-preview.d.ts +1 -0
- package/dist/picture-effects.d.ts +1 -0
- package/dist/picture-pixels.d.ts +1 -0
- package/dist/picture-standard-filter.d.ts +1 -0
- package/dist/pptx/{chunk-FQGG3DGL.mjs → chunk-5PL3ZZV4.mjs} +1 -1
- package/dist/pptx/{chunk-4K4DO7RJ.mjs → chunk-75MKMQP5.mjs} +69 -7
- package/dist/pptx/{chunk-JVCSVLFU.cjs → chunk-O33ER4AJ.cjs} +69 -7
- package/dist/pptx/{chunk-OFXOF5ZX.mjs → chunk-OS2SX33G.mjs} +2791 -1318
- package/dist/pptx/{chunk-SWJV6FQN.cjs → chunk-STQTJXYQ.cjs} +2824 -1316
- package/dist/pptx/{chunk-OATLMHQL.cjs → chunk-TJPRGVT4.cjs} +42 -42
- package/dist/pptx/dom/index.cjs +377 -377
- package/dist/pptx/dom/index.mjs +6 -6
- package/dist/pptx/i18n/index.cjs +6 -6
- package/dist/pptx/i18n/index.mjs +1 -1
- package/dist/pptx/i18n/translations-en-galleries-data.d.ts.map +1 -1
- package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
- package/dist/pptx/index.cjs +3410 -3270
- package/dist/pptx/index.mjs +2 -2
- package/dist/pptx/render/controller/index.d.ts +6 -0
- package/dist/pptx/render/controller/index.d.ts.map +1 -1
- package/dist/pptx/render/controller/presentation-ink-controller.d.ts +121 -0
- package/dist/pptx/render/controller/presentation-ink-controller.d.ts.map +1 -0
- package/dist/pptx/render/controller/presentation-rehearsal-controller.d.ts +71 -0
- package/dist/pptx/render/controller/presentation-rehearsal-controller.d.ts.map +1 -0
- package/dist/pptx/render/controller/presenter-session-controller.d.ts +85 -0
- package/dist/pptx/render/controller/presenter-session-controller.d.ts.map +1 -0
- package/dist/pptx/render/editor-chrome/ribbon-css.d.ts +1 -1
- package/dist/pptx/render/editor-chrome/ribbon-css.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/inspector/index.d.ts +6 -0
- package/dist/pptx/render/inspector/index.d.ts.map +1 -1
- package/dist/pptx/render/inspector/shape-fill-actions.d.ts +109 -0
- package/dist/pptx/render/inspector/shape-fill-actions.d.ts.map +1 -0
- package/dist/pptx/render/inspector/shape-fill-fields.d.ts +54 -0
- package/dist/pptx/render/inspector/shape-fill-fields.d.ts.map +1 -0
- package/dist/pptx/render/inspector/shape-fill-stops.d.ts +21 -0
- package/dist/pptx/render/inspector/shape-fill-stops.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-galleries/smartart-colors-gallery.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/smartart-gallery-patch.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/smartart-native-entries.d.ts +36 -0
- package/dist/pptx/render/ribbon-galleries/smartart-native-entries.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-galleries/smartart-styles-gallery.d.ts +0 -11
- package/dist/pptx/render/ribbon-galleries/smartart-styles-gallery.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-tab-row.d.ts +61 -0
- package/dist/pptx/render/ribbon-tab-row.d.ts.map +1 -0
- package/dist/pptx/{smartart-insert-preview-DF6KSG3D.mjs → smartart-insert-preview-FJFP4JJ5.mjs} +3 -3
- package/dist/pptx/{smartart-insert-preview-BYPU325G.cjs → smartart-insert-preview-XNHOSN3T.cjs} +4 -4
- package/dist/pptx/web-components/index.d.ts +2 -0
- package/dist/pptx/web-components/index.d.ts.map +1 -1
- package/dist/pptx/web-components/office-token-bridge.d.ts +1 -1
- package/dist/pptx/web-components/office-token-bridge.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-tabs-styles.d.ts +8 -0
- package/dist/pptx/web-components/ribbon-tabs-styles.d.ts.map +1 -0
- package/dist/pptx/web-components/ribbon-tabs.d.ts +25 -0
- package/dist/pptx/web-components/ribbon-tabs.d.ts.map +1 -0
- package/dist/presence.d.ts +1 -0
- package/dist/ribbon/auto-collapse.d.ts +1 -0
- package/dist/ribbon/ribbon-actions.d.ts +1 -2
- package/dist/ribbon/ribbon-group.d.ts +2 -1
- package/dist/ribbon/ribbon-section.d.ts +1 -2
- package/dist/ribbon/ribbon-tabs.d.ts +24 -2
- package/dist/ribbon/ribbon-tabs.d.ts.map +1 -1
- package/dist/ribbon/ribbon-toggle.d.ts +2 -1
- package/dist/ribbon/ribbon-toolbar.d.ts +1 -2
- package/dist/ribbon/scroll-more.d.ts +1 -0
- package/dist/ribbon/svg-preview.d.ts +1 -0
- package/dist/smartart/definition-tiles.d.ts +21 -0
- package/dist/smartart/definition-tiles.d.ts.map +1 -0
- package/dist/smartart/galleries.d.ts +12 -9
- package/dist/smartart.d.ts +1 -0
- package/dist/smartart.js +1 -1
- package/dist/styles.d.ts +1 -0
- package/dist/teams.js +3 -3
- package/dist/touch-targets.d.ts +0 -1
- package/dist/visio.js +5 -5
- package/dist/xlsx/chart-format-source.d.ts +4 -3
- package/dist/xlsx.js +46 -26
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@ import { parseSvgPreview } from './chunk-FN7IF6M6.js';
|
|
|
2
2
|
import { OfficeElement, controlStyles, definer } from './chunk-4W4QZF4C.js';
|
|
3
3
|
import { html, nothing } from 'lit';
|
|
4
4
|
import { hexToRgbChannels } from 'ooxml-core/color';
|
|
5
|
-
import { resolveDrawingColor, buildRectPathGradientSvg,
|
|
5
|
+
import { resolveDrawingColor, buildRectPathGradientSvg, appliedDiagramNativeId, DIAGRAM_NATIVE_COLOR_SECTIONS, DIAGRAM_NATIVE_COLOR_ENTRIES, DIAGRAM_NATIVE_STYLE_SECTIONS, DIAGRAM_NATIVE_STYLE_ENTRIES, diagramDesignEdit, diagramNodeOutline } from 'ooxml-core/diagram';
|
|
6
6
|
import { evaluatePresetShape, pictureFillCounterTransform, imageRectFromCrop, pictureTileGeometry } from 'ooxml-core/geometry';
|
|
7
7
|
import { drawingPathData, resolveDrawingOuterShadow, pictureLuminanceTransfer, applyPictureHslPixels, resolveDrawingColor as resolveDrawingColor$1, buildImageLuminanceTransfer } from 'ooxml-core/drawingml';
|
|
8
8
|
import { wrapStyledRuns, getSubstituteFontFamily, designTextWidthEm } from 'ooxml-core/text';
|
|
@@ -324,8 +324,8 @@ function standardPictureFilter(doc, effect, scheme = {}, prefix = "picture") {
|
|
|
324
324
|
const value = effect.values ?? {};
|
|
325
325
|
const colors = effect.colors?.map((color) => {
|
|
326
326
|
const resolved = resolveDrawingColor$1(color, { scheme: (name) => scheme[name] });
|
|
327
|
-
const
|
|
328
|
-
return
|
|
327
|
+
const rgb2 = resolved ? hexToRgbChannels(resolved.hex) : void 0;
|
|
328
|
+
return rgb2 && resolved ? { r: rgb2.r / 255, g: rgb2.g / 255, b: rgb2.b / 255, a: resolved.alpha } : void 0;
|
|
329
329
|
});
|
|
330
330
|
switch (effect.name) {
|
|
331
331
|
case "alphaInv":
|
|
@@ -603,9 +603,9 @@ function probePicturePixels(doc, url, effects, scheme = {}) {
|
|
|
603
603
|
if (cached) return Promise.resolve(cached);
|
|
604
604
|
const running = pending.get(key);
|
|
605
605
|
if (running) return running;
|
|
606
|
-
const load = (source) => new Promise((
|
|
606
|
+
const load = (source) => new Promise((resolve2, reject) => {
|
|
607
607
|
const image = doc.createElement("img");
|
|
608
|
-
image.onload = () =>
|
|
608
|
+
image.onload = () => resolve2(image);
|
|
609
609
|
image.onerror = () => reject(new Error("Picture decode failed"));
|
|
610
610
|
image.src = source;
|
|
611
611
|
});
|
|
@@ -699,17 +699,17 @@ function probeNativeImageSize(src) {
|
|
|
699
699
|
}
|
|
700
700
|
const rememberPending = pendingProbes.size < CACHE_MAX;
|
|
701
701
|
const epoch = cacheEpoch;
|
|
702
|
-
const probe = new Promise((
|
|
702
|
+
const probe = new Promise((resolve2) => {
|
|
703
703
|
if (typeof Image === "undefined") {
|
|
704
|
-
|
|
704
|
+
resolve2(void 0);
|
|
705
705
|
return;
|
|
706
706
|
}
|
|
707
707
|
const img = new Image();
|
|
708
708
|
img.onload = () => {
|
|
709
709
|
const size = { width: img.naturalWidth, height: img.naturalHeight };
|
|
710
|
-
|
|
710
|
+
resolve2(size.width > 0 && size.height > 0 ? size : void 0);
|
|
711
711
|
};
|
|
712
|
-
img.onerror = () =>
|
|
712
|
+
img.onerror = () => resolve2(void 0);
|
|
713
713
|
img.src = src;
|
|
714
714
|
}).then((size) => {
|
|
715
715
|
if (pendingProbes.get(src) === probe) pendingProbes.delete(src);
|
|
@@ -788,13 +788,13 @@ function picturePaint(doc, defs, fill, media, context = { width: 1, height: 1 })
|
|
|
788
788
|
pattern.dataset.unapplied = "tile-image-size";
|
|
789
789
|
return;
|
|
790
790
|
}
|
|
791
|
-
const
|
|
791
|
+
const tile2 = fill.layout.tile;
|
|
792
792
|
const cell = pictureTileGeometry(
|
|
793
793
|
context,
|
|
794
794
|
// Office scales the uncropped bitmap to set the tile period; srcRect
|
|
795
795
|
// expands its image inside that fixed cell (native PowerPoint probe).
|
|
796
796
|
size2,
|
|
797
|
-
|
|
797
|
+
tile2,
|
|
798
798
|
fill.layout?.dpi
|
|
799
799
|
);
|
|
800
800
|
if (!cell) {
|
|
@@ -875,7 +875,7 @@ function picturePaint(doc, defs, fill, media, context = { width: 1, height: 1 })
|
|
|
875
875
|
}
|
|
876
876
|
|
|
877
877
|
// src/smartart/smartart-picture.ts
|
|
878
|
-
function diagramPictureFill(doc, defs, fill, part,
|
|
878
|
+
function diagramPictureFill(doc, defs, fill, part, resolve2, report, context) {
|
|
879
879
|
const fail = (reason) => {
|
|
880
880
|
const key = `picture:${reason}`;
|
|
881
881
|
if (!report.approximatedFills.includes(key)) report.approximatedFills.push(key);
|
|
@@ -883,8 +883,8 @@ function diagramPictureFill(doc, defs, fill, part, resolve, report, context) {
|
|
|
883
883
|
};
|
|
884
884
|
if (fill.unsupportedPicture?.length) return fail(fill.unsupportedPicture.join(","));
|
|
885
885
|
if (fill.linkRelId && !fill.relId) return fail("external");
|
|
886
|
-
if (!part || !
|
|
887
|
-
const url =
|
|
886
|
+
if (!part || !resolve2) return fail("unresolved");
|
|
887
|
+
const url = resolve2(part);
|
|
888
888
|
if (!url) return fail("missing-media");
|
|
889
889
|
const effects = picturePaint(doc, defs, fill, url, context);
|
|
890
890
|
if (effects.unapplied.length)
|
|
@@ -1140,8 +1140,8 @@ function colorToCss(color, scheme, report) {
|
|
|
1140
1140
|
];
|
|
1141
1141
|
if (resolved) {
|
|
1142
1142
|
if (resolved.alpha === 1) return resolved.hex;
|
|
1143
|
-
const
|
|
1144
|
-
return `rgba(${
|
|
1143
|
+
const rgb2 = hexToRgbChannels(resolved.hex);
|
|
1144
|
+
return `rgba(${rgb2.r}, ${rgb2.g}, ${rgb2.b}, ${resolved.alpha})`;
|
|
1145
1145
|
}
|
|
1146
1146
|
if (color.kind === "preset")
|
|
1147
1147
|
return /^[a-z]+$/i.test(color.value) ? color.value.toLowerCase() : "#808080";
|
|
@@ -1543,15 +1543,15 @@ var OfficeUiSmartArtPicker = class extends OfficeElement {
|
|
|
1543
1543
|
if (!layout) return;
|
|
1544
1544
|
event.preventDefault();
|
|
1545
1545
|
this.pick(layout);
|
|
1546
|
-
[...this.renderRoot.querySelectorAll("[data-layout]")].find((
|
|
1546
|
+
[...this.renderRoot.querySelectorAll("[data-layout]")].find((tile2) => tile2.dataset.layout === layout.id)?.focus();
|
|
1547
1547
|
}
|
|
1548
|
-
preview(layout,
|
|
1549
|
-
const key = `${
|
|
1548
|
+
preview(layout, tile2) {
|
|
1549
|
+
const key = `${tile2 ? "t" : "p"}:${layout.id}`;
|
|
1550
1550
|
if (this.previews.has(key)) return this.previews.get(key) ?? null;
|
|
1551
|
-
const size =
|
|
1551
|
+
const size = tile2 ? TILE : PREVIEW;
|
|
1552
1552
|
let drawn;
|
|
1553
1553
|
try {
|
|
1554
|
-
drawn = this.draw?.(layout, size,
|
|
1554
|
+
drawn = this.draw?.(layout, size, tile2);
|
|
1555
1555
|
} catch {
|
|
1556
1556
|
drawn = void 0;
|
|
1557
1557
|
}
|
|
@@ -1860,49 +1860,154 @@ var defineSmartArtTextPane = definer(
|
|
|
1860
1860
|
"office-ui-smartart-text-pane",
|
|
1861
1861
|
() => OfficeUiSmartArtTextPane
|
|
1862
1862
|
);
|
|
1863
|
+
|
|
1864
|
+
// src/smartart/definition-tiles.ts
|
|
1865
|
+
var DEFAULTS = {
|
|
1866
|
+
dk1: "#000000",
|
|
1867
|
+
lt1: "#FFFFFF",
|
|
1868
|
+
dk2: "#44546A",
|
|
1869
|
+
lt2: "#E7E6E6",
|
|
1870
|
+
accent1: "#4472C4",
|
|
1871
|
+
accent2: "#ED7D31",
|
|
1872
|
+
accent3: "#A5A5A5",
|
|
1873
|
+
accent4: "#FFC000",
|
|
1874
|
+
accent5: "#5B9BD5",
|
|
1875
|
+
accent6: "#70AD47"
|
|
1876
|
+
};
|
|
1877
|
+
var round2 = (value) => String(Math.round(value * 100) / 100);
|
|
1878
|
+
function rgb(color) {
|
|
1879
|
+
const hex2 = color.replace("#", "");
|
|
1880
|
+
const full = hex2.length === 3 ? [...hex2].map((c) => c + c).join("") : hex2.slice(0, 6);
|
|
1881
|
+
const value = Number.parseInt(full, 16);
|
|
1882
|
+
return Number.isNaN(value) ? [68, 114, 196] : [value >> 16, value >> 8 & 255, value & 255];
|
|
1883
|
+
}
|
|
1884
|
+
var hex = (channels) => `#${channels.map(
|
|
1885
|
+
(c) => Math.round(Math.min(255, Math.max(0, c))).toString(16).padStart(2, "0")
|
|
1886
|
+
).join("")}`;
|
|
1887
|
+
function toned(color, tone = 0) {
|
|
1888
|
+
const channels = rgb(color);
|
|
1889
|
+
return hex(channels.map((c) => tone < 0 ? c * (1 + tone) : c + (255 - c) * tone));
|
|
1890
|
+
}
|
|
1891
|
+
function mix(a, b, t) {
|
|
1892
|
+
const [x, y] = [rgb(a), rgb(b)];
|
|
1893
|
+
return hex(x.map((c, i) => c + ((y[i] ?? c) - c) * t));
|
|
1894
|
+
}
|
|
1895
|
+
var resolve = (theme, name) => safeColor(theme[name] ?? DEFAULTS[name], DEFAULTS.accent1);
|
|
1896
|
+
function smartArtDefinitionFills(entry, theme, count = 3) {
|
|
1897
|
+
const { fills, tones, mode } = entry.preview;
|
|
1898
|
+
const colors = fills.map((name, i) => toned(resolve(theme, name), tones?.[i]));
|
|
1899
|
+
if (!colors.length) return [resolve(theme, "accent1")];
|
|
1900
|
+
return Array.from({ length: Math.max(1, count) }, (_, i) => {
|
|
1901
|
+
if (mode === "span" && colors.length > 1) {
|
|
1902
|
+
const at = (count > 1 ? i / (count - 1) : 0) * (colors.length - 1);
|
|
1903
|
+
const low = Math.floor(at);
|
|
1904
|
+
return mix(colors[low], colors[Math.min(low + 1, colors.length - 1)], at - low);
|
|
1905
|
+
}
|
|
1906
|
+
return mode === "cycle" ? colors[i % colors.length] : colors[Math.min(i, colors.length - 1)];
|
|
1907
|
+
});
|
|
1908
|
+
}
|
|
1909
|
+
function tile(id, look, size) {
|
|
1910
|
+
const safeId = `sad-${id}`.replace(/[^\w-]/gu, "_");
|
|
1911
|
+
const pad = 4;
|
|
1912
|
+
const gap = 4;
|
|
1913
|
+
const w = (size.width - pad * 2 - gap * 2) / 3;
|
|
1914
|
+
const h = size.height * 0.46;
|
|
1915
|
+
const y = (size.height - h) / 2;
|
|
1916
|
+
let defs = "";
|
|
1917
|
+
let filter = "";
|
|
1918
|
+
if (look.effect > 0) {
|
|
1919
|
+
const k = Math.min(look.effect, 3);
|
|
1920
|
+
defs += `<filter id="${safeId}-s" x="-30%" y="-30%" width="160%" height="170%"><feDropShadow dx="0" dy="${round2(0.5 * k)}" stdDeviation="${round2(0.4 * k)}" flood-color="#000000" flood-opacity="${round2(0.15 + 0.1 * k)}"/></filter>`;
|
|
1921
|
+
filter = ` filter="url(#${safeId}-s)"`;
|
|
1922
|
+
}
|
|
1923
|
+
if (look.bevel)
|
|
1924
|
+
defs += `<linearGradient id="${safeId}-b" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#FFFFFF" stop-opacity="0.45"/><stop offset="0.5" stop-color="#FFFFFF" stop-opacity="0"/><stop offset="1" stop-color="#000000" stop-opacity="0.2"/></linearGradient>`;
|
|
1925
|
+
const boxes = [0, 1, 2].map((i) => {
|
|
1926
|
+
const x = pad + i * (w + gap);
|
|
1927
|
+
const fill = safeColor(look.fills[i % look.fills.length], DEFAULTS.accent1);
|
|
1928
|
+
const attrs = `x="${round2(x)}" y="${round2(y)}" width="${round2(w)}" height="${round2(h)}" rx="${round2(Math.min(w, h) * 0.12)}"`;
|
|
1929
|
+
const body = `<rect ${attrs} fill="${fill}" fill-opacity="${round2(look.opacity)}" stroke="${safeColor(look.line, "#FFFFFF")}" stroke-width="${round2(look.lineWidth)}"${filter}/>`;
|
|
1930
|
+
return look.bevel ? `${body}<rect ${attrs} fill="url(#${safeId}-b)"/>` : body;
|
|
1931
|
+
});
|
|
1932
|
+
const group = look.spatial ? `<g transform="translate(0 ${round2(size.height * 0.08)}) skewY(-6)">${boxes.join("")}</g>` : boxes.join("");
|
|
1933
|
+
const bg = `<rect x="0" y="0" width="${size.width}" height="${size.height}" fill="#FFFFFF"/>`;
|
|
1934
|
+
return svgTile(size.width, size.height, defs, bg + group);
|
|
1935
|
+
}
|
|
1936
|
+
function smartArtColorDefinitionTileSvg(entry, theme, size) {
|
|
1937
|
+
const line2 = resolve(theme, entry.preview.line);
|
|
1938
|
+
const outlined = entry.preview.line !== "lt1";
|
|
1939
|
+
return tile(
|
|
1940
|
+
entry.id,
|
|
1941
|
+
{
|
|
1942
|
+
fills: smartArtDefinitionFills(entry, theme),
|
|
1943
|
+
line: line2,
|
|
1944
|
+
lineWidth: outlined ? 1.5 : 0.75,
|
|
1945
|
+
opacity: entry.preview.transparent ? 0.6 : 1,
|
|
1946
|
+
effect: 0,
|
|
1947
|
+
bevel: false,
|
|
1948
|
+
spatial: false
|
|
1949
|
+
},
|
|
1950
|
+
size
|
|
1951
|
+
);
|
|
1952
|
+
}
|
|
1953
|
+
function smartArtStyleDefinitionTileSvg(entry, accent, size) {
|
|
1954
|
+
const { line: line2, effect, bevel, camera } = entry.preview;
|
|
1955
|
+
return tile(
|
|
1956
|
+
entry.id,
|
|
1957
|
+
{
|
|
1958
|
+
fills: [safeColor(accent, DEFAULTS.accent1)],
|
|
1959
|
+
line: "#FFFFFF",
|
|
1960
|
+
lineWidth: line2 >= 3 ? 1.75 : line2 > 0 ? 0.75 : 0,
|
|
1961
|
+
opacity: 1,
|
|
1962
|
+
effect,
|
|
1963
|
+
bevel: bevel === true,
|
|
1964
|
+
spatial: camera !== void 0
|
|
1965
|
+
},
|
|
1966
|
+
size
|
|
1967
|
+
);
|
|
1968
|
+
}
|
|
1863
1969
|
var TILE2 = { width: 56, height: 36 };
|
|
1864
1970
|
var same = (english) => english;
|
|
1865
|
-
function smartArtColorsGalleryState(
|
|
1971
|
+
function smartArtColorsGalleryState(theme, current, t = same) {
|
|
1972
|
+
const applied = appliedDiagramNativeId("colors", current);
|
|
1866
1973
|
return {
|
|
1867
1974
|
id: "smartArtColors",
|
|
1868
1975
|
label: t("Change Colors"),
|
|
1869
|
-
sections:
|
|
1976
|
+
sections: DIAGRAM_NATIVE_COLOR_SECTIONS.map((section) => ({
|
|
1870
1977
|
title: t(section.title),
|
|
1871
1978
|
columns: 5,
|
|
1872
1979
|
tileWidth: TILE2.width,
|
|
1873
1980
|
tileHeight: TILE2.height,
|
|
1874
|
-
items:
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
entry
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
TILE2
|
|
1883
|
-
)
|
|
1884
|
-
}))
|
|
1981
|
+
items: DIAGRAM_NATIVE_COLOR_ENTRIES.filter((entry) => entry.category === section.id).map(
|
|
1982
|
+
(entry) => ({
|
|
1983
|
+
id: entry.id,
|
|
1984
|
+
label: t(entry.name),
|
|
1985
|
+
applied: entry.id === applied,
|
|
1986
|
+
preview: smartArtColorDefinitionTileSvg(entry, theme, TILE2)
|
|
1987
|
+
})
|
|
1988
|
+
)
|
|
1885
1989
|
}))
|
|
1886
1990
|
};
|
|
1887
1991
|
}
|
|
1888
1992
|
function smartArtStylesGalleryState(accent1, current, t = same) {
|
|
1993
|
+
const applied = appliedDiagramNativeId("style", current);
|
|
1889
1994
|
return {
|
|
1890
1995
|
id: "smartArtStyles",
|
|
1891
1996
|
label: t("SmartArt Styles"),
|
|
1892
|
-
sections:
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1997
|
+
sections: DIAGRAM_NATIVE_STYLE_SECTIONS.map((section) => ({
|
|
1998
|
+
title: t(section.title),
|
|
1999
|
+
columns: 5,
|
|
2000
|
+
tileWidth: TILE2.width,
|
|
2001
|
+
tileHeight: TILE2.height,
|
|
2002
|
+
items: DIAGRAM_NATIVE_STYLE_ENTRIES.filter((entry) => entry.category === section.id).map(
|
|
2003
|
+
(entry) => ({
|
|
1899
2004
|
id: entry.id,
|
|
1900
2005
|
label: t(entry.name),
|
|
1901
|
-
applied: entry.id ===
|
|
1902
|
-
preview:
|
|
1903
|
-
})
|
|
1904
|
-
|
|
1905
|
-
|
|
2006
|
+
applied: entry.id === applied,
|
|
2007
|
+
preview: smartArtStyleDefinitionTileSvg(entry, accent1, TILE2)
|
|
2008
|
+
})
|
|
2009
|
+
)
|
|
2010
|
+
}))
|
|
1906
2011
|
};
|
|
1907
2012
|
}
|
|
1908
2013
|
var SmartArtTextPaneController = class {
|
|
@@ -2036,4 +2141,4 @@ function pictureSvg(doc, fill, url, width, height, context = {}) {
|
|
|
2036
2141
|
return svg;
|
|
2037
2142
|
}
|
|
2038
2143
|
|
|
2039
|
-
export { OfficeUiSmartArt, OfficeUiSmartArtPicker, OfficeUiSmartArtTextPane, SmartArtTextPaneController, cachedPicturePixels, defineSmartArt, defineSmartArtPicker, defineSmartArtTextPane, needsPicturePixels, pictureEffectFilter, pictureNeedsSvg, picturePaint, pictureSvg, probePicturePixels, renderDiagramDrawing, safeColor, smartArtColorsGalleryState, smartArtLayoutTileSvg, smartArtStylesGalleryState, smartArtTileSvg, svgTile };
|
|
2144
|
+
export { OfficeUiSmartArt, OfficeUiSmartArtPicker, OfficeUiSmartArtTextPane, SmartArtTextPaneController, cachedPicturePixels, defineSmartArt, defineSmartArtPicker, defineSmartArtTextPane, needsPicturePixels, pictureEffectFilter, pictureNeedsSvg, picturePaint, pictureSvg, probePicturePixels, renderDiagramDrawing, safeColor, smartArtColorDefinitionTileSvg, smartArtColorsGalleryState, smartArtDefinitionFills, smartArtLayoutTileSvg, smartArtStyleDefinitionTileSvg, smartArtStylesGalleryState, smartArtTileSvg, svgTile };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineShareDialog, chartSpaceFormatSource, shareDialogLabels } from './chunk-
|
|
1
|
+
import { defineShareDialog, chartSpaceFormatSource, shareDialogLabels } from './chunk-NSBQACCO.js';
|
|
2
2
|
import { GOOGLE_FONTS_CSS2_BASE, resolveGoogleFontsCss2Base, collectRunFamilies, collectWebfontFaces, selectGoogleWebfontFamilies, buildGoogleFontsHref, matchGoogleWebfontFragments } from 'ooxml-core/text';
|
|
3
3
|
import { readDeclaredFonts } from 'ooxml-core/opc';
|
|
4
4
|
import { chartExStyleSpace } from 'ooxml-core/chart';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineRibbonGroup, defineRibbonStack, defineButton, defineMenuItem, defineMenuButton } from './chunk-
|
|
1
|
+
import { defineRibbonGroup, defineRibbonStack, defineButton, defineMenuItem, defineMenuButton } from './chunk-NSBQACCO.js';
|
|
2
2
|
import { acceptedRibbonAddIns, findRibbonAddInCommand, RIBBON_ADD_IN_EVENT } from 'ooxml-core/ribbon';
|
|
3
3
|
export { RIBBON_ADD_IN_EVENT } from 'ooxml-core/ribbon';
|
|
4
4
|
import { sameRenderer, sameRegionContext, hostBackstagePageId, acceptedHostBackstagePages, placeHostBackstagePages, hostBackstageItemId, withHostMenuCommands, isHostMenuEntry, resolveHostMenuCommands, withoutHiddenEntries, hostBackstageRegionId } from 'ooxml-core/embedding';
|
|
@@ -112,5 +112,4 @@ export declare class OfficeUiCommentsPane extends OfficeElement {
|
|
|
112
112
|
private renderThread;
|
|
113
113
|
protected render(): TemplateResult<1>;
|
|
114
114
|
}
|
|
115
|
-
export declare const defineCommentsPane: import("../
|
|
116
|
-
//# sourceMappingURL=comments-pane.d.ts.map
|
|
115
|
+
export declare const defineCommentsPane: import("../index.js").Definer;
|
package/dist/comments/types.d.ts
CHANGED
|
@@ -77,3 +77,4 @@ export interface OfficeThreadDetail {
|
|
|
77
77
|
export declare function commentInitials(author: string): string;
|
|
78
78
|
/** A comment's time for display: ISO date-times are formatted for `locale`, other text is kept. */
|
|
79
79
|
export declare function formatCommentTime(created: string | undefined, locale?: string): string;
|
|
80
|
+
//# sourceMappingURL=types.d.ts.map
|
package/dist/controls.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { CONTROL_DEFINERS, CUSTOM_FONT_ACCEPT, CUSTOM_FONT_EXTENSIONS, DEFAULT_CLOUD_FILES_LABELS, DEFAULT_COMMENTS_LABELS, DEFAULT_CONNECTED_SERVICES_LABELS, DEFAULT_OFFICE_PROFILE, DEFAULT_OPEN_PLACES_LABELS, DEVICE_PLACE, 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, OfficeUiChartFormatPane, OfficeUiCloudFiles, OfficeUiConnectedServices, OfficeUiFormatSection, OfficeUiMessageDialog, OfficeUiOpenPlaces, OfficeUiShareDialog, SAVE_PROGRESS_TEXT, SHARE_DIALOG_LABELS, SHARE_DIALOG_LOCALES, alertDialog, assignKeyTips, attachKeyTips, attachRibbonGroupOverflow, buildChartFormatModel, buildFontCatalog, chartFormatFieldIntent, chartFormatLocale, chartFormatPaneTitle, chartFormatSourceTabs, chartFormatTargetLabel, chartFormatTargetOptions, chartFormatTranslator, chartSpaceFormatSource, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, commentInitials, confirmDialog, createDialogSession, createFontFaceScope, createLiveColorInput, createRibbonOverflow, defaultPaneGradient, defineAccount, defineBackstage, defineButton, defineChartDataSheet, defineChartFormatPane, defineChartPicker, defineCheckbox, defineCloudFiles, defineColorCustom, defineColorGrid, defineCommandSearch, defineCommentsPane, defineConnectedServices, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineFormatSection, defineGallery, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineMessageDialog, defineOpenPlaces, defineOptionsDialog, definePasteOptions, definePrintPreview, defineProgressDialog, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonActions, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineShareDialog, defineStatusBar, defineStatusItem, defineSwitch, defineSymbolPicker, defineTabStrip, defineTaskPane, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, deriveCustomFontDescriptor, drawingColorFromHex, drawingGradientFrom, fitRibbonGroups, formatCommentTime, handleLiveColorEvent, hexForInput, isFontFamilyAvailable, liveColorRevertPatch, nextEnabledIndex, optionText, optionsLabels, parseOfficeSymbolCode, personalizeSection, profileInitials, promptDialog, readOfficeProfile, recordLiveColorLeaves, registerControls, registerCustomFont, resolveChartFormatSourceTarget, rulerDivisions, runKeyTips, sanitizeOfficeProfile, saveProgressLabel, saveProgressStepChanged, scanAvailableFontFamilies, shareDialogLabels, translateChartFormatText, typeAheadIndex, unavailableCategory, unavailableControl, userInterfaceSection, writeOfficeProfile } from './chunk-
|
|
1
|
+
export { CONTROL_DEFINERS, CUSTOM_FONT_ACCEPT, CUSTOM_FONT_EXTENSIONS, DEFAULT_CLOUD_FILES_LABELS, DEFAULT_COMMENTS_LABELS, DEFAULT_CONNECTED_SERVICES_LABELS, DEFAULT_OFFICE_PROFILE, DEFAULT_OPEN_PLACES_LABELS, DEVICE_PLACE, 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, OfficeUiChartFormatPane, OfficeUiCloudFiles, OfficeUiConnectedServices, OfficeUiFormatSection, OfficeUiMessageDialog, OfficeUiOpenPlaces, OfficeUiShareDialog, SAVE_PROGRESS_TEXT, SHARE_DIALOG_LABELS, SHARE_DIALOG_LOCALES, alertDialog, assignKeyTips, attachKeyTips, attachRibbonGroupOverflow, buildChartFormatModel, buildFontCatalog, chartFormatFieldIntent, chartFormatLocale, chartFormatPaneTitle, chartFormatSourceTabs, chartFormatTargetLabel, chartFormatTargetOptions, chartFormatTranslator, chartSpaceFormatSource, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, commentInitials, confirmDialog, createDialogSession, createFontFaceScope, createLiveColorInput, createRibbonOverflow, defaultPaneGradient, defineAccount, defineBackstage, defineButton, defineChartDataSheet, defineChartFormatPane, defineChartPicker, defineCheckbox, defineCloudFiles, defineColorCustom, defineColorGrid, defineCommandSearch, defineCommentsPane, defineConnectedServices, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineFormatSection, defineGallery, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineMessageDialog, defineOpenPlaces, defineOptionsDialog, definePasteOptions, definePrintPreview, defineProgressDialog, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonActions, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineShareDialog, defineStatusBar, defineStatusItem, defineSwitch, defineSymbolPicker, defineTabStrip, defineTaskPane, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, deriveCustomFontDescriptor, drawingColorFromHex, drawingGradientFrom, fitRibbonGroups, formatCommentTime, handleLiveColorEvent, hexForInput, isFontFamilyAvailable, liveColorRevertPatch, nextEnabledIndex, optionText, optionsLabels, parseOfficeSymbolCode, personalizeSection, profileInitials, promptDialog, readOfficeProfile, recordLiveColorLeaves, registerControls, registerCustomFont, resolveChartFormatSourceTarget, rulerDivisions, runKeyTips, sanitizeOfficeProfile, saveProgressLabel, saveProgressStepChanged, scanAvailableFontFamilies, shareDialogLabels, translateChartFormatText, typeAheadIndex, unavailableCategory, unavailableControl, userInterfaceSection, writeOfficeProfile } from './chunk-NSBQACCO.js';
|
|
2
2
|
import './chunk-M6GF5ED2.js';
|
|
3
|
-
export { CHART_FORMAT_LOCALES, CHART_FORMAT_STRINGS, prefixChartFormatStrings } from './chunk-
|
|
3
|
+
export { CHART_FORMAT_LOCALES, CHART_FORMAT_STRINGS, prefixChartFormatStrings } from './chunk-JI4ZNPEK.js';
|
|
4
4
|
import './chunk-FQN4XNEF.js';
|
|
5
5
|
export { parseSvgPreview } from './chunk-FN7IF6M6.js';
|
|
6
6
|
import './chunk-4W4QZF4C.js';
|
|
@@ -80,4 +80,5 @@ export declare class OfficeUiMessageDialog extends OfficeElement {
|
|
|
80
80
|
private onKey;
|
|
81
81
|
protected render(): import("lit").TemplateResult<1>;
|
|
82
82
|
}
|
|
83
|
-
export declare const defineMessageDialog: import("../
|
|
83
|
+
export declare const defineMessageDialog: import("../registry.js").Definer;
|
|
84
|
+
//# sourceMappingURL=message-dialog.d.ts.map
|
|
@@ -38,5 +38,4 @@ export declare class OfficeUiProgressDialog extends OfficeElement {
|
|
|
38
38
|
protected updated(_changed: PropertyValues<this>): void;
|
|
39
39
|
protected render(): import("lit").TemplateResult<1>;
|
|
40
40
|
}
|
|
41
|
-
export declare const defineProgressDialog: import("../
|
|
42
|
-
//# sourceMappingURL=progress-dialog.d.ts.map
|
|
41
|
+
export declare const defineProgressDialog: import("../index.js").Definer;
|
package/dist/docx.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { defineChartExOptions, statusLayout, watchStatusWidth, compactPageText } from './chunk-HUR5JAG7.js';
|
|
2
|
-
import { effectiveFontDownloads, syncGoogleWebfontStylesheet, prepareWebfonts, prefetchWebfonts, prefetchLinkId, FONT_DOWNLOADS_DEFAULT, chartExSpaceFormatSource, attachShareDialog, fontDownloadLock, connectedServicesLabels } from './chunk-
|
|
3
|
-
import { syncRibbonAddIns, createHostBackstagePages, withHostMenuItems } from './chunk-
|
|
4
|
-
export { RIBBON_ADD_IN_EVENT } from './chunk-
|
|
5
|
-
import { defineSmartArt, smartArtColorsGalleryState, smartArtStylesGalleryState, SmartArtTextPaneController, pictureNeedsSvg, pictureSvg, defineSmartArtPicker } from './chunk-
|
|
2
|
+
import { effectiveFontDownloads, syncGoogleWebfontStylesheet, prepareWebfonts, prefetchWebfonts, prefetchLinkId, FONT_DOWNLOADS_DEFAULT, chartExSpaceFormatSource, attachShareDialog, fontDownloadLock, connectedServicesLabels } from './chunk-XQIZWJEV.js';
|
|
3
|
+
import { syncRibbonAddIns, createHostBackstagePages, withHostMenuItems } from './chunk-Y535PPSZ.js';
|
|
4
|
+
export { RIBBON_ADD_IN_EVENT } from './chunk-Y535PPSZ.js';
|
|
5
|
+
import { defineSmartArt, smartArtColorsGalleryState, smartArtStylesGalleryState, SmartArtTextPaneController, pictureNeedsSvg, pictureSvg, defineSmartArtPicker } from './chunk-X464LPTR.js';
|
|
6
6
|
import { legacyThemeAliases, legacyThemeBridge, installOfficeUiThemeFor } from './chunk-6C6S4AWF.js';
|
|
7
|
-
import { createRibbonOverflow, defineRibbon, defineChartFormatPane, defineRuler, defineChartDataSheet, defineChartPicker, createDialogSession, defineCommentsPane, saveProgressLabel, confirmDialog, defineDialog, buildFontCatalog, defineGallery, defineSearchField, defineSwitch, defineTitleBar, defineRibbonActions, defineBackstage, defineStatusBar, defineZoomSlider, defineContextMenu, defineColorGrid, runKeyTips, defineOptionsDialog, assignKeyTips, optionsLabels, defineConnectedServices, userInterfaceSection, personalizeSection, optionText, unavailableCategory, defineOpenPlaces } from './chunk-
|
|
7
|
+
import { createRibbonOverflow, defineRibbon, defineChartFormatPane, defineRuler, defineChartDataSheet, defineChartPicker, createDialogSession, defineCommentsPane, saveProgressLabel, confirmDialog, defineDialog, buildFontCatalog, defineGallery, defineSearchField, defineSwitch, defineTitleBar, defineRibbonActions, defineBackstage, defineStatusBar, defineZoomSlider, defineContextMenu, defineColorGrid, runKeyTips, defineOptionsDialog, assignKeyTips, optionsLabels, defineConnectedServices, userInterfaceSection, personalizeSection, optionText, unavailableCategory, defineOpenPlaces } from './chunk-NSBQACCO.js';
|
|
8
8
|
import { registerIcon } from './chunk-M6GF5ED2.js';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-JI4ZNPEK.js';
|
|
10
10
|
import './chunk-FQN4XNEF.js';
|
|
11
11
|
import './chunk-FN7IF6M6.js';
|
|
12
12
|
import './chunk-4W4QZF4C.js';
|
|
13
13
|
import './chunk-5FMWQWLP.js';
|
|
14
14
|
import { optionStrings, normalizeLocale, SUPPORTED_OFFICE_LOCALES, interpolate } from 'ooxml-core/i18n';
|
|
15
|
-
import { DIAGRAM_UI_STRINGS, DIAGRAM_ADD_SHAPE_COMMANDS, DEFAULT_GENERATED_DIAGRAM_SCHEME, DIAGRAM_DESIGN_GROUPS, DIAGRAM_INSERT_PRESETS, DIAGRAM_DESIGN_COMMANDS,
|
|
15
|
+
import { DIAGRAM_UI_STRINGS, DIAGRAM_ADD_SHAPE_COMMANDS, DEFAULT_GENERATED_DIAGRAM_SCHEME, DIAGRAM_DESIGN_GROUPS, DIAGRAM_INSERT_PRESETS, DIAGRAM_DESIGN_COMMANDS, findDiagramNativeColor, findDiagramNativeStyle, DIAGRAM_INSERT_CATEGORIES, DIAGRAM_ADD_SHAPE_LABEL } from 'ooxml-core/diagram';
|
|
16
16
|
import { markSpecs, imageNodeSpec, fieldMarkerNodeSpec, noteReferenceNodeSpec, pageBreakNodeSpec, hardBreakNodeSpec, commentHistoryAttributes, tableCellStyle, tableStyle, createToggleFormat, expectDefined, controlFromData, paragraphBoxCss, WORD_CAPABILITY_ACTIONS, normalizeThemeMode, applyThemeColors, refreshWordYjsPresence, tableGrid, RESTRUCTURE_TABLE_META, normalizeRibbonActions, DirtyState, locksStories, isWordYjsRemoteTransaction, REMOTE_TRANSACTION_META, repairCollaborativeDocumentIds, HEADER_FOOTER_INPUT, splitCell, closeRect, mergeCells, deleteColumns, insertColumn, deleteRow, insertRow, rowSpanOf, continuationsOf, wordYjsPluginKey, wordYjsRedo, wordYjsUndo, documentWordCount, restoreSectionParts, commentThreadsFromDoc, restoreNoteParts, CollaborationClient, createCollaborationIdGenerator, WordYjsCollaboration, insertContentControl, sectionPartsJson, fitZoomPercent, hasChangeAtCursor, hasAnyChange, commentIdsAtSelection, commentAnchors, forcesTrackChanges, fieldGuardPlugin, tableStructureGuardPlugin, contentControlPlugin, formFieldGuardPlugin, editRestrictionPlugin, symbolFontPlugin, positionalTabInputPlugin, trackChangesPlugin, wordYjsPresencePlugin, notePartsJson, placementClass, removeCommentThread, removeCommentAnchor, deleteComment, updateCommentThreads, addComment, toggleTrackChanges, goToNextChange, goToPreviousChange, rejectAllChanges, acceptAllChanges, rejectChangeAtCursor, acceptChangeAtCursor, goToComment, selectedChart, appendInlineNode, sameJson, sameRuns, PARAGRAPH_KEEP_KEYS, PARAGRAPH_EAST_ASIAN_KEYS, paragraphFromAttrs, parseBordersJson, isNavigableHref, setReviewRecordingPreferences, setEditableRegion, insertChartImage, nodeNumbering, controlAtSelection, trackChangesPluginKey, paragraphFormattingRevision, inlineNodeRun, formattingRevision, runToInlineNodes as runToInlineNodes$1, NotePartsStep, SectionPartsStep, editRestrictionOf, editableRanges, insertWordHardBreak, paragraphAttrs, resolveCellVisuals, previewDocxDiagram, themeDrawing, chartNodeSpec, FindPatternError, replaceSelectedChart, ribbonActionIdForLabel, removeWordLink, fieldResultRanges, wordLinkRangeAt, nextEditableRegion, editRestrictionKey, ligatureCss as ligatureCss$1, toggleCheckboxControl, formFieldBeside, formFieldOfNode, formFieldLocked, toggleFormCheckboxAt, findStories, findStoryKey, findStoryGroup, replacementParts, backstageFocus, applyRunFormattingPatch, clearDirectRunFormatting, applyWordLink, deleteFieldSelection, emptySimpleFieldResult, ligatureStyle, wordHighlightColors, swatchColor, cssBorderSide, findMatches, countWords, FIND_OBJECT, FIND_LINE_BREAK, FIND_PAGE_BREAK, FIND_PARAGRAPH_MARK, insertedTextMarks, chooseListItem, chooseDate, selectFormDropDownAt, updateControlProperties, WORD_CAPABILITY_MENU_ITEMS, WORD_CAPABILITY_SHORTCUTS, WORD_CAPABILITY_BACKSTAGE_PAGES, WORD_CAPABILITY_FILE_COMMANDS, resolveComment, replyToComment, CollaborationAuthority } from 'ooxml-core/docx/ui';
|
|
17
17
|
export { CollaborationAuthority, CollaborationClient, RIBBON_ACTION_IDS, RIBBON_ACTION_LABELS, WORD_CAPABILITY_IDS, createCollaborationIdGenerator, darkTheme, isRibbonActionId, lightTheme, normalizeRibbonActions, repairCollaborativeDocumentIds, themeToCssVars } from 'ooxml-core/docx/ui';
|
|
18
18
|
import { signedTwips, createDocument, saveDocx, sectionsFromLayout, inspectDocument, sectionsOf, pageSizeOf, columnPreset, applyPageSetup, withSection, sectionLayoutJson, computeListLabels, numberNotesInOrder, tocEntries, editDocxChartEx, editDocxChart, resolveNumberingLevel, pictureCropOf, uncroppedPictureSize, formatDocxDiagram, createDocxDiagram, insertedDiagramPartNames, changeDocxDiagramLayout, setDrawingWrap, tableOfFiguresInstruction, findTableOfContents, placementForWrap, INSPECTION_CATEGORIES, enforceProtection, verifyProtectionPassword, applyDocxChartDataSheetEdits, docxChartDataSheet, newDocxChart, newChartImage, docxChartPaint, ensureListDefinition, equalColumnDraft, readColumnDraft, PICTURE_WATERMARK_SCALES, PAGE_SIZE_OPTIONS, PAGE_SIZES, readPageSetup, removeDocumentInformation, isRunHiddenForReview, resolveTableStyleFormatting, resolveParagraphFormatting, displayListLabel, planNoteConversion, retargetNoteReference, setTitlePage, setLineNumbering, setVerticalAlign, setPageNumbering, ST_NumberFormat, unequalColumnPreset, setColumns, setOrientation, setPageSize, setMargins, lineSpacingLabel, formatNoteNumber, cellSourceBlocks, resolveTableCellMargins, reviewDocumentFormatting, reviewFormattingWarnings, listRevisions, diagramColorTheme, plainText, resolveRunFormatting, removedByEdit, isValidPictureCrop, setPictureCrop, editDocxDiagram, drawingWrapOf, tocHyperlinks, DEFAULT_TOC_INSTRUCTION, tocBookmarks, buildTableOfContents, tocCaptionLabel, twips as twips$1, formatListNumber, columnTextWidth, validColumnDraft, validatePageSetup, presetOf, LIGATURE_VALUES, isLigatures, reviewRunFormatting, resolveThemeColorReference, pictureBulletSizePt, lineSpacingValue, canEditControlContent, controlDate, formDropDownIndex, shapeSvg, isStHighlightColor, transformCase, DEFAULT_TABLE_BORDERS, parseLineSpacingValue, twipsAttr, SHAPE_PALETTE, isHeadingListKind, headingListLevels, createListDefinition, linkStylesToList, twipsFromPixels, isFieldLocked, styleRefSource, computedFields, parseStyleReference, bodyStyleRefResult, COMPUTED_FIELD_NAMES, fieldName, isDirectionalPreset, pictureWatermarkSizePt, headingLevel, reviewParagraphFormatting, normalizeWordClipboardHtml, styleIdForName, isValidLanguageTag, WORD, newShape, withFieldCodeFormatting, fieldResultRun, DEFAULT_DRAWN_SHAPE, lineSpacingOptions, createPictureBulletList, halfPointsFromPoints, changeColumnWidth, changeColumnGap, documentStats, refreshComputedFields } from 'ooxml-core/docx';
|
|
@@ -9843,22 +9843,24 @@ function insertDiagram(view, image) {
|
|
|
9843
9843
|
view.dispatch(closeHistory(tr.scrollIntoView()));
|
|
9844
9844
|
return true;
|
|
9845
9845
|
}
|
|
9846
|
+
var loaded;
|
|
9847
|
+
var loading;
|
|
9848
|
+
var builtin = () => loading ??= import('ooxml-core/diagram/builtin').then((module) => loaded = module);
|
|
9846
9849
|
function smartArtFormatGallery(kind) {
|
|
9847
9850
|
defineGallery();
|
|
9848
9851
|
const gallery = document.createElement("office-ui-gallery");
|
|
9849
9852
|
gallery.dataset.smartartFormat = kind;
|
|
9853
|
+
void builtin().catch(() => void 0);
|
|
9850
9854
|
gallery.addEventListener("office-gallery-pick", (event) => {
|
|
9851
9855
|
const value = event.detail.itemId;
|
|
9852
|
-
|
|
9853
|
-
|
|
9854
|
-
|
|
9855
|
-
|
|
9856
|
-
|
|
9857
|
-
|
|
9858
|
-
|
|
9859
|
-
|
|
9860
|
-
change: { kind, value }
|
|
9861
|
-
});
|
|
9856
|
+
const entry = kind === "colors" ? findDiagramNativeColor(value) : findDiagramNativeStyle(value);
|
|
9857
|
+
if (!entry) return;
|
|
9858
|
+
const apply2 = ({ builtinSmartArtFormatChange }) => emit(gallery, "ribbon-action", {
|
|
9859
|
+
type: "smartArtFormat",
|
|
9860
|
+
change: builtinSmartArtFormatChange(kind, entry.uniqueId)
|
|
9861
|
+
});
|
|
9862
|
+
if (loaded) apply2(loaded);
|
|
9863
|
+
else void builtin().then(apply2);
|
|
9862
9864
|
});
|
|
9863
9865
|
return gallery;
|
|
9864
9866
|
}
|
|
@@ -9866,15 +9868,7 @@ function syncSmartArtFormatGalleries(root, disabled, colorsId, styleId) {
|
|
|
9866
9868
|
const locale = normalizeEditorLocale(root.dataset.editorLocale);
|
|
9867
9869
|
const t = (key3) => translate(locale, key3);
|
|
9868
9870
|
for (const gallery of root.querySelectorAll("[data-smartart-format]")) {
|
|
9869
|
-
const state = gallery.dataset.smartartFormat === "colors" ? smartArtColorsGalleryState(
|
|
9870
|
-
{},
|
|
9871
|
-
colorsId?.split("/").at(-1),
|
|
9872
|
-
t
|
|
9873
|
-
) : smartArtStylesGalleryState(
|
|
9874
|
-
void 0,
|
|
9875
|
-
styleId?.split("/").at(-1),
|
|
9876
|
-
t
|
|
9877
|
-
);
|
|
9871
|
+
const state = gallery.dataset.smartartFormat === "colors" ? smartArtColorsGalleryState({}, colorsId, t) : smartArtStylesGalleryState(void 0, styleId, t);
|
|
9878
9872
|
gallery.state = {
|
|
9879
9873
|
...state,
|
|
9880
9874
|
moreLabel: state.label,
|
|
@@ -23475,8 +23469,8 @@ var SmartArtController = class {
|
|
|
23475
23469
|
const view = this.host.view();
|
|
23476
23470
|
if (!view?.editable) return;
|
|
23477
23471
|
try {
|
|
23478
|
-
const
|
|
23479
|
-
const layoutId =
|
|
23472
|
+
const builtin2 = await this.definitions();
|
|
23473
|
+
const layoutId = builtin2.builtinLayoutIdForPreset(preset.layout);
|
|
23480
23474
|
if (!layoutId)
|
|
23481
23475
|
throw new Error(translate(this.locale, "The SmartArt layouts could not be loaded."));
|
|
23482
23476
|
const width = Math.min(DEFAULT_SIZE3.width, Math.max(96, this.host.contentWidth()));
|
|
@@ -23485,13 +23479,13 @@ var SmartArtController = class {
|
|
|
23485
23479
|
const diagram = createDocxDiagram({
|
|
23486
23480
|
layoutId,
|
|
23487
23481
|
layoutSource: {
|
|
23488
|
-
layoutXml:
|
|
23489
|
-
colorsXml:
|
|
23490
|
-
quickStyleXml:
|
|
23482
|
+
layoutXml: builtin2.loadBuiltinSmartArtLayoutXml(layoutId),
|
|
23483
|
+
colorsXml: builtin2.BUILTIN_SMARTART_COLORS_XML,
|
|
23484
|
+
quickStyleXml: builtin2.BUILTIN_SMARTART_QUICK_STYLE_XML
|
|
23491
23485
|
},
|
|
23492
23486
|
family: preset.family,
|
|
23493
|
-
colorsId:
|
|
23494
|
-
quickStyleId:
|
|
23487
|
+
colorsId: builtin2.BUILTIN_SMARTART_COLORS_ID,
|
|
23488
|
+
quickStyleId: builtin2.BUILTIN_SMARTART_QUICK_STYLE_ID,
|
|
23495
23489
|
// Word starts every shape empty, showing its "[Text]" placeholder.
|
|
23496
23490
|
items: preset.defaultItems.map(() => ""),
|
|
23497
23491
|
widthPx: width,
|
|
@@ -23499,9 +23493,9 @@ var SmartArtController = class {
|
|
|
23499
23493
|
partSuffix
|
|
23500
23494
|
});
|
|
23501
23495
|
const names = insertedDiagramPartNames(partSuffix);
|
|
23502
|
-
this.host.stage(names.layout, xmlPart(
|
|
23503
|
-
this.host.stage(names.colors, xmlPart(
|
|
23504
|
-
this.host.stage(names.quickStyle, xmlPart(
|
|
23496
|
+
this.host.stage(names.layout, xmlPart(builtin2.loadBuiltinSmartArtLayoutXml(layoutId)));
|
|
23497
|
+
this.host.stage(names.colors, xmlPart(builtin2.BUILTIN_SMARTART_COLORS_XML));
|
|
23498
|
+
this.host.stage(names.quickStyle, xmlPart(builtin2.BUILTIN_SMARTART_QUICK_STYLE_XML));
|
|
23505
23499
|
insertDiagram(view, {
|
|
23506
23500
|
relId: "",
|
|
23507
23501
|
partName: "",
|
|
@@ -23523,18 +23517,18 @@ var SmartArtController = class {
|
|
|
23523
23517
|
const layoutPart = selected?.diagram.parts.layout?.partName;
|
|
23524
23518
|
if (!view?.editable || !selected || !layoutPart) return;
|
|
23525
23519
|
try {
|
|
23526
|
-
const
|
|
23527
|
-
const layoutId =
|
|
23520
|
+
const builtin2 = await this.definitions();
|
|
23521
|
+
const layoutId = builtin2.builtinLayoutIdForPreset(preset.layout);
|
|
23528
23522
|
if (!layoutId)
|
|
23529
23523
|
throw new Error(translate(this.locale, "The SmartArt layouts could not be loaded."));
|
|
23530
23524
|
const next = changeDocxDiagramLayout(
|
|
23531
23525
|
selected.diagram,
|
|
23532
23526
|
layoutId,
|
|
23533
23527
|
preset.family,
|
|
23534
|
-
|
|
23528
|
+
builtin2.loadBuiltinSmartArtLayoutXml(layoutId)
|
|
23535
23529
|
);
|
|
23536
23530
|
if (next === selected.diagram) return;
|
|
23537
|
-
this.host.stage(layoutPart, xmlPart(
|
|
23531
|
+
this.host.stage(layoutPart, xmlPart(builtin2.loadBuiltinSmartArtLayoutXml(layoutId)));
|
|
23538
23532
|
replaceDiagram(view, selected.pos, next);
|
|
23539
23533
|
this.sync();
|
|
23540
23534
|
focusView(view);
|
|
@@ -23722,8 +23716,8 @@ var InsertController = class {
|
|
|
23722
23716
|
return (event.ctrlKey || event.metaKey) && followLinkAt(view, pos);
|
|
23723
23717
|
}
|
|
23724
23718
|
/** Media bytes for rendering: pictures inserted in this session first, then the loaded package. */
|
|
23725
|
-
media(partName,
|
|
23726
|
-
return this.pendingMedia.get(partName)?.bytes ??
|
|
23719
|
+
media(partName, loaded2) {
|
|
23720
|
+
return this.pendingMedia.get(partName)?.bytes ?? loaded2?.get(partName);
|
|
23727
23721
|
}
|
|
23728
23722
|
reset() {
|
|
23729
23723
|
this.shapeTool.disarm();
|
|
@@ -23,3 +23,4 @@ export interface LocalFontFace {
|
|
|
23
23
|
export declare function parseLocalFontFaces(css: string): LocalFontFace[];
|
|
24
24
|
/** The local font files of `doc`'s `@font-face` rules (see the module comment). */
|
|
25
25
|
export declare function collectLocalFontFiles(doc: FontFaceSourceDocument): Promise<PdfFontFile[]>;
|
|
26
|
+
//# sourceMappingURL=pdf-font-faces.d.ts.map
|
|
@@ -15,4 +15,3 @@ export declare function rgbaToPdfImage(rgba: Uint8ClampedArray, width: number, h
|
|
|
15
15
|
export declare function drawableToPdfImage(doc: Document, source: CanvasImageSource, naturalWidth: number, naturalHeight: number, maxSide?: number): Promise<PdfImageResource | undefined>;
|
|
16
16
|
/** Decode a `data:` or `blob:` picture to RGB (and alpha) samples, downscaled to a bounded size. */
|
|
17
17
|
export declare function decodePdfImage(doc: Document, href: string, maxSide?: number): Promise<PdfImageResource | undefined>;
|
|
18
|
-
//# sourceMappingURL=pdf-image.d.ts.map
|
|
@@ -8,3 +8,4 @@ export type SvgFontFamilyMapper = (value: string) => string;
|
|
|
8
8
|
* run uses a flipped text matrix. Positions inside a row use approximate standard-font widths.
|
|
9
9
|
*/
|
|
10
10
|
export declare function drawSvgText(page: PdfVectorPage, text: Element, alpha: number, fonts?: PdfFontSet, familyOf?: SvgFontFamilyMapper): void;
|
|
11
|
+
//# sourceMappingURL=pdf-svg-text.d.ts.map
|
|
@@ -41,4 +41,3 @@ export declare function entryBadge(entry: CloudEntry): string;
|
|
|
41
41
|
export declare function formatSize(bytes: number | undefined): string;
|
|
42
42
|
export declare function formatModified(modified: number | undefined, locale?: string): string;
|
|
43
43
|
export declare function messageOf(error: unknown, fallback: string): string;
|
|
44
|
-
//# sourceMappingURL=cloud-files-labels.d.ts.map
|
|
@@ -126,4 +126,5 @@ export declare class OfficeUiCloudFiles extends OfficeElement {
|
|
|
126
126
|
private viewModel;
|
|
127
127
|
protected render(): typeof nothing | import("lit").TemplateResult<1>;
|
|
128
128
|
}
|
|
129
|
-
export declare const defineCloudFiles: import("../
|
|
129
|
+
export declare const defineCloudFiles: import("../registry.js").Definer;
|
|
130
|
+
//# sourceMappingURL=cloud-files.d.ts.map
|
|
@@ -67,5 +67,4 @@ export declare class OfficeUiConnectedServices extends OfficeElement {
|
|
|
67
67
|
private row;
|
|
68
68
|
protected render(): typeof nothing | import("lit").TemplateResult<1>;
|
|
69
69
|
}
|
|
70
|
-
export declare const defineConnectedServices: import("../
|
|
71
|
-
//# sourceMappingURL=connected-services.d.ts.map
|
|
70
|
+
export declare const defineConnectedServices: import("../index.js").Definer;
|
package/dist/fonts/webfonts.d.ts
CHANGED
package/dist/form/checkable.d.ts
CHANGED
package/dist/form/checkbox.d.ts
CHANGED
|
@@ -5,4 +5,5 @@ export declare class OfficeUiCheckbox extends OfficeUiCheckable {
|
|
|
5
5
|
protected readonly semantics = "checkbox";
|
|
6
6
|
protected render(): import("lit").TemplateResult<1>;
|
|
7
7
|
}
|
|
8
|
-
export declare const defineCheckbox: import("../
|
|
8
|
+
export declare const defineCheckbox: import("../registry.js").Definer;
|
|
9
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -41,3 +41,4 @@ export declare const OFFICE_COLOR_SWATCHES: readonly OfficeColorSwatch[];
|
|
|
41
41
|
export declare const OFFICE_COLOR_SWATCH_HEXES: readonly string[];
|
|
42
42
|
/** A standard swatch's name in the viewer's locale (English without a translator or a key). */
|
|
43
43
|
export declare function officeColorSwatchLabel(swatch: OfficeColorSwatch, translate?: Translate): string;
|
|
44
|
+
//# sourceMappingURL=color-swatches.d.ts.map
|