vlite3 1.4.27 → 1.4.28

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.
@@ -18,7 +18,7 @@ import "v-datepicker-lite/style.css";
18
18
  /* empty css */
19
19
  import "@jaames/iro";
20
20
  import "@vueuse/core";
21
- /* empty css */
21
+ /* empty css */
22
22
  import qe from "../IconPicker.vue.js";
23
23
  /* empty css */
24
24
  /* empty css */
@@ -1,5 +1,5 @@
1
- import o from "./ColorIro.vue.js";
2
- /* empty css */
1
+ import o from "./ColorIro.vue2.js";
2
+ /* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -9,7 +9,7 @@ interface Props {
9
9
  position?: TooltTipPlacement;
10
10
  btnProps?: ButtonProps;
11
11
  showInput?: boolean;
12
- trigger?: 'input' | 'button';
12
+ trigger?: 'input' | 'button' | 'swatch';
13
13
  }
14
14
  declare function __VLS_template(): {
15
15
  attrs: Partial<{}>;
@@ -34,7 +34,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
34
34
  rounded: InputRounded;
35
35
  disabled: boolean;
36
36
  modelValue: string;
37
- trigger: "input" | "button";
37
+ trigger: "input" | "button" | "swatch";
38
38
  position: TooltTipPlacement;
39
39
  showInput: boolean;
40
40
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
@@ -1,22 +1,22 @@
1
- import { defineComponent as $, ref as y, watch as r, openBlock as a, createBlock as d, unref as b, withCtx as u, createElementBlock as c, createVNode as m, createCommentVNode as f, createElementVNode as p, renderSlot as B, mergeProps as O, normalizeClass as E, normalizeStyle as P } from "vue";
2
- import N from "../Dropdown/Dropdown.vue.js";
1
+ import { defineComponent as B, ref as v, watch as u, openBlock as t, createBlock as c, unref as g, withCtx as m, createElementBlock as i, createVNode as f, createCommentVNode as p, createElementVNode as n, renderSlot as O, mergeProps as E, normalizeStyle as h, toDisplayString as P, normalizeClass as S } from "vue";
2
+ import D from "../Dropdown/Dropdown.vue.js";
3
3
  import "@iconify/vue";
4
- import g from "../Input.vue.js";
4
+ import y from "../Input.vue.js";
5
5
  /* empty css */
6
6
  import "../../core/config.js";
7
7
  /* empty css */
8
8
  /* empty css */
9
- import h from "../Button.vue.js";
10
- import S from "./ColorIro.vue.js";
11
- /* empty css */
9
+ import k from "../Button.vue.js";
10
+ import N from "./ColorIro.vue2.js";
11
+ /* empty css */
12
12
  import { useEyeDropper as j } from "@vueuse/core";
