ooxml-core 1.24.1 → 1.24.3
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-KFEE7O7W.cjs → PptxHandler-2YPMMGOJ.cjs} +3 -3
- package/dist/PptxHandler-VXK5EY7J.mjs +4 -0
- package/dist/{PptxHandler-5TWAQWPK.mjs → PptxHandler-WQPEYOSS.mjs} +2 -2
- package/dist/{PresentationBuilder-SXLRXYDI.cjs → PresentationBuilder-F5U4KEGH.cjs} +5 -5
- package/dist/{PresentationBuilder-SVHIKT4C.mjs → PresentationBuilder-FGWHIJV7.mjs} +2 -2
- package/dist/{PresentationBuilder-SCT5AQBP.mjs → PresentationBuilder-PS5S52M3.mjs} +2 -2
- package/dist/automation/index.cjs +24 -1
- package/dist/automation/index.mjs +24 -1
- package/dist/{chunk-7N7C5BNM.mjs → chunk-2AFO3HNI.mjs} +2 -2
- package/dist/{chunk-CWCDFPKN.mjs → chunk-4IFENOU7.mjs} +1 -1
- package/dist/{chunk-XK55DEUD.cjs → chunk-5SE4FGS4.cjs} +1019 -1019
- package/dist/{chunk-NE7626A4.mjs → chunk-HKCSJAQD.mjs} +4 -4
- package/dist/{chunk-GVP262WE.mjs → chunk-K2XWOVLV.mjs} +3 -3
- package/dist/{chunk-6IIMI5RS.mjs → chunk-O6ISWI34.mjs} +1 -1
- package/dist/{chunk-KVKTHGIY.mjs → chunk-OJWKGDJF.mjs} +1 -1
- package/dist/{chunk-4LZIUJI3.cjs → chunk-QCZX6K67.cjs} +1 -1
- package/dist/{chunk-ON7XVRHQ.mjs → chunk-RF2YPEKI.mjs} +3 -3
- package/dist/crypto/detect.d.ts +5 -1
- package/dist/crypto/detect.d.ts.map +1 -1
- package/dist/crypto/index.cjs +1 -1
- package/dist/crypto/index.mjs +1 -1
- package/dist/docx/embedded.cjs +24 -1
- package/dist/docx/embedded.mjs +24 -1
- package/dist/docx/index.cjs +24 -1
- package/dist/docx/index.mjs +24 -1
- package/dist/docx/load/index.cjs +25 -2
- package/dist/docx/load/index.mjs +25 -2
- package/dist/docx/ui/content-control-commands.d.ts +1 -1
- package/dist/docx/ui/content-control-commands.d.ts.map +1 -1
- package/dist/docx/ui/content-control-guard.d.ts.map +1 -1
- package/dist/docx/ui/content-control-occurrences.d.ts +17 -0
- package/dist/docx/ui/content-control-occurrences.d.ts.map +1 -0
- package/dist/docx/ui/content-control-temporary.d.ts +1 -4
- package/dist/docx/ui/content-control-temporary.d.ts.map +1 -1
- package/dist/docx/ui/form-field-guard.d.ts +10 -4
- package/dist/docx/ui/form-field-guard.d.ts.map +1 -1
- package/dist/docx/ui/form-protection-sections.d.ts +26 -0
- package/dist/docx/ui/form-protection-sections.d.ts.map +1 -0
- package/dist/docx/ui/form-text-paste.d.ts +35 -0
- package/dist/docx/ui/form-text-paste.d.ts.map +1 -0
- package/dist/docx/ui/index.cjs +266 -108
- package/dist/docx/ui/index.mjs +266 -108
- package/dist/docx/write-table-controls.d.ts +2 -1
- package/dist/docx/write-table-controls.d.ts.map +1 -1
- package/dist/pptx/automation/index.cjs +4 -4
- package/dist/pptx/automation/index.d.ts +4 -1
- package/dist/pptx/automation/index.d.ts.map +1 -1
- package/dist/pptx/automation/index.mjs +6 -6
- package/dist/pptx/chunks/index-4FmgJajb.d.ts.map +1 -1
- package/dist/pptx/cli/index.cjs +3 -3
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/find-replace.cjs +14 -14
- package/dist/pptx/editor/render/find-replace.mjs +1 -1
- package/dist/pptx/editor/render/slide-operations.cjs +8 -8
- package/dist/pptx/editor/render/slide-operations.mjs +2 -2
- package/dist/pptx/index.cjs +3 -3
- package/dist/pptx/index.mjs +5 -5
- package/dist/xlsx/load/index.cjs +1 -1
- package/dist/xlsx/load/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/PptxHandler-KBJ4TN3T.mjs +0 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { findText, replaceText, replaceTextInSlide, mergePresentation } from './chunk-
|
|
2
|
-
import { PresentationBuilder, PptxHandler, SlideBuilder, validateSeriesIndex, removeEmptyDataPoint, ensureDataPoint, ensureChartData, assertChartGradientSupported, toChartGradientFill, isLineDrawnChartType, chartFormatTargetKey, applyChartGroupOptionsInput, countExistingLayouts, addLayoutToSlideMaster, addLayoutContentType, createLayout, STANDARD_LAYOUTS, generateLayoutXml, layoutRelsXml, createTextElement, createShapeElement, createImageElement, createTableElement, createChartElement, createConnectorElement, createMediaElement, createGroupElement, relationshipsPartFor, parseRelationships, resolvePartPath, clonePartGraph, buildRelationshipsXml, buildBlankPresentationArchive, nextRelationshipId, relativePartTarget, PptxXmlBuilder } from './chunk-
|
|
3
|
-
import { EMU_PER_PIXEL, EMU_PER_INCH, parseXml, first, elements, buildXml, bytesToBase64, base64ToBytes, hasTextProperties, escAttr } from './chunk-
|
|
1
|
+
import { findText, replaceText, replaceTextInSlide, mergePresentation } from './chunk-4IFENOU7.mjs';
|
|
2
|
+
import { PresentationBuilder, PptxHandler, SlideBuilder, validateSeriesIndex, removeEmptyDataPoint, ensureDataPoint, ensureChartData, assertChartGradientSupported, toChartGradientFill, isLineDrawnChartType, chartFormatTargetKey, applyChartGroupOptionsInput, countExistingLayouts, addLayoutToSlideMaster, addLayoutContentType, createLayout, STANDARD_LAYOUTS, generateLayoutXml, layoutRelsXml, createTextElement, createShapeElement, createImageElement, createTableElement, createChartElement, createConnectorElement, createMediaElement, createGroupElement, relationshipsPartFor, parseRelationships, resolvePartPath, clonePartGraph, buildRelationshipsXml, buildBlankPresentationArchive, nextRelationshipId, relativePartTarget, PptxXmlBuilder } from './chunk-RF2YPEKI.mjs';
|
|
3
|
+
import { EMU_PER_PIXEL, EMU_PER_INCH, parseXml, first, elements, buildXml, bytesToBase64, base64ToBytes, hasTextProperties, escAttr } from './chunk-2AFO3HNI.mjs';
|
|
4
4
|
import { openPptxZip } from './chunk-GBKBR4CX.mjs';
|
|
5
5
|
import { cloneSlide, cloneElement } from './chunk-54S5A5PZ.mjs';
|
|
6
6
|
|
|
@@ -14771,7 +14771,7 @@ async function setPresentationRunText(bytes, slideIndex, elementId, runIndex, te
|
|
|
14771
14771
|
async function createPresentationFromOutline(slides, options = {}) {
|
|
14772
14772
|
if (!(slides instanceof Array) || !slides.length || slides.length > 200)
|
|
14773
14773
|
throw new Error("A presentation outline has 1 to 200 slides");
|
|
14774
|
-
const { PresentationBuilder: PresentationBuilder2 } = await import('./PresentationBuilder-
|
|
14774
|
+
const { PresentationBuilder: PresentationBuilder2 } = await import('./PresentationBuilder-FGWHIJV7.mjs');
|
|
14775
14775
|
const { handler, data, createSlide } = await PresentationBuilder2.create({
|
|
14776
14776
|
...options.title ? { title: options.title } : {}
|
|
14777
14777
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NS, 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, cloneXmlObject, parseParagraphSpacingPx, parseOoxmlPercent, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, orderedPathCommandEntries, ooxmlArcToSvg, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, remapElementShapeIds, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, openPptxZip, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, orderedXmlKey, safeResolveZipPath, parseXml, elements, parseDataUrlToBytes, base64Decode, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, ensureXmlChild, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, serializeTabStop, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, applyChartManualLayout, chartTrendlineType, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, applyDiagramRelationshipIds, applyDrawingMediaReference, XML_PROLOG, DGM_XMLNS, xmlEscape, writeBodyPrBooleanAttrs, applyTextBodySp3d, customGeometryPathsToXml, ensureArrayValue, lookupPresetShape, writeShapeEffects, SHAPE_STYLE_ORDER, roundCoordinate, scaleVectorToIntegers, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, restorePathListCommandOrder, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, getSignaturePathsToStrip, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, mergeSmartArtPointXml, mergeSmartArtConnectionXml, applySmartArtLayoutDefinition, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseChartUserShapesDrawing, DEFAULT_ROW_HEIGHT_EMU, createDefaultXmlCell, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, tableCellTextBodyMatches, ensureXmlChildren, TC_PR_BORDERS_ORDER, writeChartColorChoice, openNestedZip, stripParentDirSegments, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, preservesSpreadsheetXmlWhitespace, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, fetchUrlToBytes, parseChartWideTextStyle, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, first, children, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, detectStrictConformance, normalizeStrictXml, relayoutSmartArt, themeColorRefToSolidFillWithOpacity, FONT_ADVANCE_TABLES, DEFAULT_FONT_ADVANCE_TABLE, measureTextWidth, applyDrawingColorTransforms, applyThemeToData, detectFileFormat, parseOle2, EncryptedFileError, decryptPptx, encryptPptx, encodeXmlAttributeValue, encodeXmlTextValue, svgToCustomGeometryPaths, IncorrectPasswordError, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, supportsChartGradientFill, DEFAULT_CHART_GRADIENT_ANGLE, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, stripXmlOrderMarkers, normalizeStShapeType, applyCustomShows, applySections, reorderObjectKeysByLocalName, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, backgroundStyleRefIsCurrent, backgroundRefNode, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, detectOleObjectType, inferOleExtensionFromTarget, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, deriveSlideTitles, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, cloneSlide, parseDrawingFraction, scrgbLinearToSrgb8, parseDrawingHueDegrees, hslToRgb, themeColorRefToXml, effectChild, mergeEffectNode, mergeAttributeEffectNode, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, estimateMediaDurationMs, parseVmlElements, parseDrawingLineDash, parseLineSpacingMultiplier, parseLineSpacingExactPt, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, DEFAULT_MAX_UNCOMPRESSED_BYTES, guardZip, ZipBombError, MAX_ZIP_ENTRY_COUNT, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, themeColorRefFromSchemeClr, extractGuidFromPartName, deobfuscateFont, detectFontFormat, parseKinsoku, parseLineStyle, parseChartUpDownBars, parseDataTable, parseChart3DSurfaces, parseChartAxes, parseBubbleChartOptions, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, parseSeriesDataPoints, parseMarker, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, relAttr, buildXml, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, parseSmartArtLayoutDefinition, parseSmartArtPresLayoutVars, readChartManualLayoutValues, parseSmartArtConnection, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, parseSmartArtQuickStyleLabels, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, blendColorOntoWhite, CHART_ERROR_VALUE_TYPES, CHART_ERROR_BAR_TYPES, CHART_ERROR_BAR_DIRECTIONS } from './chunk-
|
|
1
|
+
import { NS, 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, cloneXmlObject, parseParagraphSpacingPx, parseOoxmlPercent, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, orderedPathCommandEntries, ooxmlArcToSvg, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, remapElementShapeIds, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, openPptxZip, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, orderedXmlKey, safeResolveZipPath, parseXml, elements, parseDataUrlToBytes, base64Decode, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, ensureXmlChild, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, serializeTabStop, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, applyChartManualLayout, chartTrendlineType, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, applyDiagramRelationshipIds, applyDrawingMediaReference, XML_PROLOG, DGM_XMLNS, xmlEscape, writeBodyPrBooleanAttrs, applyTextBodySp3d, customGeometryPathsToXml, ensureArrayValue, lookupPresetShape, writeShapeEffects, SHAPE_STYLE_ORDER, roundCoordinate, scaleVectorToIntegers, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, restorePathListCommandOrder, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, getSignaturePathsToStrip, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, mergeSmartArtPointXml, mergeSmartArtConnectionXml, applySmartArtLayoutDefinition, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseChartUserShapesDrawing, DEFAULT_ROW_HEIGHT_EMU, createDefaultXmlCell, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, tableCellTextBodyMatches, ensureXmlChildren, TC_PR_BORDERS_ORDER, writeChartColorChoice, openNestedZip, stripParentDirSegments, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, preservesSpreadsheetXmlWhitespace, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, fetchUrlToBytes, parseChartWideTextStyle, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, first, children, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, detectStrictConformance, normalizeStrictXml, relayoutSmartArt, themeColorRefToSolidFillWithOpacity, FONT_ADVANCE_TABLES, DEFAULT_FONT_ADVANCE_TABLE, measureTextWidth, applyDrawingColorTransforms, applyThemeToData, detectFileFormat, parseOle2, EncryptedFileError, decryptPptx, encryptPptx, encodeXmlAttributeValue, encodeXmlTextValue, svgToCustomGeometryPaths, IncorrectPasswordError, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, supportsChartGradientFill, DEFAULT_CHART_GRADIENT_ANGLE, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, stripXmlOrderMarkers, normalizeStShapeType, applyCustomShows, applySections, reorderObjectKeysByLocalName, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, backgroundStyleRefIsCurrent, backgroundRefNode, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, detectOleObjectType, inferOleExtensionFromTarget, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, deriveSlideTitles, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, cloneSlide, parseDrawingFraction, scrgbLinearToSrgb8, parseDrawingHueDegrees, hslToRgb, themeColorRefToXml, effectChild, mergeEffectNode, mergeAttributeEffectNode, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, estimateMediaDurationMs, parseVmlElements, parseDrawingLineDash, parseLineSpacingMultiplier, parseLineSpacingExactPt, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, DEFAULT_MAX_UNCOMPRESSED_BYTES, guardZip, ZipBombError, MAX_ZIP_ENTRY_COUNT, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, themeColorRefFromSchemeClr, extractGuidFromPartName, deobfuscateFont, detectFontFormat, parseKinsoku, parseLineStyle, parseChartUpDownBars, parseDataTable, parseChart3DSurfaces, parseChartAxes, parseBubbleChartOptions, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, parseSeriesDataPoints, parseMarker, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, relAttr, buildXml, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, parseSmartArtLayoutDefinition, parseSmartArtPresLayoutVars, readChartManualLayoutValues, parseSmartArtConnection, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, parseSmartArtQuickStyleLabels, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, blendColorOntoWhite, CHART_ERROR_VALUE_TYPES, CHART_ERROR_BAR_TYPES, CHART_ERROR_BAR_DIRECTIONS } from './chunk-O6ISWI34.mjs';
|
|
2
2
|
import { hasShapeProperties, hasTextProperties } from './chunk-GXHKNSZX.mjs';
|
|
3
3
|
import { EMU_PER_PX, EMU_PER_PIXEL, SYSTEM_COLOR_MAP, PRESET_COLOR_MAP, OOXML_PERCENT_UNITS, EMU_PER_POINT } from './chunk-CA7KCNL3.mjs';
|
|
4
4
|
import JSZip from 'jszip';
|
|
@@ -48210,7 +48210,7 @@ async function tiffToPicture(bytes) {
|
|
|
48210
48210
|
try {
|
|
48211
48211
|
const imported = await import('utif');
|
|
48212
48212
|
const utif = "default" in imported ? imported.default : imported;
|
|
48213
|
-
const buffer = bytes
|
|
48213
|
+
const buffer = new Uint8Array(bytes).buffer;
|
|
48214
48214
|
const page = utif.decode(buffer)[0];
|
|
48215
48215
|
if (!page) {
|
|
48216
48216
|
return void 0;
|
|
@@ -86106,7 +86106,7 @@ async function inflateZlib(data) {
|
|
|
86106
86106
|
return void 0;
|
|
86107
86107
|
}
|
|
86108
86108
|
try {
|
|
86109
|
-
const stream = new Blob([data
|
|
86109
|
+
const stream = new Blob([new Uint8Array(data).buffer]).stream().pipeThrough(new DecompressionStream("deflate"));
|
|
86110
86110
|
const reader = stream.getReader();
|
|
86111
86111
|
const chunks = [];
|
|
86112
86112
|
let total = 0;
|
|
@@ -29778,7 +29778,7 @@ function toArrayBuffer(bytes) {
|
|
|
29778
29778
|
if (bytes.byteOffset === 0 && bytes.byteLength === bytes.buffer.byteLength) {
|
|
29779
29779
|
return bytes.buffer;
|
|
29780
29780
|
}
|
|
29781
|
-
return bytes
|
|
29781
|
+
return new Uint8Array(bytes).buffer;
|
|
29782
29782
|
}
|
|
29783
29783
|
function isCompoundFile(input) {
|
|
29784
29784
|
const bytes = toBytes(input);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { hasTextProperties, isImageLikeElement, blobUrlToDataUrl, getSubstituteFontFamily, stripXmlOrderSuffix } from './chunk-
|
|
1
|
+
import { hasTextProperties, isImageLikeElement, blobUrlToDataUrl, getSubstituteFontFamily, stripXmlOrderSuffix } from './chunk-2AFO3HNI.mjs';
|
|
2
2
|
|
|
3
3
|
// pptx/converter/media-context.ts
|
|
4
4
|
var MIME_TO_EXT = {
|
|
@@ -29784,7 +29784,7 @@ function toArrayBuffer(bytes) {
|
|
|
29784
29784
|
if (bytes.byteOffset === 0 && bytes.byteLength === bytes.buffer.byteLength) {
|
|
29785
29785
|
return bytes.buffer;
|
|
29786
29786
|
}
|
|
29787
|
-
return bytes
|
|
29787
|
+
return new Uint8Array(bytes).buffer;
|
|
29788
29788
|
}
|
|
29789
29789
|
function isCompoundFile(input) {
|
|
29790
29790
|
const bytes = toBytes(input);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NS, 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, parseParagraphSpacingPx, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseStructuredCustomGeometry, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, evaluateGeometryPaths, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, remapElementShapeIds, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, orderedXmlKey, safeResolveZipPath, parseXml, elements, parseDataUrlToBytes, base64Decode, EMU_PER_PX, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, hasShapeProperties, ensureXmlChild, hasTextProperties, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, serializeTabStop, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, applyChartManualLayout, chartTrendlineType, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, applyDiagramRelationshipIds, buildSaveTimeCustomGeometryXml, applyCustomGeometryGuideOverrides, avLstForPreset, filterValidShapeAdjustmentEntries, applyDrawingMediaReference, XML_PROLOG, DGM_XMLNS, xmlEscape, writeBodyPrBooleanAttrs, applyTextBodySp3d, writeShapeEffects, SHAPE_STYLE_ORDER, roundCoordinate, scaleVectorToIntegers, EMU_PER_PIXEL, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, getSignaturePathsToStrip, mergeSmartArtPointXml, mergeSmartArtConnectionXml, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseChartUserShapesDrawing, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, ensureXmlChildren, TC_PR_BORDERS_ORDER, writeChartColorChoice, parseChartFormulaRange, expandRangeAddresses, applyCellWritesToWorksheet, stripParentDirSegments, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, preservesSpreadsheetXmlWhitespace, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, fetchUrlToBytes, parseChartWideTextStyle, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, blobUrlToDataUrl, first, children, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, SvgExporter, detectStrictConformance, normalizeStrictXml, normalizeStShapeType, applyCustomShows, applySections, reorderObjectKeysByLocalName, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, backgroundStyleRefIsCurrent, backgroundRefNode, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, detectOleObjectType, inferOleExtensionFromTarget, deriveSlideTitles, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, encodeXmlAttributeValue, encodeXmlTextValue, stripXmlOrderMarkers, MIN_ELEMENT_SIZE, createDrawingObjectId, DEFAULT_TEXT_FONT_SIZE, EncryptedFileError, decodePptxJsonText, deserializePptxFromJson, applyImportedPptxData, DEFAULT_CHART_GRADIENT_ANGLE, supportsChartGradientFill, svgToCustomGeometryPaths, escAttr, MIN_TABLE_DIMENSION, MAX_TABLE_DIMENSION, SYSTEM_COLOR_MAP, PRESET_COLOR_MAP, effectChild, mergeEffectNode, mergeAttributeEffectNode, estimateMediaDurationMs, parseVmlElements, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, IncorrectPasswordError, applyThemeToData, detectFileFormat, parseOle2, decryptPptx, encryptPptx, escText, parseDrawingLineDash, 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, gradFill, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, extractGuidFromPartName, deobfuscateFont, detectFontFormat, parseKinsoku, parseLineStyle, parseChartUpDownBars, parseDataTable, parseChart3DSurfaces, parseChartAxes, parseBubbleChartOptions, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, parseSeriesDataPoints, parseMarker, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, relAttr, buildXml, EMU_PER_POINT, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, parseSmartArtPresLayoutVars, readChartManualLayoutValues, parseSmartArtConnection, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, parseSmartArtQuickStyleLabels, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, getElementOrientationMatrix, isTextOrientationMatrix, TEXT_ORIENTATION_IDENTITY, multiplyTextOrientationMatrices, CHART_ERROR_VALUE_TYPES, CHART_ERROR_BAR_TYPES, CHART_ERROR_BAR_DIRECTIONS } from './chunk-
|
|
1
|
+
import { NS, 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, parseParagraphSpacingPx, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseStructuredCustomGeometry, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, evaluateGeometryPaths, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, remapElementShapeIds, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, orderedXmlKey, safeResolveZipPath, parseXml, elements, parseDataUrlToBytes, base64Decode, EMU_PER_PX, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, hasShapeProperties, ensureXmlChild, hasTextProperties, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, serializeTabStop, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, applyChartManualLayout, chartTrendlineType, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, applyDiagramRelationshipIds, buildSaveTimeCustomGeometryXml, applyCustomGeometryGuideOverrides, avLstForPreset, filterValidShapeAdjustmentEntries, applyDrawingMediaReference, XML_PROLOG, DGM_XMLNS, xmlEscape, writeBodyPrBooleanAttrs, applyTextBodySp3d, writeShapeEffects, SHAPE_STYLE_ORDER, roundCoordinate, scaleVectorToIntegers, EMU_PER_PIXEL, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, getSignaturePathsToStrip, mergeSmartArtPointXml, mergeSmartArtConnectionXml, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseChartUserShapesDrawing, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, ensureXmlChildren, TC_PR_BORDERS_ORDER, writeChartColorChoice, parseChartFormulaRange, expandRangeAddresses, applyCellWritesToWorksheet, stripParentDirSegments, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, preservesSpreadsheetXmlWhitespace, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, fetchUrlToBytes, parseChartWideTextStyle, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, blobUrlToDataUrl, first, children, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, SvgExporter, detectStrictConformance, normalizeStrictXml, normalizeStShapeType, applyCustomShows, applySections, reorderObjectKeysByLocalName, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, backgroundStyleRefIsCurrent, backgroundRefNode, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, detectOleObjectType, inferOleExtensionFromTarget, deriveSlideTitles, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, encodeXmlAttributeValue, encodeXmlTextValue, stripXmlOrderMarkers, MIN_ELEMENT_SIZE, createDrawingObjectId, DEFAULT_TEXT_FONT_SIZE, EncryptedFileError, decodePptxJsonText, deserializePptxFromJson, applyImportedPptxData, DEFAULT_CHART_GRADIENT_ANGLE, supportsChartGradientFill, svgToCustomGeometryPaths, escAttr, MIN_TABLE_DIMENSION, MAX_TABLE_DIMENSION, SYSTEM_COLOR_MAP, PRESET_COLOR_MAP, effectChild, mergeEffectNode, mergeAttributeEffectNode, estimateMediaDurationMs, parseVmlElements, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, IncorrectPasswordError, applyThemeToData, detectFileFormat, parseOle2, decryptPptx, encryptPptx, escText, parseDrawingLineDash, 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, gradFill, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, extractGuidFromPartName, deobfuscateFont, detectFontFormat, parseKinsoku, parseLineStyle, parseChartUpDownBars, parseDataTable, parseChart3DSurfaces, parseChartAxes, parseBubbleChartOptions, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, parseSeriesDataPoints, parseMarker, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, relAttr, buildXml, EMU_PER_POINT, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, parseSmartArtPresLayoutVars, readChartManualLayoutValues, parseSmartArtConnection, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, parseSmartArtQuickStyleLabels, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, getElementOrientationMatrix, isTextOrientationMatrix, TEXT_ORIENTATION_IDENTITY, multiplyTextOrientationMatrices, CHART_ERROR_VALUE_TYPES, CHART_ERROR_BAR_TYPES, CHART_ERROR_BAR_DIRECTIONS } from './chunk-2AFO3HNI.mjs';
|
|
2
2
|
import { openPptxZip, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, openNestedZip, DEFAULT_MAX_UNCOMPRESSED_BYTES, guardZip, ZipBombError, MAX_ZIP_ENTRY_COUNT } from './chunk-GBKBR4CX.mjs';
|
|
3
3
|
import { resolveSmartArtLayoutCategory } from './chunk-3GXV5MPC.mjs';
|
|
4
4
|
import { cloneXmlObject, applySmartArtLayoutDefinition, cloneSlide, parseSmartArtLayoutDefinition } from './chunk-54S5A5PZ.mjs';
|
|
@@ -47540,7 +47540,7 @@ async function tiffToPicture(bytes) {
|
|
|
47540
47540
|
try {
|
|
47541
47541
|
const imported = await import('utif');
|
|
47542
47542
|
const utif = "default" in imported ? imported.default : imported;
|
|
47543
|
-
const buffer = bytes
|
|
47543
|
+
const buffer = new Uint8Array(bytes).buffer;
|
|
47544
47544
|
const page = utif.decode(buffer)[0];
|
|
47545
47545
|
if (!page) {
|
|
47546
47546
|
return void 0;
|
|
@@ -85194,7 +85194,7 @@ async function inflateZlib(data) {
|
|
|
85194
85194
|
return void 0;
|
|
85195
85195
|
}
|
|
85196
85196
|
try {
|
|
85197
|
-
const stream = new Blob([data
|
|
85197
|
+
const stream = new Blob([new Uint8Array(data).buffer]).stream().pipeThrough(new DecompressionStream("deflate"));
|
|
85198
85198
|
const reader = stream.getReader();
|
|
85199
85199
|
const chunks = [];
|
|
85200
85200
|
let total = 0;
|
package/dist/crypto/detect.d.ts
CHANGED
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
/** Bytes as a Uint8Array (no copy). */
|
|
10
10
|
export declare const toBytes: (input: Uint8Array | ArrayBuffer) => Uint8Array;
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* An ArrayBuffer holding exactly `bytes` (copied only when it is a view of a larger buffer). The copy
|
|
13
|
+
* goes through the Uint8Array constructor because `slice()` on a Node Buffer is a view, not a copy:
|
|
14
|
+
* a small Buffer sits inside Node's shared allocation pool, so its `.buffer` is the whole pool.
|
|
15
|
+
*/
|
|
12
16
|
export declare function toArrayBuffer(bytes: Uint8Array): ArrayBuffer;
|
|
13
17
|
/** Whether the bytes start with the compound-file magic. */
|
|
14
18
|
export declare function isCompoundFile(input: Uint8Array | ArrayBuffer): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../../crypto/detect.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,uCAAuC;AACvC,eAAO,MAAM,OAAO,UAAW,UAAU,GAAG,WAAW,KAAG,UACE,CAAC;AAE7D
|
|
1
|
+
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../../crypto/detect.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,uCAAuC;AACvC,eAAO,MAAM,OAAO,UAAW,UAAU,GAAG,WAAW,KAAG,UACE,CAAC;AAE7D;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,WAAW,CAK5D;AAED,4DAA4D;AAC5D,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAGvE;AAED,+CAA+C;AAC/C,MAAM,WAAW,uBAAuB;IACvC,cAAc,EAAE,UAAU,CAAC;IAC3B,gBAAgB,EAAE,UAAU,CAAC;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CACnC,KAAK,EAAE,UAAU,GAAG,WAAW,GAC7B,uBAAuB,GAAG,SAAS,CAarC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAShF;AAED,+FAA+F;AAC/F,MAAM,MAAM,mBAAmB,GAC5B;IAAE,MAAM,EAAE,KAAK,CAAC;IAAC,SAAS,EAAE,KAAK,CAAA;CAAE,GACnC;IAAE,MAAM,EAAE,KAAK,CAAC;IAAC,SAAS,EAAE,IAAI,CAAA;CAAE,GAClC;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,KAAK,CAAA;CAAE,CAAC;AAE3C;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU,GAAG,mBAAmB,CAMpF;AAED;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;IAC5C,SAAgB,WAAW,QAAQ;IAEnC,YAAmB,OAAO,EAAE,MAAM,EAGjC;CACD"}
|
package/dist/crypto/index.cjs
CHANGED
|
@@ -2635,7 +2635,7 @@ function toArrayBuffer(bytes) {
|
|
|
2635
2635
|
if (bytes.byteOffset === 0 && bytes.byteLength === bytes.buffer.byteLength) {
|
|
2636
2636
|
return bytes.buffer;
|
|
2637
2637
|
}
|
|
2638
|
-
return bytes
|
|
2638
|
+
return new Uint8Array(bytes).buffer;
|
|
2639
2639
|
}
|
|
2640
2640
|
function isCompoundFile(input) {
|
|
2641
2641
|
const bytes = toBytes(input);
|
package/dist/crypto/index.mjs
CHANGED
|
@@ -2633,7 +2633,7 @@ function toArrayBuffer(bytes) {
|
|
|
2633
2633
|
if (bytes.byteOffset === 0 && bytes.byteLength === bytes.buffer.byteLength) {
|
|
2634
2634
|
return bytes.buffer;
|
|
2635
2635
|
}
|
|
2636
|
-
return bytes
|
|
2636
|
+
return new Uint8Array(bytes).buffer;
|
|
2637
2637
|
}
|
|
2638
2638
|
function isCompoundFile(input) {
|
|
2639
2639
|
const bytes = toBytes(input);
|
package/dist/docx/embedded.cjs
CHANGED
|
@@ -3150,7 +3150,24 @@ function controlIds(doc) {
|
|
|
3150
3150
|
}
|
|
3151
3151
|
var unusedControlId = (doc) => freshControlId(controlIds(doc));
|
|
3152
3152
|
var holdsRowsOrCells = (node) => node?.nodeType === 1 && ["tr", "tc", "sdt", "customXml"].some((name) => named2(node, name));
|
|
3153
|
+
function markersIntoContent(sdt) {
|
|
3154
|
+
const content = sdtContent(sdt);
|
|
3155
|
+
if (!content) return;
|
|
3156
|
+
const anchor = content.firstChild;
|
|
3157
|
+
let after = false;
|
|
3158
|
+
for (const child4 of Array.from(sdt.childNodes)) {
|
|
3159
|
+
if (child4 === content) {
|
|
3160
|
+
after = true;
|
|
3161
|
+
continue;
|
|
3162
|
+
}
|
|
3163
|
+
const element2 = child4;
|
|
3164
|
+
if (child4.nodeType !== 1 || named2(element2, "sdtPr") || named2(element2, "sdtEndPr")) continue;
|
|
3165
|
+
if (after) content.appendChild(child4);
|
|
3166
|
+
else content.insertBefore(child4, anchor);
|
|
3167
|
+
}
|
|
3168
|
+
}
|
|
3153
3169
|
function takeOut(doc, element2, sdt) {
|
|
3170
|
+
markersIntoContent(sdt);
|
|
3154
3171
|
const content = element2.parentNode;
|
|
3155
3172
|
const parent = sdt.parentNode;
|
|
3156
3173
|
const siblings = (from, step) => {
|
|
@@ -3205,7 +3222,9 @@ function placeTableControl(doc, element2, next, base) {
|
|
|
3205
3222
|
}
|
|
3206
3223
|
const shared = isSdt(before) && sdtContent(before);
|
|
3207
3224
|
const { id } = next;
|
|
3208
|
-
|
|
3225
|
+
const joins = shared && typeof id === "string" && (createdFor.get(before) ?? idOf(before)) === id;
|
|
3226
|
+
if (joins) {
|
|
3227
|
+
markersIntoContent(before);
|
|
3209
3228
|
for (const node of [...between, element2]) shared.appendChild(node);
|
|
3210
3229
|
return;
|
|
3211
3230
|
}
|
|
@@ -3222,6 +3241,10 @@ function unwrapDroppedControls(elements2, next) {
|
|
|
3222
3241
|
if (sdt) kept.set(sdt, Boolean(kept.get(sdt)) || next[index] !== void 0);
|
|
3223
3242
|
});
|
|
3224
3243
|
for (const [sdt, keep] of kept) if (!keep) unwrapContentControl(sdt);
|
|
3244
|
+
elements2.forEach((element2, index) => {
|
|
3245
|
+
const sdt = next[index] === void 0 ? enclosingSdt(element2) : void 0;
|
|
3246
|
+
if (sdt) takeOut(element2.ownerDocument, element2, sdt);
|
|
3247
|
+
});
|
|
3225
3248
|
}
|
|
3226
3249
|
|
|
3227
3250
|
// docx/write-table.ts
|
package/dist/docx/embedded.mjs
CHANGED
|
@@ -3144,7 +3144,24 @@ function controlIds(doc) {
|
|
|
3144
3144
|
}
|
|
3145
3145
|
var unusedControlId = (doc) => freshControlId(controlIds(doc));
|
|
3146
3146
|
var holdsRowsOrCells = (node) => node?.nodeType === 1 && ["tr", "tc", "sdt", "customXml"].some((name) => named2(node, name));
|
|
3147
|
+
function markersIntoContent(sdt) {
|
|
3148
|
+
const content = sdtContent(sdt);
|
|
3149
|
+
if (!content) return;
|
|
3150
|
+
const anchor = content.firstChild;
|
|
3151
|
+
let after = false;
|
|
3152
|
+
for (const child4 of Array.from(sdt.childNodes)) {
|
|
3153
|
+
if (child4 === content) {
|
|
3154
|
+
after = true;
|
|
3155
|
+
continue;
|
|
3156
|
+
}
|
|
3157
|
+
const element2 = child4;
|
|
3158
|
+
if (child4.nodeType !== 1 || named2(element2, "sdtPr") || named2(element2, "sdtEndPr")) continue;
|
|
3159
|
+
if (after) content.appendChild(child4);
|
|
3160
|
+
else content.insertBefore(child4, anchor);
|
|
3161
|
+
}
|
|
3162
|
+
}
|
|
3147
3163
|
function takeOut(doc, element2, sdt) {
|
|
3164
|
+
markersIntoContent(sdt);
|
|
3148
3165
|
const content = element2.parentNode;
|
|
3149
3166
|
const parent = sdt.parentNode;
|
|
3150
3167
|
const siblings = (from, step) => {
|
|
@@ -3199,7 +3216,9 @@ function placeTableControl(doc, element2, next, base) {
|
|
|
3199
3216
|
}
|
|
3200
3217
|
const shared = isSdt(before) && sdtContent(before);
|
|
3201
3218
|
const { id } = next;
|
|
3202
|
-
|
|
3219
|
+
const joins = shared && typeof id === "string" && (createdFor.get(before) ?? idOf(before)) === id;
|
|
3220
|
+
if (joins) {
|
|
3221
|
+
markersIntoContent(before);
|
|
3203
3222
|
for (const node of [...between, element2]) shared.appendChild(node);
|
|
3204
3223
|
return;
|
|
3205
3224
|
}
|
|
@@ -3216,6 +3235,10 @@ function unwrapDroppedControls(elements2, next) {
|
|
|
3216
3235
|
if (sdt) kept.set(sdt, Boolean(kept.get(sdt)) || next[index] !== void 0);
|
|
3217
3236
|
});
|
|
3218
3237
|
for (const [sdt, keep] of kept) if (!keep) unwrapContentControl(sdt);
|
|
3238
|
+
elements2.forEach((element2, index) => {
|
|
3239
|
+
const sdt = next[index] === void 0 ? enclosingSdt(element2) : void 0;
|
|
3240
|
+
if (sdt) takeOut(element2.ownerDocument, element2, sdt);
|
|
3241
|
+
});
|
|
3219
3242
|
}
|
|
3220
3243
|
|
|
3221
3244
|
// docx/write-table.ts
|
package/dist/docx/index.cjs
CHANGED
|
@@ -4264,7 +4264,24 @@ function controlIds(doc) {
|
|
|
4264
4264
|
}
|
|
4265
4265
|
var unusedControlId = (doc) => freshControlId(controlIds(doc));
|
|
4266
4266
|
var holdsRowsOrCells = (node) => node?.nodeType === 1 && ["tr", "tc", "sdt", "customXml"].some((name) => named2(node, name));
|
|
4267
|
+
function markersIntoContent(sdt) {
|
|
4268
|
+
const content = sdtContent(sdt);
|
|
4269
|
+
if (!content) return;
|
|
4270
|
+
const anchor = content.firstChild;
|
|
4271
|
+
let after = false;
|
|
4272
|
+
for (const child4 of Array.from(sdt.childNodes)) {
|
|
4273
|
+
if (child4 === content) {
|
|
4274
|
+
after = true;
|
|
4275
|
+
continue;
|
|
4276
|
+
}
|
|
4277
|
+
const element2 = child4;
|
|
4278
|
+
if (child4.nodeType !== 1 || named2(element2, "sdtPr") || named2(element2, "sdtEndPr")) continue;
|
|
4279
|
+
if (after) content.appendChild(child4);
|
|
4280
|
+
else content.insertBefore(child4, anchor);
|
|
4281
|
+
}
|
|
4282
|
+
}
|
|
4267
4283
|
function takeOut(doc, element2, sdt) {
|
|
4284
|
+
markersIntoContent(sdt);
|
|
4268
4285
|
const content = element2.parentNode;
|
|
4269
4286
|
const parent = sdt.parentNode;
|
|
4270
4287
|
const siblings = (from, step) => {
|
|
@@ -4319,7 +4336,9 @@ function placeTableControl(doc, element2, next, base) {
|
|
|
4319
4336
|
}
|
|
4320
4337
|
const shared = isSdt(before) && sdtContent(before);
|
|
4321
4338
|
const { id } = next;
|
|
4322
|
-
|
|
4339
|
+
const joins = shared && typeof id === "string" && (createdFor.get(before) ?? idOf(before)) === id;
|
|
4340
|
+
if (joins) {
|
|
4341
|
+
markersIntoContent(before);
|
|
4323
4342
|
for (const node of [...between, element2]) shared.appendChild(node);
|
|
4324
4343
|
return;
|
|
4325
4344
|
}
|
|
@@ -4336,6 +4355,10 @@ function unwrapDroppedControls(elements2, next) {
|
|
|
4336
4355
|
if (sdt) kept.set(sdt, Boolean(kept.get(sdt)) || next[index] !== void 0);
|
|
4337
4356
|
});
|
|
4338
4357
|
for (const [sdt, keep] of kept) if (!keep) unwrapContentControl(sdt);
|
|
4358
|
+
elements2.forEach((element2, index) => {
|
|
4359
|
+
const sdt = next[index] === void 0 ? enclosingSdt(element2) : void 0;
|
|
4360
|
+
if (sdt) takeOut(element2.ownerDocument, element2, sdt);
|
|
4361
|
+
});
|
|
4339
4362
|
}
|
|
4340
4363
|
|
|
4341
4364
|
// docx/write-table.ts
|
package/dist/docx/index.mjs
CHANGED
|
@@ -4258,7 +4258,24 @@ function controlIds(doc) {
|
|
|
4258
4258
|
}
|
|
4259
4259
|
var unusedControlId = (doc) => freshControlId(controlIds(doc));
|
|
4260
4260
|
var holdsRowsOrCells = (node) => node?.nodeType === 1 && ["tr", "tc", "sdt", "customXml"].some((name) => named2(node, name));
|
|
4261
|
+
function markersIntoContent(sdt) {
|
|
4262
|
+
const content = sdtContent(sdt);
|
|
4263
|
+
if (!content) return;
|
|
4264
|
+
const anchor = content.firstChild;
|
|
4265
|
+
let after = false;
|
|
4266
|
+
for (const child4 of Array.from(sdt.childNodes)) {
|
|
4267
|
+
if (child4 === content) {
|
|
4268
|
+
after = true;
|
|
4269
|
+
continue;
|
|
4270
|
+
}
|
|
4271
|
+
const element2 = child4;
|
|
4272
|
+
if (child4.nodeType !== 1 || named2(element2, "sdtPr") || named2(element2, "sdtEndPr")) continue;
|
|
4273
|
+
if (after) content.appendChild(child4);
|
|
4274
|
+
else content.insertBefore(child4, anchor);
|
|
4275
|
+
}
|
|
4276
|
+
}
|
|
4261
4277
|
function takeOut(doc, element2, sdt) {
|
|
4278
|
+
markersIntoContent(sdt);
|
|
4262
4279
|
const content = element2.parentNode;
|
|
4263
4280
|
const parent = sdt.parentNode;
|
|
4264
4281
|
const siblings = (from, step) => {
|
|
@@ -4313,7 +4330,9 @@ function placeTableControl(doc, element2, next, base) {
|
|
|
4313
4330
|
}
|
|
4314
4331
|
const shared = isSdt(before) && sdtContent(before);
|
|
4315
4332
|
const { id } = next;
|
|
4316
|
-
|
|
4333
|
+
const joins = shared && typeof id === "string" && (createdFor.get(before) ?? idOf(before)) === id;
|
|
4334
|
+
if (joins) {
|
|
4335
|
+
markersIntoContent(before);
|
|
4317
4336
|
for (const node of [...between, element2]) shared.appendChild(node);
|
|
4318
4337
|
return;
|
|
4319
4338
|
}
|
|
@@ -4330,6 +4349,10 @@ function unwrapDroppedControls(elements2, next) {
|
|
|
4330
4349
|
if (sdt) kept.set(sdt, Boolean(kept.get(sdt)) || next[index] !== void 0);
|
|
4331
4350
|
});
|
|
4332
4351
|
for (const [sdt, keep] of kept) if (!keep) unwrapContentControl(sdt);
|
|
4352
|
+
elements2.forEach((element2, index) => {
|
|
4353
|
+
const sdt = next[index] === void 0 ? enclosingSdt(element2) : void 0;
|
|
4354
|
+
if (sdt) takeOut(element2.ownerDocument, element2, sdt);
|
|
4355
|
+
});
|
|
4333
4356
|
}
|
|
4334
4357
|
|
|
4335
4358
|
// docx/write-table.ts
|
package/dist/docx/load/index.cjs
CHANGED
|
@@ -2619,7 +2619,7 @@ function toArrayBuffer(bytes) {
|
|
|
2619
2619
|
if (bytes.byteOffset === 0 && bytes.byteLength === bytes.buffer.byteLength) {
|
|
2620
2620
|
return bytes.buffer;
|
|
2621
2621
|
}
|
|
2622
|
-
return bytes
|
|
2622
|
+
return new Uint8Array(bytes).buffer;
|
|
2623
2623
|
}
|
|
2624
2624
|
function isCompoundFile(input) {
|
|
2625
2625
|
const bytes = toBytes(input);
|
|
@@ -5613,7 +5613,24 @@ function controlIds(doc) {
|
|
|
5613
5613
|
}
|
|
5614
5614
|
var unusedControlId = (doc) => freshControlId(controlIds(doc));
|
|
5615
5615
|
var holdsRowsOrCells = (node) => node?.nodeType === 1 && ["tr", "tc", "sdt", "customXml"].some((name) => named2(node, name));
|
|
5616
|
+
function markersIntoContent(sdt) {
|
|
5617
|
+
const content = sdtContent(sdt);
|
|
5618
|
+
if (!content) return;
|
|
5619
|
+
const anchor = content.firstChild;
|
|
5620
|
+
let after = false;
|
|
5621
|
+
for (const child5 of Array.from(sdt.childNodes)) {
|
|
5622
|
+
if (child5 === content) {
|
|
5623
|
+
after = true;
|
|
5624
|
+
continue;
|
|
5625
|
+
}
|
|
5626
|
+
const element2 = child5;
|
|
5627
|
+
if (child5.nodeType !== 1 || named2(element2, "sdtPr") || named2(element2, "sdtEndPr")) continue;
|
|
5628
|
+
if (after) content.appendChild(child5);
|
|
5629
|
+
else content.insertBefore(child5, anchor);
|
|
5630
|
+
}
|
|
5631
|
+
}
|
|
5616
5632
|
function takeOut(doc, element2, sdt) {
|
|
5633
|
+
markersIntoContent(sdt);
|
|
5617
5634
|
const content = element2.parentNode;
|
|
5618
5635
|
const parent = sdt.parentNode;
|
|
5619
5636
|
const siblings = (from, step) => {
|
|
@@ -5668,7 +5685,9 @@ function placeTableControl(doc, element2, next, base) {
|
|
|
5668
5685
|
}
|
|
5669
5686
|
const shared = isSdt(before) && sdtContent(before);
|
|
5670
5687
|
const { id } = next;
|
|
5671
|
-
|
|
5688
|
+
const joins = shared && typeof id === "string" && (createdFor.get(before) ?? idOf(before)) === id;
|
|
5689
|
+
if (joins) {
|
|
5690
|
+
markersIntoContent(before);
|
|
5672
5691
|
for (const node of [...between, element2]) shared.appendChild(node);
|
|
5673
5692
|
return;
|
|
5674
5693
|
}
|
|
@@ -5685,6 +5704,10 @@ function unwrapDroppedControls(elements2, next) {
|
|
|
5685
5704
|
if (sdt) kept.set(sdt, Boolean(kept.get(sdt)) || next[index] !== void 0);
|
|
5686
5705
|
});
|
|
5687
5706
|
for (const [sdt, keep] of kept) if (!keep) unwrapContentControl(sdt);
|
|
5707
|
+
elements2.forEach((element2, index) => {
|
|
5708
|
+
const sdt = next[index] === void 0 ? enclosingSdt(element2) : void 0;
|
|
5709
|
+
if (sdt) takeOut(element2.ownerDocument, element2, sdt);
|
|
5710
|
+
});
|
|
5688
5711
|
}
|
|
5689
5712
|
|
|
5690
5713
|
// docx/write-table.ts
|
package/dist/docx/load/index.mjs
CHANGED
|
@@ -2613,7 +2613,7 @@ function toArrayBuffer(bytes) {
|
|
|
2613
2613
|
if (bytes.byteOffset === 0 && bytes.byteLength === bytes.buffer.byteLength) {
|
|
2614
2614
|
return bytes.buffer;
|
|
2615
2615
|
}
|
|
2616
|
-
return bytes
|
|
2616
|
+
return new Uint8Array(bytes).buffer;
|
|
2617
2617
|
}
|
|
2618
2618
|
function isCompoundFile(input) {
|
|
2619
2619
|
const bytes = toBytes(input);
|
|
@@ -5607,7 +5607,24 @@ function controlIds(doc) {
|
|
|
5607
5607
|
}
|
|
5608
5608
|
var unusedControlId = (doc) => freshControlId(controlIds(doc));
|
|
5609
5609
|
var holdsRowsOrCells = (node) => node?.nodeType === 1 && ["tr", "tc", "sdt", "customXml"].some((name) => named2(node, name));
|
|
5610
|
+
function markersIntoContent(sdt) {
|
|
5611
|
+
const content = sdtContent(sdt);
|
|
5612
|
+
if (!content) return;
|
|
5613
|
+
const anchor = content.firstChild;
|
|
5614
|
+
let after = false;
|
|
5615
|
+
for (const child5 of Array.from(sdt.childNodes)) {
|
|
5616
|
+
if (child5 === content) {
|
|
5617
|
+
after = true;
|
|
5618
|
+
continue;
|
|
5619
|
+
}
|
|
5620
|
+
const element2 = child5;
|
|
5621
|
+
if (child5.nodeType !== 1 || named2(element2, "sdtPr") || named2(element2, "sdtEndPr")) continue;
|
|
5622
|
+
if (after) content.appendChild(child5);
|
|
5623
|
+
else content.insertBefore(child5, anchor);
|
|
5624
|
+
}
|
|
5625
|
+
}
|
|
5610
5626
|
function takeOut(doc, element2, sdt) {
|
|
5627
|
+
markersIntoContent(sdt);
|
|
5611
5628
|
const content = element2.parentNode;
|
|
5612
5629
|
const parent = sdt.parentNode;
|
|
5613
5630
|
const siblings = (from, step) => {
|
|
@@ -5662,7 +5679,9 @@ function placeTableControl(doc, element2, next, base) {
|
|
|
5662
5679
|
}
|
|
5663
5680
|
const shared = isSdt(before) && sdtContent(before);
|
|
5664
5681
|
const { id } = next;
|
|
5665
|
-
|
|
5682
|
+
const joins = shared && typeof id === "string" && (createdFor.get(before) ?? idOf(before)) === id;
|
|
5683
|
+
if (joins) {
|
|
5684
|
+
markersIntoContent(before);
|
|
5666
5685
|
for (const node of [...between, element2]) shared.appendChild(node);
|
|
5667
5686
|
return;
|
|
5668
5687
|
}
|
|
@@ -5679,6 +5698,10 @@ function unwrapDroppedControls(elements2, next) {
|
|
|
5679
5698
|
if (sdt) kept.set(sdt, Boolean(kept.get(sdt)) || next[index] !== void 0);
|
|
5680
5699
|
});
|
|
5681
5700
|
for (const [sdt, keep] of kept) if (!keep) unwrapContentControl(sdt);
|
|
5701
|
+
elements2.forEach((element2, index) => {
|
|
5702
|
+
const sdt = next[index] === void 0 ? enclosingSdt(element2) : void 0;
|
|
5703
|
+
if (sdt) takeOut(element2.ownerDocument, element2, sdt);
|
|
5704
|
+
});
|
|
5682
5705
|
}
|
|
5683
5706
|
|
|
5684
5707
|
// docx/write-table.ts
|
|
@@ -7,7 +7,7 @@ import { type ControlSpan } from './content-control-spans.js';
|
|
|
7
7
|
export declare const CONTROL_EDIT_META = "dve-content-control";
|
|
8
8
|
/**
|
|
9
9
|
* Replaces a control's content (and its state) as one edit. An inline control's text is replaced;
|
|
10
|
-
* a cell control's cell
|
|
10
|
+
* a cell control's cell holds the new text in its first paragraph (`cellContent`).
|
|
11
11
|
*/
|
|
12
12
|
export declare function replaceControlContent(state: EditorState, span: ControlSpan, edit: ControlChange): Transaction;
|
|
13
13
|
/** Stores new properties on every run or paragraph of the control. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-control-commands.d.ts","sourceRoot":"","sources":["../../../docx/ui/content-control-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,EAAa,KAAK,IAAI,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EAAiB,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACtF,OAAO,EAWN,KAAK,aAAa,EAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEN,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAIN,KAAK,WAAW,EAChB,MAAM,yBAAyB,CAAC;AAEjC,6FAA6F;AAC7F,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"content-control-commands.d.ts","sourceRoot":"","sources":["../../../docx/ui/content-control-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,EAAa,KAAK,IAAI,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EAAiB,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACtF,OAAO,EAWN,KAAK,aAAa,EAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEN,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAIN,KAAK,WAAW,EAChB,MAAM,yBAAyB,CAAC;AAEjC,6FAA6F;AAC7F,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AAsHvD;;;GAGG;AACH,wBAAgB,qBAAqB,CACpC,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,WAAW,EACjB,IAAI,EAAE,aAAa,GACjB,WAAW,CAyBb;AAmCD,sEAAsE;AACtE,wBAAgB,uBAAuB,CACtC,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,cAAc,GACrB,WAAW,CAiBb;AAgBD,wBAAgB,qBAAqB,CACpC,KAAK,EAAE,WAAW,EAClB,EAAE,EAAE,MAAM,EACV,EAAE,CAAC,EAAE,MAAM,GACT,WAAW,GAAG,SAAS,CAUzB;AAED,wBAAgB,cAAc,CAC7B,KAAK,EAAE,WAAW,EAClB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,EAAE,CAAC,EAAE,MAAM,GACT,WAAW,GAAG,SAAS,CAKzB;AAED,wBAAgB,UAAU,CACzB,KAAK,EAAE,WAAW,EAClB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,IAAI,EACV,EAAE,CAAC,EAAE,MAAM,GACT,WAAW,GAAG,SAAS,CAKzB;AAaD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,EAAE,SAAO,GACP,WAAW,GAAG,SAAS,GAAG,SAAS,CAiBrC;AAoCD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAoBjG;AAED,mGAAmG;AACnG,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,UAAU,GAAG,SAAS,GAC/B,WAAW,GAAG,SAAS,CAyBzB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,QAAS,eAAe,KAAG,MAC0B,CAAC;AAE/E,MAAM,WAAW,iBAAiB;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,mGAAmG;AACnG,wBAAgB,oBAAoB,CACnC,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,kBAAkB,EACxB,OAAO,GAAE,iBAAsB,GAC7B,WAAW,GAAG,SAAS,CAoCzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-control-guard.d.ts","sourceRoot":"","sources":["../../../docx/ui/content-control-guard.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"content-control-guard.d.ts","sourceRoot":"","sources":["../../../docx/ui/content-control-guard.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAgJ/E;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,UAAQ,GAAG,OAAO,CAgDjG;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAsD7C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Node as ProseMirrorNode } from 'prosemirror-model';
|
|
2
|
+
import type { RowControlSpan } from './content-control-rows.js';
|
|
3
|
+
import type { ControlSpan } from './content-control-spans.js';
|
|
4
|
+
export type Span = ControlSpan | RowControlSpan;
|
|
5
|
+
/** One control and its range: its spans, more than one when it holds what splits them. */
|
|
6
|
+
export interface Occurrence<S extends Span = Span> {
|
|
7
|
+
key: string;
|
|
8
|
+
spans: S[];
|
|
9
|
+
from: number;
|
|
10
|
+
to: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The occurrences of the controls `spans` hold, in document order: the spans of one level and id
|
|
14
|
+
* that go on with each other are one. `inline` is every inline span of `doc`, which can split one.
|
|
15
|
+
*/
|
|
16
|
+
export declare function controlOccurrences<S extends Span>(doc: ProseMirrorNode, spans: readonly S[], inline: readonly Span[]): Occurrence<S>[];
|
|
17
|
+
//# sourceMappingURL=content-control-occurrences.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-control-occurrences.d.ts","sourceRoot":"","sources":["../../../docx/ui/content-control-occurrences.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,MAAM,IAAI,GAAG,WAAW,GAAG,cAAc,CAAC;AAEhD,0FAA0F;AAC1F,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACX;AAgCD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,IAAI,EAChD,GAAG,EAAE,eAAe,EACpB,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,MAAM,EAAE,SAAS,IAAI,EAAE,GACrB,UAAU,CAAC,CAAC,CAAC,EAAE,CAgBjB"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import type { EditorState, Transaction } from 'prosemirror-state';
|
|
2
|
-
import { type
|
|
3
|
-
import { type ControlSpan } from './content-control-spans.js';
|
|
4
|
-
type Span = ControlSpan | RowControlSpan;
|
|
2
|
+
import { type Span } from './content-control-occurrences.js';
|
|
5
3
|
/** Takes the control of `span` off its text, paragraphs, table, cell or row; its content stays. */
|
|
6
4
|
export declare function removeControl(tr: Transaction, span: Span): Transaction;
|
|
7
5
|
/** The transaction removing every temporary control whose content `transactions` changed. */
|
|
8
6
|
export declare function removeEditedTemporaryControls(transactions: readonly Transaction[], before: EditorState, after: EditorState): Transaction | null;
|
|
9
|
-
export {};
|
|
10
7
|
//# sourceMappingURL=content-control-temporary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-control-temporary.d.ts","sourceRoot":"","sources":["../../../docx/ui/content-control-temporary.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIlE,OAAO,
|
|
1
|
+
{"version":3,"file":"content-control-temporary.d.ts","sourceRoot":"","sources":["../../../docx/ui/content-control-temporary.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIlE,OAAO,EAAuC,KAAK,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAgB/F,mGAAmG;AACnG,wBAAgB,aAAa,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,GAAG,WAAW,CA4BtE;AAoBD,6FAA6F;AAC7F,wBAAgB,6BAA6B,CAC5C,YAAY,EAAE,SAAS,WAAW,EAAE,EACpC,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,WAAW,GAChB,WAAW,GAAG,IAAI,CAmDpB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Mark } from 'prosemirror-model';
|
|
1
2
|
import { Plugin, type Transaction } from 'prosemirror-state';
|
|
2
3
|
import type { DocumentProtection } from '../model.js';
|
|
3
4
|
/**
|
|
@@ -13,12 +14,17 @@ export declare const isFormsProtected: (protection: DocumentProtection | undefin
|
|
|
13
14
|
export declare function exceedsFormTextLength(tr: Transaction): boolean;
|
|
14
15
|
/**
|
|
15
16
|
* Whether every step of a transaction stays inside a form field, a content control or a section
|
|
16
|
-
* the protection leaves editable.
|
|
17
|
+
* the protection leaves editable. `kept` are the marks the state keeps for the text typed next at
|
|
18
|
+
* its caret, `at`.
|
|
17
19
|
*/
|
|
18
|
-
export declare function staysInFormFields(tr: Transaction
|
|
20
|
+
export declare function staysInFormFields(tr: Transaction, kept?: {
|
|
21
|
+
marks: readonly Mark[];
|
|
22
|
+
at: number;
|
|
23
|
+
} | null): boolean;
|
|
19
24
|
/**
|
|
20
|
-
* Rejects local edits that a field's maximum length or the document's protection forbids,
|
|
21
|
-
*
|
|
25
|
+
* Rejects local edits that a field's maximum length or the document's protection forbids, removes
|
|
26
|
+
* the en spaces of a blank text field that text was typed into, and pastes into a protected text
|
|
27
|
+
* field's value as text in the formatting where it lands.
|
|
22
28
|
*/
|
|
23
29
|
export declare function formFieldGuardPlugin(protection: () => DocumentProtection | undefined): Plugin;
|
|
24
30
|
//# sourceMappingURL=form-field-guard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field-guard.d.ts","sourceRoot":"","sources":["../../../docx/ui/form-field-guard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"form-field-guard.d.ts","sourceRoot":"","sources":["../../../docx/ui/form-field-guard.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAa,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAa,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AASxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAmBnD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,eAAgB,kBAAkB,GAAG,SAAS,KAAG,OAChB,CAAC;AAE/D;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAkB9D;AAID;;;;GAIG;AACH,wBAAgB,iBAAiB,CAChC,EAAE,EAAE,WAAW,EACf,IAAI,CAAC,EAAE;IAAE,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAClD,OAAO,CAiFT;AAiCD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,kBAAkB,GAAG,SAAS,GAAG,MAAM,CAiD7F"}
|