@superdoc-dev/cli 0.5.0-next.67 → 0.5.0-next.68

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 +281 -83
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -57583,7 +57583,7 @@ var init_uuid_qzgm05fK_es = __esm(() => {
57583
57583
  v5_default = v35("v5", 80, sha1);
57584
57584
  });
57585
57585
 
57586
- // ../../packages/superdoc/dist/chunks/constants-5yyN6FZg.es.js
57586
+ // ../../packages/superdoc/dist/chunks/constants-CGhJRd87.es.js
57587
57587
  function computeCrc32Hex(data) {
57588
57588
  let crc = 4294967295;
57589
57589
  for (let i2 = 0;i2 < data.length; i2++)
@@ -57657,6 +57657,11 @@ function linesToTwips(lines) {
57657
57657
  return;
57658
57658
  return lines * 240;
57659
57659
  }
57660
+ function halfPointToPixels(halfPoints) {
57661
+ if (halfPoints == null)
57662
+ return;
57663
+ return Math.round(halfPoints * 96 / 72);
57664
+ }
57660
57665
  function halfPointToPoints(halfPoints) {
57661
57666
  if (halfPoints == null)
57662
57667
  return;
@@ -57975,7 +57980,7 @@ var import_lib, CRC32_TABLE, REMOTE_RESOURCE_PATTERN, DATA_URI_PATTERN, getArray
57975
57980
  return "webp";
57976
57981
  return null;
57977
57982
  }, COMMENT_FILE_BASENAMES, DEFAULT_XML_DECLARATION, COMMENT_RELATIONSHIP_TYPES;
57978
- var init_constants_5yyN6FZg_es = __esm(() => {
57983
+ var init_constants_CGhJRd87_es = __esm(() => {
57979
57984
  init_xml_js_CqGKpaft_es();
57980
57985
  import_lib = require_lib();
57981
57986
  CRC32_TABLE = new Uint32Array(256);
@@ -65881,7 +65886,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
65881
65886
  emptyOptions2 = {};
65882
65887
  });
65883
65888
 
65884
- // ../../packages/superdoc/dist/chunks/SuperConverter-tT-4c8Ha.es.js
65889
+ // ../../packages/superdoc/dist/chunks/SuperConverter-CJYLTlzF.es.js
65885
65890
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
65886
65891
  const fieldValue = extension$1.config[field];
65887
65892
  if (typeof fieldValue === "function")
@@ -117496,12 +117501,12 @@ var isRegExp = (value) => {
117496
117501
  state.kern = kernNode.attributes["w:val"];
117497
117502
  }
117498
117503
  }, SuperConverter;
117499
- var init_SuperConverter_tT_4c8Ha_es = __esm(() => {
117504
+ var init_SuperConverter_CJYLTlzF_es = __esm(() => {
117500
117505
  init_rolldown_runtime_Bg48TavK_es();
117501
117506
  init_jszip_C49i9kUs_es();
117502
117507
  init_xml_js_CqGKpaft_es();
117503
117508
  init_uuid_qzgm05fK_es();
117504
- init_constants_5yyN6FZg_es();
117509
+ init_constants_CGhJRd87_es();
117505
117510
  init_dist_B8HfvhaK_es();
117506
117511
  init_unified_Dsuw2be5_es();
117507
117512
  init_lib_CYqLdG4z_es();
@@ -154588,7 +154593,7 @@ var init_SuperConverter_tT_4c8Ha_es = __esm(() => {
154588
154593
  };
154589
154594
  });
154590
154595
 
154591
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-y2bgJGCh.es.js
154596
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-BvILQhp3.es.js
154592
154597
  function parseSizeUnit(val = "0") {
154593
154598
  const length3 = val.toString() || "0";
154594
154599
  const value = Number.parseFloat(length3);
@@ -156124,9 +156129,9 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
156124
156129
  return false;
156125
156130
  return Boolean(checker(attrs));
156126
156131
  };
156127
- var init_create_headless_toolbar_y2bgJGCh_es = __esm(() => {
156128
- init_SuperConverter_tT_4c8Ha_es();
156129
- init_constants_5yyN6FZg_es();
156132
+ var init_create_headless_toolbar_BvILQhp3_es = __esm(() => {
156133
+ init_SuperConverter_CJYLTlzF_es();
156134
+ init_constants_CGhJRd87_es();
156130
156135
  init_dist_B8HfvhaK_es();
156131
156136
  CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
156132
156137
  DOM_SIZE_UNITS = [
@@ -157572,7 +157577,7 @@ var init_decrypt_docx_Bs1PbPQR_es = __esm(() => {
157572
157577
  ]);
157573
157578
  });
157574
157579
 
157575
- // ../../packages/superdoc/dist/chunks/DocxZipper-UDBAhMbp.es.js
157580
+ // ../../packages/superdoc/dist/chunks/DocxZipper-CaIWmehq.es.js
157576
157581
  function sniffEncoding(u8) {
157577
157582
  if (u8.length >= 2) {
157578
157583
  const b0 = u8[0], b1 = u8[1];
@@ -158217,11 +158222,11 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
158217
158222
  return `image/${MIME_TYPE_FOR_EXT[detectedType] || detectedType}`;
158218
158223
  }
158219
158224
  }, DocxZipper_default;
158220
- var init_DocxZipper_UDBAhMbp_es = __esm(() => {
158225
+ var init_DocxZipper_CaIWmehq_es = __esm(() => {
158221
158226
  init_rolldown_runtime_Bg48TavK_es();
158222
158227
  init_jszip_C49i9kUs_es();
158223
158228
  init_xml_js_CqGKpaft_es();
158224
- init_constants_5yyN6FZg_es();
158229
+ init_constants_CGhJRd87_es();
158225
158230
  init_dist_B8HfvhaK_es();
158226
158231
  MANAGED_PACKAGE_PARTS = [
158227
158232
  {
@@ -204563,7 +204568,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
204563
204568
  init_remark_gfm_BhnWr3yf_es();
204564
204569
  });
204565
204570
 
204566
- // ../../packages/superdoc/dist/chunks/src-BzK2Ejl0.es.js
204571
+ // ../../packages/superdoc/dist/chunks/src-d1wQbdUW.es.js
204567
204572
  function deleteProps(obj, propOrProps) {
204568
204573
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
204569
204574
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -209396,6 +209401,15 @@ function getCurrentCellAttrs(state) {
209396
209401
  attrs: copyCellAttrs(cell2)
209397
209402
  };
209398
209403
  }
209404
+ function parseCellVerticalAlignFromStyle(element3) {
209405
+ const value = element3.style?.verticalAlign;
209406
+ if (!value || typeof value !== "string")
209407
+ return null;
209408
+ const normalized = value.trim().toLowerCase();
209409
+ if (normalized === "middle")
209410
+ return "center";
209411
+ return normalized;
209412
+ }
209399
209413
  function findRemovedFieldAnnotations(tr) {
209400
209414
  let removedNodes = [];
209401
209415
  if (!tr.steps.length || tr.meta && !Object.keys(tr.meta).every((meta2) => [
@@ -266741,7 +266755,87 @@ var Node$13 = class Node$14 {
266741
266755
  const nextAttrs = { ...attrs };
266742
266756
  delete nextAttrs.borders;
266743
266757
  return nextAttrs;
266744
- }, IMPORT_CONTEXT_SELECTOR = '[data-superdoc-import="true"]', IMPORT_DEFAULT_TABLE_WIDTH_PCT = 5000, isImportedTableElement = (element3) => Boolean(element3?.closest?.(IMPORT_CONTEXT_SELECTOR)), Table, renderCellBorderStyle = (borders) => {
266758
+ }, IMPORT_CONTEXT_SELECTOR = '[data-superdoc-import="true"]', IMPORT_DEFAULT_TABLE_WIDTH_PCT = 5000, isImportedTableElement = (element3) => Boolean(element3?.closest?.(IMPORT_CONTEXT_SELECTOR)), Table, STYLE_TOKEN_SET, STYLE_TOKEN_PATTERN, parseBorderWidth = (value) => {
266759
+ const widthMatch = value.match(/(?:^|\s)(-?\d*\.?\d+(?:px|pt))(?=\s|$)/i);
266760
+ if (!widthMatch?.[1])
266761
+ return null;
266762
+ const [widthValue, widthUnit] = parseSizeUnit(widthMatch[1]);
266763
+ const numericWidth = Number(widthValue);
266764
+ return widthUnit === "pt" ? halfPointToPixels(numericWidth) : numericWidth;
266765
+ }, parseBorderStyle = (value) => {
266766
+ const styleMatch = value.match(new RegExp(`(?:^|\\s)(${STYLE_TOKEN_PATTERN})(?=\\s|$)`, "i"));
266767
+ return styleMatch?.[1] ? styleMatch[1].toLowerCase() : null;
266768
+ }, parseBorderColor = (value) => {
266769
+ const directColorMatch = value.match(/(rgba?\([^)]+\)|hsla?\([^)]+\)|#[0-9a-fA-F]{3,8}|var\([^)]+\))/i);
266770
+ if (directColorMatch?.[1])
266771
+ return directColorMatch[1];
266772
+ return value.split(/\s+/).find((part) => /^[a-z]+$/i.test(part) && !STYLE_TOKEN_SET.has(part.toLowerCase())) || null;
266773
+ }, parseBorderValue = (rawValue) => {
266774
+ if (!rawValue || typeof rawValue !== "string")
266775
+ return null;
266776
+ const value = rawValue.trim();
266777
+ if (!value)
266778
+ return null;
266779
+ if (value === "none")
266780
+ return {
266781
+ val: "none",
266782
+ size: 0,
266783
+ color: "auto",
266784
+ style: "none"
266785
+ };
266786
+ const size$1 = parseBorderWidth(value);
266787
+ const style2 = parseBorderStyle(value);
266788
+ const hexColor = cssColorToHex(parseBorderColor(value));
266789
+ if (style2 === "none")
266790
+ return {
266791
+ val: "none",
266792
+ size: 0,
266793
+ color: "auto",
266794
+ style: "none"
266795
+ };
266796
+ if (size$1 == null && !hexColor && !style2)
266797
+ return null;
266798
+ return {
266799
+ val: style2 === "dashed" || style2 === "dotted" ? style2 : "single",
266800
+ size: size$1 ?? 1,
266801
+ color: hexColor || "auto",
266802
+ style: style2 || "solid"
266803
+ };
266804
+ }, parseCellBorders = (element3) => {
266805
+ const { style: style2 } = element3;
266806
+ const top$1 = parseBorderValue(style2?.borderTop || style2?.border);
266807
+ const right$1 = parseBorderValue(style2?.borderRight || style2?.border);
266808
+ const bottom$1 = parseBorderValue(style2?.borderBottom || style2?.border);
266809
+ const left$1 = parseBorderValue(style2?.borderLeft || style2?.border);
266810
+ if (!top$1 && !right$1 && !bottom$1 && !left$1)
266811
+ return null;
266812
+ return {
266813
+ ...top$1 ? { top: top$1 } : {},
266814
+ ...right$1 ? { right: right$1 } : {},
266815
+ ...bottom$1 ? { bottom: bottom$1 } : {},
266816
+ ...left$1 ? { left: left$1 } : {}
266817
+ };
266818
+ }, parseSide = (sideValue) => {
266819
+ if (!sideValue)
266820
+ return;
266821
+ const [rawValue, unit] = parseSizeUnit(sideValue);
266822
+ const numericValue = Number(rawValue);
266823
+ return unit === "pt" ? halfPointToPixels(numericValue) : numericValue;
266824
+ }, parseCellMargins = (element3) => {
266825
+ const { style: style2 } = element3;
266826
+ const top$1 = parseSide(style2?.paddingTop);
266827
+ const right$1 = parseSide(style2?.paddingRight);
266828
+ const bottom$1 = parseSide(style2?.paddingBottom);
266829
+ const left$1 = parseSide(style2?.paddingLeft);
266830
+ if (top$1 == null && right$1 == null && bottom$1 == null && left$1 == null)
266831
+ return null;
266832
+ return {
266833
+ ...top$1 != null ? { top: top$1 } : {},
266834
+ ...right$1 != null ? { right: right$1 } : {},
266835
+ ...bottom$1 != null ? { bottom: bottom$1 } : {},
266836
+ ...left$1 != null ? { left: left$1 } : {}
266837
+ };
266838
+ }, renderCellBorderStyle = (borders) => {
266745
266839
  if (!borders)
266746
266840
  return {};
266747
266841
  return { style: [
@@ -266760,7 +266854,49 @@ var Node$13 = class Node$14 {
266760
266854
  return `border-${side}: ${Math.ceil(border.size)}px solid ${color2};`;
266761
266855
  return "";
266762
266856
  }).join(" ") };
266763
- }, TableHeader, TableRow, TableCell, FieldAnnotationView = class {
266857
+ }, TableHeader, parseLengthPx = (length$12) => {
266858
+ if (length$12 == null)
266859
+ return;
266860
+ if (typeof length$12 === "string") {
266861
+ const trimmed = length$12.trim().toLowerCase();
266862
+ if (!trimmed || trimmed === "auto")
266863
+ return;
266864
+ }
266865
+ const [value, unit] = parseSizeUnit(String(length$12));
266866
+ const numericValue = Number(value);
266867
+ return unit === "pt" ? halfPointToPixels(numericValue) : numericValue;
266868
+ }, parseExplicitRowHeight = (element3) => {
266869
+ const fromHeightStyle = parseLengthPx(element3?.style?.height);
266870
+ if (fromHeightStyle != null)
266871
+ return fromHeightStyle;
266872
+ const fromMinHeightStyle = parseLengthPx(element3?.style?.minHeight);
266873
+ if (fromMinHeightStyle != null)
266874
+ return fromMinHeightStyle;
266875
+ if (element3?.hasAttribute?.("height")) {
266876
+ const fromHeightAttr = parseLengthPx(element3.getAttribute("height"));
266877
+ if (fromHeightAttr != null)
266878
+ return fromHeightAttr;
266879
+ }
266880
+ }, parseTallestCellHeight = (element3) => {
266881
+ const cells = element3?.querySelectorAll?.("td,th");
266882
+ if (!cells?.length)
266883
+ return;
266884
+ let maxCellHeight;
266885
+ for (const cellNode of Array.from(cells)) {
266886
+ const cell2 = cellNode;
266887
+ const fromCellHeight = parseLengthPx(cell2?.style?.height);
266888
+ const fromCellMinHeight = parseLengthPx(cell2?.style?.minHeight);
266889
+ const fromCellHeightAttr = cell2?.hasAttribute?.("height") ? parseLengthPx(cell2.getAttribute("height")) : undefined;
266890
+ const candidate = fromCellHeight ?? fromCellMinHeight ?? fromCellHeightAttr;
266891
+ if (candidate == null)
266892
+ continue;
266893
+ if (maxCellHeight == null || candidate > maxCellHeight)
266894
+ maxCellHeight = candidate;
266895
+ }
266896
+ return maxCellHeight;
266897
+ }, parseRowHeight = (element3) => {
266898
+ return parseExplicitRowHeight(element3) ?? parseTallestCellHeight(element3);
266899
+ }, TableRow, TableCell, FieldAnnotationView = class {
266764
266900
  editor;
266765
266901
  node;
266766
266902
  decorations;
@@ -276464,13 +276600,21 @@ var Node$13 = class Node$14 {
276464
276600
  const cellBounds = getTableCellGridBounds(cellPosition);
276465
276601
  const touchesTopBoundary = cellBounds.touchesTopEdge || continuesFromPrev;
276466
276602
  const touchesBottomBoundary = cellBounds.touchesBottomEdge || continuesOnNext;
276467
- if (hasExplicitBorders)
276603
+ if (hasExplicitBorders) {
276604
+ if (cellSpacingPx === 0)
276605
+ return {
276606
+ top: resolveTableBorderValue(cellBorders.top, touchesTopBoundary ? tableBorders.top : tableBorders.insideH),
276607
+ right: cellBounds.touchesRightEdge ? resolveTableBorderValue(cellBorders.right, tableBorders.right) : undefined,
276608
+ bottom: touchesBottomBoundary ? resolveTableBorderValue(cellBorders.bottom, tableBorders.bottom) : undefined,
276609
+ left: resolveTableBorderValue(cellBorders.left, cellBounds.touchesLeftEdge ? tableBorders.left : tableBorders.insideV)
276610
+ };
276468
276611
  return {
276469
276612
  top: resolveTableBorderValue(cellBorders.top, touchesTopBoundary ? tableBorders.top : tableBorders.insideH),
276470
276613
  right: resolveTableBorderValue(cellBorders.right, cellBounds.touchesRightEdge ? tableBorders.right : undefined),
276471
276614
  bottom: resolveTableBorderValue(cellBorders.bottom, touchesBottomBoundary ? tableBorders.bottom : undefined),
276472
276615
  left: resolveTableBorderValue(cellBorders.left, cellBounds.touchesLeftEdge ? tableBorders.left : tableBorders.insideV)
276473
276616
  };
276617
+ }
276474
276618
  if (cellSpacingPx > 0) {
276475
276619
  const interiorBorders = {
276476
276620
  top: touchesTopBoundary ? undefined : borderValueToSpec(tableBorders.insideH),
@@ -287067,18 +287211,18 @@ var Node$13 = class Node$14 {
287067
287211
  return;
287068
287212
  console.log(...args$1);
287069
287213
  }, 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;
287070
- var init_src_BzK2Ejl0_es = __esm(() => {
287214
+ var init_src_d1wQbdUW_es = __esm(() => {
287071
287215
  init_rolldown_runtime_Bg48TavK_es();
287072
- init_SuperConverter_tT_4c8Ha_es();
287216
+ init_SuperConverter_CJYLTlzF_es();
287073
287217
  init_jszip_C49i9kUs_es();
287074
287218
  init_uuid_qzgm05fK_es();
287075
- init_create_headless_toolbar_y2bgJGCh_es();
287076
- init_constants_5yyN6FZg_es();
287219
+ init_create_headless_toolbar_BvILQhp3_es();
287220
+ init_constants_CGhJRd87_es();
287077
287221
  init_dist_B8HfvhaK_es();
287078
287222
  init_unified_Dsuw2be5_es();
287079
287223
  init_remark_gfm_BhnWr3yf_es();
287080
287224
  init_remark_stringify_6MMJfY0k_es();
287081
- init_DocxZipper_UDBAhMbp_es();
287225
+ init_DocxZipper_CaIWmehq_es();
287082
287226
  init__plugin_vue_export_helper_HmhZBO0u_es();
287083
287227
  init_eventemitter3_BdNugZrm_es();
287084
287228
  init_errors_CtyzHiH4_es();
@@ -291694,6 +291838,19 @@ ${err.toString()}`);
291694
291838
  })) };
291695
291839
  }
291696
291840
  });
291841
+ STYLE_TOKEN_SET = new Set([
291842
+ "none",
291843
+ "hidden",
291844
+ "dotted",
291845
+ "dashed",
291846
+ "solid",
291847
+ "double",
291848
+ "groove",
291849
+ "ridge",
291850
+ "inset",
291851
+ "outset"
291852
+ ]);
291853
+ STYLE_TOKEN_PATTERN = Array.from(STYLE_TOKEN_SET).join("|");
291697
291854
  TableHeader = Node$13.create({
291698
291855
  name: "tableHeader",
291699
291856
  content: "block+",
@@ -291726,36 +291883,51 @@ ${err.toString()}`);
291726
291883
  return { "data-colwidth": attrs.colwidth.join(",") };
291727
291884
  }
291728
291885
  },
291729
- background: { renderDOM({ background }) {
291730
- if (!background)
291731
- return {};
291732
- const { color: color2 } = background || {};
291733
- return { style: `background-color: ${color2 ? `#${color2}` : "transparent"}` };
291734
- } },
291735
- verticalAlign: { renderDOM({ verticalAlign }) {
291736
- if (!verticalAlign)
291737
- return {};
291738
- return { style: `vertical-align: ${verticalAlign}` };
291739
- } },
291740
- cellMargins: { renderDOM({ cellMargins, borders }) {
291741
- if (!cellMargins)
291742
- return {};
291743
- return { style: [
291744
- "top",
291745
- "right",
291746
- "bottom",
291747
- "left"
291748
- ].map((side) => {
291749
- const margin = cellMargins?.[side] ?? 0;
291750
- const border = borders?.[side];
291751
- const borderSize = border && border.val !== "none" ? Math.ceil(border.size) : 0;
291752
- if (margin)
291753
- return `padding-${side}: ${Math.max(0, margin - borderSize)}px;`;
291754
- return "";
291755
- }).join(" ") };
291756
- } },
291886
+ background: {
291887
+ parseDOM: (element3) => {
291888
+ const color2 = cssColorToHex(element3.style?.backgroundColor);
291889
+ if (!color2)
291890
+ return null;
291891
+ return { color: color2.replace(/^#/, "") };
291892
+ },
291893
+ renderDOM({ background }) {
291894
+ if (!background)
291895
+ return {};
291896
+ const { color: color2 } = background || {};
291897
+ return { style: `background-color: ${color2 ? `#${color2}` : "transparent"}` };
291898
+ }
291899
+ },
291900
+ verticalAlign: {
291901
+ parseDOM: parseCellVerticalAlignFromStyle,
291902
+ renderDOM({ verticalAlign }) {
291903
+ if (!verticalAlign)
291904
+ return {};
291905
+ return { style: `vertical-align: ${verticalAlign}` };
291906
+ }
291907
+ },
291908
+ cellMargins: {
291909
+ parseDOM: (element3) => parseCellMargins(element3),
291910
+ renderDOM({ cellMargins, borders }) {
291911
+ if (!cellMargins)
291912
+ return {};
291913
+ return { style: [
291914
+ "top",
291915
+ "right",
291916
+ "bottom",
291917
+ "left"
291918
+ ].map((side) => {
291919
+ const margin = cellMargins?.[side] ?? 0;
291920
+ const border = borders?.[side];
291921
+ const borderSize = border && border.val !== "none" ? Math.ceil(border.size) : 0;
291922
+ if (margin)
291923
+ return `padding-${side}: ${Math.max(0, margin - borderSize)}px;`;
291924
+ return "";
291925
+ }).join(" ") };
291926
+ }
291927
+ },
291757
291928
  borders: {
291758
291929
  default: null,
291930
+ parseDOM: (element3) => parseCellBorders(element3),
291759
291931
  renderDOM: ({ borders }) => {
291760
291932
  if (!borders)
291761
291933
  return {};
@@ -291835,7 +292007,18 @@ ${err.toString()}`);
291835
292007
  return { "data-cant-split": "true" };
291836
292008
  }
291837
292009
  },
291838
- tableRowProperties: { rendered: false },
292010
+ tableRowProperties: {
292011
+ rendered: false,
292012
+ parseDOM: (element3) => {
292013
+ const parsedHeightPx = parseRowHeight(element3);
292014
+ if (parsedHeightPx == null)
292015
+ return;
292016
+ return { rowHeight: {
292017
+ value: pixelsToTwips(parsedHeightPx),
292018
+ rule: "atLeast"
292019
+ } };
292020
+ }
292021
+ },
291839
292022
  rsidDel: { rendered: false },
291840
292023
  rsidR: { rendered: false },
291841
292024
  rsidRPr: { rendered: false },
@@ -291899,36 +292082,51 @@ ${err.toString()}`);
291899
292082
  return { "data-colwidth": attrs.colwidth.join(",") };
291900
292083
  }
291901
292084
  },
291902
- background: { renderDOM({ background }) {
291903
- if (!background)
291904
- return {};
291905
- const { color: color2 } = background || {};
291906
- return { style: `background-color: ${color2 ? `#${color2}` : "transparent"}` };
291907
- } },
291908
- verticalAlign: { renderDOM({ verticalAlign }) {
291909
- if (!verticalAlign)
291910
- return {};
291911
- return { style: `vertical-align: ${verticalAlign}` };
291912
- } },
291913
- cellMargins: { renderDOM({ cellMargins, borders }) {
291914
- if (!cellMargins)
291915
- return {};
291916
- return { style: [
291917
- "top",
291918
- "right",
291919
- "bottom",
291920
- "left"
291921
- ].map((side) => {
291922
- const margin = cellMargins?.[side] ?? 0;
291923
- const border = borders?.[side];
291924
- const borderSize = border && border.val !== "none" ? Math.ceil(border.size) : 0;
291925
- if (margin)
291926
- return `padding-${side}: ${Math.max(0, margin - borderSize)}px;`;
291927
- return "";
291928
- }).join(" ") };
291929
- } },
292085
+ background: {
292086
+ parseDOM: (element3) => {
292087
+ const color2 = cssColorToHex(element3.style?.backgroundColor);
292088
+ if (!color2)
292089
+ return null;
292090
+ return { color: color2.replace(/^#/, "") };
292091
+ },
292092
+ renderDOM({ background }) {
292093
+ if (!background)
292094
+ return {};
292095
+ const { color: color2 } = background || {};
292096
+ return { style: `background-color: ${color2 ? `#${color2}` : "transparent"}` };
292097
+ }
292098
+ },
292099
+ verticalAlign: {
292100
+ parseDOM: parseCellVerticalAlignFromStyle,
292101
+ renderDOM({ verticalAlign }) {
292102
+ if (!verticalAlign)
292103
+ return {};
292104
+ return { style: `vertical-align: ${verticalAlign}` };
292105
+ }
292106
+ },
292107
+ cellMargins: {
292108
+ parseDOM: (element3) => parseCellMargins(element3),
292109
+ renderDOM({ cellMargins, borders }) {
292110
+ if (!cellMargins)
292111
+ return {};
292112
+ return { style: [
292113
+ "top",
292114
+ "right",
292115
+ "bottom",
292116
+ "left"
292117
+ ].map((side) => {
292118
+ const margin = cellMargins?.[side] ?? 0;
292119
+ const border = borders?.[side];
292120
+ const borderSize = border && border.val !== "none" ? Math.ceil(border.size) : 0;
292121
+ if (margin)
292122
+ return `padding-${side}: ${Math.max(0, margin - borderSize)}px;`;
292123
+ return "";
292124
+ }).join(" ") };
292125
+ }
292126
+ },
291930
292127
  borders: {
291931
292128
  default: null,
292129
+ parseDOM: (element3) => parseCellBorders(element3),
291932
292130
  renderDOM: ({ borders }) => {
291933
292131
  if (!borders)
291934
292132
  return {};
@@ -321587,15 +321785,15 @@ var init_zipper_DbkgrypV_es = __esm(() => {
321587
321785
 
321588
321786
  // ../../packages/superdoc/dist/super-editor.es.js
321589
321787
  var init_super_editor_es = __esm(() => {
321590
- init_src_BzK2Ejl0_es();
321591
- init_SuperConverter_tT_4c8Ha_es();
321788
+ init_src_d1wQbdUW_es();
321789
+ init_SuperConverter_CJYLTlzF_es();
321592
321790
  init_jszip_C49i9kUs_es();
321593
321791
  init_xml_js_CqGKpaft_es();
321594
- init_create_headless_toolbar_y2bgJGCh_es();
321595
- init_constants_5yyN6FZg_es();
321792
+ init_create_headless_toolbar_BvILQhp3_es();
321793
+ init_constants_CGhJRd87_es();
321596
321794
  init_dist_B8HfvhaK_es();
321597
321795
  init_unified_Dsuw2be5_es();
321598
- init_DocxZipper_UDBAhMbp_es();
321796
+ init_DocxZipper_CaIWmehq_es();
321599
321797
  init_eventemitter3_BdNugZrm_es();
321600
321798
  init_errors_CtyzHiH4_es();
321601
321799
  init_zipper_DbkgrypV_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.5.0-next.67",
3
+ "version": "0.5.0-next.68",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -26,19 +26,19 @@
26
26
  "typescript": "^5.9.2",
27
27
  "@superdoc/document-api": "0.0.1",
28
28
  "@superdoc/pm-adapter": "0.0.0",
29
- "superdoc": "1.25.0",
30
- "@superdoc/super-editor": "0.0.1"
29
+ "@superdoc/super-editor": "0.0.1",
30
+ "superdoc": "1.25.0"
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.5.0-next.67",
38
- "@superdoc-dev/cli-darwin-x64": "0.5.0-next.67",
39
- "@superdoc-dev/cli-linux-x64": "0.5.0-next.67",
40
- "@superdoc-dev/cli-linux-arm64": "0.5.0-next.67",
41
- "@superdoc-dev/cli-windows-x64": "0.5.0-next.67"
37
+ "@superdoc-dev/cli-darwin-arm64": "0.5.0-next.68",
38
+ "@superdoc-dev/cli-darwin-x64": "0.5.0-next.68",
39
+ "@superdoc-dev/cli-linux-arm64": "0.5.0-next.68",
40
+ "@superdoc-dev/cli-linux-x64": "0.5.0-next.68",
41
+ "@superdoc-dev/cli-windows-x64": "0.5.0-next.68"
42
42
  },
43
43
  "scripts": {
44
44
  "predev": "node scripts/ensure-superdoc-build.js",