@scalar/api-client 2.1.10 → 2.1.12

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 (113) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBarServer.vue.js +18 -18
  4. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +2 -0
  5. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
  6. package/dist/components/CommandPalette/CommandActionForm.vue.js +1 -1
  7. package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +2 -0
  8. package/dist/components/CommandPalette/CommandActionInput.vue.d.ts.map +1 -1
  9. package/dist/components/CommandPalette/CommandActionInput.vue.js +27 -23
  10. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +2 -0
  11. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
  12. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +32 -31
  13. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +2 -0
  14. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
  15. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +43 -42
  16. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +2 -0
  17. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  18. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +26 -25
  19. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +2 -0
  20. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
  21. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +31 -30
  22. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +2 -0
  23. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
  24. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +35 -34
  25. package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +2 -0
  26. package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -1
  27. package/dist/components/CommandPalette/CommandPaletteTag.vue.js +28 -27
  28. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +2 -0
  29. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -1
  30. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +18 -17
  31. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +14 -0
  32. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  33. package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
  34. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +112 -103
  35. package/dist/components/DataTable/DataTableInput.vue.js +2 -2
  36. package/dist/components/ImportCollection/DropEventListener.vue.d.ts +7 -0
  37. package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -0
  38. package/dist/components/ImportCollection/DropEventListener.vue.js +75 -0
  39. package/dist/components/ImportCollection/DropEventListener.vue2.js +4 -0
  40. package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts +12 -0
  41. package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts.map +1 -0
  42. package/dist/components/ImportCollection/ImportCollectionListener.vue.js +30 -0
  43. package/dist/components/ImportCollection/ImportCollectionListener.vue2.js +4 -0
  44. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +20 -0
  45. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -0
  46. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +101 -0
  47. package/dist/components/ImportCollection/ImportCollectionModal.vue2.js +4 -0
  48. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts +22 -0
  49. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -0
  50. package/dist/components/ImportCollection/ImportNowButton.vue.js +85 -0
  51. package/dist/components/ImportCollection/ImportNowButton.vue2.js +4 -0
  52. package/dist/components/ImportCollection/OpenAppButton.vue.d.ts +16 -0
  53. package/dist/components/ImportCollection/OpenAppButton.vue.d.ts.map +1 -0
  54. package/dist/components/ImportCollection/OperationBadge.vue.d.ts +19 -0
  55. package/dist/components/ImportCollection/OperationBadge.vue.d.ts.map +1 -0
  56. package/dist/components/ImportCollection/PasteEventListener.vue.d.ts +7 -0
  57. package/dist/components/ImportCollection/PasteEventListener.vue.d.ts.map +1 -0
  58. package/dist/components/ImportCollection/PasteEventListener.vue.js +24 -0
  59. package/dist/components/ImportCollection/PasteEventListener.vue2.js +4 -0
  60. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +7 -0
  61. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts.map +1 -0
  62. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +15 -0
  63. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue2.js +4 -0
  64. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +28 -0
  65. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -0
  66. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +55 -0
  67. package/dist/components/ImportCollection/index.d.ts +2 -0
  68. package/dist/components/ImportCollection/index.d.ts.map +1 -0
  69. package/dist/components/ImportCollection/index.js +4 -0
  70. package/dist/components/ImportCollection/utils/getOpenApiDocumentVersion.d.ts +5 -0
  71. package/dist/components/ImportCollection/utils/getOpenApiDocumentVersion.d.ts.map +1 -0
  72. package/dist/components/ImportCollection/utils/getOpenApiDocumentVersion.js +20 -0
  73. package/dist/components/ImportCollection/utils/isDocument.d.ts +3 -0
  74. package/dist/components/ImportCollection/utils/isDocument.d.ts.map +1 -0
  75. package/dist/components/ImportCollection/utils/isDocument.js +7 -0
  76. package/dist/components/ImportCollection/utils/isUrl.d.ts +3 -0
  77. package/dist/components/ImportCollection/utils/isUrl.d.ts.map +1 -0
  78. package/dist/components/ImportCollection/utils/isUrl.js +6 -0
  79. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +1 -1
  80. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  81. package/dist/layouts/App/create-api-client-app.d.ts +129 -2
  82. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  83. package/dist/layouts/Modal/create-api-client-modal.d.ts +258 -4
  84. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  85. package/dist/libs/create-client.d.ts +130 -2
  86. package/dist/libs/create-client.d.ts.map +1 -1
  87. package/dist/libs/create-client.js +54 -41
  88. package/dist/libs/send-request.d.ts +37 -1
  89. package/dist/libs/send-request.d.ts.map +1 -1
  90. package/dist/libs/send-request.js +24 -19
  91. package/dist/router.js +1 -1
  92. package/dist/store/import-spec.d.ts +128 -2
  93. package/dist/store/import-spec.d.ts.map +1 -1
  94. package/dist/store/import-spec.js +24 -23
  95. package/dist/store/store.d.ts +256 -4
  96. package/dist/store/store.d.ts.map +1 -1
  97. package/dist/style.css +1 -1
  98. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  99. package/dist/views/Request/Request.vue.js +1 -1
  100. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  101. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  102. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +82 -88
  103. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  104. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  105. package/dist/views/Request/RequestSidebar.vue2.js +106 -97
  106. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  107. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  108. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +26 -26
  109. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  110. package/dist/views/Request/components/WorkspaceDropdown.vue.js +39 -39
  111. package/package.json +13 -8
  112. package/dist/views/Components/Schemas/Schemas.vue.d.ts +0 -3
  113. package/dist/views/Components/Schemas/Schemas.vue.d.ts.map +0 -1
