@superdoc-dev/cli 0.3.0-next.5 → 0.3.0-next.6

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 +31 -6
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -131315,7 +131315,7 @@ var init_remark_gfm_CjV8kaUy_es = __esm(() => {
131315
131315
  init_remark_gfm_z_sDF4ss_es();
131316
131316
  });
131317
131317
 
131318
- // ../../packages/superdoc/dist/chunks/src-BQ8I1JWL.es.js
131318
+ // ../../packages/superdoc/dist/chunks/src-CIT7og3M.es.js
131319
131319
  function deleteProps(obj, propOrProps) {
131320
131320
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
131321
131321
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -217747,7 +217747,7 @@ var Node$13 = class Node$14 {
217747
217747
  return false;
217748
217748
  return Boolean(checker(attrs));
217749
217749
  }, SuperToolbar, ICONS, TEXTS, tableActionsOptions;
217750
- var init_src_BQ8I1JWL_es = __esm(() => {
217750
+ var init_src_CIT7og3M_es = __esm(() => {
217751
217751
  init_rolldown_runtime_B2q5OVn9_es();
217752
217752
  init_SuperConverter_C2Sw7Q5Z_es();
217753
217753
  init_jszip_ChlR43oI_es();
@@ -236801,6 +236801,7 @@ function print() { __p += __j.call(arguments, '') }
236801
236801
  #errorBannerMessage = null;
236802
236802
  #renderScheduled = false;
236803
236803
  #pendingDocChange = false;
236804
+ #focusScrollRafId = null;
236804
236805
  #pendingMapping = null;
236805
236806
  #isRerendering = false;
236806
236807
  #selectionSync = new SelectionSyncCoordinator;
@@ -237124,6 +237125,13 @@ function print() { __p += __j.call(arguments, '') }
237124
237125
  }
237125
237126
  if (win.scrollX !== beforeX || win.scrollY !== beforeY)
237126
237127
  win.scrollTo(beforeX, beforeY);
237128
+ if (this.#focusScrollRafId != null)
237129
+ win.cancelAnimationFrame(this.#focusScrollRafId);
237130
+ this.#focusScrollRafId = win.requestAnimationFrame(() => {
237131
+ this.#focusScrollRafId = null;
237132
+ if (win.scrollX !== beforeX || win.scrollY !== beforeY)
237133
+ win.scrollTo(beforeX, beforeY);
237134
+ });
237127
237135
  };
237128
237136
  }
237129
237137
  get editor() {
@@ -237802,6 +237810,12 @@ function print() { __p += __j.call(arguments, '') }
237802
237810
  return null;
237803
237811
  }
237804
237812
  scrollToPosition(pos, options = {}) {
237813
+ if (this.#focusScrollRafId != null) {
237814
+ const win = this.#visibleHost.ownerDocument?.defaultView;
237815
+ if (win)
237816
+ win.cancelAnimationFrame(this.#focusScrollRafId);
237817
+ this.#focusScrollRafId = null;
237818
+ }
237805
237819
  const doc$2 = this.getActiveEditor()?.state?.doc;
237806
237820
  if (!doc$2)
237807
237821
  return false;
@@ -238019,6 +238033,11 @@ function print() { __p += __j.call(arguments, '') }
238019
238033
  (this.#visibleHost?.ownerDocument?.defaultView ?? window).cancelAnimationFrame(this.#rafHandle);
238020
238034
  this.#rafHandle = null;
238021
238035
  }, "Layout RAF");
238036
+ if (this.#focusScrollRafId != null)
238037
+ safeCleanup(() => {
238038
+ (this.#visibleHost?.ownerDocument?.defaultView ?? window).cancelAnimationFrame(this.#focusScrollRafId);
238039
+ this.#focusScrollRafId = null;
238040
+ }, "Focus scroll RAF");
238022
238041
  if (this.#decorationSyncRafHandle != null)
238023
238042
  safeCleanup(() => {
238024
238043
  (this.#visibleHost?.ownerDocument?.defaultView ?? window).cancelAnimationFrame(this.#decorationSyncRafHandle);
@@ -250791,13 +250810,19 @@ function print() { __p += __j.call(arguments, '') }
250791
250810
  const restoreSelection$1 = () => {
250792
250811
  proxy.$toolbar.activeEditor?.commands?.restoreSelection();
250793
250812
  };
250813
+ const handleToolbarMousedown = (e) => {
250814
+ if (e.target.closest('input, textarea, [contenteditable="true"]'))
250815
+ return;
250816
+ e.preventDefault();
250817
+ };
250794
250818
  return (_ctx, _cache) => {
250795
250819
  return openBlock(), createElementBlock("div", {
250796
250820
  class: "superdoc-toolbar",
250797
250821
  key: unref(toolbarKey),
250798
250822
  role: "toolbar",
250799
250823
  "aria-label": "Toolbar",
250800
- "data-editor-ui-surface": ""
250824
+ "data-editor-ui-surface": "",
250825
+ onMousedown: handleToolbarMousedown
250801
250826
  }, [
250802
250827
  unref(showLeftSide) ? (openBlock(), createBlock(ButtonGroup_default, {
250803
250828
  key: 0,
@@ -250832,10 +250857,10 @@ function print() { __p += __j.call(arguments, '') }
250832
250857
  onItemClicked: restoreSelection$1,
250833
250858
  class: "superdoc-toolbar-group-side"
250834
250859
  }, null, 8, ["toolbar-items", "ui-font-family"])) : createCommentVNode("", true)
250835
- ]);
250860
+ ], 32);
250836
250861
  };
250837
250862
  }
250838
- }, [["__scopeId", "data-v-6f41d6bf"]]);
250863
+ }, [["__scopeId", "data-v-e0242a18"]]);
250839
250864
  toolbarTexts = {
250840
250865
  bold: "Bold",
250841
250866
  fontFamily: "Font",
@@ -251850,7 +251875,7 @@ var init_zipper_DqXT7uTa_es = __esm(() => {
251850
251875
 
251851
251876
  // ../../packages/superdoc/dist/super-editor.es.js
251852
251877
  var init_super_editor_es = __esm(() => {
251853
- init_src_BQ8I1JWL_es();
251878
+ init_src_CIT7og3M_es();
251854
251879
  init_SuperConverter_C2Sw7Q5Z_es();
251855
251880
  init_jszip_ChlR43oI_es();
251856
251881
  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.5",
3
+ "version": "0.3.0-next.6",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -21,20 +21,20 @@
21
21
  "@types/node": "22.19.2",
22
22
  "typescript": "^5.9.2",
23
23
  "@superdoc/document-api": "0.0.1",
24
- "@superdoc/super-editor": "0.0.1",
24
+ "@superdoc/pm-adapter": "0.0.0",
25
25
  "superdoc": "1.19.0",
26
- "@superdoc/pm-adapter": "0.0.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.5",
34
- "@superdoc-dev/cli-darwin-x64": "0.3.0-next.5",
35
- "@superdoc-dev/cli-linux-x64": "0.3.0-next.5",
36
- "@superdoc-dev/cli-linux-arm64": "0.3.0-next.5",
37
- "@superdoc-dev/cli-windows-x64": "0.3.0-next.5"
33
+ "@superdoc-dev/cli-darwin-arm64": "0.3.0-next.6",
34
+ "@superdoc-dev/cli-linux-x64": "0.3.0-next.6",
35
+ "@superdoc-dev/cli-darwin-x64": "0.3.0-next.6",
36
+ "@superdoc-dev/cli-linux-arm64": "0.3.0-next.6",
37
+ "@superdoc-dev/cli-windows-x64": "0.3.0-next.6"
38
38
  },
39
39
  "scripts": {
40
40
  "dev": "bun run src/index.ts",