@superdoc-dev/cli 0.2.0-next.94 → 0.2.0-next.95

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 +27 -13
  2. package/package.json +9 -9
package/dist/index.js CHANGED
@@ -121914,9 +121914,9 @@ var init_remark_gfm_CjV8kaUy_es = __esm(() => {
121914
121914
  init_remark_gfm_z_sDF4ss_es();
121915
121915
  });
121916
121916
 
121917
- // ../../packages/superdoc/dist/chunks/src-CS_uXP_L.es.js
121918
- var exports_src_CS_uXP_L_es = {};
121919
- __export(exports_src_CS_uXP_L_es, {
121917
+ // ../../packages/superdoc/dist/chunks/src-BciUeGjt.es.js
121918
+ var exports_src_BciUeGjt_es = {};
121919
+ __export(exports_src_BciUeGjt_es, {
121920
121920
  zt: () => defineMark,
121921
121921
  z: () => cM,
121922
121922
  yt: () => removeAwarenessStates,
@@ -199182,7 +199182,7 @@ var Node$13 = class Node$14 {
199182
199182
  trackedChanges: context.trackedChanges ?? []
199183
199183
  });
199184
199184
  }, _hoisted_1$6, _hoisted_2$2, _hoisted_3, _hoisted_4, ContextMenu_default, _hoisted_1$5, BasicUpload_default, _hoisted_1$4, MIN_WIDTH = 200, PPI = 96, alignment = "flex-end", Ruler_default, GenericPopover_default, _hoisted_1$3, _hoisted_2$1, RESIZE_HANDLE_WIDTH_PX = 9, RESIZE_HANDLE_HEIGHT_PX = 9, RESIZE_HANDLE_OFFSET_PX = 4, DRAG_OVERLAY_EXTENSION_PX = 1000, MIN_DRAG_OVERLAY_WIDTH_PX = 2000, THROTTLE_INTERVAL_MS = 16, MIN_RESIZE_DELTA_PX = 1, TableResizeOverlay_default, _hoisted_1$2, OVERLAY_EXPANSION_PX = 2000, RESIZE_HANDLE_SIZE_PX = 12, MOUSE_MOVE_THROTTLE_MS = 16, DIMENSION_CHANGE_THRESHOLD_PX = 1, Z_INDEX_OVERLAY = 10, Z_INDEX_HANDLE = 15, Z_INDEX_GUIDELINE = 20, ImageResizeOverlay_default, LINK_CLICK_DEBOUNCE_MS = 300, CURSOR_UPDATE_TIMEOUT_MS = 10, POPOVER_VERTICAL_OFFSET_PX = 15, LinkClickHandler_default, _hoisted_1$1, _hoisted_2, DOCX2 = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", TABLE_RESIZE_HOVER_THRESHOLD = 8, TABLE_RESIZE_THROTTLE_MS = 16, SuperEditor_default, _hoisted_1, SuperInput_default, SlashMenu, Extensions;
199185
- var init_src_CS_uXP_L_es = __esm(() => {
199185
+ var init_src_BciUeGjt_es = __esm(() => {
199186
199186
  init_rolldown_runtime_B2q5OVn9_es();
199187
199187
  init_SuperConverter_6i_hCnOE_es();
199188
199188
  init_jszip_ChlR43oI_es();
@@ -213892,6 +213892,7 @@ function print() { __p += __j.call(arguments, '') }
213892
213892
  this.mount.insertBefore(this.virtualPagesEl, this.bottomSpacerEl);
213893
213893
  this.mount.appendChild(this.bottomSpacerEl);
213894
213894
  let prevIndex = null;
213895
+ let cursor = this.virtualPagesEl.firstChild;
213895
213896
  for (const idx of mounted) {
213896
213897
  if (prevIndex != null && idx > prevIndex + 1) {
213897
213898
  const gap = this.doc.createElement("div");
@@ -213901,10 +213902,13 @@ function print() { __p += __j.call(arguments, '') }
213901
213902
  const gapHeight = this.topOfIndex(idx) - this.topOfIndex(prevIndex) - this.virtualHeights[prevIndex] - this.virtualGap * 2;
213902
213903
  gap.style.height = `${Math.max(0, Math.floor(gapHeight))}px`;
213903
213904
  this.virtualGapSpacers.push(gap);
213904
- this.virtualPagesEl.appendChild(gap);
213905
+ this.virtualPagesEl.insertBefore(gap, cursor);
213905
213906
  }
213906
213907
  const state = this.pageIndexToState.get(idx);
213907
- this.virtualPagesEl.appendChild(state.element);
213908
+ if (state.element === cursor)
213909
+ cursor = state.element.nextSibling;
213910
+ else
213911
+ this.virtualPagesEl.insertBefore(state.element, cursor);
213908
213912
  prevIndex = idx;
213909
213913
  }
213910
213914
  this.changedBlocks.clear();
@@ -219318,12 +219322,22 @@ function print() { __p += __j.call(arguments, '') }
219318
219322
  return;
219319
219323
  this.#pendingDocChange = false;
219320
219324
  this.#isRerendering = true;
219325
+ const activeHfEditor = (this.#headerFooterSession?.session?.mode ?? "body") !== "body" ? this.#headerFooterSession?.activeEditor : null;
219326
+ const hadHfFocus = activeHfEditor?.view?.hasFocus?.() ?? false;
219321
219327
  try {
219322
219328
  await this.#rerender();
219323
219329
  } finally {
219324
219330
  this.#isRerendering = false;
219325
219331
  if (this.#pendingDocChange)
219326
219332
  this.#scheduleRerender();
219333
+ if (hadHfFocus && activeHfEditor?.view && this.#headerFooterSession?.activeEditor === activeHfEditor) {
219334
+ const doc$2 = this.#visibleHost.ownerDocument;
219335
+ const editorDom = activeHfEditor.view.dom;
219336
+ if (doc$2 && !editorDom.contains(doc$2.activeElement))
219337
+ try {
219338
+ activeHfEditor.view.focus();
219339
+ } catch {}
219340
+ }
219327
219341
  }
219328
219342
  }
219329
219343
  async#rerender() {
@@ -230919,8 +230933,8 @@ function print() { __p += __j.call(arguments, '') }
230919
230933
  return isObjectLike_default(value) && hasOwnProperty$8.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
230920
230934
  };
230921
230935
  stubFalse_default = stubFalse;
230922
- freeExports$2 = typeof exports_src_CS_uXP_L_es == "object" && exports_src_CS_uXP_L_es && !exports_src_CS_uXP_L_es.nodeType && exports_src_CS_uXP_L_es;
230923
- freeModule$2 = freeExports$2 && typeof module_src_CS_uXP_L_es == "object" && module_src_CS_uXP_L_es && !module_src_CS_uXP_L_es.nodeType && module_src_CS_uXP_L_es;
230936
+ freeExports$2 = typeof exports_src_BciUeGjt_es == "object" && exports_src_BciUeGjt_es && !exports_src_BciUeGjt_es.nodeType && exports_src_BciUeGjt_es;
230937
+ freeModule$2 = freeExports$2 && typeof module_src_BciUeGjt_es == "object" && module_src_BciUeGjt_es && !module_src_BciUeGjt_es.nodeType && module_src_BciUeGjt_es;
230924
230938
  Buffer$1 = freeModule$2 && freeModule$2.exports === freeExports$2 ? _root_default.Buffer : undefined;
230925
230939
  isBuffer_default = (Buffer$1 ? Buffer$1.isBuffer : undefined) || stubFalse_default;
230926
230940
  typedArrayTags = {};
@@ -230928,8 +230942,8 @@ function print() { __p += __j.call(arguments, '') }
230928
230942
  typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$1] = typedArrayTags[dataViewTag$2] = typedArrayTags[dateTag$1] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag] = typedArrayTags[mapTag$2] = typedArrayTags[numberTag$1] = typedArrayTags[objectTag$3] = typedArrayTags[regexpTag$1] = typedArrayTags[setTag$2] = typedArrayTags[stringTag$1] = typedArrayTags[weakMapTag$1] = false;
230929
230943
  _baseIsTypedArray_default = baseIsTypedArray;
230930
230944
  _baseUnary_default = baseUnary;
230931
- freeExports$1 = typeof exports_src_CS_uXP_L_es == "object" && exports_src_CS_uXP_L_es && !exports_src_CS_uXP_L_es.nodeType && exports_src_CS_uXP_L_es;
230932
- freeModule$1 = freeExports$1 && typeof module_src_CS_uXP_L_es == "object" && module_src_CS_uXP_L_es && !module_src_CS_uXP_L_es.nodeType && module_src_CS_uXP_L_es;
230945
+ freeExports$1 = typeof exports_src_BciUeGjt_es == "object" && exports_src_BciUeGjt_es && !exports_src_BciUeGjt_es.nodeType && exports_src_BciUeGjt_es;
230946
+ freeModule$1 = freeExports$1 && typeof module_src_BciUeGjt_es == "object" && module_src_BciUeGjt_es && !module_src_BciUeGjt_es.nodeType && module_src_BciUeGjt_es;
230933
230947
  freeProcess = freeModule$1 && freeModule$1.exports === freeExports$1 && _freeGlobal_default.process;
230934
230948
  _nodeUtil_default = function() {
230935
230949
  try {
@@ -231034,8 +231048,8 @@ function print() { __p += __j.call(arguments, '') }
231034
231048
  Stack.prototype.has = _stackHas_default;
231035
231049
  Stack.prototype.set = _stackSet_default;
231036
231050
  _Stack_default = Stack;
231037
- freeExports = typeof exports_src_CS_uXP_L_es == "object" && exports_src_CS_uXP_L_es && !exports_src_CS_uXP_L_es.nodeType && exports_src_CS_uXP_L_es;
231038
- freeModule = freeExports && typeof module_src_CS_uXP_L_es == "object" && module_src_CS_uXP_L_es && !module_src_CS_uXP_L_es.nodeType && module_src_CS_uXP_L_es;
231051
+ freeExports = typeof exports_src_BciUeGjt_es == "object" && exports_src_BciUeGjt_es && !exports_src_BciUeGjt_es.nodeType && exports_src_BciUeGjt_es;
231052
+ freeModule = freeExports && typeof module_src_BciUeGjt_es == "object" && module_src_BciUeGjt_es && !module_src_BciUeGjt_es.nodeType && module_src_BciUeGjt_es;
231039
231053
  Buffer4 = freeModule && freeModule.exports === freeExports ? _root_default.Buffer : undefined;
231040
231054
  allocUnsafe = Buffer4 ? Buffer4.allocUnsafe : undefined;
231041
231055
  _cloneBuffer_default = cloneBuffer;
@@ -239115,7 +239129,7 @@ var init_zipper_DqXT7uTa_es = __esm(() => {
239115
239129
 
239116
239130
  // ../../packages/superdoc/dist/super-editor.es.js
239117
239131
  var init_super_editor_es = __esm(() => {
239118
- init_src_CS_uXP_L_es();
239132
+ init_src_BciUeGjt_es();
239119
239133
  init_SuperConverter_6i_hCnOE_es();
239120
239134
  init_jszip_ChlR43oI_es();
239121
239135
  init_xml_js_DLE8mr0n_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.2.0-next.94",
3
+ "version": "0.2.0-next.95",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -20,21 +20,21 @@
20
20
  "@types/bun": "^1.3.8",
21
21
  "@types/node": "22.19.2",
22
22
  "typescript": "^5.9.2",
23
- "@superdoc/document-api": "0.0.1",
24
- "@superdoc/super-editor": "0.0.1",
23
+ "@superdoc/pm-adapter": "0.0.0",
25
24
  "superdoc": "1.17.0",
26
- "@superdoc/pm-adapter": "0.0.0"
25
+ "@superdoc/super-editor": "0.0.1",
26
+ "@superdoc/document-api": "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.2.0-next.94",
34
- "@superdoc-dev/cli-darwin-x64": "0.2.0-next.94",
35
- "@superdoc-dev/cli-linux-x64": "0.2.0-next.94",
36
- "@superdoc-dev/cli-linux-arm64": "0.2.0-next.94",
37
- "@superdoc-dev/cli-windows-x64": "0.2.0-next.94"
33
+ "@superdoc-dev/cli-darwin-arm64": "0.2.0-next.95",
34
+ "@superdoc-dev/cli-darwin-x64": "0.2.0-next.95",
35
+ "@superdoc-dev/cli-windows-x64": "0.2.0-next.95",
36
+ "@superdoc-dev/cli-linux-arm64": "0.2.0-next.95",
37
+ "@superdoc-dev/cli-linux-x64": "0.2.0-next.95"
38
38
  },
39
39
  "scripts": {
40
40
  "dev": "bun run src/index.ts",