@@ -8,7 +8,9 @@ export default _default;
8
8
  export declare const PaletteComponents: {
9
9
  readonly 'Import Collection': import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
10
  close: () => void;
11
+ back: (e: KeyboardEvent) => void;
11
12
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
13
+ onBack?: ((e: KeyboardEvent) => any) | undefined;
12
14
  onClose?: (() => any) | undefined;
13
15
  }, {}, {}>;
14
16
  readonly 'Create Request': import("vue").DefineComponent<{
@@ -20,6 +22,7 @@ export declare const PaletteComponents: {
20
22
  };
21
23
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
24
  close: () => void;
25
+ back: (e: KeyboardEvent) => void;
23
26
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
24
27
  metaData: {
25
28
  type: import("vue").PropType<{
@@ -28,26 +31,35 @@ export declare const PaletteComponents: {
28
31
  }>;
29
32
  };
30
33
  }>> & {
34
+ onBack?: ((e: KeyboardEvent) => any) | undefined;
31
35
  onClose?: (() => any) | undefined;
32
36
  }, {}, {}>;
33
37
  readonly 'Create Workspace': import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
34
38
  close: () => void;
39
+ back: (e: KeyboardEvent) => void;
35
40
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
41
+ onBack?: ((e: KeyboardEvent) => any) | undefined;
36
42
  onClose?: (() => any) | undefined;
37
43
  }, {}, {}>;
38
44
  readonly 'Add Tag': import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
39
45
  close: () => void;
46
+ back: (e: KeyboardEvent) => void;
40
47
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
48
+ onBack?: ((e: KeyboardEvent) => any) | undefined;
41
49
  onClose?: (() => any) | undefined;
42
50
  }, {}, {}>;
43
51
  readonly 'Add Server': import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
44
52
  close: () => void;
53
+ back: (e: KeyboardEvent) => void;
45
54
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
55
+ onBack?: ((e: KeyboardEvent) => any) | undefined;
46
56
  onClose?: (() => any) | undefined;
47
57
  }, {}, {}>;
48
58
  readonly 'Create Collection': import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
49
59
  close: () => void;
