zudoku 0.25.0 → 0.25.1

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 (82) hide show
  1. package/dist/config/validators/InputSidebarSchema.d.ts +15 -0
  2. package/dist/config/validators/InputSidebarSchema.js +1 -0
  3. package/dist/config/validators/InputSidebarSchema.js.map +1 -1
  4. package/dist/config/validators/common.d.ts +45 -34
  5. package/dist/config/validators/common.js +2 -1
  6. package/dist/config/validators/common.js.map +1 -1
  7. package/dist/config/validators/validate.d.ts +19 -14
  8. package/dist/lib/authentication/components/SignOut.js +1 -1
  9. package/dist/lib/authentication/components/SignOut.js.map +1 -1
  10. package/dist/lib/authentication/providers/clerk.js +29 -6
  11. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  12. package/dist/lib/components/navigation/SidebarBadge.d.ts +11 -1
  13. package/dist/lib/components/navigation/SidebarBadge.js +11 -2
  14. package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
  15. package/dist/lib/components/navigation/SidebarCategory.js +2 -2
  16. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  17. package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
  18. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  19. package/dist/lib/oas/graphql/index.js +16 -3
  20. package/dist/lib/oas/graphql/index.js.map +1 -1
  21. package/dist/lib/oas/parser/upgrade/index.js +17 -3
  22. package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
  23. package/dist/lib/plugins/openapi/CollapsibleCode.js +1 -1
  24. package/dist/lib/plugins/openapi/Endpoint.d.ts +1 -1
  25. package/dist/lib/plugins/openapi/Endpoint.js +2 -0
  26. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  27. package/dist/lib/plugins/openapi/ExampleDisplay.d.ts +12 -0
  28. package/dist/lib/plugins/openapi/ExampleDisplay.js +78 -0
  29. package/dist/lib/plugins/openapi/ExampleDisplay.js.map +1 -0
  30. package/dist/lib/plugins/openapi/OperationListItem.js +1 -1
  31. package/dist/lib/plugins/openapi/OperationListItem.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.d.ts +2 -4
  35. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +6 -13
  36. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  37. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +11 -13
  38. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  39. package/dist/lib/plugins/openapi/Sidecar.js +1 -1
  40. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  41. package/dist/lib/plugins/openapi/index.js +1 -0
  42. package/dist/lib/plugins/openapi/index.js.map +1 -1
  43. package/dist/vite/build.js +10 -8
  44. package/dist/vite/build.js.map +1 -1
  45. package/dist/vite/config.js +10 -0
  46. package/dist/vite/config.js.map +1 -1
  47. package/lib/{AuthenticationPlugin-DVLEc6cm.js → AuthenticationPlugin-D7G3me8L.js} +16 -16
  48. package/lib/AuthenticationPlugin-D7G3me8L.js.map +1 -0
  49. package/lib/{OperationList-c6V_vcgz.js → OperationList-BLdHAQ39.js} +1594 -1525
  50. package/lib/OperationList-BLdHAQ39.js.map +1 -0
  51. package/lib/assets/{worker-DV9Ecqy9.js → worker-Cbp2r2BQ.js} +26 -14
  52. package/lib/assets/{worker-DV9Ecqy9.js.map → worker-Cbp2r2BQ.js.map} +1 -1
  53. package/lib/{createServer-C4C0OO0m.js → createServer-Bf5_6o6G.js} +796 -784
  54. package/lib/{createServer-C4C0OO0m.js.map → createServer-Bf5_6o6G.js.map} +1 -1
  55. package/lib/{index-DkwDHnit.js → index-BNx95gkf.js} +5 -4
  56. package/lib/{index-DkwDHnit.js.map → index-BNx95gkf.js.map} +1 -1
  57. package/lib/zudoku.auth-clerk.js +80 -52
  58. package/lib/zudoku.auth-clerk.js.map +1 -1
  59. package/lib/zudoku.auth-openid.js +1 -1
  60. package/lib/zudoku.components.js +89 -85
  61. package/lib/zudoku.components.js.map +1 -1
  62. package/lib/zudoku.openapi-worker.js +1 -1
  63. package/lib/zudoku.plugin-openapi.js +1 -1
  64. package/package.json +4 -4
  65. package/src/lib/authentication/components/SignOut.tsx +2 -1
  66. package/src/lib/authentication/providers/clerk.tsx +38 -7
  67. package/src/lib/components/navigation/SidebarBadge.tsx +13 -1
  68. package/src/lib/components/navigation/SidebarCategory.tsx +3 -7
  69. package/src/lib/components/navigation/SidebarWrapper.tsx +1 -0
  70. package/src/lib/oas/graphql/index.ts +16 -7
  71. package/src/lib/oas/parser/upgrade/index.ts +19 -4
  72. package/src/lib/plugins/openapi/CollapsibleCode.tsx +1 -1
  73. package/src/lib/plugins/openapi/Endpoint.tsx +2 -0
  74. package/src/lib/plugins/openapi/ExampleDisplay.tsx +163 -0
  75. package/src/lib/plugins/openapi/OperationListItem.tsx +5 -3
  76. package/src/lib/plugins/openapi/ParameterListItem.tsx +1 -1
  77. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +11 -37
  78. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +49 -63
  79. package/src/lib/plugins/openapi/Sidecar.tsx +2 -4
  80. package/src/lib/plugins/openapi/index.tsx +1 -0
  81. package/lib/AuthenticationPlugin-DVLEc6cm.js.map +0 -1
  82. package/lib/OperationList-c6V_vcgz.js.map +0 -1
