@scalar/api-reference 1.52.1 → 1.52.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +1 -1
  3. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
  4. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
  5. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js.map +1 -1
  6. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js +1 -1
  7. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js.map +1 -1
  8. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +2 -2
  9. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
  10. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
  11. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js.map +1 -1
  12. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js +1 -1
  13. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js.map +1 -1
  14. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts +1 -1
  15. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +1 -1
  16. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js.map +1 -1
  17. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js.map +1 -1
  18. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js +2 -2
  19. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js.map +1 -1
  20. package/dist/browser/standalone.js +405 -422
  21. package/dist/browser/webpack-stats.json +1 -1
  22. package/dist/components/AgentScalar/OpenMCPButton.vue.js +1 -1
  23. package/dist/components/AgentScalar/OpenMCPButton.vue.js.map +1 -1
  24. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js +1 -1
  25. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js.map +1 -1
  26. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  27. package/dist/components/ApiReference.vue.js +1 -1
  28. package/dist/components/ApiReference.vue.js.map +1 -1
  29. package/dist/components/ApiReference.vue.script.js +20 -7
  30. package/dist/components/ApiReference.vue.script.js.map +1 -1
  31. package/dist/components/Content/Auth/Auth.vue.js.map +1 -1
  32. package/dist/components/Content/Auth/Auth.vue.script.js +1 -1
  33. package/dist/components/Content/Auth/Auth.vue.script.js.map +1 -1
  34. package/dist/components/Content/Content.vue.d.ts +1 -1
  35. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  36. package/dist/components/Content/Content.vue.js.map +1 -1
  37. package/dist/components/Content/Content.vue.script.js +2 -2
  38. package/dist/components/Content/Content.vue.script.js.map +1 -1
  39. package/dist/components/Content/Models/Model.vue.d.ts +1 -1
  40. package/dist/components/Content/Models/Model.vue.d.ts.map +1 -1
  41. package/dist/components/Content/Models/Model.vue.js.map +1 -1
  42. package/dist/components/Content/Models/Model.vue.script.js.map +1 -1
  43. package/dist/components/Content/Models/components/ClassicLayout.vue.d.ts +1 -1
  44. package/dist/components/Content/Models/components/ClassicLayout.vue.d.ts.map +1 -1
  45. package/dist/components/Content/Models/components/ClassicLayout.vue.js +1 -1
  46. package/dist/components/Content/Models/components/ClassicLayout.vue.js.map +1 -1
  47. package/dist/components/Content/Models/components/ClassicLayout.vue.script.js +4 -0
  48. package/dist/components/Content/Models/components/ClassicLayout.vue.script.js.map +1 -1
  49. package/dist/components/Content/Models/components/ModernLayout.vue.d.ts +1 -0
  50. package/dist/components/Content/Models/components/ModernLayout.vue.d.ts.map +1 -1
  51. package/dist/components/Content/Models/components/ModernLayout.vue.js.map +1 -1
  52. package/dist/components/Content/Models/components/ModernLayout.vue.script.js +2 -1
  53. package/dist/components/Content/Models/components/ModernLayout.vue.script.js.map +1 -1
  54. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +2 -2
  55. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  56. package/dist/components/Content/Operations/TraversedEntry.vue.js.map +1 -1
  57. package/dist/components/Content/Operations/TraversedEntry.vue.script.js.map +1 -1
  58. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +2 -0
  59. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  60. package/dist/components/Content/Schema/SchemaComposition.vue.js.map +1 -1
  61. package/dist/components/Content/Schema/SchemaComposition.vue.script.js +5 -0
  62. package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -1
  63. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -1
  64. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js +1 -1
  65. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js.map +1 -1
  66. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  67. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  68. package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -1
  69. package/dist/components/Content/Schema/SchemaProperty.vue.script.js +16 -10
  70. package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -1
  71. package/dist/features/Operation/Operation.vue.d.ts +2 -2
  72. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  73. package/dist/features/Operation/Operation.vue.js.map +1 -1
  74. package/dist/features/Operation/Operation.vue.script.js.map +1 -1
  75. package/dist/features/Operation/components/OperationParameters.vue.d.ts +1 -1
  76. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  77. package/dist/features/Operation/components/OperationParameters.vue.js.map +1 -1
  78. package/dist/features/Operation/components/OperationParameters.vue.script.js +1 -1
  79. package/dist/features/Operation/components/OperationParameters.vue.script.js.map +1 -1
  80. package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -1
  81. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  82. package/dist/features/Operation/components/OperationResponses.vue.js.map +1 -1
  83. package/dist/features/Operation/components/OperationResponses.vue.script.js.map +1 -1
  84. package/dist/features/Operation/components/ParameterList.vue.d.ts +1 -1
  85. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  86. package/dist/features/Operation/components/ParameterList.vue.js.map +1 -1
  87. package/dist/features/Operation/components/ParameterList.vue.script.js.map +1 -1
  88. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +1 -1
  89. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  90. package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
  91. package/dist/features/Operation/components/ParameterListItem.vue.js.map +1 -1
  92. package/dist/features/Operation/components/ParameterListItem.vue.script.js.map +1 -1
  93. package/dist/features/Operation/components/RequestBody.vue.d.ts +1 -0
  94. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  95. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  96. package/dist/features/Operation/components/RequestBody.vue.js.map +1 -1
  97. package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -1
  98. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +1 -1
  99. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  100. package/dist/features/Operation/components/callbacks/Callback.vue.js +1 -1
  101. package/dist/features/Operation/components/callbacks/Callback.vue.js.map +1 -1
  102. package/dist/features/Operation/components/callbacks/Callback.vue.script.js.map +1 -1
  103. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +1 -1
  104. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  105. package/dist/features/Operation/components/callbacks/Callbacks.vue.js.map +1 -1
  106. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js.map +1 -1
  107. package/dist/features/Operation/helpers/operation-stability.d.ts +19 -0
  108. package/dist/features/Operation/helpers/operation-stability.d.ts.map +1 -0
  109. package/dist/features/Operation/helpers/operation-stability.js +25 -0
  110. package/dist/features/Operation/helpers/operation-stability.js.map +1 -0
  111. package/dist/features/Operation/helpers/should-ignore-entity.d.ts +8 -0
  112. package/dist/features/Operation/helpers/should-ignore-entity.d.ts.map +1 -0
  113. package/dist/features/Operation/helpers/should-ignore-entity.js +9 -0
  114. package/dist/features/Operation/helpers/should-ignore-entity.js.map +1 -0
  115. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  116. package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
  117. package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -1
  118. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +3 -3
  119. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -1
  120. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  121. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  122. package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -1
  123. package/dist/features/Operation/layouts/ModernLayout.vue.script.js +2 -2
  124. package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -1
  125. package/dist/features/Search/components/SearchModal.vue.js +1 -1
  126. package/dist/features/Search/components/SearchModal.vue.js.map +1 -1
  127. package/dist/features/Search/components/SearchModal.vue.script.js +1 -1
  128. package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -1
  129. package/dist/features/Search/hooks/useSearchIndex.d.ts.map +1 -1
  130. package/dist/features/Search/hooks/useSearchIndex.js +3 -2
  131. package/dist/features/Search/hooks/useSearchIndex.js.map +1 -1
  132. package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
  133. package/dist/features/example-responses/ExampleResponse.vue.js.map +1 -1
  134. package/dist/features/example-responses/ExampleResponse.vue.script.js +1 -1
  135. package/dist/features/example-responses/ExampleResponse.vue.script.js.map +1 -1
  136. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  137. package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
  138. package/dist/features/example-responses/ExampleResponses.vue.js.map +1 -1
  139. package/dist/features/example-responses/ExampleResponses.vue.script.js +5 -4
  140. package/dist/features/example-responses/ExampleResponses.vue.script.js.map +1 -1
  141. package/dist/features/example-responses/ExampleSchema.vue.js.map +1 -1
  142. package/dist/features/example-responses/ExampleSchema.vue.script.js +1 -1
  143. package/dist/features/example-responses/ExampleSchema.vue.script.js.map +1 -1
  144. package/dist/features/example-responses/helpers/has-response-content.d.ts.map +1 -0
  145. package/dist/features/example-responses/{has-response-content.js → helpers/has-response-content.js} +4 -3
  146. package/dist/features/example-responses/helpers/has-response-content.js.map +1 -0
  147. package/dist/features/example-responses/helpers/normalize-mime-type-object.d.ts +8 -0
  148. package/dist/features/example-responses/helpers/normalize-mime-type-object.d.ts.map +1 -0
  149. package/dist/features/example-responses/helpers/normalize-mime-type-object.js +20 -0
  150. package/dist/features/example-responses/helpers/normalize-mime-type-object.js.map +1 -0
  151. package/dist/features/example-responses/helpers/normalize-mime-type.d.ts +10 -0
  152. package/dist/features/example-responses/helpers/normalize-mime-type.d.ts.map +1 -0
  153. package/dist/features/example-responses/helpers/normalize-mime-type.js +9 -0
  154. package/dist/features/example-responses/helpers/normalize-mime-type.js.map +1 -0
  155. package/dist/features/multiple-documents/DocumentSelector.vue.js.map +1 -1
  156. package/dist/features/multiple-documents/DocumentSelector.vue.script.js +1 -1
  157. package/dist/features/multiple-documents/DocumentSelector.vue.script.js.map +1 -1
  158. package/dist/helpers/load-from-perssistance.js +1 -1
  159. package/dist/helpers/load-from-perssistance.js.map +1 -1
  160. package/dist/helpers/map-config-to-workspace-store.js +1 -1
  161. package/dist/helpers/map-config-to-workspace-store.js.map +1 -1
  162. package/dist/helpers/normalize-configurations.js +1 -1
  163. package/dist/hooks/use-intersection.d.ts +12 -1
  164. package/dist/hooks/use-intersection.d.ts.map +1 -1
  165. package/dist/hooks/use-intersection.js +7 -5
  166. package/dist/hooks/use-intersection.js.map +1 -1
  167. package/dist/style.css +4668 -6027
  168. package/package.json +15 -15
  169. package/dist/features/example-responses/has-response-content.d.ts.map +0 -1
  170. package/dist/features/example-responses/has-response-content.js.map +0 -1
  171. /package/dist/features/example-responses/{has-response-content.d.ts → helpers/has-response-content.d.ts} +0 -0
@@ -189,44 +189,48 @@ var SchemaProperty_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
189
189
  compact: __props.compact,
190
190
  compositionPath: currentCompositionPath.value,
191
191
  eventBus: __props.eventBus,
192
+ hideModelNames: __props.hideModelNames,
192
193
  level: __props.level + 1,
193
194
  name: __props.name,
194
195
  noncollapsible: __props.noncollapsible,
195
196
  options: __props.options,
196
- schemaContext: __props.schemaContext,
197
- schema: objectSchemaForChildren.value
197
+ schema: objectSchemaForChildren.value,
198
+ schemaContext: __props.schemaContext
198
199
  }, null, 8, [
199
200
  "breadcrumb",
200
201
  "compact",
201
202
  "compositionPath",
202
203
  "eventBus",
204
+ "hideModelNames",
203
205
  "level",
204
206
  "name",
205
207
  "noncollapsible",
206
208
  "options",
207
- "schemaContext",
208
- "schema"
209
+ "schema",
210
+ "schemaContext"
209
211
  ])])) : createCommentVNode("", true),
210
212
  shouldRenderArrayOfObjects.value && resolvedArrayItems.value ? (openBlock(), createElementBlock("div", _hoisted_5, [createVNode(Schema_default, {
211
213
  compact: __props.compact,
212
214
  compositionPath: arrayItemsCompositionPath.value,
213
215
  eventBus: __props.eventBus,
216
+ hideModelNames: __props.hideModelNames,
214
217
  level: __props.level + 1,
215
218
  name: __props.name,
216
219
  noncollapsible: __props.noncollapsible,
217
220
  options: __props.options,
218
- schemaContext: __props.schemaContext,
219
- schema: unref(resolve).schema(resolvedArrayItems.value)
221
+ schema: unref(resolve).schema(resolvedArrayItems.value),
222
+ schemaContext: __props.schemaContext
220
223
  }, null, 8, [
221
224
  "compact",
222
225
  "compositionPath",
223
226
  "eventBus",
227
+ "hideModelNames",
224
228
  "level",
225
229
  "name",
226
230
  "noncollapsible",
227
231
  "options",
228
- "schemaContext",
229
- "schema"
232
+ "schema",
233
+ "schemaContext"
230
234
  ])])) : createCommentVNode("", true),
