bleam 0.0.12 → 0.0.14
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/dist/ai.cjs +5 -4
- package/dist/ai.js +4 -3
- package/dist/app-storage-D8W4n8ey.cjs +39 -0
- package/dist/app-storage-Isi5Bo0R.js +34 -0
- package/dist/cli.cjs +149 -23
- package/dist/cli.d.cts +13 -0
- package/dist/cli.d.ts +13 -0
- package/dist/cli.js +149 -23
- package/dist/elements-DX_YUveu.d.ts +341 -0
- package/dist/elements-gEI8YGl1.d.cts +341 -0
- package/dist/elements.cjs +1031 -0
- package/dist/elements.d.cts +2 -0
- package/dist/elements.d.ts +2 -0
- package/dist/elements.js +999 -0
- package/dist/{files-BXVkPrPN.js → files-DErLhzCB.js} +5 -11
- package/dist/{files-DxaQ-Nv0.cjs → files-lMk-CpL_.cjs} +5 -11
- package/dist/files.cjs +1 -1
- package/dist/files.js +1 -1
- package/dist/schema.cjs +1 -1
- package/dist/schema.d.cts +1 -1
- package/dist/schema.d.ts +1 -1
- package/dist/schema.js +1 -1
- package/dist/secrets.cjs +146 -0
- package/dist/secrets.d.cts +14 -0
- package/dist/secrets.d.ts +14 -0
- package/dist/secrets.js +142 -0
- package/dist/{state-LssDgpff.cjs → state-Bm9GiRnU.cjs} +61 -47
- package/dist/{state-Dh3HLixb.js → state-D8Firo9w.js} +60 -41
- package/dist/state.cjs +3 -2
- package/dist/state.d.cts +1 -1
- package/dist/state.d.ts +1 -1
- package/dist/state.js +3 -2
- package/dist/window.d.cts +1 -1
- package/dist/window.d.ts +1 -1
- package/package.json +14 -11
- package/templates/basic/app/index.tsx +7 -129
- package/templates/foundation-models/app/index.tsx +100 -41
- package/templates/image-generation/app/index.tsx +2 -2
- package/templates/native/ios/Podfile.lock +6 -0
- package/templates/native/modules/bleam-runtime/ios/AIModule.swift +7 -8
- package/templates/native/package.json +6 -1
- package/templates/native/yarn.lock +5392 -3749
- package/templates/state/app/index.tsx +2 -2
- package/templates/text-generation/app/index.tsx +4 -4
- package/templates/updates/README.md +1 -1
- package/dist/native-sqlite-xcGdamRD.js +0 -64
- package/dist/native-sqlite-yQLD5s9i.cjs +0 -66
- package/dist/ui-1WepaMS4.d.cts +0 -92
- package/dist/ui-D7bRLYee.d.ts +0 -92
- package/dist/ui.cjs +0 -364
- package/dist/ui.d.cts +0 -2
- package/dist/ui.d.ts +0 -2
- package/dist/ui.js +0 -357
- /package/dist/{schema-B5BfdswF.js → schema-B7ELMpuI.js} +0 -0
- /package/dist/{schema-BnVZOXfu.cjs → schema-B7SLUBLN.cjs} +0 -0
- /package/dist/{schema-D5eImHxu.d.cts → schema-BWsDPc6c.d.cts} +0 -0
- /package/dist/{schema-SSjokbtw.d.ts → schema-DsXZBnvc.d.ts} +0 -0
package/dist/ui.cjs
DELETED
|
@@ -1,364 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_native_runtime = require('./native-runtime-CsXnXkQn.cjs');
|
|
3
|
-
let react_native = require("react-native");
|
|
4
|
-
react_native = require_chunk.__toESM(react_native);
|
|
5
|
-
|
|
6
|
-
//#region src/ui/shared.ts
|
|
7
|
-
function textFromChildren(children) {
|
|
8
|
-
if (typeof children === "string" || typeof children === "number") return String(children);
|
|
9
|
-
if (Array.isArray(children)) return children.filter((child) => typeof child === "string" || typeof child === "number").join("");
|
|
10
|
-
}
|
|
11
|
-
function styleFromProps(style) {
|
|
12
|
-
return react_native.StyleSheet.flatten(style);
|
|
13
|
-
}
|
|
14
|
-
function colorFromHex(hex) {
|
|
15
|
-
const value = hex.trim().replace(/^#/, "");
|
|
16
|
-
const normalized = value.length === 3 ? value.split("").map((part) => `${part}${part}`).join("") : value;
|
|
17
|
-
if (!/^[\da-f]{6}$/i.test(normalized)) return;
|
|
18
|
-
const number = Number.parseInt(normalized, 16);
|
|
19
|
-
const red = (number >> 16 & 255) / 255;
|
|
20
|
-
const green = (number >> 8 & 255) / 255;
|
|
21
|
-
const blue = (number & 255) / 255;
|
|
22
|
-
return UIColor.colorWithRedGreenBlueAlpha(red, green, blue, 1);
|
|
23
|
-
}
|
|
24
|
-
function colorFromStyle(value) {
|
|
25
|
-
if (value == null) return;
|
|
26
|
-
if (typeof value === "string") {
|
|
27
|
-
const hexColor = colorFromHex(value);
|
|
28
|
-
if (hexColor) return hexColor;
|
|
29
|
-
}
|
|
30
|
-
const color = (0, react_native.processColor)(value);
|
|
31
|
-
if (typeof color !== "number") return;
|
|
32
|
-
const alpha = (color >>> 24 & 255) / 255;
|
|
33
|
-
const red = (color >>> 16 & 255) / 255;
|
|
34
|
-
const green = (color >>> 8 & 255) / 255;
|
|
35
|
-
const blue = (color & 255) / 255;
|
|
36
|
-
return UIColor.colorWithRedGreenBlueAlpha(red, green, blue, alpha);
|
|
37
|
-
}
|
|
38
|
-
function fontFromStyle(style) {
|
|
39
|
-
if (typeof style?.fontSize !== "number") return;
|
|
40
|
-
if (style.fontWeight === "700" || style.fontWeight === "bold") return UIFont.boldSystemFontOfSize(style.fontSize);
|
|
41
|
-
return UIFont.systemFontOfSize(style.fontSize);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
//#endregion
|
|
45
|
-
//#region src/ui/button.tsx
|
|
46
|
-
function buttonTitle(props) {
|
|
47
|
-
return props.title ?? textFromChildren(props.children) ?? "";
|
|
48
|
-
}
|
|
49
|
-
function buttonConfiguration(variant) {
|
|
50
|
-
if (variant === "secondary") return UIButtonConfiguration.borderedButtonConfiguration();
|
|
51
|
-
if (variant === "plain") return UIButtonConfiguration.plainButtonConfiguration();
|
|
52
|
-
return UIButtonConfiguration.borderedProminentButtonConfiguration();
|
|
53
|
-
}
|
|
54
|
-
function buttonSize(size) {
|
|
55
|
-
if (size === "small") return UIButtonConfigurationSize.Small;
|
|
56
|
-
if (size === "large") return UIButtonConfigurationSize.Large;
|
|
57
|
-
return UIButtonConfigurationSize.Medium;
|
|
58
|
-
}
|
|
59
|
-
const Button = require_native_runtime.ensureNativeScript().defineUIKitView({
|
|
60
|
-
name: "Button",
|
|
61
|
-
layout: {
|
|
62
|
-
sizing: "intrinsic",
|
|
63
|
-
defaultSize: {
|
|
64
|
-
width: 1,
|
|
65
|
-
height: 34
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
create(ctx) {
|
|
69
|
-
const button = UIButton.buttonWithType(UIButtonType.System);
|
|
70
|
-
ctx.targetAction(button, UIControlEvents.TouchUpInside, () => {
|
|
71
|
-
ctx.emit("onPress");
|
|
72
|
-
});
|
|
73
|
-
return button;
|
|
74
|
-
},
|
|
75
|
-
update(button, props, _previousProps, ctx) {
|
|
76
|
-
const style = styleFromProps(props.style);
|
|
77
|
-
const configuration = buttonConfiguration(props.variant);
|
|
78
|
-
configuration.title = buttonTitle(props);
|
|
79
|
-
configuration.buttonSize = buttonSize(props.size);
|
|
80
|
-
configuration.showsActivityIndicator = props.loading ?? false;
|
|
81
|
-
const foregroundColor = colorFromStyle(style?.color);
|
|
82
|
-
if (foregroundColor) configuration.baseForegroundColor = foregroundColor;
|
|
83
|
-
const backgroundColor = colorFromStyle(style?.backgroundColor);
|
|
84
|
-
if (backgroundColor) configuration.baseBackgroundColor = backgroundColor;
|
|
85
|
-
button.configuration = configuration;
|
|
86
|
-
button.enabled = !(props.disabled || props.loading);
|
|
87
|
-
ctx?.invalidateLayout();
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
//#endregion
|
|
92
|
-
//#region src/ui/label.tsx
|
|
93
|
-
function labelText(props) {
|
|
94
|
-
return props.text ?? textFromChildren(props.children) ?? "";
|
|
95
|
-
}
|
|
96
|
-
function defaultLabelColor(tone) {
|
|
97
|
-
if (tone === "secondary") return UIColor.secondaryLabelColor;
|
|
98
|
-
if (tone === "tertiary") return UIColor.tertiaryLabelColor;
|
|
99
|
-
return UIColor.labelColor;
|
|
100
|
-
}
|
|
101
|
-
const Label = require_native_runtime.ensureNativeScript().defineUIKitView({
|
|
102
|
-
name: "Label",
|
|
103
|
-
layout: {
|
|
104
|
-
sizing: "intrinsic",
|
|
105
|
-
defaultSize: {
|
|
106
|
-
width: 1,
|
|
107
|
-
height: 24
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
create() {
|
|
111
|
-
const label = UILabel.new();
|
|
112
|
-
label.adjustsFontForContentSizeCategory = true;
|
|
113
|
-
return label;
|
|
114
|
-
},
|
|
115
|
-
update(label, props, _previousProps, ctx) {
|
|
116
|
-
const style = styleFromProps(props.style);
|
|
117
|
-
label.text = labelText(props);
|
|
118
|
-
label.textColor = colorFromStyle(style?.color) ?? defaultLabelColor(props.tone);
|
|
119
|
-
label.font = fontFromStyle(style) ?? UIFont.preferredFontForTextStyle(UIFontTextStyleBody);
|
|
120
|
-
label.numberOfLines = props.numberOfLines ?? 0;
|
|
121
|
-
if (style?.textAlign === "center") label.textAlignment = NSTextAlignment.Center;
|
|
122
|
-
else if (style?.textAlign === "right") label.textAlignment = NSTextAlignment.Right;
|
|
123
|
-
else label.textAlignment = NSTextAlignment.Left;
|
|
124
|
-
ctx?.invalidateLayout();
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
//#endregion
|
|
129
|
-
//#region src/ui/symbol.tsx
|
|
130
|
-
function symbolWeight(weight) {
|
|
131
|
-
switch (weight) {
|
|
132
|
-
case "ultraLight": return UIImageSymbolWeight.UltraLight;
|
|
133
|
-
case "thin": return UIImageSymbolWeight.Thin;
|
|
134
|
-
case "light": return UIImageSymbolWeight.Light;
|
|
135
|
-
case "medium": return UIImageSymbolWeight.Medium;
|
|
136
|
-
case "semibold": return UIImageSymbolWeight.Semibold;
|
|
137
|
-
case "bold": return UIImageSymbolWeight.Bold;
|
|
138
|
-
case "heavy": return UIImageSymbolWeight.Heavy;
|
|
139
|
-
case "black": return UIImageSymbolWeight.Black;
|
|
140
|
-
default: return UIImageSymbolWeight.Regular;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
function symbolScale(scale) {
|
|
144
|
-
if (scale === "small") return UIImageSymbolScale.Small;
|
|
145
|
-
if (scale === "large") return UIImageSymbolScale.Large;
|
|
146
|
-
return UIImageSymbolScale.Medium;
|
|
147
|
-
}
|
|
148
|
-
function symbolConfiguration(props, style) {
|
|
149
|
-
const size = props.size ?? style?.fontSize ?? 17;
|
|
150
|
-
return UIImageSymbolConfiguration.configurationWithPointSizeWeightScale(size, symbolWeight(props.weight), symbolScale(props.scale));
|
|
151
|
-
}
|
|
152
|
-
function symbolImage(name, configuration) {
|
|
153
|
-
if (configuration) return UIImage.systemImageNamedWithConfiguration(name, configuration);
|
|
154
|
-
return UIImage.systemImageNamed(name);
|
|
155
|
-
}
|
|
156
|
-
const Symbol = require_native_runtime.ensureNativeScript().defineUIKitView({
|
|
157
|
-
name: "Symbol",
|
|
158
|
-
layout: {
|
|
159
|
-
sizing: "intrinsic",
|
|
160
|
-
defaultSize: {
|
|
161
|
-
width: 17,
|
|
162
|
-
height: 17
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
create() {
|
|
166
|
-
const imageView = UIImageView.new();
|
|
167
|
-
imageView.contentMode = UIViewContentMode.ScaleAspectFit;
|
|
168
|
-
return imageView;
|
|
169
|
-
},
|
|
170
|
-
update(imageView, props, _previousProps, ctx) {
|
|
171
|
-
const style = styleFromProps(props.style);
|
|
172
|
-
const configuration = symbolConfiguration(props, style);
|
|
173
|
-
imageView.image = symbolImage(props.symbol, configuration);
|
|
174
|
-
imageView.tintColor = colorFromStyle(props.color) ?? colorFromStyle(style?.tintColor) ?? colorFromStyle(style?.color) ?? UIColor.labelColor;
|
|
175
|
-
ctx?.invalidateLayout();
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
//#endregion
|
|
180
|
-
//#region src/ui/glass-shared.ts
|
|
181
|
-
function glassStyleValue(style) {
|
|
182
|
-
return typeof style === "object" ? style.style : style ?? "regular";
|
|
183
|
-
}
|
|
184
|
-
function glassEffect(style) {
|
|
185
|
-
if (style === "none") return null;
|
|
186
|
-
return UIGlassEffect.effectWithStyle(style === "clear" ? UIGlassEffectStyle.Clear : UIGlassEffectStyle.Regular);
|
|
187
|
-
}
|
|
188
|
-
function createGlassHost(effect) {
|
|
189
|
-
const rootView = UIVisualEffectView.alloc().initWithEffect(effect);
|
|
190
|
-
const childrenView = UIView.new();
|
|
191
|
-
rootView.backgroundColor = UIColor.clearColor;
|
|
192
|
-
rootView.contentView.backgroundColor = UIColor.clearColor;
|
|
193
|
-
childrenView.backgroundColor = UIColor.clearColor;
|
|
194
|
-
rootView.autoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
|
|
195
|
-
rootView.contentView.autoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
|
|
196
|
-
childrenView.translatesAutoresizingMaskIntoConstraints = false;
|
|
197
|
-
rootView.contentView.addSubview(childrenView);
|
|
198
|
-
const constraints = {
|
|
199
|
-
top: childrenView.topAnchor.constraintEqualToAnchorConstant(rootView.contentView.topAnchor, 0),
|
|
200
|
-
right: rootView.contentView.rightAnchor.constraintEqualToAnchorConstant(childrenView.rightAnchor, 0),
|
|
201
|
-
bottom: rootView.contentView.bottomAnchor.constraintEqualToAnchorConstant(childrenView.bottomAnchor, 0),
|
|
202
|
-
left: childrenView.leftAnchor.constraintEqualToAnchorConstant(rootView.contentView.leftAnchor, 0)
|
|
203
|
-
};
|
|
204
|
-
NSLayoutConstraint.activateConstraints([
|
|
205
|
-
constraints.top,
|
|
206
|
-
constraints.right,
|
|
207
|
-
constraints.bottom,
|
|
208
|
-
constraints.left
|
|
209
|
-
]);
|
|
210
|
-
return {
|
|
211
|
-
rootView,
|
|
212
|
-
childrenView
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
function applyGlassShape(view, style) {
|
|
216
|
-
const radius = typeof style?.cornerRadius === "number" ? style.cornerRadius : 0;
|
|
217
|
-
view.layer.cornerRadius = radius;
|
|
218
|
-
view.contentView.layer.cornerRadius = radius;
|
|
219
|
-
view.layer.cornerCurve = kCACornerCurveContinuous;
|
|
220
|
-
view.contentView.layer.cornerCurve = kCACornerCurveContinuous;
|
|
221
|
-
view.clipsToBounds = radius > 0;
|
|
222
|
-
view.contentView.clipsToBounds = radius > 0;
|
|
223
|
-
view.layer.masksToBounds = radius > 0;
|
|
224
|
-
view.contentView.layer.masksToBounds = radius > 0;
|
|
225
|
-
view.layer.borderWidth = typeof style?.borderWidth === "number" ? style.borderWidth : 0;
|
|
226
|
-
const borderColor = colorFromStyle(style?.borderColor);
|
|
227
|
-
view.layer.borderColor = borderColor?.CGColor ?? null;
|
|
228
|
-
}
|
|
229
|
-
function updateGlassEffect(view, props) {
|
|
230
|
-
const style = glassStyleValue(props.glassEffectStyle);
|
|
231
|
-
const effect = glassEffect(style);
|
|
232
|
-
if (style !== "none") {
|
|
233
|
-
const tintColor = props.tintColor ? colorFromHex(props.tintColor) : void 0;
|
|
234
|
-
const glass = effect;
|
|
235
|
-
glass.interactive = props.isInteractive ?? false;
|
|
236
|
-
if (tintColor) glass.tintColor = tintColor;
|
|
237
|
-
}
|
|
238
|
-
if (typeof props.glassEffectStyle === "object" && props.glassEffectStyle.animate) UIView.animateWithDurationAnimations(props.glassEffectStyle.animationDuration ?? .35, () => {
|
|
239
|
-
view.effect = effect;
|
|
240
|
-
});
|
|
241
|
-
else view.effect = effect;
|
|
242
|
-
}
|
|
243
|
-
function updateGlassContainerEffect(view, spacing) {
|
|
244
|
-
const effect = UIGlassContainerEffect.new();
|
|
245
|
-
effect.spacing = spacing ?? 0;
|
|
246
|
-
view.effect = effect;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
//#endregion
|
|
250
|
-
//#region src/ui/glass-view.tsx
|
|
251
|
-
const GlassView = require_native_runtime.ensureNativeScript().defineUIKitContainer({
|
|
252
|
-
name: "GlassView",
|
|
253
|
-
layout: {
|
|
254
|
-
sizing: "fill",
|
|
255
|
-
defaultSize: {
|
|
256
|
-
width: 0,
|
|
257
|
-
height: 0
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
create() {
|
|
261
|
-
return createGlassHost(glassEffect("regular"));
|
|
262
|
-
},
|
|
263
|
-
update(view, props, _previousProps, ctx) {
|
|
264
|
-
updateGlassEffect(view.rootView, props);
|
|
265
|
-
applyGlassShape(view.rootView, props.glassStyle);
|
|
266
|
-
ctx?.invalidateLayout();
|
|
267
|
-
}
|
|
268
|
-
});
|
|
269
|
-
|
|
270
|
-
//#endregion
|
|
271
|
-
//#region src/ui/glass-container.tsx
|
|
272
|
-
const GlassContainer = require_native_runtime.ensureNativeScript().defineUIKitContainer({
|
|
273
|
-
name: "GlassContainer",
|
|
274
|
-
layout: {
|
|
275
|
-
sizing: "fill",
|
|
276
|
-
defaultSize: {
|
|
277
|
-
width: 0,
|
|
278
|
-
height: 0
|
|
279
|
-
}
|
|
280
|
-
},
|
|
281
|
-
create() {
|
|
282
|
-
const host = createGlassHost(UIGlassContainerEffect.new());
|
|
283
|
-
updateGlassContainerEffect(host.rootView, void 0);
|
|
284
|
-
return host;
|
|
285
|
-
},
|
|
286
|
-
update(view, props, _previousProps, ctx) {
|
|
287
|
-
updateGlassContainerEffect(view.rootView, props.spacing);
|
|
288
|
-
applyGlassShape(view.rootView, props.glassStyle);
|
|
289
|
-
ctx?.invalidateLayout();
|
|
290
|
-
}
|
|
291
|
-
});
|
|
292
|
-
|
|
293
|
-
//#endregion
|
|
294
|
-
//#region src/ui/blur-view.tsx
|
|
295
|
-
function blurStyle(intensity, colorScheme) {
|
|
296
|
-
const scheme = colorScheme ?? "auto";
|
|
297
|
-
const level = intensity ?? "regular";
|
|
298
|
-
if (scheme === "light") switch (level) {
|
|
299
|
-
case "ultraThin": return UIBlurEffectStyle.SystemUltraThinMaterialLight;
|
|
300
|
-
case "thin": return UIBlurEffectStyle.SystemThinMaterialLight;
|
|
301
|
-
case "thick": return UIBlurEffectStyle.SystemThickMaterialLight;
|
|
302
|
-
case "chrome": return UIBlurEffectStyle.SystemChromeMaterialLight;
|
|
303
|
-
default: return UIBlurEffectStyle.SystemMaterialLight;
|
|
304
|
-
}
|
|
305
|
-
if (scheme === "dark") switch (level) {
|
|
306
|
-
case "ultraThin": return UIBlurEffectStyle.SystemUltraThinMaterialDark;
|
|
307
|
-
case "thin": return UIBlurEffectStyle.SystemThinMaterialDark;
|
|
308
|
-
case "thick": return UIBlurEffectStyle.SystemThickMaterialDark;
|
|
309
|
-
case "chrome": return UIBlurEffectStyle.SystemChromeMaterialDark;
|
|
310
|
-
default: return UIBlurEffectStyle.SystemMaterialDark;
|
|
311
|
-
}
|
|
312
|
-
switch (level) {
|
|
313
|
-
case "ultraThin": return UIBlurEffectStyle.SystemUltraThinMaterial;
|
|
314
|
-
case "thin": return UIBlurEffectStyle.SystemThinMaterial;
|
|
315
|
-
case "thick": return UIBlurEffectStyle.SystemThickMaterial;
|
|
316
|
-
case "chrome": return UIBlurEffectStyle.SystemChromeMaterial;
|
|
317
|
-
default: return UIBlurEffectStyle.SystemMaterial;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
function createEffectHost(effect) {
|
|
321
|
-
const rootView = UIVisualEffectView.alloc().initWithEffect(effect);
|
|
322
|
-
rootView.backgroundColor = UIColor.clearColor;
|
|
323
|
-
rootView.contentView.backgroundColor = UIColor.clearColor;
|
|
324
|
-
rootView.autoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
|
|
325
|
-
rootView.contentView.autoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
|
|
326
|
-
return {
|
|
327
|
-
rootView,
|
|
328
|
-
childrenView: rootView.contentView
|
|
329
|
-
};
|
|
330
|
-
}
|
|
331
|
-
function applyContainerStyle(view, style) {
|
|
332
|
-
const borderRadius = style?.borderRadius;
|
|
333
|
-
if (typeof borderRadius === "number") view.layer.cornerRadius = borderRadius;
|
|
334
|
-
view.clipsToBounds = style?.overflow === "hidden" || typeof borderRadius === "number";
|
|
335
|
-
}
|
|
336
|
-
function updateBlurEffect(view, props) {
|
|
337
|
-
view.effect = UIBlurEffect.effectWithStyle(blurStyle(props.intensity, props.colorScheme));
|
|
338
|
-
}
|
|
339
|
-
const BlurView = require_native_runtime.ensureNativeScript().defineUIKitContainer({
|
|
340
|
-
name: "BlurView",
|
|
341
|
-
layout: {
|
|
342
|
-
sizing: "fill",
|
|
343
|
-
defaultSize: {
|
|
344
|
-
width: 0,
|
|
345
|
-
height: 0
|
|
346
|
-
}
|
|
347
|
-
},
|
|
348
|
-
create() {
|
|
349
|
-
return createEffectHost(UIBlurEffect.effectWithStyle(UIBlurEffectStyle.SystemMaterial));
|
|
350
|
-
},
|
|
351
|
-
update(view, props, _previousProps, ctx) {
|
|
352
|
-
updateBlurEffect(view.rootView, props);
|
|
353
|
-
applyContainerStyle(view.rootView, styleFromProps(props.style));
|
|
354
|
-
ctx?.invalidateLayout();
|
|
355
|
-
}
|
|
356
|
-
});
|
|
357
|
-
|
|
358
|
-
//#endregion
|
|
359
|
-
exports.BlurView = BlurView;
|
|
360
|
-
exports.Button = Button;
|
|
361
|
-
exports.GlassContainer = GlassContainer;
|
|
362
|
-
exports.GlassView = GlassView;
|
|
363
|
-
exports.Label = Label;
|
|
364
|
-
exports.Symbol = Symbol;
|
package/dist/ui.d.cts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { C as ButtonVariant, S as ButtonSize, _ as Label, a as GlassContainer, b as Button, c as GlassEffectStyleConfig, d as GlassVisualStyle, f as Symbol, g as SymbolWeight, h as SymbolScale, i as BlurViewProps, l as GlassStyle, m as SymbolProps, n as BlurIntensity, o as GlassView, p as SymbolName, r as BlurView, s as GlassContainerProps, t as BlurColorScheme, u as GlassViewProps, v as LabelProps, x as ButtonProps, y as LabelTone } from "./ui-1WepaMS4.cjs";
|
|
2
|
-
export { BlurColorScheme, BlurIntensity, BlurView, BlurViewProps, Button, ButtonProps, ButtonSize, ButtonVariant, GlassContainer, GlassContainerProps, GlassEffectStyleConfig, GlassStyle, GlassView, GlassViewProps, GlassVisualStyle, Label, LabelProps, LabelTone, Symbol, SymbolName, SymbolProps, SymbolScale, SymbolWeight };
|
package/dist/ui.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { C as ButtonVariant, S as ButtonSize, _ as Label, a as GlassContainer, b as Button, c as GlassEffectStyleConfig, d as GlassVisualStyle, f as Symbol, g as SymbolWeight, h as SymbolScale, i as BlurViewProps, l as GlassStyle, m as SymbolProps, n as BlurIntensity, o as GlassView, p as SymbolName, r as BlurView, s as GlassContainerProps, t as BlurColorScheme, u as GlassViewProps, v as LabelProps, x as ButtonProps, y as LabelTone } from "./ui-D7bRLYee.js";
|
|
2
|
-
export { BlurColorScheme, BlurIntensity, BlurView, BlurViewProps, Button, ButtonProps, ButtonSize, ButtonVariant, GlassContainer, GlassContainerProps, GlassEffectStyleConfig, GlassStyle, GlassView, GlassViewProps, GlassVisualStyle, Label, LabelProps, LabelTone, Symbol, SymbolName, SymbolProps, SymbolScale, SymbolWeight };
|