@scalar/api-client 2.12.0 → 2.13.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 (178) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
  3. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  4. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +2 -2
  5. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
  6. package/dist/components/CommandPalette/CommandActionForm.vue.js +14 -14
  7. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +38 -38
  8. package/dist/components/EmptyState.vue.d.ts.map +1 -1
  9. package/dist/components/EmptyState.vue.js +2 -2
  10. package/dist/components/EmptyState.vue2.js +27 -16
  11. package/dist/components/TopNav/TopNav.vue.js +33 -33
  12. package/dist/layouts/App/create-api-client-app.d.ts +28 -28
  13. package/dist/layouts/Web/create-api-client-web.d.ts +28 -28
  14. package/dist/libs/create-client.d.ts +28 -28
  15. package/dist/libs/hot-keys.d.ts +2 -2
  16. package/dist/libs/send-request/create-fetch-body.d.ts +2 -2
  17. package/dist/store/active-entities.d.ts +2 -2
  18. package/dist/store/collections.d.ts +4 -4
  19. package/dist/store/index.d.ts +1 -1
  20. package/dist/store/index.d.ts.map +1 -1
  21. package/dist/store/index.js +8 -8
  22. package/dist/store/request-example.d.ts +12 -12
  23. package/dist/store/store.d.ts +28 -28
  24. package/dist/store/workspace.d.ts +12 -12
  25. package/dist/style.css +1 -1
  26. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +1 -2
  27. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  28. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +9 -8
  29. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -1
  30. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
  31. package/dist/v2/blocks/operation-block/components/Header.vue.js +3 -3
  32. package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
  33. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
  34. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
  35. package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +14 -11
  36. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js +22 -22
  37. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +2 -2
  38. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
  39. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +2 -2
  40. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +18 -15
  41. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +2 -2
  42. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue2.js +17 -17
  43. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  44. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
  45. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +17 -12
  46. package/dist/v2/blocks/scalar-address-bar-block/index.d.ts.map +1 -1
  47. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +205 -0
  48. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -0
  49. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +52 -52
  50. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +1 -1
  51. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
  52. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +205 -0
  53. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -0
  54. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
  55. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +1 -2
  56. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  57. package/dist/v2/components/sidebar/Sidebar.vue.js +1 -1
  58. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  59. package/dist/v2/features/app/App.vue.js +126 -103
  60. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +0 -2
  61. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  62. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  63. package/dist/v2/features/app/components/AppSidebar.vue2.js +56 -53
  64. package/dist/v2/features/app/components/DesktopTab.vue.d.ts +26 -0
  65. package/dist/v2/features/app/components/DesktopTab.vue.d.ts.map +1 -0
  66. package/dist/v2/features/app/components/DesktopTab.vue.js +7 -0
  67. package/dist/v2/features/app/components/DesktopTab.vue2.js +134 -0
  68. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +9 -4
  69. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
  70. package/dist/v2/features/app/components/DesktopTabs.vue.js +47 -13
  71. package/dist/v2/features/app/components/DesktopTabs.vue2.js +2 -4
  72. package/dist/v2/features/app/components/SplashScreen.vue.js +2 -2
  73. package/dist/v2/features/app/components/SplashScreen.vue2.js +2 -2
  74. package/dist/v2/features/app/helpers/routes.js +1 -1
  75. package/dist/v2/features/collection/components/Settings.vue2.js +3 -3
  76. package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts +61 -0
  77. package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts.map +1 -0
  78. package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +48 -0
  79. package/dist/v2/features/command-palette/components/CommandActionForm.vue2.js +4 -0
  80. package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts +39 -0
  81. package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts.map +1 -0
  82. package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +52 -0
  83. package/dist/v2/features/command-palette/components/CommandActionInput.vue2.js +4 -0
  84. package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts +36 -0
  85. package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts.map +1 -0
  86. package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.js +78 -0
  87. package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue2.js +4 -0
  88. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +30 -0
  89. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -0
  90. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +169 -0
  91. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue2.js +4 -0
  92. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts +34 -0
  93. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts.map +1 -0
  94. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js +175 -0
  95. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue2.js +4 -0
  96. package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts +43 -0
  97. package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts.map +1 -0
  98. package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js +7 -0
  99. package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue2.js +115 -0
  100. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +39 -0
  101. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -0
  102. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +213 -0
  103. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue2.js +4 -0
  104. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +38 -0
  105. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -0
  106. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +89 -0
  107. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue2.js +4 -0
  108. package/dist/v2/features/command-palette/components/TheCommandPalette.vue.d.ts +41 -0
  109. package/dist/v2/features/command-palette/components/TheCommandPalette.vue.d.ts.map +1 -0
  110. package/dist/v2/features/command-palette/components/TheCommandPalette.vue.js +7 -0
  111. package/dist/v2/features/command-palette/components/TheCommandPalette.vue2.js +172 -0
  112. package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts +33 -0
  113. package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts.map +1 -0
  114. package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +40 -0
  115. package/dist/v2/features/command-palette/components/WatchModeToggle.vue2.js +4 -0
  116. package/dist/v2/features/command-palette/components/index.d.ts +2 -0
  117. package/dist/v2/features/command-palette/components/index.d.ts.map +1 -0
  118. package/dist/v2/features/command-palette/components/index.js +4 -0
  119. package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts +23 -0
  120. package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts.map +1 -0
  121. package/dist/v2/features/command-palette/helpers/get-openapi-document-details.js +31 -0
  122. package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts +13 -0
  123. package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts.map +1 -0
  124. package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.js +12 -0
  125. package/dist/v2/features/command-palette/helpers/get-operation-from-curl.d.ts +26 -0
  126. package/dist/v2/features/command-palette/helpers/get-operation-from-curl.d.ts.map +1 -0
  127. package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js +70 -0
  128. package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts +23 -0
  129. package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts.map +1 -0
  130. package/dist/v2/features/command-palette/helpers/get-postman-document-details.js +18 -0
  131. package/dist/v2/features/command-palette/helpers/is-postman-collection.d.ts +11 -0
  132. package/dist/v2/features/command-palette/helpers/is-postman-collection.d.ts.map +1 -0
  133. package/dist/v2/features/command-palette/helpers/is-postman-collection.js +11 -0
  134. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +202 -0
  135. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -0
  136. package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +109 -0
  137. package/dist/v2/features/command-palette/types.d.ts +82 -0
  138. package/dist/v2/features/command-palette/types.d.ts.map +1 -0
  139. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  140. package/dist/v2/features/operation/Operation.vue.js +24 -20
  141. package/dist/v2/helpers/drag-handle-factory.d.ts +1 -2
  142. package/dist/v2/helpers/drag-handle-factory.d.ts.map +1 -1
  143. package/dist/v2/helpers/drag-handle-factory.js +74 -90
  144. package/dist/v2/helpers/get-tab-details.d.ts +43 -0
  145. package/dist/v2/helpers/get-tab-details.d.ts.map +1 -0
  146. package/dist/v2/helpers/get-tab-details.js +34 -0
  147. package/dist/v2/helpers/handle-hotkeys.js +1 -1
  148. package/dist/v2/helpers/is-url.d.ts +2 -0
  149. package/dist/v2/helpers/is-url.d.ts.map +1 -0
  150. package/dist/v2/helpers/is-url.js +5 -0
  151. package/dist/v2/helpers/remove-circular.d.ts +15 -0
  152. package/dist/v2/helpers/remove-circular.d.ts.map +1 -0
  153. package/dist/v2/helpers/remove-circular.js +18 -0
  154. package/dist/v2/helpers/storage.d.ts +4 -6
  155. package/dist/v2/helpers/storage.d.ts.map +1 -1
  156. package/dist/v2/helpers/storage.js +8 -12
  157. package/dist/v2/hooks/use-sidebar-state.d.ts +12 -19
  158. package/dist/v2/hooks/use-sidebar-state.d.ts.map +1 -1
  159. package/dist/v2/hooks/use-sidebar-state.js +20 -18
  160. package/dist/v2/hooks/use-sync-path.d.ts +11 -0
  161. package/dist/v2/hooks/use-sync-path.d.ts.map +1 -0
  162. package/dist/v2/hooks/use-sync-path.js +51 -0
  163. package/dist/v2/hooks/use-tabs.d.ts +31 -0
  164. package/dist/v2/hooks/use-tabs.d.ts.map +1 -0
  165. package/dist/v2/hooks/use-tabs.js +44 -0
  166. package/dist/v2/hooks/use-workspace-client-events.d.ts +5 -2
  167. package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
  168. package/dist/v2/hooks/use-workspace-client-events.js +91 -36
  169. package/dist/v2/hooks/use-workspace-selector.d.ts +16 -6
  170. package/dist/v2/hooks/use-workspace-selector.d.ts.map +1 -1
  171. package/dist/v2/hooks/use-workspace-selector.js +58 -64
  172. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  173. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +78 -78
  174. package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js +29 -29
  175. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  176. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +2 -2
  177. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +19 -19
  178. package/package.json +136 -46
