superdoc 2.27.0-next.6 → 2.27.0-next.8

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.
@@ -7455,7 +7455,10 @@ function createSuperDocUI(options) {
7455
7455
  if (hostSelection && info && typeof info === "object") selectionHostSnapshots.set(info, hostSelection);
7456
7456
  return info;
7457
7457
  };
7458
- const result = current({ includeText: true });
7458
+ const result = current({
7459
+ includeText: true,
7460
+ ...getEditor()?.editorVersion === 2 ? { offsetSpace: "selection" } : {}
7461
+ });
7459
7462
  return isPromiseLike(result) ? Promise.resolve(result).then(tag) : tag(result);
7460
7463
  }
7461
7464
  /** True when a host sync snapshot is a resolved collapsed caret (not a range). */
@@ -7592,7 +7595,10 @@ function createSuperDocUI(options) {
7592
7595
  }
7593
7596
  let raw;
7594
7597
  try {
7595
- raw = current.call(selectionApi, { includeText: true });
7598
+ raw = current.call(selectionApi, {
7599
+ includeText: true,
7600
+ ...getEditor()?.editorVersion === 2 ? { offsetSpace: "selection" } : {}
7601
+ });
7596
7602
  if (isPromiseLike(raw)) raw = await Promise.resolve(raw);
7597
7603
  } catch {
7598
7604
  raw = null;
@@ -7454,7 +7454,10 @@ function createSuperDocUI(options) {
7454
7454
  if (hostSelection && info && typeof info === "object") selectionHostSnapshots.set(info, hostSelection);
7455
7455
  return info;
7456
7456
  };
7457
- const result = current({ includeText: true });
7457
+ const result = current({
7458
+ includeText: true,
7459
+ ...getEditor()?.editorVersion === 2 ? { offsetSpace: "selection" } : {}
7460
+ });
7458
7461
  return isPromiseLike(result) ? Promise.resolve(result).then(tag) : tag(result);
7459
7462
  }
7460
7463
  /** True when a host sync snapshot is a resolved collapsed caret (not a range). */
@@ -7591,7 +7594,10 @@ function createSuperDocUI(options) {
7591
7594
  }
7592
7595
  let raw;
