@harbour-enterprises/superdoc 0.6.27 → 0.6.28

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 (26) hide show
  1. package/dist/chunks/{super-editor.es-C0B7cBkB.js → super-editor.es-BvK2yEZz.js} +46 -16
  2. package/dist/chunks/{super-editor.es-C0B7cBkB.js.map → super-editor.es-BvK2yEZz.js.map} +1 -1
  3. package/dist/super-editor/chunks/{converter-BetRa_D4.js → converter-O6CJbqN0.js} +3 -3
  4. package/dist/super-editor/chunks/{converter-BetRa_D4.js.map → converter-O6CJbqN0.js.map} +1 -1
  5. package/dist/super-editor/chunks/{docx-zipper-CnSLDpbV.js → docx-zipper-T8Q6wxQX.js} +2 -2
  6. package/dist/super-editor/chunks/{docx-zipper-CnSLDpbV.js.map → docx-zipper-T8Q6wxQX.js.map} +1 -1
  7. package/dist/super-editor/chunks/{editor-OcCM25eO.js → editor-DgLDPR8V.js} +39 -15
  8. package/dist/super-editor/chunks/{editor-OcCM25eO.js.map → editor-DgLDPR8V.js.map} +1 -1
  9. package/dist/super-editor/chunks/{toolbar-BalXOgcO.js → toolbar-fJu8zupu.js} +4 -3
  10. package/dist/super-editor/chunks/toolbar-fJu8zupu.js.map +1 -0
  11. package/dist/super-editor/components/toolbar/defaultItems.d.ts.map +1 -1
  12. package/dist/super-editor/components/toolbar/super-toolbar.d.ts +1 -0
  13. package/dist/super-editor/components/toolbar/super-toolbar.d.ts.map +1 -1
  14. package/dist/super-editor/components/toolbar/toolbarIcons.d.ts +1 -0
  15. package/dist/super-editor/converter.es.js +1 -1
  16. package/dist/super-editor/docx-zipper.es.js +2 -2
  17. package/dist/super-editor/editor.es.js +3 -3
  18. package/dist/super-editor/extensions/table/table.d.ts.map +1 -1
  19. package/dist/super-editor/file-zipper.es.js +1 -1
  20. package/dist/super-editor/super-editor.es.js +12 -7
  21. package/dist/super-editor/super-editor.es.js.map +1 -1
  22. package/dist/super-editor/toolbar.es.js +2 -2
  23. package/dist/super-editor.es.js +1 -1
  24. package/dist/superdoc.es.js +3 -3
  25. package/package.json +1 -1
  26. package/dist/super-editor/chunks/toolbar-BalXOgcO.js.map +0 -1
@@ -12,9 +12,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
12
12
  var _events, _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _commandService, _css, _Editor_instances, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, endCollaboration_fn, _FieldAnnotationView_instances, createAnnotation_fn;
13
13
  import * as Y from "yjs";
14
14
  import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement } from "yjs";
15
- import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, f as Schema$1, g as canSplit, l as liftTarget, h as canJoin, j as joinPoint, r as replaceStep$1, R as ReplaceAroundStep, o as objectIncludes, i as ReplaceStep, k as NodeRange, m as findWrapping, n as TrackDeleteMarkName, q as TrackInsertMarkName, v as v4, s as generateDocxRandomId, t as TrackFormatMarkName, u as AddMarkStep, w as RemoveMarkStep, x as comments_module_events, y as twipsToLines, z as pixelsToTwips, B as SuperConverter, E as EditorState, C as toKebabCase, G as kebabCase, H as SelectionRange, I as Transform } from "./converter-BetRa_D4.js";
15
+ import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, f as Schema$1, g as canSplit, l as liftTarget, h as canJoin, j as joinPoint, r as replaceStep$1, R as ReplaceAroundStep, o as objectIncludes, i as ReplaceStep, k as NodeRange, m as findWrapping, n as TrackDeleteMarkName, q as TrackInsertMarkName, v as v4, s as generateDocxRandomId, t as TrackFormatMarkName, u as AddMarkStep, w as RemoveMarkStep, x as comments_module_events, y as twipsToLines, z as pixelsToTwips, B as SuperConverter, E as EditorState, C as toKebabCase, G as kebabCase, H as SelectionRange, I as Transform } from "./converter-O6CJbqN0.js";
16
16
  import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, toDisplayString, createApp } from "vue";
