@scalar/api-client 2.1.47 → 2.1.49

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 (60) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/assets/keycap.ascii.js +25 -0
  3. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  4. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  5. package/dist/components/AddressBar/AddressBar.vue2.js +6 -6
  6. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  7. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  8. package/dist/components/CodeInput/codeVariableWidget.js +12 -12
  9. package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
  10. package/dist/components/DataTable/DataTable.vue.js +1 -1
  11. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  12. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +13 -13
  13. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  14. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +2 -2
  15. package/dist/layouts/Modal/ApiClientModal.vue.d.ts +1 -3
  16. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  17. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  18. package/dist/layouts/Modal/ApiClientModal.vue2.js +11 -11
  19. package/dist/store/import-spec.d.ts.map +1 -1
  20. package/dist/store/requests.d.ts +40 -0
  21. package/dist/store/requests.d.ts.map +1 -1
  22. package/dist/store/requests.js +65 -55
  23. package/dist/store/workspace.d.ts.map +1 -1
  24. package/dist/store/workspace.js +24 -29
  25. package/dist/style.css +1 -1
  26. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +7 -0
  27. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -0
  28. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  29. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +71 -71
  30. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +23 -23
  31. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  32. package/dist/views/Request/RequestSection/RequestSection.vue2.js +1 -1
  33. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +18 -18
  34. package/dist/views/Request/RequestSidebar.vue.d.ts +2 -0
  35. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  36. package/dist/views/Request/RequestSidebar.vue.js +2 -2
  37. package/dist/views/Request/RequestSidebar.vue2.js +169 -133
  38. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  39. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  40. package/dist/views/Request/RequestSidebarItem.vue2.js +181 -155
  41. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +2 -0
  42. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  43. package/dist/views/Request/RequestSidebarItemMenu.vue.js +3 -3
  44. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +155 -96
  45. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  46. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  47. package/dist/views/Request/RequestSubpageHeader.vue2.js +26 -21
  48. package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
  49. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +5 -97
  50. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +97 -2
  51. package/dist/views/Request/ResponseSection/ResponseCookies.vue.d.ts.map +1 -1
  52. package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +1 -1
  53. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  54. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
  55. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +74 -34
  56. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
  57. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +1 -1
  58. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +3 -3
  59. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +15 -15
  60. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.1.49
4
+
5
+ ### Patch Changes
6
+
7
+ - 49ccdee: refactor: updates regexHelpers
8
+ - 45342e3: style(api-client): add import button and command k ascii art in empty state
9
+ - d0c93f5: feat: adds clear drafts action to draft collection
10
+ - 8b54fac: fix(api-client): overflow scroll mobile on api client
11
+ - Updated dependencies [49ccdee]
12
+ - Updated dependencies [0a34402]
13
+ - @scalar/oas-utils@0.2.75
14
+ - @scalar/components@0.12.69
15
+ - @scalar/use-codemirror@0.11.36
16
+
17
+ ## 2.1.48
18
+
19
+ ### Patch Changes
20
+
21
+ - b5c1982: style(api-client): fix a handful of z-index and flex breakpoint issues
22
+ - ac55d0f: chore: add time logging for the workspace store
23
+ - 0c07766: fix: sets selection style properly"
24
+ - bdb48b0: fix: remove useTemplateRef
25
+ - Updated dependencies [b5c1982]
26
+ - Updated dependencies [ac55d0f]
27
+ - Updated dependencies [0c07766]
28
+ - Updated dependencies [7f1bd17]
29
+ - @scalar/components@0.12.68
30
+ - @scalar/oas-utils@0.2.74
31
+ - @scalar/use-codemirror@0.11.35
32
+ - @scalar/themes@0.9.48
33
+
3
34
  ## 2.1.47
4
35
 
5
36
  ### Patch Changes
@@ -0,0 +1,25 @@
1
+ const n = ` .:=+++++=================-
2
+ .--#* :.
3
+ .-:-** -.
4
+ .:-::-+* =:
5
+ .:-:::-=# ::
6
+ .-:::----** ..
7
+ .-:::::---=# ..
8
+ :-::::::----** ..
9
+ .:-::::::::----*= ..
10
+ .-::::::::------+- ..
11
+ ..::::::::-------= ..
12
+ .:::::----------++ ..
13
+ .:::----------+**+*++*+*++*+++*++++++++++:.
14
+ ------------+*+=-=======================.
15
+ .----------+*+=========================:.
16
+ :--------+*+=-========================.
17
+ .=------+*+=-========================:.
18
+ .=----+*+=-------=================+-.
19
+ .----+*+=----------================.
20
+ .:=-+*+=----------=-==============-
21
+ .-+*+=----------------===========.
22
+ .-+=------------------====-====:.`;
23
+ export {
24
+ n as default
25
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBar.vue"],"names":[],"mappings":";;;;;AAgxBA,wBAMG"}
1
+ {"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBar.vue"],"names":[],"mappings":";;;;;AAkxBA,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./AddressBar.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const s = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0d3d8fab"]]);
4
+ const d = /* @__PURE__ */ r(o, [["__scopeId", "data-v-5e1d7a10"]]);
5
5
  export {
6
- s as default
6
+ d as default
7
7
  };