231
235
  (openBlock(true), createElementBlock(Fragment, null, renderList(compositionsToRender.value, (compositionData) => {
232
236
  return openBlock(), createBlock(SchemaComposition_default, {
@@ -234,28 +238,30 @@ var SchemaProperty_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
234
238
  breadcrumb: __props.breadcrumb,
235
239
  compact: __props.compact,
236
240
  composition: compositionData.composition,
241
+ compositionPath: currentCompositionPath.value,
237
242
  discriminator: __props.schema?.discriminator,
238
243
  eventBus: __props.eventBus,
239
244
  hideHeading: __props.hideHeading,
245
+ hideModelNames: __props.hideModelNames,
240
246
  level: __props.level,
241
247
  name: __props.name,
242
248
  noncollapsible: __props.noncollapsible,
243
249
  options: __props.options,
244
- compositionPath: currentCompositionPath.value,
245
250
  schema: compositionData.value,
246
251
  schemaContext: __props.schemaContext
247
252
  }, null, 8, [
248
253
  "breadcrumb",
249
254
  "compact",
250
255
  "composition",
256
+ "compositionPath",
251
257
  "discriminator",
252
258
  "eventBus",
253
259
  "hideHeading",
260
+ "hideModelNames",
254
261
  "level",
255
262
  "name",
256
263
  "noncollapsible",
257
264
  "options",
258
- "compositionPath",
259
265
  "schema",
260
266
  "schemaContext"
261
267
  ]);
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaProperty.vue.script.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarMarkdown, ScalarWrappingText } from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type {\n DiscriminatorObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\nimport { computed, type Component } from 'vue'\n\nimport { WithBreadcrumb } from '@/components/Anchor'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport type { SchemaOptions } from '@/components/Content/Schema/types'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nimport { getCompositionsToRender } from './helpers/get-compositions-to-render'\nimport { getEnumValues } from './helpers/get-enum-values'\nimport { getPropertyDescription } from './helpers/get-property-description'\nimport { hasComplexArrayItems } from './helpers/has-complex-array-items'\nimport { optimizeValueForDisplay } from './helpers/optimize-value-for-display'\nimport { shouldDisplayDescription } from './helpers/should-display-description'\nimport { shouldDisplayHeading } from './helpers/should-display-heading'\nimport Schema from './Schema.vue'\nimport SchemaComposition from './SchemaComposition.vue'\nimport SchemaEnums from './SchemaEnums.vue'\nimport SchemaPropertyHeading from './SchemaPropertyHeading.vue'\n\n/**\n * Note: We're taking in a prop called `value` which should be a JSON Schema.\n *\n * We're using `optimizeValueForDisplay` to merge null types in compositions (anyOf, allOf, oneOf, not).\n * So you should basically use the optimizedValue everywhere in the component.\n */\n\nconst props = withDefaults(\n defineProps<{\n is?: string | Component\n schema: SchemaObject | undefined\n noncollapsible?: boolean\n level?: number\n name?: string\n required?: boolean\n compact?: boolean\n discriminator?: DiscriminatorObject\n description?: string\n hideModelNames?: boolean\n hideHeading?: boolean\n /** When the root schema was resolved from a $ref, pass the ref name for display (e.g. \"Data\"). */\n modelName?: string | null\n variant?: 'additionalProperties' | 'patternProperties'\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n options: SchemaOptions\n /** Enum values for property names (from JSON Schema propertyNames keyword). */\n propertyNamesEnum?: string[]\n /** When \"requestBody\", composition selection is synced with the example snippet */\n schemaContext?: string\n /** Internal path used to sync nested request body compositions with the code sample */\n compositionPath?: string[]\n /** Internal path segment for this property when building nested composition keys */\n compositionPathSegment?: string\n }>(),\n {\n level: 0,\n required: false,\n compact: false,\n hideModelNames: false,\n },\n)\n\n/** Simplified composition with `null` type. */\nconst optimizedValue = computed(() => optimizeValueForDisplay(props.schema))\n\nconst childBreadcrumb = computed<string[] | undefined>(() =>\n props.breadcrumb && props.name\n ? [...props.breadcrumb, props.name]\n : undefined,\n)\n\nconst currentCompositionPath = computed<string[]>(() =>\n props.compositionPathSegment\n ? [...(props.compositionPath ?? []), props.compositionPathSegment]\n : (props.compositionPath ?? []),\n)\n\nconst arrayItemsCompositionPath = computed<string[]>(() => [\n ...currentCompositionPath.value,\n 'items',\n])\n\nconst shouldHaveLink = computed(() => props.level <= 1)\n\n/** Checks if array items have complex structure */\nconst hasComplexArrayItemsComputed = computed(() =>\n hasComplexArrayItems(optimizedValue.value),\n)\n\n/** Check if enum should be displayed (from value schema or from propertyNames) */\nconst hasEnum = computed(() => enumValues.value.length > 0)\n\n/** Determine if object properties should be displayed */\nconst shouldRenderObjectProperties = computed(() => {\n const value = optimizedValue.value\n if (!value) {\n return false\n }\n\n return (\n isTypeObject(value) &&\n ('properties' in value || 'additionalProperties' in value)\n )\n})\n\n/** Determine if array of objects should be rendered */\nconst shouldRenderArrayOfObjects = computed(() => {\n const value = optimizedValue.value\n if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n return false\n }\n\n return hasComplexArrayItemsComputed.value\n})\n\n/** Extract enum values from schema or array items */\nconst enumValues = computed(() => getEnumValues(optimizedValue.value))\n\n/** Generate property description from type/format */\nconst propertyDescription = computed(() =>\n getPropertyDescription(optimizedValue.value),\n)\n\n/** Determine if description should be displayed */\nconst displayDescription = computed(() =>\n shouldDisplayDescription(optimizedValue.value, props.description),\n)\n\n/**\n * When the property already renders the description, avoid repeating it in the nested object schema card.\n */\nconst objectSchemaForChildren = computed(() => {\n const value = optimizedValue.value\n if (!value || !displayDescription.value || !('description' in value)) {\n return value\n }\n\n const { description: _description, ...schemaWithoutDescription } = value\n return schemaWithoutDescription as SchemaObject\n})\n\n/** Determine if property heading should be displayed */\nconst shouldDisplayHeadingComputed = computed(() =>\n shouldDisplayHeading(optimizedValue.value, props.name, props.required),\n)\n\n/** Computes which compositions should be rendered and with which values */\nconst compositionsToRender = computed(() =>\n getCompositionsToRender(optimizedValue.value),\n)\n\n/** Get resolved array items for rendering */\nconst resolvedArrayItems = computed(() => {\n const value = optimizedValue.value\n if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n return undefined\n }\n return resolve.schema(value.items)\n})\n\n/** Check if discriminator matches current property */\nconst isDiscriminatorProperty = computed(() =>\n Boolean(props.name && props.discriminator?.propertyName === props.name),\n)\n</script>\n<template>\n <component\n :is=\"is ?? 'li'\"\n class=\"property\"\n :class=\"[\n `property--level-${level}`,\n {\n 'property--compact': compact,\n 'property--deprecated': optimizedValue?.deprecated,\n },\n ]\">\n <SchemaPropertyHeading\n v-if=\"shouldDisplayHeadingComputed\"\n class=\"group\"\n :enum=\"hasEnum\"\n :hideModelNames\n :isDiscriminator=\"isDiscriminatorProperty\"\n :modelName=\"modelName\"\n :required\n :value=\"optimizedValue\">\n <template\n v-if=\"name\"\n #name>\n <WithBreadcrumb\n :breadcrumb=\"shouldHaveLink ? childBreadcrumb : undefined\"\n :eventBus=\"eventBus\">\n <span\n v-if=\"variant === 'patternProperties'\"\n class=\"property-name-pattern-properties\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </span>\n <span\n v-else-if=\"variant === 'additionalProperties'\"\n class=\"property-name-additional-properties\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </span>\n <ScalarWrappingText\n v-else\n preset=\"property\"\n :text=\"name\" />\n </WithBreadcrumb>\n </template>\n <template\n v-if=\"optimizedValue?.example !== undefined\"\n #example>\n Example:\n {{ optimizedValue.example }}\n </template>\n </SchemaPropertyHeading>\n\n <!-- Description -->\n <div\n v-if=\"displayDescription || propertyDescription\"\n class=\"property-description\">\n <ScalarMarkdown\n :value=\"displayDescription || propertyDescription || ''\" />\n </div>\n\n <!-- Enum for property names -->\n <SchemaEnums\n v-if=\"propertyNamesEnum && propertyNamesEnum.length > 0\"\n propertyNames\n :value=\"{ enum: propertyNamesEnum } as SchemaObject\" />\n\n <!-- Enum values -->\n <SchemaEnums\n v-if=\"enumValues.length > 0\"\n :value=\"optimizedValue\" />\n\n <!-- Object -->\n <div\n v-if=\"shouldRenderObjectProperties\"\n class=\"children\">\n <Schema\n :breadcrumb=\"childBreadcrumb\"\n :compact=\"compact\"\n :compositionPath=\"currentCompositionPath\"\n :eventBus=\"eventBus\"\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schemaContext=\"schemaContext\"\n :schema=\"objectSchemaForChildren\" />\n </div>\n\n <!-- Array of objects or nested arrays -->\n <div\n v-if=\"shouldRenderArrayOfObjects && resolvedArrayItems\"\n class=\"children\">\n <Schema\n :compact=\"compact\"\n :compositionPath=\"arrayItemsCompositionPath\"\n :eventBus=\"eventBus\"\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schemaContext=\"schemaContext\"\n :schema=\"resolve.schema(resolvedArrayItems)\" />\n </div>\n\n <!-- Compositions -->\n <SchemaComposition\n v-for=\"compositionData in compositionsToRender\"\n :key=\"compositionData.composition\"\n :breadcrumb=\"breadcrumb\"\n :compact=\"compact\"\n :composition=\"compositionData.composition\"\n :discriminator=\"schema?.discriminator\"\n :eventBus=\"eventBus\"\n :hideHeading=\"hideHeading\"\n :level=\"level\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :compositionPath=\"currentCompositionPath\"\n :schema=\"compositionData.value\"\n :schemaContext=\"schemaContext\" />\n <SpecificationExtension :value=\"optimizedValue\" />\n </component>\n</template>\n\n<style scoped>\n.property {\n color: var(--scalar-color-1);\n display: flex;\n flex-direction: column;\n padding: 10px;\n font-size: var(--scalar-small);\n position: relative;\n}\n\n/** Remove top padding for top level schema card */\n.property.property--level-0:has(\n > .property-rule\n > .schema-card\n > .schema-properties.schema-properties-open\n > ul\n > li.property\n ) {\n padding-top: 0;\n}\n\n.property--compact.property--level-0,\n.property--compact.property--level-1 {\n padding: 10px 0;\n}\n\n.composition-panel .property.property.property.property--level-0 {\n padding: 0px;\n}\n\n.property--compact.property--level-0\n .composition-panel\n .property--compact.property--level-1 {\n padding: 8px;\n}\n\n/* if a property doesn't have a heading, remove the top padding */\n.property:has(> .property-rule:nth-of-type(1)):not(.property--compact) {\n padding-top: 8px;\n padding-bottom: 8px;\n}\n\n.property--deprecated {\n background: repeating-linear-gradient(\n -45deg,\n var(--scalar-background-2) 0,\n var(--scalar-background-2) 2px,\n transparent 2px,\n transparent 5px\n );\n background-size: 100%;\n}\n\n.property--deprecated > * {\n opacity: 0.75;\n}\n\n.property-description {\n margin-top: 6px;\n line-height: 1.4;\n font-size: var(--scalar-small);\n}\n\n.property-description:has(+ .property-rule) {\n margin-bottom: 9px;\n}\n\n:deep(.property-description) * {\n color: var(--scalar-color-2) !important;\n}\n\n.property:not(:last-of-type) {\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.property-description + .children,\n.children + .property-rule {\n margin-top: 9px;\n}\n\n.children {\n display: flex;\n flex-direction: column;\n}\n\n.children .property--compact.property--level-1 {\n padding: 12px;\n}\n\n.property-example-value {\n all: unset;\n font-family: var(--scalar-font-code);\n padding: 6px;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.property-rule {\n border-radius: var(--scalar-radius-lg);\n display: flex;\n flex-direction: column;\n}\n\n.property-rule\n :deep(\n .composition-panel\n .schema-card--level-1\n > .schema-properties.schema-properties-open\n ) {\n border-radius: 0 0 var(--scalar-radius-lg) var(--scalar-radius-lg);\n}\n\n.property-rule\n :deep(.composition-panel > .schema-card > .schema-card-description) {\n padding: 10px;\n border-left: var(--scalar-border-width) solid var(--scalar-border-color);\n border-right: var(--scalar-border-width) solid var(--scalar-border-color);\n\n & + .schema-properties {\n margin-top: 0;\n }\n}\n\n.property-example {\n background: transparent;\n border: none;\n display: flex;\n flex-direction: row;\n gap: 8px;\n}\n\n.property-example-label,\n.property-example-value {\n padding: 3px 0 0 0;\n}\n\n.property-example-value {\n background: var(--scalar-background-2);\n border-top: 0;\n border-radius: var(--scalar-radius);\n padding: 3px 4px;\n}\n\n.property-name {\n font-family: var(--scalar-font-code);\n font-weight: var(--scalar-semibold);\n}\n\n.property-name-additional-properties::before,\n.property-name-pattern-properties::before {\n text-transform: uppercase;\n font-size: var(--scalar-micro);\n display: inline-block;\n padding: 2px 4px;\n border-radius: var(--scalar-radius);\n color: var(--scalar-color-1);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n background-color: var(--scalar-background-2);\n margin-right: 4px;\n}\n\n.property-name-pattern-properties::before {\n content: 'regex';\n}\n\n.property-name-additional-properties,\n.property-name-pattern-properties {\n border: 1px dashed var(--scalar-border-color);\n color: var(--scalar-color-accent);\n display: inline-block;\n padding: 2px;\n border-radius: var(--scalar-radius);\n}\n</style>\n"],"mappings":"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"}
1
+ {"version":3,"file":"SchemaProperty.vue.script.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarMarkdown, ScalarWrappingText } from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type {\n DiscriminatorObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\nimport { computed, type Component } from 'vue'\n\nimport { WithBreadcrumb } from '@/components/Anchor'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport type { SchemaOptions } from '@/components/Content/Schema/types'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nimport { getCompositionsToRender } from './helpers/get-compositions-to-render'\nimport { getEnumValues } from './helpers/get-enum-values'\nimport { getPropertyDescription } from './helpers/get-property-description'\nimport { hasComplexArrayItems } from './helpers/has-complex-array-items'\nimport { optimizeValueForDisplay } from './helpers/optimize-value-for-display'\nimport { shouldDisplayDescription } from './helpers/should-display-description'\nimport { shouldDisplayHeading } from './helpers/should-display-heading'\nimport Schema from './Schema.vue'\nimport SchemaComposition from './SchemaComposition.vue'\nimport SchemaEnums from './SchemaEnums.vue'\nimport SchemaPropertyHeading from './SchemaPropertyHeading.vue'\n\n/**\n * Note: We're taking in a prop called `value` which should be a JSON Schema.\n *\n * We're using `optimizeValueForDisplay` to merge null types in compositions (anyOf, allOf, oneOf, not).\n * So you should basically use the optimizedValue everywhere in the component.\n */\n\nconst props = withDefaults(\n defineProps<{\n is?: string | Component\n schema: SchemaObject | undefined\n noncollapsible?: boolean\n level?: number\n name?: string\n required?: boolean\n compact?: boolean\n discriminator?: DiscriminatorObject\n description?: string\n hideModelNames?: boolean\n hideHeading?: boolean\n /** When the root schema was resolved from a $ref, pass the ref name for display (e.g. \"Data\"). */\n modelName?: string | null\n variant?: 'additionalProperties' | 'patternProperties'\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n options: SchemaOptions\n /** Enum values for property names (from JSON Schema propertyNames keyword). */\n propertyNamesEnum?: string[]\n /** When \"requestBody\", composition selection is synced with the example snippet */\n schemaContext?: string\n /** Internal path used to sync nested request body compositions with the code sample */\n compositionPath?: string[]\n /** Internal path segment for this property when building nested composition keys */\n compositionPathSegment?: string\n }>(),\n {\n level: 0,\n required: false,\n compact: false,\n hideModelNames: false,\n },\n)\n\n/** Simplified composition with `null` type. */\nconst optimizedValue = computed(() => optimizeValueForDisplay(props.schema))\n\nconst childBreadcrumb = computed<string[] | undefined>(() =>\n props.breadcrumb && props.name\n ? [...props.breadcrumb, props.name]\n : undefined,\n)\n\nconst currentCompositionPath = computed<string[]>(() =>\n props.compositionPathSegment\n ? [...(props.compositionPath ?? []), props.compositionPathSegment]\n : (props.compositionPath ?? []),\n)\n\nconst arrayItemsCompositionPath = computed<string[]>(() => [\n ...currentCompositionPath.value,\n 'items',\n])\n\nconst shouldHaveLink = computed(() => props.level <= 1)\n\n/** Checks if array items have complex structure */\nconst hasComplexArrayItemsComputed = computed(() =>\n hasComplexArrayItems(optimizedValue.value),\n)\n\n/** Check if enum should be displayed (from value schema or from propertyNames) */\nconst hasEnum = computed(() => enumValues.value.length > 0)\n\n/** Determine if object properties should be displayed */\nconst shouldRenderObjectProperties = computed(() => {\n const value = optimizedValue.value\n if (!value) {\n return false\n }\n\n return (\n isTypeObject(value) &&\n ('properties' in value || 'additionalProperties' in value)\n )\n})\n\n/** Determine if array of objects should be rendered */\nconst shouldRenderArrayOfObjects = computed(() => {\n const value = optimizedValue.value\n if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n return false\n }\n\n return hasComplexArrayItemsComputed.value\n})\n\n/** Extract enum values from schema or array items */\nconst enumValues = computed(() => getEnumValues(optimizedValue.value))\n\n/** Generate property description from type/format */\nconst propertyDescription = computed(() =>\n getPropertyDescription(optimizedValue.value),\n)\n\n/** Determine if description should be displayed */\nconst displayDescription = computed(() =>\n shouldDisplayDescription(optimizedValue.value, props.description),\n)\n\n/**\n * When the property already renders the description, avoid repeating it in the nested object schema card.\n */\nconst objectSchemaForChildren = computed(() => {\n const value = optimizedValue.value\n if (!value || !displayDescription.value || !('description' in value)) {\n return value\n }\n\n const { description: _description, ...schemaWithoutDescription } = value\n return schemaWithoutDescription as SchemaObject\n})\n\n/** Determine if property heading should be displayed */\nconst shouldDisplayHeadingComputed = computed(() =>\n shouldDisplayHeading(optimizedValue.value, props.name, props.required),\n)\n\n/** Computes which compositions should be rendered and with which values */\nconst compositionsToRender = computed(() =>\n getCompositionsToRender(optimizedValue.value),\n)\n\n/** Get resolved array items for rendering */\nconst resolvedArrayItems = computed(() => {\n const value = optimizedValue.value\n if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n return undefined\n }\n return resolve.schema(value.items)\n})\n\n/** Check if discriminator matches current property */\nconst isDiscriminatorProperty = computed(() =>\n Boolean(props.name && props.discriminator?.propertyName === props.name),\n)\n</script>\n<template>\n <component\n :is=\"is ?? 'li'\"\n class=\"property\"\n :class=\"[\n `property--level-${level}`,\n {\n 'property--compact': compact,\n 'property--deprecated': optimizedValue?.deprecated,\n },\n ]\">\n <SchemaPropertyHeading\n v-if=\"shouldDisplayHeadingComputed\"\n class=\"group\"\n :enum=\"hasEnum\"\n :hideModelNames\n :isDiscriminator=\"isDiscriminatorProperty\"\n :modelName=\"modelName\"\n :required\n :value=\"optimizedValue\">\n <template\n v-if=\"name\"\n #name>\n <WithBreadcrumb\n :breadcrumb=\"shouldHaveLink ? childBreadcrumb : undefined\"\n :eventBus=\"eventBus\">\n <span\n v-if=\"variant === 'patternProperties'\"\n class=\"property-name-pattern-properties\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </span>\n <span\n v-else-if=\"variant === 'additionalProperties'\"\n class=\"property-name-additional-properties\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </span>\n <ScalarWrappingText\n v-else\n preset=\"property\"\n :text=\"name\" />\n </WithBreadcrumb>\n </template>\n <template\n v-if=\"optimizedValue?.example !== undefined\"\n #example>\n Example:\n {{ optimizedValue.example }}\n </template>\n </SchemaPropertyHeading>\n\n <!-- Description -->\n <div\n v-if=\"displayDescription || propertyDescription\"\n class=\"property-description\">\n <ScalarMarkdown\n :value=\"displayDescription || propertyDescription || ''\" />\n </div>\n\n <!-- Enum for property names -->\n <SchemaEnums\n v-if=\"propertyNamesEnum && propertyNamesEnum.length > 0\"\n propertyNames\n :value=\"{ enum: propertyNamesEnum } as SchemaObject\" />\n\n <!-- Enum values -->\n <SchemaEnums\n v-if=\"enumValues.length > 0\"\n :value=\"optimizedValue\" />\n\n <!-- Object -->\n <div\n v-if=\"shouldRenderObjectProperties\"\n class=\"children\">\n <Schema\n :breadcrumb=\"childBreadcrumb\"\n :compact=\"compact\"\n :compositionPath=\"currentCompositionPath\"\n :eventBus=\"eventBus\"\n :hideModelNames\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"objectSchemaForChildren\"\n :schemaContext=\"schemaContext\" />\n </div>\n\n <!-- Array of objects or nested arrays -->\n <div\n v-if=\"shouldRenderArrayOfObjects && resolvedArrayItems\"\n class=\"children\">\n <Schema\n :compact=\"compact\"\n :compositionPath=\"arrayItemsCompositionPath\"\n :eventBus=\"eventBus\"\n :hideModelNames\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"resolve.schema(resolvedArrayItems)\"\n :schemaContext=\"schemaContext\" />\n </div>\n\n <!-- Compositions -->\n <SchemaComposition\n v-for=\"compositionData in compositionsToRender\"\n :key=\"compositionData.composition\"\n :breadcrumb=\"breadcrumb\"\n :compact=\"compact\"\n :composition=\"compositionData.composition\"\n :compositionPath=\"currentCompositionPath\"\n :discriminator=\"schema?.discriminator\"\n :eventBus=\"eventBus\"\n :hideHeading=\"hideHeading\"\n :hideModelNames\n :level=\"level\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"compositionData.value\"\n :schemaContext=\"schemaContext\" />\n <SpecificationExtension :value=\"optimizedValue\" />\n </component>\n</template>\n\n<style scoped>\n.property {\n color: var(--scalar-color-1);\n display: flex;\n flex-direction: column;\n padding: 10px;\n font-size: var(--scalar-small);\n position: relative;\n}\n\n/** Remove top padding for top level schema card */\n.property.property--level-0:has(\n > .property-rule\n > .schema-card\n > .schema-properties.schema-properties-open\n > ul\n > li.property\n ) {\n padding-top: 0;\n}\n\n.property--compact.property--level-0,\n.property--compact.property--level-1 {\n padding: 10px 0;\n}\n\n.composition-panel .property.property.property.property--level-0 {\n padding: 0px;\n}\n\n.property--compact.property--level-0\n .composition-panel\n .property--compact.property--level-1 {\n padding: 8px;\n}\n\n/* if a property doesn't have a heading, remove the top padding */\n.property:has(> .property-rule:nth-of-type(1)):not(.property--compact) {\n padding-top: 8px;\n padding-bottom: 8px;\n}\n\n.property--deprecated {\n background: repeating-linear-gradient(\n -45deg,\n var(--scalar-background-2) 0,\n var(--scalar-background-2) 2px,\n transparent 2px,\n transparent 5px\n );\n background-size: 100%;\n}\n\n.property--deprecated > * {\n opacity: 0.75;\n}\n\n.property-description {\n margin-top: 6px;\n line-height: 1.4;\n font-size: var(--scalar-small);\n}\n\n.property-description:has(+ .property-rule) {\n margin-bottom: 9px;\n}\n\n:deep(.property-description) * {\n color: var(--scalar-color-2) !important;\n}\n\n.property:not(:last-of-type) {\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.property-description + .children,\n.children + .property-rule {\n margin-top: 9px;\n}\n\n.children {\n display: flex;\n flex-direction: column;\n}\n\n.children .property--compact.property--level-1 {\n padding: 12px;\n}\n\n.property-example-value {\n all: unset;\n font-family: var(--scalar-font-code);\n padding: 6px;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.property-rule {\n border-radius: var(--scalar-radius-lg);\n display: flex;\n flex-direction: column;\n}\n\n.property-rule\n :deep(\n .composition-panel\n .schema-card--level-1\n > .schema-properties.schema-properties-open\n ) {\n border-radius: 0 0 var(--scalar-radius-lg) var(--scalar-radius-lg);\n}\n\n.property-rule\n :deep(.composition-panel > .schema-card > .schema-card-description) {\n padding: 10px;\n border-left: var(--scalar-border-width) solid var(--scalar-border-color);\n border-right: var(--scalar-border-width) solid var(--scalar-border-color);\n\n & + .schema-properties {\n margin-top: 0;\n }\n}\n\n.property-example {\n background: transparent;\n border: none;\n display: flex;\n flex-direction: row;\n gap: 8px;\n}\n\n.property-example-label,\n.property-example-value {\n padding: 3px 0 0 0;\n}\n\n.property-example-value {\n background: var(--scalar-background-2);\n border-top: 0;\n border-radius: var(--scalar-radius);\n padding: 3px 4px;\n}\n\n.property-name {\n font-family: var(--scalar-font-code);\n font-weight: var(--scalar-semibold);\n}\n\n.property-name-additional-properties::before,\n.property-name-pattern-properties::before {\n text-transform: uppercase;\n font-size: var(--scalar-micro);\n display: inline-block;\n padding: 2px 4px;\n border-radius: var(--scalar-radius);\n color: var(--scalar-color-1);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n background-color: var(--scalar-background-2);\n margin-right: 4px;\n}\n\n.property-name-pattern-properties::before {\n content: 'regex';\n}\n\n.property-name-additional-properties,\n.property-name-pattern-properties {\n border: 1px dashed var(--scalar-border-color);\n color: var(--scalar-color-accent);\n display: inline-block;\n padding: 2px;\n border-radius: var(--scalar-radius);\n}\n</style>\n"],"mappings":"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"}
@@ -1,4 +1,4 @@
1
- import type { ClientOptionGroup } from '@scalar/api-client/v2/blocks/operation-code-sample';
1
+ import type { ClientOptionGroup } from '@scalar/api-client/blocks/operation-code-sample';
2
2
  import type { HttpMethod } from '@scalar/helpers/http/http-methods';
