@lunejs/admin-ui 0.1.4 → 0.2.0
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.
- package/dist/_virtual/index10.js +5 -2
- package/dist/_virtual/index11.js +4 -0
- package/dist/_virtual/index6.js +3 -3
- package/dist/_virtual/index8.js +3 -5
- package/dist/lib/api/fetchers/gql-fetcher.js +6 -6
- package/dist/lib/collections/components/collection-details/cards/general-card.js +20 -14
- package/dist/lib/custom-fields/components/fields/color.js +3 -3
- package/dist/lib/dashboard/pages/dashboard-page.js +5 -5
- package/dist/lib/product/components/product-details/cards/general-product-card.js +18 -12
- package/dist/node_modules/@tiptap/core/dist/index.js +3562 -0
- package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +17 -0
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js +80 -0
- package/dist/node_modules/@tiptap/extension-document/dist/index.js +13 -0
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js +64 -0
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js +78 -0
- package/dist/node_modules/@tiptap/extension-link/dist/index.js +305 -0
- package/dist/node_modules/@tiptap/extension-list/dist/index.js +713 -0
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +42 -0
- package/dist/node_modules/@tiptap/extension-table/dist/index.js +380 -0
- package/dist/node_modules/@tiptap/extension-text/dist/index.js +14 -0
- package/dist/node_modules/@tiptap/extension-text-style/dist/index.js +240 -0
- package/dist/node_modules/@tiptap/extension-underline/dist/index.js +66 -0
- package/dist/node_modules/@tiptap/react/dist/index.js +481 -0
- package/dist/node_modules/eventemitter3/index.js +1 -1
- package/dist/node_modules/eventemitter3/index2.js +1 -1
- package/dist/node_modules/fast-equals/dist/es/index.js +324 -0
- package/dist/node_modules/linkifyjs/dist/linkify.js +707 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/baseline.js +10 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/between-horizontal-end.js +10 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/between-vertical-end.js +10 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/bold.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/grid-2x2-plus.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/grid-2x2-x.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/italic.js +10 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/link.js +9 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/list-ordered.js +13 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/table-columns-split.js +18 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/table-rows-split.js +18 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/table.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/underline.js +9 -0
- package/dist/node_modules/orderedmap/dist/index.js +103 -0
- package/dist/node_modules/prosemirror-commands/dist/index.js +388 -0
- package/dist/node_modules/prosemirror-keymap/dist/index.js +62 -0
- package/dist/node_modules/prosemirror-model/dist/index.js +2733 -0
- package/dist/node_modules/prosemirror-schema-list/dist/index.js +88 -0
- package/dist/node_modules/prosemirror-state/dist/index.js +822 -0
- package/dist/node_modules/prosemirror-tables/dist/index.js +1446 -0
- package/dist/node_modules/prosemirror-transform/dist/index.js +1520 -0
- package/dist/node_modules/prosemirror-view/dist/index.js +3772 -0
- package/dist/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/node_modules/recharts/es6/util/ReactUtils.js +1 -1
- package/dist/node_modules/use-sync-external-store/shim/index.js +1 -1
- package/dist/node_modules/w3c-keyname/index.js +93 -0
- package/dist/packages/lune-ui/dist/_virtual/index3.js +2 -5
- package/dist/packages/lune-ui/dist/_virtual/index6.js +5 -2
- package/dist/packages/lune-ui/dist/components/popover.js +15 -11
- package/dist/packages/lune-ui/dist/components/select.js +6 -6
- package/dist/packages/lune-ui/dist/form/form-date-picker.js +2 -2
- package/dist/packages/lune-ui/dist/form/form.js +4 -4
- package/dist/packages/lune-ui/dist/node_modules/@radix-ui/react-popover/dist/index.js +39 -38
- package/dist/packages/lune-ui/dist/node_modules/prop-types/index.js +1 -1
- package/dist/packages/lune-ui/dist/packages/lune-ui/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/shared/components/color-picker/color-picker.d.ts +2 -1
- package/dist/shared/components/color-picker/color-picker.js +11 -11
- package/dist/shared/components/data-table/data-table-filter.js +4 -4
- package/dist/shared/components/rich-editor/rich-editor.d.ts +6 -0
- package/dist/shared/components/rich-editor/rich-editor.js +93 -0
- package/dist/shared/components/rich-editor/toolbar/bold/rich-editor-toolbar-bold.d.ts +1 -0
- package/dist/shared/components/rich-editor/toolbar/bold/rich-editor-toolbar-bold.js +65 -0
- package/dist/shared/components/rich-editor/toolbar/color/rich-editor-toolbar-color.d.ts +1 -0
- package/dist/shared/components/rich-editor/toolbar/color/rich-editor-toolbar-color.js +65 -0
- package/dist/shared/components/rich-editor/toolbar/heading/rich-editor-toolbar-heading.d.ts +1 -0
- package/dist/shared/components/rich-editor/toolbar/heading/rich-editor-toolbar-heading.js +114 -0
- package/dist/shared/components/rich-editor/toolbar/italic/rich-editor-toolbar-italic.d.ts +1 -0
- package/dist/shared/components/rich-editor/toolbar/italic/rich-editor-toolbar-italic.js +65 -0
- package/dist/shared/components/rich-editor/toolbar/link/rich-editor-toolbar-link-form.d.ts +2 -0
- package/dist/shared/components/rich-editor/toolbar/link/rich-editor-toolbar-link-form.js +103 -0
- package/dist/shared/components/rich-editor/toolbar/link/rich-editor-toolbar-link.d.ts +1 -0
- package/dist/shared/components/rich-editor/toolbar/link/rich-editor-toolbar-link.js +63 -0
- package/dist/shared/components/rich-editor/toolbar/ol-list/rich-editor-toolbar-ul-list.d.ts +1 -0
- package/dist/shared/components/rich-editor/toolbar/ol-list/rich-editor-toolbar-ul-list.js +65 -0
- package/dist/shared/components/rich-editor/toolbar/table/rich-editor-toolbar-table.d.ts +1 -0
- package/dist/shared/components/rich-editor/toolbar/table/rich-editor-toolbar-table.js +107 -0
- package/dist/shared/components/rich-editor/toolbar/toolbar.d.ts +1 -0
- package/dist/shared/components/rich-editor/toolbar/toolbar.js +64 -0
- package/dist/shared/components/rich-editor/toolbar/ul-list/rich-editor-toolbar-ul-list.d.ts +1 -0
- package/dist/shared/components/rich-editor/toolbar/ul-list/rich-editor-toolbar-ul-list.js +65 -0
- package/dist/shared/components/rich-editor/toolbar/underline/rich-editor-toolbar-underline.d.ts +1 -0
- package/dist/shared/components/rich-editor/toolbar/underline/rich-editor-toolbar-underline.js +65 -0
- package/package.json +6 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { ReplaceAroundStep as h, liftTarget as w, canJoin as C, findWrapping as L, canSplit as R } from "../../prosemirror-transform/dist/index.js";
|
|
2
|
+
import { Fragment as s, Slice as I, NodeRange as x } from "../../prosemirror-model/dist/index.js";
|
|
3
|
+
function O(r, t = null) {
|
|
4
|
+
return function(e, l) {
|
|
5
|
+
let { $from: o, $to: n } = e.selection, f = o.blockRange(n);
|
|
6
|
+
if (!f)
|
|
7
|
+
return !1;
|
|
8
|
+
let i = l ? e.tr : null;
|
|
9
|
+
return S(i, f, r, t) ? (l && l(i.scrollIntoView()), !0) : !1;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function S(r, t, e, l = null) {
|
|
13
|
+
let o = !1, n = t, f = t.$from.doc;
|
|
14
|
+
if (t.depth >= 2 && t.$from.node(t.depth - 1).type.compatibleContent(e) && t.startIndex == 0) {
|
|
15
|
+
if (t.$from.index(t.depth - 1) == 0)
|
|
16
|
+
return !1;
|
|
17
|
+
let d = f.resolve(t.start - 2);
|
|
18
|
+
n = new x(d, d, t.depth), t.endIndex < t.parent.childCount && (t = new x(t.$from, f.resolve(t.$to.end(t.depth)), t.depth)), o = !0;
|
|
19
|
+
}
|
|
20
|
+
let i = L(n, e, l, t);
|
|
21
|
+
return i ? (r && v(r, t, i, o, e), !0) : !1;
|
|
22
|
+
}
|
|
23
|
+
function v(r, t, e, l, o) {
|
|
24
|
+
let n = s.empty;
|
|
25
|
+
for (let u = e.length - 1; u >= 0; u--)
|
|
26
|
+
n = s.from(e[u].type.create(e[u].attrs, n));
|
|
27
|
+
r.step(new h(t.start - (l ? 2 : 0), t.end, t.start, t.end, new I(n, 0, 0), e.length, !0));
|
|
28
|
+
let f = 0;
|
|
29
|
+
for (let u = 0; u < e.length; u++)
|
|
30
|
+
e[u].type == o && (f = u + 1);
|
|
31
|
+
let i = e.length - f, d = t.start + e.length - (l ? 2 : 0), c = t.parent;
|
|
32
|
+
for (let u = t.startIndex, m = t.endIndex, p = !0; u < m; u++, p = !1)
|
|
33
|
+
!p && R(r.doc, d, i) && (r.split(d, i), d += 2 * i), d += c.child(u).nodeSize;
|
|
34
|
+
return r;
|
|
35
|
+
}
|
|
36
|
+
function V(r) {
|
|
37
|
+
return function(t, e) {
|
|
38
|
+
let { $from: l, $to: o } = t.selection, n = l.blockRange(o, (f) => f.childCount > 0 && f.firstChild.type == r);
|
|
39
|
+
return n ? e ? l.node(n.depth - 1).type == r ? b(t, e, r, n) : k(t, e, n) : !0 : !1;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function b(r, t, e, l) {
|
|
43
|
+
let o = r.tr, n = l.end, f = l.$to.end(l.depth);
|
|
44
|
+
n < f && (o.step(new h(n - 1, f, n, f, new I(s.from(e.create(null, l.parent.copy())), 1, 0), 1, !0)), l = new x(o.doc.resolve(l.$from.pos), o.doc.resolve(f), l.depth));
|
|
45
|
+
const i = w(l);
|
|
46
|
+
if (i == null)
|
|
47
|
+
return !1;
|
|
48
|
+
o.lift(l, i);
|
|
49
|
+
let d = o.doc.resolve(o.mapping.map(n, -1) - 1);
|
|
50
|
+
return C(o.doc, d.pos) && d.nodeBefore.type == d.nodeAfter.type && o.join(d.pos), t(o.scrollIntoView()), !0;
|
|
51
|
+
}
|
|
52
|
+
function k(r, t, e) {
|
|
53
|
+
let l = r.tr, o = e.parent;
|
|
54
|
+
for (let a = e.end, $ = e.endIndex - 1, y = e.startIndex; $ > y; $--)
|
|
55
|
+
a -= o.child($).nodeSize, l.delete(a - 1, a + 1);
|
|
56
|
+
let n = l.doc.resolve(e.start), f = n.nodeAfter;
|
|
57
|
+
if (l.mapping.map(e.end) != e.start + n.nodeAfter.nodeSize)
|
|
58
|
+
return !1;
|
|
59
|
+
let i = e.startIndex == 0, d = e.endIndex == o.childCount, c = n.node(-1), u = n.index(-1);
|
|
60
|
+
if (!c.canReplace(u + (i ? 0 : 1), u + 1, f.content.append(d ? s.empty : s.from(o))))
|
|
61
|
+
return !1;
|
|
62
|
+
let m = n.pos, p = m + f.nodeSize;
|
|
63
|
+
return l.step(new h(m - (i ? 1 : 0), p + (d ? 1 : 0), m + 1, p - 1, new I((i ? s.empty : s.from(o.copy(s.empty))).append(d ? s.empty : s.from(o.copy(s.empty))), i ? 0 : 1, d ? 0 : 1), i ? 0 : 1)), t(l.scrollIntoView()), !0;
|
|
64
|
+
}
|
|
65
|
+
function B(r) {
|
|
66
|
+
return function(t, e) {
|
|
67
|
+
let { $from: l, $to: o } = t.selection, n = l.blockRange(o, (c) => c.childCount > 0 && c.firstChild.type == r);
|
|
68
|
+
if (!n)
|
|
69
|
+
return !1;
|
|
70
|
+
let f = n.startIndex;
|
|
71
|
+
if (f == 0)
|
|
72
|
+
return !1;
|
|
73
|
+
let i = n.parent, d = i.child(f - 1);
|
|
74
|
+
if (d.type != r)
|
|
75
|
+
return !1;
|
|
76
|
+
if (e) {
|
|
77
|
+
let c = d.lastChild && d.lastChild.type == i.type, u = s.from(c ? r.create() : null), m = new I(s.from(r.create(null, s.from(i.type.create(null, u)))), c ? 3 : 1, 0), p = n.start, a = n.end;
|
|
78
|
+
e(t.tr.step(new h(p - (c ? 3 : 1), a, p, a, m, 1, !0)).scrollIntoView());
|
|
79
|
+
}
|
|
80
|
+
return !0;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export {
|
|
84
|
+
V as liftListItem,
|
|
85
|
+
B as sinkListItem,
|
|
86
|
+
O as wrapInList,
|
|
87
|
+
S as wrapRangeInList
|
|
88
|
+
};
|