@@ -27,9 +27,9 @@ const ee = {
27
27
  requestMutators: m,
28
28
  requestHistory: R,
29
29
  events: d
30
- } = Z(), v = u(R[0]), p = u(null), h = F();
30
+ } = Z(), v = u(R[0]), p = u(null), x = F();
31
31
  G(
32
- j() ? h.meta_enter : h.ctrl_enter,
32
+ j() ? x.meta_enter : x.ctrl_enter,
33
33
  () => d.executeRequest.emit()
34
34
  );
35
35
  const k = (e) => {
@@ -44,15 +44,15 @@ const ee = {
44
44
  !l.value || !e || k(e);
45
45
  }
46
46
  );
47
- const r = u(100), x = u(0), s = u(!1), i = u();
47
+ const r = u(100), h = u(0), s = u(!1), i = u();
48
48
  function q() {
49
- s.value ? r.value -= (r.value - 15) / 60 : r.value -= x.value / 20, r.value <= 0 && (clearInterval(i.value), i.value = void 0, r.value = 100, s.value = !1);
49
+ s.value ? r.value -= (r.value - 15) / 60 : r.value -= h.value / 20, r.value <= 0 && (clearInterval(i.value), i.value = void 0, r.value = 100, s.value = !1);
50
50
  }
51
51
  function B() {
52
52
  i.value || (s.value = !0, i.value = setInterval(q, 20));
53
53
  }
54
54
  function S() {
55
- x.value = r.value, s.value = !1;
55
+ h.value = r.value, s.value = !1;
56
56
  }
