@scalar/api-client 3.23.6 → 3.25.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 (124) hide show
  1. package/CHANGELOG.md +27 -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 +97 -69
  6. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  7. package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -1
  8. package/dist/v2/blocks/operation-block/OperationBlock.vue_vue_type_script_setup_true_lang.js +2 -0
  9. package/dist/v2/blocks/operation-block/OperationBlock.vue_vue_type_script_setup_true_lang.js.map +1 -1
  10. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.d.ts.map +1 -1
  11. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js +1 -1
  12. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js.map +1 -1
  13. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue_vue_type_script_setup_true_lang.js +10 -7
  14. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  15. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +4 -0
  16. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -1
  17. package/dist/v2/blocks/operation-block/helpers/send-request.js +36 -23
  18. package/dist/v2/blocks/operation-block/helpers/send-request.js.map +1 -1
  19. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +2 -0
  20. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  21. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  22. package/dist/v2/blocks/request-block/RequestBlock.vue.js.map +1 -1
  23. package/dist/v2/blocks/request-block/RequestBlock.vue_vue_type_script_setup_true_lang.js +15 -0
  24. package/dist/v2/blocks/request-block/RequestBlock.vue_vue_type_script_setup_true_lang.js.map +1 -1
  25. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +8 -2
  26. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  27. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +1 -1
  28. package/dist/v2/blocks/request-block/components/RequestBody.vue.js.map +1 -1
  29. package/dist/v2/blocks/request-block/components/RequestBody.vue_vue_type_script_setup_true_lang.js +88 -31
  30. package/dist/v2/blocks/request-block/components/RequestBody.vue_vue_type_script_setup_true_lang.js.map +1 -1
  31. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts +3 -1
  32. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts.map +1 -1
  33. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js.map +1 -1
  34. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue_vue_type_script_setup_true_lang.js +20 -5
  35. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue_vue_type_script_setup_true_lang.js.map +1 -1
  36. package/dist/v2/blocks/request-block/components/RequestBodyMultipart.vue.d.ts +15 -0
  37. package/dist/v2/blocks/request-block/components/RequestBodyMultipart.vue.d.ts.map +1 -0
  38. package/dist/v2/blocks/request-block/components/RequestBodyMultipart.vue.js +7 -0
  39. package/dist/v2/blocks/request-block/components/RequestBodyMultipart.vue.js.map +1 -0
  40. package/dist/v2/blocks/request-block/components/RequestBodyMultipart.vue_vue_type_script_setup_true_lang.js +156 -0
  41. package/dist/v2/blocks/request-block/components/RequestBodyMultipart.vue_vue_type_script_setup_true_lang.js.map +1 -0
  42. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -0
  43. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  44. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +1 -1
  45. package/dist/v2/blocks/request-block/components/RequestTable.vue.js.map +1 -1
  46. package/dist/v2/blocks/request-block/components/RequestTable.vue_vue_type_script_setup_true_lang.js +6 -0
  47. package/dist/v2/blocks/request-block/components/RequestTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  48. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +4 -0
  49. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  50. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js.map +1 -1
  51. package/dist/v2/blocks/request-block/components/RequestTableRow.vue_vue_type_script_setup_true_lang.js +10 -3
  52. package/dist/v2/blocks/request-block/components/RequestTableRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
  53. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +2 -2
  54. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts.map +1 -1
  55. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +8 -4
  56. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js.map +1 -1
  57. package/dist/v2/blocks/request-block/helpers/multipart-body.d.ts +18 -0
  58. package/dist/v2/blocks/request-block/helpers/multipart-body.d.ts.map +1 -0
  59. package/dist/v2/blocks/request-block/helpers/multipart-body.js +80 -0
  60. package/dist/v2/blocks/request-block/helpers/multipart-body.js.map +1 -0
  61. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +2 -0
  62. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  63. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js.map +1 -1
  64. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue_vue_type_script_setup_true_lang.js +12 -4
  65. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue_vue_type_script_setup_true_lang.js.map +1 -1
  66. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts +2 -2
  67. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -1
  68. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js.map +1 -1
  69. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue_vue_type_script_setup_true_lang.js +2 -0
  70. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  71. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +2 -0
  72. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  73. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js.map +1 -1
  74. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue_vue_type_script_setup_true_lang.js +2 -1
  75. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  76. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +1 -1
  77. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
  78. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +6 -2
  79. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js.map +1 -1
  80. package/dist/v2/constants.js +1 -1
  81. package/dist/v2/features/localization/locales/ar.d.ts +5 -0
  82. package/dist/v2/features/localization/locales/ar.d.ts.map +1 -1
  83. package/dist/v2/features/localization/locales/ar.js +5 -0
  84. package/dist/v2/features/localization/locales/ar.js.map +1 -1
  85. package/dist/v2/features/localization/locales/de.d.ts +5 -0
  86. package/dist/v2/features/localization/locales/de.d.ts.map +1 -1
  87. package/dist/v2/features/localization/locales/de.js +5 -0
  88. package/dist/v2/features/localization/locales/de.js.map +1 -1
  89. package/dist/v2/features/localization/locales/es.d.ts +5 -0
  90. package/dist/v2/features/localization/locales/es.d.ts.map +1 -1
  91. package/dist/v2/features/localization/locales/es.js +5 -0
  92. package/dist/v2/features/localization/locales/es.js.map +1 -1
  93. package/dist/v2/features/localization/locales/fr.d.ts +5 -0
  94. package/dist/v2/features/localization/locales/fr.d.ts.map +1 -1
  95. package/dist/v2/features/localization/locales/fr.js +5 -0
  96. package/dist/v2/features/localization/locales/fr.js.map +1 -1
  97. package/dist/v2/features/localization/locales/pt.d.ts +5 -0
  98. package/dist/v2/features/localization/locales/pt.d.ts.map +1 -1
  99. package/dist/v2/features/localization/locales/pt.js +5 -0
  100. package/dist/v2/features/localization/locales/pt.js.map +1 -1
  101. package/dist/v2/features/localization/locales/ru.d.ts +5 -0
  102. package/dist/v2/features/localization/locales/ru.d.ts.map +1 -1
  103. package/dist/v2/features/localization/locales/ru.js +5 -0
  104. package/dist/v2/features/localization/locales/ru.js.map +1 -1
  105. package/dist/v2/features/localization/locales/zh-cn.d.ts +5 -0
  106. package/dist/v2/features/localization/locales/zh-cn.d.ts.map +1 -1
  107. package/dist/v2/features/localization/locales/zh-cn.js +5 -0
  108. package/dist/v2/features/localization/locales/zh-cn.js.map +1 -1
  109. package/dist/v2/features/localization/locales/zh-tw.d.ts +5 -0
  110. package/dist/v2/features/localization/locales/zh-tw.d.ts.map +1 -1
  111. package/dist/v2/features/localization/locales/zh-tw.js +5 -0
  112. package/dist/v2/features/localization/locales/zh-tw.js.map +1 -1
  113. package/dist/v2/features/localization/translations.d.ts +5 -0
  114. package/dist/v2/features/localization/translations.d.ts.map +1 -1
  115. package/dist/v2/features/localization/translations.js +5 -0
  116. package/dist/v2/features/localization/translations.js.map +1 -1
  117. package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts.map +1 -1
  118. package/dist/v2/features/modal/helpers/resolve-route-parameters.js +2 -1
  119. package/dist/v2/features/modal/helpers/resolve-route-parameters.js.map +1 -1
  120. package/dist/v2/workspace-events.d.ts.map +1 -1
  121. package/dist/v2/workspace-events.js +1 -0
  122. package/dist/v2/workspace-events.js.map +1 -1
  123. package/dist/vue-styles.css +12 -12
  124. package/package.json +15 -18
@@ -1 +1 @@
1
- {"version":3,"file":"zh-tw.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/localization/locales/zh-tw.ts"],"names":[],"mappings":"AAEA,kDAAkD;AAClD,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8YgB,CAAA"}
1
+ {"version":3,"file":"zh-tw.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/localization/locales/zh-tw.ts"],"names":[],"mappings":"AAEA,kDAAkD;AAClD,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoZgB,CAAA"}
@@ -70,6 +70,11 @@ var zhTw = {
70
70
  },
71
71
  "openApiClientButton": { "openAPIClient": "開啟 API 用戶端" },
