@pixerate/editor 0.26.1 → 0.28.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 (90) hide show
  1. package/README.md +32 -3
  2. package/dist/agent/index.cjs +56 -6
  3. package/dist/agent/index.cjs.map +1 -1
  4. package/dist/agent/index.d.cts +6 -4
  5. package/dist/agent/index.d.ts +6 -4
  6. package/dist/agent/index.js +51 -1
  7. package/dist/agent/index.js.map +1 -1
  8. package/dist/animation/index.cjs +62 -0
  9. package/dist/animation/index.cjs.map +1 -0
  10. package/dist/animation/index.d.cts +296 -0
  11. package/dist/animation/index.d.ts +296 -0
  12. package/dist/animation/index.js +62 -0
  13. package/dist/animation/index.js.map +1 -0
  14. package/dist/{builtins-Chj6zv_O.d.ts → builtins-haN82vjT.d.ts} +33 -3
  15. package/dist/{builtins-CdPcLwwF.d.cts → builtins-nMXh9sT3.d.cts} +33 -3
  16. package/dist/canvas/index.cjs +535 -737
  17. package/dist/canvas/index.cjs.map +1 -1
  18. package/dist/canvas/index.d.cts +74 -291
  19. package/dist/canvas/index.d.ts +74 -291
  20. package/dist/canvas/index.js +417 -619
  21. package/dist/canvas/index.js.map +1 -1
  22. package/dist/{chunk-X7HXL2SB.js → chunk-3RPOW4CS.js} +342 -16
  23. package/dist/chunk-3RPOW4CS.js.map +1 -0
  24. package/dist/{chunk-UBCFIABU.js → chunk-5H2OPMXZ.js} +183 -6
  25. package/dist/chunk-5H2OPMXZ.js.map +1 -0
  26. package/dist/chunk-A6PHCAGX.cjs +87 -0
  27. package/dist/chunk-A6PHCAGX.cjs.map +1 -0
  28. package/dist/{chunk-HRMEDT2L.js → chunk-D6AVOTSD.js} +6 -85
  29. package/dist/chunk-D6AVOTSD.js.map +1 -0
  30. package/dist/chunk-HXDMZQTD.cjs +497 -0
  31. package/dist/chunk-HXDMZQTD.cjs.map +1 -0
  32. package/dist/chunk-IB3ZHQAX.js +497 -0
  33. package/dist/chunk-IB3ZHQAX.js.map +1 -0
  34. package/dist/{chunk-4BVP64JJ.cjs → chunk-K2UYKJ6M.cjs} +24 -103
  35. package/dist/chunk-K2UYKJ6M.cjs.map +1 -0
  36. package/dist/{chunk-HDYMLS3X.cjs → chunk-MC2LQN5S.cjs} +196 -19
  37. package/dist/chunk-MC2LQN5S.cjs.map +1 -0
  38. package/dist/{chunk-XQFHLT53.js → chunk-MXZJ4PKN.js} +24 -10
  39. package/dist/chunk-MXZJ4PKN.js.map +1 -0
  40. package/dist/{chunk-LN2POBHT.cjs → chunk-OYEFRO3D.cjs} +28 -14
  41. package/dist/chunk-OYEFRO3D.cjs.map +1 -0
  42. package/dist/chunk-PWJARCI4.js +637 -0
  43. package/dist/chunk-PWJARCI4.js.map +1 -0
  44. package/dist/chunk-TGD52FEZ.js +87 -0
  45. package/dist/chunk-TGD52FEZ.js.map +1 -0
  46. package/dist/chunk-TTYCN6ZH.cjs +637 -0
  47. package/dist/chunk-TTYCN6ZH.cjs.map +1 -0
  48. package/dist/{chunk-NQF32I6Z.cjs → chunk-U7VGDSNY.cjs} +463 -137
  49. package/dist/chunk-U7VGDSNY.cjs.map +1 -0
  50. package/dist/commands/index.cjs +30 -410
  51. package/dist/commands/index.cjs.map +1 -1
  52. package/dist/commands/index.d.cts +1 -1
  53. package/dist/commands/index.d.ts +1 -1
  54. package/dist/commands/index.js +17 -397
  55. package/dist/commands/index.js.map +1 -1
  56. package/dist/{controller-CxXGOEmy.d.ts → controller-w6eRTjF8.d.cts} +67 -2
  57. package/dist/{controller-CxXGOEmy.d.cts → controller-w6eRTjF8.d.ts} +67 -2
  58. package/dist/extensions/index.cjs +25 -7
  59. package/dist/extensions/index.cjs.map +1 -1
  60. package/dist/extensions/index.d.cts +1 -1
  61. package/dist/extensions/index.d.ts +1 -1
  62. package/dist/extensions/index.js +32 -14
  63. package/dist/generation/index.cjs +3 -3
  64. package/dist/generation/index.cjs.map +1 -1
  65. package/dist/generation/index.js +3 -3
  66. package/dist/{index-jcJwmBYt.d.cts → index-C6gaQRH0.d.cts} +53 -4
  67. package/dist/{index-B273Zllk.d.ts → index-DXAv_R08.d.ts} +53 -4
  68. package/dist/index.cjs +57 -19
  69. package/dist/index.cjs.map +1 -1
  70. package/dist/index.d.cts +7 -5
  71. package/dist/index.d.ts +7 -5
  72. package/dist/index.js +132 -94
  73. package/dist/index.js.map +1 -1
  74. package/dist/spreadsheet/index.cjs +23 -3
  75. package/dist/spreadsheet/index.cjs.map +1 -1
  76. package/dist/spreadsheet/index.d.cts +76 -3
  77. package/dist/spreadsheet/index.d.ts +76 -3
  78. package/dist/spreadsheet/index.js +28 -8
  79. package/dist/tokens/index.cjs +4 -2
  80. package/dist/tokens/index.cjs.map +1 -1
  81. package/dist/tokens/index.js +6 -4
  82. package/package.json +6 -1
  83. package/dist/chunk-4BVP64JJ.cjs.map +0 -1
  84. package/dist/chunk-HDYMLS3X.cjs.map +0 -1
  85. package/dist/chunk-HRMEDT2L.js.map +0 -1
  86. package/dist/chunk-LN2POBHT.cjs.map +0 -1
  87. package/dist/chunk-NQF32I6Z.cjs.map +0 -1
  88. package/dist/chunk-UBCFIABU.js.map +0 -1
  89. package/dist/chunk-X7HXL2SB.js.map +0 -1
  90. package/dist/chunk-XQFHLT53.js.map +0 -1
