@scalar/api-client 2.5.35 → 2.6.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 (203) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/components/CodeInput/CodeInput.vue.d.ts +0 -3
  3. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  4. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  5. package/dist/components/CodeInput/CodeInput.vue2.js +60 -62
  6. package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -3
  7. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  8. package/dist/components/CodeInput/codeVariableWidget.js +25 -32
  9. package/dist/components/DataTable/DataTableInput.vue.d.ts +0 -2
  10. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  11. package/dist/components/DataTable/DataTableInput.vue.js +2 -2
  12. package/dist/components/DataTable/DataTableInput.vue2.js +17 -19
  13. package/dist/layouts/App/create-api-client-app.d.ts +10 -10
  14. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  15. package/dist/layouts/Modal/create-api-client-modal.d.ts +20 -20
  16. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  17. package/dist/layouts/Web/create-api-client-web.d.ts +10 -10
  18. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  19. package/dist/libs/create-client.d.ts +10 -10
  20. package/dist/libs/create-client.d.ts.map +1 -1
  21. package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
  22. package/dist/store/security-schemes.d.ts +10 -10
  23. package/dist/store/security-schemes.d.ts.map +1 -1
  24. package/dist/store/store.d.ts +10 -10
  25. package/dist/store/store.d.ts.map +1 -1
  26. package/dist/style.css +1 -1
  27. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.test.d.ts +2 -0
  28. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.test.d.ts.map +1 -0
  29. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts +14 -0
  30. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -0
  31. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +55 -0
  32. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue2.js +4 -0
  33. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.test.d.ts +2 -0
  34. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.test.d.ts.map +1 -0
  35. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +104 -0
  36. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -0
  37. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +7 -0
  38. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +237 -0
  39. package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts +41 -0
  40. package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts.map +1 -0
  41. package/dist/v2/blocks/operation-code-sample/helpers/find-client.js +20 -0
  42. package/dist/v2/blocks/operation-code-sample/helpers/find-client.test.d.ts +2 -0
  43. package/dist/v2/blocks/operation-code-sample/helpers/find-client.test.d.ts.map +1 -0
  44. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts +20 -0
  45. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts.map +1 -0
  46. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.js +4 -0
  47. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.test.d.ts +2 -0
  48. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.test.d.ts.map +1 -0
  49. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +17 -0
  50. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -0
  51. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +30 -0
  52. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.test.d.ts +2 -0
  53. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.test.d.ts.map +1 -0
  54. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts +29 -0
  55. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +1 -0
  56. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +209 -0
  57. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.test.d.ts +2 -0
  58. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.test.d.ts.map +1 -0
  59. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts +26 -0
  60. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts.map +1 -0
  61. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +29 -0
  62. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.test.d.ts +2 -0
  63. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.test.d.ts.map +1 -0
  64. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +4 -0
  65. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts.map +1 -0
  66. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.js +10 -0
  67. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.test.d.ts +2 -0
  68. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.test.d.ts.map +1 -0
  69. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts +7 -0
  70. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts.map +1 -0
  71. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.js +28 -0
  72. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.test.d.ts +2 -0
  73. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.test.d.ts.map +1 -0
  74. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +52 -0
  75. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -0
  76. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +59 -0
  77. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.test.d.ts +2 -0
  78. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.test.d.ts.map +1 -0
  79. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts +12 -0
  80. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -0
  81. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +57 -0
  82. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.test.d.ts +2 -0
  83. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.test.d.ts.map +1 -0
  84. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts +25 -0
  85. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -0
  86. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +212 -0
  87. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.test.d.ts +2 -0
  88. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.test.d.ts.map +1 -0
  89. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +15 -0
  90. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts.map +1 -0
  91. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.js +55 -0
  92. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.test.d.ts +2 -0
  93. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.test.d.ts.map +1 -0
  94. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.d.ts +6 -0
  95. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.d.ts.map +1 -0
  96. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.js +18 -0
  97. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.test.d.ts +2 -0
  98. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.test.d.ts.map +1 -0
  99. package/dist/v2/blocks/operation-code-sample/index.d.ts +3 -0
  100. package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -0
  101. package/dist/v2/blocks/operation-code-sample/index.js +6 -0
  102. package/dist/v2/blocks/operation-code-sample/types.d.ts +29 -0
  103. package/dist/v2/blocks/operation-code-sample/types.d.ts.map +1 -0
  104. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.test.d.ts +2 -0
  105. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.test.d.ts.map +1 -0
  106. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +65 -0
  107. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -0
  108. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +7 -0
  109. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +122 -0
  110. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.test.d.ts +2 -0
  111. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.test.d.ts.map +1 -0
  112. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts +25 -0
  113. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts.map +1 -0
  114. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +7 -0
  115. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue2.js +90 -0
  116. package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.d.ts +55 -0
  117. package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.d.ts.map +1 -0
  118. package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js +39 -0
  119. package/dist/v2/blocks/scalar-address-bar-block/index.d.ts +2 -0
  120. package/dist/v2/blocks/scalar-address-bar-block/index.d.ts.map +1 -0
  121. package/dist/v2/blocks/scalar-address-bar-block/index.js +4 -0
  122. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.test.d.ts +2 -0
  123. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.test.d.ts.map +1 -0
  124. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +49 -0
  125. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -0
  126. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +7 -0
  127. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +172 -0
  128. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.test.d.ts +2 -0
  129. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.test.d.ts.map +1 -0
  130. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts +17 -0
  131. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts.map +1 -0
  132. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +52 -0
  133. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue2.js +4 -0
  134. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.test.d.ts +2 -0
  135. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.test.d.ts.map +1 -0
  136. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +45 -0
  137. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -0
  138. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +254 -0
  139. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue2.js +4 -0
  140. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.test.d.ts +2 -0
  141. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.test.d.ts.map +1 -0
  142. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +16 -0
  143. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -0
  144. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +134 -0
  145. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue2.js +4 -0
  146. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.test.d.ts +2 -0
  147. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.test.d.ts.map +1 -0
  148. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +33 -0
  149. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -0
  150. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +7 -0
  151. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +82 -0
  152. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +48 -0
  153. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +1 -0
  154. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +48 -0
  155. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue2.js +4 -0
  156. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.test.d.ts +2 -0
  157. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.test.d.ts.map +1 -0
  158. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +29 -0
  159. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -0
  160. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +232 -0
  161. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue2.js +4 -0
  162. package/dist/v2/blocks/scalar-auth-selector-block/event-types.d.ts +29 -0
  163. package/dist/v2/blocks/scalar-auth-selector-block/event-types.d.ts.map +1 -0
  164. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts +9 -0
  165. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts.map +1 -0
  166. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +121 -0
  167. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +34 -0
  168. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -0
  169. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +111 -0
  170. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.test.d.ts +2 -0
  171. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.test.d.ts.map +1 -0
  172. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +39 -0
  173. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -0
  174. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +52 -0
  175. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.test.d.ts +2 -0
  176. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.test.d.ts.map +1 -0
  177. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +2 -0
  178. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -0
  179. package/dist/v2/blocks/scalar-auth-selector-block/index.js +4 -0
  180. package/dist/v2/components/server/ServerDropdown.test.d.ts +2 -0
  181. package/dist/v2/components/server/ServerDropdown.test.d.ts.map +1 -0
  182. package/dist/v2/components/server/ServerDropdown.vue.d.ts +33 -0
  183. package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -0
  184. package/dist/v2/components/server/ServerDropdown.vue.js +87 -0
  185. package/dist/v2/components/server/ServerDropdown.vue2.js +4 -0
  186. package/dist/v2/components/server/ServerDropdownItem.test.d.ts +2 -0
  187. package/dist/v2/components/server/ServerDropdownItem.test.d.ts.map +1 -0
  188. package/dist/v2/components/server/ServerDropdownItem.vue.d.ts +21 -0
  189. package/dist/v2/components/server/ServerDropdownItem.vue.d.ts.map +1 -0
  190. package/dist/v2/components/server/ServerDropdownItem.vue.js +7 -0
  191. package/dist/v2/components/server/ServerDropdownItem.vue2.js +51 -0
  192. package/dist/v2/components/server/index.d.ts +2 -0
  193. package/dist/v2/components/server/index.d.ts.map +1 -0
  194. package/dist/v2/components/server/index.js +4 -0
  195. package/dist/views/Request/Request.vue.js +1 -1
  196. package/dist/views/Request/Request.vue2.js +4 -4
  197. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +2 -2
  198. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  199. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +2 -2
  200. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  201. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  202. package/dist/vitest.setup.d.ts.map +1 -1
  203. package/package.json +14 -10
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 170b890: feat: scalar address bar block
8
+ - db5b649: feat: auth selector block
9
+
10
+ ### Patch Changes
11
+
12
+ - b858566: chore: moved api client code sample to new store
13
+ - Updated dependencies [6462733]
14
+ - Updated dependencies [b858566]
15
+ - Updated dependencies [db5b649]
16
+ - @scalar/json-magic@0.5.2
17
+ - @scalar/workspace-store@0.16.0
18
+ - @scalar/components@0.14.37
19
+ - @scalar/oas-utils@0.4.32
20
+ - @scalar/openapi-parser@0.21.2
21
+ - @scalar/use-codemirror@0.12.38
22
+ - @scalar/postman-to-openapi@0.3.35
23
+ - @scalar/import@0.4.27
24
+
3
25
  ## 2.5.35
