@scalar/types 0.3.2 → 0.4.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @scalar/types
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#7129](https://github.com/scalar/scalar/pull/7129) [`6ec8c29`](https://github.com/scalar/scalar/commit/6ec8c299d912111b029e8058979d00968b70691a) Thanks [@geoffgscott](https://github.com/geoffgscott)! - Simplify ApiReferences state management and migrate to new shared sidebar component. Eliminates the useSidebar and useNav hooks in favour of event bubbling and centralized state management in ApiReference.vue
8
+
9
+ ### Patch Changes
10
+
11
+ - [#7086](https://github.com/scalar/scalar/pull/7086) [`eb022f2`](https://github.com/scalar/scalar/commit/eb022f2c8f93c84a04c0093fefe8a1e05d6ec80d) Thanks [@hanspagel](https://github.com/hanspagel)! - feat: new `content.end` slot for the plugin API
12
+
13
+ - [#7094](https://github.com/scalar/scalar/pull/7094) [`eba18d0`](https://github.com/scalar/scalar/commit/eba18d06267a163a8f91396a66f817100ee59461) Thanks [@geoffgscott](https://github.com/geoffgscott)! - Migrate to workspace store as primary source of truth.
14
+
15
+ - Updated dependencies [[`2239843`](https://github.com/scalar/scalar/commit/2239843150ed16d1ca35b0b1f8e90cd3e35be7ce)]:
16
+ - @scalar/openapi-types@0.5.1
17
+
3
18
  ## 0.3.2
4
19
 
5
20
  ### Patch Changes
@@ -109,6 +109,7 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
109
109
  }, z.core.$strip>>;
110
110
  }, z.core.$strip>>>>;
111
111
  telemetry: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
112
+ default: z.ZodCatch<z.ZodOptional<z.ZodDefault<z.ZodBoolean>>>;
112
113
  url: z.ZodOptional<z.ZodString>;
113
114
  content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>]>>;
114
115
  title: z.ZodOptional<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"api-client-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-client-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAKxB,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAkE,CAAA;AAE3G,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA"}
1
+ {"version":3,"file":"api-client-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-client-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAKxB,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAkE,CAAA;AAE3G,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA"}
@@ -112,6 +112,13 @@ export declare const apiReferenceConfigurationSchema: z.ZodObject<{
112
112
  component: z.ZodUnknown;
113
113
  renderer: z.ZodOptional<z.ZodUnknown>;
114
114
  }, z.core.$strip>>;
115
+ views: z.ZodOptional<z.ZodObject<{
116
+ 'content.end': z.ZodOptional<z.ZodArray<z.ZodObject<{
117
+ component: z.ZodUnknown;
118
+ renderer: z.ZodOptional<z.ZodUnknown>;
119
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
120
+ }, z.core.$strip>>>;
121
+ }, z.core.$strip>>;
115
122
  }, z.core.$strip>>>>;
116
123
  isEditable: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
117
124
  isLoading: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
@@ -144,7 +151,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodObject<{
144
151
  onSpecUpdate: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodString], null>, z.ZodVoid>>;
145
152
  onServerChange: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodString], null>, z.ZodVoid>>;
146
153
  onDocumentSelect: z.ZodType<(() => Promise<void> | void) | undefined>;
147
- onLoaded: z.ZodType<(() => Promise<void> | void) | undefined>;
154
+ onLoaded: z.ZodType<((slug: string) => Promise<void> | void) | undefined>;
148
155
  onBeforeRequest: z.ZodType<((a: {
149
156
  request: Request;
150
157
  }) => Promise<void> | void) | undefined>;
@@ -183,16 +190,22 @@ export declare const apiReferenceConfigurationSchema: z.ZodObject<{
183
190
  orderRequiredPropertiesFirst: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
184
191
  }, z.core.$strip>;
185
192
  /**
186
- * Configuration for the Scalar Api Reference integrations
193
+ * Pure configuration without the sources
187
194
  *
188
- * See the type `ApiReferenceConfigurationWithSource` or `AnyApiReferenceConfiguration`\
189
- * for the configuration that includes the sources for you OpenAPI documents
195
+ * @deprecated Remove this once the types have been fully migrated
190
196
  */
191
- export type ApiReferenceConfiguration = Omit<z.infer<typeof apiReferenceConfigurationSchema>, // Remove deprecated attributes
197
+ export type ApiReferenceConfigurationRaw = Omit<z.infer<typeof apiReferenceConfigurationSchema>, // Remove deprecated attributes
192
198
  // Remove deprecated attributes
