@tachui/modifiers 0.8.0-alpha → 0.8.5-alpha
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.
- package/README.md +19 -9
- package/dist/animation/index.d.ts +11 -0
- package/dist/animation/index.d.ts.map +1 -0
- package/dist/appearance/background.d.ts +23 -6
- package/dist/appearance/background.d.ts.map +1 -1
- package/dist/appearance/border.d.ts +2 -2
- package/dist/appearance/border.d.ts.map +1 -1
- package/dist/appearance/clip-shape.d.ts +2 -2
- package/dist/appearance/clip-shape.d.ts.map +1 -1
- package/dist/appearance/clipped.d.ts +2 -2
- package/dist/appearance/clipped.d.ts.map +1 -1
- package/dist/appearance/foreground.d.ts +14 -5
- package/dist/appearance/foreground.d.ts.map +1 -1
- package/dist/appearance/index.js +11 -12
- package/dist/appearance/reactive-factories.d.ts +20 -0
- package/dist/appearance/reactive-factories.d.ts.map +1 -0
- package/dist/attributes/accessibility.d.ts +10 -0
- package/dist/attributes/accessibility.d.ts.map +1 -0
- package/dist/attributes/aria.d.ts +2 -2
- package/dist/attributes/aria.d.ts.map +1 -1
- package/dist/attributes/css-properties.d.ts +2 -2
- package/dist/attributes/css-properties.d.ts.map +1 -1
- package/dist/attributes/html.d.ts +2 -2
- package/dist/attributes/html.d.ts.map +1 -1
- package/dist/attributes/index.d.ts +1 -0
- package/dist/attributes/index.d.ts.map +1 -1
- package/dist/base.d.ts +6 -7
- package/dist/base.d.ts.map +1 -1
- package/dist/base.js +9 -840
- package/dist/basic/animation.d.ts +41 -0
- package/dist/basic/animation.d.ts.map +1 -0
- package/dist/basic/base.d.ts +7 -8
- package/dist/basic/base.d.ts.map +1 -1
- package/dist/basic/index.d.ts +19 -2
- package/dist/basic/index.d.ts.map +1 -1
- package/dist/basic/index.js +252 -0
- package/dist/basic/margin.d.ts +2 -2
- package/dist/basic/margin.d.ts.map +1 -1
- package/dist/basic/margin.js +13 -158
- package/dist/basic/padding.d.ts +2 -2
- package/dist/basic/padding.d.ts.map +1 -1
- package/dist/basic/padding.js +13 -153
- package/dist/basic/size.d.ts +2 -2
- package/dist/basic/size.d.ts.map +1 -1
- package/dist/basic/size.js +10 -76
- package/dist/effects/backdrop/index.d.ts +60 -0
- package/dist/effects/backdrop/index.d.ts.map +1 -0
- package/dist/effects/backdrop/index.js +118 -0
- package/dist/effects/effects/index.d.ts +190 -0
- package/dist/effects/effects/index.d.ts.map +1 -0
- package/dist/effects/filters/index.d.ts +297 -0
- package/dist/effects/filters/index.d.ts.map +1 -0
- package/dist/effects/filters/index.js +234 -0
- package/dist/effects/index.d.ts +14 -0
- package/dist/effects/index.d.ts.map +1 -0
- package/dist/effects/index.js +373 -0
- package/dist/effects/internal-exports.d.ts +9 -0
- package/dist/effects/internal-exports.d.ts.map +1 -0
- package/dist/effects/shadows/index.d.ts +316 -0
- package/dist/effects/shadows/index.d.ts.map +1 -0
- package/dist/effects/shadows/index.js +405 -0
- package/dist/effects/transforms/index.d.ts +316 -0
- package/dist/effects/transforms/index.d.ts.map +1 -0
- package/dist/effects/transforms/index.js +193 -0
- package/dist/elements/pseudo-elements.d.ts +2 -2
- package/dist/elements/pseudo-elements.d.ts.map +1 -1
- package/dist/essential-manifest.d.ts +5 -0
- package/dist/essential-manifest.d.ts.map +1 -0
- package/dist/index.d.ts +10 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +273 -881
- package/dist/interaction/allows-hit-testing.d.ts +1 -1
- package/dist/interaction/allows-hit-testing.d.ts.map +1 -1
- package/dist/interaction/dom-events.d.ts +35 -0
- package/dist/interaction/dom-events.d.ts.map +1 -0
- package/dist/interaction/focus-events.d.ts +54 -0
- package/dist/interaction/focus-events.d.ts.map +1 -0
- package/dist/interaction/focusable.d.ts +1 -1
- package/dist/interaction/focusable.d.ts.map +1 -1
- package/dist/interaction/focused.d.ts +1 -1
- package/dist/interaction/focused.d.ts.map +1 -1
- package/dist/interaction/index.d.ts +5 -0
- package/dist/interaction/index.d.ts.map +1 -1
- package/dist/interaction/index.js +75 -28
- package/dist/interaction/keyboard-events.d.ts +69 -0
- package/dist/interaction/keyboard-events.d.ts.map +1 -0
- package/dist/interaction/keyboard-shortcut.d.ts +1 -1
- package/dist/interaction/keyboard-shortcut.d.ts.map +1 -1
- package/dist/interaction/mouse-events.d.ts +125 -0
- package/dist/interaction/mouse-events.d.ts.map +1 -0
- package/dist/interaction/on-continuous-hover.d.ts +1 -1
- package/dist/interaction/on-continuous-hover.d.ts.map +1 -1
- package/dist/interaction/on-hover.d.ts +30 -0
- package/dist/interaction/on-hover.d.ts.map +1 -0
- package/dist/interaction/on-long-press-gesture.d.ts +1 -1
- package/dist/interaction/on-long-press-gesture.d.ts.map +1 -1
- package/dist/interaction/scroll.d.ts +2 -2
- package/dist/interaction/scroll.d.ts.map +1 -1
- package/dist/layout/aspect-ratio.d.ts +2 -2
- package/dist/layout/aspect-ratio.d.ts.map +1 -1
- package/dist/layout/fixed-size.d.ts +2 -2
- package/dist/layout/fixed-size.d.ts.map +1 -1
- package/dist/layout/flexbox.d.ts +2 -2
- package/dist/layout/flexbox.d.ts.map +1 -1
- package/dist/layout/frame.d.ts +13 -0
- package/dist/layout/frame.d.ts.map +1 -0
- package/dist/layout/index.d.ts +2 -0
- package/dist/layout/index.d.ts.map +1 -1
- package/dist/layout/index.js +25 -22
- package/dist/layout/offset.d.ts +2 -2
- package/dist/layout/offset.d.ts.map +1 -1
- package/dist/layout/overlay.d.ts +1 -1
- package/dist/layout/overlay.d.ts.map +1 -1
- package/dist/layout/position.d.ts +2 -2
- package/dist/layout/position.d.ts.map +1 -1
- package/dist/layout/resizable.d.ts +6 -0
- package/dist/layout/resizable.d.ts.map +1 -0
- package/dist/layout/scale-effect.d.ts +6 -5
- package/dist/layout/scale-effect.d.ts.map +1 -1
- package/dist/layout/z-index.d.ts +2 -2
- package/dist/layout/z-index.d.ts.map +1 -1
- package/dist/lifecycle/index.d.ts +6 -0
- package/dist/lifecycle/index.d.ts.map +1 -0
- package/dist/modifiers-basic-DLmE749_.js +5604 -0
- package/dist/navigation/index.d.ts +12 -0
- package/dist/navigation/index.d.ts.map +1 -0
- package/dist/preload/backdrop.d.ts +5 -0
- package/dist/preload/backdrop.d.ts.map +1 -0
- package/dist/preload/backdrop.js +7 -0
- package/dist/preload/basic.d.ts +7 -0
- package/dist/preload/basic.d.ts.map +1 -0
- package/dist/preload/basic.js +251 -0
- package/dist/preload/effects.d.ts +6 -0
- package/dist/preload/effects.d.ts.map +1 -0
- package/dist/preload/effects.js +95 -0
- package/dist/preload/filters.d.ts +6 -0
- package/dist/preload/filters.d.ts.map +1 -0
- package/dist/preload/filters.js +31 -0
- package/dist/preload/shadows.d.ts +5 -0
- package/dist/preload/shadows.d.ts.map +1 -0
- package/dist/preload/shadows.js +27 -0
- package/dist/preload/transforms.d.ts +5 -0
- package/dist/preload/transforms.d.ts.map +1 -0
- package/dist/preload/transforms.js +30 -0
- package/dist/types.d.ts +7 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -1
- package/dist/typography/font.d.ts +5 -2
- package/dist/typography/font.d.ts.map +1 -1
- package/dist/typography/index.d.ts +1 -0
- package/dist/typography/index.d.ts.map +1 -1
- package/dist/typography/index.js +26 -28
- package/dist/typography/text.d.ts +2 -2
- package/dist/typography/text.d.ts.map +1 -1
- package/dist/typography/text.js +9 -127
- package/dist/typography/typography.d.ts +6 -4
- package/dist/typography/typography.d.ts.map +1 -1
- package/dist/utility/as-html-validator.d.ts +20 -0
- package/dist/utility/as-html-validator.d.ts.map +1 -0
- package/dist/utility/as-html.d.ts +65 -0
- package/dist/utility/as-html.d.ts.map +1 -0
- package/dist/utility/basic-sanitizer.d.ts +54 -0
- package/dist/utility/basic-sanitizer.d.ts.map +1 -0
- package/dist/utility/css.d.ts +2 -2
- package/dist/utility/css.d.ts.map +1 -1
- package/dist/utility/index.d.ts +3 -0
- package/dist/utility/index.d.ts.map +1 -1
- package/dist/utility/index.js +19 -15
- package/dist/utility/utility.d.ts +2 -2
- package/dist/utility/utility.d.ts.map +1 -1
- package/dist/version.d.ts +14 -0
- package/dist/version.d.ts.map +1 -0
- package/package.json +59 -4
- package/dist/allows-hit-testing-DscPrcOw.js +0 -464
- package/dist/allows-hit-testing-DscPrcOw.js.map +0 -1
- package/dist/appearance/index.js.map +0 -1
- package/dist/base-CkGf4b9G.js +0 -786
- package/dist/base-CkGf4b9G.js.map +0 -1
- package/dist/base.js.map +0 -1
- package/dist/basic/margin.js.map +0 -1
- package/dist/basic/padding.js.map +0 -1
- package/dist/basic/size.js.map +0 -1
- package/dist/clipped-CCW8gJqJ.js +0 -282
- package/dist/clipped-CCW8gJqJ.js.map +0 -1
- package/dist/css-CJEXRr6H.js +0 -124
- package/dist/css-CJEXRr6H.js.map +0 -1
- package/dist/font-3qM2Z97N.js +0 -135
- package/dist/font-3qM2Z97N.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/interaction/index.js.map +0 -1
- package/dist/layout/index.js.map +0 -1
- package/dist/overlay-DDiSLprp.js +0 -774
- package/dist/overlay-DDiSLprp.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/typography/index.js.map +0 -1
- package/dist/typography/text.js.map +0 -1
- package/dist/utility/index.js.map +0 -1
package/dist/overlay-DDiSLprp.js
DELETED
|
@@ -1,774 +0,0 @@
|
|
|
1
|
-
var b = Object.defineProperty;
|
|
2
|
-
var S = (o, r, e) => r in o ? b(o, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[r] = e;
|
|
3
|
-
var c = (o, r, e) => S(o, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
-
import { B as m } from "./base-CkGf4b9G.js";
|
|
5
|
-
import { isSignal as l, isComputed as f, createEffect as g } from "@tachui/core/reactive";
|
|
6
|
-
import { BaseModifier as w } from "./base.js";
|
|
7
|
-
class y extends m {
|
|
8
|
-
// Optimized priority for layout modifiers
|
|
9
|
-
constructor(e) {
|
|
10
|
-
super(e);
|
|
11
|
-
c(this, "type", "flexbox");
|
|
12
|
-
c(this, "priority", 60);
|
|
13
|
-
}
|
|
14
|
-
apply(e, t) {
|
|
15
|
-
if (!t.element) return;
|
|
16
|
-
const i = this.computeFlexboxStyles(this.properties);
|
|
17
|
-
this.applyStyles(t.element, i);
|
|
18
|
-
}
|
|
19
|
-
computeFlexboxStyles(e) {
|
|
20
|
-
const t = {}, i = (n) => typeof n == "number" ? `${n}px` : typeof n == "string" ? /^-?\d*\.?\d+(px|rem|em|%|fr|vw|vh|vmin|vmax)$/.test(n) || [
|
|
21
|
-
"auto",
|
|
22
|
-
"content",
|
|
23
|
-
"max-content",
|
|
24
|
-
"min-content",
|
|
25
|
-
"fit-content",
|
|
26
|
-
"initial",
|
|
27
|
-
"inherit",
|
|
28
|
-
"unset",
|
|
29
|
-
"none"
|
|
30
|
-
].includes(n) ? n : `${n}px` : String(n);
|
|
31
|
-
return e.display !== void 0 && (t.display = e.display), e.flexGrow !== void 0 && (t.flexGrow = e.flexGrow.toString()), e.flexShrink !== void 0 && (t.flexShrink = e.flexShrink.toString()), e.flexBasis !== void 0 && (t.flexBasis = i(e.flexBasis)), e.flex !== void 0 && (t.flex = typeof e.flex == "number" ? e.flex.toString() : e.flex), e.justifyContent !== void 0 && (t.justifyContent = e.justifyContent), e.alignItems !== void 0 && (t.alignItems = e.alignItems), e.alignContent !== void 0 && (t.alignContent = e.alignContent), e.alignSelf !== void 0 && (t.alignSelf = e.alignSelf), e.flexDirection !== void 0 && (t.flexDirection = e.flexDirection), e.flexWrap !== void 0 && (t.flexWrap = e.flexWrap), e.flexFlow !== void 0 && (t.flexFlow = e.flexFlow), e.gap !== void 0 && (t.gap = i(e.gap)), e.rowGap !== void 0 && (t.rowGap = i(e.rowGap)), e.columnGap !== void 0 && (t.columnGap = i(e.columnGap)), e.placeItems !== void 0 && (t.placeItems = e.placeItems), e.placeContent !== void 0 && (t.placeContent = e.placeContent), e.placeSelf !== void 0 && (t.placeSelf = e.placeSelf), t;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
function d(o) {
|
|
35
|
-
return new y(o);
|
|
36
|
-
}
|
|
37
|
-
function $(o) {
|
|
38
|
-
return new y({ flexGrow: o });
|
|
39
|
-
}
|
|
40
|
-
function D(o) {
|
|
41
|
-
return new y({ flexShrink: o });
|
|
42
|
-
}
|
|
43
|
-
function _(o) {
|
|
44
|
-
return new y({ flexBasis: o });
|
|
45
|
-
}
|
|
46
|
-
function G(o) {
|
|
47
|
-
return new y({ justifyContent: o });
|
|
48
|
-
}
|
|
49
|
-
function F(o) {
|
|
50
|
-
return new y({ alignItems: o });
|
|
51
|
-
}
|
|
52
|
-
function A(o) {
|
|
53
|
-
return new y({ alignSelf: o });
|
|
54
|
-
}
|
|
55
|
-
function T(o) {
|
|
56
|
-
return new y({ gap: o });
|
|
57
|
-
}
|
|
58
|
-
function R(o) {
|
|
59
|
-
return new y({ flexDirection: o });
|
|
60
|
-
}
|
|
61
|
-
function z(o) {
|
|
62
|
-
return new y({ flexWrap: o });
|
|
63
|
-
}
|
|
64
|
-
const Z = {
|
|
65
|
-
/**
|
|
66
|
-
* Standard flex container
|
|
67
|
-
* Sets display: flex for basic flex container
|
|
68
|
-
*/
|
|
69
|
-
container: () => d({ display: "flex" }),
|
|
70
|
-
/**
|
|
71
|
-
* Inline flex container
|
|
72
|
-
* Sets display: inline-flex for inline flex behavior
|
|
73
|
-
*/
|
|
74
|
-
inline: () => d({ display: "inline-flex" }),
|
|
75
|
-
/**
|
|
76
|
-
* Horizontal layout with center alignment
|
|
77
|
-
* Perfect for nav bars, button groups
|
|
78
|
-
*/
|
|
79
|
-
hcenter: () => d({
|
|
80
|
-
display: "flex",
|
|
81
|
-
flexDirection: "row",
|
|
82
|
-
justifyContent: "center",
|
|
83
|
-
alignItems: "center"
|
|
84
|
-
}),
|
|
85
|
-
/**
|
|
86
|
-
* Vertical layout with center alignment
|
|
87
|
-
* Perfect for cards, modals, centered content
|
|
88
|
-
*/
|
|
89
|
-
vcenter: () => d({
|
|
90
|
-
display: "flex",
|
|
91
|
-
flexDirection: "column",
|
|
92
|
-
justifyContent: "center",
|
|
93
|
-
alignItems: "center"
|
|
94
|
-
}),
|
|
95
|
-
/**
|
|
96
|
-
* Space between layout
|
|
97
|
-
* Common for headers, footers, navigation
|
|
98
|
-
*/
|
|
99
|
-
spaceBetween: () => d({
|
|
100
|
-
display: "flex",
|
|
101
|
-
justifyContent: "space-between",
|
|
102
|
-
alignItems: "center"
|
|
103
|
-
}),
|
|
104
|
-
/**
|
|
105
|
-
* Space around layout
|
|
106
|
-
* For even distribution with edge spacing
|
|
107
|
-
*/
|
|
108
|
-
spaceAround: () => d({
|
|
109
|
-
display: "flex",
|
|
110
|
-
justifyContent: "space-around",
|
|
111
|
-
alignItems: "center"
|
|
112
|
-
}),
|
|
113
|
-
/**
|
|
114
|
-
* Column stack with spacing
|
|
115
|
-
* For vertical component stacks
|
|
116
|
-
*/
|
|
117
|
-
vstack: () => d({
|
|
118
|
-
display: "flex",
|
|
119
|
-
flexDirection: "column",
|
|
120
|
-
gap: 16
|
|
121
|
-
}),
|
|
122
|
-
/**
|
|
123
|
-
* Row with spacing
|
|
124
|
-
* For horizontal component layouts
|
|
125
|
-
*/
|
|
126
|
-
hstack: () => d({
|
|
127
|
-
display: "flex",
|
|
128
|
-
flexDirection: "row",
|
|
129
|
-
gap: 16,
|
|
130
|
-
alignItems: "center"
|
|
131
|
-
}),
|
|
132
|
-
/**
|
|
133
|
-
* Card layout
|
|
134
|
-
* Column with internal spacing
|
|
135
|
-
*/
|
|
136
|
-
card: () => d({
|
|
137
|
-
display: "flex",
|
|
138
|
-
flexDirection: "column",
|
|
139
|
-
gap: 12
|
|
140
|
-
}),
|
|
141
|
-
/**
|
|
142
|
-
* Form layout
|
|
143
|
-
* Column with form-appropriate spacing
|
|
144
|
-
*/
|
|
145
|
-
form: () => d({
|
|
146
|
-
display: "flex",
|
|
147
|
-
flexDirection: "column",
|
|
148
|
-
gap: 20
|
|
149
|
-
}),
|
|
150
|
-
/**
|
|
151
|
-
* Button group
|
|
152
|
-
* Horizontal with tight spacing
|
|
153
|
-
*/
|
|
154
|
-
buttonGroup: () => d({
|
|
155
|
-
display: "flex",
|
|
156
|
-
flexDirection: "row",
|
|
157
|
-
gap: 8,
|
|
158
|
-
alignItems: "center"
|
|
159
|
-
}),
|
|
160
|
-
/**
|
|
161
|
-
* Sidebar layout
|
|
162
|
-
* Vertical with stretch alignment
|
|
163
|
-
*/
|
|
164
|
-
sidebar: () => d({
|
|
165
|
-
display: "flex",
|
|
166
|
-
flexDirection: "column",
|
|
167
|
-
alignItems: "stretch"
|
|
168
|
-
}),
|
|
169
|
-
/**
|
|
170
|
-
* Responsive wrap
|
|
171
|
-
* Wrapping layout with gaps
|
|
172
|
-
*/
|
|
173
|
-
wrap: () => d({
|
|
174
|
-
display: "flex",
|
|
175
|
-
flexWrap: "wrap",
|
|
176
|
-
gap: 16
|
|
177
|
-
}),
|
|
178
|
-
/**
|
|
179
|
-
* Full flex item
|
|
180
|
-
* Grows and shrinks to fill space
|
|
181
|
-
*/
|
|
182
|
-
fill: () => d({
|
|
183
|
-
flex: 1
|
|
184
|
-
}),
|
|
185
|
-
/**
|
|
186
|
-
* Fixed flex item
|
|
187
|
-
* Doesn't grow or shrink
|
|
188
|
-
*/
|
|
189
|
-
fixed: () => d({
|
|
190
|
-
flexGrow: 0,
|
|
191
|
-
flexShrink: 0
|
|
192
|
-
}),
|
|
193
|
-
/**
|
|
194
|
-
* Stretch alignment
|
|
195
|
-
* Items stretch to container height
|
|
196
|
-
*/
|
|
197
|
-
stretch: () => d({
|
|
198
|
-
display: "flex",
|
|
199
|
-
alignItems: "stretch"
|
|
200
|
-
})
|
|
201
|
-
};
|
|
202
|
-
class E extends m {
|
|
203
|
-
constructor() {
|
|
204
|
-
super(...arguments);
|
|
205
|
-
c(this, "type", "offset");
|
|
206
|
-
c(this, "priority", 35);
|
|
207
|
-
}
|
|
208
|
-
// High priority for transform operations
|
|
209
|
-
apply(e, t) {
|
|
210
|
-
if (!t.element) return;
|
|
211
|
-
const { x: i, y: n = 0 } = this.properties;
|
|
212
|
-
l(i) || f(i) || l(n) || f(n) ? g(() => {
|
|
213
|
-
const s = l(i) || f(i) ? i() : i, a = l(n) || f(n) ? n() : n;
|
|
214
|
-
this.applyOffset(t.element, s, a);
|
|
215
|
-
}) : this.applyOffset(t.element, i, n);
|
|
216
|
-
}
|
|
217
|
-
applyOffset(e, t, i) {
|
|
218
|
-
const n = this.toCSSValue(t), s = this.toCSSValue(i), a = `translate(${n}, ${s})`, p = (e.style.transform || "").replace(/\s*translate(?!Z\(0\))[XYZ3d]*\([^)]*\)\s*/g, " ").replace(/\s+/g, " ").trim(), v = p ? `${p} ${a}` : a;
|
|
219
|
-
e.style.transform = v;
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* Development mode validation
|
|
223
|
-
*/
|
|
224
|
-
validateOffset(e, t) {
|
|
225
|
-
if (typeof process < "u" && process.env.NODE_ENV === "development") {
|
|
226
|
-
typeof e != "number" && !l(e) && !f(e) && console.warn(
|
|
227
|
-
`OffsetModifier: x value must be a number or reactive signal. Got: ${typeof e}`
|
|
228
|
-
), t !== void 0 && typeof t != "number" && !l(t) && !f(t) && console.warn(
|
|
229
|
-
`OffsetModifier: y value must be a number or reactive signal. Got: ${typeof t}`
|
|
230
|
-
);
|
|
231
|
-
const i = (n, s) => {
|
|
232
|
-
const a = l(n) || f(n) ? n.peek?.() || n() : n;
|
|
233
|
-
typeof a == "number" && (Math.abs(a) > 1e3 && console.warn(
|
|
234
|
-
"OffsetModifier: Very large offset values may cause layout issues"
|
|
235
|
-
), a !== Math.round(a * 100) / 100 && console.info(
|
|
236
|
-
"OffsetModifier: Consider rounding offset values to 2 decimal places for better performance"
|
|
237
|
-
));
|
|
238
|
-
};
|
|
239
|
-
i(e), t !== void 0 && i(t);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
function B(o, r) {
|
|
244
|
-
const e = new E({ x: o, y: r ?? 0 });
|
|
245
|
-
return typeof process < "u" && process.env.NODE_ENV === "development" && e.validateOffset(o, r), e;
|
|
246
|
-
}
|
|
247
|
-
class M extends m {
|
|
248
|
-
constructor() {
|
|
249
|
-
super(...arguments);
|
|
250
|
-
c(this, "type", "scaleEffect");
|
|
251
|
-
c(this, "priority", 35);
|
|
252
|
-
}
|
|
253
|
-
// High priority for transform operations
|
|
254
|
-
apply(e, t) {
|
|
255
|
-
if (!t.element) return;
|
|
256
|
-
const { x: i, y: n, anchor: s = "center" } = this.properties, a = n ?? i;
|
|
257
|
-
typeof process < "u" && process.env.NODE_ENV === "development" && this.validateScale(i, a, s), l(i) || f(i) || l(a) || f(a) ? g(() => {
|
|
258
|
-
const u = l(i) || f(i) ? i() : i, p = l(a) || f(a) ? a() : a;
|
|
259
|
-
this.applyScale(
|
|
260
|
-
t.element,
|
|
261
|
-
u,
|
|
262
|
-
p,
|
|
263
|
-
s
|
|
264
|
-
);
|
|
265
|
-
}) : this.applyScale(t.element, i, a, s);
|
|
266
|
-
}
|
|
267
|
-
applyScale(e, t, i, n) {
|
|
268
|
-
const s = `scale(${t}, ${i})`;
|
|
269
|
-
e.style.transformOrigin = this.getTransformOrigin(n);
|
|
270
|
-
const u = (e.style.transform || "").replace(/\s*scale[XYZ3d]*\([^)]*\)\s*/g, " ").replace(/\s+/g, " ").trim(), p = u ? `${u} ${s}`.trim() : s;
|
|
271
|
-
e.style.transform = p;
|
|
272
|
-
}
|
|
273
|
-
getTransformOrigin(e) {
|
|
274
|
-
return {
|
|
275
|
-
center: "center center",
|
|
276
|
-
top: "center top",
|
|
277
|
-
topLeading: "left top",
|
|
278
|
-
topTrailing: "right top",
|
|
279
|
-
bottom: "center bottom",
|
|
280
|
-
bottomLeading: "left bottom",
|
|
281
|
-
bottomTrailing: "right bottom",
|
|
282
|
-
leading: "left center",
|
|
283
|
-
trailing: "right center"
|
|
284
|
-
}[e];
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Development mode validation
|
|
288
|
-
*/
|
|
289
|
-
validateScale(e, t, i) {
|
|
290
|
-
if (typeof process < "u" && process.env.NODE_ENV === "development") {
|
|
291
|
-
typeof e != "number" && !l(e) && !f(e) && console.warn(
|
|
292
|
-
`ScaleEffectModifier: x value must be a number or reactive signal. Got: ${typeof e}`
|
|
293
|
-
), typeof t != "number" && !l(t) && !f(t) && console.warn(
|
|
294
|
-
`ScaleEffectModifier: y value must be a number or reactive signal. Got: ${typeof t}`
|
|
295
|
-
);
|
|
296
|
-
const n = [
|
|
297
|
-
"center",
|
|
298
|
-
"top",
|
|
299
|
-
"topLeading",
|
|
300
|
-
"topTrailing",
|
|
301
|
-
"bottom",
|
|
302
|
-
"bottomLeading",
|
|
303
|
-
"bottomTrailing",
|
|
304
|
-
"leading",
|
|
305
|
-
"trailing"
|
|
306
|
-
];
|
|
307
|
-
n.includes(i) || console.warn(
|
|
308
|
-
`ScaleEffectModifier: Invalid anchor "${i}". Valid anchors:`,
|
|
309
|
-
n
|
|
310
|
-
);
|
|
311
|
-
const s = (a, u) => {
|
|
312
|
-
const p = l(a) || f(a) ? a.peek?.() || a() : a;
|
|
313
|
-
typeof p == "number" && (p <= 0 && console.warn(
|
|
314
|
-
`ScaleEffectModifier: ${u} scale value ${p} will make element invisible`
|
|
315
|
-
), p > 10 && console.warn(
|
|
316
|
-
`ScaleEffectModifier: Large ${u} scale (${p}) may impact performance and cause visual issues`
|
|
317
|
-
), p !== Math.round(p * 100) / 100 && console.info(
|
|
318
|
-
`ScaleEffectModifier: Consider rounding ${u} scale to 2 decimal places for better performance`
|
|
319
|
-
));
|
|
320
|
-
};
|
|
321
|
-
s(e, "x"), s(t, "y");
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
function j(o, r, e = "center") {
|
|
326
|
-
return new M({ x: o, y: r, anchor: e });
|
|
327
|
-
}
|
|
328
|
-
class x extends m {
|
|
329
|
-
constructor() {
|
|
330
|
-
super(...arguments);
|
|
331
|
-
c(this, "type", "aspectRatio");
|
|
332
|
-
c(this, "priority", 20);
|
|
333
|
-
}
|
|
334
|
-
// Medium priority for layout properties
|
|
335
|
-
apply(e, t) {
|
|
336
|
-
if (!t.element) return;
|
|
337
|
-
const { ratio: i, contentMode: n } = this.properties;
|
|
338
|
-
typeof process < "u" && process.env.NODE_ENV === "development" && this.validateAspectRatio(i, n), i !== void 0 ? l(i) || f(i) ? g(() => {
|
|
339
|
-
const s = i();
|
|
340
|
-
this.applyAspectRatio(
|
|
341
|
-
t.element,
|
|
342
|
-
s,
|
|
343
|
-
n
|
|
344
|
-
);
|
|
345
|
-
}) : this.applyAspectRatio(
|
|
346
|
-
t.element,
|
|
347
|
-
i,
|
|
348
|
-
n
|
|
349
|
-
) : this.applyContentMode(t.element, n);
|
|
350
|
-
}
|
|
351
|
-
applyAspectRatio(e, t, i) {
|
|
352
|
-
e.style.aspectRatio = String(t), this.applyContentMode(e, i);
|
|
353
|
-
}
|
|
354
|
-
applyContentMode(e, t) {
|
|
355
|
-
t === "fill" ? (e.style.objectFit = "cover", this.isMediaElement(e) || (e.style.width = "100%", e.style.height = "100%")) : (e.style.objectFit = "contain", this.isMediaElement(e) || (e.style.maxWidth = "100%", e.style.maxHeight = "100%"));
|
|
356
|
-
}
|
|
357
|
-
isMediaElement(e) {
|
|
358
|
-
return ["IMG", "VIDEO", "CANVAS", "SVG", "IFRAME"].includes(e.tagName);
|
|
359
|
-
}
|
|
360
|
-
/**
|
|
361
|
-
* Development mode validation
|
|
362
|
-
*/
|
|
363
|
-
validateAspectRatio(e, t) {
|
|
364
|
-
if (typeof process < "u" && process.env.NODE_ENV === "development") {
|
|
365
|
-
if (e !== void 0) {
|
|
366
|
-
typeof e != "number" && !l(e) && !f(e) && console.warn(
|
|
367
|
-
`AspectRatioModifier: ratio must be a number or reactive signal. Got: ${typeof e}`
|
|
368
|
-
);
|
|
369
|
-
const n = l(e) || f(e) ? e.peek?.() || e() : e;
|
|
370
|
-
typeof n == "number" && (n <= 0 && console.warn(
|
|
371
|
-
`AspectRatioModifier: ratio must be positive. Got: ${n}`
|
|
372
|
-
), n > 100 && console.warn(
|
|
373
|
-
`AspectRatioModifier: Very large ratio (${n}) may cause layout issues`
|
|
374
|
-
), n < 0.01 && console.warn(
|
|
375
|
-
`AspectRatioModifier: Very small ratio (${n}) may cause layout issues`
|
|
376
|
-
));
|
|
377
|
-
}
|
|
378
|
-
const i = ["fit", "fill"];
|
|
379
|
-
i.includes(t) || console.warn(
|
|
380
|
-
`AspectRatioModifier: Invalid content mode "${t}". Valid modes:`,
|
|
381
|
-
i
|
|
382
|
-
);
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
/**
|
|
387
|
-
* Get common aspect ratios
|
|
388
|
-
*/
|
|
389
|
-
c(x, "COMMON_RATIOS", {
|
|
390
|
-
square: 1,
|
|
391
|
-
portrait: 3 / 4,
|
|
392
|
-
landscape: 4 / 3,
|
|
393
|
-
widescreen: 16 / 9,
|
|
394
|
-
ultrawide: 21 / 9,
|
|
395
|
-
golden: 1.618,
|
|
396
|
-
photo: 3 / 2
|
|
397
|
-
});
|
|
398
|
-
function H(o, r = "fit") {
|
|
399
|
-
return new x({ ratio: o, contentMode: r });
|
|
400
|
-
}
|
|
401
|
-
class I extends m {
|
|
402
|
-
constructor() {
|
|
403
|
-
super(...arguments);
|
|
404
|
-
c(this, "type", "fixedSize");
|
|
405
|
-
c(this, "priority", 25);
|
|
406
|
-
}
|
|
407
|
-
// Medium priority for layout properties
|
|
408
|
-
apply(e, t) {
|
|
409
|
-
if (!t.element) return;
|
|
410
|
-
const { horizontal: i, vertical: n } = this.properties;
|
|
411
|
-
typeof process < "u" && process.env.NODE_ENV === "development" && this.validateFixedSize(i, n), this.applyFixedSize(t.element, i, n);
|
|
412
|
-
}
|
|
413
|
-
applyFixedSize(e, t, i) {
|
|
414
|
-
t && (e.style.maxWidth = "max-content", e.style.width = "max-content", e.style.flexShrink = "0", e.style.flexBasis = "auto", this.isTextElement(e) && (e.style.whiteSpace = "nowrap")), i && (e.style.maxHeight = "max-content", e.style.height = "max-content", this.isFlexItem(e) && (e.style.alignSelf = "flex-start")), t && i && (e.style.display = e.style.display || "inline-block");
|
|
415
|
-
}
|
|
416
|
-
isTextElement(e) {
|
|
417
|
-
return [
|
|
418
|
-
"P",
|
|
419
|
-
"SPAN",
|
|
420
|
-
"DIV",
|
|
421
|
-
"H1",
|
|
422
|
-
"H2",
|
|
423
|
-
"H3",
|
|
424
|
-
"H4",
|
|
425
|
-
"H5",
|
|
426
|
-
"H6",
|
|
427
|
-
"LABEL"
|
|
428
|
-
].includes(e.tagName) && e.childNodes.length > 0 || e.childNodes.length > 0 && Array.from(e.childNodes).some(
|
|
429
|
-
(i) => i.nodeType === Node.TEXT_NODE
|
|
430
|
-
);
|
|
431
|
-
}
|
|
432
|
-
isFlexItem(e) {
|
|
433
|
-
const t = e.parentElement;
|
|
434
|
-
if (!t) return !1;
|
|
435
|
-
const i = getComputedStyle(t).display;
|
|
436
|
-
return i === "flex" || i === "inline-flex";
|
|
437
|
-
}
|
|
438
|
-
/**
|
|
439
|
-
* Development mode validation
|
|
440
|
-
*/
|
|
441
|
-
validateFixedSize(e, t) {
|
|
442
|
-
typeof process < "u" && process.env.NODE_ENV === "development" && (typeof e != "boolean" && console.warn(
|
|
443
|
-
`FixedSizeModifier: horizontal must be a boolean. Got: ${typeof e}`
|
|
444
|
-
), typeof t != "boolean" && console.warn(
|
|
445
|
-
`FixedSizeModifier: vertical must be a boolean. Got: ${typeof t}`
|
|
446
|
-
), !e && !t && console.warn(
|
|
447
|
-
"FixedSizeModifier: Both horizontal and vertical are false - this modifier has no effect"
|
|
448
|
-
), e && t ? console.info(
|
|
449
|
-
"FixedSizeModifier: Element will be sized to its content in both dimensions (like display: inline-block)"
|
|
450
|
-
) : e ? console.info(
|
|
451
|
-
"FixedSizeModifier: Element width will be fixed to content size (prevents text wrapping)"
|
|
452
|
-
) : t && console.info(
|
|
453
|
-
"FixedSizeModifier: Element height will be fixed to content size"
|
|
454
|
-
));
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
function L(o = !0, r = !0) {
|
|
458
|
-
return new I({ horizontal: o, vertical: r });
|
|
459
|
-
}
|
|
460
|
-
class C extends m {
|
|
461
|
-
constructor() {
|
|
462
|
-
super(...arguments);
|
|
463
|
-
c(this, "type", "position");
|
|
464
|
-
c(this, "priority", 50);
|
|
465
|
-
}
|
|
466
|
-
// Highest priority to override other positioning
|
|
467
|
-
apply(e, t) {
|
|
468
|
-
if (!t.element) return;
|
|
469
|
-
const { position: i } = this.properties;
|
|
470
|
-
typeof process < "u" && process.env.NODE_ENV === "development" && this.validatePosition(i), l(i) || f(i) ? g(() => {
|
|
471
|
-
const n = i();
|
|
472
|
-
this.applyPosition(t.element, n);
|
|
473
|
-
}) : this.applyPosition(t.element, i);
|
|
474
|
-
}
|
|
475
|
-
applyPosition(e, t) {
|
|
476
|
-
e.style.position = t, this.applyPositionOptimizations(e, t);
|
|
477
|
-
}
|
|
478
|
-
applyPositionOptimizations(e, t) {
|
|
479
|
-
if (typeof process < "u" && process.env.NODE_ENV === "development")
|
|
480
|
-
switch (t) {
|
|
481
|
-
case "absolute":
|
|
482
|
-
this.warnIfMissingPositionedParent(e);
|
|
483
|
-
break;
|
|
484
|
-
case "fixed":
|
|
485
|
-
console.info(
|
|
486
|
-
"PositionModifier: Fixed positioning relative to viewport. Consider impact on mobile layouts."
|
|
487
|
-
);
|
|
488
|
-
break;
|
|
489
|
-
case "sticky":
|
|
490
|
-
this.warnIfMissingStickyProperties(e);
|
|
491
|
-
break;
|
|
492
|
-
case "relative":
|
|
493
|
-
break;
|
|
494
|
-
case "static":
|
|
495
|
-
this.warnIfHasPositioningProperties(e);
|
|
496
|
-
break;
|
|
497
|
-
}
|
|
498
|
-
(t === "absolute" || t === "fixed") && (e.style.zIndex || (e.style.zIndex = "0"), e.style.transform || (e.style.transform = "translateZ(0)"));
|
|
499
|
-
}
|
|
500
|
-
warnIfMissingPositionedParent(e) {
|
|
501
|
-
let t = e.parentElement, i = !1;
|
|
502
|
-
for (; t && t !== document.body; ) {
|
|
503
|
-
if (getComputedStyle(t).position !== "static") {
|
|
504
|
-
i = !0;
|
|
505
|
-
break;
|
|
506
|
-
}
|
|
507
|
-
t = t.parentElement;
|
|
508
|
-
}
|
|
509
|
-
i || console.warn(
|
|
510
|
-
"PositionModifier: Absolutely positioned element may not have expected behavior without a positioned parent (relative, absolute, or fixed)"
|
|
511
|
-
);
|
|
512
|
-
}
|
|
513
|
-
warnIfMissingStickyProperties(e) {
|
|
514
|
-
const t = getComputedStyle(e);
|
|
515
|
-
t.top !== "auto" || t.right !== "auto" || t.bottom !== "auto" || t.left !== "auto" || console.warn(
|
|
516
|
-
"PositionModifier: Sticky positioning requires at least one of top, right, bottom, or left to be set"
|
|
517
|
-
);
|
|
518
|
-
}
|
|
519
|
-
warnIfHasPositioningProperties(e) {
|
|
520
|
-
const t = getComputedStyle(e);
|
|
521
|
-
(t.top !== "auto" || t.right !== "auto" || t.bottom !== "auto" || t.left !== "auto") && console.warn(
|
|
522
|
-
"PositionModifier: Static positioning ignores top, right, bottom, and left properties"
|
|
523
|
-
);
|
|
524
|
-
}
|
|
525
|
-
/**
|
|
526
|
-
* Development mode validation
|
|
527
|
-
*/
|
|
528
|
-
validatePosition(e) {
|
|
529
|
-
if (typeof process < "u" && process.env.NODE_ENV === "development") {
|
|
530
|
-
const t = l(e) || f(e);
|
|
531
|
-
if (!t && typeof e != "string") {
|
|
532
|
-
console.warn(
|
|
533
|
-
`PositionModifier: position must be a string or reactive signal. Got: ${typeof e}`
|
|
534
|
-
);
|
|
535
|
-
return;
|
|
536
|
-
}
|
|
537
|
-
const i = t ? e.peek?.() || e() : e, n = [
|
|
538
|
-
"static",
|
|
539
|
-
"relative",
|
|
540
|
-
"absolute",
|
|
541
|
-
"fixed",
|
|
542
|
-
"sticky"
|
|
543
|
-
];
|
|
544
|
-
n.includes(i) || console.warn(
|
|
545
|
-
`PositionModifier: Invalid position value "${i}". Valid values:`,
|
|
546
|
-
n
|
|
547
|
-
), i === "sticky" && console.info(
|
|
548
|
-
"PositionModifier: Sticky positioning may need vendor prefixes for older browsers"
|
|
549
|
-
);
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
function X(o) {
|
|
554
|
-
return new C({ position: o });
|
|
555
|
-
}
|
|
556
|
-
class h extends m {
|
|
557
|
-
constructor() {
|
|
558
|
-
super(...arguments);
|
|
559
|
-
c(this, "type", "zIndex");
|
|
560
|
-
c(this, "priority", 45);
|
|
561
|
-
}
|
|
562
|
-
// High priority for layering
|
|
563
|
-
apply(e, t) {
|
|
564
|
-
if (!t.element) return;
|
|
565
|
-
const { zIndex: i } = this.properties;
|
|
566
|
-
typeof process < "u" && process.env.NODE_ENV === "development" && this.validateZIndex(i), l(i) || f(i) ? g(() => {
|
|
567
|
-
const n = i();
|
|
568
|
-
this.applyZIndex(t.element, n);
|
|
569
|
-
}) : this.applyZIndex(t.element, i);
|
|
570
|
-
}
|
|
571
|
-
applyZIndex(e, t) {
|
|
572
|
-
e.style.zIndex = String(t), this.ensureStackingContext(e, t);
|
|
573
|
-
}
|
|
574
|
-
ensureStackingContext(e, t) {
|
|
575
|
-
const s = getComputedStyle(e).position !== "static", a = this.isFlexItem(e), u = this.isGridItem(e);
|
|
576
|
-
!s && !a && !u && (e.style.position = "relative", typeof process < "u" && process.env.NODE_ENV === "development" && console.info(
|
|
577
|
-
"ZIndexModifier: Set position: relative on element to enable z-index stacking"
|
|
578
|
-
)), typeof process < "u" && process.env.NODE_ENV === "development" && this.provideStackingInsights(e, t);
|
|
579
|
-
}
|
|
580
|
-
isFlexItem(e) {
|
|
581
|
-
const t = e.parentElement;
|
|
582
|
-
if (!t) return !1;
|
|
583
|
-
const i = getComputedStyle(t).display;
|
|
584
|
-
return i === "flex" || i === "inline-flex";
|
|
585
|
-
}
|
|
586
|
-
isGridItem(e) {
|
|
587
|
-
const t = e.parentElement;
|
|
588
|
-
if (!t) return !1;
|
|
589
|
-
const i = getComputedStyle(t).display;
|
|
590
|
-
return i === "grid" || i === "inline-grid";
|
|
591
|
-
}
|
|
592
|
-
provideStackingInsights(e, t) {
|
|
593
|
-
t < 0 ? console.info(
|
|
594
|
-
"ZIndexModifier: Negative z-index will layer behind the normal stacking order"
|
|
595
|
-
) : t > 1e3 && console.warn(
|
|
596
|
-
`ZIndexModifier: Very high z-index (${t}) may cause stacking conflicts. Consider using semantic ranges.`
|
|
597
|
-
), this.checkStackingContext(e);
|
|
598
|
-
}
|
|
599
|
-
checkStackingContext(e) {
|
|
600
|
-
const t = getComputedStyle(e), n = [
|
|
601
|
-
{ prop: "opacity", value: t.opacity, creates: t.opacity !== "1" },
|
|
602
|
-
{
|
|
603
|
-
prop: "transform",
|
|
604
|
-
value: t.transform,
|
|
605
|
-
creates: t.transform !== "none"
|
|
606
|
-
},
|
|
607
|
-
{ prop: "filter", value: t.filter, creates: t.filter !== "none" },
|
|
608
|
-
{
|
|
609
|
-
prop: "isolation",
|
|
610
|
-
value: t.isolation,
|
|
611
|
-
creates: t.isolation === "isolate"
|
|
612
|
-
},
|
|
613
|
-
{
|
|
614
|
-
prop: "mix-blend-mode",
|
|
615
|
-
value: t.mixBlendMode,
|
|
616
|
-
creates: t.mixBlendMode !== "normal"
|
|
617
|
-
}
|
|
618
|
-
].filter((s) => s.creates);
|
|
619
|
-
n.length > 0 && console.info(
|
|
620
|
-
"ZIndexModifier: Element creates new stacking context due to:",
|
|
621
|
-
n.map((s) => `${s.prop}: ${s.value}`).join(", ")
|
|
622
|
-
);
|
|
623
|
-
}
|
|
624
|
-
/**
|
|
625
|
-
* Development mode validation
|
|
626
|
-
*/
|
|
627
|
-
validateZIndex(e) {
|
|
628
|
-
if (typeof process < "u" && process.env.NODE_ENV === "development") {
|
|
629
|
-
const t = l(e) || f(e);
|
|
630
|
-
if (!t && typeof e != "number") {
|
|
631
|
-
console.warn(
|
|
632
|
-
`ZIndexModifier: zIndex must be a number or reactive signal. Got: ${typeof e}`
|
|
633
|
-
);
|
|
634
|
-
return;
|
|
635
|
-
}
|
|
636
|
-
const i = t ? e.peek?.() || e() : e;
|
|
637
|
-
typeof i == "number" && (Number.isInteger(i) || console.warn(
|
|
638
|
-
`ZIndexModifier: z-index should be an integer. Got: ${i}`
|
|
639
|
-
), (i > Number.MAX_SAFE_INTEGER || i < Number.MIN_SAFE_INTEGER) && console.warn(
|
|
640
|
-
`ZIndexModifier: z-index value ${i} is outside safe integer range`
|
|
641
|
-
));
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
/**
|
|
646
|
-
* Common z-index values for semantic layering
|
|
647
|
-
*/
|
|
648
|
-
c(h, "COMMON_LAYERS", {
|
|
649
|
-
background: -1,
|
|
650
|
-
base: 0,
|
|
651
|
-
content: 1,
|
|
652
|
-
navigation: 100,
|
|
653
|
-
dropdown: 200,
|
|
654
|
-
overlay: 300,
|
|
655
|
-
modal: 400,
|
|
656
|
-
tooltip: 500,
|
|
657
|
-
toast: 600,
|
|
658
|
-
debug: 9999
|
|
659
|
-
});
|
|
660
|
-
function Y(o) {
|
|
661
|
-
return new h({ zIndex: o });
|
|
662
|
-
}
|
|
663
|
-
class N extends w {
|
|
664
|
-
constructor() {
|
|
665
|
-
super(...arguments);
|
|
666
|
-
c(this, "type", "overlay");
|
|
667
|
-
c(this, "priority", 10);
|
|
668
|
-
}
|
|
669
|
-
// Apply late so positioning is relative to final layout
|
|
670
|
-
apply(e, t) {
|
|
671
|
-
if (!t.element) return;
|
|
672
|
-
const i = t.element;
|
|
673
|
-
if (!i.style) return;
|
|
674
|
-
const { content: n, alignment: s = "center" } = this.properties;
|
|
675
|
-
this.applyOverlay(i, n, s, t);
|
|
676
|
-
}
|
|
677
|
-
applyOverlay(e, t, i, n) {
|
|
678
|
-
(e.style.position === "" || e.style.position === "static") && (e.style.position = "relative");
|
|
679
|
-
const s = document.createElement("div");
|
|
680
|
-
s.style.position = "absolute", s.style.pointerEvents = "none";
|
|
681
|
-
const a = this.getOverlayAlignment(i);
|
|
682
|
-
Object.assign(s.style, a), this.renderContent(s, t), e.appendChild(s);
|
|
683
|
-
}
|
|
684
|
-
renderContent(e, t) {
|
|
685
|
-
if (typeof t == "function") {
|
|
686
|
-
const i = t();
|
|
687
|
-
if (i && typeof i.render == "function") {
|
|
688
|
-
const n = i.render();
|
|
689
|
-
n.element && e.appendChild(n.element);
|
|
690
|
-
}
|
|
691
|
-
} else if (t && typeof t.render == "function") {
|
|
692
|
-
const i = t.render();
|
|
693
|
-
i.element && e.appendChild(i.element);
|
|
694
|
-
} else t && (t instanceof HTMLElement || t.appendChild) && e.appendChild(t);
|
|
695
|
-
}
|
|
696
|
-
getOverlayAlignment(e) {
|
|
697
|
-
const t = {
|
|
698
|
-
center: {
|
|
699
|
-
top: "50%",
|
|
700
|
-
left: "50%",
|
|
701
|
-
transform: "translate(-50%, -50%)"
|
|
702
|
-
},
|
|
703
|
-
top: {
|
|
704
|
-
top: "0px",
|
|
705
|
-
left: "50%",
|
|
706
|
-
transform: "translateX(-50%)"
|
|
707
|
-
},
|
|
708
|
-
bottom: {
|
|
709
|
-
bottom: "0px",
|
|
710
|
-
left: "50%",
|
|
711
|
-
transform: "translateX(-50%)"
|
|
712
|
-
},
|
|
713
|
-
leading: {
|
|
714
|
-
top: "50%",
|
|
715
|
-
left: "0px",
|
|
716
|
-
transform: "translateY(-50%)"
|
|
717
|
-
},
|
|
718
|
-
trailing: {
|
|
719
|
-
top: "50%",
|
|
720
|
-
right: "0px",
|
|
721
|
-
transform: "translateY(-50%)"
|
|
722
|
-
},
|
|
723
|
-
topLeading: {
|
|
724
|
-
top: "0px",
|
|
725
|
-
left: "0px"
|
|
726
|
-
},
|
|
727
|
-
topTrailing: {
|
|
728
|
-
top: "0px",
|
|
729
|
-
right: "0px"
|
|
730
|
-
},
|
|
731
|
-
bottomLeading: {
|
|
732
|
-
bottom: "0px",
|
|
733
|
-
left: "0px"
|
|
734
|
-
},
|
|
735
|
-
bottomTrailing: {
|
|
736
|
-
bottom: "0px",
|
|
737
|
-
right: "0px"
|
|
738
|
-
}
|
|
739
|
-
};
|
|
740
|
-
return t[e] || t.center;
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
function W(o, r = "center") {
|
|
744
|
-
return new N({ content: o, alignment: r });
|
|
745
|
-
}
|
|
746
|
-
export {
|
|
747
|
-
x as A,
|
|
748
|
-
y as F,
|
|
749
|
-
E as O,
|
|
750
|
-
C as P,
|
|
751
|
-
M as S,
|
|
752
|
-
h as Z,
|
|
753
|
-
$ as a,
|
|
754
|
-
D as b,
|
|
755
|
-
_ as c,
|
|
756
|
-
F as d,
|
|
757
|
-
A as e,
|
|
758
|
-
d as f,
|
|
759
|
-
T as g,
|
|
760
|
-
R as h,
|
|
761
|
-
z as i,
|
|
762
|
-
G as j,
|
|
763
|
-
Z as k,
|
|
764
|
-
H as l,
|
|
765
|
-
I as m,
|
|
766
|
-
L as n,
|
|
767
|
-
B as o,
|
|
768
|
-
X as p,
|
|
769
|
-
N as q,
|
|
770
|
-
W as r,
|
|
771
|
-
j as s,
|
|
772
|
-
Y as z
|
|
773
|
-
};
|
|
774
|
-
//# sourceMappingURL=overlay-DDiSLprp.js.map
|