panelui-native 0.16.0 → 0.19.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 (66) hide show
  1. package/lib/module/components/bottom-sheet/index.js +38 -10
  2. package/lib/module/components/bottom-sheet/index.js.map +1 -1
  3. package/lib/module/components/checkbox/index.js +24 -11
  4. package/lib/module/components/checkbox/index.js.map +1 -1
  5. package/lib/module/components/field/index.js +337 -0
  6. package/lib/module/components/field/index.js.map +1 -0
  7. package/lib/module/components/flow/flow-paths.js +378 -0
  8. package/lib/module/components/flow/flow-paths.js.map +1 -0
  9. package/lib/module/components/flow/index.js +1598 -0
  10. package/lib/module/components/flow/index.js.map +1 -0
  11. package/lib/module/components/form/index.js +77 -0
  12. package/lib/module/components/form/index.js.map +1 -0
  13. package/lib/module/components/form/use-field.js +50 -0
  14. package/lib/module/components/form/use-field.js.map +1 -0
  15. package/lib/module/components/form/use-form.js +217 -0
  16. package/lib/module/components/form/use-form.js.map +1 -0
  17. package/lib/module/components/frame/index.js +124 -22
  18. package/lib/module/components/frame/index.js.map +1 -1
  19. package/lib/module/components/otp-input/index.js +303 -0
  20. package/lib/module/components/otp-input/index.js.map +1 -0
  21. package/lib/module/components/signature/index.js +500 -0
  22. package/lib/module/components/signature/index.js.map +1 -0
  23. package/lib/module/icons/index.js +218 -0
  24. package/lib/module/icons/index.js.map +1 -1
  25. package/lib/module/index.js +6 -1
  26. package/lib/module/index.js.map +1 -1
  27. package/lib/typescript/src/components/bottom-sheet/index.d.ts +15 -1
  28. package/lib/typescript/src/components/bottom-sheet/index.d.ts.map +1 -1
  29. package/lib/typescript/src/components/checkbox/index.d.ts +8 -0
  30. package/lib/typescript/src/components/checkbox/index.d.ts.map +1 -1
  31. package/lib/typescript/src/components/field/index.d.ts +94 -0
  32. package/lib/typescript/src/components/field/index.d.ts.map +1 -0
  33. package/lib/typescript/src/components/flow/flow-paths.d.ts +89 -0
  34. package/lib/typescript/src/components/flow/flow-paths.d.ts.map +1 -0
  35. package/lib/typescript/src/components/flow/index.d.ts +310 -0
  36. package/lib/typescript/src/components/flow/index.d.ts.map +1 -0
  37. package/lib/typescript/src/components/form/index.d.ts +64 -0
  38. package/lib/typescript/src/components/form/index.d.ts.map +1 -0
  39. package/lib/typescript/src/components/form/use-field.d.ts +16 -0
  40. package/lib/typescript/src/components/form/use-field.d.ts.map +1 -0
  41. package/lib/typescript/src/components/form/use-form.d.ts +37 -0
  42. package/lib/typescript/src/components/form/use-form.d.ts.map +1 -0
  43. package/lib/typescript/src/components/frame/index.d.ts +39 -2
  44. package/lib/typescript/src/components/frame/index.d.ts.map +1 -1
  45. package/lib/typescript/src/components/otp-input/index.d.ts +141 -0
  46. package/lib/typescript/src/components/otp-input/index.d.ts.map +1 -0
  47. package/lib/typescript/src/components/signature/index.d.ts +254 -0
  48. package/lib/typescript/src/components/signature/index.d.ts.map +1 -0
  49. package/lib/typescript/src/icons/index.d.ts +17 -0
  50. package/lib/typescript/src/icons/index.d.ts.map +1 -1
  51. package/lib/typescript/src/index.d.ts +7 -2
  52. package/lib/typescript/src/index.d.ts.map +1 -1
  53. package/package.json +9 -1
  54. package/src/components/bottom-sheet/index.tsx +50 -12
  55. package/src/components/checkbox/index.tsx +40 -12
  56. package/src/components/field/index.tsx +329 -0
  57. package/src/components/flow/flow-paths.ts +348 -0
  58. package/src/components/flow/index.tsx +1924 -0
  59. package/src/components/form/index.tsx +85 -0
  60. package/src/components/form/use-field.ts +65 -0
  61. package/src/components/form/use-form.ts +252 -0
  62. package/src/components/frame/index.tsx +162 -14
  63. package/src/components/otp-input/index.tsx +396 -0
  64. package/src/components/signature/index.tsx +681 -0
  65. package/src/icons/index.tsx +159 -0
  66. package/src/index.ts +72 -0
