panelui-native 0.13.0 → 0.14.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 (91) hide show
  1. package/README.md +39 -23
  2. package/lib/module/components/button/index.js +12 -9
  3. package/lib/module/components/button/index.js.map +1 -1
  4. package/lib/module/components/chip/index.js +313 -0
  5. package/lib/module/components/chip/index.js.map +1 -0
  6. package/lib/module/components/frame/index.js +41 -39
  7. package/lib/module/components/frame/index.js.map +1 -1
  8. package/lib/module/components/heatmap-chart/index.js +772 -0
  9. package/lib/module/components/heatmap-chart/index.js.map +1 -0
  10. package/lib/module/components/input/index.js +4 -0
  11. package/lib/module/components/input/index.js.map +1 -1
  12. package/lib/module/components/scroll-canvas/index.js +175 -0
  13. package/lib/module/components/scroll-canvas/index.js.map +1 -0
  14. package/lib/module/components/scroll-text/index.js +213 -0
  15. package/lib/module/components/scroll-text/index.js.map +1 -0
  16. package/lib/module/components/select/index.js +20 -24
  17. package/lib/module/components/select/index.js.map +1 -1
  18. package/lib/module/components/slider/index.js +2 -5
  19. package/lib/module/components/slider/index.js.map +1 -1
  20. package/lib/module/components/switch/index.js +15 -17
  21. package/lib/module/components/switch/index.js.map +1 -1
  22. package/lib/module/components/thinking-orb/index.js +741 -0
  23. package/lib/module/components/thinking-orb/index.js.map +1 -0
  24. package/lib/module/components/toggle-button/index.js +12 -3
  25. package/lib/module/components/toggle-button/index.js.map +1 -1
  26. package/lib/module/hooks/index.js +1 -0
  27. package/lib/module/hooks/index.js.map +1 -1
  28. package/lib/module/hooks/use-keyboard-avoidance.js +99 -59
  29. package/lib/module/hooks/use-keyboard-avoidance.js.map +1 -1
  30. package/lib/module/hooks/use-reveal-progress.js +75 -0
  31. package/lib/module/hooks/use-reveal-progress.js.map +1 -0
  32. package/lib/module/index.js +6 -0
  33. package/lib/module/index.js.map +1 -1
  34. package/lib/module/native/index.js.map +1 -1
  35. package/lib/module/primitives/keyboard-avoider.js +21 -2
  36. package/lib/module/primitives/keyboard-avoider.js.map +1 -1
  37. package/lib/module/primitives/scroll-progress.js +114 -0
  38. package/lib/module/primitives/scroll-progress.js.map +1 -0
  39. package/lib/typescript/src/components/button/index.d.ts +3 -4
  40. package/lib/typescript/src/components/button/index.d.ts.map +1 -1
  41. package/lib/typescript/src/components/chip/index.d.ts +304 -0
  42. package/lib/typescript/src/components/chip/index.d.ts.map +1 -0
  43. package/lib/typescript/src/components/frame/index.d.ts +15 -13
  44. package/lib/typescript/src/components/frame/index.d.ts.map +1 -1
  45. package/lib/typescript/src/components/heatmap-chart/index.d.ts +260 -0
  46. package/lib/typescript/src/components/heatmap-chart/index.d.ts.map +1 -0
  47. package/lib/typescript/src/components/input/index.d.ts +19 -4
  48. package/lib/typescript/src/components/input/index.d.ts.map +1 -1
  49. package/lib/typescript/src/components/scroll-canvas/index.d.ts +66 -0
  50. package/lib/typescript/src/components/scroll-canvas/index.d.ts.map +1 -0
  51. package/lib/typescript/src/components/scroll-text/index.d.ts +46 -0
  52. package/lib/typescript/src/components/scroll-text/index.d.ts.map +1 -0
  53. package/lib/typescript/src/components/select/index.d.ts.map +1 -1
  54. package/lib/typescript/src/components/slider/index.d.ts.map +1 -1
  55. package/lib/typescript/src/components/switch/index.d.ts.map +1 -1
  56. package/lib/typescript/src/components/thinking-orb/index.d.ts +28 -0
  57. package/lib/typescript/src/components/thinking-orb/index.d.ts.map +1 -0
  58. package/lib/typescript/src/components/toggle-button/index.d.ts +12 -0
  59. package/lib/typescript/src/components/toggle-button/index.d.ts.map +1 -1
  60. package/lib/typescript/src/hooks/index.d.ts +2 -1
  61. package/lib/typescript/src/hooks/index.d.ts.map +1 -1
  62. package/lib/typescript/src/hooks/use-keyboard-avoidance.d.ts +16 -3
  63. package/lib/typescript/src/hooks/use-keyboard-avoidance.d.ts.map +1 -1
  64. package/lib/typescript/src/hooks/use-reveal-progress.d.ts +56 -0
  65. package/lib/typescript/src/hooks/use-reveal-progress.d.ts.map +1 -0
  66. package/lib/typescript/src/index.d.ts +6 -0
  67. package/lib/typescript/src/index.d.ts.map +1 -1
  68. package/lib/typescript/src/native/index.d.ts +15 -7
  69. package/lib/typescript/src/native/index.d.ts.map +1 -1
  70. package/lib/typescript/src/primitives/keyboard-avoider.d.ts +30 -3
  71. package/lib/typescript/src/primitives/keyboard-avoider.d.ts.map +1 -1
  72. package/lib/typescript/src/primitives/scroll-progress.d.ts +61 -0
  73. package/lib/typescript/src/primitives/scroll-progress.d.ts.map +1 -0
  74. package/package.json +1 -1
  75. package/src/components/button/index.tsx +13 -11
  76. package/src/components/frame/index.tsx +39 -50
  77. package/src/components/heatmap-chart/index.tsx +1024 -0
  78. package/src/components/input/index.tsx +23 -4
  79. package/src/components/scroll-canvas/index.tsx +220 -0
  80. package/src/components/scroll-text/index.tsx +277 -0
  81. package/src/components/select/index.tsx +4 -9
  82. package/src/components/slider/index.tsx +4 -7
  83. package/src/components/switch/index.tsx +5 -8
  84. package/src/components/thinking-orb/index.tsx +792 -0
  85. package/src/hooks/index.ts +6 -0
  86. package/src/hooks/use-keyboard-avoidance.ts +111 -65
  87. package/src/hooks/use-reveal-progress.ts +106 -0
  88. package/src/index.ts +38 -0
  89. package/src/native/index.ts +15 -7
  90. package/src/primitives/keyboard-avoider.tsx +41 -4
  91. package/src/primitives/scroll-progress.tsx +167 -0
