@pixerate/editor 0.46.1 → 0.48.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.
Files changed (98) hide show
  1. package/THIRD_PARTY_NOTICES.md +20 -0
  2. package/dist/agent/index.cjs +252 -34
  3. package/dist/agent/index.cjs.map +1 -1
  4. package/dist/agent/index.d.cts +19 -7
  5. package/dist/agent/index.d.ts +19 -7
  6. package/dist/agent/index.js +228 -10
  7. package/dist/agent/index.js.map +1 -1
  8. package/dist/{builtins-CZW-aYKS.d.cts → builtins-1kqwLUnb.d.cts} +2 -2
  9. package/dist/{builtins-DghNQbT-.d.ts → builtins-BKYlHH1s.d.ts} +2 -2
  10. package/dist/chart/index.cjs +1596 -1849
  11. package/dist/chart/index.cjs.map +1 -1
  12. package/dist/chart/index.d.cts +760 -548
  13. package/dist/chart/index.d.ts +760 -548
  14. package/dist/chart/index.js +1499 -1752
  15. package/dist/chart/index.js.map +1 -1
  16. package/dist/{chunk-3RPOW4CS.js → chunk-2CJ3LPYQ.js} +12 -10
  17. package/dist/{chunk-3RPOW4CS.js.map → chunk-2CJ3LPYQ.js.map} +1 -1
  18. package/dist/{chunk-PQM5W7ZN.js → chunk-4FX5ACVG.js} +29 -2
  19. package/dist/{chunk-PQM5W7ZN.js.map → chunk-4FX5ACVG.js.map} +1 -1
  20. package/dist/{chunk-HHQ4XJWT.js → chunk-AMWXSYCI.js} +2 -2
  21. package/dist/chunk-EKYHKQPG.js +1895 -0
  22. package/dist/chunk-EKYHKQPG.js.map +1 -0
  23. package/dist/chunk-HXUL3LS7.js +113 -0
  24. package/dist/chunk-HXUL3LS7.js.map +1 -0
  25. package/dist/{chunk-ZRNHGAQT.js → chunk-JQ3BB3E6.js} +43 -1891
  26. package/dist/chunk-JQ3BB3E6.js.map +1 -0
  27. package/dist/chunk-LTUM52X6.js +4074 -0
  28. package/dist/chunk-LTUM52X6.js.map +1 -0
  29. package/dist/{chunk-J3R2OWOE.cjs → chunk-MUCYWI6W.cjs} +608 -15
  30. package/dist/chunk-MUCYWI6W.cjs.map +1 -0
  31. package/dist/chunk-PIMCHMZE.cjs +521 -0
  32. package/dist/chunk-PIMCHMZE.cjs.map +1 -0
  33. package/dist/{chunk-TK2XZK6Z.js → chunk-PKBWLEL7.js} +594 -1
  34. package/dist/chunk-PKBWLEL7.js.map +1 -0
  35. package/dist/chunk-PRSJJZBS.cjs +4074 -0
  36. package/dist/chunk-PRSJJZBS.cjs.map +1 -0
  37. package/dist/{chunk-EFDCLENW.cjs → chunk-RIWPYSKU.cjs} +29 -2
  38. package/dist/chunk-RIWPYSKU.cjs.map +1 -0
  39. package/dist/chunk-U6IZKC7B.cjs +113 -0
  40. package/dist/chunk-U6IZKC7B.cjs.map +1 -0
  41. package/dist/{chunk-EWCOFSCQ.cjs → chunk-UN33YOXW.cjs} +252 -2100
  42. package/dist/chunk-UN33YOXW.cjs.map +1 -0
  43. package/dist/{chunk-Q25ZS4F7.js → chunk-VKPEPWKZ.js} +72 -92
  44. package/dist/chunk-VKPEPWKZ.js.map +1 -0
  45. package/dist/{chunk-N4MLNJPO.cjs → chunk-WXEHCVJQ.cjs} +160 -180
  46. package/dist/chunk-WXEHCVJQ.cjs.map +1 -0
  47. package/dist/{chunk-K2LVZ4FA.cjs → chunk-XFYUFVAX.cjs} +3 -3
  48. package/dist/{chunk-K2LVZ4FA.cjs.map → chunk-XFYUFVAX.cjs.map} +1 -1
  49. package/dist/chunk-XP5IUZUO.cjs +1895 -0
  50. package/dist/chunk-XP5IUZUO.cjs.map +1 -0
  51. package/dist/chunk-XUUD43OV.js +521 -0
  52. package/dist/chunk-XUUD43OV.js.map +1 -0
  53. package/dist/{chunk-U7VGDSNY.cjs → chunk-YU4WQE5M.cjs} +101 -99
  54. package/dist/chunk-YU4WQE5M.cjs.map +1 -0
  55. package/dist/commands/index.cjs +93 -11
  56. package/dist/commands/index.cjs.map +1 -1
  57. package/dist/commands/index.d.cts +9 -7
  58. package/dist/commands/index.d.ts +9 -7
  59. package/dist/commands/index.js +92 -10
  60. package/dist/commands/index.js.map +1 -1
  61. package/dist/controller-ChjCCMLl.d.cts +822 -0
  62. package/dist/controller-DtbEo3om.d.ts +822 -0
  63. package/dist/extensions/index.cjs +32 -3
  64. package/dist/extensions/index.cjs.map +1 -1
  65. package/dist/extensions/index.d.cts +5 -2
  66. package/dist/extensions/index.d.ts +5 -2
  67. package/dist/extensions/index.js +31 -2
  68. package/dist/generation/index.cjs +2 -2
  69. package/dist/generation/index.js +1 -1
  70. package/dist/{index-CfOQf70b.d.cts → index-DoHqT1mq.d.cts} +222 -5
  71. package/dist/{index-jwJ_onWf.d.ts → index-YLZ0fKqE.d.ts} +222 -5
  72. package/dist/index.cjs +38 -10
  73. package/dist/index.cjs.map +1 -1
  74. package/dist/index.d.cts +13 -5
  75. package/dist/index.d.ts +13 -5
  76. package/dist/index.js +52 -24
  77. package/dist/index.js.map +1 -1
  78. package/dist/parameters/index.d.cts +1 -1
  79. package/dist/parameters/index.d.ts +1 -1
  80. package/dist/{registry-vz6HOiiy.d.cts → registry-CaR7LC6W.d.cts} +2 -0
  81. package/dist/{registry-BfVD-vVg.d.ts → registry-rVtFJjRM.d.ts} +2 -0
  82. package/dist/spreadsheet/index.cjs +5 -3
  83. package/dist/spreadsheet/index.cjs.map +1 -1
  84. package/dist/spreadsheet/index.js +24 -22
  85. package/dist/tools/index.cjs +3 -3
  86. package/dist/tools/index.js +2 -2
  87. package/dist/vector/index.d.cts +1 -1
  88. package/dist/vector/index.d.ts +1 -1
  89. package/package.json +2 -1
  90. package/dist/chunk-EFDCLENW.cjs.map +0 -1
  91. package/dist/chunk-EWCOFSCQ.cjs.map +0 -1
  92. package/dist/chunk-J3R2OWOE.cjs.map +0 -1
  93. package/dist/chunk-N4MLNJPO.cjs.map +0 -1
  94. package/dist/chunk-Q25ZS4F7.js.map +0 -1
  95. package/dist/chunk-TK2XZK6Z.js.map +0 -1
  96. package/dist/chunk-U7VGDSNY.cjs.map +0 -1
  97. package/dist/chunk-ZRNHGAQT.js.map +0 -1
  98. /package/dist/{chunk-HHQ4XJWT.js.map → chunk-AMWXSYCI.js.map} +0 -0
package/dist/index.d.cts CHANGED
@@ -2,8 +2,8 @@ import { b as Token } from './tokens-D7yXvUU6.cjs';
2
2
  export { C as ColorGradient, c as ComparisonOperator, d as ConditionComparison, e as ConditionalKind, I as INSTRUCTION_REGEX, a as PromptDiagnostic, f as PromptDiagnosticCode, g as PromptValue, P as PromptValues, h as TEMPLATE_REGEX, T as Template, i as TemplateVersion, j as TokenType, V as VARIABLE_REGEX, k as instructionRegex, t as templateRegex, v as variableRegex } from './tokens-D7yXvUU6.cjs';
