@agimon-ai/po-native-components 0.0.0-alpha.13 → 0.0.0-alpha.131

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/LICENSE +149 -22
  2. package/dist/components/AgentAvatar.d.mts +14 -0
  3. package/dist/components/AgentAvatar.d.mts.map +1 -0
  4. package/dist/components/AgentAvatar.mjs +87 -0
  5. package/dist/components/AgentAvatar.mjs.map +1 -0
  6. package/dist/components/AnnotationSurface.d.mts +69 -0
  7. package/dist/components/AnnotationSurface.d.mts.map +1 -0
  8. package/dist/components/AnnotationSurface.mjs +426 -0
  9. package/dist/components/AnnotationSurface.mjs.map +1 -0
  10. package/dist/components/Badge.d.mts +1 -1
  11. package/dist/components/Badge.mjs +1 -1
  12. package/dist/components/Button.mjs +3 -3
  13. package/dist/components/Button.mjs.map +1 -1
  14. package/dist/components/CodeBlock.d.mts +3 -1
  15. package/dist/components/CodeBlock.d.mts.map +1 -1
  16. package/dist/components/CodeBlock.mjs +35 -47
  17. package/dist/components/CodeBlock.mjs.map +1 -1
  18. package/dist/components/CopyButton.d.mts +13 -0
  19. package/dist/components/CopyButton.d.mts.map +1 -0
  20. package/dist/components/CopyButton.mjs +43 -0
  21. package/dist/components/CopyButton.mjs.map +1 -0
  22. package/dist/components/CountBadge.d.mts +15 -0
  23. package/dist/components/CountBadge.d.mts.map +1 -0
  24. package/dist/components/CountBadge.mjs +49 -0
  25. package/dist/components/CountBadge.mjs.map +1 -0
  26. package/dist/components/Dialog.d.mts.map +1 -1
  27. package/dist/components/Dialog.mjs +9 -8
  28. package/dist/components/Dialog.mjs.map +1 -1
  29. package/dist/components/Dot.d.mts +1 -1
  30. package/dist/components/Dot.mjs +2 -2
  31. package/dist/components/DropdownMenu.d.mts +3 -1
  32. package/dist/components/DropdownMenu.d.mts.map +1 -1
  33. package/dist/components/DropdownMenu.mjs +21 -14
  34. package/dist/components/DropdownMenu.mjs.map +1 -1
  35. package/dist/components/HashlineLines.d.mts +13 -0
  36. package/dist/components/HashlineLines.d.mts.map +1 -0
  37. package/dist/components/HashlineLines.mjs +148 -0
  38. package/dist/components/HashlineLines.mjs.map +1 -0
  39. package/dist/components/HostFilter.d.mts +17 -0
  40. package/dist/components/HostFilter.d.mts.map +1 -0
  41. package/dist/components/HostFilter.mjs +66 -0
  42. package/dist/components/HostFilter.mjs.map +1 -0
  43. package/dist/components/HostTag.d.mts +7 -0
  44. package/dist/components/HostTag.d.mts.map +1 -0
  45. package/dist/components/HostTag.mjs +47 -0
  46. package/dist/components/HostTag.mjs.map +1 -0
  47. package/dist/components/InfoStrip.d.mts +9 -0
  48. package/dist/components/InfoStrip.d.mts.map +1 -0
  49. package/dist/components/InfoStrip.mjs +53 -0
  50. package/dist/components/InfoStrip.mjs.map +1 -0
  51. package/dist/components/Input.d.mts +3 -1
  52. package/dist/components/Input.d.mts.map +1 -1
  53. package/dist/components/Input.mjs +4 -3
  54. package/dist/components/Input.mjs.map +1 -1
  55. package/dist/components/Label.mjs +1 -1
  56. package/dist/components/List.d.mts.map +1 -1
  57. package/dist/components/List.mjs +38 -6
  58. package/dist/components/List.mjs.map +1 -1
  59. package/dist/components/LiveDuration.d.mts +30 -0
  60. package/dist/components/LiveDuration.d.mts.map +1 -0
  61. package/dist/components/LiveDuration.mjs +67 -0
  62. package/dist/components/LiveDuration.mjs.map +1 -0
  63. package/dist/components/Markdown.d.mts +10 -1
  64. package/dist/components/Markdown.d.mts.map +1 -1
  65. package/dist/components/Markdown.mjs +335 -26
  66. package/dist/components/Markdown.mjs.map +1 -1
  67. package/dist/components/MessageItem.d.mts +10 -15
  68. package/dist/components/MessageItem.d.mts.map +1 -1
  69. package/dist/components/MessageItem.mjs +72 -63
  70. package/dist/components/MessageItem.mjs.map +1 -1
  71. package/dist/components/NativeShellState.d.mts +30 -0
  72. package/dist/components/NativeShellState.d.mts.map +1 -0
  73. package/dist/components/NativeShellState.mjs +61 -0
  74. package/dist/components/NativeShellState.mjs.map +1 -0
  75. package/dist/components/SectionLabel.mjs +1 -1
  76. package/dist/components/Select.d.mts +33 -0
  77. package/dist/components/Select.d.mts.map +1 -0
  78. package/dist/components/Select.mjs +222 -0
  79. package/dist/components/Select.mjs.map +1 -0
  80. package/dist/components/Sheet.d.mts +9 -1
  81. package/dist/components/Sheet.d.mts.map +1 -1
  82. package/dist/components/Sheet.mjs +27 -10
  83. package/dist/components/Sheet.mjs.map +1 -1
  84. package/dist/components/SheetFrame.mjs +143 -28
  85. package/dist/components/SheetFrame.mjs.map +1 -1
  86. package/dist/components/SheetList.d.mts +14 -0
  87. package/dist/components/SheetList.d.mts.map +1 -0
  88. package/dist/components/SheetList.mjs +34 -0
  89. package/dist/components/SheetList.mjs.map +1 -0
  90. package/dist/components/ShowMore.d.mts +10 -0
  91. package/dist/components/ShowMore.d.mts.map +1 -0
  92. package/dist/components/ShowMore.mjs +44 -0
  93. package/dist/components/ShowMore.mjs.map +1 -0
  94. package/dist/components/Spinner.d.mts +1 -1
  95. package/dist/components/StatusBadge.d.mts +1 -1
  96. package/dist/components/Switch.d.mts +14 -0
  97. package/dist/components/Switch.d.mts.map +1 -0
  98. package/dist/components/Switch.mjs +37 -0
  99. package/dist/components/Switch.mjs.map +1 -0
  100. package/dist/components/SyntaxLine.d.mts +19 -0
  101. package/dist/components/SyntaxLine.d.mts.map +1 -0
  102. package/dist/components/SyntaxLine.mjs +134 -0
  103. package/dist/components/SyntaxLine.mjs.map +1 -0
  104. package/dist/components/Tabs.d.mts.map +1 -1
  105. package/dist/components/Tabs.mjs +8 -7
  106. package/dist/components/Tabs.mjs.map +1 -1
  107. package/dist/components/ToolPathLink.d.mts +10 -0
  108. package/dist/components/ToolPathLink.d.mts.map +1 -0
  109. package/dist/components/ToolPathLink.mjs +40 -0
  110. package/dist/components/ToolPathLink.mjs.map +1 -0
  111. package/dist/components/ToolResultImage.d.mts +12 -0
  112. package/dist/components/ToolResultImage.d.mts.map +1 -0
  113. package/dist/components/ToolResultImage.mjs +48 -0
  114. package/dist/components/ToolResultImage.mjs.map +1 -0
  115. package/dist/icons/iconGlyphs.d.mts +60 -0
  116. package/dist/icons/iconGlyphs.d.mts.map +1 -1
  117. package/dist/icons/iconGlyphs.mjs +60 -0
  118. package/dist/icons/iconGlyphs.mjs.map +1 -1
  119. package/dist/icons/icons.d.mts +61 -1
  120. package/dist/icons/icons.d.mts.map +1 -1
  121. package/dist/icons/icons.mjs +17 -2
  122. package/dist/icons/icons.mjs.map +1 -1
  123. package/dist/index.d.mts +20 -6
  124. package/dist/index.mjs +21 -7
  125. package/dist/lib/fonts.d.mts +3 -1
  126. package/dist/lib/fonts.d.mts.map +1 -1
  127. package/dist/lib/fonts.mjs +4 -2
  128. package/dist/lib/fonts.mjs.map +1 -1
  129. package/dist/lib/insideSheet.d.mts +10 -0
  130. package/dist/lib/insideSheet.d.mts.map +1 -0
  131. package/dist/lib/markdown.mjs +172 -23
  132. package/dist/lib/markdown.mjs.map +1 -1
  133. package/dist/lib/reading.mjs +60 -0
  134. package/dist/lib/reading.mjs.map +1 -0
  135. package/dist/lib/useControllable.mjs +14 -6
  136. package/dist/lib/useControllable.mjs.map +1 -1
  137. package/dist/lib/useReadingPage.mjs +33 -0
  138. package/dist/lib/useReadingPage.mjs.map +1 -0
  139. package/dist/shell.d.mts +6 -0
  140. package/dist/shell.mjs +7 -0
  141. package/package.json +37 -28
