@radix-ui/react-context-menu 2.3.4 → 2.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -77,21 +77,5 @@ type MenuSubContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.S
77
77
  interface ContextMenuSubContentProps extends MenuSubContentProps {
78
78
  }
79
79
  declare const ContextMenuSubContent: React.ForwardRefExoticComponent<ContextMenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
80
- declare const Root: React.FC<ContextMenuProps>;
81
- declare const Trigger: React.ForwardRefExoticComponent<ContextMenuTriggerProps & React.RefAttributes<HTMLSpanElement>>;
82
- declare const Portal: React.FC<ContextMenuPortalProps>;
83
- declare const Content: React.ForwardRefExoticComponent<ContextMenuContentProps & React.RefAttributes<HTMLDivElement>>;
84
- declare const Group: React.ForwardRefExoticComponent<ContextMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
85
- declare const Label: React.ForwardRefExoticComponent<ContextMenuLabelProps & React.RefAttributes<HTMLDivElement>>;
86
- declare const Item: React.ForwardRefExoticComponent<ContextMenuItemProps & React.RefAttributes<HTMLDivElement>>;
87
- declare const CheckboxItem: React.ForwardRefExoticComponent<ContextMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
88
- declare const RadioGroup: React.ForwardRefExoticComponent<ContextMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
89
- declare const RadioItem: React.ForwardRefExoticComponent<ContextMenuRadioItemProps & React.RefAttributes<HTMLDivElement>>;
90
- declare const ItemIndicator: React.ForwardRefExoticComponent<ContextMenuItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
91
- declare const Separator: React.ForwardRefExoticComponent<ContextMenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
92
- declare const Arrow: React.ForwardRefExoticComponent<ContextMenuArrowProps & React.RefAttributes<SVGSVGElement>>;
93
- declare const Sub: React.FC<ContextMenuSubProps>;
94
- declare const SubTrigger: React.ForwardRefExoticComponent<ContextMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
95
- declare const SubContent: React.ForwardRefExoticComponent<ContextMenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
96
80
 
97
- export { Arrow, CheckboxItem, Content, ContextMenu, ContextMenuArrow, type ContextMenuArrowProps, ContextMenuCheckboxItem, type ContextMenuCheckboxItemProps, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, type ContextMenuGroupProps, ContextMenuItem, ContextMenuItemIndicator, type ContextMenuItemIndicatorProps, type ContextMenuItemProps, ContextMenuLabel, type ContextMenuLabelProps, ContextMenuPortal, type ContextMenuPortalProps, type ContextMenuProps, ContextMenuRadioGroup, type ContextMenuRadioGroupProps, ContextMenuRadioItem, type ContextMenuRadioItemProps, ContextMenuSeparator, type ContextMenuSeparatorProps, ContextMenuSub, ContextMenuSubContent, type ContextMenuSubContentProps, type ContextMenuSubProps, ContextMenuSubTrigger, type ContextMenuSubTriggerProps, ContextMenuTrigger, type ContextMenuTriggerProps, Group, Item, ItemIndicator, Label, Portal, RadioGroup, RadioItem, Root, Separator, Sub, SubContent, SubTrigger, Trigger, createContextMenuScope };
81
+ export { ContextMenuArrow as Arrow, ContextMenuCheckboxItem as CheckboxItem, ContextMenuContent as Content, ContextMenu, ContextMenuArrow, type ContextMenuArrowProps, ContextMenuCheckboxItem, type ContextMenuCheckboxItemProps, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, type ContextMenuGroupProps, ContextMenuItem, ContextMenuItemIndicator, type ContextMenuItemIndicatorProps, type ContextMenuItemProps, ContextMenuLabel, type ContextMenuLabelProps, ContextMenuPortal, type ContextMenuPortalProps, type ContextMenuProps, ContextMenuRadioGroup, type ContextMenuRadioGroupProps, ContextMenuRadioItem, type ContextMenuRadioItemProps, ContextMenuSeparator, type ContextMenuSeparatorProps, ContextMenuSub, ContextMenuSubContent, type ContextMenuSubContentProps, type ContextMenuSubProps, ContextMenuSubTrigger, type ContextMenuSubTriggerProps, ContextMenuTrigger, type ContextMenuTriggerProps, ContextMenuGroup as Group, ContextMenuItem as Item, ContextMenuItemIndicator as ItemIndicator, ContextMenuLabel as Label, ContextMenuPortal as Portal, ContextMenuRadioGroup as RadioGroup, ContextMenuRadioItem as RadioItem, ContextMenu as Root, ContextMenuSeparator as Separator, ContextMenuSub as Sub, ContextMenuSubContent as SubContent, ContextMenuSubTrigger as SubTrigger, ContextMenuTrigger as Trigger, createContextMenuScope };
package/dist/index.d.ts CHANGED
@@ -77,21 +77,5 @@ type MenuSubContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.S
77
77
  interface ContextMenuSubContentProps extends MenuSubContentProps {
78
78
  }
79
79
  declare const ContextMenuSubContent: React.ForwardRefExoticComponent<ContextMenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
80
- declare const Root: React.FC<ContextMenuProps>;
81
- declare const Trigger: React.ForwardRefExoticComponent<ContextMenuTriggerProps & React.RefAttributes<HTMLSpanElement>>;
82
- declare const Portal: React.FC<ContextMenuPortalProps>;
83
- declare const Content: React.ForwardRefExoticComponent<ContextMenuContentProps & React.RefAttributes<HTMLDivElement>>;
84
- declare const Group: React.ForwardRefExoticComponent<ContextMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
85
- declare const Label: React.ForwardRefExoticComponent<ContextMenuLabelProps & React.RefAttributes<HTMLDivElement>>;
86
- declare const Item: React.ForwardRefExoticComponent<ContextMenuItemProps & React.RefAttributes<HTMLDivElement>>;
87
- declare const CheckboxItem: React.ForwardRefExoticComponent<ContextMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
88
- declare const RadioGroup: React.ForwardRefExoticComponent<ContextMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
89
- declare const RadioItem: React.ForwardRefExoticComponent<ContextMenuRadioItemProps & React.RefAttributes<HTMLDivElement>>;
90
- declare const ItemIndicator: React.ForwardRefExoticComponent<ContextMenuItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
91
- declare const Separator: React.ForwardRefExoticComponent<ContextMenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
92
- declare const Arrow: React.ForwardRefExoticComponent<ContextMenuArrowProps & React.RefAttributes<SVGSVGElement>>;
93
- declare const Sub: React.FC<ContextMenuSubProps>;
94
- declare const SubTrigger: React.ForwardRefExoticComponent<ContextMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
95
- declare const SubContent: React.ForwardRefExoticComponent<ContextMenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
96
80
 
97
- export { Arrow, CheckboxItem, Content, ContextMenu, ContextMenuArrow, type ContextMenuArrowProps, ContextMenuCheckboxItem, type ContextMenuCheckboxItemProps, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, type ContextMenuGroupProps, ContextMenuItem, ContextMenuItemIndicator, type ContextMenuItemIndicatorProps, type ContextMenuItemProps, ContextMenuLabel, type ContextMenuLabelProps, ContextMenuPortal, type ContextMenuPortalProps, type ContextMenuProps, ContextMenuRadioGroup, type ContextMenuRadioGroupProps, ContextMenuRadioItem, type ContextMenuRadioItemProps, ContextMenuSeparator, type ContextMenuSeparatorProps, ContextMenuSub, ContextMenuSubContent, type ContextMenuSubContentProps, type ContextMenuSubProps, ContextMenuSubTrigger, type ContextMenuSubTriggerProps, ContextMenuTrigger, type ContextMenuTriggerProps, Group, Item, ItemIndicator, Label, Portal, RadioGroup, RadioItem, Root, Separator, Sub, SubContent, SubTrigger, Trigger, createContextMenuScope };
81
+ export { ContextMenuArrow as Arrow, ContextMenuCheckboxItem as CheckboxItem, ContextMenuContent as Content, ContextMenu, ContextMenuArrow, type ContextMenuArrowProps, ContextMenuCheckboxItem, type ContextMenuCheckboxItemProps, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, type ContextMenuGroupProps, ContextMenuItem, ContextMenuItemIndicator, type ContextMenuItemIndicatorProps, type ContextMenuItemProps, ContextMenuLabel, type ContextMenuLabelProps, ContextMenuPortal, type ContextMenuPortalProps, type ContextMenuProps, ContextMenuRadioGroup, type ContextMenuRadioGroupProps, ContextMenuRadioItem, type ContextMenuRadioItemProps, ContextMenuSeparator, type ContextMenuSeparatorProps, ContextMenuSub, ContextMenuSubContent, type ContextMenuSubContentProps, type ContextMenuSubProps, ContextMenuSubTrigger, type ContextMenuSubTriggerProps, ContextMenuTrigger, type ContextMenuTriggerProps, ContextMenuGroup as Group, ContextMenuItem as Item, ContextMenuItemIndicator as ItemIndicator, ContextMenuLabel as Label, ContextMenuPortal as Portal, ContextMenuRadioGroup as RadioGroup, ContextMenuRadioItem as RadioItem, ContextMenu as Root, ContextMenuSeparator as Separator, ContextMenuSub as Sub, ContextMenuSubContent as SubContent, ContextMenuSubTrigger as SubTrigger, ContextMenuTrigger as Trigger, createContextMenuScope };
package/dist/index.js CHANGED
@@ -32,9 +32,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
32
32
  // src/index.ts
33
33
  var index_exports = {};