72
72
  "requestBody": {
73
+ "part": "部分 {number}",
74
+ "addPart": "新增部分",
75
+ "invalidPart": "請為此部分輸入有效的 JSON。",
76
+ "restoreOriginalBody": "還原原始請求主體",
77
+ "createExampleFromSchema": "根據結構描述建立範例",
73
78
  "noBody": "無請求主體",
74
79
  "delete": "刪除",
75
80
  "selectFile": "選擇檔案",
@@ -1 +1 @@
1
- {"version":3,"file":"zh-tw.js","names":[],"sources":["../../../../../src/v2/features/localization/locales/zh-tw.ts"],"sourcesContent":["import type { ApiClientTranslations } from '@scalar/types/api-reference'\n\n/** Built-in API Client translations for zh-TW. */\nexport const zhTw = {\n 'serverVariablesSelect': {\n 'selected': '已選擇:',\n },\n 'serverVariablesTextbox': {\n 'value': '值',\n },\n 'sidebarListElementForm': {\n 'cancel': '取消',\n },\n 'requestBlock': {\n 'authentication': '身分驗證',\n 'variables': '變數',\n 'cookies': 'Cookie',\n 'headers': '請求標頭',\n 'queryParameters': '查詢參數',\n 'queryString': '查詢字串',\n 'queryStringDescription':\n '此參數提供完整的查詢字串,因此無法新增其他命名參數。現有命名參數將在其後傳送;重複的鍵會被保留。',\n 'requestBody': '請求主體',\n 'requestName': '請求名稱',\n 'label': '請求:{name}',\n },\n 'responseBlock': {\n 'requestFailed': '請求失敗',\n 'networkErrorHelp':\n '可能的原因包括 CORS 限制或網路連線問題。請查看瀏覽器主控台以瞭解詳細資訊。如果 CORS 阻止了請求,請設定 API 伺服器以允許此來源,或使用可信任的代理伺服器。',\n 'response': '回應',\n 'requestHeaders': '請求標頭',\n 'responseHeaders': '回應標頭',\n 'body': '主體',\n },\n 'codeInput': {\n 'required': '必填',\n 'exitHint': '按 {escape},然後按 {tab} 離開',\n },\n 'codeInputLite': {\n 'required': '必填',\n },\n 'dataTableInput': {\n 'clearValue': '清除值',\n 'resetValue': '恢復預設值',\n 'showPassword': '顯示密碼',\n 'hidePassword': '隱藏密碼',\n },\n 'dataTableInputSelect': {\n 'value': '值',\n 'addValue': '新增值',\n },\n 'confirmationForm': {\n 'cancel': '取消',\n 'save': '儲存',\n },\n 'collapsibleSection': {\n 'collapsed': '(已摺疊)',\n 'item': '項',\n 'items': '項',\n },\n 'modalClientContainer': {\n 'label': 'API 用戶端',\n },\n 'serverDropdown': {\n 'server': '伺服器:',\n 'addServer': '新增伺服器',\n 'updateServers': '更新伺服器',\n 'unknownServer': '未知伺服器',\n },\n 'sidebar': {\n 'search': '搜尋',\n },\n 'sidebarMenu': {\n 'settings': '設定',\n },\n 'sidebarToggle': {\n 'hide': '隱藏側邊欄',\n 'show': '顯示側邊欄',\n },\n 'environmentsList': {\n 'addEnvironment': '新增環境',\n },\n 'modal': {\n 'noDocumentSelected': '未選擇文件',\n },\n 'operation': {\n 'selectAnOperationToViewDetails': '選擇一個操作以檢視詳細資訊',\n },\n 'header': {\n 'operationSettings': '操作設定',\n 'closeClient': '關閉用戶端',\n },\n 'openApiClientButton': {\n 'openAPIClient': '開啟 API 用戶端',\n },\n 'requestBody': {\n 'noBody': '無請求主體',\n 'delete': '刪除',\n 'selectFile': '選擇檔案',\n 'multipartForm': '多部分表單',\n 'formUrlEncoded': 'URL 編碼表單',\n 'binaryFile': '二進位檔案',\n 'other': '其他',\n 'none': '無',\n },\n 'requestBodyStructured': {\n 'body': '主體',\n },\n 'requestBodyViewToggle': {\n 'schema': '結構描述',\n 'form': '表單',\n 'raw': '原始內容',\n 'fixBody': '修正請求主體以切換到表單檢視',\n },\n 'requestCodeSnippet': {\n unavailable: '此範例沒有可用的程式碼範例。',\n 'codeSnippet': '程式碼片段',\n },\n 'requestTable': {\n 'enabled': '已啟用',\n 'key': '鍵',\n 'value': '值',\n },\n 'requestTableRow': {\n 'key': '鍵',\n 'value': '值',\n 'delete': '刪除',\n 'selectFile': '選擇檔案',\n 'globalCookieHint': '全域 Cookie 在整個工作區中共用。點擊前往檢視。',\n 'readOnlyHint': '此屬性為唯讀。若要更改,請覆蓋該屬性或透過核取方塊停用它。',\n 'include': '在請求中包含 {name}',\n 'keyLabel': '{name} 的鍵',\n 'valueLabel': '{name} 的值',\n 'deleteRow': '刪除 {name}',\n 'row': '列',\n },\n 'requestTableTooltip': {\n 'min': '最小值:',\n 'max': '最大值:',\n 'default': '預設值:',\n 'invalid': '輸入無效',\n 'moreInformation': '更多資訊',\n },\n 'headers': {\n 'headerKey': '標頭鍵',\n 'headerValue': '標頭值',\n 'noHeaders': '無標頭',\n },\n 'responseBody': {\n 'binaryFile': '二進位檔案',\n },\n 'responseBodyPreview': {\n 'previewUnavailable': '無法預覽',\n },\n 'responseBodyStreaming': {\n 'body': '主體',\n 'listening': '正在監聽…',\n 'cancel': '取消',\n },\n 'responseBodyToggle': {\n 'preview': '預覽',\n 'raw': '原始內容',\n },\n 'responseBodyVirtual': {\n 'body': '主體',\n 'largeBodyHint': '此回應主體過大,無法進行語法醒目提示。',\n },\n 'responseCookies': {\n 'cookies': 'Cookie',\n 'cookieName': 'Cookie 名稱',\n 'cookieValue': 'Cookie 值',\n 'noCookies': '無 Cookie',\n },\n 'responseEmpty': {\n 'roadmap': '路線圖',\n 'poweredByScalarcom': '由 Scalar.com 提供支援',\n 'getStarted': '開始使用',\n 'newRequest': '新增請求',\n 'sendRequest': '傳送請求',\n 'version': 'Scalar App V{version} 測試版',\n },\n 'responseLoadingOverlay': {\n 'cancel': '取消',\n },\n 'addressBar': {\n 'path': '路徑',\n 'copyUrl': '複製 URL',\n 'send': '傳送',\n 'sendRequest': '向 {url} 傳送 {method} 請求',\n 'duplicateRequest': '此文件中已存在發往 {path} 的 {method} 請求',\n 'urlPlaceholder': '輸入 URL',\n 'webhookUrlPlaceholder': '輸入完整的 Webhook URL,例如 https://example.com/hook',\n },\n 'addressBarHistory': {\n 'requestHistory': '請求歷史',\n },\n 'environmentSelector': {\n 'noEnvironment': '無環境',\n 'notAvailableInThisContext': '在此情境中不可用',\n 'environmentHint': '環境可幫助您管理不同情境中的變數,例如 API 金鑰和基底 URL。',\n 'add': '新增環境',\n 'select': '選擇環境',\n 'unavailable': '{name}(不可用)',\n 'current': '目前環境:{name}',\n },\n 'deleteRequestAuthModal': {\n 'deleteSecurityScheme': '刪除安全方案',\n 'cancel': '取消',\n 'delete': '刪除',\n 'confirmation': '此操作無法復原。您即將從集合中刪除安全方案 {name}。',\n },\n 'oauth2': {\n deviceAuthorizationUrl: '裝置授權 URL',\n deviceVerificationPrompt: '開啟驗證頁面並輸入此驗證碼:',\n waitingForAuthorization: '正在等待授權…',\n cancelDeviceAuthorization: '取消',\n\n 'accessToken': '存取權杖',\n 'refreshUrl': '更新 URL',\n 'refresh': '更新',\n 'authUrl': '身分驗證 URL',\n 'tokenUrl': '權杖 URL',\n 'redirectUrl': '重新導向 URL',\n 'username': '使用者名稱',\n 'password': '密碼',\n 'clientID': '用戶端 ID',\n 'clientSecret': '用戶端金鑰',\n 'usePKCE': '使用 PKCE',\n 'credentialsLocation': '認證資訊位置',\n 'authorize': '授權',\n 'clear': '清除',\n 'failedToauthorize': '授權失敗',\n 'failedToRefreshToken': '更新權杖失敗',\n 'optionalRedirectUrl': '選填的重新導向 URL',\n 'clearTokens': '清除權杖',\n 'resetDiscovery': '重設探索',\n },\n 'oauthScopesAddModal': {\n 'name': '名稱:',\n 'description': '描述:',\n 'readUserData': '讀取使用者資料',\n 'edit': '編輯權限範圍',\n 'add': '新增權限範圍',\n 'save': '儲存',\n 'required': '權限範圍名稱為必填項。',\n 'duplicate': '名為「{name}」的權限範圍已存在。',\n },\n 'oauthScopesInput': {\n 'noScopesDefined': '尚未定義權限範圍',\n 'addScope': '新增權限範圍',\n 'deselectAll': '取消全選',\n 'selectAll': '全選',\n 'selectedScopes': '已選權限範圍:{count} / {total}',\n 'editScope': '編輯 {name}',\n 'deleteScope': '刪除 {name}',\n 'selectScope': '選擇權限範圍 {name}',\n },\n 'openIdConnect': {\n 'discoveryUrl': '探索 URL',\n 'fetchConfiguration': '取得設定',\n 'failedToFetchConfiguration': '取得 OpenID Connect 設定失敗',\n },\n 'requestAuthDataTable': {\n 'noauthenticationSelected': '未選擇身分驗證',\n },\n 'requestAuthTab': {\n 'token': '權杖',\n 'bearerToken': 'Bearer 權杖',\n 'getAToken': '取得權杖',\n 'refresh': '更新',\n 'username': '使用者名稱',\n 'password': '密碼',\n 'name': '名稱',\n 'value': '值',\n 'cancel': '取消',\n 'authorize': '授權',\n 'unsupportedCredentials': '瀏覽器用戶端不會傳送此 AsyncAPI 安全方案的認證資訊。',\n 'authorizeVia': '透過 {name} 授權',\n 'unsupportedType': '暫不支援 {type} 類型的安全方案。',\n 'missingType': '安全方案缺少類型,請檢查您的 {type} 文件或身分驗證設定。',\n 'failedToauthorize': '授權失敗',\n 'failedToRefresh': '更新失敗',\n 'configure': '設定 {name}',\n 'mutualTlsHint': '雙向 TLS 透過在 TLS 握手期間提供用戶端憑證來進行身分驗證,因此無需在此輸入任何內容。',\n },\n 'commandActionForm': {\n 'continue': '繼續',\n },\n 'environment': {\n 'thisIsTheActiveEnvironment': '這是目前啟用的環境',\n 'active': '已啟用',\n 'editEnvironment': '編輯環境',\n 'deleteEnvironment': '刪除環境',\n },\n 'environmentCreateModal': {\n 'environmentName': '環境名稱',\n 'thisEnvironmentNameIsAlreadyInUse': '此環境名稱已被使用。',\n 'update': '更新環境',\n 'add': '新增環境',\n },\n 'environmentDeleteModal': {\n 'cancel': '取消',\n 'deleteEnvironment': '刪除環境',\n 'deleteConfirmation': '確定要刪除此環境嗎?此操作無法復原。',\n 'title': '刪除 {name}',\n },\n 'environmentVariablesDropdown': {\n 'variableSuggestions': '變數建議',\n 'addVariable': '新增變數',\n },\n 'environmentVariablesTable': {\n 'name': '名稱',\n 'value': '值',\n 'actions': '操作',\n 'environmentVariableName': '環境變數名稱',\n 'environmentVariableValue': '環境變數值',\n },\n 'documentSearchModal': {\n 'documentSearch': '文件搜尋',\n 'documentSearchResults': '文件搜尋結果',\n 'navigate': '↑↓ 導覽',\n 'select': '⏎ 選擇',\n 'keyboardInstructions': '按上箭頭或下箭頭導覽,按 Enter 選擇,輸入文字篩選結果',\n },\n 'searchResult': {\n 'httpMethod': 'HTTP 方法:',\n 'path': '路徑:',\n 'description': '描述:',\n 'heading': '標題',\n 'operation': '操作',\n 'tag': '標籤',\n },\n 'sectionFilter': {\n 'all': '全部',\n 'auth': '身分驗證',\n 'variables': '變數',\n 'cookies': 'Cookie',\n 'headers': '標頭',\n 'query': '查詢',\n 'body': '主體',\n },\n 'requestParams': {\n 'addParameter': '新增參數',\n 'searchParameters': '搜尋參數',\n 'noParametersFound': '沒有符合的參數',\n 'clearAll': '清除所有{title}',\n 'clear': '清除',\n 'clearOptionalParameters': '清除選填參數',\n },\n 'responseBodyDownload': {\n 'download': '下載回應主體',\n 'label': '下載',\n 'body': '回應主體',\n },\n 'responseMetaInformation': {\n 'duration': '回應資訊,耗時:',\n 'size': ',大小:',\n 'status': ',狀態:',\n },\n 'authSelector': {\n 'selectedType': '已選身分驗證類型:{type}',\n 'multipleTypes': '已選擇多個身分驗證類型',\n 'selectType': '選擇身分驗證類型',\n 'optional': '選用',\n 'required': '必填',\n 'deleteScheme': '刪除 {name}',\n 'requiredGroup': '必要的身分驗證',\n 'availableGroup': '可用的身分驗證',\n 'addGroup': '新增身分驗證',\n },\n 'operationBlock': {\n 'webhookUrlRequired': 'Webhook URL 為必填項。請先輸入目標位址。',\n 'pathParametersRequired': '路徑參數必須有值。',\n 'forbiddenMethod': 'Fetch API 無法傳送 {method} 請求。',\n },\n 'dataTableCheckbox': {\n 'toggle': '切換',\n },\n 'pillTooltipHost': {\n 'computedAtExecution': '在執行請求時計算',\n 'noValue': '無值',\n },\n 'authOptions': {\n oauth2DeviceAuthorization: 'OAuth2 裝置授權',\n 'apiKeyCookie': 'Cookie 中的 API 金鑰',\n 'apiKeyHeader': '請求標頭中的 API 金鑰',\n 'apiKeyQuery': '查詢參數中的 API 金鑰',\n 'httpBasic': 'HTTP Basic',\n 'httpBearer': 'HTTP Bearer',\n 'oauth2Implicit': 'OAuth2 隱式流程',\n 'oauth2Password': 'OAuth2 密碼流程',\n 'oauth2ClientCredentials': 'OAuth2 用戶端認證資訊',\n 'oauth2AuthorizationFlow': 'OAuth2 授權碼',\n },\n 'deleteSidebarListElement': {\n 'delete': '刪除 {name}',\n },\n 'deleteModal': {\n 'delete': '刪除 {name}',\n },\n} satisfies ApiClientTranslations\n"],"mappings":";;AAGA,IAAa,OAAO;CAClB,yBAAyB,EACvB,YAAY,OACd;CACA,0BAA0B,EACxB,SAAS,IACX;CACA,0BAA0B,EACxB,UAAU,KACZ;CACA,gBAAgB;EACd,kBAAkB;EAClB,aAAa;EACb,WAAW;EACX,WAAW;EACX,mBAAmB;EACnB,eAAe;EACf,0BACE;EACF,eAAe;EACf,eAAe;EACf,SAAS;CACX;CACA,iBAAiB;EACf,iBAAiB;EACjB,oBACE;EACF,YAAY;EACZ,kBAAkB;EAClB,mBAAmB;EACnB,QAAQ;CACV;CACA,aAAa;EACX,YAAY;EACZ,YAAY;CACd;CACA,iBAAiB,EACf,YAAY,KACd;CACA,kBAAkB;EAChB,cAAc;EACd,cAAc;EACd,gBAAgB;EAChB,gBAAgB;CAClB;CACA,wBAAwB;EACtB,SAAS;EACT,YAAY;CACd;CACA,oBAAoB;EAClB,UAAU;EACV,QAAQ;CACV;CACA,sBAAsB;EACpB,aAAa;EACb,QAAQ;EACR,SAAS;CACX;CACA,wBAAwB,EACtB,SAAS,UACX;CACA,kBAAkB;EAChB,UAAU;EACV,aAAa;EACb,iBAAiB;EACjB,iBAAiB;CACnB;CACA,WAAW,EACT,UAAU,KACZ;CACA,eAAe,EACb,YAAY,KACd;CACA,iBAAiB;EACf,QAAQ;EACR,QAAQ;CACV;CACA,oBAAoB,EAClB,kBAAkB,OACpB;CACA,SAAS,EACP,sBAAsB,QACxB;CACA,aAAa,EACX,kCAAkC,gBACpC;CACA,UAAU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gC;EAC9B,uBAAuB;EACvB,eAAe;CACjB;CACA,6BAA6B;EAC3B,QAAQ;EACR,SAAS;EACT,WAAW;EACX,2BAA2B;EAC3B,4BAA4B;CAC9B;CACA,uBAAuB;EACrB,kBAAkB;EAClB,yBAAyB;EACzB,YAAY;EACZ,UAAU;EACV,wBAAwB;CAC1B;CACA,gBAAgB;EACd,cAAc;EACd,QAAQ;EACR,eAAe;EACf,WAAW;EACX,aAAa;EACb,OAAO;CACT;CACA,iBAAiB;EACf,OAAO;EACP,QAAQ;EACR,aAAa;EACb,WAAW;EACX,WAAW;EACX,SAAS;EACT,QAAQ;CACV;CACA,iBAAiB;EACf,gBAAgB;EAChB,oBAAoB;EACpB,qBAAqB;EACrB,YAAY;EACZ,SAAS;EACT,2BAA2B;CAC7B;CACA,wBAAwB;EACtB,YAAY;EACZ,SAAS;EACT,QAAQ;CACV;CACA,2BAA2B;EACzB,YAAY;EACZ,QAAQ;EACR,UAAU;CACZ;CACA,gBAAgB;EACd,gBAAgB;EAChB,iBAAiB;EACjB,cAAc;EACd,YAAY;EACZ,YAAY;EACZ,gBAAgB;EAChB,iBAAiB;EACjB,kBAAkB;EAClB,YAAY;CACd;CACA,kBAAkB;EAChB,sBAAsB;EACtB,0BAA0B;EAC1B,mBAAmB;CACrB;CACA,qBAAqB,EACnB,UAAU,KACZ;CACA,mBAAmB;EACjB,uBAAuB;EACvB,WAAW;CACb;CACA,eAAe;EACb,2BAA2B;EAC3B,gBAAgB;EAChB,gBAAgB;EAChB,eAAe;EACf,aAAa;EACb,cAAc;EACd,kBAAkB;EAClB,kBAAkB;EAClB,2BAA2B;EAC3B,2BAA2B;CAC7B;CACA,4BAA4B,EAC1B,UAAU,YACZ;CACA,eAAe,EACb,UAAU,YACZ;AACF"}
1
+ {"version":3,"file":"zh-tw.js","names":[],"sources":["../../../../../src/v2/features/localization/locales/zh-tw.ts"],"sourcesContent":["import type { ApiClientTranslations } from '@scalar/types/api-reference'\n\n/** Built-in API Client translations for zh-TW. */\nexport const zhTw = {\n 'serverVariablesSelect': {\n 'selected': '已選擇:',\n },\n 'serverVariablesTextbox': {\n 'value': '值',\n },\n 'sidebarListElementForm': {\n 'cancel': '取消',\n },\n 'requestBlock': {\n 'authentication': '身分驗證',\n 'variables': '變數',\n 'cookies': 'Cookie',\n 'headers': '請求標頭',\n 'queryParameters': '查詢參數',\n 'queryString': '查詢字串',\n 'queryStringDescription':\n '此參數提供完整的查詢字串,因此無法新增其他命名參數。現有命名參數將在其後傳送;重複的鍵會被保留。',\n 'requestBody': '請求主體',\n 'requestName': '請求名稱',\n 'label': '請求:{name}',\n },\n 'responseBlock': {\n 'requestFailed': '請求失敗',\n 'networkErrorHelp':\n '可能的原因包括 CORS 限制或網路連線問題。請查看瀏覽器主控台以瞭解詳細資訊。如果 CORS 阻止了請求,請設定 API 伺服器以允許此來源,或使用可信任的代理伺服器。',\n 'response': '回應',\n 'requestHeaders': '請求標頭',\n 'responseHeaders': '回應標頭',\n 'body': '主體',\n },\n 'codeInput': {\n 'required': '必填',\n 'exitHint': '按 {escape},然後按 {tab} 離開',\n },\n 'codeInputLite': {\n 'required': '必填',\n },\n 'dataTableInput': {\n 'clearValue': '清除值',\n 'resetValue': '恢復預設值',\n 'showPassword': '顯示密碼',\n 'hidePassword': '隱藏密碼',\n },\n 'dataTableInputSelect': {\n 'value': '值',\n 'addValue': '新增值',\n },\n 'confirmationForm': {\n 'cancel': '取消',\n 'save': '儲存',\n },\n 'collapsibleSection': {\n 'collapsed': '(已摺疊)',\n 'item': '項',\n 'items': '項',\n },\n 'modalClientContainer': {\n 'label': 'API 用戶端',\n },\n 'serverDropdown': {\n 'server': '伺服器:',\n 'addServer': '新增伺服器',\n 'updateServers': '更新伺服器',\n 'unknownServer': '未知伺服器',\n },\n 'sidebar': {\n 'search': '搜尋',\n },\n 'sidebarMenu': {\n 'settings': '設定',\n },\n 'sidebarToggle': {\n 'hide': '隱藏側邊欄',\n 'show': '顯示側邊欄',\n },\n 'environmentsList': {\n 'addEnvironment': '新增環境',\n },\n 'modal': {\n 'noDocumentSelected': '未選擇文件',\n },\n 'operation': {\n 'selectAnOperationToViewDetails': '選擇一個操作以檢視詳細資訊',\n },\n 'header': {\n 'operationSettings': '操作設定',\n 'closeClient': '關閉用戶端',\n },\n 'openApiClientButton': {\n 'openAPIClient': '開啟 API 用戶端',\n },\n 'requestBody': {\n 'part': '部分 {number}',\n 'addPart': '新增部分',\n 'invalidPart': '請為此部分輸入有效的 JSON。',\n\n 'restoreOriginalBody': '還原原始請求主體',\n 'createExampleFromSchema': '根據結構描述建立範例',\n 'noBody': '無請求主體',\n 'delete': '刪除',\n 'selectFile': '選擇檔案',\n 'multipartForm': '多部分表單',\n 'formUrlEncoded': 'URL 編碼表單',\n 'binaryFile': '二進位檔案',\n 'other': '其他',\n 'none': '無',\n },\n 'requestBodyStructured': {\n 'body': '主體',\n },\n 'requestBodyViewToggle': {\n 'schema': '結構描述',\n 'form': '表單',\n 'raw': '原始內容',\n 'fixBody': '修正請求主體以切換到表單檢視',\n },\n 'requestCodeSnippet': {\n unavailable: '此範例沒有可用的程式碼範例。',\n 'codeSnippet': '程式碼片段',\n },\n 'requestTable': {\n 'enabled': '已啟用',\n 'key': '鍵',\n 'value': '值',\n },\n 'requestTableRow': {\n 'key': '鍵',\n 'value': '值',\n 'delete': '刪除',\n 'selectFile': '選擇檔案',\n 'globalCookieHint': '全域 Cookie 在整個工作區中共用。點擊前往檢視。',\n 'readOnlyHint': '此屬性為唯讀。若要更改,請覆蓋該屬性或透過核取方塊停用它。',\n 'include': '在請求中包含 {name}',\n 'keyLabel': '{name} 的鍵',\n 'valueLabel': '{name} 的值',\n 'deleteRow': '刪除 {name}',\n 'row': '列',\n },\n 'requestTableTooltip': {\n 'min': '最小值:',\n 'max': '最大值:',\n 'default': '預設值:',\n 'invalid': '輸入無效',\n 'moreInformation': '更多資訊',\n },\n 'headers': {\n 'headerKey': '標頭鍵',\n 'headerValue': '標頭值',\n 'noHeaders': '無標頭',\n },\n 'responseBody': {\n 'binaryFile': '二進位檔案',\n },\n 'responseBodyPreview': {\n 'previewUnavailable': '無法預覽',\n },\n 'responseBodyStreaming': {\n 'body': '主體',\n 'listening': '正在監聽…',\n 'cancel': '取消',\n },\n 'responseBodyToggle': {\n 'preview': '預覽',\n 'raw': '原始內容',\n },\n 'responseBodyVirtual': {\n 'body': '主體',\n 'largeBodyHint': '此回應主體過大,無法進行語法醒目提示。',\n },\n 'responseCookies': {\n 'cookies': 'Cookie',\n 'cookieName': 'Cookie 名稱',\n 'cookieValue': 'Cookie 值',\n 'noCookies': '無 Cookie',\n },\n 'responseEmpty': {\n 'roadmap': '路線圖',\n 'poweredByScalarcom': '由 Scalar.com 提供支援',\n 'getStarted': '開始使用',\n 'newRequest': '新增請求',\n 'sendRequest': '傳送請求',\n 'version': 'Scalar App V{version} 測試版',\n },\n 'responseLoadingOverlay': {\n 'cancel': '取消',\n },\n 'addressBar': {\n 'path': '路徑',\n 'copyUrl': '複製 URL',\n 'send': '傳送',\n 'sendRequest': '向 {url} 傳送 {method} 請求',\n 'duplicateRequest': '此文件中已存在發往 {path} 的 {method} 請求',\n 'urlPlaceholder': '輸入 URL',\n 'webhookUrlPlaceholder': '輸入完整的 Webhook URL,例如 https://example.com/hook',\n },\n 'addressBarHistory': {\n 'requestHistory': '請求歷史',\n },\n 'environmentSelector': {\n 'noEnvironment': '無環境',\n 'notAvailableInThisContext': '在此情境中不可用',\n 'environmentHint': '環境可幫助您管理不同情境中的變數,例如 API 金鑰和基底 URL。',\n 'add': '新增環境',\n 'select': '選擇環境',\n 'unavailable': '{name}(不可用)',\n 'current': '目前環境:{name}',\n },\n 'deleteRequestAuthModal': {\n 'deleteSecurityScheme': '刪除安全方案',\n 'cancel': '取消',\n 'delete': '刪除',\n 'confirmation': '此操作無法復原。您即將從集合中刪除安全方案 {name}。',\n },\n 'oauth2': {\n deviceAuthorizationUrl: '裝置授權 URL',\n deviceVerificationPrompt: '開啟驗證頁面並輸入此驗證碼:',\n waitingForAuthorization: '正在等待授權…',\n cancelDeviceAuthorization: '取消',\n\n 'accessToken': '存取權杖',\n 'refreshUrl': '更新 URL',\n 'refresh': '更新',\n 'authUrl': '身分驗證 URL',\n 'tokenUrl': '權杖 URL',\n 'redirectUrl': '重新導向 URL',\n 'username': '使用者名稱',\n 'password': '密碼',\n 'clientID': '用戶端 ID',\n 'clientSecret': '用戶端金鑰',\n 'usePKCE': '使用 PKCE',\n 'credentialsLocation': '認證資訊位置',\n 'authorize': '授權',\n 'clear': '清除',\n 'failedToauthorize': '授權失敗',\n 'failedToRefreshToken': '更新權杖失敗',\n 'optionalRedirectUrl': '選填的重新導向 URL',\n 'clearTokens': '清除權杖',\n 'resetDiscovery': '重設探索',\n },\n 'oauthScopesAddModal': {\n 'name': '名稱:',\n 'description': '描述:',\n 'readUserData': '讀取使用者資料',\n 'edit': '編輯權限範圍',\n 'add': '新增權限範圍',\n 'save': '儲存',\n 'required': '權限範圍名稱為必填項。',\n 'duplicate': '名為「{name}」的權限範圍已存在。',\n },\n 'oauthScopesInput': {\n 'noScopesDefined': '尚未定義權限範圍',\n 'addScope': '新增權限範圍',\n 'deselectAll': '取消全選',\n 'selectAll': '全選',\n 'selectedScopes': '已選權限範圍:{count} / {total}',\n 'editScope': '編輯 {name}',\n 'deleteScope': '刪除 {name}',\n 'selectScope': '選擇權限範圍 {name}',\n },\n 'openIdConnect': {\n 'discoveryUrl': '探索 URL',\n 'fetchConfiguration': '取得設定',\n 'failedToFetchConfiguration': '取得 OpenID Connect 設定失敗',\n },\n 'requestAuthDataTable': {\n 'noauthenticationSelected': '未選擇身分驗證',\n },\n 'requestAuthTab': {\n 'token': '權杖',\n 'bearerToken': 'Bearer 權杖',\n 'getAToken': '取得權杖',\n 'refresh': '更新',\n 'username': '使用者名稱',\n 'password': '密碼',\n 'name': '名稱',\n 'value': '值',\n 'cancel': '取消',\n 'authorize': '授權',\n 'unsupportedCredentials': '瀏覽器用戶端不會傳送此 AsyncAPI 安全方案的認證資訊。',\n 'authorizeVia': '透過 {name} 授權',\n 'unsupportedType': '暫不支援 {type} 類型的安全方案。',\n 'missingType': '安全方案缺少類型,請檢查您的 {type} 文件或身分驗證設定。',\n 'failedToauthorize': '授權失敗',\n 'failedToRefresh': '更新失敗',\n 'configure': '設定 {name}',\n 'mutualTlsHint': '雙向 TLS 透過在 TLS 握手期間提供用戶端憑證來進行身分驗證,因此無需在此輸入任何內容。',\n },\n 'commandActionForm': {\n 'continue': '繼續',\n },\n 'environment': {\n 'thisIsTheActiveEnvironment': '這是目前啟用的環境',\n 'active': '已啟用',\n 'editEnvironment': '編輯環境',\n 'deleteEnvironment': '刪除環境',\n },\n 'environmentCreateModal': {\n 'environmentName': '環境名稱',\n 'thisEnvironmentNameIsAlreadyInUse': '此環境名稱已被使用。',\n 'update': '更新環境',\n 'add': '新增環境',\n },\n 'environmentDeleteModal': {\n 'cancel': '取消',\n 'deleteEnvironment': '刪除環境',\n 'deleteConfirmation': '確定要刪除此環境嗎?此操作無法復原。',\n 'title': '刪除 {name}',\n },\n 'environmentVariablesDropdown': {\n 'variableSuggestions': '變數建議',\n 'addVariable': '新增變數',\n },\n 'environmentVariablesTable': {\n 'name': '名稱',\n 'value': '值',\n 'actions': '操作',\n 'environmentVariableName': '環境變數名稱',\n 'environmentVariableValue': '環境變數值',\n },\n 'documentSearchModal': {\n 'documentSearch': '文件搜尋',\n 'documentSearchResults': '文件搜尋結果',\n 'navigate': '↑↓ 導覽',\n 'select': '⏎ 選擇',\n 'keyboardInstructions': '按上箭頭或下箭頭導覽,按 Enter 選擇,輸入文字篩選結果',\n },\n 'searchResult': {\n 'httpMethod': 'HTTP 方法:',\n 'path': '路徑:',\n 'description': '描述:',\n 'heading': '標題',\n 'operation': '操作',\n 'tag': '標籤',\n },\n 'sectionFilter': {\n 'all': '全部',\n 'auth': '身分驗證',\n 'variables': '變數',\n 'cookies': 'Cookie',\n 'headers': '標頭',\n 'query': '查詢',\n 'body': '主體',\n },\n 'requestParams': {\n 'addParameter': '新增參數',\n 'searchParameters': '搜尋參數',\n 'noParametersFound': '沒有符合的參數',\n 'clearAll': '清除所有{title}',\n 'clear': '清除',\n 'clearOptionalParameters': '清除選填參數',\n },\n 'responseBodyDownload': {\n 'download': '下載回應主體',\n 'label': '下載',\n 'body': '回應主體',\n },\n 'responseMetaInformation': {\n 'duration': '回應資訊,耗時:',\n 'size': ',大小:',\n 'status': ',狀態:',\n },\n 'authSelector': {\n 'selectedType': '已選身分驗證類型:{type}',\n 'multipleTypes': '已選擇多個身分驗證類型',\n 'selectType': '選擇身分驗證類型',\n 'optional': '選用',\n 'required': '必填',\n 'deleteScheme': '刪除 {name}',\n 'requiredGroup': '必要的身分驗證',\n 'availableGroup': '可用的身分驗證',\n 'addGroup': '新增身分驗證',\n },\n 'operationBlock': {\n 'webhookUrlRequired': 'Webhook URL 為必填項。請先輸入目標位址。',\n 'pathParametersRequired': '路徑參數必須有值。',\n 'forbiddenMethod': 'Fetch API 無法傳送 {method} 請求。',\n },\n 'dataTableCheckbox': {\n 'toggle': '切換',\n },\n 'pillTooltipHost': {\n 'computedAtExecution': '在執行請求時計算',\n 'noValue': '無值',\n },\n 'authOptions': {\n oauth2DeviceAuthorization: 'OAuth2 裝置授權',\n 'apiKeyCookie': 'Cookie 中的 API 金鑰',\n 'apiKeyHeader': '請求標頭中的 API 金鑰',\n 'apiKeyQuery': '查詢參數中的 API 金鑰',\n 'httpBasic': 'HTTP Basic',\n 'httpBearer': 'HTTP Bearer',\n 'oauth2Implicit': 'OAuth2 隱式流程',\n 'oauth2Password': 'OAuth2 密碼流程',\n 'oauth2ClientCredentials': 'OAuth2 用戶端認證資訊',\n 'oauth2AuthorizationFlow': 'OAuth2 授權碼',\n },\n 'deleteSidebarListElement': {\n 'delete': '刪除 {name}',\n },\n 'deleteModal': {\n 'delete': '刪除 {name}',\n },\n} satisfies ApiClientTranslations\n"],"mappings":";;AAGA,IAAa,OAAO;CAClB,yBAAyB,EACvB,YAAY,OACd;CAC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B;EACf,OAAO;EACP,QAAQ;EACR,aAAa;EACb,WAAW;EACX,WAAW;EACX,SAAS;EACT,QAAQ;CACV;CACA,iBAAiB;EACf,gBAAgB;EAChB,oBAAoB;EACpB,qBAAqB;EACrB,YAAY;EACZ,SAAS;EACT,2BAA2B;CAC7B;CACA,wBAAwB;EACtB,YAAY;EACZ,SAAS;EACT,QAAQ;CACV;CACA,2BAA2B;EACzB,YAAY;EACZ,QAAQ;EACR,UAAU;CACZ;CACA,gBAAgB;EACd,gBAAgB;EAChB,iBAAiB;EACjB,cAAc;EACd,YAAY;EACZ,YAAY;EACZ,gBAAgB;EAChB,iBAAiB;EACjB,kBAAkB;EAClB,YAAY;CACd;CACA,kBAAkB;EAChB,sBAAsB;EACtB,0BAA0B;EAC1B,mBAAmB;CACrB;CACA,qBAAqB,EACnB,UAAU,KACZ;CACA,mBAAmB;EACjB,uBAAuB;EACvB,WAAW;CACb;CACA,eAAe;EACb,2BAA2B;EAC3B,gBAAgB;EAChB,gBAAgB;EAChB,eAAe;EACf,aAAa;EACb,cAAc;EACd,kBAAkB;EAClB,kBAAkB;EAClB,2BAA2B;EAC3B,2BAA2B;CAC7B;CACA,4BAA4B,EAC1B,UAAU,YACZ;CACA,eAAe,EACb,UAAU,YACZ;AACF"}
@@ -91,10 +91,15 @@ export declare const en: {
91
91
  openAPIClient: string;
92
92
  };
93
93
  requestBody: {
94
+ restoreOriginalBody: string;
95
+ createExampleFromSchema: string;
94
96
  noBody: string;
95
97
  delete: string;
96
98
  selectFile: string;
97
99
  multipartForm: string;
100
+ part: string;
101
+ addPart: string;
102
+ invalidPart: string;
98
103
  formUrlEncoded: string;
99
104
  binaryFile: string;
100
105
  other: string;
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/localization/translations.ts"],"names":[],"mappings":"AAEA,kDAAkD;AAClD,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiZkB,CAAA"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/localization/translations.ts"],"names":[],"mappings":"AAEA,kDAAkD;AAClD,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsZkB,CAAA"}
@@ -70,10 +70,15 @@ var en = {
70
70
  },
