@nextsparkjs/core 0.1.0-beta.181 → 0.1.0-beta.183
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/components/api/keys/CreateApiKeyDialog.d.ts.map +1 -1
- package/dist/components/api/keys/CreateApiKeyDialog.js +20 -4
- package/dist/components/devtools/api-explorer/ApiEndpointsSidebar.d.ts.map +1 -1
- package/dist/components/devtools/api-explorer/ApiEndpointsSidebar.js +4 -1
- package/dist/components/devtools/api-explorer/ApiExplorer.d.ts.map +1 -1
- package/dist/components/devtools/api-explorer/ApiExplorer.js +92 -48
- package/dist/components/devtools/api-explorer/ApiRequestPanel.d.ts.map +1 -1
- package/dist/components/devtools/api-explorer/ApiRequestPanel.js +36 -6
- package/dist/components/devtools/api-explorer/JsonViewer.d.ts.map +1 -1
- package/dist/components/devtools/api-explorer/JsonViewer.js +13 -8
- package/dist/components/devtools/api-explorer/PanelDivider.d.ts +26 -0
- package/dist/components/devtools/api-explorer/PanelDivider.d.ts.map +1 -0
- package/dist/components/devtools/api-explorer/PanelDivider.js +102 -0
- package/dist/components/devtools/api-explorer/PresetsTab.d.ts.map +1 -1
- package/dist/components/devtools/api-explorer/PresetsTab.js +35 -2
- package/dist/components/devtools/api-explorer/preset-placeholders.d.ts +52 -0
- package/dist/components/devtools/api-explorer/preset-placeholders.d.ts.map +1 -0
- package/dist/components/devtools/api-explorer/preset-placeholders.js +62 -0
- package/dist/lib/api/keys.d.ts +15 -0
- package/dist/lib/api/keys.d.ts.map +1 -1
- package/dist/lib/api/keys.js +15 -1
- package/dist/lib/config/app.config.d.ts.map +1 -1
- package/dist/lib/config/app.config.js +7 -0
- package/dist/lib/config/config-types.d.ts +12 -0
- package/dist/lib/config/config-types.d.ts.map +1 -1
- package/dist/lib/selectors/core-selectors.d.ts +3 -0
- package/dist/lib/selectors/core-selectors.d.ts.map +1 -1
- package/dist/lib/selectors/domains/devtools.selectors.d.ts +3 -0
- package/dist/lib/selectors/domains/devtools.selectors.d.ts.map +1 -1
- package/dist/lib/selectors/domains/devtools.selectors.js +5 -2
- package/dist/lib/selectors/selectors.d.ts +6 -0
- package/dist/lib/selectors/selectors.d.ts.map +1 -1
- package/dist/styles/classes.json +10 -5
- package/dist/styles/ui.css +1 -1
- package/dist/templates/app/devtools/api/layout.tsx +11 -32
- package/dist/templates/app/devtools/layout.tsx +3 -1
- package/dist/types/api-presets.d.ts +19 -1
- package/dist/types/api-presets.d.ts.map +1 -1
- package/package.json +2 -2
- package/templates/app/devtools/api/layout.tsx +11 -32
- package/templates/app/devtools/layout.tsx +3 -1
|
@@ -1,44 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* API Explorer Layout
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* and centering (mx-auto).
|
|
4
|
+
* The Explorer is a tool, not a document: it wants the whole content area, while every other
|
|
5
|
+
* DevTools page sits inside the parent layout's centered, padded, max-width container.
|
|
7
6
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* It escapes that container by filling the scroll area it lives in — `absolute inset-0` against
|
|
8
|
+
* the `relative <main>` of the parent layout. What it must NOT do is compute its own size from
|
|
9
|
+
* the viewport: the previous `calc(100vw - 16rem)` assumed the DevTools sidebar is always
|
|
10
|
+
* 16rem, so collapsing that sidebar to a rail left the Explorer 192px narrower than the space
|
|
11
|
+
* it had, and the centering split the difference into dead margins on both sides — the layout
|
|
12
|
+
* got worse exactly when someone made room for it.
|
|
10
13
|
*
|
|
11
|
-
*
|
|
12
|
-
* -
|
|
13
|
-
* - Main content: flex-1 (fills remaining space)
|
|
14
|
-
* - Container: mx-auto p-6 max-w-7xl (centered, padded, max 1280px)
|
|
15
|
-
* - This layout: breaks out to fill full main content area
|
|
14
|
+
* Filling the parent has no such assumption: the sidebar's width, the container's padding and
|
|
15
|
+
* its max-width all stop being this file's business.
|
|
16
16
|
*/
|
|
17
17
|
export default function ApiExplorerLayout({
|
|
18
18
|
children,
|
|
19
19
|
}: {
|
|
20
20
|
children: React.ReactNode
|
|
21
21
|
}) {
|
|
22
|
-
|
|
23
|
-
// margin-left: -50vw + 50% + sidebar/2 adjustment positions at the left edge
|
|
24
|
-
// width: calc(100vw - sidebar) fills to the right edge
|
|
25
|
-
return (
|
|
26
|
-
<div
|
|
27
|
-
className="h-[calc(100vh-4rem)]"
|
|
28
|
-
style={{
|
|
29
|
-
// Position at the left edge of the main content area (right after sidebar)
|
|
30
|
-
position: 'relative',
|
|
31
|
-
left: '50%',
|
|
32
|
-
transform: 'translateX(-50%)',
|
|
33
|
-
width: 'calc(100vw - 16rem)', // 100vw minus DevTools sidebar (w-64 = 16rem)
|
|
34
|
-
maxWidth: 'none',
|
|
35
|
-
marginLeft: 0,
|
|
36
|
-
marginRight: 0,
|
|
37
|
-
marginTop: '-1.5rem', // Negate top padding
|
|
38
|
-
marginBottom: '-1.5rem', // Negate bottom padding
|
|
39
|
-
}}
|
|
40
|
-
>
|
|
41
|
-
{children}
|
|
42
|
-
</div>
|
|
43
|
-
)
|
|
22
|
+
return <div className="absolute inset-0">{children}</div>
|
|
44
23
|
}
|
|
@@ -45,7 +45,9 @@ function DevLayout({ children }: DevLayoutProps) {
|
|
|
45
45
|
<DevtoolsMobileHeader />
|
|
46
46
|
|
|
47
47
|
{/* Content area with scrolling */}
|
|
48
|
-
|
|
48
|
+
{/* `relative` so a full-bleed child route (the API Explorer) can fill this area
|
|
49
|
+
without measuring the sidebar itself. */}
|
|
50
|
+
<main className="relative flex-1 overflow-y-auto overflow-x-hidden">
|
|
49
51
|
<div className="container mx-auto p-6 max-w-7xl">
|
|
50
52
|
{children}
|
|
51
53
|
</div>
|
|
@@ -47,7 +47,25 @@ export interface ApiPreset {
|
|
|
47
47
|
queryParams?: Record<string, string | number | boolean>;
|
|
48
48
|
/** Custom headers */
|
|
49
49
|
headers?: Record<string, string>;
|
|
50
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Request body (for POST/PATCH/PUT).
|
|
52
|
+
*
|
|
53
|
+
* String values here — and in `params`, `headers`, `pathParams` and `sessionConfig` — may carry
|
|
54
|
+
* placeholders, resolved when the preset is applied (see `preset-placeholders.ts`):
|
|
55
|
+
*
|
|
56
|
+
* - `{{UNIQUE}}` fresh on every apply — the default for anything that creates. Press play,
|
|
57
|
+
* get values nobody has used; press play again, get another set. Two people
|
|
58
|
+
* testing at once never collide either. A preset can still prove an idempotent
|
|
59
|
+
* replay with it: apply once, then send twice.
|
|
60
|
+
* - `{{RUN}}` stable until someone starts a new run, and shared by every preset of the
|
|
61
|
+
* endpoint. For the rarer case where two DIFFERENT presets have to meet on
|
|
62
|
+
* the same value.
|
|
63
|
+
* - `{{TIMESTAMP}}` / `{{UUID}}` the raw forms, when the shape of the value matters.
|
|
64
|
+
* - `{{FIRST_TEAM_ID}}` the browser's first/active team.
|
|
65
|
+
*
|
|
66
|
+
* An unrecognised token is left as written rather than blanked, so a preset naming something
|
|
67
|
+
* this version does not provide says so in the editor instead of sending an empty string.
|
|
68
|
+
*/
|
|
51
69
|
payload?: Record<string, unknown>;
|
|
52
70
|
/** Session/auth configuration */
|
|
53
71
|
sessionConfig?: PresetSessionConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-presets.d.ts","sourceRoot":"","sources":["../../src/types/api-presets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAA;AAEnF;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,8CAA8C;IAC9C,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,yBAAyB;IACzB,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,oCAAoC;IACpC,EAAE,EAAE,MAAM,CAAA;IACV,oB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;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAA;IACb,0BAA0B;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,oEAAoE;IACpE,MAAM,CAAC,EAAE,eAAe,CAAA;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IACjC,eAAe;IACf,IAAI,EAAE;QACJ,SAAS,EAAE,MAAM,CAAA;QACjB,WAAW,EAAE,MAAM,CAAA;QACnB,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,IAAI,CAAC,kBAAkB,EAAE,YAAY,CAAC,GAC7C,IAAI,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAExC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextsparkjs/core",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.183",
|
|
4
4
|
"description": "NextSpark - The complete SaaS framework for Next.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "NextSpark <hello@nextspark.dev>",
|
|
@@ -470,7 +470,7 @@
|
|
|
470
470
|
"tailwind-merge": "^3.3.1",
|
|
471
471
|
"uuid": "^13.0.0",
|
|
472
472
|
"zod": "^4.1.5",
|
|
473
|
-
"@nextsparkjs/testing": "0.1.0-beta.
|
|
473
|
+
"@nextsparkjs/testing": "0.1.0-beta.183"
|
|
474
474
|
},
|
|
475
475
|
"scripts": {
|
|
476
476
|
"postinstall": "node scripts/postinstall.mjs || true",
|
|
@@ -1,44 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* API Explorer Layout
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* and centering (mx-auto).
|
|
4
|
+
* The Explorer is a tool, not a document: it wants the whole content area, while every other
|
|
5
|
+
* DevTools page sits inside the parent layout's centered, padded, max-width container.
|
|
7
6
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* It escapes that container by filling the scroll area it lives in — `absolute inset-0` against
|
|
8
|
+
* the `relative <main>` of the parent layout. What it must NOT do is compute its own size from
|
|
9
|
+
* the viewport: the previous `calc(100vw - 16rem)` assumed the DevTools sidebar is always
|
|
10
|
+
* 16rem, so collapsing that sidebar to a rail left the Explorer 192px narrower than the space
|
|
11
|
+
* it had, and the centering split the difference into dead margins on both sides — the layout
|
|
12
|
+
* got worse exactly when someone made room for it.
|
|
10
13
|
*
|
|
11
|
-
*
|
|
12
|
-
* -
|
|
13
|
-
* - Main content: flex-1 (fills remaining space)
|
|
14
|
-
* - Container: mx-auto p-6 max-w-7xl (centered, padded, max 1280px)
|
|
15
|
-
* - This layout: breaks out to fill full main content area
|
|
14
|
+
* Filling the parent has no such assumption: the sidebar's width, the container's padding and
|
|
15
|
+
* its max-width all stop being this file's business.
|
|
16
16
|
*/
|
|
17
17
|
export default function ApiExplorerLayout({
|
|
18
18
|
children,
|
|
19
19
|
}: {
|
|
20
20
|
children: React.ReactNode
|
|
21
21
|
}) {
|
|
22
|
-
|
|
23
|
-
// margin-left: -50vw + 50% + sidebar/2 adjustment positions at the left edge
|
|
24
|
-
// width: calc(100vw - sidebar) fills to the right edge
|
|
25
|
-
return (
|
|
26
|
-
<div
|
|
27
|
-
className="h-[calc(100vh-4rem)]"
|
|
28
|
-
style={{
|
|
29
|
-
// Position at the left edge of the main content area (right after sidebar)
|
|
30
|
-
position: 'relative',
|
|
31
|
-
left: '50%',
|
|
32
|
-
transform: 'translateX(-50%)',
|
|
33
|
-
width: 'calc(100vw - 16rem)', // 100vw minus DevTools sidebar (w-64 = 16rem)
|
|
34
|
-
maxWidth: 'none',
|
|
35
|
-
marginLeft: 0,
|
|
36
|
-
marginRight: 0,
|
|
37
|
-
marginTop: '-1.5rem', // Negate top padding
|
|
38
|
-
marginBottom: '-1.5rem', // Negate bottom padding
|
|
39
|
-
}}
|
|
40
|
-
>
|
|
41
|
-
{children}
|
|
42
|
-
</div>
|
|
43
|
-
)
|
|
22
|
+
return <div className="absolute inset-0">{children}</div>
|
|
44
23
|
}
|
|
@@ -45,7 +45,9 @@ function DevLayout({ children }: DevLayoutProps) {
|
|
|
45
45
|
<DevtoolsMobileHeader />
|
|
46
46
|
|
|
47
47
|
{/* Content area with scrolling */}
|
|
48
|
-
|
|
48
|
+
{/* `relative` so a full-bleed child route (the API Explorer) can fill this area
|
|
49
|
+
without measuring the sidebar itself. */}
|
|
50
|
+
<main className="relative flex-1 overflow-y-auto overflow-x-hidden">
|
|
49
51
|
<div className="container mx-auto p-6 max-w-7xl">
|
|
50
52
|
{children}
|
|
51
53
|
</div>
|