zudoku 0.56.0 → 0.57.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/app/demo.js +1 -1
- package/dist/app/entry.client.js +1 -1
- package/dist/app/entry.server.js +1 -1
- package/dist/app/main.d.ts +1 -1
- package/dist/app/main.js +3 -2
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js +1 -1
- package/dist/config/validators/ProtectedRoutesSchema.d.ts +5 -4
- package/dist/config/validators/ProtectedRoutesSchema.js +4 -13
- package/dist/config/validators/ProtectedRoutesSchema.js.map +1 -1
- package/dist/config/validators/validate.d.ts +1 -13
- package/dist/lib/components/index.d.ts +0 -29
- package/dist/lib/components/index.js +0 -17
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +2 -1
- package/dist/lib/core/ZudokuContext.js +13 -3
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/__internal.d.ts +37 -0
- package/dist/lib/core/__internal.js +26 -0
- package/dist/lib/core/__internal.js.map +1 -0
- package/dist/lib/core/router.d.ts +1 -0
- package/dist/lib/core/router.js +2 -0
- package/dist/lib/core/router.js.map +1 -0
- package/lib/CategoryHeading-DCpZu3yG.js +17 -0
- package/lib/CategoryHeading-DCpZu3yG.js.map +1 -0
- package/lib/{Command-CfgGXMfJ.js → Command-CDn17s8X.js} +2 -2
- package/lib/{Command-CfgGXMfJ.js.map → Command-CDn17s8X.js.map} +1 -1
- package/lib/{Dialog-B7YnrNnG.js → Dialog-BrIjMmUK.js} +3 -3
- package/lib/{Dialog-B7YnrNnG.js.map → Dialog-BrIjMmUK.js.map} +1 -1
- package/lib/{MdxPage-D49lfheg.js → MdxPage-BmOQ5m5g.js} +16 -15
- package/lib/{MdxPage-D49lfheg.js.map → MdxPage-BmOQ5m5g.js.map} +1 -1
- package/lib/{OAuthErrorPage-COKL9zOi.js → OAuthErrorPage-Jv3r8wnL.js} +7 -7
- package/lib/{OAuthErrorPage-COKL9zOi.js.map → OAuthErrorPage-Jv3r8wnL.js.map} +1 -1
- package/lib/{OasProvider-CCv_-asV.js → OasProvider-CA_lpILt.js} +3 -3
- package/lib/{OasProvider-CCv_-asV.js.map → OasProvider-CA_lpILt.js.map} +1 -1
- package/lib/{OperationList-DkS0B0y1.js → OperationList-C-TObVw6.js} +17 -16
- package/lib/{OperationList-DkS0B0y1.js.map → OperationList-C-TObVw6.js.map} +1 -1
- package/lib/{Pagination-VfR2DCXf.js → Pagination-CBiRGddW.js} +3 -3
- package/lib/{Pagination-VfR2DCXf.js.map → Pagination-CBiRGddW.js.map} +1 -1
- package/lib/RouteGuard-JLH6tCY8.js +56 -0
- package/lib/RouteGuard-JLH6tCY8.js.map +1 -0
- package/lib/RouterError-DcVonMP1.js +41 -0
- package/lib/RouterError-DcVonMP1.js.map +1 -0
- package/lib/{SchemaList-B7ezc5Uy.js → SchemaList-BeYWvBC7.js} +15 -14
- package/lib/{SchemaList-B7ezc5Uy.js.map → SchemaList-BeYWvBC7.js.map} +1 -1
- package/lib/{SchemaView-BuL-ycaR.js → SchemaView-CRcShewo.js} +4 -4
- package/lib/{SchemaView-BuL-ycaR.js.map → SchemaView-CRcShewo.js.map} +1 -1
- package/lib/{Select-B9h5k2Pz.js → Select-C3efYI1n.js} +8 -8
- package/lib/{Select-B9h5k2Pz.js.map → Select-C3efYI1n.js.map} +1 -1
- package/lib/{SignUp-Cn_gZ7UN.js → SignUp-CxBGHgba.js} +11 -11
- package/lib/{SignUp-Cn_gZ7UN.js.map → SignUp-CxBGHgba.js.map} +1 -1
- package/lib/{Slot-BFCJzl5J.js → Slot-DOtTvoyj.js} +1678 -1912
- package/lib/{Slot-BFCJzl5J.js.map → Slot-DOtTvoyj.js.map} +1 -1
- package/lib/{SyntaxHighlight-CSW4eaIJ.js → SyntaxHighlight-GR0eix_L.js} +2 -2
- package/lib/{SyntaxHighlight-CSW4eaIJ.js.map → SyntaxHighlight-GR0eix_L.js.map} +1 -1
- package/lib/{Toc-B9K7a2FS.js → Toc-BlcGIkXc.js} +2 -2
- package/lib/{Toc-B9K7a2FS.js.map → Toc-BlcGIkXc.js.map} +1 -1
- package/lib/{ZudokuContext-mDDq1hft.js → ZudokuContext-BuJD7yIX.js} +28 -28
- package/lib/{ZudokuContext-mDDq1hft.js.map → ZudokuContext-BuJD7yIX.js.map} +1 -1
- package/lib/chunk-QMGIS6GS-DqecZ6nq.js +9204 -0
- package/lib/chunk-QMGIS6GS-DqecZ6nq.js.map +1 -0
- package/lib/{circular-BMUvC5RK.js → circular-CGTcsqA3.js} +2 -2
- package/lib/{circular-BMUvC5RK.js.map → circular-CGTcsqA3.js.map} +1 -1
- package/lib/{createServer-I8dX2VSu.js → createServer-DjgpuLne.js} +4 -4
- package/lib/{createServer-I8dX2VSu.js.map → createServer-DjgpuLne.js.map} +1 -1
- package/lib/{errors-D2Qdkul6.js → errors-CrI3s7mR.js} +2 -2
- package/lib/{errors-D2Qdkul6.js.map → errors-CrI3s7mR.js.map} +1 -1
- package/lib/{hook-CGx8MPrU.js → hook-bv3iuX7X.js} +2 -2
- package/lib/{hook-CGx8MPrU.js.map → hook-bv3iuX7X.js.map} +1 -1
- package/lib/{index-DZqSbZzE.js → index-CvTWnHZF.js} +17 -17
- package/lib/{index-DZqSbZzE.js.map → index-CvTWnHZF.js.map} +1 -1
- package/lib/index-DzO-Qh6S.js +1061 -0
- package/lib/index-DzO-Qh6S.js.map +1 -0
- package/lib/{index-ChOC1gfC.js → index-HarEI51d.js} +2 -2
- package/lib/{index-ChOC1gfC.js.map → index-HarEI51d.js.map} +1 -1
- package/lib/{RouteGuard-CSi9-hSR.js → index.esm-BnYHxCYC.js} +226 -281
- package/lib/index.esm-BnYHxCYC.js.map +1 -0
- package/lib/mutation-Dy_5up8v.js +196 -0
- package/lib/mutation-Dy_5up8v.js.map +1 -0
- package/lib/ui/Command.js +1 -1
- package/lib/ui/SyntaxHighlight.js +2 -2
- package/lib/{useExposedProps-DUoV7MCU.js → useExposedProps-BH9aq4MD.js} +32 -32
- package/lib/{useExposedProps-DUoV7MCU.js.map → useExposedProps-BH9aq4MD.js.map} +1 -1
- package/lib/useLatest-hmRS46UF.js +11 -0
- package/lib/useLatest-hmRS46UF.js.map +1 -0
- package/lib/zudoku.__internal.js +2965 -0
- package/lib/zudoku.__internal.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-azureb2c.js +5 -5
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +5 -5
- package/lib/zudoku.auth-supabase.js +2 -2
- package/lib/zudoku.components.js +20 -29
- package/lib/zudoku.hooks.js +4 -4
- package/lib/zudoku.plugin-api-catalog.js +18 -18
- package/lib/zudoku.plugin-api-keys.js +27 -26
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +4 -4
- package/lib/zudoku.plugin-redirect.js +3 -3
- package/lib/zudoku.plugin-search-pagefind.js +14 -14
- package/lib/zudoku.router.js +123 -0
- package/lib/zudoku.router.js.map +1 -0
- package/package.json +9 -1
- package/src/app/demo.tsx +1 -1
- package/src/app/entry.client.tsx +1 -1
- package/src/app/entry.server.tsx +1 -1
- package/src/app/main.tsx +4 -3
- package/src/app/standalone.tsx +1 -1
- package/src/lib/components/index.ts +0 -20
- package/src/lib/core/ZudokuContext.ts +22 -5
- package/src/lib/core/__internal.tsx +30 -0
- package/src/lib/core/router.ts +1 -0
- package/lib/RouteGuard-CSi9-hSR.js.map +0 -1
- package/lib/chunk-QMGIS6GS-CdEm9pzB.js +0 -1839
- package/lib/chunk-QMGIS6GS-CdEm9pzB.js.map +0 -1
- package/lib/index-Cc70HIQT.js +0 -4087
- package/lib/index-Cc70HIQT.js.map +0 -1
package/dist/app/demo.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import logger from "loglevel";
|
|
3
3
|
import { createRoot } from "react-dom/client";
|
|
4
4
|
import { createBrowserRouter } from "react-router";
|
|
5
|
-
import { Bootstrap } from "zudoku/
|
|
5
|
+
import { Bootstrap } from "zudoku/__internal";
|
|
6
6
|
import DemoAnnouncement from "../lib/demo/DemoAnnouncement.js";
|
|
7
7
|
import { openApiPlugin } from "../lib/plugins/openapi/index.js";
|
|
8
8
|
import "../lib/util/logInit.js";
|
package/dist/app/entry.client.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createRoot, hydrateRoot } from "react-dom/client";
|
|
|
3
3
|
import { createBrowserRouter, matchRoutes, } from "react-router";
|
|
4
4
|
import config from "virtual:zudoku-config";
|
|
5
5
|
import "vite/modulepreload-polyfill";
|
|
6
|
-
import { Bootstrap } from "zudoku/
|
|
6
|
+
import { Bootstrap } from "zudoku/__internal";
|
|
7
7
|
import { getRoutesByConfig } from "./main.js";
|
|
8
8
|
const routes = getRoutesByConfig(config);
|
|
9
9
|
const root = document.getElementById("root");
|
package/dist/app/entry.server.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Transform } from "node:stream";
|
|
|
5
5
|
import { renderToPipeableStream, renderToStaticMarkup } from "react-dom/server";
|
|
6
6
|
import { createStaticHandler, createStaticRouter, isRouteErrorResponse, } from "react-router";
|
|
7
7
|
import "vite/modulepreload-polyfill";
|
|
8
|
-
import { BootstrapStatic, ServerError } from "zudoku/
|
|
8
|
+
import { BootstrapStatic, ServerError } from "zudoku/__internal";
|
|
9
9
|
import { NO_DEHYDRATE } from "../lib/components/cache.js";
|
|
10
10
|
import { getRoutesByConfig } from "./main.js";
|
|
11
11
|
export { getRoutesByConfig };
|
package/dist/app/main.d.ts
CHANGED
package/dist/app/main.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Outlet } from "react-router";
|
|
3
2
|
import { configuredApiKeysPlugin } from "virtual:zudoku-api-keys-plugin";
|
|
4
3
|
import { configuredApiCatalogPlugins, configuredApiPlugins, } from "virtual:zudoku-api-plugins";
|
|
5
4
|
import { configuredAuthProvider } from "virtual:zudoku-auth";
|
|
@@ -10,7 +9,9 @@ import { configuredRedirectPlugin } from "virtual:zudoku-redirect-plugin";
|
|
|
10
9
|
import { configuredSearchPlugin } from "virtual:zudoku-search-plugin";
|
|
11
10
|
import { registerShiki } from "virtual:zudoku-shiki-register";
|
|
12
11
|
import "virtual:zudoku-theme.css";
|
|
13
|
-
import { BuildCheck, Layout, Meta, RouteGuard, RouterError, StatusPage,
|
|
12
|
+
import { BuildCheck, Layout, Meta, RouteGuard, RouterError, StatusPage, } from "zudoku/__internal";
|
|
13
|
+
import { Zudoku } from "zudoku/components";
|
|
14
|
+
import { Outlet } from "zudoku/router";
|
|
14
15
|
import { isNavigationPlugin } from "../lib/core/plugins.js";
|
|
15
16
|
import { highlighter } from "../lib/shiki.js";
|
|
16
17
|
import { ZuploEnv } from "./env.js";
|
package/dist/app/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/app/main.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/app/main.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,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AC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CACpD;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,KAAkB,EAAE,EAAE;IAC5C,OAAO;QACL,OAAO,EAAE,KAAC,MAAM,KAAG;QACnB,QAAQ,EAAE,CAAC,KAAK,CAAC;KAClB,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/app/standalone.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { createRoot } from "react-dom/client";
|
|
3
3
|
import { createBrowserRouter } from "react-router";
|
|
4
|
-
import { Bootstrap } from "zudoku/
|
|
4
|
+
import { Bootstrap } from "zudoku/__internal";
|
|
5
5
|
import { openApiPlugin } from "../lib/plugins/openapi/index.js";
|
|
6
6
|
import "../lib/util/logInit.js";
|
|
7
7
|
import "./main.css";
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
2
|
import type { UseAuthReturn } from "../../lib/authentication/hook.js";
|
|
3
3
|
import type { ZudokuContext } from "../../lib/core/ZudokuContext.js";
|
|
4
|
-
type CallbackContext = {
|
|
4
|
+
export type CallbackContext = {
|
|
5
5
|
auth: UseAuthReturn;
|
|
6
6
|
context: ZudokuContext;
|
|
7
7
|
};
|
|
8
8
|
type ProtectedRouteCallback = (c: CallbackContext) => boolean;
|
|
9
|
-
export type ProtectedRoutesInput = z.input<typeof
|
|
10
|
-
export type ProtectedRoutes = z.output<typeof
|
|
11
|
-
export declare const
|
|
9
|
+
export type ProtectedRoutesInput = z.input<typeof ProtectedRoutesInputSchema>;
|
|
10
|
+
export type ProtectedRoutes = z.output<typeof ProtectedRoutesInputSchema>;
|
|
11
|
+
export declare const ProtectedRoutesInputSchema: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodCustom<ProtectedRouteCallback, ProtectedRouteCallback>>]>>;
|
|
12
|
+
export declare const ProtectedRoutesSchema: z.ZodPipe<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodCustom<ProtectedRouteCallback, ProtectedRouteCallback>>]>>, z.ZodTransform<Record<string, (c: CallbackContext) => boolean> | undefined, string[] | Record<string, ProtectedRouteCallback> | undefined>>;
|
|
12
13
|
export {};
|
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
|
-
|
|
2
|
+
import { transformProtectedRoutes } from "../../lib/core/ZudokuContext.js";
|
|
3
|
+
export const ProtectedRoutesInputSchema = z
|
|
3
4
|
.union([
|
|
4
5
|
z.string().array(),
|
|
5
6
|
z.record(z.string(), z.custom((val) => typeof val === "function")),
|
|
6
7
|
])
|
|
7
|
-
.optional()
|
|
8
|
-
|
|
9
|
-
if (!val)
|
|
10
|
-
return undefined;
|
|
11
|
-
if (Array.isArray(val)) {
|
|
12
|
-
return Object.fromEntries(val.map((route) => [
|
|
13
|
-
route,
|
|
14
|
-
(c) => c.auth.isAuthenticated,
|
|
15
|
-
]));
|
|
16
|
-
}
|
|
17
|
-
return val;
|
|
18
|
-
});
|
|
8
|
+
.optional();
|
|
9
|
+
export const ProtectedRoutesSchema = ProtectedRoutesInputSchema.transform(transformProtectedRoutes);
|
|
19
10
|
//# sourceMappingURL=ProtectedRoutesSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProtectedRoutesSchema.js","sourceRoot":"","sources":["../../../src/config/validators/ProtectedRoutesSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"ProtectedRoutesSchema.js","sourceRoot":"","sources":["../../../src/config/validators/ProtectedRoutesSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAO3E,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC;KACxC,KAAK,CAAC;IACL,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;IAClB,CAAC,CAAC,MAAM,CACN,CAAC,CAAC,MAAM,EAAE,EACV,CAAC,CAAC,MAAM,CAAyB,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,GAAG,KAAK,UAAU,CAAC,CACrE;CACF,CAAC;KACD,QAAQ,EAAE,CAAC;AAEd,MAAM,CAAC,MAAM,qBAAqB,GAAG,0BAA0B,CAAC,SAAS,CACvE,wBAAwB,CACzB,CAAC"}
|
|
@@ -241,19 +241,7 @@ export declare const ZudokuConfig: z.ZodObject<{
|
|
|
241
241
|
remarkPlugins?: Options["remarkPlugins"];
|
|
242
242
|
rehypePlugins?: Options["rehypePlugins"];
|
|
243
243
|
}>>;
|
|
244
|
-
protectedRoutes: z.ZodOptional<z.ZodPipe<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodCustom<(c:
|
|
245
|
-
auth: UseAuthReturn;
|
|
246
|
-
context: ZudokuContext;
|
|
247
|
-
}) => boolean, (c: {
|
|
248
|
-
auth: UseAuthReturn;
|
|
249
|
-
context: ZudokuContext;
|
|
250
|
-
}) => boolean>>]>>, z.ZodTransform<Record<string, (c: {
|
|
251
|
-
auth: UseAuthReturn;
|
|
252
|
-
context: ZudokuContext;
|
|
253
|
-
}) => boolean> | undefined, string[] | Record<string, (c: {
|
|
254
|
-
auth: UseAuthReturn;
|
|
255
|
-
context: ZudokuContext;
|
|
256
|
-
}) => boolean> | undefined>>>;
|
|
244
|
+
protectedRoutes: z.ZodOptional<z.ZodPipe<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodCustom<(c: import("./ProtectedRoutesSchema.js").CallbackContext) => boolean, (c: import("./ProtectedRoutesSchema.js").CallbackContext) => boolean>>]>>, z.ZodTransform<Record<string, (c: import("./ProtectedRoutesSchema.js").CallbackContext) => boolean> | undefined, string[] | Record<string, (c: import("./ProtectedRoutesSchema.js").CallbackContext) => boolean> | undefined>>>;
|
|
257
245
|
basePath: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
258
246
|
canonicalUrlOrigin: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
259
247
|
cdnUrl: z.ZodOptional<z.ZodOptional<z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
@@ -1,30 +1,7 @@
|
|
|
1
1
|
import { useMDXComponents as useMDXComponentsImport } from "@mdx-js/react";
|
|
2
2
|
import { Helmet } from "@zudoku/react-helmet-async";
|
|
3
|
-
import { RouterError as RouterErrorImport } from "../errors/RouterError.js";
|
|
4
|
-
import { ServerError as ServerErrorImport } from "../errors/ServerError.js";
|
|
5
3
|
import { CACHE_KEYS as CACHE_KEYS_IMPORT } from "./cache.js";
|
|
6
|
-
export declare const Layout: ({ children }: {
|
|
7
|
-
children?: import("react").ReactNode;
|
|
8
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export declare const RouterError: typeof RouterErrorImport;
|
|
10
|
-
export declare const ServerError: typeof ServerErrorImport;
|
|
11
|
-
export declare const Bootstrap: ({ router, hydrate, }: {
|
|
12
|
-
hydrate?: boolean;
|
|
13
|
-
router: ReturnType<typeof import("react-router").createBrowserRouter>;
|
|
14
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export declare const BootstrapStatic: ({ router, context, queryClient, helmetContext, bypassProtection, }: {
|
|
16
|
-
helmetContext: HelmetData;
|
|
17
|
-
context: import("react-router").StaticHandlerContext;
|
|
18
|
-
queryClient: import("@tanstack/react-query").QueryClient;
|
|
19
|
-
router: ReturnType<typeof import("react-router").createStaticRouter>;
|
|
20
|
-
bypassProtection?: boolean;
|
|
21
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export declare const RouteGuard: () => import("react/jsx-runtime").JSX.Element;
|
|
23
4
|
export declare const Head: typeof Helmet;
|
|
24
|
-
export declare const StatusPage: ({ statusCode, message }: {
|
|
25
|
-
statusCode: number;
|
|
26
|
-
message?: import("react").ReactNode;
|
|
27
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
28
5
|
export declare const Callout: ({ type, children, title, className, icon, }: {
|
|
29
6
|
type: "info" | "note" | "tip" | "caution" | "danger";
|
|
30
7
|
title?: string;
|
|
@@ -46,11 +23,6 @@ export declare const ClientOnly: (props: {
|
|
|
46
23
|
}) => import("react").ReactNode;
|
|
47
24
|
export declare const Button: import("react").ForwardRefExoticComponent<import("../ui/Button.js").ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
48
25
|
export declare const Link: import("react").ForwardRefExoticComponent<import("react-router").LinkProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
49
|
-
export declare const BuildCheck: ({ buildId, environmentType, endpoint, }: {
|
|
50
|
-
buildId?: string;
|
|
51
|
-
environmentType?: string;
|
|
52
|
-
endpoint?: string;
|
|
53
|
-
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
54
26
|
export declare const Zudoku: {
|
|
55
27
|
(props: import("../core/ZudokuContext.js").ZudokuContextOptions): import("react/jsx-runtime").JSX.Element;
|
|
56
28
|
displayName: string;
|
|
@@ -59,7 +31,6 @@ export declare const Typography: ({ children, className, }: {
|
|
|
59
31
|
children: React.ReactNode;
|
|
60
32
|
className?: string;
|
|
61
33
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
62
|
-
export declare const Meta: ({ children }: import("react").PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
63
34
|
/** @deprecated Import from `zudoku/hooks` instead */
|
|
64
35
|
export declare const useMDXComponents: typeof useMDXComponentsImport;
|
|
65
36
|
/** @deprecated Import from `zudoku/hooks` instead */
|
|
@@ -3,41 +3,24 @@ import { Helmet } from "@zudoku/react-helmet-async";
|
|
|
3
3
|
import { useTheme as useThemeImport } from "next-themes";
|
|
4
4
|
import { Link as LinkImport } from "react-router";
|
|
5
5
|
import { useAuth as useAuthImport } from "../authentication/hook.js";
|
|
6
|
-
import { RouteGuard as RouteGuardImport } from "../core/RouteGuard.js";
|
|
7
|
-
import { RouterError as RouterErrorImport } from "../errors/RouterError.js";
|
|
8
|
-
import { ServerError as ServerErrorImport } from "../errors/ServerError.js";
|
|
9
6
|
import { Button as ButtonImport } from "../ui/Button.js";
|
|
10
7
|
import { Callout as CalloutImport } from "../ui/Callout.js";
|
|
11
|
-
import { Bootstrap as BootstrapImport, BootstrapStatic as BootstrapStaticImport, } from "./Bootstrap.js";
|
|
12
|
-
import { BuildCheck as BuildCheckImport } from "./BuildCheck.js";
|
|
13
8
|
import { CACHE_KEYS as CACHE_KEYS_IMPORT, useCache as useCacheImport, } from "./cache.js";
|
|
14
9
|
import { ClientOnly as ClientOnlyImport } from "./ClientOnly.js";
|
|
15
10
|
import { useZudoku as useZudokuImport } from "./context/ZudokuContext.js";
|
|
16
|
-
import { Layout as LayoutImport } from "./Layout.js";
|
|
17
11
|
import { Markdown as MarkdownImport } from "./Markdown.js";
|
|
18
|
-
import { Meta as MetaImport } from "./Meta.js";
|
|
19
12
|
import { Spinner as SpinnerImport } from "./Spinner.js";
|
|
20
|
-
import { StatusPage as StatusPageImport } from "./StatusPage.js";
|
|
21
13
|
import { Typography as TypographyImport } from "./Typography.js";
|
|
22
14
|
import { Zudoku as ZudokuImport } from "./Zudoku.js";
|
|
23
|
-
export const Layout = /*@__PURE__*/ LayoutImport;
|
|
24
|
-
export const RouterError = /*@__PURE__*/ RouterErrorImport;
|
|
25
|
-
export const ServerError = /*@__PURE__*/ ServerErrorImport;
|
|
26
|
-
export const Bootstrap = /*@__PURE__*/ BootstrapImport;
|
|
27
|
-
export const BootstrapStatic = /*@__PURE__*/ BootstrapStaticImport;
|
|
28
|
-
export const RouteGuard = /*@__PURE__*/ RouteGuardImport;
|
|
29
15
|
export const Head = /*@__PURE__*/ Helmet;
|
|
30
|
-
export const StatusPage = /*@__PURE__*/ StatusPageImport;
|
|
31
16
|
export const Callout = /*@__PURE__*/ CalloutImport;
|
|
32
17
|
export const Markdown = /*@__PURE__*/ MarkdownImport;
|
|
33
18
|
export const Spinner = /*@__PURE__*/ SpinnerImport;
|
|
34
19
|
export const ClientOnly = /*@__PURE__*/ ClientOnlyImport;
|
|
35
20
|
export const Button = /*@__PURE__*/ ButtonImport;
|
|
36
21
|
export const Link = /*@__PURE__*/ LinkImport;
|
|
37
|
-
export const BuildCheck = /*@__PURE__*/ BuildCheckImport;
|
|
38
22
|
export const Zudoku = /*@__PURE__*/ ZudokuImport;
|
|
39
23
|
export const Typography = /*@__PURE__*/ TypographyImport;
|
|
40
|
-
export const Meta = /*@__PURE__*/ MetaImport;
|
|
41
24
|
/** @deprecated Import from `zudoku/hooks` instead */
|
|
42
25
|
export const useMDXComponents = /*@__PURE__*/ useMDXComponentsImport;
|
|
43
26
|
/** @deprecated Import from `zudoku/hooks` instead */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,IAAI,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,IAAI,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC3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AC,UAAU,CAAC;AAC7C,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAC,YAAY,CAAC;AACjD,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAC,gBAAgB,CAAC;AAEzD,qDAAqD;AACrD,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC,sBAAsB,CAAC;AACrE,qDAAqD;AACrD,MAAM,CAAC,MAAM,SAAS,GAAG,aAAa,CAAC,eAAe,CAAC;AACvD,qDAAqD;AACrD,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC,aAAa,CAAC;AACnD,qDAAqD;AACrD,MAAM,CAAC,MAAM,QAAQ,GAAG,aAAa,CAAC,cAAc,CAAC;AACrD,qDAAqD;AACrD,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAC,iBAAiB,CAAC;AAC1D,qDAAqD;AACrD,MAAM,CAAC,MAAM,QAAQ,GAAG,aAAa,CAAC,cAAc,CAAC"}
|
|
@@ -4,7 +4,7 @@ import type { Location } from "react-router";
|
|
|
4
4
|
import type { BundledTheme, HighlighterCore } from "shiki";
|
|
5
5
|
import type { z } from "zod/v4";
|
|
6
6
|
import type { Navigation } from "../../config/validators/NavigationSchema.js";
|
|
7
|
-
import {
|
|
7
|
+
import type { CallbackContext, ProtectedRoutesInput } from "../../config/validators/ProtectedRoutesSchema.js";
|
|
8
8
|
import type { FooterSchema } from "../../config/validators/validate.js";
|
|
9
9
|
import type { AuthenticationPlugin } from "../authentication/authentication.js";
|
|
10
10
|
import { type AuthState } from "../authentication/state.js";
|
|
@@ -92,6 +92,7 @@ export type ZudokuContextOptions = {
|
|
|
92
92
|
};
|
|
93
93
|
};
|
|
94
94
|
};
|
|
95
|
+
export declare const transformProtectedRoutes: (val: ProtectedRoutesInput) => Record<string, (c: CallbackContext) => boolean> | undefined;
|
|
95
96
|
export declare class ZudokuContext {
|
|
96
97
|
plugins: NonNullable<ZudokuContextOptions["plugins"]>;
|
|
97
98
|
navigation: Navigation;
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import { createNanoEvents } from "nanoevents";
|
|
2
|
-
import { ProtectedRoutesSchema, } from "../../config/validators/ProtectedRoutesSchema.js";
|
|
3
2
|
import { useAuthState } from "../authentication/state.js";
|
|
4
3
|
import { joinUrl } from "../util/joinUrl.js";
|
|
5
4
|
import { objectEntries } from "../util/objectEntries.js";
|
|
6
5
|
import { isApiIdentityPlugin, isAuthenticationPlugin, isEventConsumerPlugin, isNavigationPlugin, isProfileMenuPlugin, needsInitialization, } from "./plugins.js";
|
|
6
|
+
export const transformProtectedRoutes = (val) => {
|
|
7
|
+
if (!val)
|
|
8
|
+
return undefined;
|
|
9
|
+
if (Array.isArray(val)) {
|
|
10
|
+
return Object.fromEntries(val.map((route) => [
|
|
11
|
+
route,
|
|
12
|
+
(c) => c.auth.isAuthenticated,
|
|
13
|
+
]));
|
|
14
|
+
}
|
|
15
|
+
return val;
|
|
16
|
+
};
|
|
7
17
|
export class ZudokuContext {
|
|
8
18
|
plugins;
|
|
9
19
|
navigation;
|
|
@@ -21,11 +31,11 @@ export class ZudokuContext {
|
|
|
21
31
|
const routes = plugin.getProtectedRoutes?.();
|
|
22
32
|
if (!routes)
|
|
23
33
|
return [];
|
|
24
|
-
return Object.entries(
|
|
34
|
+
return Object.entries(transformProtectedRoutes(routes) ?? {});
|
|
25
35
|
}));
|
|
26
36
|
const protectedRoutes = {
|
|
27
37
|
...pluginProtectedRoutes,
|
|
28
|
-
...
|
|
38
|
+
...transformProtectedRoutes(options.protectedRoutes),
|
|
29
39
|
};
|
|
30
40
|
this.queryClient = queryClient;
|
|
31
41
|
this.options = { ...options, protectedRoutes };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZudokuContext.js","sourceRoot":"","sources":["../../../src/lib/core/ZudokuContext.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"ZudokuContext.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AAQ,CAAC,CAAC;IAE1D,OAAO,MAAM,GAAG,MAAM,CAAC;AACzB,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ⚠️
|
|
3
|
+
* These are re-exports consumed from the main entry point in `src/app/main.tsx`
|
|
4
|
+
* This is to ensure that they share the exact same context in React.
|
|
5
|
+
* ⚠️
|
|
6
|
+
**/
|
|
7
|
+
import { Helmet } from "@zudoku/react-helmet-async";
|
|
8
|
+
import { RouterError as RouterErrorImport } from "../errors/RouterError.js";
|
|
9
|
+
import { ServerError as ServerErrorImport } from "../errors/ServerError.js";
|
|
10
|
+
export declare const Layout: ({ children }: {
|
|
11
|
+
children?: import("react").ReactNode;
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const RouterError: typeof RouterErrorImport;
|
|
14
|
+
export declare const ServerError: typeof ServerErrorImport;
|
|
15
|
+
export declare const Bootstrap: ({ router, hydrate, }: {
|
|
16
|
+
hydrate?: boolean;
|
|
17
|
+
router: ReturnType<typeof import("react-router").createBrowserRouter>;
|
|
18
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const BootstrapStatic: ({ router, context, queryClient, helmetContext, bypassProtection, }: {
|
|
20
|
+
helmetContext: HelmetData;
|
|
21
|
+
context: import("react-router").StaticHandlerContext;
|
|
22
|
+
queryClient: import("@tanstack/react-query").QueryClient;
|
|
23
|
+
router: ReturnType<typeof import("react-router").createStaticRouter>;
|
|
24
|
+
bypassProtection?: boolean;
|
|
25
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare const RouteGuard: () => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare const Head: typeof Helmet;
|
|
28
|
+
export declare const StatusPage: ({ statusCode, message }: {
|
|
29
|
+
statusCode: number;
|
|
30
|
+
message?: import("react").ReactNode;
|
|
31
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare const BuildCheck: ({ buildId, environmentType, endpoint, }: {
|
|
33
|
+
buildId?: string;
|
|
34
|
+
environmentType?: string;
|
|
35
|
+
endpoint?: string;
|
|
36
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
37
|
+
export declare const Meta: ({ children }: import("react").PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ⚠️
|
|
3
|
+
* These are re-exports consumed from the main entry point in `src/app/main.tsx`
|
|
4
|
+
* This is to ensure that they share the exact same context in React.
|
|
5
|
+
* ⚠️
|
|
6
|
+
**/
|
|
7
|
+
import { Helmet } from "@zudoku/react-helmet-async";
|
|
8
|
+
import { Bootstrap as BootstrapImport, BootstrapStatic as BootstrapStaticImport, } from "../components/Bootstrap.js";
|
|
9
|
+
import { BuildCheck as BuildCheckImport } from "../components/BuildCheck.js";
|
|
10
|
+
import { Layout as LayoutImport } from "../components/Layout.js";
|
|
11
|
+
import { Meta as MetaImport } from "../components/Meta.js";
|
|
12
|
+
import { StatusPage as StatusPageImport } from "../components/StatusPage.js";
|
|
13
|
+
import { RouterError as RouterErrorImport } from "../errors/RouterError.js";
|
|
14
|
+
import { ServerError as ServerErrorImport } from "../errors/ServerError.js";
|
|
15
|
+
import { RouteGuard as RouteGuardImport } from "./RouteGuard.js";
|
|
16
|
+
export const Layout = LayoutImport;
|
|
17
|
+
export const RouterError = RouterErrorImport;
|
|
18
|
+
export const ServerError = ServerErrorImport;
|
|
19
|
+
export const Bootstrap = BootstrapImport;
|
|
20
|
+
export const BootstrapStatic = BootstrapStaticImport;
|
|
21
|
+
export const RouteGuard = RouteGuardImport;
|
|
22
|
+
export const Head = Helmet;
|
|
23
|
+
export const StatusPage = StatusPageImport;
|
|
24
|
+
export const BuildCheck = BuildCheckImport;
|
|
25
|
+
export const Meta = MetaImport;
|
|
26
|
+
//# sourceMappingURL=__internal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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-router";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router.js","sourceRoot":"","sources":["../../../src/lib/core/router.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { j as r } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { a as e } from "./index-DI5SPFK9.js";
|
|
3
|
+
const m = ({
|
|
4
|
+
children: t,
|
|
5
|
+
className: a
|
|
6
|
+
}) => /* @__PURE__ */ r.jsx(
|
|
7
|
+
"div",
|
|
8
|
+
{
|
|
9
|
+
className: e("text-sm font-semibold text-primary mb-2", a),
|
|
10
|
+
"data-pagefind-ignore": "all",
|
|
11
|
+
children: t
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
export {
|
|
15
|
+
m as C
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=CategoryHeading-DCpZu3yG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CategoryHeading-DCpZu3yG.js","sources":["../src/lib/components/CategoryHeading.tsx"],"sourcesContent":["import { cx } from \"class-variance-authority\";\nimport type { ReactNode } from \"react\";\n\nexport const CategoryHeading = ({\n children,\n className,\n}: {\n children: ReactNode;\n className?: string;\n}) => {\n return (\n <div\n className={cx(\"text-sm font-semibold text-primary mb-2\", className)}\n data-pagefind-ignore=\"all\"\n >\n {children}\n </div>\n );\n};\n"],"names":["CategoryHeading","children","className","jsx","cx"],"mappings":";;AAGO,MAAMA,IAAkB,CAAC;AAAA,EAC9B,UAAAC;AAAA,EACA,WAAAC;AACF,MAKIC,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAG,2CAA2CF,CAAS;AAAA,IAClE,wBAAqB;AAAA,IAEpB,UAAAD;AAAA,EAAA;AAAA;"}
|
|
@@ -2,7 +2,7 @@ import { j as r } from "./jsx-runtime-C5mzlN2N.js";
|
|
|
2
2
|
import { _ as s } from "./index-CrcNWbel.js";
|
|
3
3
|
import { Search as n } from "lucide-react";
|
|
4
4
|
import * as t from "react";
|
|
5
|
-
import { D as p, a as l } from "./Dialog-
|
|
5
|
+
import { D as p, a as l } from "./Dialog-BrIjMmUK.js";
|
|
6
6
|
import { c as o } from "./cn-dYga0KKN.js";
|
|
7
7
|
const m = t.forwardRef(({ className: a, ...e }, d) => /* @__PURE__ */ r.jsx(
|
|
8
8
|
s,
|
|
@@ -137,4 +137,4 @@ export {
|
|
|
137
137
|
m as f,
|
|
138
138
|
u as g
|
|
139
139
|
};
|
|
140
|
-
//# sourceMappingURL=Command-
|
|
140
|
+
//# sourceMappingURL=Command-CDn17s8X.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Command-
|
|
1
|
+
{"version":3,"file":"Command-CDn17s8X.js","sources":["../src/lib/ui/Command.tsx"],"sourcesContent":["import { type DialogProps } from \"@radix-ui/react-dialog\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Search } from \"lucide-react\";\nimport * as React from \"react\";\nimport { type ComponentPropsWithoutRef } from \"react\";\nimport { Dialog, DialogContent } from \"zudoku/ui/Dialog.js\";\nimport { cn } from \"../util/cn.js\";\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive.displayName;\n\nconst CommandDialog = ({\n children,\n command,\n content,\n ...props\n}: DialogProps & {\n command?: ComponentPropsWithoutRef<typeof CommandPrimitive>;\n content?: ComponentPropsWithoutRef<typeof DialogContent>;\n}) => {\n return (\n <Dialog {...props}>\n <DialogContent\n {...content}\n className={cn(\n \"overflow-hidden p-0 shadow-lg top-[15vh] translate-y-[0%]\",\n content?.className,\n )}\n aria-describedby={undefined}\n >\n <Command\n {...command}\n className={cn(\n \"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\",\n command?.className,\n )}\n >\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n // eslint-disable-next-line react/no-unknown-property\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandInlineInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n // eslint-disable-next-line react/no-unknown-property\n <div className=\"flex items-center\" cmdk-input-wrapper=\"\">\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50\",\n \"focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring\",\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInlineInput.displayName = CommandPrimitive.Input.displayName;\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default gap-2 select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className,\n )}\n {...props}\n />\n );\n};\nCommandShortcut.displayName = \"CommandShortcut\";\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInlineInput,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\n"],"names":["Command","React","className","props","ref","jsx","CommandPrimitive","cn","CommandDialog","children","command","content","Dialog","DialogContent","CommandInput","jsxs","Search","CommandInlineInput","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem"],"mappings":";;;;;;AAQA,MAAMA,IAAUC,EAAM,WAGpB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1BC,gBAAAA,EAAAA;AAAAA,EAACC;AAAAA,EAAA;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAL;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAQ,cAAcM,EAAiB;AAEvC,MAAME,IAAgB,CAAC;AAAA,EACrB,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGR;AACL,MAKIE,gBAAAA,EAAAA,IAACO,GAAA,EAAQ,GAAGT,GACV,UAAAE,gBAAAA,EAAAA;AAAAA,EAACQ;AAAA,EAAA;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Y,cAAchB,EAAiB,KAAK;"}
|
|
@@ -104,11 +104,11 @@ y.displayName = e.Description.displayName;
|
|
|
104
104
|
export {
|
|
105
105
|
b as D,
|
|
106
106
|
f as a,
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
g as b,
|
|
108
|
+
x as c,
|
|
109
109
|
y as d,
|
|
110
110
|
u as e,
|
|
111
111
|
v as f,
|
|
112
112
|
j as g
|
|
113
113
|
};
|
|
114
|
-
//# sourceMappingURL=Dialog-
|
|
114
|
+
//# sourceMappingURL=Dialog-BrIjMmUK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog-
|
|
1
|
+
{"version":3,"file":"Dialog-BrIjMmUK.js","sources":["../src/lib/ui/Dialog.tsx"],"sourcesContent":["import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport * as React from \"react\";\n\nimport { CircleIcon, XIcon } from \"lucide-react\";\nimport { cn } from \"../util/cn.js\";\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean;\n }\n>(({ className, children, showCloseButton = true, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close className=\"absolute p-3 group -left-1.5 -top-1.5 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <CircleIcon\n className=\"h-2 w-2 transition-all border border-transparent group-hover:border-white/20 rounded-full group-hover:scale-180 group-hover:text-red-400\"\n strokeWidth={2}\n fill=\"currentColor\"\n />\n <XIcon\n className=\"h-2 w-2 absolute top-3 left-3 text-transparent group-hover:text-red-800 transition-colors\"\n strokeWidth={2}\n fill=\"currentColor\"\n />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className,\n )}\n {...props}\n />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className,\n )}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"names":["Dialog","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","React","className","props","ref","jsx","cn","DialogContent","children","showCloseButton","jsxs","CircleIcon","XIcon","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;;AAMA,MAAMA,IAASC,EAAgB,MAEzBC,IAAgBD,EAAgB,SAEhCE,IAAeF,EAAgB,QAE/BG,IAAcH,EAAgB,OAE9BI,IAAgBC,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1BC,gBAAAA,EAAAA;AAAAA,EAACT,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAQ;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAc,cAAcJ,EAAgB,QAAQ;AAEpD,MAAMW,IAAgBN,EAAM,WAK1B,CAAC,EAAE,WAAAC,GAAW,UAAAM,GAAU,iBAAAC,IAAkB,IAAM,GAAGN,EAAA,GAASC,6B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