@agimon-ai/po-native-dashboard 0.0.0-alpha.2

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 (59) hide show
  1. package/LICENSE +149 -0
  2. package/README.md +5 -0
  3. package/dist/components/ActivityPanel.d.mts +10 -0
  4. package/dist/components/ActivityPanel.d.mts.map +1 -0
  5. package/dist/components/ActivityPanel.mjs +50 -0
  6. package/dist/components/ActivityPanel.mjs.map +1 -0
  7. package/dist/components/CaptureTray.d.mts +12 -0
  8. package/dist/components/CaptureTray.d.mts.map +1 -0
  9. package/dist/components/CaptureTray.mjs +112 -0
  10. package/dist/components/CaptureTray.mjs.map +1 -0
  11. package/dist/components/CompletionSheet.d.mts +44 -0
  12. package/dist/components/CompletionSheet.d.mts.map +1 -0
  13. package/dist/components/CompletionSheet.mjs +390 -0
  14. package/dist/components/CompletionSheet.mjs.map +1 -0
  15. package/dist/components/Composer.d.mts +47 -0
  16. package/dist/components/Composer.d.mts.map +1 -0
  17. package/dist/components/Composer.mjs +449 -0
  18. package/dist/components/Composer.mjs.map +1 -0
  19. package/dist/components/DialogSheet.d.mts +23 -0
  20. package/dist/components/DialogSheet.d.mts.map +1 -0
  21. package/dist/components/DialogSheet.mjs +115 -0
  22. package/dist/components/DialogSheet.mjs.map +1 -0
  23. package/dist/components/MessageActionsSheet.d.mts +16 -0
  24. package/dist/components/MessageActionsSheet.d.mts.map +1 -0
  25. package/dist/components/MessageActionsSheet.mjs +26 -0
  26. package/dist/components/MessageActionsSheet.mjs.map +1 -0
  27. package/dist/components/MoveSessionSheet.d.mts +17 -0
  28. package/dist/components/MoveSessionSheet.d.mts.map +1 -0
  29. package/dist/components/MoveSessionSheet.mjs +145 -0
  30. package/dist/components/MoveSessionSheet.mjs.map +1 -0
  31. package/dist/components/SessionMenus.d.mts +76 -0
  32. package/dist/components/SessionMenus.d.mts.map +1 -0
  33. package/dist/components/SessionMenus.mjs +1187 -0
  34. package/dist/components/SessionMenus.mjs.map +1 -0
  35. package/dist/components/TimelineItem.d.mts +39 -0
  36. package/dist/components/TimelineItem.d.mts.map +1 -0
  37. package/dist/components/TimelineItem.mjs +278 -0
  38. package/dist/components/TimelineItem.mjs.map +1 -0
  39. package/dist/components/sessionGroups.mjs +20 -0
  40. package/dist/components/sessionGroups.mjs.map +1 -0
  41. package/dist/components/sessionTimeline.mjs +20 -0
  42. package/dist/components/sessionTimeline.mjs.map +1 -0
  43. package/dist/components/slotProps.d.mts +23 -0
  44. package/dist/components/slotProps.d.mts.map +1 -0
  45. package/dist/components/slotProps.mjs +68 -0
  46. package/dist/components/slotProps.mjs.map +1 -0
  47. package/dist/index.d.mts +13 -0
  48. package/dist/index.mjs +14 -0
  49. package/dist/screens/SessionScreen.d.mts +56 -0
  50. package/dist/screens/SessionScreen.d.mts.map +1 -0
  51. package/dist/screens/SessionScreen.mjs +551 -0
  52. package/dist/screens/SessionScreen.mjs.map +1 -0
  53. package/dist/screens/SessionsScreen.d.mts +47 -0
  54. package/dist/screens/SessionsScreen.d.mts.map +1 -0
  55. package/dist/screens/SessionsScreen.mjs +1436 -0
  56. package/dist/screens/SessionsScreen.mjs.map +1 -0
  57. package/dist/slotProps.d.mts +2 -0
  58. package/dist/slotProps.mjs +3 -0
  59. package/package.json +92 -0
