@prosekit/react 0.7.0-beta.3 → 0.7.0-beta.4
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/editor-context.js +0 -2
- package/dist/editor-context.js.map +1 -1
- package/dist/prosekit-react-autocomplete.d.ts +0 -11
- package/dist/prosekit-react-autocomplete.d.ts.map +1 -1
- package/dist/prosekit-react-autocomplete.js +26 -10
- package/dist/prosekit-react-autocomplete.js.map +1 -1
- package/dist/prosekit-react-block-handle.d.ts +0 -11
- package/dist/prosekit-react-block-handle.d.ts.map +1 -1
- package/dist/prosekit-react-block-handle.js +26 -10
- package/dist/prosekit-react-block-handle.js.map +1 -1
- package/dist/prosekit-react-drop-indicator.d.ts +0 -3
- package/dist/prosekit-react-drop-indicator.d.ts.map +1 -1
- package/dist/prosekit-react-drop-indicator.js +13 -2
- package/dist/prosekit-react-drop-indicator.js.map +1 -1
- package/dist/prosekit-react-inline-popover.d.ts +0 -7
- package/dist/prosekit-react-inline-popover.d.ts.map +1 -1
- package/dist/prosekit-react-inline-popover.js +21 -6
- package/dist/prosekit-react-inline-popover.js.map +1 -1
- package/dist/prosekit-react-menu.d.ts +0 -15
- package/dist/prosekit-react-menu.d.ts.map +1 -1
- package/dist/prosekit-react-menu.js +36 -14
- package/dist/prosekit-react-menu.js.map +1 -1
- package/dist/prosekit-react-popover.d.ts +0 -9
- package/dist/prosekit-react-popover.d.ts.map +1 -1
- package/dist/prosekit-react-popover.js +23 -8
- package/dist/prosekit-react-popover.js.map +1 -1
- package/dist/prosekit-react-resizable.d.ts +0 -5
- package/dist/prosekit-react-resizable.d.ts.map +1 -1
- package/dist/prosekit-react-resizable.js +19 -4
- package/dist/prosekit-react-resizable.js.map +1 -1
- package/dist/prosekit-react-table-handle.d.ts +0 -23
- package/dist/prosekit-react-table-handle.d.ts.map +1 -1
- package/dist/prosekit-react-table-handle.js +57 -22
- package/dist/prosekit-react-table-handle.js.map +1 -1
- package/dist/prosekit-react-tooltip.d.ts +0 -9
- package/dist/prosekit-react-tooltip.d.ts.map +1 -1
- package/dist/prosekit-react-tooltip.js +23 -8
- package/dist/prosekit-react-tooltip.js.map +1 -1
- package/dist/prosekit-react.d.ts +0 -21
- package/dist/prosekit-react.d.ts.map +1 -1
- package/dist/prosekit-react.js +1 -26
- package/dist/prosekit-react.js.map +1 -1
- package/package.json +3 -3
- package/src/components/autocomplete/index.ts +2 -0
- package/src/components/block-handle/index.ts +2 -0
- package/src/components/drop-indicator/index.ts +2 -0
- package/src/components/inline-popover/index.ts +2 -0
- package/src/components/menu/index.ts +2 -0
- package/src/components/popover/index.ts +2 -0
- package/src/components/resizable/index.ts +2 -0
- package/src/components/table-handle/index.ts +2 -0
- package/src/components/tooltip/index.ts +2 -0
- package/src/index.ts +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-react-popover.js","names":[],"sources":["../src/components/popover/popover-popup.gen.ts","../src/components/popover/popover-positioner.gen.ts","../src/components/popover/popover-root.gen.ts","../src/components/popover/popover-trigger.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerPopoverPopupElement, type PopoverPopupElement } from '@prosekit/web/popover';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes } from 'react';\n\n/**\n * Props for the {@link PopoverPopup} React component.\n *\n * @public\n */\nexport interface PopoverPopupProps {}\n\nfunction PopoverPopupComponent(props: PopoverPopupProps, forwardedRef: ForwardedRef<PopoverPopupElement>) {\n registerPopoverPopupElement();\n\n const elementRef = useRef<PopoverPopupElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: PopoverPopupElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-popover-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A React component that renders an `prosekit-popover-popup` custom element.\n *\n * @public\n */\nexport const PopoverPopup: ForwardRefExoticComponent<PopoverPopupProps & HTMLAttributes<PopoverPopupElement> & RefAttributes<PopoverPopupElement>> = /* @__PURE__ */ forwardRef(PopoverPopupComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerPopoverPositionerElement, type PopoverPositionerElement, type PopoverPositionerProps as PopoverPositionerElementProps } from '@prosekit/web/popover';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/**\n * Props for the {@link PopoverPositioner} React component.\n *\n * @public\n */\nexport interface PopoverPositionerProps {\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: PopoverPositionerElementProps['strategy'];\n /**\n * The initial placement of the floating element\n *\n * @default \"top\"\n */\n placement?: PopoverPositionerElementProps['placement'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: PopoverPositionerElementProps['autoUpdate'];\n /**\n * Whether to use the browser Popover API to place the floating element on\n * top of other page content.\n *\n * @default true\n */\n hoist?: PopoverPositionerElementProps['hoist'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: PopoverPositionerElementProps['offset'];\n /**\n * Whether to flip the `placement` in order to keep it in view when the\n * preferred placement(s) will overflow the clipping boundary. You can also\n * provide an array of placements to try sequentially if the preferred\n * `placement` does not fit.\n *\n * @default true\n */\n flip?: PopoverPositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: PopoverPositionerElementProps['shift'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: PopoverPositionerElementProps['overlap'];\n /**\n * Whether to constrain the floating element's width and height to not exceed\n * the viewport.\n *\n * @default false\n */\n fitViewport?: PopoverPositionerElementProps['fitViewport'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: PopoverPositionerElementProps['sameWidth'];\n /**\n * Whether to constrain the floating element's height so that it matches the\n * reference element.\n *\n * @default false\n */\n sameHeight?: PopoverPositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: PopoverPositionerElementProps['inline'];\n /**\n * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default false\n */\n hide?: PopoverPositionerElementProps['hide'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: PopoverPositionerElementProps['boundary'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: PopoverPositionerElementProps['rootBoundary'];\n /**\n * Describes the virtual padding around the boundary to check for overflow.\n * Please see https://floating-ui.com/docs/detectoverflow#padding for more information.\n *\n * @default 4\n */\n overflowPadding?: PopoverPositionerElementProps['overflowPadding'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: PopoverPositionerElementProps['elementContext'];\n /**\n * Whether to check the alternate elementContext's boundary. Please see\n * https://floating-ui.com/docs/detectoverflow#altboundary for more\n * information.\n *\n * @default false\n */\n altBoundary?: PopoverPositionerElementProps['altBoundary'];\n}\n\nfunction PopoverPositionerComponent(props: PopoverPositionerProps, forwardedRef: ForwardedRef<PopoverPositionerElement>) {\n registerPopoverPositionerElement();\n\n const elementRef = useRef<PopoverPositionerElement>(null);\n\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n const mergedRef = useCallback(\n (element: PopoverPositionerElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-popover-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A React component that renders an `prosekit-popover-positioner` custom element.\n *\n * @public\n */\nexport const PopoverPositioner: ForwardRefExoticComponent<PopoverPositionerProps & HTMLAttributes<PopoverPositionerElement> & RefAttributes<PopoverPositionerElement>> = /* @__PURE__ */ forwardRef(PopoverPositionerComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerPopoverRootElement, type PopoverRootElement, type PopoverRootProps as PopoverRootElementProps, type PopoverRootEvents } from '@prosekit/web/popover';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/**\n * Props for the {@link PopoverRoot} React component.\n *\n * @public\n */\nexport interface PopoverRootProps {\n /**\n * Whether the popover should be modal.\n * When true, the popover will trap focus and prevent interaction with the rest of the page.\n *\n * @default false\n */\n modal?: PopoverRootElementProps['modal'];\n /**\n * Whether the overlay is initially open.\n * @default false\n */\n defaultOpen?: PopoverRootElementProps['defaultOpen'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: PopoverRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: PopoverRootElementProps['disabled'];\n /** Emitted when the popover is opened or closed. */\n onOpenChange?: (event: PopoverRootEvents['openChange']) => void;\n}\n\nfunction PopoverRootComponent(props: PopoverRootProps, forwardedRef: ForwardedRef<PopoverRootElement>) {\n registerPopoverRootElement();\n\n const elementRef = useRef<PopoverRootElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const { defaultOpen: p0, disabled: p1, modal: p2, open: p3, onOpenChange: e0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { defaultOpen: p0, disabled: p1, modal: p2, open: p3 });\n handlersRef.current = [e0] as Array<((event: Event) => void) | undefined>;\n });\n\n useLayoutEffect(() => {\n const element = elementRef.current;\n if (!element) return;\n const ac = new AbortController();\n for (const [index, eventName] of ['openChange'].entries()) {\n element.addEventListener(\n eventName,\n (event: Event) => {\n handlersRef.current[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n }, []);\n\n const mergedRef = useCallback(\n (element: PopoverRootElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-popover-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A React component that renders an `prosekit-popover-root` custom element.\n *\n * @public\n */\nexport const PopoverRoot: ForwardRefExoticComponent<PopoverRootProps & HTMLAttributes<PopoverRootElement> & RefAttributes<PopoverRootElement>> = /* @__PURE__ */ forwardRef(PopoverRootComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerPopoverTriggerElement, type PopoverTriggerElement, type PopoverTriggerProps as PopoverTriggerElementProps, type PopoverTriggerEvents } from '@prosekit/web/popover';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/**\n * Props for the {@link PopoverTrigger} React component.\n *\n * @public\n */\nexport interface PopoverTriggerProps {\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: PopoverTriggerElementProps['disabled'];\n /**\n * Whether the popover should also open when the trigger is hovered.\n * @default false\n */\n openOnHover?: PopoverTriggerElementProps['openOnHover'];\n /**\n * The delay in milliseconds before opening the popover when hovering.\n * Only applies when `openOnHover` is true.\n * @default 300\n */\n delay?: PopoverTriggerElementProps['delay'];\n /**\n * The delay in milliseconds before closing the popover when hover ends.\n * Only applies when `openOnHover` is true.\n * @default 0\n */\n closeDelay?: PopoverTriggerElementProps['closeDelay'];\n /** Emitted when the popover is opened or closed. */\n onOpenChange?: (event: PopoverTriggerEvents['openChange']) => void;\n}\n\nfunction PopoverTriggerComponent(props: PopoverTriggerProps, forwardedRef: ForwardedRef<PopoverTriggerElement>) {\n registerPopoverTriggerElement();\n\n const elementRef = useRef<PopoverTriggerElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const { closeDelay: p0, delay: p1, disabled: p2, openOnHover: p3, onOpenChange: e0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { closeDelay: p0, delay: p1, disabled: p2, openOnHover: p3 });\n handlersRef.current = [e0] as Array<((event: Event) => void) | undefined>;\n });\n\n useLayoutEffect(() => {\n const element = elementRef.current;\n if (!element) return;\n const ac = new AbortController();\n for (const [index, eventName] of ['openChange'].entries()) {\n element.addEventListener(\n eventName,\n (event: Event) => {\n handlersRef.current[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n }, []);\n\n const mergedRef = useCallback(\n (element: PopoverTriggerElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-popover-trigger', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A React component that renders an `prosekit-popover-trigger` custom element.\n *\n * @public\n */\nexport const PopoverTrigger: ForwardRefExoticComponent<PopoverTriggerProps & HTMLAttributes<PopoverTriggerElement> & RefAttributes<PopoverTriggerElement>> = /* @__PURE__ */ forwardRef(PopoverTriggerComponent);\n"],"mappings":";;;;;;AAcA,SAAS,sBAAsB,OAA0B,cAAiD;AACxG,8BAA6B;CAE7B,MAAM,aAAa,OAA4B,KAAK;CAEpD,MAAM,EAAE,GAAG,cAAc;CAEzB,MAAM,YAAY,aACf,YAAwC;AACvC,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,0BAA0B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQlH,MAAa,eAAwJ,2BAAW,sBAAsB;;;;;;ACqGtM,SAAS,2BAA2B,OAA+B,cAAsD;AACvH,mCAAkC;CAElC,MAAM,aAAa,OAAiC,KAAK;CAEzD,MAAM,EAAE,aAAa,IAAI,YAAY,IAAI,UAAU,IAAI,gBAAgB,IAAI,aAAa,IAAI,MAAM,IAAI,MAAM,IAAI,OAAO,IAAI,QAAQ,IAAI,QAAQ,IAAI,iBAAiB,KAAK,SAAS,KAAK,WAAW,KAAK,cAAc,KAAK,YAAY,KAAK,WAAW,KAAK,OAAO,KAAK,UAAU,KAAK,GAAG,cAAc;AAEvS,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS;GAAE,aAAa;GAAI,YAAY;GAAI,UAAU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over-popup.gen.ts","../src/components/popover/popover-positioner.gen.ts","../src/components/popover/popover-root.gen.ts","../src/components/popover/popover-trigger.gen.ts","../src/components/popover/index.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerPopoverPopupElement, type PopoverPopupElement } from '@prosekit/web/popover';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes } from 'react';\n\n/**\n * Props for the {@link PopoverPopup} React component.\n *\n * @public\n */\nexport interface PopoverPopupProps {}\n\nfunction PopoverPopupComponent(props: PopoverPopupProps, forwardedRef: ForwardedRef<PopoverPopupElement>) {\n registerPopoverPopupElement();\n\n const elementRef = useRef<PopoverPopupElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: PopoverPopupElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-popover-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A React component that renders an `prosekit-popover-popup` custom element.\n *\n * @public\n */\nexport const PopoverPopup: ForwardRefExoticComponent<PopoverPopupProps & HTMLAttributes<PopoverPopupElement> & RefAttributes<PopoverPopupElement>> = /* @__PURE__ */ forwardRef(PopoverPopupComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerPopoverPositionerElement, type PopoverPositionerElement, type PopoverPositionerProps as PopoverPositionerElementProps } from '@prosekit/web/popover';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/**\n * Props for the {@link PopoverPositioner} React component.\n *\n * @public\n */\nexport interface PopoverPositionerProps {\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: PopoverPositionerElementProps['strategy'];\n /**\n * The initial placement of the floating element\n *\n * @default \"top\"\n */\n placement?: PopoverPositionerElementProps['placement'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: PopoverPositionerElementProps['autoUpdate'];\n /**\n * Whether to use the browser Popover API to place the floating element on\n * top of other page content.\n *\n * @default true\n */\n hoist?: PopoverPositionerElementProps['hoist'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: PopoverPositionerElementProps['offset'];\n /**\n * Whether to flip the `placement` in order to keep it in view when the\n * preferred placement(s) will overflow the clipping boundary. You can also\n * provide an array of placements to try sequentially if the preferred\n * `placement` does not fit.\n *\n * @default true\n */\n flip?: PopoverPositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: PopoverPositionerElementProps['shift'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: PopoverPositionerElementProps['overlap'];\n /**\n * Whether to constrain the floating element's width and height to not exceed\n * the viewport.\n *\n * @default false\n */\n fitViewport?: PopoverPositionerElementProps['fitViewport'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: PopoverPositionerElementProps['sameWidth'];\n /**\n * Whether to constrain the floating element's height so that it matches the\n * reference element.\n *\n * @default false\n */\n sameHeight?: PopoverPositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: PopoverPositionerElementProps['inline'];\n /**\n * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default false\n */\n hide?: PopoverPositionerElementProps['hide'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: PopoverPositionerElementProps['boundary'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: PopoverPositionerElementProps['rootBoundary'];\n /**\n * Describes the virtual padding around the boundary to check for overflow.\n * Please see https://floating-ui.com/docs/detectoverflow#padding for more information.\n *\n * @default 4\n */\n overflowPadding?: PopoverPositionerElementProps['overflowPadding'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: PopoverPositionerElementProps['elementContext'];\n /**\n * Whether to check the alternate elementContext's boundary. Please see\n * https://floating-ui.com/docs/detectoverflow#altboundary for more\n * information.\n *\n * @default false\n */\n altBoundary?: PopoverPositionerElementProps['altBoundary'];\n}\n\nfunction PopoverPositionerComponent(props: PopoverPositionerProps, forwardedRef: ForwardedRef<PopoverPositionerElement>) {\n registerPopoverPositionerElement();\n\n const elementRef = useRef<PopoverPositionerElement>(null);\n\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n const mergedRef = useCallback(\n (element: PopoverPositionerElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-popover-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A React component that renders an `prosekit-popover-positioner` custom element.\n *\n * @public\n */\nexport const PopoverPositioner: ForwardRefExoticComponent<PopoverPositionerProps & HTMLAttributes<PopoverPositionerElement> & RefAttributes<PopoverPositionerElement>> = /* @__PURE__ */ forwardRef(PopoverPositionerComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerPopoverRootElement, type PopoverRootElement, type PopoverRootProps as PopoverRootElementProps, type PopoverRootEvents } from '@prosekit/web/popover';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/**\n * Props for the {@link PopoverRoot} React component.\n *\n * @public\n */\nexport interface PopoverRootProps {\n /**\n * Whether the popover should be modal.\n * When true, the popover will trap focus and prevent interaction with the rest of the page.\n *\n * @default false\n */\n modal?: PopoverRootElementProps['modal'];\n /**\n * Whether the overlay is initially open.\n * @default false\n */\n defaultOpen?: PopoverRootElementProps['defaultOpen'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: PopoverRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: PopoverRootElementProps['disabled'];\n /** Emitted when the popover is opened or closed. */\n onOpenChange?: (event: PopoverRootEvents['openChange']) => void;\n}\n\nfunction PopoverRootComponent(props: PopoverRootProps, forwardedRef: ForwardedRef<PopoverRootElement>) {\n registerPopoverRootElement();\n\n const elementRef = useRef<PopoverRootElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const { defaultOpen: p0, disabled: p1, modal: p2, open: p3, onOpenChange: e0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { defaultOpen: p0, disabled: p1, modal: p2, open: p3 });\n handlersRef.current = [e0] as Array<((event: Event) => void) | undefined>;\n });\n\n useLayoutEffect(() => {\n const element = elementRef.current;\n if (!element) return;\n const ac = new AbortController();\n for (const [index, eventName] of ['openChange'].entries()) {\n element.addEventListener(\n eventName,\n (event: Event) => {\n handlersRef.current[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n }, []);\n\n const mergedRef = useCallback(\n (element: PopoverRootElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-popover-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A React component that renders an `prosekit-popover-root` custom element.\n *\n * @public\n */\nexport const PopoverRoot: ForwardRefExoticComponent<PopoverRootProps & HTMLAttributes<PopoverRootElement> & RefAttributes<PopoverRootElement>> = /* @__PURE__ */ forwardRef(PopoverRootComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerPopoverTriggerElement, type PopoverTriggerElement, type PopoverTriggerProps as PopoverTriggerElementProps, type PopoverTriggerEvents } from '@prosekit/web/popover';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/**\n * Props for the {@link PopoverTrigger} React component.\n *\n * @public\n */\nexport interface PopoverTriggerProps {\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: PopoverTriggerElementProps['disabled'];\n /**\n * Whether the popover should also open when the trigger is hovered.\n * @default false\n */\n openOnHover?: PopoverTriggerElementProps['openOnHover'];\n /**\n * The delay in milliseconds before opening the popover when hovering.\n * Only applies when `openOnHover` is true.\n * @default 300\n */\n delay?: PopoverTriggerElementProps['delay'];\n /**\n * The delay in milliseconds before closing the popover when hover ends.\n * Only applies when `openOnHover` is true.\n * @default 0\n */\n closeDelay?: PopoverTriggerElementProps['closeDelay'];\n /** Emitted when the popover is opened or closed. */\n onOpenChange?: (event: PopoverTriggerEvents['openChange']) => void;\n}\n\nfunction PopoverTriggerComponent(props: PopoverTriggerProps, forwardedRef: ForwardedRef<PopoverTriggerElement>) {\n registerPopoverTriggerElement();\n\n const elementRef = useRef<PopoverTriggerElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const { closeDelay: p0, delay: p1, disabled: p2, openOnHover: p3, onOpenChange: e0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { closeDelay: p0, delay: p1, disabled: p2, openOnHover: p3 });\n handlersRef.current = [e0] as Array<((event: Event) => void) | undefined>;\n });\n\n useLayoutEffect(() => {\n const element = elementRef.current;\n if (!element) return;\n const ac = new AbortController();\n for (const [index, eventName] of ['openChange'].entries()) {\n element.addEventListener(\n eventName,\n (event: Event) => {\n handlersRef.current[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n }, []);\n\n const mergedRef = useCallback(\n (element: PopoverTriggerElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-popover-trigger', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A React component that renders an `prosekit-popover-trigger` custom element.\n *\n * @public\n */\nexport const PopoverTrigger: ForwardRefExoticComponent<PopoverTriggerProps & HTMLAttributes<PopoverTriggerElement> & RefAttributes<PopoverTriggerElement>> = /* @__PURE__ */ forwardRef(PopoverTriggerComponent);\n","/**\n\n@module\n\n## Anatomy\n\n```jsx\nimport {\n PopoverPopup,\n PopoverPositioner,\n PopoverRoot,\n PopoverTrigger,\n} from 'prosekit/react/popover'\n\n<PopoverRoot>\n <PopoverTrigger>...</PopoverTrigger>\n <PopoverPositioner>\n <PopoverPopup>...</PopoverPopup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Ac,OAAoD,EAAE,CAAC;CAE3E,MAAM,EAAE,YAAY,IAAI,OAAO,IAAI,UAAU,IAAI,aAAa,IAAI,cAAc,IAAI,GAAG,cAAc;AAErG,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS;GAAE,YAAY;GAAI,OAAO;GAAI,UAAU;GAAI,aAAa;GAAI,CAAC;AACpF,cAAY,UAAU,CAAC,GAAG;GAC1B;AAEF,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EACd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,aAAa,CAAC,SAAS,CACvD,SAAQ,iBACN,YACC,UAAiB;AAChB,eAAY,QAAQ,SAAS,MAAM;KAErC,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;IACtB,EAAE,CAAC;CAEN,MAAM,YAAY,aACf,YAA0C;AACzC,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,4BAA4B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQpH,MAAa,iBAAgK,2BAAW,wBAAwB"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ForwardRefExoticComponent, HTMLAttributes, RefAttributes } from "react";
|
|
2
2
|
import { ResizableHandleElement, ResizableHandleProps as ResizableHandleProps$1, ResizableRootElement, ResizableRootEvents, ResizableRootProps as ResizableRootProps$1 } from "@prosekit/web/resizable";
|
|
3
|
-
|
|
4
|
-
//#region src/components/resizable/resizable-root.gen.d.ts
|
|
5
3
|
/**
|
|
6
4
|
* Props for the {@link ResizableRoot} React component.
|
|
7
5
|
*
|
|
@@ -37,8 +35,6 @@ interface ResizableRootProps {
|
|
|
37
35
|
* @public
|
|
38
36
|
*/
|
|
39
37
|
declare const ResizableRoot: ForwardRefExoticComponent<ResizableRootProps & HTMLAttributes<ResizableRootElement> & RefAttributes<ResizableRootElement>>;
|
|
40
|
-
//#endregion
|
|
41
|
-
//#region src/components/resizable/resizable-handle.gen.d.ts
|
|
42
38
|
/**
|
|
43
39
|
* Props for the {@link ResizableHandle} React component.
|
|
44
40
|
*
|
|
@@ -58,6 +54,5 @@ interface ResizableHandleProps {
|
|
|
58
54
|
* @public
|
|
59
55
|
*/
|
|
60
56
|
declare const ResizableHandle: ForwardRefExoticComponent<ResizableHandleProps & HTMLAttributes<ResizableHandleElement> & RefAttributes<ResizableHandleElement>>;
|
|
61
|
-
//#endregion
|
|
62
57
|
export { ResizableHandle, type ResizableHandleProps, ResizableRoot, type ResizableRootProps };
|
|
63
58
|
//# sourceMappingURL=prosekit-react-resizable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-react-resizable.d.ts","names":[],"sources":["../src/components/resizable/resizable-root.gen.ts","../src/components/resizable/resizable-handle.gen.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"prosekit-react-resizable.d.ts","names":[],"sources":["../src/components/resizable/resizable-root.gen.ts","../src/components/resizable/resizable-handle.gen.ts"],"mappings":";;;;;;;UAYiB,kBAAA;EAsB0B;;;;;EAhBzC,KAAA,GAAQ,oBAAA;EAYR;;;;;EANA,MAAA,GAAS,oBAAA;EAUa;;;;AAsDxB;EA1DE,WAAA,GAAc,oBAAA;;EAEd,aAAA,IAAiB,KAAA,EAAO,mBAAA;EAwDgE;EAtDxF,WAAA,IAAe,KAAA,EAAO,mBAAA;AAAA;;;;;;cAsDX,aAAA,EAAe,yBAAA,CAA0B,kBAAA,GAAqB,cAAA,CAAe,oBAAA,IAAwB,aAAA,CAAc,oBAAA;;;;;;UC5E/G,oBAAA;EDsB0B;;;;;EChBzC,QAAA,GAAW,sBAAA;AAAA;;;;;;cAoCA,eAAA,EAAiB,yBAAA,CAA0B,oBAAA,GAAuB,cAAA,CAAe,sBAAA,IAA0B,aAAA,CAAc,sBAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { createElement, forwardRef, useCallback, useLayoutEffect, useRef } from "react";
|
|
2
3
|
import { registerResizableHandleElement, registerResizableRootElement } from "@prosekit/web/resizable";
|
|
3
|
-
//#region src/components/resizable/resizable-root.gen.ts
|
|
4
4
|
/**
|
|
5
5
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
6
6
|
*/
|
|
@@ -45,8 +45,6 @@ function ResizableRootComponent(props, forwardedRef) {
|
|
|
45
45
|
* @public
|
|
46
46
|
*/
|
|
47
47
|
const ResizableRoot = /* @__PURE__ */ forwardRef(ResizableRootComponent);
|
|
48
|
-
//#endregion
|
|
49
|
-
//#region src/components/resizable/resizable-handle.gen.ts
|
|
50
48
|
/**
|
|
51
49
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
52
50
|
*/
|
|
@@ -76,7 +74,24 @@ function ResizableHandleComponent(props, forwardedRef) {
|
|
|
76
74
|
* @public
|
|
77
75
|
*/
|
|
78
76
|
const ResizableHandle = /* @__PURE__ */ forwardRef(ResizableHandleComponent);
|
|
79
|
-
|
|
77
|
+
/**
|
|
78
|
+
|
|
79
|
+
@module
|
|
80
|
+
|
|
81
|
+
## Anatomy
|
|
82
|
+
|
|
83
|
+
```jsx
|
|
84
|
+
import {
|
|
85
|
+
ResizableHandle,
|
|
86
|
+
ResizableRoot,
|
|
87
|
+
} from 'prosekit/react/resizable'
|
|
88
|
+
|
|
89
|
+
<ResizableRoot>
|
|
90
|
+
<img src="..." />
|
|
91
|
+
<ResizableHandle>...</ResizableHandle>
|
|
92
|
+
</ResizableRoot>
|
|
93
|
+
```
|
|
94
|
+
*/
|
|
80
95
|
export { ResizableHandle, ResizableRoot };
|
|
81
96
|
|
|
82
97
|
//# sourceMappingURL=prosekit-react-resizable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-react-resizable.js","names":[],"sources":["../src/components/resizable/resizable-root.gen.ts","../src/components/resizable/resizable-handle.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerResizableRootElement, type ResizableRootElement, type ResizableRootProps as ResizableRootElementProps, type ResizableRootEvents } from '@prosekit/web/resizable';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/**\n * Props for the {@link ResizableRoot} React component.\n *\n * @public\n */\nexport interface ResizableRootProps {\n /**\n * The width of the resizable element.\n *\n * @default null\n */\n width?: ResizableRootElementProps['width'];\n /**\n * The height of the resizable element.\n *\n * @default null\n */\n height?: ResizableRootElementProps['height'];\n /**\n * The aspect ratio of the resizable element.\n *\n * @default null\n */\n aspectRatio?: ResizableRootElementProps['aspectRatio'];\n /** Emitted when a resize operation starts. */\n onResizeStart?: (event: ResizableRootEvents['resizeStart']) => void;\n /** Emitted when a resize operation ends. */\n onResizeEnd?: (event: ResizableRootEvents['resizeEnd']) => void;\n}\n\nfunction ResizableRootComponent(props: ResizableRootProps, forwardedRef: ForwardedRef<ResizableRootElement>) {\n registerResizableRootElement();\n\n const elementRef = useRef<ResizableRootElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const { aspectRatio: p0, height: p1, width: p2, onResizeEnd: e0, onResizeStart: e1, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { aspectRatio: p0, height: p1, width: p2 });\n handlersRef.current = [e0, e1] as Array<((event: Event) => void) | undefined>;\n });\n\n useLayoutEffect(() => {\n const element = elementRef.current;\n if (!element) return;\n const ac = new AbortController();\n for (const [index, eventName] of ['resizeEnd', 'resizeStart'].entries()) {\n element.addEventListener(\n eventName,\n (event: Event) => {\n handlersRef.current[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n }, []);\n\n const mergedRef = useCallback(\n (element: ResizableRootElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-resizable-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A React component that renders an `prosekit-resizable-root` custom element.\n *\n * @public\n */\nexport const ResizableRoot: ForwardRefExoticComponent<ResizableRootProps & HTMLAttributes<ResizableRootElement> & RefAttributes<ResizableRootElement>> = /* @__PURE__ */ forwardRef(ResizableRootComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerResizableHandleElement, type ResizableHandleElement, type ResizableHandleProps as ResizableHandleElementProps } from '@prosekit/web/resizable';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/**\n * Props for the {@link ResizableHandle} React component.\n *\n * @public\n */\nexport interface ResizableHandleProps {\n /**\n * The position of the handle.\n *\n * @default \"bottom-right\"\n */\n position?: ResizableHandleElementProps['position'];\n}\n\nfunction ResizableHandleComponent(props: ResizableHandleProps, forwardedRef: ForwardedRef<ResizableHandleElement>) {\n registerResizableHandleElement();\n\n const elementRef = useRef<ResizableHandleElement>(null);\n\n const { position: p0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { position: p0 });\n });\n\n const mergedRef = useCallback(\n (element: ResizableHandleElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-resizable-handle', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A React component that renders an `prosekit-resizable-handle` custom element.\n *\n * @public\n */\nexport const ResizableHandle: ForwardRefExoticComponent<ResizableHandleProps & HTMLAttributes<ResizableHandleElement> & RefAttributes<ResizableHandleElement>> = /* @__PURE__ */ forwardRef(ResizableHandleComponent);\n"],"mappings":";;;;;;AAqCA,SAAS,uBAAuB,OAA2B,cAAkD;AAC3G,+BAA8B;CAE9B,MAAM,aAAa,OAA6B,KAAK;CACrD,MAAM,cAAc,OAAoD,EAAE,CAAC;CAE3E,MAAM,EAAE,aAAa,IAAI,QAAQ,IAAI,OAAO,IAAI,aAAa,IAAI,eAAe,IAAI,GAAG,cAAc;AAErG,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS;GAAE,aAAa;GAAI,QAAQ;GAAI,OAAO;GAAI,CAAC;AAClE,cAAY,UAAU,CAAC,IAAI,GAAG;GAC9B;AAEF,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EACd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,aAAa,cAAc,CAAC,SAAS,CACrE,SAAQ,iBACN,YACC,UAAiB;AAChB,eAAY,QAAQ,SAAS,MAAM;KAErC,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;IACtB,EAAE,CAAC;CAEN,MAAM,YAAY,aACf,YAAyC;AACxC,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,2BAA2B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQnH,MAAa,gBAA4J,2BAAW,uBAAuB
|
|
1
|
+
{"version":3,"file":"prosekit-react-resizable.js","names":[],"sources":["../src/components/resizable/resizable-root.gen.ts","../src/components/resizable/resizable-handle.gen.ts","../src/components/resizable/index.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerResizableRootElement, type ResizableRootElement, type ResizableRootProps as ResizableRootElementProps, type ResizableRootEvents } from '@prosekit/web/resizable';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/**\n * Props for the {@link ResizableRoot} React component.\n *\n * @public\n */\nexport interface ResizableRootProps {\n /**\n * The width of the resizable element.\n *\n * @default null\n */\n width?: ResizableRootElementProps['width'];\n /**\n * The height of the resizable element.\n *\n * @default null\n */\n height?: ResizableRootElementProps['height'];\n /**\n * The aspect ratio of the resizable element.\n *\n * @default null\n */\n aspectRatio?: ResizableRootElementProps['aspectRatio'];\n /** Emitted when a resize operation starts. */\n onResizeStart?: (event: ResizableRootEvents['resizeStart']) => void;\n /** Emitted when a resize operation ends. */\n onResizeEnd?: (event: ResizableRootEvents['resizeEnd']) => void;\n}\n\nfunction ResizableRootComponent(props: ResizableRootProps, forwardedRef: ForwardedRef<ResizableRootElement>) {\n registerResizableRootElement();\n\n const elementRef = useRef<ResizableRootElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const { aspectRatio: p0, height: p1, width: p2, onResizeEnd: e0, onResizeStart: e1, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { aspectRatio: p0, height: p1, width: p2 });\n handlersRef.current = [e0, e1] as Array<((event: Event) => void) | undefined>;\n });\n\n useLayoutEffect(() => {\n const element = elementRef.current;\n if (!element) return;\n const ac = new AbortController();\n for (const [index, eventName] of ['resizeEnd', 'resizeStart'].entries()) {\n element.addEventListener(\n eventName,\n (event: Event) => {\n handlersRef.current[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n }, []);\n\n const mergedRef = useCallback(\n (element: ResizableRootElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-resizable-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A React component that renders an `prosekit-resizable-root` custom element.\n *\n * @public\n */\nexport const ResizableRoot: ForwardRefExoticComponent<ResizableRootProps & HTMLAttributes<ResizableRootElement> & RefAttributes<ResizableRootElement>> = /* @__PURE__ */ forwardRef(ResizableRootComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerResizableHandleElement, type ResizableHandleElement, type ResizableHandleProps as ResizableHandleElementProps } from '@prosekit/web/resizable';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/**\n * Props for the {@link ResizableHandle} React component.\n *\n * @public\n */\nexport interface ResizableHandleProps {\n /**\n * The position of the handle.\n *\n * @default \"bottom-right\"\n */\n position?: ResizableHandleElementProps['position'];\n}\n\nfunction ResizableHandleComponent(props: ResizableHandleProps, forwardedRef: ForwardedRef<ResizableHandleElement>) {\n registerResizableHandleElement();\n\n const elementRef = useRef<ResizableHandleElement>(null);\n\n const { position: p0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { position: p0 });\n });\n\n const mergedRef = useCallback(\n (element: ResizableHandleElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-resizable-handle', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A React component that renders an `prosekit-resizable-handle` custom element.\n *\n * @public\n */\nexport const ResizableHandle: ForwardRefExoticComponent<ResizableHandleProps & HTMLAttributes<ResizableHandleElement> & RefAttributes<ResizableHandleElement>> = /* @__PURE__ */ forwardRef(ResizableHandleComponent);\n","/**\n\n@module\n\n## Anatomy\n\n```jsx\nimport {\n ResizableHandle,\n ResizableRoot,\n} from 'prosekit/react/resizable'\n\n<ResizableRoot>\n <img src=\"...\" />\n <ResizableHandle>...</ResizableHandle>\n</ResizableRoot>\n```\n*/\n\n'use client'\n\nexport * from './index.gen.ts'\n"],"mappings":";;;;;;AAqCA,SAAS,uBAAuB,OAA2B,cAAkD;AAC3G,+BAA8B;CAE9B,MAAM,aAAa,OAA6B,KAAK;CACrD,MAAM,cAAc,OAAoD,EAAE,CAAC;CAE3E,MAAM,EAAE,aAAa,IAAI,QAAQ,IAAI,OAAO,IAAI,aAAa,IAAI,eAAe,IAAI,GAAG,cAAc;AAErG,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS;GAAE,aAAa;GAAI,QAAQ;GAAI,OAAO;GAAI,CAAC;AAClE,cAAY,UAAU,CAAC,IAAI,GAAG;GAC9B;AAEF,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EACd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,aAAa,cAAc,CAAC,SAAS,CACrE,SAAQ,iBACN,YACC,UAAiB;AAChB,eAAY,QAAQ,SAAS,MAAM;KAErC,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;IACtB,EAAE,CAAC;CAEN,MAAM,YAAY,aACf,YAAyC;AACxC,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,2BAA2B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQnH,MAAa,gBAA4J,2BAAW,uBAAuB;;;;ACnE3M,SAAS,yBAAyB,OAA6B,cAAoD;AACjH,iCAAgC;CAEhC,MAAM,aAAa,OAA+B,KAAK;CAEvD,MAAM,EAAE,UAAU,IAAI,GAAG,cAAc;AAEvC,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS,EAAE,UAAU,IAAI,CAAC;GACxC;CAEF,MAAM,YAAY,aACf,YAA2C;AAC1C,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,6BAA6B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQrH,MAAa,kBAAoK,2BAAW,yBAAyB"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ForwardRefExoticComponent, HTMLAttributes, RefAttributes } from "react";
|
|
2
2
|
import { TableHandleColumnMenuRootElement, TableHandleColumnMenuRootProps as TableHandleColumnMenuRootProps$1, TableHandleColumnMenuTriggerElement, TableHandleColumnMenuTriggerProps as TableHandleColumnMenuTriggerProps$1, TableHandleColumnPopupElement, TableHandleColumnPositionerElement, TableHandleColumnPositionerProps as TableHandleColumnPositionerProps$1, TableHandleDragPreviewElement, TableHandleDragPreviewProps as TableHandleDragPreviewProps$1, TableHandleDropIndicatorElement, TableHandleDropIndicatorProps as TableHandleDropIndicatorProps$1, TableHandleRootElement, TableHandleRootProps as TableHandleRootProps$1, TableHandleRowMenuRootElement, TableHandleRowMenuRootProps as TableHandleRowMenuRootProps$1, TableHandleRowMenuTriggerElement, TableHandleRowMenuTriggerProps as TableHandleRowMenuTriggerProps$1, TableHandleRowPopupElement, TableHandleRowPositionerElement, TableHandleRowPositionerProps as TableHandleRowPositionerProps$1 } from "@prosekit/web/table-handle";
|
|
3
|
-
|
|
4
|
-
//#region src/components/table-handle/table-handle-column-popup.gen.d.ts
|
|
5
3
|
/**
|
|
6
4
|
* Props for the {@link TableHandleColumnPopup} React component.
|
|
7
5
|
*
|
|
@@ -14,8 +12,6 @@ interface TableHandleColumnPopupProps {}
|
|
|
14
12
|
* @public
|
|
15
13
|
*/
|
|
16
14
|
declare const TableHandleColumnPopup: ForwardRefExoticComponent<TableHandleColumnPopupProps & HTMLAttributes<TableHandleColumnPopupElement> & RefAttributes<TableHandleColumnPopupElement>>;
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region src/components/table-handle/table-handle-column-positioner.gen.d.ts
|
|
19
15
|
/**
|
|
20
16
|
* Props for the {@link TableHandleColumnPositioner} React component.
|
|
21
17
|
*
|
|
@@ -155,8 +151,6 @@ interface TableHandleColumnPositionerProps {
|
|
|
155
151
|
* @public
|
|
156
152
|
*/
|
|
157
153
|
declare const TableHandleColumnPositioner: ForwardRefExoticComponent<TableHandleColumnPositionerProps & HTMLAttributes<TableHandleColumnPositionerElement> & RefAttributes<TableHandleColumnPositionerElement>>;
|
|
158
|
-
//#endregion
|
|
159
|
-
//#region src/components/table-handle/table-handle-column-menu-root.gen.d.ts
|
|
160
154
|
/**
|
|
161
155
|
* Props for the {@link TableHandleColumnMenuRoot} React component.
|
|
162
156
|
*
|
|
@@ -185,8 +179,6 @@ interface TableHandleColumnMenuRootProps {
|
|
|
185
179
|
* @public
|
|
186
180
|
*/
|
|
187
181
|
declare const TableHandleColumnMenuRoot: ForwardRefExoticComponent<TableHandleColumnMenuRootProps & HTMLAttributes<TableHandleColumnMenuRootElement> & RefAttributes<TableHandleColumnMenuRootElement>>;
|
|
188
|
-
//#endregion
|
|
189
|
-
//#region src/components/table-handle/table-handle-column-menu-trigger.gen.d.ts
|
|
190
182
|
/**
|
|
191
183
|
* Props for the {@link TableHandleColumnMenuTrigger} React component.
|
|
192
184
|
*
|
|
@@ -205,8 +197,6 @@ interface TableHandleColumnMenuTriggerProps {
|
|
|
205
197
|
* @public
|
|
206
198
|
*/
|
|
207
199
|
declare const TableHandleColumnMenuTrigger: ForwardRefExoticComponent<TableHandleColumnMenuTriggerProps & HTMLAttributes<TableHandleColumnMenuTriggerElement> & RefAttributes<TableHandleColumnMenuTriggerElement>>;
|
|
208
|
-
//#endregion
|
|
209
|
-
//#region src/components/table-handle/table-handle-drag-preview.gen.d.ts
|
|
210
200
|
/**
|
|
211
201
|
* Props for the {@link TableHandleDragPreview} React component.
|
|
212
202
|
*
|
|
@@ -225,8 +215,6 @@ interface TableHandleDragPreviewProps {
|
|
|
225
215
|
* @public
|
|
226
216
|
*/
|
|
227
217
|
declare const TableHandleDragPreview: ForwardRefExoticComponent<TableHandleDragPreviewProps & HTMLAttributes<TableHandleDragPreviewElement> & RefAttributes<TableHandleDragPreviewElement>>;
|
|
228
|
-
//#endregion
|
|
229
|
-
//#region src/components/table-handle/table-handle-drop-indicator.gen.d.ts
|
|
230
218
|
/**
|
|
231
219
|
* Props for the {@link TableHandleDropIndicator} React component.
|
|
232
220
|
*
|
|
@@ -245,8 +233,6 @@ interface TableHandleDropIndicatorProps {
|
|
|
245
233
|
* @public
|
|
246
234
|
*/
|
|
247
235
|
declare const TableHandleDropIndicator: ForwardRefExoticComponent<TableHandleDropIndicatorProps & HTMLAttributes<TableHandleDropIndicatorElement> & RefAttributes<TableHandleDropIndicatorElement>>;
|
|
248
|
-
//#endregion
|
|
249
|
-
//#region src/components/table-handle/table-handle-root.gen.d.ts
|
|
250
236
|
/**
|
|
251
237
|
* Props for the {@link TableHandleRoot} React component.
|
|
252
238
|
*
|
|
@@ -267,8 +253,6 @@ interface TableHandleRootProps {
|
|
|
267
253
|
* @public
|
|
268
254
|
*/
|
|
269
255
|
declare const TableHandleRoot: ForwardRefExoticComponent<TableHandleRootProps & HTMLAttributes<TableHandleRootElement> & RefAttributes<TableHandleRootElement>>;
|
|
270
|
-
//#endregion
|
|
271
|
-
//#region src/components/table-handle/table-handle-row-popup.gen.d.ts
|
|
272
256
|
/**
|
|
273
257
|
* Props for the {@link TableHandleRowPopup} React component.
|
|
274
258
|
*
|
|
@@ -281,8 +265,6 @@ interface TableHandleRowPopupProps {}
|
|
|
281
265
|
* @public
|
|
282
266
|
*/
|
|
283
267
|
declare const TableHandleRowPopup: ForwardRefExoticComponent<TableHandleRowPopupProps & HTMLAttributes<TableHandleRowPopupElement> & RefAttributes<TableHandleRowPopupElement>>;
|
|
284
|
-
//#endregion
|
|
285
|
-
//#region src/components/table-handle/table-handle-row-positioner.gen.d.ts
|
|
286
268
|
/**
|
|
287
269
|
* Props for the {@link TableHandleRowPositioner} React component.
|
|
288
270
|
*
|
|
@@ -422,8 +404,6 @@ interface TableHandleRowPositionerProps {
|
|
|
422
404
|
* @public
|
|
423
405
|
*/
|
|
424
406
|
declare const TableHandleRowPositioner: ForwardRefExoticComponent<TableHandleRowPositionerProps & HTMLAttributes<TableHandleRowPositionerElement> & RefAttributes<TableHandleRowPositionerElement>>;
|
|
425
|
-
//#endregion
|
|
426
|
-
//#region src/components/table-handle/table-handle-row-menu-root.gen.d.ts
|
|
427
407
|
/**
|
|
428
408
|
* Props for the {@link TableHandleRowMenuRoot} React component.
|
|
429
409
|
*
|
|
@@ -452,8 +432,6 @@ interface TableHandleRowMenuRootProps {
|
|
|
452
432
|
* @public
|
|
453
433
|
*/
|
|
454
434
|
declare const TableHandleRowMenuRoot: ForwardRefExoticComponent<TableHandleRowMenuRootProps & HTMLAttributes<TableHandleRowMenuRootElement> & RefAttributes<TableHandleRowMenuRootElement>>;
|
|
455
|
-
//#endregion
|
|
456
|
-
//#region src/components/table-handle/table-handle-row-menu-trigger.gen.d.ts
|
|
457
435
|
/**
|
|
458
436
|
* Props for the {@link TableHandleRowMenuTrigger} React component.
|
|
459
437
|
*
|
|
@@ -472,6 +450,5 @@ interface TableHandleRowMenuTriggerProps {
|
|
|
472
450
|
* @public
|
|
473
451
|
*/
|
|
474
452
|
declare const TableHandleRowMenuTrigger: ForwardRefExoticComponent<TableHandleRowMenuTriggerProps & HTMLAttributes<TableHandleRowMenuTriggerElement> & RefAttributes<TableHandleRowMenuTriggerElement>>;
|
|
475
|
-
//#endregion
|
|
476
453
|
export { TableHandleColumnMenuRoot, type TableHandleColumnMenuRootProps, TableHandleColumnMenuTrigger, type TableHandleColumnMenuTriggerProps, TableHandleColumnPopup, type TableHandleColumnPopupProps, TableHandleColumnPositioner, type TableHandleColumnPositionerProps, TableHandleDragPreview, type TableHandleDragPreviewProps, TableHandleDropIndicator, type TableHandleDropIndicatorProps, TableHandleRoot, type TableHandleRootProps, TableHandleRowMenuRoot, type TableHandleRowMenuRootProps, TableHandleRowMenuTrigger, type TableHandleRowMenuTriggerProps, TableHandleRowPopup, type TableHandleRowPopupProps, TableHandleRowPositioner, type TableHandleRowPositionerProps };
|
|
477
454
|
//# sourceMappingURL=prosekit-react-table-handle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-react-table-handle.d.ts","names":[],"sources":["../src/components/table-handle/table-handle-column-popup.gen.ts","../src/components/table-handle/table-handle-column-positioner.gen.ts","../src/components/table-handle/table-handle-column-menu-root.gen.ts","../src/components/table-handle/table-handle-column-menu-trigger.gen.ts","../src/components/table-handle/table-handle-drag-preview.gen.ts","../src/components/table-handle/table-handle-drop-indicator.gen.ts","../src/components/table-handle/table-handle-root.gen.ts","../src/components/table-handle/table-handle-row-popup.gen.ts","../src/components/table-handle/table-handle-row-positioner.gen.ts","../src/components/table-handle/table-handle-row-menu-root.gen.ts","../src/components/table-handle/table-handle-row-menu-trigger.gen.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"prosekit-react-table-handle.d.ts","names":[],"sources":["../src/components/table-handle/table-handle-column-popup.gen.ts","../src/components/table-handle/table-handle-column-positioner.gen.ts","../src/components/table-handle/table-handle-column-menu-root.gen.ts","../src/components/table-handle/table-handle-column-menu-trigger.gen.ts","../src/components/table-handle/table-handle-drag-preview.gen.ts","../src/components/table-handle/table-handle-drop-indicator.gen.ts","../src/components/table-handle/table-handle-root.gen.ts","../src/components/table-handle/table-handle-row-popup.gen.ts","../src/components/table-handle/table-handle-row-positioner.gen.ts","../src/components/table-handle/table-handle-row-menu-root.gen.ts","../src/components/table-handle/table-handle-row-menu-trigger.gen.ts"],"mappings":";;;;;AAyCA;;UA7BiB,2BAAA;;;;;;cA6BJ,sBAAA,EAAwB,yBAAA,CAA0B,2BAAA,GAA8B,cAAA,CAAe,6BAAA,IAAiC,aAAA,CAAc,6BAAA;;;;AAA3J;;UC3BiB,gCAAA;ED2B8C;;;;;ECrB7D,SAAA,GAAY,kCAAA;EDqBgD;;;;;ECf5D,QAAA,GAAW,kCAAA;EDegI;;;;;AC3B7I;;EAoBE,UAAA,GAAa,kCAAA;EAdD;;;;;;EAqBZ,KAAA,GAAQ,kCAAA;EAsBE;;;;EAjBV,MAAA,GAAS,kCAAA;EAkDF;;;;EA7CP,IAAA,GAAO,kCAAA;EAkFO;;;;EA7Ed,KAAA,GAAQ,kCAAA;EApCI;;;;;;EA2CZ,OAAA,GAAU,kCAAA;EAjBV;;;;;;EAwBA,WAAA,GAAc,kCAAA;EAPJ;;;;;;EAcV,SAAA,GAAY,kCAAA;EAcZ;;;;;;EAPA,UAAA,GAAa,kCAAA;EA0BE;;;;;;EAnBf,MAAA,GAAS,kCAAA;EAiDT;;;;EA5CA,IAAA,GAAO,kCAAA;EAsGwQ;;;;;;EA/F/Q,QAAA,GAAW,kCAAA;EA+F6B;;;;;;EAxFxC,YAAA,GAAe,kCAAA;EAwF2I;;;;;AC1L5J;EDyGE,eAAA,GAAkB,kCAAA;;;;;;;;EAQlB,cAAA,GAAiB,kCAAA;ECvGjB;;;;;;AAyCF;EDsEE,WAAA,GAAc,kCAAA;;;;;;;EAOd,MAAA,GAAS,kCAAA;AAAA;;;;;;cA0DE,2BAAA,EAA6B,yBAAA,CAA0B,gCAAA,GAAmC,cAAA,CAAe,k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Ac,gCAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { n as useEditorContext } from "./editor-context.js";
|
|
2
3
|
import { createElement, forwardRef, useCallback, useLayoutEffect, useRef } from "react";
|
|
3
4
|
import { registerTableHandleColumnMenuRootElement, registerTableHandleColumnMenuTriggerElement, registerTableHandleColumnPopupElement, registerTableHandleColumnPositionerElement, registerTableHandleDragPreviewElement, registerTableHandleDropIndicatorElement, registerTableHandleRootElement, registerTableHandleRowMenuRootElement, registerTableHandleRowMenuTriggerElement, registerTableHandleRowPopupElement, registerTableHandleRowPositionerElement } from "@prosekit/web/table-handle";
|
|
4
|
-
//#region src/components/table-handle/table-handle-column-popup.gen.ts
|
|
5
5
|
/**
|
|
6
6
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
7
7
|
*/
|
|
@@ -26,8 +26,6 @@ function TableHandleColumnPopupComponent(props, forwardedRef) {
|
|
|
26
26
|
* @public
|
|
27
27
|
*/
|
|
28
28
|
const TableHandleColumnPopup = /* @__PURE__ */ forwardRef(TableHandleColumnPopupComponent);
|
|
29
|
-
//#endregion
|
|
30
|
-
//#region src/components/table-handle/table-handle-column-positioner.gen.ts
|
|
31
29
|
/**
|
|
32
30
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
33
31
|
*/
|
|
@@ -78,8 +76,6 @@ function TableHandleColumnPositionerComponent(props, forwardedRef) {
|
|
|
78
76
|
* @public
|
|
79
77
|
*/
|
|
80
78
|
const TableHandleColumnPositioner = /* @__PURE__ */ forwardRef(TableHandleColumnPositionerComponent);
|
|
81
|
-
//#endregion
|
|
82
|
-
//#region src/components/table-handle/table-handle-column-menu-root.gen.ts
|
|
83
79
|
/**
|
|
84
80
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
85
81
|
*/
|
|
@@ -113,8 +109,6 @@ function TableHandleColumnMenuRootComponent(props, forwardedRef) {
|
|
|
113
109
|
* @public
|
|
114
110
|
*/
|
|
115
111
|
const TableHandleColumnMenuRoot = /* @__PURE__ */ forwardRef(TableHandleColumnMenuRootComponent);
|
|
116
|
-
//#endregion
|
|
117
|
-
//#region src/components/table-handle/table-handle-column-menu-trigger.gen.ts
|
|
118
112
|
/**
|
|
119
113
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
120
114
|
*/
|
|
@@ -145,8 +139,6 @@ function TableHandleColumnMenuTriggerComponent(props, forwardedRef) {
|
|
|
145
139
|
* @public
|
|
146
140
|
*/
|
|
147
141
|
const TableHandleColumnMenuTrigger = /* @__PURE__ */ forwardRef(TableHandleColumnMenuTriggerComponent);
|
|
148
|
-
//#endregion
|
|
149
|
-
//#region src/components/table-handle/table-handle-drag-preview.gen.ts
|
|
150
142
|
/**
|
|
151
143
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
152
144
|
*/
|
|
@@ -177,8 +169,6 @@ function TableHandleDragPreviewComponent(props, forwardedRef) {
|
|
|
177
169
|
* @public
|
|
178
170
|
*/
|
|
179
171
|
const TableHandleDragPreview = /* @__PURE__ */ forwardRef(TableHandleDragPreviewComponent);
|
|
180
|
-
//#endregion
|
|
181
|
-
//#region src/components/table-handle/table-handle-drop-indicator.gen.ts
|
|
182
172
|
/**
|
|
183
173
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
184
174
|
*/
|
|
@@ -209,8 +199,6 @@ function TableHandleDropIndicatorComponent(props, forwardedRef) {
|
|
|
209
199
|
* @public
|
|
210
200
|
*/
|
|
211
201
|
const TableHandleDropIndicator = /* @__PURE__ */ forwardRef(TableHandleDropIndicatorComponent);
|
|
212
|
-
//#endregion
|
|
213
|
-
//#region src/components/table-handle/table-handle-root.gen.ts
|
|
214
202
|
/**
|
|
215
203
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
216
204
|
*/
|
|
@@ -241,8 +229,6 @@ function TableHandleRootComponent(props, forwardedRef) {
|
|
|
241
229
|
* @public
|
|
242
230
|
*/
|
|
243
231
|
const TableHandleRoot = /* @__PURE__ */ forwardRef(TableHandleRootComponent);
|
|
244
|
-
//#endregion
|
|
245
|
-
//#region src/components/table-handle/table-handle-row-popup.gen.ts
|
|
246
232
|
/**
|
|
247
233
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
248
234
|
*/
|
|
@@ -267,8 +253,6 @@ function TableHandleRowPopupComponent(props, forwardedRef) {
|
|
|
267
253
|
* @public
|
|
268
254
|
*/
|
|
269
255
|
const TableHandleRowPopup = /* @__PURE__ */ forwardRef(TableHandleRowPopupComponent);
|
|
270
|
-
//#endregion
|
|
271
|
-
//#region src/components/table-handle/table-handle-row-positioner.gen.ts
|
|
272
256
|
/**
|
|
273
257
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
274
258
|
*/
|
|
@@ -319,8 +303,6 @@ function TableHandleRowPositionerComponent(props, forwardedRef) {
|
|
|
319
303
|
* @public
|
|
320
304
|
*/
|
|
321
305
|
const TableHandleRowPositioner = /* @__PURE__ */ forwardRef(TableHandleRowPositionerComponent);
|
|
322
|
-
//#endregion
|
|
323
|
-
//#region src/components/table-handle/table-handle-row-menu-root.gen.ts
|
|
324
306
|
/**
|
|
325
307
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
326
308
|
*/
|
|
@@ -354,8 +336,6 @@ function TableHandleRowMenuRootComponent(props, forwardedRef) {
|
|
|
354
336
|
* @public
|
|
355
337
|
*/
|
|
356
338
|
const TableHandleRowMenuRoot = /* @__PURE__ */ forwardRef(TableHandleRowMenuRootComponent);
|
|
357
|
-
//#endregion
|
|
358
|
-
//#region src/components/table-handle/table-handle-row-menu-trigger.gen.ts
|
|
359
339
|
/**
|
|
360
340
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
361
341
|
*/
|
|
@@ -386,7 +366,62 @@ function TableHandleRowMenuTriggerComponent(props, forwardedRef) {
|
|
|
386
366
|
* @public
|
|
387
367
|
*/
|
|
388
368
|
const TableHandleRowMenuTrigger = /* @__PURE__ */ forwardRef(TableHandleRowMenuTriggerComponent);
|
|
389
|
-
|
|
369
|
+
/**
|
|
370
|
+
|
|
371
|
+
@module
|
|
372
|
+
|
|
373
|
+
## Anatomy
|
|
374
|
+
|
|
375
|
+
```jsx
|
|
376
|
+
import {
|
|
377
|
+
TableHandleColumnMenuRoot,
|
|
378
|
+
TableHandleColumnMenuTrigger,
|
|
379
|
+
TableHandleColumnPopup,
|
|
380
|
+
TableHandleColumnPositioner,
|
|
381
|
+
TableHandleDragPreview,
|
|
382
|
+
TableHandleDropIndicator,
|
|
383
|
+
TableHandleRoot,
|
|
384
|
+
TableHandleRowMenuRoot,
|
|
385
|
+
TableHandleRowMenuTrigger,
|
|
386
|
+
TableHandleRowPopup,
|
|
387
|
+
TableHandleRowPositioner,
|
|
388
|
+
} from 'prosekit/react/table-handle'
|
|
389
|
+
import {
|
|
390
|
+
MenuItem,
|
|
391
|
+
MenuPopup,
|
|
392
|
+
MenuPositioner,
|
|
393
|
+
} from 'prosekit/react/menu'
|
|
394
|
+
|
|
395
|
+
<TableHandleRoot>
|
|
396
|
+
<TableHandleDragPreview />
|
|
397
|
+
<TableHandleDropIndicator />
|
|
398
|
+
<TableHandleColumnPositioner>
|
|
399
|
+
<TableHandleColumnPopup>
|
|
400
|
+
<TableHandleColumnMenuRoot>
|
|
401
|
+
<TableHandleColumnMenuTrigger>...</TableHandleColumnMenuTrigger>
|
|
402
|
+
<MenuPositioner>
|
|
403
|
+
<MenuPopup>
|
|
404
|
+
<MenuItem>...</MenuItem>
|
|
405
|
+
</MenuPopup>
|
|
406
|
+
</MenuPositioner>
|
|
407
|
+
</TableHandleColumnMenuRoot>
|
|
408
|
+
</TableHandleColumnPopup>
|
|
409
|
+
</TableHandleColumnPositioner>
|
|
410
|
+
<TableHandleRowPositioner>
|
|
411
|
+
<TableHandleRowPopup>
|
|
412
|
+
<TableHandleRowMenuRoot>
|
|
413
|
+
<TableHandleRowMenuTrigger>...</TableHandleRowMenuTrigger>
|
|
414
|
+
<MenuPositioner>
|
|
415
|
+
<MenuPopup>
|
|
416
|
+
<MenuItem>...</MenuItem>
|
|
417
|
+
</MenuPopup>
|
|
418
|
+
</MenuPositioner>
|
|
419
|
+
</TableHandleRowMenuRoot>
|
|
420
|
+
</TableHandleRowPopup>
|
|
421
|
+
</TableHandleRowPositioner>
|
|
422
|
+
</TableHandleRoot>
|
|
423
|
+
```
|
|
424
|
+
*/
|
|
390
425
|
export { TableHandleColumnMenuRoot, TableHandleColumnMenuTrigger, TableHandleColumnPopup, TableHandleColumnPositioner, TableHandleDragPreview, TableHandleDropIndicator, TableHandleRoot, TableHandleRowMenuRoot, TableHandleRowMenuTrigger, TableHandleRowPopup, TableHandleRowPositioner };
|
|
391
426
|
|
|
392
427
|
//# sourceMappingURL=prosekit-react-table-handle.js.map
|