@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/dist/index.es.js +15 -54
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +15 -54
- package/dist/index.umd.js.map +1 -1
- package/package.json +5 -5
- package/src/components/EntityJsonPreview.tsx +27 -27
package/dist/index.umd.js
CHANGED
|
@@ -21077,7 +21077,7 @@
|
|
|
21077
21077
|
] });
|
|
21078
21078
|
}
|
|
21079
21079
|
function EntityJsonPreview(t0) {
|
|
21080
|
-
const $ = reactCompilerRuntime.c(
|
|
21080
|
+
const $ = reactCompilerRuntime.c(6);
|
|
21081
21081
|
const {
|
|
21082
21082
|
values
|
|
21083
21083
|
} = t0;
|
|
@@ -21094,55 +21094,16 @@
|
|
|
21094
21094
|
mode
|
|
21095
21095
|
} = useModeController();
|
|
21096
21096
|
const preRef = React.useRef(null);
|
|
21097
|
-
|
|
21098
|
-
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
21099
|
-
t2 = (e) => {
|
|
21100
|
-
if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "a") {
|
|
21101
|
-
if (preRef.current) {
|
|
21102
|
-
e.preventDefault();
|
|
21103
|
-
e.stopPropagation();
|
|
21104
|
-
const selection = window.getSelection();
|
|
21105
|
-
const range = document.createRange();
|
|
21106
|
-
range.selectNodeContents(preRef.current);
|
|
21107
|
-
if (selection) {
|
|
21108
|
-
selection.removeAllRanges();
|
|
21109
|
-
selection.addRange(range);
|
|
21110
|
-
}
|
|
21111
|
-
}
|
|
21112
|
-
}
|
|
21113
|
-
};
|
|
21114
|
-
$[2] = t2;
|
|
21115
|
-
} else {
|
|
21116
|
-
t2 = $[2];
|
|
21117
|
-
}
|
|
21118
|
-
const handleGlobalKeyDown = t2;
|
|
21097
|
+
const t2 = mode === "dark" ? prismReactRenderer.themes.vsDark : prismReactRenderer.themes.github;
|
|
21119
21098
|
let t3;
|
|
21120
|
-
|
|
21121
|
-
|
|
21122
|
-
t3 = () => {
|
|
21123
|
-
document.addEventListener("keydown", handleGlobalKeyDown);
|
|
21124
|
-
return () => {
|
|
21125
|
-
document.removeEventListener("keydown", handleGlobalKeyDown);
|
|
21126
|
-
};
|
|
21127
|
-
};
|
|
21128
|
-
t4 = [handleGlobalKeyDown];
|
|
21129
|
-
$[3] = t3;
|
|
21130
|
-
$[4] = t4;
|
|
21131
|
-
} else {
|
|
21132
|
-
t3 = $[3];
|
|
21133
|
-
t4 = $[4];
|
|
21134
|
-
}
|
|
21135
|
-
React.useEffect(t3, t4);
|
|
21136
|
-
const t5 = mode === "dark" ? prismReactRenderer.themes.vsDark : prismReactRenderer.themes.github;
|
|
21137
|
-
let t6;
|
|
21138
|
-
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
21139
|
-
t6 = (t72) => {
|
|
21099
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
21100
|
+
t3 = (t42) => {
|
|
21140
21101
|
const {
|
|
21141
21102
|
style,
|
|
21142
21103
|
tokens,
|
|
21143
21104
|
getLineProps,
|
|
21144
21105
|
getTokenProps
|
|
21145
|
-
} =
|
|
21106
|
+
} = t42;
|
|
21146
21107
|
return /* @__PURE__ */ jsxRuntime.jsx("pre", { ref: preRef, style: {
|
|
21147
21108
|
...style,
|
|
21148
21109
|
backgroundColor: "inherit"
|
|
@@ -21152,20 +21113,20 @@
|
|
|
21152
21113
|
token
|
|
21153
21114
|
}), className: "word-break" }, key)) }, i)) });
|
|
21154
21115
|
};
|
|
21155
|
-
$[
|
|
21116
|
+
$[2] = t3;
|
|
21156
21117
|
} else {
|
|
21157
|
-
|
|
21118
|
+
t3 = $[2];
|
|
21158
21119
|
}
|
|
21159
|
-
let
|
|
21160
|
-
if ($[
|
|
21161
|
-
|
|
21162
|
-
$[
|
|
21163
|
-
$[
|
|
21164
|
-
$[
|
|
21120
|
+
let t4;
|
|
21121
|
+
if ($[3] !== code || $[4] !== t2) {
|
|
21122
|
+
t4 = /* @__PURE__ */ jsxRuntime.jsx(prismReactRenderer.Highlight, { theme: t2, code, language: "json", children: t3 });
|
|
21123
|
+
$[3] = code;
|
|
21124
|
+
$[4] = t2;
|
|
21125
|
+
$[5] = t4;
|
|
21165
21126
|
} else {
|
|
21166
|
-
|
|
21127
|
+
t4 = $[5];
|
|
21167
21128
|
}
|
|
21168
|
-
return
|
|
21129
|
+
return t4;
|
|
21169
21130
|
}
|
|
21170
21131
|
function createFormexStub(values) {
|
|
21171
21132
|
const errorMessage = "You are in a read-only context. You cannot modify the formex controller.";
|