@quickflo/quickview 1.2.0 → 1.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/dist/ObjectEntry-B_eqgKIo.js +129 -0
- package/dist/components/QuickView.vue.d.ts.map +1 -1
- package/dist/index-Cp76mZdW.js +10384 -0
- package/dist/quickview.css +1 -1
- package/dist/quickview.js +62 -10444
- package/dist/quickview.umd.cjs +1 -1
- package/dist/renderers/structures/ArrayRenderer.vue.d.ts.map +1 -1
- package/dist/renderers/structures/ObjectEntry.vue.d.ts +16 -0
- package/dist/renderers/structures/ObjectEntry.vue.d.ts.map +1 -0
- package/dist/renderers/structures/ObjectRenderer.vue.d.ts.map +1 -1
- package/dist/types.d.ts +8 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { u as _, _ as g, Q as N, a as b } from "./index-Cp76mZdW.js";
|
|
2
|
+
import { defineComponent as C, defineAsyncComponent as q, computed as V, createElementBlock as o, openBlock as a, createCommentVNode as r, createElementVNode as y, normalizeClass as x, toDisplayString as S, createVNode as d, createBlock as p, Fragment as h, renderList as j, resolveDynamicComponent as w, withModifiers as E, withCtx as f, createTextVNode as F } from "vue";
|
|
3
|
+
const B = /* @__PURE__ */ C({
|
|
4
|
+
__name: "ObjectEntry",
|
|
5
|
+
props: {
|
|
6
|
+
keyName: { type: String, required: !0 },
|
|
7
|
+
value: { type: null, required: !0 },
|
|
8
|
+
path: { type: String, required: !0 },
|
|
9
|
+
depth: { type: Number, required: !0 },
|
|
10
|
+
parent: { type: null, required: !0 },
|
|
11
|
+
isHighlighted: { type: Boolean, required: !0 },
|
|
12
|
+
decorations: { type: Array, required: !0 },
|
|
13
|
+
onNavigate: { type: Function, required: !1 },
|
|
14
|
+
onCopy: { type: Function, required: !1 },
|
|
15
|
+
indentWidth: { type: Number, required: !0 }
|
|
16
|
+
},
|
|
17
|
+
setup(s, { expose: n }) {
|
|
18
|
+
n();
|
|
19
|
+
const e = q(() => import("./index-Cp76mZdW.js").then((c) => c.ab)), t = s, { copy: i, getIcon: m, getColor: l } = _(), u = V(() => t.value === null || typeof t.value != "object" && typeof t.value != "function");
|
|
20
|
+
function k() {
|
|
21
|
+
const c = typeof t.value == "string" ? t.value : JSON.stringify(t.value, null, 2);
|
|
22
|
+
i(c, t.keyName);
|
|
23
|
+
}
|
|
24
|
+
const v = { SmartValue: e, props: t, copy: i, getIcon: m, getColor: l, isPrimitiveValue: u, copyValue: k };
|
|
25
|
+
return Object.defineProperty(v, "__isScriptSetup", { enumerable: !1, value: !0 }), v;
|
|
26
|
+
}
|
|
27
|
+
}), O = ["data-qv-path"], z = ["title"], I = {
|
|
28
|
+
key: 0,
|
|
29
|
+
class: "entry-value is-primitive"
|
|
30
|
+
};
|
|
31
|
+
function P(s, n, e, t, i, m) {
|
|
32
|
+
return a(), o("div", {
|
|
33
|
+
class: "object-entry-wrapper",
|
|
34
|
+
"data-qv-path": e.path
|
|
35
|
+
}, [
|
|
36
|
+
r(" Entry row: key, colon, and value header (inline) "),
|
|
37
|
+
y(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
class: x(["object-entry", { "is-highlighted": e.isHighlighted }])
|
|
41
|
+
},
|
|
42
|
+
[
|
|
43
|
+
y("span", {
|
|
44
|
+
class: "entry-key",
|
|
45
|
+
title: e.keyName
|
|
46
|
+
}, S(e.keyName), 9, z),
|
|
47
|
+
n[1] || (n[1] = y(
|
|
48
|
+
"span",
|
|
49
|
+
{ class: "colon" },
|
|
50
|
+
":",
|
|
51
|
+
-1
|
|
52
|
+
/* CACHED */
|
|
53
|
+
)),
|
|
54
|
+
r(" For primitives, use a container for inline layout with decorators/copy "),
|
|
55
|
+
t.isPrimitiveValue ? (a(), o("div", I, [
|
|
56
|
+
d(t.SmartValue, {
|
|
57
|
+
value: e.value,
|
|
58
|
+
path: e.path,
|
|
59
|
+
"key-name": e.keyName,
|
|
60
|
+
depth: e.depth + 1,
|
|
61
|
+
parent: e.parent,
|
|
62
|
+
"on-navigate": e.onNavigate,
|
|
63
|
+
"on-copy": e.onCopy
|
|
64
|
+
}, null, 8, ["value", "path", "key-name", "depth", "parent", "on-navigate", "on-copy"]),
|
|
65
|
+
(a(!0), o(
|
|
66
|
+
h,
|
|
67
|
+
null,
|
|
68
|
+
j(e.decorations, (l, u) => (a(), p(w(l), {
|
|
69
|
+
key: u,
|
|
70
|
+
class: "key-decorator"
|
|
71
|
+
}))),
|
|
72
|
+
128
|
|
73
|
+
/* KEYED_FRAGMENT */
|
|
74
|
+
)),
|
|
75
|
+
e.onCopy ? (a(), p(N, {
|
|
76
|
+
key: 0,
|
|
77
|
+
flat: "",
|
|
78
|
+
dense: "",
|
|
79
|
+
round: "",
|
|
80
|
+
size: "xs",
|
|
81
|
+
icon: t.getIcon(e.keyName),
|
|
82
|
+
color: t.getColor(e.keyName),
|
|
83
|
+
class: "entry-copy",
|
|
84
|
+
onClick: E(t.copyValue, ["stop"])
|
|
85
|
+
}, {
|
|
86
|
+
default: f(() => [
|
|
87
|
+
d(b, null, {
|
|
88
|
+
default: f(() => [...n[0] || (n[0] = [
|
|
89
|
+
F(
|
|
90
|
+
"Copy value",
|
|
91
|
+
-1
|
|
92
|
+
/* CACHED */
|
|
93
|
+
)
|
|
94
|
+
])]),
|
|
95
|
+
_: 1
|
|
96
|
+
/* STABLE */
|
|
97
|
+
})
|
|
98
|
+
]),
|
|
99
|
+
_: 1
|
|
100
|
+
/* STABLE */
|
|
101
|
+
}, 8, ["icon", "color"])) : r("v-if", !0)
|
|
102
|
+
])) : (a(), o(
|
|
103
|
+
h,
|
|
104
|
+
{ key: 1 },
|
|
105
|
+
[
|
|
106
|
+
r(" For nested objects/arrays, use display:contents to let children flow into parent flex "),
|
|
107
|
+
d(t.SmartValue, {
|
|
108
|
+
value: e.value,
|
|
109
|
+
path: e.path,
|
|
110
|
+
"key-name": e.keyName,
|
|
111
|
+
depth: e.depth + 1,
|
|
112
|
+
parent: e.parent,
|
|
113
|
+
"on-navigate": e.onNavigate,
|
|
114
|
+
"on-copy": e.onCopy
|
|
115
|
+
}, null, 8, ["value", "path", "key-name", "depth", "parent", "on-navigate", "on-copy"])
|
|
116
|
+
],
|
|
117
|
+
64
|
|
118
|
+
/* STABLE_FRAGMENT */
|
|
119
|
+
))
|
|
120
|
+
],
|
|
121
|
+
2
|
|
122
|
+
/* CLASS */
|
|
123
|
+
)
|
|
124
|
+
], 8, O);
|
|
125
|
+
}
|
|
126
|
+
const D = /* @__PURE__ */ g(B, [["render", P], ["__scopeId", "data-v-a6cb4b94"], ["__file", "/Users/zachsherbondy/src/github.com/quickview/renderers/structures/ObjectEntry.vue"]]);
|
|
127
|
+
export {
|
|
128
|
+
D as default
|
|
129
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickView.vue.d.ts","sourceRoot":"","sources":["../../components/QuickView.vue"],"names":[],"mappings":";;AA+GA;
|
|
1
|
+
{"version":3,"file":"QuickView.vue.d.ts","sourceRoot":"","sources":["../../components/QuickView.vue"],"names":[],"mappings":";;AA+GA;AAynBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,UAAU,KAAK;IACb,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC7B;;aAFW,gBAAgB;;;;;;;;;AAmtB5B,wBASG"}
|