zudoku 0.52.2 → 0.53.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.
Files changed (64) hide show
  1. package/dist/app/demo.js +2 -2
  2. package/dist/app/demo.js.map +1 -1
  3. package/dist/app/main.js +4 -4
  4. package/dist/app/standalone.js +3 -3
  5. package/dist/app/standalone.js.map +1 -1
  6. package/dist/config/validators/validate.d.ts +2 -2
  7. package/dist/config/validators/validate.js +3 -3
  8. package/dist/config/validators/validate.js.map +1 -1
  9. package/dist/flat-config.d.ts +325 -0
  10. package/dist/lib/components/Banner.js +1 -1
  11. package/dist/lib/components/Banner.js.map +1 -1
  12. package/dist/lib/components/Footer.js +1 -1
  13. package/dist/lib/components/Footer.js.map +1 -1
  14. package/dist/lib/components/Header.js +10 -10
  15. package/dist/lib/components/Header.js.map +1 -1
  16. package/dist/lib/components/Main.js +1 -1
  17. package/dist/lib/components/MobileTopNavigation.js +1 -1
  18. package/dist/lib/components/navigation/NavigationWrapper.js +1 -1
  19. package/dist/lib/core/ZudokuContext.d.ts +4 -4
  20. package/dist/lib/core/ZudokuContext.js +2 -2
  21. package/dist/vite/build.js +1 -1
  22. package/dist/vite/dev-server.js +1 -1
  23. package/lib/{MdxPage-Glqk-5sb.js → MdxPage-swXPJ0gf.js} +2 -2
  24. package/lib/{MdxPage-Glqk-5sb.js.map → MdxPage-swXPJ0gf.js.map} +1 -1
  25. package/lib/{OasProvider-Cks7Ky_-.js → OasProvider-CDAM3TB1.js} +2 -2
  26. package/lib/{OasProvider-Cks7Ky_-.js.map → OasProvider-CDAM3TB1.js.map} +1 -1
  27. package/lib/{OperationList-BP3gUFCx.js → OperationList-C9Hb9ql8.js} +5 -5
  28. package/lib/{OperationList-BP3gUFCx.js.map → OperationList-C9Hb9ql8.js.map} +1 -1
  29. package/lib/{Pagination-D2xTtsFG.js → Pagination-VGlgeCmS.js} +2 -2
  30. package/lib/{Pagination-D2xTtsFG.js.map → Pagination-VGlgeCmS.js.map} +1 -1
  31. package/lib/{SchemaList-BQOuyEO7.js → SchemaList-BAbh1BXO.js} +3 -3
  32. package/lib/{SchemaList-BQOuyEO7.js.map → SchemaList-BAbh1BXO.js.map} +1 -1
  33. package/lib/{SchemaView-C6fqo8Th.js → SchemaView-C2Io712T.js} +3 -3
  34. package/lib/{SchemaView-C6fqo8Th.js.map → SchemaView-C2Io712T.js.map} +1 -1
  35. package/lib/{SignUp-M9Jz4SXJ.js → SignUp-5RUdVhnq.js} +2 -2
  36. package/lib/{SignUp-M9Jz4SXJ.js.map → SignUp-5RUdVhnq.js.map} +1 -1
  37. package/lib/{circular-BNp-4wdn.js → circular-B42RaanD.js} +2 -2
  38. package/lib/{circular-BNp-4wdn.js.map → circular-B42RaanD.js.map} +1 -1
  39. package/lib/{createServer-D7OPYwXA.js → createServer-BKFsRuuk.js} +3 -3
  40. package/lib/{createServer-D7OPYwXA.js.map → createServer-BKFsRuuk.js.map} +1 -1
  41. package/lib/{errors-C473PjdR.js → errors-CF2X_x5o.js} +3 -3
  42. package/lib/{errors-C473PjdR.js.map → errors-CF2X_x5o.js.map} +1 -1
  43. package/lib/{index-BLRAtPoq.js → index-B6Re5_cx.js} +7 -7
  44. package/lib/{index-BLRAtPoq.js.map → index-B6Re5_cx.js.map} +1 -1
  45. package/lib/{index-Chtnw-sn.js → index-CLy1XyH0.js} +13 -13
  46. package/lib/{index-Chtnw-sn.js.map → index-CLy1XyH0.js.map} +1 -1
  47. package/lib/zudoku.auth-azureb2c.js +1 -1
  48. package/lib/zudoku.auth-clerk.js +1 -1
  49. package/lib/zudoku.auth-openid.js +1 -1
  50. package/lib/zudoku.components.js +1 -1
  51. package/lib/zudoku.plugin-api-catalog.js +1 -1
  52. package/lib/zudoku.plugin-markdown.js +1 -1
  53. package/lib/zudoku.plugin-openapi.js +1 -1
  54. package/package.json +1 -1
  55. package/src/app/demo.tsx +2 -2
  56. package/src/app/main.tsx +4 -4
  57. package/src/app/standalone.tsx +3 -3
  58. package/src/lib/components/Banner.tsx +1 -1
  59. package/src/lib/components/Footer.tsx +1 -1
  60. package/src/lib/components/Header.tsx +15 -17
  61. package/src/lib/components/Main.tsx +1 -1
  62. package/src/lib/components/MobileTopNavigation.tsx +2 -2
  63. package/src/lib/components/navigation/NavigationWrapper.tsx +1 -1
  64. package/src/lib/core/ZudokuContext.ts +5 -5
