@superdoc-dev/cli 0.3.0-next.7 → 0.3.0-next.9

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 +43 -7
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -33776,7 +33776,7 @@ var init_remark_gfm_z_sDF4ss_es = __esm(() => {
33776
33776
  emptyOptions2 = {};
33777
33777
  });
33778
33778
 
33779
- // ../../packages/superdoc/dist/chunks/SuperConverter-C2Sw7Q5Z.es.js
33779
+ // ../../packages/superdoc/dist/chunks/SuperConverter-CuiyvNak.es.js
33780
33780
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
33781
33781
  const fieldValue = extension$1.config[field];
33782
33782
  if (typeof fieldValue === "function")
@@ -69533,6 +69533,8 @@ var isRegExp = (value) => {
69533
69533
  const firstMatch = elementsWithId[0];
69534
69534
  if (!firstMatch)
69535
69535
  return result;
69536
+ if (!firstMatch.elements)
69537
+ return result;
69536
69538
  const qFormat = elementsWithId.find((el) => {
69537
69539
  return el.elements.find((innerEl) => innerEl.name === "w:qFormat");
69538
69540
  });
@@ -70668,7 +70670,7 @@ var isRegExp = (value) => {
70668
70670
  state.kern = kernNode.attributes["w:val"];
70669
70671
  }
70670
70672
  }, SuperConverter;