3
3
  export { ConditionExpression, ConditionalTagLike, ConditionalTagMatch, DataSourceInput, DataSourceWarning, DataSourceWarningCode, EvaluatedToken, ExtractVariablesOptions, FIELD_ALIASES, FieldMapping, FieldMatch, FieldMatchKind, MAX_DATA_SOURCE_FIELDS, MAX_DATA_SOURCE_RECORDS, MAX_MERGE_LENGTH, MAX_MERGE_OUTPUTS, MatchFieldsOptions, MergeDataSource, MergeDiagnostic, MergeDiagnosticCode, MergeOutput, MergeRecord, MergeRecordsOptions, MergeRecordsResult, MergeSkip, ParseDataSourceOptions, ParsedComparison, ParsedVariableBody, RecordToValuesOptions, ResolvePromptOptions, ResolvePromptResult, TEMPLATE_DEPTH_ERROR, TEMPLATE_LOOP_ERROR, TokenizeResult, VariableDescriptor, VariableFormField, compactVariableValues, compareConditionValues, conditionSubject, describeConditionalTag, detectDelimiter, escapeVariableText, evaluateCondition, evaluateConditionExpression, evaluatePromptTokens, extractVariables, formatComparisonOperand, formatConditionalTag, getLatestVersion, getPromptDiagnostics, getSuppliedValue, getTemplateBody, getVariableFormFields, isPromptValueSet, matchConditionalTags, matchFields, mergeRecords, normalizeFieldKey, normalizeFieldNames, parseComparison, parseConditionExpression, parseDataSource, parseVariableBody, recordToValues, resolvePrompt, serializeMergeOutputs, tokenizePrompt, tokenizePromptWithDiagnostics, unescapeVariableText } from './grammar/index.cjs';
4
4
  export { R as ResolveTemplatesOptions, S as SourceMapSegment, e as extractInstructionNames, a as extractTemplateNames, b as extractVariableNames, m as mapRawOffsetToResolved, c as mapResolvedOffsetToRaw, r as resolveTemplates, d as resolveTemplatesWithMapping, f as resolveVariables } from './sourcemap-C8AH3MBQ.cjs';
