@lichens-innovation/react-native-common 3.0.1 → 3.2.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 (32) hide show
  1. package/dist/components/drop-down-selector/drop-down-selector.d.ts +1 -0
  2. package/dist/components/drop-down-selector/drop-down-selector.js +23 -14
  3. package/dist/components/drop-down-selector/drop-down-selector.js.map +1 -1
  4. package/dist/components/drop-down-selector/drop-down-selector.utils.d.ts +22 -0
  5. package/dist/components/drop-down-selector/drop-down-selector.utils.js +37 -0
  6. package/dist/components/drop-down-selector/drop-down-selector.utils.js.map +1 -0
  7. package/dist/components/index.d.ts +1 -0
  8. package/dist/components/index.js +1 -0
  9. package/dist/components/index.js.map +1 -1
  10. package/dist/components/layout/resizable/index.d.ts +1 -1
  11. package/dist/components/layout/resizable/index.js +1 -1
  12. package/dist/components/layout/resizable/index.js.map +1 -1
  13. package/dist/components/layout/resizable/{vertical-resizable-overlay-view.d.ts → resizable-overlay-view.d.ts} +1 -1
  14. package/dist/components/layout/resizable/{vertical-resizable-overlay-view.js → resizable-overlay-view.js} +43 -32
  15. package/dist/components/layout/resizable/resizable-overlay-view.js.map +1 -0
  16. package/dist/components/layout/resizable/resizable-overlay-view.utils.d.ts +16 -0
  17. package/dist/components/layout/resizable/resizable-overlay-view.utils.js +19 -0
  18. package/dist/components/layout/resizable/resizable-overlay-view.utils.js.map +1 -0
  19. package/dist/components/layout/resizable/vertical-resizable-overlay-view.types.d.ts +6 -0
  20. package/dist/components/voice-recognition/index.d.ts +2 -0
  21. package/dist/components/voice-recognition/index.js +3 -0
  22. package/dist/components/voice-recognition/index.js.map +1 -0
  23. package/dist/components/voice-recognition/voice-recognition-text-input.d.ts +10 -0
  24. package/dist/components/voice-recognition/voice-recognition-text-input.js +104 -0
  25. package/dist/components/voice-recognition/voice-recognition-text-input.js.map +1 -0
  26. package/dist/components/voice-recognition/voice-recognition.utils.d.ts +7 -0
  27. package/dist/components/voice-recognition/voice-recognition.utils.js +24 -0
  28. package/dist/components/voice-recognition/voice-recognition.utils.js.map +1 -0
  29. package/dist/i18n/en/common.json +1 -0
  30. package/dist/i18n/fr/common.json +1 -0
  31. package/package.json +3 -1
  32. package/dist/components/layout/resizable/vertical-resizable-overlay-view.js.map +0 -1
@@ -11,5 +11,6 @@ export type DropDownSelectorProps = {
11
11
  options: SelectOption[];
12
12
  placeholder?: string;
13
13
  searchPlaceholder?: string;
14
+ disabled?: boolean;
14
15
  };
15
16
  export declare const DropDownSelector: FunctionComponent<DropDownSelectorProps>;
@@ -4,46 +4,55 @@ import { StyleSheet, View } from 'react-native';
4
4
  import { Dropdown } from 'react-native-element-dropdown';
5
5
  import { Text } from 'react-native-paper';
6
6
  import { useAppTheme } from '../../theme/theme';
