@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,93 +0,0 @@
1
- import { defineComponent as b, ref as f, openBlock as i, createElementBlock as v, Fragment as h, createVNode as t, unref as l, createElementVNode as o, toDisplayString as m, withModifiers as V, withDirectives as S, vModelText as y, withCtx as n, renderList as C, createBlock as N, createTextVNode as c } from "vue";
2
- import D from "../../assets/ascii/variant.ascii.js";
3
- import _ from "../HttpMethod/HttpMethod.vue.js";
4
- import g from "../ScalarAsciiArt.vue.js";
5
- import { useWorkspace as B } from "../../store/workspace.js";
6
- import { ScalarDropdown as $, ScalarDropdownItem as z, ScalarButton as x, ScalarIcon as A } from "@scalar/components";
7
- const I = { class: "z-10" }, M = /* @__PURE__ */ o("span", { class: "mb-1 block font-medium" }, "Inside:", -1), j = { class: "flex items-center gap-2" }, E = { class: "max-h-40 custom-scroll" }, J = /* @__PURE__ */ b({
8
- __name: "ActionModalVariant",
9
- props: {
10
- title: {}
11
- },
12
- emits: ["close"],
13
- setup(R, { emit: w }) {
14
- const k = w, { workspaceRequests: u } = B(), d = f(""), r = f(u.value[0]);
15
- function p(s) {
16
- r.value = s;
17
- }
18
- return (s, a) => (i(), v(h, null, [
19
- t(g, { art: l(D) }, null, 8, ["art"]),
20
- o("h2", null, m(s.title), 1),
21
- o("form", {
22
- class: "flex w-full flex-col gap-3",
23
- onSubmit: a[2] || (a[2] = V((e) => k("close"), ["prevent"]))
24
- }, [
25
- S(o("input", {
26
- "onUpdate:modelValue": a[0] || (a[0] = (e) => d.value = e),
27
- class: "h-10 rounded border p-2",
28
- label: "Variant Name",
29
- placeholder: "Variant Name"
30
- }, null, 512), [
31
- [y, d.value]
32
- ]),
33
- o("div", I, [
34
- M,
35
- t(l($), {
36
- placement: "bottom",
37
- resize: ""
38
- }, {
39
- items: n(() => [
40
- o("div", E, [
41
- (i(!0), v(h, null, C(l(u), (e) => (i(), N(l(z), {
42
- key: e.uid,
43
- class: "flex h-7 w-full items-center justify-between px-1 pr-[26px]",
44
- onClick: (T) => p(e)
45
- }, {
46
- default: n(() => [
47
- c(m(e.summary) + " ", 1),
48
- t(_, {
49
- method: e.method
50
- }, null, 8, ["method"])
51
- ]),
52
- _: 2
53
- }, 1032, ["onClick"]))), 128))
54
- ])
55
- ]),
56
- default: n(() => [
57
- t(l(x), {
58
- class: "justify-between p-2 w-full",
59
- variant: "outlined",
60
- onClick: a[1] || (a[1] = (e) => p(r.value))
61
- }, {
62
- default: n(() => [
63
- c(m(r.value.summary) + " ", 1),
64
- o("div", j, [
65
- t(_, {
66
- method: r.value.method
67
- }, null, 8, ["method"]),
68
- t(l(A), {
69
- class: "text-c-3",
70
- icon: "ChevronDown",
71
- size: "xs"
72
- })
73
- ])
74
- ]),
75
- _: 1
76
- })
77
- ]),
78
- _: 1
79
- })
80
- ]),
81
- t(l(x), { type: "submit" }, {
82
- default: n(() => [
83
- c(" Create Variant ")
84
- ]),
85
- _: 1
86
- })
87
- ], 32)
88
- ], 64));
89
- }
90
- });
91
- export {
92
- J as default
93
- };
@@ -1,4 +0,0 @@
1
- import f from "./ActionModalVariant.vue.js";
2
- export {
3
- f as default
4
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableInputEnumSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInputEnumSelect.vue"],"names":[],"mappings":";gBA+Hc,MAAM,GAAG,MAAM;WACpB,MAAM,EAAE;;;;gBADH,MAAM,GAAG,MAAM;WACpB,MAAM,EAAE;;;;AA8SjB,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"}
@@ -1,102 +0,0 @@
1
- import { defineComponent as D, computed as b, ref as d, watch as B, openBlock as o, createElementBlock as m, withDirectives as z, withKeys as N, vModelText as j, createBlock as p, unref as t, withCtx as u, Fragment as E, renderList as I, createElementVNode as i, normalizeClass as T, createVNode as s, createTextVNode as A, toDisplayString as w, createCommentVNode as K } from "vue";
2
- import { ScalarDropdown as $, ScalarDropdownItem as V, ScalarIcon as v, ScalarDropdownDivider as F, ScalarButton as L } from "@scalar/components";
3
- const M = { class: "w-full" }, U = { class: "flex items-center justify-center h-4 w-4" }, W = /* @__PURE__ */ i("span", null, "Add value", -1), J = /* @__PURE__ */ D({
4
- __name: "DataTableInputEnumSelect",
5
- props: {
6
- modelValue: {},
7
- enum: {}
8
- },
9
- emits: ["update:modelValue"],
10
- setup(k, { emit: y }) {
11
- const f = k, x = y, _ = b(() => f.enum ?? []), n = d(f.modelValue.toString()), r = d(!1), l = d("");
12
- B(l, (a) => {
13
- x("update:modelValue", a);
14
- });
15
- const h = (a) => {
16
- n.value = a, x("update:modelValue", a), r.value = !1;
17
- }, g = () => {
18
- l.value.trim() && (h(l.value), l.value = "");
19
- }, C = () => {
20
- l.value.trim() || (n.value = "", r.value = !1);
21
- }, S = (a) => n.value === a;
22
- return (a, c) => (o(), m("div", M, [
23
- r.value ? z((o(), m("input", {
24
- key: 0,
25
- "onUpdate:modelValue": c[0] || (c[0] = (e) => l.value = e),
26
- class: "border-none focus:text-c-1 text-c-2 min-w-0 w-full px-2 py-1.5 outline-none",
27
- placeholder: "Value",
28
- type: "text",
29
- onBlur: C,
30
- onKeyup: N(g, ["enter"])
31
- }, null, 544)), [
32
- [j, l.value]
33
- ]) : (o(), p(t($), {
34
- key: 1,
35
- resize: "",
36
- value: n.value
37
- }, {
38
- items: u(() => [
39
- (o(!0), m(E, null, I(_.value, (e) => (o(), p(t(V), {
40
- key: e,
41
- class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden",
42
- value: e,
43
- onClick: (q) => h(e)
44
- }, {
45
- default: u(() => [
46
- i("div", {
47
- class: T([
48
- "flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
49
- S(e) ? "bg-blue text-b-1" : "text-transparent"
50
- ])
51
- }, [
52
- s(t(v), {
53
- class: "size-2.5 stroke-[1.75]",
54
- icon: "Checkmark"
55
- })
56
- ], 2),
57
- A(" " + w(e), 1)
58
- ]),
59
- _: 2
60
- }, 1032, ["value", "onClick"]))), 128)),
61
- s(t(F)),
62
- s(t(V), {
63
- class: "flex items-center gap-1.5",
64
- onClick: c[1] || (c[1] = (e) => r.value = !0)
65
- }, {
66
- default: u(() => [
67
- i("div", U, [
68
- s(t(v), {
69
- class: "h-2.5",
70
- icon: "Add"
71
- })
72
- ]),
73
- W
74
- ]),
75
- _: 1
76
- })
77
- ]),
78
- default: u(() => [
79
- s(t(L), {
80
- class: "gap-1.5 font-normal h-full justify-start px-2 py-1.5",
81
- fullWidth: "",
82
- variant: "ghost"
83
- }, {
84
- default: u(() => [
85
- i("span", null, w(n.value || "Select a value"), 1),
86
- n.value ? K("", !0) : (o(), p(t(v), {
87
- key: 0,
88
- icon: "ChevronDown",
89
- size: "xs"
90
- }))
91
- ]),
92
- _: 1
93
- })
94
- ]),
95
- _: 1
96
- }, 8, ["value"]))
97
- ]));
98
- }
99
- });
100
- export {
101
- J as default
102
- };
@@ -1,4 +0,0 @@
1
- import f from "./DataTableInputEnumSelect.vue.js";
2
- export {
3
- f as default
4
- };
@@ -1,16 +0,0 @@
1
- export declare enum ActionModalTab {
2
- Request = "Request name / type",
3
- Folder = "Add folder to your workspace",
4
- Import = "Import OpenAPI file to your workspace",
5
- Collection = "Add collection to your workspace",
6
- Variant = "Add variant to your workspace"
7
- }
8
- export type ActionModalState = ReturnType<typeof useActionModal>;
9
- export declare const useActionModal: () => {
10
- open: boolean;
11
- tab: ActionModalTab;
12
- show: () => void;
13
- hide: () => void;
14
- activeTab: (activeTab: ActionModalTab) => void;
15
- };
16
- //# sourceMappingURL=useActionModal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useActionModal.d.ts","sourceRoot":"","sources":["../../src/hooks/useActionModal.ts"],"names":[],"mappings":"AAEA,oBAAY,cAAc;IACxB,OAAO,wBAAwB;IAC/B,MAAM,iCAAiC;IACvC,MAAM,0CAA0C;IAChD,UAAU,qCAAqC;IAC/C,OAAO,kCAAkC;CAC1C;AAED,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAEhE,eAAO,MAAM,cAAc;;;;;2BAaF,cAAc,KAAG,IAAI;CAI7C,CAAA"}
@@ -1,25 +0,0 @@
1
- import { ref as t, reactive as s } from "vue";
2
- var u = /* @__PURE__ */ ((e) => (e.Request = "Request name / type", e.Folder = "Add folder to your workspace", e.Import = "Import OpenAPI file to your workspace", e.Collection = "Add collection to your workspace", e.Variant = "Add variant to your workspace", e))(u || {});
3
- const p = () => {
4
- const e = t(
5
- "Request name / type"
6
- /* Request */
7
- ), r = t(!1);
8
- return s({
9
- open: r,
10
- tab: e,
11
- show() {
12
- r.value = !0;
13
- },
14
- hide() {
15
- r.value = !1;
16
- },
17
- activeTab(o) {
18
- e.value = o;
19
- }
20
- });
21
- };
22
- export {
23
- u as ActionModalTab,
24
- p as useActionModal
25
- };