@scalar/api-client 2.1.6 → 2.1.8

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 (54) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
  3. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +48 -21
  4. package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
  5. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  6. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  7. package/dist/components/IconSelector.vue.d.ts +35 -0
  8. package/dist/components/IconSelector.vue.d.ts.map +1 -0
  9. package/dist/components/IconSelector.vue.js +73 -0
  10. package/dist/components/IconSelector.vue2.js +4 -0
  11. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts +24 -0
  12. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts.map +1 -0
  13. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js +58 -0
  14. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue2.js +4 -0
  15. package/dist/components/Sidebar/Actions/{RenameSidebarListElement.vue.d.ts → EditSidebarListElement.vue.d.ts} +3 -3
  16. package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.d.ts.map +1 -0
  17. package/dist/components/Sidebar/Actions/{RenameSidebarListElement.vue.js → EditSidebarListElement.vue.js} +9 -9
  18. package/dist/components/Sidebar/Actions/EditSidebarListElement.vue2.js +4 -0
  19. package/dist/layouts/App/create-api-client-app.d.ts +32 -20
  20. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  21. package/dist/layouts/Modal/create-api-client-modal.d.ts +64 -40
  22. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  23. package/dist/libs/create-client.d.ts +32 -20
  24. package/dist/libs/create-client.d.ts.map +1 -1
  25. package/dist/libs/environment-parser.js +8 -8
  26. package/dist/libs/event-busses/hot-keys-bus.d.ts +1 -1
  27. package/dist/store/collections.d.ts +14 -4
  28. package/dist/store/collections.d.ts.map +1 -1
  29. package/dist/store/request-example.d.ts +2 -2
  30. package/dist/store/requests.d.ts +2 -2
  31. package/dist/store/security-schemes.d.ts +4 -4
  32. package/dist/store/store.d.ts +64 -40
  33. package/dist/store/store.d.ts.map +1 -1
  34. package/dist/store/tags.d.ts +4 -4
  35. package/dist/store/workspace.d.ts +4 -4
  36. package/dist/style.css +1 -1
  37. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  38. package/dist/views/Environment/Environment.vue2.js +19 -18
  39. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  40. package/dist/views/Request/RequestSidebar.vue.js +2 -2
  41. package/dist/views/Request/RequestSidebar.vue2.js +73 -74
  42. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  43. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  44. package/dist/views/Request/RequestSidebarItem.vue2.js +94 -91
  45. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  46. package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
  47. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +93 -79
  48. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  49. package/dist/views/Request/components/WorkspaceDropdown.vue.js +109 -95
  50. package/dist/views/Request/types/sidebar-item.d.ts +2 -1
  51. package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
  52. package/package.json +8 -7
  53. package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue.d.ts.map +0 -1
  54. package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue2.js +0 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.1.8
4
+
5
+ ### Patch Changes
6
+
7
+ - dc20180: feat(api-client): custom icons for collections
8
+ - 70857ed: fix: favors button over context menu in workspace dropdown
9
+ - Updated dependencies [f961940]
10
+ - Updated dependencies [f961940]
11
+ - Updated dependencies [dc20180]
12
+ - Updated dependencies [dc20180]
13
+ - @scalar/types@0.0.11
14
+ - @scalar/themes@0.9.32
15
+ - @scalar/components@0.12.48
16
+ - @scalar/oas-utils@0.2.48
17
+ - @scalar/icons@0.1.0
18
+ - @scalar/use-codemirror@0.11.14
19
+
20
+ ## 2.1.7
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [96c921c]
25
+ - @scalar/openapi-parser@0.8.4
26
+ - @scalar/oas-utils@0.2.47
27
+
3
28
  ## 2.1.6
4
29
 
