@harbour-enterprises/superdoc 0.18.1-next.1 → 0.18.1-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 (28) hide show
  1. package/dist/chunks/{PdfViewer-D-101zOe.es.js → PdfViewer-BM7Ea3yr.es.js} +1 -1
  2. package/dist/chunks/{PdfViewer-C6YOU13j.cjs → PdfViewer-DPqO7muc.cjs} +1 -1
  3. package/dist/chunks/{index-CQRSKXRT.cjs → index-CPLP-MPz.cjs} +27 -13
  4. package/dist/chunks/{index-DrbaF9yQ.es.js → index-CyUWXfUG.es.js} +27 -13
  5. package/dist/chunks/{super-editor.es-DglJs8Qv.cjs → super-editor.es-BSOX4l_Z.cjs} +8986 -9002
  6. package/dist/chunks/{super-editor.es-C_XaJkxe.es.js → super-editor.es-CzgdqA6a.es.js} +8986 -9002
  7. package/dist/core/SuperDoc.d.ts.map +1 -1
  8. package/dist/style.css +1 -1
  9. package/dist/super-editor/ai-writer.es.js +2 -2
  10. package/dist/super-editor/chunks/{converter-DEwUdN2M.js → converter-X9LxTGJB.js} +33 -33
  11. package/dist/super-editor/chunks/{docx-zipper-C7EwE5md.js → docx-zipper-CAu7OzVm.js} +1 -1
  12. package/dist/super-editor/chunks/{editor-TUGjgpIf.js → editor-BZitQIK-.js} +8965 -8991
  13. package/dist/super-editor/chunks/{toolbar-2VnmJqnu.js → toolbar-D1SFDkxX.js} +23 -13
  14. package/dist/super-editor/converter.es.js +1 -1
  15. package/dist/super-editor/docx-zipper.es.js +2 -2
  16. package/dist/super-editor/editor.es.js +3 -3
  17. package/dist/super-editor/file-zipper.es.js +1 -1
  18. package/dist/super-editor/src/components/toolbar/defaultItems.d.ts +0 -3
  19. package/dist/super-editor/style.css +1 -1
  20. package/dist/super-editor/super-editor.es.js +44 -44
  21. package/dist/super-editor/toolbar.es.js +2 -2
  22. package/dist/super-editor.cjs +1 -1
  23. package/dist/super-editor.es.js +1 -1
  24. package/dist/superdoc.cjs +2 -2
  25. package/dist/superdoc.es.js +2 -2
  26. package/dist/superdoc.umd.js +9072 -9074
  27. package/dist/superdoc.umd.js.map +1 -1
  28. package/package.json +4 -4
