@superdoc-dev/cli 0.17.0-next.19 → 0.17.0-next.20

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 +62 -19
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -68327,7 +68327,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
68327
68327
  emptyOptions2 = {};
68328
68328
  });
68329
68329
 
68330
- // ../../packages/superdoc/dist/chunks/SuperConverter-Ck-bD6Ne.es.js
68330
+ // ../../packages/superdoc/dist/chunks/SuperConverter-CLuVUp7o.es.js
68331
68331
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
68332
68332
  const fieldValue = extension$1.config[field];
68333
68333
  if (typeof fieldValue === "function")
@@ -84622,6 +84622,7 @@ function handleImageNode$1(node3, params3, isAnchor) {
84622
84622
  ...Number.isFinite(rawBright) ? { bright: rawBright } : {},
84623
84623
  ...Number.isFinite(rawContrast) ? { contrast: rawContrast } : {}
84624
84624
  } : undefined;
84625
+ const alphaModFix = extractAlphaModFix(blip);
84625
84626
  const stretch = findChildByLocalName(blipFill?.elements, "stretch");
84626
84627
  const fillRect = findChildByLocalName(stretch?.elements, "fillRect");
84627
84628
  const srcRect = findChildByLocalName(blipFill?.elements, "srcRect");
@@ -84775,7 +84776,8 @@ function handleImageNode$1(node3, params3, isAnchor) {
84775
84776
  ...order2.length ? { drawingChildOrder: order2 } : {},
84776
84777
  ...originalChildren.length ? { originalDrawingChildren: originalChildren } : {},
84777
84778
  ...hasGrayscale ? { grayscale: true } : {},
84778
- ...lum ? { lum } : {}
84779
+ ...lum ? { lum } : {},
84780
+ ...alphaModFix ? { alphaModFix } : {}
84779
84781
  }
84780
84782
  };
84781
84783
  }
@@ -106266,6 +106268,9 @@ function imageNodeToRun({ node: node3, positions, sdtMetadata }) {
106266
106268
  ...bright != null ? { bright } : {},
106267
106269
  ...contrast != null ? { contrast } : {}
106268
106270
  };
106271
+ const alphaModFixAmt = pickNumber((isPlainObject3(attrs.alphaModFix) ? attrs.alphaModFix : undefined)?.amt);
106272
+ if (alphaModFixAmt != null)
106273
+ run$1.alphaModFix = { amt: alphaModFixAmt };
106269
106274
  const hyperlink = readImageHyperlink(attrs.hyperlink);
106270
106275
  if (hyperlink)
106271
106276
  run$1.hyperlink = hyperlink;
@@ -106695,6 +106700,7 @@ function imageNodeToBlock(node3, nextBlockId, positions, _trackedMeta, _trackedC
106695
106700
  const lum = isPlainObject$1(attrs.lum) ? attrs.lum : undefined;
106696
106701
  const lumBright = pickNumber(lum?.bright);
106697
106702
  const lumContrast = pickNumber(lum?.contrast);
106703
+ const alphaModFixAmt = pickNumber((isPlainObject$1(attrs.alphaModFix) ? attrs.alphaModFix : undefined)?.amt);
106698
106704
  const objectFit = isAllowedObjectFit(explicitObjectFit) ? explicitObjectFit : shouldCover ? "cover" : display === "inline" ? "scale-down" : isAnchor ? "contain" : "contain";
106699
106705
  const zIndexFromRelativeHeight = normalizeZIndex(attrs.originalAttributes);
106700
106706
  const zIndex = resolveFloatingZIndex(anchor?.behindDoc === true, zIndexFromRelativeHeight);
@@ -106726,6 +106732,7 @@ function imageNodeToBlock(node3, nextBlockId, positions, _trackedMeta, _trackedC
106726
106732
  ...lumBright != null ? { bright: lumBright } : {},
106727
106733
  ...lumContrast != null ? { contrast: lumContrast } : {}
106728
106734
  } : undefined,
106735
+ alphaModFix: alphaModFixAmt != null ? { amt: alphaModFixAmt } : undefined,
106729
106736
  ...rotation !== undefined && { rotation },
106730
106737
  ...flipH !== undefined && { flipH },
106731
106738
  ...flipV !== undefined && { flipV },
@@ -122504,6 +122511,10 @@ var isRegExp = (value) => {
122504
122511
  if (!hasValue || !hasPositive)
122505
122512
  return null;
122506
122513
  return `inset(${percentEdges.top ?? 0}% ${percentEdges.right ?? 0}% ${percentEdges.bottom ?? 0}% ${percentEdges.left ?? 0}%)`;
122514
+ }, extractAlphaModFix = (blip) => {
122515
+ const alphaModFix = findChildByLocalName(blip?.elements, "alphaModFix");
122516
+ const amt = Number(alphaModFix?.attributes?.amt);
122517
+ return Number.isFinite(amt) ? { amt } : undefined;
122507
122518
  }, mergeAnchorPaddingIntoWrapDistances = (wrap$1, padding) => {
122508
122519
  if (!wrap$1?.attrs || !padding)
122509
122520
  return;
@@ -122712,6 +122723,7 @@ var isRegExp = (value) => {
122712
122723
  const blip = findChildByLocalName(blipFill?.elements, "blip");
122713
122724
  if (!blip)
122714
122725
  return null;
122726
+ const alphaModFix = extractAlphaModFix(blip);
122715
122727
  const rEmbed = blip.attributes?.["r:embed"];
122716
122728
  if (!rEmbed)
122717
122729
  return null;
@@ -122736,7 +122748,8 @@ var isRegExp = (value) => {
122736
122748
  height,
122737
122749
  src: path2,
122738
122750
  imageId: picId,
122739
- imageName: picName
122751
+ imageName: picName,
122752
+ ...alphaModFix ? { alphaModFix } : {}
122740
122753
  }
122741
122754
  };
122742
122755
  }).filter(Boolean), ...shapes];
