@scalar/api-client 2.23.4 → 2.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 (103) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  3. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  4. package/dist/style.css +1 -1
  5. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +8 -0
  6. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  7. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +33 -29
  8. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +6 -0
  9. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
  10. package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
  11. package/dist/v2/blocks/operation-block/components/Header.vue2.js +46 -29
  12. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
  13. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.d.ts +15 -0
  14. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.d.ts.map +1 -0
  15. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js +125 -0
  16. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue2.js +4 -0
  17. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +2 -2
  18. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  19. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +2 -2
  20. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
  21. package/dist/v2/features/app/App.vue.d.ts +8 -0
  22. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  23. package/dist/v2/features/app/App.vue.js +95 -108
  24. package/dist/v2/features/app/app-state.d.ts +46 -16
  25. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  26. package/dist/v2/features/app/app-state.js +174 -161
  27. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +2 -2
  28. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  29. package/dist/v2/features/app/components/AppSidebar.vue.js +3 -3
  30. package/dist/v2/features/app/components/WebTopNav.vue.d.ts +3 -3
  31. package/dist/v2/features/app/components/WebTopNav.vue.d.ts.map +1 -1
  32. package/dist/v2/features/app/helpers/filter-workspaces.d.ts +49 -0
  33. package/dist/v2/features/app/helpers/filter-workspaces.d.ts.map +1 -0
  34. package/dist/v2/features/app/helpers/filter-workspaces.js +5 -0
  35. package/dist/v2/features/app/helpers/group-workspaces.d.ts +24 -0
  36. package/dist/v2/features/app/helpers/group-workspaces.d.ts.map +1 -0
  37. package/dist/v2/features/app/helpers/group-workspaces.js +23 -0
  38. package/dist/v2/features/app/hooks/use-document-watcher.js +8 -8
  39. package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
  40. package/dist/v2/features/collection/components/Environment.vue.js +12 -11
  41. package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
  42. package/dist/v2/features/collection/components/Settings.vue.js +17 -25
  43. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts +1 -1
  44. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts.map +1 -1
  45. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js +115 -118
  46. package/dist/v2/features/{import-listener → command-palette}/helpers/generate-unique-slug.d.ts.map +1 -1
  47. package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts +14 -4
  48. package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts.map +1 -1
  49. package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.js +5 -6
  50. package/dist/v2/features/{import-listener → command-palette}/helpers/import-document-to-workspace.d.ts.map +1 -1
  51. package/dist/v2/features/command-palette/helpers/load-document-from-source.d.ts +16 -0
  52. package/dist/v2/features/command-palette/helpers/load-document-from-source.d.ts.map +1 -0
  53. package/dist/v2/features/command-palette/helpers/load-document-from-source.js +34 -0
  54. package/dist/v2/features/command-palette/index.d.ts +4 -0
  55. package/dist/v2/features/command-palette/index.d.ts.map +1 -0
  56. package/dist/v2/features/command-palette/index.js +8 -0
  57. package/dist/v2/features/environments/EnvironmentsList.vue.d.ts +4 -0
  58. package/dist/v2/features/environments/EnvironmentsList.vue.d.ts.map +1 -1
  59. package/dist/v2/features/environments/EnvironmentsList.vue.js +29 -27
  60. package/dist/v2/features/environments/components/Environment.vue.d.ts +1 -0
  61. package/dist/v2/features/environments/components/Environment.vue.d.ts.map +1 -1
  62. package/dist/v2/features/environments/components/Environment.vue.js +37 -24
  63. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  64. package/dist/v2/features/modal/Modal.vue.js +2 -2
  65. package/dist/v2/features/modal/Modal.vue2.js +39 -38
  66. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  67. package/dist/v2/features/operation/Operation.vue.js +35 -26
  68. package/dist/v2/workspace-events.d.ts.map +1 -1
  69. package/dist/v2/workspace-events.js +7 -0
  70. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  71. package/package.json +15 -15
  72. package/dist/v2/features/import-listener/ImportListener.vue.d.ts +0 -52
  73. package/dist/v2/features/import-listener/ImportListener.vue.d.ts.map +0 -1
  74. package/dist/v2/features/import-listener/ImportListener.vue.js +0 -91
  75. package/dist/v2/features/import-listener/ImportListener.vue2.js +0 -4
  76. package/dist/v2/features/import-listener/components/DropEventListener.vue.d.ts +0 -7
  77. package/dist/v2/features/import-listener/components/DropEventListener.vue.d.ts.map +0 -1
  78. package/dist/v2/features/import-listener/components/DropEventListener.vue.js +0 -81
  79. package/dist/v2/features/import-listener/components/DropEventListener.vue2.js +0 -4
  80. package/dist/v2/features/import-listener/components/ImportModal.vue.d.ts +0 -40
  81. package/dist/v2/features/import-listener/components/ImportModal.vue.d.ts.map +0 -1
  82. package/dist/v2/features/import-listener/components/ImportModal.vue.js +0 -170
  83. package/dist/v2/features/import-listener/components/ImportModal.vue3.js +0 -5
  84. package/dist/v2/features/import-listener/components/WorkspaceSelector.vue.d.ts +0 -29
  85. package/dist/v2/features/import-listener/components/WorkspaceSelector.vue.d.ts.map +0 -1
  86. package/dist/v2/features/import-listener/components/WorkspaceSelector.vue.js +0 -83
  87. package/dist/v2/features/import-listener/components/WorkspaceSelector.vue2.js +0 -4
  88. package/dist/v2/features/import-listener/helpers/get-url-query-parameter.d.ts +0 -8
  89. package/dist/v2/features/import-listener/helpers/get-url-query-parameter.d.ts.map +0 -1
  90. package/dist/v2/features/import-listener/helpers/get-url-query-parameter.js +0 -4
  91. package/dist/v2/features/import-listener/helpers/load-document-from-source.d.ts +0 -15
  92. package/dist/v2/features/import-listener/helpers/load-document-from-source.d.ts.map +0 -1
  93. package/dist/v2/features/import-listener/helpers/load-document-from-source.js +0 -28
  94. package/dist/v2/features/import-listener/helpers/wait-for-condition.d.ts +0 -15
  95. package/dist/v2/features/import-listener/helpers/wait-for-condition.d.ts.map +0 -1
  96. package/dist/v2/features/import-listener/helpers/wait-for-condition.js +0 -16
  97. package/dist/v2/features/import-listener/index.d.ts +0 -2
  98. package/dist/v2/features/import-listener/index.d.ts.map +0 -1
  99. package/dist/v2/features/import-listener/index.js +0 -4
  100. /package/dist/v2/features/{import-listener → command-palette}/helpers/generate-unique-slug.d.ts +0 -0
  101. /package/dist/v2/features/{import-listener → command-palette}/helpers/generate-unique-slug.js +0 -0
  102. /package/dist/v2/features/{import-listener → command-palette}/helpers/import-document-to-workspace.d.ts +0 -0
  103. /package/dist/v2/features/{import-listener → command-palette}/helpers/import-document-to-workspace.js +0 -0
