@superdoc-dev/cli 0.16.0-next.33 → 0.16.0-next.34

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 +55 -39
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -173374,7 +173374,7 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
173374
173374
  };
173375
173375
  });
173376
173376
 
173377
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-DUhzXJ4D.es.js
173377
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-pilP-Jq-.es.js
173378
173378
  function parseSizeUnit(val = "0") {
173379
173379
  const length3 = val.toString() || "0";
173380
173380
  const value = Number.parseFloat(length3);
@@ -182818,6 +182818,11 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
182818
182818
  disabled: !context,
182819
182819
  value: typeof superdoc?.getZoom === "function" ? superdoc.getZoom() : 100
182820
182820
  };
182821
+ }, createZoomFitWidthStateDeriver = () => ({ context, superdoc }) => {
182822
+ return {
182823
+ active: (typeof superdoc?.getZoomState === "function" ? superdoc.getZoomState()?.mode : undefined) === "fit-width",
182824
+ disabled: !context || typeof superdoc?.setZoomMode !== "function"
182825
+ };
182821
182826
  }, createDocumentModeStateDeriver = () => ({ context, superdoc }) => {
182822
182827
  return {
182823
182828
  active: false,
@@ -182838,6 +182843,12 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
182838
182843
  return false;
182839
182844
  superdoc.setZoom?.(normalizedPayload);
182840
182845
  return true;
182846
+ }, createZoomFitWidthExecute = () => ({ superdoc }) => {
182847
+ if (typeof superdoc?.setZoomMode !== "function")
182848
+ return false;
182849
+ const mode = typeof superdoc.getZoomState === "function" ? superdoc.getZoomState()?.mode : undefined;
182850
+ superdoc.setZoomMode(mode === "fit-width" ? "manual" : "fit-width");
182851
+ return true;
182841
182852
  }, createDocumentModeExecute = () => ({ superdoc, payload }) => {
182842
182853
  const validModes = [
182843
182854
  "editing",
@@ -183511,6 +183522,11 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
183511
183522
  state: createZoomStateDeriver(),
183512
183523
  execute: createZoomExecute()
183513
183524
  },
183525
+ "zoom-fit-width": {
183526
+ id: "zoom-fit-width",
183527
+ state: createZoomFitWidthStateDeriver(),
183528
+ execute: createZoomFitWidthExecute()
183529
+ },
183514
183530
  "document-mode": {
183515
183531
  id: "document-mode",
183516
183532
  state: createDocumentModeStateDeriver(),
@@ -183707,7 +183723,7 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
183707
183723
  }
183708
183724
  };
183709
183725
  };
