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.
- package/README.md +22 -3
- package/lib/module/components/calendar/index.js +450 -132
- package/lib/module/components/calendar/index.js.map +1 -1
- package/lib/module/components/code-block/highlight.js +363 -0
- package/lib/module/components/code-block/highlight.js.map +1 -0
- package/lib/module/components/code-block/index.js +313 -0
- package/lib/module/components/code-block/index.js.map +1 -0
- package/lib/module/components/date-picker/index.js +8 -1
- package/lib/module/components/date-picker/index.js.map +1 -1
- package/lib/module/components/heatmap-chart/index.js +9 -8
- package/lib/module/components/heatmap-chart/index.js.map +1 -1
- package/lib/module/components/map/index.js +50 -4
- package/lib/module/components/map/index.js.map +1 -1
- package/lib/module/components/menu/index.js +714 -0
- package/lib/module/components/menu/index.js.map +1 -0
- package/lib/module/components/plan/index.js +582 -0
- package/lib/module/components/plan/index.js.map +1 -0
- package/lib/module/components/popover/index.js +35 -4
- package/lib/module/components/popover/index.js.map +1 -1
- package/lib/module/components/post/index.js +992 -0
- package/lib/module/components/post/index.js.map +1 -0
- package/lib/module/components/radio-group/index.js +13 -8
- package/lib/module/components/radio-group/index.js.map +1 -1
- package/lib/module/components/reasoning/index.js +244 -0
- package/lib/module/components/reasoning/index.js.map +1 -0
- package/lib/module/components/response/index.js +296 -0
- package/lib/module/components/response/index.js.map +1 -0
- package/lib/module/components/response/markdown.js +463 -0
- package/lib/module/components/response/markdown.js.map +1 -0
- package/lib/module/components/select/index.js +97 -15
- package/lib/module/components/select/index.js.map +1 -1
- package/lib/module/components/sources/index.js +221 -0
- package/lib/module/components/sources/index.js.map +1 -0
- package/lib/module/components/table/index.js +632 -0
- package/lib/module/components/table/index.js.map +1 -0
- package/lib/module/components/task/index.js +300 -0
- package/lib/module/components/task/index.js.map +1 -0
- package/lib/module/components/textarea/index.js +295 -0
- package/lib/module/components/textarea/index.js.map +1 -0
- package/lib/module/components/tooltip/index.js +179 -23
- package/lib/module/components/tooltip/index.js.map +1 -1
- package/lib/module/icons/index.js +339 -0
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/index.js +12 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/primitives/collapse.js +112 -0
- package/lib/module/primitives/collapse.js.map +1 -0
- package/lib/module/utils/date.js +129 -22
- package/lib/module/utils/date.js.map +1 -1
- package/lib/typescript/src/components/calendar/index.d.ts +79 -5
- package/lib/typescript/src/components/calendar/index.d.ts.map +1 -1
- package/lib/typescript/src/components/code-block/highlight.d.ts +39 -0
- package/lib/typescript/src/components/code-block/highlight.d.ts.map +1 -0
- package/lib/typescript/src/components/code-block/index.d.ts +113 -0
- package/lib/typescript/src/components/code-block/index.d.ts.map +1 -0
- package/lib/typescript/src/components/date-picker/index.d.ts +7 -1
- package/lib/typescript/src/components/date-picker/index.d.ts.map +1 -1
- package/lib/typescript/src/components/heatmap-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/map/index.d.ts +8 -1
- package/lib/typescript/src/components/map/index.d.ts.map +1 -1
- package/lib/typescript/src/components/menu/index.d.ts +261 -0
- package/lib/typescript/src/components/menu/index.d.ts.map +1 -0
- package/lib/typescript/src/components/plan/index.d.ts +238 -0
- package/lib/typescript/src/components/plan/index.d.ts.map +1 -0
- package/lib/typescript/src/components/popover/index.d.ts +35 -1
- package/lib/typescript/src/components/popover/index.d.ts.map +1 -1
- package/lib/typescript/src/components/post/index.d.ts +358 -0
- package/lib/typescript/src/components/post/index.d.ts.map +1 -0
- package/lib/typescript/src/components/radio-group/index.d.ts.map +1 -1
- package/lib/typescript/src/components/reasoning/index.d.ts +97 -0
- package/lib/typescript/src/components/reasoning/index.d.ts.map +1 -0
- package/lib/typescript/src/components/response/index.d.ts +91 -0
- package/lib/typescript/src/components/response/index.d.ts.map +1 -0
- package/lib/typescript/src/components/response/markdown.d.ts +88 -0
- package/lib/typescript/src/components/response/markdown.d.ts.map +1 -0
- package/lib/typescript/src/components/select/index.d.ts +27 -2
- package/lib/typescript/src/components/select/index.d.ts.map +1 -1
- package/lib/typescript/src/components/sources/index.d.ts +85 -0
- package/lib/typescript/src/components/sources/index.d.ts.map +1 -0
- package/lib/typescript/src/components/table/index.d.ts +274 -0
- package/lib/typescript/src/components/table/index.d.ts.map +1 -0
- package/lib/typescript/src/components/task/index.d.ts +103 -0
- package/lib/typescript/src/components/task/index.d.ts.map +1 -0
- package/lib/typescript/src/components/textarea/index.d.ts +175 -0
- package/lib/typescript/src/components/textarea/index.d.ts.map +1 -0
- package/lib/typescript/src/components/tooltip/index.d.ts +63 -8
- package/lib/typescript/src/components/tooltip/index.d.ts.map +1 -1
- package/lib/typescript/src/icons/index.d.ts +54 -1
- package/lib/typescript/src/icons/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +14 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/primitives/collapse.d.ts +42 -0
- package/lib/typescript/src/primitives/collapse.d.ts.map +1 -0
- package/lib/typescript/src/utils/date.d.ts +49 -5
- package/lib/typescript/src/utils/date.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/calendar/index.tsx +519 -139
- package/src/components/code-block/highlight.ts +278 -0
- package/src/components/code-block/index.tsx +341 -0
- package/src/components/date-picker/index.tsx +19 -1
- package/src/components/heatmap-chart/index.tsx +9 -9
- package/src/components/map/index.tsx +53 -4
- package/src/components/menu/index.tsx +812 -0
- package/src/components/plan/index.tsx +648 -0
- package/src/components/popover/index.tsx +69 -2
- package/src/components/post/index.tsx +1116 -0
- package/src/components/radio-group/index.tsx +11 -2
- package/src/components/reasoning/index.tsx +297 -0
- package/src/components/response/index.tsx +390 -0
- package/src/components/response/markdown.ts +489 -0
- package/src/components/select/index.tsx +132 -12
- package/src/components/sources/index.tsx +278 -0
- package/src/components/table/index.tsx +747 -0
- package/src/components/task/index.tsx +329 -0
- package/src/components/textarea/index.tsx +381 -0
- package/src/components/tooltip/index.tsx +203 -20
- package/src/icons/index.tsx +264 -1
- package/src/index.ts +131 -0
- package/src/primitives/collapse.tsx +128 -0
- package/src/utils/date.ts +146 -22
- package/theme.css +112 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/radio-group/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAa,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAW/D,KAAK,YAAY,GAAG,KAAK,GAAG,MAAM,CAAC;AACnC,KAAK,gBAAgB,GAAG,UAAU,GAAG,YAAY,CAAC;AA2DlD,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB;;;;OAIG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,QAAQ,EAAE,SAAS,CAAC;CACrB;AA6CD,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/radio-group/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAa,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAW/D,KAAK,YAAY,GAAG,KAAK,GAAG,MAAM,CAAC;AACnC,KAAK,gBAAgB,GAAG,UAAU,GAAG,YAAY,CAAC;AA2DlD,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB;;;;OAIG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,QAAQ,EAAE,SAAS,CAAC;CACrB;AA6CD,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,SAAS,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAmB,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAkDpF,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,WAAmB,EACnB,QAAQ,EAAE,YAAY,EACtB,IAAI,EAAE,QAAQ,EACd,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,cAAc,+BAsEhB;kBA/EQ,aAAa;;;AAkFtB,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,OAAO,CAAC;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,SAAS,CAAC;IAC/D,yDAAyD;IACzD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,uEAAuE;AACvE,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,+BAoDjG;kBApDQ,gBAAgB;;;AAsDzB,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;GAMG;AACH,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,+BAWjF;kBAXQ,gBAAgB;;;AAgBzB,eAAO,MAAM,SAAS;;;CAGpB,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response — a model's answer, rendered as it arrives.
|
|
3
|
+
*
|
|
4
|
+
* An answer is markdown. It has headings and lists and fenced code in it,
|
|
5
|
+
* because that is what a model writes, and rendering it as one run of plain
|
|
6
|
+
* text throws away the structure the model went to the trouble of producing.
|
|
7
|
+
*
|
|
8
|
+
* So this reads the markdown and renders it through the library's own parts —
|
|
9
|
+
* `Typography` for prose, `CodeBlock` for fences, `Table` for tables. Nothing
|
|
10
|
+
* here draws its own type or its own colours: an answer inside a message bubble
|
|
11
|
+
* should look like the app it is in, not like a document viewer someone
|
|
12
|
+
* embedded.
|
|
13
|
+
*
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <Response isStreaming={status === 'streaming'}>{text}</Response>
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* ## Why it is a whole component and not a `<Text>`
|
|
19
|
+
*
|
|
20
|
+
* Because the text is still arriving, and that changes everything about how it
|
|
21
|
+
* has to be read. A token stream hands you every prefix of the final answer, so
|
|
22
|
+
* a renderer sees `**bo`, then `**bol`, then `**bold**` — three documents, two
|
|
23
|
+
* of which have literal asterisks in them. Render each faithfully and the
|
|
24
|
+
* answer flickers between styles on nearly every frame, which is worse than no
|
|
25
|
+
* formatting at all: the eye tracks the flicker instead of the words.
|
|
26
|
+
*
|
|
27
|
+
* `isStreaming` tells the reader to finish an unterminated construct at the end
|
|
28
|
+
* of the input rather than escaping it — an open fence is a code block that is
|
|
29
|
+
* still filling, an open `**` is bold text still being written. The rule it
|
|
30
|
+
* works to is that no word already on screen may disappear when the next token
|
|
31
|
+
* arrives; delimiters may vanish as they are recognised, words never do.
|
|
32
|
+
*
|
|
33
|
+
* ## Where the props come from
|
|
34
|
+
*
|
|
35
|
+
* With the AI SDK, `children` is the text of the assistant message's text parts
|
|
36
|
+
* joined together, and `isStreaming` is `status === 'streaming'`. Join the
|
|
37
|
+
* parts — one `Response` per part renders a heading in one component and the
|
|
38
|
+
* paragraph under it in another, and neither knows about the other.
|
|
39
|
+
*/
|
|
40
|
+
import { type ComponentType } from 'react';
|
|
41
|
+
import { type ViewProps } from 'react-native';
|
|
42
|
+
export type { Block as ResponseBlock, InlineToken as ResponseInline } from './markdown.js';
|
|
43
|
+
export interface ResponseComponents {
|
|
44
|
+
/** Replaces the whole code block — for a runnable snippet, or a diff viewer. */
|
|
45
|
+
code?: ComponentType<{
|
|
46
|
+
code: string;
|
|
47
|
+
language?: string;
|
|
48
|
+
streaming: boolean;
|
|
49
|
+
}>;
|
|
50
|
+
/** Replaces an image. Nothing is rendered for one by default. */
|
|
51
|
+
image?: ComponentType<{
|
|
52
|
+
src: string;
|
|
53
|
+
alt: string;
|
|
54
|
+
}>;
|
|
55
|
+
}
|
|
56
|
+
export interface ResponseProps extends Omit<ViewProps, 'children'> {
|
|
57
|
+
className?: string;
|
|
58
|
+
/** The markdown. */
|
|
59
|
+
children?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Whether more is still coming. Finishes an unterminated construct at the end
|
|
62
|
+
* of the text instead of escaping it, so the answer does not flicker between
|
|
63
|
+
* styles as its delimiters arrive.
|
|
64
|
+
*/
|
|
65
|
+
isStreaming?: boolean;
|
|
66
|
+
/** Turns off speculative completion entirely, even while streaming. */
|
|
67
|
+
parseIncompleteMarkdown?: boolean;
|
|
68
|
+
/** What a link does. Opens it with the system handler by default. */
|
|
69
|
+
onLinkPress?: (href: string) => void;
|
|
70
|
+
/**
|
|
71
|
+
* Schemes a link is allowed to open. A model can write any URL it likes, and
|
|
72
|
+
* an answer is not a trusted document — so the default list is the four that
|
|
73
|
+
* cannot do anything but navigate.
|
|
74
|
+
*/
|
|
75
|
+
allowedLinkPrefixes?: string[];
|
|
76
|
+
/** Swap out how a block is drawn. */
|
|
77
|
+
components?: ResponseComponents;
|
|
78
|
+
/** Line numbers in fenced code. */
|
|
79
|
+
showLineNumbers?: boolean;
|
|
80
|
+
}
|
|
81
|
+
declare function ResponseRoot({ className, children, isStreaming, parseIncompleteMarkdown, onLinkPress, allowedLinkPrefixes, components, showLineNumbers, ...props }: ResponseProps): import("react").JSX.Element;
|
|
82
|
+
/**
|
|
83
|
+
* Re-renders only when the text changes.
|
|
84
|
+
*
|
|
85
|
+
* A stream re-renders its parent on every token, and everything else the parent
|
|
86
|
+
* hands down — the callbacks, the overrides — is usually a fresh object each
|
|
87
|
+
* time. Comparing the one prop that actually decides the output keeps a long
|
|
88
|
+
* answer from re-parsing because a sibling moved.
|
|
89
|
+
*/
|
|
90
|
+
export declare const Response: import("react").MemoExoticComponent<typeof ResponseRoot>;
|
|
91
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/response/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;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AED;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,0DAMpB,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A small Markdown reader, written for text that is still arriving.
|
|
3
|
+
*
|
|
4
|
+
* No parser library. What a chat answer actually contains is headings,
|
|
5
|
+
* paragraphs, lists, fenced code, blockquotes, tables, rules and a handful of
|
|
6
|
+
* inline marks — and every general-purpose parser worth using assumes it has
|
|
7
|
+
* been handed the whole document. That assumption is the one thing that is
|
|
8
|
+
* never true here.
|
|
9
|
+
*
|
|
10
|
+
* ## Half-arrived markdown
|
|
11
|
+
*
|
|
12
|
+
* A token stream shows you every prefix of the final text, so the reader sees
|
|
13
|
+
* `**bo`, then `**bol`, then `**bold**`. Treated naively that is three
|
|
14
|
+
* documents: two with literal asterisks in them and one with a bolded word. The
|
|
15
|
+
* text would flash between styles on nearly every frame, which is worse than no
|
|
16
|
+
* formatting at all — the eye tracks the flicker instead of the words.
|
|
17
|
+
*
|
|
18
|
+
* So an unterminated construct at the very end of the input is *completed
|
|
19
|
+
* speculatively* rather than escaped: an open fence becomes a code block that
|
|
20
|
+
* is still filling, an open `**` becomes bold text that is still being written.
|
|
21
|
+
* Anything unterminated anywhere else is literal, because a document that has
|
|
22
|
+
* stopped arriving means what it says.
|
|
23
|
+
*
|
|
24
|
+
* The two rules that follow from this:
|
|
25
|
+
*
|
|
26
|
+
* - **Only the tail is speculative.** An asterisk in the middle of a finished
|
|
27
|
+
* paragraph is an asterisk.
|
|
28
|
+
* - **A speculative construct never removes visible text.** The characters that
|
|
29
|
+
* opened it are hidden, and everything after them stays on screen. Otherwise
|
|
30
|
+
* the last word of the answer disappears and reappears as its delimiter
|
|
31
|
+
* arrives.
|
|
32
|
+
*/
|
|
33
|
+
export type Align = 'left' | 'center' | 'right';
|
|
34
|
+
export interface InlineToken {
|
|
35
|
+
kind: 'text' | 'code' | 'link' | 'image';
|
|
36
|
+
value: string;
|
|
37
|
+
/** For links and images. */
|
|
38
|
+
href?: string;
|
|
39
|
+
bold?: boolean;
|
|
40
|
+
italic?: boolean;
|
|
41
|
+
strike?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export type Block = {
|
|
44
|
+
type: 'heading';
|
|
45
|
+
level: 1 | 2 | 3 | 4 | 5 | 6;
|
|
46
|
+
inline: InlineToken[];
|
|
47
|
+
} | {
|
|
48
|
+
type: 'paragraph';
|
|
49
|
+
inline: InlineToken[];
|
|
50
|
+
} | {
|
|
51
|
+
type: 'code';
|
|
52
|
+
code: string;
|
|
53
|
+
language?: string;
|
|
54
|
+
open: boolean;
|
|
55
|
+
} | {
|
|
56
|
+
type: 'quote';
|
|
57
|
+
blocks: Block[];
|
|
58
|
+
} | {
|
|
59
|
+
type: 'list';
|
|
60
|
+
ordered: boolean;
|
|
61
|
+
start: number;
|
|
62
|
+
items: Block[][];
|
|
63
|
+
} | {
|
|
64
|
+
type: 'table';
|
|
65
|
+
head: InlineToken[][];
|
|
66
|
+
rows: InlineToken[][][];
|
|
67
|
+
align: (Align | null)[];
|
|
68
|
+
} | {
|
|
69
|
+
type: 'rule';
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Splits a document into blocks.
|
|
73
|
+
*
|
|
74
|
+
* `streaming` is what turns speculative completion on. With it off — a stored
|
|
75
|
+
* answer, a message that has finished — an unterminated fence is just a
|
|
76
|
+
* paragraph starting with three backticks, which is what it literally is.
|
|
77
|
+
*/
|
|
78
|
+
export declare function parseMarkdown(source: string, streaming?: boolean): Block[];
|
|
79
|
+
/**
|
|
80
|
+
* Splits a run of text into styled spans.
|
|
81
|
+
*
|
|
82
|
+
* `tail` says this run is the end of a stream, which is what licenses closing
|
|
83
|
+
* an open delimiter speculatively. It is deliberately narrow: only the *last*
|
|
84
|
+
* unterminated opener on the line is completed, and only when nothing after it
|
|
85
|
+
* could still turn out to be the closer.
|
|
86
|
+
*/
|
|
87
|
+
export declare function parseInline(source: string, tail: boolean): InlineToken[];
|
|
88
|
+
//# sourceMappingURL=markdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../../../src/components/response/markdown.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEhD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,MAAM,KAAK,GACb;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAAC,MAAM,EAAE,WAAW,EAAE,CAAA;CAAE,GACxE;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,WAAW,EAAE,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,GAChE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,KAAK,EAAE,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAA;CAAE,GACnE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,WAAW,EAAE,EAAE,CAAC;IAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC;IAAC,KAAK,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC,EAAE,CAAA;CAAE,GAC1F;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAUrB;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAG,KAAK,EAAE,CAGxE;AA0QD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,WAAW,EAAE,CA+HxE"}
|
|
@@ -20,15 +20,27 @@
|
|
|
20
20
|
* <Select.Item value="eu" label="Europe" />
|
|
21
21
|
* </Select>
|
|
22
22
|
* ```
|
|
23
|
+
*
|
|
24
|
+
* Past a couple of dozen options, scrolling stops being a way of finding
|
|
25
|
+
* anything: pass `searchable` and the list gets a filter above it, matching on
|
|
26
|
+
* the option labels. The filter narrows what is *shown* — the declared options
|
|
27
|
+
* are still the source of truth, so nothing has to be lifted into state to make
|
|
28
|
+
* it work.
|
|
23
29
|
*/
|
|
24
30
|
import { type ReactNode } from 'react';
|
|
25
31
|
export type SelectPresentation = 'sheet' | 'inline' | 'overlay';
|
|
26
32
|
export interface SelectItemProps {
|
|
27
33
|
value: string;
|
|
28
34
|
label: string;
|
|
35
|
+
/**
|
|
36
|
+
* Shows the option but refuses it — a plan above the current tier, a region
|
|
37
|
+
* with nothing in stock. Kept in the list rather than dropped from it, because
|
|
38
|
+
* an option that vanishes reads as one that never existed.
|
|
39
|
+
*/
|
|
40
|
+
disabled?: boolean;
|
|
29
41
|
}
|
|
30
42
|
/** Declarative option. Rendered inside whichever surface is presenting. */
|
|
31
|
-
declare function SelectItem({ value, label }: SelectItemProps): import("react").JSX.Element;
|
|
43
|
+
declare function SelectItem({ value, label, disabled }: SelectItemProps): import("react").JSX.Element;
|
|
32
44
|
export interface SelectProps {
|
|
33
45
|
className?: string;
|
|
34
46
|
value?: string;
|
|
@@ -52,6 +64,19 @@ export interface SelectProps {
|
|
|
52
64
|
offset?: number;
|
|
53
65
|
/** Called when the options open or close. */
|
|
54
66
|
onOpenChange?: (open: boolean) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Put a filter above the options, matching case-insensitively on any part of
|
|
69
|
+
* an option's label. For a list long enough that scrolling it is not finding
|
|
70
|
+
* anything — countries, currencies, a repository's branches.
|
|
71
|
+
*
|
|
72
|
+
* The field is not focused on open: on a phone that would throw the keyboard
|
|
73
|
+
* over the very list you are trying to look at.
|
|
74
|
+
*/
|
|
75
|
+
searchable?: boolean;
|
|
76
|
+
/** Placeholder for the filter field. `searchable` only. */
|
|
77
|
+
searchPlaceholder?: string;
|
|
78
|
+
/** Shown in place of the list when the filter matches nothing. */
|
|
79
|
+
emptyMessage?: string;
|
|
55
80
|
/**
|
|
56
81
|
* Render the platform's own picker instead of the trigger-and-list pair.
|
|
57
82
|
* Requires the optional `@expo/ui` package; without it this prop does
|
|
@@ -69,7 +94,7 @@ export interface SelectProps {
|
|
|
69
94
|
nativeAppearance?: 'menu' | 'wheel';
|
|
70
95
|
children: ReactNode;
|
|
71
96
|
}
|
|
72
|
-
declare function SelectRoot({ className, value, onValueChange, placeholder, disabled, presentation, title, contentWidth, offset, onOpenChange, native, nativeAppearance, children, }: SelectProps): import("react").JSX.Element;
|
|
97
|
+
declare function SelectRoot({ className, value, onValueChange, placeholder, disabled, presentation, title, contentWidth, offset, onOpenChange, searchable, searchPlaceholder, emptyMessage, native, nativeAppearance, children, }: SelectProps): import("react").JSX.Element;
|
|
73
98
|
export declare const Select: typeof SelectRoot & {
|
|
74
99
|
Item: typeof SelectItem;
|
|
75
100
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/select/index.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":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AgB,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,UAAkB,EAClB,iBAA4B,EAC5B,YAA2B,EAC3B,MAAM,EACN,gBAAyB,EACzB,QAAQ,GACT,EAAE,WAAW,+BA0Tb;AAED,eAAO,MAAM,MAAM;;CAEjB,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sources — where an answer came from, folded under a count.
|
|
3
|
+
*
|
|
4
|
+
* A cited answer usually cites more places than anyone wants listed above it,
|
|
5
|
+
* so the list opens from a single line: "Used 6 sources". Folded is the resting
|
|
6
|
+
* state, unlike `Reasoning`, because a citation list is a thing you go and
|
|
7
|
+
* check rather than a thing you watch arrive.
|
|
8
|
+
*
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Sources>
|
|
11
|
+
* <Sources.Trigger count={sources.length} />
|
|
12
|
+
* <Sources.Content>
|
|
13
|
+
* {sources.map((source) => (
|
|
14
|
+
* <Sources.Source key={source.url} href={source.url} title={source.title} />
|
|
15
|
+
* ))}
|
|
16
|
+
* </Sources.Content>
|
|
17
|
+
* </Sources>
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* ## Where the props come from
|
|
21
|
+
*
|
|
22
|
+
* With the AI SDK these are the `source-url` parts of an assistant message:
|
|
23
|
+
* `part.url` is the `href` and `part.title` the `title`. A part carries no
|
|
24
|
+
* title of its own when the model did not supply one, in which case the host
|
|
25
|
+
* of the URL is a better label than the whole of it.
|
|
26
|
+
*/
|
|
27
|
+
import { type ReactNode } from 'react';
|
|
28
|
+
import { type PressableProps, type ViewProps } from 'react-native';
|
|
29
|
+
export interface SourcesProps extends Omit<ViewProps, 'children'> {
|
|
30
|
+
className?: string;
|
|
31
|
+
/** Controlled open state. */
|
|
32
|
+
open?: boolean;
|
|
33
|
+
/** Initial state when uncontrolled. Folded, which is where a citation list belongs. */
|
|
34
|
+
defaultOpen?: boolean;
|
|
35
|
+
onOpenChange?: (open: boolean) => void;
|
|
36
|
+
children?: ReactNode;
|
|
37
|
+
}
|
|
38
|
+
declare function SourcesRoot({ className, open: openProp, defaultOpen, onOpenChange, children, ...props }: SourcesProps): import("react").JSX.Element;
|
|
39
|
+
declare namespace SourcesRoot {
|
|
40
|
+
var displayName: string;
|
|
41
|
+
}
|
|
42
|
+
export interface SourcesTriggerProps extends Omit<PressableProps, 'children' | 'style'> {
|
|
43
|
+
className?: string;
|
|
44
|
+
/** How many sources the list holds. Reads "Used 6 sources". */
|
|
45
|
+
count?: number;
|
|
46
|
+
/** Replaces the whole row. */
|
|
47
|
+
children?: ReactNode;
|
|
48
|
+
}
|
|
49
|
+
declare function SourcesTrigger({ className, count, children, onPress, ...props }: SourcesTriggerProps): import("react").JSX.Element;
|
|
50
|
+
declare namespace SourcesTrigger {
|
|
51
|
+
var displayName: string;
|
|
52
|
+
}
|
|
53
|
+
export interface SourcesContentProps extends Omit<ViewProps, 'children'> {
|
|
54
|
+
className?: string;
|
|
55
|
+
children?: ReactNode;
|
|
56
|
+
}
|
|
57
|
+
declare function SourcesContent({ className, children, ...props }: SourcesContentProps): import("react").JSX.Element;
|
|
58
|
+
declare namespace SourcesContent {
|
|
59
|
+
var displayName: string;
|
|
60
|
+
}
|
|
61
|
+
export interface SourcesSourceProps extends Omit<PressableProps, 'children' | 'style'> {
|
|
62
|
+
className?: string;
|
|
63
|
+
/** Where the row goes. Opened with the platform's own handler. */
|
|
64
|
+
href?: string;
|
|
65
|
+
/**
|
|
66
|
+
* What the row says. Falls back to the URL's host, which is a better label
|
|
67
|
+
* than a hundred characters of path — and models often send no title at all.
|
|
68
|
+
*/
|
|
69
|
+
title?: string;
|
|
70
|
+
/** Leading glyph. A link by default; a favicon suits a real citation list. */
|
|
71
|
+
icon?: ReactNode;
|
|
72
|
+
children?: ReactNode;
|
|
73
|
+
}
|
|
74
|
+
/** One citation. */
|
|
75
|
+
declare function SourcesSource({ className, href, title, icon, children, onPress, ...props }: SourcesSourceProps): import("react").JSX.Element;
|
|
76
|
+
declare namespace SourcesSource {
|
|
77
|
+
var displayName: string;
|
|
78
|
+
}
|
|
79
|
+
export declare const Sources: typeof SourcesRoot & {
|
|
80
|
+
Trigger: typeof SourcesTrigger;
|
|
81
|
+
Content: typeof SourcesContent;
|
|
82
|
+
Source: typeof SourcesSource;
|
|
83
|
+
};
|
|
84
|
+
export {};
|
|
85
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/sources/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAwCtB,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uFAAuF;IACvF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,IAAI,EAAE,QAAQ,EACd,WAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,YAAY,+BAuBd;kBA9BQ,WAAW;;;AAiCpB,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,cAAc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