@@ -1,9 +1,9 @@
1
- import { IconColorContext } from "./IconColorContext.mjs";
2
1
  import { ICON_GLYPHS } from "./iconGlyphs.mjs";
3
2
  import { useUnistyles } from "react-native-unistyles";
4
3
  import { Platform } from "react-native";
5
4
  import { useContext } from "react";
6
5
  import { jsx } from "react/jsx-runtime";
6
+ import { IconColorContext } from "@agimon-ai/po-native-components/shell";
7
7
  import MaterialIcons from "@expo/vector-icons/MaterialIcons";
8
8
  import { SymbolView } from "expo-symbols";
9
9
 
@@ -49,10 +49,12 @@ function createIcon(name) {
49
49
  const CheckIcon = createIcon("Check");
50
50
  const ChevronDownIcon = createIcon("ChevronDown");
51
51
  const ChevronRightIcon = createIcon("ChevronRight");
52
+ const ChevronUpIcon = createIcon("ChevronUp");
52
53
  const AlertIcon = createIcon("Alert");
53
54
  const CopyIcon = createIcon("Copy");
54
55
  const MessageIcon = createIcon("Message");
55
56
  const KebabIcon = createIcon("Kebab");
57
+ const MenuIcon = createIcon("Menu");
56
58
  const EditIcon = createIcon("Edit");
57
59
  const GearIcon = createIcon("Gear");
58
60
  const SendIcon = createIcon("Send");
@@ -61,11 +63,14 @@ const TrashIcon = createIcon("Trash");
61
63
  const WrenchIcon = createIcon("Wrench");
62
64
  const CloseIcon = createIcon("Close");
63
65
  const FolderIcon = createIcon("Folder");
66
+ const GlobeIcon = createIcon("Globe");
64
67
  const BranchIcon = createIcon("Branch");
68
+ const ForkIcon = createIcon("Fork");
65
69
  const HomeIcon = createIcon("Home");
66
70
  const ActivityIcon = createIcon("Activity");
67
71
  const ArrowRightIcon = createIcon("ArrowRight");
68
72
  const PlusIcon = createIcon("Plus");
73
+ const UserIcon = createIcon("User");
69
74
  const UsersIcon = createIcon("Users");
70
75
  const PlayCircleIcon = createIcon("PlayCircle");
71
76
  const WorkflowIcon = createIcon("Workflow");
@@ -73,7 +78,17 @@ const PaletteIcon = createIcon("Palette");
73
78
  const LightbulbIcon = createIcon("Lightbulb");
74
79
  const SparklesIcon = createIcon("Sparkles");
75
80
  const LockIcon = createIcon("Lock");
81
+ const ShieldIcon = createIcon("Shield");
82
+ const FileIcon = createIcon("File");
83
+ const SearchIcon = createIcon("Search");
84
+ const ImageIcon = createIcon("Image");
85
+ const SlidersIcon = createIcon("Sliders");
86
+ const DownloadIcon = createIcon("Download");
87
+ const MicIcon = createIcon("Mic");
88
+ const MonitorIcon = createIcon("Monitor");
89
+ const AudioLinesIcon = createIcon("AudioLines");
90
+ const StopIcon = createIcon("Stop");
76
91
 
77
92
  //#endregion
78
- export { ActivityIcon, AlertIcon, ArrowRightIcon, BranchIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, CloseIcon, CopyIcon, EditIcon, FolderIcon, GearIcon, HomeIcon, KebabIcon, LightbulbIcon, LockIcon, MessageIcon, PaletteIcon, PlayCircleIcon, PlusIcon, SendIcon, SparklesIcon, TaskIcon, TrashIcon, UsersIcon, WorkflowIcon, WrenchIcon };
93
+ export { ActivityIcon, AlertIcon, ArrowRightIcon, AudioLinesIcon, BranchIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, DownloadIcon, EditIcon, FileIcon, FolderIcon, ForkIcon, GearIcon, GlobeIcon, HomeIcon, ImageIcon, KebabIcon, LightbulbIcon, LockIcon, MenuIcon, MessageIcon, MicIcon, MonitorIcon, PaletteIcon, PlayCircleIcon, PlusIcon, SearchIcon, SendIcon, ShieldIcon, SlidersIcon, SparklesIcon, StopIcon, TaskIcon, TrashIcon, UserIcon, UsersIcon, WorkflowIcon, WrenchIcon };
79
94
  //# sourceMappingURL=icons.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"icons.mjs","names":["NativeColorToken","MaterialIcons","SymbolView","useContext","Platform","StyleProp","ViewStyle","useUnistyles","IconColorContext","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","AlertIcon","CopyIcon","MessageIcon","KebabIcon","EditIcon","GearIcon","SendIcon","TaskIcon","TrashIcon","WrenchIcon","CloseIcon","FolderIcon","BranchIcon","HomeIcon","ActivityIcon","ArrowRightIcon","PlusIcon","UsersIcon","PlayCircleIcon","WorkflowIcon","PaletteIcon","LightbulbIcon","SparklesIcon","LockIcon"],"sources":["../../src/icons/icons.tsx"],"sourcesContent":["import 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 { IconColorContext } from './IconColorContext';\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 AlertIcon = createIcon('Alert');\nexport const CopyIcon = createIcon('Copy');\nexport const MessageIcon = createIcon('Message');\nexport const KebabIcon = createIcon('Kebab');\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 BranchIcon = createIcon('Branch');\nexport const HomeIcon = createIcon('Home');\nexport const ActivityIcon = createIcon('Activity');\nexport const ArrowRightIcon = createIcon('ArrowRight');\nexport const PlusIcon = createIcon('Plus');\nexport const UsersIcon = createIcon('Users');\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');\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,UAAUf,aAAa;EAC/B,MAAMgB,YAAYpB,WAAWK,gBAAgB;EAC7C,MAAMgB,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,IAAIZ,SAAS6B,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,YAAYxB,WAAW,OAAO;AAC3C,MAAayB,WAAWzB,WAAW,MAAM;AACzC,MAAa0B,cAAc1B,WAAW,SAAS;AAC/C,MAAa2B,YAAY3B,WAAW,OAAO;AAC3C,MAAa4B,WAAW5B,WAAW,MAAM;AACzC,MAAa6B,WAAW7B,WAAW,MAAM;AACzC,MAAa8B,WAAW9B,WAAW,MAAM;AACzC,MAAa+B,WAAW/B,WAAW,MAAM;AACzC,MAAagC,YAAYhC,WAAW,OAAO;AAC3C,MAAaiC,aAAajC,WAAW,QAAQ;AAC7C,MAAakC,YAAYlC,WAAW,OAAO;AAC3C,MAAamC,aAAanC,WAAW,QAAQ;AAC7C,MAAaoC,aAAapC,WAAW,QAAQ;AAC7C,MAAaqC,WAAWrC,WAAW,MAAM;AACzC,MAAasC,eAAetC,WAAW,UAAU;AACjD,MAAauC,iBAAiBvC,WAAW,YAAY;AACrD,MAAawC,WAAWxC,WAAW,MAAM;AACzC,MAAayC,YAAYzC,WAAW,OAAO;AAC3C,MAAa0C,iBAAiB1C,WAAW,YAAY;AACrD,MAAa2C,eAAe3C,WAAW,UAAU;AACjD,MAAa4C,cAAc5C,WAAW,SAAS;AAC/C,MAAa6C,gBAAgB7C,WAAW,WAAW;AACnD,MAAa8C,eAAe9C,WAAW,UAAU;AACjD,MAAa+C,WAAW/C,WAAW,MAAM"}
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","PlayCircleIcon","WorkflowIcon","PaletteIcon","LightbulbIcon","SparklesIcon","LockIcon","ShieldIcon","FileIcon","SearchIcon","ImageIcon","SlidersIcon","DownloadIcon","MicIcon","MonitorIcon","AudioLinesIcon","StopIcon"],"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 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 AudioLinesIcon = createIcon('AudioLines');\nexport const StopIcon = createIcon('Stop');\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,aAAavC,WAAW,QAAQ;AAC7C,MAAawC,WAAWxC,WAAW,MAAM;AACzC,MAAayC,WAAWzC,WAAW,MAAM;AACzC,MAAa0C,eAAe1C,WAAW,UAAU;AACjD,MAAa2C,iBAAiB3C,WAAW,YAAY;AACrD,MAAa4C,WAAW5C,WAAW,MAAM;AACzC,MAAa6C,WAAW7C,WAAW,MAAM;AACzC,MAAa8C,YAAY9C,WAAW,OAAO;AAC3C,MAAa+C,iBAAiB/C,WAAW,YAAY;AACrD,MAAagD,eAAehD,WAAW,UAAU;AACjD,MAAaiD,cAAcjD,WAAW,SAAS;AAC/C,MAAakD,gBAAgBlD,WAAW,WAAW;AACnD,MAAamD,eAAenD,WAAW,UAAU;AACjD,MAAaoD,WAAWpD,WAAW,MAAM;AACzC,MAAaqD,aAAarD,WAAW,QAAQ;AAE7C,MAAasD,WAAWtD,WAAW,MAAM;AACzC,MAAauD,aAAavD,WAAW,QAAQ;AAC7C,MAAawD,YAAYxD,WAAW,OAAO;AAC3C,MAAayD,cAAczD,WAAW,SAAS;AAC/C,MAAa0D,eAAe1D,WAAW,UAAU;AACjD,MAAa2D,UAAU3D,WAAW,KAAK;AACvC,MAAa4D,cAAc5D,WAAW,SAAS;AAC/C,MAAa6D,iBAAiB7D,WAAW,YAAY;AACrD,MAAa8D,WAAW9D,WAAW,MAAM"}
package/dist/index.d.mts CHANGED
@@ -1,28 +1,42 @@
1
+ import { AgentAvatar, AgentState, agentInitials } from "./components/AgentAvatar.mjs";
2
+ import { AnnotationMark, AnnotationSurface, AnnotationSurfaceProps } from "./components/AnnotationSurface.mjs";
1
3
  import { Badge, BadgeProps, BadgeSize, BadgeTone } from "./components/Badge.mjs";
2
4
  import { Button, ButtonProps, ButtonSize, ButtonVariant } from "./components/Button.mjs";
3
5
  import { CodeBlock, CodeBlockProps } from "./components/CodeBlock.mjs";
6
+ import { ToolResultImage, ToolResultImageProps } from "./components/ToolResultImage.mjs";
7
+ import { CopyButton, CopyButtonProps } from "./components/CopyButton.mjs";
4
8
  import { Dialog, DialogBody, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogFooter, DialogFooterProps, DialogFooterVariant, DialogHeader, DialogHeaderProps, DialogPartProps, DialogProps, DialogTitle, DialogTrigger, DialogWidth } from "./components/Dialog.mjs";
9
+ import { CountBadge, CountBadgeProps } from "./components/CountBadge.mjs";
5
10
  import { Dot, DotProps, DotSize, DotTone } from "./components/Dot.mjs";
6
11
  import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuCheckboxItemProps, DropdownMenuContent, DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuItemVariant, DropdownMenuLabel, DropdownMenuPartProps, DropdownMenuProps, DropdownMenuRadioGroup, DropdownMenuRadioGroupProps, DropdownMenuRadioItem, DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger } from "./components/DropdownMenu.mjs";