@@ -0,0 +1,310 @@
1
+ /**
2
+ * Flow — a canvas of nodes joined by edges, that you pan, pinch and rearrange
3
+ * with a finger.
4
+ *
5
+ * ```tsx
6
+ * <Flow>
7
+ * <Flow.Background variant="dots" />
8
+ * <Flow.Node id="db" position={{ x: 24, y: 40 }}>
9
+ * <Frame>…</Frame>
10
+ * </Flow.Node>
11
+ * <Flow.Node id="web" position={{ x: 220, y: 200 }}>
12
+ * <Frame>…</Frame>
13
+ * </Flow.Node>
14
+ * <Flow.Edge from="web" to="db" dashed animated />
15
+ * <Flow.Controls />
16
+ * </Flow>
17
+ * ```
18
+ *
19
+ * ## Where the positions live
20
+ *
21
+ * Every node's box is kept twice: on the UI thread, where a drag writes it
22
+ * every frame and the node's own transform reads it, and in React state, where
23
+ * the edges are rendered from it. A dragged node therefore never lags its own
24
+ * finger, and the edges attached to it redraw as it moves.
25
+ *
26
+ * The tempting design is one copy — everything on the UI thread, edges
27
+ * animating their own path strings, no renders at all. It does not draw. An
28
+ * animated SVG path in React Native reliably animates its `d` and nothing
29
+ * else, and only while nothing else about it is animated; anything more is
30
+ * dropped with no error, leaving a path that never receives its geometry. So
31
+ * the edges are ordinary elements and cost a render per drag frame. That is a
32
+ * real cost and it is the right trade.
33
+ *
34
+ * JavaScript is told a drag has finished through `onNodeDragEnd`. Positions
35
+ * are otherwise yours to leave alone: pass `position` once and the canvas
36
+ * takes it from there, or keep it in state and pass it back to drive nodes
37
+ * from outside.
38
+ *
39
+ * ## Two gestures, one canvas
40
+ *
41
+ * The pane pans and pinches; a node drags; a handle draws a new connection.
42
+ * They are nested gesture detectors rather than one gesture doing three jobs,
43
+ * so the innermost thing under the finger wins, which is what a finger expects.
44
+ */
45
+ import { type ReactNode } from 'react';
46
+ import { type ViewProps } from 'react-native';
47
+ import { type FlowPoint, type FlowRect, type FlowSide } from './flow-paths.js';
48
+ export type FlowEdgeVariant = 'bezier' | 'smoothstep' | 'step' | 'straight';
49
+ export interface FlowViewport {
50
+ x: number;
51
+ y: number;
52
+ zoom: number;
53
+ }
54
+ export interface FlowNodePosition {
55
+ x: number;
56
+ y: number;
57
+ }
58
+ /** What `onConnect` is handed when a connection lands. */
59
+ export interface FlowConnection {
60
+ /** Node the drag started from. */
61
+ source: string;
62
+ /** Handle it started from, when it started from one. */
63
+ sourceHandle?: string;
64
+ /** Node it was dropped on. */
65
+ target: string;
66
+ /** Handle it was dropped on, when it landed on one. */
67
+ targetHandle?: string;
68
+ }
69
+ /**
70
+ * Which layer a part belongs to. Declared on the component as a static so the
71
+ * root can sort its children without depending on function identity.
72
+ */
73
+ type FlowSlot = 'background' | 'overlay';
74
+ export interface FlowProps extends Omit<ViewProps, 'children'> {
75
+ className?: string;
76
+ /** Where the canvas starts. `zoom` of 1 is one graph point per screen point. */
77
+ defaultViewport?: FlowViewport;
78
+ /** Closest the canvas will zoom out. */
79
+ minZoom?: number;
80
+ /** Closest it will zoom in. */
81
+ maxZoom?: number;
82
+ /** Drag the empty canvas to move it. */
83
+ panOnDrag?: boolean;
84
+ /** Pinch to zoom. */
85
+ zoomOnPinch?: boolean;
86
+ /**
87
+ * Frame every node once they have all measured themselves. For a graph whose
88
+ * positions come from data and are not laid out against a known screen size.
89
+ */
90
+ fitViewOnMount?: boolean;
91
+ /** Padding left around the graph when fitting, in screen points. */
92
+ fitViewPadding?: number;
93
+ /** The canvas has moved or zoomed. Fired as it happens, on the JS thread. */
94
+ onViewportChange?: (viewport: FlowViewport) => void;
95
+ /** A node was dropped somewhere new. The only time a drag reaches JavaScript. */
96
+ onNodeDragEnd?: (id: string, position: FlowNodePosition) => void;
97
+ /**
98
+ * A connection was drawn between two handles. The canvas never adds the edge
99
+ * itself — the graph is yours, so what a new connection means is yours too.
100
+ */
101
+ onConnect?: (connection: FlowConnection) => void;
102
+ /** Refuse a connection before `onConnect` sees it. */
103
+ isValidConnection?: (connection: FlowConnection) => boolean;
104
+ children?: ReactNode;
105
+ }
106
+ declare function FlowRoot({ className, defaultViewport, minZoom, maxZoom, panOnDrag, zoomOnPinch, fitViewOnMount, fitViewPadding, onViewportChange, onNodeDragEnd, onConnect, isValidConnection, children, ...props }: FlowProps): import("react").JSX.Element;
107
+ export interface FlowBackgroundProps {
108
+ /** The mark repeated across the canvas. */
109
+ variant?: 'dots' | 'lines' | 'cross' | 'none';
110
+ /** Points between marks. */
111
+ gap?: number;
112
+ /** How big each mark is drawn. */
113
+ size?: number;
114
+ /** Mark colour. Defaults to a muted theme token. */
115
+ color?: string;
116
+ }
117
+ /**
118
+ * The grid behind everything. It lives inside the transformed layer, so it
119
+ * pans and scales with the graph — which is the whole point: a grid that
120
+ * stayed put would say the canvas was not moving.
121
+ */
122
+ declare function FlowBackground({ variant, gap, size, color, }: FlowBackgroundProps): import("react").JSX.Element | null;
123
+ declare namespace FlowBackground {
124
+ var displayName: string;
125
+ var slot: FlowSlot;
126
+ }
127
+ export interface FlowNodeProps extends Omit<ViewProps, 'children'> {
128
+ /** Identifies the node to edges and to `onNodeDragEnd`. Must be unique. */
129
+ id: string;
130
+ /** Where it starts, in graph coordinates. */
131
+ position: FlowNodePosition;
132
+ className?: string;
133
+ /** Let a finger move it. */
134
+ draggable?: boolean;
135
+ /** Draw the selected ring. */
136
+ selected?: boolean;
137
+ /** Tapping the node — separate from dragging it. */
138
+ onPress?: () => void;
139
+ /** Spoken name. Defaults to the node's id. */
140
+ accessibilityLabel?: string;
141
+ children?: ReactNode;
142
+ }
143
+ /**
144
+ * One box on the canvas. Its own content is whatever you put inside — a Frame
145
+ * is the usual answer, since a node is a titled card of rows more often than
146
+ * it is anything else.
147
+ */
148
+ declare function FlowNode({ id, position, className, draggable, selected, onPress, accessibilityLabel, children, ...props }: FlowNodeProps): import("react").JSX.Element;
149
+ declare namespace FlowNode {
150
+ var displayName: string;
151
+ }
152
+ export interface FlowHandleProps {
153
+ /** Names the handle to an edge, as `"nodeId.handleId"`. */
154
+ id?: string;
155
+ /** Which face it sits on. */
156
+ position?: FlowSide;
157
+ /**
158
+ * `source` starts connections, `target` receives them, `both` does either.
159
+ * A drag from a source can only land on a target, and the other way round.
160
+ */
161
+ type?: 'source' | 'target' | 'both';
162
+ /** Where along the face, 0–1. For more than one handle on a side. */
163
+ offset?: number;
164
+ className?: string;
165
+ /** Draw nothing. The handle still anchors edges and still accepts a drop. */
166
+ hidden?: boolean;
167
+ }
168
+ /**
169
+ * A port on a node — both the point an edge attaches to and the grip a new
170
+ * connection is dragged from.
171
+ *
172
+ * Its position is worked out from the node's box and the face it names, so it
173
+ * never has to measure itself. That matters: a handle that measured would be
174
+ * one frame behind the node it sits on, and the edge would trail its own port.
175
+ */
176
+ declare function FlowHandle({ id, position, type, offset, className, hidden, }: FlowHandleProps): import("react").JSX.Element | null;
177
+ declare namespace FlowHandle {
178
+ var displayName: string;
179
+ }
180
+ export interface FlowEdgeProps {
181
+ /** Source, as `"nodeId"` or `"nodeId.handleId"`. */
182
+ from: string;
183
+ /** Target, same shape. */
184
+ to: string;
185
+ /** How the edge is routed. */
186
+ variant?: FlowEdgeVariant;
187
+ /**
188
+ * Mark the edge as carrying something — a request, a build, a dependency
189
+ * that is live rather than declared. Draws it dashed.
190
+ */
191
+ animated?: boolean;
192
+ /** Draw it broken rather than solid. */
193
+ dashed?: boolean;
194
+ /**
195
+ * Stroke colour. Defaults to the muted-foreground token — an edge is content
196
+ * rather than chrome, and the border token it would otherwise share with the
197
+ * nodes is, by design, barely there.
198
+ */
199
+ color?: string;
200
+ /** Stroke width in graph points. */
201
+ width?: number;
202
+ /** Put an arrowhead on the target end. */
203
+ arrow?: boolean;
204
+ /** Override the face it leaves from. Otherwise worked out from the layout. */
205
+ fromSide?: FlowSide;
206
+ /** Override the face it arrives at. */
207
+ toSide?: FlowSide;
208
+ /** Corner radius for `smoothstep`. */
209
+ radius?: number;
210
+ /** How far the edge steps clear of a node before turning. */
211
+ gap?: number;
212
+ /** Curve strength for `bezier`. */
213
+ curvature?: number;
214
+ }
215
+ /**
216
+ * A line between two nodes. It names them rather than coordinates, and works
217
+ * out its own geometry from wherever they currently are — including which face
218
+ * to use, which is why a graph the user rearranges does not need re-specifying.
219
+ *
220
+ * It draws nothing where it is written. Every edge in a canvas has to end up
221
+ * inside one `<Svg>`, under every node — an SVG element rendered among the
222
+ * nodes is not in an SVG at all and silently draws nothing — so an edge
223
+ * registers itself and the canvas paints it in the right layer. Which means an
224
+ * edge can be written wherever it reads best: beside the nodes it joins, inside
225
+ * a group, inside a `.map`, behind a condition.
226
+ */
227
+ declare function FlowEdge(props: FlowEdgeProps): null;
228
+ export interface FlowGroupProps extends Omit<ViewProps, 'children'> {
229
+ /** Identifies the group, the same way a node's id does. */
230
+ id: string;
231
+ /** Where the container sits. */
232
+ position: FlowNodePosition;
233
+ /** How big the container is. Children are positioned inside it. */
234
+ size: {
235
+ width: number;
236
+ height: number;
237
+ };
238
+ /** Caption drawn along the top edge. */
239
+ label?: string;
240
+ className?: string;
241
+ /** Move the group, and everything in it, with a finger. */
242
+ draggable?: boolean;
243
+ children?: ReactNode;
244
+ }
245
+ /**
246
+ * A container other nodes sit in and travel with.
247
+ *
248
+ * Dragging it offsets every child in the same worklet that moves the group, so
249
+ * a group of twenty nodes costs one frame's work rather than twenty.
250
+ */
251
+ declare function FlowGroup({ id, position, size, label, className, draggable, children, ...props }: FlowGroupProps): import("react").JSX.Element;
252
+ declare namespace FlowGroup {
253
+ var displayName: string;
254
+ }
255
+ export interface FlowControlsProps {
256
+ className?: string;
257
+ /** Show the zoom in and out buttons. */
258
+ zoom?: boolean;
259
+ /** Show the fit-to-graph button. */
260
+ fit?: boolean;
261
+ /** Show the lock, which freezes panning, zooming and dragging together. */
262
+ lock?: boolean;
263
+ /** How much one press of zoom in multiplies the scale by. */
264
+ step?: number;
265
+ }
266
+ /**
267
+ * The button stack in the corner. It sits outside the transformed layer, so it
268
+ * stays put while the canvas moves under it.
269
+ *
270
+ * Worth having even where pinch works: on a phone, pinching to a specific
271
+ * scale is imprecise, and framing the whole graph by hand is worse.
272
+ */
273
+ declare function FlowControls({ className, zoom: showZoom, fit, lock, step, }: FlowControlsProps): import("react").JSX.Element;
274
+ declare namespace FlowControls {
275
+ var displayName: string;
276
+ var slot: FlowSlot;
277
+ }
278
+ export interface FlowMiniMapProps {
279
+ className?: string;
280
+ /** Which corner it sits in. */
281
+ position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
282
+ /** Box size in screen points. */
283
+ width?: number;
284
+ height?: number;
285
+ /** Colour of a node in the map. Defaults to the muted-foreground token. */
286
+ nodeColor?: string;
287
+ }
288
+ /**
289
+ * An overview of the whole graph with the visible region marked on it — for a
290
+ * canvas bigger than the screen, where panning alone loses you.
291
+ *
292
+ * The map's own scale is derived once per frame and shared by every node in it,
293
+ * so N nodes cost one bounds calculation rather than N.
294
+ */
295
+ declare function FlowMiniMap({ className, position, width, height, nodeColor, }: FlowMiniMapProps): import("react").JSX.Element;
296
+ declare namespace FlowMiniMap {
297
+ var displayName: string;
298
+ var slot: FlowSlot;
299
+ }
300
+ export declare const Flow: typeof FlowRoot & {
301
+ Background: typeof FlowBackground;
302
+ Node: typeof FlowNode;
303
+ Handle: typeof FlowHandle;
304
+ Edge: typeof FlowEdge;
305
+ Group: typeof FlowGroup;
306
+ Controls: typeof FlowControls;
307
+ MiniMap: typeof FlowMiniMap;
308
+ };
309
+ export type { FlowSide, FlowRect, FlowPoint };
310
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/flow/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAKL,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AA0BtB,OAAO,EAML,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,QAAQ,EACd,MAAM,iBAAc,CAAC;AA6BtB,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,YAAY,GAAG,MAAM,GAAG,UAAU,CAAC;AAE5E,MAAM,WAAW,YAAY;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,E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AAS,CAAC,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;IACrE,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AASD;;;;;;GAMG;AACH,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,QAAyB,EACzB,KAAW,EACX,MAAW,EACX,SAAS,GACV,EAAE,gBAAgB,+BA+FlB;kBArGQ,WAAW;;;;AAyIpB,eAAO,MAAM,IAAI;;;;;;;;CAQf,CAAC;AAEH,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Form — binds a `useForm` instance to its fields without threading `form`
3
+ * through every one of them by hand.
4
+ *
5
+ * `Form.Field` is a render prop, not a component that clones its child, for
6
+ * the same reason `useField` is a hook and not a wrapper: PanelUI's controls
7
+ * take differently-shaped change props, and only the caller knows which one
8
+ * a given field needs to wire up.
9
+ *
10
+ * `Form`/`Form.Field` trade some type precision for that JSX ergonomics — a
11
+ * field's `name` isn't checked against `keyof YourValues` here, because a
12
+ * value's shape can't flow through `useContext` generically. Reach for
13
+ * `useField(form, name)` directly when a field's name should be checked
14
+ * against the form's own value type.
15
+ *
16
+ * ```tsx
17
+ * const form = useForm({
18
+ * defaultValues: { email: '' },
19
+ * onSubmit: async (values) => { ... },
20
+ * });
21
+ *
22
+ * <Form form={form}>
23
+ * <Form.Field name="email" validate={(value) => (value ? undefined : 'Required')}>
24
+ * {(field) => (
25
+ * <Input
26
+ * label="Email"
27
+ * value={field.value}
28
+ * onChangeText={field.onChange}
29
+ * onBlur={field.onBlur}
30
+ * errorMessage={field.error}
31
+ * />
32
+ * )}
33
+ * </Form.Field>
34
+ * </Form>
35
+ * ```
36
+ */
37
+ import { type ReactNode } from 'react';
38
+ import { useField, type FormFieldRenderProps, type UseFieldOptions } from './use-field.js';
39
+ import { useForm, type FormApi, type FieldErrors, type FieldTouched, type FieldState, type UseFormOptions, type Validator } from './use-form.js';
40
+ export { useForm, useField };
41
+ export type { FormApi, FieldErrors, FieldTouched, FieldState, UseFormOptions, Validator, FormFieldRenderProps, UseFieldOptions, };
42
+ export interface FormProps {
43
+ form: FormApi<any>;
44
+ children?: ReactNode;
45
+ }
46
+ declare function FormRoot({ form, children }: FormProps): import("react").JSX.Element;
47
+ declare namespace FormRoot {
48
+ var displayName: string;
49
+ }
50
+ export interface FormFieldProps {
51
+ name: string;
52
+ validate?: (value: any, values: any) => string | undefined | Promise<string | undefined>;
53
+ /** Runs on blur, and always on submit. `'change'` also validates on every edit. */
54
+ validateOn?: 'blur' | 'change';
55
+ children: (field: FormFieldRenderProps<any>) => ReactNode;
56
+ }
57
+ declare function FormField({ name, validate, validateOn, children }: FormFieldProps): import("react").JSX.Element;
58
+ declare namespace FormField {
59
+ var displayName: string;
60
+ }
61
+ export declare const Form: typeof FormRoot & {
62
+ Field: typeof FormField;
63
+ };
64
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,KAAK,oBAAoB,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAa,CAAC;AACxF,OAAO,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,eAAY,CAAC;AAE9I,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAC7B,YAAY,EACV,OAAO,EACP,WAAW,EACX,YAAY,EACZ,UAAU,EACV,cAAc,EACd,SAAS,EACT,oBAAoB,EACpB,eAAe,GAChB,CAAC;AAIF,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,iBAAS,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,SAAS,+BAE9C;kBAFQ,QAAQ;;;AAKjB,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACzF,mFAAmF;IACnF,UAAU,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC;CAC3D;AAED,iBAAS,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,cAAc,+BAO1E;kBAPQ,SAAS;;;AAUlB,eAAO,MAAM,IAAI;;CAEf,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { FormApi, Validator } from './use-form.js';
2
+ export interface FormFieldRenderProps<V> {
3
+ value: V;
4
+ /** Only set once the field has been touched (blurred, or the form submitted). */
5
+ error?: string;
6
+ touched: boolean;
7
+ onChange: (value: V) => void;
8
+ onBlur: () => void;
9
+ }
10
+ export interface UseFieldOptions<T extends Record<string, any>, K extends keyof T> {
11
+ validate?: Validator<T, K>;
12
+ /** Runs on blur, and always on submit. `'change'` also validates on every edit. */
13
+ validateOn?: 'blur' | 'change';
14
+ }
15
+ export declare function useField<T extends Record<string, any>, K extends keyof T>(form: FormApi<T>, name: K, { validate, validateOn }?: UseFieldOptions<T, K>): FormFieldRenderProps<T[K]>;
16
+ //# sourceMappingURL=use-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-field.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/use-field.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAY,CAAC;AAErD,MAAM,WAAW,oBAAoB,CAAC,CAAC;IACrC,KAAK,EAAE,CAAC,CAAC;IACT,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC;IAC/E,QAAQ,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3B,mFAAmF;IACnF,UAAU,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CAChC;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,EACvE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,IAAI,EAAE,CAAC,EACP,EAAE,QAAQ,EAAE,UAAmB,EAAE,GAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAM,GAC5D,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAgC5B"}
@@ -0,0 +1,37 @@
1
+ export type FieldErrors<T> = Partial<Record<keyof T, string>>;
2
+ export type FieldTouched<T> = Partial<Record<keyof T, boolean>>;
3
+ export type Validator<T extends Record<string, any>, K extends keyof T> = (value: T[K], values: T) => string | undefined | Promise<string | undefined>;
4
+ export interface FieldState<V> {
5
+ value: V;
6
+ error?: string;
7
+ touched: boolean;
8
+ }
9
+ export interface UseFormOptions<T extends Record<string, any>> {
10
+ defaultValues: T;
11
+ /** Whole-form validation, e.g. a rule that compares two fields. Runs on submit. */
12
+ validate?: (values: T) => FieldErrors<T> | Promise<FieldErrors<T>>;
13
+ onSubmit: (values: T) => void | Promise<void>;
14
+ }
15
+ export interface FormApi<T extends Record<string, any>> {
16
+ values: T;
17
+ errors: FieldErrors<T>;
18
+ touched: FieldTouched<T>;
19
+ isSubmitting: boolean;
20
+ /** No field currently carries a validation error. Fields validate on blur and
21
+ * submit, so this does not guarantee an untouched field would pass. */
22
+ isValid: boolean;
23
+ /** `values` differs from `defaultValues`, compared as JSON. */
24
+ isDirty: boolean;
25
+ setFieldValue: <K extends keyof T>(name: K, value: T[K]) => void;
26
+ setFieldTouched: <K extends keyof T>(name: K, touched?: boolean) => void;
27
+ setFieldError: <K extends keyof T>(name: K, error: string | undefined) => void;
28
+ getFieldState: <K extends keyof T>(name: K) => FieldState<T[K]>;
29
+ /** Used by `useField`/`Form.Field` to attach a field's validation rule. */
30
+ registerValidator: <K extends keyof T>(name: K, validator?: Validator<T, K>) => void;
31
+ /** Runs `name`'s registered validator (if any) and records the result. */
32
+ validateField: <K extends keyof T>(name: K) => Promise<boolean>;
33
+ handleSubmit: () => Promise<void>;
34
+ reset: (values?: T) => void;
35
+ }
36
+ export declare function useForm<T extends Record<string, any>>({ defaultValues, validate, onSubmit, }: UseFormOptions<T>): FormApi<T>;
37
+ //# sourceMappingURL=use-form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-form.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/use-form.ts"],"names":[],"mappings":"AA6BA,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AAC9D,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI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AC,CAAC,CAAC,KAAK,IAAI,CAAC;IACjE,eAAe,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,aAAa,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/E,aAAa,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAChE,2EAA2E;IAC3E,iBAAiB,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC;IACrF,0EAA0E;IAC1E,aAAa,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAChE,YAAY,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;CAC7B;AAuDD,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,EACrD,aAAa,EACb,QAAQ,EACR,QAAQ,GACT,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CA0HhC"}
@@ -21,8 +21,14 @@
21
21
  * <Frame.Action>All agents under 25% token limit</Frame.Action>
