@scalar/api-client 2.0.15 → 2.0.17

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 (124) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +46 -3
  3. package/dist/App/ApiClientApp.vue.d.ts +3 -0
  4. package/dist/App/ApiClientApp.vue.d.ts.map +1 -0
  5. package/dist/App/ApiClientApp.vue.js +56 -0
  6. package/dist/App/ApiClientApp.vue3.js +5 -0
  7. package/dist/App/createApiClientApp.d.ts +16 -0
  8. package/dist/App/createApiClientApp.d.ts.map +1 -0
  9. package/dist/App/createApiClientApp.js +62 -0
  10. package/dist/App/index.d.ts +3 -0
  11. package/dist/App/index.d.ts.map +1 -0
  12. package/dist/App/index.js +6 -0
  13. package/dist/App.vue.d.ts.map +1 -1
  14. package/dist/App.vue.js +49 -33
  15. package/dist/Modal/api-client-modal.d.ts +1 -1
  16. package/dist/Modal/api-client-modal.d.ts.map +1 -1
  17. package/dist/Modal/api-client-modal.js +7 -7
  18. package/dist/Modal/index.js +4 -4
  19. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  20. package/dist/components/AddressBar/AddressBar.vue.js +1 -1
  21. package/dist/components/AddressBar/AddressBar.vue2.js +2 -2
  22. package/dist/components/CodeInput/CodeInput.vue.d.ts +40 -4
  23. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  24. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  25. package/dist/components/CodeInput/CodeInput.vue2.js +87 -38
  26. package/dist/components/CommandPalette/CommandPalette.vue.d.ts +17 -0
  27. package/dist/components/CommandPalette/CommandPalette.vue.d.ts.map +1 -0
  28. package/dist/components/CommandPalette/CommandPalette.vue.js +7 -0
  29. package/dist/components/CommandPalette/CommandPalette.vue2.js +184 -0
  30. package/dist/components/{ActionModal/ActionModalImport.vue.d.ts → CommandPalette/CommandPaletteCollection.vue.d.ts} +1 -1
  31. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -0
  32. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +66 -0
  33. package/dist/components/CommandPalette/CommandPaletteCollection.vue2.js +4 -0
  34. package/dist/components/{ActionModal/ActionModalCollection.vue.d.ts → CommandPalette/CommandPaletteExample.vue.d.ts} +1 -1
  35. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -0
  36. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +107 -0
  37. package/dist/components/CommandPalette/CommandPaletteExample.vue2.js +4 -0
  38. package/dist/components/{ActionModal/ActionModalRequest.vue.d.ts → CommandPalette/CommandPaletteFolder.vue.d.ts} +1 -1
  39. package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts.map +1 -0
  40. package/dist/components/CommandPalette/CommandPaletteFolder.vue.js +104 -0
  41. package/dist/components/CommandPalette/CommandPaletteFolder.vue2.js +4 -0
  42. package/dist/components/{ActionModal/ActionModalVariant.vue.d.ts → CommandPalette/CommandPaletteImport.vue.d.ts} +1 -1
  43. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -0
  44. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +86 -0
  45. package/dist/components/CommandPalette/CommandPaletteImport.vue2.js +4 -0
  46. package/dist/components/{ActionModal/ActionModalFolder.vue.d.ts → CommandPalette/CommandPaletteRequest.vue.d.ts} +1 -1
  47. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -0
  48. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +119 -0
  49. package/dist/components/CommandPalette/CommandPaletteRequest.vue2.js +4 -0
  50. package/dist/components/ContextBar.vue.js +5 -5
  51. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +6 -6
  52. package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
  53. package/dist/components/DataTable/DataTableCell.vue.js +4 -4
  54. package/dist/components/DataTable/DataTableInput.vue.js +2 -2
  55. package/dist/components/DataTable/DataTableInput.vue2.js +13 -13
  56. package/dist/components/DataTable/{DataTableInputEnumSelect.vue.d.ts → DataTableInputSelect.vue.d.ts} +3 -3
  57. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -0
  58. package/dist/components/DataTable/DataTableInputSelect.vue.js +109 -0
  59. package/dist/components/DataTable/DataTableInputSelect.vue2.js +4 -0
  60. package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
  61. package/dist/components/SideNav/SideNavLink.vue.js +3 -3
  62. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  63. package/dist/components/TopNav/TopNav.vue.js +1 -1
  64. package/dist/components/TopNav/TopNav.vue2.js +26 -26
  65. package/dist/components/TopNav/TopNavItem.vue.js +2 -2
  66. package/dist/components/TopNav/TopNavItem.vue2.js +8 -8
  67. package/dist/hooks/index.d.ts +0 -1
  68. package/dist/hooks/index.d.ts.map +1 -1
  69. package/dist/hooks/index.js +6 -9
  70. package/dist/index.d.ts +1 -0
  71. package/dist/index.d.ts.map +1 -1
  72. package/dist/index.js +11 -6
  73. package/dist/router.d.ts +4 -1
  74. package/dist/router.d.ts.map +1 -1
  75. package/dist/store/workspace.d.ts +52 -2
  76. package/dist/store/workspace.d.ts.map +1 -1
  77. package/dist/store/workspace.js +74 -73
  78. package/dist/style.css +1 -1
  79. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  80. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +32 -31
  81. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  82. package/dist/views/Request/Request.vue.js +2 -2
  83. package/dist/views/Request/Request.vue2.js +68 -74
  84. package/dist/views/Request/RequestSection/RequestSection.vue.js +7 -7
  85. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  86. package/dist/views/Request/RequestSection/RequestTable.vue.js +4 -5
  87. package/dist/views/Request/RequestSection/RequestTable.vue2.js +80 -63
  88. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  89. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  90. package/dist/views/Request/RequestSidebarItem.vue2.js +48 -48
  91. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  92. package/dist/views/Request/RequestSidebarItemMenu.vue.js +41 -68
  93. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +2 -2
  94. package/package.json +11 -6
  95. package/dist/assets/ascii/collection.ascii.js +0 -10
  96. package/dist/assets/ascii/folder.ascii.js +0 -10
  97. package/dist/assets/ascii/import.ascii.js +0 -10
  98. package/dist/assets/ascii/request.ascii.js +0 -10
  99. package/dist/assets/ascii/variant.ascii.js +0 -10
  100. package/dist/components/ActionModal/ActionModal.vue.d.ts +0 -21
  101. package/dist/components/ActionModal/ActionModal.vue.d.ts.map +0 -1
  102. package/dist/components/ActionModal/ActionModal.vue.js +0 -7
  103. package/dist/components/ActionModal/ActionModal.vue2.js +0 -117
  104. package/dist/components/ActionModal/ActionModalCollection.vue.d.ts.map +0 -1
  105. package/dist/components/ActionModal/ActionModalCollection.vue.js +0 -54
  106. package/dist/components/ActionModal/ActionModalCollection.vue2.js +0 -4
  107. package/dist/components/ActionModal/ActionModalFolder.vue.d.ts.map +0 -1
  108. package/dist/components/ActionModal/ActionModalFolder.vue.js +0 -92
  109. package/dist/components/ActionModal/ActionModalFolder.vue2.js +0 -4
  110. package/dist/components/ActionModal/ActionModalImport.vue.d.ts.map +0 -1
  111. package/dist/components/ActionModal/ActionModalImport.vue.js +0 -70
  112. package/dist/components/ActionModal/ActionModalImport.vue2.js +0 -4
  113. package/dist/components/ActionModal/ActionModalRequest.vue.d.ts.map +0 -1
  114. package/dist/components/ActionModal/ActionModalRequest.vue.js +0 -108
  115. package/dist/components/ActionModal/ActionModalRequest.vue2.js +0 -4
  116. package/dist/components/ActionModal/ActionModalVariant.vue.d.ts.map +0 -1
  117. package/dist/components/ActionModal/ActionModalVariant.vue.js +0 -93
  118. package/dist/components/ActionModal/ActionModalVariant.vue2.js +0 -4
  119. package/dist/components/DataTable/DataTableInputEnumSelect.vue.d.ts.map +0 -1
  120. package/dist/components/DataTable/DataTableInputEnumSelect.vue.js +0 -102
  121. package/dist/components/DataTable/DataTableInputEnumSelect.vue2.js +0 -4
  122. package/dist/hooks/useActionModal.d.ts +0 -16
  123. package/dist/hooks/useActionModal.d.ts.map +0 -1
  124. package/dist/hooks/useActionModal.js +0 -25
