zudoku 0.24.0 → 0.25.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/lib/authentication/providers/openid.js +2 -1
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/Header.js +13 -13
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Layout.js +1 -1
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/TopNavigation.js +2 -2
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js +2 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
- package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/ui/Card.js +1 -1
- package/dist/lib/ui/Card.js.map +1 -1
- package/lib/{OperationList-CqLL5P5l.js → OperationList-c6V_vcgz.js} +787 -802
- package/lib/OperationList-c6V_vcgz.js.map +1 -0
- package/lib/{index-DzRORsY1.js → index-DkwDHnit.js} +4 -3
- package/lib/index-DkwDHnit.js.map +1 -0
- package/lib/ui/Card.js +7 -7
- package/lib/ui/Card.js.map +1 -1
- package/lib/zudoku.auth-openid.js +176 -175
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +140 -140
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/package.json +1 -1
- package/src/app/main.css +50 -37
- package/src/lib/authentication/providers/openid.tsx +6 -1
- package/src/lib/components/Header.tsx +9 -5
- package/src/lib/components/Layout.tsx +1 -1
- package/src/lib/components/TopNavigation.tsx +2 -2
- package/src/lib/components/navigation/SidebarWrapper.tsx +2 -2
- package/src/lib/plugins/openapi/CollapsibleCode.tsx +10 -7
- package/src/lib/plugins/openapi/Endpoint.tsx +1 -3
- package/src/lib/plugins/openapi/Sidecar.tsx +2 -2
- package/src/lib/plugins/openapi/SidecarBox.tsx +4 -16
- package/src/lib/plugins/openapi/playground/Headers.tsx +1 -0
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
- package/src/lib/ui/Card.tsx +1 -1
- package/lib/OperationList-CqLL5P5l.js.map +0 -1
- package/lib/index-DzRORsY1.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./jsx-runtime-Dx-03ztt.js";
|
|
2
2
|
import "./chunk-D52XG6IA-Dl7HLe6j.js";
|
|
3
|
-
import { o as a } from "./index-
|
|
3
|
+
import { o as a } from "./index-DkwDHnit.js";
|
|
4
4
|
import "./ZudokuContext-hmLMUdf2.js";
|
|
5
5
|
import "lucide-react";
|
|
6
6
|
import "./hook-CHq7pFyz.js";
|
package/package.json
CHANGED
package/src/app/main.css
CHANGED
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
var(--top-header-height) + var(--top-nav-height) + var(--banner-height)
|
|
86
86
|
);
|
|
87
87
|
--scroll-padding: calc(var(--header-height) + 10px);
|
|
88
|
-
--side-nav-width: theme("spacing.
|
|
89
|
-
--padding-content-top: theme("spacing.
|
|
88
|
+
--side-nav-width: theme("spacing.80");
|
|
89
|
+
--padding-content-top: theme("spacing.6");
|
|
90
90
|
--padding-content-bottom: theme("spacing.12");
|
|
91
91
|
--padding-nav-item: theme("spacing[2.5]");
|
|
92
92
|
--sidecar-grid-cols: 1fr minmax(200px, 260px);
|
|
@@ -238,48 +238,61 @@
|
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
/* Theme */
|
|
241
|
+
|
|
242
|
+
@layer base {
|
|
241
243
|
:root {
|
|
242
244
|
--background: 0 0% 100%;
|
|
243
|
-
--foreground:
|
|
245
|
+
--foreground: 240 10% 3.9%;
|
|
244
246
|
--card: 0 0% 100%;
|
|
245
|
-
--card-foreground:
|
|
247
|
+
--card-foreground: 240 10% 3.9%;
|
|
246
248
|
--popover: 0 0% 100%;
|
|
247
|
-
--popover-foreground:
|
|
248
|
-
--primary:
|
|
249
|
-
--primary-foreground:
|
|
250
|
-
--secondary:
|
|
251
|
-
--secondary-foreground:
|
|
252
|
-
--muted:
|
|
253
|
-
--muted-foreground:
|
|
254
|
-
--accent:
|
|
255
|
-
--accent-foreground:
|
|
256
|
-
--destructive: 0
|
|
257
|
-
--destructive-foreground:
|
|
258
|
-
--border:
|
|
259
|
-
--input:
|
|
260
|
-
--ring:
|
|
261
|
-
--radius: 0.
|
|
249
|
+
--popover-foreground: 240 10% 3.9%;
|
|
250
|
+
--primary: 240 5.9% 10%;
|
|
251
|
+
--primary-foreground: 0 0% 98%;
|
|
252
|
+
--secondary: 240 4.8% 95.9%;
|
|
253
|
+
--secondary-foreground: 240 5.9% 10%;
|
|
254
|
+
--muted: 240 4.8% 95.9%;
|
|
255
|
+
--muted-foreground: 240 3.8% 46.1%;
|
|
256
|
+
--accent: 240 4.8% 95.9%;
|
|
257
|
+
--accent-foreground: 240 5.9% 10%;
|
|
258
|
+
--destructive: 0 84.2% 60.2%;
|
|
259
|
+
--destructive-foreground: 0 0% 98%;
|
|
260
|
+
--border: 240 5.9% 95%;
|
|
261
|
+
--input: 240 5.9% 90%;
|
|
262
|
+
--ring: 240 5.9% 10%;
|
|
263
|
+
--radius: 0.75rem;
|
|
264
|
+
--chart-1: 12 76% 61%;
|
|
265
|
+
--chart-2: 173 58% 39%;
|
|
266
|
+
--chart-3: 197 37% 24%;
|
|
267
|
+
--chart-4: 43 74% 66%;
|
|
268
|
+
--chart-5: 27 87% 67%;
|
|
262
269
|
}
|
|
263
270
|
|
|
264
271
|
.dark {
|
|
265
|
-
--background:
|
|
266
|
-
--foreground:
|
|
267
|
-
--card:
|
|
268
|
-
--card-foreground:
|
|
269
|
-
--popover:
|
|
270
|
-
--popover-foreground:
|
|
271
|
-
--primary:
|
|
272
|
-
--primary-foreground:
|
|
273
|
-
--secondary:
|
|
274
|
-
--secondary-foreground:
|
|
275
|
-
--muted:
|
|
276
|
-
--muted-foreground:
|
|
277
|
-
--accent:
|
|
278
|
-
--accent-foreground:
|
|
272
|
+
--background: 240 10% 3.9%;
|
|
273
|
+
--foreground: 0 0% 98%;
|
|
274
|
+
--card: 240 10% 3.9%;
|
|
275
|
+
--card-foreground: 0 0% 98%;
|
|
276
|
+
--popover: 240 10% 3.9%;
|
|
277
|
+
--popover-foreground: 0 0% 98%;
|
|
278
|
+
--primary: 0 0% 98%;
|
|
279
|
+
--primary-foreground: 240 5.9% 10%;
|
|
280
|
+
--secondary: 240 3.7% 15.9%;
|
|
281
|
+
--secondary-foreground: 0 0% 98%;
|
|
282
|
+
--muted: 240 3.7% 15.9%;
|
|
283
|
+
--muted-foreground: 240 5% 64.9%;
|
|
284
|
+
--accent: 240 3.7% 15.9%;
|
|
285
|
+
--accent-foreground: 0 0% 98%;
|
|
279
286
|
--destructive: 0 62.8% 30.6%;
|
|
280
|
-
--destructive-foreground:
|
|
281
|
-
--border:
|
|
282
|
-
--input:
|
|
283
|
-
--ring:
|
|
287
|
+
--destructive-foreground: 0 0% 98%;
|
|
288
|
+
--border: 240 3.7% 15.9%;
|
|
289
|
+
--input: 240 3.7% 15.9%;
|
|
290
|
+
--ring: 240 4.9% 83.9%;
|
|
291
|
+
--chart-1: 220 70% 50%;
|
|
292
|
+
--chart-2: 160 60% 45%;
|
|
293
|
+
--chart-3: 30 80% 55%;
|
|
294
|
+
--chart-4: 280 65% 60%;
|
|
295
|
+
--chart-5: 340 75% 55%;
|
|
296
|
+
}
|
|
284
297
|
}
|
|
285
298
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import logger from "loglevel";
|
|
2
2
|
import * as oauth from "oauth4webapi";
|
|
3
3
|
import { OpenIDAuthenticationConfig } from "../../../config/config.js";
|
|
4
|
+
import { ClientOnly } from "../../components/ClientOnly.js";
|
|
4
5
|
import {
|
|
5
6
|
AuthenticationProvider,
|
|
6
7
|
AuthenticationProviderInitializer,
|
|
@@ -32,7 +33,11 @@ class OpenIdAuthPlugin extends AuthenticationPlugin {
|
|
|
32
33
|
...super.getRoutes(),
|
|
33
34
|
{
|
|
34
35
|
path: this.callbackUrlPath,
|
|
35
|
-
element:
|
|
36
|
+
element: (
|
|
37
|
+
<ClientOnly>
|
|
38
|
+
<CallbackHandler handleCallback={this.handleCallback} />
|
|
39
|
+
</ClientOnly>
|
|
40
|
+
),
|
|
36
41
|
},
|
|
37
42
|
];
|
|
38
43
|
}
|
|
@@ -65,8 +65,8 @@ export const Header = memo(function HeaderInner() {
|
|
|
65
65
|
return (
|
|
66
66
|
<header className="sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full">
|
|
67
67
|
<Banner />
|
|
68
|
-
<div className="
|
|
69
|
-
<div className="grid grid-cols-[1fr_auto] lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center
|
|
68
|
+
<div className="border-b">
|
|
69
|
+
<div className="max-w-screen-2xl border-l border-r mx-auto grid grid-cols-[1fr_auto] lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center px-4 lg:px-12 h-[--top-header-height]">
|
|
70
70
|
<div className="flex">
|
|
71
71
|
<Link to="/">
|
|
72
72
|
<div className="flex items-center gap-3.5">
|
|
@@ -176,9 +176,13 @@ export const Header = memo(function HeaderInner() {
|
|
|
176
176
|
</div>
|
|
177
177
|
</div>
|
|
178
178
|
</div>
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
<
|
|
179
|
+
</div>
|
|
180
|
+
<div className="border-b">
|
|
181
|
+
<div className="max-w-screen-2xl mx-auto border-l border-r">
|
|
182
|
+
<Slotlet name="top-navigation-before" />
|
|
183
|
+
<TopNavigation />
|
|
184
|
+
<Slotlet name="top-navigation-after" />
|
|
185
|
+
</div>
|
|
182
186
|
</div>
|
|
183
187
|
</header>
|
|
184
188
|
);
|
|
@@ -66,7 +66,7 @@ export const Layout = ({ children }: { children?: ReactNode }) => {
|
|
|
66
66
|
<Header />
|
|
67
67
|
<Slotlet name="layout-after-head" />
|
|
68
68
|
|
|
69
|
-
<div className="w-full max-w-screen-2xl mx-auto px-4 lg:px-12">
|
|
69
|
+
<div className="w-full max-w-screen-2xl mx-auto px-4 lg:px-12 border-l border-r">
|
|
70
70
|
{showSpinner ? (
|
|
71
71
|
<LoadingFallback />
|
|
72
72
|
) : (
|
|
@@ -30,7 +30,7 @@ export const TopNavigation = () => {
|
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
32
|
<Suspense>
|
|
33
|
-
<nav className="hidden lg:block
|
|
33
|
+
<nav className="hidden lg:block text-sm px-12 h-[--top-nav-height]">
|
|
34
34
|
<ul className="flex flex-row items-center gap-8">
|
|
35
35
|
{topNavigation.filter(isHiddenItem(isAuthenticated)).map((item) => (
|
|
36
36
|
<li key={item.id}>
|
|
@@ -78,7 +78,7 @@ export const TopNavItem = ({
|
|
|
78
78
|
<NavLink
|
|
79
79
|
className={({ isPending }) =>
|
|
80
80
|
cx(
|
|
81
|
-
"block lg:py-3.5 font-medium -mb-px
|
|
81
|
+
"block lg:py-3.5 font-medium -mb-px",
|
|
82
82
|
isActive || isPending
|
|
83
83
|
? "border-primary text-foreground"
|
|
84
84
|
: "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25",
|
|
@@ -12,8 +12,8 @@ export const SidebarWrapper = forwardRef<
|
|
|
12
12
|
// maybe this could be simplified by adjusting the layout
|
|
13
13
|
data-navigation={String(pushMainContent)}
|
|
14
14
|
className={cn(
|
|
15
|
-
"scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0",
|
|
16
|
-
"-mx-[--padding-nav-item] pb-20
|
|
15
|
+
"scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0 border-r pr-10",
|
|
16
|
+
"-mx-[--padding-nav-item] pb-20 pt-[--padding-content-top]",
|
|
17
17
|
"w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
|
|
18
18
|
className,
|
|
19
19
|
)}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FoldVerticalIcon, UnfoldVerticalIcon } from "lucide-react";
|
|
1
2
|
import { type CSSProperties, type ReactNode, useRef, useState } from "react";
|
|
2
3
|
import { Button } from "zudoku/ui/Button.js";
|
|
3
4
|
import {
|
|
@@ -43,22 +44,23 @@ export const CollapsibleCode = ({
|
|
|
43
44
|
<CollapsibleContent
|
|
44
45
|
forceMount
|
|
45
46
|
className={cn(
|
|
46
|
-
"relative overflow-hidden",
|
|
47
|
+
"relative overflow-hidden group",
|
|
47
48
|
!open && isOverflowing && "max-h-[--max-height]",
|
|
48
49
|
)}
|
|
49
50
|
>
|
|
50
51
|
{!open && isOverflowing && (
|
|
51
|
-
<div className="absolute inset-0 bg-gradient-to-b from-transparent to-zinc-50/90 dark:to-zinc-800/90 z-10"></div>
|
|
52
|
+
<div className=" absolute inset-0 bg-gradient-to-b from-transparent to-zinc-50/90 dark:to-zinc-800/90 z-10 group-hover:to-transparent"></div>
|
|
52
53
|
)}
|
|
53
54
|
<div ref={contentRef}>{children}</div>
|
|
54
55
|
{!open && isOverflowing && (
|
|
55
56
|
<CollapsibleTrigger
|
|
56
|
-
className="absolute inset-0 grid place-items-center z-10"
|
|
57
|
+
className="absolute inset-0 grid place-items-center z-10 cursor-pointer peer"
|
|
57
58
|
asChild
|
|
58
59
|
>
|
|
59
60
|
<div>
|
|
60
|
-
<Button className="
|
|
61
|
-
|
|
61
|
+
<Button variant="outline" className="hidden group-hover:flex">
|
|
62
|
+
<UnfoldVerticalIcon size={14} className="mr-1.5" />
|
|
63
|
+
Click to expand
|
|
62
64
|
</Button>
|
|
63
65
|
</div>
|
|
64
66
|
</CollapsibleTrigger>
|
|
@@ -69,8 +71,9 @@ export const CollapsibleCode = ({
|
|
|
69
71
|
className={cn("flex justify-center w-full mb-2", !open && "hidden")}
|
|
70
72
|
>
|
|
71
73
|
<CollapsibleTrigger asChild>
|
|
72
|
-
<Button
|
|
73
|
-
Collapse
|
|
74
|
+
<Button variant="outline" size="sm">
|
|
75
|
+
Collapse
|
|
76
|
+
<FoldVerticalIcon size={14} className="ml-1.5" />
|
|
74
77
|
</Button>
|
|
75
78
|
</CollapsibleTrigger>
|
|
76
79
|
</div>
|
|
@@ -66,9 +66,7 @@ export const Endpoint = () => {
|
|
|
66
66
|
|
|
67
67
|
return (
|
|
68
68
|
<div className="flex flex-wrap items-center gap-2">
|
|
69
|
-
<span className="font-medium text-sm">
|
|
70
|
-
{servers.length > 1 ? "Endpoints" : "Endpoint"}:
|
|
71
|
-
</span>
|
|
69
|
+
<span className="font-medium text-sm">Endpoint</span>
|
|
72
70
|
|
|
73
71
|
<SimpleSelect
|
|
74
72
|
className="font-mono text-xs bg-border/50 dark:bg-border/70 py-1.5 max-w-[450px] truncate"
|
|
@@ -181,7 +181,7 @@ export const Sidecar = ({
|
|
|
181
181
|
className="flex flex-col overflow-hidden sticky top-[--scroll-padding] gap-4"
|
|
182
182
|
>
|
|
183
183
|
<SidecarBox.Root>
|
|
184
|
-
<SidecarBox.Head className="flex justify-between items-center flex-nowrap py-
|
|
184
|
+
<SidecarBox.Head className="flex justify-between items-center flex-nowrap py-4 gap-2 text-xs">
|
|
185
185
|
<span className="font-mono break-words">
|
|
186
186
|
<span className={cn("font-semibold", methodTextColor)}>
|
|
187
187
|
{operation.method.toLocaleUpperCase()}
|
|
@@ -211,7 +211,7 @@ export const Sidecar = ({
|
|
|
211
211
|
/>
|
|
212
212
|
</CollapsibleCode>
|
|
213
213
|
</SidecarBox.Body>
|
|
214
|
-
<SidecarBox.Footer className="flex items-center text-xs gap-2 justify-end py-
|
|
214
|
+
<SidecarBox.Footer className="flex items-center text-xs gap-2 justify-end py-3">
|
|
215
215
|
<span>Show example in</span>
|
|
216
216
|
<SimpleSelect
|
|
217
217
|
className="self-start max-w-[150px]"
|
|
@@ -7,10 +7,7 @@ type BaseComponentProps<T = unknown> = PropsWithChildren<
|
|
|
7
7
|
|
|
8
8
|
export const Root = ({ children, className }: BaseComponentProps) => (
|
|
9
9
|
<div
|
|
10
|
-
className={cn(
|
|
11
|
-
"rounded-lg overflow-hidden border dark:border-transparent",
|
|
12
|
-
className,
|
|
13
|
-
)}
|
|
10
|
+
className={cn("rounded-xl overflow-hidden border border-border", className)}
|
|
14
11
|
>
|
|
15
12
|
{children}
|
|
16
13
|
</div>
|
|
@@ -19,7 +16,7 @@ export const Root = ({ children, className }: BaseComponentProps) => (
|
|
|
19
16
|
export const Head = ({ children, className }: BaseComponentProps) => (
|
|
20
17
|
<div
|
|
21
18
|
className={cn(
|
|
22
|
-
"border-b
|
|
19
|
+
"border-b bg-muted dark:bg-transparent text-card-foreground p-3",
|
|
23
20
|
className,
|
|
24
21
|
)}
|
|
25
22
|
>
|
|
@@ -28,20 +25,11 @@ export const Head = ({ children, className }: BaseComponentProps) => (
|
|
|
28
25
|
);
|
|
29
26
|
|
|
30
27
|
export const Body = ({ children, className }: BaseComponentProps) => (
|
|
31
|
-
<div
|
|
32
|
-
className={cn("bg-zinc-50 dark:bg-zinc-800 overflow-auto p-2", className)}
|
|
33
|
-
>
|
|
34
|
-
{children}
|
|
35
|
-
</div>
|
|
28
|
+
<div className={cn("bg-card overflow-auto p-2", className)}>{children}</div>
|
|
36
29
|
);
|
|
37
30
|
|
|
38
31
|
export const Footer = ({ children, className }: BaseComponentProps) => (
|
|
39
|
-
<div
|
|
40
|
-
className={cn(
|
|
41
|
-
"border-t dark:border-zinc-600 bg-zinc-100 dark:bg-zinc-700 p-2",
|
|
42
|
-
className,
|
|
43
|
-
)}
|
|
44
|
-
>
|
|
32
|
+
<div className={cn("border-t bg-muted dark:bg-transparent p-3", className)}>
|
|
45
33
|
{children}
|
|
46
34
|
</div>
|
|
47
35
|
);
|
|
@@ -39,7 +39,7 @@ const PlaygroundDialog = (props: PlaygroundDialogProps) => {
|
|
|
39
39
|
<Dialog onOpenChange={(open) => setOpen(open)}>
|
|
40
40
|
<DialogTrigger asChild>
|
|
41
41
|
{props.children ?? (
|
|
42
|
-
<button className="flex gap-1 items-center px-2 py-1 rounded-md
|
|
42
|
+
<button className="flex gap-1 items-center px-2 py-1 rounded-md transition text-xs bg-primary text-primary-foreground shadow-sm hover:bg-primary/80">
|
|
43
43
|
Test
|
|
44
44
|
<HeroPlayIcon className="" size={14} />
|
|
45
45
|
</button>
|