22
22
  * </Frame.Header>
23
23
  * <Frame.Panel>
24
- * <Frame.Row>…</Frame.Row>
25
- * <Frame.Row>…</Frame.Row>
24
+ * <Frame.Row>
25
+ * <Frame.Media><PackageIcon /></Frame.Media>
26
+ * <Frame.Content>
27
+ * <Frame.Title>opus-4.6</Frame.Title>
28
+ * <Frame.Description>Indexing the repository</Frame.Description>
29
+ * </Frame.Content>
30
+ * <Frame.Actions><Chip>Running</Chip></Frame.Actions>
31
+ * </Frame.Row>
26
32
  * </Frame.Panel>
27
33
  * </Frame>
28
34
  * ```
@@ -30,6 +36,14 @@
30
36
  * The panel draws the hairlines between its own rows. React Native has no
31
37
  * `:first-child`, so the alternative is every caller writing
32
38
  * `divided={index > 0}` on every row and getting it wrong once.
39
+ *
40
+ * A row is three slots, and they exist because of one React Native detail:
41
+ * Yoga defaults `flexShrink` to `0`, the opposite of the web. A child that is
42
+ * not told to shrink never does, so a fourth thing in a row pushes the others
43
+ * past the edge — where the frame's `overflow-hidden` silently cuts them off
44
+ * rather than wrapping or truncating. `Frame.Media` and `Frame.Actions` hold
45
+ * their size, `Frame.Content` takes what is left and is allowed to shrink to
46
+ * nothing, and the row fits at any width without the caller measuring anything.
33
47
  */
34
48
  import { type ReactNode } from 'react';
35
49
  import { View, type PressableProps, type Text as RNText, type ViewProps } from 'react-native';
@@ -51,6 +65,15 @@ export interface FrameHeaderProps extends FrameProps {
51
65
  export interface FrameActionProps extends FrameProps {
52
66
  children?: ReactNode;
53
67
  }
68
+ export interface FrameMediaProps extends FrameProps {
69
+ children?: ReactNode;
70
+ }
71
+ export interface FrameContentProps extends FrameProps {
72
+ children?: ReactNode;
73
+ }
74
+ export interface FrameActionsProps extends FrameProps {
75
+ children?: ReactNode;
76
+ }
54
77
  /**
55
78
  * Marks the parts that take part in the panel's own divider bookkeeping —
56
79
  * a Row draws a line above itself, a Section draws one above its heading.
@@ -76,6 +99,17 @@ export interface FrameRowProps extends Omit<PressableProps, 'children'>, Dividab
76
99
  divided?: boolean;
77
100
  /** Trailing chevron marking the row as leading somewhere. */
78
101
  chevron?: boolean;
102
+ /**
103
+ * Let the row run onto a second line instead of holding one. For a cluster
104
+ * of chips or tags, where the alternative is the last ones being clipped.
105
+ */
106
+ wrap?: boolean;
107
+ /**
108
+ * Where the row's slots sit against each other. `start` for a row two or
109
+ * three lines tall, where centring an icon against a tall text column leaves
110
+ * it floating in the middle.
111
+ */
112
+ align?: 'center' | 'start';
79
113
  children?: ReactNode;
80
114
  }
81
115
  export interface FrameSectionProps extends FrameProps, Dividable {
@@ -92,6 +126,9 @@ export declare const Frame: import("react").ForwardRefExoticComponent<FrameRootP
92
126
  Panel: import("react").ForwardRefExoticComponent<FramePanelProps & import("react").RefAttributes<View>>;
93
127
  Section: import("react").ForwardRefExoticComponent<FrameSectionProps & import("react").RefAttributes<View>>;
94
128
  Row: import("react").ForwardRefExoticComponent<FrameRowProps & import("react").RefAttributes<View>>;
129
+ Media: import("react").ForwardRefExoticComponent<FrameMediaProps & import("react").RefAttributes<View>>;
130
+ Content: import("react").ForwardRefExoticComponent<FrameContentProps & import("react").RefAttributes<View>>;
131
+ Actions: import("react").ForwardRefExoticComponent<FrameActionsProps & import("react").RefAttributes<View>>;
95
132
  };
96
133
  export {};
97
134
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/frame/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAsD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3F,OAAO,EAEL,IAAI,EACJ,KAAK,cAAc,EACnB,KAAK,IAAI,IAAI,MAAM,EACnB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AA+B7D,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,OAAO,CAAC;AAE/C,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,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