@scalar/api-reference 1.62.0 → 1.62.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 (181) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/browser/chunks/{AgentScalarChatInterface-C3QiXv0S.js → AgentScalarChatInterface-c6CQmaLr.js} +4 -4
  3. package/dist/browser/chunks/ScalarTextInput.vue-D_L-rtQC.js +27 -0
  4. package/dist/browser/chunks/basic-shape-diamond.svg-BTEOT1FL.js +1 -1
  5. package/dist/browser/chunks/basic-shape-hexagon.svg-BSPzaCgF.js +1 -1
  6. package/dist/browser/chunks/basic-shape-primary-circle-ellipse-round.svg-DKmZ8UUU.js +1 -1
  7. package/dist/browser/chunks/basic-shape-primary-square-rectangle.svg-n2YRykHD.js +1 -1
  8. package/dist/browser/chunks/basic-shape-shield.svg-Bec9cJDA.js +1 -1
  9. package/dist/browser/chunks/browser-67K6wmG9.js +1 -1
  10. package/dist/browser/chunks/computer-device-desktop-monitor.svg-m6j893Hb.js +1 -1
  11. package/dist/browser/chunks/computer-device-desktop.svg-Dk1VVO7k.js +1 -1
  12. package/dist/browser/chunks/computer-device-laptop.svg-BNGVUCYS.js +1 -1
  13. package/dist/browser/chunks/computer-device-mobile-phone-android-samsung-back.svg-CC4UUTFw.js +1 -1
  14. package/dist/browser/chunks/computer-device-mobile-phone-android-samsung.svg-D8ExpMpL.js +1 -1
  15. package/dist/browser/chunks/computer-device-mobile-phone-iphone-x-back.svg-CLm7sgMM.js +1 -1
  16. package/dist/browser/chunks/computer-device-mobile-phone-iphone-x.svg-Xrttg6_7.js +1 -1
  17. package/dist/browser/chunks/computer-device-mobile-tablet-touch.svg-DQ2oTvOG.js +1 -1
  18. package/dist/browser/chunks/computer-device-mobile-tablet.svg-DCr0XlRc.js +1 -1
  19. package/dist/browser/chunks/computer-device-network-ethernet-cat6.svg-AK9l0iOl.js +1 -1
  20. package/dist/browser/chunks/computer-device-network-lan-www.svg-gUIdFBlE.js +1 -1
  21. package/dist/browser/chunks/computer-device-network-wifi-connection.svg-Be-EMm4e.js +1 -1
  22. package/dist/browser/chunks/computer-device-network-wifi-router.svg-Dc2VzyqK.js +1 -1
  23. package/dist/browser/chunks/ecology-science-erlenmeyer-flask.svg-DHgy7Jfd.js +1 -1
  24. package/dist/browser/chunks/image-flash-lightning.svg-EETR_y1q.js +1 -1
  25. package/dist/browser/chunks/image-picture-flower.svg-DN1AYzJU.js +1 -1
  26. package/dist/browser/chunks/interface-alert-exclamation-diamond.svg-C5NozMV_.js +1 -1
  27. package/dist/browser/chunks/interface-alert-exclamation-triangle-warning.svg-DaAg2fF5.js +1 -1
  28. package/dist/browser/chunks/interface-alert-information-circle.svg-ckkkt9Mv.js +1 -1
  29. package/dist/browser/chunks/interface-award-crown.svg-pjvn9hY-.js +1 -1
  30. package/dist/browser/chunks/interface-bookmark-tag.svg-r2r-lQq4.js +1 -1
  31. package/dist/browser/chunks/interface-bookmark.svg-BK9HKQBT.js +1 -1
  32. package/dist/browser/chunks/interface-calendar-date-one.svg-DNnF0M1I.js +1 -1
  33. package/dist/browser/chunks/interface-content-book-open-pages.svg-CQj_w9Vp.js +1 -1
  34. package/dist/browser/chunks/interface-content-book-page.svg-DppoeJRe.js +1 -1
  35. package/dist/browser/chunks/interface-content-file.svg-CvcD7OiY.js +1 -1
  36. package/dist/browser/chunks/interface-content-folder.svg-BmtS5I9A.js +1 -1
  37. package/dist/browser/chunks/interface-copy-clipboard.svg-Be6EI50X.js +1 -1
  38. package/dist/browser/chunks/interface-edit-attachment.svg-G5TKzpWX.js +1 -1
  39. package/dist/browser/chunks/interface-edit-binocular.svg-jzL-DvGB.js +1 -1
  40. package/dist/browser/chunks/interface-edit-magic-wand.svg-BOTlymvp.js +1 -1
  41. package/dist/browser/chunks/interface-edit-tool-paint-roller.svg-s9dwryx7.js +1 -1
  42. package/dist/browser/chunks/interface-edit-tool-pencil.svg-C7v0dbB3.js +1 -1
  43. package/dist/browser/chunks/interface-favorite-award.svg-CYHUgUG0.js +1 -1
  44. package/dist/browser/chunks/interface-favorite-flag.svg-C10zlKOb.js +1 -1
  45. package/dist/browser/chunks/interface-favorite-heart.svg-eoduXxlz.js +1 -1
  46. package/dist/browser/chunks/interface-favorite-star.svg-BSmxJetr.js +1 -1
  47. package/dist/browser/chunks/interface-favorite-stars-sparkles.svg-JTFLj3Ls.js +1 -1
  48. package/dist/browser/chunks/interface-hierarchy-flowchart.svg-Cg_Wy0kN.js +1 -1
  49. package/dist/browser/chunks/interface-home-house.svg-DytoGRnv.js +1 -1
  50. package/dist/browser/chunks/interface-hyperlink.svg-CuEfmmQI.js +1 -1
  51. package/dist/browser/chunks/interface-lighting-brightness.svg-DSK0h_Pa.js +1 -1
  52. package/dist/browser/chunks/interface-lock-closed.svg-Cn6TaLYv.js +1 -1
  53. package/dist/browser/chunks/interface-lock-open-unlock.svg-CVkG5-9W.js +1 -1
  54. package/dist/browser/chunks/interface-login-key.svg-y-cwwXjN.js +1 -1
  55. package/dist/browser/chunks/interface-search.svg-S-puVFJB.js +1 -1
  56. package/dist/browser/chunks/interface-setting-cog.svg-CTH4_lLg.js +1 -1
  57. package/dist/browser/chunks/interface-share-megaphone-bullhorn.svg-Pbp39MyC.js +1 -1
  58. package/dist/browser/chunks/interface-share-rocket.svg-BgCsIRZO.js +1 -1
  59. package/dist/browser/chunks/interface-share-satellite.svg-DAMN9d5G.js +1 -1
  60. package/dist/browser/chunks/interface-share-space-ship.svg-Dt-Mejxk.js +1 -1
  61. package/dist/browser/chunks/interface-share.svg-vFYTXSti.js +1 -1
  62. package/dist/browser/chunks/interface-signal-square.svg-DNG4LpAe.js +1 -1
  63. package/dist/browser/chunks/interface-time-clock-circle.svg-Bpz-nLxo.js +1 -1
  64. package/dist/browser/chunks/interface-time-hour-glass.svg-D7agfKsH.js +1 -1
  65. package/dist/browser/chunks/interface-users-multiple.svg-CkPJBBnG.js +1 -1
  66. package/dist/browser/chunks/interface-weather-moon.svg-CaTZFMPO.js +1 -1
  67. package/dist/browser/chunks/mail-chat-bubble-square.svg-DC8RIihp.js +1 -1
  68. package/dist/browser/chunks/mail-send-email-paper-airplane.svg-D8OLs9jz.js +1 -1
  69. package/dist/browser/chunks/mail-send-envelope.svg-CV33h5Sx.js +1 -1
  70. package/dist/browser/chunks/modal-BvqLUPs5.js +99 -0
  71. package/dist/browser/chunks/{modal-CMytT4BZ.js → modal-CfujTjCR.js} +2 -2
  72. package/dist/browser/chunks/money-cashier-receipt.svg-CJL8C2gs.js +1 -1
  73. package/dist/browser/chunks/money-currency-dollar-pay.svg-VdBplCTx.js +1 -1
  74. package/dist/browser/chunks/money-graph-arrow-increase.svg-DcRov3zk.js +1 -1
  75. package/dist/browser/chunks/money-graph-bar-chart-increase.svg-Cc7KxjX-.js +1 -1
  76. package/dist/browser/chunks/nature-ecology-leaf.svg-DR3cTZxt.js +1 -1
  77. package/dist/browser/chunks/phone-telephone.svg-DyY0gUlk.js +1 -1
  78. package/dist/browser/chunks/programming-bug.svg-BHLT-Qhp.js +1 -1
  79. package/dist/browser/chunks/programming-cloud.svg-B6YW33ba.js +1 -1
  80. package/dist/browser/chunks/programming-computer-database-server.svg-B6o5Sdn-.js +1 -1
  81. package/dist/browser/chunks/programming-computer-database.svg-Cl7OVtpJ.js +1 -1
  82. package/dist/browser/chunks/programming-module-four-layout.svg-BQrerL1x.js +1 -1
  83. package/dist/browser/chunks/programming-module-three.svg-B2KTQzBM.js +1 -1
  84. package/dist/browser/chunks/programming-module.svg-CiID7kPm.js +1 -1
  85. package/dist/browser/chunks/programming-script-code.svg-D1M5rtkN.js +1 -1
  86. package/dist/browser/chunks/runtime-core.esm-bundler-Byrbbu5Q.js +1 -1
  87. package/dist/browser/chunks/shopping-cart.svg-BEegiIR9.js +1 -1
  88. package/dist/browser/chunks/shopping-gift-present.svg-BUHwuLix.js +1 -1
  89. package/dist/browser/chunks/shopping-shipping-box-parcel-package.svg-D6fxWdYx.js +1 -1
  90. package/dist/browser/chunks/tag-new-circle.svg-jsg1bGs0.js +1 -1
  91. package/dist/browser/chunks/travel-map-earth-globe.svg-ClbMiU-f.js +1 -1
  92. package/dist/browser/chunks/{vendor-BPQqqkn-.js → vendor-BlFFskFr.js} +116 -116
  93. package/dist/browser/standalone.esm.js +20 -20
  94. package/dist/browser/standalone.js +245 -245
  95. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  96. package/dist/components/ApiReference.vue.js +1 -1
  97. package/dist/components/ApiReference.vue.js.map +1 -1
  98. package/dist/components/ApiReference.vue.script.js +12 -2
  99. package/dist/components/ApiReference.vue.script.js.map +1 -1
  100. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.d.ts.map +1 -1
  101. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.js.map +1 -1
  102. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js +2 -0
  103. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js.map +1 -1
  104. package/dist/components/Content/AsyncApi/Channel.vue.d.ts +6 -0
  105. package/dist/components/Content/AsyncApi/Channel.vue.d.ts.map +1 -1
  106. package/dist/components/Content/AsyncApi/Channel.vue.js +1 -1
  107. package/dist/components/Content/AsyncApi/Channel.vue.js.map +1 -1
  108. package/dist/components/Content/AsyncApi/Channel.vue.script.js +4 -2
  109. package/dist/components/Content/AsyncApi/Channel.vue.script.js.map +1 -1
  110. package/dist/components/Content/AsyncApi/ChannelsList.vue.d.ts +10 -0
  111. package/dist/components/Content/AsyncApi/ChannelsList.vue.d.ts.map +1 -0
  112. package/dist/components/Content/AsyncApi/ChannelsList.vue.js +9 -0
  113. package/dist/components/Content/AsyncApi/ChannelsList.vue.js.map +1 -0
  114. package/dist/components/Content/AsyncApi/ChannelsList.vue.script.js +56 -0
  115. package/dist/components/Content/AsyncApi/ChannelsList.vue.script.js.map +1 -0
  116. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  117. package/dist/components/Content/Schema/Schema.vue.js +1 -1
  118. package/dist/components/Content/Schema/Schema.vue.js.map +1 -1
  119. package/dist/components/Content/Schema/Schema.vue.script.js +93 -12
  120. package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -1
  121. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  122. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  123. package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -1
  124. package/dist/components/Content/Schema/SchemaProperty.vue.script.js +38 -9
  125. package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -1
  126. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js +1 -1
  127. package/dist/components/Content/Schema/helpers/dynamic-scope.d.ts +27 -0
  128. package/dist/components/Content/Schema/helpers/dynamic-scope.d.ts.map +1 -0
  129. package/dist/components/Content/Schema/helpers/dynamic-scope.js +35 -0
  130. package/dist/components/Content/Schema/helpers/dynamic-scope.js.map +1 -0
  131. package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts +10 -0
  132. package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts.map +1 -1
  133. package/dist/components/Content/Schema/helpers/get-compositions-to-render.js +11 -2
  134. package/dist/components/Content/Schema/helpers/get-compositions-to-render.js.map +1 -1
  135. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +9 -2
  136. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js.map +1 -1
  137. package/dist/components/Content/Tags/components/TagSection.vue.d.ts.map +1 -1
  138. package/dist/components/Content/Tags/components/TagSection.vue.js.map +1 -1
  139. package/dist/components/Content/Tags/components/TagSection.vue.script.js +14 -3
  140. package/dist/components/Content/Tags/components/TagSection.vue.script.js.map +1 -1
  141. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  142. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  143. package/dist/features/Operation/components/RequestBody.vue.js.map +1 -1
  144. package/dist/features/Operation/components/RequestBody.vue.script.js +3 -1
  145. package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -1
  146. package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -1
  147. package/dist/features/localization/locales/ar.d.ts +1 -0
  148. package/dist/features/localization/locales/ar.d.ts.map +1 -1
  149. package/dist/features/localization/locales/ar.js +2 -1
  150. package/dist/features/localization/locales/ar.js.map +1 -1
  151. package/dist/features/localization/locales/de.d.ts +1 -0
  152. package/dist/features/localization/locales/de.d.ts.map +1 -1
  153. package/dist/features/localization/locales/de.js +2 -1
  154. package/dist/features/localization/locales/de.js.map +1 -1
  155. package/dist/features/localization/locales/en.d.ts +1 -0
  156. package/dist/features/localization/locales/en.d.ts.map +1 -1
  157. package/dist/features/localization/locales/en.js +2 -1
  158. package/dist/features/localization/locales/en.js.map +1 -1
  159. package/dist/features/localization/locales/es.d.ts +1 -0
  160. package/dist/features/localization/locales/es.d.ts.map +1 -1
  161. package/dist/features/localization/locales/es.js +2 -1
  162. package/dist/features/localization/locales/es.js.map +1 -1
  163. package/dist/features/localization/locales/fr.d.ts +1 -0
  164. package/dist/features/localization/locales/fr.d.ts.map +1 -1
  165. package/dist/features/localization/locales/fr.js +2 -1
  166. package/dist/features/localization/locales/fr.js.map +1 -1
  167. package/dist/features/localization/locales/ru.d.ts +1 -0
  168. package/dist/features/localization/locales/ru.d.ts.map +1 -1
  169. package/dist/features/localization/locales/ru.js +2 -1
  170. package/dist/features/localization/locales/ru.js.map +1 -1
  171. package/dist/features/localization/locales/zh-cn.d.ts +1 -0
  172. package/dist/features/localization/locales/zh-cn.d.ts.map +1 -1
  173. package/dist/features/localization/locales/zh-cn.js +2 -1
  174. package/dist/features/localization/locales/zh-cn.js.map +1 -1
  175. package/dist/features/localization/translations.d.ts +7 -0
  176. package/dist/features/localization/translations.d.ts.map +1 -1
  177. package/dist/style.css +123 -97
  178. package/dist/vue-styles.css +116 -90
  179. package/package.json +14 -14
  180. package/dist/browser/chunks/ScalarTextInput.vue-CysYmeeN.js +0 -27
  181. package/dist/browser/chunks/modal-wI0tG53V.js +0 -99
