next-cache-toolbar 0.3.1 → 0.4.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/cjs/{getCacheEntries-server-Bq5gM82M.js → cache-actions-server-DI4O-8Mk.js} +22 -3
- package/dist/cjs/{cache-entry-client-BlFbLrtq.js → cache-entry-client-BDvm5Nka.js} +24 -23
- package/dist/cjs/{cache-panel-context-client-CkDMJX2-.js → cache-panel-context-client-BAWaY7aj.js} +2 -2
- package/dist/cjs/{cache-panel-head-client-BqfBWPpR.js → cache-panel-head-client-DoVI1VY-.js} +7 -6
- package/dist/cjs/{cache-panel-table-client-DBvA6vo5.js → cache-panel-table-client-BxR7nZYV.js} +2 -2
- package/dist/cjs/{cache-panel-trigger-client-0RzTHzAT.js → cache-panel-trigger-client-D1sIYjse.js} +2 -2
- package/dist/cjs/{cache-panel-wrapper-client-DTI35uJg.js → cache-panel-wrapper-client-B23AIy64.js} +2 -2
- package/dist/cjs/{cache-purge-button-client-CXGIDomZ.js → cache-purge-button-client-B4qYXFdD.js} +5 -5
- package/dist/cjs/{cache-refresh-data-client-DIPw0IhW.js → cache-refresh-data-client-ClC2tUdG.js} +6 -5
- package/dist/cjs/{dialog-client-eJy2OUEG.js → dialog-client-CMf42FFs.js} +10 -5
- package/dist/cjs/index.js +15 -12
- package/dist/es/{getCacheEntries-server-eY7FwQMw.mjs → cache-actions-server-BkcOoHXU.mjs} +22 -4
- package/dist/es/{cache-entry-client-Bk7a0rFQ.mjs → cache-entry-client-CGkblhiP.mjs} +15 -13
- package/dist/es/{cache-panel-context-client-DlqXZGzO.mjs → cache-panel-context-client-BFBQmUKF.mjs} +2 -2
- package/dist/es/{cache-panel-head-client-DTReOdNO.mjs → cache-panel-head-client-BHhEgqib.mjs} +3 -2
- package/dist/es/{cache-panel-table-client-B844eHwF.mjs → cache-panel-table-client-DTElYF1A.mjs} +2 -2
- package/dist/es/{cache-panel-trigger-client-CbXiKLEx.mjs → cache-panel-trigger-client-Jfg-NRyf.mjs} +2 -2
- package/dist/es/{cache-panel-wrapper-client-Dcmlm3kc.mjs → cache-panel-wrapper-client-CQ26A5sb.mjs} +2 -2
- package/dist/es/{cache-purge-button-client-CN9H6t8R.mjs → cache-purge-button-client-BYGQCYwP.mjs} +5 -5
- package/dist/es/{cache-refresh-data-client-CX8rfbFV.mjs → cache-refresh-data-client-wu8fHpd4.mjs} +4 -3
- package/dist/es/{dialog-client-D8kKKnZH.mjs → dialog-client-vEz3dSiD.mjs} +6 -2
- package/dist/es/index.mjs +14 -11
- package/dist/style.css +1 -1
- package/package.json +27 -25
- package/readme.md +7 -1
- package/dist/cjs/purge-cache-server-GmkiFGoN.js +0 -12
- package/dist/es/purge-cache-server-Dd41_99d.mjs +0 -12
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
var node_fs = require('node:fs');
|
|
3
3
|
var zod = require('zod');
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Resolves the fetch cache directory for the current Next.js server.
|
|
7
|
+
* Since Next.js 16 the dev server writes its output to `<distDir>/dev`.
|
|
8
|
+
*/ const getFetchCachePath = (distDir)=>{
|
|
9
|
+
const devDistDir = `${distDir}/dev`;
|
|
10
|
+
if (process.env.NODE_ENV === "development" && node_fs.existsSync(devDistDir)) {
|
|
11
|
+
return `${devDistDir}/cache/fetch-cache`;
|
|
12
|
+
}
|
|
13
|
+
return `${distDir}/cache/fetch-cache`;
|
|
14
|
+
};
|
|
15
|
+
|
|
5
16
|
const stringToJSONSchema = zod.z.string().transform((str, ctx)=>{
|
|
6
17
|
try {
|
|
7
18
|
return JSON.parse(str);
|
|
@@ -49,7 +60,7 @@ const nextCacheFileSchema = zod.z.union([
|
|
|
49
60
|
unstableCacheFileSchema,
|
|
50
61
|
fetchCacheFileSchema
|
|
51
62
|
]).transform((cacheEntry)=>{
|
|
52
|
-
const body = cacheEntry.data.url !== "" ? stringToJSONSchema.parse(
|
|
63
|
+
const body = cacheEntry.data.url !== "" ? stringToJSONSchema.parse(Buffer.from(cacheEntry.data.body, "base64").toString("utf8")) : stringToJSONSchema.parse(cacheEntry.data.body);
|
|
53
64
|
return {
|
|
54
65
|
...cacheEntry,
|
|
55
66
|
timestamp: cacheEntry.data.headers?.date ? new Date(cacheEntry.data.headers?.date) : new Date(),
|
|
@@ -62,7 +73,7 @@ const nextCacheFileSchema = zod.z.union([
|
|
|
62
73
|
});
|
|
63
74
|
|
|
64
75
|
const getCacheFiles = async (distDir)=>{
|
|
65
|
-
const cachePath =
|
|
76
|
+
const cachePath = getFetchCachePath(distDir);
|
|
66
77
|
if (!node_fs.existsSync(cachePath)) {
|
|
67
78
|
return;
|
|
68
79
|
}
|
|
@@ -86,9 +97,10 @@ const getCacheFiles = async (distDir)=>{
|
|
|
86
97
|
});
|
|
87
98
|
const jsonData = JSON.parse(fileContent.toString());
|
|
88
99
|
const cacheEntry = nextCacheFileSchema.parse(jsonData);
|
|
100
|
+
// mtime, not birthtime: Next.js rewrites the same file when an entry is revalidated
|
|
89
101
|
cacheFiles.set(file, {
|
|
90
102
|
...cacheEntry,
|
|
91
|
-
timestamp: fileStats.
|
|
103
|
+
timestamp: fileStats.mtime
|
|
92
104
|
});
|
|
93
105
|
} catch (error) {
|
|
94
106
|
if (error instanceof zod.ZodError) {
|
|
@@ -100,5 +112,12 @@ const getCacheFiles = async (distDir)=>{
|
|
|
100
112
|
}
|
|
101
113
|
return Array.from(cacheFiles.entries());
|
|
102
114
|
};
|
|
115
|
+
const purgeCache = async (distDir)=>{
|
|
116
|
+
await node_fs.promises.rm(getFetchCachePath(distDir), {
|
|
117
|
+
recursive: true,
|
|
118
|
+
force: true
|
|
119
|
+
});
|
|
120
|
+
};
|
|
103
121
|
|
|
104
122
|
exports.getCacheFiles = getCacheFiles;
|
|
123
|
+
exports.purgeCache = purgeCache;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
var jsxRuntime = require('react/jsx-runtime');
|
|
3
|
-
var
|
|
4
|
-
var tailwindMerge = require('tailwind-merge');
|
|
3
|
+
var dialogClient = require('./dialog-client-CMf42FFs.js');
|
|
5
4
|
var classVarianceAuthority = require('class-variance-authority');
|
|
6
5
|
var reactSlot = require('@radix-ui/react-slot');
|
|
7
6
|
var React = require('react');
|
|
8
|
-
var dialogClient = require('./dialog-client-eJy2OUEG.js');
|
|
9
7
|
var JsonView = require('react18-json-view');
|
|
10
8
|
|
|
11
9
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -31,55 +29,51 @@ function _interopNamespace(e) {
|
|
|
31
29
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
32
30
|
var JsonView__default = /*#__PURE__*/_interopDefault(JsonView);
|
|
33
31
|
|
|
34
|
-
function cn(...inputs) {
|
|
35
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
36
|
-
}
|
|
37
|
-
|
|
38
32
|
const Table = /*#__PURE__*/ React__namespace.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxRuntime.jsx("table", {
|
|
39
33
|
ref: ref,
|
|
40
|
-
className: cn("nct-w-full nct-caption-bottom nct-text-sm", className),
|
|
34
|
+
className: dialogClient.cn("nct-w-full nct-caption-bottom nct-text-sm", className),
|
|
41
35
|
...props
|
|
42
36
|
}));
|
|
43
37
|
Table.displayName = "Table";
|
|
44
38
|
const TableHeader = /*#__PURE__*/ React__namespace.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxRuntime.jsx("thead", {
|
|
45
39
|
ref: ref,
|
|
46
|
-
className: cn("[&_tr]:nct-border-b", className),
|
|
40
|
+
className: dialogClient.cn("[&_tr]:nct-border-b", className),
|
|
47
41
|
...props
|
|
48
42
|
}));
|
|
49
43
|
TableHeader.displayName = "TableHeader";
|
|
50
44
|
const TableBody = /*#__PURE__*/ React__namespace.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxRuntime.jsx("tbody", {
|
|
51
45
|
ref: ref,
|
|
52
|
-
className: cn("[&_tr:last-child]:nct-border-0", className),
|
|
46
|
+
className: dialogClient.cn("[&_tr:last-child]:nct-border-0", className),
|
|
53
47
|
...props
|
|
54
48
|
}));
|
|
55
49
|
TableBody.displayName = "TableBody";
|
|
56
50
|
const TableFooter = /*#__PURE__*/ React__namespace.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxRuntime.jsx("tfoot", {
|
|
57
51
|
ref: ref,
|
|
58
|
-
className: cn("nct-border-t nct-bg-muted/50 nct-font-medium [&>tr]:last:nct-border-b-0", className),
|
|
52
|
+
className: dialogClient.cn("nct-border-t nct-bg-muted/50 nct-font-medium [&>tr]:last:nct-border-b-0", className),
|
|
59
53
|
...props
|
|
60
54
|
}));
|
|
61
55
|
TableFooter.displayName = "TableFooter";
|
|
62
56
|
const TableRow = /*#__PURE__*/ React__namespace.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxRuntime.jsx("tr", {
|
|
63
57
|
ref: ref,
|
|
64
|
-
className: cn("nct-border-b nct-transition-colors hover:nct-bg-muted/50 data-[state=selected]:nct-bg-muted", className),
|
|
58
|
+
className: dialogClient.cn("nct-border-b nct-transition-colors hover:nct-bg-muted/50 data-[state=selected]:nct-bg-muted", className),
|
|
65
59
|
...props
|
|
66
60
|
}));
|
|
67
61
|
TableRow.displayName = "TableRow";
|
|
68
62
|
const TableHead = /*#__PURE__*/ React__namespace.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxRuntime.jsx("th", {
|
|
69
63
|
ref: ref,
|
|
70
|
-
className: cn("nct-h-12 nct-px-4 nct-text-left nct-align-middle nct-font-medium nct-text-muted-foreground [&:has([role=checkbox])]:nct-pr-0", className),
|
|
64
|
+
className: dialogClient.cn("nct-h-12 nct-px-4 nct-text-left nct-align-middle nct-font-medium nct-text-muted-foreground [&:has([role=checkbox])]:nct-pr-0", className),
|
|
71
65
|
...props
|
|
72
66
|
}));
|
|
73
67
|
TableHead.displayName = "TableHead";
|
|
74
68
|
const TableCell = /*#__PURE__*/ React__namespace.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxRuntime.jsx("td", {
|
|
75
69
|
ref: ref,
|
|
76
|
-
className: cn("nct-p-4 nct-align-middle [&:has([role=checkbox])]:nct-pr-0", className),
|
|
70
|
+
className: dialogClient.cn("nct-p-4 nct-align-middle [&:has([role=checkbox])]:nct-pr-0", className),
|
|
77
71
|
...props
|
|
78
72
|
}));
|
|
79
73
|
TableCell.displayName = "TableCell";
|
|
80
74
|
const TableCaption = /*#__PURE__*/ React__namespace.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxRuntime.jsx("caption", {
|
|
81
75
|
ref: ref,
|
|
82
|
-
className: cn("nct-mt-4 nct-text-sm nct-text-muted-foreground", className),
|
|
76
|
+
className: dialogClient.cn("nct-mt-4 nct-text-sm nct-text-muted-foreground", className),
|
|
83
77
|
...props
|
|
84
78
|
}));
|
|
85
79
|
TableCaption.displayName = "TableCaption";
|
|
@@ -99,14 +93,14 @@ const badgeVariants = classVarianceAuthority.cva("nct-inline-flex nct-items-cent
|
|
|
99
93
|
});
|
|
100
94
|
function Badge({ className, variant, ...props }) {
|
|
101
95
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
102
|
-
className: cn(badgeVariants({
|
|
96
|
+
className: dialogClient.cn(badgeVariants({
|
|
103
97
|
variant
|
|
104
98
|
}), className),
|
|
105
99
|
...props
|
|
106
100
|
});
|
|
107
101
|
}
|
|
108
102
|
|
|
109
|
-
const buttonVariants = classVarianceAuthority.cva("nct-inline-flex nct-items-center nct-justify-center nct-whitespace-nowrap nct-
|
|
103
|
+
const buttonVariants = classVarianceAuthority.cva("nct-inline-flex nct-items-center nct-justify-center nct-whitespace-nowrap 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", {
|
|
110
104
|
variants: {
|
|
111
105
|
variant: {
|
|
112
106
|
default: "nct-bg-primary nct-text-primary-foreground hover:nct-bg-primary/90",
|
|
@@ -119,23 +113,31 @@ const buttonVariants = classVarianceAuthority.cva("nct-inline-flex nct-items-cen
|
|
|
119
113
|
},
|
|
120
114
|
size: {
|
|
121
115
|
default: "nct-h-10 nct-px-4 nct-py-2",
|
|
122
|
-
sm: "nct-h-9 nct-
|
|
123
|
-
lg: "nct-h-11 nct-
|
|
116
|
+
sm: "nct-h-9 nct-px-3",
|
|
117
|
+
lg: "nct-h-11 nct-px-8",
|
|
124
118
|
icon: "nct-h-10 nct-w-10",
|
|
125
119
|
text: "h-auto"
|
|
120
|
+
},
|
|
121
|
+
// Radius is a variant rather than a className override: conflicting classes
|
|
122
|
+
// are not merged, so two nct-rounded-* classes would resolve by stylesheet order.
|
|
123
|
+
rounded: {
|
|
124
|
+
md: "nct-rounded-md",
|
|
125
|
+
full: "nct-rounded-full"
|
|
126
126
|
}
|
|
127
127
|
},
|
|
128
128
|
defaultVariants: {
|
|
129
129
|
variant: "default",
|
|
130
|
-
size: "default"
|
|
130
|
+
size: "default",
|
|
131
|
+
rounded: "md"
|
|
131
132
|
}
|
|
132
133
|
});
|
|
133
|
-
const Button = /*#__PURE__*/ React__namespace.forwardRef(({ className, variant, size, asChild = false, ...props }, ref)=>{
|
|
134
|
+
const Button = /*#__PURE__*/ React__namespace.forwardRef(({ className, variant, size, rounded, asChild = false, ...props }, ref)=>{
|
|
134
135
|
const Comp = asChild ? reactSlot.Slot : "button";
|
|
135
136
|
return /*#__PURE__*/ jsxRuntime.jsx(Comp, {
|
|
136
|
-
className: cn(buttonVariants({
|
|
137
|
+
className: dialogClient.cn(buttonVariants({
|
|
137
138
|
variant,
|
|
138
139
|
size,
|
|
140
|
+
rounded,
|
|
139
141
|
className
|
|
140
142
|
})),
|
|
141
143
|
ref: ref,
|
|
@@ -223,4 +225,3 @@ exports.TableCell = TableCell;
|
|
|
223
225
|
exports.TableHead = TableHead;
|
|
224
226
|
exports.TableHeader = TableHeader;
|
|
225
227
|
exports.TableRow = TableRow;
|
|
226
|
-
exports.cn = cn;
|
package/dist/cjs/{cache-panel-head-client-BqfBWPpR.js → cache-panel-head-client-DoVI1VY-.js}
RENAMED
|
@@ -1,9 +1,10 @@
|
|
|
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-BDvm5Nka.js');
|
|
4
|
+
var dialogClient = require('./dialog-client-CMf42FFs.js');
|
|
4
5
|
var React = require('react');
|
|
5
6
|
var lucideReact = require('lucide-react');
|
|
6
|
-
var cachePanelContextClient = require('./cache-panel-context-client-
|
|
7
|
+
var cachePanelContextClient = require('./cache-panel-context-client-BAWaY7aj.js');
|
|
7
8
|
|
|
8
9
|
function _interopNamespace(e) {
|
|
9
10
|
if (e && e.__esModule) return e;
|
|
@@ -28,7 +29,7 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
|
28
29
|
const Input = /*#__PURE__*/ React__namespace.forwardRef(({ className, type, ...props }, ref)=>{
|
|
29
30
|
return /*#__PURE__*/ jsxRuntime.jsx("input", {
|
|
30
31
|
type: type,
|
|
31
|
-
className:
|
|
32
|
+
className: dialogClient.cn("nct-flex nct-h-10 nct-w-full nct-rounded-md nct-border nct-border-input nct-bg-background nct-px-3 nct-py-2 nct-text-sm nct-ring-offset-background file:nct-border-0 file:nct-bg-transparent file:nct-text-sm file:nct-font-medium placeholder:nct-text-muted-foreground focus-visible:nct-outline-none focus-visible:nct-ring-2 focus-visible:nct-ring-ring focus-visible:nct-ring-offset-2 disabled:nct-cursor-not-allowed disabled:nct-opacity-50", className),
|
|
32
33
|
ref: ref,
|
|
33
34
|
...props
|
|
34
35
|
});
|
|
@@ -102,11 +103,11 @@ const CachePanelHead = ({ sortingProperty, children, className, withFilter = fal
|
|
|
102
103
|
const isActiveSortProperty = sorting?.key === sortingProperty;
|
|
103
104
|
const ariaSortAttribute = isActiveSortProperty ? sortingDirection === "asc" ? "ascending" : "descending" : undefined;
|
|
104
105
|
return /*#__PURE__*/ jsxRuntime.jsx(cacheEntryClient.TableHead, {
|
|
105
|
-
className:
|
|
106
|
+
className: dialogClient.cn("group", className),
|
|
106
107
|
...props,
|
|
107
108
|
"aria-sort": ariaSortAttribute,
|
|
108
109
|
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
109
|
-
className:
|
|
110
|
+
className: dialogClient.cn("nct-flex nct-items-center nct-gap-2 nct-py-2", isActiveSortProperty && "nct-underline"),
|
|
110
111
|
children: [
|
|
111
112
|
/*#__PURE__*/ jsxRuntime.jsx(cacheEntryClient.Button, {
|
|
112
113
|
variant: "linkTable",
|
|
@@ -127,7 +128,7 @@ const CachePanelHead = ({ sortingProperty, children, className, withFilter = fal
|
|
|
127
128
|
!filterInputVisible && /*#__PURE__*/ jsxRuntime.jsx(cacheEntryClient.Button, {
|
|
128
129
|
variant: "ghost",
|
|
129
130
|
size: "icon",
|
|
130
|
-
className:
|
|
131
|
+
className: dialogClient.cn(),
|
|
131
132
|
onClick: ()=>setFilterInputVisible(true),
|
|
132
133
|
children: /*#__PURE__*/ jsxRuntime.jsx(lucideReact.FilterIcon, {})
|
|
133
134
|
}),
|
package/dist/cjs/{cache-panel-table-client-DBvA6vo5.js → cache-panel-table-client-BxR7nZYV.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
var jsxRuntime = require('react/jsx-runtime');
|
|
3
|
-
var cacheEntryClient = require('./cache-entry-client-
|
|
4
|
-
var cachePanelContextClient = require('./cache-panel-context-client-
|
|
3
|
+
var cacheEntryClient = require('./cache-entry-client-BDvm5Nka.js');
|
|
4
|
+
var cachePanelContextClient = require('./cache-panel-context-client-BAWaY7aj.js');
|
|
5
5
|
|
|
6
6
|
const CachePanelTable = ()=>{
|
|
7
7
|
const { entries } = cachePanelContextClient.useCachePanelContext();
|
package/dist/cjs/{cache-panel-trigger-client-0RzTHzAT.js → cache-panel-trigger-client-D1sIYjse.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
var jsxRuntime = require('react/jsx-runtime');
|
|
3
|
-
var cacheEntryClient = require('./cache-entry-client-
|
|
4
|
-
var cachePanelContextClient = require('./cache-panel-context-client-
|
|
3
|
+
var cacheEntryClient = require('./cache-entry-client-BDvm5Nka.js');
|
|
4
|
+
var cachePanelContextClient = require('./cache-panel-context-client-BAWaY7aj.js');
|
|
5
5
|
|
|
6
6
|
function CachePanelTrigger(props) {
|
|
7
7
|
const { toggleOpen } = cachePanelContextClient.useCachePanelContext();
|
package/dist/cjs/{cache-panel-wrapper-client-DTI35uJg.js → cache-panel-wrapper-client-B23AIy64.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
var jsxRuntime = require('react/jsx-runtime');
|
|
3
|
-
var cacheEntryClient = require('./cache-entry-client-
|
|
4
|
-
var cachePanelContextClient = require('./cache-panel-context-client-
|
|
3
|
+
var cacheEntryClient = require('./cache-entry-client-BDvm5Nka.js');
|
|
4
|
+
var cachePanelContextClient = require('./cache-panel-context-client-BAWaY7aj.js');
|
|
5
5
|
|
|
6
6
|
const CacheTable = (props)=>{
|
|
7
7
|
const { isOpen } = cachePanelContextClient.useCachePanelContext();
|
package/dist/cjs/{cache-purge-button-client-CXGIDomZ.js → cache-purge-button-client-B4qYXFdD.js}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
var jsxRuntime = require('react/jsx-runtime');
|
|
3
|
-
var
|
|
4
|
-
var cacheEntryClient = require('./cache-entry-client-
|
|
3
|
+
var cacheActionsServer = require('./cache-actions-server-DI4O-8Mk.js');
|
|
4
|
+
var cacheEntryClient = require('./cache-entry-client-BDvm5Nka.js');
|
|
5
5
|
var lucideReact = require('lucide-react');
|
|
6
|
-
var cachePanelContextClient = require('./cache-panel-context-client-
|
|
6
|
+
var cachePanelContextClient = require('./cache-panel-context-client-BAWaY7aj.js');
|
|
7
7
|
|
|
8
|
-
function CachePurgeButton() {
|
|
8
|
+
function CachePurgeButton({ distDir }) {
|
|
9
9
|
const { setEntries } = cachePanelContextClient.useCachePanelContext();
|
|
10
10
|
const purgeCache = ()=>{
|
|
11
|
-
|
|
11
|
+
cacheActionsServer.purgeCache(distDir).then(()=>{
|
|
12
12
|
setEntries([]);
|
|
13
13
|
});
|
|
14
14
|
};
|
package/dist/cjs/{cache-refresh-data-client-DIPw0IhW.js → cache-refresh-data-client-ClC2tUdG.js}
RENAMED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
var jsxRuntime = require('react/jsx-runtime');
|
|
3
|
-
var
|
|
4
|
-
var cacheEntryClient = require('./cache-entry-client-
|
|
3
|
+
var cacheActionsServer = require('./cache-actions-server-DI4O-8Mk.js');
|
|
4
|
+
var cacheEntryClient = require('./cache-entry-client-BDvm5Nka.js');
|
|
5
|
+
var dialogClient = require('./dialog-client-CMf42FFs.js');
|
|
5
6
|
var lucideReact = require('lucide-react');
|
|
6
7
|
var navigation = require('next/navigation');
|
|
7
8
|
var React = require('react');
|
|
8
|
-
var cachePanelContextClient = require('./cache-panel-context-client-
|
|
9
|
+
var cachePanelContextClient = require('./cache-panel-context-client-BAWaY7aj.js');
|
|
9
10
|
|
|
10
11
|
function RefreshDataButton({ enabled, interval, distDir }) {
|
|
11
12
|
const { setEntries } = cachePanelContextClient.useCachePanelContext();
|
|
@@ -13,7 +14,7 @@ function RefreshDataButton({ enabled, interval, distDir }) {
|
|
|
13
14
|
const pathname = navigation.usePathname();
|
|
14
15
|
const refreshData = ()=>{
|
|
15
16
|
startTransition(async ()=>{
|
|
16
|
-
const files = await
|
|
17
|
+
const files = await cacheActionsServer.getCacheFiles(distDir);
|
|
17
18
|
setEntries(files ?? []);
|
|
18
19
|
});
|
|
19
20
|
};
|
|
@@ -37,7 +38,7 @@ function RefreshDataButton({ enabled, interval, distDir }) {
|
|
|
37
38
|
size: "icon",
|
|
38
39
|
onClick: refreshData,
|
|
39
40
|
children: /*#__PURE__*/ jsxRuntime.jsx(lucideReact.Loader2, {
|
|
40
|
-
className:
|
|
41
|
+
className: dialogClient.cn("nct-h-4 nct-w-4", {
|
|
41
42
|
"nct-animate-spin": isPending
|
|
42
43
|
})
|
|
43
44
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
var jsxRuntime = require('react/jsx-runtime');
|
|
3
|
-
var
|
|
3
|
+
var clsx = require('clsx');
|
|
4
4
|
var DialogPrimitive = require('@radix-ui/react-dialog');
|
|
5
5
|
var lucideReact = require('lucide-react');
|
|
6
6
|
var React = require('react');
|
|
@@ -26,12 +26,16 @@ function _interopNamespace(e) {
|
|
|
26
26
|
var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
|
|
27
27
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
28
28
|
|
|
29
|
+
function cn(...inputs) {
|
|
30
|
+
return clsx.clsx(inputs);
|
|
31
|
+
}
|
|
32
|
+
|
|
29
33
|
const Dialog = DialogPrimitive__namespace.Root;
|
|
30
34
|
const DialogTrigger = DialogPrimitive__namespace.Trigger;
|
|
31
35
|
const DialogPortal = DialogPrimitive__namespace.Portal;
|
|
32
36
|
const DialogOverlay = /*#__PURE__*/ React__namespace.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxRuntime.jsx(DialogPrimitive__namespace.Overlay, {
|
|
33
37
|
ref: ref,
|
|
34
|
-
className:
|
|
38
|
+
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),
|
|
35
39
|
...props
|
|
36
40
|
}));
|
|
37
41
|
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
@@ -41,7 +45,7 @@ const DialogContent = /*#__PURE__*/ React__namespace.forwardRef(({ className, ch
|
|
|
41
45
|
/*#__PURE__*/ jsxRuntime.jsx(DialogOverlay, {}),
|
|
42
46
|
/*#__PURE__*/ jsxRuntime.jsxs(DialogPrimitive__namespace.Content, {
|
|
43
47
|
ref: ref,
|
|
44
|
-
className:
|
|
48
|
+
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),
|
|
45
49
|
...props,
|
|
46
50
|
children: [
|
|
47
51
|
children,
|
|
@@ -64,13 +68,13 @@ const DialogContent = /*#__PURE__*/ React__namespace.forwardRef(({ className, ch
|
|
|
64
68
|
DialogContent.displayName = DialogPrimitive__namespace.Content.displayName;
|
|
65
69
|
const DialogTitle = /*#__PURE__*/ React__namespace.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxRuntime.jsx(DialogPrimitive__namespace.Title, {
|
|
66
70
|
ref: ref,
|
|
67
|
-
className:
|
|
71
|
+
className: cn("nct-text-lg nct-font-semibold nct-leading-none nct-tracking-tight", className),
|
|
68
72
|
...props
|
|
69
73
|
}));
|
|
70
74
|
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
71
75
|
const DialogDescription = /*#__PURE__*/ React__namespace.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxRuntime.jsx(DialogPrimitive__namespace.Description, {
|
|
72
76
|
ref: ref,
|
|
73
|
-
className:
|
|
77
|
+
className: cn("nct-text-sm nct-text-muted-foreground", className),
|
|
74
78
|
...props
|
|
75
79
|
}));
|
|
76
80
|
DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
@@ -80,3 +84,4 @@ exports.DialogContent = DialogContent;
|
|
|
80
84
|
exports.DialogDescription = DialogDescription;
|
|
81
85
|
exports.DialogTitle = DialogTitle;
|
|
82
86
|
exports.DialogTrigger = DialogTrigger;
|
|
87
|
+
exports.cn = cn;
|
package/dist/cjs/index.js
CHANGED
|
@@ -2,18 +2,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var lucideReact = require('lucide-react');
|
|
5
|
-
var
|
|
6
|
-
var cacheEntryClient = require('./cache-entry-client-
|
|
7
|
-
var cachePanelContextClient = require('./cache-panel-context-client-
|
|
8
|
-
var cachePanelTableClient = require('./cache-panel-table-client-
|
|
9
|
-
var cachePanelTriggerClient = require('./cache-panel-trigger-client-
|
|
10
|
-
var cachePanelWrapperClient = require('./cache-panel-wrapper-client-
|
|
11
|
-
var cachePurgeButtonClient = require('./cache-purge-button-client-
|
|
12
|
-
var cacheRefreshDataClient = require('./cache-refresh-data-client-
|
|
13
|
-
var cachePanelHeadClient = require('./cache-panel-head-client-
|
|
5
|
+
var cacheActionsServer = require('./cache-actions-server-DI4O-8Mk.js');
|
|
6
|
+
var cacheEntryClient = require('./cache-entry-client-BDvm5Nka.js');
|
|
7
|
+
var cachePanelContextClient = require('./cache-panel-context-client-BAWaY7aj.js');
|
|
8
|
+
var cachePanelTableClient = require('./cache-panel-table-client-BxR7nZYV.js');
|
|
9
|
+
var cachePanelTriggerClient = require('./cache-panel-trigger-client-D1sIYjse.js');
|
|
10
|
+
var cachePanelWrapperClient = require('./cache-panel-wrapper-client-B23AIy64.js');
|
|
11
|
+
var cachePurgeButtonClient = require('./cache-purge-button-client-B4qYXFdD.js');
|
|
12
|
+
var cacheRefreshDataClient = require('./cache-refresh-data-client-ClC2tUdG.js');
|
|
13
|
+
var cachePanelHeadClient = require('./cache-panel-head-client-DoVI1VY-.js');
|
|
14
14
|
|
|
15
15
|
async function NextCacheToolbar({ autoRefresh = false, interval = 10000, purgeButton = false, distDir = ".next" }) {
|
|
16
|
-
const files = await
|
|
16
|
+
const files = await cacheActionsServer.getCacheFiles(distDir);
|
|
17
17
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
18
18
|
id: "next-cache-toolbar",
|
|
19
19
|
className: "nct-text-primary nct-font-mono",
|
|
@@ -21,7 +21,8 @@ async function NextCacheToolbar({ autoRefresh = false, interval = 10000, purgeBu
|
|
|
21
21
|
entries: files ?? [],
|
|
22
22
|
children: [
|
|
23
23
|
/*#__PURE__*/ jsxRuntime.jsx(cachePanelTriggerClient.CachePanelTrigger, {
|
|
24
|
-
|
|
24
|
+
rounded: "full",
|
|
25
|
+
className: "nct-fixed nct-bottom-4 nct-right-4 nct-bg-gradient-to-r nct-from-fuchsia-500 nct-to-cyan-500",
|
|
25
26
|
children: /*#__PURE__*/ jsxRuntime.jsx(lucideReact.Layers3Icon, {})
|
|
26
27
|
}),
|
|
27
28
|
/*#__PURE__*/ jsxRuntime.jsxs(cachePanelWrapperClient.CacheTable, {
|
|
@@ -59,7 +60,9 @@ async function NextCacheToolbar({ autoRefresh = false, interval = 10000, purgeBu
|
|
|
59
60
|
interval: interval,
|
|
60
61
|
distDir: distDir
|
|
61
62
|
}),
|
|
62
|
-
purgeButton && /*#__PURE__*/ jsxRuntime.jsx(cachePurgeButtonClient.CachePurgeButton, {
|
|
63
|
+
purgeButton && /*#__PURE__*/ jsxRuntime.jsx(cachePurgeButtonClient.CachePurgeButton, {
|
|
64
|
+
distDir: distDir
|
|
65
|
+
}),
|
|
63
66
|
/*#__PURE__*/ jsxRuntime.jsx(cachePanelTriggerClient.CachePanelTrigger, {
|
|
64
67
|
children: /*#__PURE__*/ jsxRuntime.jsx(lucideReact.PanelBottomCloseIcon, {})
|
|
65
68
|
})
|
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
import { existsSync, promises } from 'node:fs';
|
|
3
3
|
import { z, ZodError } from 'zod';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Resolves the fetch cache directory for the current Next.js server.
|
|
7
|
+
* Since Next.js 16 the dev server writes its output to `<distDir>/dev`.
|
|
8
|
+
*/ const getFetchCachePath = (distDir)=>{
|
|
9
|
+
const devDistDir = `${distDir}/dev`;
|
|
10
|
+
if (process.env.NODE_ENV === "development" && existsSync(devDistDir)) {
|
|
11
|
+
return `${devDistDir}/cache/fetch-cache`;
|
|
12
|
+
}
|
|
13
|
+
return `${distDir}/cache/fetch-cache`;
|
|
14
|
+
};
|
|
15
|
+
|
|
5
16
|
const stringToJSONSchema = z.string().transform((str, ctx)=>{
|
|
6
17
|
try {
|
|
7
18
|
return JSON.parse(str);
|
|
@@ -49,7 +60,7 @@ const nextCacheFileSchema = z.union([
|
|
|
49
60
|
unstableCacheFileSchema,
|
|
50
61
|
fetchCacheFileSchema
|
|
51
62
|
]).transform((cacheEntry)=>{
|
|
52
|
-
const body = cacheEntry.data.url !== "" ? stringToJSONSchema.parse(
|
|
63
|
+
const body = cacheEntry.data.url !== "" ? stringToJSONSchema.parse(Buffer.from(cacheEntry.data.body, "base64").toString("utf8")) : stringToJSONSchema.parse(cacheEntry.data.body);
|
|
53
64
|
return {
|
|
54
65
|
...cacheEntry,
|
|
55
66
|
timestamp: cacheEntry.data.headers?.date ? new Date(cacheEntry.data.headers?.date) : new Date(),
|
|
@@ -62,7 +73,7 @@ const nextCacheFileSchema = z.union([
|
|
|
62
73
|
});
|
|
63
74
|
|
|
64
75
|
const getCacheFiles = async (distDir)=>{
|
|
65
|
-
const cachePath =
|
|
76
|
+
const cachePath = getFetchCachePath(distDir);
|
|
66
77
|
if (!existsSync(cachePath)) {
|
|
67
78
|
return;
|
|
68
79
|
}
|
|
@@ -86,9 +97,10 @@ const getCacheFiles = async (distDir)=>{
|
|
|
86
97
|
});
|
|
87
98
|
const jsonData = JSON.parse(fileContent.toString());
|
|
88
99
|
const cacheEntry = nextCacheFileSchema.parse(jsonData);
|
|
100
|
+
// mtime, not birthtime: Next.js rewrites the same file when an entry is revalidated
|
|
89
101
|
cacheFiles.set(file, {
|
|
90
102
|
...cacheEntry,
|
|
91
|
-
timestamp: fileStats.
|
|
103
|
+
timestamp: fileStats.mtime
|
|
92
104
|
});
|
|
93
105
|
} catch (error) {
|
|
94
106
|
if (error instanceof ZodError) {
|
|
@@ -100,5 +112,11 @@ const getCacheFiles = async (distDir)=>{
|
|
|
100
112
|
}
|
|
101
113
|
return Array.from(cacheFiles.entries());
|
|
102
114
|
};
|
|
115
|
+
const purgeCache = async (distDir)=>{
|
|
116
|
+
await promises.rm(getFetchCachePath(distDir), {
|
|
117
|
+
recursive: true,
|
|
118
|
+
force: true
|
|
119
|
+
});
|
|
120
|
+
};
|
|
103
121
|
|
|
104
|
-
export { getCacheFiles as g };
|
|
122
|
+
export { getCacheFiles as g, purgeCache as p };
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
4
|
-
import { twMerge } from 'tailwind-merge';
|
|
3
|
+
import { e as cn, D as Dialog, d as DialogTrigger, a as DialogContent, c as DialogTitle, b as DialogDescription } from './dialog-client-vEz3dSiD.mjs';
|
|
5
4
|
import { cva } from 'class-variance-authority';
|
|
6
5
|
import { Slot } from '@radix-ui/react-slot';
|
|
7
6
|
import * as React from 'react';
|
|
8
|
-
import { D as Dialog, a as DialogTrigger, b as DialogContent, c as DialogTitle, d as DialogDescription } from './dialog-client-D8kKKnZH.mjs';
|
|
9
7
|
import JsonView from 'react18-json-view';
|
|
10
8
|
|
|
11
|
-
function cn(...inputs) {
|
|
12
|
-
return twMerge(clsx(inputs));
|
|
13
|
-
}
|
|
14
|
-
|
|
15
9
|
const Table = /*#__PURE__*/ React.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("table", {
|
|
16
10
|
ref: ref,
|
|
17
11
|
className: cn("nct-w-full nct-caption-bottom nct-text-sm", className),
|
|
@@ -83,7 +77,7 @@ function Badge({ className, variant, ...props }) {
|
|
|
83
77
|
});
|
|
84
78
|
}
|
|
85
79
|
|
|
86
|
-
const buttonVariants = cva("nct-inline-flex nct-items-center nct-justify-center nct-whitespace-nowrap nct-
|
|
80
|
+
const buttonVariants = cva("nct-inline-flex nct-items-center nct-justify-center nct-whitespace-nowrap 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", {
|
|
87
81
|
variants: {
|
|
88
82
|
variant: {
|
|
89
83
|
default: "nct-bg-primary nct-text-primary-foreground hover:nct-bg-primary/90",
|
|
@@ -96,23 +90,31 @@ const buttonVariants = cva("nct-inline-flex nct-items-center nct-justify-center
|
|
|
96
90
|
},
|
|
97
91
|
size: {
|
|
98
92
|
default: "nct-h-10 nct-px-4 nct-py-2",
|
|
99
|
-
sm: "nct-h-9 nct-
|
|
100
|
-
lg: "nct-h-11 nct-
|
|
93
|
+
sm: "nct-h-9 nct-px-3",
|
|
94
|
+
lg: "nct-h-11 nct-px-8",
|
|
101
95
|
icon: "nct-h-10 nct-w-10",
|
|
102
96
|
text: "h-auto"
|
|
97
|
+
},
|
|
98
|
+
// Radius is a variant rather than a className override: conflicting classes
|
|
99
|
+
// are not merged, so two nct-rounded-* classes would resolve by stylesheet order.
|
|
100
|
+
rounded: {
|
|
101
|
+
md: "nct-rounded-md",
|
|
102
|
+
full: "nct-rounded-full"
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
105
|
defaultVariants: {
|
|
106
106
|
variant: "default",
|
|
107
|
-
size: "default"
|
|
107
|
+
size: "default",
|
|
108
|
+
rounded: "md"
|
|
108
109
|
}
|
|
109
110
|
});
|
|
110
|
-
const Button = /*#__PURE__*/ React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref)=>{
|
|
111
|
+
const Button = /*#__PURE__*/ React.forwardRef(({ className, variant, size, rounded, asChild = false, ...props }, ref)=>{
|
|
111
112
|
const Comp = asChild ? Slot : "button";
|
|
112
113
|
return /*#__PURE__*/ jsx(Comp, {
|
|
113
114
|
className: cn(buttonVariants({
|
|
114
115
|
variant,
|
|
115
116
|
size,
|
|
117
|
+
rounded,
|
|
116
118
|
className
|
|
117
119
|
})),
|
|
118
120
|
ref: ref,
|
|
@@ -192,4 +194,4 @@ const CacheEntry = (props)=>{
|
|
|
192
194
|
});
|
|
193
195
|
};
|
|
194
196
|
|
|
195
|
-
export { Button as B, CacheEntry as C,
|
|
197
|
+
export { Button as B, CacheEntry as C, Table as T, TableBody as a, TableCell as b, TableHead as c, TableHeader as d, TableRow as e };
|
package/dist/es/{cache-panel-head-client-DTReOdNO.mjs → cache-panel-head-client-BHhEgqib.mjs}
RENAMED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import { c as
|
|
3
|
+
import { c as TableHead, B as Button } from './cache-entry-client-CGkblhiP.mjs';
|
|
4
|
+
import { e as cn } from './dialog-client-vEz3dSiD.mjs';
|
|
4
5
|
import * as React from 'react';
|
|
5
6
|
import { useState, useCallback, useMemo } from 'react';
|
|
6
7
|
import { ArrowDownAZIcon, ArrowUpAZIcon, FilterIcon } from 'lucide-react';
|
|
7
|
-
import { u as useCachePanelContext } from './cache-panel-context-client-
|
|
8
|
+
import { u as useCachePanelContext } from './cache-panel-context-client-BFBQmUKF.mjs';
|
|
8
9
|
|
|
9
10
|
const Input = /*#__PURE__*/ React.forwardRef(({ className, type, ...props }, ref)=>{
|
|
10
11
|
return /*#__PURE__*/ jsx("input", {
|
package/dist/es/{cache-panel-table-client-B844eHwF.mjs → cache-panel-table-client-DTElYF1A.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { a as TableBody,
|
|
4
|
-
import { u as useCachePanelContext } from './cache-panel-context-client-
|
|
3
|
+
import { a as TableBody, e as TableRow, b as TableCell, C as CacheEntry } from './cache-entry-client-CGkblhiP.mjs';
|
|
4
|
+
import { u as useCachePanelContext } from './cache-panel-context-client-BFBQmUKF.mjs';
|
|
5
5
|
|
|
6
6
|
const CachePanelTable = ()=>{
|
|
7
7
|
const { entries } = useCachePanelContext();
|
package/dist/es/{cache-panel-trigger-client-CbXiKLEx.mjs → cache-panel-trigger-client-Jfg-NRyf.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { B as Button } from './cache-entry-client-
|
|
4
|
-
import { u as useCachePanelContext } from './cache-panel-context-client-
|
|
3
|
+
import { B as Button } from './cache-entry-client-CGkblhiP.mjs';
|
|
4
|
+
import { u as useCachePanelContext } from './cache-panel-context-client-BFBQmUKF.mjs';
|
|
5
5
|
|
|
6
6
|
function CachePanelTrigger(props) {
|
|
7
7
|
const { toggleOpen } = useCachePanelContext();
|
package/dist/es/{cache-panel-wrapper-client-Dcmlm3kc.mjs → cache-panel-wrapper-client-CQ26A5sb.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
4
|
-
import { u as useCachePanelContext } from './cache-panel-context-client-
|
|
3
|
+
import { T as Table } from './cache-entry-client-CGkblhiP.mjs';
|
|
4
|
+
import { u as useCachePanelContext } from './cache-panel-context-client-BFBQmUKF.mjs';
|
|
5
5
|
|
|
6
6
|
const CacheTable = (props)=>{
|
|
7
7
|
const { isOpen } = useCachePanelContext();
|
package/dist/es/{cache-purge-button-client-CN9H6t8R.mjs → cache-purge-button-client-BYGQCYwP.mjs}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { p as purgeCache } from './
|
|
4
|
-
import { B as Button } from './cache-entry-client-
|
|
3
|
+
import { p as purgeCache } from './cache-actions-server-BkcOoHXU.mjs';
|
|
4
|
+
import { B as Button } from './cache-entry-client-CGkblhiP.mjs';
|
|
5
5
|
import { BombIcon } from 'lucide-react';
|
|
6
|
-
import { u as useCachePanelContext } from './cache-panel-context-client-
|
|
6
|
+
import { u as useCachePanelContext } from './cache-panel-context-client-BFBQmUKF.mjs';
|
|
7
7
|
|
|
8
|
-
function CachePurgeButton() {
|
|
8
|
+
function CachePurgeButton({ distDir }) {
|
|
9
9
|
const { setEntries } = useCachePanelContext();
|
|
10
10
|
const purgeCache$1 = ()=>{
|
|
11
|
-
purgeCache().then(()=>{
|
|
11
|
+
purgeCache(distDir).then(()=>{
|
|
12
12
|
setEntries([]);
|
|
13
13
|
});
|
|
14
14
|
};
|
package/dist/es/{cache-refresh-data-client-CX8rfbFV.mjs → cache-refresh-data-client-wu8fHpd4.mjs}
RENAMED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { g as getCacheFiles } from './
|
|
4
|
-
import { B as Button
|
|
3
|
+
import { g as getCacheFiles } from './cache-actions-server-BkcOoHXU.mjs';
|
|
4
|
+
import { B as Button } from './cache-entry-client-CGkblhiP.mjs';
|
|
5
|
+
import { e as cn } from './dialog-client-vEz3dSiD.mjs';
|
|
5
6
|
import { Loader2 } from 'lucide-react';
|
|
6
7
|
import { usePathname } from 'next/navigation';
|
|
7
8
|
import { useTransition, useEffect } from 'react';
|
|
8
|
-
import { u as useCachePanelContext } from './cache-panel-context-client-
|
|
9
|
+
import { u as useCachePanelContext } from './cache-panel-context-client-BFBQmUKF.mjs';
|
|
9
10
|
|
|
10
11
|
function RefreshDataButton({ enabled, interval, distDir }) {
|
|
11
12
|
const { setEntries } = useCachePanelContext();
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
4
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
5
5
|
import { X } from 'lucide-react';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
|
|
8
|
+
function cn(...inputs) {
|
|
9
|
+
return clsx(inputs);
|
|
10
|
+
}
|
|
11
|
+
|
|
8
12
|
const Dialog = DialogPrimitive.Root;
|
|
9
13
|
const DialogTrigger = DialogPrimitive.Trigger;
|
|
10
14
|
const DialogPortal = DialogPrimitive.Portal;
|
|
@@ -54,4 +58,4 @@ const DialogDescription = /*#__PURE__*/ React.forwardRef(({ className, ...props
|
|
|
54
58
|
}));
|
|
55
59
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
56
60
|
|
|
57
|
-
export { Dialog as D,
|
|
61
|
+
export { Dialog as D, DialogContent as a, DialogDescription as b, DialogTitle as c, DialogTrigger as d, cn as e };
|
package/dist/es/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { Layers3Icon, PanelBottomCloseIcon } from 'lucide-react';
|
|
3
|
-
import { g as getCacheFiles } from './
|
|
4
|
-
import {
|
|
5
|
-
import { C as CachePanelContextProvider } from './cache-panel-context-client-
|
|
6
|
-
import { C as CachePanelTable } from './cache-panel-table-client-
|
|
7
|
-
import { C as CachePanelTrigger } from './cache-panel-trigger-client-
|
|
8
|
-
import { C as CacheTable } from './cache-panel-wrapper-client-
|
|
9
|
-
import { C as CachePurgeButton } from './cache-purge-button-client-
|
|
10
|
-
import { R as RefreshDataButton } from './cache-refresh-data-client-
|
|
11
|
-
import { C as CachePanelHead } from './cache-panel-head-client-
|
|
3
|
+
import { g as getCacheFiles } from './cache-actions-server-BkcOoHXU.mjs';
|
|
4
|
+
import { d as TableHeader, e as TableRow, c as TableHead } from './cache-entry-client-CGkblhiP.mjs';
|
|
5
|
+
import { C as CachePanelContextProvider } from './cache-panel-context-client-BFBQmUKF.mjs';
|
|
6
|
+
import { C as CachePanelTable } from './cache-panel-table-client-DTElYF1A.mjs';
|
|
7
|
+
import { C as CachePanelTrigger } from './cache-panel-trigger-client-Jfg-NRyf.mjs';
|
|
8
|
+
import { C as CacheTable } from './cache-panel-wrapper-client-CQ26A5sb.mjs';
|
|
9
|
+
import { C as CachePurgeButton } from './cache-purge-button-client-BYGQCYwP.mjs';
|
|
10
|
+
import { R as RefreshDataButton } from './cache-refresh-data-client-wu8fHpd4.mjs';
|
|
11
|
+
import { C as CachePanelHead } from './cache-panel-head-client-BHhEgqib.mjs';
|
|
12
12
|
|
|
13
13
|
async function NextCacheToolbar({ autoRefresh = false, interval = 10000, purgeButton = false, distDir = ".next" }) {
|
|
14
14
|
const files = await getCacheFiles(distDir);
|
|
@@ -19,7 +19,8 @@ async function NextCacheToolbar({ autoRefresh = false, interval = 10000, purgeBu
|
|
|
19
19
|
entries: files ?? [],
|
|
20
20
|
children: [
|
|
21
21
|
/*#__PURE__*/ jsx(CachePanelTrigger, {
|
|
22
|
-
|
|
22
|
+
rounded: "full",
|
|
23
|
+
className: "nct-fixed nct-bottom-4 nct-right-4 nct-bg-gradient-to-r nct-from-fuchsia-500 nct-to-cyan-500",
|
|
23
24
|
children: /*#__PURE__*/ jsx(Layers3Icon, {})
|
|
24
25
|
}),
|
|
25
26
|
/*#__PURE__*/ jsxs(CacheTable, {
|
|
@@ -57,7 +58,9 @@ async function NextCacheToolbar({ autoRefresh = false, interval = 10000, purgeBu
|
|
|
57
58
|
interval: interval,
|
|
58
59
|
distDir: distDir
|
|
59
60
|
}),
|
|
60
|
-
purgeButton && /*#__PURE__*/ jsx(CachePurgeButton, {
|
|
61
|
+
purgeButton && /*#__PURE__*/ jsx(CachePurgeButton, {
|
|
62
|
+
distDir: distDir
|
|
63
|
+
}),
|
|
61
64
|
/*#__PURE__*/ jsx(CachePanelTrigger, {
|
|
62
65
|
children: /*#__PURE__*/ jsx(PanelBottomCloseIcon, {})
|
|
63
66
|
})
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
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:transparent}.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:transparent;outline:none;border:none;cursor:pointer;color:inherit}.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}*,: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:rgba(59,130,246,.5);--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: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--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:rgba(59,130,246,.5);--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: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }#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}}.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-hidden{display:none}.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-h-\[480px\]{height:480px}.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\.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:transparent}.nct-bg-background{background-color:hsl(var(--background))}.nct-bg-black\/80{background-color:rgba(0,0,0,.8)}.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:rgba(217,70,239,0) 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\.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\.5{padding-top:.125rem;padding-bottom:.125rem}.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 rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--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 rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--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}.file\:nct-border-0::file-selector-button{border-width:0}.file\:nct-bg-transparent::file-selector-button{background-color:transparent}.file\:nct-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:nct-font-medium::file-selector-button{font-weight:500}.placeholder\:nct-text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:nct-text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.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 transparent;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 transparent;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-cursor-not-allowed:disabled{cursor:not-allowed}.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}
|
|
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:transparent}.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:transparent;outline:none;border:none;cursor:pointer;color:inherit}.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}.json-view_vitesse{color:#393a34;--json-property:#998418;--json-index:#2f798a;--json-number:#2f798a;--json-string:#b56959;--json-boolean:#1e754f;--json-null:#ab5959}*,: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:rgba(59,130,246,.5);--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: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--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:rgba(59,130,246,.5);--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: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }#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}}.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-hidden{display:none}.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-h-\[480px\]{height:480px}.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\.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:transparent}.nct-bg-background{background-color:hsl(var(--background))}.nct-bg-black\/80{background-color:rgba(0,0,0,.8)}.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:rgba(217,70,239,0) 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\.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\.5{padding-top:.125rem;padding-bottom:.125rem}.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 rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--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 rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--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}.file\:nct-border-0::file-selector-button{border-width:0}.file\:nct-bg-transparent::file-selector-button{background-color:transparent}.file\:nct-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:nct-font-medium::file-selector-button{font-weight:500}.placeholder\:nct-text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:nct-text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.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 transparent;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 transparent;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-cursor-not-allowed:disabled{cursor:not-allowed}.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.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Toolbar with all cached data in Next.js app router",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prepublish": "npm run build",
|
|
@@ -19,46 +19,48 @@
|
|
|
19
19
|
"url": "https://github.com/KajSzy/next-cache-toolbar"
|
|
20
20
|
},
|
|
21
21
|
"engines": {
|
|
22
|
-
"node": "
|
|
22
|
+
"node": "20",
|
|
23
23
|
"pnpm": ">=9"
|
|
24
24
|
},
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
28
|
-
"@radix-ui/react-slot": "^1.
|
|
29
|
-
"@radix-ui/react-tooltip": "^1.
|
|
30
|
-
"class-variance-authority": "^0.7.
|
|
31
|
-
"clsx": "^2.1.
|
|
27
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
28
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
29
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
30
|
+
"class-variance-authority": "^0.7.1",
|
|
31
|
+
"clsx": "^2.1.1",
|
|
32
32
|
"lucide-react": "^0.454.0",
|
|
33
|
-
"
|
|
34
|
-
"react": "^18 || ^19",
|
|
35
|
-
"react-dom": "^18 || ^19",
|
|
36
|
-
"react18-json-view": "^0.2.7",
|
|
37
|
-
"tailwind-merge": "^2.2.1",
|
|
33
|
+
"react18-json-view": "^0.2.10",
|
|
38
34
|
"tailwindcss-animate": "^1.0.7",
|
|
39
|
-
"zod": "^3.
|
|
35
|
+
"zod": "^3.25.76"
|
|
40
36
|
},
|
|
41
37
|
"devDependencies": {
|
|
42
38
|
"@biomejs/biome": "^1.9.4",
|
|
43
|
-
"@types/node": "^20.
|
|
44
|
-
"@types/react": "^19.
|
|
45
|
-
"@types/react-dom": "^19.
|
|
46
|
-
"autoprefixer": "^10.
|
|
39
|
+
"@types/node": "^20.19.41",
|
|
40
|
+
"@types/react": "^19.2.15",
|
|
41
|
+
"@types/react-dom": "^19.2.3",
|
|
42
|
+
"autoprefixer": "^10.5.0",
|
|
47
43
|
"bunchee": "6.2.0",
|
|
48
|
-
"concurrently": "^9.1
|
|
44
|
+
"concurrently": "^9.2.1",
|
|
45
|
+
"next": "^16.2.6",
|
|
49
46
|
"npm-run-all": "^4.1.5",
|
|
50
|
-
"postcss": "^8.
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
47
|
+
"postcss": "^8.5.15",
|
|
48
|
+
"react": "^19.2.6",
|
|
49
|
+
"react-dom": "^19.2.6",
|
|
50
|
+
"rimraf": "^6.1.3",
|
|
51
|
+
"tailwind-merge": "^2.6.1",
|
|
52
|
+
"tailwindcss": "^3.4.19",
|
|
53
|
+
"turbo": "^2.9.14",
|
|
54
|
+
"typescript": "^5.9.3"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"next": "^14.1 || ^15",
|
|
57
|
+
"next": "^14.1 || ^15 || ^16",
|
|
58
58
|
"react": "^18 || ^19",
|
|
59
59
|
"react-dom": "^18 || ^19"
|
|
60
60
|
},
|
|
61
|
-
"files": [
|
|
61
|
+
"files": [
|
|
62
|
+
"dist"
|
|
63
|
+
],
|
|
62
64
|
"main": "./dist/cjs/index.js",
|
|
63
65
|
"module": "./dist/es/index.mjs",
|
|
64
66
|
"types": "./dist/cjs/index.d.ts",
|
package/readme.md
CHANGED
|
@@ -25,7 +25,9 @@ export default function Toolbar() {
|
|
|
25
25
|
|
|
26
26
|
```jsx
|
|
27
27
|
// app/layout.jsx
|
|
28
|
-
|
|
28
|
+
import dynamic from "next/dynamic";
|
|
29
|
+
|
|
30
|
+
let Toolbar = () => null;
|
|
29
31
|
|
|
30
32
|
if (process.env.NODE_ENV === "development") {
|
|
31
33
|
Toolbar = dynamic(() => import("./toolbar"));
|
|
@@ -44,6 +46,10 @@ export default function Layout({ children }) {
|
|
|
44
46
|
}
|
|
45
47
|
```
|
|
46
48
|
|
|
49
|
+
Keep the check on `process.env.NODE_ENV`. Next.js replaces it with a constant during `next build`, so the `import("./toolbar")` branch is removed from production builds together with the toolbar's code, styles and server actions.
|
|
50
|
+
|
|
51
|
+
Do not gate the toolbar on your own environment variable alone (e.g. `process.env.NEXT_PUBLIC_SHOW_TOOLBAR === "true"`). If that variable is not set while running `next build`, the check stays a runtime lookup, and the toolbar is bundled into production even though it never renders.
|
|
52
|
+
|
|
47
53
|
## How does `data cache` work?
|
|
48
54
|
|
|
49
55
|
There are two cases when `data cache` is used:
|