@harbour-enterprises/superdoc 0.16.1 → 0.16.2

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 (25) hide show
  1. package/dist/chunks/{PdfViewer-Bov51NJk.cjs → PdfViewer-BBIYn1YM.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-CGOPmqZL.es.js → PdfViewer-ee7q_t8z.es.js} +1 -1
  3. package/dist/chunks/{index-C9t8QM3H.es.js → index-D5yqCRxp.es.js} +3 -3
  4. package/dist/chunks/{index-H2DnqbsC.cjs → index-_XS50pXm.cjs} +3 -3
  5. package/dist/chunks/{super-editor.es-Bd5ul_QJ.cjs → super-editor.es-D00y_cgR.cjs} +8 -6
  6. package/dist/chunks/{super-editor.es-BhpCczpb.es.js → super-editor.es-ICO-Dcg6.es.js} +8 -6
  7. package/dist/super-editor/ai-writer.es.js +2 -2
  8. package/dist/super-editor/chunks/{converter-T_2xCPrJ.js → converter-BPlR2rf0.js} +2 -2
  9. package/dist/super-editor/chunks/{docx-zipper-D22Q5mQ5.js → docx-zipper-DpSB-3Mq.js} +1 -1
  10. package/dist/super-editor/chunks/{editor-CCZEU0o3.js → editor-BPPR4jya.js} +8 -6
  11. package/dist/super-editor/chunks/{toolbar-7j6S3kWZ.js → toolbar-B6F9-coR.js} +2 -2
  12. package/dist/super-editor/converter.es.js +1 -1
  13. package/dist/super-editor/docx-zipper.es.js +2 -2
  14. package/dist/super-editor/editor.es.js +3 -3
  15. package/dist/super-editor/file-zipper.es.js +1 -1
  16. package/dist/super-editor/src/extensions/block-node/block-node.d.ts +2 -1
  17. package/dist/super-editor/super-editor.es.js +6 -6
  18. package/dist/super-editor/toolbar.es.js +2 -2
  19. package/dist/super-editor.cjs +1 -1
  20. package/dist/super-editor.es.js +1 -1
  21. package/dist/superdoc.cjs +2 -2
  22. package/dist/superdoc.es.js +2 -2
  23. package/dist/superdoc.umd.js +9 -7
  24. package/dist/superdoc.umd.js.map +1 -1
  25. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const vue = require("./vue-B6WOnFdF.cjs");
