@uxf/wysiwyg 16.1.0 → 16.3.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxf/wysiwyg",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.3.0",
|
|
4
4
|
"description": "UXF Wysiwyg editor",
|
|
5
5
|
"author": "UX Fans s.r.o. <dev@uxf.cz>",
|
|
6
6
|
"homepage": "https://fe.uxf.dev/docs/wysiwyg",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"@platejs/link": "53.3.5",
|
|
19
19
|
"@platejs/list-classic": "53.0.0",
|
|
20
20
|
"@platejs/media": "53.1.4",
|
|
21
|
-
"@uxf/core": "
|
|
22
|
-
"@uxf/core-react": "16.
|
|
23
|
-
"@uxf/ui": "16.
|
|
21
|
+
"@uxf/core": "16.3.0",
|
|
22
|
+
"@uxf/core-react": "16.3.0",
|
|
23
|
+
"@uxf/ui": "16.3.0",
|
|
24
24
|
"platejs": "53.3.15",
|
|
25
25
|
"react": "^19.3.0",
|
|
26
26
|
"react-dom": "^19.3.0"
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"@platejs/media": "53.1.4",
|
|
34
34
|
"@types/react": "19.3.0",
|
|
35
35
|
"@types/react-dom": "19.3.0",
|
|
36
|
-
"@uxf/core": "
|
|
37
|
-
"@uxf/core-react": "16.
|
|
38
|
-
"@uxf/ui": "16.
|
|
36
|
+
"@uxf/core": "16.3.0",
|
|
37
|
+
"@uxf/core-react": "16.3.0",
|
|
38
|
+
"@uxf/ui": "16.3.0",
|
|
39
39
|
"platejs": "53.3.15",
|
|
40
40
|
"react": "19.3.1",
|
|
41
41
|
"react-dom": "19.3.1"
|
|
@@ -32,6 +32,8 @@ afterEach(() => {
|
|
|
32
32
|
test("a pasted image URL that answers with an error is not uploaded", async () => {
|
|
33
33
|
global.fetch = jest.fn().mockResolvedValue({ ok: false, status: 404, blob: async () => new Blob() });
|
|
34
34
|
const { editor, uploadImage } = createEditor();
|
|
35
|
+
// the image plugin's insertData is async (see the next test), though Plate types it as returning a boolean
|
|
36
|
+
// oxlint-disable-next-line typescript/await-thenable
|
|
35
37
|
await editor.tf.insertData(textData("https://example.com/missing.png"));
|
|
36
38
|
expect(uploadImage).not.toHaveBeenCalled();
|
|
37
39
|
});
|
|
@@ -71,11 +71,11 @@ describe("an li with more than one lic", () => {
|
|
|
71
71
|
expect(outline(editor).at(0)).toEqual(["ul", ["aa1", "b", "c"]]);
|
|
72
72
|
});
|
|
73
73
|
it("gives the split-off item an id of its own", () => {
|
|
74
|
-
var _a;
|
|
74
|
+
var _a, _b;
|
|
75
75
|
const editor = createEditor([
|
|
76
76
|
{ children: [{ children: [content("a"), content("b")], type: "li" }], type: "ul" },
|
|
77
77
|
]);
|
|
78
|
-
const ids = ((_a = editor.children.at(0)) === null || _a === void 0 ? void 0 : _a.children).map((item) => item.id);
|
|
78
|
+
const ids = ((_b = (_a = editor.children.at(0)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : []).map((item) => item.id);
|
|
79
79
|
expect(ids).toHaveLength(2);
|
|
80
80
|
expect(new Set(ids).size).toBe(2);
|
|
81
81
|
});
|
|
@@ -46,7 +46,7 @@ const modal_buttons_1 = require("../components/modal/modal-buttons");
|
|
|
46
46
|
const modal_content_1 = require("../components/modal/modal-content");
|
|
47
47
|
const utils_2 = require("../utils");
|
|
48
48
|
const CLASS_NAME = "uxf-wysiwyg__insert-modal-video";
|
|
49
|
-
// eslint-disable-next-line react/destructuring-assignment
|
|
49
|
+
// eslint-disable-next-line react-js/destructuring-assignment
|
|
50
50
|
const InsertVideoModalContent = t0 => {
|
|
51
51
|
var _a;
|
|
52
52
|
const $ = (0, compiler_runtime_1.c)(37);
|