zudoku 0.35.1 → 0.35.2

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.
@@ -5,7 +5,7 @@ import "./chunk-HA7DTUK3-ZGg2W6yV.js";
5
5
  import "./hook-CfCFKZ-2.js";
6
6
  import "./ui/Button.js";
7
7
  import "./joinUrl-10po2Jdj.js";
8
- import { U as n, o as s } from "./index-OD2IZ2Nn.js";
8
+ import { U as n, o as s } from "./index-C7TIhpXK.js";
9
9
  export {
10
10
  n as UNTAGGED_PATH,
11
11
  s as openApiPlugin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zudoku",
3
- "version": "0.35.1",
3
+ "version": "0.35.2",
4
4
  "type": "module",
5
5
  "homepage": "https://zudoku.dev",
6
6
  "repository": {
@@ -131,7 +131,7 @@ export const OperationList = ({
131
131
  tag?: string;
132
132
  untagged?: boolean;
133
133
  }) => {
134
- const { input, type, versions, version } = useOasConfig();
134
+ const { input, type, versions, version, options } = useOasConfig();
135
135
  const query = useCreateQuery(AllOperationsQuery, {
136
136
  input,
137
137
  type,
@@ -164,7 +164,11 @@ export const OperationList = ({
164
164
  ? sanitizeMarkdownForMetatag(description)
165
165
  : undefined;
166
166
 
167
- const showVersions = Object.entries(versions).length > 1;
167
+ const hasMultipleVersions = Object.entries(versions).length > 1;
168
+
169
+ const showVersions =
170
+ options?.showVersionSelect === "always" ||
171
+ (hasMultipleVersions && options?.showVersionSelect !== "hide");
168
172
 
169
173
  return (
170
174
  <div
@@ -203,6 +207,7 @@ export const OperationList = ({
203
207
  <Select
204
208
  onValueChange={(version) => navigate(versions[version]!)}
205
209
  defaultValue={version}
210
+ disabled={!hasMultipleVersions}
206
211
  >
207
212
  <SelectTrigger className="w-[180px]">
208
213
  <SelectValue placeholder="Select version" />
@@ -19,6 +19,7 @@ type BaseOasConfig = {
19
19
  examplesLanguage?: string;
20
20
  disablePlayground?: boolean;
21
21
  loadTags?: boolean;
22
+ showVersionSelect?: "always" | "if-available" | "hide";
22
23
  };
23
24
  };
24
25