5
- import { D as DocumentImport, a as DocumentImportAdapter, P as PdfStructureReport, b as PdfLayoutOptions, c as PdfRuleLine, d as PdfTextRun } from './index-CfOQf70b.cjs';
6
- export { A as ALLOW_NESTED_TABLES_META, e as AddCommentOptions, f as Autocorrect, g as AutocorrectContext, h as AutocorrectCorrection, i as AutocorrectOptions, j as AutocorrectRule, k as AutocorrectStorage, B as BUILT_IN_IMPORT_ADAPTERS, l as Bookmark, m as BookmarkInfo, n as BookmarkOptions, C as CHARACTER_STYLE_MARK_NAME, o as COMMENT_MARK_NAME, p as CharacterStyle, q as ColorHighlighter, r as CommentRange, s as Comments, t as CommentsOptions, u as CommentsStorage, v as CompileFindPatternResult, w as CompiledFindPattern, x as CreateImportAdapterRegistryOptions, y as CreateStyleFromSelectionOptions, z as CrossReference, E as CrossReferenceOptions, F as CrossReferenceTarget, G as CrossReferenceTargetType, H as DEFAULT_AUTOCORRECT_EXCEPTIONS, I as DEFAULT_TABLE_OPTIONS, J as DEFAULT_TABLE_TOOLBAR, K as DocumentCompare, L as DocumentCompareOptions, M as DocumentCompareStorage, N as DocumentSearchOptions, O as DocumentSearchResult, Q as DocumentStructureCommandArgs, R as DocumentStructureCommandItem, S as EMPTY_FIND_REPLACE_SNAPSHOT, T as EMPTY_TABLE_STATE, U as EditorCompareOptions, V as FIND_OPTION_TOGGLES, W as FIND_PARAGRAPH_MARK, X as FileImport, Y as FileImportOptions, Z as FindAllOptions, _ as FindAllResult, $ as FindMatch, a0 as FindOptionToggle, a1 as FindOptions, a2 as FindPatternError, a3 as FindPatternErrorCode, a4 as FindReplace, a5 as FindReplaceCommandOptions, a6 as FindReplaceMode, a7 as FindReplaceOptions, a8 as FindReplaceSnapshot, a9 as FindReplaceStorage, aa as FindReplaceStore, ab as FocusHeadingOptions, ac as FontSize, ad as Footnote, ae as FootnoteInfo, af as FootnoteReference, ag as Footnotes, ah as FootnotesOptions, ai as GradientText, aj as GradientTextOptions, ak as Image, al as ImageOptions, am as ImportStructureItem, an as ImportStructureReport, ao as InsertFootnoteOptions, ap as InsertTableOfContentsOptions, aq as LoadingNode, ar as MAX_FIND_PATTERN_LENGTH, as as MAX_TABLE_COLUMNS, at as MAX_TABLE_ROWS, au as Markdown, av as OpenFindReplaceParams, aw as Outline, ax as OutlineHeading, ay as OutlineOptions, az as OutlineSnapshot, aA as OutlineStorage, aB as OutlineStore, aC as OutlineTreeItem, aD as ParagraphStyles, aE as ParagraphStylesOptions, aF as ParagraphStylesSnapshot, aG as ParagraphStylesStorage, aH as ParagraphStylesStore, aI as PatternMatch, aJ as PdfLayoutBlock, aK as PdfLayoutPage, aL as PdfLayoutResult, aM as PdfTableCell, aN as ReplacePiece, aO as RichClipboard, aP as RichClipboardOptions, aQ as RichClipboardStorage, aR as RichTextPresetCommandPackages, aS as RichTextPresetOptions, aT as RichTextTableOptions, aU as RunTableActionOptions, aV as SMILIE_REPLACEMENTS, aW as STYLE_ID_ATTRIBUTE, aX as SearchBudget, aY as SearchBudgetOptions, aZ as SetBookmarkOptions, a_ as SetSearchParams, a$ as SlashCommandMatchData, b0 as SlashCommands, b1 as SlashCommandsOptions, b2 as SmilieReplacer, b3 as TABLE_ACTIONS, b4 as Table, b5 as TableAction, b6 as TableActionInfo, b7 as TableActionParams, b8 as TableActionStatus, b9 as TableCell, ba as TableCellAlignment, bb as TableCommandOptions, bc as TableHeader, bd as TableOfContents, be as TableOfContentsEntry, bf as TableOfContentsOptions, bg as TableRow, bh as TableState, bi as TableStore, bj as TableToolbarItem, bk as TemplateSuggestions, bl as TemplateSuggestionsOptions, bm as analyzePdfLayout, bn as applyDocumentComparison, bo as applyReplacements, bp as autocorrectPluginKey, bq as buildOutlineTree, br as capitalizeSentenceRules, bs as captureSelectionFormat, bt as commentsPluginKey, bu as compareInEditor, bv as compileFindPattern, bw as computeOutline, bx as createFindReplaceCommands, by as createImportAdapterRegistry, bz as createOutlineStore, bA as createParagraphStylesStore, bB as createRichTextPreset, bC as createSearchBudget, bD as createTableCommands, bE as createTableExtensions, bF as createTableNestingPlugin, bG as createTableStore, bH as crossReferencePluginKey, bI as defaultAutocorrectRules, bJ as defaultImportRegistry, bK as documentStructureCommandItems, bL as expandReplacement, bM as fileImportPluginKey, bN as findAllMatches, bO as findAutocorrection, bP as findCommentRanges, bQ as findHexColors, bR as findImportAdapter, bS as findReplacePluginKey, bT as foldCodePoint, bU as footnotesMarkdownIt, bV as footnotesPluginKey, bW as formatFindStatus, bX as fractionRules, bY as getActiveHeading, bZ as getBookmarks, b_ as getCommentAnchors, b$ as getCommentAuthor, c0 as getCommentIdsAt, c1 as getCommentStore, c2 as getCrossReferenceTargets, c3 as getDocumentStructureCommandItems, c4 as getFindReplaceState, c5 as getFindReplaceStore, c6 as getFootnotes, c7 as getImportAccept, c8 as getOutline, c9 as getParagraphStyleAt, ca as getStyleRegistry, cb as getTableActionState, cc as getTableOfContentsEntries, cd as getTableState, ce as handleImageInsertion, cf as handleTablePasteWithoutNesting, cg as htmlImportAdapter, ch as imagePastePluginKey, ci as importFile, cj as insertImageNode, ck as insertSliceAfterTable, cl as isGfmTable, cm as isInTableCell, cn as isInsidePromptToken, co as isParagraphStyleAvailable, cp as isSelectionInTable, cq as isTableEnabled, cr as markdownImportAdapter, cs as navigateToHeading, ct as normalizeTableCellAlignment, cu as normalizeTableCellColor, cv as outermostTableDepth, cw as outlinePluginKey, cx as paragraphStylesPluginKey, cy as parseReplacement, cz as pdfLayoutBlocksToHtml, cA as plainTextImportAdapter, cB as registerImportAdapter, cC as removeImageNode, cD as richClipboardPluginKey, cE as rtfImportAdapter, cF as runTableAction, cG as searchDocument, cH as shouldShowTableBubbleMenu, cI as sliceContainsTable, cJ as smartQuoteRules, cK as smilieAutocorrectRules, cL as symbolRules, cM as syncFootnotes, cN as tableNestingPluginKey, cO as tableOfContentsMarkdownIt, cP as tableOfContentsPluginKey, cQ as twoInitialCapitalsRules, cR as unnestTables, cS as unregisterImportAdapter, cT as updateImageSrc, cU as validateFindPattern, cV as writeRichClipboard } from './index-CfOQf70b.cjs';
5
+ import { D as DocumentImport, a as DocumentImportAdapter, P as PdfStructureReport, b as PdfLayoutOptions, c as PdfRuleLine, d as PdfTextRun } from './index-DoHqT1mq.cjs';
6
+ export { A as ALLOW_NESTED_TABLES_META, e as AddCommentOptions, f as Autocorrect, g as AutocorrectContext, h as AutocorrectCorrection, i as AutocorrectOptions, j as AutocorrectRule, k as AutocorrectStorage, B as BUILT_IN_IMPORT_ADAPTERS, l as Bookmark, m as BookmarkInfo, n as BookmarkOptions, C as CHARACTER_STYLE_MARK_NAME, o as COMMENT_MARK_NAME, p as CharacterStyle, q as Chart, r as ChartNodeOptions, s as ChartNodeView, t as ChartNodeViewMount, u as ChartNodeViewRenderer, v as ChartNodeViewState, w as ColorHighlighter, x as CommentRange, y as Comments, z as CommentsOptions, E as CommentsStorage, F as CompileFindPatternResult, G as CompiledFindPattern, H as CreateImportAdapterRegistryOptions, I as CreateStyleFromSelectionOptions, J as CrossReference, K as CrossReferenceOptions, L as CrossReferenceTarget, M as CrossReferenceTargetType, N as DEFAULT_AUTOCORRECT_EXCEPTIONS, O as DEFAULT_TABLE_OPTIONS, Q as DEFAULT_TABLE_TOOLBAR, R as DocumentChart, S as DocumentCompare, T as DocumentCompareOptions, U as DocumentCompareStorage, V as DocumentSearchOptions, W as DocumentSearchResult, X as DocumentStructureCommandArgs, Y as DocumentStructureCommandItem, Z as EMPTY_FIND_REPLACE_SNAPSHOT, _ as EMPTY_TABLE_STATE, $ as EditorCompareOptions, a0 as FIND_OPTION_TOGGLES, a1 as FIND_PARAGRAPH_MARK, a2 as FileImport, a3 as FileImportOptions, a4 as FindAllOptions, a5 as FindAllResult, a6 as FindMatch, a7 as FindOptionToggle, a8 as FindOptions, a9 as FindPatternError, aa as FindPatternErrorCode, ab as FindReplace, ac as FindReplaceCommandOptions, ad as FindReplaceMode, ae as FindReplaceOptions, af as FindReplaceSnapshot, ag as FindReplaceStorage, ah as FindReplaceStore, ai as FocusHeadingOptions, aj as FontSize, ak as Footnote, al as FootnoteInfo, am as FootnoteReference, an as Footnotes, ao as FootnotesOptions, ap as GradientText, aq as GradientTextOptions, ar as Image, as as ImageOptions, at as ImportStructureItem, au as ImportStructureReport, av as ImportedChart, aw as InsertChartOptions, ax as InsertFootnoteOptions, ay as InsertSparklineOptions, az as InsertTableOfContentsOptions, aA as LoadingNode, aB as MAX_FIND_PATTERN_LENGTH, aC as MAX_SPARKLINE_VALUES, aD as MAX_TABLE_COLUMNS, aE as MAX_TABLE_ROWS, aF as Markdown, aG as OpenFindReplaceParams, aH as Outline, aI as OutlineHeading, aJ as OutlineOptions, aK as OutlineSnapshot, aL as OutlineStorage, aM as OutlineStore, aN as OutlineTreeItem, aO as ParagraphStyles, aP as ParagraphStylesOptions, aQ as ParagraphStylesSnapshot, aR as ParagraphStylesStorage, aS as ParagraphStylesStore, aT as PatternMatch, aU as PdfLayoutBlock, aV as PdfLayoutPage, aW as PdfLayoutResult, aX as PdfTableCell, aY as ReplacePiece, aZ as RichClipboard, a_ as RichClipboardOptions, a$ as RichClipboardStorage, b0 as RichTextPresetCommandPackages, b1 as RichTextPresetOptions, b2 as RichTextTableOptions, b3 as RunTableActionOptions, b4 as SMILIE_REPLACEMENTS, b5 as SPARKLINE_KINDS, b6 as STYLE_ID_ATTRIBUTE, b7 as SearchBudget, b8 as SearchBudgetOptions, b9 as SetBookmarkOptions, ba as SetSearchParams, bb as SlashCommandMatchData, bc as SlashCommands, bd as SlashCommandsOptions, be as SmilieReplacer, bf as Sparkline, bg as SparklineNodeOptions, bh as TABLE_ACTIONS, bi as Table, bj as TableAction, bk as TableActionInfo, bl as TableActionParams, bm as TableActionStatus, bn as TableCell, bo as TableCellAlignment, bp as TableCommandOptions, bq as TableHeader, br as TableOfContents, bs as TableOfContentsEntry, bt as TableOfContentsOptions, bu as TableRow, bv as TableState, bw as TableStore, bx as TableToolbarItem, by as TemplateSuggestions, bz as TemplateSuggestionsOptions, bA as analyzePdfLayout, bB as applyDocumentComparison, bC as applyReplacements, bD as autocorrectPluginKey, bE as buildOutlineTree, bF as capitalizeSentenceRules, bG as captureSelectionFormat, bH as chartPluginKey, bI as commentsPluginKey, bJ as compareInEditor, bK as compileFindPattern, bL as computeOutline, bM as createChartNodeView, bN as createFindReplaceCommands, bO as createImportAdapterRegistry, bP as createOutlineStore, bQ as createParagraphStylesStore, bR as createRichTextPreset, bS as createSearchBudget, bT as createTableCommands, bU as createTableExtensions, bV as createTableNestingPlugin, bW as createTableStore, bX as crossReferencePluginKey, bY as defaultAutocorrectRules, bZ as defaultImportRegistry, b_ as documentStructureCommandItems, b$ as expandReplacement, c0 as fileImportPluginKey, c1 as findAllMatches, c2 as findAutocorrection, c3 as findCommentRanges, c4 as findHexColors, c5 as findImportAdapter, c6 as findReplacePluginKey, c7 as foldCodePoint, c8 as footnotesMarkdownIt, c9 as footnotesPluginKey, ca as formatFindStatus, cb as fractionRules, cc as getActiveHeading, cd as getBookmarks, ce as getCommentAnchors, cf as getCommentAuthor, cg as getCommentIdsAt, ch as getCommentStore, ci as getCrossReferenceTargets, cj as getDocumentCharts, ck as getDocumentStructureCommandItems, cl as getFindReplaceState, cm as getFindReplaceStore, cn as getFootnotes, co as getImportAccept, cp as getOutline, cq as getParagraphStyleAt, cr as getStyleRegistry, cs as getTableActionState, ct as getTableOfContentsEntries, cu as getTableState, cv as handleImageInsertion, cw as handleTablePasteWithoutNesting, cx as htmlImportAdapter, cy as imagePastePluginKey, cz as importFile, cA as insertImageNode, cB as insertSliceAfterTable, cC as isChartEnabled, cD as isGfmTable, cE as isInTableCell, cF as isInsidePromptToken, cG as isParagraphStyleAvailable, cH as isSelectionInTable, cI as isTableEnabled, cJ as markdownImportAdapter, cK as navigateToHeading, cL as normalizeSparklineValues, cM as normalizeTableCellAlignment, cN as normalizeTableCellColor, cO as outermostTableDepth, cP as outlinePluginKey, cQ as paragraphStylesPluginKey, cR as parseReplacement, cS as pdfLayoutBlocksToHtml, cT as plainTextImportAdapter, cU as registerImportAdapter, cV as removeImageNode, cW as richClipboardPluginKey, cX as rtfImportAdapter, cY as runTableAction, cZ as searchDocument, c_ as shouldShowTableBubbleMenu, c$ as sliceContainsTable, d0 as smartQuoteRules, d1 as smilieAutocorrectRules, d2 as sparklineLabel, d3 as staticChartSvg, d4 as symbolRules, d5 as syncFootnotes, d6 as tableNestingPluginKey, d7 as tableOfContentsMarkdownIt, d8 as tableOfContentsPluginKey, d9 as twoInitialCapitalsRules, da as unnestTables, db as unregisterImportAdapter, dc as updateImageSrc, dd as validateFindPattern, de as writeRichClipboard } from './index-DoHqT1mq.cjs';
7
7
  export { B as BLOCK_CHANGE_ATTRIBUTE, D as DELETION_MARK_NAME, F as FORMAT_CHANGE_MARK_NAME, I as INSERTION_MARK_NAME, M as MOVE_FROM_CLASS, a as MOVE_ID_ATTRIBUTE, b as MOVE_TO_CLASS, c as Mention, d as MentionEntity, e as MentionNodeInfo, f as MentionOptions, T as TRACK_CHANGES_SKIP_META, g as TrackChanges, h as TrackChangesOptions, i as TrackChangesSnapshot, j as TrackChangesStorage, k as TrackChangesStore, l as TrackedBlockChangeAttributes, m as TrackedBlockOperation, n as TrackedBlockSnapshot, o as TrackedChange, p as TrackedChangeAttributes, q as TrackedChangeType, r as TrackedChangesView, s as TrackedDeletion, t as TrackedFormatChange, u as TrackedFormatChangeAttributes, v as TrackedFormatSummary, w as TrackedInsertion, x as TrackedMark, y as createMentionExtension, z as describeBlockChange, A as describeFormatChange, C as getMentionNodes, E as getTrackChangesStore, G as getTrackedChangeAt, H as getTrackedChanges, J as isMoveSized, K as isTrackChangesEnabled, L as resolveTrackedChanges, N as setMentionRoleAt, O as trackChangesPluginKey, P as trackedChangeLabel } from './track-changes-D_VAPELi.cjs';
