@scalar/api-client 2.0.46 → 2.0.48

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 (93) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  4. package/dist/components/AddressBar/AddressBar.vue2.js +77 -71
  5. package/dist/components/CodeInput/CodeInput.vue.d.ts +3 -1
  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/CodeInput.vue2.js +49 -44
  9. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  10. package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
  11. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +97 -106
  12. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  13. package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
  14. package/dist/components/HttpMethod/HttpMethod.vue2.js +10 -10
  15. package/dist/components/Search/SearchModal.vue.d.ts.map +1 -1
  16. package/dist/components/Search/SearchModal.vue.js +1 -1
  17. package/dist/components/Search/SearchModal.vue2.js +43 -41
  18. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  19. package/dist/components/SideNav/SideNav.vue.js +1 -1
  20. package/dist/components/SideNav/SideNav.vue2.js +22 -19
  21. package/dist/components/Sidebar/Sidebar.vue.d.ts +24 -3
  22. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  23. package/dist/components/Sidebar/Sidebar.vue.js +57 -19
  24. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  25. package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
  26. package/dist/components/Sidebar/SidebarListElement.vue2.js +1 -1
  27. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +2 -0
  28. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
  29. package/dist/components/Sidebar/SidebarListElementActions.vue.js +22 -21
  30. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  31. package/dist/components/TopNav/TopNav.vue.js +1 -1
  32. package/dist/components/TopNav/TopNav.vue2.js +46 -43
  33. package/dist/index.d.ts +1 -1
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +9 -9
  36. package/dist/layouts/App/ApiClientApp.vue.js +1 -1
  37. package/dist/layouts/App/create-api-client-app.d.ts +56 -46
  38. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  39. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  40. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  41. package/dist/layouts/Modal/ApiClientModal.vue2.js +20 -20
  42. package/dist/layouts/Modal/create-api-client-modal.d.ts +112 -92
  43. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  44. package/dist/libs/create-client.d.ts +56 -46
  45. package/dist/libs/create-client.d.ts.map +1 -1
  46. package/dist/libs/event-busses/{command-palette.d.ts → command-palette-bus.d.ts} +1 -1
  47. package/dist/libs/event-busses/command-palette-bus.d.ts.map +1 -0
  48. package/dist/libs/event-busses/{execute-requestBus.d.ts → execute-request-bus.d.ts} +1 -1
  49. package/dist/libs/event-busses/execute-request-bus.d.ts.map +1 -0
  50. package/dist/libs/event-busses/hot-keys-bus.d.ts +33 -0
  51. package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -0
  52. package/dist/libs/event-busses/hot-keys-bus.js +33 -0
  53. package/dist/libs/event-busses/index.d.ts +3 -3
  54. package/dist/libs/event-busses/index.d.ts.map +1 -1
  55. package/dist/libs/event-busses/index.js +3 -3
  56. package/dist/libs/index.js +3 -3
  57. package/dist/libs/local-storage.d.ts +1 -1
  58. package/dist/libs/local-storage.d.ts.map +1 -1
  59. package/dist/libs/local-storage.js +15 -30
  60. package/dist/router.d.ts +2 -2
  61. package/dist/router.d.ts.map +1 -1
  62. package/dist/router.js +3 -3
  63. package/dist/store/workspace.d.ts +112 -92
  64. package/dist/store/workspace.d.ts.map +1 -1
  65. package/dist/store/workspace.js +140 -137
  66. package/dist/style.css +1 -1
  67. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  68. package/dist/views/Cookies/CookieForm.vue.js +14 -15
  69. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  70. package/dist/views/Cookies/Cookies.vue2.js +114 -55
  71. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  72. package/dist/views/Environment/Environment.vue2.js +21 -20
  73. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  74. package/dist/views/Request/Request.vue.js +1 -1
  75. package/dist/views/Request/Request.vue2.js +132 -128
  76. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  77. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  78. package/dist/views/Request/RequestSidebarItem.vue2.js +253 -139
  79. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +27 -5
  80. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  81. package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
  82. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +83 -158
  83. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  84. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  85. package/dist/views/Request/components/WorkspaceDropdown.vue.js +214 -70
  86. package/package.json +6 -6
  87. package/dist/libs/event-busses/command-palette.d.ts.map +0 -1
  88. package/dist/libs/event-busses/execute-requestBus.d.ts.map +0 -1
  89. package/dist/libs/event-busses/hot-key.d.ts +0 -34
  90. package/dist/libs/event-busses/hot-key.d.ts.map +0 -1
  91. package/dist/libs/event-busses/hot-key.js +0 -25
  92. /package/dist/libs/event-busses/{command-palette.js → command-palette-bus.js} +0 -0
  93. /package/dist/libs/event-busses/{execute-requestBus.js → execute-request-bus.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.0.48
4
+
5
+ ### Patch Changes
6
+
7
+ - db96313: feat: workspace rename and deletion
8
+ - de9747c: fix: topnav alignment
9
+ - 8672a78: feat(api-client): moved command palette to the global key event bus
10
+ - 58e5912: fix: markdown fixes and intro card polish
11
+ - 6f7ab8d: feat: sidebar request transition and dragging capability
12
+ - 89ee9da: fix(api-client): move web hash router to a factory function
13
+ - 078ca72: feat: add topnav and addressbar hotkeys
14
+ - 520caff: fix: hot keys bus modifier
15
+ - 03e9bbb: Move to flatted for localstorage
16
+ - db96313: feat: set request sidebar item context menu
17
+ - Updated dependencies [8672a78]
18
+ - Updated dependencies [db96313]
19
+ - Updated dependencies [078ca72]
20
+ - Updated dependencies [6f107e1]
21
+ - Updated dependencies [520caff]
22
+ - Updated dependencies [03e9bbb]
23
+ - Updated dependencies [db96313]
24
+ - @scalar/oas-utils@0.2.29
25
+ - @scalar/components@0.12.30
26
+ - @scalar/object-utils@1.1.7
27
+
28
+ ## 2.0.47
29
+
30
+ ### Patch Changes
31
+
32
+ - b00e50e: fix(api-client): improve api client responsiveness
33
+ - df7372f: feat: make side navigation a drag region
34
+ - 6f0632e: fix: sidebar list element action prop
35
+ - 3023afe: fix: sidenav endpoint ui
36
+ - 711ad03: fix: search modal data population
37
+ - 14ed31f: feat: group cookie by domain and path
38
+ - Updated dependencies [60e63d3]
39
+ - Updated dependencies [db92a85]
40
+ - Updated dependencies [dba83e4]
41
+ - @scalar/themes@0.9.22
42
+ - @scalar/use-toasts@0.7.5
43
+ - @scalar/object-utils@1.1.6
44
+ - @scalar/oas-utils@0.2.28
45
+ - @scalar/components@0.12.29
46
+
3
47
  ## 2.0.46
4
48
 
5
49
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBar.vue"],"names":[],"mappings":";AAirBA,wBAKG"}
1
+ {"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBar.vue"],"names":[],"mappings":";AAqtBA,wBAKG"}
@@ -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 f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-372103f0"]]);
4
+ const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-28ee5506"]]);
5
5
  export {
6
- f as default
6
+ a as default
7
7
  };
