@scalar/api-client 2.27.1 → 2.29.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 (77) hide show
  1. package/CHANGELOG.md +146 -0
  2. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  3. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
  4. package/dist/libs/local-storage.js +3 -3
  5. package/dist/style.css +1 -1
  6. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  7. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +21 -21
  8. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  9. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
  10. package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +67 -75
  11. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -0
  12. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  13. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -0
  14. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  15. package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +1 -1
  16. package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -1
  17. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +20 -19
  18. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +2 -0
  19. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  20. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +42 -40
  21. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  22. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +5 -5
  23. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +3 -1
  24. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
  25. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +35 -35
  26. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  27. package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
  28. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  29. package/dist/v2/components/sidebar/Sidebar.vue.js +1 -1
  30. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  31. package/dist/v2/features/app/App.vue.js +70 -70
  32. package/dist/v2/features/app/app-events.d.ts +2 -1
  33. package/dist/v2/features/app/app-events.d.ts.map +1 -1
  34. package/dist/v2/features/app/app-events.js +89 -64
  35. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  36. package/dist/v2/features/app/app-state.js +172 -151
  37. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  38. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  39. package/dist/v2/features/app/components/AppSidebar.vue2.js +48 -47
  40. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
  41. package/dist/v2/features/app/components/DesktopTabs.vue.js +4 -4
  42. package/dist/v2/features/app/components/DownloadAppButton.vue.d.ts.map +1 -1
  43. package/dist/v2/features/app/components/DownloadAppButton.vue.js +1 -1
  44. package/dist/v2/features/app/components/DownloadAppButton.vue2.js +9 -9
  45. package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts.map +1 -1
  46. package/dist/v2/features/app/components/SidebarItemMenu.vue.js +71 -43
  47. package/dist/v2/features/app/helpers/routes.js +11 -11
  48. package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +1 -6
  49. package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +1 -1
  50. package/dist/v2/features/collection/WorkspaceCollection.vue.js +38 -20
  51. package/dist/v2/features/collection/components/LabelInput.vue.d.ts +3 -0
  52. package/dist/v2/features/collection/components/LabelInput.vue.d.ts.map +1 -1
  53. package/dist/v2/features/collection/components/LabelInput.vue.js +2 -2
  54. package/dist/v2/features/collection/components/LabelInput.vue2.js +20 -16
  55. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +7 -2
  56. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -1
  57. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +70 -71
  58. package/dist/v2/features/command-palette/components/{CommandPaletteDocument.vue.d.ts → CommandPaletteOpenApiDocument.vue.d.ts} +3 -3
  59. package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.d.ts.map +1 -0
  60. package/dist/v2/features/command-palette/components/{CommandPaletteDocument.vue.js → CommandPaletteOpenApiDocument.vue.js} +15 -15
  61. package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue2.js +4 -0
  62. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +2 -2
  63. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -1
  64. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +10 -10
  65. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +27 -5
  66. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -1
  67. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +80 -53
  68. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +34 -9
  69. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
  70. package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +50 -44
  71. package/dist/v2/features/operation/Operation.vue.js +1 -1
  72. package/dist/v2/workspace-events.d.ts.map +1 -1
  73. package/dist/v2/workspace-events.js +123 -113
  74. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  75. package/package.json +17 -17
  76. package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts.map +0 -1
  77. package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue2.js +0 -4
@@ -1,4 +1,4 @@
1
- import { defineComponent as U, useId as $, ref as y, computed as S, createBlock as p, openBlock as c, unref as s, withCtx as r, createVNode as m, createCommentVNode as x, createElementBlock as v, Fragment as b, createElementVNode as u, createTextVNode as g, toDisplayString as f, withModifiers as q, normalizeClass as M } from "vue";
1
+ import { defineComponent as U, useId as $, ref as f, computed as S, createBlock as x, openBlock as c, unref as s, withCtx as r, createVNode as m, createCommentVNode as p, createElementBlock as y, Fragment as b, createElementVNode as u, createTextVNode as g, toDisplayString as v, withModifiers as q, normalizeClass as M } from "vue";
2
2
  import { useModal as N, ScalarComboboxMultiselect as T, ScalarButton as j, ScalarListboxCheckbox as z, ScalarIconButton as E } from "@scalar/components";
3
3
  import { ScalarIconCaretDown as L, ScalarIconTrash as P } from "@scalar/icons";
4
4
  import { getResolvedRef as F } from "@scalar/workspace-store/helpers/get-resolved-ref";
@@ -13,6 +13,7 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
13
13
  props: {
14
14
  environment: {},
15
15
  eventBus: {},
16
+ createAnySecurityScheme: { type: Boolean, default: !0 },
16
17
  isStatic: { type: Boolean, default: !1 },
17
18
  meta: {},
18
19
  proxyUrl: {},
@@ -22,8 +23,8 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
22
23
  server: {},
23
24
  title: {}
24
25
  },