17
- import { D as DocxZipper } from "./docx-zipper-CnSLDpbV.js";
17
+ import { D as DocxZipper } from "./docx-zipper-T8Q6wxQX.js";
18
18
  function getMarksFromSelection(state) {
19
19
  const { from: from2, to, empty: empty2 } = state.selection;
20
20
  const marks = [];
@@ -11384,7 +11384,7 @@ const _Editor = class _Editor extends EventEmitter {
11384
11384
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
11385
11385
  */
11386
11386
  processCollaborationMigrations() {
11387
- console.debug("[checkVersionMigrations] Current editor version", "0.6.27");
11387
+ console.debug("[checkVersionMigrations] Current editor version", "0.6.28");
11388
11388
  if (!this.options.ydoc) return;
11389
11389
  const metaMap = this.options.ydoc.getMap("meta");
11390
11390
  let docVersion = metaMap.get("version");
@@ -16220,6 +16220,17 @@ const deleteTableWhenSelected = ({ editor }) => {
16220
16220
  editor.commands.deleteTable();
16221
16221
  return true;
16222
16222
  };
16223
+ const createCellBorders = ({
16224
+ size = 0.66665,
16225
+ color = "#000000"
16226
+ } = {}) => {
16227
+ return {
16228
+ top: { size, color },
16229
+ left: { size, color },
16230
+ bottom: { size, color },
16231
+ right: { size, color }
16232
+ };
16233
+ };
16223
16234
  const Table = Node.create({
16224
16235
  name: "table",
16225
16236
  content: "tableRow+",
@@ -16384,6 +16395,30 @@ const Table = Node.create({
16384
16395
  tr.setSelection(CellSelection.create(tr.doc, pos.anchorCell, pos.headCell));
16385
16396
  }
16386
16397
  return true;
16398
+ },
16399
+ deleteCellAndTableBorders: () => ({ chain, state, tr }) => {
16400
+ if (!isInTable$1(state)) {
16401
+ return false;
16402
+ }
16403
+ const table = findParentNode((node) => node.type.name === this.name)(state.selection);
16404
+ if (!table) {
16405
+ return false;
16406
+ }
16407
+ const from2 = table.pos;
16408
+ const to = table.pos + table.node.nodeSize;
16409
+ state.doc.nodesBetween(from2, to, (node, pos) => {
16410
+ if (["tableCell", "tableHeader"].includes(node.type.name)) {
16411
+ tr.setNodeMarkup(pos, void 0, {
16412
+ ...node.attrs,
16413
+ borders: createCellBorders({ size: 0 })
16414
+ });
16415
+ }
16416
+ });
16417
+ tr.setNodeMarkup(table.pos, void 0, {
16418
+ ...table.node.attrs,
16419
+ borders: createTableBorders({ size: 0 })
16420
+ });
16421
+ return true;
16387
16422
  }
16388
16423
  };
16389
16424
  },
@@ -16502,17 +16537,6 @@ const TableRow = Node.create({
16502
16537
  return ["tr", Attribute.mergeAttributes(this.options.htmlAttributes, htmlAttributes), 0];
16503
16538
  }
16504
16539
  });
16505
- const createCellBorders = ({
16506
- size = 0.66665,
16507
- color = "#000000"
16508
- } = {}) => {
16509
- return {
16510
- top: { size, color },
16511
- left: { size, color },
16512
- bottom: { size, color },
16513
- right: { size, color }
16514
- };
16515
- };
16516
16540
  const TableCell = Node.create({
16517
16541
  name: "tableCell",
16518
16542
  content: "block+",
@@ -22153,4 +22177,4 @@ export {
22153
22177
  redoDepth as r,
22154
22178
  undoDepth as u
22155
22179
  };
22156
- //# sourceMappingURL=editor-OcCM25eO.js.map
22180
+ //# sourceMappingURL=editor-DgLDPR8V.js.map