@agimon-ai/po-native-components 0.0.0-alpha.51 → 0.0.0-alpha.53

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.
@@ -0,0 +1,17 @@
1
+ //#region src/components/HostFilter.d.ts
2
+ export interface HostFilterProps {
3
+ hosts: readonly {
4
+ id: string;
5
+ label: string;
6
+ }[];
7
+ /** null means All. This is presentation only, not a transport selection. */
8
+ value: string | null;
9
+ onChange: (id: string | null) => void;
10
+ /** Off when the choice names where something lives, so exactly one computer is always chosen. */
11
+ includeAll?: boolean;
12
+ accessibilityLabel?: string;
13
+ }
14
+ /** Short names use the native segmented control; long names remain reachable by scrolling. */
15
+ export declare function HostFilter({ hosts, value, onChange, includeAll, accessibilityLabel }: HostFilterProps): import("react").JSX.Element;
16
+ //#endregion
17
+ //# sourceMappingURL=HostFilter.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HostFilter.d.mts","names":[],"sources":["../../src/components/HostFilter.tsx"],"mappings":";iBAOiB;EACf;IAAkB;IAAY;;;EAE9B;EACA,WAAW;;EAEX;EACA;;;wBAOc,aACd,OACA,OACA,UACA,YACA,sBACC,kCAAe,IAAA"}
@@ -0,0 +1,66 @@
1
+ import { selectionTick } from "../lib/haptics.mjs";
2
+ import { Button } from "./Button.mjs";
3
+ import { SegmentedControl } from "./SegmentedControl.mjs";
4
+ import { View } from "react-native-unistyles/components/native/View";
5
+ import { StyleSheet } from "react-native-unistyles";
6
+ import { jsx } from "react/jsx-runtime";
7
+ import { ScrollView } from "react-native-unistyles/components/native/ScrollView";
8
+
9
+ //#region src/components/HostFilter.tsx
10
+ const ALL = "";
11
+ const MAX_SEGMENTS = 3;
12
+ const MAX_SEGMENT_LABEL = 12;
13
+ /** Short names use the native segmented control; long names remain reachable by scrolling. */
14
+ function HostFilter({ hosts, value, onChange, includeAll = true, accessibilityLabel = "Filter by computer" }) {
15
+ const options = [...includeAll ? [{
16
+ value: ALL,
17
+ label: "All"
18
+ }] : [], ...hosts.map(({ id, label }) => ({
19
+ value: id,
20
+ label
21
+ }))];
22
+ const selected = hosts.some(({ id }) => id === value) ? value : includeAll ? ALL : hosts[0]?.id ?? ALL;
23
+ if (options.length <= MAX_SEGMENTS && options.every(({ label }) => label.length <= MAX_SEGMENT_LABEL)) return /* @__PURE__ */ jsx(SegmentedControl, {
24
+ options,
25
+ value: selected,
26
+ onValueChange: (id) => onChange(id || null),
27
+ accessibilityLabel,
28
+ style: styles.control
29
+ });
30
+ return /* @__PURE__ */ jsx(ScrollView, {
31
+ horizontal: true,
32
+ showsHorizontalScrollIndicator: false,
33
+ accessibilityLabel,
34
+ children: /* @__PURE__ */ jsx(View, {
35
+ style: styles.choices,
36
+ children: options.map(({ value: id, label }) => /* @__PURE__ */ jsx(Button, {
37
+ variant: selected === id ? "subtle" : "ghost",
38
+ accessibilityState: { selected: selected === id },
39
+ style: [styles.choice, selected === id && styles.selected],
40
+ onPress: () => {
41
+ selectionTick();
42
+ onChange(id || null);
43
+ },
44
+ children: label
45
+ }, id))
46
+ })
47
+ });
48
+ }
49
+ const styles = StyleSheet.create((theme) => ({
50
+ control: { minHeight: 44 },
51
+ choices: {
52
+ flexDirection: "row",
53
+ gap: theme.spacing(2),
54
+ uni__dependencies: [0]
55
+ },
56
+ choice: { minHeight: 44 },
57
+ selected: {
58
+ backgroundColor: theme.colors["tint-green"],
59
+ borderColor: theme.colors["edge-green"],
60
+ uni__dependencies: [0]
61
+ }
62
+ }));
63
+
64
+ //#endregion
65
+ export { HostFilter };
66
+ //# sourceMappingURL=HostFilter.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HostFilter.mjs","names":["StyleSheet","selectionTick","Button","SegmentedControl","HostFilterProps","hosts","id","label","value","onChange","includeAll","accessibilityLabel","ALL","MAX_SEGMENTS","MAX_SEGMENT_LABEL","HostFilter","options","map","selected","some","length","every","styles","control","choices","choice","create","theme","minHeight","flexDirection","gap","spacing","uni__dependencies","backgroundColor","colors","borderColor"],"sources":["../../src/components/HostFilter.tsx"],"sourcesContent":["import { ScrollView, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { selectionTick } from '../lib/haptics';\nimport { Button } from './Button';\nimport { SegmentedControl } from './SegmentedControl';\n\nexport interface HostFilterProps {\n hosts: readonly { id: string; label: string }[];\n /** null means All. This is presentation only, not a transport selection. */\n value: string | null;\n onChange: (id: string | null) => void;\n /** Off when the choice names where something lives, so exactly one computer is always chosen. */\n includeAll?: boolean;\n accessibilityLabel?: string;\n}\nconst ALL = '';\nconst MAX_SEGMENTS = 3;\nconst MAX_SEGMENT_LABEL = 12;\n\n/** Short names use the native segmented control; long names remain reachable by scrolling. */\nexport function HostFilter({\n hosts,\n value,\n onChange,\n includeAll = true,\n accessibilityLabel = 'Filter by computer',\n}: HostFilterProps) {\n const options = [\n ...(includeAll ? [{ value: ALL, label: 'All' }] : []),\n ...hosts.map(({ id, label }) => ({ value: id, label })),\n ];\n const selected = hosts.some(({ id }) => id === value) ? value! : includeAll ? ALL : (hosts[0]?.id ?? ALL);\n if (options.length <= MAX_SEGMENTS && options.every(({ label }) => label.length <= MAX_SEGMENT_LABEL)) {\n return (\n <SegmentedControl\n options={options}\n value={selected}\n onValueChange={(id) => onChange(id || null)}\n accessibilityLabel={accessibilityLabel}\n style={styles.control}\n />\n );\n }\n return (\n <ScrollView horizontal showsHorizontalScrollIndicator={false} accessibilityLabel={accessibilityLabel}>\n <View style={styles.choices}>\n {options.map(({ value: id, label }) => (\n <Button\n key={id}\n variant={selected === id ? 'subtle' : 'ghost'}\n accessibilityState={{ selected: selected === id }}\n style={[styles.choice, selected === id && styles.selected]}\n onPress={() => {\n selectionTick();\n onChange(id || null);\n }}\n >\n {label}\n </Button>\n ))}\n </View>\n </ScrollView>\n );\n}\nconst styles = StyleSheet.create((theme) => ({\n control: { minHeight: 44 },\n choices: { flexDirection: 'row', gap: theme.spacing(2) },\n choice: { minHeight: 44 },\n selected: { backgroundColor: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,CAAC;EAACC,mBAAA,CAAA,CAAA;CAAC;CACvDP,QAAQ,EAAEG,WAAW,GAAG;CACxBV,UAAU;EAAEe,iBAAiBN,MAAMO,OAAO;EAAeC,aAAaR,MAAMO,OAAO;EAAaF,mBAAA,CAAA,CAAA;CAAC;AACnG,EAAE"}
@@ -0,0 +1,7 @@
1
+ //#region src/components/HostTag.d.ts
2
+ /** A computer's display label, never an authority or connection indicator. */
3
+ export declare function HostTag({ label }: {
4
+ label: string;
5
+ }): import("react").JSX.Element;
6
+ //#endregion
7
+ //# sourceMappingURL=HostTag.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HostTag.d.mts","names":[],"sources":["../../src/components/HostTag.tsx"],"mappings":";;wBAQgB,UAAU;EAAW;oBAAe,IAAA"}
@@ -0,0 +1,47 @@
1
+ import { fontOf } from "../lib/fonts.mjs";
2
+ import { agentInitials } from "./AgentAvatar.mjs";
3
+ import { Badge } from "./Badge.mjs";
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/HostTag.tsx
9
+ /** A computer's display label, never an authority or connection indicator. */
10
+ function HostTag({ label }) {
11
+ return /* @__PURE__ */ jsxs(Badge, {
12
+ accessibilityLabel: `Computer: ${label}`,
13
+ style: styles.tag,
14
+ children: [/* @__PURE__ */ jsx(Text, {
15
+ style: styles.initials,
16
+ children: agentInitials(label)
17
+ }), /* @__PURE__ */ jsx(Text, {
18
+ style: styles.label,
19
+ numberOfLines: 1,
20
+ children: label
21
+ })]
22
+ });
23
+ }
24
+ const styles = StyleSheet.create((theme) => ({
25
+ tag: {
26
+ maxWidth: "100%",
27
+ flexShrink: 1
28
+ },
29
+ initials: {
30
+ fontFamily: fontOf(theme.fontFamily.sans),
31
+ fontSize: theme.fontSize.xs,
32
+ color: theme.colors.dim,
33
+ uni__dependencies: [0]
34
+ },
35
+ label: {
36
+ fontFamily: fontOf(theme.fontFamily.sans),
37
+ fontSize: theme.fontSize.sm,
38
+ lineHeight: theme.lineHeight.sm,
39
+ color: theme.colors.dim,
40
+ flexShrink: 1,
41
+ uni__dependencies: [0]
42
+ }
43
+ }));
44
+
45
+ //#endregion
46
+ export { HostTag };
47
+ //# sourceMappingURL=HostTag.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HostTag.mjs","names":["StyleSheet","fontOf","agentInitials","Badge","HostTag","label","styles","tag","initials","create","theme","maxWidth","flexShrink","fontFamily","sans","fontSize","xs","color","colors","dim","uni__dependencies","sm","lineHeight"],"sources":["../../src/components/HostTag.tsx"],"sourcesContent":["import { Text } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { fontOf } from '../lib/fonts';\nimport { agentInitials } from './AgentAvatar';\nimport { Badge } from './Badge';\n\n/** A computer's display label, never an authority or connection indicator. */\nexport function HostTag({ label }: { label: string }) {\n return (\n <Badge accessibilityLabel={`Computer: ${label}`} style={styles.tag}>\n <Text style={styles.initials}>{agentInitials(label)}</Text>\n <Text style={styles.label} numberOfLines={1}>\n {label}\n </Text>\n </Badge>\n );\n}\nconst styles = StyleSheet.create((theme) => ({\n tag: { maxWidth: '100%', flexShrink: 1 },\n initials: { fontFamily: fontOf(theme.fontFamily.sans), fontSize: theme.fontSize.xs, color: theme.colors.dim },\n label: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n color: theme.colors.dim,\n flexShrink: 1,\n },\n}));\n"],"mappings":";;;;;;;;;AAQA,SAAgBI,QAAQ,EAAEC,SAA4B;CACpD,OACE,qBAAC,OAAD;EAAO,oBAAoB,aAAaA;EAAS,OAAOC,OAAOC;YAA/D,CACE,oBAAC,MAAD;GAAM,OAAOD,OAAOE;aAAWN,cAAcG,KAAK;EAAQ,IAC1D,oBAAC,MAAD;GAAM,OAAOC,OAAOD;GAAO,eAAe;aACvCA;EACG,EACD;;AAEX;AACA,MAAMC,SAASN,WAAWS,QAAQC,WAAW;CAC3CH,KAAK;EAAEI,UAAU;EAAQC,YAAY;CAAE;CACvCJ,UAAU;EAAEK,YAAYZ,OAAOS,MAAMG,WAAWC,IAAI;EAAGC,UAAUL,MAAMK,SAASC;EAAIC,OAAOP,MAAMQ,OAAOC;EAAGC,mBAAA,CAAA,CAAA;CAAC;CAC5Gf,OAAO;EACLQ,YAAYZ,OAAOS,MAAMG,WAAWC,IAAI;EACxCC,UAAUL,MAAMK,SAASM;EACzBC,YAAYZ,MAAMY,WAAWD;EAC7BJ,OAAOP,MAAMQ,OAAOC;EACpBP,YAAY;EAACQ,mBAAA,CAAA,CAAA;CACf;AACF,EAAE"}
@@ -0,0 +1,9 @@
1
+ //#region src/components/InfoStrip.d.ts
2
+ /** A quiet explanation with an optional text action, without live activity. */
3
+ export declare function InfoStrip({ message, actionLabel, onAction }: {
4
+ message: string;
5
+ actionLabel?: string;
6
+ onAction?: () => void;
7
+ }): import("react").JSX.Element;
8
+ //#endregion
9
+ //# sourceMappingURL=InfoStrip.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoStrip.d.mts","names":[],"sources":["../../src/components/InfoStrip.tsx"],"mappings":";;wBASgB,YACd,SACA,aACA;EAEA;EACA;EACA;oBACD,IAAA"}
@@ -0,0 +1,53 @@
1
+ import { fontOf } from "../lib/fonts.mjs";
2
+ import { Button } from "./Button.mjs";
3
+ import { AlertIcon } from "../icons/icons.mjs";
4
+ import { Panel } from "./Panel.mjs";
5
+ import { Text } from "react-native-unistyles/components/native/Text";
6
+ import { StyleSheet } from "react-native-unistyles";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+
9
+ //#region src/components/InfoStrip.tsx
10
+ /** A quiet explanation with an optional text action, without live activity. */
11
+ function InfoStrip({ message, actionLabel, onAction }) {
12
+ return /* @__PURE__ */ jsxs(Panel, {
13
+ style: styles.strip,
14
+ children: [
15
+ /* @__PURE__ */ jsx(AlertIcon, {
16
+ size: 16,
17
+ color: "dim"
18
+ }),
19
+ /* @__PURE__ */ jsx(Text, {
20
+ style: styles.text,
21
+ children: message
22
+ }),
23
+ onAction && actionLabel ? /* @__PURE__ */ jsx(Button, {
24
+ variant: "ghost",
25
+ style: styles.action,
26
+ onPress: onAction,
27
+ children: actionLabel
28
+ }) : null
29
+ ]
30
+ });
31
+ }
32
+ const styles = StyleSheet.create((theme) => ({
33
+ strip: {
34
+ flexDirection: "row",
35
+ alignItems: "center",
36
+ gap: theme.spacing(2),
37
+ padding: theme.spacing(3),
38
+ uni__dependencies: [0]
39
+ },
40
+ text: {
41
+ flex: 1,
42
+ fontFamily: fontOf(theme.fontFamily.sans),
43
+ fontSize: theme.fontSize.sm,
44
+ lineHeight: theme.lineHeight.sm,
45
+ color: theme.colors.dim,
46
+ uni__dependencies: [0]
47
+ },
48
+ action: { minHeight: 44 }
49
+ }));
50
+
51
+ //#endregion
52
+ export { InfoStrip };
53
+ //# sourceMappingURL=InfoStrip.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoStrip.mjs","names":["StyleSheet","AlertIcon","fontOf","Button","Panel","InfoStrip","message","actionLabel","onAction","styles","strip","text","action","create","theme","flexDirection","alignItems","gap","spacing","padding","uni__dependencies","flex","fontFamily","sans","fontSize","sm","lineHeight","color","colors","dim","minHeight"],"sources":["../../src/components/InfoStrip.tsx"],"sourcesContent":["import { Text } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { AlertIcon } from '../icons/icons';\nimport { fontOf } from '../lib/fonts';\nimport { Button } from './Button';\nimport { Panel } from './Panel';\n\n/** A quiet explanation with an optional text action, without live activity. */\nexport function InfoStrip({\n message,\n actionLabel,\n onAction,\n}: {\n message: string;\n actionLabel?: string;\n onAction?: () => void;\n}) {\n return (\n <Panel style={styles.strip}>\n <AlertIcon size={16} color=\"dim\" />\n <Text style={styles.text}>{message}</Text>\n {onAction && actionLabel ? (\n <Button variant=\"ghost\" style={styles.action} onPress={onAction}>\n {actionLabel}\n </Button>\n ) : null}\n </Panel>\n );\n}\nconst styles = StyleSheet.create((theme) => ({\n strip: { flexDirection: 'row', alignItems: 'center', gap: theme.spacing(2), padding: theme.spacing(3) },\n text: {\n flex: 1,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n color: theme.colors.dim,\n },\n action: { minHeight: 44 },\n}));\n"],"mappings":";;;;;;;;;;AASA,SAAgBK,UAAU,EACxBC,SACAC,aACAC,YAKC;CACD,OACE,qBAAC,OAAD;EAAO,OAAOC,OAAOC;YAArB;GACE,oBAAC,WAAD;IAAW,MAAM;IAAI,OAAM;GAAK;GAChC,oBAAC,MAAD;IAAM,OAAOD,OAAOE;cAAOL;GAAc;GACxCE,YAAYD,cACX,oBAAC,QAAD;IAAQ,SAAQ;IAAQ,OAAOE,OAAOG;IAAQ,SAASJ;cACpDD;GACK,KACN;EACC;;AAEX;AACA,MAAME,SAAST,WAAWa,QAAQC,WAAW;CAC3CJ,OAAO;EAAEK,eAAe;EAAOC,YAAY;EAAUC,KAAKH,MAAMI,QAAQ,CAAC;EAAGC,SAASL,MAAMI,QAAQ,CAAC;EAACE,mBAAA,CAAA,CAAA;CAAC;CACtGT,MAAM;EACJU,MAAM;EACNC,YAAYpB,OAAOY,MAAMQ,WAAWC,IAAI;EACxCC,UAAUV,MAAMU,SAASC;EACzBC,YAAYZ,MAAMY,WAAWD;EAC7BE,OAAOb,MAAMc,OAAOC;EAAGT,mBAAA,CAAA,CAAA;CACzB;CACAR,QAAQ,EAAEkB,WAAW,GAAG;AAC1B,EAAE"}
@@ -16,13 +16,15 @@ export declare function SheetTrigger({ onPress, ...props }: ButtonProps): import
16
16
  export declare function SheetClose({ onPress, ...props }: ButtonProps): import("react").JSX.Element;
