@harbour-enterprises/superdoc 0.14.9-next.7 → 0.14.9-next.9

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.
@@ -19205,7 +19205,7 @@ function parseMarks(property2, unknownMarks = [], docx = null) {
19205
19205
  seen.add(m.type);
19206
19206
  const { attributes = {} } = element;
19207
19207
  const newMark = { type: m.type };
19208
- if (attributes["w:val"] == "0" || attributes["w:val"] === "none") {
19208
+ if (attributes["w:val"] === "0" || attributes["w:val"] === "none") {
19209
19209
  return;
19210
19210
  }
19211
19211
  if (m.mark) newMark.type = m.mark;
@@ -19263,7 +19263,8 @@ function getMarkValue(markType, attributes, docx) {
19263
19263
  underline: () => attributes["w:val"],
19264
19264
  bold: () => attributes?.["w:val"] || null,
19265
19265
  italic: () => attributes?.["w:val"] || null,
19266
- highlight: () => getHighLightValue(attributes)
19266
+ highlight: () => getHighLightValue(attributes),
19267
+ strike: () => getStrikeValue(attributes)
19267
19268
  };
19268
19269
  if (!(markType in markValueMapper)) {
19269
19270
  console.debug("❗️❗️ No value mapper for:", markType, "Attributes:", attributes);
@@ -19306,6 +19307,9 @@ function getHighLightValue(attributes) {
19306
19307
  if (isValidHexColor(attributes?.["w:val"])) return `#${attributes["w:val"]}`;
19307
19308
  return getHexColorFromDocxSystem(attributes?.["w:val"]) || null;
19308
19309
  }
19310
+ function getStrikeValue(attributes) {
19311
+ return attributes?.["w:val"] === "1" ? attributes["w:val"] : null;
19312
+ }
19309
19313
  function parseProperties(node2, docx) {
19310
19314
  const marks = [];
19311
19315
  const unknownMarks = [];
@@ -26466,7 +26470,7 @@ const _SuperConverter = class _SuperConverter2 {
26466
26470
  return;
26467
26471
  }
26468
26472
  }
26469
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.9-next.7") {
26473
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.9-next.9") {
26470
26474
  const customLocation = "docProps/custom.xml";
26471
26475
  if (!docx[customLocation]) {
26472
26476
  docx[customLocation] = generateCustomXml();
@@ -26898,7 +26902,7 @@ __publicField$2(_SuperConverter, "markTypes", [
26898
26902
  { name: "w:i", type: "italic" },
26899
26903
  { name: "w:iCs", type: "italic" },
26900
26904
  { name: "w:u", type: "underline", mark: "underline", property: "underlineType" },
26901
- { name: "w:strike", type: "strike" },
26905
+ { name: "w:strike", type: "strike", mark: "strike" },
26902
26906
  { name: "w:color", type: "color", mark: "textStyle", property: "color" },
26903
26907
  { name: "w:sz", type: "fontSize", mark: "textStyle", property: "fontSize" },
26904
26908
  { name: "w:szCs", type: "fontSize", mark: "textStyle", property: "fontSize" },
@@ -26942,7 +26946,7 @@ function storeSuperdocVersion(docx) {
26942
26946
  function generateCustomXml() {
26943
26947
  return DEFAULT_CUSTOM_XML;
26944
26948
  }
26945
- function generateSuperdocVersion(pid = 2, version2 = "0.14.9-next.7") {
26949
+ function generateSuperdocVersion(pid = 2, version2 = "0.14.9-next.9") {
26946
26950
  return {
26947
26951
  type: "element",
26948
26952
  name: "property",
@@ -43028,7 +43032,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
43028
43032
  * @returns {Object | void} Migration results
43029
43033
  */
43030
43034
  processCollaborationMigrations() {
43031
- console.debug("[checkVersionMigrations] Current editor version", "0.14.9-next.7");
43035
+ console.debug("[checkVersionMigrations] Current editor version", "0.14.9-next.9");
43032
43036
  if (!this.options.ydoc) return;
43033
43037
  const metaMap = this.options.ydoc.getMap("meta");
43034
43038
  let docVersion = metaMap.get("version");
@@ -19222,7 +19222,7 @@ function parseMarks(property2, unknownMarks = [], docx = null) {
19222
19222
  seen.add(m.type);
19223
19223
  const { attributes = {} } = element;
19224
19224
  const newMark = { type: m.type };
19225
- if (attributes["w:val"] == "0" || attributes["w:val"] === "none") {
19225
+ if (attributes["w:val"] === "0" || attributes["w:val"] === "none") {
19226
19226
  return;
19227
19227
  }
19228
19228
  if (m.mark) newMark.type = m.mark;
@@ -19280,7 +19280,8 @@ function getMarkValue(markType, attributes, docx) {
19280
19280
  underline: () => attributes["w:val"],
19281
19281
  bold: () => attributes?.["w:val"] || null,
19282
19282
  italic: () => attributes?.["w:val"] || null,
19283
- highlight: () => getHighLightValue(attributes)
19283
+ highlight: () => getHighLightValue(attributes),
19284
+ strike: () => getStrikeValue(attributes)
19284
19285
  };
19285
19286
  if (!(markType in markValueMapper)) {
19286
19287
  console.debug("❗️❗️ No value mapper for:", markType, "Attributes:", attributes);
@@ -19323,6 +19324,9 @@ function getHighLightValue(attributes) {
19323
19324
  if (isValidHexColor(attributes?.["w:val"])) return `#${attributes["w:val"]}`;
19324
19325
  return getHexColorFromDocxSystem(attributes?.["w:val"]) || null;
19325
19326
  }
19327
+ function getStrikeValue(attributes) {
19328
+ return attributes?.["w:val"] === "1" ? attributes["w:val"] : null;
19329
+ }
19326
19330
  function parseProperties(node2, docx) {
19327
19331
  const marks = [];
19328
19332
  const unknownMarks = [];
@@ -26483,7 +26487,7 @@ const _SuperConverter = class _SuperConverter2 {
26483
26487
  return;
26484
26488
  }
26485
26489
  }
26486
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.9-next.7") {
26490
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.9-next.9") {
26487
26491
  const customLocation = "docProps/custom.xml";
26488
26492
  if (!docx[customLocation]) {
26489
26493
  docx[customLocation] = generateCustomXml();
@@ -26915,7 +26919,7 @@ __publicField$2(_SuperConverter, "markTypes", [
26915
26919
  { name: "w:i", type: "italic" },
26916
26920
  { name: "w:iCs", type: "italic" },
26917
26921
  { name: "w:u", type: "underline", mark: "underline", property: "underlineType" },
26918
- { name: "w:strike", type: "strike" },
26922
+ { name: "w:strike", type: "strike", mark: "strike" },
26919
26923
  { name: "w:color", type: "color", mark: "textStyle", property: "color" },
26920
26924
  { name: "w:sz", type: "fontSize", mark: "textStyle", property: "fontSize" },
26921
26925
  { name: "w:szCs", type: "fontSize", mark: "textStyle", property: "fontSize" },
@@ -26959,7 +26963,7 @@ function storeSuperdocVersion(docx) {
26959
26963
  function generateCustomXml() {
26960
26964
  return DEFAULT_CUSTOM_XML;
26961
26965
  }
26962
- function generateSuperdocVersion(pid = 2, version2 = "0.14.9-next.7") {
26966
+ function generateSuperdocVersion(pid = 2, version2 = "0.14.9-next.9") {
26963
26967
  return {
26964
26968
  type: "element",
26965
26969
  name: "property",
@@ -43045,7 +43049,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
43045
43049
  * @returns {Object | void} Migration results
43046
43050
  */
43047
43051
  processCollaborationMigrations() {
43048
- console.debug("[checkVersionMigrations] Current editor version", "0.14.9-next.7");
43052
+ console.debug("[checkVersionMigrations] Current editor version", "0.14.9-next.9");
43049
43053
  if (!this.options.ydoc) return;
43050
43054
  const metaMap = this.options.ydoc.getMap("meta");
43051
43055
  let docVersion = metaMap.get("version");
package/dist/style.css CHANGED
@@ -20,43 +20,6 @@
20
20
  padding: 0;
21
21
  margin: 0;
22
22
  }
23
- /* CSS isolation for SuperEditor - resets all properties and makes elements
24
- only use programmatic and inline styles */
25
- .super-editor p,
26
- .super-editor h1,
27
- .super-editor h2,
28
- .super-editor h3,
29
- .super-editor h4,
30
- .super-editor h5,
31
- .super-editor h6,
32
- .super-editor li,
33
- .super-editor strong,
34
- .super-editor em,
35
- .super-editor b,
36
- .super-editor i,
37
- .super-editor u,
38
- .super-editor a,
39
- .super-editor blockquote,
40
- .super-editor ul,
41
- .super-editor ol {
42
- margin: 0 !important;
43
- padding: 0 !important;
44
- color: unset !important;
45
- background-color: unset !important;
46
- outline: none !important;
47
- border: none !important;
48
- }
49
- /* Handle spans separately - reset all except track changes */
50
- .super-editor span {
51
- margin: 0 !important;
52
- padding: 0 !important;
53
- outline: none !important;
54
- border: none !important;
55
- }
56
- /* Reset background color only for non-track-change spans */
57
- .super-editor span:not(.track-insert):not(.track-delete) {
58
- background-color: unset !important;
59
- }
60
23
  .sd-button {
61
24
  border-radius: 8px;
62
25
  background-color: white;
@@ -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-C_fU_GdA.js";
3
- import { _ as _export_sfc } from "./chunks/editor-D-IfBoeP.js";
2
+ import { T as TextSelection } from "./chunks/converter-BYD1VQ8G.js";
3
+ import { _ as _export_sfc } from "./chunks/editor-DmKpoq5E.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 = {}) {
@@ -19224,7 +19224,7 @@ function parseMarks(property, unknownMarks = [], docx = null) {
19224
19224
  seen.add(m.type);
19225
19225
  const { attributes = {} } = element;
19226
19226
  const newMark = { type: m.type };
19227
- if (attributes["w:val"] == "0" || attributes["w:val"] === "none") {
19227
+ if (attributes["w:val"] === "0" || attributes["w:val"] === "none") {
19228
19228
  return;
19229
19229
  }
19230
19230
  if (m.mark) newMark.type = m.mark;
@@ -19282,7 +19282,8 @@ function getMarkValue(markType, attributes, docx) {
19282
19282
  underline: () => attributes["w:val"],
19283
19283
  bold: () => attributes?.["w:val"] || null,
19284
19284
  italic: () => attributes?.["w:val"] || null,
19285
- highlight: () => getHighLightValue(attributes)
19285
+ highlight: () => getHighLightValue(attributes),
19286
+ strike: () => getStrikeValue(attributes)
19286
19287
  };
19287
19288
  if (!(markType in markValueMapper)) {
19288
19289
  console.debug("❗️❗️ No value mapper for:", markType, "Attributes:", attributes);
@@ -19325,6 +19326,9 @@ function getHighLightValue(attributes) {
19325
19326
  if (isValidHexColor(attributes?.["w:val"])) return `#${attributes["w:val"]}`;
19326
19327
  return getHexColorFromDocxSystem(attributes?.["w:val"]) || null;
19327
19328
  }
19329
+ function getStrikeValue(attributes) {
19330
+ return attributes?.["w:val"] === "1" ? attributes["w:val"] : null;
19331
+ }
19328
19332
  function parseProperties(node2, docx) {
19329
19333
  const marks = [];
19330
19334
  const unknownMarks = [];
@@ -26485,7 +26489,7 @@ const _SuperConverter = class _SuperConverter {
26485
26489
  return;
26486
26490
  }
26487
26491
  }
26488
- static updateDocumentVersion(docx = this.convertedXml, version = "0.14.9-next.7") {
26492
+ static updateDocumentVersion(docx = this.convertedXml, version = "0.14.9-next.9") {
26489
26493
  const customLocation = "docProps/custom.xml";
26490
26494
  if (!docx[customLocation]) {
26491
26495
  docx[customLocation] = generateCustomXml();
@@ -26920,7 +26924,7 @@ __publicField(_SuperConverter, "markTypes", [
26920
26924
  { name: "w:i", type: "italic" },
26921
26925
  { name: "w:iCs", type: "italic" },
26922
26926
  { name: "w:u", type: "underline", mark: "underline", property: "underlineType" },
26923
- { name: "w:strike", type: "strike" },
26927
+ { name: "w:strike", type: "strike", mark: "strike" },
26924
26928
  { name: "w:color", type: "color", mark: "textStyle", property: "color" },
26925
26929
  { name: "w:sz", type: "fontSize", mark: "textStyle", property: "fontSize" },
26926
26930
  { name: "w:szCs", type: "fontSize", mark: "textStyle", property: "fontSize" },
@@ -26964,7 +26968,7 @@ function storeSuperdocVersion(docx) {
26964
26968
  function generateCustomXml() {
26965
26969
  return DEFAULT_CUSTOM_XML;
26966
26970
  }
26967
- function generateSuperdocVersion(pid = 2, version = "0.14.9-next.7") {
26971
+ function generateSuperdocVersion(pid = 2, version = "0.14.9-next.9") {
26968
26972
  return {
26969
26973
  type: "element",
26970
26974
  name: "property",
@@ -1,4 +1,4 @@
1
- import { H as process$1, ar as commonjsGlobal, I as Buffer, as as getDefaultExportFromCjs, at as getContentTypesFromXml, au as xmljs } from "./converter-C_fU_GdA.js";
1
+ import { H as process$1, ar as commonjsGlobal, I as Buffer, as as getDefaultExportFromCjs, at as getContentTypesFromXml, au as xmljs } from "./converter-BYD1VQ8G.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, _commandService, _css, _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, createDocFromHTML_fn, createView_fn, onCollaborationReady_fn, initComments_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, _ListItemNodeView_instances, init_fn2, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_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, i as canSplit, l as liftTarget, A as AllSelection, j as canJoin, k as joinPoint, N as NodeSelection, m as Selection, r as replaceStep$1, F as Fragment, R as ReplaceAroundStep$1, n as Slice, o as defaultBlockAt$1, 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, y as findParentNode, L as ListHelpers, 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 findParentNodeClosestToPos, a2 as helpers, a3 as posToDOMRect, a4 as CommandService, a5 as SuperConverter, a6 as createDocument, a7 as EditorState, a8 as hasSomeParentWithClass, a9 as isActive, aa as unflattenListsInHtml, ab as parseSizeUnit, ac as minMax, ad as getLineHeightValueString, ae as InputRule, af as kebabCase, ag as generateOrderedListIndex, ah as getListItemStyleDefinitions, ai as docxNumberigHelpers, aj as parseIndentElement, ak as combineIndents, al as getColStyleDeclaration, am as SelectionRange, an as Transform, ao as isInTable$1, ap as createColGroup, aq as generateDocxRandomId } from "./converter-C_fU_GdA.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, i as canSplit, l as liftTarget, A as AllSelection, j as canJoin, k as joinPoint, N as NodeSelection, m as Selection, r as replaceStep$1, F as Fragment, R as ReplaceAroundStep$1, n as Slice, o as defaultBlockAt$1, 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, y as findParentNode, L as ListHelpers, 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 findParentNodeClosestToPos, a2 as helpers, a3 as posToDOMRect, a4 as CommandService, a5 as SuperConverter, a6 as createDocument, a7 as EditorState, a8 as hasSomeParentWithClass, a9 as isActive, aa as unflattenListsInHtml, ab as parseSizeUnit, ac as minMax, ad as getLineHeightValueString, ae as InputRule, af as kebabCase, ag as generateOrderedListIndex, ah as getListItemStyleDefinitions, ai as docxNumberigHelpers, aj as parseIndentElement, ak as combineIndents, al as getColStyleDeclaration, am as SelectionRange, an as Transform, ao as isInTable$1, ap as createColGroup, aq as generateDocxRandomId } from "./converter-BYD1VQ8G.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-Dxi88tYJ.js";
17
+ import { D as DocxZipper } from "./docx-zipper-CEAPoB9b.js";
18
18
  var GOOD_LEAF_SIZE = 200;
19
19
  var RopeSequence = function RopeSequence2() {
20
20
  };
@@ -13604,7 +13604,7 @@ const _Editor = class _Editor extends EventEmitter {
13604
13604
  * @returns {Object | void} Migration results
13605
13605
  */
13606
13606
  processCollaborationMigrations() {
13607
- console.debug("[checkVersionMigrations] Current editor version", "0.14.9-next.7");
13607
+ console.debug("[checkVersionMigrations] Current editor version", "0.14.9-next.9");
13608
13608
  if (!this.options.ydoc) return;
13609
13609
  const metaMap = this.options.ydoc.getMap("meta");
13610
13610
  let docVersion = metaMap.get("version");
@@ -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-C_fU_GdA.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-D-IfBoeP.js";
2
+ import { H as process$1 } from "./converter-BYD1VQ8G.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-DmKpoq5E.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 { a5 } from "./chunks/converter-C_fU_GdA.js";
1
+ import { a5 } from "./chunks/converter-BYD1VQ8G.js";
2
2
  export {
3
3
  a5 as SuperConverter
4
4
  };
@@ -28,6 +28,11 @@ export class SuperConverter {
28
28
  type: string;
29
29
  mark: string;
30
30
  property: string;
31
+ } | {
32
+ name: string;
33
+ type: string;
34
+ mark: string;
35
+ property?: undefined;
31
36
  })[];
32
37
  static propertyTypes: Readonly<{
33
38
  'w:pPr': "paragraphProperties";
@@ -1 +1 @@
1
- {"version":3,"file":"SuperConverter.d.ts","sourceRoot":"","sources":["../../../src/core/super-converter/SuperConverter.js"],"names":[],"mappings":"AAeA;IACE;;;;;;;;;;;;;;;;;;OAuBG;IAEH;;;;;;;;;;SAiBE;IAEF;;;;;;OAMG;IAEH,6BAAsF;IAwFtF,gDAoBC;IAED,6DAqBC;IAjID,0BA8DC;IA5DC,WAAmC;IAGnC,iBAAuB;IACvB,wBAA8B;IAG9B,iBAAsB;IACtB,UAA8B;IAC9B,WAAgC;IAEhC,WAAgC;IAEhC,eAAoB;IACpB,gBAAkB;IAGlB,4BAAoC;IAGpC,SAAsB;IAItB,cAAmB;IAInB,gBAAsB;IAGtB,iBAAuB;IAGvB,YAAiB;IACjB;;;;;MAAsE;IACtE,qBAAuB;IACvB,YAAiB;IACjB;;;;;MAAsE;IACtE,qBAAuB;IAGvB,oBAAsB;IAGtB,UAAwB;IAExB,0BAAiC;IACjC,0BAA4B;IAG5B,eAA0C;IAC1C,wBAA8B;IAG9B,gBAA4C;IAC5C,gBAA4C;IAM9C,qBAgBC;IAED,8BAEC;IA+CD;;;;;;;;;;MAkDC;IAED,2BAmDC;IAED,8BAwBC;IAED;;;;;;MAWC;IAED;;;;;;MAiBC;IAED,2EAeC;IAED,gDAGC;IAED,uLA+DC;IAED;;;;;;;;;;;;MA8BC;;CAkNF"}
1
+ {"version":3,"file":"SuperConverter.d.ts","sourceRoot":"","sources":["../../../src/core/super-converter/SuperConverter.js"],"names":[],"mappings":"AAeA;IACE;;;;;;;;;;;;;;;;;;OAuBG;IAEH;;;;;;;;;;;;;;;SAiBE;IAEF;;;;;;OAMG;IAEH,6BAAsF;IAwFtF,gDAoBC;IAED,6DAqBC;IAjID,0BA8DC;IA5DC,WAAmC;IAGnC,iBAAuB;IACvB,wBAA8B;IAG9B,iBAAsB;IACtB,UAA8B;IAC9B,WAAgC;IAEhC,WAAgC;IAEhC,eAAoB;IACpB,gBAAkB;IAGlB,4BAAoC;IAGpC,SAAsB;IAItB,cAAmB;IAInB,gBAAsB;IAGtB,iBAAuB;IAGvB,YAAiB;IACjB;;;;;MAAsE;IACtE,qBAAuB;IACvB,YAAiB;IACjB;;;;;MAAsE;IACtE,qBAAuB;IAGvB,oBAAsB;IAGtB,UAAwB;IAExB,0BAAiC;IACjC,0BAA4B;IAG5B,eAA0C;IAC1C,wBAA8B;IAG9B,gBAA4C;IAC5C,gBAA4C;IAM9C,qBAgBC;IAED,8BAEC;IA+CD;;;;;;;;;;MAkDC;IAED,2BAmDC;IAED,8BAwBC;IAED;;;;;;MAWC;IAED;;;;;;MAiBC;IAED,2EAeC;IAED,gDAGC;IAED,uLA+DC;IAED;;;;;;;;;;;;MA8BC;;CAkNF"}
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-C_fU_GdA.js";
2
- import { D } from "./chunks/docx-zipper-Dxi88tYJ.js";
1
+ import "./chunks/converter-BYD1VQ8G.js";
2
+ import { D } from "./chunks/docx-zipper-CEAPoB9b.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-D-IfBoeP.js";
2
- import "./chunks/converter-C_fU_GdA.js";
3
- import "./chunks/docx-zipper-Dxi88tYJ.js";
1
+ import { E } from "./chunks/editor-DmKpoq5E.js";
2
+ import "./chunks/converter-BYD1VQ8G.js";
3
+ import "./chunks/docx-zipper-CEAPoB9b.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-Dxi88tYJ.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-CEAPoB9b.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -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 { as as getDefaultExportFromCjs, U as v4, T as TextSelection$1, q as getMarkRange, av as vClickOutside, y as findParentNode, aw as getActiveFormatting, ao as isInTable, ax as readFromClipboard, ay as handleClipboardPaste, a as Plugin } from "./chunks/converter-C_fU_GdA.js";
13
- import { a5, d, a2 } from "./chunks/converter-C_fU_GdA.js";
14
- import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, s as startImageUpload, 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-D-IfBoeP.js";
15
- import { k, C, T, i, l, j } from "./chunks/editor-D-IfBoeP.js";
12
+ import { as as getDefaultExportFromCjs, U as v4, T as TextSelection$1, q as getMarkRange, av as vClickOutside, y as findParentNode, aw as getActiveFormatting, ao as isInTable, ax as readFromClipboard, ay as handleClipboardPaste, a as Plugin } from "./chunks/converter-BYD1VQ8G.js";
13
+ import { a5, d, a2 } from "./chunks/converter-BYD1VQ8G.js";
14
+ import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, s as startImageUpload, 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-DmKpoq5E.js";
15
+ import { k, C, T, i, l, j } from "./chunks/editor-DmKpoq5E.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, l as linkIconSvg, a as tableIconSvg, b as scissorsIconSvg, c as copyIconSvg, p as pasteIconSvg, N as NSkeleton } from "./chunks/toolbar-DbRwZ5B3.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, l as linkIconSvg, a as tableIconSvg, b as scissorsIconSvg, c as copyIconSvg, p as pasteIconSvg, N as NSkeleton } from "./chunks/toolbar-Du1chimo.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-Dxi88tYJ.js";
19
+ import { D } from "./chunks/docx-zipper-CEAPoB9b.js";
20
20
  import { createZip } from "./file-zipper.es.js";
21
21
  var eventemitter3 = { exports: {} };
22
22
  (function(module) {
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-DbRwZ5B3.js";
3
- import "./chunks/editor-D-IfBoeP.js";
2
+ import { T } from "./chunks/toolbar-Du1chimo.js";
3
+ import "./chunks/editor-DmKpoq5E.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-nYlTZyLH.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-Dh6D5xrr.cjs");
4
4
  require("./chunks/vue-tQYF719J.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, c, S, d, e, f, T, g, h, i, j, k, l, m, n, o, p } from "./chunks/super-editor.es-D0U14nJM.es.js";
1
+ import { A, a, _, C, D, E, b, c, S, d, e, f, T, g, h, i, j, k, l, m, n, o, p } from "./chunks/super-editor.es-ByAORmfV.es.js";
2
2
  import "./chunks/vue-lU0o_RlU.es.js";
3
3
  export {
4
4
  A as AIWriter,
package/dist/superdoc.cjs CHANGED
@@ -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-nYlTZyLH.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-Dh6D5xrr.cjs");
4
4
  const vue = require("./chunks/vue-tQYF719J.cjs");
5
5
  const jszip = require("./chunks/jszip-D5XoMX4C.cjs");
6
6
  const blankDocx = require("./chunks/blank-docx-CPqX9RF5.cjs");
@@ -47815,7 +47815,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
47815
47815
  this.config.colors = shuffleArray(this.config.colors);
47816
47816
  this.userColorMap = /* @__PURE__ */ new Map();
47817
47817
  this.colorIndex = 0;
47818
- this.version = "0.14.9-next.7";
47818
+ this.version = "0.14.9-next.9";
47819
47819
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
47820
47820
  this.superdocId = config.superdocId || uuid.v4();
47821
47821
  this.colors = this.config.colors;
@@ -1,5 +1,5 @@
1
- import { p as index$1, C as CommentsPluginKey, g as TrackChangesBasePluginKey, E as Editor, m as getRichTextExtensions, e as SuperInput, d as SuperEditor, A as AIWriter, f as SuperToolbar, h as createZip } from "./chunks/super-editor.es-D0U14nJM.es.js";
2
- import { a, S, i, o } from "./chunks/super-editor.es-D0U14nJM.es.js";
1
+ import { p as index$1, C as CommentsPluginKey, g as TrackChangesBasePluginKey, E as Editor, m as getRichTextExtensions, e as SuperInput, d as SuperEditor, A as AIWriter, f as SuperToolbar, h as createZip } from "./chunks/super-editor.es-ByAORmfV.es.js";
2
+ import { a, S, i, o } from "./chunks/super-editor.es-ByAORmfV.es.js";
3
3
  import { a0 as effectScope, r as ref, $ as markRaw, p as process$1, a1 as toRaw, a as computed, a2 as isRef, a3 as isReactive, D as toRef, i as inject, q as getCurrentInstance, l as watch, y as unref, a4 as hasInjectionContext, N as reactive, u as nextTick, a5 as getCurrentScope, a6 as onScopeDispose, a7 as toRefs, g as global$1, K as shallowRef, O as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, U as onActivated, s as onDeactivated, A as createTextVNode, F as Fragment, R as Comment, m as defineComponent, E as provide, I as withDirectives, C as h, V as Teleport, S as renderSlot, W as isVNode, J as watchEffect, P as Transition, G as mergeProps, Q as vShow, H as cloneVNode, T as Text, b as createElementBlock, o as openBlock, t as toDisplayString, x as createVNode, z as withCtx, f as createBaseVNode, B as normalizeStyle, e as createCommentVNode, v as createBlock, w as withModifiers, n as normalizeClass, a8 as resolveDirective, d as renderList, c as createApp, X as onUnmounted, Y as resolveDynamicComponent } from "./chunks/vue-lU0o_RlU.es.js";
4
4
  import { B as Buffer$2 } from "./chunks/jszip-CYDYUNnI.es.js";
5
5
  import { B as BlankDOCX } from "./chunks/blank-docx-iwdyG9RH.es.js";
@@ -47798,7 +47798,7 @@ class SuperDoc extends EventEmitter {
47798
47798
  this.config.colors = shuffleArray(this.config.colors);
47799
47799
  this.userColorMap = /* @__PURE__ */ new Map();
47800
47800
  this.colorIndex = 0;
47801
- this.version = "0.14.9-next.7";
47801
+ this.version = "0.14.9-next.9";
47802
47802
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
47803
47803
  this.superdocId = config.superdocId || v4();
47804
47804
  this.colors = this.config.colors;
@@ -26600,7 +26600,7 @@
26600
26600
  seen.add(m.type);
26601
26601
  const { attributes = {} } = element;
26602
26602
  const newMark = { type: m.type };
26603
- if (attributes["w:val"] == "0" || attributes["w:val"] === "none") {
26603
+ if (attributes["w:val"] === "0" || attributes["w:val"] === "none") {
26604
26604
  return;
26605
26605
  }
26606
26606
  if (m.mark) newMark.type = m.mark;
@@ -26658,7 +26658,8 @@
26658
26658
  underline: () => attributes["w:val"],
26659
26659
  bold: () => attributes?.["w:val"] || null,
26660
26660
  italic: () => attributes?.["w:val"] || null,
26661
- highlight: () => getHighLightValue(attributes)
26661
+ highlight: () => getHighLightValue(attributes),
26662
+ strike: () => getStrikeValue(attributes)
26662
26663
  };
26663
26664
  if (!(markType in markValueMapper)) {
26664
26665
  console.debug("❗️❗️ No value mapper for:", markType, "Attributes:", attributes);
@@ -26701,6 +26702,9 @@
26701
26702
  if (isValidHexColor(attributes?.["w:val"])) return `#${attributes["w:val"]}`;
26702
26703
  return getHexColorFromDocxSystem(attributes?.["w:val"]) || null;
26703
26704
  }
26705
+ function getStrikeValue(attributes) {
26706
+ return attributes?.["w:val"] === "1" ? attributes["w:val"] : null;
26707
+ }
26704
26708
  function parseProperties(node2, docx) {
26705
26709
  const marks = [];
26706
26710
  const unknownMarks = [];
@@ -33861,7 +33865,7 @@
33861
33865
  return;
33862
33866
  }
33863
33867
  }
33864
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.9-next.7") {
33868
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.9-next.9") {
33865
33869
  const customLocation = "docProps/custom.xml";
33866
33870
  if (!docx[customLocation]) {
33867
33871
  docx[customLocation] = generateCustomXml();
@@ -34293,7 +34297,7 @@
34293
34297
  { name: "w:i", type: "italic" },
34294
34298
  { name: "w:iCs", type: "italic" },
34295
34299
  { name: "w:u", type: "underline", mark: "underline", property: "underlineType" },
34296
- { name: "w:strike", type: "strike" },
34300
+ { name: "w:strike", type: "strike", mark: "strike" },
34297
34301
  { name: "w:color", type: "color", mark: "textStyle", property: "color" },
34298
34302
  { name: "w:sz", type: "fontSize", mark: "textStyle", property: "fontSize" },
34299
34303
  { name: "w:szCs", type: "fontSize", mark: "textStyle", property: "fontSize" },
@@ -34337,7 +34341,7 @@
34337
34341
  function generateCustomXml() {
34338
34342
  return DEFAULT_CUSTOM_XML;
34339
34343
  }
34340
- function generateSuperdocVersion(pid = 2, version2 = "0.14.9-next.7") {
34344
+ function generateSuperdocVersion(pid = 2, version2 = "0.14.9-next.9") {
34341
34345
  return {
34342
34346
  type: "element",
34343
34347
  name: "property",
@@ -50423,7 +50427,7 @@
50423
50427
  * @returns {Object | void} Migration results
50424
50428
  */
50425
50429
  processCollaborationMigrations() {
50426
- console.debug("[checkVersionMigrations] Current editor version", "0.14.9-next.7");
50430
+ console.debug("[checkVersionMigrations] Current editor version", "0.14.9-next.9");
50427
50431
  if (!this.options.ydoc) return;
50428
50432
  const metaMap = this.options.ydoc.getMap("meta");
50429
50433
  let docVersion = metaMap.get("version");
@@ -96195,7 +96199,7 @@ ${style2}
96195
96199
  this.config.colors = shuffleArray(this.config.colors);
96196
96200
  this.userColorMap = /* @__PURE__ */ new Map();
96197
96201
  this.colorIndex = 0;
96198
- this.version = "0.14.9-next.7";
96202
+ this.version = "0.14.9-next.9";
96199
96203
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
96200
96204
  this.superdocId = config.superdocId || v4();
96201
96205
  this.colors = this.config.colors;