@@ -1,7 +1,7 @@
1
1
  import { j as yo } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import { C as aa } from "./ClientOnly-E7hGysn1.js";
3
3
  import { j as sa, u as To } from "./hook-Bd0yS8M0.js";
4
- import { C as ca, A as qt, a as la } from "./errors-C473PjdR.js";
4
+ import { C as ca, A as qt, a as la } from "./errors-CF2X_x5o.js";
5
5
  /*! @azure/msal-common v15.7.0 2025-05-30 */
6
6
  const d = {
7
7
  LIBRARY_NAME: "MSAL.JS",
@@ -1,6 +1,6 @@
1
1
  import { j as l } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import { LogOutIcon as g } from "lucide-react";
3
- import { S as f, a as w, b as p } from "./SignUp-M9Jz4SXJ.js";
3
+ import { S as f, a as w, b as p } from "./SignUp-5RUdVhnq.js";
4
4
  import { u as n } from "./hook-Bd0yS8M0.js";
5
5
  const y = ({
6
6
  clerkPubKey: d,
@@ -2,7 +2,7 @@ import { j as ne } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import { g as Le } from "./invariant-DAFpPywt.js";
3
3
  import { C as Ue } from "./ClientOnly-E7hGysn1.js";
4
4
  import { j as xe, u as S } from "./hook-Bd0yS8M0.js";
5
- import { C as Ce, O as re, A as R, a as Ie } from "./errors-C473PjdR.js";
5
+ import { C as Ce, O as re, A as R, a as Ie } from "./errors-CF2X_x5o.js";
6
6
  var O = { exports: {} }, je = O.exports, oe;
7
7
  function De() {
8
8
  return oe || (oe = 1, function(t) {
@@ -3,7 +3,7 @@ import "./index-ClhS5TxS.js";
3
3
  import "./chunk-DQRVZFIR-DHK7_Ilc.js";
4
4
  import "./hook-Bd0yS8M0.js";
5
5
  import "./Slot-DwZlQ-vX.js";
6
- import { e as C, f as d, j as h, B as k, m as l, C as S, i as B, H as c, c as y, L as E, M as g, g as H, R as L, d as M, S as R, h as T, T as Z, Z as f, b as A, l as b, k as j, n as v, u as w } from "./index-Chtnw-sn.js";
6
+ import { e as C, f as d, j as h, B as k, m as l, C as S, i as B, H as c, c as y, L as E, M as g, g as H, R as L, d as M, S as R, h as T, T as Z, Z as f, b as A, l as b, k as j, n as v, u as w } from "./index-CLy1XyH0.js";
7
7
  import "./ui/Button.js";
8
8
  import "./ui/Callout.js";
9
9
  import "./ClientOnly-E7hGysn1.js";
@@ -3,7 +3,7 @@ import { s as f } from "./index-CcV90rin.js";
3
3
  import { d as b, m as j } from "./chunk-DQRVZFIR-DHK7_Ilc.js";
4
4
  import { u as x, c as v, j as d } from "./hook-Bd0yS8M0.js";
5
5
  import { H as y } from "./RouteGuard-CbKd7_9h.js";
6
- import { L as N } from "./index-Chtnw-sn.js";
6
+ import { L as N } from "./index-CLy1XyH0.js";
7
7
  import { H as k, M as S } from "./Slot-DwZlQ-vX.js";
8
8
  const w = ({
9
9
  items: n,
@@ -4,7 +4,7 @@ const m = (t) => ({
4
4
  ([e, n]) => ({
5
5
  path: e,
6
6
  lazy: async () => {
7
- const { MdxPage: o } = await import("./MdxPage-Glqk-5sb.js"), { default: a, ...r } = await n();
7
+ const { MdxPage: o } = await import("./MdxPage-swXPJ0gf.js"), { default: a, ...r } = await n();
8
8
  return {
9
9
  element: /* @__PURE__ */ s.jsx(
10
10
  o,
@@ -3,7 +3,7 @@ import "lucide-react";
3
3
  import "./chunk-DQRVZFIR-DHK7_Ilc.js";
4
4
  import "./hook-Bd0yS8M0.js";
5
5
  import "./ui/Button.js";
6
- import { E as e, U as n, F as s } from "./index-BLRAtPoq.js";
6
+ import { E as e, U as n, F as s } from "./index-B6Re5_cx.js";
7
7
  export {
8
8
  e as GetNavigationOperationsQuery,
9
9
  n as UNTAGGED_PATH,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zudoku",
3
- "version": "0.52.2",
3
+ "version": "0.53.0",
4
4
  "type": "module",
5
5
  "homepage": "https://zudoku.dev",
6
6
  "repository": {
package/src/app/demo.tsx CHANGED
@@ -30,8 +30,8 @@ if (!root) {
30
30
  // This directory is not processed by the tailwind plugin
31
31
 
32
32
  const config = {
33
- page: {
34
- pageTitle: "",
33
+ site: {
34
+ title: "",
35
35
  banner: {
36
36
  message: <DemoAnnouncement />,
37
37
  },
package/src/app/main.tsx CHANGED
@@ -36,12 +36,12 @@ export const convertZudokuConfigToOptions = (
36
36
  basePath: config.basePath,
37
37
  canonicalUrlOrigin: config.canonicalUrlOrigin,
38
38
  protectedRoutes: config.protectedRoutes,
39
- page: {
40
- ...config.page,
39
+ site: {
40
+ ...config.site,
41
41
  showPoweredBy:
42
42
  ZuploEnv.buildConfig?.entitlements.devPortalZuploBranding ??
43
- config.page?.showPoweredBy,
44
- logo: config.page?.logo,
43
+ config.site?.showPoweredBy,
44
+ logo: config.site?.logo,
45
45
  },
46
46
  slots: config.slots,
47
47
  metadata: {
@@ -13,14 +13,14 @@ if (!root) {
13
13
  }
14
14
 
15
15
  const apiUrl = root.getAttribute("data-api-url");
16
- const pageTitle = document.getElementsByTagName("title")[0]!.innerText;
16
+ const title = document.getElementsByTagName("title")[0]!.innerText;
17
17
  const logoUrl = root.getAttribute("data-logo-url");
18
18
 
19
19
  // IMPORTANT: This component must not contain tailwind classes
20
20
  // This directory is not processed by the tailwind plugin
21
21
 
22
22
  const config = {
23
- page: {
23
+ site: {
24
24
  logo: logoUrl
25
25
  ? {
26
26
  src: {
@@ -29,7 +29,7 @@ const config = {
29
29
  },
30
30
  }
31
31
  : undefined,
32
- pageTitle,
32
+ title,
33
33
  },
34
34
  navigation: [
35
35
  {
@@ -12,7 +12,7 @@ const COLOR_MAP = {
12
12
  } as const;
13
13
 
14
14
  export const Banner = () => {
15
- const { page } = useZudoku();
15
+ const { site: page } = useZudoku();
16
16
  const [isBannerOpen, setIsBannerOpen] = useState(true);
17
17
 
18
18
  if (!page?.banner || !isBannerOpen) {
@@ -26,7 +26,7 @@ const SocialIcon = ({
26
26
  const isExternalUrl = (href: string) => /^https?:/.test(href);
27
27
 
28
28
  export const Footer = () => {
29
- const { page } = useZudoku();
29
+ const { site: page } = useZudoku();
30
30
  const footer = page?.footer;
31
31
 
32
32
  if (!footer) return null;
@@ -60,22 +60,22 @@ export const Header = memo(function HeaderInner() {
60
60
  const auth = useAuth();
61
61
  const { isAuthenticated, profile, isAuthEnabled } = useAuth();
62
62
  const context = useZudoku();
63
- const { page, plugins, options } = context;
63
+ const { site, plugins, options } = context;
64
64
 
65
65
  const accountItems = plugins
66
66
  .filter((p) => isProfileMenuPlugin(p))
67
67
  .flatMap((p) => p.getProfileMenuItems(context))
68
68
  .sort((i) => i.weight ?? 0);
69
69
 
70
- const logoLightSrc = page?.logo
71
- ? /https?:\/\//.test(page.logo.src.light)
72
- ? page.logo.src.light
73
- : joinUrl(options.basePath, page.logo.src.light)
70
+ const logoLightSrc = site?.logo
71
+ ? /https?:\/\//.test(site.logo.src.light)
72
+ ? site.logo.src.light
73
+ : joinUrl(options.basePath, site.logo.src.light)
74
74
  : undefined;
75
- const logoDarkSrc = page?.logo
76
- ? /https?:\/\//.test(page.logo.src.dark)
77
- ? page.logo.src.dark
78
- : joinUrl(options.basePath, page.logo.src.dark)
75
+ const logoDarkSrc = site?.logo
76
+ ? /https?:\/\//.test(site.logo.src.dark)
77
+ ? site.logo.src.dark
78
+ : joinUrl(options.basePath, site.logo.src.dark)
79
79
  : undefined;
80
80
 
81
81
  const borderBottom = "inset-shadow-[0_-1px_0_0_var(--border)]";
@@ -89,27 +89,25 @@ export const Header = memo(function HeaderInner() {
89
89
  <div className="flex">
90
90
  <Link to="/">
91
91
  <div className="flex items-center gap-3.5">
92
- {page?.logo && (
92
+ {site?.logo && (
93
93
  <>
94
94
  <img
95
95
  src={logoLightSrc}
96
- alt={page.logo.alt ?? page.pageTitle}
97
- style={{ width: page.logo.width }}
96
+ alt={site.logo.alt ?? site.title}
97
+ style={{ width: site.logo.width }}
98
98
  className="max-h-(--top-header-height) dark:hidden"
99
99
  loading="lazy"
100
100
  />
101
101
  <img
102
102
  src={logoDarkSrc}
103
- alt={page.logo.alt ?? page.pageTitle}
104
- style={{ width: page.logo.width }}
103
+ alt={site.logo.alt ?? site.title}
104
+ style={{ width: site.logo.width }}
105
105
  className="max-h-(--top-header-height) hidden dark:block"
106
106
  loading="lazy"
107
107
  />
108
108
  </>
109
109
  )}
110
- <span className="font-semibold text-2xl">
111
- {page?.pageTitle}
112
- </span>
110
+ <span className="font-semibold text-2xl">{site?.title}</span>
113
111
  </div>
114
112
  </Link>
115
113
  </div>
@@ -16,7 +16,7 @@ export const Main = ({ children }: PropsWithChildren) => {
16
16
 
17
17
  return (
18
18
  <Drawer
19
- direction={options.page?.dir === "rtl" ? "right" : "left"}
19
+ direction={options.site?.dir === "rtl" ? "right" : "left"}
20
20
  open={isDrawerOpen}
21
21
  onOpenChange={(open) => setDrawerOpen(open)}
22
22
  >
@@ -26,7 +26,7 @@ export const MobileTopNavigation = () => {
26
26
 
27
27
  return (
28
28
  <Drawer
29
- direction={options.page?.dir === "rtl" ? "left" : "right"}
29
+ direction={options.site?.dir === "rtl" ? "left" : "right"}
30
30
  open={drawerOpen}
31
31
  onOpenChange={(open) => setDrawerOpen(open)}
32
32
  >
@@ -62,7 +62,7 @@ export const MobileTopNavigation = () => {
62
62
  ))}
63
63
  </ul>
64
64
  </div>
65
- {options.page?.showPoweredBy !== false && (
65
+ {options.site?.showPoweredBy !== false && (
66
66
  <PoweredByZudoku className="grow-0 justify-center gap-1" />
67
67
  )}
68
68
  </div>
@@ -37,7 +37,7 @@ export const NavigationWrapper = ({
37
37
  </nav>
38
38
 
39
39
  <div className="bg-background border-t p-2 mx-5 gap-2 items-center mt-2 drop-shadow-[0_-3px_1px_rgba(0,0,0,0.015)] hidden lg:[&:has(>_:nth-child(1):last-child)]:flex">
40
- {options.page?.showPoweredBy !== false && <PoweredByZudoku />}
40
+ {options.site?.showPoweredBy !== false && <PoweredByZudoku />}
41
41
  </div>
42
42
  </div>
43
43
  );
@@ -54,10 +54,10 @@ type Metadata = Partial<{
54
54
  publisher: string;
55
55
  }>;
56
56
 
57
- type Page = Partial<{
57
+ type Site = Partial<{
58
58
  dir?: "ltr" | "rtl";
59
59
  showPoweredBy?: boolean;
60
- pageTitle?: string;
60
+ title?: string;
61
61
  logo?: {
62
62
  src: {
63
63
  light: string;
@@ -78,7 +78,7 @@ export type ZudokuContextOptions = {
78
78
  basePath?: string;
79
79
  canonicalUrlOrigin?: string;
80
80
  metadata?: Metadata;
81
- page?: Page;
81
+ site?: Site;
82
82
  authentication?: AuthenticationPlugin;
83
83
  navigation?: Navigation;
84
84
  plugins?: ZudokuPlugin[];
@@ -102,7 +102,7 @@ export class ZudokuContext {
102
102
  public plugins: NonNullable<ZudokuContextOptions["plugins"]>;
103
103
  public navigation: Navigation;
104
104
  public meta: ZudokuContextOptions["metadata"];
105
- public page: ZudokuContextOptions["page"];
105
+ public site: ZudokuContextOptions["site"];
106
106
  public readonly authentication?: ZudokuContextOptions["authentication"];
107
107
  public readonly queryClient: QueryClient;
108
108
  public readonly options: ZudokuContextOptions;
@@ -123,7 +123,7 @@ export class ZudokuContext {
123
123
  this.navigationPlugins = this.plugins.filter(isNavigationPlugin);
124
124
  this.authentication = this.plugins.find(isAuthenticationPlugin);
125
125
  this.meta = options.metadata;
126
- this.page = options.page;
126
+ this.site = options.site;
127
127
  this.plugins.forEach((plugin) => {
128
128
  if (!isEventConsumerPlugin(plugin)) return;
129
129