17
17
  export interface SheetContentProps {
18
18
  children?: ReactNode;
19
+ /** Pinned actions outside the scrolling body. The footer carries the bottom safe area. */
20
+ footer?: ReactNode;
19
21
  /** False when an embedded SheetList owns vertical scrolling. */
20
22
  scrollable?: boolean;
21
23
  /** The sheet holds unsaved work: a prompt arriving in the conversation leaves it open with a note. */
22
24
  keep?: boolean;
23
25
  }
24
26
  /** The sheet surface. Fields inside it switch to the sheet's own input so the keyboard lifts the sheet. */
25
- export declare function SheetContent({ children, scrollable, keep }: SheetContentProps): import("react").JSX.Element;
27
+ export declare function SheetContent({ children, scrollable, footer, keep }: SheetContentProps): import("react").JSX.Element;
26
28
  export interface SheetPartProps extends Omit<ViewProps, 'children' | 'style'> {
27
29
  children?: ReactNode;
28
30
  style?: StyleProp<ViewStyle>;
@@ -1 +1 @@
1
- {"version":3,"file":"Sheet.d.mts","names":[],"sources":["../../src/components/Sheet.tsx"],"mappings":";;;;iBAwBiB;;EAEf;EACA;EACA,gBAAgB;EAChB,WAAW;;wBAGG,QAAQ,MAAM,aAAqB,cAAc,YAAY,6BAAU,IAAA;;wBAMvE,eAAe,YAAY,SAAS,8BAAW,IAAA;;wBAc/C,aAAa,YAAY,SAAS,8BAAW,IAAA;iBAa5C;EACf,WAAW;;EAEX;;EAEA;;;wBAIc,eAAe,UAAU,YAAmB,QAAQ,oCAAiB,IAAA;iBASpE,uBAAuB,KAAK;EAC3C,WAAW;EACX,QAAQ,UAAU;;iBAGH,yBAAyB;;EAExC;;EAEA;;wBAGc,cAAc,aAAoB,YAAsB,OAAO,aAAa,SAAS,mCAAgB,IAAA;wBAoBrG,aAAa,UAAU,SAAS,4BAAS,IAAA;wBAIzC,mBAAmB,UAAU,SAAS,4BAAS,IAAA;;wBAK/C,YAAY,OAAO,aAAa,SAAS,iCAAc,IAAA;wBAQvD,cAAc,OAAO,aAAa,SAAS,iCAAc,IAAA"}
1
+ {"version":3,"file":"Sheet.d.mts","names":[],"sources":["../../src/components/Sheet.tsx"],"mappings":";;;;iBAwBiB;;EAEf;EACA;EACA,gBAAgB;EAChB,WAAW;;wBAGG,QAAQ,MAAM,aAAqB,cAAc,YAAY,6BAAU,IAAA;;wBAMvE,eAAe,YAAY,SAAS,8BAAW,IAAA;;wBAc/C,aAAa,YAAY,SAAS,8BAAW,IAAA;iBAa5C;EACf,WAAW;;EAEX,SAAS;;EAET;;EAEA;;;wBAIc,eAAe,UAAU,YAAmB,QAAQ,QAAQ,oCAAiB,IAAA;iBAiB5E,uBAAuB,KAAK;EAC3C,WAAW;EACX,QAAQ,UAAU;;iBAGH,yBAAyB;;EAExC;;EAEA;;wBAGc,cAAc,aAAoB,YAAsB,OAAO,aAAa,SAAS,mCAAgB,IAAA;wBAoBrG,aAAa,UAAU,SAAS,4BAAS,IAAA;wBAIzC,mBAAmB,UAAU,SAAS,4BAAS,IAAA;;wBAK/C,YAAY,OAAO,aAAa,SAAS,iCAAc,IAAA;wBAQvD,cAAc,OAAO,aAAa,SAAS,iCAAc,IAAA"}
@@ -48,13 +48,20 @@ function SheetClose({ onPress, ...props }) {
48
48
  });
