@agimon-ai/po-native-components 0.0.0-alpha.23 → 0.0.0-alpha.24
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/components/AgentAvatar.d.mts +14 -0
- package/dist/components/AgentAvatar.d.mts.map +1 -0
- package/dist/components/AgentAvatar.mjs +87 -0
- package/dist/components/AgentAvatar.mjs.map +1 -0
- package/dist/components/Badge.d.mts +1 -1
- package/dist/components/Badge.mjs +1 -1
- package/dist/components/Button.mjs +1 -1
- package/dist/components/CodeBlock.mjs +1 -1
- package/dist/components/Dialog.mjs +3 -3
- package/dist/components/Dot.d.mts +1 -1
- package/dist/components/Dot.mjs +2 -2
- package/dist/components/DropdownMenu.mjs +1 -1
- package/dist/components/HashlineLines.mjs +1 -1
- package/dist/components/Input.mjs +1 -1
- package/dist/components/Label.mjs +1 -1
- package/dist/components/List.mjs +1 -1
- package/dist/components/Markdown.mjs +1 -1
- package/dist/components/MessageItem.mjs +1 -1
- package/dist/components/SectionLabel.mjs +1 -1
- package/dist/components/Sheet.mjs +1 -1
- package/dist/components/SheetFrame.mjs +1 -1
- package/dist/components/Spinner.d.mts +1 -1
- package/dist/components/StatusBadge.d.mts +1 -1
- package/dist/components/SyntaxLine.mjs +1 -1
- package/dist/components/Tabs.mjs +1 -1
- package/dist/components/ToolPathLink.mjs +1 -1
- package/dist/icons/icons.d.mts +1 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +3 -2
- package/package.json +4 -4
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/components/AgentAvatar.d.ts
|
|
2
|
+
/** How an agent is doing, as the avatar's corner dot shows it. */
|
|
3
|
+
export type AgentState = 'running' | 'waiting' | 'done' | 'failed';
|
|
4
|
+
/** One letter for a first name, two for a hyphenated agent name (`po-developer` is PD). */
|
|
5
|
+
export declare function agentInitials(name: string): string;
|
|
6
|
+
/** An agent's face: its initials on a tint fixed by `seed`, with its state as a corner dot. */
|
|
7
|
+
export declare function AgentAvatar({ name, seed, state, size }: {
|
|
8
|
+
name: string;
|
|
9
|
+
seed?: string;
|
|
10
|
+
state?: AgentState;
|
|
11
|
+
size?: 'sm' | 'md';
|
|
12
|
+
}): import("react").JSX.Element;
|
|
13
|
+
//#endregion
|
|
14
|
+
//# sourceMappingURL=AgentAvatar.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentAvatar.d.mts","names":[],"sources":["../../src/components/AgentAvatar.tsx"],"mappings":";;YAQY;;wBAGI,cAAc;;wBA6Bd,cACd,MACA,MACA,OACA;EAEA;EACA;EACA,QAAQ;EACR;oBACD,IAAA"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { fontOf } from "../lib/fonts.mjs";
|
|
2
|
+
import { Dot } from "./Dot.mjs";
|
|
3
|
+
import { View } from "react-native-unistyles/components/native/View";
|
|
4
|
+
import { Text } from "react-native-unistyles/components/native/Text";
|
|
5
|
+
import { StyleSheet } from "react-native-unistyles";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/components/AgentAvatar.tsx
|
|
9
|
+
/** One letter for a first name, two for a hyphenated agent name (`po-developer` is PD). */
|
|
10
|
+
function agentInitials(name) {
|
|
11
|
+
return name.split(/[-_.\s]+/u).filter(Boolean).slice(0, 2).map((part) => part.charAt(0).toUpperCase()).join("");
|
|
12
|
+
}
|
|
13
|
+
const TINTS = [
|
|
14
|
+
"green",
|
|
15
|
+
"teal",
|
|
16
|
+
"blue",
|
|
17
|
+
"cyan",
|
|
18
|
+
"yellow",
|
|
19
|
+
"violet"
|
|
20
|
+
];
|
|
21
|
+
function tintFor(seed) {
|
|
22
|
+
let hash = 0;
|
|
23
|
+
for (const char of seed) hash = (hash * 31 + char.charCodeAt(0)) % 997;
|
|
24
|
+
return TINTS[hash % TINTS.length] ?? "green";
|
|
25
|
+
}
|
|
26
|
+
const RING = 2;
|
|
27
|
+
const STATE_DOT = {
|
|
28
|
+
running: "green",
|
|
29
|
+
waiting: "yellow",
|
|
30
|
+
done: "neutral",
|
|
31
|
+
failed: "red"
|
|
32
|
+
};
|
|
33
|
+
/** An agent's face: its initials on a tint fixed by `seed`, with its state as a corner dot. */
|
|
34
|
+
function AgentAvatar({ name, seed = name, state, size = "md" }) {
|
|
35
|
+
return /* @__PURE__ */ jsxs(View, {
|
|
36
|
+
accessible: true,
|
|
37
|
+
accessibilityRole: "image",
|
|
38
|
+
accessibilityLabel: state ? `${name}, ${state}` : name,
|
|
39
|
+
testID: "agent-avatar",
|
|
40
|
+
style: styles.frame,
|
|
41
|
+
children: [/* @__PURE__ */ jsx(View, {
|
|
42
|
+
style: styles.face(tintFor(seed), size === "sm" ? 24 : 32),
|
|
43
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
44
|
+
style: styles.initials,
|
|
45
|
+
children: agentInitials(name)
|
|
46
|
+
})
|
|
47
|
+
}), state ? /* @__PURE__ */ jsx(Dot, {
|
|
48
|
+
tone: STATE_DOT[state],
|
|
49
|
+
size: "md",
|
|
50
|
+
pulse: state === "running",
|
|
51
|
+
style: styles.dot
|
|
52
|
+
}) : null]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
const styles = StyleSheet.create((theme) => ({
|
|
56
|
+
frame: { flexShrink: 0 },
|
|
57
|
+
face: (tint, side) => ({
|
|
58
|
+
width: side,
|
|
59
|
+
height: side,
|
|
60
|
+
alignItems: "center",
|
|
61
|
+
justifyContent: "center",
|
|
62
|
+
borderRadius: theme.borderRadius.full,
|
|
63
|
+
backgroundColor: theme.colors[`tint-${tint}`],
|
|
64
|
+
uni__dependencies: [0]
|
|
65
|
+
}),
|
|
66
|
+
initials: {
|
|
67
|
+
fontFamily: fontOf(theme.fontFamily.sans),
|
|
68
|
+
fontSize: theme.fontSize.sm,
|
|
69
|
+
lineHeight: theme.lineHeight.sm,
|
|
70
|
+
color: theme.colors.hi,
|
|
71
|
+
uni__dependencies: [0]
|
|
72
|
+
},
|
|
73
|
+
dot: {
|
|
74
|
+
position: "absolute",
|
|
75
|
+
right: -4,
|
|
76
|
+
bottom: -4,
|
|
77
|
+
width: theme.spacing(2) + 4,
|
|
78
|
+
height: theme.spacing(2) + 4,
|
|
79
|
+
borderWidth: RING,
|
|
80
|
+
borderColor: theme.colors.panel,
|
|
81
|
+
uni__dependencies: [0]
|
|
82
|
+
}
|
|
83
|
+
}));
|
|
84
|
+
|
|
85
|
+
//#endregion
|
|
86
|
+
export { AgentAvatar, agentInitials };
|
|
87
|
+
//# sourceMappingURL=AgentAvatar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentAvatar.mjs","names":["DotTone","StyleSheet","fontOf","Dot","AgentState","agentInitials","name","split","filter","Boolean","slice","map","part","charAt","toUpperCase","join","TINTS","const","Tint","tintFor","seed","hash","char","charCodeAt","length","RING","STATE_DOT","Readonly","Record","running","waiting","done","failed","AgentAvatar","state","size","styles","frame","face","initials","dot","create","theme","flexShrink","tint","side","width","height","alignItems","justifyContent","borderRadius","full","backgroundColor","colors","uni__dependencies","fontFamily","sans","fontSize","sm","lineHeight","color","hi","position","right","bottom","spacing","borderWidth","borderColor","panel"],"sources":["../../src/components/AgentAvatar.tsx"],"sourcesContent":["import type { DotTone } from '@agimon-ai/po-web-components/nativeTheme';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { fontOf } from '../lib/fonts';\nimport { Dot } from './Dot';\n\n/** How an agent is doing, as the avatar's corner dot shows it. */\nexport type AgentState = 'running' | 'waiting' | 'done' | 'failed';\n\n/** One letter for a first name, two for a hyphenated agent name (`po-developer` is PD). */\nexport function agentInitials(name: string): string {\n return name\n .split(/[-_.\\s]+/u)\n .filter(Boolean)\n .slice(0, 2)\n .map((part) => part.charAt(0).toUpperCase())\n .join('');\n}\n\n// ponytail: mirrors po-web-components AgentAvatar's tint hash; keep the two in step so a seed reads the same tint.\nconst TINTS = ['green', 'teal', 'blue', 'cyan', 'yellow', 'violet'] as const;\ntype Tint = (typeof TINTS)[number];\n\nfunction tintFor(seed: string): Tint {\n let hash = 0;\n for (const char of seed) hash = (hash * 31 + char.charCodeAt(0)) % 997;\n return TINTS[hash % TINTS.length] ?? 'green';\n}\n\nconst RING = 2;\n\nconst STATE_DOT: Readonly<Record<AgentState, DotTone>> = {\n running: 'green',\n waiting: 'yellow',\n done: 'neutral',\n failed: 'red',\n};\n\n/** An agent's face: its initials on a tint fixed by `seed`, with its state as a corner dot. */\nexport function AgentAvatar({\n name,\n seed = name,\n state,\n size = 'md',\n}: {\n name: string;\n seed?: string;\n state?: AgentState;\n size?: 'sm' | 'md';\n}) {\n return (\n <View\n accessible\n accessibilityRole=\"image\"\n accessibilityLabel={state ? `${name}, ${state}` : name}\n testID=\"agent-avatar\"\n style={styles.frame}\n >\n <View style={styles.face(tintFor(seed), size === 'sm' ? 24 : 32)}>\n <Text style={styles.initials}>{agentInitials(name)}</Text>\n </View>\n {state ? <Dot tone={STATE_DOT[state]} size=\"md\" pulse={state === 'running'} style={styles.dot} /> : null}\n </View>\n );\n}\n\nconst styles = StyleSheet.create((theme) => ({\n frame: { flexShrink: 0 },\n // `size-6` and `size-8`.\n face: (tint: Tint, side: number) => ({\n width: side,\n height: side,\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: theme.borderRadius.full,\n backgroundColor: theme.colors[`tint-${tint}`],\n }),\n initials: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n color: theme.colors.hi,\n },\n // `-right-0.5 -bottom-0.5 ring-2 ring-po-panel`: a ring sits outside the dot, a border inside, so the box grows by it.\n dot: {\n position: 'absolute',\n right: -2 - RING,\n bottom: -2 - RING,\n width: theme.spacing(2) + 2 * RING,\n height: theme.spacing(2) + 2 * RING,\n borderWidth: RING,\n borderColor: theme.colors.panel,\n },\n}));\n"],"mappings":";;;;;;;;;AAWA,SAAgBK,cAAcC,MAAsB;CAClD,OAAOA,KACJC,MAAM,WAAW,CAAC,CAClBC,OAAOC,OAAO,CAAC,CACfC,MAAM,GAAG,CAAC,CAAC,CACXC,KAAKC,SAASA,KAAKC,OAAO,CAAC,CAAC,CAACC,YAAY,CAAC,CAAC,CAC3CC,KAAK,EAAE;AACZ;AAGA,MAAMC,QAAQ;CAAC;CAAS;CAAQ;CAAQ;CAAQ;CAAU;AAAQ;AAGlE,SAASG,QAAQC,MAAoB;CACnC,IAAIC,OAAO;CACX,KAAK,MAAMC,QAAQF,MAAMC,QAAQA,OAAO,KAAKC,KAAKC,WAAW,CAAC,KAAK;CACnE,OAAOP,MAAMK,OAAOL,MAAMQ,WAAW;AACvC;AAEA,MAAMC,OAAO;AAEb,MAAMC,YAAmD;CACvDG,SAAS;CACTC,SAAS;CACTC,MAAM;CACNC,QAAQ;AACV;;AAGA,SAAgBC,YAAY,EAC1B3B,MACAc,OAAOd,MACP4B,OACAC,OAAO,QAMN;CACD,OACE,qBAAC,MAAD;EACE;EACA,mBAAkB;EAClB,oBAAoBD,QAAQ,GAAG5B,KAAI,IAAK4B,UAAU5B;EAClD,QAAO;EACP,OAAO8B,OAAOC;YALhB,CAOE,oBAAC,MAAD;GAAM,OAAOD,OAAOE,KAAKnB,QAAQC,IAAI,GAAGe,SAAS,OAAO,KAAK,EAAE;aAC7D,oBAAC,MAAD;IAAM,OAAOC,OAAOG;cAAWlC,cAAcC,IAAI;GAAQ;EACrD,IACL4B,QAAQ,oBAAC,KAAD;GAAK,MAAMR,UAAUQ;GAAQ,MAAK;GAAK,OAAOA,UAAU;GAAW,OAAOE,OAAOI;EAAI,KAAM,IAChG;;AAEV;AAEA,MAAMJ,SAASnC,WAAWwC,QAAQC,WAAW;CAC3CL,OAAO,EAAEM,YAAY,EAAE;CAEvBL,OAAOM,MAAYC,UAAkB;EACnCC,OAAOD;EACPE,QAAQF;EACRG,YAAY;EACZC,gBAAgB;EAChBC,cAAcR,MAAMQ,aAAaC;EACjCC,iBAAiBV,MAAMW,OAAO,QAAQT;EAAOU,mBAAA,CAAA,CAAA;CAC/C;CACAf,UAAU;EACRgB,YAAYrD,OAAOwC,MAAMa,WAAWC,IAAI;EACxCC,UAAUf,MAAMe,SAASC;EACzBC,YAAYjB,MAAMiB,WAAWD;EAC7BE,OAAOlB,MAAMW,OAAOQ;EAAEP,mBAAA,CAAA,CAAA;CACxB;CAEAd,KAAK;EACHsB,UAAU;EACVC,OAAO;EACPC,QAAQ;EACRlB,OAAOJ,MAAMuB,QAAQ,CAAC,IAAI;EAC1BlB,QAAQL,MAAMuB,QAAQ,CAAC,IAAI;EAC3BC,aAAazC;EACb0C,aAAazB,MAAMW,OAAOe;EAAKd,mBAAA,CAAA,CAAA;CACjC;AACF,EAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ChipTone } from "@agimon-ai/po-web-components/nativeTheme";
|
|
2
1
|
import { StyleProp, ViewProps, ViewStyle } from "react-native";
|
|
2
|
+
import { ChipTone } from "@agimon-ai/po-web-components/nativeTheme";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
//#region src/components/Badge.d.ts
|
|
5
5
|
export type BadgeTone = ChipTone;
|
|
@@ -2,8 +2,8 @@ import { fontOf } from "../lib/fonts.mjs";
|
|
|
2
2
|
import { CHIP_INK } from "../lib/tone.mjs";
|
|
3
3
|
import { wrapText } from "../lib/wrapText.mjs";
|
|
4
4
|
import { View } from "react-native-unistyles/components/native/View";
|
|
5
|
-
import { withAlpha } from "@agimon-ai/po-web-components/nativeTheme";
|
|
6
5
|
import { StyleSheet, useUnistyles } from "react-native-unistyles";
|
|
6
|
+
import { withAlpha } from "@agimon-ai/po-web-components/nativeTheme";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
|
|
9
9
|
//#region src/components/Badge.tsx
|
|
@@ -3,8 +3,8 @@ import { wrapText } from "../lib/wrapText.mjs";
|
|
|
3
3
|
import { IconColorContext } from "../icons/IconColorContext.mjs";
|
|
4
4
|
import { impactLight } from "../lib/haptics.mjs";
|
|
5
5
|
import { Spinner } from "./Spinner.mjs";
|
|
6
|
-
import { withAlpha } from "@agimon-ai/po-web-components/nativeTheme";
|
|
7
6
|
import { StyleSheet, useUnistyles } from "react-native-unistyles";
|
|
7
|
+
import { withAlpha } from "@agimon-ai/po-web-components/nativeTheme";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { Pressable } from "react-native-unistyles/components/native/Pressable";
|
|
10
10
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { fontOf } from "../lib/fonts.mjs";
|
|
2
2
|
import { CopyButton } from "./CopyButton.mjs";
|
|
3
3
|
import { View } from "react-native-unistyles/components/native/View";
|
|
4
|
-
import { StyleSheet } from "react-native-unistyles";
|
|
5
4
|
import { Text } from "react-native-unistyles/components/native/Text";
|
|
5
|
+
import { StyleSheet } from "react-native-unistyles";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { ScrollView } from "react-native-unistyles/components/native/ScrollView";
|
|
8
8
|
|
|
@@ -4,14 +4,14 @@ import { Button } from "./Button.mjs";
|
|
|
4
4
|
import { CloseIcon } from "../icons/icons.mjs";
|
|
5
5
|
import { useControllable } from "../lib/useControllable.mjs";
|
|
6
6
|
import { View } from "react-native-unistyles/components/native/View";
|
|
7
|
-
import {
|
|
7
|
+
import { Text } from "react-native-unistyles/components/native/Text";
|
|
8
8
|
import { StyleSheet, useUnistyles } from "react-native-unistyles";
|
|
9
9
|
import { Easing, Modal, Platform } from "react-native";
|
|
10
|
-
import {
|
|
10
|
+
import { Animated } from "react-native-unistyles/components/native/Animated";
|
|
11
|
+
import { withAlpha } from "@agimon-ai/po-web-components/nativeTheme";
|
|
11
12
|
import { createContext, useContext, useEffect, useRef } from "react";
|
|
12
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
14
|
import { Pressable } from "react-native-unistyles/components/native/Pressable";
|
|
14
|
-
import { Animated } from "react-native-unistyles/components/native/Animated";
|
|
15
15
|
|
|
16
16
|
//#region src/components/Dialog.tsx
|
|
17
17
|
/** `bg-po-deep/70`. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DotTone } from "@agimon-ai/po-web-components/nativeTheme";
|
|
2
1
|
import { StyleProp, ViewStyle } from "react-native";
|
|
2
|
+
import { DotTone } from "@agimon-ai/po-web-components/nativeTheme";
|
|
3
3
|
//#region src/components/Dot.d.ts
|
|
4
4
|
type DotTone$1 = DotTone;
|
|
5
5
|
export type DotSize = 'xs' | 'sm' | 'md' | 'lg';
|
package/dist/components/Dot.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { withAlpha } from "@agimon-ai/po-web-components/nativeTheme";
|
|
2
1
|
import { StyleSheet, useUnistyles } from "react-native-unistyles";
|
|
2
|
+
import { Animated } from "react-native-unistyles/components/native/Animated";
|
|
3
|
+
import { withAlpha } from "@agimon-ai/po-web-components/nativeTheme";
|
|
3
4
|
import { useEffect, useRef } from "react";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { Animated } from "react-native-unistyles/components/native/Animated";
|
|
6
6
|
|
|
7
7
|
//#region src/components/Dot.tsx
|
|
8
8
|
/** `bg-po-faint/40`: a thing that exists but is not live. */
|
|
@@ -6,8 +6,8 @@ import { CheckIcon } from "../icons/icons.mjs";
|
|
|
6
6
|
import { useControllable } from "../lib/useControllable.mjs";
|
|
7
7
|
import { SheetFrame } from "./SheetFrame.mjs";
|
|
8
8
|
import { View } from "react-native-unistyles/components/native/View";
|
|
9
|
-
import { StyleSheet } from "react-native-unistyles";
|
|
10
9
|
import { Text } from "react-native-unistyles/components/native/Text";
|
|
10
|
+
import { StyleSheet } from "react-native-unistyles";
|
|
11
11
|
import { createContext, useContext } from "react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { Pressable } from "react-native-unistyles/components/native/Pressable";
|
|
@@ -2,8 +2,8 @@ import { fontOf } from "../lib/fonts.mjs";
|
|
|
2
2
|
import { SyntaxLine } from "./SyntaxLine.mjs";
|
|
3
3
|
import { detectGrammar, hashlineGroups, hashlineGroupsKey, highlightToLines } from "@agimon-ai/po-web-components/text";
|
|
4
4
|
import { View } from "react-native-unistyles/components/native/View";
|
|
5
|
-
import { StyleSheet } from "react-native-unistyles";
|
|
6
5
|
import { Text } from "react-native-unistyles/components/native/Text";
|
|
6
|
+
import { StyleSheet } from "react-native-unistyles";
|
|
7
7
|
import { useEffect, useMemo, useState } from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { fontOf } from "../lib/fonts.mjs";
|
|
2
2
|
import { useInsideSheet } from "../lib/insideSheet.mjs";
|
|
3
|
-
import { withAlpha } from "@agimon-ai/po-web-components/nativeTheme";
|
|
4
3
|
import { StyleSheet, useUnistyles, withUnistyles } from "react-native-unistyles";
|
|
4
|
+
import { withAlpha } from "@agimon-ai/po-web-components/nativeTheme";
|
|
5
5
|
import { useState } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { BottomSheetTextInput } from "@gorhom/bottom-sheet";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fontOf } from "../lib/fonts.mjs";
|
|
2
|
-
import { StyleSheet } from "react-native-unistyles";
|
|
3
2
|
import { Text } from "react-native-unistyles/components/native/Text";
|
|
3
|
+
import { StyleSheet } from "react-native-unistyles";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/Label.tsx
|
package/dist/components/List.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { fontOf } from "../lib/fonts.mjs";
|
|
2
2
|
import { ChevronRightIcon } from "../icons/icons.mjs";
|
|
3
3
|
import { View } from "react-native-unistyles/components/native/View";
|
|
4
|
+
import { Text } from "react-native-unistyles/components/native/Text";
|
|
4
5
|
import { StyleSheet } from "react-native-unistyles";
|
|
5
6
|
import { Platform } from "react-native";
|
|
6
|
-
import { Text } from "react-native-unistyles/components/native/Text";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { Pressable } from "react-native-unistyles/components/native/Pressable";
|
|
9
9
|
import { FlashList } from "@shopify/flash-list";
|
|
@@ -2,9 +2,9 @@ import { fontOf } from "../lib/fonts.mjs";
|
|
|
2
2
|
import { CodeBlock } from "./CodeBlock.mjs";
|
|
3
3
|
import { parseMarkdown } from "../lib/markdown.mjs";
|
|
4
4
|
import { View } from "react-native-unistyles/components/native/View";
|
|
5
|
+
import { Text } from "react-native-unistyles/components/native/Text";
|
|
5
6
|
import { StyleSheet } from "react-native-unistyles";
|
|
6
7
|
import { Linking } from "react-native";
|
|
7
|
-
import { Text } from "react-native-unistyles/components/native/Text";
|
|
8
8
|
import { createContext, useContext, useEffect, useMemo, useState } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { ScrollView } from "react-native-unistyles/components/native/ScrollView";
|
|
@@ -7,8 +7,8 @@ import { AlertIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, WrenchIcon } f
|
|
|
7
7
|
import { useControllable } from "../lib/useControllable.mjs";
|
|
8
8
|
import { STATUS_EDGE, StatusBadge } from "./StatusBadge.mjs";
|
|
9
9
|
import { View } from "react-native-unistyles/components/native/View";
|
|
10
|
-
import { StyleSheet } from "react-native-unistyles";
|
|
11
10
|
import { Text } from "react-native-unistyles/components/native/Text";
|
|
11
|
+
import { StyleSheet } from "react-native-unistyles";
|
|
12
12
|
import { createContext, useContext } from "react";
|
|
13
13
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { Pressable } from "react-native-unistyles/components/native/Pressable";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fontOf } from "../lib/fonts.mjs";
|
|
2
|
-
import { StyleSheet } from "react-native-unistyles";
|
|
3
2
|
import { Text } from "react-native-unistyles/components/native/Text";
|
|
3
|
+
import { StyleSheet } from "react-native-unistyles";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/SectionLabel.tsx
|
|
@@ -5,8 +5,8 @@ import { CloseIcon } from "../icons/icons.mjs";
|
|
|
5
5
|
import { useControllable } from "../lib/useControllable.mjs";
|
|
6
6
|
import { SheetFrame } from "./SheetFrame.mjs";
|
|
7
7
|
import { View } from "react-native-unistyles/components/native/View";
|
|
8
|
-
import { StyleSheet } from "react-native-unistyles";
|
|
9
8
|
import { Text } from "react-native-unistyles/components/native/Text";
|
|
9
|
+
import { StyleSheet } from "react-native-unistyles";
|
|
10
10
|
import { createContext, useContext } from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InsideSheetContext } from "../lib/insideSheet.mjs";
|
|
2
|
-
import { withAlpha } from "@agimon-ai/po-web-components/nativeTheme";
|
|
3
2
|
import { StyleSheet, useUnistyles } from "react-native-unistyles";
|
|
4
3
|
import { BackHandler } from "react-native";
|
|
4
|
+
import { withAlpha } from "@agimon-ai/po-web-components/nativeTheme";
|
|
5
5
|
import { useCallback, useContext, useEffect, useRef } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { BottomSheetBackdrop, BottomSheetModal, BottomSheetScrollView } from "@gorhom/bottom-sheet";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NativeColorToken } from "@agimon-ai/po-web-components/nativeTheme";
|
|
2
1
|
import { StyleProp, ViewStyle } from "react-native";
|
|
2
|
+
import { NativeColorToken } from "@agimon-ai/po-web-components/nativeTheme";
|
|
3
3
|
//#region src/components/Spinner.d.ts
|
|
4
4
|
export interface SpinnerProps {
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NativeColorToken, StatusTone } from "@agimon-ai/po-web-components/nativeTheme";
|
|
2
1
|
import { StyleProp, ViewProps, ViewStyle } from "react-native";
|
|
2
|
+
import { NativeColorToken, StatusTone } from "@agimon-ai/po-web-components/nativeTheme";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
//#region src/components/StatusBadge.d.ts
|
|
5
5
|
type StatusTone$1 = StatusTone;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { detectGrammar, highlightToLines } from "@agimon-ai/po-web-components/text";
|
|
2
|
-
import { StyleSheet } from "react-native-unistyles";
|
|
3
2
|
import { Text } from "react-native-unistyles/components/native/Text";
|
|
3
|
+
import { StyleSheet } from "react-native-unistyles";
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
|
package/dist/components/Tabs.mjs
CHANGED
|
@@ -3,8 +3,8 @@ import { wrapText } from "../lib/wrapText.mjs";
|
|
|
3
3
|
import { selectionTick } from "../lib/haptics.mjs";
|
|
4
4
|
import { useControllable } from "../lib/useControllable.mjs";
|
|
5
5
|
import { View } from "react-native-unistyles/components/native/View";
|
|
6
|
-
import { StyleSheet } from "react-native-unistyles";
|
|
7
6
|
import { Text } from "react-native-unistyles/components/native/Text";
|
|
7
|
+
import { StyleSheet } from "react-native-unistyles";
|
|
8
8
|
import { createContext, useContext } from "react";
|
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
|
10
10
|
import { Pressable } from "react-native-unistyles/components/native/Pressable";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fontOf } from "../lib/fonts.mjs";
|
|
2
|
-
import { StyleSheet } from "react-native-unistyles";
|
|
3
2
|
import { Text } from "react-native-unistyles/components/native/Text";
|
|
3
|
+
import { StyleSheet } from "react-native-unistyles";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/ToolPathLink.tsx
|
package/dist/icons/icons.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NativeColorToken } from "@agimon-ai/po-web-components/nativeTheme";
|
|
2
1
|
import { StyleProp, ViewStyle } from "react-native";
|
|
2
|
+
import { NativeColorToken } from "@agimon-ai/po-web-components/nativeTheme";
|
|
3
3
|
//#region src/icons/icons.d.ts
|
|
4
4
|
export interface IconProps {
|
|
5
5
|
/** Edge length in points. */
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AgentAvatar, AgentState, agentInitials } from "./components/AgentAvatar.mjs";
|
|
1
2
|
import { Badge, BadgeProps, BadgeSize, BadgeTone } from "./components/Badge.mjs";
|
|
2
3
|
import { Button, ButtonProps, ButtonSize, ButtonVariant } from "./components/Button.mjs";
|
|
3
4
|
import { CodeBlock, CodeBlockProps } from "./components/CodeBlock.mjs";
|
|
@@ -29,4 +30,4 @@ import { fontOf } from "./lib/fonts.mjs";
|
|
|
29
30
|
import { IconColorContext } from "./icons/IconColorContext.mjs";
|
|
30
31
|
import { impactLight, selectionTick } from "./lib/haptics.mjs";
|
|
31
32
|
import { AnsiSpan, PresentedLine, ReviewComment, ansiSpans, buildReviewPrompt, collapseLines, hashlineBody, resultTextLines } from "@agimon-ai/po-web-components/text";
|
|
32
|
-
export { ActivityIcon, AlertIcon, type AnsiSpan, ArrowRightIcon, Badge, type BadgeProps, type BadgeSize, type BadgeTone, BranchIcon, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CodeBlock, type CodeBlockProps, CopyButton, type CopyButtonProps, CopyIcon, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, type DialogFooterProps, type DialogFooterVariant, DialogHeader, type DialogHeaderProps, type DialogPartProps, type DialogProps, DialogTitle, DialogTrigger, type DialogWidth, Dot, type DotProps, type DotSize, type DotTone, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuItemVariant, DropdownMenuLabel, type DropdownMenuPartProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, EditIcon, EmptyState, type EmptyStateProps, type FieldSize, type FieldVariant, FileIcon, type FileLinkHandler, FolderIcon, ForkIcon, GearIcon, HashlineLines, type HashlineLinesProps, HomeIcon, IconColorContext, type IconName, type IconProps, ImageIcon, Input, type InputProps, KebabIcon, Label, type LabelProps, LightbulbIcon, List, type ListProps, ListRow, type ListRowProps, LockIcon, Markdown, type MarkdownImageLoader, type MarkdownProps, MessageIcon, MessageItem, MessageItemBody, MessageItemGroup, type MessageItemGroupProps, MessageItemHeader, type MessageItemHeaderProps, type MessageItemPartProps, type MessageItemProps, type MessageItemState, MessageItemStatus, type MessageItemStatusProps, MicIcon, PaletteIcon, Panel, PanelBody, PanelHeader, type PanelPartProps, PlayCircleIcon, PlusIcon, PoNativeProvider, type PoNativeProviderProps, type PresentedLine, type ReviewComment, STATUS_EDGE, STATUS_GLYPH, STATUS_LABEL, SearchIcon, SectionLabel, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, SendIcon, Sheet, SheetBody, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, type SheetHeaderProps, type SheetPartProps, type SheetProps, SheetTitle, SheetTrigger, SlidersIcon, SparklesIcon, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, type StatusBadgeSize, type StatusTone, StopIcon, SyntaxLine, type SyntaxLineProps, TabBadge, type TabBadgeProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TaskIcon, Textarea, type TextareaProps, ToolPathLink, type ToolPathLinkProps, TrashIcon, UsersIcon, WorkflowIcon, WrenchIcon, ansiSpans, buildReviewPrompt, collapseLines, fontOf, hashlineBody, impactLight, resultTextLines, selectionTick, toolTone, useMessageItem, useSyntaxLines };
|
|
33
|
+
export { ActivityIcon, AgentAvatar, type AgentState, AlertIcon, type AnsiSpan, ArrowRightIcon, Badge, type BadgeProps, type BadgeSize, type BadgeTone, BranchIcon, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CodeBlock, type CodeBlockProps, CopyButton, type CopyButtonProps, CopyIcon, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, type DialogFooterProps, type DialogFooterVariant, DialogHeader, type DialogHeaderProps, type DialogPartProps, type DialogProps, DialogTitle, DialogTrigger, type DialogWidth, Dot, type DotProps, type DotSize, type DotTone, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuItemVariant, DropdownMenuLabel, type DropdownMenuPartProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, EditIcon, EmptyState, type EmptyStateProps, type FieldSize, type FieldVariant, FileIcon, type FileLinkHandler, FolderIcon, ForkIcon, GearIcon, HashlineLines, type HashlineLinesProps, HomeIcon, IconColorContext, type IconName, type IconProps, ImageIcon, Input, type InputProps, KebabIcon, Label, type LabelProps, LightbulbIcon, List, type ListProps, ListRow, type ListRowProps, LockIcon, Markdown, type MarkdownImageLoader, type MarkdownProps, MessageIcon, MessageItem, MessageItemBody, MessageItemGroup, type MessageItemGroupProps, MessageItemHeader, type MessageItemHeaderProps, type MessageItemPartProps, type MessageItemProps, type MessageItemState, MessageItemStatus, type MessageItemStatusProps, MicIcon, PaletteIcon, Panel, PanelBody, PanelHeader, type PanelPartProps, PlayCircleIcon, PlusIcon, PoNativeProvider, type PoNativeProviderProps, type PresentedLine, type ReviewComment, STATUS_EDGE, STATUS_GLYPH, STATUS_LABEL, SearchIcon, SectionLabel, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, SendIcon, Sheet, SheetBody, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, type SheetHeaderProps, type SheetPartProps, type SheetProps, SheetTitle, SheetTrigger, SlidersIcon, SparklesIcon, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, type StatusBadgeSize, type StatusTone, StopIcon, SyntaxLine, type SyntaxLineProps, TabBadge, type TabBadgeProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TaskIcon, Textarea, type TextareaProps, ToolPathLink, type ToolPathLinkProps, TrashIcon, UsersIcon, WorkflowIcon, WrenchIcon, agentInitials, ansiSpans, buildReviewPrompt, collapseLines, fontOf, hashlineBody, impactLight, resultTextLines, selectionTick, toolTone, useMessageItem, useSyntaxLines };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { fontOf } from "./lib/fonts.mjs";
|
|
2
|
+
import { Dot } from "./components/Dot.mjs";
|
|
3
|
+
import { AgentAvatar, agentInitials } from "./components/AgentAvatar.mjs";
|
|
2
4
|
import { Badge } from "./components/Badge.mjs";
|
|
3
5
|
import { IconColorContext } from "./icons/IconColorContext.mjs";
|
|
4
6
|
import { impactLight, selectionTick } from "./lib/haptics.mjs";
|
|
@@ -8,7 +10,6 @@ import { ActivityIcon, AlertIcon, ArrowRightIcon, BranchIcon, CheckIcon, Chevron
|
|
|
8
10
|
import { CopyButton } from "./components/CopyButton.mjs";
|
|
9
11
|
import { CodeBlock } from "./components/CodeBlock.mjs";
|
|
10
12
|
import { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "./components/Dialog.mjs";
|
|
11
|
-
import { Dot } from "./components/Dot.mjs";
|
|
12
13
|
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger } from "./components/DropdownMenu.mjs";
|
|
13
14
|
import { EmptyState } from "./components/EmptyState.mjs";
|
|
14
15
|
import { SyntaxLine, useSyntaxLines } from "./components/SyntaxLine.mjs";
|
|
@@ -29,4 +30,4 @@ import { Textarea } from "./components/Textarea.mjs";
|
|
|
29
30
|
import { ToolPathLink } from "./components/ToolPathLink.mjs";
|
|
30
31
|
import { ansiSpans, buildReviewPrompt, collapseLines, hashlineBody, resultTextLines } from "@agimon-ai/po-web-components/text";
|
|
31
32
|
|
|
32
|
-
export { ActivityIcon, AlertIcon, ArrowRightIcon, Badge, BranchIcon, Button, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CodeBlock, CopyButton, CopyIcon, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Dot, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, EditIcon, EmptyState, FileIcon, FolderIcon, ForkIcon, GearIcon, HashlineLines, HomeIcon, IconColorContext, ImageIcon, Input, KebabIcon, Label, LightbulbIcon, List, ListRow, LockIcon, Markdown, MessageIcon, MessageItem, MessageItemBody, MessageItemGroup, MessageItemHeader, MessageItemStatus, MicIcon, PaletteIcon, Panel, PanelBody, PanelHeader, PlayCircleIcon, PlusIcon, PoNativeProvider, STATUS_EDGE, STATUS_GLYPH, STATUS_LABEL, SearchIcon, SectionLabel, SegmentedControl, SendIcon, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SlidersIcon, SparklesIcon, Spinner, StatusBadge, StopIcon, SyntaxLine, TabBadge, Tabs, TabsContent, TabsList, TabsTrigger, TaskIcon, Textarea, ToolPathLink, TrashIcon, UsersIcon, WorkflowIcon, WrenchIcon, ansiSpans, buildReviewPrompt, collapseLines, fontOf, hashlineBody, impactLight, resultTextLines, selectionTick, toolTone, useMessageItem, useSyntaxLines };
|
|
33
|
+
export { ActivityIcon, AgentAvatar, AlertIcon, ArrowRightIcon, Badge, BranchIcon, Button, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CodeBlock, CopyButton, CopyIcon, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Dot, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, EditIcon, EmptyState, FileIcon, FolderIcon, ForkIcon, GearIcon, HashlineLines, HomeIcon, IconColorContext, ImageIcon, Input, KebabIcon, Label, LightbulbIcon, List, ListRow, LockIcon, Markdown, MessageIcon, MessageItem, MessageItemBody, MessageItemGroup, MessageItemHeader, MessageItemStatus, MicIcon, PaletteIcon, Panel, PanelBody, PanelHeader, PlayCircleIcon, PlusIcon, PoNativeProvider, STATUS_EDGE, STATUS_GLYPH, STATUS_LABEL, SearchIcon, SectionLabel, SegmentedControl, SendIcon, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SlidersIcon, SparklesIcon, Spinner, StatusBadge, StopIcon, SyntaxLine, TabBadge, Tabs, TabsContent, TabsList, TabsTrigger, TaskIcon, Textarea, ToolPathLink, TrashIcon, UsersIcon, WorkflowIcon, WrenchIcon, agentInitials, ansiSpans, buildReviewPrompt, collapseLines, fontOf, hashlineBody, impactLight, resultTextLines, selectionTick, toolTone, useMessageItem, useSyntaxLines };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/po-native-components",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.24",
|
|
4
4
|
"description": "Shared React Native components for Po and its native plugins: the web component library's look and API on native parts, tuned to the Po palette.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@agimon-ai/po-web-components": "0.0.0-alpha.
|
|
48
|
+
"@agimon-ai/po-web-components": "0.0.0-alpha.24"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@agimon-ai/po-build": "0.0.0-alpha.
|
|
52
|
-
"@agimon-ai/vibe-lint-plugin-po-web": "0.0.0-alpha.
|
|
51
|
+
"@agimon-ai/po-build": "0.0.0-alpha.24",
|
|
52
|
+
"@agimon-ai/vibe-lint-plugin-po-web": "0.0.0-alpha.24",
|
|
53
53
|
"@babel/core": "7.29.7",
|
|
54
54
|
"@expo/vector-icons": "15.1.1",
|
|
55
55
|
"@gorhom/bottom-sheet": "5.2.14",
|