panelui-native 0.28.1 → 0.32.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 (121) hide show
  1. package/README.md +22 -3
  2. package/lib/module/components/calendar/index.js +450 -132
  3. package/lib/module/components/calendar/index.js.map +1 -1
  4. package/lib/module/components/code-block/highlight.js +363 -0
  5. package/lib/module/components/code-block/highlight.js.map +1 -0
  6. package/lib/module/components/code-block/index.js +313 -0
  7. package/lib/module/components/code-block/index.js.map +1 -0
  8. package/lib/module/components/date-picker/index.js +8 -1
  9. package/lib/module/components/date-picker/index.js.map +1 -1
  10. package/lib/module/components/heatmap-chart/index.js +9 -8
  11. package/lib/module/components/heatmap-chart/index.js.map +1 -1
  12. package/lib/module/components/map/index.js +50 -4
  13. package/lib/module/components/map/index.js.map +1 -1
  14. package/lib/module/components/menu/index.js +714 -0
  15. package/lib/module/components/menu/index.js.map +1 -0
  16. package/lib/module/components/plan/index.js +582 -0
  17. package/lib/module/components/plan/index.js.map +1 -0
  18. package/lib/module/components/popover/index.js +35 -4
  19. package/lib/module/components/popover/index.js.map +1 -1
  20. package/lib/module/components/post/index.js +992 -0
  21. package/lib/module/components/post/index.js.map +1 -0
  22. package/lib/module/components/radio-group/index.js +13 -8
  23. package/lib/module/components/radio-group/index.js.map +1 -1
  24. package/lib/module/components/reasoning/index.js +244 -0
  25. package/lib/module/components/reasoning/index.js.map +1 -0
  26. package/lib/module/components/response/index.js +296 -0
  27. package/lib/module/components/response/index.js.map +1 -0
  28. package/lib/module/components/response/markdown.js +463 -0
  29. package/lib/module/components/response/markdown.js.map +1 -0
  30. package/lib/module/components/select/index.js +97 -15
  31. package/lib/module/components/select/index.js.map +1 -1
  32. package/lib/module/components/sources/index.js +221 -0
  33. package/lib/module/components/sources/index.js.map +1 -0
  34. package/lib/module/components/table/index.js +632 -0
  35. package/lib/module/components/table/index.js.map +1 -0
  36. package/lib/module/components/task/index.js +300 -0
  37. package/lib/module/components/task/index.js.map +1 -0
  38. package/lib/module/components/textarea/index.js +295 -0
  39. package/lib/module/components/textarea/index.js.map +1 -0
  40. package/lib/module/components/tooltip/index.js +179 -23
  41. package/lib/module/components/tooltip/index.js.map +1 -1
  42. package/lib/module/icons/index.js +339 -0
  43. package/lib/module/icons/index.js.map +1 -1
  44. package/lib/module/index.js +12 -1
  45. package/lib/module/index.js.map +1 -1
  46. package/lib/module/primitives/collapse.js +112 -0
  47. package/lib/module/primitives/collapse.js.map +1 -0
  48. package/lib/module/utils/date.js +129 -22
  49. package/lib/module/utils/date.js.map +1 -1
  50. package/lib/typescript/src/components/calendar/index.d.ts +79 -5
  51. package/lib/typescript/src/components/calendar/index.d.ts.map +1 -1
  52. package/lib/typescript/src/components/code-block/highlight.d.ts +39 -0
  53. package/lib/typescript/src/components/code-block/highlight.d.ts.map +1 -0
  54. package/lib/typescript/src/components/code-block/index.d.ts +113 -0
  55. package/lib/typescript/src/components/code-block/index.d.ts.map +1 -0
  56. package/lib/typescript/src/components/date-picker/index.d.ts +7 -1
  57. package/lib/typescript/src/components/date-picker/index.d.ts.map +1 -1
  58. package/lib/typescript/src/components/heatmap-chart/index.d.ts.map +1 -1
  59. package/lib/typescript/src/components/map/index.d.ts +8 -1
  60. package/lib/typescript/src/components/map/index.d.ts.map +1 -1
  61. package/lib/typescript/src/components/menu/index.d.ts +261 -0
  62. package/lib/typescript/src/components/menu/index.d.ts.map +1 -0
  63. package/lib/typescript/src/components/plan/index.d.ts +238 -0
  64. package/lib/typescript/src/components/plan/index.d.ts.map +1 -0
  65. package/lib/typescript/src/components/popover/index.d.ts +35 -1
  66. package/lib/typescript/src/components/popover/index.d.ts.map +1 -1
  67. package/lib/typescript/src/components/post/index.d.ts +358 -0
  68. package/lib/typescript/src/components/post/index.d.ts.map +1 -0
  69. package/lib/typescript/src/components/radio-group/index.d.ts.map +1 -1
  70. package/lib/typescript/src/components/reasoning/index.d.ts +97 -0
  71. package/lib/typescript/src/components/reasoning/index.d.ts.map +1 -0
  72. package/lib/typescript/src/components/response/index.d.ts +91 -0
  73. package/lib/typescript/src/components/response/index.d.ts.map +1 -0
  74. package/lib/typescript/src/components/response/markdown.d.ts +88 -0
  75. package/lib/typescript/src/components/response/markdown.d.ts.map +1 -0
  76. package/lib/typescript/src/components/select/index.d.ts +27 -2
  77. package/lib/typescript/src/components/select/index.d.ts.map +1 -1
  78. package/lib/typescript/src/components/sources/index.d.ts +85 -0
  79. package/lib/typescript/src/components/sources/index.d.ts.map +1 -0
  80. package/lib/typescript/src/components/table/index.d.ts +274 -0
  81. package/lib/typescript/src/components/table/index.d.ts.map +1 -0
  82. package/lib/typescript/src/components/task/index.d.ts +103 -0
  83. package/lib/typescript/src/components/task/index.d.ts.map +1 -0
  84. package/lib/typescript/src/components/textarea/index.d.ts +175 -0
  85. package/lib/typescript/src/components/textarea/index.d.ts.map +1 -0
  86. package/lib/typescript/src/components/tooltip/index.d.ts +63 -8
  87. package/lib/typescript/src/components/tooltip/index.d.ts.map +1 -1
  88. package/lib/typescript/src/icons/index.d.ts +54 -1
  89. package/lib/typescript/src/icons/index.d.ts.map +1 -1
  90. package/lib/typescript/src/index.d.ts +14 -3
  91. package/lib/typescript/src/index.d.ts.map +1 -1
  92. package/lib/typescript/src/primitives/collapse.d.ts +42 -0
  93. package/lib/typescript/src/primitives/collapse.d.ts.map +1 -0
  94. package/lib/typescript/src/utils/date.d.ts +49 -5
  95. package/lib/typescript/src/utils/date.d.ts.map +1 -1
  96. package/package.json +1 -1
  97. package/src/components/calendar/index.tsx +519 -139
  98. package/src/components/code-block/highlight.ts +278 -0
  99. package/src/components/code-block/index.tsx +341 -0
  100. package/src/components/date-picker/index.tsx +19 -1
  101. package/src/components/heatmap-chart/index.tsx +9 -9
  102. package/src/components/map/index.tsx +53 -4
  103. package/src/components/menu/index.tsx +812 -0
  104. package/src/components/plan/index.tsx +648 -0
  105. package/src/components/popover/index.tsx +69 -2
  106. package/src/components/post/index.tsx +1116 -0
  107. package/src/components/radio-group/index.tsx +11 -2
  108. package/src/components/reasoning/index.tsx +297 -0
  109. package/src/components/response/index.tsx +390 -0
  110. package/src/components/response/markdown.ts +489 -0
  111. package/src/components/select/index.tsx +132 -12
  112. package/src/components/sources/index.tsx +278 -0
  113. package/src/components/table/index.tsx +747 -0
  114. package/src/components/task/index.tsx +329 -0
  115. package/src/components/textarea/index.tsx +381 -0
  116. package/src/components/tooltip/index.tsx +203 -20
  117. package/src/icons/index.tsx +264 -1
  118. package/src/index.ts +131 -0
  119. package/src/primitives/collapse.tsx +128 -0
  120. package/src/utils/date.ts +146 -22
  121. package/theme.css +112 -0