49
49
  }
50
50
  /** The sheet surface. Fields inside it switch to the sheet's own input so the keyboard lifts the sheet. */
51
- function SheetContent({ children, scrollable = true, keep }) {
51
+ function SheetContent({ children, scrollable = true, footer, keep }) {
52
52
  const { open, setOpen } = useContext(SheetContext);
53
53
  return /* @__PURE__ */ jsx(SheetFrame, {
54
54
  open,
55
55
  onClose: () => setOpen(false),
56
56
  scrollable,
57
57
  keep,
58
+ ...footer === void 0 ? {} : { footer: /* @__PURE__ */ jsx(SheetContext.Provider, {
59
+ value: {
60
+ open,
61
+ setOpen
62
+ },
63
+ children: footer
64
+ }) },
58
65
  children: /* @__PURE__ */ jsx(SheetContext.Provider, {
59
66
  value: {
60
67
  open,
@@ -1 +1 @@
1
- {"version":3,"file":"Sheet.mjs","names":["createContext","ReactNode","useContext","StyleProp","TextProps","ViewProps","ViewStyle","StyleSheet","CloseIcon","fontOf","useControllable","wrapText","Button","ButtonProps","SheetFrame","SheetState","open","setOpen","SheetContext","undefined","SheetProps","defaultOpen","onOpenChange","children","Sheet","current","SheetTrigger","onPress","props","event","SheetClose","SheetContentProps","scrollable","keep","SheetContent","SheetPartProps","Omit","style","SheetHeaderProps","dismissible","closeLabel","SheetHeader","styles","header","close","SheetTitle","title","SheetDescription","description","SheetBody","body","SheetFooter","footer","hint","create","theme","flexDirection","alignItems","gap","spacing","minWidth","height","borderBottomWidth","borderBottomColor","colors","border","paddingHorizontal","uni__dependencies","marginLeft","flexShrink","color","hi","fontFamily","sans","fontSize","lg","lineHeight","fontWeight","semibold","dim","sm","lineHeightRelaxed","paddingVertical","flexWrap","justifyContent","minHeight","borderTopWidth","borderTopColor","backgroundColor","deep","faint"],"sources":["../../src/components/Sheet.tsx"],"sourcesContent":["import { createContext, type ReactNode, useContext } from 'react';\nimport { type StyleProp, Text, type TextProps, View, type ViewProps, type ViewStyle } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { CloseIcon } from '../icons/icons';\nimport { fontOf } from '../lib/fonts';\nimport { useControllable } from '../lib/useControllable';\nimport { wrapText } from '../lib/wrapText';\nimport { Button, type ButtonProps } from './Button';\nimport { SheetFrame } from './SheetFrame';\n\n/*\n * The web Sheet as a bottom sheet: the native shape for a detail view or a\n * short form over what the reader was looking at. `side` and `width` are\n * dropped; a phone sheet rises from the bottom edge and takes the width.\n */\n\ninterface SheetState {\n open: boolean;\n setOpen: (open: boolean) => void;\n}\n\nexport const SheetContext = createContext<SheetState>({ open: false, setOpen: () => undefined });\n\nexport interface SheetProps {\n /** Controlled mode; pair with onOpenChange. Omit it and the sheet keeps its own state. */\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n}\n\nexport function Sheet({ open, defaultOpen = false, onOpenChange, children }: SheetProps) {\n const [current, setOpen] = useControllable(open, defaultOpen, onOpenChange);\n return <SheetContext.Provider value={{ open: current, setOpen }}>{children}</SheetContext.Provider>;\n}\n\n/** A Button that opens the enclosing sheet. */\nexport function SheetTrigger({ onPress, ...props }: ButtonProps) {\n const { setOpen } = useContext(SheetContext);\n return (\n <Button\n onPress={(event) => {\n onPress?.(event);\n setOpen(true);\n }}\n {...props}\n />\n );\n}\n\n/** A Button that closes the enclosing sheet. */\nexport function SheetClose({ onPress, ...props }: ButtonProps) {\n const { setOpen } = useContext(SheetContext);\n return (\n <Button\n onPress={(event) => {\n onPress?.(event);\n setOpen(false);\n }}\n {...props}\n />\n );\n}\n\nexport interface SheetContentProps {\n children?: ReactNode;\n /** False when an embedded SheetList owns vertical scrolling. */\n scrollable?: boolean;\n /** The sheet holds unsaved work: a prompt arriving in the conversation leaves it open with a note. */\n keep?: boolean;\n}\n\n/** The sheet surface. Fields inside it switch to the sheet's own input so the keyboard lifts the sheet. */\nexport function SheetContent({ children, scrollable = true, keep }: SheetContentProps) {\n const { open, setOpen } = useContext(SheetContext);\n return (\n <SheetFrame open={open} onClose={() => setOpen(false)} scrollable={scrollable} keep={keep}>\n <SheetContext.Provider value={{ open, setOpen }}>{children}</SheetContext.Provider>\n </SheetFrame>\n );\n}\n\nexport interface SheetPartProps extends Omit<ViewProps, 'children' | 'style'> {\n children?: ReactNode;\n style?: StyleProp<ViewStyle>;\n}\n\nexport interface SheetHeaderProps extends SheetPartProps {\n /** Show the close control at the right of the strip. On by default: a sheet is dismissed, not answered. */\n dismissible?: boolean;\n /** What the close control announces. */\n closeLabel?: string;\n}\n\nexport function SheetHeader({ dismissible = true, closeLabel = 'close', style, children, ...props }: SheetHeaderProps) {\n const { setOpen } = useContext(SheetContext);\n return (\n <View style={[styles.header, style]} {...props}>\n {children}\n {dismissible ? (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n accessibilityLabel={closeLabel}\n onPress={() => setOpen(false)}\n style={styles.close}\n >\n <CloseIcon size={12} color=\"faint\" />\n </Button>\n ) : null}\n </View>\n );\n}\n\nexport function SheetTitle({ style, ...props }: TextProps) {\n return <Text accessibilityRole=\"header\" numberOfLines={1} style={[styles.title, style]} {...props} />;\n}\n\nexport function SheetDescription({ style, ...props }: TextProps) {\n return <Text style={[styles.description, style]} {...props} />;\n}\n\n/** The scrolling middle; the sheet itself scrolls, so this only spaces its children. */\nexport function SheetBody({ style, children, ...props }: SheetPartProps) {\n return (\n <View style={[styles.body, style]} {...props}>\n {wrapText(children, styles.description)}\n </View>\n );\n}\n\nexport function SheetFooter({ style, children, ...props }: SheetPartProps) {\n return (\n <View style={[styles.footer, style]} {...props}>\n {wrapText(children, styles.hint)}\n </View>\n );\n}\n\nconst styles = StyleSheet.create((theme) => ({\n header: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: theme.spacing(2.5),\n minWidth: 0,\n height: theme.spacing(11),\n borderBottomWidth: 1,\n borderBottomColor: theme.colors.border,\n paddingHorizontal: theme.spacing(4),\n },\n close: { marginLeft: 'auto' },\n title: {\n flexShrink: 1,\n color: theme.colors.hi,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.lg,\n lineHeight: theme.lineHeight.lg,\n fontWeight: theme.fontWeight.semibold,\n },\n description: {\n color: theme.colors.dim,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeightRelaxed.sm,\n },\n body: {\n gap: theme.spacing(3),\n paddingHorizontal: theme.spacing(4),\n paddingVertical: theme.spacing(3),\n },\n footer: {\n flexDirection: 'row',\n flexWrap: 'wrap',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: theme.spacing(2),\n minHeight: 34,\n borderTopWidth: 1,\n borderTopColor: theme.colors['border-soft'],\n backgroundColor: theme.colors.deep,\n paddingHorizontal: theme.spacing(4),\n paddingVertical: theme.spacing(1.5),\n },\n hint: {\n color: theme.colors.faint,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize['2xs'],\n lineHeight: theme.lineHeight['2xs'],\n },\n}));\n"],"mappings":";;;;;;;;;;;;;AAsBA,MAAakB,eAAelB,cAA0B;CAAEgB,MAAM;CAAOC,eAAeE;AAAU,CAAC;AAU/F,SAAgBK,MAAM,EAAER,MAAMK,cAAc,OAAOC,cAAcC,YA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;EACXsB,OAAOf,MAAMS,OAAOe;EACpBP,YAAY/D,OAAO8C,MAAMiB,WAAWC,IAAI;EACxCC,UAAUnB,MAAMmB,SAASM;EACzBJ,YAAYrB,MAAM0B,kBAAkBD;EAAEb,mBAAA,CAAA,CAAA;CACxC;CACAjB,MAAM;EACJQ,KAAKH,MAAMI,QAAQ,CAAC;EACpBO,mBAAmBX,MAAMI,QAAQ,CAAC;EAClCuB,iBAAiB3B,MAAMI,QAAQ,CAAC;EAACQ,mBAAA,CAAA,CAAA;CACnC;CACAf,QAAQ;EACNI,eAAe;EACf2B,UAAU;EACV1B,YAAY;EACZ2B,gBAAgB;EAChB1B,KAAKH,MAAMI,QAAQ,CAAC;EACpB0B,WAAW;EACXC,gBAAgB;EAChBC,gBAAgBhC,MAAMS,OAAO;EAC7BwB,iBAAiBjC,MAAMS,OAAOyB;EAC9BvB,mBAAmBX,MAAMI,QAAQ,CAAC;EAClCuB,iBAAiB3B,MAAMI,QAAQ,GAAG;EAACQ,mBAAA,CAAA,CAAA;CACrC;CACAd,MAAM;EACJiB,OAAOf,MAAMS,OAAO0B;EACpBlB,YAAY/D,OAAO8C,MAAMiB,WAAWC,IAAI;EACxCC,UAAUnB,MAAMmB,SAAS;EACzBE,YAAYrB,MAAMqB,WAAW;EAAMT,mBAAA,CAAA,CAAA;CACrC;AACF,EAAE"}
1
+ {"version":3,"file":"Sheet.mjs","names":["createContext","ReactNode","useContext","StyleProp","TextProps","ViewProps","ViewStyle","StyleSheet","CloseIcon","fontOf","useControllable","wrapText","Button","ButtonProps","SheetFrame","SheetState","open","setOpen","SheetContext","undefined","SheetProps","defaultOpen","onOpenChange","children","Sheet","current","SheetTrigger","onPress","props","event","SheetClose","SheetContentProps","footer","scrollable","keep","SheetContent","SheetPartProps","Omit","style","SheetHeaderProps","dismissible","closeLabel","SheetHeader","styles","header","close","SheetTitle","title","SheetDescription","description","SheetBody","body","SheetFooter","hint","create","theme","flexDirection","alignItems","gap","spacing","minWidth","height","borderBottomWidth","borderBottomColor","colors","border","paddingHorizontal","uni__dependencies","marginLeft","flexShrink","color","hi","fontFamily","sans","fontSize","lg","lineHeight","fontWeight","semibold","dim","sm","lineHeightRelaxed","paddingVertical","flexWrap","justifyContent","minHeight","borderTopWidth","borderTopColor","backgroundColor","deep","faint"],"sources":["../../src/components/Sheet.tsx"],"sourcesContent":["import { createContext, type ReactNode, useContext } from 'react';\nimport { type StyleProp, Text, type TextProps, View, type ViewProps, type ViewStyle } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { CloseIcon } from '../icons/icons';\nimport { fontOf } from '../lib/fonts';\nimport { useControllable } from '../lib/useControllable';\nimport { wrapText } from '../lib/wrapText';\nimport { Button, type ButtonProps } from './Button';\nimport { SheetFrame } from './SheetFrame';\n\n/*\n * The web Sheet as a bottom sheet: the native shape for a detail view or a\n * short form over what the reader was looking at. `side` and `width` are\n * dropped; a phone sheet rises from the bottom edge and takes the width.\n */\n\ninterface SheetState {\n open: boolean;\n setOpen: (open: boolean) => void;\n}\n\nexport const SheetContext = createContext<SheetState>({ open: false, setOpen: () => undefined });\n\nexport interface SheetProps {\n /** Controlled mode; pair with onOpenChange. Omit it and the sheet keeps its own state. */\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n}\n\nexport function Sheet({ open, defaultOpen = false, onOpenChange, children }: SheetProps) {\n const [current, setOpen] = useControllable(open, defaultOpen, onOpenChange);\n return <SheetContext.Provider value={{ open: current, setOpen }}>{children}</SheetContext.Provider>;\n}\n\n/** A Button that opens the enclosing sheet. */\nexport function SheetTrigger({ onPress, ...props }: ButtonProps) {\n const { setOpen } = useContext(SheetContext);\n return (\n <Button\n onPress={(event) => {\n onPress?.(event);\n setOpen(true);\n }}\n {...props}\n />\n );\n}\n\n/** A Button that closes the enclosing sheet. */\nexport function SheetClose({ onPress, ...props }: ButtonProps) {\n const { setOpen } = useContext(SheetContext);\n return (\n <Button\n onPress={(event) => {\n onPress?.(event);\n setOpen(false);\n }}\n {...props}\n />\n );\n}\n\nexport interface SheetContentProps {\n children?: ReactNode;\n /** Pinned actions outside the scrolling body. The footer carries the bottom safe area. */\n footer?: ReactNode;\n /** False when an embedded SheetList owns vertical scrolling. */\n scrollable?: boolean;\n /** The sheet holds unsaved work: a prompt arriving in the conversation leaves it open with a note. */\n keep?: boolean;\n}\n\n/** The sheet surface. Fields inside it switch to the sheet's own input so the keyboard lifts the sheet. */\nexport function SheetContent({ children, scrollable = true, footer, keep }: SheetContentProps) {\n const { open, setOpen } = useContext(SheetContext);\n return (\n <SheetFrame\n open={open}\n onClose={() => setOpen(false)}\n scrollable={scrollable}\n keep={keep}\n {...(footer === undefined\n ? {}\n : { footer: <SheetContext.Provider value={{ open, setOpen }}>{footer}</SheetContext.Provider> })}\n >\n <SheetContext.Provider value={{ open, setOpen }}>{children}</SheetContext.Provider>\n </SheetFrame>\n );\n}\n\nexport interface SheetPartProps extends Omit<ViewProps, 'children' | 'style'> {\n children?: ReactNode;\n style?: StyleProp<ViewStyle>;\n}\n\nexport interface SheetHeaderProps extends SheetPartProps {\n /** Show the close control at the right of the strip. On by default: a sheet is dismissed, not answered. */\n dismissible?: boolean;\n /** What the close control announces. */\n closeLabel?: string;\n}\n\nexport function SheetHeader({ dismissible = true, closeLabel = 'close', style, children, ...props }: SheetHeaderProps) {\n const { setOpen } = useContext(SheetContext);\n return (\n <View style={[styles.header, style]} {...props}>\n {children}\n {dismissible ? (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n accessibilityLabel={closeLabel}\n onPress={() => setOpen(false)}\n style={styles.close}\n >\n <CloseIcon size={12} color=\"faint\" />\n </Button>\n ) : null}\n </View>\n );\n}\n\nexport function SheetTitle({ style, ...props }: TextProps) {\n return <Text accessibilityRole=\"header\" numberOfLines={1} style={[styles.title, style]} {...props} />;\n}\n\nexport function SheetDescription({ style, ...props }: TextProps) {\n return <Text style={[styles.description, style]} {...props} />;\n}\n\n/** The scrolling middle; the sheet itself scrolls, so this only spaces its children. */\nexport function SheetBody({ style, children, ...props }: SheetPartProps) {\n return (\n <View style={[styles.body, style]} {...props}>\n {wrapText(children, styles.description)}\n </View>\n );\n}\n\nexport function SheetFooter({ style, children, ...props }: SheetPartProps) {\n return (\n <View style={[styles.footer, style]} {...props}>\n {wrapText(children, styles.hint)}\n </View>\n );\n}\n\nconst styles = StyleSheet.create((theme) => ({\n header: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: theme.spacing(2.5),\n minWidth: 0,\n height: theme.spacing(11),\n borderBottomWidth: 1,\n borderBottomColor: theme.colors.border,\n paddingHorizontal: theme.spacing(4),\n },\n close: { marginLeft: 'auto' },\n title: {\n flexShrink: 1,\n color: theme.colors.hi,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.lg,\n lineHeight: theme.lineHeight.lg,\n fontWeight: theme.fontWeight.semibold,\n },\n description: {\n color: theme.colors.dim,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeightRelaxed.sm,\n },\n body: {\n gap: theme.spacing(3),\n paddingHorizontal: theme.spacing(4),\n paddingVertical: theme.spacing(3),\n },\n footer: {\n flexDirection: 'row',\n flexWrap: 'wrap',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: theme.spacing(2),\n minHeight: 34,\n borderTopWidth: 1,\n borderTopColor: theme.colors['border-soft'],\n backgroundColor: theme.colors.deep,\n paddingHorizontal: theme.spacing(4),\n paddingVertical: theme.spacing(1.5),\n },\n hint: {\n color: theme.colors.faint,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize['2xs'],\n lineHeight: theme.lineHeight['2xs'],\n },\n}));\n"],"mappings":";;;;;;;;;;;;;AAsBA,MAAakB,eAAelB,cAA0B;CAAEgB,MAAM;CAAOC,eAAeE;AAAU,CAAC;AAU/F,SAAgBK,MAAM,EAAER,MAAMK,cAAc,OAAOC,cAAcC,YAAwB;CACvF,MAAM,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SAASC;EACzBC,YAAYrB,MAAMqB,WAAWD;EAC7BE,YAAYtB,MAAMsB,WAAWC;EAAQX,mBAAA,CAAA,CAAA;CACvC;CACAlB,aAAa;EACXqB,OAAOf,MAAMS,OAAOe;EACpBP,YAAY/D,OAAO8C,MAAMiB,WAAWC,IAAI;EACxCC,UAAUnB,MAAMmB,SAASM;EACzBJ,YAAYrB,MAAM0B,kBAAkBD;EAAEb,mBAAA,CAAA,CAAA;CACxC;CACAhB,MAAM;EACJO,KAAKH,MAAMI,QAAQ,CAAC;EACpBO,mBAAmBX,MAAMI,QAAQ,CAAC;EAClCuB,iBAAiB3B,MAAMI,QAAQ,CAAC;EAACQ,mBAAA,CAAA,CAAA;CACnC;CACAnC,QAAQ;EACNwB,eAAe;EACf2B,UAAU;EACV1B,YAAY;EACZ2B,gBAAgB;EAChB1B,KAAKH,MAAMI,QAAQ,CAAC;EACpB0B,WAAW;EACXC,gBAAgB;EAChBC,gBAAgBhC,MAAMS,OAAO;EAC7BwB,iBAAiBjC,MAAMS,OAAOyB;EAC9BvB,mBAAmBX,MAAMI,QAAQ,CAAC;EAClCuB,iBAAiB3B,MAAMI,QAAQ,GAAG;EAACQ,mBAAA,CAAA,CAAA;CACrC;CACAd,MAAM;EACJiB,OAAOf,MAAMS,OAAO0B;EACpBlB,YAAY/D,OAAO8C,MAAMiB,WAAWC,IAAI;EACxCC,UAAUnB,MAAMmB,SAAS;EACzBE,YAAYrB,MAAMqB,WAAW;EAAMT,mBAAA,CAAA,CAAA;CACrC;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"SheetFrame.d.mts","names":[],"sources":["../../src/components/SheetFrame.tsx"],"mappings":";;;wBAwCgB;;;;;;;wBAUA,YAAY"}
1
+ {"version":3,"file":"SheetFrame.d.mts","names":[],"sources":["../../src/components/SheetFrame.tsx"],"mappings":";;;wBA2CgB;;;;;;;wBAUA,YAAY"}
@@ -1,12 +1,13 @@
1
1
  import { fontOf } from "../lib/fonts.mjs";
2
2
  import { InsideSheetContext } from "../lib/insideSheet.mjs";
3
+ import { View } from "react-native-unistyles/components/native/View";
3
4
  import { Text } from "react-native-unistyles/components/native/Text";
4
5
  import { StyleSheet, useUnistyles } from "react-native-unistyles";
5
6
  import { BackHandler, Keyboard } from "react-native";
6
7
  import { withAlpha } from "@agimon-ai/po-web-components/nativeTheme";
7
8
  import { useCallback, useContext, useEffect, useRef, useState } from "react";
8
9
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
- import { BottomSheetBackdrop, BottomSheetModal, BottomSheetScrollView } from "@gorhom/bottom-sheet";
10
+ import { BottomSheetBackdrop, BottomSheetFooter, BottomSheetModal, BottomSheetScrollView } from "@gorhom/bottom-sheet";
10
11
  import { SafeAreaInsetsContext } from "react-native-safe-area-context";
11
12
 
12
13
  //#region src/components/SheetFrame.tsx
@@ -45,12 +46,13 @@ function yieldSheets(note) {
45
46
  * back, clear of the safe area and lifted by the keyboard. Private: the public
46
47
  * parts keep bottom-sheet types out of the package API.
47
48
  */
48
- function SheetFrame({ open, onClose, children, scrollable = true, keep = false }) {
49
+ function SheetFrame({ open, onClose, children, scrollable = true, footer, keep = false }) {
49
50
  const { theme } = useUnistyles();
50
51
  const insets = useContext(SafeAreaInsetsContext);
51
52
  const sheet = useRef(null);
52
53
  const openRef = useRef(open);
53
54
  const presented = useRef(false);
55
+ const [footerHeight, setFooterHeight] = useState(0);
54
56
  const [note, setNote] = useState();
55
57
  const latest = useRef({
56
58
  keep,
@@ -103,6 +105,24 @@ function SheetFrame({ open, onClose, children, scrollable = true, keep = false }
103
105
  pressBehavior: "close",
104
106
  style: [props.style, { backgroundColor: backdropColor }]
105
107
  }), [backdropColor]);
108
+ const renderFooter = useCallback((props) => /* @__PURE__ */ jsx(BottomSheetFooter, {
109
+ ...props,
110
+ children: /* @__PURE__ */ jsx(View, {
111
+ onLayout: (event) => setFooterHeight(event.nativeEvent.layout.height),
112
+ style: {
113
+ paddingBottom: insets?.bottom ?? 0,
114
+ backgroundColor: theme.colors.rail
115
+ },
116
+ children: /* @__PURE__ */ jsx(InsideSheetContext.Provider, {
117
+ value: true,
118
+ children: footer
119
+ })
120
+ })
121
+ }), [
122
+ footer,
123
+ insets?.bottom,
124
+ theme.colors.rail
125
+ ]);
106
126
  return /* @__PURE__ */ jsx(BottomSheetModal, {
107
127
  ref: sheet,
108
128
  stackBehavior: "push",
@@ -112,6 +132,7 @@ function SheetFrame({ open, onClose, children, scrollable = true, keep = false }
112
132
  keyboardBlurBehavior: "restore",
113
133
  android_keyboardInputMode: "adjustResize",
114
134
  backdropComponent: renderBackdrop,
135
+ ...footer === void 0 ? {} : { footerComponent: renderFooter },
115
136
  backgroundStyle: {
116
137
  backgroundColor: theme.colors.rail,
117
138
  borderRadius: theme.borderRadius.lg
@@ -123,7 +144,7 @@ function SheetFrame({ open, onClose, children, scrollable = true, keep = false }
123
144
  },
124
145
  children: scrollable ? /* @__PURE__ */ jsxs(BottomSheetScrollView, {
125
146
  keyboardShouldPersistTaps: "handled",
126
- contentContainerStyle: [styles.content, { paddingBottom: insets?.bottom ?? 0 }],
147
+ contentContainerStyle: [styles.content, { paddingBottom: footer === void 0 ? insets?.bottom ?? 0 : footerHeight }],
127
148
  children: [note ? /* @__PURE__ */ jsx(SheetNote, { note }) : null, /* @__PURE__ */ jsx(InsideSheetContext.Provider, {
128
149
  value: true,
129
150
  children
@@ -1 +1 @@
1
- {"version":3,"file":"SheetFrame.mjs","names":["withAlpha","BottomSheetBackdrop","BottomSheetBackdropProps","BottomSheetModal","BottomSheetScrollView","ReactNode","useCallback","useContext","useEffect","useRef","useState","BackHandler","Keyboard","SafeAreaInsetsContext","StyleSheet","useUnistyles","fontOf","InsideSheetContext","BACKDROP_ALPHA_PERCENT","SheetFrameProps","open","onClose","children","scrollable","keep","OpenSheet","close","setNote","note","openSheets","yielded","sheetsYielded","yieldSheets","undefined","sheet","index","length","slice","SheetFrame","theme","insets","openRef","presented","latest","current","entry","listed","indexOf","push","dismiss","present","splice","subscription","addEventListener","remove","backdropColor","colors","deep","renderBackdrop","props","style","backgroundColor","top","rail","borderRadius","lg","border","styles","content","paddingBottom","bottom","SheetNote","create","flexGrow","marginHorizontal","spacing","marginBottom","color","magenta","fontFamily","sans","fontSize","sm","lineHeight","uni__dependencies"],"sources":["../../src/components/SheetFrame.tsx"],"sourcesContent":["import { withAlpha } from '@agimon-ai/po-web-components/nativeTheme';\nimport {\n BottomSheetBackdrop,\n type BottomSheetBackdropProps,\n BottomSheetModal,\n BottomSheetScrollView,\n} from '@gorhom/bottom-sheet';\nimport { type ReactNode, useCallback, useContext, useEffect, useRef, useState } from 'react';\nimport { BackHandler, Keyboard, Text } from 'react-native';\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context';\nimport { StyleSheet, useUnistyles } from 'react-native-unistyles';\n\nimport { fontOf } from '../lib/fonts';\nimport { InsideSheetContext } from '../lib/insideSheet';\n\n/** `bg-po-deep/70`, the overlay every web sheet and dialog draws. */\nconst BACKDROP_ALPHA_PERCENT = 70;\n\nexport interface SheetFrameProps {\n open: boolean;\n /** The sheet asked to close: a drag down, a backdrop tap or Android back. */\n onClose: () => void;\n children?: ReactNode;\n /** False when the content supplies its own Gorhom virtualized scroll owner. */\n scrollable?: boolean;\n /** The sheet holds work not yet saved, so a prompt arriving leaves it open with a note instead of closing it. */\n keep?: boolean;\n}\n\ninterface OpenSheet {\n keep: () => boolean;\n close: () => void;\n setNote: (note: string | undefined) => void;\n}\n\n/** Presented sheets, oldest first: one opened from inside another sits after it. */\nconst openSheets: OpenSheet[] = [];\nlet yielded = false;\n\n/** True while a prompt in the conversation holds the screen: a sheet should not open over it on its own. */\nexport function sheetsYielded(): boolean {\n return yielded;\n}\n\n/**\n * Clear the screen for a prompt in the conversation: close sheets from the top down, as a backdrop tap\n * would. The first sheet that keeps unsaved work stops the walk, and it and every sheet under it stay\n * open showing `note`, since closing a sheet also unmounts the sheets opened inside it. Undefined clears\n * the note and closes nothing.\n */\nexport function yieldSheets(note: string | undefined) {\n yielded = note !== undefined;\n if (note === undefined) {\n for (const sheet of openSheets) sheet.setNote(undefined);\n return;\n }\n for (let index = openSheets.length - 1; index >= 0; index -= 1) {\n if (openSheets[index].keep()) {\n for (const sheet of openSheets.slice(0, index + 1)) sheet.setNote(note);\n return;\n }\n openSheets[index].close();\n }\n}\n\n/**\n * The bottom sheet both Sheet and DropdownMenu sit in: a drag handle, sized\n * to its content, closed by dragging down, tapping the backdrop or Android\n * back, clear of the safe area and lifted by the keyboard. Private: the public\n * parts keep bottom-sheet types out of the package API.\n */\nexport function SheetFrame({ open, onClose, children, scrollable = true, keep = false }: SheetFrameProps) {\n const { theme } = useUnistyles();\n const insets = useContext(SafeAreaInsetsContext);\n const sheet = useRef<BottomSheetModal>(null);\n const openRef = useRef(open);\n const presented = useRef(false);\n const [note, setNote] = useState<string>();\n const latest = useRef({ keep, onClose });\n latest.current = { keep, onClose };\n const entry = useRef<OpenSheet>({\n keep: () => latest.current.keep,\n close: () => latest.current.onClose(),\n setNote,\n });\n\n useEffect(() => {\n openRef.current = open;\n const listed = openSheets.indexOf(entry.current);\n if (open) {\n presented.current = true;\n if (listed < 0) openSheets.push(entry.current);\n // The keyboard of the field behind would cover the sheet; a field inside it focuses after this.\n Keyboard.dismiss();\n sheet.current?.present();\n } else {\n if (listed >= 0) openSheets.splice(listed, 1);\n setNote(undefined);\n if (presented.current) {\n // Only a presented sheet is dismissed. Dismissing one that never opened leaves bottom-sheet's\n // modal stuck in its dismissing status, and the next present() then never draws.\n presented.current = false;\n sheet.current?.dismiss();\n }\n }\n }, [open]);\n\n useEffect(\n () => () => {\n const listed = openSheets.indexOf(entry.current);\n if (listed >= 0) openSheets.splice(listed, 1);\n },\n [],\n );\n\n useEffect(() => {\n if (!open) return undefined;\n const subscription = BackHandler.addEventListener('hardwareBackPress', () => {\n onClose();\n return true;\n });\n return () => subscription.remove();\n }, [open, onClose]);\n\n const backdropColor = withAlpha(theme.colors.deep, BACKDROP_ALPHA_PERCENT);\n const renderBackdrop = useCallback(\n (props: BottomSheetBackdropProps) => (\n <BottomSheetBackdrop\n {...props}\n appearsOnIndex={0}\n disappearsOnIndex={-1}\n opacity={1}\n pressBehavior=\"close\"\n style={[props.style, { backgroundColor: backdropColor }]}\n />\n ),\n [backdropColor],\n );\n\n return (\n <BottomSheetModal\n ref={sheet}\n stackBehavior=\"push\"\n enablePanDownToClose\n topInset={insets?.top ?? 0}\n keyboardBehavior=\"interactive\"\n keyboardBlurBehavior=\"restore\"\n android_keyboardInputMode=\"adjustResize\"\n backdropComponent={renderBackdrop}\n backgroundStyle={{ backgroundColor: theme.colors.rail, borderRadius: theme.borderRadius.lg }}\n handleIndicatorStyle={{ backgroundColor: theme.colors.border }}\n // A sheet the caller closed is already shut; only a close the sheet started is reported.\n onDismiss={() => {\n // Already shut, so the close the parent answers with must not dismiss it a second time.\n presented.current = false;\n if (openRef.current) onClose();\n }}\n >\n {scrollable ? (\n <BottomSheetScrollView\n keyboardShouldPersistTaps=\"handled\"\n contentContainerStyle={[styles.content, { paddingBottom: insets?.bottom ?? 0 }]}\n >\n {note ? <SheetNote note={note} /> : null}\n <InsideSheetContext.Provider value>{children}</InsideSheetContext.Provider>\n </BottomSheetScrollView>\n ) : (\n <>\n {note ? <SheetNote note={note} /> : null}\n <InsideSheetContext.Provider value>{children}</InsideSheetContext.Provider>\n </>\n )}\n </BottomSheetModal>\n );\n}\n\n/** A gentle rose line: the person is asked something below, never told to hurry. */\nfunction SheetNote({ note }: { note: string }) {\n return (\n <Text style={styles.note} accessibilityRole=\"alert\">\n {note}\n </Text>\n );\n}\n\nconst styles = StyleSheet.create((theme) => ({\n content: { flexGrow: 1 },\n note: {\n marginHorizontal: theme.spacing(4),\n marginBottom: theme.spacing(2),\n color: theme.colors.magenta,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n },\n}));\n"],"mappings":";;;;;;;;;;;;;AAgBA,MAAMkB,yBAAyB;;AA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C,uBAAD;GACE,2BAA0B;GAC1B,uBAAuB,CAAC4C,OAAOC,SAAS,EAAEC,eAAe7B,QAAQ8B,UAAU,EAAE,CAAC;aAFhF,CAIG1C,OAAO,oBAAC,WAAD,EAAiBA,KAAK,KAAM,MACpC,oBAAC,mBAAmB,UAApB;IAA6B;IAAON;GAAsC,EACrD;OAEvB,4CACGM,OAAO,oBAAC,WAAD,EAAiBA,KAAK,KAAM,MACpC,oBAAC,mBAAmB,UAApB;GAA6B;GAAON;EAAsC,EAC5E;CAEc;AAEtB;;AAGA,SAASiD,UAAU,EAAE3C,QAA0B;CAC7C,OACE,oBAAC,MAAD;EAAM,OAAOuC,OAAOvC;EAAM,mBAAkB;YACzCA;CACG;AAEV;AAEA,MAAMuC,SAASrD,WAAW0D,QAAQjC,WAAW;CAC3C6B,SAAS,EAAEK,UAAU,EAAE;CACvB7C,MAAM;EACJ8C,kBAAkBnC,MAAMoC,QAAQ,CAAC;EACjCC,cAAcrC,MAAMoC,QAAQ,CAAC;EAC7BE,OAAOtC,MAAMiB,OAAOsB;EACpBC,YAAY/D,OAAOuB,MAAMwC,WAAWC,IAAI;EACxCC,UAAU1C,MAAM0C,SAASC;EACzBC,YAAY5C,MAAM4C,WAAWD;EAAEE,mBAAA,CAAA,CAAA;CACjC;AACF,EAAE"}
1
+ {"version":3,"file":"SheetFrame.mjs","names":["withAlpha","BottomSheetBackdrop","BottomSheetBackdropProps","BottomSheetModal","BottomSheetFooter","BottomSheetFooterProps","BottomSheetScrollView","ReactNode","useCallback","useContext","useEffect","useRef","useState","BackHandler","Keyboard","SafeAreaInsetsContext","StyleSheet","useUnistyles","fontOf","InsideSheetContext","BACKDROP_ALPHA_PERCENT","SheetFrameProps","open","onClose","children","footer","scrollable","keep","OpenSheet","close","setNote","note","openSheets","yielded","sheetsYielded","yieldSheets","undefined","sheet","index","length","slice","SheetFrame","theme","insets","openRef","presented","footerHeight","setFooterHeight","latest","current","entry","listed","indexOf","push","dismiss","present","splice","subscription","addEventListener","remove","backdropColor","colors","deep","renderBackdrop","props","style","backgroundColor","renderFooter","event","nativeEvent","layout","height","paddingBottom","bottom","rail","top","footerComponent","borderRadius","lg","border","styles","content","SheetNote","create","flexGrow","marginHorizontal","spacing","marginBottom","color","magenta","fontFamily","sans","fontSize","sm","lineHeight","uni__dependencies"],"sources":["../../src/components/SheetFrame.tsx"],"sourcesContent":["import { withAlpha } from '@agimon-ai/po-web-components/nativeTheme';\nimport {\n BottomSheetBackdrop,\n type BottomSheetBackdropProps,\n BottomSheetModal,\n BottomSheetFooter,\n type BottomSheetFooterProps,\n BottomSheetScrollView,\n} from '@gorhom/bottom-sheet';\nimport { type ReactNode, useCallback, useContext, useEffect, useRef, useState } from 'react';\nimport { BackHandler, Keyboard, Text, View } from 'react-native';\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context';\nimport { StyleSheet, useUnistyles } from 'react-native-unistyles';\n\nimport { fontOf } from '../lib/fonts';\nimport { InsideSheetContext } from '../lib/insideSheet';\n\n/** `bg-po-deep/70`, the overlay every web sheet and dialog draws. */\nconst BACKDROP_ALPHA_PERCENT = 70;\n\nexport interface SheetFrameProps {\n open: boolean;\n /** The sheet asked to close: a drag down, a backdrop tap or Android back. */\n onClose: () => void;\n children?: ReactNode;\n footer?: ReactNode;\n /** False when the content supplies its own Gorhom virtualized scroll owner. */\n scrollable?: boolean;\n /** The sheet holds work not yet saved, so a prompt arriving leaves it open with a note instead of closing it. */\n keep?: boolean;\n}\n\ninterface OpenSheet {\n keep: () => boolean;\n close: () => void;\n setNote: (note: string | undefined) => void;\n}\n\n/** Presented sheets, oldest first: one opened from inside another sits after it. */\nconst openSheets: OpenSheet[] = [];\nlet yielded = false;\n\n/** True while a prompt in the conversation holds the screen: a sheet should not open over it on its own. */\nexport function sheetsYielded(): boolean {\n return yielded;\n}\n\n/**\n * Clear the screen for a prompt in the conversation: close sheets from the top down, as a backdrop tap\n * would. The first sheet that keeps unsaved work stops the walk, and it and every sheet under it stay\n * open showing `note`, since closing a sheet also unmounts the sheets opened inside it. Undefined clears\n * the note and closes nothing.\n */\nexport function yieldSheets(note: string | undefined) {\n yielded = note !== undefined;\n if (note === undefined) {\n for (const sheet of openSheets) sheet.setNote(undefined);\n return;\n }\n for (let index = openSheets.length - 1; index >= 0; index -= 1) {\n if (openSheets[index].keep()) {\n for (const sheet of openSheets.slice(0, index + 1)) sheet.setNote(note);\n return;\n }\n openSheets[index].close();\n }\n}\n\n/**\n * The bottom sheet both Sheet and DropdownMenu sit in: a drag handle, sized\n * to its content, closed by dragging down, tapping the backdrop or Android\n * back, clear of the safe area and lifted by the keyboard. Private: the public\n * parts keep bottom-sheet types out of the package API.\n */\nexport function SheetFrame({ open, onClose, children, scrollable = true, footer, keep = false }: SheetFrameProps) {\n const { theme } = useUnistyles();\n const insets = useContext(SafeAreaInsetsContext);\n const sheet = useRef<BottomSheetModal>(null);\n const openRef = useRef(open);\n const presented = useRef(false);\n const [footerHeight, setFooterHeight] = useState(0);\n const [note, setNote] = useState<string>();\n const latest = useRef({ keep, onClose });\n latest.current = { keep, onClose };\n const entry = useRef<OpenSheet>({\n keep: () => latest.current.keep,\n close: () => latest.current.onClose(),\n setNote,\n });\n\n useEffect(() => {\n openRef.current = open;\n const listed = openSheets.indexOf(entry.current);\n if (open) {\n presented.current = true;\n if (listed < 0) openSheets.push(entry.current);\n // The keyboard of the field behind would cover the sheet; a field inside it focuses after this.\n Keyboard.dismiss();\n sheet.current?.present();\n } else {\n if (listed >= 0) openSheets.splice(listed, 1);\n setNote(undefined);\n if (presented.current) {\n // Only a presented sheet is dismissed. Dismissing one that never opened leaves bottom-sheet's\n // modal stuck in its dismissing status, and the next present() then never draws.\n presented.current = false;\n sheet.current?.dismiss();\n }\n }\n }, [open]);\n\n useEffect(\n () => () => {\n const listed = openSheets.indexOf(entry.current);\n if (listed >= 0) openSheets.splice(listed, 1);\n },\n [],\n );\n\n useEffect(() => {\n if (!open) return undefined;\n const subscription = BackHandler.addEventListener('hardwareBackPress', () => {\n onClose();\n return true;\n });\n return () => subscription.remove();\n }, [open, onClose]);\n\n const backdropColor = withAlpha(theme.colors.deep, BACKDROP_ALPHA_PERCENT);\n const renderBackdrop = useCallback(\n (props: BottomSheetBackdropProps) => (\n <BottomSheetBackdrop\n {...props}\n appearsOnIndex={0}\n disappearsOnIndex={-1}\n opacity={1}\n pressBehavior=\"close\"\n style={[props.style, { backgroundColor: backdropColor }]}\n />\n ),\n [backdropColor],\n );\n\n const renderFooter = useCallback(\n (props: BottomSheetFooterProps) => (\n <BottomSheetFooter {...props}>\n <View\n onLayout={(event) => setFooterHeight(event.nativeEvent.layout.height)}\n style={{ paddingBottom: insets?.bottom ?? 0, backgroundColor: theme.colors.rail }}\n >\n <InsideSheetContext.Provider value>{footer}</InsideSheetContext.Provider>\n </View>\n </BottomSheetFooter>\n ),\n [footer, insets?.bottom, theme.colors.rail],\n );\n\n return (\n <BottomSheetModal\n ref={sheet}\n stackBehavior=\"push\"\n enablePanDownToClose\n topInset={insets?.top ?? 0}\n keyboardBehavior=\"interactive\"\n keyboardBlurBehavior=\"restore\"\n android_keyboardInputMode=\"adjustResize\"\n backdropComponent={renderBackdrop}\n {...(footer === undefined ? {} : { footerComponent: renderFooter })}\n backgroundStyle={{ backgroundColor: theme.colors.rail, borderRadius: theme.borderRadius.lg }}\n handleIndicatorStyle={{ backgroundColor: theme.colors.border }}\n // A sheet the caller closed is already shut; only a close the sheet started is reported.\n onDismiss={() => {\n // Already shut, so the close the parent answers with must not dismiss it a second time.\n presented.current = false;\n if (openRef.current) onClose();\n }}\n >\n {scrollable ? (\n <BottomSheetScrollView\n keyboardShouldPersistTaps=\"handled\"\n contentContainerStyle={[\n styles.content,\n { paddingBottom: footer === undefined ? (insets?.bottom ?? 0) : footerHeight },\n ]}\n >\n {note ? <SheetNote note={note} /> : null}\n <InsideSheetContext.Provider value>{children}</InsideSheetContext.Provider>\n </BottomSheetScrollView>\n ) : (\n <>\n {note ? <SheetNote note={note} /> : null}\n <InsideSheetContext.Provider value>{children}</InsideSheetContext.Provider>\n </>\n )}\n </BottomSheetModal>\n );\n}\n\n/** A gentle rose line: the person is asked something below, never told to hurry. */\nfunction SheetNote({ note }: { note: string }) {\n return (\n <Text style={styles.note} accessibilityRole=\"alert\">\n {note}\n </Text>\n );\n}\n\nconst styles = StyleSheet.create((theme) => ({\n content: { flexGrow: 1 },\n note: {\n marginHorizontal: theme.spacing(4),\n marginBottom: theme.spacing(2),\n color: theme.colors.magenta,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n },\n}));\n"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAMoB,yBAAyB;;AAqB/B,MAAMY,aAA0B,CAAA;AAChC,IAAIC,UAAU;;AAGd,SAAgBC,gBAAyB;CACvC,OAAOD;AACT;;;;;;;AAQA,SAAgBE,YAAYJ,MAA0B;CACpDE,UAAUF,SAASK;CACnB,IAAIL,SAASK,QAAW;EACtB,KAAK,MAAMC,SAASL,YAAYK,MAAMP,QAAQM,MAAS;EACvD;CACF;CACA,KAAK,IAAIE,QAAQN,WAAWO,SAAS,GAAGD,SAAS,GAAGA,SAAS,GAAG;EAC9D,IAAIN,WAAWM,MAAM,CAACX,KAAK,GAAG;GAC5B,KAAK,MAAMU,SAASL,WAAWQ,MAAM,GAAGF,QAAQ,CAAC,GAAGD,MAAMP,QAAQC,IAAI;GACtE;EACF;EACAC,WAAWM,MAAM,CAACT,MAAM;CAC1B;AACF;;;;;;;AAQA,SAAgBY,WAAW,EAAEnB,MAAMC,SAASC,UAAUE,aAAa,MAAMD,QAAQE,OAAO,SAA0B;CAChH,MAAM,EAAEe,UAAUzB,aAAa;CAC/B,MAAM0B,SAASlC,WAAWM,qBAAqB;CAC/C,MAAMsB,QAAQ1B,OAAyB,IAAI;CAC3C,MAAMiC,UAAUjC,OAAOW,IAAI;CAC3B,MAAMuB,YAAYlC,OAAO,KAAK;CAC9B,MAAM,CAACmC,cAAcC,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UAApB;GAA6B;GAAOP;EAAsC,EAC5E;CAEc;AAEtB;;AAGA,SAAS0D,UAAU,EAAEnD,QAA0B;CAC7C,OACE,oBAAC,MAAD;EAAM,OAAOiD,OAAOjD;EAAM,mBAAkB;YACzCA;CACG;AAEV;AAEA,MAAMiD,SAAShE,WAAWmE,QAAQzC,WAAW;CAC3CuC,SAAS,EAAEG,UAAU,EAAE;CACvBrD,MAAM;EACJsD,kBAAkB3C,MAAM4C,QAAQ,CAAC;EACjCC,cAAc7C,MAAM4C,QAAQ,CAAC;EAC7BE,OAAO9C,MAAMmB,OAAO4B;EACpBC,YAAYxE,OAAOwB,MAAMgD,WAAWC,IAAI;EACxCC,UAAUlD,MAAMkD,SAASC;EACzBC,YAAYpD,MAAMoD,WAAWD;EAAEE,mBAAA,CAAA,CAAA;CACjC;AACF,EAAE"}
package/dist/index.d.mts CHANGED
@@ -34,5 +34,8 @@ import { IconName } from "./icons/iconGlyphs.mjs";
34
34
  import { fontOf } from "./lib/fonts.mjs";
35
35
  import { IconColorContext } from "./icons/IconColorContext.mjs";
36
36
  import { impactLight, selectionTick } from "./lib/haptics.mjs";
37
+ import { HostFilter, HostFilterProps } from "./components/HostFilter.mjs";
38
+ import { HostTag } from "./components/HostTag.mjs";
39
+ import { InfoStrip } from "./components/InfoStrip.mjs";
37
40
  import { AnsiSpan, PresentedLine, ReviewComment, ansiSpans, buildReviewPrompt, collapseLines, hashlineBody, resultTextLines } from "@agimon-ai/po-web-components/text";
38
- export { ActivityIcon, AgentAvatar, type AgentState, AlertIcon, type AnnotationMark, AnnotationSurface, type AnnotationSurfaceProps, 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, GlobeIcon, HashlineLines, type HashlineLinesProps, HomeIcon, IconColorContext, type IconName, type IconProps, ImageIcon, Input, type InputProps, KebabIcon, Label, type LabelProps, LightbulbIcon, List, type ListProps, ListRow, type ListRowProps, LiveDuration, type LiveDurationProps, type LiveDurationReading, 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, SheetList, type SheetListProps, type SheetPartProps, type SheetProps, SheetTitle, SheetTrigger, ShowMore, type ShowMoreProps, 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, sheetsYielded, toolTone, useMessageItem, useSyntaxLines, yieldSheets };
41
+ export { ActivityIcon, AgentAvatar, type AgentState, AlertIcon, type AnnotationMark, AnnotationSurface, type AnnotationSurfaceProps, 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, GlobeIcon, HashlineLines, type HashlineLinesProps, HomeIcon, HostFilter, type HostFilterProps, HostTag, IconColorContext, type IconName, type IconProps, ImageIcon, InfoStrip, Input, type InputProps, KebabIcon, Label, type LabelProps, LightbulbIcon, List, type ListProps, ListRow, type ListRowProps, LiveDuration, type LiveDurationProps, type LiveDurationReading, 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, SheetList, type SheetListProps, type SheetPartProps, type SheetProps, SheetTitle, SheetTrigger, ShowMore, type ShowMoreProps, 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, sheetsYielded, toolTone, useMessageItem, useSyntaxLines, yieldSheets };
package/dist/index.mjs CHANGED
@@ -33,6 +33,9 @@ import { SheetList } from "./components/SheetList.mjs";
33
33
  import { TabBadge, Tabs, TabsContent, TabsList, TabsTrigger } from "./components/Tabs.mjs";
34
34
  import { Textarea } from "./components/Textarea.mjs";
35
35
  import { ToolPathLink } from "./components/ToolPathLink.mjs";
36
+ import { HostFilter } from "./components/HostFilter.mjs";
37
+ import { HostTag } from "./components/HostTag.mjs";
38
+ import { InfoStrip } from "./components/InfoStrip.mjs";
36
39
  import { ansiSpans, buildReviewPrompt, collapseLines, hashlineBody, resultTextLines } from "@agimon-ai/po-web-components/text";
37
40
 
38
- export { ActivityIcon, AgentAvatar, AlertIcon, AnnotationSurface, 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, GlobeIcon, HashlineLines, HomeIcon, IconColorContext, ImageIcon, Input, KebabIcon, Label, LightbulbIcon, List, ListRow, LiveDuration, 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, SheetList, SheetTitle, SheetTrigger, ShowMore, 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, sheetsYielded, toolTone, useMessageItem, useSyntaxLines, yieldSheets };
41
+ export { ActivityIcon, AgentAvatar, AlertIcon, AnnotationSurface, 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, GlobeIcon, HashlineLines, HomeIcon, HostFilter, HostTag, IconColorContext, ImageIcon, InfoStrip, Input, KebabIcon, Label, LightbulbIcon, List, ListRow, LiveDuration, 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, SheetList, SheetTitle, SheetTrigger, ShowMore, 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, sheetsYielded, toolTone, useMessageItem, useSyntaxLines, yieldSheets };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/po-native-components",
3
- "version": "0.0.0-alpha.51",
3
+ "version": "0.0.0-alpha.53",
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.51"
48
+ "@agimon-ai/po-web-components": "0.0.0-alpha.53"
49
49
  },
50
50
  "devDependencies": {
51
- "@agimon-ai/po-build": "0.0.0-alpha.51",
52
- "@agimon-ai/vibe-lint-plugin-po-web": "0.0.0-alpha.51",
51
+ "@agimon-ai/po-build": "0.0.0-alpha.53",
52
+ "@agimon-ai/vibe-lint-plugin-po-web": "0.0.0-alpha.53",
53
53
  "@babel/core": "7.29.7",
54
54
  "@expo/vector-icons": "15.1.1",
55
55
  "@fontsource-variable/ibm-plex-sans": "5.3.0",