@scalar/api-client 3.21.1 → 3.21.3

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 (143) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/dist/components/SectionFilter.vue.d.ts +0 -2
  3. package/dist/components/SectionFilter.vue.d.ts.map +1 -1
  4. package/dist/components/SectionFilter.vue.js +1 -1
  5. package/dist/components/SectionFilter.vue.js.map +1 -1
  6. package/dist/components/SectionFilter.vue.script.js +2 -8
  7. package/dist/components/SectionFilter.vue.script.js.map +1 -1
  8. package/dist/components/SectionFilterButton.vue.d.ts +0 -1
  9. package/dist/components/SectionFilterButton.vue.d.ts.map +1 -1
  10. package/dist/components/SectionFilterButton.vue.js.map +1 -1
  11. package/dist/components/SectionFilterButton.vue.script.js +2 -10
  12. package/dist/components/SectionFilterButton.vue.script.js.map +1 -1
  13. package/dist/style.css +153 -82
  14. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  15. package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -1
  16. package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js +11 -0
  17. package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js.map +1 -1
  18. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
  19. package/dist/v2/blocks/operation-block/components/Header.vue.js +1 -1
  20. package/dist/v2/blocks/operation-block/components/Header.vue.js.map +1 -1
  21. package/dist/v2/blocks/operation-block/components/Header.vue.script.js +2 -0
  22. package/dist/v2/blocks/operation-block/components/Header.vue.script.js.map +1 -1
  23. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  24. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  25. package/dist/v2/blocks/request-block/RequestBlock.vue.js.map +1 -1
  26. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js +17 -6
  27. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +1 -1
  28. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js +2 -0
  29. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js.map +1 -1
  30. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -0
  31. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  32. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js.map +1 -1
  33. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js +3 -1
  34. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js.map +1 -1
  35. package/dist/v2/blocks/request-block/helpers/get-structured-body-rows.js +2 -1
  36. package/dist/v2/blocks/request-block/helpers/get-structured-body-rows.js.map +1 -1
  37. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +2 -0
  38. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
  39. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
  40. package/dist/v2/blocks/response-block/ResponseBlock.vue.js.map +1 -1
  41. package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js +26 -5
  42. package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js.map +1 -1
  43. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  44. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
  45. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js.map +1 -1
  46. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js +23 -43
  47. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js.map +1 -1
  48. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +9 -0
  49. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  50. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js.map +1 -1
  51. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js +65 -42
  52. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js.map +1 -1
  53. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  54. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js.map +1 -1
  55. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js +5 -5
  56. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js.map +1 -1
  57. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  58. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js.map +1 -1
  59. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.script.js +11 -1
  60. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.script.js.map +1 -1
  61. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
  62. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +1 -1
  63. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js.map +1 -1
  64. package/dist/v2/components/code-input/CodeInputLite.vue.d.ts +6 -2
  65. package/dist/v2/components/code-input/CodeInputLite.vue.d.ts.map +1 -1
  66. package/dist/v2/components/code-input/CodeInputLite.vue.js +1 -1
  67. package/dist/v2/components/code-input/CodeInputLite.vue.js.map +1 -1
  68. package/dist/v2/components/code-input/CodeInputLite.vue.script.js +16 -1
  69. package/dist/v2/components/code-input/CodeInputLite.vue.script.js.map +1 -1
  70. package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
  71. package/dist/v2/components/data-table/DataTableInput.vue.js +1 -1
  72. package/dist/v2/components/data-table/DataTableInput.vue.js.map +1 -1
  73. package/dist/v2/components/data-table/DataTableInput.vue.script.js +7 -2
  74. package/dist/v2/components/data-table/DataTableInput.vue.script.js.map +1 -1
  75. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +4 -4
  76. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -1
  77. package/dist/v2/components/data-table/DataTableInputSelect.vue.js.map +1 -1
  78. package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js +22 -16
  79. package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js.map +1 -1
  80. package/dist/v2/components/layout/CollapsibleSection.vue.d.ts +20 -0
  81. package/dist/v2/components/layout/CollapsibleSection.vue.d.ts.map +1 -1
  82. package/dist/v2/components/layout/CollapsibleSection.vue.js.map +1 -1
  83. package/dist/v2/components/layout/CollapsibleSection.vue.script.js +36 -16
  84. package/dist/v2/components/layout/CollapsibleSection.vue.script.js.map +1 -1
  85. package/dist/v2/components/layout/collapsible-section-heading-level.d.ts +13 -0
  86. package/dist/v2/components/layout/collapsible-section-heading-level.d.ts.map +1 -0
  87. package/dist/v2/components/layout/collapsible-section-heading-level.js +14 -0
  88. package/dist/v2/components/layout/collapsible-section-heading-level.js.map +1 -0
  89. package/dist/v2/components/layout/index.d.ts +1 -0
  90. package/dist/v2/components/layout/index.d.ts.map +1 -1
  91. package/dist/v2/components/layout/index.js +2 -1
  92. package/dist/v2/components/modals/ModalClientContainer.vue.d.ts.map +1 -1
  93. package/dist/v2/components/modals/ModalClientContainer.vue.js +1 -1
  94. package/dist/v2/components/modals/ModalClientContainer.vue.js.map +1 -1
  95. package/dist/v2/components/modals/ModalClientContainer.vue.script.js +10 -1
  96. package/dist/v2/components/modals/ModalClientContainer.vue.script.js.map +1 -1
  97. package/dist/v2/components/sidebar/SidebarToggle.vue.d.ts +15 -2
  98. package/dist/v2/components/sidebar/SidebarToggle.vue.d.ts.map +1 -1
  99. package/dist/v2/components/sidebar/SidebarToggle.vue.js +3 -1
  100. package/dist/v2/components/sidebar/SidebarToggle.vue.js.map +1 -1
  101. package/dist/v2/components/sidebar/SidebarToggle.vue.script.js +5 -5
  102. package/dist/v2/components/sidebar/SidebarToggle.vue.script.js.map +1 -1
  103. package/dist/v2/constants.js +1 -1
  104. package/dist/v2/features/localization/locales/ar.d.ts +2 -0
  105. package/dist/v2/features/localization/locales/ar.d.ts.map +1 -1
  106. package/dist/v2/features/localization/locales/ar.js +2 -0
  107. package/dist/v2/features/localization/locales/ar.js.map +1 -1
  108. package/dist/v2/features/localization/locales/de.d.ts +2 -0
  109. package/dist/v2/features/localization/locales/de.d.ts.map +1 -1
  110. package/dist/v2/features/localization/locales/de.js +2 -0
  111. package/dist/v2/features/localization/locales/de.js.map +1 -1
  112. package/dist/v2/features/localization/locales/es.d.ts +2 -0
  113. package/dist/v2/features/localization/locales/es.d.ts.map +1 -1
  114. package/dist/v2/features/localization/locales/es.js +2 -0
  115. package/dist/v2/features/localization/locales/es.js.map +1 -1
  116. package/dist/v2/features/localization/locales/fr.d.ts +2 -0
  117. package/dist/v2/features/localization/locales/fr.d.ts.map +1 -1
  118. package/dist/v2/features/localization/locales/fr.js +2 -0
  119. package/dist/v2/features/localization/locales/fr.js.map +1 -1
  120. package/dist/v2/features/localization/locales/pt.d.ts +2 -0
  121. package/dist/v2/features/localization/locales/pt.d.ts.map +1 -1
  122. package/dist/v2/features/localization/locales/pt.js +2 -0
  123. package/dist/v2/features/localization/locales/pt.js.map +1 -1
  124. package/dist/v2/features/localization/locales/ru.d.ts +2 -0
  125. package/dist/v2/features/localization/locales/ru.d.ts.map +1 -1
  126. package/dist/v2/features/localization/locales/ru.js +2 -0
  127. package/dist/v2/features/localization/locales/ru.js.map +1 -1
  128. package/dist/v2/features/localization/locales/zh-cn.d.ts +2 -0
  129. package/dist/v2/features/localization/locales/zh-cn.d.ts.map +1 -1
  130. package/dist/v2/features/localization/locales/zh-cn.js +2 -0
  131. package/dist/v2/features/localization/locales/zh-cn.js.map +1 -1
  132. package/dist/v2/features/localization/translations.d.ts +2 -0
  133. package/dist/v2/features/localization/translations.d.ts.map +1 -1
  134. package/dist/v2/features/localization/translations.js +2 -0
  135. package/dist/v2/features/localization/translations.js.map +1 -1
  136. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  137. package/dist/v2/features/modal/Modal.vue.js.map +1 -1
  138. package/dist/v2/features/modal/Modal.vue.script.js +2 -1
  139. package/dist/v2/features/modal/Modal.vue.script.js.map +1 -1
  140. package/dist/v2/features/search/helpers/create-fuse-instance.js +1 -1
  141. package/dist/v2/features/search/helpers/create-fuse-instance.js.map +1 -1
  142. package/dist/vue-styles.css +114 -73
  143. package/package.json +12 -12
@@ -17,6 +17,8 @@ var en = {
17
17
  label: "Request: {name}"
18
18
  },
