ooxml-core 1.45.0 → 1.46.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/PptxHandler-FZ43IJFP.mjs +5 -0
- package/dist/{PptxHandler-FXLXIOLT.mjs → PptxHandler-HWEOIHEA.mjs} +2 -2
- package/dist/PptxHandler-XAUKKK36.cjs +14 -0
- package/dist/{PresentationBuilder-CSKLG64K.cjs → PresentationBuilder-2BCCMZW7.cjs} +6 -6
- package/dist/{PresentationBuilder-3FKFRSSV.mjs → PresentationBuilder-66RV4F45.mjs} +2 -2
- package/dist/{PresentationBuilder-DDYHRV26.mjs → PresentationBuilder-AFD72LIG.mjs} +3 -3
- package/dist/automation/index.cjs +12 -7
- package/dist/automation/index.mjs +12 -7
- package/dist/chart/edit/group-options.d.ts +4 -0
- package/dist/chart/edit/group-options.d.ts.map +1 -1
- package/dist/chart/edit/new-chart-minimal.d.ts +13 -0
- package/dist/chart/edit/new-chart-minimal.d.ts.map +1 -0
- package/dist/chart/edit/new-chart.d.ts +34 -1
- package/dist/chart/edit/new-chart.d.ts.map +1 -1
- package/dist/chart/edit/secondary-axis.d.ts +8 -1
- package/dist/chart/edit/secondary-axis.d.ts.map +1 -1
- package/dist/chart/edit/type.d.ts +2 -0
- package/dist/chart/edit/type.d.ts.map +1 -1
- package/dist/chart/index.cjs +414 -263
- package/dist/chart/index.mjs +412 -264
- package/dist/{chunk-3J6VIKLP.cjs → chunk-5TOVSCVT.cjs} +3 -3
- package/dist/{chunk-U5BXJQZG.mjs → chunk-E2TTMUKU.mjs} +225 -38
- package/dist/{chunk-7T3SJQA6.cjs → chunk-E5TGYYKO.cjs} +1 -0
- package/dist/{chunk-VKFKEVHK.mjs → chunk-EI6555OK.mjs} +1 -1
- package/dist/{chunk-R7NS42KQ.mjs → chunk-FKU2Z6ZB.mjs} +1 -1
- package/dist/{chunk-GGJUWJXB.mjs → chunk-G6LEU3Y5.mjs} +1 -1
- package/dist/{chunk-RVYGAYCP.mjs → chunk-H43QQVJU.mjs} +1 -1
- package/dist/{chunk-CVJX6NNO.mjs → chunk-HH3AYM63.mjs} +227 -39
- package/dist/{chunk-YBSNMVSN.cjs → chunk-IBRV3AK3.cjs} +1497 -1309
- package/dist/{chunk-LCXBTJXE.mjs → chunk-L6MJGE3Q.mjs} +4 -4
- package/dist/{chunk-IPV3J3I5.mjs → chunk-LXVE2VKR.mjs} +4 -1
- package/dist/{chunk-QZPOPUI5.cjs → chunk-QUAFASFC.cjs} +4 -0
- package/dist/{chunk-XTUX5RMG.cjs → chunk-T4BVZTII.cjs} +9 -9
- package/dist/{chunk-GXYK3H4O.mjs → chunk-X2DC7XRL.mjs} +17 -16
- package/dist/{chunk-OORQCSVA.mjs → chunk-ZLUHU2SU.mjs} +1 -0
- package/dist/docx/index.cjs +300 -144
- package/dist/docx/index.mjs +300 -144
- package/dist/index.cjs +484 -333
- package/dist/index.mjs +484 -333
- package/dist/pptx/automation/index.cjs +350 -143
- package/dist/pptx/automation/index.d.ts +4 -4
- package/dist/pptx/automation/index.mjs +5 -5
- package/dist/pptx/chunks/{index-6Ot1b-4U.d.ts → index-BPGaFlm5.d.ts} +4 -4
- package/dist/pptx/chunks/{index-6Ot1b-4U.d.ts.map → index-BPGaFlm5.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-jdZUtLGB.d.ts → index-D4-WJQ1r.d.ts} +3 -3
- package/dist/pptx/chunks/{index-jdZUtLGB.d.ts.map → index-D4-WJQ1r.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-DGKI80Hj.d.ts → index-DtFoPmk7.d.ts} +49 -6
- package/dist/pptx/chunks/index-DtFoPmk7.d.ts.map +1 -0
- package/dist/pptx/chunks/{text-operations-Mek86RBL.d.ts → text-operations-CVHXOSit.d.ts} +18 -3
- package/dist/pptx/chunks/{text-operations-Mek86RBL.d.ts.map → text-operations-CVHXOSit.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +307 -100
- package/dist/pptx/cli/index.d.ts +1 -1
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.cjs +1 -0
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-live-patch-target.cjs +4 -4
- package/dist/pptx/editor/render/collaboration-live-patch-target.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-reconcile.cjs +8 -8
- package/dist/pptx/editor/render/collaboration-reconcile.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-sync.cjs +14 -14
- package/dist/pptx/editor/render/collaboration-sync.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-sync.mjs +1 -1
- package/dist/pptx/editor/render/custom-show-operations.cjs +2 -2
- package/dist/pptx/editor/render/custom-show-operations.mjs +1 -1
- package/dist/pptx/editor/render/find-replace.cjs +15 -15
- package/dist/pptx/editor/render/find-replace.d.ts +2 -2
- package/dist/pptx/editor/render/find-replace.mjs +2 -2
- package/dist/pptx/editor/render/slide-operations.cjs +9 -9
- package/dist/pptx/editor/render/slide-operations.mjs +3 -3
- package/dist/pptx/index.cjs +351 -147
- package/dist/pptx/index.d.ts +5 -5
- package/dist/pptx/index.mjs +5 -5
- package/dist/pptx/node/index.d.ts +1 -1
- package/dist/xlsx/index.cjs +12 -7
- package/dist/xlsx/index.mjs +12 -7
- package/dist/xlsx/ui/index.cjs +12 -7
- package/dist/xlsx/ui/index.mjs +12 -7
- package/package.json +1 -1
- package/dist/PptxHandler-3RDVJFQV.cjs +0 -14
- package/dist/PptxHandler-EI6DMHPM.mjs +0 -5
- package/dist/pptx/chunks/index-DGKI80Hj.d.ts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DEFAULT_ROW_HEIGHT_EMU, createDefaultXmlCell, tableCellTextBodyMatches } from './chunk-
|
|
2
|
-
import { NS, RELATIONSHIP_TYPES, SMART_ART_DEFINITION_PARTS, VML_SHAPE_TAGS, isAlternateContentChoiceXmlSupported, parseVmlElement, unwrapAlternateContent, xmlChild, xmlAttr, parseDrawingMediaReference, cropShapeForPresetGeometry, isHeaderFooterPlaceholder, xmlPath, inheritedPlaceholderFieldType, parseParagraphLevel, xmlHasChild, parseParagraphExtraAttributes, parseParagraphMargins, parseAlignmentAttr, parseParagraphRtl, parseTabStops, resolveParagraphAlignment, xmlText, parseBodyPrBooleanAttrs, selectAlternateContentBranch, parseBulletSizePercent, extractColorChoiceXml, themeColorRefFromColorChoice, formatAutoNumberMarker, readText3DValues, cloneXmlObject, readScene3DValues, parseParagraphSpacingPx, parseOoxmlPercent, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, orderedPathCommandEntries, ooxmlArcToSvg, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, nextRelationshipId, remapElementShapeIds, normalizeCustomShowIds, mapCustomShowActions, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, openPptxZip, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, parseRelationships, resolvePartPath, orderedXmlKey, safeResolveZipPath, parseDataUrlToBytes, base64Decode, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, LN_CHILD_ORDER, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, ensureXmlChild, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, serializeTabStop, readCommentMentions, rebaseCommentMentions, applyCommentMentions, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, drawingLineXml, parseDrawingTextBody, parseXml, parseDrawingFill, parseDrawingLine, first, buildXml, setDrawingFillXml, fillElementOf, patchDrawingLine, elements, drawingFillXml, applyChartManualLayout, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, drawingColorXml, applyDiagramRelationshipIds, applyDrawingMediaReference, DIAGRAM_XML_PROLOG, DIAGRAM_DATA_XMLNS, escapeDiagramXml, writeBodyPrBooleanAttrs, applyTextBodySp3d, customGeometryPathsToXml, ensureArrayValue, lookupPresetShape, writeShapeEffects, SHAPE_STYLE_ORDER, CAMERA_PRESETS, LIGHT_RIGS, LIGHT_DIRECTIONS, roundCoordinate, scaleVectorToIntegers, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, restorePathListCommandOrder, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, reorderObjectKeysByLocalName, getSignaturePathsToStrip, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, mergeSmartArtPointXml, mergeSmartArtConnectionXml, withDiagramPictureSources, diagramPictureRelationships, applySmartArtLayoutDefinition, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseDiagramDataModel, DEFAULT_GENERATED_DIAGRAM_SCHEME, previewDiagramLayout, parseDiagramColors, resolveDrawingColor, children, parseDrawingRichTextBody, writeGeneratedDiagramDrawing, descendants, GENERATED_DIAGRAM_CACHE_NS, generatedDrawingDigest, parseChartUserShapesDrawing, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, resolveThemeFillStyle, resolveThemeLineStyle, resolveThemeEffectStyle, relAttr, ensureXmlChildren, TC_PR_BORDERS_ORDER, writeChartColorChoice, relationshipsPartFor, stripParentDirSegments, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, openZip, attr, parseDrawingEffects, drawingEffectsXml, readChartManualLayoutValues, buildEffectDagTreeFromXml, appendInSchemaOrder, RUN_PROPERTIES_ORDER, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, picturePercentage, ARTISTIC_PRIMARY_ATTRIBUTE, fetchUrlToBytes, parseChartWideTextStyle, hasLocalName, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, readPictureEffect,
|
|
1
|
+
import { DEFAULT_ROW_HEIGHT_EMU, createDefaultXmlCell, tableCellTextBodyMatches } from './chunk-EI6555OK.mjs';
|
|
2
|
+
import { NS, RELATIONSHIP_TYPES, SMART_ART_DEFINITION_PARTS, VML_SHAPE_TAGS, isAlternateContentChoiceXmlSupported, parseVmlElement, unwrapAlternateContent, xmlChild, xmlAttr, parseDrawingMediaReference, cropShapeForPresetGeometry, isHeaderFooterPlaceholder, xmlPath, inheritedPlaceholderFieldType, parseParagraphLevel, xmlHasChild, parseParagraphExtraAttributes, parseParagraphMargins, parseAlignmentAttr, parseParagraphRtl, parseTabStops, resolveParagraphAlignment, xmlText, parseBodyPrBooleanAttrs, selectAlternateContentBranch, parseBulletSizePercent, extractColorChoiceXml, themeColorRefFromColorChoice, formatAutoNumberMarker, readText3DValues, cloneXmlObject, readScene3DValues, parseParagraphSpacingPx, parseOoxmlPercent, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, orderedPathCommandEntries, ooxmlArcToSvg, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, nextRelationshipId, remapElementShapeIds, normalizeCustomShowIds, mapCustomShowActions, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, openPptxZip, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, parseRelationships, resolvePartPath, orderedXmlKey, safeResolveZipPath, parseDataUrlToBytes, base64Decode, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, LN_CHILD_ORDER, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, ensureXmlChild, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, ooxmlGradientAngleToCssDegrees, serializeTabStop, readCommentMentions, rebaseCommentMentions, applyCommentMentions, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, drawingLineXml, parseDrawingTextBody, parseXml, parseDrawingFill, parseDrawingLine, first, buildXml, setDrawingFillXml, fillElementOf, patchDrawingLine, elements, drawingFillXml, applyChartManualLayout, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, drawingColorXml, applyDiagramRelationshipIds, applyDrawingMediaReference, DIAGRAM_XML_PROLOG, DIAGRAM_DATA_XMLNS, escapeDiagramXml, writeBodyPrBooleanAttrs, applyTextBodySp3d, customGeometryPathsToXml, ensureArrayValue, lookupPresetShape, writeShapeEffects, SHAPE_STYLE_ORDER, CAMERA_PRESETS, LIGHT_RIGS, LIGHT_DIRECTIONS, roundCoordinate, scaleVectorToIntegers, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, restorePathListCommandOrder, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, reorderObjectKeysByLocalName, getSignaturePathsToStrip, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, mergeSmartArtPointXml, mergeSmartArtConnectionXml, withDiagramPictureSources, diagramPictureRelationships, applySmartArtLayoutDefinition, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseDiagramDataModel, DEFAULT_GENERATED_DIAGRAM_SCHEME, previewDiagramLayout, parseDiagramColors, resolveDrawingColor, children, parseDrawingRichTextBody, writeGeneratedDiagramDrawing, descendants, GENERATED_DIAGRAM_CACHE_NS, generatedDrawingDigest, parseChartUserShapesDrawing, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, resolveThemeFillStyle, resolveThemeLineStyle, resolveThemeEffectStyle, relAttr, ensureXmlChildren, TC_PR_BORDERS_ORDER, writeChartColorChoice, relationshipsPartFor, stripParentDirSegments, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, openZip, attr, parseDrawingEffects, drawingEffectsXml, readChartManualLayoutValues, buildEffectDagTreeFromXml, appendInSchemaOrder, RUN_PROPERTIES_ORDER, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, picturePercentage, ARTISTIC_PRIMARY_ATTRIBUTE, fetchUrlToBytes, parseChartWideTextStyle, hasLocalName, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, readPictureEffect, isAlternateContentChoiceSupported, detectStrictConformance, normalizeStrictXml, relayoutSmartArt, patchDrawingColorIn, themeColorRefToSolidFillWithOpacity, FONT_ADVANCE_TABLES, DEFAULT_FONT_ADVANCE_TABLE, measureTextWidth, applyDrawingColorTransforms, applyThemeToData, detectFileFormat, parseOle2, EncryptedFileError, decryptPptx, encryptPptx, MAX_ZIP_ENTRY_COUNT, DEFAULT_MAX_UNCOMPRESSED_BYTES, encodeXmlAttributeValue, encodeXmlTextValue, cssDegreesToOoxmlGradientAngle, svgToCustomGeometryPaths, IncorrectPasswordError, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, supportsChartGradientFill, DEFAULT_CHART_GRADIENT_ANGLE, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, stripXmlOrderMarkers, normalizeStShapeType, applyCustomShows, applySections, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, backgroundStyleRefIsCurrent, backgroundRefNode, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, xmlAttrBool, detectOleObjectType, inferOleExtensionFromTarget, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, deriveSlideTitles, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, cloneSlide, parseDrawingFraction, scrgbLinearToSrgb8, parseDrawingHueDegrees, hslToRgb, themeColorRefToXml, effectChild, mergeEffectNode, mergeAttributeEffectNode, parseDrawingLineDash, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, estimateMediaDurationMs, parseVmlElements, parseLineSpacingMultiplier, parseLineSpacingExactPt, formatSchemeKey, buildRelationshipsXml, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, guardZip, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, themeColorRefFromSchemeClr, ZipBombError, parseKinsoku, deobfuscateFont, detectFontFormat, parseDataTable, parseChartAxes, parseBubbleChartOptions, extractGuidFromPartName, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, extractCxSeriesColor, parseCxDataLabels, parseCxRegionMapOptions, parseCxAxes, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, parseSmartArtLayoutDefinition, decodeBase64, parseSmartArtPresLayoutVars, parseDrawingColorIn, parseSmartArtConnection, connectionLabel, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, resolveDiagramLayoutCategory, captureDiagramPictures, parseDiagramDrawing, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, collectTransitionText, parseSmartArtQuickStyleLabels, parseDiagramQuickStyle, parseDiagramLayoutSummary, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, blendColorOntoWhite } from './chunk-LXVE2VKR.mjs';
|
|
3
3
|
import { hasShapeProperties, hasTextProperties } from './chunk-GXHKNSZX.mjs';
|
|
4
4
|
import { EMU_PER_PX, EMU_PER_PIXEL, SYSTEM_COLOR_MAP, PRESET_COLOR_MAP, OOXML_PERCENT_UNITS, EMU_PER_POINT } from './chunk-CA7KCNL3.mjs';
|
|
5
5
|
import JSZip2 from 'jszip';
|
|
@@ -375,6 +375,7 @@ var SLIDE_FIELD_KIND = {
|
|
|
375
375
|
backgroundImage: "scalar",
|
|
376
376
|
backgroundImageProperties: "complex",
|
|
377
377
|
backgroundGradient: "scalar",
|
|
378
|
+
backgroundGradientFill: "complex",
|
|
378
379
|
backgroundStyleRef: "complex",
|
|
379
380
|
backgroundPattern: "complex",
|
|
380
381
|
backgroundShadeToTitle: "scalar",
|
|
@@ -5182,7 +5183,15 @@ var PptxSlideBackgroundBuilder = class {
|
|
|
5182
5183
|
init.reportUnsupportedBackground?.(rawBackgroundImage);
|
|
5183
5184
|
}
|
|
5184
5185
|
}
|
|
5185
|
-
if (backgroundProperties["a:blipFill"] === void 0 &&
|
|
5186
|
+
if (backgroundProperties["a:blipFill"] === void 0 && hasBackgroundGradient) {
|
|
5187
|
+
const gradFill2 = init.buildBackgroundGradientFill?.();
|
|
5188
|
+
if (gradFill2) {
|
|
5189
|
+
backgroundProperties["a:gradFill"] = gradFill2;
|
|
5190
|
+
} else if (!hasBackgroundColor && !hasBackgroundImage) {
|
|
5191
|
+
init.reportUnsupportedGradient?.();
|
|
5192
|
+
}
|
|
5193
|
+
}
|
|
5194
|
+
if (backgroundProperties["a:blipFill"] === void 0 && backgroundProperties["a:gradFill"] === void 0 && hasBackgroundColor && init.slide.backgroundColor) {
|
|
5186
5195
|
backgroundProperties["a:solidFill"] = {
|
|
5187
5196
|
"a:srgbClr": {
|
|
5188
5197
|
"@_val": init.slide.backgroundColor.replace("#", "").toUpperCase()
|
|
@@ -9844,8 +9853,8 @@ function decodeAinkInk(inkRoot) {
|
|
|
9844
9853
|
if (raw2.length === 0) {
|
|
9845
9854
|
return 2;
|
|
9846
9855
|
}
|
|
9847
|
-
const
|
|
9848
|
-
return Number.isFinite(
|
|
9856
|
+
const num3 = Number(raw2);
|
|
9857
|
+
return Number.isFinite(num3) && num3 > 0 ? num3 : 2;
|
|
9849
9858
|
})();
|
|
9850
9859
|
const traces = ensureArrayLike3(inkRoot["aink:trace"]);
|
|
9851
9860
|
for (const trace of traces) {
|
|
@@ -11868,9 +11877,9 @@ async function ensureCustomPropertiesPackagingArtifacts(context) {
|
|
|
11868
11877
|
let maxId = 0;
|
|
11869
11878
|
for (const rel of rels) {
|
|
11870
11879
|
const id = String(rel?.["@_Id"] || "");
|
|
11871
|
-
const
|
|
11872
|
-
if (Number.isFinite(
|
|
11873
|
-
maxId =
|
|
11880
|
+
const num3 = Number.parseInt(id.replace(/^rId/, ""), 10);
|
|
11881
|
+
if (Number.isFinite(num3) && num3 > maxId) {
|
|
11882
|
+
maxId = num3;
|
|
11874
11883
|
}
|
|
11875
11884
|
}
|
|
11876
11885
|
rels.push({
|
|
@@ -11940,11 +11949,11 @@ var PptxDocumentPropertiesUpdater = class {
|
|
|
11940
11949
|
this.context = context;
|
|
11941
11950
|
}
|
|
11942
11951
|
async updateOnSave(slides, options2) {
|
|
11943
|
-
await this.updateCoreProperties(options2?.coreProperties);
|
|
11952
|
+
await this.updateCoreProperties(options2?.coreProperties, options2?.fixedDate);
|
|
11944
11953
|
await this.updateAppProperties(slides, options2?.appProperties);
|
|
11945
11954
|
await this.updateCustomProperties(options2?.customProperties);
|
|
11946
11955
|
}
|
|
11947
|
-
async updateCoreProperties(overrides) {
|
|
11956
|
+
async updateCoreProperties(overrides, fixedDate) {
|
|
11948
11957
|
const coreFile = this.context.zip.file("docProps/core.xml");
|
|
11949
11958
|
if (!coreFile) {
|
|
11950
11959
|
return;
|
|
@@ -11953,7 +11962,12 @@ var PptxDocumentPropertiesUpdater = class {
|
|
|
11953
11962
|
const coreXml = await coreFile.async("string");
|
|
11954
11963
|
const core = applyCoreOverrides(parseCoreProperties(coreXml), overrides);
|
|
11955
11964
|
const revision = Number.parseInt(core.revision?.trim() ?? "", 10);
|
|
11956
|
-
const next = {
|
|
11965
|
+
const next = fixedDate ? {
|
|
11966
|
+
...core,
|
|
11967
|
+
revision: overrides?.revision ?? "1",
|
|
11968
|
+
created: overrides?.created ?? formatW3cdtf(fixedDate),
|
|
11969
|
+
modified: overrides?.modified ?? formatW3cdtf(fixedDate)
|
|
11970
|
+
} : {
|
|
11957
11971
|
...core,
|
|
11958
11972
|
revision: String(Number.isFinite(revision) && revision >= 0 ? revision + 1 : 1),
|
|
11959
11973
|
modified: formatW3cdtf(/* @__PURE__ */ new Date())
|
|
@@ -42484,7 +42498,7 @@ var SWITCHABLE = {
|
|
|
42484
42498
|
stock: false,
|
|
42485
42499
|
surface: true
|
|
42486
42500
|
};
|
|
42487
|
-
function
|
|
42501
|
+
function chartGroupElement(kind, is3D) {
|
|
42488
42502
|
const match = Object.entries(CHART_GROUP_ELEMENTS).find(
|
|
42489
42503
|
([, value]) => value.kind === kind && value.is3D === is3D
|
|
42490
42504
|
);
|
|
@@ -42500,7 +42514,7 @@ function groupingFor(element2, grouping) {
|
|
|
42500
42514
|
var horizontalBars = (group) => group.kind === "bar" && group.barDirection === "bar";
|
|
42501
42515
|
function newGroup(base, target, series) {
|
|
42502
42516
|
const is3D = target.is3D ?? (base.is3D && SWITCHABLE[target.kind] === true);
|
|
42503
|
-
const element2 =
|
|
42517
|
+
const element2 = chartGroupElement(target.kind, is3D);
|
|
42504
42518
|
const group = { kind: target.kind, element: element2, is3D, series, axisIds: [] };
|
|
42505
42519
|
const allowed = GROUP_FIELDS[element2] ?? [];
|
|
42506
42520
|
for (const key2 of allowed)
|
|
@@ -42675,6 +42689,11 @@ var RANGES = {
|
|
|
42675
42689
|
firstSliceAngle: [0, 360],
|
|
42676
42690
|
holeSize: [1, 90]
|
|
42677
42691
|
};
|
|
42692
|
+
function assertChartGroupOption(key2, value) {
|
|
42693
|
+
const [min, max] = RANGES[key2];
|
|
42694
|
+
if (!Number.isInteger(value) || value < min || value > max)
|
|
42695
|
+
throw new RangeError(`Chart ${key2} must be a whole number from ${min} to ${max}`);
|
|
42696
|
+
}
|
|
42678
42697
|
function setChartGroupOptions(space, seriesIndex, edit) {
|
|
42679
42698
|
return editChartSpace(space, (draft) => {
|
|
42680
42699
|
const { group } = chartSeriesEntryAt(draft, seriesIndex);
|
|
@@ -42687,9 +42706,7 @@ function setChartGroupOptions(space, seriesIndex, edit) {
|
|
|
42687
42706
|
delete group[key2];
|
|
42688
42707
|
continue;
|
|
42689
42708
|
}
|
|
42690
|
-
|
|
42691
|
-
if (!Number.isInteger(value) || value < min || value > max)
|
|
42692
|
-
throw new RangeError(`Chart ${key2} must be a whole number from ${min} to ${max}`);
|
|
42709
|
+
assertChartGroupOption(key2, value);
|
|
42693
42710
|
group[key2] = value;
|
|
42694
42711
|
}
|
|
42695
42712
|
});
|
|
@@ -54731,6 +54748,43 @@ function applyCommonViewContainer(root, name, props) {
|
|
|
54731
54748
|
root[key2] = container;
|
|
54732
54749
|
}
|
|
54733
54750
|
|
|
54751
|
+
// pptx/core/utils/slide-background-gradient.ts
|
|
54752
|
+
var num2 = (value) => String(Number(value.toFixed(3)));
|
|
54753
|
+
function cssColor(color3, opacity2) {
|
|
54754
|
+
if (opacity2 === void 0 || opacity2 >= 1) {
|
|
54755
|
+
return color3;
|
|
54756
|
+
}
|
|
54757
|
+
const hex3 = color3.replace("#", "");
|
|
54758
|
+
const channel = (index) => Number.parseInt(hex3.slice(index, index + 2), 16);
|
|
54759
|
+
return `rgba(${channel(0)}, ${channel(2)}, ${channel(4)}, ${num2(opacity2)})`;
|
|
54760
|
+
}
|
|
54761
|
+
function slideBackgroundGradientCss(gradient) {
|
|
54762
|
+
const stops = (gradient.fillGradientStops ?? []).map((stop) => `${cssColor(stop.color, stop.opacity)} ${num2(stop.position)}%`).join(", ");
|
|
54763
|
+
if (gradient.fillGradientType !== "radial") {
|
|
54764
|
+
const angle = ooxmlGradientAngleToCssDegrees(gradient.fillGradientAngle ?? 0);
|
|
54765
|
+
return `linear-gradient(${num2(angle)}deg, ${stops})`;
|
|
54766
|
+
}
|
|
54767
|
+
const focus = gradient.fillGradientFillToRect;
|
|
54768
|
+
const cx = focus ? (focus.l + (1 - focus.r)) / 2 * 100 : 50;
|
|
54769
|
+
const cy = focus ? (focus.t + (1 - focus.b)) / 2 * 100 : 50;
|
|
54770
|
+
const at = `at ${num2(cx)}% ${num2(cy)}%`;
|
|
54771
|
+
switch (gradient.fillGradientPathType) {
|
|
54772
|
+
case "rect":
|
|
54773
|
+
return `radial-gradient(${num2(Math.max(cx, 100 - cx))}% ${num2(Math.max(cy, 100 - cy))}% ${at}, ${stops})`;
|
|
54774
|
+
case "shape":
|
|
54775
|
+
return `radial-gradient(farthest-side ${at}, ${stops})`;
|
|
54776
|
+
default:
|
|
54777
|
+
return `radial-gradient(circle ${at}, ${stops})`;
|
|
54778
|
+
}
|
|
54779
|
+
}
|
|
54780
|
+
function slideBackgroundGradientToWrite(slide) {
|
|
54781
|
+
const gradient = slide.backgroundGradientFill;
|
|
54782
|
+
if (!gradient || !slide.backgroundGradient) {
|
|
54783
|
+
return void 0;
|
|
54784
|
+
}
|
|
54785
|
+
return slide.backgroundGradient === slideBackgroundGradientCss(gradient) ? gradient : void 0;
|
|
54786
|
+
}
|
|
54787
|
+
|
|
54734
54788
|
// pptx/core/core/runtime/chart-part-registration.ts
|
|
54735
54789
|
var CHART_GRAPHIC_DATA_URI = "http://schemas.openxmlformats.org/drawingml/2006/chart";
|
|
54736
54790
|
var CHART_EX_GRAPHIC_DATA_URI = "http://schemas.microsoft.com/office/drawing/2014/chartex";
|
|
@@ -56359,8 +56413,8 @@ function authoredValue(node) {
|
|
|
56359
56413
|
return void 0;
|
|
56360
56414
|
}
|
|
56361
56415
|
const raw2 = node["@_val"];
|
|
56362
|
-
const
|
|
56363
|
-
return Number.isFinite(
|
|
56416
|
+
const num3 = raw2 === void 0 || raw2 === null || raw2 === "" ? NaN : Number.parseFloat(String(raw2));
|
|
56417
|
+
return Number.isFinite(num3) ? num3 : void 0;
|
|
56364
56418
|
}
|
|
56365
56419
|
function applyChartGroupOptionsToXml(container, containerLocal, chartData, getLocalName2) {
|
|
56366
56420
|
let changed = false;
|
|
@@ -68917,11 +68971,31 @@ var PptxHandlerRuntime15 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
|
|
|
68917
68971
|
* default) is correct at depth 0. See `group-xfrm-preservation.ts`'s
|
|
68918
68972
|
* module doc for why a nested group must not re-derive this itself.
|
|
68919
68973
|
*/
|
|
68974
|
+
/**
|
|
68975
|
+
* `PptxHandlerSaveOptions.fixedDate` of the save in progress: set, the save
|
|
68976
|
+
* mints reproducible ids and names (new table columns' `a16:colId`, the
|
|
68977
|
+
* fallback name of a new group) instead of random or time-based ones.
|
|
68978
|
+
*/
|
|
68979
|
+
saveFixedDate;
|
|
68980
|
+
/**
|
|
68981
|
+
* The `p:cNvPr/@name` of a group with neither a name nor one from its
|
|
68982
|
+
* file: its element id, or for a reproducible save (`fixedDate`), which
|
|
68983
|
+
* must not depend on the time-based ids of elements made in code,
|
|
68984
|
+
* `Group <shape id>` as PowerPoint names groups.
|
|
68985
|
+
*/
|
|
68986
|
+
groupFallbackName(group) {
|
|
68987
|
+
return this.saveFixedDate ? `Group ${group.shapeId ?? ""}`.trim() : group.id;
|
|
68988
|
+
}
|
|
68920
68989
|
buildGroupShapeXml(group, ctx, ownEmuOverride) {
|
|
68921
68990
|
if (group.rawXml && group.children.length === 0) {
|
|
68922
68991
|
return {
|
|
68923
68992
|
...group.rawXml,
|
|
68924
|
-
"p:nvGrpSpPr": buildGroupNonVisualXml(
|
|
68993
|
+
"p:nvGrpSpPr": buildGroupNonVisualXml(
|
|
68994
|
+
group.rawXml,
|
|
68995
|
+
group.name,
|
|
68996
|
+
this.groupFallbackName(group),
|
|
68997
|
+
group.shapeId
|
|
68998
|
+
)
|
|
68925
68999
|
};
|
|
68926
69000
|
}
|
|
68927
69001
|
const EMU = _PptxHandlerRuntime.EMU_PER_PX;
|
|
@@ -68930,7 +69004,12 @@ var PptxHandlerRuntime15 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
|
|
|
68930
69004
|
const xfrm = buildGroupTransformXml(group, EMU, ownEmuOverride, rewrap);
|
|
68931
69005
|
const childSpace = group;
|
|
68932
69006
|
const grpXml2 = {
|
|
68933
|
-
"p:nvGrpSpPr": buildGroupNonVisualXml(
|
|
69007
|
+
"p:nvGrpSpPr": buildGroupNonVisualXml(
|
|
69008
|
+
rawGroupXml,
|
|
69009
|
+
group.name,
|
|
69010
|
+
this.groupFallbackName(group),
|
|
69011
|
+
group.shapeId
|
|
69012
|
+
),
|
|
68934
69013
|
"p:grpSpPr": buildGroupPropertiesXml(rawGroupXml, xfrm)
|
|
68935
69014
|
};
|
|
68936
69015
|
const rawExtLst = rawGroupXml?.["p:extLst"];
|
|
@@ -71738,7 +71817,15 @@ function slideContainsA16Element(node) {
|
|
|
71738
71817
|
function randomColumnId() {
|
|
71739
71818
|
return String(Math.floor(Math.random() * 4294967295));
|
|
71740
71819
|
}
|
|
71741
|
-
function
|
|
71820
|
+
function deterministicColumnId(index) {
|
|
71821
|
+
let hash2 = 2166136261;
|
|
71822
|
+
for (const ch of `a16:colId:${index}`) {
|
|
71823
|
+
hash2 ^= ch.charCodeAt(0);
|
|
71824
|
+
hash2 = Math.imul(hash2, 16777619) >>> 0;
|
|
71825
|
+
}
|
|
71826
|
+
return String(hash2);
|
|
71827
|
+
}
|
|
71828
|
+
function rebuildTableXmlFromData(tbl, tableData, emuPerPx, ensureArrayFn, newColumnId = randomColumnId) {
|
|
71742
71829
|
const existingXmlRows = ensureArrayFn(tbl["a:tr"]);
|
|
71743
71830
|
const existingGridCols = ensureArrayFn(
|
|
71744
71831
|
tbl["a:tblGrid"]?.["a:gridCol"]
|
|
@@ -71769,7 +71856,7 @@ function rebuildTableXmlFromData(tbl, tableData, emuPerPx, ensureArrayFn) {
|
|
|
71769
71856
|
// `ensureA16NamespaceOnSlideRoot`; emitting it here too is
|
|
71770
71857
|
// schema-redundant and PowerPoint flags it.
|
|
71771
71858
|
"a16:colId": {
|
|
71772
|
-
"@_val": existingColIds[i] ||
|
|
71859
|
+
"@_val": existingColIds[i] || newColumnId(i)
|
|
71773
71860
|
}
|
|
71774
71861
|
}
|
|
71775
71862
|
}
|
|
@@ -72020,7 +72107,8 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
72020
72107
|
tbl,
|
|
72021
72108
|
tableData,
|
|
72022
72109
|
_PptxHandlerRuntime.EMU_PER_PX,
|
|
72023
|
-
this.ensureArray.bind(this)
|
|
72110
|
+
this.ensureArray.bind(this),
|
|
72111
|
+
this.saveFixedDate ? deterministicColumnId : void 0
|
|
72024
72112
|
);
|
|
72025
72113
|
const rebuiltRows = this.ensureArray(tbl["a:tr"]);
|
|
72026
72114
|
for (let rIdx = 0; rIdx < tableData.rows.length; rIdx++) {
|
|
@@ -74555,9 +74643,9 @@ var PptxHandlerRuntime25 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
74555
74643
|
let maxId = 0;
|
|
74556
74644
|
for (const rel of relationships2) {
|
|
74557
74645
|
const id = String(rel?.["@_Id"] || "");
|
|
74558
|
-
const
|
|
74559
|
-
if (Number.isFinite(
|
|
74560
|
-
maxId =
|
|
74646
|
+
const num3 = parseInt(id.replace(/^rId/u, ""), 10);
|
|
74647
|
+
if (Number.isFinite(num3) && num3 > maxId) {
|
|
74648
|
+
maxId = num3;
|
|
74561
74649
|
}
|
|
74562
74650
|
}
|
|
74563
74651
|
const existingFontTargets = /* @__PURE__ */ new Set();
|
|
@@ -74700,9 +74788,9 @@ var PptxHandlerRuntime25 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
74700
74788
|
let maxId = 0;
|
|
74701
74789
|
for (const rel of relationships2) {
|
|
74702
74790
|
const id = String(rel?.["@_Id"] || "");
|
|
74703
|
-
const
|
|
74704
|
-
if (Number.isFinite(
|
|
74705
|
-
maxId =
|
|
74791
|
+
const num3 = parseInt(id.replace(/^rId/u, ""), 10);
|
|
74792
|
+
if (Number.isFinite(num3) && num3 > maxId) {
|
|
74793
|
+
maxId = num3;
|
|
74706
74794
|
}
|
|
74707
74795
|
}
|
|
74708
74796
|
relationships2.push({
|
|
@@ -79047,6 +79135,16 @@ var PptxHandlerRuntime42 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
|
|
|
79047
79135
|
message: `Slide background image could not be embedded and was preserved as-is or omitted: ${imageUrl.slice(0, 120)}`,
|
|
79048
79136
|
scope: "save",
|
|
79049
79137
|
slideId: slide.id
|
|
79138
|
+
}),
|
|
79139
|
+
buildBackgroundGradientFill: () => {
|
|
79140
|
+
const gradient = slideBackgroundGradientToWrite(slide);
|
|
79141
|
+
return gradient ? this.buildGradientFillXml({ fillMode: "gradient", ...gradient }) : void 0;
|
|
79142
|
+
},
|
|
79143
|
+
reportUnsupportedGradient: () => this.compatibilityService.reportWarning({
|
|
79144
|
+
code: "SAVE_BACKGROUND_GRADIENT_UNSUPPORTED",
|
|
79145
|
+
message: "Slide background gradient has no structured form (backgroundGradientFill) matching its CSS gradient and could not be written; the slide was saved without a background of its own.",
|
|
79146
|
+
scope: "save",
|
|
79147
|
+
slideId: slide.id
|
|
79050
79148
|
})
|
|
79051
79149
|
});
|
|
79052
79150
|
this.slideCommentPartWriter.writeComments({
|
|
@@ -81291,6 +81389,7 @@ var PptxHandlerRuntime54 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
81291
81389
|
/** One save, with the package to itself; callers go through {@link save}. */
|
|
81292
81390
|
async saveNow(slides, options2) {
|
|
81293
81391
|
validateSlideGeometry(slides);
|
|
81392
|
+
this.saveFixedDate = validFixedDate(options2?.fixedDate);
|
|
81294
81393
|
const templates = [
|
|
81295
81394
|
...options2?.slideMasters ?? [],
|
|
81296
81395
|
...options2?.slideLayouts ?? [],
|
|
@@ -81481,7 +81580,8 @@ var PptxHandlerRuntime54 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
81481
81580
|
await this.documentPropertiesUpdater.updateOnSave(slides, {
|
|
81482
81581
|
coreProperties: options2?.coreProperties,
|
|
81483
81582
|
appProperties: options2?.appProperties,
|
|
81484
|
-
customProperties: options2?.customProperties
|
|
81583
|
+
customProperties: options2?.customProperties,
|
|
81584
|
+
fixedDate: this.saveFixedDate
|
|
81485
81585
|
});
|
|
81486
81586
|
await this.applyTagCollectionChanges(options2?.tags);
|
|
81487
81587
|
await this.applyNotesMasterChanges(options2?.notesMaster);
|
|
@@ -81525,6 +81625,11 @@ var PptxHandlerRuntime54 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
81525
81625
|
delete this.zip.files[name];
|
|
81526
81626
|
}
|
|
81527
81627
|
}
|
|
81628
|
+
if (this.saveFixedDate) {
|
|
81629
|
+
for (const file of Object.values(this.zip.files)) {
|
|
81630
|
+
file.date = this.saveFixedDate;
|
|
81631
|
+
}
|
|
81632
|
+
}
|
|
81528
81633
|
return await this.zip.generateAsync({
|
|
81529
81634
|
type: "uint8array",
|
|
81530
81635
|
compression: "DEFLATE",
|
|
@@ -81609,6 +81714,15 @@ var PptxHandlerRuntime54 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
81609
81714
|
this.zip.file(relsPath2, this.builder.build(relsData));
|
|
81610
81715
|
}
|
|
81611
81716
|
};
|
|
81717
|
+
function validFixedDate(date) {
|
|
81718
|
+
if (date === void 0) {
|
|
81719
|
+
return void 0;
|
|
81720
|
+
}
|
|
81721
|
+
if (!(date instanceof Date) || Number.isNaN(date.getTime())) {
|
|
81722
|
+
throw new RangeError("PptxHandlerSaveOptions.fixedDate must be a valid Date");
|
|
81723
|
+
}
|
|
81724
|
+
return date;
|
|
81725
|
+
}
|
|
81612
81726
|
|
|
81613
81727
|
// pptx/core/core/runtime/PptxHandlerRuntimeElementParsing.ts
|
|
81614
81728
|
var SPECIAL_PLACEHOLDER_TYPES = /* @__PURE__ */ new Set(["dt", "ftr", "hdr", "sldnum"]);
|
|
@@ -91070,8 +91184,8 @@ function parseNumberVal(node) {
|
|
|
91070
91184
|
if (raw2 === void 0 || raw2 === null || raw2 === "") {
|
|
91071
91185
|
return void 0;
|
|
91072
91186
|
}
|
|
91073
|
-
const
|
|
91074
|
-
return Number.isFinite(
|
|
91187
|
+
const num3 = Number.parseFloat(String(raw2));
|
|
91188
|
+
return Number.isFinite(num3) ? num3 : void 0;
|
|
91075
91189
|
}
|
|
91076
91190
|
var PptxHandlerRuntime93 = class extends PptxHandlerRuntime92 {
|
|
91077
91191
|
/**
|
|
@@ -93538,12 +93652,12 @@ var PptxHandlerRuntime103 = class extends PptxHandlerRuntime102 {
|
|
|
93538
93652
|
* in-memory format schemes of the masters on those parts and, when the deck's part is among
|
|
93539
93653
|
* them, the deck's.
|
|
93540
93654
|
*/
|
|
93541
|
-
async writeFormatScheme(
|
|
93655
|
+
async writeFormatScheme(elementFor, themePaths) {
|
|
93542
93656
|
const deckBefore = this.getThemeFormatScheme();
|
|
93543
93657
|
const replaced = /* @__PURE__ */ new Map();
|
|
93544
93658
|
const schemes = /* @__PURE__ */ new Map();
|
|
93545
93659
|
const written = await this.rewriteThemeParts(themePaths, (data, path3) => {
|
|
93546
|
-
const element2 =
|
|
93660
|
+
const element2 = elementFor(path3);
|
|
93547
93661
|
const elements2 = data["a:theme"]?.["a:themeElements"];
|
|
93548
93662
|
if (!element2 || !elements2) {
|
|
93549
93663
|
return false;
|
|
@@ -93581,7 +93695,7 @@ var PptxHandlerRuntime103 = class extends PptxHandlerRuntime102 {
|
|
|
93581
93695
|
this.themeFormatScheme = deck;
|
|
93582
93696
|
this.heldFormatSchemes.holdParts(
|
|
93583
93697
|
deck,
|
|
93584
|
-
new Map(written.map((path3) => [path3,
|
|
93698
|
+
new Map(written.map((path3) => [path3, elementFor(path3)]))
|
|
93585
93699
|
);
|
|
93586
93700
|
}
|
|
93587
93701
|
return this.getThemeFormatScheme();
|
|
@@ -97641,6 +97755,80 @@ var PptxHandler = class extends PptxHandlerCore {
|
|
|
97641
97755
|
}
|
|
97642
97756
|
};
|
|
97643
97757
|
|
|
97758
|
+
// pptx/core/builders/sdk/background-gradient-input.ts
|
|
97759
|
+
var HEX = /^#?[0-9a-f]{6}$/iu;
|
|
97760
|
+
var PATHS = /* @__PURE__ */ new Set(["circle", "rect", "shape"]);
|
|
97761
|
+
var WHERE = "BackgroundInput";
|
|
97762
|
+
function finite3(name, value, min, max) {
|
|
97763
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
97764
|
+
throw new RangeError(`${WHERE}.${name} must be a finite number, got ${String(value)}`);
|
|
97765
|
+
}
|
|
97766
|
+
if (min !== void 0 && value < min || max !== void 0 && value > max) {
|
|
97767
|
+
throw new RangeError(`${WHERE}.${name} must be between ${min} and ${max}, got ${value}`);
|
|
97768
|
+
}
|
|
97769
|
+
return value;
|
|
97770
|
+
}
|
|
97771
|
+
function stopsOf(input) {
|
|
97772
|
+
if (!Array.isArray(input.stops) || input.stops.length < 2) {
|
|
97773
|
+
throw new RangeError(`${WHERE}.stops needs at least two stops (a:gsLst)`);
|
|
97774
|
+
}
|
|
97775
|
+
return input.stops.map((stop, index) => {
|
|
97776
|
+
if (typeof stop.color !== "string" || !HEX.test(stop.color)) {
|
|
97777
|
+
throw new RangeError(
|
|
97778
|
+
`${WHERE}.stops[${index}].color must be #RRGGBB, got ${String(stop.color)}`
|
|
97779
|
+
);
|
|
97780
|
+
}
|
|
97781
|
+
const position3 = finite3(`stops[${index}].position`, stop.position, 0, 1);
|
|
97782
|
+
const opacity2 = stop.opacity === void 0 ? void 0 : finite3(`stops[${index}].opacity`, stop.opacity, 0, 1);
|
|
97783
|
+
return {
|
|
97784
|
+
color: `#${stop.color.replace("#", "").toUpperCase()}`,
|
|
97785
|
+
// The shape gradient model keeps positions in percent.
|
|
97786
|
+
position: position3 * 100,
|
|
97787
|
+
...opacity2 !== void 0 ? { opacity: opacity2 } : {}
|
|
97788
|
+
};
|
|
97789
|
+
});
|
|
97790
|
+
}
|
|
97791
|
+
function mapBackgroundGradientInput(input) {
|
|
97792
|
+
const fillGradientStops = stopsOf(input);
|
|
97793
|
+
let gradient;
|
|
97794
|
+
if (input.path !== void 0) {
|
|
97795
|
+
if (!PATHS.has(input.path)) {
|
|
97796
|
+
throw new RangeError(
|
|
97797
|
+
`${WHERE}.path must be circle, rect or shape, got ${String(input.path)}`
|
|
97798
|
+
);
|
|
97799
|
+
}
|
|
97800
|
+
if (input.angle !== void 0) {
|
|
97801
|
+
throw new RangeError(`${WHERE}.angle applies to a linear gradient, not a path one`);
|
|
97802
|
+
}
|
|
97803
|
+
const focus = input.focus ?? { l: 0.5, t: 0.5, r: 0.5, b: 0.5 };
|
|
97804
|
+
gradient = {
|
|
97805
|
+
fillGradientType: "radial",
|
|
97806
|
+
fillGradientPathType: input.path,
|
|
97807
|
+
fillGradientStops,
|
|
97808
|
+
fillGradientFillToRect: {
|
|
97809
|
+
l: finite3("focus.l", focus.l),
|
|
97810
|
+
t: finite3("focus.t", focus.t),
|
|
97811
|
+
r: finite3("focus.r", focus.r),
|
|
97812
|
+
b: finite3("focus.b", focus.b)
|
|
97813
|
+
}
|
|
97814
|
+
};
|
|
97815
|
+
} else {
|
|
97816
|
+
if (input.focus !== void 0) {
|
|
97817
|
+
throw new RangeError(`${WHERE}.focus needs a path gradient`);
|
|
97818
|
+
}
|
|
97819
|
+
const cssAngle = finite3("angle", input.angle ?? 180);
|
|
97820
|
+
gradient = {
|
|
97821
|
+
fillGradientType: "linear",
|
|
97822
|
+
fillGradientAngle: cssDegreesToOoxmlGradientAngle(cssAngle),
|
|
97823
|
+
fillGradientStops
|
|
97824
|
+
};
|
|
97825
|
+
}
|
|
97826
|
+
return {
|
|
97827
|
+
backgroundGradient: slideBackgroundGradientCss(gradient),
|
|
97828
|
+
backgroundGradientFill: gradient
|
|
97829
|
+
};
|
|
97830
|
+
}
|
|
97831
|
+
|
|
97644
97832
|
// pptx/core/builders/sdk/chart-gradient-input.ts
|
|
97645
97833
|
var HEX_COLOR2 = /^#?[0-9a-f]{6}$/iu;
|
|
97646
97834
|
var FULL_TURN = 360;
|
|
@@ -98812,12 +99000,12 @@ var SlideBuilder = class {
|
|
|
98812
99000
|
switch (bg.type) {
|
|
98813
99001
|
case "solid":
|
|
98814
99002
|
this.slide.backgroundColor = bg.color;
|
|
99003
|
+
delete this.slide.backgroundGradient;
|
|
99004
|
+
delete this.slide.backgroundGradientFill;
|
|
98815
99005
|
break;
|
|
98816
|
-
case "gradient":
|
|
98817
|
-
|
|
98818
|
-
this.slide.backgroundGradient = `linear-gradient(${bg.angle ?? 180}deg, ${stops})`;
|
|
99006
|
+
case "gradient":
|
|
99007
|
+
Object.assign(this.slide, mapBackgroundGradientInput(bg));
|
|
98819
99008
|
break;
|
|
98820
|
-
}
|
|
98821
99009
|
case "image":
|
|
98822
99010
|
this.slide.backgroundImage = bg.source;
|
|
98823
99011
|
break;
|