@marktiderman/genesis-ui-native 3.6.0 → 3.8.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 +48 -1
- package/dist/{chunk-NDXNSSM6.js → chunk-DHONOH6K.js} +24 -211
- package/dist/chunk-DHONOH6K.js.map +1 -0
- package/dist/{chunk-6PGLX6ET.js → chunk-FGIIBON3.js} +334 -24
- package/dist/chunk-FGIIBON3.js.map +1 -0
- package/dist/{chunk-ZRQAFFTN.js → chunk-FOJJB6AB.js} +2 -2
- package/dist/{chunk-ZRQAFFTN.js.map → chunk-FOJJB6AB.js.map} +1 -1
- package/dist/{chunk-SEJ6RBP7.js → chunk-JZ7RAGDQ.js} +117 -60
- package/dist/chunk-JZ7RAGDQ.js.map +1 -0
- package/dist/chunk-PWS2HLDE.js +137 -0
- package/dist/chunk-PWS2HLDE.js.map +1 -0
- package/dist/{chunk-AGTBABAH.js → chunk-PWYMRUAK.js} +43 -30
- package/dist/chunk-PWYMRUAK.js.map +1 -0
- package/dist/{chunk-FUMSL7VZ.js → chunk-T7FEVT62.js} +53 -12
- package/dist/chunk-T7FEVT62.js.map +1 -0
- package/dist/{chunk-2Z72MYHB.js → chunk-UZCJDMGE.js} +353 -19
- package/dist/chunk-UZCJDMGE.js.map +1 -0
- package/dist/components/index.d.ts +275 -24
- package/dist/components/index.js +5 -5
- package/dist/data/index.d.ts +2 -1
- package/dist/data/index.js +7 -12
- package/dist/data/index.js.map +1 -1
- package/dist/hooks/index.d.ts +36 -3
- package/dist/hooks/index.js +2 -2
- package/dist/icons/lucide.d.ts +1 -1
- package/dist/icons/lucide.js +13 -3
- package/dist/icons/lucide.js.map +1 -1
- package/dist/{inbox-page-B7_Oi2fS.d.ts → inbox-page-BGqR_cBs.d.ts} +4 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +8 -8
- package/dist/layouts/index.d.ts +12 -3
- package/dist/layouts/index.js +5 -5
- package/dist/{native-modules-Cl3zw3kh.d.ts → native-modules-CeAaO2Dh.d.ts} +55 -3
- package/package.json +73 -2
- package/src/__tests__/doctor-rules.test.ts +27 -0
- package/src/__tests__/native-modules-lists.test.tsx +1 -0
- package/src/components/__tests__/bulk-bar.test.tsx +36 -0
- package/src/components/__tests__/button-haptic.test.tsx +74 -0
- package/src/components/__tests__/composer-bar.test.tsx +140 -1
- package/src/components/__tests__/gallery-grid.test.tsx +2 -2
- package/src/components/__tests__/library-round-5.test.tsx +121 -0
- package/src/components/__tests__/share-sheet.test.tsx +47 -0
- package/src/components/__tests__/swipe-row-context-menu.test.tsx +215 -0
- package/src/components/__tests__/tab-bar.test.tsx +43 -0
- package/src/components/__tests__/thread-list.test.tsx +200 -0
- package/src/components/__tests__/tier-badge.test.tsx +57 -0
- package/src/components/__tests__/whats-new-sheet.test.tsx +29 -0
- package/src/components/bulk-bar.tsx +91 -0
- package/src/components/button.tsx +81 -25
- package/src/components/choice-card.tsx +104 -0
- package/src/components/composer-bar.tsx +104 -25
- package/src/components/context-menu.tsx +101 -0
- package/src/components/gallery-grid.tsx +10 -4
- package/src/components/index.ts +19 -2
- package/src/components/inline-alert.tsx +36 -1
- package/src/components/input.tsx +3 -0
- package/src/components/progress.tsx +24 -2
- package/src/components/rating.tsx +35 -16
- package/src/components/share-sheet.tsx +127 -0
- package/src/components/sheet.tsx +9 -1
- package/src/components/swipe-row.tsx +74 -0
- package/src/components/tab-bar.tsx +133 -0
- package/src/components/tabs.tsx +2 -0
- package/src/components/text.tsx +3 -0
- package/src/components/textarea.tsx +3 -0
- package/src/components/thread-list.tsx +78 -23
- package/src/components/tier-badge.tsx +74 -0
- package/src/components/whats-new-sheet.tsx +89 -0
- package/src/data/resource-view/NativeRecordView.tsx +3 -8
- package/src/data/resource-view/use-native-resource-view.ts +2 -2
- package/src/hooks/__tests__/use-haptics.test.tsx +146 -0
- package/src/hooks/index.ts +3 -1
- package/src/hooks/use-haptics.ts +64 -0
- package/src/hooks/use-press-feedback.ts +87 -0
- package/src/hooks/use-theme-roles.ts +3 -0
- package/src/icon-names.ts +12 -2
- package/src/icons/lucide.ts +27 -7
- package/src/layouts/__tests__/inbox-page.test.tsx +26 -7
- package/src/layouts/__tests__/thread-page.test.tsx +89 -2
- package/src/layouts/inbox-page.tsx +28 -12
- package/src/layouts/thread-page.tsx +69 -8
- package/src/native-modules.tsx +20 -0
- package/dist/chunk-2Z72MYHB.js.map +0 -1
- package/dist/chunk-4OQOJ2OC.js +0 -80
- package/dist/chunk-4OQOJ2OC.js.map +0 -1
- package/dist/chunk-6PGLX6ET.js.map +0 -1
- package/dist/chunk-AGTBABAH.js.map +0 -1
- package/dist/chunk-FUMSL7VZ.js.map +0 -1
- package/dist/chunk-NDXNSSM6.js.map +0 -1
- package/dist/chunk-SEJ6RBP7.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import react__default, { ReactNode, ReactElement } from 'react';
|
|
2
|
+
import react__default, { Ref, ComponentRef, ReactNode, ReactElement } from 'react';
|
|
3
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
|
-
import { TextProps, AccessibilityState, ScrollViewProps, TextInputProps, ViewProps, ColorValue, SwitchProps } from 'react-native';
|
|
6
|
-
import {
|
|
7
|
-
export { G as GenesisDatePickerComponent, a as GenesisDatePickerProps,
|
|
8
|
-
import { ComposerMode } from '@marktiderman/genesis-core/conversation';
|
|
5
|
+
import { TextProps, Text, AccessibilityState, StyleProp, ViewStyle, View, ScrollViewProps, TextInputProps, TextInput, ViewProps, ColorValue, SwitchProps, FlatListProps } from 'react-native';
|
|
6
|
+
import { H as HapticKind, r as NativeIconName, b as GenesisGlassModule } from '../native-modules-CeAaO2Dh.js';
|
|
7
|
+
export { G as GenesisDatePickerComponent, a as GenesisDatePickerProps, d as GenesisIconComponent, e as GenesisIconSet, f as GenesisImageComponent, g as GenesisImageProps, h as GenesisListComponent, i as GenesisListProps, j as GenesisModules, k as GenesisModulesProvider, l as GenesisModulesProviderProps, m as GenesisNavigationModule, n as GenesisNavigationTheme, o as GenesisReanimatedModule, p as GenesisSymbolComponent, q as GenesisSymbolProps, K as KeyboardAvoidingLike, N as NATIVE_ICON_NAMES, S as SF_SYMBOLS, u as useGenesisModules } from '../native-modules-CeAaO2Dh.js';
|
|
8
|
+
import { ComposerMode, InboxSwipeAction } from '@marktiderman/genesis-core/conversation';
|
|
9
9
|
export { ComposerMode, ComposerTone } from '@marktiderman/genesis-core/conversation';
|
|
10
10
|
import { GalleryItem, GalleryTileAspect } from '@marktiderman/genesis-core/gallery';
|
|
11
11
|
export { DEFAULT_GALLERY_RATIO, GALLERY_DEFAULTS, GalleryItem, GalleryTileAspect, JustifiedRow, JustifiedTile, galleryItemRatio, justifyRows } from '@marktiderman/genesis-core/gallery';
|
|
@@ -16,6 +16,8 @@ declare const textVariants: (props?: ({
|
|
|
16
16
|
interface NativeTextProps extends TextProps, VariantProps<typeof textVariants> {
|
|
17
17
|
/** NativeWind utility class string applied to the underlying Text. */
|
|
18
18
|
className?: string;
|
|
19
|
+
/** The underlying Text (React 19 passes `ref` as a prop). */
|
|
20
|
+
ref?: Ref<ComponentRef<typeof Text>> | undefined;
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
23
|
* Allowed `preset` values on {@link NativeText}. Re-exported as a named type
|
|
@@ -32,11 +34,11 @@ type TextPreset = NonNullable<NativeTextProps["preset"]>;
|
|
|
32
34
|
declare function NativeText({ className, preset, children, ...props }: NativeTextProps): react.JSX.Element;
|
|
33
35
|
|
|
34
36
|
declare const buttonVariants: (props?: ({
|
|
35
|
-
variant?: "default" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
37
|
+
variant?: "default" | "secondary" | "outline" | "ghost" | "destructive" | "gradient" | null | undefined;
|
|
36
38
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
37
39
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
38
40
|
declare const buttonTextVariants: (props?: ({
|
|
39
|
-
variant?: "default" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
41
|
+
variant?: "default" | "secondary" | "outline" | "ghost" | "destructive" | "gradient" | null | undefined;
|
|
40
42
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
41
43
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
42
44
|
interface NativeButtonProps extends VariantProps<typeof buttonVariants> {
|
|
@@ -52,8 +54,17 @@ interface NativeButtonProps extends VariantProps<typeof buttonVariants> {
|
|
|
52
54
|
accessibilityHint?: string;
|
|
53
55
|
/** Merged with the button's own `disabled` and `busy`: `{ selected: true }` for a vote cast, a filter on. */
|
|
54
56
|
accessibilityState?: AccessibilityState;
|
|
57
|
+
/**
|
|
58
|
+
* A haptic through `GenesisModules.haptics` (`light` for a vote, `success` for a save): it plays
|
|
59
|
+
* when the press counts, except `select`, which ticks on press-in as `usePressFeedback` does. Default none.
|
|
60
|
+
*/
|
|
61
|
+
haptic?: HapticKind | undefined;
|
|
62
|
+
/** Styles for the pressable, after the classes: colors or sizes from a theme object. */
|
|
63
|
+
style?: StyleProp<ViewStyle> | undefined;
|
|
64
|
+
/** The pressable (React 19 passes `ref` as a prop). */
|
|
65
|
+
ref?: Ref<ComponentRef<typeof View>> | undefined;
|
|
55
66
|
}
|
|
56
|
-
declare function NativeButton({ className, textClassName, variant, size, children, onPress, disabled, loading, accessibilityState, ...props }: NativeButtonProps): react.JSX.Element;
|
|
67
|
+
declare function NativeButton({ className, textClassName, variant, size, children, onPress, disabled, loading, accessibilityState, haptic, style, ...props }: NativeButtonProps): react.JSX.Element;
|
|
57
68
|
|
|
58
69
|
interface NativeCardProps {
|
|
59
70
|
className?: string;
|
|
@@ -151,6 +162,8 @@ interface NativeSheetProps {
|
|
|
151
162
|
* `snapPoints` is ignored. Default false.
|
|
152
163
|
*/
|
|
153
164
|
fitContent?: boolean;
|
|
165
|
+
/** The sheet has finished going, where the platform says so (iOS's modal, the library): another modal can present now. */
|
|
166
|
+
onDismissed?: () => void;
|
|
154
167
|
children: ReactNode;
|
|
155
168
|
testID?: string;
|
|
156
169
|
}
|
|
@@ -481,15 +494,19 @@ interface BaseProps {
|
|
|
481
494
|
icon?: React.ReactNode;
|
|
482
495
|
/** When provided, renders an "✕" dismiss button with this label. */
|
|
483
496
|
onDismiss?: () => void;
|
|
497
|
+
/** Content under the description (a list of the fields to fix, a status line). */
|
|
498
|
+
children?: React.ReactNode;
|
|
499
|
+
/** A row of buttons under the content (NativeButton size="sm"). */
|
|
500
|
+
actions?: React.ReactNode;
|
|
484
501
|
className?: string;
|
|
485
502
|
testID?: string;
|
|
486
503
|
}
|
|
487
504
|
interface NativeInlineAlertProps extends BaseProps {
|
|
488
505
|
}
|
|
489
|
-
declare function NativeInlineAlert({ variant, title, description, icon, onDismiss, className, testID, }: NativeInlineAlertProps): react.JSX.Element;
|
|
506
|
+
declare function NativeInlineAlert({ variant, title, description, icon, onDismiss, children, actions, className, testID, }: NativeInlineAlertProps): react.JSX.Element;
|
|
490
507
|
interface NativeBannerProps extends BaseProps {
|
|
491
508
|
}
|
|
492
|
-
declare function NativeBanner({ variant, title, description, icon, onDismiss, className, testID, }: NativeBannerProps): react.JSX.Element;
|
|
509
|
+
declare function NativeBanner({ variant, title, description, icon, onDismiss, children, actions, className, testID, }: NativeBannerProps): react.JSX.Element;
|
|
493
510
|
|
|
494
511
|
interface NativeListItemProps {
|
|
495
512
|
title: string;
|
|
@@ -564,10 +581,10 @@ interface NativeRefreshControlProps {
|
|
|
564
581
|
declare function NativeRefreshControl({ tintColor, colors, testID, ...rest }: NativeRefreshControlProps): react.JSX.Element;
|
|
565
582
|
|
|
566
583
|
declare const badgeVariants: (props?: ({
|
|
567
|
-
variant?: "
|
|
584
|
+
variant?: "info" | "success" | "warning" | "default" | "secondary" | "outline" | "destructive" | "muted" | null | undefined;
|
|
568
585
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
569
586
|
declare const badgeTextVariants: (props?: ({
|
|
570
|
-
variant?: "
|
|
587
|
+
variant?: "info" | "success" | "warning" | "default" | "secondary" | "outline" | "destructive" | "muted" | null | undefined;
|
|
571
588
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
572
589
|
interface NativeBadgeProps extends VariantProps<typeof badgeVariants> {
|
|
573
590
|
className?: string;
|
|
@@ -578,11 +595,30 @@ interface NativeBadgeProps extends VariantProps<typeof badgeVariants> {
|
|
|
578
595
|
}
|
|
579
596
|
declare function NativeBadge({ className, textClassName, variant, children, ...props }: NativeBadgeProps): react.JSX.Element;
|
|
580
597
|
|
|
598
|
+
interface NativeTierBadgeProps {
|
|
599
|
+
/** The rank or tier, as shown ("Gold"). */
|
|
600
|
+
label: string;
|
|
601
|
+
/** A key of the brand's `accents` (`"gold"`). Unset: neutral. */
|
|
602
|
+
tone?: string;
|
|
603
|
+
/** Leading icon, by Genesis icon name. */
|
|
604
|
+
icon?: NativeIconName;
|
|
605
|
+
/** `sm` for a list row, `md` (default) for a header. */
|
|
606
|
+
size?: "sm" | "md";
|
|
607
|
+
className?: string;
|
|
608
|
+
textClassName?: string;
|
|
609
|
+
/** What a screen reader says. Default: the label. */
|
|
610
|
+
accessibilityLabel?: string;
|
|
611
|
+
testID?: string;
|
|
612
|
+
}
|
|
613
|
+
declare function NativeTierBadge({ label, tone, icon, size, className, textClassName, accessibilityLabel, testID }: NativeTierBadgeProps): react.JSX.Element;
|
|
614
|
+
|
|
581
615
|
interface NativeInputProps extends TextInputProps {
|
|
582
616
|
className?: string;
|
|
583
617
|
inputClassName?: string;
|
|
584
618
|
label?: string;
|
|
585
619
|
error?: string;
|
|
620
|
+
/** The underlying TextInput (React 19 passes `ref` as a prop). */
|
|
621
|
+
ref?: Ref<ComponentRef<typeof TextInput>> | undefined;
|
|
586
622
|
}
|
|
587
623
|
declare function NativeInput({ className, inputClassName, label, error, editable, placeholderTextColor, ...props }: NativeInputProps): react.JSX.Element;
|
|
588
624
|
|
|
@@ -631,13 +667,13 @@ interface NativeLoadingStateProps {
|
|
|
631
667
|
declare function NativeLoadingState({ label, accessibilityLabel, size, fullScreen, safeAreaEdges, color, className, testID, }: NativeLoadingStateProps): react.JSX.Element;
|
|
632
668
|
|
|
633
669
|
declare const alertVariants: (props?: ({
|
|
634
|
-
variant?: "
|
|
670
|
+
variant?: "info" | "success" | "warning" | "default" | "destructive" | null | undefined;
|
|
635
671
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
636
672
|
declare const alertTitleTextVariants: (props?: ({
|
|
637
|
-
variant?: "
|
|
673
|
+
variant?: "info" | "success" | "warning" | "default" | "destructive" | null | undefined;
|
|
638
674
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
639
675
|
declare const alertDescriptionTextVariants: (props?: ({
|
|
640
|
-
variant?: "
|
|
676
|
+
variant?: "info" | "success" | "warning" | "default" | "destructive" | null | undefined;
|
|
641
677
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
642
678
|
interface NativeAlertProps extends VariantProps<typeof alertVariants> {
|
|
643
679
|
className?: string;
|
|
@@ -694,9 +730,17 @@ interface NativeProgressProps {
|
|
|
694
730
|
trackClassName?: string;
|
|
695
731
|
/** Indicator color class. Defaults to bg-primary */
|
|
696
732
|
indicatorClassName?: string;
|
|
733
|
+
/** The fill's colour as a value (a theme role, a brand tint); wins over `indicatorClassName`. */
|
|
734
|
+
indicatorColor?: ColorValue;
|
|
735
|
+
/** The track's colour as a value; wins over `trackClassName`. */
|
|
736
|
+
trackColor?: ColorValue;
|
|
737
|
+
/** Track style, for colors from a theme object rather than classes. Wins over the classes. */
|
|
738
|
+
style?: ViewStyle;
|
|
739
|
+
/** Indicator style, for colors from a theme object rather than classes. Wins over the classes. */
|
|
740
|
+
indicatorStyle?: ViewStyle;
|
|
697
741
|
testID?: string;
|
|
698
742
|
}
|
|
699
|
-
declare function NativeProgress({ className, value, trackClassName, indicatorClassName, ...props }: NativeProgressProps): react.JSX.Element;
|
|
743
|
+
declare function NativeProgress({ className, value, trackClassName, indicatorClassName, indicatorColor, trackColor, style, indicatorStyle, ...props }: NativeProgressProps): react.JSX.Element;
|
|
700
744
|
|
|
701
745
|
interface NativeCheckboxProps {
|
|
702
746
|
className?: string;
|
|
@@ -777,6 +821,26 @@ interface NativeLabelProps extends TextProps {
|
|
|
777
821
|
}
|
|
778
822
|
declare function NativeLabel({ className, children, disabled, ...props }: NativeLabelProps): react.JSX.Element;
|
|
779
823
|
|
|
824
|
+
interface NativeChoiceCardProps {
|
|
825
|
+
title: string;
|
|
826
|
+
/** A second line under the title, muted. */
|
|
827
|
+
description?: string;
|
|
828
|
+
/** Slot left of the text: a thumbnail (NativeImage), an icon. */
|
|
829
|
+
media?: React.ReactNode;
|
|
830
|
+
selected: boolean;
|
|
831
|
+
onPress: () => void;
|
|
832
|
+
/** A checkbox (several can be chosen) rather than a radio. */
|
|
833
|
+
multiple?: boolean;
|
|
834
|
+
disabled?: boolean;
|
|
835
|
+
/** The question still needs an answer: a destructive border and hint. */
|
|
836
|
+
invalid?: boolean;
|
|
837
|
+
/** Extra accessibility hint, such as "Option 2 of 4". */
|
|
838
|
+
hint?: string;
|
|
839
|
+
className?: string;
|
|
840
|
+
testID?: string;
|
|
841
|
+
}
|
|
842
|
+
declare function NativeChoiceCard({ title, description, media, selected, onPress, multiple, disabled, invalid, hint, className, testID, }: NativeChoiceCardProps): react.JSX.Element;
|
|
843
|
+
|
|
780
844
|
interface NativeRadioGroupProps {
|
|
781
845
|
className?: string;
|
|
782
846
|
value?: string;
|
|
@@ -848,6 +912,8 @@ interface NativeTabsTriggerProps {
|
|
|
848
912
|
value: string;
|
|
849
913
|
children: React.ReactNode;
|
|
850
914
|
disabled?: boolean;
|
|
915
|
+
/** Its accessible name, when its children don't say it all (a badge's count, say). */
|
|
916
|
+
accessibilityLabel?: string;
|
|
851
917
|
testID?: string;
|
|
852
918
|
}
|
|
853
919
|
declare function NativeTabsTrigger({ className, value, children, disabled, ...props }: NativeTabsTriggerProps): react.JSX.Element;
|
|
@@ -863,6 +929,8 @@ interface NativeTextareaProps extends TextInputProps {
|
|
|
863
929
|
inputClassName?: string;
|
|
864
930
|
label?: string;
|
|
865
931
|
error?: string;
|
|
932
|
+
/** The underlying TextInput (React 19 passes `ref` as a prop). */
|
|
933
|
+
ref?: Ref<ComponentRef<typeof TextInput>> | undefined;
|
|
866
934
|
/** How many lines tall the field is, on both platforms (passed as `numberOfLines`). Default 4. */
|
|
867
935
|
rows?: number;
|
|
868
936
|
}
|
|
@@ -1123,7 +1191,12 @@ declare function NativeGlassSurface({ children, className, fallbackClassName, ra
|
|
|
1123
1191
|
* rendered. Going to a row waits for `loading`, loads until it's held,
|
|
1124
1192
|
* scrolls to it (again after FlashList's own placement on open), highlights
|
|
1125
1193
|
* it for two seconds and announces it. Reduce Motion scrolls without
|
|
1126
|
-
* animating.
|
|
1194
|
+
* animating. The reader's touch wins: a drag during a jump ends the list's own
|
|
1195
|
+
* scrolling and drops the jump, even one still loading, so nothing snaps back.
|
|
1196
|
+
*
|
|
1197
|
+
* A row is gone when, once `onLoadUntil` has settled, no row answers to its
|
|
1198
|
+
* id. The list knows only its rows: a row that's drawn (a deleted message's
|
|
1199
|
+
* tombstone) is there, and whatever isn't drawn isn't, whatever a cache holds.
|
|
1127
1200
|
*
|
|
1128
1201
|
* Promoted from genesis-chat's thread and its `useJumpToMessage` (G4); chat
|
|
1129
1202
|
* moves onto it later.
|
|
@@ -1195,11 +1268,18 @@ interface NativeThreadListProps<T> {
|
|
|
1195
1268
|
}) => ReactNode;
|
|
1196
1269
|
/** Go to this row, loading earlier pages with `onLoadUntil` until it's here. A new id, or the same one after `null`, goes again. */
|
|
1197
1270
|
jumpTo?: string | null;
|
|
1271
|
+
/**
|
|
1272
|
+
* The id `jumpTo` names a row by, when it isn't the row's key: a message keyed by the id the
|
|
1273
|
+
* phone gave it (so it keeps its row when the server's copy lands) and gone to by the server's
|
|
1274
|
+
* id. `null` for a row that can't be gone to (a day heading). `keyExtractor` by default.
|
|
1275
|
+
* Pass a stable function (module scope, or `useCallback`): a new one each render re-renders every row.
|
|
1276
|
+
*/
|
|
1277
|
+
jumpId?: (row: T) => string | null | undefined;
|
|
1198
1278
|
/** Load earlier pages until the row is held; resolve false when it can't be found. */
|
|
1199
1279
|
onLoadUntil?: (id: string) => Promise<boolean>;
|
|
1200
1280
|
/** What VoiceOver says on arriving at `jumpTo`. */
|
|
1201
1281
|
jumpAnnouncement?: (row: T) => string;
|
|
1202
|
-
/**
|
|
1282
|
+
/** No row answers to this id once `onLoadUntil` has settled, or it failed. The list goes back to the newest row first. */
|
|
1203
1283
|
onJumpFailed?: (id: string) => void;
|
|
1204
1284
|
/** Whether the reader is at the bottom, as it changes (to show a "new messages" pill, say). */
|
|
1205
1285
|
onAtBottomChange?: (atBottom: boolean) => void;
|
|
@@ -1233,17 +1313,80 @@ interface NativeComposerBarProps {
|
|
|
1233
1313
|
maxLines?: number;
|
|
1234
1314
|
/** Ways to send ("Reply", "Internal note"). Two or more show the picker. */
|
|
1235
1315
|
modes?: readonly ComposerMode[];
|
|
1316
|
+
/** The picker's name, to VoiceOver. Default "Send as". */
|
|
1317
|
+
modesLabel?: string;
|
|
1236
1318
|
/** The chosen mode's id. Default the first. */
|
|
1237
1319
|
mode?: string;
|
|
1238
1320
|
onModeChange?: (id: string) => void;
|
|
1239
1321
|
leading?: ReactNode;
|
|
1240
1322
|
trailing?: ReactNode;
|
|
1241
1323
|
above?: ReactNode;
|
|
1324
|
+
/**
|
|
1325
|
+
* Whether there's something to send. By default, a `value` that isn't blank; pass `true` when
|
|
1326
|
+
* attachments are waiting and no text is needed, and `false` while `replaceInput` is showing.
|
|
1327
|
+
*/
|
|
1328
|
+
hasContent?: boolean;
|
|
1329
|
+
/** Takes Send's place (the same 44pt spot) while there's nothing to send and nothing sending: a hold-to-record mic. */
|
|
1330
|
+
idleAction?: ReactNode;
|
|
1331
|
+
/** Shown instead of `leading` and the input (a recording in progress). Label it yourself: it's one region to VoiceOver. */
|
|
1332
|
+
replaceInput?: ReactNode;
|
|
1333
|
+
/** Touch and hold Send for these (one runs straight away; several open a menu). Each is also an accessibility action on Send. */
|
|
1334
|
+
sendActions?: readonly ComposerSendAction[];
|
|
1335
|
+
/** Title of the menu when there are several `sendActions`. */
|
|
1336
|
+
sendActionsTitle?: string;
|
|
1337
|
+
/** The hint on Send when it has `sendActions`. Default "Touch and hold for more options". */
|
|
1338
|
+
sendActionsHint?: string;
|
|
1339
|
+
/** Passed to the input (to insert at the cursor, say). */
|
|
1340
|
+
onSelectionChange?: (e: {
|
|
1341
|
+
nativeEvent: {
|
|
1342
|
+
selection: {
|
|
1343
|
+
start: number;
|
|
1344
|
+
end: number;
|
|
1345
|
+
};
|
|
1346
|
+
};
|
|
1347
|
+
}) => void;
|
|
1348
|
+
/**
|
|
1349
|
+
* The input takes text (default). When false, Send is off and the input reads as disabled.
|
|
1350
|
+
* `idleAction` is the app's, so disable it too.
|
|
1351
|
+
*/
|
|
1352
|
+
editable?: boolean;
|
|
1353
|
+
testID?: string;
|
|
1354
|
+
}
|
|
1355
|
+
/** Another way to send (touch and hold Send). */
|
|
1356
|
+
interface ComposerSendAction {
|
|
1357
|
+
id: string;
|
|
1358
|
+
label: string;
|
|
1359
|
+
onPress: () => void;
|
|
1360
|
+
destructive?: boolean;
|
|
1361
|
+
}
|
|
1362
|
+
declare function NativeComposerBar({ value, onChangeText, onSend, sending, disabled, placeholder, sendLabel, sendingLabel, maxLength, maxLines, modes, modesLabel, mode, onModeChange, leading, trailing, above, hasContent, idleAction, replaceInput, sendActions, sendActionsTitle, sendActionsHint, onSelectionChange, editable, testID, }: NativeComposerBarProps): react.JSX.Element;
|
|
1363
|
+
|
|
1364
|
+
interface NativeSwipeRowProps {
|
|
1365
|
+
actions: readonly InboxSwipeAction[];
|
|
1366
|
+
children?: ReactNode;
|
|
1367
|
+
testID?: string;
|
|
1368
|
+
}
|
|
1369
|
+
declare function NativeSwipeRow({ actions, children, testID }: NativeSwipeRowProps): react.JSX.Element;
|
|
1370
|
+
|
|
1371
|
+
interface NativeContextMenuAction {
|
|
1372
|
+
id: string;
|
|
1373
|
+
label: string;
|
|
1374
|
+
onPress: () => void;
|
|
1375
|
+
destructive?: boolean;
|
|
1376
|
+
}
|
|
1377
|
+
interface NativeContextMenuProps {
|
|
1378
|
+
open: boolean;
|
|
1379
|
+
onOpenChange: (open: boolean) => void;
|
|
1380
|
+
actions: readonly NativeContextMenuAction[];
|
|
1381
|
+
/** Over the actions: what they act on. */
|
|
1382
|
+
title?: string;
|
|
1383
|
+
cancelLabel?: string;
|
|
1242
1384
|
testID?: string;
|
|
1243
1385
|
}
|
|
1244
|
-
declare function
|
|
1386
|
+
declare function NativeContextMenu({ open, onOpenChange, actions, title, cancelLabel, testID }: NativeContextMenuProps): react.JSX.Element;
|
|
1245
1387
|
|
|
1246
|
-
type NativeRatingSize = "sm" | "md" | "lg";
|
|
1388
|
+
type NativeRatingSize = "sm" | "md" | "lg" | "touch";
|
|
1389
|
+
type NativeRatingTone = "warning" | "primary";
|
|
1247
1390
|
interface NativeRatingProps {
|
|
1248
1391
|
/** The score, 0..`max`. Fractions round to the nearest star. */
|
|
1249
1392
|
value: number;
|
|
@@ -1253,8 +1396,14 @@ interface NativeRatingProps {
|
|
|
1253
1396
|
onChange?: (value: number) => void;
|
|
1254
1397
|
/** Read-only even with `onChange`. */
|
|
1255
1398
|
readOnly?: boolean;
|
|
1256
|
-
/** Default "md". */
|
|
1399
|
+
/** Default "md". `touch` is a 44pt target around a large star, for a form. */
|
|
1257
1400
|
size?: NativeRatingSize;
|
|
1401
|
+
/** The chosen stars' colour: the `warning` role (default) or the brand's tint. */
|
|
1402
|
+
tone?: NativeRatingTone;
|
|
1403
|
+
/** Pressing the chosen star clears it to 0. Default true; false for a required answer. */
|
|
1404
|
+
clearable?: boolean;
|
|
1405
|
+
/** The stars can't be pressed, and read as disabled. */
|
|
1406
|
+
disabled?: boolean;
|
|
1258
1407
|
/** The control's accessible name ("Service rating"): read-only reads "Service rating: 3 of 5 stars". */
|
|
1259
1408
|
label?: string;
|
|
1260
1409
|
/** The accessibility text for a value, in place of "N of M stars" (read-only label, each radio's label and value). */
|
|
@@ -1264,7 +1413,7 @@ interface NativeRatingProps {
|
|
|
1264
1413
|
}
|
|
1265
1414
|
/** The value after pressing `star`: that star, or 0 when it is the current value (a press clears). */
|
|
1266
1415
|
declare function nextRating(value: number, star: number): number;
|
|
1267
|
-
declare function NativeRating({ value, max, onChange, readOnly, size, label, getLabel, className, testID, }: NativeRatingProps): react.JSX.Element;
|
|
1416
|
+
declare function NativeRating({ value, max, onChange, readOnly, size, tone, clearable, disabled, label, getLabel, className, testID, }: NativeRatingProps): react.JSX.Element;
|
|
1268
1417
|
|
|
1269
1418
|
type NativeGalleryLayout = "justified" | "grid";
|
|
1270
1419
|
interface NativeGalleryGridProps {
|
|
@@ -1303,10 +1452,12 @@ interface NativeGalleryGridProps {
|
|
|
1303
1452
|
groupBy?: (item: GalleryItem) => string;
|
|
1304
1453
|
/** @deprecated Use `groupBy`. */
|
|
1305
1454
|
getGroup?: (item: GalleryItem) => string;
|
|
1455
|
+
/** iOS: how the list insets under a large-title or translucent header. Default `"automatic"`, so the first row starts below the header. */
|
|
1456
|
+
contentInsetAdjustmentBehavior?: FlatListProps<unknown>["contentInsetAdjustmentBehavior"];
|
|
1306
1457
|
className?: string;
|
|
1307
1458
|
testID?: string;
|
|
1308
1459
|
}
|
|
1309
|
-
declare function NativeGalleryGrid({ items, layout, columns, aspectRatio, rowHeight, gap, onItemPress, renderItem, renderBadges, selected, onSelectionChange, loadMore: loadMoreProp, onNearEnd, header, footer, groupBy: groupByProp, getGroup, className, testID, }: NativeGalleryGridProps): react.JSX.Element;
|
|
1460
|
+
declare function NativeGalleryGrid({ items, layout, columns, aspectRatio, rowHeight, gap, onItemPress, renderItem, renderBadges, selected, onSelectionChange, loadMore: loadMoreProp, onNearEnd, header, footer, groupBy: groupByProp, getGroup, contentInsetAdjustmentBehavior, className, testID, }: NativeGalleryGridProps): react.JSX.Element;
|
|
1310
1461
|
|
|
1311
1462
|
/** The viewer's words, for another language. */
|
|
1312
1463
|
interface NativeLightboxLabels {
|
|
@@ -1422,4 +1573,104 @@ interface NativeLiveIndicatorProps {
|
|
|
1422
1573
|
}
|
|
1423
1574
|
declare function NativeLiveIndicator({ live, state, label, detail, variant, className, testID, }: NativeLiveIndicatorProps): react.JSX.Element;
|
|
1424
1575
|
|
|
1425
|
-
|
|
1576
|
+
/** One tab in a `NativeTabBar`. */
|
|
1577
|
+
interface NativeTabBarItem {
|
|
1578
|
+
key: string;
|
|
1579
|
+
label: string;
|
|
1580
|
+
/** Usually `<NativeIcon name="…" />`. */
|
|
1581
|
+
icon: ReactNode;
|
|
1582
|
+
/** A count or a short word beside the icon. */
|
|
1583
|
+
badge?: ReactNode;
|
|
1584
|
+
}
|
|
1585
|
+
interface NativeTabBarProps {
|
|
1586
|
+
items: readonly NativeTabBarItem[];
|
|
1587
|
+
/** The current tab's key. */
|
|
1588
|
+
value: string;
|
|
1589
|
+
onChange: (key: string) => void;
|
|
1590
|
+
/** Slots before "More" takes the last. Default 5. */
|
|
1591
|
+
max?: number;
|
|
1592
|
+
/** "More" (the last slot's label and the sheet's title). */
|
|
1593
|
+
moreLabel?: string;
|
|
1594
|
+
className?: string;
|
|
1595
|
+
testID?: string;
|
|
1596
|
+
}
|
|
1597
|
+
declare function NativeTabBar({ items, value, onChange, max, moreLabel, className, testID, }: NativeTabBarProps): react.JSX.Element;
|
|
1598
|
+
|
|
1599
|
+
/** One button in the bar. */
|
|
1600
|
+
interface NativeBulkAction {
|
|
1601
|
+
label: string;
|
|
1602
|
+
/** A NativeIcon name (the web's `BulkAction` takes a lucide icon). */
|
|
1603
|
+
icon: NativeIconName;
|
|
1604
|
+
onClick: () => void;
|
|
1605
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost";
|
|
1606
|
+
/** Inert while, say, a bulk mutation is in flight. */
|
|
1607
|
+
disabled?: boolean;
|
|
1608
|
+
/** `testID` on the button (the web's `testId`). */
|
|
1609
|
+
testId?: string;
|
|
1610
|
+
}
|
|
1611
|
+
interface NativeBulkBarProps {
|
|
1612
|
+
selected: Set<string>;
|
|
1613
|
+
totalCount: number;
|
|
1614
|
+
onToggleAll: () => void;
|
|
1615
|
+
onClearSelection: () => void;
|
|
1616
|
+
actions: NativeBulkAction[];
|
|
1617
|
+
/** "{count} selected". Default English. */
|
|
1618
|
+
selectedLabel?: (count: number) => string;
|
|
1619
|
+
/** Default "Clear". */
|
|
1620
|
+
clearLabel?: string;
|
|
1621
|
+
/** Merged onto the bar. */
|
|
1622
|
+
className?: string;
|
|
1623
|
+
testID?: string;
|
|
1624
|
+
}
|
|
1625
|
+
declare function NativeBulkBar({ selected, totalCount, onToggleAll, onClearSelection, actions, selectedLabel, clearLabel, className, testID, }: NativeBulkBarProps): react.JSX.Element | null;
|
|
1626
|
+
|
|
1627
|
+
interface NativeShareSheetProps {
|
|
1628
|
+
open: boolean;
|
|
1629
|
+
onOpenChange: (open: boolean) => void;
|
|
1630
|
+
/** What it is, in the default title and buttons: "page" (default), "form", "course". */
|
|
1631
|
+
noun?: string;
|
|
1632
|
+
/** Default "Share your {noun}". */
|
|
1633
|
+
title?: string;
|
|
1634
|
+
/** Default "Anyone with the link can open it." */
|
|
1635
|
+
description?: ReactNode;
|
|
1636
|
+
/** The public link; null while it is still loading. */
|
|
1637
|
+
url: string | null;
|
|
1638
|
+
/** Its name, sent with the link to the system share sheet. */
|
|
1639
|
+
name?: string;
|
|
1640
|
+
/** Draws a QR code for a link. None hides the QR code. */
|
|
1641
|
+
renderQr?: (url: string) => ReactNode;
|
|
1642
|
+
/** Copies text (expo-clipboard's `setStringAsync`). Default: the system share sheet. */
|
|
1643
|
+
onCopy?: (text: string) => void | Promise<void>;
|
|
1644
|
+
testID?: string;
|
|
1645
|
+
}
|
|
1646
|
+
declare function NativeShareSheet({ open, onOpenChange, noun, title, description, url, name, renderQr, onCopy, testID, }: NativeShareSheetProps): react.JSX.Element;
|
|
1647
|
+
|
|
1648
|
+
/** One note. */
|
|
1649
|
+
interface NativeWhatsNewNote {
|
|
1650
|
+
/** Unique within the sheet (a version, a note id). */
|
|
1651
|
+
key: string;
|
|
1652
|
+
title: string;
|
|
1653
|
+
body?: string;
|
|
1654
|
+
/** With `onOpenNote`, the note gets "Learn more". */
|
|
1655
|
+
url?: string;
|
|
1656
|
+
}
|
|
1657
|
+
interface NativeWhatsNewSheetProps<N extends NativeWhatsNewNote = NativeWhatsNewNote> {
|
|
1658
|
+
notes: readonly N[];
|
|
1659
|
+
/** Close and remember. */
|
|
1660
|
+
dismiss: () => void;
|
|
1661
|
+
/** "Learn more" on a note with a `url`: the sheet closes (and is remembered), then this opens it. */
|
|
1662
|
+
onOpenNote?: (note: N) => void;
|
|
1663
|
+
/** Default "What's new". */
|
|
1664
|
+
title?: string;
|
|
1665
|
+
/** Default "Got it". */
|
|
1666
|
+
doneLabel?: string;
|
|
1667
|
+
/** Default "Learn more". */
|
|
1668
|
+
learnMoreLabel?: string;
|
|
1669
|
+
/** The sheet's; each note is `{testID}-{key}`, Done `{testID}-done`, Learn more `{testID}-open-{key}`. */
|
|
1670
|
+
testID?: string;
|
|
1671
|
+
/** A note's testID. Default `{testID}-{key}`. */
|
|
1672
|
+
noteTestID?: (key: string) => string;
|
|
1673
|
+
}
|
|
1674
|
+
declare function NativeWhatsNewSheet<N extends NativeWhatsNewNote = NativeWhatsNewNote>({ notes, dismiss, onOpenNote, title, doneLabel, learnMoreLabel, testID, noteTestID, }: NativeWhatsNewSheetProps<N>): react.JSX.Element;
|
|
1675
|
+
|
|
1676
|
+
export { Box, type BoxBackground, type BoxProps, type ComposerSendAction, FULL_SCREEN_DARK, type FlexAlign, type FlexJustify, GenesisGlassModule, Grid, type GridProps, Inline, type InlineProps, LIGHTBOX_DISMISS_DISTANCE, LIGHTBOX_DISMISS_VELOCITY, LIGHTBOX_DOUBLE_TAP_MS, LIGHTBOX_MAX_ZOOM, NativeAccordion, NativeAccordionContent, type NativeAccordionContentProps, NativeAccordionItem, type NativeAccordionItemProps, type NativeAccordionProps, NativeAccordionTrigger, type NativeAccordionTriggerProps, type NativeAccordionType, NativeAlert, NativeAlertDescription, type NativeAlertDescriptionProps, type NativeAlertProps, NativeAlertTitle, type NativeAlertTitleProps, NativeAvatar, type NativeAvatarProps, NativeBadge, type NativeBadgeProps, NativeBanner, type NativeBannerProps, type NativeBulkAction, NativeBulkBar, type NativeBulkBarProps, NativeButton, type NativeButtonProps, NativeCard, NativeCardContent, NativeCardDescription, NativeCardFooter, NativeCardHeader, type NativeCardProps, NativeCardTitle, type NativeCardTitleProps, NativeCheckbox, type NativeCheckboxProps, NativeChip, NativeChipGroup, type NativeChipGroupMode, type NativeChipGroupProps, type NativeChipProps, NativeChoiceCard, type NativeChoiceCardProps, NativeCombobox, type NativeComboboxOption, type NativeComboboxProps, NativeComposerBar, type NativeComposerBarProps, NativeContextMenu, type NativeContextMenuAction, type NativeContextMenuProps, NativeDatePicker, type NativeDatePickerProps, NativeDialog, NativeDialogContent, type NativeDialogContentProps, NativeDialogDescription, type NativeDialogDescriptionProps, NativeDialogFooter, type NativeDialogFooterProps, NativeDialogHeader, type NativeDialogHeaderProps, type NativeDialogProps, NativeDialogTitle, type NativeDialogTitleProps, NativeDrawer, type NativeDrawerProps, NativeDropdownMenu, NativeDropdownMenuContent, type NativeDropdownMenuContentProps, NativeDropdownMenuItem, type NativeDropdownMenuItemProps, type NativeDropdownMenuProps, NativeDropdownMenuTrigger, type NativeDropdownMenuTriggerProps, NativeEmptyState, type NativeEmptyStateProps, type NativeEmptyStateVariant, NativeFullScreenModal, type NativeFullScreenModalProps, NativeGalleryCard, type NativeGalleryCardProps, NativeGalleryGrid, type NativeGalleryGridProps, type NativeGalleryLayout, NativeGlassSurface, type NativeGlassSurfaceProps, NativeHeaderCard, type NativeHeaderCardProps, NativeIcon, NativeIconName, type NativeIconProps, NativeImage, type NativeImageProps, NativeInlineAlert, type NativeInlineAlertProps, type NativeInlineAlertVariant, NativeInput, type NativeInputProps, NativeLabel, type NativeLabelProps, NativeLightbox, type NativeLightboxLabels, type NativeLightboxProps, NativeListItem, NativeListItemDivider, type NativeListItemProps, NativeLiveIndicator, type NativeLiveIndicatorProps, type NativeLiveIndicatorState, type NativeLiveIndicatorVariant, NativeLoadingState, type NativeLoadingStateEdge, type NativeLoadingStateProps, NativeNumberInput, type NativeNumberInputProps, NativePagination, type NativePaginationProps, NativePopover, NativePopoverContent, type NativePopoverContentProps, type NativePopoverProps, NativePopoverTrigger, type NativePopoverTriggerProps, NativeProgress, type NativeProgressProps, NativeRadioGroup, NativeRadioGroupItem, type NativeRadioGroupItemProps, type NativeRadioGroupProps, NativeRangeSlider, type NativeRangeSliderProps, NativeRating, type NativeRatingProps, type NativeRatingSize, type NativeRatingTone, NativeRefreshControl, type NativeRefreshControlProps, NativeSearchBar, type NativeSearchBarProps, NativeSectionListHeader, type NativeSectionListHeaderProps, NativeSegmentedControl, type NativeSegmentedControlOption, type NativeSegmentedControlProps, NativeSelect, NativeSelectContent, type NativeSelectContentProps, NativeSelectItem, type NativeSelectItemProps, type NativeSelectProps, NativeSelectTrigger, type NativeSelectTriggerProps, NativeSeparator, type NativeSeparatorProps, NativeShareSheet, type NativeShareSheetProps, NativeSheet, type NativeSheetLibrary, type NativeSheetProps, NativeSheetProvider, type NativeSheetProviderProps, NativeSheetScrollView, NativeSkeleton, type NativeSkeletonProps, NativeSlider, type NativeSliderProps, NativeStepper, type NativeStepperProps, type NativeStepperStep, NativeSwipeRow, type NativeSwipeRowProps, NativeSwitch, type NativeSwitchProps, NativeTabBar, type NativeTabBarItem, type NativeTabBarProps, NativeTabs, NativeTabsContent, type NativeTabsContentProps, NativeTabsList, type NativeTabsListProps, type NativeTabsProps, NativeTabsTrigger, type NativeTabsTriggerProps, NativeText, type NativeTextProps, NativeTextarea, type NativeTextareaProps, NativeThreadList, type NativeThreadListHandle, type NativeThreadListProps, NativeTierBadge, type NativeTierBadgeProps, NativeTimePicker, type NativeTimePickerProps, type NativeToastOptions, NativeToastProvider, type NativeToastProviderProps, type NativeToastVariant, NativeToggle, type NativeToggleProps, NativeTooltip, NativeTooltipContent, type NativeTooltipContentProps, type NativeTooltipProps, NativeTooltipTrigger, type NativeTooltipTriggerProps, type NativeWhatsNewNote, NativeWhatsNewSheet, type NativeWhatsNewSheetProps, NativeZoomablePhoto, type NativeZoomablePhotoProps, type SpaceToken, type SpacingPrefix, Stack, type StackProps, THREAD_AT_BOTTOM_POINTS, type TextPreset, type ThreadRowInfo, alertVariants, badgeTextVariants, badgeVariants, buttonTextVariants, buttonVariants, defaultNativeLightboxLabels, lightboxPanLimit, lightboxPinchScale, lightboxShouldDismiss, lightboxTouchDistance, nextRating, spaceScale, spacingClass, textVariants, threadListMode, threadNearBottom, toggleVariants, useLiquidGlass, useReduceTransparency, useToast };
|
package/dist/components/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { Box, FULL_SCREEN_DARK, Grid, Inline, LIGHTBOX_DISMISS_DISTANCE, LIGHTBOX_DISMISS_VELOCITY, LIGHTBOX_DOUBLE_TAP_MS, LIGHTBOX_MAX_ZOOM, NativeAccordion, NativeAccordionContent, NativeAccordionItem, NativeAccordionTrigger, NativeChip, NativeChipGroup, NativeCombobox, NativeDialog, NativeDialogContent, NativeDialogDescription, NativeDialogFooter, NativeDialogHeader, NativeDialogTitle, NativeDrawer, NativeDropdownMenu, NativeDropdownMenuContent, NativeDropdownMenuItem, NativeDropdownMenuTrigger, NativeFullScreenModal, NativeGalleryCard, NativeGlassSurface, NativeHeaderCard, NativeLightbox, NativeLiveIndicator, NativeNumberInput, NativePagination, NativePopover, NativePopoverContent, NativePopoverTrigger, NativeProgress, NativeRadioGroup, NativeRadioGroupItem, NativeRangeSlider, NativeRating, NativeSlider, NativeStepper, NativeTabs, NativeTabsContent, NativeTabsList, NativeTabsTrigger, NativeToastProvider, NativeToggle, NativeTooltip, NativeTooltipContent, NativeTooltipTrigger, NativeZoomablePhoto, Stack, defaultNativeLightboxLabels, lightboxPanLimit, lightboxPinchScale, lightboxShouldDismiss, lightboxTouchDistance, nextRating, spaceScale, spacingClass, toggleVariants, useLiquidGlass, useReduceTransparency, useToast } from '../chunk-
|
|
2
|
-
export { DEFAULT_GALLERY_RATIO, GALLERY_DEFAULTS, NativeAlert, NativeAlertDescription, NativeAlertTitle, NativeAvatar, NativeBanner, NativeCard, NativeCardContent, NativeCardDescription, NativeCardFooter, NativeCardHeader, NativeCardTitle, NativeCheckbox, NativeDatePicker, NativeGalleryGrid, NativeImage, NativeInlineAlert, NativeLabel, NativeSearchBar, NativeSegmentedControl, NativeSelect, NativeSelectContent, NativeSelectItem, NativeSelectTrigger, NativeSeparator,
|
|
3
|
-
export { NativeComposerBar, NativeThreadList, THREAD_AT_BOTTOM_POINTS, threadListMode, threadNearBottom } from '../chunk-
|
|
4
|
-
export {
|
|
5
|
-
|
|
1
|
+
export { Box, FULL_SCREEN_DARK, Grid, Inline, LIGHTBOX_DISMISS_DISTANCE, LIGHTBOX_DISMISS_VELOCITY, LIGHTBOX_DOUBLE_TAP_MS, LIGHTBOX_MAX_ZOOM, NativeAccordion, NativeAccordionContent, NativeAccordionItem, NativeAccordionTrigger, NativeBulkBar, NativeChip, NativeChipGroup, NativeChoiceCard, NativeCombobox, NativeDialog, NativeDialogContent, NativeDialogDescription, NativeDialogFooter, NativeDialogHeader, NativeDialogTitle, NativeDrawer, NativeDropdownMenu, NativeDropdownMenuContent, NativeDropdownMenuItem, NativeDropdownMenuTrigger, NativeFullScreenModal, NativeGalleryCard, NativeGlassSurface, NativeHeaderCard, NativeLightbox, NativeLiveIndicator, NativeNumberInput, NativePagination, NativePopover, NativePopoverContent, NativePopoverTrigger, NativeProgress, NativeRadioGroup, NativeRadioGroupItem, NativeRangeSlider, NativeRating, NativeShareSheet, NativeSlider, NativeStepper, NativeTabBar, NativeTabs, NativeTabsContent, NativeTabsList, NativeTabsTrigger, NativeTierBadge, NativeToastProvider, NativeToggle, NativeTooltip, NativeTooltipContent, NativeTooltipTrigger, NativeWhatsNewSheet, NativeZoomablePhoto, Stack, defaultNativeLightboxLabels, lightboxPanLimit, lightboxPinchScale, lightboxShouldDismiss, lightboxTouchDistance, nextRating, spaceScale, spacingClass, toggleVariants, useLiquidGlass, useReduceTransparency, useToast } from '../chunk-UZCJDMGE.js';
|
|
2
|
+
export { DEFAULT_GALLERY_RATIO, GALLERY_DEFAULTS, NativeAlert, NativeAlertDescription, NativeAlertTitle, NativeAvatar, NativeBanner, NativeCard, NativeCardContent, NativeCardDescription, NativeCardFooter, NativeCardHeader, NativeCardTitle, NativeCheckbox, NativeDatePicker, NativeGalleryGrid, NativeImage, NativeInlineAlert, NativeLabel, NativeSearchBar, NativeSegmentedControl, NativeSelect, NativeSelectContent, NativeSelectItem, NativeSelectTrigger, NativeSeparator, NativeSwitch, NativeTextarea, NativeTimePicker, alertVariants, galleryItemRatio, justifyRows } from '../chunk-DHONOH6K.js';
|
|
3
|
+
export { NativeComposerBar, NativeThreadList, THREAD_AT_BOTTOM_POINTS, threadListMode, threadNearBottom } from '../chunk-JZ7RAGDQ.js';
|
|
4
|
+
export { NATIVE_ICON_NAMES, NativeBadge, NativeButton, NativeContextMenu, NativeEmptyState, NativeIcon, NativeInput, NativeListItem, NativeListItemDivider, NativeLoadingState, NativeRefreshControl, NativeSectionListHeader, NativeSheet, NativeSheetProvider, NativeSheetScrollView, NativeSkeleton, NativeSwipeRow, NativeText, SF_SYMBOLS, badgeTextVariants, badgeVariants, buttonTextVariants, buttonVariants, textVariants } from '../chunk-FGIIBON3.js';
|
|
5
|
+
export { GenesisModulesProvider, useGenesisModules } from '../chunk-PWS2HLDE.js';
|
|
6
6
|
import '../chunk-OHZD7KRO.js';
|
|
7
7
|
import '../chunk-DGUM43GV.js';
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
package/dist/data/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { ResourceFormFieldDef, BaseRecord, DataRow, FieldReference, WriteConflic
|
|
|
4
4
|
import { Control, UseFormReturn } from 'react-hook-form';
|
|
5
5
|
import { UseResourceOptions } from '@marktiderman/genesis-core/hooks';
|
|
6
6
|
import { ResourceView, DisplayHint, ResolvedFormField, ResolvedLink, Allowed, RowSummary, RowPicture, Viewer, ViewGallery, ResolvedColumn, RecordView } from '@marktiderman/genesis-core/resource-view';
|
|
7
|
-
import { b as InboxPageSlotMap, e as ScreenHeaderProps } from '../inbox-page-
|
|
7
|
+
import { b as InboxPageSlotMap, e as ScreenHeaderProps } from '../inbox-page-BGqR_cBs.js';
|
|
8
8
|
import { InboxSwipeAction } from '@marktiderman/genesis-core/conversation';
|
|
9
9
|
import { ReadinessLabels } from '@marktiderman/genesis-core/resource';
|
|
10
10
|
import '@marktiderman/genesis-core/slots';
|
|
@@ -444,6 +444,7 @@ declare const DEFAULT_MAX_PAGES = 10;
|
|
|
444
444
|
type ServerSort = {
|
|
445
445
|
field: string;
|
|
446
446
|
order: "asc" | "desc";
|
|
447
|
+
nulls?: "first" | "last";
|
|
447
448
|
};
|
|
448
449
|
/**
|
|
449
450
|
* The server sorts: the `groupBy` field first, so every page arrives in section order and a later
|
package/dist/data/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { NativeImage, NativeAvatar, NativeCard, NativeCardContent, NativeSeparator, NativeLabel, NativeSwitch, NativeCheckbox, NativeSelect, NativeSelectTrigger, NativeSelectContent, NativeSelectItem, NativeTextarea,
|
|
2
|
-
import { showInboxActions, NavBarSaveButton, composeHeaderOptions } from '../chunk-
|
|
3
|
-
import { NativeListItem, NativeBadge, NativeText, NativeButton, NativeInput,
|
|
4
|
-
import { useThemeRoles } from '../chunk-
|
|
1
|
+
import { NativeImage, NativeAvatar, NativeCard, NativeCardContent, NativeSeparator, NativeLabel, NativeSwitch, NativeCheckbox, NativeSelect, NativeSelectTrigger, NativeSelectContent, NativeSelectItem, NativeTextarea, NativeAlert, NativeAlertTitle, NativeAlertDescription, NativeInlineAlert, NativeSegmentedControl, NativeDatePicker, NativeTimePicker, NativeSearchBar, NativeGalleryGrid, NativeCardHeader, NativeCardTitle } from '../chunk-DHONOH6K.js';
|
|
2
|
+
import { showInboxActions, NavBarSaveButton, composeHeaderOptions } from '../chunk-PWYMRUAK.js';
|
|
3
|
+
import { NativeListItem, NativeBadge, NativeText, NativeButton, NativeInput, NativeSheet, NativeSheetScrollView, NativeLoadingState, NativeSectionListHeader, NativeEmptyState, NativeRefreshControl, NativeIcon, NativeSkeleton } from '../chunk-FGIIBON3.js';
|
|
4
|
+
import { useGenesisModules, useThemeRoles } from '../chunk-PWS2HLDE.js';
|
|
5
5
|
import '../chunk-OHZD7KRO.js';
|
|
6
6
|
import '../chunk-DGUM43GV.js';
|
|
7
7
|
import { Platform, View, Pressable, Text, Linking, ScrollView, AccessibilityInfo, Alert, SectionList, ActionSheetIOS, FlatList } from 'react-native';
|
|
@@ -9,7 +9,7 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
|
9
9
|
import * as React from 'react';
|
|
10
10
|
import { createContext, memo, useState, useCallback, useEffect, useMemo, useContext, useRef, useLayoutEffect } from 'react';
|
|
11
11
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
12
|
-
import { encodeRecordKey, titleCase, useResourceForm, resourceKeys, useDataProvider, useCapabilities as useCapabilities$1, useViewer as useViewer$1, useResource as useResource$1, writeConflict, isDataWriteError, DataWriteError } from '@marktiderman/genesis-core';
|
|
12
|
+
import { encodeRecordKey, titleCase, useResourceForm, resourceKeys, useDataProvider, useCapabilities as useCapabilities$1, useViewer as useViewer$1, useResource as useResource$1, writeConflict, isDataWriteError, NO_ROWS_MATCHED, DataWriteError } from '@marktiderman/genesis-core';
|
|
13
13
|
import { Controller, useForm } from 'react-hook-form';
|
|
14
14
|
import { useRelationLabel, useResource, useViewer, useInfiniteResource, useCapabilities, useOptionalViewerScope, scopeClock, useOne, useLinkOptions } from '@marktiderman/genesis-core/hooks';
|
|
15
15
|
import { personTimeZone, isTimeZone, wallClock } from '@marktiderman/genesis-core/dates';
|
|
@@ -1717,7 +1717,7 @@ var DEFAULT_MAX_PAGES = 10;
|
|
|
1717
1717
|
function serverSorts(view) {
|
|
1718
1718
|
const groupBy = view.definition.groupBy;
|
|
1719
1719
|
const orderBy = view.definition.orderBy;
|
|
1720
|
-
const order = orderBy ? { field: orderBy.field, order: orderBy.direction ?? "asc" } : void 0;
|
|
1720
|
+
const order = orderBy ? { field: orderBy.field, order: orderBy.direction ?? "asc", ...orderBy.nulls ? { nulls: orderBy.nulls } : {} } : void 0;
|
|
1721
1721
|
if (!groupBy) return order ? [order] : [];
|
|
1722
1722
|
if (order?.field === groupBy) return [order];
|
|
1723
1723
|
return [{ field: groupBy, order: "asc" }, ...order ? [order] : []];
|
|
@@ -2679,11 +2679,6 @@ function SettingsGroup({
|
|
|
2679
2679
|
try {
|
|
2680
2680
|
const version = expectedVersion ?? (versionField ? (editBase.current ?? row)[versionField] : void 0);
|
|
2681
2681
|
const saved = await update(recordView.recordId(row), data, version != null ? { expectedVersion: String(version) } : void 0);
|
|
2682
|
-
if (saved === null || saved === void 0) {
|
|
2683
|
-
lastFailure.current = fill(words.notChanged, { noun: view.noun });
|
|
2684
|
-
setRefusal(lastFailure.current);
|
|
2685
|
-
return "failed";
|
|
2686
|
-
}
|
|
2687
2682
|
if (versionField && saved[versionField] != null) editBase.current = { ...editBase.current ?? row, [versionField]: saved[versionField] };
|
|
2688
2683
|
setConflict(null);
|
|
2689
2684
|
onSaved(saved);
|
|
@@ -2694,7 +2689,7 @@ function SettingsGroup({
|
|
|
2694
2689
|
setConflict({ conflict: found, values, row: error.current, message: error.message });
|
|
2695
2690
|
return "conflict";
|
|
2696
2691
|
}
|
|
2697
|
-
lastFailure.current = refusalMessage(error, words.failed);
|
|
2692
|
+
lastFailure.current = isDataWriteError(error) && error.code === NO_ROWS_MATCHED ? fill(words.notChanged, { noun: view.noun }) : refusalMessage(error, words.failed);
|
|
2698
2693
|
setRefusal(lastFailure.current);
|
|
2699
2694
|
return "failed";
|
|
2700
2695
|
} finally {
|