next-cache-toolbar 0.1.0 → 0.1.2
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/cjs/{cache-entry-client-BvxljHoj.js → cache-entry-client-Cg2-NRrZ.js} +86 -16
- package/dist/cjs/{cache-panel-head-client-DU8vr6PU.js → cache-panel-head-client-CbhKAPhZ.js} +1 -1
- package/dist/cjs/{cache-panel-table-client-DTc9oH8H.js → cache-panel-table-client-CuP76AwU.js} +1 -1
- package/dist/cjs/cache-panel-trigger-client-ChZncD_2.js +17 -0
- package/dist/cjs/{cache-panel-wrapper-client-CN5_PBpp.js → cache-panel-wrapper-client-DE5QrmN0.js} +1 -1
- package/dist/cjs/dialog-client-AZHsTC7l.js +80 -0
- package/dist/cjs/index.js +49 -20
- package/dist/cjs/{refresh-data-button-client-B9jg9KlD.js → refresh-data-button-client-D4e_gWso.js} +2 -3
- package/dist/es/{cache-entry-client-UcY_Onfg.js → cache-entry-client-CtWrVYTN.js} +68 -2
- package/dist/es/{cache-panel-head-client-DCJPailN.js → cache-panel-head-client-CZC6pddt.js} +1 -1
- package/dist/es/{cache-panel-table-client-DUbKWZdy.js → cache-panel-table-client-Qc84cSj6.js} +1 -1
- package/dist/es/cache-panel-trigger-client-GrlxjSO5.js +17 -0
- package/dist/es/{cache-panel-wrapper-client-BFFOMRXO.js → cache-panel-wrapper-client-BosTuysv.js} +1 -1
- package/dist/es/dialog-client-D5Q_DDEF.js +57 -0
- package/dist/es/index.mjs +50 -21
- package/dist/es/{refresh-data-button-client-Bh7PpxMP.js → refresh-data-button-client-DaxVafNg.js} +1 -2
- package/dist/style.css +2 -1
- package/package.json +3 -1
- package/readme.md +24 -10
- package/dist/cjs/cache-panel-trigger-client-I91XFsXW.js +0 -76
- package/dist/es/cache-panel-trigger-client-D3ag_ezj.js +0 -55
|
@@ -1,29 +1,36 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
var jsxRuntime = require('react/jsx-runtime');
|
|
3
|
-
var React = require('react');
|
|
4
3
|
var classVarianceAuthority = require('class-variance-authority');
|
|
4
|
+
var React = require('react');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
|
+
var reactSlot = require('@radix-ui/react-slot');
|
|
8
|
+
var dialogClient = require('./dialog-client-AZHsTC7l.js');
|
|
9
|
+
var lucideReact = require('lucide-react');
|
|
10
|
+
var JsonView = require('react18-json-view');
|
|
11
|
+
|
|
12
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
13
|
|
|
8
14
|
function _interopNamespace(e) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
if (e && e.__esModule) return e;
|
|
16
|
+
var n = Object.create(null);
|
|
17
|
+
if (e) {
|
|
18
|
+
Object.keys(e).forEach(function (k) {
|
|
19
|
+
if (k !== 'default') {
|
|
20
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
21
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return e[k]; }
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
n.default = e;
|
|
29
|
+
return n;
|
|
24
30
|
}
|
|
25
31
|
|
|
26
32
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
33
|
+
var JsonView__default = /*#__PURE__*/_interopDefault(JsonView);
|
|
27
34
|
|
|
28
35
|
function cn(...inputs) {
|
|
29
36
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
@@ -100,6 +107,42 @@ function Badge({ className, variant, ...props }) {
|
|
|
100
107
|
});
|
|
101
108
|
}
|
|
102
109
|
|
|
110
|
+
const buttonVariants = classVarianceAuthority.cva("nct-inline-flex nct-items-center nct-justify-center nct-whitespace-nowrap nct-rounded-md nct-text-sm nct-font-medium nct-ring-offset-background nct-transition-colors focus-visible:nct-outline-none focus-visible:nct-ring-2 focus-visible:nct-ring-ring focus-visible:nct-ring-offset-2 disabled:nct-pointer-events-none disabled:nct-opacity-50", {
|
|
111
|
+
variants: {
|
|
112
|
+
variant: {
|
|
113
|
+
default: "nct-bg-primary nct-text-primary-foreground hover:nct-bg-primary/90",
|
|
114
|
+
destructive: "nct-bg-destructive nct-text-destructive-foreground hover:nct-bg-destructive/90",
|
|
115
|
+
outline: "nct-border nct-border-input nct-bg-background hover:nct-bg-accent hover:nct-text-accent-foreground",
|
|
116
|
+
secondary: "nct-bg-secondary nct-text-secondary-foreground hover:nct-bg-secondary/80",
|
|
117
|
+
ghost: "hover:nct-bg-accent hover:nct-text-accent-foreground",
|
|
118
|
+
link: "nct-text-primary nct-underline-offset-4 hover:nct-underline"
|
|
119
|
+
},
|
|
120
|
+
size: {
|
|
121
|
+
default: "nct-h-10 nct-px-4 nct-py-2",
|
|
122
|
+
sm: "nct-h-9 nct-rounded-md nct-px-3",
|
|
123
|
+
lg: "nct-h-11 nct-rounded-md nct-px-8",
|
|
124
|
+
icon: "nct-h-10 nct-w-10"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
defaultVariants: {
|
|
128
|
+
variant: "default",
|
|
129
|
+
size: "default"
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
const Button = /*#__PURE__*/ React__namespace.forwardRef(({ className, variant, size, asChild = false, ...props }, ref)=>{
|
|
133
|
+
const Comp = asChild ? reactSlot.Slot : "button";
|
|
134
|
+
return /*#__PURE__*/ jsxRuntime.jsx(Comp, {
|
|
135
|
+
className: cn(buttonVariants({
|
|
136
|
+
variant,
|
|
137
|
+
size,
|
|
138
|
+
className
|
|
139
|
+
})),
|
|
140
|
+
ref: ref,
|
|
141
|
+
...props
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
Button.displayName = "Button";
|
|
145
|
+
|
|
103
146
|
const CacheEntry = (props)=>{
|
|
104
147
|
const cacheEntryRevalidateLeft = React.useMemo(()=>{
|
|
105
148
|
if (!props.cacheEntry.data?.headers.date || !props.cacheEntry.revalidate) {
|
|
@@ -131,11 +174,38 @@ const CacheEntry = (props)=>{
|
|
|
131
174
|
}),
|
|
132
175
|
/*#__PURE__*/ jsxRuntime.jsx(TableCell, {
|
|
133
176
|
children: props.cacheEntry.data?.headers.date
|
|
177
|
+
}),
|
|
178
|
+
/*#__PURE__*/ jsxRuntime.jsxs(dialogClient.Dialog, {
|
|
179
|
+
children: [
|
|
180
|
+
/*#__PURE__*/ jsxRuntime.jsx(dialogClient.DialogTrigger, {
|
|
181
|
+
asChild: true,
|
|
182
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(TableCell, {
|
|
183
|
+
className: "nct-flex nct-justify-center",
|
|
184
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(Button, {
|
|
185
|
+
variant: "ghost",
|
|
186
|
+
size: "icon",
|
|
187
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(lucideReact.Braces, {
|
|
188
|
+
size: 16
|
|
189
|
+
})
|
|
190
|
+
})
|
|
191
|
+
})
|
|
192
|
+
}),
|
|
193
|
+
/*#__PURE__*/ jsxRuntime.jsx(dialogClient.DialogContent, {
|
|
194
|
+
className: "sm:nct-max-w-3xl nct-max-h-[65vh] nct-overflow-y-auto nct-overflow-x-hidden",
|
|
195
|
+
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
196
|
+
className: "nct-flex nct-items-center nct-space-x-2",
|
|
197
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(JsonView__default.default, {
|
|
198
|
+
src: props.cacheEntry.data.body
|
|
199
|
+
})
|
|
200
|
+
})
|
|
201
|
+
})
|
|
202
|
+
]
|
|
134
203
|
})
|
|
135
204
|
]
|
|
136
205
|
});
|
|
137
206
|
};
|
|
138
207
|
|
|
208
|
+
exports.Button = Button;
|
|
139
209
|
exports.CacheEntry = CacheEntry;
|
|
140
210
|
exports.Table = Table;
|
|
141
211
|
exports.TableBody = TableBody;
|
package/dist/cjs/{cache-panel-head-client-DU8vr6PU.js → cache-panel-head-client-CbhKAPhZ.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
var jsxRuntime = require('react/jsx-runtime');
|
|
3
|
-
var cacheEntryClient = require('./cache-entry-client-
|
|
3
|
+
var cacheEntryClient = require('./cache-entry-client-Cg2-NRrZ.js');
|
|
4
4
|
var lucideReact = require('lucide-react');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var cachePanelContextClient = require('./cache-panel-context-client-B1EgwMzI.js');
|
package/dist/cjs/{cache-panel-table-client-DTc9oH8H.js → cache-panel-table-client-CuP76AwU.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
var jsxRuntime = require('react/jsx-runtime');
|
|
3
|
-
var cacheEntryClient = require('./cache-entry-client-
|
|
3
|
+
var cacheEntryClient = require('./cache-entry-client-Cg2-NRrZ.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cachePanelContextClient = require('./cache-panel-context-client-B1EgwMzI.js');
|
|
6
6
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
3
|
+
var cacheEntryClient = require('./cache-entry-client-Cg2-NRrZ.js');
|
|
4
|
+
require('react');
|
|
5
|
+
var cachePanelContextClient = require('./cache-panel-context-client-B1EgwMzI.js');
|
|
6
|
+
|
|
7
|
+
function CachePanelTrigger(props) {
|
|
8
|
+
const { toggleOpen } = cachePanelContextClient.useCachePanelContext();
|
|
9
|
+
return /*#__PURE__*/ jsxRuntime.jsx(cacheEntryClient.Button, {
|
|
10
|
+
variant: "ghost",
|
|
11
|
+
size: "icon",
|
|
12
|
+
onClick: toggleOpen,
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
exports.CachePanelTrigger = CachePanelTrigger;
|
package/dist/cjs/{cache-panel-wrapper-client-CN5_PBpp.js → cache-panel-wrapper-client-DE5QrmN0.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
var jsxRuntime = require('react/jsx-runtime');
|
|
3
|
-
var cacheEntryClient = require('./cache-entry-client-
|
|
3
|
+
var cacheEntryClient = require('./cache-entry-client-Cg2-NRrZ.js');
|
|
4
4
|
require('react');
|
|
5
5
|
var cachePanelContextClient = require('./cache-panel-context-client-B1EgwMzI.js');
|
|
6
6
|
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
3
|
+
var DialogPrimitive = require('@radix-ui/react-dialog');
|
|
4
|
+
var lucideReact = require('lucide-react');
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var cacheEntryClient = require('./cache-entry-client-Cg2-NRrZ.js');
|
|
7
|
+
|
|
8
|
+
function _interopNamespace(e) {
|
|
9
|
+
if (e && e.__esModule) return e;
|
|
10
|
+
var n = Object.create(null);
|
|
11
|
+
if (e) {
|
|
12
|
+
Object.keys(e).forEach(function (k) {
|
|
13
|
+
if (k !== 'default') {
|
|
14
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return e[k]; }
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
n.default = e;
|
|
23
|
+
return n;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
|
|
27
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
28
|
+
|
|
29
|
+
const Dialog = DialogPrimitive__namespace.Root;
|
|
30
|
+
const DialogTrigger = DialogPrimitive__namespace.Trigger;
|
|
31
|
+
const DialogPortal = DialogPrimitive__namespace.Portal;
|
|
32
|
+
const DialogOverlay = /*#__PURE__*/ React__namespace.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxRuntime.jsx(DialogPrimitive__namespace.Overlay, {
|
|
33
|
+
ref: ref,
|
|
34
|
+
className: cacheEntryClient.cn("nct-fixed nct-inset-0 nct-z-50 nct-bg-black/80 data-[state=open]:nct-animate-in data-[state=closed]:nct-animate-out data-[state=closed]:nct-fade-out-0 data-[state=open]:nct-fade-in-0", className),
|
|
35
|
+
...props
|
|
36
|
+
}));
|
|
37
|
+
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
38
|
+
const DialogContent = /*#__PURE__*/ React__namespace.forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ jsxRuntime.jsxs(DialogPortal, {
|
|
39
|
+
container: window.document.getElementById("next-cache-toolbar"),
|
|
40
|
+
children: [
|
|
41
|
+
/*#__PURE__*/ jsxRuntime.jsx(DialogOverlay, {}),
|
|
42
|
+
/*#__PURE__*/ jsxRuntime.jsxs(DialogPrimitive__namespace.Content, {
|
|
43
|
+
ref: ref,
|
|
44
|
+
className: cacheEntryClient.cn("nct-fixed nct-left-[50%] nct-top-[50%] nct-z-50 nct-grid nct-w-full nct-max-w-lg nct-translate-x-[-50%] nct-translate-y-[-50%] nct-gap-4 nct-border nct-bg-background nct-p-6 nct-shadow-lg nct-duration-200 data-[state=open]:nct-animate-in data-[state=closed]:nct-animate-out data-[state=closed]:nct-fade-out-0 data-[state=open]:nct-fade-in-0 data-[state=closed]:nct-zoom-out-95 data-[state=open]:nct-zoom-in-95 data-[state=closed]:nct-slide-out-to-left-1/2 data-[state=closed]:nct-slide-out-to-top-[48%] data-[state=open]:nct-slide-in-from-left-1/2 data-[state=open]:nct-slide-in-from-top-[48%] sm:nct-rounded-lg", className),
|
|
45
|
+
...props,
|
|
46
|
+
children: [
|
|
47
|
+
children,
|
|
48
|
+
/*#__PURE__*/ jsxRuntime.jsxs(DialogPrimitive__namespace.Close, {
|
|
49
|
+
className: "nct-absolute nct-right-4 nct-top-4 nct-rounded-sm nct-opacity-70 nct-ring-offset-background nct-transition-opacity hover:nct-opacity-100 focus:nct-outline-none focus:nct-ring-2 focus:nct-ring-ring focus:nct-ring-offset-2 disabled:nct-pointer-events-none data-[state=open]:nct-bg-accent data-[state=open]:nct-text-muted-foreground",
|
|
50
|
+
children: [
|
|
51
|
+
/*#__PURE__*/ jsxRuntime.jsx(lucideReact.X, {
|
|
52
|
+
className: "nct-h-4 nct-w-4"
|
|
53
|
+
}),
|
|
54
|
+
/*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
55
|
+
className: "nct-sr-only",
|
|
56
|
+
children: "Close"
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
}));
|
|
64
|
+
DialogContent.displayName = DialogPrimitive__namespace.Content.displayName;
|
|
65
|
+
const DialogTitle = /*#__PURE__*/ React__namespace.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxRuntime.jsx(DialogPrimitive__namespace.Title, {
|
|
66
|
+
ref: ref,
|
|
67
|
+
className: cacheEntryClient.cn("nct-text-lg nct-font-semibold nct-leading-none nct-tracking-tight", className),
|
|
68
|
+
...props
|
|
69
|
+
}));
|
|
70
|
+
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
71
|
+
const DialogDescription = /*#__PURE__*/ React__namespace.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxRuntime.jsx(DialogPrimitive__namespace.Description, {
|
|
72
|
+
ref: ref,
|
|
73
|
+
className: cacheEntryClient.cn("nct-text-sm nct-text-muted-foreground", className),
|
|
74
|
+
...props
|
|
75
|
+
}));
|
|
76
|
+
DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
77
|
+
|
|
78
|
+
exports.Dialog = Dialog;
|
|
79
|
+
exports.DialogContent = DialogContent;
|
|
80
|
+
exports.DialogTrigger = DialogTrigger;
|
package/dist/cjs/index.js
CHANGED
|
@@ -2,31 +2,55 @@
|
|
|
2
2
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
var cacheEntryClient = require('./cache-entry-client-
|
|
5
|
+
var cacheEntryClient = require('./cache-entry-client-Cg2-NRrZ.js');
|
|
6
6
|
var lucideReact = require('lucide-react');
|
|
7
7
|
var fs = require('fs');
|
|
8
8
|
var promises = require('node:fs/promises');
|
|
9
9
|
var zod = require('zod');
|
|
10
10
|
var cachePanelContextClient = require('./cache-panel-context-client-B1EgwMzI.js');
|
|
11
|
-
var cachePanelHeadClient = require('./cache-panel-head-client-
|
|
12
|
-
var cachePanelTableClient = require('./cache-panel-table-client-
|
|
13
|
-
var cachePanelTriggerClient = require('./cache-panel-trigger-client-
|
|
14
|
-
var cachePanelWrapperClient = require('./cache-panel-wrapper-client-
|
|
15
|
-
var refreshDataButtonClient = require('./refresh-data-button-client-
|
|
11
|
+
var cachePanelHeadClient = require('./cache-panel-head-client-CbhKAPhZ.js');
|
|
12
|
+
var cachePanelTableClient = require('./cache-panel-table-client-CuP76AwU.js');
|
|
13
|
+
var cachePanelTriggerClient = require('./cache-panel-trigger-client-ChZncD_2.js');
|
|
14
|
+
var cachePanelWrapperClient = require('./cache-panel-wrapper-client-DE5QrmN0.js');
|
|
15
|
+
var refreshDataButtonClient = require('./refresh-data-button-client-D4e_gWso.js');
|
|
16
16
|
|
|
17
|
+
const stringToJSONSchema = zod.z.string().transform((str, ctx)=>{
|
|
18
|
+
try {
|
|
19
|
+
return JSON.parse(str);
|
|
20
|
+
} catch (e) {
|
|
21
|
+
ctx.addIssue({
|
|
22
|
+
code: "custom",
|
|
23
|
+
message: "Encoded body is not in JSON format",
|
|
24
|
+
path: [
|
|
25
|
+
"data",
|
|
26
|
+
"body"
|
|
27
|
+
]
|
|
28
|
+
});
|
|
29
|
+
return zod.z.NEVER;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
17
32
|
const nextCacheFileSchema = zod.z.object({
|
|
18
33
|
data: zod.z.object({
|
|
19
34
|
body: zod.z.string(),
|
|
20
35
|
headers: zod.z.record(zod.z.string(), zod.z.string()),
|
|
21
36
|
status: zod.z.number(),
|
|
22
37
|
url: zod.z.string()
|
|
23
|
-
})
|
|
38
|
+
}),
|
|
24
39
|
kind: zod.z.union([
|
|
25
40
|
zod.z.literal("FETCH"),
|
|
26
41
|
zod.z.unknown()
|
|
27
42
|
]),
|
|
28
43
|
revalidate: zod.z.number().optional(),
|
|
29
44
|
tags: zod.z.array(zod.z.string()).optional().default([])
|
|
45
|
+
}).transform((cacheEntry)=>{
|
|
46
|
+
const body = stringToJSONSchema.parse(atob(cacheEntry.data.body));
|
|
47
|
+
return {
|
|
48
|
+
...cacheEntry,
|
|
49
|
+
data: {
|
|
50
|
+
...cacheEntry.data,
|
|
51
|
+
body
|
|
52
|
+
}
|
|
53
|
+
};
|
|
30
54
|
});
|
|
31
55
|
|
|
32
56
|
const cachePath = ".next/cache/fetch-cache";
|
|
@@ -34,30 +58,35 @@ const getCacheFiles = async ()=>{
|
|
|
34
58
|
if (!fs.existsSync(cachePath)) {
|
|
35
59
|
return;
|
|
36
60
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
61
|
+
const files = await promises.readdir(cachePath);
|
|
62
|
+
const cacheFiles = new Map();
|
|
63
|
+
for (const file of files){
|
|
64
|
+
// ignore tags-manifest file
|
|
65
|
+
if (file.match(/manifest/)) {
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
try {
|
|
41
69
|
const fileContent = await promises.readFile(`${cachePath}/${file}`);
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
70
|
+
const cacheEntry = nextCacheFileSchema.parse(JSON.parse(fileContent.toString()));
|
|
71
|
+
cacheFiles.set(file, cacheEntry);
|
|
72
|
+
} catch (error) {
|
|
73
|
+
if (error instanceof zod.ZodError) {
|
|
74
|
+
const issues = error.issues;
|
|
75
|
+
console.error(`File ${file} do not match the schema`, issues);
|
|
45
76
|
continue;
|
|
46
77
|
}
|
|
47
|
-
|
|
78
|
+
console.error(`Error parsing ${file}`);
|
|
48
79
|
}
|
|
49
|
-
return cacheFiles;
|
|
50
|
-
} catch (error) {
|
|
51
|
-
console.error(error);
|
|
52
|
-
throw Error("Error reading cache files");
|
|
53
80
|
}
|
|
81
|
+
return cacheFiles;
|
|
54
82
|
};
|
|
55
83
|
|
|
56
84
|
async function NextCacheToolbar() {
|
|
57
85
|
const files = await getCacheFiles();
|
|
58
86
|
const cacheEntries = Array.from(files?.entries() ?? []);
|
|
59
87
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
60
|
-
|
|
88
|
+
id: "next-cache-toolbar",
|
|
89
|
+
className: "nct-text-primary nct-font-mono",
|
|
61
90
|
children: /*#__PURE__*/ jsxRuntime.jsxs(cachePanelContextClient.CachePanelContextProvider, {
|
|
62
91
|
children: [
|
|
63
92
|
/*#__PURE__*/ jsxRuntime.jsx(cachePanelTriggerClient.CachePanelTrigger, {
|
package/dist/cjs/{refresh-data-button-client-B9jg9KlD.js → refresh-data-button-client-D4e_gWso.js}
RENAMED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
var jsxRuntime = require('react/jsx-runtime');
|
|
3
|
-
var
|
|
4
|
-
var cacheEntryClient = require('./cache-entry-client-BvxljHoj.js');
|
|
3
|
+
var cacheEntryClient = require('./cache-entry-client-Cg2-NRrZ.js');
|
|
5
4
|
var lucideReact = require('lucide-react');
|
|
6
5
|
var navigation = require('next/navigation');
|
|
7
6
|
var React = require('react');
|
|
@@ -14,7 +13,7 @@ function RefreshDataButton() {
|
|
|
14
13
|
router.refresh();
|
|
15
14
|
});
|
|
16
15
|
};
|
|
17
|
-
return /*#__PURE__*/ jsxRuntime.jsx(
|
|
16
|
+
return /*#__PURE__*/ jsxRuntime.jsx(cacheEntryClient.Button, {
|
|
18
17
|
variant: "outline",
|
|
19
18
|
size: "icon",
|
|
20
19
|
onClick: refresh,
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
import { useMemo } from 'react';
|
|
5
|
-
import { cva } from 'class-variance-authority';
|
|
6
6
|
import { clsx } from 'clsx';
|
|
7
7
|
import { twMerge } from 'tailwind-merge';
|
|
8
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
9
|
+
import { D as Dialog, a as DialogTrigger, b as DialogContent } from './dialog-client-D5Q_DDEF.js';
|
|
10
|
+
import { Braces } from 'lucide-react';
|
|
11
|
+
import JsonView from 'react18-json-view';
|
|
8
12
|
|
|
9
13
|
function cn(...inputs) {
|
|
10
14
|
return twMerge(clsx(inputs));
|
|
@@ -81,6 +85,42 @@ function Badge({ className, variant, ...props }) {
|
|
|
81
85
|
});
|
|
82
86
|
}
|
|
83
87
|
|
|
88
|
+
const buttonVariants = cva("nct-inline-flex nct-items-center nct-justify-center nct-whitespace-nowrap nct-rounded-md nct-text-sm nct-font-medium nct-ring-offset-background nct-transition-colors focus-visible:nct-outline-none focus-visible:nct-ring-2 focus-visible:nct-ring-ring focus-visible:nct-ring-offset-2 disabled:nct-pointer-events-none disabled:nct-opacity-50", {
|
|
89
|
+
variants: {
|
|
90
|
+
variant: {
|
|
91
|
+
default: "nct-bg-primary nct-text-primary-foreground hover:nct-bg-primary/90",
|
|
92
|
+
destructive: "nct-bg-destructive nct-text-destructive-foreground hover:nct-bg-destructive/90",
|
|
93
|
+
outline: "nct-border nct-border-input nct-bg-background hover:nct-bg-accent hover:nct-text-accent-foreground",
|
|
94
|
+
secondary: "nct-bg-secondary nct-text-secondary-foreground hover:nct-bg-secondary/80",
|
|
95
|
+
ghost: "hover:nct-bg-accent hover:nct-text-accent-foreground",
|
|
96
|
+
link: "nct-text-primary nct-underline-offset-4 hover:nct-underline"
|
|
97
|
+
},
|
|
98
|
+
size: {
|
|
99
|
+
default: "nct-h-10 nct-px-4 nct-py-2",
|
|
100
|
+
sm: "nct-h-9 nct-rounded-md nct-px-3",
|
|
101
|
+
lg: "nct-h-11 nct-rounded-md nct-px-8",
|
|
102
|
+
icon: "nct-h-10 nct-w-10"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
defaultVariants: {
|
|
106
|
+
variant: "default",
|
|
107
|
+
size: "default"
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
const Button = /*#__PURE__*/ React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref)=>{
|
|
111
|
+
const Comp = asChild ? Slot : "button";
|
|
112
|
+
return /*#__PURE__*/ jsx(Comp, {
|
|
113
|
+
className: cn(buttonVariants({
|
|
114
|
+
variant,
|
|
115
|
+
size,
|
|
116
|
+
className
|
|
117
|
+
})),
|
|
118
|
+
ref: ref,
|
|
119
|
+
...props
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
Button.displayName = "Button";
|
|
123
|
+
|
|
84
124
|
const CacheEntry = (props)=>{
|
|
85
125
|
const cacheEntryRevalidateLeft = useMemo(()=>{
|
|
86
126
|
if (!props.cacheEntry.data?.headers.date || !props.cacheEntry.revalidate) {
|
|
@@ -112,9 +152,35 @@ const CacheEntry = (props)=>{
|
|
|
112
152
|
}),
|
|
113
153
|
/*#__PURE__*/ jsx(TableCell, {
|
|
114
154
|
children: props.cacheEntry.data?.headers.date
|
|
155
|
+
}),
|
|
156
|
+
/*#__PURE__*/ jsxs(Dialog, {
|
|
157
|
+
children: [
|
|
158
|
+
/*#__PURE__*/ jsx(DialogTrigger, {
|
|
159
|
+
asChild: true,
|
|
160
|
+
children: /*#__PURE__*/ jsx(TableCell, {
|
|
161
|
+
className: "nct-flex nct-justify-center",
|
|
162
|
+
children: /*#__PURE__*/ jsx(Button, {
|
|
163
|
+
variant: "ghost",
|
|
164
|
+
size: "icon",
|
|
165
|
+
children: /*#__PURE__*/ jsx(Braces, {
|
|
166
|
+
size: 16
|
|
167
|
+
})
|
|
168
|
+
})
|
|
169
|
+
})
|
|
170
|
+
}),
|
|
171
|
+
/*#__PURE__*/ jsx(DialogContent, {
|
|
172
|
+
className: "sm:nct-max-w-3xl nct-max-h-[65vh] nct-overflow-y-auto nct-overflow-x-hidden",
|
|
173
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
174
|
+
className: "nct-flex nct-items-center nct-space-x-2",
|
|
175
|
+
children: /*#__PURE__*/ jsx(JsonView, {
|
|
176
|
+
src: props.cacheEntry.data.body
|
|
177
|
+
})
|
|
178
|
+
})
|
|
179
|
+
})
|
|
180
|
+
]
|
|
115
181
|
})
|
|
116
182
|
]
|
|
117
183
|
});
|
|
118
184
|
};
|
|
119
185
|
|
|
120
|
-
export { CacheEntry as C, TableHead as T, TableBody as a, Table as b, cn as c, TableHeader as d, TableRow as e };
|
|
186
|
+
export { Button as B, CacheEntry as C, TableHead as T, TableBody as a, Table as b, cn as c, TableHeader as d, TableRow as e };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import { T as TableHead, c as cn } from './cache-entry-client-
|
|
3
|
+
import { T as TableHead, c as cn } from './cache-entry-client-CtWrVYTN.js';
|
|
4
4
|
import { ArrowDownAZIcon, ArrowUpAZIcon } from 'lucide-react';
|
|
5
5
|
import { useMemo } from 'react';
|
|
6
6
|
import { u as useCachePanelContext } from './cache-panel-context-client-D5NKXXpF.js';
|
package/dist/es/{cache-panel-table-client-DUbKWZdy.js → cache-panel-table-client-Qc84cSj6.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { a as TableBody, C as CacheEntry } from './cache-entry-client-
|
|
3
|
+
import { a as TableBody, C as CacheEntry } from './cache-entry-client-CtWrVYTN.js';
|
|
4
4
|
import { useMemo } from 'react';
|
|
5
5
|
import { u as useCachePanelContext } from './cache-panel-context-client-D5NKXXpF.js';
|
|
6
6
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { B as Button } from './cache-entry-client-CtWrVYTN.js';
|
|
4
|
+
import 'react';
|
|
5
|
+
import { u as useCachePanelContext } from './cache-panel-context-client-D5NKXXpF.js';
|
|
6
|
+
|
|
7
|
+
function CachePanelTrigger(props) {
|
|
8
|
+
const { toggleOpen } = useCachePanelContext();
|
|
9
|
+
return /*#__PURE__*/ jsx(Button, {
|
|
10
|
+
variant: "ghost",
|
|
11
|
+
size: "icon",
|
|
12
|
+
onClick: toggleOpen,
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { CachePanelTrigger as C };
|
package/dist/es/{cache-panel-wrapper-client-BFFOMRXO.js → cache-panel-wrapper-client-BosTuysv.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { b as Table } from './cache-entry-client-
|
|
3
|
+
import { b as Table } from './cache-entry-client-CtWrVYTN.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import { u as useCachePanelContext } from './cache-panel-context-client-D5NKXXpF.js';
|
|
6
6
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
4
|
+
import { X } from 'lucide-react';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { c as cn } from './cache-entry-client-CtWrVYTN.js';
|
|
7
|
+
|
|
8
|
+
const Dialog = DialogPrimitive.Root;
|
|
9
|
+
const DialogTrigger = DialogPrimitive.Trigger;
|
|
10
|
+
const DialogPortal = DialogPrimitive.Portal;
|
|
11
|
+
const DialogOverlay = /*#__PURE__*/ React.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(DialogPrimitive.Overlay, {
|
|
12
|
+
ref: ref,
|
|
13
|
+
className: cn("nct-fixed nct-inset-0 nct-z-50 nct-bg-black/80 data-[state=open]:nct-animate-in data-[state=closed]:nct-animate-out data-[state=closed]:nct-fade-out-0 data-[state=open]:nct-fade-in-0", className),
|
|
14
|
+
...props
|
|
15
|
+
}));
|
|
16
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
17
|
+
const DialogContent = /*#__PURE__*/ React.forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ jsxs(DialogPortal, {
|
|
18
|
+
container: window.document.getElementById("next-cache-toolbar"),
|
|
19
|
+
children: [
|
|
20
|
+
/*#__PURE__*/ jsx(DialogOverlay, {}),
|
|
21
|
+
/*#__PURE__*/ jsxs(DialogPrimitive.Content, {
|
|
22
|
+
ref: ref,
|
|
23
|
+
className: cn("nct-fixed nct-left-[50%] nct-top-[50%] nct-z-50 nct-grid nct-w-full nct-max-w-lg nct-translate-x-[-50%] nct-translate-y-[-50%] nct-gap-4 nct-border nct-bg-background nct-p-6 nct-shadow-lg nct-duration-200 data-[state=open]:nct-animate-in data-[state=closed]:nct-animate-out data-[state=closed]:nct-fade-out-0 data-[state=open]:nct-fade-in-0 data-[state=closed]:nct-zoom-out-95 data-[state=open]:nct-zoom-in-95 data-[state=closed]:nct-slide-out-to-left-1/2 data-[state=closed]:nct-slide-out-to-top-[48%] data-[state=open]:nct-slide-in-from-left-1/2 data-[state=open]:nct-slide-in-from-top-[48%] sm:nct-rounded-lg", className),
|
|
24
|
+
...props,
|
|
25
|
+
children: [
|
|
26
|
+
children,
|
|
27
|
+
/*#__PURE__*/ jsxs(DialogPrimitive.Close, {
|
|
28
|
+
className: "nct-absolute nct-right-4 nct-top-4 nct-rounded-sm nct-opacity-70 nct-ring-offset-background nct-transition-opacity hover:nct-opacity-100 focus:nct-outline-none focus:nct-ring-2 focus:nct-ring-ring focus:nct-ring-offset-2 disabled:nct-pointer-events-none data-[state=open]:nct-bg-accent data-[state=open]:nct-text-muted-foreground",
|
|
29
|
+
children: [
|
|
30
|
+
/*#__PURE__*/ jsx(X, {
|
|
31
|
+
className: "nct-h-4 nct-w-4"
|
|
32
|
+
}),
|
|
33
|
+
/*#__PURE__*/ jsx("span", {
|
|
34
|
+
className: "nct-sr-only",
|
|
35
|
+
children: "Close"
|
|
36
|
+
})
|
|
37
|
+
]
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
})
|
|
41
|
+
]
|
|
42
|
+
}));
|
|
43
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
44
|
+
const DialogTitle = /*#__PURE__*/ React.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(DialogPrimitive.Title, {
|
|
45
|
+
ref: ref,
|
|
46
|
+
className: cn("nct-text-lg nct-font-semibold nct-leading-none nct-tracking-tight", className),
|
|
47
|
+
...props
|
|
48
|
+
}));
|
|
49
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
50
|
+
const DialogDescription = /*#__PURE__*/ React.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(DialogPrimitive.Description, {
|
|
51
|
+
ref: ref,
|
|
52
|
+
className: cn("nct-text-sm nct-text-muted-foreground", className),
|
|
53
|
+
...props
|
|
54
|
+
}));
|
|
55
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
56
|
+
|
|
57
|
+
export { Dialog as D, DialogTrigger as a, DialogContent as b };
|
package/dist/es/index.mjs
CHANGED
|
@@ -1,30 +1,54 @@
|
|
|
1
1
|
'use server';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import { d as TableHeader, e as TableRow, T as TableHead } from './cache-entry-client-
|
|
3
|
+
import { d as TableHeader, e as TableRow, T as TableHead } from './cache-entry-client-CtWrVYTN.js';
|
|
4
4
|
import { Braces, PanelBottomCloseIcon } from 'lucide-react';
|
|
5
5
|
import { existsSync } from 'fs';
|
|
6
6
|
import { readdir, readFile } from 'node:fs/promises';
|
|
7
|
-
import { z } from 'zod';
|
|
7
|
+
import { z, ZodError } from 'zod';
|
|
8
8
|
import { C as CachePanelContextProvider } from './cache-panel-context-client-D5NKXXpF.js';
|
|
9
|
-
import { C as CachePanelHead } from './cache-panel-head-client-
|
|
10
|
-
import { C as CachePanelTable } from './cache-panel-table-client-
|
|
11
|
-
import { C as CachePanelTrigger } from './cache-panel-trigger-client-
|
|
12
|
-
import { C as CacheTable } from './cache-panel-wrapper-client-
|
|
13
|
-
import { R as RefreshDataButton } from './refresh-data-button-client-
|
|
9
|
+
import { C as CachePanelHead } from './cache-panel-head-client-CZC6pddt.js';
|
|
10
|
+
import { C as CachePanelTable } from './cache-panel-table-client-Qc84cSj6.js';
|
|
11
|
+
import { C as CachePanelTrigger } from './cache-panel-trigger-client-GrlxjSO5.js';
|
|
12
|
+
import { C as CacheTable } from './cache-panel-wrapper-client-BosTuysv.js';
|
|
13
|
+
import { R as RefreshDataButton } from './refresh-data-button-client-DaxVafNg.js';
|
|
14
14
|
|
|
15
|
+
const stringToJSONSchema = z.string().transform((str, ctx)=>{
|
|
16
|
+
try {
|
|
17
|
+
return JSON.parse(str);
|
|
18
|
+
} catch (e) {
|
|
19
|
+
ctx.addIssue({
|
|
20
|
+
code: "custom",
|
|
21
|
+
message: "Encoded body is not in JSON format",
|
|
22
|
+
path: [
|
|
23
|
+
"data",
|
|
24
|
+
"body"
|
|
25
|
+
]
|
|
26
|
+
});
|
|
27
|
+
return z.NEVER;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
15
30
|
const nextCacheFileSchema = z.object({
|
|
16
31
|
data: z.object({
|
|
17
32
|
body: z.string(),
|
|
18
33
|
headers: z.record(z.string(), z.string()),
|
|
19
34
|
status: z.number(),
|
|
20
35
|
url: z.string()
|
|
21
|
-
})
|
|
36
|
+
}),
|
|
22
37
|
kind: z.union([
|
|
23
38
|
z.literal("FETCH"),
|
|
24
39
|
z.unknown()
|
|
25
40
|
]),
|
|
26
41
|
revalidate: z.number().optional(),
|
|
27
42
|
tags: z.array(z.string()).optional().default([])
|
|
43
|
+
}).transform((cacheEntry)=>{
|
|
44
|
+
const body = stringToJSONSchema.parse(atob(cacheEntry.data.body));
|
|
45
|
+
return {
|
|
46
|
+
...cacheEntry,
|
|
47
|
+
data: {
|
|
48
|
+
...cacheEntry.data,
|
|
49
|
+
body
|
|
50
|
+
}
|
|
51
|
+
};
|
|
28
52
|
});
|
|
29
53
|
|
|
30
54
|
const cachePath = ".next/cache/fetch-cache";
|
|
@@ -32,30 +56,35 @@ const getCacheFiles = async ()=>{
|
|
|
32
56
|
if (!existsSync(cachePath)) {
|
|
33
57
|
return;
|
|
34
58
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
59
|
+
const files = await readdir(cachePath);
|
|
60
|
+
const cacheFiles = new Map();
|
|
61
|
+
for (const file of files){
|
|
62
|
+
// ignore tags-manifest file
|
|
63
|
+
if (file.match(/manifest/)) {
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
try {
|
|
39
67
|
const fileContent = await readFile(`${cachePath}/${file}`);
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
68
|
+
const cacheEntry = nextCacheFileSchema.parse(JSON.parse(fileContent.toString()));
|
|
69
|
+
cacheFiles.set(file, cacheEntry);
|
|
70
|
+
} catch (error) {
|
|
71
|
+
if (error instanceof ZodError) {
|
|
72
|
+
const issues = error.issues;
|
|
73
|
+
console.error(`File ${file} do not match the schema`, issues);
|
|
43
74
|
continue;
|
|
44
75
|
}
|
|
45
|
-
|
|
76
|
+
console.error(`Error parsing ${file}`);
|
|
46
77
|
}
|
|
47
|
-
return cacheFiles;
|
|
48
|
-
} catch (error) {
|
|
49
|
-
console.error(error);
|
|
50
|
-
throw Error("Error reading cache files");
|
|
51
78
|
}
|
|
79
|
+
return cacheFiles;
|
|
52
80
|
};
|
|
53
81
|
|
|
54
82
|
async function NextCacheToolbar() {
|
|
55
83
|
const files = await getCacheFiles();
|
|
56
84
|
const cacheEntries = Array.from(files?.entries() ?? []);
|
|
57
85
|
return /*#__PURE__*/ jsx("div", {
|
|
58
|
-
|
|
86
|
+
id: "next-cache-toolbar",
|
|
87
|
+
className: "nct-text-primary nct-font-mono",
|
|
59
88
|
children: /*#__PURE__*/ jsxs(CachePanelContextProvider, {
|
|
60
89
|
children: [
|
|
61
90
|
/*#__PURE__*/ jsx(CachePanelTrigger, {
|
package/dist/es/{refresh-data-button-client-Bh7PpxMP.js → refresh-data-button-client-DaxVafNg.js}
RENAMED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { B as Button } from './cache-
|
|
4
|
-
import { c as cn } from './cache-entry-client-UcY_Onfg.js';
|
|
3
|
+
import { B as Button, c as cn } from './cache-entry-client-CtWrVYTN.js';
|
|
5
4
|
import { Loader2 } from 'lucide-react';
|
|
6
5
|
import { useRouter } from 'next/navigation';
|
|
7
6
|
import { useTransition } from 'react';
|
package/dist/style.css
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
/*! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--font-sans),ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}:root{--background:0 0% 100%;--foreground:222.2 47.4% 11.2%;--muted:210 40% 96.1%;--muted-foreground:215.4 16.3% 46.9%;--popover:0 0% 100%;--popover-foreground:222.2 47.4% 11.2%;--border:214.3 31.8% 91.4%;--input:214.3 31.8% 91.4%;--card:0 0% 100%;--card-foreground:222.2 47.4% 11.2%;--primary:222.2 47.4% 11.2%;--primary-foreground:210 40% 98%;--secondary:210 40% 96.1%;--secondary-foreground:222.2 47.4% 11.2%;--accent:210 40% 96.1%;--accent-foreground:222.2 47.4% 11.2%;--destructive:0 100% 50%;--destructive-foreground:210 40% 98%;--ring:215 20.2% 65.1%;--radius:0.5rem}.dark{--background:224 71% 4%;--foreground:213 31% 91%;--muted:223 47% 11%;--muted-foreground:215.4 16.3% 56.9%;--accent:216 34% 17%;--accent-foreground:210 40% 98%;--popover:224 71% 4%;--popover-foreground:215 20.2% 65.1%;--border:216 34% 17%;--input:216 34% 17%;--card:224 71% 4%;--card-foreground:213 31% 91%;--primary:210 40% 98%;--primary-foreground:222.2 47.4% 1.2%;--secondary:222.2 47.4% 11.2%;--secondary-foreground:210 40% 98%;--destructive:0 63% 31%;--destructive-foreground:210 40% 98%;--ring:216 34% 17%;--radius:0.5rem}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.nct-fixed{position:fixed}.nct-sticky{position:sticky}.nct-inset-x-0{left:0;right:0}.nct-bottom-0{bottom:0}.nct-bottom-4{bottom:1rem}.nct-right-4{right:1rem}.nct-top-0{top:0}.nct-z-50{z-index:50}.nct-mt-4{margin-top:1rem}.nct-flex{display:flex}.nct-inline-flex{display:inline-flex}.nct-h-10{height:2.5rem}.nct-h-11{height:2.75rem}.nct-h-12{height:3rem}.nct-h-4{height:1rem}.nct-h-9{height:2.25rem}.nct-max-h-\[35vh\]{max-height:35vh}.nct-w-10{width:2.5rem}.nct-w-4{width:1rem}.nct-w-\[300px\]{width:300px}.nct-w-full{width:100%}.nct-max-w-\[25vw\]{max-width:25vw}.nct-caption-bottom{caption-side:bottom}@keyframes nct-spin{to{transform:rotate(1turn)}}.nct-animate-spin{animation:nct-spin 1s linear infinite}.nct-break-before-all{-moz-column-break-before:all;break-before:all}.nct-items-center{align-items:center}.nct-justify-end{justify-content:flex-end}.nct-justify-center{justify-content:center}.nct-gap-2{gap:.5rem}.nct-overflow-hidden{overflow:hidden}.nct-overflow-x-auto{overflow-x:auto}.nct-truncate{overflow:hidden;text-overflow:ellipsis}.nct-truncate,.nct-whitespace-nowrap{white-space:nowrap}.nct-rounded-full{border-radius:9999px}.nct-rounded-md{border-radius:calc(var(--radius) - 2px)}.nct-border{border-width:1px}.nct-border-b{border-bottom-width:1px}.nct-border-t{border-top-width:1px}.nct-border-input{border-color:hsl(var(--input))}.nct-border-transparent{border-color:#0000}.nct-bg-background{background-color:hsl(var(--background))}.nct-bg-destructive{background-color:hsl(var(--destructive))}.nct-bg-muted\/50{background-color:hsl(var(--muted)/.5)}.nct-bg-popover{background-color:hsl(var(--popover))}.nct-bg-primary{background-color:hsl(var(--primary))}.nct-bg-secondary{background-color:hsl(var(--secondary))}.nct-bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.nct-from-fuchsia-500{--tw-gradient-from:#d946ef var(--tw-gradient-from-position);--tw-gradient-to:#d946ef00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.nct-to-cyan-500{--tw-gradient-to:#06b6d4 var(--tw-gradient-to-position)}.nct-p-4{padding:1rem}.nct-px-2{padding-left:.5rem;padding-right:.5rem}.nct-px-2\.5{padding-left:.625rem;padding-right:.625rem}.nct-px-3{padding-left:.75rem;padding-right:.75rem}.nct-px-4{padding-left:1rem;padding-right:1rem}.nct-px-8{padding-left:2rem;padding-right:2rem}.nct-py-0{padding-top:0;padding-bottom:0}.nct-py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.nct-py-1{padding-top:.25rem;padding-bottom:.25rem}.nct-py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.nct-py-2{padding-top:.5rem;padding-bottom:.5rem}.nct-text-left{text-align:left}.nct-align-middle{vertical-align:middle}.nct-text-sm{font-size:.875rem;line-height:1.25rem}.nct-text-xs{font-size:.75rem;line-height:1rem}.nct-font-medium{font-weight:500}.nct-font-semibold{font-weight:600}.nct-text-destructive-foreground{color:hsl(var(--destructive-foreground))}.nct-text-foreground{color:hsl(var(--foreground))}.nct-text-muted-foreground{color:hsl(var(--muted-foreground))}.nct-text-popover-foreground{color:hsl(var(--popover-foreground))}.nct-text-primary{color:hsl(var(--primary))}.nct-text-primary-foreground{color:hsl(var(--primary-foreground))}.nct-text-secondary-foreground{color:hsl(var(--secondary-foreground))}.nct-underline{text-decoration-line:underline}.nct-underline-offset-4{text-underline-offset:4px}.nct-shadow-md{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nct-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.nct-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.nct-animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.nct-fade-in-0{--tw-enter-opacity:0}.nct-zoom-in-95{--tw-enter-scale:.95}.hover\:nct-bg-accent:hover{background-color:hsl(var(--accent))}.hover\:nct-bg-destructive\/80:hover{background-color:hsl(var(--destructive)/.8)}.hover\:nct-bg-destructive\/90:hover{background-color:hsl(var(--destructive)/.9)}.hover\:nct-bg-muted\/50:hover{background-color:hsl(var(--muted)/.5)}.hover\:nct-bg-primary\/80:hover{background-color:hsl(var(--primary)/.8)}.hover\:nct-bg-primary\/90:hover{background-color:hsl(var(--primary)/.9)}.hover\:nct-bg-secondary\/80:hover{background-color:hsl(var(--secondary)/.8)}.hover\:nct-text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:nct-underline:hover{text-decoration-line:underline}.focus\:nct-outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus\:nct-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:nct-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\:nct-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\:nct-outline-none:focus-visible{outline:2px solid #0000;outline-offset:2px}.focus-visible\:nct-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:nct-ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:nct-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\:nct-pointer-events-none:disabled{pointer-events:none}.disabled\:nct-opacity-50:disabled{opacity:.5}.data-\[state\=selected\]\:nct-bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=closed\]\:nct-animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\[state\=closed\]\:nct-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:nct-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[side\=bottom\]\:nct-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\[side\=left\]\:nct-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\[side\=right\]\:nct-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\[side\=top\]\:nct-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.\[\&\:has\(\[role\=checkbox\]\)\]\:nct-pr-0:has([role=checkbox]){padding-right:0}.\[\&\>tr\]\:last\:nct-border-b-0:last-child>tr{border-bottom-width:0}.\[\&_tr\:last-child\]\:nct-border-0 tr:last-child{border-width:0}.\[\&_tr\]\:nct-border-b tr{border-bottom-width:1px}
|
|
1
|
+
.json-view{display:block;color:#4d4d4d;text-align:left;--json-property:#009033;--json-index:#676dff;--json-number:#676dff;--json-string:#b2762e;--json-boolean:#dc155e;--json-null:#dc155e}.json-view .json-view--property{color:var(--json-property)}.json-view .json-view--index{color:var(--json-index)}.json-view .json-view--number{color:var(--json-number)}.json-view .json-view--string{color:var(--json-string)}.json-view .json-view--boolean{color:var(--json-boolean)}.json-view .json-view--null{color:var(--json-null)}.json-view .jv-indent{padding-left:1em}.json-view .jv-chevron{display:inline-block;vertical-align:-20%;cursor:pointer;opacity:.4;width:1em;height:1em}:is(.json-view .jv-chevron:hover,.json-view .jv-size:hover+.jv-chevron){opacity:.8}.json-view .jv-size{cursor:pointer;opacity:.4;font-size:.875em;font-style:italic;margin-left:.5em;vertical-align:-5%;line-height:1}.json-view .json-view--link svg,.json-view :is(.json-view--copy,.json-view--edit){display:none;width:1em;height:1em;margin-left:.25em;cursor:pointer}.json-view .json-view--input{width:120px;margin-left:.25em;border-radius:4px;border:1px solid;padding:0 4px;font-size:87.5%;line-height:1.25;background:#0000}.json-view .json-view--deleting{outline:1px solid #da0000;background-color:#da000011;text-decoration-line:line-through}:is(.json-view:hover,.json-view--pair:hover)>.json-view--link svg,:is(.json-view:hover,.json-view--pair:hover)>:is(.json-view--copy,.json-view--edit){display:inline-block}.json-view .jv-button{background:#0000;outline:none;border:none;cursor:pointer}.json-view .cursor-pointer{cursor:pointer}.json-view svg{vertical-align:-10%}.jv-size-chevron~svg{vertical-align:-16%}.json-view_a11y{color:#545454;--json-property:#aa5d00;--json-index:#007299;--json-number:#007299;--json-string:green;--json-boolean:#d91e18;--json-null:#d91e18}.json-view_github{color:#005cc5;--json-property:#005cc5;--json-index:#005cc5;--json-number:#005cc5;--json-string:#032f62;--json-boolean:#005cc5;--json-null:#005cc5}.json-view_vscode{color:#005cc5;--json-property:#0451a5;--json-index:#00f;--json-number:#00f;--json-string:#a31515;--json-boolean:#00f;--json-null:#00f}.json-view_atom{color:#383a42;--json-property:#e45649;--json-index:#986801;--json-number:#986801;--json-string:#50a14f;--json-boolean:#0184bc;--json-null:#0184bc}.json-view_winter-is-coming{color:#0431fa;--json-property:#3a9685;--json-index:#ae408b;--json-number:#ae408b;--json-string:#8123a9;--json-boolean:#0184bc;--json-null:#0184bc}
|
|
2
|
+
/*! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--font-sans),ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}#next-cache-toolbar{--background:0 0% 100%;--foreground:222.2 47.4% 11.2%;--muted:210 40% 96.1%;--muted-foreground:215.4 16.3% 46.9%;--popover:0 0% 100%;--popover-foreground:222.2 47.4% 11.2%;--border:214.3 31.8% 91.4%;--input:214.3 31.8% 91.4%;--card:0 0% 100%;--card-foreground:222.2 47.4% 11.2%;--primary:222.2 47.4% 11.2%;--primary-foreground:210 40% 98%;--secondary:210 40% 96.1%;--secondary-foreground:222.2 47.4% 11.2%;--accent:210 40% 96.1%;--accent-foreground:222.2 47.4% 11.2%;--destructive:0 100% 50%;--destructive-foreground:210 40% 98%;--ring:215 20.2% 65.1%;--radius:0.5rem}@media (prefers-color-scheme:dark){#next-cache-toolbar{--background:224 71% 4%;--foreground:213 31% 91%;--muted:223 47% 11%;--muted-foreground:215.4 16.3% 56.9%;--accent:216 34% 17%;--accent-foreground:210 40% 98%;--popover:224 71% 4%;--popover-foreground:215 20.2% 65.1%;--border:216 34% 17%;--input:216 34% 17%;--card:224 71% 4%;--card-foreground:213 31% 91%;--primary:210 40% 98%;--primary-foreground:222.2 47.4% 1.2%;--secondary:222.2 47.4% 11.2%;--secondary-foreground:210 40% 98%;--destructive:0 63% 31%;--destructive-foreground:210 40% 98%;--ring:216 34% 17%;--radius:0.5rem}}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.nct-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.nct-fixed{position:fixed}.nct-absolute{position:absolute}.nct-sticky{position:sticky}.nct-inset-0{inset:0}.nct-inset-x-0{left:0;right:0}.nct-bottom-0{bottom:0}.nct-bottom-4{bottom:1rem}.nct-left-\[50\%\]{left:50%}.nct-right-4{right:1rem}.nct-top-0{top:0}.nct-top-4{top:1rem}.nct-top-\[50\%\]{top:50%}.nct-z-50{z-index:50}.nct-mt-4{margin-top:1rem}.nct-flex{display:flex}.nct-inline-flex{display:inline-flex}.nct-grid{display:grid}.nct-h-10{height:2.5rem}.nct-h-11{height:2.75rem}.nct-h-12{height:3rem}.nct-h-4{height:1rem}.nct-h-9{height:2.25rem}.nct-max-h-\[35vh\]{max-height:35vh}.nct-max-h-\[65vh\]{max-height:65vh}.nct-w-10{width:2.5rem}.nct-w-4{width:1rem}.nct-w-\[300px\]{width:300px}.nct-w-full{width:100%}.nct-max-w-\[25vw\]{max-width:25vw}.nct-max-w-lg{max-width:32rem}.nct-caption-bottom{caption-side:bottom}.nct-translate-x-\[-50\%\]{--tw-translate-x:-50%}.nct-translate-x-\[-50\%\],.nct-translate-y-\[-50\%\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.nct-translate-y-\[-50\%\]{--tw-translate-y:-50%}@keyframes nct-spin{to{transform:rotate(1turn)}}.nct-animate-spin{animation:nct-spin 1s linear infinite}.nct-break-before-all{-moz-column-break-before:all;break-before:all}.nct-flex-col{flex-direction:column}.nct-flex-col-reverse{flex-direction:column-reverse}.nct-items-center{align-items:center}.nct-justify-end{justify-content:flex-end}.nct-justify-center{justify-content:center}.nct-gap-2{gap:.5rem}.nct-gap-4{gap:1rem}.nct-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))}.nct-space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.nct-space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem*var(--tw-space-y-reverse))}.nct-overflow-hidden{overflow:hidden}.nct-overflow-x-auto{overflow-x:auto}.nct-overflow-y-auto{overflow-y:auto}.nct-overflow-x-hidden{overflow-x:hidden}.nct-truncate{overflow:hidden;text-overflow:ellipsis}.nct-truncate,.nct-whitespace-nowrap{white-space:nowrap}.nct-rounded-full{border-radius:9999px}.nct-rounded-md{border-radius:calc(var(--radius) - 2px)}.nct-rounded-sm{border-radius:calc(var(--radius) - 4px)}.nct-border{border-width:1px}.nct-border-b{border-bottom-width:1px}.nct-border-t{border-top-width:1px}.nct-border-input{border-color:hsl(var(--input))}.nct-border-transparent{border-color:#0000}.nct-bg-background{background-color:hsl(var(--background))}.nct-bg-black\/80{background-color:#000c}.nct-bg-destructive{background-color:hsl(var(--destructive))}.nct-bg-muted\/50{background-color:hsl(var(--muted)/.5)}.nct-bg-popover{background-color:hsl(var(--popover))}.nct-bg-primary{background-color:hsl(var(--primary))}.nct-bg-secondary{background-color:hsl(var(--secondary))}.nct-bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.nct-from-fuchsia-500{--tw-gradient-from:#d946ef var(--tw-gradient-from-position);--tw-gradient-to:#d946ef00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.nct-to-cyan-500{--tw-gradient-to:#06b6d4 var(--tw-gradient-to-position)}.nct-p-4{padding:1rem}.nct-p-6{padding:1.5rem}.nct-px-2{padding-left:.5rem;padding-right:.5rem}.nct-px-2\.5{padding-left:.625rem;padding-right:.625rem}.nct-px-3{padding-left:.75rem;padding-right:.75rem}.nct-px-4{padding-left:1rem;padding-right:1rem}.nct-px-8{padding-left:2rem;padding-right:2rem}.nct-py-0{padding-top:0;padding-bottom:0}.nct-py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.nct-py-1{padding-top:.25rem;padding-bottom:.25rem}.nct-py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.nct-py-2{padding-top:.5rem;padding-bottom:.5rem}.nct-text-left{text-align:left}.nct-text-center{text-align:center}.nct-align-middle{vertical-align:middle}.nct-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.nct-text-lg{font-size:1.125rem;line-height:1.75rem}.nct-text-sm{font-size:.875rem;line-height:1.25rem}.nct-text-xs{font-size:.75rem;line-height:1rem}.nct-font-medium{font-weight:500}.nct-font-semibold{font-weight:600}.nct-leading-none{line-height:1}.nct-tracking-tight{letter-spacing:-.025em}.nct-text-destructive-foreground{color:hsl(var(--destructive-foreground))}.nct-text-foreground{color:hsl(var(--foreground))}.nct-text-muted-foreground{color:hsl(var(--muted-foreground))}.nct-text-popover-foreground{color:hsl(var(--popover-foreground))}.nct-text-primary{color:hsl(var(--primary))}.nct-text-primary-foreground{color:hsl(var(--primary-foreground))}.nct-text-secondary-foreground{color:hsl(var(--secondary-foreground))}.nct-underline{text-decoration-line:underline}.nct-underline-offset-4{text-underline-offset:4px}.nct-opacity-70{opacity:.7}.nct-shadow-lg{--tw-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.nct-shadow-lg,.nct-shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nct-shadow-md{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.nct-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.nct-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.nct-transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.nct-duration-200{transition-duration:.2s}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.nct-animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.nct-fade-in-0{--tw-enter-opacity:0}.nct-zoom-in-95{--tw-enter-scale:.95}.nct-duration-200{animation-duration:.2s}.hover\:nct-bg-accent:hover{background-color:hsl(var(--accent))}.hover\:nct-bg-destructive\/80:hover{background-color:hsl(var(--destructive)/.8)}.hover\:nct-bg-destructive\/90:hover{background-color:hsl(var(--destructive)/.9)}.hover\:nct-bg-muted\/50:hover{background-color:hsl(var(--muted)/.5)}.hover\:nct-bg-primary\/80:hover{background-color:hsl(var(--primary)/.8)}.hover\:nct-bg-primary\/90:hover{background-color:hsl(var(--primary)/.9)}.hover\:nct-bg-secondary\/80:hover{background-color:hsl(var(--secondary)/.8)}.hover\:nct-text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:nct-underline:hover{text-decoration-line:underline}.hover\:nct-opacity-100:hover{opacity:1}.focus\:nct-outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus\:nct-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:nct-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\:nct-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\:nct-outline-none:focus-visible{outline:2px solid #0000;outline-offset:2px}.focus-visible\:nct-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:nct-ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:nct-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\:nct-pointer-events-none:disabled{pointer-events:none}.disabled\:nct-opacity-50:disabled{opacity:.5}.data-\[state\=open\]\:nct-bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=selected\]\:nct-bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=open\]\:nct-text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[state\=open\]\:nct-animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\[state\=closed\]\:nct-animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\[state\=closed\]\:nct-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=open\]\:nct-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=closed\]\:nct-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=open\]\:nct-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[side\=bottom\]\:nct-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\[side\=left\]\:nct-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\[side\=right\]\:nct-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\[side\=top\]\:nct-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\[state\=closed\]\:nct-slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\[state\=closed\]\:nct-slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\[state\=open\]\:nct-slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\[state\=open\]\:nct-slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y:-48%}@media (min-width:640px){.sm\:nct-max-w-3xl{max-width:48rem}.sm\:nct-flex-row{flex-direction:row}.sm\:nct-justify-end{justify-content:flex-end}.sm\:nct-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))}.sm\:nct-rounded-lg{border-radius:var(--radius)}.sm\:nct-text-left{text-align:left}}.\[\&\:has\(\[role\=checkbox\]\)\]\:nct-pr-0:has([role=checkbox]){padding-right:0}.\[\&\>tr\]\:last\:nct-border-b-0:last-child>tr{border-bottom-width:0}.\[\&_tr\:last-child\]\:nct-border-0 tr:last-child{border-width:0}.\[\&_tr\]\:nct-border-b tr{border-bottom-width:1px}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-cache-toolbar",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Toolbar with all cached data in Next.js app router",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prepublish": "npm run build",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"dependencies": {
|
|
20
|
+
"@radix-ui/react-dialog": "^1.0.5",
|
|
20
21
|
"@radix-ui/react-slot": "^1.0.2",
|
|
21
22
|
"@radix-ui/react-tooltip": "^1.0.7",
|
|
22
23
|
"class-variance-authority": "^0.7.0",
|
|
@@ -25,6 +26,7 @@
|
|
|
25
26
|
"next": "^14",
|
|
26
27
|
"react": "^18",
|
|
27
28
|
"react-dom": "^18",
|
|
29
|
+
"react18-json-view": "^0.2.7",
|
|
28
30
|
"tailwind-merge": "^2.2.1",
|
|
29
31
|
"tailwindcss-animate": "^1.0.7",
|
|
30
32
|
"zod": "^3.22.4"
|
package/readme.md
CHANGED
|
@@ -1,28 +1,42 @@
|
|
|
1
|
-
# next-cache-toolbar
|
|
1
|
+
# next-cache-toolbar [](https://www.npmjs.com/package/next-cache-toolbar)
|
|
2
2
|
|
|
3
3
|
A toolbar that helps to identify [data cache](https://nextjs.org/docs/app/building-your-application/caching#data-cache) entries
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|
|
|
7
|
-
## Use
|
|
7
|
+
## Use
|
|
8
8
|
|
|
9
|
-
`next-cache-toolbar` requires to use [app router](https://nextjs.org/docs/app/building-your-application/caching#data-cache)
|
|
10
|
-
You'll need to update your `app/layout.jsx` to use next-themes. The simplest `layout` looks like this:
|
|
9
|
+
`next-cache-toolbar` requires to use [app router](https://nextjs.org/docs/app/building-your-application/caching#data-cache)
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
Create file that we will lazy loading later to avoid bundling `next-cache-toolbar` in production
|
|
12
|
+
```jsx
|
|
13
|
+
// app/toolbar.jsx
|
|
14
|
+
import { NextCacheToolbar } from "next-cache-toolbar";
|
|
14
15
|
import "next-cache-toolbar/style.css";
|
|
15
16
|
|
|
17
|
+
export default function Toolbar() {
|
|
18
|
+
return <NextCacheToolbar />;
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
```jsx
|
|
24
|
+
// app/layout.jsx
|
|
25
|
+
let Toolbar: React.ComponentType = () => null;
|
|
26
|
+
|
|
27
|
+
if (process.env.NODE_ENV === "development") {
|
|
28
|
+
Toolbar = dynamic(() => import("./toolbar"));
|
|
29
|
+
}
|
|
30
|
+
|
|
16
31
|
export default function Layout({ children }) {
|
|
17
32
|
return (
|
|
18
33
|
<html>
|
|
19
|
-
<head
|
|
34
|
+
<head/>
|
|
20
35
|
<body>
|
|
21
36
|
{children}
|
|
22
|
-
|
|
37
|
+
<Toolbar />
|
|
23
38
|
</body>
|
|
24
39
|
</html>
|
|
25
|
-
)
|
|
40
|
+
);
|
|
26
41
|
}
|
|
27
42
|
```
|
|
28
|
-
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var reactSlot = require('@radix-ui/react-slot');
|
|
5
|
-
var classVarianceAuthority = require('class-variance-authority');
|
|
6
|
-
var cacheEntryClient = require('./cache-entry-client-BvxljHoj.js');
|
|
7
|
-
var cachePanelContextClient = require('./cache-panel-context-client-B1EgwMzI.js');
|
|
8
|
-
|
|
9
|
-
function _interopNamespace(e) {
|
|
10
|
-
if (e && e.__esModule) return e;
|
|
11
|
-
var n = Object.create(null);
|
|
12
|
-
if (e) {
|
|
13
|
-
Object.keys(e).forEach(function (k) {
|
|
14
|
-
if (k !== 'default') {
|
|
15
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: function () { return e[k]; }
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
n.default = e;
|
|
24
|
-
return n;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
28
|
-
|
|
29
|
-
const buttonVariants = classVarianceAuthority.cva("nct-inline-flex nct-items-center nct-justify-center nct-whitespace-nowrap nct-rounded-md nct-text-sm nct-font-medium nct-ring-offset-background nct-transition-colors focus-visible:nct-outline-none focus-visible:nct-ring-2 focus-visible:nct-ring-ring focus-visible:nct-ring-offset-2 disabled:nct-pointer-events-none disabled:nct-opacity-50", {
|
|
30
|
-
variants: {
|
|
31
|
-
variant: {
|
|
32
|
-
default: "nct-bg-primary nct-text-primary-foreground hover:nct-bg-primary/90",
|
|
33
|
-
destructive: "nct-bg-destructive nct-text-destructive-foreground hover:nct-bg-destructive/90",
|
|
34
|
-
outline: "nct-border nct-border-input nct-bg-background hover:nct-bg-accent hover:nct-text-accent-foreground",
|
|
35
|
-
secondary: "nct-bg-secondary nct-text-secondary-foreground hover:nct-bg-secondary/80",
|
|
36
|
-
ghost: "hover:nct-bg-accent hover:nct-text-accent-foreground",
|
|
37
|
-
link: "nct-text-primary nct-underline-offset-4 hover:nct-underline"
|
|
38
|
-
},
|
|
39
|
-
size: {
|
|
40
|
-
default: "nct-h-10 nct-px-4 nct-py-2",
|
|
41
|
-
sm: "nct-h-9 nct-rounded-md nct-px-3",
|
|
42
|
-
lg: "nct-h-11 nct-rounded-md nct-px-8",
|
|
43
|
-
icon: "nct-h-10 nct-w-10"
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
defaultVariants: {
|
|
47
|
-
variant: "default",
|
|
48
|
-
size: "default"
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
const Button = /*#__PURE__*/ React__namespace.forwardRef(({ className, variant, size, asChild = false, ...props }, ref)=>{
|
|
52
|
-
const Comp = asChild ? reactSlot.Slot : "button";
|
|
53
|
-
return /*#__PURE__*/ jsxRuntime.jsx(Comp, {
|
|
54
|
-
className: cacheEntryClient.cn(buttonVariants({
|
|
55
|
-
variant,
|
|
56
|
-
size,
|
|
57
|
-
className
|
|
58
|
-
})),
|
|
59
|
-
ref: ref,
|
|
60
|
-
...props
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
Button.displayName = "Button";
|
|
64
|
-
|
|
65
|
-
function CachePanelTrigger(props) {
|
|
66
|
-
const { toggleOpen } = cachePanelContextClient.useCachePanelContext();
|
|
67
|
-
return /*#__PURE__*/ jsxRuntime.jsx(Button, {
|
|
68
|
-
variant: "ghost",
|
|
69
|
-
size: "icon",
|
|
70
|
-
onClick: toggleOpen,
|
|
71
|
-
...props
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
exports.Button = Button;
|
|
76
|
-
exports.CachePanelTrigger = CachePanelTrigger;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { Slot } from '@radix-ui/react-slot';
|
|
5
|
-
import { cva } from 'class-variance-authority';
|
|
6
|
-
import { c as cn } from './cache-entry-client-UcY_Onfg.js';
|
|
7
|
-
import { u as useCachePanelContext } from './cache-panel-context-client-D5NKXXpF.js';
|
|
8
|
-
|
|
9
|
-
const buttonVariants = cva("nct-inline-flex nct-items-center nct-justify-center nct-whitespace-nowrap nct-rounded-md nct-text-sm nct-font-medium nct-ring-offset-background nct-transition-colors focus-visible:nct-outline-none focus-visible:nct-ring-2 focus-visible:nct-ring-ring focus-visible:nct-ring-offset-2 disabled:nct-pointer-events-none disabled:nct-opacity-50", {
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
default: "nct-bg-primary nct-text-primary-foreground hover:nct-bg-primary/90",
|
|
13
|
-
destructive: "nct-bg-destructive nct-text-destructive-foreground hover:nct-bg-destructive/90",
|
|
14
|
-
outline: "nct-border nct-border-input nct-bg-background hover:nct-bg-accent hover:nct-text-accent-foreground",
|
|
15
|
-
secondary: "nct-bg-secondary nct-text-secondary-foreground hover:nct-bg-secondary/80",
|
|
16
|
-
ghost: "hover:nct-bg-accent hover:nct-text-accent-foreground",
|
|
17
|
-
link: "nct-text-primary nct-underline-offset-4 hover:nct-underline"
|
|
18
|
-
},
|
|
19
|
-
size: {
|
|
20
|
-
default: "nct-h-10 nct-px-4 nct-py-2",
|
|
21
|
-
sm: "nct-h-9 nct-rounded-md nct-px-3",
|
|
22
|
-
lg: "nct-h-11 nct-rounded-md nct-px-8",
|
|
23
|
-
icon: "nct-h-10 nct-w-10"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
defaultVariants: {
|
|
27
|
-
variant: "default",
|
|
28
|
-
size: "default"
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
const Button = /*#__PURE__*/ React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref)=>{
|
|
32
|
-
const Comp = asChild ? Slot : "button";
|
|
33
|
-
return /*#__PURE__*/ jsx(Comp, {
|
|
34
|
-
className: cn(buttonVariants({
|
|
35
|
-
variant,
|
|
36
|
-
size,
|
|
37
|
-
className
|
|
38
|
-
})),
|
|
39
|
-
ref: ref,
|
|
40
|
-
...props
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
Button.displayName = "Button";
|
|
44
|
-
|
|
45
|
-
function CachePanelTrigger(props) {
|
|
46
|
-
const { toggleOpen } = useCachePanelContext();
|
|
47
|
-
return /*#__PURE__*/ jsx(Button, {
|
|
48
|
-
variant: "ghost",
|
|
49
|
-
size: "icon",
|
|
50
|
-
onClick: toggleOpen,
|
|
51
|
-
...props
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export { Button as B, CachePanelTrigger as C };
|