183710
- var init_create_headless_toolbar_DUhzXJ4D_es = __esm(() => {
183726
+ var init_create_headless_toolbar_pilP_Jq_es = __esm(() => {
183711
183727
  init_SuperConverter_DOoAJ6Zk_es();
183712
183728
  init_uuid_qzgm05fK_es();
183713
183729
  init_constants_D9qj59G2_es();
@@ -184896,7 +184912,7 @@ var init_remark_stringify_6MMJfY0k_es = __esm(() => {
184896
184912
  eol = /\r?\n|\r/g;
184897
184913
  });
184898
184914
 
184899
- // ../../packages/superdoc/dist/chunks/detect-container-B6sqy7HZ.es.js
184915
+ // ../../packages/superdoc/dist/chunks/detect-container-sTWXwOzh.es.js
184900
184916
  function matchesMagic(bytes, magic) {
184901
184917
  if (bytes.length < magic.length)
184902
184918
  return false;
@@ -184914,7 +184930,7 @@ function detectContainerType(data) {
184914
184930
  return "unknown";
184915
184931
  }
184916
184932
  var ZIP_MAGIC, CFB_MAGIC;
184917
- var init_detect_container_B6sqy7HZ_es = __esm(() => {
184933
+ var init_detect_container_sTWXwOzh_es = __esm(() => {
184918
184934
  ZIP_MAGIC = [
184919
184935
  80,
184920
184936
  75,
@@ -184933,13 +184949,13 @@ var init_detect_container_B6sqy7HZ_es = __esm(() => {
184933
184949
  ];
184934
184950
  });
184935
184951
 
184936
- // ../../packages/superdoc/dist/chunks/detect-container-Cs3KoJVc.es.js
184937
- var exports_detect_container_Cs3KoJVc_es = {};
184938
- __export(exports_detect_container_Cs3KoJVc_es, {
184952
+ // ../../packages/superdoc/dist/chunks/detect-container-0tUwtCR4.es.js
184953
+ var exports_detect_container_0tUwtCR4_es = {};
184954
+ __export(exports_detect_container_0tUwtCR4_es, {
184939
184955
  detectContainerType: () => detectContainerType
184940
184956
  });
184941
- var init_detect_container_Cs3KoJVc_es = __esm(() => {
184942
- init_detect_container_B6sqy7HZ_es();
184957
+ var init_detect_container_0tUwtCR4_es = __esm(() => {
184958
+ init_detect_container_sTWXwOzh_es();
184943
184959
  });
184944
184960
 
184945
184961
  // ../../packages/superdoc/dist/chunks/errors-CNaD6vcg.es.js
@@ -184992,9 +185008,9 @@ var init_errors_CNaD6vcg_es = __esm(() => {
184992
185008
  };
184993
185009
  });
184994
185010
 
184995
- // ../../packages/superdoc/dist/chunks/decrypt-docx-G2a7hkiV.es.js
184996
- var exports_decrypt_docx_G2a7hkiV_es = {};
184997
- __export(exports_decrypt_docx_G2a7hkiV_es, {
185011
+ // ../../packages/superdoc/dist/chunks/decrypt-docx-CPcaRl5W.es.js
185012
+ var exports_decrypt_docx_CPcaRl5W_es = {};
185013
+ __export(exports_decrypt_docx_CPcaRl5W_es, {
184998
185014
  decryptDocxIfNeeded: () => decryptDocxIfNeeded
184999
185015
  });
185000
185016
  function concatUint8Arrays(chunks) {
@@ -185535,10 +185551,10 @@ async function decryptDocxIfNeeded(data, options) {
185535
185551
  };
185536
185552
  }
185537
185553
  var CFB_SIGNATURE, CFB_END_OF_CHAIN = 4294967294, CFB_OBJECT_TYPE, utf16LeDecoder, AGILE_VERSION = 4, AGILE_RESERVED = 4, STANDARD_VERSION_3 = 3, STANDARD_VERSION_4 = 4, STANDARD_RESERVED = 3, MIN_HEADER_SIZE = 8, BLOCK_KEY_VERIFIER_INPUT, BLOCK_KEY_VERIFIER_VALUE, BLOCK_KEY_ENCRYPTED_KEY, BLOCK_KEY_HMAC_KEY, BLOCK_KEY_HMAC_VALUE, SEGMENT_SIZE = 4096, PACKAGE_HEADER_SIZE = 8;
185538
- var init_decrypt_docx_G2a7hkiV_es = __esm(() => {
185554
+ var init_decrypt_docx_CPcaRl5W_es = __esm(() => {
185539
185555
  init_dist_B8HfvhaK_es();
185540
185556
  init_errors_CNaD6vcg_es();
185541
- init_detect_container_B6sqy7HZ_es();
185557
+ init_detect_container_sTWXwOzh_es();
185542
185558
  CFB_SIGNATURE = new Uint8Array([
185543
185559
  208,
185544
185560
  207,
@@ -185607,7 +185623,7 @@ var init_decrypt_docx_G2a7hkiV_es = __esm(() => {
185607
185623
  ]);
185608
185624
  });
185609
185625
 
185610
- // ../../packages/superdoc/dist/chunks/DocxZipper-Bu2Fhqkw.es.js
185626
+ // ../../packages/superdoc/dist/chunks/DocxZipper-FUsfThjV.es.js
185611
185627
  function sniffEncoding(u8) {
185612
185628
  if (u8.length >= 2) {
185613
185629
  const b0 = u8[0], b1 = u8[1];
@@ -185923,11 +185939,11 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
185923
185939
  return new Uint8Array(0);
185924
185940
  }
185925
185941
  async getDocxData(file, isNode3 = false, options = {}) {
185926
- const { detectContainerType: detectContainerType2 } = await Promise.resolve().then(() => (init_detect_container_Cs3KoJVc_es(), exports_detect_container_Cs3KoJVc_es));
185942
+ const { detectContainerType: detectContainerType2 } = await Promise.resolve().then(() => (init_detect_container_0tUwtCR4_es(), exports_detect_container_0tUwtCR4_es));
185927
185943
  const containerType = detectContainerType2(await this.#peekBytes(file, 8));
185928
185944
  let fileData = file;
185929
185945
  if (containerType === "cfb") {
185930
- const { decryptDocxIfNeeded: decryptDocxIfNeeded2 } = await Promise.resolve().then(() => (init_decrypt_docx_G2a7hkiV_es(), exports_decrypt_docx_G2a7hkiV_es));
185946
+ const { decryptDocxIfNeeded: decryptDocxIfNeeded2 } = await Promise.resolve().then(() => (init_decrypt_docx_CPcaRl5W_es(), exports_decrypt_docx_CPcaRl5W_es));
185931
185947
  const result = await decryptDocxIfNeeded2(file instanceof Uint8Array ? file : file instanceof ArrayBuffer ? new Uint8Array(file) : new Uint8Array(await file.arrayBuffer()), { password: options.password });
185932
185948
  fileData = result.data;
185933
185949
  this.decryptedFileData = result.data;
@@ -186280,7 +186296,7 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
186280
186296
  return `image/${MIME_TYPE_FOR_EXT[detectedType] || detectedType}`;
186281
186297
  }
186282
186298
  }, DocxZipper_default;
186283
- var init_DocxZipper_Bu2Fhqkw_es = __esm(() => {
186299
+ var init_DocxZipper_FUsfThjV_es = __esm(() => {
186284
186300
  init_rolldown_runtime_Bg48TavK_es();
186285
186301
  init_jszip_C49i9kUs_es();
186286
186302
  init_xml_js_CqGKpaft_es();
@@ -222159,9 +222175,9 @@ var init_unified_vFnLRfAM_es = __esm(() => {
222159
222175
  init_unified_Dsuw2be5_es();
222160
222176
  });
222161
222177
 
222162
- // ../../packages/superdoc/dist/chunks/rehype-parse-q8NfsLv7.es.js
222163
- var exports_rehype_parse_q8NfsLv7_es = {};
222164
- __export(exports_rehype_parse_q8NfsLv7_es, {
222178
+ // ../../packages/superdoc/dist/chunks/rehype-parse-DTSDs3kr.es.js
222179
+ var exports_rehype_parse_DTSDs3kr_es = {};
222180
+ __export(exports_rehype_parse_DTSDs3kr_es, {
222165
222181
  default: () => rehypeParse
222166
222182
  });
222167
222183
  function merge2(definitions, space) {
@@ -228110,7 +228126,7 @@ var Schema2 = class {
228110
228126
  }
228111
228127
  }
228112
228128
  }, TABLE_VOID_ELEMENTS, errors, base3 = "https://html.spec.whatwg.org/multipage/parsing.html#parse-error-", dashToCamelRe, formatCRe, formatXRe, fatalities, emptyOptions3;
228113
- var init_rehype_parse_q8NfsLv7_es = __esm(() => {
228129
+ var init_rehype_parse_DTSDs3kr_es = __esm(() => {
228114
228130
  init_rolldown_runtime_Bg48TavK_es();
228115
228131
  init_default_BqgWzMfR_es();
228116
228132
  init_lib_CYqLdG4z_es();
@@ -230855,9 +230871,9 @@ var init_rehype_parse_q8NfsLv7_es = __esm(() => {
230855
230871
  emptyOptions3 = {};
230856
230872
  });
230857
230873
 
230858
- // ../../packages/superdoc/dist/chunks/rehype-remark-CKg94dxK.es.js
230859
- var exports_rehype_remark_CKg94dxK_es = {};
230860
- __export(exports_rehype_remark_CKg94dxK_es, {
230874
+ // ../../packages/superdoc/dist/chunks/rehype-remark-Bt5njn02.es.js
230875
+ var exports_rehype_remark_Bt5njn02_es = {};
230876
+ __export(exports_rehype_remark_Bt5njn02_es, {
230861
230877
  default: () => rehypeRemark
230862
230878
  });
230863
230879
  function anyFactory2(tests) {
@@ -232477,7 +232493,7 @@ var env, deserializer = ($2, _2) => {
232477
232493
  if (is(parent.children[index2], index2, parent))
232478
232494
  return parent.children[index2];
232479
232495
  }, searchLineFeeds, searchTabOrSpaces, br$1, cell, p$1, row, notRendered, blockOrCaption, prefix = "language-", defaultChecked = "[x]", defaultUnchecked = "[ ]", own$12, list$1, basic, meta, defaultQuotes, nodeHandlers2, handlers2, own6, emptyOptions4, defaults;
232480
- var init_rehype_remark_CKg94dxK_es = __esm(() => {
232496
+ var init_rehype_remark_Bt5njn02_es = __esm(() => {
232481
232497
  init_lib_DEff_P2k_es();
232482
232498
  env = typeof self === "object" ? self : globalThis;
232483
232499
  ({ toString: toString$1 } = {});
@@ -232871,7 +232887,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
232871
232887
  init_remark_gfm_BhnWr3yf_es();
232872
232888
  });
232873
232889
 
232874
- // ../../packages/superdoc/dist/chunks/src-DEnygTyz.es.js
232890
+ // ../../packages/superdoc/dist/chunks/src-CWo3dWd9.es.js
232875
232891
  function deleteProps(obj, propOrProps) {
232876
232892
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
232877
232893
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -330189,19 +330205,19 @@ menclose::after {
330189
330205
  return;
330190
330206
  console.log(...args$1);
330191
330207
  }, 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;
330192
- var init_src_DEnygTyz_es = __esm(() => {
330208
+ var init_src_CWo3dWd9_es = __esm(() => {
330193
330209
  init_rolldown_runtime_Bg48TavK_es();
330194
330210
  init_SuperConverter_DOoAJ6Zk_es();
330195
330211
  init_jszip_C49i9kUs_es();
330196
330212
  init_xml_js_CqGKpaft_es();
330197
330213
  init_uuid_qzgm05fK_es();
330198
- init_create_headless_toolbar_DUhzXJ4D_es();
330214
+ init_create_headless_toolbar_pilP_Jq_es();
330199
330215
  init_constants_D9qj59G2_es();
330200
330216
  init_dist_B8HfvhaK_es();
330201
330217
  init_unified_Dsuw2be5_es();
330202
330218
  init_remark_gfm_BhnWr3yf_es();
330203
330219
  init_remark_stringify_6MMJfY0k_es();
330204
- init_DocxZipper_Bu2Fhqkw_es();
330220
+ init_DocxZipper_FUsfThjV_es();
330205
330221
  init__plugin_vue_export_helper_5t5P5NuM_es();
330206
330222
  init_eventemitter3_BnGqBE_Q_es();
330207
330223
  init_errors_CNaD6vcg_es();
@@ -356184,8 +356200,8 @@ function print() { __p += __j.call(arguments, '') }
356184
356200
  try {
356185
356201
  const [{ unified: unified$1 }, { default: rehypeParse2 }, { default: rehypeRemark2 }, { default: remarkStringify$1 }, { default: remarkGfm$1 }] = await Promise.all([
356186
356202
  Promise.resolve().then(() => (init_unified_vFnLRfAM_es(), exports_unified_vFnLRfAM_es)),
356187
- Promise.resolve().then(() => (init_rehype_parse_q8NfsLv7_es(), exports_rehype_parse_q8NfsLv7_es)),
356188
- Promise.resolve().then(() => (init_rehype_remark_CKg94dxK_es(), exports_rehype_remark_CKg94dxK_es)),
356203
+ Promise.resolve().then(() => (init_rehype_parse_DTSDs3kr_es(), exports_rehype_parse_DTSDs3kr_es)),
356204
+ Promise.resolve().then(() => (init_rehype_remark_Bt5njn02_es(), exports_rehype_remark_Bt5njn02_es)),
356189
356205
  Promise.resolve().then(() => (init_remark_stringify_B_orWEvD_es(), exports_remark_stringify_B_orWEvD_es)),
356190
356206
  Promise.resolve().then(() => (init_remark_gfm_eZN6yzWQ_es(), exports_remark_gfm_eZN6yzWQ_es))
356191
356207
  ]);
@@ -365035,11 +365051,11 @@ function print() { __p += __j.call(arguments, '') }
365035
365051
  ]);
365036
365052
  });
365037
365053
 
365038
- // ../../packages/superdoc/dist/chunks/create-super-doc-ui-CmcU7hTR.es.js
365054
+ // ../../packages/superdoc/dist/chunks/create-super-doc-ui-DUlu2DFj.es.js
365039
365055
  var 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;
365040
- var init_create_super_doc_ui_CmcU7hTR_es = __esm(() => {
365056
+ var init_create_super_doc_ui_DUlu2DFj_es = __esm(() => {
365041
365057
  init_SuperConverter_DOoAJ6Zk_es();
365042
- init_create_headless_toolbar_DUhzXJ4D_es();
365058
+ init_create_headless_toolbar_pilP_Jq_es();
365043
365059
  headlessToolbarConstants = {
365044
365060
  DEFAULT_TEXT_ALIGN_OPTIONS: [
365045
365061
  {
@@ -365321,16 +365337,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
365321
365337
 
365322
365338
  // ../../packages/superdoc/dist/super-editor.es.js
365323
365339
  var init_super_editor_es = __esm(() => {
365324
- init_src_DEnygTyz_es();
365340
+ init_src_CWo3dWd9_es();
365325
365341
  init_SuperConverter_DOoAJ6Zk_es();
365326
365342
  init_jszip_C49i9kUs_es();
365327
365343
  init_xml_js_CqGKpaft_es();
365328
- init_create_headless_toolbar_DUhzXJ4D_es();
365344
+ init_create_headless_toolbar_pilP_Jq_es();
365329
365345
  init_constants_D9qj59G2_es();
365330
365346
  init_dist_B8HfvhaK_es();
365331
365347
  init_unified_Dsuw2be5_es();
365332
- init_DocxZipper_Bu2Fhqkw_es();
365333
- init_create_super_doc_ui_CmcU7hTR_es();
365348
+ init_DocxZipper_FUsfThjV_es();
365349
+ init_create_super_doc_ui_DUlu2DFj_es();
365334
365350
  init_ui_C5PAS9hY_es();
365335
365351
  init_eventemitter3_BnGqBE_Q_es();
365336
365352
  init_errors_CNaD6vcg_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.16.0-next.33",
3
+ "version": "0.16.0-next.34",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -33,11 +33,11 @@
33
33
  "access": "public"
34
34
  },
35
35
  "optionalDependencies": {
36
- "@superdoc-dev/cli-darwin-arm64": "0.16.0-next.33",
37
- "@superdoc-dev/cli-darwin-x64": "0.16.0-next.33",
38
- "@superdoc-dev/cli-linux-x64": "0.16.0-next.33",
39
- "@superdoc-dev/cli-linux-arm64": "0.16.0-next.33",
40
- "@superdoc-dev/cli-windows-x64": "0.16.0-next.33"
36
+ "@superdoc-dev/cli-darwin-x64": "0.16.0-next.34",
37
+ "@superdoc-dev/cli-darwin-arm64": "0.16.0-next.34",
38
+ "@superdoc-dev/cli-linux-x64": "0.16.0-next.34",
39
+ "@superdoc-dev/cli-linux-arm64": "0.16.0-next.34",
40
+ "@superdoc-dev/cli-windows-x64": "0.16.0-next.34"
41
41
  },
42
42
  "scripts": {
43
43
  "predev": "node scripts/ensure-superdoc-build.js",