@scalar/api-client 2.1.11 → 2.1.13

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 (108) hide show
  1. package/CHANGELOG.md +32 -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/store/import-spec.d.ts +128 -2
  92. package/dist/store/import-spec.d.ts.map +1 -1
  93. package/dist/store/import-spec.js +24 -23
  94. package/dist/store/store.d.ts +256 -4
  95. package/dist/store/store.d.ts.map +1 -1
  96. package/dist/store/store.js +65 -65
  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/RequestSection.vue.js +39 -39
  101. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  102. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  103. package/dist/views/Request/RequestSidebar.vue2.js +14 -14
  104. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  105. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
  106. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  107. package/dist/views/Request/components/WorkspaceDropdown.vue.js +39 -39
  108. package/package.json +13 -8
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.1.13
4
+
5
+ ### Patch Changes
6
+
7
+ - cebca7a: feat: updates request and response section order and naming
8
+ - 3b12248: fix: removed showing servers dropdown if empty
9
+ - a78b0a6: fix(api-client): don't error if there aren't any collections
10
+
11
+ ## 2.1.12
12
+
13
+ ### Patch Changes
14
+
15
+ - 3ded00b: fix(api-references): sync selected server state with api client modal
16
+ - aa39741: fix: header names can have leading/trailing whitespaces
17
+ - 07b5439: feat: enhances command palette navigation and style
18
+ - 513e0ad: feat: add import modal
19
+ - 4a78aae: fix: uppercase method on request send
20
+ - Updated dependencies [513e0ad]
21
+ - Updated dependencies [8f12149]
22
+ - Updated dependencies [5127a37]
23
+ - Updated dependencies [1026d81]
24
+ - Updated dependencies [983a5e4]
25
+ - Updated dependencies [aee166c]
26
+ - Updated dependencies [07b5439]
27
+ - Updated dependencies [ef49617]
28
+ - @scalar/components@0.12.50
29
+ - @scalar/types@0.0.12
30
+ - @scalar/themes@0.9.33
31
+ - @scalar/openapi-parser@0.8.5
32
+ - @scalar/oas-utils@0.2.51
33
+ - @scalar/use-codemirror@0.11.16
34
+
3
35
  ## 2.1.11
4
36
 
5
37
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"AddressBarServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarServer.vue"],"names":[],"mappings":";AAiZA,wBAKG"}
1
+ {"version":3,"file":"AddressBarServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarServer.vue"],"names":[],"mappings":";AA+YA,wBAKG"}
@@ -1,6 +1,6 @@
1
- import { defineComponent as U, computed as u, watch as O, unref as s, openBlock as l, createBlock as h, withCtx as _, createElementBlock as n, createCommentVNode as v, Fragment as m, renderList as b, createVNode as p, createElementVNode as c, withModifiers as R, toDisplayString as C } from "vue";
2
- import { ScalarDropdown as V, ScalarDropdownDivider as D, ScalarDropdownItem as W, ScalarIcon as E } from "@scalar/components";
3
- import A from "./AddressBarServerItem.vue.js";
1
+ import { defineComponent as U, computed as u, watch as O, openBlock as l, createBlock as h, unref as s, withCtx as _, createElementBlock as n, createCommentVNode as v, Fragment as m, renderList as g, createVNode as p, createElementVNode as c, withModifiers as R, toDisplayString as b } from "vue";
2
+ import { ScalarDropdown as V, ScalarDropdownDivider as C, ScalarDropdownItem as W, ScalarIcon as E } from "@scalar/components";
3
+ import D from "./AddressBarServerItem.vue.js";
4
4
  import { useWorkspace as I } from "../../store/store.js";
5
5
  import { commandPaletteBus as L } from "../../libs/event-busses/command-palette-bus.js";