@@ -1,38 +1,42 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3;
2
2
 
3
- var _chunkCS6NZWWAcjs = require('./chunk-CS6NZWWA.cjs');
4
3
 
5
4
 
6
5
 
7
6
 
8
7
 
9
8
 
10
- var _chunk3CC7OPUQcjs = require('./chunk-3CC7OPUQ.cjs');
11
9
 
12
10
 
13
11
 
14
12
 
13
+ var _chunkMC2LQN5Scjs = require('./chunk-MC2LQN5S.cjs');
15
14
 
16
15
 
17
- var _chunkMKA3AHLVcjs = require('./chunk-MKA3AHLV.cjs');
16
+ var _chunkCS6NZWWAcjs = require('./chunk-CS6NZWWA.cjs');
18
17
 
19
18
 
20
19
 
21
20
 
22
21
 
23
22
 
23
+ var _chunk3CC7OPUQcjs = require('./chunk-3CC7OPUQ.cjs');
24
+
24
25
 
25
26
 
26
- var _chunkHNDSPZ5Tcjs = require('./chunk-HNDSPZ5T.cjs');
27
27
 
28
28
 
29
29
 
30
+ var _chunkMKA3AHLVcjs = require('./chunk-MKA3AHLV.cjs');
31
+
30
32
 
31
33
 
32
34
 
33
35
 
34
36
 
35
- var _chunkHDYMLS3Xcjs = require('./chunk-HDYMLS3X.cjs');
37
+
38
+
39
+ var _chunkHNDSPZ5Tcjs = require('./chunk-HNDSPZ5T.cjs');
36
40
 
37
41
 
38
42
 
