@dooherceg/tiptap-controlled-editor-with-table 0.0.10 → 0.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/Combination-CO0ZtURs.js +1333 -0
- package/dist/assets/{components/tiptap-ui-primitive/badge/badge-colors.css → badge.css} +1 -1
- package/dist/assets/{components/tiptap-ui-primitive/button/button-colors.css → button.css} +1 -1
- package/dist/assets/simple-editor.css +1 -0
- package/dist/components/tiptap-node/horizontal-rule-node/horizontal-rule-node-extension.js +58 -6
- package/dist/components/tiptap-node/image-upload-node/image-upload-node.js +4 -5
- package/dist/components/tiptap-templates/simple/simple-editor.js +1922 -160
- package/dist/components/tiptap-templates/simple/theme-toggle.js +7 -7
- package/dist/components/tiptap-ui/blockquote-button/blockquote-button.js +10 -10
- package/dist/components/tiptap-ui/color-highlight-button/color-highlight-button.js +5 -6
- package/dist/components/tiptap-ui/color-highlight-button/use-color-highlight.js +1 -1
- package/dist/components/tiptap-ui/color-highlight-popover/color-highlight-popover.js +19 -19
- package/dist/components/tiptap-ui/heading-button/heading-button.js +9 -9
- package/dist/components/tiptap-ui/heading-dropdown-menu/heading-dropdown-menu.js +37 -29
- package/dist/components/tiptap-ui/heading-dropdown-menu/use-heading-dropdown-menu.js +14 -13
- package/dist/components/tiptap-ui/image-upload-button/use-image-upload.js +16 -16
- package/dist/components/tiptap-ui/insert-table-button/insert-table-button.js +9 -9
- package/dist/components/tiptap-ui/link-popover/link-popover.js +13 -13
- package/dist/components/tiptap-ui/list-button/list-button.js +7 -7
- package/dist/components/tiptap-ui/list-dropdown-menu/list-dropdown-menu.js +24 -20
- package/dist/components/tiptap-ui/list-dropdown-menu/use-list-dropdown-menu.js +3 -2
- package/dist/components/tiptap-ui/table-actions-toolbar/table-actions-toolbar.js +28 -28
- package/dist/components/tiptap-ui-primitive/badge/badge.js +16 -19
- package/dist/components/tiptap-ui-primitive/button/button.js +19 -22
- package/dist/components/tiptap-ui-primitive/card/card.js +12 -13
- package/dist/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.js +1012 -39
- package/dist/components/tiptap-ui-primitive/input/input.js +6 -7
- package/dist/components/tiptap-ui-primitive/popover/popover.js +233 -24
- package/dist/components/tiptap-ui-primitive/separator/separator.js +8 -9
- package/dist/components/tiptap-ui-primitive/toolbar/toolbar.js +7 -8
- package/dist/components/tiptap-ui-primitive/tooltip/tooltip.js +1330 -84
- package/dist/floating-ui.react-dom-DgOuULHo.js +1334 -0
- package/dist/hooks/use-throttled-callback.js +108 -13
- package/dist/{node_modules/react-hotkeys-hook/packages/react-hotkeys-hook/dist/index.js → index-Bqw9S4qP.js} +55 -57
- package/package.json +1 -1
- package/dist/_virtual/_commonjsHelpers.js +0 -8
- package/dist/_virtual/index.js +0 -7
- package/dist/assets/components/tiptap-node/blockquote-node/blockquote-node.css +0 -1
- package/dist/assets/components/tiptap-node/code-block-node/code-block-node.css +0 -1
- package/dist/assets/components/tiptap-node/heading-node/heading-node.css +0 -1
- package/dist/assets/components/tiptap-node/horizontal-rule-node/horizontal-rule-node.css +0 -1
- package/dist/assets/components/tiptap-node/image-node/image-node.css +0 -1
- package/dist/assets/components/tiptap-node/list-node/list-node.css +0 -1
- package/dist/assets/components/tiptap-node/paragraph-node/paragraph-node.css +0 -1
- package/dist/assets/components/tiptap-templates/simple/simple-editor.css +0 -1
- package/dist/assets/components/tiptap-ui-primitive/badge/badge-group.css +0 -1
- package/dist/assets/components/tiptap-ui-primitive/badge/badge.css +0 -1
- package/dist/assets/components/tiptap-ui-primitive/button/button-group.css +0 -1
- package/dist/assets/components/tiptap-ui-primitive/button/button.css +0 -1
- package/dist/assets/styles/_keyframe-animations.css +0 -1
- package/dist/assets/styles/_variables.css +0 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -527
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -402
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.js +0 -932
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js +0 -185
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -208
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -136
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -130
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +0 -9
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +0 -24
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +0 -48
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -29
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +0 -53
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +0 -10
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -127
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +0 -221
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -17
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -136
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +0 -13
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +0 -636
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +0 -239
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +0 -219
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +0 -15
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +0 -70
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +0 -36
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +0 -183
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +0 -49
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -10
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -52
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -14
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -6
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +0 -27
- package/dist/node_modules/@tiptap/extension-highlight/dist/index.js +0 -84
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +0 -57
- package/dist/node_modules/@tiptap/extension-image/dist/index.js +0 -128
- package/dist/node_modules/@tiptap/extension-list/dist/index.js +0 -713
- package/dist/node_modules/@tiptap/extension-subscript/dist/index.js +0 -40
- package/dist/node_modules/@tiptap/extension-superscript/dist/index.js +0 -40
- package/dist/node_modules/@tiptap/extension-table/dist/index.js +0 -380
- package/dist/node_modules/@tiptap/extension-text-align/dist/index.js +0 -46
- package/dist/node_modules/@tiptap/extension-typography/dist/index.js +0 -125
- package/dist/node_modules/@tiptap/extensions/dist/index.js +0 -288
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -52
- package/dist/node_modules/get-nonce/dist/es2015/index.js +0 -7
- package/dist/node_modules/lodash.throttle/index.js +0 -95
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -11
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -112
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -31
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -16
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -68
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -5
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -7
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +0 -71
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +0 -7
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +0 -25
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +0 -11
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +0 -15
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +0 -30
- package/dist/node_modules/tabbable/dist/index.esm.js +0 -197
- package/dist/node_modules/tslib/tslib.es6.js +0 -27
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +0 -6
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +0 -26
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +0 -25
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +0 -18
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +0 -67
- /package/dist/assets/{components/tiptap-ui-primitive/card/card.css → card.css} +0 -0
- /package/dist/assets/{components/tiptap-ui/color-highlight-button/color-highlight-button.css → color-highlight-button.css} +0 -0
- /package/dist/assets/{components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.css → dropdown-menu.css} +0 -0
- /package/dist/assets/{components/tiptap-node/image-upload-node/image-upload-node.css → image-upload-node.css} +0 -0
- /package/dist/assets/{components/tiptap-ui-primitive/input/input.css → input.css} +0 -0
- /package/dist/assets/{components/tiptap-ui-primitive/popover/popover.css → popover.css} +0 -0
- /package/dist/assets/{components/tiptap-ui-primitive/separator/separator.css → separator.css} +0 -0
- /package/dist/assets/{components/tiptap-ui-primitive/toolbar/toolbar.css → toolbar.css} +0 -0
- /package/dist/assets/{components/tiptap-ui-primitive/tooltip/tooltip.css → tooltip.css} +0 -0
|
@@ -3,12 +3,16 @@ import { useState as L, useCallback as C } from "react";
|
|
|
3
3
|
import "@tiptap/react";
|
|
4
4
|
import { useTiptapEditor as g } from "../../../hooks/use-tiptap-editor.js";
|
|
5
5
|
import { ChevronDownIcon as D } from "../../tiptap-icons/chevron-down-icon.js";
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
6
|
+
import { ListButton as y } from "../list-button/list-button.js";
|
|
7
|
+
import "prosemirror-state";
|
|
8
|
+
import "../../tiptap-icons/list-icon.js";
|
|
9
|
+
import "../../tiptap-icons/list-ordered-icon.js";
|
|
10
|
+
import "../../tiptap-icons/list-todo-icon.js";
|
|
11
|
+
import { useListDropdownMenu as M } from "./use-list-dropdown-menu.js";
|
|
12
|
+
import { Button as x, ButtonGroup as I } from "../../tiptap-ui-primitive/button/button.js";
|
|
13
|
+
import { DropdownMenu as B, DropdownMenuTrigger as O, DropdownMenuContent as T, DropdownMenuItem as v } from "../../tiptap-ui-primitive/dropdown-menu/dropdown-menu.js";
|
|
10
14
|
import { Card as j, CardBody as k } from "../../tiptap-ui-primitive/card/card.js";
|
|
11
|
-
function
|
|
15
|
+
function R({
|
|
12
16
|
editor: s,
|
|
13
17
|
types: a = ["bulletList", "orderedList", "taskList"],
|
|
14
18
|
hideWhenUnavailable: l = !1,
|
|
@@ -16,19 +20,19 @@ function J({
|
|
|
16
20
|
portal: d = !1,
|
|
17
21
|
...p
|
|
18
22
|
}) {
|
|
19
|
-
const { editor:
|
|
20
|
-
editor:
|
|
23
|
+
const { editor: e } = g(s), [m, u] = L(!1), { filteredLists: c, canToggle: i, isActive: f, isVisible: h, Icon: b } = M({
|
|
24
|
+
editor: e,
|
|
21
25
|
types: a,
|
|
22
26
|
hideWhenUnavailable: l
|
|
23
27
|
}), w = C(
|
|
24
|
-
(
|
|
25
|
-
|
|
28
|
+
(o) => {
|
|
29
|
+
u(o), r?.(o);
|
|
26
30
|
},
|
|
27
31
|
[r]
|
|
28
32
|
);
|
|
29
|
-
return !h || !
|
|
30
|
-
/* @__PURE__ */ t(
|
|
31
|
-
|
|
33
|
+
return !h || !e || !e.isEditable ? null : /* @__PURE__ */ n(B, { open: m, onOpenChange: w, children: [
|
|
34
|
+
/* @__PURE__ */ t(O, { asChild: !0, children: /* @__PURE__ */ n(
|
|
35
|
+
x,
|
|
32
36
|
{
|
|
33
37
|
type: "button",
|
|
34
38
|
"data-style": "ghost",
|
|
@@ -46,18 +50,18 @@ function J({
|
|
|
46
50
|
]
|
|
47
51
|
}
|
|
48
52
|
) }),
|
|
49
|
-
/* @__PURE__ */ t(
|
|
50
|
-
|
|
53
|
+
/* @__PURE__ */ t(T, { align: "start", portal: d, children: /* @__PURE__ */ t(j, { children: /* @__PURE__ */ t(k, { children: /* @__PURE__ */ t(I, { children: c.map((o) => /* @__PURE__ */ t(v, { asChild: !0, children: /* @__PURE__ */ t(
|
|
54
|
+
y,
|
|
51
55
|
{
|
|
52
|
-
editor:
|
|
53
|
-
type:
|
|
54
|
-
text:
|
|
56
|
+
editor: e,
|
|
57
|
+
type: o.type,
|
|
58
|
+
text: o.label,
|
|
55
59
|
showTooltip: !1
|
|
56
60
|
}
|
|
57
|
-
) },
|
|
61
|
+
) }, o.type)) }) }) }) })
|
|
58
62
|
] });
|
|
59
63
|
}
|
|
60
64
|
export {
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
R as ListDropdownMenu,
|
|
66
|
+
R as default
|
|
63
67
|
};
|
|
@@ -4,6 +4,7 @@ import { ListIcon as u } from "../../tiptap-icons/list-icon.js";
|
|
|
4
4
|
import { ListOrderedIcon as A } from "../../tiptap-icons/list-ordered-icon.js";
|
|
5
5
|
import { ListTodoIcon as h } from "../../tiptap-icons/list-todo-icon.js";
|
|
6
6
|
import { isNodeInSchema as T } from "../../../lib/tiptap-utils.js";
|
|
7
|
+
import "../list-button/list-button.js";
|
|
7
8
|
import { canToggleList as I, isListActive as d, listIcons as E } from "../list-button/use-list.js";
|
|
8
9
|
const S = [
|
|
9
10
|
{
|
|
@@ -41,7 +42,7 @@ function D(t, i) {
|
|
|
41
42
|
if (!(!t || !t.isEditable))
|
|
42
43
|
return i.find((e) => d(t, e));
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
+
function q(t) {
|
|
45
46
|
const {
|
|
46
47
|
editor: i,
|
|
47
48
|
types: e = ["bulletList", "orderedList", "taskList"],
|
|
@@ -80,5 +81,5 @@ export {
|
|
|
80
81
|
O as isAnyListActive,
|
|
81
82
|
S as listOptions,
|
|
82
83
|
w as shouldShowListDropdown,
|
|
83
|
-
|
|
84
|
+
q as useListDropdownMenu
|
|
84
85
|
};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { jsx as o, jsxs as a } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import c from "
|
|
6
|
-
import f from "./add-column-
|
|
7
|
-
import p from "./add-
|
|
8
|
-
import h from "./add-row-
|
|
9
|
-
import C from "./
|
|
10
|
-
import A from "./delete-
|
|
11
|
-
import
|
|
12
|
-
import B from "./
|
|
13
|
-
import R from "./
|
|
14
|
-
import T from "./
|
|
15
|
-
import
|
|
2
|
+
import { ButtonGroup as i } from "../../tiptap-ui-primitive/button/button.js";
|
|
3
|
+
import { useTiptapEditor as m } from "../../../hooks/use-tiptap-editor.js";
|
|
4
|
+
import { useState as s, useEffect as u } from "react";
|
|
5
|
+
import { createPortal as c } from "react-dom";
|
|
6
|
+
import f from "./add-column-after-button.js";
|
|
7
|
+
import p from "./add-column-before-button.js";
|
|
8
|
+
import h from "./add-row-after-button.js";
|
|
9
|
+
import C from "./add-row-before-button.js";
|
|
10
|
+
import A from "./delete-column-button.js";
|
|
11
|
+
import b from "./delete-row-button.js";
|
|
12
|
+
import { getTableNodeAndPos as B } from "./get-table-node-and-pos.js";
|
|
13
|
+
import R from "./merge-cells-button.js";
|
|
14
|
+
import T from "./remove-table-button.js";
|
|
15
|
+
import w from "./split-table-cells-button.js";
|
|
16
16
|
const Q = () => {
|
|
17
|
-
const [l, n] =
|
|
18
|
-
return
|
|
17
|
+
const [l, n] = s(null), { editor: e } = m();
|
|
18
|
+
return u(() => {
|
|
19
19
|
if (!e) return;
|
|
20
20
|
const t = () => {
|
|
21
|
-
const d = e.isActive("table"), r =
|
|
21
|
+
const d = e.isActive("table"), r = B(e);
|
|
22
22
|
n(d && r ? r.domElement : null);
|
|
23
23
|
};
|
|
24
24
|
return e.on("selectionUpdate", t), () => {
|
|
25
25
|
e.off("selectionUpdate", t);
|
|
26
26
|
};
|
|
27
|
-
}, [e]), l &&
|
|
27
|
+
}, [e]), l && c(
|
|
28
28
|
/* @__PURE__ */ o(
|
|
29
29
|
"div",
|
|
30
30
|
{
|
|
@@ -36,32 +36,32 @@ const Q = () => {
|
|
|
36
36
|
left: 0,
|
|
37
37
|
transform: "translateY(-100%)"
|
|
38
38
|
},
|
|
39
|
-
children: /* @__PURE__ */ a(
|
|
40
|
-
/* @__PURE__ */ o(
|
|
39
|
+
children: /* @__PURE__ */ a(i, { orientation: "horizontal", children: [
|
|
40
|
+
/* @__PURE__ */ o(p, { onClick: () => {
|
|
41
41
|
e?.chain().focus().addColumnBefore().run();
|
|
42
42
|
} }),
|
|
43
|
-
/* @__PURE__ */ o(
|
|
43
|
+
/* @__PURE__ */ o(f, { onClick: () => {
|
|
44
44
|
e?.chain().focus().addColumnAfter().run();
|
|
45
45
|
} }),
|
|
46
|
-
/* @__PURE__ */ o(
|
|
46
|
+
/* @__PURE__ */ o(h, { onClick: () => {
|
|
47
47
|
e?.chain().addRowAfter().run();
|
|
48
48
|
} }),
|
|
49
|
-
/* @__PURE__ */ o(
|
|
49
|
+
/* @__PURE__ */ o(C, { onClick: () => {
|
|
50
50
|
e?.chain().addRowBefore().run();
|
|
51
51
|
} }),
|
|
52
|
-
/* @__PURE__ */ o(
|
|
52
|
+
/* @__PURE__ */ o(b, { onClick: () => {
|
|
53
53
|
e?.chain().deleteRow().run();
|
|
54
54
|
} }),
|
|
55
|
-
/* @__PURE__ */ o(
|
|
55
|
+
/* @__PURE__ */ o(A, { onClick: () => {
|
|
56
56
|
e?.chain().deleteColumn().run();
|
|
57
57
|
} }),
|
|
58
|
-
/* @__PURE__ */ o(
|
|
58
|
+
/* @__PURE__ */ o(R, { onClick: () => {
|
|
59
59
|
e?.chain().mergeCells().run();
|
|
60
60
|
} }),
|
|
61
|
-
/* @__PURE__ */ o(
|
|
61
|
+
/* @__PURE__ */ o(w, { onClick: () => {
|
|
62
62
|
e?.chain().splitCell().run();
|
|
63
63
|
} }),
|
|
64
|
-
/* @__PURE__ */ o(
|
|
64
|
+
/* @__PURE__ */ o(T, { onClick: () => {
|
|
65
65
|
e?.chain().deleteTable().run();
|
|
66
66
|
} })
|
|
67
67
|
] })
|
|
@@ -1,33 +1,30 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import '../../../assets/
|
|
4
|
-
/* empty css */
|
|
5
|
-
/* empty css */
|
|
6
|
-
const s = m(
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as i } from "react";
|
|
3
|
+
import '../../../assets/badge.css';const l = i(
|
|
7
4
|
({
|
|
8
5
|
variant: a,
|
|
9
6
|
size: t = "default",
|
|
10
7
|
appearance: e = "default",
|
|
11
|
-
trimText:
|
|
12
|
-
className:
|
|
13
|
-
children:
|
|
14
|
-
...
|
|
15
|
-
},
|
|
8
|
+
trimText: d = !1,
|
|
9
|
+
className: r,
|
|
10
|
+
children: f,
|
|
11
|
+
...o
|
|
12
|
+
}, s) => /* @__PURE__ */ p(
|
|
16
13
|
"div",
|
|
17
14
|
{
|
|
18
|
-
ref:
|
|
19
|
-
className: `tiptap-badge ${
|
|
15
|
+
ref: s,
|
|
16
|
+
className: `tiptap-badge ${r || ""}`,
|
|
20
17
|
"data-style": a,
|
|
21
18
|
"data-size": t,
|
|
22
19
|
"data-appearance": e,
|
|
23
|
-
"data-text-trim":
|
|
24
|
-
...
|
|
25
|
-
children:
|
|
20
|
+
"data-text-trim": d ? "on" : "off",
|
|
21
|
+
...o,
|
|
22
|
+
children: f
|
|
26
23
|
}
|
|
27
24
|
)
|
|
28
25
|
);
|
|
29
|
-
|
|
26
|
+
l.displayName = "Badge";
|
|
30
27
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
l as Badge,
|
|
29
|
+
l as default
|
|
33
30
|
};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as s, useMemo as d, Fragment as b } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
/* empty css */
|
|
7
|
-
import { Tooltip as h, TooltipTrigger as g, TooltipContent as y } from "../tooltip/tooltip.js";
|
|
8
|
-
const B = ({
|
|
3
|
+
import { Tooltip as f, TooltipTrigger as h, TooltipContent as g } from "../tooltip/tooltip.js";
|
|
4
|
+
import { parseShortcutKeys as y, cn as l } from "../../../lib/tiptap-utils.js";
|
|
5
|
+
import '../../../assets/button.css';const B = ({
|
|
9
6
|
shortcuts: t
|
|
10
|
-
}) => t.length === 0 ? null : /* @__PURE__ */ o("div", { children: t.map((a, r) => /* @__PURE__ */
|
|
7
|
+
}) => t.length === 0 ? null : /* @__PURE__ */ o("div", { children: t.map((a, r) => /* @__PURE__ */ i(b, { children: [
|
|
11
8
|
r > 0 && /* @__PURE__ */ o("kbd", { children: "+" }),
|
|
12
9
|
/* @__PURE__ */ o("kbd", { children: a })
|
|
13
10
|
] }, r)) }), N = s(
|
|
@@ -15,36 +12,36 @@ const B = ({
|
|
|
15
12
|
className: t,
|
|
16
13
|
children: a,
|
|
17
14
|
tooltip: r,
|
|
18
|
-
showTooltip:
|
|
15
|
+
showTooltip: n = !0,
|
|
19
16
|
shortcutKeys: e,
|
|
20
|
-
"aria-label":
|
|
21
|
-
...
|
|
17
|
+
"aria-label": u,
|
|
18
|
+
...p
|
|
22
19
|
}, m) => {
|
|
23
20
|
const c = d(
|
|
24
|
-
() =>
|
|
21
|
+
() => y({ shortcutKeys: e }),
|
|
25
22
|
[e]
|
|
26
23
|
);
|
|
27
|
-
return !r || !
|
|
24
|
+
return !r || !n ? /* @__PURE__ */ o(
|
|
28
25
|
"button",
|
|
29
26
|
{
|
|
30
27
|
className: l("tiptap-button", t),
|
|
31
28
|
ref: m,
|
|
32
|
-
"aria-label":
|
|
33
|
-
...
|
|
29
|
+
"aria-label": u,
|
|
30
|
+
...p,
|
|
34
31
|
children: a
|
|
35
32
|
}
|
|
36
|
-
) : /* @__PURE__ */
|
|
33
|
+
) : /* @__PURE__ */ i(f, { delay: 200, children: [
|
|
37
34
|
/* @__PURE__ */ o(
|
|
38
|
-
|
|
35
|
+
h,
|
|
39
36
|
{
|
|
40
37
|
className: l("tiptap-button", t),
|
|
41
38
|
ref: m,
|
|
42
|
-
"aria-label":
|
|
43
|
-
...
|
|
39
|
+
"aria-label": u,
|
|
40
|
+
...p,
|
|
44
41
|
children: a
|
|
45
42
|
}
|
|
46
43
|
),
|
|
47
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ i(g, { children: [
|
|
48
45
|
r,
|
|
49
46
|
/* @__PURE__ */ o(B, { shortcuts: c })
|
|
50
47
|
] })
|
|
@@ -52,14 +49,14 @@ const B = ({
|
|
|
52
49
|
}
|
|
53
50
|
);
|
|
54
51
|
N.displayName = "Button";
|
|
55
|
-
const T = s(({ className: t, children: a, orientation: r = "vertical", ...
|
|
52
|
+
const T = s(({ className: t, children: a, orientation: r = "vertical", ...n }, e) => /* @__PURE__ */ o(
|
|
56
53
|
"div",
|
|
57
54
|
{
|
|
58
55
|
ref: e,
|
|
59
56
|
className: l("tiptap-button-group", t),
|
|
60
57
|
"data-orientation": r,
|
|
61
58
|
role: "group",
|
|
62
|
-
...
|
|
59
|
+
...n,
|
|
63
60
|
children: a
|
|
64
61
|
}
|
|
65
62
|
));
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as e } from "react";
|
|
3
3
|
import { cn as o } from "../../../lib/tiptap-utils.js";
|
|
4
|
-
import '../../../assets/
|
|
5
|
-
|
|
6
|
-
({ className: a, ...r }, t) => /* @__PURE__ */ d("div", { ref: t, className: o("tiptap-card", a), ...r })
|
|
4
|
+
import '../../../assets/card.css';const i = e(
|
|
5
|
+
({ className: a, ...r }, d) => /* @__PURE__ */ t("div", { ref: d, className: o("tiptap-card", a), ...r })
|
|
7
6
|
);
|
|
8
7
|
i.displayName = "Card";
|
|
9
8
|
const s = e(
|
|
10
|
-
({ className: a, ...r },
|
|
9
|
+
({ className: a, ...r }, d) => /* @__PURE__ */ t(
|
|
11
10
|
"div",
|
|
12
11
|
{
|
|
13
|
-
ref:
|
|
12
|
+
ref: d,
|
|
14
13
|
className: o("tiptap-card-header", a),
|
|
15
14
|
...r
|
|
16
15
|
}
|
|
@@ -18,24 +17,24 @@ const s = e(
|
|
|
18
17
|
);
|
|
19
18
|
s.displayName = "CardHeader";
|
|
20
19
|
const m = e(
|
|
21
|
-
({ className: a, ...r },
|
|
20
|
+
({ className: a, ...r }, d) => /* @__PURE__ */ t("div", { ref: d, className: o("tiptap-card-body", a), ...r })
|
|
22
21
|
);
|
|
23
22
|
m.displayName = "CardBody";
|
|
24
|
-
const c = e(({ className: a, orientation: r = "vertical", ...
|
|
23
|
+
const c = e(({ className: a, orientation: r = "vertical", ...d }, p) => /* @__PURE__ */ t(
|
|
25
24
|
"div",
|
|
26
25
|
{
|
|
27
26
|
ref: p,
|
|
28
27
|
"data-orientation": r,
|
|
29
28
|
className: o("tiptap-card-item-group", a),
|
|
30
|
-
...
|
|
29
|
+
...d
|
|
31
30
|
}
|
|
32
31
|
));
|
|
33
32
|
c.displayName = "CardItemGroup";
|
|
34
33
|
const l = e(
|
|
35
|
-
({ className: a, ...r },
|
|
34
|
+
({ className: a, ...r }, d) => /* @__PURE__ */ t(
|
|
36
35
|
"div",
|
|
37
36
|
{
|
|
38
|
-
ref:
|
|
37
|
+
ref: d,
|
|
39
38
|
className: o("tiptap-card-group-label", a),
|
|
40
39
|
...r
|
|
41
40
|
}
|
|
@@ -43,10 +42,10 @@ const l = e(
|
|
|
43
42
|
);
|
|
44
43
|
l.displayName = "CardGroupLabel";
|
|
45
44
|
const n = e(
|
|
46
|
-
({ className: a, ...r },
|
|
45
|
+
({ className: a, ...r }, d) => /* @__PURE__ */ t(
|
|
47
46
|
"div",
|
|
48
47
|
{
|
|
49
|
-
ref:
|
|
48
|
+
ref: d,
|
|
50
49
|
className: o("tiptap-card-footer", a),
|
|
51
50
|
...r
|
|
52
51
|
}
|