@firecms/core 3.0.0-canary.223 → 3.0.0-canary.224

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@firecms/core",
3
3
  "type": "module",
4
- "version": "3.0.0-canary.223",
4
+ "version": "3.0.0-canary.224",
5
5
  "description": "Awesome Firebase/Firestore-based headless open-source CMS",
6
6
  "funding": {
7
7
  "url": "https://github.com/sponsors/firecmsco"
@@ -50,9 +50,9 @@
50
50
  "./package.json": "./package.json"
51
51
  },
52
52
  "dependencies": {
53
- "@firecms/editor": "^3.0.0-canary.223",
54
- "@firecms/formex": "^3.0.0-canary.223",
55
- "@firecms/ui": "^3.0.0-canary.223",
53
+ "@firecms/editor": "^3.0.0-canary.224",
54
+ "@firecms/formex": "^3.0.0-canary.224",
55
+ "@firecms/ui": "^3.0.0-canary.224",
56
56
  "@hello-pangea/dnd": "^17.0.0",
57
57
  "@radix-ui/react-portal": "^1.1.3",
58
58
  "clsx": "^2.1.1",
@@ -105,7 +105,7 @@
105
105
  "dist",
106
106
  "src"
107
107
  ],
108
- "gitHead": "279654356c6a23355aab5fcf78d1171339025610",
108
+ "gitHead": "3697a46bef0a8e75b2336043344e02caf0034cbe",
109
109
  "publishConfig": {
110
110
  "access": "public"
111
111
  },
@@ -1,4 +1,4 @@
1
- import React, { useRef, useEffect, useCallback } from "react";
1
+ import React, { useRef } from "react";
2
2
  import { Highlight, themes } from "prism-react-renderer";
3
3
  import { useModeController } from "../hooks";
4
4
 
@@ -8,33 +8,33 @@ export function EntityJsonPreview({ values }: { values: object }) {
8
8
  const preRef = useRef<HTMLPreElement>(null);
9
9
 
10
10
  // Global keydown handler
11
- const handleGlobalKeyDown = useCallback((e: KeyboardEvent) => {
12
- // Check for Control (Windows/Linux) or Command (macOS) + "a":
13
- if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "a") {
14
- // If our code view is mounted, perform selection
15
- if (preRef.current) {
16
- e.preventDefault();
17
- e.stopPropagation();
11
+ // const handleGlobalKeyDown = useCallback((e: KeyboardEvent) => {
12
+ // // Check for Control (Windows/Linux) or Command (macOS) + "a":
13
+ // if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "a") {
14
+ // // If our code view is mounted, perform selection
15
+ // if (preRef.current) {
16
+ // e.preventDefault();
17
+ // e.stopPropagation();
18
+ //
19
+ // const selection = window.getSelection();
20
+ // const range = document.createRange();
21
+ // range.selectNodeContents(preRef.current);
22
+ // if (selection) {
23
+ // selection.removeAllRanges();
24
+ // selection.addRange(range);
25
+ // }
26
+ // }
27
+ // }
28
+ // }, []);
18
29
 
19
- const selection = window.getSelection();
20
- const range = document.createRange();
21
- range.selectNodeContents(preRef.current);
22
- if (selection) {
23
- selection.removeAllRanges();
24
- selection.addRange(range);
25
- }
26
- }
27
- }
28
- }, []);
29
-
30
- // Attach the global keydown listener when component mounts,
31
- // and remove it when it unmounts.
32
- useEffect(() => {
33
- document.addEventListener("keydown", handleGlobalKeyDown);
34
- return () => {
35
- document.removeEventListener("keydown", handleGlobalKeyDown);
36
- };
37
- }, [handleGlobalKeyDown]);
30
+ // // Attach the global keydown listener when component mounts,
31
+ // // and remove it when it unmounts.
32
+ // useEffect(() => {
33
+ // document.addEventListener("keydown", handleGlobalKeyDown);
34
+ // return () => {
35
+ // document.removeEventListener("keydown", handleGlobalKeyDown);
36
+ // };
37
+ // }, [handleGlobalKeyDown]);
38
38
 
39
39
  return (
40
40
  <Highlight