@edifice.io/react 2.2.5-develop-pedago.20250527155749 → 2.2.5-develop-pedago.20250604113312
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/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.js +1 -1
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.js +1 -1
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.js +2 -2
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.js +2 -2
- package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.js +33 -12
- package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.js +28 -11
- package/package.json +6 -6
|
@@ -10,7 +10,7 @@ const EditorToolbarDropdownMenu = ({
|
|
|
10
10
|
options
|
|
11
11
|
}) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12
12
|
/* @__PURE__ */ jsx(Tooltip, { message: ariaLabel, placement: "top", children: /* @__PURE__ */ jsx(IconButton, { ...triggerProps, type: "button", variant: "ghost", color: "tertiary", icon, "aria-label": ariaLabel }) }),
|
|
13
|
-
/* @__PURE__ */ jsx(Dropdown.Menu, { children: options.map((option, index) => /* @__PURE__ */ jsx(Fragment$1, { children: option.type === "divider" ? /* @__PURE__ */ jsx(Dropdown.Separator, {}) : /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: () => option.action(null), children: option.label }) }, index)) })
|
|
13
|
+
/* @__PURE__ */ jsx(Dropdown.Menu, { children: options.map((option, index) => /* @__PURE__ */ jsx(Fragment$1, { children: option.type === "divider" ? /* @__PURE__ */ jsx(Dropdown.Separator, {}) : /* @__PURE__ */ jsx("div", { onMouseDown: (e) => e.preventDefault(), children: /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: () => option.action(null), children: option.label }) }) }, index)) })
|
|
14
14
|
] });
|
|
15
15
|
export {
|
|
16
16
|
EditorToolbarDropdownMenu
|
|
@@ -10,7 +10,7 @@ const EditorToolbarPlusMenu = ({
|
|
|
10
10
|
} = useTranslation();
|
|
11
11
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12
12
|
/* @__PURE__ */ jsx(Dropdown.Trigger, { variant: "ghost", label: t("tiptap.toolbar.plus"), size: "md", tabIndex: -1 }),
|
|
13
|
-
/* @__PURE__ */ jsx(Dropdown.Menu, { children: options.map((option, index) => /* @__PURE__ */ jsx(Fragment$1, { children: option.type === "divider" ? /* @__PURE__ */ jsx(Dropdown.Separator, {}) : /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: () => option.action(null), children: option.label }) }, index)) })
|
|
13
|
+
/* @__PURE__ */ jsx(Dropdown.Menu, { children: options.map((option, index) => /* @__PURE__ */ jsx(Fragment$1, { children: option.type === "divider" ? /* @__PURE__ */ jsx(Dropdown.Separator, {}) : /* @__PURE__ */ jsx("div", { onMouseDown: (e) => e.preventDefault(), children: /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: () => option.action(null), children: option.label }) }) }, index)) })
|
|
14
14
|
] });
|
|
15
15
|
};
|
|
16
16
|
export {
|
|
@@ -18,7 +18,7 @@ const EditorToolbarTextSize = ({
|
|
|
18
18
|
id: "title-1",
|
|
19
19
|
label: t("tiptap.toolbar.size.h1"),
|
|
20
20
|
className: "fs-2 fw-bold text-secondary",
|
|
21
|
-
action: () => editor == null ? void 0 : editor.chain().focus().setCustomHeading({
|
|
21
|
+
action: () => editor == null ? void 0 : editor.chain().focus().scrollIntoView().setCustomHeading({
|
|
22
22
|
level: 1
|
|
23
23
|
}).run(),
|
|
24
24
|
visibility: hasExtension("customHeading", editor)
|
|
@@ -54,7 +54,7 @@ const EditorToolbarTextSize = ({
|
|
|
54
54
|
}];
|
|
55
55
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
56
56
|
/* @__PURE__ */ jsx(Tooltip, { message: t("tiptap.toolbar.size.choice"), placement: "top", children: /* @__PURE__ */ jsx(IconButton, { ...triggerProps, type: "button", variant: "ghost", color: "tertiary", icon: /* @__PURE__ */ jsx(SvgIconTextSize, {}), "aria-label": t("tiptap.toolbar.size.choice") }) }),
|
|
57
|
-
/* @__PURE__ */ jsx(Dropdown.Menu, { children: textOptions.map((option) => /* @__PURE__ */ jsx(Fragment$1, { children: option.type === "divider" && option.visibility ? /* @__PURE__ */ jsx(Dropdown.Separator, {}) : option.visibility ? /* @__PURE__ */ jsx(Dropdown.Item, { onClick: option.action, children: /* @__PURE__ */ jsx("span", { className: option.className, children: option.label }) }) : null }, option.id)) })
|
|
57
|
+
/* @__PURE__ */ jsx(Dropdown.Menu, { children: textOptions.map((option) => /* @__PURE__ */ jsx(Fragment$1, { children: option.type === "divider" && option.visibility ? /* @__PURE__ */ jsx(Dropdown.Separator, {}) : option.visibility ? /* @__PURE__ */ jsx("div", { onMouseDown: (e) => e.preventDefault(), children: /* @__PURE__ */ jsx(Dropdown.Item, { onClick: option.action, children: /* @__PURE__ */ jsx("span", { className: option.className, children: option.label }) }) }) : null }, option.id)) })
|
|
58
58
|
] });
|
|
59
59
|
};
|
|
60
60
|
export {
|
|
@@ -42,9 +42,9 @@ const EditorToolbarTypography = ({
|
|
|
42
42
|
/* @__PURE__ */ jsx(Tooltip, { message: t("tiptap.toolbar.typo.choice"), placement: "top", children: /* @__PURE__ */ jsx(IconButton, { ...triggerProps, type: "button", variant: "ghost", color: "tertiary", icon: /* @__PURE__ */ jsx(SvgIconTextTypo, {}), "aria-label": t("tiptap.toolbar.typo.choice"), className: editor != null && editor.isActive("textStyle", {
|
|
43
43
|
color: /^#([0-9a-f]{3}){1,2}$/i
|
|
44
44
|
}) ? "selected" : "" }) }),
|
|
45
|
-
/* @__PURE__ */ jsx(Dropdown.Menu, { children: options.map((option) => /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(Dropdown.RadioItem, { value: option.value, model: value, onChange: (value2) => {
|
|
45
|
+
/* @__PURE__ */ jsx(Dropdown.Menu, { children: options.map((option) => /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx("div", { onMouseDown: (e) => e.preventDefault(), children: /* @__PURE__ */ jsx(Dropdown.RadioItem, { value: option.value, model: value, onChange: (value2) => {
|
|
46
46
|
typeof value2 == "string" && value2.length > 0 ? (editor == null || editor.chain().focus().setFontFamily(value2).run(), setValue(value2)) : (editor == null || editor.chain().focus().unsetFontFamily().run(), setValue(""));
|
|
47
|
-
}, children: /* @__PURE__ */ jsx("span", { className: option.className, children: option.label }) }) }, option.label)) })
|
|
47
|
+
}, children: /* @__PURE__ */ jsx("span", { className: option.className, children: option.label }) }) }) }, option.label)) })
|
|
48
48
|
] });
|
|
49
49
|
};
|
|
50
50
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, Fragment
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
3
|
import SvgIconArrowDown from "../../../icons/components/IconArrowDown.js";
|
|
4
4
|
import SvgIconArrowLeft from "../../../icons/components/IconArrowLeft.js";
|
|
@@ -13,19 +13,40 @@ const TableToolbarAddMenu = ({
|
|
|
13
13
|
}) => {
|
|
14
14
|
const {
|
|
15
15
|
t
|
|
16
|
-
} = useTranslation()
|
|
16
|
+
} = useTranslation(), addOptions = [{
|
|
17
|
+
key: "add-above",
|
|
18
|
+
icon: /* @__PURE__ */ jsx(SvgIconArrowUp, {}),
|
|
19
|
+
onClick: () => editor == null ? void 0 : editor.chain().focus().addRowBefore().run(),
|
|
20
|
+
label: t("tiptap.table.toolbar.line.above")
|
|
21
|
+
}, {
|
|
22
|
+
key: "add-below",
|
|
23
|
+
icon: /* @__PURE__ */ jsx(SvgIconArrowDown, {}),
|
|
24
|
+
onClick: () => editor == null ? void 0 : editor.chain().focus().addRowAfter().run(),
|
|
25
|
+
label: t("tiptap.table.toolbar.line.below")
|
|
26
|
+
}, {
|
|
27
|
+
key: "add-left",
|
|
28
|
+
icon: /* @__PURE__ */ jsx(SvgIconArrowLeft, {}),
|
|
29
|
+
onClick: () => editor == null ? void 0 : editor.chain().focus().addColumnBefore().run(),
|
|
30
|
+
label: t("tiptap.table.toolbar.col.left")
|
|
31
|
+
}, {
|
|
32
|
+
key: "add-right",
|
|
33
|
+
icon: /* @__PURE__ */ jsx(SvgIconArrowRight, {}),
|
|
34
|
+
onClick: () => editor == null ? void 0 : editor.chain().focus().addColumnAfter().run(),
|
|
35
|
+
label: t("tiptap.table.toolbar.col.right")
|
|
36
|
+
}, {
|
|
37
|
+
key: "header-row",
|
|
38
|
+
icon: /* @__PURE__ */ jsx(SvgIconHighlightRow, {}),
|
|
39
|
+
onClick: () => editor == null ? void 0 : editor.chain().focus().toggleHeaderRow().run(),
|
|
40
|
+
label: t("tiptap.table.toolbar.line.head")
|
|
41
|
+
}, {
|
|
42
|
+
key: "header-col",
|
|
43
|
+
icon: /* @__PURE__ */ jsx(SvgIconHighlightColumn, {}),
|
|
44
|
+
onClick: () => editor == null ? void 0 : editor.chain().focus().toggleHeaderColumn().run(),
|
|
45
|
+
label: t("tiptap.table.toolbar.col.head")
|
|
46
|
+
}];
|
|
17
47
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18
48
|
/* @__PURE__ */ jsx(Tooltip, { message: t("tiptap.table.toolbar.tooltip.add"), placement: "top", children: /* @__PURE__ */ jsx(Dropdown.Trigger, { variant: "ghost", label: t("tiptap.table.toolbar.add") }) }),
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */ jsx(Dropdown.Item, { icon: /* @__PURE__ */ jsx(SvgIconArrowUp, {}), onClick: () => editor == null ? void 0 : editor.chain().focus().addRowBefore().run(), children: t("tiptap.table.toolbar.line.above") }, "add-above"),
|
|
21
|
-
/* @__PURE__ */ jsx(Dropdown.Item, { icon: /* @__PURE__ */ jsx(SvgIconArrowDown, {}), onClick: () => editor == null ? void 0 : editor.chain().focus().addRowAfter().run(), children: t("tiptap.table.toolbar.line.below") }, "add-below"),
|
|
22
|
-
/* @__PURE__ */ jsx(Dropdown.Separator, {}),
|
|
23
|
-
/* @__PURE__ */ jsx(Dropdown.Item, { icon: /* @__PURE__ */ jsx(SvgIconArrowLeft, {}), onClick: () => editor == null ? void 0 : editor.chain().focus().addColumnBefore().run(), children: t("tiptap.table.toolbar.col.left") }, "add-left"),
|
|
24
|
-
/* @__PURE__ */ jsx(Dropdown.Item, { icon: /* @__PURE__ */ jsx(SvgIconArrowRight, {}), onClick: () => editor == null ? void 0 : editor.chain().focus().addColumnAfter().run(), children: t("tiptap.table.toolbar.col.right") }, "add-right"),
|
|
25
|
-
/* @__PURE__ */ jsx(Dropdown.Separator, {}),
|
|
26
|
-
/* @__PURE__ */ jsx(Dropdown.Item, { icon: /* @__PURE__ */ jsx(SvgIconHighlightRow, {}), onClick: () => editor == null ? void 0 : editor.chain().focus().toggleHeaderRow().run(), children: t("tiptap.table.toolbar.line.head") }, "header-row"),
|
|
27
|
-
/* @__PURE__ */ jsx(Dropdown.Item, { icon: /* @__PURE__ */ jsx(SvgIconHighlightColumn, {}), onClick: () => editor == null ? void 0 : editor.chain().focus().toggleHeaderColumn().run(), children: t("tiptap.table.toolbar.col.head") }, "header-col")
|
|
28
|
-
] })
|
|
49
|
+
/* @__PURE__ */ jsx(Dropdown.Menu, { children: addOptions.map((option) => /* @__PURE__ */ jsx("div", { onMouseDown: (e) => e.preventDefault(), children: /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: option.onClick, children: option.label }, option.key) })) })
|
|
29
50
|
] });
|
|
30
51
|
};
|
|
31
52
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, Fragment
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
3
|
import SvgIconDeleteColumnHighlight from "../../../icons/components/IconDeleteColumnHighlight.js";
|
|
4
4
|
import SvgIconDeleteColumn from "../../../icons/components/IconDeleteColumn.js";
|
|
@@ -12,18 +12,35 @@ const TableToolbarDelMenu = ({
|
|
|
12
12
|
}) => {
|
|
13
13
|
const {
|
|
14
14
|
t
|
|
15
|
-
} = useTranslation()
|
|
15
|
+
} = useTranslation(), delOptions = [{
|
|
16
|
+
key: "del-row",
|
|
17
|
+
icon: /* @__PURE__ */ jsx(SvgIconDeleteRow, {}),
|
|
18
|
+
onClick: () => editor == null ? void 0 : editor.chain().focus().deleteRow().run(),
|
|
19
|
+
label: t("tiptap.table.toolbar.del.line")
|
|
20
|
+
}, {
|
|
21
|
+
key: "del-col",
|
|
22
|
+
icon: /* @__PURE__ */ jsx(SvgIconDeleteColumn, {}),
|
|
23
|
+
onClick: () => editor == null ? void 0 : editor.chain().focus().deleteColumn().run(),
|
|
24
|
+
label: t("tiptap.table.toolbar.del.col")
|
|
25
|
+
}, {
|
|
26
|
+
key: "del-header-row",
|
|
27
|
+
icon: /* @__PURE__ */ jsx(SvgIconDeleteRowHighlight, {}),
|
|
28
|
+
onClick: () => editor == null ? void 0 : editor.chain().focus().toggleHeaderRow().run(),
|
|
29
|
+
label: t("tiptap.table.toolbar.del.line.head")
|
|
30
|
+
}, {
|
|
31
|
+
key: "del-header-col",
|
|
32
|
+
icon: /* @__PURE__ */ jsx(SvgIconDeleteColumnHighlight, {}),
|
|
33
|
+
onClick: () => editor == null ? void 0 : editor.chain().focus().toggleHeaderColumn().run(),
|
|
34
|
+
label: t("tiptap.table.toolbar.del.col.head")
|
|
35
|
+
}, {
|
|
36
|
+
key: "del-table",
|
|
37
|
+
icon: /* @__PURE__ */ jsx(SvgIconDelete, {}),
|
|
38
|
+
onClick: () => editor == null ? void 0 : editor.chain().focus().deleteTable().run(),
|
|
39
|
+
label: t("tiptap.table.toolbar.del.array")
|
|
40
|
+
}];
|
|
16
41
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17
42
|
/* @__PURE__ */ jsx(Tooltip, { message: t("tiptap.table.toolbar.tooltip.del"), placement: "top", children: /* @__PURE__ */ jsx(Dropdown.Trigger, { variant: "ghost", label: t("tiptap.table.toolbar.del") }) }),
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */ jsx(Dropdown.Item, { icon: /* @__PURE__ */ jsx(SvgIconDeleteRow, {}), onClick: () => editor == null ? void 0 : editor.chain().focus().deleteRow().run(), children: t("tiptap.table.toolbar.del.line") }, "del-row"),
|
|
20
|
-
/* @__PURE__ */ jsx(Dropdown.Item, { icon: /* @__PURE__ */ jsx(SvgIconDeleteColumn, {}), onClick: () => editor == null ? void 0 : editor.chain().focus().deleteColumn().run(), children: t("tiptap.table.toolbar.del.col") }, "del-col"),
|
|
21
|
-
/* @__PURE__ */ jsx(Dropdown.Separator, {}),
|
|
22
|
-
/* @__PURE__ */ jsx(Dropdown.Item, { icon: /* @__PURE__ */ jsx(SvgIconDeleteRowHighlight, {}), onClick: () => editor == null ? void 0 : editor.chain().focus().toggleHeaderRow().run(), children: t("tiptap.table.toolbar.del.line.head") }, "del-header-row"),
|
|
23
|
-
/* @__PURE__ */ jsx(Dropdown.Item, { icon: /* @__PURE__ */ jsx(SvgIconDeleteColumnHighlight, {}), onClick: () => editor == null ? void 0 : editor.chain().focus().toggleHeaderColumn().run(), children: t("tiptap.table.toolbar.del.col.head") }, "del-header-col"),
|
|
24
|
-
/* @__PURE__ */ jsx(Dropdown.Separator, {}),
|
|
25
|
-
/* @__PURE__ */ jsx(Dropdown.Item, { icon: /* @__PURE__ */ jsx(SvgIconDelete, {}), onClick: () => editor == null ? void 0 : editor.chain().focus().deleteTable().run(), children: t("tiptap.table.toolbar.del.array") }, "del-table")
|
|
26
|
-
] })
|
|
43
|
+
/* @__PURE__ */ jsx(Dropdown.Menu, { children: delOptions.map((option) => /* @__PURE__ */ jsx("div", { onMouseDown: (e) => e.preventDefault(), children: /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: option.onClick, children: option.label }, option.key) })) })
|
|
27
44
|
] });
|
|
28
45
|
};
|
|
29
46
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.2.5-develop-pedago.
|
|
3
|
+
"version": "2.2.5-develop-pedago.20250604113312",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -118,9 +118,9 @@
|
|
|
118
118
|
"react-slugify": "^3.0.3",
|
|
119
119
|
"swiper": "^10.1.0",
|
|
120
120
|
"ua-parser-js": "^1.0.36",
|
|
121
|
-
"@edifice.io/bootstrap": "2.2.5-develop-pedago.
|
|
122
|
-
"@edifice.io/tiptap-extensions": "2.2.5-develop-pedago.
|
|
123
|
-
"@edifice.io/utilities": "2.2.5-develop-pedago.
|
|
121
|
+
"@edifice.io/bootstrap": "2.2.5-develop-pedago.20250604113312",
|
|
122
|
+
"@edifice.io/tiptap-extensions": "2.2.5-develop-pedago.20250604113312",
|
|
123
|
+
"@edifice.io/utilities": "2.2.5-develop-pedago.20250604113312"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
126
|
"@babel/plugin-transform-react-pure-annotations": "^7.23.3",
|
|
@@ -151,8 +151,8 @@
|
|
|
151
151
|
"vite": "^5.4.11",
|
|
152
152
|
"vite-plugin-dts": "^4.1.0",
|
|
153
153
|
"vite-tsconfig-paths": "^5.0.1",
|
|
154
|
-
"@edifice.io/client": "2.2.5-develop-pedago.
|
|
155
|
-
"@edifice.io/config": "2.2.5-develop-pedago.
|
|
154
|
+
"@edifice.io/client": "2.2.5-develop-pedago.20250604113312",
|
|
155
|
+
"@edifice.io/config": "2.2.5-develop-pedago.20250604113312"
|
|
156
156
|
},
|
|
157
157
|
"peerDependencies": {
|
|
158
158
|
"@react-spring/web": "^9.7.5",
|