@@ -126821,6 +126834,11 @@ var isRegExp = (value) => {
126821
126834
  ...Number.isFinite(attrs.lum.contrast) ? { contrast: Math.round(attrs.lum.contrast) } : {}
126822
126835
  }
126823
126836
  });
126837
+ if (attrs.alphaModFix && Number.isFinite(attrs.alphaModFix.amt))
126838
+ blipEffects.push({
126839
+ name: "a:alphaModFix",
126840
+ attributes: { amt: Math.round(attrs.alphaModFix.amt) }
126841
+ });
126824
126842
  const hlinkRId = resolveHyperlinkRId(attrs, params3);
126825
126843
  const drawingId = attrs.id && Number(attrs.id) > 0 ? attrs.id : Math.max(1, parseInt(generateDocxRandomId(), 16));
126826
126844
  return {
@@ -134893,7 +134911,7 @@ var isRegExp = (value) => {
134893
134911
  state.kern = kernNode.attributes["w:val"];
134894
134912
  }
134895
134913
  }, SuperConverter;
134896
- var init_SuperConverter_Ck_bD6Ne_es = __esm(() => {
134914
+ var init_SuperConverter_CLuVUp7o_es = __esm(() => {
134897
134915
  init_rolldown_runtime_Bg48TavK_es();
134898
134916
  init_jszip_C49i9kUs_es();
134899
134917
  init_xml_js_CqGKpaft_es();
@@ -175177,7 +175195,7 @@ var init_SuperConverter_Ck_bD6Ne_es = __esm(() => {
175177
175195
  };
175178
175196
  });
175179
175197
 
175180
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-CmmuMr9-.es.js
175198
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-Dga1mSBS.es.js
175181
175199
  function parseSizeUnit(val = "0") {
175182
175200
  const length3 = val.toString() || "0";
175183
175201
  const value = Number.parseFloat(length3);
@@ -185572,8 +185590,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
185572
185590
  }
185573
185591
  };
185574
185592
  };
185575
- var init_create_headless_toolbar_CmmuMr9_es = __esm(() => {
185576
- init_SuperConverter_Ck_bD6Ne_es();
185593
+ var init_create_headless_toolbar_Dga1mSBS_es = __esm(() => {
185594
+ init_SuperConverter_CLuVUp7o_es();
185577
185595
  init_uuid_B2wVPhPi_es();
185578
185596
  init_constants_D9qj59G2_es();
185579
185597
  init_dist_B8HfvhaK_es();
@@ -234742,7 +234760,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
234742
234760
  init_remark_gfm_BhnWr3yf_es();
234743
234761
  });
234744
234762
 
234745
- // ../../packages/superdoc/dist/chunks/src-BCBS6aIr.es.js
234763
+ // ../../packages/superdoc/dist/chunks/src-CZrGc1We.es.js
234746
234764
  function deleteProps(obj, propOrProps) {
234747
234765
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
234748
234766
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -316314,6 +316332,12 @@ menclose::after {
316314
316332
  }
316315
316333
  }
316316
316334
  return filters;
316335
+ }, resolveImageOpacity = (source) => {
316336
+ const amt = source.alphaModFix?.amt;
316337
+ if (typeof amt !== "number" || !Number.isFinite(amt))
316338
+ return null;
316339
+ const opacity = Math.max(0, Math.min(1e5, amt)) / 1e5;
316340
+ return opacity === 1 ? null : String(opacity);
316317
316341
  }, renderImageRun = (run2, context) => {
316318
316342
  if (!run2.src)
316319
316343
  return null;
@@ -316400,6 +316424,9 @@ menclose::after {
316400
316424
  const filters = buildImageFilters(run2);
316401
316425
  if (filters.length > 0)
316402
316426
  img2.style.filter = filters.join(" ");
316427
+ const opacity = resolveImageOpacity(run2);
316428
+ if (opacity != null)
316429
+ img2.style.opacity = opacity;
316403
316430
  assertPmPositions(run2, "inline image run");
316404
316431
  if (useWrapper) {
316405
316432
  const wrapper = context.doc.createElement("span");
@@ -316502,6 +316529,9 @@ menclose::after {
316502
316529
  const filters = buildImageFilters(block);
316503
316530
  if (filters.length > 0)
316504
316531
  img2.style.filter = filters.join(" ");
316532
+ const opacity = resolveImageOpacity(block);
316533
+ if (opacity != null)
316534
+ img2.style.opacity = opacity;
316505
316535
  return buildImageHyperlinkAnchor$1?.(img2, block.hyperlink, hyperlinkDisplay) ?? img2;
316506
316536
  }, buildImageHyperlinkAnchor = (doc$12, imageEl, hyperlink, display) => {
316507
316537
  if (!hyperlink?.url)
@@ -320641,6 +320671,9 @@ menclose::after {
320641
320671
  img2.style.objectFit = "contain";
320642
320672
  img2.style.display = "block";
320643
320673
  applyImageClipPath(img2, attrs.clipPath);
320674
+ const opacity = resolveImageOpacity(attrs);
320675
+ if (opacity != null)
320676
+ img2.style.opacity = opacity;
320644
320677
  return img2;
320645
320678
  }, createShapeTextImageElement = (doc$12, part) => {
320646
320679
  const img2 = doc$12.createElement("img");
@@ -323355,6 +323388,10 @@ menclose::after {
323355
323388
  block.textContent ?? null,
323356
323389
  textboxContentBlocks
323357
323390
  ]);
323391
+ }, imageAlphaModFixVersion = (alphaModFix) => {
323392
+ if (!alphaModFix)
323393
+ return "";
323394
+ return String(alphaModFix.amt ?? "");
323358
323395
  }, renderedBlockImageVersion = (image2) => [
323359
323396
  image2.src ?? "",
323360
323397
  image2.width ?? "",
@@ -323367,6 +323404,7 @@ menclose::after {
323367
323404
  image2.blacklevel ?? "",
323368
323405
  image2.grayscale ? 1 : 0,
323369
323406
  imageLuminanceVersion(image2.lum),
323407
+ imageAlphaModFixVersion(image2.alphaModFix),
323370
323408
  image2.rotation ?? "",
323371
323409
  image2.flipH ? 1 : 0,
323372
323410
  image2.flipV ? 1 : 0,
@@ -323389,6 +323427,7 @@ menclose::after {
323389
323427
  image2.blacklevel ?? "",
323390
323428
  image2.grayscale ? 1 : 0,
323391
323429
  imageLuminanceVersion(image2.lum),
323430
+ imageAlphaModFixVersion(image2.alphaModFix),
323392
323431
  image2.rotation ?? "",
323393
323432
  image2.flipH ? 1 : 0,
323394
323433
  image2.flipV ? 1 : 0,
@@ -332727,13 +332766,13 @@ menclose::after {
332727
332766
  return;
332728
332767
  console.log(...args$1);
332729
332768
  }, 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, TRACKED_MARK_NAMES;
332730
- var init_src_BCBS6aIr_es = __esm(() => {
332769
+ var init_src_CZrGc1We_es = __esm(() => {
332731
332770
  init_rolldown_runtime_Bg48TavK_es();
332732
- init_SuperConverter_Ck_bD6Ne_es();
332771
+ init_SuperConverter_CLuVUp7o_es();
332733
332772
  init_jszip_C49i9kUs_es();
332734
332773
  init_xml_js_CqGKpaft_es();
332735
332774
  init_uuid_B2wVPhPi_es();
332736
- init_create_headless_toolbar_CmmuMr9_es();
332775
+ init_create_headless_toolbar_Dga1mSBS_es();
332737
332776
  init_constants_D9qj59G2_es();
332738
332777
  init_dist_B8HfvhaK_es();
332739
332778
  init_unified_Dsuw2be5_es();
@@ -338967,6 +339006,10 @@ ${err.toString()}`);
338967
339006
  default: null,
338968
339007
  rendered: false
338969
339008
  },
339009
+ alphaModFix: {
339010
+ default: null,
339011
+ rendered: false
339012
+ },
338970
339013
  gain: {
338971
339014
  default: null,
338972
339015
  rendered: false
@@ -368501,11 +368544,11 @@ function print() { __p += __j.call(arguments, '') }
368501
368544
  ]);
368502
368545
  });
368503
368546
 
368504
- // ../../packages/superdoc/dist/chunks/create-super-doc-ui-D-dnaej6.es.js
368547
+ // ../../packages/superdoc/dist/chunks/create-super-doc-ui-DUbQUqo3.es.js
368505
368548
  var DEFAULT_TEXT_ALIGN_OPTIONS, DEFAULT_LINE_HEIGHT_OPTIONS, DEFAULT_ZOOM_OPTIONS, DEFAULT_DOCUMENT_MODE_OPTIONS, DEFAULT_FONT_SIZE_OPTIONS, headlessToolbarConstants, 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, FONT_SIZE_OPTIONS;
368506
- var init_create_super_doc_ui_D_dnaej6_es = __esm(() => {
368507
- init_SuperConverter_Ck_bD6Ne_es();
368508
- init_create_headless_toolbar_CmmuMr9_es();
368549
+ var init_create_super_doc_ui_DUbQUqo3_es = __esm(() => {
368550
+ init_SuperConverter_CLuVUp7o_es();
368551
+ init_create_headless_toolbar_Dga1mSBS_es();
368509
368552
  DEFAULT_TEXT_ALIGN_OPTIONS = [
368510
368553
  {
368511
368554
  label: "Left",
@@ -368796,16 +368839,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
368796
368839
 
368797
368840
  // ../../packages/superdoc/dist/super-editor.es.js
368798
368841
  var init_super_editor_es = __esm(() => {
368799
- init_src_BCBS6aIr_es();
368800
- init_SuperConverter_Ck_bD6Ne_es();
368842
+ init_src_CZrGc1We_es();
368843
+ init_SuperConverter_CLuVUp7o_es();
368801
368844
  init_jszip_C49i9kUs_es();
368802
368845
  init_xml_js_CqGKpaft_es();
368803
- init_create_headless_toolbar_CmmuMr9_es();
368846
+ init_create_headless_toolbar_Dga1mSBS_es();
368804
368847
  init_constants_D9qj59G2_es();
368805
368848
  init_dist_B8HfvhaK_es();
368806
368849
  init_unified_Dsuw2be5_es();
368807
368850
  init_DocxZipper_FUsfThjV_es();
368808
- init_create_super_doc_ui_D_dnaej6_es();
368851
+ init_create_super_doc_ui_DUbQUqo3_es();
368809
368852
  init_ui_C5PAS9hY_es();
368810
368853
  init_eventemitter3_BnGqBE_Q_es();
368811
368854
  init_errors_CNaD6vcg_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.17.0-next.19",
3
+ "version": "0.17.0-next.20",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -25,19 +25,19 @@
25
25
  "@types/ws": "^8.5.13",
26
26
  "typescript": "^5.9.2",
27
27
  "@superdoc/document-api": "0.0.1",
28
- "@superdoc/super-editor": "0.0.1",
29
- "superdoc": "1.39.0"
28
+ "superdoc": "1.39.0",
29
+ "@superdoc/super-editor": "0.0.1"
30
30
  },
31
31
  "module": "src/index.ts",
32
32
  "publishConfig": {
33
33
  "access": "public"
34
34
  },
35
35
  "optionalDependencies": {
36
- "@superdoc-dev/cli-darwin-x64": "0.17.0-next.19",
37
- "@superdoc-dev/cli-linux-x64": "0.17.0-next.19",
38
- "@superdoc-dev/cli-darwin-arm64": "0.17.0-next.19",
39
- "@superdoc-dev/cli-linux-arm64": "0.17.0-next.19",
40
- "@superdoc-dev/cli-windows-x64": "0.17.0-next.19"
36
+ "@superdoc-dev/cli-darwin-arm64": "0.17.0-next.20",
37
+ "@superdoc-dev/cli-darwin-x64": "0.17.0-next.20",
38
+ "@superdoc-dev/cli-linux-x64": "0.17.0-next.20",
39
+ "@superdoc-dev/cli-linux-arm64": "0.17.0-next.20",
40
+ "@superdoc-dev/cli-windows-x64": "0.17.0-next.20"
41
41
  },
42
42
  "scripts": {
43
43
  "predev": "node scripts/ensure-superdoc-build.js",