@@ -1,10 +1,17 @@
1
- import { defineComponent as B, useAttrs as _, ref as d, toRef as n, watch as b, openBlock as y, createElementBlock as C, mergeProps as F, unref as k } from "vue";
2
- import { useCodeMirror as w, colorPicker as P } from "@scalar/use-codemirror";
3
- import { nanoid as V } from "nanoid";
4
- const v = ["id"], M = {
1
+ import { defineComponent as F, useAttrs as S, ref as b, toRef as o, watch as $, computed as O, openBlock as t, createElementBlock as u, Fragment as P, createBlock as y, mergeProps as q, unref as E, renderSlot as h, createCommentVNode as g } from "vue";
2
+ import { useCodeMirror as I, colorPicker as M } from "@scalar/use-codemirror";
3
+ import { nanoid as N } from "nanoid";
4
+ import B from "../DataTable/DataTableInputSelect.vue.js";
5
+ const R = ["id"], T = {
6
+ key: 3,
7
+ class: "absolute centered-y right-7 text-orange text-xs"
8
+ }, A = {
9
+ key: 4,
10
+ 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"
11
+ }, U = {
5
12
  inheritAttrs: !1
6
- }, R = /* @__PURE__ */ B({
7
- ...M,
13
+ }, H = /* @__PURE__ */ F({
14
+ ...U,
8
15
  __name: "CodeInput",
9
16
  props: {
10
17
  colorPicker: { type: Boolean, default: !1 },
@@ -13,47 +20,89 @@ const v = ["id"], M = {
13
20
  emitOnBlur: { type: Boolean, default: !0 },
14
21
  lineNumbers: { type: Boolean },
15
22
  lint: { type: Boolean },
23
+ disableTabIndent: { type: Boolean, default: !1 },
16
24
  language: {},
17
25
  handleFieldSubmit: {},
18
- handleFieldChange: {}
26
+ handleFieldChange: {},
27
+ placeholder: {},
28
+ required: { type: Boolean },
29
+ disableEnter: { type: Boolean, default: !1 },
30
+ disableCloseBrackets: { type: Boolean, default: !1 },
31
+ enum: {},
32
+ type: {},
33
+ nullable: { type: Boolean, default: !1 }
19
34
  },
20
35
  emits: ["submit", "update:modelValue"],
21
- setup(c, { emit: f }) {
22
- var s;
23
- const o = c, l = f, r = _(), m = r.id || `id-${V()}`, a = d(!1);
24
- function p(e) {
25
- return o.handleFieldChange ? o.handleFieldChange(e) : l("update:modelValue", e);
36
+ setup(V, { emit: k }) {
37
+ var m;
38
+ const e = V, a = k, s = S(), v = s.id || `id-${N()}`, i = b(!1);
39
+ function C(l) {
40
+ return e.handleFieldChange ? e.handleFieldChange(l) : a("update:modelValue", l);
26
41
  }
27
- function h(e) {
28
- return o.handleFieldSubmit ? o.handleFieldSubmit(e) : l("submit", e);
42
+ function _(l) {
43
+ return e.handleFieldSubmit ? e.handleFieldSubmit(l) : a("submit", l);
29
44
  }
30
- function g(e) {
31
- a.value = !1, o.emitOnBlur && o.modelValue && h(e);
45
+ function w(l) {
46
+ i.value = !1, e.emitOnBlur && e.modelValue && _(l);
32
47
  }
33
- const i = [];
34
- o.colorPicker && i.push(P);
35
- const u = d(null), { codeMirror: t } = w({
36
- content: n(() => o.modelValue ?? ""),
37
- onChange: p,
38
- onFocus: () => a.value = !0,
39
- onBlur: (e) => g(e),
40
- codeMirrorRef: u,
41
- lineNumbers: n(() => o.lineNumbers),
42
- language: n(() => o.language),
43
- lint: n(() => o.lint),
44
- extensions: i
48
+ const c = [];
49
+ e.colorPicker && c.push(M);
50
+ const p = b(null), { codeMirror: n } = I({
51
+ content: o(
52
+ () => e.modelValue !== void 0 ? String(e.modelValue) : ""
53
+ ),
54
+ onChange: C,
55
+ onFocus: () => i.value = !0,
56
+ onBlur: (l) => w(l),
57
+ codeMirrorRef: p,
58
+ disableTabIndent: o(() => e.disableTabIndent),
59
+ disableEnter: o(() => e.disableEnter),
60
+ disableCloseBrackets: o(() => e.disableCloseBrackets),
61
+ lineNumbers: o(() => e.lineNumbers),
62
+ language: o(() => e.language),
63
+ lint: o(() => e.lint),
64
+ extensions: c,
65
+ placeholder: o(() => e.placeholder)
45
66
  });
46
- return (s = t.value) == null || s.focus(), b(t, () => {
47
- t.value && Object.prototype.hasOwnProperty.call(r, "autofocus") && t.value.focus();
48
- }), (e, O) => (y(), C("div", F({ id: k(m) }, e.$attrs, {
49
- ref_key: "codeMirrorRef",
50
- ref: u,
51
- class: ["font-code w-full whitespace-nowrap text-xs leading-[1.44]", {
52
- "flow-code-input--error": e.error
53
- }]
54
- }), null, 16, v));
67
+ (m = n.value) == null || m.focus(), $(n, () => {
68
+ n.value && Object.prototype.hasOwnProperty.call(s, "autofocus") && n.value.focus();
69
+ });
70
+ const x = O(() => {
71
+ var l;
72
+ return e.type === "boolean" || (l = e.type) != null && l.includes("boolean") || e.nullable ? ["true", "false", "null"] : ["true", "false"];
73
+ });
74
+ return (l, r) => {
75
+ var f;
76
+ return t(), u(P, null, [
77
+ e.enum && e.enum.length ? (t(), y(B, {
78
+ key: 0,
79
+ modelValue: e.modelValue,
80
+ value: e.enum,
81
+ "onUpdate:modelValue": r[0] || (r[0] = (d) => a("update:modelValue", d))
82
+ }, null, 8, ["modelValue", "value"])) : e.type === "boolean" || (f = e.type) != null && f.includes("boolean") ? (t(), y(B, {
83
+ key: 1,
84
+ modelValue: e.modelValue,
85
+ value: x.value,
86
+ "onUpdate:modelValue": r[1] || (r[1] = (d) => a("update:modelValue", d))
87
+ }, null, 8, ["modelValue", "value"])) : (t(), u("div", q({
88
+ key: 2,
89
+ id: E(v)
90
+ }, l.$attrs, {
91
+ ref_key: "codeMirrorRef",
92
+ ref: p,
93
+ class: ["peer font-code w-full whitespace-nowrap text-xs leading-[1.44] relative", {
94
+ "flow-code-input--error": l.error
95
+ }]
96
+ }), null, 16, R)),
97
+ l.$slots.warning ? (t(), u("div", T, [
98
+ h(l.$slots, "warning", {}, void 0, !0)
99
+ ])) : g("", !0),
100
+ h(l.$slots, "icon", {}, void 0, !0),
101
+ l.required ? (t(), u("div", A, " Required ")) : g("", !0)
102
+ ], 64);
103
+ };
55
104
  }
56
105
  });
57
106
  export {
58
- R as default
107
+ H as default
59
108
  };
@@ -0,0 +1,17 @@
1
+ import { type ModalState } from '@scalar/components';
2
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
3
+ state: ModalState;
4
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
5
+ state: ModalState;
6
+ }>>>, {}, {}>;
7
+ export default _default;
8
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
+ type __VLS_TypePropsToOption<T> = {
10
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
11
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
12
+ } : {
13
+ type: import('vue').PropType<T[K]>;
14
+ required: true;
15
+ };
16
+ };
17
+ //# sourceMappingURL=CommandPalette.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPalette.vue"],"names":[],"mappings":"AA2TA,OAAO,EAAa,KAAK,UAAU,EAAc,MAAM,oBAAoB,CAAA;;WAclE,UAAU;;WAAV,UAAU;;AAmYnB,wBAMG;AAOH,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"}
@@ -0,0 +1,7 @@
1
+ import o from "./CommandPalette.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-158208c8"]]);
5
+ export {
6
+ e as default
7
+ };
@@ -0,0 +1,184 @@
1
+ import { defineComponent as I, ref as f, computed as B, openBlock as r, createElementBlock as s, Fragment as m, withDirectives as p, createElementVNode as a, vShow as A, createVNode as y, unref as g, vModelText as D, renderList as $, toDisplayString as E, normalizeClass as F, createTextVNode as N, createBlock as q, resolveDynamicComponent as M } from "vue";
2
+ import { ScalarIcon as L } from "@scalar/components";
3
+ import { useMagicKeys as P, whenever as C } from "@vueuse/core";
4
+ import { useRouter as T } from "vue-router";
5
+ import U from "./CommandPaletteCollection.vue.js";
6
+ import G from "./CommandPaletteExample.vue.js";
7
+ import H from "./CommandPaletteFolder.vue.js";
8
+ import K from "./CommandPaletteImport.vue.js";
9
+ import Q from "./CommandPaletteRequest.vue.js";
10
+ const W = { class: "commandmenu" }, j = { class: "bg-b-2 flex items-center rounded mb-2 pl-2 focus-within:bg-b-1 focus-within:shadow-border" }, J = { for: "commandmenu" }, O = ["onClick"], se = /* @__PURE__ */ I({
11
+ __name: "CommandPalette",
12
+ props: {
13
+ state: {}
14
+ },
15
+ setup(V) {
16
+ const i = V, b = T(), z = {
17
+ "Import Collection": K,
18
+ "Create Request": Q,
19
+ "Add Folder": H,
20
+ "Create Collection": U,
21
+ "Add Example": G
22
+ }, h = [
23
+ {
24
+ label: "Add to Request Sidebar",
25
+ commands: [
26
+ {
27
+ name: "Create Request",
28
+ icon: "ExternalLink"
29
+ },
30
+ {
31
+ name: "Import Collection",
32
+ icon: "Import"
33
+ },
34
+ {
35
+ name: "Add Folder",
36
+ icon: "Folder"
37
+ },
38
+ {
39
+ name: "Create Collection",
40
+ icon: "Collection"
41
+ },
42
+ {
43
+ name: "Add Example",
44
+ icon: "Example"
45
+ }
46
+ ]
47
+ },
48
+ {
49
+ label: "More Actions",
50
+ commands: [
51
+ {
52
+ name: "Add Server",
53
+ icon: "Brackets",
54
+ overloadAction: () => b.push("/servers")
55
+ },
56
+ {
57
+ name: "Add Environment",
58
+ icon: "Server",
59
+ overloadAction: () => b.push("/environment")
60
+ },
61
+ {
62
+ name: "Add Cookie",
63
+ icon: "Cookie",
64
+ overloadAction: () => b.push("/cookies")
65
+ }
66
+ ]
67
+ }
68
+ ], d = P(), c = f(""), u = f(""), t = f(0), w = f([]), k = B(
69
+ () => h.reduce((e, n) => {
70
+ const l = n.commands.filter(
71
+ (v) => v.name.toLowerCase().includes(c.value.toLowerCase())
72
+ );
73
+ return [...e, ...l];
74
+ }, [])
75
+ );
76
+ C(d.escape, () => {
77
+ i.state.open && i.state.hide();
78
+ });
79
+ function S() {
80
+ i.state.hide(), c.value = "", u.value = "";
81
+ }
82
+ return C(d.enter, () => {
83
+ var n;
84
+ if (!i.state.open || !window)
85
+ return;
86
+ const e = k.value[t.value];
87
+ ((n = e == null ? void 0 : e.overloadAction) == null ? void 0 : n.call(e)) ?? (u.value = e.name);
88
+ }), C(d.ArrowDown, () => {
89
+ var e;
90
+ i.state.open && window && (t.value < k.value.length - 1 ? t.value++ : t.value = 0, (e = w.value[t.value]) == null || e.scrollIntoView({
91
+ behavior: "smooth",
92
+ block: "center"
93
+ }));
94
+ }), C(d.ArrowUp, () => {
95
+ var e;
96
+ i.state.open && window && (t.value > 0 ? t.value-- : t.value = k.value.length - 1, (e = w.value[t.value]) == null || e.scrollIntoView({
97
+ behavior: "smooth",
98
+ block: "center"
99
+ }));
100
+ }), (e, n) => (r(), s(m, null, [
101
+ p(a("div", {
102
+ class: "commandmenu-clickout",
103
+ onClick: n[0] || (n[0] = (l) => S())
104
+ }, null, 512), [
105
+ [A, e.state.open]
106
+ ]),
107
+ p(a("div", W, [
108
+ u.value ? (r(), s(m, { key: 1 }, [
109
+ a("button", {
110
+ class: "absolute p-1 hover:bg-b-3 rounded text-c-3 active:text-c-1 m-1.5 z-10",
111
+ type: "button",
112
+ onClick: n[2] || (n[2] = (l) => u.value = "")
113
+ }, [
114
+ y(g(L), {
115
+ class: "!stroke-1.5",
116
+ icon: "ChevronLeft",
117
+ size: "sm"
118
+ })
119
+ ]),
120
+ (r(), q(M(z[u.value]), { onClose: S }, null, 32))
121
+ ], 64)) : (r(), s(m, { key: 0 }, [
122
+ a("div", j, [
123
+ a("label", J, [
124
+ y(g(L), {
125
+ class: "text-c-1 mr-2.5 !stroke-1.5",
126
+ icon: "SearchNew",
127
+ size: "sm"
128
+ })
129
+ ]),
130
+ p(a("input", {
131
+ id: "commandmenu",
132
+ "onUpdate:modelValue": n[1] || (n[1] = (l) => c.value = l),
133
+ class: "w-full rounded bg-none border-none py-1.5 text-sm focus:outline-none",
134
+ placeholder: "Search commands...",
135
+ type: "text"
136
+ }, null, 512), [
137
+ [D, c.value]
138
+ ])
139
+ ]),
140
+ (r(), s(m, null, $(h, (l, v) => (r(), s(m, {
141
+ key: l.label
142
+ }, [
143
+ p(a("div", { class: "text-c-3 font-medium text-xs mt-2" }, E(l.label), 513), [
144
+ [
145
+ A,
146
+ l.commands.filter(
147
+ (o) => o.name.toLowerCase().includes(c.value.toLowerCase())
148
+ ).length > 0
149
+ ]
150
+ ]),
151
+ (r(!0), s(m, null, $(l.commands.filter(
152
+ (o) => o.name.toLowerCase().includes(c.value.toLowerCase())
153
+ ), (o, _) => (r(), s("div", {
154
+ key: o.name,
155
+ ref_for: !0,
156
+ ref: (x) => {
157
+ x && (w.value[_] = x);
158
+ },
159
+ class: F(["commandmenu-item text-sm flex items-center py-1.5 px-2 rounded hover:bg-b-2 cursor-pointer", {
160
+ "bg-b-2": v > 0 ? t.value === _ + h[v - 1].commands.length : t.value === _
161
+ }]),
162
+ onClick: (x) => {
163
+ var R;
164
+ return ((R = o == null ? void 0 : o.overloadAction) == null ? void 0 : R.call(o)) ?? (u.value = o.name);
165
+ }
166
+ }, [
167
+ y(g(L), {
168
+ class: "text-c-1 mr-2.5 !stroke-1.5",
169
+ icon: o.icon,
170
+ size: "md"
171
+ }, null, 8, ["icon"]),
172
+ N(" " + E(o.name), 1)
173
+ ], 10, O))), 128))
174
+ ], 64))), 64))
175
+ ], 64))
176
+ ], 512), [
177
+ [A, e.state.open]
178
+ ])
179
+ ], 64));
180
+ }
181
+ });
182
+ export {
183
+ se as default
184
+ };
@@ -17,4 +17,4 @@ type __VLS_TypePropsToOption<T> = {
17
17
  required: true;
18
18
  };
19
19
  };
20
- //# sourceMappingURL=ActionModalImport.vue.d.ts.map
20
+ //# sourceMappingURL=CommandPaletteCollection.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandPaletteCollection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteCollection.vue"],"names":[],"mappings":";WAuES,MAAM;;;;WAAN,MAAM;;;;AAkIf,wBAOG;AAOH,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"}
@@ -0,0 +1,66 @@
1
+ import { defineComponent as m, ref as s, onMounted as p, openBlock as d, createElementBlock as f, Fragment as h, createElementVNode as e, toDisplayString as x, withModifiers as _, withDirectives as b, vModelText as v, createVNode as w, unref as g, withCtx as C, createTextVNode as N } from "vue";
2
+ import { useWorkspace as y } from "../../store/workspace.js";
3
+ import { ScalarButton as k } from "@scalar/components";
4
+ const M = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, S = /* @__PURE__ */ e("label", {
5
+ class: "absolute w-full h-full opacity-0 cursor-text",
6
+ for: "collectionanme"
7
+ }, null, -1), V = { class: "flex" }, B = /* @__PURE__ */ e("div", { class: "flex flex-1 gap-2 max-h-8" }, null, -1), F = /* @__PURE__ */ m({
8
+ __name: "CommandPaletteCollection",
9
+ props: {
10
+ title: {}
11
+ },
12
+ emits: ["close"],
13
+ setup(D, { emit: i }) {
14
+ const a = i, { collectionMutators: c } = y(), l = s(""), r = () => {
15
+ c.add({
16
+ spec: {
17
+ openapi: "3.1.0",
18
+ info: {
19
+ title: l.value,
20
+ version: "0.0.1"
21
+ }
22
+ }
23
+ }), a("close");
24
+ }, o = s(null);
25
+ return p(() => {
26
+ var t;
27
+ (t = o.value) == null || t.focus();
28
+ }), (t, n) => (d(), f(h, null, [
29
+ e("h2", null, x(t.title), 1),
30
+ e("form", {
31
+ class: "flex w-full flex-col gap-3",
32
+ onSubmit: _(r, ["prevent"])
33
+ }, [
34
+ e("div", M, [
35
+ S,
36
+ b(e("input", {
37
+ id: "collectionanme",
38
+ ref_key: "collectionInput",
39
+ ref: o,
40
+ "onUpdate:modelValue": n[0] || (n[0] = (u) => l.value = u),
41
+ class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
42
+ label: "Collection Name",
43
+ placeholder: "Collection Name"
44
+ }, null, 512), [
45
+ [v, l.value]
46
+ ])
47
+ ]),
48
+ e("div", V, [
49
+ B,
50
+ w(g(k), {
51
+ class: "max-h-8 text-xs p-0 px-3",
52
+ type: "submit"
53
+ }, {
54
+ default: C(() => [
55
+ N(" Continue ")
56
+ ]),
57
+ _: 1
58
+ })
59
+ ])
60
+ ], 32)
61
+ ], 64));
62
+ }
63
+ });
64
+ export {
65
+ F as default
66
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./CommandPaletteCollection.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -17,4 +17,4 @@ type __VLS_TypePropsToOption<T> = {
17
17
  required: true;
18
18
  };
19
19
  };
20
- //# sourceMappingURL=ActionModalCollection.vue.d.ts.map
20
+ //# sourceMappingURL=CommandPaletteExample.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandPaletteExample.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteExample.vue"],"names":[],"mappings":";WAyGS,MAAM;;;;WAAN,MAAM;;;;AAwQf,wBAOG;AAOH,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"}
@@ -0,0 +1,107 @@
1
+ import { defineComponent as k, ref as i, onMounted as y, openBlock as m, createElementBlock as h, Fragment as v, createElementVNode as e, toDisplayString as u, withModifiers as C, withDirectives as S, vModelText as N, createVNode as a, unref as s, withCtx as n, renderList as V, createBlock as D, createTextVNode as c } from "vue";
2
+ import _ from "../HttpMethod/HttpMethod.vue.js";
3
+ import { useWorkspace as B } from "../../store/workspace.js";
4
+ import { ScalarDropdown as E, ScalarDropdownItem as I, ScalarButton as w, ScalarIcon as $ } from "@scalar/components";
5
+ const M = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, j = /* @__PURE__ */ e("label", {
6
+ class: "absolute w-full h-full opacity-0 cursor-text",
7
+ for: "examplename"
8
+ }, null, -1), z = { class: "flex gap-2" }, R = { class: "flex flex-1 max-h-8" }, T = { class: "flex items-center gap-2" }, F = { class: "max-h-40 custom-scroll" }, H = /* @__PURE__ */ k({
9
+ __name: "CommandPaletteExample",
10
+ props: {
11
+ title: {}
12
+ },
13
+ emits: ["close"],
14
+ setup(L, { emit: b }) {
15
+ const g = b, { workspaceRequests: p } = B(), d = i(""), r = i(p.value[0]);
16
+ function f(l) {
17
+ r.value = l;
18
+ }
19
+ const x = i(null);
20
+ return y(() => {
21
+ var l;
22
+ (l = x.value) == null || l.focus();
23
+ }), (l, o) => (m(), h(v, null, [
24
+ e("h2", null, u(l.title), 1),
25
+ e("form", {
26
+ class: "flex w-full flex-col gap-3",
27
+ onSubmit: o[2] || (o[2] = C((t) => g("close"), ["prevent"]))
28
+ }, [
29
+ e("div", M, [
30
+ j,
31
+ S(e("input", {
32
+ id: "examplename",
33
+ ref_key: "exampleInput",
34
+ ref: x,
35
+ "onUpdate:modelValue": o[0] || (o[0] = (t) => d.value = t),
36
+ class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
37
+ label: "Variant Name",
38
+ placeholder: "Variant Name"
39
+ }, null, 512), [
40
+ [N, d.value]
41
+ ])
42
+ ]),
43
+ e("div", z, [
44
+ e("div", R, [
45
+ a(s(E), {
46
+ placement: "bottom",
47
+ resize: ""
48
+ }, {
49
+ items: n(() => [
50
+ e("div", F, [
51
+ (m(!0), h(v, null, V(s(p), (t) => (m(), D(s(I), {
52
+ key: t.uid,
53
+ class: "flex h-7 w-full items-center justify-between px-1 pr-[26px]",
54
+ onClick: (P) => f(t)
55
+ }, {
56
+ default: n(() => [
57
+ c(u(t.summary) + " ", 1),
58
+ a(_, {
59
+ method: t.method
60
+ }, null, 8, ["method"])
61
+ ]),
62
+ _: 2
63
+ }, 1032, ["onClick"]))), 128))
64
+ ])
65
+ ]),
66
+ default: n(() => [
67
+ a(s(w), {
68
+ class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
69
+ variant: "outlined",
70
+ onClick: o[1] || (o[1] = (t) => f(r.value))
71
+ }, {
72
+ default: n(() => [
73
+ c(u(r.value.summary) + " ", 1),
74
+ e("div", T, [
75
+ a(_, {
76
+ method: r.value.method
77
+ }, null, 8, ["method"]),
78
+ a(s($), {
79
+ class: "text-c-3",
80
+ icon: "ChevronDown",
81
+ size: "xs"
82
+ })
83
+ ])
84
+ ]),
85
+ _: 1
86
+ })
87
+ ]),
88
+ _: 1
89
+ })
90
+ ]),
91
+ a(s(w), {
92
+ class: "max-h-8 text-xs p-0 px-3",
93
+ type: "submit"
94
+ }, {
95
+ default: n(() => [
96
+ c(" Create Example ")
97
+ ]),
98
+ _: 1
99
+ })
100
+ ])
101
+ ], 32)
102
+ ], 64));
103
+ }
104
+ });
105
+ export {
106
+ H as default
107
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./CommandPaletteExample.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -17,4 +17,4 @@ type __VLS_TypePropsToOption<T> = {
17
17
  required: true;
18
18
  };
19
19
  };
20
- //# sourceMappingURL=ActionModalRequest.vue.d.ts.map
20
+ //# sourceMappingURL=CommandPaletteFolder.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandPaletteFolder.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteFolder.vue"],"names":[],"mappings":";WA0GS,MAAM;;;;WAAN,MAAM;;;;AAgNf,wBAOG;AAOH,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"}