zudoku 0.4.2-dev.2 → 0.4.2-dev.4

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 (32) hide show
  1. package/dist/cli/dev/handler.js +1 -0
  2. package/dist/cli/dev/handler.js.map +1 -1
  3. package/dist/lib/components/DeveloperHint.js +1 -3
  4. package/dist/lib/components/DeveloperHint.js.map +1 -1
  5. package/dist/lib/plugins/openapi/index.js +1 -1
  6. package/dist/lib/plugins/openapi/index.js.map +1 -1
  7. package/dist/lib/plugins/openapi/playground/Playground.js +9 -3
  8. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  9. package/dist/lib/plugins/openapi/playground/ResponseTab.js +3 -1
  10. package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +1 -1
  11. package/lib/DeveloperHint-BkVaBhYp.js +16 -0
  12. package/lib/DeveloperHint-BkVaBhYp.js.map +1 -0
  13. package/lib/{OperationList-C8Yl5N8i.js → OperationList-pmOTKxgd.js} +3 -3
  14. package/lib/{OperationList-C8Yl5N8i.js.map → OperationList-pmOTKxgd.js.map} +1 -1
  15. package/lib/{Route-CN05AQ1K.js → Route-CS3AkrVN.js} +2 -2
  16. package/lib/{Route-CN05AQ1K.js.map → Route-CS3AkrVN.js.map} +1 -1
  17. package/lib/{SlotletProvider-WwEUzQQ3.js → SlotletProvider-B1N8zYvn.js} +2 -2
  18. package/lib/{SlotletProvider-WwEUzQQ3.js.map → SlotletProvider-B1N8zYvn.js.map} +1 -1
  19. package/lib/{index-XW9taAve.js → index-DGUP_dsJ.js} +594 -588
  20. package/lib/index-DGUP_dsJ.js.map +1 -0
  21. package/lib/zudoku.auth-openid.js +1 -1
  22. package/lib/zudoku.components.js +1 -1
  23. package/lib/zudoku.plugin-api-keys.js +2 -2
  24. package/lib/zudoku.plugin-openapi.js +1 -1
  25. package/package.json +1 -1
  26. package/src/lib/components/DeveloperHint.tsx +1 -3
  27. package/src/lib/plugins/openapi/index.tsx +1 -1
  28. package/src/lib/plugins/openapi/playground/Playground.tsx +10 -4
  29. package/src/lib/plugins/openapi/playground/ResponseTab.tsx +2 -1
  30. package/lib/DeveloperHint-BQSFXH01.js +0 -10
  31. package/lib/DeveloperHint-BQSFXH01.js.map +0 -1
  32. package/lib/index-XW9taAve.js.map +0 -1
@@ -5,7 +5,7 @@ import { j as E } from "./jsx-runtime-B6kdoens.js";
5
5
  import { c as Ce, a as Ie } from "./_commonjsHelpers-BVfed4GL.js";
6
6
  import { A as je } from "./AuthenticationPlugin-DYnkydqa.js";
7
7
  import { useState as Je, useRef as Oe, useEffect as Ne } from "react";
8
- import { D as ze } from "./DeveloperHint-BQSFXH01.js";
8
+ import { D as ze } from "./DeveloperHint-BkVaBhYp.js";
9
9
  import { E as De } from "./ErrorPage-uwQIn-3A.js";
10
10
  import { S as Ke } from "./Spinner-D4ifRVWf.js";
11
11
  import { S as We } from "./Markdown-h11bKkQ9.js";
@@ -15,7 +15,7 @@ var Ce = (e, t, n, r) => ({
15
15
  });
16
16
  import { H as jt, a as qe, M as lr, u as dr, A as hr, b as fr } from "./utils-BPHLKjns.js";
17
17
  import { d as pr, a as mr, R as gr, N as je, L as Ge, u as vr, O as Rt, b as xr, c as He } from "./index-ChhUJhLT.js";
18
- import { E as Et, S as se, a as yr, R as wr } from "./SlotletProvider-WwEUzQQ3.js";
18
+ import { E as Et, S as se, a as yr, R as wr } from "./SlotletProvider-B1N8zYvn.js";
19
19
  import { j as a } from "./jsx-runtime-B6kdoens.js";
20
20
  import { M as br, c as Mr, a as _t, b as Nt, A as Cr, u as ge, h as Sr, d as y, e as Pr, F as jr, D as Rr, C as Er, P as ce, f as Ue, g as _r, i as Dt, R as Nr, S as Dr, j as Ir, k as kr, l as It, m as Ar, n as Re, o as kt, p as ft, B as $e } from "./Combination-Ce1nWgn5.js";
21
21
  import { c as ue, a as b, C as Or, b as Tr, u as Fr, T as Lr, M as Kr, V as $r, d as ze, e as Br, f as Qr } from "./Markdown-h11bKkQ9.js";
@@ -1,10 +1,10 @@
1
1
  import { j as e } from "./jsx-runtime-B6kdoens.js";
2
- import { S as p, R as g } from "./SlotletProvider-WwEUzQQ3.js";
2
+ import { S as p, R as g } from "./SlotletProvider-B1N8zYvn.js";
3
3
  import { u as j, a as u, I as k, S as v, b as w, c as b, d as K, e as N, f as y } from "./Input-CBiLCRuK.js";
4
4
  import { e as E, L as x, O as A } from "./index-ChhUJhLT.js";
5
5
  import { u as m, t as C, j as S } from "./ZudokuContext-BHNQL3XO.js";
6
6
  import { B as l, p as I } from "./Combination-Ce1nWgn5.js";
