@scalar/api-client 2.1.11 → 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 (103) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +2 -0
  3. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
  4. package/dist/components/CommandPalette/CommandActionForm.vue.js +1 -1
  5. package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +2 -0
  6. package/dist/components/CommandPalette/CommandActionInput.vue.d.ts.map +1 -1
  7. package/dist/components/CommandPalette/CommandActionInput.vue.js +27 -23
  8. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +2 -0
  9. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
  10. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +32 -31
  11. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +2 -0
  12. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
  13. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +43 -42
  14. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +2 -0
  15. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  16. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +26 -25
  17. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +2 -0
  18. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
  19. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +31 -30
  20. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +2 -0
  21. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
  22. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +35 -34
  23. package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +2 -0
  24. package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -1
  25. package/dist/components/CommandPalette/CommandPaletteTag.vue.js +28 -27
  26. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +2 -0
  27. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -1
  28. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +18 -17
  29. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +14 -0
  30. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  31. package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
  32. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +112 -103
  33. package/dist/components/DataTable/DataTableInput.vue.js +2 -2
  34. package/dist/components/ImportCollection/DropEventListener.vue.d.ts +7 -0
  35. package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -0
  36. package/dist/components/ImportCollection/DropEventListener.vue.js +75 -0
  37. package/dist/components/ImportCollection/DropEventListener.vue2.js +4 -0
  38. package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts +12 -0
  39. package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts.map +1 -0
  40. package/dist/components/ImportCollection/ImportCollectionListener.vue.js +30 -0
  41. package/dist/components/ImportCollection/ImportCollectionListener.vue2.js +4 -0
  42. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +20 -0
  43. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -0
  44. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +101 -0
  45. package/dist/components/ImportCollection/ImportCollectionModal.vue2.js +4 -0
  46. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts +22 -0
  47. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -0
  48. package/dist/components/ImportCollection/ImportNowButton.vue.js +85 -0
  49. package/dist/components/ImportCollection/ImportNowButton.vue2.js +4 -0
  50. package/dist/components/ImportCollection/OpenAppButton.vue.d.ts +16 -0
  51. package/dist/components/ImportCollection/OpenAppButton.vue.d.ts.map +1 -0
  52. package/dist/components/ImportCollection/OperationBadge.vue.d.ts +19 -0
  53. package/dist/components/ImportCollection/OperationBadge.vue.d.ts.map +1 -0
  54. package/dist/components/ImportCollection/PasteEventListener.vue.d.ts +7 -0
  55. package/dist/components/ImportCollection/PasteEventListener.vue.d.ts.map +1 -0
  56. package/dist/components/ImportCollection/PasteEventListener.vue.js +24 -0
  57. package/dist/components/ImportCollection/PasteEventListener.vue2.js +4 -0
  58. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +7 -0
  59. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts.map +1 -0
  60. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +15 -0
  61. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue2.js +4 -0
  62. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +28 -0
  63. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -0
  64. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +55 -0
  65. package/dist/components/ImportCollection/index.d.ts +2 -0
  66. package/dist/components/ImportCollection/index.d.ts.map +1 -0
  67. package/dist/components/ImportCollection/index.js +4 -0
  68. package/dist/components/ImportCollection/utils/getOpenApiDocumentVersion.d.ts +5 -0
  69. package/dist/components/ImportCollection/utils/getOpenApiDocumentVersion.d.ts.map +1 -0
  70. package/dist/components/ImportCollection/utils/getOpenApiDocumentVersion.js +20 -0
  71. package/dist/components/ImportCollection/utils/isDocument.d.ts +3 -0
  72. package/dist/components/ImportCollection/utils/isDocument.d.ts.map +1 -0
  73. package/dist/components/ImportCollection/utils/isDocument.js +7 -0
  74. package/dist/components/ImportCollection/utils/isUrl.d.ts +3 -0
  75. package/dist/components/ImportCollection/utils/isUrl.d.ts.map +1 -0
  76. package/dist/components/ImportCollection/utils/isUrl.js +6 -0
  77. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +1 -1
  78. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  79. package/dist/layouts/App/create-api-client-app.d.ts +129 -2
  80. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  81. package/dist/layouts/Modal/create-api-client-modal.d.ts +258 -4
  82. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  83. package/dist/libs/create-client.d.ts +130 -2
  84. package/dist/libs/create-client.d.ts.map +1 -1
  85. package/dist/libs/create-client.js +54 -41
  86. package/dist/libs/send-request.d.ts +37 -1
  87. package/dist/libs/send-request.d.ts.map +1 -1
  88. package/dist/libs/send-request.js +24 -19
  89. package/dist/store/import-spec.d.ts +128 -2
  90. package/dist/store/import-spec.d.ts.map +1 -1
  91. package/dist/store/import-spec.js +24 -23
  92. package/dist/store/store.d.ts +256 -4
  93. package/dist/store/store.d.ts.map +1 -1
  94. package/dist/style.css +1 -1
  95. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  96. package/dist/views/Request/Request.vue.js +1 -1
  97. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  98. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  99. package/dist/views/Request/RequestSidebar.vue2.js +14 -14
  100. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  101. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  102. package/dist/views/Request/components/WorkspaceDropdown.vue.js +39 -39
  103. package/package.json +14 -9
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.1.12
4
+
5
+ ### Patch Changes
6
+
7
+ - 3ded00b: fix(api-references): sync selected server state with api client modal
8
+ - aa39741: fix: header names can have leading/trailing whitespaces
9
+ - 07b5439: feat: enhances command palette navigation and style
10
+ - 513e0ad: feat: add import modal
11
+ - 4a78aae: fix: uppercase method on request send
12
+ - Updated dependencies [513e0ad]
13
+ - Updated dependencies [8f12149]
14
+ - Updated dependencies [5127a37]
15
+ - Updated dependencies [1026d81]
16
+ - Updated dependencies [983a5e4]
17
+ - Updated dependencies [aee166c]
18
+ - Updated dependencies [07b5439]
19
+ - Updated dependencies [ef49617]
20
+ - @scalar/components@0.12.50
21
+ - @scalar/types@0.0.12
22
+ - @scalar/themes@0.9.33
23
+ - @scalar/openapi-parser@0.8.5
24
+ - @scalar/oas-utils@0.2.51
25
+ - @scalar/use-codemirror@0.11.16
26
+
3
27
  ## 2.1.11
