@tachui/modifiers 0.8.15 → 0.8.16

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 (43) hide show
  1. package/dist/appearance/background.d.ts +0 -4
  2. package/dist/appearance/background.d.ts.map +1 -1
  3. package/dist/appearance/border.d.ts +3 -0
  4. package/dist/appearance/border.d.ts.map +1 -1
  5. package/dist/appearance/index.js +9 -9
  6. package/dist/base.d.ts +3 -0
  7. package/dist/base.d.ts.map +1 -1
  8. package/dist/base.js +2 -2
  9. package/dist/basic/base.d.ts +6 -0
  10. package/dist/basic/base.d.ts.map +1 -1
  11. package/dist/basic/index.js +172 -168
  12. package/dist/basic/margin.js +1 -1
  13. package/dist/basic/padding.js +1 -1
  14. package/dist/basic/size.js +4 -4
  15. package/dist/effects/backdrop/index.js +1 -1
  16. package/dist/effects/filters/index.d.ts +12 -8
  17. package/dist/effects/filters/index.d.ts.map +1 -1
  18. package/dist/effects/filters/index.js +145 -120
  19. package/dist/effects/shadows/index.d.ts +1 -0
  20. package/dist/effects/shadows/index.d.ts.map +1 -1
  21. package/dist/effects/shadows/index.js +237 -190
  22. package/dist/effects/transforms/index.d.ts +17 -12
  23. package/dist/effects/transforms/index.d.ts.map +1 -1
  24. package/dist/effects/transforms/index.js +141 -99
  25. package/dist/index.js +185 -181
  26. package/dist/interaction/index.js +36 -36
  27. package/dist/layout/flexbox.d.ts +3 -0
  28. package/dist/layout/flexbox.d.ts.map +1 -1
  29. package/dist/layout/index.js +17 -14
  30. package/dist/layout/overlay.d.ts +18 -2
  31. package/dist/layout/overlay.d.ts.map +1 -1
  32. package/dist/layout/position.d.ts +9 -2
  33. package/dist/layout/position.d.ts.map +1 -1
  34. package/dist/{modifiers-basic-D-JVI3kT.js → modifiers-basic-DqquUfkI.js} +2008 -1803
  35. package/dist/preload/basic.js +170 -166
  36. package/dist/types.d.ts +7 -1
  37. package/dist/types.d.ts.map +1 -1
  38. package/dist/typography/index.js +17 -16
  39. package/dist/typography/text.js +1 -1
  40. package/dist/typography/typography.d.ts +2 -0
  41. package/dist/typography/typography.d.ts.map +1 -1
  42. package/dist/utility/index.js +9 -9
  43. package/package.json +4 -4
