@scalar/blocks 0.6.2 → 0.6.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 (27) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/code-example/components/CodeExample.vue.d.ts.map +1 -1
  3. package/dist/code-example/components/CodeExample.vue.js +1 -1
  4. package/dist/code-example/components/CodeExample.vue.js.map +1 -1
  5. package/dist/code-example/components/CodeExample.vue_vue_type_script_setup_true_lang.js +22 -19
  6. package/dist/code-example/components/CodeExample.vue_vue_type_script_setup_true_lang.js.map +1 -1
  7. package/dist/code-example/helpers/get-generated-payload-example.d.ts.map +1 -1
  8. package/dist/code-example/helpers/get-generated-payload-example.js +1 -4
  9. package/dist/code-example/helpers/get-generated-payload-example.js.map +1 -1
  10. package/dist/constants.js +1 -1
  11. package/dist/shared/Badge.vue.d.ts.map +1 -1
  12. package/dist/shared/Badge.vue.js +1 -1
  13. package/dist/shared/Badge.vue.js.map +1 -1
  14. package/dist/shared/Badge.vue_vue_type_script_setup_true_lang.js.map +1 -1
  15. package/dist/specification-extensions/ExtensionValue.vue.d.ts +2 -0
  16. package/dist/specification-extensions/ExtensionValue.vue.d.ts.map +1 -1
  17. package/dist/specification-extensions/ExtensionValue.vue.js.map +1 -1
  18. package/dist/specification-extensions/ExtensionValue.vue_vue_type_script_setup_true_lang.js +5 -1
  19. package/dist/specification-extensions/ExtensionValue.vue_vue_type_script_setup_true_lang.js.map +1 -1
  20. package/dist/specification-extensions/SpecificationExtensions.vue.d.ts +2 -0
  21. package/dist/specification-extensions/SpecificationExtensions.vue.d.ts.map +1 -1
  22. package/dist/specification-extensions/SpecificationExtensions.vue.js.map +1 -1
  23. package/dist/specification-extensions/SpecificationExtensions.vue_vue_type_script_setup_true_lang.js +19 -8
  24. package/dist/specification-extensions/SpecificationExtensions.vue_vue_type_script_setup_true_lang.js.map +1 -1
  25. package/dist/style.css +12 -4
  26. package/dist/vue-styles.css +1 -1
  27. package/package.json +9 -9
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @scalar/blocks
2
2
 