@@ -1,129 +1,135 @@
1
- import { defineComponent as M, ref as d, watch as U, unref as l, openBlock as L, createElementBlock as H, createElementVNode as o, createVNode as n, withCtx as _, normalizeClass as w, normalizeStyle as O, createCommentVNode as $, pushScopeId as N, popScopeId as T } from "vue";
2
- import A from "../CodeInput/CodeInput.vue.js";
3
- import { useWorkspace as D } from "../../store/workspace.js";
4
- import { Listbox as K } from "@headlessui/vue";
5
- import { ScalarButton as Q, ScalarIcon as W } from "@scalar/components";
6
- import { REQUEST_METHODS as j } from "@scalar/oas-utils/helpers";
7
- import { isMacOS as F } from "@scalar/use-tooltip";
8
- import { useMagicKeys as G, whenever as J } from "@vueuse/core";
9
- import P from "../HttpMethod/HttpMethod.vue.js";
10
- import X from "./AddressBarHistory.vue.js";
11
- import { executeRequestBus as m } from "../../libs/event-busses/execute-requestBus.js";
12
- import { requestStatusBus as Y } from "../../libs/event-busses/request-status-bus.js";
13
- const v = (c) => (N("data-v-372103f0"), c = c(), T(), c), Z = {
1
+ import { defineComponent as L, ref as n, watch as O, onMounted as $, onBeforeUnmount as K, unref as l, openBlock as N, createElementBlock as T, createElementVNode as a, createVNode as i, withCtx as y, normalizeClass as B, normalizeStyle as A, createCommentVNode as D, pushScopeId as Q, popScopeId as W } from "vue";
2
+ import j from "../CodeInput/CodeInput.vue.js";
3
+ import { useWorkspace as F } from "../../store/workspace.js";
4
+ import { Listbox as G } from "@headlessui/vue";
5
+ import { ScalarButton as J, ScalarIcon as P } from "@scalar/components";
6
+ import { REQUEST_METHODS as X } from "@scalar/oas-utils/helpers";
7
+ import { isMacOS as Y } from "@scalar/use-tooltip";
8
+ import { useMagicKeys as Z, whenever as ee } from "@vueuse/core";
9
+ import te from "../HttpMethod/HttpMethod.vue.js";
10
+ import le from "./AddressBarHistory.vue.js";
11
+ import { executeRequestBus as m } from "../../libs/event-busses/execute-request-bus.js";
12
+ import { requestStatusBus as oe } from "../../libs/event-busses/request-status-bus.js";
13
+ import { hotKeyBus as k } from "../../libs/event-busses/hot-keys-bus.js";
14
+ const v = (f) => (Q("data-v-28ee5506"), f = f(), W(), f), ae = {
14
15
  key: 0,
15
16
  class: "order-last lg:order-none lg:w-auto w-full"
16
- }, ee = { class: "m-auto flex basis-1/2 flex-row items-center" }, te = { class: "pointer-events-none absolute left-0 top-0 z-10 block h-full w-full overflow-hidden" }, le = { class: "flex gap-1" }, oe = { class: "codemirror-bg-switcher scroll-timeline-x scroll-timeline-x-hidden relative flex w-full" }, ae = /* @__PURE__ */ v(() => /* @__PURE__ */ o("div", { class: "fade-left" }, null, -1)), re = /* @__PURE__ */ v(() => /* @__PURE__ */ o("div", { class: "fade-right" }, null, -1)), se = /* @__PURE__ */ v(() => /* @__PURE__ */ o("span", { class: "text-xxs relative z-10 lg:flex hidden" }, "Send", -1)), _e = /* @__PURE__ */ M({
17
+ }, re = { class: "m-auto flex basis-1/2 flex-row items-center" }, se = { class: "pointer-events-none absolute left-0 top-0 z-10 block h-full w-full overflow-hidden" }, ne = { class: "flex gap-1" }, ie = { class: "codemirror-bg-switcher scroll-timeline-x scroll-timeline-x-hidden relative flex w-full" }, ue = /* @__PURE__ */ v(() => /* @__PURE__ */ a("div", { class: "fade-left" }, null, -1)), de = /* @__PURE__ */ v(() => /* @__PURE__ */ a("div", { class: "fade-right" }, null, -1)), fe = /* @__PURE__ */ v(() => /* @__PURE__ */ a("span", { class: "text-xxs relative z-10 lg:flex hidden" }, "Send", -1)), Ee = /* @__PURE__ */ L({
17
18
  __name: "AddressBar",
18
- setup(c) {
19
+ setup(f) {
19
20
  const {
20
21
  activeRequest: t,
21
- activeExample: f,
22
+ activeExample: c,
22
23
  isReadOnly: p,
23
24
  requestMutators: h,
24
25
  requestExampleMutators: S,
25
- requestsHistory: k
26
- } = D(), x = d(k.value[0]), b = G();
27
- J(
28
- F() ? b.meta_enter : b.ctrl_enter,
26
+ requestsHistory: E
27
+ } = F(), x = n(E.value[0]), b = n(null), g = Z();
28
+ ee(
29
+ Y() ? g.meta_enter : g.ctrl_enter,
29
30
  () => m.emit()
30
31
  );
31
- const E = (e) => {
32
+ const C = (e) => {
32
33
  !t.value || t.value.path === e || h.edit(t.value.uid, "path", e);
33
34
  };
34
- U(
35
+ O(
35
36
  () => {
36
37
  var e;
37
38
  return (e = t.value) == null ? void 0 : e.path;
38
39
  },
39
40
  (e) => {
40
- t.value && E(e);
41
+ t.value && C(e);
41
42
  }
42
43
  );
43
- const a = d(100), g = d(0), r = d(!1), i = d();
44
- function y() {
45
- r.value ? a.value -= (a.value - 15) / 60 : a.value -= g.value / 20, a.value <= 0 && (clearInterval(i.value), i.value = void 0, a.value = 100, r.value = !1);
44
+ const r = n(100), _ = n(0), s = n(!1), u = n();
45
+ function q() {
46
+ s.value ? r.value -= (r.value - 15) / 60 : r.value -= _.value / 20, r.value <= 0 && (clearInterval(u.value), u.value = void 0, r.value = 100, s.value = !1);
46
47
  }
47
- function C() {
48
- r.value || (r.value = !0, i.value = setInterval(y, 20));
48
+ function R() {
49
+ s.value || (s.value = !0, u.value = setInterval(q, 20));
49
50
  }
50
- function q() {
51
- g.value = a.value, r.value = !1;
51
+ function I() {
52
+ _.value = r.value, s.value = !1;
52
53
  }
53
- function B() {
54
- clearInterval(i.value), i.value = void 0, a.value = 100, r.value = !1;
54
+ function V() {
55
+ clearInterval(u.value), u.value = void 0, r.value = 100, s.value = !1;
55
56
  }
56
- Y.on((e) => {
57
- e === "start" && C(), e === "stop" && q(), e === "abort" && B();
57
+ oe.on((e) => {
58
+ e === "start" && R(), e === "stop" && I(), e === "abort" && V();
58
59
  });
59
- function I(e) {
60
+ function M(e) {
60
61
  t.value && h.edit(t.value.uid, "method", e);
61
62
  }
62
- function V() {
63
+ function z() {
63
64
  if (!t.value) return;
64
65
  const { method: e } = t.value;
65
- return j[e].backgroundColor;
66
+ return X[e].backgroundColor;
66
67
  }
67
- const R = (e) => {
68
- f.value && S.edit(f.value.uid, "url", e);
68
+ const U = (e) => {
69
+ c.value && S.edit(c.value.uid, "url", e);
70
+ }, w = (e) => {
71
+ var o;
72
+ e.focusAddressBar && ((o = b.value) == null || o.focus());
69
73
  };
70
- return (e, s) => l(t) && l(f) ? (L(), H("div", Z, [
71
- o("div", ee, [
72
- n(l(K), {
74
+ return $(() => k.on(w)), K(() => k.off(w)), (e, o) => l(t) && l(c) ? (N(), T("div", ae, [
75
+ a("div", re, [
76
+ i(l(G), {
73
77
  modelValue: x.value,
74
- "onUpdate:modelValue": s[2] || (s[2] = (u) => x.value = u)
78
+ "onUpdate:modelValue": o[2] || (o[2] = (d) => x.value = d)
75
79
  }, {
76
- default: _(({ open: u }) => [
77
- o("div", {
78
- class: w([
80
+ default: y(({ open: d }) => [
81
+ a("div", {
82
+ class: B([
79
83
  "addressbar-bg-states text-xxs relative flex w-full lg:min-w-[720px] lg:max-w-[720px] order-last lg:order-none flex-1 flex-row items-stretch rounded-lg border-1/2 p-[3px]",
80
- { "rounded-b-none": u },
81
- { "border-transparent": u }
84
+ { "rounded-b-none": d },
85
+ { "border-transparent": d }
82
86
  ])
83
87
  }, [
84
- o("div", te, [
85
- o("div", {
86
- class: w(["bg-mix-transparent bg-mix-amount-90 absolute left-0 top-0 h-full w-full", V()]),
87
- style: O({ transform: `translate3d(-${a.value}%,0,0)` })
88
+ a("div", se, [
89
+ a("div", {
90
+ class: B(["bg-mix-transparent bg-mix-amount-90 absolute left-0 top-0 h-full w-full", z()]),
91
+ style: A({ transform: `translate3d(-${r.value}%,0,0)` })
88
92
  }, null, 6)
89
93
  ]),
90
- o("div", le, [
91
- n(P, {
94
+ a("div", ne, [
95
+ i(te, {
92
96
  isEditable: !l(p),
93
97
  isSquare: "",
94
98
  method: l(t).method,
95
- onChange: I
99
+ onChange: M
96
100
  }, null, 8, ["isEditable", "method"])
97
101
  ]),
98
- o("div", oe, [
99
- ae,
100
- n(A, {
102
+ a("div", ie, [
103
+ ue,
104
+ i(j, {
105
+ ref_key: "addressBarRef",
106
+ ref: b,
101
107
  disableCloseBrackets: "",
102
108
  disabled: l(p),
103
109
  disableEnter: "",
104
110
  disableTabIndent: "",
105
111
  emitOnBlur: !1,
106
- modelValue: l(f).url,
112
+ modelValue: l(c).url,
107
113
  placeholder: "Enter URL to get started",
108
114
  server: "",
109
- onSubmit: s[0] || (s[0] = (z) => l(m).emit()),
110
- "onUpdate:modelValue": R
115
+ onSubmit: o[0] || (o[0] = (H) => l(m).emit()),
116
+ "onUpdate:modelValue": U
111
117
  }, null, 8, ["disabled", "modelValue"]),
112
- re
118
+ de
113
119
  ]),
114
- n(X, { open: u }, null, 8, ["open"]),
115
- n(l(Q), {
120
+ i(le, { open: d }, null, 8, ["open"]),
121
+ i(l(J), {
116
122
  class: "relative h-auto shrink-0 gap-1 overflow-hidden pl-2 pr-2.5 py-1 z-[1] font-bold",
117
- disabled: r.value,
118
- onClick: s[1] || (s[1] = (z) => l(m).emit())
123
+ disabled: s.value,
124
+ onClick: o[1] || (o[1] = (H) => l(m).emit())
119
125
  }, {
120
- default: _(() => [
121
- n(l(W), {
126
+ default: y(() => [
127
+ i(l(P), {
122
128
  class: "relative z-10 shrink-0 fill-current",
123
129
  icon: "Play",
124
130
  size: "xs"
125
131
  }),
126
- se
132
+ fe
127
133
  ]),
128
134
  _: 1
129
135
  }, 8, ["disabled"])
@@ -132,9 +138,9 @@ const v = (c) => (N("data-v-372103f0"), c = c(), T(), c), Z = {
132
138
  _: 1
133
139
  }, 8, ["modelValue"])
134
140
  ])
135
- ])) : $("", !0);
141
+ ])) : D("", !0);
136
142
  }
137
143
  });
138
144
  export {
139
- _e as default
145
+ Ee as default
140
146
  };
@@ -28,7 +28,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
28
28
  nullable: boolean;
29
29
  withVariables: boolean;
30
30
  withServers: boolean;
31
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
+ }>, {
32
+ focus: () => void;
33
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
32
34
  submit: (v: string) => void;
33
35
  "update:modelValue": (v: string) => void;
34
36
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
@@ -1 +1 @@
1
- {"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAAA,OA0TO,EAGL,KAAK,kBAAkB,EAExB,MAAM,wBAAwB,CAAA;;kBAeb,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;kBACT,OAAO;;;;;;;;;;;;;;kBAlBP,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;kBACT,OAAO;;;;;;;;;;;;;;iBAAP,OAAO;iBAlBP,OAAO;gBAGR,OAAO;sBAGD,OAAO;kBAMX,OAAO;0BACC,OAAO;cAGnB,OAAO;mBACF,OAAO;;qBAgRG,GAAG;kBACN,GAAG;;AArS9B,wBAwUC;AAMD,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAAA,OAiUO,EAGL,KAAK,kBAAkB,EAExB,MAAM,wBAAwB,CAAA;;kBAeb,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;kBACT,OAAO;;;;;;;;;;;;;;;;kBAlBP,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;kBACT,OAAO;;;;;;;;;;;;;;iBAAP,OAAO;iBAlBP,OAAO;gBAGR,OAAO;sBAGD,OAAO;kBAMX,OAAO;0BACC,OAAO;cAGnB,OAAO;mBACF,OAAO;;qBA4RG,GAAG;kBACN,GAAG;;AAjT9B,wBAqVC;AAMD,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,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 a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-caf4efcd"]]);
5
+ const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b044f01b"]]);
6
6
  export {
7
- a as default
7
+ _ as default
8
8
  };
@@ -1,20 +1,20 @@
1
- import { defineComponent as $, useAttrs as E, ref as y, toRef as o, watch as q, computed as I, openBlock as t, createElementBlock as s, Fragment as M, createBlock as g, mergeProps as N, unref as T, renderSlot as v, createCommentVNode as B } from "vue";
2
- import { useCodeMirror as A, colorPicker as U } from "@scalar/use-codemirror";
3
- import { nanoid as W } from "nanoid";
1
+ import { defineComponent as E, useAttrs as q, ref as y, toRef as o, watch as I, computed as M, openBlock as t, createElementBlock as s, Fragment as N, createBlock as g, mergeProps as T, unref as A, renderSlot as v, createCommentVNode as B } from "vue";
2
+ import { useCodeMirror as U, colorPicker as W } from "@scalar/use-codemirror";
3
+ import { nanoid as j } from "nanoid";
4
4
  import V from "../DataTable/DataTableInputSelect.vue.js";
5
- import { dropdownPlugin as j } from "./codeDropdownWidget.js";
6
- import { pillPlugin as z, backspaceCommand as D } from "./codeVariableWidget.js";
7
- import { useWorkspace as G } from "../../store/workspace.js";
8
- const H = ["id"], J = {
5
+ import { dropdownPlugin as z } from "./codeDropdownWidget.js";
6
+ import { pillPlugin as D, backspaceCommand as G } from "./codeVariableWidget.js";
7
+ import { useWorkspace as H } from "../../store/workspace.js";
8
+ const J = ["id"], K = {
9
9
  key: 3,
10
10
  class: "absolute centered-y right-7 text-orange text-xs"
11
- }, K = {
11
+ }, L = {
12
12
  key: 4,
13
13
  class: "required absolute centered-y right-0 pt-px pr-2 text-xxs text-c-3 bg-b-1 shadow-[-8px_0_4px_var(--scalar-background-1)] opacity-100 duration-150 transition-opacity peer-has-[.cm-focused]:opacity-0 pointer-events-none"
14
- }, L = {
14
+ }, Q = {
15
15
  inheritAttrs: !1
16
- }, te = /* @__PURE__ */ $({
17
- ...L,
16
+ }, ae = /* @__PURE__ */ E({
17
+ ...Q,
18
18
  __name: "CodeInput",
19
19
  props: {
20
20
  colorPicker: { type: Boolean, default: !1 },
@@ -38,42 +38,42 @@ const H = ["id"], J = {
38
38
  withServers: { type: Boolean, default: !1 }
39
39
  },
40
40
  emits: ["submit", "update:modelValue"],
41
- setup(k, { emit: w }) {
41
+ setup(k, { expose: w, emit: C }) {
42
42
  var b;
43
- const e = k, n = w, d = E(), C = d.id || `id-${W()}`, p = y(!1), {
44
- activeWorkspace: _,
43
+ const e = k, r = C, d = q(), _ = d.id || `id-${j()}`, p = y(!1), {
44
+ activeWorkspace: x,
45
45
  activeParsedEnvironments: c,
46
- isReadOnly: x,
46
+ isReadOnly: F,
47
47
  environments: m,
48
- router: F
49
- } = G();
50
- function S(l) {
51
- return l === e.modelValue ? null : e.handleFieldChange ? e.handleFieldChange(l) : n("update:modelValue", l);
52
- }
48
+ router: S
49
+ } = H();
53
50
  function P(l) {
54
- return e.handleFieldSubmit ? e.handleFieldSubmit(l) : n("submit", l);
51
+ return l === e.modelValue ? null : e.handleFieldChange ? e.handleFieldChange(l) : r("update:modelValue", l);
55
52
  }
56
53
  function O(l) {
57
- p.value = !1, e.emitOnBlur && e.modelValue && P(l);
54
+ return e.handleFieldSubmit ? e.handleFieldSubmit(l) : r("submit", l);
55
+ }
56
+ function R(l) {
57
+ p.value = !1, e.emitOnBlur && e.modelValue && O(l);
58
58
  }
59
59
  const a = [];
60
- e.colorPicker && a.push(U), e.withVariables && !_.value.isReadOnly && a.push(
61
- j({
60
+ e.colorPicker && a.push(W), e.withVariables && !x.value.isReadOnly && a.push(
61
+ z({
62
62
  withServers: e.withServers,
63
63
  activeParsedEnvironments: c,
64
64
  environments: m,
65
- router: F
65
+ router: S
66
66
  })
67
67
  ), a.push(
68
- z({ environments: m, activeParsedEnvironments: c, isReadOnly: x })
69
- ), a.push(D);
70
- const f = y(null), { codeMirror: r } = A({
68
+ D({ environments: m, activeParsedEnvironments: c, isReadOnly: F })
69
+ ), a.push(G);
70
+ const f = y(null), { codeMirror: n } = U({
71
71
  content: o(
72
72
  () => e.modelValue !== void 0 ? String(e.modelValue) : ""
73
73
  ),
74
- onChange: S,
74
+ onChange: P,
75
75
  onFocus: () => p.value = !0,
76
- onBlur: (l) => O(l),
76
+ onBlur: (l) => R(l),
77
77
  codeMirrorRef: f,
78
78
  disableTabIndent: o(() => e.disableTabIndent),
79
79
  disableEnter: o(() => e.disableEnter),
@@ -84,45 +84,50 @@ const H = ["id"], J = {
84
84
  extensions: a,
85
85
  placeholder: o(() => e.placeholder)
86
86
  });
87
- (b = r.value) == null || b.focus(), q(r, () => {
88
- r.value && Object.prototype.hasOwnProperty.call(d, "autofocus") && r.value.focus();
87
+ (b = n.value) == null || b.focus(), I(n, () => {
88
+ n.value && Object.prototype.hasOwnProperty.call(d, "autofocus") && n.value.focus();
89
89
  });
90
- const R = I(() => {
90
+ const $ = M(() => {
91
91
  var l;
92
92
  return e.type === "boolean" || (l = e.type) != null && l.includes("boolean") || e.nullable ? ["true", "false", "null"] : ["true", "false"];
93
93
  });
94
- return (l, u) => {
94
+ return w({
95
+ focus: () => {
96
+ var l;
97
+ (l = n.value) == null || l.focus();
98
+ }
99
+ }), (l, u) => {
95
100
  var h;
96
- return t(), s(M, null, [
101
+ return t(), s(N, null, [
97
102
  e.enum && e.enum.length ? (t(), g(V, {
98
103
  key: 0,
99
104
  modelValue: e.modelValue,
100
105
  value: e.enum,
101
- "onUpdate:modelValue": u[0] || (u[0] = (i) => n("update:modelValue", i))
106
+ "onUpdate:modelValue": u[0] || (u[0] = (i) => r("update:modelValue", i))
102
107
  }, null, 8, ["modelValue", "value"])) : e.type === "boolean" || (h = e.type) != null && h.includes("boolean") ? (t(), g(V, {
103
108
  key: 1,
104
109
  modelValue: e.modelValue,
105
- value: R.value,
106
- "onUpdate:modelValue": u[1] || (u[1] = (i) => n("update:modelValue", i))
107
- }, null, 8, ["modelValue", "value"])) : (t(), s("div", N({
110
+ value: $.value,
111
+ "onUpdate:modelValue": u[1] || (u[1] = (i) => r("update:modelValue", i))
112
+ }, null, 8, ["modelValue", "value"])) : (t(), s("div", T({
108
113
  key: 2,
109
- id: T(C)
114
+ id: A(_)
110
115
  }, l.$attrs, {
111
116
  ref_key: "codeMirrorRef",
112
117
  ref: f,
113
118
  class: ["peer font-code w-full whitespace-nowrap text-xs leading-[1.44] relative", {
114
119
  "flow-code-input--error": l.error
115
120
  }]
116
- }), null, 16, H)),
117
- l.$slots.warning ? (t(), s("div", J, [
121
+ }), null, 16, J)),
122
+ l.$slots.warning ? (t(), s("div", K, [
118
123
  v(l.$slots, "warning", {}, void 0, !0)
119
124
  ])) : B("", !0),
120
125
  v(l.$slots, "icon", {}, void 0, !0),
121
- l.required ? (t(), s("div", K, " Required ")) : B("", !0)
126
+ l.required ? (t(), s("div", L, " Required ")) : B("", !0)
122
127
  ], 64);
123
128
  };
124
129
  }
125
130
  });
126
131
  export {
127
- te as default
132
+ ae as default
128
133
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AAmYA;;;;GAIG;;AACH,wBAuaI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOpB,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CACxD"}
1
+ {"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AA4WA;;;;GAIG;;AACH,wBA0YI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOpB,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CACxD"}
@@ -2,8 +2,8 @@ import o from "./TheCommandPalette.vue2.js";
2
2
  import { PaletteComponents as s } from "./TheCommandPalette.vue2.js";
3
3
  /* empty css */
4
4
  import t from "../../_virtual/_plugin-vue_export-helper.js";
5
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3e82dc40"]]);
5
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-67f4ba63"]]);
6
6
  export {
7
7
  s as PaletteComponents,
8
- a as default
8
+ r as default
9
9
  };