zudoku 0.3.0-dev.7 → 0.3.0-dev.9

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zudoku",
3
- "version": "0.3.0-dev.7",
3
+ "version": "0.3.0-dev.9",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -1,4 +1,4 @@
1
- import { MoonStarIcon, SearchIcon, SunIcon } from "lucide-react";
1
+ import { MoonStarIcon, SunIcon } from "lucide-react";
2
2
  import { memo } from "react";
3
3
 
4
4
  import { useAuth } from "../authentication/hook.js";
@@ -27,7 +27,7 @@ export const Header = memo(function HeaderInner() {
27
27
  </div>
28
28
  <div className="grid grid-cols-[--sidecar-grid-cols] items-center gap-8">
29
29
  <div className="w-full max-w-prose">
30
- <button className="flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-40 sm:w-72">
30
+ {/*<button className="flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-40 sm:w-72">
31
31
  <div className="flex items-center gap-2 flex-grow">
32
32
  <SearchIcon size={14} />
33
33
  Search
@@ -35,7 +35,7 @@ export const Header = memo(function HeaderInner() {
35
35
  <kbd className="absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border border-border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex">
36
36
  ⌘K
37
37
  </kbd>
38
- </button>
38
+ </button>*/}
39
39
  </div>
40
40
 
41
41
  <div className="items-center justify-self-end text-sm hidden lg:flex">
@@ -52,35 +52,39 @@ export const OperationListItem = ({
52
52
  )}
53
53
  </div>
54
54
  )}
55
- <Heading level={3} className="capitalize">
56
- Responses
57
- </Heading>
58
- <Tabs defaultValue={`${first?.statusCode}${first?.description}`}>
59
- <TabsList>
60
- {operation.responses.map((response) => (
61
- <TabsTrigger
62
- value={response.statusCode + response.description}
63
- key={response.statusCode}
64
- title={response.description}
65
- >
66
- {response.statusCode}
67
- </TabsTrigger>
68
- ))}
69
- </TabsList>
70
- <ul className="list-none m-0 px-0 overflow-hidden">
71
- {operation.responses.map((response) => (
72
- <TabsContent
73
- value={response.statusCode + response.description}
74
- key={response.statusCode}
75
- >
76
- <SchemaListView
77
- schema={response.content?.at(0)?.schema}
78
- name=""
79
- />
80
- </TabsContent>
81
- ))}
82
- </ul>
83
- </Tabs>
55
+ {operation.responses.length > 0 && (
56
+ <>
57
+ <Heading level={3} className="capitalize">
58
+ Responses
59
+ </Heading>
60
+ <Tabs defaultValue={`${first?.statusCode}${first?.description}`}>
61
+ <TabsList>
62
+ {operation.responses.map((response) => (
63
+ <TabsTrigger
64
+ value={response.statusCode + response.description}
65
+ key={response.statusCode}
66
+ title={response.description}
67
+ >
68
+ {response.statusCode}
69
+ </TabsTrigger>
70
+ ))}
71
+ </TabsList>
72
+ <ul className="list-none m-0 px-0 overflow-hidden">
73
+ {operation.responses.map((response) => (
74
+ <TabsContent
75
+ value={response.statusCode + response.description}
76
+ key={response.statusCode}
77
+ >
78
+ <SchemaListView
79
+ schema={response.content?.at(0)?.schema}
80
+ name=""
81
+ />
82
+ </TabsContent>
83
+ ))}
84
+ </ul>
85
+ </Tabs>
86
+ </>
87
+ )}
84
88
  </div>
85
89
 
86
90
  <Sidecar operation={operation} />
@@ -64,7 +64,7 @@ export const Sidecar = ({
64
64
  }) => {
65
65
  const methodTextColor =
66
66
  MethodTextColorMap[operation.method as keyof typeof MethodTextColorMap];
67
- const [option, setOption] = useState("curl");
67
+ const [option, setOption] = useState("shell");
68
68
  const requestBodyContent = operation.requestBody?.content;
69
69
 
70
70
  const path = operation.path.split("/").map((part) => (