@@ -0,0 +1,31 @@
1
+ import type { HttpMethod } from '@scalar/helpers/http/http-methods';
2
+ import type { WorkspaceStore } from '@scalar/workspace-store/client';
3
+ import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
4
+ import type { Tab } from '@scalar/workspace-store/schemas/extensions/workspace';
5
+ import { type MaybeRefOrGetter, type Ref } from 'vue';
6
+ import type { UseSidebarStateReturn } from '../../v2/hooks/use-sidebar-state.js';
7
+ export type UseTabsReturn = {
8
+ tabs: Ref<Tab[]>;
9
+ activeTabIndex: Ref<number>;
10
+ copyTabUrl: (index: number) => Promise<void>;
11
+ isLoading: Ref<boolean>;
12
+ createTabFromCurrentRoute: () => Tab;
13
+ };
14
+ type UseTabsParams = {
15
+ workspaceStore: Ref<WorkspaceStore | null>;
16
+ eventBus: WorkspaceEventBus;
17
+ workspaceSlug: MaybeRefOrGetter<string | undefined>;
18
+ documentSlug: MaybeRefOrGetter<string | undefined>;
19
+ path: MaybeRefOrGetter<string | undefined>;
20
+ method: MaybeRefOrGetter<HttpMethod | undefined>;
21
+ getEntryByLocation: UseSidebarStateReturn['getEntryByLocation'];
22
+ };
23
+ /**
24
+ * Composable for managing desktop tabs functionality.
25
+ *
26
+ * Handles tab creation, switching, closing, and synchronization with the current route.
27
+ * Tabs are persisted in the workspace store to maintain state across sessions.
28
+ */
29
+ export declare const useTabs: ({ workspaceStore, getEntryByLocation, workspaceSlug, documentSlug, path, method, }: UseTabsParams) => UseTabsReturn;
30
+ export {};
31
+ //# sourceMappingURL=use-tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-tabs.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-tabs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sDAAsD,CAAA;AAC/E,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,GAAG,EAA0B,MAAM,KAAK,CAAA;AAI7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AAMzE,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,CAAA;IAChB,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5C,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACvB,yBAAyB,EAAE,MAAM,GAAG,CAAA;CACrC,CAAA;AAED,KAAK,aAAa,GAAG;IACnB,cAAc,EAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IAC1C,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,aAAa,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACnD,YAAY,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAClD,IAAI,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC1C,MAAM,EAAE,gBAAgB,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;IAChD,kBAAkB,EAAE,qBAAqB,CAAC,oBAAoB,CAAC,CAAA;CAChE,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAAI,oFAOrB,aAAa,KAAG,aA4DlB,CAAA"}
@@ -0,0 +1,44 @@
1
+ import { ref as f, computed as n, toValue as t } from "vue";
2
+ import { useRoute as h } from "vue-router";
3
+ import { getTabDetails as v } from "../helpers/get-tab-details.js";
4
+ const x = "x-scalar-tabs", y = "x-scalar-active-tab", C = ({
5
+ workspaceStore: o,
6
+ getEntryByLocation: s,
7
+ workspaceSlug: i,
8
+ documentSlug: u,
9
+ path: l,
10
+ method: p
11
+ }) => {
12
+ const b = h(), d = f(!1), a = () => ({
13
+ ...v({
14
+ workspace: t(i),
15
+ document: t(u),
16
+ path: t(l),
17
+ method: t(p),
18
+ getEntryByLocation: s
19
+ }),
20
+ path: b.path
21
+ }), r = n(() => o.value?.workspace[x] ?? [a()]), m = n(() => o.value?.workspace[y] ?? 0);
22
+ return {
23
+ tabs: r,
24
+ activeTabIndex: m,
25
+ copyTabUrl: async (e) => {
26
+ const c = r.value[e];
27
+ if (!c) {
28
+ console.warn(`Cannot copy URL: tab at index ${e} does not exist`);
29
+ return;
30
+ }
31
+ const T = `${window.location.origin}${c.path}`;
32
+ try {
33
+ await navigator.clipboard.writeText(T);
34
+ } catch (w) {
35
+ console.error("Failed to copy URL to clipboard:", w);
36
+ }
37
+ },
38
+ isLoading: d,
39
+ createTabFromCurrentRoute: a
40
+ };
41
+ };
42
+ export {
43
+ C as useTabs
44
+ };
@@ -2,14 +2,17 @@ import type { WorkspaceStore } from '@scalar/workspace-store/client';
2
2
  import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
