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.
Files changed (57) hide show
  1. package/dist/ai.cjs +5 -4
  2. package/dist/ai.js +4 -3
  3. package/dist/app-storage-D8W4n8ey.cjs +39 -0
  4. package/dist/app-storage-Isi5Bo0R.js +34 -0
  5. package/dist/cli.cjs +149 -23
  6. package/dist/cli.d.cts +13 -0
  7. package/dist/cli.d.ts +13 -0
  8. package/dist/cli.js +149 -23
  9. package/dist/elements-DX_YUveu.d.ts +341 -0
  10. package/dist/elements-gEI8YGl1.d.cts +341 -0
  11. package/dist/elements.cjs +1031 -0
  12. package/dist/elements.d.cts +2 -0
  13. package/dist/elements.d.ts +2 -0
  14. package/dist/elements.js +999 -0
  15. package/dist/{files-BXVkPrPN.js → files-DErLhzCB.js} +5 -11
  16. package/dist/{files-DxaQ-Nv0.cjs → files-lMk-CpL_.cjs} +5 -11
  17. package/dist/files.cjs +1 -1
  18. package/dist/files.js +1 -1
  19. package/dist/schema.cjs +1 -1
  20. package/dist/schema.d.cts +1 -1
  21. package/dist/schema.d.ts +1 -1
  22. package/dist/schema.js +1 -1
  23. package/dist/secrets.cjs +146 -0
  24. package/dist/secrets.d.cts +14 -0
  25. package/dist/secrets.d.ts +14 -0
  26. package/dist/secrets.js +142 -0
  27. package/dist/{state-LssDgpff.cjs → state-Bm9GiRnU.cjs} +61 -47
  28. package/dist/{state-Dh3HLixb.js → state-D8Firo9w.js} +60 -41
  29. package/dist/state.cjs +3 -2
  30. package/dist/state.d.cts +1 -1
  31. package/dist/state.d.ts +1 -1
  32. package/dist/state.js +3 -2
  33. package/dist/window.d.cts +1 -1
  34. package/dist/window.d.ts +1 -1
  35. package/package.json +14 -11
  36. package/templates/basic/app/index.tsx +7 -129
  37. package/templates/foundation-models/app/index.tsx +100 -41
  38. package/templates/image-generation/app/index.tsx +2 -2
  39. package/templates/native/ios/Podfile.lock +6 -0
  40. package/templates/native/modules/bleam-runtime/ios/AIModule.swift +7 -8
  41. package/templates/native/package.json +6 -1
  42. package/templates/native/yarn.lock +5392 -3749
  43. package/templates/state/app/index.tsx +2 -2
  44. package/templates/text-generation/app/index.tsx +4 -4
  45. package/templates/updates/README.md +1 -1
  46. package/dist/native-sqlite-xcGdamRD.js +0 -64
  47. package/dist/native-sqlite-yQLD5s9i.cjs +0 -66
  48. package/dist/ui-1WepaMS4.d.cts +0 -92
  49. package/dist/ui-D7bRLYee.d.ts +0 -92
  50. package/dist/ui.cjs +0 -364
  51. package/dist/ui.d.cts +0 -2
  52. package/dist/ui.d.ts +0 -2
  53. package/dist/ui.js +0 -357
  54. /package/dist/{schema-B5BfdswF.js → schema-B7ELMpuI.js} +0 -0
  55. /package/dist/{schema-BnVZOXfu.cjs → schema-B7SLUBLN.cjs} +0 -0
  56. /package/dist/{schema-D5eImHxu.d.cts → schema-BWsDPc6c.d.cts} +0 -0
  57. /package/dist/{schema-SSjokbtw.d.ts → schema-DsXZBnvc.d.ts} +0 -0
