@harbour-enterprises/superdoc 0.21.0-RC2 → 0.21.0-next.2

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 (32) hide show
  1. package/README.md +4 -4
  2. package/dist/chunks/{PdfViewer-DGbJ8_qc.cjs → PdfViewer-1mNuyy3m.cjs} +1 -1
  3. package/dist/chunks/{PdfViewer-CbGuPQY8.es.js → PdfViewer-BkXBRXPs.es.js} +1 -1
  4. package/dist/chunks/{index-ecl0ZFNw.cjs → index-BB3Qn69u.cjs} +57 -15
  5. package/dist/chunks/{index-qjntJEk0.es.js → index-C-44kxYe.es.js} +57 -15
  6. package/dist/chunks/{super-editor.es-BF_Xaucb.es.js → super-editor.es-CKw7iZcz.es.js} +217 -128
  7. package/dist/chunks/{super-editor.es-CS5l-cVZ.cjs → super-editor.es-Dd0joLAR.cjs} +217 -128
  8. package/dist/core/SuperDoc.d.ts.map +1 -1
  9. package/dist/stores/comments-store.d.ts.map +1 -1
  10. package/dist/style.css +1 -1
  11. package/dist/super-editor/ai-writer.es.js +2 -2
  12. package/dist/super-editor/chunks/{converter-DUqGq6qj.js → converter-FESR2WO7.js} +41 -25
  13. package/dist/super-editor/chunks/{docx-zipper-CQsQR8Zs.js → docx-zipper-BWZ2o1H5.js} +1 -1
  14. package/dist/super-editor/chunks/{editor-gMF6aWiz.js → editor-XsrBXzy-.js} +156 -93
  15. package/dist/super-editor/chunks/{toolbar-BxsT1ZgG.js → toolbar-tBWlOBPh.js} +21 -11
  16. package/dist/super-editor/converter.es.js +1 -1
  17. package/dist/super-editor/docx-zipper.es.js +2 -2
  18. package/dist/super-editor/editor.es.js +3 -3
  19. package/dist/super-editor/file-zipper.es.js +1 -1
  20. package/dist/super-editor/src/extensions/comment/comment-import-helpers.d.ts +15 -0
  21. package/dist/super-editor/src/extensions/search/prosemirror-search-patched.d.ts +110 -0
  22. package/dist/super-editor/style.css +1 -1
  23. package/dist/super-editor/super-editor.es.js +6 -6
  24. package/dist/super-editor/toolbar.es.js +2 -2
  25. package/dist/super-editor.cjs +1 -1
  26. package/dist/super-editor.es.js +1 -1
  27. package/dist/superdoc.cjs +2 -2
  28. package/dist/superdoc.es.js +2 -2
  29. package/dist/superdoc.umd.js +272 -141
  30. package/dist/superdoc.umd.js.map +1 -1
  31. package/npm-deprecation-notice.cjs +10 -0
  32. package/package.json +11 -6
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  [![Documentation](https://img.shields.io/badge/docs-available-1355ff.svg)](https://docs.superdoc.dev/)
6
6
  [![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-1355ff.svg)](https://www.gnu.org/licenses/agpl-3.0)
7
- [![npm version](https://img.shields.io/npm/v/@harbour-enterprises/superdoc.svg?color=1355ff)](https://www.npmjs.com/package/@harbour-enterprises/superdoc)
7
+ [![npm version](https://img.shields.io/npm/v/superdoc.svg?color=1355ff)](https://www.npmjs.com/package/superdoc)
8
8
  [![Discord](https://img.shields.io/badge/discord-join-1355ff)](https://discord.gg/FBeRDqWy)
9
9
 
10
10
  SuperDoc is a powerful document editor that brings Microsoft Word-level capabilities to your web applications. With real-time collaboration, extensive formatting options, and seamless integration capabilities, SuperDoc makes document editing on the web better for everyone.
@@ -23,14 +23,14 @@ SuperDoc is a powerful document editor that brings Microsoft Word-level capabili
23
23
  ### Installation
24
24
 
25
25
  ```bash
26
- npm install @harbour-enterprises/superdoc
26
+ npm install superdoc
27
27
  ```
28
28
 
29
29
  ### Basic Usage
30
30
 
31
31
  ```javascript
32
- import '@harbour-enterprises/superdoc/style.css';
33
- import { SuperDoc } from '@harbour-enterprises/superdoc';
32
+ import 'superdoc/style.css';
33
+ import { SuperDoc } from 'superdoc';
34
34
 
35
35
  const superdoc = new SuperDoc({
36
36
  selector: '#superdoc',
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const vue = require("./vue-DWle4Cai.cjs");
4
- const superdoc = require("./index-ecl0ZFNw.cjs");
4
+ const superdoc = require("./index-BB3Qn69u.cjs");
5
5
  function self(vars) {
6
6
  const {
7
7
  opacityDisabled,
@@ -1,5 +1,5 @@
1
1
  import { m as defineComponent, B as h, O as Transition, $ as process$1, I as watchEffect, d as computed, r as ref, j as onMounted, W as onUnmounted, c as createElementBlock, o as openBlock, a as createBaseVNode, f as createCommentVNode, v as createVNode, x as unref } from "./vue-CXxsqYcP.es.js";
2
- import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-qjntJEk0.es.js";
2
+ import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-C-44kxYe.es.js";
3
3
  function self(vars) {
4
4
  const {
5
5
  opacityDisabled,
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const superEditor_es = require("./super-editor.es-CS5l-cVZ.cjs");
2
+ const superEditor_es = require("./super-editor.es-Dd0joLAR.cjs");
3
3
  const vue = require("./vue-DWle4Cai.cjs");
4
4
  const jszip = require("./jszip-b7l8QkfH.cjs");
5
5
  const blankDocx = require("./blank-docx-CPqX9RF5.cjs");
@@ -4541,13 +4541,41 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4541
4541
  });
4542
4542
  return comments;
4543
4543
  });
4544
+ const normalizeCommentForEditor = (node) => {
4545
+ if (!node || typeof node !== "object") return node;
4546
+ const cloneMarks = (marks) => Array.isArray(marks) ? marks.filter(Boolean).map((mark) => ({
4547
+ ...mark,
4548
+ attrs: mark?.attrs ? { ...mark.attrs } : void 0
4549
+ })) : void 0;
4550
+ const cloneAttrs = (attrs) => attrs && typeof attrs === "object" ? { ...attrs } : void 0;
4551
+ if (!Array.isArray(node.content)) {
4552
+ return {
4553
+ type: node.type,
4554
+ ...node.text !== void 0 ? { text: node.text } : {},
4555
+ ...node.attrs ? { attrs: cloneAttrs(node.attrs) } : {},
4556
+ ...node.marks ? { marks: cloneMarks(node.marks) } : {}
4557
+ };
4558
+ }
4559
+ const normalizedChildren = node.content.map((child) => normalizeCommentForEditor(child)).flat().filter(Boolean);
4560
+ if (node.type === "run") {
4561
+ return normalizedChildren;
4562
+ }
4563
+ return {
4564
+ type: node.type,
4565
+ ...node.attrs ? { attrs: cloneAttrs(node.attrs) } : {},
4566
+ ...node.marks ? { marks: cloneMarks(node.marks) } : {},
4567
+ content: normalizedChildren
4568
+ };
4569
+ };
4544
4570
  const getHTmlFromComment = (commentTextJson) => {
4545
4571
  if (!commentTextJson.content?.length) return;
4546
4572
  try {
4573
+ const normalizedContent = normalizeCommentForEditor(commentTextJson);
4574
+ const schemaContent = Array.isArray(normalizedContent) ? normalizedContent[0] : normalizedContent;
4547
4575
  const editor = new superEditor_es.Editor({
4548
4576
  mode: "text",
4549
4577
  isHeadless: true,
4550
- content: commentTextJson,
4578
+ content: schemaContent,
4551
4579
  loadFromSchema: true,
4552
4580
  extensions: superEditor_es.getRichTextExtensions()
4553
4581
  });
@@ -6619,7 +6647,7 @@ function resolveTo(selector) {
6619
6647
  if (typeof selector === "string") {
6620
6648
  return document.querySelector(selector);
6621
6649
  }
6622
- return selector();
6650
+ return selector() || null;
6623
6651
  }
6624
6652
  const LazyTeleport = vue.defineComponent({
6625
6653
  name: "LazyTeleport",
@@ -6707,8 +6735,11 @@ const oppositeAlignCssPositionProps = {
6707
6735
  };
6708
6736
  const keepOffsetDirection = {
6709
6737
  top: true,
6738
+ // top++
6710
6739
  bottom: false,
6740
+ // top--
6711
6741
  left: true,
6742
+ // left++
6712
6743
  right: false
6713
6744
  // left--
6714
6745
  };
@@ -7825,7 +7856,6 @@ function isFocusable(element) {
7825
7856
  return !!element.href && element.rel !== "ignore";
7826
7857
  case "INPUT":
7827
7858
  return element.type !== "hidden" && element.type !== "file";
7828
- case "BUTTON":
7829
7859
  case "SELECT":
7830
7860
  case "TEXTAREA":
7831
7861
  return true;
@@ -7844,8 +7874,8 @@ const FocusTrap = vue.defineComponent({
7844
7874
  default: true
7845
7875
  },
7846
7876
  onEsc: Function,
7847
- initialFocusTo: String,
7848
- finalFocusTo: String,
7877
+ initialFocusTo: [String, Function],
7878
+ finalFocusTo: [String, Function],
7849
7879
  returnFocusOnDeactivated: {
7850
7880
  type: Boolean,
7851
7881
  default: true
@@ -10628,6 +10658,7 @@ function self$6(vars) {
10628
10658
  });
10629
10659
  }
10630
10660
  const scrollbarLight = {
10661
+ name: "Scrollbar",
10631
10662
  common: derived,
10632
10663
  self: self$6
10633
10664
  };
@@ -12143,11 +12174,14 @@ function self$5(vars) {
12143
12174
  boxShadow: boxShadow2
12144
12175
  });
12145
12176
  }
12146
- const popoverLight = {
12177
+ const popoverLight = createTheme({
12147
12178
  name: "Popover",
12148
12179
  common: derived,
12180
+ peers: {
12181
+ Scrollbar: scrollbarLight
12182
+ },
12149
12183
  self: self$5
12150
- };
12184
+ });
12151
12185
  const oppositePlacement = {
12152
12186
  top: "bottom",
12153
12187
  bottom: "top",
@@ -12367,9 +12401,11 @@ const NPopoverBody = vue.defineComponent({
12367
12401
  const {
12368
12402
  namespaceRef,
12369
12403
  mergedClsPrefixRef,
12370
- inlineThemeDisabled
12404
+ inlineThemeDisabled,
12405
+ mergedRtlRef
12371
12406
  } = useConfig(props);
12372
12407
  const themeRef = useTheme("Popover", "-popover", style$4, popoverLight, props, mergedClsPrefixRef);
12408
+ const rtlEnabledRef = useRtl("Popover", mergedRtlRef, mergedClsPrefixRef);
12373
12409
  const followerRef = vue.ref(null);
12374
12410
  const NPopover2 = vue.inject("NPopover");
12375
12411
  const bodyRef = vue.ref(null);
@@ -12567,6 +12603,8 @@ const NPopoverBody = vue.defineComponent({
12567
12603
  style: props.contentStyle
12568
12604
  }, slots);
12569
12605
  const maybeScrollableBody = props.scrollable ? vue.h(XScrollbar, {
12606
+ themeOverrides: themeRef.value.peerOverrides.Scrollbar,
12607
+ theme: themeRef.value.peers.Scrollbar,
12570
12608
  contentClass: hasHeaderOrFooter ? void 0 : `${mergedClsPrefix}-popover__content ${(_b = props.contentClass) !== null && _b !== void 0 ? _b : ""}`,
12571
12609
  contentStyle: hasHeaderOrFooter ? void 0 : props.contentStyle
12572
12610
  }, {
@@ -12582,7 +12620,7 @@ const NPopoverBody = vue.defineComponent({
12582
12620
  return [maybeScrollableBody, arrow];
12583
12621
  };
12584
12622
  contentNode = vue.h("div", vue.mergeProps({
12585
- class: [`${mergedClsPrefix}-popover`, `${mergedClsPrefix}-popover-shared`, themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass.value, extraClass.map((v) => `${mergedClsPrefix}-${v}`), {
12623
+ class: [`${mergedClsPrefix}-popover`, `${mergedClsPrefix}-popover-shared`, (rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) && `${mergedClsPrefix}-popover--rtl`, themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass.value, extraClass.map((v) => `${mergedClsPrefix}-${v}`), {
12586
12624
  [`${mergedClsPrefix}-popover--scrollable`]: props.scrollable,
12587
12625
  [`${mergedClsPrefix}-popover--show-header-or-footer`]: hasHeaderOrFooter,
12588
12626
  [`${mergedClsPrefix}-popover--raw`]: props.raw,
@@ -12606,7 +12644,7 @@ const NPopoverBody = vue.defineComponent({
12606
12644
  // The popover class and overlap class must exists, they will be used
12607
12645
  // to place the body & transition animation.
12608
12646
  // Shadow class exists for reuse box-shadow.
12609
- [`${mergedClsPrefix}-popover-shared`, themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass.value, props.overlap && `${mergedClsPrefix}-popover-shared--overlap`, props.showArrow && `${mergedClsPrefix}-popover-shared--show-arrow`, props.arrowPointToCenter && `${mergedClsPrefix}-popover-shared--center-arrow`],
12647
+ [`${mergedClsPrefix}-popover-shared`, (rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) && `${mergedClsPrefix}-popover--rtl`, themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass.value, props.overlap && `${mergedClsPrefix}-popover-shared--overlap`, props.showArrow && `${mergedClsPrefix}-popover-shared--show-arrow`, props.arrowPointToCenter && `${mergedClsPrefix}-popover-shared--center-arrow`],
12610
12648
  bodyRef,
12611
12649
  styleRef.value,
12612
12650
  handleMouseEnter,
@@ -15057,7 +15095,8 @@ function self$1(vars) {
15057
15095
  closeIconColorPressedLoading: closeIconColorPressed,
15058
15096
  loadingColor: primaryColor,
15059
15097
  lineHeight: lineHeight2,
15060
- borderRadius
15098
+ borderRadius,
15099
+ border: "0"
15061
15100
  });
15062
15101
  }
15063
15102
  const messageLight = {
@@ -15108,6 +15147,7 @@ const style = c$1([cB("message-wrapper", `
15108
15147
  margin-bottom .3s var(--n-bezier);
15109
15148
  padding: var(--n-padding);
15110
15149
  border-radius: var(--n-border-radius);
15150
+ border: var(--n-border);
15111
15151
  flex-wrap: nowrap;
15112
15152
  overflow: hidden;
15113
15153
  max-width: var(--n-max-width);
@@ -15226,6 +15266,7 @@ const NMessage = vue.defineComponent({
15226
15266
  fontSize: fontSize2,
15227
15267
  lineHeight: lineHeight2,
15228
15268
  borderRadius,
15269
+ border,
15229
15270
  iconColorInfo,
15230
15271
  iconColorSuccess,
15231
15272
  iconColorWarning,
@@ -15269,7 +15310,8 @@ const NMessage = vue.defineComponent({
15269
15310
  "--n-close-icon-color-pressed": closeIconColorPressed,
15270
15311
  "--n-close-icon-color-hover": closeIconColorHover,
15271
15312
  "--n-line-height": lineHeight2,
15272
- "--n-border-radius": borderRadius
15313
+ "--n-border-radius": borderRadius,
15314
+ "--n-border": border
15273
15315
  };
15274
15316
  });
15275
15317
  const themeClassHandle = inlineThemeDisabled ? useThemeClass("message", vue.computed(() => props.type[0]), cssVarsRef, {}) : void 0;
@@ -17367,7 +17409,7 @@ const _sfc_main = {
17367
17409
  __name: "SuperDoc",
17368
17410
  emits: ["selection-update"],
17369
17411
  setup(__props, { emit: __emit }) {
17370
- const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-DGbJ8_qc.cjs")));
17412
+ const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-1mNuyy3m.cjs")));
17371
17413
  const superdocStore = useSuperdocStore();
17372
17414
  const commentsStore = useCommentsStore();
17373
17415
  const {
@@ -18011,7 +18053,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
18011
18053
  this.config.colors = shuffleArray(this.config.colors);
18012
18054
  this.userColorMap = /* @__PURE__ */ new Map();
18013
18055
  this.colorIndex = 0;
18014
- this.version = "0.21.0-RC2";
18056
+ this.version = "0.20.2";
18015
18057
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
18016
18058
  this.superdocId = config.superdocId || uuid.v4();
18017
18059
  this.colors = this.config.colors;
@@ -1,4 +1,4 @@
1
- import { q as index$1, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-BF_Xaucb.es.js";
1
+ import { q as index$1, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-CKw7iZcz.es.js";
2
2
  import { a0 as effectScope, r as ref, _ as markRaw, $ as process$1, a1 as toRaw, d as computed, a2 as isRef, a3 as isReactive, C as toRef, i as inject, p as getCurrentInstance, l as watch, x as unref, a4 as hasInjectionContext, M as reactive, s as nextTick, a5 as getCurrentScope, a6 as onScopeDispose, a7 as toRefs, g as global$1, J as shallowRef, N as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, S as onActivated, q as onDeactivated, z as createTextVNode, F as Fragment, Q as Comment, m as defineComponent, D as provide, H as withDirectives, B as h, U as Teleport, R as renderSlot, V as isVNode, I as watchEffect, O as Transition, a8 as TransitionGroup, E as mergeProps, P as vShow, G as cloneVNode, T as Text, c as createElementBlock, o as openBlock, t as toDisplayString, v as createVNode, y as withCtx, a as createBaseVNode, A as normalizeStyle, f as createCommentVNode, u as createBlock, w as withModifiers, n as normalizeClass, a9 as resolveDirective, e as renderList, b as createApp, X as resolveDynamicComponent, aa as defineAsyncComponent } from "./vue-CXxsqYcP.es.js";
3
3
  import { B as Buffer$2 } from "./jszip-B8KIZSNe.es.js";
4
4
  import { B as BlankDOCX } from "./blank-docx-iwdyG9RH.es.js";
@@ -4524,13 +4524,41 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4524
4524
  });
4525
4525
  return comments;
4526
4526
  });
4527
+ const normalizeCommentForEditor = (node) => {
4528
+ if (!node || typeof node !== "object") return node;
4529
+ const cloneMarks = (marks) => Array.isArray(marks) ? marks.filter(Boolean).map((mark) => ({
4530
+ ...mark,
4531
+ attrs: mark?.attrs ? { ...mark.attrs } : void 0
4532
+ })) : void 0;
4533
+ const cloneAttrs = (attrs) => attrs && typeof attrs === "object" ? { ...attrs } : void 0;
4534
+ if (!Array.isArray(node.content)) {
4535
+ return {
4536
+ type: node.type,
4537
+ ...node.text !== void 0 ? { text: node.text } : {},
4538
+ ...node.attrs ? { attrs: cloneAttrs(node.attrs) } : {},
4539
+ ...node.marks ? { marks: cloneMarks(node.marks) } : {}
4540
+ };
4541
+ }
4542
+ const normalizedChildren = node.content.map((child) => normalizeCommentForEditor(child)).flat().filter(Boolean);
4543
+ if (node.type === "run") {
4544
+ return normalizedChildren;
4545
+ }
4546
+ return {
4547
+ type: node.type,
4548
+ ...node.attrs ? { attrs: cloneAttrs(node.attrs) } : {},
4549
+ ...node.marks ? { marks: cloneMarks(node.marks) } : {},
4550
+ content: normalizedChildren
4551
+ };
4552
+ };
4527
4553
  const getHTmlFromComment = (commentTextJson) => {
4528
4554
  if (!commentTextJson.content?.length) return;
4529
4555
  try {
4556
+ const normalizedContent = normalizeCommentForEditor(commentTextJson);
4557
+ const schemaContent = Array.isArray(normalizedContent) ? normalizedContent[0] : normalizedContent;
4530
4558
  const editor = new Editor({
4531
4559
  mode: "text",
4532
4560
  isHeadless: true,
4533
- content: commentTextJson,
4561
+ content: schemaContent,
4534
4562
  loadFromSchema: true,
4535
4563
  extensions: getRichTextExtensions()
4536
4564
  });
@@ -6602,7 +6630,7 @@ function resolveTo(selector) {
6602
6630
  if (typeof selector === "string") {
6603
6631
  return document.querySelector(selector);
6604
6632
  }
6605
- return selector();
6633
+ return selector() || null;
6606
6634
  }
6607
6635
  const LazyTeleport = defineComponent({
6608
6636
  name: "LazyTeleport",
@@ -6690,8 +6718,11 @@ const oppositeAlignCssPositionProps = {
6690
6718
  };
6691
6719
  const keepOffsetDirection = {
6692
6720
  top: true,
6721
+ // top++
6693
6722
  bottom: false,
6723
+ // top--
6694
6724
  left: true,
6725
+ // left++
6695
6726
  right: false
6696
6727
  // left--
6697
6728
  };
@@ -7808,7 +7839,6 @@ function isFocusable(element) {
7808
7839
  return !!element.href && element.rel !== "ignore";
7809
7840
  case "INPUT":
7810
7841
  return element.type !== "hidden" && element.type !== "file";
7811
- case "BUTTON":
7812
7842
  case "SELECT":
7813
7843
  case "TEXTAREA":
7814
7844
  return true;
@@ -7827,8 +7857,8 @@ const FocusTrap = defineComponent({
7827
7857
  default: true
7828
7858
  },
7829
7859
  onEsc: Function,
7830
- initialFocusTo: String,
7831
- finalFocusTo: String,
7860
+ initialFocusTo: [String, Function],
7861
+ finalFocusTo: [String, Function],
7832
7862
  returnFocusOnDeactivated: {
7833
7863
  type: Boolean,
7834
7864
  default: true
@@ -10611,6 +10641,7 @@ function self$6(vars) {
10611
10641
  });
10612
10642
  }
10613
10643
  const scrollbarLight = {
10644
+ name: "Scrollbar",
10614
10645
  common: derived,
10615
10646
  self: self$6
10616
10647
  };
@@ -12126,11 +12157,14 @@ function self$5(vars) {
12126
12157
  boxShadow: boxShadow2
12127
12158
  });
12128
12159
  }
12129
- const popoverLight = {
12160
+ const popoverLight = createTheme({
12130
12161
  name: "Popover",
12131
12162
  common: derived,
12163
+ peers: {
12164
+ Scrollbar: scrollbarLight
12165
+ },
12132
12166
  self: self$5
12133
- };
12167
+ });
12134
12168
  const oppositePlacement = {
12135
12169
  top: "bottom",
12136
12170
  bottom: "top",
@@ -12350,9 +12384,11 @@ const NPopoverBody = defineComponent({
12350
12384
  const {
12351
12385
  namespaceRef,
12352
12386
  mergedClsPrefixRef,
12353
- inlineThemeDisabled
12387
+ inlineThemeDisabled,
12388
+ mergedRtlRef
12354
12389
  } = useConfig(props);
12355
12390
  const themeRef = useTheme("Popover", "-popover", style$4, popoverLight, props, mergedClsPrefixRef);
12391
+ const rtlEnabledRef = useRtl("Popover", mergedRtlRef, mergedClsPrefixRef);
12356
12392
  const followerRef = ref(null);
12357
12393
  const NPopover2 = inject("NPopover");
12358
12394
  const bodyRef = ref(null);
@@ -12550,6 +12586,8 @@ const NPopoverBody = defineComponent({
12550
12586
  style: props.contentStyle
12551
12587
  }, slots);
12552
12588
  const maybeScrollableBody = props.scrollable ? h(XScrollbar, {
12589
+ themeOverrides: themeRef.value.peerOverrides.Scrollbar,
12590
+ theme: themeRef.value.peers.Scrollbar,
12553
12591
  contentClass: hasHeaderOrFooter ? void 0 : `${mergedClsPrefix}-popover__content ${(_b = props.contentClass) !== null && _b !== void 0 ? _b : ""}`,
12554
12592
  contentStyle: hasHeaderOrFooter ? void 0 : props.contentStyle
12555
12593
  }, {
@@ -12565,7 +12603,7 @@ const NPopoverBody = defineComponent({
12565
12603
  return [maybeScrollableBody, arrow];
12566
12604
  };
12567
12605
  contentNode = h("div", mergeProps({
12568
- class: [`${mergedClsPrefix}-popover`, `${mergedClsPrefix}-popover-shared`, themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass.value, extraClass.map((v) => `${mergedClsPrefix}-${v}`), {
12606
+ class: [`${mergedClsPrefix}-popover`, `${mergedClsPrefix}-popover-shared`, (rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) && `${mergedClsPrefix}-popover--rtl`, themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass.value, extraClass.map((v) => `${mergedClsPrefix}-${v}`), {
12569
12607
  [`${mergedClsPrefix}-popover--scrollable`]: props.scrollable,
12570
12608
  [`${mergedClsPrefix}-popover--show-header-or-footer`]: hasHeaderOrFooter,
12571
12609
  [`${mergedClsPrefix}-popover--raw`]: props.raw,
@@ -12589,7 +12627,7 @@ const NPopoverBody = defineComponent({
12589
12627
  // The popover class and overlap class must exists, they will be used
12590
12628
  // to place the body & transition animation.
12591
12629
  // Shadow class exists for reuse box-shadow.
12592
- [`${mergedClsPrefix}-popover-shared`, themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass.value, props.overlap && `${mergedClsPrefix}-popover-shared--overlap`, props.showArrow && `${mergedClsPrefix}-popover-shared--show-arrow`, props.arrowPointToCenter && `${mergedClsPrefix}-popover-shared--center-arrow`],
12630
+ [`${mergedClsPrefix}-popover-shared`, (rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) && `${mergedClsPrefix}-popover--rtl`, themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass.value, props.overlap && `${mergedClsPrefix}-popover-shared--overlap`, props.showArrow && `${mergedClsPrefix}-popover-shared--show-arrow`, props.arrowPointToCenter && `${mergedClsPrefix}-popover-shared--center-arrow`],
12593
12631
  bodyRef,
12594
12632
  styleRef.value,
12595
12633
  handleMouseEnter,
@@ -15040,7 +15078,8 @@ function self$1(vars) {
15040
15078
  closeIconColorPressedLoading: closeIconColorPressed,
15041
15079
  loadingColor: primaryColor,
15042
15080
  lineHeight: lineHeight2,
15043
- borderRadius
15081
+ borderRadius,
15082
+ border: "0"
15044
15083
  });
15045
15084
  }
15046
15085
  const messageLight = {
@@ -15091,6 +15130,7 @@ const style = c$1([cB("message-wrapper", `
15091
15130
  margin-bottom .3s var(--n-bezier);
15092
15131
  padding: var(--n-padding);
15093
15132
  border-radius: var(--n-border-radius);
15133
+ border: var(--n-border);
15094
15134
  flex-wrap: nowrap;
15095
15135
  overflow: hidden;
15096
15136
  max-width: var(--n-max-width);
@@ -15209,6 +15249,7 @@ const NMessage = defineComponent({
15209
15249
  fontSize: fontSize2,
15210
15250
  lineHeight: lineHeight2,
15211
15251
  borderRadius,
15252
+ border,
15212
15253
  iconColorInfo,
15213
15254
  iconColorSuccess,
15214
15255
  iconColorWarning,
@@ -15252,7 +15293,8 @@ const NMessage = defineComponent({
15252
15293
  "--n-close-icon-color-pressed": closeIconColorPressed,
15253
15294
  "--n-close-icon-color-hover": closeIconColorHover,
15254
15295
  "--n-line-height": lineHeight2,
15255
- "--n-border-radius": borderRadius
15296
+ "--n-border-radius": borderRadius,
15297
+ "--n-border": border
15256
15298
  };
15257
15299
  });
15258
15300
  const themeClassHandle = inlineThemeDisabled ? useThemeClass("message", computed(() => props.type[0]), cssVarsRef, {}) : void 0;
@@ -17350,7 +17392,7 @@ const _sfc_main = {
17350
17392
  __name: "SuperDoc",
17351
17393
  emits: ["selection-update"],
17352
17394
  setup(__props, { emit: __emit }) {
17353
- const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-CbGuPQY8.es.js"));
17395
+ const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-BkXBRXPs.es.js"));
17354
17396
  const superdocStore = useSuperdocStore();
17355
17397
  const commentsStore = useCommentsStore();
17356
17398
  const {
@@ -17994,7 +18036,7 @@ class SuperDoc extends EventEmitter {
17994
18036
  this.config.colors = shuffleArray(this.config.colors);
17995
18037
  this.userColorMap = /* @__PURE__ */ new Map();
17996
18038
  this.colorIndex = 0;
17997
- this.version = "0.21.0-RC2";
18039
+ this.version = "0.20.2";
17998
18040
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
17999
18041
  this.superdocId = config.superdocId || v4();
18000
18042
  this.colors = this.config.colors;