3
3
  import type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference';
4
4
  import type { WorkspaceStore } from '@scalar/workspace-store/client';
@@ -15,7 +15,7 @@ export type OperationProps = {
15
15
  id: string;
16
16
  method: HttpMethod;
17
17
  /** The subset of the configuration object required for the operation component */
18
- options: Pick<ApiReferenceConfigurationRaw, 'expandAllResponses' | 'hideTestRequestButton' | 'layout' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy' | 'showOperationId'>;
18
+ options: Pick<ApiReferenceConfigurationRaw, 'expandAllResponses' | 'hideModels' | 'hideTestRequestButton' | 'layout' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy' | 'showOperationId'>;
19
19
  /** Document object */
20
20
  document: OpenApiDocument;
21
21
  /** Key of the operations path in the document.paths object */
@@ -1 +1 @@
1
- {"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Operation/Operation.vue"],"names":[],"mappings":"AAyKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAC3F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,yCAAyC,CAAA;AAChD,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,YAAY,EACb,MAAM,8DAA8D,CAAA;AAUrE;;GAEG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAIzC,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,UAAU,CAAA;IAClB,kFAAkF;IAClF,OAAO,EAAE,IAAI,CACX,4BAA4B,EAC1B,oBAAoB,GACpB,uBAAuB,GACvB,QAAQ,GACR,8BAA8B,GAC9B,yBAAyB,GACzB,iBAAiB,CACpB,CAAA;IACD,sBAAsB;IACtB,QAAQ,EAAE,eAAe,CAAA;IACzB,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAA;IACZ,0DAA0D;IAC1D,SAAS,EAAE,cAAc,GAAG,SAAS,CAAA;IACrC,iDAAiD;IACjD,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,wFAAwF;IACxF,eAAe,EAAE,qBAAqB,CAAA;IACtC,+CAA+C;IAC/C,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,wDAAwD;IACxD,WAAW,EAAE,OAAO,CAAA;IACpB,yCAAyC;IACzC,SAAS,EAAE,OAAO,CAAA;IAClB,qDAAqD;IACrD,cAAc,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,yBAAyB,CAAC,CAAA;IACtE,oBAAoB;IACpB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,qBAAqB;IACrB,SAAS,EAAE,SAAS,CAAA;CACrB,CAAA;AACD,QAAA,MAAM,YAAY,wSAmKd,CAAC"}
1
+ {"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Operation/Operation.vue"],"names":[],"mappings":"AA0KA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAA;AACxF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,yCAAyC,CAAA;AAChD,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,YAAY,EACb,MAAM,8DAA8D,CAAA;AAUrE;;GAEG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAIzC,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,UAAU,CAAA;IAClB,kFAAkF;IAClF,OAAO,EAAE,IAAI,CACX,4BAA4B,EAC1B,oBAAoB,GACpB,YAAY,GACZ,uBAAuB,GACvB,QAAQ,GACR,8BAA8B,GAC9B,yBAAyB,GACzB,iBAAiB,CACpB,CAAA;IACD,sBAAsB;IACtB,QAAQ,EAAE,eAAe,CAAA;IACzB,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAA;IACZ,0DAA0D;IAC1D,SAAS,EAAE,cAAc,GAAG,SAAS,CAAA;IACrC,iDAAiD;IACjD,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,wFAAwF;IACxF,eAAe,EAAE,qBAAqB,CAAA;IACtC,+CAA+C;IAC/C,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,wDAAwD;IACxD,WAAW,EAAE,OAAO,CAAA;IACpB,yCAAyC;IACzC,SAAS,EAAE,OAAO,CAAA;IAClB,qDAAqD;IACrD,cAAc,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,yBAAyB,CAAC,CAAA;IACtE,oBAAoB;IACpB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,qBAAqB;IACrB,SAAS,EAAE,SAAS,CAAA;CACrB,CAAA;AACD,QAAA,MAAM,YAAY,wSAmKd,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Operation.vue.js","names":[],"sources":["../../../src/features/Operation/Operation.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * References Operation \"block\"\n */\nexport default {}\n\nexport type OperationProps = {\n id: string\n method: HttpMethod\n /** The subset of the configuration object required for the operation component */\n options: Pick<\n ApiReferenceConfigurationRaw,\n | 'expandAllResponses'\n | 'hideTestRequestButton'\n | 'layout'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'showOperationId'\n >\n /** Document object */\n document: OpenApiDocument\n /** Key of the operations path in the document.paths object */\n path: string\n /** OpenAPI path object that will include the operation */\n pathValue: PathItemObject | undefined\n /** Currently selected server for the document */\n server: ServerObject | null\n /** The merged security schemes for the document and the authentication configuration */\n securitySchemes: MergedSecuritySchemes\n /** The http client options for the dropdown */\n clientOptions: ClientOptionGroup[]\n /** Whether the Classic layout operation is collapsed */\n isCollapsed: boolean\n /** Whether the operation is a webhook */\n isWebhook: boolean\n /** The currently selected client for the document */\n selectedClient: WorkspaceStore['workspace']['x-scalar-default-client']\n /** The event bus */\n eventBus: WorkspaceEventBus\n /** The auth store */\n authStore: AuthStore\n}\n</script>\n\n<script lang=\"ts\" setup>\nimport type { ClientOptionGroup } from '@scalar/api-client/v2/blocks/operation-code-sample'\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport {\n combineParams,\n type MergedSecuritySchemes,\n} from '@scalar/workspace-store/request-example'\nimport type {\n OpenApiDocument,\n PathItemObject,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { filterSelectedSecurity } from '@/features/Operation/helpers/filter-selected-security'\n\nimport { getFirstServer } from './helpers/get-first-server'\nimport ClassicLayout from './layouts/ClassicLayout.vue'\nimport ModernLayout from './layouts/ModernLayout.vue'\n\nconst {\n authStore,\n clientOptions,\n document,\n eventBus,\n isCollapsed,\n isWebhook,\n method,\n options,\n path,\n pathValue,\n securitySchemes,\n server,\n} = defineProps<OperationProps>()\n\n/**\n * Operation from the new workspace store, ensure we are de-reference\n *\n * Also adds in params from the pathItemObject\n */\nconst operation = computed(() => {\n const entity = getResolvedRef(pathValue?.[method])\n\n if (!entity) {\n return null\n }\n\n // Combine params from the pathItem and the operation\n const parameters = combineParams(pathValue?.parameters, entity.parameters)\n return { ...entity, parameters }\n})\n\n/**\n * Determine the effective server for the code examples.\n */\nconst selectedServer = computed<ServerObject | null>(() =>\n getFirstServer(\n // 1) Operation\n operation.value?.servers ?? null,\n // 2) Path Item\n pathValue?.servers ?? null,\n // 3) Document\n server,\n ),\n)\n\n/** We must ensure the selected security schemes are required on this operation */\nconst selectedSecuritySchemes = computed(() =>\n filterSelectedSecurity(\n document,\n operation.value,\n authStore.getAuthSelectedSchemas({\n type: 'document',\n documentName: document?.['x-scalar-navigation']?.name ?? '',\n }),\n authStore.getAuthSelectedSchemas({\n type: 'operation',\n documentName: document?.['x-scalar-navigation']?.name ?? '',\n path,\n method,\n }),\n securitySchemes,\n ),\n)\n</script>\n\n<template>\n <template v-if=\"operation\">\n <ClassicLayout\n v-if=\"options.layout === 'classic'\"\n :id\n :clientOptions\n :eventBus\n :isCollapsed\n :isWebhook\n :method\n :operation\n :options\n :path\n :selectedClient\n :selectedSecuritySchemes\n :selectedServer />\n <ModernLayout\n v-else\n :id\n :clientOptions\n :eventBus\n :isWebhook\n :method\n :operation\n :options\n :path\n :selectedClient\n :selectedSecuritySchemes\n :selectedServer />\n </template>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"Operation.vue.js","names":[],"sources":["../../../src/features/Operation/Operation.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * References Operation \"block\"\n */\nexport default {}\n\nexport type OperationProps = {\n id: string\n method: HttpMethod\n /** The subset of the configuration object required for the operation component */\n options: Pick<\n ApiReferenceConfigurationRaw,\n | 'expandAllResponses'\n | 'hideModels'\n | 'hideTestRequestButton'\n | 'layout'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'showOperationId'\n >\n /** Document object */\n document: OpenApiDocument\n /** Key of the operations path in the document.paths object */\n path: string\n /** OpenAPI path object that will include the operation */\n pathValue: PathItemObject | undefined\n /** Currently selected server for the document */\n server: ServerObject | null\n /** The merged security schemes for the document and the authentication configuration */\n securitySchemes: MergedSecuritySchemes\n /** The http client options for the dropdown */\n clientOptions: ClientOptionGroup[]\n /** Whether the Classic layout operation is collapsed */\n isCollapsed: boolean\n /** Whether the operation is a webhook */\n isWebhook: boolean\n /** The currently selected client for the document */\n selectedClient: WorkspaceStore['workspace']['x-scalar-default-client']\n /** The event bus */\n eventBus: WorkspaceEventBus\n /** The auth store */\n authStore: AuthStore\n}\n</script>\n\n<script lang=\"ts\" setup>\nimport type { ClientOptionGroup } from '@scalar/api-client/blocks/operation-code-sample'\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport {\n combineParams,\n type MergedSecuritySchemes,\n} from '@scalar/workspace-store/request-example'\nimport type {\n OpenApiDocument,\n PathItemObject,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { filterSelectedSecurity } from '@/features/Operation/helpers/filter-selected-security'\n\nimport { getFirstServer } from './helpers/get-first-server'\nimport ClassicLayout from './layouts/ClassicLayout.vue'\nimport ModernLayout from './layouts/ModernLayout.vue'\n\nconst {\n authStore,\n clientOptions,\n document,\n eventBus,\n isCollapsed,\n isWebhook,\n method,\n options,\n path,\n pathValue,\n securitySchemes,\n server,\n} = defineProps<OperationProps>()\n\n/**\n * Operation from the new workspace store, ensure we are de-reference\n *\n * Also adds in params from the pathItemObject\n */\nconst operation = computed(() => {\n const entity = getResolvedRef(pathValue?.[method])\n\n if (!entity) {\n return null\n }\n\n // Combine params from the pathItem and the operation\n const parameters = combineParams(pathValue?.parameters, entity.parameters)\n return { ...entity, parameters }\n})\n\n/**\n * Determine the effective server for the code examples.\n */\nconst selectedServer = computed<ServerObject | null>(() =>\n getFirstServer(\n // 1) Operation\n operation.value?.servers ?? null,\n // 2) Path Item\n pathValue?.servers ?? null,\n // 3) Document\n server,\n ),\n)\n\n/** We must ensure the selected security schemes are required on this operation */\nconst selectedSecuritySchemes = computed(() =>\n filterSelectedSecurity(\n document,\n operation.value,\n authStore.getAuthSelectedSchemas({\n type: 'document',\n documentName: document?.['x-scalar-navigation']?.name ?? '',\n }),\n authStore.getAuthSelectedSchemas({\n type: 'operation',\n documentName: document?.['x-scalar-navigation']?.name ?? '',\n path,\n method,\n }),\n securitySchemes,\n ),\n)\n</script>\n\n<template>\n <template v-if=\"operation\">\n <ClassicLayout\n v-if=\"options.layout === 'classic'\"\n :id\n :clientOptions\n :eventBus\n :isCollapsed\n :isWebhook\n :method\n :operation\n :options\n :path\n :selectedClient\n :selectedSecuritySchemes\n :selectedServer />\n <ModernLayout\n v-else\n :id\n :clientOptions\n :eventBus\n :isWebhook\n :method\n :operation\n :options\n :path\n :selectedClient\n :selectedSecuritySchemes\n :selectedServer />\n </template>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Operation.vue.script.js","names":[],"sources":["../../../src/features/Operation/Operation.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * References Operation \"block\"\n */\nexport default {}\n\nexport type OperationProps = {\n id: string\n method: HttpMethod\n /** The subset of the configuration object required for the operation component */\n options: Pick<\n ApiReferenceConfigurationRaw,\n | 'expandAllResponses'\n | 'hideTestRequestButton'\n | 'layout'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'showOperationId'\n >\n /** Document object */\n document: OpenApiDocument\n /** Key of the operations path in the document.paths object */\n path: string\n /** OpenAPI path object that will include the operation */\n pathValue: PathItemObject | undefined\n /** Currently selected server for the document */\n server: ServerObject | null\n /** The merged security schemes for the document and the authentication configuration */\n securitySchemes: MergedSecuritySchemes\n /** The http client options for the dropdown */\n clientOptions: ClientOptionGroup[]\n /** Whether the Classic layout operation is collapsed */\n isCollapsed: boolean\n /** Whether the operation is a webhook */\n isWebhook: boolean\n /** The currently selected client for the document */\n selectedClient: WorkspaceStore['workspace']['x-scalar-default-client']\n /** The event bus */\n eventBus: WorkspaceEventBus\n /** The auth store */\n authStore: AuthStore\n}\n</script>\n\n<script lang=\"ts\" setup>\nimport type { ClientOptionGroup } from '@scalar/api-client/v2/blocks/operation-code-sample'\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport {\n combineParams,\n type MergedSecuritySchemes,\n} from '@scalar/workspace-store/request-example'\nimport type {\n OpenApiDocument,\n PathItemObject,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { filterSelectedSecurity } from '@/features/Operation/helpers/filter-selected-security'\n\nimport { getFirstServer } from './helpers/get-first-server'\nimport ClassicLayout from './layouts/ClassicLayout.vue'\nimport ModernLayout from './layouts/ModernLayout.vue'\n\nconst {\n authStore,\n clientOptions,\n document,\n eventBus,\n isCollapsed,\n isWebhook,\n method,\n options,\n path,\n pathValue,\n securitySchemes,\n server,\n} = defineProps<OperationProps>()\n\n/**\n * Operation from the new workspace store, ensure we are de-reference\n *\n * Also adds in params from the pathItemObject\n */\nconst operation = computed(() => {\n const entity = getResolvedRef(pathValue?.[method])\n\n if (!entity) {\n return null\n }\n\n // Combine params from the pathItem and the operation\n const parameters = combineParams(pathValue?.parameters, entity.parameters)\n return { ...entity, parameters }\n})\n\n/**\n * Determine the effective server for the code examples.\n */\nconst selectedServer = computed<ServerObject | null>(() =>\n getFirstServer(\n // 1) Operation\n operation.value?.servers ?? null,\n // 2) Path Item\n pathValue?.servers ?? null,\n // 3) Document\n server,\n ),\n)\n\n/** We must ensure the selected security schemes are required on this operation */\nconst selectedSecuritySchemes = computed(() =>\n filterSelectedSecurity(\n document,\n operation.value,\n authStore.getAuthSelectedSchemas({\n type: 'document',\n documentName: document?.['x-scalar-navigation']?.name ?? '',\n }),\n authStore.getAuthSelectedSchemas({\n type: 'operation',\n documentName: document?.['x-scalar-navigation']?.name ?? '',\n path,\n method,\n }),\n securitySchemes,\n ),\n)\n</script>\n\n<template>\n <template v-if=\"operation\">\n <ClassicLayout\n v-if=\"options.layout === 'classic'\"\n :id\n :clientOptions\n :eventBus\n :isCollapsed\n :isWebhook\n :method\n :operation\n :options\n :path\n :selectedClient\n :selectedSecuritySchemes\n :selectedServer />\n <ModernLayout\n v-else\n :id\n :clientOptions\n :eventBus\n :isWebhook\n :method\n :operation\n :options\n :path\n :selectedClient\n :selectedSecuritySchemes\n :selectedServer />\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyFA,MAAM,YAAY,eAAe;GAC/B,MAAM,SAAS,eAAe,QAAA,YAAY,QAAA,QAAO;AAEjD,OAAI,CAAC,OACH,QAAO;GAIT,MAAM,aAAa,cAAc,QAAA,WAAW,YAAY,OAAO,WAAU;AACzE,UAAO;IAAE,GAAG;IAAQ;IAAW;IAChC;;;;EAKD,MAAM,iBAAiB,eACrB,eAEE,UAAU,OAAO,WAAW,MAE5B,QAAA,WAAW,WAAW,MAEtB,QAAA,OACD,CACH;;EAGA,MAAM,0BAA0B,eAC9B,uBACE,QAAA,UACA,UAAU,OACV,QAAA,UAAU,uBAAuB;GAC/B,MAAM;GACN,cAAc,QAAA,WAAW,wBAAwB,QAAQ;GAC1D,CAAC,EACF,QAAA,UAAU,uBAAuB;GAC/B,MAAM;GACN,cAAc,QAAA,WAAW,wBAAwB,QAAQ;GACzD,MAAG,QAAA;GACH,QAAK,QAAA;GACN,CAAC,EACF,QAAA,gBACD,CACH;;UAIkB,UAAA,SAAA,WAAA,EAAhB,mBA4BW,UAAA,EAAA,KAAA,GAAA,EAAA,CA1BD,QAAA,QAAQ,WAAM,aAAA,WAAA,EADtB,YAaoB,uBAAA;;IAXjB,IAAA,QAAA;IACA,eAAA,QAAA;IACA,UAAA,QAAA;IACA,aAAA,QAAA;IACA,WAAA,QAAA;IACA,QAAA,QAAA;IACA,WAAA,UAAA;IACA,SAAA,QAAA;IACA,MAAA,QAAA;IACA,gBAAA,QAAA;IACA,yBAAA,wBAAA;IACA,gBAAA,eAAA;;;;;;;;;;;;;;uBACH,YAYoB,sBAAA;;IAVjB,IAAA,QAAA;IACA,eAAA,QAAA;IACA,UAAA,QAAA;IACA,WAAA,QAAA;IACA,QAAA,QAAA;IACA,WAAA,UAAA;IACA,SAAA,QAAA;IACA,MAAA,QAAA;IACA,gBAAA,QAAA;IACA,yBAAA,wBAAA;IACA,gBAAA,eAAA"}
1
+ {"version":3,"file":"Operation.vue.script.js","names":[],"sources":["../../../src/features/Operation/Operation.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * References Operation \"block\"\n */\nexport default {}\n\nexport type OperationProps = {\n id: string\n method: HttpMethod\n /** The subset of the configuration object required for the operation component */\n options: Pick<\n ApiReferenceConfigurationRaw,\n | 'expandAllResponses'\n | 'hideModels'\n | 'hideTestRequestButton'\n | 'layout'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'showOperationId'\n >\n /** Document object */\n document: OpenApiDocument\n /** Key of the operations path in the document.paths object */\n path: string\n /** OpenAPI path object that will include the operation */\n pathValue: PathItemObject | undefined\n /** Currently selected server for the document */\n server: ServerObject | null\n /** The merged security schemes for the document and the authentication configuration */\n securitySchemes: MergedSecuritySchemes\n /** The http client options for the dropdown */\n clientOptions: ClientOptionGroup[]\n /** Whether the Classic layout operation is collapsed */\n isCollapsed: boolean\n /** Whether the operation is a webhook */\n isWebhook: boolean\n /** The currently selected client for the document */\n selectedClient: WorkspaceStore['workspace']['x-scalar-default-client']\n /** The event bus */\n eventBus: WorkspaceEventBus\n /** The auth store */\n authStore: AuthStore\n}\n</script>\n\n<script lang=\"ts\" setup>\nimport type { ClientOptionGroup } from '@scalar/api-client/blocks/operation-code-sample'\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport {\n combineParams,\n type MergedSecuritySchemes,\n} from '@scalar/workspace-store/request-example'\nimport type {\n OpenApiDocument,\n PathItemObject,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { filterSelectedSecurity } from '@/features/Operation/helpers/filter-selected-security'\n\nimport { getFirstServer } from './helpers/get-first-server'\nimport ClassicLayout from './layouts/ClassicLayout.vue'\nimport ModernLayout from './layouts/ModernLayout.vue'\n\nconst {\n authStore,\n clientOptions,\n document,\n eventBus,\n isCollapsed,\n isWebhook,\n method,\n options,\n path,\n pathValue,\n securitySchemes,\n server,\n} = defineProps<OperationProps>()\n\n/**\n * Operation from the new workspace store, ensure we are de-reference\n *\n * Also adds in params from the pathItemObject\n */\nconst operation = computed(() => {\n const entity = getResolvedRef(pathValue?.[method])\n\n if (!entity) {\n return null\n }\n\n // Combine params from the pathItem and the operation\n const parameters = combineParams(pathValue?.parameters, entity.parameters)\n return { ...entity, parameters }\n})\n\n/**\n * Determine the effective server for the code examples.\n */\nconst selectedServer = computed<ServerObject | null>(() =>\n getFirstServer(\n // 1) Operation\n operation.value?.servers ?? null,\n // 2) Path Item\n pathValue?.servers ?? null,\n // 3) Document\n server,\n ),\n)\n\n/** We must ensure the selected security schemes are required on this operation */\nconst selectedSecuritySchemes = computed(() =>\n filterSelectedSecurity(\n document,\n operation.value,\n authStore.getAuthSelectedSchemas({\n type: 'document',\n documentName: document?.['x-scalar-navigation']?.name ?? '',\n }),\n authStore.getAuthSelectedSchemas({\n type: 'operation',\n documentName: document?.['x-scalar-navigation']?.name ?? '',\n path,\n method,\n }),\n securitySchemes,\n ),\n)\n</script>\n\n<template>\n <template v-if=\"operation\">\n <ClassicLayout\n v-if=\"options.layout === 'classic'\"\n :id\n :clientOptions\n :eventBus\n :isCollapsed\n :isWebhook\n :method\n :operation\n :options\n :path\n :selectedClient\n :selectedSecuritySchemes\n :selectedServer />\n <ModernLayout\n v-else\n :id\n :clientOptions\n :eventBus\n :isWebhook\n :method\n :operation\n :options\n :path\n :selectedClient\n :selectedSecuritySchemes\n :selectedServer />\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0FA,MAAM,YAAY,eAAe;GAC/B,MAAM,SAAS,eAAe,QAAA,YAAY,QAAA,QAAO;AAEjD,OAAI,CAAC,OACH,QAAO;GAIT,MAAM,aAAa,cAAc,QAAA,WAAW,YAAY,OAAO,WAAU;AACzE,UAAO;IAAE,GAAG;IAAQ;IAAW;IAChC;;;;EAKD,MAAM,iBAAiB,eACrB,eAEE,UAAU,OAAO,WAAW,MAE5B,QAAA,WAAW,WAAW,MAEtB,QAAA,OACD,CACH;;EAGA,MAAM,0BAA0B,eAC9B,uBACE,QAAA,UACA,UAAU,OACV,QAAA,UAAU,uBAAuB;GAC/B,MAAM;GACN,cAAc,QAAA,WAAW,wBAAwB,QAAQ;GAC1D,CAAC,EACF,QAAA,UAAU,uBAAuB;GAC/B,MAAM;GACN,cAAc,QAAA,WAAW,wBAAwB,QAAQ;GACzD,MAAG,QAAA;GACH,QAAK,QAAA;GACN,CAAC,EACF,QAAA,gBACD,CACH;;UAIkB,UAAA,SAAA,WAAA,EAAhB,mBA4BW,UAAA,EAAA,KAAA,GAAA,EAAA,CA1BD,QAAA,QAAQ,WAAM,aAAA,WAAA,EADtB,YAaoB,uBAAA;;IAXjB,IAAA,QAAA;IACA,eAAA,QAAA;IACA,UAAA,QAAA;IACA,aAAA,QAAA;IACA,WAAA,QAAA;IACA,QAAA,QAAA;IACA,WAAA,UAAA;IACA,SAAA,QAAA;IACA,MAAA,QAAA;IACA,gBAAA,QAAA;IACA,yBAAA,wBAAA;IACA,gBAAA,eAAA;;;;;;;;;;;;;;uBACH,YAYoB,sBAAA;;IAVjB,IAAA,QAAA;IACA,eAAA,QAAA;IACA,UAAA,QAAA;IACA,WAAA,QAAA;IACA,QAAA,QAAA;IACA,WAAA,UAAA;IACA,SAAA,QAAA;IACA,MAAA,QAAA;IACA,gBAAA,QAAA;IACA,yBAAA,wBAAA;IACA,gBAAA,eAAA"}
@@ -6,7 +6,7 @@ type __VLS_Props = {
6
6
  parameters?: ReferenceType<ParameterObject>[];
7
7
  requestBody?: RequestBodyObject | undefined;
8
8
  eventBus: WorkspaceEventBus | null;
9
- options: Pick<OperationProps['options'], 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'>;
9
+ options: Pick<OperationProps['options'], 'hideModels' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'>;
10
10
  };
11
11
  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>;
12
12
  declare const _default: typeof __VLS_export;
@@ -1 +1 @@
1
- {"version":3,"file":"OperationParameters.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationParameters.vue"],"names":[],"mappings":"AAgGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,iBAAiB,EAClB,MAAM,8DAA8D,CAAA;AAGrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAKxE,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,UAAU,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,EAAE,CAAA;IAC7C,WAAW,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAA;IAC3C,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,IAAI,CACX,cAAc,CAAC,SAAS,CAAC,EACzB,8BAA8B,GAAG,yBAAyB,CAC3D,CAAA;CACF,CAAC;AA8JF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"OperationParameters.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationParameters.vue"],"names":[],"mappings":"AA+FA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,iBAAiB,EAClB,MAAM,8DAA8D,CAAA;AAIrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAKxE,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,UAAU,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,EAAE,CAAA;IAC7C,WAAW,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAA;IAC3C,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,IAAI,CACX,cAAc,CAAC,SAAS,CAAC,EACzB,YAAY,GAAG,8BAA8B,GAAG,yBAAyB,CAC1E,CAAA;CACF,CAAC;AA8JF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"OperationParameters.vue.js","names":[],"sources":["../../../../src/features/Operation/components/OperationParameters.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { shouldIgnoreEntity } from '@scalar/oas-utils/helpers'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n ParameterObject,\n ReferenceType,\n RequestBodyObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport ParameterList from './ParameterList.vue'\nimport RequestBody from './RequestBody.vue'\n\nconst { parameters = [], requestBody } = defineProps<{\n breadcrumb?: string[]\n parameters?: ReferenceType<ParameterObject>[]\n requestBody?: RequestBodyObject | undefined\n eventBus: WorkspaceEventBus | null\n options: Pick<\n OperationProps['options'],\n 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'\n >\n}>()\n\n/** Use a single loop to reduce parameters by type(in) */\nconst splitParameters = computed(() =>\n (parameters ?? []).reduce(\n (acc, p) => {\n const parameter = getResolvedRef(p)\n // Filter out ignored parameters\n if (!shouldIgnoreEntity(parameter)) {\n acc[parameter.in].push(parameter)\n }\n return acc\n },\n { cookie: [], header: [], path: [], query: [] } as Record<\n 'cookie' | 'header' | 'path' | 'query',\n ParameterObject[]\n >,\n ),\n)\n</script>\n<template>\n <!-- Path parameters-->\n <ParameterList\n :breadcrumb=\"breadcrumb ? [...breadcrumb, 'path'] : undefined\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :parameters=\"splitParameters['path']\">\n <template #title>Path Parameters</template>\n </ParameterList>\n\n <!-- Query parameters -->\n <ParameterList\n :breadcrumb=\"breadcrumb ? [...breadcrumb, 'query'] : undefined\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :parameters=\"splitParameters['query']\">\n <template #title>Query Parameters</template>\n </ParameterList>\n\n <!-- Headers -->\n <ParameterList\n :breadcrumb=\"breadcrumb ? [...breadcrumb, 'headers'] : undefined\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :parameters=\"splitParameters['header']\">\n <template #title>Headers</template>\n </ParameterList>\n\n <!-- Cookies -->\n <ParameterList\n :breadcrumb=\"breadcrumb ? [...breadcrumb, 'cookies'] : undefined\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :parameters=\"splitParameters['cookie']\">\n <template #title>Cookies</template>\n </ParameterList>\n\n <!-- Request body -->\n <RequestBody\n v-if=\"requestBody\"\n :breadcrumb=\"breadcrumb ? [...breadcrumb, 'body'] : undefined\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :requestBody=\"requestBody\">\n <template #title>Body</template>\n </RequestBody>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"OperationParameters.vue.js","names":[],"sources":["../../../../src/features/Operation/components/OperationParameters.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n ParameterObject,\n ReferenceType,\n RequestBodyObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { shouldIgnoreEntity } from '@/features/Operation/helpers/should-ignore-entity'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport ParameterList from './ParameterList.vue'\nimport RequestBody from './RequestBody.vue'\n\nconst { parameters = [], requestBody } = defineProps<{\n breadcrumb?: string[]\n parameters?: ReferenceType<ParameterObject>[]\n requestBody?: RequestBodyObject | undefined\n eventBus: WorkspaceEventBus | null\n options: Pick<\n OperationProps['options'],\n 'hideModels' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'\n >\n}>()\n\n/** Use a single loop to reduce parameters by type(in) */\nconst splitParameters = computed(() =>\n (parameters ?? []).reduce(\n (acc, p) => {\n const parameter = getResolvedRef(p)\n // Filter out ignored parameters\n if (!shouldIgnoreEntity(parameter)) {\n acc[parameter.in].push(parameter)\n }\n return acc\n },\n { cookie: [], header: [], path: [], query: [] } as Record<\n 'cookie' | 'header' | 'path' | 'query',\n ParameterObject[]\n >,\n ),\n)\n</script>\n<template>\n <!-- Path parameters-->\n <ParameterList\n :breadcrumb=\"breadcrumb ? [...breadcrumb, 'path'] : undefined\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :parameters=\"splitParameters['path']\">\n <template #title>Path Parameters</template>\n </ParameterList>\n\n <!-- Query parameters -->\n <ParameterList\n :breadcrumb=\"breadcrumb ? [...breadcrumb, 'query'] : undefined\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :parameters=\"splitParameters['query']\">\n <template #title>Query Parameters</template>\n </ParameterList>\n\n <!-- Headers -->\n <ParameterList\n :breadcrumb=\"breadcrumb ? [...breadcrumb, 'headers'] : undefined\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :parameters=\"splitParameters['header']\">\n <template #title>Headers</template>\n </ParameterList>\n\n <!-- Cookies -->\n <ParameterList\n :breadcrumb=\"breadcrumb ? [...breadcrumb, 'cookies'] : undefined\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :parameters=\"splitParameters['cookie']\">\n <template #title>Cookies</template>\n </ParameterList>\n\n <!-- Request body -->\n <RequestBody\n v-if=\"requestBody\"\n :breadcrumb=\"breadcrumb ? [...breadcrumb, 'body'] : undefined\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :requestBody=\"requestBody\">\n <template #title>Body</template>\n </RequestBody>\n</template>\n"],"mappings":""}
@@ -1,7 +1,7 @@
1
+ import { shouldIgnoreEntity } from "../helpers/should-ignore-entity.js";
1
2
  import ParameterList_default from "./ParameterList.vue.js";
2
3
  import RequestBody_default from "./RequestBody.vue.js";
3
4
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createTextVNode, createVNode, defineComponent, openBlock, withCtx } from "vue";
4
- import { shouldIgnoreEntity } from "@scalar/oas-utils/helpers";
5
5
  import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
6
6
  //#region src/features/Operation/components/OperationParameters.vue?vue&type=script&setup=true&lang.ts
7
7
  var OperationParameters_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
@@ -1 +1 @@
1
- {"version":3,"file":"OperationParameters.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/OperationParameters.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { shouldIgnoreEntity } from '@scalar/oas-utils/helpers'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n ParameterObject,\n ReferenceType,\n RequestBodyObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport ParameterList from './ParameterList.vue'\nimport RequestBody from './RequestBody.vue'\n\nconst { parameters = [], requestBody } = defineProps<{\n breadcrumb?: string[]\n parameters?: ReferenceType<ParameterObject>[]\n requestBody?: RequestBodyObject | undefined\n eventBus: WorkspaceEventBus | null\n options: Pick<\n OperationProps['options'],\n 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'\n >\n}>()\n\n/** Use a single loop to reduce parameters by type(in) */\nconst splitParameters = computed(() =>\n (parameters ?? []).reduce(\n (acc, p) => {\n const parameter = getResolvedRef(p)\n // Filter out ignored parameters\n if (!shouldIgnoreEntity(parameter)) {\n acc[parameter.in].push(parameter)\n }\n return acc\n },\n { cookie: [], header: [], path: [], query: [] } as Record<\n 'cookie' | 'header' | 'path' | 'query',\n ParameterObject[]\n >,\n ),\n)\n</script>\n<template>\n <!-- Path parameters-->\n <ParameterList\n :breadcrumb=\"breadcrumb ? [...breadcrumb, 'path'] : undefined\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :parameters=\"splitParameters['path']\">\n <template #title>Path Parameters</template>\n </ParameterList>\n\n <!-- Query parameters -->\n <ParameterList\n :breadcrumb=\"breadcrumb ? [...breadcrumb, 'query'] : undefined\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :parameters=\"splitParameters['query']\">\n <template #title>Query Parameters</template>\n </ParameterList>\n\n <!-- Headers -->\n <ParameterList\n :breadcrumb=\"breadcrumb ? [...breadcrumb, 'headers'] : undefined\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :parameters=\"splitParameters['header']\">\n <template #title>Headers</template>\n </ParameterList>\n\n <!-- Cookies -->\n <ParameterList\n :breadcrumb=\"breadcrumb ? [...breadcrumb, 'cookies'] : undefined\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :parameters=\"splitParameters['cookie']\">\n <template #title>Cookies</template>\n </ParameterList>\n\n <!-- Request body -->\n <RequestBody\n v-if=\"requestBody\"\n :breadcrumb=\"breadcrumb ? [...breadcrumb, 'body'] : undefined\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :requestBody=\"requestBody\">\n <template #title>Body</template>\n </RequestBody>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;EA4BA,MAAM,kBAAkB,gBACrB,QAAA,cAAc,EAAE,EAAE,QAChB,KAAK,MAAM;GACV,MAAM,YAAY,eAAe,EAAC;AAElC,OAAI,CAAC,mBAAmB,UAAU,CAChC,KAAI,UAAU,IAAI,KAAK,UAAS;AAElC,UAAO;KAET;GAAE,QAAQ,EAAE;GAAE,QAAQ,EAAE;GAAE,MAAM,EAAE;GAAE,OAAO,EAAE;GAAE,CAIhD,CACH;;;IAIE,YAMgB,uBAAA;KALb,YAAY,QAAA,aAAU,CAAA,GAAO,QAAA,YAAU,OAAA,GAAY,KAAA;KACnD,UAAU,QAAA;KACV,SAAS,QAAA;KACT,YAAY,gBAAA,MAAe;;KACjB,OAAK,cAAgB,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAf,mBAAe,GAAA,CAAA,EAAA,CAAA;;;;;;;;IAIlC,YAMgB,uBAAA;KALb,YAAY,QAAA,aAAU,CAAA,GAAO,QAAA,YAAU,QAAA,GAAa,KAAA;KACpD,UAAU,QAAA;KACV,SAAS,QAAA;KACT,YAAY,gBAAA,MAAe;;KACjB,OAAK,cAAiB,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAhB,oBAAgB,GAAA,CAAA,EAAA,CAAA;;;;;;;;IAInC,YAMgB,uBAAA;KALb,YAAY,QAAA,aAAU,CAAA,GAAO,QAAA,YAAU,UAAA,GAAe,KAAA;KACtD,UAAU,QAAA;KACV,SAAS,QAAA;KACT,YAAY,gBAAA,MAAe;;KACjB,OAAK,cAAQ,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAP,WAAO,GAAA,CAAA,EAAA,CAAA;;;;;;;;IAI1B,YAMgB,uBAAA;KALb,YAAY,QAAA,aAAU,CAAA,GAAO,QAAA,YAAU,UAAA,GAAe,KAAA;KACtD,UAAU,QAAA;KACV,SAAS,QAAA;KACT,YAAY,gBAAA,MAAe;;KACjB,OAAK,cAAQ,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAP,WAAO,GAAA,CAAA,EAAA,CAAA;;;;;;;;IAKlB,QAAA,eAAA,WAAA,EADR,YAOc,qBAAA;;KALX,YAAY,QAAA,aAAU,CAAA,GAAO,QAAA,YAAU,OAAA,GAAY,KAAA;KACnD,UAAU,QAAA;KACV,SAAS,QAAA;KACT,aAAa,QAAA;;KACH,OAAK,cAAK,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAJ,QAAI,GAAA,CAAA,EAAA,CAAA"}
1
+ {"version":3,"file":"OperationParameters.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/OperationParameters.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n ParameterObject,\n ReferenceType,\n RequestBodyObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { shouldIgnoreEntity } from '@/features/Operation/helpers/should-ignore-entity'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport ParameterList from './ParameterList.vue'\nimport RequestBody from './RequestBody.vue'\n\nconst { parameters = [], requestBody } = defineProps<{\n breadcrumb?: string[]\n parameters?: ReferenceType<ParameterObject>[]\n requestBody?: RequestBodyObject | undefined\n eventBus: WorkspaceEventBus | null\n options: Pick<\n OperationProps['options'],\n 'hideModels' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'\n >\n}>()\n\n/** Use a single loop to reduce parameters by type(in) */\nconst splitParameters = computed(() =>\n (parameters ?? []).reduce(\n (acc, p) => {\n const parameter = getResolvedRef(p)\n // Filter out ignored parameters\n if (!shouldIgnoreEntity(parameter)) {\n acc[parameter.in].push(parameter)\n }\n return acc\n },\n { cookie: [], header: [], path: [], query: [] } as Record<\n 'cookie' | 'header' | 'path' | 'query',\n ParameterObject[]\n >,\n ),\n)\n</script>\n<template>\n <!-- Path parameters-->\n <ParameterList\n :breadcrumb=\"breadcrumb ? [...breadcrumb, 'path'] : undefined\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :parameters=\"splitParameters['path']\">\n <template #title>Path Parameters</template>\n </ParameterList>\n\n <!-- Query parameters -->\n <ParameterList\n :breadcrumb=\"breadcrumb ? [...breadcrumb, 'query'] : undefined\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :parameters=\"splitParameters['query']\">\n <template #title>Query Parameters</template>\n </ParameterList>\n\n <!-- Headers -->\n <ParameterList\n :breadcrumb=\"breadcrumb ? [...breadcrumb, 'headers'] : undefined\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :parameters=\"splitParameters['header']\">\n <template #title>Headers</template>\n </ParameterList>\n\n <!-- Cookies -->\n <ParameterList\n :breadcrumb=\"breadcrumb ? [...breadcrumb, 'cookies'] : undefined\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :parameters=\"splitParameters['cookie']\">\n <template #title>Cookies</template>\n </ParameterList>\n\n <!-- Request body -->\n <RequestBody\n v-if=\"requestBody\"\n :breadcrumb=\"breadcrumb ? [...breadcrumb, 'body'] : undefined\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :requestBody=\"requestBody\">\n <template #title>Body</template>\n </RequestBody>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;EA4BA,MAAM,kBAAkB,gBACrB,QAAA,cAAc,EAAE,EAAE,QAChB,KAAK,MAAM;GACV,MAAM,YAAY,eAAe,EAAC;AAElC,OAAI,CAAC,mBAAmB,UAAU,CAChC,KAAI,UAAU,IAAI,KAAK,UAAS;AAElC,UAAO;KAET;GAAE,QAAQ,EAAE;GAAE,QAAQ,EAAE;GAAE,MAAM,EAAE;GAAE,OAAO,EAAE;GAAE,CAIhD,CACH;;;IAIE,YAMgB,uBAAA;KALb,YAAY,QAAA,aAAU,CAAA,GAAO,QAAA,YAAU,OAAA,GAAY,KAAA;KACnD,UAAU,QAAA;KACV,SAAS,QAAA;KACT,YAAY,gBAAA,MAAe;;KACjB,OAAK,cAAgB,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAf,mBAAe,GAAA,CAAA,EAAA,CAAA;;;;;;;;IAIlC,YAMgB,uBAAA;KALb,YAAY,QAAA,aAAU,CAAA,GAAO,QAAA,YAAU,QAAA,GAAa,KAAA;KACpD,UAAU,QAAA;KACV,SAAS,QAAA;KACT,YAAY,gBAAA,MAAe;;KACjB,OAAK,cAAiB,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAhB,oBAAgB,GAAA,CAAA,EAAA,CAAA;;;;;;;;IAInC,YAMgB,uBAAA;KALb,YAAY,QAAA,aAAU,CAAA,GAAO,QAAA,YAAU,UAAA,GAAe,KAAA;KACtD,UAAU,QAAA;KACV,SAAS,QAAA;KACT,YAAY,gBAAA,MAAe;;KACjB,OAAK,cAAQ,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAP,WAAO,GAAA,CAAA,EAAA,CAAA;;;;;;;;IAI1B,YAMgB,uBAAA;KALb,YAAY,QAAA,aAAU,CAAA,GAAO,QAAA,YAAU,UAAA,GAAe,KAAA;KACtD,UAAU,QAAA;KACV,SAAS,QAAA;KACT,YAAY,gBAAA,MAAe;;KACjB,OAAK,cAAQ,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAP,WAAO,GAAA,CAAA,EAAA,CAAA;;;;;;;;IAKlB,QAAA,eAAA,WAAA,EADR,YAOc,qBAAA;;KALX,YAAY,QAAA,aAAU,CAAA,GAAO,QAAA,YAAU,OAAA,GAAY,KAAA;KACnD,UAAU,QAAA;KACV,SAAS,QAAA;KACT,aAAa,QAAA;;KACH,OAAK,cAAK,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAJ,QAAI,GAAA,CAAA,EAAA,CAAA"}
@@ -6,7 +6,7 @@ type __VLS_Props = {
6
6
  breadcrumb?: string[];
7
7
  collapsableItems?: boolean;
8
8
  eventBus: WorkspaceEventBus | null;
9
- options: Pick<OperationProps['options'], 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'>;
9
+ options: Pick<OperationProps['options'], 'hideModels' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'>;
10
10
  };
11
11
  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>;
12
12
  declare const _default: typeof __VLS_export;
@@ -1 +1 @@
1
- {"version":3,"file":"OperationResponses.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationResponses.vue"],"names":[],"mappings":"AA2CA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAEnG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAIxE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,CAAC,WAAW,CAAC,CAAA;IACvC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,IAAI,CACX,cAAc,CAAC,SAAS,CAAC,EACzB,8BAA8B,GAAG,yBAAyB,CAC3D,CAAA;CACF,CAAC;AAuEF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"OperationResponses.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationResponses.vue"],"names":[],"mappings":"AA2CA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAEnG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAIxE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,CAAC,WAAW,CAAC,CAAA;IACvC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,IAAI,CACX,cAAc,CAAC,SAAS,CAAC,EACzB,YAAY,GAAG,8BAA8B,GAAG,yBAAyB,CAC1E,CAAA;CACF,CAAC;AAuEF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"OperationResponses.vue.js","names":[],"sources":["../../../../src/features/Operation/components/OperationResponses.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport ParameterListItem from './ParameterListItem.vue'\n\nconst { responses } = defineProps<{\n responses: OperationObject['responses']\n breadcrumb?: string[]\n collapsableItems?: boolean\n eventBus: WorkspaceEventBus | null\n options: Pick<\n OperationProps['options'],\n 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'\n >\n}>()\n</script>\n<template>\n <div\n v-if=\"Object.keys(responses ?? {}).length\"\n class=\"mt-6\">\n <div class=\"text-c-1 mt-3 mb-3 leading-[1.45] font-medium\">Responses</div>\n <ul\n aria-label=\"Responses\"\n class=\"mb-3 list-none p-0 text-sm\">\n <ParameterListItem\n v-for=\"(response, status) in responses\"\n :key=\"status\"\n :breadcrumb\n :collapsableItems\n :eventBus\n :name=\"status\"\n :options\n :parameter=\"getResolvedRef(response)\" />\n </ul>\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"OperationResponses.vue.js","names":[],"sources":["../../../../src/features/Operation/components/OperationResponses.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport ParameterListItem from './ParameterListItem.vue'\n\nconst { responses } = defineProps<{\n responses: OperationObject['responses']\n breadcrumb?: string[]\n collapsableItems?: boolean\n eventBus: WorkspaceEventBus | null\n options: Pick<\n OperationProps['options'],\n 'hideModels' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'\n >\n}>()\n</script>\n<template>\n <div\n v-if=\"Object.keys(responses ?? {}).length\"\n class=\"mt-6\">\n <div class=\"text-c-1 mt-3 mb-3 leading-[1.45] font-medium\">Responses</div>\n <ul\n aria-label=\"Responses\"\n class=\"mb-3 list-none p-0 text-sm\">\n <ParameterListItem\n v-for=\"(response, status) in responses\"\n :key=\"status\"\n :breadcrumb\n :collapsableItems\n :eventBus\n :name=\"status\"\n :options\n :parameter=\"getResolvedRef(response)\" />\n </ul>\n </div>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"OperationResponses.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/OperationResponses.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport ParameterListItem from './ParameterListItem.vue'\n\nconst { responses } = defineProps<{\n responses: OperationObject['responses']\n breadcrumb?: string[]\n collapsableItems?: boolean\n eventBus: WorkspaceEventBus | null\n options: Pick<\n OperationProps['options'],\n 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'\n >\n}>()\n</script>\n<template>\n <div\n v-if=\"Object.keys(responses ?? {}).length\"\n class=\"mt-6\">\n <div class=\"text-c-1 mt-3 mb-3 leading-[1.45] font-medium\">Responses</div>\n <ul\n aria-label=\"Responses\"\n class=\"mb-3 list-none p-0 text-sm\">\n <ParameterListItem\n v-for=\"(response, status) in responses\"\n :key=\"status\"\n :breadcrumb\n :collapsableItems\n :eventBus\n :name=\"status\"\n :options\n :parameter=\"getResolvedRef(response)\" />\n </ul>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;UAsBU,OAAO,KAAK,QAAA,aAAS,EAAA,CAAA,CAAQ,UAAA,WAAA,EADrC,mBAiBM,OAjBN,YAiBM,CAAA,OAAA,OAAA,OAAA,KAdJ,mBAA0E,OAAA,EAArE,OAAM,iDAA+C,EAAC,aAAS,GAAA,GACpE,mBAYK,MAZL,YAYK,EAAA,UAAA,KAAA,EATH,mBAQ0C,UAAA,MAAA,WAPX,QAAA,YAArB,UAAU,WAAM;wBAD1B,YAQ0C,2BAAA;KANvC,KAAK;KACL,YAAA,QAAA;KACA,kBAAA,QAAA;KACA,UAAA,QAAA;KACA,MAAM;KACN,SAAA,QAAA;KACA,WAAW,MAAA,eAAc,CAAC,SAAQ"}
1
+ {"version":3,"file":"OperationResponses.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/OperationResponses.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport ParameterListItem from './ParameterListItem.vue'\n\nconst { responses } = defineProps<{\n responses: OperationObject['responses']\n breadcrumb?: string[]\n collapsableItems?: boolean\n eventBus: WorkspaceEventBus | null\n options: Pick<\n OperationProps['options'],\n 'hideModels' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'\n >\n}>()\n</script>\n<template>\n <div\n v-if=\"Object.keys(responses ?? {}).length\"\n class=\"mt-6\">\n <div class=\"text-c-1 mt-3 mb-3 leading-[1.45] font-medium\">Responses</div>\n <ul\n aria-label=\"Responses\"\n class=\"mb-3 list-none p-0 text-sm\">\n <ParameterListItem\n v-for=\"(response, status) in responses\"\n :key=\"status\"\n :breadcrumb\n :collapsableItems\n :eventBus\n :name=\"status\"\n :options\n :parameter=\"getResolvedRef(response)\" />\n </ul>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;UAsBU,OAAO,KAAK,QAAA,aAAS,EAAA,CAAA,CAAQ,UAAA,WAAA,EADrC,mBAiBM,OAjBN,YAiBM,CAAA,OAAA,OAAA,OAAA,KAdJ,mBAA0E,OAAA,EAArE,OAAM,iDAA+C,EAAC,aAAS,GAAA,GACpE,mBAYK,MAZL,YAYK,EAAA,UAAA,KAAA,EATH,mBAQ0C,UAAA,MAAA,WAPX,QAAA,YAArB,UAAU,WAAM;wBAD1B,YAQ0C,2BAAA;KANvC,KAAK;KACL,YAAA,QAAA;KACA,kBAAA,QAAA;KACA,UAAA,QAAA;KACA,MAAM;KACN,SAAA,QAAA;KACA,WAAW,MAAA,eAAc,CAAC,SAAQ"}
@@ -6,7 +6,7 @@ type __VLS_Props = {
6
6
  breadcrumb?: string[];
7
7
  eventBus: WorkspaceEventBus | null;
8
8
  collapsableItems?: boolean;
9
- options: Pick<OperationProps['options'], 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'>;
9
+ options: Pick<OperationProps['options'], 'hideModels' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'>;
10
10
  };
11
11
  declare var __VLS_1: {};
12
12
  type __VLS_Slots = {} & {
@@ -1 +1 @@
1
- {"version":3,"file":"ParameterList.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterList.vue"],"names":[],"mappings":"AAkDA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAGnG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAIxE,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,eAAe,EAAE,CAAA;IAC7B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,EAAE,IAAI,CACX,cAAc,CAAC,SAAS,CAAC,EACzB,8BAA8B,GAAG,yBAAyB,CAC3D,CAAA;CACF,CAAC;AA2EF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK7C,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":"ParameterList.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterList.vue"],"names":[],"mappings":"AAkDA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAGnG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAIxE,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,eAAe,EAAE,CAAA;IAC7B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,EAAE,IAAI,CACX,cAAc,CAAC,SAAS,CAAC,EACzB,YAAY,GAAG,8BAA8B,GAAG,yBAAyB,CAC1E,CAAA;CACF,CAAC;AA2EF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK7C,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 +1 @@
1
- {"version":3,"file":"ParameterList.vue.js","names":[],"sources":["../../../../src/features/Operation/components/ParameterList.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { useId } from 'vue'\n\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport ParameterListItem from './ParameterListItem.vue'\n\nconst { parameters } = defineProps<{\n parameters: ParameterObject[]\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n collapsableItems?: boolean\n options: Pick<\n OperationProps['options'],\n 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'\n >\n}>()\n\n/** Accessible id for the heading */\nconst id = useId()\n</script>\n<template>\n <div\n v-if=\"parameters?.length\"\n class=\"mt-6\">\n <div\n :id\n class=\"text-c-1 mt-3 mb-3 text-lg leading-[1.45] font-medium\">\n <slot name=\"title\" />\n </div>\n <ul\n :aria-labelledby=\"id\"\n class=\"mb-3 list-none p-0 text-sm\">\n <ParameterListItem\n v-for=\"item in parameters\"\n :key=\"item.name\"\n :breadcrumb=\"breadcrumb\"\n :collapsableItems\n :eventBus=\"eventBus\"\n :name=\"item.name\"\n :options=\"options\"\n :parameter=\"item\" />\n </ul>\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ParameterList.vue.js","names":[],"sources":["../../../../src/features/Operation/components/ParameterList.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { useId } from 'vue'\n\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport ParameterListItem from './ParameterListItem.vue'\n\nconst { parameters } = defineProps<{\n parameters: ParameterObject[]\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n collapsableItems?: boolean\n options: Pick<\n OperationProps['options'],\n 'hideModels' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'\n >\n}>()\n\n/** Accessible id for the heading */\nconst id = useId()\n</script>\n<template>\n <div\n v-if=\"parameters?.length\"\n class=\"mt-6\">\n <div\n :id\n class=\"text-c-1 mt-3 mb-3 text-lg leading-[1.45] font-medium\">\n <slot name=\"title\" />\n </div>\n <ul\n :aria-labelledby=\"id\"\n class=\"mb-3 list-none p-0 text-sm\">\n <ParameterListItem\n v-for=\"item in parameters\"\n :key=\"item.name\"\n :breadcrumb=\"breadcrumb\"\n :collapsableItems\n :eventBus=\"eventBus\"\n :name=\"item.name\"\n :options=\"options\"\n :parameter=\"item\" />\n </ul>\n </div>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"ParameterList.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/ParameterList.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { useId } from 'vue'\n\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport ParameterListItem from './ParameterListItem.vue'\n\nconst { parameters } = defineProps<{\n parameters: ParameterObject[]\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n collapsableItems?: boolean\n options: Pick<\n OperationProps['options'],\n 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'\n >\n}>()\n\n/** Accessible id for the heading */\nconst id = useId()\n</script>\n<template>\n <div\n v-if=\"parameters?.length\"\n class=\"mt-6\">\n <div\n :id\n class=\"text-c-1 mt-3 mb-3 text-lg leading-[1.45] font-medium\">\n <slot name=\"title\" />\n </div>\n <ul\n :aria-labelledby=\"id\"\n class=\"mb-3 list-none p-0 text-sm\">\n <ParameterListItem\n v-for=\"item in parameters\"\n :key=\"item.name\"\n :breadcrumb=\"breadcrumb\"\n :collapsableItems\n :eventBus=\"eventBus\"\n :name=\"item.name\"\n :options=\"options\"\n :parameter=\"item\" />\n </ul>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAqBA,MAAM,KAAK,OAAM;;UAIP,QAAA,YAAY,UAAA,WAAA,EADpB,mBAqBM,OArBN,YAqBM,CAlBJ,mBAIM,OAAA;IAHH,IAAA,MAAA,GAAE;IACH,OAAM;OACN,WAAqB,KAAA,QAAA,QAAA,CAAA,EAAA,GAAA,WAAA,EAEvB,mBAYK,MAAA;IAXF,mBAAiB,MAAA,GAAE;IACpB,OAAM;yBACN,mBAQsB,UAAA,MAAA,WAPL,QAAA,aAAR,SAAI;wBADb,YAQsB,2BAAA;KANnB,KAAK,KAAK;KACV,YAAY,QAAA;KACZ,kBAAA,QAAA;KACA,UAAU,QAAA;KACV,MAAM,KAAK;KACX,SAAS,QAAA;KACT,WAAW"}
1
+ {"version":3,"file":"ParameterList.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/ParameterList.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { useId } from 'vue'\n\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport ParameterListItem from './ParameterListItem.vue'\n\nconst { parameters } = defineProps<{\n parameters: ParameterObject[]\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n collapsableItems?: boolean\n options: Pick<\n OperationProps['options'],\n 'hideModels' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'\n >\n}>()\n\n/** Accessible id for the heading */\nconst id = useId()\n</script>\n<template>\n <div\n v-if=\"parameters?.length\"\n class=\"mt-6\">\n <div\n :id\n class=\"text-c-1 mt-3 mb-3 text-lg leading-[1.45] font-medium\">\n <slot name=\"title\" />\n </div>\n <ul\n :aria-labelledby=\"id\"\n class=\"mb-3 list-none p-0 text-sm\">\n <ParameterListItem\n v-for=\"item in parameters\"\n :key=\"item.name\"\n :breadcrumb=\"breadcrumb\"\n :collapsableItems\n :eventBus=\"eventBus\"\n :name=\"item.name\"\n :options=\"options\"\n :parameter=\"item\" />\n </ul>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAqBA,MAAM,KAAK,OAAM;;UAIP,QAAA,YAAY,UAAA,WAAA,EADpB,mBAqBM,OArBN,YAqBM,CAlBJ,mBAIM,OAAA;IAHH,IAAA,MAAA,GAAE;IACH,OAAM;OACN,WAAqB,KAAA,QAAA,QAAA,CAAA,EAAA,GAAA,WAAA,EAEvB,mBAYK,MAAA;IAXF,mBAAiB,MAAA,GAAE;IACpB,OAAM;yBACN,mBAQsB,UAAA,MAAA,WAPL,QAAA,aAAR,SAAI;wBADb,YAQsB,2BAAA;KANnB,KAAK,KAAK;KACV,YAAY,QAAA;KACZ,kBAAA,QAAA;KACA,UAAU,QAAA;KACV,MAAM,KAAK;KACX,SAAS,QAAA;KACT,WAAW"}
@@ -7,7 +7,7 @@ type __VLS_Props = {
7
7
  breadcrumb?: string[];
8
8
  eventBus: WorkspaceEventBus | null;
9
9
  collapsableItems?: boolean;
10
- options: Pick<OperationProps['options'], 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'>;
10
+ options: Pick<OperationProps['options'], 'hideModels' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'>;
11
11
  };
12
12
  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>;
13
13
  declare const _default: typeof __VLS_export;
@@ -1 +1 @@
1
- {"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"AA+UA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAEf,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAKxE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,GAAG,cAAc,CAAA;IAC3C,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,EAAE,IAAI,CACX,cAAc,CAAC,SAAS,CAAC,EACzB,8BAA8B,GAAG,yBAAyB,CAC3D,CAAA;CACF,CAAC;AAgZF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"AA+UA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAEf,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAKxE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,GAAG,cAAc,CAAA;IAC3C,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,EAAE,IAAI,CACX,cAAc,CAAC,SAAS,CAAC,EACzB,YAAY,GAAG,8BAA8B,GAAG,yBAAyB,CAC1E,CAAA;CACF,CAAC;AAgZF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
2
2
  import ParameterListItem_vue_vue_type_script_setup_true_lang_default from "./ParameterListItem.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/features/Operation/components/ParameterListItem.vue
5
- var ParameterListItem_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ParameterListItem_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-1f06a780"]]);
5
+ var ParameterListItem_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ParameterListItem_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-193ffce1"]]);
6
6
  //#endregion
7
7
  export { ParameterListItem_default as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"ParameterListItem.vue.js","names":[],"sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/vue'\nimport {\n ScalarMarkdown,\n ScalarMarkdownSummary,\n ScalarWrappingText,\n} from '@scalar/components'\nimport { ScalarIconCaretRight } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n ParameterObject,\n ResponseObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, ref } from 'vue'\n\nimport { getRefName } from '@/components/Content/Schema/helpers/get-ref-name'\nimport SchemaProperty from '@/components/Content/Schema/SchemaProperty.vue'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport ContentTypeSelect from './ContentTypeSelect.vue'\nimport Headers from './Headers.vue'\n\nconst { name, parameter, options, collapsableItems } = defineProps<{\n parameter: ParameterObject | ResponseObject\n name: string\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n collapsableItems?: boolean\n options: Pick<\n OperationProps['options'],\n 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'\n >\n}>()\n\n/** Whether the markdown summary is being truncated */\nconst truncated = ref(false)\n\n/** Responses and params may both have a schema */\nconst schema = computed<SchemaObject | null>(() =>\n 'schema' in parameter && parameter.schema\n ? getResolvedRef(parameter.schema)\n : null,\n)\n\n/** Response and params may both have content */\nconst content = computed(() => {\n if (!('content' in parameter) || !parameter.content) {\n return null\n }\n const keys = Object.keys(parameter.content)\n if (keys.length === 0) {\n return null\n }\n return parameter.content\n})\n\nconst selectedContentType = ref<string>(\n Object.keys(content.value || {})[0] ?? '',\n)\n\n/** Response headers */\nconst headers = computed<ResponseObject['headers'] | null>(() =>\n 'headers' in parameter && parameter.headers ? parameter.headers : null,\n)\n\n/** Raw schema (possibly with $ref) for the selected content type or param. */\nconst baseSchema = computed(() =>\n content.value\n ? content.value?.[selectedContentType.value]?.schema\n : 'schema' in parameter && parameter.schema\n ? parameter.schema\n : null,\n)\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 schemaModelName = computed(() => {\n const raw = baseSchema.value\n if (!raw) {\n return null\n }\n\n if ('$ref' in raw) {\n return getRefName(raw.$ref)\n }\n\n return null\n})\n\n/** Computed value from the combined schema param and content param */\nconst value = computed(() => {\n const base = baseSchema.value\n const resolvedBase = content.value ? getResolvedRef(base) : schema.value\n\n const deprecated =\n 'deprecated' in parameter ? parameter.deprecated : schema.value?.deprecated\n\n // Convert examples to schema examples which is an array\n const paramExamples = 'examples' in parameter ? parameter.examples : {}\n const recordExamples = Object.values({\n ...paramExamples,\n ...content.value?.[selectedContentType.value]?.examples,\n })\n\n // Only use parameter.example as fallback if no other examples exist\n const arrayExamples =\n schema.value?.examples ??\n (recordExamples.length === 0 && 'example' in parameter\n ? [parameter.example]\n : [])\n\n /** Combine param examples with content ones */\n const examples = [...recordExamples, ...arrayExamples]\n\n return {\n ...resolvedBase,\n deprecated: deprecated,\n examples,\n } as SchemaObject\n})\n\n/**\n * Determines whether this parameter item should be rendered as a collapsible disclosure.\n * Only collapses when collapsableItems is enabled and the parameter has additional\n * content to display (content types, headers, or schema details).\n */\nconst shouldCollapse = computed<boolean>(() =>\n Boolean(content.value || headers.value || schema.value || truncated.value),\n)\n</script>\n<template>\n <li class=\"parameter-item group/parameter-item\">\n <Disclosure v-slot=\"{ open }\">\n <component\n :is=\"shouldCollapse ? DisclosureButton : 'div'\"\n v-if=\"collapsableItems\"\n class=\"parameter-item-trigger\"\n :class=\"{ 'parameter-item-trigger-open': open }\">\n <div class=\"parameter-item-name min-w-0\">\n <ScalarIconCaretRight\n v-if=\"shouldCollapse\"\n class=\"parameter-item-icon size-3 transition-transform duration-100\"\n :class=\"{ 'rotate-90': open }\"\n weight=\"bold\" />\n <div>\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </div>\n </div>\n <ScalarMarkdownSummary\n v-if=\"!open && parameter.description\"\n v-model:truncated=\"truncated\"\n class=\"parameter-item-description-summary min-w-0 flex-1\"\n controlled\n :value=\"parameter.description\" />\n <div\n v-else\n class=\"flex-1\" />\n </component>\n <div\n v-if=\"shouldCollapse && content\"\n class=\"absolute top-[calc(10px+0.5lh)] right-0 z-0 flex -translate-y-1/2 items-center text-base\"\n :class=\"{\n 'opacity-0 group-focus-within/parameter-item:opacity-100 group-hover/parameter-item:opacity-100':\n !open,\n }\">\n <div\n class=\"from-b-1 absolute inset-y-0 -left-6 -z-1 w-8 bg-linear-to-l from-40% to-transparent\" />\n <ContentTypeSelect\n v-model=\"selectedContentType\"\n :content=\"content\" />\n </div>\n <DisclosurePanel\n class=\"parameter-item-container parameter-item-container-markdown\"\n :static=\"!collapsableItems\">\n <ScalarMarkdown\n v-if=\"collapsableItems && parameter.description\"\n class=\"parameter-item-description\"\n :value=\"parameter.description\" />\n <!-- Headers -->\n <Headers\n v-if=\"headers\"\n :breadcrumb=\"breadcrumb\"\n :eventBus=\"eventBus\"\n :headers=\"headers\"\n :orderRequiredPropertiesFirst=\"options.orderRequiredPropertiesFirst\"\n :orderSchemaPropertiesBy=\"options.orderSchemaPropertiesBy\" />\n\n <!-- Schema -->\n <SchemaProperty\n is=\"div\"\n :breadcrumb=\"breadcrumb\"\n compact\n :description=\"collapsableItems ? '' : parameter.description\"\n :eventBus=\"eventBus\"\n :hideWriteOnly=\"true\"\n :modelName=\"schemaModelName\"\n :name=\"collapsableItems ? '' : name\"\n :noncollapsible=\"true\"\n :options=\"{\n hideWriteOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n }\"\n :required=\"'required' in parameter && parameter.required\"\n :schema=\"value\" />\n </DisclosurePanel>\n </Disclosure>\n </li>\n</template>\n\n<style scoped>\n.parameter-item {\n display: flex;\n flex-direction: column;\n position: relative;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.parameter-item:last-of-type .parameter-schema {\n padding-bottom: 0;\n}\n\n.parameter-item-container {\n padding: 0;\n}\n\n.parameter-item-headers {\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.parameter-item-name {\n position: relative;\n font-weight: var(--scalar-bold);\n font-size: var(--scalar-font-size-4);\n font-family: var(--scalar-font-code);\n color: var(--scalar-color-1);\n overflow-wrap: break-word;\n}\n\n.parameter-item-description,\n.parameter-item-description-summary {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-2);\n}\n\n.parameter-item-description-summary.parameter-item-description-summary > * {\n --markdown-line-height: var(--scalar-line-height-5);\n}\n\n/* Match font size of markdown for property-detail-value since first child within accordian is displayed as if it were in the markdown section */\n.parameter-item-trigger\n ~ .parameter-item-container\n :deep(.property--level-0 > .property-heading .property-detail-value) {\n font-size: var(--scalar-micro);\n}\n\n.parameter-item-required-optional {\n color: var(--scalar-color-2);\n font-weight: var(--scalar-semibold);\n margin-right: 6px;\n position: relative;\n}\n\n.parameter-item--required {\n text-transform: uppercase;\n font-size: var(--scalar-micro);\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color-orange);\n}\n\n.parameter-item-description {\n margin-top: 6px;\n font-size: var(--scalar-small);\n color: var(--scalar-color-2);\n line-height: 1.4;\n}\n\n.parameter-item-description :deep(p) {\n margin-top: 4px;\n font-size: var(--scalar-small);\n color: var(--scalar-color-2);\n line-height: 1.4;\n}\n\n.parameter-schema {\n padding-bottom: 9px;\n margin-top: 3px;\n}\n\n.parameter-item-trigger {\n display: flex;\n align-items: baseline;\n line-height: var(--scalar-line-height-5);\n gap: 6px;\n flex-wrap: wrap;\n padding: 10px 0;\n outline: none;\n}\n\n.parameter-item-trigger-open {\n padding-bottom: 0;\n}\n\n.parameter-item-icon {\n color: var(--scalar-color-3);\n left: -19px;\n top: 0.5lh;\n translate: 0 -50%;\n position: absolute;\n}\n\n.parameter-item-trigger:hover .parameter-item-icon,\n.parameter-item-trigger:focus-visible .parameter-item-icon {\n color: var(--scalar-color-1);\n}\n\n.parameter-item-trigger:focus-visible .parameter-item-icon {\n outline: 1px solid var(--scalar-color-accent);\n outline-offset: 2px;\n border-radius: var(--scalar-radius);\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"ParameterListItem.vue.js","names":[],"sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/vue'\nimport {\n ScalarMarkdown,\n ScalarMarkdownSummary,\n ScalarWrappingText,\n} from '@scalar/components'\nimport { ScalarIconCaretRight } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n ParameterObject,\n ResponseObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, ref } from 'vue'\n\nimport { getRefName } from '@/components/Content/Schema/helpers/get-ref-name'\nimport SchemaProperty from '@/components/Content/Schema/SchemaProperty.vue'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport ContentTypeSelect from './ContentTypeSelect.vue'\nimport Headers from './Headers.vue'\n\nconst { name, parameter, options, collapsableItems } = defineProps<{\n parameter: ParameterObject | ResponseObject\n name: string\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n collapsableItems?: boolean\n options: Pick<\n OperationProps['options'],\n 'hideModels' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'\n >\n}>()\n\n/** Whether the markdown summary is being truncated */\nconst truncated = ref(false)\n\n/** Responses and params may both have a schema */\nconst schema = computed<SchemaObject | null>(() =>\n 'schema' in parameter && parameter.schema\n ? getResolvedRef(parameter.schema)\n : null,\n)\n\n/** Response and params may both have content */\nconst content = computed(() => {\n if (!('content' in parameter) || !parameter.content) {\n return null\n }\n const keys = Object.keys(parameter.content)\n if (keys.length === 0) {\n return null\n }\n return parameter.content\n})\n\nconst selectedContentType = ref<string>(\n Object.keys(content.value || {})[0] ?? '',\n)\n\n/** Response headers */\nconst headers = computed<ResponseObject['headers'] | null>(() =>\n 'headers' in parameter && parameter.headers ? parameter.headers : null,\n)\n\n/** Raw schema (possibly with $ref) for the selected content type or param. */\nconst baseSchema = computed(() =>\n content.value\n ? content.value?.[selectedContentType.value]?.schema\n : 'schema' in parameter && parameter.schema\n ? parameter.schema\n : null,\n)\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 schemaModelName = computed(() => {\n const raw = baseSchema.value\n if (!raw) {\n return null\n }\n\n if ('$ref' in raw) {\n return getRefName(raw.$ref)\n }\n\n return null\n})\n\n/** Computed value from the combined schema param and content param */\nconst value = computed(() => {\n const base = baseSchema.value\n const resolvedBase = content.value ? getResolvedRef(base) : schema.value\n\n const deprecated =\n 'deprecated' in parameter ? parameter.deprecated : schema.value?.deprecated\n\n // Convert examples to schema examples which is an array\n const paramExamples = 'examples' in parameter ? parameter.examples : {}\n const recordExamples = Object.values({\n ...paramExamples,\n ...content.value?.[selectedContentType.value]?.examples,\n })\n\n // Only use parameter.example as fallback if no other examples exist\n const arrayExamples =\n schema.value?.examples ??\n (recordExamples.length === 0 && 'example' in parameter\n ? [parameter.example]\n : [])\n\n /** Combine param examples with content ones */\n const examples = [...recordExamples, ...arrayExamples]\n\n return {\n ...resolvedBase,\n deprecated: deprecated,\n examples,\n } as SchemaObject\n})\n\n/**\n * Determines whether this parameter item should be rendered as a collapsible disclosure.\n * Only collapses when collapsableItems is enabled and the parameter has additional\n * content to display (content types, headers, or schema details).\n */\nconst shouldCollapse = computed<boolean>(() =>\n Boolean(content.value || headers.value || schema.value || truncated.value),\n)\n</script>\n<template>\n <li class=\"parameter-item group/parameter-item\">\n <Disclosure v-slot=\"{ open }\">\n <component\n :is=\"shouldCollapse ? DisclosureButton : 'div'\"\n v-if=\"collapsableItems\"\n class=\"parameter-item-trigger\"\n :class=\"{ 'parameter-item-trigger-open': open }\">\n <div class=\"parameter-item-name min-w-0\">\n <ScalarIconCaretRight\n v-if=\"shouldCollapse\"\n class=\"parameter-item-icon size-3 transition-transform duration-100\"\n :class=\"{ 'rotate-90': open }\"\n weight=\"bold\" />\n <div>\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </div>\n </div>\n <ScalarMarkdownSummary\n v-if=\"!open && parameter.description\"\n v-model:truncated=\"truncated\"\n class=\"parameter-item-description-summary min-w-0 flex-1\"\n controlled\n :value=\"parameter.description\" />\n <div\n v-else\n class=\"flex-1\" />\n </component>\n <div\n v-if=\"shouldCollapse && content\"\n class=\"absolute top-[calc(10px+0.5lh)] right-0 z-0 flex -translate-y-1/2 items-center text-base\"\n :class=\"{\n 'opacity-0 group-focus-within/parameter-item:opacity-100 group-hover/parameter-item:opacity-100':\n !open,\n }\">\n <div\n class=\"from-b-1 absolute inset-y-0 -left-6 -z-1 w-8 bg-linear-to-l from-40% to-transparent\" />\n <ContentTypeSelect\n v-model=\"selectedContentType\"\n :content=\"content\" />\n </div>\n <DisclosurePanel\n class=\"parameter-item-container parameter-item-container-markdown\"\n :static=\"!collapsableItems\">\n <ScalarMarkdown\n v-if=\"collapsableItems && parameter.description\"\n class=\"parameter-item-description\"\n :value=\"parameter.description\" />\n <!-- Headers -->\n <Headers\n v-if=\"headers\"\n :breadcrumb=\"breadcrumb\"\n :eventBus=\"eventBus\"\n :headers=\"headers\"\n :orderRequiredPropertiesFirst=\"options.orderRequiredPropertiesFirst\"\n :orderSchemaPropertiesBy=\"options.orderSchemaPropertiesBy\" />\n\n <!-- Schema -->\n <SchemaProperty\n is=\"div\"\n :breadcrumb=\"breadcrumb\"\n compact\n :description=\"collapsableItems ? '' : parameter.description\"\n :eventBus=\"eventBus\"\n :hideWriteOnly=\"true\"\n :modelName=\"schemaModelName\"\n :name=\"collapsableItems ? '' : name\"\n :noncollapsible=\"true\"\n :options=\"{\n hideWriteOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n }\"\n :required=\"'required' in parameter && parameter.required\"\n :schema=\"value\" />\n </DisclosurePanel>\n </Disclosure>\n </li>\n</template>\n\n<style scoped>\n.parameter-item {\n display: flex;\n flex-direction: column;\n position: relative;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.parameter-item:last-of-type .parameter-schema {\n padding-bottom: 0;\n}\n\n.parameter-item-container {\n padding: 0;\n}\n\n.parameter-item-headers {\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.parameter-item-name {\n position: relative;\n font-weight: var(--scalar-bold);\n font-size: var(--scalar-font-size-4);\n font-family: var(--scalar-font-code);\n color: var(--scalar-color-1);\n overflow-wrap: break-word;\n}\n\n.parameter-item-description,\n.parameter-item-description-summary {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-2);\n}\n\n.parameter-item-description-summary.parameter-item-description-summary > * {\n --markdown-line-height: var(--scalar-line-height-5);\n}\n\n/* Match font size of markdown for property-detail-value since first child within accordian is displayed as if it were in the markdown section */\n.parameter-item-trigger\n ~ .parameter-item-container\n :deep(.property--level-0 > .property-heading .property-detail-value) {\n font-size: var(--scalar-micro);\n}\n\n.parameter-item-required-optional {\n color: var(--scalar-color-2);\n font-weight: var(--scalar-semibold);\n margin-right: 6px;\n position: relative;\n}\n\n.parameter-item--required {\n text-transform: uppercase;\n font-size: var(--scalar-micro);\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color-orange);\n}\n\n.parameter-item-description {\n margin-top: 6px;\n font-size: var(--scalar-small);\n color: var(--scalar-color-2);\n line-height: 1.4;\n}\n\n.parameter-item-description :deep(p) {\n margin-top: 4px;\n font-size: var(--scalar-small);\n color: var(--scalar-color-2);\n line-height: 1.4;\n}\n\n.parameter-schema {\n padding-bottom: 9px;\n margin-top: 3px;\n}\n\n.parameter-item-trigger {\n display: flex;\n align-items: baseline;\n line-height: var(--scalar-line-height-5);\n gap: 6px;\n flex-wrap: wrap;\n padding: 10px 0;\n outline: none;\n}\n\n.parameter-item-trigger-open {\n padding-bottom: 0;\n}\n\n.parameter-item-icon {\n color: var(--scalar-color-3);\n left: -19px;\n top: 0.5lh;\n translate: 0 -50%;\n position: absolute;\n}\n\n.parameter-item-trigger:hover .parameter-item-icon,\n.parameter-item-trigger:focus-visible .parameter-item-icon {\n color: var(--scalar-color-1);\n}\n\n.parameter-item-trigger:focus-visible .parameter-item-icon {\n outline: 1px solid var(--scalar-color-accent);\n outline-offset: 2px;\n border-radius: var(--scalar-radius);\n}\n</style>\n"],"mappings":""}