@pallasoft/ps-mobile-components 1.12.0 → 1.13.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 (63) hide show
  1. package/dist/components/ps-action-sheet/ps-action-sheet.js +18 -2
  2. package/dist/components/ps-barcode-scanner-sheet/ps-barcode-scanner-sheet.js +2 -1
  3. package/dist/components/ps-document-viewer/ps-document-viewer.js +2 -1
  4. package/dist/components/ps-document-zoom-image/ps-document-zoom-image.js +10 -0
  5. package/dist/components/ps-infinite-list/ps-infinite-list-props.d.ts +2 -0
  6. package/dist/components/ps-infinite-list/ps-infinite-list.d.ts +1 -1
  7. package/dist/components/ps-infinite-list/ps-infinite-list.js +12 -5
  8. package/dist/components/ps-list/ps-list-props.d.ts +2 -0
  9. package/dist/components/ps-list/ps-list.d.ts +1 -1
  10. package/dist/components/ps-list/ps-list.js +1 -1
  11. package/dist/components/ps-menu-popup/ps-menu-popup.js +3 -2
  12. package/dist/components/ps-screen/ps-screen-props.d.ts +2 -0
  13. package/dist/components/ps-screen/ps-screen.d.ts +1 -1
  14. package/dist/components/ps-screen/ps-screen.js +12 -5
  15. package/dist/components/ps-sheet-content/ps-sheet-content.js +4 -2
  16. package/dist/components/ps-sheet-presenter/ps-sheet-presenter.ios.js +15 -5
  17. package/dist/components/ps-sheet-presenter/ps-sheet-presenter.js +16 -3
  18. package/dist/components/ps-sortable-grid/ps-sortable-grid.js +4 -1
  19. package/dist/components/ps-widget-list/ps-widget-grid.js +16 -7
  20. package/dist/components/ps-widget-list/ps-widget-list-props.d.ts +2 -0
  21. package/dist/components/ps-widget-list/ps-widget-list.d.ts +1 -1
  22. package/dist/components/ps-widget-list/ps-widget-list.js +12 -5
  23. package/dist/constants/ps-content-width.d.ts +6 -0
  24. package/dist/constants/ps-content-width.js +5 -0
  25. package/dist/constants/ps-document-search-config.d.ts +0 -3
  26. package/dist/constants/ps-document-search-config.js +0 -3
  27. package/dist/constants/ps-layout-class-config.d.ts +12 -0
  28. package/dist/constants/ps-layout-class-config.js +12 -0
  29. package/dist/constants/ps-layout-class.d.ts +5 -0
  30. package/dist/constants/ps-layout-class.js +4 -0
  31. package/dist/constants/ps-menu-popup-config.d.ts +1 -0
  32. package/dist/constants/ps-menu-popup-config.js +1 -0
  33. package/dist/constants/ps-orientation-config.d.ts +3 -0
  34. package/dist/constants/ps-orientation-config.js +3 -0
  35. package/dist/constants/ps-sheet-config.d.ts +1 -0
  36. package/dist/constants/ps-sheet-config.js +1 -0
  37. package/dist/constants/ps-sortable-grid-config.d.ts +2 -0
  38. package/dist/constants/ps-sortable-grid-config.js +2 -0
  39. package/dist/hooks/use-ps-layout-class.d.ts +2 -0
  40. package/dist/hooks/use-ps-layout-class.js +6 -0
  41. package/dist/hooks/use-ps-menu-anchor.d.ts +1 -1
  42. package/dist/hooks/use-ps-menu-anchor.js +14 -2
  43. package/dist/index.d.ts +4 -0
  44. package/dist/index.js +4 -0
  45. package/dist/interfaces/ps-document-search-match.d.ts +2 -4
  46. package/dist/interfaces/ps-document-text-box.d.ts +2 -6
  47. package/dist/interfaces/ps-document-text-layer-word.d.ts +2 -5
  48. package/dist/interfaces/ps-document-text-layer.d.ts +2 -6
  49. package/dist/interfaces/ps-document-text-segment.d.ts +2 -4
  50. package/dist/interfaces/ps-menu-popup-insets.d.ts +2 -0
  51. package/dist/interfaces/ps-menu-popup-layout.d.ts +1 -0
  52. package/dist/services/ps-document-search-service.d.ts +0 -4
  53. package/dist/services/ps-document-search-service.js +9 -96
  54. package/dist/services/ps-layout-service.d.ts +12 -0
  55. package/dist/services/ps-layout-service.js +41 -0
  56. package/dist/services/ps-menu-popup-service.js +8 -4
  57. package/dist/services/ps-sheet-service.d.ts +5 -2
  58. package/dist/services/ps-sheet-service.js +17 -4
  59. package/dist/services/ps-sortable-grid-service.d.ts +3 -2
  60. package/dist/services/ps-sortable-grid-service.js +26 -22
  61. package/package.json +2 -2
  62. package/dist/interfaces/ps-document-normalized-text.d.ts +0 -5
  63. package/dist/interfaces/ps-document-normalized-text.js +0 -1
@@ -1,35 +1,51 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useRef } from 'react';
3
3
  import { PsIconKey } from '@pallasoft/ps-icons';
4
- import { Modal, Pressable, StyleSheet, View } from 'react-native';
4
+ import { Modal, Pressable, StyleSheet, View, useWindowDimensions } from 'react-native';
5
5
  import Animated, { FadeInDown } from 'react-native-reanimated';
6
6
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
7
+ import { PsLayoutClass } from '../../constants/ps-layout-class';
7
8
  import { PsLayoutConfig } from '../../constants/ps-layout-config';
8
9
  import { PsMobileControlConfig } from '../../constants/ps-mobile-control-config';
10
+ import { PsOrientationConfig } from '../../constants/ps-orientation-config';
9
11
  import { PsRippleKind } from '../../constants/ps-ripple-kind';
12
+ import { usePsLayoutClass } from '../../hooks/use-ps-layout-class';
10
13
  import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
11
14
  import { PsActionSheetService } from '../../services/ps-action-sheet-service';
12
15
  import { PsRippleService } from '../../services/ps-ripple-service';
16
+ import { PsSheetService } from '../../services/ps-sheet-service';
13
17
  import { PsStateService } from '../../services/ps-state-service';
14
18
  import { PsIcon } from '../ps-icon/ps-icon';
15
19
  import { PsText } from '../ps-text/ps-text';
