@superdoc-dev/cli 0.11.0-next.11 → 0.11.0-next.12

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 (2) hide show
  1. package/dist/index.js +222 -99
  2. package/package.json +9 -9
package/dist/index.js CHANGED
@@ -66320,7 +66320,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
66320
66320
  emptyOptions2 = {};
66321
66321
  });
66322
66322
 
66323
- // ../../packages/superdoc/dist/chunks/SuperConverter-CnwfJPj6.es.js
66323
+ // ../../packages/superdoc/dist/chunks/SuperConverter-BLUJyRB9.es.js
66324
66324
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
66325
66325
  const fieldValue = extension$1.config[field];
66326
66326
  if (typeof fieldValue === "function")
@@ -86340,8 +86340,26 @@ function mutatePart(request) {
86340
86340
  result: capturedResult
86341
86341
  };
86342
86342
  }
86343
+ function getRelationshipsRoot(part) {
86344
+ if (!part || typeof part !== "object")
86345
+ return;
86346
+ if (part.name === "Relationships")
86347
+ return part;
86348
+ const children = part.elements;
86349
+ if (!Array.isArray(children))
86350
+ return;
86351
+ return children.find((el) => el?.name === "Relationships");
86352
+ }
86353
+ function createRelationshipsPart(elements = []) {
86354
+ return {
86355
+ type: "element",
86356
+ name: "Relationships",
86357
+ attributes: { xmlns: RELS_XMLNS$2 },
86358
+ elements
86359
+ };
86360
+ }
86343
86361
  function getRelationshipsTag(part) {
86344
- const tag = part?.elements?.find((el) => el.name === "Relationships");
86362
+ const tag = getRelationshipsRoot(part);
86345
86363
  if (tag && !tag.elements)
86346
86364
  tag.elements = [];
86347
86365
  return tag;
@@ -86361,8 +86379,25 @@ function getMaxIdInt(elements) {
86361
86379
  }
86362
86380
  return max4;
86363
86381
  }
