panelui-native 0.89.0 → 0.91.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 (35) hide show
  1. package/lib/module/components/fab/index.js +798 -53
  2. package/lib/module/components/fab/index.js.map +1 -1
  3. package/lib/module/components/section-progress/index.js +637 -0
  4. package/lib/module/components/section-progress/index.js.map +1 -0
  5. package/lib/module/hooks/index.js.map +1 -1
  6. package/lib/module/hooks/use-scroll-sections.js +58 -4
  7. package/lib/module/hooks/use-scroll-sections.js.map +1 -1
  8. package/lib/module/index.js +2 -1
  9. package/lib/module/index.js.map +1 -1
  10. package/lib/module/native/index.js +55 -0
  11. package/lib/module/native/index.js.map +1 -1
  12. package/lib/module/primitives/glass.js +92 -9
  13. package/lib/module/primitives/glass.js.map +1 -1
  14. package/lib/typescript/src/components/fab/index.d.ts +133 -1
  15. package/lib/typescript/src/components/fab/index.d.ts.map +1 -1
  16. package/lib/typescript/src/components/section-progress/index.d.ts +156 -0
  17. package/lib/typescript/src/components/section-progress/index.d.ts.map +1 -0
  18. package/lib/typescript/src/hooks/index.d.ts +1 -1
  19. package/lib/typescript/src/hooks/index.d.ts.map +1 -1
  20. package/lib/typescript/src/hooks/use-scroll-sections.d.ts +24 -0
  21. package/lib/typescript/src/hooks/use-scroll-sections.d.ts.map +1 -1
  22. package/lib/typescript/src/index.d.ts +3 -2
  23. package/lib/typescript/src/index.d.ts.map +1 -1
  24. package/lib/typescript/src/native/index.d.ts +115 -0
  25. package/lib/typescript/src/native/index.d.ts.map +1 -1
  26. package/lib/typescript/src/primitives/glass.d.ts +40 -2
  27. package/lib/typescript/src/primitives/glass.d.ts.map +1 -1
  28. package/package.json +1 -1
  29. package/src/components/fab/index.tsx +967 -66
  30. package/src/components/section-progress/index.tsx +813 -0
  31. package/src/hooks/index.ts +1 -0
  32. package/src/hooks/use-scroll-sections.ts +84 -5
  33. package/src/index.ts +21 -1
  34. package/src/native/index.ts +146 -0
  35. package/src/primitives/glass.tsx +116 -11
@@ -119,6 +119,27 @@ interface SwiftUIModifiers {
119
119
  * changing any code on a report of "the colour did nothing".
120
120
  */
121
121
  presentationBackground: (color: string) => unknown;
122
+ /**
123
+ * Greys a control out and stops it answering.
124
+ *
125
+ * Optional because the module is cast whole rather than feature-checked, and
126
+ * an older `@expo/ui` without it would otherwise be a crash instead of a
127
+ * menu row that is merely still tappable. Call it through a guard.
128
+ */
129
+ disabled?: (disabled: boolean) => unknown;
130
+ /**
131
+ * Fires when the view is put on screen, and when it is taken off again.
132
+ *
133
+ * The way to find out that a menu has opened. SwiftUI builds a menu's
134
+ * content only once it is presented, so an item inside one appears exactly
135
+ * when the menu does — which is the only signal the control gives, since it
136
+ * owns its open state and reports nothing about it.
137
+ *
138
+ * Optional for the same reason as `disabled`: the module is cast whole, and
139
+ * a version without these should lose the backdrop rather than crash.
140
+ */
141
+ onAppear?: (handler: () => void) => unknown;
142
+ onDisappear?: (handler: () => void) => unknown;
122
143
  }
