@scalar/api-client 2.9.0 → 2.9.1

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 (122) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/components/CommandPalette/CommandActionForm.vue.js +9 -9
  3. package/dist/style.css +1 -1
  4. package/dist/v2/components/code-input/CodeInput.test.d.ts +2 -0
  5. package/dist/v2/components/code-input/CodeInput.test.d.ts.map +1 -0
  6. package/dist/v2/components/code-input/CodeInput.vue.d.ts +140 -0
  7. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -0
  8. package/dist/v2/components/code-input/CodeInput.vue.js +8 -0
  9. package/dist/v2/components/code-input/CodeInput.vue2.js +202 -0
  10. package/dist/v2/components/code-input/code-variable-widget.d.ts +21 -0
  11. package/dist/v2/components/code-input/code-variable-widget.d.ts.map +1 -0
  12. package/dist/v2/components/code-input/code-variable-widget.js +106 -0
  13. package/dist/v2/components/code-input/code-variable-widget.test.d.ts +2 -0
  14. package/dist/v2/components/code-input/code-variable-widget.test.d.ts.map +1 -0
  15. package/dist/v2/components/code-input/index.d.ts +2 -0
  16. package/dist/v2/components/code-input/index.d.ts.map +1 -0
  17. package/dist/v2/components/code-input/index.js +4 -0
  18. package/dist/v2/components/data-table/DataTable.vue.d.ts +22 -0
  19. package/dist/v2/components/data-table/DataTable.vue.d.ts.map +1 -0
  20. package/dist/v2/components/data-table/DataTable.vue.js +38 -0
  21. package/dist/v2/components/data-table/DataTable.vue2.js +4 -0
  22. package/dist/v2/components/data-table/DataTableCell.vue.d.ts +19 -0
  23. package/dist/v2/components/data-table/DataTableCell.vue.d.ts.map +1 -0
  24. package/dist/v2/components/data-table/DataTableCell.vue.js +26 -0
  25. package/dist/v2/components/data-table/DataTableCell.vue2.js +4 -0
  26. package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts +14 -0
  27. package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts.map +1 -0
  28. package/dist/v2/components/data-table/DataTableCheckbox.vue.js +53 -0
  29. package/dist/v2/components/data-table/DataTableCheckbox.vue2.js +4 -0
  30. package/dist/v2/components/data-table/DataTableHeader.vue.d.ts +13 -0
  31. package/dist/v2/components/data-table/DataTableHeader.vue.d.ts.map +1 -0
  32. package/dist/v2/components/data-table/DataTableHeader.vue.js +18 -0
  33. package/dist/v2/components/data-table/DataTableHeader.vue2.js +4 -0
  34. package/dist/v2/components/data-table/DataTableInput.vue.d.ts +53 -0
  35. package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -0
  36. package/dist/v2/components/data-table/DataTableInput.vue.js +7 -0
  37. package/dist/v2/components/data-table/DataTableInput.vue2.js +117 -0
  38. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +16 -0
  39. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -0
  40. package/dist/v2/components/data-table/DataTableInputSelect.vue.js +146 -0
  41. package/dist/v2/components/data-table/DataTableInputSelect.vue2.js +4 -0
  42. package/dist/v2/components/data-table/DataTableRow.vue.d.ts +13 -0
  43. package/dist/v2/components/data-table/DataTableRow.vue.d.ts.map +1 -0
  44. package/dist/v2/components/data-table/DataTableRow.vue.js +12 -0
  45. package/dist/v2/components/data-table/DataTableText.vue.d.ts +16 -0
  46. package/dist/v2/components/data-table/DataTableText.vue.d.ts.map +1 -0
  47. package/dist/v2/components/data-table/DataTableText.vue.js +23 -0
  48. package/dist/v2/components/data-table/DataTableText.vue2.js +4 -0
  49. package/dist/v2/components/data-table/index.d.ts +9 -0
  50. package/dist/v2/components/data-table/index.d.ts.map +1 -0
  51. package/dist/v2/components/data-table/index.js +18 -0
  52. package/dist/v2/features/app/App.test.d.ts +2 -0
  53. package/dist/v2/features/app/App.test.d.ts.map +1 -0
  54. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  55. package/dist/v2/features/app/App.vue.js +56 -41
  56. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +3 -0
  57. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
  58. package/dist/v2/features/app/components/DesktopTabs.vue.js +8 -7
  59. package/dist/v2/features/app/components/DesktopTabs.vue2.js +6 -0
  60. package/dist/v2/features/app/helpers/routes.d.ts +12 -9
  61. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  62. package/dist/v2/features/app/helpers/routes.js +0 -6
  63. package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
  64. package/dist/v2/features/collection/DocumentCollection.vue2.js +58 -45
  65. package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +1 -1
  66. package/dist/v2/features/collection/WorkspaceCollection.vue2.js +12 -10
  67. package/dist/v2/features/collection/components/Environment.vue.d.ts +13 -87
  68. package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
  69. package/dist/v2/features/collection/components/Environment.vue2.js +20 -25
  70. package/dist/v2/features/collection/components/Overview.vue.d.ts +13 -12
  71. package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -1
  72. package/dist/v2/features/collection/components/Overview.vue.js +5 -2
  73. package/dist/v2/features/collection/components/Overview.vue2.js +64 -66
  74. package/dist/v2/features/collection/components/Tabs.vue.js +8 -8
  75. package/dist/v2/features/environments/EnvironmentsList.vue.d.ts +6 -95
  76. package/dist/v2/features/environments/EnvironmentsList.vue.d.ts.map +1 -1
  77. package/dist/v2/features/environments/EnvironmentsList.vue.js +50 -98
  78. package/dist/v2/features/environments/components/Environment.vue.d.ts +9 -63
  79. package/dist/v2/features/environments/components/Environment.vue.d.ts.map +1 -1
  80. package/dist/v2/features/environments/components/Environment.vue.js +41 -92
  81. package/dist/v2/features/environments/components/EnvironmentColors.vue.d.ts.map +1 -1
  82. package/dist/v2/features/environments/components/EnvironmentColors.vue.js +105 -81
  83. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts +7 -14
  84. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts.map +1 -1
  85. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +61 -39
  86. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts +1 -1
  87. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts.map +1 -1
  88. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +3 -3
  89. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts +21 -0
  90. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -0
  91. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +109 -0
  92. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue2.js +4 -0
  93. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts +7 -20
  94. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts.map +1 -1
  95. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +3 -3
  96. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue2.js +85 -71
  97. package/dist/v2/features/environments/index.d.ts +0 -3
  98. package/dist/v2/features/environments/index.d.ts.map +1 -1
  99. package/dist/v2/features/environments/index.js +2 -4
  100. package/dist/v2/helpers/test-utils.d.ts +4 -0
  101. package/dist/v2/helpers/test-utils.d.ts.map +1 -0
  102. package/dist/v2/hooks/use-workspace-client-events.d.ts +2 -1
  103. package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
  104. package/dist/v2/hooks/use-workspace-client-events.js +23 -9
  105. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  106. package/package.json +13 -13
  107. package/dist/v2/features/collection/WorkspaceCollection.test.d.ts +0 -2
  108. package/dist/v2/features/collection/WorkspaceCollection.test.d.ts.map +0 -1
  109. package/dist/v2/features/environments/Environments.test.d.ts +0 -2
  110. package/dist/v2/features/environments/Environments.test.d.ts.map +0 -1
  111. package/dist/v2/features/environments/Environments.vue.d.ts +0 -31
  112. package/dist/v2/features/environments/Environments.vue.d.ts.map +0 -1
  113. package/dist/v2/features/environments/Environments.vue.js +0 -65
  114. package/dist/v2/features/environments/Environments.vue2.js +0 -4
  115. package/dist/v2/features/environments/components/EnvironmentColorUpdateModal.vue.d.ts +0 -20
  116. package/dist/v2/features/environments/components/EnvironmentColorUpdateModal.vue.d.ts.map +0 -1
  117. package/dist/v2/features/environments/components/EnvironmentColorUpdateModal.vue.js +0 -48
  118. package/dist/v2/features/environments/components/EnvironmentColorUpdateModal.vue2.js +0 -4
  119. package/dist/v2/features/environments/components/EnvironmentNameUpdateModal.vue.d.ts +0 -18
  120. package/dist/v2/features/environments/components/EnvironmentNameUpdateModal.vue.d.ts.map +0 -1
  121. package/dist/v2/features/environments/components/EnvironmentNameUpdateModal.vue.js +0 -35
  122. package/dist/v2/features/environments/components/EnvironmentNameUpdateModal.vue2.js +0 -4