@@ -0,0 +1,341 @@
1
+ import * as react4 from "react";
2
+ import { ReactNode } from "react";
3
+ import { ColorValue, FlatListProps, PressableProps, StyleProp, TextInputProps, TextInputSubmitEditingEvent, TextProps, TextStyle, ViewProps, ViewStyle } from "react-native";
4
+ import * as _nativescript_react_native26 from "@nativescript/react-native";
5
+
6
+ //#region src/elements/ai-status.d.ts
7
+ type MessageStatusValue = 'queued' | 'generating' | 'canceling' | 'completed' | 'failed' | 'canceled';
8
+ type MessageRole = 'user' | 'assistant';
9
+ type MessageStatusDisplay = {
10
+ symbol: string;
11
+ label: string;
12
+ color: string;
13
+ };
14
+ type ChatSubmitStatus = 'ready' | 'queued' | 'generating' | 'canceling' | 'failed' | 'canceled' | 'not-found';
15
+ declare function messageStatusDisplay(status: MessageStatusValue): MessageStatusDisplay;
16
+ declare function promptStatusGenerating(status: ChatSubmitStatus | undefined): status is "queued" | "generating" | "canceling";
17
+ declare function promptStatusSymbol(status: ChatSubmitStatus | undefined, generating: boolean): "stop.fill" | "exclamationmark.arrow.triangle.2.circlepath" | "arrow.up";
18
+ declare function promptStatusLabel(status: ChatSubmitStatus | undefined, generating: boolean): "Stop generating" | "Send after failure" | "Send after cancellation" | "Send message";
19
+ //#endregion
20
+ //#region src/elements/shared.d.ts
21
+ type NativeStyle = ViewStyle & TextStyle;
22
+ //#endregion
23
+ //#region src/elements/blur-view.d.ts
24
+ type BlurIntensity = 'ultraThin' | 'thin' | 'regular' | 'thick' | 'chrome';
25
+ type BlurColorScheme = 'auto' | 'light' | 'dark';
26
+ type BlurViewProps = {
27
+ children?: ReactNode;
28
+ style?: StyleProp<NativeStyle>;
29
+ intensity?: BlurIntensity;
30
+ colorScheme?: BlurColorScheme;
31
+ };
32
+ declare const BlurView: _nativescript_react_native26.UIKitViewComponent<BlurViewProps, _nativescript_react_native26.UIKitContainerResult<UIVisualEffectView, UIView>>;
33
+ //#endregion
34
+ //#region src/elements/glass-shared.d.ts
35
+ type GlassStyle = 'regular' | 'clear' | 'none';
36
+ type GlassEffectStyleConfig = {
37
+ style: GlassStyle;
38
+ animate?: boolean;
39
+ animationDuration?: number;
40
+ };
41
+ type GlassVisualStyle = {
42
+ cornerRadius?: number;
43
+ borderWidth?: number;
44
+ borderColor?: ColorValue;
45
+ };
46
+ type GlassViewProps = {
47
+ children?: ReactNode;
48
+ style?: StyleProp<NativeStyle>;
49
+ glassStyle?: GlassVisualStyle;
50
+ glassEffectStyle?: GlassStyle | GlassEffectStyleConfig;
51
+ tintColor?: string;
52
+ isInteractive?: boolean;
53
+ };
54
+ type GlassContainerProps = {
55
+ children?: ReactNode;
56
+ style?: StyleProp<NativeStyle>;
57
+ glassStyle?: GlassVisualStyle;
58
+ spacing?: number;
59
+ };
60
+ //#endregion
61
+ //#region src/elements/glass-view.d.ts
62
+ declare const GlassView: _nativescript_react_native26.UIKitViewComponent<GlassViewProps, _nativescript_react_native26.UIKitContainerResult<UIVisualEffectView, UIView>>;
63
+ //#endregion
64
+ //#region src/elements/button.d.ts
65
+ type ButtonVariant = 'primary' | 'secondary' | 'plain';
66
+ type ButtonSize = 'small' | 'regular' | 'large';
67
+ type ButtonBaseProps = Omit<PressableProps, 'children' | 'disabled'> & {
68
+ label?: string;
69
+ icon?: ReactNode;
70
+ loading?: boolean;
71
+ disabled?: boolean;
72
+ size?: ButtonSize;
73
+ activeOpacity?: number;
74
+ labelStyle?: StyleProp<TextStyle>;
75
+ };
76
+ type ButtonProps = ButtonBaseProps & {
77
+ variant?: ButtonVariant;
78
+ };
79
+ type GlassButtonProps = ButtonBaseProps & Pick<GlassViewProps, 'glassEffectStyle' | 'tintColor'> & {
80
+ glassStyle?: GlassVisualStyle;
81
+ };
82
+ declare function Button({
83
+ accessibilityRole,
84
+ accessibilityState,
85
+ activeOpacity,
86
+ disabled,
87
+ icon,
88
+ label,
89
+ labelStyle,
90
+ loading,
91
+ size,
92
+ style,
93
+ variant,
94
+ ...props
95
+ }: ButtonProps): react4.JSX.Element;
96
+ declare function GlassButton({
97
+ accessibilityRole,
98
+ accessibilityState,
99
+ activeOpacity,
100
+ disabled,
101
+ glassEffectStyle,
102
+ glassStyle,
103
+ icon,
104
+ label,
105
+ labelStyle,
106
+ loading,
107
+ size,
108
+ style,
109
+ tintColor,
110
+ ...props
111
+ }: GlassButtonProps): react4.JSX.Element;
112
+ //#endregion
113
+ //#region src/elements/conversation.d.ts
114
+ type ConversationProps = ViewProps & {
115
+ followOutput?: boolean;
116
+ defaultFollowOutput?: boolean;
117
+ onFollowOutputChange?: (following: boolean) => void;
118
+ };
119
+ type ConversationContentProps<ItemT> = FlatListProps<ItemT>;
120
+ type ConversationEmptyStateProps = ViewProps & {
121
+ title?: string;
122
+ description?: string;
123
+ icon?: ReactNode;
124
+ titleStyle?: TextProps['style'];
125
+ descriptionStyle?: TextProps['style'];
126
+ };
127
+ type ConversationScrollButtonProps = Omit<PressableProps, 'onPress'> & {
128
+ accessibilityLabel?: string;
129
+ activeOpacity?: number;
130
+ onPress?: () => void;
131
+ };
132
+ type ConversationContextValue = {
133
+ followGeneration: number;
134
+ following: boolean;
135
+ isAtBottom: boolean;
136
+ updateAtBottom: (value: boolean) => void;
137
+ requestFollow: () => void;
138
+ };
139
+ declare function useConversation(): ConversationContextValue;
140
+ declare function Conversation({
141
+ children,
142
+ defaultFollowOutput,
143
+ followOutput,
144
+ onFollowOutputChange,
145
+ style,
146
+ ...props
147
+ }: ConversationProps): react4.JSX.Element;
148
+ declare function ConversationContent<ItemT>({
149
+ contentContainerStyle,
150
+ data,
151
+ keyboardShouldPersistTaps,
152
+ onContentSizeChange,
153
+ onScroll,
154
+ renderItem,
155
+ scrollEventThrottle,
156
+ ...props
157
+ }: ConversationContentProps<ItemT>): react4.JSX.Element;
158
+ declare function ConversationEmptyState({
159
+ children,
160
+ description,
161
+ descriptionStyle,
162
+ icon,
163
+ style,
164
+ title,
165
+ titleStyle,
166
+ ...props
167
+ }: ConversationEmptyStateProps): react4.JSX.Element;
168
+ declare function ConversationScrollButton({
169
+ accessibilityLabel,
170
+ activeOpacity,
171
+ children,
172
+ onPress,
173
+ style,
174
+ ...props
175
+ }: ConversationScrollButtonProps): react4.JSX.Element | null;
176
+ //#endregion
177
+ //#region src/elements/glass-container.d.ts
178
+ declare const GlassContainer: _nativescript_react_native26.UIKitViewComponent<GlassContainerProps, _nativescript_react_native26.UIKitContainerResult<UIVisualEffectView, UIView>>;
179
+ //#endregion
180
+ //#region src/elements/label.d.ts
181
+ type LabelTone = 'primary' | 'secondary' | 'tertiary';
182
+ type LabelProps = {
183
+ children?: ReactNode;
184
+ text?: string;
185
+ tone?: LabelTone;
186
+ numberOfLines?: number;
187
+ style?: StyleProp<NativeStyle>;
188
+ };
189
+ declare const Label: _nativescript_react_native26.UIKitViewComponent<LabelProps, UILabel>;
190
+ //#endregion
191
+ //#region src/elements/message.d.ts
192
+ type MessageProps = ViewProps & {
193
+ from?: 'user' | 'assistant';
194
+ };
195
+ type MessageContentProps = ViewProps;
196
+ type MessageTextProps = TextProps;
197
+ type MessageStatusProps = Omit<TextProps, 'children'> & {
198
+ status: MessageStatusValue;
199
+ label?: string;
200
+ showSymbol?: boolean;
201
+ };
202
+ type MessageActionsProps = ViewProps;
203
+ declare function Message({
204
+ children,
205
+ from,
206
+ style,
207
+ ...props
208
+ }: MessageProps): react4.JSX.Element;
209
+ declare function MessageContent({
210
+ children,
211
+ style,
212
+ ...props
213
+ }: MessageContentProps): react4.JSX.Element;
214
+ declare function MessageText({
215
+ style,
216
+ ...props
217
+ }: MessageTextProps): react4.JSX.Element;
218
+ declare function MessageStatus({
219
+ label,
220
+ showSymbol,
221
+ status,
222
+ style,
223
+ ...props
224
+ }: MessageStatusProps): react4.JSX.Element;
225
+ declare function MessageActions({
226
+ children,
227
+ style,
228
+ ...props
229
+ }: MessageActionsProps): react4.JSX.Element;
230
+ //#endregion
231
+ //#region src/elements/prompt-input.d.ts
232
+ type PromptInputMessage = {
233
+ text: string;
234
+ };
235
+ type PromptInputProps = ViewProps & {
236
+ defaultValue?: string;
237
+ disabled?: boolean;
238
+ onChangeText?: (text: string) => void;
239
+ onSubmit?: (message: PromptInputMessage) => void;
240
+ status?: ChatSubmitStatus;
241
+ value?: string;
242
+ };
243
+ type PromptInputBodyProps = ViewProps;
244
+ type PromptInputFooterProps = ViewProps;
245
+ type PromptInputHeaderProps = ViewProps;
246
+ type PromptInputToolsProps = ViewProps;
247
+ type PromptInputTextareaProps = Omit<TextInputProps, 'onSubmitEditing' | 'submitBehavior'> & {
248
+ onSubmitEditing?: (event: TextInputSubmitEditingEvent) => void;
249
+ submitOnEnter?: boolean;
250
+ };
251
+ type PromptInputSubmitProps = Omit<PressableProps, 'children' | 'onPress'> & {
252
+ activeOpacity?: number;
253
+ children?: ReactNode | ((state: {
254
+ generating: boolean;
255
+ }) => ReactNode);
256
+ generating?: boolean;
257
+ loading?: boolean;
258
+ onPress?: (message: PromptInputMessage) => void;
259
+ status?: ChatSubmitStatus;
260
+ };
261
+ type PromptInputContextValue = {
262
+ disabled: boolean;
263
+ generating: boolean;
264
+ setText: (text: string) => void;
265
+ status?: ChatSubmitStatus;
266
+ submit: () => void;
267
+ text: string;
268
+ };
269
+ declare function usePromptInput(): PromptInputContextValue;
270
+ declare function PromptInput({
271
+ children,
272
+ defaultValue,
273
+ disabled,
274
+ onChangeText,
275
+ onSubmit,
276
+ status,
277
+ style,
278
+ value,
279
+ ...props
280
+ }: PromptInputProps): react4.JSX.Element;
281
+ declare function PromptInputHeader({
282
+ children,
283
+ style,
284
+ ...props
285
+ }: PromptInputHeaderProps): react4.JSX.Element;
286
+ declare function PromptInputBody({
287
+ children,
288
+ style,
289
+ ...props
290
+ }: PromptInputBodyProps): react4.JSX.Element;
291
+ declare function PromptInputFooter({
292
+ children,
293
+ style,
294
+ ...props
295
+ }: PromptInputFooterProps): react4.JSX.Element;
296
+ declare function PromptInputTools({
297
+ children,
298
+ style,
299
+ ...props
300
+ }: PromptInputToolsProps): react4.JSX.Element;
301
+ declare function PromptInputTextarea({
302
+ multiline,
303
+ onChangeText,
304
+ onSubmitEditing,
305
+ placeholder,
306
+ placeholderTextColor,
307
+ returnKeyType,
308
+ style,
309
+ submitOnEnter,
310
+ value,
311
+ ...props
312
+ }: PromptInputTextareaProps): react4.JSX.Element;
313
+ declare function PromptInputSubmit({
314
+ accessibilityLabel,
315
+ accessibilityState,
316
+ activeOpacity,
317
+ children,
318
+ disabled: disabledProp,
319
+ generating,
320
+ loading,
321
+ onPress,
322
+ status,
323
+ style,
324
+ ...props
325
+ }: PromptInputSubmitProps): react4.JSX.Element;
326
+ //#endregion
327
+ //#region src/elements/symbol.d.ts
328
+ type SymbolName = string;
329
+ type SymbolWeight = 'ultraLight' | 'thin' | 'light' | 'regular' | 'medium' | 'semibold' | 'bold' | 'heavy' | 'black';
330
+ type SymbolScale = 'small' | 'medium' | 'large';
331
+ type SymbolProps = {
332
+ symbol: SymbolName;
333
+ size?: number;
334
+ weight?: SymbolWeight;
335
+ scale?: SymbolScale;
336
+ color?: ColorValue;
337
+ style?: StyleProp<NativeStyle>;
338
+ };
339
+ declare const SFSymbol: _nativescript_react_native26.UIKitViewComponent<SymbolProps, UIImageView>;
340
+ //#endregion
341
+ export { GlassEffectStyleConfig as $, MessageText as A, ConversationEmptyStateProps as B, MessageActions as C, MessageProps as D, MessageContentProps as E, GlassContainer as F, Button as G, ConversationScrollButton as H, Conversation as I, ButtonVariant as J, ButtonProps as K, ConversationContent as L, Label as M, LabelProps as N, MessageStatus as O, LabelTone as P, GlassContainerProps as Q, ConversationContentProps as R, Message as S, MessageContent as T, ConversationScrollButtonProps as U, ConversationProps as V, useConversation as W, GlassButtonProps as X, GlassButton as Y, GlassView as Z, PromptInputTextarea as _, SymbolWeight as a, BlurView as at, PromptInputToolsProps as b, PromptInputBodyProps as c, MessageRole as ct, PromptInputHeader as d, messageStatusDisplay as dt, GlassStyle as et, PromptInputHeaderProps as f, promptStatusGenerating as ft, PromptInputSubmitProps as g, PromptInputSubmit as h, SymbolScale as i, BlurIntensity as it, MessageTextProps as j, MessageStatusProps as k, PromptInputFooter as l, MessageStatusDisplay as lt, PromptInputProps as m, promptStatusSymbol as mt, SymbolName as n, GlassVisualStyle as nt, PromptInput as o, BlurViewProps as ot, PromptInputMessage as p, promptStatusLabel as pt, ButtonSize as q, SymbolProps as r, BlurColorScheme as rt, PromptInputBody as s, ChatSubmitStatus as st, SFSymbol as t, GlassViewProps as tt, PromptInputFooterProps as u, MessageStatusValue as ut, PromptInputTextareaProps as v, MessageActionsProps as w, usePromptInput as x, PromptInputTools as y, ConversationEmptyState as z };