@scalar/api-reference 1.32.0 → 1.32.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 (102) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +1 -1
  3. package/dist/browser/standalone.js +15732 -15435
  4. package/dist/browser/webpack-stats.json +1 -1
  5. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  6. package/dist/components/ApiReferenceLayout.vue.js +1 -1
  7. package/dist/components/ApiReferenceLayout.vue2.js +163 -158
  8. package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
  9. package/dist/components/Badge/Badge.vue.js +1 -1
  10. package/dist/components/Card/CardHeader.vue.d.ts.map +1 -1
  11. package/dist/components/Card/CardHeader.vue.js +2 -2
  12. package/dist/components/Card/CardTab.vue.d.ts.map +1 -1
  13. package/dist/components/Card/CardTab.vue.js +3 -3
  14. package/dist/components/Card/CardTabHeader.vue.d.ts.map +1 -1
  15. package/dist/components/Card/CardTabHeader.vue.js +2 -2
  16. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +1 -1
  17. package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +1 -1
  18. package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
  19. package/dist/components/Content/Lazy/Loading.vue.d.ts +1 -3
  20. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  21. package/dist/components/Content/Lazy/Loading.vue.js +92 -91
  22. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  23. package/dist/components/Content/Models/Models.vue.js +2 -2
  24. package/dist/components/Content/Models/Models.vue2.js +59 -56
  25. package/dist/components/Content/Schema/RenderString.vue.d.ts +6 -0
  26. package/dist/components/Content/Schema/RenderString.vue.d.ts.map +1 -0
  27. package/dist/components/Content/Schema/RenderString.vue.js +14 -0
  28. package/dist/components/Content/Schema/RenderString.vue2.js +4 -0
  29. package/dist/components/Content/Schema/Schema.vue.d.ts +1 -1
  30. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  31. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  32. package/dist/components/Content/Schema/Schema.vue2.js +76 -75
  33. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  34. package/dist/components/Content/Schema/SchemaComposition.vue.js +58 -66
  35. package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts +19 -0
  36. package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts.map +1 -0
  37. package/dist/components/Content/Schema/SchemaEnumValues.vue.js +7 -0
  38. package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +125 -0
  39. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +2 -2
  40. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  41. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  42. package/dist/components/Content/Schema/SchemaProperty.vue2.js +96 -170
  43. package/dist/components/Content/Schema/SchemaPropertyDescription.vue.d.ts +18 -0
  44. package/dist/components/Content/Schema/SchemaPropertyDescription.vue.d.ts.map +1 -0
  45. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  46. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  47. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +155 -160
  48. package/dist/components/Content/Schema/helpers/get-schema-type.d.ts +6 -0
  49. package/dist/components/Content/Schema/helpers/get-schema-type.d.ts.map +1 -0
  50. package/dist/components/Content/Schema/helpers/get-schema-type.js +20 -0
  51. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +1 -1
  52. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
  53. package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
  54. package/dist/components/Content/Schema/helpers/schema-name.js +20 -46
  55. package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
  56. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  57. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  58. package/dist/features/Operation/layouts/ModernLayout.vue2.js +13 -13
  59. package/dist/features/Search/SearchButton.vue.d.ts +1 -0
  60. package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
  61. package/dist/features/Search/SearchButton.vue.js +36 -34
  62. package/dist/features/Search/SearchModal.vue.d.ts +1 -0
  63. package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
  64. package/dist/features/Search/SearchModal.vue.js +1 -1
  65. package/dist/features/Search/SearchModal.vue2.js +112 -112
  66. package/dist/features/Search/useSearchIndex.d.ts +4 -3
  67. package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
  68. package/dist/features/Search/useSearchIndex.js +119 -82
  69. package/dist/features/api-client-modal/ApiClientModal.vue.d.ts +2 -2
  70. package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -1
  71. package/dist/features/api-client-modal/ApiClientModal.vue.js +47 -38
  72. package/dist/features/api-client-modal/useApiClient.d.ts +334 -334
  73. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  74. package/dist/features/base-url/BaseUrl.vue.js +1 -1
  75. package/dist/features/example-responses/ExampleResponse.vue.js +3 -3
  76. package/dist/features/example-responses/ExampleResponse.vue2.js +7 -7
  77. package/dist/features/example-responses/ExampleResponses.vue.d.ts +1 -1
  78. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  79. package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
  80. package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +1 -1
  81. package/dist/features/sidebar/components/SidebarElement.vue.js +1 -1
  82. package/dist/features/sidebar/components/SidebarElement.vue2.js +23 -21
  83. package/dist/features/sidebar/components/SidebarHttpBadge.vue.d.ts.map +1 -1
  84. package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +2 -2
  85. package/dist/features/sidebar/components/SidebarHttpBadge.vue2.js +5 -6
  86. package/dist/features/test-request-button/TestRequestButton.vue.js +2 -2
  87. package/dist/features/traverse-schema/helpers/traverse-tags.js +26 -26
  88. package/dist/features/traverse-schema/index.d.ts +1 -1
  89. package/dist/features/traverse-schema/index.d.ts.map +1 -1
  90. package/dist/index.js +1 -1
  91. package/dist/libs/openapi.d.ts +15 -1
  92. package/dist/libs/openapi.d.ts.map +1 -1
  93. package/dist/libs/openapi.js +66 -47
  94. package/dist/standalone/lib/html-api.d.ts.map +1 -1
  95. package/dist/stores/useHttpClientStore.js +2 -2
  96. package/dist/style.css +1 -1
  97. package/dist/types.d.ts +3 -3
  98. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +2 -2
  99. package/package.json +18 -18
  100. package/dist/hooks/useOperation.d.ts +0 -16
  101. package/dist/hooks/useOperation.d.ts.map +0 -1
  102. package/dist/hooks/useOperation.js +0 -27
