panelui-native 0.25.0 → 0.30.0

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 (242) hide show
  1. package/README.md +18 -1
  2. package/lib/module/components/accordion/index.js +8 -8
  3. package/lib/module/components/accordion/index.js.map +1 -1
  4. package/lib/module/components/alert/index.js +2 -2
  5. package/lib/module/components/alert/index.js.map +1 -1
  6. package/lib/module/components/area-chart/index.js +182 -50
  7. package/lib/module/components/area-chart/index.js.map +1 -1
  8. package/lib/module/components/attachment/index.js +2 -1
  9. package/lib/module/components/attachment/index.js.map +1 -1
  10. package/lib/module/components/avatar/index.js +3 -3
  11. package/lib/module/components/avatar/index.js.map +1 -1
  12. package/lib/module/components/badge/index.js +4 -4
  13. package/lib/module/components/badge/index.js.map +1 -1
  14. package/lib/module/components/bar-chart/index.js +197 -56
  15. package/lib/module/components/bar-chart/index.js.map +1 -1
  16. package/lib/module/components/bottom-sheet/index.js +15 -10
  17. package/lib/module/components/bottom-sheet/index.js.map +1 -1
  18. package/lib/module/components/breadcrumb/index.js +6 -6
  19. package/lib/module/components/breadcrumb/index.js.map +1 -1
  20. package/lib/module/components/button/index.js +11 -6
  21. package/lib/module/components/button/index.js.map +1 -1
  22. package/lib/module/components/calendar/index.js +792 -0
  23. package/lib/module/components/calendar/index.js.map +1 -0
  24. package/lib/module/components/carousel/index.js +680 -0
  25. package/lib/module/components/carousel/index.js.map +1 -0
  26. package/lib/module/components/chip/index.js +4 -4
  27. package/lib/module/components/chip/index.js.map +1 -1
  28. package/lib/module/components/code-block/highlight.js +363 -0
  29. package/lib/module/components/code-block/highlight.js.map +1 -0
  30. package/lib/module/components/code-block/index.js +313 -0
  31. package/lib/module/components/code-block/index.js.map +1 -0
  32. package/lib/module/components/date-picker/index.js +165 -0
  33. package/lib/module/components/date-picker/index.js.map +1 -0
  34. package/lib/module/components/dialog/index.js +7 -2
  35. package/lib/module/components/dialog/index.js.map +1 -1
  36. package/lib/module/components/direction/index.js +2 -1
  37. package/lib/module/components/direction/index.js.map +1 -1
  38. package/lib/module/components/empty-state/index.js +2 -2
  39. package/lib/module/components/empty-state/index.js.map +1 -1
  40. package/lib/module/components/field/index.js +5 -5
  41. package/lib/module/components/field/index.js.map +1 -1
  42. package/lib/module/components/flow/index.js +3 -3
  43. package/lib/module/components/flow/index.js.map +1 -1
  44. package/lib/module/components/frame/index.js +5 -5
  45. package/lib/module/components/frame/index.js.map +1 -1
  46. package/lib/module/components/input-group/index.js +3 -2
  47. package/lib/module/components/input-group/index.js.map +1 -1
  48. package/lib/module/components/item/index.js +9 -9
  49. package/lib/module/components/item/index.js.map +1 -1
  50. package/lib/module/components/label/index.js +4 -4
  51. package/lib/module/components/label/index.js.map +1 -1
  52. package/lib/module/components/line-chart/index.js +167 -44
  53. package/lib/module/components/line-chart/index.js.map +1 -1
  54. package/lib/module/components/map/index.js +7 -7
  55. package/lib/module/components/map/index.js.map +1 -1
  56. package/lib/module/components/marker/index.js +3 -3
  57. package/lib/module/components/marker/index.js.map +1 -1
  58. package/lib/module/components/menu/index.js +714 -0
  59. package/lib/module/components/menu/index.js.map +1 -0
  60. package/lib/module/components/message/index.js +7 -7
  61. package/lib/module/components/message/index.js.map +1 -1
  62. package/lib/module/components/message-scroller/index.js +5 -4
  63. package/lib/module/components/message-scroller/index.js.map +1 -1
  64. package/lib/module/components/plan/index.js +296 -0
  65. package/lib/module/components/plan/index.js.map +1 -0
  66. package/lib/module/components/popover/index.js +73 -10
  67. package/lib/module/components/popover/index.js.map +1 -1
  68. package/lib/module/components/radio-group/index.js +15 -10
  69. package/lib/module/components/radio-group/index.js.map +1 -1
  70. package/lib/module/components/reasoning/index.js +244 -0
  71. package/lib/module/components/reasoning/index.js.map +1 -0
  72. package/lib/module/components/section-rail/index.js +4 -4
  73. package/lib/module/components/section-rail/index.js.map +1 -1
  74. package/lib/module/components/select/index.js +10 -4
  75. package/lib/module/components/select/index.js.map +1 -1
  76. package/lib/module/components/sources/index.js +221 -0
  77. package/lib/module/components/sources/index.js.map +1 -0
  78. package/lib/module/components/steps/index.js +4 -4
  79. package/lib/module/components/steps/index.js.map +1 -1
  80. package/lib/module/components/tabs/index.js +7 -7
  81. package/lib/module/components/tabs/index.js.map +1 -1
  82. package/lib/module/components/task/index.js +300 -0
  83. package/lib/module/components/task/index.js.map +1 -0
  84. package/lib/module/components/textarea/index.js +295 -0
  85. package/lib/module/components/textarea/index.js.map +1 -0
  86. package/lib/module/components/timeline/index.js +4 -4
  87. package/lib/module/components/timeline/index.js.map +1 -1
  88. package/lib/module/components/toast/index.js +2 -2
  89. package/lib/module/components/toast/index.js.map +1 -1
  90. package/lib/module/components/toggle-button/index.js +5 -5
  91. package/lib/module/components/toggle-button/index.js.map +1 -1
  92. package/lib/module/components/tooltip/index.js +648 -0
  93. package/lib/module/components/tooltip/index.js.map +1 -0
  94. package/lib/module/components/typography/index.js +2 -2
  95. package/lib/module/components/typography/index.js.map +1 -1
  96. package/lib/module/hooks/index.js +1 -0
  97. package/lib/module/hooks/index.js.map +1 -1
  98. package/lib/module/hooks/use-back-handler.js +37 -0
  99. package/lib/module/hooks/use-back-handler.js.map +1 -0
  100. package/lib/module/icons/index.js +202 -0
  101. package/lib/module/icons/index.js.map +1 -1
  102. package/lib/module/index.js +13 -1
  103. package/lib/module/index.js.map +1 -1
  104. package/lib/module/primitives/collapse.js +112 -0
  105. package/lib/module/primitives/collapse.js.map +1 -0
  106. package/lib/module/primitives/keyboard-avoider.js +2 -1
  107. package/lib/module/primitives/keyboard-avoider.js.map +1 -1
  108. package/lib/module/primitives/text.js +25 -1
  109. package/lib/module/primitives/text.js.map +1 -1
  110. package/lib/module/utils/date.js +386 -0
  111. package/lib/module/utils/date.js.map +1 -0
  112. package/lib/typescript/src/components/accordion/index.d.ts.map +1 -1
  113. package/lib/typescript/src/components/alert/index.d.ts.map +1 -1
  114. package/lib/typescript/src/components/area-chart/index.d.ts +41 -1
  115. package/lib/typescript/src/components/area-chart/index.d.ts.map +1 -1
  116. package/lib/typescript/src/components/attachment/index.d.ts.map +1 -1
  117. package/lib/typescript/src/components/bar-chart/index.d.ts +44 -2
  118. package/lib/typescript/src/components/bar-chart/index.d.ts.map +1 -1
  119. package/lib/typescript/src/components/bottom-sheet/index.d.ts.map +1 -1
  120. package/lib/typescript/src/components/breadcrumb/index.d.ts.map +1 -1
  121. package/lib/typescript/src/components/button/index.d.ts.map +1 -1
  122. package/lib/typescript/src/components/calendar/index.d.ts +173 -0
  123. package/lib/typescript/src/components/calendar/index.d.ts.map +1 -0
  124. package/lib/typescript/src/components/carousel/index.d.ts +179 -0
  125. package/lib/typescript/src/components/carousel/index.d.ts.map +1 -0
  126. package/lib/typescript/src/components/chip/index.d.ts.map +1 -1
  127. package/lib/typescript/src/components/code-block/highlight.d.ts +39 -0
  128. package/lib/typescript/src/components/code-block/highlight.d.ts.map +1 -0
  129. package/lib/typescript/src/components/code-block/index.d.ts +113 -0
  130. package/lib/typescript/src/components/code-block/index.d.ts.map +1 -0
  131. package/lib/typescript/src/components/date-picker/index.d.ts +97 -0
  132. package/lib/typescript/src/components/date-picker/index.d.ts.map +1 -0
  133. package/lib/typescript/src/components/dialog/index.d.ts.map +1 -1
  134. package/lib/typescript/src/components/direction/index.d.ts.map +1 -1
  135. package/lib/typescript/src/components/empty-state/index.d.ts.map +1 -1
  136. package/lib/typescript/src/components/field/index.d.ts.map +1 -1
  137. package/lib/typescript/src/components/frame/index.d.ts.map +1 -1
  138. package/lib/typescript/src/components/input-group/index.d.ts.map +1 -1
  139. package/lib/typescript/src/components/item/index.d.ts.map +1 -1
  140. package/lib/typescript/src/components/label/index.d.ts.map +1 -1
  141. package/lib/typescript/src/components/line-chart/index.d.ts +41 -2
  142. package/lib/typescript/src/components/line-chart/index.d.ts.map +1 -1
  143. package/lib/typescript/src/components/map/index.d.ts.map +1 -1
  144. package/lib/typescript/src/components/marker/index.d.ts.map +1 -1
  145. package/lib/typescript/src/components/menu/index.d.ts +261 -0
  146. package/lib/typescript/src/components/menu/index.d.ts.map +1 -0
  147. package/lib/typescript/src/components/message/index.d.ts.map +1 -1
  148. package/lib/typescript/src/components/message-scroller/index.d.ts.map +1 -1
  149. package/lib/typescript/src/components/plan/index.d.ts +127 -0
  150. package/lib/typescript/src/components/plan/index.d.ts.map +1 -0
  151. package/lib/typescript/src/components/popover/index.d.ts +35 -1
  152. package/lib/typescript/src/components/popover/index.d.ts.map +1 -1
  153. package/lib/typescript/src/components/radio-group/index.d.ts.map +1 -1
  154. package/lib/typescript/src/components/reasoning/index.d.ts +97 -0
  155. package/lib/typescript/src/components/reasoning/index.d.ts.map +1 -0
  156. package/lib/typescript/src/components/select/index.d.ts.map +1 -1
  157. package/lib/typescript/src/components/sources/index.d.ts +85 -0
  158. package/lib/typescript/src/components/sources/index.d.ts.map +1 -0
  159. package/lib/typescript/src/components/steps/index.d.ts.map +1 -1
  160. package/lib/typescript/src/components/tabs/index.d.ts.map +1 -1
  161. package/lib/typescript/src/components/task/index.d.ts +103 -0
  162. package/lib/typescript/src/components/task/index.d.ts.map +1 -0
  163. package/lib/typescript/src/components/textarea/index.d.ts +175 -0
  164. package/lib/typescript/src/components/textarea/index.d.ts.map +1 -0
  165. package/lib/typescript/src/components/timeline/index.d.ts.map +1 -1
  166. package/lib/typescript/src/components/toast/index.d.ts.map +1 -1
  167. package/lib/typescript/src/components/toggle-button/index.d.ts.map +1 -1
  168. package/lib/typescript/src/components/tooltip/index.d.ts +180 -0
  169. package/lib/typescript/src/components/tooltip/index.d.ts.map +1 -0
  170. package/lib/typescript/src/components/typography/index.d.ts.map +1 -1
  171. package/lib/typescript/src/hooks/index.d.ts +1 -0
  172. package/lib/typescript/src/hooks/index.d.ts.map +1 -1
  173. package/lib/typescript/src/hooks/use-back-handler.d.ts +19 -0
  174. package/lib/typescript/src/hooks/use-back-handler.d.ts.map +1 -0
  175. package/lib/typescript/src/icons/index.d.ts +17 -0
  176. package/lib/typescript/src/icons/index.d.ts.map +1 -1
  177. package/lib/typescript/src/index.d.ts +16 -4
  178. package/lib/typescript/src/index.d.ts.map +1 -1
  179. package/lib/typescript/src/primitives/collapse.d.ts +42 -0
  180. package/lib/typescript/src/primitives/collapse.d.ts.map +1 -0
  181. package/lib/typescript/src/primitives/keyboard-avoider.d.ts.map +1 -1
  182. package/lib/typescript/src/primitives/text.d.ts +20 -0
  183. package/lib/typescript/src/primitives/text.d.ts.map +1 -1
  184. package/lib/typescript/src/utils/date.d.ts +116 -0
  185. package/lib/typescript/src/utils/date.d.ts.map +1 -0
  186. package/package.json +1 -1
  187. package/src/components/accordion/index.tsx +8 -12
  188. package/src/components/alert/index.tsx +2 -2
  189. package/src/components/area-chart/index.tsx +208 -55
  190. package/src/components/attachment/index.tsx +2 -2
  191. package/src/components/avatar/index.tsx +3 -3
  192. package/src/components/badge/index.tsx +6 -6
  193. package/src/components/bar-chart/index.tsx +214 -54
  194. package/src/components/bottom-sheet/index.tsx +17 -16
  195. package/src/components/breadcrumb/index.tsx +6 -8
  196. package/src/components/button/index.tsx +12 -8
  197. package/src/components/calendar/index.tsx +970 -0
  198. package/src/components/carousel/index.tsx +788 -0
  199. package/src/components/chip/index.tsx +4 -6
  200. package/src/components/code-block/highlight.ts +278 -0
  201. package/src/components/code-block/index.tsx +341 -0
  202. package/src/components/date-picker/index.tsx +255 -0
  203. package/src/components/dialog/index.tsx +7 -2
  204. package/src/components/direction/index.tsx +2 -1
  205. package/src/components/empty-state/index.tsx +2 -2
  206. package/src/components/field/index.tsx +3 -5
  207. package/src/components/flow/index.tsx +3 -3
  208. package/src/components/frame/index.tsx +5 -7
  209. package/src/components/input-group/index.tsx +3 -2
  210. package/src/components/item/index.tsx +9 -9
  211. package/src/components/label/index.tsx +2 -2
  212. package/src/components/line-chart/index.tsx +189 -50
  213. package/src/components/map/index.tsx +7 -9
  214. package/src/components/marker/index.tsx +3 -3
  215. package/src/components/menu/index.tsx +812 -0
  216. package/src/components/message/index.tsx +7 -7
  217. package/src/components/message-scroller/index.tsx +5 -4
  218. package/src/components/plan/index.tsx +325 -0
  219. package/src/components/popover/index.tsx +111 -8
  220. package/src/components/radio-group/index.tsx +13 -4
  221. package/src/components/reasoning/index.tsx +297 -0
  222. package/src/components/section-rail/index.tsx +4 -4
  223. package/src/components/select/index.tsx +10 -4
  224. package/src/components/sources/index.tsx +278 -0
  225. package/src/components/steps/index.tsx +4 -4
  226. package/src/components/tabs/index.tsx +7 -9
  227. package/src/components/task/index.tsx +329 -0
  228. package/src/components/textarea/index.tsx +381 -0
  229. package/src/components/timeline/index.tsx +4 -4
  230. package/src/components/toast/index.tsx +2 -2
  231. package/src/components/toggle-button/index.tsx +5 -7
  232. package/src/components/tooltip/index.tsx +793 -0
  233. package/src/components/typography/index.tsx +2 -2
  234. package/src/hooks/index.ts +1 -0
  235. package/src/hooks/use-back-handler.ts +37 -0
  236. package/src/icons/index.tsx +147 -0
  237. package/src/index.ts +116 -0
  238. package/src/primitives/collapse.tsx +128 -0
  239. package/src/primitives/keyboard-avoider.tsx +2 -1
  240. package/src/primitives/text.tsx +28 -1
  241. package/src/utils/date.ts +446 -0
  242. package/theme.css +112 -0
