bleam 0.0.12 → 0.0.13

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.
Files changed (58) hide show
  1. package/dist/ai.cjs +5 -4
  2. package/dist/ai.d.ts +1 -1
  3. package/dist/ai.js +4 -3
  4. package/dist/app-storage-D8W4n8ey.cjs +39 -0
  5. package/dist/app-storage-Isi5Bo0R.js +34 -0
  6. package/dist/cli.cjs +148 -22
  7. package/dist/cli.d.cts +13 -0
  8. package/dist/cli.d.ts +14 -1
  9. package/dist/cli.js +148 -22
  10. package/dist/config.d.ts +1 -1
  11. package/dist/elements-CFk0QHw0.d.cts +127 -0
  12. package/dist/elements-ClGQ41Sc.d.ts +127 -0
  13. package/dist/{ui.cjs → elements.cjs} +307 -168
  14. package/dist/elements.d.cts +2 -0
  15. package/dist/elements.d.ts +2 -0
  16. package/dist/{ui.js → elements.js} +306 -169
  17. package/dist/{files-BXVkPrPN.js → files-DErLhzCB.js} +5 -11
  18. package/dist/{files-DxaQ-Nv0.cjs → files-lMk-CpL_.cjs} +5 -11
  19. package/dist/files.cjs +1 -1
  20. package/dist/files.d.ts +1 -1
  21. package/dist/files.js +1 -1
  22. package/dist/index.d.ts +1 -1
  23. package/dist/schema.cjs +1 -1
  24. package/dist/schema.d.cts +1 -1
  25. package/dist/schema.d.ts +1 -1
  26. package/dist/schema.js +1 -1
  27. package/dist/secrets.cjs +146 -0
  28. package/dist/secrets.d.cts +14 -0
  29. package/dist/secrets.d.ts +14 -0
  30. package/dist/secrets.js +142 -0
  31. package/dist/{state-LssDgpff.cjs → state-BZYyrE2-.cjs} +4 -41
  32. package/dist/{state-Dh3HLixb.js → state-DkaRFkZJ.js} +4 -35
  33. package/dist/state.cjs +3 -2
  34. package/dist/state.d.cts +1 -1
  35. package/dist/state.d.ts +1 -1
  36. package/dist/state.js +3 -2
  37. package/dist/window.d.cts +1 -1
  38. package/dist/window.d.ts +3 -3
  39. package/package.json +11 -6
  40. package/templates/basic/app/index.tsx +2 -2
  41. package/templates/foundation-models/app/index.tsx +4 -4
  42. package/templates/image-generation/app/index.tsx +2 -2
  43. package/templates/native/modules/bleam-runtime/ios/AIModule.swift +7 -8
  44. package/templates/state/app/index.tsx +2 -2
  45. package/templates/text-generation/app/index.tsx +4 -4
  46. package/templates/updates/README.md +1 -1
  47. package/dist/ui-1WepaMS4.d.cts +0 -92
  48. package/dist/ui-D7bRLYee.d.ts +0 -92
  49. package/dist/ui.d.cts +0 -2
  50. package/dist/ui.d.ts +0 -2
  51. /package/dist/{config-Chi-flpJ.d.ts → config-Cms0rvqg.d.ts} +0 -0
  52. /package/dist/{files-VrkQlKIT.d.ts → files-4ZEoAWiv.d.ts} +0 -0
  53. /package/dist/{native-sqlite-yQLD5s9i.cjs → native-sqlite-Dw--FI9a.cjs} +0 -0
  54. /package/dist/{native-sqlite-xcGdamRD.js → native-sqlite-WzRNzCSh.js} +0 -0
  55. /package/dist/{schema-B5BfdswF.js → schema-B7ELMpuI.js} +0 -0
  56. /package/dist/{schema-BnVZOXfu.cjs → schema-B7SLUBLN.cjs} +0 -0
  57. /package/dist/{schema-D5eImHxu.d.cts → schema-BWsDPc6c.d.cts} +0 -0
  58. /package/dist/{schema-SSjokbtw.d.ts → schema-LxnzAfgw.d.ts} +0 -0
@@ -1,6 +1,6 @@
1
+ import { Button } from 'bleam/elements'
1
2
  import { atom, useAtom } from 'bleam/state'
