@scalar/api-client 3.21.4 → 3.22.0

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 (108) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/plugins/posthog/sanitize-event-payload.d.ts.map +1 -1
  3. package/dist/plugins/posthog/sanitize-event-payload.js +1 -0
  4. package/dist/plugins/posthog/sanitize-event-payload.js.map +1 -1
  5. package/dist/style.css +1204 -51
  6. package/dist/styles/tailwind.config.css +1 -0
  7. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  8. package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -1
  9. package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js +1 -1
  10. package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js.map +1 -1
  11. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  12. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +1 -1
  13. package/dist/v2/blocks/request-block/components/RequestBody.vue.js.map +1 -1
  14. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js +62 -13
  15. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +1 -1
  16. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts +2 -0
  17. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts.map +1 -1
  18. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js.map +1 -1
  19. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.script.js +5 -3
  20. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.script.js.map +1 -1
  21. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.d.ts +9 -3
  22. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.d.ts.map +1 -1
  23. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.js.map +1 -1
  24. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.script.js +44 -16
  25. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.script.js.map +1 -1
  26. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +3 -2
  27. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts.map +1 -1
  28. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +13 -10
  29. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js.map +1 -1
  30. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts.map +1 -1
  31. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +1 -1
  32. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js.map +1 -1
  33. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js +3 -3
  34. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js.map +1 -1
  35. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  36. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js.map +1 -1
  37. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js +53 -22
  38. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js.map +1 -1
  39. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +4 -0
  40. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  41. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js.map +1 -1
  42. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.script.js +23 -12
  43. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.script.js.map +1 -1
  44. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  45. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js.map +1 -1
  46. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js +30 -6
  47. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js.map +1 -1
  48. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.d.ts.map +1 -1
  49. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.js +3 -1
  50. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.js.map +1 -1
  51. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  52. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +9 -3
  53. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js.map +1 -1
  54. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  55. package/dist/v2/components/code-input/CodeInput.vue.js +1 -1
  56. package/dist/v2/components/code-input/CodeInput.vue.js.map +1 -1
  57. package/dist/v2/components/code-input/CodeInput.vue.script.js.map +1 -1
  58. package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
  59. package/dist/v2/components/data-table/DataTableInput.vue.js +1 -1
  60. package/dist/v2/components/data-table/DataTableInput.vue.js.map +1 -1
  61. package/dist/v2/components/data-table/DataTableInput.vue.script.js +15 -11
  62. package/dist/v2/components/data-table/DataTableInput.vue.script.js.map +1 -1
  63. package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
  64. package/dist/v2/components/server/ServerDropdown.vue.js.map +1 -1
  65. package/dist/v2/components/server/ServerDropdown.vue.script.js +7 -9
  66. package/dist/v2/components/server/ServerDropdown.vue.script.js.map +1 -1
  67. package/dist/v2/constants.js +1 -1
  68. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -1
  69. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js.map +1 -1
  70. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js +27 -31
  71. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js.map +1 -1
  72. package/dist/v2/features/localization/locales/ar.d.ts +4 -0
  73. package/dist/v2/features/localization/locales/ar.d.ts.map +1 -1
  74. package/dist/v2/features/localization/locales/ar.js +5 -1
  75. package/dist/v2/features/localization/locales/ar.js.map +1 -1
  76. package/dist/v2/features/localization/locales/de.d.ts +4 -0
  77. package/dist/v2/features/localization/locales/de.d.ts.map +1 -1
  78. package/dist/v2/features/localization/locales/de.js +5 -1
  79. package/dist/v2/features/localization/locales/de.js.map +1 -1
  80. package/dist/v2/features/localization/locales/es.d.ts +4 -0
  81. package/dist/v2/features/localization/locales/es.d.ts.map +1 -1
  82. package/dist/v2/features/localization/locales/es.js +5 -1
  83. package/dist/v2/features/localization/locales/es.js.map +1 -1
  84. package/dist/v2/features/localization/locales/fr.d.ts +4 -0
  85. package/dist/v2/features/localization/locales/fr.d.ts.map +1 -1
  86. package/dist/v2/features/localization/locales/fr.js +5 -1
  87. package/dist/v2/features/localization/locales/fr.js.map +1 -1
  88. package/dist/v2/features/localization/locales/pt.d.ts +4 -0
  89. package/dist/v2/features/localization/locales/pt.d.ts.map +1 -1
  90. package/dist/v2/features/localization/locales/pt.js +5 -1
  91. package/dist/v2/features/localization/locales/pt.js.map +1 -1
  92. package/dist/v2/features/localization/locales/ru.d.ts +4 -0
  93. package/dist/v2/features/localization/locales/ru.d.ts.map +1 -1
  94. package/dist/v2/features/localization/locales/ru.js +5 -1
  95. package/dist/v2/features/localization/locales/ru.js.map +1 -1
  96. package/dist/v2/features/localization/locales/zh-cn.d.ts +4 -0
  97. package/dist/v2/features/localization/locales/zh-cn.d.ts.map +1 -1
  98. package/dist/v2/features/localization/locales/zh-cn.js +5 -1
  99. package/dist/v2/features/localization/locales/zh-cn.js.map +1 -1
  100. package/dist/v2/features/localization/translations.d.ts +4 -0
  101. package/dist/v2/features/localization/translations.d.ts.map +1 -1
  102. package/dist/v2/features/localization/translations.js +5 -1
  103. package/dist/v2/features/localization/translations.js.map +1 -1
  104. package/dist/v2/workspace-events.d.ts.map +1 -1
  105. package/dist/v2/workspace-events.js +1 -0
  106. package/dist/v2/workspace-events.js.map +1 -1
  107. package/dist/vue-styles.css +30 -33
  108. package/package.json +12 -12