@@ -18196,9 +18196,16 @@ const vs = /* @__PURE__ */ new Map(), Sm = (t, e) => {
18196
18196
  return e(n);
18197
18197
  }, Nm = (t) => {
18198
18198
  var e;
18199
- return (e = t.openapi) != null && e.startsWith("3.0") && (t.openapi = "3.1.0"), t = gn(t, (n) => (n.type !== "undefined" && n.nullable === !0 && (n.type = ["null", n.type], delete n.nullable), n)), t = gn(t, (n) => (n.exclusiveMinimum === !0 ? (n.exclusiveMinimum = n.minimum, delete n.minimum) : n.exclusiveMinimum === !1 && delete n.exclusiveMinimum, n.exclusiveMaximum === !0 ? (n.exclusiveMaximum = n.maximum, delete n.maximum) : n.exclusiveMaximum === !1 && delete n.exclusiveMaximum, n)), t = gn(t, (n) => (n.example !== void 0 && (n.examples = {
18200
- default: n.example
18201
- }, delete n.example), n)), t = gn(t, (n) => {
18199
+ return (e = t.openapi) != null && e.startsWith("3.0") && (t.openapi = "3.1.0"), t = gn(t, (n) => (n.type !== "undefined" && n.nullable === !0 && (n.type = ["null", n.type], delete n.nullable), n)), t = gn(t, (n) => (n.exclusiveMinimum === !0 ? (n.exclusiveMinimum = n.minimum, delete n.minimum) : n.exclusiveMinimum === !1 && delete n.exclusiveMinimum, n.exclusiveMaximum === !0 ? (n.exclusiveMaximum = n.maximum, delete n.maximum) : n.exclusiveMaximum === !1 && delete n.exclusiveMaximum, n)), t = gn(t, (n) => {
18200
+ if (n.example !== void 0) {
18201
+ const r = typeof n.example == "object" && (n.example.summary !== void 0 || n.example.description !== void 0 || n.example.value !== void 0 || n.example.externalValue !== void 0) ? n.example : { value: n.example };
18202
+ n.examples ? n.examples = {
18203
+ default: r,
18204
+ ...n.examples
18205
+ } : n.examples = { default: r }, delete n.example;
18206
+ }
18207
+ return n;
18208
+ }), t = gn(t, (n) => {
18202
18209
  if (n.type === "object" && n.properties !== void 0)
18203
18210
  for (const [, i] of Object.entries(n.properties)) {
18204
18211
  const r = i ?? {};
@@ -18425,9 +18432,10 @@ const vs = /* @__PURE__ */ new Map(), Sm = (t, e) => {
18425
18432
  ([s, o]) => ({
18426
18433
  mediaType: s,
18427
18434
  schema: o.schema,
18428
- examples: Object.entries(o.examples ?? {}).map(
18429
- ([a, u]) => ({ name: a, ...u })
18430
- ),
18435
+ examples: o.examples ? Object.entries(o.examples).map(([a, u]) => ({
18436
+ name: a,
18437
+ ...typeof u == "string" ? { value: u } : u
18438
+ })) : [],
18431
18439
  encoding: Object.entries(o.encoding ?? {}).map(
18432
18440
  ([a, u]) => ({ name: a, ...u })
18433
18441
  )
@@ -18447,9 +18455,10 @@ const vs = /* @__PURE__ */ new Map(), Sm = (t, e) => {
18447
18455
  ([r, { schema: s, examples: o }]) => ({
18448
18456
  mediaType: r,
18449
18457
  schema: s,
18450
- examples: Object.entries(o ?? {}).map(
18451
- ([a, u]) => ({ name: a, ...u })
18452
- )
18458
+ examples: o ? Object.entries(o).map(([a, u]) => ({
18459
+ name: a,
18460
+ ...typeof u == "string" ? { value: u } : u
18461
+ })) : []
18453
18462
  })
18454
18463
  ),
18455
18464
  headers: i.headers,
@@ -18476,10 +18485,13 @@ const vs = /* @__PURE__ */ new Map(), Sm = (t, e) => {
18476
18485
  }), qm = Me.objectRef("Schema").implement({
18477
18486
  fields: (t) => ({
18478
18487
  openapi: t.string({ resolve: (e) => e.openapi }),
18479
- url: t.string({ resolve: (e) => {
18480
- var n, i;
18481
- return ((i = (n = e.servers) == null ? void 0 : n.at(0)) == null ? void 0 : i.url) ?? "/";
18482
- } }),
18488
+ url: t.string({
18489
+ resolve: (e) => {
18490
+ var n, i;
18491
+ return (i = (n = e.servers) == null ? void 0 : n.at(0)) == null ? void 0 : i.url;
18492
+ },
18493
+ nullable: !0
18494
+ }),
18483
18495
  servers: t.field({
18484
18496
  type: [Dm],
18485
18497
  resolve: (e) => e.servers ?? []
@@ -18577,4 +18589,4 @@ Jm.addEventListener("connect", (t) => {
18577
18589
  }
18578
18590
  }, e.start();
18579
18591
  });
18580
- //# sourceMappingURL=worker-DV9Ecqy9.js.map
18592
+ //# sourceMappingURL=worker-Cbp2r2BQ.js.map