@@ -0,0 +1,261 @@
1
+ /**
2
+ * Menu — the list of things you can do to something.
3
+ *
4
+ * It is not a Select, and the difference is what the rows *are*. A select's
5
+ * rows are values: picking one answers a question the form asked, and the
6
+ * trigger then shows the answer. A menu's rows are verbs — rename, duplicate,
7
+ * delete — and the trigger goes on saying the same thing afterwards, because
8
+ * nothing about it was chosen. Anything built out of a popover and a column of
9
+ * pressables ends up re-deriving that distinction by hand, and re-deriving the
10
+ * roles, the dismiss-on-select rule and the destructive colour with it.
11
+ *
12
+ * ```tsx
13
+ * <Menu>
14
+ * <Menu.Trigger>
15
+ * <Button variant="outline">Options</Button>
16
+ * </Menu.Trigger>
17
+ * <Menu.Content align="start">
18
+ * <Menu.Item icon={<PencilIcon size={16} />}>Rename</Menu.Item>
19
+ * <Menu.Separator />
20
+ * <Menu.Item variant="destructive" icon={<TrashIcon size={16} />}>
21
+ * Delete
22
+ * </Menu.Item>
23
+ * </Menu.Content>
24
+ * </Menu>
25
+ * ```
26
+ *
27
+ * The panel is a `Popover` underneath, so the menu inherits its measuring,
28
+ * flipping and edge-clamping rather than owning a second copy of them — a menu
29
+ * near the bottom of the screen opens upwards for the same reason a popover
30
+ * does, and `presentation="bottom-sheet"` moves the same rows into a sheet.
31
+ *
32
+ * Submenus expand in place rather than flying out sideways. A flyout needs a
33
+ * pointer to travel from the parent row to the child panel without crossing
34
+ * anything that would close it; a finger has no such path, and a second panel
35
+ * hanging off the first is usually the thing that pushes a menu off the edge
36
+ * of a phone. Opening downwards into the panel keeps every row under the
37
+ * thumb that opened it.
38
+ */
39
+ import { type ReactElement, type ReactNode } from 'react';
40
+ import { type PressableProps, type ViewProps } from 'react-native';
41
+ import { type PopoverContentProps, type PopoverProps } from '../popover/index.js';
42
+ export type MenuItemVariant = 'default' | 'destructive';
43
+ export interface MenuProps extends PopoverProps {
44
+ /**
45
+ * Tick the haptic engine as a row is chosen. Needs the optional
46
+ * `expo-haptics`, and is silent without it.
47
+ */
48
+ haptics?: boolean;
49
+ }
50
+ declare function MenuRoot({ children, open, onOpenChange, defaultOpen, haptics, ...props }: MenuProps): import("react").JSX.Element;
51
+ export interface MenuTriggerProps {
52
+ children: ReactElement<{
53
+ onPress?: (...args: unknown[]) => void;
54
+ }>;
55
+ }
56
+ /** Wraps a single child and opens the menu on press. Also what gets measured. */
57
+ declare function MenuTrigger({ children }: MenuTriggerProps): import("react").JSX.Element;
58
+ declare namespace MenuTrigger {
59
+ var displayName: string;
60
+ }
61
+ export interface MenuContentProps extends Omit<PopoverContentProps, 'children' | 'scrollable'> {
62
+ children?: ReactNode;
63
+ /**
64
+ * Scroll the rows when there are more of them than fit on screen. On by
65
+ * default, unlike the popover it is built on: a menu is a list, its length
66
+ * is usually a `map` over data rather than something written out by hand,
67
+ * and a row that cannot be reached is a row that may as well not exist.
68
+ */
69
+ scrollable?: boolean;
70
+ }
71
+ /**
72
+ * The panel, and the thing screen readers announce as a menu.
73
+ *
74
+ * Its padding is the row gutter rather than the popover's content padding —
75
+ * rows run to the panel's inner edge so that a pressed row's highlight reads
76
+ * as part of the panel instead of a floating chip inside it.
77
+ *
78
+ * The surface is a layer rather than a background on the panel itself, so that
79
+ * a caller can put something *behind* the rows. Pass a `Menu.Background` of
80
+ * your own with a gradient, an image or a blur inside it and it replaces the
81
+ * default one; pass nothing and the default is drawn for you.
82
+ */
83
+ declare function MenuContent({ className, children, scrollable, ...props }: MenuContentProps): import("react").JSX.Element;
84
+ declare namespace MenuContent {
85
+ var displayName: string;
86
+ }
87
+ export interface MenuBackgroundProps extends ViewProps {
88
+ className?: string;
89
+ /**
90
+ * What the panel is made of. A gradient, an image, a blur view — anything
91
+ * that fills. Left empty it is the plain overlay surface.
92
+ */
93
+ children?: ReactNode;
94
+ }
95
+ /**
96
+ * The panel's surface, drawn behind every row.
97
+ *
98
+ * It exists as a part rather than as a background on the panel because a
99
+ * background cannot be got behind. A menu that wants to be frosted, tinted or
100
+ * gradient-filled needs something under the rows and over nothing, and
101
+ * `overflow-hidden` on the panel is what keeps whatever that is inside the
102
+ * corner radius.
103
+ */
104
+ declare function MenuBackground({ className, children, ...props }: MenuBackgroundProps): import("react").JSX.Element;
105
+ declare namespace MenuBackground {
106
+ var displayName: string;
107
+ }
108
+ export interface MenuLabelProps extends ViewProps {
109
+ className?: string;
110
+ /** Line the text up with rows that carry an icon or an indicator. */
111
+ inset?: boolean;
112
+ children?: ReactNode;
113
+ }
114
+ /** Non-interactive heading over a run of rows. */
115
+ declare function MenuLabel({ className, inset, children, ...props }: MenuLabelProps): import("react").JSX.Element;
116
+ declare namespace MenuLabel {
117
+ var displayName: string;
118
+ }
119
+ export interface MenuSeparatorProps extends ViewProps {
120
+ className?: string;
121
+ }
122
+ /** Hairline between two runs of rows. */
123
+ declare function MenuSeparator({ className, ...props }: MenuSeparatorProps): import("react").JSX.Element;
124
+ declare namespace MenuSeparator {
125
+ var displayName: string;
126
+ }
127
+ export interface MenuItemProps extends Omit<PressableProps, 'children' | 'style'> {
128
+ className?: string;
129
+ /** The row's label. */
130
+ children?: ReactNode;
131
+ /** Leading glyph, drawn in the indicator column. */
132
+ icon?: ReactNode;
133
+ /** Second line under the label, for a row whose effect needs a sentence. */
134
+ description?: string;
135
+ /** Right-aligned hint, for a row that also has a keyboard or gesture shortcut. */
136
+ shortcut?: string;
137
+ /**
138
+ * Element pinned to the row's trailing edge, after the shortcut. For the
139
+ * things a shortcut string cannot be — a chevron, a badge, a small avatar.
140
+ */
141
+ trailing?: ReactNode;
142
+ /** `destructive` colours the row for an action that removes something. */
143
+ variant?: MenuItemVariant;
144
+ /** Line the label up with rows that carry an icon, without drawing one. */
145
+ inset?: boolean;
146
+ disabled?: boolean;
147
+ /**
148
+ * Dismiss the menu once the row has run. Default true — a menu of verbs has
149
+ * done its job the moment one is chosen. Turn it off for a row that toggles
150
+ * something the user is likely to toggle twice.
151
+ */
152
+ closeOnSelect?: boolean;
153
+ onSelect?: () => void;
154
+ }
155
+ /**
156
+ * One row of the menu.
157
+ *
158
+ * `onSelect` rather than `onPress` is the handler that closes the panel:
159
+ * `onPress` is still forwarded and still fires, so a row can keep whatever
160
+ * press behaviour it had, but the dismissal is tied to the semantic event so
161
+ * that a row which is disabled or which opts out via `closeOnSelect` behaves
162
+ * the same either way.
163
+ */
164
+ declare function MenuItem({ className, children, icon, description, shortcut, trailing, variant, inset, disabled, closeOnSelect, onSelect, onPress, ...props }: MenuItemProps): import("react").JSX.Element;
165
+ declare namespace MenuItem {
166
+ var displayName: string;
167
+ }
168
+ export interface MenuCheckboxItemProps extends Omit<MenuItemProps, 'icon' | 'inset'> {
169
+ checked?: boolean;
170
+ onCheckedChange?: (checked: boolean) => void;
171
+ }
172
+ /**
173
+ * A row that carries a state instead of running an action.
174
+ *
175
+ * It keeps the menu open by default, which is the opposite of `Menu.Item` and
176
+ * deliberately so: a set of toggles is nearly always set more than one at a
177
+ * time, and closing after each one turns three taps into six.
178
+ */
179
+ declare function MenuCheckboxItem({ checked, onCheckedChange, onSelect, closeOnSelect, ...props }: MenuCheckboxItemProps): import("react").JSX.Element;
180
+ declare namespace MenuCheckboxItem {
181
+ var displayName: string;
182
+ }
183
+ export interface MenuRadioGroupProps extends ViewProps {
184
+ className?: string;
185
+ value?: string;
186
+ onValueChange?: (value: string) => void;
187
+ children?: ReactNode;
188
+ }
189
+ /** A run of rows of which exactly one is chosen. */
190
+ declare function MenuRadioGroup({ value, onValueChange, className, children, ...props }: MenuRadioGroupProps): import("react").JSX.Element;
191
+ declare namespace MenuRadioGroup {
192
+ var displayName: string;
193
+ }
194
+ export type MenuRadioIndicator = 'check' | 'dot';
195
+ export interface MenuRadioItemProps extends Omit<MenuItemProps, 'icon' | 'inset'> {
196
+ value: string;
197
+ /** `check` marks the chosen row, `dot` is quieter beside a list of nouns. */
198
+ indicator?: MenuRadioIndicator;
199
+ }
200
+ /** One option inside a `Menu.RadioGroup`. */
201
+ declare function MenuRadioItem({ value, indicator, onSelect, closeOnSelect, ...props }: MenuRadioItemProps): import("react").JSX.Element;
202
+ declare namespace MenuRadioItem {
203
+ var displayName: string;
204
+ }
205
+ export interface MenuSubProps {
206
+ children?: ReactNode;
207
+ defaultOpen?: boolean;
208
+ open?: boolean;
209
+ onOpenChange?: (open: boolean) => void;
210
+ }
211
+ /** Groups a `Menu.SubTrigger` with the rows it reveals. */
212
+ declare function MenuSub({ children, defaultOpen, open, onOpenChange }: MenuSubProps): import("react").JSX.Element;
213
+ declare namespace MenuSub {
214
+ var displayName: string;
215
+ }
216
+ export interface MenuSubTriggerProps extends Omit<MenuItemProps, 'closeOnSelect' | 'shortcut' | 'trailing'> {
217
+ }
218
+ /**
219
+ * The row that opens a submenu.
220
+ *
221
+ * Its chevron points along the reading direction while closed and turns to
222
+ * point down once open, so the row states which way its rows will appear
223
+ * rather than only that it has some.
224
+ */
225
+ declare function MenuSubTrigger({ className, children, icon, onSelect, ...props }: MenuSubTriggerProps): import("react").JSX.Element;
226
+ declare namespace MenuSubTrigger {
227
+ var displayName: string;
228
+ }
229
+ export interface MenuSubContentProps extends ViewProps {
230
+ className?: string;
231
+ children?: ReactNode;
232
+ }
233
+ /**
234
+ * The rows a submenu reveals, opening in place.
235
+ *
236
+ * The height is animated from a measurement rather than left to a layout
237
+ * animation, and the measured copy is absolutely positioned so it always lays
238
+ * out at its natural size — a child of a view whose height is mid-animation
239
+ * would otherwise report the animated height back, and the panel would settle
240
+ * at whatever it happened to measure on the first frame.
241
+ */
242
+ declare function MenuSubContent({ className, children, ...props }: MenuSubContentProps): import("react").JSX.Element;
243
+ declare namespace MenuSubContent {
244
+ var displayName: string;
245
+ }
246
+ export declare const Menu: typeof MenuRoot & {
247
+ Trigger: typeof MenuTrigger;
248
+ Content: typeof MenuContent;
249
+ Background: typeof MenuBackground;
250
+ Label: typeof MenuLabel;
251
+ Item: typeof MenuItem;
252
+ CheckboxItem: typeof MenuCheckboxItem;
253
+ RadioGroup: typeof MenuRadioGroup;
254
+ RadioItem: typeof MenuRadioItem;
255
+ Separator: typeof MenuSeparator;
256
+ Sub: typeof MenuSub;
257
+ SubTrigger: typeof MenuSubTrigger;
258
+ SubContent: typeof MenuSubContent;
259
+ };
260
+ export {};
261
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/menu/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,OAAO,EASL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAmB,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAcpF,OAAO,EAAW,KAAK,mBAAmB,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAY,CAAC;AAsElF,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,aAAa,CAAC;AA8DxD,M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EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;GAIG;AACH,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,SAAS,EACT,YAAoB,EACpB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,wBAAwB,+BAe1B;kBArBQ,mBAAmB;;;AAwB5B,MAAM,WAAW,0BAA2B,SAAQ,SAAS;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,MAAM,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;GAKG;AACH,iBAAS,qBAAqB,CAAC,EAC7B,SAAS,EACT,MAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,0BAA0B,+BAkD5B;kBAxDQ,qBAAqB;;;AA2D9B,eAAO,MAAM,eAAe;;;;;CAK1B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/message-scroller/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAgC,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAiB,EAQf,KAAK,uBAAuB,EAC7B,MAAM,yBAAyB,CAAC;AAgBjC,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,KAAK,GAAG,aAAa,CAAC;AAmCtE,sEAAsE;AACtE,wBAAgB,kBAAkB;6BAlBP,OAAO,KAAK,IAAI;+BACd,OAAO,KAAK,IAAI;0BACrB,MAAM,aAAa,OAAO,KAAK,IAAI;EAmB1D;AAED;;;;GAIG;AACH,wBAAgB,4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AQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;GAIG;AACH,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,SAAS,EACT,YAAoB,EACpB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,wBAAwB,+BAe1B;kBArBQ,mBAAmB;;;AAwB5B,MAAM,WAAW,0BAA2B,SAAQ,SAAS;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,MAAM,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;GAKG;AACH,iBAAS,qBAAqB,CAAC,EAC7B,SAAS,EACT,MAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,0BAA0B,+BAkD5B;kBAxDQ,qBAAqB;;;AA2D9B,eAAO,MAAM,eAAe;;;;;CAK1B,CAAC"}
@@ -0,0 +1,127 @@
1
+ /**
2
+ * Plan — what an agent intends to do, before it does it.
3
+ *
4
+ * A card rather than a run of rows, because a plan is a thing the reader is
5
+ * being asked to approve: it needs an edge around it so that where it starts
6
+ * and stops is not a matter of interpretation, and a footer that can hold the
7
+ * button that approves it.
8
+ *
9
+ * It streams. `isStreaming` puts a shimmer on the title and the description,
10
+ * which is the honest way to render a heading that is still arriving — the
11
+ * alternative is a title that grows a word at a time and reads as finished at
12
+ * every intermediate length.
13
+ *
14
+ * ```tsx
15
+ * <Plan isStreaming={streaming}>
16
+ * <Plan.Header>
17
+ * <Plan.Title>Migrate the calendar</Plan.Title>
18
+ * <Plan.Description>Four files, no API change.</Plan.Description>
19
+ * <Plan.Action><Plan.Trigger /></Plan.Action>
20
+ * </Plan.Header>
21
+ * <Plan.Content>…</Plan.Content>
22
+ * <Plan.Footer><Button>Approve</Button></Plan.Footer>
23
+ * </Plan>
24
+ * ```
25
+ *
26
+ * ## Where the props come from
27
+ *
28
+ * With the AI SDK a plan is usually an `experimental_useObject` stream, where
29
+ * `isStreaming` is the hook's `isLoading` and the fields arrive one at a time —
30
+ * which is exactly the case the shimmer exists for, since a partial object has
31
+ * a title before it has anything else.
32
+ */
33
+ import { type ReactNode } from 'react';
34
+ import { type PressableProps, type ViewProps } from 'react-native';
35
+ export interface PlanProps extends Omit<ViewProps, 'children'> {
36
+ className?: string;
37
+ /** Whether the plan is still being written. Shimmers the title and description. */
38
+ isStreaming?: boolean;
39
+ /** Controlled open state of the body. */
40
+ open?: boolean;
41
+ /** Initial state when uncontrolled. */
42
+ defaultOpen?: boolean;
43
+ onOpenChange?: (open: boolean) => void;
44
+ children?: ReactNode;
45
+ }
46
+ declare function PlanRoot({ className, isStreaming, open: openProp, defaultOpen, onOpenChange, children, ...props }: PlanProps): import("react").JSX.Element;
47
+ declare namespace PlanRoot {
48
+ var displayName: string;
49
+ }
50
+ export interface PlanHeaderProps extends ViewProps {
51
+ className?: string;
52
+ children?: ReactNode;
53
+ }
54
+ /**
55
+ * The title, the description and whatever acts on them.
56
+ *
57
+ * The heading is wrapped in a column of its own so the action stays pinned to
58
+ * the trailing edge as the title wraps, rather than riding down with it.
59
+ */
60
+ declare function PlanHeader({ className, children, ...props }: PlanHeaderProps): import("react").JSX.Element;
61
+ declare namespace PlanHeader {
62
+ var displayName: string;
63
+ }
64
+ export interface PlanTitleProps extends ViewProps {
65
+ className?: string;
66
+ children?: ReactNode;
67
+ }
68
+ /** The plan's name. Shimmers while it is still being written. */
69
+ declare function PlanTitle({ className, children, ...props }: PlanTitleProps): import("react").JSX.Element;
70
+ declare namespace PlanTitle {
71
+ var displayName: string;
72
+ }
73
+ export interface PlanDescriptionProps extends ViewProps {
74
+ className?: string;
75
+ children?: ReactNode;
76
+ }
77
+ declare function PlanDescription({ className, children, ...props }: PlanDescriptionProps): import("react").JSX.Element;
78
+ declare namespace PlanDescription {
79
+ var displayName: string;
80
+ }
81
+ export interface PlanActionProps extends ViewProps {
82
+ className?: string;
83
+ children?: ReactNode;
84
+ }
85
+ /** Pinned to the header's trailing edge — the toggle, a badge, a menu. */
86
+ declare function PlanAction({ className, children, ...props }: PlanActionProps): import("react").JSX.Element;
87
+ declare namespace PlanAction {
88
+ var displayName: string;
89
+ }
90
+ export interface PlanTriggerProps extends Omit<PressableProps, 'children' | 'style'> {
91
+ className?: string;
92
+ children?: ReactNode;
93
+ }
94
+ /** Folds the body away. Its chevron turns to point at the state it will reach. */
95
+ declare function PlanTrigger({ className, children, onPress, ...props }: PlanTriggerProps): import("react").JSX.Element;
96
+ declare namespace PlanTrigger {
97
+ var displayName: string;
98
+ }
99
+ export interface PlanContentProps extends Omit<ViewProps, 'children'> {
100
+ className?: string;
101
+ children?: ReactNode;
102
+ }
103
+ /** The steps. Collapses rather than unmounting, so it can still be growing. */
104
+ declare function PlanContent({ className, children, ...props }: PlanContentProps): import("react").JSX.Element;
105
+ declare namespace PlanContent {
106
+ var displayName: string;
107
+ }
108
+ export interface PlanFooterProps extends ViewProps {
109
+ className?: string;
110
+ children?: ReactNode;
111
+ }
112
+ /** Where the button that approves the plan goes. */
113
+ declare function PlanFooter({ className, children, ...props }: PlanFooterProps): import("react").JSX.Element;
114
+ declare namespace PlanFooter {
115
+ var displayName: string;
116
+ }
117
+ export declare const Plan: typeof PlanRoot & {
118
+ Header: typeof PlanHeader;
119
+ Title: typeof PlanTitle;
120
+ Description: typeof PlanDescription;
121
+ Action: typeof PlanAction;
122
+ Trigger: typeof PlanTrigger;
123
+ Content: typeof PlanContent;
124
+ Footer: typeof PlanFooter;
125
+ };
126
+ export {};
127
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/plan/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAmB,KAAK,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ps extends ViewProps {
85
85
  * content into a column.
86
86
  */
87
87
  minWidth?: number;
88
+ /**
89
+ * Ceiling for the panel's height, in pixels. Always clamped to the room
90
+ * inside the safe area, which is also the default — a panel is never
91
+ * positioned so that part of it falls off the screen, because the part that
92
+ * falls off cannot be scrolled back into view.
93
+ */
94
+ maxHeight?: number;
95
+ /**
96
+ * Scroll the panel's body when it is taller than `maxHeight`.
97
+ *
98
+ * Off by default, because a popover is usually a paragraph or a short form
99
+ * and a scroller around either one only adds a bounce. Worth turning on for
100
+ * a list of unknown length, which is the case where the cap actually bites.
101
+ *
102
+ * The spacing between children moves to the scroller's content when this is
103
+ * set; `className` still dresses the panel itself.
104
+ */
105
+ scrollable?: boolean;
106
+ /**
107
+ * Drop the panel's own surface — its background, border, radius, padding and
108
+ * shadow — and keep only its position and its size. For a caller that draws
109
+ * the surface itself, so that something can be put *behind* the content
110
+ * rather than layered on top of a background that is already painted.
111
+ *
112
+ * The panel is still clipped to a rounded rectangle, because a surface drawn
113
+ * inside it has to have something to be clipped by.
114
+ */
115
+ unstyled?: boolean;
116
+ /**
117
+ * A layer drawn inside the panel, behind its content — and, crucially,
118
+ * outside its scroller, so that a surface does not scroll away with the rows
119
+ * on top of it. Pair it with `unstyled` to own the panel's appearance.
120
+ */
121
+ background?: ReactNode;
88
122
  /** Tap outside the panel closes it. Default true. */
89
123
  dismissible?: boolean;
90
124
  /**
@@ -95,7 +129,7 @@ export interface PopoverContentProps extends ViewProps {
95
129
  blur?: boolean;
96
130
  children?: ReactNode;
97
131
  }
98
- declare function PopoverContent({ className, placement, align, offset, alignOffset, width, minWidth, dismissible, blur, children, onLayout: onLayoutProp, style, ...props }: PopoverContentProps): import("react").JSX.Element | null;
132
+ declare function PopoverContent({ className, placement, align, offset, alignOffset, width, minWidth, maxHeight, scrollable, unstyled, background, dismissible, blur, children, onLayout: onLayoutProp, style, ...props }: PopoverContentProps): import("react").JSX.Element | null;
99
133
  export interface PopoverArrowProps extends ViewProps {
100
134
  className?: string;
101
135
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/popover/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EAUL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAatB,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAU7D,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AACnE,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAwBtD,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,cAAc,CAAC;AAY7D,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,SAAS,CAAC;IACpB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,uCAAuC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,mBAAmB,CAAC;CACpC;AAED,iBAAS,WAAW,CAAC,EACnB,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,WAAmB,EACnB,YAAwB,GACzB,EAAE,YAAY,+BAiCd;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,YAAY,CAAC;QAAE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;KAAE,CAAC,CAAC;CACpE;AAED;;;;;;GAMG;AACH,iBAAS,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,+BA4BxD;AAED,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,SAAS,C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AS,CAAC;CACtB;AAwFD,eAAO,MAAM,UAAU;;CAErB,CAAC;AAEH,YAAY,EAAE,YAAY,EAAE,CAAC"}
@@ -0,0 +1,97 @@
1
+ /**
2
+ * Reasoning — the model's working, shown while it happens and folded away after.
3
+ *
4
+ * A reasoning trace is interesting for exactly as long as it is the only thing
5
+ * arriving. Once the answer starts, it is a wall of text above the thing the
6
+ * reader actually asked for. So it opens itself when the trace starts streaming
7
+ * and closes itself about a second after it stops — once, and only if it ever
8
+ * streamed, because a trace that arrives complete was never a live thing to
9
+ * watch and should not perform.
10
+ *
11
+ * The trigger changes with it: a shimmering "Thinking…" while the tokens are
12
+ * coming, and "Thought for 8 seconds" afterwards. The duration is measured from
13
+ * the first streaming frame rather than taken on trust, so it is the time the
14
+ * reader actually waited.
15
+ *
16
+ * ```tsx
17
+ * <Reasoning isStreaming={streaming}>
18
+ * <Reasoning.Trigger />
19
+ * <Reasoning.Content>{text}</Reasoning.Content>
20
+ * </Reasoning>
21
+ * ```
22
+ *
23
+ * ## Where the props come from
24
+ *
25
+ * With the AI SDK, `isStreaming` is whether the last part of the last message
26
+ * is a reasoning part while the request is still streaming, and the content is
27
+ * every `reasoning` part joined together. Joined, not one component each:
28
+ * some models emit a run of separate reasoning parts, and one component per
29
+ * part is a column of "Thinking…" rows for a single thought.
30
+ */
31
+ import { type ReactNode } from 'react';
32
+ import { type PressableProps, type ViewProps } from 'react-native';
33
+ export interface ReasoningProps extends Omit<ViewProps, 'children'> {
34
+ className?: string;
35
+ /**
36
+ * Whether the trace is still arriving. Drives the shimmer on the trigger,
37
+ * opens the panel on the way in and closes it a beat after it goes false.
38
+ */
39
+ isStreaming?: boolean;
40
+ /**
41
+ * How long the trace took, in seconds. Measured from the first streaming
42
+ * frame when it is not given, which is the number worth showing — it is what
43
+ * the reader actually waited.
44
+ */
45
+ duration?: number;
46
+ /** Controlled open state. */
47
+ open?: boolean;
48
+ /**
49
+ * Initial state when uncontrolled. Defaults to whether it is streaming, so a
50
+ * live trace is open and a finished one arrives folded. Passing `false`
51
+ * explicitly also opts out of the auto-open.
52
+ */
53
+ defaultOpen?: boolean;
54
+ onOpenChange?: (open: boolean) => void;
55
+ children?: ReactNode;
56
+ }
57
+ declare function ReasoningRoot({ className, isStreaming, duration: durationProp, open: openProp, defaultOpen, onOpenChange, children, ...props }: ReasoningProps): import("react").JSX.Element;
58
+ declare namespace ReasoningRoot {
59
+ var displayName: string;
60
+ }
61
+ export interface ReasoningTriggerProps extends Omit<PressableProps, 'children' | 'style'> {
62
+ className?: string;
63
+ /**
64
+ * What the row says. Given the streaming state and the measured duration, so
65
+ * a caller can put its own words to both without reimplementing the timing.
66
+ */
67
+ label?: (isStreaming: boolean, duration?: number) => ReactNode;
68
+ /** Replaces the whole row, icon and chevron included. */
69
+ children?: ReactNode;
70
+ }
71
+ /** The row that says how long it thought, and folds the trace away. */
72
+ declare function ReasoningTrigger({ className, label, children, onPress, ...props }: ReasoningTriggerProps): import("react").JSX.Element;
73
+ declare namespace ReasoningTrigger {
74
+ var displayName: string;
75
+ }
76
+ export interface ReasoningContentProps extends Omit<ViewProps, 'children'> {
77
+ className?: string;
78
+ /** The trace. A string is wrapped for you; anything else is left alone. */
79
+ children?: ReactNode;
80
+ }
81
+ /**
82
+ * The trace itself.
83
+ *
84
+ * Kept mounted and collapsed to nothing rather than unmounted, because it is
85
+ * usually still growing while it is folded — and a body that remounts on every
86
+ * open would drop whatever the reader had scrolled to.
87
+ */
88
+ declare function ReasoningContent({ className, children, ...props }: ReasoningContentProps): import("react").JSX.Element;
89
+ declare namespace ReasoningContent {
90
+ var displayName: string;
91
+ }
92
+ export declare const Reasoning: typeof ReasoningRoot & {
93
+ Trigger: typeof ReasoningTrigger;
94
+ Content: typeof ReasoningContent;
95
+ };
96
+ export {};
97
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/reasoning/index.tsx"],"names":[],"mappings":"AAAA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CAA6C;IAC7C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACpC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,KAAK,EACL,aAAa,EACb,WAAgC,EAChC,QAAQ,EACR,YAAsB,EACtB,KAAK,EACL,YAAwB,EACxB,MAAU,EACV,YAAY,EACZ,MAAM,EACN,gBAAyB,EACzB,QAAQ,GACT,EAAE,WAAW,+BAiOb;AAED,eAAO,MAAM,MAAM;;CAEjB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/select/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAuDf,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAShE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,2EAA2E;AAC3E,iBAAS,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,eAAe,+BA4BpD;AAUD,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;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