@@ -0,0 +1,260 @@
1
+ /**
2
+ * HeatmapChart — a calendar of bins, shaded by how much happened in each.
3
+ *
4
+ * The contribution grid: one column per period (usually a week), one row per
5
+ * bin inside it (usually a weekday), and a colour ramp carrying the count. It
6
+ * answers "when was this busy" at a glance, which no line can — a year of daily
7
+ * numbers plotted as a series is a hairball, and as a grid it is a pattern.
8
+ *
9
+ * Composed rather than configured, so a chart that wants no axis simply does
10
+ * not have one:
11
+ *
12
+ * ```tsx
13
+ * <HeatmapChart data={weeks}>
14
+ * <HeatmapChart.YAxis />
15
+ * <HeatmapChart.XAxis />
16
+ * <HeatmapChart.Cells />
17
+ * <HeatmapChart.Tooltip />
18
+ * <HeatmapChart.Legend />
19
+ * </HeatmapChart>
20
+ * ```
21
+ *
22
+ * The parts sort themselves into a real layout rather than stacking over the
23
+ * plot. That is the difference from a line chart, where the axis floats over
24
+ * the drawing: here the labels and the legend sit *beside* and *below* the
25
+ * grid, so they take up room, and the grid is sized with them accounted for.
26
+ * Only the cells and the rules between them are SVG; every label is a React
27
+ * Native view, because SVG text ignores the platform's text scaling and the
28
+ * theme's font.
29
+ *
30
+ * The ramp is one colour at five opacities rather than five colours. A heatmap
31
+ * reads as *more* and *less* of one thing, and five distinct hues read as five
32
+ * different things — which is what the `--color-chart-*` tokens are for, and
33
+ * why they are not used here. The base is `--color-chart-1`, so the ramp
34
+ * follows the theme, and `levelColors` replaces it outright when a brand needs
35
+ * its own.
36
+ */
37
+ import { type ReactNode } from 'react';
38
+ import { View, type ViewProps } from 'react-native';
39
+ /**
40
+ * Where a part belongs in the layout. Read off the component itself, so
41
+ * composition stays a flat list of children instead of four nested slots the
42
+ * caller has to remember the order of.
43
+ */
44
+ type Slot = 'cells' | 'x-axis' | 'y-axis' | 'rules' | 'tooltip' | 'legend';
45
+ export type HeatmapLayout = 'fluid' | 'fill';
46
+ /** One bin inside a column — usually a single day. */
47
+ export interface HeatmapBin {
48
+ /** Row index within the column, `0` to `6`. */
49
+ bin: number;
50
+ /** How much happened. The ramp is derived from these across the whole chart. */
51
+ count: number;
52
+ /** The day this bin stands for. Used by the axis labels and the tooltip. */
53
+ date?: Date;
54
+ }
55
+ /** One column — usually a week. Missing bins are drawn as empty cells. */
56
+ export interface HeatmapColumn {
57
+ /** Column index across the chart. */
58
+ bin: number;
59
+ bins: HeatmapBin[];
60
+ }
61
+ /** A cell resolved to its place in the grid, as the tooltip receives it. */
62
+ export interface HeatmapCell {
63
+ column: number;
64
+ row: number;
65
+ count: number;
66
+ level: number;
67
+ date?: Date;
68
+ }
69
+ /**
70
+ * The cell under the finger, for something rendered *inside* the chart. A
71
+ * readout in the card's header is outside this provider — use
72
+ * `onActiveCellChange` for that.
73
+ */
74
+ export declare function useHeatmapChart(): {
75
+ activeCell: HeatmapCell | null;
76
+ };
77
+ /**
78
+ * Build a year of columns from a flat list of dated counts.
79
+ *
80
+ * Every heatmap starts as "I have some dates and some numbers", and the
81
+ * bucketing into weeks is the same arithmetic every time — including the two
82
+ * parts that are easy to get wrong: the leading blanks before the first day of
83
+ * the first week, and days with no entry at all, which must still be drawn as
84
+ * empty cells or the calendar develops holes.
85
+ */
86
+ export declare function buildHeatmapCalendar(entries: {
87
+ date: Date;
88
+ count: number;
89
+ }[], options?: {
90
+ start?: Date;
91
+ end?: Date;
92
+ weekStartDay?: number;
93
+ }): HeatmapColumn[];
94
+ export interface HeatmapChartProps extends ViewProps {
95
+ className?: string;
96
+ /** One column per period, with its row bins inside. */
97
+ data: HeatmapColumn[];
98
+ /**
99
+ * `fluid` draws cells at `binSize` and lets the grid be as wide as it needs
100
+ * to be — put it in a horizontal `ScrollView` for a full year. `fill`
101
+ * divides the available width between the columns instead.
102
+ */
103
+ layout?: HeatmapLayout;
104
+ /** Side of one cell in `fluid` layout, in pixels. */
105
+ binSize?: number;
106
+ /** Space between cells, in pixels. */
107
+ gap?: number;
108
+ /** Corner radius of a cell. */
109
+ cornerRadius?: number;
110
+ /** Which weekday is the top row. `0` is Sunday. Labels follow it. */
111
+ weekStartDay?: number;
112
+ /**
113
+ * Rows per column. Seven for a calendar; use another number for a band that
114
+ * is not a week — twenty-four for hours, one for an uptime strip.
115
+ */
116
+ rows?: number;
117
+ /**
118
+ * The four counts at which the ramp steps up. Derived from the data's own
119
+ * quartiles when omitted, so a chart of single digits and a chart of
120
+ * thousands both use the whole ramp.
121
+ */
122
+ levels?: number[];
123
+ /**
124
+ * Five colours — empty, then the four activity levels. Replaces the derived
125
+ * ramp outright. Omit it and the ramp is `--color-chart-1` at five
126
+ * opacities, which follows the theme.
127
+ */
128
+ levelColors?: string[];
129
+ /** Base colour for the derived ramp. Defaults to the `--color-chart-1` token. */
130
+ color?: string;
131
+ /** Milliseconds for the reveal on mount. */
132
+ animationDuration?: number;
133
+ /** Opacity of every cell that is not the one under the finger. */
134
+ inactiveOpacity?: number;
135
+ /**
136
+ * The cell under the finger as it moves, and `null` when it lifts. This is
137
+ * how a readout above the chart gets its value — that readout is outside the
138
+ * chart, so it cannot use `useHeatmapChart`.
139
+ */
140
+ onActiveCellChange?: (cell: HeatmapCell | null) => void;
141
+ children?: ReactNode;
142
+ }
143
+ export interface HeatmapCellsProps {
144
+ /** Corner radius of a cell. Falls back to the chart's. */
145
+ cornerRadius?: number;
146
+ }
147
+ /**
148
+ * The grid itself. Every row of every column is drawn, including the ones with
149
+ * nothing in them — a calendar with holes in it stops being a calendar.
150
+ */
151
+ declare function HeatmapCells({ cornerRadius }: HeatmapCellsProps): import("react").JSX.Element;
152
+ declare namespace HeatmapCells {
153
+ var slot: Slot;
154
+ }
155
+ export interface HeatmapSeparatorProps {
156
+ /**
157
+ * `quarter` draws a rule every thirteen columns; a number draws one every
158
+ * that many columns.
159
+ */
160
+ every?: 'quarter' | number;
161
+ color?: string;
162
+ /** Dash pattern, e.g. `"2,4"`. Omit for a solid rule. */
163
+ dashArray?: string;
164
+ }
165
+ /** Vertical rules grouping the columns — quarters, months, sprints. */
166
+ declare function HeatmapSeparator({ every, color, dashArray }: HeatmapSeparatorProps): import("react").JSX.Element | null;
167
+ declare namespace HeatmapSeparator {
168
+ var slot: Slot;
169
+ }
170
+ export interface HeatmapXAxisProps {
171
+ className?: string;
172
+ /**
173
+ * Label a column. Given the first dated bin in it, so a month name can be
174
+ * derived. Return an empty string to leave the column unlabelled.
175
+ */
176
+ formatLabel?: (date: Date, column: number) => string;
177
+ }
178
+ /**
179
+ * Month labels above the grid.
180
+ *
181
+ * A label is emitted where the month changes rather than at a fixed interval,
182
+ * because months are not the same length — spacing them evenly puts "Mar" over
183
+ * a week in February.
184
+ */
185
+ declare function HeatmapXAxis({ className, formatLabel }: HeatmapXAxisProps): import("react").JSX.Element;
186
+ declare namespace HeatmapXAxis {
187
+ var slot: Slot;
188
+ }
189
+ export interface HeatmapYAxisProps {
190
+ className?: string;
191
+ /** Width reserved for the labels. The grid is sized around it. */
192
+ width?: number;
193
+ /** Which rows get a label. Every other row is the usual choice. */
194
+ tickFilter?: 'all' | 'odd' | 'even';
195
+ /** `initial` is the single letter; `full` is the abbreviated name. */
196
+ labelFormat?: 'initial' | 'full';
197
+ /**
198
+ * Row labels, top to bottom. Overrides the weekday names — for a grid whose
199
+ * rows are not days.
200
+ */
201
+ labels?: string[];
202
+ }
203
+ /** Weekday labels down the left of the grid. */
204
+ declare function HeatmapYAxis({ className, width, tickFilter, labelFormat, labels, }: HeatmapYAxisProps): import("react").JSX.Element;
205
+ declare namespace HeatmapYAxis {
206
+ var slot: Slot;
207
+ }
208
+ export interface HeatmapTooltipProps {
209
+ className?: string;
210
+ /** The line shown for a cell. Defaults to the count and the date. */
211
+ formatLabel?: (cell: HeatmapCell) => string;
212
+ /**
213
+ * How long a press has to be held before the readout takes over, in
214
+ * milliseconds.
215
+ *
216
+ * It is not zero, and cannot be: a full year of columns lives inside a
217
+ * horizontal scroller, and a readout that claims the touch on the first pixel
218
+ * of movement means the chart can never be scrolled. Holding first is what
219
+ * separates "I am moving the chart" from "I am reading it". Set `0` only for
220
+ * a chart that is not inside a scroll view at all.
221
+ */
222
+ activateAfterLongPress?: number;
223
+ }
224
+ /**
225
+ * A readout following the finger across the grid.
226
+ *
227
+ * It lives in the view layer, over the SVG: a gesture handler cannot be
228
+ * attached to an SVG node, and SVG text ignores the platform's text scaling.
229
+ * The cell under the finger is resolved on the UI thread and only crosses back
230
+ * into JS when it changes, so a drag across a year costs a handful of
231
+ * re-renders rather than one per frame.
232
+ */
233
+ declare function HeatmapTooltip({ className, formatLabel, activateAfterLongPress, }: HeatmapTooltipProps): import("react").JSX.Element;
234
+ declare namespace HeatmapTooltip {
235
+ var slot: Slot;
236
+ }
237
+ export interface HeatmapLegendProps {
238
+ className?: string;
239
+ /** Text at the low end of the ramp. */
240
+ lessLabel?: string;
241
+ /** Text at the high end. */
242
+ moreLabel?: string;
243
+ /** Side of a swatch, in pixels. Defaults to the chart's cell size. */
244
+ swatchSize?: number;
245
+ }
246
+ /** The `Less ▢▢▢▢▢ More` key, under the grid. */
247
+ declare function HeatmapLegend({ className, lessLabel, moreLabel, swatchSize, }: HeatmapLegendProps): import("react").JSX.Element;
248
+ declare namespace HeatmapLegend {
249
+ var slot: Slot;
250
+ }
251
+ export declare const HeatmapChart: import("react").ForwardRefExoticComponent<HeatmapChartProps & import("react").RefAttributes<View>> & {
252
+ Cells: typeof HeatmapCells;
253
+ Separator: typeof HeatmapSeparator;
254
+ XAxis: typeof HeatmapXAxis;
255
+ YAxis: typeof HeatmapYAxis;
256
+ Tooltip: typeof HeatmapTooltip;
257
+ Legend: typeof HeatmapLegend;
258
+ };
259
+ export {};
260
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/heatmap-chart/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,EAUL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAc,IAAI,EAA0B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAuExF;;;;GAIG;AACH,KAAK,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE3E,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,CAAC;AAE7C,sDAAsD;AACtD,MAAM,WAAW,UAAU;IACzB,+CAA+C;IAC/C,GAAG,EAAE,MAAM,CAAC;IACZ,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAED,0EAA0E;AAC1E,MAAM,WAAW,aAAa;IA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AS,GAAG,MAAM,CAAC;IACjC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,gDAAgD;AAChD,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,KAA0B,EAC1B,UAAkB,EAClB,WAAoB,EACpB,MAAM,GACP,EAAE,iBAAiB,+BAiCnB;kBAvCQ,YAAY;;;AA8CrB,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,CAAC;IAC5C;;;;;;;;;OASG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;;;;;;;GAQG;AACH,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,WAAW,EACX,sBAAqC,GACtC,EAAE,mBAAmB,+BAuGrB;kBA3GQ,cAAc;;;AAyHvB,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,iDAAiD;AACjD,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,SAAkB,EAClB,SAAkB,EAClB,UAAU,GACX,EAAE,kBAAkB,+BA6BpB;kBAlCQ,aAAa;;;AAqCtB,eAAO,MAAM,YAAY;;;;;;;CAOvB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { TextInput, type TextInputProps } from 'react-native';
2
2
  import { type VariantProps } from 'tailwind-variants';
