zudoku 0.4.2-dev.3 → 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.
@@ -1,5 +1,5 @@
1
1
  import "./jsx-runtime-B6kdoens.js";
2
- import { o as s } from "./index-Sapny0Di.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.3",
3
+ "version": "0.4.2-dev.4",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -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>