34
34
  __export(index_exports, {
35
- Arrow: () => Arrow2,
36
- CheckboxItem: () => CheckboxItem2,
37
- Content: () => Content2,
35
+ Arrow: () => ContextMenuArrow,
36
+ CheckboxItem: () => ContextMenuCheckboxItem,
37
+ Content: () => ContextMenuContent,
38
38
  ContextMenu: () => ContextMenu,
39
39
  ContextMenuArrow: () => ContextMenuArrow,
40
40
  ContextMenuCheckboxItem: () => ContextMenuCheckboxItem,
@@ -51,19 +51,19 @@ __export(index_exports, {
51
51
  ContextMenuSubContent: () => ContextMenuSubContent,
52
52
  ContextMenuSubTrigger: () => ContextMenuSubTrigger,
53
53
  ContextMenuTrigger: () => ContextMenuTrigger,
54
- Group: () => Group2,
55
- Item: () => Item2,
56
- ItemIndicator: () => ItemIndicator2,
57
- Label: () => Label2,
58
- Portal: () => Portal2,
59
- RadioGroup: () => RadioGroup2,
60
- RadioItem: () => RadioItem2,
61
- Root: () => Root2,
62
- Separator: () => Separator2,
63
- Sub: () => Sub2,
64
- SubContent: () => SubContent2,
65
- SubTrigger: () => SubTrigger2,
66
- Trigger: () => Trigger,
54
+ Group: () => ContextMenuGroup,
55
+ Item: () => ContextMenuItem,
56
+ ItemIndicator: () => ContextMenuItemIndicator,
57
+ Label: () => ContextMenuLabel,
58
+ Portal: () => ContextMenuPortal,
59
+ RadioGroup: () => ContextMenuRadioGroup,
60
+ RadioItem: () => ContextMenuRadioItem,
61
+ Root: () => ContextMenu,
62
+ Separator: () => ContextMenuSeparator,
63
+ Sub: () => ContextMenuSub,
64
+ SubContent: () => ContextMenuSubContent,
65
+ SubTrigger: () => ContextMenuSubTrigger,
66
+ Trigger: () => ContextMenuTrigger,
67
67
  createContextMenuScope: () => createContextMenuScope
68
68
  });
69
69
  module.exports = __toCommonJS(index_exports);
@@ -327,20 +327,4 @@ function whenTouchOrPen(handler) {
327
327
  return (event) => event.pointerType !== "mouse" ? handler(event) : void 0;
328
328
  }
329
329
  __name(whenTouchOrPen, "whenTouchOrPen");
330
- var Root2 = ContextMenu;
331
- var Trigger = ContextMenuTrigger;
332
- var Portal2 = ContextMenuPortal;
333
- var Content2 = ContextMenuContent;
334
- var Group2 = ContextMenuGroup;
335
- var Label2 = ContextMenuLabel;
336
- var Item2 = ContextMenuItem;
337
- var CheckboxItem2 = ContextMenuCheckboxItem;
338
- var RadioGroup2 = ContextMenuRadioGroup;
339
- var RadioItem2 = ContextMenuRadioItem;
340
- var ItemIndicator2 = ContextMenuItemIndicator;
341
- var Separator2 = ContextMenuSeparator;
342
- var Arrow2 = ContextMenuArrow;
343
- var Sub2 = ContextMenuSub;
344
- var SubTrigger2 = ContextMenuSubTrigger;
345
- var SubContent2 = ContextMenuSubContent;
346
330
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts", "../src/context-menu.tsx"],
4
- "sourcesContent": ["'use client';\nexport {\n createContextMenuScope,\n //\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuPortal,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuLabel,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuItemIndicator,\n ContextMenuSeparator,\n ContextMenuArrow,\n ContextMenuSub,\n ContextMenuSubTrigger,\n ContextMenuSubContent,\n //\n Root,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n} from './context-menu';\nexport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n ContextMenuPortalProps,\n ContextMenuContentProps,\n ContextMenuGroupProps,\n ContextMenuLabelProps,\n ContextMenuItemProps,\n ContextMenuCheckboxItemProps,\n ContextMenuRadioGroupProps,\n ContextMenuRadioItemProps,\n ContextMenuItemIndicatorProps,\n ContextMenuSeparatorProps,\n ContextMenuArrowProps,\n ContextMenuSubProps,\n ContextMenuSubTriggerProps,\n ContextMenuSubContentProps,\n} from './context-menu';\n", "import * as React from 'react';\nimport { IS_DEVELOPMENT } from '@radix-ui/primitive/is-development';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\ntype Point = { x: number; y: number };\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenu\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTEXT_MENU_NAME = 'ContextMenu';\n\ntype ScopedProps<P> = P & { __scopeContextMenu?: Scope };\nconst [createContextMenuContext, createContextMenuScope] = createContextScope(CONTEXT_MENU_NAME, [\n createMenuScope,\n]);\nconst useMenuScope = createMenuScope();\n\ninterface ContextMenuContextValue {\n open: boolean;\n onOpenChange(open: boolean): void;\n modal: boolean;\n hasInteractedRef: React.RefObject<boolean>;\n}\n\nconst [ContextMenuProvider, useContextMenuContext] =\n createContextMenuContext<ContextMenuContextValue>(CONTEXT_MENU_NAME);\n\ninterface ContextMenuProps {\n children?: React.ReactNode;\n open?: boolean;\n onOpenChange?(open: boolean): void;\n dir?: Direction;\n modal?: boolean;\n}\n\nconst ContextMenu: React.FC<ContextMenuProps> = (props: ScopedProps<ContextMenuProps>) => {\n const { __scopeContextMenu, children, onOpenChange, open: openProp, dir, modal = true } = props;\n\n // OK to disable conditionally calling hooks here because they will always run\n // consistently in the same environment. Bundlers should be able to remove the\n // code block entirely in production.\n /* eslint-disable react-hooks/rules-of-hooks */\n const hasInteractedRef = React.useRef(false);\n if (IS_DEVELOPMENT) {\n const hasWarnedRef = React.useRef(false);\n React.useEffect(() => {\n if (openProp === true && !hasInteractedRef.current && !hasWarnedRef.current) {\n hasWarnedRef.current = true;\n // dev warning: open prop is controllable but its position has not been set\n // because the user has not interacted with the trigger. The controllable\n // state is only enabled so that the user can read or programatically close\n // the menu. Programatically opening the menu will anchor it to the most\n // recently interacted position.\n console.warn(\n 'ContextMenu: The `open` prop has been set to `true` before the user has interacted with the trigger, so its position is indeterminate. This is likely unintended and will result in the menu being anchored to the top-left corner of the viewport.',\n );\n }\n }, [openProp]);\n }\n /* eslint-enable react-hooks/rules-of-hooks */\n\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: false,\n onChange: onOpenChange,\n caller: CONTEXT_MENU_NAME,\n });\n\n const menuScope = useMenuScope(__scopeContextMenu);\n\n return (\n <ContextMenuProvider\n scope={__scopeContextMenu}\n open={open}\n onOpenChange={setOpen}\n modal={modal}\n hasInteractedRef={hasInteractedRef}\n >\n <MenuPrimitive.Root {...menuScope} dir={dir} open={open} onOpenChange={setOpen} modal={modal}>\n {children}\n </MenuPrimitive.Root>\n </ContextMenuProvider>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'ContextMenuTrigger';\n\ntype ContextMenuTriggerElement = React.ComponentRef<typeof Primitive.span>;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;\ninterface ContextMenuTriggerProps extends PrimitiveSpanProps {\n disabled?: boolean;\n}\n\nconst ContextMenuTrigger = /* @__PURE__ */ React.forwardRef<\n ContextMenuTriggerElement,\n ContextMenuTriggerProps\n>(\n // blank line to reduce diff noise\n function ContextMenuTrigger(props: ScopedProps<ContextMenuTriggerProps>, forwardedRef) {\n const { __scopeContextMenu, disabled = false, ...triggerProps } = props;\n const context = useContextMenuContext(TRIGGER_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const [point, setPoint] = React.useState<Point>({ x: 0, y: 0 });\n\n // Re-create the virtual anchor whenever the pointer position changes so the\n // content re-anchors to the latest point when the menu is re-triggered while\n // already open (e.g. right-clicking in a new location, #2611).\n const virtualRef = React.useMemo(\n () => ({\n current: {\n getBoundingClientRect: () => DOMRect.fromRect({ width: 0, height: 0, ...point }),\n },\n }),\n [point],\n );\n const longPressTimerRef = React.useRef(0);\n const clearLongPress = React.useCallback(\n () => window.clearTimeout(longPressTimerRef.current),\n [],\n );\n const handleOpen = (event: React.MouseEvent | React.PointerEvent) => {\n context.hasInteractedRef.current = true;\n setPoint({ x: event.clientX, y: event.clientY });\n context.onOpenChange(true);\n };\n\n React.useEffect(() => clearLongPress, [clearLongPress]);\n React.useEffect(() => void (disabled && clearLongPress()), [disabled, clearLongPress]);\n\n return (\n <>\n <MenuPrimitive.Anchor {...menuScope} virtualRef={virtualRef} />\n <Primitive.span\n data-state={context.open ? 'open' : 'closed'}\n data-disabled={disabled ? '' : undefined}\n {...triggerProps}\n ref={forwardedRef}\n // prevent iOS context menu from appearing\n style={{ WebkitTouchCallout: 'none', ...props.style }}\n // if trigger is disabled, enable the native Context Menu\n onContextMenu={\n disabled\n ? props.onContextMenu\n : composeEventHandlers(props.onContextMenu, (event) => {\n // clearing the long press here because some platforms already support\n // long press to trigger a `contextmenu` event\n clearLongPress();\n handleOpen(event);\n event.preventDefault();\n })\n }\n onPointerDown={\n disabled\n ? props.onPointerDown\n : composeEventHandlers(\n props.onPointerDown,\n whenTouchOrPen((event) => {\n // clear the long press here in case there's multiple touch points\n clearLongPress();\n if (context.open) {\n context.onOpenChange(false);\n }\n longPressTimerRef.current = window.setTimeout(() => handleOpen(event), 700);\n }),\n )\n }\n onPointerMove={\n disabled\n ? props.onPointerMove\n : composeEventHandlers(props.onPointerMove, whenTouchOrPen(clearLongPress))\n }\n onPointerCancel={\n disabled\n ? props.onPointerCancel\n : composeEventHandlers(props.onPointerCancel, whenTouchOrPen(clearLongPress))\n }\n onPointerUp={\n disabled\n ? props.onPointerUp\n : composeEventHandlers(props.onPointerUp, whenTouchOrPen(clearLongPress))\n }\n />\n </>\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuPortal\n * -----------------------------------------------------------------------------------------------*/\n\ntype MenuPortalProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;\ninterface ContextMenuPortalProps extends MenuPortalProps {}\n\nconst ContextMenuPortal: React.FC<ContextMenuPortalProps> = (\n props: ScopedProps<ContextMenuPortalProps>,\n) => {\n const { __scopeContextMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Portal {...menuScope} {...portalProps} />;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'ContextMenuContent';\n\ntype ContextMenuContentElement = React.ComponentRef<typeof MenuPrimitive.Content>;\ntype MenuContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;\ninterface ContextMenuContentProps extends Omit<\n MenuContentProps,\n 'onEntryFocus' | 'side' | 'sideOffset' | 'align'\n> {}\n\nconst ContextMenuContent = /* @__PURE__ */ React.forwardRef<\n ContextMenuContentElement,\n ContextMenuContentProps\n>(\n // blank line to reduce diff noise\n function ContextMenuContent(props: ScopedProps<ContextMenuContentProps>, forwardedRef) {\n const { __scopeContextMenu, ...contentProps } = props;\n const context = useContextMenuContext(CONTENT_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n\n return (\n <MenuPrimitive.Content\n {...menuScope}\n {...contentProps}\n ref={forwardedRef}\n side=\"right\"\n sideOffset={2}\n align=\"start\"\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented && hasInteractedOutsideRef.current) {\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented && !context.modal) hasInteractedOutsideRef.current = true;\n }}\n style={{\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-context-menu-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-context-menu-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-context-menu-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-context-menu-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-context-menu-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuGroup\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuGroupElement = React.ComponentRef<typeof MenuPrimitive.Group>;\ntype MenuGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;\ninterface ContextMenuGroupProps extends MenuGroupProps {}\n\nconst ContextMenuGroup = /* @__PURE__ */ React.forwardRef<\n ContextMenuGroupElement,\n ContextMenuGroupProps\n>(\n // blank line to reduce diff noise\n function ContextMenuGroup(props: ScopedProps<ContextMenuGroupProps>, forwardedRef) {\n const { __scopeContextMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Group {...menuScope} {...groupProps} ref={forwardedRef} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuLabel\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuLabelElement = React.ComponentRef<typeof MenuPrimitive.Label>;\ntype MenuLabelProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;\ninterface ContextMenuLabelProps extends MenuLabelProps {}\n\nconst ContextMenuLabel = /* @__PURE__ */ React.forwardRef<\n ContextMenuLabelElement,\n ContextMenuLabelProps\n>(\n // blank line to reduce diff noise\n function ContextMenuLabel(props: ScopedProps<ContextMenuLabelProps>, forwardedRef) {\n const { __scopeContextMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Label {...menuScope} {...labelProps} ref={forwardedRef} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuItem\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuItemElement = React.ComponentRef<typeof MenuPrimitive.Item>;\ntype MenuItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;\ninterface ContextMenuItemProps extends MenuItemProps {}\n\nconst ContextMenuItem = /* @__PURE__ */ React.forwardRef<\n ContextMenuItemElement,\n ContextMenuItemProps\n>(\n // blank line to reduce diff noise\n function ContextMenuItem(props: ScopedProps<ContextMenuItemProps>, forwardedRef) {\n const { __scopeContextMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Item {...menuScope} {...itemProps} ref={forwardedRef} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuCheckboxItemElement = React.ComponentRef<typeof MenuPrimitive.CheckboxItem>;\ntype MenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;\ninterface ContextMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst ContextMenuCheckboxItem = /* @__PURE__ */ React.forwardRef<\n ContextMenuCheckboxItemElement,\n ContextMenuCheckboxItemProps\n>(function ContextMenuCheckboxItem(props: ScopedProps<ContextMenuCheckboxItemProps>, forwardedRef) {\n const { __scopeContextMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.CheckboxItem {...menuScope} {...checkboxItemProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuRadioGroupElement = React.ComponentRef<typeof MenuPrimitive.RadioGroup>;\ntype MenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;\ninterface ContextMenuRadioGroupProps extends MenuRadioGroupProps {}\n\nconst ContextMenuRadioGroup = /* @__PURE__ */ React.forwardRef<\n ContextMenuRadioGroupElement,\n ContextMenuRadioGroupProps\n>(function ContextMenuRadioGroup(props: ScopedProps<ContextMenuRadioGroupProps>, forwardedRef) {\n const { __scopeContextMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.RadioGroup {...menuScope} {...radioGroupProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuRadioItemElement = React.ComponentRef<typeof MenuPrimitive.RadioItem>;\ntype MenuRadioItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;\ninterface ContextMenuRadioItemProps extends MenuRadioItemProps {}\n\nconst ContextMenuRadioItem = /* @__PURE__ */ React.forwardRef<\n ContextMenuRadioItemElement,\n ContextMenuRadioItemProps\n>(function ContextMenuRadioItem(props: ScopedProps<ContextMenuRadioItemProps>, forwardedRef) {\n const { __scopeContextMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.RadioItem {...menuScope} {...radioItemProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuItemIndicatorElement = React.ComponentRef<typeof MenuPrimitive.ItemIndicator>;\ntype MenuItemIndicatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;\ninterface ContextMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst ContextMenuItemIndicator = /* @__PURE__ */ React.forwardRef<\n ContextMenuItemIndicatorElement,\n ContextMenuItemIndicatorProps\n>(function ContextMenuItemIndicator(\n props: ScopedProps<ContextMenuItemIndicatorProps>,\n forwardedRef,\n) {\n const { __scopeContextMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.ItemIndicator {...menuScope} {...itemIndicatorProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSeparator\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuSeparatorElement = React.ComponentRef<typeof MenuPrimitive.Separator>;\ntype MenuSeparatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;\ninterface ContextMenuSeparatorProps extends MenuSeparatorProps {}\n\nconst ContextMenuSeparator = /* @__PURE__ */ React.forwardRef<\n ContextMenuSeparatorElement,\n ContextMenuSeparatorProps\n>(function ContextMenuSeparator(props: ScopedProps<ContextMenuSeparatorProps>, forwardedRef) {\n const { __scopeContextMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Separator {...menuScope} {...separatorProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuArrow\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuArrowElement = React.ComponentRef<typeof MenuPrimitive.Arrow>;\ntype MenuArrowProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;\ninterface ContextMenuArrowProps extends MenuArrowProps {}\n\nconst ContextMenuArrow = /* @__PURE__ */ React.forwardRef<\n ContextMenuArrowElement,\n ContextMenuArrowProps\n>(\n // blank line to reduce diff noise\n function ContextMenuArrow(props: ScopedProps<ContextMenuArrowProps>, forwardedRef) {\n const { __scopeContextMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Arrow {...menuScope} {...arrowProps} ref={forwardedRef} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSub\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_NAME = 'ContextMenuSub';\n\ninterface ContextMenuSubProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst ContextMenuSub: React.FC<ContextMenuSubProps> = (props: ScopedProps<ContextMenuSubProps>) => {\n const { __scopeContextMenu, children, onOpenChange, open: openProp, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: SUB_NAME,\n });\n\n return (\n <MenuPrimitive.Sub {...menuScope} open={open} onOpenChange={setOpen}>\n {children}\n </MenuPrimitive.Sub>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuSubTriggerElement = React.ComponentRef<typeof MenuPrimitive.SubTrigger>;\ntype MenuSubTriggerProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;\ninterface ContextMenuSubTriggerProps extends MenuSubTriggerProps {}\n\nconst ContextMenuSubTrigger = /* @__PURE__ */ React.forwardRef<\n ContextMenuSubTriggerElement,\n ContextMenuSubTriggerProps\n>(function ContextMenuSubTrigger(props: ScopedProps<ContextMenuSubTriggerProps>, forwardedRef) {\n const { __scopeContextMenu, ...triggerItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.SubTrigger {...menuScope} {...triggerItemProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSubContent\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuSubContentElement = React.ComponentRef<typeof MenuPrimitive.Content>;\ntype MenuSubContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;\ninterface ContextMenuSubContentProps extends MenuSubContentProps {}\n\nconst ContextMenuSubContent = /* @__PURE__ */ React.forwardRef<\n ContextMenuSubContentElement,\n ContextMenuSubContentProps\n>(function ContextMenuSubContent(props: ScopedProps<ContextMenuSubContentProps>, forwardedRef) {\n const { __scopeContextMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n\n return (\n <MenuPrimitive.SubContent\n {...menuScope}\n {...subContentProps}\n ref={forwardedRef}\n style={{\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-context-menu-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-context-menu-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-context-menu-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-context-menu-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-context-menu-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n );\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction whenTouchOrPen<E>(handler: React.PointerEventHandler<E>): React.PointerEventHandler<E> {\n return (event) => (event.pointerType !== 'mouse' ? handler(event) : undefined);\n}\n\nconst Root = ContextMenu;\nconst Trigger = ContextMenuTrigger;\nconst Portal = ContextMenuPortal;\nconst Content = ContextMenuContent;\nconst Group = ContextMenuGroup;\nconst Label = ContextMenuLabel;\nconst Item = ContextMenuItem;\nconst CheckboxItem = ContextMenuCheckboxItem;\nconst RadioGroup = ContextMenuRadioGroup;\nconst RadioItem = ContextMenuRadioItem;\nconst ItemIndicator = ContextMenuItemIndicator;\nconst Separator = ContextMenuSeparator;\nconst Arrow = ContextMenuArrow;\nconst Sub = ContextMenuSub;\nconst SubTrigger = ContextMenuSubTrigger;\nconst SubContent = ContextMenuSubContent;\n\nexport {\n createContextMenuScope,\n //\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuPortal,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuLabel,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuItemIndicator,\n ContextMenuSeparator,\n ContextMenuArrow,\n ContextMenuSub,\n ContextMenuSubTrigger,\n ContextMenuSubContent,\n //\n Root,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n};\nexport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n ContextMenuPortalProps,\n ContextMenuContentProps,\n ContextMenuGroupProps,\n ContextMenuLabelProps,\n ContextMenuItemProps,\n ContextMenuCheckboxItemProps,\n ContextMenuRadioGroupProps,\n ContextMenuRadioItemProps,\n ContextMenuItemIndicatorProps,\n ContextMenuSeparatorProps,\n ContextMenuArrowProps,\n ContextMenuSubProps,\n ContextMenuSubTriggerProps,\n ContextMenuSubContentProps,\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA,oBAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAAAC;AAAA,EAAA,YAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,aAAAC;AAAA,EAAA,cAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,iBAAAC;AAAA,EAA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;AAAA,EACF;AAEJ,GAtBE,wBAsBD;AAID,SAAS,eAAkB,SAAqE;AAC9F,SAAO,CAAC,UAAW,MAAM,gBAAgB,UAAU,QAAQ,KAAK,IAAI;AACtE;AAFS;AAIT,IAAMC,QAAO;AACb,IAAM,UAAU;AAChB,IAAMC,UAAS;AACf,IAAMC,WAAU;AAChB,IAAMC,SAAQ;AACd,IAAMC,SAAQ;AACd,IAAMC,QAAO;AACb,IAAMC,gBAAe;AACrB,IAAMC,cAAa;AACnB,IAAMC,aAAY;AAClB,IAAMC,iBAAgB;AACtB,IAAMC,aAAY;AAClB,IAAMC,SAAQ;AACd,IAAMC,OAAM;AACZ,IAAMC,cAAa;AACnB,IAAMC,cAAa;",
6
- "names": ["Arrow", "CheckboxItem", "Content", "Group", "Item", "ItemIndicator", "Label", "Portal", "RadioGroup", "RadioItem", "Root", "Separator", "Sub", "SubContent", "SubTrigger", "ContextMenuTrigger", "ContextMenuContent", "ContextMenuGroup", "ContextMenuLabel", "ContextMenuItem", "ContextMenuCheckboxItem", "ContextMenuRadioGroup", "ContextMenuRadioItem", "ContextMenuItemIndicator", "ContextMenuSeparator", "ContextMenuArrow", "ContextMenuSubTrigger", "ContextMenuSubContent", "Root", "Portal", "Content", "Group", "Label", "Item", "CheckboxItem", "RadioGroup", "RadioItem", "ItemIndicator", "Separator", "Arrow", "Sub", "SubTrigger", "SubContent"]
4
+ "sourcesContent": ["'use client';\nexport {\n createContextMenuScope,\n //\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuPortal,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuLabel,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuItemIndicator,\n ContextMenuSeparator,\n ContextMenuArrow,\n ContextMenuSub,\n ContextMenuSubTrigger,\n ContextMenuSubContent,\n //\n Root,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n} from './context-menu';\nexport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n ContextMenuPortalProps,\n ContextMenuContentProps,\n ContextMenuGroupProps,\n ContextMenuLabelProps,\n ContextMenuItemProps,\n ContextMenuCheckboxItemProps,\n ContextMenuRadioGroupProps,\n ContextMenuRadioItemProps,\n ContextMenuItemIndicatorProps,\n ContextMenuSeparatorProps,\n ContextMenuArrowProps,\n ContextMenuSubProps,\n ContextMenuSubTriggerProps,\n ContextMenuSubContentProps,\n} from './context-menu';\n", "import * as React from 'react';\nimport { IS_DEVELOPMENT } from '@radix-ui/primitive/is-development';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\ntype Point = { x: number; y: number };\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenu\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTEXT_MENU_NAME = 'ContextMenu';\n\ntype ScopedProps<P> = P & { __scopeContextMenu?: Scope };\nconst [createContextMenuContext, createContextMenuScope] = createContextScope(CONTEXT_MENU_NAME, [\n createMenuScope,\n]);\nconst useMenuScope = createMenuScope();\n\ninterface ContextMenuContextValue {\n open: boolean;\n onOpenChange(open: boolean): void;\n modal: boolean;\n hasInteractedRef: React.RefObject<boolean>;\n}\n\nconst [ContextMenuProvider, useContextMenuContext] =\n createContextMenuContext<ContextMenuContextValue>(CONTEXT_MENU_NAME);\n\ninterface ContextMenuProps {\n children?: React.ReactNode;\n open?: boolean;\n onOpenChange?(open: boolean): void;\n dir?: Direction;\n modal?: boolean;\n}\n\nconst ContextMenu: React.FC<ContextMenuProps> = (props: ScopedProps<ContextMenuProps>) => {\n const { __scopeContextMenu, children, onOpenChange, open: openProp, dir, modal = true } = props;\n\n // OK to disable conditionally calling hooks here because they will always run\n // consistently in the same environment. Bundlers should be able to remove the\n // code block entirely in production.\n /* eslint-disable react-hooks/rules-of-hooks */\n const hasInteractedRef = React.useRef(false);\n if (IS_DEVELOPMENT) {\n const hasWarnedRef = React.useRef(false);\n React.useEffect(() => {\n if (openProp === true && !hasInteractedRef.current && !hasWarnedRef.current) {\n hasWarnedRef.current = true;\n // dev warning: open prop is controllable but its position has not been set\n // because the user has not interacted with the trigger. The controllable\n // state is only enabled so that the user can read or programatically close\n // the menu. Programatically opening the menu will anchor it to the most\n // recently interacted position.\n console.warn(\n 'ContextMenu: The `open` prop has been set to `true` before the user has interacted with the trigger, so its position is indeterminate. This is likely unintended and will result in the menu being anchored to the top-left corner of the viewport.',\n );\n }\n }, [openProp]);\n }\n /* eslint-enable react-hooks/rules-of-hooks */\n\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: false,\n onChange: onOpenChange,\n caller: CONTEXT_MENU_NAME,\n });\n\n const menuScope = useMenuScope(__scopeContextMenu);\n\n return (\n <ContextMenuProvider\n scope={__scopeContextMenu}\n open={open}\n onOpenChange={setOpen}\n modal={modal}\n hasInteractedRef={hasInteractedRef}\n >\n <MenuPrimitive.Root {...menuScope} dir={dir} open={open} onOpenChange={setOpen} modal={modal}>\n {children}\n </MenuPrimitive.Root>\n </ContextMenuProvider>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'ContextMenuTrigger';\n\ntype ContextMenuTriggerElement = React.ComponentRef<typeof Primitive.span>;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;\ninterface ContextMenuTriggerProps extends PrimitiveSpanProps {\n disabled?: boolean;\n}\n\nconst ContextMenuTrigger = /* @__PURE__ */ React.forwardRef<\n ContextMenuTriggerElement,\n ContextMenuTriggerProps\n>(\n // blank line to reduce diff noise\n function ContextMenuTrigger(props: ScopedProps<ContextMenuTriggerProps>, forwardedRef) {\n const { __scopeContextMenu, disabled = false, ...triggerProps } = props;\n const context = useContextMenuContext(TRIGGER_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const [point, setPoint] = React.useState<Point>({ x: 0, y: 0 });\n\n // Re-create the virtual anchor whenever the pointer position changes so the\n // content re-anchors to the latest point when the menu is re-triggered while\n // already open (e.g. right-clicking in a new location, #2611).\n const virtualRef = React.useMemo(\n () => ({\n current: {\n getBoundingClientRect: () => DOMRect.fromRect({ width: 0, height: 0, ...point }),\n },\n }),\n [point],\n );\n const longPressTimerRef = React.useRef(0);\n const clearLongPress = React.useCallback(\n () => window.clearTimeout(longPressTimerRef.current),\n [],\n );\n const handleOpen = (event: React.MouseEvent | React.PointerEvent) => {\n context.hasInteractedRef.current = true;\n setPoint({ x: event.clientX, y: event.clientY });\n context.onOpenChange(true);\n };\n\n React.useEffect(() => clearLongPress, [clearLongPress]);\n React.useEffect(() => void (disabled && clearLongPress()), [disabled, clearLongPress]);\n\n return (\n <>\n <MenuPrimitive.Anchor {...menuScope} virtualRef={virtualRef} />\n <Primitive.span\n data-state={context.open ? 'open' : 'closed'}\n data-disabled={disabled ? '' : undefined}\n {...triggerProps}\n ref={forwardedRef}\n // prevent iOS context menu from appearing\n style={{ WebkitTouchCallout: 'none', ...props.style }}\n // if trigger is disabled, enable the native Context Menu\n onContextMenu={\n disabled\n ? props.onContextMenu\n : composeEventHandlers(props.onContextMenu, (event) => {\n // clearing the long press here because some platforms already support\n // long press to trigger a `contextmenu` event\n clearLongPress();\n handleOpen(event);\n event.preventDefault();\n })\n }\n onPointerDown={\n disabled\n ? props.onPointerDown\n : composeEventHandlers(\n props.onPointerDown,\n whenTouchOrPen((event) => {\n // clear the long press here in case there's multiple touch points\n clearLongPress();\n if (context.open) {\n context.onOpenChange(false);\n }\n longPressTimerRef.current = window.setTimeout(() => handleOpen(event), 700);\n }),\n )\n }\n onPointerMove={\n disabled\n ? props.onPointerMove\n : composeEventHandlers(props.onPointerMove, whenTouchOrPen(clearLongPress))\n }\n onPointerCancel={\n disabled\n ? props.onPointerCancel\n : composeEventHandlers(props.onPointerCancel, whenTouchOrPen(clearLongPress))\n }\n onPointerUp={\n disabled\n ? props.onPointerUp\n : composeEventHandlers(props.onPointerUp, whenTouchOrPen(clearLongPress))\n }\n />\n </>\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuPortal\n * -----------------------------------------------------------------------------------------------*/\n\ntype MenuPortalProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;\ninterface ContextMenuPortalProps extends MenuPortalProps {}\n\nconst ContextMenuPortal: React.FC<ContextMenuPortalProps> = (\n props: ScopedProps<ContextMenuPortalProps>,\n) => {\n const { __scopeContextMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Portal {...menuScope} {...portalProps} />;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'ContextMenuContent';\n\ntype ContextMenuContentElement = React.ComponentRef<typeof MenuPrimitive.Content>;\ntype MenuContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;\ninterface ContextMenuContentProps extends Omit<\n MenuContentProps,\n 'onEntryFocus' | 'side' | 'sideOffset' | 'align'\n> {}\n\nconst ContextMenuContent = /* @__PURE__ */ React.forwardRef<\n ContextMenuContentElement,\n ContextMenuContentProps\n>(\n // blank line to reduce diff noise\n function ContextMenuContent(props: ScopedProps<ContextMenuContentProps>, forwardedRef) {\n const { __scopeContextMenu, ...contentProps } = props;\n const context = useContextMenuContext(CONTENT_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n\n return (\n <MenuPrimitive.Content\n {...menuScope}\n {...contentProps}\n ref={forwardedRef}\n side=\"right\"\n sideOffset={2}\n align=\"start\"\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented && hasInteractedOutsideRef.current) {\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented && !context.modal) hasInteractedOutsideRef.current = true;\n }}\n style={{\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-context-menu-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-context-menu-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-context-menu-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-context-menu-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-context-menu-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuGroup\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuGroupElement = React.ComponentRef<typeof MenuPrimitive.Group>;\ntype MenuGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;\ninterface ContextMenuGroupProps extends MenuGroupProps {}\n\nconst ContextMenuGroup = /* @__PURE__ */ React.forwardRef<\n ContextMenuGroupElement,\n ContextMenuGroupProps\n>(\n // blank line to reduce diff noise\n function ContextMenuGroup(props: ScopedProps<ContextMenuGroupProps>, forwardedRef) {\n const { __scopeContextMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Group {...menuScope} {...groupProps} ref={forwardedRef} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuLabel\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuLabelElement = React.ComponentRef<typeof MenuPrimitive.Label>;\ntype MenuLabelProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;\ninterface ContextMenuLabelProps extends MenuLabelProps {}\n\nconst ContextMenuLabel = /* @__PURE__ */ React.forwardRef<\n ContextMenuLabelElement,\n ContextMenuLabelProps\n>(\n // blank line to reduce diff noise\n function ContextMenuLabel(props: ScopedProps<ContextMenuLabelProps>, forwardedRef) {\n const { __scopeContextMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Label {...menuScope} {...labelProps} ref={forwardedRef} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuItem\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuItemElement = React.ComponentRef<typeof MenuPrimitive.Item>;\ntype MenuItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;\ninterface ContextMenuItemProps extends MenuItemProps {}\n\nconst ContextMenuItem = /* @__PURE__ */ React.forwardRef<\n ContextMenuItemElement,\n ContextMenuItemProps\n>(\n // blank line to reduce diff noise\n function ContextMenuItem(props: ScopedProps<ContextMenuItemProps>, forwardedRef) {\n const { __scopeContextMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Item {...menuScope} {...itemProps} ref={forwardedRef} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuCheckboxItemElement = React.ComponentRef<typeof MenuPrimitive.CheckboxItem>;\ntype MenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;\ninterface ContextMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst ContextMenuCheckboxItem = /* @__PURE__ */ React.forwardRef<\n ContextMenuCheckboxItemElement,\n ContextMenuCheckboxItemProps\n>(function ContextMenuCheckboxItem(props: ScopedProps<ContextMenuCheckboxItemProps>, forwardedRef) {\n const { __scopeContextMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.CheckboxItem {...menuScope} {...checkboxItemProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuRadioGroupElement = React.ComponentRef<typeof MenuPrimitive.RadioGroup>;\ntype MenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;\ninterface ContextMenuRadioGroupProps extends MenuRadioGroupProps {}\n\nconst ContextMenuRadioGroup = /* @__PURE__ */ React.forwardRef<\n ContextMenuRadioGroupElement,\n ContextMenuRadioGroupProps\n>(function ContextMenuRadioGroup(props: ScopedProps<ContextMenuRadioGroupProps>, forwardedRef) {\n const { __scopeContextMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.RadioGroup {...menuScope} {...radioGroupProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuRadioItemElement = React.ComponentRef<typeof MenuPrimitive.RadioItem>;\ntype MenuRadioItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;\ninterface ContextMenuRadioItemProps extends MenuRadioItemProps {}\n\nconst ContextMenuRadioItem = /* @__PURE__ */ React.forwardRef<\n ContextMenuRadioItemElement,\n ContextMenuRadioItemProps\n>(function ContextMenuRadioItem(props: ScopedProps<ContextMenuRadioItemProps>, forwardedRef) {\n const { __scopeContextMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.RadioItem {...menuScope} {...radioItemProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuItemIndicatorElement = React.ComponentRef<typeof MenuPrimitive.ItemIndicator>;\ntype MenuItemIndicatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;\ninterface ContextMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst ContextMenuItemIndicator = /* @__PURE__ */ React.forwardRef<\n ContextMenuItemIndicatorElement,\n ContextMenuItemIndicatorProps\n>(function ContextMenuItemIndicator(\n props: ScopedProps<ContextMenuItemIndicatorProps>,\n forwardedRef,\n) {\n const { __scopeContextMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.ItemIndicator {...menuScope} {...itemIndicatorProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSeparator\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuSeparatorElement = React.ComponentRef<typeof MenuPrimitive.Separator>;\ntype MenuSeparatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;\ninterface ContextMenuSeparatorProps extends MenuSeparatorProps {}\n\nconst ContextMenuSeparator = /* @__PURE__ */ React.forwardRef<\n ContextMenuSeparatorElement,\n ContextMenuSeparatorProps\n>(function ContextMenuSeparator(props: ScopedProps<ContextMenuSeparatorProps>, forwardedRef) {\n const { __scopeContextMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Separator {...menuScope} {...separatorProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuArrow\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuArrowElement = React.ComponentRef<typeof MenuPrimitive.Arrow>;\ntype MenuArrowProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;\ninterface ContextMenuArrowProps extends MenuArrowProps {}\n\nconst ContextMenuArrow = /* @__PURE__ */ React.forwardRef<\n ContextMenuArrowElement,\n ContextMenuArrowProps\n>(\n // blank line to reduce diff noise\n function ContextMenuArrow(props: ScopedProps<ContextMenuArrowProps>, forwardedRef) {\n const { __scopeContextMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Arrow {...menuScope} {...arrowProps} ref={forwardedRef} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSub\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_NAME = 'ContextMenuSub';\n\ninterface ContextMenuSubProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst ContextMenuSub: React.FC<ContextMenuSubProps> = (props: ScopedProps<ContextMenuSubProps>) => {\n const { __scopeContextMenu, children, onOpenChange, open: openProp, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: SUB_NAME,\n });\n\n return (\n <MenuPrimitive.Sub {...menuScope} open={open} onOpenChange={setOpen}>\n {children}\n </MenuPrimitive.Sub>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuSubTriggerElement = React.ComponentRef<typeof MenuPrimitive.SubTrigger>;\ntype MenuSubTriggerProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;\ninterface ContextMenuSubTriggerProps extends MenuSubTriggerProps {}\n\nconst ContextMenuSubTrigger = /* @__PURE__ */ React.forwardRef<\n ContextMenuSubTriggerElement,\n ContextMenuSubTriggerProps\n>(function ContextMenuSubTrigger(props: ScopedProps<ContextMenuSubTriggerProps>, forwardedRef) {\n const { __scopeContextMenu, ...triggerItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.SubTrigger {...menuScope} {...triggerItemProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSubContent\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuSubContentElement = React.ComponentRef<typeof MenuPrimitive.Content>;\ntype MenuSubContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;\ninterface ContextMenuSubContentProps extends MenuSubContentProps {}\n\nconst ContextMenuSubContent = /* @__PURE__ */ React.forwardRef<\n ContextMenuSubContentElement,\n ContextMenuSubContentProps\n>(function ContextMenuSubContent(props: ScopedProps<ContextMenuSubContentProps>, forwardedRef) {\n const { __scopeContextMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n\n return (\n <MenuPrimitive.SubContent\n {...menuScope}\n {...subContentProps}\n ref={forwardedRef}\n style={{\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-context-menu-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-context-menu-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-context-menu-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-context-menu-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-context-menu-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n );\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction whenTouchOrPen<E>(handler: React.PointerEventHandler<E>): React.PointerEventHandler<E> {\n return (event) => (event.pointerType !== 'mouse' ? handler(event) : undefined);\n}\n\nexport {\n createContextMenuScope,\n //\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuPortal,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuLabel,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuItemIndicator,\n ContextMenuSeparator,\n ContextMenuArrow,\n ContextMenuSub,\n ContextMenuSubTrigger,\n ContextMenuSubContent,\n //\n ContextMenu as Root,\n ContextMenuTrigger as Trigger,\n ContextMenuPortal as Portal,\n ContextMenuContent as Content,\n ContextMenuGroup as Group,\n ContextMenuLabel as Label,\n ContextMenuItem as Item,\n ContextMenuCheckboxItem as CheckboxItem,\n ContextMenuRadioGroup as RadioGroup,\n ContextMenuRadioItem as RadioItem,\n ContextMenuItemIndicator as ItemIndicator,\n ContextMenuSeparator as Separator,\n ContextMenuArrow as Arrow,\n ContextMenuSub as Sub,\n ContextMenuSubTrigger as SubTrigger,\n ContextMenuSubContent as SubContent,\n};\nexport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n ContextMenuPortalProps,\n ContextMenuContentProps,\n ContextMenuGroupProps,\n ContextMenuLabelProps,\n ContextMenuItemProps,\n ContextMenuCheckboxItemProps,\n ContextMenuRadioGroupProps,\n ContextMenuRadioItemProps,\n ContextMenuItemIndicatorProps,\n ContextMenuSeparatorProps,\n ContextMenuArrowProps,\n ContextMenuSubProps,\n ContextMenuSubTriggerProps,\n ContextMenuSubContentProps,\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,4BAA+B;AAC/B,uBAAqC;AACrC,2BAAmC;AACnC,6BAA0B;AAC1B,oBAA+B;AAC/B,wBAAgC;AAChC,0CAAqC;AA+E/B;AArEN,IAAM,oBAAoB;AAG1B,IAAM,CAAC,0BAA0B,sBAAsB,QAAI,yCAAmB,mBAAmB;AAAA,EAC/F;AACF,CAAC;AACD,IAAM,mBAAe,mCAAgB;AASrC,IAAM,CAAC,qBAAqB,qBAAqB,IAC/C,yBAAkD,iBAAiB;AAUrE,IAAM,cAA0C,wBAAC,UAAyC;AACxF,QAAM,EAAE,oBAAoB,UAAU,cAAc,MAAM,UAAU,KAAK,QAAQ,KAAK,IAAI;AAM1F,QAAM,mBAAyB,aAAO,KAAK;AAC3C,MAAI,sCAAgB;AAClB,UAAM,eAAqB,aAAO,KAAK;AACvC,IAAM,gBAAU,MAAM;AACpB,UAAI,a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iB,IAAI;AACpD,QAAM,YAAY,aAAa,kBAAkB;AACjD,SAAO,4CAAe,0BAAd,EAA0B,GAAG,WAAY,GAAG,kBAAkB,KAAK,cAAc;AAC3F,GAJE,wBAID;AAUD,IAAM,wBAAwC,gBAAM,iBAGlD,gCAASC,uBAAsB,OAAgD,cAAc;AAC7F,QAAM,EAAE,oBAAoB,GAAG,gBAAgB,IAAI;AACnD,QAAM,YAAY,aAAa,kBAAkB;AAEjD,SACE;AAAA,IAAe;AAAA,IAAd;AAAA,MACE,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,KAAK;AAAA,MACL,OAAO;AAAA,QACL,GAAG,MAAM;AAAA;AAAA,QAET,GAAG;AAAA,UACD,iDAAiD;AAAA,UACjD,gDAAgD;AAAA,UAChD,iDAAiD;AAAA,UACjD,sCAAsC;AAAA,UACtC,uCAAuC;AAAA,QACzC;AAAA,MACF;AAAA;AAAA,EACF;AAEJ,GAtBE,wBAsBD;AAID,SAAS,eAAkB,SAAqE;AAC9F,SAAO,CAAC,UAAW,MAAM,gBAAgB,UAAU,QAAQ,KAAK,IAAI;AACtE;AAFS;",
6
+ "names": ["ContextMenuTrigger", "ContextMenuContent", "ContextMenuGroup", "ContextMenuLabel", "ContextMenuItem", "ContextMenuCheckboxItem", "ContextMenuRadioGroup", "ContextMenuRadioItem", "ContextMenuItemIndicator", "ContextMenuSeparator", "ContextMenuArrow", "ContextMenuSubTrigger", "ContextMenuSubContent"]
7
7
  }
package/dist/index.mjs CHANGED
@@ -261,26 +261,10 @@ function whenTouchOrPen(handler) {
261
261
  return (event) => event.pointerType !== "mouse" ? handler(event) : void 0;
262
262
  }
263
263
  __name(whenTouchOrPen, "whenTouchOrPen");
264
- var Root2 = ContextMenu;
265
- var Trigger = ContextMenuTrigger;
266
- var Portal2 = ContextMenuPortal;
267
- var Content2 = ContextMenuContent;
268
- var Group2 = ContextMenuGroup;
269
- var Label2 = ContextMenuLabel;
270
- var Item2 = ContextMenuItem;
271
- var CheckboxItem2 = ContextMenuCheckboxItem;
272
- var RadioGroup2 = ContextMenuRadioGroup;
273
- var RadioItem2 = ContextMenuRadioItem;
274
- var ItemIndicator2 = ContextMenuItemIndicator;
275
- var Separator2 = ContextMenuSeparator;
276
- var Arrow2 = ContextMenuArrow;
277
- var Sub2 = ContextMenuSub;
278
- var SubTrigger2 = ContextMenuSubTrigger;
279
- var SubContent2 = ContextMenuSubContent;
280
264
  export {
281
- Arrow2 as Arrow,
282
- CheckboxItem2 as CheckboxItem,
283
- Content2 as Content,
265
+ ContextMenuArrow as Arrow,
266
+ ContextMenuCheckboxItem as CheckboxItem,
267
+ ContextMenuContent as Content,
284
268
  ContextMenu,
285
269
  ContextMenuArrow,
286
270
  ContextMenuCheckboxItem,
@@ -297,19 +281,19 @@ export {
297
281
  ContextMenuSubContent,
298
282
  ContextMenuSubTrigger,
299
283
  ContextMenuTrigger,
300
- Group2 as Group,
301
- Item2 as Item,
302
- ItemIndicator2 as ItemIndicator,
303
- Label2 as Label,
304
- Portal2 as Portal,
305
- RadioGroup2 as RadioGroup,
306
- RadioItem2 as RadioItem,
307
- Root2 as Root,
308
- Separator2 as Separator,
309
- Sub2 as Sub,
310
- SubContent2 as SubContent,
311
- SubTrigger2 as SubTrigger,
312
- Trigger,
284
+ ContextMenuGroup as Group,
285
+ ContextMenuItem as Item,
286
+ ContextMenuItemIndicator as ItemIndicator,
287
+ ContextMenuLabel as Label,
288
+ ContextMenuPortal as Portal,
289
+ ContextMenuRadioGroup as RadioGroup,
290
+ ContextMenuRadioItem as RadioItem,
291
+ ContextMenu as Root,
292
+ ContextMenuSeparator as Separator,
293
+ ContextMenuSub as Sub,
294
+ ContextMenuSubContent as SubContent,
295
+ ContextMenuSubTrigger as SubTrigger,
296
+ ContextMenuTrigger as Trigger,
313
297
  createContextMenuScope
314
298
  };
315
299
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/context-menu.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { IS_DEVELOPMENT } from '@radix-ui/primitive/is-development';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\ntype Point = { x: number; y: number };\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenu\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTEXT_MENU_NAME = 'ContextMenu';\n\ntype ScopedProps<P> = P & { __scopeContextMenu?: Scope };\nconst [createContextMenuContext, createContextMenuScope] = createContextScope(CONTEXT_MENU_NAME, [\n createMenuScope,\n]);\nconst useMenuScope = createMenuScope();\n\ninterface ContextMenuContextValue {\n open: boolean;\n onOpenChange(open: boolean): void;\n modal: boolean;\n hasInteractedRef: React.RefObject<boolean>;\n}\n\nconst [ContextMenuProvider, useContextMenuContext] =\n createContextMenuContext<ContextMenuContextValue>(CONTEXT_MENU_NAME);\n\ninterface ContextMenuProps {\n children?: React.ReactNode;\n open?: boolean;\n onOpenChange?(open: boolean): void;\n dir?: Direction;\n modal?: boolean;\n}\n\nconst ContextMenu: React.FC<ContextMenuProps> = (props: ScopedProps<ContextMenuProps>) => {\n const { __scopeContextMenu, children, onOpenChange, open: openProp, dir, modal = true } = props;\n\n // OK to disable conditionally calling hooks here because they will always run\n // consistently in the same environment. Bundlers should be able to remove the\n // code block entirely in production.\n /* eslint-disable react-hooks/rules-of-hooks */\n const hasInteractedRef = React.useRef(false);\n if (IS_DEVELOPMENT) {\n const hasWarnedRef = React.useRef(false);\n React.useEffect(() => {\n if (openProp === true && !hasInteractedRef.current && !hasWarnedRef.current) {\n hasWarnedRef.current = true;\n // dev warning: open prop is controllable but its position has not been set\n // because the user has not interacted with the trigger. The controllable\n // state is only enabled so that the user can read or programatically close\n // the menu. Programatically opening the menu will anchor it to the most\n // recently interacted position.\n console.warn(\n 'ContextMenu: The `open` prop has been set to `true` before the user has interacted with the trigger, so its position is indeterminate. This is likely unintended and will result in the menu being anchored to the top-left corner of the viewport.',\n );\n }\n }, [openProp]);\n }\n /* eslint-enable react-hooks/rules-of-hooks */\n\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: false,\n onChange: onOpenChange,\n caller: CONTEXT_MENU_NAME,\n });\n\n const menuScope = useMenuScope(__scopeContextMenu);\n\n return (\n <ContextMenuProvider\n scope={__scopeContextMenu}\n open={open}\n onOpenChange={setOpen}\n modal={modal}\n hasInteractedRef={hasInteractedRef}\n >\n <MenuPrimitive.Root {...menuScope} dir={dir} open={open} onOpenChange={setOpen} modal={modal}>\n {children}\n </MenuPrimitive.Root>\n </ContextMenuProvider>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'ContextMenuTrigger';\n\ntype ContextMenuTriggerElement = React.ComponentRef<typeof Primitive.span>;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;\ninterface ContextMenuTriggerProps extends PrimitiveSpanProps {\n disabled?: boolean;\n}\n\nconst ContextMenuTrigger = /* @__PURE__ */ React.forwardRef<\n ContextMenuTriggerElement,\n ContextMenuTriggerProps\n>(\n // blank line to reduce diff noise\n function ContextMenuTrigger(props: ScopedProps<ContextMenuTriggerProps>, forwardedRef) {\n const { __scopeContextMenu, disabled = false, ...triggerProps } = props;\n const context = useContextMenuContext(TRIGGER_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const [point, setPoint] = React.useState<Point>({ x: 0, y: 0 });\n\n // Re-create the virtual anchor whenever the pointer position changes so the\n // content re-anchors to the latest point when the menu is re-triggered while\n // already open (e.g. right-clicking in a new location, #2611).\n const virtualRef = React.useMemo(\n () => ({\n current: {\n getBoundingClientRect: () => DOMRect.fromRect({ width: 0, height: 0, ...point }),\n },\n }),\n [point],\n );\n const longPressTimerRef = React.useRef(0);\n const clearLongPress = React.useCallback(\n () => window.clearTimeout(longPressTimerRef.current),\n [],\n );\n const handleOpen = (event: React.MouseEvent | React.PointerEvent) => {\n context.hasInteractedRef.current = true;\n setPoint({ x: event.clientX, y: event.clientY });\n context.onOpenChange(true);\n };\n\n React.useEffect(() => clearLongPress, [clearLongPress]);\n React.useEffect(() => void (disabled && clearLongPress()), [disabled, clearLongPress]);\n\n return (\n <>\n <MenuPrimitive.Anchor {...menuScope} virtualRef={virtualRef} />\n <Primitive.span\n data-state={context.open ? 'open' : 'closed'}\n data-disabled={disabled ? '' : undefined}\n {...triggerProps}\n ref={forwardedRef}\n // prevent iOS context menu from appearing\n style={{ WebkitTouchCallout: 'none', ...props.style }}\n // if trigger is disabled, enable the native Context Menu\n onContextMenu={\n disabled\n ? props.onContextMenu\n : composeEventHandlers(props.onContextMenu, (event) => {\n // clearing the long press here because some platforms already support\n // long press to trigger a `contextmenu` event\n clearLongPress();\n handleOpen(event);\n event.preventDefault();\n })\n }\n onPointerDown={\n disabled\n ? props.onPointerDown\n : composeEventHandlers(\n props.onPointerDown,\n whenTouchOrPen((event) => {\n // clear the long press here in case there's multiple touch points\n clearLongPress();\n if (context.open) {\n context.onOpenChange(false);\n }\n longPressTimerRef.current = window.setTimeout(() => handleOpen(event), 700);\n }),\n )\n }\n onPointerMove={\n disabled\n ? props.onPointerMove\n : composeEventHandlers(props.onPointerMove, whenTouchOrPen(clearLongPress))\n }\n onPointerCancel={\n disabled\n ? props.onPointerCancel\n : composeEventHandlers(props.onPointerCancel, whenTouchOrPen(clearLongPress))\n }\n onPointerUp={\n disabled\n ? props.onPointerUp\n : composeEventHandlers(props.onPointerUp, whenTouchOrPen(clearLongPress))\n }\n />\n </>\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuPortal\n * -----------------------------------------------------------------------------------------------*/\n\ntype MenuPortalProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;\ninterface ContextMenuPortalProps extends MenuPortalProps {}\n\nconst ContextMenuPortal: React.FC<ContextMenuPortalProps> = (\n props: ScopedProps<ContextMenuPortalProps>,\n) => {\n const { __scopeContextMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Portal {...menuScope} {...portalProps} />;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'ContextMenuContent';\n\ntype ContextMenuContentElement = React.ComponentRef<typeof MenuPrimitive.Content>;\ntype MenuContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;\ninterface ContextMenuContentProps extends Omit<\n MenuContentProps,\n 'onEntryFocus' | 'side' | 'sideOffset' | 'align'\n> {}\n\nconst ContextMenuContent = /* @__PURE__ */ React.forwardRef<\n ContextMenuContentElement,\n ContextMenuContentProps\n>(\n // blank line to reduce diff noise\n function ContextMenuContent(props: ScopedProps<ContextMenuContentProps>, forwardedRef) {\n const { __scopeContextMenu, ...contentProps } = props;\n const context = useContextMenuContext(CONTENT_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n\n return (\n <MenuPrimitive.Content\n {...menuScope}\n {...contentProps}\n ref={forwardedRef}\n side=\"right\"\n sideOffset={2}\n align=\"start\"\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented && hasInteractedOutsideRef.current) {\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented && !context.modal) hasInteractedOutsideRef.current = true;\n }}\n style={{\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-context-menu-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-context-menu-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-context-menu-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-context-menu-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-context-menu-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuGroup\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuGroupElement = React.ComponentRef<typeof MenuPrimitive.Group>;\ntype MenuGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;\ninterface ContextMenuGroupProps extends MenuGroupProps {}\n\nconst ContextMenuGroup = /* @__PURE__ */ React.forwardRef<\n ContextMenuGroupElement,\n ContextMenuGroupProps\n>(\n // blank line to reduce diff noise\n function ContextMenuGroup(props: ScopedProps<ContextMenuGroupProps>, forwardedRef) {\n const { __scopeContextMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Group {...menuScope} {...groupProps} ref={forwardedRef} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuLabel\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuLabelElement = React.ComponentRef<typeof MenuPrimitive.Label>;\ntype MenuLabelProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;\ninterface ContextMenuLabelProps extends MenuLabelProps {}\n\nconst ContextMenuLabel = /* @__PURE__ */ React.forwardRef<\n ContextMenuLabelElement,\n ContextMenuLabelProps\n>(\n // blank line to reduce diff noise\n function ContextMenuLabel(props: ScopedProps<ContextMenuLabelProps>, forwardedRef) {\n const { __scopeContextMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Label {...menuScope} {...labelProps} ref={forwardedRef} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuItem\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuItemElement = React.ComponentRef<typeof MenuPrimitive.Item>;\ntype MenuItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;\ninterface ContextMenuItemProps extends MenuItemProps {}\n\nconst ContextMenuItem = /* @__PURE__ */ React.forwardRef<\n ContextMenuItemElement,\n ContextMenuItemProps\n>(\n // blank line to reduce diff noise\n function ContextMenuItem(props: ScopedProps<ContextMenuItemProps>, forwardedRef) {\n const { __scopeContextMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Item {...menuScope} {...itemProps} ref={forwardedRef} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuCheckboxItemElement = React.ComponentRef<typeof MenuPrimitive.CheckboxItem>;\ntype MenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;\ninterface ContextMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst ContextMenuCheckboxItem = /* @__PURE__ */ React.forwardRef<\n ContextMenuCheckboxItemElement,\n ContextMenuCheckboxItemProps\n>(function ContextMenuCheckboxItem(props: ScopedProps<ContextMenuCheckboxItemProps>, forwardedRef) {\n const { __scopeContextMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.CheckboxItem {...menuScope} {...checkboxItemProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuRadioGroupElement = React.ComponentRef<typeof MenuPrimitive.RadioGroup>;\ntype MenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;\ninterface ContextMenuRadioGroupProps extends MenuRadioGroupProps {}\n\nconst ContextMenuRadioGroup = /* @__PURE__ */ React.forwardRef<\n ContextMenuRadioGroupElement,\n ContextMenuRadioGroupProps\n>(function ContextMenuRadioGroup(props: ScopedProps<ContextMenuRadioGroupProps>, forwardedRef) {\n const { __scopeContextMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.RadioGroup {...menuScope} {...radioGroupProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuRadioItemElement = React.ComponentRef<typeof MenuPrimitive.RadioItem>;\ntype MenuRadioItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;\ninterface ContextMenuRadioItemProps extends MenuRadioItemProps {}\n\nconst ContextMenuRadioItem = /* @__PURE__ */ React.forwardRef<\n ContextMenuRadioItemElement,\n ContextMenuRadioItemProps\n>(function ContextMenuRadioItem(props: ScopedProps<ContextMenuRadioItemProps>, forwardedRef) {\n const { __scopeContextMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.RadioItem {...menuScope} {...radioItemProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuItemIndicatorElement = React.ComponentRef<typeof MenuPrimitive.ItemIndicator>;\ntype MenuItemIndicatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;\ninterface ContextMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst ContextMenuItemIndicator = /* @__PURE__ */ React.forwardRef<\n ContextMenuItemIndicatorElement,\n ContextMenuItemIndicatorProps\n>(function ContextMenuItemIndicator(\n props: ScopedProps<ContextMenuItemIndicatorProps>,\n forwardedRef,\n) {\n const { __scopeContextMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.ItemIndicator {...menuScope} {...itemIndicatorProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSeparator\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuSeparatorElement = React.ComponentRef<typeof MenuPrimitive.Separator>;\ntype MenuSeparatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;\ninterface ContextMenuSeparatorProps extends MenuSeparatorProps {}\n\nconst ContextMenuSeparator = /* @__PURE__ */ React.forwardRef<\n ContextMenuSeparatorElement,\n ContextMenuSeparatorProps\n>(function ContextMenuSeparator(props: ScopedProps<ContextMenuSeparatorProps>, forwardedRef) {\n const { __scopeContextMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Separator {...menuScope} {...separatorProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuArrow\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuArrowElement = React.ComponentRef<typeof MenuPrimitive.Arrow>;\ntype MenuArrowProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;\ninterface ContextMenuArrowProps extends MenuArrowProps {}\n\nconst ContextMenuArrow = /* @__PURE__ */ React.forwardRef<\n ContextMenuArrowElement,\n ContextMenuArrowProps\n>(\n // blank line to reduce diff noise\n function ContextMenuArrow(props: ScopedProps<ContextMenuArrowProps>, forwardedRef) {\n const { __scopeContextMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Arrow {...menuScope} {...arrowProps} ref={forwardedRef} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSub\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_NAME = 'ContextMenuSub';\n\ninterface ContextMenuSubProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst ContextMenuSub: React.FC<ContextMenuSubProps> = (props: ScopedProps<ContextMenuSubProps>) => {\n const { __scopeContextMenu, children, onOpenChange, open: openProp, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: SUB_NAME,\n });\n\n return (\n <MenuPrimitive.Sub {...menuScope} open={open} onOpenChange={setOpen}>\n {children}\n </MenuPrimitive.Sub>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuSubTriggerElement = React.ComponentRef<typeof MenuPrimitive.SubTrigger>;\ntype MenuSubTriggerProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;\ninterface ContextMenuSubTriggerProps extends MenuSubTriggerProps {}\n\nconst ContextMenuSubTrigger = /* @__PURE__ */ React.forwardRef<\n ContextMenuSubTriggerElement,\n ContextMenuSubTriggerProps\n>(function ContextMenuSubTrigger(props: ScopedProps<ContextMenuSubTriggerProps>, forwardedRef) {\n const { __scopeContextMenu, ...triggerItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.SubTrigger {...menuScope} {...triggerItemProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSubContent\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuSubContentElement = React.ComponentRef<typeof MenuPrimitive.Content>;\ntype MenuSubContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;\ninterface ContextMenuSubContentProps extends MenuSubContentProps {}\n\nconst ContextMenuSubContent = /* @__PURE__ */ React.forwardRef<\n ContextMenuSubContentElement,\n ContextMenuSubContentProps\n>(function ContextMenuSubContent(props: ScopedProps<ContextMenuSubContentProps>, forwardedRef) {\n const { __scopeContextMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n\n return (\n <MenuPrimitive.SubContent\n {...menuScope}\n {...subContentProps}\n ref={forwardedRef}\n style={{\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-context-menu-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-context-menu-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-context-menu-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-context-menu-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-context-menu-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n );\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction whenTouchOrPen<E>(handler: React.PointerEventHandler<E>): React.PointerEventHandler<E> {\n return (event) => (event.pointerType !== 'mouse' ? handler(event) : undefined);\n}\n\nconst Root = ContextMenu;\nconst Trigger = ContextMenuTrigger;\nconst Portal = ContextMenuPortal;\nconst Content = ContextMenuContent;\nconst Group = ContextMenuGroup;\nconst Label = ContextMenuLabel;\nconst Item = ContextMenuItem;\nconst CheckboxItem = ContextMenuCheckboxItem;\nconst RadioGroup = ContextMenuRadioGroup;\nconst RadioItem = ContextMenuRadioItem;\nconst ItemIndicator = ContextMenuItemIndicator;\nconst Separator = ContextMenuSeparator;\nconst Arrow = ContextMenuArrow;\nconst Sub = ContextMenuSub;\nconst SubTrigger = ContextMenuSubTrigger;\nconst SubContent = ContextMenuSubContent;\n\nexport {\n createContextMenuScope,\n //\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuPortal,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuLabel,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuItemIndicator,\n ContextMenuSeparator,\n ContextMenuArrow,\n ContextMenuSub,\n ContextMenuSubTrigger,\n ContextMenuSubContent,\n //\n Root,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n};\nexport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n ContextMenuPortalProps,\n ContextMenuContentProps,\n ContextMenuGroupProps,\n ContextMenuLabelProps,\n ContextMenuItemProps,\n ContextMenuCheckboxItemProps,\n ContextMenuRadioGroupProps,\n ContextMenuRadioItemProps,\n ContextMenuItemIndicatorProps,\n ContextMenuSeparatorProps,\n ContextMenuArrowProps,\n ContextMenuSubProps,\n ContextMenuSubTriggerProps,\n ContextMenuSubContentProps,\n};\n"],
5
- "mappings": ";;;;;AAAA,YAAY,WAAW;AACvB,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAS,0BAA0B;AACnC,SAAS,iBAAiB;AAC1B,YAAY,mBAAmB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,4BAA4B;AA+E/B,SAwDA,UAxDA,KAwDA,YAxDA;AArEN,IAAM,oBAAoB;AAG1B,IAAM,CAAC,0BAA0B,sBAAsB,IAAI,mBAAmB,mBAAmB;AAAA,EAC/F;AACF,CAAC;AACD,IAAM,eAAe,gBAAgB;AASrC,IAAM,CAAC,qBAAqB,qBAAqB,IAC/C,yBAAkD,iBAAiB;AAUrE,IAAM,cAA0C,wBAAC,UAAyC;AACxF,QAAM,EAAE,oBAAoB,UAAU,cAAc,MAAM,UAAU,KAAK,QAAQ,KAAK,IAAI;AAM1F,QAAM,mBAAyB,aAAO,KAAK;AAC3C,MAAI,gBAAgB;AAClB,UAAM,eAAqB,aAAO,KAAK;AACvC,IAAM,gBAAU,MAAM;AACpB,UAAI,aAAa,QAAQ,CAAC,iBAAiB,WAAW,CAAC,aAAa,SAAS;AAC3E,qBAAa,UAAU;AAMvB,gBAAQ;AAAA,UACN;AAAA,QACF;AAAA,MACF;AAAA,IACF,GAAG,CAAC,QAAQ,CAAC;AAAA,EACf;AAGA,QAAM,CAAC,MAAM,OAAO,IAAI,qBAAqB;AAAA,IAC3C,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,IACV,QAAQ;AAAA,EACV,CAAC;AAED,QAAM,YAAY,aAAa,kBAAkB;AAEjD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAA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,OAAO;AAAA,QACL,GAAG,MAAM;AAAA;AAAA,QAET,GAAG;AAAA,UACD,iDAAiD;AAAA,UACjD,gDAAgD;AAAA,UAChD,iDAAiD;AAAA,UACjD,sCAAsC;AAAA,UACtC,uCAAuC;AAAA,QACzC;AAAA,MACF;AAAA;AAAA,EACF;AAEJ,GAtBE,wBAsBD;AAID,SAAS,eAAkB,SAAqE;AAC9F,SAAO,CAAC,UAAW,MAAM,gBAAgB,UAAU,QAAQ,KAAK,IAAI;AACtE;AAFS;AAIT,IAAMC,QAAO;AACb,IAAM,UAAU;AAChB,IAAMC,UAAS;AACf,IAAMC,WAAU;AAChB,IAAMC,SAAQ;AACd,IAAMC,SAAQ;AACd,IAAMC,QAAO;AACb,IAAMC,gBAAe;AACrB,IAAMC,cAAa;AACnB,IAAMC,aAAY;AAClB,IAAMC,iBAAgB;AACtB,IAAMC,aAAY;AAClB,IAAMC,SAAQ;AACd,IAAMC,OAAM;AACZ,IAAMC,cAAa;AACnB,IAAMC,cAAa;",
6
- "names": ["ContextMenuTrigger", "ContextMenuContent", "ContextMenuGroup", "ContextMenuLabel", "ContextMenuItem", "ContextMenuCheckboxItem", "ContextMenuRadioGroup", "ContextMenuRadioItem", "ContextMenuItemIndicator", "ContextMenuSeparator", "ContextMenuArrow", "ContextMenuSubTrigger", "ContextMenuSubContent", "Root", "Portal", "Content", "Group", "Label", "Item", "CheckboxItem", "RadioGroup", "RadioItem", "ItemIndicator", "Separator", "Arrow", "Sub", "SubTrigger", "SubContent"]
4
+ "sourcesContent": ["import * as React from 'react';\nimport { IS_DEVELOPMENT } from '@radix-ui/primitive/is-development';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\ntype Point = { x: number; y: number };\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenu\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTEXT_MENU_NAME = 'ContextMenu';\n\ntype ScopedProps<P> = P & { __scopeContextMenu?: Scope };\nconst [createContextMenuContext, createContextMenuScope] = createContextScope(CONTEXT_MENU_NAME, [\n createMenuScope,\n]);\nconst useMenuScope = createMenuScope();\n\ninterface ContextMenuContextValue {\n open: boolean;\n onOpenChange(open: boolean): void;\n modal: boolean;\n hasInteractedRef: React.RefObject<boolean>;\n}\n\nconst [ContextMenuProvider, useContextMenuContext] =\n createContextMenuContext<ContextMenuContextValue>(CONTEXT_MENU_NAME);\n\ninterface ContextMenuProps {\n children?: React.ReactNode;\n open?: boolean;\n onOpenChange?(open: boolean): void;\n dir?: Direction;\n modal?: boolean;\n}\n\nconst ContextMenu: React.FC<ContextMenuProps> = (props: ScopedProps<ContextMenuProps>) => {\n const { __scopeContextMenu, children, onOpenChange, open: openProp, dir, modal = true } = props;\n\n // OK to disable conditionally calling hooks here because they will always run\n // consistently in the same environment. Bundlers should be able to remove the\n // code block entirely in production.\n /* eslint-disable react-hooks/rules-of-hooks */\n const hasInteractedRef = React.useRef(false);\n if (IS_DEVELOPMENT) {\n const hasWarnedRef = React.useRef(false);\n React.useEffect(() => {\n if (openProp === true && !hasInteractedRef.current && !hasWarnedRef.current) {\n hasWarnedRef.current = true;\n // dev warning: open prop is controllable but its position has not been set\n // because the user has not interacted with the trigger. The controllable\n // state is only enabled so that the user can read or programatically close\n // the menu. Programatically opening the menu will anchor it to the most\n // recently interacted position.\n console.warn(\n 'ContextMenu: The `open` prop has been set to `true` before the user has interacted with the trigger, so its position is indeterminate. This is likely unintended and will result in the menu being anchored to the top-left corner of the viewport.',\n );\n }\n }, [openProp]);\n }\n /* eslint-enable react-hooks/rules-of-hooks */\n\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: false,\n onChange: onOpenChange,\n caller: CONTEXT_MENU_NAME,\n });\n\n const menuScope = useMenuScope(__scopeContextMenu);\n\n return (\n <ContextMenuProvider\n scope={__scopeContextMenu}\n open={open}\n onOpenChange={setOpen}\n modal={modal}\n hasInteractedRef={hasInteractedRef}\n >\n <MenuPrimitive.Root {...menuScope} dir={dir} open={open} onOpenChange={setOpen} modal={modal}>\n {children}\n </MenuPrimitive.Root>\n </ContextMenuProvider>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'ContextMenuTrigger';\n\ntype ContextMenuTriggerElement = React.ComponentRef<typeof Primitive.span>;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;\ninterface ContextMenuTriggerProps extends PrimitiveSpanProps {\n disabled?: boolean;\n}\n\nconst ContextMenuTrigger = /* @__PURE__ */ React.forwardRef<\n ContextMenuTriggerElement,\n ContextMenuTriggerProps\n>(\n // blank line to reduce diff noise\n function ContextMenuTrigger(props: ScopedProps<ContextMenuTriggerProps>, forwardedRef) {\n const { __scopeContextMenu, disabled = false, ...triggerProps } = props;\n const context = useContextMenuContext(TRIGGER_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const [point, setPoint] = React.useState<Point>({ x: 0, y: 0 });\n\n // Re-create the virtual anchor whenever the pointer position changes so the\n // content re-anchors to the latest point when the menu is re-triggered while\n // already open (e.g. right-clicking in a new location, #2611).\n const virtualRef = React.useMemo(\n () => ({\n current: {\n getBoundingClientRect: () => DOMRect.fromRect({ width: 0, height: 0, ...point }),\n },\n }),\n [point],\n );\n const longPressTimerRef = React.useRef(0);\n const clearLongPress = React.useCallback(\n () => window.clearTimeout(longPressTimerRef.current),\n [],\n );\n const handleOpen = (event: React.MouseEvent | React.PointerEvent) => {\n context.hasInteractedRef.current = true;\n setPoint({ x: event.clientX, y: event.clientY });\n context.onOpenChange(true);\n };\n\n React.useEffect(() => clearLongPress, [clearLongPress]);\n React.useEffect(() => void (disabled && clearLongPress()), [disabled, clearLongPress]);\n\n return (\n <>\n <MenuPrimitive.Anchor {...menuScope} virtualRef={virtualRef} />\n <Primitive.span\n data-state={context.open ? 'open' : 'closed'}\n data-disabled={disabled ? '' : undefined}\n {...triggerProps}\n ref={forwardedRef}\n // prevent iOS context menu from appearing\n style={{ WebkitTouchCallout: 'none', ...props.style }}\n // if trigger is disabled, enable the native Context Menu\n onContextMenu={\n disabled\n ? props.onContextMenu\n : composeEventHandlers(props.onContextMenu, (event) => {\n // clearing the long press here because some platforms already support\n // long press to trigger a `contextmenu` event\n clearLongPress();\n handleOpen(event);\n event.preventDefault();\n })\n }\n onPointerDown={\n disabled\n ? props.onPointerDown\n : composeEventHandlers(\n props.onPointerDown,\n whenTouchOrPen((event) => {\n // clear the long press here in case there's multiple touch points\n clearLongPress();\n if (context.open) {\n context.onOpenChange(false);\n }\n longPressTimerRef.current = window.setTimeout(() => handleOpen(event), 700);\n }),\n )\n }\n onPointerMove={\n disabled\n ? props.onPointerMove\n : composeEventHandlers(props.onPointerMove, whenTouchOrPen(clearLongPress))\n }\n onPointerCancel={\n disabled\n ? props.onPointerCancel\n : composeEventHandlers(props.onPointerCancel, whenTouchOrPen(clearLongPress))\n }\n onPointerUp={\n disabled\n ? props.onPointerUp\n : composeEventHandlers(props.onPointerUp, whenTouchOrPen(clearLongPress))\n }\n />\n </>\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuPortal\n * -----------------------------------------------------------------------------------------------*/\n\ntype MenuPortalProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;\ninterface ContextMenuPortalProps extends MenuPortalProps {}\n\nconst ContextMenuPortal: React.FC<ContextMenuPortalProps> = (\n props: ScopedProps<ContextMenuPortalProps>,\n) => {\n const { __scopeContextMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Portal {...menuScope} {...portalProps} />;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'ContextMenuContent';\n\ntype ContextMenuContentElement = React.ComponentRef<typeof MenuPrimitive.Content>;\ntype MenuContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;\ninterface ContextMenuContentProps extends Omit<\n MenuContentProps,\n 'onEntryFocus' | 'side' | 'sideOffset' | 'align'\n> {}\n\nconst ContextMenuContent = /* @__PURE__ */ React.forwardRef<\n ContextMenuContentElement,\n ContextMenuContentProps\n>(\n // blank line to reduce diff noise\n function ContextMenuContent(props: ScopedProps<ContextMenuContentProps>, forwardedRef) {\n const { __scopeContextMenu, ...contentProps } = props;\n const context = useContextMenuContext(CONTENT_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n\n return (\n <MenuPrimitive.Content\n {...menuScope}\n {...contentProps}\n ref={forwardedRef}\n side=\"right\"\n sideOffset={2}\n align=\"start\"\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented && hasInteractedOutsideRef.current) {\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented && !context.modal) hasInteractedOutsideRef.current = true;\n }}\n style={{\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-context-menu-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-context-menu-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-context-menu-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-context-menu-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-context-menu-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuGroup\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuGroupElement = React.ComponentRef<typeof MenuPrimitive.Group>;\ntype MenuGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;\ninterface ContextMenuGroupProps extends MenuGroupProps {}\n\nconst ContextMenuGroup = /* @__PURE__ */ React.forwardRef<\n ContextMenuGroupElement,\n ContextMenuGroupProps\n>(\n // blank line to reduce diff noise\n function ContextMenuGroup(props: ScopedProps<ContextMenuGroupProps>, forwardedRef) {\n const { __scopeContextMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Group {...menuScope} {...groupProps} ref={forwardedRef} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuLabel\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuLabelElement = React.ComponentRef<typeof MenuPrimitive.Label>;\ntype MenuLabelProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;\ninterface ContextMenuLabelProps extends MenuLabelProps {}\n\nconst ContextMenuLabel = /* @__PURE__ */ React.forwardRef<\n ContextMenuLabelElement,\n ContextMenuLabelProps\n>(\n // blank line to reduce diff noise\n function ContextMenuLabel(props: ScopedProps<ContextMenuLabelProps>, forwardedRef) {\n const { __scopeContextMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Label {...menuScope} {...labelProps} ref={forwardedRef} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuItem\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuItemElement = React.ComponentRef<typeof MenuPrimitive.Item>;\ntype MenuItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;\ninterface ContextMenuItemProps extends MenuItemProps {}\n\nconst ContextMenuItem = /* @__PURE__ */ React.forwardRef<\n ContextMenuItemElement,\n ContextMenuItemProps\n>(\n // blank line to reduce diff noise\n function ContextMenuItem(props: ScopedProps<ContextMenuItemProps>, forwardedRef) {\n const { __scopeContextMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Item {...menuScope} {...itemProps} ref={forwardedRef} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuCheckboxItemElement = React.ComponentRef<typeof MenuPrimitive.CheckboxItem>;\ntype MenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;\ninterface ContextMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst ContextMenuCheckboxItem = /* @__PURE__ */ React.forwardRef<\n ContextMenuCheckboxItemElement,\n ContextMenuCheckboxItemProps\n>(function ContextMenuCheckboxItem(props: ScopedProps<ContextMenuCheckboxItemProps>, forwardedRef) {\n const { __scopeContextMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.CheckboxItem {...menuScope} {...checkboxItemProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuRadioGroupElement = React.ComponentRef<typeof MenuPrimitive.RadioGroup>;\ntype MenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;\ninterface ContextMenuRadioGroupProps extends MenuRadioGroupProps {}\n\nconst ContextMenuRadioGroup = /* @__PURE__ */ React.forwardRef<\n ContextMenuRadioGroupElement,\n ContextMenuRadioGroupProps\n>(function ContextMenuRadioGroup(props: ScopedProps<ContextMenuRadioGroupProps>, forwardedRef) {\n const { __scopeContextMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.RadioGroup {...menuScope} {...radioGroupProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuRadioItemElement = React.ComponentRef<typeof MenuPrimitive.RadioItem>;\ntype MenuRadioItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;\ninterface ContextMenuRadioItemProps extends MenuRadioItemProps {}\n\nconst ContextMenuRadioItem = /* @__PURE__ */ React.forwardRef<\n ContextMenuRadioItemElement,\n ContextMenuRadioItemProps\n>(function ContextMenuRadioItem(props: ScopedProps<ContextMenuRadioItemProps>, forwardedRef) {\n const { __scopeContextMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.RadioItem {...menuScope} {...radioItemProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuItemIndicatorElement = React.ComponentRef<typeof MenuPrimitive.ItemIndicator>;\ntype MenuItemIndicatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;\ninterface ContextMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst ContextMenuItemIndicator = /* @__PURE__ */ React.forwardRef<\n ContextMenuItemIndicatorElement,\n ContextMenuItemIndicatorProps\n>(function ContextMenuItemIndicator(\n props: ScopedProps<ContextMenuItemIndicatorProps>,\n forwardedRef,\n) {\n const { __scopeContextMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.ItemIndicator {...menuScope} {...itemIndicatorProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSeparator\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuSeparatorElement = React.ComponentRef<typeof MenuPrimitive.Separator>;\ntype MenuSeparatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;\ninterface ContextMenuSeparatorProps extends MenuSeparatorProps {}\n\nconst ContextMenuSeparator = /* @__PURE__ */ React.forwardRef<\n ContextMenuSeparatorElement,\n ContextMenuSeparatorProps\n>(function ContextMenuSeparator(props: ScopedProps<ContextMenuSeparatorProps>, forwardedRef) {\n const { __scopeContextMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Separator {...menuScope} {...separatorProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuArrow\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuArrowElement = React.ComponentRef<typeof MenuPrimitive.Arrow>;\ntype MenuArrowProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;\ninterface ContextMenuArrowProps extends MenuArrowProps {}\n\nconst ContextMenuArrow = /* @__PURE__ */ React.forwardRef<\n ContextMenuArrowElement,\n ContextMenuArrowProps\n>(\n // blank line to reduce diff noise\n function ContextMenuArrow(props: ScopedProps<ContextMenuArrowProps>, forwardedRef) {\n const { __scopeContextMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Arrow {...menuScope} {...arrowProps} ref={forwardedRef} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSub\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_NAME = 'ContextMenuSub';\n\ninterface ContextMenuSubProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst ContextMenuSub: React.FC<ContextMenuSubProps> = (props: ScopedProps<ContextMenuSubProps>) => {\n const { __scopeContextMenu, children, onOpenChange, open: openProp, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: SUB_NAME,\n });\n\n return (\n <MenuPrimitive.Sub {...menuScope} open={open} onOpenChange={setOpen}>\n {children}\n </MenuPrimitive.Sub>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuSubTriggerElement = React.ComponentRef<typeof MenuPrimitive.SubTrigger>;\ntype MenuSubTriggerProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;\ninterface ContextMenuSubTriggerProps extends MenuSubTriggerProps {}\n\nconst ContextMenuSubTrigger = /* @__PURE__ */ React.forwardRef<\n ContextMenuSubTriggerElement,\n ContextMenuSubTriggerProps\n>(function ContextMenuSubTrigger(props: ScopedProps<ContextMenuSubTriggerProps>, forwardedRef) {\n const { __scopeContextMenu, ...triggerItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.SubTrigger {...menuScope} {...triggerItemProps} ref={forwardedRef} />;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSubContent\n * -----------------------------------------------------------------------------------------------*/\n\ntype ContextMenuSubContentElement = React.ComponentRef<typeof MenuPrimitive.Content>;\ntype MenuSubContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;\ninterface ContextMenuSubContentProps extends MenuSubContentProps {}\n\nconst ContextMenuSubContent = /* @__PURE__ */ React.forwardRef<\n ContextMenuSubContentElement,\n ContextMenuSubContentProps\n>(function ContextMenuSubContent(props: ScopedProps<ContextMenuSubContentProps>, forwardedRef) {\n const { __scopeContextMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n\n return (\n <MenuPrimitive.SubContent\n {...menuScope}\n {...subContentProps}\n ref={forwardedRef}\n style={{\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-context-menu-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-context-menu-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-context-menu-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-context-menu-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-context-menu-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n );\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction whenTouchOrPen<E>(handler: React.PointerEventHandler<E>): React.PointerEventHandler<E> {\n return (event) => (event.pointerType !== 'mouse' ? handler(event) : undefined);\n}\n\nexport {\n createContextMenuScope,\n //\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuPortal,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuLabel,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuItemIndicator,\n ContextMenuSeparator,\n ContextMenuArrow,\n ContextMenuSub,\n ContextMenuSubTrigger,\n ContextMenuSubContent,\n //\n ContextMenu as Root,\n ContextMenuTrigger as Trigger,\n ContextMenuPortal as Portal,\n ContextMenuContent as Content,\n ContextMenuGroup as Group,\n ContextMenuLabel as Label,\n ContextMenuItem as Item,\n ContextMenuCheckboxItem as CheckboxItem,\n ContextMenuRadioGroup as RadioGroup,\n ContextMenuRadioItem as RadioItem,\n ContextMenuItemIndicator as ItemIndicator,\n ContextMenuSeparator as Separator,\n ContextMenuArrow as Arrow,\n ContextMenuSub as Sub,\n ContextMenuSubTrigger as SubTrigger,\n ContextMenuSubContent as SubContent,\n};\nexport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n ContextMenuPortalProps,\n ContextMenuContentProps,\n ContextMenuGroupProps,\n ContextMenuLabelProps,\n ContextMenuItemProps,\n ContextMenuCheckboxItemProps,\n ContextMenuRadioGroupProps,\n ContextMenuRadioItemProps,\n ContextMenuItemIndicatorProps,\n ContextMenuSeparatorProps,\n ContextMenuArrowProps,\n ContextMenuSubProps,\n ContextMenuSubTriggerProps,\n ContextMenuSubContentProps,\n};\n"],
5
+ "mappings": ";;;;;AAAA,YAAY,WAAW;AACvB,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAS,0BAA0B;AACnC,SAAS,iBAAiB;AAC1B,YAAY,mBAAmB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,4BAA4B;AA+E/B,SAwDA,UAxDA,KAwDA,YAxDA;AArEN,IAAM,oBAAoB;AAG1B,IA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,cAAc,MAAM,UAAU,YAAY,IAAI;AACpF,QAAM,YAAY,aAAa,kBAAkB;AACjD,QAAM,CAAC,MAAM,OAAO,IAAI,qBAAqB;AAAA,IAC3C,MAAM;AAAA,IACN,aAAa,eAAe;AAAA,IAC5B,UAAU;AAAA,IACV,QAAQ;AAAA,EACV,CAAC;AAED,SACE,oBAAe,mBAAd,EAAmB,GAAG,WAAW,MAAY,cAAc,SACzD,UACH;AAEJ,GAfsD;AAyBtD,IAAM,wBAAwC,gBAAM,iBAGlD,gCAASC,uBAAsB,OAAgD,cAAc;AAC7F,QAAM,EAAE,oBAAoB,GAAG,iBAAiB,IAAI;AACpD,QAAM,YAAY,aAAa,kBAAkB;AACjD,SAAO,oBAAe,0BAAd,EAA0B,GAAG,WAAY,GAAG,kBAAkB,KAAK,cAAc;AAC3F,GAJE,wBAID;AAUD,IAAM,wBAAwC,gBAAM,iBAGlD,gCAASC,uBAAsB,OAAgD,cAAc;AAC7F,QAAM,EAAE,oBAAoB,GAAG,gBAAgB,IAAI;AACnD,QAAM,YAAY,aAAa,kBAAkB;AAEjD,SACE;AAAA,IAAe;AAAA,IAAd;AAAA,MACE,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,KAAK;AAAA,MACL,OAAO;AAAA,QACL,GAAG,MAAM;AAAA;AAAA,QAET,GAAG;AAAA,UACD,iDAAiD;AAAA,UACjD,gDAAgD;AAAA,UAChD,iDAAiD;AAAA,UACjD,sCAAsC;AAAA,UACtC,uCAAuC;AAAA,QACzC;AAAA,MACF;AAAA;AAAA,EACF;AAEJ,GAtBE,wBAsBD;AAID,SAAS,eAAkB,SAAqE;AAC9F,SAAO,CAAC,UAAW,MAAM,gBAAgB,UAAU,QAAQ,KAAK,IAAI;AACtE;AAFS;",
6
+ "names": ["ContextMenuTrigger", "ContextMenuContent", "ContextMenuGroup", "ContextMenuLabel", "ContextMenuItem", "ContextMenuCheckboxItem", "ContextMenuRadioGroup", "ContextMenuRadioItem", "ContextMenuItemIndicator", "ContextMenuSeparator", "ContextMenuArrow", "ContextMenuSubTrigger", "ContextMenuSubContent"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ui/react-context-menu",
3
- "version": "2.3.4",
3
+ "version": "2.3.5",
4
4
  "license": "MIT",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./dist/index.js",
@@ -11,17 +11,17 @@
11
11
  ],
12
12
  "sideEffects": false,
13
13
  "dependencies": {
14
- "@radix-ui/primitive": "1.1.6",
15
- "@radix-ui/react-context": "1.2.0",
16
- "@radix-ui/react-menu": "2.1.21",
17
- "@radix-ui/react-primitive": "2.1.7",
18
- "@radix-ui/react-use-controllable-state": "1.2.4"
14
+ "@radix-ui/primitive": "1.1.7",
15
+ "@radix-ui/react-context": "1.2.1",
16
+ "@radix-ui/react-menu": "2.1.22",
17
+ "@radix-ui/react-primitive": "2.1.8",
18
+ "@radix-ui/react-use-controllable-state": "1.2.5"
19
19
  },
20
20
  "devDependencies": {
21
- "@types/react": "^19.2.2",
22
- "@types/react-dom": "^19.2.2",
23
- "react": "^19.2.0",
24
- "react-dom": "^19.2.0",
21
+ "@types/react": "^19.2.17",
22
+ "@types/react-dom": "^19.2.3",
23
+ "react": "^19.2.7",
24
+ "react-dom": "^19.2.7",
25
25
  "typescript": "^5.9.3",
26
26
  "@repo/builder": "0.0.0",
27
27
  "@repo/test-data": "0.0.0",