6
6
  const M = {
@@ -16,8 +16,8 @@ const M = {
16
16
  activeRequest: S,
17
17
  activeCollection: k,
18
18
  activeServer: x,
19
- isReadOnly: w,
20
- servers: y,
19
+ isReadOnly: A,
20
+ servers: w,
21
21
  collectionMutators: B
22
22
  } = I(), i = u(
23
23
  () => {
@@ -26,7 +26,7 @@ const M = {
26
26
  var o;
27
27
  return {
28
28
  id: r,
29
- label: ((o = y[r]) == null ? void 0 : o.url) ?? "Unknown server"
29
+ label: ((o = w[r]) == null ? void 0 : o.url) ?? "Unknown server"
30
30
  };
31
31
  });
32
32
  }
@@ -37,11 +37,11 @@ const M = {
37
37
  var o;
38
38
  return {
39
39
  id: r,
40
- label: ((o = y[r]) == null ? void 0 : o.url) ?? "Unknown server"
40
+ label: ((o = w[r]) == null ? void 0 : o.url) ?? "Unknown server"
41
41
  };
42
42
  });
43
43
  }
44
- ), g = u(
44
+ ), y = u(
45
45
  () => {
46
46
  var t, e;
47
47
  return ((t = i.value) == null ? void 0 : t.length) && ((e = d.value) == null ? void 0 : e.length);
@@ -62,28 +62,28 @@ const M = {
62
62
  });
63
63
  return (t, e) => {
64
64
  var r, o;
65
- return !s(w) || i.value && ((r = i.value) == null ? void 0 : r.length) > 1 || d.value && ((o = d.value) == null ? void 0 : o.length) > 1 ? (l(), h(s(V), {
65
+ return i.value && ((r = i.value) == null ? void 0 : r.length) > 1 || d.value && ((o = d.value) == null ? void 0 : o.length) > 1 ? (l(), h(s(V), {
66
66
  key: 0,
67
67
  teleport: ".scalar-client"
68
68
  }, {
69
69
  items: _(() => [
70
- g.value ? (l(), n("div", M, " Request Servers ")) : v("", !0),
71
- (l(!0), n(m, null, b(i.value, (a) => (l(), h(A, {
70
+ y.value ? (l(), n("div", M, " Request Servers ")) : v("", !0),
71
+ (l(!0), n(m, null, g(i.value, (a) => (l(), h(D, {
72
72
  key: a.id,
73
73
  serverOption: a,
74
74
  type: "request"
75
75
  }, null, 8, ["serverOption"]))), 128)),
76
- g.value ? (l(), n(m, { key: 1 }, [
77
- p(s(D)),
76
+ y.value ? (l(), n(m, { key: 1 }, [
77
+ p(s(C)),
78
78
  j
79
79
  ], 64)) : v("", !0),
80
- (l(!0), n(m, null, b(d.value, (a) => (l(), h(A, {
80
+ (l(!0), n(m, null, g(d.value, (a) => (l(), h(D, {
81
81
  key: a.id,
82
82
  serverOption: a,
83
83
  type: "collection"
84
84
  }, null, 8, ["serverOption"]))), 128)),
85
- s(w) ? v("", !0) : (l(), n(m, { key: 2 }, [
86
- p(s(D)),
85
+ s(A) ? v("", !0) : (l(), n(m, { key: 2 }, [
86
+ p(s(C)),
87
87
  p(s(W), null, {
88
88
  default: _(() => [
89
89
  c("div", {
@@ -109,10 +109,10 @@ const M = {
109
109
  type: "button",
110
110
  onClick: e[0] || (e[0] = R(() => {
111
111
  }, ["stop"]))
112
- }, C(f.value), 1)
112
+ }, b(f.value), 1)
113
113
  ]),
114
114
  _: 1
115
- })) : f.value ? (l(), n("div", P, C(f.value), 1)) : v("", !0);
115
+ })) : f.value ? (l(), n("div", P, b(f.value), 1)) : v("", !0);
116
116
  };
117
117
  }
118
118
  });
@@ -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"}