3
+ import type { KeyboardAvoidanceMode } from '../../hooks/use-keyboard-avoidance.js';
3
4
  declare const inputVariants: import("tailwind-variants").TVReturnType<{
4
5
  variant: {
5
6
  outline: {
@@ -118,9 +119,11 @@ export interface InputProps extends TextInputProps, Omit<InputVariantProps, 'dis
118
119
  isRequired?: boolean;
119
120
  disabled?: boolean;
120
121
  /**
121
- * Lift the field above the software keyboard when it would otherwise be
122
- * covered. Moves by exactly the overlap, and not at all when the field is
123
- * already clear — or when the keyboard belongs to a different field.
122
+ * Keep the field clear of the software keyboard. Moves by exactly the
123
+ * overlap, and not at all when the field is already clear — or when the
124
+ * keyboard belongs to a different field. The overlap is re-read every frame
125
+ * while the field is focused, so the field keeps its place in the page as it
126
+ * scrolls under and back out of the keyboard.
124
127
  *
125
128
  * Install `react-native-keyboard-controller` for this to behave on Android.
126
129
  *
@@ -128,8 +131,20 @@ export interface InputProps extends TextInputProps, Omit<InputVariantProps, 'dis
128
131
  * container, which would remount the field and drop focus.
129
132
  */
130
133
  avoidKeyboard?: boolean;
131
- /** Gap kept between the field and the keyboard when `avoidKeyboard` is set. */
134
+ /**
135
+ * How the field gets clear. `lift` moves it up by its overlap and follows
136
+ * the scroll — right for a field in the flow of a page. `dock` makes it
137
+ * travel with the keyboard, for a composer already pinned near the bottom
138
+ * edge; pair it with `keyboardBottomInset`.
139
+ */
140
+ keyboardMode?: KeyboardAvoidanceMode;
141
+ /** Gap kept between the field and the keyboard. `keyboardMode="lift"` only. */
132
142
  keyboardOffset?: number;
143
+ /**
144
+ * How far above the bottom edge the field already sits — usually the safe
145
+ * area inset. `keyboardMode="dock"` only.
146
+ */
147
+ keyboardBottomInset?: number;
133
148
  }
134
149
  export declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<TextInput>>;
135
150
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/input/index.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,SAAS,EAAQ,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAOpE,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAS1D,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC,iBAAiB,EAAE,UAAU,GAAG,WAAW,CAAC;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+EAA+E;IAC/E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;;;;;OAWG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,qBAAqB,CAAC;IACrC,+EAA+E;IAC/E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAID,eAAO,MAAM,KAAK,kGAgJjB,CAAC"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * ScrollCanvas — an image frame whose contents move as you scroll past it.
3
+ *
4
+ * The counterpart to `ScrollText`: same scrubbed reveal, applied to a picture
5
+ * instead of a sentence. The frame stays where the layout puts it and the image
6
+ * moves *inside* it, which is what separates a parallax from a thing sliding
7
+ * about the page.
8
+ *
9
+ * ```tsx
10
+ * <ScrollProgress>
11
+ * <ScrollView>
12
+ * <ScrollCanvas source={{ uri }} effect="parallax" />
13
+ * </ScrollView>
14
+ * </ScrollProgress>
15
+ * ```
16
+ *
17
+ * Four effects, and they are four different jobs:
18
+ *
19
+ * - **`parallax`** — the image drifts against the scroll, so the frame reads as
20
+ * a window onto something further away.
21
+ * - **`zoom`** — it settles from slightly oversized to its natural size.
22
+ * - **`reveal`** — a wipe uncovers it from the bottom edge up.
23
+ * - **`sequence`** — the scroll position picks a frame out of a series, so the
24
+ * reader scrubs an animation with their thumb.
25
+ *
26
+ * "Canvas" here is the frame the pictures move behind, not a drawing surface —
27
+ * nothing is rasterised, and there is no `<canvas>` anywhere near it.
28
+ */
29
+ import { type ImageSourcePropType, type ViewProps } from 'react-native';
30
+ import { type SharedValue } from 'react-native-reanimated';
31
+ export type ScrollCanvasEffect = 'parallax' | 'zoom' | 'reveal' | 'sequence';
32
+ export interface ScrollCanvasProps extends Omit<ViewProps, 'children'> {
33
+ className?: string;
34
+ /** The image. Ignored by `sequence`, which reads `sources` instead. */
35
+ source?: ImageSourcePropType;
36
+ /**
37
+ * The frames a `sequence` scrubs through, in order. Keep it to a couple of
38
+ * dozen — every frame is a decoded bitmap held in memory for the whole time
39
+ * the canvas is mounted.
40
+ */
41
+ sources?: ImageSourcePropType[];
42
+ /** Which of the four scroll effects to apply. */
43
+ effect?: ScrollCanvasEffect;
44
+ /** Width ÷ height of the frame. */
45
+ aspectRatio?: number;
46
+ /** Multiplier on how far the effect travels. */
47
+ distance?: number;
48
+ /**
49
+ * Where down the viewport the frame's top sits when the effect starts, as a
50
+ * fraction of the viewport height.
51
+ */
52
+ start?: number;
53
+ /** Where its bottom sits when the effect completes. Smaller is a longer scrub. */
54
+ end?: number;
55
+ /** Drive the effect from a value of your own rather than from scroll. */
56
+ progress?: SharedValue<number>;
57
+ /** Set false to render the image plainly. */
58
+ enabled?: boolean;
59
+ /** Extra classes for the image itself, rather than the frame around it. */
60
+ imageClassName?: string;
61
+ }
62
+ export declare function ScrollCanvas({ className, imageClassName, source, sources, effect, aspectRatio, distance, start, end, progress: external, enabled, style, ...props }: ScrollCanvasProps): import("react").JSX.Element;
63
+ export declare namespace ScrollCanvas {
64
+ var displayName: string;
65
+ }
66
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/scroll-canvas/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EAAe,KAAK,mBAAmB,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACrF,OAAiB,EAIf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAkBjC,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE7E,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B;;;;OAIG;IACH,OAAO,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAChC,iDAAiD;IACjD,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC/B,6CAA6C;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2EAA2E;IAC3E,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,cAAc,EACd,MAAM,EACN,OAAO,EACP,MAAmB,EACnB,WAAqB,EACrB,QAAY,EACZ,KAAS,EACT,GAAS,EACT,QAAQ,EAAE,QAAQ,EAClB,OAAc,EACd,KAAK,EACL,GAAG,KAAK,EACT,EAAE,iBAAiB,+BAkFnB;yBAhGe,YAAY"}
@@ -0,0 +1,46 @@
1
+ import { type SharedValue } from 'react-native-reanimated';
2
+ import { type TextProps } from '../../primitives/text.js';
3
+ export type ScrollTextEffect = 'color' | 'fade' | 'rise' | 'highlight';
4
+ export type ScrollTextSplit = 'word' | 'character';
5
+ export interface ScrollTextProps extends Omit<TextProps, 'children'> {
6
+ className?: string;
7
+ /** The sentence. Split into words or characters, then revealed across them. */
8
+ children?: string;
9
+ /**
10
+ * `color` crossfades each word between two colours, `fade` brings it up from
11
+ * transparent, `rise` lifts it into place, `highlight` sweeps a background
12
+ * behind it.
13
+ */
14
+ effect?: ScrollTextEffect;
15
+ /** Reveal a word at a time, or a character at a time. */
16
+ by?: ScrollTextSplit;
17
+ /** Colour before a word is reached. Defaults to the muted foreground token. */
18
+ from?: string;
19
+ /** Colour once it has been. Defaults to the foreground token. */
20
+ to?: string;
21
+ /**
22
+ * Where down the viewport the block's top sits when the reveal starts, as a
23
+ * fraction of the viewport height.
24
+ */
25
+ start?: number;
26
+ /** Where its bottom sits when the reveal completes. Smaller is a longer scrub. */
27
+ end?: number;
28
+ /**
29
+ * How much of the whole reveal a single word takes, `0` to `1`. Small values
30
+ * make a hard edge travelling along the line; large ones make the whole
31
+ * sentence brighten together.
32
+ */
33
+ stagger?: number;
34
+ /**
35
+ * Drive the reveal from a value of your own rather than from scroll — a
36
+ * progress bar, a gesture, a timeline.
37
+ */
38
+ progress?: SharedValue<number>;
39
+ /** Set false to render the text resolved, with no effect at all. */
40
+ enabled?: boolean;
41
+ }
42
+ export declare function ScrollText({ className, children, effect, by, from, to, start, end, stagger, progress: external, enabled, ...textProps }: ScrollTextProps): import("react").JSX.Element;
43
+ export declare namespace ScrollText {
44
+ var displayName: string;
45
+ }
46
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/scroll-text/index.tsx"],"names":[],"mappings":"AA+BA,OAAiB,EAKf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAO7D,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC;AACvE,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,WAAW,CAAC;AAKnD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,yDAAyD;IACzD,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC/B,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,QAAa,EACb,MAAgB,EAChB,EAAW,EACX,IAAI,EACJ,EAAE,EACF,KAAW,EACX,GAAS,EACT,OAAc,EACd,QAAQ,EAAE,QAAQ,EAClB,OAAc,EACd,GAAG,SAAS,EACb,EAAE,eAAe,+BAoEjB;yBAjFe,UAAU"}
@@ -1 +1 @@
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;AAsDf,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAiBhE,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;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;IAC9C,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;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,+BA8Nb;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;AAsDf,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;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;IAC9C,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/slider/index.tsx"],"names":[],"mappings":"AAuB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AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,8FAkDlB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/switch/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,IAAI,EAAE,MAAM,cAAc,CAAC;AAO/C,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAK1D,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAkBlB,CAAC;AAIH,MAAM,WAAW,WAAY,SAAQ,YAAY,CAAC,OAAO,cAAc,CAAC;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,8FAsDlB,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { type ViewProps } from 'react-native';
2
+ export type ThinkingOrbState = 'working' | 'searching' | 'solving' | 'listening' | 'composing' | 'shaping';
3
+ export interface ThinkingOrbProps extends Omit<ViewProps, 'children'> {
4
+ className?: string;
5
+ /** Which of the six animations to show. */
6
+ state?: ThinkingOrbState;
7
+ /**
8
+ * Side of the orb in pixels.
9
+ *
10
+ * Two tunings ship, and they are separate designs rather than one scaled:
11
+ * at or below 32 the orb switches to far fewer, proportionally much larger
12
+ * dots moving faster, because a faithful lattice at that size is grey mush.
13
+ */
14
+ size?: number;
15
+ /** Multiplier on the state's own speed. */
16
+ speed?: number;
17
+ /** Freeze on the current frame. */
18
+ paused?: boolean;
19
+ /** Ink colour. Defaults to the theme's foreground, so the orb inverts with it. */
20
+ color?: string;
21
+ /** Overrides the per-state default announced to screen readers. */
22
+ accessibilityLabel?: string;
23
+ }
24
+ export declare function ThinkingOrb({ className, state, size, speed, paused, color, accessibilityLabel, style, ...props }: ThinkingOrbProps): import("react").JSX.Element;
25
+ export declare namespace ThinkingOrb {
26
+ var displayName: string;
27
+ }
28
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/thinking-orb/index.tsx"],"names":[],"mappings":"AAiCA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAiCpD,MAAM,MAAM,gBAAgB,GACxB,SAAS,GACT,WAAW,GACX,SAAS,GACT,WAAW,GACX,WAAW,GACX,SAAS,CAAC;AAgnBd,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,KAAiB,EACjB,IAAS,EACT,KAAS,EACT,MAAc,EACd,KAAK,EACL,kBAAkB,EAClB,KAAK,EACL,GAAG,KAAK,EACT,EAAE,gBAAgB,+BA6DlB;yBAvEe,WAAW"}
@@ -192,6 +192,12 @@ export interface ToggleButtonGroupProps extends ViewProps {
192
192
  /** Applied to every button that does not set its own. */
193
193
  variant?: ToggleButtonVariant;
194
194
  size?: ToggleButtonSize;
195
+ /**
196
+ * A tick under the finger each time a button is pressed. Off by default —
197
+ * needs the optional `expo-haptics`, and is silent without it. Inherited by
198
+ * every button that does not set its own.
199
+ */
200
+ haptics?: boolean;
195
201
  children: ReactNode;
196
202
  }
197
203
  declare const ToggleButtonGroup: import("react").ForwardRefExoticComponent<ToggleButtonGroupProps & import("react").RefAttributes<View>>;
@@ -217,6 +223,12 @@ export interface ToggleButtonProps extends Omit<AnimatedPressableProps, 'childre
217
223
  defaultSelected?: boolean;
218
224
  onSelectedChange?: (selected: boolean) => void;
219
225
  disabled?: boolean;
226
+ /**
227
+ * A tick under the finger each time the button is pressed. Off by default —
228
+ * needs the optional `expo-haptics`, and is silent without it. Inside a
229
+ * group, falls back to the group's `haptics`.
230
+ */
231
+ haptics?: boolean;
220
232
  /** Square, with no horizontal padding — for a single icon. */
221
233
  iconOnly?: boolean;
222
234
  /** Extra classes applied only while selected. */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/toggle-button/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,wCAAqC,CAAC;AAI7C,QAAA,MAAM,cAAc;;QAOd,0EAA0E;;;;QAE1E,4EAA4E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAF5E,0EAA0E;;;;QAE1E,4EAA4E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAF5E,0EAA0E;;;;QAE1E,4EAA4E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CA6BhF,CAAC;AAEH,KAAK,kBAAkB,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AU,GAAG,UAAU,CAAC,EAC3D,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;IAChE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2EAA2E;IAC3E,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4DAA4D;IAC5D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mDAAmD;IACnD,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AA4GD,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;GAIG;AACH,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,sBAAsB,+BAczE;kBAdQ,iBAAiB;;;AAiB1B,eAAO,MAAM,YAAY;;CAEvB,CAAC;AAEH,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
@@ -2,7 +2,8 @@ export { useCopyToClipboard, type UseCopyToClipboardOptions, type UseCopyToClipb
2
2
  export { useDisclosure, type UseDisclosureOptions, type UseDisclosureResult, } from './use-disclosure.js';
3
3
  export { useBreakpoint, BREAKPOINTS, type Breakpoint, type UseBreakpointResult, } from './use-breakpoint.js';
4
4
  export { useKeyboard, type UseKeyboardResult } from './use-keyboard.js';
5
- export { useKeyboardAvoidance, type UseKeyboardAvoidanceOptions, type UseKeyboardAvoidanceResult, } from './use-keyboard-avoidance.js';
5
+ export { useKeyboardAvoidance, type KeyboardAvoidanceMode, type UseKeyboardAvoidanceOptions, type UseKeyboardAvoidanceResult, } from './use-keyboard-avoidance.js';
6
+ export { useRevealProgress, type UseRevealProgressOptions, type UseRevealProgressResult, } from './use-reveal-progress.js';
6
7
  export { useScrollSections, type UseScrollSectionsOptions, type UseScrollSectionsResult, } from './use-scroll-sections.js';
7
8
  export { useDebouncedValue } from './use-debounced-value.js';
8
9
  export { usePrevious } from './use-previous.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,GAC9B,MAAM,4BAAyB,CAAC;AACjC,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,qBAAkB,CAAC;AAC1B,OAAO,EACL,aAAa,EACb,WAAW,EACX,KAAK,UAAU,EACf,KAAK,mBAAmB,GACzB,MAAM,qBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,mBAAgB,CAAC;AACrE,OAAO,EACL,oBAAoB,EACpB,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,GAChC,MAAM,6BAA0B,CAAC;AAClC,OAAO,EACL,iBAAiB,EACjB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,0BAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAAuB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,GAC9B,MAAM,4BAAyB,CAAC;AACjC,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,qBAAkB,CAAC;AAC1B,OAAO,EACL,aAAa,EACb,WAAW,EACX,KAAK,UAAU,EACf,KAAK,mBAAmB,GACzB,MAAM,qBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,mBAAgB,CAAC;AACrE,OAAO,EACL,oBAAoB,EACpB,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,GAChC,MAAM,6BAA0B,CAAC;AAClC,OAAO,EACL,iBAAiB,EACjB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,0BAAuB,CAAC;AAC/B,OAAO,EACL,iBAAiB,EACjB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,0BAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAAuB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAgB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { type LayoutChangeEvent, type View } from 'react-native';
2
2
  import { useAnimatedStyle, type AnimatedRef } from 'react-native-reanimated';
3
+ export type KeyboardAvoidanceMode = 'lift' | 'dock';
3
4
  export interface UseKeyboardAvoidanceOptions {
4
5
  /** Set false to leave the element where it is. */
5
6
  enabled?: boolean;
@@ -12,18 +13,30 @@ export interface UseKeyboardAvoidanceOptions {
12
13
  * is tapped, and they all arrive at the same place on top of each other.
13
14
  */
14
15
  active?: boolean;
15
- /** Gap to keep between the element's bottom edge and the keyboard. */
16
+ /**
17
+ * `lift` moves an in-flow element by its overlap with the keyboard and
18
+ * tracks it as the page scrolls. `dock` travels with the keyboard outright,
19
+ * for an element already pinned to the bottom edge.
20
+ */
21
+ mode?: KeyboardAvoidanceMode;
22
+ /** Gap to keep between the element's bottom edge and the keyboard. `lift` only. */
16
23
  offset?: number;
24
+ /**
25
+ * How far above the bottom edge the element already sits — usually the safe
26
+ * area inset it is offset by. Subtracted from the travel, since the keyboard
27
+ * covers that strip too. `dock` only.
28
+ */
29
+ bottomInset?: number;
17
30
  }
18
31
  export interface UseKeyboardAvoidanceResult {
19
32
  /** Attach to the element that should stay visible. */
20
33
  ref: AnimatedRef<View>;
21
- /** Attach to the same element — it is how the resting position is measured. */
34
+ /** Attach to the same element, so a re-layout at rest cannot leave it offset. */
22
35
  onLayout: (event: LayoutChangeEvent) => void;
23
36
  /** Apply to the same element. */
24
37
  animatedStyle: ReturnType<typeof useAnimatedStyle>;
25
38
  }
26
39
  /** True when the keyboard controller is driving this, rather than the fallback. */
27
40
  export declare function hasKeyboardController(): boolean;
28
- export declare function useKeyboardAvoidance({ enabled, active, offset, }?: UseKeyboardAvoidanceOptions): UseKeyboardAvoidanceResult;
41
+ export declare function useKeyboardAvoidance({ enabled, active, mode, offset, bottomInset, }?: UseKeyboardAvoidanceOptions): UseKeyboardAvoidanceResult;
29
42
  //# sourceMappingURL=use-keyboard-avoidance.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-keyboard-avoidance.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-keyboard-avoidance.ts"],"names":[],"mappings":"AAkCA,OAAO,EAAuB,KAAK,iBAAiB,EAAE,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,EAKL,gBAAgB,EAEhB,KAAK,WAAW,EAEjB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,2BAA2B;IAC1C,kDAAkD;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sEAAsE;IACtE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,0BAA0B;IACzC,sDAAsD;IACtD,GAAG,EAAE,WA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,IAAI,OAAO,CAQ/C;AAED,wBAAgB,oBAAoB,CAAC,EACnC,OAAc,EACd,MAAa,EACb,IAAa,EACb,MAAW,EACX,WAAe,GAChB,GAAE,2BAAgC,GAAG,0BAA0B,CAgG/D"}