react-native-platform-components 0.5.5 → 0.6.1

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 (78) hide show
  1. package/README.md +342 -72
  2. package/android/src/main/java/com/platformcomponents/PCContextMenuView.kt +419 -0
  3. package/android/src/main/java/com/platformcomponents/PCContextMenuViewManager.kt +200 -0
  4. package/android/src/main/java/com/platformcomponents/PCSelectionMenuView.kt +4 -0
  5. package/android/src/main/java/com/platformcomponents/PlatformComponentsPackage.kt +1 -0
  6. package/app.plugin.cjs +4 -0
  7. package/expo-module.config.json +4 -0
  8. package/ios/PCContextMenu.h +12 -0
  9. package/ios/PCContextMenu.mm +247 -0
  10. package/ios/PCContextMenu.swift +389 -0
  11. package/ios/PCDatePickerView.swift +25 -11
  12. package/lib/commonjs/ContextMenu.js +118 -0
  13. package/lib/commonjs/ContextMenu.js.map +1 -0
  14. package/lib/commonjs/ContextMenuNativeComponent.ts +141 -0
  15. package/lib/commonjs/DatePicker.js +86 -0
  16. package/lib/commonjs/DatePicker.js.map +1 -0
  17. package/lib/commonjs/DatePickerNativeComponent.ts +69 -0
  18. package/lib/commonjs/SelectionMenu.js +73 -0
  19. package/lib/commonjs/SelectionMenu.js.map +1 -0
  20. package/lib/commonjs/SelectionMenuNativeComponent.ts +97 -0
  21. package/lib/commonjs/index.js +50 -0
  22. package/lib/commonjs/index.js.map +1 -0
  23. package/lib/commonjs/package.json +1 -0
  24. package/lib/commonjs/sharedTypes.js +6 -0
  25. package/lib/commonjs/sharedTypes.js.map +1 -0
  26. package/lib/module/ContextMenu.js +111 -0
  27. package/lib/module/ContextMenu.js.map +1 -0
  28. package/lib/module/ContextMenuNativeComponent.ts +141 -0
  29. package/lib/module/index.js +1 -0
  30. package/lib/module/index.js.map +1 -1
  31. package/lib/typescript/commonjs/package.json +1 -0
  32. package/lib/typescript/commonjs/src/ContextMenu.d.ts +79 -0
  33. package/lib/typescript/commonjs/src/ContextMenu.d.ts.map +1 -0
  34. package/lib/typescript/commonjs/src/ContextMenuNativeComponent.d.ts +122 -0
  35. package/lib/typescript/commonjs/src/ContextMenuNativeComponent.d.ts.map +1 -0
  36. package/lib/typescript/commonjs/src/DatePicker.d.ts.map +1 -0
  37. package/lib/typescript/commonjs/src/DatePickerNativeComponent.d.ts.map +1 -0
  38. package/lib/typescript/commonjs/src/SelectionMenu.d.ts.map +1 -0
  39. package/lib/typescript/commonjs/src/SelectionMenuNativeComponent.d.ts.map +1 -0
  40. package/lib/typescript/{src → commonjs/src}/index.d.ts +1 -0
  41. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  42. package/lib/typescript/commonjs/src/sharedTypes.d.ts.map +1 -0
  43. package/lib/typescript/module/src/ContextMenu.d.ts +79 -0
  44. package/lib/typescript/module/src/ContextMenu.d.ts.map +1 -0
  45. package/lib/typescript/module/src/ContextMenuNativeComponent.d.ts +122 -0
  46. package/lib/typescript/module/src/ContextMenuNativeComponent.d.ts.map +1 -0
  47. package/lib/typescript/module/src/DatePicker.d.ts +40 -0
  48. package/lib/typescript/module/src/DatePicker.d.ts.map +1 -0
  49. package/lib/typescript/module/src/DatePickerNativeComponent.d.ts +54 -0
  50. package/lib/typescript/module/src/DatePickerNativeComponent.d.ts.map +1 -0
  51. package/lib/typescript/module/src/SelectionMenu.d.ts +47 -0
  52. package/lib/typescript/module/src/SelectionMenu.d.ts.map +1 -0
  53. package/lib/typescript/module/src/SelectionMenuNativeComponent.d.ts +78 -0
  54. package/lib/typescript/module/src/SelectionMenuNativeComponent.d.ts.map +1 -0
  55. package/lib/typescript/module/src/index.d.ts +5 -0
  56. package/lib/typescript/module/src/index.d.ts.map +1 -0
  57. package/lib/typescript/module/src/sharedTypes.d.ts +12 -0
  58. package/lib/typescript/module/src/sharedTypes.d.ts.map +1 -0
  59. package/package.json +32 -11
  60. package/plugin/build/index.cjs +26 -0
  61. package/plugin/build/index.d.ts +22 -0
  62. package/plugin/build/index.d.ts.map +1 -0
  63. package/plugin/tsconfig.json +16 -0
  64. package/src/ContextMenu.tsx +209 -0
  65. package/src/ContextMenuNativeComponent.ts +141 -0
  66. package/src/index.tsx +1 -0
  67. package/lib/typescript/src/DatePicker.d.ts.map +0 -1
  68. package/lib/typescript/src/DatePickerNativeComponent.d.ts.map +0 -1
  69. package/lib/typescript/src/SelectionMenu.d.ts.map +0 -1
  70. package/lib/typescript/src/SelectionMenuNativeComponent.d.ts.map +0 -1
  71. package/lib/typescript/src/index.d.ts.map +0 -1
  72. package/lib/typescript/src/sharedTypes.d.ts.map +0 -1
  73. /package/lib/typescript/{src → commonjs/src}/DatePicker.d.ts +0 -0
  74. /package/lib/typescript/{src → commonjs/src}/DatePickerNativeComponent.d.ts +0 -0
  75. /package/lib/typescript/{src → commonjs/src}/SelectionMenu.d.ts +0 -0
  76. /package/lib/typescript/{src → commonjs/src}/SelectionMenuNativeComponent.d.ts +0 -0
  77. /package/lib/typescript/{src → commonjs/src}/sharedTypes.d.ts +0 -0
  78. /package/lib/typescript/{package.json → module/package.json} +0 -0
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=sharedTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["sharedTypes.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+
3
+ // ContextMenu.tsx
4
+ import React, { useCallback, useMemo } from 'react';
5
+ import NativeContextMenu from './ContextMenuNativeComponent';
6
+
7
+ /**
8
+ * Attributes for a context menu action.
9
+ */
10
+
11
+ /**
12
+ * A single action in the context menu.
13
+ */
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ /**
16
+ * Convert user-friendly subaction to native format (no further nesting).
17
+ */
18
+ function normalizeSubaction(action) {
19
+ return {
20
+ id: action.id,
21
+ title: action.title,
22
+ subtitle: action.subtitle,
23
+ image: action.image,
24
+ imageColor: action.imageColor,
25
+ attributes: action.attributes ? {
26
+ destructive: action.attributes.destructive ? 'true' : 'false',
27
+ disabled: action.attributes.disabled ? 'true' : 'false',
28
+ hidden: action.attributes.hidden ? 'true' : 'false'
29
+ } : undefined,
30
+ state: action.state
31
+ };
32
+ }
33
+
34
+ /**
35
+ * Convert user-friendly action to native format.
36
+ * Note: Only one level of nesting is supported by the native component.
37
+ */
38
+ function normalizeAction(action) {
39
+ return {
40
+ id: action.id,
41
+ title: action.title,
42
+ subtitle: action.subtitle,
43
+ image: action.image,
44
+ imageColor: action.imageColor,
45
+ attributes: action.attributes ? {
46
+ destructive: action.attributes.destructive ? 'true' : 'false',
47
+ disabled: action.attributes.disabled ? 'true' : 'false',
48
+ hidden: action.attributes.hidden ? 'true' : 'false'
49
+ } : undefined,
50
+ state: action.state,
51
+ subactions: action.subactions?.map(normalizeSubaction)
52
+ };
53
+ }
54
+ export function ContextMenu(props) {
55
+ const {
56
+ style,
57
+ title,
58
+ actions,
59
+ disabled,
60
+ trigger = 'longPress',
61
+ onPressAction,
62
+ onMenuOpen,
63
+ onMenuClose,
64
+ children,
65
+ ios,
66
+ android,
67
+ ...viewProps
68
+ } = props;
69
+ const nativeActions = useMemo(() => actions.map(normalizeAction), [actions]);
70
+ const handlePressAction = useCallback(e => {
71
+ const {
72
+ actionId,
73
+ actionTitle
74
+ } = e.nativeEvent;
75
+ onPressAction?.(actionId, actionTitle);
76
+ }, [onPressAction]);
77
+ const handleMenuOpen = useCallback(() => {
78
+ onMenuOpen?.();
79
+ }, [onMenuOpen]);
80
+ const handleMenuClose = useCallback(() => {
81
+ onMenuClose?.();
82
+ }, [onMenuClose]);
83
+ const nativeIOS = useMemo(() => {
84
+ if (!ios) return undefined;
85
+ return {
86
+ enablePreview: ios.enablePreview ? 'true' : 'false'
87
+ };
88
+ }, [ios]);
89
+ const nativeAndroid = useMemo(() => {
90
+ if (!android) return undefined;
91
+ return {
92
+ anchorPosition: android.anchorPosition,
93
+ visible: android.visible ? 'open' : 'closed'
94
+ };
95
+ }, [android]);
96
+ return /*#__PURE__*/_jsx(NativeContextMenu, {
97
+ style: style,
98
+ title: title,
99
+ actions: nativeActions,
100
+ interactivity: disabled ? 'disabled' : 'enabled',
101
+ trigger: trigger,
102
+ onPressAction: onPressAction ? handlePressAction : undefined,
103
+ onMenuOpen: onMenuOpen ? handleMenuOpen : undefined,
104
+ onMenuClose: onMenuClose ? handleMenuClose : undefined,
105
+ ios: nativeIOS,
106
+ android: nativeAndroid,
107
+ ...viewProps,
108
+ children: children
109
+ });
110
+ }
111
+ //# sourceMappingURL=ContextMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useCallback","useMemo","NativeContextMenu","jsx","_jsx","normalizeSubaction","action","id","title","subtitle","image","imageColor","attributes","destructive","disabled","hidden","undefined","state","normalizeAction","subactions","map","ContextMenu","props","style","actions","trigger","onPressAction","onMenuOpen","onMenuClose","children","ios","android","viewProps","nativeActions","handlePressAction","e","actionId","actionTitle","nativeEvent","handleMenuOpen","handleMenuClose","nativeIOS","enablePreview","nativeAndroid","anchorPosition","visible","interactivity"],"sourceRoot":"../../src","sources":["ContextMenu.tsx"],"mappings":";;AAAA;AACA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAGnD,OAAOC,iBAAiB,MAIjB,8BAA8B;;AAErC;AACA;AACA;;AAUA;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA;AA4EA;AACA;AACA;AACA,SAASC,kBAAkBA,CAACC,MAAyB,EAAmB;EACtE,OAAO;IACLC,EAAE,EAAED,MAAM,CAACC,EAAE;IACbC,KAAK,EAAEF,MAAM,CAACE,KAAK;IACnBC,QAAQ,EAAEH,MAAM,CAACG,QAAQ;IACzBC,KAAK,EAAEJ,MAAM,CAACI,KAAK;IACnBC,UAAU,EAAEL,MAAM,CAACK,UAAU;IAC7BC,UAAU,EAAEN,MAAM,CAACM,UAAU,GACzB;MACEC,WAAW,EAAEP,MAAM,CA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AAU;IAC7DW,UAAU,EAAEA,UAAU,GAAGY,cAAc,GAAGvB,SAAU;IACpDY,WAAW,EAAEA,WAAW,GAAGY,eAAe,GAAGxB,SAAU;IACvDc,GAAG,EAAEW,SAAU;IACfV,OAAO,EAAEY,aAAc;IAAA,GACnBX,SAAS;IAAAH,QAAA,EAEZA;EAAQ,CACQ,CAAC;AAExB","ignoreList":[]}
@@ -0,0 +1,141 @@
1
+ // ContextMenuNativeComponent.ts
2
+ import type { CodegenTypes, HostComponent, ViewProps } from 'react-native';
3
+ import { codegenNativeComponent } from 'react-native';
4
+
5
+ /**
6
+ * Attributes for a context menu action.
7
+ */
8
+ export type ContextMenuActionAttributes = Readonly<{
9
+ /** Whether the action is destructive (red styling) */
10
+ destructive?: string; // 'true' | 'false'
11
+ /** Whether the action is disabled (grayed out) */
12
+ disabled?: string; // 'true' | 'false'
13
+ /** Whether the action is hidden */
14
+ hidden?: string; // 'true' | 'false'
15
+ }>;
16
+
17
+ /**
18
+ * A leaf subaction (no further nesting to avoid codegen recursion issues).
19
+ */
20
+ export type ContextMenuSubaction = Readonly<{
21
+ /** Unique identifier returned in callbacks */
22
+ id: string;
23
+ /** Display title */
24
+ title: string;
25
+ /** Secondary text (iOS only) */
26
+ subtitle?: string;
27
+ /** Icon name (SF Symbol on iOS, drawable resource on Android) */
28
+ image?: string;
29
+ /** Tint color for the icon (hex string, e.g., "#FF0000") */
30
+ imageColor?: string;
31
+ /** Action attributes */
32
+ attributes?: ContextMenuActionAttributes;
33
+ /** Checkmark state: 'off' | 'on' | 'mixed' */
34
+ state?: string;
35
+ }>;
36
+
37
+ /**
38
+ * A single action in the context menu.
39
+ * Actions can be nested one level via `subactions` for submenus.
40
+ */
41
+ export type ContextMenuAction = Readonly<{
42
+ /** Unique identifier returned in callbacks */
43
+ id: string;
44
+ /** Display title */
45
+ title: string;
46
+ /** Secondary text (iOS only) */
47
+ subtitle?: string;
48
+ /** Icon name (SF Symbol on iOS, drawable resource on Android) */
49
+ image?: string;
50
+ /** Tint color for the icon (hex string, e.g., "#FF0000") */
51
+ imageColor?: string;
52
+ /** Action attributes */
53
+ attributes?: ContextMenuActionAttributes;
54
+ /** Checkmark state: 'off' | 'on' | 'mixed' */
55
+ state?: string;
56
+ /** Nested actions for submenu (one level deep) */
57
+ subactions?: ReadonlyArray<ContextMenuSubaction>;
58
+ }>;
59
+
60
+ /**
61
+ * Event emitted when an action is pressed.
62
+ */
63
+ export type ContextMenuPressActionEvent = Readonly<{
64
+ /** The action's unique identifier */
65
+ actionId: string;
66
+ /** The action's title */
67
+ actionTitle: string;
68
+ }>;
69
+
70
+ /** Interactivity state (no booleans for codegen). */
71
+ export type ContextMenuInteractivity = 'enabled' | 'disabled';
72
+
73
+ /** Trigger mode for opening the menu. */
74
+ export type ContextMenuTrigger = 'longPress' | 'tap';
75
+
76
+ /**
77
+ * iOS-specific configuration.
78
+ */
79
+ export type IOSProps = Readonly<{
80
+ /** Enable preview when long-pressing */
81
+ enablePreview?: string; // 'true' | 'false'
82
+ }>;
83
+
84
+ /**
85
+ * Android-specific configuration.
86
+ */
87
+ export type AndroidProps = Readonly<{
88
+ /** Anchor position for the popup menu */
89
+ anchorPosition?: string; // 'left' | 'right'
90
+ /**
91
+ * Programmatic visibility control (Android only).
92
+ * 'open' to show the menu, 'closed' to hide it.
93
+ */
94
+ visible?: string; // 'open' | 'closed'
95
+ }>;
96
+
97
+ export interface ContextMenuProps extends ViewProps {
98
+ /**
99
+ * Menu title (shown as header on iOS).
100
+ */
101
+ title?: string;
102
+
103
+ /**
104
+ * Menu actions.
105
+ */
106
+ actions: ReadonlyArray<ContextMenuAction>;
107
+
108
+ /**
109
+ * Enabled / disabled state.
110
+ */
111
+ interactivity?: string; // ContextMenuInteractivity
112
+
113
+ /**
114
+ * How the menu is triggered:
115
+ * - 'longPress' (default): Long-press opens the menu
116
+ * - 'tap': Single tap opens the menu
117
+ */
118
+ trigger?: string; // ContextMenuTrigger
119
+
120
+ /**
121
+ * Fired when user presses an action.
122
+ */
123
+ onPressAction?: CodegenTypes.BubblingEventHandler<ContextMenuPressActionEvent>;
124
+
125
+ /**
126
+ * Fired when menu opens.
127
+ */
128
+ onMenuOpen?: CodegenTypes.BubblingEventHandler<Readonly<{}>>;
129
+
130
+ /**
131
+ * Fired when menu closes.
132
+ */
133
+ onMenuClose?: CodegenTypes.BubblingEventHandler<Readonly<{}>>;
134
+
135
+ ios?: IOSProps;
136
+ android?: AndroidProps;
137
+ }
138
+
139
+ export default codegenNativeComponent<ContextMenuProps>(
140
+ 'PCContextMenu'
141
+ ) as HostComponent<ContextMenuProps>;
@@ -2,5 +2,6 @@
2
2
 
3
3
  export * from "./DatePicker.js";
4
4
  export * from "./SelectionMenu.js";
5
+ export * from "./ContextMenu.js";
5
6
  export * from "./sharedTypes.js";
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,cAAc,iBAAc;AAC5B,cAAc,oBAAiB;AAC/B,cAAc,kBAAe","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,cAAc,iBAAc;AAC5B,cAAc,oBAAiB;AAC/B,cAAc,kBAAe;AAC7B,cAAc,kBAAe","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,79 @@
1
+ import React from 'react';
2
+ import { type ViewProps } from 'react-native';
3
+ /**
4
+ * Attributes for a context menu action.
5
+ */
6
+ export interface ContextMenuActionAttributes {
7
+ /** Whether the action is destructive (red styling) */
8
+ destructive?: boolean;
9
+ /** Whether the action is disabled (grayed out) */
10
+ disabled?: boolean;
11
+ /** Whether the action is hidden */
12
+ hidden?: boolean;
13
+ }
14
+ /**
15
+ * A single action in the context menu.
16
+ */
17
+ export interface ContextMenuAction {
18
+ /** Unique identifier returned in callbacks */
19
+ id: string;
20
+ /** Display title */
21
+ title: string;
22
+ /** Secondary text (iOS only) */
23
+ subtitle?: string;
24
+ /** Icon name (SF Symbol on iOS, drawable resource on Android) */
25
+ image?: string;
26
+ /** Tint color for the icon (hex string or named color) */
27
+ imageColor?: string;
28
+ /** Action attributes */
29
+ attributes?: ContextMenuActionAttributes;
30
+ /** Checkmark state */
31
+ state?: 'off' | 'on' | 'mixed';
32
+ /** Nested actions for submenu */
33
+ subactions?: readonly ContextMenuAction[];
34
+ }
35
+ export interface ContextMenuProps extends ViewProps {
36
+ /** Menu title (shown as header on iOS) */
37
+ title?: string;
38
+ /** Menu actions */
39
+ actions: readonly ContextMenuAction[];
40
+ /** Disabled state */
41
+ disabled?: boolean;
42
+ /**
43
+ * How the menu is triggered:
44
+ * - 'longPress' (default): Long-press opens the menu
45
+ * - 'tap': Single tap opens the menu
46
+ */
47
+ trigger?: 'longPress' | 'tap';
48
+ /**
49
+ * Called when the user presses an action.
50
+ * Receives the action's id and title.
51
+ */
52
+ onPressAction?: (actionId: string, actionTitle: string) => void;
53
+ /** Called when the menu opens */
54
+ onMenuOpen?: () => void;
55
+ /** Called when the menu closes */
56
+ onMenuClose?: () => void;
57
+ /** The content to wrap */
58
+ children: React.ReactNode;
59
+ /** iOS-specific props */
60
+ ios?: {
61
+ /** Enable preview when long-pressing */
62
+ enablePreview?: boolean;
63
+ };
64
+ /** Android-specific props */
65
+ android?: {
66
+ /** Anchor position for the popup menu */
67
+ anchorPosition?: 'left' | 'right';
68
+ /**
69
+ * Programmatic visibility control (Android only).
70
+ * Set to true to open the menu, false to close it.
71
+ * Note: iOS does not support programmatic menu opening.
72
+ */
73
+ visible?: boolean;
74
+ };
75
+ /** Test identifier */
76
+ testID?: string;
77
+ }
78
+ export declare function ContextMenu(props: ContextMenuProps): React.ReactElement;
79
+ //# sourceMappingURL=ContextMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../../src/ContextMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM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;IAEzB,0BAA0B;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B,yBAAyB;IACzB,GAAG,CAAC,EAAE;QACJ,wCAAwC;QACxC,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB,CAAC;IAEF,6BAA6B;IAC7B,OAAO,CAAC,EAAE;QACR,yCAAyC;QACzC,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAClC;;;;WAIG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;IAEF,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA8CD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,KAAK,CAAC,YAAY,CAkEvE"}
@@ -0,0 +1,122 @@
1
+ import type { CodegenTypes, HostComponent, ViewProps } from 'react-native';
2
+ /**
3
+ * Attributes for a context menu action.
4
+ */
5
+ export type ContextMenuActionAttributes = Readonly<{
6
+ /** Whether the action is destructive (red styling) */
7
+ destructive?: string;
8
+ /** Whether the action is disabled (grayed out) */
9
+ disabled?: string;
10
+ /** Whether the action is hidden */
11
+ hidden?: string;
12
+ }>;
13
+ /**
14
+ * A leaf subaction (no further nesting to avoid codegen recursion issues).
15
+ */
16
+ export type ContextMenuSubaction = Readonly<{
17
+ /** Unique identifier returned in callbacks */
18
+ id: string;
19
+ /** Display title */
20
+ title: string;
21
+ /** Secondary text (iOS only) */
22
+ subtitle?: string;
23
+ /** Icon name (SF Symbol on iOS, drawable resource on Android) */
24
+ image?: string;
25
+ /** Tint color for the icon (hex string, e.g., "#FF0000") */
26
+ imageColor?: string;
27
+ /** Action attributes */
28
+ attributes?: ContextMenuActionAttributes;
29
+ /** Checkmark state: 'off' | 'on' | 'mixed' */
30
+ state?: string;
31
+ }>;
32
+ /**
33
+ * A single action in the context menu.
34
+ * Actions can be nested one level via `subactions` for submenus.
35
+ */
36
+ export type ContextMenuAction = Readonly<{
37
+ /** Unique identifier returned in callbacks */
38
+ id: string;
39
+ /** Display title */
40
+ title: string;
41
+ /** Secondary text (iOS only) */
42
+ subtitle?: string;
43
+ /** Icon name (SF Symbol on iOS, drawable resource on Android) */
44
+ image?: string;
45
+ /** Tint color for the icon (hex string, e.g., "#FF0000") */
46
+ imageColor?: string;
47
+ /** Action attributes */
48
+ attributes?: ContextMenuActionAttributes;
49
+ /** Checkmark state: 'off' | 'on' | 'mixed' */
50
+ state?: string;
51
+ /** Nested actions for submenu (one level deep) */
52
+ subactions?: ReadonlyArray<ContextMenuSubaction>;
53
+ }>;
54
+ /**
55
+ * Event emitted when an action is pressed.
56
+ */
57
+ export type ContextMenuPressActionEvent = Readonly<{
58
+ /** The action's unique identifier */
59
+ actionId: string;
60
+ /** The action's title */
61
+ actionTitle: string;
62
+ }>;
63
+ /** Interactivity state (no booleans for codegen). */
64
+ export type ContextMenuInteractivity = 'enabled' | 'disabled';
65
+ /** Trigger mode for opening the menu. */
66
+ export type ContextMenuTrigger = 'longPress' | 'tap';
67
+ /**
68
+ * iOS-specific configuration.
69
+ */
70
+ export type IOSProps = Readonly<{
71
+ /** Enable preview when long-pressing */
72
+ enablePreview?: string;
73
+ }>;
74
+ /**
75
+ * Android-specific configuration.
76
+ */
77
+ export type AndroidProps = Readonly<{
78
+ /** Anchor position for the popup menu */
79
+ anchorPosition?: string;
80
+ /**
81
+ * Programmatic visibility control (Android only).
82
+ * 'open' to show the menu, 'closed' to hide it.
83
+ */
84
+ visible?: string;
85
+ }>;
86
+ export interface ContextMenuProps extends ViewProps {
87
+ /**
88
+ * Menu title (shown as header on iOS).
89
+ */
90
+ title?: string;
91
+ /**
92
+ * Menu actions.
93
+ */
94
+ actions: ReadonlyArray<ContextMenuAction>;
95
+ /**
96
+ * Enabled / disabled state.
97
+ */
98
+ interactivity?: string;
99
+ /**
100
+ * How the menu is triggered:
101
+ * - 'longPress' (default): Long-press opens the menu
102
+ * - 'tap': Single tap opens the menu
103
+ */
104
+ trigger?: string;
105
+ /**
106
+ * Fired when user presses an action.
107
+ */
108
+ onPressAction?: CodegenTypes.BubblingEventHandler<ContextMenuPressActionEvent>;
109
+ /**
110
+ * Fired when menu opens.
111
+ */
112
+ onMenuOpen?: CodegenTypes.BubblingEventHandler<Readonly<{}>>;
113
+ /**
114
+ * Fired when menu closes.
115
+ */
116
+ onMenuClose?: CodegenTypes.BubblingEventHandler<Readonly<{}>>;
117
+ ios?: IOSProps;
118
+ android?: AndroidProps;
119
+ }
120
+ declare const _default: HostComponent<ContextMenuProps>;
121
+ export default _default;
122
+ //# sourceMappingURL=ContextMenuNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextMenuNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/ContextMenuNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG3E;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC;IACjD,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC;IAC1C,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wBAAwB;IACxB,UAAU,CAAC,EAAE,2BAA2B,CAAC;IACzC,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM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UAAU,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;AAEpC;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC,CAAC;AAEH,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD;;OAEG;IACH,OAAO,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;IAE5C;;;;;OAKG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAEpD;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,CAAC;IAEvE;;OAEG;IACH,cAAc,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;IAEjE,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;;AAED,wBAA6E"}
@@ -1,4 +1,5 @@
1
1
  export * from './DatePicker';
2
2
  export * from './SelectionMenu';
3
+ export * from './ContextMenu';
3
4
  export * from './sharedTypes';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sharedTypes.d.ts","sourceRoot":"","sources":["../../../../src/sharedTypes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,0CAA0C;AAC1C,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAExC,kDAAkD;AAClD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,UAAU,CAAC;AAEhD,4CAA4C;AAC5C,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,IAAI,CAAC;AAElD,uCAAuC;AACvC,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;AAEtC,oCAAoC;AACpC,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,YAAY,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,79 @@
1
+ import React from 'react';
2
+ import { type ViewProps } from 'react-native';
3
+ /**
4
+ * Attributes for a context menu action.
5
+ */
6
+ export interface ContextMenuActionAttributes {
7
+ /** Whether the action is destructive (red styling) */
8
+ destructive?: boolean;
9
+ /** Whether the action is disabled (grayed out) */
10
+ disabled?: boolean;
11
+ /** Whether the action is hidden */
12
+ hidden?: boolean;
13
+ }
14
+ /**
15
+ * A single action in the context menu.
16
+ */
17
+ export interface ContextMenuAction {
18
+ /** Unique identifier returned in callbacks */
19
+ id: string;
20
+ /** Display title */
21
+ title: string;
22
+ /** Secondary text (iOS only) */
23
+ subtitle?: string;
24
+ /** Icon name (SF Symbol on iOS, drawable resource on Android) */
25
+ image?: string;
26
+ /** Tint color for the icon (hex string or named color) */
27
+ imageColor?: string;
28
+ /** Action attributes */
29
+ attributes?: ContextMenuActionAttributes;
30
+ /** Checkmark state */
31
+ state?: 'off' | 'on' | 'mixed';
32
+ /** Nested actions for submenu */
33
+ subactions?: readonly ContextMenuAction[];
34
+ }
35
+ export interface ContextMenuProps extends ViewProps {
36
+ /** Menu title (shown as header on iOS) */
37
+ title?: string;
38
+ /** Menu actions */
39
+ actions: readonly ContextMenuAction[];
40
+ /** Disabled state */
41
+ disabled?: boolean;
42
+ /**
43
+ * How the menu is triggered:
44
+ * - 'longPress' (default): Long-press opens the menu
45
+ * - 'tap': Single tap opens the menu
46
+ */
47
+ trigger?: 'longPress' | 'tap';
48
+ /**
49
+ * Called when the user presses an action.
50
+ * Receives the action's id and title.
51
+ */
52
+ onPressAction?: (actionId: string, actionTitle: string) => void;
53
+ /** Called when the menu opens */
54
+ onMenuOpen?: () => void;
55
+ /** Called when the menu closes */
56
+ onMenuClose?: () => void;
57
+ /** The content to wrap */
58
+ children: React.ReactNode;
59
+ /** iOS-specific props */
60
+ ios?: {
61
+ /** Enable preview when long-pressing */
62
+ enablePreview?: boolean;
63
+ };
64
+ /** Android-specific props */
65
+ android?: {
66
+ /** Anchor position for the popup menu */
67
+ anchorPosition?: 'left' | 'right';
68
+ /**
69
+ * Programmatic visibility control (Android only).
70
+ * Set to true to open the menu, false to close it.
71
+ * Note: iOS does not support programmatic menu opening.
72
+ */
73
+ visible?: boolean;
74
+ };
75
+ /** Test identifier */
76
+ testID?: string;
77
+ }
78
+ export declare function ContextMenu(props: ContextMenuProps): React.ReactElement;
79
+ //# sourceMappingURL=ContextMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../../src/ContextMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAQ9C;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,sDAAsD;IACtD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,8CAA8C;IAC9C,EAAE,EA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