71
71
  openApiClientButton: { openAPIClient: "Open API Client" },
72
72
  requestBody: {
73
+ restoreOriginalBody: "Restore original body",
74
+ createExampleFromSchema: "Create example from schema",
73
75
  noBody: "No Body",
74
76
  delete: "Delete",
75
77
  selectFile: "Select File",
76
78
  multipartForm: "Multipart Form",
79
+ part: "Part {number}",
80
+ addPart: "Add part",
81
+ invalidPart: "Enter valid JSON for this part.",
77
82
  formUrlEncoded: "Form URL Encoded",
78
83
  binaryFile: "Binary File",
79
84
  other: "Other",
@@ -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 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 addParameter: 'Add parameter',\n searchParameters: 'Search parameters',\n noParametersFound: 'No matching parameters',\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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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 restoreOriginalBody: 'Restore original body',\n createExampleFromSchema: 'Create example from schema',\n noBody: 'No Body',\n delete: 'Delete',\n selectFile: 'Select File',\n multipartForm: 'Multipart Form',\n part: 'Part {number}',\n addPart: 'Add part',\n invalidPart: 'Enter valid JSON for this part.',\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 addParameter: 'Add parameter',\n searchParameters: 'Search parameters',\n noParametersFound: 'No matching parameters',\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;CAC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B;CACA,wBAAwB;EACtB,iBAAiB;EACjB,mCAAmC;EACnC,QAAQ;EACR,KAAK;CACP;CACA,wBAAwB;EACtB,QAAQ;EACR,mBAAmB;EACnB,oBAAoB;EACpB,OAAO;CACT;CACA,8BAA8B;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,cAAc;EACd,kBAAkB;EAClB,mBAAmB;EACnB,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":"resolve-route-parameters.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/modal/helpers/resolve-route-parameters.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAMpE,OAAO,KAAK,EAAE,cAAc,EAAoB,MAAM,4CAA4C,CAAA;AAGlG;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oDAAoD;IACpD,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,gEAAgE;AAChE,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,uEAAuE;AACvE,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,cAAc,CAAA;IACrB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;CACjC,CAAA;AAeD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO,cAAc,EAAE,MAAM,MAAM,GAAG,SAAS,KAAG,MAAM,GAAG,SAe9F,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,eAAe,EAAE,MAAM,MAAM,GAAG,SAAS,EAAE,mBAAiB,KAAG,MAAM,GAAG,SAYxG,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GACxB,KAAK,eAAe,EACpB,MAAM,MAAM,GAAG,SAAS,EACxB,QAAQ,MAAM,GAAG,SAAS,EAC1B,mBAAiB,KAChB,MAAM,GAAG,SAeX,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAC7B,KAAK,eAAe,EACpB,WAAW,cAAc,GAAG,SAAS,EACrC,YAAY,MAAM,GAAG,SAAS,KAC7B,MAmBF,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,cAAc,EAAE,QAAQ,eAAe,KAAG,OAAO,CAAC,YAAY,CAsB3G,CAAA"}
1
+ {"version":3,"file":"resolve-route-parameters.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/modal/helpers/resolve-route-parameters.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAOpE,OAAO,KAAK,EAAE,cAAc,EAAoB,MAAM,4CAA4C,CAAA;AAGlG;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oDAAoD;IACpD,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,gEAAgE;AAChE,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,uEAAuE;AACvE,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,cAAc,CAAA;IACrB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;CACjC,CAAA;AAeD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO,cAAc,EAAE,MAAM,MAAM,GAAG,SAAS,KAAG,MAAM,GAAG,SAe9F,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,eAAe,EAAE,MAAM,MAAM,GAAG,SAAS,EAAE,mBAAiB,KAAG,MAAM,GAAG,SAYxG,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GACxB,KAAK,eAAe,EACpB,MAAM,MAAM,GAAG,SAAS,EACxB,QAAQ,MAAM,GAAG,SAAS,EAC1B,mBAAiB,KAChB,MAAM,GAAG,SAeX,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAC7B,KAAK,eAAe,EACpB,WAAW,cAAc,GAAG,SAAS,EACrC,YAAY,MAAM,GAAG,SAAS,KAC7B,MAmBF,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,cAAc,EAAE,QAAQ,eAAe,KAAG,OAAO,CAAC,YAAY,CAsB3G,CAAA"}
@@ -2,6 +2,7 @@ import { isHttpMethod } from "@scalar/helpers/http/is-http-method";
2
2
  import { getOperationEntries } from "@scalar/workspace-store/navigation";
3
3
  import { isOpenApiDocument } from "@scalar/workspace-store/schemas/type-guards";
4
4
  import { forEachPathItemOperation, getPathItemOperation } from "@scalar/workspace-store/helpers/for-each-path-item-operation";
5
+ import { getPathEntries } from "@scalar/workspace-store/helpers/get-path-entries";
5
6
  //#region src/v2/features/modal/helpers/resolve-route-parameters.ts
6
7
  /** Type guard to check if an entry is an example. */
7
8
  var isExample = (entry) => entry.type === "example";
@@ -40,7 +41,7 @@ var resolveDocumentSlug = (store, slug) => {
40
41
  var resolvePath = (ctx, path, isWebhook = false) => {
41
42
  const document = getDocument(ctx);
42
43
  if (!document) return;
43
- if (path === "default") return Object.keys(isWebhook ? document.webhooks ?? {} : document.paths ?? {})[0];
44
+ if (path === "default") return isWebhook ? Object.keys(document.webhooks ?? {})[0] : getPathEntries(document.paths)[0]?.[0];
44
45
  return path;
45
46
  };
46
47
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-route-parameters.js","names":[],"sources":["../../../../../src/v2/features/modal/helpers/resolve-route-parameters.ts"],"sourcesContent":["import { isHttpMethod } from '@scalar/helpers/http/is-http-method'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport {\n forEachPathItemOperation,\n getPathItemOperation,\n} from '@scalar/workspace-store/helpers/for-each-path-item-operation'\nimport { getOperationEntries } from '@scalar/workspace-store/navigation'\nimport type { TraversedEntry, TraversedExample } from '@scalar/workspace-store/schemas/navigation'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\n\n/**\n * Payload for routing and opening the API client modal.\n *\n * `path` and `method` are optional so a caller can update `documentSlug` on its own.\n * `route()` fills in whichever fields are missing from its \"default\" placeholders, which\n * resolve to the document's first operation instead of a route that does not exist.\n */\nexport type RoutePayload = {\n /** API path, or webhook name when `isWebhook` is true. */\n path?: string\n method?: string\n example?: string\n documentSlug?: string\n /** Resolve `path` from the OpenAPI webhooks map. */\n isWebhook?: boolean\n}\n\n/** Raw input values that may contain \"default\" placeholders. */\nexport type DefaultEntities = {\n path: string\n method: string\n example: string\n documentSlug: string\n isWebhook?: boolean\n}\n\n/** Context for resolving route parameters from the workspace store. */\ntype ResolverContext = {\n store: WorkspaceStore\n documentSlug: string | undefined\n}\n\n/** Type guard to check if an entry is an example. */\nconst isExample = (entry: TraversedEntry): entry is TraversedExample => entry.type === 'example'\n\n/**\n * Gets the document from the workspace store.\n * Returns undefined if the document slug is not provided or the document does not exist.\n * Modal routing is OpenAPI-only — AsyncAPI docs surface as undefined here.\n */\nconst getDocument = (ctx: ResolverContext) => {\n const doc = ctx.store.workspace.documents[ctx.documentSlug ?? '']\n return isOpenApiDocument(doc) ? doc : undefined\n}\n\n/**\n * Resolves the document slug from a raw input value.\n *\n * When \"default\" is specified and no document exists with that slug,\n * we fall back to the active document or the first available document.\n * Modal routing is OpenAPI-only, so the fallback skips AsyncAPI documents —\n * otherwise opening the modal with default params on a workspace that has\n * an AsyncAPI active or first document would hand a slug back that\n * `getDocument` then resolves to undefined, rendering the modal with\n * `document: null` even when OpenAPI documents exist.\n */\nexport const resolveDocumentSlug = (store: WorkspaceStore, slug: string | undefined): string | undefined => {\n const hasMatchingDocument = slug !== 'default' || store.workspace.documents[slug] !== undefined\n\n if (hasMatchingDocument) {\n return slug\n }\n\n // Prefer the active document when it is OpenAPI; otherwise pick the first\n // OpenAPI document in the workspace.\n const activeSlug = store.workspace['x-scalar-active-document']\n if (activeSlug && isOpenApiDocument(store.workspace.documents[activeSlug])) {\n return activeSlug\n }\n\n return Object.entries(store.workspace.documents).find(([, document]) => isOpenApiDocument(document))?.[0]\n}\n\n/**\n * Resolves the path from a raw input value.\n *\n * When \"default\" is specified, returns the first available path in the document.\n * This is useful for initial navigation when no specific path is requested.\n */\nexport const resolvePath = (ctx: ResolverContext, path: string | undefined, isWebhook = false): string | undefined => {\n const document = getDocument(ctx)\n\n if (!document) {\n return undefined\n }\n\n if (path === 'default') {\n return Object.keys(isWebhook ? (document.webhooks ?? {}) : (document.paths ?? {}))[0]\n }\n\n return path\n}\n\n/**\n * Resolves the HTTP method from a raw input value.\n *\n * When \"default\" is specified, returns the first valid HTTP method for the given path.\n * This ensures we select a real method rather than metadata keys like \"parameters\" or \"summary\".\n */\nexport const resolveMethod = (\n ctx: ResolverContext,\n path: string | undefined,\n method: string | undefined,\n isWebhook = false,\n): string | undefined => {\n const document = getDocument(ctx)\n\n if (!document || !path) {\n return undefined\n }\n\n const pathItem = isWebhook ? document.webhooks?.[path] : document.paths?.[path]\n if (method === 'default' && !getPathItemOperation(pathItem, method)) {\n const methods: string[] = []\n forEachPathItemOperation(pathItem, (method) => methods.push(method))\n return methods[0]\n }\n\n return method && (isHttpMethod(method) || getPathItemOperation(pathItem, method)) ? method : undefined\n}\n\n/**\n * Resolves the example name from a raw input value.\n *\n * When \"default\" is specified, returns the first available example name.\n * Falls back to \"default\" when no examples exist, which signals to use the default request body.\n */\nexport const resolveExampleName = (\n ctx: ResolverContext,\n operation: TraversedEntry | undefined,\n exampleKey: string | undefined,\n): string => {\n const document = getDocument(ctx)\n\n if (!document || operation?.type !== 'operation') {\n return 'default'\n }\n\n const examples = operation.children?.filter(isExample) ?? []\n const matchingExample = examples.find((child) => child.name === exampleKey)\n\n if (matchingExample) {\n return matchingExample.name\n }\n\n if (exampleKey === 'default') {\n return examples[0]?.name ?? 'default'\n }\n\n return 'default'\n}\n\n/**\n * Resolves all route parameters from raw input values to their actual values.\n *\n * This function handles \"default\" placeholders by looking up actual values from the workspace store.\n * It ensures the modal can be opened even when the caller does not know specific paths, methods, or examples.\n */\nexport const resolveRouteParameters = (store: WorkspaceStore, params: DefaultEntities): Partial<RoutePayload> => {\n const documentSlug = resolveDocumentSlug(store, params.documentSlug)\n const ctx: ResolverContext = { store, documentSlug }\n const isWebhook = params.isWebhook ?? false\n\n const path = resolvePath(ctx, params.path, isWebhook)\n const method = resolveMethod(ctx, path, params.method, isWebhook)\n const routeType = isWebhook ? { isWebhook: true as const } : {}\n\n const traversedDocument = getDocument(ctx)?.['x-scalar-navigation']\n\n if (!traversedDocument) {\n return { documentSlug, path, method, example: 'default', ...routeType }\n }\n\n const operations = getOperationEntries(traversedDocument)\n const operation = operations\n .get(`${path}|${method}`)\n ?.find((entry) => entry.type === (isWebhook ? 'webhook' : 'operation'))\n const example = resolveExampleName(ctx, operation, params.example)\n\n return { documentSlug, path, method, example, ...routeType }\n}\n"],"mappings":";;;;;;AA2CA,IAAM,aAAa,UAAqD,MAAM,SAAS;;;;;;AAOvF,IAAM,eAAe,QAAyB;CAC5C,MAAM,MAAM,IAAI,MAAM,UAAU,UAAU,IAAI,gBAAgB;CAC9D,OAAO,kBAAkB,GAAG,IAAI,MAAM,KAAA;AACxC;;;;;;;;;;;;AAaA,IAAa,uBAAuB,OAAuB,SAAiD;CAG1G,IAF4B,SAAS,aAAa,MAAM,UAAU,UAAU,UAAU,KAAA,GAGpF,OAAO;CAKT,MAAM,aAAa,MAAM,UAAU;CACnC,IAAI,cAAc,kBAAkB,MAAM,UAAU,UAAU,WAAW,GACvE,OAAO;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aAAa;CAEtC,MAAM,OAAO,YAAY,KAAK,OAAO,MAAM,SAAS;CACpD,MAAM,SAAS,cAAc,KAAK,MAAM,OAAO,QAAQ,SAAS;CAChE,MAAM,YAAY,YAAY,EAAE,WAAW,KAAc,IAAI,CAAC;CAE9D,MAAM,oBAAoB,YAAY,GAAG,CAAC,GAAG;CAE7C,IAAI,CAAC,mBACH,OAAO;EAAE;EAAc;EAAM;EAAQ,SAAS;EAAW,GAAG;CAAU;CAIxE,MAAM,YADa,oBAAoB,iBACrB,CAAA,CACf,IAAI,GAAG,KAAK,GAAG,QAAQ,CAAC,EACvB,MAAM,UAAU,MAAM,UAAU,YAAY,YAAY,YAAY;CAGxE,OAAO;EAAE;EAAc;EAAM;EAAQ,SAFrB,mBAAmB,KAAK,WAAW,OAAO,OAErB;EAAS,GAAG;CAAU;AAC7D"}
1
+ {"version":3,"file":"resolve-route-parameters.js","names":[],"sources":["../../../../../src/v2/features/modal/helpers/resolve-route-parameters.ts"],"sourcesContent":["import { isHttpMethod } from '@scalar/helpers/http/is-http-method'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport {\n forEachPathItemOperation,\n getPathItemOperation,\n} from '@scalar/workspace-store/helpers/for-each-path-item-operation'\nimport { getPathEntries } from '@scalar/workspace-store/helpers/get-path-entries'\nimport { getOperationEntries } from '@scalar/workspace-store/navigation'\nimport type { TraversedEntry, TraversedExample } from '@scalar/workspace-store/schemas/navigation'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\n\n/**\n * Payload for routing and opening the API client modal.\n *\n * `path` and `method` are optional so a caller can update `documentSlug` on its own.\n * `route()` fills in whichever fields are missing from its \"default\" placeholders, which\n * resolve to the document's first operation instead of a route that does not exist.\n */\nexport type RoutePayload = {\n /** API path, or webhook name when `isWebhook` is true. */\n path?: string\n method?: string\n example?: string\n documentSlug?: string\n /** Resolve `path` from the OpenAPI webhooks map. */\n isWebhook?: boolean\n}\n\n/** Raw input values that may contain \"default\" placeholders. */\nexport type DefaultEntities = {\n path: string\n method: string\n example: string\n documentSlug: string\n isWebhook?: boolean\n}\n\n/** Context for resolving route parameters from the workspace store. */\ntype ResolverContext = {\n store: WorkspaceStore\n documentSlug: string | undefined\n}\n\n/** Type guard to check if an entry is an example. */\nconst isExample = (entry: TraversedEntry): entry is TraversedExample => entry.type === 'example'\n\n/**\n * Gets the document from the workspace store.\n * Returns undefined if the document slug is not provided or the document does not exist.\n * Modal routing is OpenAPI-only — AsyncAPI docs surface as undefined here.\n */\nconst getDocument = (ctx: ResolverContext) => {\n const doc = ctx.store.workspace.documents[ctx.documentSlug ?? '']\n return isOpenApiDocument(doc) ? doc : undefined\n}\n\n/**\n * Resolves the document slug from a raw input value.\n *\n * When \"default\" is specified and no document exists with that slug,\n * we fall back to the active document or the first available document.\n * Modal routing is OpenAPI-only, so the fallback skips AsyncAPI documents —\n * otherwise opening the modal with default params on a workspace that has\n * an AsyncAPI active or first document would hand a slug back that\n * `getDocument` then resolves to undefined, rendering the modal with\n * `document: null` even when OpenAPI documents exist.\n */\nexport const resolveDocumentSlug = (store: WorkspaceStore, slug: string | undefined): string | undefined => {\n const hasMatchingDocument = slug !== 'default' || store.workspace.documents[slug] !== undefined\n\n if (hasMatchingDocument) {\n return slug\n }\n\n // Prefer the active document when it is OpenAPI; otherwise pick the first\n // OpenAPI document in the workspace.\n const activeSlug = store.workspace['x-scalar-active-document']\n if (activeSlug && isOpenApiDocument(store.workspace.documents[activeSlug])) {\n return activeSlug\n }\n\n return Object.entries(store.workspace.documents).find(([, document]) => isOpenApiDocument(document))?.[0]\n}\n\n/**\n * Resolves the path from a raw input value.\n *\n * When \"default\" is specified, returns the first available path in the document.\n * This is useful for initial navigation when no specific path is requested.\n */\nexport const resolvePath = (ctx: ResolverContext, path: string | undefined, isWebhook = false): string | undefined => {\n const document = getDocument(ctx)\n\n if (!document) {\n return undefined\n }\n\n if (path === 'default') {\n return isWebhook ? Object.keys(document.webhooks ?? {})[0] : getPathEntries(document.paths)[0]?.[0]\n }\n\n return path\n}\n\n/**\n * Resolves the HTTP method from a raw input value.\n *\n * When \"default\" is specified, returns the first valid HTTP method for the given path.\n * This ensures we select a real method rather than metadata keys like \"parameters\" or \"summary\".\n */\nexport const resolveMethod = (\n ctx: ResolverContext,\n path: string | undefined,\n method: string | undefined,\n isWebhook = false,\n): string | undefined => {\n const document = getDocument(ctx)\n\n if (!document || !path) {\n return undefined\n }\n\n const pathItem = isWebhook ? document.webhooks?.[path] : document.paths?.[path]\n if (method === 'default' && !getPathItemOperation(pathItem, method)) {\n const methods: string[] = []\n forEachPathItemOperation(pathItem, (method) => methods.push(method))\n return methods[0]\n }\n\n return method && (isHttpMethod(method) || getPathItemOperation(pathItem, method)) ? method : undefined\n}\n\n/**\n * Resolves the example name from a raw input value.\n *\n * When \"default\" is specified, returns the first available example name.\n * Falls back to \"default\" when no examples exist, which signals to use the default request body.\n */\nexport const resolveExampleName = (\n ctx: ResolverContext,\n operation: TraversedEntry | undefined,\n exampleKey: string | undefined,\n): string => {\n const document = getDocument(ctx)\n\n if (!document || operation?.type !== 'operation') {\n return 'default'\n }\n\n const examples = operation.children?.filter(isExample) ?? []\n const matchingExample = examples.find((child) => child.name === exampleKey)\n\n if (matchingExample) {\n return matchingExample.name\n }\n\n if (exampleKey === 'default') {\n return examples[0]?.name ?? 'default'\n }\n\n return 'default'\n}\n\n/**\n * Resolves all route parameters from raw input values to their actual values.\n *\n * This function handles \"default\" placeholders by looking up actual values from the workspace store.\n * It ensures the modal can be opened even when the caller does not know specific paths, methods, or examples.\n */\nexport const resolveRouteParameters = (store: WorkspaceStore, params: DefaultEntities): Partial<RoutePayload> => {\n const documentSlug = resolveDocumentSlug(store, params.documentSlug)\n const ctx: ResolverContext = { store, documentSlug }\n const isWebhook = params.isWebhook ?? false\n\n const path = resolvePath(ctx, params.path, isWebhook)\n const method = resolveMethod(ctx, path, params.method, isWebhook)\n const routeType = isWebhook ? { isWebhook: true as const } : {}\n\n const traversedDocument = getDocument(ctx)?.['x-scalar-navigation']\n\n if (!traversedDocument) {\n return { documentSlug, path, method, example: 'default', ...routeType }\n }\n\n const operations = getOperationEntries(traversedDocument)\n const operation = operations\n .get(`${path}|${method}`)\n ?.find((entry) => entry.type === (isWebhook ? 'webhook' : 'operation'))\n const example = resolveExampleName(ctx, operation, params.example)\n\n return { documentSlug, path, method, example, ...routeType }\n}\n"],"mappings":";;;;;;;AA4CA,IAAM,aAAa,UAAqD,MAAM,SAAS;;;;;;AAOvF,IAAM,eAAe,QAAyB;CAC5C,MAAM,MAAM,IAAI,MAAM,UAAU,UAAU,IAAI,gBAAgB;CAC9D,OAAO,kBAAkB,GAAG,IAAI,MAAM,KAAA;AACxC;;;;;;;;;;;;AAaA,IAAa,uBAAuB,OAAuB,SAAiD;CAG1G,IAF4B,SAAS,aAAa,MAAM,UAAU,UAAU,UAAU,KAAA,GAGpF,OAAO;CAKT,MAAM,aAAa,MAAM,UAAU;CACnC,IAAI,cAAc,kBAAkB,MAAM,UAAU,UAAU,WAAW,GACvE,OAAO;CAGT,OAAO,OAAO,QAAQ,MAAM,UAAU,SAAS,CAAC,CAAC,MAAM,GAAG,cAAc,kBAAkB,QAAQ,CAAC,CAAC,GAAG;AACzG;;;;;;;AAQA,IAAa,eAAe,KAAsB,MAA0B,YAAY,UAA8B;CACpH,MAAM,WAAW,YAAY,GAAG;CAEhC,IAAI,CAAC,UACH;CAGF,IAAI,SAAS,WACX,OAAO,YAAY,OAAO,KAAK,SAAS,YAAY,CAAC,CAAC,CAAC,CAAC,KAAK,eAAe,SAAS,KAAK,CAAC,CAAC,EAAE,GAAG;CAGnG,OAAO;AACT;;;;;;;AAQA,IAAa,iBACX,KACA,MACA,QACA,YAAY,UACW;CACvB,MAAM,WAAW,YAAY,GAAG;CAEhC,IAAI,CAAC,YAAY,CAAC,MAChB;CAGF,MAAM,WAAW,YAAY,SAAS,WAAW,QAAQ,SAAS,QAAQ;CAC1E,IAAI,WAAW,aAAa,CAAC,qBAAqB,UAA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.d.ts","sourceRoot":"","sources":["../../src/v2/workspace-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAA;AAC9E,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,CAAC,CAAC,CAAC,CAAA;IAClF,cAAc,EAAE,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACzE,CAAC,CAAA;AAEF,KAAK,KAAK,GAAG;KACV,GAAG,IAAI,MAAM,kBAAkB,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC;CAC9C,CAAA;AA6BD;;;;;;;GAOG;AACH,wBAAgB,gCAAgC,CAAC,EAC/C,QAAQ,EAAE,GAAG,EACb,KAAK,EACL,KAAK,EACL,4BAA4B,GAC7B,EAAE;IACD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,KAAK,EAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IACjC,KAAK,EAAE,KAAK,CAAA;IACZ,2FAA2F;IAC3F,4BAA4B,CAAC,EAAE,MAAM,2BAA2B,CAAC,iBAAiB,CAAC,CAAA;CACpF,GAAG,MAAM,IAAI,CA0Vb"}
1
+ {"version":3,"file":"workspace-events.d.ts","sourceRoot":"","sources":["../../src/v2/workspace-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAA;AAC9E,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,CAAC,CAAC,CAAC,CAAA;IAClF,cAAc,EAAE,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACzE,CAAC,CAAA;AAEF,KAAK,KAAK,GAAG;KACV,GAAG,IAAI,MAAM,kBAAkB,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC;CAC9C,CAAA;AA6BD;;;;;;;GAOG;AACH,wBAAgB,gCAAgC,CAAC,EAC/C,QAAQ,EAAE,GAAG,EACb,KAAK,EACL,KAAK,EACL,4BAA4B,GAC7B,EAAE;IACD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,KAAK,EAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IACjC,KAAK,EAAE,KAAK,CAAA;IACZ,2FAA2F;IAC3F,4BAA4B,CAAC,EAAE,MAAM,2BAA2B,CAAC,iBAAiB,CAAC,CAAA;CACpF,GAAG,MAAM,IAAI,CAiWb"}
@@ -99,6 +99,7 @@ function initializeWorkspaceEventHandlers({ eventBus: bus, store, hooks, getConf
99
99
  eventBus.on("operation:delete:parameter", (payload) => withHook("operation:delete:parameter", mutators.value.active().operation.deleteOperationParameter, hooks)(payload));
100
100
  eventBus.on("operation:delete-all:parameters", (payload) => withHook("operation:delete-all:parameters", mutators.value.active().operation.deleteAllOperationParameters, hooks)(payload));
101
101
  eventBus.on("operation:update:extension", (payload) => withHook("operation:update:extension", mutators.value.active().operation.updateOperationExtension, hooks)(payload));
102
+ eventBus.on("operation:reset:requestBody", (payload) => withHook("operation:reset:requestBody", mutators.value.doc(payload.documentName).operation.resetOperationRequestBody, hooks)(payload));
102
103
  eventBus.on("operation:update:requestBody:contentType", (payload) => withHook("operation:update:requestBody:contentType", mutators.value.active().operation.updateOperationRequestBodyContentType, hooks)(payload));
103
104
  eventBus.on("operation:update:requestBody:value", (payload) => withHook("operation:update:requestBody:value", mutators.value.active().operation.updateOperationRequestBodyExample, hooks)(payload));
104
105
  eventBus.on("operation:update:requestBody:formValue", (payload) => withHook("operation:update:requestBody:formValue", mutators.value.active().operation.updateOperationRequestBodyFormValue, hooks)(payload));
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-events.js","names":[],"sources":["../../src/v2/workspace-events.ts"],"sourcesContent":["import type { AuthenticationConfiguration } from '@scalar/types/api-reference'\nimport 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 getConfiguredSecuritySchemes,\n}: {\n eventBus: WorkspaceEventBus\n store: Ref<WorkspaceStore | null>\n hooks: Hooks\n /** Read current defaults when a name is edited, including after a configuration change. */\n getConfiguredSecuritySchemes?: () => AuthenticationConfiguration['securitySchemes']\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(\n 'auth:update:security-scheme',\n (data) => mutators.value.active().auth.updateSecurityScheme(data, getConfiguredSecuritySchemes?.()),\n hooks,\n )(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":";;;;;;;;;;;;;;AA4BA,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,OACA,gCAOa;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,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AAC,KAAK,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 { AuthenticationConfiguration } from '@scalar/types/api-reference'\nimport 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 getConfiguredSecuritySchemes,\n}: {\n eventBus: WorkspaceEventBus\n store: Ref<WorkspaceStore | null>\n hooks: Hooks\n /** Read current defaults when a name is edited, including after a configuration change. */\n getConfiguredSecuritySchemes?: () => AuthenticationConfiguration['securitySchemes']\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(\n 'auth:update:security-scheme',\n (data) => mutators.value.active().auth.updateSecurityScheme(data, getConfiguredSecuritySchemes?.()),\n hooks,\n )(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:reset:requestBody', (payload) =>\n withHook(\n 'operation:reset:requestBody',\n mutators.value.doc(payload.documentName).operation.resetOperationRequestBody,\n hooks,\n )(payload),\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":";;;;;;;;;;;;;;AA4BA,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,OACA,gCAOa;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,mBAA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c,KAAK,CAAC,CAAC,OAAO,CAC9F;CACA,SAAS,GAAG,2BAA2B,YACrC,SAAS,0BAA0B,SAAS,MAAM,UAAU,CAAC,CAAC,KAAK,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"}
@@ -34,7 +34,7 @@ to {
34
34
  }
35
35
  }
36
36
 
37
- .open-api-client-button[data-v-746e7aef] {
37
+ .open-api-client-button[data-v-3a410121] {
38
38
  cursor: pointer;
39
39
  width: 100%;
40
40
  padding: 9px 12px;
@@ -53,7 +53,7 @@ to {
53
53
  gap: 6px;
54
54
  color: var(--scalar-sidebar-color-1);
55
55
  }
56
- .open-api-client-button[data-v-746e7aef]:hover {
56
+ .open-api-client-button[data-v-3a410121]:hover {
57
57
  background: var(
58
58
  --scalar-sidebar-item-hover-background,
59
59
  var(--scalar-background-2)
@@ -416,20 +416,20 @@ to {
416
416
  background: color-mix(in srgb, var(--scalar-background-3), transparent 40%);
417
417
  }
418
418
 
419
- [data-v-09f26d90] .code-input-lite__editor {
419
+ [data-v-321c6212] .code-input-lite__editor {
420
420
  background-color: transparent;
421
421
  font-family: var(--scalar-font);
422
422
  font-size: var(--scalar-small);
423
423
  padding: 5px 8px;
424
424
  }
425
- [data-v-09f26d90] .scalar-pill:not(:last-of-type) {
425
+ [data-v-321c6212] .scalar-pill:not(:last-of-type) {
426
426
  margin-right: 0.15em;
427
427
  }
428
- [data-v-09f26d90] .scalar-pill:not(:first-of-type) {
428
+ [data-v-321c6212] .scalar-pill:not(:first-of-type) {
429
429
  margin-left: 0.5px;
430
430
  }
431
431
 
432
- [data-v-ec7e5b86] .cm-content {
432
+ [data-v-b8f0fb41] .cm-content {
433
433
  font-size: var(--scalar-small);
434
434
  }
435
435
 
@@ -478,20 +478,20 @@ input[data-v-029a43f5]::placeholder {
478
478
  scrollbar-width: none;
479
479
  }
480
480
 
481
- .request-section-content[data-v-87ab23d9] {
481
+ .request-section-content[data-v-38a212df] {
482
482
  --scalar-border-width: 0.5px;
483
483
  }
484
- .request-section-content-filter[data-v-87ab23d9] {
484
+ .request-section-content-filter[data-v-38a212df] {
485
485
  box-shadow: 0 -10px 0 10px var(--scalar-background-1);
486
486
  }
487
- .request-item:focus-within .request-meta-buttons[data-v-87ab23d9] {
487
+ .request-item:focus-within .request-meta-buttons[data-v-38a212df] {
488
488
  opacity: 1;
489
489
  }
490
- .group-hover-input[data-v-87ab23d9] {
490
+ .group-hover-input[data-v-38a212df] {
491
491
  border-width: var(--scalar-border-width);
492
492
  border-color: transparent;
493
493
  }
494
- .group:hover .group-hover-input[data-v-87ab23d9] {
494
+ .group:hover .group-hover-input[data-v-38a212df] {
495
495
  background: color-mix(
496
496
  in srgb,
497
497
  var(--scalar-background-1),
@@ -499,7 +499,7 @@ input[data-v-029a43f5]::placeholder {
499
499
  );
500
500
  border-color: var(--scalar-border-color);
501
501
  }
502
- .group-hover-input[data-v-87ab23d9]:focus {
502
+ .group-hover-input[data-v-38a212df]:focus {
503
503
  background: transparent !important;
504
504
  border-color: var(--scalar-border-color) !important;
505
505
  }