7
- import { D as P } from "./DeveloperHint-BQSFXH01.js";
7
+ import { D as P } from "./DeveloperHint-BkVaBhYp.js";
8
8
  import { useState as h } from "react";
9
9
  import { c as d, a as D, C as R, g as q } from "./Markdown-h11bKkQ9.js";
10
10
  /**
@@ -1,5 +1,5 @@
1
1
  import "./jsx-runtime-B6kdoens.js";
2
- import { o as s } from "./index-XW9taAve.js";
2
+ import { o as s } from "./index-DGUP_dsJ.js";
3
3
  import "./urql-YhcsXYy8.js";
4
4
  import "./ZudokuContext-BHNQL3XO.js";
5
5
  import "zudoku/openapi-worker";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zudoku",
3
- "version": "0.4.2-dev.2",
3
+ "version": "0.4.2-dev.4",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -8,9 +8,7 @@ export const DeveloperHint = ({
8
8
  children: ReactNode;
9
9
  className?: string;
10
10
  }) => {
11
- // TODO: figure out a way to do that in consumer dev mode not "internal"
12
- // so this doesn't get stripped out in the build
13
- if (!import.meta.env.DEV) return;
11
+ if (process.env.NODE_ENV !== "development") return;
14
12
 
15
13
  return (
16
14
  <Callout type="caution" title="Developer hint" className={className}>
@@ -163,7 +163,7 @@ export const openApiPlugin = (
163
163
  .filter((tag) => tag.operations.length > 0)
164
164
  .map<SidebarItem>((tag) => ({
165
165
  type: "category",
166
- label: tag.name ?? "",
166
+ label: tag.name || "Other endpoints",
167
167
  collapsible: true,
168
168
  collapsed: false,
169
169
  items: tag.operations.map((operation) => ({
@@ -223,7 +223,11 @@ export const Playground = ({
223
223
  </Button>
224
224
  </div>
225
225
  <Tabs
226
- defaultValue={pathParams.length > 0 ? "parameters" : "headers"}
226
+ defaultValue={
227
+ queryParams.length + pathParams.length > 0
228
+ ? "parameters"
229
+ : "headers"
230
+ }
227
231
  >
228
232
  <div className="flex flex-wrap gap-1 justify-between">
229
233
  <TabsList>
@@ -292,7 +296,7 @@ export const Playground = ({
292
296
  </TabsContent>
293
297
  </Tabs>
294
298
  </div>
295
- <div className="flex flex-col gap-4 p-8 bg-muted/70">
299
+ <div className="p-8 bg-muted/70">
296
300
  {queryMutation.error ? (
297
301
  <div className="flex flex-col gap-2">
298
302
  {formState.pathParams.some((p) => p.value === "") && (
@@ -325,7 +329,6 @@ export const Playground = ({
325
329
  <div>Size: {queryMutation.data.size} B</div>
326
330
  </div>
327
331
  </div>
328
- {/*<UrlDisplay host={host} path={url} />*/}
329
332
  <Tabs defaultValue="response">
330
333
  <TabsList>
331
334
  <TabsTrigger value="response">Response</TabsTrigger>
@@ -343,7 +346,10 @@ export const Playground = ({
343
346
  />
344
347
  </TabsContent>
345
348
  <TabsContent value="headers">
346
- <Card className="grid grid-cols-2 w-full gap-2.5 font-mono text-xs shadow-none p-4">
349
+ <Card
350
+ // playground dialog has h-5/6 ≈ 83.333vh
351
+ className="max-h-[calc(83.333vh-140px)] overflow-y-auto grid grid-cols-2 w-full gap-2.5 font-mono text-xs shadow-none p-4"
352
+ >
347
353
  <div className="font-semibold">Key</div>
348
354
  <div className="font-semibold">Value</div>
349
355
  {headerEntries.map(([key, value]) => (
@@ -55,7 +55,8 @@ export const ResponseTab = ({
55
55
  }
56
56
  noBackground
57
57
  showLanguageIndicator
58
- className="overflow-x-auto p-4 text-xs max-h-[480px]"
58
+ // playground dialog has h-5/6 ≈ 83.333vh
59
+ className="overflow-x-auto p-4 text-xs max-h-[calc(83.333vh-180px)]"
59
60
  code={view === "raw" ? body : beautifiedBody}
60
61
  />
61
62
  </Card>
@@ -1,10 +0,0 @@
1
- import "./jsx-runtime-B6kdoens.js";
2
- const n = ({
3
- children: e,
4
- className: r
5
- }) => {
6
- };
7
- export {
8
- n as D
9
- };
10
- //# sourceMappingURL=DeveloperHint-BQSFXH01.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeveloperHint-BQSFXH01.js","sources":["../src/lib/components/DeveloperHint.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Callout } from \"../ui/Callout.js\";\n\nexport const DeveloperHint = ({\n children,\n className,\n}: {\n children: ReactNode;\n className?: string;\n}) => {\n // TODO: figure out a way to do that in consumer dev mode not \"internal\"\n // so this doesn't get stripped out in the build\n if (!import.meta.env.DEV) return;\n\n return (\n <Callout type=\"caution\" title=\"Developer hint\" className={className}>\n <div className=\"flex flex-col gap-2\">\n <div>{children}</div>\n <small className=\"italic\">\n Note: This hint is only shown in development mode.\n </small>\n </div>\n </Callout>\n );\n};\n"],"names":["DeveloperHint","children","className"],"mappings":";AAGO,MAAMA,IAAgB,CAAC;AAAA,EAC5B,UAAAC;AAAA,EACA,WAAAC;AACF,MAGM;AAeN;"}