4
28
 
5
29
  ### Patch Changes
@@ -8,11 +8,13 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOp
8
8
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
9
  submit: () => void;
10
10
  cancel: () => void;
11
+ back: (e: KeyboardEvent) => void;
11
12
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
12
13
  disabled?: boolean;
13
14
  }>>> & {
14
15
  onSubmit?: (() => any) | undefined;
15
16
  onCancel?: (() => any) | undefined;
17
+ onBack?: ((e: KeyboardEvent) => any) | undefined;
16
18
  }, {}, {}>;
17
19
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
18
20
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"CommandActionForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandActionForm.vue"],"names":[],"mappings":"AAuDA,iBAAS,cAAc;qBA8DM,GAAG;qBACH,GAAG;oBACJ,GAAG;EAgB9B;AACD,QAAA,MAAM,eAAe;eAhGR,OAAO;;;;;eAAP,OAAO;;;;UAuGlB,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;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":"CommandActionForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandActionForm.vue"],"names":[],"mappings":"AAyDA,iBAAS,cAAc;qBA8DM,GAAG;qBACH,GAAG;oBACJ,GAAG;EAgB9B;AACD,QAAA,MAAM,eAAe;eAjGR,OAAO;;;;;;eAAP,OAAO;;;;;UAwGlB,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;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"}
@@ -5,7 +5,7 @@ const c = { class: "gap-3 rounded min-h-20 relative" }, b = { class: "flex gap-2
5
5
  props: {
6
6
  disabled: { type: Boolean }
7
7
  },
8
- emits: ["submit", "cancel"],
8
+ emits: ["submit", "cancel", "back"],
9
9
  setup(h) {
10
10
  return (e, t) => (i(), a("form", {
11
11
  class: "flex w-full flex-col gap-3",
@@ -2,10 +2,12 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
2
2
  modelValue?: string;
3
3
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
4
  "update:modelValue": (v: string) => void;
5
+ onDelete: (event: KeyboardEvent) => void;
5
6
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
6
7
  modelValue?: string;
7
8
  }>>> & {
8
9
  "onUpdate:modelValue"?: ((v: string) => any) | undefined;
10
+ onOnDelete?: ((event: KeyboardEvent) => any) | undefined;
9
11
  }, {}, {}>;
10
12
  export default _default;
11
13
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1 +1 @@
1
- {"version":3,"file":"CommandActionInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandActionInput.vue"],"names":[],"mappings":";iBA8Ce,MAAM;;;;iBAAN,MAAM;;;;AA+ErB,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
+ {"version":3,"file":"CommandActionInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandActionInput.vue"],"names":[],"mappings":";iBAqDe,MAAM;;;;;iBAAN,MAAM;;;;;AA0FrB,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,42 +1,46 @@
1
- import { defineComponent as d, ref as c, onMounted as f, nextTick as _, computed as h, openBlock as V, createElementBlock as v, Fragment as y, createElementVNode as r, unref as a, withDirectives as g, mergeProps as k, vModelDynamic as x } from "vue";
2
- import { nanoid as b } from "nanoid";
3
- const w = ["for"], A = ["id"], D = /* @__PURE__ */ d({
1
+ import { defineComponent as f, ref as c, onMounted as h, nextTick as y, computed as v, openBlock as w, createElementBlock as V, Fragment as _, createElementVNode as a, unref as s, withDirectives as k, mergeProps as g, withKeys as x, withModifiers as D, vModelDynamic as b } from "vue";
2
+ import { nanoid as B } from "nanoid";
3
+ const M = ["for"], A = ["id"], K = /* @__PURE__ */ f({
4
4
  inheritAttrs: !1,
5
5
  __name: "CommandActionInput",
6
6
  props: {
7
7
  modelValue: {}
8
8
  },
9
- emits: ["update:modelValue"],
10
- setup(u, { emit: s }) {
11
- const i = u, m = s, t = b(), o = c(null);
12
- f(() => _(() => {
9
+ emits: ["update:modelValue", "onDelete"],
10
+ setup(i, { emit: d }) {
11
+ const m = i, l = d, r = B(), u = c(null);
12
+ h(() => y(() => {
13
13
  var e;
14
- return (e = o.value) == null ? void 0 : e.focus();
14
+ return (e = u.value) == null ? void 0 : e.focus();
15
15
  }));
16
- const n = h({
17
- get: () => i.modelValue ?? "",
18
- set: (e) => m("update:modelValue", e)
19
- });
20
- return (e, l) => (V(), v(y, null, [
21
- r("label", {
16
+ const o = v({
17
+ get: () => m.modelValue ?? "",
18
+ set: (e) => l("update:modelValue", e)
19
+ }), p = (e) => {
20
+ o.value === "" && l("onDelete", e);
21
+ };
22
+ return (e, t) => (w(), V(_, null, [
23
+ a("label", {
22
24
  class: "absolute w-full h-full opacity-0 cursor-text",
23
- for: a(t)
24
- }, null, 8, w),
25
- g(r("input", k({
26
- id: a(t),
25
+ for: s(r)
26
+ }, null, 8, M),
27
+ k(a("input", g({
28
+ id: s(r),
27
29
  ref_key: "input",
28
- ref: o,
29
- "onUpdate:modelValue": l[0] || (l[0] = (p) => n.value = p),
30
+ ref: u,
31
+ "onUpdate:modelValue": t[0] || (t[0] = (n) => o.value = n),
30
32
  autocomplete: "off",
31
33
  class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
32
34
  "data-form-type": "other",
33
35
  "data-lpignore": "true"
34
- }, e.$attrs), null, 16, A), [
35
- [x, n.value]
36
+ }, e.$attrs, {
37
+ onKeydown: t[1] || (t[1] = x(D((n) => p(n), ["stop"]), ["delete"]))
38
+ }), null, 16, A), [
39
+ [b, o.value]
36
40
  ])
37
41
  ], 64));
38
42
  }
39
43
  });
40
44
  export {
41
- D as default
45
+ K as default
42
46
  };
@@ -1,6 +1,8 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
2
2
  close: () => void;
3
+ back: (e: KeyboardEvent) => void;
3
4
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
5
+ onBack?: ((e: KeyboardEvent) => any) | undefined;
4
6
  onClose?: (() => any) | undefined;
5
7
  }, {}, {}>;
6
8
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"CommandPaletteCollection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteCollection.vue"],"names":[],"mappings":";;;;;AAqOA,wBAMG"}
1
+ {"version":3,"file":"CommandPaletteCollection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteCollection.vue"],"names":[],"mappings":";;;;;;;AAyPA,wBAMG"}
@@ -1,17 +1,17 @@
1
- import { defineComponent as f, ref as n, openBlock as v, createBlock as _, withCtx as o, createVNode as l, unref as i, createTextVNode as b } from "vue";
1
+ import { defineComponent as f, ref as i, openBlock as v, createBlock as b, withCtx as l, createVNode as n, unref as s, createTextVNode as _ } from "vue";
2
2
  import C from "../IconSelector.vue.js";
3
3
  import { ScalarButton as V } from "@scalar/components";
4
- import { LibraryIcon as x } from "@scalar/icons";
5
- import { useToasts as k } from "@scalar/use-toasts";
4
+ import { LibraryIcon as k } from "@scalar/icons";
5
+ import { useToasts as x } from "@scalar/use-toasts";
6
6
  import N from "./CommandActionForm.vue.js";
7
7
  import B from "./CommandActionInput.vue.js";
8
8
  import { useWorkspace as S } from "../../store/store.js";
9
- const y = /* @__PURE__ */ f({
9
+ const z = /* @__PURE__ */ f({
10
10
  __name: "CommandPaletteCollection",
11
- emits: ["close"],
12
- setup($, { emit: c }) {
13
- const s = c, { activeWorkspace: m, collectionMutators: u } = S(), e = n(""), t = n("interface-content-folder"), { toast: d } = k(), p = () => {
14
- if (!e.value) {
11
+ emits: ["close", "back"],
12
+ setup($, { emit: m }) {
13
+ const r = m, { activeWorkspace: c, collectionMutators: u } = S(), o = i(""), a = i("interface-content-folder"), { toast: d } = x(), p = () => {
14
+ if (!o.value) {
15
15
  d("Please enter a name before creating a collection.", "error");
16
16
  return;
17
17
  }
@@ -19,33 +19,33 @@ const y = /* @__PURE__ */ f({
19
19
  {
20
20
  openapi: "3.1.0",
21
21
  info: {
22
- title: e.value,
22
+ title: o.value,
23
23
  version: "0.0.1"
24
24
  },
25
- "x-scalar-icon": t.value
25
+ "x-scalar-icon": a.value
26
26
  },
27
- m.value.uid
28
- ), s("close");
27
+ c.value.uid
28
+ ), r("close");
29
29
  };
30
- return (I, a) => (v(), _(N, {
31
- disabled: !e.value.trim(),
30
+ return (I, e) => (v(), b(N, {
31
+ disabled: !o.value.trim(),
32
32
  onSubmit: p
33
33
  }, {
34
- options: o(() => [
35
- l(C, {
36
- modelValue: t.value,
37
- "onUpdate:modelValue": a[1] || (a[1] = (r) => t.value = r),
34
+ options: l(() => [
35
+ n(C, {
36
+ modelValue: a.value,
37
+ "onUpdate:modelValue": e[2] || (e[2] = (t) => a.value = t),
38
38
  placement: "bottom-start"
39
39
  }, {
40
- default: o(() => [
41
- l(i(V), {
40
+ default: l(() => [
41
+ n(s(V), {
42
42
  class: "aspect-square px-0 h-auto",
43
43
  variant: "outlined"
44
44
  }, {
45
- default: o(() => [
46
- l(i(x), {
45
+ default: l(() => [
46
+ n(s(k), {
47
47
  class: "size-4 text-c-2 stroke-2",
48
- src: t.value
48
+ src: a.value
49
49
  }, null, 8, ["src"])
50
50
  ]),
51
51
  _: 1
@@ -54,15 +54,16 @@ const y = /* @__PURE__ */ f({
54
54
  _: 1
55
55
  }, 8, ["modelValue"])
56
56
  ]),
57
- submit: o(() => [
58
- b("Create Collection")
57
+ submit: l(() => [
58
+ _("Create Collection")
59
59
  ]),
60
- default: o(() => [
61
- l(B, {
62
- modelValue: e.value,
63
- "onUpdate:modelValue": a[0] || (a[0] = (r) => e.value = r),
60
+ default: l(() => [
61
+ n(B, {
62
+ modelValue: o.value,
63
+ "onUpdate:modelValue": e[0] || (e[0] = (t) => o.value = t),
64
64
  label: "Collection Name",
65
- placeholder: "Collection Name"
65
+ placeholder: "Collection Name",
66
+ onOnDelete: e[1] || (e[1] = (t) => r("back", t))
66
67
  }, null, 8, ["modelValue"])
67
68
  ]),
68
69
  _: 1
@@ -70,5 +71,5 @@ const y = /* @__PURE__ */ f({
70
71
  }
71
72
  });
72
73
  export {
73
- y as default
74
+ z as default
74
75
  };
@@ -5,12 +5,14 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
5
5
  };
6
6
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
7
  close: () => void;
8
+ back: (e: KeyboardEvent) => void;
8
9
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
9
10
  /** The request uid to pre-select */
10
11
  metaData?: {
11
12
  itemUid: string;
12
13
  };
13
14
  }>>> & {
15
+ onBack?: ((e: KeyboardEvent) => any) | undefined;
14
16
  onClose?: (() => any) | undefined;
15
17
  }, {}, {}>;
16
18
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"CommandPaletteExample.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteExample.vue"],"names":[],"mappings":";IA+HE,oCAAoC;eACzB;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE;;;;IAD9B,oCAAoC;eACzB;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE;;;;AA6QhC,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
+ {"version":3,"file":"CommandPaletteExample.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteExample.vue"],"names":[],"mappings":";IAiIE,oCAAoC;eACzB;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE;;;;;IAD9B,oCAAoC;eACzB;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE;;;;;AA+RhC,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,4 +1,4 @@
1
- import { defineComponent as D, ref as d, openBlock as u, createBlock as f, withCtx as a, createVNode as l, unref as e, createElementVNode as v, createElementBlock as N, Fragment as V, renderList as B, createTextVNode as c, toDisplayString as x } from "vue";
1
+ import { defineComponent as y, ref as f, openBlock as u, createBlock as v, withCtx as a, createVNode as s, unref as t, createElementVNode as x, createElementBlock as N, Fragment as V, renderList as B, createTextVNode as i, toDisplayString as b } from "vue";
2
2
  import h from "../HttpMethod/HttpMethod.vue.js";
3
3
  import { ScalarDropdown as R, ScalarDropdownItem as W, ScalarButton as j, ScalarIcon as z } from "@scalar/components";
4
4
  import { useToasts as I } from "@scalar/use-toasts";
@@ -6,56 +6,56 @@ import { useRouter as M } from "vue-router";
6
6
  import P from "./CommandActionForm.vue.js";
7
7
  import T from "./CommandActionInput.vue.js";
8
8
  import { useWorkspace as U } from "../../store/store.js";
9
- const F = { class: "flex items-center gap-2" }, H = { class: "max-h-40 custom-scroll" }, Z = /* @__PURE__ */ D({
9
+ const F = { class: "flex items-center gap-2" }, H = { class: "max-h-40 custom-scroll" }, Z = /* @__PURE__ */ y({
10
10
  __name: "CommandPaletteExample",
11
11
  props: {
12
12
  metaData: {}
13
13
  },
14
- emits: ["close"],
15
- setup(_, { emit: b }) {
16
- var p;
17
- const k = _, w = b, { push: C } = M(), {
14
+ emits: ["close", "back"],
15
+ setup(k, { emit: _ }) {
16
+ var d;
17
+ const w = k, c = _, { push: C } = M(), {
18
18
  activeRequest: S,
19
- activeWorkspace: E,
20
- activeWorkspaceRequests: $,
21
- requests: m,
22
- requestExampleMutators: g
23
- } = U(), { toast: q } = I(), s = d(""), o = d(
19
+ activeWorkspace: D,
20
+ activeWorkspaceRequests: E,
21
+ requests: n,
22
+ requestExampleMutators: $
23
+ } = U(), { toast: g } = I(), r = f(""), o = f(
24
24
  // Ensure we pre-select the correct request
25
- m[((p = k.metaData) == null ? void 0 : p.itemUid) ?? ""] ?? S.value
26
- ), i = (r) => o.value = r, y = () => {
27
- if (!s.value) {
28
- q("Please enter a name before creating an example.", "error");
25
+ n[((d = w.metaData) == null ? void 0 : d.itemUid) ?? ""] ?? S.value
26
+ ), p = (m) => o.value = m, q = () => {
27
+ if (!r.value) {
28
+ g("Please enter a name before creating an example.", "error");
29
29
  return;
30
30
  }
31
- const r = g.add(
31
+ const m = $.add(
32
32
  o.value,
33
- s.value
33
+ r.value
34
34
  );
35
- r && (C(
36
- `/workspace/${E.value.uid}/request/${o.value.uid}/examples/${r.uid}`
37
- ), w("close"));
35
+ m && (C(
36
+ `/workspace/${D.value.uid}/request/${o.value.uid}/examples/${m.uid}`
37
+ ), c("close"));
38
38
  };
39
- return (r, n) => (u(), f(P, {
40
- disabled: !s.value.trim(),
41
- onSubmit: y
39
+ return (m, l) => (u(), v(P, {
40
+ disabled: !r.value.trim(),
41
+ onSubmit: q
42
42
  }, {
43
43
  options: a(() => [
44
- l(e(R), {
44
+ s(t(R), {
45
45
  placement: "bottom",
46
46
  resize: ""
47
47
  }, {
48
48
  items: a(() => [
49
- v("div", H, [
50
- (u(!0), N(V, null, B(e($), (t) => (u(), f(e(W), {
51
- key: t,
49
+ x("div", H, [
50
+ (u(!0), N(V, null, B(t(E), (e) => (u(), v(t(W), {
51
+ key: e,
52
52
  class: "flex h-7 w-full items-center justify-between px-1 pr-[26px]",
53
- onClick: (L) => i(e(m)[t])
53
+ onClick: (L) => p(t(n)[e])
54
54
  }, {
55
55
  default: a(() => [
56
- c(x(e(m)[t].summary) + " ", 1),
57
- l(h, {
58
- method: e(m)[t].method
56
+ i(b(t(n)[e].summary) + " ", 1),
57
+ s(h, {
58
+ method: t(n)[e].method
59
59
  }, null, 8, ["method"])
60
60
  ]),
61
61
  _: 2
@@ -63,18 +63,18 @@ const F = { class: "flex items-center gap-2" }, H = { class: "max-h-40 custom-sc
63
63
  ])
64
64
  ]),
65
65
  default: a(() => [
66
- l(e(j), {
66
+ s(t(j), {
67
67
  class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
68
68
  variant: "outlined",
69
- onClick: n[1] || (n[1] = (t) => i(o.value))
69
+ onClick: l[2] || (l[2] = (e) => p(o.value))
70
70
  }, {
71
71
  default: a(() => [
72
- c(x(o.value.summary) + " ", 1),
73
- v("div", F, [
74
- l(h, {
72
+ i(b(o.value.summary) + " ", 1),
73
+ x("div", F, [
74
+ s(h, {
75
75
  method: o.value.method
76
76
  }, null, 8, ["method"]),
77
- l(e(z), {
77
+ s(t(z), {
78
78
  class: "text-c-3",
79
79
  icon: "ChevronDown",
80
80
  size: "xs"
@@ -88,14 +88,15 @@ const F = { class: "flex items-center gap-2" }, H = { class: "max-h-40 custom-sc
88
88
  })
89
89
  ]),
90
90
  submit: a(() => [
91
- c("Create Example")
91
+ i("Create Example")
92
92
  ]),
93
93
  default: a(() => [
94
- l(T, {
95
- modelValue: s.value,
96
- "onUpdate:modelValue": n[0] || (n[0] = (t) => s.value = t),
94
+ s(T, {
95
+ modelValue: r.value,
96
+ "onUpdate:modelValue": l[0] || (l[0] = (e) => r.value = e),
97
97
  label: "Example Name",
98
- placeholder: "Example Name"
98
+ placeholder: "Example Name",
99
+ onOnDelete: l[1] || (l[1] = (e) => c("back", e))
99
100
  }, null, 8, ["modelValue"])
100
101
  ]),
101
102
  _: 1
@@ -1,6 +1,8 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
2
2
  close: () => void;
3
+ back: (e: KeyboardEvent) => void;
3
4
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
5
+ onBack?: ((e: KeyboardEvent) => any) | undefined;
4
6
  onClose?: (() => any) | undefined;
5
7
  }, {}, {}>;
6
8
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteImport.vue"],"names":[],"mappings":";;;;;AAyQA,wBAMG"}
1
+ {"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteImport.vue"],"names":[],"mappings":";;;;;;;AA6RA,wBAMG"}
@@ -1,54 +1,54 @@
1
- import { defineComponent as w, ref as k, openBlock as F, createBlock as y, withCtx as l, createVNode as n, unref as c, createTextVNode as p } from "vue";
2
- import { ScalarButton as C, ScalarIcon as I } from "@scalar/components";
3
- import { useToasts as U } from "@scalar/use-toasts";
4
- import b from "./CommandActionForm.vue.js";
1
+ import { defineComponent as w, ref as b, openBlock as F, createBlock as h, withCtx as l, createVNode as c, unref as i, createTextVNode as p } from "vue";
2
+ import { ScalarButton as y, ScalarIcon as C } from "@scalar/components";
3
+ import { useToasts as I } from "@scalar/use-toasts";
4
+ import U from "./CommandActionForm.vue.js";
5
5
  import V from "./CommandActionInput.vue.js";
6
6
  import { useFileDialog as R } from "../../hooks/useFileDialog.js";
7
7
  import { useWorkspace as $ } from "../../store/store.js";
8
- const W = /* @__PURE__ */ w({
8
+ const O = /* @__PURE__ */ w({
9
9
  __name: "CommandPaletteImport",
10
- emits: ["close"],
10
+ emits: ["close", "back"],
11
11
  setup(A, { emit: u }) {
12
- const i = u, { activeWorkspace: f, importSpecFile: d, importSpecFromUrl: g } = $(), t = k(""), { toast: r } = U(), { open: _ } = R({
12
+ const n = u, { activeWorkspace: f, importSpecFile: d, importSpecFromUrl: g } = $(), r = b(""), { toast: a } = I(), { open: k } = R({
13
13
  onChange: async (e) => {
14
14
  const o = e == null ? void 0 : e[0];
15
15
  if (o) {
16
- const a = new FileReader();
17
- a.onload = async (S) => {
16
+ const t = new FileReader();
17
+ t.onload = async (S) => {
18
18
  var m;
19
- const h = (m = S.target) == null ? void 0 : m.result;
19
+ const _ = (m = S.target) == null ? void 0 : m.result;
20
20
  try {
21
- await d(h, f.value.uid), r("Import successful", "info"), i("close");
21
+ await d(_, f.value.uid), a("Import successful", "info"), n("close");
22
22
  } catch (s) {
23
23
  console.error(s);
24
24
  const v = (s == null ? void 0 : s.message) || "Unknown error";
25
- r(`Import failed: ${v}`, "error");
25
+ a(`Import failed: ${v}`, "error");
26
26
  }
27
- }, a.readAsText(o);
27
+ }, t.readAsText(o);
28
28
  }
29
29
  },
30
30
  multiple: !1,
31
31
  accept: ".json,.yaml,.yml"
32
32
  }), x = async () => {
33
- if (t.value)
33
+ if (r.value)
34
34
  try {
35
- await g(t.value), r("Import successful", "info"), i("close");
35
+ await g(r.value), a("Import successful", "info"), n("close");
36
36
  } catch (e) {
37
37
  console.error("the error ", e);
38
38
  const o = (e == null ? void 0 : e.message) || "Unknown error";
39
- r(`Import failed: ${o}`, "error");
39
+ a(`Import failed: ${o}`, "error");
40
40
  }
41
41
  };
42
- return (e, o) => (F(), y(b, { onSubmit: x }, {
42
+ return (e, o) => (F(), h(U, { onSubmit: x }, {
43
43
  options: l(() => [
44
- n(c(C), {
44
+ c(i(y), {
45
45
  class: "p-2 max-h-8 gap-1 text-xs hover:bg-b-2 relative",
46
46
  variant: "outlined",
47
- onClick: c(_)
47
+ onClick: i(k)
48
48
  }, {
49
49
  default: l(() => [
50
50
  p(" JSON, or YAML Files "),
51
- n(c(I), {
51
+ c(i(C), {
52
52
  class: "text-c-3 -rotate-90",
53
53
  icon: "ArrowRight",
54
54
  size: "sm"
@@ -61,11 +61,12 @@ const W = /* @__PURE__ */ w({
61
61
  p("Import Collection")
62
62
  ]),
63
63
  default: l(() => [
64
- n(V, {
65
- modelValue: t.value,
66
- "onUpdate:modelValue": o[0] || (o[0] = (a) => t.value = a),
64
+ c(V, {
65
+ modelValue: r.value,
66
+ "onUpdate:modelValue": o[0] || (o[0] = (t) => r.value = t),
67
67
  label: "Paste Swagger File URL",
68
- placeholder: "Paste Swagger File URL"
68
+ placeholder: "Paste Swagger File URL",
69
+ onOnDelete: o[1] || (o[1] = (t) => n("back", t))
69
70
  }, null, 8, ["modelValue"])
70
71
  ]),
71
72
  _: 1
@@ -73,5 +74,5 @@ const W = /* @__PURE__ */ w({
73
74
  }
74
75
  });
75
76
  export {
76
- W as default
77
+ O as default
77
78
  };
@@ -5,12 +5,14 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
5
5
  };
6
6
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
7
  close: () => void;
8
+ back: (e: KeyboardEvent) => void;
8
9
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
9
10
  metaData?: {
10
11
  itemUid: string;
11
12
  parentUid: string;
12
13
  };
13
14
  }>>> & {
15
+ onBack?: ((e: KeyboardEvent) => any) | undefined;
14
16
  onClose?: (() => any) | undefined;
15
17
  }, {}, {}>;
16
18
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"CommandPaletteRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteRequest.vue"],"names":[],"mappings":";eAgMa;QACT,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;KAClB;;;;eAHU;QACT,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;KAClB;;;;AAmUH,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
+ {"version":3,"file":"CommandPaletteRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteRequest.vue"],"names":[],"mappings":";eAkMa;QACT,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;KAClB;;;;;eAHU;QACT,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;KAClB;;;;;AAqVH,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"}