zudoku 0.3.0-dev.11 → 0.3.0-dev.13

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 (85) hide show
  1. package/dist/app/App.js +9 -7
  2. package/dist/app/App.js.map +1 -1
  3. package/dist/config/config.d.ts +5 -14
  4. package/dist/lib/components/DevPortal.d.ts +2 -20
  5. package/dist/lib/components/DevPortal.js +1 -1
  6. package/dist/lib/components/DevPortal.js.map +1 -1
  7. package/dist/lib/components/Header.js +2 -2
  8. package/dist/lib/components/Header.js.map +1 -1
  9. package/dist/lib/components/Heading.d.ts +9 -4
  10. package/dist/lib/components/Heading.js +17 -2
  11. package/dist/lib/components/Heading.js.map +1 -1
  12. package/dist/lib/components/Layout.js +1 -1
  13. package/dist/lib/components/Layout.js.map +1 -1
  14. package/dist/lib/core/DevPortalContext.d.ts +33 -3
  15. package/dist/lib/core/DevPortalContext.js +3 -1
  16. package/dist/lib/core/DevPortalContext.js.map +1 -1
  17. package/dist/lib/plugins/markdown/MdxPage.d.ts +3 -2
  18. package/dist/lib/plugins/markdown/MdxPage.js +5 -4
  19. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  20. package/dist/lib/plugins/markdown/generateRoutes.d.ts +2 -2
  21. package/dist/lib/plugins/markdown/generateRoutes.js +2 -2
  22. package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
  23. package/dist/lib/plugins/markdown/index.d.ts +4 -1
  24. package/dist/lib/plugins/markdown/index.js +2 -2
  25. package/dist/lib/plugins/markdown/index.js.map +1 -1
  26. package/dist/lib/plugins/openapi/OperationList.js +4 -3
  27. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  28. package/dist/lib/plugins/openapi/OperationListItem.js +8 -4
  29. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  30. package/dist/lib/plugins/openapi/ParameterList.js +1 -1
  31. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  32. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  33. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  34. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +1 -9
  35. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  36. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -1
  37. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  38. package/dist/lib/plugins/openapi/SchemaListView.js +4 -26
  39. package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -1
  40. package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +7 -0
  41. package/dist/lib/plugins/openapi/SchemaListViewItem.js +16 -0
  42. package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -0
  43. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.d.ts +8 -0
  44. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js +17 -0
  45. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js.map +1 -0
  46. package/dist/lib/plugins/openapi/util/prose.d.ts +1 -0
  47. package/dist/lib/plugins/openapi/util/prose.js +4 -0
  48. package/dist/lib/plugins/openapi/util/prose.js.map +1 -0
  49. package/dist/lib/ui/button-variants.d.ts +1 -1
  50. package/dist/lib/util/MdxComponents.js +1 -1
  51. package/dist/lib/util/MdxComponents.js.map +1 -1
  52. package/dist/lib/util/objectEntries.d.ts +4 -0
  53. package/dist/lib/util/objectEntries.js +2 -0
  54. package/dist/lib/util/objectEntries.js.map +1 -0
  55. package/dist/lib/util/renderIf.d.ts +1 -0
  56. package/dist/lib/util/renderIf.js +2 -0
  57. package/dist/lib/util/renderIf.js.map +1 -0
  58. package/dist/vite/plugin-docs.js +1 -1
  59. package/dist/vite/plugin-docs.js.map +1 -1
  60. package/lib/{Spinner-CzCKCaUK.js → Spinner-CbtkR-Im.js} +3054 -3040
  61. package/lib/zudoku.components.js +42 -41
  62. package/lib/zudoku.plugins.js +2982 -2980
  63. package/package.json +1 -1
  64. package/src/app/App.tsx +10 -7
  65. package/src/lib/components/DevPortal.tsx +4 -25
  66. package/src/lib/components/Header.tsx +4 -4
  67. package/src/lib/components/Heading.tsx +26 -7
  68. package/src/lib/components/Layout.tsx +1 -1
  69. package/src/lib/core/DevPortalContext.ts +37 -9
  70. package/src/lib/plugins/markdown/MdxPage.tsx +49 -32
  71. package/src/lib/plugins/markdown/generateRoutes.tsx +12 -2
  72. package/src/lib/plugins/markdown/index.tsx +8 -1
  73. package/src/lib/plugins/openapi/OperationList.tsx +9 -3
  74. package/src/lib/plugins/openapi/OperationListItem.tsx +39 -18
  75. package/src/lib/plugins/openapi/ParameterList.tsx +1 -1
  76. package/src/lib/plugins/openapi/ParameterListItem.tsx +3 -4
  77. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +2 -17
  78. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +3 -1
  79. package/src/lib/plugins/openapi/SchemaListView.tsx +15 -182
  80. package/src/lib/plugins/openapi/SchemaListViewItem.tsx +110 -0
  81. package/src/lib/plugins/openapi/SchemaListViewItemGroup.tsx +63 -0
  82. package/src/lib/plugins/openapi/util/prose.ts +7 -0
  83. package/src/lib/util/MdxComponents.tsx +1 -1
  84. package/src/lib/util/objectEntries.ts +5 -0
  85. package/src/lib/util/renderIf.ts +4 -0
