@vc-shell/framework 1.1.62 → 1.1.64

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 (115) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/core/composables/useLanguages/index.ts +16 -73
  3. package/core/services/index.ts +1 -0
  4. package/core/services/language-service.ts +88 -0
  5. package/dist/core/composables/useLanguages/index.d.ts +4 -15
  6. package/dist/core/composables/useLanguages/index.d.ts.map +1 -1
  7. package/dist/core/services/index.d.ts +1 -0
  8. package/dist/core/services/index.d.ts.map +1 -1
  9. package/dist/core/services/language-service.d.ts +15 -0
  10. package/dist/core/services/language-service.d.ts.map +1 -0
  11. package/dist/framework.js +6038 -6021
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/injection-keys.d.ts +2 -1
  14. package/dist/injection-keys.d.ts.map +1 -1
  15. package/dist/shared/components/language-selector/language-selector.vue.d.ts.map +1 -1
  16. package/dist/tsconfig.tsbuildinfo +1 -1
  17. package/dist/vendor-boolbase-A_-Pp38P.js +23 -0
  18. package/dist/{vendor-cheerio-CleDsuQZ.js → vendor-cheerio-C46iBpCu.js} +10 -10
  19. package/dist/{vendor-cheerio-select-CVkYl3Z-.js → vendor-cheerio-select-C8emRZsx.js} +5 -5
  20. package/dist/vendor-core-js-DFA7rceR.js +1206 -0
  21. package/dist/{vendor-css-select-CtIzVIiG.js → vendor-css-select-DR9bp36p.js} +3 -3
  22. package/dist/{vendor-dom-serializer-CugO0RdN.js → vendor-dom-serializer-Sk3xHhQk.js} +1 -1
  23. package/dist/{vendor-domutils-D3Y2YQFR.js → vendor-domutils-BiVCXO8c.js} +2 -2
  24. package/dist/{vendor-entities-v26HW8wW.js → vendor-entities-CCReaWqU.js} +35 -34
  25. package/dist/{vendor-floating-ui-core-C9uEvi1M.js → vendor-floating-ui-core-DpX2jufl.js} +10 -10
  26. package/dist/{vendor-floating-ui-dom-CZkYGmv4.js → vendor-floating-ui-dom-C4AKN5Mo.js} +8 -8
  27. package/dist/{vendor-floating-ui-utils-Bx3BTd6_.js → vendor-floating-ui-utils-CRaCuFxS.js} +29 -29
  28. package/dist/{vendor-floating-ui-vue-CLOiVYP7.js → vendor-floating-ui-vue-OwtolkBv.js} +12 -12
  29. package/dist/{vendor-htmlparser2-CXL_uhMI.js → vendor-htmlparser2-CpQu33io.js} +1 -1
  30. package/dist/{vendor-intlify-core-base-FyGSkd6r.js → vendor-intlify-core-base-txnziOTW.js} +9 -9
  31. package/dist/{vendor-intlify-message-compiler-D_vL9-DK.js → vendor-intlify-message-compiler-XquMv3aB.js} +5 -3
  32. package/dist/{vendor-intlify-shared-BMbzEQSk.js → vendor-intlify-shared-CE1Dfvjf.js} +11 -11
  33. package/dist/{vendor-iso-639-1-dVGfSUIM.js → vendor-iso-639-1-BJO6WZAt.js} +3 -3
  34. package/dist/{vendor-markdown-it-4AJoRTAg.js → vendor-markdown-it-RJo-N9ov.js} +1 -1
  35. package/dist/{vendor-markdown-it-task-lists-Byg1-ms9.js → vendor-markdown-it-task-lists-BxLwscWK.js} +2 -2
  36. package/dist/{vendor-microsoft-applicationinsights-analytics-js-DA-ctcAL.js → vendor-microsoft-applicationinsights-analytics-js-CauId95v.js} +5 -5
  37. package/dist/{vendor-microsoft-applicationinsights-cfgsync-js-COfRj-2q.js → vendor-microsoft-applicationinsights-cfgsync-js-DGfB75It.js} +3 -3
  38. package/dist/{vendor-microsoft-applicationinsights-channel-js-MTPYhH-I.js → vendor-microsoft-applicationinsights-channel-js-B4PYlGv8.js} +11 -11
  39. package/dist/{vendor-microsoft-applicationinsights-common-CDVnJ6MR.js → vendor-microsoft-applicationinsights-common-Bj6sQeoz.js} +7 -7
  40. package/dist/{vendor-microsoft-applicationinsights-core-js-D7Aicf8S.js → vendor-microsoft-applicationinsights-core-js-Cga21Mpw.js} +13 -13
  41. package/dist/{vendor-microsoft-applicationinsights-dependencies-js-CvQWWraU.js → vendor-microsoft-applicationinsights-dependencies-js-CH87Sln6.js} +68 -68
  42. package/dist/{vendor-microsoft-applicationinsights-properties-js-C0Iv1cZE.js → vendor-microsoft-applicationinsights-properties-js-CLE2OEt_.js} +5 -5
  43. package/dist/{vendor-microsoft-applicationinsights-web-BRuQAzjU.js → vendor-microsoft-applicationinsights-web-8IaeIl22.js} +8 -8
  44. package/dist/{vendor-nevware21-ts-async-FAyg3c9V.js → vendor-nevware21-ts-async-DadHEt7N.js} +3 -3
  45. package/dist/{vendor-nth-check-BE7AeBMg.js → vendor-nth-check-CS1D-zr5.js} +1 -1
  46. package/dist/{vendor-parse5-htmlparser2-tree-adapter-CNubfdOP.js → vendor-parse5-htmlparser2-tree-adapter-BWywtwol.js} +9 -9
  47. package/dist/{vendor-parse5-DqztJOGh.js → vendor-parse5-zq5Hn0y9.js} +3 -1
  48. package/dist/{vendor-prettier-D8C9GG-0.js → vendor-prettier-DaiSFsWE.js} +1184 -1167
  49. package/dist/vendor-prosemirror-commands-B8fhFbTo.js +385 -0
  50. package/dist/{vendor-prosemirror-dropcursor-CwZhBUcZ.js → vendor-prosemirror-dropcursor-CdHQ9kQG.js} +2 -2
  51. package/dist/{vendor-prosemirror-gapcursor-COcwb4TJ.js → vendor-prosemirror-gapcursor-W-ky5QTm.js} +4 -4
  52. package/dist/{vendor-prosemirror-history-DmPvdOpr.js → vendor-prosemirror-history-CrtTR5Cd.js} +2 -2
  53. package/dist/{vendor-prosemirror-keymap-CS1uIBpE.js → vendor-prosemirror-keymap-DWvoDWf6.js} +1 -1
  54. package/dist/{vendor-prosemirror-markdown-sO1Pn6SW.js → vendor-prosemirror-markdown-CuzWQ2N6.js} +2 -2
  55. package/dist/{vendor-prosemirror-model-DwojkhDQ.js → vendor-prosemirror-model-CVTn1Stc.js} +2 -2
  56. package/dist/{vendor-prosemirror-schema-list-rrOzMlj0.js → vendor-prosemirror-schema-list-Ds6x_KLX.js} +2 -2
  57. package/dist/{vendor-prosemirror-state-BN86J-Ko.js → vendor-prosemirror-state-CRUasa1V.js} +2 -2
  58. package/dist/{vendor-prosemirror-tables-C7XMqyon.js → vendor-prosemirror-tables-DzTfCeHX.js} +5 -5
  59. package/dist/{vendor-prosemirror-transform-B0c_LAV_.js → vendor-prosemirror-transform-BeDaI3CS.js} +1 -1
  60. package/dist/{vendor-prosemirror-view-DyWzmy4t.js → vendor-prosemirror-view-BGYdOWiJ.js} +76 -74
  61. package/dist/{vendor-semver-BoKYtkQw.js → vendor-semver-FuwqpOls.js} +435 -435
  62. package/dist/vendor-tanstack-vue-virtual-CD9yLWd7.js +1 -0
  63. package/dist/{vendor-tippy-js-BGdgwGX-.js → vendor-tippy-js-nNhcw_JH.js} +15 -15
  64. package/dist/{vendor-tiptap-core-BgwY40dr.js → vendor-tiptap-core-dlTW4S11.js} +76 -65
  65. package/dist/{vendor-tiptap-extension-blockquote-BVW0VVC0.js → vendor-tiptap-extension-blockquote-iAIM-meW.js} +1 -1
  66. package/dist/{vendor-tiptap-extension-bold-xhi5xxPT.js → vendor-tiptap-extension-bold-bkOLNH6E.js} +1 -1
  67. package/dist/{vendor-tiptap-extension-bubble-menu-DhWtcCL3.js → vendor-tiptap-extension-bubble-menu-BRWVLpun.js} +6 -6
  68. package/dist/{vendor-tiptap-extension-bullet-list-Ba21suMY.js → vendor-tiptap-extension-bullet-list-DfU428XB.js} +1 -1
  69. package/dist/{vendor-tiptap-extension-code-DFTxp7wE.js → vendor-tiptap-extension-code-CgIql8q6.js} +1 -1
  70. package/dist/{vendor-tiptap-extension-code-block-B2KK5g8S.js → vendor-tiptap-extension-code-block-V26-erQk.js} +2 -2
  71. package/dist/{vendor-tiptap-extension-document-CW8jybcc.js → vendor-tiptap-extension-document-BYF_BzDD.js} +1 -1
  72. package/dist/{vendor-tiptap-extension-dropcursor-DdRuETKJ.js → vendor-tiptap-extension-dropcursor-DqjaaFex.js} +2 -2
  73. package/dist/{vendor-tiptap-extension-floating-menu-Da7fpnr7.js → vendor-tiptap-extension-floating-menu-vptdm_Y0.js} +6 -6
  74. package/dist/{vendor-tiptap-extension-gapcursor-CafmhWSf.js → vendor-tiptap-extension-gapcursor-DxLBw8V0.js} +2 -2
  75. package/dist/{vendor-tiptap-extension-hard-break-n9aI6ybJ.js → vendor-tiptap-extension-hard-break-DygHhzqw.js} +1 -1
  76. package/dist/{vendor-tiptap-extension-heading-xj24usOy.js → vendor-tiptap-extension-heading-C-ArDc3_.js} +1 -1
  77. package/dist/{vendor-tiptap-extension-history-C2uOLua2.js → vendor-tiptap-extension-history-C41RW3Bv.js} +2 -2
  78. package/dist/{vendor-tiptap-extension-horizontal-rule--uXIYeaK.js → vendor-tiptap-extension-horizontal-rule-BGMGd9fo.js} +2 -2
  79. package/dist/{vendor-tiptap-extension-image-BJx5lyoG.js → vendor-tiptap-extension-image-DChcWb4v.js} +1 -1
  80. package/dist/{vendor-tiptap-extension-italic-DPAViC4y.js → vendor-tiptap-extension-italic-BNJrFvrR.js} +1 -1
  81. package/dist/{vendor-tiptap-extension-link-aDGmrWTi.js → vendor-tiptap-extension-link-DFN4ENph.js} +2 -2
  82. package/dist/{vendor-tiptap-extension-list-item-DE9dJ64Q.js → vendor-tiptap-extension-list-item-3qKYhGHe.js} +1 -1
  83. package/dist/{vendor-tiptap-extension-ordered-list-CcNtDDJm.js → vendor-tiptap-extension-ordered-list-D3QL0eiW.js} +1 -1
  84. package/dist/{vendor-tiptap-extension-paragraph-DvlrAzIW.js → vendor-tiptap-extension-paragraph-DZfkaJJ-.js} +1 -1
  85. package/dist/{vendor-tiptap-extension-placeholder-DyW7px66.js → vendor-tiptap-extension-placeholder-CoOAmd0a.js} +7 -7
  86. package/dist/{vendor-tiptap-extension-strike-DMMLEFkd.js → vendor-tiptap-extension-strike-BlGNozxy.js} +1 -1
  87. package/dist/{vendor-tiptap-extension-table-BpegTABL.js → vendor-tiptap-extension-table-CZn6Xykb.js} +16 -16
  88. package/dist/{vendor-tiptap-extension-table-cell-8rHRq4BW.js → vendor-tiptap-extension-table-cell-BQuS-XFD.js} +1 -1
  89. package/dist/{vendor-tiptap-extension-table-header-DZ1y7iS2.js → vendor-tiptap-extension-table-header-ZrtK7HiQ.js} +1 -1
  90. package/dist/{vendor-tiptap-extension-table-row-DmkNUw4L.js → vendor-tiptap-extension-table-row-CBrXvqsO.js} +1 -1
  91. package/dist/{vendor-tiptap-extension-text-Cwas3TQT.js → vendor-tiptap-extension-text-DwA7jrBq.js} +1 -1
  92. package/dist/{vendor-tiptap-extension-underline-Hz5uJRfR.js → vendor-tiptap-extension-underline-CIVtuRLl.js} +1 -1
  93. package/dist/{vendor-tiptap-markdown-Dj1XZWg4.js → vendor-tiptap-markdown-CidDIpZ-.js} +12 -11
  94. package/dist/vendor-tiptap-pm-9TOy65Oe.js +1 -0
  95. package/dist/{vendor-tiptap-starter-kit-Cxj07T7v.js → vendor-tiptap-starter-kit-BdU6UtqB.js} +19 -19
  96. package/dist/{vendor-tiptap-vue-3-DF4kzEFI.js → vendor-tiptap-vue-3-CnYccgV4.js} +3 -3
  97. package/dist/{vendor-truncate-html-Bx1HJzRq.js → vendor-truncate-html-DYC0Lj9o.js} +1 -1
  98. package/dist/{vendor-vee-validate-rules-DDeNM2Gc.js → vendor-vee-validate-rules-4oWUZPpG.js} +4 -2
  99. package/dist/{vendor-vue-currency-input-DxWnS-HB.js → vendor-vue-currency-input-BqaYAdhD.js} +88 -86
  100. package/dist/vendor-vue-demi-CD9yLWd7.js +1 -0
  101. package/dist/{vendor-vue-i18n-DC6m6S7G.js → vendor-vue-i18n-BeXi5L3e.js} +423 -412
  102. package/dist/{vendor-vue3-application-insights-dAGGfA_M.js → vendor-vue3-application-insights-C8xbxXXX.js} +2 -2
  103. package/dist/{vendor-vuepic-vue-datepicker-_JffV5We.js → vendor-vuepic-vue-datepicker-DkHsqyoL.js} +257 -257
  104. package/dist/vendor-vueuse-components-B0zqjNRW.js +542 -0
  105. package/dist/{vendor-vueuse-core-cB-c7DzH.js → vendor-vueuse-core-CYgwn-B2.js} +31 -30
  106. package/dist/{vendor-vueuse-shared-Dg7PMM0z.js → vendor-vueuse-shared-B_uDJJ6V.js} +33 -33
  107. package/package.json +5 -5
  108. package/shared/components/language-selector/language-selector.vue +16 -8
  109. package/dist/vendor-boolbase-Bgn9I6iN.js +0 -21
  110. package/dist/vendor-core-js-l0sNRNKZ.js +0 -1
  111. package/dist/vendor-prosemirror-commands-C6teL3Xo.js +0 -344
  112. package/dist/vendor-tanstack-vue-virtual-l0sNRNKZ.js +0 -1
  113. package/dist/vendor-tiptap-pm-l0sNRNKZ.js +0 -1
  114. package/dist/vendor-vue-demi-l0sNRNKZ.js +0 -1
  115. package/dist/vendor-vueuse-components-DtK_mxpP.js +0 -219