7
12
  import { EmptyState, EmptyStateProps } from "./components/EmptyState.mjs";
13
+ import { HashlineLines, HashlineLinesProps } from "./components/HashlineLines.mjs";
8
14
  import { FieldSize, FieldVariant, Input, InputProps } from "./components/Input.mjs";
9
15
  import { Label, LabelProps } from "./components/Label.mjs";
10
16
  import { List, ListProps, ListRow, ListRowProps } from "./components/List.mjs";
11
- import { FileLinkHandler, Markdown, MarkdownProps } from "./components/Markdown.mjs";
17
+ import { FileLinkHandler, Markdown, MarkdownImageLoader, MarkdownProps } from "./components/Markdown.mjs";
12
18
  import { STATUS_EDGE, StatusBadge, StatusBadgeProps, StatusBadgeSize, StatusTone } from "./components/StatusBadge.mjs";
13
19
  import { MessageItem, MessageItemBody, MessageItemGroup, MessageItemGroupProps, MessageItemHeader, MessageItemHeaderProps, MessageItemPartProps, MessageItemProps, MessageItemState, MessageItemStatus, MessageItemStatusProps, STATUS_GLYPH, STATUS_LABEL, toolTone, useMessageItem } from "./components/MessageItem.mjs";
14
20
  import { Panel, PanelBody, PanelHeader, PanelPartProps } from "./components/Panel.mjs";
15
- import { PoNativeProvider, PoNativeProviderProps } from "./components/PoNativeProvider.mjs";
16
21
  import { SectionLabel } from "./components/SectionLabel.mjs";
17
22
  import { SegmentedControl, SegmentedControlOption, SegmentedControlProps } from "./components/SegmentedControl.mjs";
23
+ import { Select, SelectOption, SelectProps } from "./components/Select.mjs";
18
24
  import { Sheet, SheetBody, SheetClose, SheetContent, SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetHeaderProps, SheetPartProps, SheetProps, SheetTitle, SheetTrigger } from "./components/Sheet.mjs";
