@oxy.so/bloom 23.8.0 → 23.8.1
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/android/src/main/java/so/oxy/bloom/AvatarLoops.kt +293 -0
- package/android/src/main/java/so/oxy/bloom/AvatarSurface.kt +351 -0
- package/android/src/main/java/so/oxy/bloom/BloomPackage.kt +1 -1
- package/docs/agent-avatar.mdx +77 -1
- package/docs/no-nativewind.mdx +3 -1
- package/docs/task-catalog.json +1 -1
- package/docs/task-catalog.mdx +1 -1
- package/docs/theme.mdx +21 -0
- package/lib/commonjs/agent-avatar/VectorCharacterAvatar.js +267 -111
- package/lib/commonjs/agent-avatar/VectorCharacterAvatar.js.map +1 -1
- package/lib/commonjs/agent-avatar/VectorNativeSurface.js +75 -0
- package/lib/commonjs/agent-avatar/VectorNativeSurface.js.map +1 -0
- package/lib/commonjs/agent-avatar/vector-loop.js +161 -0
- package/lib/commonjs/agent-avatar/vector-loop.js.map +1 -0
- package/lib/commonjs/agent-avatar/vector-visibility.js +4 -1
- package/lib/commonjs/agent-avatar/vector-visibility.js.map +1 -1
- package/lib/commonjs/blur/BlurIsland.js +112 -118
- package/lib/commonjs/blur/BlurIsland.js.map +1 -1
- package/lib/commonjs/button/Button.js +12 -22
- package/lib/commonjs/button/Button.js.map +1 -1
- package/lib/commonjs/button/GroupBase.js +35 -50
- package/lib/commonjs/button/GroupBase.js.map +1 -1
- package/lib/commonjs/floating/lens/lens-frame.js +286 -0
- package/lib/commonjs/floating/lens/lens-frame.js.map +1 -0
- package/lib/commonjs/floating/lens/lens-material.js +1 -1
- package/lib/commonjs/page-header/PageHeader.js +24 -15
- package/lib/commonjs/page-header/PageHeader.js.map +1 -1
- package/lib/commonjs/panel-routing/expo-router/StackScene.js +1 -0
- package/lib/commonjs/panel-routing/expo-router/StackScene.js.map +1 -1
- package/lib/commonjs/surface/Surface.js +64 -193
- package/lib/commonjs/surface/Surface.js.map +1 -1
- package/lib/commonjs/tab-bar/TabBarBase.js +18 -15
- package/lib/commonjs/tab-bar/TabBarBase.js.map +1 -1
- package/lib/module/agent-avatar/VectorCharacterAvatar.js +268 -112
- package/lib/module/agent-avatar/VectorCharacterAvatar.js.map +1 -1
- package/lib/module/agent-avatar/VectorNativeSurface.js +66 -0
- package/lib/module/agent-avatar/VectorNativeSurface.js.map +1 -0
- package/lib/module/agent-avatar/vector-loop.js +150 -0
- package/lib/module/agent-avatar/vector-loop.js.map +1 -0
- package/lib/module/agent-avatar/vector-visibility.js +3 -1
- package/lib/module/agent-avatar/vector-visibility.js.map +1 -1
- package/lib/module/blur/BlurIsland.js +112 -116
- package/lib/module/blur/BlurIsland.js.map +1 -1
- package/lib/module/button/Button.js +13 -23
- package/lib/module/button/Button.js.map +1 -1
- package/lib/module/button/GroupBase.js +37 -52
- package/lib/module/button/GroupBase.js.map +1 -1
- package/lib/module/floating/lens/lens-frame.js +282 -0
- package/lib/module/floating/lens/lens-frame.js.map +1 -0
- package/lib/module/floating/lens/lens-material.js +1 -1
- package/lib/module/page-header/PageHeader.js +24 -15
- package/lib/module/page-header/PageHeader.js.map +1 -1
- package/lib/module/panel-routing/expo-router/StackScene.js +1 -0
- package/lib/module/panel-routing/expo-router/StackScene.js.map +1 -1
- package/lib/module/surface/Surface.js +65 -194
- package/lib/module/surface/Surface.js.map +1 -1
- package/lib/module/tab-bar/TabBarBase.js +18 -15
- package/lib/module/tab-bar/TabBarBase.js.map +1 -1
- package/lib/typescript/commonjs/agent-avatar/VectorCharacterAvatar.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-avatar/VectorNativeSurface.d.ts +75 -0
- package/lib/typescript/commonjs/agent-avatar/VectorNativeSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/agent-avatar/vector-loop.d.ts +93 -0
- package/lib/typescript/commonjs/agent-avatar/vector-loop.d.ts.map +1 -0
- package/lib/typescript/commonjs/agent-avatar/vector-visibility.d.ts +2 -0
- package/lib/typescript/commonjs/agent-avatar/vector-visibility.d.ts.map +1 -1
- package/lib/typescript/commonjs/blur/BlurIsland.d.ts +1 -1
- package/lib/typescript/commonjs/blur/BlurIsland.d.ts.map +1 -1
- package/lib/typescript/commonjs/button/Button.d.ts.map +1 -1
- package/lib/typescript/commonjs/button/GroupBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/floating/lens/lens-frame.d.ts +52 -0
- package/lib/typescript/commonjs/floating/lens/lens-frame.d.ts.map +1 -0
- package/lib/typescript/commonjs/floating/lens/lens-material.d.ts +1 -1
- package/lib/typescript/commonjs/page-header/PageHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/panel-routing/expo-router/StackScene.d.ts.map +1 -1
- package/lib/typescript/commonjs/surface/Surface.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-bar/TabBarBase.d.ts.map +1 -1
- package/lib/typescript/module/agent-avatar/VectorCharacterAvatar.d.ts.map +1 -1
- package/lib/typescript/module/agent-avatar/VectorNativeSurface.d.ts +75 -0
- package/lib/typescript/module/agent-avatar/VectorNativeSurface.d.ts.map +1 -0
- package/lib/typescript/module/agent-avatar/vector-loop.d.ts +93 -0
- package/lib/typescript/module/agent-avatar/vector-loop.d.ts.map +1 -0
- package/lib/typescript/module/agent-avatar/vector-visibility.d.ts +2 -0
- package/lib/typescript/module/agent-avatar/vector-visibility.d.ts.map +1 -1
- package/lib/typescript/module/blur/BlurIsland.d.ts +1 -1
- package/lib/typescript/module/blur/BlurIsland.d.ts.map +1 -1
- package/lib/typescript/module/button/Button.d.ts.map +1 -1
- package/lib/typescript/module/button/GroupBase.d.ts.map +1 -1
- package/lib/typescript/module/floating/lens/lens-frame.d.ts +52 -0
- package/lib/typescript/module/floating/lens/lens-frame.d.ts.map +1 -0
- package/lib/typescript/module/floating/lens/lens-material.d.ts +1 -1
- package/lib/typescript/module/page-header/PageHeader.d.ts.map +1 -1
- package/lib/typescript/module/panel-routing/expo-router/StackScene.d.ts.map +1 -1
- package/lib/typescript/module/surface/Surface.d.ts.map +1 -1
- package/lib/typescript/module/tab-bar/TabBarBase.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/agent-avatar/VectorCharacterAvatar.tsx +327 -120
- package/src/agent-avatar/VectorNativeSurface.tsx +117 -0
- package/src/agent-avatar/vector-loop.ts +213 -0
- package/src/agent-avatar/vector-visibility.ts +3 -1
- package/src/blur/BlurIsland.tsx +16 -14
- package/src/button/Button.tsx +19 -36
- package/src/button/GroupBase.tsx +42 -56
- package/src/floating/lens/lens-frame.tsx +195 -0
- package/src/floating/lens/lens-material.ts +1 -1
- package/src/page-header/PageHeader.tsx +26 -13
- package/src/panel-routing/expo-router/StackScene.tsx +9 -0
- package/src/surface/Surface.tsx +13 -28
- package/src/tab-bar/TabBarBase.tsx +13 -8
- package/lib/commonjs/floating/lens/lens-button-host.js +0 -218
- package/lib/commonjs/floating/lens/lens-button-host.js.map +0 -1
- package/lib/module/floating/lens/lens-button-host.js +0 -214
- package/lib/module/floating/lens/lens-button-host.js.map +0 -1
- package/lib/typescript/commonjs/floating/lens/lens-button-host.d.ts +0 -34
- package/lib/typescript/commonjs/floating/lens/lens-button-host.d.ts.map +0 -1
- package/lib/typescript/module/floating/lens/lens-button-host.d.ts +0 -34
- package/lib/typescript/module/floating/lens/lens-button-host.d.ts.map +0 -1
- package/src/floating/lens/lens-button-host.tsx +0 -148
|
@@ -4,7 +4,7 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
4
4
|
import { resolveSurfaceGeometry } from "../surface/resolve-surface-geometry.js";
|
|
5
5
|
import { surfaceStyle } from "../shapes/surface-style.js";
|
|
6
6
|
import { SURFACE_SHAPES } from "../design-tokens/shapes.js";
|
|
7
|
-
import
|
|
7
|
+
import { memo } from 'react';
|
|
8
8
|
import { StyleSheet, View } from 'react-native';
|
|
9
9
|
import { useDirectionProps, useIsRtl } from "../hooks/use-is-rtl.js";
|
|
10
10
|
import { BloomScope } from "../appearance/index.js";
|
|
@@ -14,14 +14,13 @@ import { useSurfaceLayer } from "../surface/use-surface-layer.js";
|
|
|
14
14
|
import { resolveSurfaceMaterial } from "../surface/resolve-surface-material.js";
|
|
15
15
|
import { borderRadius } from "../styles/tokens.js";
|
|
16
16
|
import { SurfacePaint } from "../surface/SurfacePaint.js";
|
|
17
|
-
import {
|
|
18
|
-
import { useLensAvailable } from "../floating/lens/lens-material.js";
|
|
17
|
+
import { useLensFrame, withLens } from "../floating/lens/lens-frame.js";
|
|
19
18
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
19
|
/** Floating control container using the shared surface material.
|
|
21
20
|
* Paint clips itself so the host can preserve its external shadow.
|
|
22
21
|
*/
|
|
23
22
|
const BlurIslandComponent = t0 => {
|
|
24
|
-
const $ = _c(
|
|
23
|
+
const $ = _c(77);
|
|
25
24
|
const {
|
|
26
25
|
children,
|
|
27
26
|
radius,
|
|
@@ -36,7 +35,7 @@ const BlurIslandComponent = t0 => {
|
|
|
36
35
|
const cornerCurve = t1 === undefined ? SURFACE_SHAPES.island.curve : t1;
|
|
37
36
|
const sheen = t2 === undefined ? true : t2;
|
|
38
37
|
const variant = t3 === undefined ? "lens" : t3;
|
|
39
|
-
const
|
|
38
|
+
const frame = useLensFrame(variant === "lens", style);
|
|
40
39
|
const directionProps = useDirectionProps();
|
|
41
40
|
const direction = useIsRtl() ? "rtl" : "ltr";
|
|
42
41
|
const layer = useSurfaceLayer();
|
|
@@ -87,43 +86,41 @@ const BlurIslandComponent = t0 => {
|
|
|
87
86
|
let t7;
|
|
88
87
|
let t8;
|
|
89
88
|
let t9;
|
|
90
|
-
if ($[6] !== accessibilityLabel || $[7] !== children || $[8] !== cornerCurve || $[9] !== direction || $[10] !== directionProps || $[11] !==
|
|
89
|
+
if ($[6] !== accessibilityLabel || $[7] !== children || $[8] !== cornerCurve || $[9] !== direction || $[10] !== directionProps || $[11] !== frame || $[12] !== material.level || $[13] !== material.vars || $[14] !== publishedFill || $[15] !== radius || $[16] !== role || $[17] !== style || $[18] !== testID) {
|
|
91
90
|
t20 = Symbol.for("react.early_return_sentinel");
|
|
92
91
|
bb0: {
|
|
93
92
|
geometry = resolveSurfaceGeometry(radius, style, borderRadius.full, cornerCurve);
|
|
94
93
|
shape = geometry.shape;
|
|
95
|
-
if (
|
|
96
|
-
const split = splitLensStyle(style);
|
|
94
|
+
if (frame.lens) {
|
|
97
95
|
let t21;
|
|
98
|
-
if ($[
|
|
96
|
+
if ($[37] !== children || $[38] !== material.level || $[39] !== publishedFill) {
|
|
99
97
|
t21 = /*#__PURE__*/_jsx(SurfaceLevelProvider, {
|
|
100
98
|
level: material.level,
|
|
101
99
|
fill: publishedFill,
|
|
102
100
|
children: children
|
|
103
101
|
});
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
106
|
-
$[
|
|
107
|
-
$[
|
|
102
|
+
$[37] = children;
|
|
103
|
+
$[38] = material.level;
|
|
104
|
+
$[39] = publishedFill;
|
|
105
|
+
$[40] = t21;
|
|
108
106
|
} else {
|
|
109
|
-
t21 = $[
|
|
107
|
+
t21 = $[40];
|
|
110
108
|
}
|
|
111
109
|
t20 = /*#__PURE__*/_jsx(BloomScope, {
|
|
112
|
-
children: /*#__PURE__*/_jsx(
|
|
110
|
+
children: withLens(frame, /*#__PURE__*/_jsx(View, {
|
|
111
|
+
collapsable: false,
|
|
112
|
+
...directionProps,
|
|
113
|
+
role: role,
|
|
114
|
+
accessibilityLabel: accessibilityLabel,
|
|
115
|
+
testID: testID,
|
|
116
|
+
style: [styles.island, {
|
|
117
|
+
borderRadius: geometry.radius,
|
|
118
|
+
overflow: "hidden"
|
|
119
|
+
}, frame.style],
|
|
120
|
+
children: t21
|
|
121
|
+
}), {
|
|
113
122
|
radius: typeof geometry.radius === "number" ? geometry.radius : undefined,
|
|
114
|
-
|
|
115
|
-
children: /*#__PURE__*/_jsx(View, {
|
|
116
|
-
collapsable: false,
|
|
117
|
-
...directionProps,
|
|
118
|
-
role: role,
|
|
119
|
-
accessibilityLabel: accessibilityLabel,
|
|
120
|
-
testID: testID,
|
|
121
|
-
style: [styles.island, {
|
|
122
|
-
borderRadius: geometry.radius,
|
|
123
|
-
overflow: "hidden"
|
|
124
|
-
}, split.control],
|
|
125
|
-
children: t21
|
|
126
|
-
})
|
|
123
|
+
floating: true
|
|
127
124
|
})
|
|
128
125
|
});
|
|
129
126
|
break bb0;
|
|
@@ -140,11 +137,11 @@ const BlurIslandComponent = t0 => {
|
|
|
140
137
|
...geometry.style,
|
|
141
138
|
...surfaceStyle(shape, direction)
|
|
142
139
|
};
|
|
143
|
-
if ($[
|
|
140
|
+
if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
|
|
144
141
|
t13 = bloomShadowStyle("floating");
|
|
145
|
-
$[
|
|
142
|
+
$[41] = t13;
|
|
146
143
|
} else {
|
|
147
|
-
t13 = $[
|
|
144
|
+
t13 = $[41];
|
|
148
145
|
}
|
|
149
146
|
t14 = style;
|
|
150
147
|
t7 = "transparent";
|
|
@@ -157,7 +154,7 @@ const BlurIslandComponent = t0 => {
|
|
|
157
154
|
$[8] = cornerCurve;
|
|
158
155
|
$[9] = direction;
|
|
159
156
|
$[10] = directionProps;
|
|
160
|
-
$[11] =
|
|
157
|
+
$[11] = frame;
|
|
161
158
|
$[12] = material.level;
|
|
162
159
|
$[13] = material.vars;
|
|
163
160
|
$[14] = publishedFill;
|
|
@@ -165,79 +162,78 @@ const BlurIslandComponent = t0 => {
|
|
|
165
162
|
$[16] = role;
|
|
166
163
|
$[17] = style;
|
|
167
164
|
$[18] = testID;
|
|
168
|
-
$[19] =
|
|
169
|
-
$[20] =
|
|
170
|
-
$[21] =
|
|
171
|
-
$[22] =
|
|
172
|
-
$[23] =
|
|
173
|
-
$[24] =
|
|
174
|
-
$[25] =
|
|
175
|
-
$[26] =
|
|
176
|
-
$[27] =
|
|
177
|
-
$[28] =
|
|
178
|
-
$[29] =
|
|
179
|
-
$[30] =
|
|
180
|
-
$[31] =
|
|
181
|
-
$[32] =
|
|
182
|
-
$[33] =
|
|
183
|
-
$[34] =
|
|
184
|
-
$[35] =
|
|
185
|
-
$[36] =
|
|
186
|
-
$[37] = t9;
|
|
165
|
+
$[19] = T0;
|
|
166
|
+
$[20] = T1;
|
|
167
|
+
$[21] = geometry;
|
|
168
|
+
$[22] = shape;
|
|
169
|
+
$[23] = t10;
|
|
170
|
+
$[24] = t11;
|
|
171
|
+
$[25] = t12;
|
|
172
|
+
$[26] = t13;
|
|
173
|
+
$[27] = t14;
|
|
174
|
+
$[28] = t15;
|
|
175
|
+
$[29] = t16;
|
|
176
|
+
$[30] = t17;
|
|
177
|
+
$[31] = t18;
|
|
178
|
+
$[32] = t19;
|
|
179
|
+
$[33] = t20;
|
|
180
|
+
$[34] = t7;
|
|
181
|
+
$[35] = t8;
|
|
182
|
+
$[36] = t9;
|
|
187
183
|
} else {
|
|
188
|
-
T0 = $[
|
|
189
|
-
T1 = $[
|
|
190
|
-
geometry = $[
|
|
191
|
-
shape = $[
|
|
192
|
-
t10 = $[
|
|
193
|
-
t11 = $[
|
|
194
|
-
t12 = $[
|
|
195
|
-
t13 = $[
|
|
196
|
-
t14 = $[
|
|
197
|
-
t15 = $[
|
|
198
|
-
t16 = $[
|
|
199
|
-
t17 = $[
|
|
200
|
-
t18 = $[
|
|
201
|
-
t19 = $[
|
|
202
|
-
t20 = $[
|
|
203
|
-
t7 = $[
|
|
204
|
-
t8 = $[
|
|
205
|
-
t9 = $[
|
|
184
|
+
T0 = $[19];
|
|
185
|
+
T1 = $[20];
|
|
186
|
+
geometry = $[21];
|
|
187
|
+
shape = $[22];
|
|
188
|
+
t10 = $[23];
|
|
189
|
+
t11 = $[24];
|
|
190
|
+
t12 = $[25];
|
|
191
|
+
t13 = $[26];
|
|
192
|
+
t14 = $[27];
|
|
193
|
+
t15 = $[28];
|
|
194
|
+
t16 = $[29];
|
|
195
|
+
t17 = $[30];
|
|
196
|
+
t18 = $[31];
|
|
197
|
+
t19 = $[32];
|
|
198
|
+
t20 = $[33];
|
|
199
|
+
t7 = $[34];
|
|
200
|
+
t8 = $[35];
|
|
201
|
+
t9 = $[36];
|
|
206
202
|
}
|
|
207
203
|
if (t20 !== Symbol.for("react.early_return_sentinel")) {
|
|
208
204
|
return t20;
|
|
209
205
|
}
|
|
210
206
|
let t21;
|
|
211
|
-
if ($[
|
|
207
|
+
if ($[42] !== t10 || $[43] !== t7 || $[44] !== t8 || $[45] !== t9) {
|
|
212
208
|
t21 = {
|
|
213
209
|
backgroundColor: t7,
|
|
214
210
|
...t8,
|
|
215
211
|
...t9,
|
|
216
212
|
...t10
|
|
217
213
|
};
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
222
|
-
$[
|
|
214
|
+
$[42] = t10;
|
|
215
|
+
$[43] = t7;
|
|
216
|
+
$[44] = t8;
|
|
217
|
+
$[45] = t9;
|
|
218
|
+
$[46] = t21;
|
|
223
219
|
} else {
|
|
224
|
-
t21 = $[
|
|
220
|
+
t21 = $[46];
|
|
225
221
|
}
|
|
226
222
|
let t22;
|
|
227
|
-
if ($[
|
|
223
|
+
if ($[47] !== t11 || $[48] !== t12 || $[49] !== t13 || $[50] !== t14 || $[51] !== t21) {
|
|
228
224
|
t22 = [t11, t12, t13, t14, t21];
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
225
|
+
$[47] = t11;
|
|
226
|
+
$[48] = t12;
|
|
227
|
+
$[49] = t13;
|
|
228
|
+
$[50] = t14;
|
|
229
|
+
$[51] = t21;
|
|
230
|
+
$[52] = t22;
|
|
235
231
|
} else {
|
|
236
|
-
t22 = $[
|
|
232
|
+
t22 = $[52];
|
|
237
233
|
}
|
|
238
234
|
const t23 = testID ? `${testID}-material` : undefined;
|
|
239
235
|
let t24;
|
|
240
|
-
if ($[
|
|
236
|
+
if ($[53] !== direction || $[54] !== fill || $[55] !== geometry.radius || $[56] !== shape || $[57] !== sheen || $[58] !== t23) {
|
|
241
237
|
t24 = /*#__PURE__*/_jsx(SurfacePaint, {
|
|
242
238
|
floating: true,
|
|
243
239
|
fill: fill,
|
|
@@ -247,32 +243,32 @@ const BlurIslandComponent = t0 => {
|
|
|
247
243
|
sheen: sheen,
|
|
248
244
|
testID: t23
|
|
249
245
|
});
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
$[
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
246
|
+
$[53] = direction;
|
|
247
|
+
$[54] = fill;
|
|
248
|
+
$[55] = geometry.radius;
|
|
249
|
+
$[56] = shape;
|
|
250
|
+
$[57] = sheen;
|
|
251
|
+
$[58] = t23;
|
|
252
|
+
$[59] = t24;
|
|
257
253
|
} else {
|
|
258
|
-
t24 = $[
|
|
254
|
+
t24 = $[59];
|
|
259
255
|
}
|
|
260
256
|
let t25;
|
|
261
|
-
if ($[
|
|
257
|
+
if ($[60] !== children || $[61] !== material.level || $[62] !== publishedFill) {
|
|
262
258
|
t25 = /*#__PURE__*/_jsx(SurfaceLevelProvider, {
|
|
263
259
|
level: material.level,
|
|
264
260
|
fill: publishedFill,
|
|
265
261
|
children: children
|
|
266
262
|
});
|
|
267
|
-
$[
|
|
268
|
-
$[
|
|
269
|
-
$[
|
|
270
|
-
$[
|
|
263
|
+
$[60] = children;
|
|
264
|
+
$[61] = material.level;
|
|
265
|
+
$[62] = publishedFill;
|
|
266
|
+
$[63] = t25;
|
|
271
267
|
} else {
|
|
272
|
-
t25 = $[
|
|
268
|
+
t25 = $[63];
|
|
273
269
|
}
|
|
274
270
|
let t26;
|
|
275
|
-
if ($[
|
|
271
|
+
if ($[64] !== T0 || $[65] !== t15 || $[66] !== t16 || $[67] !== t17 || $[68] !== t18 || $[69] !== t19 || $[70] !== t22 || $[71] !== t24 || $[72] !== t25) {
|
|
276
272
|
t26 = /*#__PURE__*/_jsxs(T0, {
|
|
277
273
|
collapsable: t15,
|
|
278
274
|
...t16,
|
|
@@ -282,29 +278,29 @@ const BlurIslandComponent = t0 => {
|
|
|
282
278
|
style: t22,
|
|
283
279
|
children: [t24, t25]
|
|
284
280
|
});
|
|
285
|
-
$[
|
|
286
|
-
$[
|
|
287
|
-
$[
|
|
288
|
-
$[
|
|
289
|
-
$[
|
|
290
|
-
$[
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
281
|
+
$[64] = T0;
|
|
282
|
+
$[65] = t15;
|
|
283
|
+
$[66] = t16;
|
|
284
|
+
$[67] = t17;
|
|
285
|
+
$[68] = t18;
|
|
286
|
+
$[69] = t19;
|
|
287
|
+
$[70] = t22;
|
|
288
|
+
$[71] = t24;
|
|
289
|
+
$[72] = t25;
|
|
290
|
+
$[73] = t26;
|
|
295
291
|
} else {
|
|
296
|
-
t26 = $[
|
|
292
|
+
t26 = $[73];
|
|
297
293
|
}
|
|
298
294
|
let t27;
|
|
299
|
-
if ($[
|
|
295
|
+
if ($[74] !== T1 || $[75] !== t26) {
|
|
300
296
|
t27 = /*#__PURE__*/_jsx(T1, {
|
|
301
297
|
children: t26
|
|
302
298
|
});
|
|
303
|
-
$[
|
|
304
|
-
$[
|
|
305
|
-
$[
|
|
299
|
+
$[74] = T1;
|
|
300
|
+
$[75] = t26;
|
|
301
|
+
$[76] = t27;
|
|
306
302
|
} else {
|
|
307
|
-
t27 = $[
|
|
303
|
+
t27 = $[76];
|
|
308
304
|
}
|
|
309
305
|
return t27;
|
|
310
306
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["resolveSurfaceGeometry","surfaceStyle","SURFACE_SHAPES","
|
|
1
|
+
{"version":3,"names":["resolveSurfaceGeometry","surfaceStyle","SURFACE_SHAPES","memo","StyleSheet","View","useDirectionProps","useIsRtl","BloomScope","bloomShadowStyle","SurfaceLevelProvider","useSurfaceLayer","resolveSurfaceMaterial","borderRadius","SurfacePaint","useLensFrame","withLens","jsx","_jsx","jsxs","_jsxs","BlurIslandComponent","t0","$","_c","children","radius","cornerCurve","t1","role","accessibilityLabel","sheen","t2","material","t3","style","testID","undefined","island","curve","variant","frame","directionProps","direction","layer","t4","flatten","customStyle","t5","String","backgroundColor","fill","t6","parentFill","parentLevel","paintFill","publishedFill","T0","T1","geometry","shape","t10","t11","t12","t13","t14","t15","t16","t17","t18","t19","t20","t7","t8","t9","level","vars","Symbol","for","bb0","full","lens","t21","collapsable","styles","overflow","floating","t22","t23","t24","t25","t26","t27","create","flexDirection","alignItems","alignSelf","position","BlurIsland","displayName"],"sourceRoot":"../../../src","sources":["blur/BlurIsland.tsx"],"mappings":";;;AAAA,SAASA,sBAAsB,QAAQ,wCAAqC;AAC5E,SAASC,YAAY,QAAQ,4BAAyB;AACtD,SAASC,cAAc,QAAQ,4BAAyB;AAExD,SAASC,IAAI,QAAQ,OAAO;AAC5B,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,SAASC,iBAAiB,EAAEC,QAAQ,QAAQ,wBAAqB;AACjE,SAASC,UAAU,QAAQ,wBAAe;AAC1C,SAASC,gBAAgB,QAAQ,0BAA0B;AAC3D,SAASC,oBAAoB,QAAQ,6BAA0B;AAC/D,SAASC,eAAe,QAAQ,iCAA8B;AAC9D,SAASC,sBAAsB,QAAQ,wCAAqC;AAC5E,SAASC,YAAY,QAAQ,qBAAkB;AAC/C,SAASC,YAAY,QAAQ,4BAAyB;AACtD,SAASC,YAAY,EAAEC,QAAQ,QAAQ,gCAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGrE;AACA;AACA;AACA,MAAMC,mBAA8C,GAAGC,EAAA;EAAA,MAAAC,CAAA,GAAAC,EAAA;EAAC;IAAAC,QAAA;IAAAC,MAAA;IAAAC,WAAA,EAAAC,EAAA;IAAAC,IAAA;IAAAC,kBAAA;IAAAC,KAAA,EAAAC,EAAA;IAAAC,QAAA,EAAAC,EAAA;IAAAC,KAAA;IAAAC;EAAA,IAAAd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CAAA,OAAA+C,GAAA;IAAA/C,CAAA,OAAAgE,GAAA;IAAAhE,CAAA,OAAAkE,GAAA;IAAAlE,CAAA,OAAAmE,GAAA;IAAAnE,CAAA,OAAAoE,GAAA;EAAA;IAAAA,GAAA,GAAApE,CAAA;EAAA;EAAA,IAAAqE,GAAA;EAAA,IAAArE,CAAA,SAAAmC,EAAA,IAAAnC,CAAA,SAAAoE,GAAA;IAnCTC,GAAA,gBAAA1E,IAAA,CAACwC,EAAU;MAAAjC,QAAA,EACTkE;IAkCO,CACG,CAAC;IAAApE,CAAA,OAAAmC,EAAA;IAAAnC,CAAA,OAAAoE,GAAA;IAAApE,CAAA,OAAAqE,GAAA;EAAA;IAAAA,GAAA,GAAArE,CAAA;EAAA;EAAA,OApCbqE,GAoCa;AAAA,CAEhB;AAED,MAAMR,MAAM,GAAGhF,UAAU,CAACyF,MAAM,CAAC;EAC/BvD,MAAM,EAAE;IACNwD,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,SAAS;IACrBC,SAAS,EAAE,YAAY;IACvBC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEF,OAAO,MAAMC,UAAU,gBAAG/F,IAAI,CAACkB,mBAAmB,CAAC;AACnD6E,UAAU,CAACC,WAAW,GAAG,YAAY","ignoreList":[]}
|
|
@@ -5,10 +5,10 @@ import { GlyphAttention } from "./GlyphAttention.js";
|
|
|
5
5
|
import { resolveButtonOverrides } from "./shared.js";
|
|
6
6
|
import { Group } from './Group';
|
|
7
7
|
import { useGroupedButton } from "./use-grouped-button.js";
|
|
8
|
-
import {
|
|
8
|
+
import { useLensFrame, withLens } from "../floating/lens/lens-frame.js";
|
|
9
9
|
import { useLensOriginReporter } from "../floating/lens/use-lens-menu.js";
|
|
10
10
|
import { compositeOnto } from "../surface/shared.js";
|
|
11
|
-
import { useControlMaterial, useFloatingControl
|
|
11
|
+
import { useControlMaterial, useFloatingControl } from "../floating/lens/lens-material.js";
|
|
12
12
|
import { useInLensBase } from "../floating/lens/native-lens.js";
|
|
13
13
|
import { useSurfaceLayer } from "../surface/use-surface-layer.js";
|
|
14
14
|
import React, { forwardRef, useMemo, useRef, useEffect, memo, createContext, useContext } from 'react';
|
|
@@ -585,7 +585,6 @@ const ButtonComponent = /*#__PURE__*/forwardRef(function ButtonComponent(props,
|
|
|
585
585
|
const material = materialProp ?? regionMaterial;
|
|
586
586
|
// A floating control (on the lens) is the floating size, whatever its caller says.
|
|
587
587
|
const sizeProp = useFloatingControl(materialProp) ? FLOATING_CONTROL_SIZE : requestedSize;
|
|
588
|
-
const inFloatingRegion = useInFloatingRegion();
|
|
589
588
|
const {
|
|
590
589
|
size,
|
|
591
590
|
tone
|
|
@@ -604,7 +603,6 @@ const ButtonComponent = /*#__PURE__*/forwardRef(function ButtonComponent(props,
|
|
|
604
603
|
const isLink = appearance === 'plain' && (href != null || linkTone != null);
|
|
605
604
|
const isInteractionBlocked = !interactive || disabled || loading;
|
|
606
605
|
const iconSize = typeof iconSizeProp === 'number' && Number.isFinite(iconSizeProp) && iconSizeProp > 0 ? iconSizeProp : isIconVariant ? density === 'compact' || typeof sizeProp === 'number' ? geometry.iconSize : ICON_BUTTON_ICON_SIZE[size] : geometry.iconSize;
|
|
607
|
-
const lensAvailable = useLensAvailable();
|
|
608
606
|
const inLensBase = useInLensBase();
|
|
609
607
|
const palette = useMemo(() => resolveButtonOverrides(isLink && linkTone != null && toneProp == null ? resolveLinkButtonPalette(theme, linkTone) : resolveButtonPalette(appearance, theme, tone, colors, layer.fill, material), {
|
|
610
608
|
color,
|
|
@@ -620,12 +618,9 @@ const ButtonComponent = /*#__PURE__*/forwardRef(function ButtonComponent(props,
|
|
|
620
618
|
// Where the device has the lens, every button with a material is drawn by it: one material for
|
|
621
619
|
// every button. In a floating region (`material="lens"`) the window draws it over what moves
|
|
622
620
|
// behind; anywhere else it is drawn in its place, against the surface it sits on, as a feed's ⋯.
|
|
623
|
-
const
|
|
624
|
-
// Outside a floating region (a header, a toolbar, a bar, a FAB) the control is in the page's
|
|
625
|
-
// content: its lens is drawn in its place, so it scrolls and stacks with the page.
|
|
626
|
-
const restBackdrop = lens && !inFloatingRegion ? layer.parentFill : undefined;
|
|
621
|
+
const frame = useLensFrame(material === 'lens' || material === 'surface' && palette.rest.surface === true, style);
|
|
627
622
|
// On the lens (its own or an enclosing base's) the engine draws the shadow and rim.
|
|
628
|
-
const onLens = inLensBase || lens;
|
|
623
|
+
const onLens = inLensBase || frame.lens;
|
|
629
624
|
|
|
630
625
|
// Pressed state drives the ACTIVE palette. Tracked through state rather than
|
|
631
626
|
// Pressable's function-form `style`, which NativeWind's css-interop swallows
|
|
@@ -686,8 +681,8 @@ const ButtonComponent = /*#__PURE__*/forwardRef(function ButtonComponent(props,
|
|
|
686
681
|
// of the button's own shape. The resting paint, composited onto the page, is what it looks like.
|
|
687
682
|
const reportOrigin = useLensOriginReporter();
|
|
688
683
|
const restFill = palette.rest.background;
|
|
689
|
-
const
|
|
690
|
-
const originRadius = typeof
|
|
684
|
+
const flatStyle = StyleSheet.flatten(style);
|
|
685
|
+
const originRadius = typeof flatStyle?.borderRadius === 'number' ? flatStyle.borderRadius : BUTTON_RADIUS;
|
|
691
686
|
const pageColor = theme.colors.background;
|
|
692
687
|
useEffect(() => {
|
|
693
688
|
if (!reportOrigin) return;
|
|
@@ -783,7 +778,6 @@ const ButtonComponent = /*#__PURE__*/forwardRef(function ButtonComponent(props,
|
|
|
783
778
|
// Native has no current-destination trait; selected is its equivalent.
|
|
784
779
|
const selected = togglePressed ?? (ariaCurrent === undefined ? undefined : ariaCurrent !== false && ariaCurrent !== 'false');
|
|
785
780
|
const handlePress = isInteractionBlocked ? undefined : onPress ?? (href != null ? () => target === '_blank' ? openExternal(href) : openHref(href) : undefined);
|
|
786
|
-
const split = lens ? splitLensStyle(style) : null;
|
|
787
781
|
const pressable = /*#__PURE__*/_jsxs(ButtonPressable, {
|
|
788
782
|
interactive: interactive,
|
|
789
783
|
ref: ref,
|
|
@@ -800,7 +794,7 @@ const ButtonComponent = /*#__PURE__*/forwardRef(function ButtonComponent(props,
|
|
|
800
794
|
tabIndex: tabIndex < 0 ? -1 : 0
|
|
801
795
|
}),
|
|
802
796
|
baseStyle: baseStyles,
|
|
803
|
-
style:
|
|
797
|
+
style: frame.style,
|
|
804
798
|
onLongPress: isInteractionBlocked ? undefined : onLongPress,
|
|
805
799
|
onPress: handlePress ? event => {
|
|
806
800
|
if (stopPropagation) event.stopPropagation();
|
|
@@ -858,12 +852,12 @@ const ButtonComponent = /*#__PURE__*/forwardRef(function ButtonComponent(props,
|
|
|
858
852
|
'aria-haspopup': ariaHasPopup
|
|
859
853
|
}),
|
|
860
854
|
testID: testID,
|
|
861
|
-
children: [paint.surface && !lens ? /*#__PURE__*/_jsx(SurfacePaint, {
|
|
855
|
+
children: [paint.surface && !frame.lens ? /*#__PURE__*/_jsx(SurfacePaint, {
|
|
862
856
|
fill: paint.background,
|
|
863
|
-
radius:
|
|
857
|
+
radius: flatStyle?.borderRadius ?? BUTTON_RADIUS
|
|
864
858
|
// A continuous corner (a squircle FAB) on the paint too.
|
|
865
859
|
,
|
|
866
|
-
shape:
|
|
860
|
+
shape: flatStyle?.borderCurve === 'continuous' ? SMOOTH : undefined
|
|
867
861
|
}) : null, /*#__PURE__*/_jsx(ButtonContent, {
|
|
868
862
|
loading: loading && loadingIndicator !== null,
|
|
869
863
|
gap: geometry.gap,
|
|
@@ -879,14 +873,10 @@ const ButtonComponent = /*#__PURE__*/forwardRef(function ButtonComponent(props,
|
|
|
879
873
|
children: loadingIndicator
|
|
880
874
|
}) : null, decoration]
|
|
881
875
|
});
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
return /*#__PURE__*/_jsx(LensButtonHost, {
|
|
876
|
+
// The lens takes the paint's fill (a solid control's) and radius.
|
|
877
|
+
return withLens(frame, pressable, {
|
|
885
878
|
tint: appearance === 'solid' ? paint.background : undefined,
|
|
886
|
-
radius:
|
|
887
|
-
restBackdrop: restBackdrop,
|
|
888
|
-
style: split.host,
|
|
889
|
-
children: pressable
|
|
879
|
+
radius: originRadius
|
|
890
880
|
});
|
|
891
881
|
});
|
|
892
882
|
const SMOOTH = {
|