@@ -1,176 +1,223 @@
1
- var y = Object.defineProperty;
2
- var b = (r, s, e) => s in r ? y(r, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[s] = e;
3
- var i = (r, s, e) => b(r, typeof s != "symbol" ? s + "" : s, e);
4
- import { isSignal as n, isComputed as h, createEffect as p } from "@tachui/core/reactive";
5
- import { BaseModifier as c } from "@tachui/core/modifiers/base";
6
- class d extends c {
1
+ var b = Object.defineProperty;
2
+ var x = (o, a, e) => a in o ? b(o, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[a] = e;
3
+ var u = (o, a, e) => x(o, typeof a != "symbol" ? a + "" : a, e);
4
+ import { isSignal as n, isComputed as i, createEffect as p, getThemeSignal as w } from "@tachui/core/reactive";
5
+ import { BaseModifier as y } from "@tachui/core/modifiers/base";
6
+ class d extends y {
7
7
  constructor(e) {
8
- const o = {};
9
- for (const [a, t] of Object.entries(e))
10
- typeof t == "function" && "peek" in t ? o[a] = t.peek() : o[a] = t;
11
- super(o);
12
- i(this, "type", "shadow");
13
- i(this, "priority", 25);
8
+ const s = {};
9
+ for (const [r, l] of Object.entries(e))
10
+ typeof l == "function" && "peek" in l ? s[r] = l.peek() : s[r] = l;
11
+ super(s);
12
+ u(this, "type", "shadow");
13
+ u(this, "priority", 25);
14
14
  }
15
- apply(e, o) {
16
- o.element && this.applyShadowStyles(o.element, this.properties);
15
+ apply(e, s) {
16
+ s.element && this.applyShadowStyles(s.element, this.properties);
17
17
  }
18
- applyShadowStyles(e, o) {
19
- o.shadow && (typeof o.shadow == "string" ? this.applyStyles(e, { boxShadow: o.shadow }) : Array.isArray(o.shadow) ? this.applyMultipleShadows(e, o.shadow) : this.applySingleShadow(e, o.shadow));
18
+ applyShadowStyles(e, s) {
19
+ s.shadow && (typeof s.shadow == "string" ? this.applyStyles(e, { boxShadow: s.shadow }) : Array.isArray(s.shadow) ? this.applyMultipleShadows(e, s.shadow) : this.applySingleShadow(e, s.shadow));
20
20
  }
21
- applySingleShadow(e, o) {
22
- if (Object.values(o).some(
23
- (t) => n(t) || h(t)
24
- ))
21
+ applySingleShadow(e, s) {
22
+ const r = Object.values(s).some(
23
+ (t) => n(t) || i(t) || this.isAssetValue(t)
24
+ ), l = Object.values(s).some(
25
+ (t) => this.isAssetValue(t)
26
+ );
27
+ if (r)
25
28
  p(() => {
26
- const t = this.generateShadowCSS(o);
29
+ l && w()();
30
+ const t = this.generateShadowCSS(s);
27
31
  this.applyStyleChange(e, "boxShadow", t);
28
32
  });
29
33
  else {
30
- const t = this.generateShadowCSS(o);
34
+ const t = this.generateShadowCSS(s);
31
35
  this.applyStyles(e, { boxShadow: t });
32
36
  }
33
37
  }
34
- applyMultipleShadows(e, o) {
35
- if (o.some(
36
- (t) => Object.values(t).some((l) => n(l) || h(l))
37
- ))
38
+ applyMultipleShadows(e, s) {
39
+ const r = s.some(
40
+ (t) => Object.values(t).some(
41
+ (h) => n(h) || i(h) || this.isAssetValue(h)
42
+ )
43
+ ), l = s.some(
44
+ (t) => Object.values(t).some((h) => this.isAssetValue(h))
45
+ );
46
+ if (r)
38
47
  p(() => {
39
- const t = o.map((l) => this.generateShadowCSS(l)).join(", ");
48
+ l && w()();
49
+ const t = s.map((h) => this.generateShadowCSS(h)).join(", ");
40
50
  this.applyStyleChange(e, "boxShadow", t);
41
51
  });
42
52
  else {
43
- const t = o.map((l) => this.generateShadowCSS(l)).join(", ");
53
+ const t = s.map((h) => this.generateShadowCSS(h)).join(", ");
44
54
  this.applyStyles(e, { boxShadow: t });
45
55
  }
46
56
  }
47
57
  generateShadowCSS(e) {
48
- const o = this.resolveValue(e.x, 0), a = this.resolveValue(e.y, 0), t = this.resolveValue(e.blur !== void 0 ? e.blur : e.radius, 0), l = e.spread !== void 0 ? this.resolveValue(e.spread, 0) : 0, S = this.resolveValue(e.color, "rgba(0,0,0,0.25)");
49
- return `${this.resolveValue(e.inset, !1) ? "inset " : ""}${o}px ${a}px ${t}px ${l}px ${S}`;
58
+ const s = this.resolveValue(e.x, 0), r = this.resolveValue(e.y, 0), l = this.resolveValue(e.blur !== void 0 ? e.blur : e.radius, 0), t = e.spread !== void 0 ? this.resolveValue(e.spread, 0) : 0, h = this.resolveValue(e.color, "rgba(0,0,0,0.25)");
59
+ return `${this.resolveValue(e.inset, !1) ? "inset " : ""}${s}px ${r}px ${l}px ${t}px ${h}`;
50
60
  }
51
- resolveValue(e, o) {
52
- return n(e) || h(e) ? e() : typeof e == "object" && e !== null && "resolve" in e && typeof e.resolve == "function" ? e.resolve() : e !== void 0 ? e : o;
61
+ resolveValue(e, s) {
62
+ return n(e) || i(e) ? e() : this.isAssetValue(e) ? e.resolve() : e !== void 0 ? e : s;
53
63
  }
54
64
  }
55
- class u extends c {
65
+ class S extends y {
56
66
  constructor(e) {
57
- const o = {};
58
- for (const [a, t] of Object.entries(e))
59
- typeof t == "function" && "peek" in t ? o[a] = t.peek() : o[a] = t;
60
- super(o);
61
- i(this, "type", "textShadow");
62
- i(this, "priority", 26);
67
+ const s = {};
68
+ for (const [r, l] of Object.entries(e))
69
+ typeof l == "function" && "peek" in l ? s[r] = l.peek() : s[r] = l;
70
+ super(s);
71
+ u(this, "type", "textShadow");
72
+ u(this, "priority", 26);
63
73
  }
64
- apply(e, o) {
65
- o.element && this.applyTextShadowStyles(o.element, this.properties);
74
+ apply(e, s) {
75
+ s.element && this.applyTextShadowStyles(s.element, this.properties);
66
76
  }
67
- applyTextShadowStyles(e, o) {
68
- o.textShadow && (typeof o.textShadow == "string" ? this.applyStyles(e, { textShadow: o.textShadow }) : Array.isArray(o.textShadow) ? this.applyMultipleTextShadows(e, o.textShadow) : this.applySingleTextShadow(e, o.textShadow));
77
+ applyTextShadowStyles(e, s) {
78
+ s.textShadow && (typeof s.textShadow == "string" ? this.applyStyles(e, { textShadow: s.textShadow }) : Array.isArray(s.textShadow) ? this.applyMultipleTextShadows(e, s.textShadow) : this.applySingleTextShadow(e, s.textShadow));
69
79
  }
70
- applySingleTextShadow(e, o) {
71
- if (Object.values(o).some(
72
- (t) => n(t) || h(t)
73
- ))
80
+ applySingleTextShadow(e, s) {
81
+ const r = Object.values(s).some(
82
+ (t) => n(t) || i(t) || this.isAssetValue(t)
83
+ ), l = Object.values(s).some(
84
+ (t) => this.isAssetValue(t)
85
+ );
86
+ if (r)
74
87
  p(() => {
75
- const t = this.generateTextShadowCSS(o);
88
+ l && w()();
89
+ const t = this.generateTextShadowCSS(s);
76
90
  this.applyStyleChange(e, "textShadow", t);
77
91
  });
78
92
  else {
79
- const t = this.generateTextShadowCSS(o);
93
+ const t = this.generateTextShadowCSS(s);
80
94
  this.applyStyles(e, { textShadow: t });
81
95
  }
82
96
  }
83
- applyMultipleTextShadows(e, o) {
84
- if (o.some(
85
- (t) => Object.values(t).some((l) => n(l) || h(l))
86
- ))
97
+ applyMultipleTextShadows(e, s) {
98
+ const r = s.some(
99
+ (t) => Object.values(t).some(
100
+ (h) => n(h) || i(h) || this.isAssetValue(h)
101
+ )
102
+ ), l = s.some(
103
+ (t) => Object.values(t).some((h) => this.isAssetValue(h))
104
+ );
105
+ if (r)
87
106
  p(() => {
88
- const t = o.map((l) => this.generateTextShadowCSS(l)).join(", ");
107
+ l && w()();
108
+ const t = s.map((h) => this.generateTextShadowCSS(h)).join(", ");
89
109
  this.applyStyleChange(e, "textShadow", t);
90
110
  });
91
111
  else {
92
- const t = o.map((l) => this.generateTextShadowCSS(l)).join(", ");
112
+ const t = s.map((h) => this.generateTextShadowCSS(h)).join(", ");
93
113
  this.applyStyles(e, { textShadow: t });
94
114
  }
95
115
  }
96
116
  generateTextShadowCSS(e) {
97
- const o = this.resolveValue(e.x, 0), a = this.resolveValue(e.y, 0), t = this.resolveValue(e.blur !== void 0 ? e.blur : e.radius, 0), l = this.resolveValue(e.color, "rgba(0,0,0,0.5)");
98
- return `${o}px ${a}px ${t}px ${l}`;
117
+ const s = this.resolveValue(e.x, 0), r = this.resolveValue(e.y, 0), l = this.resolveValue(e.blur !== void 0 ? e.blur : e.radius, 0), t = this.resolveValue(e.color, "rgba(0,0,0,0.5)");
118
+ return `${s}px ${r}px ${l}px ${t}`;
99
119
  }
100
- resolveValue(e, o) {
101
- return n(e) || h(e) ? e() : typeof e == "object" && e !== null && "resolve" in e && typeof e.resolve == "function" ? e.resolve() : e !== void 0 ? e : o;
120
+ resolveValue(e, s) {
121
+ return n(e) || i(e) ? e() : this.isAssetValue(e) ? e.resolve() : e !== void 0 ? e : s;
102
122
  }
103
123
  }
104
- class x extends c {
124
+ class f extends y {
105
125
  constructor(e) {
106
- const o = {};
107
- for (const [a, t] of Object.entries(e))
108
- typeof t == "function" && "peek" in t ? o[a] = t.peek() : o[a] = t;
109
- super(o);
110
- i(this, "type", "dropShadow");
111
- i(this, "priority", 27);
126
+ const s = {};
127
+ for (const [r, l] of Object.entries(e))
128
+ typeof l == "function" && "peek" in l ? s[r] = l.peek() : s[r] = l;
129
+ super(s);
130
+ u(this, "type", "dropShadow");
131
+ u(this, "priority", 27);
112
132
  }
113
- apply(e, o) {
114
- o.element && this.applyDropShadowStyles(o.element, this.properties);
133
+ apply(e, s) {
134
+ s.element && this.applyDropShadowStyles(s.element, this.properties);
115
135
  }
116
- applyDropShadowStyles(e, o) {
117
- o.dropShadow && (typeof o.dropShadow == "string" ? this.applyFilterDropShadow(e, o.dropShadow) : Array.isArray(o.dropShadow) ? this.applyMultipleDropShadows(e, o.dropShadow) : this.applySingleDropShadow(e, o.dropShadow));
136
+ applyDropShadowStyles(e, s) {
137
+ s.dropShadow && (typeof s.dropShadow == "string" ? this.applyFilterDropShadow(e, s.dropShadow) : Array.isArray(s.dropShadow) ? this.applyMultipleDropShadows(e, s.dropShadow) : this.applySingleDropShadow(e, s.dropShadow));
118
138
  }
119
- applySingleDropShadow(e, o) {
120
- if (Object.values(o).some(
121
- (t) => n(t) || h(t)
122
- ))
139
+ applySingleDropShadow(e, s) {
140
+ const r = Object.values(s).some(
141
+ (t) => n(t) || i(t) || this.isAssetValue(t)
142
+ ), l = Object.values(s).some(
143
+ (t) => this.isAssetValue(t)
144
+ );
145
+ if (r)
123
146
  p(() => {
124
- const t = this.generateDropShadowCSS(o);
147
+ l && w()();
148
+ const t = this.generateDropShadowCSS(s);
125
149
  this.applyFilterDropShadow(e, t);
126
150
  });
127
151
  else {
128
- const t = this.generateDropShadowCSS(o);
152
+ const t = this.generateDropShadowCSS(s);
129
153
  this.applyFilterDropShadow(e, t);
130
154
  }
131
155
  }
132
- applyMultipleDropShadows(e, o) {
133
- if (o.some(
134
- (t) => Object.values(t).some((l) => n(l) || h(l))
135
- ))
156
+ applyMultipleDropShadows(e, s) {
157
+ const r = s.some(
158
+ (t) => Object.values(t).some(
159
+ (h) => n(h) || i(h) || this.isAssetValue(h)
160
+ )
161
+ ), l = s.some(
162
+ (t) => Object.values(t).some((h) => this.isAssetValue(h))
163
+ );
164
+ if (r)
136
165
  p(() => {
137
- const t = o.map((l) => `drop-shadow(${this.generateDropShadowCSS(l)})`).join(" ");
166
+ l && w()();
167
+ const t = s.map((h) => `drop-shadow(${this.generateDropShadowCSS(h)})`).join(" ");
138
168
  this.applyStyles(e, { filter: t });
139
169
  });
140
170
  else {
141
- const t = o.map((l) => `drop-shadow(${this.generateDropShadowCSS(l)})`).join(" ");
171
+ const t = s.map((h) => `drop-shadow(${this.generateDropShadowCSS(h)})`).join(" ");
142
172
  this.applyStyles(e, { filter: t });
143
173
  }
144
174
  }
145
- applyFilterDropShadow(e, o) {
146
- const t = (e.style.filter || "").split(" ").filter((S) => S && !S.startsWith("drop-shadow(")).join(" "), l = t ? `${t} drop-shadow(${o})` : `drop-shadow(${o})`;
147
- this.applyStyles(e, { filter: l });
175
+ applyFilterDropShadow(e, s) {
176
+ const r = e.style.filter || "", l = this.removeDropShadowFunctions(r), t = l ? `${l} drop-shadow(${s})` : `drop-shadow(${s})`;
177
+ this.applyStyles(e, { filter: t });
148
178
  }
149
179
  generateDropShadowCSS(e) {
150
- const o = this.resolveValue(e.x, 0), a = this.resolveValue(e.y, 0), t = this.resolveValue(e.blur !== void 0 ? e.blur : e.radius, 0), l = this.resolveValue(e.color, "rgba(0,0,0,0.25)");
151
- return `${o}px ${a}px ${t}px ${l}`;
180
+ const s = this.resolveValue(e.x, 0), r = this.resolveValue(e.y, 0), l = this.resolveValue(e.blur !== void 0 ? e.blur : e.radius, 0), t = this.resolveValue(e.color, "rgba(0,0,0,0.25)");
181
+ return `${s}px ${r}px ${l}px ${t}`;
152
182
  }
153
- resolveValue(e, o) {
154
- return n(e) || h(e) ? e() : typeof e == "object" && e !== null && "resolve" in e && typeof e.resolve == "function" ? e.resolve() : e !== void 0 ? e : o;
183
+ resolveValue(e, s) {
184
+ return n(e) || i(e) ? e() : this.isAssetValue(e) ? e.resolve() : e !== void 0 ? e : s;
185
+ }
186
+ removeDropShadowFunctions(e) {
187
+ if (!e) return "";
188
+ let s = "", r = 0;
189
+ for (; r < e.length; )
190
+ if (e.startsWith("drop-shadow(", r)) {
191
+ r += 12;
192
+ let l = 1;
193
+ for (; r < e.length && l > 0; ) {
194
+ const t = e[r];
195
+ t === "(" && (l += 1), t === ")" && (l -= 1), r += 1;
196
+ }
197
+ for (; r < e.length && /\s/.test(e[r]); )
198
+ r += 1;
199
+ } else
200
+ s += e[r], r += 1;
201
+ return s.trim().replace(/\s+/g, " ");
155
202
  }
156
203
  }
157
- function w(r) {
158
- return new d({ shadow: r });
204
+ function c(o) {
205
+ return new d({ shadow: o });
159
206
  }
160
- function $(r) {
161
- return new u({ textShadow: r });
207
+ function j(o) {
208
+ return new S({ textShadow: o });
162
209
  }
163
- function j(r) {
164
- return new x({ dropShadow: r });
210
+ function $(o) {
211
+ return new f({ dropShadow: o });
165
212
  }
166
- function D(r) {
167
- return new d({ shadow: r });
213
+ function D(o) {
214
+ return new d({ shadow: o });
168
215
  }
169
- function O(r) {
170
- return new d({ shadow: { ...r, inset: !0 } });
216
+ function O(o) {
217
+ return new d({ shadow: { ...o, inset: !0 } });
171
218
  }
172
- function f(r) {
173
- const s = {
219
+ function g(o) {
220
+ const a = {
174
221
  none: "none",
175
222
  small: { x: 0, y: 1, blur: 3, spread: 0, color: "rgba(0, 0, 0, 0.12)" },
176
223
  medium: { x: 0, y: 4, blur: 6, spread: -1, color: "rgba(0, 0, 0, 0.1)" },
@@ -199,10 +246,10 @@ function f(r) {
199
246
  },
200
247
  outline: { x: 0, y: 0, blur: 0, spread: 1, color: "rgba(0, 0, 0, 0.05)" }
201
248
  };
202
- return new d({ shadow: s[r] });
249
+ return new d({ shadow: a[o] });
203
250
  }
204
- function R(r) {
205
- const s = {
251
+ function T(o) {
252
+ const a = {
206
253
  0: [],
207
254
  1: [
208
255
  { x: 0, y: 1, blur: 3, spread: 0, color: "rgba(0, 0, 0, 0.12)" },
@@ -224,182 +271,182 @@ function R(r) {
224
271
  { x: 0, y: 30, blur: 60, spread: 0, color: "rgba(0, 0, 0, 0.15)" },
225
272
  { x: 0, y: 8, blur: 16, spread: 0, color: "rgba(0, 0, 0, 0.12)" }
226
273
  ]
227
- }, e = s[r] || s[1];
274
+ }, e = a[o] || a[1];
228
275
  return new d({ shadow: e });
229
276
  }
230
- function T(r, s = 6) {
277
+ function M(o, a = 6) {
231
278
  const e = [
232
- { x: 0, y: 0, blur: s, spread: 0, color: r },
233
- { x: 0, y: 0, blur: s * 2, spread: 0, color: r + "80" },
279
+ { x: 0, y: 0, blur: a, spread: 0, color: o },
280
+ { x: 0, y: 0, blur: a * 2, spread: 0, color: o + "80" },
234
281
  // 50% opacity
235
- { x: 0, y: 0, blur: s * 3, spread: 0, color: r + "40" }
282
+ { x: 0, y: 0, blur: a * 3, spread: 0, color: o + "40" }
236
283
  // 25% opacity
237
284
  ];
238
285
  return new d({ shadow: e });
239
286
  }
240
- function M(r, s = 10) {
287
+ function k(o, a = 10) {
241
288
  const e = [
242
- { x: 0, y: 0, blur: s / 2, spread: 0, color: r },
243
- { x: 0, y: 0, blur: s, spread: 0, color: r + "CC" },
289
+ { x: 0, y: 0, blur: a / 2, spread: 0, color: o },
290
+ { x: 0, y: 0, blur: a, spread: 0, color: o + "CC" },
244
291
  // 80% opacity
245
- { x: 0, y: 0, blur: s * 2, spread: 0, color: r + "99" },
292
+ { x: 0, y: 0, blur: a * 2, spread: 0, color: o + "99" },
246
293
  // 60% opacity
247
- { x: 0, y: 0, blur: s * 3, spread: 0, color: r + "66" }
294
+ { x: 0, y: 0, blur: a * 3, spread: 0, color: o + "66" }
248
295
  // 40% opacity
249
296
  ];
250
297
  return new d({ shadow: e });
251
298
  }
252
- function k(r, s = !1) {
253
- const a = [
254
- { x: -8, y: -8, blur: 16, spread: 0, color: s ? "rgba(255, 255, 255, 0.1)" : "rgba(255, 255, 255, 0.7)" },
299
+ function F(o, a = !1) {
300
+ const r = [
301
+ { x: -8, y: -8, blur: 16, spread: 0, color: a ? "rgba(255, 255, 255, 0.1)" : "rgba(255, 255, 255, 0.7)" },
255
302
  // Top-left light
256
- { x: 8, y: 8, blur: 16, spread: 0, color: s ? "rgba(0, 0, 0, 0.5)" : "rgba(0, 0, 0, 0.15)" }
303
+ { x: 8, y: 8, blur: 16, spread: 0, color: a ? "rgba(0, 0, 0, 0.5)" : "rgba(0, 0, 0, 0.15)" }
257
304
  // Bottom-right dark
258
305
  ];
259
- return new d({ shadow: a });
306
+ return new d({ shadow: r });
260
307
  }
261
- function F(r, s = !1) {
262
- const a = [
263
- { x: 8, y: 8, blur: 16, spread: 0, color: s ? "rgba(0, 0, 0, 0.8)" : "rgba(0, 0, 0, 0.2)", inset: !0 },
308
+ function I(o, a = !1) {
309
+ const r = [
310
+ { x: 8, y: 8, blur: 16, spread: 0, color: a ? "rgba(0, 0, 0, 0.8)" : "rgba(0, 0, 0, 0.2)", inset: !0 },
264
311
  // Inner dark
265
- { x: -8, y: -8, blur: 16, spread: 0, color: s ? "rgba(255, 255, 255, 0.05)" : "rgba(255, 255, 255, 0.5)", inset: !0 }
312
+ { x: -8, y: -8, blur: 16, spread: 0, color: a ? "rgba(255, 255, 255, 0.05)" : "rgba(255, 255, 255, 0.5)", inset: !0 }
266
313
  // Inner light
267
314
  ];
268
- return new d({ shadow: a });
315
+ return new d({ shadow: r });
269
316
  }
270
- function A(r = 3, s = 0.6) {
317
+ function R(o = 3, a = 0.6) {
271
318
  const e = [];
272
- for (let o = 1; o <= r; o++) {
273
- const a = Math.max(0.05, s * (1 - (o - 1) / r));
319
+ for (let s = 1; s <= o; s++) {
320
+ const r = Math.max(0.05, a * (1 - (s - 1) / o));
274
321
  e.push({
275
322
  x: 0,
276
- y: o * 2,
277
- blur: o * 4,
323
+ y: s * 2,
324
+ blur: s * 4,
278
325
  spread: 0,
279
- color: `rgba(0, 0, 0, ${a})`
326
+ color: `rgba(0, 0, 0, ${r})`
280
327
  });
281
328
  }
282
329
  return new d({ shadow: e });
283
330
  }
284
- function _(r = "rgba(0, 0, 0, 0.2)") {
285
- return new u({
286
- textShadow: { x: 0, y: 1, blur: 1, color: r }
331
+ function _(o = "rgba(0, 0, 0, 0.2)") {
332
+ return new S({
333
+ textShadow: { x: 0, y: 1, blur: 1, color: o }
287
334
  });
288
335
  }
289
- function E(r = "rgba(0, 0, 0, 0.5)") {
290
- return new u({
291
- textShadow: { x: 1, y: 1, blur: 3, color: r }
336
+ function E(o = "rgba(0, 0, 0, 0.5)") {
337
+ return new S({
338
+ textShadow: { x: 1, y: 1, blur: 3, color: o }
292
339
  });
293
340
  }
294
- function P(r, s = 1) {
341
+ function P(o, a = 1) {
295
342
  const e = [];
296
- for (let o = -s; o <= s; o++)
297
- for (let a = -s; a <= s; a++)
298
- (o !== 0 || a !== 0) && e.push({ x: o, y: a, blur: 0, color: r });
299
- return new u({ textShadow: e });
343
+ for (let s = -a; s <= a; s++)
344
+ for (let r = -a; r <= a; r++)
345
+ (s !== 0 || r !== 0) && e.push({ x: s, y: r, blur: 0, color: o });
346
+ return new S({ textShadow: e });
300
347
  }
301
- function B(r = "rgba(255, 255, 255, 0.8)", s = "rgba(0, 0, 0, 0.3)") {
348
+ function B(o = "rgba(255, 255, 255, 0.8)", a = "rgba(0, 0, 0, 0.3)") {
302
349
  const e = [
303
- { x: 0, y: 1, blur: 0, color: r },
350
+ { x: 0, y: 1, blur: 0, color: o },
304
351
  // Light highlight
305
- { x: 0, y: -1, blur: 0, color: s }
352
+ { x: 0, y: -1, blur: 0, color: a }
306
353
  // Dark shadow
307
354
  ];
308
- return new u({ textShadow: e });
355
+ return new S({ textShadow: e });
309
356
  }
310
- function I(r = "rgba(0, 0, 0, 0.5)", s = "rgba(255, 255, 255, 0.2)") {
357
+ function U(o = "rgba(0, 0, 0, 0.5)", a = "rgba(255, 255, 255, 0.2)") {
311
358
  const e = [
312
- { x: 0, y: 1, blur: 0, color: r },
359
+ { x: 0, y: 1, blur: 0, color: o },
313
360
  // Dark shadow
314
- { x: 0, y: -1, blur: 0, color: s }
361
+ { x: 0, y: -1, blur: 0, color: a }
315
362
  // Light highlight
316
363
  ];
317
- return new u({ textShadow: e });
364
+ return new S({ textShadow: e });
318
365
  }
319
- function U(r = {}) {
320
- const { color: s = "rgba(0, 0, 0, 0.2)", radius: e = 10, x: o = 0, y: a = 0 } = r;
366
+ function W(o = {}) {
367
+ const { color: a = "rgba(0, 0, 0, 0.2)", radius: e = 10, x: s = 0, y: r = 0 } = o;
321
368
  return new d({
322
- shadow: { x: o, y: a, blur: e, color: s }
369
+ shadow: { x: s, y: r, blur: e, color: a }
323
370
  });
324
371
  }
325
- const W = {
372
+ const q = {
326
373
  /**
327
374
  * Top shadow (light coming from below)
328
375
  */
329
- top: (r = 4) => w({
376
+ top: (o = 4) => c({
330
377
  x: 0,
331
- y: -r,
332
- blur: r * 2,
378
+ y: -o,
379
+ blur: o * 2,
333
380
  color: "rgba(0,0,0,0.15)"
334
381
  }),
335
382
  /**
336
383
  * Bottom shadow (light coming from above) - most common
337
384
  */
338
- bottom: (r = 4) => w({
385
+ bottom: (o = 4) => c({
339
386
  x: 0,
340
- y: r,
341
- blur: r * 2,
387
+ y: o,
388
+ blur: o * 2,
342
389
  color: "rgba(0,0,0,0.15)"
343
390
  }),
344
391
  /**
345
392
  * Left shadow (light coming from right)
346
393
  */
347
- left: (r = 4) => w({
348
- x: -r,
394
+ left: (o = 4) => c({
395
+ x: -o,
349
396
  y: 0,
350
- blur: r * 2,
397
+ blur: o * 2,
351
398
  color: "rgba(0,0,0,0.15)"
352
399
  }),
353
400
  /**
354
401
  * Right shadow (light coming from left)
355
402
  */
356
- right: (r = 4) => w({
357
- x: r,
403
+ right: (o = 4) => c({
404
+ x: o,
358
405
  y: 0,
359
- blur: r * 2,
406
+ blur: o * 2,
360
407
  color: "rgba(0,0,0,0.15)"
361
408
  }),
362
409
  /**
363
410
  * All-around shadow (ambient lighting)
364
411
  */
365
- around: (r = 6) => w({
412
+ around: (o = 6) => c({
366
413
  x: 0,
367
414
  y: 0,
368
- blur: r * 2,
369
- spread: r,
415
+ blur: o * 2,
416
+ spread: o,
370
417
  color: "rgba(0,0,0,0.1)"
371
418
  })
372
419
  };
373
- function q(r, s, e = { x: 0, y: 0, blur: 0, color: "transparent" }) {
374
- const o = r() ? s : e;
375
- return new d({ shadow: o });
420
+ function z(o, a, e = { x: 0, y: 0, blur: 0, color: "transparent" }) {
421
+ const s = o() ? a : e;
422
+ return new d({ shadow: s });
376
423
  }
377
- function z(r = 200) {
378
- return f("medium");
424
+ function G(o = 200) {
425
+ return g("medium");
379
426
  }
380
427
  export {
381
- x as DropShadowModifier,
428
+ f as DropShadowModifier,
382
429
  d as ShadowModifier,
383
- u as TextShadowModifier,
384
- z as animatedShadow,
385
- j as dropShadow,
386
- R as elevationShadow,
387
- T as glowEffect,
430
+ S as TextShadowModifier,
431
+ G as animatedShadow,
432
+ $ as dropShadow,
433
+ T as elevationShadow,
434
+ M as glowEffect,
388
435
  O as insetShadow,
389
- A as layeredShadow,
390
- M as neonEffect,
391
- k as neumorphism,
392
- F as neumorphismPressed,
393
- q as reactiveShadow,
394
- w as shadow,
395
- W as shadowDirections,
396
- f as shadowPreset,
436
+ R as layeredShadow,
437
+ k as neonEffect,
438
+ F as neumorphism,
439
+ I as neumorphismPressed,
440
+ z as reactiveShadow,
441
+ c as shadow,
442
+ q as shadowDirections,
443
+ g as shadowPreset,
397
444
  D as shadows,
398
- U as swiftUIShadow,
445
+ W as swiftUIShadow,
399
446
  B as textEmbossed,
400
- I as textEngraved,
447
+ U as textEngraved,
401
448
  P as textOutline,
402
- $ as textShadow,
449
+ j as textShadow,
403
450
  E as textShadowStrong,
404
451
  _ as textShadowSubtle
405
452
  };