16
20
  export const PsActionSheet = ({ cancelLabel, isOpen, items, onClose, title, }) => {
17
21
  const theme = usePsMobileTheme();
18
22
  const insets = useSafeAreaInsets();
23
+ const layoutClass = usePsLayoutClass();
24
+ const { width: windowWidth } = useWindowDimensions();
25
+ const isRegular = layoutClass === PsLayoutClass.regular;
19
26
  const pending = useRef(undefined);
20
27
  const runPending = () => {
21
28
  const action = pending.current;
22
29
  pending.current = undefined;
23
30
  action?.();
24
31
  };
25
- return (_jsxs(Modal, { animationType: 'fade', onDismiss: runPending, onRequestClose: onClose, statusBarTranslucent: true, transparent: true, visible: isOpen, children: [_jsx(Pressable, { accessibilityElementsHidden: true, onPress: onClose, style: [StyleSheet.absoluteFill, { backgroundColor: theme.overlay }] }), _jsx(View, { pointerEvents: 'box-none', style: { flex: 1, justifyContent: 'flex-end' }, children: _jsxs(Animated.View, { entering: FadeInDown, style: {
32
+ return (_jsxs(Modal, { animationType: 'fade', onDismiss: runPending, onRequestClose: onClose, statusBarTranslucent: true, supportedOrientations: PsOrientationConfig.all, transparent: true, visible: isOpen, children: [_jsx(Pressable, { accessibilityElementsHidden: true, onPress: onClose, style: [StyleSheet.absoluteFill, { backgroundColor: theme.overlay }] }), _jsx(View, { pointerEvents: 'box-none', style: {
33
+ alignItems: isRegular ? 'center' : undefined,
34
+ flex: 1,
35
+ justifyContent: 'flex-end',
36
+ }, children: _jsxs(Animated.View, { entering: FadeInDown, style: {
26
37
  backgroundColor: theme.surface,
27
38
  borderColor: theme.line,
39
+ borderBottomLeftRadius: isRegular ? PsLayoutConfig.actionSheetRadius : 0,
40
+ borderBottomRightRadius: isRegular ? PsLayoutConfig.actionSheetRadius : 0,
28
41
  borderTopLeftRadius: PsLayoutConfig.actionSheetRadius,
29
42
  borderTopRightRadius: PsLayoutConfig.actionSheetRadius,
30
43
  borderWidth: 1,
44
+ marginBottom: isRegular ? PsLayoutConfig.gutter : 0,
45
+ maxWidth: PsSheetService.fittedMaxWidth(windowWidth, layoutClass),
31
46
  paddingBottom: insets.bottom + PsLayoutConfig.sheetFooterGap,
32
47
  paddingTop: PsLayoutConfig.sheetFooterGap,
48
+ width: isRegular ? '100%' : undefined,
33
49
  }, testID: 'ps-action-sheet', children: [title === undefined ? null : (_jsx(View, { style: { paddingHorizontal: PsLayoutConfig.gutter, paddingVertical: 8 }, children: _jsx(PsText, { tone: 'muted', variant: 'label', children: title }) })), items.map((item) => (_jsxs(Pressable, { android_ripple: PsRippleService.resolve(theme, PsRippleKind.Surface), accessibilityRole: 'menuitem', accessibilityState: { disabled: item.isDisabled === true }, disabled: item.isDisabled, onPress: () => {
34
50
  pending.current = item.onSelect;
35
51
  onClose();
@@ -6,6 +6,7 @@ import { Linking, Modal, StatusBar, StyleSheet, View, useWindowDimensions } from
6
6
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
7
7
  import { PsBarcodePermission } from '../../constants/ps-barcode-permission';
8
8
  import { PsBarcodeScannerConfig } from '../../constants/ps-barcode-scanner-config';
9
+ import { PsOrientationConfig } from '../../constants/ps-orientation-config';
9
10
  import { usePsHaptics } from '../../hooks/use-ps-haptics';
10
11
  import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
11
12
  import { PsBarcodeScannerService } from '../../services/ps-barcode-scanner-service';
@@ -41,7 +42,7 @@ export const PsBarcodeScannerSheet = ({ barcodeTypes, isContinuous = false, isOp
41
42
  if (!isContinuous)
42
43
  onClose();
43
44
  };
44
- return (_jsxs(Modal, { animationType: 'fade', onRequestClose: onClose, presentationStyle: 'fullScreen', visible: isOpen, children: [_jsx(StatusBar, { barStyle: 'light-content' }), _jsxs(View, { style: { backgroundColor: PsBarcodeScannerConfig.backdropColor, flex: 1 }, testID: 'ps-barcode-scanner', children: [Camera !== null && permission === PsBarcodePermission.granted ? (_jsx(Camera, { barcodeScannerSettings: {
45
+ return (_jsxs(Modal, { animationType: 'fade', onRequestClose: onClose, presentationStyle: 'fullScreen', supportedOrientations: PsOrientationConfig.all, visible: isOpen, children: [_jsx(StatusBar, { barStyle: 'light-content' }), _jsxs(View, { style: { backgroundColor: PsBarcodeScannerConfig.backdropColor, flex: 1 }, testID: 'ps-barcode-scanner', children: [Camera !== null && permission === PsBarcodePermission.granted ? (_jsx(Camera, { barcodeScannerSettings: {
45
46
  barcodeTypes: PsBarcodeScannerService.types(barcodeTypes),
46
47
  }, enableTorch: isTorchOn, facing: PsBarcodeScannerConfig.facing, onBarcodeScanned: read, style: StyleSheet.absoluteFill })) : null, permission === PsBarcodePermission.granted ? (_jsx(View, { pointerEvents: 'none', style: [
47
48
  StyleSheet.absoluteFill,
@@ -7,6 +7,7 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
7
7
  import { PsDocumentConfig } from '../../constants/ps-document-config';
8
8
  import { PsDocumentSearchConfig } from '../../constants/ps-document-search-config';
9
9
  import { PsMobileControlConfig } from '../../constants/ps-mobile-control-config';
10
+ import { PsOrientationConfig } from '../../constants/ps-orientation-config';
10
11
  import { usePsDocumentPdfPages } from '../../hooks/use-ps-document-pdf-pages';
11
12
  import { usePsDocumentSearchTexts } from '../../hooks/use-ps-document-search-texts';
12
13
  import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
@@ -72,7 +73,7 @@ export const PsDocumentViewer = ({ initialIndex = 0, isOpen, items, labels, onCl
72
73
  if (width > 0 && entries.length > 0)
73
74
  list.current?.scrollToIndex({ animated: false, index });
74
75
  }, [entries.length, index, width]);
75
- return (_jsxs(Modal, { animationType: 'fade', onRequestClose: onClose, presentationStyle: 'fullScreen', visible: isOpen, children: [_jsx(StatusBar, { barStyle: 'light-content' }), _jsxs(GestureHandlerRootView, { style: {
76
+ return (_jsxs(Modal, { animationType: 'fade', onRequestClose: onClose, presentationStyle: 'fullScreen', supportedOrientations: PsOrientationConfig.all, visible: isOpen, children: [_jsx(StatusBar, { barStyle: 'light-content' }), _jsxs(GestureHandlerRootView, { style: {
76
77
  backgroundColor: PsDocumentConfig.backdropColor,
77
78
  flex: 1,
78
79
  paddingBottom: insets.bottom,
@@ -100,6 +100,16 @@ export const PsDocumentZoomImage = ({ name, onDismiss, onError, onZoomChange, se
100
100
  baseX.value = nextX;
101
101
  baseY.value = nextY;
102
102
  }, [search?.activeIndex, search?.query]);
103
+ useEffect(() => {
104
+ scale.value = PsDocumentConfig.minZoom;
105
+ baseScale.value = PsDocumentConfig.minZoom;
106
+ x.value = 0;
107
+ y.value = 0;
108
+ baseX.value = 0;
109
+ baseY.value = 0;
110
+ setIsZoomed(false);
111
+ onZoomChange(false);
112
+ }, [size.height, size.width]);
103
113
  const gesture = useSimultaneousGestures(pinch, move, dismiss, doubleTap);
104
114
  const animatedStyle = useAnimatedStyle(() => ({
105
115
  transform: [
@@ -1,5 +1,6 @@
1
1
  import type { ReactElement, ReactNode } from 'react';
2
2
  import type { StyleProp, ViewStyle } from 'react-native';
3
+ import type { PsContentWidth } from '../../constants/ps-content-width';
3
4
  import type { PsListVariant } from '../../services/ps-list-service';
4
5
  import type { PsListSkeletonLayout } from '../ps-list/ps-list-props';
5
6
  export interface PsInfiniteSection<T> {
@@ -9,6 +10,7 @@ export interface PsInfiniteSection<T> {
9
10
  title?: string;
10
11
  }
11
12
  export interface PsInfiniteListProps<T> {
13
+ contentWidth?: PsContentWidth;
12
14
  empty?: ReactNode;
13
15
  hasMore: boolean;
14
16
  header?: ReactNode;
@@ -1,2 +1,2 @@
1
1
  import type { PsInfiniteListProps } from './ps-infinite-list-props';
2
- export declare const PsInfiniteList: <T>({ empty, hasMore, header, isLoading, isLoadingMore, items, keyExtractor, onEndReached, onRefresh, renderItem, sections, skeleton, style, variant, }: PsInfiniteListProps<T>) => import("react").JSX.Element;
2
+ export declare const PsInfiniteList: <T>({ contentWidth, empty, hasMore, header, isLoading, isLoadingMore, items, keyExtractor, onEndReached, onRefresh, renderItem, sections, skeleton, style, variant, }: PsInfiniteListProps<T>) => import("react").JSX.Element;
@@ -1,34 +1,41 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Platform, RefreshControl, SectionList, View } from 'react-native';
3
3
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
+ import { PsContentWidth } from '../../constants/ps-content-width';
4
5
  import { PsInfiniteConfig } from '../../constants/ps-infinite-config';
5
6
  import { PsLayoutConfig } from '../../constants/ps-layout-config';
6
7
  import { PsSelectionBarConfig } from '../../constants/ps-selection-bar-config';
7
8
  import { PsScrollContext } from '../../contexts/ps-scroll-context';
9
+ import { usePsLayoutClass } from '../../hooks/use-ps-layout-class';
8
10
  import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
9
11
  import { usePsRefresh } from '../../hooks/use-ps-refresh';
10
12
  import { usePsScrollHost } from '../../hooks/use-ps-scroll-host';
11
13
  import { usePsTabBar } from '../../hooks/use-ps-tab-bar';
12
14
  import { usePsTopInset } from '../../hooks/use-ps-top-inset';
13
15
  import { PsInfiniteListService } from '../../services/ps-infinite-list-service';
16
+ import { PsLayoutService } from '../../services/ps-layout-service';
14
17
  import { PsListService } from '../../services/ps-list-service';
15
18
  import { PsScreenService } from '../../services/ps-screen-service';
16
19
  import { PsSkeletonList } from '../ps-skeleton/ps-skeleton-list';
17
20
  import { PsText } from '../ps-text/ps-text';
18
21
  import { PsInfiniteListFooter } from './ps-infinite-list-footer';
19
22
  import { PsInfiniteListItem } from './ps-infinite-list-item';
20
- export const PsInfiniteList = ({ empty, hasMore, header, isLoading = false, isLoadingMore = false, items, keyExtractor, onEndReached, onRefresh, renderItem, sections, skeleton, style, variant = 'grouped', }) => {
23
+ export const PsInfiniteList = ({ contentWidth = PsContentWidth.readable, empty, hasMore, header, isLoading = false, isLoadingMore = false, items, keyExtractor, onEndReached, onRefresh, renderItem, sections, skeleton, style, variant = 'grouped', }) => {
21
24
  const theme = usePsMobileTheme();
22
25
  const insets = useSafeAreaInsets();
23
26
  const topInset = usePsTopInset();
24
27
  const { hasTabBar, isHidden: isTabBarHidden } = usePsTabBar();
25
28
  const { isRefreshing, refresh } = usePsRefresh(onRefresh);
26
29
  const host = usePsScrollHost();
30
+ const layoutClass = usePsLayoutClass();
27
31
  const shown = isLoading ? [] : PsInfiniteListService.sections(items, sections);
28
- return (_jsxs(View, { style: { flex: 1 }, children: [_jsx(PsScrollContext, { value: host.context, children: _jsx(SectionList, { ListEmptyComponent: isLoading ? _jsx(PsSkeletonList, { layout: skeleton }) : _jsx(_Fragment, { children: empty }), ListFooterComponent: _jsx(PsInfiniteListFooter, { isLoadingMore: isLoadingMore }), ListHeaderComponent: header === undefined ? undefined : (_jsx(View, { style: { marginBottom: PsLayoutConfig.listGap }, children: header })), contentContainerStyle: PsScreenService.content({
29
- bottom: PsScreenService.bottomInset(insets.bottom, hasTabBar, isTabBarHidden),
30
- top: topInset,
31
- }, Platform.OS === 'ios', PsListService.hasGutter(variant), 0, isTabBarHidden ? PsSelectionBarConfig.height : 0), contentInsetAdjustmentBehavior: 'automatic', initialNumToRender: PsInfiniteConfig.initialNumToRender, keyExtractor: keyExtractor, keyboardDismissMode: 'interactive', keyboardShouldPersistTaps: 'handled', maxToRenderPerBatch: PsInfiniteConfig.maxToRenderPerBatch, onContentSizeChange: host.onContentSizeChange, onEndReached: () => {
32
+ return (_jsxs(View, { style: { flex: 1 }, children: [_jsx(PsScrollContext, { value: host.context, children: _jsx(SectionList, { ListEmptyComponent: isLoading ? _jsx(PsSkeletonList, { layout: skeleton }) : _jsx(_Fragment, { children: empty }), ListFooterComponent: _jsx(PsInfiniteListFooter, { isLoadingMore: isLoadingMore }), ListHeaderComponent: header === undefined ? undefined : (_jsx(View, { style: { marginBottom: PsLayoutConfig.listGap }, children: header })), contentContainerStyle: [
33
+ PsScreenService.content({
34
+ bottom: PsScreenService.bottomInset(insets.bottom, hasTabBar, isTabBarHidden),
35
+ top: topInset,
36
+ }, Platform.OS === 'ios', PsListService.hasGutter(variant), 0, isTabBarHidden ? PsSelectionBarConfig.height : 0),
37
+ PsLayoutService.frame(layoutClass, contentWidth),
38
+ ], contentInsetAdjustmentBehavior: 'automatic', initialNumToRender: PsInfiniteConfig.initialNumToRender, keyExtractor: keyExtractor, keyboardDismissMode: 'interactive', keyboardShouldPersistTaps: 'handled', maxToRenderPerBatch: PsInfiniteConfig.maxToRenderPerBatch, onContentSizeChange: host.onContentSizeChange, onEndReached: () => {
32
39
  if (PsInfiniteListService.shouldLoadMore(hasMore, isLoading, isLoadingMore))
33
40
  onEndReached();
34
41
  }, onEndReachedThreshold: PsInfiniteConfig.endReachedThreshold, onLayout: host.onLayout, onScroll: host.onScroll, refreshControl: onRefresh === undefined ? undefined : (_jsx(RefreshControl, { colors: [theme.primaryText], onRefresh: () => void refresh(), progressBackgroundColor: theme.surface, refreshing: isRefreshing, tintColor: theme.primary })), renderItem: ({ index, item, section }) => (_jsx(PsInfiniteListItem, { count: section.data.length, index: index, children: renderItem(item) })), renderSectionFooter: ({ section }) => (_jsx(View, { style: {
@@ -1,6 +1,7 @@
1
1
  import type { ReactElement, ReactNode } from 'react';
2
2
  import type { PsIconKey } from '@pallasoft/ps-icons';
3
3
  import type { StyleProp, ViewStyle } from 'react-native';
4
+ import type { PsContentWidth } from '../../constants/ps-content-width';
4
5
  import type { PsMenuItem } from '../../interfaces/ps-menu-item';
5
6
  import type { PsBadgeTone } from '../../services/ps-badge-tone-service';
6
7
  import type { PsListVariant } from '../../services/ps-list-service';
@@ -26,6 +27,7 @@ export interface PsListSkeletonResolved {
26
27
  }
27
28
  export interface PsListProps {
28
29
  children: ReactNode;
30
+ contentWidth?: PsContentWidth;
29
31
  header?: ReactNode;
30
32
  isLoading?: boolean;
31
33
  onRefresh?: () => Promise<void>;
@@ -1,2 +1,2 @@
1
1
  import type { PsListProps } from './ps-list-props';
2
- export declare const PsList: ({ children, header, isLoading, onRefresh, skeleton, style, variant, }: PsListProps) => import("react").JSX.Element;
2
+ export declare const PsList: ({ children, contentWidth, header, isLoading, onRefresh, skeleton, style, variant, }: PsListProps) => import("react").JSX.Element;
@@ -3,4 +3,4 @@ import { PsLayoutConfig } from '../../constants/ps-layout-config';
3
3
  import { PsListService } from '../../services/ps-list-service';
4
4
  import { PsScreen } from '../ps-screen/ps-screen';
5
5
  import { PsSkeletonList } from '../ps-skeleton/ps-skeleton-list';
6
- export const PsList = ({ children, header, isLoading = false, onRefresh, skeleton, style, variant = 'grouped', }) => (_jsx(PsScreen, { gap: PsLayoutConfig.listGap, hasGutter: PsListService.hasGutter(variant), header: header, onRefresh: onRefresh, style: style, children: isLoading ? _jsx(PsSkeletonList, { layout: skeleton }) : children }));
6
+ export const PsList = ({ children, contentWidth, header, isLoading = false, onRefresh, skeleton, style, variant = 'grouped', }) => (_jsx(PsScreen, { contentWidth: contentWidth, gap: PsLayoutConfig.listGap, hasGutter: PsListService.hasGutter(variant), header: header, onRefresh: onRefresh, style: style, children: isLoading ? _jsx(PsSkeletonList, { layout: skeleton }) : children }));
@@ -4,6 +4,7 @@ import { Modal, Pressable, ScrollView, StyleSheet, useWindowDimensions } from 'r
4
4
  import Animated from 'react-native-reanimated';
5
5
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
6
6
  import { PsMenuPopupConfig } from '../../constants/ps-menu-popup-config';
7
+ import { PsOrientationConfig } from '../../constants/ps-orientation-config';
7
8
  import { usePsMaterialScheme } from '../../hooks/use-ps-material-scheme';
8
9
  import { usePsMenuPopupReveal } from '../../hooks/use-ps-menu-popup-reveal';
9
10
  import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
@@ -21,7 +22,7 @@ export const PsMenuPopup = ({ anchor, children, isFullWidth = false, onClose, })
21
22
  : PsMenuPopupService.layout(anchor, window, insets, size.height, size.width, isFullWidth);
22
23
  const container = PsMenuPopupStyleService.container(theme, scheme, isMaterial);
23
24
  const reveal = usePsMenuPopupReveal(size !== undefined, layout.isBelow, isMaterial);
24
- return (_jsxs(Modal, { animationType: isMaterial ? 'none' : 'fade', navigationBarTranslucent: true, onRequestClose: onClose, statusBarTranslucent: true, transparent: true, visible: true, children: [_jsx(Pressable, { accessibilityElementsHidden: true, onPress: onClose, style: StyleSheet.absoluteFill, testID: 'ps-menu-popup-backdrop' }), _jsx(Animated.View, { onLayout: (event) => {
25
+ return (_jsxs(Modal, { animationType: isMaterial ? 'none' : 'fade', navigationBarTranslucent: true, onRequestClose: onClose, statusBarTranslucent: true, supportedOrientations: PsOrientationConfig.all, transparent: true, visible: true, children: [_jsx(Pressable, { accessibilityElementsHidden: true, onPress: onClose, style: StyleSheet.absoluteFill, testID: 'ps-menu-popup-backdrop' }), _jsx(Animated.View, { onLayout: (event) => {
25
26
  if (size === undefined)
26
27
  setSize({
27
28
  height: event.nativeEvent.layout.height,
@@ -36,7 +37,7 @@ export const PsMenuPopup = ({ anchor, children, isFullWidth = false, onClose, })
36
37
  elevation: container.elevation,
37
38
  left: layout.left,
38
39
  maxHeight: layout.maxHeight,
39
- maxWidth: PsMenuPopupConfig.maxWidth,
40
+ maxWidth: Math.min(PsMenuPopupConfig.maxWidth, layout.maxWidth),
40
41
  minWidth: isFullWidth ? undefined : PsMenuPopupConfig.minWidth,
41
42
  overflow: 'hidden',
42
43
  position: 'absolute',
@@ -1,7 +1,9 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { StyleProp, ViewStyle } from 'react-native';
3
+ import type { PsContentWidth } from '../../constants/ps-content-width';
3
4
  export interface PsScreenProps {
4
5
  children: ReactNode;
6
+ contentWidth?: PsContentWidth;
5
7
  gap?: number;
6
8
  hasGutter?: boolean;
7
9
  header?: ReactNode;
@@ -1,2 +1,2 @@
1
1
  import type { PsScreenProps } from './ps-screen-props';
2
- export declare const PsScreen: ({ children, gap, hasGutter, header, onRefresh, style, }: PsScreenProps) => import("react").JSX.Element;
2
+ export declare const PsScreen: ({ children, contentWidth, gap, hasGutter, header, onRefresh, style, }: PsScreenProps) => import("react").JSX.Element;
@@ -1,24 +1,31 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Platform, RefreshControl, ScrollView, View } from 'react-native';
3
3
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
+ import { PsContentWidth } from '../../constants/ps-content-width';
4
5
  import { PsLayoutConfig } from '../../constants/ps-layout-config';
5
6
  import { PsSelectionBarConfig } from '../../constants/ps-selection-bar-config';
6
7
  import { PsScrollContext } from '../../contexts/ps-scroll-context';
8
+ import { usePsLayoutClass } from '../../hooks/use-ps-layout-class';
7
9
  import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
8
10
  import { usePsRefresh } from '../../hooks/use-ps-refresh';
9
11
  import { usePsScrollHost } from '../../hooks/use-ps-scroll-host';
10
12
  import { usePsTabBar } from '../../hooks/use-ps-tab-bar';
11
13
  import { usePsTopInset } from '../../hooks/use-ps-top-inset';
14
+ import { PsLayoutService } from '../../services/ps-layout-service';
12
15
  import { PsScreenService } from '../../services/ps-screen-service';
13
- export const PsScreen = ({ children, gap = PsLayoutConfig.listGap, hasGutter = true, header, onRefresh, style, }) => {
16
+ export const PsScreen = ({ children, contentWidth = PsContentWidth.readable, gap = PsLayoutConfig.listGap, hasGutter = true, header, onRefresh, style, }) => {
14
17
  const theme = usePsMobileTheme();
15
18
  const insets = useSafeAreaInsets();
16
19
  const topInset = usePsTopInset();
17
20
  const { hasTabBar, isHidden: isTabBarHidden } = usePsTabBar();
18
21
  const { isRefreshing, refresh } = usePsRefresh(onRefresh);
19
22
  const host = usePsScrollHost();
20
- return (_jsxs(View, { style: { flex: 1 }, children: [_jsx(ScrollView, { contentContainerStyle: PsScreenService.content({
21
- bottom: PsScreenService.bottomInset(insets.bottom, hasTabBar, isTabBarHidden),
22
- top: topInset,
23
- }, Platform.OS === 'ios', hasGutter, gap, isTabBarHidden ? PsSelectionBarConfig.height : 0), contentInsetAdjustmentBehavior: 'automatic', keyboardDismissMode: 'interactive', onContentSizeChange: host.onContentSizeChange, onLayout: host.onLayout, onScroll: host.onScroll, keyboardShouldPersistTaps: 'handled', refreshControl: onRefresh === undefined ? undefined : (_jsx(RefreshControl, { colors: [theme.primaryText], progressBackgroundColor: theme.surface, onRefresh: () => void refresh(), refreshing: isRefreshing, tintColor: theme.primary })), ref: host.scrollRef, scrollEnabled: !host.isLocked, scrollEventThrottle: PsLayoutConfig.scrollEventThrottle, showsVerticalScrollIndicator: false, style: [{ backgroundColor: theme.background, flex: 1 }, style], testID: 'ps-screen', children: _jsxs(PsScrollContext, { value: host.context, children: [header, children] }) }), header === undefined ? null : (_jsx(View, { pointerEvents: 'none', style: [PsScreenService.statusBarScrim(topInset), { backgroundColor: theme.background }], testID: 'ps-screen-status-bar-scrim' }))] }));
23
+ const layoutClass = usePsLayoutClass();
24
+ return (_jsxs(View, { style: { flex: 1 }, children: [_jsx(ScrollView, { contentContainerStyle: [
25
+ PsScreenService.content({
26
+ bottom: PsScreenService.bottomInset(insets.bottom, hasTabBar, isTabBarHidden),
27
+ top: topInset,
28
+ }, Platform.OS === 'ios', hasGutter, gap, isTabBarHidden ? PsSelectionBarConfig.height : 0),
29
+ PsLayoutService.frame(layoutClass, contentWidth),
30
+ ], contentInsetAdjustmentBehavior: 'automatic', keyboardDismissMode: 'interactive', onContentSizeChange: host.onContentSizeChange, onLayout: host.onLayout, onScroll: host.onScroll, keyboardShouldPersistTaps: 'handled', refreshControl: onRefresh === undefined ? undefined : (_jsx(RefreshControl, { colors: [theme.primaryText], progressBackgroundColor: theme.surface, onRefresh: () => void refresh(), refreshing: isRefreshing, tintColor: theme.primary })), ref: host.scrollRef, scrollEnabled: !host.isLocked, scrollEventThrottle: PsLayoutConfig.scrollEventThrottle, showsVerticalScrollIndicator: false, style: [{ backgroundColor: theme.background, flex: 1 }, style], testID: 'ps-screen', children: _jsxs(PsScrollContext, { value: host.context, children: [header, children] }) }), header === undefined ? null : (_jsx(View, { pointerEvents: 'none', style: [PsScreenService.statusBarScrim(topInset), { backgroundColor: theme.background }], testID: 'ps-screen-status-bar-scrim' }))] }));
24
31
  };
@@ -4,6 +4,7 @@ import { Platform, ScrollView, View, useWindowDimensions } from 'react-native';
4
4
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
5
5
  import { PsLayoutConfig } from '../../constants/ps-layout-config';
6
6
  import { PsSheetMeasureContext } from '../../contexts/ps-sheet-measure-context';
7
+ import { usePsLayoutClass } from '../../hooks/use-ps-layout-class';
7
8
  import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
8
9
  import { PsSheetService } from '../../services/ps-sheet-service';
9
10
  import { PsSheetHeader } from '../ps-sheet-header/ps-sheet-header';
@@ -11,11 +12,12 @@ export const PsSheetContent = ({ children, footer, header, isScrollable }) => {
11
12
  const theme = usePsMobileTheme();
12
13
  const insets = useSafeAreaInsets();
13
14
  const { height } = useWindowDimensions();
15
+ const layoutClass = usePsLayoutClass();
14
16
  const report = useContext(PsSheetMeasureContext);
15
17
  const [headerHeight, setHeaderHeight] = useState(0);
16
18
  const [bodyHeight, setBodyHeight] = useState(0);
17
19
  const fitted = headerHeight > 0 && bodyHeight > 0
18
- ? PsSheetService.fittedHeight(headerHeight, bodyHeight, height)
20
+ ? PsSheetService.fittedHeight(headerHeight, bodyHeight, height, layoutClass)
19
21
  : null;
20
22
  useEffect(() => {
21
23
  if (fitted !== null)
@@ -35,6 +37,6 @@ export const PsSheetContent = ({ children, footer, header, isScrollable }) => {
35
37
  return (_jsxs(View, { style: {
36
38
  backgroundColor: theme.background,
37
39
  height: fitted === null ? undefined : fitted,
38
- maxHeight: PsSheetService.maxHeight(height),
40
+ maxHeight: PsSheetService.maxHeight(height, layoutClass),
39
41
  }, testID: 'ps-sheet', children: [_jsx(View, { onLayout: (event) => setHeaderHeight(event.nativeEvent.layout.height), children: _jsx(PsSheetHeader, { ...header }) }), isScrollable ? (_jsx(ScrollView, { automaticallyAdjustKeyboardInsets: true, contentContainerStyle: contentStyle, keyboardDismissMode: 'interactive', keyboardShouldPersistTaps: 'handled', onContentSizeChange: (_width, contentHeight) => setBodyHeight(contentHeight), style: { flexGrow: 0 }, children: body })) : (_jsx(View, { onLayout: (event) => setBodyHeight(event.nativeEvent.layout.height), style: contentStyle, children: body }))] }));
40
42
  };
@@ -1,12 +1,14 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useCallback, useEffect, useRef, useState } from 'react';
3
3
  import { BottomSheet, Group, RNHostView } from '@expo/ui/swift-ui';
4
- import { frame, interactiveDismissDisabled, presentationBackground, presentationDetents, presentationDragIndicator, } from '@expo/ui/swift-ui/modifiers';
5
- import { useWindowDimensions } from 'react-native';
4
+ import { frame, interactiveDismissDisabled, presentationBackground, presentationDetents, presentationDragIndicator, presentationSizing, } from '@expo/ui/swift-ui/modifiers';
5
+ import { Platform, useWindowDimensions } from 'react-native';
6
6
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
7
+ import { PsLayoutClass } from '../../constants/ps-layout-class';
7
8
  import { PsNativeTreeContext } from '../../contexts/ps-native-tree-context';
8
9
  import { PsSheetMeasureContext } from '../../contexts/ps-sheet-measure-context';
9
10
  import { usePsKeyboardHeight } from '../../hooks/use-ps-keyboard-height';
11
+ import { usePsLayoutClass } from '../../hooks/use-ps-layout-class';
10
12
  import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
11
13
  import { PsSheetService } from '../../services/ps-sheet-service';
12
14
  import { PsHost } from '../ps-host/ps-host';
@@ -18,6 +20,8 @@ export const PsSheetPresenter = ({ children, isDismissBlocked, isOpen, onClose,
18
20
  const keyboardHeight = usePsKeyboardHeight();
19
21
  const window = useWindowDimensions();
20
22
  const insets = useSafeAreaInsets();
23
+ const isForm = usePsLayoutClass() === PsLayoutClass.regular &&
24
+ PsSheetService.supportsFormSizing(Platform.Version);
21
25
  const detentHeight = height > 0 ? PsSheetService.raisedHeight(height, keyboardHeight, window.height, insets.top) : 0;
22
26
  isOpenRef.current = isOpen;
23
27
  isBlockedRef.current = isDismissBlocked;
@@ -33,9 +37,15 @@ export const PsSheetPresenter = ({ children, isDismissBlocked, isOpen, onClose,
33
37
  onClose();
34
38
  }
35
39
  }, children: _jsx(Group, { modifiers: [
36
- frame({ alignment: 'top', maxHeight: Infinity, maxWidth: Infinity }),
37
- presentationDetents(detentHeight > 0 ? [{ height: detentHeight }] : ['medium']),
38
- presentationDragIndicator('visible'),
40
+ isForm
41
+ ? frame({ alignment: 'top', maxWidth: Infinity })
42
+ : frame({ alignment: 'top', maxHeight: Infinity, maxWidth: Infinity }),
43
+ ...(isForm
44
+ ? [presentationSizing('form', { fitted: { horizontal: false, vertical: true } })]
45
+ : [
46
+ presentationDetents(detentHeight > 0 ? [{ height: detentHeight }] : ['medium']),
47
+ presentationDragIndicator('visible'),
48
+ ]),
39
49
  presentationBackground(theme.background),
40
50
  interactiveDismissDisabled(isDismissBlocked),
41
51
  ], children: _jsx(RNHostView, { matchContents: { vertical: true }, children: _jsx(PsNativeTreeContext.Provider, { value: false, children: _jsx(PsSheetMeasureContext.Provider, { value: measure, children: children }) }) }) }) }) }));
@@ -1,17 +1,30 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Modal, Pressable, StyleSheet, View } from 'react-native';
2
+ import { Modal, Pressable, StyleSheet, View, useWindowDimensions } from 'react-native';
3
+ import { PsLayoutClass } from '../../constants/ps-layout-class';
4
+ import { PsOrientationConfig } from '../../constants/ps-orientation-config';
3
5
  import { PsSheetConfig } from '../../constants/ps-sheet-config';
6
+ import { usePsLayoutClass } from '../../hooks/use-ps-layout-class';
4
7
  import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
8
+ import { PsSheetService } from '../../services/ps-sheet-service';
5
9
  export const PsSheetPresenter = ({ children, isDismissBlocked, isOpen, onClose, }) => {
6
10
  const theme = usePsMobileTheme();
7
- return (_jsx(Modal, { animationType: 'slide', onRequestClose: isDismissBlocked ? undefined : onClose, statusBarTranslucent: true, transparent: true, visible: isOpen, children: _jsxs(View, { style: {
11
+ const layoutClass = usePsLayoutClass();
12
+ const window = useWindowDimensions();
13
+ const isRegular = layoutClass === PsLayoutClass.regular;
14
+ const maxWidth = PsSheetService.fittedMaxWidth(window.width, layoutClass);
15
+ return (_jsx(Modal, { animationType: 'slide', onRequestClose: isDismissBlocked ? undefined : onClose, statusBarTranslucent: true, supportedOrientations: PsOrientationConfig.all, transparent: true, visible: isOpen, children: _jsxs(View, { style: {
8
16
  backgroundColor: theme.overlay,
17
+ alignItems: isRegular ? 'center' : undefined,
9
18
  flex: 1,
10
- justifyContent: 'flex-end',
19
+ justifyContent: isRegular ? 'center' : 'flex-end',
11
20
  }, children: [_jsx(Pressable, { onPress: isDismissBlocked ? undefined : onClose, style: StyleSheet.absoluteFill, testID: 'ps-sheet-scrim' }), _jsx(View, { style: {
12
21
  backgroundColor: theme.background,
22
+ borderBottomLeftRadius: isRegular ? PsSheetConfig.cornerRadius : 0,
23
+ borderBottomRightRadius: isRegular ? PsSheetConfig.cornerRadius : 0,
13
24
  borderTopLeftRadius: PsSheetConfig.cornerRadius,
14
25
  borderTopRightRadius: PsSheetConfig.cornerRadius,
26
+ maxWidth,
15
27
  overflow: 'hidden',
28
+ width: isRegular ? '100%' : undefined,
16
29
  }, children: children })] }) }));
17
30
  };
@@ -5,14 +5,17 @@ import { useSharedValue } from 'react-native-reanimated';
5
5
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
6
6
  import { PsSortableGridConfig } from '../../constants/ps-sortable-grid-config';
7
7
  import { PsScrollContext } from '../../contexts/ps-scroll-context';
8
+ import { usePsLayoutClass } from '../../hooks/use-ps-layout-class';
8
9
  import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
9
10
  import { PsHapticService } from '../../services/ps-haptic-service';
11
+ import { PsLayoutService } from '../../services/ps-layout-service';
10
12
  import { PsSortableGridService } from '../../services/ps-sortable-grid-service';
11
13
  import { PsSortableItem } from './ps-sortable-item';
12
14
  export const PsSortableGrid = ({ getItemSpan, isDisabled = false, items, labels, onReorder, renderItem, }) => {
13
15
  const scroll = useContext(PsScrollContext);
14
16
  const { hasHaptics } = usePsMobileTheme();
15
17
  const insets = useSafeAreaInsets();
18
+ const capacity = PsLayoutService.gridUnits(usePsLayoutClass());
16
19
  const { height: windowHeight } = useWindowDimensions();
17
20
  const [order, setOrder] = useState(items);
18
21
  const [activeId, setActiveId] = useState(null);
@@ -30,7 +33,7 @@ export const PsSortableGrid = ({ getItemSpan, isDisabled = false, items, labels,
30
33
  translationY: 0,
31
34
  });
32
35
  const ids = useMemo(() => PsSortableGridService.ids(order), [order]);
33
- const rects = useMemo(() => PsSortableGridService.layout(order.map((item) => getItemSpan(item)), PsSortableGridService.heights(ids, measured), width), [getItemSpan, ids, measured, order, width]);
36
+ const rects = useMemo(() => PsSortableGridService.layout(order.map((item) => getItemSpan(item)), PsSortableGridService.heights(ids, measured), width, capacity), [capacity, getItemSpan, ids, measured, order, width]);
34
37
  const extras = useMemo(() => PsSortableGridService.extras(rects, PsSortableGridService.heights(ids, measured)), [ids, measured, rects]);
35
38
  const isReady = PsSortableGridService.isMeasured(ids, measured, width);
36
39
  const latest = useRef({ items, onReorder, order, rects, scroll, windowHeight, insets });
@@ -1,10 +1,19 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Children } from 'react';
2
+ import { Children, useState } from 'react';
3
3
  import { View } from 'react-native';
4
4
  import { PsChartConfig } from '../../constants/ps-chart-config';
5
- export const PsWidgetGrid = ({ children }) => (_jsx(View, { style: {
6
- flexDirection: 'row',
7
- flexWrap: 'wrap',
8
- gap: PsChartConfig.kpiGap,
9
- justifyContent: 'space-between',
10
- }, children: Children.toArray(children).map((child, index) => (_jsx(View, { style: { flexBasis: '47.5%', flexGrow: 0, flexShrink: 1 }, children: child }, index))) }));
5
+ import { usePsLayoutClass } from '../../hooks/use-ps-layout-class';
6
+ import { PsLayoutService } from '../../services/ps-layout-service';
7
+ export const PsWidgetGrid = ({ children }) => {
8
+ const layoutClass = usePsLayoutClass();
9
+ const [width, setWidth] = useState(0);
10
+ const itemWidth = PsLayoutService.widgetWidth(width, layoutClass, PsChartConfig.kpiGap);
11
+ return (_jsx(View, { onLayout: (event) => setWidth(event.nativeEvent.layout.width), style: {
12
+ flexDirection: 'row',
13
+ flexWrap: 'wrap',
14
+ gap: PsChartConfig.kpiGap,
15
+ justifyContent: itemWidth === undefined ? 'space-between' : 'flex-start',
16
+ }, children: Children.toArray(children).map((child, index) => (_jsx(View, { style: itemWidth === undefined
17
+ ? { flexBasis: PsLayoutService.widgetBasis(layoutClass), flexGrow: 0, flexShrink: 1 }
18
+ : { flexGrow: 0, flexShrink: 0, width: itemWidth }, children: child }, index))) }));
19
+ };
@@ -1,7 +1,9 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { StyleProp, ViewStyle } from 'react-native';
3
+ import type { PsContentWidth } from '../../constants/ps-content-width';
3
4
  export interface PsWidgetListProps {
4
5
  children: ReactNode;
6
+ contentWidth?: PsContentWidth;
5
7
  onRefresh?: () => Promise<void>;
6
8
  style?: StyleProp<ViewStyle>;
7
9
  }
@@ -1,2 +1,2 @@
1
1
  import type { PsWidgetListProps } from './ps-widget-list-props';
2
- export declare const PsWidgetList: ({ children, onRefresh, style }: PsWidgetListProps) => import("react").JSX.Element;
2
+ export declare const PsWidgetList: ({ children, contentWidth, onRefresh, style, }: PsWidgetListProps) => import("react").JSX.Element;
@@ -1,14 +1,21 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { RefreshControl, ScrollView } from 'react-native';
3
+ import { PsContentWidth } from '../../constants/ps-content-width';
3
4
  import { PsListConfig } from '../../constants/ps-list-config';
4
5
  import { PsMobileControlConfig } from '../../constants/ps-mobile-control-config';
6
+ import { usePsLayoutClass } from '../../hooks/use-ps-layout-class';
5
7
  import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
6
8
  import { usePsRefresh } from '../../hooks/use-ps-refresh';
7
- export const PsWidgetList = ({ children, onRefresh, style }) => {
9
+ import { PsLayoutService } from '../../services/ps-layout-service';
10
+ export const PsWidgetList = ({ children, contentWidth = PsContentWidth.wide, onRefresh, style, }) => {
11
+ const layoutClass = usePsLayoutClass();
8
12
  const theme = usePsMobileTheme();
9
13
  const { isRefreshing, refresh } = usePsRefresh(onRefresh);
10
- return (_jsx(ScrollView, { contentContainerStyle: {
11
- gap: PsMobileControlConfig.rowSpacing,
12
- padding: PsListConfig.contentInset,
13
- }, contentInsetAdjustmentBehavior: 'automatic', refreshControl: onRefresh === undefined ? undefined : (_jsx(RefreshControl, { colors: [theme.primaryText], progressBackgroundColor: theme.surface, onRefresh: () => void refresh(), refreshing: isRefreshing, tintColor: theme.primary })), style: [{ backgroundColor: theme.background, flex: 1 }, style], children: children }));
14
+ return (_jsx(ScrollView, { contentContainerStyle: [
15
+ {
16
+ gap: PsMobileControlConfig.rowSpacing,
17
+ padding: PsListConfig.contentInset,
18
+ },
19
+ PsLayoutService.frame(layoutClass, contentWidth),
20
+ ], contentInsetAdjustmentBehavior: 'automatic', refreshControl: onRefresh === undefined ? undefined : (_jsx(RefreshControl, { colors: [theme.primaryText], progressBackgroundColor: theme.surface, onRefresh: () => void refresh(), refreshing: isRefreshing, tintColor: theme.primary })), style: [{ backgroundColor: theme.background, flex: 1 }, style], children: children }));
14
21
  };
@@ -0,0 +1,6 @@
1
+ export declare const PsContentWidth: {
2
+ readonly full: "full";
3
+ readonly readable: "readable";
4
+ readonly wide: "wide";
5
+ };
6
+ export type PsContentWidth = (typeof PsContentWidth)[keyof typeof PsContentWidth];
@@ -0,0 +1,5 @@
1
+ export const PsContentWidth = {
2
+ full: 'full',
3
+ readable: 'readable',
4
+ wide: 'wide',
5
+ };
@@ -2,7 +2,6 @@ export declare const PsDocumentSearchConfig: {
2
2
  readonly activeAlpha: 0.9;
3
3
  readonly androidFieldRadius: 999;
4
4
  readonly barGap: 8;
5
- readonly combiningMarkPattern: RegExp;
6
5
  readonly currentToken: "{current}";
7
6
  readonly fieldAlpha: 0.14;
8
7
  readonly fieldPaddingX: 12;
@@ -13,7 +12,5 @@ export declare const PsDocumentSearchConfig: {
13
12
  readonly rotateDown: "0deg";
14
13
  readonly rotateUp: "180deg";
15
14
  readonly scrollMargin: 48;
16
- readonly termSeparatorPattern: RegExp;
17
15
  readonly totalToken: "{total}";
18
- readonly wordSeparator: " ";
19
16
  };
@@ -2,7 +2,6 @@ export const PsDocumentSearchConfig = {
2
2
  activeAlpha: 0.9,
3
3
  androidFieldRadius: 999,
4
4
  barGap: 8,
5
- combiningMarkPattern: /\p{M}/gu,
6
5
  currentToken: '{current}',
7
6
  fieldAlpha: 0.14,
8
7
  fieldPaddingX: 12,
@@ -13,7 +12,5 @@ export const PsDocumentSearchConfig = {
13
12
  rotateDown: '0deg',
14
13
  rotateUp: '180deg',
15
14
  scrollMargin: 48,
16
- termSeparatorPattern: /\s+/u,
17
15
  totalToken: '{total}',
18
- wordSeparator: ' ',
19
16
  };
@@ -0,0 +1,12 @@
1
+ export declare const PsLayoutClassConfig: {
2
+ readonly compactGridUnits: 2;
3
+ readonly compactWidgetBasis: "47.5%";
4
+ readonly formSheetMaxHeightFraction: 0.8;
5
+ readonly formSheetWidth: 540;
6
+ readonly readableMaxWidth: 768;
7
+ readonly regularGridUnits: 4;
8
+ readonly regularMinHeight: 480;
9
+ readonly regularMinWidth: 600;
10
+ readonly regularWidgetBasis: "23%";
11
+ readonly wideMaxWidth: 1180;
12
+ };
@@ -0,0 +1,12 @@
1
+ export const PsLayoutClassConfig = {
2
+ compactGridUnits: 2,
3
+ compactWidgetBasis: '47.5%',
4
+ formSheetMaxHeightFraction: 0.8,
5
+ formSheetWidth: 540,
6
+ readableMaxWidth: 768,
7
+ regularGridUnits: 4,
8
+ regularMinHeight: 480,
9
+ regularMinWidth: 600,
10
+ regularWidgetBasis: '23%',
11
+ wideMaxWidth: 1180,
12
+ };
@@ -0,0 +1,5 @@
1
+ export declare const PsLayoutClass: {
2
+ readonly compact: "compact";
3
+ readonly regular: "regular";
4
+ };
5
+ export type PsLayoutClass = (typeof PsLayoutClass)[keyof typeof PsLayoutClass];
@@ -0,0 +1,4 @@
1
+ export const PsLayoutClass = {
2
+ compact: 'compact',
3
+ regular: 'regular',
4
+ };
@@ -5,6 +5,7 @@ export declare const PsMenuPopupConfig: {
5
5
  readonly minWidth: 168;
6
6
  readonly paddingVertical: 8;
7
7
  readonly radius: 12;
8
+ readonly remeasureMs: 250;
8
9
  readonly rowHeight: 48;
9
10
  readonly rowPaddingHorizontal: 16;
10
11
  };