zudoku 0.32.5 → 0.33.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/cli.js +3 -0
- package/dist/app/main.js +1 -1
- package/dist/app/main.js.map +1 -1
- package/dist/cli/build/handler.d.ts +1 -3
- package/dist/cli/build/handler.js +7 -0
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/cli/cli.js +5 -0
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/cmds/build.d.ts +11 -3
- package/dist/cli/cmds/build.js +20 -13
- package/dist/cli/cmds/build.js.map +1 -1
- package/dist/cli/cmds/preview.d.ts +16 -0
- package/dist/cli/cmds/preview.js +25 -0
- package/dist/cli/cmds/preview.js.map +1 -0
- package/dist/cli/preview/handler.d.ts +3 -0
- package/dist/cli/preview/handler.js +37 -0
- package/dist/cli/preview/handler.js.map +1 -0
- package/dist/config/common.d.ts +5 -2
- package/dist/config/config.d.ts +2 -7
- package/dist/config/loader.d.ts +4 -4
- package/dist/config/loader.js +7 -4
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/validate.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.d.ts +2 -2
- package/dist/lib/authentication/providers/auth0.js +1 -0
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +4 -3
- package/dist/lib/authentication/providers/openid.js +4 -2
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/ThemeSwitch.js +1 -1
- package/dist/lib/components/ThemeSwitch.js.map +1 -1
- package/dist/lib/components/Zudoku.d.ts +1 -1
- package/dist/lib/components/Zudoku.js +7 -6
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/context/RouterEventsEmitter.d.ts +1 -0
- package/dist/lib/components/context/RouterEventsEmitter.js +17 -0
- package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -0
- package/dist/lib/core/RouteGuard.js +12 -5
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +10 -0
- package/dist/lib/core/ZudokuContext.js +17 -1
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +8 -2
- package/dist/lib/core/plugins.js +1 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/hooks/index.d.ts +3 -0
- package/dist/lib/hooks/index.js +5 -0
- package/dist/lib/hooks/index.js.map +1 -0
- package/dist/lib/hooks/useEvent.d.ts +11 -0
- package/dist/lib/hooks/useEvent.js +19 -0
- package/dist/lib/hooks/useEvent.js.map +1 -0
- package/dist/lib/hooks/useEvent.test.d.ts +1 -0
- package/dist/lib/hooks/useEvent.test.js +100 -0
- package/dist/lib/hooks/useEvent.test.js.map +1 -0
- package/dist/lib/ui/Stepper.d.ts +4 -0
- package/dist/lib/ui/Stepper.js +7 -0
- package/dist/lib/ui/Stepper.js.map +1 -0
- package/dist/lib/util/MdxComponents.d.ts +3 -1
- package/dist/lib/util/MdxComponents.js +3 -0
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/vite/config.d.ts +2 -5
- package/dist/vite/config.js +21 -33
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +1 -1
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/css/plugin.d.ts +2 -2
- package/dist/vite/css/plugin.js.map +1 -1
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/plugin-api-keys.d.ts +2 -2
- package/dist/vite/plugin-api-keys.js +3 -3
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.d.ts +2 -2
- package/dist/vite/plugin-api.js +5 -5
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.d.ts +2 -2
- package/dist/vite/plugin-auth.js +3 -3
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +2 -2
- package/dist/vite/plugin-component.js +3 -2
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.d.ts +4 -3
- package/dist/vite/plugin-config-reload.js +11 -6
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.d.ts +2 -2
- package/dist/vite/plugin-config.js +2 -2
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-custom-pages.d.ts +2 -2
- package/dist/vite/plugin-custom-pages.js +3 -3
- package/dist/vite/plugin-custom-pages.js.map +1 -1
- package/dist/vite/plugin-docs.d.ts +2 -2
- package/dist/vite/plugin-docs.js +5 -5
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.d.ts +2 -2
- package/dist/vite/plugin-frontmatter.js +5 -4
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.d.ts +2 -2
- package/dist/vite/plugin-mdx.js +1 -1
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-redirect.d.ts +2 -2
- package/dist/vite/plugin-redirect.js +3 -3
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin-search.d.ts +2 -2
- package/dist/vite/plugin-search.js +1 -1
- package/dist/vite/plugin-search.js.map +1 -1
- package/dist/vite/plugin-sidebar.d.ts +2 -2
- package/dist/vite/plugin-sidebar.js +2 -2
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/plugin-theme-css.d.ts +2 -2
- package/dist/vite/plugin-theme-css.js.map +1 -1
- package/dist/vite/plugin.d.ts +2 -2
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender/FileWritingResponse.d.ts +2 -1
- package/dist/vite/prerender/FileWritingResponse.js +4 -1
- package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
- package/dist/vite/prerender/worker.d.ts +1 -1
- package/dist/vite/prerender/worker.js +3 -0
- package/dist/vite/prerender/worker.js.map +1 -1
- package/lib/{AuthenticationPlugin-BlxA4Mbn.js → AuthenticationPlugin-_gUMnGxb.js} +2 -2
- package/lib/{AuthenticationPlugin-BlxA4Mbn.js.map → AuthenticationPlugin-_gUMnGxb.js.map} +1 -1
- package/lib/{Markdown-Cr9sYpR_.js → Markdown-DePfm7oQ.js} +1384 -1381
- package/lib/{Markdown-Cr9sYpR_.js.map → Markdown-DePfm7oQ.js.map} +1 -1
- package/lib/{MdxPage-Dt-UEQl8.js → MdxPage-DM9mE-G-.js} +4 -4
- package/lib/{MdxPage-Dt-UEQl8.js.map → MdxPage-DM9mE-G-.js.map} +1 -1
- package/lib/{OasProvider-WVtvHP5H.js → OasProvider-Bvu4dDpX.js} +3 -3
- package/lib/{OasProvider-WVtvHP5H.js.map → OasProvider-Bvu4dDpX.js.map} +1 -1
- package/lib/{OperationList-DhOwupvv.js → OperationList-DWnNbwVg.js} +241 -240
- package/lib/OperationList-DWnNbwVg.js.map +1 -0
- package/lib/{Select-D9hI1G-y.js → Select-BmoX1iTH.js} +36 -36
- package/lib/{Select-D9hI1G-y.js.map → Select-BmoX1iTH.js.map} +1 -1
- package/lib/{SlotletProvider-CEfNOA8i.js → SlotletProvider-DdtIOUi6.js} +2 -2
- package/lib/{SlotletProvider-CEfNOA8i.js.map → SlotletProvider-DdtIOUi6.js.map} +1 -1
- package/lib/{createServer-DMf6O2Rz.js → createServer-DmusVVsi.js} +987 -967
- package/lib/createServer-DmusVVsi.js.map +1 -0
- package/lib/{hook-CWwSAAlH.js → hook-4_6pQSo4.js} +29 -29
- package/lib/{hook-CWwSAAlH.js.map → hook-4_6pQSo4.js.map} +1 -1
- package/lib/{index-Do_30Hpk.js → index-DVBlM15k.js} +83 -82
- package/lib/{index-Do_30Hpk.js.map → index-DVBlM15k.js.map} +1 -1
- package/lib/index-DwT-v3zK.js +86 -0
- package/lib/index-DwT-v3zK.js.map +1 -0
- package/lib/{mutation-B0wxqzSN.js → mutation-DTunCQKB.js} +2 -2
- package/lib/{mutation-B0wxqzSN.js.map → mutation-DTunCQKB.js.map} +1 -1
- package/lib/objectEntries-yMIkr2mI.js +5 -0
- package/lib/objectEntries-yMIkr2mI.js.map +1 -0
- package/lib/ui/Stepper.js +6 -0
- package/lib/ui/Stepper.js.map +1 -0
- package/lib/ui/SyntaxHighlight.js +2902 -7
- package/lib/ui/SyntaxHighlight.js.map +1 -1
- package/lib/{useScrollToAnchor-C-sRxs9o.js → useScrollToAnchor-BW8y_cwU.js} +3 -3
- package/lib/{useScrollToAnchor-C-sRxs9o.js.map → useScrollToAnchor-BW8y_cwU.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +15 -14
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +126 -124
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +497 -456
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.css +1 -0
- package/lib/zudoku.hooks.js +19 -0
- package/lib/zudoku.hooks.js.map +1 -0
- package/lib/zudoku.plugin-api-catalog.js +2 -2
- package/lib/zudoku.plugin-api-keys.js +5 -5
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +2 -2
- package/lib/zudoku.plugins.js +9 -8
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +12 -4
- package/src/app/main.tsx +1 -1
- package/src/lib/authentication/providers/auth0.tsx +3 -2
- package/src/lib/authentication/providers/openid.tsx +8 -5
- package/src/lib/components/ThemeSwitch.tsx +1 -1
- package/src/lib/components/Zudoku.tsx +9 -5
- package/src/lib/components/context/RouterEventsEmitter.tsx +19 -0
- package/src/lib/core/RouteGuard.tsx +13 -5
- package/src/lib/core/ZudokuContext.ts +31 -0
- package/src/lib/core/plugins.ts +16 -2
- package/src/lib/hooks/index.ts +5 -0
- package/src/lib/hooks/useEvent.test.tsx +149 -0
- package/src/lib/hooks/useEvent.ts +41 -0
- package/src/lib/ui/Stepper.css +43 -0
- package/src/lib/ui/Stepper.tsx +8 -0
- package/src/lib/util/MdxComponents.tsx +4 -1
- package/lib/OperationList-DhOwupvv.js.map +0 -1
- package/lib/SyntaxHighlight-CcnUjERD.js +0 -2986
- package/lib/SyntaxHighlight-CcnUjERD.js.map +0 -1
- package/lib/createServer-DMf6O2Rz.js.map +0 -1
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
2
|
+
import { act, renderHook, waitFor } from "@testing-library/react";
|
|
3
|
+
import { type PropsWithChildren } from "react";
|
|
4
|
+
import { type Location } from "react-router";
|
|
5
|
+
import { assertType, describe, expect, it, vi } from "vitest";
|
|
6
|
+
import { ZudokuProvider } from "../components/context/ZudokuProvider.js";
|
|
7
|
+
import { ZudokuContext, type ZudokuEvents } from "../core/ZudokuContext.js";
|
|
8
|
+
import { useEvent } from "./useEvent.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @vitest-environment happy-dom
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const createTestContext = () => {
|
|
15
|
+
const context = new ZudokuContext({});
|
|
16
|
+
const queryClient = new QueryClient();
|
|
17
|
+
const wrapper = ({ children }: PropsWithChildren) => (
|
|
18
|
+
<QueryClientProvider client={queryClient}>
|
|
19
|
+
<ZudokuProvider context={context}>{children}</ZudokuProvider>
|
|
20
|
+
</QueryClientProvider>
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
return { context, wrapper };
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const locationData = {
|
|
27
|
+
pathname: "/test",
|
|
28
|
+
hash: "",
|
|
29
|
+
search: "",
|
|
30
|
+
key: "",
|
|
31
|
+
state: {},
|
|
32
|
+
} satisfies Location;
|
|
33
|
+
|
|
34
|
+
describe("useEvent", () => {
|
|
35
|
+
it("returns latest event data without callback", async () => {
|
|
36
|
+
const { context, wrapper } = createTestContext();
|
|
37
|
+
const { result } = renderHook(() => useEvent("location"), { wrapper });
|
|
38
|
+
|
|
39
|
+
await act(() => Promise.resolve());
|
|
40
|
+
await act(async () => {
|
|
41
|
+
context.emitEvent("location", { to: locationData });
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
expect(result.current).toEqual([{ to: locationData }]);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it("transforms event data with callback", async () => {
|
|
48
|
+
const { context, wrapper } = createTestContext();
|
|
49
|
+
const { result } = renderHook(
|
|
50
|
+
() => useEvent("location", ({ to }) => to.pathname),
|
|
51
|
+
{ wrapper },
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
await act(() => Promise.resolve());
|
|
55
|
+
await act(async () => {
|
|
56
|
+
context.emitEvent("location", { to: locationData });
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
await waitFor(() => expect(result.current).toEqual("/test"));
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it("handles side effects without return value", async () => {
|
|
63
|
+
const { context, wrapper } = createTestContext();
|
|
64
|
+
const sideEffect = vi.fn();
|
|
65
|
+
|
|
66
|
+
const { result } = renderHook(
|
|
67
|
+
() =>
|
|
68
|
+
useEvent("location", (event) => {
|
|
69
|
+
sideEffect(event);
|
|
70
|
+
}),
|
|
71
|
+
{ wrapper },
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
await act(() => Promise.resolve());
|
|
75
|
+
await act(async () => {
|
|
76
|
+
context.emitEvent("location", { to: locationData });
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
expect(result.current).toBeUndefined();
|
|
80
|
+
expect(sideEffect).toHaveBeenCalledWith({ to: locationData });
|
|
81
|
+
expect(sideEffect).toHaveBeenCalledTimes(1);
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
it("removes event listener on cleanup", async () => {
|
|
85
|
+
const { context, wrapper } = createTestContext();
|
|
86
|
+
const sideEffect = vi.fn();
|
|
87
|
+
|
|
88
|
+
const { unmount } = renderHook(
|
|
89
|
+
() =>
|
|
90
|
+
useEvent("location", (event) => {
|
|
91
|
+
sideEffect(event);
|
|
92
|
+
}),
|
|
93
|
+
{ wrapper },
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
await act(() => Promise.resolve());
|
|
97
|
+
|
|
98
|
+
// First event emission
|
|
99
|
+
await act(async () => {
|
|
100
|
+
context.emitEvent("location", { to: locationData });
|
|
101
|
+
});
|
|
102
|
+
expect(sideEffect).toHaveBeenCalledTimes(1);
|
|
103
|
+
|
|
104
|
+
// Unmount the hook
|
|
105
|
+
unmount();
|
|
106
|
+
|
|
107
|
+
// Second event emission after unmount
|
|
108
|
+
await act(async () => {
|
|
109
|
+
context.emitEvent("location", { to: locationData });
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// The callback should not have been called again
|
|
113
|
+
expect(sideEffect).toHaveBeenCalledTimes(1);
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
describe("types", () => {
|
|
117
|
+
const { wrapper } = createTestContext();
|
|
118
|
+
|
|
119
|
+
it("infers event type when no callback is provided", () => {
|
|
120
|
+
const hook = renderHook(() => useEvent("location"), { wrapper });
|
|
121
|
+
assertType<Parameters<ZudokuEvents["location"]> | undefined>(
|
|
122
|
+
hook.result.current,
|
|
123
|
+
);
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
it("infers string type from pathname callback", () => {
|
|
127
|
+
const hook = renderHook(
|
|
128
|
+
() => useEvent("location", ({ to }) => to.pathname),
|
|
129
|
+
{ wrapper },
|
|
130
|
+
);
|
|
131
|
+
assertType<string>(hook.result.current);
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
it("infers object type from object callback", () => {
|
|
135
|
+
const hook = renderHook(
|
|
136
|
+
() => useEvent("location", ({ to }) => ({ query: to.search })),
|
|
137
|
+
{ wrapper },
|
|
138
|
+
);
|
|
139
|
+
assertType<{ query: string }>(hook.result.current);
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
it("infers void type from empty callback", () => {
|
|
143
|
+
const hook = renderHook(() => useEvent("location", () => {}), {
|
|
144
|
+
wrapper,
|
|
145
|
+
});
|
|
146
|
+
assertType<void>(hook.result.current);
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { useZudoku } from "../components/context/ZudokuContext.js";
|
|
3
|
+
import type { ZudokuEvents } from "../core/ZudokuContext.js";
|
|
4
|
+
|
|
5
|
+
type EventParameters<Event extends keyof ZudokuEvents> = Parameters<
|
|
6
|
+
ZudokuEvents[Event]
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Hook to subscribe to Zudoku events with automatic cleanup
|
|
11
|
+
* @param event The event to subscribe to
|
|
12
|
+
* @param callback Optional callback to be called when the event is emitted
|
|
13
|
+
* @returns The latest event data if no callback is provided, or the callback's return value if it returns something
|
|
14
|
+
*/
|
|
15
|
+
export function useEvent<E extends keyof ZudokuEvents>(
|
|
16
|
+
event: E,
|
|
17
|
+
): EventParameters<E>;
|
|
18
|
+
export function useEvent<E extends keyof ZudokuEvents, R>(
|
|
19
|
+
event: E,
|
|
20
|
+
callback: (...args: EventParameters<E>) => R,
|
|
21
|
+
): R;
|
|
22
|
+
export function useEvent<E extends keyof ZudokuEvents, R>(
|
|
23
|
+
event: E,
|
|
24
|
+
callback?: (...args: EventParameters<E>) => R,
|
|
25
|
+
) {
|
|
26
|
+
const zudoku = useZudoku();
|
|
27
|
+
const [latestData, setLatestData] = useState<R | EventParameters<E>>();
|
|
28
|
+
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
return zudoku.addEventListener(event, ((...args: EventParameters<E>) => {
|
|
31
|
+
if (callback) {
|
|
32
|
+
const result = callback(...args);
|
|
33
|
+
setLatestData(result);
|
|
34
|
+
} else {
|
|
35
|
+
setLatestData(args);
|
|
36
|
+
}
|
|
37
|
+
}) as ZudokuEvents[E]);
|
|
38
|
+
}, [zudoku, event, callback]);
|
|
39
|
+
|
|
40
|
+
return latestData;
|
|
41
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@tailwind components;
|
|
2
|
+
|
|
3
|
+
@layer components {
|
|
4
|
+
.stepper {
|
|
5
|
+
/* @apply mb-6; */
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.stepper > ol {
|
|
9
|
+
--bullet-size: 1.75rem;
|
|
10
|
+
--line-spacing: 0.25rem;
|
|
11
|
+
@apply flex flex-col list-none p-0 m-0;
|
|
12
|
+
counter-reset: step-counter;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.stepper > ol > li {
|
|
16
|
+
@apply relative ps-12 pb-6 my-0;
|
|
17
|
+
counter-increment: step-counter;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.stepper > ol > li:last-child {
|
|
21
|
+
@apply pb-0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* Bullet with number */
|
|
25
|
+
.stepper > ol > li::before {
|
|
26
|
+
@apply absolute left-0 flex items-center justify-center size-[--bullet-size];
|
|
27
|
+
@apply bg-muted/80 border border-border text-muted-foreground text-[calc(var(--bullet-size)/2)] font-semibold rounded-full;
|
|
28
|
+
content: counter(step-counter);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Vertical line */
|
|
32
|
+
.stepper > ol > li::after {
|
|
33
|
+
@apply absolute content-[''] w-[2px] bg-border -translate-x-1/2;
|
|
34
|
+
left: calc(var(--bullet-size) / 2);
|
|
35
|
+
top: calc(var(--bullet-size) + var(--line-spacing));
|
|
36
|
+
height: calc(100% - var(--bullet-size) - (2 * var(--line-spacing)));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.stepper > ol > li > :first-child {
|
|
40
|
+
@apply mt-0 pt-0;
|
|
41
|
+
transform: translateY(calc((var(--bullet-size) - 1lh) / 2));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { MDXComponents } from "mdx/types.js";
|
|
1
|
+
import { type MDXComponents } from "mdx/types.js";
|
|
2
2
|
import { Link } from "react-router";
|
|
3
3
|
import { Heading } from "../components/Heading.js";
|
|
4
4
|
import { InlineCode } from "../components/InlineCode.js";
|
|
5
5
|
import { Callout } from "../ui/Callout.js";
|
|
6
|
+
import { Stepper } from "../ui/Stepper.js";
|
|
6
7
|
import { SyntaxHighlight } from "../ui/SyntaxHighlight.js";
|
|
7
8
|
|
|
8
9
|
export type MdxComponentsType = Readonly<MDXComponents> | null | undefined;
|
|
@@ -51,6 +52,8 @@ export const MdxComponents = {
|
|
|
51
52
|
<a href={href} target="_blank" {...props} rel="noreferrer" />
|
|
52
53
|
),
|
|
53
54
|
Callout,
|
|
55
|
+
Stepper,
|
|
56
|
+
SyntaxHighlight,
|
|
54
57
|
tip: (props) => <Callout type="tip" {...props} />,
|
|
55
58
|
info: (props) => <Callout type="info" {...props} />,
|
|
56
59
|
note: (props) => <Callout type="note" {...props} />,
|