@uxf/wysiwyg 11.130.0 → 12.0.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": "11.130.0",
3
+ "version": "12.0.0",
4
4
  "description": "UXF Wysiwyg editor",
5
5
  "author": "Robin Dvorak <dvorak@uxf.cz>",
6
6
  "homepage": "https://gitlab.com/uxf-npm/wysiwyg",
@@ -19,8 +19,8 @@
19
19
  "@platejs/list-classic": "53.0.0",
20
20
  "@platejs/media": "53.1.4",
21
21
  "@uxf/core": "11.129.0",
22
- "@uxf/core-react": "11.129.0",
23
- "@uxf/ui": "11.129.0",
22
+ "@uxf/core-react": "12.0.0",
23
+ "@uxf/ui": "12.0.0",
24
24
  "platejs": "53.3.9",
25
25
  "react": ">=18.2.0",
26
26
  "react-dom": ">=18.2.0"
@@ -34,8 +34,8 @@
34
34
  "@types/react": "18.3.31",
35
35
  "@types/react-dom": "18.3.7",
36
36
  "@uxf/core": "11.129.0",
37
- "@uxf/core-react": "11.129.0",
38
- "@uxf/ui": "11.129.0",
37
+ "@uxf/core-react": "12.0.0",
38
+ "@uxf/ui": "12.0.0",
39
39
  "platejs": "53.3.9",
40
40
  "react": "18.3.1",
41
41
  "react-dom": "18.3.1"
@@ -30,7 +30,7 @@ const createBlockquotePlugin = () => (0, react_1.createPlatePlugin)({
30
30
  editor.tf.toggleBlock(types_1.BLOCKQUOTE_PLUGIN_TYPE);
31
31
  return true;
32
32
  },
33
- keys: "mod+shift+.",
33
+ keys: "mod+shift+period",
34
34
  },
35
35
  },
36
36
  });
@@ -24,9 +24,11 @@ describe("blockquote", () => {
24
24
  expect(e.children[0].children).toEqual([{ text: "citace" }]);
25
25
  });
26
26
  // @udecode/plate-block-quote@20.7.2 defaulted to mod+shift+. ; Plate 53 ships no quote shortcut.
27
- it("keeps the mod+shift+. hotkey", () => {
27
+ // Spelled "period", not ".": the matcher compares event.key, and the physical period key with
28
+ // shift held reports ">", so "mod+shift+." never fires. Covered in the browser by hotkeys.e2e.ts.
29
+ it("keeps the mod+shift+period hotkey", () => {
28
30
  var _a;
29
- expect((_a = editor([]).plugins.blockquote.shortcuts.toggle) === null || _a === void 0 ? void 0 : _a.keys).toBe("mod+shift+.");
31
+ expect((_a = editor([]).plugins.blockquote.shortcuts.toggle) === null || _a === void 0 ? void 0 : _a.keys).toBe("mod+shift+period");
30
32
  });
31
33
  // Plate 20 inserted a literal "\n" and never let Enter out of a quote. Deliberately changed.
32
34
  it("splits the quote on Enter", () => {
@@ -9,6 +9,17 @@ const createHighlightPlugin = (color = "yellow") => (0, react_1.createPlatePlugi
9
9
  node: { isLeaf: true },
10
10
  options: { color },
11
11
  parsers: { html: { deserializer: { rules: [{ validNodeName: ["MARK"] }] } } },
12
- shortcuts: { toggle: { keys: "mod+shift+h" } },
12
+ // The handler is not optional: a bare `keys` shortcut resolves through the plugin's own
13
+ // toggle transform, which Plate's marks get from `toPlatePlugin` and a hand-written plugin
14
+ // does not have. Without it the hotkey silently does nothing.
15
+ shortcuts: {
16
+ toggle: {
17
+ handler: ({ editor }) => {
18
+ editor.tf.toggleMark(types_1.HIGHLIGHT_PLUGIN_KEY);
19
+ return true;
20
+ },
21
+ keys: "mod+shift+h",
22
+ },
23
+ },
13
24
  });
14
25
  exports.createHighlightPlugin = createHighlightPlugin;