panelui-native 0.40.0 → 0.43.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/README.md +4 -2
- package/lib/module/components/card/index.js +172 -3
- package/lib/module/components/card/index.js.map +1 -1
- package/lib/module/components/color-picker/index.js +1395 -0
- package/lib/module/components/color-picker/index.js.map +1 -0
- package/lib/module/components/combobox/index.js +87 -19
- package/lib/module/components/combobox/index.js.map +1 -1
- package/lib/module/components/drawer/index.js +13 -4
- package/lib/module/components/drawer/index.js.map +1 -1
- package/lib/module/components/kpi-chart/index.js +648 -0
- package/lib/module/components/kpi-chart/index.js.map +1 -0
- package/lib/module/components/map/index.js +72 -12
- package/lib/module/components/map/index.js.map +1 -1
- package/lib/module/components/menu/index.js +40 -10
- package/lib/module/components/menu/index.js.map +1 -1
- package/lib/module/components/pagination/index.js +19 -9
- package/lib/module/components/pagination/index.js.map +1 -1
- package/lib/module/components/panelside/index.js +68 -18
- package/lib/module/components/panelside/index.js.map +1 -1
- package/lib/module/components/radar-chart/index.js +704 -0
- package/lib/module/components/radar-chart/index.js.map +1 -0
- package/lib/module/components/section-rail/index.js +32 -7
- package/lib/module/components/section-rail/index.js.map +1 -1
- package/lib/module/components/slider/index.js +240 -39
- package/lib/module/components/slider/index.js.map +1 -1
- package/lib/module/components/tabs/index.js +194 -10
- package/lib/module/components/tabs/index.js.map +1 -1
- package/lib/module/components/text-animation/index.js +857 -0
- package/lib/module/components/text-animation/index.js.map +1 -0
- package/lib/module/icons/index.js +25 -7
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/index.js +5 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/theme/use-theme.js +1 -1
- package/lib/module/utils/chart.js +44 -0
- package/lib/module/utils/chart.js.map +1 -1
- package/lib/module/utils/color.js +268 -0
- package/lib/module/utils/color.js.map +1 -0
- package/lib/typescript/src/components/card/index.d.ts +20 -0
- package/lib/typescript/src/components/card/index.d.ts.map +1 -1
- package/lib/typescript/src/components/color-picker/index.d.ts +258 -0
- package/lib/typescript/src/components/color-picker/index.d.ts.map +1 -0
- package/lib/typescript/src/components/combobox/index.d.ts.map +1 -1
- package/lib/typescript/src/components/drawer/index.d.ts +13 -1
- package/lib/typescript/src/components/drawer/index.d.ts.map +1 -1
- package/lib/typescript/src/components/kpi-chart/index.d.ts +490 -0
- package/lib/typescript/src/components/kpi-chart/index.d.ts.map +1 -0
- package/lib/typescript/src/components/map/index.d.ts +37 -2
- package/lib/typescript/src/components/map/index.d.ts.map +1 -1
- package/lib/typescript/src/components/menu/index.d.ts.map +1 -1
- package/lib/typescript/src/components/pagination/index.d.ts.map +1 -1
- package/lib/typescript/src/components/panelside/index.d.ts +50 -4
- package/lib/typescript/src/components/panelside/index.d.ts.map +1 -1
- package/lib/typescript/src/components/radar-chart/index.d.ts +214 -0
- package/lib/typescript/src/components/radar-chart/index.d.ts.map +1 -0
- package/lib/typescript/src/components/section-rail/index.d.ts +8 -1
- package/lib/typescript/src/components/section-rail/index.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/index.d.ts +19 -0
- package/lib/typescript/src/components/slider/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tabs/index.d.ts +11 -1
- package/lib/typescript/src/components/tabs/index.d.ts.map +1 -1
- package/lib/typescript/src/components/text-animation/index.d.ts +268 -0
- package/lib/typescript/src/components/text-animation/index.d.ts.map +1 -0
- package/lib/typescript/src/icons/index.d.ts +6 -0
- package/lib/typescript/src/icons/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +8 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/chart.d.ts +21 -0
- package/lib/typescript/src/utils/chart.d.ts.map +1 -1
- package/lib/typescript/src/utils/color.d.ts +74 -0
- package/lib/typescript/src/utils/color.d.ts.map +1 -0
- package/package.json +2 -1
- package/src/components/card/index.tsx +227 -2
- package/src/components/color-picker/index.tsx +1618 -0
- package/src/components/combobox/index.tsx +89 -19
- package/src/components/drawer/index.tsx +31 -9
- package/src/components/kpi-chart/index.tsx +719 -0
- package/src/components/map/index.tsx +158 -14
- package/src/components/menu/index.tsx +51 -6
- package/src/components/pagination/index.tsx +18 -6
- package/src/components/panelside/index.tsx +134 -19
- package/src/components/radar-chart/index.tsx +910 -0
- package/src/components/section-rail/index.tsx +42 -8
- package/src/components/slider/index.tsx +283 -41
- package/src/components/tabs/index.tsx +263 -8
- package/src/components/text-animation/index.tsx +1093 -0
- package/src/icons/index.tsx +23 -4
- package/src/index.ts +73 -1
- package/src/theme/use-theme.ts +1 -1
- package/src/utils/chart.ts +52 -0
- package/src/utils/color.ts +246 -0
- package/theme.css +125 -112
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Colour arithmetic, in the model a picker is shaped like.
|
|
5
|
+
*
|
|
6
|
+
* A picker's controls *are* HSV: a square of saturation against brightness
|
|
7
|
+
* under one hue, with the hue itself on a separate scale. Storing anything
|
|
8
|
+
* else means converting on every frame of a drag and, worse, losing the
|
|
9
|
+
* position of the thumb — a fully black colour is `#000` whatever its hue and
|
|
10
|
+
* saturation were, so a round trip through RGB throws away where the finger
|
|
11
|
+
* was. HSV is kept as the truth and everything here converts *out* of it.
|
|
12
|
+
*
|
|
13
|
+
* Every function is a worklet. The drag never leaves the UI thread, so the
|
|
14
|
+
* hue behind the square, the thumb fill and the preview swatch all need these
|
|
15
|
+
* on the same frame the finger moved, and a JS-only helper would put a bridge
|
|
16
|
+
* hop in the middle of that.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/** A colour in the model the picker stores: hue, saturation, value, alpha. */
|
|
20
|
+
|
|
21
|
+
/** How a colour is written when it leaves the picker. */
|
|
22
|
+
|
|
23
|
+
function clamp01(n) {
|
|
24
|
+
'worklet';
|
|
25
|
+
|
|
26
|
+
return n < 0 ? 0 : n > 1 ? 1 : n;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** Hue wraps rather than clamps — 370° is 10°, and -10° is 350°. */
|
|
30
|
+
function wrapHue(h) {
|
|
31
|
+
'worklet';
|
|
32
|
+
|
|
33
|
+
return (h % 360 + 360) % 360;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** HSV to 8-bit RGB. */
|
|
37
|
+
export function hsvToRgb(h, s, v) {
|
|
38
|
+
'worklet';
|
|
39
|
+
|
|
40
|
+
const hue = wrapHue(h) / 60;
|
|
41
|
+
const sat = clamp01(s);
|
|
42
|
+
const val = clamp01(v);
|
|
43
|
+
const c = val * sat;
|
|
44
|
+
const x = c * (1 - Math.abs(hue % 2 - 1));
|
|
45
|
+
const m = val - c;
|
|
46
|
+
let r = 0;
|
|
47
|
+
let g = 0;
|
|
48
|
+
let b = 0;
|
|
49
|
+
if (hue < 1) {
|
|
50
|
+
r = c;
|
|
51
|
+
g = x;
|
|
52
|
+
} else if (hue < 2) {
|
|
53
|
+
r = x;
|
|
54
|
+
g = c;
|
|
55
|
+
} else if (hue < 3) {
|
|
56
|
+
g = c;
|
|
57
|
+
b = x;
|
|
58
|
+
} else if (hue < 4) {
|
|
59
|
+
g = x;
|
|
60
|
+
b = c;
|
|
61
|
+
} else if (hue < 5) {
|
|
62
|
+
r = x;
|
|
63
|
+
b = c;
|
|
64
|
+
} else {
|
|
65
|
+
r = c;
|
|
66
|
+
b = x;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
r: Math.round((r + m) * 255),
|
|
70
|
+
g: Math.round((g + m) * 255),
|
|
71
|
+
b: Math.round((b + m) * 255)
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** 8-bit RGB to HSV. Hue is undefined for a grey, and comes back as `0`. */
|
|
76
|
+
export function rgbToHsv(r, g, b) {
|
|
77
|
+
'worklet';
|
|
78
|
+
|
|
79
|
+
const rr = clamp01(r / 255);
|
|
80
|
+
const gg = clamp01(g / 255);
|
|
81
|
+
const bb = clamp01(b / 255);
|
|
82
|
+
const max = Math.max(rr, gg, bb);
|
|
83
|
+
const min = Math.min(rr, gg, bb);
|
|
84
|
+
const d = max - min;
|
|
85
|
+
let h = 0;
|
|
86
|
+
if (d !== 0) {
|
|
87
|
+
if (max === rr) h = 60 * ((gg - bb) / d % 6);else if (max === gg) h = 60 * ((bb - rr) / d + 2);else h = 60 * ((rr - gg) / d + 4);
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
h: wrapHue(h),
|
|
91
|
+
s: max === 0 ? 0 : d / max,
|
|
92
|
+
v: max
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** HSV to HSL, for `format="hsl"`. Both are cylinders; only the axis differs. */
|
|
97
|
+
export function hsvToHsl(h, s, v) {
|
|
98
|
+
'worklet';
|
|
99
|
+
|
|
100
|
+
const val = clamp01(v);
|
|
101
|
+
const sat = clamp01(s);
|
|
102
|
+
const l = val * (1 - sat / 2);
|
|
103
|
+
const denominator = Math.min(l, 1 - l);
|
|
104
|
+
return {
|
|
105
|
+
h: wrapHue(h),
|
|
106
|
+
s: denominator === 0 ? 0 : (val - l) / denominator,
|
|
107
|
+
l
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* An `rgba()` string, which is what a style wants. Used for every animated
|
|
113
|
+
* fill in the picker, so it stays cheap: no allocation beyond the string, and
|
|
114
|
+
* no branch on the alpha.
|
|
115
|
+
*/
|
|
116
|
+
export function hsvToCss(h, s, v, a = 1) {
|
|
117
|
+
'worklet';
|
|
118
|
+
|
|
119
|
+
const {
|
|
120
|
+
r,
|
|
121
|
+
g,
|
|
122
|
+
b
|
|
123
|
+
} = hsvToRgb(h, s, v);
|
|
124
|
+
return `rgba(${r}, ${g}, ${b}, ${clamp01(a)})`;
|
|
125
|
+
}
|
|
126
|
+
function toHexPair(n) {
|
|
127
|
+
'worklet';
|
|
128
|
+
|
|
129
|
+
const clamped = n < 0 ? 0 : n > 255 ? 255 : Math.round(n);
|
|
130
|
+
return clamped < 16 ? `0${clamped.toString(16)}` : clamped.toString(16);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* A `#rrggbb` string, gaining a `#rrggbbaa` alpha pair only when the colour is
|
|
135
|
+
* actually translucent — an opaque colour written with a trailing `ff` is the
|
|
136
|
+
* same colour spelled in a way half the CSS parsers in the world reject.
|
|
137
|
+
*/
|
|
138
|
+
export function hsvToHex(h, s, v, a = 1) {
|
|
139
|
+
'worklet';
|
|
140
|
+
|
|
141
|
+
const {
|
|
142
|
+
r,
|
|
143
|
+
g,
|
|
144
|
+
b
|
|
145
|
+
} = hsvToRgb(h, s, v);
|
|
146
|
+
const base = `#${toHexPair(r)}${toHexPair(g)}${toHexPair(b)}`;
|
|
147
|
+
return a >= 1 ? base : `${base}${toHexPair(clamp01(a) * 255)}`;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/** Writes a stored colour out in one of the three formats a consumer asks for. */
|
|
151
|
+
export function formatColor(color, format = 'hex') {
|
|
152
|
+
'worklet';
|
|
153
|
+
|
|
154
|
+
const {
|
|
155
|
+
h,
|
|
156
|
+
s,
|
|
157
|
+
v,
|
|
158
|
+
a
|
|
159
|
+
} = color;
|
|
160
|
+
const alpha = clamp01(a);
|
|
161
|
+
if (format === 'rgb') {
|
|
162
|
+
const {
|
|
163
|
+
r,
|
|
164
|
+
g,
|
|
165
|
+
b
|
|
166
|
+
} = hsvToRgb(h, s, v);
|
|
167
|
+
return alpha >= 1 ? `rgb(${r}, ${g}, ${b})` : `rgba(${r}, ${g}, ${b}, ${Math.round(alpha * 100) / 100})`;
|
|
168
|
+
}
|
|
169
|
+
if (format === 'hsl') {
|
|
170
|
+
const hsl = hsvToHsl(h, s, v);
|
|
171
|
+
const sat = Math.round(hsl.s * 100);
|
|
172
|
+
const light = Math.round(hsl.l * 100);
|
|
173
|
+
const hue = Math.round(hsl.h);
|
|
174
|
+
return alpha >= 1 ? `hsl(${hue}, ${sat}%, ${light}%)` : `hsla(${hue}, ${sat}%, ${light}%, ${Math.round(alpha * 100) / 100})`;
|
|
175
|
+
}
|
|
176
|
+
return hsvToHex(h, s, v, alpha);
|
|
177
|
+
}
|
|
178
|
+
function expandShorthand(hex) {
|
|
179
|
+
let out = '';
|
|
180
|
+
for (let i = 0; i < hex.length; i++) out += hex[i] + hex[i];
|
|
181
|
+
return out;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Reads `#rgb`, `#rgba`, `#rrggbb`, `#rrggbbaa`, `rgb()`, `rgba()`, `hsl()`
|
|
186
|
+
* and `hsla()`, and returns `null` for anything else — including the named
|
|
187
|
+
* colours, which would mean shipping a lookup table of 148 words to parse a
|
|
188
|
+
* string a caller almost never writes.
|
|
189
|
+
*
|
|
190
|
+
* `null` rather than a thrown error or a silent black: a picker handed a value
|
|
191
|
+
* it cannot read should keep the one it has, and only a distinguishable "no"
|
|
192
|
+
* lets the caller do that.
|
|
193
|
+
*/
|
|
194
|
+
export function parseColor(input) {
|
|
195
|
+
const value = input.trim().toLowerCase();
|
|
196
|
+
if (value.startsWith('#')) {
|
|
197
|
+
let body = value.slice(1);
|
|
198
|
+
if (body.length === 3 || body.length === 4) body = expandShorthand(body);
|
|
199
|
+
if (body.length !== 6 && body.length !== 8 || /[^0-9a-f]/.test(body)) return null;
|
|
200
|
+
const r = parseInt(body.slice(0, 2), 16);
|
|
201
|
+
const g = parseInt(body.slice(2, 4), 16);
|
|
202
|
+
const b = parseInt(body.slice(4, 6), 16);
|
|
203
|
+
const a = body.length === 8 ? parseInt(body.slice(6, 8), 16) / 255 : 1;
|
|
204
|
+
const {
|
|
205
|
+
h,
|
|
206
|
+
s,
|
|
207
|
+
v
|
|
208
|
+
} = rgbToHsv(r, g, b);
|
|
209
|
+
return {
|
|
210
|
+
h,
|
|
211
|
+
s,
|
|
212
|
+
v,
|
|
213
|
+
a
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
const fn = /^(rgba?|hsla?)\(([^)]+)\)$/.exec(value);
|
|
217
|
+
if (!fn) return null;
|
|
218
|
+
|
|
219
|
+
// Both the comma and the space syntaxes, and the `/` that separates alpha in
|
|
220
|
+
// the space one.
|
|
221
|
+
const parts = fn[2].split(/[\s,/]+/).filter(Boolean);
|
|
222
|
+
if (parts.length < 3) return null;
|
|
223
|
+
const num = (raw, scale) => {
|
|
224
|
+
const n = parseFloat(raw);
|
|
225
|
+
if (Number.isNaN(n)) return null;
|
|
226
|
+
return raw.endsWith('%') ? n / 100 * scale : n;
|
|
227
|
+
};
|
|
228
|
+
const a = parts[3] === undefined ? 1 : num(parts[3], 1);
|
|
229
|
+
if (a === null) return null;
|
|
230
|
+
if (fn[1].startsWith('rgb')) {
|
|
231
|
+
const r = num(parts[0], 255);
|
|
232
|
+
const g = num(parts[1], 255);
|
|
233
|
+
const b = num(parts[2], 255);
|
|
234
|
+
if (r === null || g === null || b === null) return null;
|
|
235
|
+
const {
|
|
236
|
+
h,
|
|
237
|
+
s,
|
|
238
|
+
v
|
|
239
|
+
} = rgbToHsv(r, g, b);
|
|
240
|
+
return {
|
|
241
|
+
h,
|
|
242
|
+
s,
|
|
243
|
+
v,
|
|
244
|
+
a: clamp01(a)
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
const h = num(parts[0], 360);
|
|
248
|
+
const sl = num(parts[1], 1);
|
|
249
|
+
const l = num(parts[2], 1);
|
|
250
|
+
if (h === null || sl === null || l === null) return null;
|
|
251
|
+
|
|
252
|
+
// HSL to HSV, so the picker only ever stores the one model.
|
|
253
|
+
const light = clamp01(l);
|
|
254
|
+
const sat = clamp01(parts[1].endsWith('%') ? sl : sl > 1 ? sl / 100 : sl);
|
|
255
|
+
const v = light + sat * Math.min(light, 1 - light);
|
|
256
|
+
return {
|
|
257
|
+
h: wrapHue(h),
|
|
258
|
+
s: v === 0 ? 0 : 2 * (1 - light / v),
|
|
259
|
+
v,
|
|
260
|
+
a: clamp01(a)
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/** Whether `parseColor` can read this string. */
|
|
265
|
+
export function isValidColor(input) {
|
|
266
|
+
return parseColor(input) !== null;
|
|
267
|
+
}
|
|
268
|
+
//# sourceMappingURL=color.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["clamp01","n","wrapHue","h","hsvToRgb","s","v","hue","sat","val","c","x","Math","abs","m","r","g","b","round","rgbToHsv","rr","gg","bb","max","min","d","hsvToHsl","l","denominator","hsvToCss","a","toHexPair","clamped","toString","hsvToHex","base","formatColor","color","format","alpha","hsl","light","expandShorthand","hex","out","i","length","parseColor","input","value","trim","toLowerCase","startsWith","body","slice","test","parseInt","fn","exec","parts","split","filter","Boolean","num","raw","scale","parseFloat","Number","isNaN","endsWith","undefined","sl","isValidColor"],"sourceRoot":"../../../src","sources":["utils/color.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAYA;;AAGA,SAASA,OAAOA,CAACC,CAAS,EAAE;EAC1B,SAAS;;EACT,OAAOA,CAAC,GAAG,CAAC,GAAG,CAAC,GAAGA,CAAC,GAAG,CAAC,GAAG,CAAC,GAAGA,CAAC;AAClC;;AAEA;AACA,SAASC,OAAOA,CAACC,CAAS,EAAE;EAC1B,SAAS;;EACT,OAAO,CAAEA,CAAC,GAAG,GAAG,GAAI,GAAG,IAAI,GAAG;AAChC;;AAEA;AACA,OAAO,SAASC,QAAQA,CAACD,CAAS,EAAEE,CAAS,EAAEC,CAAS,EAAE;EACxD,SAAS;;EACT,MAAMC,GAAG,GAAGL,OAAO,CAACC,CAAC,CAAC,GAAG,EAAE;EAC3B,MAAMK,GAAG,GAAGR,OAAO,CAACK,CAAC,CAAC;EACtB,MAAMI,GAAG,GAAGT,OAAO,CAACM,CAAC,CAAC;EACtB,MAAMI,CAAC,GAAGD,GAAG,GAAGD,G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B,CAAC,CAAC;EACxB,MAAMnB,GAAG,GAAGR,OAAO,CAAC2D,KAAK,CAAC,CAAC,CAAC,CAAEU,QAAQ,CAAC,GAAG,CAAC,GAAGE,EAAE,GAAGA,EAAE,GAAG,CAAC,GAAGA,EAAE,GAAG,GAAG,GAAGA,EAAE,CAAC;EAC1E,MAAMjE,CAAC,GAAGmC,KAAK,GAAGjC,GAAG,GAAGI,IAAI,CAACY,GAAG,CAACiB,KAAK,EAAE,CAAC,GAAGA,KAAK,CAAC;EAClD,OAAO;IACLtC,CAAC,EAAED,OAAO,CAACC,CAAC,CAAC;IACbE,CAAC,EAAEC,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAGmC,KAAK,GAAGnC,CAAC,CAAC;IACpCA,CAAC;IACDwB,CAAC,EAAE9B,OAAO,CAAC8B,CAAC;EACd,CAAC;AACH;;AAEA;AACA,OAAO,SAAS0C,YAAYA,CAACxB,KAAa,EAAE;EAC1C,OAAOD,UAAU,CAACC,KAAK,CAAC,KAAK,IAAI;AACnC","ignoreList":[]}
|
|
@@ -3,11 +3,31 @@ import { type TextProps } from '../../primitives/text.js';
|
|
|
3
3
|
export interface CardProps extends ViewProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
}
|
|
6
|
+
export interface CardWashProps extends Omit<ViewProps, 'children'> {
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The colour the wash rises in. A theme token name such as
|
|
10
|
+
* `--color-primary`, or any colour string. Defaults to `--color-primary`.
|
|
11
|
+
*/
|
|
12
|
+
tint?: string;
|
|
13
|
+
/**
|
|
14
|
+
* How opaque the wash gets at the bottom edge, 0–1. It is meant to be small:
|
|
15
|
+
* past about 0.25 the card reads as tinted rather than washed, which is a
|
|
16
|
+
* different thing and usually not the one you wanted.
|
|
17
|
+
*/
|
|
18
|
+
intensity?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Multiplier on how slowly the wash breathes. `0` holds it still, which is
|
|
21
|
+
* also what a reduced-motion setting does.
|
|
22
|
+
*/
|
|
23
|
+
speed?: number;
|
|
24
|
+
}
|
|
6
25
|
export declare const Card: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<View>> & {
|
|
7
26
|
Header: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<View>>;
|
|
8
27
|
Title: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<import("react-native").Text>>;
|
|
9
28
|
Description: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<import("react-native").Text>>;
|
|
10
29
|
Content: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<View>>;
|
|
11
30
|
Footer: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<View>>;
|
|
31
|
+
Wash: import("react").ForwardRefExoticComponent<CardWashProps & import("react").RefAttributes<View>>;
|
|
12
32
|
};
|
|
13
33
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/card/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/card/index.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAc,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAahE,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAE7D,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA8GD,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAoHD,eAAO,MAAM,IAAI;;;;;;;CAOf,CAAC"}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ColorPicker — a colour chosen by dragging, not by typing.
|
|
3
|
+
*
|
|
4
|
+
* The controls are the colour model made visible: a square where saturation
|
|
5
|
+
* runs across and brightness runs up, under a hue picked on its own scale.
|
|
6
|
+
* That is why the component stores hue, saturation, value and alpha rather
|
|
7
|
+
* than the string it hands back — a fully black colour is `#000` whatever hue
|
|
8
|
+
* and saturation produced it, so a picker that stored the output would lose
|
|
9
|
+
* the thumb the moment you dragged into a corner and could not put it back.
|
|
10
|
+
*
|
|
11
|
+
* Nothing about a drag crosses to JavaScript. The four channels are shared
|
|
12
|
+
* values; the hue behind the square, both thumb fills and the preview swatch
|
|
13
|
+
* are `backgroundColor`s computed from them on the UI thread, and the
|
|
14
|
+
* translucency ramp on the alpha track is a gradient used as a mask over a
|
|
15
|
+
* solid fill rather than a gradient whose colours have to be re-declared from
|
|
16
|
+
* React on every frame. The picked colour bridges back on change and again on
|
|
17
|
+
* release, the same as any other input here.
|
|
18
|
+
*
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <ColorPicker defaultValue="#22c55e" onValueCommit={setBrand}>
|
|
21
|
+
* <ColorPicker.Area />
|
|
22
|
+
* <ColorPicker.Hue />
|
|
23
|
+
* <ColorPicker.Preview showValue />
|
|
24
|
+
* </ColorPicker>
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* Composition is the API: a picker is whichever of the parts you put in it, so
|
|
28
|
+
* a control with no alpha is one that has no `ColorPicker.Alpha`, not one with
|
|
29
|
+
* a prop turned off.
|
|
30
|
+
*
|
|
31
|
+
* Works controlled (`value` + `onValueChange`) or uncontrolled (`defaultValue`).
|
|
32
|
+
*/
|
|
33
|
+
import { type ReactNode } from 'react';
|
|
34
|
+
import { View } from 'react-native';
|
|
35
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
36
|
+
import { type ColorFormat } from '../../utils/color.js';
|
|
37
|
+
declare const colorPickerVariants: import("tailwind-variants").TVReturnType<{
|
|
38
|
+
size: {
|
|
39
|
+
sm: {};
|
|
40
|
+
md: {};
|
|
41
|
+
lg: {};
|
|
42
|
+
};
|
|
43
|
+
disabled: {
|
|
44
|
+
true: {
|
|
45
|
+
root: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
}, {
|
|
49
|
+
root: string;
|
|
50
|
+
area: string;
|
|
51
|
+
wheel: string;
|
|
52
|
+
thumb: string;
|
|
53
|
+
thumbFill: string;
|
|
54
|
+
track: string;
|
|
55
|
+
swatches: string;
|
|
56
|
+
swatch: string;
|
|
57
|
+
swatchRing: string;
|
|
58
|
+
preview: string;
|
|
59
|
+
previewSwatch: string;
|
|
60
|
+
previewValue: string;
|
|
61
|
+
field: string;
|
|
62
|
+
fieldLabel: string;
|
|
63
|
+
fieldValue: string;
|
|
64
|
+
fieldSwatch: string;
|
|
65
|
+
channel: string;
|
|
66
|
+
channelValue: string;
|
|
67
|
+
channelLabel: string;
|
|
68
|
+
}, undefined, {
|
|
69
|
+
size: {
|
|
70
|
+
sm: {};
|
|
71
|
+
md: {};
|
|
72
|
+
lg: {};
|
|
73
|
+
};
|
|
74
|
+
disabled: {
|
|
75
|
+
true: {
|
|
76
|
+
root: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
}, {
|
|
80
|
+
root: string;
|
|
81
|
+
area: string;
|
|
82
|
+
wheel: string;
|
|
83
|
+
thumb: string;
|
|
84
|
+
thumbFill: string;
|
|
85
|
+
track: string;
|
|
86
|
+
swatches: string;
|
|
87
|
+
swatch: string;
|
|
88
|
+
swatchRing: string;
|
|
89
|
+
preview: string;
|
|
90
|
+
previewSwatch: string;
|
|
91
|
+
previewValue: string;
|
|
92
|
+
field: string;
|
|
93
|
+
fieldLabel: string;
|
|
94
|
+
fieldValue: string;
|
|
95
|
+
fieldSwatch: string;
|
|
96
|
+
channel: string;
|
|
97
|
+
channelValue: string;
|
|
98
|
+
channelLabel: string;
|
|
99
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
100
|
+
size: {
|
|
101
|
+
sm: {};
|
|
102
|
+
md: {};
|
|
103
|
+
lg: {};
|
|
104
|
+
};
|
|
105
|
+
disabled: {
|
|
106
|
+
true: {
|
|
107
|
+
root: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
}, {
|
|
111
|
+
root: string;
|
|
112
|
+
area: string;
|
|
113
|
+
wheel: string;
|
|
114
|
+
thumb: string;
|
|
115
|
+
thumbFill: string;
|
|
116
|
+
track: string;
|
|
117
|
+
swatches: string;
|
|
118
|
+
swatch: string;
|
|
119
|
+
swatchRing: string;
|
|
120
|
+
preview: string;
|
|
121
|
+
previewSwatch: string;
|
|
122
|
+
previewValue: string;
|
|
123
|
+
field: string;
|
|
124
|
+
fieldLabel: string;
|
|
125
|
+
fieldValue: string;
|
|
126
|
+
fieldSwatch: string;
|
|
127
|
+
channel: string;
|
|
128
|
+
channelValue: string;
|
|
129
|
+
channelLabel: string;
|
|
130
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
131
|
+
type ColorPickerVariantProps = VariantProps<typeof colorPickerVariants>;
|
|
132
|
+
export type ColorPickerSize = NonNullable<ColorPickerVariantProps['size']>;
|
|
133
|
+
export interface ColorPickerProps extends Omit<ColorPickerVariantProps, 'disabled'> {
|
|
134
|
+
className?: string;
|
|
135
|
+
/** Controlled colour. Leave unset and pass `defaultValue` to run uncontrolled. */
|
|
136
|
+
value?: string;
|
|
137
|
+
/** Starting colour when uncontrolled. */
|
|
138
|
+
defaultValue?: string;
|
|
139
|
+
/**
|
|
140
|
+
* Fires on every frame of a drag — cheap updates only. The string is written
|
|
141
|
+
* in `format`.
|
|
142
|
+
*/
|
|
143
|
+
onValueChange?: (color: string) => void;
|
|
144
|
+
/** Fires once when a drag ends. The place for expensive side effects. */
|
|
145
|
+
onValueCommit?: (color: string) => void;
|
|
146
|
+
/**
|
|
147
|
+
* How the colour is written on the way out. `hex` gains an `#rrggbbaa` alpha
|
|
148
|
+
* pair, and the other two switch to their `a` forms, only when the colour is
|
|
149
|
+
* actually translucent.
|
|
150
|
+
*/
|
|
151
|
+
format?: ColorFormat;
|
|
152
|
+
disabled?: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* A tick when a drag ends and when a preset is picked. Off by default — needs
|
|
155
|
+
* the optional `expo-haptics`, and is silent without it. There is no tick
|
|
156
|
+
* during a drag: a colour has no steps to cross, so a tick could only be a
|
|
157
|
+
* buzz proportional to speed.
|
|
158
|
+
*/
|
|
159
|
+
haptics?: boolean;
|
|
160
|
+
/** The parts, in the order they should stack. */
|
|
161
|
+
children: ReactNode;
|
|
162
|
+
}
|
|
163
|
+
export interface ColorPickerAreaProps {
|
|
164
|
+
className?: string;
|
|
165
|
+
/** Height of the square in points. Defaults to the picker's size. */
|
|
166
|
+
height?: number;
|
|
167
|
+
/** Extra classes for the draggable thumb. */
|
|
168
|
+
thumbClassName?: string;
|
|
169
|
+
}
|
|
170
|
+
export interface ColorPickerHueProps {
|
|
171
|
+
className?: string;
|
|
172
|
+
/** Extra classes for the draggable thumb. */
|
|
173
|
+
thumbClassName?: string;
|
|
174
|
+
}
|
|
175
|
+
export interface ColorPickerAlphaProps {
|
|
176
|
+
className?: string;
|
|
177
|
+
/** Extra classes for the draggable thumb. */
|
|
178
|
+
thumbClassName?: string;
|
|
179
|
+
}
|
|
180
|
+
export interface ColorPickerPreviewProps {
|
|
181
|
+
className?: string;
|
|
182
|
+
/**
|
|
183
|
+
* Print the colour beside the swatch, in the picker's `format`. The string
|
|
184
|
+
* is built on the UI thread and only crosses to JavaScript when it differs
|
|
185
|
+
* from the last one, so a drag that is not changing the rounded value costs
|
|
186
|
+
* nothing.
|
|
187
|
+
*/
|
|
188
|
+
showValue?: boolean;
|
|
189
|
+
/** Extra classes for the swatch. */
|
|
190
|
+
swatchClassName?: string;
|
|
191
|
+
/** Extra classes for the printed value. */
|
|
192
|
+
valueClassName?: string;
|
|
193
|
+
/** Anything to put after the value — a copy button, a label. */
|
|
194
|
+
children?: ReactNode;
|
|
195
|
+
}
|
|
196
|
+
export interface ColorPickerSwatchesProps {
|
|
197
|
+
className?: string;
|
|
198
|
+
/** The presets, in any format `ColorPicker` can read. */
|
|
199
|
+
colors: string[];
|
|
200
|
+
/** Diameter of one swatch in points. Defaults to the picker's size. */
|
|
201
|
+
swatchSize?: number;
|
|
202
|
+
/** Extra classes for one swatch. */
|
|
203
|
+
swatchClassName?: string;
|
|
204
|
+
}
|
|
205
|
+
export interface ColorPickerFieldProps {
|
|
206
|
+
className?: string;
|
|
207
|
+
/** What the colour is for — "Accent", "Background", a layer name. */
|
|
208
|
+
label?: string;
|
|
209
|
+
/**
|
|
210
|
+
* Print the current colour beside the swatch, in the picker's `format`.
|
|
211
|
+
* On by default: the strip exists to say what the colour *is*, and a swatch
|
|
212
|
+
* alone cannot be read out, copied down or typed into a design tool.
|
|
213
|
+
*/
|
|
214
|
+
showValue?: boolean;
|
|
215
|
+
/** Extra classes for the swatch. */
|
|
216
|
+
swatchClassName?: string;
|
|
217
|
+
/** Anything to put after the swatch — a copy button, a reset. */
|
|
218
|
+
children?: ReactNode;
|
|
219
|
+
}
|
|
220
|
+
/** Which channel a readout is reading. */
|
|
221
|
+
export type ColorPickerChannel = 'hue' | 'saturation' | 'brightness' | 'alpha';
|
|
222
|
+
export interface ColorPickerChannelProps {
|
|
223
|
+
className?: string;
|
|
224
|
+
/** Which channel to read. */
|
|
225
|
+
channel: ColorPickerChannel;
|
|
226
|
+
/** Overrides the channel's own name. */
|
|
227
|
+
label?: string;
|
|
228
|
+
/**
|
|
229
|
+
* Writes the number yourself. Receives degrees for `hue` and a percentage
|
|
230
|
+
* for the other three, both already rounded.
|
|
231
|
+
*/
|
|
232
|
+
format?: (value: number) => string;
|
|
233
|
+
}
|
|
234
|
+
export interface ColorPickerBrightnessProps {
|
|
235
|
+
className?: string;
|
|
236
|
+
/** Extra classes for the draggable thumb. */
|
|
237
|
+
thumbClassName?: string;
|
|
238
|
+
}
|
|
239
|
+
export interface ColorPickerWheelProps {
|
|
240
|
+
className?: string;
|
|
241
|
+
/** Diameter in points. Defaults to the picker's size. */
|
|
242
|
+
size?: number;
|
|
243
|
+
/** Extra classes for the draggable thumb. */
|
|
244
|
+
thumbClassName?: string;
|
|
245
|
+
}
|
|
246
|
+
export declare const ColorPicker: import("react").ForwardRefExoticComponent<ColorPickerProps & import("react").RefAttributes<View>> & {
|
|
247
|
+
Field: import("react").ForwardRefExoticComponent<ColorPickerFieldProps & import("react").RefAttributes<View>>;
|
|
248
|
+
Area: import("react").ForwardRefExoticComponent<ColorPickerAreaProps & import("react").RefAttributes<View>>;
|
|
249
|
+
Wheel: import("react").ForwardRefExoticComponent<ColorPickerWheelProps & import("react").RefAttributes<View>>;
|
|
250
|
+
Channel: import("react").ForwardRefExoticComponent<ColorPickerChannelProps & import("react").RefAttributes<View>>;
|
|
251
|
+
Hue: import("react").ForwardRefExoticComponent<ColorPickerHueProps & import("react").RefAttributes<View>>;
|
|
252
|
+
Brightness: import("react").ForwardRefExoticComponent<ColorPickerBrightnessProps & import("react").RefAttributes<View>>;
|
|
253
|
+
Alpha: import("react").ForwardRefExoticComponent<ColorPickerAlphaProps & import("react").RefAttributes<View>>;
|
|
254
|
+
Preview: import("react").ForwardRefExoticComponent<ColorPickerPreviewProps & import("react").RefAttributes<View>>;
|
|
255
|
+
Swatches: import("react").ForwardRefExoticComponent<ColorPickerSwatchesProps & import("react").RefAttributes<View>>;
|
|
256
|
+
};
|
|
257
|
+
export {};
|
|
258
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/color-picker/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAUL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC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,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACpC;AA0DD,MAAM,WAAW,0BAA0B;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AA4JD,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAoLD,eAAO,MAAM,WAAW;;;;;;;;;;CAUtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/combobox/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,EAYL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAOL,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/combobox/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,EAYL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAOL,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AA4EtB,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAExD,+CAA+C;AAC/C,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEjD,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AASD,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAA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A2B,EAC3B,cAA4B,EAC5B,SAAiB,EACjB,WAAmB,EACnB,YAAY,EACZ,YAAsB,EACtB,MAAU,EACV,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,aAAa,CAAC,IAAI,CAAC,+BAwjBrB;AAKD,eAAO,MAAM,QAAQ;;;CAGnB,CAAC"}
|
|
@@ -48,6 +48,7 @@ import { type ReactElement, type ReactNode } from 'react';
|
|
|
48
48
|
import { type ScrollViewProps, type ViewProps } from 'react-native';
|
|
49
49
|
export type DrawerSide = 'start' | 'end' | 'top' | 'bottom';
|
|
50
50
|
export type DrawerSize = 'sm' | 'md' | 'lg' | 'full';
|
|
51
|
+
export type DrawerCloseSide = 'start' | 'end';
|
|
51
52
|
export interface DrawerProps {
|
|
52
53
|
children: ReactNode;
|
|
53
54
|
/** Open state, when you want to own it. Pair with `onOpenChange`. */
|
|
@@ -100,6 +101,17 @@ export interface DrawerContentProps extends ViewProps {
|
|
|
100
101
|
swipeToDismiss?: boolean;
|
|
101
102
|
/** Show a close button in the drawer's inner top corner. Default true. */
|
|
102
103
|
showClose?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Which top corner the close button takes. Logical, like `side`: `end` is the
|
|
106
|
+
* corner text runs toward, so it is the right one in a left-to-right app and
|
|
107
|
+
* the left one in a right-to-left one.
|
|
108
|
+
*
|
|
109
|
+
* Defaults to the corner *away* from the docked edge, so an `end` drawer's
|
|
110
|
+
* button does not sit against the screen edge the panel came out of. Set it
|
|
111
|
+
* when the drawer reads better with the button on the outer corner instead —
|
|
112
|
+
* a panel people close by reaching for the same corner every time.
|
|
113
|
+
*/
|
|
114
|
+
closeSide?: DrawerCloseSide;
|
|
103
115
|
/**
|
|
104
116
|
* Frost the screen behind the drawer instead of dimming it. Needs the
|
|
105
117
|
* optional `expo-blur`; without it this dims, rather than failing.
|
|
@@ -107,7 +119,7 @@ export interface DrawerContentProps extends ViewProps {
|
|
|
107
119
|
blur?: boolean;
|
|
108
120
|
children?: ReactNode;
|
|
109
121
|
}
|
|
110
|
-
declare function DrawerContent({ className, side, size, dismissible, swipeToDismiss, showClose, blur, children, ...props }: DrawerContentProps): import("react").JSX.Element | null;
|
|
122
|
+
declare function DrawerContent({ className, side, size, dismissible, swipeToDismiss, showClose, closeSide, blur, children, ...props }: DrawerContentProps): import("react").JSX.Element | null;
|
|
111
123
|
export interface DrawerHeaderProps extends ViewProps {
|
|
112
124
|
className?: string;
|
|
113
125
|
/** Heading for the drawer. Strings are wrapped; anything else is drawn as given. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/drawer/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,OAAO,EASL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAsCtB,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,CAAC;AAC5D,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/drawer/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,OAAO,EASL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAsCtB,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,CAAC;AAC5D,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI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