25
+ import { SheetList, SheetListProps } from "./components/SheetList.mjs";
26
+ import { ShowMore, ShowMoreProps } from "./components/ShowMore.mjs";
19
27
  import { Spinner, SpinnerProps } from "./components/Spinner.mjs";
28
+ import { Switch, SwitchProps } from "./components/Switch.mjs";
20
29
  import { TabBadge, TabBadgeProps, Tabs, TabsContent, TabsContentProps, TabsList, TabsListProps, TabsProps, TabsTrigger, TabsTriggerProps } from "./components/Tabs.mjs";
30
+ import { SyntaxLine, SyntaxLineProps, useSyntaxLines } from "./components/SyntaxLine.mjs";
21
31
  import { Textarea, TextareaProps } from "./components/Textarea.mjs";
22
- import { ActivityIcon, AlertIcon, ArrowRightIcon, BranchIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, CloseIcon, CopyIcon, EditIcon, FolderIcon, GearIcon, HomeIcon, IconProps, KebabIcon, LightbulbIcon, LockIcon, MessageIcon, PaletteIcon, PlayCircleIcon, PlusIcon, SendIcon, SparklesIcon, TaskIcon, TrashIcon, UsersIcon, WorkflowIcon, WrenchIcon } from "./icons/icons.mjs";
32
+ import { ToolPathLink, ToolPathLinkProps } from "./components/ToolPathLink.mjs";
33
+ import { ActivityIcon, AlertIcon, ArrowRightIcon, AudioLinesIcon, BranchIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, DownloadIcon, EditIcon, FileIcon, FolderIcon, ForkIcon, GearIcon, GlobeIcon, HomeIcon, IconProps, ImageIcon, KebabIcon, LightbulbIcon, LockIcon, MenuIcon, MessageIcon, MicIcon, MonitorIcon, PaletteIcon, PlayCircleIcon, PlusIcon, SearchIcon, SendIcon, ShieldIcon, SlidersIcon, SparklesIcon, StopIcon, TaskIcon, TrashIcon, UserIcon, UsersIcon, WorkflowIcon, WrenchIcon } from "./icons/icons.mjs";
23
34
  import { IconName } from "./icons/iconGlyphs.mjs";
24
35
  import { fontOf } from "./lib/fonts.mjs";
25
- import { IconColorContext } from "./icons/IconColorContext.mjs";
26
36
  import { impactLight, selectionTick } from "./lib/haptics.mjs";
27
- import { AnsiSpan, ReviewComment, ansiSpans, buildReviewPrompt } from "@agimon-ai/po-web-components/text";
28
- export { ActivityIcon, AlertIcon, type AnsiSpan, ArrowRightIcon, Badge, type BadgeProps, type BadgeSize, type BadgeTone, BranchIcon, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CheckIcon, ChevronDownIcon, ChevronRightIcon, CloseIcon, CodeBlock, type CodeBlockProps, CopyIcon, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, type DialogFooterProps, type DialogFooterVariant, DialogHeader, type DialogHeaderProps, type DialogPartProps, type DialogProps, DialogTitle, DialogTrigger, type DialogWidth, Dot, type DotProps, type DotSize, type DotTone, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuItemVariant, DropdownMenuLabel, type DropdownMenuPartProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, EditIcon, EmptyState, type EmptyStateProps, type FieldSize, type FieldVariant, type FileLinkHandler, FolderIcon, GearIcon, HomeIcon, IconColorContext, type IconName, type IconProps, Input, type InputProps, KebabIcon, Label, type LabelProps, LightbulbIcon, List, type ListProps, ListRow, type ListRowProps, LockIcon, Markdown, type MarkdownProps, MessageIcon, MessageItem, MessageItemBody, MessageItemGroup, type MessageItemGroupProps, MessageItemHeader, type MessageItemHeaderProps, type MessageItemPartProps, type MessageItemProps, type MessageItemState, MessageItemStatus, type MessageItemStatusProps, PaletteIcon, Panel, PanelBody, PanelHeader, type PanelPartProps, PlayCircleIcon, PlusIcon, PoNativeProvider, type PoNativeProviderProps, type ReviewComment, STATUS_EDGE, STATUS_GLYPH, STATUS_LABEL, SectionLabel, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, SendIcon, Sheet, SheetBody, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, type SheetHeaderProps, type SheetPartProps, type SheetProps, SheetTitle, SheetTrigger, SparklesIcon, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, type StatusBadgeSize, type StatusTone, TabBadge, type TabBadgeProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TaskIcon, Textarea, type TextareaProps, TrashIcon, UsersIcon, WorkflowIcon, WrenchIcon, ansiSpans, buildReviewPrompt, fontOf, impactLight, selectionTick, toolTone, useMessageItem };
37
+ import { HostFilter, HostFilterProps } from "./components/HostFilter.mjs";
38
+ import { HostTag } from "./components/HostTag.mjs";
39
+ import { InfoStrip } from "./components/InfoStrip.mjs";
40
+ import { AnsiSpan, PresentedLine, ReviewComment, ansiSpans, buildReviewPrompt, collapseLines, hashlineBody, resultTextLines } from "@agimon-ai/po-web-components/text";
41
+ import { IconColorContext, LiveDuration, LiveDurationProps, LiveDurationReading, PoNativeProvider, PoNativeProviderProps, sheetsYielded, yieldSheets } from "@agimon-ai/po-native-components/shell";
42
+ export { ActivityIcon, AgentAvatar, type AgentState, AlertIcon, type AnnotationMark, AnnotationSurface, type AnnotationSurfaceProps, type AnsiSpan, ArrowRightIcon, AudioLinesIcon, Badge, type BadgeProps, type BadgeSize, type BadgeTone, BranchIcon, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CodeBlock, type CodeBlockProps, CopyButton, type CopyButtonProps, CopyIcon, CountBadge, type CountBadgeProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, type DialogFooterProps, type DialogFooterVariant, DialogHeader, type DialogHeaderProps, type DialogPartProps, type DialogProps, DialogTitle, DialogTrigger, type DialogWidth, Dot, type DotProps, type DotSize, type DotTone, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuItemVariant, DropdownMenuLabel, type DropdownMenuPartProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, EditIcon, EmptyState, type EmptyStateProps, type FieldSize, type FieldVariant, FileIcon, type FileLinkHandler, FolderIcon, ForkIcon, GearIcon, GlobeIcon, HashlineLines, type HashlineLinesProps, HomeIcon, HostFilter, type HostFilterProps, HostTag, IconColorContext, type IconName, type IconProps, ImageIcon, InfoStrip, Input, type InputProps, KebabIcon, Label, type LabelProps, LightbulbIcon, List, type ListProps, ListRow, type ListRowProps, LiveDuration, type LiveDurationProps, type LiveDurationReading, LockIcon, Markdown, type MarkdownImageLoader, type MarkdownProps, MenuIcon, MessageIcon, MessageItem, MessageItemBody, MessageItemGroup, type MessageItemGroupProps, MessageItemHeader, type MessageItemHeaderProps, type MessageItemPartProps, type MessageItemProps, type MessageItemState, MessageItemStatus, type MessageItemStatusProps, MicIcon, MonitorIcon, PaletteIcon, Panel, PanelBody, PanelHeader, type PanelPartProps, PlayCircleIcon, PlusIcon, PoNativeProvider, type PoNativeProviderProps, type PresentedLine, type ReviewComment, STATUS_EDGE, STATUS_GLYPH, STATUS_LABEL, SearchIcon, SectionLabel, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, type SelectOption, type SelectProps, SendIcon, 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, SparklesIcon, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, type StatusBadgeSize, type StatusTone, StopIcon, Switch, type SwitchProps, SyntaxLine, type SyntaxLineProps, TabBadge, type TabBadgeProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TaskIcon, Textarea, type TextareaProps, ToolPathLink, type ToolPathLinkProps, ToolResultImage, type ToolResultImageProps, TrashIcon, UserIcon, UsersIcon, WorkflowIcon, WrenchIcon, agentInitials, ansiSpans, buildReviewPrompt, collapseLines, fontOf, hashlineBody, impactLight, resultTextLines, selectionTick, sheetsYielded, toolTone, useMessageItem, useSyntaxLines, yieldSheets };
package/dist/index.mjs CHANGED
@@ -1,15 +1,22 @@
1
1
  import { fontOf } from "./lib/fonts.mjs";