@@ -1,60 +1,75 @@
1
- import { defineComponent as S, computed as c, ref as f, createElementBlock as y, openBlock as r, Fragment as b, createElementVNode as u, createVNode as i, unref as p, withCtx as w, createBlock as s, withDirectives as h, vShow as B, KeepAlive as T, resolveDynamicComponent as V } from "vue";
2
- import { ScalarTeleportRoot as W } from "@scalar/components";
3
- import { getThemeStyles as g } from "@scalar/themes";
4
- import { useColorMode as x } from "@scalar/use-hooks/useColorMode";
5
- import { createWorkspaceEventBus as C } from "@scalar/workspace-store/events";
6
- import { useRoute as D, RouterView as E } from "vue-router";
7
- import { useWorkspaceClientEvents as M } from "../../hooks/use-workspace-client-events.js";
8
- import O from "./components/AppSidebar.vue.js";
9
- import U from "./components/DesktopTabs.vue.js";
10
- import A from "./components/WebTopNav.vue.js";
11
- const R = ["innerHTML"], H = { class: "flex min-h-0 flex-1 flex-row items-stretch" }, L = { class: "bg-b-1 flex min-h-0 min-w-0 flex-1 flex-col" }, N = {}, P = /* @__PURE__ */ S({
12
- ...N,
1
+ import { defineComponent as h, computed as i, ref as v, createElementBlock as x, openBlock as a, Fragment as E, createElementVNode as c, createVNode as m, unref as p, withCtx as k, createBlock as s, withDirectives as B, vShow as V, KeepAlive as T, resolveDynamicComponent as W } from "vue";
2
+ import { ScalarTeleportRoot as g } from "@scalar/components";
3
+ import { getThemeStyles as C } from "@scalar/themes";
4
+ import { useColorMode as O } from "@scalar/use-hooks/useColorMode";
5
+ import { createWorkspaceEventBus as D } from "@scalar/workspace-store/events";
6
+ import { xScalarEnvironmentSchema as w } from "@scalar/workspace-store/schemas/extensions/document/x-scalar-environments";
7
+ import { coerceValue as f } from "@scalar/workspace-store/schemas/typebox-coerce";
8
+ import { useRoute as M, RouterView as U } from "vue-router";
9
+ import { useWorkspaceClientEvents as A } from "../../hooks/use-workspace-client-events.js";
10
+ import R from "./components/AppSidebar.vue.js";
11
+ import H from "./components/DesktopTabs.vue.js";
12
+ import L from "./components/WebTopNav.vue.js";
13
+ const N = ["innerHTML"], $ = { class: "flex flex-1" }, j = { class: "bg-b-1 flex flex-1 flex-col" }, F = {}, ee = /* @__PURE__ */ h({
14
+ ...F,
13
15
  __name: "App",
14
16
  props: {
15
17
  layout: {},
16
18
  workspaceStore: {}
17
19
  },
18
- setup(l) {
19
- x(), typeof window < "u" && (window.dataDumpWorkspace = () => l.workspaceStore);
20
- const k = c(() => {
21
- const e = l.workspaceStore.workspace["x-scalar-theme"];
22
- return e ? `<style>${g(e)}</style>` : "";
23
- }), a = f("default"), n = f(!0), d = C(), v = D(), m = c(
24
- () => l.workspaceStore.workspace.documents[v.params.documentSlug] ?? null
20
+ setup(r) {
21
+ O(), typeof window < "u" && (window.dataDumpWorkspace = () => r.workspaceStore);
22
+ const S = i(() => {
23
+ const e = r.workspaceStore.workspace["x-scalar-theme"];
24
+ return e ? `<style>${C(e)}</style>` : "";
25
+ }), n = v("default"), l = v(!0), d = D(), b = M(), u = i(
26
+ () => r.workspaceStore.workspace.documents[b.params.documentSlug] ?? Object.values(r.workspaceStore.workspace.documents)[0] ?? null
25
27
  );
26
- return M(d, m), (e, t) => (r(), y(b, null, [
27
- u("div", { innerHTML: k.value }, null, 8, R),
28
- i(p(W), null, {
29
- default: w(() => [
30
- e.layout === "desktop" ? (r(), s(U, { key: 0 })) : (r(), s(A, {
28
+ A(d, u, r.workspaceStore);
29
+ const y = i(() => {
30
+ const e = r.workspaceStore.workspace["x-scalar-active-environment"];
31
+ if (!e)
32
+ return f(w, {});
33
+ const t = r.workspaceStore.workspace["x-scalar-environments"]?.[e] ?? { variables: [] }, o = u.value?.["x-scalar-environments"]?.[e] ?? { variables: [] };
34
+ return f(w, {
35
+ ...t,
36
+ ...o,
37
+ variables: [...t.variables, ...o.variables]
38
+ });
39
+ });
40
+ return (e, t) => (a(), x(E, null, [
41
+ c("div", { innerHTML: S.value }, null, 8, N),
42
+ m(p(g), null, {
43
+ default: k(() => [
44
+ e.layout === "desktop" ? (a(), s(H, { key: 0 })) : (a(), s(L, {
31
45
  key: 1,
32
- modelValue: a.value,
33
- "onUpdate:modelValue": t[0] || (t[0] = (o) => a.value = o)
46
+ modelValue: n.value,
47
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => n.value = o)
34
48
  }, null, 8, ["modelValue"])),
35
- u("main", H, [
36
- h(i(O, {
37
- isSidebarOpen: n.value,
38
- "onUpdate:isSidebarOpen": t[1] || (t[1] = (o) => n.value = o),
39
- workspace: a.value,
40
- "onUpdate:workspace": t[2] || (t[2] = (o) => a.value = o),
49
+ c("main", $, [
50
+ B(m(R, {
51
+ isSidebarOpen: l.value,
52
+ "onUpdate:isSidebarOpen": t[1] || (t[1] = (o) => l.value = o),
53
+ workspace: n.value,
54
+ "onUpdate:workspace": t[2] || (t[2] = (o) => n.value = o),
41
55
  documents: e.workspaceStore.workspace.documents,
42
56
  layout: e.layout,
43
57
  sidebarWidth: e.workspaceStore.workspace["x-scalar-sidebar-width"] ?? 288,
44
58
  "onUpdate:sidebarWidth": t[3] || (t[3] = (o) => e.workspaceStore.update("x-scalar-sidebar-width", o))
45
59
  }, null, 8, ["isSidebarOpen", "workspace", "documents", "layout", "sidebarWidth"]), [
46
- [B, n.value]
60
+ [V, l.value]
47
61
  ]),
48
- u("div", L, [
49
- i(p(E), null, {
50
- default: w(({ Component: o }) => [
51
- (r(), s(T, null, [
52
- (r(), s(V(o), {
53
- document: m.value,
62
+ c("div", j, [
63
+ m(p(U), null, {
64
+ default: k(({ Component: o }) => [
65
+ (a(), s(T, null, [
66
+ (a(), s(W(o), {
67
+ document: u.value,
68
+ environment: y.value,
54
69
  eventBus: p(d),
55
70
  layout: e.layout,
56
71
  workspaceStore: e.workspaceStore
57
- }, null, 8, ["document", "eventBus", "layout", "workspaceStore"]))
72
+ }, null, 8, ["document", "environment", "eventBus", "layout", "workspaceStore"]))
58
73
  ], 1024))
59
74
  ]),
60
75
  _: 1
@@ -68,5 +83,5 @@ const R = ["innerHTML"], H = { class: "flex min-h-0 flex-1 flex-row items-stretc
68
83
  }
69
84
  });
70
85
  export {
71
- P as default
86
+ ee as default
72
87
  };
@@ -1,3 +1,6 @@
1
+ /**
2
+ * Tabs which only exist on the electron app
3
+ */
1
4
  declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
5
  export default _default;
3
6
  //# sourceMappingURL=DesktopTabs.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DesktopTabs.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/DesktopTabs.vue"],"names":[],"mappings":";AAiDA,wBAKG"}
1
+ {"version":3,"file":"DesktopTabs.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/DesktopTabs.vue"],"names":[],"mappings":"AAoBA;;GAEG;;AACH,wBAqDC"}
@@ -1,14 +1,15 @@
1
- import { createElementBlock as n, openBlock as r, createElementVNode as e } from "vue";
2
- import o from "../../../../_virtual/_plugin-vue_export-helper.js";
3
- const s = {}, l = { class: "bg-red flex h-10 items-center gap-2" };
4
- function c(a, t) {
5
- return r(), n("nav", l, [...t[0] || (t[0] = [
1
+ import r from "./DesktopTabs.vue2.js";
2
+ import { createElementBlock as o, openBlock as n, createElementVNode as e } from "vue";
3
+ import s from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const l = { class: "bg-red flex h-10 items-center gap-2" };
5
+ function p(a, t, c, i, d, m) {
6
+ return n(), o("nav", l, [...t[0] || (t[0] = [
6
7
  e("div", null, "Insert", -1),
7
8
  e("div", null, "Tabs", -1),
8
9
  e("div", null, "Here", -1)
9
10
  ])]);
10
11
  }
11
- const f = /* @__PURE__ */ o(s, [["render", c]]);
12
+ const v = /* @__PURE__ */ s(r, [["render", p]]);
12
13
  export {
13
- f as default
14
+ v as default
14
15
  };
@@ -0,0 +1,6 @@
1
+ const a = {
2
+ name: "DesktopTabs"
3
+ };
4
+ export {
5
+ a as default
6
+ };
@@ -1,4 +1,6 @@
1
+ import type { WorkspaceStore } from '@scalar/workspace-store/client';
1
2
  import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
3
+ import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
2
4
  import type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace';
3
5
  import type { ClientLayout } from '../../../../v2/types/layout';
4
6
  /** These props are provided at the route level */
@@ -6,7 +8,17 @@ export type RouteProps = {
6
8
  document: WorkspaceDocument | null;
7
9
  eventBus: WorkspaceEventBus;
8
10
  layout: ClientLayout;
11
+ environment: XScalarEnvironment;
12
+ workspaceStore: WorkspaceStore;
9
13
  };
14
+ /** When in the collections pages */
15
+ export type CollectionProps = RouteProps & ({
16
+ collectionType: 'document';
17
+ document: WorkspaceDocument;
18
+ } | {
19
+ collectionType: 'workspace';
20
+ document: null;
21
+ });
10
22
  /** Routes for the API client app and web, the same as modal + workspace routes */
11
23
  export declare const ROUTES: ({
12
24
  name: string;
@@ -44,11 +56,6 @@ export declare const ROUTES: ({
44
56
  path: string;
45
57
  component: () => Promise<typeof import("../../../../v2/features/collection/components/Servers.vue.js")>;
46
58
  redirect?: undefined;
47
- } | {
48
- name: string;
49
- path: string;
50
- component: () => Promise<typeof import("../../../../v2/features/collection/components/Environment.vue.js")>;
51
- redirect?: undefined;
52
59
  } | {
53
60
  name: string;
54
61
  path: string;
@@ -73,10 +80,6 @@ export declare const ROUTES: ({
73
80
  path: string;
74
81
  component: () => Promise<typeof import("../../../../v2/features/collection/WorkspaceCollection.vue.js")>;
75
82
  children: ({
76
- name: string;
77
- path: string;
78
- component: () => Promise<typeof import("../../../../v2/features/collection/WorkspaceCollection.vue.js")>;
79
- } | {
80
83
  name: string;
81
84
  path: string;
82
85
  component: () => Promise<typeof import("../../../../v2/features/collection/components/Environment.vue.js")>;
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/helpers/routes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAGlF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,kDAAkD;AAClD,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,MAAM,EAAE,YAAY,CAAA;CAOrB,CAAA;AAED,kFAAkF;AAClF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+GS,CAAA"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/helpers/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAGlF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,kDAAkD;AAClD,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,MAAM,EAAE,YAAY,CAAA;IACpB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,cAAc,EAAE,cAAc,CAAA;CAM/B,CAAA;AAED,oCAAoC;AACpC,MAAM,MAAM,eAAe,GAAG,UAAU,GACtC,CACI;IACE,cAAc,EAAE,UAAU,CAAA;IAC1B,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,GACD;IACE,cAAc,EAAE,WAAW,CAAA;IAC3B,QAAQ,EAAE,IAAI,CAAA;CACf,CACJ,CAAA;AAEH,kFAAkF;AAClF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyGS,CAAA"}
@@ -77,12 +77,6 @@ const e = [
77
77
  path: "",
78
78
  component: () => import("../../collection/WorkspaceCollection.vue.js"),
79
79
  children: [
80
- // Workspace overview
81
- {
82
- name: "workspace.overview",
83
- path: "overview",
84
- component: () => import("../../collection/WorkspaceCollection.vue.js")
85
- },
86
80
  // Workspace environment
87
81
  {
88
82
  name: "workspace.environment",
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentCollection.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/collection/DocumentCollection.vue"],"names":[],"mappings":"AAwGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAMlE;;;;;;;GAOG;;AACH,wBAwOC"}
1
+ {"version":3,"file":"DocumentCollection.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/collection/DocumentCollection.vue"],"names":[],"mappings":"AAkHA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAMlE;;;;;;;GAOG;;AACH,wBAkQC"}
@@ -1,48 +1,51 @@
1
- import { defineComponent as f, computed as i, createElementBlock as m, openBlock as d, createElementVNode as e, createVNode as o, withCtx as c, unref as a } from "vue";
2
- import { ScalarButton as p } from "@scalar/components";
3
- import { LibraryIcon as x } from "@scalar/icons/library";
4
- import { RouterView as v } from "vue-router";
5
- import _ from "../../../components/IconSelector.vue.js";
6
- import b from "./components/LabelInput.vue.js";
7
- import h from "./components/Tabs.vue.js";
8
- const y = {
1
+ import { defineComponent as p, computed as c, createElementBlock as d, openBlock as r, createElementVNode as t, createVNode as n, withCtx as a, unref as s, createBlock as f, KeepAlive as v, resolveDynamicComponent as x } from "vue";
2
+ import { ScalarButton as w } from "@scalar/components";
3
+ import { LibraryIcon as y } from "@scalar/icons/library";
4
+ import { RouterView as b } from "vue-router";
5
+ import h from "../../../components/IconSelector.vue.js";
6
+ import k from "./components/LabelInput.vue.js";
7
+ import _ from "./components/Tabs.vue.js";
8
+ const B = {
9
9
  key: 0,
10
10
  class: "w-full md:mx-auto md:max-w-[720px]"
11
- }, w = ["aria-label"], g = { class: "flex flex-row items-center gap-2" }, B = { class: "group relative ml-1.25" }, V = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, k = {
11
+ }, V = ["aria-label"], g = { class: "flex flex-row items-center gap-2" }, S = { class: "group relative ml-1.25" }, C = { class: "px-1.5 pt-8" }, D = {
12
12
  key: 1,
13
13
  class: "flex w-full flex-1 items-center justify-center"
14
- }, C = {}, L = /* @__PURE__ */ f({
15
- ...C,
16
- __name: "DocumentCollection",
14
+ }, I = {
15
+ name: "DocumentCollection"
16
+ }, q = /* @__PURE__ */ p({
17
+ ...I,
17
18
  props: {
18
19
  document: {},
19
20
  eventBus: {},
20
- layout: {}
21
+ layout: {},
22
+ environment: {},
23
+ workspaceStore: {}
21
24
  },
22
- setup(s) {
23
- const u = i(() => s.document?.info?.title || "Untitled Document"), r = i(
24
- () => s.document?.["x-scalar-client-config-icon"] || "interface-content-folder"
25
+ setup(u) {
26
+ const i = c(() => u.document?.info?.title || "Untitled Document"), m = c(
27
+ () => u.document?.["x-scalar-client-config-icon"] || "interface-content-folder"
25
28
  );
26
- return (l, t) => l.document ? (d(), m("div", y, [
27
- e("div", {
28
- "aria-label": `title: ${u.value}`,
29
+ return (e, o) => e.document ? (r(), d("div", B, [
30
+ t("div", {
31
+ "aria-label": `title: ${i.value}`,
29
32
  class: "mx-auto flex h-fit w-full flex-col gap-2 pt-6 pb-3 md:mx-auto md:max-w-[720px]"
30
33
  }, [
31
- e("div", g, [
32
- o(_, {
33
- modelValue: r.value,
34
+ t("div", g, [
35
+ n(h, {
36
+ modelValue: m.value,
34
37
  placement: "bottom-start",
35
- "onUpdate:modelValue": t[0] || (t[0] = (n) => l.eventBus.emit("update:document-icon", n))
38
+ "onUpdate:modelValue": o[0] || (o[0] = (l) => e.eventBus.emit("document:update:icon", l))
36
39
  }, {
37
- default: c(() => [
38
- o(a(p), {
40
+ default: a(() => [
41
+ n(s(w), {
39
42
  class: "hover:bg-b-2 aspect-square h-7 w-7 cursor-pointer rounded border border-transparent p-0 hover:border-inherit",
40
43
  variant: "ghost"
41
44
  }, {
42
- default: c(() => [
43
- o(a(x), {
45
+ default: a(() => [
46
+ n(s(y), {
44
47
  class: "text-c-2 size-5",
45
- src: r.value,
48
+ src: m.value,
46
49
  "stroke-width": "2"
47
50
  }, null, 8, ["src"])
48
51
  ]),
@@ -52,31 +55,41 @@ const y = {
52
55
  _: 1
53
56
  }, 8, ["modelValue"])
54
57
  ]),
55
- e("div", B, [
56
- o(b, {
58
+ t("div", S, [
59
+ n(k, {
57
60
  class: "text-xl font-bold",
58
61
  inputId: "documentName",
59
- modelValue: u.value,
60
- "onUpdate:modelValue": t[1] || (t[1] = (n) => l.eventBus.emit("update:document-info", { title: n }))
62
+ modelValue: i.value,
63
+ "onUpdate:modelValue": o[1] || (o[1] = (l) => e.eventBus.emit("document:update:info", { title: l }))
61
64
  }, null, 8, ["modelValue"])
62
65
  ])
63
- ], 8, w),
64
- o(h, { type: "document" }),
65
- e("div", V, [
66
- o(a(v), {
67
- eventBus: l.eventBus,
68
- layout: l.layout,
69
- type: "document"
70
- }, null, 8, ["eventBus", "layout"])
66
+ ], 8, V),
67
+ n(_, { type: "document" }),
68
+ t("div", C, [
69
+ n(s(b), null, {
70
+ default: a(({ Component: l }) => [
71
+ (r(), f(v, null, [
72
+ (r(), f(x(l), {
73
+ collectionType: "document",
74
+ document: e.document,
75
+ environment: e.environment,
76
+ eventBus: e.eventBus,
77
+ layout: e.layout,
78
+ workspaceStore: e.workspaceStore
79
+ }, null, 8, ["document", "environment", "eventBus", "layout", "workspaceStore"]))
80
+ ], 1024))
81
+ ]),
82
+ _: 1
83
+ })
71
84
  ])
72
- ])) : (d(), m("div", k, [...t[2] || (t[2] = [
73
- e("div", { class: "flex h-full flex-col items-center justify-center" }, [
74
- e("h1", { class: "text-2xl font-bold" }, "Document not found"),
75
- e("p", { class: "text-gray-500" }, " The document you are looking for does not exist. ")
85
+ ])) : (r(), d("div", D, [...o[2] || (o[2] = [
86
+ t("div", { class: "flex h-full flex-col items-center justify-center" }, [
87
+ t("h1", { class: "text-2xl font-bold" }, "Document not found"),
88
+ t("p", { class: "text-gray-500" }, " The document you are looking for does not exist. ")
76
89
  ], -1)
77
90
  ])]));
78
91
  }
79
92
  });
80
93
  export {
81
- L as default
94
+ q as default
82
95
  };
@@ -1 +1 @@
1
- {"version":3,"file":"WorkspaceCollection.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/collection/WorkspaceCollection.vue"],"names":[],"mappings":"AAuDA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAKlE;;;;;GAKG;;AACH,wBAyHC"}
1
+ {"version":3,"file":"WorkspaceCollection.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/collection/WorkspaceCollection.vue"],"names":[],"mappings":"AAuDA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAKlE;;;;;GAKG;;AACH,wBAuHC"}
@@ -1,32 +1,34 @@
1
- import { defineComponent as s, createElementBlock as c, openBlock as r, createElementVNode as e, createVNode as t, unref as a, toDisplayString as p } from "vue";
2
- import { ScalarIconGlobe as n } from "@scalar/icons";
1
+ import { defineComponent as s, createElementBlock as c, openBlock as r, createElementVNode as e, createVNode as t, unref as l, toDisplayString as n } from "vue";
2
+ import { ScalarIconGlobe as p } from "@scalar/icons";
3
3
  import { RouterView as i } from "vue-router";
4
4
  import m from "./components/Tabs.vue.js";
5
- const u = { class: "w-full md:mx-auto md:max-w-[720px]" }, f = ["aria-label"], _ = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, d = {}, B = /* @__PURE__ */ s({
5
+ const u = { class: "w-full md:mx-auto md:max-w-[720px]" }, f = ["aria-label"], _ = { class: "flex flex-col gap-12 px-1.5 pt-8" }, d = {}, B = /* @__PURE__ */ s({
6
6
  ...d,
7
7
  __name: "WorkspaceCollection",
8
8
  props: {
9
9
  document: {},
10
10
  eventBus: {},
11
- layout: {}
11
+ layout: {},
12
+ environment: {},
13
+ workspaceStore: {}
12
14
  },
13
15
  setup(x) {
14
16
  const o = "Workspace Title [replace with name]";
15
- return (l, w) => (r(), c("div", u, [
17
+ return (a, v) => (r(), c("div", u, [
16
18
  e("div", {
17
19
  "aria-label": `title: ${o}`,
18
20
  class: "mx-auto flex h-fit w-full flex-col gap-2 pt-6 pb-3 md:mx-auto md:max-w-[720px]"
19
21
  }, [
20
- t(a(n), { class: "text-c-2 size-6" }),
22
+ t(l(p), { class: "text-c-2 size-6" }),
21
23
  e("div", { class: "group relative ml-1.25" }, [
22
- e("span", { class: "text-c-1 flex h-8 items-center" }, p(o))
24
+ e("span", { class: "text-c-1 flex h-8 items-center" }, n(o))
23
25
  ])
24
26
  ], 8, f),
25
27
  t(m, { type: "workspace" }),
26
28
  e("div", _, [
27
- t(a(i), {
28
- eventBus: l.eventBus,
29
- layout: l.layout,
29
+ t(l(i), {
30
+ eventBus: a.eventBus,
31
+ layout: a.layout,
30
32
  type: "workspace"
31
33
  }, null, 8, ["eventBus", "layout"])
32
34
  ])
@@ -1,89 +1,15 @@
1
- import type { Environment as EntitiesEnvironment } from '@scalar/oas-utils/entities/environment';
2
- import type { EnvVariable } from '../../../../store/index.js';
3
- import { type Environment, type EnvironmentVariable } from '../../../../v2/features/environments/index.js';
4
- type __VLS_Props = {
5
- /** Current selected document name or when null it means workspace level environments */
6
- documentName: string | null;
7
- /** List of all available environments for the selected document */
8
- environments: Environment[];
9
- /** TODO: remove when we migrate to the new store */
10
- environment: EntitiesEnvironment;
11
- envVariables: EnvVariable[];
12
- };
13
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
14
- "environment:reorder": (payload: {
15
- draggingItem: {
16
- id: string;
17
- };
18
- hoveredItem: {
19
- id: string;
20
- };
21
- }) => any;
22
- "environment:add": (payload: {
23
- environment: Environment;
24
- }) => any;
25
- "environment:update": (payload: {
26
- environmentName: string;
27
- environment: Partial<Environment>;
28
- }) => any;
29
- "environment:delete": (payload: {
30
- environmentName: string;
31
- }) => any;
32
- "environment:add:variable": (payload: {
33
- environmentName: string;
34
- environmentVariable: Partial<EnvironmentVariable>;
35
- }) => any;
36
- "environment:update:variable": (payload: {
37
- /** Row number */
38
- id: number;
39
- /** Environment name */
40
- environmentName: string;
41
- /** Payload */
42
- environmentVariable: Partial<EnvironmentVariable>;
43
- }) => any;
44
- "environment:delete:variable": (payload: {
45
- /** Environment name */
46
- environmentName: string;
47
- /** Row number */
48
- id: number;
49
- }) => any;
50
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
51
- "onEnvironment:reorder"?: ((payload: {
52
- draggingItem: {
53
- id: string;
54
- };
55
- hoveredItem: {
56
- id: string;
57
- };
58
- }) => any) | undefined;
59
- "onEnvironment:add"?: ((payload: {
60
- environment: Environment;
61
- }) => any) | undefined;
62
- "onEnvironment:update"?: ((payload: {
63
- environmentName: string;
64
- environment: Partial<Environment>;
65
- }) => any) | undefined;
66
- "onEnvironment:delete"?: ((payload: {
67
- environmentName: string;
68
- }) => any) | undefined;
69
- "onEnvironment:add:variable"?: ((payload: {
70
- environmentName: string;
71
- environmentVariable: Partial<EnvironmentVariable>;
72
- }) => any) | undefined;
73
- "onEnvironment:update:variable"?: ((payload: {
74
- /** Row number */
75
- id: number;
76
- /** Environment name */
77
- environmentName: string;
78
- /** Payload */
79
- environmentVariable: Partial<EnvironmentVariable>;
80
- }) => any) | undefined;
81
- "onEnvironment:delete:variable"?: ((payload: {
82
- /** Environment name */
83
- environmentName: string;
84
- /** Row number */
85
- id: number;
86
- }) => any) | undefined;
87
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
1
+ declare const _default: import("vue").DefineComponent<(import("../../../../v2/features/app/helpers/routes.js").RouteProps & {
2
+ collectionType: "document";
3
+ document: import("@scalar/workspace-store/schemas").WorkspaceDocument;
4
+ }) | (import("../../../../v2/features/app/helpers/routes.js").RouteProps & {
5
+ collectionType: "workspace";
6
+ document: null;
7
+ }), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<(import("../../../../v2/features/app/helpers/routes.js").RouteProps & {
8
+ collectionType: "document";
9
+ document: import("@scalar/workspace-store/schemas").WorkspaceDocument;
10
+ }) | (import("../../../../v2/features/app/helpers/routes.js").RouteProps & {
11
+ collectionType: "workspace";
12
+ document: null;
13
+ })> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
88
14
  export default _default;
89
15
  //# sourceMappingURL=Environment.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Environment.vue"],"names":[],"mappings":"AA8GA,OAAO,KAAK,EAAE,WAAW,IAAI,mBAAmB,EAAE,MAAM,wCAAwC,CAAA;AAEhG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAA;AAEnC,KAAK,WAAW,GAAG;IACjB,wFAAwF;IACxF,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAE3B,mEAAmE;IACnE,YAAY,EAAE,WAAW,EAAE,CAAA;IAE3B,oDAAoD;IACpD,WAAW,EAAE,mBAAmB,CAAA;IAChC,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B,CAAC;;;sBAQkB;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE;qBACf;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE;;;qBAGgB,WAAW;;;yBAG5B,MAAM;qBAAe,OAAO,CAAC,WAAW,CAAC;;;yBAEjB,MAAM;;;yBAMvC,MAAM;6BACF,OAAO,CAAC,mBAAmB,CAAC;;;QAMjD,iBAAiB;YACb,MAAM;QACV,uBAAuB;yBACN,MAAM;QACvB,cAAc;6BACO,OAAO,CAAC,mBAAmB,CAAC;;;QAMjD,uBAAuB;yBACN,MAAM;QACvB,iBAAiB;YACb,MAAM;;;;sBApCI;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE;qBACf;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE;;;qBAGgB,WAAW;;;yBAG5B,MAAM;qBAAe,OAAO,CAAC,WAAW,CAAC;;;yBAEjB,MAAM;;;yBAMvC,MAAM;6BACF,OAAO,CAAC,mBAAmB,CAAC;;;QAMjD,iBAAiB;YACb,MAAM;QACV,uBAAuB;yBACN,MAAM;QACvB,cAAc;6BACO,OAAO,CAAC,mBAAmB,CAAC;;;QAMjD,uBAAuB;yBACN,MAAM;QACvB,iBAAiB;YACb,MAAM;;;AAiIhB,wBAOG"}
1
+ {"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Environment.vue"],"names":[],"mappings":";;;;;;;;;;;;;AAiJA,wBAMG"}
@@ -1,34 +1,29 @@
1
- import { defineComponent as i, createElementBlock as a, openBlock as m, createStaticVNode as v, createVNode as d, unref as l } from "vue";
2
- import s from "../../environments/EnvironmentsList.vue.js";
3
- const p = { class: "flex flex-col gap-4" }, E = /* @__PURE__ */ i({
1
+ import { defineComponent as s, computed as c, createElementBlock as l, openBlock as a, createStaticVNode as i, createVNode as r, unref as m } from "vue";
2
+ import v from "../../environments/EnvironmentsList.vue.js";
3
+ const d = { class: "flex flex-col gap-4" }, f = /* @__PURE__ */ s({
4
4
  __name: "Environment",
5
5
  props: {
6
- documentName: {},
7
- environments: {},
6
+ document: {},
7
+ eventBus: {},
8
+ layout: {},
8
9
  environment: {},
9
- envVariables: {}
10
+ workspaceStore: {},
11
+ collectionType: {}
10
12
  },
11
- emits: ["environment:reorder", "environment:add", "environment:update", "environment:delete", "environment:add:variable", "environment:update:variable", "environment:delete:variable"],
12
- setup(u, { emit: o }) {
13
- const t = o;
14
- return (r, e) => (m(), a("div", p, [
15
- e[7] || (e[7] = v('<div class="flex items-start justify-between gap-2"><div class="flex flex-col gap-2"><div class="flex h-8 items-center"><h3 class="font-bold">Environment Variables</h3></div><p class="text-c-2 mb-4 text-sm"> Set environment variables at your collection level. Use <code class="font-code text-c-2"> {{ variable }} </code> to add / search among the selected environment&#39;s variables in your request inputs. </p></div></div>', 1)),
16
- d(l(s), {
17
- documentName: r.documentName,
18
- envVariables: r.envVariables,
19
- environment: r.environment,
20
- environments: r.environments,
21
- "onEnvironment:add": e[0] || (e[0] = (n) => t("environment:add", n)),
22
- "onEnvironment:add:variable": e[1] || (e[1] = (n) => t("environment:add:variable", n)),
23
- "onEnvironment:delete": e[2] || (e[2] = (n) => t("environment:delete", n)),
24
- "onEnvironment:delete:variable": e[3] || (e[3] = (n) => t("environment:delete:variable", n)),
25
- "onEnvironment:reorder": e[4] || (e[4] = (n) => t("environment:reorder", n)),
26
- "onEnvironment:update": e[5] || (e[5] = (n) => t("environment:update", n)),
27
- "onEnvironment:update:variable": e[6] || (e[6] = (n) => t("environment:update:variable", n))
28
- }, null, 8, ["documentName", "envVariables", "environment", "environments"])
13
+ setup(e) {
14
+ const o = c(
15
+ () => (e.collectionType === "document" ? e.document["x-scalar-environments"] : e.workspaceStore.workspace["x-scalar-environments"]) ?? {}
16
+ );
17
+ return (t, n) => (a(), l("div", d, [
18
+ n[0] || (n[0] = i('<div class="flex items-start justify-between gap-2"><div class="flex flex-col gap-2"><div class="flex h-8 items-center"><h3 class="font-bold">Environment Variables</h3></div><p class="text-c-2 mb-4 text-sm"> Set environment variables at your collection level. Use <code class="font-code text-c-2"> {{ variable }} </code> to add / search among the selected environment&#39;s variables in your request inputs. </p></div></div>', 1)),
19
+ r(m(v), {
20
+ collectionType: t.collectionType,
21
+ environments: o.value,
22
+ eventBus: t.eventBus
23
+ }, null, 8, ["collectionType", "environments", "eventBus"])
29
24
  ]));
30
25
  }
31
26
  });
32
27
  export {
33
- E as default
28
+ f as default
34
29
  };