@@ -1 +1 @@
1
- {"version":3,"file":"merge-all-of-schemas.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/merge-all-of-schemas.ts"],"sourcesContent":["import { objectKeys } from '@scalar/helpers/object/object-keys'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\n/**\n * Schema keywords whose value should reflect the *last* occurrence when merging\n * `allOf` members. Most keywords keep the first occurrence, but for human-facing\n * annotations a later subschema is expected to override an earlier one — matching\n * OpenAPI/JSON Schema tooling like Swagger UI.\n */\nconst LAST_WINS_KEYS = new Set<string>(['description', 'title'])\n\n/**\n * Merges multiple OpenAPI schema objects into a single schema object.\n * Handles nested allOf compositions and merges properties recursively.\n *\n * @param schemas - Array of OpenAPI schema objects to merge\n * @param rootSchema - Optional root schema to merge with the result\n * @param seenRefs - `$ref` strings already being merged higher in the call stack\n * @returns Merged schema object\n */\nexport const mergeAllOfSchemas = (\n schemas: SchemaObject | undefined,\n rootSchema?: SchemaObject,\n seenRefs: Set<string> = new Set(),\n): SchemaObject => {\n // Handle max depth, empty or invalid input\n if (!schemas?.allOf?.length || !Array.isArray(schemas.allOf)) {\n return rootSchema || ({} as SchemaObject)\n }\n\n // Initialize result object once\n const result = {} as SchemaObject\n\n // Extract base schema properties (everything except allOf)\n const { allOf: _, ...baseSchema } = schemas\n\n // Process allOf schemas first\n for (const _schema of schemas.allOf) {\n if (!_schema || typeof _schema !== 'object') {\n continue\n }\n\n // Resolve ref if present\n const schema = resolve.schema(_schema)\n\n // Handle nested allOf recursively\n if (schema.allOf) {\n const nestedMerged = mergeAllOfSchemas(schema, undefined, seenRefs)\n mergeSchemaIntoResult(result, nestedMerged, false, seenRefs)\n continue\n }\n\n mergeSchemaIntoResult(result, schema, false, seenRefs)\n }\n\n // Apply base schema properties with precedence over allOf properties\n if (Object.keys(baseSchema).length > 0) {\n mergeSchemaIntoResult(result, baseSchema, true, seenRefs)\n }\n\n // Process root schema last if provided\n if (rootSchema && typeof rootSchema === 'object') {\n if (rootSchema.allOf) {\n const nestedMerged = mergeAllOfSchemas(rootSchema, undefined, seenRefs)\n mergeSchemaIntoResult(result, nestedMerged, true, seenRefs)\n } else {\n mergeSchemaIntoResult(result, rootSchema, true, seenRefs)\n }\n }\n\n return result\n}\n\n/**\n * Efficiently merges a source schema into a target result object.\n * Handles all schema merging logic in a single optimized function.\n *\n * @param result - The target schema object to merge into\n * @param schema - The source schema object to merge from\n * @param override - Whether to override existing properties (default: false)\n */\nconst mergeSchemaIntoResult = (\n result: SchemaObject,\n schema: SchemaObject,\n override: boolean = false,\n seenRefs: Set<string> = new Set(),\n): void => {\n // Early return if schema is empty\n const schemaKeys = objectKeys(schema)\n if (schemaKeys.length === 0) {\n return\n }\n\n // Loop through all schema properties and handle them appropriately\n for (const key of schemaKeys) {\n const value = getResolvedRef(schema[key]) as any\n\n if (value === undefined) {\n continue\n }\n\n // Required\n if ((key as string) === 'required') {\n // Merge required fields with deduplication\n if (Array.isArray(value) && value.length > 0) {\n // @ts-expect-error\n if (result.required?.length) {\n // @ts-expect-error\n result.required = [...new Set([...result.required, ...value])]\n } else {\n // @ts-expect-error\n result.required = value.slice()\n }\n }\n }\n // Properties\n else if ((key as string) === 'properties') {\n // Merge properties recursively\n if (value && typeof value === 'object') {\n // @ts-expect-error\n if (!result.properties) {\n // @ts-expect-error\n result.properties = {}\n }\n\n // @ts-expect-error\n mergePropertiesIntoResult(result.properties, value, seenRefs)\n }\n }\n // Items\n else if ((key as string) === 'items') {\n // Handle items (for both arrays and objects with items)\n const items = resolve.schema(value)\n if (items) {\n if (isArraySchema(schema)) {\n // @ts-expect-error\n if (!result.items) {\n // @ts-expect-error\n result.items = {}\n }\n\n // Handle allOf within array items\n if (items.allOf) {\n const mergedItems = mergeAllOfSchemas(items, undefined, seenRefs)\n // @ts-expect-error\n Object.assign(result.items, mergedItems)\n } else {\n // @ts-expect-error\n mergeItemsIntoResult(getResolvedRef(result.items), items, seenRefs)\n }\n }\n // For non-array types with items.allOf, merge into properties\n else if (items.allOf) {\n const mergedItems = mergeAllOfSchemas(items, undefined, seenRefs)\n if ('properties' in mergedItems) {\n if (!('properties' in result)) {\n // @ts-expect-error\n result.properties = {}\n }\n\n 'properties' in result && mergePropertiesIntoResult(result.properties, mergedItems.properties, seenRefs)\n }\n }\n // For non-array types without allOf, still set items if not already set\n else if (!('items' in result)) {\n // @ts-expect-error\n result.items = items\n }\n }\n }\n // Enum\n else if (key === 'enum') {\n if (Array.isArray(value) && value.length > 0) {\n result.enum = [...new Set([...(result.enum || []), ...value])]\n }\n }\n // OneOf/AnyOf\n else if (key === 'oneOf' || key === 'anyOf') {\n // Preserve the composition itself so its variants keep rendering as a\n // selector. Flattening the option properties into the parent would drop\n // the variant structure entirely and silently lose branches that have no\n // top-level `properties` (for example branches that are themselves an\n // `allOf`). The sibling `allOf` members stay on `result` as base\n // properties, which the Schema component renders above the selector.\n if (Array.isArray(value) && value.length > 0 && (override || result[key] === undefined)) {\n result[key] = value\n }\n }\n // Skip allOf as it's handled at a higher level\n else if (key === 'allOf') {\n continue\n }\n // For all other properties, preserve the first occurrence or override if specified.\n // Annotation keywords (see LAST_WINS_KEYS) always take the latest value so a later\n // allOf member can override an earlier one.\n else {\n if (override || LAST_WINS_KEYS.has(key as string) || result[key] === undefined) {\n result[key] = value\n }\n }\n }\n}\n\n/**\n * Efficiently merges properties into a result object without creating new objects.\n */\nconst mergePropertiesIntoResult = (\n result: Extract<SchemaObject, { type: 'object' }>['properties'],\n properties: Extract<SchemaObject, { type: 'object' }>['properties'],\n seenRefs: Set<string> = new Set(),\n): void => {\n const propertyKeys = Object.keys(properties ?? {})\n if (!properties || !result || propertyKeys.length === 0) {\n return\n }\n\n for (const key of propertyKeys) {\n const schema = resolve.schema(properties[key])\n if (!schema) {\n delete result[key]\n continue\n }\n\n if (typeof schema !== 'object') {\n result[key] = schema\n continue\n }\n\n if (!result[key]) {\n // Handle new property with allOf\n if (schema.allOf) {\n result[key] = mergeAllOfSchemas(schema, undefined, seenRefs)\n } else if (isArraySchema(schema) && resolve.schema(schema.items)?.allOf) {\n result[key] = {\n ...schema,\n items: mergeAllOfSchemas(resolve.schema(schema.items), undefined, seenRefs),\n }\n } else if (properties[key]) {\n result[key] = properties[key]\n }\n continue\n }\n\n // Merge existing property\n const existing = resolve.schema(result[key])\n\n // Break self-referential cycles: when this property's `$ref` is already\n // being merged higher in the call stack, keep the partially merged existing\n // schema instead of recursing into it again. This mirrors the guard in\n // `mergeItems` and covers schemas that point back at themselves through a\n // plain object property (e.g. a tree node whose `parent` $refs the node).\n const schemaRef = (schema as { $ref?: string }).$ref\n if (typeof schemaRef === 'string' && seenRefs.has(schemaRef)) {\n result[key] = existing\n continue\n }\n const nextSeenRefs = typeof schemaRef === 'string' ? new Set(seenRefs).add(schemaRef) : seenRefs\n\n if (schema.allOf) {\n result[key] = mergeAllOfSchemas({ allOf: [existing, ...schema.allOf] } as SchemaObject, undefined, nextSeenRefs)\n } else if (isArraySchema(schema) && isArraySchema(existing) && schema.items) {\n const existingItems = resolve.schema(existing.items)\n result[key] = {\n ...existing,\n type: 'array',\n items: existingItems\n ? mergeItems(existingItems, resolve.schema(schema.items), nextSeenRefs)\n : resolve.schema(schema.items),\n }\n } else {\n // Create merged object with properties handled separately\n if ('properties' in existing && 'properties' in schema) {\n const merged = { ...existing, ...schema }\n merged.properties = { ...existing.properties }\n mergePropertiesIntoResult(merged.properties, schema.properties, nextSeenRefs)\n result[key] = merged\n }\n // Simple merge without property recursion\n else {\n result[key] = { ...schema, ...existing }\n }\n }\n }\n}\n\n/**\n * Efficiently merges array items into a result object.\n */\nconst mergeItemsIntoResult = (result: SchemaObject, items: SchemaObject, seenRefs: Set<string> = new Set()): void => {\n // Handle allOf in items\n if (items.allOf || result.allOf) {\n // Build array without spreads for better performance\n const allOfSchemas: SchemaObject[] = []\n\n if (result.allOf) {\n for (const schema of result.allOf) {\n allOfSchemas.push(resolve.schema(schema))\n }\n } else {\n allOfSchemas.push(result)\n }\n\n if (items.allOf) {\n for (const schema of items.allOf) {\n allOfSchemas.push(resolve.schema(schema))\n }\n } else {\n allOfSchemas.push(items)\n }\n\n const merged = mergeAllOfSchemas({ allOf: allOfSchemas } as SchemaObject, undefined, seenRefs)\n Object.assign(result, merged)\n return\n }\n\n // Regular merge\n Object.assign(result, items)\n\n // Merge properties if both have them\n if ('properties' in result && 'properties' in items) {\n mergePropertiesIntoResult(result.properties, items.properties, seenRefs)\n }\n}\n\n/**\n * Helper function for merging items that returns a new object.\n */\nconst mergeItems = (\n existing: SchemaObject,\n incoming: SchemaObject,\n seenRefs: Set<string> = new Set(),\n): SchemaObject => {\n const incomingRef = (incoming as { $ref?: string }).$ref\n\n if (typeof incomingRef === 'string') {\n if (seenRefs.has(incomingRef)) {\n return existing\n }\n return mergeItemsInner(existing, incoming, new Set(seenRefs).add(incomingRef))\n }\n\n return mergeItemsInner(existing, incoming, seenRefs)\n}\n\nconst mergeItemsInner = (\n existing: SchemaObject,\n incoming: SchemaObject,\n seenRefs: Set<string> = new Set(),\n): SchemaObject => {\n // Handle allOf in either schema\n if (existing.allOf || incoming.allOf) {\n // Build array without spreads for better performance\n const allOfSchemas: SchemaObject[] = []\n\n if (existing.allOf) {\n for (const schema of existing.allOf) {\n allOfSchemas.push(resolve.schema(schema))\n }\n } else {\n allOfSchemas.push(existing)\n }\n\n if (incoming.allOf) {\n for (const schema of incoming.allOf) {\n allOfSchemas.push(resolve.schema(schema))\n }\n } else {\n allOfSchemas.push(incoming)\n }\n\n return mergeAllOfSchemas({ allOf: allOfSchemas } as SchemaObject, undefined, seenRefs)\n }\n\n const merged = { ...existing, ...incoming }\n\n // Recursively merge properties if both have properties\n if ('properties' in existing && 'properties' in incoming) {\n // @ts-expect-error\n merged.properties = { ...existing.properties }\n // @ts-expect-error\n mergePropertiesIntoResult(merged.properties, incoming.properties, seenRefs)\n }\n\n return merged as SchemaObject\n}\n"],"mappings":";;;;;;;;;;;AAYA,IAAM,iBAAiB,IAAI,IAAY,CAAC,eAAe,QAAQ,CAAC;;;;;;;;;;AAWhE,IAAa,qBACX,SACA,YACA,2BAAwB,IAAI,KAAK,KAChB;AAEjB,KAAI,CAAC,SAAS,OAAO,UAAU,CAAC,MAAM,QAAQ,QAAQ,MAAM,CAC1D,QAAO,cAAe,EAAE;CAI1B,MAAM,SAAS,EAAE;CAGjB,MAAM,EAAE,OAAO,GAAG,GAAG,eAAe;AAGpC,MAAK,MAAM,WAAW,QAAQ,OAAO;AACnC,MAAI,CAAC,WAAW,OAAO,YAAY,SACjC;EAIF,MAAM,SAAS,QAAQ,OAAO,QAAQ;AAGtC,MAAI,OAAO,OAAO;AAEhB,yBAAsB,QADD,kBAAkB,QAAQ,KAAA,GAAW,SAAS,EACvB,OAAO,SAAS;AAC5D;;AAGF,wBAAsB,QAAQ,QAAQ,OAAO,SAAS;;AAIxD,KAAI,OAAO,KAAK,WAAW,CAAC,SAAS,EACnC,uBAAsB,QAAQ,YAAY,MAAM,SAAS;AAI3D,KAAI,cAAc,OAAO,eAAe,SACtC,KAAI,WAAW,MAEb,uBAAsB,QADD,kBAAkB,YAAY,KAAA,GAAW,SAAS,EAC3B,MAAM,SAAS;KAE3D,uBAAsB,QAAQ,YAAY,MAAM,SAAS;AAI7D,QAAO;;;;;;;;;;AAWT,IAAM,yBACJ,QACA,QACA,WAAoB,OACpB,2BAAwB,IAAI,KAAK,KACxB;CAET,MAAM,aAAa,WAAW,OAAO;AACrC,KAAI,WAAW,WAAW,EACxB;AAIF,MAAK,MAAM,OAAO,YAAY;EAC5B,MAAM,QAAQ,eAAe,OAAO,KAAK;AAEzC,MAAI,UAAU,KAAA,EACZ;AAIF,MAAK,QAAmB;OAElB,MAAM,QAAQ,MAAM,IAAI,MAAM,SAAS,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AS,MACX,MAAK,MAAM,UAAU,SAAS,MAC5B,cAAa,KAAK,QAAQ,OAAO,OAAO,CAAC;MAG3C,cAAa,KAAK,SAAS;AAG7B,MAAI,SAAS,MACX,MAAK,MAAM,UAAU,SAAS,MAC5B,cAAa,KAAK,QAAQ,OAAO,OAAO,CAAC;MAG3C,cAAa,KAAK,SAAS;AAG7B,SAAO,kBAAkB,EAAE,OAAO,cAAc,EAAkB,KAAA,GAAW,SAAS;;CAGxF,MAAM,SAAS;EAAE,GAAG;EAAU,GAAG;EAAU;AAG3C,KAAI,gBAAgB,YAAY,gBAAgB,UAAU;AAExD,SAAO,aAAa,EAAE,GAAG,SAAS,YAAY;AAE9C,4BAA0B,OAAO,YAAY,SAAS,YAAY,SAAS;;AAG7E,QAAO"}
1
+ {"version":3,"file":"merge-all-of-schemas.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/merge-all-of-schemas.ts"],"sourcesContent":["import { objectKeys } from '@scalar/helpers/object/object-keys'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\n/**\n * Schema keywords whose value should reflect the *last* occurrence when merging\n * `allOf` members. Most keywords keep the first occurrence, but for human-facing\n * annotations a later subschema is expected to override an earlier one — matching\n * OpenAPI/JSON Schema tooling like Swagger UI.\n */\nconst LAST_WINS_KEYS = new Set<string>(['description', 'title'])\n\n/**\n * Merges multiple OpenAPI schema objects into a single schema object.\n * Handles nested allOf compositions and merges properties recursively.\n *\n * @param schemas - Array of OpenAPI schema objects to merge\n * @param rootSchema - Optional root schema to merge with the result\n * @param seenRefs - `$ref` strings already being merged higher in the call stack\n * @returns Merged schema object\n */\nexport const mergeAllOfSchemas = (\n schemas: SchemaObject | undefined,\n rootSchema?: SchemaObject,\n seenRefs: Set<string> = new Set(),\n): SchemaObject => {\n // Handle max depth, empty or invalid input\n if (!schemas?.allOf?.length || !Array.isArray(schemas.allOf)) {\n return rootSchema || ({} as SchemaObject)\n }\n\n // Initialize result object once\n const result = {} as SchemaObject\n\n // Extract base schema properties (everything except allOf)\n const { allOf: _, ...baseSchema } = schemas\n\n // Process allOf schemas first\n for (const _schema of schemas.allOf) {\n if (!_schema || typeof _schema !== 'object') {\n continue\n }\n\n // Resolve ref if present\n const schema = resolve.schema(_schema)\n\n // Handle nested allOf recursively\n if (schema.allOf) {\n const nestedMerged = mergeAllOfSchemas(schema, undefined, seenRefs)\n mergeSchemaIntoResult(result, nestedMerged, false, seenRefs)\n continue\n }\n\n mergeSchemaIntoResult(result, schema, false, seenRefs)\n }\n\n // Apply base schema properties with precedence over allOf properties\n if (Object.keys(baseSchema).length > 0) {\n mergeSchemaIntoResult(result, baseSchema, true, seenRefs)\n }\n\n // Process root schema last if provided\n if (rootSchema && typeof rootSchema === 'object') {\n if (rootSchema.allOf) {\n const nestedMerged = mergeAllOfSchemas(rootSchema, undefined, seenRefs)\n mergeSchemaIntoResult(result, nestedMerged, true, seenRefs)\n } else {\n mergeSchemaIntoResult(result, rootSchema, true, seenRefs)\n }\n }\n\n return result\n}\n\n/**\n * Efficiently merges a source schema into a target result object.\n * Handles all schema merging logic in a single optimized function.\n *\n * @param result - The target schema object to merge into\n * @param schema - The source schema object to merge from\n * @param override - Whether to override existing properties (default: false)\n */\nconst mergeSchemaIntoResult = (\n result: SchemaObject,\n schema: SchemaObject,\n override: boolean = false,\n seenRefs: Set<string> = new Set(),\n): void => {\n // Early return if schema is empty\n const schemaKeys = objectKeys(schema)\n if (schemaKeys.length === 0) {\n return\n }\n\n // Loop through all schema properties and handle them appropriately\n for (const key of schemaKeys) {\n const value = getResolvedRef(schema[key]) as any\n\n if (value === undefined) {\n continue\n }\n\n // Required\n if ((key as string) === 'required') {\n // Merge required fields with deduplication\n if (Array.isArray(value) && value.length > 0) {\n // @ts-expect-error\n if (result.required?.length) {\n // @ts-expect-error\n result.required = [...new Set([...result.required, ...value])]\n } else {\n // @ts-expect-error\n result.required = value.slice()\n }\n }\n }\n // Properties\n else if ((key as string) === 'properties') {\n // Merge properties recursively\n if (value && typeof value === 'object') {\n // @ts-expect-error\n if (!result.properties) {\n // @ts-expect-error\n result.properties = {}\n }\n\n // @ts-expect-error\n mergePropertiesIntoResult(result.properties, value, seenRefs)\n }\n }\n // Items\n else if ((key as string) === 'items') {\n // Handle items (for both arrays and objects with items)\n const items = resolve.schema(value)\n if (items) {\n if (isArraySchema(schema)) {\n // @ts-expect-error\n if (!result.items) {\n // @ts-expect-error\n result.items = {}\n }\n\n // Handle allOf within array items\n if (items.allOf) {\n const mergedItems = mergeAllOfSchemas(items, undefined, seenRefs)\n // @ts-expect-error\n Object.assign(result.items, mergedItems)\n } else {\n // @ts-expect-error\n mergeItemsIntoResult(getResolvedRef(result.items), items, seenRefs)\n }\n }\n // For non-array types with items.allOf, merge into properties\n else if (items.allOf) {\n const mergedItems = mergeAllOfSchemas(items, undefined, seenRefs)\n if ('properties' in mergedItems) {\n if (!('properties' in result)) {\n // @ts-expect-error\n result.properties = {}\n }\n\n 'properties' in result && mergePropertiesIntoResult(result.properties, mergedItems.properties, seenRefs)\n }\n }\n // For non-array types without allOf, still set items if not already set\n else if (!('items' in result)) {\n // @ts-expect-error\n result.items = items\n }\n }\n }\n // Enum\n else if (key === 'enum') {\n if (Array.isArray(value) && value.length > 0) {\n result.enum = [...new Set([...(result.enum || []), ...value])]\n }\n }\n // OneOf/AnyOf\n else if (key === 'oneOf' || key === 'anyOf') {\n // Preserve the composition itself so its variants keep rendering as a\n // selector. Flattening the option properties into the parent would drop\n // the variant structure entirely and silently lose branches that have no\n // top-level `properties` (for example branches that are themselves an\n // `allOf`). The sibling `allOf` members stay on `result` as base\n // properties, which the Schema component renders above the selector.\n if (Array.isArray(value) && value.length > 0 && (override || result[key] === undefined)) {\n result[key] = value\n }\n }\n // Skip allOf as it's handled at a higher level\n else if (key === 'allOf') {\n continue\n }\n // For all other properties, preserve the first occurrence or override if specified.\n // Annotation keywords (see LAST_WINS_KEYS) always take the latest value so a later\n // allOf member can override an earlier one.\n else {\n if (override || LAST_WINS_KEYS.has(key as string) || result[key] === undefined) {\n result[key] = value\n }\n }\n }\n}\n\n/**\n * Efficiently merges properties into a result object without creating new objects.\n */\nconst mergePropertiesIntoResult = (\n result: Extract<SchemaObject, { type: 'object' }>['properties'],\n properties: Extract<SchemaObject, { type: 'object' }>['properties'],\n seenRefs: Set<string> = new Set(),\n): void => {\n const propertyKeys = Object.keys(properties ?? {})\n if (!properties || !result || propertyKeys.length === 0) {\n return\n }\n\n for (const key of propertyKeys) {\n const schema = resolve.schema(properties[key])\n if (!schema) {\n delete result[key]\n continue\n }\n\n if (typeof schema !== 'object') {\n result[key] = schema\n continue\n }\n\n if (!result[key]) {\n // Break self-referential cycles reached through `allOf`. When a brand-new\n // property's `$ref` is already being merged higher in the call stack,\n // keep the raw reference instead of recursing into its `allOf` forever.\n // This mirrors the guard in the \"merge existing property\" branch below and\n // covers schemas that point back at themselves through an `allOf` member\n // (e.g. a node whose `self` property $refs the node, which is an allOf).\n const rawProperty = properties[key]\n const newSchemaRef = (rawProperty as { $ref?: string })?.$ref\n if (rawProperty && typeof newSchemaRef === 'string' && seenRefs.has(newSchemaRef)) {\n result[key] = rawProperty\n continue\n }\n const nextNewSeenRefs = typeof newSchemaRef === 'string' ? new Set(seenRefs).add(newSchemaRef) : seenRefs\n\n // Handle new property with allOf\n if (schema.allOf) {\n result[key] = mergeAllOfSchemas(schema, undefined, nextNewSeenRefs)\n } else if (isArraySchema(schema) && resolve.schema(schema.items)?.allOf) {\n result[key] = {\n ...schema,\n items: mergeAllOfSchemas(resolve.schema(schema.items), undefined, seenRefs),\n }\n } else if (properties[key]) {\n result[key] = properties[key]\n }\n continue\n }\n\n // Merge existing property\n const existing = resolve.schema(result[key])\n\n // Break self-referential cycles: when this property's `$ref` is already\n // being merged higher in the call stack, keep the partially merged existing\n // schema instead of recursing into it again. This mirrors the guard in\n // `mergeItems` and covers schemas that point back at themselves through a\n // plain object property (e.g. a tree node whose `parent` $refs the node).\n const schemaRef = (schema as { $ref?: string }).$ref\n if (typeof schemaRef === 'string' && seenRefs.has(schemaRef)) {\n result[key] = existing\n continue\n }\n const nextSeenRefs = typeof schemaRef === 'string' ? new Set(seenRefs).add(schemaRef) : seenRefs\n\n if (schema.allOf) {\n result[key] = mergeAllOfSchemas({ allOf: [existing, ...schema.allOf] } as SchemaObject, undefined, nextSeenRefs)\n } else if (isArraySchema(schema) && isArraySchema(existing) && schema.items) {\n const existingItems = resolve.schema(existing.items)\n result[key] = {\n ...existing,\n type: 'array',\n items: existingItems\n ? mergeItems(existingItems, resolve.schema(schema.items), nextSeenRefs)\n : resolve.schema(schema.items),\n }\n } else {\n // Create merged object with properties handled separately\n if ('properties' in existing && 'properties' in schema) {\n const merged = { ...existing, ...schema }\n merged.properties = { ...existing.properties }\n mergePropertiesIntoResult(merged.properties, schema.properties, nextSeenRefs)\n result[key] = merged\n }\n // Simple merge without property recursion\n else {\n result[key] = { ...schema, ...existing }\n }\n }\n }\n}\n\n/**\n * Efficiently merges array items into a result object.\n */\nconst mergeItemsIntoResult = (result: SchemaObject, items: SchemaObject, seenRefs: Set<string> = new Set()): void => {\n // Handle allOf in items\n if (items.allOf || result.allOf) {\n // Build array without spreads for better performance\n const allOfSchemas: SchemaObject[] = []\n\n if (result.allOf) {\n for (const schema of result.allOf) {\n allOfSchemas.push(resolve.schema(schema))\n }\n } else {\n allOfSchemas.push(result)\n }\n\n if (items.allOf) {\n for (const schema of items.allOf) {\n allOfSchemas.push(resolve.schema(schema))\n }\n } else {\n allOfSchemas.push(items)\n }\n\n const merged = mergeAllOfSchemas({ allOf: allOfSchemas } as SchemaObject, undefined, seenRefs)\n Object.assign(result, merged)\n return\n }\n\n // Regular merge\n Object.assign(result, items)\n\n // Merge properties if both have them\n if ('properties' in result && 'properties' in items) {\n mergePropertiesIntoResult(result.properties, items.properties, seenRefs)\n }\n}\n\n/**\n * Helper function for merging items that returns a new object.\n */\nconst mergeItems = (\n existing: SchemaObject,\n incoming: SchemaObject,\n seenRefs: Set<string> = new Set(),\n): SchemaObject => {\n const incomingRef = (incoming as { $ref?: string }).$ref\n\n if (typeof incomingRef === 'string') {\n if (seenRefs.has(incomingRef)) {\n return existing\n }\n return mergeItemsInner(existing, incoming, new Set(seenRefs).add(incomingRef))\n }\n\n return mergeItemsInner(existing, incoming, seenRefs)\n}\n\nconst mergeItemsInner = (\n existing: SchemaObject,\n incoming: SchemaObject,\n seenRefs: Set<string> = new Set(),\n): SchemaObject => {\n // Handle allOf in either schema\n if (existing.allOf || incoming.allOf) {\n // Build array without spreads for better performance\n const allOfSchemas: SchemaObject[] = []\n\n if (existing.allOf) {\n for (const schema of existing.allOf) {\n allOfSchemas.push(resolve.schema(schema))\n }\n } else {\n allOfSchemas.push(existing)\n }\n\n if (incoming.allOf) {\n for (const schema of incoming.allOf) {\n allOfSchemas.push(resolve.schema(schema))\n }\n } else {\n allOfSchemas.push(incoming)\n }\n\n return mergeAllOfSchemas({ allOf: allOfSchemas } as SchemaObject, undefined, seenRefs)\n }\n\n const merged = { ...existing, ...incoming }\n\n // Recursively merge properties if both have properties\n if ('properties' in existing && 'properties' in incoming) {\n // @ts-expect-error\n merged.properties = { ...existing.properties }\n // @ts-expect-error\n mergePropertiesIntoResult(merged.properties, incoming.properties, seenRefs)\n }\n\n return merged as SchemaObject\n}\n"],"mappings":";;;;;;;;;;;AAYA,IAAM,iBAAiB,IAAI,IAAY,CAAC,eAAe,QAAQ,CAAC;;;;;;;;;;AAWhE,IAAa,qBACX,SACA,YACA,2BAAwB,IAAI,KAAK,KAChB;AAEjB,KAAI,CAAC,SAAS,OAAO,UAAU,CAAC,MAAM,QAAQ,QAAQ,MAAM,CAC1D,QAAO,cAAe,EAAE;CAI1B,MAAM,SAAS,EAAE;CAGjB,MAAM,EAAE,OAAO,GAAG,GAAG,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,OAAO,OAAO,CAAC;MAG3C,cAAa,KAAK,SAAS;AAG7B,SAAO,kBAAkB,EAAE,OAAO,cAAc,EAAkB,KAAA,GAAW,SAAS;;CAGxF,MAAM,SAAS;EAAE,GAAG;EAAU,GAAG;EAAU;AAG3C,KAAI,gBAAgB,YAAY,gBAAgB,UAAU;AAExD,SAAO,aAAa,EAAE,GAAG,SAAS,YAAY;AAE9C,4BAA0B,OAAO,YAAY,SAAS,YAAY,SAAS;;AAG7E,QAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"TagSection.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Tags/components/TagSection.vue"],"names":[],"mappings":"AAwEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAA;AAgB9E,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,YAAY,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;CACnC,CAAC;AAmNF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"TagSection.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Tags/components/TagSection.vue"],"names":[],"mappings":"AAwFA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAA;AAkB9E,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,YAAY,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;CACnC,CAAC;AA2OF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TagSection.vue.js","names":[],"sources":["../../../../../src/components/Content/Tags/components/TagSection.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { TraversedTag } from '@scalar/workspace-store/schemas/navigation'\n\nimport { Anchor } from '@/components/Anchor'\nimport { OperationsList } from '@/components/OperationsList'\nimport ScreenReader from '@/components/ScreenReader.vue'\nimport {\n Section,\n SectionColumn,\n SectionColumns,\n SectionContent,\n SectionHeader,\n SectionHeaderTag,\n} from '@/components/Section'\nimport { useLocalization } from '@/features/localization'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nconst { tag, headerId, isCollapsed } = defineProps<{\n tag: TraversedTag\n headerId?: string\n isCollapsed?: boolean\n eventBus: WorkspaceEventBus | null\n}>()\nconst { translate } = useLocalization()\n</script>\n<template>\n <Section\n v-if=\"tag\"\n :id=\"tag.id\"\n role=\"none\"\n @intersecting=\"\n () => eventBus?.emit('intersecting:nav-item', { id: tag.id })\n \">\n <SectionHeader>\n <Anchor\n @copyAnchorUrl=\"\n () => eventBus?.emit('copy-url:nav-item', { id: tag.id })\n \">\n <SectionHeaderTag\n :id=\"headerId\"\n :level=\"2\">\n {{ tag.title }}\n <ScreenReader v-if=\"isCollapsed\">\n ({{ translate('navigation.collapsed') }})\n </ScreenReader>\n </SectionHeaderTag>\n </Anchor>\n </SectionHeader>\n <SectionContent>\n <SectionColumns>\n <SectionColumn>\n <ScalarMarkdown\n :clamp=\"isCollapsed ? 7 : undefined\"\n :value=\"tag?.description ?? ''\"\n withImages />\n </SectionColumn>\n <SectionColumn>\n <OperationsList\n :eventBus=\"eventBus\"\n :tag=\"tag\" />\n </SectionColumn>\n </SectionColumns>\n </SectionContent>\n <SpecificationExtension :value=\"tag.xKeys\" />\n </Section>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"TagSection.vue.js","names":[],"sources":["../../../../../src/components/Content/Tags/components/TagSection.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { TraversedTag } from '@scalar/workspace-store/schemas/navigation'\nimport { computed } from 'vue'\n\nimport { Anchor } from '@/components/Anchor'\nimport ChannelsList from '@/components/Content/AsyncApi/ChannelsList.vue'\nimport { OperationsList } from '@/components/OperationsList'\nimport ScreenReader from '@/components/ScreenReader.vue'\nimport {\n Section,\n SectionColumn,\n SectionColumns,\n SectionContent,\n SectionHeader,\n SectionHeaderTag,\n} from '@/components/Section'\nimport { useLocalization } from '@/features/localization'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nconst { tag, headerId, isCollapsed } = defineProps<{\n tag: TraversedTag\n headerId?: string\n isCollapsed?: boolean\n eventBus: WorkspaceEventBus | null\n}>()\nconst { translate } = useLocalization()\n\n/**\n * AsyncAPI tags carry `asyncapi-channel` children instead of `operation`/`webhook`,\n * so they get a dedicated channel list rather than the (empty) operations card.\n */\nconst hasChannels = computed(\n () =>\n tag.children?.some((child) => child.type === 'asyncapi-channel') ?? false,\n)\n</script>\n<template>\n <Section\n v-if=\"tag\"\n :id=\"tag.id\"\n role=\"none\"\n @intersecting=\"\n () => eventBus?.emit('intersecting:nav-item', { id: tag.id })\n \">\n <SectionHeader>\n <Anchor\n @copyAnchorUrl=\"\n () => eventBus?.emit('copy-url:nav-item', { id: tag.id })\n \">\n <SectionHeaderTag\n :id=\"headerId\"\n :level=\"2\">\n {{ tag.title }}\n <ScreenReader v-if=\"isCollapsed\">\n ({{ translate('navigation.collapsed') }})\n </ScreenReader>\n </SectionHeaderTag>\n </Anchor>\n </SectionHeader>\n <SectionContent>\n <SectionColumns>\n <SectionColumn>\n <ScalarMarkdown\n :clamp=\"isCollapsed ? 7 : undefined\"\n :value=\"tag?.description ?? ''\"\n withImages />\n </SectionColumn>\n <SectionColumn>\n <ChannelsList\n v-if=\"hasChannels\"\n :eventBus=\"eventBus\"\n :tag=\"tag\" />\n <OperationsList\n v-else\n :eventBus=\"eventBus\"\n :tag=\"tag\" />\n </SectionColumn>\n </SectionColumns>\n </SectionContent>\n <SpecificationExtension :value=\"tag.xKeys\" />\n </Section>\n</template>\n"],"mappings":""}
@@ -8,8 +8,9 @@ import SectionHeaderTag_default from "../../../Section/SectionHeaderTag.vue.js";
8
8
  import ScreenReader_default from "../../../ScreenReader.vue.js";
