@agimon-ai/po-native-components 0.0.0-alpha.197 → 0.0.0-alpha.199
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 +5 -0
- package/dist/components/AgentAvatar.d.mts.map +1 -1
- package/dist/components/AgentAvatar.mjs +2 -1
- package/dist/components/AgentAvatar.mjs.map +1 -1
- package/dist/components/EmptyState.mjs +18 -8
- package/dist/components/EmptyState.mjs.map +1 -1
- package/dist/components/FileViewer.d.mts +2 -0
- package/dist/components/FileViewer.d.mts.map +1 -1
- package/dist/components/FileViewer.mjs +6 -4
- package/dist/components/FileViewer.mjs.map +1 -1
- package/dist/icons/iconGlyphs.d.mts +4 -0
- package/dist/icons/iconGlyphs.d.mts.map +1 -1
- package/dist/icons/iconGlyphs.mjs +4 -0
- package/dist/icons/iconGlyphs.mjs.map +1 -1
- package/dist/icons/icons.d.mts +4 -0
- package/dist/icons/icons.d.mts.map +1 -1
- package/dist/icons/icons.mjs +2 -1
- package/dist/icons/icons.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/po-runtime-identity.json +1 -1
- package/package.json +6 -6
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
export type AgentState = 'running' | 'waiting' | 'done' | 'failed';
|
|
4
4
|
/** One letter for a first name, two for a hyphenated agent name (`po-developer` is PD). */
|
|
5
5
|
export declare function agentInitials(name: string): string;
|
|
6
|
+
declare const TINTS: readonly ["green", "teal", "blue", "cyan", "yellow", "violet"];
|
|
7
|
+
export type Tint = (typeof TINTS)[number];
|
|
8
|
+
/** The tint an avatar seed always reads as, so surfaces outside React Native can paint the same face. */
|
|
9
|
+
export declare function tintFor(seed: string): Tint;
|
|
6
10
|
/** An agent's face: its initials on a tint fixed by `seed`, with its state as a corner dot. */
|
|
7
11
|
export declare function AgentAvatar({ name, seed, state, size }: {
|
|
8
12
|
name: string;
|
|
@@ -11,4 +15,5 @@ export declare function AgentAvatar({ name, seed, state, size }: {
|
|
|
11
15
|
size?: 'sm' | 'md';
|
|
12
16
|
}): import("react").JSX.Element;
|
|
13
17
|
//#endregion
|
|
18
|
+
export {};
|
|
14
19
|
//# sourceMappingURL=AgentAvatar.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentAvatar.d.mts","names":[],"sources":["../../src/components/AgentAvatar.tsx"],"mappings":";;YAQY;;wBAGI,cAAc;;
|
|
1
|
+
{"version":3,"file":"AgentAvatar.d.mts","names":[],"sources":["../../src/components/AgentAvatar.tsx"],"mappings":";;YAQY;;wBAGI,cAAc;cAUxB;YACM,eAAe;;wBAGX,QAAQ,eAAe;;wBAgBvB,cACd,MACA,MACA,OACA;EAEA;EACA;EACA,QAAQ;EACR;oBACD,IAAA"}
|
|
@@ -18,6 +18,7 @@ const TINTS = [
|
|
|
18
18
|
"yellow",
|
|
19
19
|
"violet"
|
|
20
20
|
];
|
|
21
|
+
/** The tint an avatar seed always reads as, so surfaces outside React Native can paint the same face. */
|
|
21
22
|
function tintFor(seed) {
|
|
22
23
|
let hash = 0;
|
|
23
24
|
for (const char of seed) hash = (hash * 31 + char.charCodeAt(0)) % 997;
|
|
@@ -83,5 +84,5 @@ const styles = StyleSheet.create((theme) => ({
|
|
|
83
84
|
}));
|
|
84
85
|
|
|
85
86
|
//#endregion
|
|
86
|
-
export { AgentAvatar, agentInitials };
|
|
87
|
+
export { AgentAvatar, agentInitials, tintFor };
|
|
87
88
|
//# sourceMappingURL=AgentAvatar.mjs.map
|
|
@@ -1 +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;\
|
|
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;\nexport type Tint = (typeof TINTS)[number];\n\n/** The tint an avatar seed always reads as, so surfaces outside React Native can paint the same face. */\nexport function 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;;AAIlE,SAAgBG,QAAQC,MAAoB;CAC1C,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"}
|
|
@@ -22,12 +22,18 @@ function EmptyState({ title, description, icon, action, secondaryAction, size =
|
|
|
22
22
|
accessibilityLiveRegion: error ? "polite" : void 0,
|
|
23
23
|
style: [styles.inline, style],
|
|
24
24
|
children: [
|
|
25
|
-
/* @__PURE__ */ jsxs(
|
|
26
|
-
style:
|
|
27
|
-
children: [/* @__PURE__ */ jsx(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
})
|
|
25
|
+
/* @__PURE__ */ jsxs(View, {
|
|
26
|
+
style: styles.inlineRow,
|
|
27
|
+
children: [error ? /* @__PURE__ */ jsx(AlertIcon, {
|
|
28
|
+
size: 14,
|
|
29
|
+
color: "red"
|
|
30
|
+
}) : null, /* @__PURE__ */ jsxs(Text, {
|
|
31
|
+
style: styles.inlineText,
|
|
32
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
33
|
+
style: styles.inlineTitle,
|
|
34
|
+
children: title
|
|
35
|
+
}), description ? /* @__PURE__ */ jsxs(Fragment, { children: [" · ", description] }) : null]
|
|
36
|
+
})]
|
|
31
37
|
}),
|
|
32
38
|
action || secondaryAction ? /* @__PURE__ */ jsxs(View, {
|
|
33
39
|
style: styles.actions,
|
|
@@ -124,6 +130,7 @@ const styles = StyleSheet.create((theme) => ({
|
|
|
124
130
|
uni__dependencies: [0]
|
|
125
131
|
},
|
|
126
132
|
inlineText: {
|
|
133
|
+
flexShrink: 1,
|
|
127
134
|
color: theme.colors.dim,
|
|
128
135
|
fontFamily: fontOf(theme.fontFamily.sans),
|
|
129
136
|
fontSize: theme.fontSize.sm,
|
|
@@ -134,8 +141,11 @@ const styles = StyleSheet.create((theme) => ({
|
|
|
134
141
|
fontWeight: theme.fontWeight.medium,
|
|
135
142
|
uni__dependencies: [0]
|
|
136
143
|
},
|
|
137
|
-
|
|
138
|
-
|
|
144
|
+
inlineRow: {
|
|
145
|
+
flexDirection: "row",
|
|
146
|
+
alignItems: "center",
|
|
147
|
+
gap: theme.spacing(1),
|
|
148
|
+
minWidth: 0,
|
|
139
149
|
uni__dependencies: [0]
|
|
140
150
|
},
|
|
141
151
|
frame: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyState.mjs","names":["IconColorContext","ReactNode","StyleProp","ViewStyle","StyleSheet","AlertIcon","fontOf","wrapText","Button","EmptyStateAction","label","onAction","loading","disabled","testId","EmptyStateSize","EmptyStateProps","title","description","icon","action","secondaryAction","size","surface","tone","children","style","testID","EmptyState","_styles","styles","useVariants","compact","error","undefined","inline","inlineText","inlineError","inlineTitle","actions","glyph","ICON_SIZE","frame","card","iconEdgeError","iconEdge","content","copy","BUTTON_SIZE","page","panel","const","create","theme","alignSelf","minWidth","alignItems","gap","spacing","uni__dependencies","color","colors","dim","fontFamily","sans","fontSize","sm","lineHeight","fontWeight","medium","red","variants","flex","justifyContent","paddingHorizontal","paddingVertical","width","maxWidth","padding","flexDirection","borderRadius","md","borderWidth","borderStyle","borderColor","border","height","backgroundColor","deep","base","flexWrap","hi","semibold","xl","letterSpacing","textAlign","lg","lineHeightRelaxed"],"sources":["../../src/components/EmptyState.tsx"],"sourcesContent":["import { IconColorContext } from '@agimon-ai/po-native-components/shell';\nimport type { ReactNode } from 'react';\nimport { type StyleProp, Text, View, type ViewStyle } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { AlertIcon } from '../icons/icons';\nimport { fontOf } from '../lib/fonts';\nimport { wrapText } from '../lib/wrapText';\nimport { Button } from './Button';\n\n/** One button an empty state offers: the next step that fills the surface. */\nexport interface EmptyStateAction {\n label: string;\n onAction: () => void;\n loading?: boolean;\n disabled?: boolean;\n testId?: string;\n}\n\nexport type EmptyStateSize = 'page' | 'panel' | 'compact' | 'inline';\n\nexport interface EmptyStateProps {\n title: ReactNode;\n /** Guidance: why the surface is empty and what fills it. */\n description?: ReactNode;\n /** A glyph from the icon set, drawn in a quiet badge above the title (beside it when compact). Defaults to an alert glyph when `tone` is `error`. */\n icon?: ReactNode;\n /** The one primary step. Filled jade on page and panel, outline when compact. */\n action?: EmptyStateAction;\n /** A quieter second step, such as clearing a filter or retrying. */\n secondaryAction?: EmptyStateAction;\n /**\n * page: a whole screen. panel: a dock or tab (the default).\n * compact: a list row; left-aligned and never takes `flex: 1`.\n * inline: one quiet line under a header that already names the surface, such as an activity card.\n * Drops the icon and frame; `surface` does not apply.\n */\n size?: EmptyStateSize;\n /** `plain` drops the card border when the empty state already sits inside a card. */\n surface?: 'card' | 'plain';\n /** `error` announces the state as an alert and tints only the icon red. */\n tone?: 'neutral' | 'error';\n /** Anything under the actions: a hint, a status line. */\n children?: ReactNode;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n}\n\n/** The card every empty screen and panel shares: icon, title, guidance and, when the person can act, the next step. */\nexport function EmptyState({\n title,\n description,\n icon,\n action,\n secondaryAction,\n size = 'panel',\n surface = 'card',\n tone = 'neutral',\n children,\n style,\n testID,\n}: EmptyStateProps) {\n // Inline has no variant styles of its own; hooks still run on every render.\n styles.useVariants({ size: size === 'inline' ? 'compact' : size });\n const compact = size === 'compact';\n const error = tone === 'error';\n if (size === 'inline') {\n return (\n <View\n testID={testID}\n accessibilityRole={error ? 'alert' : undefined}\n accessibilityLiveRegion={error ? 'polite' : undefined}\n style={[styles.inline, style]}\n >\n <Text style={[styles.inlineText, error && styles.inlineError]}>\n <Text style={styles.inlineTitle}>{title}</Text>\n {description ? <> · {description}</> : null}\n </Text>\n {action || secondaryAction ? (\n <View style={styles.actions}>\n {action ? (\n <Button\n variant=\"outline\"\n size=\"sm\"\n loading={action.loading}\n disabled={action.disabled}\n testID={action.testId}\n onPress={action.onAction}\n >\n {action.label}\n </Button>\n ) : null}\n {secondaryAction ? (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n loading={secondaryAction.loading}\n disabled={secondaryAction.disabled}\n testID={secondaryAction.testId}\n onPress={secondaryAction.onAction}\n >\n {secondaryAction.label}\n </Button>\n ) : null}\n </View>\n ) : null}\n {children}\n </View>\n );\n }\n const glyph = icon ?? (error ? <AlertIcon size={ICON_SIZE[size]} /> : null);\n return (\n <View\n testID={testID}\n accessibilityRole={error ? 'alert' : undefined}\n accessibilityLiveRegion={error ? 'polite' : undefined}\n style={[styles.frame, style]}\n >\n <View style={[styles.card, surface === 'card' && styles.surface]}>\n {glyph ? (\n <View\n accessible={false}\n importantForAccessibility=\"no-hide-descendants\"\n style={[styles.icon, !compact && (error ? styles.iconEdgeError : styles.iconEdge)]}\n >\n <IconColorContext.Provider value={error ? 'red' : 'dim'}>{glyph}</IconColorContext.Provider>\n </View>\n ) : null}\n <View style={styles.content}>\n <View style={styles.copy}>\n <View accessibilityRole=\"header\">{wrapText(title, styles.title)}</View>\n {description ? wrapText(description, styles.description) : null}\n </View>\n {action || secondaryAction ? (\n <View style={styles.actions}>\n {action ? (\n <Button\n variant={compact ? 'outline' : 'primary'}\n size={BUTTON_SIZE[size]}\n loading={action.loading}\n disabled={action.disabled}\n testID={action.testId}\n onPress={action.onAction}\n >\n {action.label}\n </Button>\n ) : null}\n {secondaryAction ? (\n <Button\n variant={compact ? 'ghost' : 'outline'}\n size={BUTTON_SIZE[size]}\n loading={secondaryAction.loading}\n disabled={secondaryAction.disabled}\n testID={secondaryAction.testId}\n onPress={secondaryAction.onAction}\n >\n {secondaryAction.label}\n </Button>\n ) : null}\n </View>\n ) : null}\n {children}\n </View>\n </View>\n </View>\n );\n}\n\nconst BUTTON_SIZE = { page: 'lg', panel: 'md', compact: 'sm' } as const;\nconst ICON_SIZE = { page: 24, panel: 20, compact: 16 } as const;\nconst styles = StyleSheet.create((theme) => ({\n inline: { alignSelf: 'stretch', minWidth: 0, alignItems: 'flex-start', gap: theme.spacing(2) },\n inlineText: {\n color: theme.colors.dim,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n },\n inlineTitle: { fontWeight: theme.fontWeight.medium },\n inlineError: { color: theme.colors.red },\n frame: {\n minWidth: 0,\n variants: {\n size: {\n page: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n paddingHorizontal: theme.spacing(3),\n paddingVertical: theme.spacing(6),\n },\n panel: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n paddingHorizontal: theme.spacing(3),\n paddingVertical: theme.spacing(4),\n },\n compact: { alignSelf: 'stretch' },\n },\n },\n },\n card: {\n width: '100%',\n minWidth: 0,\n variants: {\n size: {\n page: { maxWidth: 520, alignItems: 'center', gap: theme.spacing(3), padding: theme.spacing(6) },\n panel: { maxWidth: 520, alignItems: 'center', gap: theme.spacing(3), padding: theme.spacing(5) },\n compact: { flexDirection: 'row', alignItems: 'flex-start', gap: theme.spacing(2.5), padding: theme.spacing(3) },\n },\n },\n },\n // A quiet dashed outline with no fill, as on the web.\n surface: {\n borderRadius: theme.borderRadius.md,\n borderWidth: 1,\n borderStyle: 'dashed',\n borderColor: theme.colors.border,\n },\n icon: {\n alignItems: 'center',\n justifyContent: 'center',\n variants: {\n size: {\n page: { width: 48, height: 48, borderRadius: 24, backgroundColor: theme.colors.deep },\n panel: { width: 40, height: 40, borderRadius: 20, backgroundColor: theme.colors.deep },\n compact: { width: 20, height: theme.lineHeight.base },\n },\n },\n },\n iconEdge: { borderWidth: 1, borderColor: theme.colors['border-soft'] },\n iconEdgeError: { borderWidth: 1, borderColor: theme.colors['edge-red'] },\n content: {\n minWidth: 0,\n variants: {\n size: {\n page: { alignSelf: 'stretch', alignItems: 'center', gap: theme.spacing(4) },\n panel: { alignSelf: 'stretch', alignItems: 'center', gap: theme.spacing(4) },\n compact: { flex: 1, alignItems: 'flex-start', gap: theme.spacing(2) },\n },\n },\n },\n copy: {\n minWidth: 0,\n variants: {\n size: {\n page: { alignItems: 'center', gap: theme.spacing(1.5) },\n panel: { alignItems: 'center', gap: theme.spacing(1.5) },\n compact: { alignSelf: 'stretch', gap: theme.spacing(0.5) },\n },\n },\n },\n actions: {\n flexDirection: 'row',\n flexWrap: 'wrap',\n alignItems: 'center',\n gap: theme.spacing(2),\n variants: {\n size: {\n page: { justifyContent: 'center' },\n panel: { justifyContent: 'center' },\n compact: { justifyContent: 'flex-start' },\n },\n },\n },\n title: {\n color: theme.colors.hi,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontWeight: theme.fontWeight.semibold,\n variants: {\n size: {\n page: {\n fontSize: theme.fontSize.xl,\n lineHeight: theme.lineHeight.xl,\n letterSpacing: theme.letterSpacing.xl,\n textAlign: 'center',\n },\n panel: { fontSize: theme.fontSize.lg, lineHeight: theme.lineHeight.lg, textAlign: 'center' },\n compact: { fontSize: theme.fontSize.base, lineHeight: theme.lineHeight.base },\n },\n },\n },\n description: {\n color: theme.colors.dim,\n fontFamily: fontOf(theme.fontFamily.sans),\n variants: {\n size: {\n page: {\n maxWidth: 360,\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeightRelaxed.base,\n textAlign: 'center',\n },\n panel: {\n maxWidth: 360,\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeightRelaxed.base,\n textAlign: 'center',\n },\n compact: { fontSize: theme.fontSize.sm, lineHeight: theme.lineHeight.sm },\n },\n },\n },\n}));\n"],"mappings":";;;;;;;;;;;;AAiDA,SAAgB4B,WAAW,EACzBX,OACAC,aACAC,MACAC,QACAC,iBACAC,OAAO,SACPC,UAAU,QACVC,OAAO,WACPC,UACAC,OACAC,UACkB;CAAA,MAAAE,UAAAC;CAAA;EAAA,MAAAA,SAAAD,QAAAE,YAEC,EAAET,MAAMA,SAAS,WAAW,YAAYA,KAAK,CAAC;EACjE,MAAMU,UAAUV,SAAS;EACzB,MAAMW,QAAQT,SAAS;EACvB,IAAIF,SAAS,UACX,OACE,qBAAC,MAAD;GACUK;GACR,mBAAmBM,QAAQ,UAAUC;GACrC,yBAAyBD,QAAQ,WAAWC;GAC5C,OAAO,CAACJ,OAAOK,QAAQT,KAAK;aAJ9B;IAME,qBAAC,MAAD;KAAM,OAAO,CAACI,OAAOM,YAAYH,SAASH,OAAOO,WAAW;eAA5D,CACE,oBAAC,MAAD;MAAM,OAAOP,OAAOQ;gBAAcrB;KAAY,IAC7CC,cAAc,4CAAE,OAAIA,WAAY,OAAM,IACnC;;IACLE,UAAUC,kBACT,qBAAC,MAAD;KAAM,OAAOS,OAAOS;eAApB,CACGnB,SACC,oBAAC,QAAD;MACE,SAAQ;MACR,MAAK;MACL,SAASA,OAAOR;MAChB,UAAUQ,OAAOP;MACjB,QAAQO,OAAON;MACf,SAASM,OAAOT;gBAEfS,OAAOV;KACF,KACN,MACHW,kBACC,oBAAC,QAAD;MACE,SAAQ;MACR,MAAK;MACL,SAASA,gBAAgBT;MACzB,UAAUS,gBAAgBR;MAC1B,QAAQQ,gBAAgBP;MACxB,SAASO,gBAAgBV;gBAExBU,gBAAgBX;KACX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,OAAOP,MAAMQ,OAAOC;EACpBC,YAAYzD,OAAO+C,MAAMU,WAAWC,IAAI;EACxCO,UAAU,EACRjD,MAAM;GACJ2B,MAAM;IACJ4B,UAAU;IACVZ,UAAUZ,MAAMY,SAASwB;IACzBtB,YAAYd,MAAM4C,kBAAkBR;IACpCM,WAAW;GACb;GACA7C,OAAO;IACL2B,UAAU;IACVZ,UAAUZ,MAAMY,SAASwB;IACzBtB,YAAYd,MAAM4C,kBAAkBR;IACpCM,WAAW;GACb;GACA/D,SAAS;IAAEiC,UAAUZ,MAAMY,SAASC;IAAIC,YAAYd,MAAMc,WAAWD;GAAG;EAC1E,EACF;EAACP,mBAAA,CAAA,GAAA,CAAA;CACH;AACF,EAAE"}
|
|
1
|
+
{"version":3,"file":"EmptyState.mjs","names":["IconColorContext","ReactNode","StyleProp","ViewStyle","StyleSheet","AlertIcon","fontOf","wrapText","Button","EmptyStateAction","label","onAction","loading","disabled","testId","EmptyStateSize","EmptyStateProps","title","description","icon","action","secondaryAction","size","surface","tone","children","style","testID","EmptyState","_styles","styles","useVariants","compact","error","undefined","inline","inlineRow","inlineText","inlineTitle","actions","glyph","ICON_SIZE","frame","card","iconEdgeError","iconEdge","content","copy","BUTTON_SIZE","page","panel","const","create","theme","alignSelf","minWidth","alignItems","gap","spacing","uni__dependencies","flexShrink","color","colors","dim","fontFamily","sans","fontSize","sm","lineHeight","fontWeight","medium","flexDirection","variants","flex","justifyContent","paddingHorizontal","paddingVertical","width","maxWidth","padding","borderRadius","md","borderWidth","borderStyle","borderColor","border","height","backgroundColor","deep","base","flexWrap","hi","semibold","xl","letterSpacing","textAlign","lg","lineHeightRelaxed"],"sources":["../../src/components/EmptyState.tsx"],"sourcesContent":["import { IconColorContext } from '@agimon-ai/po-native-components/shell';\nimport type { ReactNode } from 'react';\nimport { type StyleProp, Text, View, type ViewStyle } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { AlertIcon } from '../icons/icons';\nimport { fontOf } from '../lib/fonts';\nimport { wrapText } from '../lib/wrapText';\nimport { Button } from './Button';\n\n/** One button an empty state offers: the next step that fills the surface. */\nexport interface EmptyStateAction {\n label: string;\n onAction: () => void;\n loading?: boolean;\n disabled?: boolean;\n testId?: string;\n}\n\nexport type EmptyStateSize = 'page' | 'panel' | 'compact' | 'inline';\n\nexport interface EmptyStateProps {\n title: ReactNode;\n /** Guidance: why the surface is empty and what fills it. */\n description?: ReactNode;\n /** A glyph from the icon set, drawn in a quiet badge above the title (beside it when compact). Defaults to an alert glyph when `tone` is `error`. */\n icon?: ReactNode;\n /** The one primary step. Filled jade on page and panel, outline when compact. */\n action?: EmptyStateAction;\n /** A quieter second step, such as clearing a filter or retrying. */\n secondaryAction?: EmptyStateAction;\n /**\n * page: a whole screen. panel: a dock or tab (the default).\n * compact: a list row; left-aligned and never takes `flex: 1`.\n * inline: one quiet line under a header that already names the surface, such as an activity card.\n * Drops the icon and frame; `surface` does not apply.\n */\n size?: EmptyStateSize;\n /** `plain` drops the card border when the empty state already sits inside a card. */\n surface?: 'card' | 'plain';\n /** `error` announces the state as an alert and tints only the icon red. */\n tone?: 'neutral' | 'error';\n /** Anything under the actions: a hint, a status line. */\n children?: ReactNode;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n}\n\n/** The card every empty screen and panel shares: icon, title, guidance and, when the person can act, the next step. */\nexport function EmptyState({\n title,\n description,\n icon,\n action,\n secondaryAction,\n size = 'panel',\n surface = 'card',\n tone = 'neutral',\n children,\n style,\n testID,\n}: EmptyStateProps) {\n // Inline has no variant styles of its own; hooks still run on every render.\n styles.useVariants({ size: size === 'inline' ? 'compact' : size });\n const compact = size === 'compact';\n const error = tone === 'error';\n if (size === 'inline') {\n return (\n <View\n testID={testID}\n accessibilityRole={error ? 'alert' : undefined}\n accessibilityLiveRegion={error ? 'polite' : undefined}\n style={[styles.inline, style]}\n >\n {/* As at every other size, only the icon is red; the words stay readable. */}\n <View style={styles.inlineRow}>\n {error ? <AlertIcon size={14} color=\"red\" /> : null}\n <Text style={styles.inlineText}>\n <Text style={styles.inlineTitle}>{title}</Text>\n {description ? <> · {description}</> : null}\n </Text>\n </View>\n {action || secondaryAction ? (\n <View style={styles.actions}>\n {action ? (\n <Button\n variant=\"outline\"\n size=\"sm\"\n loading={action.loading}\n disabled={action.disabled}\n testID={action.testId}\n onPress={action.onAction}\n >\n {action.label}\n </Button>\n ) : null}\n {secondaryAction ? (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n loading={secondaryAction.loading}\n disabled={secondaryAction.disabled}\n testID={secondaryAction.testId}\n onPress={secondaryAction.onAction}\n >\n {secondaryAction.label}\n </Button>\n ) : null}\n </View>\n ) : null}\n {children}\n </View>\n );\n }\n const glyph = icon ?? (error ? <AlertIcon size={ICON_SIZE[size]} /> : null);\n return (\n <View\n testID={testID}\n accessibilityRole={error ? 'alert' : undefined}\n accessibilityLiveRegion={error ? 'polite' : undefined}\n style={[styles.frame, style]}\n >\n <View style={[styles.card, surface === 'card' && styles.surface]}>\n {glyph ? (\n <View\n accessible={false}\n importantForAccessibility=\"no-hide-descendants\"\n style={[styles.icon, !compact && (error ? styles.iconEdgeError : styles.iconEdge)]}\n >\n <IconColorContext.Provider value={error ? 'red' : 'dim'}>{glyph}</IconColorContext.Provider>\n </View>\n ) : null}\n <View style={styles.content}>\n <View style={styles.copy}>\n <View accessibilityRole=\"header\">{wrapText(title, styles.title)}</View>\n {description ? wrapText(description, styles.description) : null}\n </View>\n {action || secondaryAction ? (\n <View style={styles.actions}>\n {action ? (\n <Button\n variant={compact ? 'outline' : 'primary'}\n size={BUTTON_SIZE[size]}\n loading={action.loading}\n disabled={action.disabled}\n testID={action.testId}\n onPress={action.onAction}\n >\n {action.label}\n </Button>\n ) : null}\n {secondaryAction ? (\n <Button\n variant={compact ? 'ghost' : 'outline'}\n size={BUTTON_SIZE[size]}\n loading={secondaryAction.loading}\n disabled={secondaryAction.disabled}\n testID={secondaryAction.testId}\n onPress={secondaryAction.onAction}\n >\n {secondaryAction.label}\n </Button>\n ) : null}\n </View>\n ) : null}\n {children}\n </View>\n </View>\n </View>\n );\n}\n\nconst BUTTON_SIZE = { page: 'lg', panel: 'md', compact: 'sm' } as const;\nconst ICON_SIZE = { page: 24, panel: 20, compact: 16 } as const;\nconst styles = StyleSheet.create((theme) => ({\n inline: { alignSelf: 'stretch', minWidth: 0, alignItems: 'flex-start', gap: theme.spacing(2) },\n inlineText: {\n flexShrink: 1,\n color: theme.colors.dim,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n },\n inlineTitle: { fontWeight: theme.fontWeight.medium },\n inlineRow: { flexDirection: 'row', alignItems: 'center', gap: theme.spacing(1), minWidth: 0 },\n frame: {\n minWidth: 0,\n variants: {\n size: {\n page: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n paddingHorizontal: theme.spacing(3),\n paddingVertical: theme.spacing(6),\n },\n panel: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n paddingHorizontal: theme.spacing(3),\n paddingVertical: theme.spacing(4),\n },\n compact: { alignSelf: 'stretch' },\n },\n },\n },\n card: {\n width: '100%',\n minWidth: 0,\n variants: {\n size: {\n page: { maxWidth: 520, alignItems: 'center', gap: theme.spacing(3), padding: theme.spacing(6) },\n panel: { maxWidth: 520, alignItems: 'center', gap: theme.spacing(3), padding: theme.spacing(5) },\n compact: { flexDirection: 'row', alignItems: 'flex-start', gap: theme.spacing(2.5), padding: theme.spacing(3) },\n },\n },\n },\n // A quiet dashed outline with no fill, as on the web.\n surface: {\n borderRadius: theme.borderRadius.md,\n borderWidth: 1,\n borderStyle: 'dashed',\n borderColor: theme.colors.border,\n },\n icon: {\n alignItems: 'center',\n justifyContent: 'center',\n variants: {\n size: {\n page: { width: 48, height: 48, borderRadius: 24, backgroundColor: theme.colors.deep },\n panel: { width: 40, height: 40, borderRadius: 20, backgroundColor: theme.colors.deep },\n compact: { width: 20, height: theme.lineHeight.base },\n },\n },\n },\n iconEdge: { borderWidth: 1, borderColor: theme.colors['border-soft'] },\n iconEdgeError: { borderWidth: 1, borderColor: theme.colors['edge-red'] },\n content: {\n minWidth: 0,\n variants: {\n size: {\n page: { alignSelf: 'stretch', alignItems: 'center', gap: theme.spacing(4) },\n panel: { alignSelf: 'stretch', alignItems: 'center', gap: theme.spacing(4) },\n compact: { flex: 1, alignItems: 'flex-start', gap: theme.spacing(2) },\n },\n },\n },\n copy: {\n minWidth: 0,\n variants: {\n size: {\n page: { alignItems: 'center', gap: theme.spacing(1.5) },\n panel: { alignItems: 'center', gap: theme.spacing(1.5) },\n compact: { alignSelf: 'stretch', gap: theme.spacing(0.5) },\n },\n },\n },\n actions: {\n flexDirection: 'row',\n flexWrap: 'wrap',\n alignItems: 'center',\n gap: theme.spacing(2),\n variants: {\n size: {\n page: { justifyContent: 'center' },\n panel: { justifyContent: 'center' },\n compact: { justifyContent: 'flex-start' },\n },\n },\n },\n title: {\n color: theme.colors.hi,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontWeight: theme.fontWeight.semibold,\n variants: {\n size: {\n page: {\n fontSize: theme.fontSize.xl,\n lineHeight: theme.lineHeight.xl,\n letterSpacing: theme.letterSpacing.xl,\n textAlign: 'center',\n },\n panel: { fontSize: theme.fontSize.lg, lineHeight: theme.lineHeight.lg, textAlign: 'center' },\n compact: { fontSize: theme.fontSize.base, lineHeight: theme.lineHeight.base },\n },\n },\n },\n description: {\n color: theme.colors.dim,\n fontFamily: fontOf(theme.fontFamily.sans),\n variants: {\n size: {\n page: {\n maxWidth: 360,\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeightRelaxed.base,\n textAlign: 'center',\n },\n panel: {\n maxWidth: 360,\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeightRelaxed.base,\n textAlign: 'center',\n },\n compact: { fontSize: theme.fontSize.sm, lineHeight: theme.lineHeight.sm },\n },\n },\n },\n}));\n"],"mappings":";;;;;;;;;;;;AAiDA,SAAgB4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b,MAAMa,SAASuB;IACzBrB,YAAYf,MAAM4C,kBAAkBR;IACpCM,WAAW;GACb;GACA7C,OAAO;IACL4B,UAAU;IACVZ,UAAUb,MAAMa,SAASuB;IACzBrB,YAAYf,MAAM4C,kBAAkBR;IACpCM,WAAW;GACb;GACA/D,SAAS;IAAEkC,UAAUb,MAAMa,SAASC;IAAIC,YAAYf,MAAMe,WAAWD;GAAG;EAC1E,EACF;EAACR,mBAAA,CAAA,GAAA,CAAA;CACH;AACF,EAAE"}
|
|
@@ -33,6 +33,8 @@ export interface FileViewerProps {
|
|
|
33
33
|
note?: string;
|
|
34
34
|
/** Shown instead of the preview when the owner cannot read files, such as an unavailable session. */
|
|
35
35
|
unavailable?: string;
|
|
36
|
+
/** Shown instead of the preview, such as an EmptyState for a folder, a missing file or a failed read. */
|
|
37
|
+
status?: ReactNode;
|
|
36
38
|
}
|
|
37
39
|
/** One file on the phone: header or top-bar download, the bounded preview, and the path strip. */
|
|
38
40
|
export declare function FileViewer(props: FileViewerProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileViewer.d.mts","names":[],"sources":["../../src/components/FileViewer.tsx"],"mappings":";;;;iBA4BiB;EACf;;EAEA;IAAS;IAAc;;;EAEvB;EACA,cAAc,QAAQ,gBAAgB,QAAQ;;EAE9C,aAAa,QAAQ,gBAAgB;IAAU;IAAc;;;EAE7D,eAAe,QAAQ,gBAAgB,QAAQ;EAC/C,kBAAkB,QAAQ,sBAAsB;EAChD,oBAAoB;EACpB,qBAAqB;;EAErB,gBAAgB;IAAU;IAAmB,SAAS;;EACtD,aAAa;;EAEb,UAAU;EACV;;EAEA;;;
|
|
1
|
+
{"version":3,"file":"FileViewer.d.mts","names":[],"sources":["../../src/components/FileViewer.tsx"],"mappings":";;;;iBA4BiB;EACf;;EAEA;IAAS;IAAc;;;EAEvB;EACA,cAAc,QAAQ,gBAAgB,QAAQ;;EAE9C,aAAa,QAAQ,gBAAgB;IAAU;IAAc;;;EAE7D,eAAe,QAAQ,gBAAgB,QAAQ;EAC/C,kBAAkB,QAAQ,sBAAsB;EAChD,oBAAoB;EACpB,qBAAqB;;EAErB,gBAAgB;IAAU;IAAmB,SAAS;;EACtD,aAAa;;EAEb,UAAU;EACV;;EAEA;;EAEA,SAAS;;;wBAIK,WAAW,OAAO,kCAAe,IAAA;;wBAqKjC,gBAAgB,MAAM;EAAgB;EAAc;oBAAqB,IAAA;;wBAgBzE,mBACd,MACA,MACA,QACA,SACA,UACA,YACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;oBACD,IAAA"}
|
|
@@ -17,7 +17,8 @@ import { ScrollView } from "react-native-unistyles/components/native/ScrollView"
|
|
|
17
17
|
/** One file on the phone: header or top-bar download, the bounded preview, and the path strip. */
|
|
18
18
|
function FileViewer(props) {
|
|
19
19
|
const t = useT();
|
|
20
|
-
const { path, item, scopeKey, loadPreview, loadMedia, prepareSave, setTabHeader, unavailable } = props;
|
|
20
|
+
const { path, item, scopeKey, loadPreview, loadMedia, prepareSave, setTabHeader, unavailable, status } = props;
|
|
21
|
+
const hasStatus = status !== void 0 && status !== null;
|
|
21
22
|
const version = `${item?.modifiedAt ?? ""}:${item?.size ?? ""}`;
|
|
22
23
|
const downloadKey = `${scopeKey}:${path}`;
|
|
23
24
|
const key = `${downloadKey}:${version}`;
|
|
@@ -34,7 +35,7 @@ function FileViewer(props) {
|
|
|
34
35
|
});
|
|
35
36
|
const showsMedia = props.renderMediaPreview !== void 0;
|
|
36
37
|
useEffect(() => {
|
|
37
|
-
if (unavailable) return;
|
|
38
|
+
if (unavailable || hasStatus) return;
|
|
38
39
|
const controller = new AbortController();
|
|
39
40
|
loaders.current.loadPreview(controller.signal).then(async (preview) => {
|
|
40
41
|
if (controller.signal.aborted) return;
|
|
@@ -69,7 +70,8 @@ function FileViewer(props) {
|
|
|
69
70
|
path,
|
|
70
71
|
key,
|
|
71
72
|
showsMedia,
|
|
72
|
-
unavailable
|
|
73
|
+
unavailable,
|
|
74
|
+
hasStatus
|
|
73
75
|
]);
|
|
74
76
|
const current = loaded?.key === key ? loaded : void 0;
|
|
75
77
|
const downloadController = useRef(void 0);
|
|
@@ -152,7 +154,7 @@ function FileViewer(props) {
|
|
|
152
154
|
style: styles.meta,
|
|
153
155
|
children: download.note
|
|
154
156
|
}) : null;
|
|
155
|
-
const body = unavailable ? /* @__PURE__ */ jsx(Text, {
|
|
157
|
+
const body = hasStatus ? status : unavailable ? /* @__PURE__ */ jsx(Text, {
|
|
156
158
|
accessibilityRole: "alert",
|
|
157
159
|
style: styles.error,
|
|
158
160
|
children: unavailable
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileViewer.mjs","names":["useT","BoundedFileSource","fileKind","filePreviewMode","modifiedLabel","sizeLabel","FileTextPreview","ReactNode","useEffect","useRef","useState","StyleSheet","CloseIcon","DownloadIcon","fileKindLabel","fontOf","Button","CopyButton","FilePreview","FilePreviewProps","Loaded","key","preview","error","media","data","mimeType","mediaError","FileViewerProps","path","item","size","modifiedAt","scopeKey","loadPreview","signal","AbortSignal","Promise","loadMedia","prepareSave","nativeSaveFile","source","renderFilePreview","renderMediaPreview","setTabHeader","header","subtitle","action","onOpenPath","actions","note","unavailable","FileViewer","props","t","version","downloadKey","loaded","setLoaded","loaders","current","showsMedia","undefined","controller","AbortController","then","aborted","bytes","Error","message","String","catch","abort","downloadController","download","setDownload","saving","canSave","save","file","cancel","handlers","offline","styles","meta","body","screen","stage","content","FilePathStrip","now","Date","strip","stripPath","FileViewerHeader","disabled","onDownload","onCancel","label","create","theme","rt","flex","padding","spacing","gap","uni__dependencies","flexDirection","alignItems","paddingHorizontal","paddingTop","paddingBottom","insets","bottom","borderTopWidth","borderTopColor","colors","backgroundColor","bg","flexShrink","borderBottomWidth","borderBottomColor","minWidth","fontFamily","mono","fontSize","sm","color","dim","sans","red"],"sources":["../../src/components/FileViewer.tsx"],"sourcesContent":["import { useT } from '@agimon-ai/po-core/native';\nimport {\n type BoundedFileSource,\n fileKind,\n filePreviewMode,\n modifiedLabel,\n sizeLabel,\n type FileTextPreview,\n} from '@agimon-ai/po-web-components/text';\nimport { type ReactNode, useEffect, useRef, useState } from 'react';\nimport { ScrollView, Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { CloseIcon, DownloadIcon } from '../icons/icons';\nimport { fileKindLabel } from '../lib/fileKindLabel';\nimport { fontOf } from '../lib/fonts';\nimport { Button } from './Button';\nimport { CopyButton } from './CopyButton';\nimport { FilePreview, type FilePreviewProps } from './FilePreview';\n\ninterface Loaded {\n key: string;\n preview?: FileTextPreview;\n error?: string;\n media?: { data: string; mimeType: string };\n mediaError?: string;\n}\n\nexport interface FileViewerProps {\n path: string;\n /** The listed file, for its size and modified time; changes to it reload the preview. */\n item?: { size: number; modifiedAt: number };\n /** Keeps this folder's previews and downloads apart from another folder's file with the same path. */\n scopeKey: string;\n loadPreview: (signal: AbortSignal) => Promise<FileTextPreview>;\n /** Whole small media, base64 encoded by the owner. */\n loadMedia?: (signal: AbortSignal) => Promise<{ data: string; mimeType: string }>;\n /** A bounded source the host saves; without it there is no download. */\n prepareSave?: (signal: AbortSignal) => Promise<BoundedFileSource>;\n nativeSaveFile?: (source: BoundedFileSource) => Promise<void>;\n renderFilePreview?: FilePreviewProps['renderFilePreview'];\n renderMediaPreview?: FilePreviewProps['renderMediaPreview'];\n /** The native top bar of the tab screen; absent in older hosts, where the viewer draws its own header. */\n setTabHeader?: (header: { subtitle?: string; action?: ReactNode }) => void;\n onOpenPath: (path: string) => void;\n /** Above the preview, such as the owner's move action. */\n actions?: ReactNode;\n note?: string;\n /** Shown instead of the preview when the owner cannot read files, such as an unavailable session. */\n unavailable?: string;\n}\n\n/** One file on the phone: header or top-bar download, the bounded preview, and the path strip. */\nexport function FileViewer(props: FileViewerProps) {\n const t = useT();\n const { path, item, scopeKey, loadPreview, loadMedia, prepareSave, setTabHeader, unavailable } = props;\n const version = `${item?.modifiedAt ?? ''}:${item?.size ?? ''}`;\n const downloadKey = `${scopeKey}:${path}`;\n const key = `${downloadKey}:${version}`;\n const [loaded, setLoaded] = useState<Loaded>();\n // The owner's loaders change identity each render; the effect reads the latest through a ref.\n const loaders = useRef({ loadPreview, loadMedia });\n useEffect(() => {\n loaders.current = { loadPreview, loadMedia };\n });\n const showsMedia = props.renderMediaPreview !== undefined;\n useEffect(() => {\n if (unavailable) return;\n const controller = new AbortController();\n void loaders.current\n .loadPreview(controller.signal)\n .then(async (preview) => {\n if (controller.signal.aborted) return;\n setLoaded({ key, preview });\n const media = loaders.current.loadMedia;\n if (filePreviewMode(path) !== 'media' || !showsMedia || !media) return;\n try {\n const bytes = await media(controller.signal);\n if (!controller.signal.aborted) setLoaded({ key, preview, media: bytes });\n } catch (error) {\n if (!controller.signal.aborted)\n setLoaded({ key, preview, mediaError: error instanceof Error ? error.message : String(error) });\n }\n })\n .catch((error: unknown) => {\n if (!controller.signal.aborted)\n setLoaded({ key, error: error instanceof Error ? error.message : String(error) });\n });\n return () => controller.abort();\n }, [path, key, showsMedia, unavailable]);\n const current = loaded?.key === key ? loaded : undefined;\n const downloadController = useRef<AbortController | undefined>(undefined);\n const [download, setDownload] = useState<{ key: string; saving?: boolean; note?: string }>();\n useEffect(\n () => () => {\n downloadController.current?.abort();\n downloadController.current = undefined;\n },\n [downloadKey],\n );\n const saving = download?.key === downloadKey && download.saving === true;\n const canSave = props.nativeSaveFile !== undefined && prepareSave !== undefined;\n const save = async () => {\n if (unavailable || !props.nativeSaveFile || !prepareSave || downloadController.current) return;\n const controller = new AbortController();\n downloadController.current = controller;\n setDownload({ key: downloadKey, saving: true });\n try {\n const file = await prepareSave(controller.signal);\n if (controller.signal.aborted || downloadController.current !== controller) return;\n await props.nativeSaveFile(file);\n if (!controller.signal.aborted && downloadController.current === controller)\n setDownload({ key: downloadKey, note: t('nativeComponents.fileViewer.saved', 'Saved.') });\n } catch (error) {\n if (!controller.signal.aborted && downloadController.current === controller)\n setDownload({ key: downloadKey, note: error instanceof Error ? error.message : String(error) });\n } finally {\n if (downloadController.current === controller) downloadController.current = undefined;\n }\n };\n const cancel = () => {\n downloadController.current?.abort();\n downloadController.current = undefined;\n setDownload({ key: downloadKey, note: t('nativeComponents.fileViewer.cancelled', 'Download cancelled.') });\n };\n // The top bar's control outlives this render; it reaches the latest handlers through a ref synced after commit.\n const handlers = useRef({ save, cancel });\n useEffect(() => {\n handlers.current = { save, cancel };\n });\n // Once the host's media view is showing, it names and saves the media in the top bar; the viewer speaks otherwise.\n const media = filePreviewMode(path) === 'media' && showsMedia && current?.media !== undefined;\n const subtitle = `${fileKindLabel(fileKind(path), t)}${item ? ` · ${sizeLabel(item.size)}` : ''}`;\n const offline = unavailable !== undefined;\n useEffect(() => {\n if (!setTabHeader || media) return;\n setTabHeader({\n subtitle,\n action: canSave ? (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n disabled={offline}\n accessibilityLabel={\n saving\n ? t('nativeComponents.fileViewer.cancelDownload', 'Cancel download')\n : t('nativeComponents.fileViewer.download', 'Download')\n }\n onPress={() => (saving ? handlers.current.cancel() : void handlers.current.save())}\n >\n {saving ? <CloseIcon color=\"hi\" /> : <DownloadIcon color=\"hi\" />}\n </Button>\n ) : undefined,\n });\n }, [setTabHeader, media, subtitle, canSave, saving, offline]);\n const note =\n download?.key === downloadKey && download.note ? (\n <Text accessibilityLiveRegion=\"polite\" style={styles.meta}>\n {download.note}\n </Text>\n ) : null;\n const body = unavailable ? (\n <Text accessibilityRole=\"alert\" style={styles.error}>\n {unavailable}\n </Text>\n ) : current?.error ? (\n <Text accessibilityRole=\"alert\" style={styles.error}>\n {current.error}\n </Text>\n ) : current?.preview ? (\n <FilePreview\n preview={current.preview}\n scopeKey={scopeKey}\n renderFilePreview={props.renderFilePreview}\n renderMediaPreview={props.renderMediaPreview}\n media={current.media}\n mediaError={current.mediaError}\n onOpen={props.onOpenPath}\n />\n ) : (\n <Text style={styles.meta}>{t('nativeComponents.fileViewer.reading', 'Reading this file...')}</Text>\n );\n return (\n <View style={styles.screen}>\n {props.actions}\n {props.note ? (\n <Text accessibilityLiveRegion=\"polite\" style={styles.meta}>\n {props.note}\n </Text>\n ) : null}\n {media ? (\n <View style={styles.stage}>{body}</View>\n ) : (\n <ScrollView style={styles.stage} contentContainerStyle={styles.content}>\n {setTabHeader ? null : (\n <FileViewerHeader\n path={path}\n size={item?.size}\n saving={saving}\n canSave={canSave}\n disabled={offline}\n onDownload={() => void save()}\n onCancel={cancel}\n />\n )}\n {note}\n {body}\n </ScrollView>\n )}\n <FilePathStrip path={path} modifiedAt={item?.modifiedAt} />\n </View>\n );\n}\n\n/** Where the file lives and when it last changed, pinned under the preview. */\nexport function FilePathStrip({ path, modifiedAt }: { path: string; modifiedAt?: number }) {\n // Read once per mount: a preview left open past midnight keeps its first label, which is still true then.\n const [now] = useState(Date.now);\n const t = useT();\n return (\n <View style={styles.strip}>\n <Text selectable numberOfLines={1} ellipsizeMode=\"middle\" style={[styles.path, styles.stripPath]}>\n {path}\n </Text>\n <CopyButton text={path} label={t('nativeComponents.fileViewer.pathLabel', 'path')} />\n {modifiedAt === undefined ? null : <Text style={styles.meta}>{modifiedLabel(modifiedAt, now)}</Text>}\n </View>\n );\n}\n\n/** The viewer's quiet header: where the file lives, what it is, and the one action on it. */\nexport function FileViewerHeader({\n path,\n size,\n saving,\n canSave,\n disabled,\n onDownload,\n onCancel,\n}: {\n path: string;\n size?: number;\n saving: boolean;\n canSave: boolean;\n disabled: boolean;\n onDownload: () => void;\n onCancel: () => void;\n}) {\n const t = useT();\n return (\n <View style={styles.header}>\n <View style={styles.label}>\n <Text selectable numberOfLines={1} ellipsizeMode=\"middle\" style={styles.path}>\n {path}\n </Text>\n <Text style={styles.meta}>\n {fileKindLabel(fileKind(path), t)}\n {size === undefined ? '' : ` · ${sizeLabel(size)}`}\n {canSave ? '' : ` · ${t('nativeComponents.fileViewer.cannotSave', 'This host cannot save downloads.')}`}\n </Text>\n </View>\n {canSave && saving ? (\n <Button variant=\"ghost\" size=\"sm\" onPress={onCancel}>\n {t('nativeComponents.fileViewer.cancel', 'Cancel')}\n </Button>\n ) : null}\n {canSave ? (\n <Button variant=\"outline\" size=\"sm\" disabled={saving || disabled} onPress={onDownload}>\n {t('nativeComponents.fileViewer.download', 'Download')}\n </Button>\n ) : null}\n </View>\n );\n}\n\nconst styles = StyleSheet.create((theme, rt) => ({\n screen: { flex: 1 },\n stage: { flex: 1 },\n content: { padding: theme.spacing(4), gap: theme.spacing(3) },\n strip: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: theme.spacing(2),\n paddingHorizontal: theme.spacing(4),\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2) + rt.insets.bottom,\n borderTopWidth: 1,\n borderTopColor: theme.colors['border-soft'],\n backgroundColor: theme.colors.bg,\n },\n stripPath: { flexShrink: 1 },\n header: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: theme.spacing(2),\n paddingBottom: theme.spacing(3),\n borderBottomWidth: 1,\n borderBottomColor: theme.colors['border-soft'],\n },\n label: { flex: 1, minWidth: 0, gap: theme.spacing(0.5) },\n path: { fontFamily: fontOf(theme.fontFamily.mono), fontSize: theme.fontSize.sm, color: theme.colors.dim },\n meta: { fontFamily: fontOf(theme.fontFamily.sans), fontSize: theme.fontSize.sm, color: theme.colors.dim },\n error: { fontFamily: fontOf(theme.fontFamily.sans), fontSize: theme.fontSize.sm, color: theme.colors.red },\n}));\n"],"mappings":";;;;;;;;;;;;;;;;;AAqDA,SAAgBoD,WAAWC,OAAwB;CACjD,MAAMC,IAAItD,KAAK;CACf,MAAM,EAAE6B,MAAMC,MAAMG,UAAUC,aAAaI,WAAWC,aAAaK,cAAcO,gBAAgBE;CACjG,MAAME,UAAU,GAAGzB,MAAME,cAAc,GAAE,GAAIF,MAAMC,QAAQ;CAC3D,MAAMyB,cAAc,GAAGvB,SAAQ,GAAIJ;CACnC,MAAMR,MAAM,GAAGmC,YAAW,GAAID;CAC9B,MAAM,CAACE,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;EACfC,YAAY;EACZH,KAAKL,MAAMI,QAAQ,CAAC;EACpBO,eAAeX,MAAMI,QAAQ,CAAC;EAC9BgB,mBAAmB;EACnBC,mBAAmBrB,MAAMgB,OAAO;EAAcV,mBAAA,CAAA,CAAA;CAChD;CACAR,OAAO;EAAEI,MAAM;EAAGoB,UAAU;EAAGjB,KAAKL,MAAMI,QAAQ,EAAG;EAACE,mBAAA,CAAA,CAAA;CAAC;CACvD7E,MAAM;EAAE8F,YAAY5G,OAAOqF,MAAMuB,WAAWC,IAAI;EAAGC,UAAUzB,MAAMyB,SAASC;EAAIC,OAAO3B,MAAMgB,OAAOY;EAAGtB,mBAAA,CAAA,CAAA;CAAC;CACxGtB,MAAM;EAAEuC,YAAY5G,OAAOqF,MAAMuB,WAAWM,IAAI;EAAGJ,UAAUzB,MAAMyB,SAASC;EAAIC,OAAO3B,MAAMgB,OAAOY;EAAGtB,mBAAA,CAAA,CAAA;CAAC;CACxGnF,OAAO;EAAEoG,YAAY5G,OAAOqF,MAAMuB,WAAWM,IAAI;EAAGJ,UAAUzB,MAAMyB,SAASC;EAAIC,OAAO3B,MAAMgB,OAAOc;EAAGxB,mBAAA,CAAA,CAAA;CAAC;AAC3G,EAAE"}
|
|
1
|
+
{"version":3,"file":"FileViewer.mjs","names":["useT","BoundedFileSource","fileKind","filePreviewMode","modifiedLabel","sizeLabel","FileTextPreview","ReactNode","useEffect","useRef","useState","StyleSheet","CloseIcon","DownloadIcon","fileKindLabel","fontOf","Button","CopyButton","FilePreview","FilePreviewProps","Loaded","key","preview","error","media","data","mimeType","mediaError","FileViewerProps","path","item","size","modifiedAt","scopeKey","loadPreview","signal","AbortSignal","Promise","loadMedia","prepareSave","nativeSaveFile","source","renderFilePreview","renderMediaPreview","setTabHeader","header","subtitle","action","onOpenPath","actions","note","unavailable","status","FileViewer","props","t","hasStatus","undefined","version","downloadKey","loaded","setLoaded","loaders","current","showsMedia","controller","AbortController","then","aborted","bytes","Error","message","String","catch","abort","downloadController","download","setDownload","saving","canSave","save","file","cancel","handlers","offline","styles","meta","body","screen","stage","content","FilePathStrip","now","Date","strip","stripPath","FileViewerHeader","disabled","onDownload","onCancel","label","create","theme","rt","flex","padding","spacing","gap","uni__dependencies","flexDirection","alignItems","paddingHorizontal","paddingTop","paddingBottom","insets","bottom","borderTopWidth","borderTopColor","colors","backgroundColor","bg","flexShrink","borderBottomWidth","borderBottomColor","minWidth","fontFamily","mono","fontSize","sm","color","dim","sans","red"],"sources":["../../src/components/FileViewer.tsx"],"sourcesContent":["import { useT } from '@agimon-ai/po-core/native';\nimport {\n type BoundedFileSource,\n fileKind,\n filePreviewMode,\n modifiedLabel,\n sizeLabel,\n type FileTextPreview,\n} from '@agimon-ai/po-web-components/text';\nimport { type ReactNode, useEffect, useRef, useState } from 'react';\nimport { ScrollView, Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { CloseIcon, DownloadIcon } from '../icons/icons';\nimport { fileKindLabel } from '../lib/fileKindLabel';\nimport { fontOf } from '../lib/fonts';\nimport { Button } from './Button';\nimport { CopyButton } from './CopyButton';\nimport { FilePreview, type FilePreviewProps } from './FilePreview';\n\ninterface Loaded {\n key: string;\n preview?: FileTextPreview;\n error?: string;\n media?: { data: string; mimeType: string };\n mediaError?: string;\n}\n\nexport interface FileViewerProps {\n path: string;\n /** The listed file, for its size and modified time; changes to it reload the preview. */\n item?: { size: number; modifiedAt: number };\n /** Keeps this folder's previews and downloads apart from another folder's file with the same path. */\n scopeKey: string;\n loadPreview: (signal: AbortSignal) => Promise<FileTextPreview>;\n /** Whole small media, base64 encoded by the owner. */\n loadMedia?: (signal: AbortSignal) => Promise<{ data: string; mimeType: string }>;\n /** A bounded source the host saves; without it there is no download. */\n prepareSave?: (signal: AbortSignal) => Promise<BoundedFileSource>;\n nativeSaveFile?: (source: BoundedFileSource) => Promise<void>;\n renderFilePreview?: FilePreviewProps['renderFilePreview'];\n renderMediaPreview?: FilePreviewProps['renderMediaPreview'];\n /** The native top bar of the tab screen; absent in older hosts, where the viewer draws its own header. */\n setTabHeader?: (header: { subtitle?: string; action?: ReactNode }) => void;\n onOpenPath: (path: string) => void;\n /** Above the preview, such as the owner's move action. */\n actions?: ReactNode;\n note?: string;\n /** Shown instead of the preview when the owner cannot read files, such as an unavailable session. */\n unavailable?: string;\n /** Shown instead of the preview, such as an EmptyState for a folder, a missing file or a failed read. */\n status?: ReactNode;\n}\n\n/** One file on the phone: header or top-bar download, the bounded preview, and the path strip. */\nexport function FileViewer(props: FileViewerProps) {\n const t = useT();\n const { path, item, scopeKey, loadPreview, loadMedia, prepareSave, setTabHeader, unavailable, status } = props;\n const hasStatus = status !== undefined && status !== null;\n const version = `${item?.modifiedAt ?? ''}:${item?.size ?? ''}`;\n const downloadKey = `${scopeKey}:${path}`;\n const key = `${downloadKey}:${version}`;\n const [loaded, setLoaded] = useState<Loaded>();\n // The owner's loaders change identity each render; the effect reads the latest through a ref.\n const loaders = useRef({ loadPreview, loadMedia });\n useEffect(() => {\n loaders.current = { loadPreview, loadMedia };\n });\n const showsMedia = props.renderMediaPreview !== undefined;\n useEffect(() => {\n if (unavailable || hasStatus) return;\n const controller = new AbortController();\n void loaders.current\n .loadPreview(controller.signal)\n .then(async (preview) => {\n if (controller.signal.aborted) return;\n setLoaded({ key, preview });\n const media = loaders.current.loadMedia;\n if (filePreviewMode(path) !== 'media' || !showsMedia || !media) return;\n try {\n const bytes = await media(controller.signal);\n if (!controller.signal.aborted) setLoaded({ key, preview, media: bytes });\n } catch (error) {\n if (!controller.signal.aborted)\n setLoaded({ key, preview, mediaError: error instanceof Error ? error.message : String(error) });\n }\n })\n .catch((error: unknown) => {\n if (!controller.signal.aborted)\n setLoaded({ key, error: error instanceof Error ? error.message : String(error) });\n });\n return () => controller.abort();\n }, [path, key, showsMedia, unavailable, hasStatus]);\n const current = loaded?.key === key ? loaded : undefined;\n const downloadController = useRef<AbortController | undefined>(undefined);\n const [download, setDownload] = useState<{ key: string; saving?: boolean; note?: string }>();\n useEffect(\n () => () => {\n downloadController.current?.abort();\n downloadController.current = undefined;\n },\n [downloadKey],\n );\n const saving = download?.key === downloadKey && download.saving === true;\n const canSave = props.nativeSaveFile !== undefined && prepareSave !== undefined;\n const save = async () => {\n if (unavailable || !props.nativeSaveFile || !prepareSave || downloadController.current) return;\n const controller = new AbortController();\n downloadController.current = controller;\n setDownload({ key: downloadKey, saving: true });\n try {\n const file = await prepareSave(controller.signal);\n if (controller.signal.aborted || downloadController.current !== controller) return;\n await props.nativeSaveFile(file);\n if (!controller.signal.aborted && downloadController.current === controller)\n setDownload({ key: downloadKey, note: t('nativeComponents.fileViewer.saved', 'Saved.') });\n } catch (error) {\n if (!controller.signal.aborted && downloadController.current === controller)\n setDownload({ key: downloadKey, note: error instanceof Error ? error.message : String(error) });\n } finally {\n if (downloadController.current === controller) downloadController.current = undefined;\n }\n };\n const cancel = () => {\n downloadController.current?.abort();\n downloadController.current = undefined;\n setDownload({ key: downloadKey, note: t('nativeComponents.fileViewer.cancelled', 'Download cancelled.') });\n };\n // The top bar's control outlives this render; it reaches the latest handlers through a ref synced after commit.\n const handlers = useRef({ save, cancel });\n useEffect(() => {\n handlers.current = { save, cancel };\n });\n // Once the host's media view is showing, it names and saves the media in the top bar; the viewer speaks otherwise.\n const media = filePreviewMode(path) === 'media' && showsMedia && current?.media !== undefined;\n const subtitle = `${fileKindLabel(fileKind(path), t)}${item ? ` · ${sizeLabel(item.size)}` : ''}`;\n const offline = unavailable !== undefined;\n useEffect(() => {\n if (!setTabHeader || media) return;\n setTabHeader({\n subtitle,\n action: canSave ? (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n disabled={offline}\n accessibilityLabel={\n saving\n ? t('nativeComponents.fileViewer.cancelDownload', 'Cancel download')\n : t('nativeComponents.fileViewer.download', 'Download')\n }\n onPress={() => (saving ? handlers.current.cancel() : void handlers.current.save())}\n >\n {saving ? <CloseIcon color=\"hi\" /> : <DownloadIcon color=\"hi\" />}\n </Button>\n ) : undefined,\n });\n }, [setTabHeader, media, subtitle, canSave, saving, offline]);\n const note =\n download?.key === downloadKey && download.note ? (\n <Text accessibilityLiveRegion=\"polite\" style={styles.meta}>\n {download.note}\n </Text>\n ) : null;\n const body = hasStatus ? (\n status\n ) : unavailable ? (\n <Text accessibilityRole=\"alert\" style={styles.error}>\n {unavailable}\n </Text>\n ) : current?.error ? (\n <Text accessibilityRole=\"alert\" style={styles.error}>\n {current.error}\n </Text>\n ) : current?.preview ? (\n <FilePreview\n preview={current.preview}\n scopeKey={scopeKey}\n renderFilePreview={props.renderFilePreview}\n renderMediaPreview={props.renderMediaPreview}\n media={current.media}\n mediaError={current.mediaError}\n onOpen={props.onOpenPath}\n />\n ) : (\n <Text style={styles.meta}>{t('nativeComponents.fileViewer.reading', 'Reading this file...')}</Text>\n );\n return (\n <View style={styles.screen}>\n {props.actions}\n {props.note ? (\n <Text accessibilityLiveRegion=\"polite\" style={styles.meta}>\n {props.note}\n </Text>\n ) : null}\n {media ? (\n <View style={styles.stage}>{body}</View>\n ) : (\n <ScrollView style={styles.stage} contentContainerStyle={styles.content}>\n {setTabHeader ? null : (\n <FileViewerHeader\n path={path}\n size={item?.size}\n saving={saving}\n canSave={canSave}\n disabled={offline}\n onDownload={() => void save()}\n onCancel={cancel}\n />\n )}\n {note}\n {body}\n </ScrollView>\n )}\n <FilePathStrip path={path} modifiedAt={item?.modifiedAt} />\n </View>\n );\n}\n\n/** Where the file lives and when it last changed, pinned under the preview. */\nexport function FilePathStrip({ path, modifiedAt }: { path: string; modifiedAt?: number }) {\n // Read once per mount: a preview left open past midnight keeps its first label, which is still true then.\n const [now] = useState(Date.now);\n const t = useT();\n return (\n <View style={styles.strip}>\n <Text selectable numberOfLines={1} ellipsizeMode=\"middle\" style={[styles.path, styles.stripPath]}>\n {path}\n </Text>\n <CopyButton text={path} label={t('nativeComponents.fileViewer.pathLabel', 'path')} />\n {modifiedAt === undefined ? null : <Text style={styles.meta}>{modifiedLabel(modifiedAt, now)}</Text>}\n </View>\n );\n}\n\n/** The viewer's quiet header: where the file lives, what it is, and the one action on it. */\nexport function FileViewerHeader({\n path,\n size,\n saving,\n canSave,\n disabled,\n onDownload,\n onCancel,\n}: {\n path: string;\n size?: number;\n saving: boolean;\n canSave: boolean;\n disabled: boolean;\n onDownload: () => void;\n onCancel: () => void;\n}) {\n const t = useT();\n return (\n <View style={styles.header}>\n <View style={styles.label}>\n <Text selectable numberOfLines={1} ellipsizeMode=\"middle\" style={styles.path}>\n {path}\n </Text>\n <Text style={styles.meta}>\n {fileKindLabel(fileKind(path), t)}\n {size === undefined ? '' : ` · ${sizeLabel(size)}`}\n {canSave ? '' : ` · ${t('nativeComponents.fileViewer.cannotSave', 'This host cannot save downloads.')}`}\n </Text>\n </View>\n {canSave && saving ? (\n <Button variant=\"ghost\" size=\"sm\" onPress={onCancel}>\n {t('nativeComponents.fileViewer.cancel', 'Cancel')}\n </Button>\n ) : null}\n {canSave ? (\n <Button variant=\"outline\" size=\"sm\" disabled={saving || disabled} onPress={onDownload}>\n {t('nativeComponents.fileViewer.download', 'Download')}\n </Button>\n ) : null}\n </View>\n );\n}\n\nconst styles = StyleSheet.create((theme, rt) => ({\n screen: { flex: 1 },\n stage: { flex: 1 },\n content: { padding: theme.spacing(4), gap: theme.spacing(3) },\n strip: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: theme.spacing(2),\n paddingHorizontal: theme.spacing(4),\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2) + rt.insets.bottom,\n borderTopWidth: 1,\n borderTopColor: theme.colors['border-soft'],\n backgroundColor: theme.colors.bg,\n },\n stripPath: { flexShrink: 1 },\n header: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: theme.spacing(2),\n paddingBottom: theme.spacing(3),\n borderBottomWidth: 1,\n borderBottomColor: theme.colors['border-soft'],\n },\n label: { flex: 1, minWidth: 0, gap: theme.spacing(0.5) },\n path: { fontFamily: fontOf(theme.fontFamily.mono), fontSize: theme.fontSize.sm, color: theme.colors.dim },\n meta: { fontFamily: fontOf(theme.fontFamily.sans), fontSize: theme.fontSize.sm, color: theme.colors.dim },\n error: { fontFamily: fontOf(theme.fontFamily.sans), fontSize: theme.fontSize.sm, color: theme.colors.red },\n}));\n"],"mappings":";;;;;;;;;;;;;;;;;AAuDA,SAAgBqD,WAAWC,OAAwB;CACjD,MAAMC,IAAIvD,KAAK;CACf,MAAM,EAAE6B,MAAMC,MAAMG,UAAUC,aAAaI,WAAWC,aAAaK,cAAcO,aAAaC,WAAWE;CACzG,MAAME,YAAYJ,WAAWK,UAAaL,WAAW;CACrD,MAAMM,UAAU,GAAG5B,MAAME,cAAc,GAAE,GAAIF,MAAMC,QAAQ;CAC3D,MAAM4B,cAAc,GAAG1B,SAAQ,GAAIJ;CACnC,MAAMR,MAAM,GAAGsC,YAAW,GAAID;CAC9B,MAAM,CAACE,QAAQC,aAAanD,SAAiB;CAE7C,MAAMoD,UAAUrD,OAAO;EAAEyB;EAAaI;CAAU,CAAC;CACjD9B,gBAAgB;EACdsD,QAAQC,UAAU;GAAE7B;GAAaI;EAAU;CAC7C,CAAC;CACD,MAAM0B,aAAaV,MAAMX,uBAAuBc;CAChDjD,gBAAgB;EACd,IAAI2C,eAAeK,WAAW;EAC9B,MAAMS,aAAa,IAAIC,gBAAgB;EACvC,AAAKJ,QAAQC,QACV7B,YAAY+B,WAAW9B,MAAM,CAAC,CAC9BgC,KAAK,OAAO7C,YAAY;GACvB,IAAI2C,WAAW9B,OAAOiC,SAAS;GAC/BP,UAAU;IAAExC;IAAKC;GAAQ,CAAC;GAC1B,MAAME,QAAQsC,QAAQC,QAAQzB;GAC9B,IAAInC,gBAAgB0B,IAAI,MAAM,WAAW,CAACmC,cAAc,CAACxC,OAAO;GAChE,IAAI;IACF,MAAM6C,QAAQ,MAAM7C,MAAMyC,WAAW9B,MAAM;IAC3C,IAAI,CAAC8B,WAAW9B,OAAOiC,SAASP,UAAU;KAAExC;KAAKC;KAASE,OAAO6C;IAAM,CAAC;GA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;EAAGJ,UAAUzB,MAAMyB,SAASC;EAAIC,OAAO3B,MAAMgB,OAAOc;EAAGxB,mBAAA,CAAA,CAAA;CAAC;AAC3G,EAAE"}
|
|
@@ -94,6 +94,10 @@ export declare const ICON_GLYPHS: {
|
|
|
94
94
|
readonly sf: "globe";
|
|
95
95
|
readonly material: "public";
|
|
96
96
|
};
|
|
97
|
+
readonly Languages: {
|
|
98
|
+
readonly sf: "translate";
|
|
99
|
+
readonly material: "translate";
|
|
100
|
+
};
|
|
97
101
|
readonly Branch: {
|
|
98
102
|
readonly sf: "arrow.triangle.branch";
|
|
99
103
|
readonly material: "call-split";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iconGlyphs.d.mts","names":[],"sources":["../../src/icons/iconGlyphs.ts"],"mappings":";;;;;;;qBAMa
|
|
1
|
+
{"version":3,"file":"iconGlyphs.d.mts","names":[],"sources":["../../src/icons/iconGlyphs.ts"],"mappings":";;;;;;;qBAMa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAsED,wBAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iconGlyphs.mjs","names":[],"sources":["../../src/icons/iconGlyphs.ts"],"sourcesContent":["/**\n * The curated native icon set: the same names the web library re-exports from\n * lucide, each drawn with the platform's own family. iOS gets an SF Symbol,\n * Android and web get a Material Icons glyph. Kept free of React Native so a\n * unit test can check every glyph against the installed glyph map.\n */\nexport const ICON_GLYPHS = {\n Check: { sf: 'checkmark', material: 'check' },\n ChevronDown: { sf: 'chevron.down', material: 'expand-more' },\n ChevronRight: { sf: 'chevron.right', material: 'chevron-right' },\n ChevronUp: { sf: 'chevron.up', material: 'expand-less' },\n Alert: { sf: 'exclamationmark.circle', material: 'error-outline' },\n Copy: { sf: 'doc.on.doc', material: 'content-copy' },\n Message: { sf: 'message', material: 'chat-bubble-outline' },\n // Each platform's own overflow mark: a horizontal ellipsis on iOS, vertical dots on Android.\n Kebab: { sf: 'ellipsis', material: 'more-vert' },\n Menu: { sf: 'line.3.horizontal', material: 'menu' },\n Edit: { sf: 'pencil', material: 'edit' },\n Gear: { sf: 'gearshape', material: 'settings' },\n Send: { sf: 'paperplane', material: 'send' },\n Task: { sf: 'checkmark.square', material: 'check-box' },\n Trash: { sf: 'trash', material: 'delete-outline' },\n Wrench: { sf: 'wrench.and.screwdriver', material: 'build' },\n Close: { sf: 'xmark', material: 'close' },\n File: { sf: 'doc', material: 'insert-drive-file' },\n Search: { sf: 'magnifyingglass', material: 'search' },\n Image: { sf: 'photo', material: 'image' },\n Sliders: { sf: 'slider.horizontal.3', material: 'tune' },\n Folder: { sf: 'folder', material: 'folder' },\n Globe: { sf: 'globe', material: 'public' },\n Branch: { sf: 'arrow.triangle.branch', material: 'call-split' },\n // ponytail: SF Symbols has no fork distinct from a branch, so iOS draws Fork as Branch. Swap in a custom symbol if the two must differ there.\n Fork: { sf: 'arrow.triangle.branch', material: 'fork-right' },\n Home: { sf: 'house', material: 'home' },\n Activity: { sf: 'waveform.path.ecg', material: 'monitor-heart' },\n ArrowRight: { sf: 'arrow.right', material: 'arrow-forward' },\n Plus: { sf: 'plus', material: 'add' },\n User: { sf: 'person', material: 'person-outline' },\n Users: { sf: 'person.2', material: 'group' },\n IdCard: { sf: 'person.text.rectangle', material: 'badge' },\n PlayCircle: { sf: 'play.circle', material: 'play-circle-outline' },\n Workflow: { sf: 'flowchart', material: 'account-tree' },\n Palette: { sf: 'paintpalette', material: 'palette' },\n Lightbulb: { sf: 'lightbulb', material: 'lightbulb-outline' },\n Sparkles: { sf: 'sparkles', material: 'auto-awesome' },\n Lock: { sf: 'lock', material: 'lock-outline' },\n Shield: { sf: 'checkmark.shield', material: 'verified-user' },\n Download: { sf: 'square.and.arrow.down', material: 'file-download' },\n Mic: { sf: 'mic', material: 'mic' },\n Monitor: { sf: 'laptopcomputer', material: 'laptop' },\n Server: { sf: 'server.rack', material: 'dns' },\n Smartphone: { sf: 'iphone', material: 'smartphone' },\n AudioLines: { sf: 'waveform', material: 'graphic-eq' },\n Stop: { sf: 'stop.fill', material: 'stop' },\n Terminal: { sf: 'apple.terminal', material: 'terminal' },\n Hand: { sf: 'hand.raised', material: 'pan-tool' },\n Pin: { sf: 'mappin', material: 'place' },\n Box: { sf: 'square', material: 'crop-square' },\n Undo: { sf: 'arrow.uturn.backward', material: 'undo' },\n Redo: { sf: 'arrow.uturn.forward', material: 'redo' },\n ArrowUpRight: { sf: 'arrow.up.right', material: 'north-east' },\n Highlighter: { sf: 'highlighter', material: 'border-color' },\n Eraser: { sf: 'eraser', material: 'auto-fix-normal' },\n Minus: { sf: 'minus', material: 'remove' },\n Fit: { sf: 'viewfinder', material: 'fit-screen' },\n Refresh: { sf: 'arrow.clockwise', material: 'refresh' },\n Calendar: { sf: 'calendar', material: 'event' },\n Play: { sf: 'play.fill', material: 'play-arrow' },\n Pause: { sf: 'pause.fill', material: 'pause' },\n Back10: { sf: 'gobackward.10', material: 'replay-10' },\n Forward10: { sf: 'goforward.10', material: 'forward-10' },\n StepBack: { sf: 'backward.frame', material: 'skip-previous' },\n StepForward: { sf: 'forward.frame', material: 'skip-next' },\n} as const;\n\nexport type IconName = keyof typeof ICON_GLYPHS;\n"],"mappings":";;;;;;;AAMA,MAAa,cAAc;CACzB,OAAO;EAAE,IAAI;EAAa,UAAU;CAAQ;CAC5C,aAAa;EAAE,IAAI;EAAgB,UAAU;CAAc;CAC3D,cAAc;EAAE,IAAI;EAAiB,UAAU;CAAgB;CAC/D,WAAW;EAAE,IAAI;EAAc,UAAU;CA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,IAAI;EAAiB,UAAU;CAAY;CACrD,WAAW;EAAE,IAAI;EAAgB,UAAU;CAAa;CACxD,UAAU;EAAE,IAAI;EAAkB,UAAU;CAAgB;CAC5D,aAAa;EAAE,IAAI;EAAiB,UAAU;CAAY;AAC5D"}
|
|
1
|
+
{"version":3,"file":"iconGlyphs.mjs","names":[],"sources":["../../src/icons/iconGlyphs.ts"],"sourcesContent":["/**\n * The curated native icon set: the same names the web library re-exports from\n * lucide, each drawn with the platform's own family. iOS gets an SF Symbol,\n * Android and web get a Material Icons glyph. Kept free of React Native so a\n * unit test can check every glyph against the installed glyph map.\n */\nexport const ICON_GLYPHS = {\n Check: { sf: 'checkmark', material: 'check' },\n ChevronDown: { sf: 'chevron.down', material: 'expand-more' },\n ChevronRight: { sf: 'chevron.right', material: 'chevron-right' },\n ChevronUp: { sf: 'chevron.up', material: 'expand-less' },\n Alert: { sf: 'exclamationmark.circle', material: 'error-outline' },\n Copy: { sf: 'doc.on.doc', material: 'content-copy' },\n Message: { sf: 'message', material: 'chat-bubble-outline' },\n // Each platform's own overflow mark: a horizontal ellipsis on iOS, vertical dots on Android.\n Kebab: { sf: 'ellipsis', material: 'more-vert' },\n Menu: { sf: 'line.3.horizontal', material: 'menu' },\n Edit: { sf: 'pencil', material: 'edit' },\n Gear: { sf: 'gearshape', material: 'settings' },\n Send: { sf: 'paperplane', material: 'send' },\n Task: { sf: 'checkmark.square', material: 'check-box' },\n Trash: { sf: 'trash', material: 'delete-outline' },\n Wrench: { sf: 'wrench.and.screwdriver', material: 'build' },\n Close: { sf: 'xmark', material: 'close' },\n File: { sf: 'doc', material: 'insert-drive-file' },\n Search: { sf: 'magnifyingglass', material: 'search' },\n Image: { sf: 'photo', material: 'image' },\n Sliders: { sf: 'slider.horizontal.3', material: 'tune' },\n Folder: { sf: 'folder', material: 'folder' },\n Globe: { sf: 'globe', material: 'public' },\n Languages: { sf: 'translate', material: 'translate' },\n Branch: { sf: 'arrow.triangle.branch', material: 'call-split' },\n // ponytail: SF Symbols has no fork distinct from a branch, so iOS draws Fork as Branch. Swap in a custom symbol if the two must differ there.\n Fork: { sf: 'arrow.triangle.branch', material: 'fork-right' },\n Home: { sf: 'house', material: 'home' },\n Activity: { sf: 'waveform.path.ecg', material: 'monitor-heart' },\n ArrowRight: { sf: 'arrow.right', material: 'arrow-forward' },\n Plus: { sf: 'plus', material: 'add' },\n User: { sf: 'person', material: 'person-outline' },\n Users: { sf: 'person.2', material: 'group' },\n IdCard: { sf: 'person.text.rectangle', material: 'badge' },\n PlayCircle: { sf: 'play.circle', material: 'play-circle-outline' },\n Workflow: { sf: 'flowchart', material: 'account-tree' },\n Palette: { sf: 'paintpalette', material: 'palette' },\n Lightbulb: { sf: 'lightbulb', material: 'lightbulb-outline' },\n Sparkles: { sf: 'sparkles', material: 'auto-awesome' },\n Lock: { sf: 'lock', material: 'lock-outline' },\n Shield: { sf: 'checkmark.shield', material: 'verified-user' },\n Download: { sf: 'square.and.arrow.down', material: 'file-download' },\n Mic: { sf: 'mic', material: 'mic' },\n Monitor: { sf: 'laptopcomputer', material: 'laptop' },\n Server: { sf: 'server.rack', material: 'dns' },\n Smartphone: { sf: 'iphone', material: 'smartphone' },\n AudioLines: { sf: 'waveform', material: 'graphic-eq' },\n Stop: { sf: 'stop.fill', material: 'stop' },\n Terminal: { sf: 'apple.terminal', material: 'terminal' },\n Hand: { sf: 'hand.raised', material: 'pan-tool' },\n Pin: { sf: 'mappin', material: 'place' },\n Box: { sf: 'square', material: 'crop-square' },\n Undo: { sf: 'arrow.uturn.backward', material: 'undo' },\n Redo: { sf: 'arrow.uturn.forward', material: 'redo' },\n ArrowUpRight: { sf: 'arrow.up.right', material: 'north-east' },\n Highlighter: { sf: 'highlighter', material: 'border-color' },\n Eraser: { sf: 'eraser', material: 'auto-fix-normal' },\n Minus: { sf: 'minus', material: 'remove' },\n Fit: { sf: 'viewfinder', material: 'fit-screen' },\n Refresh: { sf: 'arrow.clockwise', material: 'refresh' },\n Calendar: { sf: 'calendar', material: 'event' },\n Play: { sf: 'play.fill', material: 'play-arrow' },\n Pause: { sf: 'pause.fill', material: 'pause' },\n Back10: { sf: 'gobackward.10', material: 'replay-10' },\n Forward10: { sf: 'goforward.10', material: 'forward-10' },\n StepBack: { sf: 'backward.frame', material: 'skip-previous' },\n StepForward: { sf: 'forward.frame', material: 'skip-next' },\n} as const;\n\nexport type IconName = keyof typeof ICON_GLYPHS;\n"],"mappings":";;;;;;;AAMA,MAAa,cAAc;CACzB,OAAO;EAAE,IAAI;EAAa,UAAU;CAAQ;CAC5C,aAAa;EAAE,IAAI;EAAgB,UAAU;CAAc;CAC3D,cAAc;EAAE,IAAI;EAAiB,UAAU;CAAgB;CAC/D,WAAW;EAAE,IAAI;EAAc,UAAU;CAAc;CACvD,OAAO;EAAE,IAAI;EAA0B,UAAU;CAAgB;CACjE,MAAM;EAAE,IAAI;EAAc,UAAU;CAAe;CACnD,SAAS;EAAE,IAAI;EAAW,UAAU;CAAsB;CAE1D,OAAO;EAAE,IAAI;EAAY,UAAU;CAAY;CAC/C,MAAM;EAAE,IAAI;EAAqB,UAAU;CAAO;CAClD,MAAM;EAAE,IAAI;EAAU,UAAU;CAAO;CACvC,MAAM;EAAE,IAAI;EAAa,UAAU;CAAW;CAC9C,MAAM;EAAE,IAAI;EAAc,UAAU;CAAO;CAC3C,MAAM;EAAE,IAAI;EAAoB,UAAU;CAAY;CACtD,OAAO;EAAE,IAAI;EAAS,UAAU;CAAiB;CACjD,QAAQ;EAAE,IAAI;EAA0B,UAAU;CAAQ;CAC1D,OAAO;EAAE,IAAI;EAAS,UAAU;CAAQ;CACxC,MAAM;EAAE,IAAI;EAAO,UAAU;CAAoB;CACjD,QAAQ;EAAE,IAAI;EAAmB,UAAU;CAAS;CACpD,OAAO;EAAE,IAAI;EAAS,UAAU;CAAQ;CACxC,SAAS;EAAE,IAAI;EAAuB,UAAU;CAAO;CACvD,QAAQ;EAAE,IAAI;EAAU,UAAU;CAAS;CAC3C,OAAO;EA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AAU,UAAU;CAAc;CAC7C,MAAM;EAAE,IAAI;EAAwB,UAAU;CAAO;CACrD,MAAM;EAAE,IAAI;EAAuB,UAAU;CAAO;CACpD,cAAc;EAAE,IAAI;EAAkB,UAAU;CAAa;CAC7D,aAAa;EAAE,IAAI;EAAe,UAAU;CAAe;CAC3D,QAAQ;EAAE,IAAI;EAAU,UAAU;CAAkB;CACpD,OAAO;EAAE,IAAI;EAAS,UAAU;CAAS;CACzC,KAAK;EAAE,IAAI;EAAc,UAAU;CAAa;CAChD,SAAS;EAAE,IAAI;EAAmB,UAAU;CAAU;CACtD,UAAU;EAAE,IAAI;EAAY,UAAU;CAAQ;CAC9C,MAAM;EAAE,IAAI;EAAa,UAAU;CAAa;CAChD,OAAO;EAAE,IAAI;EAAc,UAAU;CAAQ;CAC7C,QAAQ;EAAE,IAAI;EAAiB,UAAU;CAAY;CACrD,WAAW;EAAE,IAAI;EAAgB,UAAU;CAAa;CACxD,UAAU;EAAE,IAAI;EAAkB,UAAU;CAAgB;CAC5D,aAAa;EAAE,IAAI;EAAiB,UAAU;CAAY;AAC5D"}
|
package/dist/icons/icons.d.mts
CHANGED
|
@@ -82,6 +82,10 @@ export declare const GlobeIcon: {
|
|
|
82
82
|
({ size, color, accessibilityLabel, style }: IconProps): import("react").JSX.Element;
|
|
83
83
|
displayName: string;
|
|
84
84
|
};
|
|
85
|
+
export declare const LanguagesIcon: {
|
|
86
|
+
({ size, color, accessibilityLabel, style }: IconProps): import("react").JSX.Element;
|
|
87
|
+
displayName: string;
|
|
88
|
+
};
|
|
85
89
|
export declare const BranchIcon: {
|
|
86
90
|
({ size, color, accessibilityLabel, style }: IconProps): import("react").JSX.Element;
|
|
87
91
|
displayName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.d.mts","names":[],"sources":["../../src/icons/icons.tsx"],"mappings":";;;iBAaiB;;EAEf;;EAEA,QAAQ;;EAER;EACA,QAAQ,UAAU;;qBAkCP;KA7B8D,MAA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qBA8EvE;KA9E8D,MAAA,OAAA,oBAAA,SAAA,4BAAS,IAAA;;;qBA+EvE;KA/E8D,MAAA,OAAA,oBAAA,SAAA,4BAAS,IAAA;;;qBAgFvE;KAhF8D,MAAA,OAAA,oBAAA,SAAA,4BAAS,IAAA;;;qBAiFvE;KAjF8D,MAAA,OAAA,oBAAA,SAAA,4BAAS,IAAA;;;qBAkFvE;KAlF8D,MAAA,OAAA,oBAAA,SAAA,4BAAS,IAAA;;;qBAmFvE;KAnF8D,MAAA,OAAA,oBAAA,SAAA,4BAAS,IAAA;;;qBAoFvE;KApF8D,MAAA,OAAA,oBAAA,SAAA,4BAAS,IAAA;;;qBAqFvE;KArF8D,MAAA,OAAA,oBAAA,SAAA,4BAAS,IAAA;;;qBAsFvE;KAtF8D,MAAA,OAAA,oBAAA,SAAA,4BAAS,IAAA;;;qBAuFvE;KAvF8D,MAAA,OAAA,oBAAA,SAAA,4BAAS,IAAA;;;qBAwFvE;KAxF8D,MAAA,OAAA,oBAAA,SAAA,4BAAS,IAAA;;;qBAyFvE;KAzF8D,MAAA,OAAA,oBAAA,SAAA,4BAAS,IAAA;;;qBA0FvE;KA1F8D,MAAA,OAAA,oBAAA,SAAA,4BAAS,IAAA;;;qBA2FvE;KA3F8D,MAAA,OAAA,oBAAA,SAAA,4BAAS,IAAA;;;qBA4FvE;KA5F8D,MAAA,OAAA,oBAAA,SAAA,4BAAS,IAAA;;;qBA6FvE;KA7F8D,MAAA,OAAA,oBAAA,SAAA,4BAAS,IAAA;;;qBA8FvE;KA9F8D,MAAA,OAAA,oBAAA,SAAA,4BAAS,IAAA"}
|
package/dist/icons/icons.mjs
CHANGED
|
@@ -64,6 +64,7 @@ const WrenchIcon = createIcon("Wrench");
|
|
|
64
64
|
const CloseIcon = createIcon("Close");
|
|
65
65
|
const FolderIcon = createIcon("Folder");
|
|
66
66
|
const GlobeIcon = createIcon("Globe");
|
|
67
|
+
const LanguagesIcon = createIcon("Languages");
|
|
67
68
|
const BranchIcon = createIcon("Branch");
|
|
68
69
|
const ForkIcon = createIcon("Fork");
|
|
69
70
|
const HomeIcon = createIcon("Home");
|
|
@@ -112,5 +113,5 @@ const StepBackIcon = createIcon("StepBack");
|
|
|
112
113
|
const StepForwardIcon = createIcon("StepForward");
|
|
113
114
|
|
|
114
115
|
//#endregion
|
|
115
|
-
export { ActivityIcon, AlertIcon, ArrowRightIcon, ArrowUpRightIcon, AudioLinesIcon, Back10Icon, BoxIcon, BranchIcon, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, DownloadIcon, EditIcon, EraserIcon, FileIcon, FitIcon, FolderIcon, ForkIcon, Forward10Icon, GearIcon, GlobeIcon, HandIcon, HighlighterIcon, HomeIcon, IdCardIcon, ImageIcon, KebabIcon, LightbulbIcon, LockIcon, MenuIcon, MessageIcon, MicIcon, MinusIcon, MonitorIcon, PaletteIcon, PauseIcon, PinIcon, PlayCircleIcon, PlayIcon, PlusIcon, RedoIcon, RefreshIcon, SearchIcon, SendIcon, ServerIcon, ShieldIcon, SlidersIcon, SmartphoneIcon, SparklesIcon, StepBackIcon, StepForwardIcon, StopIcon, TaskIcon, TerminalIcon, TrashIcon, UndoIcon, UserIcon, UsersIcon, WorkflowIcon, WrenchIcon };
|
|
116
|
+
export { ActivityIcon, AlertIcon, ArrowRightIcon, ArrowUpRightIcon, AudioLinesIcon, Back10Icon, BoxIcon, BranchIcon, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, DownloadIcon, EditIcon, EraserIcon, FileIcon, FitIcon, FolderIcon, ForkIcon, Forward10Icon, GearIcon, GlobeIcon, HandIcon, HighlighterIcon, HomeIcon, IdCardIcon, ImageIcon, KebabIcon, LanguagesIcon, LightbulbIcon, LockIcon, MenuIcon, MessageIcon, MicIcon, MinusIcon, MonitorIcon, PaletteIcon, PauseIcon, PinIcon, PlayCircleIcon, PlayIcon, PlusIcon, RedoIcon, RefreshIcon, SearchIcon, SendIcon, ServerIcon, ShieldIcon, SlidersIcon, SmartphoneIcon, SparklesIcon, StepBackIcon, StepForwardIcon, StopIcon, TaskIcon, TerminalIcon, TrashIcon, UndoIcon, UserIcon, UsersIcon, WorkflowIcon, WrenchIcon };
|
|
116
117
|
//# sourceMappingURL=icons.mjs.map
|
package/dist/icons/icons.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.mjs","names":["IconColorContext","NativeColorToken","MaterialIcons","SymbolView","useContext","Platform","StyleProp","ViewStyle","useUnistyles","ICON_GLYPHS","IconName","DEFAULT_SIZE","DEFAULT_COLOR","IconProps","size","color","accessibilityLabel","style","createIcon","name","glyph","Icon","theme","inherited","tint","colors","a11y","undefined","accessible","importantForAccessibility","accessibilityElementsHidden","const","accessibilityRole","OS","sf","width","height","material","displayName","CheckIcon","ChevronDownIcon","ChevronRightIcon","ChevronUpIcon","AlertIcon","CopyIcon","MessageIcon","KebabIcon","MenuIcon","EditIcon","GearIcon","SendIcon","TaskIcon","TrashIcon","WrenchIcon","CloseIcon","FolderIcon","GlobeIcon","BranchIcon","ForkIcon","HomeIcon","ActivityIcon","ArrowRightIcon","PlusIcon","UserIcon","UsersIcon","IdCardIcon","PlayCircleIcon","WorkflowIcon","PaletteIcon","LightbulbIcon","SparklesIcon","LockIcon","ShieldIcon","FileIcon","SearchIcon","ImageIcon","SlidersIcon","DownloadIcon","MicIcon","MonitorIcon","ServerIcon","SmartphoneIcon","AudioLinesIcon","StopIcon","TerminalIcon","HandIcon","PinIcon","BoxIcon","UndoIcon","RedoIcon","ArrowUpRightIcon","HighlighterIcon","EraserIcon","MinusIcon","FitIcon","RefreshIcon","CalendarIcon","PlayIcon","PauseIcon","Back10Icon","Forward10Icon","StepBackIcon","StepForwardIcon"],"sources":["../../src/icons/icons.tsx"],"sourcesContent":["import { IconColorContext } from '@agimon-ai/po-native-components/shell';\nimport type { NativeColorToken } from '@agimon-ai/po-web-components/nativeTheme';\nimport MaterialIcons from '@expo/vector-icons/MaterialIcons';\nimport { SymbolView } from 'expo-symbols';\nimport { useContext } from 'react';\nimport { Platform, type StyleProp, type ViewStyle } from 'react-native';\nimport { useUnistyles } from 'react-native-unistyles';\n\nimport { ICON_GLYPHS, type IconName } from './iconGlyphs';\n\nconst DEFAULT_SIZE = 16;\nconst DEFAULT_COLOR: NativeColorToken = 'dim';\n\nexport interface IconProps {\n /** Edge length in points. */\n size?: number;\n /** A theme token; defaults to the enclosing Button's label colour, else `dim`. */\n color?: NativeColorToken;\n /** Given one, the icon is announced as an image; without one it is hidden from screen readers. */\n accessibilityLabel?: string;\n style?: StyleProp<ViewStyle>;\n}\n\nfunction createIcon(name: IconName) {\n const glyph = ICON_GLYPHS[name];\n function Icon({ size = DEFAULT_SIZE, color, accessibilityLabel, style }: IconProps) {\n const { theme } = useUnistyles();\n const inherited = useContext(IconColorContext);\n const tint = theme.colors[color ?? inherited ?? DEFAULT_COLOR];\n const a11y =\n accessibilityLabel === undefined\n ? ({\n accessible: false,\n importantForAccessibility: 'no-hide-descendants',\n accessibilityElementsHidden: true,\n } as const)\n : ({ accessible: true, accessibilityRole: 'image', accessibilityLabel } as const);\n if (Platform.OS === 'ios') {\n return (\n <SymbolView\n name={glyph.sf}\n size={size}\n tintColor={tint}\n style={[{ width: size, height: size }, style]}\n {...a11y}\n />\n );\n }\n return <MaterialIcons name={glyph.material} size={size} color={tint} style={style} {...a11y} />;\n }\n Icon.displayName = `${name}Icon`;\n return Icon;\n}\n\nexport const CheckIcon = createIcon('Check');\nexport const ChevronDownIcon = createIcon('ChevronDown');\nexport const ChevronRightIcon = createIcon('ChevronRight');\nexport const ChevronUpIcon = createIcon('ChevronUp');\nexport const AlertIcon = createIcon('Alert');\nexport const CopyIcon = createIcon('Copy');\nexport const MessageIcon = createIcon('Message');\nexport const KebabIcon = createIcon('Kebab');\nexport const MenuIcon = createIcon('Menu');\nexport const EditIcon = createIcon('Edit');\nexport const GearIcon = createIcon('Gear');\nexport const SendIcon = createIcon('Send');\nexport const TaskIcon = createIcon('Task');\nexport const TrashIcon = createIcon('Trash');\nexport const WrenchIcon = createIcon('Wrench');\nexport const CloseIcon = createIcon('Close');\nexport const FolderIcon = createIcon('Folder');\nexport const GlobeIcon = createIcon('Globe');\nexport const BranchIcon = createIcon('Branch');\nexport const ForkIcon = createIcon('Fork');\nexport const HomeIcon = createIcon('Home');\nexport const ActivityIcon = createIcon('Activity');\nexport const ArrowRightIcon = createIcon('ArrowRight');\nexport const PlusIcon = createIcon('Plus');\nexport const UserIcon = createIcon('User');\nexport const UsersIcon = createIcon('Users');\nexport const IdCardIcon = createIcon('IdCard');\nexport const PlayCircleIcon = createIcon('PlayCircle');\nexport const WorkflowIcon = createIcon('Workflow');\nexport const PaletteIcon = createIcon('Palette');\nexport const LightbulbIcon = createIcon('Lightbulb');\nexport const SparklesIcon = createIcon('Sparkles');\nexport const LockIcon = createIcon('Lock');\nexport const ShieldIcon = createIcon('Shield');\n\nexport const FileIcon = createIcon('File');\nexport const SearchIcon = createIcon('Search');\nexport const ImageIcon = createIcon('Image');\nexport const SlidersIcon = createIcon('Sliders');\nexport const DownloadIcon = createIcon('Download');\nexport const MicIcon = createIcon('Mic');\nexport const MonitorIcon = createIcon('Monitor');\nexport const ServerIcon = createIcon('Server');\nexport const SmartphoneIcon = createIcon('Smartphone');\nexport const AudioLinesIcon = createIcon('AudioLines');\nexport const StopIcon = createIcon('Stop');\nexport const TerminalIcon = createIcon('Terminal');\nexport const HandIcon = createIcon('Hand');\nexport const PinIcon = createIcon('Pin');\nexport const BoxIcon = createIcon('Box');\nexport const UndoIcon = createIcon('Undo');\nexport const RedoIcon = createIcon('Redo');\nexport const ArrowUpRightIcon = createIcon('ArrowUpRight');\nexport const HighlighterIcon = createIcon('Highlighter');\nexport const EraserIcon = createIcon('Eraser');\nexport const MinusIcon = createIcon('Minus');\nexport const FitIcon = createIcon('Fit');\nexport const RefreshIcon = createIcon('Refresh');\nexport const CalendarIcon = createIcon('Calendar');\nexport const PlayIcon = createIcon('Play');\nexport const PauseIcon = createIcon('Pause');\nexport const Back10Icon = createIcon('Back10');\nexport const Forward10Icon = createIcon('Forward10');\nexport const StepBackIcon = createIcon('StepBack');\nexport const StepForwardIcon = createIcon('StepForward');\n"],"mappings":";;;;;;;;;;AAUA,MAAMW,eAAe;AACrB,MAAMC,gBAAkC;AAYxC,SAASM,WAAWC,MAAgB;CAClC,MAAMC,QAAQX,YAAYU;CAC1B,SAASE,KAAK,EAAEP,OAAOH,cAAcI,OAAOC,oBAAoBC,SAAoB;EAClF,MAAM,EAAEK,UAAUd,aAAa;EAC/B,MAAMe,YAAYnB,WAAWJ,gBAAgB;EAC7C,MAAMwB,OAAOF,MAAMG,OAAOV,SAASQ,aAAaX;EAChD,MAAMc,OACJV,uBAAuBW,SAClB;GACCC,YAAY;GACZC,2BAA2B;GAC3BC,6BAA6B;EAC/B,IACC;GAAEF,YAAY;GAAMI,mBAAmB;GAAShB;EAAmB;EAC1E,IAAIX,SAAS4B,OAAO,OAClB,OACE,oBAAC,YAAD;GACE,MAAMb,MAAMc;GACNpB;GACN,WAAWU;GACX,OAAO,CAAC;IAAEW,OAAOrB;IAAMsB,QAAQtB;GAAK,GAAGG,KAAK;GAC5C,GAAIS;EAAK;EAIf,OAAO,oBAAC,eAAD;GAAe,MAAMN,MAAMiB;GAAgBvB;GAAM,OAAOU;GAAaP;GAAO,GAAIS;EAAK;CAC9F;CACAL,KAAKiB,cAAc,GAAGnB,KAAI;CAC1B,OAAOE;AACT;AAEA,MAAakB,YAAYrB,WAAW,OAAO;AAC3C,MAAasB,kBAAkBtB,WAAW,aAAa;AACvD,MAAauB,mBAAmBvB,WAAW,cAAc;AACzD,MAAawB,gBAAgBxB,WAAW,WAAW;AACnD,MAAayB,YAAYzB,WAAW,OAAO;AAC3C,MAAa0B,WAAW1B,WAAW,MAAM;AACzC,MAAa2B,cAAc3B,WAAW,SAAS;AAC/C,MAAa4B,YAAY5B,WAAW,OAAO;AAC3C,MAAa6B,WAAW7B,WAAW,MAAM;AACzC,MAAa8B,WAAW9B,WAAW,MAAM;AACzC,MAAa+B,WAAW/B,WAAW,MAAM;AACzC,MAAagC,WAAWhC,WAAW,MAAM;AACzC,MAAaiC,WAAWjC,WAAW,MAAM;AACzC,MAAakC,YAAYlC,WAAW,OAAO;AAC3C,MAAamC,aAAanC,WAAW,QAAQ;AAC7C,MAAaoC,YAAYpC,WAAW,OAAO;AAC3C,MAAaqC,aAAarC,WAAW,QAAQ;AAC7C,MAAasC,YAAYtC,WAAW,OAAO;AAC3C,MAAauC,
|
|
1
|
+
{"version":3,"file":"icons.mjs","names":["IconColorContext","NativeColorToken","MaterialIcons","SymbolView","useContext","Platform","StyleProp","ViewStyle","useUnistyles","ICON_GLYPHS","IconName","DEFAULT_SIZE","DEFAULT_COLOR","IconProps","size","color","accessibilityLabel","style","createIcon","name","glyph","Icon","theme","inherited","tint","colors","a11y","undefined","accessible","importantForAccessibility","accessibilityElementsHidden","const","accessibilityRole","OS","sf","width","height","material","displayName","CheckIcon","ChevronDownIcon","ChevronRightIcon","ChevronUpIcon","AlertIcon","CopyIcon","MessageIcon","KebabIcon","MenuIcon","EditIcon","GearIcon","SendIcon","TaskIcon","TrashIcon","WrenchIcon","CloseIcon","FolderIcon","GlobeIcon","LanguagesIcon","BranchIcon","ForkIcon","HomeIcon","ActivityIcon","ArrowRightIcon","PlusIcon","UserIcon","UsersIcon","IdCardIcon","PlayCircleIcon","WorkflowIcon","PaletteIcon","LightbulbIcon","SparklesIcon","LockIcon","ShieldIcon","FileIcon","SearchIcon","ImageIcon","SlidersIcon","DownloadIcon","MicIcon","MonitorIcon","ServerIcon","SmartphoneIcon","AudioLinesIcon","StopIcon","TerminalIcon","HandIcon","PinIcon","BoxIcon","UndoIcon","RedoIcon","ArrowUpRightIcon","HighlighterIcon","EraserIcon","MinusIcon","FitIcon","RefreshIcon","CalendarIcon","PlayIcon","PauseIcon","Back10Icon","Forward10Icon","StepBackIcon","StepForwardIcon"],"sources":["../../src/icons/icons.tsx"],"sourcesContent":["import { IconColorContext } from '@agimon-ai/po-native-components/shell';\nimport type { NativeColorToken } from '@agimon-ai/po-web-components/nativeTheme';\nimport MaterialIcons from '@expo/vector-icons/MaterialIcons';\nimport { SymbolView } from 'expo-symbols';\nimport { useContext } from 'react';\nimport { Platform, type StyleProp, type ViewStyle } from 'react-native';\nimport { useUnistyles } from 'react-native-unistyles';\n\nimport { ICON_GLYPHS, type IconName } from './iconGlyphs';\n\nconst DEFAULT_SIZE = 16;\nconst DEFAULT_COLOR: NativeColorToken = 'dim';\n\nexport interface IconProps {\n /** Edge length in points. */\n size?: number;\n /** A theme token; defaults to the enclosing Button's label colour, else `dim`. */\n color?: NativeColorToken;\n /** Given one, the icon is announced as an image; without one it is hidden from screen readers. */\n accessibilityLabel?: string;\n style?: StyleProp<ViewStyle>;\n}\n\nfunction createIcon(name: IconName) {\n const glyph = ICON_GLYPHS[name];\n function Icon({ size = DEFAULT_SIZE, color, accessibilityLabel, style }: IconProps) {\n const { theme } = useUnistyles();\n const inherited = useContext(IconColorContext);\n const tint = theme.colors[color ?? inherited ?? DEFAULT_COLOR];\n const a11y =\n accessibilityLabel === undefined\n ? ({\n accessible: false,\n importantForAccessibility: 'no-hide-descendants',\n accessibilityElementsHidden: true,\n } as const)\n : ({ accessible: true, accessibilityRole: 'image', accessibilityLabel } as const);\n if (Platform.OS === 'ios') {\n return (\n <SymbolView\n name={glyph.sf}\n size={size}\n tintColor={tint}\n style={[{ width: size, height: size }, style]}\n {...a11y}\n />\n );\n }\n return <MaterialIcons name={glyph.material} size={size} color={tint} style={style} {...a11y} />;\n }\n Icon.displayName = `${name}Icon`;\n return Icon;\n}\n\nexport const CheckIcon = createIcon('Check');\nexport const ChevronDownIcon = createIcon('ChevronDown');\nexport const ChevronRightIcon = createIcon('ChevronRight');\nexport const ChevronUpIcon = createIcon('ChevronUp');\nexport const AlertIcon = createIcon('Alert');\nexport const CopyIcon = createIcon('Copy');\nexport const MessageIcon = createIcon('Message');\nexport const KebabIcon = createIcon('Kebab');\nexport const MenuIcon = createIcon('Menu');\nexport const EditIcon = createIcon('Edit');\nexport const GearIcon = createIcon('Gear');\nexport const SendIcon = createIcon('Send');\nexport const TaskIcon = createIcon('Task');\nexport const TrashIcon = createIcon('Trash');\nexport const WrenchIcon = createIcon('Wrench');\nexport const CloseIcon = createIcon('Close');\nexport const FolderIcon = createIcon('Folder');\nexport const GlobeIcon = createIcon('Globe');\nexport const LanguagesIcon = createIcon('Languages');\nexport const BranchIcon = createIcon('Branch');\nexport const ForkIcon = createIcon('Fork');\nexport const HomeIcon = createIcon('Home');\nexport const ActivityIcon = createIcon('Activity');\nexport const ArrowRightIcon = createIcon('ArrowRight');\nexport const PlusIcon = createIcon('Plus');\nexport const UserIcon = createIcon('User');\nexport const UsersIcon = createIcon('Users');\nexport const IdCardIcon = createIcon('IdCard');\nexport const PlayCircleIcon = createIcon('PlayCircle');\nexport const WorkflowIcon = createIcon('Workflow');\nexport const PaletteIcon = createIcon('Palette');\nexport const LightbulbIcon = createIcon('Lightbulb');\nexport const SparklesIcon = createIcon('Sparkles');\nexport const LockIcon = createIcon('Lock');\nexport const ShieldIcon = createIcon('Shield');\n\nexport const FileIcon = createIcon('File');\nexport const SearchIcon = createIcon('Search');\nexport const ImageIcon = createIcon('Image');\nexport const SlidersIcon = createIcon('Sliders');\nexport const DownloadIcon = createIcon('Download');\nexport const MicIcon = createIcon('Mic');\nexport const MonitorIcon = createIcon('Monitor');\nexport const ServerIcon = createIcon('Server');\nexport const SmartphoneIcon = createIcon('Smartphone');\nexport const AudioLinesIcon = createIcon('AudioLines');\nexport const StopIcon = createIcon('Stop');\nexport const TerminalIcon = createIcon('Terminal');\nexport const HandIcon = createIcon('Hand');\nexport const PinIcon = createIcon('Pin');\nexport const BoxIcon = createIcon('Box');\nexport const UndoIcon = createIcon('Undo');\nexport const RedoIcon = createIcon('Redo');\nexport const ArrowUpRightIcon = createIcon('ArrowUpRight');\nexport const HighlighterIcon = createIcon('Highlighter');\nexport const EraserIcon = createIcon('Eraser');\nexport const MinusIcon = createIcon('Minus');\nexport const FitIcon = createIcon('Fit');\nexport const RefreshIcon = createIcon('Refresh');\nexport const CalendarIcon = createIcon('Calendar');\nexport const PlayIcon = createIcon('Play');\nexport const PauseIcon = createIcon('Pause');\nexport const Back10Icon = createIcon('Back10');\nexport const Forward10Icon = createIcon('Forward10');\nexport const StepBackIcon = createIcon('StepBack');\nexport const StepForwardIcon = createIcon('StepForward');\n"],"mappings":";;;;;;;;;;AAUA,MAAMW,eAAe;AACrB,MAAMC,gBAAkC;AAYxC,SAASM,WAAWC,MAAgB;CAClC,MAAMC,QAAQX,YAAYU;CAC1B,SAASE,KAAK,EAAEP,OAAOH,cAAcI,OAAOC,oBAAoBC,SAAoB;EAClF,MAAM,EAAEK,UAAUd,aAAa;EAC/B,MAAMe,YAAYnB,WAAWJ,gBAAgB;EAC7C,MAAMwB,OAAOF,MAAMG,OAAOV,SAASQ,aAAaX;EAChD,MAAMc,OACJV,uBAAuBW,SAClB;GACCC,YAAY;GACZC,2BAA2B;GAC3BC,6BAA6B;EAC/B,IACC;GAAEF,YAAY;GAAMI,mBAAmB;GAAShB;EAAmB;EAC1E,IAAIX,SAAS4B,OAAO,OAClB,OACE,oBAAC,YAAD;GACE,MAAMb,MAAMc;GACNpB;GACN,WAAWU;GACX,OAAO,CAAC;IAAEW,OAAOrB;IAAMsB,QAAQtB;GAAK,GAAGG,KAAK;GAC5C,GAAIS;EAAK;EAIf,OAAO,oBAAC,eAAD;GAAe,MAAMN,MAAMiB;GAAgBvB;GAAM,OAAOU;GAAaP;GAAO,GAAIS;EAAK;CAC9F;CACAL,KAAKiB,cAAc,GAAGnB,KAAI;CAC1B,OAAOE;AACT;AAEA,MAAakB,YAAYrB,WAAW,OAAO;AAC3C,MAAasB,kBAAkBtB,WAAW,aAAa;AACvD,MAAauB,mBAAmBvB,WAAW,cAAc;AACzD,MAAaw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D,cAAc3D,WAAW,SAAS;AAC/C,MAAa4D,eAAe5D,WAAW,UAAU;AACjD,MAAa6D,UAAU7D,WAAW,KAAK;AACvC,MAAa8D,cAAc9D,WAAW,SAAS;AAC/C,MAAa+D,aAAa/D,WAAW,QAAQ;AAC7C,MAAagE,iBAAiBhE,WAAW,YAAY;AACrD,MAAaiE,iBAAiBjE,WAAW,YAAY;AACrD,MAAakE,WAAWlE,WAAW,MAAM;AACzC,MAAamE,eAAenE,WAAW,UAAU;AACjD,MAAaoE,WAAWpE,WAAW,MAAM;AACzC,MAAaqE,UAAUrE,WAAW,KAAK;AACvC,MAAasE,UAAUtE,WAAW,KAAK;AACvC,MAAauE,WAAWvE,WAAW,MAAM;AACzC,MAAawE,WAAWxE,WAAW,MAAM;AACzC,MAAayE,mBAAmBzE,WAAW,cAAc;AACzD,MAAa0E,kBAAkB1E,WAAW,aAAa;AACvD,MAAa2E,aAAa3E,WAAW,QAAQ;AAC7C,MAAa4E,YAAY5E,WAAW,OAAO;AAC3C,MAAa6E,UAAU7E,WAAW,KAAK;AACvC,MAAa8E,cAAc9E,WAAW,SAAS;AAC/C,MAAa+E,eAAe/E,WAAW,UAAU;AACjD,MAAagF,WAAWhF,WAAW,MAAM;AACzC,MAAaiF,YAAYjF,WAAW,OAAO;AAC3C,MAAakF,aAAalF,WAAW,QAAQ;AAC7C,MAAamF,gBAAgBnF,WAAW,WAAW;AACnD,MAAaoF,eAAepF,WAAW,UAAU;AACjD,MAAaqF,kBAAkBrF,WAAW,aAAa"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentAvatar, AgentState, agentInitials } from "./components/AgentAvatar.mjs";
|
|
1
|
+
import { AgentAvatar, AgentState, Tint, agentInitials, tintFor } from "./components/AgentAvatar.mjs";
|
|
2
2
|
import { AnnotationMark, AnnotationSurface, AnnotationSurfaceProps } from "./components/AnnotationSurface.mjs";
|
|
3
3
|
import { Badge, BadgeProps, BadgeSize, BadgeTone } from "./components/Badge.mjs";
|
|
4
4
|
import { Button, ButtonProps, ButtonSize, ButtonVariant } from "./components/Button.mjs";
|
|
@@ -22,7 +22,7 @@ import { Label, LabelProps } from "./components/Label.mjs";
|
|
|
22
22
|
import { FileLinkHandler, Markdown, MarkdownImageLoader, MarkdownProps, ReferenceRenderer } from "./components/Markdown.mjs";
|
|
23
23
|
import { LinkText, LinkTextProps } from "./components/LinkText.mjs";
|
|
24
24
|
import { List, ListProps, ListRow, ListRowProps } from "./components/List.mjs";
|
|
25
|
-
import { ActivityIcon, AlertIcon, ArrowRightIcon, ArrowUpRightIcon, AudioLinesIcon, Back10Icon, BoxIcon, BranchIcon, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, DownloadIcon, EditIcon, EraserIcon, FileIcon, FitIcon, FolderIcon, ForkIcon, Forward10Icon, GearIcon, GlobeIcon, HandIcon, HighlighterIcon, HomeIcon, IconProps, IdCardIcon, ImageIcon, KebabIcon, LightbulbIcon, LockIcon, MenuIcon, MessageIcon, MicIcon, MinusIcon, MonitorIcon, PaletteIcon, PauseIcon, PinIcon, PlayCircleIcon, PlayIcon, PlusIcon, RedoIcon, RefreshIcon, SearchIcon, SendIcon, ServerIcon, ShieldIcon, SlidersIcon, SmartphoneIcon, SparklesIcon, StepBackIcon, StepForwardIcon, StopIcon, TaskIcon, TerminalIcon, TrashIcon, UndoIcon, UserIcon, UsersIcon, WorkflowIcon, WrenchIcon } from "./icons/icons.mjs";
|
|
25
|
+
import { ActivityIcon, AlertIcon, ArrowRightIcon, ArrowUpRightIcon, AudioLinesIcon, Back10Icon, BoxIcon, BranchIcon, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, DownloadIcon, EditIcon, EraserIcon, FileIcon, FitIcon, FolderIcon, ForkIcon, Forward10Icon, GearIcon, GlobeIcon, HandIcon, HighlighterIcon, HomeIcon, IconProps, IdCardIcon, ImageIcon, KebabIcon, LanguagesIcon, LightbulbIcon, LockIcon, MenuIcon, MessageIcon, MicIcon, MinusIcon, MonitorIcon, PaletteIcon, PauseIcon, PinIcon, PlayCircleIcon, PlayIcon, PlusIcon, RedoIcon, RefreshIcon, SearchIcon, SendIcon, ServerIcon, ShieldIcon, SlidersIcon, SmartphoneIcon, SparklesIcon, StepBackIcon, StepForwardIcon, StopIcon, TaskIcon, TerminalIcon, TrashIcon, UndoIcon, UserIcon, UsersIcon, WorkflowIcon, WrenchIcon } from "./icons/icons.mjs";
|
|
26
26
|
import { RailItem, RailItemProps } from "./components/RailItem.mjs";
|
|
27
27
|
import { ReferenceChip } from "./components/ReferenceChip.mjs";
|
|
28
28
|
import { STATUS_EDGE, StatusBadge, StatusBadgeProps, StatusBadgeSize, StatusTone } from "./components/StatusBadge.mjs";
|
|
@@ -49,4 +49,4 @@ import { HostTag } from "./components/HostTag.mjs";
|
|
|
49
49
|
import { InfoStrip } from "./components/InfoStrip.mjs";
|
|
50
50
|
import { AnsiSpan, BoundedFileSource, FileFilters, FileItem, FileKind, FileLayout, FileModified, FileRangeLoader, FileSort, FileSortDirection, FileStatus, FileStatusFilter, FileTextPreview, FileTreeRow, PresentedLine, ReviewComment, ageLabel, ansiSpans, boundedFileSource, buildReviewPrompt, collapseLines, fileAssetPath, fileKind, filePreviewMode, fileTree, filterFiles, hashlineBody, isFileLayout, modifiedLabel, newestFiles, readMediaBytes, resultTextLines, sizeLabel, sortFiles } from "@agimon-ai/po-web-components/text";
|
|
51
51
|
import { IconColorContext, LiveDuration, LiveDurationProps, LiveDurationReading, PoNativeProvider, PoNativeProviderProps, sheetsYielded, yieldSheets } from "@agimon-ai/po-native-components/shell";
|
|
52
|
-
export { ActivityIcon, AgentAvatar, type AgentState, AlertIcon, type AnnotationMark, AnnotationSurface, type AnnotationSurfaceProps, type AnsiSpan, ArrowRightIcon, ArrowUpRightIcon, AudioLinesIcon, Back10Icon, Badge, type BadgeProps, type BadgeSize, type BadgeTone, type BoundedFileSource, BoxIcon, BranchIcon, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CodeBlock, type CodeBlockProps, ComputerRow, type ComputerRowProps, type ComputerStatus, CopyButton, type CopyButtonProps, CopyIcon, CountBadge, type CountBadgeProps, CtaCard, type CtaCardProps, 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 EmptyStateAction, type EmptyStateProps, type EmptyStateSize, EraserIcon, type FieldSize, type FieldVariant, type FileBrowserControls, type FileFilters, FileIcon, type FileItem, type FileKind, type FileLayout, type FileLinkHandler, FileList, type FileListProps, type FileModified, FilePathStrip, FilePreview, type FilePreviewProps, type FileRangeLoader, type FileSort, type FileSortDirection, type FileStatus, type FileStatusFilter, type FileTextPreview, type FileTreeRow, FileViewer, FileViewerHeader, type FileViewerProps, FitIcon, FolderIcon, ForkIcon, Forward10Icon, GearIcon, GlobeIcon, HandIcon, HashlineLines, type HashlineLinesProps, HighlighterIcon, HomeIcon, HostFilter, type HostFilterProps, HostTag, IconColorContext, type IconName, type IconProps, IdCardIcon, ImageIcon, InfoStrip, Input, type InputProps, KebabIcon, Label, type LabelProps, LightbulbIcon, LinkText, type LinkTextProps, List, type ListProps, ListRow, type ListRowProps, LiveDuration, type LiveDurationProps, type LiveDurationReading, LoadingState, type LoadingStateProps, type LoadingStateSize, LockIcon, Markdown, type MarkdownImageLoader, type MarkdownProps, MenuIcon, MessageIcon, MessageItem, MessageItemBody, MessageItemGroup, type MessageItemGroupProps, MessageItemHeader, type MessageItemHeaderProps, type MessageItemPartProps, type MessageItemProps, type MessageItemState, MessageItemStatus, type MessageItemStatusProps, MicIcon, MinusIcon, MonitorIcon, PaletteIcon, Panel, PanelBody, PanelHeader, type PanelPartProps, PauseIcon, PinIcon, PlayCircleIcon, PlayIcon, PlusIcon, PoNativeProvider, type PoNativeProviderProps, type PresentedLine, RailItem, type RailItemProps, RedoIcon, ReferenceChip, type ReferenceRenderer, RefreshIcon, type ReviewComment, STATUS_EDGE, STATUS_GLYPH, STATUS_LABEL, SearchIcon, SectionLabel, SeekBar, type SeekBarProps, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, type SelectOption, type SelectProps, SendIcon, ServerIcon, Sheet, SheetBody, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, type SheetHeaderProps, SheetList, type SheetListProps, type SheetPartProps, type SheetProps, SheetTitle, SheetTrigger, ShieldIcon, ShowMore, type ShowMoreProps, SlidersIcon, SmartphoneIcon, SparklesIcon, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, type StatusBadgeSize, type StatusTone, StepBackIcon, StepForwardIcon, StopIcon, Switch, type SwitchProps, SyntaxLine, type SyntaxLineProps, TabBadge, type TabBadgeProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TaskIcon, TerminalIcon, Textarea, type TextareaProps, ToolPathLink, type ToolPathLinkProps, ToolResultImage, type ToolResultImageProps, TrashIcon, UndoIcon, UserIcon, UsersIcon, WorkflowIcon, WrenchIcon, ageLabel, agentInitials, ansiSpans, authorImageOpener, boundedFileSource, buildReviewPrompt, collapseLines, fileAssetPath, fileKind, filePreviewMode, fileTree, filterFiles, fontOf, hashlineBody, impactLight, isFileLayout, modifiedLabel, newestFiles, readMediaBytes, resultTextLines, selectionTick, sheetsYielded, sizeLabel, sortFiles, toolTone, useMessageItem, useSyntaxLines, yieldSheets };
|
|
52
|
+
export { ActivityIcon, AgentAvatar, type AgentState, AlertIcon, type AnnotationMark, AnnotationSurface, type AnnotationSurfaceProps, type AnsiSpan, ArrowRightIcon, ArrowUpRightIcon, AudioLinesIcon, Back10Icon, Badge, type BadgeProps, type BadgeSize, type BadgeTone, type BoundedFileSource, BoxIcon, BranchIcon, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CodeBlock, type CodeBlockProps, ComputerRow, type ComputerRowProps, type ComputerStatus, CopyButton, type CopyButtonProps, CopyIcon, CountBadge, type CountBadgeProps, CtaCard, type CtaCardProps, 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 EmptyStateAction, type EmptyStateProps, type EmptyStateSize, EraserIcon, type FieldSize, type FieldVariant, type FileBrowserControls, type FileFilters, FileIcon, type FileItem, type FileKind, type FileLayout, type FileLinkHandler, FileList, type FileListProps, type FileModified, FilePathStrip, FilePreview, type FilePreviewProps, type FileRangeLoader, type FileSort, type FileSortDirection, type FileStatus, type FileStatusFilter, type FileTextPreview, type FileTreeRow, FileViewer, FileViewerHeader, type FileViewerProps, FitIcon, FolderIcon, ForkIcon, Forward10Icon, GearIcon, GlobeIcon, HandIcon, HashlineLines, type HashlineLinesProps, HighlighterIcon, HomeIcon, HostFilter, type HostFilterProps, HostTag, IconColorContext, type IconName, type IconProps, IdCardIcon, ImageIcon, InfoStrip, Input, type InputProps, KebabIcon, Label, type LabelProps, LanguagesIcon, LightbulbIcon, LinkText, type LinkTextProps, List, type ListProps, ListRow, type ListRowProps, LiveDuration, type LiveDurationProps, type LiveDurationReading, LoadingState, type LoadingStateProps, type LoadingStateSize, LockIcon, Markdown, type MarkdownImageLoader, type MarkdownProps, MenuIcon, MessageIcon, MessageItem, MessageItemBody, MessageItemGroup, type MessageItemGroupProps, MessageItemHeader, type MessageItemHeaderProps, type MessageItemPartProps, type MessageItemProps, type MessageItemState, MessageItemStatus, type MessageItemStatusProps, MicIcon, MinusIcon, MonitorIcon, PaletteIcon, Panel, PanelBody, PanelHeader, type PanelPartProps, PauseIcon, PinIcon, PlayCircleIcon, PlayIcon, PlusIcon, PoNativeProvider, type PoNativeProviderProps, type PresentedLine, RailItem, type RailItemProps, RedoIcon, ReferenceChip, type ReferenceRenderer, RefreshIcon, type ReviewComment, STATUS_EDGE, STATUS_GLYPH, STATUS_LABEL, SearchIcon, SectionLabel, SeekBar, type SeekBarProps, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, type SelectOption, type SelectProps, SendIcon, ServerIcon, Sheet, SheetBody, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, type SheetHeaderProps, SheetList, type SheetListProps, type SheetPartProps, type SheetProps, SheetTitle, SheetTrigger, ShieldIcon, ShowMore, type ShowMoreProps, SlidersIcon, SmartphoneIcon, SparklesIcon, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, type StatusBadgeSize, type StatusTone, StepBackIcon, StepForwardIcon, StopIcon, Switch, type SwitchProps, SyntaxLine, type SyntaxLineProps, TabBadge, type TabBadgeProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TaskIcon, TerminalIcon, Textarea, type TextareaProps, type Tint, ToolPathLink, type ToolPathLinkProps, ToolResultImage, type ToolResultImageProps, TrashIcon, UndoIcon, UserIcon, UsersIcon, WorkflowIcon, WrenchIcon, ageLabel, agentInitials, ansiSpans, authorImageOpener, boundedFileSource, buildReviewPrompt, collapseLines, fileAssetPath, fileKind, filePreviewMode, fileTree, filterFiles, fontOf, hashlineBody, impactLight, isFileLayout, modifiedLabel, newestFiles, readMediaBytes, resultTextLines, selectionTick, sheetsYielded, sizeLabel, sortFiles, tintFor, toolTone, useMessageItem, useSyntaxLines, yieldSheets };
|
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { fontOf } from "./lib/fonts.mjs";
|
|
2
2
|
import { Dot } from "./components/Dot.mjs";
|
|
3
|
-
import { AgentAvatar, agentInitials } from "./components/AgentAvatar.mjs";
|
|
3
|
+
import { AgentAvatar, agentInitials, tintFor } from "./components/AgentAvatar.mjs";
|
|
4
4
|
import { impactLight, selectionTick } from "./lib/haptics.mjs";
|
|
5
5
|
import { AnnotationSurface } from "./components/AnnotationSurface.mjs";
|
|
6
6
|
import { Badge } from "./components/Badge.mjs";
|
|
7
7
|
import { Spinner } from "./components/Spinner.mjs";
|
|
8
8
|
import { Button } from "./components/Button.mjs";
|
|
9
|
-
import { ActivityIcon, AlertIcon, ArrowRightIcon, ArrowUpRightIcon, AudioLinesIcon, Back10Icon, BoxIcon, BranchIcon, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, DownloadIcon, EditIcon, EraserIcon, FileIcon, FitIcon, FolderIcon, ForkIcon, Forward10Icon, GearIcon, GlobeIcon, HandIcon, HighlighterIcon, HomeIcon, IdCardIcon, ImageIcon, KebabIcon, LightbulbIcon, LockIcon, MenuIcon, MessageIcon, MicIcon, MinusIcon, MonitorIcon, PaletteIcon, PauseIcon, PinIcon, PlayCircleIcon, PlayIcon, PlusIcon, RedoIcon, RefreshIcon, SearchIcon, SendIcon, ServerIcon, ShieldIcon, SlidersIcon, SmartphoneIcon, SparklesIcon, StepBackIcon, StepForwardIcon, StopIcon, TaskIcon, TerminalIcon, TrashIcon, UndoIcon, UserIcon, UsersIcon, WorkflowIcon, WrenchIcon } from "./icons/icons.mjs";
|
|
9
|
+
import { ActivityIcon, AlertIcon, ArrowRightIcon, ArrowUpRightIcon, AudioLinesIcon, Back10Icon, BoxIcon, BranchIcon, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, DownloadIcon, EditIcon, EraserIcon, FileIcon, FitIcon, FolderIcon, ForkIcon, Forward10Icon, GearIcon, GlobeIcon, HandIcon, HighlighterIcon, HomeIcon, IdCardIcon, ImageIcon, KebabIcon, LanguagesIcon, LightbulbIcon, LockIcon, MenuIcon, MessageIcon, MicIcon, MinusIcon, MonitorIcon, PaletteIcon, PauseIcon, PinIcon, PlayCircleIcon, PlayIcon, PlusIcon, RedoIcon, RefreshIcon, SearchIcon, SendIcon, ServerIcon, ShieldIcon, SlidersIcon, SmartphoneIcon, SparklesIcon, StepBackIcon, StepForwardIcon, StopIcon, TaskIcon, TerminalIcon, TrashIcon, UndoIcon, UserIcon, UsersIcon, WorkflowIcon, WrenchIcon } from "./icons/icons.mjs";
|
|
10
10
|
import { CopyButton } from "./components/CopyButton.mjs";
|
|
11
11
|
import { ShowMore } from "./components/ShowMore.mjs";
|
|
12
12
|
import { CodeBlock } from "./components/CodeBlock.mjs";
|
|
@@ -49,4 +49,4 @@ import { InfoStrip } from "./components/InfoStrip.mjs";
|
|
|
49
49
|
import { ageLabel, ansiSpans, boundedFileSource, buildReviewPrompt, collapseLines, fileAssetPath, fileKind, filePreviewMode, fileTree, filterFiles, hashlineBody, isFileLayout, modifiedLabel, newestFiles, readMediaBytes, resultTextLines, sizeLabel, sortFiles } from "@agimon-ai/po-web-components/text";
|
|
50
50
|
import { IconColorContext, LiveDuration, PoNativeProvider, sheetsYielded, yieldSheets } from "@agimon-ai/po-native-components/shell";
|
|
51
51
|
|
|
52
|
-
export { ActivityIcon, AgentAvatar, AlertIcon, AnnotationSurface, ArrowRightIcon, ArrowUpRightIcon, AudioLinesIcon, Back10Icon, Badge, BoxIcon, BranchIcon, Button, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CodeBlock, ComputerRow, CopyButton, CopyIcon, CountBadge, CtaCard, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Dot, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, EditIcon, EmptyState, EraserIcon, FileIcon, FileList, FilePathStrip, FilePreview, FileViewer, FileViewerHeader, FitIcon, FolderIcon, ForkIcon, Forward10Icon, GearIcon, GlobeIcon, HandIcon, HashlineLines, HighlighterIcon, HomeIcon, HostFilter, HostTag, IconColorContext, IdCardIcon, ImageIcon, InfoStrip, Input, KebabIcon, Label, LightbulbIcon, LinkText, List, ListRow, LiveDuration, LoadingState, LockIcon, Markdown, MenuIcon, MessageIcon, MessageItem, MessageItemBody, MessageItemGroup, MessageItemHeader, MessageItemStatus, MicIcon, MinusIcon, MonitorIcon, PaletteIcon, Panel, PanelBody, PanelHeader, PauseIcon, PinIcon, PlayCircleIcon, PlayIcon, PlusIcon, PoNativeProvider, RailItem, RedoIcon, ReferenceChip, RefreshIcon, STATUS_EDGE, STATUS_GLYPH, STATUS_LABEL, SearchIcon, SectionLabel, SeekBar, SegmentedControl, Select, SendIcon, ServerIcon, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetList, SheetTitle, SheetTrigger, ShieldIcon, ShowMore, SlidersIcon, SmartphoneIcon, SparklesIcon, Spinner, StatusBadge, StepBackIcon, StepForwardIcon, StopIcon, Switch, SyntaxLine, TabBadge, Tabs, TabsContent, TabsList, TabsTrigger, TaskIcon, TerminalIcon, Textarea, ToolPathLink, ToolResultImage, TrashIcon, UndoIcon, UserIcon, UsersIcon, WorkflowIcon, WrenchIcon, ageLabel, agentInitials, ansiSpans, authorImageOpener, boundedFileSource, buildReviewPrompt, collapseLines, fileAssetPath, fileKind, filePreviewMode, fileTree, filterFiles, fontOf, hashlineBody, impactLight, isFileLayout, modifiedLabel, newestFiles, readMediaBytes, resultTextLines, selectionTick, sheetsYielded, sizeLabel, sortFiles, toolTone, useMessageItem, useSyntaxLines, yieldSheets };
|
|
52
|
+
export { ActivityIcon, AgentAvatar, AlertIcon, AnnotationSurface, ArrowRightIcon, ArrowUpRightIcon, AudioLinesIcon, Back10Icon, Badge, BoxIcon, BranchIcon, Button, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CodeBlock, ComputerRow, CopyButton, CopyIcon, CountBadge, CtaCard, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Dot, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, EditIcon, EmptyState, EraserIcon, FileIcon, FileList, FilePathStrip, FilePreview, FileViewer, FileViewerHeader, FitIcon, FolderIcon, ForkIcon, Forward10Icon, GearIcon, GlobeIcon, HandIcon, HashlineLines, HighlighterIcon, HomeIcon, HostFilter, HostTag, IconColorContext, IdCardIcon, ImageIcon, InfoStrip, Input, KebabIcon, Label, LanguagesIcon, LightbulbIcon, LinkText, List, ListRow, LiveDuration, LoadingState, LockIcon, Markdown, MenuIcon, MessageIcon, MessageItem, MessageItemBody, MessageItemGroup, MessageItemHeader, MessageItemStatus, MicIcon, MinusIcon, MonitorIcon, PaletteIcon, Panel, PanelBody, PanelHeader, PauseIcon, PinIcon, PlayCircleIcon, PlayIcon, PlusIcon, PoNativeProvider, RailItem, RedoIcon, ReferenceChip, RefreshIcon, STATUS_EDGE, STATUS_GLYPH, STATUS_LABEL, SearchIcon, SectionLabel, SeekBar, SegmentedControl, Select, SendIcon, ServerIcon, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetList, SheetTitle, SheetTrigger, ShieldIcon, ShowMore, SlidersIcon, SmartphoneIcon, SparklesIcon, Spinner, StatusBadge, StepBackIcon, StepForwardIcon, StopIcon, Switch, SyntaxLine, TabBadge, Tabs, TabsContent, TabsList, TabsTrigger, TaskIcon, TerminalIcon, Textarea, ToolPathLink, ToolResultImage, TrashIcon, UndoIcon, UserIcon, UsersIcon, WorkflowIcon, WrenchIcon, ageLabel, agentInitials, ansiSpans, authorImageOpener, boundedFileSource, buildReviewPrompt, collapseLines, fileAssetPath, fileKind, filePreviewMode, fileTree, filterFiles, fontOf, hashlineBody, impactLight, isFileLayout, modifiedLabel, newestFiles, readMediaBytes, resultTextLines, selectionTick, sheetsYielded, sizeLabel, sortFiles, tintFor, toolTone, useMessageItem, useSyntaxLines, yieldSheets };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"platformRequirements":{},"sourceFiles":["LICENSE","README.md","llms.txt","package.json","src/components/AgentAvatar.stories.tsx","src/components/AgentAvatar.tsx","src/components/AnnotationSurface.tsx","src/components/Badge.stories.tsx","src/components/Badge.tsx","src/components/Button.stories.tsx","src/components/Button.tsx","src/components/CodeBlock.stories.tsx","src/components/CodeBlock.tsx","src/components/ComputerRow.stories.tsx","src/components/ComputerRow.tsx","src/components/CopyButton.tsx","src/components/CountBadge.stories.tsx","src/components/CountBadge.tsx","src/components/CtaCard.stories.tsx","src/components/CtaCard.tsx","src/components/Dialog.stories.tsx","src/components/Dialog.tsx","src/components/Dot.stories.tsx","src/components/Dot.tsx","src/components/DropdownMenu.stories.tsx","src/components/DropdownMenu.tsx","src/components/EmptyState.stories.tsx","src/components/EmptyState.tsx","src/components/FileList.stories.tsx","src/components/FileList.tsx","src/components/FilePreview.stories.tsx","src/components/FilePreview.tsx","src/components/FileViewer.tsx","src/components/HashlineLines.tsx","src/components/HostFilter.stories.tsx","src/components/HostFilter.tsx","src/components/HostTag.stories.tsx","src/components/HostTag.tsx","src/components/InfoStrip.stories.tsx","src/components/InfoStrip.tsx","src/components/InlineReadingDesign.stories.tsx","src/components/Input.stories.tsx","src/components/Input.tsx","src/components/Label.stories.tsx","src/components/Label.tsx","src/components/LinkText.tsx","src/components/List.stories.tsx","src/components/List.tsx","src/components/LiveDuration.tsx","src/components/LoadingState.stories.tsx","src/components/LoadingState.tsx","src/components/Markdown.stories.tsx","src/components/Markdown.tsx","src/components/MessageItem.stories.tsx","src/components/MessageItem.tsx","src/components/NativeShellState.tsx","src/components/Panel.stories.tsx","src/components/Panel.tsx","src/components/PoNativeProvider.stories.tsx","src/components/PoNativeProvider.tsx","src/components/RailItem.stories.tsx","src/components/RailItem.tsx","src/components/ReferenceChip.stories.tsx","src/components/ReferenceChip.tsx","src/components/SectionLabel.stories.tsx","src/components/SectionLabel.tsx","src/components/SeekBar.stories.tsx","src/components/SeekBar.tsx","src/components/SegmentedControl.stories.tsx","src/components/SegmentedControl.tsx","src/components/Select.stories.tsx","src/components/Select.tsx","src/components/Sheet.stories.tsx","src/components/Sheet.tsx","src/components/SheetFrame.tsx","src/components/SheetList.tsx","src/components/ShowMore.tsx","src/components/Spinner.stories.tsx","src/components/Spinner.tsx","src/components/StatusBadge.stories.tsx","src/components/StatusBadge.tsx","src/components/Switch.stories.tsx","src/components/Switch.tsx","src/components/SyntaxLine.tsx","src/components/Tabs.stories.tsx","src/components/Tabs.tsx","src/components/Textarea.stories.tsx","src/components/Textarea.tsx","src/components/ToolPathLink.tsx","src/components/ToolResultImage.tsx","src/exports/index.ts","src/exports/shell.ts","src/icons/IconColorContext.ts","src/icons/iconGlyphs.ts","src/icons/icons.stories.tsx","src/icons/icons.tsx","src/lib/fileKindLabel.ts","src/lib/fonts.ts","src/lib/haptics.ts","src/lib/insideSheet.ts","src/lib/markdown.ts","src/lib/reading.ts","src/lib/tone.ts","src/lib/useControllable.ts","src/lib/useReadingPage.ts","src/lib/wrapText.tsx","src/unistyles.ts","tsdown.config.ts"],"sourceRevision":"
|
|
1
|
+
{"version":1,"platformRequirements":{},"sourceFiles":["LICENSE","README.md","llms.txt","package.json","src/components/AgentAvatar.stories.tsx","src/components/AgentAvatar.tsx","src/components/AnnotationSurface.tsx","src/components/Badge.stories.tsx","src/components/Badge.tsx","src/components/Button.stories.tsx","src/components/Button.tsx","src/components/CodeBlock.stories.tsx","src/components/CodeBlock.tsx","src/components/ComputerRow.stories.tsx","src/components/ComputerRow.tsx","src/components/CopyButton.tsx","src/components/CountBadge.stories.tsx","src/components/CountBadge.tsx","src/components/CtaCard.stories.tsx","src/components/CtaCard.tsx","src/components/Dialog.stories.tsx","src/components/Dialog.tsx","src/components/Dot.stories.tsx","src/components/Dot.tsx","src/components/DropdownMenu.stories.tsx","src/components/DropdownMenu.tsx","src/components/EmptyState.stories.tsx","src/components/EmptyState.tsx","src/components/FileList.stories.tsx","src/components/FileList.tsx","src/components/FilePreview.stories.tsx","src/components/FilePreview.tsx","src/components/FileViewer.stories.tsx","src/components/FileViewer.tsx","src/components/HashlineLines.tsx","src/components/HostFilter.stories.tsx","src/components/HostFilter.tsx","src/components/HostTag.stories.tsx","src/components/HostTag.tsx","src/components/InfoStrip.stories.tsx","src/components/InfoStrip.tsx","src/components/InlineReadingDesign.stories.tsx","src/components/Input.stories.tsx","src/components/Input.tsx","src/components/Label.stories.tsx","src/components/Label.tsx","src/components/LinkText.tsx","src/components/List.stories.tsx","src/components/List.tsx","src/components/LiveDuration.tsx","src/components/LoadingState.stories.tsx","src/components/LoadingState.tsx","src/components/Markdown.stories.tsx","src/components/Markdown.tsx","src/components/MessageItem.stories.tsx","src/components/MessageItem.tsx","src/components/NativeShellState.tsx","src/components/Panel.stories.tsx","src/components/Panel.tsx","src/components/PoNativeProvider.stories.tsx","src/components/PoNativeProvider.tsx","src/components/RailItem.stories.tsx","src/components/RailItem.tsx","src/components/ReferenceChip.stories.tsx","src/components/ReferenceChip.tsx","src/components/SectionLabel.stories.tsx","src/components/SectionLabel.tsx","src/components/SeekBar.stories.tsx","src/components/SeekBar.tsx","src/components/SegmentedControl.stories.tsx","src/components/SegmentedControl.tsx","src/components/Select.stories.tsx","src/components/Select.tsx","src/components/Sheet.stories.tsx","src/components/Sheet.tsx","src/components/SheetFrame.tsx","src/components/SheetList.tsx","src/components/ShowMore.tsx","src/components/Spinner.stories.tsx","src/components/Spinner.tsx","src/components/StatusBadge.stories.tsx","src/components/StatusBadge.tsx","src/components/Switch.stories.tsx","src/components/Switch.tsx","src/components/SyntaxLine.tsx","src/components/Tabs.stories.tsx","src/components/Tabs.tsx","src/components/Textarea.stories.tsx","src/components/Textarea.tsx","src/components/ToolPathLink.tsx","src/components/ToolResultImage.tsx","src/exports/index.ts","src/exports/shell.ts","src/icons/IconColorContext.ts","src/icons/iconGlyphs.ts","src/icons/icons.stories.tsx","src/icons/icons.tsx","src/lib/fileKindLabel.ts","src/lib/fonts.ts","src/lib/haptics.ts","src/lib/insideSheet.ts","src/lib/markdown.ts","src/lib/reading.ts","src/lib/tone.ts","src/lib/useControllable.ts","src/lib/useReadingPage.ts","src/lib/wrapText.tsx","src/unistyles.ts","tsdown.config.ts"],"sourceRevision":"0c2d40358e22388c84471167cadbc9c8","manifestRevision":"8c812a452f11a1f1cf171b256d7187b0","outputFiles":["LICENSE","README.md","dist/components/AgentAvatar.mjs","dist/components/AnnotationSurface.mjs","dist/components/Badge.mjs","dist/components/Button.mjs","dist/components/CodeBlock.mjs","dist/components/ComputerRow.mjs","dist/components/CopyButton.mjs","dist/components/CountBadge.mjs","dist/components/CtaCard.mjs","dist/components/Dialog.mjs","dist/components/Dot.mjs","dist/components/DropdownMenu.mjs","dist/components/EmptyState.mjs","dist/components/FileList.mjs","dist/components/FilePreview.mjs","dist/components/FileViewer.mjs","dist/components/HashlineLines.mjs","dist/components/HostFilter.mjs","dist/components/HostTag.mjs","dist/components/InfoStrip.mjs","dist/components/Input.mjs","dist/components/Label.mjs","dist/components/LinkText.mjs","dist/components/List.mjs","dist/components/LiveDuration.mjs","dist/components/LoadingState.mjs","dist/components/Markdown.mjs","dist/components/MessageItem.mjs","dist/components/NativeShellState.mjs","dist/components/Panel.mjs","dist/components/PoNativeProvider.mjs","dist/components/RailItem.mjs","dist/components/ReferenceChip.mjs","dist/components/SectionLabel.mjs","dist/components/SeekBar.mjs","dist/components/SegmentedControl.mjs","dist/components/Select.mjs","dist/components/Sheet.mjs","dist/components/SheetFrame.mjs","dist/components/SheetList.mjs","dist/components/ShowMore.mjs","dist/components/Spinner.mjs","dist/components/StatusBadge.mjs","dist/components/Switch.mjs","dist/components/SyntaxLine.mjs","dist/components/Tabs.mjs","dist/components/Textarea.mjs","dist/components/ToolPathLink.mjs","dist/components/ToolResultImage.mjs","dist/icons/IconColorContext.mjs","dist/icons/iconGlyphs.mjs","dist/icons/icons.mjs","dist/index.mjs","dist/lib/fileKindLabel.mjs","dist/lib/fonts.mjs","dist/lib/haptics.mjs","dist/lib/insideSheet.mjs","dist/lib/markdown.mjs","dist/lib/reading.mjs","dist/lib/tone.mjs","dist/lib/useControllable.mjs","dist/lib/useReadingPage.mjs","dist/lib/wrapText.mjs","dist/shell.mjs","llms.txt"],"outputRevision":"6be6a9008b61d5bada60b5a08c2167ea"}
|
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.199",
|
|
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",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@agimon-ai/po-web-components": "0.0.0-alpha.
|
|
52
|
+
"@agimon-ai/po-web-components": "0.0.0-alpha.199"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@agimon-ai/po-build": "0.0.0-alpha.
|
|
56
|
-
"@agimon-ai/po-core": "0.0.0-alpha.
|
|
57
|
-
"@agimon-ai/vibe-lint-plugin-po-web": "0.0.0-alpha.
|
|
55
|
+
"@agimon-ai/po-build": "0.0.0-alpha.199",
|
|
56
|
+
"@agimon-ai/po-core": "0.0.0-alpha.199",
|
|
57
|
+
"@agimon-ai/vibe-lint-plugin-po-web": "0.0.0-alpha.199",
|
|
58
58
|
"@babel/core": "7.29.7",
|
|
59
59
|
"@expo/vector-icons": "15.1.1",
|
|
60
60
|
"@fontsource-variable/ibm-plex-sans": "5.3.0",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"vitest": "5.0.4"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
|
-
"@agimon-ai/po-core": "0.0.0-alpha.
|
|
88
|
+
"@agimon-ai/po-core": "0.0.0-alpha.199",
|
|
89
89
|
"@expo/vector-icons": "^15.0.0",
|
|
90
90
|
"@gorhom/bottom-sheet": "^5.2.0",
|
|
91
91
|
"@react-native-segmented-control/segmented-control": "^2.5.0",
|