@@ -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 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,gB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B;EAC5B,qBAAqB;EACrB,aAAa;CACf;CACA,2BAA2B;EACzB,MAAM;EACN,OAAO;EACP,SAAS;EACT,yBAAyB;EACzB,0BAA0B;CAC5B;CACA,qBAAqB;EACnB,gBAAgB;EAChB,uBAAuB;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
+ {"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 resetValue: 'Reset to default',\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 schema: 'Schema',\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 clearTokens: 'Clear tokens',\n resetDiscovery: 'Reset discovery',\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,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,QAAQ;EACR,MAAM;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AAe;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":"workspace-events.d.ts","sourceRoot":"","sources":["../../src/v2/workspace-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,kBAAkB,EAAkB,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAE3G,OAAO,EAAE,KAAK,GAAG,EAAY,MAAM,KAAK,CAAA;AAExC,KAAK,IAAI,CAAC,CAAC,SAAS,MAAM,kBAAkB,IAAI,OAAO,CAAC;IACtD,eAAe,EAAE,CACf,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,KAC3B,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC,C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BAAkB,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC;CAC9C,CAAA;AA6BD;;;;;;;GAOG;AACH,wBAAgB,gCAAgC,CAAC,EAC/C,QAAQ,EAAE,GAAG,EACb,KAAK,EACL,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,KAAK,EAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IACjC,KAAK,EAAE,KAAK,CAAA;CACb,GAAG,MAAM,IAAI,CAsVb"}
@@ -76,6 +76,7 @@ function initializeWorkspaceEventHandlers({ eventBus: bus, store, hooks }) {
76
76
  eventBus.on("auth:update:selected-security-schemes", (payload) => withHook("auth:update:selected-security-schemes", mutators.value.active().auth.updateSelectedSecuritySchemes, hooks)(payload));
77
77
  eventBus.on("auth:clear:selected-security-schemes", (payload) => withHook("auth:clear:selected-security-schemes", mutators.value.active().auth.clearSelectedSecuritySchemes, hooks)(payload));
78
78
  eventBus.on("auth:update:security-scheme-secrets", (payload) => withHook("auth:update:security-scheme-secrets", mutators.value.active().auth.updateSecuritySchemeSecrets, hooks)(payload));
79
+ eventBus.on("auth:reset:security-scheme-secret", (payload) => withHook("auth:reset:security-scheme-secret", mutators.value.active().auth.resetSecuritySchemeSecret, hooks)(payload));
79
80
  eventBus.on("auth:clear:security-scheme-secrets", (payload) => withHook("auth:clear:security-scheme-secrets", mutators.value.active().auth.clearSecuritySchemeSecrets, hooks)(payload));
80
81
  eventBus.on("server:initialize:servers", (payload) => withHook("server:initialize:servers", mutators.value.active().server.initializeServers, hooks)(payload));
81
82
  eventBus.on("server:add:server", (payload) => withHook("server:add:server", mutators.value.active().server.addServer, hooks)(payload));
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-events.js","names":[],"sources":["../../src/v2/workspace-events.ts"],"sourcesContent":["import type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { ApiReferenceEvents, CollectionType, WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { generateClientMutators } from '@scalar/workspace-store/mutators'\nimport { type Ref, computed } from 'vue'\n\ntype Hook<T extends keyof ApiReferenceEvents> = Partial<{\n onBeforeExecute: (\n payload: ApiReferenceEvents[T],\n ) => void | Promise<void> | ApiReferenceEvents[T] | Promise<ApiReferenceEvents[T]>\n onAfterExecute: (payload: ApiReferenceEvents[T]) => void | Promise<void>\n}>\n\ntype Hooks = {\n [key in keyof ApiReferenceEvents]?: Hook<key>\n}\n\n/**\n * Wraps a given function with optional before/after execution hooks for a specific event.\n * - Calls onBeforeExecute hook before executing the main function.\n * - Calls onAfterExecute hook after executing the main function.\n *\n * @template T The event key from ApiReferenceEvents\n * @param event The event name\n * @param fn The main function to execute\n * @param hooks The hooks object containing before/after hooks for events\n * @returns An async function that runs hooks around the main function\n */\nconst withHook = <T extends keyof ApiReferenceEvents>(\n event: T,\n fn: (args: ApiReferenceEvents[T]) => unknown | Promise<unknown>,\n hooks: Hooks,\n) => {\n return async (args: ApiReferenceEvents[T]) => {\n // Call the before execution hook for this event, if any\n const result = (await hooks[event]?.onBeforeExecute?.(args)) ?? args\n // Execute the main function\n await fn(result)\n // Call the after execution hook for this event, if any\n await hooks[event]?.onAfterExecute?.(result)\n return result\n }\n}\n\n/**\n * Initializes all Workspace Event Handlers by subscribing eventBus listeners\n * to each relevant mutator operation. Hooks are used for before/after execution.\n *\n * @param eventBus The WorkspaceEventBus to subscribe to\n * @param store The WorkspaceStore instance\n * @param hooks Object containing optional before/after hooks for each event\n */\nexport function initializeWorkspaceEventHandlers({\n eventBus: bus,\n store,\n hooks,\n}: {\n eventBus: WorkspaceEventBus\n store: Ref<WorkspaceStore | null>\n hooks: Hooks\n}): () => void {\n const subscriptions: (() => void)[] = []\n const eventBus: Pick<WorkspaceEventBus, 'on'> = {\n on: (event, listener) => {\n const unsubscribe = bus.on(event, listener)\n subscriptions.push(unsubscribe)\n return unsubscribe\n },\n }\n // Generate all client mutators for the current workspace store\n const mutators = computed(() => generateClientMutators(store.value))\n\n /**\n * Returns the appropriate mutators depending on the collectionType.\n * If collectionType is 'document', gets the active document mutator,\n * otherwise, gets the workspace mutator.\n */\n const getMutators = ({ collectionType }: CollectionType) => {\n if (collectionType === 'document') {\n return mutators.value.active()\n }\n return mutators.value.workspace()\n }\n\n //------------------------------------------------------------------------------------\n // Workspace Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('workspace:update:active-proxy', (payload) =>\n withHook('workspace:update:active-proxy', mutators.value.workspace().workspace.updateActiveProxy, hooks)(payload),\n )\n eventBus.on('workspace:update:color-mode', (payload) =>\n withHook('workspace:update:color-mode', mutators.value.workspace().workspace.updateColorMode, hooks)(payload),\n )\n eventBus.on('workspace:update:theme', (payload) =>\n withHook('workspace:update:theme', mutators.value.workspace().workspace.updateTheme, hooks)(payload),\n )\n eventBus.on('workspace:update:selected-client', (payload) =>\n withHook(\n 'workspace:update:selected-client',\n mutators.value.workspace().workspace.updateSelectedClient,\n hooks,\n )(payload),\n )\n eventBus.on('workspace:update:selected-example', (payload) =>\n withHook(\n 'workspace:update:selected-example',\n mutators.value.workspace().workspace.updateSelectedExample,\n hooks,\n )(payload),\n )\n eventBus.on('workspace:update:active-environment', (payload) =>\n withHook(\n 'workspace:update:active-environment',\n mutators.value.workspace().workspace.updateActiveEnvironment,\n hooks,\n )(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Document Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('document:update:extension', (payload) =>\n withHook('document:update:extension', mutators.value.active().document.updateDocumentExtension, hooks)(payload),\n )\n eventBus.on('document:update:icon', (payload) =>\n withHook('document:update:icon', mutators.value.active().document.updateDocumentIcon, hooks)(payload),\n )\n eventBus.on('document:update:info', (payload) =>\n withHook('document:update:info', mutators.value.active().document.updateDocumentInfo, hooks)(payload),\n )\n eventBus.on('document:update:watch-mode', (payload) =>\n withHook('document:update:watch-mode', mutators.value.active().document.updateWatchMode, hooks)(payload),\n )\n eventBus.on('document:create:empty-document', (payload) =>\n withHook('document:create:empty-document', mutators.value.active().document.createEmptyDocument, hooks)(payload),\n )\n eventBus.on('document:delete:document', (payload) =>\n withHook('document:delete:document', mutators.value.active().document.deleteDocument, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Environment Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('environment:upsert:environment', (payload) =>\n withHook('environment:upsert:environment', getMutators(payload).environment.upsertEnvironment, hooks)(payload),\n )\n eventBus.on('environment:delete:environment', (payload) =>\n withHook('environment:delete:environment', getMutators(payload).environment.deleteEnvironment, hooks)(payload),\n )\n eventBus.on('environment:upsert:environment-variable', (payload) =>\n withHook(\n 'environment:upsert:environment-variable',\n getMutators(payload).environment.upsertEnvironmentVariable,\n hooks,\n )(payload),\n )\n eventBus.on('environment:delete:environment-variable', (payload) =>\n withHook(\n 'environment:delete:environment-variable',\n getMutators(payload).environment.deleteEnvironmentVariable,\n hooks,\n )(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Cookie Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('cookie:upsert:cookie', async (payload) => {\n await withHook('cookie:upsert:cookie', getMutators(payload).cookie.upsertCookie, hooks)(payload)\n })\n eventBus.on('cookie:delete:cookie', async (payload) => {\n await withHook('cookie:delete:cookie', getMutators(payload).cookie.deleteCookie, hooks)(payload)\n })\n\n //------------------------------------------------------------------------------------\n // Auth Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('auth:delete:security-scheme', (payload) =>\n withHook('auth:delete:security-scheme', mutators.value.active().auth.deleteSecurityScheme, hooks)(payload),\n )\n eventBus.on('auth:update:active-index', (payload) =>\n withHook('auth:update:active-index', mutators.value.active().auth.updateSelectedAuthTab, hooks)(payload),\n )\n eventBus.on('auth:update:security-scheme', (payload) =>\n withHook('auth:update:security-scheme', mutators.value.active().auth.updateSecurityScheme, hooks)(payload),\n )\n eventBus.on('auth:update:selected-scopes', (payload) =>\n withHook('auth:update:selected-scopes', mutators.value.active().auth.updateSelectedScopes, hooks)(payload),\n )\n eventBus.on('auth:upsert:scopes', (payload) =>\n withHook('auth:upsert:scopes', mutators.value.active().auth.upsertScope, hooks)(payload),\n )\n eventBus.on('auth:delete:scopes', (payload) =>\n withHook('auth:delete:scopes', mutators.value.active().auth.deleteScope, hooks)(payload),\n )\n eventBus.on('auth:update:selected-security-schemes', (payload) =>\n withHook(\n 'auth:update:selected-security-schemes',\n mutators.value.active().auth.updateSelectedSecuritySchemes,\n hooks,\n )(payload),\n )\n eventBus.on('auth:clear:selected-security-schemes', (payload) =>\n withHook(\n 'auth:clear:selected-security-schemes',\n mutators.value.active().auth.clearSelectedSecuritySchemes,\n hooks,\n )(payload),\n )\n eventBus.on('auth:update:security-scheme-secrets', (payload) =>\n withHook(\n 'auth:update:security-scheme-secrets',\n mutators.value.active().auth.updateSecuritySchemeSecrets,\n hooks,\n )(payload),\n )\n eventBus.on('auth:clear:security-scheme-secrets', (payload) =>\n withHook(\n 'auth:clear:security-scheme-secrets',\n mutators.value.active().auth.clearSecuritySchemeSecrets,\n hooks,\n )(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Server Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('server:initialize:servers', (payload) =>\n withHook('server:initialize:servers', mutators.value.active().server.initializeServers, hooks)(payload),\n )\n eventBus.on('server:add:server', (payload) =>\n withHook('server:add:server', mutators.value.active().server.addServer, hooks)(payload),\n )\n eventBus.on('server:update:server', (payload) =>\n withHook('server:update:server', mutators.value.active().server.updateServer, hooks)(payload),\n )\n eventBus.on('server:delete:server', (payload) =>\n withHook('server:delete:server', mutators.value.active().server.deleteServer, hooks)(payload),\n )\n eventBus.on('server:clear:servers', (payload) =>\n withHook('server:clear:servers', mutators.value.active().server.clearServers, hooks)(payload),\n )\n eventBus.on('server:update:variables', (payload) =>\n withHook('server:update:variables', mutators.value.active().server.updateServerVariables, hooks)(payload),\n )\n eventBus.on('server:update:selected', (payload) =>\n withHook('server:update:selected', mutators.value.active().server.updateSelectedServer, hooks)(payload),\n )\n eventBus.on('asyncapi-server:update:selected', (payload) =>\n withHook(\n 'asyncapi-server:update:selected',\n mutators.value.active().server.updateSelectedAsyncApiServer,\n hooks,\n )(payload),\n )\n eventBus.on('asyncapi-server:update:variables', (payload) =>\n withHook(\n 'asyncapi-server:update:variables',\n mutators.value.active().server.updateAsyncApiServerVariables,\n hooks,\n )(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Operation Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('operation:create:operation', (payload) =>\n withHook('operation:create:operation', mutators.value.active().operation.createOperation, hooks)(payload),\n )\n eventBus.on('operation:update:pathMethod', (payload) =>\n withHook(\n 'operation:update:pathMethod',\n mutators.value.active().operation.updateOperationPathMethod,\n hooks,\n )(payload),\n )\n eventBus.on('operation:update:meta', (payload) =>\n withHook('operation:update:meta', mutators.value.active().operation.updateOperationMeta, hooks)(payload),\n )\n eventBus.on('operation:delete:operation', (payload) =>\n withHook('operation:delete:operation', mutators.value.active().operation.deleteOperation, hooks)(payload),\n )\n eventBus.on('operation:create:draft-example', (payload) =>\n withHook(\n 'operation:create:draft-example',\n mutators.value.active().operation.createOperationDraftExample,\n hooks,\n )(payload),\n )\n eventBus.on('operation:delete:example', (payload) =>\n withHook('operation:delete:example', mutators.value.active().operation.deleteOperationExample, hooks)(payload),\n )\n eventBus.on('operation:rename:example', (payload) =>\n withHook('operation:rename:example', mutators.value.active().operation.renameOperationExample, hooks)(payload),\n )\n eventBus.on('operation:upsert:parameter', (payload) =>\n withHook('operation:upsert:parameter', mutators.value.active().operation.upsertOperationParameter, hooks)(payload),\n )\n eventBus.on('operation:update:extra-parameters', (payload) =>\n withHook(\n 'operation:update:extra-parameters',\n mutators.value.active().operation.updateOperationExtraParameters,\n hooks,\n )(payload),\n )\n eventBus.on('operation:delete:parameter', (payload) =>\n withHook('operation:delete:parameter', mutators.value.active().operation.deleteOperationParameter, hooks)(payload),\n )\n eventBus.on('operation:delete-all:parameters', (payload) =>\n withHook(\n 'operation:delete-all:parameters',\n mutators.value.active().operation.deleteAllOperationParameters,\n hooks,\n )(payload),\n )\n eventBus.on('operation:update:extension', (payload) =>\n withHook('operation:update:extension', mutators.value.active().operation.updateOperationExtension, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Operation Request Body Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('operation:update:requestBody:contentType', (payload) =>\n withHook(\n 'operation:update:requestBody:contentType',\n mutators.value.active().operation.updateOperationRequestBodyContentType,\n hooks,\n )(payload),\n )\n eventBus.on('operation:update:requestBody:value', (payload) =>\n withHook(\n 'operation:update:requestBody:value',\n mutators.value.active().operation.updateOperationRequestBodyExample,\n hooks,\n )(payload),\n )\n eventBus.on('operation:update:requestBody:formValue', (payload) =>\n withHook(\n 'operation:update:requestBody:formValue',\n mutators.value.active().operation.updateOperationRequestBodyFormValue,\n hooks,\n )(payload),\n )\n eventBus.on('operation:reload:history', (payload) =>\n withHook('operation:reload:history', mutators.value.active().operation.reloadOperationHistory, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Tag Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('tag:create:tag', (payload) =>\n withHook('tag:create:tag', mutators.value.active().tag.createTag, hooks)(payload),\n )\n eventBus.on('tag:edit:tag', (payload) =>\n withHook('tag:edit:tag', mutators.value.active().tag.editTag, hooks)(payload),\n )\n eventBus.on('tag:delete:tag', (payload) =>\n withHook('tag:delete:tag', mutators.value.active().tag.deleteTag, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Tabs Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('tabs:add:tab', (payload) =>\n withHook('tabs:add:tab', mutators.value.workspace().tabs.addTab, hooks)(payload),\n )\n eventBus.on('tabs:close:tab', (payload) =>\n withHook('tabs:close:tab', mutators.value.workspace().tabs.closeTab, hooks)(payload),\n )\n eventBus.on('tabs:close:other-tabs', (payload) =>\n withHook('tabs:close:other-tabs', mutators.value.workspace().tabs.closeOtherTabs, hooks)(payload),\n )\n eventBus.on('tabs:focus:tab', (payload) =>\n withHook('tabs:focus:tab', mutators.value.workspace().tabs.focusTab, hooks)(payload),\n )\n eventBus.on('tabs:focus:tab-last', (payload) =>\n withHook('tabs:focus:tab-last', mutators.value.workspace().tabs.focusLastTab, hooks)(payload),\n )\n eventBus.on('tabs:navigate:previous', (payload) =>\n withHook('tabs:navigate:previous', mutators.value.workspace().tabs.navigatePreviousTab, hooks)(payload),\n )\n eventBus.on('tabs:navigate:next', (payload) =>\n withHook('tabs:navigate:next', mutators.value.workspace().tabs.navigateNextTab, hooks)(payload),\n )\n eventBus.on('tabs:update:tabs', (payload) =>\n withHook('tabs:update:tabs', mutators.value.workspace().tabs.updateTabs, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Hooks Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('hooks:on:request:complete', (payload) =>\n withHook('hooks:on:request:complete', mutators.value.active().operation.addResponseToHistory, hooks)(payload),\n )\n return () => subscriptions.splice(0).forEach((unsubscribe) => unsubscribe())\n}\n"],"mappings":";;;;;;;;;;;;;;AA2BA,IAAM,YACJ,OACA,IACA,UACG;CACH,OAAO,OAAO,SAAgC;EAE5C,MAAM,SAAU,MAAM,MAAM,MAAM,EAAE,kBAAkB,IAAI,KAAM;EAEhE,MAAM,GAAG,MAAM;EAEf,MAAM,MAAM,MAAM,EAAE,iBAAiB,MAAM;EAC3C,OAAO;CACT;AACF;;;;;;;;;AAUA,SAAgB,iCAAiC,EAC/C,UAAU,KACV,OACA,SAKa;CACb,MAAM,gBAAgC,CAAC;CACvC,MAAM,WAA0C,EAC9C,KAAK,OAAO,aAAa;EACvB,MAAM,cAAc,IAAI,GAAG,OAAO,QAAQ;EAC1C,cAAc,KAAK,WAAW;EAC9B,OAAO;CACT,EACF;CAEA,MAAM,WAAW,eAAe,uBAAuB,MAAM,KAAK,CAAC;;;;;;CAOnE,MAAM,eAAe,EAAE,qBAAqC;EAC1D,IAAI,mBAAmB,YAC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K,qBAAqB,KAAK,CAAC,CAAC,OAAO,CACxG;CACA,SAAS,GAAG,uBAAuB,YACjC,SAAS,sBAAsB,SAAS,MAAM,UAAU,CAAC,CAAC,KAAK,iBAAiB,KAAK,CAAC,CAAC,OAAO,CAChG;CACA,SAAS,GAAG,qBAAqB,YAC/B,SAAS,oBAAoB,SAAS,MAAM,UAAU,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,OAAO,CACzF;CAKA,SAAS,GAAG,8BAA8B,YACxC,SAAS,6BAA6B,SAAS,MAAM,OAAO,CAAC,CAAC,UAAU,sBAAsB,KAAK,CAAC,CAAC,OAAO,CAC9G;CACA,aAAa,cAAc,OAAO,CAAC,CAAC,CAAC,SAAS,gBAAgB,YAAY,CAAC;AAC7E"}
1
+ {"version":3,"file":"workspace-events.js","names":[],"sources":["../../src/v2/workspace-events.ts"],"sourcesContent":["import type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { ApiReferenceEvents, CollectionType, WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { generateClientMutators } from '@scalar/workspace-store/mutators'\nimport { type Ref, computed } from 'vue'\n\ntype Hook<T extends keyof ApiReferenceEvents> = Partial<{\n onBeforeExecute: (\n payload: ApiReferenceEvents[T],\n ) => void | Promise<void> | ApiReferenceEvents[T] | Promise<ApiReferenceEvents[T]>\n onAfterExecute: (payload: ApiReferenceEvents[T]) => void | Promise<void>\n}>\n\ntype Hooks = {\n [key in keyof ApiReferenceEvents]?: Hook<key>\n}\n\n/**\n * Wraps a given function with optional before/after execution hooks for a specific event.\n * - Calls onBeforeExecute hook before executing the main function.\n * - Calls onAfterExecute hook after executing the main function.\n *\n * @template T The event key from ApiReferenceEvents\n * @param event The event name\n * @param fn The main function to execute\n * @param hooks The hooks object containing before/after hooks for events\n * @returns An async function that runs hooks around the main function\n */\nconst withHook = <T extends keyof ApiReferenceEvents>(\n event: T,\n fn: (args: ApiReferenceEvents[T]) => unknown | Promise<unknown>,\n hooks: Hooks,\n) => {\n return async (args: ApiReferenceEvents[T]) => {\n // Call the before execution hook for this event, if any\n const result = (await hooks[event]?.onBeforeExecute?.(args)) ?? args\n // Execute the main function\n await fn(result)\n // Call the after execution hook for this event, if any\n await hooks[event]?.onAfterExecute?.(result)\n return result\n }\n}\n\n/**\n * Initializes all Workspace Event Handlers by subscribing eventBus listeners\n * to each relevant mutator operation. Hooks are used for before/after execution.\n *\n * @param eventBus The WorkspaceEventBus to subscribe to\n * @param store The WorkspaceStore instance\n * @param hooks Object containing optional before/after hooks for each event\n */\nexport function initializeWorkspaceEventHandlers({\n eventBus: bus,\n store,\n hooks,\n}: {\n eventBus: WorkspaceEventBus\n store: Ref<WorkspaceStore | null>\n hooks: Hooks\n}): () => void {\n const subscriptions: (() => void)[] = []\n const eventBus: Pick<WorkspaceEventBus, 'on'> = {\n on: (event, listener) => {\n const unsubscribe = bus.on(event, listener)\n subscriptions.push(unsubscribe)\n return unsubscribe\n },\n }\n // Generate all client mutators for the current workspace store\n const mutators = computed(() => generateClientMutators(store.value))\n\n /**\n * Returns the appropriate mutators depending on the collectionType.\n * If collectionType is 'document', gets the active document mutator,\n * otherwise, gets the workspace mutator.\n */\n const getMutators = ({ collectionType }: CollectionType) => {\n if (collectionType === 'document') {\n return mutators.value.active()\n }\n return mutators.value.workspace()\n }\n\n //------------------------------------------------------------------------------------\n // Workspace Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('workspace:update:active-proxy', (payload) =>\n withHook('workspace:update:active-proxy', mutators.value.workspace().workspace.updateActiveProxy, hooks)(payload),\n )\n eventBus.on('workspace:update:color-mode', (payload) =>\n withHook('workspace:update:color-mode', mutators.value.workspace().workspace.updateColorMode, hooks)(payload),\n )\n eventBus.on('workspace:update:theme', (payload) =>\n withHook('workspace:update:theme', mutators.value.workspace().workspace.updateTheme, hooks)(payload),\n )\n eventBus.on('workspace:update:selected-client', (payload) =>\n withHook(\n 'workspace:update:selected-client',\n mutators.value.workspace().workspace.updateSelectedClient,\n hooks,\n )(payload),\n )\n eventBus.on('workspace:update:selected-example', (payload) =>\n withHook(\n 'workspace:update:selected-example',\n mutators.value.workspace().workspace.updateSelectedExample,\n hooks,\n )(payload),\n )\n eventBus.on('workspace:update:active-environment', (payload) =>\n withHook(\n 'workspace:update:active-environment',\n mutators.value.workspace().workspace.updateActiveEnvironment,\n hooks,\n )(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Document Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('document:update:extension', (payload) =>\n withHook('document:update:extension', mutators.value.active().document.updateDocumentExtension, hooks)(payload),\n )\n eventBus.on('document:update:icon', (payload) =>\n withHook('document:update:icon', mutators.value.active().document.updateDocumentIcon, hooks)(payload),\n )\n eventBus.on('document:update:info', (payload) =>\n withHook('document:update:info', mutators.value.active().document.updateDocumentInfo, hooks)(payload),\n )\n eventBus.on('document:update:watch-mode', (payload) =>\n withHook('document:update:watch-mode', mutators.value.active().document.updateWatchMode, hooks)(payload),\n )\n eventBus.on('document:create:empty-document', (payload) =>\n withHook('document:create:empty-document', mutators.value.active().document.createEmptyDocument, hooks)(payload),\n )\n eventBus.on('document:delete:document', (payload) =>\n withHook('document:delete:document', mutators.value.active().document.deleteDocument, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Environment Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('environment:upsert:environment', (payload) =>\n withHook('environment:upsert:environment', getMutators(payload).environment.upsertEnvironment, hooks)(payload),\n )\n eventBus.on('environment:delete:environment', (payload) =>\n withHook('environment:delete:environment', getMutators(payload).environment.deleteEnvironment, hooks)(payload),\n )\n eventBus.on('environment:upsert:environment-variable', (payload) =>\n withHook(\n 'environment:upsert:environment-variable',\n getMutators(payload).environment.upsertEnvironmentVariable,\n hooks,\n )(payload),\n )\n eventBus.on('environment:delete:environment-variable', (payload) =>\n withHook(\n 'environment:delete:environment-variable',\n getMutators(payload).environment.deleteEnvironmentVariable,\n hooks,\n )(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Cookie Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('cookie:upsert:cookie', async (payload) => {\n await withHook('cookie:upsert:cookie', getMutators(payload).cookie.upsertCookie, hooks)(payload)\n })\n eventBus.on('cookie:delete:cookie', async (payload) => {\n await withHook('cookie:delete:cookie', getMutators(payload).cookie.deleteCookie, hooks)(payload)\n })\n\n //------------------------------------------------------------------------------------\n // Auth Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('auth:delete:security-scheme', (payload) =>\n withHook('auth:delete:security-scheme', mutators.value.active().auth.deleteSecurityScheme, hooks)(payload),\n )\n eventBus.on('auth:update:active-index', (payload) =>\n withHook('auth:update:active-index', mutators.value.active().auth.updateSelectedAuthTab, hooks)(payload),\n )\n eventBus.on('auth:update:security-scheme', (payload) =>\n withHook('auth:update:security-scheme', mutators.value.active().auth.updateSecurityScheme, hooks)(payload),\n )\n eventBus.on('auth:update:selected-scopes', (payload) =>\n withHook('auth:update:selected-scopes', mutators.value.active().auth.updateSelectedScopes, hooks)(payload),\n )\n eventBus.on('auth:upsert:scopes', (payload) =>\n withHook('auth:upsert:scopes', mutators.value.active().auth.upsertScope, hooks)(payload),\n )\n eventBus.on('auth:delete:scopes', (payload) =>\n withHook('auth:delete:scopes', mutators.value.active().auth.deleteScope, hooks)(payload),\n )\n eventBus.on('auth:update:selected-security-schemes', (payload) =>\n withHook(\n 'auth:update:selected-security-schemes',\n mutators.value.active().auth.updateSelectedSecuritySchemes,\n hooks,\n )(payload),\n )\n eventBus.on('auth:clear:selected-security-schemes', (payload) =>\n withHook(\n 'auth:clear:selected-security-schemes',\n mutators.value.active().auth.clearSelectedSecuritySchemes,\n hooks,\n )(payload),\n )\n eventBus.on('auth:update:security-scheme-secrets', (payload) =>\n withHook(\n 'auth:update:security-scheme-secrets',\n mutators.value.active().auth.updateSecuritySchemeSecrets,\n hooks,\n )(payload),\n )\n eventBus.on('auth:reset:security-scheme-secret', (payload) =>\n withHook(\n 'auth:reset:security-scheme-secret',\n mutators.value.active().auth.resetSecuritySchemeSecret,\n hooks,\n )(payload),\n )\n eventBus.on('auth:clear:security-scheme-secrets', (payload) =>\n withHook(\n 'auth:clear:security-scheme-secrets',\n mutators.value.active().auth.clearSecuritySchemeSecrets,\n hooks,\n )(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Server Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('server:initialize:servers', (payload) =>\n withHook('server:initialize:servers', mutators.value.active().server.initializeServers, hooks)(payload),\n )\n eventBus.on('server:add:server', (payload) =>\n withHook('server:add:server', mutators.value.active().server.addServer, hooks)(payload),\n )\n eventBus.on('server:update:server', (payload) =>\n withHook('server:update:server', mutators.value.active().server.updateServer, hooks)(payload),\n )\n eventBus.on('server:delete:server', (payload) =>\n withHook('server:delete:server', mutators.value.active().server.deleteServer, hooks)(payload),\n )\n eventBus.on('server:clear:servers', (payload) =>\n withHook('server:clear:servers', mutators.value.active().server.clearServers, hooks)(payload),\n )\n eventBus.on('server:update:variables', (payload) =>\n withHook('server:update:variables', mutators.value.active().server.updateServerVariables, hooks)(payload),\n )\n eventBus.on('server:update:selected', (payload) =>\n withHook('server:update:selected', mutators.value.active().server.updateSelectedServer, hooks)(payload),\n )\n eventBus.on('asyncapi-server:update:selected', (payload) =>\n withHook(\n 'asyncapi-server:update:selected',\n mutators.value.active().server.updateSelectedAsyncApiServer,\n hooks,\n )(payload),\n )\n eventBus.on('asyncapi-server:update:variables', (payload) =>\n withHook(\n 'asyncapi-server:update:variables',\n mutators.value.active().server.updateAsyncApiServerVariables,\n hooks,\n )(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Operation Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('operation:create:operation', (payload) =>\n withHook('operation:create:operation', mutators.value.active().operation.createOperation, hooks)(payload),\n )\n eventBus.on('operation:update:pathMethod', (payload) =>\n withHook(\n 'operation:update:pathMethod',\n mutators.value.active().operation.updateOperationPathMethod,\n hooks,\n )(payload),\n )\n eventBus.on('operation:update:meta', (payload) =>\n withHook('operation:update:meta', mutators.value.active().operation.updateOperationMeta, hooks)(payload),\n )\n eventBus.on('operation:delete:operation', (payload) =>\n withHook('operation:delete:operation', mutators.value.active().operation.deleteOperation, hooks)(payload),\n )\n eventBus.on('operation:create:draft-example', (payload) =>\n withHook(\n 'operation:create:draft-example',\n mutators.value.active().operation.createOperationDraftExample,\n hooks,\n )(payload),\n )\n eventBus.on('operation:delete:example', (payload) =>\n withHook('operation:delete:example', mutators.value.active().operation.deleteOperationExample, hooks)(payload),\n )\n eventBus.on('operation:rename:example', (payload) =>\n withHook('operation:rename:example', mutators.value.active().operation.renameOperationExample, hooks)(payload),\n )\n eventBus.on('operation:upsert:parameter', (payload) =>\n withHook('operation:upsert:parameter', mutators.value.active().operation.upsertOperationParameter, hooks)(payload),\n )\n eventBus.on('operation:update:extra-parameters', (payload) =>\n withHook(\n 'operation:update:extra-parameters',\n mutators.value.active().operation.updateOperationExtraParameters,\n hooks,\n )(payload),\n )\n eventBus.on('operation:delete:parameter', (payload) =>\n withHook('operation:delete:parameter', mutators.value.active().operation.deleteOperationParameter, hooks)(payload),\n )\n eventBus.on('operation:delete-all:parameters', (payload) =>\n withHook(\n 'operation:delete-all:parameters',\n mutators.value.active().operation.deleteAllOperationParameters,\n hooks,\n )(payload),\n )\n eventBus.on('operation:update:extension', (payload) =>\n withHook('operation:update:extension', mutators.value.active().operation.updateOperationExtension, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Operation Request Body Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('operation:update:requestBody:contentType', (payload) =>\n withHook(\n 'operation:update:requestBody:contentType',\n mutators.value.active().operation.updateOperationRequestBodyContentType,\n hooks,\n )(payload),\n )\n eventBus.on('operation:update:requestBody:value', (payload) =>\n withHook(\n 'operation:update:requestBody:value',\n mutators.value.active().operation.updateOperationRequestBodyExample,\n hooks,\n )(payload),\n )\n eventBus.on('operation:update:requestBody:formValue', (payload) =>\n withHook(\n 'operation:update:requestBody:formValue',\n mutators.value.active().operation.updateOperationRequestBodyFormValue,\n hooks,\n )(payload),\n )\n eventBus.on('operation:reload:history', (payload) =>\n withHook('operation:reload:history', mutators.value.active().operation.reloadOperationHistory, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Tag Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('tag:create:tag', (payload) =>\n withHook('tag:create:tag', mutators.value.active().tag.createTag, hooks)(payload),\n )\n eventBus.on('tag:edit:tag', (payload) =>\n withHook('tag:edit:tag', mutators.value.active().tag.editTag, hooks)(payload),\n )\n eventBus.on('tag:delete:tag', (payload) =>\n withHook('tag:delete:tag', mutators.value.active().tag.deleteTag, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Tabs Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('tabs:add:tab', (payload) =>\n withHook('tabs:add:tab', mutators.value.workspace().tabs.addTab, hooks)(payload),\n )\n eventBus.on('tabs:close:tab', (payload) =>\n withHook('tabs:close:tab', mutators.value.workspace().tabs.closeTab, hooks)(payload),\n )\n eventBus.on('tabs:close:other-tabs', (payload) =>\n withHook('tabs:close:other-tabs', mutators.value.workspace().tabs.closeOtherTabs, hooks)(payload),\n )\n eventBus.on('tabs:focus:tab', (payload) =>\n withHook('tabs:focus:tab', mutators.value.workspace().tabs.focusTab, hooks)(payload),\n )\n eventBus.on('tabs:focus:tab-last', (payload) =>\n withHook('tabs:focus:tab-last', mutators.value.workspace().tabs.focusLastTab, hooks)(payload),\n )\n eventBus.on('tabs:navigate:previous', (payload) =>\n withHook('tabs:navigate:previous', mutators.value.workspace().tabs.navigatePreviousTab, hooks)(payload),\n )\n eventBus.on('tabs:navigate:next', (payload) =>\n withHook('tabs:navigate:next', mutators.value.workspace().tabs.navigateNextTab, hooks)(payload),\n )\n eventBus.on('tabs:update:tabs', (payload) =>\n withHook('tabs:update:tabs', mutators.value.workspace().tabs.updateTabs, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Hooks Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('hooks:on:request:complete', (payload) =>\n withHook('hooks:on:request:complete', mutators.value.active().operation.addResponseToHistory, hooks)(payload),\n )\n return () => subscriptions.splice(0).forEach((unsubscribe) => unsubscribe())\n}\n"],"mappings":";;;;;;;;;;;;;;AA2BA,IAAM,YACJ,OACA,IACA,UACG;CACH,OAAO,OAAO,SAAgC;EAE5C,MAAM,SAAU,MAAM,MAAM,MAAM,EAAE,kBAAkB,IAAI,KAAM;EAEhE,MAAM,GAAG,MAAM;EAEf,MAAM,MAAM,MAAM,EAAE,iBAAiB,MAAM;EAC3C,OAAO;CACT;AACF;;;;;;;;;AAUA,SAAgB,iCAAiC,EAC/C,UAAU,KACV,OACA,SAKa;CACb,MAAM,gBAAgC,CAAC;CACvC,MAAM,WAA0C,EAC9C,KAAK,OAAO,aAAa;EACvB,MAAM,cAAc,IAAI,GAAG,OAAO,QAAQ;EAC1C,cAAc,KAAK,WAAW;EAC9B,OAAO;CACT,EACF;CAEA,MAAM,WAAW,eAAe,uBAAuB,MAAM,KAAK,CAAC;;;;;;CAOnE,MAAM,eAAe,EAAE,qBAAqC;EAC1D,IAAI,mBAAmB,YACrB,OAAO,SAAS,MAAM,OAAO;EAE/B,OAAO,SAAS,MAAM,UAAU;CAClC;CAKA,SAAS,GAAG,kCAAkC,YAC5C,SAAS,iCAAiC,SAAS,MAAM,UAAU,CAAC,CAAC,UAAU,mBAAmB,KAAK,CAAC,CAAC,OAAO,CAClH;CACA,SAAS,GAAG,gCAAgC,YAC1C,SAAS,+BAA+B,SAAS,MAAM,UAAU,CAAC,CAAC,UAAU,iBAAiB,KAAK,CAAC,CAAC,OAAO,CAC9G;CACA,SAAS,GAAG,2BAA2B,YACrC,SAAS,0BAA0B,SAAS,MAAM,UAAU,CAAC,CAAC,UAAU,aAAa,KAAK,CAAC,CAAC,OAAO,CACrG;CACA,SAAS,GAAG,qCAAqC,YAC/C,S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AC,CAAC,UAAU,sBAAsB,KAAK,CAAC,CAAC,OAAO,CAC9G;CACA,aAAa,cAAc,OAAO,CAAC,CAAC,CAAC,SAAS,gBAAgB,YAAY,CAAC;AAC7E"}
@@ -159,68 +159,66 @@ to {
159
159
  /*
160
160
  Deep styling for customizing Codemirror
161
161
  */
162
- [data-v-2334e03b] .cm-editor {
162
+ [data-v-3e378c54] .cm-editor {
163
163
  height: 100%;
164
164
  outline: none;
165
165
  padding: 0;
166
166
  background: transparent;
167
167
  }
168
- [data-v-2334e03b] .cm-placeholder {
168
+ [data-v-3e378c54] .cm-placeholder {
169
169
  color: var(--scalar-color-3);
170
170
  }
171
- [data-v-2334e03b] .cm-content {
171
+ [data-v-3e378c54] .cm-content {
172
172
  font-family: var(--scalar-font-code);
173
173
  font-size: var(--scalar-small);
174
- max-height: 20px;
175
174
  padding: 8px 0;
176
175
  }
177
176
  /* Tooltip helper */
178
- [data-v-2334e03b] .cm-tooltip {
179
- background: transparent !important;
180
- filter: brightness(var(--scalar-lifted-brightness));
177
+ [data-v-3e378c54] .cm-tooltip {
178
+ background: var(--scalar-background-1) !important;
181
179
  border-radius: var(--scalar-radius);
182
180
  box-shadow: var(--scalar-shadow-2);
183
181
  border: none !important;
184
182
  outline: none !important;
185
183
  overflow: hidden !important;
186
184
  }
187
- [data-v-2334e03b] .cm-tooltip-autocomplete ul li {
185
+ [data-v-3e378c54] .cm-tooltip-autocomplete ul li {
188
186
  padding: 3px 6px !important;
189
187
  }
190
- [data-v-2334e03b] .cm-completionIcon-type:after {
188
+ [data-v-3e378c54] .cm-completionIcon-type:after {
191
189
  color: var(--scalar-color-3) !important;
192
190
  }
193
- [data-v-2334e03b] .cm-tooltip-autocomplete ul li[aria-selected] {
191
+ [data-v-3e378c54] .cm-tooltip-autocomplete ul li[aria-selected] {
194
192
  background: var(--scalar-background-2) !important;
195
193
  color: var(--scalar-color-1) !important;
196
194
  }
197
- [data-v-2334e03b] .cm-tooltip-autocomplete ul {
195
+ [data-v-3e378c54] .cm-tooltip-autocomplete ul {
198
196
  padding: 6px !important;
199
197
  position: relative;
200
198
  }
201
- [data-v-2334e03b] .cm-tooltip-autocomplete ul li:hover {
199
+ [data-v-3e378c54] .cm-tooltip-autocomplete ul li:hover {
202
200
  border-radius: 3px;
203
201
  color: var(--scalar-color-1) !important;
204
202
  background: var(--scalar-background-3) !important;
205
203
  }
206
204
  /* Disable active line highlighting */
207
- [data-v-2334e03b] .cm-activeLine,[data-v-2334e03b] .cm-activeLineGutter {
205
+ [data-v-3e378c54] .cm-activeLine,[data-v-3e378c54] .cm-activeLineGutter {
208
206
  background-color: transparent;
209
207
  }
210
208
  /* Color selection matching */
211
- [data-v-2334e03b] .cm-selectionMatch,[data-v-2334e03b] .cm-matchingBracket {
209
+ [data-v-3e378c54] .cm-selectionMatch,[data-v-3e378c54] .cm-matchingBracket {
212
210
  border-radius: var(--scalar-radius);
213
211
  background: var(--scalar-background-4) !important;
214
212
  }
215
213
  /* Color Picker Swatches */
216
- [data-v-2334e03b] .cm-css-color-picker-wrapper {
214
+ [data-v-3e378c54] .cm-css-color-picker-wrapper {
217
215
  display: inline-flex;
218
216
  outline: 1px solid var(--scalar-background-3);
219
217
  border-radius: 3px;
220
218
  overflow: hidden;
221
219
  }
222
220
  /* Number gutter */
223
- [data-v-2334e03b] .cm-gutters {
221
+ [data-v-3e378c54] .cm-gutters {
224
222
  background-color: transparent;
225
223
  border-right: none;
226
224
  color: var(--scalar-color-3);
@@ -228,7 +226,7 @@ to {
228
226
  line-height: 22px;
229
227
  border-radius: 0 0 0 3px;
230
228
  }
231
- [data-v-2334e03b] .cm-gutters:before {
229
+ [data-v-3e378c54] .cm-gutters:before {
232
230
  content: '';
233
231
  position: absolute;
234
232
  top: 2px;
@@ -238,7 +236,7 @@ to {
238
236
  border-radius: var(--scalar-radius) 0 0 var(--scalar-radius);
239
237
  background-color: var(--scalar-background-1);
240
238
  }
241
- [data-v-2334e03b] .cm-gutterElement {
239
+ [data-v-3e378c54] .cm-gutterElement {
242
240
  font-family: var(--scalar-font-code) !important;
243
241
  padding-left: 0px !important;
244
242
  padding-right: 6px !important;
@@ -247,23 +245,22 @@ to {
247
245
  justify-content: flex-end;
248
246
  position: relative;
249
247
  }
250
- [data-v-2334e03b] .cm-lineNumbers .cm-gutterElement {
248
+ [data-v-3e378c54] .cm-lineNumbers .cm-gutterElement {
251
249
  min-width: fit-content;
252
250
  }
253
- [data-v-2334e03b] .cm-gutter + .cm-gutter :not(.cm-foldGutter) .cm-gutterElement {
251
+ [data-v-3e378c54] .cm-gutter + .cm-gutter :not(.cm-foldGutter) .cm-gutterElement {
254
252
  padding-left: 0 !important;
255
253
  }
256
- [data-v-2334e03b] .cm-scroller {
254
+ [data-v-3e378c54] .cm-scroller {
257
255
  overflow: auto;
258
256
  }
259
- [data-v-2334e03b] .cm-lineWrapping .cm-line {
257
+ [data-v-3e378c54] .cm-lineWrapping .cm-line {
260
258
  word-break: break-all;
261
259
  }
262
- [data-v-2334e03b] .cm-lineWrapping .cm-content {
260
+ [data-v-3e378c54] .cm-content.cm-lineWrapping {
263
261
  white-space: pre-wrap;
264
- max-height: none;
265
262
  }
266
- .line-wrapping[data-v-2334e03b]:focus-within .cm-content {
263
+ .line-wrapping[data-v-3e378c54]:focus-within .cm-content {
267
264
  display: inline-table;
268
265
  min-height: fit-content;
269
266
  padding: 3px 6px;
@@ -432,28 +429,28 @@ to {
432
429
  margin-left: 0.5px;
433
430
  }
434
431
 
435
- [data-v-42eb1913] .cm-content {
432
+ [data-v-65cf6606] .cm-content {
436
433
  font-size: var(--scalar-small);
437
434
  }
438
435
 
439
- [data-v-8e7de9be] .code-input-lite__editor {
436
+ [data-v-ce270af2] .code-input-lite__editor {
440
437
  background-color: transparent;
441
438
  font-family: var(--scalar-font);
442
439
  font-size: var(--scalar-small);
443
440
  padding: 5px 8px;
444
441
  }
445
- [data-v-8e7de9be] .scalar-pill:not(:last-of-type) {
442
+ [data-v-ce270af2] .scalar-pill:not(:last-of-type) {
446
443
  margin-right: 0.15em;
447
444
  }
448
- [data-v-8e7de9be] .scalar-pill:not(:first-of-type) {
445
+ [data-v-ce270af2] .scalar-pill:not(:first-of-type) {
449
446
  margin-left: 0.5px;
450
447
  }
451
448
  /* Tailwind placeholder is busted */
452
- input[data-v-8e7de9be]::placeholder {
449
+ input[data-v-ce270af2]::placeholder {
453
450
  color: var(--scalar-color-3);
454
451
  }
455
452
  /* we want our inputs to look like a password input but not be one */
456
- .scalar-password-input[data-v-8e7de9be] {
453
+ .scalar-password-input[data-v-ce270af2] {
457
454
  text-security: disc;
458
455
  -webkit-text-security: disc;
459
456
  -moz-text-security: disc;
@@ -621,10 +618,10 @@ to {
621
618
  margin-top: 0;
622
619
  }
623
620
 
624
- .address-bar-history-button[data-v-a54819b1]:hover {
621
+ .address-bar-history-button[data-v-04d27531]:hover {
625
622
  background: var(--scalar-background-3);
626
623
  }
627
- .address-bar-history-button[data-v-a54819b1]:focus-within {
624
+ .address-bar-history-button[data-v-04d27531]:focus-within {
628
625
  background: var(--scalar-background-2);
629
626
  }
630
627
 
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "3.21.4",
21
+ "version": "3.22.0",
22
22
  "engines": {
23
23
  "node": ">=22"
24
24
  },
@@ -305,22 +305,22 @@
305
305
  "dependencies": {
306
306
  "@headlessui/tailwindcss": "^0.2.2",
307
307
  "@headlessui/vue": "1.7.23",
308
- "@scalar/blocks": "0.4.3",
309
- "@scalar/components": "0.30.6",
310
- "@scalar/helpers": "0.16.0",
308
+ "@scalar/blocks": "0.5.1",
309
+ "@scalar/components": "0.31.0",
310
+ "@scalar/helpers": "0.16.2",
311
311
  "@scalar/icons": "0.7.6",
312
- "@scalar/localization": "0.2.4",
313
- "@scalar/oas-utils": "0.20.9",
312
+ "@scalar/localization": "0.2.6",
313
+ "@scalar/oas-utils": "0.20.11",
314
314
  "@scalar/openapi-types": "0.9.7",
315
- "@scalar/sidebar": "0.11.11",
316
- "@scalar/snippetz": "0.10.5",
317
- "@scalar/themes": "0.18.1",
315
+ "@scalar/sidebar": "0.11.13",
316
+ "@scalar/snippetz": "0.10.7",
317
+ "@scalar/themes": "0.19.0",
318
318
  "@scalar/typebox": "^0.1.3",
319
- "@scalar/types": "0.22.4",
319
+ "@scalar/types": "0.23.1",
320
320
  "@scalar/use-codemirror": "0.14.15",
321
- "@scalar/use-hooks": "0.4.17",
321
+ "@scalar/use-hooks": "0.4.19",
322
322
  "@scalar/use-toasts": "0.10.5",
323
- "@scalar/workspace-store": "0.68.0",
323
+ "@scalar/workspace-store": "0.68.2",
324
324
  "@vueuse/core": "13.9.0",
325
325
  "@vueuse/integrations": "13.9.0",
326
326
  "focus-trap": "^7.8.0",