5
30
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"CommandPaletteCollection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteCollection.vue"],"names":[],"mappings":";;;;;AA4JA,wBAMG"}
1
+ {"version":3,"file":"CommandPaletteCollection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteCollection.vue"],"names":[],"mappings":";;;;;AAoOA,wBAMG"}
@@ -1,39 +1,66 @@
1
- import { defineComponent as s, ref as u, openBlock as d, createBlock as p, withCtx as t, createTextVNode as f, createVNode as _ } from "vue";
2
- import { useToasts as v } from "@scalar/use-toasts";
3
- import C from "./CommandActionForm.vue.js";
4
- import b from "./CommandActionInput.vue.js";
5
- import { useWorkspace as N } from "../../store/store.js";
6
- const T = /* @__PURE__ */ s({
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";
2
+ import C from "../IconSelector.vue.js";
3
+ import { ScalarButton as V } from "@scalar/components";
4
+ import { LibraryIcon as x } from "@scalar/icons";
5
+ import { useToasts as N } from "@scalar/use-toasts";
6
+ import k from "./CommandActionForm.vue.js";
7
+ import B from "./CommandActionInput.vue.js";
8
+ import { useWorkspace as S } from "../../store/store.js";
9
+ const y = /* @__PURE__ */ f({
7
10
  __name: "CommandPaletteCollection",
8
11
  emits: ["close"],
9
- setup(V, { emit: l }) {
10
- const a = l, { activeWorkspace: n, collectionMutators: r } = N(), e = u(""), { toast: i } = v(), m = () => {
12
+ setup($, { emit: c }) {
13
+ const m = c, { activeWorkspace: s, collectionMutators: u } = S(), e = n(""), t = n("interface-content-folder"), { toast: d } = N(), p = () => {
11
14
  if (!e.value) {
12
- i("Please enter a name before creating a collection.", "error");
15
+ d("Please enter a name before creating a collection.", "error");
13
16
  return;
14
17
  }
15
- r.add(
18
+ u.add(
16
19
  {
17
20
  openapi: "3.1.0",
18
21
  info: {
19
22
  title: e.value,
20
23
  version: "0.0.1"
21
- }
24
+ },
25
+ "x-scalar-icon": t.value
22
26
  },
23
- n.value.uid
24
- ), a("close");
27
+ s.value.uid
28
+ ), m("close");
25
29
  };
26
- return (k, o) => (d(), p(C, {
30
+ return (I, a) => (v(), _(k, {
27
31
  disabled: !e.value.trim(),
28
- onSubmit: m
32
+ onSubmit: p
29
33
  }, {
30
- submit: t(() => [
31
- f("Create Collection")
34
+ options: o(() => [
35
+ l(C, {
36
+ modelValue: t.value,
37
+ "onUpdate:modelValue": a[1] || (a[1] = (r) => t.value = r),
38
+ placement: "bottom-start"
39
+ }, {
40
+ default: o(() => [
41
+ l(i(V), {
42
+ class: "aspect-square px-0 h-auto",
43
+ variant: "outlined"
44
+ }, {
45
+ default: o(() => [
46
+ l(i(x), {
47
+ class: "size-4 text-c-2",
48
+ src: t.value
49
+ }, null, 8, ["src"])
50
+ ]),
51
+ _: 1
52
+ })
53
+ ]),
54
+ _: 1
55
+ }, 8, ["modelValue"])
32
56
  ]),
33
- default: t(() => [
34
- _(b, {
57
+ submit: o(() => [
58
+ b("Create Collection")
59
+ ]),
60
+ default: o(() => [
61
+ l(B, {
35
62
  modelValue: e.value,
36
- "onUpdate:modelValue": o[0] || (o[0] = (c) => e.value = c),
63
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => e.value = r),
37
64
  label: "Collection Name",
38
65
  placeholder: "Collection Name"
39
66
  }, null, 8, ["modelValue"])
@@ -43,5 +70,5 @@ const T = /* @__PURE__ */ s({
43
70
  }
44
71
  });
45
72
  export {
46
- T as default
73
+ y as default
47
74
  };
@@ -49,8 +49,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
49
49
  onSelectVariable?: ((value: string) => any) | undefined;
50
50
  }, {
51
51
  required: boolean;
52
- readOnly: boolean;
53
52
  canAddCustomEnumValue: boolean;
53
+ readOnly: boolean;
54
54
  }, {}>;
55
55
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
56
56
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInput.vue"],"names":[],"mappings":"AAwNA,iBAAS,cAAc;qBAkKM,GAAG;qBACF,GAAG;kBACN,GAAG;EAuB7B;AACD,QAAA,MAAM,eAAe;SAlQZ,MAAM;WACJ,MAAM;IACb,sEAAsE;qBACrD,MAAM;eACZ,OAAO;gBACN,MAAM,GAAG,MAAM;IAC3B,0EAA0E;4BAClD,OAAO;eACpB,OAAO;WACX,MAAM,EAAE;UACT,MAAM;UACN,MAAM;;;;;;;;;;;SAXP,MAAM;WACJ,MAAM;IACb,sEAAsE;qBACrD,MAAM;eACZ,OAAO;gBACN,MAAM,GAAG,MAAM;IAC3B,0EAA0E;4BAClD,OAAO;eACpB,OAAO;WACX,MAAM,EAAE;UACT,MAAM;UACN,MAAM;;;;;;;;;;;cAPD,OAAO;cAIP,OAAO;2BADM,OAAO;MAkQjC,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAA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E,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -7,7 +7,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
7
7
  isDisable: boolean;
8
8
  isEditable: boolean;
9
9
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
- change: (value: "head" | "get" | "delete" | "connect" | "options" | "patch" | "post" | "put" | "trace") => void;
10
+ change: (value: "head" | "get" | "delete" | "options" | "connect" | "patch" | "post" | "put" | "trace") => void;
11
11
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
12
12
  isSquare?: boolean;
13
13
  method: string;
@@ -17,7 +17,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
17
17
  isDisable: boolean;
18
18
  isEditable: boolean;
19
19
  }>>> & {
20
- onChange?: ((value: "head" | "get" | "delete" | "connect" | "options" | "patch" | "post" | "put" | "trace") => any) | undefined;
20
+ onChange?: ((value: "head" | "get" | "delete" | "options" | "connect" | "patch" | "post" | "put" | "trace") => any) | undefined;
21
21
  }, {
22
22
  isSquare: boolean;
23
23
  isEditable: boolean;
@@ -0,0 +1,35 @@
1
+ type Side = 'top' | 'bottom';
2
+ type Alignment = 'start' | 'end';
3
+ type AlignedPlacement = `${Side}-${Alignment}`;
4
+ declare function __VLS_template(): {
5
+ default?(_: {}): any;
6
+ title?(_: {}): any;
7
+ };
8
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<{
9
+ modelValue: string;
10
+ placement?: AlignedPlacement;
11
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ "update:modelValue": (icon: string) => void;
13
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
14
+ modelValue: string;
15
+ placement?: AlignedPlacement;
16
+ }>>> & {
17
+ "onUpdate:modelValue"?: ((icon: string) => any) | undefined;
18
+ }, {}, {}>;
19
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
20
+ export default _default;
21
+ type __VLS_WithTemplateSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
26
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
27
+ type __VLS_TypePropsToOption<T> = {
28
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
29
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
30
+ } : {
31
+ type: import('vue').PropType<T[K]>;
32
+ required: true;
33
+ };
34
+ };
35
+ //# sourceMappingURL=IconSelector.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconSelector.vue.d.ts","sourceRoot":"","sources":["../../src/components/IconSelector.vue"],"names":[],"mappings":"AA4EA,KAAK,IAAI,GAAG,KAAK,GAAG,QAAQ,CAAA;AAC5B,KAAK,SAAS,GAAG,OAAO,GAAG,KAAK,CAAA;AAChC,KAAK,gBAAgB,GAAG,GAAG,IAAI,IAAI,SAAS,EAAE,CAAA;AAa9C,iBAAS,cAAc;qBAmKM,GAAG;mBACJ,GAAG;EAsB9B;AACD,QAAA,MAAM,eAAe;gBAnNP,MAAM;gBACN,gBAAgB;;;;gBADhB,MAAM;gBACN,gBAAgB;;;UAyN5B,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"}
@@ -0,0 +1,73 @@
1
+ import { defineComponent as g, computed as V, openBlock as a, createBlock as n, unref as e, withCtx as o, createVNode as r, createElementVNode as u, renderSlot as d, createTextVNode as p, createElementBlock as _, Fragment as y, renderList as k, toDisplayString as w } from "vue";
2
+ import { RadioGroup as h, RadioGroupLabel as m, RadioGroupOption as S } from "@headlessui/vue";
3
+ import { ScalarPopover as C } from "@scalar/components";
4
+ import { libraryIcons as I, LibraryIcon as B } from "@scalar/icons";
5
+ const G = { class: "flex text-sm" }, L = { class: "grid grid-cols-[repeat(auto-fill,minmax(32px,1fr))] auto-rows-[32px] justify-between content-between rounded bg-b-1 border p-1 max-w-[420px] w-dvw custom-scroll" }, $ = /* @__PURE__ */ g({
6
+ __name: "IconSelector",
7
+ props: {
8
+ modelValue: {},
9
+ placement: {}
10
+ },
11
+ emits: ["update:modelValue"],
12
+ setup(i, { emit: f }) {
13
+ const b = i, x = f, s = V({
14
+ get: () => b.modelValue,
15
+ set: (l) => x("update:modelValue", l)
16
+ });
17
+ return (l, c) => (a(), n(e(C), {
18
+ class: "bg-b-2 rounded",
19
+ placement: l.placement ?? "bottom"
20
+ }, {
21
+ popover: o(({ close: v }) => [
22
+ r(e(h), {
23
+ modelValue: s.value,
24
+ "onUpdate:modelValue": c[0] || (c[0] = (t) => s.value = t),
25
+ class: "flex flex-col"
26
+ }, {
27
+ default: o(() => [
28
+ u("div", G, [
29
+ r(e(m), { class: "text-c-2 py-1 px-1" }, {
30
+ default: o(() => [
31
+ d(l.$slots, "title", {}, () => [
32
+ p("Select an icon...")
33
+ ])
34
+ ]),
35
+ _: 3
36
+ })
37
+ ]),
38
+ u("ul", L, [
39
+ (a(!0), _(y, null, k(e(I), (t) => (a(), n(e(S), {
40
+ key: t.src,
41
+ as: "li",
42
+ class: "p-2.25 rounded flex items-center justify-center text-c-3 cursor-pointer hover:text-c-2 hover:bg-b-2 ui-checked:bg-b-3 ui-active:bg-b-2",
43
+ value: t.src,
44
+ onClick: v
45
+ }, {
46
+ default: o(() => [
47
+ r(e(m), { class: "sr-only" }, {
48
+ default: o(() => [
49
+ p(w(t.src.replaceAll("-", " ")) + " Icon ", 1)
50
+ ]),
51
+ _: 2
52
+ }, 1024),
53
+ r(e(B), {
54
+ src: t.src
55
+ }, null, 8, ["src"])
56
+ ]),
57
+ _: 2
58
+ }, 1032, ["value", "onClick"]))), 128))
59
+ ])
60
+ ]),
61
+ _: 2
62
+ }, 1032, ["modelValue"])
63
+ ]),
64
+ default: o(() => [
65
+ d(l.$slots, "default")
66
+ ]),
67
+ _: 3
68
+ }, 8, ["placement"]));
69
+ }
70
+ });
71
+ export {
72
+ $ as default
73
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./IconSelector.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,24 @@
1
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
2
+ name: string;
3
+ icon: string;
4
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ close: () => void;
6
+ edit: (newName: string, newIcon: string) => void;
7
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
8
+ name: string;
9
+ icon: string;
10
+ }>>> & {
11
+ onClose?: (() => any) | undefined;
12
+ onEdit?: ((newName: string, newIcon: string) => any) | undefined;
13
+ }, {}, {}>;
14
+ export default _default;
15
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
16
+ type __VLS_TypePropsToOption<T> = {
17
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
18
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
19
+ } : {
20
+ type: import('vue').PropType<T[K]>;
21
+ required: true;
22
+ };
23
+ };
24
+ //# sourceMappingURL=EditSidebarListCollection.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditSidebarListCollection.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Sidebar/Actions/EditSidebarListCollection.vue"],"names":[],"mappings":";UAwDQ,MAAM;UACN,MAAM;;;;;UADN,MAAM;UACN,MAAM;;;;;AA+Jd,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { defineComponent as p, ref as m, openBlock as f, createBlock as v, withCtx as n, createElementVNode as u, createVNode as l, unref as s } from "vue";
2
+ import x from "../../IconSelector.vue.js";
3
+ import V from "./SidebarListElementForm.vue.js";
4
+ import { ScalarButton as _, ScalarTextField as b } from "@scalar/components";
5
+ import { LibraryIcon as S } from "@scalar/icons";
6
+ const C = { class: "grid gap-2 grid-cols-[auto,1fr]" }, g = { class: "flex aspect-square" }, k = /* @__PURE__ */ p({
7
+ __name: "EditSidebarListCollection",
8
+ props: {
9
+ name: {},
10
+ icon: {}
11
+ },
12
+ emits: ["close", "edit"],
13
+ setup(d, { emit: c }) {
14
+ const r = d, i = c, a = m(r.name), o = m(r.icon);
15
+ return (w, e) => (f(), v(V, {
16
+ onCancel: e[2] || (e[2] = (t) => i("close")),
17
+ onSubmit: e[3] || (e[3] = (t) => i("edit", a.value, o.value))
18
+ }, {
19
+ default: n(() => [
20
+ u("div", C, [
21
+ u("div", g, [
22
+ l(x, {
23
+ modelValue: o.value,
24
+ "onUpdate:modelValue": e[0] || (e[0] = (t) => o.value = t),
25
+ placement: "bottom-start"
26
+ }, {
27
+ default: n(() => [
28
+ l(s(_), {
29
+ class: "aspect-square px-0 h-auto",
30
+ variant: "outlined"
31
+ }, {
32
+ default: n(() => [
33
+ l(s(S), {
34
+ class: "size-4 text-c-2",
35
+ src: o.value
36
+ }, null, 8, ["src"])
37
+ ]),
38
+ _: 1
39
+ })
40
+ ]),
41
+ _: 1
42
+ }, 8, ["modelValue"])
43
+ ]),
44
+ l(s(b), {
45
+ modelValue: a.value,
46
+ "onUpdate:modelValue": e[1] || (e[1] = (t) => a.value = t),
47
+ autofocus: "",
48
+ class: "flex-1"
49
+ }, null, 8, ["modelValue"])
50
+ ])
51
+ ]),
52
+ _: 1
53
+ }));
54
+ }
55
+ });
56
+ export {
57
+ k as default
58
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./EditSidebarListCollection.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -2,12 +2,12 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
2
2
  name: string;
3
3
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
4
  close: () => void;
5
- rename: (newName: string) => void;
5
+ edit: (newName: string) => void;
6
6
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
7
7
  name: string;
8
8
  }>>> & {
9
9
  onClose?: (() => any) | undefined;
10
- onRename?: ((newName: string) => any) | undefined;
10
+ onEdit?: ((newName: string) => any) | undefined;
11
11
  }, {}, {}>;
12
12
  export default _default;
13
13
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -19,4 +19,4 @@ type __VLS_TypePropsToOption<T> = {
19
19
  required: true;
20
20
  };
21
21
  };
22
- //# sourceMappingURL=RenameSidebarListElement.vue.d.ts.map
22
+ //# sourceMappingURL=EditSidebarListElement.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditSidebarListElement.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Sidebar/Actions/EditSidebarListElement.vue"],"names":[],"mappings":";UAkCQ,MAAM;;;;;UAAN,MAAM;;;;;AAyGd,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,20 +1,20 @@
1
- import { defineComponent as a, ref as u, openBlock as i, createBlock as s, withCtx as p, createVNode as d, unref as f } from "vue";
1
+ import { defineComponent as a, ref as i, openBlock as u, createBlock as s, withCtx as d, createVNode as p, unref as f } from "vue";
2
2
  import c from "./SidebarListElementForm.vue.js";
3
3
  import { ScalarTextField as v } from "@scalar/components";
4
4
  const C = /* @__PURE__ */ a({
5
- __name: "RenameSidebarListElement",
5
+ __name: "EditSidebarListElement",
6
6
  props: {
7
7
  name: {}
8
8
  },
9
- emits: ["close", "rename"],
10
- setup(m, { emit: r }) {
11
- const l = m, n = r, t = u(l.name);
12
- return (x, e) => (i(), s(c, {
9
+ emits: ["close", "edit"],
10
+ setup(l, { emit: m }) {
11
+ const r = l, n = m, t = i(r.name);
12
+ return (x, e) => (u(), s(c, {
13
13
  onCancel: e[1] || (e[1] = (o) => n("close")),
14
- onSubmit: e[2] || (e[2] = (o) => n("rename", t.value))
14
+ onSubmit: e[2] || (e[2] = (o) => n("edit", t.value))
15
15
  }, {
16
- default: p(() => [
17
- d(f(v), {
16
+ default: d(() => [
17
+ p(f(v), {
18
18
  modelValue: t.value,
19
19
  "onUpdate:modelValue": e[0] || (e[0] = (o) => t.value = o),
20
20
  autofocus: ""
@@ -0,0 +1,4 @@
1
+ import f from "./EditSidebarListElement.vue.js";
2
+ export {
3
+ f as default
4
+ };