superdoc 2.6.0-next.14 → 2.6.0-next.16

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.
@@ -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.6.0-next.14",
22
+ superdocVersion: "2.6.0-next.16",
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.6.0-next.14",
21
+ superdocVersion: "2.6.0-next.16",
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
package/dist/superdoc.cjs CHANGED
@@ -18104,7 +18104,9 @@ function scrollToElement(targetElement, options = {
18104
18104
  if (!targetElement) return;
18105
18105
  const container = getScrollableParent(targetElement);
18106
18106
  const containerRect = container.getBoundingClientRect();
18107
- const offsetTop = targetElement.getBoundingClientRect().top - containerRect.top + container.scrollTop;
18107
+ const targetRect = targetElement.getBoundingClientRect();
18108
+ const containerTop = container === (document.scrollingElement || document.documentElement) ? 0 : containerRect.top;
18109
+ const offsetTop = targetRect.top - containerTop + container.scrollTop;
18108
18110
  const scrollPaddingTopValue = window.getComputedStyle(container).scrollPaddingTop?.trim();
18109
18111
  const resolvedScrollPaddingTop = scrollPaddingTopValue?.endsWith("px") ? Number(scrollPaddingTopValue.slice(0, -2)) : 0;
18110
18112
  const scrollPaddingTop = Number.isFinite(resolvedScrollPaddingTop) && resolvedScrollPaddingTop >= 0 ? resolvedScrollPaddingTop : 0;
@@ -43603,7 +43605,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
43603
43605
  this.config.colors = shuffleArray(this.config.colors);
43604
43606
  this.userColorMap = /* @__PURE__ */ new Map();
43605
43607
  this.colorIndex = 0;
43606
- this.version = "2.6.0-next.14";
43608
+ this.version = "2.6.0-next.16";
43607
43609
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
43608
43610
  this.superdocId = config.superdocId || require_uuid.v4();
43609
43611
  this.colors = this.config.colors ?? [];
@@ -18072,7 +18072,9 @@ function scrollToElement(targetElement, options = {
18072
18072
  if (!targetElement) return;
18073
18073
  const container = getScrollableParent(targetElement);
18074
18074
  const containerRect = container.getBoundingClientRect();
18075
- const offsetTop = targetElement.getBoundingClientRect().top - containerRect.top + container.scrollTop;
18075
+ const targetRect = targetElement.getBoundingClientRect();
18076
+ const containerTop = container === (document.scrollingElement || document.documentElement) ? 0 : containerRect.top;
18077
+ const offsetTop = targetRect.top - containerTop + container.scrollTop;
18076
18078
  const scrollPaddingTopValue = window.getComputedStyle(container).scrollPaddingTop?.trim();
18077
18079
  const resolvedScrollPaddingTop = scrollPaddingTopValue?.endsWith("px") ? Number(scrollPaddingTopValue.slice(0, -2)) : 0;
18078
18080
  const scrollPaddingTop = Number.isFinite(resolvedScrollPaddingTop) && resolvedScrollPaddingTop >= 0 ? resolvedScrollPaddingTop : 0;
@@ -43536,7 +43538,7 @@ var SuperDoc = class extends import_eventemitter3.default {
43536
43538
  this.config.colors = shuffleArray(this.config.colors);
43537
43539
  this.userColorMap = /* @__PURE__ */ new Map();
43538
43540
  this.colorIndex = 0;
43539
- this.version = "2.6.0-next.14";
43541
+ this.version = "2.6.0-next.16";
43540
43542
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
43541
43543
  this.superdocId = config.superdocId || v4();
43542
43544
  this.colors = this.config.colors ?? [];