70671
- var init_SuperConverter_C2Sw7Q5Z_es = __esm(() => {
70673
+ var init_SuperConverter_CuiyvNak_es = __esm(() => {
70672
70674
  init_rolldown_runtime_B2q5OVn9_es();
70673
70675
  init_jszip_ChlR43oI_es();
70674
70676
  init_xml_js_BtmJ6bNs_es();
@@ -131315,7 +131317,7 @@ var init_remark_gfm_CjV8kaUy_es = __esm(() => {
131315
131317
  init_remark_gfm_z_sDF4ss_es();
131316
131318
  });
131317
131319
 
131318
- // ../../packages/superdoc/dist/chunks/src-B8eoy16L.es.js
131320
+ // ../../packages/superdoc/dist/chunks/src-YzdsFylW.es.js
131319
131321
  function deleteProps(obj, propOrProps) {
131320
131322
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
131321
131323
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -217838,9 +217840,9 @@ var Node$13 = class Node$14 {
217838
217840
  return false;
217839
217841
  return Boolean(checker(attrs));
217840
217842
  }, SuperToolbar, ICONS, TEXTS, tableActionsOptions;
217841
- var init_src_B8eoy16L_es = __esm(() => {
217843
+ var init_src_YzdsFylW_es = __esm(() => {
217842
217844
  init_rolldown_runtime_B2q5OVn9_es();
217843
- init_SuperConverter_C2Sw7Q5Z_es();
217845
+ init_SuperConverter_CuiyvNak_es();
217844
217846
  init_jszip_ChlR43oI_es();
217845
217847
  init_uuid_qzgm05fK_es();
217846
217848
  init_constants_ep1_Gwqi_es();
@@ -236924,6 +236926,7 @@ function print() { __p += __j.call(arguments, '') }
236924
236926
  #editorListeners = [];
236925
236927
  #scrollHandler = null;
236926
236928
  #scrollContainer = null;
236929
+ #scrollContainerValidated = false;
236927
236930
  #sectionMetadata = [];
236928
236931
  #documentMode = "editing";
236929
236932
  #inputBridge = null;
@@ -238480,6 +238483,36 @@ function print() { __p += __j.call(arguments, '') }
238480
238483
  }
238481
238484
  return win;
238482
238485
  }
238486
+ #revalidateScrollContainer() {
238487
+ if (this.#scrollContainerValidated)
238488
+ return;
238489
+ this.#scrollContainerValidated = true;
238490
+ if (!(this.#scrollContainer instanceof Element))
238491
+ return;
238492
+ if (this.#scrollContainer.scrollHeight > this.#scrollContainer.clientHeight + 1)
238493
+ return;
238494
+ const win = this.#scrollContainer.ownerDocument?.defaultView;
238495
+ const viewportHeight = win?.innerHeight ?? 0;
238496
+ if (this.#scrollContainer.clientHeight <= viewportHeight)
238497
+ return;
238498
+ let el = this.#scrollContainer.parentElement;
238499
+ let next2 = win ?? null;
238500
+ while (el) {
238501
+ const { overflowY } = getComputedStyle(el);
238502
+ if ((overflowY === "auto" || overflowY === "scroll") && el.scrollHeight > el.clientHeight + 1) {
238503
+ next2 = el;
238504
+ break;
238505
+ }
238506
+ el = el.parentElement;
238507
+ }
238508
+ if (!next2 || next2 === this.#scrollContainer)
238509
+ return;
238510
+ this.#scrollContainer.removeEventListener("scroll", this.#scrollHandler);
238511
+ this.#scrollContainer = next2;
238512
+ if (next2 instanceof Element)
238513
+ next2.addEventListener("scroll", this.#scrollHandler, { passive: true });
238514
+ this.#domPainter?.setScrollContainer?.(next2 instanceof HTMLElement ? next2 : null);
238515
+ }
238483
238516
  #setupDragHandlers() {
238484
238517
  this.#dragDropManager?.destroy();
238485
238518
  this.#dragDropManager = new DragDropManager;
@@ -238996,6 +239029,7 @@ function print() { __p += __j.call(arguments, '') }
238996
239029
  this.#epochMapper.onLayoutComplete(layoutEpoch);
238997
239030
  this.#selectionSync.onLayoutComplete(layoutEpoch);
238998
239031
  layoutCompleted = true;
239032
+ this.#revalidateScrollContainer();
238999
239033
  this.#updatePermissionOverlay();
239000
239034
  this.#layoutError = null;
239001
239035
  this.#layoutErrorState = "healthy";
@@ -251976,8 +252010,8 @@ var init_zipper_DqXT7uTa_es = __esm(() => {
251976
252010
 
251977
252011
  // ../../packages/superdoc/dist/super-editor.es.js
251978
252012
  var init_super_editor_es = __esm(() => {
251979
- init_src_B8eoy16L_es();
251980
- init_SuperConverter_C2Sw7Q5Z_es();
252013
+ init_src_YzdsFylW_es();
252014
+ init_SuperConverter_CuiyvNak_es();
251981
252015
  init_jszip_ChlR43oI_es();
251982
252016
  init_xml_js_BtmJ6bNs_es();
251983
252017
  init_constants_ep1_Gwqi_es();
@@ -306842,6 +306876,8 @@ var getDefaultStyleDefinition2 = (defaultStyleId, docx) => {
306842
306876
  const firstMatch = elementsWithId[0];
306843
306877
  if (!firstMatch)
306844
306878
  return result;
306879
+ if (!firstMatch.elements)
306880
+ return result;
306845
306881
  const qFormat = elementsWithId.find((el) => {
306846
306882
  const qFormat2 = el.elements.find((innerEl) => innerEl.name === "w:qFormat");
306847
306883
  return qFormat2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.3.0-next.7",
3
+ "version": "0.3.0-next.9",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -30,11 +30,11 @@
30
30
  "access": "public"
31
31
  },
32
32
  "optionalDependencies": {
33
- "@superdoc-dev/cli-darwin-arm64": "0.3.0-next.7",
34
- "@superdoc-dev/cli-darwin-x64": "0.3.0-next.7",
35
- "@superdoc-dev/cli-linux-x64": "0.3.0-next.7",
36
- "@superdoc-dev/cli-linux-arm64": "0.3.0-next.7",
37
- "@superdoc-dev/cli-windows-x64": "0.3.0-next.7"
33
+ "@superdoc-dev/cli-darwin-arm64": "0.3.0-next.9",
34
+ "@superdoc-dev/cli-darwin-x64": "0.3.0-next.9",
35
+ "@superdoc-dev/cli-linux-x64": "0.3.0-next.9",
36
+ "@superdoc-dev/cli-linux-arm64": "0.3.0-next.9",
37
+ "@superdoc-dev/cli-windows-x64": "0.3.0-next.9"
38
38
  },
39
39
  "scripts": {
40
40
  "dev": "bun run src/index.ts",