package/dist/types.d.ts CHANGED
@@ -11,7 +11,7 @@ export type ReferenceLayoutProps = {
11
11
  configuration: Partial<ApiReferenceConfiguration>;
12
12
  /**
13
13
  *
14
- * The OpenAPI 3.1 document, but all $refs are resolved already.
14
+ * The OpenAPI 3.1 document, but all $ref's are resolved already.
15
15
  *
16
16
  * @remark You need to add the `originalDocument`, too.
17
17
  *
@@ -24,12 +24,12 @@ export type ReferenceLayoutProps = {
24
24
  */
25
25
  dereferencedDocument?: OpenAPIV3_1.Document;
26
26
  /**
27
- * The raw OpenAPI document. Doesnt have to be OpenAPI 3.1.
27
+ * The raw OpenAPI document. Doesn't have to be OpenAPI 3.1.
28
28
  */
29
29
  originalDocument?: string;
30
30
  isDark: boolean;
31
31
  /**
32
- * @deprecated We cant use this anymore. Use `dereferencedDocument` instead.
32
+ * @deprecated We can't use this anymore. Use `dereferencedDocument` instead.
33
33
  */
34
34
  parsedSpec?: Spec;
35
35
  /**
@@ -125,10 +125,10 @@ declare function __VLS_template(): {
125
125
  };
126
126
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
127
127
  declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
128
- "update:selectedClient": (id: "c/libcurl" | "clojure/clj_http" | "csharp/httpclient" | "csharp/restsharp" | "go/native" | "http/http1.1" | "java/asynchttp" | "java/nethttp" | "java/okhttp" | "java/unirest" | "js/axios" | "js/fetch" | "js/jquery" | "js/ofetch" | "js/xhr" | "kotlin/okhttp" | "node/axios" | "node/fetch" | "node/ofetch" | "node/undici" | "objc/nsurlsession" | "ocaml/cohttp" | "php/curl" | "php/guzzle" | "powershell/restmethod" | "powershell/webrequest" | "python/python3" | "python/requests" | "python/httpx_sync" | "python/httpx_async" | "r/httr" | "ruby/native" | "shell/curl" | "shell/httpie" | "shell/wget" | "swift/nsurlsession" | "dart/http") => any;
128
+ "update:selectedClient": (id: "c/libcurl" | "clojure/clj_http" | "csharp/httpclient" | "csharp/restsharp" | "dart/http" | "go/native" | "http/http1.1" | "java/asynchttp" | "java/nethttp" | "java/okhttp" | "java/unirest" | "js/axios" | "js/fetch" | "js/jquery" | "js/ofetch" | "js/xhr" | "kotlin/okhttp" | "node/axios" | "node/fetch" | "node/ofetch" | "node/undici" | "objc/nsurlsession" | "ocaml/cohttp" | "php/curl" | "php/guzzle" | "powershell/restmethod" | "powershell/webrequest" | "python/python3" | "python/requests" | "python/httpx_sync" | "python/httpx_async" | "r/httr" | "ruby/native" | "rust/reqwest" | "shell/curl" | "shell/httpie" | "shell/wget" | "swift/nsurlsession") => any;
129
129
  "update:selectedExample": (name: string) => any;
130
130
  }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
131
- "onUpdate:selectedClient"?: ((id: "c/libcurl" | "clojure/clj_http" | "csharp/httpclient" | "csharp/restsharp" | "go/native" | "http/http1.1" | "java/asynchttp" | "java/nethttp" | "java/okhttp" | "java/unirest" | "js/axios" | "js/fetch" | "js/jquery" | "js/ofetch" | "js/xhr" | "kotlin/okhttp" | "node/axios" | "node/fetch" | "node/ofetch" | "node/undici" | "objc/nsurlsession" | "ocaml/cohttp" | "php/curl" | "php/guzzle" | "powershell/restmethod" | "powershell/webrequest" | "python/python3" | "python/requests" | "python/httpx_sync" | "python/httpx_async" | "r/httr" | "ruby/native" | "shell/curl" | "shell/httpie" | "shell/wget" | "swift/nsurlsession" | "dart/http") => any) | undefined;
131
+ "onUpdate:selectedClient"?: ((id: "c/libcurl" | "clojure/clj_http" | "csharp/httpclient" | "csharp/restsharp" | "dart/http" | "go/native" | "http/http1.1" | "java/asynchttp" | "java/nethttp" | "java/okhttp" | "java/unirest" | "js/axios" | "js/fetch" | "js/jquery" | "js/ofetch" | "js/xhr" | "kotlin/okhttp" | "node/axios" | "node/fetch" | "node/ofetch" | "node/undici" | "objc/nsurlsession" | "ocaml/cohttp" | "php/curl" | "php/guzzle" | "powershell/restmethod" | "powershell/webrequest" | "python/python3" | "python/requests" | "python/httpx_sync" | "python/httpx_async" | "r/httr" | "ruby/native" | "rust/reqwest" | "shell/curl" | "shell/httpie" | "shell/wget" | "swift/nsurlsession") => any) | undefined;
132
132
  "onUpdate:selectedExample"?: ((name: string) => any) | undefined;
133
133
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
134
134
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "vue",
21
21
  "vue3"
22
22
  ],
23
- "version": "1.32.0",
23
+ "version": "1.32.4",
24
24
  "engines": {
25
25
  "node": ">=20"
26
26
  },
@@ -54,20 +54,20 @@
54
54
  "nanoid": "5.1.5",
55
55
  "vue": "^3.5.12",
56
56
  "zod": "3.24.1",
57
- "@scalar/api-client": "2.5.13",
58
- "@scalar/code-highlight": "0.1.4",
59
- "@scalar/components": "0.14.14",
60
- "@scalar/helpers": "0.0.5",
61
- "@scalar/icons": "0.4.5",
62
- "@scalar/oas-utils": "0.4.9",
63
- "@scalar/openapi-parser": "0.18.0",
64
- "@scalar/openapi-types": "0.3.4",
65
- "@scalar/snippetz": "0.3.1",
66
- "@scalar/types": "0.2.5",
67
- "@scalar/themes": "0.13.6",
68
- "@scalar/use-hooks": "0.2.3",
57
+ "@scalar/api-client": "2.5.15",
58
+ "@scalar/code-highlight": "0.1.5",
59
+ "@scalar/oas-utils": "0.4.11",
60
+ "@scalar/helpers": "0.0.6",
61
+ "@scalar/openapi-parser": "0.18.1",
62
+ "@scalar/components": "0.14.16",
63
+ "@scalar/openapi-types": "0.3.5",
64
+ "@scalar/icons": "0.4.6",
65
+ "@scalar/snippetz": "0.4.0",
66
+ "@scalar/themes": "0.13.8",
67
+ "@scalar/types": "0.2.7",
68
+ "@scalar/use-hooks": "0.2.4",
69
69
  "@scalar/use-toasts": "0.8.0",
70
- "@scalar/workspace-store": "0.7.0"
70
+ "@scalar/workspace-store": "0.8.0"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@tailwindcss/vite": "^4.1.7",
@@ -83,10 +83,10 @@
83
83
  "vite": "5.4.19",
84
84
  "vite-plugin-banner": "^0.7.1",
85
85
  "vite-plugin-css-injected-by-js": "^3.4.0",
86
- "vitest": "^1.6.0",
87
- "@scalar/galaxy": "0.5.1",
88
- "@scalar/build-tooling": "0.2.3",
89
- "@scalar/react-renderer": "0.2.0"
86
+ "vitest": "^1.6.1",
87
+ "@scalar/build-tooling": "0.2.4",
88
+ "@scalar/galaxy": "0.5.3",
89
+ "@scalar/react-renderer": "0.2.1"
90
90
  },
91
91
  "scripts": {
92
92
  "build": "pnpm build:default && pnpm build:standalone && pnpm types:build && tsc-alias -p tsconfig.build.json",
@@ -1,16 +0,0 @@
1
- import type { OpenAPIV3_1, TransformedOperation } from '@scalar/types/legacy';
2
- export type ParamMap = {
3
- path: OpenAPIV3_1.ParameterObject[];
4
- query: OpenAPIV3_1.ParameterObject[];
5
- header: OpenAPIV3_1.ParameterObject[];
6
- cookie: OpenAPIV3_1.ParameterObject[];
7
- body: OpenAPIV3_1.ParameterObject[];
8
- formData: OpenAPIV3_1.ParameterObject[];
9
- };
10
- /**
11
- * This hook is used to generate the parameters for the request from the parameters in the swagger file
12
- */
13
- export declare function useOperation(operation: TransformedOperation): {
14
- parameterMap: import("vue").ComputedRef<ParamMap>;
15
- };
16
- //# sourceMappingURL=useOperation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useOperation.d.ts","sourceRoot":"","sources":["../../src/hooks/useOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAI7E,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;IACnC,KAAK,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;IACpC,MAAM,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;IACrC,MAAM,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;IACrC,IAAI,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;IACnC,QAAQ,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;CACxC,CAAA;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,oBAAoB;;EA2D3D"}
@@ -1,27 +0,0 @@
1
- import { isDereferenced as u } from "@scalar/openapi-types/helpers";
2
- import { computed as n } from "vue";
3
- function l(s) {
4
- return {
5
- parameterMap: n(() => {
6
- var h;
7
- const o = {
8
- path: [],
9
- query: [],
10
- header: [],
11
- cookie: [],
12
- body: [],
13
- formData: []
14
- };
15
- s.pathParameters && s.pathParameters.forEach((i) => {
16
- i.in === "path" ? o.path.push(i) : i.in === "query" ? o.query.push(i) : i.in === "header" ? o.header.push(i) : i.in === "cookie" ? o.cookie.push(i) : i.in === "body" ? o.body.push(i) : i.in === "formData" && o.formData.push(i);
17
- });
18
- const f = ((h = s.information) == null ? void 0 : h.parameters) ?? [];
19
- return f && f.forEach((i) => {
20
- u(i) && (i.in === "path" ? o.path.push(i) : i.in === "query" ? o.query.push(i) : i.in === "header" ? o.header.push(i) : i.in === "cookie" ? o.cookie.push(i) : i.in === "body" ? o.body.push(i) : i.in === "formData" && o.formData.push(i));
21
- }), o;
22
- })
23
- };
24
- }
25
- export {
26
- l as useOperation
27
- };