9
9
  import Anchor_default from "../../../Anchor/Anchor.vue.js";
10
10
  import SpecificationExtension_default from "../../../../features/specification-extension/SpecificationExtension.vue.js";
11
+ import ChannelsList_default from "../../AsyncApi/ChannelsList.vue.js";
11
12
  import OperationsList_default from "../../../OperationsList/OperationsList.vue.js";
12
- import { createBlock, createCommentVNode, createTextVNode, createVNode, defineComponent, openBlock, toDisplayString, unref, withCtx } from "vue";
13
+ import { computed, createBlock, createCommentVNode, createTextVNode, createVNode, defineComponent, openBlock, toDisplayString, unref, withCtx } from "vue";
13
14
  import { ScalarMarkdown } from "@scalar/components/markdown";
14
15
  //#region src/components/Content/Tags/components/TagSection.vue?vue&type=script&setup=true&lang.ts
15
16
  var TagSection_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
@@ -22,6 +23,11 @@ var TagSection_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ def
22
23
  },
23
24
  setup(__props) {
24
25
  const { translate } = useLocalization();
26
+ /**
27
+ * AsyncAPI tags carry `asyncapi-channel` children instead of `operation`/`webhook`,
28
+ * so they get a dedicated channel list rather than the (empty) operations card.
29
+ */
30
+ const hasChannels = computed(() => __props.tag.children?.some((child) => child.type === "asyncapi-channel") ?? false);
25
31
  return (_ctx, _cache) => {
26
32
  return __props.tag ? (openBlock(), createBlock(unref(Section_default), {
27
33
  key: 0,
@@ -56,10 +62,15 @@ var TagSection_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ def
56
62
  }, null, 8, ["clamp", "value"])]),
57
63
  _: 1
58
64
  }), createVNode(unref(SectionColumn_default), null, {
59
- default: withCtx(() => [createVNode(unref(OperationsList_default), {
65
+ default: withCtx(() => [hasChannels.value ? (openBlock(), createBlock(ChannelsList_default, {
66
+ key: 0,
60
67
  eventBus: __props.eventBus,
61
68
  tag: __props.tag
62
- }, null, 8, ["eventBus", "tag"])]),
69
+ }, null, 8, ["eventBus", "tag"])) : (openBlock(), createBlock(unref(OperationsList_default), {
70
+ key: 1,
71
+ eventBus: __props.eventBus,
72
+ tag: __props.tag
73
+ }, null, 8, ["eventBus", "tag"]))]),
63
74
  _: 1
64
75
  })]),
65
76
  _: 1