3
3
  import type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace';
4
4
  import { type ComputedRef, type Ref } from 'vue';
5
+ import type { UseCommandPaletteStateReturn } from '../../v2/features/command-palette/hooks/use-command-palette-state.js';
6
+ import type { UseSidebarStateReturn } from '../../v2/hooks/use-sidebar-state.js';
5
7
  /**
6
8
  * Top level state mutation handling for the workspace store in the client
7
9
  */
8
- export declare const useWorkspaceClientEvents: ({ eventBus, document, workspaceStore, navigateTo, isSidebarOpen, }: {
10
+ export declare const useWorkspaceClientEvents: ({ eventBus, document, workspaceStore, isSidebarOpen, commandPaletteState, sidebarState, }: {
9
11
  eventBus: WorkspaceEventBus;
10
12
  document: ComputedRef<WorkspaceDocument | null>;
11
13
  workspaceStore: Ref<WorkspaceStore | null>;
12
- navigateTo: (id: string) => Promise<unknown> | undefined;
13
14
  isSidebarOpen: Ref<boolean>;
15
+ commandPaletteState: UseCommandPaletteStateReturn;
16
+ sidebarState: UseSidebarStateReturn;
14
17
  }) => void;
15
18
  //# sourceMappingURL=use-workspace-client-events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-workspace-client-events.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-workspace-client-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAkB,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAoCvF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAClF,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,GAAG,EAAW,MAAM,KAAK,CAAA;AAEzD;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,oEAMtC;IACD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,QAAQ,EAAE,WAAW,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;IAC/C,cAAc,EAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IAC1C,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,SAAS,CAAA;IACxD,aAAa,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;CAC5B,SA6HA,CAAA"}
1
+ {"version":3,"file":"use-workspace-client-events.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-workspace-client-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAwC,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAgD7G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAClF,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,GAAG,EAAW,MAAM,KAAK,CAAA;AAGzD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+DAA+D,CAAA;AACjH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AAEzE;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,2FAOtC;IACD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,QAAQ,EAAE,WAAW,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;IAC/C,cAAc,EAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IAC1C,aAAa,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAC3B,mBAAmB,EAAE,4BAA4B,CAAA;IACjD,YAAY,EAAE,qBAAqB,CAAA;CACpC,SA6PA,CAAA"}
@@ -1,57 +1,112 @@
1
- import { mergeObjects as d } from "@scalar/workspace-store/helpers/merge-object";
2
- import { updateActiveProxy as u, updateColorMode as c, updateTheme as v, updateDocumentIcon as s, toggleSecurity as y, updateWatchMode as m, upsertEnvironment as h, upsertEnvironmentVariable as w, upsertCookie as O, deleteCookie as S, deleteSecurityScheme as R, updateSelectedAuthTab as f, updateSecurityScheme as k, updateSelectedScopes as q, updateSelectedSecuritySchemes as b, addServer as g, updateServer as x, deleteServer as T, updateServerVariables as C, updateSelectedServer as P, updateOperationMethod as E, updateOperationPath as A, updateOperationSummary as F, addOperationParameter as M, updateOperationParameter as V, deleteOperationParameter as W, deleteAllOperationParameters as j, updateOperationRequestBodyContentType as D, updateOperationRequestBodyExample as I, addOperationRequestBodyFormRow as z, updateOperationRequestBodyFormRow as G, deleteOperationRequestBodyFormRow as H } from "@scalar/workspace-store/mutators";
3
- import { toValue as J } from "vue";
4
- const Q = ({
1
+ import { mergeObjects as v } from "@scalar/workspace-store/helpers/merge-object";
2
+ import { updateActiveProxy as b, updateColorMode as h, updateTheme as y, updateDocumentIcon as f, toggleSecurity as x, updateWatchMode as T, createEmptyDocument as g, upsertEnvironment as w, upsertEnvironmentVariable as O, upsertCookie as R, deleteCookie as q, deleteSecurityScheme as C, updateSelectedAuthTab as E, updateSecurityScheme as k, updateSelectedScopes as P, updateSelectedSecuritySchemes as A, addServer as I, updateServer as F, deleteServer as M, updateServerVariables as N, updateSelectedServer as V, createOperation as D, updateOperationMethod as K, updateOperationPath as L, updateOperationSummary as W, addOperationParameter as j, updateOperationParameter as U, deleteOperationParameter as z, deleteAllOperationParameters as G, updateOperationRequestBodyContentType as H, updateOperationRequestBodyExample as J, addOperationRequestBodyFormRow as Q, updateOperationRequestBodyFormRow as X, deleteOperationRequestBodyFormRow as Y, createTag as Z, addTab as _, closeTab as $, closeOtherTabs as S, focusTab as B, focusLastTab as ee, navigatePreviousTab as ae, navigateNextTab as te, updateTabs as oe } from "@scalar/workspace-store/mutators";
3
+ import { toValue as m } from "vue";
4
+ import { useRouter as re } from "vue-router";
5
+ const ue = ({
5
6
  eventBus: a,
6
- document: o,
7
- workspaceStore: t,
8
- navigateTo: n,
9
- isSidebarOpen: i
7
+ document: t,
8
+ workspaceStore: o,
9
+ isSidebarOpen: u,
10
+ commandPaletteState: c,
11
+ sidebarState: d
10
12
  }) => {
11
- const l = (e, r) => {
12
- const p = J(t);
13
- return p ? r === "document" ? e.value : p.workspace : null;
13
+ const s = re(), i = (e, r) => {
14
+ const l = m(o);
15
+ return l ? r === "document" ? e.value : l.workspace : null;
16
+ }, n = async () => {
17
+ const e = m(o);
18
+ if (!e)
19
+ return;
20
+ const r = e.workspace["x-scalar-active-tab"] ?? 0, l = e.workspace["x-scalar-tabs"]?.[r];
21
+ l && await s.replace(l.path);
22
+ }, p = (e) => {
23
+ const r = t.value?.["x-scalar-navigation"]?.id;
24
+ if (!r)
25
+ return;
26
+ const l = d.getEntryByLocation({
27
+ document: r,
28
+ path: e.path,
29
+ method: e.method,
30
+ example: e.exampleKey
31
+ });
32
+ (!l || l.type !== "example") && o.value?.buildSidebar(r);
14
33
  };
15
- a.on(
34
+ a.on("scroll-to:nav-item", ({ id: e }) => d.handleSelectItem(e)), a.on(
16
35
  "workspace:update:active-proxy",
17
- (e) => u(t.value?.workspace ?? null, e)
36
+ (e) => b(o.value?.workspace ?? null, e)
18
37
  ), a.on(
19
38
  "workspace:update:color-mode",
20
- (e) => c(t.value?.workspace ?? null, e)
21
- ), a.on("workspace:update:theme", (e) => v(t.value?.workspace ?? null, e)), a.on("document:update:icon", (e) => s(o.value, e)), a.on("document:update:info", (e) => o.value && d(o.value.info, e)), a.on("document:toggle:security", () => y(o.value)), a.on("document:update:watch-mode", (e) => m(o.value, e)), a.on("scroll-to:nav-item", async ({ id: e }) => await n(e)), a.on("environment:upsert:environment", (e) => {
22
- t.value && h(o.value, t.value.workspace, e);
39
+ (e) => h(o.value?.workspace ?? null, e)
40
+ ), a.on("workspace:update:theme", (e) => y(o.value?.workspace ?? null, e)), a.on("document:update:icon", (e) => f(t.value, e)), a.on("document:update:info", (e) => t.value && v(t.value.info, e)), a.on("document:toggle:security", () => x(t.value)), a.on("document:update:watch-mode", (e) => T(t.value, e)), a.on("document:create:empty-document", (e) => g(o.value, e)), a.on("environment:upsert:environment", (e) => {
41
+ o.value && w(t.value, o.value.workspace, e);
23
42
  }), a.on(
24
43
  "environment:delete:environment",
25
- ({ environmentName: e, collectionType: r }) => delete l(o, r)?.["x-scalar-environments"]?.[e]
44
+ ({ environmentName: e, collectionType: r }) => delete i(t, r)?.["x-scalar-environments"]?.[e]
26
45
  ), a.on("environment:upsert:environment-variable", (e) => {
27
- const r = l(o, e.collectionType);
28
- w(r, e);
46
+ const r = i(t, e.collectionType);
47
+ O(r, e);
29
48
  }), a.on(
30
49
  "environment:delete:environment-variable",
31
- ({ environmentName: e, index: r, collectionType: p }) => l(o, p)?.["x-scalar-environments"]?.[e]?.variables?.splice(r, 1)
50
+ ({ environmentName: e, index: r, collectionType: l }) => i(t, l)?.["x-scalar-environments"]?.[e]?.variables?.splice(r, 1)
32
51
  ), a.on("cookie:upsert:cookie", (e) => {
33
- const r = l(o, e.collectionType);
34
- O(r, e);
52
+ const r = i(t, e.collectionType);
53
+ R(r, e);
35
54
  }), a.on("cookie:delete:cookie", (e) => {
36
- const r = l(o, e.collectionType);
37
- S(r, e);
38
- }), a.on("auth:delete:security-scheme", (e) => R(o.value, e)), a.on("auth:update:active-index", (e) => f(o.value, e)), a.on("auth:update:security-scheme", (e) => k(o.value, e)), a.on("auth:update:selected-scopes", (e) => q(o.value, e)), a.on(
55
+ const r = i(t, e.collectionType);
56
+ q(r, e);
57
+ }), a.on("auth:delete:security-scheme", (e) => C(t.value, e)), a.on("auth:update:active-index", (e) => E(t.value, e)), a.on("auth:update:security-scheme", (e) => k(t.value, e)), a.on("auth:update:selected-scopes", (e) => P(t.value, e)), a.on(
39
58
  "auth:update:selected-security-schemes",
40
- async (e) => await b(o.value, e)
41
- ), a.on("server:add:server", () => g(o.value)), a.on("server:update:server", (e) => x(o.value, e)), a.on("server:delete:server", (e) => T(o.value, e)), a.on("server:update:variables", (e) => C(o.value, e)), a.on("server:update:selected", (e) => P(o.value, e)), a.on("operation:update:method", (e) => E(o.value, e)), a.on("operation:update:path", (e) => A(o.value, e)), a.on("operation:update:summary", (e) => F(o.value, e)), a.on("operation:add:parameter", (e) => M(o.value, e)), a.on("operation:update:parameter", (e) => V(o.value, e)), a.on("operation:delete:parameter", (e) => W(o.value, e)), a.on("operation:delete-all:parameters", (e) => j(o.value, e)), a.on(
59
+ async (e) => await A(t.value, e)
60
+ ), a.on("server:add:server", () => I(t.value)), a.on("server:update:server", (e) => F(t.value, e)), a.on("server:delete:server", (e) => M(t.value, e)), a.on("server:update:variables", (e) => N(t.value, e)), a.on("server:update:selected", (e) => V(t.value, e)), a.on("operation:create:operation", (e) => D(o.value, e)), a.on(
61
+ "operation:update:method",
62
+ (e) => K(t.value, o.value, e, (r) => {
63
+ r && s.replace({
64
+ name: "example",
65
+ params: {
66
+ method: e.payload.method,
67
+ pathEncoded: encodeURIComponent(e.meta.path),
68
+ exampleName: e.meta.exampleKey
69
+ }
70
+ });
71
+ })
72
+ ), a.on("operation:update:path", (e) => L(t.value, e)), a.on("operation:update:summary", (e) => W(t.value, e)), a.on("operation:add:parameter", (e) => {
73
+ j(t.value, e), p(e.meta);
74
+ }), a.on("operation:update:parameter", (e) => {
75
+ U(t.value, e), p(e.meta);
76
+ }), a.on("operation:delete:parameter", (e) => z(t.value, e)), a.on("operation:delete-all:parameters", (e) => G(t.value, e)), a.on(
42
77
  "operation:update:requestBody:contentType",
43
- (e) => D(o.value, e)
44
- ), a.on(
45
- "operation:update:requestBody:value",
46
- (e) => I(o.value, e)
47
- ), a.on("operation:add:requestBody:formRow", (e) => z(o.value, e)), a.on(
78
+ (e) => H(t.value, e)
79
+ ), a.on("operation:update:requestBody:value", (e) => {
80
+ J(t.value, e), p(e.meta);
81
+ }), a.on("operation:add:requestBody:formRow", (e) => {
82
+ Q(t.value, e), p(e.meta);
83
+ }), a.on(
48
84
  "operation:update:requestBody:formRow",
49
- (e) => G(o.value, e)
85
+ (e) => X(t.value, e)
50
86
  ), a.on(
51
87
  "operation:delete:requestBody:formRow",
52
- (e) => H(o.value, e)
53
- ), a.on("ui:toggle:sidebar", () => i.value = !i.value);
88
+ (e) => Y(t.value, e)
89
+ ), a.on("tag:create:tag", (e) => Z(o.value, e)), a.on("ui:toggle:sidebar", () => u.value = !u.value), a.on(
90
+ "ui:open:command-palette",
91
+ (e) => {
92
+ e ? c.open(e.action, e.payload) : c.open();
93
+ }
94
+ ), a.on("tabs:add:tab", async (e) => {
95
+ _(o.value?.workspace ?? null, e), await n();
96
+ }), a.on("tabs:close:tab", async (e) => {
97
+ $(o.value?.workspace ?? null, e), await n();
98
+ }), a.on("tabs:close:other-tabs", (e) => S(o.value?.workspace ?? null, e)), a.on("tabs:focus:tab", async (e) => {
99
+ B(o.value?.workspace ?? null, e), await n();
100
+ }), a.on("tabs:focus:tab-last", async (e) => {
101
+ ee(o.value?.workspace ?? null, e), await n();
102
+ }), a.on("tabs:navigate:previous", async (e) => {
103
+ ae(o.value?.workspace ?? null, e), await n();
104
+ }), a.on("tabs:navigate:next", async (e) => {
105
+ te(o.value?.workspace ?? null, e), await n();
106
+ }), a.on("tabs:update:tabs", async (e) => {
107
+ oe(o.value?.workspace ?? null, e), await n();
108
+ });
54
109
  };
55
110
  export {
56
- Q as useWorkspaceClientEvents
111
+ ue as useWorkspaceClientEvents
57
112
  };
@@ -1,18 +1,28 @@
1
1
  import { type WorkspaceStore } from '@scalar/workspace-store/client';
2
- import { type MaybeRefOrGetter, type Ref } from 'vue';
2
+ import { type Ref } from 'vue';
3
+ /**
4
+ * Default workspace meta used when we need to create or navigate to a fallback workspace.
5
+ * Keep in sync with the persisted workspace structure.
6
+ */
7
+ export declare const DEFAULT_WORKSPACE: Workspace;
3
8
  export type Workspace = {
4
9
  name: string;
5
10
  id: string;
6
11
  };
7
- export declare const useWorkspaceSelector: ({ workspaceId, }: {
8
- workspaceId: MaybeRefOrGetter<string | undefined>;
9
- }) => {
12
+ export type UseWorkspaceSelectorReturn = {
10
13
  activeWorkspace: Ref<Workspace | null>;
11
14
  workspaces: Ref<Workspace[]>;
12
15
  store: Ref<WorkspaceStore | null>;
13
- setWorkspaceId: (id: string) => void;
16
+ setWorkspaceId: (id: string) => Promise<void>;
14
17
  createWorkspace: (props: {
15
18
  name: string;
16
- }) => Promise<void>;
19
+ }) => Promise<Workspace | undefined>;
20
+ loadWorkspace: (id: string) => Promise<{
21
+ success: true;
22
+ workspace: WorkspaceStore;
23
+ } | {
24
+ success: false;
25
+ }>;
17
26
  };
27
+ export declare const useWorkspaceSelector: () => UseWorkspaceSelectorReturn;
18
28
  //# sourceMappingURL=use-workspace-selector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-workspace-selector.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-workspace-selector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,gCAAgC,CAAA;AAK1F,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,GAAG,EAAuB,MAAM,KAAK,CAAA;AAyC1E,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,kBAElC;IACD,WAAW,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;CAClD,KAAG;IACF,eAAe,EAAE,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,CAAA;IACtC,UAAU,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC,CAAA;IAC5B,KAAK,EAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IACjC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,eAAe,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CAyJ5D,CAAA"}
1
+ {"version":3,"file":"use-workspace-selector.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-workspace-selector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,gCAAgC,CAAA;AAK1F,OAAO,EAAE,KAAK,GAAG,EAAO,MAAM,KAAK,CAAA;AAOnC;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAG/B,CAAA;AA0BD,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,eAAe,EAAE,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,CAAA;IACtC,UAAU,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC,CAAA;IAC5B,KAAK,EAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IACjC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7C,eAAe,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAAA;IAC5E,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,OAAO,EAAE,IAAI,CAAC;QAAC,SAAS,EAAE,cAAc,CAAA;KAAE,GAAG;QAAE,OAAO,EAAE,KAAK,CAAA;KAAE,CAAC,CAAA;CAC1G,CAAA;AAED,eAAO,MAAM,oBAAoB,QAAO,0BAiJvC,CAAA"}
@@ -1,15 +1,14 @@
1
- import { createWorkspaceStore as f } from "@scalar/workspace-store/client";
2
- import { generateUniqueValue as d } from "@scalar/workspace-store/helpers/generate-unique-value";
3
- import { createWorkspaceStorePersistence as W } from "@scalar/workspace-store/persistence";
4
- import { persistencePlugin as g } from "@scalar/workspace-store/plugins/client";
5
- import { ref as u, watch as h, toValue as v } from "vue";
6
- import { useRouter as y } from "vue-router";
7
- import { slugify as D } from "../helpers/slugify.js";
8
- import { workspaceStorage as S } from "../helpers/storage.js";
9
- const A = 1e3, s = {
1
+ import { createWorkspaceStore as l } from "@scalar/workspace-store/client";
2
+ import { generateUniqueValue as W } from "@scalar/workspace-store/helpers/generate-unique-value";
3
+ import { createWorkspaceStorePersistence as v } from "@scalar/workspace-store/persistence";
4
+ import { persistencePlugin as D } from "@scalar/workspace-store/plugins/client";
5
+ import { ref as i } from "vue";
6
+ import { useRouter as g } from "vue-router";
7
+ import { slugify as y } from "../helpers/slugify.js";
8
+ const S = 1e3, R = {
10
9
  name: "Default Workspace",
11
10
  id: "default"
12
- }, E = {
11
+ }, h = {
13
12
  openapi: "3.1.0",
14
13
  info: {
15
14
  title: "Drafts",
@@ -22,66 +21,61 @@ const A = 1e3, s = {
22
21
  },
23
22
  "x-scalar-original-document-hash": "drafts",
24
23
  "x-scalar-icon": "interface-edit-tool-pencil"
25
- }, I = async ({ workspaceId: c }) => f({
26
- plugins: [await g({ workspaceId: c, debounceDelay: A })]
27
- }), F = ({
28
- workspaceId: c
29
- }) => {
30
- const l = u(null), n = u([]), w = u(null), o = W(), k = y(), i = async (e) => {
31
- const t = await (await o).workspace.getItem(e);
32
- if (!t)
33
- return !1;
34
- const a = await I({ workspaceId: e });
35
- return a.loadWorkspace(t.workspace), S.setActiveWorkspaceId(e), l.value = { id: e, name: t.name }, w.value = a, !0;
36
- }, m = async ({ id: e, name: r }) => {
37
- const t = f();
38
- await t.addDocument({
24
+ }, A = async ({ workspaceId: r }) => l({
25
+ plugins: [await D({ workspaceId: r, debounceDelay: S })]
26
+ }), _ = () => {
27
+ const r = i(null), c = i([]), n = i(null), o = v(), w = g(), m = async (e) => {
28
+ const a = await (await o).workspace.getItem(e);
29
+ if (!a)
30
+ return {
31
+ success: !1
32
+ };
33
+ const s = await A({ workspaceId: e });
34
+ return s.loadWorkspace(a.workspace), r.value = { id: e, name: a.name }, n.value = s, {
35
+ success: !0,
36
+ workspace: s
37
+ };
38
+ }, k = async ({ id: e, name: t }) => {
39
+ const a = l();
40
+ await a.addDocument({
39
41
  name: "drafts",
40
- document: E
42
+ document: h
41
43
  }), await (await o).workspace.setItem(e, {
42
- name: r,
43
- workspace: t.exportWorkspace()
44
+ name: t,
45
+ workspace: a.exportWorkspace()
46
+ }), c.value.push({ id: e, name: t });
47
+ }, p = async (e) => {
48
+ await w.push({
49
+ name: "workspace.environment",
50
+ params: { workspaceSlug: e }
44
51
  });
52
+ }, f = async ({ id: e, name: t }) => {
53
+ n.value = null;
54
+ const a = await o, s = await W({
55
+ defaultValue: e ?? t,
56
+ // Use the provided id if it exists, otherwise use the name
57
+ validation: async (d) => !await a.workspace.has(d),
58
+ maxRetries: 100,
59
+ transformation: y
60
+ });
61
+ if (!s)
62
+ return;
63
+ const u = { id: s, name: t };
64
+ return await k(u), await p(s), u;
45
65
  };
46
- h(
47
- () => v(c),
48
- async (e) => {
49
- const r = e, a = await (await o).workspace.getAll();
50
- if (n.value = a, !!r && !await i(r)) {
51
- if (r === s.id) {
52
- if (a[0] && await i(a[0].id))
53
- return;
54
- if (await m(s), await i(s.id)) {
55
- n.value.push(s);
56
- return;
57
- }
58
- console.error("[ERROR]: something went wrong when trying to create the default workspace");
59
- return;
60
- }
61
- return p(s.id);
62
- }
63
- },
64
- { immediate: !0 }
65
- );
66
- const p = (e) => {
67
- k.push({ name: "workspace.environment", params: { workspaceSlug: e } });
68
- };
69
- return {
70
- store: w,
71
- activeWorkspace: l,
72
- workspaces: n,
66
+ return (async () => {
67
+ const t = await (await o).workspace.getAll();
68
+ c.value = t;
69
+ })(), {
70
+ store: n,
71
+ activeWorkspace: r,
72
+ workspaces: c,
73
73
  setWorkspaceId: p,
74
- createWorkspace: async ({ name: e }) => {
75
- const r = await o, t = await d({
76
- defaultValue: e,
77
- validation: async (a) => !await r.workspace.has(a),
78
- maxRetries: 100,
79
- transformation: D
80
- });
81
- t && (await m({ id: t, name: e }), p(t));
82
- }
74
+ createWorkspace: f,
75
+ loadWorkspace: m
83
76
  };
84
77
  };
85
78
  export {
86
- F as useWorkspaceSelector
79
+ R as DEFAULT_WORKSPACE,
80
+ _ as useWorkspaceSelector
87
81
  };
@@ -1 +1 @@
1
- {"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuth2.vue"],"names":[],"mappings":"AAkRA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,MAAM,EACZ,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAIrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAQ1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,IAAI,EAAE,UAAU,CAAA;IAChB,WAAW,EAAE,OAAO,CAAA;IACpB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;AAiBF,KAAK,WAAW,GAAG;IACjB,eAAe,CAAC,EAAE,MAAM,OAAO,CAAA;CAChC,CAAC;AAqgBF,QAAA,MAAM,eAAe;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuth2.vue"],"names":[],"mappings":"AAoRA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,MAAM,EACZ,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAIrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAQ1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,IAAI,EAAE,UAAU,CAAA;IAChB,WAAW,EAAE,OAAO,CAAA;IACpB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;AAiBF,KAAK,WAAW,GAAG;IACjB,eAAe,CAAC,EAAE,MAAM,OAAO,CAAA;CAChC,CAAC;AAugBF,QAAA,MAAM,eAAe;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}