@octane-xplat/context-menu 0.0.1 → 0.10.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.
@@ -0,0 +1,25 @@
1
+ /** One row of serialized menu content carried over the bridge. */
2
+ export interface SwiftUIContextMenuItem {
3
+ /** Stable id reported to `onItemSelected`. */
4
+ id: string
5
+ title: string
6
+ /** Renders the item with .destructive role. */
7
+ destructive?: boolean
8
+ disabled?: boolean
9
+ /** Render a divider before this item. */
10
+ divider?: boolean
11
+ }
12
+
13
+ export interface SwiftUIContextMenuProps {
14
+ id?: string
15
+ className?: any
16
+ style?: any
17
+ items?: readonly SwiftUIContextMenuItem[]
18
+ /** Render fn producing the activation element — hosted inside the
19
+ * SwiftUI tree via the plugin's NativeScriptView-by-id factory. */
20
+ trigger: () => any
21
+ /** Optional preview shown while the menu opens (iOS 16+). */
22
+ preview?: () => any
23
+ onItemSelected?: (id: string) => void
24
+ accessibilityLabel?: string
25
+ }
@@ -0,0 +1,2 @@
1
+ export { AppKitContextMenu } from '../AppKitContextMenu.macos.tsrx'
2
+ export type { AppKitContextMenuItem, AppKitContextMenuProps } from './types'
@@ -0,0 +1,24 @@
1
+ /** One row of serialized menu content carried over the bridge. */
2
+ export interface AppKitContextMenuItem {
3
+ /** Stable id reported to `onItemSelected`. */
4
+ id: string
5
+ title: string
6
+ /** No AppKit destructive role — kept in the contract for parity; the
7
+ * item renders as a normal menu row. */
8
+ destructive?: boolean
9
+ disabled?: boolean
10
+ /** Render a divider before this item. */
11
+ divider?: boolean
12
+ }
13
+
14
+ export interface AppKitContextMenuProps {
15
+ id?: string
16
+ className?: any
17
+ style?: any
18
+ items?: readonly AppKitContextMenuItem[]
19
+ /** Render fn producing the trigger element — rendered inline; the NSMenu
20
+ * attaches to the host's backing NSView. */
21
+ trigger: () => any
22
+ onItemSelected?: (id: string) => void
23
+ accessibilityLabel?: string
24
+ }
@@ -0,0 +1,2 @@
1
+ export { ContextMenu } from '../ContextMenu.web.tsrx'
2
+ export type { ContextMenuActivation, ContextMenuItem, ContextMenuProps } from './types'
@@ -0,0 +1,21 @@
1
+ export type ContextMenuActivation = 'longPress' | 'singlePress'
2
+
3
+ export interface ContextMenuItem {
4
+ id: string
5
+ title: string
6
+ destructive?: boolean
7
+ disabled?: boolean
8
+ divider?: boolean
9
+ }
10
+
11
+ export interface ContextMenuProps {
12
+ id?: string
13
+ className?: any
14
+ style?: any
15
+ /** 'longPress' maps to right-click (contextmenu); 'singlePress' to click. */
16
+ activation?: ContextMenuActivation
17
+ items?: readonly ContextMenuItem[]
18
+ trigger: () => any
19
+ onItemSelected?: (id: string) => void
20
+ accessibilityLabel?: string
21
+ }
@@ -0,0 +1,22 @@
1
+ export type MaterialContextMenuActivation = 'longPress' | 'singlePress'
2
+
3
+ export interface MaterialContextMenuItem {
4
+ id: string
5
+ title: string
6
+ destructive?: boolean
7
+ disabled?: boolean
8
+ divider?: boolean
9
+ }
10
+
11
+ export interface MaterialContextMenuProps {
12
+ id?: string
13
+ className?: any
14
+ style?: any
15
+ activation?: MaterialContextMenuActivation
16
+ items?: readonly MaterialContextMenuItem[]
17
+ trigger: () => any
18
+ onItemSelected?: (id: string) => void
19
+ accessibilityLabel?: string
20
+ }
21
+
22
+ export declare function MaterialContextMenu(props: MaterialContextMenuProps): unknown
@@ -0,0 +1,20 @@
1
+ export interface SwiftUIContextMenuItem {
2
+ id: string
3
+ title: string
4
+ destructive?: boolean
5
+ disabled?: boolean
6
+ divider?: boolean
7
+ }
8
+
9
+ export interface SwiftUIContextMenuProps {
10
+ id?: string
11
+ className?: any
12
+ style?: any
13
+ items?: readonly SwiftUIContextMenuItem[]
14
+ trigger: () => any
15
+ preview?: () => any
16
+ onItemSelected?: (id: string) => void
17
+ accessibilityLabel?: string
18
+ }
19
+
20
+ export declare function SwiftUIContextMenu(props: SwiftUIContextMenuProps): unknown
@@ -0,0 +1,19 @@
1
+ export interface AppKitContextMenuItem {
2
+ id: string
3
+ title: string
4
+ destructive?: boolean
5
+ disabled?: boolean
6
+ divider?: boolean
7
+ }
8
+
9
+ export interface AppKitContextMenuProps {
10
+ id?: string
11
+ className?: any
12
+ style?: any
13
+ items?: readonly AppKitContextMenuItem[]
14
+ trigger: () => any
15
+ onItemSelected?: (id: string) => void
16
+ accessibilityLabel?: string
17
+ }
18
+
19
+ export declare function AppKitContextMenu(props: AppKitContextMenuProps): unknown
@@ -0,0 +1,22 @@
1
+ export type ContextMenuActivation = 'longPress' | 'singlePress'
2
+
3
+ export interface ContextMenuItem {
4
+ id: string
5
+ title: string
6
+ destructive?: boolean
7
+ disabled?: boolean
8
+ divider?: boolean
9
+ }
10
+
11
+ export interface ContextMenuProps {
12
+ id?: string
13
+ className?: any
14
+ style?: any
15
+ activation?: ContextMenuActivation
16
+ items?: readonly ContextMenuItem[]
17
+ trigger: () => any
18
+ onItemSelected?: (id: string) => void
19
+ accessibilityLabel?: string
20
+ }
21
+
22
+ export declare function ContextMenu(props: ContextMenuProps): unknown
package/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export {}
package/index.js DELETED
@@ -1,2 +0,0 @@
1
- // Reservation stub; implementation will arrive in a later release.
2
- module.exports = {}