123
144
  /**
124
145
  * The SwiftUI-only components, for the ones the universal set does not carry.
@@ -162,6 +183,100 @@ interface SwiftUIComponents {
162
183
  };
163
184
  }
164
185
  export declare function getSwiftUI(): SwiftUIComponents | null;
186
+ /**
187
+ * A hosting boundary, as both toolkits declare it. The same three props matter
188
+ * on either side — see `NativeUIModule.Host` above for what each one costs.
189
+ */
190
+ type NativeHostComponent = ComponentType<{
191
+ children?: ReactNode;
192
+ matchContents?: boolean | {
193
+ vertical?: boolean;
194
+ horizontal?: boolean;
195
+ };
196
+ ignoreSafeArea?: 'all' | 'container' | 'keyboard';
197
+ colorScheme?: 'light' | 'dark';
198
+ style?: unknown;
199
+ }>;
200
+ type RNHostComponent = ComponentType<{
201
+ children?: ReactNode;
202
+ matchContents?: boolean;
203
+ style?: unknown;
204
+ }>;
205
+ /**
206
+ * SwiftUI's menu, and the button that fills a row of it.
207
+ *
208
+ * Separate from `getSwiftUI` on purpose: that resolver refuses a module with no
209
+ * popover in it, and a version that ships one control but not the other would
210
+ * take the menu down with it. Each native path asks only for what it needs.
211
+ */
212
+ interface SwiftUIMenuComponents {
213
+ Host: NativeHostComponent;
214
+ RNHostView: RNHostComponent;
215
+ /**
216
+ * `label` takes a React element as well as a string — the element is passed
217
+ * through a native slot and becomes the thing you press. That is what lets
218
+ * the trigger stay a real Fab rather than a platform button wearing its name.
219
+ */
220
+ Menu: ComponentType<{
221
+ label?: ReactNode;
222
+ children?: ReactNode;
223
+ modifiers?: unknown[];
224
+ }>;
225
+ Button: ComponentType<{
226
+ label?: string;
227
+ systemImage?: string;
228
+ role?: 'default' | 'cancel' | 'destructive';
229
+ onPress?: () => void;
230
+ modifiers?: unknown[];
231
+ }>;
232
+ }
233
+ export declare function getSwiftUIMenu(): SwiftUIMenuComponents | null;
234
+ /**
235
+ * Compose's dropdown menu — the same instruction, answered by a different
236
+ * control.
237
+ *
238
+ * It is not the shape SwiftUI's menu is. This one is controlled: it takes the
239
+ * open state rather than owning it, and it splits the trigger and the items
240
+ * into named slots instead of reading the label off a prop. Both differences
241
+ * reach the caller, so they are written out here rather than smoothed over.
242
+ */
243
+ interface ComposeMenuComponents {
244
+ Host: NativeHostComponent;
245
+ RNHostView: RNHostComponent;
246
+ Text: ComponentType<{
247
+ children?: ReactNode;
248
+ color?: string;
249
+ }>;
250
+ DropdownMenu: ComponentType<{
251
+ children?: ReactNode;
252
+ expanded?: boolean;
253
+ onDismissRequest?: () => void;
254
+ }> & {
255
+ Trigger: ComponentType<{
256
+ children?: ReactNode;
257
+ }>;
258
+ Items: ComponentType<{
259
+ children?: ReactNode;
260
+ }>;
261
+ };
262
+ DropdownMenuItem: ComponentType<{
263
+ children?: ReactNode;
264
+ enabled?: boolean;
265
+ onClick?: () => void;
266
+ elementColors?: {
267
+ textColor?: string;
268
+ disabledTextColor?: string;
269
+ };
270
+ }> & {
271
+ Text: ComponentType<{
272
+ children?: ReactNode;
273
+ }>;
274
+ LeadingIcon: ComponentType<{
275
+ children?: ReactNode;
276
+ }>;
277
+ };
278
+ }
279
+ export declare function getComposeMenu(): ComposeMenuComponents | null;
165
280
  export declare function getSwiftUIModifiers(): SwiftUIModifiers | null;
166
281
  /**
167
282
  * The Compose view modifiers — the other half of the same door.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/native/index.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAe,CAAC;AAEjE,UAAU,cAAc;IACtB,IAAI,EAAE,aAAa,CAAC;QAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;QACrB;;;;;;;;;;;;;;;;;;;WAmBG;QACH,aAAa,CAAC,EAAE,OAAO,GAAG;YAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;YAAC,UAAU,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC;QACvE;;;;;;;;;;;;;;;WAeG;QACH,cAAc,CAAC,EAAE,KAAK,GAAG,WAAW,GAAG,UAAU,CAAC;QAClD;;;;;;WAMG;QACH,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC,CAAC;IACH;;;;OAIG;IACH,UAAU,EAAE,aAAa,CAAC;QACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;QACrB,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,CAAC,CAAC;IACH;;;;;OAKG;IACH,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC/C,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC/C,MAAM,EAAE,aAAa,CAAC,MAAM,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C;IACF,gBAAgB,EAAE,aAAa,CAAC;QAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;QACrB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,aAAa,CAAC,EAAE;YAAE,SAAS,CAAC,EAAE,MAAM,CAAC;YAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KACpE,CAAC,GAAG;QACH,IAAI,EAAE,aAAa,CAAC;YAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;SAAE,CAAC,CAAC;QAC9C,WAAW,EAAE,aAAa,CAAC;YAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;SAAE,CAAC,CAAC;KACtD,CAAC;CACH;AAKD,wBAAgB,cAAc,IAAI,qBAAqB,GAAG,IAAI,CAkB7D;AAKD,wBAAgB,mBAAmB,IAAI,gBAAgB,GAAG,IAAI,CAc7D;AAED;;;;;;;GAOG;AACH,UAAU,gBAAgB;IACxB,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;CACxC;AAKD,wBAAgB,mBAAmB,IAAI,gBAAgB,GAAG,IAAI,CAc7D"}
@@ -1,4 +1,4 @@
1
- import { type ViewProps } from 'react-native';
1
+ import { View, type ViewProps } from 'react-native';
2
2
  /** How the material treats what is behind it. */