@@ -0,0 +1,296 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Response — a model's answer, rendered as it arrives.
5
+ *
6
+ * An answer is markdown. It has headings and lists and fenced code in it,
7
+ * because that is what a model writes, and rendering it as one run of plain
8
+ * text throws away the structure the model went to the trouble of producing.
9
+ *
10
+ * So this reads the markdown and renders it through the library's own parts —
11
+ * `Typography` for prose, `CodeBlock` for fences, `Table` for tables. Nothing
12
+ * here draws its own type or its own colours: an answer inside a message bubble
13
+ * should look like the app it is in, not like a document viewer someone
14
+ * embedded.
15
+ *
16
+ * ```tsx
17
+ * <Response isStreaming={status === 'streaming'}>{text}</Response>
18
+ * ```
19
+ *
20
+ * ## Why it is a whole component and not a `<Text>`
21
+ *
22
+ * Because the text is still arriving, and that changes everything about how it
23
+ * has to be read. A token stream hands you every prefix of the final answer, so
24
+ * a renderer sees `**bo`, then `**bol`, then `**bold**` — three documents, two
25
+ * of which have literal asterisks in them. Render each faithfully and the
26
+ * answer flickers between styles on nearly every frame, which is worse than no
27
+ * formatting at all: the eye tracks the flicker instead of the words.
28
+ *
29
+ * `isStreaming` tells the reader to finish an unterminated construct at the end
30
+ * of the input rather than escaping it — an open fence is a code block that is
31
+ * still filling, an open `**` is bold text still being written. The rule it
32
+ * works to is that no word already on screen may disappear when the next token
33
+ * arrives; delimiters may vanish as they are recognised, words never do.
34
+ *
35
+ * ## Where the props come from
36
+ *
37
+ * With the AI SDK, `children` is the text of the assistant message's text parts
38
+ * joined together, and `isStreaming` is `status === 'streaming'`. Join the
39
+ * parts — one `Response` per part renders a heading in one component and the
40
+ * paragraph under it in another, and neither knows about the other.
41
+ */
42
+ import { memo, useMemo } from 'react';
43
+ import { Linking, View } from 'react-native';
44
+ import { Text } from "../../primitives/text.js";
45
+ import { cn } from "../../utils/cn.js";
46
+ import { CodeBlock } from "../code-block/index.js";
47
+ import { Table } from "../table/index.js";
48
+ import { Typography } from "../typography/index.js";
49
+ import { parseMarkdown } from "./markdown.js";
50
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
51
+ /** Heading levels below h4 are h4's size; a chat answer has no use for six. */
52
+ const HEADING_TYPE = ['h2', 'h3', 'h4', 'h4', 'h4', 'h4'];
53
+
54
+ /** Schemes a link may open with. Anything else is rendered but not pressable. */
55
+ const DEFAULT_LINK_PREFIXES = ['https://', 'http://', 'mailto:', 'tel:'];
56
+ function ResponseRoot({
57
+ className,
58
+ children = '',
59
+ isStreaming = false,
60
+ parseIncompleteMarkdown = true,
61
+ onLinkPress,
62
+ allowedLinkPrefixes = DEFAULT_LINK_PREFIXES,
63
+ components,
64
+ showLineNumbers = false,
65
+ ...props
66
+ }) {
67
+ const speculate = isStreaming && parseIncompleteMarkdown;
68
+ const blocks = useMemo(() => parseMarkdown(children, speculate), [children, speculate]);
69
+ const context = {
70
+ streaming: isStreaming,
71
+ onLinkPress,
72
+ allowedLinkPrefixes,
73
+ components,
74
+ showLineNumbers
75
+ };
76
+ return /*#__PURE__*/_jsx(View, {
77
+ className: cn('w-full gap-3', className),
78
+ ...props,
79
+ children: blocks.map((block, index) => /*#__PURE__*/_jsx(BlockView, {
80
+ block: block,
81
+ context: context
82
+ }, index))
83
+ });
84
+ }
85
+
86
+ /**
87
+ * Re-renders only when the text changes.
88
+ *
89
+ * A stream re-renders its parent on every token, and everything else the parent
90
+ * hands down — the callbacks, the overrides — is usually a fresh object each
91
+ * time. Comparing the one prop that actually decides the output keeps a long
92
+ * answer from re-parsing because a sibling moved.
93
+ */
94
+ export const Response = /*#__PURE__*/memo(ResponseRoot, (previous, next) => previous.children === next.children && previous.isStreaming === next.isStreaming && previous.className === next.className);
95
+ Response.displayName = 'Response';
96
+
97
+ /* -------------------------------------------------------------------------- */
98
+ /* Blocks */
99
+ /* -------------------------------------------------------------------------- */
100
+
101
+ function BlockView({
102
+ block,
103
+ context
104
+ }) {
105
+ switch (block.type) {
106
+ case 'heading':
107
+ return /*#__PURE__*/_jsx(Typography.Heading, {
108
+ type: HEADING_TYPE[block.level - 1],
109
+ children: spans(block.inline, context)
110
+ });
111
+ case 'paragraph':
112
+ return /*#__PURE__*/_jsx(Typography.Paragraph, {
113
+ children: spans(block.inline, context)
114
+ });
115
+ case 'code':
116
+ {
117
+ const Custom = context.components?.code;
118
+ if (Custom) {
119
+ return /*#__PURE__*/_jsx(Custom, {
120
+ code: block.code,
121
+ language: block.language,
122
+ streaming: block.open && context.streaming
123
+ });
124
+ }
125
+ return /*#__PURE__*/_jsx(CodeBlock, {
126
+ code: block.code,
127
+ language: block.language,
128
+ showLineNumbers: context.showLineNumbers,
129
+ children: block.language ? /*#__PURE__*/_jsxs(CodeBlock.Header, {
130
+ children: [/*#__PURE__*/_jsx(CodeBlock.Language, {
131
+ children: block.language
132
+ }), /*#__PURE__*/_jsx(CodeBlock.Actions, {
133
+ children: block.open && context.streaming ? null : /*#__PURE__*/_jsx(CodeBlock.CopyButton, {})
134
+ })]
135
+ }) : null
136
+ });
137
+ }
138
+ case 'quote':
139
+ // The rule is drawn here rather than by `Typography.Blockquote`, which
140
+ // puts its children inside a `Text` — right for a quoted sentence, wrong
141
+ // for a quote that turns out to contain a list and a snippet. `border-s`
142
+ // so the rule moves to the other side under a right-to-left `Direction`.
143
+ return /*#__PURE__*/_jsx(View, {
144
+ className: "w-full gap-2 border-s-2 border-border ps-4",
145
+ children: block.blocks.map((child, index) => /*#__PURE__*/_jsx(BlockView, {
146
+ block: child,
147
+ context: context
148
+ }, index))
149
+ });
150
+ case 'list':
151
+ return /*#__PURE__*/_jsx(Typography.List, {
152
+ ordered: block.ordered,
153
+ children: block.items.map((item, index) => /*#__PURE__*/_jsx(View, {
154
+ className: "gap-2",
155
+ children: item.map((child, position) => /*#__PURE__*/_jsx(BlockView, {
156
+ block: child,
157
+ context: context
158
+ }, position))
159
+ }, index))
160
+ });
161
+ case 'table':
162
+ return /*#__PURE__*/_jsx(TableBlock, {
163
+ block: block,
164
+ context: context
165
+ });
166
+ case 'rule':
167
+ return /*#__PURE__*/_jsx(View, {
168
+ className: "h-px w-full bg-border"
169
+ });
170
+ }
171
+ }
172
+ const ALIGNMENT = {
173
+ left: 'start',
174
+ center: 'center',
175
+ right: 'end'
176
+ };
177
+
178
+ /**
179
+ * A GFM table.
180
+ *
181
+ * Every column gets the same share of the width. A markdown table carries no
182
+ * widths, and guessing them from the longest cell makes the columns jump about
183
+ * as rows stream in — which is exactly the movement everything else here is
184
+ * built to avoid.
185
+ */
186
+ function TableBlock({
187
+ block,
188
+ context
189
+ }) {
190
+ const align = index => ALIGNMENT[block.align[index] ?? 'left'];
191
+ return /*#__PURE__*/_jsxs(Table, {
192
+ variant: "outline",
193
+ size: "sm",
194
+ children: [/*#__PURE__*/_jsx(Table.Header, {
195
+ children: /*#__PURE__*/_jsx(Table.Row, {
196
+ children: block.head.map((cell, index) => /*#__PURE__*/_jsx(Table.Head, {
197
+ align: align(index),
198
+ children: /*#__PURE__*/_jsx(InlineRun, {
199
+ tokens: cell,
200
+ context: context,
201
+ className: "text-[11px] font-medium text-muted-foreground"
202
+ })
203
+ }, index))
204
+ })
205
+ }), /*#__PURE__*/_jsx(Table.Body, {
206
+ children: block.rows.map((row, rowIndex) => /*#__PURE__*/_jsx(Table.Row, {
207
+ children: block.head.map((_unused, index) => /*#__PURE__*/_jsx(Table.Cell, {
208
+ align: align(index),
209
+ children: /*#__PURE__*/_jsx(InlineRun, {
210
+ tokens: row[index] ?? [],
211
+ context: context,
212
+ className: "text-xs text-foreground"
213
+ })
214
+ }, index))
215
+ }, rowIndex))
216
+ })]
217
+ });
218
+ }
219
+
220
+ /* -------------------------------------------------------------------------- */
221
+ /* Inline */
222
+ /* -------------------------------------------------------------------------- */
223
+
224
+ /**
225
+ * A run of styled spans, inside a `Text` of its own.
226
+ *
227
+ * Nested `Text` rather than a row of views, because only nested text wraps as
228
+ * one paragraph — a bolded word in a view would break the line before it and
229
+ * leave a gap where the sentence should have continued.
230
+ *
231
+ * The wrapper is not optional. Half these spans are bare strings, and a bare
232
+ * string is only legal inside a `Text`: dropped into a `Table.Cell` — which is
233
+ * a view — React Native refuses to render it at all.
234
+ */
235
+ function InlineRun({
236
+ tokens,
237
+ context,
238
+ className
239
+ }) {
240
+ return /*#__PURE__*/_jsx(Text, {
241
+ className: className,
242
+ children: spans(tokens, context)
243
+ });
244
+ }
245
+ function spans(tokens, context) {
246
+ return tokens.map((token, index) => {
247
+ if (token.kind === 'image') {
248
+ const Custom = context.components?.image;
249
+ // Nothing by default. An image in an answer is a URL the model wrote, and
250
+ // fetching it unasked is a request to a host nobody chose.
251
+ return Custom ? /*#__PURE__*/_jsx(Custom, {
252
+ src: token.href ?? '',
253
+ alt: token.value
254
+ }, index) : null;
255
+ }
256
+ if (token.kind === 'code') {
257
+ // A `Text`, not `Typography.Code` — that one is a view around a text, and
258
+ // a view inside a paragraph breaks the line before it and leaves a gap
259
+ // where the sentence should have carried on. A background and a
260
+ // monospace face are what make it read as code; they survive nesting,
261
+ // and padding does not.
262
+ //
263
+ // No relative font size either. There is no `em` here to be relative to:
264
+ // a value in one sends the style resolver looking for a parent size that
265
+ // is itself expressed in `em`, and it does not come back. The inherited
266
+ // size is the right one anyway — inline code is part of its sentence.
267
+ return /*#__PURE__*/_jsx(Text, {
268
+ className: cn('bg-muted font-mono', marks(token)),
269
+ children: token.value
270
+ }, index);
271
+ }
272
+ if (token.kind === 'link') {
273
+ const href = token.href ?? '';
274
+ const openable = context.allowedLinkPrefixes.some(prefix => href.startsWith(prefix));
275
+ return /*#__PURE__*/_jsx(Text, {
276
+ className: cn('text-primary underline', marks(token)),
277
+ onPress: openable ? () => (context.onLinkPress ?? defaultOpen)(href) : undefined,
278
+ children: token.value
279
+ }, index);
280
+ }
281
+ if (!token.bold && !token.italic && !token.strike) return token.value;
282
+ return /*#__PURE__*/_jsx(Text, {
283
+ className: marks(token),
284
+ children: token.value
285
+ }, index);
286
+ });
287
+ }
288
+ function marks(token) {
289
+ return cn(token.bold && 'font-semibold', token.italic && 'italic', token.strike && 'line-through');
290
+ }
291
+ function defaultOpen(href) {
292
+ // Fire and forget: a link the platform declines to open is not worth an
293
+ // unhandled rejection, and there is nothing useful to do about one.
294
+ void Linking.openURL(href).catch(() => {});
295
+ }
296
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["memo","useMemo","Linking","View","Text","cn","CodeBlock","Table","Typography","parseMarkdown","jsx","_jsx","jsxs","_jsxs","HEADING_TYPE","DEFAULT_LINK_PREFIXES","ResponseRoot","className","children","isStreaming","parseIncompleteMarkdown","onLinkPress","allowedLinkPrefixes","components","showLineNumbers","props","speculate","blocks","context","streaming","map","block","index","BlockView","Response","previous","next","displayName","type","Heading","level","spans","inline","Paragraph","Custom","code","language","open","Header","Language","Actions","CopyButton","child","List","ordered","items","item","position","TableBlock","ALIGNMENT","left","center","right","align","variant","size","Row","head","cell","Head","InlineRun","tokens","Body","rows","row","rowIndex","_unused","Cell","token","kind","image","src","href","alt","value","marks","openable","some","prefix","startsWith","onPress","defaultOpen","undefined","bold","italic","strike","openURL","catch"],"sourceRoot":"../../../../src","sources":["components/response/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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