@code0-tech/pictor 0.10.5 → 0.10.6
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.
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import
|
|
4
|
-
import { IconChevronRight as
|
|
1
|
+
import { jsx as l, jsxs as N } from "react/jsx-runtime";
|
|
2
|
+
import { c as k } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import b from "@uiw/react-json-view";
|
|
4
|
+
import { IconChevronRight as T, IconCheck as z, IconCopy as I } from "@tabler/icons-react";
|
|
5
5
|
import "../../utils/contextStore.js";
|
|
6
6
|
import "react";
|
|
7
|
-
import { mergeComponentProps as
|
|
7
|
+
import { mergeComponentProps as E } from "../../utils/component.js";
|
|
8
8
|
import { hashToColor as r } from "../../utils/color.js";
|
|
9
9
|
import '../../assets/components/json-view/JsonView.style.css';/* empty css */
|
|
10
|
-
import { AnimatePresence as
|
|
11
|
-
import { motion as
|
|
12
|
-
const
|
|
10
|
+
import { AnimatePresence as S } from "../../node_modules/framer-motion/dist/es/components/AnimatePresence/index.js";
|
|
11
|
+
import { motion as V } from "../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
|
|
12
|
+
const q = {
|
|
13
13
|
"--w-rjv-font-family": '"Inter", sans-serif',
|
|
14
14
|
"--w-rjv-font-size": "0.8rem",
|
|
15
15
|
"--w-rjv-color": "rgba(255, 255, 255, 0.75)",
|
|
@@ -36,50 +36,54 @@ const I = {
|
|
|
36
36
|
"--w-rjv-type-null-color": r("Null"),
|
|
37
37
|
"--w-rjv-type-nan-color": r("Number"),
|
|
38
38
|
"--w-rjv-type-undefined-color": r("Null")
|
|
39
|
-
},
|
|
40
|
-
const e =
|
|
41
|
-
let o, i,
|
|
42
|
-
if (e[0] !==
|
|
39
|
+
}, K = (a) => {
|
|
40
|
+
const e = k.c(23);
|
|
41
|
+
let o, i, n, c, m, t;
|
|
42
|
+
if (e[0] !== a) {
|
|
43
43
|
const {
|
|
44
|
-
displayObjectSize:
|
|
45
|
-
displayDataTypes:
|
|
46
|
-
enableClipboard:
|
|
47
|
-
indentWidth:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
displayObjectSize: u,
|
|
45
|
+
displayDataTypes: g,
|
|
46
|
+
enableClipboard: h,
|
|
47
|
+
indentWidth: x,
|
|
48
|
+
value: _,
|
|
49
|
+
...C
|
|
50
|
+
} = a;
|
|
51
|
+
t = _, i = u === void 0 ? !1 : u, o = g === void 0 ? !1 : g, n = h === void 0 ? !0 : h, c = x === void 0 ? 12.8 : x, m = E("json-view", C), e[0] = a, e[1] = o, e[2] = i, e[3] = n, e[4] = c, e[5] = m, e[6] = t;
|
|
51
52
|
} else
|
|
52
|
-
o = e[1], i = e[2],
|
|
53
|
-
const
|
|
54
|
-
let s;
|
|
55
|
-
e[6] !== c.style ? (s = c.style ?? {}, e[6] = c.style, e[7] = s) : s = e[7];
|
|
56
|
-
let p;
|
|
57
|
-
e[8] !== s ? (p = {
|
|
58
|
-
...I,
|
|
59
|
-
...s
|
|
60
|
-
}, e[8] = s, e[9] = p) : p = e[9];
|
|
61
|
-
let m, w;
|
|
62
|
-
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ t(j.Arrow, { render: E }), w = /* @__PURE__ */ t(j.Copied, { render: S }), e[10] = m, e[11] = w) : (m = e[10], w = e[11]);
|
|
53
|
+
o = e[1], i = e[2], n = e[3], c = e[4], m = e[5], t = e[6];
|
|
54
|
+
const s = m;
|
|
63
55
|
let v;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
56
|
+
e[7] !== t ? (v = t == null || typeof t != "object" ? [t] : t, e[7] = t, e[8] = v) : v = e[8];
|
|
57
|
+
const y = v;
|
|
58
|
+
let p;
|
|
59
|
+
e[9] !== s.style ? (p = s.style ?? {}, e[9] = s.style, e[10] = p) : p = e[10];
|
|
60
|
+
let d;
|
|
61
|
+
e[11] !== p ? (d = {
|
|
62
|
+
...q,
|
|
63
|
+
...p
|
|
64
|
+
}, e[11] = p, e[12] = d) : d = e[12];
|
|
65
|
+
let w, j;
|
|
66
|
+
e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ l(b.Arrow, { render: B }), j = /* @__PURE__ */ l(b.Copied, { render: J }), e[13] = w, e[14] = j) : (w = e[13], j = e[14]);
|
|
67
|
+
let f;
|
|
68
|
+
return e[15] !== o || e[16] !== i || e[17] !== n || e[18] !== c || e[19] !== s || e[20] !== y || e[21] !== d ? (f = /* @__PURE__ */ N(b, { displayObjectSize: i, displayDataTypes: o, enableClipboard: n, indentWidth: c, ...s, value: y, style: d, children: [
|
|
69
|
+
w,
|
|
70
|
+
j
|
|
71
|
+
] }), e[15] = o, e[16] = i, e[17] = n, e[18] = c, e[19] = s, e[20] = y, e[21] = d, e[22] = f) : f = e[22], f;
|
|
68
72
|
};
|
|
69
|
-
function
|
|
73
|
+
function B(a) {
|
|
70
74
|
const {
|
|
71
75
|
"data-expanded": e,
|
|
72
76
|
...o
|
|
73
|
-
} =
|
|
74
|
-
return /* @__PURE__ */
|
|
77
|
+
} = a;
|
|
78
|
+
return /* @__PURE__ */ l("span", { ...o, className: "json-view__arrow", "data-expanded": e, children: /* @__PURE__ */ l(T, { size: 13 }) });
|
|
75
79
|
}
|
|
76
|
-
function
|
|
80
|
+
function J(a) {
|
|
77
81
|
const {
|
|
78
82
|
"data-copied": e,
|
|
79
83
|
onClick: o,
|
|
80
84
|
...i
|
|
81
|
-
} =
|
|
82
|
-
return /* @__PURE__ */
|
|
85
|
+
} = a;
|
|
86
|
+
return /* @__PURE__ */ l("span", { ...i, onClick: o, className: "json-view__copy", "data-copied": e, children: /* @__PURE__ */ l(S, { mode: "wait", initial: !1, children: /* @__PURE__ */ l(V.span, { initial: {
|
|
83
87
|
opacity: 0,
|
|
84
88
|
scale: 0.5,
|
|
85
89
|
filter: "blur(0.35rem)"
|
|
@@ -96,8 +100,8 @@ function S(l) {
|
|
|
96
100
|
ease: "easeIn"
|
|
97
101
|
}, style: {
|
|
98
102
|
display: "inline-flex"
|
|
99
|
-
}, children: e ? /* @__PURE__ */
|
|
103
|
+
}, children: e ? /* @__PURE__ */ l(z, { size: 13 }) : /* @__PURE__ */ l(I, { size: 13 }) }, e ? "check" : "copy") }) });
|
|
100
104
|
}
|
|
101
105
|
export {
|
|
102
|
-
|
|
106
|
+
K as JsonView
|
|
103
107
|
};
|