@@ -3,8 +3,8 @@ var se = (t) => {
3
3
  throw TypeError(t);
4
4
  };
5
5
  var Ie = (t, e, s) => e in t ? Te(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
6
- var y = (t, e, s) => Ie(t, typeof e != "symbol" ? e + "" : e, s), ae = (t, e, s) => e.has(t) || se("Cannot " + s);
7
- var i = (t, e, s) => (ae(t, e, "read from private field"), s ? s.call(t) : e.get(t)), g = (t, e, s) => e.has(t) ? se("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), u = (t, e, s, a) => (ae(t, e, "write to private field"), a ? a.call(t, s) : e.set(t, s), s);
6
+ var g = (t, e, s) => Ie(t, typeof e != "symbol" ? e + "" : e, s), ae = (t, e, s) => e.has(t) || se("Cannot " + s);
7
+ var i = (t, e, s) => (ae(t, e, "read from private field"), s ? s.call(t) : e.get(t)), v = (t, e, s) => e.has(t) ? se("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), u = (t, e, s, a) => (ae(t, e, "write to private field"), a ? a.call(t, s) : e.set(t, s), s);
8
8
  var S = (t, e, s, a) => ({
9
9
  set _(r) {
10
10
  u(t, e, r, s);
@@ -14,14 +14,14 @@ var S = (t, e, s, a) => ({
14
14
  }
15
15
  });
16
16
  import { j as n, u as D, O as Ee } from "./index-PyGcnQFX.js";
17
- import { S as me, h as ge, Q as Se, n as m, m as ne, M as Fe, a as re, b as j, e as Re, c as He, d as Le, f as ze, o as ie, r as oe, g as Ke, i as le, p as ce, s as _e, j as z, u as U, N as B, k as Be, l as Ve, q as Ue, t as W, v as X, w as V, x as ve, y as We, z as L, R as ye, T as xe, C as be, A as Xe, B as $e, D as Ge, E as Je, H as je, F as Ye, G as Ze, I as et, J as tt, K as st, L as at, O as nt, P as rt, U as it, V as ot } from "./Spinner-CzCKCaUK.js";
18
- import { X as Vt, W as Ut } from "./Spinner-CzCKCaUK.js";
17
+ import { S as me, h as ge, Q as Se, n as m, m as ne, M as Fe, a as re, b as j, e as Re, c as He, d as Le, f as ze, o as ie, r as oe, g as Ke, i as le, p as ce, s as _e, j as z, u as U, N as B, k as Be, l as Ve, q as Ue, t as W, v as X, w as V, x as ve, y as We, z as L, R as ye, T as xe, C as be, A as Xe, B as $e, D as Ge, E as Je, H as je, F as Ye, G as Ze, I as et, J as tt, K as st, L as at, O as nt, P as rt, U as it, V as ot } from "./Spinner-CbtkR-Im.js";
18
+ import { X as Vt, W as Ut } from "./Spinner-CbtkR-Im.js";
19
19
  import { memo as Pe, createContext as lt, useEffect as I, useRef as K, useState as ct, forwardRef as ht, Suspense as we, useMemo as H, Fragment as ut } from "react";
20
20
  import { c as dt } from "./state-2Hu1renZ.js";
21
21
  var x, de, ft = (de = class extends me {
22
22
  constructor(e = {}) {
23
23
  super();
24
- g(this, x);
24
+ v(this, x);
25
25
  this.config = e, u(this, x, /* @__PURE__ */ new Map());
26
26
  }
27
27
  build(e, s, a) {
@@ -93,8 +93,8 @@ var x, de, ft = (de = class extends me {
93
93
  }, x = new WeakMap(), de), p, T, fe, pt = (fe = class extends me {
94
94
  constructor(e = {}) {
95
95
  super();
96
- g(this, p);
97
- g(this, T);
96
+ v(this, p);
97
+ v(this, T);
98
98
  this.config = e, u(this, p, /* @__PURE__ */ new Map()), u(this, T, Date.now());
99
99
  }
100
100
  build(e, s, a) {
@@ -175,18 +175,18 @@ function mt(t) {
175
175
  var $, G, J, Y, Z;
176
176
  const r = e.options, o = (J = (G = ($ = e.fetchOptions) == null ? void 0 : $.meta) == null ? void 0 : G.fetchMore) == null ? void 0 : J.direction, l = ((Y = e.state.data) == null ? void 0 : Y.pages) || [], h = ((Z = e.state.data) == null ? void 0 : Z.pageParams) || [], d = { pages: [], pageParams: [] };
177
177
  let b = !1;
178
- const f = (v) => {
179
- Object.defineProperty(v, "signal", {
178
+ const f = (y) => {
179
+ Object.defineProperty(y, "signal", {
180
180
  enumerable: !0,
181
181
  get: () => (e.signal.aborted ? b = !0 : e.signal.addEventListener("abort", () => {
182
182
  b = !0;
183
183
  }), e.signal)
184
184
  });
185
- }, qe = Re(e.options, e.fetchOptions), _ = async (v, P, O) => {
185
+ }, qe = Re(e.options, e.fetchOptions), _ = async (y, P, O) => {
186
186
  if (b)
187
187
  return Promise.reject();
188
- if (P == null && v.pages.length)
189
- return Promise.resolve(v);
188
+ if (P == null && y.pages.length)
189
+ return Promise.resolve(y);
190
190
  const E = {
191
191
  queryKey: e.queryKey,
192
192
  pageParam: P,
@@ -198,24 +198,24 @@ function mt(t) {
198
198
  E
199
199
  ), { maxPages: ee } = e.options, te = O ? He : Le;
200
200
  return {
201
- pages: te(v.pages, De, ee),
202
- pageParams: te(v.pageParams, P, ee)
201
+ pages: te(y.pages, De, ee),
202
+ pageParams: te(y.pageParams, P, ee)
203
203
  };
204
204
  };
205
205
  let C;
206
206
  if (o && l.length) {
207
- const v = o === "backward", P = v ? gt : he, O = {
207
+ const y = o === "backward", P = y ? gt : he, O = {
208
208
  pages: l,
209
209
  pageParams: h
210
210
  }, E = P(r, O);
211
- C = await _(O, E, v);
211
+ C = await _(O, E, y);
212
212
  } else {
213
213
  C = await _(
214
214
  d,
215
215
  h[0] ?? r.initialPageParam
216
216
  );
217
- const v = t ?? l.length;
218
- for (let P = 1; P < v; P++) {
217
+ const y = t ?? l.length;
218
+ for (let P = 1; P < y; P++) {
219
219
  const O = he(r, C);
220
220
  C = await _(C, O);
221
221
  }
@@ -259,14 +259,14 @@ function gt(t, { pages: e, pageParams: s }) {
259
259
  }
260
260
  var c, w, N, M, A, k, Q, q, pe, vt = (pe = class {
261
261
  constructor(t = {}) {
262
- g(this, c);
263
- g(this, w);
264
- g(this, N);
265
- g(this, M);
266
- g(this, A);
267
- g(this, k);
268
- g(this, Q);
269
- g(this, q);
262
+ v(this, c);
263
+ v(this, w);
264
+ v(this, N);
265
+ v(this, M);
266
+ v(this, A);
267
+ v(this, k);
268
+ v(this, Q);
269
+ v(this, q);
270
270
  u(this, c, t.queryCache || new ft()), u(this, w, t.mutationCache || new pt()), u(this, N, t.defaultOptions || {}), u(this, M, /* @__PURE__ */ new Map()), u(this, A, /* @__PURE__ */ new Map()), u(this, k, 0);
271
271
  }
272
272
  mount() {
@@ -461,13 +461,14 @@ var c, w, N, M, A, k, Q, q, pe, vt = (pe = class {
461
461
  const Ne = (t) => "getRoutes" in t && typeof t.getRoutes == "function", yt = (t) => "initialize" in t && typeof t.initialize == "function", xt = (t) => "getHead" in t && typeof t.getHead == "function", bt = (t) => "getIdentities" in t && typeof t.getIdentities == "function", ke = new vt(), jt = dt(() => ({}));
462
462
  class Pt {
463
463
  constructor(e) {
464
- y(this, "plugins", []);
465
- y(this, "navigationPlugins");
466
- y(this, "navigation");
467
- y(this, "meta");
468
- y(this, "authentication");
469
- y(this, "state");
470
- y(this, "initialize", async () => {
464
+ g(this, "plugins", []);
465
+ g(this, "navigationPlugins");
466
+ g(this, "navigation");
467
+ g(this, "meta");
468
+ g(this, "page");
469
+ g(this, "authentication");
470
+ g(this, "state");
471
+ g(this, "initialize", async () => {
471
472
  await Promise.all([
472
473
  this.plugins.filter(yt).map((e) => {
473
474
  var s;
@@ -475,13 +476,13 @@ class Pt {
475
476
  })
476
477
  ]);
477
478
  });
478
- y(this, "invalidateCache", async (e) => {
479
+ g(this, "invalidateCache", async (e) => {
479
480
  await ke.invalidateQueries({ queryKey: e });
480
481
  });
481
- y(this, "getApiIdentities", async () => (await Promise.all(
482
+ g(this, "getApiIdentities", async () => (await Promise.all(
482
483
  this.plugins.filter(bt).map((s) => s.getIdentities(this))
483
484
  )).flat());
484
- y(this, "getNavigation", async (e) => (await Promise.all(
485
+ g(this, "getNavigation", async (e) => (await Promise.all(
485
486
  this.navigationPlugins.map(
486
487
  async (a) => {
487
488
  var r;
@@ -489,7 +490,7 @@ class Pt {
489
490
  }
490
491
  )
491
492
  )).flatMap((a) => a ?? []));
492
- this.plugins = e.plugins ?? [], this.navigation = e.navigation, this.navigationPlugins = this.plugins.filter(Ne), this.authentication = e.authentication, this.meta = e.meta, this.state = jt;
493
+ this.plugins = e.plugins ?? [], this.navigation = e.navigation, this.navigationPlugins = this.plugins.filter(Ne), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page, this.state = jt;
493
494
  }
494
495
  async signRequest(e) {
495
496
  if (!this.authentication)
@@ -559,12 +560,12 @@ const kt = z("Sun", [
559
560
  }
560
561
  ) }, e.label)) }) });
561
562
  }, Ce = Pe(function() {
562
- const [e, s] = Ve(), { isAuthenticated: a, profile: r, isAuthEnabled: o, login: l, logout: h } = Ue(), { meta: d } = U(), b = e ? Nt : kt;
563
+ const [e, s] = Ve(), { isAuthenticated: a, profile: r, isAuthEnabled: o, login: l, logout: h } = Ue(), { page: d } = U(), b = e ? Nt : kt;
563
564
  return /* @__PURE__ */ n.jsx("header", { className: "fixed top-0 w-full z-10 bg-background/80 backdrop-blur", children: /* @__PURE__ */ n.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
564
565
  /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b border-border px-12 h-[--top-header-height]", children: [
565
566
  /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-3.5", children: [
566
- (d == null ? void 0 : d.logo) && /* @__PURE__ */ n.jsx("img", { src: d.logo, alt: "My Dev Portal", className: "h-10" }),
567
- /* @__PURE__ */ n.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: d == null ? void 0 : d.headerTitle })
567
+ (d == null ? void 0 : d.logo) && /* @__PURE__ */ n.jsx("img", { src: d.logo, alt: d.pageTitle, className: "h-10" }),
568
+ /* @__PURE__ */ n.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: d == null ? void 0 : d.pageTitle })
568
569
  ] }),
569
570
  /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
570
571
  /* @__PURE__ */ n.jsx("div", { className: "w-full max-w-prose" }),
@@ -820,7 +821,7 @@ const kt = z("Sun", [
820
821
  return I(() => {
821
822
  e.pathname !== r.current && s(""), r.current = e.pathname;
822
823
  }, [e.pathname, s]), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
823
- /* @__PURE__ */ n.jsxs(je, { titleTemplate: a == null ? void 0 : a.pageTitle, children: [
824
+ /* @__PURE__ */ n.jsxs(je, { titleTemplate: a == null ? void 0 : a.title, children: [
824
825
  /* @__PURE__ */ n.jsx("title", { children: "Home" }),
825
826
  (a == null ? void 0 : a.description) && /* @__PURE__ */ n.jsx("meta", { name: "description", content: a.description }),
826
827
  (a == null ? void 0 : a.favicon) && /* @__PURE__ */ n.jsx("link", { rel: "icon", href: a.favicon })