@@ -1 +1 @@
1
- {"version":3,"file":"TagSection.vue.script.js","names":[],"sources":["../../../../../src/components/Content/Tags/components/TagSection.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { TraversedTag } from '@scalar/workspace-store/schemas/navigation'\n\nimport { Anchor } from '@/components/Anchor'\nimport { OperationsList } from '@/components/OperationsList'\nimport ScreenReader from '@/components/ScreenReader.vue'\nimport {\n Section,\n SectionColumn,\n SectionColumns,\n SectionContent,\n SectionHeader,\n SectionHeaderTag,\n} from '@/components/Section'\nimport { useLocalization } from '@/features/localization'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nconst { tag, headerId, isCollapsed } = defineProps<{\n tag: TraversedTag\n headerId?: string\n isCollapsed?: boolean\n eventBus: WorkspaceEventBus | null\n}>()\nconst { translate } = useLocalization()\n</script>\n<template>\n <Section\n v-if=\"tag\"\n :id=\"tag.id\"\n role=\"none\"\n @intersecting=\"\n () => eventBus?.emit('intersecting:nav-item', { id: tag.id })\n \">\n <SectionHeader>\n <Anchor\n @copyAnchorUrl=\"\n () => eventBus?.emit('copy-url:nav-item', { id: tag.id })\n \">\n <SectionHeaderTag\n :id=\"headerId\"\n :level=\"2\">\n {{ tag.title }}\n <ScreenReader v-if=\"isCollapsed\">\n ({{ translate('navigation.collapsed') }})\n </ScreenReader>\n </SectionHeaderTag>\n </Anchor>\n </SectionHeader>\n <SectionContent>\n <SectionColumns>\n <SectionColumn>\n <ScalarMarkdown\n :clamp=\"isCollapsed ? 7 : undefined\"\n :value=\"tag?.description ?? ''\"\n withImages />\n </SectionColumn>\n <SectionColumn>\n <OperationsList\n :eventBus=\"eventBus\"\n :tag=\"tag\" />\n </SectionColumn>\n </SectionColumns>\n </SectionContent>\n <SpecificationExtension :value=\"tag.xKeys\" />\n </Section>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAyBA,MAAM,EAAE,cAAc,iBAAgB;;UAI5B,QAAA,OAAA,WAAA,EADR,YAsCU,MAAA,gBAAA,EAAA;;IApCP,IAAI,QAAA,IAAI;IACT,MAAK;IACJ,gBAAY,OAAA,OAAA,OAAA,WAAe,QAAA,UAAU,KAAI,yBAAA,EAAA,IAAgC,QAAA,IAAI,IAAE,CAAA;;2BAiBhE;KAdhB,YAcgB,MAAA,sBAAA,EAAA,MAAA;6BADL,CAZT,YAYS,MAAA,eAAA,EAAA,EAXN,iBAAa,OAAA,OAAA,OAAA,WAAmB,QAAA,UAAU,KAAI,qBAAA,EAAA,IAA4B,QAAA,IAAI,IAAE,CAAA,GAAA,EAAA;8BAU9D,CAPnB,YAOmB,MAAA,yBAAA,EAAA;QANhB,IAAI,QAAA;QACJ,OAAO;;+BACO,CAAA,gBAAA,gBAAZ,QAAA,IAAI,MAAK,GAAG,KACf,EAAA,EAAoB,QAAA,eAAA,WAAA,EAApB,YAEe,sBAAA,EAAA,KAAA,GAAA,EAAA;gCADZ,CAAA,gBAD8B,OAC9B,gBAAG,MAAA,UAAS,CAAA,uBAAA,CAAA,GAA2B,MAC1C,EAAA,CAAA,CAAA;;;;;;;;;KAIN,YAciB,MAAA,uBAAA,EAAA,MAAA;6BADE,CAZjB,YAYiB,MAAA,uBAAA,EAAA,MAAA;8BANC,CALhB,YAKgB,MAAA,sBAAA,EAAA,MAAA;+BADC,CAHf,YAGe,MAAA,eAAA,EAAA;SAFZ,OAAO,QAAA,cAAW,IAAO,KAAA;SACzB,OAAO,QAAA,KAAK,eAAW;SACxB,YAAA;;;WAEJ,YAIgB,MAAA,sBAAA,EAAA,MAAA;+BADC,CAFf,YAEe,MAAA,uBAAA,EAAA;SADZ,UAAU,QAAA;SACV,KAAK,QAAA;;;;;;;;KAId,YAA6C,MAAA,+BAAA,EAAA,EAApB,OAAO,QAAA,IAAI,OAAA,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA"}
1
+ {"version":3,"file":"TagSection.vue.script.js","names":[],"sources":["../../../../../src/components/Content/Tags/components/TagSection.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { TraversedTag } from '@scalar/workspace-store/schemas/navigation'\nimport { computed } from 'vue'\n\nimport { Anchor } from '@/components/Anchor'\nimport ChannelsList from '@/components/Content/AsyncApi/ChannelsList.vue'\nimport { OperationsList } from '@/components/OperationsList'\nimport ScreenReader from '@/components/ScreenReader.vue'\nimport {\n Section,\n SectionColumn,\n SectionColumns,\n SectionContent,\n SectionHeader,\n SectionHeaderTag,\n} from '@/components/Section'\nimport { useLocalization } from '@/features/localization'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nconst { tag, headerId, isCollapsed } = defineProps<{\n tag: TraversedTag\n headerId?: string\n isCollapsed?: boolean\n eventBus: WorkspaceEventBus | null\n}>()\nconst { translate } = useLocalization()\n\n/**\n * AsyncAPI tags carry `asyncapi-channel` children instead of `operation`/`webhook`,\n * so they get a dedicated channel list rather than the (empty) operations card.\n */\nconst hasChannels = computed(\n () =>\n tag.children?.some((child) => child.type === 'asyncapi-channel') ?? false,\n)\n</script>\n<template>\n <Section\n v-if=\"tag\"\n :id=\"tag.id\"\n role=\"none\"\n @intersecting=\"\n () => eventBus?.emit('intersecting:nav-item', { id: tag.id })\n \">\n <SectionHeader>\n <Anchor\n @copyAnchorUrl=\"\n () => eventBus?.emit('copy-url:nav-item', { id: tag.id })\n \">\n <SectionHeaderTag\n :id=\"headerId\"\n :level=\"2\">\n {{ tag.title }}\n <ScreenReader v-if=\"isCollapsed\">\n ({{ translate('navigation.collapsed') }})\n </ScreenReader>\n </SectionHeaderTag>\n </Anchor>\n </SectionHeader>\n <SectionContent>\n <SectionColumns>\n <SectionColumn>\n <ScalarMarkdown\n :clamp=\"isCollapsed ? 7 : undefined\"\n :value=\"tag?.description ?? ''\"\n withImages />\n </SectionColumn>\n <SectionColumn>\n <ChannelsList\n v-if=\"hasChannels\"\n :eventBus=\"eventBus\"\n :tag=\"tag\" />\n <OperationsList\n v-else\n :eventBus=\"eventBus\"\n :tag=\"tag\" />\n </SectionColumn>\n </SectionColumns>\n </SectionContent>\n <SpecificationExtension :value=\"tag.xKeys\" />\n </Section>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EA2BA,MAAM,EAAE,cAAc,iBAAgB;;;;;EAMtC,MAAM,cAAc,eAEhB,QAAA,IAAI,UAAU,MAAM,UAAU,MAAM,SAAS,mBAAmB,IAAI,MACxE;;UAIU,QAAA,OAAA,WAAA,EADR,YA2CU,MAAA,gBAAA,EAAA;;IAzCP,IAAI,QAAA,IAAI;IACT,MAAK;IACJ,gBAAY,OAAA,OAAA,OAAA,WAAe,QAAA,UAAU,KAAI,yBAAA,EAAA,IAAgC,QAAA,IAAI,IAAE,CAAA;;2BAiBhE;KAdhB,YAcgB,MAAA,sBAAA,EAAA,MAAA;6BADL,CAZT,YAYS,MAAA,eAAA,EAAA,EAXN,iBAAa,OAAA,OAAA,OAAA,WAAmB,QAAA,UAAU,KAAI,qBAAA,EAAA,IAA4B,QAAA,IAAI,IAAE,CAAA,GAAA,EAAA;8BAU9D,CAPnB,YAOmB,MAAA,yBAAA,EAAA;QANhB,IAAI,QAAA;QACJ,OAAO;;+BACO,CAAA,gBAAA,gBAAZ,QAAA,IAAI,MAAK,GAAG,KACf,EAAA,EAAoB,QAAA,eAAA,WAAA,EAApB,YAEe,sBAAA,EAAA,KAAA,GAAA,EAAA;gCADZ,CAAA,gBAD8B,OAC9B,gBAAG,MAAA,UAAS,CAAA,uBAAA,CAAA,GAA2B,MAC1C,EAAA,CAAA,CAAA;;;;;;;;;KAIN,YAmBiB,MAAA,uBAAA,EAAA,MAAA;6BADE,CAjBjB,YAiBiB,MAAA,uBAAA,EAAA,MAAA;8BAXC,CALhB,YAKgB,MAAA,sBAAA,EAAA,MAAA;+BADC,CAHf,YAGe,MAAA,eAAA,EAAA;SAFZ,OAAO,QAAA,cAAW,IAAO,KAAA;SACzB,OAAO,QAAA,KAAK,eAAW;SACxB,YAAA;;;WAEJ,YASgB,MAAA,sBAAA,EAAA,MAAA;+BALC,CAFP,YAAA,SAAA,WAAA,EADR,YAGe,sBAAA;;SADZ,UAAU,QAAA;SACV,KAAK,QAAA;0DACR,YAGe,MAAA,uBAAA,EAAA;;SADZ,UAAU,QAAA;SACV,KAAK,QAAA;;;;;;;;KAId,YAA6C,MAAA,+BAAA,EAAA,EAApB,OAAO,QAAA,IAAI,OAAA,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"AAmSA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAClB,MAAM,8DAA8D,CAAA;AAerE,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,eAAe,CAAA;IAC1B,OAAO,EAAE;QACP,4BAA4B,EAAE,OAAO,GAAG,SAAS,CAAA;QACjD,uBAAuB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;QACzD,UAAU,EAAE,OAAO,GAAG,SAAS,CAAA;QAC/B,yBAAyB,EAAE,OAAO,GAAG,SAAS,CAAA;KAC/C,CAAA;CACF,CAAC;AAuGF,KAAK,gBAAgB,GAAG;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAuRxD,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;;;;kFAGd,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":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"AA4SA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAClB,MAAM,8DAA8D,CAAA;AAgBrE,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,eAAe,CAAA;IAC1B,OAAO,EAAE;QACP,4BAA4B,EAAE,OAAO,GAAG,SAAS,CAAA;QACjD,uBAAuB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;QACzD,UAAU,EAAE,OAAO,GAAG,SAAS,CAAA;QAC/B,yBAAyB,EAAE,OAAO,GAAG,SAAS,CAAA;KAC/C,CAAA;CACF,CAAC;AA+GF,KAAK,gBAAgB,GAAG;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAuRxD,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;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
2
2
  import RequestBody_vue_vue_type_script_setup_true_lang_default from "./RequestBody.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/features/Operation/components/RequestBody.vue
5
- var RequestBody_default = /* @__PURE__ */ _plugin_vue_export_helper_default(RequestBody_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-6092df54"]]);
5
+ var RequestBody_default = /* @__PURE__ */ _plugin_vue_export_helper_default(RequestBody_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-96399c9a"]]);
6
6
  //#endregion
7
7
  export { RequestBody_default as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.js","names":[],"sources":["../../../../src/features/Operation/components/RequestBody.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n OpenApiDocument,\n RequestBodyObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { Schema } from '@/components/Content/Schema'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { getModelNameFromSchema } from '@/components/Content/Schema/helpers/schema-name'\nimport {\n reduceNamesToObject,\n sortPropertyNames,\n} from '@/components/Content/Schema/helpers/sort-property-names'\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\nimport { useLocalization } from '@/features/localization'\n\nimport ContentTypeSelect from './ContentTypeSelect.vue'\n\nconst { requestBody, options, document } = defineProps<{\n breadcrumb?: string[]\n requestBody?: RequestBodyObject\n eventBus: WorkspaceEventBus | null\n /** The document the request body belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: {\n orderRequiredPropertiesFirst: boolean | undefined\n orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined\n hideModels: boolean | undefined\n expandAllSchemaProperties: boolean | undefined\n }\n}>()\nconst { translate } = useLocalization()\n\n/**\n * The maximum number of properties to show in the request body schema.\n */\nconst MAX_VISIBLE_PROPERTIES = 12\n\nconst availableContentTypes = computed(() =>\n Object.keys(requestBody?.content ?? {}),\n)\n\nconst selectedContentType = defineModel<string>('selectedContentType', {\n default: 'application/json',\n})\n\nif (requestBody?.content) {\n if (availableContentTypes.value[0]) {\n selectedContentType.value = availableContentTypes.value[0]\n }\n}\n\n/** Raw schema (possibly with $ref) for the selected content type */\nconst rawSchema = computed(\n () => requestBody?.content?.[selectedContentType.value]?.schema,\n)\n\nconst schema = computed(() => getResolvedRef(rawSchema.value))\n\n/** When the schema is a $ref, preserve its name so the UI can show the ref name instead of just the type. */\nconst modelLink = computed(\n () => (rawSchema.value && getModelNameFromSchema(rawSchema.value)) ?? null,\n)\n\n/**\n * Splits schema properties into visible and collapsed sections when there are more than 12 properties.\n * Returns null for schemas with fewer properties or non-object schemas.\n */\nconst partitionedSchema = computed(() => {\n // Early return if not an object schema\n if (!schema.value || !isTypeObject(schema.value)) {\n return null\n }\n\n // Lets sort the names first\n const sortedNames = sortPropertyNames(\n schema.value,\n schema.value.discriminator,\n {\n hideReadOnly: true,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n },\n )\n\n if (sortedNames.length <= MAX_VISIBLE_PROPERTIES) {\n return null\n }\n\n // Destructure everything except properties\n const { properties, ...schemaMetadata } = schema.value\n if (!properties) {\n return null\n }\n\n return {\n visibleProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(0, MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n collapsedProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n }\n})\n\n/**\n * We don't want to render the request body if its completely empty\n * @example\n * {\n * \"content\": {},\n * }\n */\nconst shouldRenderRequestBody = computed(\n () =>\n Object.keys(requestBody?.content ?? {}).length > 0 ||\n requestBody?.description ||\n requestBody?.required,\n)\n</script>\n<template>\n <div\n v-if=\"requestBody && shouldRenderRequestBody\"\n :aria-label=\"translate('operation.requestBody')\"\n class=\"request-body\"\n role=\"group\">\n <div class=\"request-body-header\">\n <div class=\"request-body-title\">\n <slot name=\"title\" />\n <span\n v-if=\"modelLink\"\n class=\"text-c-2 text-xs leading-none font-normal\"\n data-testid=\"request-body-schema-name\">\n <span class=\"text-c-3 mx-1.5\">·</span>\n <LinkButton\n v-if=\"eventBus && modelLink.schemaKey\"\n @click=\"\n eventBus.emit('scroll-to:model-by-name', {\n name: modelLink.schemaKey,\n })\n \">\n {{ modelLink.label }}\n </LinkButton>\n <template v-else>{{ modelLink.label }}</template>\n </span>\n </div>\n <div class=\"flex items-center gap-2\">\n <div\n v-if=\"requestBody.required\"\n class=\"request-body-required\">\n {{ translate('common.required') }}\n </div>\n <ContentTypeSelect\n v-model=\"selectedContentType\"\n :content=\"requestBody.content\" />\n </div>\n <div\n v-if=\"requestBody.description\"\n class=\"request-body-description\">\n <ScalarMarkdown :value=\"requestBody.description\" />\n </div>\n </div>\n\n <!-- For over 12 properties we want to show 12 and collapse the rest -->\n <div\n v-if=\"partitionedSchema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :name=\"translate('operation.requestBody')\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"partitionedSchema.visibleProperties\"\n schemaContext=\"requestBody\" />\n\n <Schema\n additionalProperties\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n hideDescription\n :name=\"translate('operation.requestBody')\"\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"partitionedSchema.collapsedProperties\"\n schemaContext=\"requestBody\" />\n </div>\n\n <!-- Show em all 12 and under -->\n <div\n v-else-if=\"schema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :hideReadOnly=\"true\"\n :name=\"translate('operation.requestBody')\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"schema\"\n schemaContext=\"requestBody\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n.request-body {\n margin-top: 24px;\n}\n.request-body-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding-bottom: 12px;\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n flex-flow: wrap;\n}\n.request-body-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: var(--scalar-font-size-2);\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color-1);\n}\n.request-body-required {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-orange);\n font-weight: normal;\n border-radius: 16px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 2px 8px;\n height: 20px;\n}\n.request-body-description {\n margin-top: 6px;\n font-size: var(--scalar-small);\n width: 100%;\n}\n\n.request-body-header\n + .request-body-schema:has(> .schema-card > .schema-card-description),\n.request-body-header\n + .request-body-schema:has(\n > .schema-card > .schema-properties > * > .property--level-0\n ) {\n /** Add a bit of space between the heading border and the schema description or properties */\n padding-top: 8px;\n}\n.request-body-description :deep(.markdown) * {\n color: var(--scalar-color-2) !important;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"RequestBody.vue.js","names":[],"sources":["../../../../src/features/Operation/components/RequestBody.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n OpenApiDocument,\n RequestBodyObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { Schema } from '@/components/Content/Schema'\nimport { inferDiscriminatorMappingComposition } from '@/components/Content/Schema/helpers/get-compositions-to-render'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { getModelNameFromSchema } from '@/components/Content/Schema/helpers/schema-name'\nimport {\n reduceNamesToObject,\n sortPropertyNames,\n} from '@/components/Content/Schema/helpers/sort-property-names'\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\nimport { useLocalization } from '@/features/localization'\n\nimport ContentTypeSelect from './ContentTypeSelect.vue'\n\nconst { requestBody, options, document } = defineProps<{\n breadcrumb?: string[]\n requestBody?: RequestBodyObject\n eventBus: WorkspaceEventBus | null\n /** The document the request body belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: {\n orderRequiredPropertiesFirst: boolean | undefined\n orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined\n hideModels: boolean | undefined\n expandAllSchemaProperties: boolean | undefined\n }\n}>()\nconst { translate } = useLocalization()\n\n/**\n * The maximum number of properties to show in the request body schema.\n */\nconst MAX_VISIBLE_PROPERTIES = 12\n\nconst availableContentTypes = computed(() =>\n Object.keys(requestBody?.content ?? {}),\n)\n\nconst selectedContentType = defineModel<string>('selectedContentType', {\n default: 'application/json',\n})\n\nif (requestBody?.content) {\n if (availableContentTypes.value[0]) {\n selectedContentType.value = availableContentTypes.value[0]\n }\n}\n\n/** Raw schema (possibly with $ref) for the selected content type */\nconst rawSchema = computed(\n () => requestBody?.content?.[selectedContentType.value]?.schema,\n)\n\nconst schema = computed(() => getResolvedRef(rawSchema.value))\n\n/** When the schema is a $ref, preserve its name so the UI can show the ref name instead of just the type. */\nconst modelLink = computed(\n () => (rawSchema.value && getModelNameFromSchema(rawSchema.value)) ?? null,\n)\n\n/**\n * Splits schema properties into visible and collapsed sections when there are more than 12 properties.\n * Returns null for schemas with fewer properties or non-object schemas.\n */\nconst partitionedSchema = computed(() => {\n // Early return if not an object schema\n if (!schema.value || !isTypeObject(schema.value)) {\n return null\n }\n\n // A schema whose variants are inferred from a `discriminator.mapping` renders\n // as a single variant selector, not a flat property list. Splitting it would\n // duplicate that selector across the visible and collapsed blocks, so we keep\n // it whole. See https://github.com/scalar/scalar/issues/7472\n if (inferDiscriminatorMappingComposition(schema.value, document)) {\n return null\n }\n\n // Lets sort the names first\n const sortedNames = sortPropertyNames(\n schema.value,\n schema.value.discriminator,\n {\n hideReadOnly: true,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n },\n )\n\n if (sortedNames.length <= MAX_VISIBLE_PROPERTIES) {\n return null\n }\n\n // Destructure everything except properties\n const { properties, ...schemaMetadata } = schema.value\n if (!properties) {\n return null\n }\n\n return {\n visibleProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(0, MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n collapsedProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n }\n})\n\n/**\n * We don't want to render the request body if its completely empty\n * @example\n * {\n * \"content\": {},\n * }\n */\nconst shouldRenderRequestBody = computed(\n () =>\n Object.keys(requestBody?.content ?? {}).length > 0 ||\n requestBody?.description ||\n requestBody?.required,\n)\n</script>\n<template>\n <div\n v-if=\"requestBody && shouldRenderRequestBody\"\n :aria-label=\"translate('operation.requestBody')\"\n class=\"request-body\"\n role=\"group\">\n <div class=\"request-body-header\">\n <div class=\"request-body-title\">\n <slot name=\"title\" />\n <span\n v-if=\"modelLink\"\n class=\"text-c-2 text-xs leading-none font-normal\"\n data-testid=\"request-body-schema-name\">\n <span class=\"text-c-3 mx-1.5\">·</span>\n <LinkButton\n v-if=\"eventBus && modelLink.schemaKey\"\n @click=\"\n eventBus.emit('scroll-to:model-by-name', {\n name: modelLink.schemaKey,\n })\n \">\n {{ modelLink.label }}\n </LinkButton>\n <template v-else>{{ modelLink.label }}</template>\n </span>\n </div>\n <div class=\"flex items-center gap-2\">\n <div\n v-if=\"requestBody.required\"\n class=\"request-body-required\">\n {{ translate('common.required') }}\n </div>\n <ContentTypeSelect\n v-model=\"selectedContentType\"\n :content=\"requestBody.content\" />\n </div>\n <div\n v-if=\"requestBody.description\"\n class=\"request-body-description\">\n <ScalarMarkdown :value=\"requestBody.description\" />\n </div>\n </div>\n\n <!-- For over 12 properties we want to show 12 and collapse the rest -->\n <div\n v-if=\"partitionedSchema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :name=\"translate('operation.requestBody')\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"partitionedSchema.visibleProperties\"\n schemaContext=\"requestBody\" />\n\n <Schema\n additionalProperties\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n hideDescription\n :name=\"translate('operation.requestBody')\"\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"partitionedSchema.collapsedProperties\"\n schemaContext=\"requestBody\" />\n </div>\n\n <!-- Show em all 12 and under -->\n <div\n v-else-if=\"schema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :hideReadOnly=\"true\"\n :name=\"translate('operation.requestBody')\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"schema\"\n schemaContext=\"requestBody\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n.request-body {\n margin-top: 24px;\n}\n.request-body-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding-bottom: 12px;\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n flex-flow: wrap;\n}\n.request-body-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: var(--scalar-font-size-2);\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color-1);\n}\n.request-body-required {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-orange);\n font-weight: normal;\n border-radius: 16px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 2px 8px;\n height: 20px;\n}\n.request-body-description {\n margin-top: 6px;\n font-size: var(--scalar-small);\n width: 100%;\n}\n\n.request-body-header\n + .request-body-schema:has(> .schema-card > .schema-card-description),\n.request-body-header\n + .request-body-schema:has(\n > .schema-card > .schema-properties > * > .property--level-0\n ) {\n /** Add a bit of space between the heading border and the schema description or properties */\n padding-top: 8px;\n}\n.request-body-description :deep(.markdown) * {\n color: var(--scalar-color-2) !important;\n}\n</style>\n"],"mappings":""}
@@ -1,7 +1,8 @@
1
1
  import { useLocalization } from "../../localization/use-localization.js";
2
+ import { inferDiscriminatorMappingComposition } from "../../../components/Content/Schema/helpers/get-compositions-to-render.js";
2
3
  import { isTypeObject } from "../../../components/Content/Schema/helpers/is-type-object.js";
3
- import { reduceNamesToObject, sortPropertyNames } from "../../../components/Content/Schema/helpers/sort-property-names.js";
4
4
  import { getModelNameFromSchema } from "../../../components/Content/Schema/helpers/schema-name.js";
5
+ import { reduceNamesToObject, sortPropertyNames } from "../../../components/Content/Schema/helpers/sort-property-names.js";
5
6
  import LinkButton_default from "../../../components/Content/Schema/LinkButton.vue.js";
6
7
  import Schema_default from "../../../components/Content/Schema/Schema.vue.js";
7
8
  import ContentTypeSelect_default from "./ContentTypeSelect.vue.js";
@@ -69,6 +70,7 @@ var RequestBody_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
69
70
  */
70
71
  const partitionedSchema = computed(() => {
71
72
  if (!schema.value || !isTypeObject(schema.value)) return null;
73
+ if (inferDiscriminatorMappingComposition(schema.value, __props.document)) return null;
72
74
  const sortedNames = sortPropertyNames(schema.value, schema.value.discriminator, {
73
75
  hideReadOnly: true,
74
76
  orderSchemaPropertiesBy: __props.options.orderSchemaPropertiesBy,
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/RequestBody.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n OpenApiDocument,\n RequestBodyObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { Schema } from '@/components/Content/Schema'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { getModelNameFromSchema } from '@/components/Content/Schema/helpers/schema-name'\nimport {\n reduceNamesToObject,\n sortPropertyNames,\n} from '@/components/Content/Schema/helpers/sort-property-names'\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\nimport { useLocalization } from '@/features/localization'\n\nimport ContentTypeSelect from './ContentTypeSelect.vue'\n\nconst { requestBody, options, document } = defineProps<{\n breadcrumb?: string[]\n requestBody?: RequestBodyObject\n eventBus: WorkspaceEventBus | null\n /** The document the request body belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: {\n orderRequiredPropertiesFirst: boolean | undefined\n orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined\n hideModels: boolean | undefined\n expandAllSchemaProperties: boolean | undefined\n }\n}>()\nconst { translate } = useLocalization()\n\n/**\n * The maximum number of properties to show in the request body schema.\n */\nconst MAX_VISIBLE_PROPERTIES = 12\n\nconst availableContentTypes = computed(() =>\n Object.keys(requestBody?.content ?? {}),\n)\n\nconst selectedContentType = defineModel<string>('selectedContentType', {\n default: 'application/json',\n})\n\nif (requestBody?.content) {\n if (availableContentTypes.value[0]) {\n selectedContentType.value = availableContentTypes.value[0]\n }\n}\n\n/** Raw schema (possibly with $ref) for the selected content type */\nconst rawSchema = computed(\n () => requestBody?.content?.[selectedContentType.value]?.schema,\n)\n\nconst schema = computed(() => getResolvedRef(rawSchema.value))\n\n/** When the schema is a $ref, preserve its name so the UI can show the ref name instead of just the type. */\nconst modelLink = computed(\n () => (rawSchema.value && getModelNameFromSchema(rawSchema.value)) ?? null,\n)\n\n/**\n * Splits schema properties into visible and collapsed sections when there are more than 12 properties.\n * Returns null for schemas with fewer properties or non-object schemas.\n */\nconst partitionedSchema = computed(() => {\n // Early return if not an object schema\n if (!schema.value || !isTypeObject(schema.value)) {\n return null\n }\n\n // Lets sort the names first\n const sortedNames = sortPropertyNames(\n schema.value,\n schema.value.discriminator,\n {\n hideReadOnly: true,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n },\n )\n\n if (sortedNames.length <= MAX_VISIBLE_PROPERTIES) {\n return null\n }\n\n // Destructure everything except properties\n const { properties, ...schemaMetadata } = schema.value\n if (!properties) {\n return null\n }\n\n return {\n visibleProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(0, MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n collapsedProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n }\n})\n\n/**\n * We don't want to render the request body if its completely empty\n * @example\n * {\n * \"content\": {},\n * }\n */\nconst shouldRenderRequestBody = computed(\n () =>\n Object.keys(requestBody?.content ?? {}).length > 0 ||\n requestBody?.description ||\n requestBody?.required,\n)\n</script>\n<template>\n <div\n v-if=\"requestBody && shouldRenderRequestBody\"\n :aria-label=\"translate('operation.requestBody')\"\n class=\"request-body\"\n role=\"group\">\n <div class=\"request-body-header\">\n <div class=\"request-body-title\">\n <slot name=\"title\" />\n <span\n v-if=\"modelLink\"\n class=\"text-c-2 text-xs leading-none font-normal\"\n data-testid=\"request-body-schema-name\">\n <span class=\"text-c-3 mx-1.5\">·</span>\n <LinkButton\n v-if=\"eventBus && modelLink.schemaKey\"\n @click=\"\n eventBus.emit('scroll-to:model-by-name', {\n name: modelLink.schemaKey,\n })\n \">\n {{ modelLink.label }}\n </LinkButton>\n <template v-else>{{ modelLink.label }}</template>\n </span>\n </div>\n <div class=\"flex items-center gap-2\">\n <div\n v-if=\"requestBody.required\"\n class=\"request-body-required\">\n {{ translate('common.required') }}\n </div>\n <ContentTypeSelect\n v-model=\"selectedContentType\"\n :content=\"requestBody.content\" />\n </div>\n <div\n v-if=\"requestBody.description\"\n class=\"request-body-description\">\n <ScalarMarkdown :value=\"requestBody.description\" />\n </div>\n </div>\n\n <!-- For over 12 properties we want to show 12 and collapse the rest -->\n <div\n v-if=\"partitionedSchema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :name=\"translate('operation.requestBody')\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"partitionedSchema.visibleProperties\"\n schemaContext=\"requestBody\" />\n\n <Schema\n additionalProperties\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n hideDescription\n :name=\"translate('operation.requestBody')\"\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"partitionedSchema.collapsedProperties\"\n schemaContext=\"requestBody\" />\n </div>\n\n <!-- Show em all 12 and under -->\n <div\n v-else-if=\"schema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :hideReadOnly=\"true\"\n :name=\"translate('operation.requestBody')\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"schema\"\n schemaContext=\"requestBody\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n.request-body {\n margin-top: 24px;\n}\n.request-body-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding-bottom: 12px;\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n flex-flow: wrap;\n}\n.request-body-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: var(--scalar-font-size-2);\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color-1);\n}\n.request-body-required {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-orange);\n font-weight: normal;\n border-radius: 16px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 2px 8px;\n height: 20px;\n}\n.request-body-description {\n margin-top: 6px;\n font-size: var(--scalar-small);\n width: 100%;\n}\n\n.request-body-header\n + .request-body-schema:has(> .schema-card > .schema-card-description),\n.request-body-header\n + .request-body-schema:has(\n > .schema-card > .schema-properties > * > .property--level-0\n ) {\n /** Add a bit of space between the heading border and the schema description or properties */\n padding-top: 8px;\n}\n.request-body-description :deep(.markdown) * {\n color: var(--scalar-color-2) !important;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,IAAM,yBAAyB;;;;;;;;;;;;;;;EAL/B,MAAM,EAAE,cAAc,iBAAgB;;;;EAOtC,MAAM,wBAAwB,eAC5B,OAAO,KAAK,QAAA,aAAa,WAAW,EAAE,CAAC,CACzC;E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AA;;IAO7Q,QAAQ,kBAAA,MAAkB;IAC3B,eAAc;;;;;;;OAEhB,YAgBgC,MAAA,eAAA,EAAA;IAf9B,sBAAA;IACC,YAAA,QAAA;IACD,SAAA;IACC,iBAAiB,CAAA,cAAe;IAChC,UAAU,QAAA;IACX,iBAAA;IACC,MAAM,MAAA,UAAS,CAAA,wBAAA;IACf,SAAO;;mCAA0E,QAAA,QAAQ;8BAAiE,QAAA,QAAQ;gCAA8D,QAAA,QAAQ;eAAqC,QAAA;;IAO7Q,QAAQ,kBAAA,MAAkB;IAC3B,eAAc;;;;;;;WAKL,OAAA,SAAA,WAAA,EADb,mBAoBM,OApBN,YAoBM,CAjBJ,YAgBgC,MAAA,eAAA,EAAA;IAf7B,YAAA,QAAA;IACD,SAAA;IACC,iBAAiB,CAAA,cAAe;IAChC,UAAU,QAAA;IACV,cAAc;IACd,MAAM,MAAA,UAAS,CAAA,wBAAA;IAChB,gBAAA;IACC,SAAO;;mCAA0E,QAAA,QAAQ;8BAAiE,QAAA,QAAQ;gCAA8D,QAAA,QAAQ;eAAqC,QAAA;;IAO7Q,QAAQ,OAAA;IACT,eAAc"}
1
+ {"version":3,"file":"RequestBody.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/RequestBody.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n OpenApiDocument,\n RequestBodyObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { Schema } from '@/components/Content/Schema'\nimport { inferDiscriminatorMappingComposition } from '@/components/Content/Schema/helpers/get-compositions-to-render'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { getModelNameFromSchema } from '@/components/Content/Schema/helpers/schema-name'\nimport {\n reduceNamesToObject,\n sortPropertyNames,\n} from '@/components/Content/Schema/helpers/sort-property-names'\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\nimport { useLocalization } from '@/features/localization'\n\nimport ContentTypeSelect from './ContentTypeSelect.vue'\n\nconst { requestBody, options, document } = defineProps<{\n breadcrumb?: string[]\n requestBody?: RequestBodyObject\n eventBus: WorkspaceEventBus | null\n /** The document the request body belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: {\n orderRequiredPropertiesFirst: boolean | undefined\n orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined\n hideModels: boolean | undefined\n expandAllSchemaProperties: boolean | undefined\n }\n}>()\nconst { translate } = useLocalization()\n\n/**\n * The maximum number of properties to show in the request body schema.\n */\nconst MAX_VISIBLE_PROPERTIES = 12\n\nconst availableContentTypes = computed(() =>\n Object.keys(requestBody?.content ?? {}),\n)\n\nconst selectedContentType = defineModel<string>('selectedContentType', {\n default: 'application/json',\n})\n\nif (requestBody?.content) {\n if (availableContentTypes.value[0]) {\n selectedContentType.value = availableContentTypes.value[0]\n }\n}\n\n/** Raw schema (possibly with $ref) for the selected content type */\nconst rawSchema = computed(\n () => requestBody?.content?.[selectedContentType.value]?.schema,\n)\n\nconst schema = computed(() => getResolvedRef(rawSchema.value))\n\n/** When the schema is a $ref, preserve its name so the UI can show the ref name instead of just the type. */\nconst modelLink = computed(\n () => (rawSchema.value && getModelNameFromSchema(rawSchema.value)) ?? null,\n)\n\n/**\n * Splits schema properties into visible and collapsed sections when there are more than 12 properties.\n * Returns null for schemas with fewer properties or non-object schemas.\n */\nconst partitionedSchema = computed(() => {\n // Early return if not an object schema\n if (!schema.value || !isTypeObject(schema.value)) {\n return null\n }\n\n // A schema whose variants are inferred from a `discriminator.mapping` renders\n // as a single variant selector, not a flat property list. Splitting it would\n // duplicate that selector across the visible and collapsed blocks, so we keep\n // it whole. See https://github.com/scalar/scalar/issues/7472\n if (inferDiscriminatorMappingComposition(schema.value, document)) {\n return null\n }\n\n // Lets sort the names first\n const sortedNames = sortPropertyNames(\n schema.value,\n schema.value.discriminator,\n {\n hideReadOnly: true,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n },\n )\n\n if (sortedNames.length <= MAX_VISIBLE_PROPERTIES) {\n return null\n }\n\n // Destructure everything except properties\n const { properties, ...schemaMetadata } = schema.value\n if (!properties) {\n return null\n }\n\n return {\n visibleProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(0, MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n collapsedProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n }\n})\n\n/**\n * We don't want to render the request body if its completely empty\n * @example\n * {\n * \"content\": {},\n * }\n */\nconst shouldRenderRequestBody = computed(\n () =>\n Object.keys(requestBody?.content ?? {}).length > 0 ||\n requestBody?.description ||\n requestBody?.required,\n)\n</script>\n<template>\n <div\n v-if=\"requestBody && shouldRenderRequestBody\"\n :aria-label=\"translate('operation.requestBody')\"\n class=\"request-body\"\n role=\"group\">\n <div class=\"request-body-header\">\n <div class=\"request-body-title\">\n <slot name=\"title\" />\n <span\n v-if=\"modelLink\"\n class=\"text-c-2 text-xs leading-none font-normal\"\n data-testid=\"request-body-schema-name\">\n <span class=\"text-c-3 mx-1.5\">·</span>\n <LinkButton\n v-if=\"eventBus && modelLink.schemaKey\"\n @click=\"\n eventBus.emit('scroll-to:model-by-name', {\n name: modelLink.schemaKey,\n })\n \">\n {{ modelLink.label }}\n </LinkButton>\n <template v-else>{{ modelLink.label }}</template>\n </span>\n </div>\n <div class=\"flex items-center gap-2\">\n <div\n v-if=\"requestBody.required\"\n class=\"request-body-required\">\n {{ translate('common.required') }}\n </div>\n <ContentTypeSelect\n v-model=\"selectedContentType\"\n :content=\"requestBody.content\" />\n </div>\n <div\n v-if=\"requestBody.description\"\n class=\"request-body-description\">\n <ScalarMarkdown :value=\"requestBody.description\" />\n </div>\n </div>\n\n <!-- For over 12 properties we want to show 12 and collapse the rest -->\n <div\n v-if=\"partitionedSchema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :name=\"translate('operation.requestBody')\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"partitionedSchema.visibleProperties\"\n schemaContext=\"requestBody\" />\n\n <Schema\n additionalProperties\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n hideDescription\n :name=\"translate('operation.requestBody')\"\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"partitionedSchema.collapsedProperties\"\n schemaContext=\"requestBody\" />\n </div>\n\n <!-- Show em all 12 and under -->\n <div\n v-else-if=\"schema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :hideReadOnly=\"true\"\n :name=\"translate('operation.requestBody')\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"schema\"\n schemaContext=\"requestBody\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n.request-body {\n margin-top: 24px;\n}\n.request-body-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding-bottom: 12px;\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n flex-flow: wrap;\n}\n.request-body-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: var(--scalar-font-size-2);\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color-1);\n}\n.request-body-required {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-orange);\n font-weight: normal;\n border-radius: 16px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 2px 8px;\n height: 20px;\n}\n.request-body-description {\n margin-top: 6px;\n font-size: var(--scalar-small);\n width: 100%;\n}\n\n.request-body-header\n + .request-body-schema:has(> .schema-card > .schema-card-description),\n.request-body-header\n + .request-body-schema:has(\n > .schema-card > .schema-properties > * > .property--level-0\n ) {\n /** Add a bit of space between the heading border and the schema description or properties */\n padding-top: 8px;\n}\n.request-body-description :deep(.markdown) * {\n color: var(--scalar-color-2) !important;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,IAAM,yBAAyB;;;;;;;;;;;;;;;EAL/B,MAAM,EAAE,cAAc,iBAAgB;;;;EAOtC,MAAM,wBAAwB,eAC5B,OAAO,KAAK,QAAA,aAAa,WAAW,EAAE,CAAC,CACzC;EAEA,MAAM,sBAAsB,SAAmB,SAAC,sBAE/C;AAED,MAAI,QAAA,aAAa;OACX,sBAAsB,MAAM,GAC9B,qBAAoB,QAAQ,sBAAsB,MAAM;;;EAK5D,MAAM,YAAY,eACV,QAAA,aAAa,UAAU,oBAAoB,QAAQ,OAC3D;EAEA,MAAM,SAAS,eAAe,eAAe,UAAU,MAAM,CAAA;;EAG7D,MAAM,YAAY,gBACT,UAAU,SAAS,uBAAuB,UAAU,MAAM,KAAK,KACxE;;;;;EAMA,MAAM,oBAAoB,eAAe;AAEvC,OAAI,CAAC,OAAO,SAAS,CAAC,aAAa,OAAO,MAAM,CAC9C,QAAO;AAOT,OAAI,qCAAqC,OAAO,OAAO,QAAA,SAAS,CAC9D,QAAO;GAIT,MAAM,cAAc,kBAClB,OAAO,OACP,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,EAAA;IAf7B,YAAA,QAAA;IACD,SAAA;IACC,iBAAiB,CAAA,cAAe;IAChC,UAAU,QAAA;IACV,cAAc;IACd,MAAM,MAAA,UAAS,CAAA,wBAAA;IAChB,gBAAA;IACC,SAAO;;mCAA0E,QAAA,QAAQ;8BAAiE,QAAA,QAAQ;gCAA8D,QAAA,QAAQ;eAAqC,QAAA;;IAO7Q,QAAQ,OAAA;IACT,eAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModernLayout.vue.script.js","names":[],"sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { CodeExample } from '@scalar/blocks/code-example'\nimport { ScalarErrorBoundary } from '@scalar/components/error-boundary'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { ScalarIconWebhooksLogo } from '@scalar/icons'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport type {\n OpenApiDocument,\n OperationObject,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, provide, ref, useId } from 'vue'\n\nimport { Anchor } from '@/components/Anchor'\nimport { Badge } from '@/components/Badge'\nimport { LinkList } from '@/components/LinkList'\nimport OperationPath from '@/components/OperationPath.vue'\nimport { Section, SectionContent, SectionHeaderTag } from '@/components/Section'\nimport AskAgentButton from '@/features/ask-agent-button/AskAgentButton.vue'\nimport { ExampleResponses } from '@/features/example-responses'\nimport { ExternalDocs } from '@/features/external-docs'\nimport { useLocalization } from '@/features/localization'\nimport Callbacks from '@/features/Operation/components/callbacks/Callbacks.vue'\nimport OperationParameters from '@/features/Operation/components/OperationParameters.vue'\nimport OperationResponses from '@/features/Operation/components/OperationResponses.vue'\nimport SecurityRequirementBadge from '@/features/Operation/components/SecurityRequirementBadge.vue'\nimport type { RequiredSecurity } from '@/features/Operation/helpers/get-required-security'\nimport {\n getOperationStability,\n getOperationStabilityColor,\n isOperationDeprecated,\n} from '@/features/Operation/helpers/operation-stability'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\nimport {\n REQUEST_BODY_COMPOSITION_INDEX_SYMBOL,\n type RequestBodyCompositionSelection,\n} from '@/features/Operation/request-body-composition-index'\nimport { getXKeysFromObject } from '@/features/specification-extension'\nimport SpecificationExtension from '@/features/specification-extension/SpecificationExtension.vue'\nimport { TestRequestButton } from '@/features/test-request-button'\nimport { XBadges } from '@/features/x-badges'\n\nconst {\n clientOptions,\n document,\n eventBus,\n isWebhook,\n method,\n operation,\n options,\n path,\n requiredSecurity,\n selectedServer,\n selectedSecuritySchemes,\n selectedClient,\n selectedExample,\n} = defineProps<\n Omit<\n OperationProps,\n | 'document'\n | 'pathValue'\n | 'server'\n | 'isCollapsed'\n | 'securitySchemes'\n | 'authStore'\n > & {\n /** Operation object with path params */\n operation: OperationObject\n /** The selected server for the operation */\n selectedServer: ServerObject | null\n /** The selected security schemes for the operation */\n selectedSecuritySchemes: SecuritySchemeObjectSecret[]\n /** Required/optional security state for the badge next to the path */\n requiredSecurity: RequiredSecurity\n /** The document the operation belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n }\n>()\nconst { translate } = useLocalization()\n\nconst operationTitle = computed(() => operation.summary || path || '')\n\nconst labelId = useId()\n\nconst operationExtensions = computed(() => getXKeysFromObject(operation))\n\n/** Track the selected request body content type so the code sample stays in sync */\nconst selectedRequestBodyContentType = ref<string | undefined>()\n\n/** Selected request body oneOf/anyOf variants; synced with schema dropdowns and code sample */\nconst requestBodyCompositionSelection = ref<RequestBodyCompositionSelection>({})\n\nconst requestBodyCompositionSelectionForCodeSample = computed(\n (): RequestBodyCompositionSelection => ({\n ...requestBodyCompositionSelection.value,\n }),\n)\n\nconst requestBodyCompositionSelectionKey = computed(() =>\n JSON.stringify(requestBodyCompositionSelectionForCodeSample.value),\n)\n\nprovide(REQUEST_BODY_COMPOSITION_INDEX_SYMBOL, requestBodyCompositionSelection)\n</script>\n\n<template>\n <Section\n :id=\"id\"\n :aria-labelledby=\"labelId\"\n :label=\"operationTitle\"\n tabindex=\"-1\"\n @intersecting=\"() => eventBus?.emit('intersecting:nav-item', { id })\">\n <SectionContent>\n <!-- Badges -->\n <div class=\"flex flex-row justify-between gap-1\">\n <!-- Left -->\n <div class=\"flex gap-1\">\n <!-- Operation ID -->\n <Badge v-if=\"options?.showOperationId && operation.operationId\">\n {{ operation.operationId }}\n </Badge>\n <!-- Stability badge -->\n <Badge\n v-if=\"getOperationStability(operation)\"\n class=\"capitalize\"\n :class=\"getOperationStabilityColor(operation)\">\n {{ getOperationStability(operation) }}\n </Badge>\n <!-- Webhook badge -->\n <Badge\n v-if=\"isWebhook\"\n class=\"font-code text-green flex w-fit items-center justify-center gap-1\">\n <ScalarIconWebhooksLogo weight=\"bold\" />\n {{ translate('operation.webhook') }}\n </Badge>\n <!-- x-badges before -->\n <XBadges\n :badges=\"operation['x-badges']\"\n position=\"before\" />\n </div>\n <!-- Right -->\n <div class=\"flex gap-1\">\n <!-- x-badges after -->\n <XBadges\n :badges=\"operation['x-badges']\"\n position=\"after\" />\n </div>\n </div>\n <div class=\"operation-layout\">\n <!-- Title -->\n <div\n class=\"operation-title\"\n :class=\"isOperationDeprecated(operation) && 'deprecated'\">\n <Anchor\n @copyAnchorUrl=\"() => eventBus?.emit('copy-url:nav-item', { id })\">\n <SectionHeaderTag\n :id=\"labelId\"\n :level=\"3\">\n {{ operationTitle }}\n </SectionHeaderTag>\n </Anchor>\n </div>\n\n <!-- Required auth badge -->\n <div class=\"operation-auth\">\n <SecurityRequirementBadge :requiredSecurity />\n </div>\n\n <!-- Description -->\n <div class=\"operation-description\">\n <SpecificationExtension :value=\"operationExtensions\" />\n <ScalarMarkdown\n :anchorPrefix=\"id\"\n :aria-label=\"translate('common.description')\"\n role=\"group\"\n transformType=\"heading\"\n :value=\"operation.description\"\n withAnchors\n withImages />\n </div>\n\n <!--\n Parameters, request body, responses and callbacks.\n\n This block is kept before the examples in source order on purpose: the\n request body schema (via SchemaComposition) seeds the shared\n requestBodyCompositionSelection on mount, which drives the\n CodeExample's :key. Mounting the details first means the code\n sample reads the final key on its first render and is never remounted —\n a remount would reset the selected client and tear down an open client\n picker. The grid (see grid-template-areas below) still paints the\n examples on the right, independent of this source order.\n -->\n <div class=\"operation-details\">\n <OperationParameters\n v-model:selectedContentType=\"selectedRequestBodyContentType\"\n :breadcrumb=\"[id]\"\n :document\n :eventBus\n :options\n :parameters=\"operation.parameters\"\n :requestBody=\"getResolvedRef(operation.requestBody)\" />\n <OperationResponses\n :breadcrumb=\"[id]\"\n :collapsableItems=\"!options.expandAllResponses\"\n :document\n :eventBus\n :options\n :responses=\"operation.responses\" />\n\n <!-- Callbacks -->\n <ScalarErrorBoundary>\n <Callbacks\n v-if=\"operation.callbacks\"\n :callbacks=\"operation.callbacks\"\n class=\"mt-6\"\n :document\n :eventBus\n :options\n :path />\n </ScalarErrorBoundary>\n </div>\n\n <!-- Example request and responses -->\n <div class=\"examples\">\n <!-- External Docs -->\n <LinkList v-if=\"operation.externalDocs\">\n <ExternalDocs :value=\"operation.externalDocs\" />\n </LinkList>\n\n <!-- New Example Request -->\n <ScalarErrorBoundary>\n <CodeExample\n :key=\"requestBodyCompositionSelectionKey\"\n :clientOptions\n :eventBus\n fallback\n :isWebhook\n :method\n :operation\n :path\n :requestBodyCompositionSelection=\"\n requestBodyCompositionSelectionForCodeSample\n \"\n :securitySchemes=\"selectedSecuritySchemes\"\n :selectedClient\n :selectedContentType=\"selectedRequestBodyContentType\"\n :selectedExample\n :selectedServer>\n <template #header>\n <OperationPath\n class=\"font-code text-c-2 [&_em]:text-c-1 min-w-0 [&_em]:not-italic\"\n :deprecated=\"operation?.deprecated\"\n :path=\"path\" />\n </template>\n <template\n v-if=\"!isWebhook\"\n #footer=\"{ exampleName }\">\n <div class=\"flex\">\n <AskAgentButton />\n <TestRequestButton\n v-if=\"!options.hideTestRequestButton\"\n :id\n :eventBus\n :exampleName\n :method\n :path\n :requestBodyCompositionSelection=\"\n requestBodyCompositionSelectionForCodeSample\n \" />\n </div>\n </template>\n </CodeExample>\n </ScalarErrorBoundary>\n\n <ScalarErrorBoundary>\n <ExampleResponses\n v-if=\"operation.responses\"\n :eventBus\n :responses=\"operation.responses\"\n :selectedExample\n style=\"margin-top: 12px\" />\n </ScalarErrorBoundary>\n </div>\n </div>\n </SectionContent>\n </Section>\n</template>\n\n<style scoped>\n/*\n * The operation is a single grid so the request example can sit beside the\n * details on wide screens, then be lifted directly under the description when\n * the layout collapses (see the container query below). Vertical rhythm comes\n * from element margins rather than row-gap, because the details block carries\n * its own leading margin (mt-6) that already spaces it from whatever precedes\n * it — a row-gap would double that gap.\n */\n.operation-layout {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-template-rows: auto auto 1fr;\n grid-template-areas:\n 'heading badge'\n 'description examples'\n 'details examples';\n column-gap: 48px;\n row-gap: 0;\n}\n\n.operation-title {\n grid-area: heading;\n margin-bottom: 12px;\n\n /* Mirror the shared section header typography (see SectionHeader.vue) */\n font-size: var(--font-size, var(--scalar-heading-1));\n font-weight: var(--font-weight, var(--scalar-bold));\n color: var(--scalar-color-1);\n line-height: 1.45;\n}\n\n.operation-auth {\n grid-area: badge;\n justify-self: end;\n align-self: start;\n}\n\n.operation-description {\n grid-area: description;\n min-width: 0;\n}\n\n.operation-details {\n grid-area: details;\n min-width: 0;\n}\n\n.examples {\n grid-area: examples;\n align-self: start;\n min-width: 0;\n\n position: sticky;\n top: calc(var(--refs-viewport-offset) + 24px);\n}\n\n.examples > * {\n max-height: calc((var(--refs-viewport-height) - 60px) / 2);\n position: relative;\n}\n\n.examples > *:first-of-type:last-of-type {\n max-height: calc((var(--refs-viewport-height) - 60px));\n}\n\n/*\n * Don't constrain card height on mobile\n * (or zoomed in screens)\n */\n@media (max-width: 600px) {\n .examples > * {\n max-height: unset;\n }\n}\n\n.deprecated * {\n text-decoration: line-through;\n}\n\n/*\n * On narrow containers the layout collapses to a single column: the request\n * example is lifted directly under the description, and the auth badge becomes\n * an eyebrow above the title.\n */\n@container narrow-references-container (max-width: 900px) {\n .operation-layout {\n grid-template-columns: 1fr;\n grid-template-areas:\n 'badge'\n 'heading'\n 'description'\n 'examples'\n 'details';\n column-gap: 0;\n }\n\n .operation-auth {\n justify-self: start;\n margin-bottom: 4px;\n }\n\n .operation-title {\n margin-bottom: 24px;\n }\n\n .operation-description {\n margin-bottom: 24px;\n }\n\n /* Don't make the examples sticky on narrow viewports */\n .examples {\n position: static;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+EA,MAAM,EAAE,cAAc,iBAAgB;EAEtC,MAAM,iBAAiB,eAAe,QAAA,UAAU,WAAW,QAAA,QAAQ,GAAE;EAErE,MAAM,UAAU,OAAM;EAEtB,MAAM,sBAAsB,eAAe,mBAAmB,QAAA,UAAU,CAAA;;EAGxE,MAAM,iCAAiC,KAAwB;;EAG/D,MAAM,kCAAkC,IAAqC,EAAE,CAAA;EAE/E,MAAM,+CAA+C,gBACX,EACtC,GAAG,gCAAgC,OACpC,EACH;EAEA,MAAM,qCAAqC,eACzC,KAAK,UAAU,6CAA6C,MAAM,CACpE;AAEA,UAAQ,uCAAuC,gCAA+B;;uBAI5E,YAoLU,MAAA,gBAAA,EAAA;IAnLP,IAAI,QAAA;IACJ,mBAAiB,MAAA,QAAO;IACxB,OAAO,eAAA;IACR,UAAS;IACR,gBAAY,OAAA,OAAA,OAAA,WAAQ,QAAA,UAAU,KAAI,yBAAA,EAAA,IAA4B,QAAA,IAAE,CAAA;;2BA8KhD,CA7KjB,YA6KiB,MAAA,uBAAA,EAAA,MAAA;4BA1IT,CAjCN,mBAiCM,OAjCN,YAiCM,CA/BJ,mBAuBM,OAvBN,YAuBM;MArBS,QAAA,SAAS,mBAAmB,QAAA,UAAU,eAAA,WAAA,EAAnD,YAEQ,MAAA,cAAA,EAAA,EAAA,KAAA,GAA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A,WAAA,EAxCd,YAwCc,MAAA,YAAA,EAAA;SAvCX,KAAK,mCAAA;SACL,eAAA,QAAA;SACA,UAAA,QAAA;SACD,UAAA;SACC,WAAA,QAAA;SACA,QAAA,QAAA;SACA,WAAA,QAAA;SACA,MAAA,QAAA;SACA,iCAAkD,6CAAA;SAGlD,iBAAiB,QAAA;SACjB,gBAAA,QAAA;SACA,qBAAqB,+BAAA;SACrB,iBAAA,QAAA;SACA,gBAAA,QAAA;;SACU,QAAM,cAIE,CAHjB,YAGiB,uBAAA;UAFf,OAAM;UACL,YAAY,QAAA,WAAW;UACvB,MAAM,QAAA;;;aAGF,QAAA,YAAA;eACN;sBAaK,EAbK,kBAAW,CACtB,mBAYM,OAZN,YAYM,CAXJ,YAAkB,uBAAA,EAAA,CAET,QAAA,QAAQ,yBAAA,WAAA,EADjB,YASM,MAAA,0BAAA,EAAA;;UAPH,IAAA,QAAA;UACA,UAAA,QAAA;UACA;UACA,QAAA,QAAA;UACA,MAAA,QAAA;UACA,iCAAwD,6CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;OAQnE,YAOsB,MAAA,oBAAA,EAAA,MAAA;+BADS,CAJrB,QAAA,UAAU,aAAA,WAAA,EADlB,YAK6B,MAAA,yBAAA,EAAA;;SAH1B,UAAA,QAAA;SACA,WAAW,QAAA,UAAU;SACrB,iBAAA,QAAA;SACD,OAAA,EAAA,cAAA,QAAwB"}
1
+ {"version":3,"file":"ModernLayout.vue.script.js","names":[],"sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { CodeExample } from '@scalar/blocks/code-example'\nimport { ScalarErrorBoundary } from '@scalar/components/error-boundary'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { ScalarIconWebhooksLogo } from '@scalar/icons'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport type {\n OpenApiDocument,\n OperationObject,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, provide, ref, useId } from 'vue'\n\nimport { Anchor } from '@/components/Anchor'\nimport { Badge } from '@/components/Badge'\nimport { LinkList } from '@/components/LinkList'\nimport OperationPath from '@/components/OperationPath.vue'\nimport { Section, SectionContent, SectionHeaderTag } from '@/components/Section'\nimport AskAgentButton from '@/features/ask-agent-button/AskAgentButton.vue'\nimport { ExampleResponses } from '@/features/example-responses'\nimport { ExternalDocs } from '@/features/external-docs'\nimport { useLocalization } from '@/features/localization'\nimport Callbacks from '@/features/Operation/components/callbacks/Callbacks.vue'\nimport OperationParameters from '@/features/Operation/components/OperationParameters.vue'\nimport OperationResponses from '@/features/Operation/components/OperationResponses.vue'\nimport SecurityRequirementBadge from '@/features/Operation/components/SecurityRequirementBadge.vue'\nimport type { RequiredSecurity } from '@/features/Operation/helpers/get-required-security'\nimport {\n getOperationStability,\n getOperationStabilityColor,\n isOperationDeprecated,\n} from '@/features/Operation/helpers/operation-stability'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\nimport {\n REQUEST_BODY_COMPOSITION_INDEX_SYMBOL,\n type RequestBodyCompositionSelection,\n} from '@/features/Operation/request-body-composition-index'\nimport { getXKeysFromObject } from '@/features/specification-extension'\nimport SpecificationExtension from '@/features/specification-extension/SpecificationExtension.vue'\nimport { TestRequestButton } from '@/features/test-request-button'\nimport { XBadges } from '@/features/x-badges'\n\nconst {\n clientOptions,\n document,\n eventBus,\n isWebhook,\n method,\n operation,\n options,\n path,\n requiredSecurity,\n selectedServer,\n selectedSecuritySchemes,\n selectedClient,\n selectedExample,\n} = defineProps<\n Omit<\n OperationProps,\n | 'document'\n | 'pathValue'\n | 'server'\n | 'isCollapsed'\n | 'securitySchemes'\n | 'authStore'\n > & {\n /** Operation object with path params */\n operation: OperationObject\n /** The selected server for the operation */\n selectedServer: ServerObject | null\n /** The selected security schemes for the operation */\n selectedSecuritySchemes: SecuritySchemeObjectSecret[]\n /** Required/optional security state for the badge next to the path */\n requiredSecurity: RequiredSecurity\n /** The document the operation belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n }\n>()\nconst { translate } = useLocalization()\n\nconst operationTitle = computed(() => operation.summary || path || '')\n\nconst labelId = useId()\n\nconst operationExtensions = computed(() => getXKeysFromObject(operation))\n\n/** Track the selected request body content type so the code sample stays in sync */\nconst selectedRequestBodyContentType = ref<string | undefined>()\n\n/** Selected request body oneOf/anyOf variants; synced with schema dropdowns and code sample */\nconst requestBodyCompositionSelection = ref<RequestBodyCompositionSelection>({})\n\nconst requestBodyCompositionSelectionForCodeSample = computed(\n (): RequestBodyCompositionSelection => ({\n ...requestBodyCompositionSelection.value,\n }),\n)\n\nconst requestBodyCompositionSelectionKey = computed(() =>\n JSON.stringify(requestBodyCompositionSelectionForCodeSample.value),\n)\n\nprovide(REQUEST_BODY_COMPOSITION_INDEX_SYMBOL, requestBodyCompositionSelection)\n</script>\n\n<template>\n <Section\n :id=\"id\"\n :aria-labelledby=\"labelId\"\n :label=\"operationTitle\"\n tabindex=\"-1\"\n @intersecting=\"() => eventBus?.emit('intersecting:nav-item', { id })\">\n <SectionContent>\n <!-- Badges -->\n <div class=\"flex flex-row justify-between gap-1\">\n <!-- Left -->\n <div class=\"flex gap-1\">\n <!-- Operation ID -->\n <Badge v-if=\"options?.showOperationId && operation.operationId\">\n {{ operation.operationId }}\n </Badge>\n <!-- Stability badge -->\n <Badge\n v-if=\"getOperationStability(operation)\"\n class=\"capitalize\"\n :class=\"getOperationStabilityColor(operation)\">\n {{ getOperationStability(operation) }}\n </Badge>\n <!-- Webhook badge -->\n <Badge\n v-if=\"isWebhook\"\n class=\"font-code text-green flex w-fit items-center justify-center gap-1\">\n <ScalarIconWebhooksLogo weight=\"bold\" />\n {{ translate('operation.webhook') }}\n </Badge>\n <!-- x-badges before -->\n <XBadges\n :badges=\"operation['x-badges']\"\n position=\"before\" />\n </div>\n <!-- Right -->\n <div class=\"flex gap-1\">\n <!-- x-badges after -->\n <XBadges\n :badges=\"operation['x-badges']\"\n position=\"after\" />\n </div>\n </div>\n <div class=\"operation-layout\">\n <!-- Title -->\n <div\n class=\"operation-title\"\n :class=\"isOperationDeprecated(operation) && 'deprecated'\">\n <Anchor\n @copyAnchorUrl=\"() => eventBus?.emit('copy-url:nav-item', { id })\">\n <SectionHeaderTag\n :id=\"labelId\"\n :level=\"3\">\n {{ operationTitle }}\n </SectionHeaderTag>\n </Anchor>\n </div>\n\n <!-- Required auth badge -->\n <div class=\"operation-auth\">\n <SecurityRequirementBadge :requiredSecurity />\n </div>\n\n <!-- Description -->\n <div class=\"operation-description\">\n <SpecificationExtension :value=\"operationExtensions\" />\n <ScalarMarkdown\n :anchorPrefix=\"id\"\n :aria-label=\"translate('common.description')\"\n role=\"group\"\n transformType=\"heading\"\n :value=\"operation.description\"\n withAnchors\n withImages />\n </div>\n\n <!--\n Parameters, request body, responses and callbacks.\n\n This block is kept before the examples in source order on purpose: the\n request body schema (via SchemaComposition) seeds the shared\n requestBodyCompositionSelection on mount, which drives the\n CodeExample's :key. Mounting the details first means the code\n sample reads the final key on its first render and is never remounted —\n a remount would reset the selected client and tear down an open client\n picker. The grid (see grid-template-areas below) still paints the\n examples on the right, independent of this source order.\n -->\n <div class=\"operation-details\">\n <OperationParameters\n v-model:selectedContentType=\"selectedRequestBodyContentType\"\n :breadcrumb=\"[id]\"\n :document\n :eventBus\n :options\n :parameters=\"operation.parameters\"\n :requestBody=\"getResolvedRef(operation.requestBody)\" />\n <OperationResponses\n :breadcrumb=\"[id]\"\n :collapsableItems=\"!options.expandAllResponses\"\n :document\n :eventBus\n :options\n :responses=\"operation.responses\" />\n\n <!-- Callbacks -->\n <ScalarErrorBoundary>\n <Callbacks\n v-if=\"operation.callbacks\"\n :callbacks=\"operation.callbacks\"\n class=\"mt-6\"\n :document\n :eventBus\n :options\n :path />\n </ScalarErrorBoundary>\n </div>\n\n <!-- Example request and responses -->\n <div class=\"examples\">\n <!-- External Docs -->\n <LinkList v-if=\"operation.externalDocs\">\n <ExternalDocs :value=\"operation.externalDocs\" />\n </LinkList>\n\n <!-- New Example Request -->\n <ScalarErrorBoundary>\n <CodeExample\n :key=\"requestBodyCompositionSelectionKey\"\n :clientOptions\n :eventBus\n fallback\n :isWebhook\n :method\n :operation\n :path\n :requestBodyCompositionSelection=\"\n requestBodyCompositionSelectionForCodeSample\n \"\n :securitySchemes=\"selectedSecuritySchemes\"\n :selectedClient\n :selectedContentType=\"selectedRequestBodyContentType\"\n :selectedExample\n :selectedServer>\n <template #header>\n <OperationPath\n class=\"font-code text-c-2 [&_em]:text-c-1 min-w-0 [&_em]:not-italic\"\n :deprecated=\"operation?.deprecated\"\n :path=\"path\" />\n </template>\n <template\n v-if=\"!isWebhook\"\n #footer=\"{ exampleName }\">\n <div class=\"flex\">\n <AskAgentButton />\n <TestRequestButton\n v-if=\"!options.hideTestRequestButton\"\n :id\n :eventBus\n :exampleName\n :method\n :path\n :requestBodyCompositionSelection=\"\n requestBodyCompositionSelectionForCodeSample\n \" />\n </div>\n </template>\n </CodeExample>\n </ScalarErrorBoundary>\n\n <ScalarErrorBoundary>\n <ExampleResponses\n v-if=\"operation.responses\"\n :eventBus\n :responses=\"operation.responses\"\n :selectedExample\n style=\"margin-top: 12px\" />\n </ScalarErrorBoundary>\n </div>\n </div>\n </SectionContent>\n </Section>\n</template>\n\n<style scoped>\n/*\n * The operation is a single grid so the request example can sit beside the\n * details on wide screens, then be lifted directly under the description when\n * the layout collapses (see the container query below). Vertical rhythm comes\n * from element margins rather than row-gap, because the details block carries\n * its own leading margin (mt-6) that already spaces it from whatever precedes\n * it — a row-gap would double that gap.\n */\n.operation-layout {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-template-rows: auto auto 1fr;\n grid-template-areas:\n 'heading badge'\n 'description examples'\n 'details examples';\n column-gap: 48px;\n row-gap: 0;\n}\n\n.operation-title {\n grid-area: heading;\n margin-bottom: 12px;\n\n /* Mirror the shared section header typography (see SectionHeader.vue) */\n font-size: var(--font-size, var(--scalar-heading-1));\n font-weight: var(--font-weight, var(--scalar-bold));\n color: var(--scalar-color-1);\n line-height: 1.45;\n}\n\n.operation-auth {\n grid-area: badge;\n justify-self: end;\n align-self: start;\n}\n\n.operation-description {\n grid-area: description;\n min-width: 0;\n}\n\n.operation-details {\n grid-area: details;\n min-width: 0;\n}\n\n.examples {\n grid-area: examples;\n align-self: start;\n min-width: 0;\n\n position: sticky;\n top: calc(var(--refs-viewport-offset) + 24px);\n}\n\n.examples > * {\n max-height: calc((var(--refs-viewport-height) - 60px) / 2);\n position: relative;\n}\n\n.examples > *:first-of-type:last-of-type {\n max-height: calc((var(--refs-viewport-height) - 60px));\n}\n\n/*\n * Don't constrain card height on mobile\n * (or zoomed in screens)\n */\n@media (max-width: 600px) {\n .examples > * {\n max-height: unset;\n }\n}\n\n.deprecated * {\n text-decoration: line-through;\n}\n\n/*\n * On narrow containers the layout collapses to a single column: the request\n * example is lifted directly under the description, and the auth badge becomes\n * an eyebrow above the title.\n */\n@container narrow-references-container (max-width: 900px) {\n .operation-layout {\n grid-template-columns: 1fr;\n grid-template-areas:\n 'badge'\n 'heading'\n 'description'\n 'examples'\n 'details';\n column-gap: 0;\n }\n\n .operation-auth {\n justify-self: start;\n margin-bottom: 4px;\n }\n\n .operation-title {\n margin-bottom: 24px;\n }\n\n .operation-description {\n margin-bottom: 24px;\n }\n\n /* Don't make the examples sticky on narrow viewports */\n .examples {\n position: static;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+EA,MAAM,EAAE,cAAc,iBAAgB;EAEtC,MAAM,iBAAiB,eAAe,QAAA,UAAU,WAAW,QAAA,QAAQ,GAAE;EAErE,MAAM,UAAU,OAAM;EAEtB,MAAM,sBAAsB,eAAe,mBAAmB,QAAA,UAAU,CAAA;;EAGxE,MAAM,iCAAiC,KAAwB;;EAG/D,MAAM,kCAAkC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;;;;;;;;;;;;;;;;;;;;;;;;;OAQnE,YAOsB,MAAA,oBAAA,EAAA,MAAA;gCALZ,QAAA,UAAU,aAAA,WAAA,EADlB,YAK6B,MAAA,yBAAA,EAAA;;SAH1B,UAAA,QAAA;SACA,WAAW,QAAA,UAAU;SACrB,iBAAA,QAAA;SACD,OAAA,EAAA,cAAA,QAAwB"}
@@ -61,6 +61,7 @@ export declare const ar: {
61
61
  mainContent: string;
62
62
  collapsed: string;
63
63
  webhooks: string;
64
+ channels: string;
64
65
  };
65
66
  server: {
66
67
  label: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ar.d.ts","sourceRoot":"","sources":["../../../../src/features/localization/locales/ar.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkOqB,CAAA"}
1
+ {"version":3,"file":"ar.d.ts","sourceRoot":"","sources":["../../../../src/features/localization/locales/ar.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmOqB,CAAA"}
@@ -61,7 +61,8 @@ var ar = {
61
61
  sidebarFor: "الشريط الجانبي لـ {name}",
62
62
  mainContent: "وثائق واجهة برمجة التطبيقات لـ {name}",
63
63
  collapsed: "مطوي",
64
- webhooks: "خطافات الويب"
64
+ webhooks: "خطافات الويب",
65
+ channels: "القنوات"
65
66
  },
66
67
  server: {
67
68
  label: "الخادم",
@@ -1 +1 @@
1
- {"version":3,"file":"ar.js","names":[],"sources":["../../../../src/features/localization/locales/ar.ts"],"sourcesContent":["import type { ApiReferenceTranslations } from '@scalar/types/api-reference'\n\nexport const ar = {\n common: {\n additionalProperties: 'خصائص إضافية',\n const: 'ثابت',\n deprecated: 'مهمل',\n description: 'الوصف',\n discriminator: 'المميّز',\n enum: 'تعداد',\n format: 'التنسيق',\n greaterThan: 'أكبر من',\n httpMethod: 'طريقة HTTP',\n keys: 'المفاتيح',\n lessThan: 'أقل من',\n max: 'الحد الأقصى',\n min: 'الحد الأدنى',\n maxLength: 'أقصى طول',\n minLength: 'أدنى طول',\n multipleOf: 'مضاعف لـ',\n nullable: 'يقبل null',\n path: 'المسار',\n propertyNames: 'أسماء الخصائص',\n pattern: 'النمط',\n readOnly: 'قراءة فقط',\n required: 'مطلوب',\n hideValues: 'إخفاء القيم',\n showAllValues: 'عرض كل القيم',\n type: 'النوع',\n unique: 'فريد',\n values: 'القيم',\n writeOnly: 'كتابة فقط',\n },\n search: {\n label: 'بحث',\n inputLabel: 'أدخل استعلام البحث',\n open: 'فتح البحث',\n placeholder: 'بحث...',\n clear: 'مسح البحث',\n keyboardShortcut: 'اختصار لوحة المفاتيح:',\n command: 'مفتاح الأوامر',\n control: 'مفتاح التحكم',\n results: 'نتائج البحث في المرجع',\n navigate: 'تنقّل',\n select: 'اختيار',\n instructions: 'اضغط السهم للأعلى أو للأسفل للتنقل، Enter للاختيار، واكتب لتصفية النتائج',\n entryHeading: 'عنوان',\n entryOperation: 'عملية',\n entryTag: 'وسم',\n entryTagGroup: 'مجموعة وسوم',\n entryWebhook: 'خطاف ويب',\n },\n navigation: {\n introduction: 'المقدمة',\n closeGroup: 'إغلاق المجموعة',\n closeMenu: 'إغلاق القائمة',\n openGroup: 'فتح المجموعة',\n openMenu: 'فتح القائمة',\n operations: 'العمليات',\n endpoints: 'نقاط نهاية {name}',\n showAllEndpoints: 'إظهار كل نقاط نهاية {name}',\n sidebarFor: 'الشريط الجانبي لـ {name}',\n mainContent: 'وثائق واجهة برمجة التطبيقات لـ {name}',\n collapsed: 'مطوي',\n webhooks: 'خطافات الويب',\n },\n server: {\n label: 'الخادم',\n select: 'اختر خادماً',\n },\n info: {\n termsOfService: 'شروط الخدمة',\n },\n asyncapi: {\n servers: 'الخوادم',\n protocols: 'البروتوكولات',\n },\n clientLibraries: {\n heading: 'مكتبات العملاء',\n more: 'المزيد',\n selectAll: 'اختر من جميع العملاء',\n },\n operation: {\n body: 'الجسم',\n cookies: 'ملفات تعريف الارتباط',\n headers: 'الرؤوس',\n pathParameters: 'معاملات المسار',\n queryParameters: 'معاملات الاستعلام',\n requestBody: 'جسم الطلب',\n responses: 'الاستجابات',\n testRequest: 'اختبار الطلب',\n webhook: 'خطاف ويب',\n selectedContentType: 'نوع المحتوى المحدد',\n hideHeaders: 'إخفاء الرؤوس',\n showHeaders: 'إظهار الرؤوس',\n callbacks: 'عمليات الاستدعاء',\n },\n response: {\n exampleResponses: 'أمثلة الاستجابات',\n noBody: 'لا يوجد جسم',\n showSchema: 'عرض المخطط',\n status: 'الحالة',\n },\n schema: {\n example: 'مثال',\n examples: 'أمثلة',\n default: 'الافتراضي',\n schema: 'المخطط',\n emptyObject: 'كائن فارغ',\n showAdditionalProperties: 'إظهار الخصائص الإضافية',\n childAttributes: 'السمات الفرعية',\n hideChildAttributes: 'إخفاء {name}',\n showChildAttributes: 'إظهار {name}',\n forName: 'لـ {name}',\n showSchemaDetails: 'إظهار تفاصيل المخطط',\n oneOf: 'واحد من',\n anyOf: 'أي من',\n allOf: 'كل من',\n not: 'ليس',\n unknownType: 'نوع غير معروف',\n },\n download: {\n openapi: 'تنزيل مستند OpenAPI',\n asyncapi: 'تنزيل مستند AsyncAPI',\n },\n models: {\n label: 'النماذج',\n },\n actions: {\n copyLink: 'نسخ الرابط',\n copyLinkTo: 'نسخ الرابط إلى {name}',\n copyToClipboard: 'نسخ الرابط إلى الحافظة',\n copyEndpointUrl: 'نسخ رابط endpoint',\n showMore: 'عرض المزيد',\n },\n agent: {\n askAi: 'اسأل الذكاء الاصطناعي',\n askAiAgent: 'اسأل وكيل الذكاء الاصطناعي',\n close: 'إغلاق العميل',\n },\n mcp: {\n generate: 'إنشاء MCP',\n connect: 'ربط MCP',\n },\n developerTools: {\n title: 'أدوات المطورين',\n configure: 'الإعداد',\n share: 'مشاركة',\n deploy: 'نشر',\n scalarConfiguration: 'إعدادات Scalar',\n theme: 'السمة',\n layout: 'التخطيط',\n layoutOptions: 'خيارات التخطيط',\n intro: 'تتيح لك أدوات المطورين تخصيص مظهر الوثائق وسلوكها. يمكنك أيضًا مشاركة وثائقك باستخدام Scalar Registry.',\n disableToolbarBefore: 'لتعطيل شريط الأدوات، عيّن',\n disableToolbarAfter: 'في الإعدادات.',\n localhostOnly: 'لن تظهر أدوات المطورين إلا عند التشغيل على localhost.',\n layoutModern: 'حديث',\n layoutClassic: 'كلاسيكي',\n showSidebar: 'إظهار الشريط الجانبي',\n defaultOpenFirstTag: 'فتح أول وسم افتراضيًا',\n defaultOpenAllTags: 'فتح كل الوسوم افتراضيًا',\n expandAll: 'توسيع كل {label}',\n expandAllResponses: 'توسيع كل الاستجابات',\n hideClientButton: 'إخفاء زر العميل',\n hideDarkModeToggle: 'إخفاء مفتاح الوضع الداكن',\n hideModels: 'إخفاء {label}',\n hideSearch: 'إخفاء البحث',\n showOperationId: 'إظهار معرّف العملية',\n hideTestRequestButton: 'إخفاء زر طلب الاختبار',\n scalarDocs: 'Scalar Docs',\n deployDescription: 'انشر وثائقك على Scalar، منصة الوثائق الحديثة لواجهة API الخاصة بك وكل شيء آخر.',\n shareTitle: 'مشاركة API Reference',\n shareDescription: 'حمّل مستند OpenAPI لمشاركة API Reference مع الآخرين. الأمر بسيط كضغط زر.',\n uploadDocument: 'تحميل المستند',\n temporaryLinkExpiration: 'سيتم حذف المستند تلقائيًا بعد 7 أيام.',\n deployOnScalar: 'النشر على Scalar',\n deployFree: 'انشر وثائقك مجانًا.',\n additionalFeaturesMightRequire: 'قد تتطلب الميزات الإضافية',\n generate: 'إنشاء',\n passwordProtection: 'الحماية بكلمة مرور',\n customDomains: 'نطاقات مخصصة',\n freeFormContent: 'محتوى حر',\n cdnInfrastructure: 'بنية CDN التحتية',\n pullFromGitHub: 'السحب من GitHub',\n markdownMdx: 'Markdown/MDX',\n spectralLinting: 'فحص Spectral',\n jsonSchemaHosting: 'استضافة JSON Schema',\n askAi: 'اسأل الذكاء الاصطناعي',\n mcpServers: 'خوادم MCP',\n unableToExportDocument: 'تعذر تصدير المستند النشط',\n unknownError: 'حدث خطأ غير معروف',\n },\n gettingStarted: {\n swaggerEditor: 'Swagger Editor',\n description:\n 'مرحبًا بك في Scalar API References + Swagger Editor، أداة مجانية ومفتوحة المصدر تأخذ ملف Swagger/OAS الخاص بك وتنشئ API References جميلة.',\n showExample: 'إظهار مثال',\n uploadFile: 'تحميل ملف',\n integrations: 'التكاملات',\n theming: 'السمات',\n features: 'الميزات',\n customize: 'التخصيص',\n customizeDescription: 'استخدم الخطوط ولوحات الألوان الخاصة بك، أو استخدم سماتنا!',\n testing: 'الاختبار',\n testingDescription: 'REST API Client مدمج بعمق (مجاني ومفتوح المصدر أيضًا)',\n search: 'البحث',\n searchDescription: 'بحث مدمج بالكامل (باستخدام fuse.js)',\n hosting: 'الاستضافة',\n hostingDescription: 'استضافة مجانية لنطاق فرعي على https://apidocumentation.com',\n openApiSwagger: 'OpenAPI و Swagger',\n openApiSwaggerDescription: 'دعم OpenAPI 3.1 و OpenAPI 3.0 و Swagger 2.0',\n codeSamples: 'أمثلة التعليمات البرمجية',\n codeSamplesDescription: 'أمثلة تعليمات برمجية لعرض API الخاص بك بأشهر اللغات',\n },\n footer: {\n poweredByScalar: 'مدعوم من Scalar',\n },\n authentication: {\n title: 'المصادقة',\n accepts: 'يقبل',\n allOf: 'كل ما يلي:',\n authentication: 'المصادقة',\n optional: 'المصادقة اختيارية',\n oneOf: 'واحد من:',\n required: 'المصادقة مطلوبة',\n requires: 'يتطلب',\n },\n} satisfies ApiReferenceTranslations\n"],"mappings":";AAEA,IAAa,KAAK;CAChB,QAAQ;EACN,sBAAsB;EACtB,OAAO;EACP,YAAY;EACZ,aAAa;EACb,eAAe;EACf,MAAM;EACN,QAAQ;EACR,aAAa;EACb,YAAY;EACZ,MAAM;EACN,UAAU;EACV,KAAK;EACL,KAAK;EACL,WAAW;EACX,WAAW;EACX,YAAY;EACZ,UAAU;EACV,MAAM;EACN,eAAe;EACf,SAAS;EACT,UAAU;EACV,UAAU;EACV,YAAY;EACZ,eAAe;EACf,MAAM;EACN,QAAQ;EACR,QAAQ;EACR,WAAW;EACZ;CACD,QAAQ;EACN,OAAO;EACP,YAAY;EACZ,MAAM;EACN,aAAa;EACb,OAAO;EACP,kBAAkB;EAClB,SAAS;EACT,SAAS;EACT,SAAS;EACT,UAAU;EACV,QAAQ;EACR,cAAc;EACd,cAAc;EACd,gBAAgB;EAChB,UAAU;EACV,eAAe;EACf,cAAc;EACf;CACD,YAAY;EACV,cAAc;EACd,YAAY;EACZ,WAAW;EACX,WAAW;EACX,UAAU;EACV,YAAY;EACZ,WAAW;EACX,kBAAkB;EAClB,YAAY;EACZ,aAAa;EACb,WAAW;EACX,UAAU;EACX;CACD,QAAQ;EACN,OAAO;EACP,QAAQ;EACT;CACD,MAAM,EACJ,gBAAgB,eACjB;CACD,UAAU;EACR,SAAS;EACT,WAAW;EACZ;CACD,iBAAiB;EACf,SAAS;EACT,MAAM;EACN,WAAW;EACZ;CACD,WAAW;EACT,MAAM;EACN,SAAS;EACT,SAAS;EACT,gBAAgB;EAChB,iBAAiB;EACjB,aAAa;EACb,WAAW;EACX,aAAa;EACb,SAAS;EACT,qBAAqB;EACrB,aAAa;EACb,aAAa;EACb,WAAW;EAC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X,sBAAsB;EACtB,SAAS;EACT,oBAAoB;EACpB,QAAQ;EACR,mBAAmB;EACnB,SAAS;EACT,oBAAoB;EACpB,gBAAgB;EAChB,2BAA2B;EAC3B,aAAa;EACb,wBAAwB;EACzB;CACD,QAAQ,EACN,iBAAiB,mBAClB;CACD,gBAAgB;EACd,OAAO;EACP,SAAS;EACT,OAAO;EACP,gBAAgB;EAChB,UAAU;EACV,OAAO;EACP,UAAU;EACV,UAAU;EACX;CACF"}
1
+ {"version":3,"file":"ar.js","names":[],"sources":["../../../../src/features/localization/locales/ar.ts"],"sourcesContent":["import type { ApiReferenceTranslations } from '@scalar/types/api-reference'\n\nexport const ar = {\n common: {\n additionalProperties: 'خصائص إضافية',\n const: 'ثابت',\n deprecated: 'مهمل',\n description: 'الوصف',\n discriminator: 'المميّز',\n enum: 'تعداد',\n format: 'التنسيق',\n greaterThan: 'أكبر من',\n httpMethod: 'طريقة HTTP',\n keys: 'المفاتيح',\n lessThan: 'أقل من',\n max: 'الحد الأقصى',\n min: 'الحد الأدنى',\n maxLength: 'أقصى طول',\n minLength: 'أدنى طول',\n multipleOf: 'مضاعف لـ',\n nullable: 'يقبل null',\n path: 'المسار',\n propertyNames: 'أسماء الخصائص',\n pattern: 'النمط',\n readOnly: 'قراءة فقط',\n required: 'مطلوب',\n hideValues: 'إخفاء القيم',\n showAllValues: 'عرض كل القيم',\n type: 'النوع',\n unique: 'فريد',\n values: 'القيم',\n writeOnly: 'كتابة فقط',\n },\n search: {\n label: 'بحث',\n inputLabel: 'أدخل استعلام البحث',\n open: 'فتح البحث',\n placeholder: 'بحث...',\n clear: 'مسح البحث',\n keyboardShortcut: 'اختصار لوحة المفاتيح:',\n command: 'مفتاح الأوامر',\n control: 'مفتاح التحكم',\n results: 'نتائج البحث في المرجع',\n navigate: 'تنقّل',\n select: 'اختيار',\n instructions: 'اضغط السهم للأعلى أو للأسفل للتنقل، Enter للاختيار، واكتب لتصفية النتائج',\n entryHeading: 'عنوان',\n entryOperation: 'عملية',\n entryTag: 'وسم',\n entryTagGroup: 'مجموعة وسوم',\n entryWebhook: 'خطاف ويب',\n },\n navigation: {\n introduction: 'المقدمة',\n closeGroup: 'إغلاق المجموعة',\n closeMenu: 'إغلاق القائمة',\n openGroup: 'فتح المجموعة',\n openMenu: 'فتح القائمة',\n operations: 'العمليات',\n endpoints: 'نقاط نهاية {name}',\n showAllEndpoints: 'إظهار كل نقاط نهاية {name}',\n sidebarFor: 'الشريط الجانبي لـ {name}',\n mainContent: 'وثائق واجهة برمجة التطبيقات لـ {name}',\n collapsed: 'مطوي',\n webhooks: 'خطافات الويب',\n channels: 'القنوات',\n },\n server: {\n label: 'الخادم',\n select: 'اختر خادماً',\n },\n info: {\n termsOfService: 'شروط الخدمة',\n },\n asyncapi: {\n servers: 'الخوادم',\n protocols: 'البروتوكولات',\n },\n clientLibraries: {\n heading: 'مكتبات العملاء',\n more: 'المزيد',\n selectAll: 'اختر من جميع العملاء',\n },\n operation: {\n body: 'الجسم',\n cookies: 'ملفات تعريف الارتباط',\n headers: 'الرؤوس',\n pathParameters: 'معاملات المسار',\n queryParameters: 'معاملات الاستعلام',\n requestBody: 'جسم الطلب',\n responses: 'الاستجابات',\n testRequest: 'اختبار الطلب',\n webhook: 'خطاف ويب',\n selectedContentType: 'نوع المحتوى المحدد',\n hideHeaders: 'إخفاء الرؤوس',\n showHeaders: 'إظهار الرؤوس',\n callbacks: 'عمليات الاستدعاء',\n },\n response: {\n exampleResponses: 'أمثلة الاستجابات',\n noBody: 'لا يوجد جسم',\n showSchema: 'عرض المخطط',\n status: 'الحالة',\n },\n schema: {\n example: 'مثال',\n examples: 'أمثلة',\n default: 'الافتراضي',\n schema: 'المخطط',\n emptyObject: 'كائن فارغ',\n showAdditionalProperties: 'إظهار الخصائص الإضافية',\n childAttributes: 'السمات الفرعية',\n hideChildAttributes: 'إخفاء {name}',\n showChildAttributes: 'إظهار {name}',\n forName: 'لـ {name}',\n showSchemaDetails: 'إظهار تفاصيل المخطط',\n oneOf: 'واحد من',\n anyOf: 'أي من',\n allOf: 'كل من',\n not: 'ليس',\n unknownType: 'نوع غير معروف',\n },\n download: {\n openapi: 'تنزيل مستند OpenAPI',\n asyncapi: 'تنزيل مستند AsyncAPI',\n },\n models: {\n label: 'النماذج',\n },\n actions: {\n copyLink: 'نسخ الرابط',\n copyLinkTo: 'نسخ الرابط إلى {name}',\n copyToClipboard: 'نسخ الرابط إلى الحافظة',\n copyEndpointUrl: 'نسخ رابط endpoint',\n showMore: 'عرض المزيد',\n },\n agent: {\n askAi: 'اسأل الذكاء الاصطناعي',\n askAiAgent: 'اسأل وكيل الذكاء الاصطناعي',\n close: 'إغلاق العميل',\n },\n mcp: {\n generate: 'إنشاء MCP',\n connect: 'ربط MCP',\n },\n developerTools: {\n title: 'أدوات المطورين',\n configure: 'الإعداد',\n share: 'مشاركة',\n deploy: 'نشر',\n scalarConfiguration: 'إعدادات Scalar',\n theme: 'السمة',\n layout: 'التخطيط',\n layoutOptions: 'خيارات التخطيط',\n intro: 'تتيح لك أدوات المطورين تخصيص مظهر الوثائق وسلوكها. يمكنك أيضًا مشاركة وثائقك باستخدام Scalar Registry.',\n disableToolbarBefore: 'لتعطيل شريط الأدوات، عيّن',\n disableToolbarAfter: 'في الإعدادات.',\n localhostOnly: 'لن تظهر أدوات المطورين إلا عند التشغيل على localhost.',\n layoutModern: 'حديث',\n layoutClassic: 'كلاسيكي',\n showSidebar: 'إظهار الشريط الجانبي',\n defaultOpenFirstTag: 'فتح أول وسم افتراضيًا',\n defaultOpenAllTags: 'فتح كل الوسوم افتراضيًا',\n expandAll: 'توسيع كل {label}',\n expandAllResponses: 'توسيع كل الاستجابات',\n hideClientButton: 'إخفاء زر العميل',\n hideDarkModeToggle: 'إخفاء مفتاح الوضع الداكن',\n hideModels: 'إخفاء {label}',\n hideSearch: 'إخفاء البحث',\n showOperationId: 'إظهار معرّف العملية',\n hideTestRequestButton: 'إخفاء زر طلب الاختبار',\n scalarDocs: 'Scalar Docs',\n deployDescription: 'انشر وثائقك على Scalar، منصة الوثائق الحديثة لواجهة API الخاصة بك وكل شيء آخر.',\n shareTitle: 'مشاركة API Reference',\n shareDescription: 'حمّل مستند OpenAPI لمشاركة API Reference مع الآخرين. الأمر بسيط كضغط زر.',\n uploadDocument: 'تحميل المستند',\n temporaryLinkExpiration: 'سيتم حذف المستند تلقائيًا بعد 7 أيام.',\n deployOnScalar: 'النشر على Scalar',\n deployFree: 'انشر وثائقك مجانًا.',\n additionalFeaturesMightRequire: 'قد تتطلب الميزات الإضافية',\n generate: 'إنشاء',\n passwordProtection: 'الحماية بكلمة مرور',\n customDomains: 'نطاقات مخصصة',\n freeFormContent: 'محتوى حر',\n cdnInfrastructure: 'بنية CDN التحتية',\n pullFromGitHub: 'السحب من GitHub',\n markdownMdx: 'Markdown/MDX',\n spectralLinting: 'فحص Spectral',\n jsonSchemaHosting: 'استضافة JSON Schema',\n askAi: 'اسأل الذكاء الاصطناعي',\n mcpServers: 'خوادم MCP',\n unableToExportDocument: 'تعذر تصدير المستند النشط',\n unknownError: 'حدث خطأ غير معروف',\n },\n gettingStarted: {\n swaggerEditor: 'Swagger Editor',\n description:\n 'مرحبًا بك في Scalar API References + Swagger Editor، أداة مجانية ومفتوحة المصدر تأخذ ملف Swagger/OAS الخاص بك وتنشئ API References جميلة.',\n showExample: 'إظهار مثال',\n uploadFile: 'تحميل ملف',\n integrations: 'التكاملات',\n theming: 'السمات',\n features: 'الميزات',\n customize: 'التخصيص',\n customizeDescription: 'استخدم الخطوط ولوحات الألوان الخاصة بك، أو استخدم سماتنا!',\n testing: 'الاختبار',\n testingDescription: 'REST API Client مدمج بعمق (مجاني ومفتوح المصدر أيضًا)',\n search: 'البحث',\n searchDescription: 'بحث مدمج بالكامل (باستخدام fuse.js)',\n hosting: 'الاستضافة',\n hostingDescription: 'استضافة مجانية لنطاق فرعي على https://apidocumentation.com',\n openApiSwagger: 'OpenAPI و Swagger',\n openApiSwaggerDescription: 'دعم OpenAPI 3.1 و OpenAPI 3.0 و Swagger 2.0',\n codeSamples: 'أمثلة التعليمات البرمجية',\n codeSamplesDescription: 'أمثلة تعليمات برمجية لعرض API الخاص بك بأشهر اللغات',\n },\n footer: {\n poweredByScalar: 'مدعوم من Scalar',\n },\n authentication: {\n title: 'المصادقة',\n accepts: 'يقبل',\n allOf: 'كل ما يلي:',\n authentication: 'المصادقة',\n optional: 'المصادقة اختيارية',\n oneOf: 'واحد من:',\n required: 'المصادقة مطلوبة',\n requires: 'يتطلب',\n },\n} satisfies ApiReferenceTranslations\n"],"mappings":";AAEA,IAAa,KAAK;CAChB,QAAQ;EACN,sBAAsB;EACtB,OAAO;EACP,YAAY;EACZ,aAAa;EACb,eAAe;EACf,MAAM;EACN,QAAQ;EACR,aAAa;EACb,YAAY;EACZ,MAAM;EACN,UAAU;EACV,KAAK;EACL,KAAK;EACL,WAAW;EACX,WAAW;EACX,YAAY;EACZ,UAAU;EACV,MAAM;EACN,eAAe;EACf,SAAS;EACT,UAAU;EACV,UAAU;EACV,YAAY;EACZ,eAAe;EACf,MAAM;EACN,QAAQ;EACR,QAAQ;EACR,WAAW;EACZ;CACD,QAAQ;EACN,OAAO;EACP,YAAY;EACZ,MAAM;EACN,aAAa;EACb,OAAO;EACP,kBAAkB;EAClB,SAAS;EACT,SAAS;EACT,SAAS;EACT,UAAU;EACV,QAAQ;EACR,cAAc;EACd,cAAc;EACd,gBAAgB;EAChB,UAAU;EACV,eAAe;EACf,cAAc;EACf;CACD,YAAY;EACV,cAAc;EACd,YAAY;EACZ,WAAW;EACX,WAAW;EACX,UAAU;EACV,YAAY;EACZ,WAAW;EACX,kBAAkB;EAClB,YAAY;EACZ,aAAa;EACb,WAAW;EACX,UAAU;EACV,UAAU;EACX;CACD,QAAQ;EACN,OAAO;EACP,QAAQ;EACT;CACD,MAAM,EACJ,gBAAgB,eACjB;CACD,UAAU;EACR,SAAS;EACT,WAAW;EACZ;CACD,iBAAiB;EACf,SAAS;EACT,MAAM;EACN,WAAW;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EACjB,mBAAmB;EACnB,OAAO;EACP,YAAY;EACZ,wBAAwB;EACxB,cAAc;EACf;CACD,gBAAgB;EACd,eAAe;EACf,aACE;EACF,aAAa;EACb,YAAY;EACZ,cAAc;EACd,SAAS;EACT,UAAU;EACV,WAAW;EACX,sBAAsB;EACtB,SAAS;EACT,oBAAoB;EACpB,QAAQ;EACR,mBAAmB;EACnB,SAAS;EACT,oBAAoB;EACpB,gBAAgB;EAChB,2BAA2B;EAC3B,aAAa;EACb,wBAAwB;EACzB;CACD,QAAQ,EACN,iBAAiB,mBAClB;CACD,gBAAgB;EACd,OAAO;EACP,SAAS;EACT,OAAO;EACP,gBAAgB;EAChB,UAAU;EACV,OAAO;EACP,UAAU;EACV,UAAU;EACX;CACF"}
@@ -61,6 +61,7 @@ export declare const de: {
61
61
  mainContent: string;
62
62
  collapsed: string;
63
63
  webhooks: string;
64
+ channels: string;
64
65
  };
65
66
  server: {
66
67
  label: string;
@@ -1 +1 @@
1
- {"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../../../src/features/localization/locales/de.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsOqB,CAAA"}
1
+ {"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../../../src/features/localization/locales/de.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuOqB,CAAA"}
@@ -61,7 +61,8 @@ var de = {
61
61
  sidebarFor: "Seitenleiste für {name}",
62
62
  mainContent: "API-Dokumentation für {name}",
63
63
  collapsed: "Eingeklappt",
64
- webhooks: "Webhooks"
64
+ webhooks: "Webhooks",
65
+ channels: "Kanäle"
65
66
  },
66
67
  server: {
67
68
  label: "Server",