19
19
  responseBlock: {
20
+ requestFailed: "Request failed",
21
+ networkErrorHelp: "Possible causes include CORS restrictions or a network connection problem. Check the browser console for details. If CORS is blocking the request, configure the API server to allow this origin or use a trusted proxy.",
20
22
  response: "Response",
21
23
  requestHeaders: "Request Headers",
22
24
  responseHeaders: "Response Headers",
@@ -1 +1 @@
1
- {"version":3,"file":"translations.js","names":[],"sources":["../../../../src/v2/features/localization/translations.ts"],"sourcesContent":["import type { ApiClientTranslations } from '@scalar/types/api-reference'\n\n/** English fallback for API Client UI strings. */\nexport const en = {\n serverVariablesSelect: {\n selected: 'Selected:',\n },\n serverVariablesTextbox: {\n value: 'value',\n },\n sidebarListElementForm: {\n cancel: 'Cancel',\n },\n requestBlock: {\n authentication: 'Authentication',\n variables: 'Variables',\n cookies: 'Cookies',\n headers: 'Headers',\n queryParameters: 'Query Parameters',\n queryString: 'Query String',\n queryStringDescription:\n 'This parameter supplies the entire query string, so additional named parameters cannot be added. Existing named parameters are sent after it; duplicate keys are preserved.',\n requestBody: 'Request Body',\n requestName: 'Request Name',\n label: 'Request: {name}',\n },\n responseBlock: {\n response: 'Response',\n requestHeaders: 'Request Headers',\n responseHeaders: 'Response Headers',\n body: 'Body',\n },\n codeInput: {\n required: 'Required',\n exitHint: 'Press {escape} then {tab} to exit',\n },\n codeInputLite: {\n required: 'Required',\n },\n dataTableInput: {\n clearValue: 'Clear Value',\n showPassword: 'Show Password',\n hidePassword: 'Hide Password',\n },\n dataTableInputSelect: {\n value: 'Value',\n addValue: 'Add value',\n },\n confirmationForm: {\n cancel: 'Cancel',\n save: 'Save',\n },\n collapsibleSection: {\n collapsed: '(Collapsed)',\n item: 'Item',\n items: 'Items',\n },\n modalClientContainer: {\n label: 'API Client',\n },\n serverDropdown: {\n server: 'Server:',\n addServer: 'Add Server',\n updateServers: 'Update Servers',\n unknownServer: 'Unknown server',\n },\n sidebar: {\n search: 'Search',\n },\n sidebarMenu: {\n settings: 'Settings',\n },\n sidebarToggle: {\n hide: 'Hide sidebar',\n show: 'Show sidebar',\n },\n environmentsList: {\n addEnvironment: 'Add Environment',\n },\n modal: {\n noDocumentSelected: 'No document selected',\n },\n operation: {\n selectAnOperationToViewDetails: 'Select an operation to view details',\n },\n header: {\n operationSettings: 'Operation settings',\n closeClient: 'Close Client',\n },\n openApiClientButton: {\n openAPIClient: 'Open API Client',\n },\n requestBody: {\n noBody: 'No Body',\n delete: 'Delete',\n selectFile: 'Select File',\n multipartForm: 'Multipart Form',\n formUrlEncoded: 'Form URL Encoded',\n binaryFile: 'Binary File',\n other: 'Other',\n none: 'None',\n },\n requestBodyStructured: {\n body: 'Body',\n },\n requestBodyViewToggle: {\n form: 'Form',\n raw: 'Raw',\n fixBody: 'Fix the body to switch to the form view',\n },\n requestCodeSnippet: {\n unavailable: 'No code sample available for this example.',\n codeSnippet: 'Code Snippet',\n },\n requestTable: {\n enabled: 'Enabled',\n key: 'Key',\n value: 'Value',\n },\n requestTableRow: {\n key: 'Key',\n value: 'Value',\n delete: 'Delete',\n selectFile: 'Select File',\n globalCookieHint: 'Global cookies are shared across the whole workspace. Click to navigate.',\n readOnlyHint:\n 'This is a readonly property and you can not modify it! If you want to change it you have to override it or disable it using the checkbox',\n include: 'Include {name} in request',\n keyLabel: '{name} Key',\n valueLabel: '{name} Value',\n deleteRow: 'Delete {name}',\n row: 'row',\n },\n requestTableTooltip: {\n min: 'min:',\n max: 'max:',\n default: 'default:',\n invalid: 'Input is invalid',\n moreInformation: 'More Information',\n },\n headers: {\n headerKey: 'Header Key',\n headerValue: 'Header Value',\n noHeaders: 'No headers',\n },\n responseBody: {\n binaryFile: 'Binary file',\n },\n responseBodyPreview: {\n previewUnavailable: 'Preview unavailable',\n },\n responseBodyStreaming: {\n body: 'Body',\n listening: 'Listening\\u2026',\n cancel: 'Cancel',\n },\n responseBodyToggle: {\n preview: 'Preview',\n raw: 'Raw',\n },\n responseBodyVirtual: {\n body: 'Body',\n largeBodyHint: \"This response body is massive! Syntax highlighting won't work here.\",\n },\n responseCookies: {\n cookies: 'Cookies',\n cookieName: 'Cookie Name',\n cookieValue: 'Cookie Value',\n noCookies: 'No cookies',\n },\n responseEmpty: {\n roadmap: 'Roadmap',\n poweredByScalarcom: 'Powered By Scalar.com',\n getStarted: 'Get Started',\n newRequest: 'New Request',\n sendRequest: 'Send Request',\n version: 'Scalar App V{version} Beta',\n },\n responseLoadingOverlay: {\n cancel: 'Cancel',\n },\n addressBar: {\n path: 'Path',\n copyUrl: 'Copy URL',\n send: 'Send',\n sendRequest: 'Send {method} request to {url}',\n duplicateRequest: 'A {method} request to {path} already exists in this document',\n urlPlaceholder: 'Enter a URL',\n webhookUrlPlaceholder: 'Enter the full webhook URL, e.g. https://example.com/hook',\n },\n addressBarHistory: {\n requestHistory: 'Request History',\n },\n environmentSelector: {\n noEnvironment: 'No Environment',\n notAvailableInThisContext: 'Not available in this context',\n environmentHint: 'Environments let you manage variables like API keys and base URLs across different contexts.',\n add: 'Add Environment',\n select: 'Select Environment',\n unavailable: '{name} (Unavailable)',\n current: 'Current environment: {name}',\n },\n deleteRequestAuthModal: {\n deleteSecurityScheme: 'Delete Security Scheme',\n cancel: 'Cancel',\n delete: 'Delete',\n confirmation: \"This cannot be undone. You're about to delete the {name} security scheme from the collection.\",\n },\n oauth2: {\n deviceAuthorizationUrl: 'Device Authorization URL',\n deviceVerificationPrompt: 'Open the verification page and enter this code:',\n waitingForAuthorization: 'Waiting for authorization…',\n cancelDeviceAuthorization: 'Cancel',\n\n accessToken: 'Access Token',\n refreshUrl: 'Refresh URL',\n refresh: 'Refresh',\n authUrl: 'Auth URL',\n tokenUrl: 'Token URL',\n redirectUrl: 'Redirect URL',\n username: 'Username',\n password: 'Password',\n clientID: 'Client ID',\n clientSecret: 'Client Secret',\n usePKCE: 'Use PKCE',\n credentialsLocation: 'Credentials Location',\n authorize: 'Authorize',\n clear: 'Clear',\n failedToauthorize: 'Failed to authorize',\n failedToRefreshToken: 'Failed to refresh token',\n optionalRedirectUrl: 'Optional redirect URL',\n },\n oauthScopesAddModal: {\n name: 'Name:',\n description: 'Description:',\n readUserData: 'Read user data',\n edit: 'Edit Scope',\n add: 'Add Scope',\n save: 'Save',\n required: 'Scope name is required.',\n duplicate: 'A scope named \"{name}\" already exists.',\n },\n oauthScopesInput: {\n noScopesDefined: 'No Scopes Defined',\n addScope: 'Add Scope',\n deselectAll: 'Deselect All',\n selectAll: 'Select All',\n selectedScopes: 'Scopes Selected {count} / {total}',\n editScope: 'Edit {name}',\n deleteScope: 'Delete {name}',\n selectScope: 'Select {name} scope',\n },\n openIdConnect: {\n discoveryUrl: 'Discovery URL',\n fetchConfiguration: 'Fetch Configuration',\n failedToFetchConfiguration: 'Failed to fetch OpenID Connect configuration',\n },\n requestAuthDataTable: {\n noauthenticationSelected: 'No authentication selected',\n },\n requestAuthTab: {\n token: 'Token',\n bearerToken: 'Bearer Token',\n getAToken: 'Get a token',\n refresh: 'Refresh',\n username: 'Username',\n password: 'Password',\n name: 'Name',\n value: 'Value',\n cancel: 'Cancel',\n authorize: 'Authorize',\n unsupportedCredentials: 'Credentials for this AsyncAPI security scheme are not sent by the browser client.',\n authorizeVia: 'Authorize via {name}',\n unsupportedType: 'The {type} security scheme type is not supported yet.',\n missingType:\n 'The security scheme is missing a type, please double check your {type} document or Authentication Configuration',\n failedToauthorize: 'Failed to authorize',\n failedToRefresh: 'Failed to refresh',\n configure: 'Configure {name}',\n mutualTlsHint:\n 'Mutual TLS authenticates with a client certificate presented during the TLS handshake, so there is nothing to enter here.',\n },\n commandActionForm: {\n continue: 'Continue',\n },\n environment: {\n thisIsTheActiveEnvironment: 'This is the active environment',\n active: 'Active',\n editEnvironment: 'Edit Environment',\n deleteEnvironment: 'Delete Environment',\n },\n environmentCreateModal: {\n environmentName: 'Environment name',\n thisEnvironmentNameIsAlreadyInUse: 'This environment name is already in use.',\n update: 'Update Environment',\n add: 'Add Environment',\n },\n environmentDeleteModal: {\n cancel: 'Cancel',\n deleteEnvironment: 'Delete Environment',\n deleteConfirmation: 'Are you sure you want to delete this environment? This action cannot be undone.',\n title: 'Delete {name}',\n },\n environmentVariablesDropdown: {\n variableSuggestions: 'Variable suggestions',\n addVariable: 'Add Variable',\n },\n environmentVariablesTable: {\n name: 'Name',\n value: 'Value',\n actions: 'Actions',\n environmentVariableName: 'Environment Variable Name',\n environmentVariableValue: 'Environment Variable Value',\n },\n documentSearchModal: {\n documentSearch: 'Document Search',\n documentSearchResults: 'Document Search Results',\n navigate: '\\u2191\\u2193 Navigate',\n select: '\\u23ce Select',\n keyboardInstructions: 'Press up arrow / down arrow to navigate, enter to select, type to filter results',\n },\n searchResult: {\n httpMethod: 'HTTP Method:',\n path: 'Path:',\n description: 'Description:',\n heading: 'Heading',\n operation: 'Operation',\n tag: 'Tag',\n },\n sectionFilter: {\n all: 'All',\n auth: 'Auth',\n variables: 'Variables',\n cookies: 'Cookies',\n headers: 'Headers',\n query: 'Query',\n body: 'Body',\n },\n requestParams: {\n clearAll: 'Clear All {title}',\n clear: 'Clear',\n clearOptionalParameters: 'Clear optional parameters',\n },\n responseBodyDownload: {\n download: 'Download Response Body',\n label: 'Download',\n body: 'Response Body',\n },\n responseMetaInformation: {\n duration: 'Response Information, Duration:',\n size: ', Size:',\n status: ', Status:',\n },\n authSelector: {\n selectedType: 'Selected Auth Type: {type}',\n multipleTypes: 'Multiple Auth Types Selected',\n selectType: 'Select Auth Type',\n optional: 'Optional',\n required: 'Required',\n deleteScheme: 'Delete {name}',\n requiredGroup: 'Required authentication',\n availableGroup: 'Available authentication',\n addGroup: 'Add new authentication',\n },\n operationBlock: {\n webhookUrlRequired: 'Webhook URL required. Enter a destination first.',\n pathParametersRequired: 'Path parameters must have values.',\n forbiddenMethod: 'The Fetch API cannot send {method} requests.',\n },\n dataTableCheckbox: {\n toggle: 'Toggle',\n },\n pillTooltipHost: {\n computedAtExecution: 'Computed at request execution',\n noValue: 'No value',\n },\n authOptions: {\n oauth2DeviceAuthorization: 'OAuth2 Device Authorization',\n apiKeyCookie: 'API Key in Cookies',\n apiKeyHeader: 'API Key in Headers',\n apiKeyQuery: 'API Key in Query Params',\n httpBasic: 'HTTP Basic',\n httpBearer: 'HTTP Bearer',\n oauth2Implicit: 'Oauth2 Implicit Flow',\n oauth2Password: 'Oauth2 Password Flow',\n oauth2ClientCredentials: 'Oauth2 Client Credentials',\n oauth2AuthorizationFlow: 'Oauth2 Authorization Code',\n },\n deleteSidebarListElement: {\n delete: 'Delete {name}',\n },\n deleteModal: {\n delete: 'Delete {name}',\n },\n} satisfies ApiClientTranslations\n"],"mappings":";;AAGA,IAAa,KAAK;CAChB,uBAAuB,EACrB,UAAU,YACZ;CACA,wBAAwB,EACtB,OAAO,QACT;CACA,wBAAwB,EACtB,QAAQ,SACV;CACA,cAAc;EACZ,gBAAgB;EAChB,WAAW;EACX,SAAS;EACT,SAAS;EACT,iBAAiB;EACjB,aAAa;EACb,wBACE;EACF,aAAa;EACb,aAAa;EACb,OAAO;CACT;CACA,eAAe;EACb,UAAU;EACV,gBAAgB;EAChB,iBAAiB;EACjB,MAAM;CACR;CACA,WAAW;EACT,UAAU;EACV,UAAU;CACZ;CACA,eAAe,EACb,UAAU,WACZ;CACA,gBAAgB;EACd,YAAY;EACZ,cAAc;EACd,cAAc;CAChB;CACA,sBAAsB;EACpB,OAAO;EACP,UAAU;CACZ;CACA,kBAAkB;EAChB,QAAQ;EACR,MAAM;CACR;CACA,oBAAoB;EAClB,WAAW;EACX,MAAM;EACN,OAAO;CACT;CACA,sBAAsB,EACpB,OAAO,aACT;CACA,gBAAgB;EACd,QAAQ;EACR,WAAW;EACX,eAAe;EACf,eAAe;CACjB;CACA,SAAS,EACP,QAAQ,SACV;CACA,aAAa,EACX,UAAU,WACZ;CACA,eAAe;EACb,MAAM;EACN,MAAM;CACR;CACA,kBAAkB,EAChB,gBAAgB,kBAClB;CACA,OAAO,EACL,oBAAoB,uBACtB;CACA,WAAW,EACT,gCAAgC,sCAClC;CACA,QAAQ;EACN,mBAAmB;EACnB,aAAa;CACf;CACA,qBAAqB,EACnB,eAAe,kBACjB;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,YAAY;EACZ,eAAe;EACf,gBAAgB;EAChB,YAAY;EACZ,OAAO;EACP,MAAM;CACR;CACA,uBAAuB,EACrB,MAAM,OACR;CACA,uBAAuB;EACrB,MAAM;EACN,KAAK;EACL,SAAS;CACX;CACA,oBAAoB;EAClB,aAAa;EACb,aAAa;CACf;CACA,cAAc;EACZ,SAAS;EACT,KAAK;EACL,OAAO;CACT;CACA,iBAAiB;EACf,KAAK;EACL,OAAO;EACP,QAAQ;EACR,YAAY;EACZ,kBAAkB;EAClB,cACE;EACF,SAAS;EACT,UAAU;EACV,YAAY;EACZ,WAAW;EACX,KAAK;CACP;CACA,qBAAqB;EACnB,KAAK;EACL,KAAK;EACL,SAAS;EACT,SAAS;EACT,iBAAiB;CACnB;CACA,SAAS;EACP,WAAW;EACX,aAAa;EACb,WAAW;CACb;CACA,cAAc,EACZ,YAAY,cACd;CACA,qBAAqB,EACnB,oBAAoB,sBACtB;CACA,uBAAuB;EACrB,MAAM;EACN,WAAW;EACX,QAAQ;CACV;CACA,oBAAoB;EAClB,SAAS;EACT,KAAK;CACP;CACA,qBAAqB;EACnB,MAAM;EACN,eAAe;CACjB;CACA,iBAAiB;EACf,SAAS;EACT,YAAY;EACZ,aAAa;EACb,WAAW;CACb;CACA,eAA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A,aAAa,EACX,QAAQ,gBACV;AACF"}
1
+ {"version":3,"file":"translations.js","names":[],"sources":["../../../../src/v2/features/localization/translations.ts"],"sourcesContent":["import type { ApiClientTranslations } from '@scalar/types/api-reference'\n\n/** English fallback for API Client UI strings. */\nexport const en = {\n serverVariablesSelect: {\n selected: 'Selected:',\n },\n serverVariablesTextbox: {\n value: 'value',\n },\n sidebarListElementForm: {\n cancel: 'Cancel',\n },\n requestBlock: {\n authentication: 'Authentication',\n variables: 'Variables',\n cookies: 'Cookies',\n headers: 'Headers',\n queryParameters: 'Query Parameters',\n queryString: 'Query String',\n queryStringDescription:\n 'This parameter supplies the entire query string, so additional named parameters cannot be added. Existing named parameters are sent after it; duplicate keys are preserved.',\n requestBody: 'Request Body',\n requestName: 'Request Name',\n label: 'Request: {name}',\n },\n responseBlock: {\n requestFailed: 'Request failed',\n networkErrorHelp:\n 'Possible causes include CORS restrictions or a network connection problem. Check the browser console for details. If CORS is blocking the request, configure the API server to allow this origin or use a trusted proxy.',\n response: 'Response',\n requestHeaders: 'Request Headers',\n responseHeaders: 'Response Headers',\n body: 'Body',\n },\n codeInput: {\n required: 'Required',\n exitHint: 'Press {escape} then {tab} to exit',\n },\n codeInputLite: {\n required: 'Required',\n },\n dataTableInput: {\n clearValue: 'Clear Value',\n showPassword: 'Show Password',\n hidePassword: 'Hide Password',\n },\n dataTableInputSelect: {\n value: 'Value',\n addValue: 'Add value',\n },\n confirmationForm: {\n cancel: 'Cancel',\n save: 'Save',\n },\n collapsibleSection: {\n collapsed: '(Collapsed)',\n item: 'Item',\n items: 'Items',\n },\n modalClientContainer: {\n label: 'API Client',\n },\n serverDropdown: {\n server: 'Server:',\n addServer: 'Add Server',\n updateServers: 'Update Servers',\n unknownServer: 'Unknown server',\n },\n sidebar: {\n search: 'Search',\n },\n sidebarMenu: {\n settings: 'Settings',\n },\n sidebarToggle: {\n hide: 'Hide sidebar',\n show: 'Show sidebar',\n },\n environmentsList: {\n addEnvironment: 'Add Environment',\n },\n modal: {\n noDocumentSelected: 'No document selected',\n },\n operation: {\n selectAnOperationToViewDetails: 'Select an operation to view details',\n },\n header: {\n operationSettings: 'Operation settings',\n closeClient: 'Close Client',\n },\n openApiClientButton: {\n openAPIClient: 'Open API Client',\n },\n requestBody: {\n noBody: 'No Body',\n delete: 'Delete',\n selectFile: 'Select File',\n multipartForm: 'Multipart Form',\n formUrlEncoded: 'Form URL Encoded',\n binaryFile: 'Binary File',\n other: 'Other',\n none: 'None',\n },\n requestBodyStructured: {\n body: 'Body',\n },\n requestBodyViewToggle: {\n form: 'Form',\n raw: 'Raw',\n fixBody: 'Fix the body to switch to the form view',\n },\n requestCodeSnippet: {\n unavailable: 'No code sample available for this example.',\n codeSnippet: 'Code Snippet',\n },\n requestTable: {\n enabled: 'Enabled',\n key: 'Key',\n value: 'Value',\n },\n requestTableRow: {\n key: 'Key',\n value: 'Value',\n delete: 'Delete',\n selectFile: 'Select File',\n globalCookieHint: 'Global cookies are shared across the whole workspace. Click to navigate.',\n readOnlyHint:\n 'This is a readonly property and you can not modify it! If you want to change it you have to override it or disable it using the checkbox',\n include: 'Include {name} in request',\n keyLabel: '{name} Key',\n valueLabel: '{name} Value',\n deleteRow: 'Delete {name}',\n row: 'row',\n },\n requestTableTooltip: {\n min: 'min:',\n max: 'max:',\n default: 'default:',\n invalid: 'Input is invalid',\n moreInformation: 'More Information',\n },\n headers: {\n headerKey: 'Header Key',\n headerValue: 'Header Value',\n noHeaders: 'No headers',\n },\n responseBody: {\n binaryFile: 'Binary file',\n },\n responseBodyPreview: {\n previewUnavailable: 'Preview unavailable',\n },\n responseBodyStreaming: {\n body: 'Body',\n listening: 'Listening\\u2026',\n cancel: 'Cancel',\n },\n responseBodyToggle: {\n preview: 'Preview',\n raw: 'Raw',\n },\n responseBodyVirtual: {\n body: 'Body',\n largeBodyHint: \"This response body is massive! Syntax highlighting won't work here.\",\n },\n responseCookies: {\n cookies: 'Cookies',\n cookieName: 'Cookie Name',\n cookieValue: 'Cookie Value',\n noCookies: 'No cookies',\n },\n responseEmpty: {\n roadmap: 'Roadmap',\n poweredByScalarcom: 'Powered By Scalar.com',\n getStarted: 'Get Started',\n newRequest: 'New Request',\n sendRequest: 'Send Request',\n version: 'Scalar App V{version} Beta',\n },\n responseLoadingOverlay: {\n cancel: 'Cancel',\n },\n addressBar: {\n path: 'Path',\n copyUrl: 'Copy URL',\n send: 'Send',\n sendRequest: 'Send {method} request to {url}',\n duplicateRequest: 'A {method} request to {path} already exists in this document',\n urlPlaceholder: 'Enter a URL',\n webhookUrlPlaceholder: 'Enter the full webhook URL, e.g. https://example.com/hook',\n },\n addressBarHistory: {\n requestHistory: 'Request History',\n },\n environmentSelector: {\n noEnvironment: 'No Environment',\n notAvailableInThisContext: 'Not available in this context',\n environmentHint: 'Environments let you manage variables like API keys and base URLs across different contexts.',\n add: 'Add Environment',\n select: 'Select Environment',\n unavailable: '{name} (Unavailable)',\n current: 'Current environment: {name}',\n },\n deleteRequestAuthModal: {\n deleteSecurityScheme: 'Delete Security Scheme',\n cancel: 'Cancel',\n delete: 'Delete',\n confirmation: \"This cannot be undone. You're about to delete the {name} security scheme from the collection.\",\n },\n oauth2: {\n deviceAuthorizationUrl: 'Device Authorization URL',\n deviceVerificationPrompt: 'Open the verification page and enter this code:',\n waitingForAuthorization: 'Waiting for authorization…',\n cancelDeviceAuthorization: 'Cancel',\n\n accessToken: 'Access Token',\n refreshUrl: 'Refresh URL',\n refresh: 'Refresh',\n authUrl: 'Auth URL',\n tokenUrl: 'Token URL',\n redirectUrl: 'Redirect URL',\n username: 'Username',\n password: 'Password',\n clientID: 'Client ID',\n clientSecret: 'Client Secret',\n usePKCE: 'Use PKCE',\n credentialsLocation: 'Credentials Location',\n authorize: 'Authorize',\n clear: 'Clear',\n failedToauthorize: 'Failed to authorize',\n failedToRefreshToken: 'Failed to refresh token',\n optionalRedirectUrl: 'Optional redirect URL',\n },\n oauthScopesAddModal: {\n name: 'Name:',\n description: 'Description:',\n readUserData: 'Read user data',\n edit: 'Edit Scope',\n add: 'Add Scope',\n save: 'Save',\n required: 'Scope name is required.',\n duplicate: 'A scope named \"{name}\" already exists.',\n },\n oauthScopesInput: {\n noScopesDefined: 'No Scopes Defined',\n addScope: 'Add Scope',\n deselectAll: 'Deselect All',\n selectAll: 'Select All',\n selectedScopes: 'Scopes Selected {count} / {total}',\n editScope: 'Edit {name}',\n deleteScope: 'Delete {name}',\n selectScope: 'Select {name} scope',\n },\n openIdConnect: {\n discoveryUrl: 'Discovery URL',\n fetchConfiguration: 'Fetch Configuration',\n failedToFetchConfiguration: 'Failed to fetch OpenID Connect configuration',\n },\n requestAuthDataTable: {\n noauthenticationSelected: 'No authentication selected',\n },\n requestAuthTab: {\n token: 'Token',\n bearerToken: 'Bearer Token',\n getAToken: 'Get a token',\n refresh: 'Refresh',\n username: 'Username',\n password: 'Password',\n name: 'Name',\n value: 'Value',\n cancel: 'Cancel',\n authorize: 'Authorize',\n unsupportedCredentials: 'Credentials for this AsyncAPI security scheme are not sent by the browser client.',\n authorizeVia: 'Authorize via {name}',\n unsupportedType: 'The {type} security scheme type is not supported yet.',\n missingType:\n 'The security scheme is missing a type, please double check your {type} document or Authentication Configuration',\n failedToauthorize: 'Failed to authorize',\n failedToRefresh: 'Failed to refresh',\n configure: 'Configure {name}',\n mutualTlsHint:\n 'Mutual TLS authenticates with a client certificate presented during the TLS handshake, so there is nothing to enter here.',\n },\n commandActionForm: {\n continue: 'Continue',\n },\n environment: {\n thisIsTheActiveEnvironment: 'This is the active environment',\n active: 'Active',\n editEnvironment: 'Edit Environment',\n deleteEnvironment: 'Delete Environment',\n },\n environmentCreateModal: {\n environmentName: 'Environment name',\n thisEnvironmentNameIsAlreadyInUse: 'This environment name is already in use.',\n update: 'Update Environment',\n add: 'Add Environment',\n },\n environmentDeleteModal: {\n cancel: 'Cancel',\n deleteEnvironment: 'Delete Environment',\n deleteConfirmation: 'Are you sure you want to delete this environment? This action cannot be undone.',\n title: 'Delete {name}',\n },\n environmentVariablesDropdown: {\n variableSuggestions: 'Variable suggestions',\n addVariable: 'Add Variable',\n },\n environmentVariablesTable: {\n name: 'Name',\n value: 'Value',\n actions: 'Actions',\n environmentVariableName: 'Environment Variable Name',\n environmentVariableValue: 'Environment Variable Value',\n },\n documentSearchModal: {\n documentSearch: 'Document Search',\n documentSearchResults: 'Document Search Results',\n navigate: '\\u2191\\u2193 Navigate',\n select: '\\u23ce Select',\n keyboardInstructions: 'Press up arrow / down arrow to navigate, enter to select, type to filter results',\n },\n searchResult: {\n httpMethod: 'HTTP Method:',\n path: 'Path:',\n description: 'Description:',\n heading: 'Heading',\n operation: 'Operation',\n tag: 'Tag',\n },\n sectionFilter: {\n all: 'All',\n auth: 'Auth',\n variables: 'Variables',\n cookies: 'Cookies',\n headers: 'Headers',\n query: 'Query',\n body: 'Body',\n },\n requestParams: {\n clearAll: 'Clear All {title}',\n clear: 'Clear',\n clearOptionalParameters: 'Clear optional parameters',\n },\n responseBodyDownload: {\n download: 'Download Response Body',\n label: 'Download',\n body: 'Response Body',\n },\n responseMetaInformation: {\n duration: 'Response Information, Duration:',\n size: ', Size:',\n status: ', Status:',\n },\n authSelector: {\n selectedType: 'Selected Auth Type: {type}',\n multipleTypes: 'Multiple Auth Types Selected',\n selectType: 'Select Auth Type',\n optional: 'Optional',\n required: 'Required',\n deleteScheme: 'Delete {name}',\n requiredGroup: 'Required authentication',\n availableGroup: 'Available authentication',\n addGroup: 'Add new authentication',\n },\n operationBlock: {\n webhookUrlRequired: 'Webhook URL required. Enter a destination first.',\n pathParametersRequired: 'Path parameters must have values.',\n forbiddenMethod: 'The Fetch API cannot send {method} requests.',\n },\n dataTableCheckbox: {\n toggle: 'Toggle',\n },\n pillTooltipHost: {\n computedAtExecution: 'Computed at request execution',\n noValue: 'No value',\n },\n authOptions: {\n oauth2DeviceAuthorization: 'OAuth2 Device Authorization',\n apiKeyCookie: 'API Key in Cookies',\n apiKeyHeader: 'API Key in Headers',\n apiKeyQuery: 'API Key in Query Params',\n httpBasic: 'HTTP Basic',\n httpBearer: 'HTTP Bearer',\n oauth2Implicit: 'Oauth2 Implicit Flow',\n oauth2Password: 'Oauth2 Password Flow',\n oauth2ClientCredentials: 'Oauth2 Client Credentials',\n oauth2AuthorizationFlow: 'Oauth2 Authorization Code',\n },\n deleteSidebarListElement: {\n delete: 'Delete {name}',\n },\n deleteModal: {\n delete: 'Delete {name}',\n },\n} satisfies ApiClientTranslations\n"],"mappings":";;AAGA,IAAa,KAAK;CAChB,uBAAuB,EACrB,UAAU,YACZ;CACA,wBAAwB,EACtB,OAAO,QACT;CACA,wBAAwB,EACtB,QAAQ,SACV;CACA,cAAc;EACZ,gBAAgB;EAChB,WAAW;EACX,SAAS;EACT,SAAS;EACT,iBAAiB;EACjB,aAAa;EACb,wBACE;EACF,aAAa;EACb,aAAa;EACb,OAAO;CACT;CACA,eAAe;EACb,eAAe;EACf,kBACE;EACF,UAAU;EACV,gBAAgB;EAChB,iBAAiB;EACjB,MAAM;CACR;CACA,WAAW;EACT,UAAU;EACV,UAAU;CACZ;CACA,eAAe,EACb,UAAU,WACZ;CACA,gBAAgB;EACd,YAAY;EACZ,cAAc;EACd,cAAc;CAChB;CACA,sBAAsB;EACpB,OAAO;EACP,UAAU;CACZ;CACA,kBAAkB;EAChB,QAAQ;EACR,MAAM;CACR;CACA,oBAAoB;EAClB,WAAW;EACX,MAAM;EACN,OAAO;CACT;CACA,sBAAsB,EACpB,OAAO,aACT;CACA,gBAAgB;EACd,QAAQ;EACR,WAAW;EACX,eAAe;EACf,eAAe;CACjB;CACA,SAAS,EACP,QAAQ,SACV;CACA,aAAa,EACX,UAAU,WACZ;CACA,eAAe;EACb,MAAM;EACN,MAAM;CACR;CACA,kBAAkB,EAChB,gBAAgB,kBAClB;CACA,OAAO,EACL,oBAAoB,uBACtB;CACA,WAAW,EACT,gCAAgC,sCAClC;CACA,QAAQ;EACN,mBAAmB;EACnB,aAAa;CACf;CACA,qBAAqB,EACnB,eAAe,kBACjB;CACA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AuB;EACvB,UAAU;EACV,QAAQ;EACR,sBAAsB;CACxB;CACA,cAAc;EACZ,YAAY;EACZ,MAAM;EACN,aAAa;EACb,SAAS;EACT,WAAW;EACX,KAAK;CACP;CACA,eAAe;EACb,KAAK;EACL,MAAM;EACN,WAAW;EACX,SAAS;EACT,SAAS;EACT,OAAO;EACP,MAAM;CACR;CACA,eAAe;EACb,UAAU;EACV,OAAO;EACP,yBAAyB;CAC3B;CACA,sBAAsB;EACpB,UAAU;EACV,OAAO;EACP,MAAM;CACR;CACA,yBAAyB;EACvB,UAAU;EACV,MAAM;EACN,QAAQ;CACV;CACA,cAAc;EACZ,cAAc;EACd,eAAe;EACf,YAAY;EACZ,UAAU;EACV,UAAU;EACV,cAAc;EACd,eAAe;EACf,gBAAgB;EAChB,UAAU;CACZ;CACA,gBAAgB;EACd,oBAAoB;EACpB,wBAAwB;EACxB,iBAAiB;CACnB;CACA,mBAAmB,EACjB,QAAQ,SACV;CACA,iBAAiB;EACf,qBAAqB;EACrB,SAAS;CACX;CACA,aAAa;EACX,2BAA2B;EAC3B,cAAc;EACd,cAAc;EACd,aAAa;EACb,WAAW;EACX,YAAY;EACZ,gBAAgB;EAChB,gBAAgB;EAChB,yBAAyB;EACzB,yBAAyB;CAC3B;CACA,0BAA0B,EACxB,QAAQ,gBACV;CACA,aAAa,EACX,QAAQ,gBACV;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/modal/Modal.vue"],"names":[],"mappings":"AA2NA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8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A;IACnC,iDAAiD;IACjD,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,wDAAwD;IACxD,OAAO,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAA;CAC5C,CAAA;AAED;;;;GAIG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;aAC0C,mBAAmB;;;;;aAAnB,mBAAmB;iGAkS3E,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.vue.js","names":[],"sources":["../../../../src/v2/features/modal/Modal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type ModalProps = {\n /** The workspace store must be initialized and passed in */\n workspaceStore: WorkspaceStore\n /** The document must be initialized and passed in. OpenAPI-only — the modal has no AsyncAPI path. */\n document: ComputedRef<OpenApiDocument | null>\n /** The path must be initialized and passed in */\n path: ComputedRef<string | undefined>\n /** The event bus for handling all events */\n eventBus: WorkspaceEventBus\n /** The method must be initialized and passed in */\n method: ComputedRef<string | undefined>\n /** The example name must be initialized and passed in */\n exampleName: ComputedRef<string | undefined>\n /** Whether the active route resolves from `document.webhooks`. */\n isWebhook: ComputedRef<boolean>\n /** Selected anyOf/oneOf request-body variants keyed by schema path */\n requestBodyCompositionSelection: Ref<Record<string, number>>\n /** Controls the visibility of the modal */\n modalState: ModalState\n /** The sidebar state must be initialized and passed in */\n sidebarState: UseModalSidebarReturn\n /** Api client plugins to include in the modal */\n plugins: ClientPlugin[]\n /** Subset of the configuration options for the modal */\n options: MaybeRefOrGetter<ApiClientOptions>\n}\n\n/**\n * Scalar Api Client Modal\n *\n * This component is used to render the API Client Modal\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ScalarListboxOption } from '@scalar/components/listbox'\nimport type { ModalState } from '@scalar/components/modal'\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport { ScalarToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getActiveEnvironment } from '@scalar/workspace-store/request-example'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n computed,\n onBeforeUnmount,\n ref,\n watch,\n type ComputedRef,\n type MaybeRefOrGetter,\n type Ref,\n} from 'vue'\n\nimport ModalClientContainer from '@/v2/components/modals/ModalClientContainer.vue'\nimport { Sidebar, SidebarToggle } from '@/v2/components/sidebar'\nimport { provideLocalization } from '@/v2/features/localization'\nimport { type UseModalSidebarReturn } from '@/v2/features/modal/hooks/use-modal-sidebar'\nimport { initializeModalEvents } from '@/v2/features/modal/modal-events'\nimport Operation from '@/v2/features/operation/Operation.vue'\nimport { useGlobalHotKeys } from '@/v2/hooks/use-global-hot-keys'\nimport { useScrollLock } from '@/v2/hooks/use-scroll-lock'\nimport type { ApiClientOptions, ApiClientOptionsRef } from '@/v2/types/options'\n\nconst {\n document,\n eventBus,\n modalState,\n options,\n plugins,\n requestBodyCompositionSelection,\n sidebarState,\n workspaceStore,\n} = defineProps<\n Omit<ModalProps, 'options'> & { options: ApiClientOptionsRef }\n>()\n\nconst { translate, locale, direction } = provideLocalization(\n () => options.value.localization,\n)\n\nconst activeWorkspace: ScalarListboxOption = {\n label: 'default',\n id: 'default',\n}\n\n/** Controls the visibility of the sidebar. */\nconst isSidebarOpen = ref(false)\n\n/** Initialize modal events */\ninitializeModalEvents({\n eventBus,\n isSidebarOpen,\n requestBodyCompositionSelection,\n sidebarState,\n modalState,\n store: workspaceStore,\n})\n\n/** Register global hotkeys for the app, passing the workspace event bus and layout state */\nuseGlobalHotKeys(eventBus, 'modal', () => !modalState.open)\n\n/** Clean up on close */\nconst cleanUp = () => {\n eventBus.emit('operation:cancel:request')\n}\n\nconst isLocked = useScrollLock(() => {\n if (typeof window !== 'undefined') {\n return window.document.body\n }\n return null\n})\n\nwatch(\n () => modalState.open,\n (open) => {\n // Make sure scrolling is locked or unlocked when the modal is opened or closed\n isLocked.value = open\n\n if (!open) {\n cleanUp()\n }\n },\n)\n\n// Ensure we add our scalar wrapper class to the headless ui root\nonBeforeUnmount(() => cleanUp())\n\n/** Default sidebar width in pixels. */\nconst DEFAULT_SIDEBAR_WIDTH = 288\n\n/** Width of the sidebar, with fallback to default. */\nconst sidebarWidth = computed(\n () =>\n workspaceStore?.workspace?.['x-scalar-sidebar-width'] ??\n DEFAULT_SIDEBAR_WIDTH,\n)\n\n/** Handler for sidebar width changes. */\nconst handleSidebarWidthUpdate = (width: number) =>\n workspaceStore?.update('x-scalar-sidebar-width', width)\n\n/**\n * Merged environment variables from workspace and document levels.\n * Variables from both sources are combined, with document variables\n * taking precedence in case of naming conflicts.\n */\nconst environment = computed(\n () => getActiveEnvironment(workspaceStore, document.value).environment,\n)\n\ndefineExpose({\n sidebarWidth,\n environment,\n})\n</script>\n\n<template>\n <ModalClientContainer\n :dir=\"direction\"\n :lang=\"locale\"\n :modalState>\n <!-- Toasts -->\n <ScalarToasts />\n\n <!-- If we have a document, path and method, render the operation -->\n <main\n v-if=\"document.value && path?.value && method?.value\"\n class=\"relative flex h-full min-h-0 w-full flex-1\">\n <SidebarToggle\n v-model=\"isSidebarOpen\"\n class=\"absolute top-2 left-4 z-10 max-md:top-4\" />\n <Sidebar\n v-show=\"isSidebarOpen\"\n v-model:sidebarWidth=\"sidebarWidth\"\n :activeWorkspace=\"activeWorkspace\"\n class=\"h-full max-md:absolute! max-md:z-5 max-md:w-full!\"\n :documents=\"[document.value]\"\n :eventBus\n :isDroppable=\"() => false\"\n layout=\"modal\"\n :sidebarState=\"sidebarState.state\"\n :workspaces=\"[]\"\n @selectItem=\"sidebarState.handleSelectItem\"\n @update:sidebarWidth=\"handleSidebarWidthUpdate\" />\n <Operation\n :activeWorkspace=\"activeWorkspace\"\n class=\"flex-1\"\n :document=\"document.value\"\n :documentSlug=\"document.value['x-scalar-navigation']?.name ?? ''\"\n :environment\n :eventBus\n :exampleName=\"exampleName?.value\"\n :isActive=\"modalState.open\"\n :isWebhook=\"isWebhook.value\"\n layout=\"modal\"\n :method=\"method?.value\"\n :options\n :path=\"path?.value\"\n :plugins\n :requestBodyCompositionSelection=\"requestBodyCompositionSelection.value\"\n :workspaceStore />\n </main>\n <!-- Empty state -->\n <div\n v-else\n class=\"flex h-full w-full items-center justify-center\">\n <span class=\"text-c-3\">{{\n translate('apiClient.modal.noDocumentSelected')\n }}</span>\n </div>\n </ModalClientContainer>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"Modal.vue.js","names":[],"sources":["../../../../src/v2/features/modal/Modal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type ModalProps = {\n /** The workspace store must be initialized and passed in */\n workspaceStore: WorkspaceStore\n /** The document must be initialized and passed in. OpenAPI-only — the modal has no AsyncAPI path. */\n document: ComputedRef<OpenApiDocument | null>\n /** The path must be initialized and passed in */\n path: ComputedRef<string | undefined>\n /** The event bus for handling all events */\n eventBus: WorkspaceEventBus\n /** The method must be initialized and passed in */\n method: ComputedRef<string | undefined>\n /** The example name must be initialized and passed in */\n exampleName: ComputedRef<string | undefined>\n /** Whether the active route resolves from `document.webhooks`. */\n isWebhook: ComputedRef<boolean>\n /** Selected anyOf/oneOf request-body variants keyed by schema path */\n requestBodyCompositionSelection: Ref<Record<string, number>>\n /** Controls the visibility of the modal */\n modalState: ModalState\n /** The sidebar state must be initialized and passed in */\n sidebarState: UseModalSidebarReturn\n /** Api client plugins to include in the modal */\n plugins: ClientPlugin[]\n /** Subset of the configuration options for the modal */\n options: MaybeRefOrGetter<ApiClientOptions>\n}\n\n/**\n * Scalar Api Client Modal\n *\n * This component is used to render the API Client Modal\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ScalarListboxOption } from '@scalar/components/listbox'\nimport type { ModalState } from '@scalar/components/modal'\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport { ScalarToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getActiveEnvironment } from '@scalar/workspace-store/request-example'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n computed,\n onBeforeUnmount,\n ref,\n watch,\n type ComputedRef,\n type MaybeRefOrGetter,\n type Ref,\n} from 'vue'\n\nimport ModalClientContainer from '@/v2/components/modals/ModalClientContainer.vue'\nimport { Sidebar, SidebarToggle } from '@/v2/components/sidebar'\nimport { provideLocalization } from '@/v2/features/localization'\nimport { type UseModalSidebarReturn } from '@/v2/features/modal/hooks/use-modal-sidebar'\nimport { initializeModalEvents } from '@/v2/features/modal/modal-events'\nimport Operation from '@/v2/features/operation/Operation.vue'\nimport { useGlobalHotKeys } from '@/v2/hooks/use-global-hot-keys'\nimport { useScrollLock } from '@/v2/hooks/use-scroll-lock'\nimport type { ApiClientOptions, ApiClientOptionsRef } from '@/v2/types/options'\n\nconst {\n document,\n eventBus,\n modalState,\n options,\n plugins,\n requestBodyCompositionSelection,\n sidebarState,\n workspaceStore,\n} = defineProps<\n Omit<ModalProps, 'options'> & { options: ApiClientOptionsRef }\n>()\n\nconst { translate, locale, direction } = provideLocalization(\n () => options.value.localization,\n)\n\nconst activeWorkspace: ScalarListboxOption = {\n label: 'default',\n id: 'default',\n}\n\n/** Controls the visibility of the sidebar. */\nconst isSidebarOpen = ref(false)\n\n/** Initialize modal events */\ninitializeModalEvents({\n eventBus,\n isSidebarOpen,\n requestBodyCompositionSelection,\n sidebarState,\n modalState,\n store: workspaceStore,\n})\n\n/** Register global hotkeys for the app, passing the workspace event bus and layout state */\nuseGlobalHotKeys(eventBus, 'modal', () => !modalState.open)\n\n/** Clean up on close */\nconst cleanUp = () => {\n eventBus.emit('operation:cancel:request')\n}\n\nconst isLocked = useScrollLock(() => {\n if (typeof window !== 'undefined') {\n return window.document.body\n }\n return null\n})\n\nwatch(\n () => modalState.open,\n (open) => {\n // Make sure scrolling is locked or unlocked when the modal is opened or closed\n isLocked.value = open\n\n if (!open) {\n cleanUp()\n }\n },\n)\n\n// Ensure we add our scalar wrapper class to the headless ui root\nonBeforeUnmount(() => cleanUp())\n\n/** Default sidebar width in pixels. */\nconst DEFAULT_SIDEBAR_WIDTH = 288\n\n/** Width of the sidebar, with fallback to default. */\nconst sidebarWidth = computed(\n () =>\n workspaceStore?.workspace?.['x-scalar-sidebar-width'] ??\n DEFAULT_SIDEBAR_WIDTH,\n)\n\n/** Handler for sidebar width changes. */\nconst handleSidebarWidthUpdate = (width: number) =>\n workspaceStore?.update('x-scalar-sidebar-width', width)\n\n/**\n * Merged environment variables from workspace and document levels.\n * Variables from both sources are combined, with document variables\n * taking precedence in case of naming conflicts.\n */\nconst environment = computed(\n () => getActiveEnvironment(workspaceStore, document.value).environment,\n)\n\ndefineExpose({\n sidebarWidth,\n environment,\n})\n</script>\n\n<template>\n <ModalClientContainer\n :dir=\"direction\"\n :lang=\"locale\"\n :modalState>\n <!-- Toasts -->\n <ScalarToasts />\n\n <!-- If we have a document, path and method, render the operation -->\n <main\n v-if=\"document.value && path?.value && method?.value\"\n class=\"relative flex h-full min-h-0 w-full flex-1\">\n <!--\n The toggle keeps its place inside the panel while the header row is wide\n enough for the address bar to centre itself clear of it. Below `lg` the\n bar fills the row and its method chip reaches the panel edge, so the\n toggle moves onto the backdrop and mirrors the close button in the\n opposite corner, leaving the whole row to the bar.\n -->\n <SidebarToggle\n v-model=\"isSidebarOpen\"\n class=\"absolute top-2 left-4 z-10 max-lg:fixed max-lg:top-2 max-lg:left-2\"\n variant=\"overlay\" />\n <Sidebar\n v-show=\"isSidebarOpen\"\n v-model:sidebarWidth=\"sidebarWidth\"\n :activeWorkspace=\"activeWorkspace\"\n class=\"h-full max-md:absolute! max-md:z-5 max-md:w-full!\"\n :documents=\"[document.value]\"\n :eventBus\n :isDroppable=\"() => false\"\n layout=\"modal\"\n :sidebarState=\"sidebarState.state\"\n :workspaces=\"[]\"\n @selectItem=\"sidebarState.handleSelectItem\"\n @update:sidebarWidth=\"handleSidebarWidthUpdate\" />\n <Operation\n :activeWorkspace=\"activeWorkspace\"\n class=\"flex-1\"\n :document=\"document.value\"\n :documentSlug=\"document.value['x-scalar-navigation']?.name ?? ''\"\n :environment\n :eventBus\n :exampleName=\"exampleName?.value\"\n :isActive=\"modalState.open\"\n :isWebhook=\"isWebhook.value\"\n layout=\"modal\"\n :method=\"method?.value\"\n :options\n :path=\"path?.value\"\n :plugins\n :requestBodyCompositionSelection=\"requestBodyCompositionSelection.value\"\n :workspaceStore />\n </main>\n <!-- Empty state -->\n <div\n v-else\n class=\"flex h-full w-full items-center justify-center\">\n <span class=\"text-c-3\">{{\n translate('apiClient.modal.noDocumentSelected')\n }}</span>\n </div>\n </ModalClientContainer>\n</template>\n"],"mappings":""}
@@ -93,7 +93,8 @@ var Modal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
93
93
  createVNode(unref(SidebarToggle_default), {
94
94
  modelValue: isSidebarOpen.value,
95
95
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isSidebarOpen.value = $event),
96
- class: "absolute top-2 left-4 z-10 max-md:top-4"
96
+ class: "absolute top-2 left-4 z-10 max-lg:fixed max-lg:top-2 max-lg:left-2",
97
+ variant: "overlay"
97
98
  }, null, 8, ["modelValue"]),
98
99
  withDirectives(createVNode(unref(Sidebar_default), {
99
100
  sidebarWidth: sidebarWidth.value,
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.vue.script.js","names":[],"sources":["../../../../src/v2/features/modal/Modal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type ModalProps = {\n /** The workspace store must be initialized and passed in */\n workspaceStore: WorkspaceStore\n /** The document must be initialized and passed in. OpenAPI-only — the modal has no AsyncAPI path. */\n document: ComputedRef<OpenApiDocument | null>\n /** The path must be initialized and passed in */\n path: ComputedRef<string | undefined>\n /** The event bus for handling all events */\n eventBus: WorkspaceEventBus\n /** The method must be initialized and passed in */\n method: ComputedRef<string | undefined>\n /** The example name must be initialized and passed in */\n exampleName: ComputedRef<string | undefined>\n /** Whether the active route resolves from `document.webhooks`. */\n isWebhook: ComputedRef<boolean>\n /** Selected anyOf/oneOf request-body variants keyed by schema path */\n requestBodyCompositionSelection: Ref<Record<string, number>>\n /** Controls the visibility of the modal */\n modalState: ModalState\n /** The sidebar state must be initialized and passed in */\n sidebarState: UseModalSidebarReturn\n /** Api client plugins to include in the modal */\n plugins: ClientPlugin[]\n /** Subset of the configuration options for the modal */\n options: MaybeRefOrGetter<ApiClientOptions>\n}\n\n/**\n * Scalar Api Client Modal\n *\n * This component is used to render the API Client Modal\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ScalarListboxOption } from '@scalar/components/listbox'\nimport type { ModalState } from '@scalar/components/modal'\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport { ScalarToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getActiveEnvironment } from '@scalar/workspace-store/request-example'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n computed,\n onBeforeUnmount,\n ref,\n watch,\n type ComputedRef,\n type MaybeRefOrGetter,\n type Ref,\n} from 'vue'\n\nimport ModalClientContainer from '@/v2/components/modals/ModalClientContainer.vue'\nimport { Sidebar, SidebarToggle } from '@/v2/components/sidebar'\nimport { provideLocalization } from '@/v2/features/localization'\nimport { type UseModalSidebarReturn } from '@/v2/features/modal/hooks/use-modal-sidebar'\nimport { initializeModalEvents } from '@/v2/features/modal/modal-events'\nimport Operation from '@/v2/features/operation/Operation.vue'\nimport { useGlobalHotKeys } from '@/v2/hooks/use-global-hot-keys'\nimport { useScrollLock } from '@/v2/hooks/use-scroll-lock'\nimport type { ApiClientOptions, ApiClientOptionsRef } from '@/v2/types/options'\n\nconst {\n document,\n eventBus,\n modalState,\n options,\n plugins,\n requestBodyCompositionSelection,\n sidebarState,\n workspaceStore,\n} = defineProps<\n Omit<ModalProps, 'options'> & { options: ApiClientOptionsRef }\n>()\n\nconst { translate, locale, direction } = provideLocalization(\n () => options.value.localization,\n)\n\nconst activeWorkspace: ScalarListboxOption = {\n label: 'default',\n id: 'default',\n}\n\n/** Controls the visibility of the sidebar. */\nconst isSidebarOpen = ref(false)\n\n/** Initialize modal events */\ninitializeModalEvents({\n eventBus,\n isSidebarOpen,\n requestBodyCompositionSelection,\n sidebarState,\n modalState,\n store: workspaceStore,\n})\n\n/** Register global hotkeys for the app, passing the workspace event bus and layout state */\nuseGlobalHotKeys(eventBus, 'modal', () => !modalState.open)\n\n/** Clean up on close */\nconst cleanUp = () => {\n eventBus.emit('operation:cancel:request')\n}\n\nconst isLocked = useScrollLock(() => {\n if (typeof window !== 'undefined') {\n return window.document.body\n }\n return null\n})\n\nwatch(\n () => modalState.open,\n (open) => {\n // Make sure scrolling is locked or unlocked when the modal is opened or closed\n isLocked.value = open\n\n if (!open) {\n cleanUp()\n }\n },\n)\n\n// Ensure we add our scalar wrapper class to the headless ui root\nonBeforeUnmount(() => cleanUp())\n\n/** Default sidebar width in pixels. */\nconst DEFAULT_SIDEBAR_WIDTH = 288\n\n/** Width of the sidebar, with fallback to default. */\nconst sidebarWidth = computed(\n () =>\n workspaceStore?.workspace?.['x-scalar-sidebar-width'] ??\n DEFAULT_SIDEBAR_WIDTH,\n)\n\n/** Handler for sidebar width changes. */\nconst handleSidebarWidthUpdate = (width: number) =>\n workspaceStore?.update('x-scalar-sidebar-width', width)\n\n/**\n * Merged environment variables from workspace and document levels.\n * Variables from both sources are combined, with document variables\n * taking precedence in case of naming conflicts.\n */\nconst environment = computed(\n () => getActiveEnvironment(workspaceStore, document.value).environment,\n)\n\ndefineExpose({\n sidebarWidth,\n environment,\n})\n</script>\n\n<template>\n <ModalClientContainer\n :dir=\"direction\"\n :lang=\"locale\"\n :modalState>\n <!-- Toasts -->\n <ScalarToasts />\n\n <!-- If we have a document, path and method, render the operation -->\n <main\n v-if=\"document.value && path?.value && method?.value\"\n class=\"relative flex h-full min-h-0 w-full flex-1\">\n <SidebarToggle\n v-model=\"isSidebarOpen\"\n class=\"absolute top-2 left-4 z-10 max-md:top-4\" />\n <Sidebar\n v-show=\"isSidebarOpen\"\n v-model:sidebarWidth=\"sidebarWidth\"\n :activeWorkspace=\"activeWorkspace\"\n class=\"h-full max-md:absolute! max-md:z-5 max-md:w-full!\"\n :documents=\"[document.value]\"\n :eventBus\n :isDroppable=\"() => false\"\n layout=\"modal\"\n :sidebarState=\"sidebarState.state\"\n :workspaces=\"[]\"\n @selectItem=\"sidebarState.handleSelectItem\"\n @update:sidebarWidth=\"handleSidebarWidthUpdate\" />\n <Operation\n :activeWorkspace=\"activeWorkspace\"\n class=\"flex-1\"\n :document=\"document.value\"\n :documentSlug=\"document.value['x-scalar-navigation']?.name ?? ''\"\n :environment\n :eventBus\n :exampleName=\"exampleName?.value\"\n :isActive=\"modalState.open\"\n :isWebhook=\"isWebhook.value\"\n layout=\"modal\"\n :method=\"method?.value\"\n :options\n :path=\"path?.value\"\n :plugins\n :requestBodyCompositionSelection=\"requestBodyCompositionSelection.value\"\n :workspaceStore />\n </main>\n <!-- Empty state -->\n <div\n v-else\n class=\"flex h-full w-full items-center justify-center\">\n <span class=\"text-c-3\">{{\n translate('apiClient.modal.noDocumentSelected')\n }}</span>\n </div>\n </ModalClientContainer>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8EA,MAAM,EAAE,WAAW,QAAQ,cAAc,0BACjC,QAAA,QAAQ,MAAM,YACtB;EAEA,MAAM,kBAAuC;GAC3C,OAAO;GACP,IAAI;EACN;;EAGA,MAAM,gBAAgB,IAAI,KAAK;;EAG/B,sBAAsB;GACpB,UAAO,QAAA;GACP;GACA,iCAA8B,QAAA;GAC9B,cAAW,QAAA;GACX,YAAS,QAAA;GACT,OAAO,QAAA;EACT,CAAC;;EAGD,iBAAiB,QAAA,UAAU,eAAe,CAAC,QAAA,WAA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MAAK,sBAAA,EAAyB,QAAI;MACzD,aAAA,YAAA;MACA,UAAA,QAAA;MACA,aAAa,QAAA,aAAa;MAC1B,UAAU,QAAA,WAAW;MACrB,WAAW,QAAA,UAAU;MACtB,QAAO;MACN,QAAQ,QAAA,QAAQ;MAChB,SAAA,QAAA;MACA,MAAM,QAAA,MAAM;MACZ,SAAA,QAAA;MACA,iCAAiC,QAAA,gCAAgC;MACjE,gBAAA,QAAA;;;;;;;;;;;;;;;;wBAGL,mBAMM,OANN,YAMM,CAHJ,mBAES,QAFT,YAES,gBADP,MAAA,SAAA,CAAS,CAAA,oCAAA,CAAA,GAAA,CAAA,CAAA,CAAA,EAAA,CAAA"}
1
+ {"version":3,"file":"Modal.vue.script.js","names":[],"sources":["../../../../src/v2/features/modal/Modal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type ModalProps = {\n /** The workspace store must be initialized and passed in */\n workspaceStore: WorkspaceStore\n /** The document must be initialized and passed in. OpenAPI-only — the modal has no AsyncAPI path. */\n document: ComputedRef<OpenApiDocument | null>\n /** The path must be initialized and passed in */\n path: ComputedRef<string | undefined>\n /** The event bus for handling all events */\n eventBus: WorkspaceEventBus\n /** The method must be initialized and passed in */\n method: ComputedRef<string | undefined>\n /** The example name must be initialized and passed in */\n exampleName: ComputedRef<string | undefined>\n /** Whether the active route resolves from `document.webhooks`. */\n isWebhook: ComputedRef<boolean>\n /** Selected anyOf/oneOf request-body variants keyed by schema path */\n requestBodyCompositionSelection: Ref<Record<string, number>>\n /** Controls the visibility of the modal */\n modalState: ModalState\n /** The sidebar state must be initialized and passed in */\n sidebarState: UseModalSidebarReturn\n /** Api client plugins to include in the modal */\n plugins: ClientPlugin[]\n /** Subset of the configuration options for the modal */\n options: MaybeRefOrGetter<ApiClientOptions>\n}\n\n/**\n * Scalar Api Client Modal\n *\n * This component is used to render the API Client Modal\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ScalarListboxOption } from '@scalar/components/listbox'\nimport type { ModalState } from '@scalar/components/modal'\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport { ScalarToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getActiveEnvironment } from '@scalar/workspace-store/request-example'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n computed,\n onBeforeUnmount,\n ref,\n watch,\n type ComputedRef,\n type MaybeRefOrGetter,\n type Ref,\n} from 'vue'\n\nimport ModalClientContainer from '@/v2/components/modals/ModalClientContainer.vue'\nimport { Sidebar, SidebarToggle } from '@/v2/components/sidebar'\nimport { provideLocalization } from '@/v2/features/localization'\nimport { type UseModalSidebarReturn } from '@/v2/features/modal/hooks/use-modal-sidebar'\nimport { initializeModalEvents } from '@/v2/features/modal/modal-events'\nimport Operation from '@/v2/features/operation/Operation.vue'\nimport { useGlobalHotKeys } from '@/v2/hooks/use-global-hot-keys'\nimport { useScrollLock } from '@/v2/hooks/use-scroll-lock'\nimport type { ApiClientOptions, ApiClientOptionsRef } from '@/v2/types/options'\n\nconst {\n document,\n eventBus,\n modalState,\n options,\n plugins,\n requestBodyCompositionSelection,\n sidebarState,\n workspaceStore,\n} = defineProps<\n Omit<ModalProps, 'options'> & { options: ApiClientOptionsRef }\n>()\n\nconst { translate, locale, direction } = provideLocalization(\n () => options.value.localization,\n)\n\nconst activeWorkspace: ScalarListboxOption = {\n label: 'default',\n id: 'default',\n}\n\n/** Controls the visibility of the sidebar. */\nconst isSidebarOpen = ref(false)\n\n/** Initialize modal events */\ninitializeModalEvents({\n eventBus,\n isSidebarOpen,\n requestBodyCompositionSelection,\n sidebarState,\n modalState,\n store: workspaceStore,\n})\n\n/** Register global hotkeys for the app, passing the workspace event bus and layout state */\nuseGlobalHotKeys(eventBus, 'modal', () => !modalState.open)\n\n/** Clean up on close */\nconst cleanUp = () => {\n eventBus.emit('operation:cancel:request')\n}\n\nconst isLocked = useScrollLock(() => {\n if (typeof window !== 'undefined') {\n return window.document.body\n }\n return null\n})\n\nwatch(\n () => modalState.open,\n (open) => {\n // Make sure scrolling is locked or unlocked when the modal is opened or closed\n isLocked.value = open\n\n if (!open) {\n cleanUp()\n }\n },\n)\n\n// Ensure we add our scalar wrapper class to the headless ui root\nonBeforeUnmount(() => cleanUp())\n\n/** Default sidebar width in pixels. */\nconst DEFAULT_SIDEBAR_WIDTH = 288\n\n/** Width of the sidebar, with fallback to default. */\nconst sidebarWidth = computed(\n () =>\n workspaceStore?.workspace?.['x-scalar-sidebar-width'] ??\n DEFAULT_SIDEBAR_WIDTH,\n)\n\n/** Handler for sidebar width changes. */\nconst handleSidebarWidthUpdate = (width: number) =>\n workspaceStore?.update('x-scalar-sidebar-width', width)\n\n/**\n * Merged environment variables from workspace and document levels.\n * Variables from both sources are combined, with document variables\n * taking precedence in case of naming conflicts.\n */\nconst environment = computed(\n () => getActiveEnvironment(workspaceStore, document.value).environment,\n)\n\ndefineExpose({\n sidebarWidth,\n environment,\n})\n</script>\n\n<template>\n <ModalClientContainer\n :dir=\"direction\"\n :lang=\"locale\"\n :modalState>\n <!-- Toasts -->\n <ScalarToasts />\n\n <!-- If we have a document, path and method, render the operation -->\n <main\n v-if=\"document.value && path?.value && method?.value\"\n class=\"relative flex h-full min-h-0 w-full flex-1\">\n <!--\n The toggle keeps its place inside the panel while the header row is wide\n enough for the address bar to centre itself clear of it. Below `lg` the\n bar fills the row and its method chip reaches the panel edge, so the\n toggle moves onto the backdrop and mirrors the close button in the\n opposite corner, leaving the whole row to the bar.\n -->\n <SidebarToggle\n v-model=\"isSidebarOpen\"\n class=\"absolute top-2 left-4 z-10 max-lg:fixed max-lg:top-2 max-lg:left-2\"\n variant=\"overlay\" />\n <Sidebar\n v-show=\"isSidebarOpen\"\n v-model:sidebarWidth=\"sidebarWidth\"\n :activeWorkspace=\"activeWorkspace\"\n class=\"h-full max-md:absolute! max-md:z-5 max-md:w-full!\"\n :documents=\"[document.value]\"\n :eventBus\n :isDroppable=\"() => false\"\n layout=\"modal\"\n :sidebarState=\"sidebarState.state\"\n :workspaces=\"[]\"\n @selectItem=\"sidebarState.handleSelectItem\"\n @update:sidebarWidth=\"handleSidebarWidthUpdate\" />\n <Operation\n :activeWorkspace=\"activeWorkspace\"\n class=\"flex-1\"\n :document=\"document.value\"\n :documentSlug=\"document.value['x-scalar-navigation']?.name ?? ''\"\n :environment\n :eventBus\n :exampleName=\"exampleName?.value\"\n :isActive=\"modalState.open\"\n :isWebhook=\"isWebhook.value\"\n layout=\"modal\"\n :method=\"method?.value\"\n :options\n :path=\"path?.value\"\n :plugins\n :requestBodyCompositionSelection=\"requestBodyCompositionSelection.value\"\n :workspaceStore />\n </main>\n <!-- Empty state -->\n <div\n v-else\n class=\"flex h-full w-full items-center justify-center\">\n <span class=\"text-c-3\">{{\n translate('apiClient.modal.noDocumentSelected')\n }}</span>\n </div>\n </ModalClientContainer>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8EA,MAAM,EAAE,WAAW,QAAQ,cAAc,0BACjC,QAAA,QAAQ,MAAM,YACtB;EAEA,MAAM,kBAAuC;GAC3C,OAAO;GACP,IAAI;EACN;;EAGA,MAAM,gBAAgB,IAAI,KAAK;;EAG/B,sBAAsB;GACpB,UAAO,QAAA;GACP;GACA,iCAA8B,QAAA;GAC9B,cAAW,QAAA;GACX,YAAS,QAAA;GACT,OAAO,QAAA;EACT,CAAC;;EAGD,iBAAiB,QAAA,UAAU,eAAe,CAAC,QAAA,WAAW,IAAI;;EAG1D,MAAM,gBAAgB;GACpB,QAAA,SAAS,KAAK,0BAA0B;EAC1C;EAEA,MAAM,WAAW,oBAAoB;GACnC,IAAI,OAAO,WAAW,aACpB,OAAO,OAAO,SAAS;GAEzB,OAAO;EACT,CAAC;EAED,YACQ,QAAA,WAAW,OAChB,SAAS;GAER,SAAS,QAAQ;GAEjB,IAAI,CAAC,MACH,QA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iCAAiC,QAAA,gCAAgC;MACjE,gBAAA,QAAA;;;;;;;;;;;;;;;;wBAGL,mBAMM,OANN,YAMM,CAHJ,mBAES,QAFT,YAES,gBADP,MAAA,SAAA,CAAS,CAAA,oCAAA,CAAA,GAAA,CAAA,CAAA,CAAA,EAAA,CAAA"}
@@ -40,7 +40,7 @@ function createFuseInstance() {
40
40
  threshold: .3,
41
41
  distance: 100,
42
42
  includeScore: true,
43
- includeMatches: true,
43
+ includeMatches: false,
44
44
  ignoreLocation: true,
45
45
  useExtendedSearch: true,
46
46
  findAllMatches: true
@@ -1 +1 @@
1
- {"version":3,"file":"create-fuse-instance.js","names":[],"sources":["../../../../../src/v2/features/search/helpers/create-fuse-instance.ts"],"sourcesContent":["import Fuse from 'fuse.js'\n\nimport type { FuseData } from '@/v2/features/search/types'\n\n/**\n * Create a Fuse instance for searching the API reference.\n *\n * Doesn't have any data yet, so it's empty.\n */\nexport function createFuseInstance(): Fuse<FuseData> {\n return new Fuse<FuseData>([], {\n // Define searchable fields with weights to prioritize more important matches\n keys: [\n // Highest weight - titles are most descriptive\n { name: 'title', weight: 0.7 },\n // Medium weight - helpful but often verbose\n { name: 'description', weight: 0.3 },\n // High weight - unique identifiers for operations\n { name: 'operationId', weight: 0.6 },\n // Good weight - endpoint paths are searchable\n { name: 'path', weight: 0.5 },\n // Medium-high weight - helps with categorization\n { name: 'tag', weight: 0.4 },\n // Medium weight - useful for filtering by method\n { name: 'method', weight: 0.3 },\n // Medium weight - useful for filtering by document name\n { name: 'documentName', weight: 0.3 },\n ],\n\n // Threshold controls how strict the matching is (0.0 = perfect match, 1.0 = very loose)\n // 0.3 allows for some typos and partial matches while maintaining relevance\n threshold: 0.3,\n\n // Maximum distance between characters that can be matched\n // Higher values allow matches even when characters are far apart in long text\n distance: 100,\n\n // Include the match score in results for debugging and potential UI enhancements\n includeScore: true,\n\n // Include detailed match information showing which parts of the text matched\n includeMatches: true,\n\n // Don't require matches to be at the beginning of strings\n // Makes search more flexible and user-friendly\n ignoreLocation: true,\n\n // Enable advanced search syntax like 'exact' for exact matches or !exclude for exclusions\n useExtendedSearch: true,\n\n // Find all possible matches in each item, not just the first one\n // Ensures comprehensive search results\n findAllMatches: true,\n })\n}\n"],"mappings":";;;;;;;AASA,SAAgB,qBAAqC;CACnD,OAAO,IAAI,KAAe,CAAC,GAAG;EAE5B,MAAM;GAEJ;IAAE,MAAM;IAAS,QAAQ;GAAI;GAE7B;IAAE,MAAM;IAAe,QAAQ;GAAI;GAEnC;IAAE,MAAM;IAAe,QAAQ;GAAI;GAEnC;IAAE,MAAM;IAAQ,QAAQ;GAAI;GAE5B;IAAE,MAAM;IAAO,QAAQ;GAAI;GAE3B;IAAE,MAAM;IAAU,QAAQ;GAAI;GAE9B;IAAE,MAAM;IAAgB,QAAQ;GAAI;EACtC;EAIA,WAAW;EAIX,UAAU;EAGV,cAAc;EAGd,gBAAgB;EAIhB,gBAAgB;EAGhB,mBAAmB;EAInB,gBAAgB;CAClB,CAAC;AACH"}
1
+ {"version":3,"file":"create-fuse-instance.js","names":[],"sources":["../../../../../src/v2/features/search/helpers/create-fuse-instance.ts"],"sourcesContent":["import Fuse from 'fuse.js'\n\nimport type { FuseData } from '@/v2/features/search/types'\n\n/**\n * Create a Fuse instance for searching the API reference.\n *\n * Doesn't have any data yet, so it's empty.\n */\nexport function createFuseInstance(): Fuse<FuseData> {\n return new Fuse<FuseData>([], {\n // Define searchable fields with weights to prioritize more important matches\n keys: [\n // Highest weight - titles are most descriptive\n { name: 'title', weight: 0.7 },\n // Medium weight - helpful but often verbose\n { name: 'description', weight: 0.3 },\n // High weight - unique identifiers for operations\n { name: 'operationId', weight: 0.6 },\n // Good weight - endpoint paths are searchable\n { name: 'path', weight: 0.5 },\n // Medium-high weight - helps with categorization\n { name: 'tag', weight: 0.4 },\n // Medium weight - useful for filtering by method\n { name: 'method', weight: 0.3 },\n // Medium weight - useful for filtering by document name\n { name: 'documentName', weight: 0.3 },\n ],\n\n // Threshold controls how strict the matching is (0.0 = perfect match, 1.0 = very loose)\n // 0.3 allows for some typos and partial matches while maintaining relevance\n threshold: 0.3,\n\n // Maximum distance between characters that can be matched\n // Higher values allow matches even when characters are far apart in long text\n distance: 100,\n\n // Include the match score in results for debugging and potential UI enhancements\n includeScore: true,\n\n // Results display whole entries, so avoid allocating unused character match ranges.\n includeMatches: false,\n\n // Don't require matches to be at the beginning of strings\n // Makes search more flexible and user-friendly\n ignoreLocation: true,\n\n // Enable advanced search syntax like 'exact' for exact matches or !exclude for exclusions\n useExtendedSearch: true,\n\n // Find all possible matches in each item, not just the first one\n // Ensures comprehensive search results\n findAllMatches: true,\n })\n}\n"],"mappings":";;;;;;;AASA,SAAgB,qBAAqC;CACnD,OAAO,IAAI,KAAe,CAAC,GAAG;EAE5B,MAAM;GAEJ;IAAE,MAAM;IAAS,QAAQ;GAAI;GAE7B;IAAE,MAAM;IAAe,QAAQ;GAAI;GAEnC;IAAE,MAAM;IAAe,QAAQ;GAAI;GAEnC;IAAE,MAAM;IAAQ,QAAQ;GAAI;GAE5B;IAAE,MAAM;IAAO,QAAQ;GAAI;GAE3B;IAAE,MAAM;IAAU,QAAQ;GAAI;GAE9B;IAAE,MAAM;IAAgB,QAAQ;GAAI;EACtC;EAIA,WAAW;EAIX,UAAU;EAGV,cAAc;EAGd,gBAAgB;EAIhB,gBAAgB;EAGhB,mBAAmB;EAInB,gBAAgB;CAClB,CAAC;AACH"}