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,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkQUAFASFC_cjs = require('./chunk-QUAFASFC.cjs');
|
|
4
4
|
var chunk5W2QL4SB_cjs = require('./chunk-5W2QL4SB.cjs');
|
|
5
5
|
|
|
6
6
|
// pptx/core/core/runtime/table-structural-helpers.ts
|
|
@@ -44,10 +44,10 @@ function flattenCellTxBodyText(txBody, ensureArray2) {
|
|
|
44
44
|
const fields = ensureArray2(paragraph?.["a:fld"]);
|
|
45
45
|
let lineText = "";
|
|
46
46
|
for (const run of runs) {
|
|
47
|
-
lineText +=
|
|
47
|
+
lineText += chunkQUAFASFC_cjs.xmlText(run?.["a:t"]) ?? "";
|
|
48
48
|
}
|
|
49
49
|
for (const field of fields) {
|
|
50
|
-
lineText +=
|
|
50
|
+
lineText += chunkQUAFASFC_cjs.xmlText(field?.["a:t"]) ?? "";
|
|
51
51
|
}
|
|
52
52
|
lines.push(lineText);
|
|
53
53
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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, formatAutoNumberMarker, readText3DValues, readScene3DValues, parseParagraphSpacingPx, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseStructuredCustomGeometry, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, evaluateGeometryPaths, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, nextRelationshipId, remapElementShapeIds, normalizeCustomShowIds, mapCustomShowActions, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, parseRelationships, resolvePartPath, orderedXmlKey, safeResolveZipPath, parseDataUrlToBytes, base64Decode, EMU_PER_PX, 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, hasShapeProperties, ensureXmlChild, hasTextProperties, 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, chartTrendlineType, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, drawingColorXml, applyDiagramRelationshipIds, buildSaveTimeCustomGeometryXml, applyCustomGeometryGuideOverrides, avLstForPreset, filterValidShapeAdjustmentEntries, applyDrawingMediaReference, DIAGRAM_XML_PROLOG, DIAGRAM_DATA_XMLNS, escapeDiagramXml, writeBodyPrBooleanAttrs, applyTextBodySp3d, writeShapeEffects, SHAPE_STYLE_ORDER, CAMERA_PRESETS, LIGHT_RIGS, LIGHT_DIRECTIONS, roundCoordinate, scaleVectorToIntegers, EMU_PER_PIXEL, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, reorderObjectKeysByLocalName, getSignaturePathsToStrip, mergeSmartArtPointXml, mergeSmartArtConnectionXml, withDiagramPictureSources, diagramPictureRelationships, 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, parseChartFormulaRange, expandRangeAddresses, applyCellWritesToWorksheet, formatCellAddress, childrenNamed, childNamed, parseCellAddress, attr, parseDrawingEffects, drawingEffectsXml, readChartManualLayoutValues, worksheetData, buildEffectDagTreeFromXml, appendInSchemaOrder, RUN_PROPERTIES_ORDER, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, picturePercentage, ARTISTIC_PRIMARY_ATTRIBUTE, fetchUrlToBytes, parseChartWideTextStyle, hasLocalName, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, blobUrlToDataUrl, readPictureEffect,
|
|
1
|
+
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, formatAutoNumberMarker, readText3DValues, readScene3DValues, parseParagraphSpacingPx, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseStructuredCustomGeometry, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, evaluateGeometryPaths, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, nextRelationshipId, remapElementShapeIds, normalizeCustomShowIds, mapCustomShowActions, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, parseRelationships, resolvePartPath, orderedXmlKey, safeResolveZipPath, parseDataUrlToBytes, base64Decode, EMU_PER_PX, 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, hasShapeProperties, ensureXmlChild, hasTextProperties, 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, chartTrendlineType, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, drawingColorXml, applyDiagramRelationshipIds, buildSaveTimeCustomGeometryXml, applyCustomGeometryGuideOverrides, avLstForPreset, filterValidShapeAdjustmentEntries, applyDrawingMediaReference, DIAGRAM_XML_PROLOG, DIAGRAM_DATA_XMLNS, escapeDiagramXml, writeBodyPrBooleanAttrs, applyTextBodySp3d, writeShapeEffects, SHAPE_STYLE_ORDER, CAMERA_PRESETS, LIGHT_RIGS, LIGHT_DIRECTIONS, roundCoordinate, scaleVectorToIntegers, EMU_PER_PIXEL, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, reorderObjectKeysByLocalName, getSignaturePathsToStrip, mergeSmartArtPointXml, mergeSmartArtConnectionXml, withDiagramPictureSources, diagramPictureRelationships, 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, parseChartFormulaRange, expandRangeAddresses, applyCellWritesToWorksheet, formatCellAddress, childrenNamed, childNamed, parseCellAddress, attr, parseDrawingEffects, drawingEffectsXml, readChartManualLayoutValues, worksheetData, buildEffectDagTreeFromXml, appendInSchemaOrder, RUN_PROPERTIES_ORDER, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, picturePercentage, ARTISTIC_PRIMARY_ATTRIBUTE, fetchUrlToBytes, parseChartWideTextStyle, hasLocalName, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, blobUrlToDataUrl, readPictureEffect, isAlternateContentChoiceSupported, SvgExporter, detectStrictConformance, normalizeStrictXml, 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, deriveSlideTitles, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, encodeXmlAttributeValue, encodeXmlTextValue, stripXmlOrderMarkers, CHART_ERROR_VALUE_TYPES, CHART_ERROR_BAR_TYPES, CHART_ERROR_BAR_DIRECTIONS, patchDrawingColorIn, MIN_ELEMENT_SIZE, createDrawingObjectId, DEFAULT_TEXT_FONT_SIZE, EncryptedFileError, decodePptxJsonText, parsePptxJson, pptxDataFromJsonDocument, applyImportedPptxData, DEFAULT_CHART_GRADIENT_ANGLE, supportsChartGradientFill, svgToCustomGeometryPaths, escAttr, buildRelationshipsXml, MIN_TABLE_DIMENSION, MAX_TABLE_DIMENSION, SYSTEM_COLOR_MAP, PRESET_COLOR_MAP, effectChild, mergeEffectNode, mergeAttributeEffectNode, parseDrawingLineDash, estimateMediaDurationMs, parseVmlElements, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, IncorrectPasswordError, applyThemeToData, detectFileFormat, parseOle2, decryptPptx, encryptPptx, cssDegreesToOoxmlGradientAngle, escText, parseLineSpacingMultiplier, parseLineSpacingExactPt, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, PML_XMLNS, solidFill, esc, OOXML_PERCENT_UNITS, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, emu, formatSchemeKey, gradFill, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, parseKinsoku, deobfuscateFont, detectFontFormat, parseDataTable, parseChartAxes, parseBubbleChartOptions, extractGuidFromPartName, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, extractCxSeriesColor, parseCxDataLabels, parseCxRegionMapOptions, parseCxAxes, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, EMU_PER_POINT, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, decodeBase64, parseSmartArtPresLayoutVars, parseDrawingColorIn, parseSmartArtConnection, connectionLabel, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, captureDiagramPictures, parseDiagramDrawing, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, collectTransitionText, parseSmartArtQuickStyleLabels, parseDiagramQuickStyle, parseDiagramLayoutSummary, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, getElementOrientationMatrix, isTextOrientationMatrix, TEXT_ORIENTATION_IDENTITY, multiplyTextOrientationMatrices } from './chunk-X2DC7XRL.mjs';
|
|
2
2
|
import { openPptxZip, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, openZip, MAX_ZIP_ENTRY_COUNT, DEFAULT_MAX_UNCOMPRESSED_BYTES, guardZip, ZipBombError } from './chunk-EYCM7RVL.mjs';
|
|
3
3
|
import { resolveSmartArtLayoutCategory } from './chunk-2N7RZQLC.mjs';
|
|
4
4
|
import { cloneXmlObject, applySmartArtLayoutDefinition, cloneSlide, parseSmartArtLayoutDefinition } from './chunk-VDUNZTJC.mjs';
|
|
@@ -4094,7 +4094,15 @@ var PptxSlideBackgroundBuilder = class {
|
|
|
4094
4094
|
init.reportUnsupportedBackground?.(rawBackgroundImage);
|
|
4095
4095
|
}
|
|
4096
4096
|
}
|
|
4097
|
-
if (backgroundProperties["a:blipFill"] === void 0 &&
|
|
4097
|
+
if (backgroundProperties["a:blipFill"] === void 0 && hasBackgroundGradient) {
|
|
4098
|
+
const gradFill2 = init.buildBackgroundGradientFill?.();
|
|
4099
|
+
if (gradFill2) {
|
|
4100
|
+
backgroundProperties["a:gradFill"] = gradFill2;
|
|
4101
|
+
} else if (!hasBackgroundColor && !hasBackgroundImage) {
|
|
4102
|
+
init.reportUnsupportedGradient?.();
|
|
4103
|
+
}
|
|
4104
|
+
}
|
|
4105
|
+
if (backgroundProperties["a:blipFill"] === void 0 && backgroundProperties["a:gradFill"] === void 0 && hasBackgroundColor && init.slide.backgroundColor) {
|
|
4098
4106
|
backgroundProperties["a:solidFill"] = {
|
|
4099
4107
|
"a:srgbClr": {
|
|
4100
4108
|
"@_val": init.slide.backgroundColor.replace("#", "").toUpperCase()
|
|
@@ -8756,8 +8764,8 @@ function decodeAinkInk(inkRoot) {
|
|
|
8756
8764
|
if (raw2.length === 0) {
|
|
8757
8765
|
return 2;
|
|
8758
8766
|
}
|
|
8759
|
-
const
|
|
8760
|
-
return Number.isFinite(
|
|
8767
|
+
const num3 = Number(raw2);
|
|
8768
|
+
return Number.isFinite(num3) && num3 > 0 ? num3 : 2;
|
|
8761
8769
|
})();
|
|
8762
8770
|
const traces = ensureArrayLike3(inkRoot["aink:trace"]);
|
|
8763
8771
|
for (const trace of traces) {
|
|
@@ -10780,9 +10788,9 @@ async function ensureCustomPropertiesPackagingArtifacts(context) {
|
|
|
10780
10788
|
let maxId = 0;
|
|
10781
10789
|
for (const rel of rels) {
|
|
10782
10790
|
const id = String(rel?.["@_Id"] || "");
|
|
10783
|
-
const
|
|
10784
|
-
if (Number.isFinite(
|
|
10785
|
-
maxId =
|
|
10791
|
+
const num3 = Number.parseInt(id.replace(/^rId/, ""), 10);
|
|
10792
|
+
if (Number.isFinite(num3) && num3 > maxId) {
|
|
10793
|
+
maxId = num3;
|
|
10786
10794
|
}
|
|
10787
10795
|
}
|
|
10788
10796
|
rels.push({
|
|
@@ -10852,11 +10860,11 @@ var PptxDocumentPropertiesUpdater = class {
|
|
|
10852
10860
|
this.context = context;
|
|
10853
10861
|
}
|
|
10854
10862
|
async updateOnSave(slides, options2) {
|
|
10855
|
-
await this.updateCoreProperties(options2?.coreProperties);
|
|
10863
|
+
await this.updateCoreProperties(options2?.coreProperties, options2?.fixedDate);
|
|
10856
10864
|
await this.updateAppProperties(slides, options2?.appProperties);
|
|
10857
10865
|
await this.updateCustomProperties(options2?.customProperties);
|
|
10858
10866
|
}
|
|
10859
|
-
async updateCoreProperties(overrides) {
|
|
10867
|
+
async updateCoreProperties(overrides, fixedDate) {
|
|
10860
10868
|
const coreFile = this.context.zip.file("docProps/core.xml");
|
|
10861
10869
|
if (!coreFile) {
|
|
10862
10870
|
return;
|
|
@@ -10865,7 +10873,12 @@ var PptxDocumentPropertiesUpdater = class {
|
|
|
10865
10873
|
const coreXml = await coreFile.async("string");
|
|
10866
10874
|
const core = applyCoreOverrides(parseCoreProperties(coreXml), overrides);
|
|
10867
10875
|
const revision = Number.parseInt(core.revision?.trim() ?? "", 10);
|
|
10868
|
-
const next = {
|
|
10876
|
+
const next = fixedDate ? {
|
|
10877
|
+
...core,
|
|
10878
|
+
revision: overrides?.revision ?? "1",
|
|
10879
|
+
created: overrides?.created ?? formatW3cdtf(fixedDate),
|
|
10880
|
+
modified: overrides?.modified ?? formatW3cdtf(fixedDate)
|
|
10881
|
+
} : {
|
|
10869
10882
|
...core,
|
|
10870
10883
|
revision: String(Number.isFinite(revision) && revision >= 0 ? revision + 1 : 1),
|
|
10871
10884
|
modified: formatW3cdtf(/* @__PURE__ */ new Date())
|
|
@@ -41805,7 +41818,7 @@ var SWITCHABLE = {
|
|
|
41805
41818
|
stock: false,
|
|
41806
41819
|
surface: true
|
|
41807
41820
|
};
|
|
41808
|
-
function
|
|
41821
|
+
function chartGroupElement(kind, is3D) {
|
|
41809
41822
|
const match = Object.entries(CHART_GROUP_ELEMENTS).find(
|
|
41810
41823
|
([, value]) => value.kind === kind && value.is3D === is3D
|
|
41811
41824
|
);
|
|
@@ -41821,7 +41834,7 @@ function groupingFor(element2, grouping) {
|
|
|
41821
41834
|
var horizontalBars = (group) => group.kind === "bar" && group.barDirection === "bar";
|
|
41822
41835
|
function newGroup(base, target, series) {
|
|
41823
41836
|
const is3D = target.is3D ?? (base.is3D && SWITCHABLE[target.kind] === true);
|
|
41824
|
-
const element2 =
|
|
41837
|
+
const element2 = chartGroupElement(target.kind, is3D);
|
|
41825
41838
|
const group = { kind: target.kind, element: element2, is3D, series, axisIds: [] };
|
|
41826
41839
|
const allowed = GROUP_FIELDS[element2] ?? [];
|
|
41827
41840
|
for (const key2 of allowed)
|
|
@@ -41996,6 +42009,11 @@ var RANGES = {
|
|
|
41996
42009
|
firstSliceAngle: [0, 360],
|
|
41997
42010
|
holeSize: [1, 90]
|
|
41998
42011
|
};
|
|
42012
|
+
function assertChartGroupOption(key2, value) {
|
|
42013
|
+
const [min, max] = RANGES[key2];
|
|
42014
|
+
if (!Number.isInteger(value) || value < min || value > max)
|
|
42015
|
+
throw new RangeError(`Chart ${key2} must be a whole number from ${min} to ${max}`);
|
|
42016
|
+
}
|
|
41999
42017
|
function setChartGroupOptions(space, seriesIndex, edit) {
|
|
42000
42018
|
return editChartSpace(space, (draft) => {
|
|
42001
42019
|
const { group } = chartSeriesEntryAt(draft, seriesIndex);
|
|
@@ -42008,9 +42026,7 @@ function setChartGroupOptions(space, seriesIndex, edit) {
|
|
|
42008
42026
|
delete group[key2];
|
|
42009
42027
|
continue;
|
|
42010
42028
|
}
|
|
42011
|
-
|
|
42012
|
-
if (!Number.isInteger(value) || value < min || value > max)
|
|
42013
|
-
throw new RangeError(`Chart ${key2} must be a whole number from ${min} to ${max}`);
|
|
42029
|
+
assertChartGroupOption(key2, value);
|
|
42014
42030
|
group[key2] = value;
|
|
42015
42031
|
}
|
|
42016
42032
|
});
|
|
@@ -54052,6 +54068,43 @@ function applyCommonViewContainer(root, name, props) {
|
|
|
54052
54068
|
root[key2] = container;
|
|
54053
54069
|
}
|
|
54054
54070
|
|
|
54071
|
+
// pptx/core/utils/slide-background-gradient.ts
|
|
54072
|
+
var num2 = (value) => String(Number(value.toFixed(3)));
|
|
54073
|
+
function cssColor(color2, opacity2) {
|
|
54074
|
+
if (opacity2 === void 0 || opacity2 >= 1) {
|
|
54075
|
+
return color2;
|
|
54076
|
+
}
|
|
54077
|
+
const hex3 = color2.replace("#", "");
|
|
54078
|
+
const channel = (index) => Number.parseInt(hex3.slice(index, index + 2), 16);
|
|
54079
|
+
return `rgba(${channel(0)}, ${channel(2)}, ${channel(4)}, ${num2(opacity2)})`;
|
|
54080
|
+
}
|
|
54081
|
+
function slideBackgroundGradientCss(gradient) {
|
|
54082
|
+
const stops = (gradient.fillGradientStops ?? []).map((stop) => `${cssColor(stop.color, stop.opacity)} ${num2(stop.position)}%`).join(", ");
|
|
54083
|
+
if (gradient.fillGradientType !== "radial") {
|
|
54084
|
+
const angle = ooxmlGradientAngleToCssDegrees(gradient.fillGradientAngle ?? 0);
|
|
54085
|
+
return `linear-gradient(${num2(angle)}deg, ${stops})`;
|
|
54086
|
+
}
|
|
54087
|
+
const focus = gradient.fillGradientFillToRect;
|
|
54088
|
+
const cx = focus ? (focus.l + (1 - focus.r)) / 2 * 100 : 50;
|
|
54089
|
+
const cy = focus ? (focus.t + (1 - focus.b)) / 2 * 100 : 50;
|
|
54090
|
+
const at = `at ${num2(cx)}% ${num2(cy)}%`;
|
|
54091
|
+
switch (gradient.fillGradientPathType) {
|
|
54092
|
+
case "rect":
|
|
54093
|
+
return `radial-gradient(${num2(Math.max(cx, 100 - cx))}% ${num2(Math.max(cy, 100 - cy))}% ${at}, ${stops})`;
|
|
54094
|
+
case "shape":
|
|
54095
|
+
return `radial-gradient(farthest-side ${at}, ${stops})`;
|
|
54096
|
+
default:
|
|
54097
|
+
return `radial-gradient(circle ${at}, ${stops})`;
|
|
54098
|
+
}
|
|
54099
|
+
}
|
|
54100
|
+
function slideBackgroundGradientToWrite(slide) {
|
|
54101
|
+
const gradient = slide.backgroundGradientFill;
|
|
54102
|
+
if (!gradient || !slide.backgroundGradient) {
|
|
54103
|
+
return void 0;
|
|
54104
|
+
}
|
|
54105
|
+
return slide.backgroundGradient === slideBackgroundGradientCss(gradient) ? gradient : void 0;
|
|
54106
|
+
}
|
|
54107
|
+
|
|
54055
54108
|
// pptx/core/core/runtime/chart-part-registration.ts
|
|
54056
54109
|
var CHART_GRAPHIC_DATA_URI = "http://schemas.openxmlformats.org/drawingml/2006/chart";
|
|
54057
54110
|
var CHART_EX_GRAPHIC_DATA_URI = "http://schemas.microsoft.com/office/drawing/2014/chartex";
|
|
@@ -55680,8 +55733,8 @@ function authoredValue(node) {
|
|
|
55680
55733
|
return void 0;
|
|
55681
55734
|
}
|
|
55682
55735
|
const raw2 = node["@_val"];
|
|
55683
|
-
const
|
|
55684
|
-
return Number.isFinite(
|
|
55736
|
+
const num3 = raw2 === void 0 || raw2 === null || raw2 === "" ? NaN : Number.parseFloat(String(raw2));
|
|
55737
|
+
return Number.isFinite(num3) ? num3 : void 0;
|
|
55685
55738
|
}
|
|
55686
55739
|
function applyChartGroupOptionsToXml(container, containerLocal, chartData, getLocalName2) {
|
|
55687
55740
|
let changed = false;
|
|
@@ -67333,11 +67386,31 @@ var PptxHandlerRuntime15 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
|
|
|
67333
67386
|
* default) is correct at depth 0. See `group-xfrm-preservation.ts`'s
|
|
67334
67387
|
* module doc for why a nested group must not re-derive this itself.
|
|
67335
67388
|
*/
|
|
67389
|
+
/**
|
|
67390
|
+
* `PptxHandlerSaveOptions.fixedDate` of the save in progress: set, the save
|
|
67391
|
+
* mints reproducible ids and names (new table columns' `a16:colId`, the
|
|
67392
|
+
* fallback name of a new group) instead of random or time-based ones.
|
|
67393
|
+
*/
|
|
67394
|
+
saveFixedDate;
|
|
67395
|
+
/**
|
|
67396
|
+
* The `p:cNvPr/@name` of a group with neither a name nor one from its
|
|
67397
|
+
* file: its element id, or for a reproducible save (`fixedDate`), which
|
|
67398
|
+
* must not depend on the time-based ids of elements made in code,
|
|
67399
|
+
* `Group <shape id>` as PowerPoint names groups.
|
|
67400
|
+
*/
|
|
67401
|
+
groupFallbackName(group) {
|
|
67402
|
+
return this.saveFixedDate ? `Group ${group.shapeId ?? ""}`.trim() : group.id;
|
|
67403
|
+
}
|
|
67336
67404
|
buildGroupShapeXml(group, ctx, ownEmuOverride) {
|
|
67337
67405
|
if (group.rawXml && group.children.length === 0) {
|
|
67338
67406
|
return {
|
|
67339
67407
|
...group.rawXml,
|
|
67340
|
-
"p:nvGrpSpPr": buildGroupNonVisualXml(
|
|
67408
|
+
"p:nvGrpSpPr": buildGroupNonVisualXml(
|
|
67409
|
+
group.rawXml,
|
|
67410
|
+
group.name,
|
|
67411
|
+
this.groupFallbackName(group),
|
|
67412
|
+
group.shapeId
|
|
67413
|
+
)
|
|
67341
67414
|
};
|
|
67342
67415
|
}
|
|
67343
67416
|
const EMU = _PptxHandlerRuntime.EMU_PER_PX;
|
|
@@ -67346,7 +67419,12 @@ var PptxHandlerRuntime15 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
|
|
|
67346
67419
|
const xfrm = buildGroupTransformXml(group, EMU, ownEmuOverride, rewrap);
|
|
67347
67420
|
const childSpace = group;
|
|
67348
67421
|
const grpXml2 = {
|
|
67349
|
-
"p:nvGrpSpPr": buildGroupNonVisualXml(
|
|
67422
|
+
"p:nvGrpSpPr": buildGroupNonVisualXml(
|
|
67423
|
+
rawGroupXml,
|
|
67424
|
+
group.name,
|
|
67425
|
+
this.groupFallbackName(group),
|
|
67426
|
+
group.shapeId
|
|
67427
|
+
),
|
|
67350
67428
|
"p:grpSpPr": buildGroupPropertiesXml(rawGroupXml, xfrm)
|
|
67351
67429
|
};
|
|
67352
67430
|
const rawExtLst = rawGroupXml?.["p:extLst"];
|
|
@@ -70244,7 +70322,15 @@ function slideContainsA16Element(node) {
|
|
|
70244
70322
|
function randomColumnId() {
|
|
70245
70323
|
return String(Math.floor(Math.random() * 4294967295));
|
|
70246
70324
|
}
|
|
70247
|
-
function
|
|
70325
|
+
function deterministicColumnId(index) {
|
|
70326
|
+
let hash2 = 2166136261;
|
|
70327
|
+
for (const ch of `a16:colId:${index}`) {
|
|
70328
|
+
hash2 ^= ch.charCodeAt(0);
|
|
70329
|
+
hash2 = Math.imul(hash2, 16777619) >>> 0;
|
|
70330
|
+
}
|
|
70331
|
+
return String(hash2);
|
|
70332
|
+
}
|
|
70333
|
+
function rebuildTableXmlFromData(tbl, tableData, emuPerPx, ensureArrayFn, newColumnId = randomColumnId) {
|
|
70248
70334
|
const existingXmlRows = ensureArrayFn(tbl["a:tr"]);
|
|
70249
70335
|
const existingGridCols = ensureArrayFn(
|
|
70250
70336
|
tbl["a:tblGrid"]?.["a:gridCol"]
|
|
@@ -70275,7 +70361,7 @@ function rebuildTableXmlFromData(tbl, tableData, emuPerPx, ensureArrayFn) {
|
|
|
70275
70361
|
// `ensureA16NamespaceOnSlideRoot`; emitting it here too is
|
|
70276
70362
|
// schema-redundant and PowerPoint flags it.
|
|
70277
70363
|
"a16:colId": {
|
|
70278
|
-
"@_val": existingColIds[i] ||
|
|
70364
|
+
"@_val": existingColIds[i] || newColumnId(i)
|
|
70279
70365
|
}
|
|
70280
70366
|
}
|
|
70281
70367
|
}
|
|
@@ -70970,7 +71056,8 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
70970
71056
|
tbl,
|
|
70971
71057
|
tableData,
|
|
70972
71058
|
_PptxHandlerRuntime.EMU_PER_PX,
|
|
70973
|
-
this.ensureArray.bind(this)
|
|
71059
|
+
this.ensureArray.bind(this),
|
|
71060
|
+
this.saveFixedDate ? deterministicColumnId : void 0
|
|
70974
71061
|
);
|
|
70975
71062
|
const rebuiltRows = this.ensureArray(tbl["a:tr"]);
|
|
70976
71063
|
for (let rIdx = 0; rIdx < tableData.rows.length; rIdx++) {
|
|
@@ -73505,9 +73592,9 @@ var PptxHandlerRuntime25 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
73505
73592
|
let maxId = 0;
|
|
73506
73593
|
for (const rel of relationships2) {
|
|
73507
73594
|
const id = String(rel?.["@_Id"] || "");
|
|
73508
|
-
const
|
|
73509
|
-
if (Number.isFinite(
|
|
73510
|
-
maxId =
|
|
73595
|
+
const num3 = parseInt(id.replace(/^rId/u, ""), 10);
|
|
73596
|
+
if (Number.isFinite(num3) && num3 > maxId) {
|
|
73597
|
+
maxId = num3;
|
|
73511
73598
|
}
|
|
73512
73599
|
}
|
|
73513
73600
|
const existingFontTargets = /* @__PURE__ */ new Set();
|
|
@@ -73650,9 +73737,9 @@ var PptxHandlerRuntime25 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
73650
73737
|
let maxId = 0;
|
|
73651
73738
|
for (const rel of relationships2) {
|
|
73652
73739
|
const id = String(rel?.["@_Id"] || "");
|
|
73653
|
-
const
|
|
73654
|
-
if (Number.isFinite(
|
|
73655
|
-
maxId =
|
|
73740
|
+
const num3 = parseInt(id.replace(/^rId/u, ""), 10);
|
|
73741
|
+
if (Number.isFinite(num3) && num3 > maxId) {
|
|
73742
|
+
maxId = num3;
|
|
73656
73743
|
}
|
|
73657
73744
|
}
|
|
73658
73745
|
relationships2.push({
|
|
@@ -77997,6 +78084,16 @@ var PptxHandlerRuntime42 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
|
|
|
77997
78084
|
message: `Slide background image could not be embedded and was preserved as-is or omitted: ${imageUrl.slice(0, 120)}`,
|
|
77998
78085
|
scope: "save",
|
|
77999
78086
|
slideId: slide.id
|
|
78087
|
+
}),
|
|
78088
|
+
buildBackgroundGradientFill: () => {
|
|
78089
|
+
const gradient = slideBackgroundGradientToWrite(slide);
|
|
78090
|
+
return gradient ? this.buildGradientFillXml({ fillMode: "gradient", ...gradient }) : void 0;
|
|
78091
|
+
},
|
|
78092
|
+
reportUnsupportedGradient: () => this.compatibilityService.reportWarning({
|
|
78093
|
+
code: "SAVE_BACKGROUND_GRADIENT_UNSUPPORTED",
|
|
78094
|
+
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.",
|
|
78095
|
+
scope: "save",
|
|
78096
|
+
slideId: slide.id
|
|
78000
78097
|
})
|
|
78001
78098
|
});
|
|
78002
78099
|
this.slideCommentPartWriter.writeComments({
|
|
@@ -80241,6 +80338,7 @@ var PptxHandlerRuntime54 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
80241
80338
|
/** One save, with the package to itself; callers go through {@link save}. */
|
|
80242
80339
|
async saveNow(slides, options2) {
|
|
80243
80340
|
validateSlideGeometry(slides);
|
|
80341
|
+
this.saveFixedDate = validFixedDate(options2?.fixedDate);
|
|
80244
80342
|
const templates = [
|
|
80245
80343
|
...options2?.slideMasters ?? [],
|
|
80246
80344
|
...options2?.slideLayouts ?? [],
|
|
@@ -80431,7 +80529,8 @@ var PptxHandlerRuntime54 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
80431
80529
|
await this.documentPropertiesUpdater.updateOnSave(slides, {
|
|
80432
80530
|
coreProperties: options2?.coreProperties,
|
|
80433
80531
|
appProperties: options2?.appProperties,
|
|
80434
|
-
customProperties: options2?.customProperties
|
|
80532
|
+
customProperties: options2?.customProperties,
|
|
80533
|
+
fixedDate: this.saveFixedDate
|
|
80435
80534
|
});
|
|
80436
80535
|
await this.applyTagCollectionChanges(options2?.tags);
|
|
80437
80536
|
await this.applyNotesMasterChanges(options2?.notesMaster);
|
|
@@ -80475,6 +80574,11 @@ var PptxHandlerRuntime54 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
80475
80574
|
delete this.zip.files[name];
|
|
80476
80575
|
}
|
|
80477
80576
|
}
|
|
80577
|
+
if (this.saveFixedDate) {
|
|
80578
|
+
for (const file of Object.values(this.zip.files)) {
|
|
80579
|
+
file.date = this.saveFixedDate;
|
|
80580
|
+
}
|
|
80581
|
+
}
|
|
80478
80582
|
return await this.zip.generateAsync({
|
|
80479
80583
|
type: "uint8array",
|
|
80480
80584
|
compression: "DEFLATE",
|
|
@@ -80559,6 +80663,15 @@ var PptxHandlerRuntime54 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
80559
80663
|
this.zip.file(relsPath2, this.builder.build(relsData));
|
|
80560
80664
|
}
|
|
80561
80665
|
};
|
|
80666
|
+
function validFixedDate(date) {
|
|
80667
|
+
if (date === void 0) {
|
|
80668
|
+
return void 0;
|
|
80669
|
+
}
|
|
80670
|
+
if (!(date instanceof Date) || Number.isNaN(date.getTime())) {
|
|
80671
|
+
throw new RangeError("PptxHandlerSaveOptions.fixedDate must be a valid Date");
|
|
80672
|
+
}
|
|
80673
|
+
return date;
|
|
80674
|
+
}
|
|
80562
80675
|
|
|
80563
80676
|
// pptx/core/core/runtime/PptxHandlerRuntimeElementParsing.ts
|
|
80564
80677
|
var SPECIAL_PLACEHOLDER_TYPES = /* @__PURE__ */ new Set(["dt", "ftr", "hdr", "sldnum"]);
|
|
@@ -90015,8 +90128,8 @@ function parseNumberVal(node) {
|
|
|
90015
90128
|
if (raw2 === void 0 || raw2 === null || raw2 === "") {
|
|
90016
90129
|
return void 0;
|
|
90017
90130
|
}
|
|
90018
|
-
const
|
|
90019
|
-
return Number.isFinite(
|
|
90131
|
+
const num3 = Number.parseFloat(String(raw2));
|
|
90132
|
+
return Number.isFinite(num3) ? num3 : void 0;
|
|
90020
90133
|
}
|
|
90021
90134
|
var PptxHandlerRuntime93 = class extends PptxHandlerRuntime92 {
|
|
90022
90135
|
/**
|
|
@@ -92483,12 +92596,12 @@ var PptxHandlerRuntime103 = class extends PptxHandlerRuntime102 {
|
|
|
92483
92596
|
* in-memory format schemes of the masters on those parts and, when the deck's part is among
|
|
92484
92597
|
* them, the deck's.
|
|
92485
92598
|
*/
|
|
92486
|
-
async writeFormatScheme(
|
|
92599
|
+
async writeFormatScheme(elementFor, themePaths) {
|
|
92487
92600
|
const deckBefore = this.getThemeFormatScheme();
|
|
92488
92601
|
const replaced = /* @__PURE__ */ new Map();
|
|
92489
92602
|
const schemes = /* @__PURE__ */ new Map();
|
|
92490
92603
|
const written = await this.rewriteThemeParts(themePaths, (data, path3) => {
|
|
92491
|
-
const element2 =
|
|
92604
|
+
const element2 = elementFor(path3);
|
|
92492
92605
|
const elements2 = data["a:theme"]?.["a:themeElements"];
|
|
92493
92606
|
if (!element2 || !elements2) {
|
|
92494
92607
|
return false;
|
|
@@ -92526,7 +92639,7 @@ var PptxHandlerRuntime103 = class extends PptxHandlerRuntime102 {
|
|
|
92526
92639
|
this.themeFormatScheme = deck;
|
|
92527
92640
|
this.heldFormatSchemes.holdParts(
|
|
92528
92641
|
deck,
|
|
92529
|
-
new Map(written.map((path3) => [path3,
|
|
92642
|
+
new Map(written.map((path3) => [path3, elementFor(path3)]))
|
|
92530
92643
|
);
|
|
92531
92644
|
}
|
|
92532
92645
|
return this.getThemeFormatScheme();
|
|
@@ -96770,6 +96883,80 @@ var PptxHandler = class extends PptxHandlerCore {
|
|
|
96770
96883
|
}
|
|
96771
96884
|
};
|
|
96772
96885
|
|
|
96886
|
+
// pptx/core/builders/sdk/background-gradient-input.ts
|
|
96887
|
+
var HEX = /^#?[0-9a-f]{6}$/iu;
|
|
96888
|
+
var PATHS = /* @__PURE__ */ new Set(["circle", "rect", "shape"]);
|
|
96889
|
+
var WHERE = "BackgroundInput";
|
|
96890
|
+
function finite3(name, value, min, max) {
|
|
96891
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
96892
|
+
throw new RangeError(`${WHERE}.${name} must be a finite number, got ${String(value)}`);
|
|
96893
|
+
}
|
|
96894
|
+
if (min !== void 0 && value < min || max !== void 0 && value > max) {
|
|
96895
|
+
throw new RangeError(`${WHERE}.${name} must be between ${min} and ${max}, got ${value}`);
|
|
96896
|
+
}
|
|
96897
|
+
return value;
|
|
96898
|
+
}
|
|
96899
|
+
function stopsOf(input) {
|
|
96900
|
+
if (!Array.isArray(input.stops) || input.stops.length < 2) {
|
|
96901
|
+
throw new RangeError(`${WHERE}.stops needs at least two stops (a:gsLst)`);
|
|
96902
|
+
}
|
|
96903
|
+
return input.stops.map((stop, index) => {
|
|
96904
|
+
if (typeof stop.color !== "string" || !HEX.test(stop.color)) {
|
|
96905
|
+
throw new RangeError(
|
|
96906
|
+
`${WHERE}.stops[${index}].color must be #RRGGBB, got ${String(stop.color)}`
|
|
96907
|
+
);
|
|
96908
|
+
}
|
|
96909
|
+
const position3 = finite3(`stops[${index}].position`, stop.position, 0, 1);
|
|
96910
|
+
const opacity2 = stop.opacity === void 0 ? void 0 : finite3(`stops[${index}].opacity`, stop.opacity, 0, 1);
|
|
96911
|
+
return {
|
|
96912
|
+
color: `#${stop.color.replace("#", "").toUpperCase()}`,
|
|
96913
|
+
// The shape gradient model keeps positions in percent.
|
|
96914
|
+
position: position3 * 100,
|
|
96915
|
+
...opacity2 !== void 0 ? { opacity: opacity2 } : {}
|
|
96916
|
+
};
|
|
96917
|
+
});
|
|
96918
|
+
}
|
|
96919
|
+
function mapBackgroundGradientInput(input) {
|
|
96920
|
+
const fillGradientStops = stopsOf(input);
|
|
96921
|
+
let gradient;
|
|
96922
|
+
if (input.path !== void 0) {
|
|
96923
|
+
if (!PATHS.has(input.path)) {
|
|
96924
|
+
throw new RangeError(
|
|
96925
|
+
`${WHERE}.path must be circle, rect or shape, got ${String(input.path)}`
|
|
96926
|
+
);
|
|
96927
|
+
}
|
|
96928
|
+
if (input.angle !== void 0) {
|
|
96929
|
+
throw new RangeError(`${WHERE}.angle applies to a linear gradient, not a path one`);
|
|
96930
|
+
}
|
|
96931
|
+
const focus = input.focus ?? { l: 0.5, t: 0.5, r: 0.5, b: 0.5 };
|
|
96932
|
+
gradient = {
|
|
96933
|
+
fillGradientType: "radial",
|
|
96934
|
+
fillGradientPathType: input.path,
|
|
96935
|
+
fillGradientStops,
|
|
96936
|
+
fillGradientFillToRect: {
|
|
96937
|
+
l: finite3("focus.l", focus.l),
|
|
96938
|
+
t: finite3("focus.t", focus.t),
|
|
96939
|
+
r: finite3("focus.r", focus.r),
|
|
96940
|
+
b: finite3("focus.b", focus.b)
|
|
96941
|
+
}
|
|
96942
|
+
};
|
|
96943
|
+
} else {
|
|
96944
|
+
if (input.focus !== void 0) {
|
|
96945
|
+
throw new RangeError(`${WHERE}.focus needs a path gradient`);
|
|
96946
|
+
}
|
|
96947
|
+
const cssAngle = finite3("angle", input.angle ?? 180);
|
|
96948
|
+
gradient = {
|
|
96949
|
+
fillGradientType: "linear",
|
|
96950
|
+
fillGradientAngle: cssDegreesToOoxmlGradientAngle(cssAngle),
|
|
96951
|
+
fillGradientStops
|
|
96952
|
+
};
|
|
96953
|
+
}
|
|
96954
|
+
return {
|
|
96955
|
+
backgroundGradient: slideBackgroundGradientCss(gradient),
|
|
96956
|
+
backgroundGradientFill: gradient
|
|
96957
|
+
};
|
|
96958
|
+
}
|
|
96959
|
+
|
|
96773
96960
|
// pptx/core/builders/sdk/chart-gradient-input.ts
|
|
96774
96961
|
var HEX_COLOR2 = /^#?[0-9a-f]{6}$/iu;
|
|
96775
96962
|
var FULL_TURN = 360;
|
|
@@ -98322,12 +98509,12 @@ var SlideBuilder = class {
|
|
|
98322
98509
|
switch (bg.type) {
|
|
98323
98510
|
case "solid":
|
|
98324
98511
|
this.slide.backgroundColor = bg.color;
|
|
98512
|
+
delete this.slide.backgroundGradient;
|
|
98513
|
+
delete this.slide.backgroundGradientFill;
|
|
98325
98514
|
break;
|
|
98326
|
-
case "gradient":
|
|
98327
|
-
|
|
98328
|
-
this.slide.backgroundGradient = `linear-gradient(${bg.angle ?? 180}deg, ${stops})`;
|
|
98515
|
+
case "gradient":
|
|
98516
|
+
Object.assign(this.slide, mapBackgroundGradientInput(bg));
|
|
98329
98517
|
break;
|
|
98330
|
-
}
|
|
98331
98518
|
case "image":
|
|
98332
98519
|
this.slide.backgroundImage = bg.source;
|
|
98333
98520
|
break;
|
|
@@ -217,6 +217,7 @@ var COMPLEX_SLIDE_FIELDS = {
|
|
|
217
217
|
activeXControls: "_ax",
|
|
218
218
|
legacyVmlElements: "_lvml",
|
|
219
219
|
backgroundPattern: "_bp",
|
|
220
|
+
backgroundGradientFill: "_bgf",
|
|
220
221
|
backgroundImageProperties: "_bip",
|
|
221
222
|
backgroundStyleRef: "_bsr",
|
|
222
223
|
modernCommentPart: "_mc",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { YDOC_SLIDES_KEY, SCALAR_ELEMENT_KEYS, COMPLEX_ELEMENT_FIELDS, SCALAR_SLIDE_KEYS, COMPLEX_SLIDE_FIELDS, writeElementToYMap, writeSlideToYMap } from './chunk-
|
|
1
|
+
import { YDOC_SLIDES_KEY, SCALAR_ELEMENT_KEYS, COMPLEX_ELEMENT_FIELDS, SCALAR_SLIDE_KEYS, COMPLEX_SLIDE_FIELDS, writeElementToYMap, writeSlideToYMap } from './chunk-ZLUHU2SU.mjs';
|
|
2
2
|
import { hasCollaborationTextLease } from './chunk-F3JOHFHA.mjs';
|
|
3
3
|
import { isYTextEditable, mergeDeltaIntoYText } from './chunk-3XT4X5IU.mjs';
|
|
4
4
|
import { encodeSegmentsToDelta, decodeDelta, isYTextLike, encodeTextBody } from './chunk-ML62L5KL.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { hasTextProperties, isImageLikeElement, blobUrlToDataUrl, getSubstituteFontFamily, stripXmlOrderSuffix } from './chunk-
|
|
1
|
+
import { hasTextProperties, isImageLikeElement, blobUrlToDataUrl, getSubstituteFontFamily, stripXmlOrderSuffix } from './chunk-X2DC7XRL.mjs';
|
|
2
2
|
|
|
3
3
|
// pptx/converter/media-context.ts
|
|
4
4
|
var MIME_TO_EXT = {
|