60
+ back: (e: KeyboardEvent) => void;
50
61
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
62
+ onBack?: ((e: KeyboardEvent) => any) | undefined;
51
63
  onClose?: (() => any) | undefined;
52
64
  }, {}, {}>;
53
65
  readonly 'Add Example': import("vue").DefineComponent<{
@@ -58,6 +70,7 @@ export declare const PaletteComponents: {
58
70
  };
59
71
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
60
72
  close: () => void;
73
+ back: (e: KeyboardEvent) => void;
61
74
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
62
75
  metaData: {
63
76
  type: import("vue").PropType<{
@@ -65,6 +78,7 @@ export declare const PaletteComponents: {
65
78
  }>;
66
79
  };
67
80
  }>> & {
81
+ onBack?: ((e: KeyboardEvent) => any) | undefined;
68
82
  onClose?: (() => any) | undefined;
69
83
  }, {}, {}>;
70
84
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AAiXA;;;;GAIG;;AACH,wBAkZI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQpB,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":"AAoYA;;;;GAIG;;AACH,wBAubI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQpB,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CACxD"}
@@ -1,9 +1,9 @@
1
1
  import o from "./TheCommandPalette.vue2.js";
2
- import { PaletteComponents as f } from "./TheCommandPalette.vue2.js";
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 r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cc61a404"]]);
5
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c08d90be"]]);
6
6
  export {
7
- f as PaletteComponents,
8
- r as default
7
+ s as PaletteComponents,
8
+ a as default
9
9
  };
@@ -1,33 +1,33 @@
1
- import { defineComponent as q, ref as i, computed as K, onMounted as F, onBeforeUnmount as H, openBlock as a, createElementBlock as l, Fragment as u, withDirectives as C, createElementVNode as r, vShow as b, unref as p, createVNode as x, withKeys as w, withModifiers as y, vModelText as U, renderList as M, toDisplayString as P, normalizeClass as G, createTextVNode as Q, createCommentVNode as j, createBlock as J, resolveDynamicComponent as O, nextTick as X } from "vue";
2
- import { useModal as Y, ScalarIcon as g } from "@scalar/components";
3
- import { useRouter as Z } from "vue-router";
4
- import ee from "./CommandPaletteCollection.vue.js";
5
- import oe from "./CommandPaletteExample.vue.js";
6
- import te from "./CommandPaletteImport.vue.js";
7
- import ne from "./CommandPaletteRequest.vue.js";
8
- import ae from "./CommandPaletteServer.vue.js";
9
- import le from "./CommandPaletteTag.vue.js";
10
- import se from "./CommandPaletteWorkspace.vue.js";
11
- import { commandPaletteBus as T } from "../../libs/event-busses/command-palette-bus.js";
12
- import { useWorkspace as re } from "../../store/store.js";
13
- import { hotKeyBus as V } from "../../libs/event-busses/hot-keys-bus.js";
14
- const me = { class: "commandmenu" }, ce = { class: "bg-b-2 flex items-center rounded mb-2 pl-2 focus-within:bg-b-1 focus-within:shadow-border" }, ie = { for: "commandmenu" }, ue = ["onKeydown"], de = ["onClick"], pe = {
1
+ import { defineComponent as F, ref as u, computed as P, watch as U, onMounted as G, onBeforeUnmount as Q, openBlock as a, createElementBlock as r, Fragment as d, withDirectives as h, createElementVNode as m, vShow as w, unref as f, createVNode as y, withKeys as g, withModifiers as S, vModelText as j, renderList as K, toDisplayString as M, normalizeClass as J, createTextVNode as O, createCommentVNode as X, createBlock as Y, resolveDynamicComponent as Z, mergeProps as ee, nextTick as T } from "vue";
2
+ import { useModal as oe, ScalarIcon as $ } from "@scalar/components";
3
+ import { useRouter as te } from "vue-router";
4
+ import ne from "./CommandPaletteCollection.vue.js";
5
+ import ae from "./CommandPaletteExample.vue.js";
6
+ import le from "./CommandPaletteImport.vue.js";
7
+ import se from "./CommandPaletteRequest.vue.js";
8
+ import re from "./CommandPaletteServer.vue.js";
9
+ import me from "./CommandPaletteTag.vue.js";
10
+ import ce from "./CommandPaletteWorkspace.vue.js";
11
+ import { commandPaletteBus as V } from "../../libs/event-busses/command-palette-bus.js";
12
+ import { useWorkspace as ie } from "../../store/store.js";
13
+ import { hotKeyBus as W } from "../../libs/event-busses/hot-keys-bus.js";
14
+ const ue = { class: "commandmenu custom-scroll" }, de = { class: "bg-b-2 flex items-center rounded-md mb-2.5 pl-2 focus-within:bg-b-1 focus-within:shadow-border" }, fe = { for: "commandmenu" }, pe = ["onKeydown"], ve = ["onClick"], Ce = {
15
15
  key: 0,
16
16
  class: "text-c-3 text-center text-sm p-2 pt-3"
17
- }, fe = {
17
+ }, he = {
18
18
  name: "TheCommandPalette"
19
- }, ve = {
20
- "Import Collection": te,
21
- "Create Request": ne,
22
- "Create Workspace": se,
23
- "Add Tag": le,
24
- "Add Server": ae,
25
- "Create Collection": ee,
26
- "Add Example": oe
27
- }, Le = /* @__PURE__ */ q({
28
- ...fe,
29
- setup(Ce) {
30
- const S = [
19
+ }, ke = {
20
+ "Import Collection": le,
21
+ "Create Request": se,
22
+ "Create Workspace": ce,
23
+ "Add Tag": me,
24
+ "Add Server": re,
25
+ "Create Collection": ne,
26
+ "Add Example": ae
27
+ }, Ie = /* @__PURE__ */ F({
28
+ ...he,
29
+ setup(be) {
30
+ const A = [
31
31
  {
32
32
  label: "Add to Request Sidebar",
33
33
  commands: [
@@ -76,143 +76,152 @@ const me = { class: "commandmenu" }, ce = { class: "bg-b-2 flex items-center rou
76
76
  }
77
77
  ]
78
78
  }
79
- ], m = Y(), { push: W } = Z(), { activeWorkspace: z } = re(), $ = i(), c = i(""), s = i(null), d = i(-1), A = i([]), h = K(
80
- () => S.reduce((t, o) => {
81
- const e = o.commands.filter(
82
- (n) => n.name.toLowerCase().includes(c.value.toLowerCase())
79
+ ], c = oe(), { push: z } = te(), { activeWorkspace: N } = ie(), k = u(), l = u(""), s = u(null), i = u(-1), R = u([]), p = P(
80
+ () => A.reduce((e, o) => {
81
+ const t = o.commands.filter(
82
+ (n) => n.name.toLowerCase().includes(l.value.toLowerCase())
83
83
  );
84
- return [...t, ...e];
84
+ return [...e, ...t];
85
85
  }, [])
86
- ), f = () => {
87
- m.hide(), c.value = "", s.value = null, d.value = -1;
88
- }, R = (t) => {
89
- "path" in t ? (W(`/workspace/${z.value.uid}${t.path}`), f()) : s.value = t.name;
90
- }, D = i(), L = ({
91
- commandName: t,
86
+ ), v = () => {
87
+ c.hide(), l.value = "", s.value = null, i.value = -1;
88
+ }, q = (e) => {
89
+ l.value !== "" && (e == null || e.preventDefault()), s.value = null, T(() => {
90
+ var o;
91
+ return (o = b.value) == null ? void 0 : o.focus();
92
+ });
93
+ }, D = (e) => {
94
+ "path" in e ? (z(`/workspace/${N.value.uid}${e.path}`), v()) : s.value = e.name;
95
+ }, b = u(), L = ({
96
+ commandName: e,
92
97
  metaData: o
93
98
  } = {}) => {
94
- s.value = t ?? null, $.value = o, m.show(), X(() => {
95
- var e;
96
- return (e = D.value) == null ? void 0 : e.focus();
99
+ s.value = e ?? null, k.value = o, c.show(), T(() => {
100
+ var t;
101
+ return (t = b.value) == null ? void 0 : t.focus();
97
102
  });
98
- }, B = (t, o) => {
99
- var v;
100
- if (!m.open) return;
103
+ };
104
+ U(l, (e) => {
105
+ e && p.value.length > 0 && (i.value = 0);
106
+ });
107
+ const B = (e, o) => {
108
+ var C;
109
+ if (!c.open) return;
101
110
  o.preventDefault();
102
- const e = t === "up" ? -1 : 1, n = h.value.length;
103
- d.value = (d.value + e + n) % n, (v = A.value[d.value]) == null || v.scrollIntoView({
111
+ const t = e === "up" ? -1 : 1, n = p.value.length;
112
+ i.value = (i.value + t + n) % n, (C = R.value[i.value]) == null || C.scrollIntoView({
104
113
  behavior: "smooth",
105
- block: "center"
114
+ block: "nearest"
106
115
  });
107
- }, k = K(
108
- () => h.value[d.value]
109
- ), N = (t) => {
110
- !k.value || s.value || (t.preventDefault(), t.stopPropagation(), R(k.value));
111
- }, E = (t) => {
112
- m.open && t.closeModal && f();
116
+ }, x = P(
117
+ () => p.value[i.value]
118
+ ), H = (e) => {
119
+ !x.value || s.value || (e.preventDefault(), e.stopPropagation(), D(x.value));
120
+ }, E = (e) => {
121
+ c.open && e.closeModal && v();
113
122
  };
114
- return F(() => {
115
- T.on(L), V.on(E);
116
- }), H(() => {
117
- T.off(L), V.off(E);
118
- }), (t, o) => (a(), l(u, null, [
119
- C(r("div", {
123
+ return G(() => {
124
+ V.on(L), W.on(E);
125
+ }), Q(() => {
126
+ V.off(L), W.off(E);
127
+ }), (e, o) => (a(), r(d, null, [
128
+ h(m("div", {
120
129
  class: "commandmenu-clickout",
121
- onClick: o[0] || (o[0] = (e) => f())
130
+ onClick: o[0] || (o[0] = (t) => v())
122
131
  }, null, 512), [
123
- [b, p(m).open]
132
+ [w, f(c).open]
124
133
  ]),
125
- C(r("div", me, [
126
- s.value ? (a(), l(u, { key: 1 }, [
127
- r("button", {
134
+ h(m("div", ue, [
135
+ s.value ? (a(), r(d, { key: 1 }, [
136
+ m("button", {
128
137
  class: "absolute p-0.75 hover:bg-b-3 rounded text-c-3 active:text-c-1 mr-1.5 my-1.5 z-10",
129
138
  type: "button",
130
- onClick: o[4] || (o[4] = (e) => s.value = null)
139
+ onClick: o[4] || (o[4] = (t) => s.value = null)
131
140
  }, [
132
- x(p(g), {
141
+ y(f($), {
133
142
  icon: "ChevronLeft",
134
143
  size: "md",
135
144
  thickness: "1.5"
136
145
  })
137
146
  ]),
138
- (a(), J(O(ve[s.value]), {
139
- metaData: $.value,
140
- onClose: f
141
- }, null, 40, ["metaData"]))
142
- ], 64)) : (a(), l(u, { key: 0 }, [
143
- r("div", ce, [
144
- r("label", ie, [
145
- x(p(g), {
147
+ (a(), Y(Z(ke[s.value]), ee(k.value ? { metaData: k.value } : {}, {
148
+ onBack: o[5] || (o[5] = (t) => q(t)),
149
+ onClose: v
150
+ }), null, 16))
151
+ ], 64)) : (a(), r(d, { key: 0 }, [
152
+ m("div", de, [
153
+ m("label", fe, [
154
+ y(f($), {
146
155
  class: "text-c-1 mr-2.5",
147
156
  icon: "Search",
148
157
  size: "sm",
149
158
  thickness: "1.5"
150
159
  })
151
160
  ]),
152
- C(r("input", {
161
+ h(m("input", {
153
162
  id: "commandmenu",
154
163
  ref_key: "commandInputRef",
155
- ref: D,
156
- "onUpdate:modelValue": o[1] || (o[1] = (e) => c.value = e),
164
+ ref: b,
165
+ "onUpdate:modelValue": o[1] || (o[1] = (t) => l.value = t),
157
166
  autocomplete: "off",
158
167
  autofocus: "",
159
168
  class: "w-full rounded bg-none border-none py-1.5 text-sm focus:outline-none",
160
169
  placeholder: "Search commands...",
161
170
  type: "text",
162
171
  onKeydown: [
163
- o[2] || (o[2] = w(y((e) => B("down", e), ["stop"]), ["down"])),
164
- w(y(N, ["stop"]), ["enter"]),
165
- o[3] || (o[3] = w(y((e) => B("up", e), ["stop"]), ["up"]))
172
+ o[2] || (o[2] = g(S((t) => B("down", t), ["stop"]), ["down"])),
173
+ g(S(H, ["stop"]), ["enter"]),
174
+ o[3] || (o[3] = g(S((t) => B("up", t), ["stop"]), ["up"]))
166
175
  ]
167
- }, null, 40, ue), [
168
- [U, c.value]
176
+ }, null, 40, pe), [
177
+ [j, l.value]
169
178
  ])
170
179
  ]),
171
- (a(), l(u, null, M(S, (e) => (a(), l(u, {
172
- key: e.label
180
+ (a(), r(d, null, K(A, (t) => (a(), r(d, {
181
+ key: t.label
173
182
  }, [
174
- C(r("div", { class: "text-c-3 font-medium text-xs mt-2" }, P(e.label), 513), [
183
+ h(m("div", { class: "text-c-3 font-medium text-xs px-2 mb-1 mt-2" }, M(t.label), 513), [
175
184
  [
176
- b,
177
- e.commands.filter(
178
- (n) => n.name.toLowerCase().includes(c.value.toLowerCase())
185
+ w,
186
+ t.commands.filter(
187
+ (n) => n.name.toLowerCase().includes(l.value.toLowerCase())
179
188
  ).length > 0
180
189
  ]
181
190
  ]),
182
- (a(!0), l(u, null, M(e.commands.filter(
183
- (n) => n.name.toLowerCase().includes(c.value.toLowerCase())
184
- ), (n, v) => {
191
+ (a(!0), r(d, null, K(t.commands.filter(
192
+ (n) => n.name.toLowerCase().includes(l.value.toLowerCase())
193
+ ), (n, C) => {
185
194
  var I;
186
- return a(), l("div", {
195
+ return a(), r("div", {
187
196
  key: n.name,
188
197
  ref_for: !0,
189
198
  ref: (_) => {
190
- _ && (A.value[v] = _);
199
+ _ && (R.value[C] = _);
191
200
  },
192
- class: G(["commandmenu-item text-sm flex items-center py-1.5 px-2 rounded hover:bg-b-2 cursor-pointer", {
193
- "bg-b-2": n.name === ((I = k.value) == null ? void 0 : I.name)
201
+ class: J(["commandmenu-item text-sm flex items-center py-1.5 px-2 rounded hover:bg-b-2 cursor-pointer", {
202
+ "bg-b-2": n.name === ((I = x.value) == null ? void 0 : I.name)
194
203
  }]),
195
- onClick: (_) => R(n)
204
+ onClick: (_) => D(n)
196
205
  }, [
197
- x(p(g), {
206
+ y(f($), {
198
207
  class: "text-c-1 mr-2.5",
199
208
  icon: n.icon,
200
209
  size: "md",
201
210
  thickness: "1.5"
202
211
  }, null, 8, ["icon"]),
203
- Q(" " + P(n.name), 1)
204
- ], 10, de);
212
+ O(" " + M(n.name), 1)
213
+ ], 10, ve);
205
214
  }), 128))
206
215
  ], 64))), 64)),
207
- h.value.length ? j("", !0) : (a(), l("div", pe, " No commands found "))
216
+ p.value.length ? X("", !0) : (a(), r("div", Ce, " No commands found "))
208
217
  ], 64))
209
218
  ], 512), [
210
- [b, p(m).open]
219
+ [w, f(c).open]
211
220
  ])
212
221
  ], 64));
213
222
  }
214
223
  });
215
224
  export {
216
- ve as PaletteComponents,
217
- Le as default
225
+ ke as PaletteComponents,
226
+ Ie as default
218
227
  };
@@ -1,7 +1,7 @@
1
1
  import t from "./DataTableInput.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-b93b9304"]]);
4
+ const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-04bdd5dd"]]);
5
5
  export {
6
- m as default
6
+ r as default
7
7
  };
@@ -0,0 +1,7 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
2
+ input: (value: string) => void;
3
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
4
+ onInput?: ((value: string) => any) | undefined;
5
+ }, {}, {}>;
6
+ export default _default;
7
+ //# sourceMappingURL=DropEventListener.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropEventListener.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/DropEventListener.vue"],"names":[],"mappings":";;;;;AA4SA,wBAMG"}
@@ -0,0 +1,75 @@
1
+ import { defineComponent as v, ref as g, onMounted as h, onBeforeUnmount as y, openBlock as m, createBlock as _, Transition as x, withCtx as D, createElementBlock as E, createElementVNode as s, createVNode as L, unref as T, createCommentVNode as C } from "vue";
2
+ import { ScalarIcon as b } from "@scalar/components";
3
+ const k = {
4
+ key: 0,
5
+ class: "fixed bottom-10 right-10 w-64 h-64 bg-b-2 z-50 rounded-xl border transition-opacity duration-200"
6
+ }, w = { class: "flex flex-col items-center justify-center h-full" }, A = /* @__PURE__ */ s("div", { class: "text-center text-c-1 m-4" }, " Drop your OpenAPI document here ", -1), j = /* @__PURE__ */ v({
7
+ __name: "DropEventListener",
8
+ emits: ["input"],
9
+ setup(B, { emit: p }) {
10
+ const d = p, r = g(!1);
11
+ let o = 0;
12
+ h(() => {
13
+ document.addEventListener("dragenter", f), document.addEventListener("dragleave", u), document.addEventListener("dragover", c), document.addEventListener("drop", l);
14
+ }), y(() => {
15
+ document.removeEventListener("dragenter", f), document.removeEventListener("dragover", c), document.removeEventListener("dragleave", u), document.removeEventListener("drop", l);
16
+ });
17
+ async function l(e) {
18
+ if (e.preventDefault(), r.value = !1, o = 0, e.dataTransfer) {
19
+ const n = e.dataTransfer.getData("text").replace(/^blob:/, "");
20
+ if (n)
21
+ d("input", n);
22
+ else if (e.dataTransfer.files.length > 0) {
23
+ const a = e.dataTransfer.files[0], t = new FileReader();
24
+ t.onload = async (i) => {
25
+ i.target && typeof i.target.result == "string" && d("input", i.target.result);
26
+ }, t.readAsText(a);
27
+ }
28
+ }
29
+ }
30
+ function c(e) {
31
+ e.preventDefault();
32
+ }
33
+ function u(e) {
34
+ e.preventDefault(), o--, o === 0 && (r.value = !1);
35
+ }
36
+ function f(e) {
37
+ if (e.preventDefault(), o++, e.dataTransfer) {
38
+ const n = e.dataTransfer.items;
39
+ for (let a = 0; a < n.length; a++) {
40
+ const t = n[a];
41
+ if (t.kind === "string" || t.type.includes("json") || t.type.includes("yml") || t.type.includes("yaml")) {
42
+ r.value = !0;
43
+ return;
44
+ }
45
+ }
46
+ }
47
+ r.value = !1;
48
+ }
49
+ return (e, n) => (m(), _(x, {
50
+ enterActiveClass: "transition-opacity duration-200",
51
+ enterFromClass: "opacity-0",
52
+ leaveActiveClass: "transition-opacity duration-200",
53
+ leaveToClass: "opacity-0"
54
+ }, {
55
+ default: D(() => [
56
+ r.value ? (m(), E("div", k, [
57
+ s("div", w, [
58
+ s("div", null, [
59
+ L(T(b), {
60
+ icon: "Download",
61
+ size: "xl",
62
+ thickness: "2"
63
+ })
64
+ ]),
65
+ A
66
+ ])
67
+ ])) : C("", !0)
68
+ ]),
69
+ _: 1
70
+ }));
71
+ }
72
+ });
73
+ export {
74
+ j as default
75
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./DropEventListener.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,12 @@
1
+ declare function __VLS_template(): {
2
+ default?(_: {}): any;
3
+ };
4
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
5
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
6
+ export default _default;
7
+ type __VLS_WithTemplateSlots<T, S> = T & {
8
+ new (): {
9
+ $slots: S;
10
+ };
11
+ };
12
+ //# sourceMappingURL=ImportCollectionListener.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImportCollectionListener.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportCollectionListener.vue"],"names":[],"mappings":"AAyEA,iBAAS,cAAc;qBA4GO,GAAG;EAoBhC;AACD,QAAA,MAAM,eAAe,0NAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { defineComponent as a, ref as c, openBlock as l, createElementBlock as m, Fragment as u, createVNode as n, renderSlot as i, nextTick as s } from "vue";
2
+ import p from "./DropEventListener.vue.js";
3
+ import f from "./ImportCollectionModal.vue.js";
4
+ import _ from "./PasteEventListener.vue.js";
5
+ import d from "./UrlQueryParameterChecker.vue.js";
6
+ const y = /* @__PURE__ */ a({
7
+ __name: "ImportCollectionListener",
8
+ setup(I) {
9
+ const e = c(null);
10
+ async function r() {
11
+ e.value = null, await s();
12
+ }
13
+ async function o(t) {
14
+ await r(), e.value = t;
15
+ }
16
+ return (t, $) => (l(), m(u, null, [
17
+ n(f, {
18
+ source: e.value,
19
+ onImportFinished: r
20
+ }, null, 8, ["source"]),
21
+ n(_, { onInput: o }),
22
+ n(p, { onInput: o }),
23
+ n(d, { onInput: o }),
24
+ i(t.$slots, "default")
25
+ ], 64));
26
+ }
27
+ });
28
+ export {
29
+ y as default
30
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ImportCollectionListener.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,20 @@
1
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
2
+ source: string | null;
3
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
+ importFinished: () => void;
5
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
6
+ source: string | null;
7
+ }>>> & {
8
+ onImportFinished?: (() => any) | undefined;
9
+ }, {}, {}>;
10
+ export default _default;
11
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
12
+ type __VLS_TypePropsToOption<T> = {
13
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
14
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
15
+ } : {
16
+ type: import('vue').PropType<T[K]>;
17
+ required: true;
18
+ };
19
+ };
20
+ //# sourceMappingURL=ImportCollectionModal.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImportCollectionModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportCollectionModal.vue"],"names":[],"mappings":";YAyKU,MAAM,GAAG,IAAI;;;;YAAb,MAAM,GAAG,IAAI;;;;AAwQvB,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"}