8
8
  export { C as CommentAnchor, a as CommentReply, b as CommentStore, c as CommentStoreListener, d as CommentStoreOptions, e as CommentStoreSnapshot, f as CommentThread, g as CreateThreadInput, R as ReviewAuthor, S as SerializedComments, h as createCommentStore, i as createReviewId, j as formatReviewTime } from './comment-store-BEMgVlAA.cjs';
9
9
  export { C as CharacterFormat, D as DEFAULT_STYLES, N as NORMAL_STYLE_ID, P as ParagraphFormat, R as ResolvedStyle, S as StyleBlock, a as StyleCSSOptions, b as StyleDefaults, c as StyleDefinition, d as StyleKind, e as StyleRegistry, f as StyleRegistryJSON, g as StyleRegistryOptions, h as StyleRegistrySnapshot, i as createStyleRegistry, j as isValidStyleId, s as safeCSSValue } from './registry-CED5C0lA.cjs';
@@ -38,7 +38,8 @@ import '@tiptap/extension-image';
38
38
  import '@tiptap/extension-highlight';
39
39
  import '@tiptap/extension-color';
40
40
  import '@tiptap/starter-kit';
41
- import './registry-vz6HOiiy.cjs';
41
+ import './controller-ChjCCMLl.cjs';
42
+ import './registry-CaR7LC6W.cjs';
42
43
  import './schema-Di0CS6Pe.cjs';
43
44
  import '@tiptap/extension-mention';
44
45
  import '@tiptap/suggestion';