4
26
 
5
27
  ### Patch Changes
@@ -1,5 +1,4 @@
1
1
  import type { Environment } from '@scalar/oas-utils/entities/environment';
2
- import type { Workspace } from '@scalar/oas-utils/entities/workspace';
3
2
  import { type CodeMirrorLanguage, type Extension } from '@scalar/use-codemirror';
4
3
  import { type Ref } from 'vue';
5
4
  import type { EnvVariable } from '../../store/active-entities.js';
@@ -29,7 +28,6 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
29
28
  default?: string | number;
30
29
  environment: Environment;
31
30
  envVariables: EnvVariable[];
32
- workspace: Workspace;
33
31
  lineWrapping?: boolean;
34
32
  }, {
35
33
  /** Expose focus method */
@@ -71,7 +69,6 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
71
69
  default?: string | number;
72
70
  environment: Environment;
73
71
  envVariables: EnvVariable[];
74
- workspace: Workspace;
75
72
  lineWrapping?: boolean;
76
73
  }> & Readonly<{
77
74
  onSubmit?: ((v: string) => any) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AA8eA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AACrE,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACf,MAAM,wBAA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AO;0BACC,OAAO;mBAKd,OAAO;kBAMR,OAAO;;cAmhBZ,CAAC,KAAK,IAAiB,KAAK,GAAG;;WAClC,CAAC,KAAK,IAAiB,KAAK,GAAG;;AAhjB1C,wBAqmBC;AAYD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AA2eA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACf,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EAAyC,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAGrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;;kBAUxC,OAAO;eACV,OAAO;gBACN,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;iBACP,SAAS,EAAE;kBACV,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;eACJ,MAAM,EAAE;WACZ,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;eACzB,OAAO;oBACF,OAAO;iBACV,OAAO;cACV,MAAM,GAAG,MAAM;iBACZ,WAAW;kBACV,WAAW,EAAE;mBACZ,OAAO;;IAiMxB,0BAA0B;;0BArJC,MAAM;0BA0BN,MAAM;wBAOR,MAAM;;;;;;;;;;kBAtGf,OAAO;eACV,OAAO;gBACN,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;iBACP,SAAS,EAAE;kBACV,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;eACJ,MAAM,EAAE;WACZ,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;eACzB,OAAO;oBACF,OAAO;iBACV,OAAO;cACV,MAAM,GAAG,MAAM;iBACZ,WAAW;kBACV,WAAW,EAAE;mBACZ,OAAO;;;;;;;cAxBX,OAAO;cAkBP,OAAO;iBAnBJ,OAAO;gBAIR,OAAO;gBACP,SAAS,EAAE;sBAGL,OAAO;kBAMX,OAAO;0BACC,OAAO;mBAKd,OAAO;kBAKR,OAAO;;cAkhBZ,CAAC,KAAK,IAAiB,KAAK,GAAG;;WAClC,CAAC,KAAK,IAAiB,KAAK,GAAG;;AA9iB1C,wBAmmBC;AAYD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -2,7 +2,7 @@ import o from "./CodeInput.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../../_virtual/_plugin-vue_export-helper.js";
5
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-26202746"]]);
5
+ const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-103d9d56"]]);
6
6
  export {
7
- a as default
7
+ _ as default
8
8
  };
@@ -2,7 +2,7 @@ import { defineComponent as W, useAttrs as j, ref as i, computed as d, toRef as
2
2
  import { useCodeMirror as Y, useDropdown as Z, colorPicker as _ } from "@scalar/use-codemirror";
3
3
  import { nanoid as ee } from "nanoid";
4
4
  import oe from "../../views/Environment/EnvironmentVariableDropdown.vue.js";
5
- import k from "../DataTable/DataTableInputSelect.vue.js";
5
+ import x from "../DataTable/DataTableInputSelect.vue.js";
6
6
  import { pillPlugin as le, backspaceCommand as te } from "./codeVariableWidget.js";
7
7
  import { useLayout as ne } from "../../hooks/useLayout.js";
8
8
  const ae = { class: "whitespace-nowrap" }, re = ["id"], se = {
@@ -49,34 +49,32 @@ const ae = { class: "whitespace-nowrap" }, re = ["id"], se = {
49
49
  default: {},
50
50
  environment: {},
51
51
  envVariables: {},
52
- workspace: {},
53
52
  lineWrapping: { type: Boolean, default: !1 }
54
53
  },
55
54
  emits: ["submit", "update:modelValue", "curl", "blur"],
56
55
  setup(R, { expose: A, emit: I }) {
57
- const e = R, s = I, x = j(), M = x.id || `id-${ee()}`, B = i(!1), y = i(!1), C = i(""), S = i({ left: 0, top: 0 }), f = i(null), { layout: g } = ne();
58
- function D(o) {
59
- return o === e.modelValue ? null : e.importCurl && o.trim().toLowerCase().startsWith("curl") ? (s("curl", o), a.value?.dispatch({
56
+ const o = R, s = I, B = j(), M = B.id || `id-${ee()}`, k = i(!1), y = i(!1), C = i(""), S = i({ left: 0, top: 0 }), f = i(null), { layout: g } = ne();
57
+ function D(e) {
58
+ return e === o.modelValue ? null : o.importCurl && e.trim().toLowerCase().startsWith("curl") ? (s("curl", e), a.value?.dispatch({
60
59
  changes: {
61
60
  from: 0,
62
61
  to: a.value.state.doc.length,
63
- insert: String(e.modelValue)
62
+ insert: String(o.modelValue)
64
63
  }
65
- }), null) : e.handleFieldChange ? e.handleFieldChange(o) : s("update:modelValue", o);
64
+ }), null) : o.handleFieldChange ? o.handleFieldChange(e) : s("update:modelValue", e);
66
65
  }
67
- function v(o) {
68
- return e.handleFieldSubmit ? e.handleFieldSubmit(o) : s("submit", o);
66
+ function v(e) {
67
+ return o.handleFieldSubmit ? o.handleFieldSubmit(e) : s("submit", e);
69
68
  }
70
- function P(o) {
71
- B.value = !1, e.emitOnBlur && e.modelValue && v(o), s("blur", o);
69
+ function P(e) {
70
+ k.value = !1, o.emitOnBlur && o.modelValue && v(e), s("blur", e);
72
71
  }
73
- const E = [...e.extensions];
74
- e.colorPicker && E.push(_);
72
+ const E = [...o.extensions];
73
+ o.colorPicker && E.push(_);
75
74
  const N = d(
76
75
  () => le({
77
- environment: e.environment,
78
- envVariables: e.envVariables,
79
- workspace: e.workspace,
76
+ environment: o.environment,
77
+ envVariables: o.envVariables,
80
78
  isReadOnly: g === "modal"
81
79
  })
82
80
  ), O = d(() => [
@@ -85,25 +83,25 @@ const ae = { class: "whitespace-nowrap" }, re = ["id"], se = {
85
83
  te
86
84
  ]), F = i(null), { codeMirror: a } = Y({
87
85
  content: r(
88
- () => e.modelValue !== void 0 ? String(e.modelValue) : ""
86
+ () => o.modelValue !== void 0 ? String(o.modelValue) : ""
89
87
  ),
90
- onChange: (o) => {
91
- D(o), z();
88
+ onChange: (e) => {
89
+ D(e), z();
92
90
  },
93
- onFocus: () => B.value = !0,
94
- onBlur: (o) => P(o),
91
+ onFocus: () => k.value = !0,
92
+ onBlur: (e) => P(e),
95
93
  codeMirrorRef: F,
96
- disableTabIndent: r(() => e.disableTabIndent),
97
- disableEnter: r(() => e.disableEnter),
98
- disableCloseBrackets: r(() => e.disableCloseBrackets),
99
- lineNumbers: r(() => e.lineNumbers),
100
- language: r(() => e.language),
101
- lint: r(() => e.lint),
94
+ disableTabIndent: r(() => o.disableTabIndent),
95
+ disableEnter: r(() => o.disableEnter),
96
+ disableCloseBrackets: r(() => o.disableCloseBrackets),
97
+ lineNumbers: r(() => o.lineNumbers),
98
+ language: r(() => o.language),
99
+ lint: r(() => o.lint),
102
100
  extensions: O,
103
- placeholder: r(() => e.placeholder)
101
+ placeholder: r(() => o.placeholder)
104
102
  });
105
103
  a.value?.focus(), H(a, () => {
106
- a.value && Object.hasOwn(x, "autofocus") && a.value.focus();
104
+ a.value && Object.hasOwn(B, "autofocus") && a.value.focus();
107
105
  });
108
106
  const { handleDropdownSelect: K, updateDropdownVisibility: z } = Z({
109
107
  codeMirror: a,
@@ -111,17 +109,17 @@ const ae = { class: "whitespace-nowrap" }, re = ["id"], se = {
111
109
  showDropdown: y,
112
110
  dropdownPosition: S
113
111
  }), T = d(
114
- () => e.nullable ? ["true", "false", "null"] : ["true", "false"]
115
- ), m = (o, l) => {
116
- y.value ? o === "down" ? (l.preventDefault(), f.value?.handleArrowKey("down")) : o === "up" ? (l.preventDefault(), f.value?.handleArrowKey("up")) : o === "enter" && (l.preventDefault(), f.value?.handleSelect()) : o === "escape" ? e.disableTabIndent || l.stopPropagation() : o === "enter" && l.target instanceof HTMLDivElement && v(l.target.textContent ?? "");
117
- }, L = d(() => Array.isArray(e.type) ? (
112
+ () => o.nullable ? ["true", "false", "null"] : ["true", "false"]
113
+ ), m = (e, l) => {
114
+ y.value ? e === "down" ? (l.preventDefault(), f.value?.handleArrowKey("down")) : e === "up" ? (l.preventDefault(), f.value?.handleArrowKey("up")) : e === "enter" && (l.preventDefault(), f.value?.handleSelect()) : e === "escape" ? o.disableTabIndent || l.stopPropagation() : e === "enter" && l.target instanceof HTMLDivElement && v(l.target.textContent ?? "");
115
+ }, L = d(() => Array.isArray(o.type) ? (
118
116
  // Find the first type, that's not 'null'
119
- e.type.find((o) => o !== "null") ?? "string"
117
+ o.type.find((e) => e !== "null") ?? "string"
120
118
  ) : (
121
119
  // If it's not an array, just return the type
122
- e.type
120
+ o.type
123
121
  )), U = d(
124
- () => y.value && e.withVariables && g !== "modal" && e.environment
122
+ () => y.value && o.withVariables && g !== "modal" && o.environment
125
123
  );
126
124
  return A({
127
125
  /** Expose focus method */
@@ -134,42 +132,42 @@ const ae = { class: "whitespace-nowrap" }, re = ["id"], se = {
134
132
  handleBlur: P,
135
133
  booleanOptions: T,
136
134
  codeMirror: a,
137
- modelValue: e.modelValue
138
- }), (o, l) => (n(), u(Q, null, [
139
- o.disabled ? (n(), u("div", {
135
+ modelValue: o.modelValue
136
+ }), (e, l) => (n(), u(Q, null, [
137
+ e.disabled ? (n(), u("div", {
140
138
  key: 0,
141
139
  class: G(["text-c-2 flex cursor-default items-center justify-center", h(g) === "modal" ? "font-code pr-2 pl-1 text-base" : "px-2"]),
142
140
  "data-testid": "code-input-disabled"
143
141
  }, [
144
- w("span", ae, J(o.modelValue), 1)
145
- ], 2)) : e.enum && e.enum.length ? (n(), c(k, {
142
+ w("span", ae, J(e.modelValue), 1)
143
+ ], 2)) : o.enum && o.enum.length ? (n(), c(x, {
146
144
  key: 1,
147
- default: e.default,
148
- modelValue: o.modelValue,
145
+ default: o.default,
146
+ modelValue: e.modelValue,
149
147
  type: L.value,
150
- value: e.enum,
148
+ value: o.enum,
151
149
  "onUpdate:modelValue": l[0] || (l[0] = (t) => s("update:modelValue", t))
152
- }, null, 8, ["default", "modelValue", "type", "value"])) : o.type === "boolean" || o.type?.includes("boolean") ? (n(), c(k, {
150
+ }, null, 8, ["default", "modelValue", "type", "value"])) : e.type === "boolean" || e.type?.includes("boolean") ? (n(), c(x, {
153
151
  key: 2,
154
- default: e.default,
155
- modelValue: o.modelValue,
152
+ default: o.default,
153
+ modelValue: e.modelValue,
156
154
  value: T.value,
157
155
  "onUpdate:modelValue": l[1] || (l[1] = (t) => s("update:modelValue", t))
158
- }, null, 8, ["default", "modelValue", "value"])) : e.examples && e.examples.length ? (n(), c(k, {
156
+ }, null, 8, ["default", "modelValue", "value"])) : o.examples && o.examples.length ? (n(), c(x, {
159
157
  key: 3,
160
- default: e.default,
161
- modelValue: e.modelValue,
162
- value: e.examples,
158
+ default: o.default,
159
+ modelValue: o.modelValue,
160
+ value: o.examples,
163
161
  "onUpdate:modelValue": l[2] || (l[2] = (t) => s("update:modelValue", t))
164
162
  }, null, 8, ["default", "modelValue", "value"])) : (n(), u("div", X({
165
163
  key: 4,
166
164
  id: h(M)
167
- }, o.$attrs, {
165
+ }, e.$attrs, {
168
166
  ref_key: "codeMirrorRef",
169
167
  ref: F,
170
168
  class: ["group/input group-[.alert]:outline-orange group-[.error]:outline-red font-code peer relative w-full overflow-hidden text-xs leading-[1.44] whitespace-nowrap -outline-offset-1 has-[:focus-visible]:rounded-[4px] has-[:focus-visible]:outline", {
171
- "line-wrapping has-[:focus-visible]:bg-b-1 has-[:focus-visible]:absolute has-[:focus-visible]:z-1": o.lineWrapping,
172
- "flow-code-input--error": o.error
169
+ "line-wrapping has-[:focus-visible]:bg-b-1 has-[:focus-visible]:absolute has-[:focus-visible]:z-1": e.lineWrapping,
170
+ "flow-code-input--error": e.error
173
171
  }],
174
172
  onKeydown: [
175
173
  l[3] || (l[3] = b($((t) => m("down", t), ["stop"]), ["down"])),
@@ -178,7 +176,7 @@ const ae = { class: "whitespace-nowrap" }, re = ["id"], se = {
178
176
  l[6] || (l[6] = b($((t) => m("up", t), ["stop"]), ["up"]))
179
177
  ]
180
178
  }), [
181
- o.disableTabIndent ? p("", !0) : (n(), u("div", se, l[7] || (l[7] = [
179
+ e.disableTabIndent ? p("", !0) : (n(), u("div", se, l[7] || (l[7] = [
182
180
  V(" Press "),
183
181
  w("kbd", { class: "-mx-0.25 rounded border px-0.5 font-mono" }, "Esc", -1),
184
182
  V(" then "),
@@ -186,20 +184,20 @@ const ae = { class: "whitespace-nowrap" }, re = ["id"], se = {
186
184
  V(" to exit ")
187
185
  ])))
188
186
  ], 16, re)),
189
- o.$slots.warning ? (n(), u("div", ue, [
190
- q(o.$slots, "warning", {}, void 0, !0)
187
+ e.$slots.warning ? (n(), u("div", ue, [
188
+ q(e.$slots, "warning", {}, void 0, !0)
191
189
  ])) : p("", !0),
192
- o.$slots.icon ? (n(), u("div", ie, [
193
- q(o.$slots, "icon", {}, void 0, !0)
190
+ e.$slots.icon ? (n(), u("div", ie, [
191
+ q(e.$slots, "icon", {}, void 0, !0)
194
192
  ])) : p("", !0),
195
- o.required ? (n(), u("div", de, " Required ")) : p("", !0),
193
+ e.required ? (n(), u("div", de, " Required ")) : p("", !0),
196
194
  U.value ? (n(), c(oe, {
197
195
  key: 8,
198
196
  ref_key: "dropdownRef",
199
197
  ref: f,
200
198
  dropdownPosition: S.value,
201
- envVariables: o.envVariables,
202
- environment: o.environment,
199
+ envVariables: e.envVariables,
200
+ environment: e.environment,
203
201
  query: C.value,
204
202
  onSelect: h(K)
205
203
  }, null, 8, ["dropdownPosition", "envVariables", "environment", "query", "onSelect"])) : p("", !0)
@@ -1,14 +1,12 @@
1
- import { type EnvVariables } from '../../libs/env-helpers.js';
2
1
  import type { Environment } from '@scalar/oas-utils/entities/environment';
3
- import type { Workspace } from '@scalar/oas-utils/entities/workspace';
4
2
  import { Decoration, type DecorationSet, EditorView, ViewPlugin, type ViewUpdate } from '@scalar/use-codemirror';
3
+ import { type EnvVariables } from '../../libs/env-helpers.js';
5
4
  /**
6
5
  * Styles the active environment variable pill
7
6
  */
8
7
  export declare const pillPlugin: (props: {
9
8
  environment: Environment | undefined;
10
9
  envVariables: EnvVariables | undefined;
11
- workspace: Workspace | undefined;
12
10
  isReadOnly: boolean | undefined;
13
11
  }) => ViewPlugin<{
14
12
  decorations: DecorationSet;
@@ -1 +1 @@
1
- {"version":3,"file":"codeVariableWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeVariableWidget.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,oBAAoB,CAAA;AAGnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAErE,OAAO,EACL,UAAU,EACV,KAAK,aAAa,EAClB,UAAU,EAEV,UAAU,EACV,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAA;AAsG/B;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO;IAChC,WAAW,EAAE,WAAW,GAAG,SAAS,CAAA;IACpC,YAAY,EAAE,YAAY,GAAG,SAAS,CAAA;IACtC,SAAS,EAAE,SAAS,GAAG,SAAS,CAAA;IAChC,UAAU,EAAE,OAAO,GAAG,SAAS,CAAA;CAChC;iBAGkB,aAAa;mBAMX,UAAU;2BASF,UAAU;EAkCpC,CAAA;AAEH,eAAO,MAAM,gBAAgB,uCA8B3B,CAAA"}
1
+ {"version":3,"file":"codeVariableWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeVariableWidget.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAEzE,OAAO,EACL,UAAU,EACV,KAAK,aAAa,EAClB,UAAU,EAEV,UAAU,EACV,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAA;AAK/B,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,oBAAoB,CAAA;AAiGnE;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO;IAChC,WAAW,EAAE,WAAW,GAAG,SAAS,CAAA;IACpC,YAAY,EAAE,YAAY,GAAG,SAAS,CAAA;IACtC,UAAU,EAAE,OAAO,GAAG,SAAS,CAAA;CAChC;iBAGkB,aAAa;mBAMX,UAAU;2BASF,UAAU;EA4BpC,CAAA;AAEH,eAAO,MAAM,gBAAgB,uCA8B3B,CAAA"}
@@ -1,37 +1,36 @@
1
- import { getEnvColor as p } from "../../libs/env-helpers.js";
2
- import { ScalarTooltip as h } from "@scalar/components";
3
- import { ScalarIconGlobe as u } from "@scalar/icons";
4
- import { REGEX as v } from "@scalar/oas-utils/helpers";
5
- import { ViewPlugin as f, EditorView as b, RangeSetBuilder as g, Decoration as w, WidgetType as y } from "@scalar/use-codemirror";
6
- import { defineComponent as N, h as l, createApp as E } from "vue";
7
- import { nanoid as C } from "nanoid";
1
+ import { ScalarTooltip as p } from "@scalar/components";
2
+ import { ScalarIconGlobe as h } from "@scalar/icons";
3
+ import { REGEX as u } from "@scalar/oas-utils/helpers";
4
+ import { ViewPlugin as v, EditorView as f, RangeSetBuilder as b, Decoration as g, WidgetType as y } from "@scalar/use-codemirror";
5
+ import { nanoid as N } from "nanoid";
6
+ import { defineComponent as w, h as l, createApp as E } from "vue";
7
+ import { getEnvColor as C } from "../../libs/env-helpers.js";
8
8
  import { parseEnvVariables as V } from "../../libs/environment-parser.js";
9
9
  class m extends y {
10
- constructor(e, n, t, o, a) {
11
- super(), this.variableName = e, this.variableName = e, this.environment = n, this.envVariables = t, this.workspace = o, this.isReadOnly = a ?? !1, this.uid = C();
10
+ constructor(e, n, t, o) {
11
+ super(), this.variableName = e, this.variableName = e, this.environment = n, this.envVariables = t, this.isReadOnly = o ?? !1, this.uid = N();
12
12
  }
13
13
  app;
14
14
  uid;
15
15
  environment;
16
16
  envVariables;
17
- workspace;
18
17
  isReadOnly;
19
18
  toDOM() {
20
19
  const e = document.createElement("span");
21
20
  e.className = "cm-pill", e.textContent = `${this.variableName}`;
22
- const n = N({
21
+ const n = w({
23
22
  props: { variableName: { type: String, default: null } },
24
23
  render: () => {
25
- const t = this.envVariables ? V(this.envVariables).find((c) => c.key === this.variableName) : void 0, o = t?.source === "global", a = o ? "var(--scalar-color-1)" : t && this.environment && this.environment.name !== "No Environment" ? p(this.environment) : "var(--scalar-color-1)";
26
- e.style.setProperty("--tw-bg-base", a), e.style.opacity = t?.value ? "1" : "0.5";
27
- const r = t?.value || "No value", s = l("div", { class: "flex items-center gap-1 whitespace-nowrap" }, [
28
- (o || this.environment?.name === "No Environment" && t?.value) && l(u, { class: "size-3 -ml-1", icon: "Globe" }),
24
+ const t = this.envVariables ? V(this.envVariables).find((c) => c.key === this.variableName) : void 0, o = t?.source === "global", r = o ? "var(--scalar-color-1)" : t && this.environment && this.environment.name !== "No Environment" ? C(this.environment) : "var(--scalar-color-1)";
25
+ e.style.setProperty("--tw-bg-base", r), e.style.opacity = t?.value ? "1" : "0.5";
26
+ const a = t?.value || "No value", s = l("div", { class: "flex items-center gap-1 whitespace-nowrap" }, [
27
+ (o || this.environment?.name === "No Environment" && t?.value) && l(h, { class: "size-3 -ml-1", icon: "Globe" }),
29
28
  l("span", this.variableName)
30
29
  ]);
31
30
  return l(
32
- h,
31
+ p,
33
32
  {
34
- content: r,
33
+ content: a,
35
34
  delay: 0,
36
35
  placement: "bottom",
37
36
  offset: 6
@@ -54,7 +53,7 @@ class m extends y {
54
53
  return !1;
55
54
  }
56
55
  }
57
- const B = (i) => f.fromClass(
56
+ const B = (i) => v.fromClass(
58
57
  class {
59
58
  decorations;
60
59
  constructor(e) {
@@ -66,23 +65,17 @@ const B = (i) => f.fromClass(
66
65
  });
67
66
  }
68
67
  buildDecorations(e) {
69
- const n = new g();
68
+ const n = new b();
70
69
  for (const { from: t, to: o } of e.visibleRanges) {
71
- const a = e.state.doc.sliceString(t, o);
72
- let r;
73
- for (; (r = v.VARIABLES.exec(a)) !== null; ) {
74
- const s = t + r.index, c = s + r[0].length, d = r[1] ?? "";
70
+ const r = e.state.doc.sliceString(t, o);
71
+ let a;
72
+ for (; (a = u.VARIABLES.exec(r)) !== null; ) {
73
+ const s = t + a.index, c = s + a[0].length, d = a[1] ?? "";
75
74
  n.add(
76
75
  s,
77
76
  c,
78
- w.widget({
79
- widget: new m(
80
- d,
81
- i.environment,
82
- i.envVariables,
83
- i.workspace,
84
- i.isReadOnly
85
- ),
77
+ g.widget({
78
+ widget: new m(d, i.environment, i.envVariables, i.isReadOnly),
86
79
  side: 1
87
80
  })
88
81
  );
@@ -94,7 +87,7 @@ const B = (i) => f.fromClass(
94
87
  {
95
88
  decorations: (e) => e.decorations
96
89
  }
97
- ), P = b.domEventHandlers({
90
+ ), P = f.domEventHandlers({
98
91
  keydown(i, e) {
99
92
  if (i.key === "Backspace") {
100
93
  const { state: n } = e, { from: t, to: o } = n.selection.main;
@@ -1,5 +1,4 @@
1
1
  import type { Environment } from '@scalar/oas-utils/entities/environment';
2
- import type { Workspace } from '@scalar/oas-utils/entities/workspace';
3
2
  import type { EnvVariable } from '../../store/active-entities.js';
4
3
  import type { VueClassProp } from '../../types/vue';
5
4
  type __VLS_Props = {
@@ -17,7 +16,6 @@ type __VLS_Props = {
17
16
  max?: number;
18
17
  environment: Environment;
19
18
  envVariables: EnvVariable[];
20
- workspace: Workspace;
21
19
  description?: string | undefined;
22
20
  lineWrapping?: boolean;
23
21
  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AAM,GAAG,SAAS,CAAA;IAChC,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;AAwSJ,QAAA,IAAI,OAAO,IAAU,EAAuB,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AACvF,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAmC7C,QAAA,MAAM,eAAe;;;;;;;;;;;cA3VN,OAAO;cAIP,OAAO;kBAOH,OAAO;2BARE,OAAO;6EAgWjC,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import t from "./DataTableInput.vue2.js";
2
2
  /* empty css */
3
3
  import a from "../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ a(t, [["__scopeId", "data-v-46e1ae6e"]]);
4
+ const e = /* @__PURE__ */ a(t, [["__scopeId", "data-v-2b299aed"]]);
5
5
  export {
6
- r as default
6
+ e as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as g, ref as d, computed as B, createBlock as s, openBlock as n, normalizeClass as C, withCtx as $, createElementBlock as i, createCommentVNode as u, createElementVNode as I, renderSlot as p, createTextVNode as O, Fragment as h, mergeProps as c, unref as m } from "vue";
1
+ import { defineComponent as g, ref as d, computed as B, createBlock as s, openBlock as a, normalizeClass as C, withCtx as $, createElementBlock as i, createCommentVNode as u, createElementVNode as I, renderSlot as p, createTextVNode as O, Fragment as h, mergeProps as v, unref as m } from "vue";
2
2
  import { ScalarIconButton as E } from "@scalar/components";
3
3
  import { ScalarIconEye as S, ScalarIconEyeSlash as A } from "@scalar/icons";
4
4
  import W from "../CodeInput/CodeInput.vue.js";
@@ -23,24 +23,23 @@ const T = ["for"], N = { class: "relative flex min-w-0 flex-1" }, P = ["readOnly
23
23
  max: {},
24
24
  environment: {},
25
25
  envVariables: {},
26
- workspace: {},
27
26
  description: {},
28
27
  lineWrapping: { type: Boolean, default: !1 }
29
28
  },
30
29
  emits: ["update:modelValue", "inputFocus", "inputBlur", "selectVariable"],
31
- setup(v, { emit: V }) {
32
- const a = v, t = V, r = d(!0), w = d(!1), f = d(null), k = () => {
30
+ setup(c, { emit: V }) {
31
+ const n = c, t = V, r = d(!0), w = d(!1), f = d(null), k = () => {
33
32
  w.value || t("inputBlur");
34
33
  }, y = B(
35
- () => a.type === "password" ? "text" : a.type ?? "text"
34
+ () => n.type === "password" ? "text" : n.type ?? "text"
36
35
  ), b = () => {
37
- !a.enum?.length && !a.readOnly && f.value?.focus();
36
+ !n.enum?.length && !n.readOnly && f.value?.focus();
38
37
  };
39
- return (e, l) => (n(), s(q, {
38
+ return (e, l) => (a(), s(q, {
40
39
  class: C(["relative flex", e.containerClass])
41
40
  }, {
42
41
  default: $(() => [
43
- e.$slots.default ? (n(), i("div", {
42
+ e.$slots.default ? (a(), i("div", {
44
43
  key: 0,
45
44
  class: "text-c-1 flex items-center pr-0 pl-3",
46
45
  for: e.id ?? "",
@@ -50,14 +49,14 @@ const T = ["for"], N = { class: "relative flex min-w-0 flex-1" }, P = ["readOnly
50
49
  l[5] || (l[5] = O(": "))
51
50
  ], 8, T)) : u("", !0),
52
51
  I("div", N, [
53
- a.enum && a.enum.length ? (n(), s(F, {
52
+ n.enum && n.enum.length ? (a(), s(F, {
54
53
  key: 0,
55
- canAddCustomValue: a.canAddCustomEnumValue,
56
- modelValue: a.modelValue,
57
- value: a.enum,
54
+ canAddCustomValue: n.canAddCustomEnumValue,
55
+ modelValue: n.modelValue,
56
+ value: n.enum,
58
57
  "onUpdate:modelValue": l[0] || (l[0] = (o) => t("update:modelValue", o))
59
- }, null, 8, ["canAddCustomValue", "modelValue", "value"])) : (n(), i(h, { key: 1 }, [
60
- r.value && e.type === "password" ? (n(), i("input", c({ key: 0 }, e.id ? { ...e.$attrs, id: e.id } : e.$attrs, {
58
+ }, null, 8, ["canAddCustomValue", "modelValue", "value"])) : (a(), i(h, { key: 1 }, [
59
+ r.value && e.type === "password" ? (a(), i("input", v({ key: 0 }, e.id ? { ...e.$attrs, id: e.id } : e.$attrs, {
61
60
  autocomplete: "off",
62
61
  class: ["text-c-1 disabled:text-c-2 peer w-full min-w-0 border-none px-2 py-1.25 -outline-offset-1", { "scalar-password-input": e.type === "password" }],
63
62
  "data-1p-ignore": "",
@@ -69,7 +68,7 @@ const T = ["for"], N = { class: "relative flex min-w-0 flex-1" }, P = ["readOnly
69
68
  "update:modelValue",
70
69
  o.target.value ?? ""
71
70
  ))
72
- }), null, 16, P)) : (n(), s(W, c({ key: 1 }, e.$attrs, {
71
+ }), null, 16, P)) : (a(), s(W, v({ key: 1 }, e.$attrs, {
73
72
  id: e.id,
74
73
  ref_key: "codeInput",
75
74
  ref: f,
@@ -91,18 +90,17 @@ const T = ["for"], N = { class: "relative flex min-w-0 flex-1" }, P = ["readOnly
91
90
  required: !!e.required,
92
91
  spellcheck: "false",
93
92
  type: y.value,
94
- workspace: e.workspace,
95
93
  onBlur: k,
96
94
  onFocus: l[2] || (l[2] = (o) => t("inputFocus")),
97
95
  "onUpdate:modelValue": l[3] || (l[3] = (o) => t("update:modelValue", o))
98
- }), null, 16, ["id", "class", "description", "envVariables", "environment", "lineWrapping", "max", "min", "modelValue", "readOnly", "required", "type", "workspace"]))
96
+ }), null, 16, ["id", "class", "description", "envVariables", "environment", "lineWrapping", "max", "min", "modelValue", "readOnly", "required", "type"]))
99
97
  ], 64))
100
98
  ]),
101
- e.$slots.warning ? (n(), i("div", D, [
99
+ e.$slots.warning ? (a(), i("div", D, [
102
100
  p(e.$slots, "warning", {}, void 0, !0)
103
101
  ])) : u("", !0),
104
102
  p(e.$slots, "icon", {}, void 0, !0),
105
- e.type === "password" ? (n(), s(m(E), {
103
+ e.type === "password" ? (a(), s(m(E), {
106
104
  key: 2,
107
105
  class: "-ml-.5 mr-1.25 h-6 w-6 self-center p-1.25",
108
106
  icon: r.value ? m(S) : m(A),