2
- import { Badge } from "./components/Badge.mjs";
3
- import { IconColorContext } from "./icons/IconColorContext.mjs";
2
+ import { Dot } from "./components/Dot.mjs";
3
+ import { AgentAvatar, agentInitials } from "./components/AgentAvatar.mjs";
4
4
  import { impactLight, selectionTick } from "./lib/haptics.mjs";
5
+ import { AnnotationSurface } from "./components/AnnotationSurface.mjs";
6
+ import { Badge } from "./components/Badge.mjs";
5
7
  import { Spinner } from "./components/Spinner.mjs";
6
8
  import { Button } from "./components/Button.mjs";
7
- import { ActivityIcon, AlertIcon, ArrowRightIcon, BranchIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, CloseIcon, CopyIcon, EditIcon, FolderIcon, GearIcon, HomeIcon, KebabIcon, LightbulbIcon, LockIcon, MessageIcon, PaletteIcon, PlayCircleIcon, PlusIcon, SendIcon, SparklesIcon, TaskIcon, TrashIcon, UsersIcon, WorkflowIcon, WrenchIcon } from "./icons/icons.mjs";
9
+ import { ActivityIcon, AlertIcon, ArrowRightIcon, AudioLinesIcon, BranchIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, DownloadIcon, EditIcon, FileIcon, FolderIcon, ForkIcon, GearIcon, GlobeIcon, HomeIcon, ImageIcon, KebabIcon, LightbulbIcon, LockIcon, MenuIcon, MessageIcon, MicIcon, MonitorIcon, PaletteIcon, PlayCircleIcon, PlusIcon, SearchIcon, SendIcon, ShieldIcon, SlidersIcon, SparklesIcon, StopIcon, TaskIcon, TrashIcon, UserIcon, UsersIcon, WorkflowIcon, WrenchIcon } from "./icons/icons.mjs";
10
+ import { CopyButton } from "./components/CopyButton.mjs";
11
+ import { ShowMore } from "./components/ShowMore.mjs";
8
12
  import { CodeBlock } from "./components/CodeBlock.mjs";
13
+ import { ToolResultImage } from "./components/ToolResultImage.mjs";
9
14
  import { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "./components/Dialog.mjs";
10
- import { Dot } from "./components/Dot.mjs";
15
+ import { CountBadge } from "./components/CountBadge.mjs";
11
16
  import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger } from "./components/DropdownMenu.mjs";
12
17
  import { EmptyState } from "./components/EmptyState.mjs";
18
+ import { SyntaxLine, useSyntaxLines } from "./components/SyntaxLine.mjs";
19
+ import { HashlineLines } from "./components/HashlineLines.mjs";
13
20
  import { Input } from "./components/Input.mjs";
14
21
  import { Label } from "./components/Label.mjs";
15
22
  import { List, ListRow } from "./components/List.mjs";
@@ -17,12 +24,19 @@ import { Markdown } from "./components/Markdown.mjs";
17
24
  import { STATUS_EDGE, StatusBadge } from "./components/StatusBadge.mjs";
18
25
  import { MessageItem, MessageItemBody, MessageItemGroup, MessageItemHeader, MessageItemStatus, STATUS_GLYPH, STATUS_LABEL, toolTone, useMessageItem } from "./components/MessageItem.mjs";
19
26
  import { Panel, PanelBody, PanelHeader } from "./components/Panel.mjs";
20
- import { PoNativeProvider } from "./components/PoNativeProvider.mjs";
21
27
  import { SectionLabel } from "./components/SectionLabel.mjs";
22
28
  import { SegmentedControl } from "./components/SegmentedControl.mjs";
