@vkzstudio/muza-ui 1.0.9 → 1.0.11
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/components/Button/Button.d.ts +2 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +58 -55
- package/dist/components/Button/Button.stories.d.ts +2 -1
- package/dist/components/Button/Button.stories.d.ts.map +1 -1
- package/dist/components/Button/buttonVariants.d.ts +1 -1
- package/dist/components/Button/buttonVariants.d.ts.map +1 -1
- package/dist/components/Button/buttonVariants.js +6 -2
- package/dist/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.js +5 -4
- package/dist/components/DataTable/DataTable.stories.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
- package/dist/components/Icons/CustomIcons.d.ts +1 -0
- package/dist/components/Icons/CustomIcons.d.ts.map +1 -1
- package/dist/components/Icons/CustomIcons.js +38 -27
- package/dist/components/Reorderable/Reorderable.d.ts +2 -0
- package/dist/components/Reorderable/Reorderable.d.ts.map +1 -1
- package/dist/components/Reorderable/Reorderable.js +80 -78
- package/dist/components/ReorderableTable/ReorderableTable.d.ts.map +1 -1
- package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts.map +1 -1
- package/dist/components/TextEditor/EditorToolbar.d.ts +18 -0
- package/dist/components/TextEditor/EditorToolbar.d.ts.map +1 -0
- package/dist/components/TextEditor/EditorToolbar.js +175 -0
- package/dist/components/TextEditor/LinkBubbleMenu.d.ts +52 -0
- package/dist/components/TextEditor/LinkBubbleMenu.d.ts.map +1 -0
- package/dist/components/TextEditor/LinkBubbleMenu.js +97 -0
- package/dist/components/TextEditor/TextEditor.d.ts +134 -0
- package/dist/components/TextEditor/TextEditor.d.ts.map +1 -0
- package/dist/components/TextEditor/TextEditor.js +240 -0
- package/dist/components/TextEditor/TextEditor.stories.d.ts +51 -0
- package/dist/components/TextEditor/TextEditor.stories.d.ts.map +1 -0
- package/dist/components/TextEditor/ToolbarButton.d.ts +38 -0
- package/dist/components/TextEditor/ToolbarButton.d.ts.map +1 -0
- package/dist/components/TextEditor/ToolbarButton.js +68 -0
- package/dist/components/TextEditor/ToolbarSeparator.d.ts +22 -0
- package/dist/components/TextEditor/ToolbarSeparator.d.ts.map +1 -0
- package/dist/components/TextEditor/ToolbarSeparator.js +23 -0
- package/dist/components/TextEditor/index.d.ts +4 -0
- package/dist/components/TextEditor/index.d.ts.map +1 -0
- package/dist/components/TextEditor/useLinkEditor.d.ts +37 -0
- package/dist/components/TextEditor/useLinkEditor.d.ts.map +1 -0
- package/dist/components/TextEditor/useLinkEditor.js +32 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.js +140 -132
- package/dist/muza-ui.css +1 -1
- package/dist/node_modules/@popperjs/core/lib/createPopper.js +122 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/contains.js +18 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js +23 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js +37 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js +32 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js +7 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js +10 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js +17 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js +9 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js +13 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js +6 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js +10 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js +35 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js +18 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js +10 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js +21 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindow.js +12 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js +11 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js +9 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js +20 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js +7 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js +8 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js +7 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js +16 -0
- package/dist/node_modules/@popperjs/core/lib/enums.js +31 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/applyStyles.js +47 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/arrow.js +37 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/computeStyles.js +99 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/eventListeners.js +26 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/flip.js +74 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/hide.js +44 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/offset.js +31 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js +19 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js +54 -0
- package/dist/node_modules/@popperjs/core/lib/popper.js +27 -0
- package/dist/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js +27 -0
- package/dist/node_modules/@popperjs/core/lib/utils/computeOffsets.js +54 -0
- package/dist/node_modules/@popperjs/core/lib/utils/debounce.js +13 -0
- package/dist/node_modules/@popperjs/core/lib/utils/detectOverflow.js +33 -0
- package/dist/node_modules/@popperjs/core/lib/utils/expandToHashMap.js +8 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getAltAxis.js +6 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getBasePlacement.js +6 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js +11 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js +6 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js +14 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js +12 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getVariation.js +6 -0
- package/dist/node_modules/@popperjs/core/lib/utils/math.js +6 -0
- package/dist/node_modules/@popperjs/core/lib/utils/mergeByName.js +15 -0
- package/dist/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js +7 -0
- package/dist/node_modules/@popperjs/core/lib/utils/orderModifiers.js +31 -0
- package/dist/node_modules/@popperjs/core/lib/utils/rectToClientRect.js +11 -0
- package/dist/node_modules/@popperjs/core/lib/utils/userAgent.js +9 -0
- package/dist/node_modules/@popperjs/core/lib/utils/within.js +12 -0
- package/dist/node_modules/@tiptap/core/dist/index.js +2857 -0
- package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +45 -0
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js +76 -0
- package/dist/node_modules/@tiptap/extension-bubble-menu/dist/index.js +129 -0
- package/dist/node_modules/@tiptap/extension-bullet-list/dist/index.js +55 -0
- package/dist/node_modules/@tiptap/extension-code/dist/index.js +54 -0
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +136 -0
- package/dist/node_modules/@tiptap/extension-document/dist/index.js +10 -0
- package/dist/node_modules/@tiptap/extension-dropcursor/dist/index.js +21 -0
- package/dist/node_modules/@tiptap/extension-gapcursor/dist/index.js +25 -0
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +56 -0
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js +55 -0
- package/dist/node_modules/@tiptap/extension-history/dist/index.js +36 -0
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +59 -0
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js +75 -0
- package/dist/node_modules/@tiptap/extension-link/dist/index.js +272 -0
- package/dist/node_modules/@tiptap/extension-list-item/dist/index.js +34 -0
- package/dist/node_modules/@tiptap/extension-ordered-list/dist/index.js +73 -0
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +34 -0
- package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +53 -0
- package/dist/node_modules/@tiptap/extension-strike/dist/index.js +64 -0
- package/dist/node_modules/@tiptap/extension-text/dist/index.js +9 -0
- package/dist/node_modules/@tiptap/react/dist/index.js +709 -0
- package/dist/node_modules/@tiptap/starter-kit/dist/index.js +30 -0
- package/dist/node_modules/linkifyjs/dist/linkify.js +707 -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-dropcursor/dist/index.js +86 -0
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js +204 -0
- package/dist/node_modules/prosemirror-history/dist/index.js +248 -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-transform/dist/index.js +1520 -0
- package/dist/node_modules/prosemirror-view/dist/index.js +3794 -0
- package/dist/node_modules/rope-sequence/dist/index.js +100 -0
- package/dist/node_modules/tippy.js/dist/tippy.esm.js +813 -0
- package/dist/node_modules/w3c-keyname/index.js +93 -0
- package/dist/translations/locales/cs.d.ts.map +1 -1
- package/dist/translations/locales/cs.js +18 -0
- package/dist/translations/locales/en.d.ts.map +1 -1
- package/dist/translations/locales/en.js +18 -0
- package/dist/translations/locales/sk.d.ts.map +1 -1
- package/dist/translations/locales/sk.js +18 -0
- package/dist/translations/types.d.ts +22 -0
- package/dist/translations/types.d.ts.map +1 -1
- package/package.json +17 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { ReplaceAroundStep as h, findWrapping as w, liftTarget as C, canJoin 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 = w(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 = C(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 L(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
|
+
};
|