ooxml-ui 1.9.0 → 1.10.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/dist/{chunk-SNV6YKPC.js → chunk-HZSYGNNB.js} +2 -1
- package/dist/{chunk-SKYBYVYH.js → chunk-IXLJNVUD.js} +1 -1
- package/dist/{chunk-PH7IBZOZ.js → chunk-WMGMZIMM.js} +1 -1
- package/dist/docx/print-border-width.d.ts +2 -0
- package/dist/docx/print-table.d.ts +1 -1
- package/dist/docx.js +93 -8
- package/dist/index.js +3 -3
- package/dist/pptx/ai/index.cjs +2 -2
- package/dist/pptx/ai/index.mjs +1 -1
- package/dist/pptx/{chunk-F7BBPOVJ.mjs → chunk-5AD3V3PA.mjs} +1 -0
- package/dist/pptx/{chunk-BPAA5FSB.mjs → chunk-6B3UUVRS.mjs} +1 -1
- package/dist/pptx/{chunk-KBCKCW5M.mjs → chunk-6NFW2AQA.mjs} +682 -481
- package/dist/pptx/chunk-EYPNQ3FG.cjs +59 -0
- package/dist/pptx/chunk-FFIYFHBO.mjs +55 -0
- package/dist/pptx/{chunk-HWW2UVUP.cjs → chunk-JRCK6CFI.cjs} +19 -9
- package/dist/pptx/{chunk-MKVKISFW.mjs → chunk-OBRLAW6C.mjs} +1 -1
- package/dist/pptx/{chunk-BFZDO2DY.cjs → chunk-OCNECNJS.cjs} +785 -550
- package/dist/pptx/{chunk-Y4LTLCQP.cjs → chunk-OJFD3SHS.cjs} +26 -47
- package/dist/pptx/{chunk-7KPDES3X.mjs → chunk-PMURSMHH.mjs} +6 -35
- package/dist/pptx/{chunk-PKDISDDZ.cjs → chunk-TSSWTBJQ.cjs} +2 -2
- package/dist/pptx/{chunk-SABFKDRM.mjs → chunk-WFEN6SHA.mjs} +19 -10
- package/dist/pptx/{chunk-UEF4BFW4.cjs → chunk-XFQ2RD4I.cjs} +7 -7
- package/dist/pptx/{chunk-QVYJB7G2.cjs → chunk-Y7CDPPMZ.cjs} +1 -0
- package/dist/pptx/dom/elements/text-shape.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +228 -218
- package/dist/pptx/dom/index.mjs +29 -19
- package/dist/pptx/dom/load-presentation.d.ts +1 -0
- package/dist/pptx/dom/load-presentation.d.ts.map +1 -1
- package/dist/pptx/i18n/index.cjs +6 -6
- package/dist/pptx/i18n/index.mjs +1 -1
- package/dist/pptx/i18n/translations-en-galleries.d.ts.map +1 -1
- package/dist/pptx/index.cjs +2889 -2825
- package/dist/pptx/index.mjs +7 -7
- package/dist/pptx/render/animation-after-effect-authoring.d.ts +1 -38
- package/dist/pptx/render/animation-after-effect-authoring.d.ts.map +1 -1
- package/dist/pptx/render/animation-after-effect.d.ts +2 -2
- package/dist/pptx/render/animation-after-effect.d.ts.map +1 -1
- package/dist/pptx/render/animation-authoring.cjs +39 -39
- package/dist/pptx/render/animation-authoring.d.ts +2 -11
- package/dist/pptx/render/animation-authoring.d.ts.map +1 -1
- package/dist/pptx/render/animation-authoring.mjs +1 -1
- package/dist/pptx/render/animation-opacity-playback.d.ts +9 -0
- package/dist/pptx/render/animation-opacity-playback.d.ts.map +1 -0
- package/dist/pptx/render/animation-opacity-style.d.ts +6 -0
- package/dist/pptx/render/animation-opacity-style.d.ts.map +1 -0
- package/dist/pptx/render/animation-playback-engine.d.ts +1 -1
- package/dist/pptx/render/animation-playback-engine.d.ts.map +1 -1
- package/dist/pptx/render/animation-playback-seek.d.ts.map +1 -1
- package/dist/pptx/render/animation-playback-steps.d.ts.map +1 -1
- package/dist/pptx/render/animation-timeline-engine.d.ts +4 -0
- package/dist/pptx/render/animation-timeline-engine.d.ts.map +1 -1
- package/dist/pptx/render/animation-timeline-group.d.ts +2 -0
- package/dist/pptx/render/animation-timeline-group.d.ts.map +1 -1
- package/dist/pptx/render/animation-timeline-regular-step.d.ts.map +1 -1
- package/dist/pptx/render/animation-timeline-rows.d.ts.map +1 -1
- package/dist/pptx/render/animation-timeline-sequence-builder.d.ts.map +1 -1
- package/dist/pptx/render/animation-timeline-step-effect.d.ts +2 -1
- package/dist/pptx/render/animation-timeline-step-effect.d.ts.map +1 -1
- package/dist/pptx/render/animation-timeline-step.d.ts +3 -1
- package/dist/pptx/render/animation-timeline-step.d.ts.map +1 -1
- package/dist/pptx/render/background-animation-layers.d.ts +12 -0
- package/dist/pptx/render/background-animation-layers.d.ts.map +1 -0
- package/dist/pptx/render/customization/customization-resolve-ribbon.d.ts.map +1 -1
- package/dist/pptx/render/customization/ribbon-control-catalog-tail.d.ts +6 -0
- package/dist/pptx/render/customization/ribbon-control-catalog-tail.d.ts.map +1 -1
- package/dist/pptx/render/customization/ribbon-control-catalog.d.ts +6 -0
- package/dist/pptx/render/customization/ribbon-control-catalog.d.ts.map +1 -1
- package/dist/pptx/render/field-context.d.ts +2 -0
- package/dist/pptx/render/field-context.d.ts.map +1 -1
- package/dist/pptx/render/font-family-update.d.ts +45 -0
- package/dist/pptx/render/font-family-update.d.ts.map +1 -0
- package/dist/pptx/render/format-painter.cjs +6 -6
- package/dist/pptx/render/format-painter.mjs +3 -3
- package/dist/pptx/render/index.d.ts +3 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/inline-selection-utils.d.ts +2 -1
- package/dist/pptx/render/inline-selection-utils.d.ts.map +1 -1
- package/dist/pptx/render/inspector-helpers.cjs +17 -13
- package/dist/pptx/render/inspector-helpers.d.ts +8 -0
- package/dist/pptx/render/inspector-helpers.d.ts.map +1 -1
- package/dist/pptx/render/inspector-helpers.mjs +2 -2
- package/dist/pptx/render/picture-frame.d.ts +20 -0
- package/dist/pptx/render/picture-frame.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-animations-state.cjs +6 -6
- package/dist/pptx/render/ribbon-animations-state.mjs +2 -2
- package/dist/pptx/render/ribbon-galleries/gallery-placements.d.ts +3 -3
- package/dist/pptx/render/ribbon-galleries/gallery-placements.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/table-style-tile-svg.d.ts +21 -6
- package/dist/pptx/render/ribbon-galleries/table-style-tile-svg.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/table-styles-gallery.d.ts +3 -1
- package/dist/pptx/render/ribbon-galleries/table-styles-gallery.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-home-crop.d.ts +37 -0
- package/dist/pptx/render/ribbon-home-crop.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-home-families-objects.d.ts +5 -2
- package/dist/pptx/render/ribbon-home-families-objects.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-home-spec.d.ts +1 -1
- package/dist/pptx/render/ribbon-home-spec.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-home-state-extras.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-home-state.d.ts +1 -0
- package/dist/pptx/render/ribbon-home-state.d.ts.map +1 -1
- package/dist/pptx/render/text-block-style.d.ts.map +1 -1
- package/dist/pptx/render/text-field-substitution.d.ts +12 -0
- package/dist/pptx/render/text-field-substitution.d.ts.map +1 -1
- package/dist/pptx/render/text-style-update.d.ts.map +1 -1
- package/dist/pptx/render/update-text-segment-style.d.ts +7 -1
- package/dist/pptx/render/update-text-segment-style.d.ts.map +1 -1
- package/dist/pptx/web-components/index.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-home-styles.d.ts +1 -1
- package/dist/pptx/web-components/ribbon-home-styles.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-home.d.ts +2 -0
- package/dist/pptx/web-components/ribbon-home.d.ts.map +1 -1
- package/dist/{presentation-preview-HF3GZ2VD.js → presentation-preview-VIIU7E2S.js} +1 -1
- package/dist/teams.js +2 -2
- package/dist/xlsx/dialogs/pivot-values.d.ts +10 -0
- package/dist/xlsx.js +147 -12
- package/package.json +2 -2
- package/dist/pptx/chunk-CENGE3TZ.mjs +0 -10
- package/dist/pptx/chunk-OGJRSAGH.cjs +0 -12
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/pptx/render/font-family-update.ts
|
|
4
|
+
var SCRIPT_FACES = [
|
|
5
|
+
{ face: "eastAsiaFont", token: "eastAsiaFontThemeToken" },
|
|
6
|
+
{ face: "complexScriptFont", token: "complexScriptFontThemeToken" }
|
|
7
|
+
];
|
|
8
|
+
function fontFamilyStyleUpdates(style, updates, inherited) {
|
|
9
|
+
const family = updates.fontFamily;
|
|
10
|
+
if (typeof family !== "string" || family.length === 0) {
|
|
11
|
+
return updates;
|
|
12
|
+
}
|
|
13
|
+
const next = { ...updates };
|
|
14
|
+
if (!("latinFontThemeToken" in updates) && style?.latinFontThemeToken !== void 0) {
|
|
15
|
+
next.latinFontThemeToken = void 0;
|
|
16
|
+
}
|
|
17
|
+
const ownsLatin = style?.fontFamily !== void 0;
|
|
18
|
+
const latinFace = ownsLatin ? style?.fontFamily : inherited?.fontFamily;
|
|
19
|
+
const latinToken = style?.latinFontThemeToken ?? (ownsLatin ? void 0 : inherited?.latinFontThemeToken);
|
|
20
|
+
for (const { face, token } of SCRIPT_FACES) {
|
|
21
|
+
if (face in updates || token in updates) {
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
const current = style?.[face];
|
|
25
|
+
const sameConcreteFace = current !== void 0 && current === latinFace;
|
|
26
|
+
const sameThemeFace = style?.[token] !== void 0 && style?.[token] === latinToken;
|
|
27
|
+
if (!sameConcreteFace && !sameThemeFace) {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
next[face] = family;
|
|
31
|
+
if (style?.[token] !== void 0) {
|
|
32
|
+
next[token] = void 0;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return next;
|
|
36
|
+
}
|
|
37
|
+
function mergeTextStyleUpdate(style, updates, inherited) {
|
|
38
|
+
return { ...style, ...fontFamilyStyleUpdates(style, updates, inherited) };
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// src/pptx/render/update-text-segment-style.ts
|
|
42
|
+
function updateTextSegmentStyle(segment, updates, options = {}) {
|
|
43
|
+
const { inherited } = options;
|
|
44
|
+
return {
|
|
45
|
+
...segment,
|
|
46
|
+
...options.updateBodyStyle === false ? {} : { style: mergeTextStyleUpdate(segment.style, updates, inherited) },
|
|
47
|
+
...segment.paragraphInsertionStyle ? {
|
|
48
|
+
paragraphInsertionStyle: mergeTextStyleUpdate(
|
|
49
|
+
segment.paragraphInsertionStyle,
|
|
50
|
+
updates,
|
|
51
|
+
inherited
|
|
52
|
+
)
|
|
53
|
+
} : {}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
exports.fontFamilyStyleUpdates = fontFamilyStyleUpdates;
|
|
58
|
+
exports.mergeTextStyleUpdate = mergeTextStyleUpdate;
|
|
59
|
+
exports.updateTextSegmentStyle = updateTextSegmentStyle;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// src/pptx/render/font-family-update.ts
|
|
2
|
+
var SCRIPT_FACES = [
|
|
3
|
+
{ face: "eastAsiaFont", token: "eastAsiaFontThemeToken" },
|
|
4
|
+
{ face: "complexScriptFont", token: "complexScriptFontThemeToken" }
|
|
5
|
+
];
|
|
6
|
+
function fontFamilyStyleUpdates(style, updates, inherited) {
|
|
7
|
+
const family = updates.fontFamily;
|
|
8
|
+
if (typeof family !== "string" || family.length === 0) {
|
|
9
|
+
return updates;
|
|
10
|
+
}
|
|
11
|
+
const next = { ...updates };
|
|
12
|
+
if (!("latinFontThemeToken" in updates) && style?.latinFontThemeToken !== void 0) {
|
|
13
|
+
next.latinFontThemeToken = void 0;
|
|
14
|
+
}
|
|
15
|
+
const ownsLatin = style?.fontFamily !== void 0;
|
|
16
|
+
const latinFace = ownsLatin ? style?.fontFamily : inherited?.fontFamily;
|
|
17
|
+
const latinToken = style?.latinFontThemeToken ?? (ownsLatin ? void 0 : inherited?.latinFontThemeToken);
|
|
18
|
+
for (const { face, token } of SCRIPT_FACES) {
|
|
19
|
+
if (face in updates || token in updates) {
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
const current = style?.[face];
|
|
23
|
+
const sameConcreteFace = current !== void 0 && current === latinFace;
|
|
24
|
+
const sameThemeFace = style?.[token] !== void 0 && style?.[token] === latinToken;
|
|
25
|
+
if (!sameConcreteFace && !sameThemeFace) {
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
next[face] = family;
|
|
29
|
+
if (style?.[token] !== void 0) {
|
|
30
|
+
next[token] = void 0;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return next;
|
|
34
|
+
}
|
|
35
|
+
function mergeTextStyleUpdate(style, updates, inherited) {
|
|
36
|
+
return { ...style, ...fontFamilyStyleUpdates(style, updates, inherited) };
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// src/pptx/render/update-text-segment-style.ts
|
|
40
|
+
function updateTextSegmentStyle(segment, updates, options = {}) {
|
|
41
|
+
const { inherited } = options;
|
|
42
|
+
return {
|
|
43
|
+
...segment,
|
|
44
|
+
...options.updateBodyStyle === false ? {} : { style: mergeTextStyleUpdate(segment.style, updates, inherited) },
|
|
45
|
+
...segment.paragraphInsertionStyle ? {
|
|
46
|
+
paragraphInsertionStyle: mergeTextStyleUpdate(
|
|
47
|
+
segment.paragraphInsertionStyle,
|
|
48
|
+
updates,
|
|
49
|
+
inherited
|
|
50
|
+
)
|
|
51
|
+
} : {}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { fontFamilyStyleUpdates, mergeTextStyleUpdate, updateTextSegmentStyle };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkWB25PCHQ_cjs = require('./chunk-WB25PCHQ.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkEYPNQ3FG_cjs = require('./chunk-EYPNQ3FG.cjs');
|
|
5
5
|
var pptx = require('ooxml-core/pptx');
|
|
6
6
|
var bulletToggle = require('ooxml-core/pptx/editor/render/bullet-toggle');
|
|
7
7
|
|
|
@@ -264,25 +264,34 @@ function textStylePatch(el, changes) {
|
|
|
264
264
|
...paragraphs,
|
|
265
265
|
...segments?.some((segment) => segment.paragraphInsertionStyle) ? {
|
|
266
266
|
textSegments: segments.map(
|
|
267
|
-
(segment) =>
|
|
267
|
+
(segment) => chunkEYPNQ3FG_cjs.updateTextSegmentStyle(segment, exclusive, {
|
|
268
|
+
updateBodyStyle: false,
|
|
269
|
+
inherited: base
|
|
270
|
+
})
|
|
268
271
|
)
|
|
269
272
|
} : {},
|
|
270
|
-
textStyle:
|
|
271
|
-
...base,
|
|
272
|
-
...exclusive
|
|
273
|
-
}
|
|
273
|
+
textStyle: chunkEYPNQ3FG_cjs.mergeTextStyleUpdate(base, exclusive)
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
const patch = textStylePatch(el,
|
|
276
|
+
function textRunsPatch(el, updates) {
|
|
277
|
+
const patch = textStylePatch(el, updates);
|
|
278
278
|
if (!pptx.hasTextProperties(el) || !el.textSegments) {
|
|
279
279
|
return patch;
|
|
280
280
|
}
|
|
281
|
+
const inherited = el.textStyle;
|
|
281
282
|
return {
|
|
282
283
|
...patch,
|
|
283
|
-
textSegments: el.textSegments.map(
|
|
284
|
+
textSegments: el.textSegments.map(
|
|
285
|
+
(segment) => chunkEYPNQ3FG_cjs.updateTextSegmentStyle(segment, updates, { inherited })
|
|
286
|
+
)
|
|
284
287
|
};
|
|
285
288
|
}
|
|
289
|
+
function textFontSizePatch(el, fontSize) {
|
|
290
|
+
return textRunsPatch(el, { fontSize });
|
|
291
|
+
}
|
|
292
|
+
function textFontFamilyPatch(el, fontFamily) {
|
|
293
|
+
return textRunsPatch(el, { fontFamily });
|
|
294
|
+
}
|
|
286
295
|
|
|
287
296
|
Object.defineProperty(exports, "DEFAULT_AUTONUM_TYPE", {
|
|
288
297
|
enumerable: true,
|
|
@@ -357,6 +366,7 @@ exports.shapeStylePatch = shapeStylePatch;
|
|
|
357
366
|
exports.splitTextStyleUpdate = splitTextStyleUpdate;
|
|
358
367
|
exports.strokeColorOf = strokeColorOf;
|
|
359
368
|
exports.textColorOf = textColorOf;
|
|
369
|
+
exports.textFontFamilyPatch = textFontFamilyPatch;
|
|
360
370
|
exports.textFontSizePatch = textFontSizePatch;
|
|
361
371
|
exports.textStyleFlagsOf = textStyleFlagsOf;
|
|
362
372
|
exports.textStylePatch = textStylePatch;
|