7593
7596
  try {
7594
- raw = current.call(selectionApi, { includeText: true });
7597
+ raw = current.call(selectionApi, {
7598
+ includeText: true,
7599
+ ...getEditor()?.editorVersion === 2 ? { offsetSpace: "selection" } : {}
7600
+ });
7595
7601
  if (isPromiseLike(raw)) raw = await Promise.resolve(raw);
7596
7602
  } catch {
7597
7603
  raw = null;
@@ -19,7 +19,7 @@ var COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
19
19
  var PRIVATE_ENGINE_INFO = (0, _superdoc_docx_engine_collaboration_upgrade_engine.getCollaborationUpgradeEngineInfo)();
20
20
  var ENGINE_INFO = Object.freeze({
21
21
  ...PRIVATE_ENGINE_INFO,
22
- superdocVersion: "2.27.0-next.6",
22
+ superdocVersion: "2.27.0-next.8",
23
23
  roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
24
24
  supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
25
25
  supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
@@ -18,7 +18,7 @@ var COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
18
18
  var PRIVATE_ENGINE_INFO = getCollaborationUpgradeEngineInfo$1();
19
19
  var ENGINE_INFO = Object.freeze({
20
20
  ...PRIVATE_ENGINE_INFO,
21
- superdocVersion: "2.27.0-next.6",
21
+ superdocVersion: "2.27.0-next.8",
22
22
  roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
23
23
  supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
24
24
  supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-CqpZP17K.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-DpVh2nQH.cjs");
3
3
  const require_slice_source = require("../chunks/slice-source-CFaqq0Vo.cjs");
4
4
  let react = require("react");
5
5
  let use_sync_external_store_shim = require("use-sync-external-store/shim");
@@ -1,4 +1,4 @@
1
- import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-mIZuVMA6.es.js";
1
+ import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-cHUUipYM.es.js";
2
2
  import { t as toSliceSource } from "../chunks/slice-source-gfOhG2MW.es.js";
3
3
  import { createContext, createElement, useCallback, useContext, useEffect, useRef, useState } from "react";
4
4
  import { useSyncExternalStore } from "use-sync-external-store/shim";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-CqpZP17K.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-DpVh2nQH.cjs");
3
3
  const require_slice_source = require("../chunks/slice-source-CFaqq0Vo.cjs");
4
4
  let superdoc_entry_vue = require("vue");
5
5
  //#region src/public/ui/vue.ts
@@ -1,4 +1,4 @@
1
- import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-mIZuVMA6.es.js";
1
+ import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-cHUUipYM.es.js";
2
2
  import { t as toSliceSource } from "../chunks/slice-source-gfOhG2MW.es.js";
3
3
  import { computed, inject, onScopeDispose, provide, shallowRef, toRaw, toValue, watch } from "vue";
4
4
  //#region src/public/ui/vue.ts
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-CqpZP17K.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-DpVh2nQH.cjs");
3
3
  //#region ../document-api/src/types/receipt.ts
4
4
  /** Read a known failure.details.reason without assuming every failure has one. */
5
5
  function getDocumentApiRejectionReason(details) {
@@ -1,4 +1,4 @@
1
- import { f as shallowEqual, o as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-mIZuVMA6.es.js";
1
+ import { f as shallowEqual, o as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-cHUUipYM.es.js";
2
2
  //#region ../document-api/src/types/receipt.ts
3
3
  /** Read a known failure.details.reason without assuming every failure has one. */
4
4
  function getDocumentApiRejectionReason(details) {
package/dist/superdoc.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_rolldown_runtime = require("./chunks/rolldown-runtime-74VwNCz7.cjs");
3
3
  const require_blank_docx = require("./chunks/blank-docx-BuFAbRjs.cjs");
4
- const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-CqpZP17K.cjs");
4
+ const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-DpVh2nQH.cjs");
5
5
  const require_eventemitter3 = require("./chunks/eventemitter3-C_TAnXOl.cjs");
6
6
  const require_uuid = require("./chunks/uuid-BhG0ngwk.cjs");
7
7
  const require__plugin_vue_export_helper = require("./chunks/_plugin-vue_export-helper-BUdjGKyl.cjs");
@@ -260,7 +260,7 @@ var v_click_outside_default = {
260
260
  var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
261
261
  function getSuperdocVersion() {
262
262
  try {
263
- return "2.27.0-next.6";
263
+ return "2.27.0-next.8";
264
264
  } catch {
265
265
  return "unknown";
266
266
  }
@@ -46224,7 +46224,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
46224
46224
  }
46225
46225
  this.userColorMap = /* @__PURE__ */ new Map();
46226
46226
  this.colorIndex = 0;
46227
- this.version = "2.27.0-next.6";
46227
+ this.version = "2.27.0-next.8";
46228
46228
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
46229
46229
  this.superdocId = config.superdocId || require_uuid.v4();
46230
46230
  this.colors = this.config.colors ?? [];
@@ -1,6 +1,6 @@
1
1
  import { i as __toESM$2 } from "./chunks/rolldown-runtime-0pSA04fp.es.js";
2
2
  import { t as blank_default } from "./chunks/blank-docx-DzQccOlW.es.js";
3
- import { _ as getWorkflowRecording, a as registerFirstPartyCommandMutation, c as getV2TrackedChangeMutationImpact, d as resolveImageSrc, g as createInteractionHistory, h as closeInteractionHistory, i as readFirstPartyPageNumbers, l as isPlainObject$1, m as DOM_CLASS_NAMES, n as executeFirstPartyCommandAsync, p as isSyntheticTrackedChangeCommentLaneItem, r as executeFirstPartyShortcutAsync, s as applyV2CommentInvalidationFromMutation, t as createSuperDocUI, u as createImageFilePicker, v as isWorkflowRecordingEnabled, y as recordInteraction } from "./chunks/create-super-doc-ui-mIZuVMA6.es.js";
3
+ import { _ as getWorkflowRecording, a as registerFirstPartyCommandMutation, c as getV2TrackedChangeMutationImpact, d as resolveImageSrc, g as createInteractionHistory, h as closeInteractionHistory, i as readFirstPartyPageNumbers, l as isPlainObject$1, m as DOM_CLASS_NAMES, n as executeFirstPartyCommandAsync, p as isSyntheticTrackedChangeCommentLaneItem, r as executeFirstPartyShortcutAsync, s as applyV2CommentInvalidationFromMutation, t as createSuperDocUI, u as createImageFilePicker, v as isWorkflowRecordingEnabled, y as recordInteraction } from "./chunks/create-super-doc-ui-cHUUipYM.es.js";
4
4
  import { t as import_eventemitter3 } from "./chunks/eventemitter3-DEIiXiH2.es.js";
5
5
  import { t as v4 } from "./chunks/uuid-H0Xcmmhy.es.js";
6
6
  import { $ as vModelText, A as onActivated, B as renderSlot, C as isRef$1, D as normalizeClass, E as nextTick, F as openBlock, G as toRaw$2, H as resolveDynamicComponent, I as provide$1, J as unref, K as toRef, L as reactive, M as onDeactivated, N as onMounted, O as normalizeProps, P as onScopeDispose$1, Q as vModelSelect, R as ref, S as isReactive$1, T as mergeProps, U as shallowRef$1, V as resolveDirective, W as toDisplayString, X as useSlots, Y as useAttrs, Z as vModelCheckbox, _ as getCurrentInstance, a as computed$1, b as hasInjectionContext, c as createCommentVNode, d as createStaticVNode, et as watch$1, f as createTextVNode, g as effectScope, h as defineComponent, i as Transition, it as withModifiers, j as onBeforeUnmount, k as normalizeStyle, l as createElementBlock, m as defineAsyncComponent, n as Fragment, nt as withDirectives, o as createApp, p as createVNode, q as toRefs, r as Teleport, rt as withKeys, s as createBlock, t as _plugin_vue_export_helper_default, tt as withCtx, u as createElementVNode, v as getCurrentScope, w as markRaw, x as inject$1, y as h, z as renderList } from "./chunks/_plugin-vue_export-helper-7ZiLY07t.es.js";
@@ -258,7 +258,7 @@ var v_click_outside_default = {
258
258
  var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
259
259
  function getSuperdocVersion() {
260
260
  try {
261
- return "2.27.0-next.6";
261
+ return "2.27.0-next.8";
262
262
  } catch {
263
263
  return "unknown";
264
264
  }
@@ -46154,7 +46154,7 @@ var SuperDoc = class extends import_eventemitter3.default {
46154
46154
  }
46155
46155
  this.userColorMap = /* @__PURE__ */ new Map();
46156
46156
  this.colorIndex = 0;
46157
- this.version = "2.27.0-next.6";
46157
+ this.version = "2.27.0-next.8";
46158
46158
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
46159
46159
  this.superdocId = config.superdocId || v4();
46160
46160
  this.colors = this.config.colors ?? [];