3
3
  export type GlassVariant = 'regular' | 'clear';
4
4
  /**
@@ -18,6 +18,15 @@ export type GlassRadius = number | {
18
18
  * is a live preference and belongs to the hook.
19
19
  */
20
20
  export declare const hasGlass: boolean;
21
+ /**
22
+ * Whether the material will actually be drawn right now: the API is present
23
+ * *and* the user has not switched Reduce Transparency on.
24
+ *
25
+ * For a component that changes shape around the material — dropping a fill, a
26
+ * border or a shadow the glass replaces — so that it makes the same decision
27
+ * `Glass` makes and never strips the fill while leaving nothing behind it.
28
+ */
29
+ export declare function useGlassMaterial(): boolean;
21
30
  export interface GlassProps extends ViewProps {
22
31
  /**
23
32
  * How much of what is behind shows through. `regular` is the everyday
@@ -32,12 +41,41 @@ export interface GlassProps extends ViewProps {
32
41
  * to a rounded parent throws away the lit edge that makes it read as glass.
33
42
  */
34
43
  radius?: GlassRadius;
44
+ /**
45
+ * Let the material answer touch the way the platform's own controls do:
46
+ * it brightens and swells under the finger and the highlight follows it.
47
+ *
48
+ * For a material that *is* a button. The platform only tracks touches that
49
+ * land inside the glass view, so with this on the content is hosted inside
50
+ * the material rather than above it — a pressable written as a child still
51
+ * gets its press, and the glass reacts to the same touch.
52
+ */
53
+ interactive?: boolean;
35
54
  /** Applied only when the material cannot be drawn. Give it a real surface. */
36
55
  fallbackClassName?: string;
37
56
  className?: string;
38
57
  }
39
- export declare function Glass({ variant, tint, radius, fallbackClassName, className, children, style, ...props }: GlassProps): import("react").JSX.Element;
58
+ export declare function Glass({ variant, tint, radius, interactive, fallbackClassName, className, children, style, ...props }: GlassProps): import("react").JSX.Element;
40
59
  export declare namespace Glass {
41
60
  var displayName: string;
42
61
  }
62
+ export interface GlassContainerProps extends ViewProps {
63
+ /**
64
+ * How close two pieces of glass have to be before they merge, in points.
65
+ * Inside it their edges flow into one another; a piece moving past
66
+ * another blends with it and pulls free as it leaves.
67
+ */
68
+ spacing?: number;
69
+ className?: string;
70
+ }
71
+ /**
72
+ * Lets the glass inside it merge.
73
+ *
74
+ * On its own each piece of the material is a separate object with its own
75
+ * lit edge. Inside a container, pieces within `spacing` of each other flow
76
+ * together — which is what makes a button that opens into other buttons look
77
+ * like one thing dividing rather than several things arriving. A plain view
78
+ * wherever the material is not drawn, so it can be written unconditionally.
79
+ */
80
+ export declare const GlassContainer: import("react").ForwardRefExoticComponent<GlassContainerProps & import("react").RefAttributes<View>>;
43
81
  //# sourceMappingURL=glass.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"glass.d.ts","sourceRoot":"","sources":["../../../../src/primitives/glass.tsx"],"names":[],"mappings":"AA6CA,OAAO,EAA8C,KAAK,SAAS,EAAkB,MAAM,cAAc,CAAC;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SAAQ,SAAS;IAC3C;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,KAAK,CAAC,EACpB,OAAmB,EACnB,IAAI,EACJ,MAAM,EACN,WAAmB,EACnB,iBAA6B,EAC7B,SAAS,EACT,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACT,EAAE,UAAU,+BAwDZ;yBAlEe,KAAK;;;AAsErB,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,sGAkB1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "panelui-native",
3
- "version": "0.89.0",
3
+ "version": "0.91.0",
4
4
  "description": "High-performance React Native UI components for Expo. Semantic design tokens, powered by Uniwind (Tailwind v4) and Reanimated.",
5
5
  "main": "./lib/module/index.js",
6
6
  "module": "./lib/module/index.js",