7
- export const DropDownSelector = ({ label, value, onChange, isError, options, placeholder, searchPlaceholder, }) => {
8
- const theme = useAppTheme();
9
- const { primary, error } = theme.colors;
10
- const [isFocus, setIsFocus] = useState(false);
7
+ import { getBorderColor, getLabelColor, getTextColor } from './drop-down-selector.utils';
8
+ export const DropDownSelector = ({ label, value, onChange, isError, options, placeholder, searchPlaceholder, disabled, }) => {
9
+ const [isFocused, setIsFocused] = useState(false);
11
10
  const hasLabel = !!label;
12
- const styles = useStyles({ isFocus, hasLabel });
13
- return (_jsxs(View, { children: [hasLabel && (_jsx(Text, { variant: 'bodySmall', style: [styles.dropdownTitle, isFocus && { color: primary }, isError && { color: error }], children: label })), _jsx(Dropdown, { style: [styles.dropdown, isFocus && { borderColor: primary }, isError && { borderColor: error }], autoScroll: false, placeholderStyle: styles.placeholderStyle, selectedTextStyle: styles.selectedTextStyle, inputSearchStyle: styles.inputSearchStyle, iconStyle: styles.iconStyle, data: options, search: false, maxHeight: 300, labelField: "label", valueField: "value", placeholder: isFocus ? '' : placeholder, searchPlaceholder: searchPlaceholder, value: value, onFocus: () => setIsFocus(true), onBlur: () => setIsFocus(false), onChange: ({ value }) => {
11
+ const styles = useStyles({ isFocused, disabled, isError });
12
+ return (_jsxs(View, { children: [hasLabel && (_jsx(Text, { variant: 'bodySmall', style: styles.dropdownTitle, children: label })), _jsx(Dropdown, { style: styles.dropdown, autoScroll: false, placeholderStyle: styles.placeholderStyle, selectedTextStyle: styles.selectedTextStyle, inputSearchStyle: styles.inputSearchStyle, iconStyle: styles.iconStyle, data: options, search: false, maxHeight: 300, labelField: "label", valueField: "value", placeholder: isFocused ? '' : placeholder, searchPlaceholder: searchPlaceholder, value: value, disable: disabled, onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false), onChange: ({ value }) => {
14
13
  onChange(value);
15
- setIsFocus(false);
14
+ setIsFocused(false);
16
15
  } })] }));
17
16
  };
18
- const useStyles = ({ isFocus, hasLabel }) => {
17
+ const useStyles = ({ isFocused, disabled, isError }) => {
19
18
  const theme = useAppTheme();
19
+ const { surface, surfaceDisabled } = theme.colors;
20
+ const isDisabled = disabled === true;
21
+ const isFocusedAndEnabled = isFocused && !isDisabled;
22
+ // Priority: error > disabled > focus > normal
23
+ const labelColor = getLabelColor({ theme, isError: !!isError, isDisabled, isFocusedAndEnabled });
24
+ const borderColor = getBorderColor({ theme, isError: !!isError, isDisabled, isFocused });
25
+ const borderWidth = isFocusedAndEnabled ? 2 : 1;
26
+ const backgroundColor = isDisabled ? surfaceDisabled : 'transparent';
27
+ const textColor = getTextColor({ theme, isFocused, isDisabled });
20
28
  return StyleSheet.create({
21
29
  dropdownTitle: {
22
30
  position: 'absolute',
23
31
  top: -theme.spacing(1),
24
32
  left: theme.spacing(1),
25
- backgroundColor: theme.colors.surface,
33
+ backgroundColor: surface,
26
34
  paddingHorizontal: theme.spacing(0.75),
27
- color: theme.colors.onSurface,
35
+ color: labelColor,
28
36
  zIndex: 1,
29
37
  },
30
38
  dropdown: {
31
39
  height: 50,
32
- borderColor: isFocus ? theme.colors.primary : theme.colors.outline,
33
- borderWidth: isFocus ? 2 : 1,
40
+ borderColor,
41
+ borderWidth,
34
42
  borderRadius: theme.roundness,
35
43
  paddingHorizontal: theme.spacing(1),
44
+ backgroundColor,
36
45
  },
37
46
  icon: {
38
47
  marginRight: 5,
39
48
  },
40
49
  placeholderStyle: {
41
50
  fontSize: 16,
42
- color: isFocus ? theme.colors.primary : theme.colors.secondary,
51
+ color: textColor,
43
52
  },
44
53
  selectedTextStyle: {
45
54
  fontSize: 16,
46
- color: isFocus ? theme.colors.primary : theme.colors.secondary,
55
+ color: textColor,
47
56
  paddingLeft: theme.spacing(1),
48
57
  },
49
58
  iconStyle: {
@@ -1 +1 @@
1
- {"version":3,"file":"drop-down-selector.js","sourceRoot":"","sources":["../../../src/components/drop-down-selector/drop-down-selector.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAkBhD,MAAM,CAAC,MAAM,gBAAgB,GAA6C,CAAC,EACzE,KAAK,EACL,KAAK,EACL,QAAQ,EACR,OAAO,EACP,OAAO,EACP,WAAW,EACX,iBAAiB,GAClB,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;IACxC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC;IACzB,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;IAEhD,OAAO,CACL,MAAC,IAAI,eACF,QAAQ,IAAI,CACX,KAAC,IAAI,IAAC,OAAO,EAA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AQ,EAAE,EAAE;SACb;KACF,CAAC,CAAC;AACL,CAAC,CAAC"}
1
+ {"version":3,"file":"drop-down-selector.js","sourceRoot":"","sources":["../../../src/components/drop-down-selector/drop-down-selector.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAkBzF,MAAM,CAAC,MAAM,gBAAgB,GAA6C,CAAC,EACzE,KAAK,EACL,KAAK,EACL,QAAQ,EACR,OAAO,EACP,OAAO,EACP,WAAW,EACX,iBAAiB,EACjB,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC;IACzB,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;IAE3D,OAAO,CACL,MAAC,IAAI,eACF,QAAQ,IAAI,CACX,KAAC,IAAI,IAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAE,MAAM,CAAC,aAAa,YAAG,KAAK,GAAQ,CACtE,EAED,KAAC,QAAQ,IACP,KAAK,EAAE,MAAM,CAAC,QAAQ,EACtB,UAAU,EAAE,KAAK,EACjB,gBAAgB,EAAE,MAAM,CAAC,gBAAgB,EACzC,iBAAiB,EAAE,MAAM,CAAC,iBAAiB,EAC3C,gBAAgB,EAAE,MAAM,CAAC,gBAAgB,EACzC,SAAS,E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isDisabled: boolean;
6
+ }
7
+ export declare const getTextColor: ({ theme, isFocused, isDisabled }: GetTextColorArgs) => string;
8
+ interface GetLabelColorArgs {
9
+ theme: AppTheme;
10
+ isError: boolean;
11
+ isDisabled: boolean;
12
+ isFocusedAndEnabled: boolean;
13
+ }
14
+ export declare const getLabelColor: ({ theme, isError, isDisabled, isFocusedAndEnabled }: GetLabelColorArgs) => string;
15
+ interface GetBorderColorArgs {
16
+ theme: AppTheme;
17
+ isError: boolean;
18
+ isDisabled: boolean;
19
+ isFocused: boolean;
20
+ }
21
+ export declare const getBorderColor: ({ theme, isError, isDisabled, isFocused }: GetBorderColorArgs) => string;
22
+ export {};
@@ -0,0 +1,37 @@
1
+ export const getTextColor = ({ theme, isFocused, isDisabled }) => {
2
+ const { onSurfaceDisabled, primary, secondary } = theme.colors;
3
+ if (isDisabled) {
4
+ return onSurfaceDisabled;
5
+ }
6
+ if (isFocused) {
7
+ return primary;
8
+ }
9
+ return secondary;
10
+ };
11
+ export const getLabelColor = ({ theme, isError, isDisabled, isFocusedAndEnabled }) => {
12
+ const { error, onSurfaceDisabled, primary, onSurface } = theme.colors;
13
+ if (isError) {
14
+ return error;
15
+ }
16
+ if (isDisabled) {
17
+ return onSurfaceDisabled;
18
+ }
19
+ if (isFocusedAndEnabled) {
20
+ return primary;
21
+ }
22
+ return onSurface;
23
+ };
24
+ export const getBorderColor = ({ theme, isError, isDisabled, isFocused }) => {
25
+ const { error, surfaceDisabled, primary, outline } = theme.colors;
26
+ if (isError) {
27
+ return error;
28
+ }
29
+ if (isDisabled) {
30
+ return surfaceDisabled;
31
+ }
32
+ if (isFocused) {
33
+ return primary;
34
+ }
35
+ return outline;
36
+ };
37
+ //# sourceMappingURL=drop-down-selector.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drop-down-selector.utils.js","sourceRoot":"","sources":["../../../src/components/drop-down-selector/drop-down-selector.utils.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,YAAY,GAA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,4 @@ export * from './snack-bar';
14
14
  export * from './spinner';
15
15
  export * from './syntax';
16
16
  export * from './tab-bar-icon';
17
+ export * from './voice-recognition';
@@ -14,4 +14,5 @@ export * from './snack-bar';
14
14
  export * from './spinner';
15
15
  export * from './syntax';
16
16
  export * from './tab-bar-icon';
17
+ export * from './voice-recognition';
17
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC"}
@@ -1,4 +1,4 @@
1
- export * from './vertical-resizable-overlay-view';
1
+ export * from './resizable-overlay-view';
2
2
  export * from './vertical-resizable-overlay-view.types';
3
3
  export * from './vertical-resizable-split-view';
4
4
  export * from './vertical-resizable-split-view.types';
@@ -1,4 +1,4 @@
1
- export * from './vertical-resizable-overlay-view';
1
+ export * from './resizable-overlay-view';
2
2
  export * from './vertical-resizable-overlay-view.types';
3
3
  export * from './vertical-resizable-split-view';
4
4
  export * from './vertical-resizable-split-view.types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/layout/resizable/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/layout/resizable/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,yCAAyC,CAAC;AACxD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import { type FunctionComponent } from 'react';
2
2
  import { VerticalResizableOverlayViewProps } from './vertical-resizable-overlay-view.types';
3
- export declare const VerticalResizableOverlayView: FunctionComponent<VerticalResizableOverlayViewProps>;
3
+ export declare const ResizableOverlayView: FunctionComponent<VerticalResizableOverlayViewProps>;
@@ -1,52 +1,58 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useCallback, useState } from 'react';
3
2
  import { StyleSheet, View } from 'react-native';
4
3
  import { Gesture, GestureDetector } from 'react-native-gesture-handler';
5
4
  import Animated, { useAnimatedStyle, useSharedValue, withSpring } from 'react-native-reanimated';
6
5
  import { isDevelopment } from '../../../utils';
6
+ import { computeResizableOverlayLayoutValues } from './resizable-overlay-view.utils';
7
7
  import { validateResizableOverlayProps } from './vertical-resizable-overlay-view.utils';
8
8
  const DRAG_HANDLE_HEIGHT = 20;
9
9
  const DEFAULT_ANIMATION_CONFIG = { damping: 25, stiffness: 300, mass: 0.8 };
10
- export const VerticalResizableOverlayView = (props) => {
10
+ const OVERLAY_ANCHOR_STYLES = {
11
+ topLeft: { top: 0, left: 0 },
12
+ topRight: { top: 0, right: 0 },
13
+ bottomLeft: { bottom: 0, left: 0 },
14
+ bottomRight: { bottom: 0, right: 0 },
15
+ };
16
+ export const ResizableOverlayView = (props) => {
11
17
  if (isDevelopment())
12
18
  validateResizableOverlayProps(props);
13
- const { foregroundContent, backgroundContent, initialForegroundRatio = 0.5, minForegroundRatio = 0.15, maxForegroundRatio = 0.85, foregroundContentAspectRatio, handleContainerStyle, handleStyle, hideHandle = false, } = props;
14
- // Track measured container height
15
- const [isReady, setIsReady] = useState(false);
19
+ const { foregroundContent, backgroundContent, initialForegroundRatio = 0.5, minForegroundRatio = 0.15, maxForegroundRatio = 0.85, foregroundContentAspectRatio, handleContainerStyle, handleStyle, hideHandle = false, anchorType = 'topRight', } = props;
20
+ // Anchor styles
21
+ const overlayAnchorStyle = OVERLAY_ANCHOR_STYLES[anchorType];
22
+ const isBottomAnchored = ['bottomLeft', 'bottomRight'].includes(anchorType);
23
+ const isLeftAnchored = ['topLeft', 'bottomLeft'].includes(anchorType);
16
24
  // Shared values for animation
17
25
  const overlayHeight = useSharedValue(0);
26
+ const containerHeight = useSharedValue(0);
18
27
  const containerWidth = useSharedValue(0);
19
28
  const minHeight = useSharedValue(0);
20
29
  const maxHeight = useSharedValue(0);
21
30
  const startY = useSharedValue(0);
22
31
  const isDragging = useSharedValue(false);
23
32
  // Handle container layout measurement
24
- const handleLayout = useCallback((event) => {
25
- const { height, width } = event.nativeEvent.layout;
26
- if (height > 0 && !isReady) {
27
- minHeight.value = height * minForegroundRatio;
28
- maxHeight.value = height * maxForegroundRatio;
29
- overlayHeight.value = height * initialForegroundRatio;
30
- containerWidth.value = width;
31
- setIsReady(true);
32
- }
33
- }, [
34
- minForegroundRatio,
35
- maxForegroundRatio,
36
- initialForegroundRatio,
37
- minHeight,
38
- maxHeight,
39
- overlayHeight,
40
- containerWidth,
41
- isReady,
42
- ]);
33
+ const handleLayout = (event) => {
34
+ const computedValues = computeResizableOverlayLayoutValues({
35
+ event,
36
+ initialForegroundRatio,
37
+ minForegroundRatio,
38
+ maxForegroundRatio,
39
+ foregroundContentAspectRatio,
40
+ });
41
+ containerHeight.value = computedValues.containerHeight;
42
+ containerWidth.value = computedValues.containerWidth;
43
+ minHeight.value = computedValues.minHeight;
44
+ maxHeight.value = computedValues.maxHeight;
45
+ overlayHeight.value = computedValues.overlayHeight;
46
+ };
43
47
  const panGesture = Gesture.Pan()
44
48
  .onStart(() => {
45
49
  startY.value = overlayHeight.value;
46
50
  isDragging.value = true;
47
51
  })
48
52
  .onUpdate((event) => {
49
- const newHeight = startY.value + event.translationY;
53
+ // If the overlay is anchored to the bottom, dragging up should INCREASE its height.
54
+ const direction = isBottomAnchored ? -1 : 1;
55
+ const newHeight = startY.value + direction * event.translationY;
50
56
  overlayHeight.value = Math.max(minHeight.value, Math.min(newHeight, maxHeight.value));
51
57
  })
52
58
  .onEnd(() => {
@@ -81,16 +87,23 @@ export const VerticalResizableOverlayView = (props) => {
81
87
  effectiveWidth = calculatedWidth;
82
88
  }
83
89
  }
90
+ // Always compute an explicit `left` to avoid stale left/right values when `anchorType` changes.
91
+ const left = isLeftAnchored ? 0 : Math.max(0, containerWidth.value - effectiveWidth);
92
+ // If anchored at bottom, the handle must attach to the TOP edge of the overlay.
93
+ // Otherwise (top anchor), it attaches to the BOTTOM edge.
94
+ const top = isBottomAnchored
95
+ ? containerHeight.value - effectiveHeight - DRAG_HANDLE_HEIGHT / 2
96
+ : effectiveHeight - DRAG_HANDLE_HEIGHT / 2;
84
97
  return {
85
- top: effectiveHeight - DRAG_HANDLE_HEIGHT / 2,
86
- right: 0,
98
+ top,
87
99
  width: effectiveWidth,
100
+ left,
88
101
  };
89
- });
102
+ }, [foregroundContentAspectRatio, isBottomAnchored, isLeftAnchored]);
90
103
  const dragHandleAnimatedStyle = useAnimatedStyle(() => ({
91
104
  transform: [{ scale: withSpring(isDragging.value ? 1.2 : 1, DEFAULT_ANIMATION_CONFIG) }],
92
105
  }));
93
- return (_jsxs(View, { style: [styles.container], onLayout: handleLayout, children: [_jsx(View, { style: styles.backgroundSection, children: backgroundContent }), _jsx(Animated.View, { style: [styles.overlaySection, overlayAnimatedStyle], children: foregroundContent }), !hideHandle && (_jsx(GestureDetector, { gesture: panGesture, children: _jsx(Animated.View, { style: [styles.handleContainer, handleContainerStyle, dragHandleContainerAnimatedStyle], children: _jsx(Animated.View, { style: [styles.handle, handleStyle, dragHandleAnimatedStyle] }) }) }))] }));
106
+ return (_jsxs(View, { style: [styles.container], onLayout: handleLayout, children: [_jsx(View, { style: styles.backgroundSection, children: backgroundContent }), _jsx(Animated.View, { style: [styles.overlaySection, overlayAnchorStyle, overlayAnimatedStyle], children: foregroundContent }), !hideHandle && (_jsx(GestureDetector, { gesture: panGesture, children: _jsx(Animated.View, { style: [styles.handleContainer, handleContainerStyle, dragHandleContainerAnimatedStyle], children: _jsx(Animated.View, { style: [styles.handle, handleStyle, dragHandleAnimatedStyle] }) }) }))] }));
94
107
  };
95
108
  const styles = StyleSheet.create({
96
109
  container: {
@@ -101,8 +114,6 @@ const styles = StyleSheet.create({
101
114
  },
102
115
  overlaySection: {
103
116
  position: 'absolute',
104
- top: 0,
105
- right: 0,
106
117
  overflow: 'hidden',
107
118
  },
108
119
  handleContainer: {
@@ -118,4 +129,4 @@ const styles = StyleSheet.create({
118
129
  borderRadius: 4,
119
130
  },
120
131
  });
121
- //# sourceMappingURL=vertical-resizable-overlay-view.js.map
132
+ //# sourceMappingURL=resizable-overlay-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resizable-overlay-view.js","sourceRoot":"","sources":["../../../../src/components/layout/resizable/resizable-overlay-view.tsx"],"names":[],"mappings":";AACA,OAAO,EAAqB,UAA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 'react-native';
2
+ interface ComputeResizableOverlayLayoutValuesArgs {
3
+ event: LayoutChangeEvent;
4
+ initialForegroundRatio: number;
5
+ minForegroundRatio: number;
6
+ maxForegroundRatio: number;
7
+ foregroundContentAspectRatio?: number;
8
+ }
9
+ export declare const computeResizableOverlayLayoutValues: ({ event, initialForegroundRatio, minForegroundRatio, maxForegroundRatio, foregroundContentAspectRatio, }: ComputeResizableOverlayLayoutValuesArgs) => {
10
+ containerHeight: number;
11
+ containerWidth: number;
12
+ minHeight: number;
13
+ maxHeight: number;
14
+ overlayHeight: number;
15
+ };
16
+ export {};
@@ -0,0 +1,19 @@
1
+ export const computeResizableOverlayLayoutValues = ({ event, initialForegroundRatio, minForegroundRatio, maxForegroundRatio, foregroundContentAspectRatio, }) => {
2
+ const { height, width } = event.nativeEvent.layout;
3
+ if (height <= 0)
4
+ return { containerHeight: 0, containerWidth: 0, minHeight: 0, maxHeight: 0, overlayHeight: 0 };
5
+ // Always keep container & bounds updated (layout can change over time).
6
+ const computedMinHeight = height * minForegroundRatio;
7
+ const computedMaxHeightFromContainer = height * maxForegroundRatio;
8
+ const computedMaxHeightFromAspectRatio = foregroundContentAspectRatio !== undefined ? width / foregroundContentAspectRatio : Number.POSITIVE_INFINITY;
9
+ const computedMaxHeight = Math.max(computedMinHeight, Math.min(computedMaxHeightFromContainer, computedMaxHeightFromAspectRatio));
10
+ const computedOverlayHeight = Math.max(computedMinHeight, Math.min(height * initialForegroundRatio, computedMaxHeight));
11
+ return {
12
+ containerHeight: height,
13
+ containerWidth: width,
14
+ minHeight: computedMinHeight,
15
+ maxHeight: computedMaxHeight,
16
+ overlayHeight: computedOverlayHeight,
17
+ };
18
+ };
19
+ //# sourceMappingURL=resizable-overlay-view.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resizable-overlay-view.utils.js","sourceRoot":"","sources":["../../../../src/components/layout/resizable/resizable-overlay-view.utils.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,EAClD,KAAK,EACL,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,GACY,EAAE,EAAE;IAC5C,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC;IACnD,IAAI,MAAM,IAAI,CAAC;QAAE,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC;IAEhH,wEAAwE;IACxE,MAAM,iBAAiB,GAAG,MAAM,GAAG,kBAAkB,CAAC;IACtD,MAAM,8BAA8B,GAAG,MAAM,GAAG,kBAAkB,CAAC;IACnE,MAAM,gCAAgC,GACpC,4BAA4B,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,GAAG,4BAA4B,CAAC,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC;IAC/G,MAAM,iBAAiB,GAAG,IAAI,CAAC,GAAG,CAChC,iBAAiB,EACjB,IAAI,CAAC,GAAG,CAAC,8BAA8B,EAAE,gCAAgC,CAAC,CAC3E,CAAC;IAEF,MAAM,qBAAqB,GAAG,IAAI,CAAC,GAAG,CACpC,iBAAiB,EACjB,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,sBAAsB,EAAE,iBAAiB,CAAC,CAC7D,CAAC;IAEF,OAAO;QACL,eAAe,EAAE,MAAM;QACvB,cAAc,EAAE,KAAK;QACrB,SAAS,EAAE,iBAAiB;QAC5B,SAAS,EAAE,iBAAiB;QAC5B,aAAa,EAAE,qBAAqB;KACrC,CAAC;AACJ,CAAC,CAAC"}
@@ -1,10 +1,16 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ViewStyle } from 'react-native';
3
+ export type VerticalResizableOverlayViewAnchorType = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
3
4
  export interface VerticalResizableOverlayViewProps {
4
5
  /** Content to display in the overlay section (foreground, on top) */
5
6
  foregroundContent: ReactNode;
6
7
  /** Content to display in the background section (fills the entire container) */
7
8
  backgroundContent: ReactNode;
9
+ /**
10
+ * Where the overlay is anchored inside the container.
11
+ * Default: topRight
12
+ */
13
+ anchorType?: VerticalResizableOverlayViewAnchorType;
8
14
  /** Initial height ratio for the foreground overlay (0 to 1). Default: 0.5 */
9
15
  initialForegroundRatio?: number;
10
16
  /** Minimum height ratio for the foreground overlay (0 to 1). Default: 0.15 */
@@ -0,0 +1,2 @@
1
+ export * from './voice-recognition-text-input';
2
+ export * from './voice-recognition.utils';
@@ -0,0 +1,3 @@
1
+ export * from './voice-recognition-text-input';
2
+ export * from './voice-recognition.utils';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/voice-recognition/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { TextInputProps } from 'react-native-paper';
3
+ interface VoiceRecognitionTextInputProps extends TextInputProps {
4
+ label: string;
5
+ value: string;
6
+ onValueChange: (value: string) => void;
7
+ onValueSubmit: (value: string) => void;
8
+ }
9
+ export declare const VoiceRecognitionTextInput: FunctionComponent<VoiceRecognitionTextInputProps>;
10
+ export {};
@@ -0,0 +1,104 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { isBlank, isNotBlank } from '@lichens-innovation/ts-common';
14
+ import { ExpoSpeechRecognitionModule, useSpeechRecognitionEvent } from 'expo-speech-recognition';
15
+ import { useState } from 'react';
16
+ import { useTranslation } from 'react-i18next';
17
+ import { Keyboard, StyleSheet, View } from 'react-native';
18
+ import { IconButton, TextInput } from 'react-native-paper';
19
+ import { logger } from '../../logger/logger';
20
+ import { useAppTheme } from '../../theme/theme';
21
+ import { buildFinalValue, ensureVoiceRecognitionPermissions } from './voice-recognition.utils';
22
+ export const VoiceRecognitionTextInput = (_a) => {
23
+ var { label, value, onValueChange, onValueSubmit } = _a, rest = __rest(_a, ["label", "value", "onValueChange", "onValueSubmit"]);
24
+ const styles = useStyles();
25
+ const [isRecording, setIsRecording] = useState(false);
26
+ const [recordingValue, setRecordingValue] = useState('');
27
+ const { t } = useTranslation();
28
+ const speechToTextLanguageCode = t('common:speechToTextLanguageCode');
29
+ const finalValue = buildFinalValue({ query: value, recordingValue });
30
+ const triggerOnSearch = () => {
31
+ Keyboard.dismiss();
32
+ onValueSubmit(finalValue.trim());
33
+ setIsRecording(false);
34
+ setRecordingValue('');
35
+ };
36
+ useSpeechRecognitionEvent('result', (event) => {
37
+ if (!isRecording)
38
+ return;
39
+ const transcript = event.results[0].transcript;
40
+ if (isNotBlank(transcript)) {
41
+ setRecordingValue(transcript);
42
+ }
43
+ });
44
+ useSpeechRecognitionEvent('error', (event) => {
45
+ const { error, message } = event;
46
+ logger.error(`[useSpeechRecognitionEvent] error: ${error} - ${message}`);
47
+ setIsRecording(false);
48
+ setRecordingValue('');
49
+ });
50
+ const handleStartRecording = async () => {
51
+ const hasPermissions = await ensureVoiceRecognitionPermissions();
52
+ if (!hasPermissions)
53
+ return;
54
+ setIsRecording(true);
55
+ setRecordingValue('');
56
+ Keyboard.dismiss();
57
+ ExpoSpeechRecognitionModule.start({
58
+ lang: speechToTextLanguageCode,
59
+ interimResults: true,
60
+ continuous: true,
61
+ });
62
+ };
63
+ const handleStopRecording = async () => {
64
+ if (!isRecording)
65
+ return;
66
+ setIsRecording(false);
67
+ ExpoSpeechRecognitionModule.stop();
68
+ if (isNotBlank(recordingValue)) {
69
+ onValueChange(buildFinalValue({ query: value, recordingValue }));
70
+ }
71
+ setRecordingValue('');
72
+ };
73
+ const toggleRecording = () => {
74
+ if (isRecording) {
75
+ handleStopRecording();
76
+ }
77
+ else {
78
+ handleStartRecording();
79
+ }
80
+ };
81
+ const clearValue = () => {
82
+ onValueChange('');
83
+ setRecordingValue('');
84
+ };
85
+ return (_jsxs(View, { style: styles.container, children: [_jsx(TextInput, Object.assign({}, rest, { style: styles.textInput, label: label, value: finalValue, readOnly: isRecording, onChangeText: onValueChange, multiline: true, numberOfLines: 4, left: _jsx(TextInput.Icon, { icon: isRecording ? 'stop' : 'microphone-outline', onPress: toggleRecording }), right: _jsx(TextInput.Icon, { icon: "close", onPress: clearValue, disabled: isBlank(finalValue) }) })), _jsx(View, { style: styles.actionsContainer, children: _jsx(IconButton, { icon: "send", onPress: triggerOnSearch, disabled: isBlank(finalValue), iconColor: styles.sendIcon.color }) })] }));
86
+ };
87
+ const useStyles = () => {
88
+ const theme = useAppTheme();
89
+ return StyleSheet.create({
90
+ container: {
91
+ flexDirection: 'row',
92
+ },
93
+ textInput: {
94
+ flex: 1,
95
+ },
96
+ actionsContainer: {
97
+ flexDirection: 'row',
98
+ },
99
+ sendIcon: {
100
+ color: theme.colors.primary,
101
+ },
102
+ });
103
+ };
104
+ //# sourceMappingURL=voice-recognition-text-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice-recognition-text-input.js","sourceRoot":"","sources":["../../../src/components/voice-recognition/voice-recognition-text-input.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACjG,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;IACrB,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAE5B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,aAAa,EAAE,KAAK;SACrB;QACD,SAAS,EAAE;YACT,IAAI,EAAE,CAAC;SACR;QACD,gBAAgB,EAAE;YAChB,aAAa,EAAE,KAAK;SACrB;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO;SAC5B;KACF,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ interface BuildFinalValueArgs {
2
+ query: string;
3
+ recordingValue: string;
4
+ }
5
+ export declare const buildFinalValue: ({ query, recordingValue }: BuildFinalValueArgs) => string;
6
+ export declare const ensureVoiceRecognitionPermissions: () => Promise<boolean>;
7
+ export {};
@@ -0,0 +1,24 @@
1
+ import { isNotBlank } from '@lichens-innovation/ts-common';
2
+ import { ExpoSpeechRecognitionModule } from 'expo-speech-recognition';
3
+ import { logger } from '../../logger/logger';
4
+ export const buildFinalValue = ({ query, recordingValue }) => {
5
+ return [query, recordingValue].filter(isNotBlank).join(' ');
6
+ };
7
+ export const ensureVoiceRecognitionPermissions = async () => {
8
+ try {
9
+ const permissions = await ExpoSpeechRecognitionModule.getPermissionsAsync();
10
+ if (!permissions.granted) {
11
+ const result = await ExpoSpeechRecognitionModule.requestPermissionsAsync();
12
+ if (!result.granted) {
13
+ logger.info('[ensureVoiceRecognitionPermissions] Permissions not granted', result);
14
+ return false;
15
+ }
16
+ }
17
+ return true;
18
+ }
19
+ catch (e) {
20
+ logger.error('[ensureVoiceRecognitionPermissions] Error getting permissions', e);
21
+ return false;
22
+ }
23
+ };
24
+ //# sourceMappingURL=voice-recognition.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice-recognition.utils.js","sourceRoot":"","sources":["../../../src/components/voice-recognition/voice-recognition.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAM7C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,KAAK,EAAE,cAAc,EAAuB,EAAU,EAAE;IACxF,OAAO,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC9D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG,KAAK,IAAsB,EAAE;IAC5E,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,MAAM,2BAA2B,CAAC,mBAAmB,EAAE,CAAC;QAC5E,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;YACzB,MAAM,MAAM,GAAG,MAAM,2BAA2B,CAAC,uBAAuB,EAAE,CAAC;YAE3E,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBACpB,MAAM,CAAC,IAAI,CAAC,6DAA6D,EAAE,MAAM,CAAC,CAAC;gBACnF,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QACpB,MAAM,CAAC,KAAK,CAAC,+DAA+D,EAAE,CAAC,CAAC,CAAC;QACjF,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC"}
@@ -158,6 +158,7 @@
158
158
  "share": "Share",
159
159
  "showMore": "Show more",
160
160
  "sort": "Sort",
161
+ "speechToTextLanguageCode": "en-CA",
161
162
  "start": "Start",
162
163
  "startDate": "Start Date",
163
164
  "status": "Status",
@@ -158,6 +158,7 @@
158
158
  "share": "Partager",
159
159
  "showMore": "Afficher plus",
160
160
  "sort": "Trier",
161
+ "speechToTextLanguageCode": "fr-CA",
161
162
  "start": "Démarrer",
162
163
  "startDate": "Date de début",
163
164
  "status": "Statut",
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Lichens Innovation React Native Expo shared components, utilities, hooks and services",
4
4
  "repository": "https://github.com/Lichens-Innovation/react-native-common",
5
5
  "author": "Lichens Innovation",
6
- "version": "3.0.1",
6
+ "version": "3.2.0",
7
7
  "private": false,
8
8
  "main": "dist/index.js",
9
9
  "types": "dist/index.d.ts",
@@ -82,6 +82,7 @@
82
82
  "expo-router": "~6.0.10",
83
83
  "expo-secure-store": "~15.0.7",
84
84
  "expo-sharing": "~14.0.7",
85
+ "expo-speech-recognition": "~3.0.1",
85
86
  "expo-splash-screen": "~31.0.10",
86
87
  "expo-sqlite": "~16.0.8",
87
88
  "expo-status-bar": "~3.0.8",
@@ -143,6 +144,7 @@
143
144
  "expo-router": ">=6.0.10",
144
145
  "expo-secure-store": ">=15.0.7",
145
146
  "expo-sharing": ">=14.0.7",
147
+ "expo-speech-recognition": ">=3.0.1",
146
148
  "expo-splash-screen": ">=31.0.10",
147
149
  "expo-sqlite": ">=16.0.8",
148
150
  "expo-status-bar": ">=3.0.8",
@@ -1 +0,0 @@
1
- {"version":3,"file":"vertical-resizable-overlay-view.js","sourceRoot":"","sources":["../../../../src/components/layout/resizable/vertical-resizable-overlay-view.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAA0B,MAAM,OAAO,CAAC;AACtE,OAAO,EAAqB,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,QAAQ,EAAE,EAAE,gBAAgB,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACjG,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AAExF,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,wB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