25
- setup(e, { expose: D }) {
26
- const k = $(), C = y(null), B = y(!1), d = N(), o = y(null), h = S(() => {
26
+ setup(e, { expose: A }) {
27
+ const k = $(), C = f(null), B = f(!1), d = N(), o = f(null), h = S(() => {
27
28
  if (!e.securityRequirements?.length)
28
29
  return null;
29
30
  const l = J(e.securityRequirements);
@@ -35,63 +36,64 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
35
36
  () => K(
36
37
  e.securityRequirements ?? [],
37
38
  e.securitySchemes ?? {},
38
- e.selectedSecurity?.selectedSchemes ?? []
39
+ e.selectedSecurity?.selectedSchemes ?? [],
40
+ e.createAnySecurityScheme
39
41
  )
40
42
  ), i = S(() => {
41
43
  const l = e.selectedSecurity?.selectedSchemes;
42
44
  return l?.length ? l.flatMap((t) => {
43
- const a = Object.keys(t);
44
- if (a.length === 0)
45
+ const n = Object.keys(t);
46
+ if (n.length === 0)
45
47
  return [];
46
- if (a.length > 1)
48
+ if (n.length > 1)
47
49
  return Q(t);
48
- const n = a[0];
49
- return n ? F(e.securitySchemes?.[n]) ? W({
50
- name: n,
50
+ const a = n[0];
51
+ return a ? F(e.securitySchemes?.[a]) ? W({
52
+ name: a,
51
53
  value: t
52
54
  }) : [] : [];
53
55
  }) : [];
54
- }), I = (l) => {
56
+ }), D = (l) => {
55
57
  B.value && l.stopPropagation(), C.value?.$el.click();
56
- }, w = (l) => {
57
- const t = l.filter((n) => n.payload === void 0).map((n) => G(n.value, { depth: 2 })), a = l.filter((n) => n.payload !== void 0).map((n) => ({
58
- name: n.label,
59
- scheme: n.payload
58
+ }, I = (l) => {
59
+ const t = l.filter((a) => a.payload === void 0).map((a) => G(a.value, { depth: 2 })), n = l.filter((a) => a.payload !== void 0).map((a) => ({
60
+ name: a.label,
61
+ scheme: a.payload
60
62
  }));
61
63
  e.eventBus.emit("auth:update:selected-security-schemes", {
62
64
  selectedRequirements: t,
63
- newSchemes: a,
65
+ newSchemes: n,
64
66
  meta: e.meta
65
67
  });
66
68
  }, R = (l) => {
67
69
  o.value = { label: l.label, payload: l.value }, d.show();
68
- }, A = () => {
70
+ }, w = () => {
69
71
  o.value && (e.eventBus.emit("auth:delete:security-scheme", {
70
72
  names: Object.keys(o.value.payload)
71
73
  }), o.value = null, d.hide());
72
74
  };
73
- return D({
75
+ return A({
74
76
  authIndicator: h,
75
77
  selectedSchemeOptions: i,
76
78
  schemeOptions: O
77
- }), (l, t) => (c(), p(s(Y), {
79
+ }), (l, t) => (c(), x(s(Y), {
78
80
  class: "group/params relative",
79
81
  isStatic: e.isStatic,
80
82
  itemCount: i.value.length,
81
- "onUpdate:modelValue": t[1] || (t[1] = (a) => B.value = a)
83
+ "onUpdate:modelValue": t[1] || (t[1] = (n) => B.value = n)
82
84
  }, {
83
85
  title: r(() => [
84
86
  u("div", {
85
87
  id: s(k),
86
88
  class: "inline-flex items-center gap-0.5 leading-[20px]"
87
89
  }, [
88
- u("span", null, f(e.title), 1),
89
- h.value ? (c(), v("span", {
90
+ u("span", null, v(e.title), 1),
91
+ h.value ? (c(), y("span", {
90
92
  key: 0,
91
93
  class: M(["text-c-3 hover:bg-b-3 hover:text-c-1 -my-0.5 -mr-1 cursor-pointer rounded px-1 py-0.5 leading-[normal] font-normal", { "text-c-1": h.value.text === "Required" }]),
92
94
  "data-testid": "auth-indicator",
93
- onClick: I
94
- }, f(h.value.text), 3)) : x("", !0)
95
+ onClick: D
96
+ }, v(h.value.text), 3)) : p("", !0)
95
97
  ], 8, Z)
96
98
  ]),
97
99
  actions: r(() => [
@@ -103,22 +105,22 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
103
105
  placement: "bottom-end",
104
106
  teleport: "",
105
107
  onDelete: R,
106
- "onUpdate:modelValue": w
108
+ "onUpdate:modelValue": I
107
109
  }, {
108
- option: r(({ option: a, selected: n }) => [
110
+ option: r(({ option: n, selected: a }) => [
109
111
  m(s(z), {
110
112
  multiselect: "",
111
- selected: n
113
+ selected: a
112
114
  }, null, 8, ["selected"]),
113
- u("div", _, f(a.label), 1),
114
- a.isDeletable ? (c(), p(s(E), {
115
+ u("div", _, v(n.label), 1),
116
+ n.isDeletable ? (c(), x(s(E), {
115
117
  key: 0,
116
118
  class: "-m-0.5 shrink-0 p-0.5 opacity-0 group-hover/item:opacity-100",
117
119
  icon: s(P),
118
- label: `Delete ${a.label}`,
120
+ label: `Delete ${n.label}`,
119
121
  size: "xs",
120
- onClick: q((V) => R(a), ["stop"])
121
- }, null, 8, ["icon", "label", "onClick"])) : x("", !0)
122
+ onClick: q((V) => R(n), ["stop"])
123
+ }, null, 8, ["icon", "label", "onClick"])) : p("", !0)
122
124
  ]),
123
125
  default: r(() => [
124
126
  m(s(j), {
@@ -129,13 +131,13 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
129
131
  variant: "ghost"
130
132
  }, {
131
133
  default: r(() => [
132
- i.value.length === 1 ? (c(), v(b, { key: 0 }, [
134
+ i.value.length === 1 ? (c(), y(b, { key: 0 }, [
133
135
  t[2] || (t[2] = u("span", { class: "sr-only" }, "Selected Auth Type:", -1)),
134
- g(" " + f(i.value[0]?.label), 1)
135
- ], 64)) : i.value.length > 1 ? (c(), v(b, { key: 1 }, [
136
+ g(" " + v(i.value[0]?.label), 1)
137
+ ], 64)) : i.value.length > 1 ? (c(), y(b, { key: 1 }, [
136
138
  t[3] || (t[3] = g(" Multiple ", -1)),
137
139
  t[4] || (t[4] = u("span", { class: "sr-only" }, "Auth Types Selected", -1))
138
- ], 64)) : (c(), v(b, { key: 2 }, [
140
+ ], 64)) : (c(), y(b, { key: 2 }, [
139
141
  t[5] || (t[5] = u("span", { class: "sr-only" }, "Select", -1)),
140
142
  t[6] || (t[6] = g(" Auth Type ", -1))
141
143
  ], 64)),
@@ -162,14 +164,14 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
162
164
  selectedSchemeOptions: i.value,
163
165
  server: e.server
164
166
  }, null, 8, ["activeAuthIndex", "environment", "eventBus", "isStatic", "meta", "proxyUrl", "securitySchemes", "selectedSchemeOptions", "server"]),
165
- o.value ? (c(), p(H, {
167
+ o.value ? (c(), x(H, {
166
168
  key: 0,
167
169
  label: o.value.label,
168
170
  scheme: o.value,
169
171
  state: s(d),
170
- onClose: t[0] || (t[0] = (a) => s(d).hide()),
171
- onDelete: A
172
- }, null, 8, ["label", "scheme", "state"])) : x("", !0)
172
+ onClose: t[0] || (t[0] = (n) => s(d).hide()),
173
+ onDelete: w
174
+ }, null, 8, ["label", "scheme", "state"])) : p("", !0)
173
175
  ]),
174
176
  _: 1
175
177
  }, 8, ["isStatic", "itemCount"]));
@@ -1 +1 @@
1
- {"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue"],"names":[],"mappings":"AAiYA,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAGnH,OAAO,KAAK,EAEV,YAAY,EACb,MAAM,8DAA8D,CAAA;AAMrE,OAAO,KAAK,EAIV,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,6DAA6D,CAAA;AAIpE,KAAK,WAAW,GAAG;IACjB,wCAAwC;IACxC,WAAW,EAAE,kBAAkB,CAAA;IAC/B,kBAAkB;IAClB,KAAK,EAAE,sBAAsB,CAAA;IAC7B,6BAA6B;IAC7B,IAAI,EAAE,MAAM,sBAAsB,CAAA;IAClC,sBAAsB;IACtB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,sBAAsB;IACtB,MAAM,EAAE,0BAA0B,CAAA;IAClC,mCAAmC;IACnC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,2CAA2C;IAC3C,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AA6uBF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue"],"names":[],"mappings":"AAkYA,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAGnH,OAAO,KAAK,EAEV,YAAY,EACb,MAAM,8DAA8D,CAAA;AAMrE,OAAO,KAAK,EAIV,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,6DAA6D,CAAA;AAIpE,KAAK,WAAW,GAAG;IACjB,wCAAwC;IACxC,WAAW,EAAE,kBAAkB,CAAA;IAC/B,kBAAkB;IAClB,KAAK,EAAE,sBAAsB,CAAA;IAC7B,6BAA6B;IAC7B,IAAI,EAAE,MAAM,sBAAsB,CAAA;IAClC,sBAAsB;IACtB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,sBAAsB;IACtB,MAAM,EAAE,0BAA0B,CAAA;IAClC,mCAAmC;IACnC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,2CAA2C;IAC3C,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AA8uBF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -2,9 +2,9 @@ import { defineComponent as P, computed as C, ref as R, watch as I, createElemen
2
2
  import { useLoadingState as L, ScalarButton as k } from "@scalar/components";
3
3
  import { pkceOptions as F } from "@scalar/oas-utils/entities/spec";
4
4
  import { useToasts as A } from "@scalar/use-toasts";
5
- import N from "./OAuthScopesInput.vue.js";
5
+ import h from "./OAuthScopesInput.vue.js";
6
6
  /* empty css */
7
- import { authorizeOauth2 as h } from "../helpers/oauth.js";
7
+ import { authorizeOauth2 as N } from "../helpers/oauth.js";
8
8
  import c from "./RequestAuthDataTableInput.vue.js";
9
9
  import u from "../../../../components/DataTable/DataTableRow.vue.js";
10
10
  const j = { class: "flex h-8 items-center justify-end gap-2 border-t" }, E = { class: "flex h-8 w-full items-center justify-end border-t" }, q = /* @__PURE__ */ P({
@@ -49,7 +49,7 @@ const j = { class: "flex h-8 items-center justify-end gap-2 border-t" }, E = { c
49
49
  () => a.value["x-scalar-secret-redirect-uri"],
50
50
  (s) => {
51
51
  w.value || s || typeof window > "u" || !("x-scalar-secret-redirect-uri" in a.value) || (w.value = !0, i({
52
- "x-scalar-secret-redirect-uri": window.location.origin
52
+ "x-scalar-secret-redirect-uri": window.location.origin + window.location.pathname
53
53
  }));
54
54
  },
55
55
  { immediate: !0 }
@@ -58,7 +58,7 @@ const j = { class: "flex h-8 items-center justify-end gap-2 border-t" }, E = { c
58
58
  if (y.isLoading)
59
59
  return;
60
60
  y.start();
61
- const [s, e] = await h(
61
+ const [s, e] = await N(
62
62
  t.flows,
63
63
  t.type,
64
64
  U.value,
@@ -262,7 +262,7 @@ const j = { class: "flex h-8 items-center justify-end gap-2 border-t" }, E = { c
262
262
  })) : v("", !0),
263
263
  r(o(u), null, {
264
264
  default: l(() => [
265
- r(N, {
265
+ r(h, {
266
266
  flow: a.value,
267
267
  flowType: t.type,
268
268
  selectedScopes: U.value,
@@ -41,5 +41,7 @@ export declare const formatComplexScheme: (scheme: NonNullable<OpenApiDocument["
41
41
  */
42
42
  export declare const getSecuritySchemeOptions: (security: NonNullable<OpenApiDocument["security"]>, securitySchemes: NonNullable<ComponentsObject["securitySchemes"]>,
43
43
  /** We need to add the selected schemes if they do not already exist in the calculated options */
44
- selectedSchemes: SecurityRequirementObject[]) => SecuritySchemeOption[] | SecuritySchemeGroup[];
44
+ selectedSchemes: SecurityRequirementObject[],
45
+ /** Allows adding authentication which is not in the document */
46
+ canAddNewAuth?: boolean) => SecuritySchemeOption[] | SecuritySchemeGroup[];
45
47
  //# sourceMappingURL=security-scheme.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"security-scheme.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,8DAA8D,CAAA;AAIrE,gEAAgE;AAChE,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,yBAAyB,CAAA;IAChC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,oBAAoB,CAAA;CAC/B,CAAA;AAED,mEAAmE;AACnE,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,oBAAoB,EAAE,CAAA;CAChC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,iBAAiB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,yBAAyB,CAAA;CAAE;;;;;CAK9F,CAAA;AAEF,uCAAuC;AACvC,eAAO,MAAM,mBAAmB,GAAI,QAAQ,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC;;;;;CAIxF,CAAA;AA6BJ;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,UAAU,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,EAClD,iBAAiB,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;AACjE,iGAAiG;AACjG,iBAAiB,yBAAyB,EAAE,KAC3C,oBAAoB,EAAE,GAAG,mBAAmB,EAsE9C,CAAA"}
1
+ {"version":3,"file":"security-scheme.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,8DAA8D,CAAA;AAIrE,gEAAgE;AAChE,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,yBAAyB,CAAA;IAChC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,oBAAoB,CAAA;CAC/B,CAAA;AAED,mEAAmE;AACnE,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,oBAAoB,EAAE,CAAA;CAChC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,iBAAiB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,yBAAyB,CAAA;CAAE;;;;;CAK9F,CAAA;AAEF,uCAAuC;AACvC,eAAO,MAAM,mBAAmB,GAAI,QAAQ,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC;;;;;CAIxF,CAAA;AA6BJ;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,UAAU,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,EAClD,iBAAiB,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;AACjE,iGAAiG;AACjG,iBAAiB,yBAAyB,EAAE;AAC5C,gEAAgE;AAChE,uBAAoB,KACnB,oBAAoB,EAAE,GAAG,mBAAmB,EA2E9C,CAAA"}
@@ -1,27 +1,27 @@
1
- import { generateHash as p } from "@scalar/helpers/string/generate-hash";
2
- import { getResolvedRef as u } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
- import { authOptions as b } from "./auth-options.js";
4
- const m = ({ name: o, value: i }) => ({
5
- id: p(JSON.stringify(i)),
1
+ import { generateHash as b } from "@scalar/helpers/string/generate-hash";
2
+ import { getResolvedRef as h } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
+ import { authOptions as S } from "./auth-options.js";
4
+ const c = ({ name: o, value: i }) => ({
5
+ id: b(JSON.stringify(i)),
6
6
  label: o,
7
7
  value: i,
8
8
  isDeletable: !0
9
- }), S = (o) => m({
9
+ }), g = (o) => c({
10
10
  name: Object.keys(o).join(" & "),
11
11
  value: o
12
- }), f = (o, i) => {
13
- const a = Object.keys(o);
14
- if (a.length > 1)
15
- return S(o);
16
- if (a[0])
17
- return u(i[a[0]]) ? m({ name: a[0], value: o }) : void 0;
18
- }, j = (o, i, a) => {
19
- const { requiredFormatted: c, requiredSchemeNames: h, existingIds: r } = o.reduce(
12
+ }), u = (o, i) => {
13
+ const n = Object.keys(o);
14
+ if (n.length > 1)
15
+ return g(o);
16
+ if (n[0])
17
+ return h(i[n[0]]) ? c({ name: n[0], value: o }) : void 0;
18
+ }, y = (o, i, n, l = !0) => {
19
+ const { requiredFormatted: f, requiredSchemeNames: p, existingIds: d } = o.reduce(
20
20
  (e, t) => {
21
- const n = f(t, i);
22
- n && (e.requiredFormatted.push(n), e.existingIds.add(n.id));
23
- for (const s of Object.keys(t))
24
- e.requiredSchemeNames.add(s);
21
+ const s = u(t, i);
22
+ s && (e.requiredFormatted.push(s), e.existingIds.add(s.id));
23
+ for (const r of Object.keys(t))
24
+ e.requiredSchemeNames.add(r);
25
25
  return e;
26
26
  },
27
27
  {
@@ -29,36 +29,36 @@ const m = ({ name: o, value: i }) => ({
29
29
  requiredSchemeNames: /* @__PURE__ */ new Set(),
30
30
  existingIds: /* @__PURE__ */ new Set()
31
31
  }
32
- ), d = [];
32
+ ), a = [];
33
33
  for (const [e, t] of Object.entries(i)) {
34
- if (h.has(e))
34
+ if (p.has(e))
35
35
  continue;
36
- if (u(t)) {
37
- const s = m({ name: e, value: { [e]: [] } });
38
- d.push(s), r.add(s.id);
36
+ if (h(t)) {
37
+ const r = c({ name: e, value: { [e]: [] } });
38
+ a.push(r), d.add(r.id);
39
39
  }
40
40
  }
41
- for (const e of a) {
42
- const t = f(e, i);
43
- t && !r.has(t.id) && (d.push(t), r.add(t.id));
41
+ for (const e of n) {
42
+ const t = u(e, i);
43
+ t && !d.has(t.id) && (a.push(t), d.add(t.id));
44
44
  }
45
- const l = [
46
- { label: "Required authentication", options: c },
47
- { label: "Available authentication", options: d }
45
+ const m = [
46
+ { label: "Required authentication", options: f },
47
+ { label: "Available authentication", options: a }
48
48
  ];
49
- return l.push({
49
+ return l ? (m.push({
50
50
  label: "Add new authentication",
51
- options: Object.entries(b).map(([e, t]) => ({
51
+ options: Object.entries(S).map(([e, t]) => ({
52
52
  id: e,
53
53
  label: t.label,
54
54
  value: { [e]: [] },
55
55
  payload: t.payload,
56
56
  isDeletable: !1
57
57
  }))
58
- }), l;
58
+ }), m) : f.length ? m : a;
59
59
  };
60
60
  export {
61
- S as formatComplexScheme,
62
- m as formatScheme,
63
- j as getSecuritySchemeOptions
61
+ g as formatComplexScheme,
62
+ c as formatScheme,
63
+ y as getSecuritySchemeOptions
64
64
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/code-input/CodeInput.vue"],"names":[],"mappings":"AA8pBA,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACf,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAEnH,OAAO,EAAyC,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAIrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAKrD,MAAM,MAAM,mBAAmB,GAC3B,MAAM,GACN,MAAM,GACN,OAAO,GACP,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE3B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY;gBAEJ,mBAAmB;IAC/B,6FAA6F;iBAChF,kBAAkB,GAAG,SAAS;IAC3C,mEAAmE;WAC5D,MAAM,GAAG,MAAM,EAAE;IACxB,sCAAsC;e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eACnB,OAAO;IAClB,oCAAoC;kBACtB,OAAO;IACrB,kCAAkC;kBACpB,OAAO;IACrB,qBAAqB;WACd,OAAO;IACd,2BAA2B;mBACZ,OAAO;IACtB,+BAA+B;eACpB,kBAAkB;IAC7B,uCAAuC;iBAC1B,SAAS,EAAE;IACxB,sCAAsC;uBACnB,OAAO;IAC1B,wBAAwB;mBACT,OAAO;IACtB,wCAAwC;2BACjB,OAAO;IAC9B,gCAAgC;iBACnB,OAAO;IACpB,wCAAwC;oBACxB,OAAO;IACvB,sDAAsD;uBACnC,OAAO;IAC1B,mDAAmD;wBAC/B,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;IAC3C,mDAAmD;wBAC/B,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;IAC3C,0CAA0C;kBAC5B,OAAO;;;;;;;cA0oBT,CAAC,KAAK,IAAiB,KAAK,GAAG;;WAClC,CAAC,KAAK,IAAiB,KAAK,GAAG;EAYtC,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/code-input/CodeInput.vue"],"names":[],"mappings":"AA4pBA,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACf,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAEnH,OAAO,EAAyC,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAIrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAKrD,MAAM,MAAM,mBAAmB,GAC3B,MAAM,GACN,MAAM,GACN,OAAO,GACP,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA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,sCAAsC;eAC3B,OAAO;IAClB,yBAAyB;YACjB,OAAO;IACf,kDAAkD;aACzC,YAAY;IACrB,mDAAmD;WAC5C,MAAM,EAAE;IACf,2CAA2C;eAChC,MAAM,EAAE;IACnB,2CAA2C;;IAE3C,2CAA2C;eAChC,OAAO;IAClB,uCAAuC;kBACzB,MAAM;IACpB,8BAA8B;eACnB,OAAO;IAClB,oCAAoC;kBACtB,OAAO;IACrB,kCAAkC;kBACpB,OAAO;IACrB,qBAAqB;WACd,OAAO;IACd,2BAA2B;mBACZ,OAAO;IACtB,+BAA+B;eACpB,kBAAkB;IAC7B,uCAAuC;iBAC1B,SAAS,EAAE;IACxB,sCAAsC;uBACnB,OAAO;IAC1B,wBAAwB;mBACT,OAAO;IACtB,wCAAwC;2BACjB,OAAO;IAC9B,gCAAgC;iBACnB,OAAO;IACpB,wCAAwC;oBACxB,OAAO;IACvB,sDAAsD;uBACnC,OAAO;IAC1B,mDAAmD;wBAC/B,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;IAC3C,mDAAmD;wBAC/B,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;IAC3C,0CAA0C;kBAC5B,OAAO;;;;;;;cA0oBT,CAAC,KAAK,IAAiB,KAAK,GAAG;;WAClC,CAAC,KAAK,IAAiB,KAAK,GAAG;EAYtC,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -2,7 +2,7 @@ import o from "./CodeInput.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
5
- const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a0bd2752"]]);
5
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-776dfdde"]]);
6
6
  export {
7
- _ as default
7
+ e as default
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"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 const J = { class: "bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5" }, K =
33
33
  }, {
34
34
  default: s(() => [
35
35
  y(r(U), {
36
- class: "flex w-auto flex-1 pt-2",
36
+ class: "mac:pt-10 flex w-auto flex-1 pt-2",
37
37
  indent: 20,
38
38
  isDraggable: a.layout !== "modal",
39
39
  isDroppable: a.isDroppable,
@@ -1 +1 @@
1
- {"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/App.vue"],"names":[],"mappings":"AAoPA,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAY3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+DAA+D,CAAA;AAIxG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAA;AAM3C;;;;GAIG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;YAER,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;cAC5B,YAAY,EAAE;mBACT,KAAK,EAAE;wBACF,MAAM;iBACb,MAAM,QAAQ;4BACH,MAAM,mBAAmB;;;;YALzC,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;cAC5B,YAAY,EAAE;mBACT,KAAK,EAAE;wBACF,MAAM;iBACb,MAAM,QAAQ;4BACH,MAAM,mBAAmB;;IAajD;;;OAGG;4BACqB,MAAM,OAAO;IACrC;;;OAGG;yBACkB,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,UAAU,CAAA;KAAE,KAAK,OAAO;EA2U9D,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/App.vue"],"names":[],"mappings":"AAsPA,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAY3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+DAA+D,CAAA;AAIxG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAA;AAK3C;;;;GAIG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;YAER,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;cAC5B,YAAY,EAAE;mBACT,KAAK,EAAE;wBACF,MAAM;iBACb,MAAM,QAAQ;4BACH,MAAM,mBAAmB;;;;YALzC,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;cAC5B,YAAY,EAAE;mBACT,KAAK,EAAE;wBACF,MAAM;iBACb,MAAM,QAAQ;4BACH,MAAM,mBAAmB;;IAajD;;;OAGG;4BACqB,MAAM,OAAO;IACrC;;;OAGG;yBACkB,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,UAAU,CAAA;KAAE,KAAK,OAAO;EAqU9D,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1,24 +1,20 @@
1
- import { defineComponent as b, computed as T, createBlock as m, openBlock as i, unref as t, withCtx as p, createElementVNode as l, createVNode as r, createElementBlock as u, renderSlot as d, createCommentVNode as v, normalizeProps as y, guardReactiveProps as W } from "vue";
2
- import { useModal as g, ScalarTeleportRoot as x } from "@scalar/components";
3
- import { ScalarToasts as B } from "@scalar/use-toasts";
4
- import { extensions as C } from "@scalar/workspace-store/schemas/extensions";
5
- import { RouterView as E } from "vue-router";
1
+ import { defineComponent as b, computed as T, createBlock as m, openBlock as c, unref as t, withCtx as p, createElementVNode as i, createVNode as n, createElementBlock as d, renderSlot as v, createCommentVNode as g, normalizeProps as W, guardReactiveProps as y } from "vue";
2
+ import { useModal as x, ScalarTeleportRoot as B } from "@scalar/components";
3
+ import { ScalarToasts as C } from "@scalar/use-toasts";
4
+ import { extensions as E } from "@scalar/workspace-store/schemas/extensions";
5
+ import { RouterView as O } from "vue-router";
6
6
  import A from "./components/CreateWorkspaceModal.vue.js";
7
- import O from "./components/SplashScreen.vue.js";
8
- import { useDocumentWatcher as M } from "./hooks/use-document-watcher.js";
9
- import { useTheme as U } from "./hooks/use-theme.js";
10
- import _ from "../command-palette/TheCommandPalette.vue.js";
11
- import { useColorMode as D } from "../../hooks/use-color-mode.js";
12
- import { useGlobalHotKeys as I } from "../../hooks/use-global-hot-keys.js";
13
- import N from "./components/AppSidebar.vue.js";
14
- import P from "./components/DesktopTabs.vue.js";
15
- import H from "./components/DownloadAppButton.vue.js";
7
+ import M from "./components/SplashScreen.vue.js";
8
+ import { useDocumentWatcher as U } from "./hooks/use-document-watcher.js";
9
+ import { useTheme as _ } from "./hooks/use-theme.js";
10
+ import D from "../command-palette/TheCommandPalette.vue.js";
11
+ import { useColorMode as I } from "../../hooks/use-color-mode.js";
12
+ import { useGlobalHotKeys as N } from "../../hooks/use-global-hot-keys.js";
13
+ import P from "./components/AppSidebar.vue.js";
14
+ import H from "./components/DesktopTabs.vue.js";
16
15
  import { mergeSecurity as L } from "../../blocks/scalar-auth-selector-block/helpers/merge-security.js";
17
- const V = ["innerHTML"], $ = { key: 0 }, F = { class: "flex h-dvh w-dvw flex-1 flex-col" }, R = { class: "flex min-h-0 flex-1 flex-row" }, G = { class: "flex flex-1 flex-col" }, j = {
18
- key: 0,
19
- class: "flex h-12 items-center justify-end border-b p-2"
20
- }, z = { class: "bg-b-1 min-h-0 flex-1" }, K = { key: 1 }, q = {}, pe = /* @__PURE__ */ b({
21
- ...q,
16
+ const V = ["innerHTML"], $ = { key: 0 }, F = { class: "flex h-dvh w-dvw flex-1 flex-col" }, R = { class: "flex min-h-0 flex-1 flex-row" }, G = { class: "flex flex-1 flex-col" }, z = { class: "bg-b-1 min-h-0 flex-1" }, K = { key: 1 }, j = {}, ue = /* @__PURE__ */ b({
17
+ ...j,
22
18
  __name: "App",
23
19
  props: {
24
20
  layout: {},
@@ -28,28 +24,35 @@ const V = ["innerHTML"], $ = { key: 0 }, F = { class: "flex h-dvh w-dvw flex-1 f
28
24
  getAppState: { type: Function },
29
25
  getCommandPaletteState: { type: Function }
30
26
  },
31
- setup(a, { expose: k }) {
27
+ setup(o, { expose: k }) {
32
28
  k({
33
- openCreateWorkspace: () => c.show()
29
+ openCreateWorkspace: () => l.show()
34
30
  });
35
- const e = a.getAppState(), f = a.getCommandPaletteState();
36
- typeof window < "u" && (window.dataDumpWorkspace = () => e.store.value, window.dumpAppState = () => e), I(e.eventBus, a.layout), M({
37
- documentName: () => e.store.value?.workspace[C.workspace.activeDocument],
31
+ const e = o.getAppState(), f = o.getCommandPaletteState();
32
+ typeof window < "u" && (window.dataDumpWorkspace = () => e.store.value, window.dumpAppState = () => e), N(e.eventBus, o.layout), U({
33
+ documentName: () => e.store.value?.workspace[E.workspace.activeDocument],
38
34
  store: e.store,
39
35
  initialTimeout: 5e3
40
- }), D({ workspaceStore: e.store });
41
- const { themeStyleTag: w } = U({
42
- fallbackThemeSlug: () => a.fallbackThemeSlug,
43
- customThemes: () => a.customThemes,
36
+ }), I({ workspaceStore: e.store });
37
+ const { themeStyleTag: w } = _({
38
+ fallbackThemeSlug: () => o.fallbackThemeSlug,
39
+ customThemes: () => o.customThemes,
44
40
  store: e.store
45
- }), h = (s) => {
41
+ }), u = (s, a) => {
42
+ e.eventBus.emit("ui:navigate", {
43
+ page: "workspace",
44
+ path: "environment",
45
+ namespace: s,
46
+ workspaceSlug: a
47
+ });
48
+ }, S = (s) => {
46
49
  if (!s)
47
50
  return;
48
- const o = e.workspace.workspaceList.value?.find(
49
- (n) => n.id === s
51
+ const a = e.workspace.workspaceList.value?.find(
52
+ (r) => r.id === s
50
53
  );
51
- o && e.workspace.navigateToWorkspace(o.namespace, o.slug);
52
- }, c = g(), S = T(() => {
54
+ a && u(a.namespace, a.slug);
55
+ }, l = x(), h = T(() => {
53
56
  const s = e.store.value?.auth ? L(
54
57
  e.document.value?.components?.securitySchemes ?? {},
55
58
  {},
@@ -62,74 +65,71 @@ const V = ["innerHTML"], $ = { key: 0 }, F = { class: "flex h-dvh w-dvw flex-1 f
62
65
  environment: e.environment.value,
63
66
  eventBus: e.eventBus,
64
67
  exampleName: e.activeEntities.exampleName.value,
65
- layout: a.layout,
68
+ layout: o.layout,
66
69
  method: e.activeEntities.method.value,
67
70
  path: e.activeEntities.path.value,
68
71
  workspaceStore: e.store.value,
69
72
  activeWorkspace: e.workspace.activeWorkspace.value,
70
- plugins: a.plugins,
73
+ plugins: o.plugins,
71
74
  securitySchemes: s,
72
- customThemes: a.customThemes
75
+ customThemes: o.customThemes
73
76
  };
74
77
  });
75
- return (s, o) => (i(), m(t(x), null, {
78
+ return (s, a) => (c(), m(t(B), null, {
76
79
  default: p(() => [
77
- l("div", { innerHTML: t(w) }, null, 8, V),
78
- r(t(B)),
79
- t(e).store.value !== null && t(e).workspace.activeWorkspace.value !== null && !t(e).loading.value ? (i(), u("main", $, [
80
- l("div", F, [
81
- a.layout === "desktop" ? (i(), m(P, {
82
- key: 0,
83
- activeTabIndex: t(e).tabs.activeTabIndex.value,
84
- eventBus: t(e).eventBus,
85
- tabs: t(e).tabs.state.value
86
- }, null, 8, ["activeTabIndex", "eventBus", "tabs"])) : v("", !0),
87
- l("div", R, [
88
- r(N, {
80
+ i("div", { innerHTML: t(w) }, null, 8, V),
81
+ n(t(C)),
82
+ t(e).store.value !== null && t(e).workspace.activeWorkspace.value !== null && !t(e).loading.value ? (c(), d("main", $, [
83
+ i("div", F, [
84
+ i("div", R, [
85
+ n(P, {
89
86
  isSidebarOpen: t(e).sidebar.isOpen.value,
90
- "onUpdate:isSidebarOpen": o[0] || (o[0] = (n) => t(e).sidebar.isOpen.value = n),
87
+ "onUpdate:isSidebarOpen": a[0] || (a[0] = (r) => t(e).sidebar.isOpen.value = r),
91
88
  activeWorkspace: t(e).workspace.activeWorkspace.value,
92
89
  eventBus: t(e).eventBus,
93
90
  isWorkspaceOpen: t(e).workspace.isOpen.value,
94
- layout: a.layout,
91
+ layout: o.layout,
95
92
  sidebarState: t(e).sidebar.state,
96
93
  sidebarWidth: t(e).sidebar.width.value,
97
94
  store: t(e).store.value,
98
95
  workspaces: t(e).workspace.workspaceGroups.value,
99
- "onClick:workspace": t(e).workspace.navigateToWorkspace,
100
- "onCreate:workspace": o[1] || (o[1] = (n) => t(c).show()),
101
- "onSelect:workspace": h,
96
+ "onClick:workspace": u,
97
+ "onCreate:workspace": a[1] || (a[1] = (r) => t(l).show()),
98
+ "onSelect:workspace": S,
102
99
  onSelectItem: t(e).sidebar.handleSelectItem,
103
100
  "onUpdate:sidebarWidth": t(e).sidebar.handleSidebarWidthUpdate
104
101
  }, {
105
102
  sidebarMenuActions: p(() => [
106
- d(s.$slots, "sidebar-menu-actions")
103
+ v(s.$slots, "sidebar-menu-actions")
107
104
  ]),
108
105
  _: 3
109
- }, 8, ["isSidebarOpen", "activeWorkspace", "eventBus", "isWorkspaceOpen", "layout", "sidebarState", "sidebarWidth", "store", "workspaces", "onClick:workspace", "onSelectItem", "onUpdate:sidebarWidth"]),
110
- l("div", G, [
111
- a.layout === "web" ? (i(), u("nav", j, [
112
- r(H)
113
- ])) : v("", !0),
114
- l("div", z, [
115
- r(t(E), y(W(S.value)), null, 16)
106
+ }, 8, ["isSidebarOpen", "activeWorkspace", "eventBus", "isWorkspaceOpen", "layout", "sidebarState", "sidebarWidth", "store", "workspaces", "onSelectItem", "onUpdate:sidebarWidth"]),
107
+ i("div", G, [
108
+ o.layout === "desktop" ? (c(), m(H, {
109
+ key: 0,
110
+ activeTabIndex: t(e).tabs.activeTabIndex.value,
111
+ eventBus: t(e).eventBus,
112
+ tabs: t(e).tabs.state.value
113
+ }, null, 8, ["activeTabIndex", "eventBus", "tabs"])) : g("", !0),
114
+ i("div", z, [
115
+ n(t(O), W(y(h.value)), null, 16)
116
116
  ])
117
117
  ])
118
118
  ])
119
119
  ]),
120
- d(s.$slots, "create-workspace", { state: t(c) }, () => [
121
- r(A, {
122
- state: t(c),
123
- "onCreate:workspace": o[2] || (o[2] = (n) => t(e).workspace.create(n))
120
+ v(s.$slots, "create-workspace", { state: t(l) }, () => [
121
+ n(A, {
122
+ state: t(l),
123
+ "onCreate:workspace": a[2] || (a[2] = (r) => t(e).workspace.create(r))
124
124
  }, null, 8, ["state"])
125
125
  ]),
126
- r(_, {
126
+ n(D, {
127
127
  eventBus: t(e).eventBus,
128
128
  paletteState: t(f),
129
129
  workspaceStore: t(e).store.value
130
130
  }, null, 8, ["eventBus", "paletteState", "workspaceStore"])
131
- ])) : (i(), u("main", K, [
132
- r(O)
131
+ ])) : (c(), d("main", K, [
132
+ n(M)
133
133
  ]))
134
134
  ]),
135
135
  _: 3
@@ -137,5 +137,5 @@ const V = ["innerHTML"], $ = { key: 0 }, F = { class: "flex h-dvh w-dvw flex-1 f
137
137
  }
138
138
  });
139
139
  export {
140
- pe as default
140
+ ue as default
141
141
  };
@@ -2,7 +2,7 @@ import type { WorkspaceStore } from '@scalar/workspace-store/client';
2
2
  import type { OperationExampleMeta, WorkspaceEventBus } from '@scalar/workspace-store/events';
3
3
  import { type ShallowRef } from 'vue';
4
4
  import { type Router } from 'vue-router';
5
- export declare function initializeAppEventHandlers({ eventBus, store, router, rebuildSidebar, navigateToCurrentTab, onSelectSidebarItem, onAfterExampleCreation, onCopyTabUrl, onToggleSidebar, }: {
5
+ export declare function initializeAppEventHandlers({ eventBus, store, router, rebuildSidebar, navigateToCurrentTab, onSelectSidebarItem, onAfterExampleCreation, onCopyTabUrl, onToggleSidebar, renameWorkspace, }: {
6
6
  eventBus: WorkspaceEventBus;
7
7
  store: ShallowRef<WorkspaceStore | null>;
8
8
  router: Router;
@@ -12,5 +12,6 @@ export declare function initializeAppEventHandlers({ eventBus, store, router, re
12
12
  onAfterExampleCreation: (o: OperationExampleMeta) => void;
13
13
  onCopyTabUrl: (tabIndex: number) => void;
14
14
  onToggleSidebar: () => void;
15
+ renameWorkspace: (name: string) => Promise<void>;
15
16
  }): void;
16
17
  //# sourceMappingURL=app-events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-events.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/app-events.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAC7F,OAAO,EAAE,KAAK,UAAU,EAAY,MAAM,KAAK,CAAA;AAC/C,OAAO,EAAiD,KAAK,MAAM,EAAE,MAAM,YAAY,CAAA;AAKvF,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,EACR,KAAK,EACL,MAAM,EACN,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,YAAY,EACZ,eAAe,GAChB,EAAE;IACD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,KAAK,EAAE,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IACxC,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,CAAC,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/C,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IACzC,mBAAmB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,sBAA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