86382
+ function createRelationshipElement(id2, mappedType, target, isExternal) {
86383
+ const rel = {
86384
+ type: "element",
86385
+ name: "Relationship",
86386
+ attributes: {
86387
+ Id: id2,
86388
+ Type: mappedType,
86389
+ Target: target
86390
+ }
86391
+ };
86392
+ if (isExternal)
86393
+ rel.attributes.TargetMode = "External";
86394
+ return rel;
86395
+ }
86396
+ function findExistingRelationship(elements, target, normalized, mappedType) {
86397
+ return elements.find((rel) => (rel.attributes?.Target === normalized || rel.attributes?.Target === target) && rel.attributes?.Type === mappedType);
86398
+ }
86364
86399
  function findOrCreateRelationship(editor, source, options) {
86365
- const { target, type, dryRun, expectedRevision } = options;
86400
+ const { target, type, partId = RELS_PART_ID, dryRun, expectedRevision } = options;
86366
86401
  if (!target || typeof target !== "string")
86367
86402
  return null;
86368
86403
  if (!type || typeof type !== "string")
@@ -86374,9 +86409,22 @@ function findOrCreateRelationship(editor, source, options) {
86374
86409
  }
86375
86410
  const normalized = normalizeTarget(target);
86376
86411
  const isExternal = type === "hyperlink";
86412
+ if (!hasPart(editor, partId)) {
86413
+ const newId = "rId1";
86414
+ mutatePart({
86415
+ editor,
86416
+ partId,
86417
+ operation: "create",
86418
+ source,
86419
+ dryRun,
86420
+ expectedRevision,
86421
+ initial: createRelationshipsPart([createRelationshipElement(newId, mappedType, isExternal ? target : normalized, isExternal)])
86422
+ });
86423
+ return newId;
86424
+ }
86377
86425
  return mutatePart({
86378
86426
  editor,
86379
- partId: RELS_PART_ID,
86427
+ partId,
86380
86428
  operation: "mutate",
86381
86429
  source,
86382
86430
  dryRun,
@@ -86385,24 +86433,11 @@ function findOrCreateRelationship(editor, source, options) {
86385
86433
  const tag = getRelationshipsTag(part);
86386
86434
  if (!tag)
86387
86435
  return null;
86388
- const existing = tag.elements.find((rel) => rel.attributes?.Target === normalized && rel.attributes?.Type === mappedType);
86436
+ const existing = findExistingRelationship(tag.elements, target, normalized, mappedType);
86389
86437
  if (existing)
86390
86438
  return existing.attributes.Id;
86391
- const existingRaw = tag.elements.find((rel) => rel.attributes?.Target === target && rel.attributes?.Type === mappedType);
86392
- if (existingRaw)
86393
- return existingRaw.attributes.Id;
86394
86439
  const newId = `rId${getMaxIdInt(tag.elements) + 1}`;
86395
- const newRel = {
86396
- type: "element",
86397
- name: "Relationship",
86398
- attributes: {
86399
- Id: newId,
86400
- Type: mappedType,
86401
- Target: isExternal ? target : normalized
86402
- }
86403
- };
86404
- if (isExternal)
86405
- newRel.attributes.TargetMode = "External";
86440
+ const newRel = createRelationshipElement(newId, mappedType, isExternal ? target : normalized, isExternal);
86406
86441
  tag.elements.push(newRel);
86407
86442
  return newId;
86408
86443
  }
@@ -93663,12 +93698,26 @@ function addImageRelationshipForId(params3, id2, imagePath) {
93663
93698
  name: "Relationship",
93664
93699
  attributes: {
93665
93700
  Id: id2,
93666
- Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",
93701
+ Type: IMAGE_REL_TYPE,
93667
93702
  Target: imagePath
93668
93703
  }
93669
93704
  };
93670
93705
  params3.relationships.push(newRel);
93671
93706
  }
93707
+ function getDocumentRelationships(params3) {
93708
+ return (params3.converter?.convertedXml || {})["word/_rels/document.xml.rels"]?.elements?.find((el) => el.name === "Relationships")?.elements ?? [];
93709
+ }
93710
+ function findImageRelationship(relationships = [], { id: id2, target }) {
93711
+ return relationships.find((rel) => {
93712
+ if (rel?.attributes?.Type !== IMAGE_REL_TYPE)
93713
+ return false;
93714
+ if (id2)
93715
+ return rel.attributes.Id === id2;
93716
+ if (target)
93717
+ return rel.attributes.Target === target;
93718
+ return false;
93719
+ });
93720
+ }
93672
93721
  function translateVectorShape(params3) {
93673
93722
  const { node: node3 } = params3;
93674
93723
  const { drawingContent } = node3.attrs;
@@ -100109,6 +100158,16 @@ function registerStaticInvalidationHandlers() {
100109
100158
  function registerHeaderFooterInvalidation(partId) {
100110
100159
  registerInvalidationHandler(partId, handleHeaderFooterInvalidation);
100111
100160
  }
100161
+ function normalizeWordPartPath(target = "") {
100162
+ return `word/${String(target).replace(/\\/g, "/").replace(/^(\.\/|\/)+/, "").replace(/^word\//, "")}`;
100163
+ }
100164
+ function getWordPartRelsPath(partPath = "") {
100165
+ const normalized = String(partPath).replace(/\\/g, "/");
100166
+ const lastSlash = normalized.lastIndexOf("/");
100167
+ if (lastSlash < 0 || lastSlash === normalized.length - 1)
100168
+ return `word/_rels/${lastSlash < 0 ? normalized : normalized.slice(lastSlash + 1)}.rels`;
100169
+ return `${normalized.slice(0, lastSlash)}/_rels/${normalized.slice(lastSlash + 1)}.rels`;
100170
+ }
100112
100171
  function getConverterForHeaderFooter(editor) {
100113
100172
  return editor.converter;
100114
100173
  }
@@ -100132,11 +100191,7 @@ function normalizeRelationshipTarget(target) {
100132
100191
  return normalized;
100133
100192
  }
100134
100193
  function toRelsPathForPart(partPath) {
100135
- const normalized = normalizeRelationshipTarget(partPath);
100136
- const fileName = normalized.split("/").pop();
100137
- if (!fileName)
100138
- return normalized;
100139
- return `word/_rels/${fileName}.rels`;
100194
+ return getWordPartRelsPath(normalizeRelationshipTarget(partPath));
100140
100195
  }
100141
100196
  function ensureConvertedXml(converter) {
100142
100197
  if (!converter.convertedXml || typeof converter.convertedXml !== "object")
@@ -100152,7 +100207,7 @@ function readRelationshipsRoot(converter) {
100152
100207
  return null;
100153
100208
  return relationshipsRoot;
100154
100209
  }
100155
- function getRelationshipElements(root2) {
100210
+ function getRelationshipElements$1(root2) {
100156
100211
  if (!Array.isArray(root2.elements))
100157
100212
  return [];
100158
100213
  return root2.elements.filter((entry) => entry.name === "Relationship");
@@ -100164,7 +100219,7 @@ function hasHeaderFooterRelationship(converter, input) {
100164
100219
  const relationshipsRoot = readRelationshipsRoot(converter);
100165
100220
  if (!relationshipsRoot)
100166
100221
  return false;
100167
- return findRelationshipById(getRelationshipElements(relationshipsRoot), input.refId, toRelationshipType(input.kind)) !== undefined;
100222
+ return findRelationshipById(getRelationshipElements$1(relationshipsRoot), input.refId, toRelationshipType(input.kind)) !== undefined;
100168
100223
  }
100169
100224
  function nextRelationshipId(relationships) {
100170
100225
  const usedIds = new Set(relationships.map((entry) => String(entry.attributes?.Id ?? "")).filter((value) => value.length > 0));
@@ -100274,7 +100329,7 @@ function createHeaderFooterPart(editor, input) {
100274
100329
  ensureConvertedXml(converter);
100275
100330
  const convertedXml = converter.convertedXml;
100276
100331
  const relationshipsRoot = readRelationshipsRoot(converter);
100277
- const relationships = relationshipsRoot ? getRelationshipElements(relationshipsRoot) : [];
100332
+ const relationships = relationshipsRoot ? getRelationshipElements$1(relationshipsRoot) : [];
100278
100333
  const newRefId = nextRelationshipId(relationships);
100279
100334
  const relationshipType = toRelationshipType(input.kind);
100280
100335
  const newFilename = nextHeaderFooterFilename(input.kind, relationships, convertedXml);
@@ -100636,6 +100691,15 @@ function registerHeaderFooterInvalidationHandler(partId) {
100636
100691
  function getConverter$3(editor) {
100637
100692
  return editor.converter;
100638
100693
  }
100694
+ function normalizeHeaderFooterPartPath(target = "") {
100695
+ return normalizeWordPartPath(target);
100696
+ }
100697
+ function getHeaderFooterRelsPartId(partId) {
100698
+ return getWordPartRelsPath(partId);
100699
+ }
100700
+ function getRelationshipElements(part) {
100701
+ return getRelationshipsRoot(part)?.elements ?? [];
100702
+ }
100639
100703
  function resolvePartIdFromRefId(editor, headerFooterRefId) {
100640
100704
  const relsRoot = getConverter$3(editor)?.convertedXml?.["word/_rels/document.xml.rels"]?.elements?.find((el) => el.name === "Relationships");
100641
100705
  if (!relsRoot?.elements)
@@ -100651,10 +100715,14 @@ function resolvePartIdFromRefId(editor, headerFooterRefId) {
100651
100715
  const target = el.attributes?.Target;
100652
100716
  if (!target)
100653
100717
  continue;
100654
- return `word/${target}`;
100718
+ return normalizeHeaderFooterPartPath(target);
100655
100719
  }
100656
100720
  return null;
100657
100721
  }
100722
+ function resolveHeaderFooterRelsPartIdFromRefId(editor, headerFooterRefId) {
100723
+ const partId = resolvePartIdFromRefId(editor, headerFooterRefId);
100724
+ return partId ? getHeaderFooterRelsPartId(partId) : null;
100725
+ }
100658
100726
  function resolveRIdFromRelsData(relsData, partId) {
100659
100727
  const target = partId.replace(/^word\//, "");
100660
100728
  const relsRoot = relsData?.elements?.find((el) => el.name === "Relationships");
@@ -100693,6 +100761,8 @@ function exportSubEditorToPart(mainEditor, subEditor, headerFooterRefId, type) {
100693
100761
  if (!partId)
100694
100762
  return false;
100695
100763
  ensureHeaderFooterDescriptor(partId, headerFooterRefId);
100764
+ const relsPartId = getHeaderFooterRelsPartId(partId);
100765
+ const existingRelationships = getRelationshipElements(converter.convertedXml?.[relsPartId]);
100696
100766
  const pmJson = typeof subEditor.getUpdatedJson === "function" ? subEditor.getUpdatedJson() : converter[`${type}s`]?.[headerFooterRefId];
100697
100767
  if (!pmJson)
100698
100768
  return false;
@@ -100704,7 +100774,8 @@ function exportSubEditorToPart(mainEditor, subEditor, headerFooterRefId, type) {
100704
100774
  editorSchema: subEditor.schema,
100705
100775
  isHeaderFooter: true,
100706
100776
  comments: [],
100707
- commentDefinitions: []
100777
+ commentDefinitions: [],
100778
+ existingRelationships
100708
100779
  });
100709
100780
  bodyContent = result?.elements?.[0]?.elements ?? [];
100710
100781
  } catch (err$1) {
@@ -100765,7 +100836,7 @@ function registerExistingHeaderFooterDescriptors(editor) {
100765
100836
  const id2 = el.attributes?.Id;
100766
100837
  if (!target || !id2)
100767
100838
  continue;
100768
- const partId = `word/${target}`;
100839
+ const partId = normalizeHeaderFooterPartPath(target);
100769
100840
  if (isHeaderFooterPartId(partId))
100770
100841
  ensureHeaderFooterDescriptor(partId, id2);
100771
100842
  }
@@ -100936,7 +101007,7 @@ function cleanupCreatedPart(editor, partPath) {
100936
101007
  if (hasPart(editor, partId))
100937
101008
  removePart(editor, partId);
100938
101009
  removeInvalidationHandler(partId);
100939
- const relsPath = `word/_rels/${partPath.split("/").pop()}.rels`;
101010
+ const relsPath = getWordPartRelsPath(partPath);
100940
101011
  if (hasPart(editor, relsPath))
100941
101012
  removePart(editor, relsPath);
100942
101013
  }
@@ -114389,7 +114460,7 @@ var isRegExp = (value) => {
114389
114460
  this.prevTime = prevTime;
114390
114461
  this.prevComposition = prevComposition;
114391
114462
  }
114392
- }, DEPTH_OVERFLOW = 20, cachedPreserveItems = false, cachedPreserveItemsPlugins = null, historyKey, closeHistoryKey, undo, redo, ySyncPluginKey, yUndoPluginKey, yCursorPluginKey, descriptors, PlanError, revisionMap, subscribedEditors, handlers, stalePartIds, RELATIONSHIP_TYPES, RELS_PART_ID = "word/_rels/document.xml.rels", handleDecimal = (path2, lvlText) => generateNumbering(path2, lvlText, numberToStringFormatter), handleRoman = (path2, lvlText) => generateNumbering(path2, lvlText, intToRoman), handleLowerRoman = (path2, lvlText) => {
114463
+ }, DEPTH_OVERFLOW = 20, cachedPreserveItems = false, cachedPreserveItemsPlugins = null, historyKey, closeHistoryKey, undo, redo, ySyncPluginKey, yUndoPluginKey, yCursorPluginKey, descriptors, PlanError, revisionMap, subscribedEditors, handlers, stalePartIds, RELATIONSHIP_TYPES, RELS_XMLNS$2 = "http://schemas.openxmlformats.org/package/2006/relationships", RELS_PART_ID = "word/_rels/document.xml.rels", handleDecimal = (path2, lvlText) => generateNumbering(path2, lvlText, numberToStringFormatter), handleRoman = (path2, lvlText) => generateNumbering(path2, lvlText, intToRoman), handleLowerRoman = (path2, lvlText) => {
114393
114464
  const result = handleRoman(path2, lvlText);
114394
114465
  return result ? result.toLowerCase() : null;
114395
114466
  }, handleAlpha = (path2, lvlText) => generateNumbering(path2, lvlText, intToAlpha), handleLowerAlpha = (path2, lvlText) => {
@@ -115842,7 +115913,7 @@ var isRegExp = (value) => {
115842
115913
  tr,
115843
115914
  changed: true
115844
115915
  };
115845
- }, STRUCTURED_CONTENT_NODE_TYPES, helpers_exports, DECORATIVE_EXT_URI = "{C183D7F6-B498-43B3-948B-1728B52AA6E4}", DECORATIVE_NAMESPACE = "http://schemas.microsoft.com/office/drawing/2017/decorative", HYPERLINK_REL_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", translateImageNode = (params3) => {
115916
+ }, STRUCTURED_CONTENT_NODE_TYPES, helpers_exports, DECORATIVE_EXT_URI = "{C183D7F6-B498-43B3-948B-1728B52AA6E4}", DECORATIVE_NAMESPACE = "http://schemas.microsoft.com/office/drawing/2017/decorative", HYPERLINK_REL_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", IMAGE_REL_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", translateImageNode = (params3) => {
115846
115917
  const { node: { attrs = {} }, tableCell, imageSize } = params3;
115847
115918
  let imageId = attrs.rId;
115848
115919
  const src = attrs.originalSrc || attrs.src || attrs.imageSrc;
@@ -115882,9 +115953,14 @@ var isRegExp = (value) => {
115882
115953
  };
115883
115954
  }
115884
115955
  if (imageId) {
115885
- const hasRelation = (params3.converter?.convertedXml || {})["word/_rels/document.xml.rels"]?.elements?.find((el) => el.name === "Relationships")?.elements.find((el) => el.attributes.Id === imageId);
115886
115956
  const path2 = src?.split("word/")[1];
115887
- if (!hasRelation)
115957
+ const existingRelation = findImageRelationship(params3.isHeaderFooter ? params3.existingRelationships : getDocumentRelationships(params3), {
115958
+ id: imageId,
115959
+ target: path2
115960
+ });
115961
+ if (existingRelation)
115962
+ imageId = existingRelation.attributes.Id;
115963
+ else
115888
115964
  addImageRelationshipForId(params3, imageId, path2);
115889
115965
  } else if (params3.node.type === "image" && !imageId) {
115890
115966
  const path2 = src?.split("word/")[1];
@@ -120116,7 +120192,7 @@ var isRegExp = (value) => {
120116
120192
  state.kern = kernNode.attributes["w:val"];
120117
120193
  }
120118
120194
  }, SuperConverter;
120119
- var init_SuperConverter_CnwfJPj6_es = __esm(() => {
120195
+ var init_SuperConverter_BLUJyRB9_es = __esm(() => {
120120
120196
  init_rolldown_runtime_Bg48TavK_es();
120121
120197
  init_jszip_C49i9kUs_es();
120122
120198
  init_xml_js_CqGKpaft_es();
@@ -157862,7 +157938,7 @@ var init_SuperConverter_CnwfJPj6_es = __esm(() => {
157862
157938
  this.#exportNumberingFile(params3);
157863
157939
  return xml;
157864
157940
  }
157865
- exportToXmlJson({ data, editorSchema, comments, commentDefinitions, commentsExportType = "clean", isFinalDoc = false, editor, isHeaderFooter = false, fieldsHighlightColor = null, preserveSdtWrappers = false, statFieldCacheMap = undefined }) {
157941
+ exportToXmlJson({ data, editorSchema, comments, commentDefinitions, commentsExportType = "clean", isFinalDoc = false, editor, isHeaderFooter = false, fieldsHighlightColor = null, preserveSdtWrappers = false, statFieldCacheMap = undefined, existingRelationships = [] }) {
157866
157942
  const bodyNode = this.savedTagsToRestore.find((el) => el.name === "w:body");
157867
157943
  let resolvedCacheMap = statFieldCacheMap ?? this._currentStatFieldCacheMap;
157868
157944
  if (!resolvedCacheMap)
@@ -157887,7 +157963,8 @@ var init_SuperConverter_CnwfJPj6_es = __esm(() => {
157887
157963
  isHeaderFooter,
157888
157964
  fieldsHighlightColor,
157889
157965
  preserveSdtWrappers,
157890
- statFieldCacheMap: resolvedCacheMap
157966
+ statFieldCacheMap: resolvedCacheMap,
157967
+ existingRelationships
157891
157968
  });
157892
157969
  return {
157893
157970
  result,
@@ -157974,8 +158051,10 @@ var init_SuperConverter_CnwfJPj6_es = __esm(() => {
157974
158051
  const relationships = this.convertedXml["word/_rels/document.xml.rels"].elements.find((x) => x.name === "Relationships");
157975
158052
  const newDocRels = [];
157976
158053
  Object.entries(this.headers).forEach(([id2, header], index2) => {
157977
- const fileName = relationships.elements.find((el) => el.attributes.Id === id2)?.attributes.Target || `header${index2 + 1}.xml`;
158054
+ const partPath = normalizeWordPartPath(relationships.elements.find((el) => el.attributes.Id === id2)?.attributes.Target || `header${index2 + 1}.xml`);
158055
+ const relsPath = getWordPartRelsPath(partPath);
157978
158056
  const headerEditor = this.headerEditors.find((item) => item.id === id2);
158057
+ const existingRelationships = this.convertedXml[relsPath]?.elements?.find((x) => x.name === "Relationships")?.elements || [];
157979
158058
  if (!headerEditor)
157980
158059
  return;
157981
158060
  const { result, params: params3 } = this.exportToXmlJson({
@@ -157985,11 +158064,12 @@ var init_SuperConverter_CnwfJPj6_es = __esm(() => {
157985
158064
  comments: [],
157986
158065
  commentDefinitions: [],
157987
158066
  isHeaderFooter: true,
157988
- isFinalDoc
158067
+ isFinalDoc,
158068
+ existingRelationships
157989
158069
  });
157990
158070
  const bodyContent = result.elements[0].elements;
157991
- if (!this.convertedXml[`word/${fileName}`]) {
157992
- this.convertedXml[`word/${fileName}`] = {
158071
+ if (!this.convertedXml[partPath]) {
158072
+ this.convertedXml[partPath] = {
157993
158073
  declaration: this.initialJSON?.declaration,
157994
158074
  elements: [{
157995
158075
  attributes: DEFAULT_DOCX_DEFS,
@@ -158004,26 +158084,26 @@ var init_SuperConverter_CnwfJPj6_es = __esm(() => {
158004
158084
  attributes: {
158005
158085
  Id: id2,
158006
158086
  Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",
158007
- Target: fileName
158087
+ Target: partPath.replace(/^word\//, "")
158008
158088
  }
158009
158089
  });
158010
158090
  }
158011
- this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
158012
- if (params3.relationships.length) {
158013
- const relationships$1 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x) => x.name === "Relationships")?.elements || [];
158014
- this.convertedXml[`word/_rels/${fileName}.rels`] = {
158091
+ this.convertedXml[partPath].elements[0].elements = bodyContent;
158092
+ if (params3.relationships.length)
158093
+ this.convertedXml[relsPath] = {
158015
158094
  declaration: this.initialJSON?.declaration,
158016
158095
  elements: [{
158017
158096
  name: "Relationships",
158018
158097
  attributes: { xmlns: "http://schemas.openxmlformats.org/package/2006/relationships" },
158019
- elements: [...relationships$1, ...params3.relationships]
158098
+ elements: mergeRelationshipElements(existingRelationships, params3.relationships)
158020
158099
  }]
158021
158100
  };
158022
- }
158023
158101
  });
158024
158102
  Object.entries(this.footers).forEach(([id2, footer], index2) => {
158025
- const fileName = relationships.elements.find((el) => el.attributes.Id === id2)?.attributes.Target || `footer${index2 + 1}.xml`;
158103
+ const partPath = normalizeWordPartPath(relationships.elements.find((el) => el.attributes.Id === id2)?.attributes.Target || `footer${index2 + 1}.xml`);
158104
+ const relsPath = getWordPartRelsPath(partPath);
158026
158105
  const footerEditor = this.footerEditors.find((item) => item.id === id2);
158106
+ const existingRelationships = this.convertedXml[relsPath]?.elements?.find((x) => x.name === "Relationships")?.elements || [];
158027
158107
  if (!footerEditor)
158028
158108
  return;
158029
158109
  const { result, params: params3 } = this.exportToXmlJson({
@@ -158033,11 +158113,12 @@ var init_SuperConverter_CnwfJPj6_es = __esm(() => {
158033
158113
  comments: [],
158034
158114
  commentDefinitions: [],
158035
158115
  isHeaderFooter: true,
158036
- isFinalDoc
158116
+ isFinalDoc,
158117
+ existingRelationships
158037
158118
  });
158038
158119
  const bodyContent = result.elements[0].elements;
158039
- if (!this.convertedXml[`word/${fileName}`]) {
158040
- this.convertedXml[`word/${fileName}`] = {
158120
+ if (!this.convertedXml[partPath]) {
158121
+ this.convertedXml[partPath] = {
158041
158122
  declaration: this.initialJSON?.declaration,
158042
158123
  elements: [{
158043
158124
  attributes: DEFAULT_DOCX_DEFS,
@@ -158052,22 +158133,20 @@ var init_SuperConverter_CnwfJPj6_es = __esm(() => {
158052
158133
  attributes: {
158053
158134
  Id: id2,
158054
158135
  Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",
158055
- Target: fileName
158136
+ Target: partPath.replace(/^word\//, "")
158056
158137
  }
158057
158138
  });
158058
158139
  }
158059
- this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
158060
- if (params3.relationships.length) {
158061
- const relationships$1 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x) => x.name === "Relationships")?.elements || [];
158062
- this.convertedXml[`word/_rels/${fileName}.rels`] = {
158140
+ this.convertedXml[partPath].elements[0].elements = bodyContent;
158141
+ if (params3.relationships.length)
158142
+ this.convertedXml[relsPath] = {
158063
158143
  declaration: this.initialJSON?.declaration,
158064
158144
  elements: [{
158065
158145
  name: "Relationships",
158066
158146
  attributes: { xmlns: "http://schemas.openxmlformats.org/package/2006/relationships" },
158067
- elements: [...relationships$1, ...params3.relationships]
158147
+ elements: mergeRelationshipElements(existingRelationships, params3.relationships)
158068
158148
  }]
158069
158149
  };
158070
- }
158071
158150
  });
158072
158151
  return newDocRels;
158073
158152
  }
@@ -158150,7 +158229,7 @@ var init_SuperConverter_CnwfJPj6_es = __esm(() => {
158150
158229
  };
158151
158230
  });
158152
158231
 
158153
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-Btizo_Im.es.js
158232
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-DCioTQPP.es.js
158154
158233
  function parseSizeUnit(val = "0") {
158155
158234
  const length3 = val.toString() || "0";
158156
158235
  const value = Number.parseFloat(length3);
@@ -158367,11 +158446,36 @@ function replaceSelectionWithImagePlaceholder({ editorOptions, view, id: id2 })
158367
158446
  tr = addImagePlaceholder(view.state, tr, id2, selection.from);
158368
158447
  view.dispatch(tr);
158369
158448
  }
158449
+ function getImageMediaStores(editor) {
158450
+ const own4 = editor?.storage?.image?.media;
158451
+ const parent = editor?.options?.parentEditor?.storage?.image?.media;
158452
+ const stores = [];
158453
+ if (own4)
158454
+ stores.push(own4);
158455
+ if (parent && parent !== own4)
158456
+ stores.push(parent);
158457
+ return stores;
158458
+ }
158459
+ function getExistingImageFileNames(editor) {
158460
+ const names = /* @__PURE__ */ new Set;
158461
+ for (const media of getImageMediaStores(editor))
158462
+ Object.keys(media).forEach((key$1) => names.add(key$1.split("/").pop()));
158463
+ return names;
158464
+ }
158465
+ function registerImageMedia(editor, mediaPath, url2) {
158466
+ const stores = getImageMediaStores(editor);
158467
+ if (!stores.length) {
158468
+ editor.storage.image.media = { [mediaPath]: url2 };
158469
+ return;
158470
+ }
158471
+ for (const media of stores)
158472
+ media[mediaPath] = url2;
158473
+ }
158370
158474
  async function uploadAndInsertImage({ editor, view, file, size: size2, id: id2 }) {
158371
158475
  const imageUploadHandler = typeof editor.options.handleImageUpload === "function" ? editor.options.handleImageUpload : handleImageUpload;
158372
158476
  const placeholderId = id2;
158373
158477
  try {
158374
- const existingFileNames = new Set(Object.keys(editor.storage.image.media ?? {}).map((key$1) => key$1.split("/").pop()));
158478
+ const existingFileNames = getExistingImageFileNames(editor);
158375
158479
  const uniqueFileName = ensureUniqueFileName(file.name, existingFileNames);
158376
158480
  let url2 = await imageUploadHandler(uniqueFileName === file.name ? file : new File([file], uniqueFileName, {
158377
158481
  type: file.type,
@@ -158398,7 +158502,7 @@ async function uploadAndInsertImage({ editor, view, file, size: size2, id: id2 }
158398
158502
  id: docPrId,
158399
158503
  rId
158400
158504
  });
158401
- editor.storage.image.media = Object.assign(editor.storage.image.media, { [mediaPath]: url2 });
158505
+ registerImageMedia(editor, mediaPath, url2);
158402
158506
  if (editor.options.ydoc && typeof editor.commands.addImageToCollaboration === "function")
158403
158507
  editor.commands.addImageToCollaboration({
158404
158508
  mediaPath,
@@ -158414,6 +158518,20 @@ async function uploadAndInsertImage({ editor, view, file, size: size2, id: id2 }
158414
158518
  }
158415
158519
  }
158416
158520
  function addImageRelationship({ editor, path: path2 }) {
158521
+ if (editor.options.isHeaderOrFooter) {
158522
+ const parentEditor = editor.options.parentEditor;
158523
+ const headerFooterRefId = editor.options.headerFooterRefId;
158524
+ if (!parentEditor || !headerFooterRefId)
158525
+ return null;
158526
+ const relsPartId = resolveHeaderFooterRelsPartIdFromRefId(parentEditor, headerFooterRefId);
158527
+ if (!relsPartId)
158528
+ return null;
158529
+ return findOrCreateRelationship(parentEditor, "startImageUpload:addHeaderFooterImageRelationship", {
158530
+ target: path2,
158531
+ type: "image",
158532
+ partId: relsPartId
158533
+ });
158534
+ }
158417
158535
  return findOrCreateRelationship(editor, "startImageUpload:addImageRelationship", {
158418
158536
  target: path2,
158419
158537
  type: "image"
@@ -160872,8 +160990,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
160872
160990
  }
160873
160991
  };
160874
160992
  };
160875
- var init_create_headless_toolbar_Btizo_Im_es = __esm(() => {
160876
- init_SuperConverter_CnwfJPj6_es();
160993
+ var init_create_headless_toolbar_DCioTQPP_es = __esm(() => {
160994
+ init_SuperConverter_BLUJyRB9_es();
160877
160995
  init_constants_DrU4EASo_es();
160878
160996
  init_dist_B8HfvhaK_es();
160879
160997
  CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
@@ -209584,7 +209702,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
209584
209702
  init_remark_gfm_BhnWr3yf_es();
209585
209703
  });
209586
209704
 
209587
- // ../../packages/superdoc/dist/chunks/src-DnrLgjeO.es.js
209705
+ // ../../packages/superdoc/dist/chunks/src-CLqPyVCp.es.js
209588
209706
  function deleteProps(obj, propOrProps) {
209589
209707
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
209590
209708
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -220340,10 +220458,9 @@ function slotsEqual(previous3, next2) {
220340
220458
  function toRelsPathForPart2(partPath) {
220341
220459
  if (partPath === DOCUMENT_RELS_PATH$2 || partPath.endsWith(".rels"))
220342
220460
  return null;
220343
- const lastSlash = partPath.lastIndexOf("/");
220344
- if (lastSlash < 0 || lastSlash === partPath.length - 1)
220461
+ if (!partPath.includes("/") || partPath.endsWith("/"))
220345
220462
  return null;
220346
- return `${partPath.slice(0, lastSlash)}/_rels/${partPath.slice(lastSlash + 1)}.rels`;
220463
+ return getWordPartRelsPath(partPath);
220347
220464
  }
220348
220465
  function capturePartsState(editor, headerFooters) {
220349
220466
  const convertedXml = editor.converter?.convertedXml ?? {};
@@ -241264,7 +241381,7 @@ function syncHeaderFooterCaches(editor, part) {
241264
241381
  const converter = getConverter$52(editor);
241265
241382
  if (!converter)
241266
241383
  return;
241267
- const relsRoot = part?.elements?.find((el) => el.name === "Relationships");
241384
+ const relsRoot = getRelationshipsRoot(part);
241268
241385
  if (!relsRoot?.elements)
241269
241386
  return;
241270
241387
  let changed = false;
@@ -246594,9 +246711,7 @@ function headerFootersPartsDeleteAdapter(editor, input2, options) {
246594
246711
  root3.elements = root3.elements.filter((e) => !(e.name === "Relationship" && String(e.attributes?.Id ?? "") === refId));
246595
246712
  }
246596
246713
  delete convertedXml[partPath];
246597
- const partFileName = partPath.split("/").pop();
246598
- if (partFileName)
246599
- delete convertedXml[`word/_rels/${partFileName}.rels`];
246714
+ delete convertedXml[getWordPartRelsPath(partPath)];
246600
246715
  const collection = kind === "header" ? converter.headers : converter.footers;
246601
246716
  if (collection && typeof collection === "object")
246602
246717
  delete collection[refId];
@@ -287967,7 +288082,7 @@ var Node$13 = class Node$14 {
287967
288082
  listener(snapshot2);
287968
288083
  } catch {}
287969
288084
  }
287970
- }, TRACK_MARK_TYPE_BY_NAME, EMITTABLE_BLOCK_TYPES, SDT_BLOCK_NODE_NAMES, REQUIRED_COMMANDS, VALID_CAPABILITY_REASON_CODES, REQUIRED_HELPERS, SCHEMA_NODE_GATES, schemaGatedIds, SUPPORTED_NON_UNIFORM_STRATEGIES, SUPPORTED_SET_MARKS, REGEX_MAX_PATTERN_LENGTH = 1024, STYLES_PART = "word/styles.xml", PROPERTIES_KEY_BY_CHANNEL, XML_PATH_BY_CHANNEL2, UNDERLINE_API_TO_STORAGE, UNDERLINE_STORAGE_TO_API, HEX_SUBKEYS_BY_PROPERTY, SUPPORTED_DELETE_NODE_TYPES3, REJECTED_DELETE_NODE_TYPES3, TEXT_PREVIEW_MAX_LENGTH = 80, RANGE_DELETE_SAFE_NODE_TYPES, HEADING_PATTERN, OOXML_DEFAULT_FONT_SIZE_PT = 10, INDENT_PER_LEVEL_TWIPS = 720, HANGING_INDENT_TWIPS = 360, SYMBOL_FONT_NAMES, RFONTS_FAMILY_ATTRS, ORDERED_PRESET_CONFIG, BULLET_PRESET_CONFIG, PRESET_TEMPLATES, LevelFormattingHelpers, PRESET_KIND_MAP, NUMBERING_PART = "word/numbering.xml", DEFAULT_PRESET_FOR_KIND, _setValueDelegate, PREVIEW_TEXT_MAX_LENGTH = 2000, BLOCK_PREVIEW_MAX_LENGTH = 200, EDGE_NODE_TYPES$1, COMMENT_MARK_NAME2 = "commentMark", TRACK_CHANGE_MARK_NAMES, POINTS_TO_PIXELS, POINTS_TO_TWIPS = 20, PIXELS_TO_TWIPS, DEFAULT_TABLE_GRID_WIDTH_TWIPS = 1500, SETTINGS_PART$1 = "word/settings.xml", PRESET_GREY = "999999", PRESET_BLACK = "000000", STATIC_PRESETS, IDENTITY_BLOCK_ATTRS, WORD_DEFAULT_TBL_LOOK, FLAG_TO_OOXML_KEY, INVERTED_FLAGS, XML_KEY_TO_STYLE_OPTION, CLEARED_BORDER_OOXML, TABLE_MARGIN_KEY_GROUPS, TABLE_ADAPTER_DISPATCH, ROW_TARGETED_TABLE_OPS, registered = false, STYLES_PART_ID = "word/styles.xml", stylesPartDescriptor, settingsPartDescriptor, RELS_PART_ID2 = "word/_rels/document.xml.rels", RELS_XMLNS2 = "http://schemas.openxmlformats.org/package/2006/relationships", HEADER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", relsPartDescriptor, BatchHistoryAdapter = class {
288085
+ }, TRACK_MARK_TYPE_BY_NAME, EMITTABLE_BLOCK_TYPES, SDT_BLOCK_NODE_NAMES, REQUIRED_COMMANDS, VALID_CAPABILITY_REASON_CODES, REQUIRED_HELPERS, SCHEMA_NODE_GATES, schemaGatedIds, SUPPORTED_NON_UNIFORM_STRATEGIES, SUPPORTED_SET_MARKS, REGEX_MAX_PATTERN_LENGTH = 1024, STYLES_PART = "word/styles.xml", PROPERTIES_KEY_BY_CHANNEL, XML_PATH_BY_CHANNEL2, UNDERLINE_API_TO_STORAGE, UNDERLINE_STORAGE_TO_API, HEX_SUBKEYS_BY_PROPERTY, SUPPORTED_DELETE_NODE_TYPES3, REJECTED_DELETE_NODE_TYPES3, TEXT_PREVIEW_MAX_LENGTH = 80, RANGE_DELETE_SAFE_NODE_TYPES, HEADING_PATTERN, OOXML_DEFAULT_FONT_SIZE_PT = 10, INDENT_PER_LEVEL_TWIPS = 720, HANGING_INDENT_TWIPS = 360, SYMBOL_FONT_NAMES, RFONTS_FAMILY_ATTRS, ORDERED_PRESET_CONFIG, BULLET_PRESET_CONFIG, PRESET_TEMPLATES, LevelFormattingHelpers, PRESET_KIND_MAP, NUMBERING_PART = "word/numbering.xml", DEFAULT_PRESET_FOR_KIND, _setValueDelegate, PREVIEW_TEXT_MAX_LENGTH = 2000, BLOCK_PREVIEW_MAX_LENGTH = 200, EDGE_NODE_TYPES$1, COMMENT_MARK_NAME2 = "commentMark", TRACK_CHANGE_MARK_NAMES, POINTS_TO_PIXELS, POINTS_TO_TWIPS = 20, PIXELS_TO_TWIPS, DEFAULT_TABLE_GRID_WIDTH_TWIPS = 1500, SETTINGS_PART$1 = "word/settings.xml", PRESET_GREY = "999999", PRESET_BLACK = "000000", STATIC_PRESETS, IDENTITY_BLOCK_ATTRS, WORD_DEFAULT_TBL_LOOK, FLAG_TO_OOXML_KEY, INVERTED_FLAGS, XML_KEY_TO_STYLE_OPTION, CLEARED_BORDER_OOXML, TABLE_MARGIN_KEY_GROUPS, TABLE_ADAPTER_DISPATCH, ROW_TARGETED_TABLE_OPS, registered = false, STYLES_PART_ID = "word/styles.xml", stylesPartDescriptor, settingsPartDescriptor, RELS_PART_ID2 = "word/_rels/document.xml.rels", HEADER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", relsPartDescriptor, BatchHistoryAdapter = class {
287971
288086
  #done = [];
287972
288087
  #redone = [];
287973
288088
  #listeners = /* @__PURE__ */ new Set;
@@ -302290,6 +302405,7 @@ menclose::after {
302290
302405
  totalPageCount,
302291
302406
  element: editorContainer,
302292
302407
  editorOptions: {
302408
+ headerFooterRefId,
302293
302409
  headerFooterType: type,
302294
302410
  onCreate: (evt) => setEditorToolbar(evt, editor),
302295
302411
  onBlur: (evt) => onHeaderFooterDataUpdate(evt, editor, headerFooterRefId, type)
@@ -304338,6 +304454,16 @@ menclose::after {
304338
304454
  cursor: grabbing;
304339
304455
  }
304340
304456
 
304457
+ /* Header/footer decoration containers are pointer-events:none; keep images targetable for hover/resize. */
304458
+ .superdoc-layout .superdoc-page-header .superdoc-image-fragment,
304459
+ .superdoc-layout .superdoc-page-footer .superdoc-image-fragment,
304460
+ .superdoc-layout .superdoc-page-header .superdoc-inline-image-clip-wrapper,
304461
+ .superdoc-layout .superdoc-page-footer .superdoc-inline-image-clip-wrapper,
304462
+ .superdoc-layout .superdoc-page-header .superdoc-inline-image,
304463
+ .superdoc-layout .superdoc-page-footer .superdoc-inline-image {
304464
+ pointer-events: auto;
304465
+ }
304466
+
304341
304467
  /* Keep the active drag source from selecting text while dragging */
304342
304468
  .superdoc-layout .superdoc-structured-content__label,
304343
304469
  .superdoc-layout .superdoc-structured-content-inline__label,
@@ -304353,13 +304479,13 @@ menclose::after {
304353
304479
  return;
304354
304480
  console.log(...args$1);
304355
304481
  }, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions;
304356
- var init_src_DnrLgjeO_es = __esm(() => {
304482
+ var init_src_CLqPyVCp_es = __esm(() => {
304357
304483
  init_rolldown_runtime_Bg48TavK_es();
304358
- init_SuperConverter_CnwfJPj6_es();
304484
+ init_SuperConverter_BLUJyRB9_es();
304359
304485
  init_jszip_C49i9kUs_es();
304360
304486
  init_xml_js_CqGKpaft_es();
304361
304487
  init_uuid_qzgm05fK_es();
304362
- init_create_headless_toolbar_Btizo_Im_es();
304488
+ init_create_headless_toolbar_DCioTQPP_es();
304363
304489
  init_constants_DrU4EASo_es();
304364
304490
  init_dist_B8HfvhaK_es();
304365
304491
  init_unified_Dsuw2be5_es();
@@ -328335,16 +328461,7 @@ function print() { __p += __j.call(arguments, '') }
328335
328461
  relsPartDescriptor = {
328336
328462
  id: RELS_PART_ID2,
328337
328463
  ensurePart() {
328338
- return {
328339
- type: "element",
328340
- name: "document",
328341
- elements: [{
328342
- type: "element",
328343
- name: "Relationships",
328344
- attributes: { xmlns: RELS_XMLNS2 },
328345
- elements: []
328346
- }]
328347
- };
328464
+ return createRelationshipsPart();
328348
328465
  },
328349
328466
  afterCommit({ editor, part }) {
328350
328467
  syncHeaderFooterCaches(editor, part);
@@ -329942,7 +330059,11 @@ function print() { __p += __j.call(arguments, '') }
329942
330059
  this.view.setProps({ nodeViews: this.extensionService.nodeViews });
329943
330060
  }
329944
330061
  getMaxContentSize() {
329945
- if (!this.converter)
330062
+ const localPageStyles = this.converter?.pageStyles;
330063
+ const parentPageStyles = this.options.parentEditor?.converter?.pageStyles;
330064
+ const localPageSize = localPageStyles?.pageSize;
330065
+ const pageStyles$1 = localPageSize?.width && localPageSize?.height ? localPageStyles : parentPageStyles ?? localPageStyles;
330066
+ if (!pageStyles$1)
329946
330067
  return {};
329947
330068
  let cellConstraintWidth = 0;
329948
330069
  const { $head } = this.state.selection;
@@ -329961,7 +330082,7 @@ function print() { __p += __j.call(arguments, '') }
329961
330082
  };
329962
330083
  return {};
329963
330084
  }
329964
- const { pageSize = {}, pageMargins = {} } = this.converter.pageStyles ?? {};
330085
+ const { pageSize = {}, pageMargins = {} } = pageStyles$1;
329965
330086
  const { width, height } = pageSize;
329966
330087
  if (!width || !height)
329967
330088
  return {};
@@ -339286,13 +339407,15 @@ function print() { __p += __j.call(arguments, '') }
339286
339407
  const { runtime, hostElement, activationOptions } = input2;
339287
339408
  const editorContext = activationOptions.editorContext ?? {};
339288
339409
  const pmJson = runtime.editor.getJSON();
339410
+ const headerFooterRefId = runtime.locator.storyType === "headerFooterPart" ? runtime.locator.refId : undefined;
339289
339411
  const fresh = createStoryEditor(this.#editor, pmJson, {
339290
339412
  documentId: runtime.storyKey,
339291
339413
  isHeaderOrFooter: runtime.kind === "headerFooter",
339292
339414
  headless: false,
339293
339415
  element: hostElement,
339294
339416
  currentPageNumber: editorContext.currentPageNumber,
339295
- totalPageCount: editorContext.totalPageCount
339417
+ totalPageCount: editorContext.totalPageCount,
339418
+ editorOptions: headerFooterRefId ? { headerFooterRefId } : undefined
339296
339419
  });
339297
339420
  return {
339298
339421
  editor: fresh,
@@ -342526,11 +342649,11 @@ function print() { __p += __j.call(arguments, '') }
342526
342649
  ];
342527
342650
  });
342528
342651
 
342529
- // ../../packages/superdoc/dist/chunks/create-super-doc-ui-BgATtiYQ.es.js
342652
+ // ../../packages/superdoc/dist/chunks/create-super-doc-ui-6HZGNd4y.es.js
342530
342653
  var MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
342531
- var init_create_super_doc_ui_BgATtiYQ_es = __esm(() => {
342532
- init_SuperConverter_CnwfJPj6_es();
342533
- init_create_headless_toolbar_Btizo_Im_es();
342654
+ var init_create_super_doc_ui_6HZGNd4y_es = __esm(() => {
342655
+ init_SuperConverter_BLUJyRB9_es();
342656
+ init_create_headless_toolbar_DCioTQPP_es();
342534
342657
  MOD_ALIASES = new Set([
342535
342658
  "Mod",
342536
342659
  "Meta",
@@ -342572,16 +342695,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
342572
342695
 
342573
342696
  // ../../packages/superdoc/dist/super-editor.es.js
342574
342697
  var init_super_editor_es = __esm(() => {
342575
- init_src_DnrLgjeO_es();
342576
- init_SuperConverter_CnwfJPj6_es();
342698
+ init_src_CLqPyVCp_es();
342699
+ init_SuperConverter_BLUJyRB9_es();
342577
342700
  init_jszip_C49i9kUs_es();
342578
342701
  init_xml_js_CqGKpaft_es();
342579
- init_create_headless_toolbar_Btizo_Im_es();
342702
+ init_create_headless_toolbar_DCioTQPP_es();
342580
342703
  init_constants_DrU4EASo_es();
342581
342704
  init_dist_B8HfvhaK_es();
342582
342705
  init_unified_Dsuw2be5_es();
342583
342706
  init_DocxZipper_DoY5OEjc_es();
342584
- init_create_super_doc_ui_BgATtiYQ_es();
342707
+ init_create_super_doc_ui_6HZGNd4y_es();
342585
342708
  init_ui_C5PAS9hY_es();
342586
342709
  init_eventemitter3_BnGqBE_Q_es();
342587
342710
  init_errors_CNaD6vcg_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.11.0-next.11",
3
+ "version": "0.11.0-next.12",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -24,21 +24,21 @@
24
24
  "@types/node": "22.19.2",
25
25
  "@types/ws": "^8.5.13",
26
26
  "typescript": "^5.9.2",
27
- "@superdoc/pm-adapter": "0.0.0",
28
- "superdoc": "1.33.1",
29
27
  "@superdoc/document-api": "0.0.1",
30
- "@superdoc/super-editor": "0.0.1"
28
+ "@superdoc/super-editor": "0.0.1",
29
+ "@superdoc/pm-adapter": "0.0.0",
30
+ "superdoc": "1.33.1"
31
31
  },
32
32
  "module": "src/index.ts",
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
36
  "optionalDependencies": {
37
- "@superdoc-dev/cli-darwin-arm64": "0.11.0-next.11",
38
- "@superdoc-dev/cli-darwin-x64": "0.11.0-next.11",
39
- "@superdoc-dev/cli-linux-x64": "0.11.0-next.11",
40
- "@superdoc-dev/cli-linux-arm64": "0.11.0-next.11",
41
- "@superdoc-dev/cli-windows-x64": "0.11.0-next.11"
37
+ "@superdoc-dev/cli-darwin-arm64": "0.11.0-next.12",
38
+ "@superdoc-dev/cli-darwin-x64": "0.11.0-next.12",
39
+ "@superdoc-dev/cli-linux-arm64": "0.11.0-next.12",
40
+ "@superdoc-dev/cli-windows-x64": "0.11.0-next.12",
41
+ "@superdoc-dev/cli-linux-x64": "0.11.0-next.12"
42
42
  },
43
43
  "scripts": {
44
44
  "predev": "node scripts/ensure-superdoc-build.js",