fluekit 1.0.0
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/LICENSE +21 -0
- package/README.md +63 -0
- package/dist/Align.d.ts +25 -0
- package/dist/AnimatedContainer.d.ts +41 -0
- package/dist/AnimatedOpacity.d.ts +25 -0
- package/dist/Border.d.ts +16 -0
- package/dist/BorderRadius.d.ts +12 -0
- package/dist/BoxConstraints.d.ts +9 -0
- package/dist/BoxDecoration.d.ts +89 -0
- package/dist/Center.d.ts +29 -0
- package/dist/Column.d.ts +18 -0
- package/dist/Container.d.ts +37 -0
- package/dist/EdgeInsets.d.ts +19 -0
- package/dist/Expanded.d.ts +26 -0
- package/dist/Fixed.d.ts +20 -0
- package/dist/FlexBox.d.ts +26 -0
- package/dist/FlexItem.d.ts +30 -0
- package/dist/FlexProps.d.ts +131 -0
- package/dist/GestureDetector.d.ts +20 -0
- package/dist/GridView.d.ts +42 -0
- package/dist/IgnorePointer.d.ts +50 -0
- package/dist/ListView.d.ts +40 -0
- package/dist/Opacity.d.ts +28 -0
- package/dist/Padding.d.ts +11 -0
- package/dist/Positioned.d.ts +19 -0
- package/dist/Row.d.ts +23 -0
- package/dist/SafeArea.d.ts +32 -0
- package/dist/ScrollView.d.ts +60 -0
- package/dist/Size.d.ts +9 -0
- package/dist/SizedBox.d.ts +21 -0
- package/dist/Stack.d.ts +32 -0
- package/dist/Sticky.d.ts +20 -0
- package/dist/Text.d.ts +41 -0
- package/dist/TextStyle.d.ts +121 -0
- package/dist/Transform.d.ts +38 -0
- package/dist/Wrap.d.ts +36 -0
- package/dist/__tests__/Container.spec.d.ts +1 -0
- package/dist/__tests__/normalizeSrc.spec.d.ts +1 -0
- package/dist/index.css +2 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.js +1457 -0
- package/dist/px2vw.d.ts +3 -0
- package/dist/useChildren.d.ts +3 -0
- package/dist/useGesture.d.ts +37 -0
- package/dist/useOpacity.d.ts +4 -0
- package/dist/usePosition.d.ts +19 -0
- package/dist/useSafeAttrs.d.ts +3 -0
- package/dist/useStack.d.ts +2 -0
- package/dist/utils.d.ts +5 -0
- package/package.json +40 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1457 @@
|
|
|
1
|
+
import { Comment, Fragment, Text, cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, h, inject, mergeProps, normalizeClass, normalizeStyle, onMounted, onUnmounted, openBlock, provide, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useAttrs, useSlots, warn, withCtx } from "vue";
|
|
2
|
+
function isUndefined(o) {
|
|
3
|
+
return o === void 0;
|
|
4
|
+
}
|
|
5
|
+
var PURE_NUMBER_REGEX = /^[+-]?(?:\d+\.?\d*|\.\d+)$/, NUMBER_PX_REGEX = /^[+-]?(?:\d+\.?\d*|\.\d+)px$/;
|
|
6
|
+
function isPureNumber(o) {
|
|
7
|
+
return PURE_NUMBER_REGEX.test(o);
|
|
8
|
+
}
|
|
9
|
+
function isNumberPx(o) {
|
|
10
|
+
return NUMBER_PX_REGEX.test(o);
|
|
11
|
+
}
|
|
12
|
+
var DEFAULT_VW = 750, canTransform = !0;
|
|
13
|
+
function setTransform(o) {
|
|
14
|
+
canTransform = o;
|
|
15
|
+
}
|
|
16
|
+
function setDefaultVW(o) {
|
|
17
|
+
if (!isPureNumber(`${o}`)) throw Error("defaultVW must be a number");
|
|
18
|
+
if (o <= 0) throw Error("defaultVW must be greater than 0");
|
|
19
|
+
DEFAULT_VW = o;
|
|
20
|
+
}
|
|
21
|
+
var EXCLUDED_VALUES = [
|
|
22
|
+
"0px",
|
|
23
|
+
"0",
|
|
24
|
+
"+0",
|
|
25
|
+
"-0",
|
|
26
|
+
"0%",
|
|
27
|
+
"+0%",
|
|
28
|
+
"-0%",
|
|
29
|
+
"-0px",
|
|
30
|
+
"+0px"
|
|
31
|
+
], nonTransform = (o) => o.endsWith("vw") || o.endsWith("%") || EXCLUDED_VALUES.includes(o);
|
|
32
|
+
function px2vw(o, F = DEFAULT_VW) {
|
|
33
|
+
if (!canTransform) return isPureNumber(`${o}`) ? `${o}px` : o;
|
|
34
|
+
if (!(o === void 0 || o == null || typeof o == "number" && !Number.isFinite(o))) {
|
|
35
|
+
if (o === 0) return "0";
|
|
36
|
+
if (typeof o == "string") {
|
|
37
|
+
if (o = o.trim(), o == "") return;
|
|
38
|
+
if (nonTransform(o)) return o;
|
|
39
|
+
let F = o;
|
|
40
|
+
if (isNumberPx(o) && (o = o.slice(0, -2)), !isPureNumber(o)) return F;
|
|
41
|
+
}
|
|
42
|
+
return o = Number(o), F /= 100, `${Math.round(o / F * 1e5) / 1e5}vw`;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const FlexAlignment = {
|
|
46
|
+
center: {
|
|
47
|
+
justifyContent: "center",
|
|
48
|
+
alignItems: "center"
|
|
49
|
+
},
|
|
50
|
+
topLeft: {
|
|
51
|
+
justifyContent: "flex-start",
|
|
52
|
+
alignItems: "flex-start"
|
|
53
|
+
},
|
|
54
|
+
topCenter: {
|
|
55
|
+
justifyContent: "center",
|
|
56
|
+
alignItems: "flex-start"
|
|
57
|
+
},
|
|
58
|
+
topRight: {
|
|
59
|
+
justifyContent: "flex-end",
|
|
60
|
+
alignItems: "flex-start"
|
|
61
|
+
},
|
|
62
|
+
centerLeft: {
|
|
63
|
+
justifyContent: "flex-start",
|
|
64
|
+
alignItems: "center"
|
|
65
|
+
},
|
|
66
|
+
centerRight: {
|
|
67
|
+
justifyContent: "flex-end",
|
|
68
|
+
alignItems: "center"
|
|
69
|
+
},
|
|
70
|
+
bottomLeft: {
|
|
71
|
+
justifyContent: "flex-start",
|
|
72
|
+
alignItems: "flex-end"
|
|
73
|
+
},
|
|
74
|
+
bottomCenter: {
|
|
75
|
+
justifyContent: "center",
|
|
76
|
+
alignItems: "flex-end"
|
|
77
|
+
},
|
|
78
|
+
bottomRight: {
|
|
79
|
+
justifyContent: "flex-end",
|
|
80
|
+
alignItems: "flex-end"
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
function alignmentToStyle(o, F = "row") {
|
|
84
|
+
let I = FlexAlignment[o];
|
|
85
|
+
return I ? F === "row" ? I : {
|
|
86
|
+
justifyContent: I.alignItems,
|
|
87
|
+
alignItems: I.justifyContent
|
|
88
|
+
} : {};
|
|
89
|
+
}
|
|
90
|
+
function alignmentToOrigin(o) {
|
|
91
|
+
return {
|
|
92
|
+
center: "center center",
|
|
93
|
+
topLeft: "left top",
|
|
94
|
+
topCenter: "center top",
|
|
95
|
+
topRight: "right top",
|
|
96
|
+
centerLeft: "left center",
|
|
97
|
+
centerRight: "right center",
|
|
98
|
+
bottomLeft: "left bottom",
|
|
99
|
+
bottomCenter: "center bottom",
|
|
100
|
+
bottomRight: "right bottom"
|
|
101
|
+
}[o];
|
|
102
|
+
}
|
|
103
|
+
const CrossAxisAlignment = {
|
|
104
|
+
start: "start",
|
|
105
|
+
end: "end",
|
|
106
|
+
center: "center",
|
|
107
|
+
stretch: "stretch",
|
|
108
|
+
baseline: "baseline"
|
|
109
|
+
}, MainAxisAlignment = {
|
|
110
|
+
start: "start",
|
|
111
|
+
end: "end",
|
|
112
|
+
center: "center",
|
|
113
|
+
spaceBetween: "space-between",
|
|
114
|
+
spaceAround: "space-around",
|
|
115
|
+
spaceEvenly: "space-evenly"
|
|
116
|
+
}, FlexBoxJustifyMap = {
|
|
117
|
+
start: "flex-start",
|
|
118
|
+
end: "flex-end",
|
|
119
|
+
center: "center",
|
|
120
|
+
"space-between": "space-between",
|
|
121
|
+
"space-around": "space-around",
|
|
122
|
+
"space-evenly": "space-evenly"
|
|
123
|
+
}, FlexBoxAlignMap = {
|
|
124
|
+
start: "flex-start",
|
|
125
|
+
end: "flex-end",
|
|
126
|
+
center: "center",
|
|
127
|
+
stretch: "stretch",
|
|
128
|
+
baseline: "baseline"
|
|
129
|
+
}, StackFit = {
|
|
130
|
+
loose: "loose",
|
|
131
|
+
expand: "expand",
|
|
132
|
+
passthrough: "passthrough"
|
|
133
|
+
};
|
|
134
|
+
var Align_default = /* @__PURE__ */ defineComponent({
|
|
135
|
+
inheritAttrs: !1,
|
|
136
|
+
__name: "Align",
|
|
137
|
+
props: {
|
|
138
|
+
alignment: { default: "center" },
|
|
139
|
+
widthFactor: {},
|
|
140
|
+
heightFactor: {}
|
|
141
|
+
},
|
|
142
|
+
setup(o) {
|
|
143
|
+
let F = o, I = computed(() => {
|
|
144
|
+
let o = {
|
|
145
|
+
display: "flex",
|
|
146
|
+
position: "relative"
|
|
147
|
+
};
|
|
148
|
+
return Object.assign(o, alignmentToStyle(F.alignment)), F.widthFactor ? o.width = `calc(100% * ${F.widthFactor})` : o.width = "100%", F.heightFactor ? o.height = `calc(100% * ${F.heightFactor})` : o.height = "100%", o;
|
|
149
|
+
}), L = computed(() => ({ flexShrink: 0 }));
|
|
150
|
+
return (o, F) => (openBlock(), createElementBlock("div", {
|
|
151
|
+
class: "flutter-align",
|
|
152
|
+
style: normalizeStyle(I.value)
|
|
153
|
+
}, [createElementVNode("div", {
|
|
154
|
+
class: "flutter-align-child",
|
|
155
|
+
style: normalizeStyle(L.value)
|
|
156
|
+
}, [renderSlot(o.$slots, "default")], 4)], 4));
|
|
157
|
+
}
|
|
158
|
+
}), toVal = (o) => o === Infinity ? void 0 : o;
|
|
159
|
+
function BoxConstraints(o = {}) {
|
|
160
|
+
let F = Math.max(0, o.minWidth ?? 0), I = Math.max(0, o.minHeight ?? 0), L = Math.max(F, o.maxWidth ?? Infinity), R = Math.max(I, o.maxHeight ?? Infinity);
|
|
161
|
+
return {
|
|
162
|
+
minWidth: toVal(F),
|
|
163
|
+
maxWidth: toVal(L),
|
|
164
|
+
minHeight: toVal(I),
|
|
165
|
+
maxHeight: toVal(R)
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
function boxConstraintsToStyle(o) {
|
|
169
|
+
let F = o ?? {};
|
|
170
|
+
return {
|
|
171
|
+
minWidth: px2vw(F.minWidth),
|
|
172
|
+
maxWidth: px2vw(F.maxWidth),
|
|
173
|
+
minHeight: px2vw(F.minHeight),
|
|
174
|
+
maxHeight: px2vw(F.maxHeight)
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
function borderRadiusToStyle(o) {
|
|
178
|
+
if (!o) return {};
|
|
179
|
+
if (typeof o == "string" || typeof o == "number") return { borderRadius: px2vw(o) };
|
|
180
|
+
let { topLeft: F, topRight: I, bottomLeft: L, bottomRight: R, all: z } = o;
|
|
181
|
+
if (z) return { borderRadius: px2vw(z) };
|
|
182
|
+
let B = {};
|
|
183
|
+
return L && (B.borderBottomLeftRadius = px2vw(L)), R && (B.borderBottomRightRadius = px2vw(R)), F && (B.borderTopLeftRadius = px2vw(F)), I && (B.borderTopRightRadius = px2vw(I)), B;
|
|
184
|
+
}
|
|
185
|
+
function Border(o) {
|
|
186
|
+
return {
|
|
187
|
+
width: o.width ? o.width : 1,
|
|
188
|
+
color: o.color || "#000",
|
|
189
|
+
style: o.style || "solid"
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
function borderSideToString(o) {
|
|
193
|
+
if (!o) return;
|
|
194
|
+
let F = [], { width: I, color: L, style: R } = o;
|
|
195
|
+
return I && F.push(I > 1 ? px2vw(I) : I + "px"), L && F.push(L), R && F.push(R), `${F.join(" ")}`;
|
|
196
|
+
}
|
|
197
|
+
function borderToStyle(o) {
|
|
198
|
+
return o ? [
|
|
199
|
+
"width",
|
|
200
|
+
"color",
|
|
201
|
+
"style"
|
|
202
|
+
].every((F) => !!o[F]) ? { border: borderSideToString(o) } : o.all ? { border: borderSideToString(o.all) } : {
|
|
203
|
+
borderLeft: borderSideToString(o.left),
|
|
204
|
+
borderTop: borderSideToString(o.top),
|
|
205
|
+
borderRight: borderSideToString(o.right),
|
|
206
|
+
borderBottom: borderSideToString(o.bottom)
|
|
207
|
+
} : {};
|
|
208
|
+
}
|
|
209
|
+
const BoxFit = {
|
|
210
|
+
fitWidth: "fitWidth",
|
|
211
|
+
fitHeight: "fitHeight",
|
|
212
|
+
fill: "fill",
|
|
213
|
+
contain: "contain",
|
|
214
|
+
cover: "cover",
|
|
215
|
+
none: "none",
|
|
216
|
+
scaleDown: "scaleDown"
|
|
217
|
+
};
|
|
218
|
+
var ImageFitMap = {
|
|
219
|
+
fill: "100% 100%",
|
|
220
|
+
contain: "contain",
|
|
221
|
+
cover: "cover",
|
|
222
|
+
none: "auto",
|
|
223
|
+
scaleDown: "contain",
|
|
224
|
+
fitWidth: "100% auto",
|
|
225
|
+
fitHeight: "auto 100%"
|
|
226
|
+
}, cssPoisitions = {
|
|
227
|
+
top: "top",
|
|
228
|
+
bottom: "bottom",
|
|
229
|
+
left: "left",
|
|
230
|
+
right: "right",
|
|
231
|
+
center: "center"
|
|
232
|
+
};
|
|
233
|
+
const BoxAlignment = {
|
|
234
|
+
center: "center",
|
|
235
|
+
top: "top",
|
|
236
|
+
bottom: "bottom",
|
|
237
|
+
left: "left",
|
|
238
|
+
right: "right",
|
|
239
|
+
topLeft: "left top",
|
|
240
|
+
topCenter: "center top",
|
|
241
|
+
topRight: "right top",
|
|
242
|
+
centerLeft: "left center",
|
|
243
|
+
centerRight: "right center",
|
|
244
|
+
bottomLeft: "left bottom",
|
|
245
|
+
bottomCenter: "center bottom",
|
|
246
|
+
bottomRight: "right bottom"
|
|
247
|
+
};
|
|
248
|
+
var _baseUrl = "";
|
|
249
|
+
function setBaseUrl(o) {
|
|
250
|
+
_baseUrl = o;
|
|
251
|
+
}
|
|
252
|
+
function normalizeSrc(o) {
|
|
253
|
+
if (!o) return "";
|
|
254
|
+
if (/^(https?:|file:|blob:|data:|\/\/)/i.test(o) || /^(linear|radial|conic|repeating-linear|repeating-radial)-gradient\(/.test(o) || !_baseUrl || _baseUrl === "/") return o;
|
|
255
|
+
let F = _baseUrl.endsWith("/") ? _baseUrl.slice(0, -1) : _baseUrl;
|
|
256
|
+
return o.startsWith(F) ? o : `${F}/${o.startsWith("/") ? o.slice(1) : o}`;
|
|
257
|
+
}
|
|
258
|
+
const NetworkImage = (o) => o, AssetImage = (o) => o;
|
|
259
|
+
function DecorationImage(o) {
|
|
260
|
+
return o;
|
|
261
|
+
}
|
|
262
|
+
var isGradient = (o) => /^(linear|radial|conic|repeating-linear|repeating-radial)-gradient\(/.test(o);
|
|
263
|
+
function decorationImageToStyle(o) {
|
|
264
|
+
if (!o) return {};
|
|
265
|
+
let F = {}, I = normalizeSrc(o.image);
|
|
266
|
+
if (F.backgroundImage = isGradient(I) ? I : `url(${I})`, o.fit && (F.backgroundSize = ImageFitMap[o.fit] || o.fit), F.backgroundAttachment = o.attachment, F.backgroundBlendMode = o.blendMode, F.backgroundClip = o.clip, F.backgroundOrigin = o.origin, F.backgroundRepeat = o.repeat ?? "no-repeat", o.alignment) {
|
|
267
|
+
let I = BoxAlignment[o.alignment];
|
|
268
|
+
if (I) F.backgroundPosition = I;
|
|
269
|
+
else {
|
|
270
|
+
let [I, L] = (o.alignment || "").split(" ");
|
|
271
|
+
I && !cssPoisitions[I] && (I = px2vw(I)), L && !cssPoisitions[L] && (L = px2vw(L)), I && !L && (L = "center"), F.backgroundPosition = `${I} ${L}`;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
return F;
|
|
275
|
+
}
|
|
276
|
+
function boxDecorationToStyle(o) {
|
|
277
|
+
if (!o) return {};
|
|
278
|
+
let { color: F, border: I, borderRadius: L, boxShadow: R, gradient: z, image: B, overflow: V, opacity: H } = o, U = {};
|
|
279
|
+
return F && (U.backgroundColor = F), H !== void 0 && (U.opacity = H), V && (U.overflow = V), z && (U.backgroundImage = z), B && Object.assign(U, decorationImageToStyle(B)), I && Object.assign(U, borderToStyle(I)), L && Object.assign(U, borderRadiusToStyle(L)), R && (U.boxShadow = (Array.isArray(R) ? R : [R]).map((o) => `${px2vw(o.offset?.x || 0)} ${px2vw(o.offset?.y || 0)} ${px2vw(o.blurRadius || 0)} ${px2vw(o.spreadRadius || 0)} ${o.color || "rgba(0,0,0,0.2)"} ${o.inset ? "inset" : ""}`.trim()).join(", ")), U;
|
|
280
|
+
}
|
|
281
|
+
function BoxDecoration(o) {
|
|
282
|
+
return o;
|
|
283
|
+
}
|
|
284
|
+
function LinearGradient(o, ...F) {
|
|
285
|
+
return `linear-gradient(${o}, ${F.join(", ")})`;
|
|
286
|
+
}
|
|
287
|
+
const Clip = {
|
|
288
|
+
none: "none",
|
|
289
|
+
hardEdge: "hardEdge",
|
|
290
|
+
antiAlias: "antiAlias",
|
|
291
|
+
antiAliasWithSaveLayer: "antiAliasWithSaveLayer"
|
|
292
|
+
};
|
|
293
|
+
function EdgeInsets(o) {
|
|
294
|
+
if (o.all !== void 0) return {
|
|
295
|
+
top: o.all,
|
|
296
|
+
right: o.all,
|
|
297
|
+
bottom: o.all,
|
|
298
|
+
left: o.all
|
|
299
|
+
};
|
|
300
|
+
let { top: F, right: I, bottom: L, left: R, horizontal: z, vertical: B } = o;
|
|
301
|
+
return {
|
|
302
|
+
top: F ?? B ?? 0,
|
|
303
|
+
right: I ?? z ?? 0,
|
|
304
|
+
bottom: L ?? B ?? 0,
|
|
305
|
+
left: R ?? z ?? 0
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
function edgeInsetsToStyle(o, F) {
|
|
309
|
+
if (!F) return {};
|
|
310
|
+
let { top: I, right: L, bottom: R, left: z } = EdgeInsets(F);
|
|
311
|
+
return {
|
|
312
|
+
[`${o}Top`]: px2vw(I),
|
|
313
|
+
[`${o}Right`]: px2vw(L),
|
|
314
|
+
[`${o}Bottom`]: px2vw(R),
|
|
315
|
+
[`${o}Left`]: px2vw(z)
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
const paddingToStyle = (o) => edgeInsetsToStyle("padding", o), marginToStyle = (o) => edgeInsetsToStyle("margin", o);
|
|
319
|
+
function Size(o) {
|
|
320
|
+
if (!o) return;
|
|
321
|
+
if (typeof o == "number" || typeof o == "string") return {
|
|
322
|
+
width: o,
|
|
323
|
+
height: o
|
|
324
|
+
};
|
|
325
|
+
let { width: F, height: I } = o;
|
|
326
|
+
return {
|
|
327
|
+
width: F,
|
|
328
|
+
height: I
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
function sizeToStyle(o) {
|
|
332
|
+
if (!o) return;
|
|
333
|
+
let { width: F, height: I } = o;
|
|
334
|
+
return {
|
|
335
|
+
width: px2vw(F),
|
|
336
|
+
height: px2vw(I)
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
var GESTURE_HANDLED = Symbol("gesture_handled");
|
|
340
|
+
const events = [
|
|
341
|
+
"click",
|
|
342
|
+
"tap",
|
|
343
|
+
"double-tap",
|
|
344
|
+
"long-press",
|
|
345
|
+
"pan-start",
|
|
346
|
+
"pan-update",
|
|
347
|
+
"pan-end"
|
|
348
|
+
];
|
|
349
|
+
function useGestures({ emit: o }) {
|
|
350
|
+
let F = ref(0), I = ref(null), L = ref(!1), R = ref({
|
|
351
|
+
x: 0,
|
|
352
|
+
y: 0
|
|
353
|
+
}), z = ref({
|
|
354
|
+
x: 0,
|
|
355
|
+
y: 0
|
|
356
|
+
}), B = {
|
|
357
|
+
onTap: () => o("tap"),
|
|
358
|
+
onClick: (F) => o("click", F),
|
|
359
|
+
onDbClick: (F) => o("click", F),
|
|
360
|
+
onDoubleTap: () => o("double-tap"),
|
|
361
|
+
onLongPress: () => o("long-press"),
|
|
362
|
+
onPanStart: (F) => o("pan-start", F),
|
|
363
|
+
onPanUpdate: (F) => o("pan-update", F),
|
|
364
|
+
onPanEnd: () => o("pan-end")
|
|
365
|
+
}, V = (o) => {
|
|
366
|
+
if (o[GESTURE_HANDLED]) return;
|
|
367
|
+
o[GESTURE_HANDLED] = !0;
|
|
368
|
+
let I = Date.now();
|
|
369
|
+
I - F.value < 300 ? (B.onDoubleTap?.(), B.onDbClick?.(o), F.value = 0) : (B.onTap?.(), B.onClick?.(o), F.value = I);
|
|
370
|
+
}, H = (o) => {
|
|
371
|
+
o[GESTURE_HANDLED] || (o[GESTURE_HANDLED] = !0, Y(), Z(o.clientX, o.clientY), window.addEventListener("mousemove", U), window.addEventListener("mouseup", W));
|
|
372
|
+
}, U = (o) => {
|
|
373
|
+
(Math.abs(o.clientX - R.value.x) > 5 || Math.abs(o.clientY - R.value.y) > 5) && X(), Q(o.clientX, o.clientY);
|
|
374
|
+
}, W = () => {
|
|
375
|
+
X(), $(), window.removeEventListener("mousemove", U), window.removeEventListener("mouseup", W);
|
|
376
|
+
}, G = (o) => {
|
|
377
|
+
if (o[GESTURE_HANDLED] || (o[GESTURE_HANDLED] = !0, o.touches.length > 1)) return;
|
|
378
|
+
let F = o.touches[0];
|
|
379
|
+
Y(), Z(F.clientX, F.clientY);
|
|
380
|
+
}, K = (o) => {
|
|
381
|
+
if (o[GESTURE_HANDLED]) return;
|
|
382
|
+
o[GESTURE_HANDLED] = !0;
|
|
383
|
+
let F = o.touches[0];
|
|
384
|
+
(Math.abs(F.clientX - R.value.x) > 5 || Math.abs(F.clientY - R.value.y) > 5) && X(), Q(F.clientX, F.clientY);
|
|
385
|
+
}, q = (o) => {
|
|
386
|
+
o[GESTURE_HANDLED] || (o[GESTURE_HANDLED] = !0, X(), $());
|
|
387
|
+
}, J = (o) => {
|
|
388
|
+
o[GESTURE_HANDLED] || (o[GESTURE_HANDLED] = !0, X(), $());
|
|
389
|
+
}, Y = () => {
|
|
390
|
+
X(), I.value = window.setTimeout(() => {
|
|
391
|
+
B.onLongPress?.();
|
|
392
|
+
}, 500);
|
|
393
|
+
}, X = () => {
|
|
394
|
+
I.value &&= (clearTimeout(I.value), null);
|
|
395
|
+
}, Z = (o, F) => {
|
|
396
|
+
R.value = {
|
|
397
|
+
x: o,
|
|
398
|
+
y: F
|
|
399
|
+
}, z.value = {
|
|
400
|
+
x: o,
|
|
401
|
+
y: F
|
|
402
|
+
}, L.value = !0, B.onPanStart?.({ globalPosition: {
|
|
403
|
+
x: o,
|
|
404
|
+
y: F
|
|
405
|
+
} });
|
|
406
|
+
}, Q = (o, F) => {
|
|
407
|
+
if (!L.value) return;
|
|
408
|
+
let I = o - z.value.x, R = F - z.value.y;
|
|
409
|
+
I === 0 && R === 0 || (B.onPanUpdate?.({
|
|
410
|
+
delta: {
|
|
411
|
+
x: I,
|
|
412
|
+
y: R
|
|
413
|
+
},
|
|
414
|
+
globalPosition: {
|
|
415
|
+
x: o,
|
|
416
|
+
y: F
|
|
417
|
+
}
|
|
418
|
+
}), z.value = {
|
|
419
|
+
x: o,
|
|
420
|
+
y: F
|
|
421
|
+
});
|
|
422
|
+
}, $ = () => {
|
|
423
|
+
L.value && (L.value = !1, B.onPanEnd?.());
|
|
424
|
+
};
|
|
425
|
+
return {
|
|
426
|
+
onClick: V,
|
|
427
|
+
onMousedown: H,
|
|
428
|
+
onTouchstart: G,
|
|
429
|
+
onTouchmove: K,
|
|
430
|
+
onTouchend: q,
|
|
431
|
+
onTouchcancel: J
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
var S_EVENTS = Symbol("events"), S_BEHAVIOR = Symbol("behavior");
|
|
435
|
+
function useGestureStyle() {
|
|
436
|
+
let o = inject(S_BEHAVIOR, "deferToChild"), F = {};
|
|
437
|
+
return (o === "opaque" || o === "translucent") && (F.cursor = "pointer", F.userSelect = "none"), F;
|
|
438
|
+
}
|
|
439
|
+
function useGestureEvents() {
|
|
440
|
+
return inject(S_EVENTS, void 0);
|
|
441
|
+
}
|
|
442
|
+
function provideGesture(o, F) {
|
|
443
|
+
provide(S_EVENTS, o), provide(S_BEHAVIOR, F);
|
|
444
|
+
}
|
|
445
|
+
function useSafeAttrs() {
|
|
446
|
+
let o = useAttrs();
|
|
447
|
+
return computed(() => {
|
|
448
|
+
let { class: F, style: I, ...L } = o;
|
|
449
|
+
return L;
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
var AnimatedContainer_default = /* @__PURE__ */ defineComponent({
|
|
453
|
+
inheritAttrs: !1,
|
|
454
|
+
__name: "AnimatedContainer",
|
|
455
|
+
props: {
|
|
456
|
+
width: {},
|
|
457
|
+
height: {},
|
|
458
|
+
padding: {},
|
|
459
|
+
margin: {},
|
|
460
|
+
decoration: {},
|
|
461
|
+
foregroundDecoration: {},
|
|
462
|
+
color: {},
|
|
463
|
+
alignment: {},
|
|
464
|
+
clipBehavior: { default: "none" },
|
|
465
|
+
transform: {},
|
|
466
|
+
transformAlignment: {},
|
|
467
|
+
constraints: {},
|
|
468
|
+
duration: { default: 300 },
|
|
469
|
+
curve: { default: "linear" }
|
|
470
|
+
},
|
|
471
|
+
setup(o) {
|
|
472
|
+
let F = useSafeAttrs(), I = useGestureEvents(), L = computed(() => ({
|
|
473
|
+
...F.value,
|
|
474
|
+
...I || {}
|
|
475
|
+
})), z = useGestureStyle(), H = o, U = computed(() => `all ${H.duration}ms ${H.curve}`), W = computed(() => {
|
|
476
|
+
let o = {
|
|
477
|
+
...sizeToStyle(H),
|
|
478
|
+
...paddingToStyle(H.padding),
|
|
479
|
+
...marginToStyle(H.margin),
|
|
480
|
+
...boxDecorationToStyle(H.decoration),
|
|
481
|
+
...alignmentToStyle(H.alignment, "column"),
|
|
482
|
+
...boxConstraintsToStyle(H.constraints),
|
|
483
|
+
...z,
|
|
484
|
+
transition: U.value
|
|
485
|
+
};
|
|
486
|
+
if (H.color && !H.decoration && (o.backgroundColor = H.color), H.transform && (o.transform = H.transform, H.transformAlignment && (o.transformOrigin = alignmentToOrigin(H.transformAlignment))), H.clipBehavior !== "none") switch (H.clipBehavior) {
|
|
487
|
+
case "hardEdge":
|
|
488
|
+
o.overflow = "hidden";
|
|
489
|
+
break;
|
|
490
|
+
case "antiAlias":
|
|
491
|
+
o.overflow = "hidden";
|
|
492
|
+
break;
|
|
493
|
+
default: break;
|
|
494
|
+
}
|
|
495
|
+
return {
|
|
496
|
+
...o,
|
|
497
|
+
display: "flex",
|
|
498
|
+
flexDirection: "column",
|
|
499
|
+
flexShrink: 0,
|
|
500
|
+
boxSizing: "border-box",
|
|
501
|
+
position: "relative"
|
|
502
|
+
};
|
|
503
|
+
}), G = computed(() => ({
|
|
504
|
+
...boxDecorationToStyle(H.foregroundDecoration),
|
|
505
|
+
position: "absolute",
|
|
506
|
+
top: 0,
|
|
507
|
+
left: 0,
|
|
508
|
+
right: 0,
|
|
509
|
+
bottom: 0,
|
|
510
|
+
pointerEvents: "none",
|
|
511
|
+
transition: U.value
|
|
512
|
+
}));
|
|
513
|
+
return (o, F) => (openBlock(), createElementBlock("div", mergeProps({
|
|
514
|
+
class: "animated-container",
|
|
515
|
+
style: W.value
|
|
516
|
+
}, L.value), [renderSlot(o.$slots, "default"), H.foregroundDecoration ? (openBlock(), createElementBlock("div", {
|
|
517
|
+
key: 0,
|
|
518
|
+
style: normalizeStyle(G.value)
|
|
519
|
+
}, null, 4)) : createCommentVNode("", !0)], 16));
|
|
520
|
+
}
|
|
521
|
+
});
|
|
522
|
+
const OpacityKey = Symbol("fluekit-opacity");
|
|
523
|
+
function useOpacity() {
|
|
524
|
+
return inject(OpacityKey, computed(() => 1));
|
|
525
|
+
}
|
|
526
|
+
function provideOpacity(o) {
|
|
527
|
+
let F = useOpacity(), I = computed(() => F.value * unref(o));
|
|
528
|
+
return provide(OpacityKey, I), I;
|
|
529
|
+
}
|
|
530
|
+
var AnimatedOpacity_default = /* @__PURE__ */ defineComponent({
|
|
531
|
+
inheritAttrs: !1,
|
|
532
|
+
__name: "AnimatedOpacity",
|
|
533
|
+
props: {
|
|
534
|
+
opacity: {},
|
|
535
|
+
duration: { default: 300 },
|
|
536
|
+
curve: { default: "linear" }
|
|
537
|
+
},
|
|
538
|
+
setup(o) {
|
|
539
|
+
let F = o;
|
|
540
|
+
provideOpacity(computed(() => F.opacity));
|
|
541
|
+
let I = computed(() => ({
|
|
542
|
+
opacity: F.opacity,
|
|
543
|
+
transition: `opacity ${F.duration}ms ${F.curve}`
|
|
544
|
+
}));
|
|
545
|
+
return (o, F) => (openBlock(), createElementBlock("div", {
|
|
546
|
+
class: "animated-opacity",
|
|
547
|
+
style: normalizeStyle(I.value)
|
|
548
|
+
}, [renderSlot(o.$slots, "default")], 4));
|
|
549
|
+
}
|
|
550
|
+
}), Center_default = /* @__PURE__ */ defineComponent({
|
|
551
|
+
inheritAttrs: !1,
|
|
552
|
+
__name: "Center",
|
|
553
|
+
props: {
|
|
554
|
+
widthFactor: {},
|
|
555
|
+
heightFactor: {}
|
|
556
|
+
},
|
|
557
|
+
setup(o) {
|
|
558
|
+
return (F, I) => (openBlock(), createBlock(Align_default, {
|
|
559
|
+
alignment: "center",
|
|
560
|
+
"width-factor": o.widthFactor,
|
|
561
|
+
"height-factor": o.heightFactor
|
|
562
|
+
}, {
|
|
563
|
+
default: withCtx(() => [renderSlot(F.$slots, "default")]),
|
|
564
|
+
_: 3
|
|
565
|
+
}, 8, ["width-factor", "height-factor"]));
|
|
566
|
+
}
|
|
567
|
+
}), FlexBox_default = /* @__PURE__ */ defineComponent({
|
|
568
|
+
name: "FlexBox",
|
|
569
|
+
inheritAttrs: !1,
|
|
570
|
+
__name: "FlexBox",
|
|
571
|
+
props: {
|
|
572
|
+
direction: { default: "row" },
|
|
573
|
+
mainAxisAlignment: { default: MainAxisAlignment.start },
|
|
574
|
+
crossAxisAlignment: { default: CrossAxisAlignment.start },
|
|
575
|
+
wrap: {
|
|
576
|
+
type: Boolean,
|
|
577
|
+
default: !1
|
|
578
|
+
},
|
|
579
|
+
gap: { default: 0 },
|
|
580
|
+
expanded: {
|
|
581
|
+
type: Boolean,
|
|
582
|
+
default: !1
|
|
583
|
+
},
|
|
584
|
+
as: { default: "div" },
|
|
585
|
+
constraints: {}
|
|
586
|
+
},
|
|
587
|
+
setup(o) {
|
|
588
|
+
let F = o, I = useSafeAttrs(), L = computed(() => {
|
|
589
|
+
let o = ["flex-box", `flex-box-${F.direction}`];
|
|
590
|
+
return F.expanded && o.push("flex-expanded"), o.join(" ");
|
|
591
|
+
}), B = computed(() => {
|
|
592
|
+
let o = F.mainAxisAlignment, I = F.crossAxisAlignment, L = {
|
|
593
|
+
display: "flex",
|
|
594
|
+
flexDirection: F.direction,
|
|
595
|
+
flexWrap: F.wrap ? "wrap" : "nowrap"
|
|
596
|
+
};
|
|
597
|
+
return L.justifyContent = FlexBoxJustifyMap[o] || o, L.alignItems = FlexBoxAlignMap[I] || I, L.gap = px2vw(F.gap), F.expanded && (L.flex = "1", L.width = "100%", L.height = "100%"), F.constraints && Object.assign(L, boxConstraintsToStyle(F.constraints)), L;
|
|
598
|
+
});
|
|
599
|
+
return (F, R) => (openBlock(), createBlock(resolveDynamicComponent(o.as), mergeProps({
|
|
600
|
+
class: L.value,
|
|
601
|
+
style: B.value
|
|
602
|
+
}, unref(I)), {
|
|
603
|
+
default: withCtx(() => [renderSlot(F.$slots, "default")]),
|
|
604
|
+
_: 3
|
|
605
|
+
}, 16, ["class", "style"]));
|
|
606
|
+
}
|
|
607
|
+
}), Column_default = /* @__PURE__ */ defineComponent({
|
|
608
|
+
inheritAttrs: !1,
|
|
609
|
+
__name: "Column",
|
|
610
|
+
props: {
|
|
611
|
+
direction: {},
|
|
612
|
+
mainAxisAlignment: {},
|
|
613
|
+
crossAxisAlignment: {},
|
|
614
|
+
wrap: { type: Boolean },
|
|
615
|
+
gap: {},
|
|
616
|
+
expanded: { type: Boolean },
|
|
617
|
+
as: {},
|
|
618
|
+
constraints: {}
|
|
619
|
+
},
|
|
620
|
+
setup(o) {
|
|
621
|
+
return (F, I) => (openBlock(), createBlock(FlexBox_default, {
|
|
622
|
+
direction: "column",
|
|
623
|
+
"main-axis-alignment": o.mainAxisAlignment,
|
|
624
|
+
"cross-axis-alignment": o.crossAxisAlignment,
|
|
625
|
+
wrap: o.wrap,
|
|
626
|
+
gap: o.gap,
|
|
627
|
+
expanded: o.expanded
|
|
628
|
+
}, {
|
|
629
|
+
default: withCtx(() => [renderSlot(F.$slots, "default")]),
|
|
630
|
+
_: 3
|
|
631
|
+
}, 8, [
|
|
632
|
+
"main-axis-alignment",
|
|
633
|
+
"cross-axis-alignment",
|
|
634
|
+
"wrap",
|
|
635
|
+
"gap",
|
|
636
|
+
"expanded"
|
|
637
|
+
]));
|
|
638
|
+
}
|
|
639
|
+
}), Container_default = /* @__PURE__ */ defineComponent({
|
|
640
|
+
inheritAttrs: !1,
|
|
641
|
+
__name: "Container",
|
|
642
|
+
props: {
|
|
643
|
+
width: {},
|
|
644
|
+
height: {},
|
|
645
|
+
padding: {},
|
|
646
|
+
margin: {},
|
|
647
|
+
decoration: {},
|
|
648
|
+
foregroundDecoration: {},
|
|
649
|
+
color: {},
|
|
650
|
+
alignment: {},
|
|
651
|
+
clipBehavior: { default: "none" },
|
|
652
|
+
transform: {},
|
|
653
|
+
transformAlignment: {},
|
|
654
|
+
constraints: {}
|
|
655
|
+
},
|
|
656
|
+
setup(o) {
|
|
657
|
+
let F = useSafeAttrs(), I = useGestureEvents(), L = computed(() => ({
|
|
658
|
+
...F.value,
|
|
659
|
+
...I || {}
|
|
660
|
+
})), z = useGestureStyle(), H = o, U = (o) => typeof o == "number" ? o < 0 : typeof o == "string" ? parseFloat(o) < 0 : !1;
|
|
661
|
+
(() => {
|
|
662
|
+
if (H.margin) {
|
|
663
|
+
let { left: o, top: F, right: I, bottom: L } = H.margin;
|
|
664
|
+
(U(o) || U(F) || U(I) || U(L)) && console.warn("[Container] margin must be non-negative");
|
|
665
|
+
}
|
|
666
|
+
if (H.padding) {
|
|
667
|
+
let { left: o, top: F, right: I, bottom: L } = H.padding;
|
|
668
|
+
(U(o) || U(F) || U(I) || U(L)) && console.warn("[Container] padding must be non-negative");
|
|
669
|
+
}
|
|
670
|
+
H.color && H.decoration && console.warn("[Container] Cannot provide both a color and a decoration\nTo provide both, use \"decoration: { color: color }\"."), !H.decoration && H.clipBehavior !== "none" && console.warn("[Container] clipBehavior has no effect when decoration is null");
|
|
671
|
+
})();
|
|
672
|
+
let W = computed(() => {
|
|
673
|
+
let o = {
|
|
674
|
+
backgroundColor: H.decoration ? void 0 : H.color,
|
|
675
|
+
transform: H.transform,
|
|
676
|
+
transformOrigin: H.transformAlignment ? alignmentToOrigin(H.transformAlignment) : "center",
|
|
677
|
+
overflow: H.clipBehavior === "none" ? void 0 : "hidden",
|
|
678
|
+
position: "relative"
|
|
679
|
+
};
|
|
680
|
+
H.alignment && (Object.assign(o, {
|
|
681
|
+
display: "flex",
|
|
682
|
+
flexDirection: "column"
|
|
683
|
+
}), Object.assign(o, alignmentToStyle(H.alignment, "column"))), Object.assign(o, sizeToStyle(H));
|
|
684
|
+
let F = boxConstraintsToStyle(H.constraints);
|
|
685
|
+
return H.width !== void 0 && H.width !== null && (delete F.minWidth, delete F.maxWidth), H.height !== void 0 && H.height !== null && (delete F.minHeight, delete F.maxHeight), Object.assign(o, F), Object.assign(o, paddingToStyle(H.padding)), Object.assign(o, marginToStyle(H.margin)), Object.assign(o, boxDecorationToStyle(H.decoration)), Object.assign(o, z), H.clipBehavior === "antiAlias" && (o.borderRadius = o.borderRadius || "inherit"), o;
|
|
686
|
+
}), G = computed(() => {
|
|
687
|
+
let o = {
|
|
688
|
+
position: "absolute",
|
|
689
|
+
pointerEvents: "none",
|
|
690
|
+
zIndex: 1,
|
|
691
|
+
inset: 0
|
|
692
|
+
};
|
|
693
|
+
return Object.assign(o, boxDecorationToStyle(H.foregroundDecoration)), o;
|
|
694
|
+
});
|
|
695
|
+
return (o, F) => (openBlock(), createElementBlock("div", mergeProps({
|
|
696
|
+
class: "container-box",
|
|
697
|
+
style: W.value
|
|
698
|
+
}, L.value), [renderSlot(o.$slots, "default"), H.foregroundDecoration ? (openBlock(), createElementBlock("div", {
|
|
699
|
+
key: 0,
|
|
700
|
+
style: normalizeStyle(G.value)
|
|
701
|
+
}, null, 4)) : createCommentVNode("", !0)], 16));
|
|
702
|
+
}
|
|
703
|
+
}), FlexItem_default = /* @__PURE__ */ defineComponent({
|
|
704
|
+
inheritAttrs: !1,
|
|
705
|
+
__name: "FlexItem",
|
|
706
|
+
props: {
|
|
707
|
+
flex: { default: 0 },
|
|
708
|
+
expanded: {
|
|
709
|
+
type: Boolean,
|
|
710
|
+
default: !1
|
|
711
|
+
},
|
|
712
|
+
flexible: {
|
|
713
|
+
type: Boolean,
|
|
714
|
+
default: !1
|
|
715
|
+
},
|
|
716
|
+
alignSelf: { default: "auto" },
|
|
717
|
+
minSize: {},
|
|
718
|
+
maxSize: {}
|
|
719
|
+
},
|
|
720
|
+
setup(o) {
|
|
721
|
+
let F = o, I = useSafeAttrs(), L = computed(() => {
|
|
722
|
+
let o = {};
|
|
723
|
+
if (F.expanded ? o.flex = "1 1 0%" : (F.flexible && (o.flex = "0 1 auto"), F.flex > 0 && (o.flex = `${F.flex} 1 0%`)), F.alignSelf !== "auto" && (o.alignSelf = FlexBoxAlignMap[F.alignSelf] || F.alignSelf), F.minSize) {
|
|
724
|
+
let I = px2vw(F.minSize);
|
|
725
|
+
o.minWidth = I, o.minHeight = I;
|
|
726
|
+
}
|
|
727
|
+
if (F.maxSize) {
|
|
728
|
+
let I = px2vw(F.maxSize);
|
|
729
|
+
o.maxWidth = I, o.maxHeight = I;
|
|
730
|
+
}
|
|
731
|
+
return o;
|
|
732
|
+
});
|
|
733
|
+
return (o, F) => (openBlock(), createElementBlock("div", mergeProps({
|
|
734
|
+
class: "flex-item",
|
|
735
|
+
style: L.value
|
|
736
|
+
}, unref(I)), [renderSlot(o.$slots, "default")], 16));
|
|
737
|
+
}
|
|
738
|
+
}), Expanded_default = /* @__PURE__ */ defineComponent({
|
|
739
|
+
inheritAttrs: !1,
|
|
740
|
+
__name: "Expanded",
|
|
741
|
+
props: {
|
|
742
|
+
flex: { default: 1 },
|
|
743
|
+
alignSelf: { default: "auto" },
|
|
744
|
+
minSize: {},
|
|
745
|
+
maxSize: {}
|
|
746
|
+
},
|
|
747
|
+
setup(o) {
|
|
748
|
+
return (F, I) => (openBlock(), createBlock(FlexItem_default, {
|
|
749
|
+
flex: o.flex,
|
|
750
|
+
expanded: "",
|
|
751
|
+
"align-self": o.alignSelf,
|
|
752
|
+
"min-size": o.minSize,
|
|
753
|
+
"max-size": o.maxSize
|
|
754
|
+
}, {
|
|
755
|
+
default: withCtx(() => [renderSlot(F.$slots, "default")]),
|
|
756
|
+
_: 3
|
|
757
|
+
}, 8, [
|
|
758
|
+
"flex",
|
|
759
|
+
"align-self",
|
|
760
|
+
"min-size",
|
|
761
|
+
"max-size"
|
|
762
|
+
]));
|
|
763
|
+
}
|
|
764
|
+
});
|
|
765
|
+
function usePositionStyle(o, F = "absolute") {
|
|
766
|
+
return computed(() => {
|
|
767
|
+
let I = {
|
|
768
|
+
position: F,
|
|
769
|
+
boxSizing: "border-box"
|
|
770
|
+
};
|
|
771
|
+
return I.top = px2vw(o.top), I.bottom = px2vw(o.bottom), I.left = px2vw(o.left), I.right = px2vw(o.right), I.width = px2vw(o.width), I.height = px2vw(o.height), I.zIndex = o.zIndex, I;
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
var Fixed_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
775
|
+
inheritAttrs: !1,
|
|
776
|
+
__name: "Fixed",
|
|
777
|
+
props: {
|
|
778
|
+
top: {},
|
|
779
|
+
bottom: {},
|
|
780
|
+
left: {},
|
|
781
|
+
right: {},
|
|
782
|
+
width: {},
|
|
783
|
+
height: {},
|
|
784
|
+
zIndex: { default: 100 }
|
|
785
|
+
},
|
|
786
|
+
setup(o) {
|
|
787
|
+
let F = usePositionStyle(o, "fixed");
|
|
788
|
+
return (o, I) => (openBlock(), createElementBlock("div", {
|
|
789
|
+
class: "flutter-fixed",
|
|
790
|
+
style: normalizeStyle(unref(F))
|
|
791
|
+
}, [renderSlot(o.$slots, "default", {}, void 0, !0)], 4));
|
|
792
|
+
}
|
|
793
|
+
}), __plugin_vue_export_helper_default = (o, F) => {
|
|
794
|
+
let I = o.__vccOpts || o;
|
|
795
|
+
for (let [o, L] of F) I[o] = L;
|
|
796
|
+
return I;
|
|
797
|
+
}, Fixed_default = /* @__PURE__ */ __plugin_vue_export_helper_default(Fixed_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-b47757ec"]]);
|
|
798
|
+
function useChildren(L) {
|
|
799
|
+
if (!L) return [];
|
|
800
|
+
let R = L();
|
|
801
|
+
return R ? R.filter((L) => !(L.type === Comment || L.type === Text && typeof L.children == "string" && !L.children.trim() || L.type === Fragment && Array.isArray(L.children) && L.children.length === 0)) : [];
|
|
802
|
+
}
|
|
803
|
+
function useChild(o) {
|
|
804
|
+
let F = useChildren(o);
|
|
805
|
+
return F.length === 0 ? null : F[0];
|
|
806
|
+
}
|
|
807
|
+
var GestureDetector_default = defineComponent({
|
|
808
|
+
name: "GestureDetector",
|
|
809
|
+
inheritAttrs: !1,
|
|
810
|
+
props: { behavior: {
|
|
811
|
+
type: String,
|
|
812
|
+
default: "deferToChild"
|
|
813
|
+
} },
|
|
814
|
+
emits: events,
|
|
815
|
+
setup(o, { slots: F, emit: R }) {
|
|
816
|
+
let z = useGestures({ emit: R });
|
|
817
|
+
return provideGesture(z, o.behavior), () => {
|
|
818
|
+
let o = useChild(F.default);
|
|
819
|
+
return o ? o.type === Text ? h("span", z, [o]) : typeof o.type == "string" ? cloneVNode(o, z) : o : null;
|
|
820
|
+
};
|
|
821
|
+
}
|
|
822
|
+
}), ScrollView_default = /* @__PURE__ */ defineComponent({
|
|
823
|
+
inheritAttrs: !1,
|
|
824
|
+
__name: "ScrollView",
|
|
825
|
+
props: {
|
|
826
|
+
scrollDirection: { default: "vertical" },
|
|
827
|
+
padding: {},
|
|
828
|
+
physics: { default: "bouncing" },
|
|
829
|
+
clipBehavior: { default: "hardEdge" },
|
|
830
|
+
reverse: {
|
|
831
|
+
type: Boolean,
|
|
832
|
+
default: !1
|
|
833
|
+
}
|
|
834
|
+
},
|
|
835
|
+
emits: [
|
|
836
|
+
"scroll",
|
|
837
|
+
"scrollStart",
|
|
838
|
+
"scrollEnd"
|
|
839
|
+
],
|
|
840
|
+
setup(o, { expose: F, emit: I }) {
|
|
841
|
+
let L = o, z = I, B = ref(), U = !1, W = null, G = computed(() => {
|
|
842
|
+
let o = {
|
|
843
|
+
width: "100%",
|
|
844
|
+
height: "100%",
|
|
845
|
+
position: "relative",
|
|
846
|
+
display: "block",
|
|
847
|
+
scrollbarWidth: "none",
|
|
848
|
+
WebkitOverflowScrolling: "touch"
|
|
849
|
+
};
|
|
850
|
+
return L.physics === "never" ? o.overflow = "hidden" : (L.scrollDirection === "vertical" ? (o.overflowX = "hidden", o.overflowY = "auto") : (o.overflowX = "auto", o.overflowY = "hidden"), L.physics === "clamping" ? o.overscrollBehavior = "none" : L.physics === "bouncing" && (o.overscrollBehavior = "auto")), L.clipBehavior === "none" && L.physics === "never" && (o.overflow = "visible"), o;
|
|
851
|
+
}), K = computed(() => {
|
|
852
|
+
let o = {
|
|
853
|
+
minWidth: L.scrollDirection === "horizontal" ? "max-content" : "100%",
|
|
854
|
+
minHeight: L.scrollDirection === "vertical" ? "fit-content" : "100%",
|
|
855
|
+
boxSizing: "border-box",
|
|
856
|
+
display: "flow-root"
|
|
857
|
+
};
|
|
858
|
+
return L.padding && Object.assign(o, paddingToStyle(L.padding)), o;
|
|
859
|
+
}), q = (o) => {
|
|
860
|
+
let F = o.target;
|
|
861
|
+
U || (U = !0, z("scrollStart")), z("scroll", {
|
|
862
|
+
scrollTop: F.scrollTop,
|
|
863
|
+
scrollLeft: F.scrollLeft,
|
|
864
|
+
scrollHeight: F.scrollHeight,
|
|
865
|
+
scrollWidth: F.scrollWidth
|
|
866
|
+
}), W && clearTimeout(W), W = window.setTimeout(() => {
|
|
867
|
+
U = !1, z("scrollEnd");
|
|
868
|
+
}, 150);
|
|
869
|
+
};
|
|
870
|
+
return F({
|
|
871
|
+
scrollRef: B,
|
|
872
|
+
scrollTo: (o) => {
|
|
873
|
+
B.value?.scrollTo(o);
|
|
874
|
+
}
|
|
875
|
+
}), onUnmounted(() => {
|
|
876
|
+
W && clearTimeout(W);
|
|
877
|
+
}), (o, F) => (openBlock(), createElementBlock("div", {
|
|
878
|
+
ref_key: "scrollRef",
|
|
879
|
+
ref: B,
|
|
880
|
+
style: normalizeStyle(G.value),
|
|
881
|
+
onScroll: q
|
|
882
|
+
}, [createElementVNode("div", { style: normalizeStyle(K.value) }, [renderSlot(o.$slots, "default")], 4)], 36));
|
|
883
|
+
}
|
|
884
|
+
}), GridView_default = /* @__PURE__ */ defineComponent({
|
|
885
|
+
inheritAttrs: !1,
|
|
886
|
+
__name: "GridView",
|
|
887
|
+
props: {
|
|
888
|
+
scrollDirection: { default: "vertical" },
|
|
889
|
+
padding: {},
|
|
890
|
+
physics: { default: "bouncing" },
|
|
891
|
+
shrinkWrap: {
|
|
892
|
+
type: Boolean,
|
|
893
|
+
default: !1
|
|
894
|
+
},
|
|
895
|
+
clipBehavior: { default: "hardEdge" },
|
|
896
|
+
crossAxisCount: { default: 2 },
|
|
897
|
+
mainAxisSpacing: { default: 0 },
|
|
898
|
+
crossAxisSpacing: { default: 0 },
|
|
899
|
+
childAspectRatio: { default: 1 },
|
|
900
|
+
itemCount: {}
|
|
901
|
+
},
|
|
902
|
+
setup(o) {
|
|
903
|
+
let I = o, L = computed(() => ({
|
|
904
|
+
height: I.shrinkWrap ? "auto" : "100%",
|
|
905
|
+
width: I.shrinkWrap ? "auto" : "100%"
|
|
906
|
+
})), B = computed(() => {
|
|
907
|
+
let o = I.scrollDirection === "vertical", F = typeof I.mainAxisSpacing == "number" ? px2vw(I.mainAxisSpacing) : I.mainAxisSpacing, L = typeof I.crossAxisSpacing == "number" ? px2vw(I.crossAxisSpacing) : I.crossAxisSpacing;
|
|
908
|
+
return {
|
|
909
|
+
display: "grid",
|
|
910
|
+
gridTemplateColumns: o ? `repeat(${I.crossAxisCount}, 1fr)` : "none",
|
|
911
|
+
gridTemplateRows: o ? "none" : `repeat(${I.crossAxisCount}, 1fr)`,
|
|
912
|
+
gridAutoFlow: o ? "row" : "column",
|
|
913
|
+
gap: o ? `${F} ${L}` : `${L} ${F}`,
|
|
914
|
+
minWidth: o ? "100%" : "max-content",
|
|
915
|
+
minHeight: o ? "max-content" : "100%"
|
|
916
|
+
};
|
|
917
|
+
});
|
|
918
|
+
return (I, R) => (openBlock(), createBlock(ScrollView_default, {
|
|
919
|
+
"scroll-direction": o.scrollDirection,
|
|
920
|
+
padding: o.padding,
|
|
921
|
+
physics: o.physics,
|
|
922
|
+
"clip-behavior": o.clipBehavior,
|
|
923
|
+
class: "flutter-grid-view",
|
|
924
|
+
style: normalizeStyle(L.value)
|
|
925
|
+
}, {
|
|
926
|
+
default: withCtx(() => [createElementVNode("div", {
|
|
927
|
+
class: "grid-view-content",
|
|
928
|
+
style: normalizeStyle(B.value)
|
|
929
|
+
}, [o.itemCount ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(o.itemCount, (o) => renderSlot(I.$slots, "item", {
|
|
930
|
+
key: o - 1,
|
|
931
|
+
index: o - 1
|
|
932
|
+
})), 128)) : renderSlot(I.$slots, "default", { key: 0 })], 4)]),
|
|
933
|
+
_: 3
|
|
934
|
+
}, 8, [
|
|
935
|
+
"scroll-direction",
|
|
936
|
+
"padding",
|
|
937
|
+
"physics",
|
|
938
|
+
"clip-behavior",
|
|
939
|
+
"style"
|
|
940
|
+
]));
|
|
941
|
+
}
|
|
942
|
+
}), IgnorePointer_default = defineComponent({
|
|
943
|
+
name: "IgnorePointer",
|
|
944
|
+
inheritAttrs: !1,
|
|
945
|
+
props: {
|
|
946
|
+
ignoring: {
|
|
947
|
+
type: Boolean,
|
|
948
|
+
default: !1
|
|
949
|
+
},
|
|
950
|
+
ignoringSemantics: {
|
|
951
|
+
type: Boolean,
|
|
952
|
+
default: !1
|
|
953
|
+
}
|
|
954
|
+
},
|
|
955
|
+
setup(o, { slots: F }) {
|
|
956
|
+
return () => {
|
|
957
|
+
let I = useChild(F.default);
|
|
958
|
+
if (!I) return null;
|
|
959
|
+
if (!o.ignoring && !o.ignoringSemantics) return I;
|
|
960
|
+
let R = o.ignoringSemantics ? "true" : void 0;
|
|
961
|
+
return cloneVNode(I, {
|
|
962
|
+
style: { pointerEvents: o.ignoring ? "none" : void 0 },
|
|
963
|
+
"aria-hidden": R
|
|
964
|
+
});
|
|
965
|
+
};
|
|
966
|
+
}
|
|
967
|
+
}), _hoisted_1 = {
|
|
968
|
+
key: 0,
|
|
969
|
+
class: "list-view-separator"
|
|
970
|
+
}, ListView_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
971
|
+
inheritAttrs: !1,
|
|
972
|
+
__name: "ListView",
|
|
973
|
+
props: {
|
|
974
|
+
scrollDirection: { default: "vertical" },
|
|
975
|
+
padding: {},
|
|
976
|
+
physics: { default: "bouncing" },
|
|
977
|
+
shrinkWrap: {
|
|
978
|
+
type: Boolean,
|
|
979
|
+
default: !1
|
|
980
|
+
},
|
|
981
|
+
itemCount: {},
|
|
982
|
+
itemExtent: {},
|
|
983
|
+
separator: {
|
|
984
|
+
type: Boolean,
|
|
985
|
+
default: !1
|
|
986
|
+
},
|
|
987
|
+
clipBehavior: { default: "hardEdge" }
|
|
988
|
+
},
|
|
989
|
+
setup(o) {
|
|
990
|
+
let I = o, L = computed(() => ({
|
|
991
|
+
height: I.shrinkWrap ? "auto" : "100%",
|
|
992
|
+
width: I.shrinkWrap ? "auto" : "100%"
|
|
993
|
+
})), U = computed(() => {
|
|
994
|
+
let o = I.scrollDirection === "vertical";
|
|
995
|
+
return {
|
|
996
|
+
display: "flex",
|
|
997
|
+
flexDirection: o ? "column" : "row",
|
|
998
|
+
gap: "0px",
|
|
999
|
+
minWidth: o ? "100%" : "max-content"
|
|
1000
|
+
};
|
|
1001
|
+
});
|
|
1002
|
+
return (I, R) => (openBlock(), createBlock(ScrollView_default, {
|
|
1003
|
+
"scroll-direction": o.scrollDirection,
|
|
1004
|
+
padding: o.padding,
|
|
1005
|
+
physics: o.physics,
|
|
1006
|
+
"clip-behavior": o.clipBehavior,
|
|
1007
|
+
class: normalizeClass(["flutter-list-view", { "list-view-shrink-wrap": o.shrinkWrap }]),
|
|
1008
|
+
style: normalizeStyle(L.value)
|
|
1009
|
+
}, {
|
|
1010
|
+
default: withCtx(() => [createElementVNode("div", {
|
|
1011
|
+
class: "list-view-content",
|
|
1012
|
+
style: normalizeStyle(U.value)
|
|
1013
|
+
}, [o.itemCount ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(o.itemCount, (L) => (openBlock(), createElementBlock(Fragment, { key: L - 1 }, [renderSlot(I.$slots, "item", { index: L - 1 }, void 0, !0), o.separator && L < o.itemCount ? (openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(I.$slots, "separator", { index: L - 1 }, void 0, !0)])) : createCommentVNode("", !0)], 64))), 128)) : renderSlot(I.$slots, "default", { key: 0 }, void 0, !0)], 4)]),
|
|
1014
|
+
_: 3
|
|
1015
|
+
}, 8, [
|
|
1016
|
+
"scroll-direction",
|
|
1017
|
+
"padding",
|
|
1018
|
+
"physics",
|
|
1019
|
+
"clip-behavior",
|
|
1020
|
+
"class",
|
|
1021
|
+
"style"
|
|
1022
|
+
]));
|
|
1023
|
+
}
|
|
1024
|
+
}), [["__scopeId", "data-v-3b4a0fca"]]), Opacity_default = /* @__PURE__ */ defineComponent({
|
|
1025
|
+
name: "Opacity",
|
|
1026
|
+
inheritAttrs: !1,
|
|
1027
|
+
__name: "Opacity",
|
|
1028
|
+
props: { opacity: { default: 1 } },
|
|
1029
|
+
setup(o) {
|
|
1030
|
+
let F = o, I = computed(() => Math.max(0, Math.min(1, F.opacity)));
|
|
1031
|
+
provideOpacity(I);
|
|
1032
|
+
let L = computed(() => ({ opacity: I.value }));
|
|
1033
|
+
return (o, F) => (openBlock(), createElementBlock("div", {
|
|
1034
|
+
class: "fluekit-opacity",
|
|
1035
|
+
style: normalizeStyle(L.value)
|
|
1036
|
+
}, [renderSlot(o.$slots, "default")], 4));
|
|
1037
|
+
}
|
|
1038
|
+
}), Padding_default = defineComponent({
|
|
1039
|
+
name: "Padding",
|
|
1040
|
+
inheritAttrs: !1,
|
|
1041
|
+
props: {
|
|
1042
|
+
all: {
|
|
1043
|
+
type: [String, Number],
|
|
1044
|
+
default: void 0
|
|
1045
|
+
},
|
|
1046
|
+
horizontal: {
|
|
1047
|
+
type: [String, Number],
|
|
1048
|
+
default: void 0
|
|
1049
|
+
},
|
|
1050
|
+
vertical: {
|
|
1051
|
+
type: [String, Number],
|
|
1052
|
+
default: void 0
|
|
1053
|
+
},
|
|
1054
|
+
top: {
|
|
1055
|
+
type: [String, Number],
|
|
1056
|
+
default: void 0
|
|
1057
|
+
},
|
|
1058
|
+
right: {
|
|
1059
|
+
type: [String, Number],
|
|
1060
|
+
default: void 0
|
|
1061
|
+
},
|
|
1062
|
+
bottom: {
|
|
1063
|
+
type: [String, Number],
|
|
1064
|
+
default: void 0
|
|
1065
|
+
}
|
|
1066
|
+
},
|
|
1067
|
+
setup(o, { slots: F }) {
|
|
1068
|
+
return () => {
|
|
1069
|
+
let I = useChild(F.default);
|
|
1070
|
+
return I ? cloneVNode(I, { style: edgeInsetsToStyle("padding", o) }) : null;
|
|
1071
|
+
};
|
|
1072
|
+
}
|
|
1073
|
+
}), STACK_CONTEXT_KEY = "stackContext";
|
|
1074
|
+
function useStackContext() {
|
|
1075
|
+
return inject(STACK_CONTEXT_KEY, {});
|
|
1076
|
+
}
|
|
1077
|
+
const provideStackContext = () => provide(STACK_CONTEXT_KEY, {});
|
|
1078
|
+
var Positioned_default = /* @__PURE__ */ defineComponent({
|
|
1079
|
+
inheritAttrs: !1,
|
|
1080
|
+
__name: "Positioned",
|
|
1081
|
+
props: {
|
|
1082
|
+
top: {},
|
|
1083
|
+
bottom: {},
|
|
1084
|
+
left: {},
|
|
1085
|
+
right: {},
|
|
1086
|
+
width: {},
|
|
1087
|
+
height: {}
|
|
1088
|
+
},
|
|
1089
|
+
setup(o) {
|
|
1090
|
+
let F = o, I = useStackContext();
|
|
1091
|
+
onMounted(() => {
|
|
1092
|
+
I || warn("[Positioned] Positioned widget must be a descendant of a Stack. ");
|
|
1093
|
+
});
|
|
1094
|
+
let L = usePositionStyle(F, "absolute");
|
|
1095
|
+
return (o, F) => (openBlock(), createElementBlock("div", {
|
|
1096
|
+
class: "positioned",
|
|
1097
|
+
style: normalizeStyle(unref(L))
|
|
1098
|
+
}, [renderSlot(o.$slots, "default")], 4));
|
|
1099
|
+
}
|
|
1100
|
+
}), Row_default = /* @__PURE__ */ defineComponent({
|
|
1101
|
+
inheritAttrs: !1,
|
|
1102
|
+
__name: "Row",
|
|
1103
|
+
props: {
|
|
1104
|
+
direction: {},
|
|
1105
|
+
mainAxisAlignment: { default: "start" },
|
|
1106
|
+
crossAxisAlignment: { default: "center" },
|
|
1107
|
+
wrap: {
|
|
1108
|
+
type: Boolean,
|
|
1109
|
+
default: !1
|
|
1110
|
+
},
|
|
1111
|
+
gap: {},
|
|
1112
|
+
expanded: {
|
|
1113
|
+
type: Boolean,
|
|
1114
|
+
default: !1
|
|
1115
|
+
},
|
|
1116
|
+
as: {},
|
|
1117
|
+
constraints: {}
|
|
1118
|
+
},
|
|
1119
|
+
setup(o) {
|
|
1120
|
+
return (F, I) => (openBlock(), createBlock(FlexBox_default, {
|
|
1121
|
+
direction: "row",
|
|
1122
|
+
"main-axis-alignment": o.mainAxisAlignment,
|
|
1123
|
+
"cross-axis-alignment": o.crossAxisAlignment,
|
|
1124
|
+
wrap: o.wrap,
|
|
1125
|
+
gap: o.gap,
|
|
1126
|
+
as: o.as,
|
|
1127
|
+
expanded: o.expanded
|
|
1128
|
+
}, {
|
|
1129
|
+
default: withCtx(() => [renderSlot(F.$slots, "default")]),
|
|
1130
|
+
_: 3
|
|
1131
|
+
}, 8, [
|
|
1132
|
+
"main-axis-alignment",
|
|
1133
|
+
"cross-axis-alignment",
|
|
1134
|
+
"wrap",
|
|
1135
|
+
"gap",
|
|
1136
|
+
"as",
|
|
1137
|
+
"expanded"
|
|
1138
|
+
]));
|
|
1139
|
+
}
|
|
1140
|
+
}), SafeArea_default = /* @__PURE__ */ defineComponent({
|
|
1141
|
+
inheritAttrs: !1,
|
|
1142
|
+
__name: "SafeArea",
|
|
1143
|
+
props: {
|
|
1144
|
+
left: {
|
|
1145
|
+
type: Boolean,
|
|
1146
|
+
default: !0
|
|
1147
|
+
},
|
|
1148
|
+
top: {
|
|
1149
|
+
type: Boolean,
|
|
1150
|
+
default: !0
|
|
1151
|
+
},
|
|
1152
|
+
right: {
|
|
1153
|
+
type: Boolean,
|
|
1154
|
+
default: !0
|
|
1155
|
+
},
|
|
1156
|
+
bottom: {
|
|
1157
|
+
type: Boolean,
|
|
1158
|
+
default: !0
|
|
1159
|
+
},
|
|
1160
|
+
minimum: {},
|
|
1161
|
+
maintainBottomViewPadding: {
|
|
1162
|
+
type: Boolean,
|
|
1163
|
+
default: !1
|
|
1164
|
+
}
|
|
1165
|
+
},
|
|
1166
|
+
setup(o) {
|
|
1167
|
+
let F = o, I = computed(() => {
|
|
1168
|
+
let o = {
|
|
1169
|
+
display: "flex",
|
|
1170
|
+
flexDirection: "column",
|
|
1171
|
+
width: "100%",
|
|
1172
|
+
height: "100%"
|
|
1173
|
+
};
|
|
1174
|
+
return F.top && [].push("env(safe-area-inset-top)"), F.right && [].push("env(safe-area-inset-right)"), F.bottom && [].push("env(safe-area-inset-bottom)"), F.left && [].push("env(safe-area-inset-left)"), F.top && (o.paddingTop = "env(safe-area-inset-top)"), F.right && (o.paddingRight = "env(safe-area-inset-right)"), F.bottom && (o.paddingBottom = "env(safe-area-inset-bottom)"), F.left && (o.paddingLeft = "env(safe-area-inset-left)"), F.minimum, o;
|
|
1175
|
+
});
|
|
1176
|
+
return (o, F) => (openBlock(), createElementBlock("div", {
|
|
1177
|
+
class: "flutter-safe-area",
|
|
1178
|
+
style: normalizeStyle(I.value)
|
|
1179
|
+
}, [renderSlot(o.$slots, "default")], 4));
|
|
1180
|
+
}
|
|
1181
|
+
}), SizedBox_default = /* @__PURE__ */ defineComponent({
|
|
1182
|
+
inheritAttrs: !1,
|
|
1183
|
+
__name: "SizedBox",
|
|
1184
|
+
props: {
|
|
1185
|
+
width: {},
|
|
1186
|
+
height: {}
|
|
1187
|
+
},
|
|
1188
|
+
setup(o) {
|
|
1189
|
+
let F = o, I = useSafeAttrs(), L = useSlots(), z = computed(() => {
|
|
1190
|
+
let o = {
|
|
1191
|
+
boxSizing: "border-box",
|
|
1192
|
+
position: "relative"
|
|
1193
|
+
};
|
|
1194
|
+
return Object.assign(o, sizeToStyle(F)), L.default && (o.display = "flex", o.flexDirection = "column", o.flexShrink = 0), o;
|
|
1195
|
+
});
|
|
1196
|
+
return (o, F) => (openBlock(), createElementBlock("div", mergeProps({
|
|
1197
|
+
class: "sized-box",
|
|
1198
|
+
style: z.value
|
|
1199
|
+
}, unref(I)), [renderSlot(o.$slots, "default")], 16));
|
|
1200
|
+
}
|
|
1201
|
+
}), Stack_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
1202
|
+
inheritAttrs: !1,
|
|
1203
|
+
__name: "Stack",
|
|
1204
|
+
props: {
|
|
1205
|
+
alignment: { default: "topLeft" },
|
|
1206
|
+
clipBehavior: { default: "none" },
|
|
1207
|
+
textDirection: { default: "ltr" },
|
|
1208
|
+
fit: { default: "loose" }
|
|
1209
|
+
},
|
|
1210
|
+
setup(o) {
|
|
1211
|
+
let F = o, I = {
|
|
1212
|
+
topLeft: {
|
|
1213
|
+
justifyContent: "flex-start",
|
|
1214
|
+
alignItems: "flex-start"
|
|
1215
|
+
},
|
|
1216
|
+
topCenter: {
|
|
1217
|
+
justifyContent: "flex-start",
|
|
1218
|
+
alignItems: "center"
|
|
1219
|
+
},
|
|
1220
|
+
topRight: {
|
|
1221
|
+
justifyContent: "flex-start",
|
|
1222
|
+
alignItems: "flex-end"
|
|
1223
|
+
},
|
|
1224
|
+
centerLeft: {
|
|
1225
|
+
justifyContent: "center",
|
|
1226
|
+
alignItems: "flex-start"
|
|
1227
|
+
},
|
|
1228
|
+
center: {
|
|
1229
|
+
justifyContent: "center",
|
|
1230
|
+
alignItems: "center"
|
|
1231
|
+
},
|
|
1232
|
+
centerRight: {
|
|
1233
|
+
justifyContent: "center",
|
|
1234
|
+
alignItems: "flex-end"
|
|
1235
|
+
},
|
|
1236
|
+
bottomLeft: {
|
|
1237
|
+
justifyContent: "flex-end",
|
|
1238
|
+
alignItems: "flex-start"
|
|
1239
|
+
},
|
|
1240
|
+
bottomCenter: {
|
|
1241
|
+
justifyContent: "flex-end",
|
|
1242
|
+
alignItems: "center"
|
|
1243
|
+
},
|
|
1244
|
+
bottomRight: {
|
|
1245
|
+
justifyContent: "flex-end",
|
|
1246
|
+
alignItems: "flex-end"
|
|
1247
|
+
}
|
|
1248
|
+
}, L = {
|
|
1249
|
+
clip: "hidden",
|
|
1250
|
+
hardEdge: "hidden",
|
|
1251
|
+
antiAlias: "hidden",
|
|
1252
|
+
none: "visible"
|
|
1253
|
+
}, z = computed(() => {
|
|
1254
|
+
let o = {
|
|
1255
|
+
position: "relative",
|
|
1256
|
+
display: "flex",
|
|
1257
|
+
flexDirection: "column",
|
|
1258
|
+
...I[F.alignment],
|
|
1259
|
+
overflow: L[F.clipBehavior],
|
|
1260
|
+
direction: F.textDirection,
|
|
1261
|
+
boxSizing: "border-box"
|
|
1262
|
+
};
|
|
1263
|
+
return F.fit === "expand" && (o.width = "100%", o.height = "100%"), o;
|
|
1264
|
+
});
|
|
1265
|
+
return provideStackContext(), (o, F) => (openBlock(), createElementBlock("div", {
|
|
1266
|
+
class: "flutter-stack",
|
|
1267
|
+
style: normalizeStyle(z.value)
|
|
1268
|
+
}, [renderSlot(o.$slots, "default", {}, void 0, !0)], 4));
|
|
1269
|
+
}
|
|
1270
|
+
}), [["__scopeId", "data-v-f268257b"]]), Sticky_default = /* @__PURE__ */ defineComponent({
|
|
1271
|
+
inheritAttrs: !1,
|
|
1272
|
+
__name: "Sticky",
|
|
1273
|
+
props: {
|
|
1274
|
+
top: {},
|
|
1275
|
+
bottom: {},
|
|
1276
|
+
left: {},
|
|
1277
|
+
right: {},
|
|
1278
|
+
width: {},
|
|
1279
|
+
height: {},
|
|
1280
|
+
zIndex: { default: 10 }
|
|
1281
|
+
},
|
|
1282
|
+
setup(o) {
|
|
1283
|
+
let F = usePositionStyle(o, "sticky");
|
|
1284
|
+
return (o, I) => (openBlock(), createElementBlock("div", {
|
|
1285
|
+
class: "flutter-sticky",
|
|
1286
|
+
style: normalizeStyle(unref(F))
|
|
1287
|
+
}, [renderSlot(o.$slots, "default")], 4));
|
|
1288
|
+
}
|
|
1289
|
+
});
|
|
1290
|
+
let FontWeight = /* @__PURE__ */ function(o) {
|
|
1291
|
+
return o.w100 = "100", o.w200 = "200", o.w300 = "300", o.w400 = "400", o.w500 = "500", o.w600 = "600", o.w700 = "700", o.w800 = "800", o.w900 = "900", o.normal = "normal", o.bold = "bold", o.bolder = "bolder", o;
|
|
1292
|
+
}({}), FontStyle = /* @__PURE__ */ function(o) {
|
|
1293
|
+
return o.normal = "normal", o.italic = "italic", o;
|
|
1294
|
+
}({}), TextDecoration = /* @__PURE__ */ function(o) {
|
|
1295
|
+
return o.none = "none", o.underline = "underline", o.overline = "overline", o.lineThrough = "line-through", o;
|
|
1296
|
+
}({}), TextDecorationStyle = /* @__PURE__ */ function(o) {
|
|
1297
|
+
return o.solid = "solid", o.double = "double", o.dotted = "dotted", o.dashed = "dashed", o.wavy = "wavy", o;
|
|
1298
|
+
}({}), TextAlign = /* @__PURE__ */ function(o) {
|
|
1299
|
+
return o.left = "left", o.right = "right", o.center = "center", o.justify = "justify", o.start = "start", o.end = "end", o;
|
|
1300
|
+
}({}), TextOverflow = /* @__PURE__ */ function(o) {
|
|
1301
|
+
return o.clip = "clip", o.fade = "fade", o.ellipsis = "ellipsis", o.visible = "visible", o;
|
|
1302
|
+
}({}), TextBaseline = /* @__PURE__ */ function(o) {
|
|
1303
|
+
return o.alphabetic = "alphabetic", o.ideographic = "ideographic", o;
|
|
1304
|
+
}({}), TextDirection = /* @__PURE__ */ function(o) {
|
|
1305
|
+
return o.rtl = "rtl", o.ltr = "ltr", o;
|
|
1306
|
+
}({});
|
|
1307
|
+
var _kColorForegroundWarning = "Cannot provide both a color and a foreground\nThe color argument is just a shorthand for \"foreground: Paint()..color = color\".", _kColorBackgroundWarning = "Cannot provide both a backgroundColor and a background\nThe backgroundColor argument is just a shorthand for \"background: Paint()..color = backgroundColor\".";
|
|
1308
|
+
function validateTextStyle(o) {
|
|
1309
|
+
o.color && o.foreground && console.warn(_kColorForegroundWarning), o.backgroundColor && o.background && console.warn(_kColorBackgroundWarning);
|
|
1310
|
+
}
|
|
1311
|
+
function buildFontFamily(o, F, I) {
|
|
1312
|
+
let L = o;
|
|
1313
|
+
return F && L && (L = `packages/${F}/${L}`), I && I.length > 0 ? [L, ...I].filter(Boolean).join(", ") : L;
|
|
1314
|
+
}
|
|
1315
|
+
function toCSSStyle(o = {}) {
|
|
1316
|
+
validateTextStyle(o);
|
|
1317
|
+
let F = {};
|
|
1318
|
+
F.margin = 0, F.padding = 0, F.border = "none", F.fontSmooth = "antialiased", F.MozOsxFontSmoothing = "grayscale", F.textRendering = "optimizeLegibility", F.wordBreak = "break-word", F.overflowWrap = "break-word", F.transition = "all 0.2s ease-in-out", o.foreground ? Object.assign(F, o.foreground) : o.color && (F.color = o.color), o.background ? Object.assign(F, o.background) : o.backgroundColor && (F.backgroundColor = o.backgroundColor), o.fontSize && (F.fontSize = typeof o.fontSize == "number" ? px2vw(o.fontSize) : o.fontSize), o.fontWeight && (F.fontWeight = o.fontWeight.toString()), o.fontStyle && (F.fontStyle = o.fontStyle);
|
|
1319
|
+
let I = buildFontFamily(o.fontFamily, o.package, o.fontFamilyFallback);
|
|
1320
|
+
if (I && (F.fontFamily = I), o.letterSpacing && (F.letterSpacing = px2vw(o.letterSpacing)), o.wordSpacing && (F.wordSpacing = px2vw(o.wordSpacing)), o.height && (F.lineHeight = o.height.toString()), o.decoration && (F.textDecoration = o.decoration), o.decorationColor && (F.textDecorationColor = o.decorationColor), o.decorationStyle && (F.textDecorationStyle = o.decorationStyle), o.decorationThickness && (F.textDecorationThickness = px2vw(o.decorationThickness)), o.overflow) switch (o.overflow) {
|
|
1321
|
+
case TextOverflow.ellipsis:
|
|
1322
|
+
F.overflow = "hidden", F.textOverflow = "ellipsis", F.whiteSpace = "nowrap";
|
|
1323
|
+
break;
|
|
1324
|
+
case TextOverflow.clip:
|
|
1325
|
+
F.overflow = "hidden";
|
|
1326
|
+
break;
|
|
1327
|
+
case TextOverflow.visible:
|
|
1328
|
+
F.overflow = "visible";
|
|
1329
|
+
break;
|
|
1330
|
+
case TextOverflow.fade:
|
|
1331
|
+
F.overflow = "hidden", F.whiteSpace = "nowrap", F.maskImage = "linear-gradient(to right, black 80%, transparent 100%)";
|
|
1332
|
+
break;
|
|
1333
|
+
}
|
|
1334
|
+
return o.shadows && o.shadows.length > 0 && (F.textShadow = o.shadows.map((o) => {
|
|
1335
|
+
let F = o.offsetX || 0, I = o.offsetY || 0, L = o.blurRadius || 0, R = o.color || "rgba(0,0,0,0.5)";
|
|
1336
|
+
return `${px2vw(F)} ${px2vw(I)} ${px2vw(L)} ${R}`;
|
|
1337
|
+
}).join(", ")), o.fontFeatures && (F.fontFeatureSettings = JSON.stringify(o.fontFeatures)), o.fontVariations && (F.fontVariationSettings = JSON.stringify(o.fontVariations)), F;
|
|
1338
|
+
}
|
|
1339
|
+
function TextStyle(o = {}, F = {}) {
|
|
1340
|
+
let I = {
|
|
1341
|
+
...F,
|
|
1342
|
+
...o
|
|
1343
|
+
};
|
|
1344
|
+
return validateTextStyle(I), I;
|
|
1345
|
+
}
|
|
1346
|
+
var Text_default = /* @__PURE__ */ defineComponent({
|
|
1347
|
+
inheritAttrs: !1,
|
|
1348
|
+
__name: "Text",
|
|
1349
|
+
props: {
|
|
1350
|
+
data: {},
|
|
1351
|
+
style: {},
|
|
1352
|
+
textAlign: {},
|
|
1353
|
+
textDirection: {},
|
|
1354
|
+
softWrap: {
|
|
1355
|
+
type: Boolean,
|
|
1356
|
+
default: !0
|
|
1357
|
+
},
|
|
1358
|
+
overflow: {},
|
|
1359
|
+
maxLines: {},
|
|
1360
|
+
semanticsLabel: {},
|
|
1361
|
+
tag: { default: "span" }
|
|
1362
|
+
},
|
|
1363
|
+
setup(o) {
|
|
1364
|
+
let F = o, I = useGestureEvents(), L = computed(() => {
|
|
1365
|
+
let o = F.data;
|
|
1366
|
+
return !isUndefined(o) && o != null ? o.toString() : "";
|
|
1367
|
+
}), B = useGestureStyle(), V = computed(() => {
|
|
1368
|
+
let o = F.style ? toCSSStyle(F.style) : {};
|
|
1369
|
+
F.textAlign && (o.textAlign = F.textAlign), F.textDirection && (o.direction = F.textDirection), F.softWrap === !1 && (o.whiteSpace = "nowrap");
|
|
1370
|
+
let I = F.overflow ?? F.style?.overflow;
|
|
1371
|
+
if (I) switch (I) {
|
|
1372
|
+
case TextOverflow.ellipsis:
|
|
1373
|
+
o.textOverflow = "ellipsis", o.overflow = "hidden", F.softWrap === !1 && (o.whiteSpace = "nowrap");
|
|
1374
|
+
break;
|
|
1375
|
+
case TextOverflow.clip:
|
|
1376
|
+
o.overflow = "hidden", o.textOverflow = "clip";
|
|
1377
|
+
break;
|
|
1378
|
+
case TextOverflow.visible:
|
|
1379
|
+
o.overflow = "visible";
|
|
1380
|
+
break;
|
|
1381
|
+
case TextOverflow.fade:
|
|
1382
|
+
o.overflow = "hidden", o.whiteSpace = "nowrap", o.maskImage = "linear-gradient(to right, black 80%, transparent 100%)", o.WebkitMaskImage = "linear-gradient(to right, black 80%, transparent 100%)";
|
|
1383
|
+
break;
|
|
1384
|
+
}
|
|
1385
|
+
return F.maxLines && F.maxLines > 0 ? (o.overflow = "hidden", o.display = "-webkit-box", o.WebkitBoxOrient = "vertical", o.WebkitLineClamp = F.maxLines.toString(), F.softWrap !== !1 && (o.whiteSpace = "normal")) : o.display ||= F.tag === "span" ? "inline-block" : "block", Object.assign(o, B), o;
|
|
1386
|
+
});
|
|
1387
|
+
return (F, R) => (openBlock(), createBlock(resolveDynamicComponent(o.tag), mergeProps({ style: V.value }, unref(I)), {
|
|
1388
|
+
default: withCtx(() => [renderSlot(F.$slots, "default", {}, () => [createTextVNode(toDisplayString(L.value), 1)])]),
|
|
1389
|
+
_: 3
|
|
1390
|
+
}, 16, ["style"]));
|
|
1391
|
+
}
|
|
1392
|
+
}), Transform_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
1393
|
+
inheritAttrs: !1,
|
|
1394
|
+
__name: "Transform",
|
|
1395
|
+
props: {
|
|
1396
|
+
transform: {},
|
|
1397
|
+
alignment: { default: "center" },
|
|
1398
|
+
origin: {}
|
|
1399
|
+
},
|
|
1400
|
+
setup(o) {
|
|
1401
|
+
let F = o, I = computed(() => {
|
|
1402
|
+
let o = {
|
|
1403
|
+
transform: F.transform,
|
|
1404
|
+
display: "flex",
|
|
1405
|
+
flexDirection: "column",
|
|
1406
|
+
flexShrink: 0
|
|
1407
|
+
};
|
|
1408
|
+
return F.origin ? o.transformOrigin = F.origin : F.alignment && (o.transformOrigin = alignmentToOrigin(F.alignment)), o;
|
|
1409
|
+
});
|
|
1410
|
+
return (o, F) => (openBlock(), createElementBlock("div", {
|
|
1411
|
+
class: "flutter-transform",
|
|
1412
|
+
style: normalizeStyle(I.value)
|
|
1413
|
+
}, [renderSlot(o.$slots, "default", {}, void 0, !0)], 4));
|
|
1414
|
+
}
|
|
1415
|
+
}), [["__scopeId", "data-v-44c40486"]]), Wrap_default = /* @__PURE__ */ defineComponent({
|
|
1416
|
+
inheritAttrs: !1,
|
|
1417
|
+
__name: "Wrap",
|
|
1418
|
+
props: {
|
|
1419
|
+
direction: { default: "horizontal" },
|
|
1420
|
+
alignment: { default: "start" },
|
|
1421
|
+
spacing: { default: 0 },
|
|
1422
|
+
runAlignment: { default: "start" },
|
|
1423
|
+
runSpacing: { default: 0 },
|
|
1424
|
+
crossAxisAlignment: { default: "start" },
|
|
1425
|
+
verticalDirection: { default: "down" },
|
|
1426
|
+
clipBehavior: { default: "none" }
|
|
1427
|
+
},
|
|
1428
|
+
setup(o) {
|
|
1429
|
+
let F = o, I = {
|
|
1430
|
+
start: "flex-start",
|
|
1431
|
+
end: "flex-end",
|
|
1432
|
+
center: "center",
|
|
1433
|
+
spaceBetween: "space-between",
|
|
1434
|
+
spaceAround: "space-around",
|
|
1435
|
+
spaceEvenly: "space-evenly"
|
|
1436
|
+
}, L = {
|
|
1437
|
+
start: "flex-start",
|
|
1438
|
+
end: "flex-end",
|
|
1439
|
+
center: "center"
|
|
1440
|
+
}, z = computed(() => ({
|
|
1441
|
+
display: "flex",
|
|
1442
|
+
flexWrap: "wrap",
|
|
1443
|
+
flexDirection: F.direction === "horizontal" ? F.verticalDirection === "down" ? "row" : "row-reverse" : F.verticalDirection === "down" ? "column" : "column-reverse",
|
|
1444
|
+
justifyContent: I[F.alignment],
|
|
1445
|
+
alignContent: I[F.runAlignment],
|
|
1446
|
+
alignItems: L[F.crossAxisAlignment],
|
|
1447
|
+
gap: `${px2vw(F.runSpacing)} ${px2vw(F.spacing)}`,
|
|
1448
|
+
overflow: F.clipBehavior === "none" ? "visible" : "hidden"
|
|
1449
|
+
}));
|
|
1450
|
+
return (o, F) => (openBlock(), createElementBlock("div", {
|
|
1451
|
+
class: "flutter-wrap",
|
|
1452
|
+
style: normalizeStyle(z.value)
|
|
1453
|
+
}, [renderSlot(o.$slots, "default")], 4));
|
|
1454
|
+
}
|
|
1455
|
+
});
|
|
1456
|
+
setTransform(!1);
|
|
1457
|
+
export { Align_default as Align, FlexAlignment as Alignment, FlexAlignment, AnimatedContainer_default as AnimatedContainer, AnimatedOpacity_default as AnimatedOpacity, AssetImage, Border, BoxAlignment, BoxConstraints, BoxDecoration, BoxFit, Center_default as Center, Clip, Column_default as Column, Container_default as Container, CrossAxisAlignment, DecorationImage, EdgeInsets, Expanded_default as Expanded, Fixed_default as Fixed, FlexBoxAlignMap, FlexBoxJustifyMap, FontStyle, FontWeight, GestureDetector_default as GestureDetector, GridView_default as GridView, IgnorePointer_default as IgnorePointer, LinearGradient, ListView_default as ListView, MainAxisAlignment, NetworkImage, Opacity_default as Opacity, OpacityKey, Padding_default as Padding, Positioned_default as Positioned, Row_default as Row, SafeArea_default as SafeArea, ScrollView_default as ScrollView, Size, SizedBox_default as SizedBox, Stack_default as Stack, StackFit, Sticky_default as Sticky, Text_default as Text, TextAlign, TextBaseline, TextDecoration, TextDecorationStyle, TextDirection, TextOverflow, TextStyle, Transform_default as Transform, Wrap_default as Wrap, alignmentToOrigin, alignmentToStyle, borderToStyle, boxConstraintsToStyle, boxDecorationToStyle, decorationImageToStyle, edgeInsetsToStyle, marginToStyle, normalizeSrc, paddingToStyle, provideOpacity, px2vw, setBaseUrl, setDefaultVW, setTransform, sizeToStyle, toCSSStyle, useOpacity };
|