@@ -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-DrbaF9yQ.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-CyUWXfUG.es.js";
3
3
  function self(vars) {
4
4
  const {
5
5
  opacityDisabled,
@@ -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-CQRSKXRT.cjs");
4
+ const superdoc = require("./index-CPLP-MPz.cjs");
5
5
  function self(vars) {
6
6
  const {
7
7
  opacityDisabled,
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const superEditor_es = require("./super-editor.es-DglJs8Qv.cjs");
2
+ const superEditor_es = require("./super-editor.es-BSOX4l_Z.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");
@@ -6517,7 +6517,7 @@ function resolveTo(selector) {
6517
6517
  if (typeof selector === "string") {
6518
6518
  return document.querySelector(selector);
6519
6519
  }
6520
- return selector();
6520
+ return selector() || null;
6521
6521
  }
6522
6522
  const LazyTeleport = vue.defineComponent({
6523
6523
  name: "LazyTeleport",
@@ -6605,8 +6605,11 @@ const oppositeAlignCssPositionProps = {
6605
6605
  };
6606
6606
  const keepOffsetDirection = {
6607
6607
  top: true,
6608
+ // top++
6608
6609
  bottom: false,
6610
+ // top--
6609
6611
  left: true,
6612
+ // left++
6610
6613
  right: false
6611
6614
  // left--
6612
6615
  };
@@ -7723,7 +7726,6 @@ function isFocusable(element) {
7723
7726
  return !!element.href && element.rel !== "ignore";
7724
7727
  case "INPUT":
7725
7728
  return element.type !== "hidden" && element.type !== "file";
7726
- case "BUTTON":
7727
7729
  case "SELECT":
7728
7730
  case "TEXTAREA":
7729
7731
  return true;
@@ -7742,8 +7744,8 @@ const FocusTrap = vue.defineComponent({
7742
7744
  default: true
7743
7745
  },
7744
7746
  onEsc: Function,
7745
- initialFocusTo: String,
7746
- finalFocusTo: String,
7747
+ initialFocusTo: [String, Function],
7748
+ finalFocusTo: [String, Function],
7747
7749
  returnFocusOnDeactivated: {
7748
7750
  type: Boolean,
7749
7751
  default: true
@@ -10526,6 +10528,7 @@ function self$6(vars) {
10526
10528
  });
10527
10529
  }
10528
10530
  const scrollbarLight = {
10531
+ name: "Scrollbar",
10529
10532
  common: derived,
10530
10533
  self: self$6
10531
10534
  };
@@ -12041,11 +12044,14 @@ function self$5(vars) {
12041
12044
  boxShadow: boxShadow2
12042
12045
  });
12043
12046
  }
12044
- const popoverLight = {
12047
+ const popoverLight = createTheme({
12045
12048
  name: "Popover",
12046
12049
  common: derived,
12050
+ peers: {
12051
+ Scrollbar: scrollbarLight
12052
+ },
12047
12053
  self: self$5
12048
- };
12054
+ });
12049
12055
  const oppositePlacement = {
12050
12056
  top: "bottom",
12051
12057
  bottom: "top",
@@ -12265,9 +12271,11 @@ const NPopoverBody = vue.defineComponent({
12265
12271
  const {
12266
12272
  namespaceRef,
12267
12273
  mergedClsPrefixRef,
12268
- inlineThemeDisabled
12274
+ inlineThemeDisabled,
12275
+ mergedRtlRef
12269
12276
  } = useConfig(props);
12270
12277
  const themeRef = useTheme("Popover", "-popover", style$4, popoverLight, props, mergedClsPrefixRef);
12278
+ const rtlEnabledRef = useRtl("Popover", mergedRtlRef, mergedClsPrefixRef);
12271
12279
  const followerRef = vue.ref(null);
12272
12280
  const NPopover2 = vue.inject("NPopover");
12273
12281
  const bodyRef = vue.ref(null);
@@ -12465,6 +12473,8 @@ const NPopoverBody = vue.defineComponent({
12465
12473
  style: props.contentStyle
12466
12474
  }, slots);
12467
12475
  const maybeScrollableBody = props.scrollable ? vue.h(XScrollbar, {
12476
+ themeOverrides: themeRef.value.peerOverrides.Scrollbar,
12477
+ theme: themeRef.value.peers.Scrollbar,
12468
12478
  contentClass: hasHeaderOrFooter ? void 0 : `${mergedClsPrefix}-popover__content ${(_b = props.contentClass) !== null && _b !== void 0 ? _b : ""}`,
12469
12479
  contentStyle: hasHeaderOrFooter ? void 0 : props.contentStyle
12470
12480
  }, {
@@ -12480,7 +12490,7 @@ const NPopoverBody = vue.defineComponent({
12480
12490
  return [maybeScrollableBody, arrow];
12481
12491
  };
12482
12492
  contentNode = vue.h("div", vue.mergeProps({
12483
- class: [`${mergedClsPrefix}-popover`, `${mergedClsPrefix}-popover-shared`, themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass.value, extraClass.map((v) => `${mergedClsPrefix}-${v}`), {
12493
+ 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}`), {
12484
12494
  [`${mergedClsPrefix}-popover--scrollable`]: props.scrollable,
12485
12495
  [`${mergedClsPrefix}-popover--show-header-or-footer`]: hasHeaderOrFooter,
12486
12496
  [`${mergedClsPrefix}-popover--raw`]: props.raw,
@@ -12504,7 +12514,7 @@ const NPopoverBody = vue.defineComponent({
12504
12514
  // The popover class and overlap class must exists, they will be used
12505
12515
  // to place the body & transition animation.
12506
12516
  // Shadow class exists for reuse box-shadow.
12507
- [`${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`],
12517
+ [`${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`],
12508
12518
  bodyRef,
12509
12519
  styleRef.value,
12510
12520
  handleMouseEnter,
@@ -14955,7 +14965,8 @@ function self$1(vars) {
14955
14965
  closeIconColorPressedLoading: closeIconColorPressed,
14956
14966
  loadingColor: primaryColor,
14957
14967
  lineHeight: lineHeight2,
14958
- borderRadius
14968
+ borderRadius,
14969
+ border: "0"
14959
14970
  });
14960
14971
  }
14961
14972
  const messageLight = {
@@ -15006,6 +15017,7 @@ const style = c$1([cB("message-wrapper", `
15006
15017
  margin-bottom .3s var(--n-bezier);
15007
15018
  padding: var(--n-padding);
15008
15019
  border-radius: var(--n-border-radius);
15020
+ border: var(--n-border);
15009
15021
  flex-wrap: nowrap;
15010
15022
  overflow: hidden;
15011
15023
  max-width: var(--n-max-width);
@@ -15124,6 +15136,7 @@ const NMessage = vue.defineComponent({
15124
15136
  fontSize: fontSize2,
15125
15137
  lineHeight: lineHeight2,
15126
15138
  borderRadius,
15139
+ border,
15127
15140
  iconColorInfo,
15128
15141
  iconColorSuccess,
15129
15142
  iconColorWarning,
@@ -15167,7 +15180,8 @@ const NMessage = vue.defineComponent({
15167
15180
  "--n-close-icon-color-pressed": closeIconColorPressed,
15168
15181
  "--n-close-icon-color-hover": closeIconColorHover,
15169
15182
  "--n-line-height": lineHeight2,
15170
- "--n-border-radius": borderRadius
15183
+ "--n-border-radius": borderRadius,
15184
+ "--n-border": border
15171
15185
  };
15172
15186
  });
15173
15187
  const themeClassHandle = inlineThemeDisabled ? useThemeClass("message", vue.computed(() => props.type[0]), cssVarsRef, {}) : void 0;
@@ -17265,7 +17279,7 @@ const _sfc_main = {
17265
17279
  __name: "SuperDoc",
17266
17280
  emits: ["selection-update"],
17267
17281
  setup(__props, { emit: __emit }) {
17268
- const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-C6YOU13j.cjs")));
17282
+ const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-DPqO7muc.cjs")));
17269
17283
  const superdocStore = useSuperdocStore();
17270
17284
  const commentsStore = useCommentsStore();
17271
17285
  const {
@@ -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-C_XaJkxe.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-CzgdqA6a.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";
@@ -6500,7 +6500,7 @@ function resolveTo(selector) {
6500
6500
  if (typeof selector === "string") {
6501
6501
  return document.querySelector(selector);
6502
6502
  }
6503
- return selector();
6503
+ return selector() || null;
6504
6504
  }
6505
6505
  const LazyTeleport = defineComponent({
6506
6506
  name: "LazyTeleport",
@@ -6588,8 +6588,11 @@ const oppositeAlignCssPositionProps = {
6588
6588
  };
6589
6589
  const keepOffsetDirection = {
6590
6590
  top: true,
6591
+ // top++
6591
6592
  bottom: false,
6593
+ // top--
6592
6594
  left: true,
6595
+ // left++
6593
6596
  right: false
6594
6597
  // left--
6595
6598
  };
@@ -7706,7 +7709,6 @@ function isFocusable(element) {
7706
7709
  return !!element.href && element.rel !== "ignore";
7707
7710
  case "INPUT":
7708
7711
  return element.type !== "hidden" && element.type !== "file";
7709
- case "BUTTON":
7710
7712
  case "SELECT":
7711
7713
  case "TEXTAREA":
7712
7714
  return true;
@@ -7725,8 +7727,8 @@ const FocusTrap = defineComponent({
7725
7727
  default: true
7726
7728
  },
7727
7729
  onEsc: Function,
7728
- initialFocusTo: String,
7729
- finalFocusTo: String,
7730
+ initialFocusTo: [String, Function],
7731
+ finalFocusTo: [String, Function],
7730
7732
  returnFocusOnDeactivated: {
7731
7733
  type: Boolean,
7732
7734
  default: true
@@ -10509,6 +10511,7 @@ function self$6(vars) {
10509
10511
  });
10510
10512
  }
10511
10513
  const scrollbarLight = {
10514
+ name: "Scrollbar",
10512
10515
  common: derived,
10513
10516
  self: self$6
10514
10517
  };
@@ -12024,11 +12027,14 @@ function self$5(vars) {
12024
12027
  boxShadow: boxShadow2
12025
12028
  });
12026
12029
  }
12027
- const popoverLight = {
12030
+ const popoverLight = createTheme({
12028
12031
  name: "Popover",
12029
12032
  common: derived,
12033
+ peers: {
12034
+ Scrollbar: scrollbarLight
12035
+ },
12030
12036
  self: self$5
12031
- };
12037
+ });
12032
12038
  const oppositePlacement = {
12033
12039
  top: "bottom",
12034
12040
  bottom: "top",
@@ -12248,9 +12254,11 @@ const NPopoverBody = defineComponent({
12248
12254
  const {
12249
12255
  namespaceRef,
12250
12256
  mergedClsPrefixRef,
12251
- inlineThemeDisabled
12257
+ inlineThemeDisabled,
12258
+ mergedRtlRef
12252
12259
  } = useConfig(props);
12253
12260
  const themeRef = useTheme("Popover", "-popover", style$4, popoverLight, props, mergedClsPrefixRef);
12261
+ const rtlEnabledRef = useRtl("Popover", mergedRtlRef, mergedClsPrefixRef);
12254
12262
  const followerRef = ref(null);
12255
12263
  const NPopover2 = inject("NPopover");
12256
12264
  const bodyRef = ref(null);
@@ -12448,6 +12456,8 @@ const NPopoverBody = defineComponent({
12448
12456
  style: props.contentStyle
12449
12457
  }, slots);
12450
12458
  const maybeScrollableBody = props.scrollable ? h(XScrollbar, {
12459
+ themeOverrides: themeRef.value.peerOverrides.Scrollbar,
12460
+ theme: themeRef.value.peers.Scrollbar,
12451
12461
  contentClass: hasHeaderOrFooter ? void 0 : `${mergedClsPrefix}-popover__content ${(_b = props.contentClass) !== null && _b !== void 0 ? _b : ""}`,
12452
12462
  contentStyle: hasHeaderOrFooter ? void 0 : props.contentStyle
12453
12463
  }, {
@@ -12463,7 +12473,7 @@ const NPopoverBody = defineComponent({
12463
12473
  return [maybeScrollableBody, arrow];
12464
12474
  };
12465
12475
  contentNode = h("div", mergeProps({
12466
- class: [`${mergedClsPrefix}-popover`, `${mergedClsPrefix}-popover-shared`, themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass.value, extraClass.map((v) => `${mergedClsPrefix}-${v}`), {
12476
+ 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}`), {
12467
12477
  [`${mergedClsPrefix}-popover--scrollable`]: props.scrollable,
12468
12478
  [`${mergedClsPrefix}-popover--show-header-or-footer`]: hasHeaderOrFooter,
12469
12479
  [`${mergedClsPrefix}-popover--raw`]: props.raw,
@@ -12487,7 +12497,7 @@ const NPopoverBody = defineComponent({
12487
12497
  // The popover class and overlap class must exists, they will be used
12488
12498
  // to place the body & transition animation.
12489
12499
  // Shadow class exists for reuse box-shadow.
12490
- [`${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`],
12500
+ [`${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`],
12491
12501
  bodyRef,
12492
12502
  styleRef.value,
12493
12503
  handleMouseEnter,
@@ -14938,7 +14948,8 @@ function self$1(vars) {
14938
14948
  closeIconColorPressedLoading: closeIconColorPressed,
14939
14949
  loadingColor: primaryColor,
14940
14950
  lineHeight: lineHeight2,
14941
- borderRadius
14951
+ borderRadius,
14952
+ border: "0"
14942
14953
  });
14943
14954
  }
14944
14955
  const messageLight = {
@@ -14989,6 +15000,7 @@ const style = c$1([cB("message-wrapper", `
14989
15000
  margin-bottom .3s var(--n-bezier);
14990
15001
  padding: var(--n-padding);
14991
15002
  border-radius: var(--n-border-radius);
15003
+ border: var(--n-border);
14992
15004
  flex-wrap: nowrap;
14993
15005
  overflow: hidden;
14994
15006
  max-width: var(--n-max-width);
@@ -15107,6 +15119,7 @@ const NMessage = defineComponent({
15107
15119
  fontSize: fontSize2,
15108
15120
  lineHeight: lineHeight2,
15109
15121
  borderRadius,
15122
+ border,
15110
15123
  iconColorInfo,
15111
15124
  iconColorSuccess,
15112
15125
  iconColorWarning,
@@ -15150,7 +15163,8 @@ const NMessage = defineComponent({
15150
15163
  "--n-close-icon-color-pressed": closeIconColorPressed,
15151
15164
  "--n-close-icon-color-hover": closeIconColorHover,
15152
15165
  "--n-line-height": lineHeight2,
15153
- "--n-border-radius": borderRadius
15166
+ "--n-border-radius": borderRadius,
15167
+ "--n-border": border
15154
15168
  };
15155
15169
  });
15156
15170
  const themeClassHandle = inlineThemeDisabled ? useThemeClass("message", computed(() => props.type[0]), cssVarsRef, {}) : void 0;
@@ -17248,7 +17262,7 @@ const _sfc_main = {
17248
17262
  __name: "SuperDoc",
17249
17263
  emits: ["selection-update"],
17250
17264
  setup(__props, { emit: __emit }) {
17251
- const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-D-101zOe.es.js"));
17265
+ const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-BM7Ea3yr.es.js"));
17252
17266
  const superdocStore = useSuperdocStore();
17253
17267
  const commentsStore = useCommentsStore();
17254
17268
  const {