29
+ import { Select } from "./components/Select.mjs";
23
30
  import { Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from "./components/Sheet.mjs";
31
+ import { SheetList } from "./components/SheetList.mjs";
32
+ import { Switch } from "./components/Switch.mjs";
24
33
  import { TabBadge, Tabs, TabsContent, TabsList, TabsTrigger } from "./components/Tabs.mjs";
25
34
  import { Textarea } from "./components/Textarea.mjs";
26
- import { ansiSpans, buildReviewPrompt } from "@agimon-ai/po-web-components/text";
35
+ import { ToolPathLink } from "./components/ToolPathLink.mjs";
36
+ import { HostFilter } from "./components/HostFilter.mjs";
37
+ import { HostTag } from "./components/HostTag.mjs";
38
+ import { InfoStrip } from "./components/InfoStrip.mjs";
39
+ import { ansiSpans, buildReviewPrompt, collapseLines, hashlineBody, resultTextLines } from "@agimon-ai/po-web-components/text";
40
+ import { IconColorContext, LiveDuration, PoNativeProvider, sheetsYielded, yieldSheets } from "@agimon-ai/po-native-components/shell";
27
41
 
28
- export { ActivityIcon, AlertIcon, ArrowRightIcon, Badge, BranchIcon, Button, CheckIcon, ChevronDownIcon, ChevronRightIcon, CloseIcon, CodeBlock, CopyIcon, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Dot, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, EditIcon, EmptyState, FolderIcon, GearIcon, HomeIcon, IconColorContext, Input, KebabIcon, Label, LightbulbIcon, List, ListRow, LockIcon, Markdown, MessageIcon, MessageItem, MessageItemBody, MessageItemGroup, MessageItemHeader, MessageItemStatus, PaletteIcon, Panel, PanelBody, PanelHeader, PlayCircleIcon, PlusIcon, PoNativeProvider, STATUS_EDGE, STATUS_GLYPH, STATUS_LABEL, SectionLabel, SegmentedControl, SendIcon, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SparklesIcon, Spinner, StatusBadge, TabBadge, Tabs, TabsContent, TabsList, TabsTrigger, TaskIcon, Textarea, TrashIcon, UsersIcon, WorkflowIcon, WrenchIcon, ansiSpans, buildReviewPrompt, fontOf, impactLight, selectionTick, toolTone, useMessageItem };
42
+ export { ActivityIcon, AgentAvatar, AlertIcon, AnnotationSurface, ArrowRightIcon, AudioLinesIcon, Badge, BranchIcon, Button, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CodeBlock, CopyButton, CopyIcon, CountBadge, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Dot, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, EditIcon, EmptyState, FileIcon, FolderIcon, ForkIcon, GearIcon, GlobeIcon, HashlineLines, HomeIcon, HostFilter, HostTag, IconColorContext, ImageIcon, InfoStrip, Input, KebabIcon, Label, LightbulbIcon, List, ListRow, LiveDuration, LockIcon, Markdown, MenuIcon, MessageIcon, MessageItem, MessageItemBody, MessageItemGroup, MessageItemHeader, MessageItemStatus, MicIcon, MonitorIcon, PaletteIcon, Panel, PanelBody, PanelHeader, PlayCircleIcon, PlusIcon, PoNativeProvider, STATUS_EDGE, STATUS_GLYPH, STATUS_LABEL, SearchIcon, SectionLabel, SegmentedControl, Select, SendIcon, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetList, SheetTitle, SheetTrigger, ShieldIcon, ShowMore, SlidersIcon, SparklesIcon, Spinner, StatusBadge, StopIcon, Switch, SyntaxLine, TabBadge, Tabs, TabsContent, TabsList, TabsTrigger, TaskIcon, Textarea, ToolPathLink, ToolResultImage, TrashIcon, UserIcon, UsersIcon, WorkflowIcon, WrenchIcon, agentInitials, ansiSpans, buildReviewPrompt, collapseLines, fontOf, hashlineBody, impactLight, resultTextLines, selectionTick, sheetsYielded, toolTone, useMessageItem, useSyntaxLines, yieldSheets };
@@ -3,7 +3,9 @@ import { NativeFontStack } from "@agimon-ai/po-web-components/nativeTheme";
3
3
  /**
4
4
  * The font family a native style names for a stack: the platform font on iOS
5
5
  * and Android until the brand families are bundled, and the brand family with
6
- * a CSS generic fallback on web, where story renders run.
6
+ * a CSS generic fallback on web, where story renders run. On web the variable
7
+ * face comes first, as in theme.css: fontsource registers it as "<family>
8
+ * Variable", so the plain name alone matches nothing and falls back.
7
9
  *
8
10
  * ponytail: load IBM Plex Sans and JetBrains Mono through expo-font and return
9
11
  * `stack.family` everywhere once the native visual review starts.
@@ -1 +1 @@
1
- {"version":3,"file":"fonts.d.mts","names":[],"sources":["../../src/lib/fonts.ts"],"mappings":";;;;;;;;;;wBAWgB,OAAO,OAAO"}
1
+ {"version":3,"file":"fonts.d.mts","names":[],"sources":["../../src/lib/fonts.ts"],"mappings":";;;;;;;;;;;;wBAagB,OAAO,OAAO"}
@@ -4,7 +4,9 @@ import { Platform } from "react-native";
4
4
  /**
5
5
  * The font family a native style names for a stack: the platform font on iOS
6
6
  * and Android until the brand families are bundled, and the brand family with
7
- * a CSS generic fallback on web, where story renders run.
7
+ * a CSS generic fallback on web, where story renders run. On web the variable
8
+ * face comes first, as in theme.css: fontsource registers it as "<family>
9
+ * Variable", so the plain name alone matches nothing and falls back.
8
10
  *
9
11
  * ponytail: load IBM Plex Sans and JetBrains Mono through expo-font and return
10
12
  * `stack.family` everywhere once the native visual review starts.
@@ -13,7 +15,7 @@ function fontOf(stack) {
13
15
  return Platform.select({
14
16
  ios: stack.ios,
15
17
  android: stack.android,
16
- default: `${stack.family}, ${stack.android}`
18
+ default: `${stack.family} Variable, ${stack.family}, ${stack.android}`
17
19
  });
18
20
  }
19
21
 
@@ -1 +1 @@
1
- {"version":3,"file":"fonts.mjs","names":["NativeFontStack","Platform","fontOf","stack","select","ios","android","default","family"],"sources":["../../src/lib/fonts.ts"],"sourcesContent":["import type { NativeFontStack } from '@agimon-ai/po-web-components/nativeTheme';\nimport { Platform } from 'react-native';\n\n/**\n * The font family a native style names for a stack: the platform font on iOS\n * and Android until the brand families are bundled, and the brand family with\n * a CSS generic fallback on web, where story renders run.\n *\n * ponytail: load IBM Plex Sans and JetBrains Mono through expo-font and return\n * `stack.family` everywhere once the native visual review starts.\n */\nexport function fontOf(stack: NativeFontStack): string {\n return Platform.select({\n ios: stack.ios,\n android: stack.android,\n default: `${stack.family}, ${stack.android}`,\n });\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAgBE,OAAOC,OAAgC;CACrD,OAAOF,SAASG,OAAO;EACrBC,KAAKF,MAAME;EACXC,SAASH,MAAMG;EACfC,SAAS,GAAGJ,MAAMK,OAAM,IAAKL,MAAMG;CACrC,CAAC;AACH"}
1
+ {"version":3,"file":"fonts.mjs","names":["NativeFontStack","Platform","fontOf","stack","select","ios","android","default","family"],"sources":["../../src/lib/fonts.ts"],"sourcesContent":["import type { NativeFontStack } from '@agimon-ai/po-web-components/nativeTheme';\nimport { Platform } from 'react-native';\n\n/**\n * The font family a native style names for a stack: the platform font on iOS\n * and Android until the brand families are bundled, and the brand family with\n * a CSS generic fallback on web, where story renders run. On web the variable\n * face comes first, as in theme.css: fontsource registers it as \"<family>\n * Variable\", so the plain name alone matches nothing and falls back.\n *\n * ponytail: load IBM Plex Sans and JetBrains Mono through expo-font and return\n * `stack.family` everywhere once the native visual review starts.\n */\nexport function fontOf(stack: NativeFontStack): string {\n return Platform.select({\n ios: stack.ios,\n android: stack.android,\n default: `${stack.family} Variable, ${stack.family}, ${stack.android}`,\n });\n}\n"],"mappings":";;;;;;;;;;;;;AAaA,SAAgBE,OAAOC,OAAgC;CACrD,OAAOF,SAASG,OAAO;EACrBC,KAAKF,MAAME;EACXC,SAASH,MAAMG;EACfC,SAAS,GAAGJ,MAAMK,OAAM,aAAcL,MAAMK,OAAM,IAAKL,MAAMG;CAC/D,CAAC;AACH"}
@@ -0,0 +1,10 @@
1
+ //#region src/lib/insideSheet.d.ts
2
+ /**
3
+ * Whether the caller renders inside a bottom sheet. A sheet's text field has
4
+ * to be the bottom sheet's own TextInput, or the keyboard covers it and the
5
+ * sheet never moves; Input reads this instead of asking callers to pick.
6
+ */
7
+ export declare const InsideSheetContext: import("react").Context<boolean>;
8
+ export declare function useInsideSheet(): boolean;
9
+ //#endregion
10
+ //# sourceMappingURL=insideSheet.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insideSheet.d.mts","names":[],"sources":["../../src/lib/insideSheet.ts"],"mappings":";;;;;;qBAOa,oCAAkB;wBAEf"}
@@ -5,13 +5,74 @@ const RULE = /^ {0,3}([-*_])(?:[ \t]*\1){2,}[ \t]*$/;
5
5
  const BULLET_ITEM = /^ {0,3}[-*+][ \t]+(.*)$/;
6
6
  const ORDERED_ITEM = /^ {0,3}(\d{1,9})[.)][ \t]+(.*)$/;
7
7
  const INDENTED = /^[ \t]+\S/;
8
+ const QUOTE = /^ {0,3}> ?(.*)$/;
9
+ const TABLE_DIVIDER = /^ {0,3}\|?[ \t]*:?-+:?[ \t]*(?:\|[ \t]*:?-+:?[ \t]*)*\|?[ \t]*$/;
10
+ const HTML_COMMENT = /^ {0,3}<!--/;
11
+ /** CommonMark's block-level tag names, plus the picture and image markup READMEs open with. */
12
+ const HTML_BLOCK = /^ {0,3}<\/?(?:address|article|aside|blockquote|center|details|div|dl|figcaption|figure|footer|form|h[1-6]|header|hr|li|main|nav|ol|p|picture|section|summary|table|tbody|td|tfoot|th|thead|tr|ul)(?=[\s/>]|$)/i;
13
+ /** Any other tag standing alone on its line, such as `<img ...>` or `<br>`. */
14
+ const HTML_TAG_LINE = /^ {0,3}<\/?[A-Za-z][A-Za-z0-9-]*(?:\s[^<>]*)?\/?>[ \t]*$/;
15
+ const HARD_BREAK = /(?: {2,}|\\)$/;
8
16
  const ESCAPABLE = /[!-/:-@[-`{-~]/;
9
17
  const WORD_CHAR = /[\p{L}\p{N}]/u;
18
+ const MAX_PARSE_CHARACTERS = 1e5;
19
+ const MAX_PARSE_WORK = 25e4;
20
+ const MAX_PARSE_DEPTH = 32;
21
+ const PARSE_LIMIT = /* @__PURE__ */ new Error("Markdown parsing limit reached.");
22
+ function spend(budget, work) {
23
+ budget.remaining -= work;
24
+ if (budget.remaining < 0) throw PARSE_LIMIT;
25
+ }
10
26
  function isBlank(line) {
11
27
  return line.trim() === "";
12
28
  }
29
+ /** Joins a paragraph's lines: a space between them, or a line break after two spaces or a backslash. */
30
+ function joinLines(lines) {
31
+ return lines.map((line, index) => {
32
+ const current = index === 0 ? line : line.trimStart();
33
+ if (index === lines.length - 1) return current;
34
+ return `${current.replace(/(?: {2,}|\\|[ \t]+)$/u, "")}${HARD_BREAK.test(current) ? "\n" : " "}`;
35
+ }).join("");
36
+ }
37
+ /** A table row's cells: outer pipes dropped, split on unescaped pipes, `\|` read as a pipe. */
38
+ function tableCells(line) {
39
+ let row = line.trim();
40
+ if (row.startsWith("|")) row = row.slice(1);
41
+ if (row.endsWith("|") && !row.endsWith("\\|")) row = row.slice(0, -1);
42
+ const cells = [];
43
+ let cell = "";
44
+ for (let index = 0; index < row.length; index += 1) {
45
+ const char = row[index];
46
+ if (char === "\\" && row[index + 1] === "|") {
47
+ cell += "|";
48
+ index += 1;
49
+ } else if (char === "|") {
50
+ cells.push(cell.trim());
51
+ cell = "";
52
+ } else cell += char;
53
+ }
54
+ cells.push(cell.trim());
55
+ return cells;
56
+ }
13
57
  /** Parses a Markdown document into blocks. */
14
58
  function parseMarkdown(source) {
59
+ if (source.length <= MAX_PARSE_CHARACTERS) try {
60
+ return parseBlocks(source, { remaining: MAX_PARSE_WORK }, 0);
61
+ } catch (error) {
62
+ if (error !== PARSE_LIMIT) throw error;
63
+ }
64
+ return [{
65
+ type: "paragraph",
66
+ children: [{
67
+ type: "text",
68
+ text: source
69
+ }]
70
+ }];
71
+ }
72
+ function parseBlocks(source, budget, depth) {
73
+ if (depth > MAX_PARSE_DEPTH) throw PARSE_LIMIT;
74
+ spend(budget, source.length + 1);
75
+ const inline = (text) => parseInlineNodes(text, budget, depth + 1);
15
76
  const lines = source.replace(/\r\n?/g, "\n").split("\n");
16
77
  const blocks = [];
17
78
  let paragraph = [];
@@ -19,7 +80,7 @@ function parseMarkdown(source) {
19
80
  const flushParagraph = () => {
20
81
  if (paragraph.length > 0) blocks.push({
21
82
  type: "paragraph",
22
- children: parseInline(paragraph.join("\n"))
83
+ children: inline(joinLines(paragraph))
23
84
  });
24
85
  paragraph = [];
25
86
  };
@@ -28,7 +89,7 @@ function parseMarkdown(source) {
28
89
  type: "list",
29
90
  ordered: list.ordered,
30
91
  start: list.start,
31
- items: list.items.map(parseInline)
92
+ items: list.items.map((item) => inline(joinLines(item)))
32
93
  });
33
94
  list = void 0;
34
95
  };
@@ -61,6 +122,16 @@ function parseMarkdown(source) {
61
122
  flush();
62
123
  continue;
63
124
  }
125
+ if (paragraph.length === 0 && HTML_COMMENT.test(line)) {
126
+ flush();
127
+ while (index < lines.length && !lines[index].includes("-->")) index += 1;
128
+ continue;
129
+ }
130
+ if (paragraph.length === 0 && (HTML_BLOCK.test(line) || HTML_TAG_LINE.test(line))) {
131
+ flush();
132
+ while (index + 1 < lines.length && !isBlank(lines[index + 1])) index += 1;
133
+ continue;
134
+ }
64
135
  const heading = HEADING.exec(line);
65
136
  if (heading !== null) {
66
137
  flush();
@@ -68,7 +139,7 @@ function parseMarkdown(source) {
68
139
  blocks.push({
69
140
  type: "heading",
70
141
  level,
71
- children: parseInline(heading[2] ?? "")
142
+ children: inline(heading[2] ?? "")
72
143
  });
73
144
  continue;
74
145
  }
@@ -77,6 +148,41 @@ function parseMarkdown(source) {
77
148
  blocks.push({ type: "rule" });
78
149
  continue;
79
150
  }
151
+ if (QUOTE.test(line)) {
152
+ flush();
153
+ const quoted = [];
154
+ while (index < lines.length && QUOTE.test(lines[index])) {
155
+ quoted.push(QUOTE.exec(lines[index])[1]);
156
+ index += 1;
157
+ }
158
+ index -= 1;
159
+ blocks.push({
160
+ type: "quote",
161
+ children: parseBlocks(quoted.join("\n"), budget, depth + 1)
162
+ });
163
+ continue;
164
+ }
165
+ const divider = lines[index + 1];
166
+ if (line.includes("|") && divider !== void 0 && divider.includes("|") && TABLE_DIVIDER.test(divider)) {
167
+ const header = tableCells(line);
168
+ if (header.length === tableCells(divider).length) {
169
+ flush();
170
+ index += 2;
171
+ const rows = [];
172
+ while (index < lines.length && !isBlank(lines[index]) && lines[index].includes("|")) {
173
+ const cells = tableCells(lines[index]);
174
+ rows.push(header.map((_, column) => inline(cells[column] ?? "")));
175
+ index += 1;
176
+ }
177
+ index -= 1;
178
+ blocks.push({
179
+ type: "table",
180
+ header: header.map((cell) => inline(cell)),
181
+ rows
182
+ });
183
+ continue;
184
+ }
185
+ }
80
186
  const bullet = BULLET_ITEM.exec(line);
81
187
  const ordered = bullet === null ? ORDERED_ITEM.exec(line) : null;
82
188
  if (bullet !== null || ordered !== null) {
@@ -90,12 +196,11 @@ function parseMarkdown(source) {
90
196
  items: []
91
197
  };
92
198
  }
93
- list.items.push(isOrdered ? ordered[2] : bullet[1]);
199
+ list.items.push([isOrdered ? ordered[2] : bullet[1]]);
94
200
  continue;
95
201
  }
96
202
  if (list !== void 0 && INDENTED.test(line)) {
97
- const last = list.items.length - 1;
98
- list.items[last] = `${list.items[last]}\n${line.trim()}`;
203
+ list.items.at(-1).push(line.trim());
99
204
  continue;
100
205
  }
101
206
  flushList();
@@ -104,8 +209,9 @@ function parseMarkdown(source) {
104
209
  flush();
105
210
  return blocks;
106
211
  }
107
- /** Parses one run of inline Markdown. */
108
- function parseInline(source) {
212
+ function parseInlineNodes(source, budget, depth) {
213
+ if (depth > MAX_PARSE_DEPTH) throw PARSE_LIMIT;
214
+ spend(budget, source.length + 1);
109
215
  const nodes = [];
110
216
  let text = "";
111
217
  const pushText = (value) => {
@@ -121,6 +227,7 @@ function parseInline(source) {
121
227
  };
122
228
  let index = 0;
123
229
  while (index < source.length) {
230
+ spend(budget, 1);
124
231
  const char = source[index];
125
232
  if (char === "\\" && index + 1 < source.length && ESCAPABLE.test(source[index + 1])) {
126
233
  pushText(source[index + 1]);
@@ -128,7 +235,7 @@ function parseInline(source) {
128
235
  continue;
129
236
  }
130
237
  if (char === "`") {
131
- const span = readCodeSpan(source, index);
238
+ const span = readCodeSpan(source, index, budget);
132
239
  if (span !== void 0) {
133
240
  pushNode({
134
241
  type: "code",
@@ -142,24 +249,36 @@ function parseInline(source) {
142
249
  index += run.length;
143
250
  continue;
144
251
  }
252
+ if (char === "!" && source[index + 1] === "[") {
253
+ const image = readLink(source, index + 1, budget);
254
+ if (image !== void 0) {
255
+ pushNode({
256
+ type: "image",
257
+ src: image.href,
258
+ alt: image.label
259
+ });
260
+ index = image.end;
261
+ continue;
262
+ }
263
+ }
145
264
  if (char === "[") {
146
- const link = readLink(source, index);
265
+ const link = readLink(source, index, budget);
147
266
  if (link !== void 0) {
148
267
  pushNode({
149
268
  type: "link",
150
269
  href: link.href,
151
- children: parseInline(link.label)
270
+ children: parseInlineNodes(link.label, budget, depth + 1)
152
271
  });
153
272
  index = link.end;
154
273
  continue;
155
274
  }
156
275
  }
157
276
  if ((char === "*" || char === "_") && source[index + 1] === char) {
158
- const strong = readDelimited(source, index, char.repeat(2));
277
+ const strong = readDelimited(source, index, char.repeat(2), budget);
159
278
  if (strong !== void 0) {
160
279
  pushNode({
161
280
  type: "strong",
162
- children: parseInline(strong.inner)
281
+ children: parseInlineNodes(strong.inner, budget, depth + 1)
163
282
  });
164
283
  index = strong.end;
165
284
  continue;
@@ -169,11 +288,11 @@ function parseInline(source) {
169
288
  continue;
170
289
  }
171
290
  if (char === "*" || char === "_") {
172
- const em = readDelimited(source, index, char);
291
+ const em = readDelimited(source, index, char, budget);
173
292
  if (em !== void 0) {
174
293
  pushNode({
175
294
  type: "em",
176
- children: parseInline(em.inner)
295
+ children: parseInlineNodes(em.inner, budget, depth + 1)
177
296
  });
178
297
  index = em.end;
179
298
  continue;
@@ -189,11 +308,12 @@ function parseInline(source) {
189
308
  return nodes;
190
309
  }
191
310
  /** A code span opened by the backtick run at `start`, closed by a run of the same length. */
192
- function readCodeSpan(source, start) {
311
+ function readCodeSpan(source, start, budget) {
193
312
  const run = /^`+/.exec(source.slice(start))[0];
194
313
  let search = start + run.length;
195
314
  while (search < source.length) {
196
315
  const found = source.indexOf(run, search);
316
+ spend(budget, (found === -1 ? source.length : found + run.length) - search);
197
317
  if (found === -1) return void 0;
198
318
  const after = found + run.length;
199
319
  if (source[after] === "`" || source[found - 1] === "`") {
@@ -210,10 +330,11 @@ function readCodeSpan(source, start) {
210
330
  }
211
331
  }
212
332
  /** `[label](href)` starting at the bracket; brackets in the label may nest. */
213
- function readLink(source, start) {
333
+ function readLink(source, start, budget) {
214
334
  let depth = 0;
215
335
  let close = -1;
216
336
  for (let index = start; index < source.length; index += 1) {
337
+ spend(budget, 1);
217
338
  const char = source[index];
218
339
  if (char === "\\") {
219
340
  index += 1;
@@ -229,12 +350,39 @@ function readLink(source, start) {
229
350
  }
230
351
  }
231
352
  if (close === -1 || source[close + 1] !== "(") return void 0;
232
- const target = /^\(\s*<?([^\s()<>]*)>?(?:\s+"[^"]*")?\s*\)/.exec(source.slice(close + 1));
233
- if (target === null) return void 0;
353
+ let index = close + 2;
354
+ const skipSpace = () => {
355
+ while (index < source.length && /\s/.test(source[index])) {
356
+ spend(budget, 1);
357
+ index += 1;
358
+ }
359
+ };
360
+ skipSpace();
361
+ if (source[index] === "<") index += 1;
362
+ const hrefStart = index;
363
+ while (index < source.length && !/[\s()<>]/.test(source[index])) {
364
+ spend(budget, 1);
365
+ index += 1;
366
+ }
367
+ const href = source.slice(hrefStart, index);
368
+ if (source[index] === ">") index += 1;
369
+ const beforeSpace = index;
370
+ skipSpace();
371
+ if (index > beforeSpace && source[index] === "\"") {
372
+ index += 1;
373
+ while (index < source.length && source[index] !== "\"") {
374
+ spend(budget, 1);
375
+ index += 1;
376
+ }
377
+ if (source[index] !== "\"") return void 0;
378
+ index += 1;
379
+ skipSpace();
380
+ }
381
+ if (source[index] !== ")") return void 0;
234
382
  return {
235
383
  label: source.slice(start + 1, close),
236
- href: target[1],
237
- end: close + 1 + target[0].length
384
+ href,
385
+ end: index + 1
238
386
  };
239
387
  }
240
388
  /**
@@ -242,7 +390,7 @@ function readLink(source, start) {
242
390
  * end with a space, and an underscore only counts at a word boundary, so
243
391
  * `snake_case_name` stays text.
244
392
  */
245
- function readDelimited(source, start, delimiter) {
393
+ function readDelimited(source, start, delimiter, budget) {
246
394
  const underscore = delimiter[0] === "_";
247
395
  if (underscore && start > 0 && WORD_CHAR.test(source[start - 1])) return void 0;
248
396
  const open = start + delimiter.length;
@@ -250,6 +398,7 @@ function readDelimited(source, start, delimiter) {
250
398
  let search = open;
251
399
  while (search < source.length) {
252
400
  const found = source.indexOf(delimiter, search);
401
+ spend(budget, (found === -1 ? source.length : found + delimiter.length) - search);
253
402
  if (found === -1) return void 0;
254
403
  const end = found + delimiter.length;
255
404
  if (delimiter.length === 1 && source[end] === delimiter) {
@@ -267,5 +416,5 @@ function readDelimited(source, start, delimiter) {
267
416
  }
268
417
 
269
418
  //#endregion
270
- export { parseInline, parseMarkdown };
419
+ export { parseMarkdown };
271
420
  //# sourceMappingURL=markdown.mjs.map