@@ -387,8 +388,8 @@ declare function readZip(data: ArrayBuffer | ArrayBufferView, options?: ZipReadO
387
388
  * paragraph and character styles of `styles.xml` are returned as a style
388
389
  * registry (`styles`), and body paragraphs with a custom style get
389
390
  * `data-style`. Paragraphs in the `Block Text` style become block quotes, and
390
- * paragraphs in the `Code` style code blocks. Text boxes, charts, shapes,
391
- * equations and page layout are not imported.
391
+ * paragraphs in the `Code` style code blocks. Charts become `chart` nodes (see
392
+ * the `charts` option). Text boxes, shapes, equations and page layout are not imported.
392
393
  */
393
394
  declare const DOCX_MIME_TYPES: readonly ["application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "application/vnd.ms-word.document.macroenabled.12"];
394
395
  interface DocxImportOptions {
@@ -413,6 +414,13 @@ interface DocxImportOptions {
413
414
  paragraphStyles?: boolean;
414
415
  /** Embed images from `word/media` as data URLs (default `true`). */
415
416
  images?: boolean;
417
+ /**
418
+ * Read embedded charts (`word/charts/chartN.xml`, default `true`). Each becomes a
419
+ * `<div data-type="chart">` holding its spec: a live chart in editors with the `chart` node
420
+ * (`createRichTextPreset({ chart: true })`), otherwise a caption and a table of its data.
421
+ * The full specs are also returned in `charts`.
422
+ */
423
+ charts?: boolean;
416
424
  /** Images larger than this many bytes are skipped (default 10 MiB). */
417
425
  maxImageSize?: number;
418
426
  /** Limits for reading the DOCX container (default: 100 MiB extracted, 5 000 entries). */
package/dist/index.d.ts CHANGED
@@ -2,8 +2,8 @@ import { b as Token } from './tokens-D7yXvUU6.js';
2
2
  export { C as ColorGradient, c as ComparisonOperator, d as ConditionComparison, e as ConditionalKind, I as INSTRUCTION_REGEX, a as PromptDiagnostic, f as PromptDiagnosticCode, g as PromptValue, P as PromptValues, h as TEMPLATE_REGEX, T as Template, i as TemplateVersion, j as TokenType, V as VARIABLE_REGEX, k as instructionRegex, t as templateRegex, v as variableRegex } from './tokens-D7yXvUU6.js';
3
3
  export { ConditionExpression, ConditionalTagLike, ConditionalTagMatch, DataSourceInput, DataSourceWarning, DataSourceWarningCode, EvaluatedToken, ExtractVariablesOptions, FIELD_ALIASES, FieldMapping, FieldMatch, FieldMatchKind, MAX_DATA_SOURCE_FIELDS, MAX_DATA_SOURCE_RECORDS, MAX_MERGE_LENGTH, MAX_MERGE_OUTPUTS, MatchFieldsOptions, MergeDataSource, MergeDiagnostic, MergeDiagnosticCode, MergeOutput, MergeRecord, MergeRecordsOptions, MergeRecordsResult, MergeSkip, ParseDataSourceOptions, ParsedComparison, ParsedVariableBody, RecordToValuesOptions, ResolvePromptOptions, ResolvePromptResult, TEMPLATE_DEPTH_ERROR, TEMPLATE_LOOP_ERROR, TokenizeResult, VariableDescriptor, VariableFormField, compactVariableValues, compareConditionValues, conditionSubject, describeConditionalTag, detectDelimiter, escapeVariableText, evaluateCondition, evaluateConditionExpression, evaluatePromptTokens, extractVariables, formatComparisonOperand, formatConditionalTag, getLatestVersion, getPromptDiagnostics, getSuppliedValue, getTemplateBody, getVariableFormFields, isPromptValueSet, matchConditionalTags, matchFields, mergeRecords, normalizeFieldKey, normalizeFieldNames, parseComparison, parseConditionExpression, parseDataSource, parseVariableBody, recordToValues, resolvePrompt, serializeMergeOutputs, tokenizePrompt, tokenizePromptWithDiagnostics, unescapeVariableText } from './grammar/index.js';
4
4
  export { R as ResolveTemplatesOptions, S as SourceMapSegment, e as extractInstructionNames, a as extractTemplateNames, b as extractVariableNames, m as mapRawOffsetToResolved, c as mapResolvedOffsetToRaw, r as resolveTemplates, d as resolveTemplatesWithMapping, f as resolveVariables } from './sourcemap-DA1Evhrv.js';
5
- import { D as DocumentImport, a as DocumentImportAdapter, P as PdfStructureReport, b as PdfLayoutOptions, c as PdfRuleLine, d as PdfTextRun } from './index-jwJ_onWf.js';
6
- export { A as ALLOW_NESTED_TABLES_META, e as AddCommentOptions, f as Autocorrect, g as AutocorrectContext, h as AutocorrectCorrection, i as AutocorrectOptions, j as AutocorrectRule, k as AutocorrectStorage, B as BUILT_IN_IMPORT_ADAPTERS, l as Bookmark, m as BookmarkInfo, n as BookmarkOptions, C as CHARACTER_STYLE_MARK_NAME, o as COMMENT_MARK_NAME, p as CharacterStyle, q as ColorHighlighter, r as CommentRange, s as Comments, t as CommentsOptions, u as CommentsStorage, v as CompileFindPatternResult, w as CompiledFindPattern, x as CreateImportAdapterRegistryOptions, y as CreateStyleFromSelectionOptions, z as CrossReference, E as CrossReferenceOptions, F as CrossReferenceTarget, G as CrossReferenceTargetType, H as DEFAULT_AUTOCORRECT_EXCEPTIONS, I as DEFAULT_TABLE_OPTIONS, J as DEFAULT_TABLE_TOOLBAR, K as DocumentCompare, L as DocumentCompareOptions, M as DocumentCompareStorage, N as DocumentSearchOptions, O as DocumentSearchResult, Q as DocumentStructureCommandArgs, R as DocumentStructureCommandItem, S as EMPTY_FIND_REPLACE_SNAPSHOT, T as EMPTY_TABLE_STATE, U as EditorCompareOptions, V as FIND_OPTION_TOGGLES, W as FIND_PARAGRAPH_MARK, X as FileImport, Y as FileImportOptions, Z as FindAllOptions, _ as FindAllResult, $ as FindMatch, a0 as FindOptionToggle, a1 as FindOptions, a2 as FindPatternError, a3 as FindPatternErrorCode, a4 as FindReplace, a5 as FindReplaceCommandOptions, a6 as FindReplaceMode, a7 as FindReplaceOptions, a8 as FindReplaceSnapshot, a9 as FindReplaceStorage, aa as FindReplaceStore, ab as FocusHeadingOptions, ac as FontSize, ad as Footnote, ae as FootnoteInfo, af as FootnoteReference, ag as Footnotes, ah as FootnotesOptions, ai as GradientText, aj as GradientTextOptions, ak as Image, al as ImageOptions, am as ImportStructureItem, an as ImportStructureReport, ao as InsertFootnoteOptions, ap as InsertTableOfContentsOptions, aq as LoadingNode, ar as MAX_FIND_PATTERN_LENGTH, as as MAX_TABLE_COLUMNS, at as MAX_TABLE_ROWS, au as Markdown, av as OpenFindReplaceParams, aw as Outline, ax as OutlineHeading, ay as OutlineOptions, az as OutlineSnapshot, aA as OutlineStorage, aB as OutlineStore, aC as OutlineTreeItem, aD as ParagraphStyles, aE as ParagraphStylesOptions, aF as ParagraphStylesSnapshot, aG as ParagraphStylesStorage, aH as ParagraphStylesStore, aI as PatternMatch, aJ as PdfLayoutBlock, aK as PdfLayoutPage, aL as PdfLayoutResult, aM as PdfTableCell, aN as ReplacePiece, aO as RichClipboard, aP as RichClipboardOptions, aQ as RichClipboardStorage, aR as RichTextPresetCommandPackages, aS as RichTextPresetOptions, aT as RichTextTableOptions, aU as RunTableActionOptions, aV as SMILIE_REPLACEMENTS, aW as STYLE_ID_ATTRIBUTE, aX as SearchBudget, aY as SearchBudgetOptions, aZ as SetBookmarkOptions, a_ as SetSearchParams, a$ as SlashCommandMatchData, b0 as SlashCommands, b1 as SlashCommandsOptions, b2 as SmilieReplacer, b3 as TABLE_ACTIONS, b4 as Table, b5 as TableAction, b6 as TableActionInfo, b7 as TableActionParams, b8 as TableActionStatus, b9 as TableCell, ba as TableCellAlignment, bb as TableCommandOptions, bc as TableHeader, bd as TableOfContents, be as TableOfContentsEntry, bf as TableOfContentsOptions, bg as TableRow, bh as TableState, bi as TableStore, bj as TableToolbarItem, bk as TemplateSuggestions, bl as TemplateSuggestionsOptions, bm as analyzePdfLayout, bn as applyDocumentComparison, bo as applyReplacements, bp as autocorrectPluginKey, bq as buildOutlineTree, br as capitalizeSentenceRules, bs as captureSelectionFormat, bt as commentsPluginKey, bu as compareInEditor, bv as compileFindPattern, bw as computeOutline, bx as createFindReplaceCommands, by as createImportAdapterRegistry, bz as createOutlineStore, bA as createParagraphStylesStore, bB as createRichTextPreset, bC as createSearchBudget, bD as createTableCommands, bE as createTableExtensions, bF as createTableNestingPlugin, bG as createTableStore, bH as crossReferencePluginKey, bI as defaultAutocorrectRules, bJ as defaultImportRegistry, bK as documentStructureCommandItems, bL as expandReplacement, bM as fileImportPluginKey, bN as findAllMatches, bO as findAutocorrection, bP as findCommentRanges, bQ as findHexColors, bR as findImportAdapter, bS as findReplacePluginKey, bT as foldCodePoint, bU as footnotesMarkdownIt, bV as footnotesPluginKey, bW as formatFindStatus, bX as fractionRules, bY as getActiveHeading, bZ as getBookmarks, b_ as getCommentAnchors, b$ as getCommentAuthor, c0 as getCommentIdsAt, c1 as getCommentStore, c2 as getCrossReferenceTargets, c3 as getDocumentStructureCommandItems, c4 as getFindReplaceState, c5 as getFindReplaceStore, c6 as getFootnotes, c7 as getImportAccept, c8 as getOutline, c9 as getParagraphStyleAt, ca as getStyleRegistry, cb as getTableActionState, cc as getTableOfContentsEntries, cd as getTableState, ce as handleImageInsertion, cf as handleTablePasteWithoutNesting, cg as htmlImportAdapter, ch as imagePastePluginKey, ci as importFile, cj as insertImageNode, ck as insertSliceAfterTable, cl as isGfmTable, cm as isInTableCell, cn as isInsidePromptToken, co as isParagraphStyleAvailable, cp as isSelectionInTable, cq as isTableEnabled, cr as markdownImportAdapter, cs as navigateToHeading, ct as normalizeTableCellAlignment, cu as normalizeTableCellColor, cv as outermostTableDepth, cw as outlinePluginKey, cx as paragraphStylesPluginKey, cy as parseReplacement, cz as pdfLayoutBlocksToHtml, cA as plainTextImportAdapter, cB as registerImportAdapter, cC as removeImageNode, cD as richClipboardPluginKey, cE as rtfImportAdapter, cF as runTableAction, cG as searchDocument, cH as shouldShowTableBubbleMenu, cI as sliceContainsTable, cJ as smartQuoteRules, cK as smilieAutocorrectRules, cL as symbolRules, cM as syncFootnotes, cN as tableNestingPluginKey, cO as tableOfContentsMarkdownIt, cP as tableOfContentsPluginKey, cQ as twoInitialCapitalsRules, cR as unnestTables, cS as unregisterImportAdapter, cT as updateImageSrc, cU as validateFindPattern, cV as writeRichClipboard } from './index-jwJ_onWf.js';
5
+ import { D as DocumentImport, a as DocumentImportAdapter, P as PdfStructureReport, b as PdfLayoutOptions, c as PdfRuleLine, d as PdfTextRun } from './index-YLZ0fKqE.js';
6
+ export { A as ALLOW_NESTED_TABLES_META, e as AddCommentOptions, f as Autocorrect, g as AutocorrectContext, h as AutocorrectCorrection, i as AutocorrectOptions, j as AutocorrectRule, k as AutocorrectStorage, B as BUILT_IN_IMPORT_ADAPTERS, l as Bookmark, m as BookmarkInfo, n as BookmarkOptions, C as CHARACTER_STYLE_MARK_NAME, o as COMMENT_MARK_NAME, p as CharacterStyle, q as Chart, r as ChartNodeOptions, s as ChartNodeView, t as ChartNodeViewMount, u as ChartNodeViewRenderer, v as ChartNodeViewState, w as ColorHighlighter, x as CommentRange, y as Comments, z as CommentsOptions, E as CommentsStorage, F as CompileFindPatternResult, G as CompiledFindPattern, H as CreateImportAdapterRegistryOptions, I as CreateStyleFromSelectionOptions, J as CrossReference, K as CrossReferenceOptions, L as CrossReferenceTarget, M as CrossReferenceTargetType, N as DEFAULT_AUTOCORRECT_EXCEPTIONS, O as DEFAULT_TABLE_OPTIONS, Q as DEFAULT_TABLE_TOOLBAR, R as DocumentChart, S as DocumentCompare, T as DocumentCompareOptions, U as DocumentCompareStorage, V as DocumentSearchOptions, W as DocumentSearchResult, X as DocumentStructureCommandArgs, Y as DocumentStructureCommandItem, Z as EMPTY_FIND_REPLACE_SNAPSHOT, _ as EMPTY_TABLE_STATE, $ as EditorCompareOptions, a0 as FIND_OPTION_TOGGLES, a1 as FIND_PARAGRAPH_MARK, a2 as FileImport, a3 as FileImportOptions, a4 as FindAllOptions, a5 as FindAllResult, a6 as FindMatch, a7 as FindOptionToggle, a8 as FindOptions, a9 as FindPatternError, aa as FindPatternErrorCode, ab as FindReplace, ac as FindReplaceCommandOptions, ad as FindReplaceMode, ae as FindReplaceOptions, af as FindReplaceSnapshot, ag as FindReplaceStorage, ah as FindReplaceStore, ai as FocusHeadingOptions, aj as FontSize, ak as Footnote, al as FootnoteInfo, am as FootnoteReference, an as Footnotes, ao as FootnotesOptions, ap as GradientText, aq as GradientTextOptions, ar as Image, as as ImageOptions, at as ImportStructureItem, au as ImportStructureReport, av as ImportedChart, aw as InsertChartOptions, ax as InsertFootnoteOptions, ay as InsertSparklineOptions, az as InsertTableOfContentsOptions, aA as LoadingNode, aB as MAX_FIND_PATTERN_LENGTH, aC as MAX_SPARKLINE_VALUES, aD as MAX_TABLE_COLUMNS, aE as MAX_TABLE_ROWS, aF as Markdown, aG as OpenFindReplaceParams, aH as Outline, aI as OutlineHeading, aJ as OutlineOptions, aK as OutlineSnapshot, aL as OutlineStorage, aM as OutlineStore, aN as OutlineTreeItem, aO as ParagraphStyles, aP as ParagraphStylesOptions, aQ as ParagraphStylesSnapshot, aR as ParagraphStylesStorage, aS as ParagraphStylesStore, aT as PatternMatch, aU as PdfLayoutBlock, aV as PdfLayoutPage, aW as PdfLayoutResult, aX as PdfTableCell, aY as ReplacePiece, aZ as RichClipboard, a_ as RichClipboardOptions, a$ as RichClipboardStorage, b0 as RichTextPresetCommandPackages, b1 as RichTextPresetOptions, b2 as RichTextTableOptions, b3 as RunTableActionOptions, b4 as SMILIE_REPLACEMENTS, b5 as SPARKLINE_KINDS, b6 as STYLE_ID_ATTRIBUTE, b7 as SearchBudget, b8 as SearchBudgetOptions, b9 as SetBookmarkOptions, ba as SetSearchParams, bb as SlashCommandMatchData, bc as SlashCommands, bd as SlashCommandsOptions, be as SmilieReplacer, bf as Sparkline, bg as SparklineNodeOptions, bh as TABLE_ACTIONS, bi as Table, bj as TableAction, bk as TableActionInfo, bl as TableActionParams, bm as TableActionStatus, bn as TableCell, bo as TableCellAlignment, bp as TableCommandOptions, bq as TableHeader, br as TableOfContents, bs as TableOfContentsEntry, bt as TableOfContentsOptions, bu as TableRow, bv as TableState, bw as TableStore, bx as TableToolbarItem, by as TemplateSuggestions, bz as TemplateSuggestionsOptions, bA as analyzePdfLayout, bB as applyDocumentComparison, bC as applyReplacements, bD as autocorrectPluginKey, bE as buildOutlineTree, bF as capitalizeSentenceRules, bG as captureSelectionFormat, bH as chartPluginKey, bI as commentsPluginKey, bJ as compareInEditor, bK as compileFindPattern, bL as computeOutline, bM as createChartNodeView, bN as createFindReplaceCommands, bO as createImportAdapterRegistry, bP as createOutlineStore, bQ as createParagraphStylesStore, bR as createRichTextPreset, bS as createSearchBudget, bT as createTableCommands, bU as createTableExtensions, bV as createTableNestingPlugin, bW as createTableStore, bX as crossReferencePluginKey, bY as defaultAutocorrectRules, bZ as defaultImportRegistry, b_ as documentStructureCommandItems, b$ as expandReplacement, c0 as fileImportPluginKey, c1 as findAllMatches, c2 as findAutocorrection, c3 as findCommentRanges, c4 as findHexColors, c5 as findImportAdapter, c6 as findReplacePluginKey, c7 as foldCodePoint, c8 as footnotesMarkdownIt, c9 as footnotesPluginKey, ca as formatFindStatus, cb as fractionRules, cc as getActiveHeading, cd as getBookmarks, ce as getCommentAnchors, cf as getCommentAuthor, cg as getCommentIdsAt, ch as getCommentStore, ci as getCrossReferenceTargets, cj as getDocumentCharts, ck as getDocumentStructureCommandItems, cl as getFindReplaceState, cm as getFindReplaceStore, cn as getFootnotes, co as getImportAccept, cp as getOutline, cq as getParagraphStyleAt, cr as getStyleRegistry, cs as getTableActionState, ct as getTableOfContentsEntries, cu as getTableState, cv as handleImageInsertion, cw as handleTablePasteWithoutNesting, cx as htmlImportAdapter, cy as imagePastePluginKey, cz as importFile, cA as insertImageNode, cB as insertSliceAfterTable, cC as isChartEnabled, cD as isGfmTable, cE as isInTableCell, cF as isInsidePromptToken, cG as isParagraphStyleAvailable, cH as isSelectionInTable, cI as isTableEnabled, cJ as markdownImportAdapter, cK as navigateToHeading, cL as normalizeSparklineValues, cM as normalizeTableCellAlignment, cN as normalizeTableCellColor, cO as outermostTableDepth, cP as outlinePluginKey, cQ as paragraphStylesPluginKey, cR as parseReplacement, cS as pdfLayoutBlocksToHtml, cT as plainTextImportAdapter, cU as registerImportAdapter, cV as removeImageNode, cW as richClipboardPluginKey, cX as rtfImportAdapter, cY as runTableAction, cZ as searchDocument, c_ as shouldShowTableBubbleMenu, c$ as sliceContainsTable, d0 as smartQuoteRules, d1 as smilieAutocorrectRules, d2 as sparklineLabel, d3 as staticChartSvg, d4 as symbolRules, d5 as syncFootnotes, d6 as tableNestingPluginKey, d7 as tableOfContentsMarkdownIt, d8 as tableOfContentsPluginKey, d9 as twoInitialCapitalsRules, da as unnestTables, db as unregisterImportAdapter, dc as updateImageSrc, dd as validateFindPattern, de as writeRichClipboard } from './index-YLZ0fKqE.js';
7
7
  export { B as BLOCK_CHANGE_ATTRIBUTE, D as DELETION_MARK_NAME, F as FORMAT_CHANGE_MARK_NAME, I as INSERTION_MARK_NAME, M as MOVE_FROM_CLASS, a as MOVE_ID_ATTRIBUTE, b as MOVE_TO_CLASS, c as Mention, d as MentionEntity, e as MentionNodeInfo, f as MentionOptions, T as TRACK_CHANGES_SKIP_META, g as TrackChanges, h as TrackChangesOptions, i as TrackChangesSnapshot, j as TrackChangesStorage, k as TrackChangesStore, l as TrackedBlockChangeAttributes, m as TrackedBlockOperation, n as TrackedBlockSnapshot, o as TrackedChange, p as TrackedChangeAttributes, q as TrackedChangeType, r as TrackedChangesView, s as TrackedDeletion, t as TrackedFormatChange, u as TrackedFormatChangeAttributes, v as TrackedFormatSummary, w as TrackedInsertion, x as TrackedMark, y as createMentionExtension, z as describeBlockChange, A as describeFormatChange, C as getMentionNodes, E as getTrackChangesStore, G as getTrackedChangeAt, H as getTrackedChanges, J as isMoveSized, K as isTrackChangesEnabled, L as resolveTrackedChanges, N as setMentionRoleAt, O as trackChangesPluginKey, P as trackedChangeLabel } from './track-changes-Db_fGEvx.js';
8
8
  export { C as CommentAnchor, a as CommentReply, b as CommentStore, c as CommentStoreListener, d as CommentStoreOptions, e as CommentStoreSnapshot, f as CommentThread, g as CreateThreadInput, R as ReviewAuthor, S as SerializedComments, h as createCommentStore, i as createReviewId, j as formatReviewTime } from './comment-store-BEMgVlAA.js';
9
9
  export { C as CharacterFormat, D as DEFAULT_STYLES, N as NORMAL_STYLE_ID, P as ParagraphFormat, R as ResolvedStyle, S as StyleBlock, a as StyleCSSOptions, b as StyleDefaults, c as StyleDefinition, d as StyleKind, e as StyleRegistry, f as StyleRegistryJSON, g as StyleRegistryOptions, h as StyleRegistrySnapshot, i as createStyleRegistry, j as isValidStyleId, s as safeCSSValue } from './registry-CED5C0lA.js';
@@ -38,7 +38,8 @@ import '@tiptap/extension-image';
38
38
  import '@tiptap/extension-highlight';
39
39
  import '@tiptap/extension-color';
40
40
  import '@tiptap/starter-kit';
41
- import './registry-BfVD-vVg.js';
41
+ import './controller-DtbEo3om.js';
42
+ import './registry-rVtFJjRM.js';
42
43
  import './schema-Di0CS6Pe.js';
43
44
  import '@tiptap/extension-mention';
44
45
  import '@tiptap/suggestion';
@@ -387,8 +388,8 @@ declare function readZip(data: ArrayBuffer | ArrayBufferView, options?: ZipReadO
387
388
  * paragraph and character styles of `styles.xml` are returned as a style
388
389
  * registry (`styles`), and body paragraphs with a custom style get
389
390
  * `data-style`. Paragraphs in the `Block Text` style become block quotes, and
390
- * paragraphs in the `Code` style code blocks. Text boxes, charts, shapes,
391
- * equations and page layout are not imported.
391
+ * paragraphs in the `Code` style code blocks. Charts become `chart` nodes (see
392
+ * the `charts` option). Text boxes, shapes, equations and page layout are not imported.
392
393
  */
393
394
  declare const DOCX_MIME_TYPES: readonly ["application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "application/vnd.ms-word.document.macroenabled.12"];
394
395
  interface DocxImportOptions {
@@ -413,6 +414,13 @@ interface DocxImportOptions {
413
414
  paragraphStyles?: boolean;
414
415
  /** Embed images from `word/media` as data URLs (default `true`). */
415
416
  images?: boolean;
417
+ /**
418
+ * Read embedded charts (`word/charts/chartN.xml`, default `true`). Each becomes a
419
+ * `<div data-type="chart">` holding its spec: a live chart in editors with the `chart` node
420
+ * (`createRichTextPreset({ chart: true })`), otherwise a caption and a table of its data.
421
+ * The full specs are also returned in `charts`.
422
+ */
423
+ charts?: boolean;
416
424
  /** Images larger than this many bytes are skipped (default 10 MiB). */
417
425
  maxImageSize?: number;
418
426
  /** Limits for reading the DOCX container (default: 100 MiB extracted, 5 000 entries). */
package/dist/index.js CHANGED
@@ -174,7 +174,7 @@ import {
174
174
  updateImageSrc,
175
175
  validateFindPattern,
176
176
  writeRichClipboard
177
- } from "./chunk-Q25ZS4F7.js";
177
+ } from "./chunk-VKPEPWKZ.js";
178
178
  import {
179
179
  DEFAULT_STYLES,
180
180
  DEFAULT_ZIP_MAX_ENTRIES,
@@ -190,22 +190,30 @@ import {
190
190
  safeCSSValue,
191
191
  zipCrc32
192
192
  } from "./chunk-MR2764X2.js";
193
+ import "./chunk-XUUD43OV.js";
193
194
  import {
194
195
  ALLOW_NESTED_TABLES_META,
196
+ Chart,
197
+ ChartNodeView,
195
198
  DEFAULT_TABLE_OPTIONS,
196
199
  DEFAULT_TABLE_TOOLBAR,
197
200
  EMPTY_TABLE_STATE,
198
201
  FIND_PARAGRAPH_MARK,
199
202
  MAX_FIND_PATTERN_LENGTH,
203
+ MAX_SPARKLINE_VALUES,
200
204
  MAX_TABLE_COLUMNS,
201
205
  MAX_TABLE_ROWS,
206
+ SPARKLINE_KINDS,
207
+ Sparkline,
202
208
  TABLE_ACTIONS,
203
209
  Table,
204
210
  TableCell,
205
211
  TableHeader,
206
212
  TableRow,
207
213
  applyReplacements,
214
+ chartPluginKey,
208
215
  compileFindPattern,
216
+ createChartNodeView,
209
217
  createSearchBudget,
210
218
  createTableExtensions,
211
219
  createTableNestingPlugin,
@@ -213,14 +221,17 @@ import {
213
221
  expandReplacement,
214
222
  findAllMatches,
215
223
  foldCodePoint,
224
+ getDocumentCharts,
216
225
  getTableActionState,
217
226
  getTableState,
218
227
  handleTablePasteWithoutNesting,
219
228
  insertSliceAfterTable,
229
+ isChartEnabled,
220
230
  isGfmTable,
221
231
  isInTableCell,
222
232
  isSelectionInTable,
223
233
  isTableEnabled,
234
+ normalizeSparklineValues,
224
235
  normalizeTableCellAlignment,
225
236
  normalizeTableCellColor,
226
237
  outermostTableDepth,
@@ -229,9 +240,12 @@ import {
229
240
  searchDocument,
230
241
  shouldShowTableBubbleMenu,
231
242
  sliceContainsTable,
243
+ sparklineLabel,
244
+ staticChartSvg,
232
245
  tableNestingPluginKey,
233
246
  unnestTables
234
- } from "./chunk-TK2XZK6Z.js";
247
+ } from "./chunk-PKBWLEL7.js";
248
+ import "./chunk-LTUM52X6.js";
235
249
  import {
236
250
  compareDocuments,
237
251
  compareHtml,
@@ -467,53 +481,55 @@ import {
467
481
  validateCellInput,
468
482
  validateDefinedName,
469
483
  validateSheetName
470
- } from "./chunk-3RPOW4CS.js";
484
+ } from "./chunk-2CJ3LPYQ.js";
471
485
  import {
472
- FORMULA_ERRORS,
473
486
  FormulaEvaluator,
474
487
  FormulaLambda,
475
488
  FormulaParser,
476
489
  MAX_FORMULA_ARRAY_SIZE,
477
490
  MAX_LAMBDA_DEPTH,
491
+ WHOLE_COLUMN_END_ROW,
492
+ checkFormulaArgumentCount,
493
+ describeFormulaError,
494
+ getFormulaArgumentSpecIndex,
495
+ getFormulaFunction,
496
+ getFormulaSignature,
497
+ getFormulaSignatureParts,
498
+ isFormulaLambda,
499
+ listFormulaFunctions,
500
+ parseCellReference,
501
+ parseCriteria,
502
+ parseFormula,
503
+ parseRange,
504
+ registerFormulaFunction,
505
+ searchFormulaFunctions,
506
+ tokenizeFormula,
507
+ unregisterFormulaFunction,
508
+ wildcardToRegExp
509
+ } from "./chunk-JQ3BB3E6.js";
510
+ import {
511
+ FORMULA_ERRORS,
478
512
  MAX_NUMBER_FORMAT_CODE_CHARS,
479
513
  NumberFormat,
480
- WHOLE_COLUMN_END_ROW,
481
514
  builtinNumberFormat,
482
515
  builtinNumberFormatId,
483
- checkFormulaArgumentCount,
484
516
  clearNumberFormatCache,
485
517
  colNameToIndex,
486
518
  compareNumbers,
487
519
  compareValues,
488
520
  dateValueToSerial,
489
- describeFormulaError,
490
521
  formatGeneralFit,
491
522
  formatNumberFormatValue,
492
523
  formatTextFunction,
493
- getFormulaArgumentSpecIndex,
494
- getFormulaFunction,
495
- getFormulaSignature,
496
- getFormulaSignatureParts,
497
524
  indexToColName,
498
525
  isFormulaError,
499
- isFormulaLambda,
500
- listFormulaFunctions,
501
526
  numberFormatColorToCss,
502
527
  numberToText,
503
528
  parseCellInput,
504
- parseCellReference,
505
- parseCriteria,
506
- parseFormula,
507
529
  parseNumberText,
508
- parseRange,
509
- registerFormulaFunction,
510
- searchFormulaFunctions,
511
530
  serialFromYmd,
512
- sortCompareValues,
513
- tokenizeFormula,
514
- unregisterFormulaFunction,
515
- wildcardToRegExp
516
- } from "./chunk-ZRNHGAQT.js";
531
+ sortCompareValues
532
+ } from "./chunk-EKYHKQPG.js";
517
533
  import {
518
534
  escapeCsvField,
519
535
  parseCsv,
@@ -2237,6 +2253,8 @@ export {
2237
2253
  CONDITIONAL_FORMAT_STYLE_PRESETS,
2238
2254
  CONDITIONAL_FORMAT_TIME_PERIODS,
2239
2255
  CharacterStyle,
2256
+ Chart,
2257
+ ChartNodeView,
2240
2258
  ColorHighlighter,
2241
2259
  CommentStore,
2242
2260
  Comments,
@@ -2306,6 +2324,7 @@ export {
2306
2324
  MAX_MERGE_OUTPUTS,
2307
2325
  MAX_NUMBER_FORMAT_CODE_CHARS,
2308
2326
  MAX_SHEET_NAME_LENGTH,
2327
+ MAX_SPARKLINE_VALUES,
2309
2328
  MAX_TABLE_COLUMNS,
2310
2329
  MAX_TABLE_ROWS,
2311
2330
  MENTION_REGEX,
@@ -2322,6 +2341,7 @@ export {
2322
2341
  ParagraphStyles,
2323
2342
  RichClipboard,
2324
2343
  SMILIE_REPLACEMENTS,
2344
+ SPARKLINE_KINDS,
2325
2345
  SPREADSHEET_CLIPBOARD_MIME,
2326
2346
  SPREADSHEET_COLUMN_HEADER_HEIGHT,
2327
2347
  SPREADSHEET_DEFAULT_VIEWPORT,
@@ -2334,6 +2354,7 @@ export {
2334
2354
  STYLE_ID_ATTRIBUTE,
2335
2355
  SlashCommands,
2336
2356
  SmilieReplacer,
2357
+ Sparkline,
2337
2358
  SpreadsheetController,
2338
2359
  StyleRegistry,
2339
2360
  TABLE_ACTIONS,
@@ -2376,6 +2397,7 @@ export {
2376
2397
  capitalizeSentenceRules,
2377
2398
  captureSelectionFormat,
2378
2399
  cellFormatForNumberFormat,
2400
+ chartPluginKey,
2379
2401
  checkFormulaArgumentCount,
2380
2402
  clampMenuPosition,
2381
2403
  clearNumberFormatCache,
@@ -2400,6 +2422,7 @@ export {
2400
2422
  conditionalFormatNumber,
2401
2423
  conditionalFormatStyleString,
2402
2424
  copySheetName,
2425
+ createChartNodeView,
2403
2426
  createCommentStore,
2404
2427
  createConditionalFormatRule,
2405
2428
  createDirtyTracker,
@@ -2512,6 +2535,7 @@ export {
2512
2535
  getConditionalFormatIcon,
2513
2536
  getCrossReferenceTargets,
2514
2537
  getDataBarCss,
2538
+ getDocumentCharts,
2515
2539
  getDocumentStructureCommandItems,
2516
2540
  getEditorMarkdown,
2517
2541
  getEditorText,
@@ -2565,6 +2589,7 @@ export {
2565
2589
  insertSliceAfterTable,
2566
2590
  instructionRegex,
2567
2591
  isBlankValue,
2592
+ isChartEnabled,
2568
2593
  isFormulaError,
2569
2594
  isFormulaLambda,
2570
2595
  isGeneralNumberFormat,
@@ -2601,6 +2626,7 @@ export {
2601
2626
  normalizeFieldKey,
2602
2627
  normalizeFieldNames,
2603
2628
  normalizeRange,
2629
+ normalizeSparklineValues,
2604
2630
  normalizeTableCellAlignment,
2605
2631
  normalizeTableCellColor,
2606
2632
  numberFormatColorToCss,
@@ -2698,7 +2724,9 @@ export {
2698
2724
  sortRuleRanges,
2699
2725
  sortRules,
2700
2726
  sortZipEntryNames,
2727
+ sparklineLabel,
2701
2728
  splitMarkdownMentionParts,
2729
+ staticChartSvg,
2702
2730
  stripInvalidXmlChars,
2703
2731
  stripMarkdownCode,
2704
2732
  subtractRange,