@@ -0,0 +1,449 @@
1
+ import { CaptureTray } from "./CaptureTray.mjs";
2
+ import { CompletionButton, CompletionRows, CompletionSheet, useCompletionItems } from "./CompletionSheet.mjs";
3
+ import { PASTED_IMAGE_SOURCE, PICKED_IMAGE_SOURCE, uploadedFileContext } from "./slotProps.mjs";
4
+ import { View } from "react-native-unistyles/components/native/View";
5
+ import { Text } from "react-native-unistyles/components/native/Text";
6
+ import { Button, ChevronDownIcon, PlusIcon, SendIcon, StopIcon, Textarea, fontOf } from "@agimon-ai/po-native-components";
7
+ import { StyleSheet } from "react-native-unistyles";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ import { ScrollView } from "react-native-unistyles/components/native/ScrollView";
10
+ import { Pressable } from "react-native-unistyles/components/native/Pressable";
11
+ import { HOST_SLOTS, parseSelection, renderRegion, sessionStoreFor, slotFills, triggerTokenAt, useRenderTrace } from "@agimon-ai/po-web-dashboard/core";
12
+ import { useEffect, useMemo, useState } from "react";
13
+ import { useStore } from "@tanstack/react-store";
14
+ import { Store } from "@tanstack/store";
15
+ import { ContentType, addClipboardListener, getImageAsync, hasImageAsync } from "expo-clipboard";
16
+ import { getDocumentAsync } from "expo-document-picker";
17
+ import { File } from "expo-file-system";
18
+ import { launchImageLibraryAsync } from "expo-image-picker";
19
+ import { Alert } from "react-native";
20
+
21
+ //#region src/components/Composer.tsx
22
+ const PASTED_IMAGE_OPTIONS = {
23
+ format: "jpeg",
24
+ jpegQuality: .8
25
+ };
26
+ const MAX_CAPTURES = 4;
27
+ const MAX_UPLOAD_BYTES = 8388608;
28
+ const NO_CAPTURES = [];
29
+ const EMPTY_DRAFT_STORE = new Store({});
30
+ /** The draft with a picked item in place: commands and skills lead the message, files go where the caret is. */
31
+ function withCompletion(text, caret, kind, item) {
32
+ if (kind !== "file") {
33
+ const rest = text.replace(/^[/$]\S*\s*/u, "");
34
+ return {
35
+ text: `${item.insert}${rest}`,
36
+ caret: item.insert.length
37
+ };
38
+ }
39
+ const before = text.slice(0, caret);
40
+ const space = before === "" || /\s$/u.test(before) ? "" : " ";
41
+ return {
42
+ text: `${before}${space}${item.insert}${text.slice(caret)}`,
43
+ caret: before.length + space.length + item.insert.length
44
+ };
45
+ }
46
+ /** The text box, then the options button and Send in one row outside it. Context and cost sit in the options sheet. */
47
+ function Composer({ onSend, disabled = false, initialText = "", value, onChangeText, running: suppliedRunning = false, onAbort, mode: suppliedMode, onOpenOptions, completion: suppliedCompletion, draftStore, sessionId = "", live = false, searchFiles, uploadAttachment, slotProps, captures = NO_CAPTURES, onRemoveCapture, quiet }) {
48
+ useRenderTrace("Composer");
49
+ const [localText, setLocalText] = useState(initialText);
50
+ const storedText = useStore(draftStore ?? EMPTY_DRAFT_STORE, (state) => state[sessionId] ?? initialText);
51
+ const text = draftStore ? storedText : value ?? localText;
52
+ const setText = draftStore ? (next) => draftStore.setState((state) => state[sessionId] === next ? state : {
53
+ ...state,
54
+ [sessionId]: next
55
+ }) : onChangeText ?? setLocalText;
56
+ const store = sessionStoreFor(sessionId);
57
+ const liveRunning = useStore(store, (state) => live && state.streaming);
58
+ const liveMode = useStore(store, (state) => live ? parseSelection(state.statuses["po-major-mode"] ?? "").majorMode : void 0);
59
+ const commands = useStore(store, (state) => live ? state.commands : void 0);
60
+ const completion = useMemo(() => commands && searchFiles ? {
61
+ commands,
62
+ searchFiles
63
+ } : suppliedCompletion, [
64
+ commands,
65
+ searchFiles,
66
+ suppliedCompletion
67
+ ]);
68
+ const running = live ? liveRunning : suppliedRunning;
69
+ const mode = live ? liveMode : suppliedMode;
70
+ const [selection, setSelection] = useState();
71
+ const [sheetOpen, setSheetOpen] = useState(false);
72
+ const [focused, setFocused] = useState(false);
73
+ const [clipboardImage, setClipboardImage] = useState(false);
74
+ const [attachError, setAttachError] = useState();
75
+ const [attaching, setAttaching] = useState(false);
76
+ const attachCapture = slotProps?.attachComposerCapture;
77
+ const attachContext = slotProps?.attachComposerContext;
78
+ const canPaste = focused && attachCapture !== void 0;
79
+ useEffect(() => {
80
+ if (!canPaste) return;
81
+ let live = true;
82
+ hasImageAsync().then((has) => live && setClipboardImage(has), () => live && setClipboardImage(false));
83
+ const subscription = addClipboardListener(({ contentTypes }) => setClipboardImage(contentTypes.includes(ContentType.IMAGE)));
84
+ return () => {
85
+ live = false;
86
+ subscription.remove();
87
+ };
88
+ }, [canPaste]);
89
+ const pasteImage = (image) => {
90
+ if (!attachCapture) return;
91
+ if (!image) return setAttachError("Could not read the image. Copy it again, then paste.");
92
+ try {
93
+ attachCapture({
94
+ data: image.data.slice(image.data.indexOf(",") + 1),
95
+ mimeType: "image/jpeg",
96
+ context: {
97
+ kind: "image",
98
+ source: PASTED_IMAGE_SOURCE,
99
+ id: `paste-${Date.now()}`,
100
+ label: "Pasted image",
101
+ content: "An image pasted from the clipboard."
102
+ }
103
+ });
104
+ setAttachError(void 0);
105
+ } catch (error) {
106
+ setAttachError(error instanceof Error ? error.message : "Could not attach the image.");
107
+ }
108
+ };
109
+ const pickPhotos = async () => {
110
+ if (!attachCapture) return;
111
+ const result = await launchImageLibraryAsync({
112
+ mediaTypes: ["images"],
113
+ allowsMultipleSelection: true,
114
+ selectionLimit: MAX_CAPTURES - captures.length,
115
+ base64: true,
116
+ quality: .8
117
+ });
118
+ if (result.canceled) return;
119
+ result.assets.forEach((asset, index) => {
120
+ if (!asset.base64) throw new Error("Could not read the photo.");
121
+ attachCapture({
122
+ data: asset.base64,
123
+ mimeType: "image/jpeg",
124
+ context: {
125
+ kind: "image",
126
+ source: PICKED_IMAGE_SOURCE,
127
+ id: `photo-${Date.now()}-${index}`,
128
+ label: "Photo",
129
+ content: "An image attached from the photo library."
130
+ }
131
+ });
132
+ });
133
+ };
134
+ const pickFile = async () => {
135
+ if (!attachContext) return;
136
+ if (!uploadAttachment) throw new Error("Attaching files is not available here.");
137
+ const result = await getDocumentAsync({ copyToCacheDirectory: true });
138
+ if (result.canceled) return;
139
+ const [asset] = result.assets;
140
+ const file = new File(asset.uri);
141
+ if ((asset.size ?? file.size) > MAX_UPLOAD_BYTES) throw new Error("The file is over the 8 MB upload limit.");
142
+ const stored = await uploadAttachment(sessionId, {
143
+ name: asset.name,
144
+ mimeType: asset.mimeType || "application/octet-stream",
145
+ bytes: await file.bytes()
146
+ });
147
+ attachContext(uploadedFileContext(asset.name, stored));
148
+ };
149
+ const runAttach = (pick) => {
150
+ setAttaching(true);
151
+ setAttachError(void 0);
152
+ pick().catch((error) => setAttachError(error instanceof Error ? error.message : "Could not attach.")).finally(() => setAttaching(false));
153
+ };
154
+ const canAttach = Boolean(attachContext && sessionId && !disabled && !attaching);
155
+ const canAttachPhoto = Boolean(attachCapture && captures.length < MAX_CAPTURES);
156
+ const attachActions = canAttach ? [...canAttachPhoto ? [{
157
+ key: "attach-photo",
158
+ glyph: "+",
159
+ title: "Photo",
160
+ hint: "Attach one from your library",
161
+ onPress: () => runAttach(pickPhotos)
162
+ }] : [], {
163
+ key: "attach-file",
164
+ glyph: "+",
165
+ title: "Upload a file",
166
+ hint: "Send a file from this phone",
167
+ onPress: () => runAttach(pickFile)
168
+ }] : [];
169
+ const chooseAttachment = () => Alert.alert("Attach", void 0, [
170
+ ...canAttachPhoto ? [{
171
+ text: "Photo",
172
+ onPress: () => runAttach(pickPhotos)
173
+ }] : [],
174
+ {
175
+ text: "File",
176
+ onPress: () => runAttach(pickFile)
177
+ },
178
+ {
179
+ text: "Cancel",
180
+ style: "cancel"
181
+ }
182
+ ]);
183
+ const caret = Math.min(selection ?? text.length, text.length);
184
+ const trigger = completion ? triggerTokenAt(text, caret) : null;
185
+ const suggestions = useCompletionItems(completion, trigger?.kind ?? null, trigger?.query ?? "");
186
+ const accept = (item) => {
187
+ if (!trigger) return;
188
+ const next = `${text.slice(0, trigger.start)}${item.insert}${text.slice(caret)}`;
189
+ setText(next);
190
+ setSelection(trigger.start + item.insert.length);
191
+ };
192
+ const insert = (kind, item) => {
193
+ const next = withCompletion(text, caret, kind, item);
194
+ setText(next.text);
195
+ setSelection(next.caret);
196
+ };
197
+ const canSend = !disabled && text.trim().length > 0;
198
+ const send = () => {
199
+ if (!canSend) return;
200
+ if (onSend(text.trim()) === false) return;
201
+ setText("");
202
+ };
203
+ const dock = /* @__PURE__ */ jsxs(View, {
204
+ style: styles.dock,
205
+ children: [
206
+ trigger && suggestions && suggestions.length > 0 ? /* @__PURE__ */ jsx(ScrollView, {
207
+ style: styles.suggestions,
208
+ keyboardShouldPersistTaps: "handled",
209
+ children: /* @__PURE__ */ jsx(CompletionRows, {
210
+ items: suggestions,
211
+ onPick: accept
212
+ })
213
+ }) : null,
214
+ /* @__PURE__ */ jsx(CaptureTray, {
215
+ captures,
216
+ onPaste: canPaste && clipboardImage && captures.length < MAX_CAPTURES ? () => getImageAsync(PASTED_IMAGE_OPTIONS).then(pasteImage, () => setAttachError("Could not read the clipboard.")) : void 0,
217
+ onRemove: (capture) => onRemoveCapture?.(capture)
218
+ }),
219
+ attachError ? /* @__PURE__ */ jsx(Text, {
220
+ style: styles.attachError,
221
+ children: attachError
222
+ }) : null,
223
+ /* @__PURE__ */ jsxs(View, {
224
+ style: quiet ? styles.box : styles.plain,
225
+ children: [/* @__PURE__ */ jsx(Textarea, {
226
+ style: quiet ? styles.quietInput : styles.input,
227
+ value: text,
228
+ onChangeText: setText,
229
+ onSelectionChange: (event) => setSelection(event.nativeEvent.selection.end),
230
+ onFocus: () => setFocused(true),
231
+ onBlur: () => {
232
+ setFocused(false);
233
+ setAttachError(void 0);
234
+ },
235
+ placeholder: quiet ? running ? "Interrupt the run and respond…" : "Ask anything…" : running ? "Steer the run, or queue a reply..." : "Ask anything · / commands · $ skills · @ files",
236
+ accessibilityLabel: "Message",
237
+ disabled
238
+ }), /* @__PURE__ */ jsxs(View, {
239
+ style: styles.row,
240
+ children: [
241
+ !completion && attachContext && sessionId && !disabled ? /* @__PURE__ */ jsx(Pressable, {
242
+ accessibilityRole: "button",
243
+ accessibilityLabel: attaching ? "Attaching" : "Attach a photo or file",
244
+ accessibilityState: {
245
+ busy: attaching,
246
+ disabled: attaching
247
+ },
248
+ disabled: attaching,
249
+ onPress: chooseAttachment,
250
+ hitSlop: 6,
251
+ style: ({ pressed }) => [styles.attach, (pressed || attaching) && styles.pressed],
252
+ children: /* @__PURE__ */ jsx(PlusIcon, {
253
+ size: 16,
254
+ color: "green"
255
+ })
256
+ }) : null,
257
+ completion ? /* @__PURE__ */ jsx(CompletionButton, { onPress: () => setSheetOpen(true) }) : null,
258
+ onOpenOptions ? /* @__PURE__ */ jsxs(Pressable, {
259
+ accessibilityRole: "button",
260
+ accessibilityLabel: `Session options, ${mode ?? "mode"}`,
261
+ onPress: onOpenOptions,
262
+ style: ({ pressed }) => [styles.options, pressed && styles.pressed],
263
+ children: [/* @__PURE__ */ jsx(Text, {
264
+ style: styles.optionsText,
265
+ numberOfLines: 1,
266
+ children: mode || "Options"
267
+ }), /* @__PURE__ */ jsx(ChevronDownIcon, {
268
+ size: 12,
269
+ color: "green"
270
+ })]
271
+ }) : null,
272
+ /* @__PURE__ */ jsx(View, { style: styles.flex }),
273
+ slotProps ? slotFills(HOST_SLOTS.composerActions, slotProps.sessionId).map(({ pluginId, id, component: Action }) => Action ? /* @__PURE__ */ jsx(Action, { ...slotProps }, `${pluginId}:${id}`) : null) : null,
274
+ running && onAbort ? /* @__PURE__ */ jsx(Button, {
275
+ variant: "danger-outline",
276
+ size: "icon-md",
277
+ onPress: onAbort,
278
+ accessibilityLabel: "Abort the run",
279
+ children: /* @__PURE__ */ jsx(StopIcon, {
280
+ size: 16,
281
+ color: "red"
282
+ })
283
+ }) : null,
284
+ quiet ? /* @__PURE__ */ jsx(Button, {
285
+ variant: "primary",
286
+ size: "icon-md",
287
+ onPress: send,
288
+ disabled: !canSend,
289
+ accessibilityLabel: running ? "Steer" : "Send",
290
+ children: /* @__PURE__ */ jsx(SendIcon, {
291
+ size: 16,
292
+ color: "on-selected"
293
+ })
294
+ }) : /* @__PURE__ */ jsx(Button, {
295
+ variant: "primary",
296
+ size: "md",
297
+ onPress: send,
298
+ disabled: !canSend,
299
+ accessibilityLabel: running ? "Steer" : "Send",
300
+ children: /* @__PURE__ */ jsxs(View, {
301
+ style: styles.send,
302
+ children: [/* @__PURE__ */ jsx(SendIcon, {
303
+ size: 14,
304
+ color: "on-selected"
305
+ }), /* @__PURE__ */ jsx(Text, {
306
+ style: styles.sendText,
307
+ children: running ? "Steer" : "Send"
308
+ })]
309
+ })
310
+ })
311
+ ]
312
+ })]
313
+ }),
314
+ completion ? /* @__PURE__ */ jsx(CompletionSheet, {
315
+ open: sheetOpen,
316
+ onOpenChange: setSheetOpen,
317
+ source: completion,
318
+ onPick: insert,
319
+ slotProps,
320
+ actions: attachActions
321
+ }) : null
322
+ ]
323
+ });
324
+ return slotProps ? renderRegion(HOST_SLOTS.composerRegion, dock, slotProps, slotProps.sessionId) : dock;
325
+ }
326
+ const styles = StyleSheet.create((theme, rt) => {
327
+ const sans = fontOf(theme.fontFamily.sans);
328
+ return {
329
+ flex: { flex: 1 },
330
+ dock: {
331
+ gap: theme.spacing(2),
332
+ paddingHorizontal: theme.spacing(3),
333
+ paddingTop: theme.spacing(2),
334
+ paddingBottom: theme.spacing(2) + (rt.insets.ime > 0 ? 0 : rt.insets.bottom),
335
+ backgroundColor: theme.colors.bg,
336
+ uni__dependencies: [
337
+ 0,
338
+ 14,
339
+ 9
340
+ ]
341
+ },
342
+ input: {
343
+ minHeight: 48,
344
+ maxHeight: theme.spacing(32),
345
+ paddingHorizontal: theme.spacing(4),
346
+ paddingVertical: theme.spacing(3),
347
+ borderRadius: 22,
348
+ borderWidth: 1,
349
+ borderColor: theme.colors.border,
350
+ backgroundColor: "transparent",
351
+ color: theme.colors.text,
352
+ fontSize: theme.fontSize.lg,
353
+ lineHeight: theme.lineHeight.lg,
354
+ uni__dependencies: [0]
355
+ },
356
+ plain: {
357
+ gap: theme.spacing(2),
358
+ uni__dependencies: [0]
359
+ },
360
+ box: {
361
+ gap: theme.spacing(1),
362
+ paddingHorizontal: theme.spacing(3),
363
+ paddingTop: theme.spacing(1),
364
+ paddingBottom: theme.spacing(2),
365
+ borderRadius: 22,
366
+ borderWidth: 1,
367
+ borderColor: theme.colors.border,
368
+ uni__dependencies: [0]
369
+ },
370
+ quietInput: {
371
+ minHeight: 44,
372
+ maxHeight: theme.spacing(32),
373
+ paddingHorizontal: theme.spacing(1),
374
+ paddingVertical: theme.spacing(2),
375
+ borderWidth: 0,
376
+ backgroundColor: "transparent",
377
+ color: theme.colors.text,
378
+ fontSize: theme.fontSize.lg,
379
+ lineHeight: theme.lineHeight.lg,
380
+ uni__dependencies: [0]
381
+ },
382
+ suggestions: {
383
+ maxHeight: 224,
384
+ flexGrow: 0
385
+ },
386
+ row: {
387
+ flexDirection: "row",
388
+ alignItems: "center",
389
+ gap: theme.spacing(2),
390
+ uni__dependencies: [0]
391
+ },
392
+ options: {
393
+ flexDirection: "row",
394
+ alignItems: "center",
395
+ gap: theme.spacing(1.5),
396
+ height: 32,
397
+ maxWidth: 170,
398
+ flexShrink: 1,
399
+ paddingHorizontal: theme.spacing(3),
400
+ borderRadius: 16,
401
+ backgroundColor: theme.colors["tint-green"],
402
+ uni__dependencies: [0]
403
+ },
404
+ pressed: { opacity: .7 },
405
+ attach: {
406
+ width: 32,
407
+ height: 32,
408
+ borderRadius: 16,
409
+ alignItems: "center",
410
+ justifyContent: "center",
411
+ backgroundColor: theme.colors["tint-green"],
412
+ uni__dependencies: [0]
413
+ },
414
+ optionsText: {
415
+ fontFamily: sans,
416
+ fontSize: theme.fontSize.base,
417
+ lineHeight: theme.lineHeight.base,
418
+ fontWeight: theme.fontWeight.semibold,
419
+ color: theme.colors.green,
420
+ flexShrink: 1,
421
+ uni__dependencies: [0]
422
+ },
423
+ attachError: {
424
+ fontFamily: sans,
425
+ fontSize: theme.fontSize.sm,
426
+ lineHeight: theme.lineHeight.sm,
427
+ color: theme.colors.red,
428
+ uni__dependencies: [0]
429
+ },
430
+ send: {
431
+ flexDirection: "row",
432
+ alignItems: "center",
433
+ gap: theme.spacing(1.5),
434
+ uni__dependencies: [0]
435
+ },
436
+ sendText: {
437
+ fontFamily: sans,
438
+ fontSize: theme.fontSize.base,
439
+ lineHeight: theme.lineHeight.base,
440
+ fontWeight: theme.fontWeight.semibold,
441
+ color: theme.colors["on-selected"],
442
+ uni__dependencies: [0]
443
+ }
444
+ };
445
+ });
446
+
447
+ //#endregion
448
+ export { Composer };
449
+ //# sourceMappingURL=Composer.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Composer.mjs","names":["ComposerCapture","WebPluginSlotProps","Button","ChevronDownIcon","fontOf","PlusIcon","SendIcon","StopIcon","Textarea","CompletionItem","CompletionKind","HOST_SLOTS","renderRegion","slotFills","triggerTokenAt","sessionStoreFor","parseSelection","useRenderTrace","useStore","Store","addClipboardListener","ContentType","GetImageOptions","getImageAsync","hasImageAsync","getDocumentAsync","File","launchImageLibraryAsync","useEffect","useMemo","useState","Alert","StyleSheet","CaptureTray","CompletionButton","CompletionRows","CompletionSheet","CompletionSource","useCompletionItems","PASTED_IMAGE_SOURCE","PICKED_IMAGE_SOURCE","uploadedFileContext","PASTED_IMAGE_OPTIONS","format","jpegQuality","MAX_CAPTURES","MAX_UPLOAD_BYTES","NO_CAPTURES","EMPTY_DRAFT_STORE","Record","ComposerProps","onSend","text","disabled","initialText","value","onChangeText","draftStore","sessionId","live","searchFiles","query","Promise","uploadAttachment","file","name","mimeType","bytes","Uint8Array","ArrayBuffer","path","size","running","onAbort","mode","onOpenOptions","completion","slotProps","captures","onRemoveCapture","capture","quiet","withCompletion","caret","kind","item","rest","replace","insert","length","before","slice","space","test","Composer","suppliedRunning","suppliedMode","suppliedCompletion","localText","setLocalText","storedText","state","setText","next","setState","store","liveRunning","streaming","liveMode","statuses","majorMode","undefined","commands","selection","setSelection","sheetOpen","setSheetOpen","focused","setFocused","clipboardImage","setClipboardImage","attachError","setAttachError","attaching","setAttaching","attachCapture","attachComposerCapture","attachContext","attachComposerContext","canPaste","then","has","subscription","contentTypes","includes","IMAGE","remove","pasteImage","image","data","indexOf","context","source","id","Date","now","label","content","error","Error","message","pickPhotos","result","mediaTypes","allowsMultipleSelection","selectionLimit","base64","quality","canceled","assets","forEach","asset","index","pickFile","copyToCacheDirectory","uri","stored","runAttach","pick","catch","finally","canAttach","Boolean","canAttachPhoto","attachActions","key","glyph","title","hint","onPress","chooseAttachment","alert","style","const","Math","min","trigger","suggestions","accept","start","canSend","trim","send","dock","styles","box","plain","quietInput","input","event","nativeEvent","end","row","busy","pressed","attach","options","optionsText","flex","composerActions","map","pluginId","component","Action","sendText","composerRegion","create","theme","rt","sans","fontFamily","gap","spacing","paddingHorizontal","paddingTop","paddingBottom","insets","ime","bottom","backgroundColor","colors","bg","uni__dependencies","minHeight","maxHeight","paddingVertical","borderRadius","borderWidth","borderColor","border","color","fontSize","lg","lineHeight","flexGrow","flexDirection","alignItems","height","maxWidth","flexShrink","opacity","width","justifyContent","base","fontWeight","semibold","green","sm","red"],"sources":["../../src/components/Composer.tsx"],"sourcesContent":["import type { ComposerCapture, WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport {\n Button,\n ChevronDownIcon,\n fontOf,\n PlusIcon,\n SendIcon,\n StopIcon,\n Textarea,\n} from '@agimon-ai/po-native-components';\nimport {\n type CompletionItem,\n type CompletionKind,\n HOST_SLOTS,\n renderRegion,\n slotFills,\n triggerTokenAt,\n sessionStoreFor,\n parseSelection,\n useRenderTrace,\n} from '@agimon-ai/po-web-dashboard/core';\nimport { useStore } from '@tanstack/react-store';\nimport { Store } from '@tanstack/store';\nimport { addClipboardListener, ContentType, type GetImageOptions, getImageAsync, hasImageAsync } from 'expo-clipboard';\nimport { getDocumentAsync } from 'expo-document-picker';\nimport { File } from 'expo-file-system';\nimport { launchImageLibraryAsync } from 'expo-image-picker';\nimport { useEffect, useMemo, useState } from 'react';\nimport { Alert, Pressable, ScrollView, Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { CaptureTray } from './CaptureTray';\nimport {\n CompletionButton,\n CompletionRows,\n CompletionSheet,\n type CompletionSource,\n useCompletionItems,\n} from './CompletionSheet';\nimport { PASTED_IMAGE_SOURCE, PICKED_IMAGE_SOURCE, uploadedFileContext } from './slotProps';\n\n// JPEG keeps a pasted photo well under the 10 MB image limit; screenshots stay readable.\nconst PASTED_IMAGE_OPTIONS: GetImageOptions = { format: 'jpeg', jpegQuality: 0.8 };\n// ponytail: the attachment budget (stageNativeCapture) fits four images with no other context; the error covers less.\nconst MAX_CAPTURES = 4;\n// The host's upload limit; checked before reading so a huge file never loads into memory.\nconst MAX_UPLOAD_BYTES = 8 * 1024 * 1024;\nconst NO_CAPTURES: readonly ComposerCapture[] = [];\nconst EMPTY_DRAFT_STORE = new Store<Record<string, string>>({});\nexport interface ComposerProps {\n /** Returning false means it was not sent, so the draft stays. */\n onSend: (text: string) => boolean | void;\n disabled?: boolean;\n initialText?: string;\n /** A session host may retain the draft while a prompt temporarily replaces this composer. */\n value?: string;\n onChangeText?: (text: string) => void;\n draftStore?: Store<Record<string, string>>;\n sessionId?: string;\n /** Runtime controls subscribe here, outside the navigator and transcript. */\n live?: boolean;\n searchFiles?: (query: string) => Promise<string[]>;\n /** Stores a picked file on the host and returns its path; without it the File option reports it is unavailable. */\n uploadAttachment?: (\n sessionId: string,\n file: { name: string; mimeType: string; bytes: Uint8Array<ArrayBuffer> },\n ) => Promise<{ path: string; mimeType: string; size: number }>;\n /** A run is in progress: Send steers it and Abort stops it. */\n running?: boolean;\n onAbort?: () => void;\n /** The current major mode, shown on the options button. */\n mode?: string;\n onOpenOptions?: () => void;\n /** Offers `@` files, `$` skills and `/` commands while typing and from the insert button. */\n completion?: CompletionSource;\n /** The session's plugin props, so plugin pages can join the insert sheet. */\n slotProps?: WebPluginSlotProps;\n /** Images staged for the next message, shown as thumbnails above the text box. */\n captures?: readonly ComposerCapture[];\n onRemoveCapture?: (capture: ComposerCapture) => void;\n /** One outlined box holding the text and its controls, with an icon Send; absent keeps the default layout. */\n quiet?: boolean;\n}\n\n/** The draft with a picked item in place: commands and skills lead the message, files go where the caret is. */\nfunction withCompletion(text: string, caret: number, kind: CompletionKind, item: CompletionItem) {\n if (kind !== 'file') {\n const rest = text.replace(/^[/$]\\S*\\s*/u, '');\n return { text: `${item.insert}${rest}`, caret: item.insert.length };\n }\n const before = text.slice(0, caret);\n const space = before === '' || /\\s$/u.test(before) ? '' : ' ';\n return {\n text: `${before}${space}${item.insert}${text.slice(caret)}`,\n caret: before.length + space.length + item.insert.length,\n };\n}\n\n/** The text box, then the options button and Send in one row outside it. Context and cost sit in the options sheet. */\nexport function Composer({\n onSend,\n disabled = false,\n initialText = '',\n value,\n onChangeText,\n running: suppliedRunning = false,\n onAbort,\n mode: suppliedMode,\n onOpenOptions,\n completion: suppliedCompletion,\n draftStore,\n sessionId = '',\n live = false,\n searchFiles,\n uploadAttachment,\n slotProps,\n captures = NO_CAPTURES,\n onRemoveCapture,\n quiet,\n}: ComposerProps) {\n useRenderTrace('Composer');\n const [localText, setLocalText] = useState(initialText);\n const storedText = useStore(draftStore ?? EMPTY_DRAFT_STORE, (state) => state[sessionId] ?? initialText);\n const text = draftStore ? storedText : (value ?? localText);\n const setText = draftStore\n ? (next: string) =>\n draftStore.setState((state) => (state[sessionId] === next ? state : { ...state, [sessionId]: next }))\n : (onChangeText ?? setLocalText);\n const store = sessionStoreFor(sessionId);\n const liveRunning = useStore(store, (state) => live && state.streaming);\n const liveMode = useStore(store, (state) =>\n live ? parseSelection(state.statuses['po-major-mode'] ?? '').majorMode : undefined,\n );\n const commands = useStore(store, (state) => (live ? state.commands : undefined));\n const completion = useMemo(\n () => (commands && searchFiles ? { commands, searchFiles } : suppliedCompletion),\n [commands, searchFiles, suppliedCompletion],\n );\n const running = live ? liveRunning : suppliedRunning;\n const mode = live ? liveMode : suppliedMode;\n const [selection, setSelection] = useState<number>();\n const [sheetOpen, setSheetOpen] = useState(false);\n const [focused, setFocused] = useState(false);\n const [clipboardImage, setClipboardImage] = useState(false);\n const [attachError, setAttachError] = useState<string>();\n const [attaching, setAttaching] = useState(false);\n const attachCapture = slotProps?.attachComposerCapture;\n const attachContext = slotProps?.attachComposerContext;\n const canPaste = focused && attachCapture !== undefined;\n // The Paste tile shows only while typing, and only when the clipboard holds an image.\n useEffect(() => {\n if (!canPaste) return;\n let live = true;\n hasImageAsync().then(\n (has) => live && setClipboardImage(has),\n // An unreadable clipboard offers nothing to paste, so hide the chip.\n () => live && setClipboardImage(false),\n );\n const subscription = addClipboardListener(({ contentTypes }) =>\n setClipboardImage(contentTypes.includes(ContentType.IMAGE)),\n );\n return () => {\n live = false;\n subscription.remove();\n };\n }, [canPaste]);\n const pasteImage = (image: { data: string } | null) => {\n if (!attachCapture) return;\n // iOS silently refuses an old copy (or a declined prompt); a fresh copy reads fine.\n if (!image) return setAttachError('Could not read the image. Copy it again, then paste.');\n try {\n attachCapture({\n data: image.data.slice(image.data.indexOf(',') + 1),\n mimeType: 'image/jpeg',\n context: {\n kind: 'image',\n source: PASTED_IMAGE_SOURCE,\n id: `paste-${Date.now()}`,\n label: 'Pasted image',\n content: 'An image pasted from the clipboard.',\n },\n });\n setAttachError(undefined);\n } catch (error) {\n setAttachError(error instanceof Error ? error.message : 'Could not attach the image.');\n }\n };\n // Photos ride along as images; base64 always comes back as JPEG, even for HEIC originals.\n const pickPhotos = async () => {\n if (!attachCapture) return;\n const result = await launchImageLibraryAsync({\n mediaTypes: ['images'],\n allowsMultipleSelection: true,\n selectionLimit: MAX_CAPTURES - captures.length,\n base64: true,\n quality: 0.8,\n });\n if (result.canceled) return;\n result.assets.forEach((asset, index) => {\n if (!asset.base64) throw new Error('Could not read the photo.');\n attachCapture({\n data: asset.base64,\n mimeType: 'image/jpeg',\n context: {\n kind: 'image',\n source: PICKED_IMAGE_SOURCE,\n id: `photo-${Date.now()}-${index}`,\n label: 'Photo',\n content: 'An image attached from the photo library.',\n },\n });\n });\n };\n // Other files are stored on the host, as on web, and the message carries their path.\n const pickFile = async () => {\n if (!attachContext) return;\n if (!uploadAttachment) throw new Error('Attaching files is not available here.');\n const result = await getDocumentAsync({ copyToCacheDirectory: true });\n if (result.canceled) return;\n const [asset] = result.assets;\n const file = new File(asset.uri);\n if ((asset.size ?? file.size) > MAX_UPLOAD_BYTES) throw new Error('The file is over the 8 MB upload limit.');\n const stored = await uploadAttachment(sessionId, {\n name: asset.name,\n mimeType: asset.mimeType || 'application/octet-stream',\n bytes: await file.bytes(),\n });\n attachContext(uploadedFileContext(asset.name, stored));\n };\n const runAttach = (pick: () => Promise<void>) => {\n setAttaching(true);\n setAttachError(undefined);\n pick()\n .catch((error: unknown) => setAttachError(error instanceof Error ? error.message : 'Could not attach.'))\n .finally(() => setAttaching(false));\n };\n const canAttach = Boolean(attachContext && sessionId && !disabled && !attaching);\n const canAttachPhoto = Boolean(attachCapture && captures.length < MAX_CAPTURES);\n // The Insert sheet carries these rows; the alert is the fallback when a session offers no completions.\n const attachActions = canAttach\n ? [\n ...(canAttachPhoto\n ? [\n {\n key: 'attach-photo',\n glyph: '+',\n title: 'Photo',\n hint: 'Attach one from your library',\n onPress: () => runAttach(pickPhotos),\n },\n ]\n : []),\n {\n key: 'attach-file',\n glyph: '+',\n title: 'Upload a file',\n hint: 'Send a file from this phone',\n onPress: () => runAttach(pickFile),\n },\n ]\n : [];\n const chooseAttachment = () =>\n Alert.alert('Attach', undefined, [\n ...(canAttachPhoto ? [{ text: 'Photo', onPress: () => runAttach(pickPhotos) }] : []),\n { text: 'File', onPress: () => runAttach(pickFile) },\n { text: 'Cancel', style: 'cancel' as const },\n ]);\n const caret = Math.min(selection ?? text.length, text.length);\n const trigger = completion ? triggerTokenAt(text, caret) : null;\n const suggestions = useCompletionItems(completion, trigger?.kind ?? null, trigger?.query ?? '');\n const accept = (item: CompletionItem) => {\n if (!trigger) return;\n const next = `${text.slice(0, trigger.start)}${item.insert}${text.slice(caret)}`;\n setText(next);\n setSelection(trigger.start + item.insert.length);\n };\n const insert = (kind: CompletionKind, item: CompletionItem) => {\n const next = withCompletion(text, caret, kind, item);\n setText(next.text);\n setSelection(next.caret);\n };\n const canSend = !disabled && text.trim().length > 0;\n const send = () => {\n if (!canSend) return;\n if (onSend(text.trim()) === false) return;\n setText('');\n };\n const dock = (\n <View style={styles.dock}>\n {trigger && suggestions && suggestions.length > 0 ? (\n <ScrollView style={styles.suggestions} keyboardShouldPersistTaps=\"handled\">\n <CompletionRows items={suggestions} onPick={accept} />\n </ScrollView>\n ) : null}\n {/* ponytail: iOS asks \"Allow Paste\" on each tap. expo-clipboard's ClipboardPasteButton (UIPasteControl)\n skips the prompt but rendered blank on the iOS 26.5 simulator; try it again on a device. */}\n <CaptureTray\n captures={captures}\n onPaste={\n canPaste && clipboardImage && captures.length < MAX_CAPTURES\n ? () =>\n getImageAsync(PASTED_IMAGE_OPTIONS).then(pasteImage, () =>\n setAttachError('Could not read the clipboard.'),\n )\n : undefined\n }\n onRemove={(capture) => onRemoveCapture?.(capture)}\n />\n {attachError ? <Text style={styles.attachError}>{attachError}</Text> : null}\n <View style={quiet ? styles.box : styles.plain}>\n <Textarea\n style={quiet ? styles.quietInput : styles.input}\n value={text}\n onChangeText={setText}\n onSelectionChange={(event) => setSelection(event.nativeEvent.selection.end)}\n onFocus={() => setFocused(true)}\n onBlur={() => {\n setFocused(false);\n setAttachError(undefined);\n }}\n placeholder={\n quiet\n ? running\n ? 'Interrupt the run and respond…'\n : 'Ask anything…'\n : running\n ? 'Steer the run, or queue a reply...'\n : 'Ask anything · / commands · $ skills · @ files'\n }\n accessibilityLabel=\"Message\"\n disabled={disabled}\n />\n <View style={styles.row}>\n {!completion && attachContext && sessionId && !disabled ? (\n <Pressable\n accessibilityRole=\"button\"\n accessibilityLabel={attaching ? 'Attaching' : 'Attach a photo or file'}\n accessibilityState={{ busy: attaching, disabled: attaching }}\n disabled={attaching}\n onPress={chooseAttachment}\n hitSlop={6}\n style={({ pressed }) => [styles.attach, (pressed || attaching) && styles.pressed]}\n >\n <PlusIcon size={16} color=\"green\" />\n </Pressable>\n ) : null}\n {completion ? <CompletionButton onPress={() => setSheetOpen(true)} /> : null}\n {onOpenOptions ? (\n <Pressable\n accessibilityRole=\"button\"\n accessibilityLabel={`Session options, ${mode ?? 'mode'}`}\n onPress={onOpenOptions}\n style={({ pressed }) => [styles.options, pressed && styles.pressed]}\n >\n <Text style={styles.optionsText} numberOfLines={1}>\n {mode || 'Options'}\n </Text>\n <ChevronDownIcon size={12} color=\"green\" />\n </Pressable>\n ) : null}\n <View style={styles.flex} />\n {/* Plugin actions, such as voice dictation, sit beside Send. */}\n {slotProps\n ? slotFills(HOST_SLOTS.composerActions, slotProps.sessionId).map(({ pluginId, id, component: Action }) =>\n Action ? <Action key={`${pluginId}:${id}`} {...slotProps} /> : null,\n )\n : null}\n {/* An icon, so Abort and Steer both fit beside the meter and dictation on a phone. */}\n {running && onAbort ? (\n <Button variant=\"danger-outline\" size=\"icon-md\" onPress={onAbort} accessibilityLabel=\"Abort the run\">\n <StopIcon size={16} color=\"red\" />\n </Button>\n ) : null}\n {quiet ? (\n <Button\n variant=\"primary\"\n size=\"icon-md\"\n onPress={send}\n disabled={!canSend}\n accessibilityLabel={running ? 'Steer' : 'Send'}\n >\n <SendIcon size={16} color=\"on-selected\" />\n </Button>\n ) : (\n <Button\n variant=\"primary\"\n size=\"md\"\n onPress={send}\n disabled={!canSend}\n accessibilityLabel={running ? 'Steer' : 'Send'}\n >\n <View style={styles.send}>\n <SendIcon size={14} color=\"on-selected\" />\n <Text style={styles.sendText}>{running ? 'Steer' : 'Send'}</Text>\n </View>\n </Button>\n )}\n </View>\n </View>\n {completion ? (\n <CompletionSheet\n open={sheetOpen}\n onOpenChange={setSheetOpen}\n source={completion}\n onPick={insert}\n slotProps={slotProps}\n actions={attachActions}\n />\n ) : null}\n </View>\n );\n // A person's own package may wrap the composer on the phone as in the cockpit.\n return slotProps ? renderRegion(HOST_SLOTS.composerRegion, dock, slotProps, slotProps.sessionId) : dock;\n}\n\nconst styles = StyleSheet.create((theme, rt) => {\n const sans = fontOf(theme.fontFamily.sans);\n return {\n flex: { flex: 1 },\n dock: {\n gap: theme.spacing(2),\n paddingHorizontal: theme.spacing(3),\n paddingTop: theme.spacing(2),\n // Clears the home indicator; the keyboard covers that edge while it is open.\n paddingBottom: theme.spacing(2) + (rt.insets.ime > 0 ? 0 : rt.insets.bottom),\n backgroundColor: theme.colors.bg,\n },\n input: {\n minHeight: 48,\n maxHeight: theme.spacing(32),\n paddingHorizontal: theme.spacing(4),\n paddingVertical: theme.spacing(3),\n // Like the cockpit composer: an outline, no fill.\n borderRadius: 22,\n borderWidth: 1,\n borderColor: theme.colors.border,\n backgroundColor: 'transparent',\n color: theme.colors.text,\n fontSize: theme.fontSize.lg,\n lineHeight: theme.lineHeight.lg,\n },\n plain: { gap: theme.spacing(2) },\n box: {\n gap: theme.spacing(1),\n paddingHorizontal: theme.spacing(3),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(2),\n borderRadius: 22,\n borderWidth: 1,\n borderColor: theme.colors.border,\n },\n quietInput: {\n minHeight: 44,\n maxHeight: theme.spacing(32),\n paddingHorizontal: theme.spacing(1),\n paddingVertical: theme.spacing(2),\n borderWidth: 0,\n backgroundColor: 'transparent',\n color: theme.colors.text,\n fontSize: theme.fontSize.lg,\n lineHeight: theme.lineHeight.lg,\n },\n suggestions: { maxHeight: 4 * 56, flexGrow: 0 },\n row: { flexDirection: 'row', alignItems: 'center', gap: theme.spacing(2) },\n options: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: theme.spacing(1.5),\n height: 32,\n maxWidth: 170,\n flexShrink: 1,\n paddingHorizontal: theme.spacing(3),\n borderRadius: 16,\n backgroundColor: theme.colors['tint-green'],\n },\n pressed: { opacity: 0.7 },\n attach: {\n width: 32,\n height: 32,\n borderRadius: 16,\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: theme.colors['tint-green'],\n },\n optionsText: {\n fontFamily: sans,\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeight.base,\n fontWeight: theme.fontWeight.semibold,\n color: theme.colors.green,\n flexShrink: 1,\n },\n attachError: {\n fontFamily: sans,\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n color: theme.colors.red,\n },\n send: { flexDirection: 'row', alignItems: 'center', gap: theme.spacing(1.5) },\n sendText: {\n fontFamily: sans,\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeight.base,\n fontWeight: theme.fontWeight.semibold,\n color: theme.colors['on-selected'],\n },\n };\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0CA,MAAM0C,uBAAwC;CAAEC,QAAQ;CAAQC,aAAa;AAAI;AAEjF,MAAMC,eAAe;AAErB,MAAMC,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AAA;EAAC;EACzE1B,SAAS;GACPuC,eAAe;GACfC,YAAY;GACZzB,KAAKJ,MAAMK,QAAQ,GAAG;GACtByB,QAAQ;GACRC,UAAU;GACVC,YAAY;GACZ1B,mBAAmBN,MAAMK,QAAQ,CAAC;GAClCc,cAAc;GACdP,iBAAiBZ,MAAMa,OAAO;GAAaE,mBAAA,CAAA,CAAA;EAC7C;EACA5B,SAAS,EAAE8C,SAAS,GAAI;EACxB7C,QAAQ;GACN8C,OAAO;GACPJ,QAAQ;GACRX,cAAc;GACdU,YAAY;GACZM,gBAAgB;GAChBvB,iBAAiBZ,MAAMa,OAAO;GAAaE,mBAAA,CAAA,CAAA;EAC7C;EACAzB,aAAa;GACXa,YAAYD;GACZsB,UAAUxB,MAAMwB,SAASY;GACzBV,YAAY1B,MAAM0B,WAAWU;GAC7BC,YAAYrC,MAAMqC,WAAWC;GAC7Bf,OAAOvB,MAAMa,OAAO0B;GACpBP,YAAY;GAACjB,mBAAA,CAAA,CAAA;EACf;EACA/G,aAAa;GACXmG,YAAYD;GACZsB,UAAUxB,MAAMwB,SAASgB;GACzBd,YAAY1B,MAAM0B,WAAWc;GAC7BjB,OAAOvB,MAAMa,OAAO4B;GAAG1B,mBAAA,CAAA,CAAA;EACzB;EACAxC,MAAM;GAAEqD,eAAe;GAAOC,YAAY;GAAUzB,KAAKJ,MAAMK,QAAQ,GAAG;GAACU,mBAAA,CAAA,CAAA;EAAC;EAC5ElB,UAAU;GACRM,YAAYD;GACZsB,UAAUxB,MAAMwB,SAASY;GACzBV,YAAY1B,MAAM0B,WAAWU;GAC7BC,YAAYrC,MAAMqC,WAAWC;GAC7Bf,OAAOvB,MAAMa,OAAO;GAAcE,mBAAA,CAAA,CAAA;EACpC;CACF;AACF,CAAC"}
@@ -0,0 +1,23 @@
1
+ //#region src/components/DialogSheet.d.ts
2
+ export interface DialogAsk {
3
+ id: string;
4
+ method?: 'select' | 'confirm' | 'input' | 'editor';
5
+ title: string;
6
+ body?: string;
7
+ placeholder?: string;
8
+ options: readonly {
9
+ id: string;
10
+ label: string;
11
+ }[];
12
+ }
13
+ export interface DialogSheetProps {
14
+ ask: DialogAsk;
15
+ value?: string;
16
+ onChangeValue?: (value: string) => void;
17
+ onAnswer: (askId: string, value: string) => void;
18
+ onCancel?: (askId: string) => void;
19
+ }
20
+ /** A question from Po for you: the panel surface with a rose edge. */
21
+ export declare function DialogSheet({ ask, value, onChangeValue, onAnswer, onCancel }: DialogSheetProps): import("react").JSX.Element;
22
+ //#endregion
23
+ //# sourceMappingURL=DialogSheet.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DialogSheet.d.mts","names":[],"sources":["../../src/components/DialogSheet.tsx"],"mappings":";iBAIiB;EACf;EACA;EACA;EACA;EACA;EACA;IAAoB;IAAY;;;iBAGjB;EACf,KAAK;EACL;EACA,iBAAiB;EACjB,WAAW,eAAe;EAC1B,YAAY;;;wBAIE,cAAc,KAAK,OAAY,eAAe,UAAU,YAAY,mCAAgB,IAAA"}
@@ -0,0 +1,115 @@
1
+ import { View } from "react-native-unistyles/components/native/View";
2
+ import { Text } from "react-native-unistyles/components/native/Text";
3
+ import { Button, Input, Panel, Textarea, fontOf } from "@agimon-ai/po-native-components";
4
+ import { StyleSheet } from "react-native-unistyles";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { ScrollView } from "react-native-unistyles/components/native/ScrollView";
7
+
8
+ //#region src/components/DialogSheet.tsx
9
+ /** A question from Po for you: the panel surface with a rose edge. */
10
+ function DialogSheet({ ask, value = "", onChangeValue, onAnswer, onCancel }) {
11
+ const method = ask.method ?? "select";
12
+ const textInput = method === "input" || method === "editor";
13
+ const submit = () => onAnswer(ask.id, value);
14
+ return /* @__PURE__ */ jsxs(Panel, {
15
+ style: styles.sheet,
16
+ children: [/* @__PURE__ */ jsxs(ScrollView, {
17
+ style: styles.scroll,
18
+ contentContainerStyle: styles.content,
19
+ keyboardShouldPersistTaps: "handled",
20
+ children: [
21
+ /* @__PURE__ */ jsx(Text, {
22
+ style: styles.title,
23
+ accessibilityRole: "header",
24
+ children: ask.title
25
+ }),
26
+ ask.body ? /* @__PURE__ */ jsx(Text, {
27
+ style: styles.body,
28
+ children: ask.body
29
+ }) : null,
30
+ textInput ? method === "editor" ? /* @__PURE__ */ jsx(Textarea, {
31
+ value,
32
+ onChangeText: onChangeValue,
33
+ accessibilityLabel: ask.title,
34
+ placeholder: ask.placeholder,
35
+ rows: 4
36
+ }) : /* @__PURE__ */ jsx(Input, {
37
+ value,
38
+ onChangeText: onChangeValue,
39
+ accessibilityLabel: ask.title,
40
+ placeholder: ask.placeholder,
41
+ onSubmitEditing: submit
42
+ }) : /* @__PURE__ */ jsx(View, {
43
+ style: styles.options,
44
+ children: ask.options.map((option) => /* @__PURE__ */ jsx(Button, {
45
+ variant: "outline",
46
+ size: "card",
47
+ onPress: () => onAnswer(ask.id, option.id),
48
+ accessibilityLabel: option.label,
49
+ children: option.label
50
+ }, option.id))
51
+ })
52
+ ]
53
+ }), onCancel || textInput ? /* @__PURE__ */ jsxs(View, {
54
+ style: styles.actions,
55
+ children: [onCancel ? /* @__PURE__ */ jsx(Button, {
56
+ variant: "ghost",
57
+ onPress: () => onCancel(ask.id),
58
+ children: "Cancel"
59
+ }) : null, textInput ? /* @__PURE__ */ jsx(Button, {
60
+ variant: "outline",
61
+ onPress: submit,
62
+ children: "Send reply"
63
+ }) : null]
64
+ }) : null]
65
+ });
66
+ }
67
+ const styles = StyleSheet.create((theme) => ({
68
+ sheet: {
69
+ flexShrink: 1,
70
+ margin: theme.spacing(3),
71
+ padding: theme.spacing(4),
72
+ gap: theme.spacing(3),
73
+ borderRadius: theme.borderRadius.lg,
74
+ borderWidth: 1,
75
+ borderColor: theme.colors["edge-magenta"],
76
+ uni__dependencies: [0]
77
+ },
78
+ title: {
79
+ color: theme.colors.hi,
80
+ fontFamily: fontOf(theme.fontFamily.sans),
81
+ fontWeight: theme.fontWeight.semibold,
82
+ fontSize: theme.fontSize.lg,
83
+ lineHeight: theme.lineHeight.lg,
84
+ uni__dependencies: [0]
85
+ },
86
+ body: {
87
+ color: theme.colors.text,
88
+ fontFamily: fontOf(theme.fontFamily.sans),
89
+ fontSize: theme.fontSize.base,
90
+ lineHeight: theme.lineHeight.base,
91
+ uni__dependencies: [0]
92
+ },
93
+ scroll: {
94
+ flexGrow: 0,
95
+ flexShrink: 1
96
+ },
97
+ content: {
98
+ gap: theme.spacing(3),
99
+ uni__dependencies: [0]
100
+ },
101
+ options: {
102
+ gap: theme.spacing(2),
103
+ uni__dependencies: [0]
104
+ },
105
+ actions: {
106
+ flexDirection: "row",
107
+ flexWrap: "wrap",
108
+ gap: theme.spacing(2),
109
+ uni__dependencies: [0]
110
+ }
111
+ }));
112
+
113
+ //#endregion
114
+ export { DialogSheet };
115
+ //# sourceMappingURL=DialogSheet.mjs.map