@scalar/api-reference 1.64.1 → 1.65.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/browser/chunks/{AgentScalarChatInterface-D1mzA447.js → AgentScalarChatInterface-B8091hGB.js} +4 -4
- package/dist/browser/chunks/ScalarTextInput.vue-Y69qfG1_.js +27 -0
- package/dist/browser/chunks/basic-shape-diamond.svg-o5eiY2I7.js +1 -1
- package/dist/browser/chunks/basic-shape-hexagon.svg-CGuS7mbd.js +1 -1
- package/dist/browser/chunks/basic-shape-primary-circle-ellipse-round.svg-DDIpXiBm.js +1 -1
- package/dist/browser/chunks/basic-shape-primary-square-rectangle.svg-DzVEJHMB.js +1 -1
- package/dist/browser/chunks/basic-shape-shield.svg-BZzapRqv.js +1 -1
- package/dist/browser/chunks/browser-CTPPEMEL.js +1 -1
- package/dist/browser/chunks/computer-device-desktop-monitor.svg-OSM05r1I.js +1 -1
- package/dist/browser/chunks/computer-device-desktop.svg-BMFzGZ27.js +1 -1
- package/dist/browser/chunks/computer-device-laptop.svg-CMAjzuB-.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-phone-android-samsung-back.svg-D4xBONmL.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-phone-android-samsung.svg-gbMJLjJw.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-phone-iphone-x-back.svg-Bl1rmdKA.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-phone-iphone-x.svg-DVetP0aa.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-tablet-touch.svg-Zi88BP4L.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-tablet.svg-C1ggisWP.js +1 -1
- package/dist/browser/chunks/computer-device-network-ethernet-cat6.svg-BIUymdC1.js +1 -1
- package/dist/browser/chunks/computer-device-network-lan-www.svg-CoFUlIVO.js +1 -1
- package/dist/browser/chunks/computer-device-network-wifi-connection.svg-DeWsacxI.js +1 -1
- package/dist/browser/chunks/computer-device-network-wifi-router.svg-BjpZEot4.js +1 -1
- package/dist/browser/chunks/ecology-science-erlenmeyer-flask.svg-ftjGGirE.js +1 -1
- package/dist/browser/chunks/image-flash-lightning.svg-DYQ0W4Fi.js +1 -1
- package/dist/browser/chunks/image-picture-flower.svg-Bfe5SVDf.js +1 -1
- package/dist/browser/chunks/interface-alert-exclamation-diamond.svg-D1HePDNM.js +1 -1
- package/dist/browser/chunks/interface-alert-exclamation-triangle-warning.svg-CILUsxBC.js +1 -1
- package/dist/browser/chunks/interface-alert-information-circle.svg-9LrbJM5J.js +1 -1
- package/dist/browser/chunks/interface-award-crown.svg-DllWgiU1.js +1 -1
- package/dist/browser/chunks/interface-bookmark-tag.svg-Dc-JL-Kc.js +1 -1
- package/dist/browser/chunks/interface-bookmark.svg-Dc-JL-Kc.js +1 -1
- package/dist/browser/chunks/interface-calendar-date-one.svg-DO2jelhF.js +1 -1
- package/dist/browser/chunks/interface-content-book-open-pages.svg-BJjMjIgA.js +1 -1
- package/dist/browser/chunks/interface-content-book-page.svg-C6rKB2fs.js +1 -1
- package/dist/browser/chunks/interface-content-file.svg-CS0q2FKx.js +1 -1
- package/dist/browser/chunks/interface-content-folder.svg-CThTWsJX.js +1 -1
- package/dist/browser/chunks/interface-copy-clipboard.svg-DdN67cLv.js +1 -1
- package/dist/browser/chunks/interface-edit-attachment.svg-Ciizphuh.js +1 -1
- package/dist/browser/chunks/interface-edit-binocular.svg-Dw1nDqmL.js +1 -1
- package/dist/browser/chunks/interface-edit-magic-wand.svg-BYS0jm_E.js +1 -1
- package/dist/browser/chunks/interface-edit-tool-paint-roller.svg-NioSHZC2.js +1 -1
- package/dist/browser/chunks/interface-edit-tool-pencil.svg-P87QFlat.js +1 -1
- package/dist/browser/chunks/interface-favorite-award.svg-DBBAChSi.js +1 -1
- package/dist/browser/chunks/interface-favorite-flag.svg-HlhPomHY.js +1 -1
- package/dist/browser/chunks/interface-favorite-heart.svg-Cqu2GYDo.js +1 -1
- package/dist/browser/chunks/interface-favorite-star.svg-BD4JY_J2.js +1 -1
- package/dist/browser/chunks/interface-favorite-stars-sparkles.svg-BXi6aO8q.js +1 -1
- package/dist/browser/chunks/interface-hierarchy-flowchart.svg-CDEVSsD4.js +1 -1
- package/dist/browser/chunks/interface-home-house.svg-DJetUjwj.js +1 -1
- package/dist/browser/chunks/interface-hyperlink.svg-DJ1LREmz.js +1 -1
- package/dist/browser/chunks/interface-lighting-brightness.svg-TGKAaHYV.js +1 -1
- package/dist/browser/chunks/interface-lock-closed.svg-3hehWr3i.js +1 -1
- package/dist/browser/chunks/interface-lock-open-unlock.svg-CuXKcv1m.js +1 -1
- package/dist/browser/chunks/interface-login-key.svg-Chwvvywd.js +1 -1
- package/dist/browser/chunks/interface-search.svg-JDE3fk0u.js +1 -1
- package/dist/browser/chunks/interface-setting-cog.svg-BBCkeh4K.js +1 -1
- package/dist/browser/chunks/interface-share-megaphone-bullhorn.svg-CDdxF-4y.js +1 -1
- package/dist/browser/chunks/interface-share-rocket.svg-DSbdn_o7.js +1 -1
- package/dist/browser/chunks/interface-share-satellite.svg-CefBVZvY.js +1 -1
- package/dist/browser/chunks/interface-share-space-ship.svg-tFA2dsSU.js +1 -1
- package/dist/browser/chunks/interface-share.svg-BpOGopyv.js +1 -1
- package/dist/browser/chunks/interface-signal-square.svg-BcX_BoaC.js +1 -1
- package/dist/browser/chunks/interface-time-clock-circle.svg-C8B_L_RM.js +1 -1
- package/dist/browser/chunks/interface-time-hour-glass.svg-qw-oeoVn.js +1 -1
- package/dist/browser/chunks/interface-users-multiple.svg-Cs13Eewq.js +1 -1
- package/dist/browser/chunks/interface-weather-moon.svg-CV-oDTae.js +1 -1
- package/dist/browser/chunks/mail-chat-bubble-square.svg-dpauJhin.js +1 -1
- package/dist/browser/chunks/mail-send-email-paper-airplane.svg-BBofxojL.js +1 -1
- package/dist/browser/chunks/mail-send-envelope.svg-DyENgYOI.js +1 -1
- package/dist/browser/chunks/modal-C-pxwP3A.js +102 -0
- package/dist/browser/chunks/money-cashier-receipt.svg-dNTr5aio.js +1 -1
- package/dist/browser/chunks/money-currency-dollar-pay.svg-1ZESPtFY.js +1 -1
- package/dist/browser/chunks/money-graph-arrow-increase.svg-kEZ2u2z2.js +1 -1
- package/dist/browser/chunks/money-graph-bar-chart-increase.svg-B-t2UWB3.js +1 -1
- package/dist/browser/chunks/nature-ecology-leaf.svg-DZ2GJV8m.js +1 -1
- package/dist/browser/chunks/phone-telephone.svg-C12QjpN7.js +1 -1
- package/dist/browser/chunks/programming-bug.svg-wLTsruN9.js +1 -1
- package/dist/browser/chunks/programming-cloud.svg-3XU6dNUg.js +1 -1
- package/dist/browser/chunks/programming-computer-database-server.svg-B1JrHSPd.js +1 -1
- package/dist/browser/chunks/programming-computer-database.svg-BxHSuFl7.js +1 -1
- package/dist/browser/chunks/programming-module-four-layout.svg-CeV35q45.js +1 -1
- package/dist/browser/chunks/programming-module-three.svg-YIBpLt45.js +1 -1
- package/dist/browser/chunks/programming-module.svg-CU_pEibI.js +1 -1
- package/dist/browser/chunks/programming-script-code.svg-CLzinmHT.js +1 -1
- package/dist/browser/chunks/runtime-core.esm-bundler-CqqEw5ds.js +1 -1
- package/dist/browser/chunks/shopping-cart.svg-Brzddu3K.js +1 -1
- package/dist/browser/chunks/shopping-gift-present.svg-l2K48g7L.js +1 -1
- package/dist/browser/chunks/shopping-shipping-box-parcel-package.svg-DesGopPo.js +1 -1
- package/dist/browser/chunks/tag-new-circle.svg-DE-VaLZU.js +1 -1
- package/dist/browser/chunks/travel-map-earth-globe.svg-DLaOMzx6.js +1 -1
- package/dist/browser/chunks/vendor-B93Hdr0r.js +306 -0
- package/dist/browser/standalone.esm.js +20 -20
- package/dist/browser/standalone.js +235 -232
- package/dist/components/AgentScalar/OpenMCPButton.vue.d.ts.map +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.js +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.js.map +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.script.js.map +1 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +1 -1
- package/dist/components/ApiReference.vue.js.map +1 -1
- package/dist/components/ApiReference.vue.script.js +8 -8
- package/dist/components/ApiReference.vue.script.js.map +1 -1
- package/dist/components/Content/AsyncApi/index.d.ts +3 -0
- package/dist/components/Content/AsyncApi/index.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.script.js +5 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +6 -0
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js +5 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/helpers/get-ref-name.d.ts +16 -0
- package/dist/components/Content/Schema/helpers/get-ref-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/get-ref-name.js +28 -1
- package/dist/components/Content/Schema/helpers/get-ref-name.js.map +1 -1
- package/dist/components/Content/Schema/helpers/is-model-linkable.d.ts +15 -0
- package/dist/components/Content/Schema/helpers/is-model-linkable.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/is-model-linkable.js +22 -0
- package/dist/components/Content/Schema/helpers/is-model-linkable.js.map +1 -0
- package/dist/components/Content/Schema/helpers/schema-name.d.ts +6 -1
- package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-name.js +5 -4
- package/dist/components/Content/Schema/helpers/schema-name.js.map +1 -1
- package/dist/components/Content/Schema/types.d.ts +7 -0
- package/dist/components/Content/Schema/types.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +5 -1
- package/dist/features/Operation/components/Header.vue.d.ts +2 -0
- package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Header.vue.js.map +1 -1
- package/dist/features/Operation/components/Header.vue.script.js +3 -1
- package/dist/features/Operation/components/Header.vue.script.js.map +1 -1
- package/dist/features/Operation/components/Headers.vue.d.ts +2 -0
- package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Headers.vue.js +1 -1
- package/dist/features/Operation/components/Headers.vue.js.map +1 -1
- package/dist/features/Operation/components/Headers.vue.script.js +4 -1
- package/dist/features/Operation/components/Headers.vue.script.js.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.script.js +2 -2
- package/dist/features/Operation/components/OperationParameters.vue.script.js.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.script.js +3 -0
- package/dist/features/Operation/components/ParameterListItem.vue.script.js.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.script.js +10 -1
- package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -1
- package/dist/features/Search/components/SearchResult.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchResult.vue.js.map +1 -1
- package/dist/features/Search/components/SearchResult.vue.script.js +2 -2
- package/dist/features/Search/components/SearchResult.vue.script.js.map +1 -1
- package/dist/helpers/build-models-index.d.ts +15 -0
- package/dist/helpers/build-models-index.d.ts.map +1 -0
- package/dist/helpers/build-models-index.js +28 -0
- package/dist/helpers/build-models-index.js.map +1 -0
- package/dist/helpers/storage.d.ts +16 -0
- package/dist/helpers/storage.d.ts.map +1 -1
- package/dist/style.css +418 -409
- package/dist/vue-styles.css +370 -361
- package/package.json +13 -13
- package/dist/browser/chunks/ScalarTextInput.vue-OfiA6SHf.js +0 -27
- package/dist/browser/chunks/modal-BS4e2gew.js +0 -99
- package/dist/browser/chunks/vendor-DWZAEyBy.js +0 -306
- package/dist/features/Operation/helpers/should-ignore-entity.d.ts +0 -8
- package/dist/features/Operation/helpers/should-ignore-entity.d.ts.map +0 -1
- package/dist/features/Operation/helpers/should-ignore-entity.js +0 -9
- package/dist/features/Operation/helpers/should-ignore-entity.js.map +0 -1
|
@@ -4,6 +4,7 @@ import { isTypeObject } from "../../../components/Content/Schema/helpers/is-type
|
|
|
4
4
|
import { getModelNameFromSchema } from "../../../components/Content/Schema/helpers/schema-name.js";
|
|
5
5
|
import { reduceNamesToObject, sortPropertyNames } from "../../../components/Content/Schema/helpers/sort-property-names.js";
|
|
6
6
|
import LinkButton_default from "../../../components/Content/Schema/LinkButton.vue.js";
|
|
7
|
+
import { isModelLinkable } from "../../../components/Content/Schema/helpers/is-model-linkable.js";
|
|
7
8
|
import Schema_default from "../../../components/Content/Schema/Schema.vue.js";
|
|
8
9
|
import ContentTypeSelect_default from "./ContentTypeSelect.vue.js";
|
|
9
10
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, openBlock, renderSlot, toDisplayString, unref, useModel, withCtx } from "vue";
|
|
@@ -64,6 +65,11 @@ var RequestBody_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
64
65
|
const schema = computed(() => getResolvedRef(rawSchema.value));
|
|
65
66
|
/** When the schema is a $ref, preserve its name so the UI can show the ref name instead of just the type. */
|
|
66
67
|
const modelLink = computed(() => (rawSchema.value && getModelNameFromSchema(rawSchema.value)) ?? null);
|
|
68
|
+
/** Whether the model name links to the models section, or renders as plain text. */
|
|
69
|
+
const modelLinkable = computed(() => isModelLinkable(modelLink.value?.schemaKey, {
|
|
70
|
+
hideModels: __props.options.hideModels,
|
|
71
|
+
document: __props.document
|
|
72
|
+
}));
|
|
67
73
|
/**
|
|
68
74
|
* Splits schema properties into visible and collapsed sections when there are more than 12 properties.
|
|
69
75
|
* Returns null for schemas with fewer properties or non-object schemas.
|
|
@@ -105,7 +111,7 @@ var RequestBody_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
105
111
|
class: "request-body",
|
|
106
112
|
role: "group"
|
|
107
113
|
}, [createElementVNode("div", _hoisted_2, [
|
|
108
|
-
createElementVNode("div", _hoisted_3, [renderSlot(_ctx.$slots, "title", {}, void 0, true), modelLink.value ? (openBlock(), createElementBlock("span", _hoisted_4, [_cache[2] || (_cache[2] = createElementVNode("span", { class: "text-c-3 mx-1.5" }, "·", -1)), __props.eventBus && modelLink.value.schemaKey ? (openBlock(), createBlock(LinkButton_default, {
|
|
114
|
+
createElementVNode("div", _hoisted_3, [renderSlot(_ctx.$slots, "title", {}, void 0, true), modelLink.value ? (openBlock(), createElementBlock("span", _hoisted_4, [_cache[2] || (_cache[2] = createElementVNode("span", { class: "text-c-3 mx-1.5" }, "·", -1)), __props.eventBus && modelLink.value.schemaKey && modelLinkable.value ? (openBlock(), createBlock(LinkButton_default, {
|
|
109
115
|
key: 0,
|
|
110
116
|
onClick: _cache[0] || (_cache[0] = ($event) => __props.eventBus.emit("scroll-to:model-by-name", { name: modelLink.value.schemaKey }))
|
|
111
117
|
}, {
|
|
@@ -130,6 +136,7 @@ var RequestBody_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
130
136
|
orderRequiredPropertiesFirst: __props.options.orderRequiredPropertiesFirst,
|
|
131
137
|
orderSchemaPropertiesBy: __props.options.orderSchemaPropertiesBy,
|
|
132
138
|
expandAllSchemaProperties: __props.options.expandAllSchemaProperties,
|
|
139
|
+
hideModels: __props.options.hideModels,
|
|
133
140
|
document: __props.document
|
|
134
141
|
},
|
|
135
142
|
schema: partitionedSchema.value.visibleProperties,
|
|
@@ -153,6 +160,7 @@ var RequestBody_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
153
160
|
orderRequiredPropertiesFirst: __props.options.orderRequiredPropertiesFirst,
|
|
154
161
|
orderSchemaPropertiesBy: __props.options.orderSchemaPropertiesBy,
|
|
155
162
|
expandAllSchemaProperties: __props.options.expandAllSchemaProperties,
|
|
163
|
+
hideModels: __props.options.hideModels,
|
|
156
164
|
document: __props.document
|
|
157
165
|
},
|
|
158
166
|
schema: partitionedSchema.value.collapsedProperties,
|
|
@@ -176,6 +184,7 @@ var RequestBody_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
176
184
|
orderRequiredPropertiesFirst: __props.options.orderRequiredPropertiesFirst,
|
|
177
185
|
orderSchemaPropertiesBy: __props.options.orderSchemaPropertiesBy,
|
|
178
186
|
expandAllSchemaProperties: __props.options.expandAllSchemaProperties,
|
|
187
|
+
hideModels: __props.options.hideModels,
|
|
179
188
|
document: __props.document
|
|
180
189
|
},
|
|
181
190
|
schema: schema.value,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBody.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/RequestBody.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n OpenApiDocument,\n RequestBodyObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { Schema } from '@/components/Content/Schema'\nimport { inferDiscriminatorMappingComposition } from '@/components/Content/Schema/helpers/get-compositions-to-render'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { getModelNameFromSchema } from '@/components/Content/Schema/helpers/schema-name'\nimport {\n reduceNamesToObject,\n sortPropertyNames,\n} from '@/components/Content/Schema/helpers/sort-property-names'\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\nimport { useLocalization } from '@/features/localization'\n\nimport ContentTypeSelect from './ContentTypeSelect.vue'\n\nconst { requestBody, options, document } = defineProps<{\n breadcrumb?: string[]\n requestBody?: RequestBodyObject\n eventBus: WorkspaceEventBus | null\n /** The document the request body belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: {\n orderRequiredPropertiesFirst: boolean | undefined\n orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined\n hideModels: boolean | undefined\n expandAllSchemaProperties: boolean | undefined\n }\n}>()\nconst { translate } = useLocalization()\n\n/**\n * The maximum number of properties to show in the request body schema.\n */\nconst MAX_VISIBLE_PROPERTIES = 12\n\nconst availableContentTypes = computed(() =>\n Object.keys(requestBody?.content ?? {}),\n)\n\nconst selectedContentType = defineModel<string>('selectedContentType', {\n default: 'application/json',\n})\n\nif (requestBody?.content) {\n if (availableContentTypes.value[0]) {\n selectedContentType.value = availableContentTypes.value[0]\n }\n}\n\n/** Raw schema (possibly with $ref) for the selected content type */\nconst rawSchema = computed(\n () => requestBody?.content?.[selectedContentType.value]?.schema,\n)\n\nconst schema = computed(() => getResolvedRef(rawSchema.value))\n\n/** When the schema is a $ref, preserve its name so the UI can show the ref name instead of just the type. */\nconst modelLink = computed(\n () => (rawSchema.value && getModelNameFromSchema(rawSchema.value)) ?? null,\n)\n\n/**\n * Splits schema properties into visible and collapsed sections when there are more than 12 properties.\n * Returns null for schemas with fewer properties or non-object schemas.\n */\nconst partitionedSchema = computed(() => {\n // Early return if not an object schema\n if (!schema.value || !isTypeObject(schema.value)) {\n return null\n }\n\n // A schema whose variants are inferred from a `discriminator.mapping` renders\n // as a single variant selector, not a flat property list. Splitting it would\n // duplicate that selector across the visible and collapsed blocks, so we keep\n // it whole. See https://github.com/scalar/scalar/issues/7472\n if (inferDiscriminatorMappingComposition(schema.value, document)) {\n return null\n }\n\n // Lets sort the names first\n const sortedNames = sortPropertyNames(\n schema.value,\n schema.value.discriminator,\n {\n hideReadOnly: true,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n },\n )\n\n if (sortedNames.length <= MAX_VISIBLE_PROPERTIES) {\n return null\n }\n\n // Destructure everything except properties\n const { properties, ...schemaMetadata } = schema.value\n if (!properties) {\n return null\n }\n\n return {\n visibleProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(0, MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n collapsedProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n }\n})\n\n/**\n * We don't want to render the request body if its completely empty\n * @example\n * {\n * \"content\": {},\n * }\n */\nconst shouldRenderRequestBody = computed(\n () =>\n Object.keys(requestBody?.content ?? {}).length > 0 ||\n requestBody?.description ||\n requestBody?.required,\n)\n</script>\n<template>\n <div\n v-if=\"requestBody && shouldRenderRequestBody\"\n :aria-label=\"translate('operation.requestBody')\"\n class=\"request-body\"\n role=\"group\">\n <div class=\"request-body-header\">\n <div class=\"request-body-title\">\n <slot name=\"title\" />\n <span\n v-if=\"modelLink\"\n class=\"text-c-2 text-xs leading-none font-normal\"\n data-testid=\"request-body-schema-name\">\n <span class=\"text-c-3 mx-1.5\">·</span>\n <LinkButton\n v-if=\"eventBus && modelLink.schemaKey\"\n @click=\"\n eventBus.emit('scroll-to:model-by-name', {\n name: modelLink.schemaKey,\n })\n \">\n {{ modelLink.label }}\n </LinkButton>\n <template v-else>{{ modelLink.label }}</template>\n </span>\n </div>\n <div class=\"flex items-center gap-2\">\n <div\n v-if=\"requestBody.required\"\n class=\"request-body-required\">\n {{ translate('common.required') }}\n </div>\n <ContentTypeSelect\n v-model=\"selectedContentType\"\n :content=\"requestBody.content\" />\n </div>\n <div\n v-if=\"requestBody.description\"\n class=\"request-body-description\">\n <ScalarMarkdown :value=\"requestBody.description\" />\n </div>\n </div>\n\n <!-- For over 12 properties we want to show 12 and collapse the rest -->\n <div\n v-if=\"partitionedSchema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :name=\"translate('operation.requestBody')\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"partitionedSchema.visibleProperties\"\n schemaContext=\"requestBody\" />\n\n <Schema\n additionalProperties\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n hideDescription\n :name=\"translate('operation.requestBody')\"\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"partitionedSchema.collapsedProperties\"\n schemaContext=\"requestBody\" />\n </div>\n\n <!-- Show em all 12 and under -->\n <div\n v-else-if=\"schema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :hideReadOnly=\"true\"\n :name=\"translate('operation.requestBody')\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"schema\"\n schemaContext=\"requestBody\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n.request-body {\n margin-top: 24px;\n}\n.request-body-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding-bottom: 12px;\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n flex-flow: wrap;\n}\n.request-body-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: var(--scalar-font-size-2);\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color-1);\n}\n.request-body-required {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-orange);\n font-weight: normal;\n border-radius: 16px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 2px 8px;\n height: 20px;\n}\n.request-body-description {\n margin-top: 6px;\n font-size: var(--scalar-small);\n width: 100%;\n}\n\n.request-body-header\n + .request-body-schema:has(> .schema-card > .schema-card-description),\n.request-body-header\n + .request-body-schema:has(\n > .schema-card > .schema-properties > * > .property--level-0\n ) {\n /** Add a bit of space between the heading border and the schema description or properties */\n padding-top: 8px;\n}\n.request-body-description :deep(.markdown) * {\n color: var(--scalar-color-2) !important;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,IAAM,yBAAyB;;;;;;;;;;;;;;;EAL/B,MAAM,EAAE,cAAc,gBAAgB;;;;EAOtC,MAAM,wBAAwB,eAC5B,OAAO,KAAK,QAAA,aAAa,WAAW,CAAC,CAAC,CACxC;EAEA,MAAM,sBAAsB,SAAmB,SAAC,qBAE/C;EAED,IAAI,QAAA,aAAa;OACX,sBAAsB,MAAM,IAC9B,oBAAoB,QAAQ,sBAAsB,MAAM;EAAA;;EAK5D,MAAM,YAAY,eACV,QAAA,aAAa,UAAU,oBAAoB,MAAM,EAAE,MAC3D;EAEA,MAAM,SAAS,eAAe,eAAe,UAA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ACC,iBAAiB,CAAA,aAAA;IACjB,UAAU,QAAA;IACX,iBAAA;IACC,MAAM,MAAA,SAAA,CAAS,CAAA,uBAAA;IACf,SAAO;;mCAA0E,QAAA,QAAQ;8BAAiE,QAAA,QAAQ;gCAA8D,QAAA,QAAQ;eAAqC,QAAA;;IAO7Q,QAAQ,kBAAA,MAAkB;IAC3B,eAAc;;;;;;;WAKL,OAAA,SAAA,UAAA,GADb,mBAoBM,OApBN,YAoBM,CAjBJ,YAgBgC,MAAA,cAAA,GAAA;IAf7B,YAAA,QAAA;IACD,SAAA;IACC,iBAAiB,CAAA,aAAA;IACjB,UAAU,QAAA;IACV,cAAc;IACd,MAAM,MAAA,SAAA,CAAS,CAAA,uBAAA;IAChB,gBAAA;IACC,SAAO;;mCAA0E,QAAA,QAAQ;8BAAiE,QAAA,QAAQ;gCAA8D,QAAA,QAAQ;eAAqC,QAAA;;IAO7Q,QAAQ,OAAA;IACT,eAAc"}
|
|
1
|
+
{"version":3,"file":"RequestBody.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/RequestBody.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n OpenApiDocument,\n RequestBodyObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { Schema } from '@/components/Content/Schema'\nimport { inferDiscriminatorMappingComposition } from '@/components/Content/Schema/helpers/get-compositions-to-render'\nimport { isModelLinkable } from '@/components/Content/Schema/helpers/is-model-linkable'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { getModelNameFromSchema } from '@/components/Content/Schema/helpers/schema-name'\nimport {\n reduceNamesToObject,\n sortPropertyNames,\n} from '@/components/Content/Schema/helpers/sort-property-names'\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\nimport { useLocalization } from '@/features/localization'\n\nimport ContentTypeSelect from './ContentTypeSelect.vue'\n\nconst { requestBody, options, document } = defineProps<{\n breadcrumb?: string[]\n requestBody?: RequestBodyObject\n eventBus: WorkspaceEventBus | null\n /** The document the request body belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: {\n orderRequiredPropertiesFirst: boolean | undefined\n orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined\n hideModels: boolean | undefined\n expandAllSchemaProperties: boolean | undefined\n }\n}>()\nconst { translate } = useLocalization()\n\n/**\n * The maximum number of properties to show in the request body schema.\n */\nconst MAX_VISIBLE_PROPERTIES = 12\n\nconst availableContentTypes = computed(() =>\n Object.keys(requestBody?.content ?? {}),\n)\n\nconst selectedContentType = defineModel<string>('selectedContentType', {\n default: 'application/json',\n})\n\nif (requestBody?.content) {\n if (availableContentTypes.value[0]) {\n selectedContentType.value = availableContentTypes.value[0]\n }\n}\n\n/** Raw schema (possibly with $ref) for the selected content type */\nconst rawSchema = computed(\n () => requestBody?.content?.[selectedContentType.value]?.schema,\n)\n\nconst schema = computed(() => getResolvedRef(rawSchema.value))\n\n/** When the schema is a $ref, preserve its name so the UI can show the ref name instead of just the type. */\nconst modelLink = computed(\n () => (rawSchema.value && getModelNameFromSchema(rawSchema.value)) ?? null,\n)\n\n/** Whether the model name links to the models section, or renders as plain text. */\nconst modelLinkable = computed(() =>\n isModelLinkable(modelLink.value?.schemaKey, {\n hideModels: options.hideModels,\n document,\n }),\n)\n\n/**\n * Splits schema properties into visible and collapsed sections when there are more than 12 properties.\n * Returns null for schemas with fewer properties or non-object schemas.\n */\nconst partitionedSchema = computed(() => {\n // Early return if not an object schema\n if (!schema.value || !isTypeObject(schema.value)) {\n return null\n }\n\n // A schema whose variants are inferred from a `discriminator.mapping` renders\n // as a single variant selector, not a flat property list. Splitting it would\n // duplicate that selector across the visible and collapsed blocks, so we keep\n // it whole. See https://github.com/scalar/scalar/issues/7472\n if (inferDiscriminatorMappingComposition(schema.value, document)) {\n return null\n }\n\n // Lets sort the names first\n const sortedNames = sortPropertyNames(\n schema.value,\n schema.value.discriminator,\n {\n hideReadOnly: true,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n },\n )\n\n if (sortedNames.length <= MAX_VISIBLE_PROPERTIES) {\n return null\n }\n\n // Destructure everything except properties\n const { properties, ...schemaMetadata } = schema.value\n if (!properties) {\n return null\n }\n\n return {\n visibleProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(0, MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n collapsedProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n }\n})\n\n/**\n * We don't want to render the request body if its completely empty\n * @example\n * {\n * \"content\": {},\n * }\n */\nconst shouldRenderRequestBody = computed(\n () =>\n Object.keys(requestBody?.content ?? {}).length > 0 ||\n requestBody?.description ||\n requestBody?.required,\n)\n</script>\n<template>\n <div\n v-if=\"requestBody && shouldRenderRequestBody\"\n :aria-label=\"translate('operation.requestBody')\"\n class=\"request-body\"\n role=\"group\">\n <div class=\"request-body-header\">\n <div class=\"request-body-title\">\n <slot name=\"title\" />\n <span\n v-if=\"modelLink\"\n class=\"text-c-2 text-xs leading-none font-normal\"\n data-testid=\"request-body-schema-name\">\n <span class=\"text-c-3 mx-1.5\">·</span>\n <LinkButton\n v-if=\"eventBus && modelLink.schemaKey && modelLinkable\"\n @click=\"\n eventBus.emit('scroll-to:model-by-name', {\n name: modelLink.schemaKey,\n })\n \">\n {{ modelLink.label }}\n </LinkButton>\n <template v-else>{{ modelLink.label }}</template>\n </span>\n </div>\n <div class=\"flex items-center gap-2\">\n <div\n v-if=\"requestBody.required\"\n class=\"request-body-required\">\n {{ translate('common.required') }}\n </div>\n <ContentTypeSelect\n v-model=\"selectedContentType\"\n :content=\"requestBody.content\" />\n </div>\n <div\n v-if=\"requestBody.description\"\n class=\"request-body-description\">\n <ScalarMarkdown :value=\"requestBody.description\" />\n </div>\n </div>\n\n <!-- For over 12 properties we want to show 12 and collapse the rest -->\n <div\n v-if=\"partitionedSchema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :name=\"translate('operation.requestBody')\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n hideModels: options.hideModels,\n document,\n }\"\n :schema=\"partitionedSchema.visibleProperties\"\n schemaContext=\"requestBody\" />\n\n <Schema\n additionalProperties\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n hideDescription\n :name=\"translate('operation.requestBody')\"\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n hideModels: options.hideModels,\n document,\n }\"\n :schema=\"partitionedSchema.collapsedProperties\"\n schemaContext=\"requestBody\" />\n </div>\n\n <!-- Show em all 12 and under -->\n <div\n v-else-if=\"schema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :hideReadOnly=\"true\"\n :name=\"translate('operation.requestBody')\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n hideModels: options.hideModels,\n document,\n }\"\n :schema=\"schema\"\n schemaContext=\"requestBody\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n.request-body {\n margin-top: 24px;\n}\n.request-body-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding-bottom: 12px;\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n flex-flow: wrap;\n}\n.request-body-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: var(--scalar-font-size-2);\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color-1);\n}\n.request-body-required {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-orange);\n font-weight: normal;\n border-radius: 16px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 2px 8px;\n height: 20px;\n}\n.request-body-description {\n margin-top: 6px;\n font-size: var(--scalar-small);\n width: 100%;\n}\n\n.request-body-header\n + .request-body-schema:has(> .schema-card > .schema-card-description),\n.request-body-header\n + .request-body-schema:has(\n > .schema-card > .schema-properties > * > .property--level-0\n ) {\n /** Add a bit of space between the heading border and the schema description or properties */\n padding-top: 8px;\n}\n.request-body-description :deep(.markdown) * {\n color: var(--scalar-color-2) !important;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,IAAM,yBAAyB;;;;;;;;;;;;;;;EAL/B,MAAM,EAAE,cAAc,gBAAgB;;;;EAOtC,MAAM,wBAAwB,eAC5B,OAAO,KAAK,QAAA,aAAa,WAAW,CAAC,CAAC,CACxC;EAEA,MAAM,sBAAsB,SAAmB,SAAC,qBAE/C;EAED,IAAI,QAAA,aAAa;OACX,sBAAsB,MAAM,IAC9B,oBAAoB,QAAQ,sBAAsB,MAAM;EAAA;;EAK5D,MAAM,YAAY,eACV,QAAA,aAAa,UAAU,oBAAoB,MAAM,EAAE,MAC3D;EAEA,MAAM,SAAS,eAAe,eAAe,UAAU,KAAK,CAAC;;EAG7D,MAAM,YAAY,gBACT,UAAU,SAAS,uBAAuB,UAAU,KAAK,MAAM,IACxE;;EAGA,MAAM,gBAAgB,eACpB,gBAAgB,UAAU,OAAO,WAAW;GAC1C,YAAY,QAAA,QAAQ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AAA,aAAA;IACjB,UAAU,QAAA;IACX,iBAAA;IACC,MAAM,MAAA,SAAA,CAAS,CAAA,uBAAA;IACf,SAAO;;mCAA0E,QAAA,QAAQ;8BAAiE,QAAA,QAAQ;gCAA8D,QAAA,QAAQ;iBAAiD,QAAA,QAAQ;eAAsB,QAAA;;IAQvT,QAAQ,kBAAA,MAAkB;IAC3B,eAAc;;;;;;;WAKL,OAAA,SAAA,UAAA,GADb,mBAqBM,OArBN,YAqBM,CAlBJ,YAiBgC,MAAA,cAAA,GAAA;IAhB7B,YAAA,QAAA;IACD,SAAA;IACC,iBAAiB,CAAA,aAAA;IACjB,UAAU,QAAA;IACV,cAAc;IACd,MAAM,MAAA,SAAA,CAAS,CAAA,uBAAA;IAChB,gBAAA;IACC,SAAO;;mCAA0E,QAAA,QAAQ;8BAAiE,QAAA,QAAQ;gCAA8D,QAAA,QAAQ;iBAAiD,QAAA,QAAQ;eAAsB,QAAA;;IAQvT,QAAQ,OAAA;IACT,eAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModernLayout.vue.script.js","names":[],"sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { CodeExample } from '@scalar/blocks/code-example'\nimport { ScalarErrorBoundary } from '@scalar/components/error-boundary'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { ScalarIconWebhooksLogo } from '@scalar/icons'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport type {\n OpenApiDocument,\n OperationObject,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, provide, ref, useId } from 'vue'\n\nimport { Anchor } from '@/components/Anchor'\nimport { Badge } from '@/components/Badge'\nimport { LinkList } from '@/components/LinkList'\nimport OperationPath from '@/components/OperationPath.vue'\nimport { Section, SectionContent, SectionHeaderTag } from '@/components/Section'\nimport AskAgentButton from '@/features/ask-agent-button/AskAgentButton.vue'\nimport { ExampleResponses } from '@/features/example-responses'\nimport { ExternalDocs } from '@/features/external-docs'\nimport { useLocalization } from '@/features/localization'\nimport Callbacks from '@/features/Operation/components/callbacks/Callbacks.vue'\nimport OperationParameters from '@/features/Operation/components/OperationParameters.vue'\nimport OperationResponses from '@/features/Operation/components/OperationResponses.vue'\nimport OperationScopes from '@/features/Operation/components/OperationScopes.vue'\nimport SecurityRequirementBadge from '@/features/Operation/components/SecurityRequirementBadge.vue'\nimport type { RequiredSecurity } from '@/features/Operation/helpers/get-required-security'\nimport {\n getOperationStability,\n getOperationStabilityColor,\n isOperationDeprecated,\n} from '@/features/Operation/helpers/operation-stability'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\nimport {\n REQUEST_BODY_COMPOSITION_INDEX_SYMBOL,\n type RequestBodyCompositionSelection,\n} from '@/features/Operation/request-body-composition-index'\nimport { getXKeysFromObject } from '@/features/specification-extension'\nimport SpecificationExtension from '@/features/specification-extension/SpecificationExtension.vue'\nimport { TestRequestButton } from '@/features/test-request-button'\nimport { XBadges } from '@/features/x-badges'\n\nconst {\n clientOptions,\n document,\n eventBus,\n isWebhook,\n method,\n operation,\n options,\n path,\n requiredSecurity,\n selectedServer,\n selectedSecuritySchemes,\n selectedClient,\n selectedExample,\n} = defineProps<\n Omit<\n OperationProps,\n | 'document'\n | 'pathValue'\n | 'server'\n | 'isCollapsed'\n | 'securitySchemes'\n | 'authStore'\n > & {\n /** Operation object with path params */\n operation: OperationObject\n /** The selected server for the operation */\n selectedServer: ServerObject | null\n /** The selected security schemes for the operation */\n selectedSecuritySchemes: SecuritySchemeObjectSecret[]\n /** Required/optional security state for the badge next to the path */\n requiredSecurity: RequiredSecurity\n /** The document the operation belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n }\n>()\nconst { translate } = useLocalization()\n\nconst operationTitle = computed(() => operation.summary || path || '')\n\nconst labelId = useId()\n\nconst operationExtensions = computed(() => getXKeysFromObject(operation))\n\n/** Track the selected request body content type so the code sample stays in sync */\nconst selectedRequestBodyContentType = ref<string | undefined>()\n\n/** Selected request body oneOf/anyOf variants; synced with schema dropdowns and code sample */\nconst requestBodyCompositionSelection = ref<RequestBodyCompositionSelection>({})\n\nconst requestBodyCompositionSelectionForCodeSample = computed(\n (): RequestBodyCompositionSelection => ({\n ...requestBodyCompositionSelection.value,\n }),\n)\n\nconst requestBodyCompositionSelectionKey = computed(() =>\n JSON.stringify(requestBodyCompositionSelectionForCodeSample.value),\n)\n\nprovide(REQUEST_BODY_COMPOSITION_INDEX_SYMBOL, requestBodyCompositionSelection)\n</script>\n\n<template>\n <Section\n :id=\"id\"\n :aria-labelledby=\"labelId\"\n :label=\"operationTitle\"\n tabindex=\"-1\"\n @intersecting=\"() => eventBus?.emit('intersecting:nav-item', { id })\">\n <SectionContent>\n <!-- Badges -->\n <div class=\"flex flex-row justify-between gap-1\">\n <!-- Left -->\n <div class=\"flex gap-1\">\n <!-- Operation ID -->\n <Badge v-if=\"options?.showOperationId && operation.operationId\">\n {{ operation.operationId }}\n </Badge>\n <!-- Stability badge -->\n <Badge\n v-if=\"getOperationStability(operation)\"\n class=\"capitalize\"\n :class=\"getOperationStabilityColor(operation)\">\n {{ getOperationStability(operation) }}\n </Badge>\n <!-- Webhook badge -->\n <Badge\n v-if=\"isWebhook\"\n class=\"font-code text-green flex w-fit items-center justify-center gap-1\">\n <ScalarIconWebhooksLogo weight=\"bold\" />\n {{ translate('operation.webhook') }}\n </Badge>\n <!-- x-badges before -->\n <XBadges\n :badges=\"operation['x-badges']\"\n position=\"before\" />\n </div>\n <!-- Right -->\n <div class=\"flex gap-1\">\n <!-- x-badges after -->\n <XBadges\n :badges=\"operation['x-badges']\"\n position=\"after\" />\n </div>\n </div>\n <div class=\"operation-layout\">\n <!-- Title -->\n <div\n class=\"operation-title\"\n :class=\"isOperationDeprecated(operation) && 'deprecated'\">\n <Anchor\n @copyAnchorUrl=\"() => eventBus?.emit('copy-url:nav-item', { id })\">\n <SectionHeaderTag\n :id=\"labelId\"\n :level=\"3\">\n {{ operationTitle }}\n </SectionHeaderTag>\n </Anchor>\n </div>\n\n <!-- Required auth badge -->\n <div class=\"operation-auth\">\n <SecurityRequirementBadge :requiredSecurity />\n </div>\n\n <!-- Description -->\n <div class=\"operation-description\">\n <SpecificationExtension :value=\"operationExtensions\" />\n <ScalarMarkdown\n :anchorPrefix=\"id\"\n :aria-label=\"translate('common.description')\"\n role=\"group\"\n transformType=\"heading\"\n :value=\"operation.description\"\n withAnchors\n withImages />\n </div>\n\n <!--\n Parameters, request body, responses and callbacks.\n\n This block is kept before the examples in source order on purpose: the\n request body schema (via SchemaComposition) seeds the shared\n requestBodyCompositionSelection on mount, which drives the\n CodeExample's :key. Mounting the details first means the code\n sample reads the final key on its first render and is never remounted —\n a remount would reset the selected client and tear down an open client\n picker. The grid (see grid-template-areas below) still paints the\n examples on the right, independent of this source order.\n -->\n <div class=\"operation-details\">\n <OperationScopes :requiredSecurity />\n <OperationParameters\n v-model:selectedContentType=\"selectedRequestBodyContentType\"\n :breadcrumb=\"[id]\"\n :document\n :eventBus\n :options\n :parameters=\"operation.parameters\"\n :requestBody=\"getResolvedRef(operation.requestBody)\" />\n <OperationResponses\n :breadcrumb=\"[id]\"\n :collapsableItems=\"!options.expandAllResponses\"\n :document\n :eventBus\n :options\n :responses=\"operation.responses\" />\n\n <!-- Callbacks -->\n <ScalarErrorBoundary>\n <Callbacks\n v-if=\"operation.callbacks\"\n :callbacks=\"operation.callbacks\"\n class=\"mt-6\"\n :document\n :eventBus\n :options\n :path />\n </ScalarErrorBoundary>\n </div>\n\n <!-- Example request and responses -->\n <div class=\"examples\">\n <!-- External Docs -->\n <LinkList v-if=\"operation.externalDocs\">\n <ExternalDocs :value=\"operation.externalDocs\" />\n </LinkList>\n\n <!-- New Example Request -->\n <ScalarErrorBoundary>\n <CodeExample\n :key=\"requestBodyCompositionSelectionKey\"\n :clientOptions\n :eventBus\n fallback\n :isWebhook\n :method\n :operation\n :path\n :requestBodyCompositionSelection=\"\n requestBodyCompositionSelectionForCodeSample\n \"\n :securitySchemes=\"selectedSecuritySchemes\"\n :selectedClient\n :selectedContentType=\"selectedRequestBodyContentType\"\n :selectedExample\n :selectedServer>\n <template #header>\n <OperationPath\n class=\"font-code text-c-2 [&_em]:text-c-1 min-w-0 [&_em]:not-italic\"\n :deprecated=\"operation?.deprecated\"\n :path=\"path\" />\n </template>\n <template\n v-if=\"!isWebhook\"\n #footer=\"{ exampleName }\">\n <div class=\"flex\">\n <AskAgentButton />\n <TestRequestButton\n v-if=\"!options.hideTestRequestButton\"\n :id\n :eventBus\n :exampleName\n :method\n :path\n :requestBodyCompositionSelection=\"\n requestBodyCompositionSelectionForCodeSample\n \" />\n </div>\n </template>\n </CodeExample>\n </ScalarErrorBoundary>\n\n <ScalarErrorBoundary>\n <ExampleResponses\n v-if=\"operation.responses\"\n :eventBus\n :responses=\"operation.responses\"\n :selectedExample\n style=\"margin-top: 12px\" />\n </ScalarErrorBoundary>\n </div>\n </div>\n </SectionContent>\n </Section>\n</template>\n\n<style scoped>\n/*\n * The operation is a single grid so the request example can sit beside the\n * details on wide screens, then be lifted directly under the description when\n * the layout collapses (see the container query below). Vertical rhythm comes\n * from element margins rather than row-gap, because the details block carries\n * its own leading margin (mt-6) that already spaces it from whatever precedes\n * it — a row-gap would double that gap.\n */\n.operation-layout {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-template-rows: auto auto 1fr;\n grid-template-areas:\n 'heading badge'\n 'description examples'\n 'details examples';\n column-gap: 48px;\n row-gap: 0;\n}\n\n.operation-title {\n grid-area: heading;\n margin-bottom: 12px;\n\n /* Mirror the shared section header typography (see SectionHeader.vue) */\n font-size: var(--font-size, var(--scalar-heading-1));\n font-weight: var(--font-weight, var(--scalar-bold));\n color: var(--scalar-color-1);\n line-height: 1.45;\n}\n\n.operation-auth {\n grid-area: badge;\n justify-self: end;\n align-self: start;\n}\n\n.operation-description {\n grid-area: description;\n min-width: 0;\n}\n\n.operation-details {\n grid-area: details;\n min-width: 0;\n}\n\n.examples {\n grid-area: examples;\n align-self: start;\n min-width: 0;\n\n position: sticky;\n top: calc(var(--refs-viewport-offset) + 24px);\n}\n\n.examples > * {\n max-height: calc((var(--refs-viewport-height) - 60px) / 2);\n position: relative;\n}\n\n.examples > *:first-of-type:last-of-type {\n max-height: calc((var(--refs-viewport-height) - 60px));\n}\n\n/*\n * Don't constrain card height on mobile\n * (or zoomed in screens)\n */\n@media (max-width: 600px) {\n .examples > * {\n max-height: unset;\n }\n}\n\n.deprecated * {\n text-decoration: line-through;\n}\n\n/*\n * On narrow containers the layout collapses to a single column: the request\n * example is lifted directly under the description, and the auth badge becomes\n * an eyebrow above the title.\n */\n@container narrow-references-container (max-width: 900px) {\n .operation-layout {\n grid-template-columns: 1fr;\n grid-template-areas:\n 'badge'\n 'heading'\n 'description'\n 'examples'\n 'details';\n column-gap: 0;\n }\n\n .operation-auth {\n justify-self: start;\n margin-bottom: 4px;\n }\n\n .operation-description {\n margin-bottom: 24px;\n }\n\n /* Don't make the examples sticky on narrow viewports */\n .examples {\n position: static;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgFA,MAAM,EAAE,cAAc,gBAAgB;EAEtC,MAAM,iBAAiB,eAAe,QAAA,UAAU,WAAW,QAAA,QAAQ,EAAE;EAErE,MAAM,UAAU,MAAM;EAEtB,MAAM,sBAAsB,eAAe,mBAAmB,QAAA,SAAS,CAAC;;EAGxE,MAAM,iCAAiC,IAAwB;;EAG/D,MAAM,kCAAkC,IAAqC,CAAC,CAAC;EAE/E,MAAM,+CAA+C,gBACX,EACtC,GAAG,gCAAgC,MACrC,EACF;EAEA,MAAM,qCAAqC,eACzC,KAAK,UAAU,6CAA6C,KAAK,CACnE;EAEA,QAAQ,uCAAuC,+BAA+B;;uBAI5E,YAqLU,MAAA,eAAA,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ALZ,QAAA,UAAU,aAAA,UAAA,GADlB,YAK6B,MAAA,wBAAA,GAAA;;SAH1B,UAAA,QAAA;SACA,WAAW,QAAA,UAAU;SACrB,iBAAA,QAAA;SACD,OAAA,EAAA,cAAA,OAAA"}
|
|
1
|
+
{"version":3,"file":"ModernLayout.vue.script.js","names":[],"sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { CodeExample } from '@scalar/blocks/code-example'\nimport { ScalarErrorBoundary } from '@scalar/components/error-boundary'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { ScalarIconWebhooksLogo } from '@scalar/icons'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport type {\n OpenApiDocument,\n OperationObject,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, provide, ref, useId } from 'vue'\n\nimport { Anchor } from '@/components/Anchor'\nimport { Badge } from '@/components/Badge'\nimport { LinkList } from '@/components/LinkList'\nimport OperationPath from '@/components/OperationPath.vue'\nimport { Section, SectionContent, SectionHeaderTag } from '@/components/Section'\nimport AskAgentButton from '@/features/ask-agent-button/AskAgentButton.vue'\nimport { ExampleResponses } from '@/features/example-responses'\nimport { ExternalDocs } from '@/features/external-docs'\nimport { useLocalization } from '@/features/localization'\nimport Callbacks from '@/features/Operation/components/callbacks/Callbacks.vue'\nimport OperationParameters from '@/features/Operation/components/OperationParameters.vue'\nimport OperationResponses from '@/features/Operation/components/OperationResponses.vue'\nimport OperationScopes from '@/features/Operation/components/OperationScopes.vue'\nimport SecurityRequirementBadge from '@/features/Operation/components/SecurityRequirementBadge.vue'\nimport type { RequiredSecurity } from '@/features/Operation/helpers/get-required-security'\nimport {\n getOperationStability,\n getOperationStabilityColor,\n isOperationDeprecated,\n} from '@/features/Operation/helpers/operation-stability'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\nimport {\n REQUEST_BODY_COMPOSITION_INDEX_SYMBOL,\n type RequestBodyCompositionSelection,\n} from '@/features/Operation/request-body-composition-index'\nimport { getXKeysFromObject } from '@/features/specification-extension'\nimport SpecificationExtension from '@/features/specification-extension/SpecificationExtension.vue'\nimport { TestRequestButton } from '@/features/test-request-button'\nimport { XBadges } from '@/features/x-badges'\n\nconst {\n clientOptions,\n document,\n eventBus,\n isWebhook,\n method,\n operation,\n options,\n path,\n requiredSecurity,\n selectedServer,\n selectedSecuritySchemes,\n selectedClient,\n selectedExample,\n} = defineProps<\n Omit<\n OperationProps,\n | 'document'\n | 'pathValue'\n | 'server'\n | 'isCollapsed'\n | 'securitySchemes'\n | 'authStore'\n > & {\n /** Operation object with path params */\n operation: OperationObject\n /** The selected server for the operation */\n selectedServer: ServerObject | null\n /** The selected security schemes for the operation */\n selectedSecuritySchemes: SecuritySchemeObjectSecret[]\n /** Required/optional security state for the badge next to the path */\n requiredSecurity: RequiredSecurity\n /** The document the operation belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n }\n>()\nconst { translate } = useLocalization()\n\nconst operationTitle = computed(() => operation.summary || path || '')\n\nconst labelId = useId()\n\nconst operationExtensions = computed(() => getXKeysFromObject(operation))\n\n/** Track the selected request body content type so the code sample stays in sync */\nconst selectedRequestBodyContentType = ref<string | undefined>()\n\n/** Selected request body oneOf/anyOf variants; synced with schema dropdowns and code sample */\nconst requestBodyCompositionSelection = ref<RequestBodyCompositionSelection>({})\n\nconst requestBodyCompositionSelectionForCodeSample = computed(\n (): RequestBodyCompositionSelection => ({\n ...requestBodyCompositionSelection.value,\n }),\n)\n\nconst requestBodyCompositionSelectionKey = computed(() =>\n JSON.stringify(requestBodyCompositionSelectionForCodeSample.value),\n)\n\nprovide(REQUEST_BODY_COMPOSITION_INDEX_SYMBOL, requestBodyCompositionSelection)\n</script>\n\n<template>\n <Section\n :id=\"id\"\n :aria-labelledby=\"labelId\"\n :label=\"operationTitle\"\n tabindex=\"-1\"\n @intersecting=\"() => eventBus?.emit('intersecting:nav-item', { id })\">\n <SectionContent>\n <!-- Badges -->\n <div class=\"flex flex-row justify-between gap-1\">\n <!-- Left -->\n <div class=\"flex gap-1\">\n <!-- Operation ID -->\n <Badge v-if=\"options?.showOperationId && operation.operationId\">\n {{ operation.operationId }}\n </Badge>\n <!-- Stability badge -->\n <Badge\n v-if=\"getOperationStability(operation)\"\n class=\"capitalize\"\n :class=\"getOperationStabilityColor(operation)\">\n {{ getOperationStability(operation) }}\n </Badge>\n <!-- Webhook badge -->\n <Badge\n v-if=\"isWebhook\"\n class=\"font-code text-green flex w-fit items-center justify-center gap-1\">\n <ScalarIconWebhooksLogo weight=\"bold\" />\n {{ translate('operation.webhook') }}\n </Badge>\n <!-- x-badges before -->\n <XBadges\n :badges=\"operation['x-badges']\"\n position=\"before\" />\n </div>\n <!-- Right -->\n <div class=\"flex gap-1\">\n <!-- x-badges after -->\n <XBadges\n :badges=\"operation['x-badges']\"\n position=\"after\" />\n </div>\n </div>\n <div class=\"operation-layout\">\n <!-- Title -->\n <div\n class=\"operation-title\"\n :class=\"isOperationDeprecated(operation) && 'deprecated'\">\n <Anchor\n @copyAnchorUrl=\"() => eventBus?.emit('copy-url:nav-item', { id })\">\n <SectionHeaderTag\n :id=\"labelId\"\n :level=\"3\">\n {{ operationTitle }}\n </SectionHeaderTag>\n </Anchor>\n </div>\n\n <!-- Required auth badge -->\n <div class=\"operation-auth\">\n <SecurityRequirementBadge :requiredSecurity />\n </div>\n\n <!-- Description -->\n <div class=\"operation-description\">\n <SpecificationExtension :value=\"operationExtensions\" />\n <ScalarMarkdown\n :anchorPrefix=\"id\"\n :aria-label=\"translate('common.description')\"\n role=\"group\"\n transformType=\"heading\"\n :value=\"operation.description\"\n withAnchors\n withImages />\n </div>\n\n <!--\n Parameters, request body, responses and callbacks.\n\n This block is kept before the examples in source order on purpose: the\n request body schema (via SchemaComposition) seeds the shared\n requestBodyCompositionSelection on mount, which drives the\n CodeExample's :key. Mounting the details first means the code\n sample reads the final key on its first render and is never remounted —\n a remount would reset the selected client and tear down an open client\n picker. The grid (see grid-template-areas below) still paints the\n examples on the right, independent of this source order.\n -->\n <div class=\"operation-details\">\n <OperationScopes :requiredSecurity />\n <OperationParameters\n v-model:selectedContentType=\"selectedRequestBodyContentType\"\n :breadcrumb=\"[id]\"\n :document\n :eventBus\n :options\n :parameters=\"operation.parameters\"\n :requestBody=\"getResolvedRef(operation.requestBody)\" />\n <OperationResponses\n :breadcrumb=\"[id]\"\n :collapsableItems=\"!options.expandAllResponses\"\n :document\n :eventBus\n :options\n :responses=\"operation.responses\" />\n\n <!-- Callbacks -->\n <ScalarErrorBoundary>\n <Callbacks\n v-if=\"operation.callbacks\"\n :callbacks=\"operation.callbacks\"\n class=\"mt-6\"\n :document\n :eventBus\n :options\n :path />\n </ScalarErrorBoundary>\n </div>\n\n <!-- Example request and responses -->\n <div class=\"examples\">\n <!-- External Docs -->\n <LinkList v-if=\"operation.externalDocs\">\n <ExternalDocs :value=\"operation.externalDocs\" />\n </LinkList>\n\n <!-- New Example Request -->\n <ScalarErrorBoundary>\n <CodeExample\n :key=\"requestBodyCompositionSelectionKey\"\n :clientOptions\n :eventBus\n fallback\n :isWebhook\n :method\n :operation\n :path\n :requestBodyCompositionSelection=\"\n requestBodyCompositionSelectionForCodeSample\n \"\n :securitySchemes=\"selectedSecuritySchemes\"\n :selectedClient\n :selectedContentType=\"selectedRequestBodyContentType\"\n :selectedExample\n :selectedServer>\n <template #header>\n <OperationPath\n class=\"font-code text-c-2 [&_em]:text-c-1 min-w-0 [&_em]:not-italic\"\n :deprecated=\"operation?.deprecated\"\n :path=\"path\" />\n </template>\n <template\n v-if=\"!isWebhook\"\n #footer=\"{ exampleName }\">\n <div class=\"flex\">\n <AskAgentButton />\n <TestRequestButton\n v-if=\"!options.hideTestRequestButton\"\n :id\n :eventBus\n :exampleName\n :method\n :path\n :requestBodyCompositionSelection=\"\n requestBodyCompositionSelectionForCodeSample\n \" />\n </div>\n </template>\n </CodeExample>\n </ScalarErrorBoundary>\n\n <ScalarErrorBoundary>\n <ExampleResponses\n v-if=\"operation.responses\"\n :eventBus\n :responses=\"operation.responses\"\n :selectedExample\n style=\"margin-top: 12px\" />\n </ScalarErrorBoundary>\n </div>\n </div>\n </SectionContent>\n </Section>\n</template>\n\n<style scoped>\n/*\n * The operation is a single grid so the request example can sit beside the\n * details on wide screens, then be lifted directly under the description when\n * the layout collapses (see the container query below). Vertical rhythm comes\n * from element margins rather than row-gap, because the details block carries\n * its own leading margin (mt-6) that already spaces it from whatever precedes\n * it — a row-gap would double that gap.\n */\n.operation-layout {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-template-rows: auto auto 1fr;\n grid-template-areas:\n 'heading badge'\n 'description examples'\n 'details examples';\n column-gap: 48px;\n row-gap: 0;\n}\n\n.operation-title {\n grid-area: heading;\n margin-bottom: 12px;\n\n /* Mirror the shared section header typography (see SectionHeader.vue) */\n font-size: var(--font-size, var(--scalar-heading-1));\n font-weight: var(--font-weight, var(--scalar-bold));\n color: var(--scalar-color-1);\n line-height: 1.45;\n}\n\n.operation-auth {\n grid-area: badge;\n justify-self: end;\n align-self: start;\n}\n\n.operation-description {\n grid-area: description;\n min-width: 0;\n}\n\n.operation-details {\n grid-area: details;\n min-width: 0;\n}\n\n.examples {\n grid-area: examples;\n align-self: start;\n min-width: 0;\n\n position: sticky;\n top: calc(var(--refs-viewport-offset) + 24px);\n}\n\n.examples > * {\n max-height: calc((var(--refs-viewport-height) - 60px) / 2);\n position: relative;\n}\n\n.examples > *:first-of-type:last-of-type {\n max-height: calc((var(--refs-viewport-height) - 60px));\n}\n\n/*\n * Don't constrain card height on mobile\n * (or zoomed in screens)\n */\n@media (max-width: 600px) {\n .examples > * {\n max-height: unset;\n }\n}\n\n.deprecated * {\n text-decoration: line-through;\n}\n\n/*\n * On narrow containers the layout collapses to a single column: the request\n * example is lifted directly under the description, and the auth badge becomes\n * an eyebrow above the title.\n */\n@container narrow-references-container (max-width: 900px) {\n .operation-layout {\n grid-template-columns: 1fr;\n grid-template-areas:\n 'badge'\n 'heading'\n 'description'\n 'examples'\n 'details';\n column-gap: 0;\n }\n\n .operation-auth {\n justify-self: start;\n margin-bottom: 4px;\n }\n\n .operation-description {\n margin-bottom: 24px;\n }\n\n /* Don't make the examples sticky on narrow viewports */\n .examples {\n position: static;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgFA,MAAM,EAAE,cAAc,gBAAgB;EAEtC,MAAM,iBAAiB,eAAe,QAAA,UAAU,WAAW,QAAA,QAAQ,EAAE;EAErE,MAAM,UAAU,MAAM;EAEtB,MAAM,sBAAsB,eAAe,mBAAmB,QAAA,SAAS,CAAC;;EAGxE,MAAM,iCAAiC,IAAwB;;EAG/D,MAAM,kCAAkC,IAAqC,CAAC,CAAC;EAE/E,MAAM,+CAA+C,gBACX,EACtC,GAAG,gCAAgC,MACrC,EACF;EAEA,MAAM,qCAAqC,eACzC,KAAK,UAAU,6CAA6C,KAAK,CACnE;EAEA,QAAQ,uCAAuC,+BAA+B;;uBAI5E,YAqLU,MAAA,eAAA,GAAA;IApLP,IAAI,QAAA;IACJ,mBAAiB,MAAA,OAAA;IACjB,OAAO,eAAA;IACR,UAAS;IACR,gBAAY,OAAA,OAAA,OAAA,WAAQ,QAAA,UAAU,KAAI,yBAAA,EAAA,IAA4B,QAAA,GAAE,CAAA;;2BA+KhD,CA9KjB,YA8KiB,MAAA,sBAAA,GAAA,MAAA;4BA3IT,CAjCN,mBAiCM,OAjCN,YAiCM,CA/BJ,mBAuBM,OAvBN,YAuBM;MArBS,QAAA,SAAS,mBAAmB,QAAA,UAAU,eAAA,UAAA,GAAnD,YAEQ,MAAA,aAAA,GAAA,EAAA,KAAA,EAAA,GAAA;8BADqB,CAAA,gBAAA,gBAAxB,QAAA,UAAU,WAAW,GAAA,CAAA,CAAA,CAAA;;;MAIlB,M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B,MAAA,mBAAA,GAAA,MAAA;+BADN,EAAA,UAAA,GAxCd,YAwCc,MAAA,WAAA,GAAA;SAvCX,KAAK,mCAAA;SACL,eAAA,QAAA;SACA,UAAA,QAAA;SACD,UAAA;SACC,WAAA,QAAA;SACA,QAAA,QAAA;SACA,WAAA,QAAA;SACA,MAAA,QAAA;SACA,iCAAkD,6CAAA;SAGlD,iBAAiB,QAAA;SACjB,gBAAA,QAAA;SACA,qBAAqB,+BAAA;SACrB,iBAAA,QAAA;SACA,gBAAA,QAAA;;SACU,QAAM,cAIE,CAHjB,YAGiB,uBAAA;UAFf,OAAM;UACL,YAAY,QAAA,WAAW;UACvB,MAAM,QAAA;;;aAGF,QAAA,YAAA;eACN;sBAaK,EAbK,kBAAW,CACtB,mBAYM,OAZN,YAYM,CAXJ,YAAkB,sBAAA,GAAA,CAET,QAAA,QAAQ,yBAAA,UAAA,GADjB,YASM,MAAA,yBAAA,GAAA;;UAPH,IAAA,QAAA;UACA,UAAA,QAAA;UACA;UACA,QAAA,QAAA;UACA,MAAA,QAAA;UACA,iCAAwD,6CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;OAQnE,YAOsB,MAAA,mBAAA,GAAA,MAAA;+BADS,CAJrB,QAAA,UAAU,aAAA,UAAA,GADlB,YAK6B,MAAA,wBAAA,GAAA;;SAH1B,UAAA,QAAA;SACA,WAAW,QAAA,UAAU;SACrB,iBAAA,QAAA;SACD,OAAA,EAAA,cAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResult.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Search/components/SearchResult.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchResult.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Search/components/SearchResult.vue"],"names":[],"mappings":"AAgHA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAIzC,OAAO,KAAK,EAAa,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAElE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAA;IAC5B,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;CACxC,CAAC;AAiJF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResult.vue.js","names":[],"sources":["../../../../src/features/Search/components/SearchResult.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarSearchResultItem } from '@scalar/components/search-results'\nimport {\n ScalarIconBracketsCurly,\n ScalarIconTag,\n ScalarIconTerminalWindow,\n ScalarIconTextAlignLeft,\n} from '@scalar/icons'\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport { HttpMethod } from '@scalar/sidebar'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type ModelsSectionLabel,\n} from '@scalar/types/api-reference'\nimport type { FuseResult } from 'fuse.js'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\nimport type { EntryType, FuseData } from '@/features/Search/types'\n\nconst { modelsSectionLabel = DEFAULT_MODELS_SECTION_LABEL } = defineProps<{\n id: string\n isSelected: boolean\n result: FuseResult<FuseData>\n modelsSectionLabel?: ModelsSectionLabel\n}>()\nconst { translate } = useLocalization()\n\nconst ENTRY_ICONS: { [x in EntryType]: ScalarIconComponent } = {\n heading: ScalarIconTextAlignLeft,\n model: ScalarIconBracketsCurly,\n operation: ScalarIconTerminalWindow,\n tag: ScalarIconTag,\n webhook:
|
|
1
|
+
{"version":3,"file":"SearchResult.vue.js","names":[],"sources":["../../../../src/features/Search/components/SearchResult.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarSearchResultItem } from '@scalar/components/search-results'\nimport {\n ScalarIconBracketsCurly,\n ScalarIconTag,\n ScalarIconTerminalWindow,\n ScalarIconTextAlignLeft,\n ScalarIconWebhooksLogo,\n} from '@scalar/icons'\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport { HttpMethod } from '@scalar/sidebar'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type ModelsSectionLabel,\n} from '@scalar/types/api-reference'\nimport type { FuseResult } from 'fuse.js'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\nimport type { EntryType, FuseData } from '@/features/Search/types'\n\nconst { modelsSectionLabel = DEFAULT_MODELS_SECTION_LABEL } = defineProps<{\n id: string\n isSelected: boolean\n result: FuseResult<FuseData>\n modelsSectionLabel?: ModelsSectionLabel\n}>()\nconst { translate } = useLocalization()\n\nconst ENTRY_ICONS: { [x in EntryType]: ScalarIconComponent } = {\n heading: ScalarIconTextAlignLeft,\n model: ScalarIconBracketsCurly,\n operation: ScalarIconTerminalWindow,\n tag: ScalarIconTag,\n webhook: ScalarIconWebhooksLogo,\n}\n\nconst entryLabels = computed((): { [x in EntryType]: string } => ({\n heading: translate('search.entryHeading'),\n operation: translate('search.entryOperation'),\n tag: translate('search.entryTag'),\n model: modelsSectionLabel,\n webhook: translate('search.entryWebhook'),\n}))\n</script>\n\n<template>\n <ScalarSearchResultItem\n :id=\"id\"\n :icon=\"ENTRY_ICONS[result.item.type]\"\n :selected=\"isSelected\">\n <span\n :class=\"{\n 'text-decoration-line':\n result.item.entry.type === 'operation' &&\n result.item.entry.isDeprecated,\n }\">\n <span class=\"sr-only\">\n {{ entryLabels[result.item.type] }}: \n <template\n v-if=\"\n result.item.entry.type === 'operation' &&\n result.item.entry.isDeprecated\n \">\n ({{ translate('common.deprecated') }}) \n </template>\n </span>\n {{ result.item.title }}\n <span class=\"sr-only\">,</span>\n </span>\n <template\n v-if=\"\n result.item.type !== 'webhook' &&\n (result.item.method || result.item.path) &&\n result.item.path !== result.item.title\n \"\n #description>\n <span class=\"inline-flex items-center gap-1\">\n <template v-if=\"result.item.type === 'operation'\">\n <HttpMethod\n aria-hidden=\"true\"\n :method=\"result.item.method ?? 'get'\" />\n <span class=\"sr-only\">\n {{ translate('common.httpMethod') }}:\n {{ result.item.method ?? 'get' }}\n </span>\n </template>\n <span class=\"sr-only\">{{ translate('common.path') }}: </span>\n {{ result.item.path }}\n </span>\n </template>\n <template\n v-else-if=\"result.item.description\"\n #description>\n <span class=\"sr-only\">{{ translate('common.description') }}: </span>\n {{ result.item.description }}\n </template>\n </ScalarSearchResultItem>\n</template>\n"],"mappings":""}
|
|
@@ -2,7 +2,7 @@ import { useLocalization } from "../../localization/use-localization.js";
|
|
|
2
2
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref, withCtx } from "vue";
|
|
3
3
|
import { HttpMethod } from "@scalar/sidebar";
|
|
4
4
|
import { DEFAULT_MODELS_SECTION_LABEL } from "@scalar/types/api-reference";
|
|
5
|
-
import { ScalarIconBracketsCurly, ScalarIconTag, ScalarIconTerminalWindow, ScalarIconTextAlignLeft } from "@scalar/icons";
|
|
5
|
+
import { ScalarIconBracketsCurly, ScalarIconTag, ScalarIconTerminalWindow, ScalarIconTextAlignLeft, ScalarIconWebhooksLogo } from "@scalar/icons";
|
|
6
6
|
import { ScalarSearchResultItem } from "@scalar/components/search-results";
|
|
7
7
|
//#region src/features/Search/components/SearchResult.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
var _hoisted_1 = { class: "sr-only" };
|
|
@@ -25,7 +25,7 @@ var SearchResult_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
25
25
|
model: ScalarIconBracketsCurly,
|
|
26
26
|
operation: ScalarIconTerminalWindow,
|
|
27
27
|
tag: ScalarIconTag,
|
|
28
|
-
webhook:
|
|
28
|
+
webhook: ScalarIconWebhooksLogo
|
|
29
29
|
};
|
|
30
30
|
const entryLabels = computed(() => ({
|
|
31
31
|
heading: translate("search.entryHeading"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResult.vue.script.js","names":[],"sources":["../../../../src/features/Search/components/SearchResult.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarSearchResultItem } from '@scalar/components/search-results'\nimport {\n ScalarIconBracketsCurly,\n ScalarIconTag,\n ScalarIconTerminalWindow,\n ScalarIconTextAlignLeft,\n} from '@scalar/icons'\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport { HttpMethod } from '@scalar/sidebar'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type ModelsSectionLabel,\n} from '@scalar/types/api-reference'\nimport type { FuseResult } from 'fuse.js'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\nimport type { EntryType, FuseData } from '@/features/Search/types'\n\nconst { modelsSectionLabel = DEFAULT_MODELS_SECTION_LABEL } = defineProps<{\n id: string\n isSelected: boolean\n result: FuseResult<FuseData>\n modelsSectionLabel?: ModelsSectionLabel\n}>()\nconst { translate } = useLocalization()\n\nconst ENTRY_ICONS: { [x in EntryType]: ScalarIconComponent } = {\n heading: ScalarIconTextAlignLeft,\n model: ScalarIconBracketsCurly,\n operation: ScalarIconTerminalWindow,\n tag: ScalarIconTag,\n webhook:
|
|
1
|
+
{"version":3,"file":"SearchResult.vue.script.js","names":[],"sources":["../../../../src/features/Search/components/SearchResult.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarSearchResultItem } from '@scalar/components/search-results'\nimport {\n ScalarIconBracketsCurly,\n ScalarIconTag,\n ScalarIconTerminalWindow,\n ScalarIconTextAlignLeft,\n ScalarIconWebhooksLogo,\n} from '@scalar/icons'\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport { HttpMethod } from '@scalar/sidebar'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type ModelsSectionLabel,\n} from '@scalar/types/api-reference'\nimport type { FuseResult } from 'fuse.js'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\nimport type { EntryType, FuseData } from '@/features/Search/types'\n\nconst { modelsSectionLabel = DEFAULT_MODELS_SECTION_LABEL } = defineProps<{\n id: string\n isSelected: boolean\n result: FuseResult<FuseData>\n modelsSectionLabel?: ModelsSectionLabel\n}>()\nconst { translate } = useLocalization()\n\nconst ENTRY_ICONS: { [x in EntryType]: ScalarIconComponent } = {\n heading: ScalarIconTextAlignLeft,\n model: ScalarIconBracketsCurly,\n operation: ScalarIconTerminalWindow,\n tag: ScalarIconTag,\n webhook: ScalarIconWebhooksLogo,\n}\n\nconst entryLabels = computed((): { [x in EntryType]: string } => ({\n heading: translate('search.entryHeading'),\n operation: translate('search.entryOperation'),\n tag: translate('search.entryTag'),\n model: modelsSectionLabel,\n webhook: translate('search.entryWebhook'),\n}))\n</script>\n\n<template>\n <ScalarSearchResultItem\n :id=\"id\"\n :icon=\"ENTRY_ICONS[result.item.type]\"\n :selected=\"isSelected\">\n <span\n :class=\"{\n 'text-decoration-line':\n result.item.entry.type === 'operation' &&\n result.item.entry.isDeprecated,\n }\">\n <span class=\"sr-only\">\n {{ entryLabels[result.item.type] }}: \n <template\n v-if=\"\n result.item.entry.type === 'operation' &&\n result.item.entry.isDeprecated\n \">\n ({{ translate('common.deprecated') }}) \n </template>\n </span>\n {{ result.item.title }}\n <span class=\"sr-only\">,</span>\n </span>\n <template\n v-if=\"\n result.item.type !== 'webhook' &&\n (result.item.method || result.item.path) &&\n result.item.path !== result.item.title\n \"\n #description>\n <span class=\"inline-flex items-center gap-1\">\n <template v-if=\"result.item.type === 'operation'\">\n <HttpMethod\n aria-hidden=\"true\"\n :method=\"result.item.method ?? 'get'\" />\n <span class=\"sr-only\">\n {{ translate('common.httpMethod') }}:\n {{ result.item.method ?? 'get' }}\n </span>\n </template>\n <span class=\"sr-only\">{{ translate('common.path') }}: </span>\n {{ result.item.path }}\n </span>\n </template>\n <template\n v-else-if=\"result.item.description\"\n #description>\n <span class=\"sr-only\">{{ translate('common.description') }}: </span>\n {{ result.item.description }}\n </template>\n </ScalarSearchResultItem>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EA2BA,MAAM,EAAE,cAAc,gBAAgB;EAEtC,MAAM,cAAyD;GAC7D,SAAS;GACT,OAAO;GACP,WAAW;GACX,KAAK;GACL,SAAS;EACX;EAEA,MAAM,cAAc,gBAA8C;GAChE,SAAS,UAAU,qBAAqB;GACxC,WAAW,UAAU,uBAAuB;GAC5C,KAAK,UAAU,iBAAiB;GAChC,OAAO,QAAA;GACP,SAAS,UAAU,qBAAqB;EAC1C,EAAE;;uBAIA,YAkDyB,MAAA,sBAAA,GAAA;IAjDtB,IAAI,QAAA;IACJ,MAAM,YAAY,QAAA,OAAO,KAAK;IAC9B,UAAU,QAAA;;2BAmBJ,CAlBP,mBAkBO,QAAA,EAjBJ,OAAK,eAAA,EAAA,wBAA8C,QAAA,OAAO,KAAK,MAAM,SAAI,eAA8B,QAAA,OAAO,KAAK,MAAM,aAAA,CAAA,EAAA,GAAA;KAK1H,mBASO,QATP,YASO,CAAA,gBAAA,gBARF,YAAA,MAAY,QAAA,OAAO,KAAK,KAAI,IAAI,UACnC,CAAA,GACqB,QAAA,OAAO,KAAK,MAAM,SAAI,eAAgC,QAAA,OAAO,KAAK,MAAM,gBAAA,UAAA,GAD7F,mBAMW,UAAA,EAAA,KAAA,EAAA,GAAA,CAAA,gBAFP,OACD,gBAAG,MAAA,SAAA,CAAS,CAAA,mBAAA,CAAA,IAAwB,UACvC,CAAA,CAAA,GAAA,EAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,CAAA;qBACK,MACP,gBAAG,QAAA,OAAO,KAAK,KAAK,IAAG,KACvB,CAAA;+BAAA,mBAA8B,QAAA,EAAxB,OAAM,UAAS,GAAC,KAAC,EAAA;;;OAGR,QAAA,OAAO,KAAK,SAAI,cAA2B,QAAA,OAAO,KAAK,UAAU,QAAA,OAAO,KAAK,SAAiB,QAAA,OAAO,KAAK,SAAS,QAAA,OAAO,KAAK,QAAA;UAK7I;sBAaM,CAZP,mBAYO,QAZP,YAYO;KAXW,QAAA,OAAO,KAAK,SAAI,eAAA,UAAA,GAAhC,mBAQW,UAAA,EAAA,KAAA,EAAA,GAAA,CAPT,YAE0C,MAAA,UAAA,GAAA;MADxC,eAAY;MACX,QAAQ,QAAA,OAAO,KAAK,UAAM;8BAC7B,mBAGO,QAHP,YAGO,gBAFF,MAAA,SAAA,CAAS,CAAA,mBAAA,CAAA,IAAwB,OACpC,gBAAG,QAAA,OAAO,KAAK,UAAM,KAAA,GAAA,CAAA,CAAA,GAAA,EAAA,KAAA,mBAAA,IAAA,IAAA;KAGzB,mBAAkE,QAAlE,YAAkE,gBAAzC,MAAA,SAAA,CAAS,CAAA,aAAA,CAAA,IAAkB,SAAO,CAAA;qBAAO,MAClE,gBAAG,QAAA,OAAO,KAAK,IAAI,GAAA,CAAA;;;OAIV,QAAA,OAAO,KAAK,cAAA;UACtB;sBACwE,CAAzE,mBAAyE,QAAzE,YAAyE,gBAAhD,MAAA,SAAA,CAAS,CAAA,oBAAA,CAAA,IAAyB,SAAO,CAAA,GAAA,gBAAO,MACzE,gBAAG,QAAA,OAAO,KAAK,WAAW,GAAA,CAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation';
|
|
2
|
+
/**
|
|
3
|
+
* Builds a mapping from model names to their sidebar entry IDs.
|
|
4
|
+
*
|
|
5
|
+
* The map powers the `scroll-to:model-by-name` navigation used by model-name links
|
|
6
|
+
* (for example the `Satellite[]` link next to a property type, or a request-body model name).
|
|
7
|
+
*
|
|
8
|
+
* Model entries do not always live under the top-level `models` group: a component schema with an
|
|
9
|
+
* `x-tags` extension is placed under its tag group instead. To keep those links working we walk the
|
|
10
|
+
* whole navigation tree and collect every `type === 'model'` entry, wherever it lives.
|
|
11
|
+
*
|
|
12
|
+
* @see https://github.com/scalar/scalar/issues/9854
|
|
13
|
+
*/
|
|
14
|
+
export declare const buildModelsIndex: (entries: TraversedEntry[]) => Record<string, string>;
|
|
15
|
+
//# sourceMappingURL=build-models-index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-models-index.d.ts","sourceRoot":"","sources":["../../src/helpers/build-models-index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAA;AAEhF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,GAAI,SAAS,cAAc,EAAE,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAqBjF,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//#region src/helpers/build-models-index.ts
|
|
2
|
+
/**
|
|
3
|
+
* Builds a mapping from model names to their sidebar entry IDs.
|
|
4
|
+
*
|
|
5
|
+
* The map powers the `scroll-to:model-by-name` navigation used by model-name links
|
|
6
|
+
* (for example the `Satellite[]` link next to a property type, or a request-body model name).
|
|
7
|
+
*
|
|
8
|
+
* Model entries do not always live under the top-level `models` group: a component schema with an
|
|
9
|
+
* `x-tags` extension is placed under its tag group instead. To keep those links working we walk the
|
|
10
|
+
* whole navigation tree and collect every `type === 'model'` entry, wherever it lives.
|
|
11
|
+
*
|
|
12
|
+
* @see https://github.com/scalar/scalar/issues/9854
|
|
13
|
+
*/
|
|
14
|
+
var buildModelsIndex = (entries) => {
|
|
15
|
+
const index = {};
|
|
16
|
+
const collect = (items) => {
|
|
17
|
+
for (const item of items) {
|
|
18
|
+
if (item.type === "model") index[item.name] ??= item.id;
|
|
19
|
+
if ("children" in item && item.children?.length) collect(item.children);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
collect(entries);
|
|
23
|
+
return index;
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { buildModelsIndex };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=build-models-index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-models-index.js","names":[],"sources":["../../src/helpers/build-models-index.ts"],"sourcesContent":["import type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation'\n\n/**\n * Builds a mapping from model names to their sidebar entry IDs.\n *\n * The map powers the `scroll-to:model-by-name` navigation used by model-name links\n * (for example the `Satellite[]` link next to a property type, or a request-body model name).\n *\n * Model entries do not always live under the top-level `models` group: a component schema with an\n * `x-tags` extension is placed under its tag group instead. To keep those links working we walk the\n * whole navigation tree and collect every `type === 'model'` entry, wherever it lives.\n *\n * @see https://github.com/scalar/scalar/issues/9854\n */\nexport const buildModelsIndex = (entries: TraversedEntry[]): Record<string, string> => {\n const index: Record<string, string> = {}\n\n const collect = (items: TraversedEntry[]): void => {\n for (const item of items) {\n if (item.type === 'model') {\n // Keep the first entry for a given name. A name can appear more than once when a schema is\n // listed under multiple tags, and the exact target does not matter as long as it scrolls\n // to that model.\n index[item.name] ??= item.id\n }\n\n if ('children' in item && item.children?.length) {\n collect(item.children)\n }\n }\n }\n\n collect(entries)\n\n return index\n}\n"],"mappings":";;;;;;;;;;;;;AAcA,IAAa,oBAAoB,YAAsD;CACrF,MAAM,QAAgC,CAAC;CAEvC,MAAM,WAAW,UAAkC;EACjD,KAAK,MAAM,QAAQ,OAAO;GACxB,IAAI,KAAK,SAAS,SAIhB,MAAM,KAAK,UAAU,KAAK;GAG5B,IAAI,cAAc,QAAQ,KAAK,UAAU,QACvC,QAAQ,KAAK,QAAQ;EAEzB;CACF;CAEA,QAAQ,OAAO;CAEf,OAAO;AACT"}
|
|
@@ -120,6 +120,10 @@ export declare const authStorage: () => {
|
|
|
120
120
|
'x-scalar-secret-auth-url'?: string | undefined;
|
|
121
121
|
} & {
|
|
122
122
|
'x-scalar-secret-token-url'?: string | undefined;
|
|
123
|
+
} & {
|
|
124
|
+
'x-order'?: number | undefined;
|
|
125
|
+
} & {
|
|
126
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
123
127
|
} & {
|
|
124
128
|
authorizationUrl: string;
|
|
125
129
|
} & {
|
|
@@ -150,6 +154,10 @@ export declare const authStorage: () => {
|
|
|
150
154
|
'x-scalar-secret-auth-url'?: string | undefined;
|
|
151
155
|
} & {
|
|
152
156
|
'x-scalar-secret-token-url'?: string | undefined;
|
|
157
|
+
} & {
|
|
158
|
+
'x-order'?: number | undefined;
|
|
159
|
+
} & {
|
|
160
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
153
161
|
} & {
|
|
154
162
|
tokenUrl: string;
|
|
155
163
|
} & {
|
|
@@ -187,6 +195,10 @@ export declare const authStorage: () => {
|
|
|
187
195
|
'x-scalar-secret-auth-url'?: string | undefined;
|
|
188
196
|
} & {
|
|
189
197
|
'x-scalar-secret-token-url'?: string | undefined;
|
|
198
|
+
} & {
|
|
199
|
+
'x-order'?: number | undefined;
|
|
200
|
+
} & {
|
|
201
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
190
202
|
} & {
|
|
191
203
|
tokenUrl: string;
|
|
192
204
|
} & {
|
|
@@ -221,6 +233,10 @@ export declare const authStorage: () => {
|
|
|
221
233
|
'x-scalar-secret-auth-url'?: string | undefined;
|
|
222
234
|
} & {
|
|
223
235
|
'x-scalar-secret-token-url'?: string | undefined;
|
|
236
|
+
} & {
|
|
237
|
+
'x-order'?: number | undefined;
|
|
238
|
+
} & {
|
|
239
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
224
240
|
} & {
|
|
225
241
|
authorizationUrl: string;
|
|
226
242
|
tokenUrl: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/helpers/storage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,uCAAuC,CAAA;AAM7E;;;GAGG;AACH,eAAO,MAAM,aAAa;IAGtB;;OAEG;;IAIH;;;OAGG;iBACU,MAAM;CAItB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW;IAMpB;;OAEG;oBACa,MAAM
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/helpers/storage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,uCAAuC,CAAA;AAM7E;;;GAGG;AACH,eAAO,MAAM,aAAa;IAGtB;;OAEG;;IAIH;;;OAGG;iBACU,MAAM;CAItB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW;IAMpB;;OAEG;oBACa,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAItB;;;OAGG;oBACa,MAAM,SAAS,IAAI;CAItC,CAAA"}
|