4
- const superdoc = require("./index-H2DnqbsC.cjs");
4
+ const superdoc = require("./index-_XS50pXm.cjs");
5
5
  function self(vars) {
6
6
  const {
7
7
  opacityDisabled,
@@ -1,5 +1,5 @@
1
1
  import { m as defineComponent, B as h, O as Transition, $ as process$1, I as watchEffect, d as computed, r as ref, j as onMounted, W as onUnmounted, c as createElementBlock, o as openBlock, a as createBaseVNode, f as createCommentVNode, v as createVNode, x as unref } from "./vue-xvq3uP6K.es.js";
2
- import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-C9t8QM3H.es.js";
2
+ import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-D5yqCRxp.es.js";
3
3
  function self(vars) {
4
4
  const {
5
5
  opacityDisabled,
@@ -1,4 +1,4 @@
1
- import { q as index$1, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-BhpCczpb.es.js";
1
+ import { q as index$1, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-ICO-Dcg6.es.js";
2
2
  import { a0 as effectScope, r as ref, _ as markRaw, $ as process$1, a1 as toRaw, d as computed, a2 as isRef, a3 as isReactive, C as toRef, i as inject, p as getCurrentInstance, l as watch, x as unref, a4 as hasInjectionContext, M as reactive, s as nextTick, a5 as getCurrentScope, a6 as onScopeDispose, a7 as toRefs, g as global$1, J as shallowRef, N as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, S as onActivated, q as onDeactivated, z as createTextVNode, F as Fragment, Q as Comment, m as defineComponent, D as provide, H as withDirectives, B as h, U as Teleport, R as renderSlot, V as isVNode, I as watchEffect, O as Transition, a8 as TransitionGroup, E as mergeProps, P as vShow, G as cloneVNode, T as Text, c as createElementBlock, o as openBlock, t as toDisplayString, v as createVNode, y as withCtx, a as createBaseVNode, A as normalizeStyle, f as createCommentVNode, u as createBlock, w as withModifiers, n as normalizeClass, a9 as resolveDirective, e as renderList, b as createApp, X as resolveDynamicComponent, aa as defineAsyncComponent } from "./vue-xvq3uP6K.es.js";
3
3
  import { B as Buffer$2 } from "./jszip-DXHu60h9.es.js";
4
4
  import { B as BlankDOCX } from "./blank-docx-iwdyG9RH.es.js";
@@ -17249,7 +17249,7 @@ const _sfc_main = {
17249
17249
  __name: "SuperDoc",
17250
17250
  emits: ["selection-update"],
17251
17251
  setup(__props, { emit: __emit }) {
17252
- const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-CGOPmqZL.es.js"));
17252
+ const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-ee7q_t8z.es.js"));
17253
17253
  const superdocStore = useSuperdocStore();
17254
17254
  const commentsStore = useCommentsStore();
17255
17255
  const {
@@ -17891,7 +17891,7 @@ class SuperDoc extends EventEmitter {
17891
17891
  this.config.colors = shuffleArray(this.config.colors);
17892
17892
  this.userColorMap = /* @__PURE__ */ new Map();
17893
17893
  this.colorIndex = 0;
17894
- this.version = "0.16.0";
17894
+ this.version = "0.16.1";
17895
17895
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
17896
17896
  this.superdocId = config.superdocId || v4();
17897
17897
  this.colors = this.config.colors;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const superEditor_es = require("./super-editor.es-Bd5ul_QJ.cjs");
2
+ const superEditor_es = require("./super-editor.es-D00y_cgR.cjs");
3
3
  const vue = require("./vue-B6WOnFdF.cjs");
4
4
  const jszip = require("./jszip-DmmUnPkH.cjs");
5
5
  const blankDocx = require("./blank-docx-CPqX9RF5.cjs");
@@ -17266,7 +17266,7 @@ const _sfc_main = {
17266
17266
  __name: "SuperDoc",
17267
17267
  emits: ["selection-update"],
17268
17268
  setup(__props, { emit: __emit }) {
17269
- const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-Bov51NJk.cjs")));
17269
+ const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-BBIYn1YM.cjs")));
17270
17270
  const superdocStore = useSuperdocStore();
17271
17271
  const commentsStore = useCommentsStore();
17272
17272
  const {
@@ -17908,7 +17908,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
17908
17908
  this.config.colors = shuffleArray(this.config.colors);
17909
17909
  this.userColorMap = /* @__PURE__ */ new Map();
17910
17910
  this.colorIndex = 0;
17911
- this.version = "0.16.0";
17911
+ this.version = "0.16.1";
17912
17912
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
17913
17913
  this.superdocId = config.superdocId || uuid.v4();
17914
17914
  this.colors = this.config.colors;
@@ -30055,7 +30055,7 @@ const _SuperConverter = class _SuperConverter2 {
30055
30055
  return;
30056
30056
  }
30057
30057
  }
30058
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.16.0") {
30058
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.16.1") {
30059
30059
  const customLocation = "docProps/custom.xml";
30060
30060
  if (!docx[customLocation]) {
30061
30061
  docx[customLocation] = generateCustomXml();
@@ -30537,7 +30537,7 @@ function storeSuperdocVersion(docx) {
30537
30537
  function generateCustomXml() {
30538
30538
  return DEFAULT_CUSTOM_XML;
30539
30539
  }
30540
- function generateSuperdocVersion(pid = 2, version2 = "0.16.0") {
30540
+ function generateSuperdocVersion(pid = 2, version2 = "0.16.1") {
30541
30541
  return {
30542
30542
  type: "element",
30543
30543
  name: "property",
@@ -47306,7 +47306,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
47306
47306
  * @returns {Object | void} Migration results
47307
47307
  */
47308
47308
  processCollaborationMigrations() {
47309
- console.debug("[checkVersionMigrations] Current editor version", "0.16.0");
47309
+ console.debug("[checkVersionMigrations] Current editor version", "0.16.1");
47310
47310
  if (!this.options.ydoc) return;
47311
47311
  const metaMap = this.options.ydoc.getMap("meta");
47312
47312
  let docVersion = metaMap.get("version");
@@ -57983,11 +57983,10 @@ const BlockNode = Extension.create({
57983
57983
  appendTransaction: (transactions, _oldState, newState) => {
57984
57984
  if (hasInitialized && !transactions.some((tr2) => tr2.docChanged)) return null;
57985
57985
  if (hasInitialized && !checkForNewBlockNodesInTrs(transactions)) return null;
57986
- let tr = null;
57986
+ const { tr } = newState;
57987
57987
  let changed = false;
57988
57988
  newState.doc.descendants((node2, pos) => {
57989
57989
  if (!nodeAllowsSdBlockIdAttr(node2) || !nodeNeedsSdBlockId(node2)) return null;
57990
- tr = tr ?? newState.tr;
57991
57990
  tr.setNodeMarkup(
57992
57991
  pos,
57993
57992
  void 0,
@@ -57999,7 +57998,10 @@ const BlockNode = Extension.create({
57999
57998
  );
58000
57999
  changed = true;
58001
58000
  });
58002
- if (changed && !hasInitialized) hasInitialized = true;
58001
+ if (changed && !hasInitialized) {
58002
+ hasInitialized = true;
58003
+ }
58004
+ tr.setStoredMarks(newState.tr.storedMarks);
58003
58005
  return changed ? tr : null;
58004
58006
  }
58005
58007
  })
@@ -30038,7 +30038,7 @@ const _SuperConverter = class _SuperConverter2 {
30038
30038
  return;
30039
30039
  }
30040
30040
  }
30041
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.16.0") {
30041
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.16.1") {
30042
30042
  const customLocation = "docProps/custom.xml";
30043
30043
  if (!docx[customLocation]) {
30044
30044
  docx[customLocation] = generateCustomXml();
@@ -30520,7 +30520,7 @@ function storeSuperdocVersion(docx) {
30520
30520
  function generateCustomXml() {
30521
30521
  return DEFAULT_CUSTOM_XML;
30522
30522
  }
30523
- function generateSuperdocVersion(pid = 2, version2 = "0.16.0") {
30523
+ function generateSuperdocVersion(pid = 2, version2 = "0.16.1") {
30524
30524
  return {
30525
30525
  type: "element",
30526
30526
  name: "property",
@@ -47289,7 +47289,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
47289
47289
  * @returns {Object | void} Migration results
47290
47290
  */
47291
47291
  processCollaborationMigrations() {
47292
- console.debug("[checkVersionMigrations] Current editor version", "0.16.0");
47292
+ console.debug("[checkVersionMigrations] Current editor version", "0.16.1");
47293
47293
  if (!this.options.ydoc) return;
47294
47294
  const metaMap = this.options.ydoc.getMap("meta");
47295
47295
  let docVersion = metaMap.get("version");
@@ -57966,11 +57966,10 @@ const BlockNode = Extension.create({
57966
57966
  appendTransaction: (transactions, _oldState, newState) => {
57967
57967
  if (hasInitialized && !transactions.some((tr2) => tr2.docChanged)) return null;
57968
57968
  if (hasInitialized && !checkForNewBlockNodesInTrs(transactions)) return null;
57969
- let tr = null;
57969
+ const { tr } = newState;
57970
57970
  let changed = false;
57971
57971
  newState.doc.descendants((node2, pos) => {
57972
57972
  if (!nodeAllowsSdBlockIdAttr(node2) || !nodeNeedsSdBlockId(node2)) return null;
57973
- tr = tr ?? newState.tr;
57974
57973
  tr.setNodeMarkup(
57975
57974
  pos,
57976
57975
  void 0,
@@ -57982,7 +57981,10 @@ const BlockNode = Extension.create({
57982
57981
  );
57983
57982
  changed = true;
57984
57983
  });
57985
- if (changed && !hasInitialized) hasInitialized = true;
57984
+ if (changed && !hasInitialized) {
57985
+ hasInitialized = true;
57986
+ }
57987
+ tr.setStoredMarks(newState.tr.storedMarks);
57986
57988
  return changed ? tr : null;
57987
57989
  }
57988
57990
  })
@@ -1,6 +1,6 @@
1
1
  import { ref, onMounted, onUnmounted, computed, createElementBlock, openBlock, withModifiers, createElementVNode, withDirectives, unref, vModelText, createCommentVNode, nextTick } from "vue";
2
- import { T as TextSelection } from "./chunks/converter-T_2xCPrJ.js";
3
- import { _ as _export_sfc } from "./chunks/editor-CCZEU0o3.js";
2
+ import { T as TextSelection } from "./chunks/converter-BPlR2rf0.js";
3
+ import { _ as _export_sfc } from "./chunks/editor-BPPR4jya.js";
4
4
  const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
5
5
  const SYSTEM_PROMPT = "You are an expert copywriter and you are immersed in a document editor. You are to provide document related text responses based on the user prompts. Only write what is asked for. Do not provide explanations. Try to keep placeholders as short as possible. Do not output your prompt. Your instructions are: ";
6
6
  async function baseInsightsFetch(payload, options = {}) {
@@ -30036,7 +30036,7 @@ const _SuperConverter = class _SuperConverter {
30036
30036
  return;
30037
30037
  }
30038
30038
  }
30039
- static updateDocumentVersion(docx = this.convertedXml, version = "0.16.0") {
30039
+ static updateDocumentVersion(docx = this.convertedXml, version = "0.16.1") {
30040
30040
  const customLocation = "docProps/custom.xml";
30041
30041
  if (!docx[customLocation]) {
30042
30042
  docx[customLocation] = generateCustomXml();
@@ -30521,7 +30521,7 @@ function storeSuperdocVersion(docx) {
30521
30521
  function generateCustomXml() {
30522
30522
  return DEFAULT_CUSTOM_XML;
30523
30523
  }
30524
- function generateSuperdocVersion(pid = 2, version = "0.16.0") {
30524
+ function generateSuperdocVersion(pid = 2, version = "0.16.1") {
30525
30525
  return {
30526
30526
  type: "element",
30527
30527
  name: "property",
@@ -1,4 +1,4 @@
1
- import { H as process$1, av as commonjsGlobal, I as Buffer, aw as getDefaultExportFromCjs, ax as getContentTypesFromXml, ay as xmljs } from "./converter-T_2xCPrJ.js";
1
+ import { H as process$1, av as commonjsGlobal, I as Buffer, aw as getDefaultExportFromCjs, ax as getContentTypesFromXml, ay as xmljs } from "./converter-BPlR2rf0.js";
2
2
  function commonjsRequire(path) {
3
3
  throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
4
4
  }
@@ -12,9 +12,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
12
12
  var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, _ListItemNodeView_instances, init_fn2, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn, _DocumentSectionView_instances, init_fn3, addToolTip_fn;
13
13
  import * as Y from "yjs";
14
14
  import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement, encodeStateAsUpdate } from "yjs";
15
- import { P as PluginKey, a as Plugin, M as Mapping, c as callOrGet, g as getExtensionConfigField, b as getMarkType, d as getMarksFromSelection, e as getNodeType, f as getSchemaTypeNameByName, S as Schema$1, h as cleanSchemaItem, T as TextSelection, N as NodeSelection, i as canSplit, j as defaultBlockAt$1, l as liftTarget, A as AllSelection, k as canJoin, m as joinPoint, n as Selection, r as replaceStep$1, F as Fragment, R as ReplaceAroundStep$1, o as Slice, p as isTextSelection, q as getMarkRange, s as isMarkActive, t as isNodeActive, u as deleteProps, D as DOMParser$1, v as ReplaceStep, w as NodeRange, x as findWrapping, L as ListHelpers, y as findParentNode, z as isMacOS, B as isIOS, C as DOMSerializer, E as Mark$1, G as dropPoint, H as process$1, I as Buffer2, J as getSchemaTypeByName, K as inputRulesPlugin, O as TrackDeleteMarkName, Q as TrackInsertMarkName, U as v4, V as TrackFormatMarkName, W as comments_module_events, X as findMark, Y as objectIncludes, Z as AddMarkStep, _ as RemoveMarkStep, $ as twipsToLines, a0 as pixelsToTwips, a1 as helpers, a2 as posToDOMRect, a3 as CommandService, a4 as SuperConverter, a5 as createDocument, a6 as createDocFromMarkdown, a7 as createDocFromHTML, a8 as EditorState, a9 as hasSomeParentWithClass, aa as isActive, ab as unflattenListsInHtml, ac as parseSizeUnit, ad as minMax, ae as getLineHeightValueString, af as InputRule, ag as kebabCase, ah as getListItemStyleDefinitions, ai as docxNumberigHelpers, aj as parseIndentElement, ak as combineIndents, al as StepMap, am as getColStyleDeclaration, an as SelectionRange, ao as Transform, ap as findParentNodeClosestToPos, aq as isInTable$1, ar as createColGroup, as as generateDocxRandomId, at as insertNewRelationship, au as htmlHandler } from "./converter-T_2xCPrJ.js";
15
+ import { P as PluginKey, a as Plugin, M as Mapping, c as callOrGet, g as getExtensionConfigField, b as getMarkType, d as getMarksFromSelection, e as getNodeType, f as getSchemaTypeNameByName, S as Schema$1, h as cleanSchemaItem, T as TextSelection, N as NodeSelection, i as canSplit, j as defaultBlockAt$1, l as liftTarget, A as AllSelection, k as canJoin, m as joinPoint, n as Selection, r as replaceStep$1, F as Fragment, R as ReplaceAroundStep$1, o as Slice, p as isTextSelection, q as getMarkRange, s as isMarkActive, t as isNodeActive, u as deleteProps, D as DOMParser$1, v as ReplaceStep, w as NodeRange, x as findWrapping, L as ListHelpers, y as findParentNode, z as isMacOS, B as isIOS, C as DOMSerializer, E as Mark$1, G as dropPoint, H as process$1, I as Buffer2, J as getSchemaTypeByName, K as inputRulesPlugin, O as TrackDeleteMarkName, Q as TrackInsertMarkName, U as v4, V as TrackFormatMarkName, W as comments_module_events, X as findMark, Y as objectIncludes, Z as AddMarkStep, _ as RemoveMarkStep, $ as twipsToLines, a0 as pixelsToTwips, a1 as helpers, a2 as posToDOMRect, a3 as CommandService, a4 as SuperConverter, a5 as createDocument, a6 as createDocFromMarkdown, a7 as createDocFromHTML, a8 as EditorState, a9 as hasSomeParentWithClass, aa as isActive, ab as unflattenListsInHtml, ac as parseSizeUnit, ad as minMax, ae as getLineHeightValueString, af as InputRule, ag as kebabCase, ah as getListItemStyleDefinitions, ai as docxNumberigHelpers, aj as parseIndentElement, ak as combineIndents, al as StepMap, am as getColStyleDeclaration, an as SelectionRange, ao as Transform, ap as findParentNodeClosestToPos, aq as isInTable$1, ar as createColGroup, as as generateDocxRandomId, at as insertNewRelationship, au as htmlHandler } from "./converter-BPlR2rf0.js";
16
16
  import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
17
- import { D as DocxZipper } from "./docx-zipper-D22Q5mQ5.js";
17
+ import { D as DocxZipper } from "./docx-zipper-DpSB-3Mq.js";
18
18
  var GOOD_LEAF_SIZE = 200;
19
19
  var RopeSequence = function RopeSequence2() {
20
20
  };
@@ -14254,7 +14254,7 @@ const _Editor = class _Editor extends EventEmitter {
14254
14254
  * @returns {Object | void} Migration results
14255
14255
  */
14256
14256
  processCollaborationMigrations() {
14257
- console.debug("[checkVersionMigrations] Current editor version", "0.16.0");
14257
+ console.debug("[checkVersionMigrations] Current editor version", "0.16.1");
14258
14258
  if (!this.options.ydoc) return;
14259
14259
  const metaMap = this.options.ydoc.getMap("meta");
14260
14260
  let docVersion = metaMap.get("version");
@@ -25048,11 +25048,10 @@ const BlockNode = Extension.create({
25048
25048
  appendTransaction: (transactions, _oldState, newState) => {
25049
25049
  if (hasInitialized && !transactions.some((tr2) => tr2.docChanged)) return null;
25050
25050
  if (hasInitialized && !checkForNewBlockNodesInTrs(transactions)) return null;
25051
- let tr = null;
25051
+ const { tr } = newState;
25052
25052
  let changed = false;
25053
25053
  newState.doc.descendants((node, pos) => {
25054
25054
  if (!nodeAllowsSdBlockIdAttr(node) || !nodeNeedsSdBlockId(node)) return null;
25055
- tr = tr ?? newState.tr;
25056
25055
  tr.setNodeMarkup(
25057
25056
  pos,
25058
25057
  void 0,
@@ -25064,7 +25063,10 @@ const BlockNode = Extension.create({
25064
25063
  );
25065
25064
  changed = true;
25066
25065
  });
25067
- if (changed && !hasInitialized) hasInitialized = true;
25066
+ if (changed && !hasInitialized) {
25067
+ hasInitialized = true;
25068
+ }
25069
+ tr.setStoredMarks(newState.tr.storedMarks);
25068
25070
  return changed ? tr : null;
25069
25071
  }
25070
25072
  })
@@ -1,6 +1,6 @@
1
1
  import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
2
- import { H as process$1 } from "./converter-T_2xCPrJ.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-CCZEU0o3.js";
2
+ import { H as process$1 } from "./converter-BPlR2rf0.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-BPPR4jya.js";
4
4
  const sanitizeNumber = (value, defaultNumber) => {
5
5
  let sanitized = value.replace(/[^0-9.]/g, "");
6
6
  sanitized = parseFloat(sanitized);
@@ -1,4 +1,4 @@
1
- import { a4 } from "./chunks/converter-T_2xCPrJ.js";
1
+ import { a4 } from "./chunks/converter-BPlR2rf0.js";
2
2
  export {
3
3
  a4 as SuperConverter
4
4
  };
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-T_2xCPrJ.js";
2
- import { D } from "./chunks/docx-zipper-D22Q5mQ5.js";
1
+ import "./chunks/converter-BPlR2rf0.js";
2
+ import { D } from "./chunks/docx-zipper-DpSB-3Mq.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-CCZEU0o3.js";
2
- import "./chunks/converter-T_2xCPrJ.js";
3
- import "./chunks/docx-zipper-D22Q5mQ5.js";
1
+ import { E } from "./chunks/editor-BPPR4jya.js";
2
+ import "./chunks/converter-BPlR2rf0.js";
3
+ import "./chunks/docx-zipper-DpSB-3Mq.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-D22Q5mQ5.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-DpSB-3Mq.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -2,6 +2,7 @@ export const BlockNodePluginKey: PluginKey<any>;
2
2
  export const BlockNode: Extension;
3
3
  export function nodeAllowsSdBlockIdAttr(node: import("prosemirror-model").Node): boolean;
4
4
  export function nodeNeedsSdBlockId(node: import("prosemirror-model").Node): boolean;
5
- export function checkForNewBlockNodesInTrs(transactions: Array<Transaction>): boolean;
5
+ export function checkForNewBlockNodesInTrs(transactions: readonly Transaction[]): boolean;
6
6
  import { PluginKey } from 'prosemirror-state';
7
7
  import { Extension } from '@core/Extension.js';
8
+ import { Transaction } from 'prosemirror-state';
@@ -9,14 +9,14 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
11
11
  var _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, runCommandWithArgumentOnly_fn;
12
- import { aw as getDefaultExportFromCjs, U as v4, T as TextSelection$1, q as getMarkRange, az as vClickOutside, y as findParentNode, aA as getActiveFormatting, aq as isInTable, aB as readFromClipboard, aC as handleClipboardPaste, aD as getFileObject, a as Plugin } from "./chunks/converter-T_2xCPrJ.js";
13
- import { aE, a4, d, a1 } from "./chunks/converter-T_2xCPrJ.js";
14
- import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, s as startImageUpload, y as yUndoPluginKey, d as undoDepth, r as redoDepth, S as SlashMenuPluginKey, E as Editor, e as getStarterExtensions, P as Placeholder, f as getRichTextExtensions, M as Mark, h as Extension, A as Attribute, N as Node } from "./chunks/editor-CCZEU0o3.js";
15
- import { k, C, l, T, i, m, j } from "./chunks/editor-CCZEU0o3.js";
12
+ import { aw as getDefaultExportFromCjs, U as v4, T as TextSelection$1, q as getMarkRange, az as vClickOutside, y as findParentNode, aA as getActiveFormatting, aq as isInTable, aB as readFromClipboard, aC as handleClipboardPaste, aD as getFileObject, a as Plugin } from "./chunks/converter-BPlR2rf0.js";
13
+ import { aE, a4, d, a1 } from "./chunks/converter-BPlR2rf0.js";
14
+ import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, s as startImageUpload, y as yUndoPluginKey, d as undoDepth, r as redoDepth, S as SlashMenuPluginKey, E as Editor, e as getStarterExtensions, P as Placeholder, f as getRichTextExtensions, M as Mark, h as Extension, A as Attribute, N as Node } from "./chunks/editor-BPPR4jya.js";
15
+ import { k, C, l, T, i, m, j } from "./chunks/editor-BPPR4jya.js";
16
16
  import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, reactive, onUnmounted, renderSlot, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
17
- import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-7j6S3kWZ.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-B6F9-coR.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-D22Q5mQ5.js";
19
+ import { D } from "./chunks/docx-zipper-DpSB-3Mq.js";
20
20
  import { createZip } from "./file-zipper.es.js";
21
21
  var eventemitter3 = { exports: {} };
22
22
  var hasRequiredEventemitter3;
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-7j6S3kWZ.js";
3
- import "./chunks/editor-CCZEU0o3.js";
2
+ import { T } from "./chunks/toolbar-B6F9-coR.js";
3
+ import "./chunks/editor-BPPR4jya.js";
4
4
  export {
5
5
  T as default
6
6
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./chunks/super-editor.es-Bd5ul_QJ.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-D00y_cgR.cjs");
4
4
  require("./chunks/vue-B6WOnFdF.cjs");
5
5
  exports.AIWriter = superEditor_es.AIWriter;
6
6
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
@@ -1,4 +1,4 @@
1
- import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, q } from "./chunks/super-editor.es-BhpCczpb.es.js";
1
+ import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, q } from "./chunks/super-editor.es-ICO-Dcg6.es.js";
2
2
  import "./chunks/vue-xvq3uP6K.es.js";
3
3
  export {
4
4
  A as AIWriter,
package/dist/superdoc.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./chunks/super-editor.es-Bd5ul_QJ.cjs");
4
- const superdoc = require("./chunks/index-H2DnqbsC.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-D00y_cgR.cjs");
4
+ const superdoc = require("./chunks/index-_XS50pXm.cjs");
5
5
  require("./chunks/vue-B6WOnFdF.cjs");
6
6
  require("./chunks/jszip-DmmUnPkH.cjs");
7
7
  const blankDocx = require("./chunks/blank-docx-CPqX9RF5.cjs");
@@ -1,5 +1,5 @@
1
- import { a, E, b, S, d, i, j, n, p, q } from "./chunks/super-editor.es-BhpCczpb.es.js";
2
- import { D, H, P, S as S2, m, l } from "./chunks/index-C9t8QM3H.es.js";
1
+ import { a, E, b, S, d, i, j, n, p, q } from "./chunks/super-editor.es-ICO-Dcg6.es.js";
2
+ import { D, H, P, S as S2, m, l } from "./chunks/index-D5yqCRxp.es.js";
3
3
  import "./chunks/vue-xvq3uP6K.es.js";
4
4
  import "./chunks/jszip-DXHu60h9.es.js";
5
5
  import { B } from "./chunks/blank-docx-iwdyG9RH.es.js";
@@ -37720,7 +37720,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
37720
37720
  return;
37721
37721
  }
37722
37722
  }
37723
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.16.0") {
37723
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.16.1") {
37724
37724
  const customLocation = "docProps/custom.xml";
37725
37725
  if (!docx[customLocation]) {
37726
37726
  docx[customLocation] = generateCustomXml();
@@ -38202,7 +38202,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38202
38202
  function generateCustomXml() {
38203
38203
  return DEFAULT_CUSTOM_XML;
38204
38204
  }
38205
- function generateSuperdocVersion(pid = 2, version2 = "0.16.0") {
38205
+ function generateSuperdocVersion(pid = 2, version2 = "0.16.1") {
38206
38206
  return {
38207
38207
  type: "element",
38208
38208
  name: "property",
@@ -54971,7 +54971,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
54971
54971
  * @returns {Object | void} Migration results
54972
54972
  */
54973
54973
  processCollaborationMigrations() {
54974
- console.debug("[checkVersionMigrations] Current editor version", "0.16.0");
54974
+ console.debug("[checkVersionMigrations] Current editor version", "0.16.1");
54975
54975
  if (!this.options.ydoc) return;
54976
54976
  const metaMap = this.options.ydoc.getMap("meta");
54977
54977
  let docVersion = metaMap.get("version");
@@ -65648,11 +65648,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
65648
65648
  appendTransaction: (transactions, _oldState, newState) => {
65649
65649
  if (hasInitialized && !transactions.some((tr2) => tr2.docChanged)) return null;
65650
65650
  if (hasInitialized && !checkForNewBlockNodesInTrs(transactions)) return null;
65651
- let tr = null;
65651
+ const { tr } = newState;
65652
65652
  let changed = false;
65653
65653
  newState.doc.descendants((node2, pos) => {
65654
65654
  if (!nodeAllowsSdBlockIdAttr(node2) || !nodeNeedsSdBlockId(node2)) return null;
65655
- tr = tr ?? newState.tr;
65656
65655
  tr.setNodeMarkup(
65657
65656
  pos,
65658
65657
  void 0,
@@ -65664,7 +65663,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
65664
65663
  );
65665
65664
  changed = true;
65666
65665
  });
65667
- if (changed && !hasInitialized) hasInitialized = true;
65666
+ if (changed && !hasInitialized) {
65667
+ hasInitialized = true;
65668
+ }
65669
+ tr.setStoredMarks(newState.tr.storedMarks);
65668
65670
  return changed ? tr : null;
65669
65671
  }
65670
65672
  })
@@ -104484,7 +104486,7 @@ ${style2}
104484
104486
  this.config.colors = shuffleArray(this.config.colors);
104485
104487
  this.userColorMap = /* @__PURE__ */ new Map();
104486
104488
  this.colorIndex = 0;
104487
- this.version = "0.16.0";
104489
+ this.version = "0.16.1";
104488
104490
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
104489
104491
  this.superdocId = config.superdocId || v4();
104490
104492
  this.colors = this.config.colors;