13
- const D = { class: "absolute left-2.5 top-1/2 -translate-y-1/2 flex items-center justify-center z-20 pointer-events-none" }, I = {
13
+ const I = ["disabled", "aria-label"], U = { class: "min-w-0 truncate text-foreground" }, A = { class: "absolute left-2.5 top-1/2 -translate-y-1/2 flex items-center justify-center z-20 pointer-events-none" }, F = {
14
14
  key: 0,
15
15
  class: "p-1 w-max flex flex-col justify-center"
16
- }, U = {
16
+ }, G = {
17
17
  key: 0,
18
18
  class: "flex items-center gap-1.5 w-full"
19
- }, A = { class: "flex-1 w-0 min-w-0" }, Y = /* @__PURE__ */ $({
19
+ }, R = { class: "flex-1 w-0 min-w-0" }, _ = /* @__PURE__ */ B({
20
20
  __name: "ColorPicker",
21
21
  props: {
22
22
  modelValue: { default: "#000000" },
@@ -30,95 +30,108 @@ const D = { class: "absolute left-2.5 top-1/2 -translate-y-1/2 flex items-center
30
30
  trigger: { default: "input" }
31
31
  },
32
32
  emits: ["update:modelValue", "change"],
33
- setup(o, { emit: k }) {
34
- const s = o, v = k, i = y(!1), t = y(s.modelValue || "#000000"), { isSupported: V, open: x, sRGBHex: z } = j();
35
- r(z, (e) => {
36
- e && (t.value = e);
33
+ setup(e, { emit: x }) {
34
+ const r = e, b = x, d = v(!1), l = v(r.modelValue || "#000000"), { isSupported: w, open: V, sRGBHex: z } = j();
35
+ u(z, (o) => {
36
+ o && (l.value = o);
37
37
  });
38
- const w = async () => {
38
+ const C = async () => {
39
39
  try {
40
- await x();
41
- } catch (e) {
42
- console.error("Error opening eyedropper:", e);
40
+ await V();
41
+ } catch (o) {
42
+ console.error("Error opening eyedropper:", o);
43
43
  }
44
44
  };
45
- r(
46
- () => s.modelValue,
47
- (e) => {
48
- e && e !== t.value && (t.value = e);
45
+ u(
46
+ () => r.modelValue,
47
+ (o) => {
48
+ o && o !== l.value && (l.value = o);
49
49
  }
50
- ), r(t, (e) => {
51
- /^#([0-9A-F]{3,8})$/i.test(e) && e !== s.modelValue && (v("update:modelValue", e), v("change", e));
50
+ ), u(l, (o) => {
51
+ /^#([0-9A-F]{3,8})$/i.test(o) && o !== r.modelValue && (b("update:modelValue", o), b("change", o));
52
52
  });
53
- const C = (e) => {
54
- t.value = e;
53
+ const $ = (o) => {
54
+ l.value = o;
55
55
  };
56
- return (e, l) => (a(), d(b(N), {
57
- disabled: o.disabled,
56
+ return (o, a) => (t(), c(g(D), {
57
+ disabled: e.disabled,
58
58
  class: "w-full",
59
- position: o.position,
59
+ position: e.position,
60
60
  offset: [0, 8],
61
61
  searchable: !1,
62
62
  "close-on-select": !1,
63
- onOnOpen: l[1] || (l[1] = (n) => i.value = !0),
64
- onOnClose: l[2] || (l[2] = (n) => i.value = !1)
63
+ onOnOpen: a[1] || (a[1] = (s) => d.value = !0),
64
+ onOnClose: a[2] || (a[2] = (s) => d.value = !1)
65
65
  }, {
66
- trigger: u(({ isOpen: n }) => [
67
- B(e.$slots, "trigger", { isOpen: n }, () => [
68
- o.trigger === "button" ? (a(), d(h, O({
66
+ trigger: m(({ isOpen: s }) => [
67
+ O(o.$slots, "trigger", { isOpen: s }, () => [
68
+ e.trigger === "button" ? (t(), c(k, E({
69
69
  key: 0,
70
- style: { backgroundColor: o.modelValue }
70
+ style: { backgroundColor: e.modelValue }
71
71
  }, {
72
72
  rounded: "full",
73
73
  size: "xs",
74
74
  icon: " ",
75
75
  variant: "outline",
76
- ...o.btnProps || {}
77
- }), null, 16, ["style"])) : (a(), c("div", {
76
+ ...e.btnProps || {}
77
+ }), null, 16, ["style"])) : e.trigger === "swatch" ? (t(), i("button", {
78
78
  key: 1,
79
- class: E(["w-full relative cursor-pointer", [o.disabled ? "opacity-50 pointer-events-none" : ""]])
79
+ type: "button",
80
+ disabled: e.disabled,
81
+ "aria-label": `Choose color ${e.modelValue}`,
82
+ class: "flex min-h-10 w-full items-center gap-2.5 px-3 text-left font-mono text-xs uppercase transition-colors hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary disabled:cursor-not-allowed disabled:opacity-50"
80
83
  }, [
81
- m(g, {
82
- "model-value": o.modelValue,
84
+ n("span", {
85
+ "aria-hidden": "true",
86
+ class: "h-5 w-5 shrink-0 rounded-full border border-black/10 shadow-sm dark:border-white/15",
87
+ style: h({ backgroundColor: e.modelValue })
88
+ }, null, 4),
89
+ n("span", U, P(e.modelValue), 1)
90
+ ], 8, I)) : (t(), i("div", {
91
+ key: 2,
92
+ class: S(["w-full relative cursor-pointer", [e.disabled ? "opacity-50 pointer-events-none" : ""]])
93
+ }, [
94
+ f(y, {
95
+ "model-value": e.modelValue,
83
96
  readonly: "",
84
- disabled: o.disabled,
85
- size: o.size,
86
- variant: o.variant,
87
- rounded: o.rounded,
97
+ disabled: e.disabled,
98
+ size: e.size,
99
+ variant: e.variant,
100
+ rounded: e.rounded,
88
101
  class: "pointer-events-none",
89
102
  "input-class": "pl-9 font-mono uppercase cursor-pointer"
90
103
  }, null, 8, ["model-value", "disabled", "size", "variant", "rounded"]),
91
- p("div", D, [
92
- p("div", {
104
+ n("div", A, [
105
+ n("div", {
93
106
  class: "w-4 h-4 rounded-full shadow-[inset_0_0_0_1px_rgba(0,0,0,0.1)] dark:shadow-[inset_0_0_0_1px_rgba(255,255,255,0.1)]",
94
- style: P({ backgroundColor: o.modelValue })
107
+ style: h({ backgroundColor: e.modelValue })
95
108
  }, null, 4)
96
109
  ])
97
110
  ], 2))
98
111
  ])
99
112
  ]),
100
- default: u(() => [
101
- i.value ? (a(), c("div", I, [
102
- m(S, {
103
- color: o.modelValue,
113
+ default: m(() => [
114
+ d.value ? (t(), i("div", F, [
115
+ f(N, {
116
+ color: e.modelValue,
104
117
  "show-header": !1,
105
- size: o.size,
106
- "onUpdate:color": C
118
+ size: e.size,
119
+ "onUpdate:color": $
107
120
  }, {
108
- bottom: u(() => [
109
- o.showInput ? (a(), c("div", U, [
110
- b(V) ? (a(), d(h, {
121
+ bottom: m(() => [
122
+ e.showInput ? (t(), i("div", G, [
123
+ g(w) ? (t(), c(k, {
111
124
  key: 0,
112
- onClick: w,
125
+ onClick: C,
113
126
  icon: "pepicons-pop:color-picker",
114
127
  variant: "outline",
115
128
  size: "sm",
116
129
  class: "px-2 shrink-0"
117
- })) : f("", !0),
118
- p("div", A, [
119
- m(g, {
120
- modelValue: t.value,
121
- "onUpdate:modelValue": l[0] || (l[0] = (n) => t.value = n),
130
+ })) : p("", !0),
131
+ n("div", R, [
132
+ f(y, {
133
+ modelValue: l.value,
134
+ "onUpdate:modelValue": a[0] || (a[0] = (s) => l.value = s),
122
135
  size: "sm",
123
136
  "show-clear-button": !1,
124
137
  placeholder: "#000000",
@@ -126,16 +139,16 @@ const D = { class: "absolute left-2.5 top-1/2 -translate-y-1/2 flex items-center
126
139
  "input-class": "font-mono text-xs uppercase "
127
140
  }, null, 8, ["modelValue"])
128
141
  ])
129
- ])) : f("", !0)
142
+ ])) : p("", !0)
130
143
  ]),
131
144
  _: 1
132
145
  }, 8, ["color", "size"])
133
- ])) : f("", !0)
146
+ ])) : p("", !0)
134
147
  ]),
135
148
  _: 3
136
149
  }, 8, ["disabled", "position"]));
137
150
  }
138
151
  });
139
152
  export {
140
- Y as default
153
+ _ as default
141
154
  };
@@ -4,7 +4,7 @@ import k from "../Icon.vue.js";
4
4
  import { $t as E } from "../../utils/i18n.js";
5
5
  import { useCommandPaletteItems as Y } from "./useCommandPaletteItems.js";
6
6
  import { useCommandPaletteNav as Z } from "./useCommandPaletteNav.js";
7
- import ee from "./CommandPaletteItem.vue.js";
7
+ import ee from "./CommandPaletteItem.vue2.js";
8
8
  const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[70vh]" }, oe = { class: "flex items-center gap-3 px-4 py-3 border-b border-border/80 shrink-0" }, se = ["placeholder"], ne = ["aria-label"], re = {
9
9
  key: 0,
10
10
  class: "flex flex-col items-center justify-center py-14 px-6 text-center select-none",
@@ -1,5 +1,5 @@
1
1
  import t from "./CommandPaletteItem.vue3.js";
2
- /* empty css */
2
+ /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-66b1ae06"]]);
5
5
  export {
@@ -1,4 +1,4 @@
1
- import o from "./DropdownMenu.vue3.js";
1
+ import o from "./DropdownMenu.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-173c7a02"]]);
@@ -63,7 +63,7 @@ const j = ["multiple", "accept", "data-testid"], O = /* @__PURE__ */ V({
63
63
  return a["data-testid"] ? `${a["data-testid"]}-input` : a.name ? `filepicker-input-${a.name}` : "filepicker-input";
64
64
  }), o = () => e.triggerInput(p.value), T = n(() => e.acceptAttribute.value);
65
65
  return (a, r) => (u(), N("div", {
66
- class: C(["vl-file-picker w-full min-w-0", { "vl-file-picker--input": l.variant === "input" }])
66
+ class: C(["vl-file-picker mb-4! w-full min-w-0", { "vl-file-picker--input": l.variant === "input" }])
67
67
  }, [
68
68
  E("input", {
69
69
  ref_key: "fileInput",