2
3
  import { sx } from 'bleam/styles'
3
- import { Button } from 'bleam/ui'
4
4
  import { Window } from 'bleam/window'
5
5
  import { Text, View } from 'react-native'
6
6
 
@@ -20,7 +20,7 @@ export default function App() {
20
20
  </Text>
21
21
  ))}
22
22
  <Button
23
- title="Add task"
23
+ label="Add task"
24
24
  onPress={() =>
25
25
  setItems((current) => [...current, `Task ${current.length + 1}`])
26
26
  }
@@ -1,6 +1,6 @@
1
1
  import { bonsai, chat, prepareTextModel, useChat, useChatList } from 'bleam/ai'
2
+ import { Button } from 'bleam/elements'
2
3
  import { sx } from 'bleam/styles'
3
- import { Button } from 'bleam/ui'
4
4
  import { Window } from 'bleam/window'
5
5
  import { useEffect, useRef, useState } from 'react'
6
6
  import { Text, TextInput, View } from 'react-native'
@@ -94,20 +94,20 @@ function Conversation({ id, path }: { id: string; path: string }) {
94
94
  />
95
95
  <View style={sx('flex-row', 'gap-3')}>
96
96
  <Button
97
- title="Send"
97
+ label="Send"
98
98
  loading={conversation.isGenerating}
99
99
  disabled={!conversation.canSend}
100
100
  onPress={() => void conversation.send(prompt)}
101
101
  />
102
102
  <Button
103
- title="Cancel"
103
+ label="Cancel"
104
104
  variant="secondary"
105
105
  disabled={!conversation.canCancel}
106
106
  onPress={() => void conversation.cancel()}
107
107
  />
108
108
  {retryable ? (
109
109
  <Button
110
- title="Retry"
110
+ label="Retry"
111
111
  variant="secondary"
112
112
  onPress={() => void conversation.retry(retryable.id)}
113
113
  />
@@ -80,7 +80,7 @@ requires.
80
80
  "channel": "stable",
81
81
  "releaseId": "ota_release_01",
82
82
  "bundleVersion": "1.2.0+4",
83
- "runtimeVersion": "0.0.12",
83
+ "runtimeVersion": "0.0.13",
84
84
  "artifact": {
85
85
  "format": "bleam-ota-zip-v1",
86
86
  "downloadId": "ota_release_01",
@@ -1,92 +0,0 @@
1
- import { ReactNode } from "react";
2
- import { ColorValue, StyleProp, TextStyle, ViewStyle } from "react-native";
3
- import * as _nativescript_react_native27 from "@nativescript/react-native";
4
-
5
- //#region src/ui/shared.d.ts
6
- type NativeStyle = ViewStyle & TextStyle;
7
- //#endregion
8
- //#region src/ui/button.d.ts
9
- type ButtonVariant = 'primary' | 'secondary' | 'plain';
10
- type ButtonSize = 'regular' | 'small' | 'large';
11
- type ButtonProps = {
12
- children?: ReactNode;
13
- title?: string;
14
- variant?: ButtonVariant;
15
- size?: ButtonSize;
16
- disabled?: boolean;
17
- loading?: boolean;
18
- onPress?: () => void;
19
- style?: StyleProp<NativeStyle>;
20
- };
21
- declare const Button: _nativescript_react_native27.UIKitViewComponent<ButtonProps, UIButton>;
22
- //#endregion
23
- //#region src/ui/label.d.ts
24
- type LabelTone = 'primary' | 'secondary' | 'tertiary';
25
- type LabelProps = {
26
- children?: ReactNode;
27
- text?: string;
28
- tone?: LabelTone;
29
- numberOfLines?: number;
30
- style?: StyleProp<NativeStyle>;
31
- };
32
- declare const Label: _nativescript_react_native27.UIKitViewComponent<LabelProps, UILabel>;
33
- //#endregion
34
- //#region src/ui/symbol.d.ts
35
- type SymbolName = string;
36
- type SymbolWeight = 'ultraLight' | 'thin' | 'light' | 'regular' | 'medium' | 'semibold' | 'bold' | 'heavy' | 'black';
37
- type SymbolScale = 'small' | 'medium' | 'large';
38
- type SymbolProps = {
39
- symbol: SymbolName;
40
- size?: number;
41
- weight?: SymbolWeight;
42
- scale?: SymbolScale;
43
- color?: ColorValue;
44
- style?: StyleProp<NativeStyle>;
45
- };
46
- declare const Symbol: _nativescript_react_native27.UIKitViewComponent<SymbolProps, UIImageView>;
47
- //#endregion
48
- //#region src/ui/glass-shared.d.ts
49
- type GlassStyle = 'regular' | 'clear' | 'none';
50
- type GlassEffectStyleConfig = {
51
- style: GlassStyle;
52
- animate?: boolean;
53
- animationDuration?: number;
54
- };
55
- type GlassVisualStyle = {
56
- cornerRadius?: number;
57
- borderWidth?: number;
58
- borderColor?: ColorValue;
59
- };
60
- type GlassViewProps = {
61
- children?: ReactNode;
62
- style?: StyleProp<NativeStyle>;
63
- glassStyle?: GlassVisualStyle;
64
- glassEffectStyle?: GlassStyle | GlassEffectStyleConfig;
65
- tintColor?: string;
66
- isInteractive?: boolean;
67
- };
68
- type GlassContainerProps = {
69
- children?: ReactNode;
70
- style?: StyleProp<NativeStyle>;
71
- glassStyle?: GlassVisualStyle;
72
- spacing?: number;
73
- };
74
- //#endregion
75
- //#region src/ui/glass-view.d.ts
76
- declare const GlassView: _nativescript_react_native27.UIKitViewComponent<GlassViewProps, _nativescript_react_native27.UIKitContainerResult<UIVisualEffectView, UIView>>;
77
- //#endregion
78
- //#region src/ui/glass-container.d.ts
79
- declare const GlassContainer: _nativescript_react_native27.UIKitViewComponent<GlassContainerProps, _nativescript_react_native27.UIKitContainerResult<UIVisualEffectView, UIView>>;
80
- //#endregion
81
- //#region src/ui/blur-view.d.ts
82
- type BlurIntensity = 'ultraThin' | 'thin' | 'regular' | 'thick' | 'chrome';
83
- type BlurColorScheme = 'auto' | 'light' | 'dark';
84
- type BlurViewProps = {
85
- children?: ReactNode;
86
- style?: StyleProp<NativeStyle>;
87
- intensity?: BlurIntensity;
88
- colorScheme?: BlurColorScheme;
89
- };
90
- declare const BlurView: _nativescript_react_native27.UIKitViewComponent<BlurViewProps, _nativescript_react_native27.UIKitContainerResult<UIVisualEffectView, UIView>>;
91
- //#endregion
92
- export { ButtonVariant as C, ButtonSize as S, Label as _, GlassContainer as a, Button as b, GlassEffectStyleConfig as c, GlassVisualStyle as d, Symbol as f, SymbolWeight as g, SymbolScale as h, BlurViewProps as i, GlassStyle as l, SymbolProps as m, BlurIntensity as n, GlassView as o, SymbolName as p, BlurView as r, GlassContainerProps as s, BlurColorScheme as t, GlassViewProps as u, LabelProps as v, ButtonProps as x, LabelTone as y };
@@ -1,92 +0,0 @@
1
- import * as _nativescript_react_native30 from "@nativescript/react-native";
2
- import { ReactNode } from "react";
3
- import { ColorValue, StyleProp, TextStyle, ViewStyle } from "react-native";
4
-
5
- //#region src/ui/shared.d.ts
6
- type NativeStyle = ViewStyle & TextStyle;
7
- //#endregion
8
- //#region src/ui/button.d.ts
9
- type ButtonVariant = 'primary' | 'secondary' | 'plain';
10
- type ButtonSize = 'regular' | 'small' | 'large';
11
- type ButtonProps = {
12
- children?: ReactNode;
13
- title?: string;
14
- variant?: ButtonVariant;
15
- size?: ButtonSize;
16
- disabled?: boolean;
17
- loading?: boolean;
18
- onPress?: () => void;
19
- style?: StyleProp<NativeStyle>;
20
- };
21
- declare const Button: _nativescript_react_native30.UIKitViewComponent<ButtonProps, UIButton>;
22
- //#endregion
23
- //#region src/ui/label.d.ts
24
- type LabelTone = 'primary' | 'secondary' | 'tertiary';
25
- type LabelProps = {
26
- children?: ReactNode;
27
- text?: string;
28
- tone?: LabelTone;
29
- numberOfLines?: number;
30
- style?: StyleProp<NativeStyle>;
31
- };
32
- declare const Label: _nativescript_react_native30.UIKitViewComponent<LabelProps, UILabel>;
33
- //#endregion
34
- //#region src/ui/symbol.d.ts
35
- type SymbolName = string;
36
- type SymbolWeight = 'ultraLight' | 'thin' | 'light' | 'regular' | 'medium' | 'semibold' | 'bold' | 'heavy' | 'black';
37
- type SymbolScale = 'small' | 'medium' | 'large';
38
- type SymbolProps = {
39
- symbol: SymbolName;
40
- size?: number;
41
- weight?: SymbolWeight;
42
- scale?: SymbolScale;
43
- color?: ColorValue;
44
- style?: StyleProp<NativeStyle>;
45
- };
46
- declare const Symbol: _nativescript_react_native30.UIKitViewComponent<SymbolProps, UIImageView>;
47
- //#endregion
48
- //#region src/ui/glass-shared.d.ts
49
- type GlassStyle = 'regular' | 'clear' | 'none';
50
- type GlassEffectStyleConfig = {
51
- style: GlassStyle;
52
- animate?: boolean;
53
- animationDuration?: number;
54
- };
55
- type GlassVisualStyle = {
56
- cornerRadius?: number;
57
- borderWidth?: number;
58
- borderColor?: ColorValue;
59
- };
60
- type GlassViewProps = {
61
- children?: ReactNode;
62
- style?: StyleProp<NativeStyle>;
63
- glassStyle?: GlassVisualStyle;
64
- glassEffectStyle?: GlassStyle | GlassEffectStyleConfig;
65
- tintColor?: string;
66
- isInteractive?: boolean;
67
- };
68
- type GlassContainerProps = {
69
- children?: ReactNode;
70
- style?: StyleProp<NativeStyle>;
71
- glassStyle?: GlassVisualStyle;
72
- spacing?: number;
73
- };
74
- //#endregion
75
- //#region src/ui/glass-view.d.ts
76
- declare const GlassView: _nativescript_react_native30.UIKitViewComponent<GlassViewProps, _nativescript_react_native30.UIKitContainerResult<UIVisualEffectView, UIView>>;
77
- //#endregion
78
- //#region src/ui/glass-container.d.ts
79
- declare const GlassContainer: _nativescript_react_native30.UIKitViewComponent<GlassContainerProps, _nativescript_react_native30.UIKitContainerResult<UIVisualEffectView, UIView>>;
80
- //#endregion
81
- //#region src/ui/blur-view.d.ts
82
- type BlurIntensity = 'ultraThin' | 'thin' | 'regular' | 'thick' | 'chrome';
83
- type BlurColorScheme = 'auto' | 'light' | 'dark';
84
- type BlurViewProps = {
85
- children?: ReactNode;
86
- style?: StyleProp<NativeStyle>;
87
- intensity?: BlurIntensity;
88
- colorScheme?: BlurColorScheme;
89
- };
90
- declare const BlurView: _nativescript_react_native30.UIKitViewComponent<BlurViewProps, _nativescript_react_native30.UIKitContainerResult<UIVisualEffectView, UIView>>;
91
- //#endregion
92
- export { ButtonVariant as C, ButtonSize as S, Label as _, GlassContainer as a, Button as b, GlassEffectStyleConfig as c, GlassVisualStyle as d, Symbol as f, SymbolWeight as g, SymbolScale as h, BlurViewProps as i, GlassStyle as l, SymbolProps as m, BlurIntensity as n, GlassView as o, SymbolName as p, BlurView as r, GlassContainerProps as s, BlurColorScheme as t, GlassViewProps as u, LabelProps as v, ButtonProps as x, LabelTone as y };
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 };
File without changes