@@ -1,344 +0,0 @@
1
- import { f as D, c as E, l as y, a as T, j as R, r as h, R as q, b as j } from "./vendor-prosemirror-transform-B0c_LAV_.js";
2
- import { S, F as x } from "./vendor-prosemirror-model-DwojkhDQ.js";
3
- import { T as C, N as a, S as A, A as $ } from "./vendor-prosemirror-state-BN86J-Ko.js";
4
- const K = (t, e) => t.selection.empty ? !1 : (e && e(t.tr.deleteSelection().scrollIntoView()), !0);
5
- function F(t, e) {
6
- let { $cursor: r } = t.selection;
7
- return !r || (e ? !e.endOfTextblock("backward", t) : r.parentOffset > 0) ? null : r;
8
- }
9
- const L = (t, e, r) => {
10
- let o = F(t, r);
11
- if (!o)
12
- return !1;
13
- let n = z(o);
14
- if (!n) {
15
- let i = o.blockRange(), f = i && y(i);
16
- return f == null ? !1 : (e && e(t.tr.lift(i, f).scrollIntoView()), !0);
17
- }
18
- let l = n.nodeBefore;
19
- if (M(t, n, e, -1))
20
- return !0;
21
- if (o.parent.content.size == 0 && (w(l, "end") || a.isSelectable(l)))
22
- for (let i = o.depth; ; i--) {
23
- let f = h(t.doc, o.before(i), o.after(i), S.empty);
24
- if (f && f.slice.size < f.to - f.from) {
25
- if (e) {
26
- let c = t.tr.step(f);
27
- c.setSelection(w(l, "end") ? A.findFrom(c.doc.resolve(c.mapping.map(n.pos, -1)), -1) : a.create(c.doc, n.pos - l.nodeSize)), e(c.scrollIntoView());
28
- }
29
- return !0;
30
- }
31
- if (i == 1 || o.node(i - 1).childCount > 1)
32
- break;
33
- }
34
- return l.isAtom && n.depth == o.depth - 1 ? (e && e(t.tr.delete(n.pos - l.nodeSize, n.pos).scrollIntoView()), !0) : !1;
35
- }, Q = (t, e, r) => {
36
- let o = F(t, r);
37
- if (!o)
38
- return !1;
39
- let n = z(o);
40
- return n ? O(t, n, e) : !1;
41
- }, X = (t, e, r) => {
42
- let o = v(t, r);
43
- if (!o)
44
- return !1;
45
- let n = B(o);
46
- return n ? O(t, n, e) : !1;
47
- };
48
- function O(t, e, r) {
49
- let o = e.nodeBefore, n = o, l = e.pos - 1;
50
- for (; !n.isTextblock; l--) {
51
- if (n.type.spec.isolating)
52
- return !1;
53
- let s = n.lastChild;
54
- if (!s)
55
- return !1;
56
- n = s;
57
- }
58
- let i = e.nodeAfter, f = i, c = e.pos + 1;
59
- for (; !f.isTextblock; c++) {
60
- if (f.type.spec.isolating)
61
- return !1;
62
- let s = f.firstChild;
63
- if (!s)
64
- return !1;
65
- f = s;
66
- }
67
- let p = h(t.doc, l, c, S.empty);
68
- if (!p || p.from != l || p instanceof q && p.slice.size >= c - l)
69
- return !1;
70
- if (r) {
71
- let s = t.tr.step(p);
72
- s.setSelection(C.create(s.doc, l)), r(s.scrollIntoView());
73
- }
74
- return !0;
75
- }
76
- function w(t, e, r = !1) {
77
- for (let o = t; o; o = e == "start" ? o.firstChild : o.lastChild) {
78
- if (o.isTextblock)
79
- return !0;
80
- if (r && o.childCount != 1)
81
- return !1;
82
- }
83
- return !1;
84
- }
85
- const Y = (t, e, r) => {
86
- let { $head: o, empty: n } = t.selection, l = o;
87
- if (!n)
88
- return !1;
89
- if (o.parent.isTextblock) {
90
- if (r ? !r.endOfTextblock("backward", t) : o.parentOffset > 0)
91
- return !1;
92
- l = z(o);
93
- }
94
- let i = l && l.nodeBefore;
95
- return !i || !a.isSelectable(i) ? !1 : (e && e(t.tr.setSelection(a.create(t.doc, l.pos - i.nodeSize)).scrollIntoView()), !0);
96
- };
97
- function z(t) {
98
- if (!t.parent.type.spec.isolating)
99
- for (let e = t.depth - 1; e >= 0; e--) {
100
- if (t.index(e) > 0)
101
- return t.doc.resolve(t.before(e + 1));
102
- if (t.node(e).type.spec.isolating)
103
- break;
104
- }
105
- return null;
106
- }
107
- function v(t, e) {
108
- let { $cursor: r } = t.selection;
109
- return !r || (e ? !e.endOfTextblock("forward", t) : r.parentOffset < r.parent.content.size) ? null : r;
110
- }
111
- const Z = (t, e, r) => {
112
- let o = v(t, r);
113
- if (!o)
114
- return !1;
115
- let n = B(o);
116
- if (!n)
117
- return !1;
118
- let l = n.nodeAfter;
119
- if (M(t, n, e, 1))
120
- return !0;
121
- if (o.parent.content.size == 0 && (w(l, "start") || a.isSelectable(l))) {
122
- let i = h(t.doc, o.before(), o.after(), S.empty);
123
- if (i && i.slice.size < i.to - i.from) {
124
- if (e) {
125
- let f = t.tr.step(i);
126
- f.setSelection(w(l, "start") ? A.findFrom(f.doc.resolve(f.mapping.map(n.pos)), 1) : a.create(f.doc, f.mapping.map(n.pos))), e(f.scrollIntoView());
127
- }
128
- return !0;
129
- }
130
- }
131
- return l.isAtom && n.depth == o.depth - 1 ? (e && e(t.tr.delete(n.pos, n.pos + l.nodeSize).scrollIntoView()), !0) : !1;
132
- }, _ = (t, e, r) => {
133
- let { $head: o, empty: n } = t.selection, l = o;
134
- if (!n)
135
- return !1;
136
- if (o.parent.isTextblock) {
137
- if (r ? !r.endOfTextblock("forward", t) : o.parentOffset < o.parent.content.size)
138
- return !1;
139
- l = B(o);
140
- }
141
- let i = l && l.nodeAfter;
142
- return !i || !a.isSelectable(i) ? !1 : (e && e(t.tr.setSelection(a.create(t.doc, l.pos)).scrollIntoView()), !0);
143
- };
144
- function B(t) {
145
- if (!t.parent.type.spec.isolating)
146
- for (let e = t.depth - 1; e >= 0; e--) {
147
- let r = t.node(e);
148
- if (t.index(e) + 1 < r.childCount)
149
- return t.doc.resolve(t.after(e + 1));
150
- if (r.type.spec.isolating)
151
- break;
152
- }
153
- return null;
154
- }
155
- const ee = (t, e) => {
156
- let r = t.selection, o = r instanceof a, n;
157
- if (o) {
158
- if (r.node.isTextblock || !T(t.doc, r.from))
159
- return !1;
160
- n = r.from;
161
- } else if (n = R(t.doc, r.from, -1), n == null)
162
- return !1;
163
- if (e) {
164
- let l = t.tr.join(n);
165
- o && l.setSelection(a.create(l.doc, n - t.doc.resolve(n).nodeBefore.nodeSize)), e(l.scrollIntoView());
166
- }
167
- return !0;
168
- }, te = (t, e) => {
169
- let r = t.selection, o;
170
- if (r instanceof a) {
171
- if (r.node.isTextblock || !T(t.doc, r.to))
172
- return !1;
173
- o = r.to;
174
- } else if (o = R(t.doc, r.to, 1), o == null)
175
- return !1;
176
- return e && e(t.tr.join(o).scrollIntoView()), !0;
177
- }, re = (t, e) => {
178
- let { $from: r, $to: o } = t.selection, n = r.blockRange(o), l = n && y(n);
179
- return l == null ? !1 : (e && e(t.tr.lift(n, l).scrollIntoView()), !0);
180
- }, ne = (t, e) => {
181
- let { $head: r, $anchor: o } = t.selection;
182
- return !r.parent.type.spec.code || !r.sameParent(o) ? !1 : (e && e(t.tr.insertText(`
183
- `).scrollIntoView()), !0);
184
- };
185
- function P(t) {
186
- for (let e = 0; e < t.edgeCount; e++) {
187
- let { type: r } = t.edge(e);
188
- if (r.isTextblock && !r.hasRequiredAttrs())
189
- return r;
190
- }
191
- return null;
192
- }
193
- const oe = (t, e) => {
194
- let { $head: r, $anchor: o } = t.selection;
195
- if (!r.parent.type.spec.code || !r.sameParent(o))
196
- return !1;
197
- let n = r.node(-1), l = r.indexAfter(-1), i = P(n.contentMatchAt(l));
198
- if (!i || !n.canReplaceWith(l, l, i))
199
- return !1;
200
- if (e) {
201
- let f = r.after(), c = t.tr.replaceWith(f, f, i.createAndFill());
202
- c.setSelection(A.near(c.doc.resolve(f), 1)), e(c.scrollIntoView());
203
- }
204
- return !0;
205
- }, le = (t, e) => {
206
- let r = t.selection, { $from: o, $to: n } = r;
207
- if (r instanceof $ || o.parent.inlineContent || n.parent.inlineContent)
208
- return !1;
209
- let l = P(n.parent.contentMatchAt(n.indexAfter()));
210
- if (!l || !l.isTextblock)
211
- return !1;
212
- if (e) {
213
- let i = (!o.parentOffset && n.index() < n.parent.childCount ? o : n).pos, f = t.tr.insert(i, l.createAndFill());
214
- f.setSelection(C.create(f.doc, i + 1)), e(f.scrollIntoView());
215
- }
216
- return !0;
217
- }, ie = (t, e) => {
218
- let { $cursor: r } = t.selection;
219
- if (!r || r.parent.content.size)
220
- return !1;
221
- if (r.depth > 1 && r.after() != r.end(-1)) {
222
- let l = r.before();
223
- if (E(t.doc, l))
224
- return e && e(t.tr.split(l).scrollIntoView()), !0;
225
- }
226
- let o = r.blockRange(), n = o && y(o);
227
- return n == null ? !1 : (e && e(t.tr.lift(o, n).scrollIntoView()), !0);
228
- }, fe = (t, e) => {
229
- let { $from: r, to: o } = t.selection, n, l = r.sharedDepth(o);
230
- return l == 0 ? !1 : (n = r.before(l), e && e(t.tr.setSelection(a.create(t.doc, n))), !0);
231
- };
232
- function J(t, e, r) {
233
- let o = e.nodeBefore, n = e.nodeAfter, l = e.index();
234
- return !o || !n || !o.type.compatibleContent(n.type) ? !1 : !o.content.size && e.parent.canReplace(l - 1, l) ? (r && r(t.tr.delete(e.pos - o.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(l, l + 1) || !(n.isTextblock || T(t.doc, e.pos)) ? !1 : (r && r(t.tr.join(e.pos).scrollIntoView()), !0);
235
- }
236
- function M(t, e, r, o) {
237
- let n = e.nodeBefore, l = e.nodeAfter, i, f, c = n.type.spec.isolating || l.type.spec.isolating;
238
- if (!c && J(t, e, r))
239
- return !0;
240
- let p = !c && e.parent.canReplace(e.index(), e.index() + 1);
241
- if (p && (i = (f = n.contentMatchAt(n.childCount)).findWrapping(l.type)) && f.matchType(i[0] || l.type).validEnd) {
242
- if (r) {
243
- let u = e.pos + l.nodeSize, d = x.empty;
244
- for (let g = i.length - 1; g >= 0; g--)
245
- d = x.from(i[g].create(null, d));
246
- d = x.from(n.copy(d));
247
- let b = t.tr.step(new j(e.pos - 1, u, e.pos, u, new S(d, 1, 0), i.length, !0)), m = b.doc.resolve(u + 2 * i.length);
248
- m.nodeAfter && m.nodeAfter.type == n.type && T(b.doc, m.pos) && b.join(m.pos), r(b.scrollIntoView());
249
- }
250
- return !0;
251
- }
252
- let s = l.type.spec.isolating || o > 0 && c ? null : A.findFrom(e, 1), k = s && s.$from.blockRange(s.$to), I = k && y(k);
253
- if (I != null && I >= e.depth)
254
- return r && r(t.tr.lift(k, I).scrollIntoView()), !0;
255
- if (p && w(l, "start", !0) && w(n, "end")) {
256
- let u = n, d = [];
257
- for (; d.push(u), !u.isTextblock; )
258
- u = u.lastChild;
259
- let b = l, m = 1;
260
- for (; !b.isTextblock; b = b.firstChild)
261
- m++;
262
- if (u.canReplace(u.childCount, u.childCount, b.content)) {
263
- if (r) {
264
- let g = x.empty;
265
- for (let V = d.length - 1; V >= 0; V--)
266
- g = x.from(d[V].copy(g));
267
- let W = t.tr.step(new j(e.pos - d.length, e.pos + l.nodeSize, e.pos + m, e.pos + l.nodeSize - m, new S(g, d.length, 0), 0, !0));
268
- r(W.scrollIntoView());
269
- }
270
- return !0;
271
- }
272
- }
273
- return !1;
274
- }
275
- function N(t) {
276
- return function(e, r) {
277
- let o = e.selection, n = t < 0 ? o.$from : o.$to, l = n.depth;
278
- for (; n.node(l).isInline; ) {
279
- if (!l)
280
- return !1;
281
- l--;
282
- }
283
- return n.node(l).isTextblock ? (r && r(e.tr.setSelection(C.create(e.doc, t < 0 ? n.start(l) : n.end(l)))), !0) : !1;
284
- };
285
- }
286
- const ce = N(-1), se = N(1);
287
- function ae(t, e = null) {
288
- return function(r, o) {
289
- let { $from: n, $to: l } = r.selection, i = n.blockRange(l), f = i && D(i, t, e);
290
- return f ? (o && o(r.tr.wrap(i, f).scrollIntoView()), !0) : !1;
291
- };
292
- }
293
- function ue(t, e = null) {
294
- return function(r, o) {
295
- let n = !1;
296
- for (let l = 0; l < r.selection.ranges.length && !n; l++) {
297
- let { $from: { pos: i }, $to: { pos: f } } = r.selection.ranges[l];
298
- r.doc.nodesBetween(i, f, (c, p) => {
299
- if (n)
300
- return !1;
301
- if (!(!c.isTextblock || c.hasMarkup(t, e)))
302
- if (c.type == t)
303
- n = !0;
304
- else {
305
- let s = r.doc.resolve(p), k = s.index();
306
- n = s.parent.canReplaceWith(k, k + 1, t);
307
- }
308
- });
309
- }
310
- if (!n)
311
- return !1;
312
- if (o) {
313
- let l = r.tr;
314
- for (let i = 0; i < r.selection.ranges.length; i++) {
315
- let { $from: { pos: f }, $to: { pos: c } } = r.selection.ranges[i];
316
- l.setBlockType(f, c, t, e);
317
- }
318
- o(l.scrollIntoView());
319
- }
320
- return !0;
321
- };
322
- }
323
- typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin";
324
- export {
325
- ce as a,
326
- se as b,
327
- fe as c,
328
- _ as d,
329
- Y as e,
330
- re as f,
331
- X as g,
332
- Q as h,
333
- Z as i,
334
- ee as j,
335
- te as k,
336
- ie as l,
337
- L as m,
338
- ne as n,
339
- oe as o,
340
- K as p,
341
- le as q,
342
- ue as s,
343
- ae as w
344
- };
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1,219 +0,0 @@
1
- import { d as b, n as D, i as T, a as N, t as O, b as j, c as I, e as B } from "./vendor-vueuse-shared-Dg7PMM0z.js";
2
- import { defineComponent as X, ref as M, h as V, watch as x, computed as R } from "vue";
3
- function L(t) {
4
- var n;
5
- const e = O(t);
6
- return (n = e?.$el) != null ? n : e;
7
- }
8
- const U = N ? window : void 0;
9
- function g(...t) {
10
- let n, e, o, u;
11
- if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([e, o, u] = t, n = U) : [n, e, o, u] = t, !n)
12
- return D;
13
- Array.isArray(e) || (e = [e]), Array.isArray(o) || (o = [o]);
14
- const a = [], m = () => {
15
- a.forEach((v) => v()), a.length = 0;
16
- }, l = (v, p, r, s) => (v.addEventListener(p, r, s), () => v.removeEventListener(p, r, s)), d = x(
17
- () => [L(n), O(u)],
18
- ([v, p]) => {
19
- if (m(), !v)
20
- return;
21
- const r = j(p) ? { ...p } : p;
22
- a.push(
23
- ...e.flatMap((s) => o.map((f) => l(v, s, f, r)))
24
- );
25
- },
26
- { immediate: !0, flush: "post" }
27
- ), c = () => {
28
- d(), m();
29
- };
30
- return I(c), c;
31
- }
32
- let W = !1;
33
- function H(t, n, e = {}) {
34
- const { window: o = U, ignore: u = [], capture: a = !0, detectIframe: m = !1 } = e;
35
- if (!o)
36
- return D;
37
- T && !W && (W = !0, Array.from(o.document.body.children).forEach((r) => r.addEventListener("click", D)), o.document.documentElement.addEventListener("click", D));
38
- let l = !0;
39
- const d = (r) => u.some((s) => {
40
- if (typeof s == "string")
41
- return Array.from(o.document.querySelectorAll(s)).some((f) => f === r.target || r.composedPath().includes(f));
42
- {
43
- const f = L(s);
44
- return f && (r.target === f || r.composedPath().includes(f));
45
- }
46
- }), v = [
47
- g(o, "click", (r) => {
48
- const s = L(t);
49
- if (!(!s || s === r.target || r.composedPath().includes(s))) {
50
- if (r.detail === 0 && (l = !d(r)), !l) {
51
- l = !0;
52
- return;
53
- }
54
- n(r);
55
- }
56
- }, { passive: !0, capture: a }),
57
- g(o, "pointerdown", (r) => {
58
- const s = L(t);
59
- l = !d(r) && !!(s && !r.composedPath().includes(s));
60
- }, { passive: !0 }),
61
- m && g(o, "blur", (r) => {
62
- setTimeout(() => {
63
- var s;
64
- const f = L(t);
65
- ((s = o.document.activeElement) == null ? void 0 : s.tagName) === "IFRAME" && !f?.contains(o.document.activeElement) && n(r);
66
- }, 0);
67
- })
68
- ].filter(Boolean);
69
- return () => v.forEach((r) => r());
70
- }
71
- const ne = {
72
- [b.mounted](t, n) {
73
- const e = !n.modifiers.bubble;
74
- if (typeof n.value == "function")
75
- t.__onClickOutside_stop = H(t, n.value, { capture: e });
76
- else {
77
- const [o, u] = n.value;
78
- t.__onClickOutside_stop = H(t, o, Object.assign({ capture: e }, u));
79
- }
80
- },
81
- [b.unmounted](t) {
82
- t.__onClickOutside_stop();
83
- }
84
- }, $ = 500, z = 10;
85
- function G(t, n, e) {
86
- var o, u;
87
- const a = R(() => L(t));
88
- let m, l, d, c = !1;
89
- function v() {
90
- m && (clearTimeout(m), m = void 0), l = void 0, d = void 0, c = !1;
91
- }
92
- function p(i) {
93
- var h, y, _;
94
- const [w, E, k] = [d, l, c];
95
- if (v(), !e?.onMouseUp || !E || !w || (h = e?.modifiers) != null && h.self && i.target !== a.value)
96
- return;
97
- (y = e?.modifiers) != null && y.prevent && i.preventDefault(), (_ = e?.modifiers) != null && _.stop && i.stopPropagation();
98
- const A = i.x - E.x, C = i.y - E.y, F = Math.sqrt(A * A + C * C);
99
- e.onMouseUp(i.timeStamp - w, F, k);
100
- }
101
- function r(i) {
102
- var h, y, _, w;
103
- (h = e?.modifiers) != null && h.self && i.target !== a.value || (v(), (y = e?.modifiers) != null && y.prevent && i.preventDefault(), (_ = e?.modifiers) != null && _.stop && i.stopPropagation(), l = {
104
- x: i.x,
105
- y: i.y
106
- }, d = i.timeStamp, m = setTimeout(
107
- () => {
108
- c = !0, n(i);
109
- },
110
- (w = e?.delay) != null ? w : $
111
- ));
112
- }
113
- function s(i) {
114
- var h, y, _, w;
115
- if ((h = e?.modifiers) != null && h.self && i.target !== a.value || !l || e?.distanceThreshold === !1)
116
- return;
117
- (y = e?.modifiers) != null && y.prevent && i.preventDefault(), (_ = e?.modifiers) != null && _.stop && i.stopPropagation();
118
- const E = i.x - l.x, k = i.y - l.y;
119
- Math.sqrt(E * E + k * k) >= ((w = e?.distanceThreshold) != null ? w : z) && v();
120
- }
121
- const f = {
122
- capture: (o = e?.modifiers) == null ? void 0 : o.capture,
123
- once: (u = e?.modifiers) == null ? void 0 : u.once
124
- }, q = [
125
- g(a, "pointerdown", r, f),
126
- g(a, "pointermove", s, f),
127
- g(a, ["pointerup", "pointerleave"], p, f)
128
- ];
129
- return () => q.forEach((i) => i());
130
- }
131
- const oe = /* @__PURE__ */ X({
132
- name: "OnLongPress",
133
- props: ["as", "options"],
134
- emits: ["trigger"],
135
- setup(t, { slots: n, emit: e }) {
136
- const o = M();
137
- return G(
138
- o,
139
- (u) => {
140
- e("trigger", u);
141
- },
142
- t.options
143
- ), () => {
144
- if (n.default)
145
- return V(t.as || "div", { ref: o }, n.default());
146
- };
147
- }
148
- });
149
- function S(t) {
150
- return typeof Window < "u" && t instanceof Window ? t.document.documentElement : typeof Document < "u" && t instanceof Document ? t.documentElement : t;
151
- }
152
- function Y(t) {
153
- const n = window.getComputedStyle(t);
154
- if (n.overflowX === "scroll" || n.overflowY === "scroll" || n.overflowX === "auto" && t.clientWidth < t.scrollWidth || n.overflowY === "auto" && t.clientHeight < t.scrollHeight)
155
- return !0;
156
- {
157
- const e = t.parentNode;
158
- return !e || e.tagName === "BODY" ? !1 : Y(e);
159
- }
160
- }
161
- function J(t) {
162
- const n = t || window.event, e = n.target;
163
- return Y(e) ? !1 : n.touches.length > 1 ? !0 : (n.preventDefault && n.preventDefault(), !1);
164
- }
165
- const P = /* @__PURE__ */ new WeakMap();
166
- function K(t, n = !1) {
167
- const e = M(n);
168
- let o = null, u = "";
169
- x(B(t), (l) => {
170
- const d = S(O(l));
171
- if (d) {
172
- const c = d;
173
- if (P.get(c) || P.set(c, c.style.overflow), c.style.overflow !== "hidden" && (u = c.style.overflow), c.style.overflow === "hidden")
174
- return e.value = !0;
175
- if (e.value)
176
- return c.style.overflow = "hidden";
177
- }
178
- }, {
179
- immediate: !0
180
- });
181
- const a = () => {
182
- const l = S(O(t));
183
- !l || e.value || (T && (o = g(
184
- l,
185
- "touchmove",
186
- (d) => {
187
- J(d);
188
- },
189
- { passive: !1 }
190
- )), l.style.overflow = "hidden", e.value = !0);
191
- }, m = () => {
192
- const l = S(O(t));
193
- !l || !e.value || (T && o?.(), l.style.overflow = u, P.delete(l), e.value = !1);
194
- };
195
- return I(m), R({
196
- get() {
197
- return e.value;
198
- },
199
- set(l) {
200
- l ? a() : m();
201
- }
202
- });
203
- }
204
- function Q() {
205
- let t = !1;
206
- const n = M(!1);
207
- return (e, o) => {
208
- if (n.value = o.value, t)
209
- return;
210
- t = !0;
211
- const u = K(e, o.value);
212
- x(n, (a) => u.value = a);
213
- };
214
- }
215
- Q();
216
- export {
217
- oe as O,
218
- ne as v
219
- };