3
+ ## 0.6.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#10733](https://github.com/scalar/scalar/pull/10733): Align AsyncAPI message and server extensions with their surrounding content and reduce excess spacing.
8
+ - [#10814](https://github.com/scalar/scalar/pull/10814): fix(blocks): keep explicit badge colors above themed utility defaults
9
+ - [#10771](https://github.com/scalar/scalar/pull/10771): Place request actions below the method and path in narrow fallback cards, keeping button labels readable without clipping.
10
+ - [#10812](https://github.com/scalar/scalar/pull/10812): Keep deprecated schemas and properties in generated JSON and XML examples by default. Remove the `includeDeprecated` option; deprecation no longer filters example values. Read/write and optional-property filtering still apply.
11
+
12
+ ## 0.6.3
13
+
3
14
  ## 0.6.2
4
15
 
5
16
  ## 0.6.1
@@ -1 +1 @@
1
- {"version":3,"file":"CodeExample.vue.d.ts","sourceRoot":"","sources":["../../../src/code-example/components/CodeExample.vue"],"names":[],"mappings":"AAssBA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAUvE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAA;AACzF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAkBrE,OAAO,KAAK,EAEV,iBAAiB,EAElB,MAAM,UAAU,CAAA;AAKjB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,uFAAuF;IACvF,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,+EAA+E;IAC/E,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;;OAGG;IACH,WAAW,CAAC,EAAE,QAAQ,GAAG,WAAW,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CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"CodeExample.vue.d.ts","sourceRoot":"","sources":["../../../src/code-example/components/CodeExample.vue"],"names":[],"mappings":"AAqtBA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAUvE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAA;AACzF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAkBrE,OAAO,KAAK,EAEV,iBAAiB,EAElB,MAAM,UAAU,CAAA;AAKjB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,uFAAuF;IACvF,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,+EAA+E;IAC/E,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;;OAGG;IACH,WAAW,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;IACpC;;OAEG;IACH,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,cAAc,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IACpC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,QAAQ,EAAE,iBAAiB,CAAA;IAC3B;;OAEG;IACH,eAAe,EAAE,0BAA0B,EAAE,CAAA;IAC7C;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,SAAS,EAAE,eAAe,CAAA;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,MAAM,CAAA;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,EAAE,CAAA;IAC/B;;;OAGG;IACH,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,+BAA+B,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACzD,CAAA;AAED;;;;;;;;GAQG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;;;;;YAuCN,MAAM,OAAO;IACvB,kGAAkG;qBACjF,MAAM,OAAO;YACpB,CAAC,EAAE,WAAW,EAAE,EAAE;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO;EAmvB7D,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -2,7 +2,7 @@ import e from "../../_virtual/_plugin-vue_export-helper.js";
2
2
  import t from "./CodeExample.vue_vue_type_script_setup_true_lang.js";
3
3
  /* empty css */
4
4
  //#region src/code-example/components/CodeExample.vue
5
- var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-5374efff"]]);
5
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-d57b5f1f"]]);
6
6
  //#endregion
7
7
  export { n as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"CodeExample.vue.js","names":["_sfc_main","_plugin_vue_export_helper_default","CodeExample_vue_vue_type_script_setup_true_lang_default","CodeExample_default"],"sources":["../../../src/code-example/components/CodeExample.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type CodeExampleProps = {\n /** Localized status text shown when the selected example has no linked code sample. */\n codeSampleUnavailable?: string\n /**\n * Localized purpose of the client picker. It opens the button's accessible name and the\n * selected client's title is appended, so the name still contains the visible label.\n */\n clientPickerLabel?: string\n /** Localized accessible name for the search field inside the client picker. */\n clientSearchLabel?: string\n /**\n * Localized accessible name for the focusable code sample. The selected client's title is\n * appended so the announcement also says which language the sample is in.\n */\n codeSampleLabel?: string\n /**\n * Integration type: determines if the code sample is displayed in a client environment\n * or in an API reference environment.\n */\n integration?: 'client' | 'reference'\n /**\n * List of all http clients formatted into option groups for the client selector\n */\n clientOptions: ClientOptionGroup[]\n /**\n * Pre-selected client, this will determine which client is initially selected in the dropdown.\n * Either a built-in client id (e.g. `js/fetch`) or a custom sample id (e.g. `custom/python`).\n *\n * Typed as a plain string: unioning the (large) client-id union with the `custom/...`\n * ids overflows TypeScript's union-complexity limit inside this component's `defineProps`.\n *\n * @defaults to a custom sample if one is available, otherwise shell/curl\n */\n selectedClient?: string\n /**\n * Which server from the spec to use for the code example\n */\n selectedServer?: ServerObject | null\n /**\n * The selected content type from the requestBody.content, this will determine which examples are available\n * as well as the content type of the code example\n *\n * @defaults to the first content type if not provided\n */\n selectedContentType?: string\n /**\n * Example name to use for resolving example values for parameters AND requestBody.\n *\n * This is the document-wide selection: it is honored only when this operation defines an example\n * with the same key, so picking an example on one operation syncs the rest without blanking out\n * operations that do not share that key.\n *\n * @example \"limited\"\n * ```ts\n * parameters: {\n * name: 'foobar',\n * in: 'query',\n * examples: {\n * limited: {\n * dataValue: 10,\n * }\n * }\n * },\n * body: {\n * content: {\n * 'application/json': {\n * examples: {\n * limited: {\n * dataValue: { foo: 'bar' },\n * }\n * }\n * }\n * }\n * }\n *\n * ```\n */\n selectedExample?: string\n /**\n * Event bus\n */\n eventBus: WorkspaceEventBus\n /**\n * The security schemes which are applicable to this operation\n */\n securitySchemes: SecuritySchemeObjectSecret[]\n /**\n * HTTP method of the operation\n */\n method: string\n /**\n * Path of the operation\n */\n path: string\n /**\n * De-referenced OpenAPI Operation object\n */\n operation: OperationObject\n /**\n * If true and there's no example, we will display a small card with the method and path only\n */\n fallback?: boolean\n /**\n * A method to generate the label of the block, should return an html string\n */\n generateLabel?: () => string\n /**\n * If true, render this as a webhook request example\n */\n isWebhook?: boolean\n /**\n * Workspace + document cookies\n */\n globalCookies?: XScalarCookie[]\n /**\n * When the request body schema uses oneOf/anyOf, use these selected variants\n * for the example snippet (e.g. from the schema dropdowns in the API reference).\n */\n /** Originating OpenAPI version, used for XML mapping rules. */\n openapiVersion?: string\n requestBodyCompositionSelection?: Record<string, number>\n}\n\n/**\n * Request Example\n *\n * The core component for rendering a request example block,\n * this component does not have much of its own state but operates on props and custom events\n *\n * @event workspace:update:selected-client - Emitted when the selected client changes\n * @event workspace:update:selected-example - Emitted when the selected example changes, so other operations can sync\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport {\n ScalarCard,\n ScalarCardFooter,\n ScalarCardHeader,\n ScalarCardSection,\n} from '@scalar/components/card'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarCombobox } from '@scalar/components/combobox'\nimport { ScalarVirtualText } from '@scalar/components/virtual-text'\nimport { freezeElement } from '@scalar/helpers/dom/freeze-element'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport {\n getOperationExamples,\n resolveOperationExamples,\n} from '@scalar/workspace-store/helpers/operation-examples'\nimport {\n useExampleVisibility,\n useExternalExamples,\n} from '@scalar/workspace-store/helpers/use-external-examples'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies'\nimport type {\n OperationObject,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n computed,\n onBeforeMount,\n ref,\n useId,\n watch,\n watchEffect,\n type ComponentPublicInstance,\n} from 'vue'\n\nimport { filterClientsByQuery } from '../helpers/filter-clients-by-query'\nimport { findClient } from '../helpers/find-client'\nimport { generateCodeSnippet } from '../helpers/generate-code-snippet'\nimport { getClients } from '../helpers/get-clients'\nimport { getCustomCodeSamples } from '../helpers/get-custom-code-samples'\nimport { getSecrets } from '../helpers/get-secrets'\nimport { operationToHar } from '../helpers/operation-to-har/operation-to-har'\nimport type {\n ClientOption,\n ClientOptionGroup,\n CustomClientOption,\n} from '../types'\nimport ExamplePicker from './ExamplePicker.vue'\nimport HttpMethod from './HttpMethod.vue'\n\nconst {\n integration,\n codeSampleUnavailable = 'No code sample available for this example.',\n clientPickerLabel = 'Change code sample language',\n clientSearchLabel = 'Search clients',\n codeSampleLabel = 'Code sample',\n clientOptions,\n selectedClient,\n selectedServer = null,\n selectedContentType,\n selectedExample,\n securitySchemes = [],\n method,\n eventBus,\n path,\n operation,\n isWebhook,\n generateLabel,\n globalCookies,\n openapiVersion,\n requestBodyCompositionSelection,\n} = defineProps<CodeExampleProps>()\n\nconst emit = defineEmits<{\n /**\n * Emitted whenever the example key actually shown for this operation changes.\n *\n * This is the resolved local key (not the raw document-wide selection), so layouts that render\n * the test-request button outside this component can open the client with the same example the\n * snippet displays.\n */\n (e: 'update:exampleKey', value: string): void\n}>()\n\ndefineSlots<{\n 'header': () => unknown\n /** Rendered at the start of the footer, only while the example picker does not need that space */\n 'footer-start'?: () => unknown\n 'footer': ({ exampleName }: { exampleName: string }) => unknown\n}>()\n\n/** Grab the examples for the given content type */\nconst requestBodyExamples = computed(() => {\n const content = getResolvedRef(operation.requestBody)?.content ?? {}\n const contentType = selectedContentType || Object.keys(content)[0]\n if (!contentType) return {}\n\n const examples = content[contentType]?.examples ?? {}\n\n return examples\n})\n\n/**\n * The example key actually shown for this operation.\n *\n * `selectedExample` is the document-wide selection that syncs across operations. We honor it only\n * when this operation actually defines that key, otherwise we keep the local example: a selection\n * on one operation should never blank out an operation that does not share the same example.\n */\nconst localExampleKey = ref('')\n\n/** Resolve the key to display, preferring the document-wide selection when this operation has it */\nconst resolveExampleKey = (preferred: string | undefined): string => {\n const keys = Object.keys(requestBodyExamples.value)\n if (preferred && keys.includes(preferred)) {\n return preferred\n }\n // Keep the current local example when it is still valid, otherwise fall back to the first one\n if (localExampleKey.value && keys.includes(localExampleKey.value)) {\n return localExampleKey.value\n }\n return keys[0] ?? ''\n}\n\n// Set the initial example from the document-wide selection, falling back to the first example\nonBeforeMount(() => {\n localExampleKey.value = resolveExampleKey(selectedExample)\n})\n\n// Follow the document-wide selection when it changes and this operation has that example\nwatch(\n () => selectedExample,\n (preferred) => {\n localExampleKey.value = resolveExampleKey(preferred)\n },\n)\n\n/** Reset the selected example key if the content type changes and the new content type doesn't have the previously selected example */\nwatch(\n () => selectedContentType,\n () => {\n if (\n !Object.keys(requestBodyExamples.value).includes(localExampleKey.value)\n ) {\n // Re-resolve so the new content type still follows the document-wide selection when it has\n // that key, instead of always snapping back to the first example\n localExampleKey.value = resolveExampleKey(selectedExample)\n }\n },\n)\n\n// Keep the parent informed of the resolved key so a test-request button rendered outside this\n// component (e.g. the classic layout header) opens the client with the example the snippet shows\nwatchEffect(() => {\n emit('update:exampleKey', localExampleKey.value)\n})\n\n/** Select an example locally and sync the choice across the document */\nconst selectExample = (key: string) => {\n localExampleKey.value = key\n eventBus.emit('workspace:update:selected-example', key)\n}\n\n/** Grab any custom code samples from the operation */\nconst customCodeSamples = computed(() => getCustomCodeSamples(operation))\n\n/** Merge custom code samples with the client options */\nconst clients = computed(() =>\n getClients(\n customCodeSamples.value.samples,\n clientOptions,\n customCodeSamples.value.label,\n ),\n)\n\n/** Total number of available clients across all option groups */\nconst clientCount = computed(() =>\n clients.value.reduce((total, group) => total + group.options.length, 0),\n)\n\n/** The locally selected client which would include code samples from this operation only */\nconst localSelectedClient = ref<ClientOption | CustomClientOption | undefined>(\n findClient(clients.value, selectedClient),\n)\n\n/**\n * Re-resolve the local client whenever the global selection or the available\n * clients change. Watching `clients` matters when navigating between operations:\n * the stored id stays the same, but the matching option (e.g. a custom sample)\n * differs per operation, so without this the snippet could go stale.\n */\nwatch([() => selectedClient, clients], ([newClient]) => {\n const client = findClient(clients.value, newClient)\n if (client) {\n localSelectedClient.value = client\n }\n})\n\n/**\n * Accessible name for the client picker.\n *\n * On its own the button reads as its current value (\"C Libcurl\"), which never\n * says what activating it does. The visible title stays part of the name so it\n * still matches what is on screen.\n */\nconst clientPickerAriaLabel = computed(() =>\n [clientPickerLabel, localSelectedClient.value?.title]\n .filter(Boolean)\n .join(': '),\n)\n\n/**\n * Accessible name for the focusable code sample, e.g. \"Code sample: Shell cURL\".\n *\n * Screen readers announce only the name and role when focus lands on the scroller, so the\n * name tells the user both what the region is and which client it is generated for.\n */\nconst codeSampleAriaLabel = computed(() =>\n [codeSampleLabel, localSelectedClient.value?.title]\n .filter(Boolean)\n .join(': '),\n)\n\nconst elem = ref<ComponentPublicInstance | null>(null)\nconst visible = useExampleVisibility(elem)\nconst externalExamples = useExternalExamples(\n () =>\n getOperationExamples(operation, localExampleKey.value, selectedContentType),\n () => visible.value,\n)\nconst resolvedOperation = computed(() =>\n resolveOperationExamples(\n operation,\n localExampleKey.value,\n selectedContentType,\n externalExamples.resolve,\n ),\n)\n\n/** Keep the picker available because it also selects the example opened by Test Request. */\nconst showExamplePicker = computed(\n () => Object.keys(requestBodyExamples.value).length > 1,\n)\n\n/** Generate HAR data for webhook requests */\nconst webhookHar = computed(() => {\n if (!isWebhook) return null\n\n try {\n return operationToHar({\n operation: resolvedOperation.value,\n method,\n path,\n example: localExampleKey.value,\n openapiVersion,\n requestBodyCompositionSelection,\n // Only required parameters are shown in code examples; optional parameters\n // are omitted unless explicitly enabled via `x-disabled: false`.\n defaultDisabledParameters: true,\n })\n } catch (error) {\n console.error('[webhookHar]', error)\n return null\n }\n})\n\n/** Generate the code snippet for the selected example */\nconst generatedCode = computed<string | null>(() => {\n if (isWebhook) {\n return webhookHar.value?.postData?.text ?? ''\n }\n\n return generateCodeSnippet({\n // Only required parameters are shown in code examples; optional parameters\n // are omitted unless explicitly enabled via `x-disabled: false`.\n defaultDisabledParameters: true,\n includeDefaultHeaders: integration === 'client',\n clientId: localSelectedClient.value?.id,\n customCodeSamples: customCodeSamples.value.samples,\n operation: resolvedOperation.value,\n method,\n path,\n contentType: selectedContentType,\n server: selectedServer,\n securitySchemes,\n example: localExampleKey.value,\n globalCookies,\n openapiVersion,\n requestBodyCompositionSelection,\n })\n})\n\n/** The language for the code block, used for syntax highlighting */\nconst codeBlockLanguage = computed(() => {\n if (isWebhook) {\n return webhookLanguage.value\n }\n\n return localSelectedClient.value?.lang\n})\n\n/** Determine the language for webhook content based on MIME type */\nconst webhookLanguage = computed<string>(() => {\n if (!webhookHar.value?.postData) return 'json'\n\n const contentType = webhookHar.value.postData.mimeType\n if (contentType?.includes('json')) return 'json'\n if (contentType?.includes('xml')) return 'xml'\n if (contentType?.includes('yaml') || contentType?.includes('yml'))\n return 'yaml'\n if (contentType?.includes('text/plain')) return 'text'\n\n return 'json'\n})\n\n/** Block secrets from being shown in the code block */\nconst secretCredentials = computed(() => getSecrets(securitySchemes))\n\n/** Set custom example, or update the selected HTTP client globally */\nconst selectClient = (option: ClientOption) => {\n // We need to freeze the ui to prevent scrolling as the clients change\n if (elem.value) {\n const unfreeze = freezeElement(elem.value.$el)\n setTimeout(() => {\n unfreeze()\n }, 300)\n }\n // Update to the local example\n localSelectedClient.value = option\n\n // Sync the selection globally so other operations follow along. Custom samples\n // sync too (keyed by language), so picking e.g. the Python SDK example here\n // shows the Python example on every operation that ships one.\n if (option) {\n eventBus.emit('workspace:update:selected-client', option.id)\n }\n}\n\n// Virtualize the code block if it's too large\n// This prevents the entire app from freezing up if there's a massive example\n// We set a lower threshold here as code examples can get quite large\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\nconst shouldVirtualize = computed(\n () => (generatedCode.value?.length ?? 0) > VIRTUALIZATION_THRESHOLD,\n)\n\nconst id = useId()\n</script>\n<template>\n <ScalarCard\n v-if=\"\n generatedCode === null || generatedCode || externalExamples.pending.value\n \"\n ref=\"elem\"\n class=\"request-card dark-mode\">\n <!-- Header -->\n <ScalarCardHeader class=\"pr-2.5\">\n <span class=\"sr-only\">Request Example for</span>\n <HttpMethod\n as=\"span\"\n class=\"request-method\"\n :method=\"method\" />\n <span\n v-if=\"generateLabel\"\n v-html=\"generateLabel()\" />\n <slot name=\"header\" />\n <!-- Client picker -->\n <template\n v-if=\"!isWebhook && clientCount\"\n #actions>\n <!-- Multiple clients: render a dropdown to switch between them -->\n <ScalarCombobox\n v-if=\"clientCount > 1\"\n class=\"max-h-80\"\n :filterFn=\"filterClientsByQuery\"\n :inputLabel=\"clientSearchLabel\"\n :modelValue=\"localSelectedClient\"\n :options=\"clients\"\n placement=\"bottom-end\"\n teleport\n @update:modelValue=\"selectClient($event as ClientOption)\">\n <ScalarButton\n :aria-label=\"clientPickerAriaLabel\"\n class=\"text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-0.5 py-0 text-base font-normal\"\n data-testid=\"client-picker\"\n variant=\"ghost\">\n {{ localSelectedClient?.title }}\n <ScalarIconCaretDown\n class=\"ui-open:rotate-180 mt-px size-3 transition-transform duration-100\"\n weight=\"bold\" />\n </ScalarButton>\n </ScalarCombobox>\n <!-- Single client: just show its label, no need for a dropdown -->\n <span\n v-else\n class=\"text-c-2 flex h-full w-fit items-center px-0.5 py-0 text-base font-normal\"\n data-testid=\"client-picker\">\n {{ localSelectedClient?.title }}\n </span>\n </template>\n </ScalarCardHeader>\n\n <!-- Code snippet -->\n <ScalarCardSection class=\"request-editor-section custom-scroll p-0\">\n <div\n v-if=\"externalExamples.pending.value\"\n class=\"text-c-2 p-4\"\n role=\"status\">\n <template v-if=\"externalExamples.failed.value\">\n Could not load this example.\n <ScalarButton\n size=\"sm\"\n variant=\"ghost\"\n @click=\"externalExamples.retry\">\n Retry\n </ScalarButton>\n </template>\n <template v-else>Loading example…</template>\n </div>\n <div\n v-else-if=\"generatedCode === null\"\n class=\"text-c-2 p-4\"\n role=\"status\">\n {{ codeSampleUnavailable }}\n </div>\n <div\n v-else\n :id=\"`${id}-example`\"\n class=\"code-snippet\">\n <ScalarCodeBlock\n v-if=\"!shouldVirtualize\"\n class=\"bg-b-2 h-full\"\n :content=\"generatedCode\"\n :hideCredentials=\"secretCredentials\"\n :label=\"codeSampleAriaLabel\"\n :lang=\"codeBlockLanguage\"\n lineNumbers />\n <ScalarVirtualText\n v-else\n aria-label=\"Request code sample\"\n containerClass=\"custom-scroll scalar-code-block border rounded-b flex flex-1 max-h-screen\"\n contentClass=\"language-plaintext whitespace-pre font-code text-base p-2\"\n :lineHeight=\"20\"\n role=\"region\"\n :text=\"generatedCode\" />\n </div>\n </ScalarCardSection>\n\n <!-- Footer -->\n <ScalarCardFooter\n v-if=\"showExamplePicker || $slots.footer || $slots['footer-start']\"\n class=\"request-card-footer bg-b-3\"\n :class=\"{\n 'request-card-footer--wraps':\n !showExamplePicker && $slots['footer-start'],\n }\">\n <!-- Example picker -->\n <div\n v-if=\"showExamplePicker\"\n class=\"request-card-footer-addon\">\n <template v-if=\"Object.keys(requestBodyExamples).length\">\n <ExamplePicker\n :examples=\"requestBodyExamples\"\n :modelValue=\"localExampleKey\"\n @update:modelValue=\"selectExample\" />\n </template>\n </div>\n <!-- Otherwise the start of the footer is free for the caller -->\n <div\n v-else-if=\"$slots['footer-start']\"\n class=\"request-card-footer-start\">\n <slot name=\"footer-start\" />\n </div>\n\n <!-- Footer -->\n <slot\n :exampleName=\"localExampleKey\"\n name=\"footer\" />\n </ScalarCardFooter>\n </ScalarCard>\n\n <!-- Fallback card with just method and path in the case of no examples -->\n <ScalarCard\n v-else-if=\"fallback\"\n class=\"request-card dark-mode\">\n <ScalarCardSection class=\"request-card-simple\">\n <div class=\"request-header\">\n <HttpMethod\n as=\"span\"\n class=\"request-method\"\n :method=\"method\" />\n <slot name=\"header\" />\n </div>\n <slot\n :exampleName=\"localExampleKey\"\n name=\"footer\" />\n </ScalarCardSection>\n </ScalarCard>\n</template>\n<style scoped>\n.request-card {\n color: var(--scalar-color-1);\n font-size: var(--scalar-font-size-3);\n}\n.request-method {\n font-family: var(--scalar-font-code);\n margin-right: 6px;\n}\n.request-card-footer {\n display: flex;\n justify-content: flex-end;\n padding: 6px;\n flex-shrink: 0;\n position: relative;\n}\n/*\n * Footer-start content keeps its full width; when the footer is too narrow for everything,\n * the end controls wrap onto a second line instead of squeezing or covering it.\n */\n.request-card-footer--wraps {\n flex-wrap: wrap;\n row-gap: 4px;\n}\n.request-card-footer-start {\n display: flex;\n align-items: center;\n flex: 1 0 auto;\n}\n.request-card-footer-addon {\n display: flex;\n align-items: center;\n\n flex: 1;\n min-width: 0;\n}\n.request-editor-section {\n display: flex;\n flex: 1;\n}\n.request-card-simple {\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n padding: 8px 8px 8px 12px;\n\n font-size: var(--scalar-small);\n}\n.code-snippet {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"CodeExample.vue.js","names":["_sfc_main","_plugin_vue_export_helper_default","CodeExample_vue_vue_type_script_setup_true_lang_default","CodeExample_default"],"sources":["../../../src/code-example/components/CodeExample.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type CodeExampleProps = {\n /** Localized status text shown when the selected example has no linked code sample. */\n codeSampleUnavailable?: string\n /**\n * Localized purpose of the client picker. It opens the button's accessible name and the\n * selected client's title is appended, so the name still contains the visible label.\n */\n clientPickerLabel?: string\n /** Localized accessible name for the search field inside the client picker. */\n clientSearchLabel?: string\n /**\n * Localized accessible name for the focusable code sample. The selected client's title is\n * appended so the announcement also says which language the sample is in.\n */\n codeSampleLabel?: string\n /**\n * Integration type: determines if the code sample is displayed in a client environment\n * or in an API reference environment.\n */\n integration?: 'client' | 'reference'\n /**\n * List of all http clients formatted into option groups for the client selector\n */\n clientOptions: ClientOptionGroup[]\n /**\n * Pre-selected client, this will determine which client is initially selected in the dropdown.\n * Either a built-in client id (e.g. `js/fetch`) or a custom sample id (e.g. `custom/python`).\n *\n * Typed as a plain string: unioning the (large) client-id union with the `custom/...`\n * ids overflows TypeScript's union-complexity limit inside this component's `defineProps`.\n *\n * @defaults to a custom sample if one is available, otherwise shell/curl\n */\n selectedClient?: string\n /**\n * Which server from the spec to use for the code example\n */\n selectedServer?: ServerObject | null\n /**\n * The selected content type from the requestBody.content, this will determine which examples are available\n * as well as the content type of the code example\n *\n * @defaults to the first content type if not provided\n */\n selectedContentType?: string\n /**\n * Example name to use for resolving example values for parameters AND requestBody.\n *\n * This is the document-wide selection: it is honored only when this operation defines an example\n * with the same key, so picking an example on one operation syncs the rest without blanking out\n * operations that do not share that key.\n *\n * @example \"limited\"\n * ```ts\n * parameters: {\n * name: 'foobar',\n * in: 'query',\n * examples: {\n * limited: {\n * dataValue: 10,\n * }\n * }\n * },\n * body: {\n * content: {\n * 'application/json': {\n * examples: {\n * limited: {\n * dataValue: { foo: 'bar' },\n * }\n * }\n * }\n * }\n * }\n *\n * ```\n */\n selectedExample?: string\n /**\n * Event bus\n */\n eventBus: WorkspaceEventBus\n /**\n * The security schemes which are applicable to this operation\n */\n securitySchemes: SecuritySchemeObjectSecret[]\n /**\n * HTTP method of the operation\n */\n method: string\n /**\n * Path of the operation\n */\n path: string\n /**\n * De-referenced OpenAPI Operation object\n */\n operation: OperationObject\n /**\n * If true and there's no example, we will display a small card with the method and path only\n */\n fallback?: boolean\n /**\n * A method to generate the label of the block, should return an html string\n */\n generateLabel?: () => string\n /**\n * If true, render this as a webhook request example\n */\n isWebhook?: boolean\n /**\n * Workspace + document cookies\n */\n globalCookies?: XScalarCookie[]\n /**\n * When the request body schema uses oneOf/anyOf, use these selected variants\n * for the example snippet (e.g. from the schema dropdowns in the API reference).\n */\n /** Originating OpenAPI version, used for XML mapping rules. */\n openapiVersion?: string\n requestBodyCompositionSelection?: Record<string, number>\n}\n\n/**\n * Request Example\n *\n * The core component for rendering a request example block,\n * this component does not have much of its own state but operates on props and custom events\n *\n * @event workspace:update:selected-client - Emitted when the selected client changes\n * @event workspace:update:selected-example - Emitted when the selected example changes, so other operations can sync\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport {\n ScalarCard,\n ScalarCardFooter,\n ScalarCardHeader,\n ScalarCardSection,\n} from '@scalar/components/card'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarCombobox } from '@scalar/components/combobox'\nimport { ScalarVirtualText } from '@scalar/components/virtual-text'\nimport { freezeElement } from '@scalar/helpers/dom/freeze-element'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport {\n getOperationExamples,\n resolveOperationExamples,\n} from '@scalar/workspace-store/helpers/operation-examples'\nimport {\n useExampleVisibility,\n useExternalExamples,\n} from '@scalar/workspace-store/helpers/use-external-examples'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies'\nimport type {\n OperationObject,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n computed,\n onBeforeMount,\n ref,\n useId,\n watch,\n watchEffect,\n type ComponentPublicInstance,\n} from 'vue'\n\nimport { filterClientsByQuery } from '../helpers/filter-clients-by-query'\nimport { findClient } from '../helpers/find-client'\nimport { generateCodeSnippet } from '../helpers/generate-code-snippet'\nimport { getClients } from '../helpers/get-clients'\nimport { getCustomCodeSamples } from '../helpers/get-custom-code-samples'\nimport { getSecrets } from '../helpers/get-secrets'\nimport { operationToHar } from '../helpers/operation-to-har/operation-to-har'\nimport type {\n ClientOption,\n ClientOptionGroup,\n CustomClientOption,\n} from '../types'\nimport ExamplePicker from './ExamplePicker.vue'\nimport HttpMethod from './HttpMethod.vue'\n\nconst {\n integration,\n codeSampleUnavailable = 'No code sample available for this example.',\n clientPickerLabel = 'Change code sample language',\n clientSearchLabel = 'Search clients',\n codeSampleLabel = 'Code sample',\n clientOptions,\n selectedClient,\n selectedServer = null,\n selectedContentType,\n selectedExample,\n securitySchemes = [],\n method,\n eventBus,\n path,\n operation,\n isWebhook,\n generateLabel,\n globalCookies,\n openapiVersion,\n requestBodyCompositionSelection,\n} = defineProps<CodeExampleProps>()\n\nconst emit = defineEmits<{\n /**\n * Emitted whenever the example key actually shown for this operation changes.\n *\n * This is the resolved local key (not the raw document-wide selection), so layouts that render\n * the test-request button outside this component can open the client with the same example the\n * snippet displays.\n */\n (e: 'update:exampleKey', value: string): void\n}>()\n\ndefineSlots<{\n 'header': () => unknown\n /** Rendered at the start of the footer, only while the example picker does not need that space */\n 'footer-start'?: () => unknown\n 'footer': ({ exampleName }: { exampleName: string }) => unknown\n}>()\n\n/** Grab the examples for the given content type */\nconst requestBodyExamples = computed(() => {\n const content = getResolvedRef(operation.requestBody)?.content ?? {}\n const contentType = selectedContentType || Object.keys(content)[0]\n if (!contentType) return {}\n\n const examples = content[contentType]?.examples ?? {}\n\n return examples\n})\n\n/**\n * The example key actually shown for this operation.\n *\n * `selectedExample` is the document-wide selection that syncs across operations. We honor it only\n * when this operation actually defines that key, otherwise we keep the local example: a selection\n * on one operation should never blank out an operation that does not share the same example.\n */\nconst localExampleKey = ref('')\n\n/** Resolve the key to display, preferring the document-wide selection when this operation has it */\nconst resolveExampleKey = (preferred: string | undefined): string => {\n const keys = Object.keys(requestBodyExamples.value)\n if (preferred && keys.includes(preferred)) {\n return preferred\n }\n // Keep the current local example when it is still valid, otherwise fall back to the first one\n if (localExampleKey.value && keys.includes(localExampleKey.value)) {\n return localExampleKey.value\n }\n return keys[0] ?? ''\n}\n\n// Set the initial example from the document-wide selection, falling back to the first example\nonBeforeMount(() => {\n localExampleKey.value = resolveExampleKey(selectedExample)\n})\n\n// Follow the document-wide selection when it changes and this operation has that example\nwatch(\n () => selectedExample,\n (preferred) => {\n localExampleKey.value = resolveExampleKey(preferred)\n },\n)\n\n/** Reset the selected example key if the content type changes and the new content type doesn't have the previously selected example */\nwatch(\n () => selectedContentType,\n () => {\n if (\n !Object.keys(requestBodyExamples.value).includes(localExampleKey.value)\n ) {\n // Re-resolve so the new content type still follows the document-wide selection when it has\n // that key, instead of always snapping back to the first example\n localExampleKey.value = resolveExampleKey(selectedExample)\n }\n },\n)\n\n// Keep the parent informed of the resolved key so a test-request button rendered outside this\n// component (e.g. the classic layout header) opens the client with the example the snippet shows\nwatchEffect(() => {\n emit('update:exampleKey', localExampleKey.value)\n})\n\n/** Select an example locally and sync the choice across the document */\nconst selectExample = (key: string) => {\n localExampleKey.value = key\n eventBus.emit('workspace:update:selected-example', key)\n}\n\n/** Grab any custom code samples from the operation */\nconst customCodeSamples = computed(() => getCustomCodeSamples(operation))\n\n/** Merge custom code samples with the client options */\nconst clients = computed(() =>\n getClients(\n customCodeSamples.value.samples,\n clientOptions,\n customCodeSamples.value.label,\n ),\n)\n\n/** Total number of available clients across all option groups */\nconst clientCount = computed(() =>\n clients.value.reduce((total, group) => total + group.options.length, 0),\n)\n\n/** The locally selected client which would include code samples from this operation only */\nconst localSelectedClient = ref<ClientOption | CustomClientOption | undefined>(\n findClient(clients.value, selectedClient),\n)\n\n/**\n * Re-resolve the local client whenever the global selection or the available\n * clients change. Watching `clients` matters when navigating between operations:\n * the stored id stays the same, but the matching option (e.g. a custom sample)\n * differs per operation, so without this the snippet could go stale.\n */\nwatch([() => selectedClient, clients], ([newClient]) => {\n const client = findClient(clients.value, newClient)\n if (client) {\n localSelectedClient.value = client\n }\n})\n\n/**\n * Accessible name for the client picker.\n *\n * On its own the button reads as its current value (\"C Libcurl\"), which never\n * says what activating it does. The visible title stays part of the name so it\n * still matches what is on screen.\n */\nconst clientPickerAriaLabel = computed(() =>\n [clientPickerLabel, localSelectedClient.value?.title]\n .filter(Boolean)\n .join(': '),\n)\n\n/**\n * Accessible name for the focusable code sample, e.g. \"Code sample: Shell cURL\".\n *\n * Screen readers announce only the name and role when focus lands on the scroller, so the\n * name tells the user both what the region is and which client it is generated for.\n */\nconst codeSampleAriaLabel = computed(() =>\n [codeSampleLabel, localSelectedClient.value?.title]\n .filter(Boolean)\n .join(': '),\n)\n\nconst elem = ref<ComponentPublicInstance | null>(null)\nconst visible = useExampleVisibility(elem)\nconst externalExamples = useExternalExamples(\n () =>\n getOperationExamples(operation, localExampleKey.value, selectedContentType),\n () => visible.value,\n)\nconst resolvedOperation = computed(() =>\n resolveOperationExamples(\n operation,\n localExampleKey.value,\n selectedContentType,\n externalExamples.resolve,\n ),\n)\n\n/** Keep the picker available because it also selects the example opened by Test Request. */\nconst showExamplePicker = computed(\n () => Object.keys(requestBodyExamples.value).length > 1,\n)\n\n/** Generate HAR data for webhook requests */\nconst webhookHar = computed(() => {\n if (!isWebhook) return null\n\n try {\n return operationToHar({\n operation: resolvedOperation.value,\n method,\n path,\n example: localExampleKey.value,\n openapiVersion,\n requestBodyCompositionSelection,\n // Only required parameters are shown in code examples; optional parameters\n // are omitted unless explicitly enabled via `x-disabled: false`.\n defaultDisabledParameters: true,\n })\n } catch (error) {\n console.error('[webhookHar]', error)\n return null\n }\n})\n\n/** Generate the code snippet for the selected example */\nconst generatedCode = computed<string | null>(() => {\n if (isWebhook) {\n return webhookHar.value?.postData?.text ?? ''\n }\n\n return generateCodeSnippet({\n // Only required parameters are shown in code examples; optional parameters\n // are omitted unless explicitly enabled via `x-disabled: false`.\n defaultDisabledParameters: true,\n includeDefaultHeaders: integration === 'client',\n clientId: localSelectedClient.value?.id,\n customCodeSamples: customCodeSamples.value.samples,\n operation: resolvedOperation.value,\n method,\n path,\n contentType: selectedContentType,\n server: selectedServer,\n securitySchemes,\n example: localExampleKey.value,\n globalCookies,\n openapiVersion,\n requestBodyCompositionSelection,\n })\n})\n\n/** The language for the code block, used for syntax highlighting */\nconst codeBlockLanguage = computed(() => {\n if (isWebhook) {\n return webhookLanguage.value\n }\n\n return localSelectedClient.value?.lang\n})\n\n/** Determine the language for webhook content based on MIME type */\nconst webhookLanguage = computed<string>(() => {\n if (!webhookHar.value?.postData) return 'json'\n\n const contentType = webhookHar.value.postData.mimeType\n if (contentType?.includes('json')) return 'json'\n if (contentType?.includes('xml')) return 'xml'\n if (contentType?.includes('yaml') || contentType?.includes('yml'))\n return 'yaml'\n if (contentType?.includes('text/plain')) return 'text'\n\n return 'json'\n})\n\n/** Block secrets from being shown in the code block */\nconst secretCredentials = computed(() => getSecrets(securitySchemes))\n\n/** Set custom example, or update the selected HTTP client globally */\nconst selectClient = (option: ClientOption) => {\n // We need to freeze the ui to prevent scrolling as the clients change\n if (elem.value) {\n const unfreeze = freezeElement(elem.value.$el)\n setTimeout(() => {\n unfreeze()\n }, 300)\n }\n // Update to the local example\n localSelectedClient.value = option\n\n // Sync the selection globally so other operations follow along. Custom samples\n // sync too (keyed by language), so picking e.g. the Python SDK example here\n // shows the Python example on every operation that ships one.\n if (option) {\n eventBus.emit('workspace:update:selected-client', option.id)\n }\n}\n\n// Virtualize the code block if it's too large\n// This prevents the entire app from freezing up if there's a massive example\n// We set a lower threshold here as code examples can get quite large\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\nconst shouldVirtualize = computed(\n () => (generatedCode.value?.length ?? 0) > VIRTUALIZATION_THRESHOLD,\n)\n\nconst id = useId()\n</script>\n<template>\n <ScalarCard\n v-if=\"\n generatedCode === null || generatedCode || externalExamples.pending.value\n \"\n ref=\"elem\"\n class=\"request-card dark-mode\">\n <!-- Header -->\n <ScalarCardHeader class=\"pr-2.5\">\n <span class=\"sr-only\">Request Example for</span>\n <HttpMethod\n as=\"span\"\n class=\"request-method\"\n :method=\"method\" />\n <span\n v-if=\"generateLabel\"\n v-html=\"generateLabel()\" />\n <slot name=\"header\" />\n <!-- Client picker -->\n <template\n v-if=\"!isWebhook && clientCount\"\n #actions>\n <!-- Multiple clients: render a dropdown to switch between them -->\n <ScalarCombobox\n v-if=\"clientCount > 1\"\n class=\"max-h-80\"\n :filterFn=\"filterClientsByQuery\"\n :inputLabel=\"clientSearchLabel\"\n :modelValue=\"localSelectedClient\"\n :options=\"clients\"\n placement=\"bottom-end\"\n teleport\n @update:modelValue=\"selectClient($event as ClientOption)\">\n <ScalarButton\n :aria-label=\"clientPickerAriaLabel\"\n class=\"text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-0.5 py-0 text-base font-normal\"\n data-testid=\"client-picker\"\n variant=\"ghost\">\n {{ localSelectedClient?.title }}\n <ScalarIconCaretDown\n class=\"ui-open:rotate-180 mt-px size-3 transition-transform duration-100\"\n weight=\"bold\" />\n </ScalarButton>\n </ScalarCombobox>\n <!-- Single client: just show its label, no need for a dropdown -->\n <span\n v-else\n class=\"text-c-2 flex h-full w-fit items-center px-0.5 py-0 text-base font-normal\"\n data-testid=\"client-picker\">\n {{ localSelectedClient?.title }}\n </span>\n </template>\n </ScalarCardHeader>\n\n <!-- Code snippet -->\n <ScalarCardSection class=\"request-editor-section custom-scroll p-0\">\n <div\n v-if=\"externalExamples.pending.value\"\n class=\"text-c-2 p-4\"\n role=\"status\">\n <template v-if=\"externalExamples.failed.value\">\n Could not load this example.\n <ScalarButton\n size=\"sm\"\n variant=\"ghost\"\n @click=\"externalExamples.retry\">\n Retry\n </ScalarButton>\n </template>\n <template v-else>Loading example…</template>\n </div>\n <div\n v-else-if=\"generatedCode === null\"\n class=\"text-c-2 p-4\"\n role=\"status\">\n {{ codeSampleUnavailable }}\n </div>\n <div\n v-else\n :id=\"`${id}-example`\"\n class=\"code-snippet\">\n <ScalarCodeBlock\n v-if=\"!shouldVirtualize\"\n class=\"bg-b-2 h-full\"\n :content=\"generatedCode\"\n :hideCredentials=\"secretCredentials\"\n :label=\"codeSampleAriaLabel\"\n :lang=\"codeBlockLanguage\"\n lineNumbers />\n <ScalarVirtualText\n v-else\n aria-label=\"Request code sample\"\n containerClass=\"custom-scroll scalar-code-block border rounded-b flex flex-1 max-h-screen\"\n contentClass=\"language-plaintext whitespace-pre font-code text-base p-2\"\n :lineHeight=\"20\"\n role=\"region\"\n :text=\"generatedCode\" />\n </div>\n </ScalarCardSection>\n\n <!-- Footer -->\n <ScalarCardFooter\n v-if=\"showExamplePicker || $slots.footer || $slots['footer-start']\"\n class=\"request-card-footer bg-b-3\"\n :class=\"{\n 'request-card-footer--wraps':\n !showExamplePicker && $slots['footer-start'],\n }\">\n <!-- Example picker -->\n <div\n v-if=\"showExamplePicker\"\n class=\"request-card-footer-addon\">\n <template v-if=\"Object.keys(requestBodyExamples).length\">\n <ExamplePicker\n :examples=\"requestBodyExamples\"\n :modelValue=\"localExampleKey\"\n @update:modelValue=\"selectExample\" />\n </template>\n </div>\n <!-- Otherwise the start of the footer is free for the caller -->\n <div\n v-else-if=\"$slots['footer-start']\"\n class=\"request-card-footer-start\">\n <slot name=\"footer-start\" />\n </div>\n\n <!-- Footer -->\n <slot\n :exampleName=\"localExampleKey\"\n name=\"footer\" />\n </ScalarCardFooter>\n </ScalarCard>\n\n <!-- Fallback card with just method and path in the case of no examples -->\n <ScalarCard\n v-else-if=\"fallback\"\n class=\"request-card dark-mode\">\n <ScalarCardSection class=\"request-card-simple\">\n <div class=\"request-header\">\n <HttpMethod\n as=\"span\"\n class=\"request-method\"\n :method=\"method\" />\n <slot name=\"header\" />\n </div>\n <div\n v-if=\"$slots.footer\"\n class=\"request-card-actions relative max-w-full\">\n <slot\n :exampleName=\"localExampleKey\"\n name=\"footer\" />\n </div>\n </ScalarCardSection>\n </ScalarCard>\n</template>\n<style scoped>\n.request-card {\n color: var(--scalar-color-1);\n font-size: var(--scalar-font-size-3);\n}\n.request-method {\n font-family: var(--scalar-font-code);\n margin-right: 6px;\n}\n.request-card-footer {\n display: flex;\n justify-content: flex-end;\n padding: 6px;\n flex-shrink: 0;\n position: relative;\n}\n/*\n * Footer-start content keeps its full width; when the footer is too narrow for everything,\n * the end controls wrap onto a second line instead of squeezing or covering it.\n */\n.request-card-footer--wraps {\n flex-wrap: wrap;\n row-gap: 4px;\n}\n.request-card-footer-start {\n display: flex;\n align-items: center;\n flex: 1 0 auto;\n}\n.request-card-footer-addon {\n display: flex;\n align-items: center;\n\n flex: 1;\n min-width: 0;\n}\n.request-editor-section {\n display: flex;\n flex: 1;\n}\n.request-card-simple {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n\n padding: 8px 8px 8px 12px;\n\n font-size: var(--scalar-small);\n}\n.request-header {\n /* Give spare inline space to the path, while actions fill their own row after wrapping. */\n flex: 999 1 auto;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.request-card-actions {\n flex: 1 0 auto;\n}\n.code-snippet {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n</style>\n"],"mappings":""}
@@ -37,7 +37,10 @@ var j = ["innerHTML"], M = {
37
37
  }, L = {
38
38
  key: 1,
39
39
  class: "request-card-footer-start"
40
- }, R = { class: "request-header" }, z = /*@__PURE__*/ h({
40
+ }, R = { class: "request-header" }, z = {
41
+ key: 0,
42
+ class: "request-card-actions relative max-w-full"
43
+ }, B = /*@__PURE__*/ h({
41
44
  __name: "CodeExample",
42
45
  props: {
43
46
  codeSampleUnavailable: { default: "No code sample available for this example." },
@@ -63,8 +66,8 @@ var j = ["innerHTML"], M = {
63
66
  requestBodyCompositionSelection: {}
64
67
  },
65
68
  emits: ["update:exampleKey"],
66
- setup(h, { emit: z }) {
67
- let B = z, V = c(() => {
69
+ setup(h, { emit: B }) {
70
+ let me = B, V = c(() => {
68
71
  let e = E(h.operation.requestBody)?.content ?? {}, t = h.selectedContentType || Object.keys(e)[0];
69
72
  return t ? e[t]?.examples ?? {} : {};
70
73
  }), H = _(""), U = (e) => {
@@ -78,16 +81,16 @@ var j = ["innerHTML"], M = {
78
81
  }), x(() => h.selectedContentType, () => {
79
82
  Object.keys(V.value).includes(H.value) || (H.value = U(h.selectedExample));
80
83
  }), oe(() => {
81
- B("update:exampleKey", H.value);
84
+ me("update:exampleKey", H.value);
82
85
  });
83
- let me = (e) => {
86
+ let he = (e) => {
84
87
  H.value = e, h.eventBus.emit("workspace:update:selected-example", e);
85
88
  }, W = c(() => a(h.operation)), G = c(() => ee(W.value.samples, h.clientOptions, W.value.label)), K = c(() => G.value.reduce((e, t) => e + t.options.length, 0)), q = _(n(G.value, h.selectedClient));
86
89
  x([() => h.selectedClient, G], ([e]) => {
87
90
  let t = n(G.value, e);
88
91
  t && (q.value = t);
89
92
  });
90
- let he = c(() => [h.clientPickerLabel, q.value?.title].filter(Boolean).join(": ")), ge = c(() => [h.codeSampleLabel, q.value?.title].filter(Boolean).join(": ")), J = _(null), _e = k(J), Y = A(() => D(h.operation, H.value, h.selectedContentType), () => _e.value), X = c(() => O(h.operation, H.value, h.selectedContentType, Y.resolve)), Z = c(() => Object.keys(V.value).length > 1), Q = c(() => {
93
+ let ge = c(() => [h.clientPickerLabel, q.value?.title].filter(Boolean).join(": ")), _e = c(() => [h.codeSampleLabel, q.value?.title].filter(Boolean).join(": ")), J = _(null), ve = k(J), Y = A(() => D(h.operation, H.value, h.selectedContentType), () => ve.value), X = c(() => O(h.operation, H.value, h.selectedContentType, Y.resolve)), Z = c(() => Object.keys(V.value).length > 1), Q = c(() => {
91
94
  if (!h.isWebhook) return null;
92
95
  try {
93
96
  return r({
@@ -117,11 +120,11 @@ var j = ["innerHTML"], M = {
117
120
  globalCookies: h.globalCookies,
118
121
  openapiVersion: h.openapiVersion,
119
122
  requestBodyCompositionSelection: h.requestBodyCompositionSelection
120
- })), ve = c(() => h.isWebhook ? ye.value : q.value?.lang), ye = c(() => {
123
+ })), ye = c(() => h.isWebhook ? be.value : q.value?.lang), be = c(() => {
121
124
  if (!Q.value?.postData) return "json";
122
125
  let e = Q.value.postData.mimeType;
123
126
  return e?.includes("json") ? "json" : e?.includes("xml") ? "xml" : e?.includes("yaml") || e?.includes("yml") ? "yaml" : e?.includes("text/plain") ? "text" : "json";
124
- }), be = c(() => te(h.securitySchemes)), xe = (e) => {
127
+ }), xe = c(() => te(h.securitySchemes)), Se = (e) => {
125
128
  if (J.value) {
126
129
  let e = pe(J.value.$el);
127
130
  setTimeout(() => {
@@ -129,7 +132,7 @@ var j = ["innerHTML"], M = {
129
132
  }, 300);
130
133
  }
131
134
  q.value = e, e && h.eventBus.emit("workspace:update:selected-client", e.id);
132
- }, Se = c(() => ($.value?.length ?? 0) > 2e4), Ce = ae();
135
+ }, Ce = c(() => ($.value?.length ?? 0) > 2e4), we = ae();
133
136
  return (n, r) => $.value === null || $.value || b(Y).pending.value ? (g(), l(b(C), {
134
137
  key: 0,
135
138
  ref_key: "elem",
@@ -163,10 +166,10 @@ var j = ["innerHTML"], M = {
163
166
  options: G.value,
164
167
  placement: "bottom-end",
165
168
  teleport: "",
166
- "onUpdate:modelValue": r[0] ||= (e) => xe(e)
169
+ "onUpdate:modelValue": r[0] ||= (e) => Se(e)
167
170
  }, {
168
171
  default: S(() => [m(b(T), {
169
- "aria-label": he.value,
172
+ "aria-label": ge.value,
170
173
  class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-0.5 py-0 text-base font-normal",
171
174
  "data-testid": "client-picker",
172
175
  variant: "ghost"
@@ -196,9 +199,9 @@ var j = ["innerHTML"], M = {
196
199
  _: 1
197
200
  }, 8, ["onClick"])], 64)) : (g(), d(s, { key: 1 }, [p("Loading example…")], 64))])) : $.value === null ? (g(), d("div", P, y(h.codeSampleUnavailable), 1)) : (g(), d("div", {
198
201
  key: 2,
199
- id: `${b(Ce)}-example`,
202
+ id: `${b(we)}-example`,
200
203
  class: "code-snippet"
201
- }, [Se.value ? (g(), l(b(fe), {
204
+ }, [Ce.value ? (g(), l(b(fe), {
202
205
  key: 1,
203
206
  "aria-label": "Request code sample",
204
207
  containerClass: "custom-scroll scalar-code-block border rounded-b flex flex-1 max-h-screen",
@@ -210,9 +213,9 @@ var j = ["innerHTML"], M = {
210
213
  key: 0,
211
214
  class: "bg-b-2 h-full",
212
215
  content: $.value,
213
- hideCredentials: be.value,
214
- label: ge.value,
215
- lang: ve.value,
216
+ hideCredentials: xe.value,
217
+ label: _e.value,
218
+ lang: ye.value,
216
219
  lineNumbers: ""
217
220
  }, null, 8, [
218
221
  "content",
@@ -230,7 +233,7 @@ var j = ["innerHTML"], M = {
230
233
  key: 0,
231
234
  examples: V.value,
232
235
  modelValue: H.value,
233
- "onUpdate:modelValue": me
236
+ "onUpdate:modelValue": he
234
237
  }, null, 8, ["examples", "modelValue"])) : u("", !0)])) : n.$slots["footer-start"] ? (g(), d("div", L, [v(n.$slots, "footer-start", {}, void 0, !0)])) : u("", !0), v(n.$slots, "footer", { exampleName: H.value }, void 0, !0)]),
235
238
  _: 3
236
239
  }, 8, ["class"])) : u("", !0)
@@ -245,7 +248,7 @@ var j = ["innerHTML"], M = {
245
248
  as: "span",
246
249
  class: "request-method",
247
250
  method: h.method
248
- }, null, 8, ["method"]), v(n.$slots, "header", {}, void 0, !0)]), v(n.$slots, "footer", { exampleName: H.value }, void 0, !0)]),
251
+ }, null, 8, ["method"]), v(n.$slots, "header", {}, void 0, !0)]), n.$slots.footer ? (g(), d("div", z, [v(n.$slots, "footer", { exampleName: H.value }, void 0, !0)])) : u("", !0)]),
249
252
  _: 3
250
253
  })]),
251
254
  _: 3
@@ -253,6 +256,6 @@ var j = ["innerHTML"], M = {
253
256
  }
254
257
  });
255
258
  //#endregion
256
- export { z as default };
259
+ export { B as default };
257
260
 
258
261
  //# sourceMappingURL=CodeExample.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CodeExample.vue_vue_type_script_setup_true_lang.js","names":["$slots","_unref","_openBlock","_createBlock","_withCtx","_createVNode","_createSlots","_createElementVNode","HttpMethod","_createElementBlock","_createCommentVNode","_renderSlot","_createTextVNode","_toDisplayString","_Fragment","_normalizeClass","ExamplePicker","ExamplePicker_default","HttpMethod_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","CodeExample_vue_vue_type_script_setup_true_lang_default","__emit","emit","requestBodyExamples","computed","content","getResolvedRef","__props","contentType","localExampleKey","ref","resolveExampleKey","keys","preferred","onBeforeMount","watch","watchEffect","selectExample","key","customCodeSamples","getCustomCodeSamples","clients","getClients","clientCount","total","group","localSelectedClient","findClient","newClient","client","clientPickerAriaLabel","codeSampleAriaLabel","elem","visible","useExampleVisibility","externalExamples","useExternalExamples","getOperationExamples","resolvedOperation","resolveOperationExamples","showExamplePicker","webhookHar","operationToHar","error","generatedCode","generateCodeSnippet","codeBlockLanguage","webhookLanguage","secretCredentials","getSecrets","selectClient","unfreeze","freezeElement","option","shouldVirtualize","id","useId","unref","openBlock","createBlock","ScalarCard","withCtx","createVNode","ScalarCardHeader","createSlots","_cache","createElementVNode","createElementBlock","createCommentVNode","renderSlot","_ctx","ScalarCombobox","filterClientsByQuery","$event","ScalarButton","createTextVNode","toDisplayString","ScalarIconCaretDown","ScalarCardSection","Fragment","ScalarVirtualText","ScalarCodeBlock","ScalarCardFooter","normalizeClass"],"sources":["../../../src/code-example/components/CodeExample.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type CodeExampleProps = {\n /** Localized status text shown when the selected example has no linked code sample. */\n codeSampleUnavailable?: string\n /**\n * Localized purpose of the client picker. It opens the button's accessible name and the\n * selected client's title is appended, so the name still contains the visible label.\n */\n clientPickerLabel?: string\n /** Localized accessible name for the search field inside the client picker. */\n clientSearchLabel?: string\n /**\n * Localized accessible name for the focusable code sample. The selected client's title is\n * appended so the announcement also says which language the sample is in.\n */\n codeSampleLabel?: string\n /**\n * Integration type: determines if the code sample is displayed in a client environment\n * or in an API reference environment.\n */\n integration?: 'client' | 'reference'\n /**\n * List of all http clients formatted into option groups for the client selector\n */\n clientOptions: ClientOptionGroup[]\n /**\n * Pre-selected client, this will determine which client is initially selected in the dropdown.\n * Either a built-in client id (e.g. `js/fetch`) or a custom sample id (e.g. `custom/python`).\n *\n * Typed as a plain string: unioning the (large) client-id union with the `custom/...`\n * ids overflows TypeScript's union-complexity limit inside this component's `defineProps`.\n *\n * @defaults to a custom sample if one is available, otherwise shell/curl\n */\n selectedClient?: string\n /**\n * Which server from the spec to use for the code example\n */\n selectedServer?: ServerObject | null\n /**\n * The selected content type from the requestBody.content, this will determine which examples are available\n * as well as the content type of the code example\n *\n * @defaults to the first content type if not provided\n */\n selectedContentType?: string\n /**\n * Example name to use for resolving example values for parameters AND requestBody.\n *\n * This is the document-wide selection: it is honored only when this operation defines an example\n * with the same key, so picking an example on one operation syncs the rest without blanking out\n * operations that do not share that key.\n *\n * @example \"limited\"\n * ```ts\n * parameters: {\n * name: 'foobar',\n * in: 'query',\n * examples: {\n * limited: {\n * dataValue: 10,\n * }\n * }\n * },\n * body: {\n * content: {\n * 'application/json': {\n * examples: {\n * limited: {\n * dataValue: { foo: 'bar' },\n * }\n * }\n * }\n * }\n * }\n *\n * ```\n */\n selectedExample?: string\n /**\n * Event bus\n */\n eventBus: WorkspaceEventBus\n /**\n * The security schemes which are applicable to this operation\n */\n securitySchemes: SecuritySchemeObjectSecret[]\n /**\n * HTTP method of the operation\n */\n method: string\n /**\n * Path of the operation\n */\n path: string\n /**\n * De-referenced OpenAPI Operation object\n */\n operation: OperationObject\n /**\n * If true and there's no example, we will display a small card with the method and path only\n */\n fallback?: boolean\n /**\n * A method to generate the label of the block, should return an html string\n */\n generateLabel?: () => string\n /**\n * If true, render this as a webhook request example\n */\n isWebhook?: boolean\n /**\n * Workspace + document cookies\n */\n globalCookies?: XScalarCookie[]\n /**\n * When the request body schema uses oneOf/anyOf, use these selected variants\n * for the example snippet (e.g. from the schema dropdowns in the API reference).\n */\n /** Originating OpenAPI version, used for XML mapping rules. */\n openapiVersion?: string\n requestBodyCompositionSelection?: Record<string, number>\n}\n\n/**\n * Request Example\n *\n * The core component for rendering a request example block,\n * this component does not have much of its own state but operates on props and custom events\n *\n * @event workspace:update:selected-client - Emitted when the selected client changes\n * @event workspace:update:selected-example - Emitted when the selected example changes, so other operations can sync\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport {\n ScalarCard,\n ScalarCardFooter,\n ScalarCardHeader,\n ScalarCardSection,\n} from '@scalar/components/card'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarCombobox } from '@scalar/components/combobox'\nimport { ScalarVirtualText } from '@scalar/components/virtual-text'\nimport { freezeElement } from '@scalar/helpers/dom/freeze-element'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport {\n getOperationExamples,\n resolveOperationExamples,\n} from '@scalar/workspace-store/helpers/operation-examples'\nimport {\n useExampleVisibility,\n useExternalExamples,\n} from '@scalar/workspace-store/helpers/use-external-examples'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies'\nimport type {\n OperationObject,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n computed,\n onBeforeMount,\n ref,\n useId,\n watch,\n watchEffect,\n type ComponentPublicInstance,\n} from 'vue'\n\nimport { filterClientsByQuery } from '../helpers/filter-clients-by-query'\nimport { findClient } from '../helpers/find-client'\nimport { generateCodeSnippet } from '../helpers/generate-code-snippet'\nimport { getClients } from '../helpers/get-clients'\nimport { getCustomCodeSamples } from '../helpers/get-custom-code-samples'\nimport { getSecrets } from '../helpers/get-secrets'\nimport { operationToHar } from '../helpers/operation-to-har/operation-to-har'\nimport type {\n ClientOption,\n ClientOptionGroup,\n CustomClientOption,\n} from '../types'\nimport ExamplePicker from './ExamplePicker.vue'\nimport HttpMethod from './HttpMethod.vue'\n\nconst {\n integration,\n codeSampleUnavailable = 'No code sample available for this example.',\n clientPickerLabel = 'Change code sample language',\n clientSearchLabel = 'Search clients',\n codeSampleLabel = 'Code sample',\n clientOptions,\n selectedClient,\n selectedServer = null,\n selectedContentType,\n selectedExample,\n securitySchemes = [],\n method,\n eventBus,\n path,\n operation,\n isWebhook,\n generateLabel,\n globalCookies,\n openapiVersion,\n requestBodyCompositionSelection,\n} = defineProps<CodeExampleProps>()\n\nconst emit = defineEmits<{\n /**\n * Emitted whenever the example key actually shown for this operation changes.\n *\n * This is the resolved local key (not the raw document-wide selection), so layouts that render\n * the test-request button outside this component can open the client with the same example the\n * snippet displays.\n */\n (e: 'update:exampleKey', value: string): void\n}>()\n\ndefineSlots<{\n 'header': () => unknown\n /** Rendered at the start of the footer, only while the example picker does not need that space */\n 'footer-start'?: () => unknown\n 'footer': ({ exampleName }: { exampleName: string }) => unknown\n}>()\n\n/** Grab the examples for the given content type */\nconst requestBodyExamples = computed(() => {\n const content = getResolvedRef(operation.requestBody)?.content ?? {}\n const contentType = selectedContentType || Object.keys(content)[0]\n if (!contentType) return {}\n\n const examples = content[contentType]?.examples ?? {}\n\n return examples\n})\n\n/**\n * The example key actually shown for this operation.\n *\n * `selectedExample` is the document-wide selection that syncs across operations. We honor it only\n * when this operation actually defines that key, otherwise we keep the local example: a selection\n * on one operation should never blank out an operation that does not share the same example.\n */\nconst localExampleKey = ref('')\n\n/** Resolve the key to display, preferring the document-wide selection when this operation has it */\nconst resolveExampleKey = (preferred: string | undefined): string => {\n const keys = Object.keys(requestBodyExamples.value)\n if (preferred && keys.includes(preferred)) {\n return preferred\n }\n // Keep the current local example when it is still valid, otherwise fall back to the first one\n if (localExampleKey.value && keys.includes(localExampleKey.value)) {\n return localExampleKey.value\n }\n return keys[0] ?? ''\n}\n\n// Set the initial example from the document-wide selection, falling back to the first example\nonBeforeMount(() => {\n localExampleKey.value = resolveExampleKey(selectedExample)\n})\n\n// Follow the document-wide selection when it changes and this operation has that example\nwatch(\n () => selectedExample,\n (preferred) => {\n localExampleKey.value = resolveExampleKey(preferred)\n },\n)\n\n/** Reset the selected example key if the content type changes and the new content type doesn't have the previously selected example */\nwatch(\n () => selectedContentType,\n () => {\n if (\n !Object.keys(requestBodyExamples.value).includes(localExampleKey.value)\n ) {\n // Re-resolve so the new content type still follows the document-wide selection when it has\n // that key, instead of always snapping back to the first example\n localExampleKey.value = resolveExampleKey(selectedExample)\n }\n },\n)\n\n// Keep the parent informed of the resolved key so a test-request button rendered outside this\n// component (e.g. the classic layout header) opens the client with the example the snippet shows\nwatchEffect(() => {\n emit('update:exampleKey', localExampleKey.value)\n})\n\n/** Select an example locally and sync the choice across the document */\nconst selectExample = (key: string) => {\n localExampleKey.value = key\n eventBus.emit('workspace:update:selected-example', key)\n}\n\n/** Grab any custom code samples from the operation */\nconst customCodeSamples = computed(() => getCustomCodeSamples(operation))\n\n/** Merge custom code samples with the client options */\nconst clients = computed(() =>\n getClients(\n customCodeSamples.value.samples,\n clientOptions,\n customCodeSamples.value.label,\n ),\n)\n\n/** Total number of available clients across all option groups */\nconst clientCount = computed(() =>\n clients.value.reduce((total, group) => total + group.options.length, 0),\n)\n\n/** The locally selected client which would include code samples from this operation only */\nconst localSelectedClient = ref<ClientOption | CustomClientOption | undefined>(\n findClient(clients.value, selectedClient),\n)\n\n/**\n * Re-resolve the local client whenever the global selection or the available\n * clients change. Watching `clients` matters when navigating between operations:\n * the stored id stays the same, but the matching option (e.g. a custom sample)\n * differs per operation, so without this the snippet could go stale.\n */\nwatch([() => selectedClient, clients], ([newClient]) => {\n const client = findClient(clients.value, newClient)\n if (client) {\n localSelectedClient.value = client\n }\n})\n\n/**\n * Accessible name for the client picker.\n *\n * On its own the button reads as its current value (\"C Libcurl\"), which never\n * says what activating it does. The visible title stays part of the name so it\n * still matches what is on screen.\n */\nconst clientPickerAriaLabel = computed(() =>\n [clientPickerLabel, localSelectedClient.value?.title]\n .filter(Boolean)\n .join(': '),\n)\n\n/**\n * Accessible name for the focusable code sample, e.g. \"Code sample: Shell cURL\".\n *\n * Screen readers announce only the name and role when focus lands on the scroller, so the\n * name tells the user both what the region is and which client it is generated for.\n */\nconst codeSampleAriaLabel = computed(() =>\n [codeSampleLabel, localSelectedClient.value?.title]\n .filter(Boolean)\n .join(': '),\n)\n\nconst elem = ref<ComponentPublicInstance | null>(null)\nconst visible = useExampleVisibility(elem)\nconst externalExamples = useExternalExamples(\n () =>\n getOperationExamples(operation, localExampleKey.value, selectedContentType),\n () => visible.value,\n)\nconst resolvedOperation = computed(() =>\n resolveOperationExamples(\n operation,\n localExampleKey.value,\n selectedContentType,\n externalExamples.resolve,\n ),\n)\n\n/** Keep the picker available because it also selects the example opened by Test Request. */\nconst showExamplePicker = computed(\n () => Object.keys(requestBodyExamples.value).length > 1,\n)\n\n/** Generate HAR data for webhook requests */\nconst webhookHar = computed(() => {\n if (!isWebhook) return null\n\n try {\n return operationToHar({\n operation: resolvedOperation.value,\n method,\n path,\n example: localExampleKey.value,\n openapiVersion,\n requestBodyCompositionSelection,\n // Only required parameters are shown in code examples; optional parameters\n // are omitted unless explicitly enabled via `x-disabled: false`.\n defaultDisabledParameters: true,\n })\n } catch (error) {\n console.error('[webhookHar]', error)\n return null\n }\n})\n\n/** Generate the code snippet for the selected example */\nconst generatedCode = computed<string | null>(() => {\n if (isWebhook) {\n return webhookHar.value?.postData?.text ?? ''\n }\n\n return generateCodeSnippet({\n // Only required parameters are shown in code examples; optional parameters\n // are omitted unless explicitly enabled via `x-disabled: false`.\n defaultDisabledParameters: true,\n includeDefaultHeaders: integration === 'client',\n clientId: localSelectedClient.value?.id,\n customCodeSamples: customCodeSamples.value.samples,\n operation: resolvedOperation.value,\n method,\n path,\n contentType: selectedContentType,\n server: selectedServer,\n securitySchemes,\n example: localExampleKey.value,\n globalCookies,\n openapiVersion,\n requestBodyCompositionSelection,\n })\n})\n\n/** The language for the code block, used for syntax highlighting */\nconst codeBlockLanguage = computed(() => {\n if (isWebhook) {\n return webhookLanguage.value\n }\n\n return localSelectedClient.value?.lang\n})\n\n/** Determine the language for webhook content based on MIME type */\nconst webhookLanguage = computed<string>(() => {\n if (!webhookHar.value?.postData) return 'json'\n\n const contentType = webhookHar.value.postData.mimeType\n if (contentType?.includes('json')) return 'json'\n if (contentType?.includes('xml')) return 'xml'\n if (contentType?.includes('yaml') || contentType?.includes('yml'))\n return 'yaml'\n if (contentType?.includes('text/plain')) return 'text'\n\n return 'json'\n})\n\n/** Block secrets from being shown in the code block */\nconst secretCredentials = computed(() => getSecrets(securitySchemes))\n\n/** Set custom example, or update the selected HTTP client globally */\nconst selectClient = (option: ClientOption) => {\n // We need to freeze the ui to prevent scrolling as the clients change\n if (elem.value) {\n const unfreeze = freezeElement(elem.value.$el)\n setTimeout(() => {\n unfreeze()\n }, 300)\n }\n // Update to the local example\n localSelectedClient.value = option\n\n // Sync the selection globally so other operations follow along. Custom samples\n // sync too (keyed by language), so picking e.g. the Python SDK example here\n // shows the Python example on every operation that ships one.\n if (option) {\n eventBus.emit('workspace:update:selected-client', option.id)\n }\n}\n\n// Virtualize the code block if it's too large\n// This prevents the entire app from freezing up if there's a massive example\n// We set a lower threshold here as code examples can get quite large\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\nconst shouldVirtualize = computed(\n () => (generatedCode.value?.length ?? 0) > VIRTUALIZATION_THRESHOLD,\n)\n\nconst id = useId()\n</script>\n<template>\n <ScalarCard\n v-if=\"\n generatedCode === null || generatedCode || externalExamples.pending.value\n \"\n ref=\"elem\"\n class=\"request-card dark-mode\">\n <!-- Header -->\n <ScalarCardHeader class=\"pr-2.5\">\n <span class=\"sr-only\">Request Example for</span>\n <HttpMethod\n as=\"span\"\n class=\"request-method\"\n :method=\"method\" />\n <span\n v-if=\"generateLabel\"\n v-html=\"generateLabel()\" />\n <slot name=\"header\" />\n <!-- Client picker -->\n <template\n v-if=\"!isWebhook && clientCount\"\n #actions>\n <!-- Multiple clients: render a dropdown to switch between them -->\n <ScalarCombobox\n v-if=\"clientCount > 1\"\n class=\"max-h-80\"\n :filterFn=\"filterClientsByQuery\"\n :inputLabel=\"clientSearchLabel\"\n :modelValue=\"localSelectedClient\"\n :options=\"clients\"\n placement=\"bottom-end\"\n teleport\n @update:modelValue=\"selectClient($event as ClientOption)\">\n <ScalarButton\n :aria-label=\"clientPickerAriaLabel\"\n class=\"text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-0.5 py-0 text-base font-normal\"\n data-testid=\"client-picker\"\n variant=\"ghost\">\n {{ localSelectedClient?.title }}\n <ScalarIconCaretDown\n class=\"ui-open:rotate-180 mt-px size-3 transition-transform duration-100\"\n weight=\"bold\" />\n </ScalarButton>\n </ScalarCombobox>\n <!-- Single client: just show its label, no need for a dropdown -->\n <span\n v-else\n class=\"text-c-2 flex h-full w-fit items-center px-0.5 py-0 text-base font-normal\"\n data-testid=\"client-picker\">\n {{ localSelectedClient?.title }}\n </span>\n </template>\n </ScalarCardHeader>\n\n <!-- Code snippet -->\n <ScalarCardSection class=\"request-editor-section custom-scroll p-0\">\n <div\n v-if=\"externalExamples.pending.value\"\n class=\"text-c-2 p-4\"\n role=\"status\">\n <template v-if=\"externalExamples.failed.value\">\n Could not load this example.\n <ScalarButton\n size=\"sm\"\n variant=\"ghost\"\n @click=\"externalExamples.retry\">\n Retry\n </ScalarButton>\n </template>\n <template v-else>Loading example…</template>\n </div>\n <div\n v-else-if=\"generatedCode === null\"\n class=\"text-c-2 p-4\"\n role=\"status\">\n {{ codeSampleUnavailable }}\n </div>\n <div\n v-else\n :id=\"`${id}-example`\"\n class=\"code-snippet\">\n <ScalarCodeBlock\n v-if=\"!shouldVirtualize\"\n class=\"bg-b-2 h-full\"\n :content=\"generatedCode\"\n :hideCredentials=\"secretCredentials\"\n :label=\"codeSampleAriaLabel\"\n :lang=\"codeBlockLanguage\"\n lineNumbers />\n <ScalarVirtualText\n v-else\n aria-label=\"Request code sample\"\n containerClass=\"custom-scroll scalar-code-block border rounded-b flex flex-1 max-h-screen\"\n contentClass=\"language-plaintext whitespace-pre font-code text-base p-2\"\n :lineHeight=\"20\"\n role=\"region\"\n :text=\"generatedCode\" />\n </div>\n </ScalarCardSection>\n\n <!-- Footer -->\n <ScalarCardFooter\n v-if=\"showExamplePicker || $slots.footer || $slots['footer-start']\"\n class=\"request-card-footer bg-b-3\"\n :class=\"{\n 'request-card-footer--wraps':\n !showExamplePicker && $slots['footer-start'],\n }\">\n <!-- Example picker -->\n <div\n v-if=\"showExamplePicker\"\n class=\"request-card-footer-addon\">\n <template v-if=\"Object.keys(requestBodyExamples).length\">\n <ExamplePicker\n :examples=\"requestBodyExamples\"\n :modelValue=\"localExampleKey\"\n @update:modelValue=\"selectExample\" />\n </template>\n </div>\n <!-- Otherwise the start of the footer is free for the caller -->\n <div\n v-else-if=\"$slots['footer-start']\"\n class=\"request-card-footer-start\">\n <slot name=\"footer-start\" />\n </div>\n\n <!-- Footer -->\n <slot\n :exampleName=\"localExampleKey\"\n name=\"footer\" />\n </ScalarCardFooter>\n </ScalarCard>\n\n <!-- Fallback card with just method and path in the case of no examples -->\n <ScalarCard\n v-else-if=\"fallback\"\n class=\"request-card dark-mode\">\n <ScalarCardSection class=\"request-card-simple\">\n <div class=\"request-header\">\n <HttpMethod\n as=\"span\"\n class=\"request-method\"\n :method=\"method\" />\n <slot name=\"header\" />\n </div>\n <slot\n :exampleName=\"localExampleKey\"\n name=\"footer\" />\n </ScalarCardSection>\n </ScalarCard>\n</template>\n<style scoped>\n.request-card {\n color: var(--scalar-color-1);\n font-size: var(--scalar-font-size-3);\n}\n.request-method {\n font-family: var(--scalar-font-code);\n margin-right: 6px;\n}\n.request-card-footer {\n display: flex;\n justify-content: flex-end;\n padding: 6px;\n flex-shrink: 0;\n position: relative;\n}\n/*\n * Footer-start content keeps its full width; when the footer is too narrow for everything,\n * the end controls wrap onto a second line instead of squeezing or covering it.\n */\n.request-card-footer--wraps {\n flex-wrap: wrap;\n row-gap: 4px;\n}\n.request-card-footer-start {\n display: flex;\n align-items: center;\n flex: 1 0 auto;\n}\n.request-card-footer-addon {\n display: flex;\n align-items: center;\n\n flex: 1;\n min-width: 0;\n}\n.request-editor-section {\n display: flex;\n flex: 1;\n}\n.request-card-simple {\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n padding: 8px 8px 8px 12px;\n\n font-size: var(--scalar-small);\n}\n.code-snippet {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqNA,IAAM6B,IAAOD,GAmBPE,IAAsBC,QAAe;GACzC,IAAMC,IAAUC,EAAeC,EAAA,UAAU,WAAW,CAAC,EAAE,WAAW,CAAC,GAC7DC,IAAcD,EAAA,uBAAuB,OAAO,KAAKF,CAAO,CAAC,CAAC;GAKhE,OAJKG,IAEYH,EAAQG,EAAY,EAAE,YAAY,CAAC,IAF3B,CAAC;EAK5B,CAAC,GASKC,IAAkBC,EAAI,EAAE,GAGxBC,KAAqB,MAA0C;GACnE,IAAMC,IAAO,OAAO,KAAKT,EAAoB,KAAK;GAQlD,OAPIU,KAAaD,EAAK,SAASC,CAAS,IAC/BA,IAGLJ,EAAgB,SAASG,EAAK,SAASH,EAAgB,KAAK,IACvDA,EAAgB,QAElBG,EAAK,MAAM;EACpB;EA+BA,AA5BAE,SAAoB;GAClB,EAAgB,QAAQH,EAAkBJ,EAAA,eAAe;EAC3D,CAAC,GAGDQ,QACQR,EAAA,kBACL,MAAc;GACb,EAAgB,QAAQI,EAAkBE,CAAS;EACrD,CACF,GAGAE,QACQR,EAAA,2BACA;GACJ,AACG,OAAO,KAAKJ,EAAoB,KAAK,CAAC,CAAC,SAASM,EAAgB,KAAK,MAItE,EAAgB,QAAQE,EAAkBJ,EAAA,eAAe;EAE7D,CACF,GAIAS,SAAkB;GAChB,EAAK,qBAAqBP,EAAgB,KAAK;EACjD,CAAC;EAGD,IAAMQ,MAAiB,MAAgB;GAErC,AADA,EAAgB,QAAQC,GACxBX,EAAA,SAAS,KAAK,qCAAqCW,CAAG;EACxD,GAGMC,IAAoBf,QAAegB,EAAqBb,EAAA,SAA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CAAAoD,EAAA,SAAqBnE,EAAAA,OAAM,gB;;KAKtF,SAAAI,QASM,CARE+D,EAAA,SADRjE,EAAA,GAAAO,EASM,OATNe,GASM,CANY,OAAO,KAAKM,EAAA,KAAmB,CAAA,CAAE,UAC/C5B,EAAA,GAAAC,EAGuCa,GAAA;;MAFpC,UAAUc,EAAA;MACV,YAAYM,EAAA;MACZ,uBAAmBQ;K,0DAKb5C,EAAAA,OAAM,mBADnBE,EAAA,GAAAO,EAIM,OAJNgB,GAIM,CADJd,EAA4BsF,EAAA,QAAA,gBAAA,CAAA,GAAA,KAAA,GAAA,EAAA,C,iBAI9BtF,EAEkBsF,EAAA,QAAA,UAAA,EADf,aAAa7D,EAAA,MAAe,GAAA,KAAA,GAAA,EAAA,C;;;;;E,WAOtBF,EAAA,YADbhC,EAAA,GAAAC,EAeaF,EAAAsF,CAAA,GAAA;;GAbX,OAAM;;GACN,SAAAnF,QAWoB,CAXpBC,EAWoBJ,EAAAwG,CAAA,GAAA,EAXD,OAAM,sBAAqB,GAAA;IAC5C,SAAArG,QAMM,CANNG,EAMM,OANNmB,GAMM,CALJrB,EAGqBG,GAAA;KAFnB,IAAG;KACH,OAAM;KACL,QAAQ0B,EAAA;I,yBACXvB,EAAsBsF,EAAA,QAAA,UAAA,CAAA,GAAA,KAAA,GAAA,EAAA,C,IAExBtF,EAEkBsF,EAAA,QAAA,UAAA,EADf,aAAa7D,EAAA,MAAe,GAAA,KAAA,GAAA,EAAA,C"}
1
+ {"version":3,"file":"CodeExample.vue_vue_type_script_setup_true_lang.js","names":["$slots","_unref","_openBlock","_createBlock","_withCtx","_createVNode","_createSlots","_createElementVNode","HttpMethod","_createElementBlock","_createCommentVNode","_renderSlot","_createTextVNode","_toDisplayString","_Fragment","_normalizeClass","ExamplePicker","ExamplePicker_default","HttpMethod_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","CodeExample_vue_vue_type_script_setup_true_lang_default","__emit","emit","requestBodyExamples","computed","content","getResolvedRef","__props","contentType","localExampleKey","ref","resolveExampleKey","keys","preferred","onBeforeMount","watch","watchEffect","selectExample","key","customCodeSamples","getCustomCodeSamples","clients","getClients","clientCount","total","group","localSelectedClient","findClient","newClient","client","clientPickerAriaLabel","codeSampleAriaLabel","elem","visible","useExampleVisibility","externalExamples","useExternalExamples","getOperationExamples","resolvedOperation","resolveOperationExamples","showExamplePicker","webhookHar","operationToHar","error","generatedCode","generateCodeSnippet","codeBlockLanguage","webhookLanguage","secretCredentials","getSecrets","selectClient","unfreeze","freezeElement","option","shouldVirtualize","id","useId","unref","openBlock","createBlock","ScalarCard","withCtx","createVNode","ScalarCardHeader","createSlots","_cache","createElementVNode","createElementBlock","createCommentVNode","renderSlot","_ctx","ScalarCombobox","filterClientsByQuery","$event","ScalarButton","createTextVNode","toDisplayString","ScalarIconCaretDown","ScalarCardSection","Fragment","ScalarVirtualText","ScalarCodeBlock","ScalarCardFooter","normalizeClass"],"sources":["../../../src/code-example/components/CodeExample.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type CodeExampleProps = {\n /** Localized status text shown when the selected example has no linked code sample. */\n codeSampleUnavailable?: string\n /**\n * Localized purpose of the client picker. It opens the button's accessible name and the\n * selected client's title is appended, so the name still contains the visible label.\n */\n clientPickerLabel?: string\n /** Localized accessible name for the search field inside the client picker. */\n clientSearchLabel?: string\n /**\n * Localized accessible name for the focusable code sample. The selected client's title is\n * appended so the announcement also says which language the sample is in.\n */\n codeSampleLabel?: string\n /**\n * Integration type: determines if the code sample is displayed in a client environment\n * or in an API reference environment.\n */\n integration?: 'client' | 'reference'\n /**\n * List of all http clients formatted into option groups for the client selector\n */\n clientOptions: ClientOptionGroup[]\n /**\n * Pre-selected client, this will determine which client is initially selected in the dropdown.\n * Either a built-in client id (e.g. `js/fetch`) or a custom sample id (e.g. `custom/python`).\n *\n * Typed as a plain string: unioning the (large) client-id union with the `custom/...`\n * ids overflows TypeScript's union-complexity limit inside this component's `defineProps`.\n *\n * @defaults to a custom sample if one is available, otherwise shell/curl\n */\n selectedClient?: string\n /**\n * Which server from the spec to use for the code example\n */\n selectedServer?: ServerObject | null\n /**\n * The selected content type from the requestBody.content, this will determine which examples are available\n * as well as the content type of the code example\n *\n * @defaults to the first content type if not provided\n */\n selectedContentType?: string\n /**\n * Example name to use for resolving example values for parameters AND requestBody.\n *\n * This is the document-wide selection: it is honored only when this operation defines an example\n * with the same key, so picking an example on one operation syncs the rest without blanking out\n * operations that do not share that key.\n *\n * @example \"limited\"\n * ```ts\n * parameters: {\n * name: 'foobar',\n * in: 'query',\n * examples: {\n * limited: {\n * dataValue: 10,\n * }\n * }\n * },\n * body: {\n * content: {\n * 'application/json': {\n * examples: {\n * limited: {\n * dataValue: { foo: 'bar' },\n * }\n * }\n * }\n * }\n * }\n *\n * ```\n */\n selectedExample?: string\n /**\n * Event bus\n */\n eventBus: WorkspaceEventBus\n /**\n * The security schemes which are applicable to this operation\n */\n securitySchemes: SecuritySchemeObjectSecret[]\n /**\n * HTTP method of the operation\n */\n method: string\n /**\n * Path of the operation\n */\n path: string\n /**\n * De-referenced OpenAPI Operation object\n */\n operation: OperationObject\n /**\n * If true and there's no example, we will display a small card with the method and path only\n */\n fallback?: boolean\n /**\n * A method to generate the label of the block, should return an html string\n */\n generateLabel?: () => string\n /**\n * If true, render this as a webhook request example\n */\n isWebhook?: boolean\n /**\n * Workspace + document cookies\n */\n globalCookies?: XScalarCookie[]\n /**\n * When the request body schema uses oneOf/anyOf, use these selected variants\n * for the example snippet (e.g. from the schema dropdowns in the API reference).\n */\n /** Originating OpenAPI version, used for XML mapping rules. */\n openapiVersion?: string\n requestBodyCompositionSelection?: Record<string, number>\n}\n\n/**\n * Request Example\n *\n * The core component for rendering a request example block,\n * this component does not have much of its own state but operates on props and custom events\n *\n * @event workspace:update:selected-client - Emitted when the selected client changes\n * @event workspace:update:selected-example - Emitted when the selected example changes, so other operations can sync\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport {\n ScalarCard,\n ScalarCardFooter,\n ScalarCardHeader,\n ScalarCardSection,\n} from '@scalar/components/card'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarCombobox } from '@scalar/components/combobox'\nimport { ScalarVirtualText } from '@scalar/components/virtual-text'\nimport { freezeElement } from '@scalar/helpers/dom/freeze-element'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport {\n getOperationExamples,\n resolveOperationExamples,\n} from '@scalar/workspace-store/helpers/operation-examples'\nimport {\n useExampleVisibility,\n useExternalExamples,\n} from '@scalar/workspace-store/helpers/use-external-examples'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies'\nimport type {\n OperationObject,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n computed,\n onBeforeMount,\n ref,\n useId,\n watch,\n watchEffect,\n type ComponentPublicInstance,\n} from 'vue'\n\nimport { filterClientsByQuery } from '../helpers/filter-clients-by-query'\nimport { findClient } from '../helpers/find-client'\nimport { generateCodeSnippet } from '../helpers/generate-code-snippet'\nimport { getClients } from '../helpers/get-clients'\nimport { getCustomCodeSamples } from '../helpers/get-custom-code-samples'\nimport { getSecrets } from '../helpers/get-secrets'\nimport { operationToHar } from '../helpers/operation-to-har/operation-to-har'\nimport type {\n ClientOption,\n ClientOptionGroup,\n CustomClientOption,\n} from '../types'\nimport ExamplePicker from './ExamplePicker.vue'\nimport HttpMethod from './HttpMethod.vue'\n\nconst {\n integration,\n codeSampleUnavailable = 'No code sample available for this example.',\n clientPickerLabel = 'Change code sample language',\n clientSearchLabel = 'Search clients',\n codeSampleLabel = 'Code sample',\n clientOptions,\n selectedClient,\n selectedServer = null,\n selectedContentType,\n selectedExample,\n securitySchemes = [],\n method,\n eventBus,\n path,\n operation,\n isWebhook,\n generateLabel,\n globalCookies,\n openapiVersion,\n requestBodyCompositionSelection,\n} = defineProps<CodeExampleProps>()\n\nconst emit = defineEmits<{\n /**\n * Emitted whenever the example key actually shown for this operation changes.\n *\n * This is the resolved local key (not the raw document-wide selection), so layouts that render\n * the test-request button outside this component can open the client with the same example the\n * snippet displays.\n */\n (e: 'update:exampleKey', value: string): void\n}>()\n\ndefineSlots<{\n 'header': () => unknown\n /** Rendered at the start of the footer, only while the example picker does not need that space */\n 'footer-start'?: () => unknown\n 'footer': ({ exampleName }: { exampleName: string }) => unknown\n}>()\n\n/** Grab the examples for the given content type */\nconst requestBodyExamples = computed(() => {\n const content = getResolvedRef(operation.requestBody)?.content ?? {}\n const contentType = selectedContentType || Object.keys(content)[0]\n if (!contentType) return {}\n\n const examples = content[contentType]?.examples ?? {}\n\n return examples\n})\n\n/**\n * The example key actually shown for this operation.\n *\n * `selectedExample` is the document-wide selection that syncs across operations. We honor it only\n * when this operation actually defines that key, otherwise we keep the local example: a selection\n * on one operation should never blank out an operation that does not share the same example.\n */\nconst localExampleKey = ref('')\n\n/** Resolve the key to display, preferring the document-wide selection when this operation has it */\nconst resolveExampleKey = (preferred: string | undefined): string => {\n const keys = Object.keys(requestBodyExamples.value)\n if (preferred && keys.includes(preferred)) {\n return preferred\n }\n // Keep the current local example when it is still valid, otherwise fall back to the first one\n if (localExampleKey.value && keys.includes(localExampleKey.value)) {\n return localExampleKey.value\n }\n return keys[0] ?? ''\n}\n\n// Set the initial example from the document-wide selection, falling back to the first example\nonBeforeMount(() => {\n localExampleKey.value = resolveExampleKey(selectedExample)\n})\n\n// Follow the document-wide selection when it changes and this operation has that example\nwatch(\n () => selectedExample,\n (preferred) => {\n localExampleKey.value = resolveExampleKey(preferred)\n },\n)\n\n/** Reset the selected example key if the content type changes and the new content type doesn't have the previously selected example */\nwatch(\n () => selectedContentType,\n () => {\n if (\n !Object.keys(requestBodyExamples.value).includes(localExampleKey.value)\n ) {\n // Re-resolve so the new content type still follows the document-wide selection when it has\n // that key, instead of always snapping back to the first example\n localExampleKey.value = resolveExampleKey(selectedExample)\n }\n },\n)\n\n// Keep the parent informed of the resolved key so a test-request button rendered outside this\n// component (e.g. the classic layout header) opens the client with the example the snippet shows\nwatchEffect(() => {\n emit('update:exampleKey', localExampleKey.value)\n})\n\n/** Select an example locally and sync the choice across the document */\nconst selectExample = (key: string) => {\n localExampleKey.value = key\n eventBus.emit('workspace:update:selected-example', key)\n}\n\n/** Grab any custom code samples from the operation */\nconst customCodeSamples = computed(() => getCustomCodeSamples(operation))\n\n/** Merge custom code samples with the client options */\nconst clients = computed(() =>\n getClients(\n customCodeSamples.value.samples,\n clientOptions,\n customCodeSamples.value.label,\n ),\n)\n\n/** Total number of available clients across all option groups */\nconst clientCount = computed(() =>\n clients.value.reduce((total, group) => total + group.options.length, 0),\n)\n\n/** The locally selected client which would include code samples from this operation only */\nconst localSelectedClient = ref<ClientOption | CustomClientOption | undefined>(\n findClient(clients.value, selectedClient),\n)\n\n/**\n * Re-resolve the local client whenever the global selection or the available\n * clients change. Watching `clients` matters when navigating between operations:\n * the stored id stays the same, but the matching option (e.g. a custom sample)\n * differs per operation, so without this the snippet could go stale.\n */\nwatch([() => selectedClient, clients], ([newClient]) => {\n const client = findClient(clients.value, newClient)\n if (client) {\n localSelectedClient.value = client\n }\n})\n\n/**\n * Accessible name for the client picker.\n *\n * On its own the button reads as its current value (\"C Libcurl\"), which never\n * says what activating it does. The visible title stays part of the name so it\n * still matches what is on screen.\n */\nconst clientPickerAriaLabel = computed(() =>\n [clientPickerLabel, localSelectedClient.value?.title]\n .filter(Boolean)\n .join(': '),\n)\n\n/**\n * Accessible name for the focusable code sample, e.g. \"Code sample: Shell cURL\".\n *\n * Screen readers announce only the name and role when focus lands on the scroller, so the\n * name tells the user both what the region is and which client it is generated for.\n */\nconst codeSampleAriaLabel = computed(() =>\n [codeSampleLabel, localSelectedClient.value?.title]\n .filter(Boolean)\n .join(': '),\n)\n\nconst elem = ref<ComponentPublicInstance | null>(null)\nconst visible = useExampleVisibility(elem)\nconst externalExamples = useExternalExamples(\n () =>\n getOperationExamples(operation, localExampleKey.value, selectedContentType),\n () => visible.value,\n)\nconst resolvedOperation = computed(() =>\n resolveOperationExamples(\n operation,\n localExampleKey.value,\n selectedContentType,\n externalExamples.resolve,\n ),\n)\n\n/** Keep the picker available because it also selects the example opened by Test Request. */\nconst showExamplePicker = computed(\n () => Object.keys(requestBodyExamples.value).length > 1,\n)\n\n/** Generate HAR data for webhook requests */\nconst webhookHar = computed(() => {\n if (!isWebhook) return null\n\n try {\n return operationToHar({\n operation: resolvedOperation.value,\n method,\n path,\n example: localExampleKey.value,\n openapiVersion,\n requestBodyCompositionSelection,\n // Only required parameters are shown in code examples; optional parameters\n // are omitted unless explicitly enabled via `x-disabled: false`.\n defaultDisabledParameters: true,\n })\n } catch (error) {\n console.error('[webhookHar]', error)\n return null\n }\n})\n\n/** Generate the code snippet for the selected example */\nconst generatedCode = computed<string | null>(() => {\n if (isWebhook) {\n return webhookHar.value?.postData?.text ?? ''\n }\n\n return generateCodeSnippet({\n // Only required parameters are shown in code examples; optional parameters\n // are omitted unless explicitly enabled via `x-disabled: false`.\n defaultDisabledParameters: true,\n includeDefaultHeaders: integration === 'client',\n clientId: localSelectedClient.value?.id,\n customCodeSamples: customCodeSamples.value.samples,\n operation: resolvedOperation.value,\n method,\n path,\n contentType: selectedContentType,\n server: selectedServer,\n securitySchemes,\n example: localExampleKey.value,\n globalCookies,\n openapiVersion,\n requestBodyCompositionSelection,\n })\n})\n\n/** The language for the code block, used for syntax highlighting */\nconst codeBlockLanguage = computed(() => {\n if (isWebhook) {\n return webhookLanguage.value\n }\n\n return localSelectedClient.value?.lang\n})\n\n/** Determine the language for webhook content based on MIME type */\nconst webhookLanguage = computed<string>(() => {\n if (!webhookHar.value?.postData) return 'json'\n\n const contentType = webhookHar.value.postData.mimeType\n if (contentType?.includes('json')) return 'json'\n if (contentType?.includes('xml')) return 'xml'\n if (contentType?.includes('yaml') || contentType?.includes('yml'))\n return 'yaml'\n if (contentType?.includes('text/plain')) return 'text'\n\n return 'json'\n})\n\n/** Block secrets from being shown in the code block */\nconst secretCredentials = computed(() => getSecrets(securitySchemes))\n\n/** Set custom example, or update the selected HTTP client globally */\nconst selectClient = (option: ClientOption) => {\n // We need to freeze the ui to prevent scrolling as the clients change\n if (elem.value) {\n const unfreeze = freezeElement(elem.value.$el)\n setTimeout(() => {\n unfreeze()\n }, 300)\n }\n // Update to the local example\n localSelectedClient.value = option\n\n // Sync the selection globally so other operations follow along. Custom samples\n // sync too (keyed by language), so picking e.g. the Python SDK example here\n // shows the Python example on every operation that ships one.\n if (option) {\n eventBus.emit('workspace:update:selected-client', option.id)\n }\n}\n\n// Virtualize the code block if it's too large\n// This prevents the entire app from freezing up if there's a massive example\n// We set a lower threshold here as code examples can get quite large\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\nconst shouldVirtualize = computed(\n () => (generatedCode.value?.length ?? 0) > VIRTUALIZATION_THRESHOLD,\n)\n\nconst id = useId()\n</script>\n<template>\n <ScalarCard\n v-if=\"\n generatedCode === null || generatedCode || externalExamples.pending.value\n \"\n ref=\"elem\"\n class=\"request-card dark-mode\">\n <!-- Header -->\n <ScalarCardHeader class=\"pr-2.5\">\n <span class=\"sr-only\">Request Example for</span>\n <HttpMethod\n as=\"span\"\n class=\"request-method\"\n :method=\"method\" />\n <span\n v-if=\"generateLabel\"\n v-html=\"generateLabel()\" />\n <slot name=\"header\" />\n <!-- Client picker -->\n <template\n v-if=\"!isWebhook && clientCount\"\n #actions>\n <!-- Multiple clients: render a dropdown to switch between them -->\n <ScalarCombobox\n v-if=\"clientCount > 1\"\n class=\"max-h-80\"\n :filterFn=\"filterClientsByQuery\"\n :inputLabel=\"clientSearchLabel\"\n :modelValue=\"localSelectedClient\"\n :options=\"clients\"\n placement=\"bottom-end\"\n teleport\n @update:modelValue=\"selectClient($event as ClientOption)\">\n <ScalarButton\n :aria-label=\"clientPickerAriaLabel\"\n class=\"text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-0.5 py-0 text-base font-normal\"\n data-testid=\"client-picker\"\n variant=\"ghost\">\n {{ localSelectedClient?.title }}\n <ScalarIconCaretDown\n class=\"ui-open:rotate-180 mt-px size-3 transition-transform duration-100\"\n weight=\"bold\" />\n </ScalarButton>\n </ScalarCombobox>\n <!-- Single client: just show its label, no need for a dropdown -->\n <span\n v-else\n class=\"text-c-2 flex h-full w-fit items-center px-0.5 py-0 text-base font-normal\"\n data-testid=\"client-picker\">\n {{ localSelectedClient?.title }}\n </span>\n </template>\n </ScalarCardHeader>\n\n <!-- Code snippet -->\n <ScalarCardSection class=\"request-editor-section custom-scroll p-0\">\n <div\n v-if=\"externalExamples.pending.value\"\n class=\"text-c-2 p-4\"\n role=\"status\">\n <template v-if=\"externalExamples.failed.value\">\n Could not load this example.\n <ScalarButton\n size=\"sm\"\n variant=\"ghost\"\n @click=\"externalExamples.retry\">\n Retry\n </ScalarButton>\n </template>\n <template v-else>Loading example…</template>\n </div>\n <div\n v-else-if=\"generatedCode === null\"\n class=\"text-c-2 p-4\"\n role=\"status\">\n {{ codeSampleUnavailable }}\n </div>\n <div\n v-else\n :id=\"`${id}-example`\"\n class=\"code-snippet\">\n <ScalarCodeBlock\n v-if=\"!shouldVirtualize\"\n class=\"bg-b-2 h-full\"\n :content=\"generatedCode\"\n :hideCredentials=\"secretCredentials\"\n :label=\"codeSampleAriaLabel\"\n :lang=\"codeBlockLanguage\"\n lineNumbers />\n <ScalarVirtualText\n v-else\n aria-label=\"Request code sample\"\n containerClass=\"custom-scroll scalar-code-block border rounded-b flex flex-1 max-h-screen\"\n contentClass=\"language-plaintext whitespace-pre font-code text-base p-2\"\n :lineHeight=\"20\"\n role=\"region\"\n :text=\"generatedCode\" />\n </div>\n </ScalarCardSection>\n\n <!-- Footer -->\n <ScalarCardFooter\n v-if=\"showExamplePicker || $slots.footer || $slots['footer-start']\"\n class=\"request-card-footer bg-b-3\"\n :class=\"{\n 'request-card-footer--wraps':\n !showExamplePicker && $slots['footer-start'],\n }\">\n <!-- Example picker -->\n <div\n v-if=\"showExamplePicker\"\n class=\"request-card-footer-addon\">\n <template v-if=\"Object.keys(requestBodyExamples).length\">\n <ExamplePicker\n :examples=\"requestBodyExamples\"\n :modelValue=\"localExampleKey\"\n @update:modelValue=\"selectExample\" />\n </template>\n </div>\n <!-- Otherwise the start of the footer is free for the caller -->\n <div\n v-else-if=\"$slots['footer-start']\"\n class=\"request-card-footer-start\">\n <slot name=\"footer-start\" />\n </div>\n\n <!-- Footer -->\n <slot\n :exampleName=\"localExampleKey\"\n name=\"footer\" />\n </ScalarCardFooter>\n </ScalarCard>\n\n <!-- Fallback card with just method and path in the case of no examples -->\n <ScalarCard\n v-else-if=\"fallback\"\n class=\"request-card dark-mode\">\n <ScalarCardSection class=\"request-card-simple\">\n <div class=\"request-header\">\n <HttpMethod\n as=\"span\"\n class=\"request-method\"\n :method=\"method\" />\n <slot name=\"header\" />\n </div>\n <div\n v-if=\"$slots.footer\"\n class=\"request-card-actions relative max-w-full\">\n <slot\n :exampleName=\"localExampleKey\"\n name=\"footer\" />\n </div>\n </ScalarCardSection>\n </ScalarCard>\n</template>\n<style scoped>\n.request-card {\n color: var(--scalar-color-1);\n font-size: var(--scalar-font-size-3);\n}\n.request-method {\n font-family: var(--scalar-font-code);\n margin-right: 6px;\n}\n.request-card-footer {\n display: flex;\n justify-content: flex-end;\n padding: 6px;\n flex-shrink: 0;\n position: relative;\n}\n/*\n * Footer-start content keeps its full width; when the footer is too narrow for everything,\n * the end controls wrap onto a second line instead of squeezing or covering it.\n */\n.request-card-footer--wraps {\n flex-wrap: wrap;\n row-gap: 4px;\n}\n.request-card-footer-start {\n display: flex;\n align-items: center;\n flex: 1 0 auto;\n}\n.request-card-footer-addon {\n display: flex;\n align-items: center;\n\n flex: 1;\n min-width: 0;\n}\n.request-editor-section {\n display: flex;\n flex: 1;\n}\n.request-card-simple {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n\n padding: 8px 8px 8px 12px;\n\n font-size: var(--scalar-small);\n}\n.request-header {\n /* Give spare inline space to the path, while actions fill their own row after wrapping. */\n flex: 999 1 auto;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.request-card-actions {\n flex: 1 0 auto;\n}\n.code-snippet {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqNA,IAAM8B,KAAOD,GAmBPE,IAAsBC,QAAe;GACzC,IAAMC,IAAUC,EAAeC,EAAA,UAAU,WAAW,CAAC,EAAE,WAAW,CAAC,GAC7DC,IAAcD,EAAA,uBAAuB,OAAO,KAAKF,CAAO,CAAC,CAAC;GAKhE,OAJKG,IAEYH,EAAQG,EAAY,EAAE,YAAY,CAAC,IAF3B,CAAC;EAK5B,CAAC,GASKC,IAAkBC,EAAI,EAAE,GAGxBC,KAAqB,MAA0C;GACnE,IAAMC,IAAO,OAAO,KAAKT,EAAoB,KAAK;GAQlD,OAPIU,KAAaD,EAAK,SAASC,CAAS,IAC/BA,IAGLJ,EAAgB,SAASG,EAAK,SAASH,EAAgB,KAAK,IACvDA,EAAgB,QAElBG,EAAK,MAAM;EACpB;EA+BA,AA5BAE,SAAoB;GAClB,EAAgB,QAAQH,EAAkBJ,EAAA,eAAe;EAC3D,CAAC,GAGDQ,QACQR,EAAA,kBACL,MAAc;GACb,EAAgB,QAAQI,EAAkBE,CAAS;EACrD,CACF,GAGAE,QACQR,EAAA,2BACA;GACJ,AACG,OAAO,KAAKJ,EAAoB,KAAK,CAAC,CAAC,SAASM,EAAgB,KAAK,MAItE,EAAgB,QAAQE,EAAkBJ,EAAA,eAAe;EAE7D,CACF,GAIAS,S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Root":"","sources":["../../../src/code-example/helpers/get-generated-payload-example.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAmBvE,8EAA8E;AAC9E,eAAO,MAAM,0BAA0B,GAAI,SAAS,qBAAqB,KAAG,OA4B3E,CAAA"}
1
+ {"version":3,"file":"get-generated-payload-example.d.ts","sourceRoot":"","sources":["../../../src/code-example/helpers/get-generated-payload-example.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAmBvE,8EAA8E;AAC9E,eAAO,MAAM,0BAA0B,GAAI,SAAS,qBAAqB,KAAG,OA0B3E,CAAA"}
@@ -14,10 +14,7 @@ var a = (n, r = /* @__PURE__ */ new Set()) => {
14
14
  let c = n(o.payload), l = c?.kind === "schema" ? c.schema : void 0;
15
15
  if (!l || a(l)) return;
16
16
  let u = r(l);
17
- return i(u, {
18
- emptyString: "string",
19
- includeDeprecated: !0
20
- });
17
+ return i(u, { emptyString: "string" });
21
18
  };
22
19
  //#endregion
23
20
  export { o as getGeneratedPayloadExample };
@@ -1 +1 @@
1
- {"version":3,"file":"get-generated-payload-example.js","names":["hasFalseAllOfMember","schema","getResolvedAsyncApiRef","source","isObject","seen","member","getGeneratedPayloadExample","message","example","payload","resolved","resolveAsyncApiSchema","snapshot","snapshotSchema","getExampleFromSchema"],"sources":["../../../src/code-example/helpers/get-generated-payload-example.ts"],"sourcesContent":["import { isObject } from '@scalar/helpers/object/is-object'\nimport type { AsyncApiMessageObject } from '@scalar/types/asyncapi/3.1'\nimport { getResolvedAsyncApiRef } from '@scalar/workspace-store/helpers/get-resolved-async-api-ref'\nimport { resolveAsyncApiSchema } from '@scalar/workspace-store/helpers/resolve-async-api-schema'\nimport { snapshotSchema } from '@scalar/workspace-store/helpers/snapshot-schema'\nimport { getExampleFromSchema } from '@scalar/workspace-store/request-example'\n\n/** An allOf containing a false schema cannot have a valid example. */\nconst hasFalseAllOfMember = (source: unknown, seen = new Set<unknown>()): boolean => {\n const schema = getResolvedAsyncApiRef(source)\n if (schema === false) {\n return true\n }\n if (!isObject(schema) || seen.has(schema)) {\n return false\n }\n seen.add(schema)\n return Array.isArray(schema.allOf) && schema.allOf.some((member) => hasFalseAllOfMember(member, seen))\n}\n\n/** Generate a payload only when the document does not already provide one. */\nexport const getGeneratedPayloadExample = (message: AsyncApiMessageObject): unknown => {\n if (message.examples?.some((example) => getResolvedAsyncApiRef(example)?.payload !== undefined)) {\n return undefined\n }\n\n const payload = getResolvedAsyncApiRef(message.payload)\n // Boolean schemas describe validation, but do not suggest a representative payload.\n if (\n typeof payload === 'boolean' ||\n (isObject(payload) && 'schemaFormat' in payload && typeof getResolvedAsyncApiRef(payload.schema) === 'boolean')\n ) {\n return undefined\n }\n\n const resolved = resolveAsyncApiSchema(message.payload)\n const schema = resolved?.kind === 'schema' ? resolved.schema : undefined\n if (!schema || hasFalseAllOfMember(schema)) {\n return undefined\n }\n\n // Snapshot reactive schemas so in-place edits do not reuse the generator's identity cache.\n // The generator resolves schema references itself, preserving literal $ref fields in payload data.\n const snapshot = snapshotSchema(schema)\n return getExampleFromSchema(snapshot, {\n emptyString: 'string',\n // Match the message schema, which displays fields regardless of their read/write annotations.\n includeDeprecated: true,\n })\n}\n"],"mappings":";;;;;;AAQA,IAAMA,KAAuB,GAAiB,oBAAO,IAAI,IAAa,MAAe;CACnF,IAAMC,IAASC,EAAuBC,CAAM;CAQ5C,OAPIF,MAAW,KACN,KAEL,CAACG,EAASH,CAAM,KAAKI,EAAK,IAAIJ,CAAM,IAC/B,MAETI,EAAK,IAAIJ,CAAM,GACR,MAAM,QAAQA,EAAO,KAAK,KAAKA,EAAO,MAAM,MAAM,MAAWD,EAAoBM,GAAQD,CAAI,CAAC;AACvG,GAGaE,KAA8B,MAA4C;CACrF,IAAIC,EAAQ,UAAU,MAAM,MAAYN,EAAuBO,CAAO,CAAC,EAAE,YAAY,KAAA,CAAS,GAC5F;CAGF,IAAMC,IAAUR,EAAuBM,EAAQ,OAAO;CAEtD,IACE,OAAOE,KAAY,aAClBN,EAASM,CAAO,KAAK,kBAAkBA,KAAW,OAAOR,EAAuBQ,EAAQ,MAAM,KAAM,WAErG;CAGF,IAAMC,IAAWC,EAAsBJ,EAAQ,OAAO,GAChDP,IAASU,GAAU,SAAS,WAAWA,EAAS,SAAS,KAAA;CAC/D,IAAI,CAACV,KAAUD,EAAoBC,CAAM,GACvC;CAKF,IAAMY,IAAWC,EAAeb,CAAM;CACtC,OAAOc,EAAqBF,GAAU;EACpC,aAAa;EAEb,mBAAmB;CACrB,CAAC;AACH"}
1
+ {"version":3,"file":"get-generated-payload-example.js","names":["hasFalseAllOfMember","schema","getResolvedAsyncApiRef","source","isObject","seen","member","getGeneratedPayloadExample","message","example","payload","resolved","resolveAsyncApiSchema","snapshot","snapshotSchema","getExampleFromSchema"],"sources":["../../../src/code-example/helpers/get-generated-payload-example.ts"],"sourcesContent":["import { isObject } from '@scalar/helpers/object/is-object'\nimport type { AsyncApiMessageObject } from '@scalar/types/asyncapi/3.1'\nimport { getResolvedAsyncApiRef } from '@scalar/workspace-store/helpers/get-resolved-async-api-ref'\nimport { resolveAsyncApiSchema } from '@scalar/workspace-store/helpers/resolve-async-api-schema'\nimport { snapshotSchema } from '@scalar/workspace-store/helpers/snapshot-schema'\nimport { getExampleFromSchema } from '@scalar/workspace-store/request-example'\n\n/** An allOf containing a false schema cannot have a valid example. */\nconst hasFalseAllOfMember = (source: unknown, seen = new Set<unknown>()): boolean => {\n const schema = getResolvedAsyncApiRef(source)\n if (schema === false) {\n return true\n }\n if (!isObject(schema) || seen.has(schema)) {\n return false\n }\n seen.add(schema)\n return Array.isArray(schema.allOf) && schema.allOf.some((member) => hasFalseAllOfMember(member, seen))\n}\n\n/** Generate a payload only when the document does not already provide one. */\nexport const getGeneratedPayloadExample = (message: AsyncApiMessageObject): unknown => {\n if (message.examples?.some((example) => getResolvedAsyncApiRef(example)?.payload !== undefined)) {\n return undefined\n }\n\n const payload = getResolvedAsyncApiRef(message.payload)\n // Boolean schemas describe validation, but do not suggest a representative payload.\n if (\n typeof payload === 'boolean' ||\n (isObject(payload) && 'schemaFormat' in payload && typeof getResolvedAsyncApiRef(payload.schema) === 'boolean')\n ) {\n return undefined\n }\n\n const resolved = resolveAsyncApiSchema(message.payload)\n const schema = resolved?.kind === 'schema' ? resolved.schema : undefined\n if (!schema || hasFalseAllOfMember(schema)) {\n return undefined\n }\n\n // Snapshot reactive schemas so in-place edits do not reuse the generator's identity cache.\n // The generator resolves schema references itself, preserving literal $ref fields in payload data.\n const snapshot = snapshotSchema(schema)\n return getExampleFromSchema(snapshot, {\n emptyString: 'string',\n })\n}\n"],"mappings":";;;;;;AAQA,IAAMA,KAAuB,GAAiB,oBAAO,IAAI,IAAa,MAAe;CACnF,IAAMC,IAASC,EAAuBC,CAAM;CAQ5C,OAPIF,MAAW,KACN,KAEL,CAACG,EAASH,CAAM,KAAKI,EAAK,IAAIJ,CAAM,IAC/B,MAETI,EAAK,IAAIJ,CAAM,GACR,MAAM,QAAQA,EAAO,KAAK,KAAKA,EAAO,MAAM,MAAM,MAAWD,EAAoBM,GAAQD,CAAI,CAAC;AACvG,GAGaE,KAA8B,MAA4C;CACrF,IAAIC,EAAQ,UAAU,MAAM,MAAYN,EAAuBO,CAAO,CAAC,EAAE,YAAY,KAAA,CAAS,GAC5F;CAGF,IAAMC,IAAUR,EAAuBM,EAAQ,OAAO;CAEtD,IACE,OAAOE,KAAY,aAClBN,EAASM,CAAO,KAAK,kBAAkBA,KAAW,OAAOR,EAAuBQ,EAAQ,MAAM,KAAM,WAErG;CAGF,IAAMC,IAAWC,EAAsBJ,EAAQ,OAAO,GAChDP,IAASU,GAAU,SAAS,WAAWA,EAAS,SAAS,KAAA;CAC/D,IAAI,CAACV,KAAUD,EAAoBC,CAAM,GACvC;CAKF,IAAMY,IAAWC,EAAeb,CAAM;CACtC,OAAOc,EAAqBF,GAAU,EACpC,aAAa,SACf,CAAC;AACH"}
package/dist/constants.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region src/constants.ts
2
- var e = typeof OVERRIDE_PACKAGE_VERSION < "u" ? OVERRIDE_PACKAGE_VERSION : "0.6.2";
2
+ var e = typeof OVERRIDE_PACKAGE_VERSION < "u" ? OVERRIDE_PACKAGE_VERSION : "0.6.4";
3
3
  //#endregion
4
4
  export { e as APP_VERSION };
5
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.vue.d.ts","sourceRoot":"","sources":["../../src/shared/Badge.vue"],"names":[],"mappings":"AAgFA,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AA0DF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"Badge.vue.d.ts","sourceRoot":"","sources":["../../src/shared/Badge.vue"],"names":[],"mappings":"AAgFA,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AA4DF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -2,7 +2,7 @@ import e from "../_virtual/_plugin-vue_export-helper.js";
2
2
  import t from "./Badge.vue_vue_type_script_setup_true_lang.js";
3
3
  /* empty css */
4
4
  //#region src/shared/Badge.vue
5
- var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-2a7101e8"]]);
5
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-eecf5e58"]]);
6
6
  //#endregion
7
7
  export { n as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.vue.js","names":["_sfc_main","_plugin_vue_export_helper_default","Badge_vue_vue_type_script_setup_true_lang_default","Badge_default"],"sources":["../../src/shared/Badge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { computed } from 'vue'\n\nconst { color } = defineProps<{\n color?: string\n}>()\n\n// Merge fallthrough classes via `cx` so consumer classes can override the base styles.\ndefineOptions({ inheritAttrs: false })\n\nconst { cx } = useBindCx()\n\n// The color only goes in as a custom property; the text color is derived from\n// it in CSS below, where the browser can read lightness out of any color format.\nconst badgeStyle = computed(() =>\n color ? { '--badge-color': color } : undefined,\n)\n</script>\n\n<template>\n <div\n v-bind=\"\n cx(\n 'badge inline-block rounded-2xl border bg-b-2 px-1.5 py-0.5 text-c-2 text-sm',\n { 'badge-colored': Boolean(color) },\n )\n \"\n :style=\"badgeStyle\">\n <slot />\n </div>\n</template>\n\n<style scoped>\n.badge-colored {\n background-color: var(--badge-color);\n /* Fallback for browsers without relative color syntax: a darker shade of the\n background, which is readable on pale colors but muddy on mid-tones. */\n color: color-mix(in srgb, var(--badge-color), black 40%);\n}\n\n/* Black text on a light background, white on a dark one. `l` is the background's\n lightness in LCH (0-100); multiplying its distance from the midpoint by infinity\n and letting the channel clamp turns that into 0 or 100, with no color parsing\n in JavaScript and no opinion about which format the color was written in. */\n@supports (color: lch(from red calc((50 - l) * infinity) 0 0)) {\n .badge-colored {\n /* Keep text opaque even when the background color is transparent. */\n color: lch(from var(--badge-color) calc((50 - l) * infinity) 0 0 / 1);\n }\n}\n\n/* Colour variants are keyed on the `text-*` class a consumer passes in. */\n.badge.text-orange {\n background: color-mix(in srgb, var(--scalar-color-orange), transparent 90%);\n border: transparent;\n}\n.badge.text-yellow {\n background: color-mix(in srgb, var(--scalar-color-yellow), transparent 90%);\n border: transparent;\n}\n.badge.text-red {\n background: color-mix(in srgb, var(--scalar-color-red), transparent 90%);\n border: transparent;\n}\n.badge.text-purple {\n background: color-mix(in srgb, var(--scalar-color-purple), transparent 90%);\n border: transparent;\n}\n.badge.text-green {\n background: color-mix(in srgb, var(--scalar-color-green), transparent 90%);\n border: transparent;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"Badge.vue.js","names":["_sfc_main","_plugin_vue_export_helper_default","Badge_vue_vue_type_script_setup_true_lang_default","Badge_default"],"sources":["../../src/shared/Badge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { computed } from 'vue'\n\nconst { color } = defineProps<{\n color?: string\n}>()\n\n// Merge fallthrough classes via `cx` so consumer classes can override the base styles.\ndefineOptions({ inheritAttrs: false })\n\nconst { cx } = useBindCx()\n\n// The color only goes in as a custom property; the text color is derived from\n// it in CSS below, where the browser can read lightness out of any color format.\nconst badgeStyle = computed(() =>\n color ? { '--badge-color': color } : undefined,\n)\n</script>\n\n<template>\n <div\n v-bind=\"\n cx(\n 'badge inline-block rounded-2xl border bg-b-2 px-1.5 py-0.5 text-c-2 text-sm',\n { 'badge-colored': Boolean(color) },\n )\n \"\n :style=\"badgeStyle\">\n <slot />\n </div>\n</template>\n\n<style scoped>\n.badge.badge-colored {\n background-color: var(--badge-color);\n /* Fallback for browsers without relative color syntax: a darker shade of the\n background, which is readable on pale colors but muddy on mid-tones. */\n color: color-mix(in srgb, var(--badge-color), black 40%);\n}\n\n/* Black text on a light background, white on a dark one. `l` is the background's\n lightness in LCH (0-100); multiplying its distance from the midpoint by infinity\n and letting the channel clamp turns that into 0 or 100, with no color parsing\n in JavaScript and no opinion about which format the color was written in. */\n@supports (color: lch(from red calc((50 - l) * infinity) 0 0)) {\n .badge.badge-colored {\n /* Keep text opaque even when the background color is transparent. */\n color: lch(from var(--badge-color) calc((50 - l) * infinity) 0 0 / 1);\n }\n}\n\n/* Colour variants are keyed on the `text-*` class a consumer passes in. */\n.badge.text-orange {\n background: color-mix(in srgb, var(--scalar-color-orange), transparent 90%);\n border: transparent;\n}\n.badge.text-yellow {\n background: color-mix(in srgb, var(--scalar-color-yellow), transparent 90%);\n border: transparent;\n}\n.badge.text-red {\n background: color-mix(in srgb, var(--scalar-color-red), transparent 90%);\n border: transparent;\n}\n.badge.text-purple {\n background: color-mix(in srgb, var(--scalar-color-purple), transparent 90%);\n border: transparent;\n}\n.badge.text-green {\n background: color-mix(in srgb, var(--scalar-color-green), transparent 90%);\n border: transparent;\n}\n</style>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_mergeProps","_unref","_renderSlot","Badge_vue_vue_type_script_setup_true_lang_default","useBindCx","badgeStyle","computed","__props","openBlock","createElementBlock","mergeProps","unref","cx","renderSlot","_ctx"],"sources":["../../src/shared/Badge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { computed } from 'vue'\n\nconst { color } = defineProps<{\n color?: string\n}>()\n\n// Merge fallthrough classes via `cx` so consumer classes can override the base styles.\ndefineOptions({ inheritAttrs: false })\n\nconst { cx } = useBindCx()\n\n// The color only goes in as a custom property; the text color is derived from\n// it in CSS below, where the browser can read lightness out of any color format.\nconst badgeStyle = computed(() =>\n color ? { '--badge-color': color } : undefined,\n)\n</script>\n\n<template>\n <div\n v-bind=\"\n cx(\n 'badge inline-block rounded-2xl border bg-b-2 px-1.5 py-0.5 text-c-2 text-sm',\n { 'badge-colored': Boolean(color) },\n )\n \"\n :style=\"badgeStyle\">\n <slot />\n </div>\n</template>\n\n<style scoped>\n.badge-colored {\n background-color: var(--badge-color);\n /* Fallback for browsers without relative color syntax: a darker shade of the\n background, which is readable on pale colors but muddy on mid-tones. */\n color: color-mix(in srgb, var(--badge-color), black 40%);\n}\n\n/* Black text on a light background, white on a dark one. `l` is the background's\n lightness in LCH (0-100); multiplying its distance from the midpoint by infinity\n and letting the channel clamp turns that into 0 or 100, with no color parsing\n in JavaScript and no opinion about which format the color was written in. */\n@supports (color: lch(from red calc((50 - l) * infinity) 0 0)) {\n .badge-colored {\n /* Keep text opaque even when the background color is transparent. */\n color: lch(from var(--badge-color) calc((50 - l) * infinity) 0 0 / 1);\n }\n}\n\n/* Colour variants are keyed on the `text-*` class a consumer passes in. */\n.badge.text-orange {\n background: color-mix(in srgb, var(--scalar-color-orange), transparent 90%);\n border: transparent;\n}\n.badge.text-yellow {\n background: color-mix(in srgb, var(--scalar-color-yellow), transparent 90%);\n border: transparent;\n}\n.badge.text-red {\n background: color-mix(in srgb, var(--scalar-color-red), transparent 90%);\n border: transparent;\n}\n.badge.text-purple {\n background: color-mix(in srgb, var(--scalar-color-purple), transparent 90%);\n border: transparent;\n}\n.badge.text-green {\n background: color-mix(in srgb, var(--scalar-color-green), transparent 90%);\n border: transparent;\n}\n</style>\n"],"mappings":";;;;;;;;EAWA,IAAM,EAAE,UAAOM,EAAU,GAInBC,IAAaC,QACjBC,EAAA,QAAQ,EAAE,iBAAiBA,EAAA,MAAM,IAAI,KAAA,CACvC;E,kBAIET,EAAA,GAAAC,EASM,OATNC,EACiBC,EAAAW,CAAA,CAAE,C,+EAAoH,EAAA,iBAAA,EAAQL,EAAA,MAAK,C,GAMjJ,EAAA,OAAOF,EAAA,MAAU,CAAA,GAAA,CAClBH,EAAQY,EAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,EAAA,C"}
1
+ {"version":3,"file":"Badge.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_mergeProps","_unref","_renderSlot","Badge_vue_vue_type_script_setup_true_lang_default","useBindCx","badgeStyle","computed","__props","openBlock","createElementBlock","mergeProps","unref","cx","renderSlot","_ctx"],"sources":["../../src/shared/Badge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { computed } from 'vue'\n\nconst { color } = defineProps<{\n color?: string\n}>()\n\n// Merge fallthrough classes via `cx` so consumer classes can override the base styles.\ndefineOptions({ inheritAttrs: false })\n\nconst { cx } = useBindCx()\n\n// The color only goes in as a custom property; the text color is derived from\n// it in CSS below, where the browser can read lightness out of any color format.\nconst badgeStyle = computed(() =>\n color ? { '--badge-color': color } : undefined,\n)\n</script>\n\n<template>\n <div\n v-bind=\"\n cx(\n 'badge inline-block rounded-2xl border bg-b-2 px-1.5 py-0.5 text-c-2 text-sm',\n { 'badge-colored': Boolean(color) },\n )\n \"\n :style=\"badgeStyle\">\n <slot />\n </div>\n</template>\n\n<style scoped>\n.badge.badge-colored {\n background-color: var(--badge-color);\n /* Fallback for browsers without relative color syntax: a darker shade of the\n background, which is readable on pale colors but muddy on mid-tones. */\n color: color-mix(in srgb, var(--badge-color), black 40%);\n}\n\n/* Black text on a light background, white on a dark one. `l` is the background's\n lightness in LCH (0-100); multiplying its distance from the midpoint by infinity\n and letting the channel clamp turns that into 0 or 100, with no color parsing\n in JavaScript and no opinion about which format the color was written in. */\n@supports (color: lch(from red calc((50 - l) * infinity) 0 0)) {\n .badge.badge-colored {\n /* Keep text opaque even when the background color is transparent. */\n color: lch(from var(--badge-color) calc((50 - l) * infinity) 0 0 / 1);\n }\n}\n\n/* Colour variants are keyed on the `text-*` class a consumer passes in. */\n.badge.text-orange {\n background: color-mix(in srgb, var(--scalar-color-orange), transparent 90%);\n border: transparent;\n}\n.badge.text-yellow {\n background: color-mix(in srgb, var(--scalar-color-yellow), transparent 90%);\n border: transparent;\n}\n.badge.text-red {\n background: color-mix(in srgb, var(--scalar-color-red), transparent 90%);\n border: transparent;\n}\n.badge.text-purple {\n background: color-mix(in srgb, var(--scalar-color-purple), transparent 90%);\n border: transparent;\n}\n.badge.text-green {\n background: color-mix(in srgb, var(--scalar-color-green), transparent 90%);\n border: transparent;\n}\n</style>\n"],"mappings":";;;;;;;;EAWA,IAAM,EAAE,UAAOM,EAAU,GAInBC,IAAaC,QACjBC,EAAA,QAAQ,EAAE,iBAAiBA,EAAA,MAAM,IAAI,KAAA,CACvC;E,kBAIET,EAAA,GAAAC,EASM,OATNC,EACiBC,EAAAW,CAAA,CAAE,C,+EAAoH,EAAA,iBAAA,EAAQL,EAAA,MAAK,C,GAMjJ,EAAA,OAAOF,EAAA,MAAU,CAAA,GAAA,CAClBH,EAAQY,EAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,EAAA,C"}
@@ -2,6 +2,8 @@ type __VLS_Props = {
2
2
  name: string;
3
3
  value: unknown;
4
4
  depth?: number;
5
+ /** Primitive values can align with the surrounding panel content. */
6
+ compact?: boolean;
5
7
  /** Array entries display only their values; keep their names for assistive technology. */
6
8
  arrayItem?: boolean;
7
9
  /** Only ancestors count as cycles; shared sibling values remain independently expandable. */
@@ -1 +1 @@
1
- {"version":3,"file":"ExtensionValue.vue.d.ts","sourceRoot":"","sources":["../../src/specification-extensions/ExtensionValue.vue"],"names":[],"mappings":"AA0HA,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,0FAA0F;IAC1F,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,6FAA6F;IAC7F,SAAS,CAAC,EAAE,SAAS,OAAO,EAAE,CAAA;CAC/B,CAAC;AAyNF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ExtensionValue.vue.d.ts","sourceRoot":"","sources":["../../src/specification-extensions/ExtensionValue.vue"],"names":[],"mappings":"AA6HA,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,6FAA6F;IAC7F,SAAS,CAAC,EAAE,SAAS,OAAO,EAAE,CAAA;CAC/B,CAAC;AA0NF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExtensionValue.vue.js","names":["_sfc_main","ExtensionValue_vue_vue_type_script_setup_true_lang_default","ExtensionValue_default"],"sources":["../../src/specification-extensions/ExtensionValue.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref, useId } from 'vue'\n\nimport { SchemaGutterToggle, SchemaRailPanel } from '../schema'\n\nconst {\n name,\n value,\n depth = 0,\n arrayItem = false,\n ancestors = [],\n} = defineProps<{\n name: string\n value: unknown\n depth?: number\n /** Array entries display only their values; keep their names for assistive technology. */\n arrayItem?: boolean\n /** Only ancestors count as cycles; shared sibling values remain independently expandable. */\n ancestors?: readonly unknown[]\n}>()\n\nconst nameId = useId()\nconst panelId = useId()\nconst open = ref(depth === 0)\nconst circular = computed<boolean>(() => ancestors.includes(value))\nconst children = computed<[string, unknown][]>(() => {\n if (value === null || typeof value !== 'object' || circular.value) {\n return []\n }\n return Array.isArray(value)\n ? value.map((item, index) => [`[${index}]`, item])\n : Object.entries(value)\n})\nconst expandable = computed<boolean>(() => children.value.length > 0)\nconst label = computed<string>(() => {\n if (arrayItem && expandable.value) {\n return Array.isArray(value) ? '[…]' : '{…}'\n }\n return !arrayItem && !expandable.value ? `${name}:` : name\n})\nconst text = computed<string>(() => {\n if (circular.value) {\n return '[Circular]'\n }\n if (typeof value === 'string') {\n return JSON.stringify(value)\n }\n if (value !== null && typeof value === 'object') {\n return Array.isArray(value) ? '[]' : '{}'\n }\n return String(value)\n})\n</script>\n\n<template>\n <div\n class=\"relative min-w-0 py-0.5\"\n :class=\"{\n 'ps-8': depth === 0,\n 'flex items-baseline gap-x-2': !arrayItem && !expandable,\n }\">\n <dt\n :class=\"\n arrayItem && !expandable\n ? 'sr-only'\n : 'relative flex min-h-5 min-w-0 flex-wrap items-baseline gap-x-2'\n \">\n <SchemaGutterToggle\n v-if=\"expandable\"\n class=\"absolute start-[calc(0px_-_var(--schema-gutter,16px)_-_var(--schema-toggle-half,12px))] top-[0.5lh] -translate-y-1/2\"\n :fallbackLabel=\"name\"\n :nameId=\"nameId\"\n :open=\"open\"\n :panelId=\"panelId\"\n :panelRendered=\"open\"\n @toggle=\"open = !open\" />\n <span\n v-if=\"!arrayItem || expandable\"\n :id=\"arrayItem ? undefined : nameId\"\n :aria-hidden=\"arrayItem || undefined\"\n class=\"font-code min-w-0 font-medium break-words\"\n >{{ label }}</span\n >\n <span\n v-if=\"arrayItem\"\n :id=\"nameId\"\n class=\"sr-only\"\n >Array item {{ name }}</span\n >\n </dt>\n <SchemaRailPanel\n v-if=\"expandable && open\"\n :id=\"panelId\"\n as=\"dd\"\n class=\"mt-0.5\"\n :depth=\"depth + 1\">\n <dl>\n <ExtensionValue\n v-for=\"[childName, childValue] in children\"\n :key=\"childName\"\n :ancestors=\"[...ancestors, value]\"\n :arrayItem=\"Array.isArray(value)\"\n :depth=\"depth + 1\"\n :name=\"childName\"\n :value=\"childValue\" />\n </dl>\n </SchemaRailPanel>\n <dd\n v-else-if=\"!expandable\"\n class=\"text-c-2 min-w-0\"\n :class=\"{ 'flex-1': !arrayItem }\">\n <code class=\"font-code break-words whitespace-pre-wrap\">{{ text }}</code>\n </dd>\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ExtensionValue.vue.js","names":["_sfc_main","ExtensionValue_vue_vue_type_script_setup_true_lang_default","ExtensionValue_default"],"sources":["../../src/specification-extensions/ExtensionValue.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref, useId } from 'vue'\n\nimport { SchemaGutterToggle, SchemaRailPanel } from '../schema'\n\nconst {\n name,\n value,\n depth = 0,\n compact = false,\n arrayItem = false,\n ancestors = [],\n} = defineProps<{\n name: string\n value: unknown\n depth?: number\n /** Primitive values can align with the surrounding panel content. */\n compact?: boolean\n /** Array entries display only their values; keep their names for assistive technology. */\n arrayItem?: boolean\n /** Only ancestors count as cycles; shared sibling values remain independently expandable. */\n ancestors?: readonly unknown[]\n}>()\n\nconst nameId = useId()\nconst panelId = useId()\nconst open = ref(depth === 0)\nconst circular = computed<boolean>(() => ancestors.includes(value))\nconst children = computed<[string, unknown][]>(() => {\n if (value === null || typeof value !== 'object' || circular.value) {\n return []\n }\n return Array.isArray(value)\n ? value.map((item, index) => [`[${index}]`, item])\n : Object.entries(value)\n})\nconst expandable = computed<boolean>(() => children.value.length > 0)\nconst label = computed<string>(() => {\n if (arrayItem && expandable.value) {\n return Array.isArray(value) ? '[…]' : '{…}'\n }\n return !arrayItem && !expandable.value ? `${name}:` : name\n})\nconst text = computed<string>(() => {\n if (circular.value) {\n return '[Circular]'\n }\n if (typeof value === 'string') {\n return JSON.stringify(value)\n }\n if (value !== null && typeof value === 'object') {\n return Array.isArray(value) ? '[]' : '{}'\n }\n return String(value)\n})\n</script>\n\n<template>\n <div\n class=\"relative min-w-0 py-0.5\"\n :class=\"{\n 'ps-8': depth === 0 && (!compact || expandable),\n 'flex items-baseline gap-x-2': !arrayItem && !expandable,\n }\">\n <dt\n :class=\"\n arrayItem && !expandable\n ? 'sr-only'\n : 'relative flex min-h-5 min-w-0 flex-wrap items-baseline gap-x-2'\n \">\n <SchemaGutterToggle\n v-if=\"expandable\"\n class=\"absolute start-[calc(0px_-_var(--schema-gutter,16px)_-_var(--schema-toggle-half,12px))] top-[0.5lh] -translate-y-1/2\"\n :fallbackLabel=\"name\"\n :nameId=\"nameId\"\n :open=\"open\"\n :panelId=\"panelId\"\n :panelRendered=\"open\"\n @toggle=\"open = !open\" />\n <span\n v-if=\"!arrayItem || expandable\"\n :id=\"arrayItem ? undefined : nameId\"\n :aria-hidden=\"arrayItem || undefined\"\n class=\"font-code min-w-0 font-medium break-words\"\n >{{ label }}</span\n >\n <span\n v-if=\"arrayItem\"\n :id=\"nameId\"\n class=\"sr-only\"\n >Array item {{ name }}</span\n >\n </dt>\n <SchemaRailPanel\n v-if=\"expandable && open\"\n :id=\"panelId\"\n as=\"dd\"\n class=\"mt-0.5\"\n :depth=\"depth + 1\">\n <dl>\n <ExtensionValue\n v-for=\"[childName, childValue] in children\"\n :key=\"childName\"\n :ancestors=\"[...ancestors, value]\"\n :arrayItem=\"Array.isArray(value)\"\n :depth=\"depth + 1\"\n :name=\"childName\"\n :value=\"childValue\" />\n </dl>\n </SchemaRailPanel>\n <dd\n v-else-if=\"!expandable\"\n class=\"text-c-2 min-w-0\"\n :class=\"{ 'flex-1': !arrayItem }\">\n <code class=\"font-code break-words whitespace-pre-wrap\">{{ text }}</code>\n </dd>\n </div>\n</template>\n"],"mappings":""}
@@ -8,6 +8,10 @@ var v = ["id", "aria-hidden"], y = ["id"], b = { class: "font-code break-words w
8
8
  name: {},
9
9
  value: {},
10
10
  depth: { default: 0 },
11
+ compact: {
12
+ type: Boolean,
13
+ default: !1
14
+ },
11
15
  arrayItem: {
12
16
  type: Boolean,
13
17
  default: !1
@@ -19,7 +23,7 @@ var v = ["id", "aria-hidden"], y = ["id"], b = { class: "font-code break-words w
19
23
  return (r, d) => {
20
24
  let g = p("ExtensionValue", !0);
21
25
  return u(), o("div", { class: l(["relative min-w-0 py-0.5", {
22
- "ps-8": c.depth === 0,
26
+ "ps-8": c.depth === 0 && (!c.compact || E.value),
23
27
  "flex items-baseline gap-x-2": !c.arrayItem && !E.value
24
28
  }]) }, [s("dt", { class: l(c.arrayItem && !E.value ? "sr-only" : "relative flex min-h-5 min-w-0 flex-wrap items-baseline gap-x-2") }, [
25
29
  E.value ? (u(), i(h(t), {
@@ -1 +1 @@
1
- {"version":3,"file":"ExtensionValue.vue_vue_type_script_setup_true_lang.js","names":["_resolveComponent","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_createBlock","_unref","SchemaGutterToggle","_createCommentVNode","_toDisplayString","SchemaRailPanel","_withCtx","_Fragment","_renderList","SchemaRailPanel_default","SchemaGutterToggle_default","_hoisted_1","_hoisted_2","_hoisted_3","ExtensionValue_vue_vue_type_script_setup_true_lang_default","nameId","useId","panelId","open","ref","__props","circular","computed","children","index","item","expandable","label","text","_component_ExtensionValue","resolveComponent","openBlock","createElementBlock","normalizeClass","createElementVNode","createBlock","unref","_cache","createCommentVNode","toDisplayString","withCtx","Fragment","renderList","childName","childValue"],"sources":["../../src/specification-extensions/ExtensionValue.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref, useId } from 'vue'\n\nimport { SchemaGutterToggle, SchemaRailPanel } from '../schema'\n\nconst {\n name,\n value,\n depth = 0,\n arrayItem = false,\n ancestors = [],\n} = defineProps<{\n name: string\n value: unknown\n depth?: number\n /** Array entries display only their values; keep their names for assistive technology. */\n arrayItem?: boolean\n /** Only ancestors count as cycles; shared sibling values remain independently expandable. */\n ancestors?: readonly unknown[]\n}>()\n\nconst nameId = useId()\nconst panelId = useId()\nconst open = ref(depth === 0)\nconst circular = computed<boolean>(() => ancestors.includes(value))\nconst children = computed<[string, unknown][]>(() => {\n if (value === null || typeof value !== 'object' || circular.value) {\n return []\n }\n return Array.isArray(value)\n ? value.map((item, index) => [`[${index}]`, item])\n : Object.entries(value)\n})\nconst expandable = computed<boolean>(() => children.value.length > 0)\nconst label = computed<string>(() => {\n if (arrayItem && expandable.value) {\n return Array.isArray(value) ? '[…]' : '{…}'\n }\n return !arrayItem && !expandable.value ? `${name}:` : name\n})\nconst text = computed<string>(() => {\n if (circular.value) {\n return '[Circular]'\n }\n if (typeof value === 'string') {\n return JSON.stringify(value)\n }\n if (value !== null && typeof value === 'object') {\n return Array.isArray(value) ? '[]' : '{}'\n }\n return String(value)\n})\n</script>\n\n<template>\n <div\n class=\"relative min-w-0 py-0.5\"\n :class=\"{\n 'ps-8': depth === 0,\n 'flex items-baseline gap-x-2': !arrayItem && !expandable,\n }\">\n <dt\n :class=\"\n arrayItem && !expandable\n ? 'sr-only'\n : 'relative flex min-h-5 min-w-0 flex-wrap items-baseline gap-x-2'\n \">\n <SchemaGutterToggle\n v-if=\"expandable\"\n class=\"absolute start-[calc(0px_-_var(--schema-gutter,16px)_-_var(--schema-toggle-half,12px))] top-[0.5lh] -translate-y-1/2\"\n :fallbackLabel=\"name\"\n :nameId=\"nameId\"\n :open=\"open\"\n :panelId=\"panelId\"\n :panelRendered=\"open\"\n @toggle=\"open = !open\" />\n <span\n v-if=\"!arrayItem || expandable\"\n :id=\"arrayItem ? undefined : nameId\"\n :aria-hidden=\"arrayItem || undefined\"\n class=\"font-code min-w-0 font-medium break-words\"\n >{{ label }}</span\n >\n <span\n v-if=\"arrayItem\"\n :id=\"nameId\"\n class=\"sr-only\"\n >Array item {{ name }}</span\n >\n </dt>\n <SchemaRailPanel\n v-if=\"expandable && open\"\n :id=\"panelId\"\n as=\"dd\"\n class=\"mt-0.5\"\n :depth=\"depth + 1\">\n <dl>\n <ExtensionValue\n v-for=\"[childName, childValue] in children\"\n :key=\"childName\"\n :ancestors=\"[...ancestors, value]\"\n :arrayItem=\"Array.isArray(value)\"\n :depth=\"depth + 1\"\n :name=\"childName\"\n :value=\"childValue\" />\n </dl>\n </SchemaRailPanel>\n <dd\n v-else-if=\"!expandable\"\n class=\"text-c-2 min-w-0\"\n :class=\"{ 'flex-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ExtensionValue.vue_vue_type_script_setup_true_lang.js","names":["_resolveComponent","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_createBlock","_unref","SchemaGutterToggle","_createCommentVNode","_toDisplayString","SchemaRailPanel","_withCtx","_Fragment","_renderList","SchemaRailPanel_default","SchemaGutterToggle_default","_hoisted_1","_hoisted_2","_hoisted_3","ExtensionValue_vue_vue_type_script_setup_true_lang_default","nameId","useId","panelId","open","ref","__props","circular","computed","children","index","item","expandable","label","text","_component_ExtensionValue","resolveComponent","openBlock","createElementBlock","normalizeClass","createElementVNode","createBlock","unref","_cache","createCommentVNode","toDisplayString","withCtx","Fragment","renderList","childName","childValue"],"sources":["../../src/specification-extensions/ExtensionValue.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref, useId } from 'vue'\n\nimport { SchemaGutterToggle, SchemaRailPanel } from '../schema'\n\nconst {\n name,\n value,\n depth = 0,\n compact = false,\n arrayItem = false,\n ancestors = [],\n} = defineProps<{\n name: string\n value: unknown\n depth?: number\n /** Primitive values can align with the surrounding panel content. */\n compact?: boolean\n /** Array entries display only their values; keep their names for assistive technology. */\n arrayItem?: boolean\n /** Only ancestors count as cycles; shared sibling values remain independently expandable. */\n ancestors?: readonly unknown[]\n}>()\n\nconst nameId = useId()\nconst panelId = useId()\nconst open = ref(depth === 0)\nconst circular = computed<boolean>(() => ancestors.includes(value))\nconst children = computed<[string, unknown][]>(() => {\n if (value === null || typeof value !== 'object' || circular.value) {\n return []\n }\n return Array.isArray(value)\n ? value.map((item, index) => [`[${index}]`, item])\n : Object.entries(value)\n})\nconst expandable = computed<boolean>(() => children.value.length > 0)\nconst label = computed<string>(() => {\n if (arrayItem && expandable.value) {\n return Array.isArray(value) ? '[…]' : '{…}'\n }\n return !arrayItem && !expandable.value ? `${name}:` : name\n})\nconst text = computed<string>(() => {\n if (circular.value) {\n return '[Circular]'\n }\n if (typeof value === 'string') {\n return JSON.stringify(value)\n }\n if (value !== null && typeof value === 'object') {\n return Array.isArray(value) ? '[]' : '{}'\n }\n return String(value)\n})\n</script>\n\n<template>\n <div\n class=\"relative min-w-0 py-0.5\"\n :class=\"{\n 'ps-8': depth === 0 && (!compact || expandable),\n 'flex items-baseline gap-x-2': !arrayItem && !expandable,\n }\">\n <dt\n :class=\"\n arrayItem && !expandable\n ? 'sr-only'\n : 'relative flex min-h-5 min-w-0 flex-wrap items-baseline gap-x-2'\n \">\n <SchemaGutterToggle\n v-if=\"expandable\"\n class=\"absolute start-[calc(0px_-_var(--schema-gutter,16px)_-_var(--schema-toggle-half,12px))] top-[0.5lh] -translate-y-1/2\"\n :fallbackLabel=\"name\"\n :nameId=\"nameId\"\n :open=\"open\"\n :panelId=\"panelId\"\n :panelRendered=\"open\"\n @toggle=\"open = !open\" />\n <span\n v-if=\"!arrayItem || expandable\"\n :id=\"arrayItem ? undefined : nameId\"\n :aria-hidden=\"arrayItem || undefined\"\n class=\"font-code min-w-0 font-medium break-words\"\n >{{ label }}</span\n >\n <span\n v-if=\"arrayItem\"\n :id=\"nameId\"\n class=\"sr-only\"\n >Array item {{ name }}</span\n >\n </dt>\n <SchemaRailPanel\n v-if=\"expandable && open\"\n :id=\"panelId\"\n as=\"dd\"\n class=\"mt-0.5\"\n :depth=\"depth + 1\">\n <dl>\n <ExtensionValue\n v-for=\"[childName, childValue] in children\"\n :key=\"childName\"\n :ancestors=\"[...ancestors, value]\"\n :arrayItem=\"Array.isArray(value)\"\n :depth=\"depth + 1\"\n :name=\"childName\"\n :value=\"childValue\" />\n </dl>\n </SchemaRailPanel>\n <dd\n v-else-if=\"!expandable\"\n class=\"text-c-2 min-w-0\"\n :class=\"{ 'flex-1': !arrayItem }\">\n <code class=\"font-code break-words whitespace-pre-wrap\">{{ text }}</code>\n </dd>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAwBA,IAAMoB,IAASC,EAAM,GACfC,IAAUD,EAAM,GAChBE,IAAOC,EAAIC,EAAA,UAAU,CAAC,GACtBC,IAAW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,EAAA,aAAaM,EAAA,SADtB9B,EAAA,GAAAC,EAMC,QAAA;;KAJE,IAAIuB,EAAA,YAAY,KAAA,IAAYnB,EAAAc,CAAA;KAC5B,eAAaK,EAAA,aAAa,KAAA;KAC3B,OAAM;IACF,GAAAhB,EAAAuB,EAAA,KAAK,GAAA,GAAAhB,CAAA,K;IAGHS,EAAA,aADRxB,EAAA,GAAAC,EAKC,QAAA;;KAHE,IAAII,EAAAc,CAAA;KACL,OAAM;IACL,GAAA,gBAAWX,EAAGgB,EAAA,IAAI,GAAA,GAAAR,CAAA,K;G,OAIfc,EAAA,SAAcR,EAAA,SADtBtB,EAAA,GAAAI,EAgBkBC,EAAAI,CAAA,GAAA;;IAdf,IAAIJ,EAAAgB,CAAA;IACL,IAAG;IACH,OAAM;IACL,OAAOG,EAAA,QAAK;;IACb,SAAAd,QASK,CATLP,EASK,MAAA,MAAA,EARHH,EAAA,EAAA,GAAAC,EAOwBU,GAAA,MAAAC,EANYe,EAAA,QAAQ,CAAlCoB,GAAWC,QADrBhD,EAAA,GAAAI,EAOwB6B,GAAA;KALrB,KAAKc;KACL,WAAS,CAAA,GAAMvB,EAAA,WAAWA,EAAA,KAAK;KAC/B,WAAW,MAAM,QAAQA,EAAA,KAAK;KAC9B,OAAOA,EAAA,QAAK;KACZ,MAAMuB;KACN,OAAOC;;;;;;;;;G,0BAIAlB,EAAA,Q,aADd9B,EAAA,GAAAC,EAKK,MAAA;;IAHH,OAAKC,EAAA,CAAC,oBAAkB,EAAA,UAAA,CACHsB,EAAA,UAAS,CAAA,CAAA;G,IAC9BrB,EAAyE,QAAzEc,GAAyET,EAAdwB,EAAA,KAAI,GAAA,CAAA,C"}
@@ -2,6 +2,8 @@
2
2
  type __VLS_Props = {
3
3
  /** Selected extension keys and their original values, in display order. */
4
4
  extensions: Record<string, unknown>;
5
+ /** Let the containing panel provide spacing around primitive values. */
6
+ compact?: boolean;
5
7
  };
6
8
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
9
  declare const _default: typeof __VLS_export;
@@ -1 +1 @@
1
- {"version":3,"file":"SpecificationExtensions.vue.d.ts","sourceRoot":"","sources":["../../src/specification-extensions/SpecificationExtensions.vue"],"names":[],"mappings":"AA0BA,qFAAqF;AACrF,KAAK,WAAW,GAAG;IACjB,2EAA2E;IAC3E,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC,CAAC;AAyCF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"SpecificationExtensions.vue.d.ts","sourceRoot":"","sources":["../../src/specification-extensions/SpecificationExtensions.vue"],"names":[],"mappings":"AA8BA,qFAAqF;AACrF,KAAK,WAAW,GAAG;IACjB,2EAA2E;IAC3E,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,wEAAwE;IACxE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;AA4CF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SpecificationExtensions.vue.js","names":["_sfc_main","SpecificationExtensions_vue_vue_type_script_setup_true_lang_default","SpecificationExtensions_default"],"sources":["../../src/specification-extensions/SpecificationExtensions.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport ExtensionValue from './ExtensionValue.vue'\n\n/** Display extension values using the same property rows and controls as schemas. */\nconst { extensions } = defineProps<{\n /** Selected extension keys and their original values, in display order. */\n extensions: Record<string, unknown>\n}>()\n</script>\n\n<template>\n <dl\n v-if=\"Object.keys(extensions).length\"\n class=\"my-2 min-w-0 text-base\">\n <ExtensionValue\n v-for=\"(value, name) in extensions\"\n :key=\"name\"\n :name=\"name\"\n :value=\"value\" />\n </dl>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"SpecificationExtensions.vue.js","names":["_sfc_main","SpecificationExtensions_vue_vue_type_script_setup_true_lang_default","SpecificationExtensions_default"],"sources":["../../src/specification-extensions/SpecificationExtensions.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport ExtensionValue from './ExtensionValue.vue'\n\n/** Display extension values using the same property rows and controls as schemas. */\nconst { extensions, compact = false } = defineProps<{\n /** Selected extension keys and their original values, in display order. */\n extensions: Record<string, unknown>\n /** Let the containing panel provide spacing around primitive values. */\n compact?: boolean\n}>()\n</script>\n\n<template>\n <dl\n v-if=\"Object.keys(extensions).length\"\n class=\"min-w-0 text-base\"\n :class=\"{ 'my-2': !compact }\">\n <ExtensionValue\n v-for=\"(value, name) in extensions\"\n :key=\"name\"\n :compact=\"compact\"\n :name=\"name\"\n :value=\"value\" />\n </dl>\n</template>\n"],"mappings":""}
@@ -1,18 +1,29 @@
1
1
  import e from "./ExtensionValue.vue.js";
2
- import { Fragment as t, createBlock as n, createCommentVNode as r, createElementBlock as i, defineComponent as a, openBlock as o, renderList as s } from "vue";
2
+ import { Fragment as t, createBlock as n, createCommentVNode as r, createElementBlock as i, defineComponent as a, normalizeClass as o, openBlock as s, renderList as c } from "vue";
3
3
  //#region src/specification-extensions/SpecificationExtensions.vue?vue&type=script&setup=true&lang.ts
4
- var c = {
5
- key: 0,
6
- class: "my-2 min-w-0 text-base"
7
- }, l = /*@__PURE__*/ a({
4
+ var l = /*@__PURE__*/ a({
8
5
  __name: "SpecificationExtensions",
9
- props: { extensions: {} },
6
+ props: {
7
+ extensions: {},
8
+ compact: {
9
+ type: Boolean,
10
+ default: !1
11
+ }
12
+ },
10
13
  setup(a) {
11
- return (l, u) => Object.keys(a.extensions).length ? (o(), i("dl", c, [(o(!0), i(t, null, s(a.extensions, (t, r) => (o(), n(e, {
14
+ return (l, u) => Object.keys(a.extensions).length ? (s(), i("dl", {
15
+ key: 0,
16
+ class: o(["min-w-0 text-base", { "my-2": !a.compact }])
17
+ }, [(s(!0), i(t, null, c(a.extensions, (t, r) => (s(), n(e, {
12
18
  key: r,
19
+ compact: a.compact,
13
20
  name: r,
14
21
  value: t
15
- }, null, 8, ["name", "value"]))), 128))])) : r("", !0);
22
+ }, null, 8, [
23
+ "compact",
24
+ "name",
25
+ "value"
26
+ ]))), 128))], 2)) : r("", !0);
16
27
  }
17
28
  });
18
29
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"SpecificationExtensions.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_Fragment","_renderList","_createBlock","ExtensionValue","_createCommentVNode","ExtensionValue_default","_hoisted_1","SpecificationExtensions_vue_vue_type_script_setup_true_lang_default","__props","openBlock","createElementBlock","Fragment","renderList","createBlock","name","createCommentVNode"],"sources":["../../src/specification-extensions/SpecificationExtensions.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport ExtensionValue from './ExtensionValue.vue'\n\n/** Display extension values using the same property rows and controls as schemas. */\nconst { extensions } = defineProps<{\n /** Selected extension keys and their original values, in display order. */\n extensions: Record<string, unknown>\n}>()\n</script>\n\n<template>\n <dl\n v-if=\"Object.keys(extensions).length\"\n class=\"my-2 min-w-0 text-base\">\n <ExtensionValue\n v-for=\"(value, name) in extensions\"\n :key=\"name\"\n :name=\"name\"\n :value=\"value\" />\n </dl>\n</template>\n"],"mappings":";;;;;;;;;;E,iBAYU,OAAO,KAAKU,EAAA,UAAU,CAAA,CAAE,UADhCV,EAAA,GAAAC,EAQK,MARLO,GAQK,EALHR,EAAA,EAAA,GAAAC,EAImBC,GAAA,MAAAC,EAHOO,EAAA,aAAhB,GAAO,OADjBV,EAAA,GAAAI,EAImBC,GAAA;GAFhB,KAAKW;GACC;GACC"}
1
+ {"version":3,"file":"SpecificationExtensions.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_normalizeClass","_Fragment","_renderList","_createBlock","ExtensionValue","_createCommentVNode","ExtensionValue_default","SpecificationExtensions_vue_vue_type_script_setup_true_lang_default","__props","openBlock","createElementBlock","normalizeClass","Fragment","renderList","createBlock","name","createCommentVNode"],"sources":["../../src/specification-extensions/SpecificationExtensions.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport ExtensionValue from './ExtensionValue.vue'\n\n/** Display extension values using the same property rows and controls as schemas. */\nconst { extensions, compact = false } = defineProps<{\n /** Selected extension keys and their original values, in display order. */\n extensions: Record<string, unknown>\n /** Let the containing panel provide spacing around primitive values. */\n compact?: boolean\n}>()\n</script>\n\n<template>\n <dl\n v-if=\"Object.keys(extensions).length\"\n class=\"min-w-0 text-base\"\n :class=\"{ 'my-2': !compact }\">\n <ExtensionValue\n v-for=\"(value, name) in extensions\"\n :key=\"name\"\n :compact=\"compact\"\n :name=\"name\"\n :value=\"value\" />\n </dl>\n</template>\n"],"mappings":";;;;;;;;;;;;;E,iBAcU,OAAO,KAAKU,EAAA,UAAU,CAAA,CAAE,UADhCV,EAAA,GAAAC,EAUK,MAAA;;GARH,OAAKC,EAAA,CAAC,qBAAmB,EAAA,QAAA,CACNQ,EAAA,QAAO,CAAA,CAAA;E,KAC1BV,EAAA,EAAA,GAAAC,EAKmBE,GAAA,MAAAC,EAJOM,EAAA,aAAhB,GAAO,OADjBV,EAAA,GAAAK,EAKmBC,GAAA;GAHhB,KAAKW;GACL,SAASP,EAAA;GACH;GACC"}
package/dist/style.css CHANGED
@@ -712,7 +712,8 @@
712
712
  color: var(--scalar-color-blue);
713
713
  }
714
714
 
715
- .scalar-code-block pre {
715
+ .scalar-code-block-pre {
716
+ font-family: var(--scalar-font-code);
716
717
  font-variant-ligatures: none;
717
718
  }
718
719
 
@@ -798,6 +799,10 @@
798
799
  stroke-width: var(--c07589c2);
799
800
  }
800
801
 
802
+ :where(pre:has( > code.hljs)) {
803
+ line-height: var(--scalar-code-line-height, 1.4);
804
+ }
805
+
801
806
  .scalar-app :where(code.hljs) * {
802
807
  font-size: inherit;
803
808
  font-family: var(--scalar-font-code);
@@ -813,7 +818,6 @@
813
818
  all: unset;
814
819
  font-size: inherit;
815
820
  color: var(--scalar-color-2);
816
- line-height: 1.4;
817
821
  font-family: var(--scalar-font-code);
818
822
  counter-reset: linenumber;
819
823
  }
@@ -1301,14 +1305,18 @@
1301
1305
  font-size: var(--scalar-small);
1302
1306
  }
1303
1307
 
1308
+ .scalar-app .markdown pre {
1309
+ line-height: var(--scalar-code-line-height, 1.5);
1310
+ }
1311
+
1304
1312
  .scalar-app .markdown pre code {
1305
1313
  white-space: pre;
1306
1314
  padding: var(--markdown-spacing-sm);
1315
+ line-height: inherit;
1307
1316
  margin: var(--markdown-spacing-sm) 0;
1308
1317
  -webkit-overflow-scrolling: touch;
1309
1318
  min-width: 100px;
1310
1319
  max-width: 100%;
1311
- line-height: 1.5;
1312
1320
  display: block;
1313
1321
  overflow-x: auto;
1314
1322
  }
@@ -5096,5 +5104,5 @@
5096
5104
  opacity: .5;
5097
5105
  }
5098
5106
  }
5099
- .request-card[data-v-41f67ce2],.request-card[data-v-5374efff]{color:var(--scalar-color-1);font-size:var(--scalar-font-size-3)}.request-method[data-v-5374efff]{font-family:var(--scalar-font-code);margin-right:6px}.request-card-footer[data-v-5374efff]{flex-shrink:0;justify-content:flex-end;padding:6px;display:flex;position:relative}.request-card-footer--wraps[data-v-5374efff]{flex-wrap:wrap;row-gap:4px}.request-card-footer-start[data-v-5374efff]{flex:1 0 auto;align-items:center;display:flex}.request-card-footer-addon[data-v-5374efff]{flex:1;align-items:center;min-width:0;display:flex}.request-editor-section[data-v-5374efff]{flex:1;display:flex}.request-card-simple[data-v-5374efff]{font-size:var(--scalar-small);justify-content:space-between;align-items:center;padding:8px 8px 8px 12px;display:flex}.code-snippet[data-v-5374efff]{flex-direction:column;width:100%;display:flex}.property-example[data-v-1380dfca]{font-size:var(--scalar-mini);flex-direction:column;display:flex;position:relative}.property-example[data-v-1380dfca]:hover:before{pointer-events:none;content:"";border-radius:var(--scalar-radius);width:100%;height:20px;position:absolute;top:0;left:0}.property-example-value[data-v-1380dfca]{font-family:var(--scalar-font-code);align-items:center;gap:8px;width:100%;padding:6px;display:flex}.property-example-value span[data-v-1380dfca]{text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}.property-example-value[data-v-1380dfca] svg{color:var(--scalar-color-3)}.property-example-value[data-v-1380dfca]:hover svg{color:var(--scalar-color-1)}.property-example-value[data-v-1380dfca]{background:var(--scalar-background-2);border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius)}.property-example-value-list[data-v-1380dfca]{background-color:var(--scalar-background-1);box-shadow:var(--scalar-shadow-1);border-radius:var(--scalar-radius-lg);border:var(--scalar-border-width) solid var(--scalar-border-color);z-index:1000;flex-direction:column;gap:3px;min-width:200px;max-width:300px;padding:9px;display:none;position:absolute;top:18px;left:50%;overflow:auto;transform:translate(-50%)}.property-example-value-list-start[data-v-1380dfca]{left:0;transform:none}.property-example:hover .property-example-value-list[data-v-1380dfca]{display:flex}.error[data-v-86862f28]{background-color:var(--scalar-color-red)}.schema-card[data-v-86862f28]{font-size:var(--scalar-font-size-4);color:var(--scalar-color-1)}.schema-card-title[data-v-86862f28]{height:var(--schema-title-height);color:var(--scalar-color-2);font-weight:var(--scalar-semibold);font-size:var(--scalar-mini);border-bottom:var(--scalar-border-width) solid transparent;align-items:center;gap:4px;padding:6px 8px;display:flex}button.schema-card-title[data-v-86862f28]{cursor:pointer}button.schema-card-title[data-v-86862f28]:hover{color:var(--scalar-color-1)}.schema-properties-open>.schema-card-title[data-v-86862f28]{border-bottom:var(--scalar-border-width) solid var(--scalar-border-color);border-bottom-right-radius:0;border-bottom-left-radius:0}.schema-properties-open>.schema-properties[data-v-86862f28]{width:fit-content}.schema-card-description[data-v-86862f28]{color:var(--scalar-color-2)}.schema-card-description+.schema-properties[data-v-86862f28]{width:fit-content;margin-top:8px}.schema-card--level-0:first-of-type>.schema-card-description[data-v-86862f28]:has(+.schema-properties){border-bottom:var(--scalar-border-width) solid var(--scalar-border-color);margin-bottom:-8px;padding-bottom:8px}.schema-card--level-0~.schema-card--level-0>.schema-card-description[data-v-86862f28]:has(+.schema-properties){padding-top:8px}.schema-properties-open.schema-properties[data-v-86862f28],.schema-properties-open>.schema-card--open[data-v-86862f28]{width:100%}.schema-properties[data-v-86862f28]{border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius-lg);flex-direction:column;width:fit-content;display:flex}.schema-properties-name[data-v-86862f28]{width:100%}.schema-properties .schema-properties[data-v-86862f28]{border-radius:13.5px}.schema-properties .schema-properties.schema-properties-open[data-v-86862f28]{border-radius:var(--scalar-radius-lg)}.schema-properties-open[data-v-86862f28]{width:100%}.schema-card--compact[data-v-86862f28]{align-self:flex-start}.schema-card--compact.schema-card--open[data-v-86862f28]{align-self:initial}.schema-card-title--compact[data-v-86862f28]{color:var(--scalar-color-2);border-bottom:none;height:auto;padding:6px 10px 6px 8px}.schema-properties-open>.schema-card-title--compact[data-v-86862f28]{position:static}.property--level-0>.schema-properties>.schema-card--level-0>.schema-properties[data-v-86862f28]{border:none}.property--level-0 .schema-card--level-0:not(.schema-card--compact) .property--level-1[data-v-86862f28]{padding:0 0 8px}:not(.composition-panel)>.schema-card--compact.schema-card--level-0>.schema-properties[data-v-86862f28]{border:none}[data-v-86862f28] .schema-card-description p{font-size:var(--scalar-small,var(--scalar-paragraph));color:var(--scalar-color-2);margin-bottom:6px;display:block}.children .schema-card-description[data-v-86862f28]:first-of-type{padding-top:0}.property-rule[data-v-e22666da] .composition-panel>.schema-card>.schema-properties>ul>li.property.property--tree-container{padding-top:0!important}.property-heading:empty+.property-description[data-v-1b21ab2e]:last-of-type,.property-description[data-v-1b21ab2e]:first-of-type:last-of-type{margin-top:0}.property-list[data-v-1b21ab2e]{border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius);margin-top:10px}.property-list .property[data-v-1b21ab2e]:last-of-type{padding-bottom:10px}.enum-toggle-button[data-v-1b21ab2e]:hover{color:var(--scalar-color-1)}.badge-colored[data-v-2a7101e8]{background-color:var(--badge-color);color:color-mix(in srgb, var(--badge-color), black 40%)}@supports (color:lch(from red calc((50 - l) * infinity) 0 0)){.badge-colored[data-v-2a7101e8]{color:lch(from var(--badge-color) calc((50 - l) * infinity) 0 0 / 1)}}.badge.text-orange[data-v-2a7101e8]{background:color-mix(in srgb, var(--scalar-color-orange), transparent 90%);border:#0000}.badge.text-yellow[data-v-2a7101e8]{background:color-mix(in srgb, var(--scalar-color-yellow), transparent 90%);border:#0000}.badge.text-red[data-v-2a7101e8]{background:color-mix(in srgb, var(--scalar-color-red), transparent 90%);border:#0000}.badge.text-purple[data-v-2a7101e8]{background:color-mix(in srgb, var(--scalar-color-purple), transparent 90%);border:#0000}.badge.text-green[data-v-2a7101e8]{background:color-mix(in srgb, var(--scalar-color-green), transparent 90%);border:#0000}.property-default[data-v-46973243]{font-size:var(--scalar-mini);flex-direction:column;display:flex;position:relative}.property-default[data-v-46973243]:hover:before{content:"";border-radius:var(--scalar-radius);width:100%;height:20px;position:absolute;top:0;left:0}.property-default:hover .property-default-label span[data-v-46973243]{color:var(--scalar-color-1)}.property-default-label span[data-v-46973243]{color:var(--scalar-color-2);border-bottom:var(--scalar-border-width) dotted currentColor;position:relative}.property-default-value[data-v-46973243]{font-family:var(--scalar-font-code);align-items:center;gap:8px;width:100%;padding:6px;display:flex}.property-default-value span[data-v-46973243]{text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}.property-default-value[data-v-46973243] svg{color:var(--scalar-color-3)}.property-default-value[data-v-46973243]:hover svg{color:var(--scalar-color-1)}.property-default-value[data-v-46973243]{background:var(--scalar-background-2);border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius)}.property-default-value-list[data-v-46973243]{background-color:var(--scalar-background-1);box-shadow:var(--scalar-shadow-1);border-radius:var(--scalar-radius-lg);border:var(--scalar-border-width) solid var(--scalar-border-color);z-index:2;flex-direction:column;gap:3px;min-width:200px;max-width:300px;padding:9px;display:none;position:absolute;top:18px;left:50%;overflow:auto;transform:translate(-50%)}.property-default:hover .property-default-value-list[data-v-46973243]{display:flex}.property-detail[data-v-8b57daa7]{display:inline-flex}.property-detail+.property-detail[data-v-8b57daa7]:before{content:"·";margin:0 .5ch;display:block}.property-detail-truncate[data-v-8b57daa7]{overflow:hidden}.property-detail-truncate>.property-detail-value[data-v-8b57daa7]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.property-detail-prefix[data-v-8b57daa7]{color:var(--scalar-color-2)}code.property-detail-value[data-v-8b57daa7]{font-family:var(--scalar-font-code);font-size:var(--scalar-font-size-3);color:var(--scalar-color-2);background:color-mix(in srgb, var(--scalar-background-2), var(--scalar-background-1));border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius);padding:0 4px}.property-pattern[data-v-e8f7b07b]{font-size:var(--scalar-mini);flex-direction:column;display:flex;position:relative}.property-pattern[data-v-e8f7b07b]:hover:before{content:"";border-radius:var(--scalar-radius);width:100%;height:20px;position:absolute;top:0;left:0}.property-pattern-popup[data-v-e8f7b07b]{background-color:var(--scalar-background-1);box-shadow:var(--scalar-shadow-1);border-radius:var(--scalar-radius-lg);border:var(--scalar-border-width) solid var(--scalar-border-color);z-index:1000;min-width:200px;max-width:min(500px,100vw - 32px);max-height:min(400px,100vh - 32px);padding:9px;display:none;position:absolute;top:18px;left:50%;overflow-y:auto;transform:translate(-50%)}.property-pattern:hover .property-pattern-popup[data-v-e8f7b07b],.property-pattern:focus-within .property-pattern-popup[data-v-e8f7b07b],.property-pattern.is-open .property-pattern-popup[data-v-e8f7b07b]{display:flex}.property-pattern-value[data-v-e8f7b07b]{font-family:var(--scalar-font-code);background:var(--scalar-background-2);border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius);align-items:flex-start;gap:8px;width:100%;padding:6px;display:flex}.property-pattern-value code[data-v-e8f7b07b]{font-family:var(--scalar-font-code);font-size:var(--scalar-font-size-3);color:var(--scalar-color-2);white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;text-align:left;flex:1}.property-heading[data-v-d9e2f10e]{white-space:nowrap;flex-wrap:wrap;align-items:baseline;row-gap:9px;display:flex}:is(.property-heading[data-v-d9e2f10e]:has(+.children),.property-heading[data-v-d9e2f10e]:has(+.property-rule)){margin-bottom:9px}.property-heading[data-v-d9e2f10e]>*{margin-right:9px}.property-heading[data-v-d9e2f10e]:last-child{margin-right:0}.property-name[data-v-d9e2f10e]{max-width:100%;font-family:var(--scalar-font-code);font-weight:var(--scalar-bold);font-size:var(--scalar-font-size-4);white-space:normal;overflow-wrap:break-word}.property-additional[data-v-d9e2f10e]{font-family:var(--scalar-font-code)}.property-required[data-v-d9e2f10e],.property-optional[data-v-d9e2f10e]{color:var(--scalar-color-2)}.property-required[data-v-d9e2f10e]{font-size:var(--scalar-mini);color:var(--scalar-color-orange)}.light-mode .property-required[data-v-d9e2f10e]{color:color-mix(in srgb, var(--scalar-color-orange), var(--scalar-color-1) 32%)}.property-read-only[data-v-d9e2f10e]{font-size:var(--scalar-mini);color:var(--scalar-color-blue)}.property-write-only[data-v-d9e2f10e]{font-size:var(--scalar-mini);color:var(--scalar-color-green)}.property-discriminator[data-v-d9e2f10e]{font-size:var(--scalar-mini);color:var(--scalar-color-purple)}.property-detail[data-v-d9e2f10e]{font-size:var(--scalar-mini);color:var(--scalar-color-2);align-items:center;min-width:0;display:flex}.property-const[data-v-d9e2f10e]{color:var(--scalar-color-1)}.deprecated[data-v-d9e2f10e]{text-decoration:line-through}.property[data-v-00f22f7c]{color:var(--scalar-color-1);font-size:var(--scalar-small);flex-direction:column;padding:10px;display:flex;position:relative}.property[data-v-00f22f7c]:has(>.property-rule:first-of-type):not(.property--compact){padding-top:8px;padding-bottom:8px}.property--deprecated[data-v-00f22f7c]{background:repeating-linear-gradient(-45deg, var(--scalar-background-2) 0, var(--scalar-background-2) 2px, transparent 2px, transparent 5px);background-size:100%}.property-description[data-v-00f22f7c]{line-height:1.4;font-size:var(--scalar-small);margin-top:6px}.property-description[data-v-00f22f7c]:has(+.property-rule){margin-bottom:9px}[data-v-00f22f7c] .property-description *{color:var(--scalar-color-2)!important}.property[data-v-00f22f7c]:not(:last-of-type){border-bottom:var(--scalar-border-width) solid var(--scalar-border-color)}.property-description+.children[data-v-00f22f7c],.children+.property-rule[data-v-00f22f7c]{margin-top:9px}.children[data-v-00f22f7c]{flex-direction:column;display:flex}.children .property--compact.property--level-1[data-v-00f22f7c]{padding:12px}.property-example-value[data-v-00f22f7c]{all:unset;font-family:var(--scalar-font-code);border-top:var(--scalar-border-width) solid var(--scalar-border-color);padding:6px}.property-rule[data-v-00f22f7c]{border-radius:var(--scalar-radius-lg);flex-direction:column;display:flex}.property-example[data-v-00f22f7c]{background:0 0;border:none;flex-direction:row;gap:8px;display:flex}.property-example-label[data-v-00f22f7c],.property-example-value[data-v-00f22f7c]{padding:3px 0 0}.property-example-value[data-v-00f22f7c]{background:var(--scalar-background-2);border-radius:var(--scalar-radius);border-top:0;padding:3px 4px}.property-name[data-v-00f22f7c]{font-family:var(--scalar-font-code);font-weight:var(--scalar-semibold)}.property-name-additional-properties[data-v-00f22f7c]:before,.property-name-pattern-properties[data-v-00f22f7c]:before{text-transform:uppercase;font-size:var(--scalar-micro);border-radius:var(--scalar-radius);color:var(--scalar-color-1);border:var(--scalar-border-width) solid var(--scalar-border-color);background-color:var(--scalar-background-2);margin-right:4px;padding:2px 4px;display:inline-block}.property-name-pattern-properties[data-v-00f22f7c]:before{content:"regex"}.property-name-additional-properties[data-v-00f22f7c],.property-name-pattern-properties[data-v-00f22f7c]{border:1px dashed var(--scalar-border-color);color:var(--scalar-color-accent);border-radius:var(--scalar-radius);padding:2px;display:inline-block}.schema-type-icon[data-v-39d4fd7f]{color:var(--scalar-color-1);display:none}.schema-type[data-v-39d4fd7f]{font-family:var(--scalar-font-code);color:var(--scalar-color-1)}
5107
+ .request-card[data-v-41f67ce2],.request-card[data-v-d57b5f1f]{color:var(--scalar-color-1);font-size:var(--scalar-font-size-3)}.request-method[data-v-d57b5f1f]{font-family:var(--scalar-font-code);margin-right:6px}.request-card-footer[data-v-d57b5f1f]{flex-shrink:0;justify-content:flex-end;padding:6px;display:flex;position:relative}.request-card-footer--wraps[data-v-d57b5f1f]{flex-wrap:wrap;row-gap:4px}.request-card-footer-start[data-v-d57b5f1f]{flex:1 0 auto;align-items:center;display:flex}.request-card-footer-addon[data-v-d57b5f1f]{flex:1;align-items:center;min-width:0;display:flex}.request-editor-section[data-v-d57b5f1f]{flex:1;display:flex}.request-card-simple[data-v-d57b5f1f]{font-size:var(--scalar-small);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;padding:8px 8px 8px 12px;display:flex}.request-header[data-v-d57b5f1f]{overflow-wrap:anywhere;flex:999 auto;min-width:0}.request-card-actions[data-v-d57b5f1f]{flex:1 0 auto}.code-snippet[data-v-d57b5f1f]{flex-direction:column;width:100%;display:flex}.property-example[data-v-1380dfca]{font-size:var(--scalar-mini);flex-direction:column;display:flex;position:relative}.property-example[data-v-1380dfca]:hover:before{pointer-events:none;content:"";border-radius:var(--scalar-radius);width:100%;height:20px;position:absolute;top:0;left:0}.property-example-value[data-v-1380dfca]{font-family:var(--scalar-font-code);align-items:center;gap:8px;width:100%;padding:6px;display:flex}.property-example-value span[data-v-1380dfca]{text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}.property-example-value[data-v-1380dfca] svg{color:var(--scalar-color-3)}.property-example-value[data-v-1380dfca]:hover svg{color:var(--scalar-color-1)}.property-example-value[data-v-1380dfca]{background:var(--scalar-background-2);border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius)}.property-example-value-list[data-v-1380dfca]{background-color:var(--scalar-background-1);box-shadow:var(--scalar-shadow-1);border-radius:var(--scalar-radius-lg);border:var(--scalar-border-width) solid var(--scalar-border-color);z-index:1000;flex-direction:column;gap:3px;min-width:200px;max-width:300px;padding:9px;display:none;position:absolute;top:18px;left:50%;overflow:auto;transform:translate(-50%)}.property-example-value-list-start[data-v-1380dfca]{left:0;transform:none}.property-example:hover .property-example-value-list[data-v-1380dfca]{display:flex}.error[data-v-86862f28]{background-color:var(--scalar-color-red)}.schema-card[data-v-86862f28]{font-size:var(--scalar-font-size-4);color:var(--scalar-color-1)}.schema-card-title[data-v-86862f28]{height:var(--schema-title-height);color:var(--scalar-color-2);font-weight:var(--scalar-semibold);font-size:var(--scalar-mini);border-bottom:var(--scalar-border-width) solid transparent;align-items:center;gap:4px;padding:6px 8px;display:flex}button.schema-card-title[data-v-86862f28]{cursor:pointer}button.schema-card-title[data-v-86862f28]:hover{color:var(--scalar-color-1)}.schema-properties-open>.schema-card-title[data-v-86862f28]{border-bottom:var(--scalar-border-width) solid var(--scalar-border-color);border-bottom-right-radius:0;border-bottom-left-radius:0}.schema-properties-open>.schema-properties[data-v-86862f28]{width:fit-content}.schema-card-description[data-v-86862f28]{color:var(--scalar-color-2)}.schema-card-description+.schema-properties[data-v-86862f28]{width:fit-content;margin-top:8px}.schema-card--level-0:first-of-type>.schema-card-description[data-v-86862f28]:has(+.schema-properties){border-bottom:var(--scalar-border-width) solid var(--scalar-border-color);margin-bottom:-8px;padding-bottom:8px}.schema-card--level-0~.schema-card--level-0>.schema-card-description[data-v-86862f28]:has(+.schema-properties){padding-top:8px}.schema-properties-open.schema-properties[data-v-86862f28],.schema-properties-open>.schema-card--open[data-v-86862f28]{width:100%}.schema-properties[data-v-86862f28]{border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius-lg);flex-direction:column;width:fit-content;display:flex}.schema-properties-name[data-v-86862f28]{width:100%}.schema-properties .schema-properties[data-v-86862f28]{border-radius:13.5px}.schema-properties .schema-properties.schema-properties-open[data-v-86862f28]{border-radius:var(--scalar-radius-lg)}.schema-properties-open[data-v-86862f28]{width:100%}.schema-card--compact[data-v-86862f28]{align-self:flex-start}.schema-card--compact.schema-card--open[data-v-86862f28]{align-self:initial}.schema-card-title--compact[data-v-86862f28]{color:var(--scalar-color-2);border-bottom:none;height:auto;padding:6px 10px 6px 8px}.schema-properties-open>.schema-card-title--compact[data-v-86862f28]{position:static}.property--level-0>.schema-properties>.schema-card--level-0>.schema-properties[data-v-86862f28]{border:none}.property--level-0 .schema-card--level-0:not(.schema-card--compact) .property--level-1[data-v-86862f28]{padding:0 0 8px}:not(.composition-panel)>.schema-card--compact.schema-card--level-0>.schema-properties[data-v-86862f28]{border:none}[data-v-86862f28] .schema-card-description p{font-size:var(--scalar-small,var(--scalar-paragraph));color:var(--scalar-color-2);margin-bottom:6px;display:block}.children .schema-card-description[data-v-86862f28]:first-of-type{padding-top:0}.property-rule[data-v-e22666da] .composition-panel>.schema-card>.schema-properties>ul>li.property.property--tree-container{padding-top:0!important}.property-heading:empty+.property-description[data-v-1b21ab2e]:last-of-type,.property-description[data-v-1b21ab2e]:first-of-type:last-of-type{margin-top:0}.property-list[data-v-1b21ab2e]{border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius);margin-top:10px}.property-list .property[data-v-1b21ab2e]:last-of-type{padding-bottom:10px}.enum-toggle-button[data-v-1b21ab2e]:hover{color:var(--scalar-color-1)}.badge.badge-colored[data-v-eecf5e58]{background-color:var(--badge-color);color:color-mix(in srgb, var(--badge-color), black 40%)}@supports (color:lch(from red calc((50 - l) * infinity) 0 0)){.badge.badge-colored[data-v-eecf5e58]{color:lch(from var(--badge-color) calc((50 - l) * infinity) 0 0 / 1)}}.badge.text-orange[data-v-eecf5e58]{background:color-mix(in srgb, var(--scalar-color-orange), transparent 90%);border:#0000}.badge.text-yellow[data-v-eecf5e58]{background:color-mix(in srgb, var(--scalar-color-yellow), transparent 90%);border:#0000}.badge.text-red[data-v-eecf5e58]{background:color-mix(in srgb, var(--scalar-color-red), transparent 90%);border:#0000}.badge.text-purple[data-v-eecf5e58]{background:color-mix(in srgb, var(--scalar-color-purple), transparent 90%);border:#0000}.badge.text-green[data-v-eecf5e58]{background:color-mix(in srgb, var(--scalar-color-green), transparent 90%);border:#0000}.property-default[data-v-46973243]{font-size:var(--scalar-mini);flex-direction:column;display:flex;position:relative}.property-default[data-v-46973243]:hover:before{content:"";border-radius:var(--scalar-radius);width:100%;height:20px;position:absolute;top:0;left:0}.property-default:hover .property-default-label span[data-v-46973243]{color:var(--scalar-color-1)}.property-default-label span[data-v-46973243]{color:var(--scalar-color-2);border-bottom:var(--scalar-border-width) dotted currentColor;position:relative}.property-default-value[data-v-46973243]{font-family:var(--scalar-font-code);align-items:center;gap:8px;width:100%;padding:6px;display:flex}.property-default-value span[data-v-46973243]{text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}.property-default-value[data-v-46973243] svg{color:var(--scalar-color-3)}.property-default-value[data-v-46973243]:hover svg{color:var(--scalar-color-1)}.property-default-value[data-v-46973243]{background:var(--scalar-background-2);border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius)}.property-default-value-list[data-v-46973243]{background-color:var(--scalar-background-1);box-shadow:var(--scalar-shadow-1);border-radius:var(--scalar-radius-lg);border:var(--scalar-border-width) solid var(--scalar-border-color);z-index:2;flex-direction:column;gap:3px;min-width:200px;max-width:300px;padding:9px;display:none;position:absolute;top:18px;left:50%;overflow:auto;transform:translate(-50%)}.property-default:hover .property-default-value-list[data-v-46973243]{display:flex}.property-detail[data-v-8b57daa7]{display:inline-flex}.property-detail+.property-detail[data-v-8b57daa7]:before{content:"·";margin:0 .5ch;display:block}.property-detail-truncate[data-v-8b57daa7]{overflow:hidden}.property-detail-truncate>.property-detail-value[data-v-8b57daa7]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.property-detail-prefix[data-v-8b57daa7]{color:var(--scalar-color-2)}code.property-detail-value[data-v-8b57daa7]{font-family:var(--scalar-font-code);font-size:var(--scalar-font-size-3);color:var(--scalar-color-2);background:color-mix(in srgb, var(--scalar-background-2), var(--scalar-background-1));border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius);padding:0 4px}.property-pattern[data-v-e8f7b07b]{font-size:var(--scalar-mini);flex-direction:column;display:flex;position:relative}.property-pattern[data-v-e8f7b07b]:hover:before{content:"";border-radius:var(--scalar-radius);width:100%;height:20px;position:absolute;top:0;left:0}.property-pattern-popup[data-v-e8f7b07b]{background-color:var(--scalar-background-1);box-shadow:var(--scalar-shadow-1);border-radius:var(--scalar-radius-lg);border:var(--scalar-border-width) solid var(--scalar-border-color);z-index:1000;min-width:200px;max-width:min(500px,100vw - 32px);max-height:min(400px,100vh - 32px);padding:9px;display:none;position:absolute;top:18px;left:50%;overflow-y:auto;transform:translate(-50%)}.property-pattern:hover .property-pattern-popup[data-v-e8f7b07b],.property-pattern:focus-within .property-pattern-popup[data-v-e8f7b07b],.property-pattern.is-open .property-pattern-popup[data-v-e8f7b07b]{display:flex}.property-pattern-value[data-v-e8f7b07b]{font-family:var(--scalar-font-code);background:var(--scalar-background-2);border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius);align-items:flex-start;gap:8px;width:100%;padding:6px;display:flex}.property-pattern-value code[data-v-e8f7b07b]{font-family:var(--scalar-font-code);font-size:var(--scalar-font-size-3);color:var(--scalar-color-2);white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;text-align:left;flex:1}.property-heading[data-v-d9e2f10e]{white-space:nowrap;flex-wrap:wrap;align-items:baseline;row-gap:9px;display:flex}:is(.property-heading[data-v-d9e2f10e]:has(+.children),.property-heading[data-v-d9e2f10e]:has(+.property-rule)){margin-bottom:9px}.property-heading[data-v-d9e2f10e]>*{margin-right:9px}.property-heading[data-v-d9e2f10e]:last-child{margin-right:0}.property-name[data-v-d9e2f10e]{max-width:100%;font-family:var(--scalar-font-code);font-weight:var(--scalar-bold);font-size:var(--scalar-font-size-4);white-space:normal;overflow-wrap:break-word}.property-additional[data-v-d9e2f10e]{font-family:var(--scalar-font-code)}.property-required[data-v-d9e2f10e],.property-optional[data-v-d9e2f10e]{color:var(--scalar-color-2)}.property-required[data-v-d9e2f10e]{font-size:var(--scalar-mini);color:var(--scalar-color-orange)}.light-mode .property-required[data-v-d9e2f10e]{color:color-mix(in srgb, var(--scalar-color-orange), var(--scalar-color-1) 32%)}.property-read-only[data-v-d9e2f10e]{font-size:var(--scalar-mini);color:var(--scalar-color-blue)}.property-write-only[data-v-d9e2f10e]{font-size:var(--scalar-mini);color:var(--scalar-color-green)}.property-discriminator[data-v-d9e2f10e]{font-size:var(--scalar-mini);color:var(--scalar-color-purple)}.property-detail[data-v-d9e2f10e]{font-size:var(--scalar-mini);color:var(--scalar-color-2);align-items:center;min-width:0;display:flex}.property-const[data-v-d9e2f10e]{color:var(--scalar-color-1)}.deprecated[data-v-d9e2f10e]{text-decoration:line-through}.property[data-v-00f22f7c]{color:var(--scalar-color-1);font-size:var(--scalar-small);flex-direction:column;padding:10px;display:flex;position:relative}.property[data-v-00f22f7c]:has(>.property-rule:first-of-type):not(.property--compact){padding-top:8px;padding-bottom:8px}.property--deprecated[data-v-00f22f7c]{background:repeating-linear-gradient(-45deg, var(--scalar-background-2) 0, var(--scalar-background-2) 2px, transparent 2px, transparent 5px);background-size:100%}.property-description[data-v-00f22f7c]{line-height:1.4;font-size:var(--scalar-small);margin-top:6px}.property-description[data-v-00f22f7c]:has(+.property-rule){margin-bottom:9px}[data-v-00f22f7c] .property-description *{color:var(--scalar-color-2)!important}.property[data-v-00f22f7c]:not(:last-of-type){border-bottom:var(--scalar-border-width) solid var(--scalar-border-color)}.property-description+.children[data-v-00f22f7c],.children+.property-rule[data-v-00f22f7c]{margin-top:9px}.children[data-v-00f22f7c]{flex-direction:column;display:flex}.children .property--compact.property--level-1[data-v-00f22f7c]{padding:12px}.property-example-value[data-v-00f22f7c]{all:unset;font-family:var(--scalar-font-code);border-top:var(--scalar-border-width) solid var(--scalar-border-color);padding:6px}.property-rule[data-v-00f22f7c]{border-radius:var(--scalar-radius-lg);flex-direction:column;display:flex}.property-example[data-v-00f22f7c]{background:0 0;border:none;flex-direction:row;gap:8px;display:flex}.property-example-label[data-v-00f22f7c],.property-example-value[data-v-00f22f7c]{padding:3px 0 0}.property-example-value[data-v-00f22f7c]{background:var(--scalar-background-2);border-radius:var(--scalar-radius);border-top:0;padding:3px 4px}.property-name[data-v-00f22f7c]{font-family:var(--scalar-font-code);font-weight:var(--scalar-semibold)}.property-name-additional-properties[data-v-00f22f7c]:before,.property-name-pattern-properties[data-v-00f22f7c]:before{text-transform:uppercase;font-size:var(--scalar-micro);border-radius:var(--scalar-radius);color:var(--scalar-color-1);border:var(--scalar-border-width) solid var(--scalar-border-color);background-color:var(--scalar-background-2);margin-right:4px;padding:2px 4px;display:inline-block}.property-name-pattern-properties[data-v-00f22f7c]:before{content:"regex"}.property-name-additional-properties[data-v-00f22f7c],.property-name-pattern-properties[data-v-00f22f7c]{border:1px dashed var(--scalar-border-color);color:var(--scalar-color-accent);border-radius:var(--scalar-radius);padding:2px;display:inline-block}.schema-type-icon[data-v-39d4fd7f]{color:var(--scalar-color-1);display:none}.schema-type[data-v-39d4fd7f]{font-family:var(--scalar-font-code);color:var(--scalar-color-1)}
5100
5108
  /*$vite$:1*/
@@ -1,2 +1,2 @@
1
- .request-card[data-v-41f67ce2],.request-card[data-v-5374efff]{color:var(--scalar-color-1);font-size:var(--scalar-font-size-3)}.request-method[data-v-5374efff]{font-family:var(--scalar-font-code);margin-right:6px}.request-card-footer[data-v-5374efff]{flex-shrink:0;justify-content:flex-end;padding:6px;display:flex;position:relative}.request-card-footer--wraps[data-v-5374efff]{flex-wrap:wrap;row-gap:4px}.request-card-footer-start[data-v-5374efff]{flex:1 0 auto;align-items:center;display:flex}.request-card-footer-addon[data-v-5374efff]{flex:1;align-items:center;min-width:0;display:flex}.request-editor-section[data-v-5374efff]{flex:1;display:flex}.request-card-simple[data-v-5374efff]{font-size:var(--scalar-small);justify-content:space-between;align-items:center;padding:8px 8px 8px 12px;display:flex}.code-snippet[data-v-5374efff]{flex-direction:column;width:100%;display:flex}.property-example[data-v-1380dfca]{font-size:var(--scalar-mini);flex-direction:column;display:flex;position:relative}.property-example[data-v-1380dfca]:hover:before{pointer-events:none;content:"";border-radius:var(--scalar-radius);width:100%;height:20px;position:absolute;top:0;left:0}.property-example-value[data-v-1380dfca]{font-family:var(--scalar-font-code);align-items:center;gap:8px;width:100%;padding:6px;display:flex}.property-example-value span[data-v-1380dfca]{text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}.property-example-value[data-v-1380dfca] svg{color:var(--scalar-color-3)}.property-example-value[data-v-1380dfca]:hover svg{color:var(--scalar-color-1)}.property-example-value[data-v-1380dfca]{background:var(--scalar-background-2);border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius)}.property-example-value-list[data-v-1380dfca]{background-color:var(--scalar-background-1);box-shadow:var(--scalar-shadow-1);border-radius:var(--scalar-radius-lg);border:var(--scalar-border-width) solid var(--scalar-border-color);z-index:1000;flex-direction:column;gap:3px;min-width:200px;max-width:300px;padding:9px;display:none;position:absolute;top:18px;left:50%;overflow:auto;transform:translate(-50%)}.property-example-value-list-start[data-v-1380dfca]{left:0;transform:none}.property-example:hover .property-example-value-list[data-v-1380dfca]{display:flex}.error[data-v-86862f28]{background-color:var(--scalar-color-red)}.schema-card[data-v-86862f28]{font-size:var(--scalar-font-size-4);color:var(--scalar-color-1)}.schema-card-title[data-v-86862f28]{height:var(--schema-title-height);color:var(--scalar-color-2);font-weight:var(--scalar-semibold);font-size:var(--scalar-mini);border-bottom:var(--scalar-border-width) solid transparent;align-items:center;gap:4px;padding:6px 8px;display:flex}button.schema-card-title[data-v-86862f28]{cursor:pointer}button.schema-card-title[data-v-86862f28]:hover{color:var(--scalar-color-1)}.schema-properties-open>.schema-card-title[data-v-86862f28]{border-bottom:var(--scalar-border-width) solid var(--scalar-border-color);border-bottom-right-radius:0;border-bottom-left-radius:0}.schema-properties-open>.schema-properties[data-v-86862f28]{width:fit-content}.schema-card-description[data-v-86862f28]{color:var(--scalar-color-2)}.schema-card-description+.schema-properties[data-v-86862f28]{width:fit-content;margin-top:8px}.schema-card--level-0:first-of-type>.schema-card-description[data-v-86862f28]:has(+.schema-properties){border-bottom:var(--scalar-border-width) solid var(--scalar-border-color);margin-bottom:-8px;padding-bottom:8px}.schema-card--level-0~.schema-card--level-0>.schema-card-description[data-v-86862f28]:has(+.schema-properties){padding-top:8px}.schema-properties-open.schema-properties[data-v-86862f28],.schema-properties-open>.schema-card--open[data-v-86862f28]{width:100%}.schema-properties[data-v-86862f28]{border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius-lg);flex-direction:column;width:fit-content;display:flex}.schema-properties-name[data-v-86862f28]{width:100%}.schema-properties .schema-properties[data-v-86862f28]{border-radius:13.5px}.schema-properties .schema-properties.schema-properties-open[data-v-86862f28]{border-radius:var(--scalar-radius-lg)}.schema-properties-open[data-v-86862f28]{width:100%}.schema-card--compact[data-v-86862f28]{align-self:flex-start}.schema-card--compact.schema-card--open[data-v-86862f28]{align-self:initial}.schema-card-title--compact[data-v-86862f28]{color:var(--scalar-color-2);border-bottom:none;height:auto;padding:6px 10px 6px 8px}.schema-properties-open>.schema-card-title--compact[data-v-86862f28]{position:static}.property--level-0>.schema-properties>.schema-card--level-0>.schema-properties[data-v-86862f28]{border:none}.property--level-0 .schema-card--level-0:not(.schema-card--compact) .property--level-1[data-v-86862f28]{padding:0 0 8px}:not(.composition-panel)>.schema-card--compact.schema-card--level-0>.schema-properties[data-v-86862f28]{border:none}[data-v-86862f28] .schema-card-description p{font-size:var(--scalar-small,var(--scalar-paragraph));color:var(--scalar-color-2);margin-bottom:6px;display:block}.children .schema-card-description[data-v-86862f28]:first-of-type{padding-top:0}.property-rule[data-v-e22666da] .composition-panel>.schema-card>.schema-properties>ul>li.property.property--tree-container{padding-top:0!important}.property-heading:empty+.property-description[data-v-1b21ab2e]:last-of-type,.property-description[data-v-1b21ab2e]:first-of-type:last-of-type{margin-top:0}.property-list[data-v-1b21ab2e]{border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius);margin-top:10px}.property-list .property[data-v-1b21ab2e]:last-of-type{padding-bottom:10px}.enum-toggle-button[data-v-1b21ab2e]:hover{color:var(--scalar-color-1)}.badge-colored[data-v-2a7101e8]{background-color:var(--badge-color);color:color-mix(in srgb, var(--badge-color), black 40%)}@supports (color:lch(from red calc((50 - l) * infinity) 0 0)){.badge-colored[data-v-2a7101e8]{color:lch(from var(--badge-color) calc((50 - l) * infinity) 0 0 / 1)}}.badge.text-orange[data-v-2a7101e8]{background:color-mix(in srgb, var(--scalar-color-orange), transparent 90%);border:#0000}.badge.text-yellow[data-v-2a7101e8]{background:color-mix(in srgb, var(--scalar-color-yellow), transparent 90%);border:#0000}.badge.text-red[data-v-2a7101e8]{background:color-mix(in srgb, var(--scalar-color-red), transparent 90%);border:#0000}.badge.text-purple[data-v-2a7101e8]{background:color-mix(in srgb, var(--scalar-color-purple), transparent 90%);border:#0000}.badge.text-green[data-v-2a7101e8]{background:color-mix(in srgb, var(--scalar-color-green), transparent 90%);border:#0000}.property-default[data-v-46973243]{font-size:var(--scalar-mini);flex-direction:column;display:flex;position:relative}.property-default[data-v-46973243]:hover:before{content:"";border-radius:var(--scalar-radius);width:100%;height:20px;position:absolute;top:0;left:0}.property-default:hover .property-default-label span[data-v-46973243]{color:var(--scalar-color-1)}.property-default-label span[data-v-46973243]{color:var(--scalar-color-2);border-bottom:var(--scalar-border-width) dotted currentColor;position:relative}.property-default-value[data-v-46973243]{font-family:var(--scalar-font-code);align-items:center;gap:8px;width:100%;padding:6px;display:flex}.property-default-value span[data-v-46973243]{text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}.property-default-value[data-v-46973243] svg{color:var(--scalar-color-3)}.property-default-value[data-v-46973243]:hover svg{color:var(--scalar-color-1)}.property-default-value[data-v-46973243]{background:var(--scalar-background-2);border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius)}.property-default-value-list[data-v-46973243]{background-color:var(--scalar-background-1);box-shadow:var(--scalar-shadow-1);border-radius:var(--scalar-radius-lg);border:var(--scalar-border-width) solid var(--scalar-border-color);z-index:2;flex-direction:column;gap:3px;min-width:200px;max-width:300px;padding:9px;display:none;position:absolute;top:18px;left:50%;overflow:auto;transform:translate(-50%)}.property-default:hover .property-default-value-list[data-v-46973243]{display:flex}.property-detail[data-v-8b57daa7]{display:inline-flex}.property-detail+.property-detail[data-v-8b57daa7]:before{content:"·";margin:0 .5ch;display:block}.property-detail-truncate[data-v-8b57daa7]{overflow:hidden}.property-detail-truncate>.property-detail-value[data-v-8b57daa7]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.property-detail-prefix[data-v-8b57daa7]{color:var(--scalar-color-2)}code.property-detail-value[data-v-8b57daa7]{font-family:var(--scalar-font-code);font-size:var(--scalar-font-size-3);color:var(--scalar-color-2);background:color-mix(in srgb, var(--scalar-background-2), var(--scalar-background-1));border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius);padding:0 4px}.property-pattern[data-v-e8f7b07b]{font-size:var(--scalar-mini);flex-direction:column;display:flex;position:relative}.property-pattern[data-v-e8f7b07b]:hover:before{content:"";border-radius:var(--scalar-radius);width:100%;height:20px;position:absolute;top:0;left:0}.property-pattern-popup[data-v-e8f7b07b]{background-color:var(--scalar-background-1);box-shadow:var(--scalar-shadow-1);border-radius:var(--scalar-radius-lg);border:var(--scalar-border-width) solid var(--scalar-border-color);z-index:1000;min-width:200px;max-width:min(500px,100vw - 32px);max-height:min(400px,100vh - 32px);padding:9px;display:none;position:absolute;top:18px;left:50%;overflow-y:auto;transform:translate(-50%)}.property-pattern:hover .property-pattern-popup[data-v-e8f7b07b],.property-pattern:focus-within .property-pattern-popup[data-v-e8f7b07b],.property-pattern.is-open .property-pattern-popup[data-v-e8f7b07b]{display:flex}.property-pattern-value[data-v-e8f7b07b]{font-family:var(--scalar-font-code);background:var(--scalar-background-2);border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius);align-items:flex-start;gap:8px;width:100%;padding:6px;display:flex}.property-pattern-value code[data-v-e8f7b07b]{font-family:var(--scalar-font-code);font-size:var(--scalar-font-size-3);color:var(--scalar-color-2);white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;text-align:left;flex:1}.property-heading[data-v-d9e2f10e]{white-space:nowrap;flex-wrap:wrap;align-items:baseline;row-gap:9px;display:flex}:is(.property-heading[data-v-d9e2f10e]:has(+.children),.property-heading[data-v-d9e2f10e]:has(+.property-rule)){margin-bottom:9px}.property-heading[data-v-d9e2f10e]>*{margin-right:9px}.property-heading[data-v-d9e2f10e]:last-child{margin-right:0}.property-name[data-v-d9e2f10e]{max-width:100%;font-family:var(--scalar-font-code);font-weight:var(--scalar-bold);font-size:var(--scalar-font-size-4);white-space:normal;overflow-wrap:break-word}.property-additional[data-v-d9e2f10e]{font-family:var(--scalar-font-code)}.property-required[data-v-d9e2f10e],.property-optional[data-v-d9e2f10e]{color:var(--scalar-color-2)}.property-required[data-v-d9e2f10e]{font-size:var(--scalar-mini);color:var(--scalar-color-orange)}.light-mode .property-required[data-v-d9e2f10e]{color:color-mix(in srgb, var(--scalar-color-orange), var(--scalar-color-1) 32%)}.property-read-only[data-v-d9e2f10e]{font-size:var(--scalar-mini);color:var(--scalar-color-blue)}.property-write-only[data-v-d9e2f10e]{font-size:var(--scalar-mini);color:var(--scalar-color-green)}.property-discriminator[data-v-d9e2f10e]{font-size:var(--scalar-mini);color:var(--scalar-color-purple)}.property-detail[data-v-d9e2f10e]{font-size:var(--scalar-mini);color:var(--scalar-color-2);align-items:center;min-width:0;display:flex}.property-const[data-v-d9e2f10e]{color:var(--scalar-color-1)}.deprecated[data-v-d9e2f10e]{text-decoration:line-through}.property[data-v-00f22f7c]{color:var(--scalar-color-1);font-size:var(--scalar-small);flex-direction:column;padding:10px;display:flex;position:relative}.property[data-v-00f22f7c]:has(>.property-rule:first-of-type):not(.property--compact){padding-top:8px;padding-bottom:8px}.property--deprecated[data-v-00f22f7c]{background:repeating-linear-gradient(-45deg, var(--scalar-background-2) 0, var(--scalar-background-2) 2px, transparent 2px, transparent 5px);background-size:100%}.property-description[data-v-00f22f7c]{line-height:1.4;font-size:var(--scalar-small);margin-top:6px}.property-description[data-v-00f22f7c]:has(+.property-rule){margin-bottom:9px}[data-v-00f22f7c] .property-description *{color:var(--scalar-color-2)!important}.property[data-v-00f22f7c]:not(:last-of-type){border-bottom:var(--scalar-border-width) solid var(--scalar-border-color)}.property-description+.children[data-v-00f22f7c],.children+.property-rule[data-v-00f22f7c]{margin-top:9px}.children[data-v-00f22f7c]{flex-direction:column;display:flex}.children .property--compact.property--level-1[data-v-00f22f7c]{padding:12px}.property-example-value[data-v-00f22f7c]{all:unset;font-family:var(--scalar-font-code);border-top:var(--scalar-border-width) solid var(--scalar-border-color);padding:6px}.property-rule[data-v-00f22f7c]{border-radius:var(--scalar-radius-lg);flex-direction:column;display:flex}.property-example[data-v-00f22f7c]{background:0 0;border:none;flex-direction:row;gap:8px;display:flex}.property-example-label[data-v-00f22f7c],.property-example-value[data-v-00f22f7c]{padding:3px 0 0}.property-example-value[data-v-00f22f7c]{background:var(--scalar-background-2);border-radius:var(--scalar-radius);border-top:0;padding:3px 4px}.property-name[data-v-00f22f7c]{font-family:var(--scalar-font-code);font-weight:var(--scalar-semibold)}.property-name-additional-properties[data-v-00f22f7c]:before,.property-name-pattern-properties[data-v-00f22f7c]:before{text-transform:uppercase;font-size:var(--scalar-micro);border-radius:var(--scalar-radius);color:var(--scalar-color-1);border:var(--scalar-border-width) solid var(--scalar-border-color);background-color:var(--scalar-background-2);margin-right:4px;padding:2px 4px;display:inline-block}.property-name-pattern-properties[data-v-00f22f7c]:before{content:"regex"}.property-name-additional-properties[data-v-00f22f7c],.property-name-pattern-properties[data-v-00f22f7c]{border:1px dashed var(--scalar-border-color);color:var(--scalar-color-accent);border-radius:var(--scalar-radius);padding:2px;display:inline-block}.schema-type-icon[data-v-39d4fd7f]{color:var(--scalar-color-1);display:none}.schema-type[data-v-39d4fd7f]{font-family:var(--scalar-font-code);color:var(--scalar-color-1)}
1
+ .request-card[data-v-41f67ce2],.request-card[data-v-d57b5f1f]{color:var(--scalar-color-1);font-size:var(--scalar-font-size-3)}.request-method[data-v-d57b5f1f]{font-family:var(--scalar-font-code);margin-right:6px}.request-card-footer[data-v-d57b5f1f]{flex-shrink:0;justify-content:flex-end;padding:6px;display:flex;position:relative}.request-card-footer--wraps[data-v-d57b5f1f]{flex-wrap:wrap;row-gap:4px}.request-card-footer-start[data-v-d57b5f1f]{flex:1 0 auto;align-items:center;display:flex}.request-card-footer-addon[data-v-d57b5f1f]{flex:1;align-items:center;min-width:0;display:flex}.request-editor-section[data-v-d57b5f1f]{flex:1;display:flex}.request-card-simple[data-v-d57b5f1f]{font-size:var(--scalar-small);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;padding:8px 8px 8px 12px;display:flex}.request-header[data-v-d57b5f1f]{overflow-wrap:anywhere;flex:999 auto;min-width:0}.request-card-actions[data-v-d57b5f1f]{flex:1 0 auto}.code-snippet[data-v-d57b5f1f]{flex-direction:column;width:100%;display:flex}.property-example[data-v-1380dfca]{font-size:var(--scalar-mini);flex-direction:column;display:flex;position:relative}.property-example[data-v-1380dfca]:hover:before{pointer-events:none;content:"";border-radius:var(--scalar-radius);width:100%;height:20px;position:absolute;top:0;left:0}.property-example-value[data-v-1380dfca]{font-family:var(--scalar-font-code);align-items:center;gap:8px;width:100%;padding:6px;display:flex}.property-example-value span[data-v-1380dfca]{text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}.property-example-value[data-v-1380dfca] svg{color:var(--scalar-color-3)}.property-example-value[data-v-1380dfca]:hover svg{color:var(--scalar-color-1)}.property-example-value[data-v-1380dfca]{background:var(--scalar-background-2);border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius)}.property-example-value-list[data-v-1380dfca]{background-color:var(--scalar-background-1);box-shadow:var(--scalar-shadow-1);border-radius:var(--scalar-radius-lg);border:var(--scalar-border-width) solid var(--scalar-border-color);z-index:1000;flex-direction:column;gap:3px;min-width:200px;max-width:300px;padding:9px;display:none;position:absolute;top:18px;left:50%;overflow:auto;transform:translate(-50%)}.property-example-value-list-start[data-v-1380dfca]{left:0;transform:none}.property-example:hover .property-example-value-list[data-v-1380dfca]{display:flex}.error[data-v-86862f28]{background-color:var(--scalar-color-red)}.schema-card[data-v-86862f28]{font-size:var(--scalar-font-size-4);color:var(--scalar-color-1)}.schema-card-title[data-v-86862f28]{height:var(--schema-title-height);color:var(--scalar-color-2);font-weight:var(--scalar-semibold);font-size:var(--scalar-mini);border-bottom:var(--scalar-border-width) solid transparent;align-items:center;gap:4px;padding:6px 8px;display:flex}button.schema-card-title[data-v-86862f28]{cursor:pointer}button.schema-card-title[data-v-86862f28]:hover{color:var(--scalar-color-1)}.schema-properties-open>.schema-card-title[data-v-86862f28]{border-bottom:var(--scalar-border-width) solid var(--scalar-border-color);border-bottom-right-radius:0;border-bottom-left-radius:0}.schema-properties-open>.schema-properties[data-v-86862f28]{width:fit-content}.schema-card-description[data-v-86862f28]{color:var(--scalar-color-2)}.schema-card-description+.schema-properties[data-v-86862f28]{width:fit-content;margin-top:8px}.schema-card--level-0:first-of-type>.schema-card-description[data-v-86862f28]:has(+.schema-properties){border-bottom:var(--scalar-border-width) solid var(--scalar-border-color);margin-bottom:-8px;padding-bottom:8px}.schema-card--level-0~.schema-card--level-0>.schema-card-description[data-v-86862f28]:has(+.schema-properties){padding-top:8px}.schema-properties-open.schema-properties[data-v-86862f28],.schema-properties-open>.schema-card--open[data-v-86862f28]{width:100%}.schema-properties[data-v-86862f28]{border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius-lg);flex-direction:column;width:fit-content;display:flex}.schema-properties-name[data-v-86862f28]{width:100%}.schema-properties .schema-properties[data-v-86862f28]{border-radius:13.5px}.schema-properties .schema-properties.schema-properties-open[data-v-86862f28]{border-radius:var(--scalar-radius-lg)}.schema-properties-open[data-v-86862f28]{width:100%}.schema-card--compact[data-v-86862f28]{align-self:flex-start}.schema-card--compact.schema-card--open[data-v-86862f28]{align-self:initial}.schema-card-title--compact[data-v-86862f28]{color:var(--scalar-color-2);border-bottom:none;height:auto;padding:6px 10px 6px 8px}.schema-properties-open>.schema-card-title--compact[data-v-86862f28]{position:static}.property--level-0>.schema-properties>.schema-card--level-0>.schema-properties[data-v-86862f28]{border:none}.property--level-0 .schema-card--level-0:not(.schema-card--compact) .property--level-1[data-v-86862f28]{padding:0 0 8px}:not(.composition-panel)>.schema-card--compact.schema-card--level-0>.schema-properties[data-v-86862f28]{border:none}[data-v-86862f28] .schema-card-description p{font-size:var(--scalar-small,var(--scalar-paragraph));color:var(--scalar-color-2);margin-bottom:6px;display:block}.children .schema-card-description[data-v-86862f28]:first-of-type{padding-top:0}.property-rule[data-v-e22666da] .composition-panel>.schema-card>.schema-properties>ul>li.property.property--tree-container{padding-top:0!important}.property-heading:empty+.property-description[data-v-1b21ab2e]:last-of-type,.property-description[data-v-1b21ab2e]:first-of-type:last-of-type{margin-top:0}.property-list[data-v-1b21ab2e]{border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius);margin-top:10px}.property-list .property[data-v-1b21ab2e]:last-of-type{padding-bottom:10px}.enum-toggle-button[data-v-1b21ab2e]:hover{color:var(--scalar-color-1)}.badge.badge-colored[data-v-eecf5e58]{background-color:var(--badge-color);color:color-mix(in srgb, var(--badge-color), black 40%)}@supports (color:lch(from red calc((50 - l) * infinity) 0 0)){.badge.badge-colored[data-v-eecf5e58]{color:lch(from var(--badge-color) calc((50 - l) * infinity) 0 0 / 1)}}.badge.text-orange[data-v-eecf5e58]{background:color-mix(in srgb, var(--scalar-color-orange), transparent 90%);border:#0000}.badge.text-yellow[data-v-eecf5e58]{background:color-mix(in srgb, var(--scalar-color-yellow), transparent 90%);border:#0000}.badge.text-red[data-v-eecf5e58]{background:color-mix(in srgb, var(--scalar-color-red), transparent 90%);border:#0000}.badge.text-purple[data-v-eecf5e58]{background:color-mix(in srgb, var(--scalar-color-purple), transparent 90%);border:#0000}.badge.text-green[data-v-eecf5e58]{background:color-mix(in srgb, var(--scalar-color-green), transparent 90%);border:#0000}.property-default[data-v-46973243]{font-size:var(--scalar-mini);flex-direction:column;display:flex;position:relative}.property-default[data-v-46973243]:hover:before{content:"";border-radius:var(--scalar-radius);width:100%;height:20px;position:absolute;top:0;left:0}.property-default:hover .property-default-label span[data-v-46973243]{color:var(--scalar-color-1)}.property-default-label span[data-v-46973243]{color:var(--scalar-color-2);border-bottom:var(--scalar-border-width) dotted currentColor;position:relative}.property-default-value[data-v-46973243]{font-family:var(--scalar-font-code);align-items:center;gap:8px;width:100%;padding:6px;display:flex}.property-default-value span[data-v-46973243]{text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}.property-default-value[data-v-46973243] svg{color:var(--scalar-color-3)}.property-default-value[data-v-46973243]:hover svg{color:var(--scalar-color-1)}.property-default-value[data-v-46973243]{background:var(--scalar-background-2);border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius)}.property-default-value-list[data-v-46973243]{background-color:var(--scalar-background-1);box-shadow:var(--scalar-shadow-1);border-radius:var(--scalar-radius-lg);border:var(--scalar-border-width) solid var(--scalar-border-color);z-index:2;flex-direction:column;gap:3px;min-width:200px;max-width:300px;padding:9px;display:none;position:absolute;top:18px;left:50%;overflow:auto;transform:translate(-50%)}.property-default:hover .property-default-value-list[data-v-46973243]{display:flex}.property-detail[data-v-8b57daa7]{display:inline-flex}.property-detail+.property-detail[data-v-8b57daa7]:before{content:"·";margin:0 .5ch;display:block}.property-detail-truncate[data-v-8b57daa7]{overflow:hidden}.property-detail-truncate>.property-detail-value[data-v-8b57daa7]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.property-detail-prefix[data-v-8b57daa7]{color:var(--scalar-color-2)}code.property-detail-value[data-v-8b57daa7]{font-family:var(--scalar-font-code);font-size:var(--scalar-font-size-3);color:var(--scalar-color-2);background:color-mix(in srgb, var(--scalar-background-2), var(--scalar-background-1));border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius);padding:0 4px}.property-pattern[data-v-e8f7b07b]{font-size:var(--scalar-mini);flex-direction:column;display:flex;position:relative}.property-pattern[data-v-e8f7b07b]:hover:before{content:"";border-radius:var(--scalar-radius);width:100%;height:20px;position:absolute;top:0;left:0}.property-pattern-popup[data-v-e8f7b07b]{background-color:var(--scalar-background-1);box-shadow:var(--scalar-shadow-1);border-radius:var(--scalar-radius-lg);border:var(--scalar-border-width) solid var(--scalar-border-color);z-index:1000;min-width:200px;max-width:min(500px,100vw - 32px);max-height:min(400px,100vh - 32px);padding:9px;display:none;position:absolute;top:18px;left:50%;overflow-y:auto;transform:translate(-50%)}.property-pattern:hover .property-pattern-popup[data-v-e8f7b07b],.property-pattern:focus-within .property-pattern-popup[data-v-e8f7b07b],.property-pattern.is-open .property-pattern-popup[data-v-e8f7b07b]{display:flex}.property-pattern-value[data-v-e8f7b07b]{font-family:var(--scalar-font-code);background:var(--scalar-background-2);border:var(--scalar-border-width) solid var(--scalar-border-color);border-radius:var(--scalar-radius);align-items:flex-start;gap:8px;width:100%;padding:6px;display:flex}.property-pattern-value code[data-v-e8f7b07b]{font-family:var(--scalar-font-code);font-size:var(--scalar-font-size-3);color:var(--scalar-color-2);white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;text-align:left;flex:1}.property-heading[data-v-d9e2f10e]{white-space:nowrap;flex-wrap:wrap;align-items:baseline;row-gap:9px;display:flex}:is(.property-heading[data-v-d9e2f10e]:has(+.children),.property-heading[data-v-d9e2f10e]:has(+.property-rule)){margin-bottom:9px}.property-heading[data-v-d9e2f10e]>*{margin-right:9px}.property-heading[data-v-d9e2f10e]:last-child{margin-right:0}.property-name[data-v-d9e2f10e]{max-width:100%;font-family:var(--scalar-font-code);font-weight:var(--scalar-bold);font-size:var(--scalar-font-size-4);white-space:normal;overflow-wrap:break-word}.property-additional[data-v-d9e2f10e]{font-family:var(--scalar-font-code)}.property-required[data-v-d9e2f10e],.property-optional[data-v-d9e2f10e]{color:var(--scalar-color-2)}.property-required[data-v-d9e2f10e]{font-size:var(--scalar-mini);color:var(--scalar-color-orange)}.light-mode .property-required[data-v-d9e2f10e]{color:color-mix(in srgb, var(--scalar-color-orange), var(--scalar-color-1) 32%)}.property-read-only[data-v-d9e2f10e]{font-size:var(--scalar-mini);color:var(--scalar-color-blue)}.property-write-only[data-v-d9e2f10e]{font-size:var(--scalar-mini);color:var(--scalar-color-green)}.property-discriminator[data-v-d9e2f10e]{font-size:var(--scalar-mini);color:var(--scalar-color-purple)}.property-detail[data-v-d9e2f10e]{font-size:var(--scalar-mini);color:var(--scalar-color-2);align-items:center;min-width:0;display:flex}.property-const[data-v-d9e2f10e]{color:var(--scalar-color-1)}.deprecated[data-v-d9e2f10e]{text-decoration:line-through}.property[data-v-00f22f7c]{color:var(--scalar-color-1);font-size:var(--scalar-small);flex-direction:column;padding:10px;display:flex;position:relative}.property[data-v-00f22f7c]:has(>.property-rule:first-of-type):not(.property--compact){padding-top:8px;padding-bottom:8px}.property--deprecated[data-v-00f22f7c]{background:repeating-linear-gradient(-45deg, var(--scalar-background-2) 0, var(--scalar-background-2) 2px, transparent 2px, transparent 5px);background-size:100%}.property-description[data-v-00f22f7c]{line-height:1.4;font-size:var(--scalar-small);margin-top:6px}.property-description[data-v-00f22f7c]:has(+.property-rule){margin-bottom:9px}[data-v-00f22f7c] .property-description *{color:var(--scalar-color-2)!important}.property[data-v-00f22f7c]:not(:last-of-type){border-bottom:var(--scalar-border-width) solid var(--scalar-border-color)}.property-description+.children[data-v-00f22f7c],.children+.property-rule[data-v-00f22f7c]{margin-top:9px}.children[data-v-00f22f7c]{flex-direction:column;display:flex}.children .property--compact.property--level-1[data-v-00f22f7c]{padding:12px}.property-example-value[data-v-00f22f7c]{all:unset;font-family:var(--scalar-font-code);border-top:var(--scalar-border-width) solid var(--scalar-border-color);padding:6px}.property-rule[data-v-00f22f7c]{border-radius:var(--scalar-radius-lg);flex-direction:column;display:flex}.property-example[data-v-00f22f7c]{background:0 0;border:none;flex-direction:row;gap:8px;display:flex}.property-example-label[data-v-00f22f7c],.property-example-value[data-v-00f22f7c]{padding:3px 0 0}.property-example-value[data-v-00f22f7c]{background:var(--scalar-background-2);border-radius:var(--scalar-radius);border-top:0;padding:3px 4px}.property-name[data-v-00f22f7c]{font-family:var(--scalar-font-code);font-weight:var(--scalar-semibold)}.property-name-additional-properties[data-v-00f22f7c]:before,.property-name-pattern-properties[data-v-00f22f7c]:before{text-transform:uppercase;font-size:var(--scalar-micro);border-radius:var(--scalar-radius);color:var(--scalar-color-1);border:var(--scalar-border-width) solid var(--scalar-border-color);background-color:var(--scalar-background-2);margin-right:4px;padding:2px 4px;display:inline-block}.property-name-pattern-properties[data-v-00f22f7c]:before{content:"regex"}.property-name-additional-properties[data-v-00f22f7c],.property-name-pattern-properties[data-v-00f22f7c]{border:1px dashed var(--scalar-border-color);color:var(--scalar-color-accent);border-radius:var(--scalar-radius);padding:2px;display:inline-block}.schema-type-icon[data-v-39d4fd7f]{color:var(--scalar-color-1);display:none}.schema-type[data-v-39d4fd7f]{font-family:var(--scalar-font-code);color:var(--scalar-color-1)}
2
2
  /*$vite$:1*/
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "blocks",
18
18
  "docs"
19
19
  ],
20
- "version": "0.6.2",
20
+ "version": "0.6.4",
21
21
  "engines": {
22
22
  "node": ">=22"
23
23
  },
@@ -62,15 +62,15 @@
62
62
  "CHANGELOG.md"
63
63
  ],
64
64
  "dependencies": {
65
- "@scalar/components": "0.33.0",
66
- "@scalar/helpers": "0.16.4",
65
+ "@scalar/components": "0.33.2",
66
+ "@scalar/helpers": "0.17.0",
67
67
  "@scalar/icons": "0.7.8",
68
- "@scalar/localization": "0.2.9",
69
- "@scalar/snippetz": "0.10.13",
70
- "@scalar/themes": "0.19.3",
71
- "@scalar/types": "0.25.2",
72
- "@scalar/use-hooks": "0.4.22",
73
- "@scalar/workspace-store": "0.69.2",
68
+ "@scalar/localization": "0.2.10",
69
+ "@scalar/snippetz": "0.10.15",
70
+ "@scalar/themes": "0.20.0",
71
+ "@scalar/types": "0.27.0",
72
+ "@scalar/use-hooks": "0.4.23",
73
+ "@scalar/workspace-store": "0.70.0",
74
74
  "@types/har-format": "^1.2.16",
75
75
  "@vueuse/core": "15.0.0",
76
76
  "js-base64": "^3.9.4",