@@ -3574,6 +3578,15 @@ function insertImportedDocument(target, content, options = {}) {
3574
3578
  if (!htmlSlice && from === to && !state.doc.resolve(from).parent.inlineContent) {
3575
3579
  from = to = _state.Selection.near(state.doc.resolve(from)).from;
3576
3580
  }
3581
+ if (htmlSlice && _chunkMC2LQN5Scjs.sliceContainsTable.call(void 0, htmlSlice) && _chunkMC2LQN5Scjs.outermostTableDepth.call(void 0, state.doc.resolve(from)) >= 0) {
3582
+ const tr2 = state.tr;
3583
+ const end2 = _chunkMC2LQN5Scjs.insertSliceAfterTable.call(void 0, tr2, from, to, htmlSlice);
3584
+ if (end2 !== null) {
3585
+ if (options.at === void 0) tr2.setSelection(_state.Selection.near(tr2.doc.resolve(end2), -1));
3586
+ view.dispatch(tr2.scrollIntoView().setMeta("uiEvent", "drop"));
3587
+ return end2;
3588
+ }
3589
+ }
3577
3590
  const tr = htmlSlice ? state.tr.replaceRange(from, to, htmlSlice) : state.tr.replace(from, to, _chunk66IMF6ODcjs.plainTextToSlice.call(void 0, content.text, state.schema));
3578
3591
  const end = tr.mapping.map(to, 1);
3579
3592
  view.dispatch(tr.scrollIntoView().setMeta("uiEvent", "drop"));
@@ -3744,6 +3757,7 @@ var RichClipboard = _core.Extension.create({
3744
3757
  const slice = _chunkHNDSPZ5Tcjs.readRichClipboard.call(void 0, event, view.state.schema, mimeType);
3745
3758
  if (!slice) return false;
3746
3759
  event.preventDefault();
3760
+ if (_chunkMC2LQN5Scjs.handleTablePasteWithoutNesting.call(void 0, view, event, slice)) return true;
3747
3761
  view.dispatch(
3748
3762
  view.state.tr.replaceSelection(slice).scrollIntoView().setMeta("paste", true).setMeta("uiEvent", "paste")
3749
3763
  );
@@ -7194,7 +7208,7 @@ function createRichTextPreset(options = {}) {
7194
7208
  })
7195
7209
  ];
7196
7210
  if (options.table !== false) {
7197
- extensions2.push(..._chunkHDYMLS3Xcjs.createTableExtensions.call(void 0, optionObject(options.table)));
7211
+ extensions2.push(..._chunkMC2LQN5Scjs.createTableExtensions.call(void 0, optionObject(options.table)));
7198
7212
  }
7199
7213
  if (characterLimit) {
7200
7214
  extensions2.push(
@@ -7447,8 +7461,8 @@ var PARAMS = {
7447
7461
  insertTable: {
7448
7462
  type: "object",
7449
7463
  properties: {
7450
- rows: { type: "integer", minimum: 1, maximum: _chunkHDYMLS3Xcjs.MAX_TABLE_ROWS, description: "Rows (default 3)." },
7451
- cols: { type: "integer", minimum: 1, maximum: _chunkHDYMLS3Xcjs.MAX_TABLE_COLUMNS, description: "Columns (default 3)." },
7464
+ rows: { type: "integer", minimum: 1, maximum: _chunkMC2LQN5Scjs.MAX_TABLE_ROWS, description: "Rows (default 3)." },
7465
+ cols: { type: "integer", minimum: 1, maximum: _chunkMC2LQN5Scjs.MAX_TABLE_COLUMNS, description: "Columns (default 3)." },
7452
7466
  withHeaderRow: { type: "boolean", description: "Make the first row a header row (default true)." }
7453
7467
  },
7454
7468
  additionalProperties: false
@@ -7479,7 +7493,7 @@ function createTableCommands(editor, options = {}) {
7479
7493
  const group = _nullishCoalesce(options.group, () => ( "Table"));
7480
7494
  const scope = options.scope ? { scope: options.scope } : {};
7481
7495
  const focus = _nullishCoalesce(options.focus, () => ( true));
7482
- return _chunkHDYMLS3Xcjs.TABLE_ACTIONS.map(({ action, label, description, keywords }) => {
7496
+ return _chunkMC2LQN5Scjs.TABLE_ACTIONS.map(({ action, label, description, keywords }) => {
7483
7497
  const params = PARAMS[action];
7484
7498
  return {
7485
7499
  id: `${prefix}${action}`,
@@ -7489,13 +7503,13 @@ function createTableCommands(editor, options = {}) {
7489
7503
  description,
7490
7504
  ...params ? { params } : {},
7491
7505
  ...scope,
7492
- enabled: (_ctx, p) => _chunkHDYMLS3Xcjs.getTableActionState.call(void 0, editor, action, _nullishCoalesce(p, () => ( {}))),
7506
+ enabled: (_ctx, p) => _chunkMC2LQN5Scjs.getTableActionState.call(void 0, editor, action, _nullishCoalesce(p, () => ( {}))),
7493
7507
  run: (_ctx, p) => {
7494
- if (!_chunkHDYMLS3Xcjs.runTableAction.call(void 0, editor, action, _nullishCoalesce(p, () => ( {})), { focus })) {
7495
- const reason = _chunkHDYMLS3Xcjs.getTableActionState.call(void 0, editor, action, _nullishCoalesce(p, () => ( {})));
7508
+ if (!_chunkMC2LQN5Scjs.runTableAction.call(void 0, editor, action, _nullishCoalesce(p, () => ( {})), { focus })) {
7509
+ const reason = _chunkMC2LQN5Scjs.getTableActionState.call(void 0, editor, action, _nullishCoalesce(p, () => ( {})));
7496
7510
  throw new Error(reason === true ? `${label} did not change the document.` : reason);
7497
7511
  }
7498
- const state = _chunkHDYMLS3Xcjs.getTableState.call(void 0, editor);
7512
+ const state = _chunkMC2LQN5Scjs.getTableState.call(void 0, editor);
7499
7513
  return {
7500
7514
  done: true,
7501
7515
  table: state.inTable ? { rows: state.rows, columns: state.columns, row: state.row, column: state.column } : null
@@ -7637,4 +7651,4 @@ function createTableCommands(editor, options = {}) {
7637
7651
 
7638
7652
 
7639
7653
  exports.GradientText = GradientText; exports.SlashCommands = SlashCommands; exports.TemplateSuggestions = TemplateSuggestions; exports.LoadingNode = LoadingNode; exports.SMILIE_REPLACEMENTS = SMILIE_REPLACEMENTS; exports.smilieAutocorrectRules = smilieAutocorrectRules; exports.SmilieReplacer = SmilieReplacer; exports.findHexColors = findHexColors; exports.ColorHighlighter = ColorHighlighter; exports.FontSize = FontSize; exports.Mention = Mention; exports.getMentionNodes = getMentionNodes; exports.setMentionRoleAt = setMentionRoleAt; exports.createMentionExtension = createMentionExtension; exports.Markdown = Markdown2; exports.imagePastePluginKey = imagePastePluginKey; exports.insertImageNode = insertImageNode; exports.updateImageSrc = updateImageSrc; exports.removeImageNode = removeImageNode; exports.handleImageInsertion = handleImageInsertion; exports.Image = Image2; exports.commentsPluginKey = commentsPluginKey; exports.COMMENT_MARK_NAME = COMMENT_MARK_NAME; exports.findCommentRanges = findCommentRanges; exports.getCommentAnchors = getCommentAnchors; exports.getCommentIdsAt = getCommentIdsAt; exports.getCommentStore = getCommentStore; exports.Comments = Comments; exports.getCommentAuthor = getCommentAuthor; exports.compareInEditor = compareInEditor; exports.applyDocumentComparison = applyDocumentComparison; exports.DocumentCompare = DocumentCompare; exports.ImportError = ImportError; exports.createImportContext = createImportContext; exports.ImportAdapterRegistry = ImportAdapterRegistry; exports.DOCX_MIME_TYPES = DOCX_MIME_TYPES; exports.DEFAULT_DOCX_MAX_IMAGE_SIZE = DEFAULT_DOCX_MAX_IMAGE_SIZE; exports.docxToDocumentImport = docxToDocumentImport; exports.createDocxImportAdapter = createDocxImportAdapter; exports.docxImportAdapter = docxImportAdapter; exports.markdownImportAdapter = markdownImportAdapter; exports.htmlImportAdapter = htmlImportAdapter; exports.plainTextImportAdapter = plainTextImportAdapter; exports.rtfImportAdapter = rtfImportAdapter; exports.BUILT_IN_IMPORT_ADAPTERS = BUILT_IN_IMPORT_ADAPTERS; exports.createImportAdapterRegistry = createImportAdapterRegistry; exports.defaultImportRegistry = defaultImportRegistry; exports.registerImportAdapter = registerImportAdapter; exports.unregisterImportAdapter = unregisterImportAdapter; exports.findImportAdapter = findImportAdapter; exports.importFile = importFile; exports.getImportAccept = getImportAccept; exports.htmlToSlice = htmlToSlice; exports.insertImportedDocument = insertImportedDocument; exports.applyImportedReviewData = applyImportedReviewData; exports.importFilesIntoEditor = importFilesIntoEditor; exports.fileImportPluginKey = fileImportPluginKey; exports.FileImport = FileImport; exports.richClipboardPluginKey = richClipboardPluginKey; exports.writeRichClipboard = writeRichClipboard; exports.RichClipboard = RichClipboard; exports.smartQuoteRules = smartQuoteRules; exports.symbolRules = symbolRules; exports.fractionRules = fractionRules; exports.capitalizeSentenceRules = capitalizeSentenceRules; exports.twoInitialCapitalsRules = twoInitialCapitalsRules; exports.defaultAutocorrectRules = defaultAutocorrectRules; exports.DEFAULT_AUTOCORRECT_EXCEPTIONS = DEFAULT_AUTOCORRECT_EXCEPTIONS; exports.autocorrectPluginKey = autocorrectPluginKey; exports.findAutocorrection = findAutocorrection; exports.isInsidePromptToken = isInsidePromptToken; exports.Autocorrect = Autocorrect; exports.outlinePluginKey = outlinePluginKey; exports.computeOutline = computeOutline; exports.buildOutlineTree = buildOutlineTree; exports.getOutline = getOutline; exports.getActiveHeading = getActiveHeading; exports.createOutlineStore = createOutlineStore; exports.navigateToHeading = navigateToHeading; exports.Outline = Outline; exports.tableOfContentsMarkdownIt = tableOfContentsMarkdownIt; exports.footnotesMarkdownIt = footnotesMarkdownIt; exports.tableOfContentsPluginKey = tableOfContentsPluginKey; exports.getTableOfContentsEntries = getTableOfContentsEntries; exports.TableOfContents = TableOfContents; exports.footnotesPluginKey = footnotesPluginKey; exports.getFootnotes = getFootnotes; exports.syncFootnotes = syncFootnotes; exports.FootnoteReference = FootnoteReference; exports.Footnotes = Footnotes; exports.Footnote = Footnote; exports.getBookmarks = getBookmarks; exports.Bookmark = Bookmark; exports.crossReferencePluginKey = crossReferencePluginKey; exports.getCrossReferenceTargets = getCrossReferenceTargets; exports.CrossReference = CrossReference; exports.documentStructureCommandItems = documentStructureCommandItems; exports.getDocumentStructureCommandItems = getDocumentStructureCommandItems; exports.FIND_PARAGRAPH_MARK = FIND_PARAGRAPH_MARK; exports.MAX_FIND_PATTERN_LENGTH = MAX_FIND_PATTERN_LENGTH; exports.createSearchBudget = createSearchBudget; exports.foldCodePoint = foldCodePoint; exports.compileFindPattern = compileFindPattern; exports.findAllMatches = findAllMatches; exports.parseReplacement = parseReplacement; exports.expandReplacement = expandReplacement; exports.searchDocument = searchDocument; exports.applyReplacements = applyReplacements; exports.EMPTY_FIND_REPLACE_SNAPSHOT = EMPTY_FIND_REPLACE_SNAPSHOT; exports.FindReplaceStore = FindReplaceStore; exports.findReplacePluginKey = findReplacePluginKey; exports.getFindReplaceState = getFindReplaceState; exports.getFindReplaceStore = getFindReplaceStore; exports.FIND_OPTION_TOGGLES = FIND_OPTION_TOGGLES; exports.formatFindStatus = formatFindStatus; exports.FindReplace = FindReplace; exports.STYLE_ID_ATTRIBUTE = STYLE_ID_ATTRIBUTE; exports.CHARACTER_STYLE_MARK_NAME = CHARACTER_STYLE_MARK_NAME; exports.paragraphStylesPluginKey = paragraphStylesPluginKey; exports.getStyleRegistry = getStyleRegistry; exports.isParagraphStyleAvailable = isParagraphStyleAvailable; exports.getParagraphStyleAt = getParagraphStyleAt; exports.captureSelectionFormat = captureSelectionFormat; exports.CharacterStyle = CharacterStyle; exports.ParagraphStyles = ParagraphStyles; exports.createParagraphStylesStore = createParagraphStylesStore; exports.createRichTextPreset = createRichTextPreset; exports.createFindReplaceCommands = createFindReplaceCommands; exports.validateFindPattern = validateFindPattern; exports.createTableCommands = createTableCommands;
7640
- //# sourceMappingURL=chunk-LN2POBHT.cjs.map
7654
+ //# sourceMappingURL=chunk-OYEFRO3D.cjs.map