193
199
  'proxy' | 'spec' | 'authentication'> & {
194
200
  authentication?: AuthenticationConfiguration;
195
- } & {
201
+ };
202
+ /**
203
+ * Configuration for the Scalar Api Reference integrations
204
+ *
205
+ * See the type `ApiReferenceConfigurationWithSource` or `AnyApiReferenceConfiguration`\
206
+ * for the configuration that includes the sources for you OpenAPI documents
207
+ */
208
+ export type ApiReferenceConfiguration = ApiReferenceConfigurationRaw & {
196
209
  /** @deprecated
197
210
  * This type now refers to the base configuration that does not include the sources.
198
211
  * Use the type `ApiReferenceConfigurationWithSource` instead.
@@ -213,25 +226,15 @@ export declare const apiReferenceConfigurationWithSourceSchema: ZodType<Omit<Api
213
226
  export type ApiReferenceConfigurationWithSource = Omit<z.infer<typeof apiReferenceConfigurationWithSourceSchema>, 'proxy' | 'spec' | 'authentication'> & {
214
227
  authentication?: AuthenticationConfiguration;
215
228
  };
216
- /**
217
- * When providing an array of configurations we extend with the default attribute
218
- * which indicates which configuration should be used as the default one
219
- */
220
- export type ApiReferenceConfigurationWithDefault = ApiReferenceConfigurationWithSource & {
221
- /** Whether to use this config as the default one */
222
- default?: boolean;
223
- };
224
229
  /**
225
230
  * Configuration for a single config with multiple sources
226
231
  * The configuration will be shared between the documents
227
232
  */
228
233
  export type ApiReferenceConfigurationWithMultipleSources = ApiReferenceConfigurationWithSource & {
229
- sources: (SourceConfiguration & {
230
- default?: boolean;
231
- })[];
234
+ sources: SourceConfiguration[];
232
235
  };
233
236
  /** Configuration for multiple Api References */
234
- export type AnyApiReferenceConfiguration = Partial<ApiReferenceConfigurationWithSource> | Partial<ApiReferenceConfigurationWithMultipleSources> | Partial<ApiReferenceConfigurationWithDefault>[] | Partial<ApiReferenceConfigurationWithMultipleSources>[];
237
+ export type AnyApiReferenceConfiguration = Partial<ApiReferenceConfigurationWithSource> | Partial<ApiReferenceConfigurationWithMultipleSources> | Partial<ApiReferenceConfigurationWithSource>[] | Partial<ApiReferenceConfigurationWithMultipleSources>[];
235
238
  /** Typeguard to check to narrow the configs to the one with sources */
236
239
  export declare const isConfigurationWithSources: (config: AnyApiReferenceConfiguration) => config is Partial<ApiReferenceConfigurationWithMultipleSources>;
237
240
  //# sourceMappingURL=api-reference-configuration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AAE,mBAAmB,EAAE,CAAA;CAC/B,CAAA;AAED,gDAAgD;AAChD,MAAM,MAAM,4BAA4B,GACpC,OAAO,CAAC,mCAAmC,CAAC,GAC5C,OAAO,CAAC,4CAA4C,CAAC,GACrD,OAAO,CAAC,mCAAmC,CAAC,EAAE,GAC9C,OAAO,CAAC,4CAA4C,CAAC,EAAE,CAAA;AAE3D,uEAAuE;AACvE,eAAO,MAAM,0BAA0B,GACrC,QAAQ,4BAA4B,KACnC,MAAM,IAAI,OAAO,CAAC,4CAA4C,CACkC,CAAA"}
@@ -116,11 +116,7 @@ const apiReferenceConfigurationSchema = baseConfigurationSchema.extend({
116
116
  // output: z.union([z.void(), z.promise(z.void())]),
117
117
  }).optional(),
118
118
  /** Callback fired when the reference is fully loaded */
119
- onLoaded: z.function({
120
- input: []
121
- // Why no output? https://github.com/scalar/scalar/pull/7047
122
- // output: z.union([z.void(), z.promise(z.void())]),
123
- }).optional(),
119
+ onLoaded: z.function().optional(),
124
120
  /** onBeforeRequest is fired before the request is sent. You can modify the request here. */
125
121
  onBeforeRequest: z.function({
126
122
  input: [z.object({ request: z.instanceof(Request) })]
@@ -217,7 +213,7 @@ const apiReferenceConfigurationSchema = baseConfigurationSchema.extend({
217
213
  output: z.string()
218
214
  }).optional(),
219
215
  /**
220
- * To handle redirects, pass a function that will recieve:
216
+ * To handle redirects, pass a function that will receive:
221
217
  * - The current path with hash if pathRouting is enabled
222
218
  * - The current hash if hashRouting (default)
223
219
  * And then passes that to history.replaceState
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/api-reference/api-reference-configuration.ts"],
4
- "sourcesContent": ["import { type ZodType, z } from 'zod'\n\nimport type { TargetId } from '../snippetz'\nimport { apiReferencePluginSchema } from './api-reference-plugin'\nimport type { AuthenticationConfiguration } from './authentication-configuration'\nimport { NEW_PROXY_URL, OLD_PROXY_URL, baseConfigurationSchema } from './base-configuration'\nimport { type SourceConfiguration, sourceConfigurationSchema } from './source-configuration'\n\n// Zod Schemas don't work well with async functions, so we use a custom type instead.\nconst fetchLikeSchema = z.custom<(input: string | URL | Request, init?: RequestInit) => Promise<Response>>()\n\n/**\n * Standard configuration for the Api Reference.\n *\n * This is used internally to the configure the applications and does not include the sources.\n *\n * Sources should only be specified in the user facing configurations.\n *\n * In the the future it is likely sources will be removed completely from the configuration and instead\n * specified through a separate addDocument interface.\n */\nexport const apiReferenceConfigurationSchema = baseConfigurationSchema.extend({\n /**\n * The layout to use for the references\n * @default 'modern'\n */\n layout: z.enum(['modern', 'classic']).optional().default('modern').catch('modern'),\n /**\n * URL to a request proxy for the API client\n * @deprecated Use proxyUrl instead\n */\n proxy: z.string().optional(),\n /**\n * Custom fetch function for custom logic\n *\n * Can be used to add custom headers, handle auth, etc.\n */\n fetch: fetchLikeSchema.optional(),\n /**\n * Plugins for the API reference\n */\n plugins: z.array(apiReferencePluginSchema).optional(),\n /**\n * Allows the user to inject an editor for the spec\n * @default false\n */\n isEditable: z.boolean().optional().default(false).catch(false),\n /**\n * Controls whether the references show a loading state in the intro\n * @default false\n */\n isLoading: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to show models in the sidebar, search, and content.\n * @default false\n */\n hideModels: z.boolean().optional().default(false).catch(false),\n /**\n * Sets the file type of the document to download, set to `none` to hide the download button\n * @default 'both'\n */\n documentDownloadType: z.enum(['yaml', 'json', 'both', 'direct', 'none']).optional().default('both').catch('both'),\n /**\n * Whether to show the \"Download OpenAPI Document\" button\n * @default false\n * @deprecated Use `documentDownloadType: 'none'` instead\n */\n hideDownloadButton: z.boolean().optional(),\n /**\n * Whether to show the \"Test Request\" button\n * @default false\n */\n hideTestRequestButton: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to show the sidebar search bar\n * @default false\n */\n hideSearch: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to show the operationId\n *\n * @default false\n */\n showOperationId: z.boolean().optional().default(false).catch(false),\n /** Whether dark mode is on or off initially (light mode) */\n darkMode: z.boolean().optional(),\n /** forceDarkModeState makes it always this state no matter what */\n forceDarkModeState: z.enum(['dark', 'light']).optional(),\n /**\n * Whether to show the dark mode toggle\n * @default false\n */\n hideDarkModeToggle: z.boolean().optional().default(false).catch(false),\n /**\n * If used, passed data will be added to the HTML header\n * @see https://unhead.unjs.io/usage/composables/use-seo-meta\n */\n metaData: z.any().optional(), // Using any for UseSeoMetaInput since it's an external type\n /**\n * Path to a favicon image\n * @default undefined\n * @example '/favicon.svg'\n */\n favicon: z.string().optional(),\n /**\n * List of httpsnippet clients to hide from the clients menu\n * By default hides Unirest, pass `[]` to show all clients\n */\n hiddenClients: z\n .union([z.record(z.string(), z.union([z.boolean(), z.array(z.string())])), z.array(z.string()), z.literal(true)])\n .optional(),\n /** Determine the HTTP client that's selected by default */\n defaultHttpClient: z\n .object({\n targetKey: z.custom<TargetId>(),\n clientKey: z.string(),\n })\n .optional(),\n /** Custom CSS to be added to the page */\n customCss: z.string().optional(),\n /** onSpecUpdate is fired on spec/swagger content change */\n onSpecUpdate: z\n .function({\n input: [z.string()],\n output: z.void(),\n })\n .optional(),\n /** onServerChange is fired on selected server change */\n onServerChange: z\n .function({\n input: [z.string()],\n output: z.void(),\n })\n .optional(),\n /** onDocumentSelect is fired when the config is selected */\n onDocumentSelect: z\n .function({\n input: [],\n // Why no output? https://github.com/scalar/scalar/pull/7047\n // output: z.union([z.void(), z.promise(z.void())]),\n })\n .optional() as z.ZodType<(() => Promise<void> | void) | undefined>,\n /** Callback fired when the reference is fully loaded */\n onLoaded: z\n .function({\n input: [],\n // Why no output? https://github.com/scalar/scalar/pull/7047\n // output: z.union([z.void(), z.promise(z.void())]),\n })\n .optional() as z.ZodType<(() => Promise<void> | void) | undefined>,\n /** onBeforeRequest is fired before the request is sent. You can modify the request here. */\n onBeforeRequest: z\n .function({\n input: [z.object({ request: z.instanceof(Request) })],\n // Why no output? https://github.com/scalar/scalar/pull/7047\n // output: z.union([z.void(), z.promise(z.void())]),\n })\n .optional() as z.ZodType<((a: { request: Request }) => Promise<void> | void) | undefined>,\n /**\n * onShowMore is fired when the user clicks the \"Show more\" button on the references\n * @param tagId - The ID of the tag that was clicked\n */\n onShowMore: z\n .function({\n input: [z.string()],\n // Why no output? https://github.com/scalar/scalar/pull/7047\n // output: z.union([z.void(), z.promise(z.void())]),\n })\n .optional() as z.ZodType<((a: string) => Promise<void> | void) | undefined>,\n /**\n * onSidebarClick is fired when the user clicks on a sidebar item\n * @param href - The href of the sidebar item that was clicked\n */\n onSidebarClick: z\n .function({\n input: [z.string()],\n // Why no output? https://github.com/scalar/scalar/pull/7047\n // output: z.union([z.void(), z.promise(z.void())]),\n })\n .optional() as z.ZodType<((a: string) => Promise<void> | void) | undefined>,\n /**\n * Route using paths instead of hashes, your server MUST support this\n * @example '/standalone-api-reference/:custom(.*)?'\n * @experimental\n * @default undefined\n */\n pathRouting: z\n .object({\n basePath: z.string(),\n })\n .optional(),\n /**\n * Customize the heading portion of the hash\n * @param heading - The heading object\n * @returns A string ID used to generate the URL hash\n * @default (heading) => `#description/${heading.slug}`\n */\n generateHeadingSlug: z\n .function({\n input: [z.object({ slug: z.string().default('headingSlug') })],\n output: z.string(),\n })\n .optional(),\n /**\n * Customize the model portion of the hash\n * @param model - The model object with a name property\n * @returns A string ID used to generate the URL hash\n * @default (model) => slug(model.name)\n */\n generateModelSlug: z\n .function({\n input: [z.object({ name: z.string().default('modelName') })],\n output: z.string(),\n })\n .optional(),\n /**\n * Customize the tag portion of the hash\n * @param tag - The tag object\n * @returns A string ID used to generate the URL hash\n * @default (tag) => slug(tag.name)\n */\n generateTagSlug: z\n .function({\n input: [z.object({ name: z.string().default('tagName') })],\n output: z.string(),\n })\n .optional(),\n /**\n * Customize the operation portion of the hash\n * @param operation - The operation object\n * @returns A string ID used to generate the URL hash\n * @default (operation) => `${operation.method}${operation.path}`\n */\n generateOperationSlug: z\n .function({\n input: [\n z.object({\n path: z.string(),\n operationId: z.string().optional(),\n method: z.string(),\n summary: z.string().optional(),\n }),\n ],\n output: z.string(),\n })\n .optional(),\n /**\n * Customize the webhook portion of the hash\n * @param webhook - The webhook object\n * @returns A string ID used to generate the URL hash\n * @default (webhook) => slug(webhook.name)\n */\n generateWebhookSlug: z\n .function({\n input: [\n z.object({\n name: z.string(),\n method: z.string().optional(),\n }),\n ],\n output: z.string(),\n })\n .optional(),\n /**\n * To handle redirects, pass a function that will recieve:\n * - The current path with hash if pathRouting is enabled\n * - The current hash if hashRouting (default)\n * And then passes that to history.replaceState\n *\n * @example hashRouting (default)\n * ```ts\n * redirect: (hash: string) => hash.replace('#v1/old-path', '#v2/new-path')\n * ```\n * @example pathRouting\n * ```ts\n * redirect: (pathWithHash: string) => {\n * if (pathWithHash.includes('#')) {\n * return pathWithHash.replace('/v1/tags/user#operation/get-user', '/v1/tags/user/operation/get-user')\n * }\n * return null\n * }\n * ```\n */\n redirect: z\n .function({\n input: [z.string()],\n output: z.string().nullable().optional(),\n })\n .optional(),\n /**\n * Whether to include default fonts\n * @default true\n */\n withDefaultFonts: z.boolean().optional().default(true).catch(true),\n /**\n * Whether to expand all tags by default\n *\n * Warning this can cause performance issues on big documents\n * @default false\n */\n defaultOpenAllTags: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to expand all models by default\n *\n * Warning this can cause performance issues on big documents\n * @default false\n */\n expandAllModelSections: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to expand all responses by default\n *\n * Warning this can cause performance issues on big documents\n * @default false\n */\n expandAllResponses: z.boolean().optional().default(false).catch(false),\n /**\n * Function to sort tags\n * @default 'alpha' for alphabetical sorting\n */\n tagsSorter: z\n .union([\n z.literal('alpha'),\n z.function({\n input: [z.any(), z.any()],\n output: z.number(),\n }),\n ])\n .optional(),\n /**\n * Function to sort operations\n * @default 'alpha' for alphabetical sorting\n */\n operationsSorter: z\n .union([\n z.literal('alpha'),\n z.literal('method'),\n z.function({\n input: [z.any(), z.any()],\n output: z.number(),\n }),\n ])\n .optional(),\n /**\n * Order the schema properties by\n * @default 'alpha' for alphabetical sorting\n */\n orderSchemaPropertiesBy: z\n .union([z.literal('alpha'), z.literal('preserve')])\n .optional()\n .default('alpha')\n .catch('alpha'),\n /**\n * Sort the schema properties by required ones first\n * @default true\n */\n orderRequiredPropertiesFirst: z.boolean().optional().default(true).catch(true),\n})\n\n/**\n * Configuration for the Scalar Api Reference integrations\n *\n * See the type `ApiReferenceConfigurationWithSource` or `AnyApiReferenceConfiguration`\\\n * for the configuration that includes the sources for you OpenAPI documents\n */\nexport type ApiReferenceConfiguration = Omit<\n z.infer<typeof apiReferenceConfigurationSchema>, // Remove deprecated attributes\n 'proxy' | 'spec' | 'authentication'\n> & {\n authentication?: AuthenticationConfiguration\n} & {\n /** @deprecated\n * This type now refers to the base configuration that does not include the sources.\n * Use the type `ApiReferenceConfigurationWithSource` instead.\n */\n url?: SourceConfiguration['url']\n /** @deprecated\n * This type now refers to the base configuration that does not include the sources.\n * Use the type `ApiReferenceConfigurationWithSource` instead.\n */\n content?: SourceConfiguration['content']\n}\n\n/** Migrate the configuration through a transform */\n// const migrateConfiguration = <T extends z.infer<typeof _apiReferenceConfigurationSchema>>\n\n/** Configuration for the Api Reference */\nexport const apiReferenceConfigurationWithSourceSchema: ZodType<\n Omit<ApiReferenceConfiguration, 'url' | 'content'> & SourceConfiguration\n> = apiReferenceConfigurationSchema.extend(sourceConfigurationSchema.shape).transform((configuration) => {\n // Migrate hideDownloadButton to documentDownloadType\n if (configuration.hideDownloadButton) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'hideDownloadButton' attribute. Use 'documentDownloadType: 'none'' instead.`,\n )\n\n configuration.documentDownloadType = 'none'\n }\n\n // Remove the spec prefix\n if (configuration.spec?.url) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'spec.url' attribute. Remove the spec prefix and move the 'url' attribute to the top level.`,\n )\n\n configuration.url = configuration.spec.url\n delete configuration.spec\n }\n\n if (configuration.spec?.content) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'spec.content' attribute. Remove the spec prefix and move the 'content' attribute to the top level.`,\n )\n\n configuration.content = configuration.spec.content\n delete configuration.spec\n }\n\n // Migrate proxy URL\n if (configuration.proxy) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'proxy' attribute, rename it to 'proxyUrl' or update the package.`,\n )\n\n if (!configuration.proxyUrl) {\n configuration.proxyUrl = configuration.proxy\n }\n\n delete configuration.proxy\n }\n\n if (configuration.proxyUrl === OLD_PROXY_URL) {\n console.warn(`[DEPRECATED] Warning: configuration.proxyUrl points to our old proxy (${OLD_PROXY_URL}).`)\n console.warn(`[DEPRECATED] We are overwriting the value and use the new proxy URL (${NEW_PROXY_URL}) instead.`)\n console.warn(\n `[DEPRECATED] Action Required: You should manually update your configuration to use the new URL (${NEW_PROXY_URL}). Read more: https://github.com/scalar/scalar`,\n )\n\n configuration.proxyUrl = NEW_PROXY_URL\n }\n\n return configuration\n})\n\n/**\n * User facing configuration that includes the document source configuration\n */\nexport type ApiReferenceConfigurationWithSource = Omit<\n z.infer<typeof apiReferenceConfigurationWithSourceSchema>,\n // Remove deprecated attributes\n 'proxy' | 'spec' | 'authentication'\n> & {\n authentication?: AuthenticationConfiguration\n}\n\n/**\n * When providing an array of configurations we extend with the default attribute\n * which indicates which configuration should be used as the default one\n */\nexport type ApiReferenceConfigurationWithDefault = ApiReferenceConfigurationWithSource & {\n /** Whether to use this config as the default one */\n default?: boolean\n}\n\n/**\n * Configuration for a single config with multiple sources\n * The configuration will be shared between the documents\n */\nexport type ApiReferenceConfigurationWithMultipleSources = ApiReferenceConfigurationWithSource & {\n sources: (SourceConfiguration & { default?: boolean })[]\n}\n\n/** Configuration for multiple Api References */\nexport type AnyApiReferenceConfiguration =\n | Partial<ApiReferenceConfigurationWithSource>\n | Partial<ApiReferenceConfigurationWithMultipleSources>\n | Partial<ApiReferenceConfigurationWithDefault>[]\n | Partial<ApiReferenceConfigurationWithMultipleSources>[]\n\n/** Typeguard to check to narrow the configs to the one with sources */\nexport const isConfigurationWithSources = (\n config: AnyApiReferenceConfiguration,\n): config is Partial<ApiReferenceConfigurationWithMultipleSources> =>\n Boolean(!Array.isArray(config) && config && 'sources' in config && Array.isArray(config.sources))\n"],
5
- "mappings": "AAAA,SAAuB,SAAS;AAGhC,SAAS,gCAAgC;AAEzC,SAAS,eAAe,eAAe,+BAA+B;AACtE,SAAmC,iCAAiC;AAGpE,MAAM,kBAAkB,EAAE,OAAiF;AAYpG,MAAM,kCAAkC,wBAAwB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAK5E,QAAQ,EAAE,KAAK,CAAC,UAAU,SAAS,CAAC,EAAE,SAAS,EAAE,QAAQ,QAAQ,EAAE,MAAM,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,EAKjF,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM3B,OAAO,gBAAgB,SAAS;AAAA;AAAA;AAAA;AAAA,EAIhC,SAAS,EAAE,MAAM,wBAAwB,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,EAKpD,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,KAAK,EAAE,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,EAK7D,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,KAAK,EAAE,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,EAK5D,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,KAAK,EAAE,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,EAK7D,sBAAsB,EAAE,KAAK,CAAC,QAAQ,QAAQ,QAAQ,UAAU,MAAM,CAAC,EAAE,SAAS,EAAE,QAAQ,MAAM,EAAE,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMhH,oBAAoB,EAAE,QAAQ,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,EAKzC,uBAAuB,EAAE,QAAQ,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,SAAS,EAAE,QAAQ,IAAI,EAAE,MAAM,IAAI;AAC/E,CAAC;AA8BM,MAAM,4CAET,gCAAgC,OAAO,0BAA0B,KAAK,EAAE,UAAU,CAAC,kBAAkB;AAEvG,MAAI,cAAc,oBAAoB;AACpC,YAAQ;AAAA,MACN;AAAA,IACF;AAEA,kBAAc,uBAAuB;AAAA,EACvC;AAGA,MAAI,cAAc,MAAM,KAAK;AAC3B,YAAQ;AAAA,MACN;AAAA,IACF;AAEA,kBAAc,MAAM,cAAc,KAAK;AACvC,WAAO,cAAc;AAAA,EACvB;AAEA,MAAI,cAAc,MAAM,SAAS;AAC/B,YAAQ;AAAA,MACN;AAAA,IACF;AAEA,kBAAc,UAAU,cAAc,KAAK;AAC3C,WAAO,cAAc;AAAA,EACvB;AAGA,MAAI,cAAc,OAAO;AACvB,YAAQ;AAAA,MACN;AAAA,IACF;AAEA,QAAI,CAAC,cAAc,UAAU;AAC3B,oBAAc,WAAW,cAAc;AAAA,IACzC;AAEA,WAAO,cAAc;AAAA,EACvB;AAEA,MAAI,cAAc,aAAa,eAAe;AAC5C,YAAQ,KAAK,yEAAyE,aAAa,IAAI;AACvG,YAAQ,KAAK,wEAAwE,aAAa,YAAY;AAC9G,YAAQ;AAAA,MACN,mGAAmG,aAAa;AAAA,IAClH;AAEA,kBAAc,WAAW;AAAA,EAC3B;AAEA,SAAO;AACT,CAAC;AAsCM,MAAM,6BAA6B,CACxC,WAEA,QAAQ,CAAC,MAAM,QAAQ,MAAM,KAAK,UAAU,aAAa,UAAU,MAAM,QAAQ,OAAO,OAAO,CAAC;",
4
+ "sourcesContent": ["import { type ZodType, z } from 'zod'\n\nimport type { TargetId } from '../snippetz'\nimport { apiReferencePluginSchema } from './api-reference-plugin'\nimport type { AuthenticationConfiguration } from './authentication-configuration'\nimport { NEW_PROXY_URL, OLD_PROXY_URL, baseConfigurationSchema } from './base-configuration'\nimport { type SourceConfiguration, sourceConfigurationSchema } from './source-configuration'\n\n// Zod Schemas don't work well with async functions, so we use a custom type instead.\nconst fetchLikeSchema = z.custom<(input: string | URL | Request, init?: RequestInit) => Promise<Response>>()\n\n/**\n * Standard configuration for the Api Reference.\n *\n * This is used internally to the configure the applications and does not include the sources.\n *\n * Sources should only be specified in the user facing configurations.\n *\n * In the the future it is likely sources will be removed completely from the configuration and instead\n * specified through a separate addDocument interface.\n */\nexport const apiReferenceConfigurationSchema = baseConfigurationSchema.extend({\n /**\n * The layout to use for the references\n * @default 'modern'\n */\n layout: z.enum(['modern', 'classic']).optional().default('modern').catch('modern'),\n /**\n * URL to a request proxy for the API client\n * @deprecated Use proxyUrl instead\n */\n proxy: z.string().optional(),\n /**\n * Custom fetch function for custom logic\n *\n * Can be used to add custom headers, handle auth, etc.\n */\n fetch: fetchLikeSchema.optional(),\n /**\n * Plugins for the API reference\n */\n plugins: z.array(apiReferencePluginSchema).optional(),\n /**\n * Allows the user to inject an editor for the spec\n * @default false\n */\n isEditable: z.boolean().optional().default(false).catch(false),\n /**\n * Controls whether the references show a loading state in the intro\n * @default false\n */\n isLoading: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to show models in the sidebar, search, and content.\n * @default false\n */\n hideModels: z.boolean().optional().default(false).catch(false),\n /**\n * Sets the file type of the document to download, set to `none` to hide the download button\n * @default 'both'\n */\n documentDownloadType: z.enum(['yaml', 'json', 'both', 'direct', 'none']).optional().default('both').catch('both'),\n /**\n * Whether to show the \"Download OpenAPI Document\" button\n * @default false\n * @deprecated Use `documentDownloadType: 'none'` instead\n */\n hideDownloadButton: z.boolean().optional(),\n /**\n * Whether to show the \"Test Request\" button\n * @default false\n */\n hideTestRequestButton: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to show the sidebar search bar\n * @default false\n */\n hideSearch: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to show the operationId\n *\n * @default false\n */\n showOperationId: z.boolean().optional().default(false).catch(false),\n /** Whether dark mode is on or off initially (light mode) */\n darkMode: z.boolean().optional(),\n /** forceDarkModeState makes it always this state no matter what */\n forceDarkModeState: z.enum(['dark', 'light']).optional(),\n /**\n * Whether to show the dark mode toggle\n * @default false\n */\n hideDarkModeToggle: z.boolean().optional().default(false).catch(false),\n /**\n * If used, passed data will be added to the HTML header\n * @see https://unhead.unjs.io/usage/composables/use-seo-meta\n */\n metaData: z.any().optional(), // Using any for UseSeoMetaInput since it's an external type\n /**\n * Path to a favicon image\n * @default undefined\n * @example '/favicon.svg'\n */\n favicon: z.string().optional(),\n /**\n * List of httpsnippet clients to hide from the clients menu\n * By default hides Unirest, pass `[]` to show all clients\n */\n hiddenClients: z\n .union([z.record(z.string(), z.union([z.boolean(), z.array(z.string())])), z.array(z.string()), z.literal(true)])\n .optional(),\n /** Determine the HTTP client that's selected by default */\n defaultHttpClient: z\n .object({\n targetKey: z.custom<TargetId>(),\n clientKey: z.string(),\n })\n .optional(),\n /** Custom CSS to be added to the page */\n customCss: z.string().optional(),\n /** onSpecUpdate is fired on spec/swagger content change */\n onSpecUpdate: z\n .function({\n input: [z.string()],\n output: z.void(),\n })\n .optional(),\n /** onServerChange is fired on selected server change */\n onServerChange: z\n .function({\n input: [z.string()],\n output: z.void(),\n })\n .optional(),\n /** onDocumentSelect is fired when the config is selected */\n onDocumentSelect: z\n .function({\n input: [],\n // Why no output? https://github.com/scalar/scalar/pull/7047\n // output: z.union([z.void(), z.promise(z.void())]),\n })\n .optional() as z.ZodType<(() => Promise<void> | void) | undefined>,\n /** Callback fired when the reference is fully loaded */\n onLoaded: z.function().optional() as z.ZodType<((slug: string) => Promise<void> | void) | undefined>,\n /** onBeforeRequest is fired before the request is sent. You can modify the request here. */\n onBeforeRequest: z\n .function({\n input: [z.object({ request: z.instanceof(Request) })],\n // Why no output? https://github.com/scalar/scalar/pull/7047\n // output: z.union([z.void(), z.promise(z.void())]),\n })\n .optional() as z.ZodType<((a: { request: Request }) => Promise<void> | void) | undefined>,\n /**\n * onShowMore is fired when the user clicks the \"Show more\" button on the references\n * @param tagId - The ID of the tag that was clicked\n */\n onShowMore: z\n .function({\n input: [z.string()],\n // Why no output? https://github.com/scalar/scalar/pull/7047\n // output: z.union([z.void(), z.promise(z.void())]),\n })\n .optional() as z.ZodType<((a: string) => Promise<void> | void) | undefined>,\n /**\n * onSidebarClick is fired when the user clicks on a sidebar item\n * @param href - The href of the sidebar item that was clicked\n */\n onSidebarClick: z\n .function({\n input: [z.string()],\n // Why no output? https://github.com/scalar/scalar/pull/7047\n // output: z.union([z.void(), z.promise(z.void())]),\n })\n .optional() as z.ZodType<((a: string) => Promise<void> | void) | undefined>,\n /**\n * Route using paths instead of hashes, your server MUST support this\n * @example '/standalone-api-reference/:custom(.*)?'\n * @experimental\n * @default undefined\n */\n pathRouting: z\n .object({\n basePath: z.string(),\n })\n .optional(),\n /**\n * Customize the heading portion of the hash\n * @param heading - The heading object\n * @returns A string ID used to generate the URL hash\n * @default (heading) => `#description/${heading.slug}`\n */\n generateHeadingSlug: z\n .function({\n input: [z.object({ slug: z.string().default('headingSlug') })],\n output: z.string(),\n })\n .optional(),\n /**\n * Customize the model portion of the hash\n * @param model - The model object with a name property\n * @returns A string ID used to generate the URL hash\n * @default (model) => slug(model.name)\n */\n generateModelSlug: z\n .function({\n input: [z.object({ name: z.string().default('modelName') })],\n output: z.string(),\n })\n .optional(),\n /**\n * Customize the tag portion of the hash\n * @param tag - The tag object\n * @returns A string ID used to generate the URL hash\n * @default (tag) => slug(tag.name)\n */\n generateTagSlug: z\n .function({\n input: [z.object({ name: z.string().default('tagName') })],\n output: z.string(),\n })\n .optional(),\n /**\n * Customize the operation portion of the hash\n * @param operation - The operation object\n * @returns A string ID used to generate the URL hash\n * @default (operation) => `${operation.method}${operation.path}`\n */\n generateOperationSlug: z\n .function({\n input: [\n z.object({\n path: z.string(),\n operationId: z.string().optional(),\n method: z.string(),\n summary: z.string().optional(),\n }),\n ],\n output: z.string(),\n })\n .optional(),\n /**\n * Customize the webhook portion of the hash\n * @param webhook - The webhook object\n * @returns A string ID used to generate the URL hash\n * @default (webhook) => slug(webhook.name)\n */\n generateWebhookSlug: z\n .function({\n input: [\n z.object({\n name: z.string(),\n method: z.string().optional(),\n }),\n ],\n output: z.string(),\n })\n .optional(),\n /**\n * To handle redirects, pass a function that will receive:\n * - The current path with hash if pathRouting is enabled\n * - The current hash if hashRouting (default)\n * And then passes that to history.replaceState\n *\n * @example hashRouting (default)\n * ```ts\n * redirect: (hash: string) => hash.replace('#v1/old-path', '#v2/new-path')\n * ```\n * @example pathRouting\n * ```ts\n * redirect: (pathWithHash: string) => {\n * if (pathWithHash.includes('#')) {\n * return pathWithHash.replace('/v1/tags/user#operation/get-user', '/v1/tags/user/operation/get-user')\n * }\n * return null\n * }\n * ```\n */\n redirect: z\n .function({\n input: [z.string()],\n output: z.string().nullable().optional(),\n })\n .optional(),\n /**\n * Whether to include default fonts\n * @default true\n */\n withDefaultFonts: z.boolean().optional().default(true).catch(true),\n /**\n * Whether to expand all tags by default\n *\n * Warning this can cause performance issues on big documents\n * @default false\n */\n defaultOpenAllTags: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to expand all models by default\n *\n * Warning this can cause performance issues on big documents\n * @default false\n */\n expandAllModelSections: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to expand all responses by default\n *\n * Warning this can cause performance issues on big documents\n * @default false\n */\n expandAllResponses: z.boolean().optional().default(false).catch(false),\n /**\n * Function to sort tags\n * @default 'alpha' for alphabetical sorting\n */\n tagsSorter: z\n .union([\n z.literal('alpha'),\n z.function({\n input: [z.any(), z.any()],\n output: z.number(),\n }),\n ])\n .optional(),\n /**\n * Function to sort operations\n * @default 'alpha' for alphabetical sorting\n */\n operationsSorter: z\n .union([\n z.literal('alpha'),\n z.literal('method'),\n z.function({\n input: [z.any(), z.any()],\n output: z.number(),\n }),\n ])\n .optional(),\n /**\n * Order the schema properties by\n * @default 'alpha' for alphabetical sorting\n */\n orderSchemaPropertiesBy: z\n .union([z.literal('alpha'), z.literal('preserve')])\n .optional()\n .default('alpha')\n .catch('alpha'),\n /**\n * Sort the schema properties by required ones first\n * @default true\n */\n orderRequiredPropertiesFirst: z.boolean().optional().default(true).catch(true),\n})\n\n/**\n * Pure configuration without the sources\n *\n * @deprecated Remove this once the types have been fully migrated\n */\nexport type ApiReferenceConfigurationRaw = Omit<\n z.infer<typeof apiReferenceConfigurationSchema>, // Remove deprecated attributes\n 'proxy' | 'spec' | 'authentication'\n> & {\n authentication?: AuthenticationConfiguration\n}\n\n/**\n * Configuration for the Scalar Api Reference integrations\n *\n * See the type `ApiReferenceConfigurationWithSource` or `AnyApiReferenceConfiguration`\\\n * for the configuration that includes the sources for you OpenAPI documents\n */\nexport type ApiReferenceConfiguration = ApiReferenceConfigurationRaw & {\n /** @deprecated\n * This type now refers to the base configuration that does not include the sources.\n * Use the type `ApiReferenceConfigurationWithSource` instead.\n */\n url?: SourceConfiguration['url']\n /** @deprecated\n * This type now refers to the base configuration that does not include the sources.\n * Use the type `ApiReferenceConfigurationWithSource` instead.\n */\n content?: SourceConfiguration['content']\n}\n\n/** Migrate the configuration through a transform */\n// const migrateConfiguration = <T extends z.infer<typeof _apiReferenceConfigurationSchema>>\n\n/** Configuration for the Api Reference */\nexport const apiReferenceConfigurationWithSourceSchema: ZodType<\n Omit<ApiReferenceConfiguration, 'url' | 'content'> & SourceConfiguration\n> = apiReferenceConfigurationSchema.extend(sourceConfigurationSchema.shape).transform((configuration) => {\n // Migrate hideDownloadButton to documentDownloadType\n if (configuration.hideDownloadButton) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'hideDownloadButton' attribute. Use 'documentDownloadType: 'none'' instead.`,\n )\n\n configuration.documentDownloadType = 'none'\n }\n\n // Remove the spec prefix\n if (configuration.spec?.url) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'spec.url' attribute. Remove the spec prefix and move the 'url' attribute to the top level.`,\n )\n\n configuration.url = configuration.spec.url\n delete configuration.spec\n }\n\n if (configuration.spec?.content) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'spec.content' attribute. Remove the spec prefix and move the 'content' attribute to the top level.`,\n )\n\n configuration.content = configuration.spec.content\n delete configuration.spec\n }\n\n // Migrate proxy URL\n if (configuration.proxy) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'proxy' attribute, rename it to 'proxyUrl' or update the package.`,\n )\n\n if (!configuration.proxyUrl) {\n configuration.proxyUrl = configuration.proxy\n }\n\n delete configuration.proxy\n }\n\n if (configuration.proxyUrl === OLD_PROXY_URL) {\n console.warn(`[DEPRECATED] Warning: configuration.proxyUrl points to our old proxy (${OLD_PROXY_URL}).`)\n console.warn(`[DEPRECATED] We are overwriting the value and use the new proxy URL (${NEW_PROXY_URL}) instead.`)\n console.warn(\n `[DEPRECATED] Action Required: You should manually update your configuration to use the new URL (${NEW_PROXY_URL}). Read more: https://github.com/scalar/scalar`,\n )\n\n configuration.proxyUrl = NEW_PROXY_URL\n }\n\n return configuration\n})\n\n/**\n * User facing configuration that includes the document source configuration\n */\nexport type ApiReferenceConfigurationWithSource = Omit<\n z.infer<typeof apiReferenceConfigurationWithSourceSchema>,\n // Remove deprecated attributes\n 'proxy' | 'spec' | 'authentication'\n> & {\n authentication?: AuthenticationConfiguration\n}\n\n/**\n * Configuration for a single config with multiple sources\n * The configuration will be shared between the documents\n */\nexport type ApiReferenceConfigurationWithMultipleSources = ApiReferenceConfigurationWithSource & {\n sources: SourceConfiguration[]\n}\n\n/** Configuration for multiple Api References */\nexport type AnyApiReferenceConfiguration =\n | Partial<ApiReferenceConfigurationWithSource>\n | Partial<ApiReferenceConfigurationWithMultipleSources>\n | Partial<ApiReferenceConfigurationWithSource>[]\n | Partial<ApiReferenceConfigurationWithMultipleSources>[]\n\n/** Typeguard to check to narrow the configs to the one with sources */\nexport const isConfigurationWithSources = (\n config: AnyApiReferenceConfiguration,\n): config is Partial<ApiReferenceConfigurationWithMultipleSources> =>\n Boolean(!Array.isArray(config) && config && 'sources' in config && Array.isArray(config.sources))\n"],
5
+ "mappings": "AAAA,SAAuB,SAAS;AAGhC,SAAS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,uBAAuB;AAAA,EACvC;AAGA,MAAI,cAAc,MAAM,KAAK;AAC3B,YAAQ;AAAA,MACN;AAAA,IACF;AAEA,kBAAc,MAAM,cAAc,KAAK;AACvC,WAAO,cAAc;AAAA,EACvB;AAEA,MAAI,cAAc,MAAM,SAAS;AAC/B,YAAQ;AAAA,MACN;AAAA,IACF;AAEA,kBAAc,UAAU,cAAc,KAAK;AAC3C,WAAO,cAAc;AAAA,EACvB;AAGA,MAAI,cAAc,OAAO;AACvB,YAAQ;AAAA,MACN;AAAA,IACF;AAEA,QAAI,CAAC,cAAc,UAAU;AAC3B,oBAAc,WAAW,cAAc;AAAA,IACzC;AAEA,WAAO,cAAc;AAAA,EACvB;AAEA,MAAI,cAAc,aAAa,eAAe;AAC5C,YAAQ,KAAK,yEAAyE,aAAa,IAAI;AACvG,YAAQ,KAAK,wEAAwE,aAAa,YAAY;AAC9G,YAAQ;AAAA,MACN,mGAAmG,aAAa;AAAA,IAClH;AAEA,kBAAc,WAAW;AAAA,EAC3B;AAEA,SAAO;AACT,CAAC;AA6BM,MAAM,6BAA6B,CACxC,WAEA,QAAQ,CAAC,MAAM,QAAQ,MAAM,KAAK,UAAU,aAAa,UAAU,MAAM,QAAQ,OAAO,OAAO,CAAC;",
6
6
  "names": []
7
7
  }
@@ -4,6 +4,11 @@ export declare const openApiExtensionSchema: z.ZodObject<{
4
4
  component: z.ZodUnknown;
5
5
  renderer: z.ZodOptional<z.ZodUnknown>;
6
6
  }, z.core.$strip>;
7
+ declare const viewComponentSchema: z.ZodObject<{
8
+ component: z.ZodUnknown;
9
+ renderer: z.ZodOptional<z.ZodUnknown>;
10
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
11
+ }, z.core.$strip>;
7
12
  export declare const apiReferencePluginSchema: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodObject<{
8
13
  name: z.ZodString;
9
14
  extensions: z.ZodArray<z.ZodObject<{
@@ -11,7 +16,16 @@ export declare const apiReferencePluginSchema: z.ZodFunction<z.ZodTuple<readonly
11
16
  component: z.ZodUnknown;
12
17
  renderer: z.ZodOptional<z.ZodUnknown>;
13
18
  }, z.core.$strip>>;
19
+ views: z.ZodOptional<z.ZodObject<{
20
+ 'content.end': z.ZodOptional<z.ZodArray<z.ZodObject<{
21
+ component: z.ZodUnknown;
22
+ renderer: z.ZodOptional<z.ZodUnknown>;
23
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
24
+ }, z.core.$strip>>>;
25
+ }, z.core.$strip>>;
14
26
  }, z.core.$strip>>;
15
27
  export type SpecificationExtension = z.infer<typeof openApiExtensionSchema>;
28
+ export type ViewComponent = z.infer<typeof viewComponentSchema>;
16
29
  export type ApiReferencePlugin = z.infer<typeof apiReferencePluginSchema>;
30
+ export {};
17
31
  //# sourceMappingURL=api-reference-plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-reference-plugin.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-reference-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,sBAAsB;;;;iBAkBjC,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;;;;;kBAMnC,CAAA;AAGF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAC3E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
1
+ {"version":3,"file":"api-reference-plugin.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-reference-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,sBAAsB;;;;iBAkBjC,CAAA;AAEF,QAAA,MAAM,mBAAmB;;;;iBAavB,CAAA;AASF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;kBAUnC,CAAA;AAGF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAC3E,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC/D,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
@@ -18,11 +18,35 @@ const openApiExtensionSchema = z.object({
18
18
  */
19
19
  renderer: z.unknown().optional()
20
20
  });
21
+ const viewComponentSchema = z.object({
22
+ /**
23
+ * Vue component to render in the view
24
+ */
25
+ component: z.unknown(),
26
+ /**
27
+ * Custom renderer to render the view component (e.g., ReactRenderer)
28
+ */
29
+ renderer: z.unknown().optional(),
30
+ /**
31
+ * Additional props to pass to the component
32
+ */
33
+ props: z.record(z.string(), z.any()).optional()
34
+ });
35
+ const viewsSchema = z.object({
36
+ /**
37
+ * Renders after the Models section
38
+ */
39
+ "content.end": z.array(viewComponentSchema).optional()
40
+ });
21
41
  const apiReferencePluginSchema = z.function({
22
42
  input: [],
23
43
  output: z.object({
24
44
  name: z.string(),
25
- extensions: z.array(openApiExtensionSchema)
45
+ extensions: z.array(openApiExtensionSchema),
46
+ /**
47
+ * Components to render at specific views in the API Reference
48
+ */
49
+ views: viewsSchema.optional()
26
50
  })
27
51
  });
28
52
  export {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/api-reference/api-reference-plugin.ts"],
4
- "sourcesContent": ["import { z } from 'zod'\n\nexport const openApiExtensionSchema = z.object({\n /**\n * Name of specification extension property. Has to start with `x-`.\n *\n * @example\n * ```yaml\n * x-custom-extension: foobar\n * ```\n */\n name: z.string().regex(/^x-/),\n /**\n * Vue component to render the specification extension\n */\n component: z.unknown(),\n /**\n * Custom renderer to render the specification extension\n */\n renderer: z.unknown().optional(),\n})\n\nexport const apiReferencePluginSchema = z.function({\n input: [],\n output: z.object({\n name: z.string(),\n extensions: z.array(openApiExtensionSchema),\n }),\n})\n\n// Infer the types from the schemas\nexport type SpecificationExtension = z.infer<typeof openApiExtensionSchema>\nexport type ApiReferencePlugin = z.infer<typeof apiReferencePluginSchema>\n"],
5
- "mappings": "AAAA,SAAS,SAAS;AAEX,MAAM,yBAAyB,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAS7C,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA,EAI5B,WAAW,EAAE,QAAQ;AAAA;AAAA;AAAA;AAAA,EAIrB,UAAU,EAAE,QAAQ,EAAE,SAAS;AACjC,CAAC;AAEM,MAAM,2BAA2B,EAAE,SAAS;AAAA,EACjD,OAAO,CAAC;AAAA,EACR,QAAQ,EAAE,OAAO;AAAA,IACf,MAAM,EAAE,OAAO;AAAA,IACf,YAAY,EAAE,MAAM,sBAAsB;AAAA,EAC5C,CAAC;AACH,CAAC;",
4
+ "sourcesContent": ["import { z } from 'zod'\n\nexport const openApiExtensionSchema = z.object({\n /**\n * Name of specification extension property. Has to start with `x-`.\n *\n * @example\n * ```yaml\n * x-custom-extension: foobar\n * ```\n */\n name: z.string().regex(/^x-/),\n /**\n * Vue component to render the specification extension\n */\n component: z.unknown(),\n /**\n * Custom renderer to render the specification extension\n */\n renderer: z.unknown().optional(),\n})\n\nconst viewComponentSchema = z.object({\n /**\n * Vue component to render in the view\n */\n component: z.unknown(),\n /**\n * Custom renderer to render the view component (e.g., ReactRenderer)\n */\n renderer: z.unknown().optional(),\n /**\n * Additional props to pass to the component\n */\n props: z.record(z.string(), z.any()).optional(),\n})\n\nconst viewsSchema = z.object({\n /**\n * Renders after the Models section\n */\n 'content.end': z.array(viewComponentSchema).optional(),\n})\n\nexport const apiReferencePluginSchema = z.function({\n input: [],\n output: z.object({\n name: z.string(),\n extensions: z.array(openApiExtensionSchema),\n /**\n * Components to render at specific views in the API Reference\n */\n views: viewsSchema.optional(),\n }),\n})\n\n// Infer the types from the schemas\nexport type SpecificationExtension = z.infer<typeof openApiExtensionSchema>\nexport type ViewComponent = z.infer<typeof viewComponentSchema>\nexport type ApiReferencePlugin = z.infer<typeof apiReferencePluginSchema>\n"],
5
+ "mappings": "AAAA,SAAS,SAAS;AAEX,MAAM,yBAAyB,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAS7C,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA,EAI5B,WAAW,EAAE,QAAQ;AAAA;AAAA;AAAA;AAAA,EAIrB,UAAU,EAAE,QAAQ,EAAE,SAAS;AACjC,CAAC;AAED,MAAM,sBAAsB,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA,EAInC,WAAW,EAAE,QAAQ;AAAA;AAAA;AAAA;AAAA,EAIrB,UAAU,EAAE,QAAQ,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA,EAI/B,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,CAAC,EAAE,SAAS;AAChD,CAAC;AAED,MAAM,cAAc,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA,EAI3B,eAAe,EAAE,MAAM,mBAAmB,EAAE,SAAS;AACvD,CAAC;AAEM,MAAM,2BAA2B,EAAE,SAAS;AAAA,EACjD,OAAO,CAAC;AAAA,EACR,QAAQ,EAAE,OAAO;AAAA,IACf,MAAM,EAAE,OAAO;AAAA,IACf,YAAY,EAAE,MAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA,IAI1C,OAAO,YAAY,SAAS;AAAA,EAC9B,CAAC;AACH,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/api-reference/authentication-configuration.test-d.ts"],
4
- "sourcesContent": ["import { assertType, describe, it } from 'vitest'\nimport type { AuthenticationConfiguration } from './authentication-configuration'\n\ndescribe('ApiReferenceConfiguration', () => {\n it('ensure we are generating correct types for preferredSecurityScheme', () => {\n assertType<AuthenticationConfiguration>({ preferredSecurityScheme: 'apiKey' })\n assertType<AuthenticationConfiguration>({ preferredSecurityScheme: ['apiKey', 'bearerAuth'] })\n assertType<AuthenticationConfiguration>({\n preferredSecurityScheme: ['apiKey', ['basic', 'oauth2'], ['apiKey', 'bearerAuth', 'oauth2']],\n })\n assertType<AuthenticationConfiguration>({\n // @ts-expect-error incorrect type\n preferredSecurityScheme: 47,\n })\n assertType<AuthenticationConfiguration>({\n // @ts-expect-error incorrect type\n preferredSecurityScheme: [22, null],\n })\n })\n\n it('ensure we are generating correct types for securitySchemes', () => {\n assertType<AuthenticationConfiguration>({\n securitySchemes: {\n apiKey: { type: 'apiKey', name: 'api_key', in: 'header' },\n },\n })\n assertType<AuthenticationConfiguration>({\n securitySchemes: {\n bearerAuth: { type: 'http', scheme: 'bearer', bearerFormat: 'JWT' },\n },\n })\n assertType<AuthenticationConfiguration>({\n securitySchemes: {\n oauth2: {\n type: 'oauth2',\n flows: {\n implicit: { scopes: { 'read:items': 'Read access to items' } },\n password: {\n username: 'username',\n password: 'password',\n },\n },\n },\n },\n })\n })\n})\n"],
5
- "mappings": "AAAA,SAAS,YAAY,UAAU,UAAU;AAGzC,SAAS,6BAA6B,MAAM;AAC1C,KAAG,sEAAsE,MAAM;AAC7E,eAAwC,EAAE,yBAAyB,SAAS,CAAC;AAC7E,eAAwC,EAAE,yBAAyB,CAAC,UAAU,YAAY,EAAE,CAAC;AAC7F,eAAwC;AAAA,MACtC,yBAAyB,CAAC,UAAU,CAAC,SAAS,QAAQ,GAAG,CAAC,UAAU,cAAc,QAAQ,CAAC;AAAA,IAC7F,CAAC;AACD,eAAwC;AAAA;AAAA,MAEtC,yBAAyB;AAAA,IAC3B,CAAC;AACD,eAAwC;AAAA;AAAA,MAEtC,yBAAyB,CAAC,IAAI,IAAI;AAAA,IACpC,CAAC;AAAA,EACH,CAAC;AAED,KAAG,8DAA8D,MAAM;AACrE,eAAwC;AAAA,MACtC,iBAAiB;AAAA,QACf,QAAQ,EAAE,MAAM,UAAU,MAAM,WAAW,IAAI,SAAS;AAAA,MAC1D;AAAA,IACF,CAAC;AACD,eAAwC;AAAA,MACtC,iBAAiB;AAAA,QACf,YAAY,EAAE,MAAM,QAAQ,QAAQ,UAAU,cAAc,MAAM;AAAA,MACpE;AAAA,IACF,CAAC;AACD,eAAwC;AAAA,MACtC,iBAAiB;AAAA,QACf,QAAQ;AAAA,UACN,MAAM;AAAA,UACN,OAAO;AAAA,YACL,UAAU,EAAE,QAAQ,EAAE,cAAc,uBAAuB,EAAE;AAAA,YAC7D,UAAU;AAAA,cACR,UAAU;AAAA,cACV,UAAU;AAAA,YACZ;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH,CAAC;",
4
+ "sourcesContent": ["import { assertType, describe, it } from 'vitest'\n\nimport type { AuthenticationConfiguration } from './authentication-configuration'\n\ndescribe('ApiReferenceConfiguration', () => {\n it('ensure we are generating correct types for preferredSecurityScheme', () => {\n assertType<AuthenticationConfiguration>({ preferredSecurityScheme: 'apiKey' })\n assertType<AuthenticationConfiguration>({ preferredSecurityScheme: ['apiKey', 'bearerAuth'] })\n assertType<AuthenticationConfiguration>({\n preferredSecurityScheme: ['apiKey', ['basic', 'oauth2'], ['apiKey', 'bearerAuth', 'oauth2']],\n })\n assertType<AuthenticationConfiguration>({\n // @ts-expect-error incorrect type\n preferredSecurityScheme: 47,\n })\n assertType<AuthenticationConfiguration>({\n // @ts-expect-error incorrect type\n preferredSecurityScheme: [22, null],\n })\n })\n\n it('ensure we are generating correct types for securitySchemes', () => {\n assertType<AuthenticationConfiguration>({\n securitySchemes: {\n apiKey: { type: 'apiKey', name: 'api_key', in: 'header' },\n },\n })\n assertType<AuthenticationConfiguration>({\n securitySchemes: {\n bearerAuth: { type: 'http', scheme: 'bearer', bearerFormat: 'JWT' },\n },\n })\n assertType<AuthenticationConfiguration>({\n securitySchemes: {\n oauth2: {\n type: 'oauth2',\n flows: {\n implicit: { scopes: { 'read:items': 'Read access to items' } },\n password: {\n username: 'username',\n password: 'password',\n },\n },\n },\n },\n })\n })\n})\n"],
5
+ "mappings": "AAAA,SAAS,YAAY,UAAU,UAAU;AAIzC,SAAS,6BAA6B,MAAM;AAC1C,KAAG,sEAAsE,MAAM;AAC7E,eAAwC,EAAE,yBAAyB,SAAS,CAAC;AAC7E,eAAwC,EAAE,yBAAyB,CAAC,UAAU,YAAY,EAAE,CAAC;AAC7F,eAAwC;AAAA,MACtC,yBAAyB,CAAC,UAAU,CAAC,SAAS,QAAQ,GAAG,CAAC,UAAU,cAAc,QAAQ,CAAC;AAAA,IAC7F,CAAC;AACD,eAAwC;AAAA;AAAA,MAEtC,yBAAyB;AAAA,IAC3B,CAAC;AACD,eAAwC;AAAA;AAAA,MAEtC,yBAAyB,CAAC,IAAI,IAAI;AAAA,IACpC,CAAC;AAAA,EACH,CAAC;AAED,KAAG,8DAA8D,MAAM;AACrE,eAAwC;AAAA,MACtC,iBAAiB;AAAA,QACf,QAAQ,EAAE,MAAM,UAAU,MAAM,WAAW,IAAI,SAAS;AAAA,MAC1D;AAAA,IACF,CAAC;AACD,eAAwC;AAAA,MACtC,iBAAiB;AAAA,QACf,YAAY,EAAE,MAAM,QAAQ,QAAQ,UAAU,cAAc,MAAM;AAAA,MACpE;AAAA,IACF,CAAC;AACD,eAAwC;AAAA,MACtC,iBAAiB;AAAA,QACf,QAAQ;AAAA,UACN,MAAM;AAAA,UACN,OAAO;AAAA,YACL,UAAU,EAAE,QAAQ,EAAE,cAAc,uBAAuB,EAAE;AAAA,YAC7D,UAAU;AAAA,cACR,UAAU;AAAA,cACV,UAAU;AAAA,YACZ;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  export { type ApiClientConfiguration, apiClientConfigurationSchema, } from './api-client-configuration.js';
2
2
  export { type ApiClientPlugin, apiClientPluginSchema, hooksSchema } from './api-client-plugin.js';
3
- export { type AnyApiReferenceConfiguration, type ApiReferenceConfiguration, type ApiReferenceConfigurationWithDefault, type ApiReferenceConfigurationWithMultipleSources, type ApiReferenceConfigurationWithSource, apiReferenceConfigurationSchema, apiReferenceConfigurationWithSourceSchema, isConfigurationWithSources, } from './api-reference-configuration.js';
4
- export type { ApiReferencePlugin, SpecificationExtension, } from './api-reference-plugin.js';
3
+ export { type AnyApiReferenceConfiguration, type ApiReferenceConfiguration, type ApiReferenceConfigurationRaw, type ApiReferenceConfigurationWithMultipleSources, type ApiReferenceConfigurationWithSource, apiReferenceConfigurationSchema, apiReferenceConfigurationWithSourceSchema, isConfigurationWithSources, } from './api-reference-configuration.js';
4
+ export type { ApiReferencePlugin, SpecificationExtension, ViewComponent, } from './api-reference-plugin.js';
5
5
  export type { ApiReferenceInstance, CreateApiReference } from './html-api.js';
6
6
  export { type HtmlRenderingConfiguration, htmlRenderingConfigurationSchema, } from './html-rendering-configuration.js';
7
7
  export { type SourceConfiguration, sourceConfigurationSchema, } from './source-configuration.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api-reference/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,sBAAsB,EAC3B,4BAA4B,GAC7B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,KAAK,eAAe,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAC9F,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,oCAAoC,EACzC,KAAK,4CAA4C,EACjD,KAAK,mCAAmC,EACxC,+BAA+B,EAC/B,yCAAyC,EACzC,0BAA0B,GAC3B,MAAM,+BAA+B,CAAA;AACtC,YAAY,EACV,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,wBAAwB,CAAA;AAC/B,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC1E,OAAO,EACL,KAAK,0BAA0B,EAC/B,gCAAgC,GACjC,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,KAAK,mBAAmB,EACxB,yBAAyB,GAC1B,MAAM,wBAAwB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api-reference/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,sBAAsB,EAC3B,4BAA4B,GAC7B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,KAAK,eAAe,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAC9F,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,4CAA4C,EACjD,KAAK,mCAAmC,EACxC,+BAA+B,EAC/B,yCAAyC,EACzC,0BAA0B,GAC3B,MAAM,+BAA+B,CAAA;AACtC,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,aAAa,GACd,MAAM,wBAAwB,CAAA;AAC/B,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC1E,OAAO,EACL,KAAK,0BAA0B,EAC/B,gCAAgC,GACjC,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,KAAK,mBAAmB,EACxB,yBAAyB,GAC1B,MAAM,wBAAwB,CAAA"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/api-reference/index.ts"],
4
- "sourcesContent": ["// biome-ignore lint/performance/noBarrelFile: exporting from a block\nexport {\n type ApiClientConfiguration,\n apiClientConfigurationSchema,\n} from './api-client-configuration'\nexport { type ApiClientPlugin, apiClientPluginSchema, hooksSchema } from './api-client-plugin'\nexport {\n type AnyApiReferenceConfiguration,\n type ApiReferenceConfiguration,\n type ApiReferenceConfigurationWithDefault,\n type ApiReferenceConfigurationWithMultipleSources,\n type ApiReferenceConfigurationWithSource,\n apiReferenceConfigurationSchema,\n apiReferenceConfigurationWithSourceSchema,\n isConfigurationWithSources,\n} from './api-reference-configuration'\nexport type {\n ApiReferencePlugin,\n SpecificationExtension,\n} from './api-reference-plugin'\nexport type { ApiReferenceInstance, CreateApiReference } from './html-api'\nexport {\n type HtmlRenderingConfiguration,\n htmlRenderingConfigurationSchema,\n} from './html-rendering-configuration'\nexport {\n type SourceConfiguration,\n sourceConfigurationSchema,\n} from './source-configuration'\n"],
5
- "mappings": "AACA;AAAA,EAEE;AAAA,OACK;AACP,SAA+B,uBAAuB,mBAAmB;AACzE;AAAA,EAME;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAMP;AAAA,EAEE;AAAA,OACK;AACP;AAAA,EAEE;AAAA,OACK;",
4
+ "sourcesContent": ["// biome-ignore lint/performance/noBarrelFile: exporting from a block\nexport {\n type ApiClientConfiguration,\n apiClientConfigurationSchema,\n} from './api-client-configuration'\nexport { type ApiClientPlugin, apiClientPluginSchema, hooksSchema } from './api-client-plugin'\nexport {\n type AnyApiReferenceConfiguration,\n type ApiReferenceConfiguration,\n type ApiReferenceConfigurationRaw,\n type ApiReferenceConfigurationWithMultipleSources,\n type ApiReferenceConfigurationWithSource,\n apiReferenceConfigurationSchema,\n apiReferenceConfigurationWithSourceSchema,\n isConfigurationWithSources,\n} from './api-reference-configuration'\nexport type {\n ApiReferencePlugin,\n SpecificationExtension,\n ViewComponent,\n} from './api-reference-plugin'\nexport type { ApiReferenceInstance, CreateApiReference } from './html-api'\nexport {\n type HtmlRenderingConfiguration,\n htmlRenderingConfigurationSchema,\n} from './html-rendering-configuration'\nexport {\n type SourceConfiguration,\n sourceConfigurationSchema,\n} from './source-configuration'\n"],
5
+ "mappings": "AACA;AAAA,EAEE;AAAA,OACK;AACP,SAA+B,uBAAuB,mBAAmB;AACzE;AAAA,EAME;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAOP;AAAA,EAEE;AAAA,OACK;AACP;AAAA,EAEE;AAAA,OACK;",
6
6
  "names": []
7
7
  }
@@ -5,6 +5,7 @@ import z from 'zod';
5
5
  * or used independently. Some configurations may have multiple sources.
6
6
  */
7
7
  export declare const sourceConfigurationSchema: z.ZodObject<{
8
+ default: z.ZodCatch<z.ZodOptional<z.ZodDefault<z.ZodBoolean>>>;
8
9
  url: z.ZodOptional<z.ZodString>;
9
10
  content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>]>>;
10
11
  title: z.ZodOptional<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"source-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/source-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AAEnB;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;iBAuFpC,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA"}
1
+ {"version":3,"file":"source-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/source-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AAEnB;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;iBAwFpC,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA"}
@@ -1,5 +1,6 @@
1
1
  import z from "zod";
2
2
  const sourceConfigurationSchema = z.object({
3
+ default: z.boolean().default(false).optional().catch(false),
3
4
  /**
4
5
  * URL to an OpenAPI/Swagger document
5
6
  * @example
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/api-reference/source-configuration.ts"],
4
- "sourcesContent": ["import z from 'zod'\n\n/**\n * A source is any potential document input used for API Reference\n * and API Client integrations. Sources may be specified in the configuration\n * or used independently. Some configurations may have multiple sources.\n */\nexport const sourceConfigurationSchema = z.object({\n /**\n * URL to an OpenAPI/Swagger document\n * @example\n * ```ts\n * const oldConfiguration = {\n * spec: {\n * url: 'https://example.com/openapi.json',\n * },\n * }\n *\n * const newConfiguration = {\n * url: 'https://example.com/openapi.json',\n * }\n * ```\n **/\n url: z.string().optional(),\n /**\n * Directly embed the OpenAPI document.\n * Can be a string, object, function returning an object, or null.\n *\n * @remarks It's recommended to pass a URL instead of content.\n * @example\n * ```ts\n * const oldConfiguration = {\n * spec: {\n * content: '\u2026',\n * },\n * }\n *\n * const newConfiguration = {\n * content: '\u2026',\n * }\n * ```\n **/\n content: z\n .union([\n z.string(),\n z.null(),\n z.record(z.string(), z.any()),\n z.function({\n input: [],\n output: z.record(z.string(), z.any()),\n }),\n ])\n .optional(),\n /**\n * The title of the OpenAPI document.\n *\n * @example 'Scalar Galaxy'\n *\n * @deprecated Please move `title` to the top level and remove the `spec` prefix.\n */\n title: z.string().optional(),\n /**\n * The slug of the OpenAPI document used in the URL.\n *\n * If none is passed, the title will be used.\n *\n * If no title is used, it'll just use the index.\n *\n * @example 'scalar-galaxy'\n *\n * @deprecated Please move `slug` to the top level and remove the `spec` prefix.\n */\n slug: z.string().optional(),\n /**\n * The OpenAPI/Swagger document to render\n *\n * @deprecated Use `url` and `content` on the top level instead.\n **/\n spec: z\n .object({\n url: z.string().optional(),\n content: z\n .union([\n z.string(),\n z.null(),\n z.record(z.string(), z.any()),\n z.function({\n input: [],\n output: z.record(z.string(), z.any()),\n }),\n ])\n .optional(),\n })\n .optional(),\n})\n\nexport type SourceConfiguration = z.infer<typeof sourceConfigurationSchema>\n"],
5
- "mappings": "AAAA,OAAO,OAAO;AAOP,MAAM,4BAA4B,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgBhD,KAAK,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmBzB,SAAS,EACN,MAAM;AAAA,IACL,EAAE,OAAO;AAAA,IACT,EAAE,KAAK;AAAA,IACP,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,CAAC;AAAA,IAC5B,EAAE,SAAS;AAAA,MACT,OAAO,CAAC;AAAA,MACR,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,CAAC;AAAA,IACtC,CAAC;AAAA,EACH,CAAC,EACA,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQZ,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAY3B,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM1B,MAAM,EACH,OAAO;AAAA,IACN,KAAK,EAAE,OAAO,EAAE,SAAS;AAAA,IACzB,SAAS,EACN,MAAM;AAAA,MACL,EAAE,OAAO;AAAA,MACT,EAAE,KAAK;AAAA,MACP,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,CAAC;AAAA,MAC5B,EAAE,SAAS;AAAA,QACT,OAAO,CAAC;AAAA,QACR,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,CAAC;AAAA,MACtC,CAAC;AAAA,IACH,CAAC,EACA,SAAS;AAAA,EACd,CAAC,EACA,SAAS;AACd,CAAC;",
4
+ "sourcesContent": ["import z from 'zod'\n\n/**\n * A source is any potential document input used for API Reference\n * and API Client integrations. Sources may be specified in the configuration\n * or used independently. Some configurations may have multiple sources.\n */\nexport const sourceConfigurationSchema = z.object({\n default: z.boolean().default(false).optional().catch(false),\n /**\n * URL to an OpenAPI/Swagger document\n * @example\n * ```ts\n * const oldConfiguration = {\n * spec: {\n * url: 'https://example.com/openapi.json',\n * },\n * }\n *\n * const newConfiguration = {\n * url: 'https://example.com/openapi.json',\n * }\n * ```\n **/\n url: z.string().optional(),\n /**\n * Directly embed the OpenAPI document.\n * Can be a string, object, function returning an object, or null.\n *\n * @remarks It's recommended to pass a URL instead of content.\n * @example\n * ```ts\n * const oldConfiguration = {\n * spec: {\n * content: '\u2026',\n * },\n * }\n *\n * const newConfiguration = {\n * content: '\u2026',\n * }\n * ```\n **/\n content: z\n .union([\n z.string(),\n z.null(),\n z.record(z.string(), z.any()),\n z.function({\n input: [],\n output: z.record(z.string(), z.any()),\n }),\n ])\n .optional(),\n /**\n * The title of the OpenAPI document.\n *\n * @example 'Scalar Galaxy'\n *\n * @deprecated Please move `title` to the top level and remove the `spec` prefix.\n */\n title: z.string().optional(),\n /**\n * The slug of the OpenAPI document used in the URL.\n *\n * If none is passed, the title will be used.\n *\n * If no title is used, it'll just use the index.\n *\n * @example 'scalar-galaxy'\n *\n * @deprecated Please move `slug` to the top level and remove the `spec` prefix.\n */\n slug: z.string().optional(),\n /**\n * The OpenAPI/Swagger document to render\n *\n * @deprecated Use `url` and `content` on the top level instead.\n **/\n spec: z\n .object({\n url: z.string().optional(),\n content: z\n .union([\n z.string(),\n z.null(),\n z.record(z.string(), z.any()),\n z.function({\n input: [],\n output: z.record(z.string(), z.any()),\n }),\n ])\n .optional(),\n })\n .optional(),\n})\n\nexport type SourceConfiguration = z.infer<typeof sourceConfigurationSchema>\n"],
5
+ "mappings": "AAAA,OAAO,OAAO;AAOP,MAAM,4BAA4B,EAAE,OAAO;AAAA,EAChD,SAAS,EAAE,QAAQ,EAAE,QAAQ,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgB1D,KAAK,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmBzB,SAAS,EACN,MAAM;AAAA,IACL,EAAE,OAAO;AAAA,IACT,EAAE,KAAK;AAAA,IACP,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,CAAC;AAAA,IAC5B,EAAE,SAAS;AAAA,MACT,OAAO,CAAC;AAAA,MACR,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,CAAC;AAAA,IACtC,CAAC;AAAA,EACH,CAAC,EACA,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQZ,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAY3B,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM1B,MAAM,EACH,OAAO;AAAA,IACN,KAAK,EAAE,OAAO,EAAE,SAAS;AAAA,IACzB,SAAS,EACN,MAAM;AAAA,MACL,EAAE,OAAO;AAAA,MACT,EAAE,KAAK;AAAA,MACP,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,CAAC;AAAA,MAC5B,EAAE,SAAS;AAAA,QACT,OAAO,CAAC;AAAA,QACR,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,CAAC;AAAA,MACtC,CAAC;AAAA,IACH,CAAC,EACA,SAAS;AAAA,EACd,CAAC,EACA,SAAS;AACd,CAAC;",
6
6
  "names": []
7
7
  }
@@ -5,7 +5,7 @@ import type { TargetId } from '../snippetz/index.js';
5
5
  * This re-export is needed due to a typescript issue
6
6
  * @see https://github.com/microsoft/TypeScript/issues/42873
7
7
  */
8
- export type { OpenAPI, OpenAPIV2, OpenAPIV3, OpenAPIV3_1, } from '@scalar/openapi-types';
8
+ export type { OpenAPI, OpenAPIV2, OpenAPIV3, OpenAPIV3_1, OpenAPIV3_2, } from '@scalar/openapi-types';
9
9
  export type ClientInfo = {
10
10
  key: string;
11
11
  title: string;
@@ -1 +1 @@
1
- {"version":3,"file":"reference-config.d.ts","sourceRoot":"","sources":["../../src/legacy/reference-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEvF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAEjD;;;GAGG;AACH,YAAY,EACV,OAAO,EACP,SAAS,EACT,SAAS,EACT,WAAW,GACZ,MAAM,uBAAuB,CAAA;AAE9B,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,MAAM,GAAG,WAAW,CAAC,YAAY,CAAA;AAE7C,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,QAAQ,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,IAAI,MAAM,EAAE,GAAG,IAAI,CAAA;IAC5B,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,aAAa,GAErB,IAAI,GAEJ,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAEjE,UAAU,CAAC,KAAK,CAAC,EAAE,CAAA;AAEvB,MAAM,MAAM,WAAW,GAAG;IACxB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M,CAAA;KACrB,CAAA;IACD,SAAS,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;IAC3E,YAAY,CAAC,EAAE,SAAS,CAAC,gBAAgB,GAAG,WAAW,CAAC,gBAAgB,CAAA;IACxE,UAAU,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACnC,aAAa,CAAC,EAAE,WAAW,CAAA;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;IACzC,SAAS,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;IAC3E,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAA;IAC1B,UAAU,CAAC,EAAE,SAAS,CAAC,yBAAyB,EAAE,CAAA;CACnD,CAAA"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/legacy/reference-config.ts"],
4
- "sourcesContent": ["import type { OpenAPI, OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types'\n\nimport type { ApiReferenceConfiguration } from '../api-reference/index'\nimport type { TargetId } from '../snippetz/index'\n\n/**\n * This re-export is needed due to a typescript issue\n * @see https://github.com/microsoft/TypeScript/issues/42873\n */\nexport type {\n OpenAPI,\n OpenAPIV2,\n OpenAPIV3,\n OpenAPIV3_1,\n} from '@scalar/openapi-types'\n\nexport type ClientInfo = {\n key: string\n title: string\n link: string\n description: string\n}\n\n/**\n * Alias for the OpenAPI 3.1 ServerObject type\n *\n * @deprecated Use OpenAPIV3_1.ServerObject instead\n */\nexport type Server = OpenAPIV3_1.ServerObject\n\nexport type TargetInfo = {\n key: TargetId\n title: string\n extname: `.${string}` | null\n default: string\n}\n\nexport type HiddenClients =\n // Just hide all\n | true\n // Exclude whole targets or just specific clients\n | Partial<Record<TargetInfo['key'], boolean | ClientInfo['key'][]>>\n // Backwards compatibility with the previous behavior ['fetch', 'xhr']\n | ClientInfo['key'][]\n\nexport type PathRouting = {\n basePath: string\n}\n\n/**\n * @deprecated Use ApiReferenceConfiguration instead\n *\n * @example import type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\n */\nexport type ReferenceConfiguration = Partial<ApiReferenceConfiguration>\n\nexport type BaseParameter = {\n name: string\n description?: string | null\n value: string | number | Record<string, any>\n required?: boolean\n enabled: boolean\n}\n\ntype OptionalCharset = string | null\n\nexport type ContentType =\n | `application/json${OptionalCharset}`\n | `application/xml${OptionalCharset}`\n | `text/plain${OptionalCharset}`\n | `text/html${OptionalCharset}`\n | `application/octet-stream${OptionalCharset}`\n | `application/x-www-form-urlencoded${OptionalCharset}`\n | `multipart/form-data${OptionalCharset}`\n | `*/*${OptionalCharset}`\n | `application/vnd.${string}+json${OptionalCharset}`\n\nexport type Cookie = {\n name: string\n value: string\n}\n\nexport type CustomRequestExample = {\n lang: string\n label: string\n source: string\n}\n\nexport type Header = {\n name: string\n value: string\n}\n\nexport enum XScalarStability {\n Deprecated = 'deprecated',\n Experimental = 'experimental',\n Stable = 'stable',\n}\n\nexport type Operation = {\n id: string\n httpVerb: OpenAPIV3_1.HttpMethods\n path: string\n name: string\n isWebhook: boolean\n description?: string\n information: OpenAPIV3_1.OperationObject\n servers?: OpenAPIV3_1.ServerObject[]\n pathParameters?: OpenAPIV3_1.ParameterObject[]\n}\n\n/**\n * @deprecated Use Parameter instead\n */\nexport type Parameters = Parameter\n\nexport type Parameter = {\n // Fixed Fields\n name: string\n in?: string\n description?: string\n required?: boolean\n deprecated?: boolean\n allowEmptyValue?: boolean\n // Other\n style?: 'form' | 'simple'\n explode?: boolean\n allowReserved?: boolean\n schema?: Schema\n example?: any\n examples?: Map<string, any>\n content?: RequestBodyMimeTypes\n headers?: { [key: string]: OpenAPI.HeaderObject }\n}\n\nexport type Query = {\n name: string\n value: string\n}\n\n// Create a mapped type to ensure keys are a subset of ContentType\nexport type RequestBodyMimeTypes = {\n [K in ContentType]?: {\n schema?: any\n example?: any\n examples?: any\n }\n}\n\nexport type RequestBody = {\n description?: string\n required?: boolean\n content?: RequestBodyMimeTypes\n}\n\nexport type Schema = {\n type: string\n name?: string\n example?: any\n default?: any\n format?: string\n description?: string\n properties?: Record<string, Schema>\n}\n\n/**\n * This is a very strange and custom way to represent the operation object.\n * It's the outcome of the `parse` helper.\n *\n * @deprecated This is evil. Stop using it. We'll transition to use the new store.\n */\nexport type TransformedOperation = Operation & {\n pathParameters?: Parameter[]\n}\n\nexport type CollapsedSidebarItems = Record<string, boolean>\n\nexport type AuthenticationState = {\n customSecurity?: boolean\n /** You can pre-select a single security scheme, multiple, or complex security using an array of arrays */\n preferredSecurityScheme?: string | (string | string[])[] | null\n securitySchemes?:\n | OpenAPIV2.SecurityDefinitionsObject\n | OpenAPIV3.ComponentsObject['securitySchemes']\n | OpenAPIV3_1.ComponentsObject['securitySchemes']\n http?: {\n basic?: {\n username?: string\n password?: string\n }\n bearer?: {\n token?: string\n }\n }\n apiKey?: {\n token?: string\n }\n oAuth2?: {\n clientId?: string\n scopes?: string[]\n accessToken?: string\n state?: string\n username?: string\n password?: string\n }\n}\n\nexport type Heading = {\n depth: number\n value: string\n slug?: string\n}\n\nexport type CodeBlockSSRKey = `components-scalar-code-block${number}`\nexport type DescriptionSectionSSRKey = `components-Content-Introduction-Description-sections${number}`\n\nexport type ScalarState = {\n 'hash'?: string\n 'useGlobalStore-authentication'?: AuthenticationState\n 'useSidebarContent-collapsedSidebarItems'?: CollapsedSidebarItems\n [key: CodeBlockSSRKey]: string\n [key: DescriptionSectionSSRKey]: {\n heading: Heading\n content: string\n }[]\n}\n\nexport type Tag = {\n 'name': string\n 'description': string\n 'operations': TransformedOperation[]\n 'x-displayName'?: string\n 'externalDocs'?: OpenAPIV3_1.ExternalDocumentationObject\n}\n\nexport type TagGroup = {\n name: string\n tags: string[]\n}\n\nexport type Definitions = OpenAPIV2.DefinitionsObject\n\n/**\n * Webhook (after our super custom transformation process)\n *\n * @deprecated Let's get rid of those super custom transformed entities and use the store instead.\n */\nexport type Webhooks = Record<\n string,\n Record<\n OpenAPIV3_1.HttpMethods,\n TransformedOperation & {\n 'x-internal'?: boolean\n }\n >\n>\n\n/**\n * The native OpenAPI Webhook object, but with the x-internal and x-scalar-ignore properties\n */\nexport type Webhook = (OpenAPIV3.OperationObject | OpenAPIV3_1.OperationObject) & {\n 'x-internal'?: boolean\n 'x-scalar-ignore'?: boolean\n}\n\n/**\n * @deprecated Use `@scalar/openapi-types` instead\n */\nexport type Spec = {\n 'tags'?: Tag[]\n 'info':\n | Partial<OpenAPIV2.Document['info']>\n | Partial<OpenAPIV3.Document['info']>\n | Partial<OpenAPIV3_1.Document['info']>\n 'host'?: OpenAPIV2.Document['host']\n 'basePath'?: OpenAPIV2.Document['basePath']\n 'schemes'?: OpenAPIV2.Document['schemes']\n 'externalDocs'?: {\n url: string\n description?: string\n }\n 'servers'?: OpenAPIV3.Document['servers'] | OpenAPIV3_1.Document['servers']\n 'components'?: OpenAPIV3.ComponentsObject | OpenAPIV3_1.ComponentsObject\n 'webhooks'?: TransformedOperation[]\n 'definitions'?: Definitions\n 'swagger'?: OpenAPIV2.Document['swagger']\n 'openapi'?: OpenAPIV3.Document['openapi'] | OpenAPIV3_1.Document['openapi']\n 'x-tagGroups'?: TagGroup[]\n 'security'?: OpenAPIV3.SecurityRequirementObject[]\n}\n"],
5
- "mappings": "AA6FO,IAAK,mBAAL,kBAAKA,sBAAL;AACL,EAAAA,kBAAA,gBAAa;AACb,EAAAA,kBAAA,kBAAe;AACf,EAAAA,kBAAA,YAAS;AAHC,SAAAA;AAAA,GAAA;",
4
+ "sourcesContent": ["import type { OpenAPI, OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types'\n\nimport type { ApiReferenceConfiguration } from '../api-reference/index'\nimport type { TargetId } from '../snippetz/index'\n\n/**\n * This re-export is needed due to a typescript issue\n * @see https://github.com/microsoft/TypeScript/issues/42873\n */\nexport type {\n OpenAPI,\n OpenAPIV2,\n OpenAPIV3,\n OpenAPIV3_1,\n OpenAPIV3_2,\n} from '@scalar/openapi-types'\n\nexport type ClientInfo = {\n key: string\n title: string\n link: string\n description: string\n}\n\n/**\n * Alias for the OpenAPI 3.1 ServerObject type\n *\n * @deprecated Use OpenAPIV3_1.ServerObject instead\n */\nexport type Server = OpenAPIV3_1.ServerObject\n\nexport type TargetInfo = {\n key: TargetId\n title: string\n extname: `.${string}` | null\n default: string\n}\n\nexport type HiddenClients =\n // Just hide all\n | true\n // Exclude whole targets or just specific clients\n | Partial<Record<TargetInfo['key'], boolean | ClientInfo['key'][]>>\n // Backwards compatibility with the previous behavior ['fetch', 'xhr']\n | ClientInfo['key'][]\n\nexport type PathRouting = {\n basePath: string\n}\n\n/**\n * @deprecated Use ApiReferenceConfiguration instead\n *\n * @example import type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\n */\nexport type ReferenceConfiguration = Partial<ApiReferenceConfiguration>\n\nexport type BaseParameter = {\n name: string\n description?: string | null\n value: string | number | Record<string, any>\n required?: boolean\n enabled: boolean\n}\n\ntype OptionalCharset = string | null\n\nexport type ContentType =\n | `application/json${OptionalCharset}`\n | `application/xml${OptionalCharset}`\n | `text/plain${OptionalCharset}`\n | `text/html${OptionalCharset}`\n | `application/octet-stream${OptionalCharset}`\n | `application/x-www-form-urlencoded${OptionalCharset}`\n | `multipart/form-data${OptionalCharset}`\n | `*/*${OptionalCharset}`\n | `application/vnd.${string}+json${OptionalCharset}`\n\nexport type Cookie = {\n name: string\n value: string\n}\n\nexport type CustomRequestExample = {\n lang: string\n label: string\n source: string\n}\n\nexport type Header = {\n name: string\n value: string\n}\n\nexport enum XScalarStability {\n Deprecated = 'deprecated',\n Experimental = 'experimental',\n Stable = 'stable',\n}\n\nexport type Operation = {\n id: string\n httpVerb: OpenAPIV3_1.HttpMethods\n path: string\n name: string\n isWebhook: boolean\n description?: string\n information: OpenAPIV3_1.OperationObject\n servers?: OpenAPIV3_1.ServerObject[]\n pathParameters?: OpenAPIV3_1.ParameterObject[]\n}\n\n/**\n * @deprecated Use Parameter instead\n */\nexport type Parameters = Parameter\n\nexport type Parameter = {\n // Fixed Fields\n name: string\n in?: string\n description?: string\n required?: boolean\n deprecated?: boolean\n allowEmptyValue?: boolean\n // Other\n style?: 'form' | 'simple'\n explode?: boolean\n allowReserved?: boolean\n schema?: Schema\n example?: any\n examples?: Map<string, any>\n content?: RequestBodyMimeTypes\n headers?: { [key: string]: OpenAPI.HeaderObject }\n}\n\nexport type Query = {\n name: string\n value: string\n}\n\n// Create a mapped type to ensure keys are a subset of ContentType\nexport type RequestBodyMimeTypes = {\n [K in ContentType]?: {\n schema?: any\n example?: any\n examples?: any\n }\n}\n\nexport type RequestBody = {\n description?: string\n required?: boolean\n content?: RequestBodyMimeTypes\n}\n\nexport type Schema = {\n type: string\n name?: string\n example?: any\n default?: any\n format?: string\n description?: string\n properties?: Record<string, Schema>\n}\n\n/**\n * This is a very strange and custom way to represent the operation object.\n * It's the outcome of the `parse` helper.\n *\n * @deprecated This is evil. Stop using it. We'll transition to use the new store.\n */\nexport type TransformedOperation = Operation & {\n pathParameters?: Parameter[]\n}\n\nexport type CollapsedSidebarItems = Record<string, boolean>\n\nexport type AuthenticationState = {\n customSecurity?: boolean\n /** You can pre-select a single security scheme, multiple, or complex security using an array of arrays */\n preferredSecurityScheme?: string | (string | string[])[] | null\n securitySchemes?:\n | OpenAPIV2.SecurityDefinitionsObject\n | OpenAPIV3.ComponentsObject['securitySchemes']\n | OpenAPIV3_1.ComponentsObject['securitySchemes']\n http?: {\n basic?: {\n username?: string\n password?: string\n }\n bearer?: {\n token?: string\n }\n }\n apiKey?: {\n token?: string\n }\n oAuth2?: {\n clientId?: string\n scopes?: string[]\n accessToken?: string\n state?: string\n username?: string\n password?: string\n }\n}\n\nexport type Heading = {\n depth: number\n value: string\n slug?: string\n}\n\nexport type CodeBlockSSRKey = `components-scalar-code-block${number}`\nexport type DescriptionSectionSSRKey = `components-Content-Introduction-Description-sections${number}`\n\nexport type ScalarState = {\n 'hash'?: string\n 'useGlobalStore-authentication'?: AuthenticationState\n 'useSidebarContent-collapsedSidebarItems'?: CollapsedSidebarItems\n [key: CodeBlockSSRKey]: string\n [key: DescriptionSectionSSRKey]: {\n heading: Heading\n content: string\n }[]\n}\n\nexport type Tag = {\n 'name': string\n 'description': string\n 'operations': TransformedOperation[]\n 'x-displayName'?: string\n 'externalDocs'?: OpenAPIV3_1.ExternalDocumentationObject\n}\n\nexport type TagGroup = {\n name: string\n tags: string[]\n}\n\nexport type Definitions = OpenAPIV2.DefinitionsObject\n\n/**\n * Webhook (after our super custom transformation process)\n *\n * @deprecated Let's get rid of those super custom transformed entities and use the store instead.\n */\nexport type Webhooks = Record<\n string,\n Record<\n OpenAPIV3_1.HttpMethods,\n TransformedOperation & {\n 'x-internal'?: boolean\n }\n >\n>\n\n/**\n * The native OpenAPI Webhook object, but with the x-internal and x-scalar-ignore properties\n */\nexport type Webhook = (OpenAPIV3.OperationObject | OpenAPIV3_1.OperationObject) & {\n 'x-internal'?: boolean\n 'x-scalar-ignore'?: boolean\n}\n\n/**\n * @deprecated Use `@scalar/openapi-types` instead\n */\nexport type Spec = {\n 'tags'?: Tag[]\n 'info':\n | Partial<OpenAPIV2.Document['info']>\n | Partial<OpenAPIV3.Document['info']>\n | Partial<OpenAPIV3_1.Document['info']>\n 'host'?: OpenAPIV2.Document['host']\n 'basePath'?: OpenAPIV2.Document['basePath']\n 'schemes'?: OpenAPIV2.Document['schemes']\n 'externalDocs'?: {\n url: string\n description?: string\n }\n 'servers'?: OpenAPIV3.Document['servers'] | OpenAPIV3_1.Document['servers']\n 'components'?: OpenAPIV3.ComponentsObject | OpenAPIV3_1.ComponentsObject\n 'webhooks'?: TransformedOperation[]\n 'definitions'?: Definitions\n 'swagger'?: OpenAPIV2.Document['swagger']\n 'openapi'?: OpenAPIV3.Document['openapi'] | OpenAPIV3_1.Document['openapi']\n 'x-tagGroups'?: TagGroup[]\n 'security'?: OpenAPIV3.SecurityRequirementObject[]\n}\n"],
5
+ "mappings": "AA8FO,IAAK,mBAAL,kBAAKA,sBAAL;AACL,EAAAA,kBAAA,gBAAa;AACb,EAAAA,kBAAA,kBAAe;AACf,EAAAA,kBAAA,YAAS;AAHC,SAAAA;AAAA,GAAA;",
6
6
  "names": ["XScalarStability"]
7
7
  }
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "scalar",
17
17
  "references"
18
18
  ],
19
- "version": "0.3.2",
19
+ "version": "0.4.0",
20
20
  "engines": {
21
21
  "node": ">=20"
22
22
  },
@@ -67,12 +67,12 @@
67
67
  "nanoid": "5.1.5",
68
68
  "type-fest": "5.0.0",
69
69
  "zod": "4.1.11",
70
- "@scalar/openapi-types": "0.5.0"
70
+ "@scalar/openapi-types": "0.5.1"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@types/har-format": "^1.2.15",
74
- "vite": "7.1.5",
75
- "@scalar/build-tooling": "0.2.7"
74
+ "vite": "7.1.11",
75
+ "@scalar/build-tooling": "0.2.8"
76
76
  },
77
77
  "scripts": {
78
78
  "build": "scalar-build-esbuild",