@superdoc-dev/cli 0.3.0-next.39 → 0.3.0-next.40

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 +25 -4
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -148813,7 +148813,7 @@ var init_remark_gfm_CjV8kaUy_es = __esm(() => {
148813
148813
  init_remark_gfm_z_sDF4ss_es();
148814
148814
  });
148815
148815
 
148816
- // ../../packages/superdoc/dist/chunks/src-BD_aLcsT.es.js
148816
+ // ../../packages/superdoc/dist/chunks/src-DfS5gFIR.es.js
148817
148817
  function deleteProps(obj, propOrProps) {
148818
148818
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
148819
148819
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -180840,6 +180840,13 @@ function initPartsRuntime(editor) {
180840
180840
  initRevision(editor);
180841
180841
  trackRevisions(editor);
180842
180842
  }
180843
+ function getCellContentWidthPx(cellNode) {
180844
+ const totalWidth = (cellNode.attrs?.colwidth ?? []).reduce((sum, w) => sum + (w || 0), 0);
180845
+ const margins = cellNode.attrs?.cellMargins;
180846
+ const leftMargin = margins?.left ?? 0;
180847
+ const rightMargin = margins?.right ?? 0;
180848
+ return Math.max(totalWidth - leftMargin - rightMargin, 0);
180849
+ }
180843
180850
  function getEditorSurfaceElement(editor) {
180844
180851
  if (!editor)
180845
180852
  return null;
@@ -228983,7 +228990,7 @@ var Node$13 = class Node$14 {
228983
228990
  return false;
228984
228991
  return Boolean(checker(attrs));
228985
228992
  }, SuperToolbar, ICONS, TEXTS, tableActionsOptions;
228986
- var init_src_BD_aLcsT_es = __esm(() => {
228993
+ var init_src_DfS5gFIR_es = __esm(() => {
228987
228994
  init_rolldown_runtime_B2q5OVn9_es();
228988
228995
  init_SuperConverter_DarcJh0X_es();
228989
228996
  init_jszip_ChlR43oI_es();
@@ -238456,8 +238463,22 @@ function print() { __p += __j.call(arguments, '') }
238456
238463
  const leftPx = getMarginPx("left");
238457
238464
  const rightPx = getMarginPx("right");
238458
238465
  const maxHeight = height * PIXELS_PER_INCH$1 - topPx - bottomPx - MAX_HEIGHT_BUFFER_PX;
238466
+ const maxWidth = width * PIXELS_PER_INCH$1 - leftPx - rightPx - MAX_WIDTH_BUFFER_PX;
238467
+ const { $head } = this.state.selection;
238468
+ for (let d = $head.depth;d > 0; d--) {
238469
+ const node3 = $head.node(d);
238470
+ if (node3.type.name === "tableCell" || node3.type.name === "tableHeader") {
238471
+ const cellWidth = getCellContentWidthPx(node3);
238472
+ if (cellWidth > 0)
238473
+ return {
238474
+ width: cellWidth,
238475
+ height: maxHeight
238476
+ };
238477
+ break;
238478
+ }
238479
+ }
238459
238480
  return {
238460
- width: width * PIXELS_PER_INCH$1 - leftPx - rightPx - MAX_WIDTH_BUFFER_PX,
238481
+ width: maxWidth,
238461
238482
  height: maxHeight
238462
238483
  };
238463
238484
  }
@@ -262301,7 +262322,7 @@ var init_zipper_DqXT7uTa_es = __esm(() => {
262301
262322
 
262302
262323
  // ../../packages/superdoc/dist/super-editor.es.js
262303
262324
  var init_super_editor_es = __esm(() => {
262304
- init_src_BD_aLcsT_es();
262325
+ init_src_DfS5gFIR_es();
262305
262326
  init_SuperConverter_DarcJh0X_es();
262306
262327
  init_jszip_ChlR43oI_es();
262307
262328
  init_xml_js_BtmJ6bNs_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.3.0-next.39",
3
+ "version": "0.3.0-next.40",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -22,19 +22,19 @@
22
22
  "typescript": "^5.9.2",
23
23
  "@superdoc/document-api": "0.0.1",
24
24
  "@superdoc/pm-adapter": "0.0.0",
25
- "@superdoc/super-editor": "0.0.1",
26
- "superdoc": "1.20.0"
25
+ "superdoc": "1.20.0",
26
+ "@superdoc/super-editor": "0.0.1"
27
27
  },
28
28
  "module": "src/index.ts",
29
29
  "publishConfig": {
30
30
  "access": "public"
31
31
  },
32
32
  "optionalDependencies": {
33
- "@superdoc-dev/cli-darwin-arm64": "0.3.0-next.39",
34
- "@superdoc-dev/cli-darwin-x64": "0.3.0-next.39",
35
- "@superdoc-dev/cli-linux-x64": "0.3.0-next.39",
36
- "@superdoc-dev/cli-linux-arm64": "0.3.0-next.39",
37
- "@superdoc-dev/cli-windows-x64": "0.3.0-next.39"
33
+ "@superdoc-dev/cli-darwin-arm64": "0.3.0-next.40",
34
+ "@superdoc-dev/cli-darwin-x64": "0.3.0-next.40",
35
+ "@superdoc-dev/cli-linux-x64": "0.3.0-next.40",
36
+ "@superdoc-dev/cli-linux-arm64": "0.3.0-next.40",
37
+ "@superdoc-dev/cli-windows-x64": "0.3.0-next.40"
38
38
  },
39
39
  "scripts": {
40
40
  "predev": "node scripts/ensure-superdoc-build.js",