57
57
  function E() {
58
58
  clearInterval(i.value), i.value = void 0, r.value = 100, s.value = !1;
@@ -87,7 +87,7 @@ const ee = {
87
87
  default: w(({ open: f }) => [
88
88
  o("div", {
89
89
  class: y([
90
- "addressbar-bg-states text-xxs relative flex w-full lg:min-w-[720px] lg:max-w-[720px] order-last overflow-hidden lg:order-none flex-1 flex-row items-stretch rounded-lg border-1/2 p-[3px]",
90
+ "addressbar-bg-states text-xxs relative flex w-full xl:min-w-[720px] xl:max-w-[720px] lg:min-w-[580px] lg:max-w-[580px] order-last overflow-hidden lg:order-none flex-1 flex-row items-stretch rounded-lg border-1/2 p-[3px]",
91
91
  { "border-transparent overflow-visible rounded-b-none": f }
92
92
  ])
93
93
  }, [
@@ -1 +1 @@
1
- {"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAAA,OAqcO,EAGL,KAAK,kBAAkB,EAGxB,MAAM,wBAAwB,CAAA;;kBAiBb,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;iBACV,OAAO;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;;;;;;;;kBApBX,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;iBACV,OAAO;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;;;;;;gBAjBZ,OAAO;iBAHN,OAAO;sBAMF,OAAO;kBAMX,OAAO;0BACC,OAAO;cAGnB,OAAO;mBACF,OAAO;gBAEV,OAAO;;qBAkZM,GAAG;kBACN,GAAG;;AAza9B,wBAueC;AAgBD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAAA,OA4cO,EAGL,KAAK,kBAAkB,EAGxB,MAAM,wBAAwB,CAAA;;kBAiBb,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;iBACV,OAAO;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;;;;;;;;kBApBX,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;iBACV,OAAO;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;;;;;;gBAjBZ,OAAO;iBAHN,OAAO;sBAMF,OAAO;kBAMX,OAAO;0BACC,OAAO;cAGnB,OAAO;mBACF,OAAO;gBAEV,OAAO;;qBAmZM,GAAG;kBACN,GAAG;;AA1a9B,wBAweC;AAgBD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -2,7 +2,7 @@ import o from "./CodeInput.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../../_virtual/_plugin-vue_export-helper.js";
5
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-19c5f2da"]]);
5
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b4428c61"]]);
6
6
  export {
7
- f as default
7
+ a as default
8
8
  };
@@ -2,11 +2,11 @@ var m = Object.defineProperty;
2
2
  var v = (n, t, e) => t in n ? m(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
3
  var l = (n, t, e) => v(n, typeof t != "symbol" ? t + "" : t, e);
4
4
  import { ScalarButton as h, ScalarIcon as f, ScalarTooltip as b } from "@scalar/components";
5
- import { variableRegex as g } from "@scalar/oas-utils/helpers";
5
+ import { REGEX as g } from "@scalar/oas-utils/helpers";
6
6
  import { ViewPlugin as E, RangeSetBuilder as y, Decoration as x, EditorView as w, WidgetType as N } from "@scalar/use-codemirror";
7
- import { defineComponent as C, h as o, createApp as D } from "vue";
8
- import { parseEnvVariables as R } from "../../libs/environment-parser.js";
9
- const S = (n) => n.value ? n.value.color : "#8E8E8E";
7
+ import { defineComponent as C, h as o, createApp as R } from "vue";
8
+ import { parseEnvVariables as S } from "../../libs/environment-parser.js";
9
+ const V = (n) => n.value ? n.value.color : "#8E8E8E";
10
10
  class d extends N {
11
11
  constructor(e, a, i, s) {
12
12
  super();
@@ -22,9 +22,9 @@ class d extends N {
22
22
  const a = C({
23
23
  props: { variableName: { type: String, default: null } },
24
24
  render: () => {
25
- const i = R(this.activeEnvVariables.value).find(
25
+ const i = S(this.activeEnvVariables.value).find(
26
26
  (c) => c.key === this.variableName
27
- ), s = i && this.activeEnvironment.value ? S(this.activeEnvironment) : "#8E8E8E";
27
+ ), s = i && this.activeEnvironment.value ? V(this.activeEnvironment) : "#8E8E8E";
28
28
  e.style.setProperty("--tw-bg-base", s), e.style.opacity = i != null && i.value ? "1" : "0.5";
29
29
  const r = i != null && i.value ? o("div", { class: "p-2" }, i.value) : o("div", { class: "divide-y divide-1/2 grid" }, [
30
30
  o("span", { class: "p-2 opacity-25" }, "No value"),
@@ -74,7 +74,7 @@ class d extends N {
74
74
  );
75
75
  }
76
76
  });
77
- return this.app = D(a, { variableName: this.variableName }), this.app.mount(e), e;
77
+ return this.app = R(a, { variableName: this.variableName }), this.app.mount(e), e;
78
78
  }
79
79
  destroy() {
80
80
  this.app && this.app.unmount();
@@ -86,7 +86,7 @@ class d extends N {
86
86
  return !1;
87
87
  }
88
88
  }
89
- const T = (n) => E.fromClass(
89
+ const I = (n) => E.fromClass(
90
90
  class {
91
91
  constructor(t) {
92
92
  l(this, "decorations");
@@ -100,7 +100,7 @@ const T = (n) => E.fromClass(
100
100
  for (const { from: a, to: i } of t.visibleRanges) {
101
101
  const s = t.state.doc.sliceString(a, i);
102
102
  let r;
103
- for (; (r = g.exec(s)) !== null; ) {
103
+ for (; (r = g.VARIABLES.exec(s)) !== null; ) {
104
104
  const c = a + r.index, p = c + r[0].length, u = r[1];
105
105
  e.add(
106
106
  c,
@@ -123,7 +123,7 @@ const T = (n) => E.fromClass(
123
123
  {
124
124
  decorations: (t) => t.decorations
125
125
  }
126
- ), $ = w.domEventHandlers({
126
+ ), T = w.domEventHandlers({
127
127
  keydown(n, t) {
128
128
  if (n.key === "Backspace") {
129
129
  const { state: e } = t, { from: a, to: i } = e.selection.main;
@@ -142,6 +142,6 @@ const T = (n) => E.fromClass(
142
142
  }
143
143
  });
144
144
  export {
145
- $ as backspaceCommand,
146
- T as pillPlugin
145
+ T as backspaceCommand,
146
+ I as pillPlugin
147
147
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTable.vue"],"names":[],"mappings":"AA8BA,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAA;IAC/B,0BAA0B;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AAQF,iBAAS,cAAc;WAsDT,OAAO,IAA6B;;yBATrB,GAAG;yBACH,GAAG;;;;EAa/B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"DataTable.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTable.vue"],"names":[],"mappings":"AA8BA,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAA;IAC/B,0BAA0B;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AAQF,iBAAS,cAAc;WAqDT,OAAO,IAA6B;;yBATrB,GAAG;yBACH,GAAG;;;;EAa/B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -10,7 +10,7 @@ const i = {
10
10
  },
11
11
  setup(p) {
12
12
  return (o, u) => (e(), l("div", {
13
- class: s(["border-1/2 rounded bg-b-1 md:mx-1", o.scroll ? "overflow-x-auto custom-scroll" : "overflow-visible"])
13
+ class: s(["border-1/2 rounded bg-b-1", o.scroll ? "overflow-x-auto custom-scroll" : "overflow-visible"])
14
14
  }, [
15
15
  n("table", {
16
16
  class: s(["grid auto-rows-auto min-h-8 mb-0", { "min-w-full w-max": o.scroll }]),
@@ -1 +1 @@
1
- {"version":3,"file":"ViewLayoutCollapse.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutCollapse.vue"],"names":[],"mappings":"AAgEA,KAAK,WAAW,GAAG;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;AAkBJ,iBAAS,cAAc;WA2IT,OAAO,IAA6B;;;;YAVtB,GAAG;;;YACD,GAAG;;;YACH,GAAG;;;;EAahC;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;iBAlLH,OAAO;eACT,MAAM;6EAyLpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ViewLayoutCollapse.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutCollapse.vue"],"names":[],"mappings":"AAgEA,KAAK,WAAW,GAAG;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;AAkBJ,iBAAS,cAAc;WAyIT,OAAO,IAA6B;;;;YAVtB,GAAG;;;YACD,GAAG;;;YACH,GAAG;;;;EAahC;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;iBAhLH,OAAO;eACT,MAAM;6EAuLpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,6 +1,6 @@
1
- import { defineComponent as c, openBlock as n, createBlock as p, unref as o, withCtx as s, createElementVNode as r, createVNode as i, renderSlot as l, createElementBlock as u, toDisplayString as d, createCommentVNode as a, mergeProps as f } from "vue";
2
- import { Disclosure as m, DisclosureButton as h, DisclosurePanel as b } from "@headlessui/vue";
3
- import { ScalarIcon as x } from "@scalar/components";
1
+ import { defineComponent as c, openBlock as s, createBlock as d, unref as o, withCtx as n, createElementVNode as r, createVNode as i, renderSlot as l, createElementBlock as u, toDisplayString as p, createCommentVNode as a, mergeProps as f } from "vue";
2
+ import { Disclosure as m, DisclosureButton as h, DisclosurePanel as x } from "@headlessui/vue";
3
+ import { ScalarIcon as b } from "@scalar/components";
4
4
  const g = { class: "flex items-center" }, v = { class: "flex flex-1 items-center gap-1.5 text-c-1" }, _ = {
5
5
  key: 0,
6
6
  class: "bg-b-2 text-c-2 text-3xs inline-flex h-4 w-4 items-center justify-center rounded-full font-semibold"
@@ -14,16 +14,16 @@ const g = { class: "flex items-center" }, v = { class: "flex flex-1 items-center
14
14
  itemCount: { default: 0 }
15
15
  },
16
16
  setup(y) {
17
- return (e, k) => (n(), p(o(m), {
17
+ return (e, k) => (s(), d(o(m), {
18
18
  as: "div",
19
- class: "focus-within:bg-b-2 ui-not-open:hover:bg-b-2 focus-within:text-c-1 text-c-2 rounded request-item ui-not-open:bg-transparent ui-open:pb-1 ui-open:[&:not(:last-child)]:mb-1.5 ui-not-open:mb-0 ui-not-open:pb-0",
19
+ class: "focus-within:bg-b-2 ui-not-open:hover:bg-b-2 focus-within:text-c-1 text-c-2 rounded request-item ui-not-open:bg-transparent ui-open:[&:not(:last-child)]:mb-2.5 ui-not-open:mb-[0.5px]",
20
20
  defaultOpen: e.defaultOpen
21
21
  }, {
22
- default: s(({ open: t }) => [
22
+ default: n(({ open: t }) => [
23
23
  r("div", g, [
24
- i(o(h), { class: "group hover:text-c-1 flex flex-1 items-center gap-2.5 overflow-hidden py-1.5 text-sm font-medium px-1.5 outline-none" }, {
25
- default: s(() => [
26
- i(o(x), {
24
+ i(o(h), { class: "group hover:text-c-1 flex flex-1 items-center gap-2.5 overflow-hidden py-1.5 text-sm font-medium px-2.5 outline-none" }, {
25
+ default: n(() => [
26
+ i(o(b), {
27
27
  class: "text-c-3 group-hover:text-c-1 group-focus-visible:outline ui-open:rotate-90 ui-not-open:rotate-0 rounded-[1px] outline-offset-2",
28
28
  icon: "ChevronRight",
29
29
  size: "sm",
@@ -31,17 +31,17 @@ const g = { class: "flex items-center" }, v = { class: "flex flex-1 items-center
31
31
  }),
32
32
  r("div", v, [
33
33
  l(e.$slots, "title", { open: t }),
34
- !t && e.itemCount ? (n(), u("span", _, d(e.itemCount), 1)) : a("", !0)
34
+ !t && e.itemCount ? (s(), u("span", _, p(e.itemCount), 1)) : a("", !0)
35
35
  ])
36
36
  ]),
37
37
  _: 2
38
38
  }, 1024),
39
- e.$slots.actions ? (n(), u("div", C, [
39
+ e.$slots.actions ? (s(), u("div", C, [
40
40
  l(e.$slots, "actions", { open: t })
41
41
  ])) : a("", !0)
42
42
  ]),
43
- i(o(b), f(e.$attrs, { class: "h-full max-h-fit rounded-b diclosure-panel" }), {
44
- default: s(() => [
43
+ i(o(x), f(e.$attrs, { class: "h-full max-h-fit rounded-b diclosure-panel" }), {
44
+ default: n(() => [
45
45
  l(e.$slots, "default", { open: t })
46
46
  ]),
47
47
  _: 2
@@ -1 +1 @@
1
- {"version":3,"file":"ViewLayoutSection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutSection.vue"],"names":[],"mappings":"AAmBA,iBAAS,cAAc;WA8DT,OAAO,IAA6B;;uBATvB,GAAG;yBACD,GAAG;;;;EAa/B;AAOD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,uRAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ViewLayoutSection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutSection.vue"],"names":[],"mappings":"AAmBA,iBAAS,cAAc;WA+DT,OAAO,IAA6B;;uBATvB,GAAG;yBACD,GAAG;;;;EAa/B;AAOD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,uRAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { openBlock as o, createElementBlock as l, createElementVNode as n, renderSlot as t } from "vue";
2
2
  import s from "../../_virtual/_plugin-vue_export-helper.js";
3
- const r = {}, c = { class: "flex h-full xl:min-w-0 xl:flex-1 flex-col xl:custom-scroll bg-b-1" }, i = { class: "min-h-12 xl:min-h-header flex items-center border-b-1/2 px-3.5 py-1.5 md:px-4 md:py-2 xl:px-6 xl:pr-5 text-sm font-medium sticky top-0 bg-b-1 xl:rounded-none" };
4
- function m(e, d) {
3
+ const r = {}, c = { class: "flex xl:h-full xl:min-w-0 xl:flex-1 flex-col xl:custom-scroll bg-b-1" }, i = { class: "min-h-12 xl:min-h-header flex items-center border-b-1/2 px-3.5 py-1.5 md:px-4 md:py-2 xl:px-6 xl:pr-5 text-sm font-medium sticky top-0 bg-b-1 xl:rounded-none z-1" };
4
+ function m(e, x) {
5
5
  return o(), l("section", c, [
6
6
  n("div", i, [
7
7
  t(e.$slots, "title")
@@ -1,5 +1,3 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {
2
- client: HTMLDivElement;
3
- }, HTMLDivElement>;
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>;
4
2
  export default _default;
5
3
  //# sourceMappingURL=ApiClientModal.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/Modal/ApiClientModal.vue"],"names":[],"mappings":";;;AAyYA,wBAOG"}
1
+ {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/Modal/ApiClientModal.vue"],"names":[],"mappings":";AA0YA,wBAMG"}
@@ -2,7 +2,7 @@ import o from "./ApiClientModal.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../../_virtual/_plugin-vue_export-helper.js";
5
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-358451b6"]]);
5
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ab9fa596"]]);
6
6
  export {
7
- a as default
7
+ m as default
8
8
  };
@@ -1,21 +1,21 @@
1
- import { defineComponent as p, useTemplateRef as f, useId as v, watch as y, onBeforeMount as w, onMounted as h, onBeforeUnmount as _, withDirectives as k, openBlock as C, createElementBlock as E, createElementVNode as l, unref as t, createVNode as K, vShow as F } from "vue";
1
+ import { defineComponent as p, ref as f, useId as v, watch as y, onBeforeMount as w, onMounted as h, onBeforeUnmount as _, withDirectives as k, openBlock as C, createElementBlock as E, createElementVNode as l, unref as t, createVNode as K, vShow as F } from "vue";
2
2
  import { addScalarClassesToHeadless as M } from "@scalar/components";
3
- import { useFocusTrap as T } from "@vueuse/integrations/useFocusTrap";
4
- import { RouterView as x } from "vue-router";
5
- import { useWorkspace as B } from "../../store/store.js";
6
- import { handleHotKeyDown as P } from "../../libs/hot-keys.js";
3
+ import { useFocusTrap as x } from "@vueuse/integrations/useFocusTrap";
4
+ import { RouterView as B } from "vue-router";
5
+ import { useWorkspace as P } from "../../store/store.js";
6
+ import { handleHotKeyDown as T } from "../../libs/hot-keys.js";
7
7
  const b = { class: "scalar scalar-app" }, D = { class: "scalar-container z-overlay" }, S = ["id"], N = /* @__PURE__ */ p({
8
8
  __name: "ApiClientModal",
9
9
  setup(V) {
10
- const { activeWorkspace: d, modalState: o, events: a } = B(), n = f("client"), s = v(), { activate: m, deactivate: u } = T(n, {
10
+ const { activeWorkspace: d, modalState: o, events: a } = P(), n = f(null), r = v(), { activate: m, deactivate: u } = x(n, {
11
11
  allowOutsideClick: !0,
12
12
  initialFocus: () => n.value,
13
- fallbackFocus: `#${s}`
14
- }), r = (e) => P(e, a.hotKeys, d.value.hotKeyConfig);
13
+ fallbackFocus: `#${r}`
14
+ }), s = (e) => T(e, a.hotKeys, d.value.hotKeyConfig);
15
15
  y(
16
16
  () => o.open,
17
17
  (e) => {
18
- e ? (window.addEventListener("keydown", r), document.documentElement.style.overflow = "hidden", m()) : (window.removeEventListener("keydown", r), document.documentElement.style.removeProperty("overflow"), u());
18
+ e ? (window.addEventListener("keydown", s), document.documentElement.style.overflow = "hidden", m()) : (window.removeEventListener("keydown", s), document.documentElement.style.removeProperty("overflow"), u());
19
19
  }
20
20
  ), w(() => M());
21
21
  const c = (e) => (e == null ? void 0 : e.closeModal) && o.open && o.hide();
@@ -24,7 +24,7 @@ const b = { class: "scalar scalar-app" }, D = { class: "scalar-container z-overl
24
24
  }), (e, i) => k((C(), E("div", b, [
25
25
  l("div", D, [
26
26
  l("div", {
27
- id: t(s),
27
+ id: t(r),
28
28
  ref_key: "client",
29
29
  ref: n,
30
30
  "aria-label": "API Client",
@@ -33,7 +33,7 @@ const b = { class: "scalar scalar-app" }, D = { class: "scalar-container z-overl
33
33
  role: "dialog",
34
34
  tabindex: "0"
35
35
  }, [
36
- K(t(x), { key: "$route.fullPath" })
36
+ K(t(B), { key: "$route.fullPath" })
37
37
  ], 8, S),
38
38
  l("div", {
39
39
  class: "scalar-app-exit -z-1",
@@ -1 +1 @@
1
- {"version":3,"file":"import-spec.d.ts","sourceRoot":"","sources":["../../src/store/import-spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAkB,MAAM,QAAQ,CAAA;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,EAC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qC,CAAC;oBAAoB,CAAC;mBAAqC,CAAC;qBAAuC,CAAC;;mBAA4D,CAAC;;0BAAoD,CAAC;mBAAqC,CAAC;;;;;;;;6BA7Bltc,MAAM,gBACG,MAAM,0BAIjB,IAAI,CAAC,kBAAkB,EAAE,aAAa,CAAC,GACxC,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC,KACtC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,SAxDlC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,gBACrB,MAAM,YACX,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA4Eiqb,CAAC;;;;;;uBAAqK,CAAC;mBAAqC,CAAC;0BAA4C,CAAC;mBAAqC,CAAC;oBAAoB,CAAC;mBAAqC,CAAC;qBAAuC,CAAC;;mBAA4D,CAAC;;0BAAoD,CAAC;mBAAqC,CAAC;;;;;;;mBAtBvpc,CAAC,CAAC,CAAC;EAqBtE"}
@@ -389,5 +389,45 @@ export declare function findRequestParentsFactory({ collections, tags, }: {
389
389
  collections: Record<string, Collection>;
390
390
  tags: Record<string, Tag>;
391
391
  }): (r: Request) => string[];
392
+ /** First draft request" */
393
+ export declare function createInitialRequest(): {
394
+ request: {
395
+ path: string;
396
+ type: "request";
397
+ uid: string;
398
+ selectedSecuritySchemeUids: string[];
399
+ selectedServerUid: string;
400
+ servers: string[];
401
+ examples: string[];
402
+ method: "options" | "delete" | "get" | "connect" | "head" | "patch" | "post" | "put" | "trace";
403
+ description?: string | undefined;
404
+ summary?: string | undefined;
405
+ externalDocs?: {
406
+ url: string;
407
+ description?: string | undefined;
408
+ } | undefined;
409
+ security?: Record<string, string[]>[] | undefined;
410
+ tags?: string[] | undefined;
411
+ deprecated?: boolean | undefined;
412
+ operationId?: string | undefined;
413
+ parameters?: {
414
+ required: boolean;
415
+ name: string;
416
+ in: "path" | "query" | "header" | "cookie";
417
+ deprecated: boolean;
418
+ description?: string | undefined;
419
+ schema?: unknown;
420
+ content?: unknown;
421
+ style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
422
+ example?: unknown;
423
+ examples?: Record<string, {
424
+ value?: unknown;
425
+ summary?: string | undefined;
426
+ }> | undefined;
427
+ }[] | undefined;
428
+ requestBody?: any;
429
+ responses?: Record<string, any> | undefined;
430
+ };
431
+ };
392
432
  export {};
393
433
  //# sourceMappingURL=requests.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../src/store/requests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EACL,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,GAAG,EAGT,MAAM,iCAAiC,CAAA;AAKxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAEnD,wDAAwD;AACxD,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,OAAO;;;;;;;;;;;;;;uBA8KgiQ,CAAC;;;;;;;;;;;uBAAqX,CAAC;kBAAoC,CAAC;mBAA0B,CAAC;iBAAwB,CAAC;mBAAyH,CAAC;oBAA2B,CAAC;qBAAoC,CAAC;uBAA8B,CAAC;;;;;;;;;;;;;;;;;;;;2BAA1qB,CAAC;;;;;;;;;;;2BAAqX,CAAC;sBAAoC,CAAC;uBAA0B,CAAC;qBAAwB,CAAC;uBAAyH,CAAC;wBAA2B,CAAC;yBAAoC,CAAC;2BAA8B,CAAC;;;;;;;;;;;;;;;;;;;;2BAA1qB,CAAC;;;;;;;;;;;2BAAqX,CAAC;sBAAoC,CAAC;uBAA0B,CAAC;qBAAwB,CAAC;uBAAyH,CAAC;wBAA2B,CAAC;yBAAoC,CAAC;2BAA8B,CAAC;;;;;;;;;;;;;;;;;;;2BAA1qB,CAAC;;;;;;;;;;;2BAAqX,CAAC;sBAAo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EACX,IAAI,EACJ,WAAW,GACZ,EAAE,YAAY,EAEf,MAAM,EAAE,MAAM;0BAGe,cAAc,iBAAiB,MAAM;;;;;;;;;;;;;uBAyJqyP,CAAC;;;;;;;;;;;uBAAqX,CAAC;kBAAoC,CAAC;mBAA0B,CAAC;iBAAwB,CAAC;mBAAyH,CAAC;oBAA2B,CAAC;qBAAoC,CAAC;uBAA8B,CAAC;;;;;;6BAxGj/Q,OAAO,iBAAiB,MAAM;4BAoD9B,OAAO;EAXxC;AAED,wDAAwD;AACxD,wBAAgB,yBAAyB,CAAC,EACxC,WAAW,EACX,IAAI,GACL,EAAE;IACD,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IACvC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC1B,OAEiC,OAAO,cAsCxC;AAED,2BAA2B;AAC3B,wBAAgB,oBAAoB;;;;;;;;;;;;;;uBAWq0P,CAAC;;;;;;;;;;;uBAAqX,CAAC;kBAAoC,CAAC;mBAA0B,CAAC;iBAAwB,CAAC;mBAAyH,CAAC;oBAA2B,CAAC;qBAAoC,CAAC;uBAA8B,CAAC;;;;;;EADlhR"}
@@ -1,107 +1,117 @@
1
- import { requestSchema as S, createExampleFromRequest as y } from "@scalar/oas-utils/entities/spec";
1
+ import { requestSchema as x, createExampleFromRequest as y } from "@scalar/oas-utils/entities/spec";
2
2
  import { LS_KEYS as F, schemaModel as T, iterateTitle as A } from "@scalar/oas-utils/helpers";
3
3
  import { mutationFactory as D } from "@scalar/object-utils/mutator-record";
4
- import { reactive as p } from "vue";
5
- function C(l) {
6
- const s = p({}), h = D(
4
+ import { reactive as E } from "vue";
5
+ function j(m) {
6
+ const s = E({}), h = D(
7
7
  s,
8
- p({}),
9
- l && F.REQUEST
8
+ E({}),
9
+ m && F.REQUEST
10
10
  );
11
11
  return {
12
12
  requests: s,
13
13
  requestMutators: h
14
14
  };
15
15
  }
16
- function I({
17
- requestExamples: l,
16
+ function v({
17
+ requestExamples: m,
18
18
  requestExampleMutators: s,
19
19
  requestMutators: h,
20
- collectionMutators: c,
21
- collections: t,
20
+ collectionMutators: f,
21
+ collections: r,
22
22
  tags: u,
23
23
  tagMutators: q
24
24
  }, R) {
25
25
  return {
26
- addRequest: (r, f) => {
27
- var o;
28
- const e = T(r, S, !1);
29
- if (!e) return console.error("INVALID REQUEST DATA", r);
30
- const m = t[f], i = y(
26
+ addRequest: (t, a) => {
27
+ var l;
28
+ const e = T(t, x, !1);
29
+ if (!e) return console.error("INVALID REQUEST DATA", t);
30
+ const o = r[a], i = y(
31
31
  e,
32
32
  A(
33
33
  (e.summary ?? "Example") + " #1",
34
- (a) => e.examples.some((E) => a === l[E].name)
34
+ (c) => e.examples.some((p) => c === m[p].name)
35
35
  )
36
36
  );
37
- return e.examples.push(i.uid), h.add(e), s.add(i), c.edit(f, "requests", [
38
- ...m.requests,
37
+ return e.examples.push(i.uid), h.add(e), s.add(i), f.edit(a, "requests", [
38
+ ...o.requests,
39
39
  e.uid
40
- ]), (o = e.tags) != null && o.length ? e.tags.forEach((a) => {
41
- const E = m.tags.find((x) => u[x].name === a);
42
- E ? q.edit(E, "children", [
43
- ...u[E].children,
40
+ ]), (l = e.tags) != null && l.length ? e.tags.forEach((c) => {
41
+ const p = o.tags.find((S) => u[S].name === c);
42
+ p ? q.edit(p, "children", [
43
+ ...u[p].children,
44
44
  e.uid
45
- ]) : R({ name: a, children: [e.uid] }, f);
46
- }) : c.edit(f, "children", [
47
- ...m.children,
45
+ ]) : R({ name: c, children: [e.uid] }, a);
46
+ }) : f.edit(a, "children", [
47
+ ...o.children,
48
48
  e.uid
49
49
  ]), e;
50
50
  },
51
- deleteRequest: (r, f) => {
52
- var m;
53
- const e = t[f];
54
- r.examples.forEach((i) => s.delete(i)), c.edit(
55
- f,
51
+ deleteRequest: (t, a) => {
52
+ var o;
53
+ const e = r[a];
54
+ t.examples.forEach((i) => s.delete(i)), f.edit(
55
+ a,
56
56
  "requests",
57
- e.requests.filter((i) => i !== r.uid)
58
- ), c.edit(
59
- f,
57
+ e.requests.filter((i) => i !== t.uid)
58
+ ), f.edit(
59
+ a,
60
60
  "children",
61
- e.children.filter((i) => i !== r.uid)
62
- ), (m = r.tags) == null || m.forEach((i) => {
63
- const o = e.tags.find((a) => u[a].name === i);
64
- o && q.edit(
65
- o,
61
+ e.children.filter((i) => i !== t.uid)
62
+ ), (o = t.tags) == null || o.forEach((i) => {
63
+ const l = e.tags.find((c) => u[c].name === i);
64
+ l && q.edit(
65
+ l,
66
66
  "children",
67
- u[o].children.filter((a) => a !== r.uid)
67
+ u[l].children.filter((c) => c !== t.uid)
68
68
  );
69
- }), h.delete(r.uid);
69
+ }), h.delete(t.uid);
70
70
  },
71
- findRequestParents: O({ collections: t, tags: u })
71
+ findRequestParents: I({ collections: r, tags: u })
72
72
  };
73
73
  }
74
- function O({
75
- collections: l,
74
+ function I({
75
+ collections: m,
76
76
  tags: s
77
77
  }) {
78
- function h(c) {
79
- const t = Object.values(l).find(
78
+ function h(f) {
79
+ const r = Object.values(m).find(
80
80
  (n) => {
81
81
  var d;
82
- return (d = n.requests) == null ? void 0 : d.includes(c.uid);
82
+ return (d = n.requests) == null ? void 0 : d.includes(f.uid);
83
83
  }
84
84
  );
85
- if (!t) return [];
85
+ if (!r) return [];
86
86
  const u = Object.keys(s).reduce(
87
87
  (n, d) => (n[d] = [], n),
88
- { [t == null ? void 0 : t.uid]: [] }
88
+ { [r == null ? void 0 : r.uid]: [] }
89
89
  );
90
90
  function q(n, d) {
91
- d.forEach((r) => u[r].push(...n.children)), n.children.forEach((r) => {
92
- s[r] && q(s[r], [...d, r]);
91
+ d.forEach((t) => u[t].push(...n.children)), n.children.forEach((t) => {
92
+ s[t] && q(s[t], [...d, t]);
93
93
  });
94
94
  }
95
- q(t, [t.uid]);
95
+ q(r, [r.uid]);
96
96
  const R = /* @__PURE__ */ new Set();
97
97
  return Object.entries(u).forEach(([n, d]) => {
98
- d.includes(c.uid) && R.add(n);
98
+ d.includes(f.uid) && R.add(n);
99
99
  }), [...R];
100
100
  }
101
101
  return h;
102
102
  }
103
+ function C() {
104
+ return { request: x.parse({
105
+ method: "get",
106
+ parameters: [],
107
+ path: "",
108
+ summary: "My First Request",
109
+ examples: []
110
+ }) };
111
+ }
103
112
  export {
104
- C as createStoreRequests,
105
- I as extendedRequestDataFactory,
106
- O as findRequestParentsFactory
113
+ C as createInitialRequest,
114
+ j as createStoreRequests,
115
+ v as extendedRequestDataFactory,
116
+ I as findRequestParentsFactory
107
117
  };
@@ -1 +1 @@
1
- {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/store/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAMzD,OAAO,EACL,KAAK,SAAS,EAEf,MAAM,sCAAsC,CAAA;AAK7C,4CAA4C;AAC5C,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,OAAO;;;;;;;;;;;;;mBA4E62L,CAAC;;yBAAq4B,CAAC;;;;;;;;;;;;;;;;;;uBAAv4B,CAAC;;6BAAq4B,CAAC;;;;;;;;;;;;;;;;;;uBAAv4B,CAAC;;6BAAq4B,CAAC;;;;;;;;;;;;;;;;;uBAAv4B,CAAC;;6BAAq4B,CAAC;;;;;;;;;;;;;;;;uBAAv4B,CAAC;;6BAAq4B,CAAC;;;;;;;;;;;;;;;;uBAAv4B,CAAC;;6BAAq4B,CAAC;;;;;;;;;;;;;;;;;uBAAv4B,CAAC;;6BAAq4B,CAAC;;;;;;;;;;;;;;;;uBAAv4B,CAAC;;6BAAq4B,CAAC;;;;;;;;;;;;;;;;uBAAv4B,CAAC;;6BAAq4B,CAAC;;;;;;;;;EA/DjzN;AAED,oDAAoD;AACpD,wBAAgB,4BAA4B,CAAC,EAC3C,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,GACvB,EAAE,YAAY;6BACkB,OAAO,CAA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