@@ -1,4 +0,0 @@
1
- import f from "./WorkspaceSelector.vue.js";
2
- export {
3
- f as default
4
- };
@@ -1,8 +0,0 @@
1
- /**
2
- * Gets the value of a specific query parameter from the current URL.
3
- *
4
- * @param parameterName - The name of the query parameter to retrieve
5
- * @returns The value of the query parameter, or null if it does not exist
6
- */
7
- export declare const getUrlQueryParameter: (parameterName: string) => string | null;
8
- //# sourceMappingURL=get-url-query-parameter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-url-query-parameter.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/import-listener/helpers/get-url-query-parameter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,eAAe,MAAM,KAAG,MAAM,GAAG,IAGrE,CAAA"}
@@ -1,4 +0,0 @@
1
- const a = (e) => new URLSearchParams(window.location.search).get(e);
2
- export {
3
- a as getUrlQueryParameter
4
- };
@@ -1,15 +0,0 @@
1
- import type { WorkspaceStore } from '@scalar/workspace-store/client';
2
- /**
3
- * Loads a document from a given source (URL or raw content) and adds it to the workspace.
4
- *
5
- * - If the source is a URL, adds the document from the URL and enables/disables watch mode as requested.
6
- * - If the source is raw content (like pasted JSON/YAML), normalizes and adds it as a document.
7
- *
8
- * @param workspaceStore The workspace store to add the document to
9
- * @param source The source to load the document from (URL or raw content)
10
- * @param name The name of the document
11
- * @param watchMode Whether to enable watch mode for URL sources
12
- * @returns Promise resolving to true if the document is added successfully, false otherwise
13
- */
14
- export declare const loadDocumentFromSource: (workspaceStore: WorkspaceStore, source: string | null, name: string, watchMode: boolean) => Promise<boolean>;
15
- //# sourceMappingURL=load-document-from-source.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"load-document-from-source.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/import-listener/helpers/load-document-from-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAIpE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,GACjC,gBAAgB,cAAc,EAC9B,QAAQ,MAAM,GAAG,IAAI,EACrB,MAAM,MAAM,EACZ,WAAW,OAAO,KACjB,OAAO,CAAC,OAAO,CAqCjB,CAAA"}
@@ -1,28 +0,0 @@
1
- import { normalize as m } from "@scalar/openapi-parser";
2
- import { isUrl as i } from "../../../helpers/is-url.js";
3
- const f = async (r, t, n, o) => {
4
- if (!t)
5
- return !1;
6
- if (i(t))
7
- return await r.addDocument({
8
- name: n,
9
- url: t,
10
- meta: {
11
- "x-scalar-watch-mode": o
12
- }
13
- });
14
- const e = ((a) => {
15
- try {
16
- return m(a);
17
- } catch (l) {
18
- return console.error(l), null;
19
- }
20
- })(t);
21
- return e === null ? !1 : await r.addDocument({
22
- name: n,
23
- document: e
24
- });
25
- };
26
- export {
27
- f as loadDocumentFromSource
28
- };
@@ -1,15 +0,0 @@
1
- /**
2
- * Waits for a condition to be true with a timeout.
3
- * Checks the condition at a specified interval up to a maximum wait time.
4
- *
5
- * @param checkCondition - Function that returns true when the condition is met
6
- * @param options - Configuration options
7
- * @param options.checkInterval - Time in milliseconds between checks (default: 100)
8
- * @param options.maxWaitTime - Maximum time in milliseconds to wait (default: 3000)
9
- * @returns Promise that resolves to true if the condition is met, false if it timed out
10
- */
11
- export declare const waitForCondition: (checkCondition: () => boolean, options?: {
12
- checkInterval?: number;
13
- maxWaitTime?: number;
14
- }) => Promise<boolean>;
15
- //# sourceMappingURL=wait-for-condition.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wait-for-condition.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/import-listener/helpers/wait-for-condition.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,GAC3B,gBAAgB,MAAM,OAAO,EAC7B,UAAS;IACP,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;CAChB,KACL,OAAO,CAAC,OAAO,CAuBjB,CAAA"}
@@ -1,16 +0,0 @@
1
- const s = (t, l = {}) => {
2
- const { checkInterval: r = 100, maxWaitTime: i = 3e3 } = l;
3
- return new Promise((e) => {
4
- if (t()) {
5
- e(!0);
6
- return;
7
- }
8
- let a = 0;
9
- const n = setInterval(() => {
10
- a += r, t() ? (clearInterval(n), e(!0)) : a >= i && (clearInterval(n), e(!1));
11
- }, r);
12
- });
13
- };
14
- export {
15
- s as waitForCondition
16
- };
@@ -1,2 +0,0 @@
1
- export { default as ImportListener } from './ImportListener.vue.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/import-listener/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA"}
@@ -1,4 +0,0 @@
1
- import { default as t } from "./ImportListener.vue.js";
2
- export {
3
- t as ImportListener
4
- };