@prosekit/react 0.7.0-beta.6 → 0.7.0-beta.7
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/{prosekit-react-autocomplete.d.ts → autocomplete.d.ts} +1 -1
- package/dist/autocomplete.d.ts.map +1 -0
- package/dist/{prosekit-react-autocomplete.js → autocomplete.js} +1 -1
- package/dist/autocomplete.js.map +1 -0
- package/dist/{prosekit-react-block-handle.d.ts → block-handle.d.ts} +1 -1
- package/dist/block-handle.d.ts.map +1 -0
- package/dist/{prosekit-react-block-handle.js → block-handle.js} +1 -1
- package/dist/block-handle.js.map +1 -0
- package/dist/{prosekit-react-drop-indicator.d.ts → drop-indicator.d.ts} +1 -1
- package/dist/drop-indicator.d.ts.map +1 -0
- package/dist/{prosekit-react-drop-indicator.js → drop-indicator.js} +1 -1
- package/dist/drop-indicator.js.map +1 -0
- package/dist/{prosekit-react.d.ts → index.d.ts} +1 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/{prosekit-react.js → index.js} +1 -1
- package/dist/index.js.map +1 -0
- package/dist/{prosekit-react-inline-popover.d.ts → inline-popover.d.ts} +1 -1
- package/dist/inline-popover.d.ts.map +1 -0
- package/dist/{prosekit-react-inline-popover.js → inline-popover.js} +1 -1
- package/dist/inline-popover.js.map +1 -0
- package/dist/{prosekit-react-menu.d.ts → menu.d.ts} +1 -1
- package/dist/menu.d.ts.map +1 -0
- package/dist/{prosekit-react-menu.js → menu.js} +1 -1
- package/dist/menu.js.map +1 -0
- package/dist/{prosekit-react-popover.d.ts → popover.d.ts} +1 -1
- package/dist/popover.d.ts.map +1 -0
- package/dist/{prosekit-react-popover.js → popover.js} +1 -1
- package/dist/popover.js.map +1 -0
- package/dist/{prosekit-react-resizable.d.ts → resizable.d.ts} +1 -1
- package/dist/resizable.d.ts.map +1 -0
- package/dist/{prosekit-react-resizable.js → resizable.js} +1 -1
- package/dist/resizable.js.map +1 -0
- package/dist/{prosekit-react-table-handle.d.ts → table-handle.d.ts} +1 -1
- package/dist/table-handle.d.ts.map +1 -0
- package/dist/{prosekit-react-table-handle.js → table-handle.js} +1 -1
- package/dist/table-handle.js.map +1 -0
- package/dist/{prosekit-react-tooltip.d.ts → tooltip.d.ts} +1 -1
- package/dist/tooltip.d.ts.map +1 -0
- package/dist/{prosekit-react-tooltip.js → tooltip.js} +1 -1
- package/dist/tooltip.js.map +1 -0
- package/package.json +39 -56
- package/dist/prosekit-react-autocomplete.d.ts.map +0 -1
- package/dist/prosekit-react-autocomplete.js.map +0 -1
- package/dist/prosekit-react-block-handle.d.ts.map +0 -1
- package/dist/prosekit-react-block-handle.js.map +0 -1
- package/dist/prosekit-react-drop-indicator.d.ts.map +0 -1
- package/dist/prosekit-react-drop-indicator.js.map +0 -1
- package/dist/prosekit-react-inline-popover.d.ts.map +0 -1
- package/dist/prosekit-react-inline-popover.js.map +0 -1
- package/dist/prosekit-react-menu.d.ts.map +0 -1
- package/dist/prosekit-react-menu.js.map +0 -1
- package/dist/prosekit-react-popover.d.ts.map +0 -1
- package/dist/prosekit-react-popover.js.map +0 -1
- package/dist/prosekit-react-resizable.d.ts.map +0 -1
- package/dist/prosekit-react-resizable.js.map +0 -1
- package/dist/prosekit-react-table-handle.d.ts.map +0 -1
- package/dist/prosekit-react-table-handle.js.map +0 -1
- package/dist/prosekit-react-tooltip.d.ts.map +0 -1
- package/dist/prosekit-react-tooltip.js.map +0 -1
- package/dist/prosekit-react.d.ts.map +0 -1
- package/dist/prosekit-react.js.map +0 -1
|
@@ -187,4 +187,4 @@ interface AutocompleteRootProps {
|
|
|
187
187
|
/** A React component that renders an `prosekit-autocomplete-root` custom element. */
|
|
188
188
|
declare const AutocompleteRoot: ForwardRefExoticComponent<AutocompleteRootProps & HTMLAttributes<AutocompleteRootElement> & RefAttributes<AutocompleteRootElement>>;
|
|
189
189
|
export { AutocompleteEmpty, type AutocompleteEmptyProps, AutocompleteItem, type AutocompleteItemProps, AutocompletePopup, type AutocompletePopupProps, AutocompletePositioner, type AutocompletePositionerProps, AutocompleteRoot, type AutocompleteRootProps };
|
|
190
|
-
//# sourceMappingURL=
|
|
190
|
+
//# sourceMappingURL=autocomplete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autocomplete.d.ts","names":[],"sources":["../src/components/autocomplete/autocomplete-empty.gen.ts","../src/components/autocomplete/autocomplete-item.gen.ts","../src/components/autocomplete/autocomplete-popup.gen.ts","../src/components/autocomplete/autocomplete-positioner.gen.ts","../src/components/autocomplete/autocomplete-root.gen.ts"],"mappings":";;;UAMiB,sBAAA;;cAyBJ,iBAAA,EAAmB,yBAAA,CAA0B,sBAAA,GAAyB,cAAA,CAAe,wBAAA,IAA4B,aAAA,CAAc,wBAAA;;UCzB3H,qBAAA;EDAsB;;;;AAyBvC;;;ECjBE,KAAA,GAAQ,uBAAA;EDiBwF;;;;;ECXhG,QAAA,GAAW,uBAAA;EDW4C;ECTvD,QAAA,IAAY,KAAA,EAAO,sBAAA;AAAA;;cAkDR,gBAAA,EAAkB,yBAAA,CAA0B,qBAAA,GAAwB,IAAA,CAAK,cAAA,CAAe,uBAAA,iBAAwC,aAAA,CAAc,uBAAA;;UClE1I,sBAAA;EFAsB;;;;EEKrC,aAAA,IAAiB,KAAA,EAAO,uBAAA;EFoBqM;;;;EEf7N,cAAA,IAAkB,KAAA,EAAO,uBAAA;AAAA;;cAiDd,iBAAA,EAAmB,yBAAA,CAA0B,sBAAA,GAAyB,cAAA,CAAe,wBAAA,IAA4B,aAAA,CAAc,wBAAA;;UC3D3H,2BAAA;EHAsB;;;;AAyBvC;EGnBE,SAAA,GAAY,6BAAA;;;;;;EAMZ,MAAA,GAAS,6BAAA;EHaqB;EGX9B,MAAA,GAAS,6BAAA;EHW8C;EGTvD,KAAA,GAAQ,6BAAA;EHSgD;EGPxD,WAAA,GAAc,6BAAA;EHOkF;EGLhG,QAAA,GAAW,6BAAA;EHK+H;EGH1I,eAAA,GAAkB,6BAAA;EHGgJ;;ACzBpK;;;EE4BE,QAAA,GAAW,6BAAA;EFdA;;;;;;;EEsBX,UAAA,GAAa,6BAAA;EFpBb;;;;;AAkDF;;;EErBE,IAAA,GAAO,6BAAA;EFqB4F;;;;;EEfnG,KAAA,GAAQ,6BAAA;EFe8C;;;;;;EERtD,OAAA,GAAU,6BAAA;EFQiI;;;;;AClE7I;ECiEE,SAAA,GAAY,6BAAA;;;;;;;EAOZ,UAAA,GAAa,6BAAA;ED9DK;;;AAiDpB;;;ECoBE,IAAA,GAAO,6BAAA;EDpByF;;;;;;EC2BhG,YAAA,GAAe,6BAAA;ED3Be;;;;;;;ECmC9B,cAAA,GAAiB,6BAAA;;AA9FnB;;;;;;EAsGE,WAAA,GAAc,6BAAA;AAAA;;cAgCH,sBAAA,EAAwB,yBAAA,CAA0B,2BAAA,GAA8B,cAAA,CAAe,6BAAA,IAAiC,aAAA,CAAc,6BAAA;;UCpI1I,qBAAA;EJFsB;;;;AAyBvC;;EIhBE,MAAA,GAAS,uBAAA;EJgB+C;;;;;EIVxD,KAAA,GAAQ,uBAAA;EJU+C;;;;;;EIHvD,MAAA,GAAS,uBAAA;EJGiI;EID1I,YAAA,IAAgB,KAAA,EAAO,sBAAA;EJC2I;EIClK,aAAA,IAAiB,KAAA,EAAO,sBAAA;EH1BT;;;;EG+Bf,aAAA,IAAiB,KAAA,EAAO,sBAAA;EHfL;;;;EGoBnB,cAAA,IAAkB,KAAA,EAAO,sBAAA;AAAA;;cAoDd,gBAAA,EAAkB,yBAAA,CAA0B,qBAAA,GAAwB,cAAA,CAAe,uBAAA,IAA2B,aAAA,CAAc,uBAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autocomplete.js","names":[],"sources":["../src/components/autocomplete/autocomplete-empty.gen.ts","../src/components/autocomplete/autocomplete-item.gen.ts","../src/components/autocomplete/autocomplete-popup.gen.ts","../src/components/autocomplete/autocomplete-positioner.gen.ts","../src/components/autocomplete/autocomplete-root.gen.ts","../src/components/autocomplete/index.ts"],"sourcesContent":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerAutocompleteEmptyElement, type AutocompleteEmptyElement } from '@prosekit/web/autocomplete';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes } from 'react';\n\n/** Props for the {@link AutocompleteEmpty} React component. */\nexport interface AutocompleteEmptyProps {}\n\nfunction AutocompleteEmptyComponent(props: AutocompleteEmptyProps, forwardedRef: ForwardedRef<AutocompleteEmptyElement>) {\n registerAutocompleteEmptyElement();\n\n const elementRef = useRef<AutocompleteEmptyElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: AutocompleteEmptyElement | 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-autocomplete-empty', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-autocomplete-empty` custom element. */\nexport const AutocompleteEmpty: ForwardRefExoticComponent<AutocompleteEmptyProps & HTMLAttributes<AutocompleteEmptyElement> & RefAttributes<AutocompleteEmptyElement>> = /* @__PURE__ */ forwardRef(AutocompleteEmptyComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerAutocompleteItemElement, type AutocompleteItemElement, type AutocompleteItemProps as AutocompleteItemElementProps, type AutocompleteItemEvents } from '@prosekit/web/autocomplete';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/** Props for the {@link AutocompleteItem} React component. */\nexport interface AutocompleteItemProps {\n /**\n * The value of the item, which will be matched against the query.\n *\n * If not provided, the value is the item's text content.\n *\n * @default \"\"\n */\n value?: AutocompleteItemElementProps['value'];\n /**\n * Whether this option is disabled.\n *\n * @default false\n */\n disabled?: AutocompleteItemElementProps['disabled'];\n /** Emitted when the the item is selected. */\n onSelect?: (event: AutocompleteItemEvents['select']) => void;\n}\n\nfunction AutocompleteItemComponent(props: AutocompleteItemProps, forwardedRef: ForwardedRef<AutocompleteItemElement>) {\n registerAutocompleteItemElement();\n\n const elementRef = useRef<AutocompleteItemElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const { disabled: p0, value: p1, onSelect: e0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { disabled: p0, value: p1 });\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 ['select'].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: AutocompleteItemElement | 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-autocomplete-item', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-autocomplete-item` custom element. */\nexport const AutocompleteItem: ForwardRefExoticComponent<AutocompleteItemProps & Omit<HTMLAttributes<AutocompleteItemElement>, 'onSelect'> & RefAttributes<AutocompleteItemElement>> = /* @__PURE__ */ forwardRef(AutocompleteItemComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerAutocompletePopupElement, type AutocompletePopupElement, type AutocompletePopupEvents } from '@prosekit/web/autocomplete';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/** Props for the {@link AutocompletePopup} React component. */\nexport interface AutocompletePopupProps {\n /**\n * Emitted when the selected value changes. Only available when multiple is\n * false.\n */\n onValueChange?: (event: AutocompletePopupEvents['valueChange']) => void;\n /**\n * Emitted when the selected values change. Only available when multiple is\n * true.\n */\n onValuesChange?: (event: AutocompletePopupEvents['valuesChange']) => void;\n}\n\nfunction AutocompletePopupComponent(props: AutocompletePopupProps, forwardedRef: ForwardedRef<AutocompletePopupElement>) {\n registerAutocompletePopupElement();\n\n const elementRef = useRef<AutocompletePopupElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const { onValueChange: e0, onValuesChange: e1, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\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 ['valueChange', 'valuesChange'].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: AutocompletePopupElement | 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-autocomplete-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-autocomplete-popup` custom element. */\nexport const AutocompletePopup: ForwardRefExoticComponent<AutocompletePopupProps & HTMLAttributes<AutocompletePopupElement> & RefAttributes<AutocompletePopupElement>> = /* @__PURE__ */ forwardRef(AutocompletePopupComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerAutocompletePositionerElement, type AutocompletePositionerElement, type AutocompletePositionerProps as AutocompletePositionerElementProps } from '@prosekit/web/autocomplete';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/** Props for the {@link AutocompletePositioner} React component. */\nexport interface AutocompletePositionerProps {\n /**\n * The placement of the popover, relative to the text cursor.\n *\n * @default \"bottom-start\"\n */\n placement?: AutocompletePositionerElementProps['placement'];\n /**\n * The distance between the popover and the hovered block.\n *\n * @default 4\n */\n offset?: AutocompletePositionerElementProps['offset'];\n /** @default true */\n inline?: AutocompletePositionerElementProps['inline'];\n /** @default true */\n hoist?: AutocompletePositionerElementProps['hoist'];\n /** @default true */\n fitViewport?: AutocompletePositionerElementProps['fitViewport'];\n /** @default \"The body element\" */\n boundary?: AutocompletePositionerElementProps['boundary'];\n /** @default 8 */\n overflowPadding?: AutocompletePositionerElementProps['overflowPadding'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: AutocompletePositionerElementProps['strategy'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: AutocompletePositionerElementProps['autoUpdate'];\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?: AutocompletePositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: AutocompletePositionerElementProps['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?: AutocompletePositionerElementProps['overlap'];\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?: AutocompletePositionerElementProps['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?: AutocompletePositionerElementProps['sameHeight'];\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?: AutocompletePositionerElementProps['hide'];\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?: AutocompletePositionerElementProps['rootBoundary'];\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?: AutocompletePositionerElementProps['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?: AutocompletePositionerElementProps['altBoundary'];\n}\n\nfunction AutocompletePositionerComponent(props: AutocompletePositionerProps, forwardedRef: ForwardedRef<AutocompletePositionerElement>) {\n registerAutocompletePositionerElement();\n\n const elementRef = useRef<AutocompletePositionerElement>(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: AutocompletePositionerElement | 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-autocomplete-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-autocomplete-positioner` custom element. */\nexport const AutocompletePositioner: ForwardRefExoticComponent<AutocompletePositionerProps & HTMLAttributes<AutocompletePositionerElement> & RefAttributes<AutocompletePositionerElement>> = /* @__PURE__ */ forwardRef(AutocompletePositionerComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerAutocompleteRootElement, type AutocompleteRootElement, type AutocompleteRootProps as AutocompleteRootElementProps, type AutocompleteRootEvents } from '@prosekit/web/autocomplete';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link AutocompleteRoot} React component. */\nexport interface AutocompleteRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: AutocompleteRootElementProps['editor'];\n /**\n * The regular expression to match the query text to autocomplete.\n *\n * @default null\n */\n regex?: AutocompleteRootElementProps['regex'];\n /**\n * The filter function to determine if an item should be shown in the\n * listbox.\n *\n * @default defaultItemFilter\n */\n filter?: AutocompleteRootElementProps['filter'];\n /** Fired when the open state changes. */\n onOpenChange?: (event: AutocompleteRootEvents['openChange']) => void;\n /** Fired when the query changes. */\n onQueryChange?: (event: AutocompleteRootEvents['queryChange']) => void;\n /**\n * Emitted when the selected value changes. Only available when multiple is\n * false.\n */\n onValueChange?: (event: AutocompleteRootEvents['valueChange']) => void;\n /**\n * Emitted when the selected values change. Only available when multiple is\n * true.\n */\n onValuesChange?: (event: AutocompleteRootEvents['valuesChange']) => void;\n}\n\nfunction AutocompleteRootComponent(props: AutocompleteRootProps, forwardedRef: ForwardedRef<AutocompleteRootElement>) {\n registerAutocompleteRootElement();\n\n const elementRef = useRef<AutocompleteRootElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, filter: p1, regex: p2, onOpenChange: e0, onQueryChange: e1, onValueChange: e2, onValuesChange: e3, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { editor: p0 ?? p0Fallback, filter: p1, regex: p2 });\n handlersRef.current = [e0, e1, e2, e3] 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', 'queryChange', 'valueChange', 'valuesChange'].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: AutocompleteRootElement | 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-autocomplete-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-autocomplete-root` custom element. */\nexport const AutocompleteRoot: ForwardRefExoticComponent<AutocompleteRootProps & HTMLAttributes<AutocompleteRootElement> & RefAttributes<AutocompleteRootElement>> = /* @__PURE__ */ forwardRef(AutocompleteRootComponent);\n","/**\n\n@module\n\n## Anatomy\n\n```jsx\nimport {\n AutocompleteEmpty,\n AutocompleteItem,\n AutocompletePopup,\n AutocompletePositioner,\n AutocompleteRoot,\n} from 'prosekit/react/autocomplete'\n\n<AutocompleteRoot>\n <AutocompletePositioner>\n <AutocompletePopup>\n <AutocompleteItem>...</AutocompleteItem>\n <AutocompleteEmpty>...</AutocompleteEmpty>\n </AutocompletePopup>\n </AutocompletePositioner>\n</AutocompleteRoot>\n```\n*/\n\n'use client'\n\nexport * from './index.gen.ts'\n"],"mappings":";;;;AAQA,SAAS,2BAA2B,OAA+B,cAAsD;AACvH,mCAAkC;CAElC,MAA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AG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;IACtB,EAAE,CAAC;CAEN,MAAM,YAAY,aACf,YAA4C;AAC3C,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,8BAA8B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;AAItH,MAAa,mBAAwK,2BAAW,0BAA0B"}
|
|
@@ -168,4 +168,4 @@ interface BlockHandleRootProps {
|
|
|
168
168
|
/** A React component that renders an `prosekit-block-handle-root` custom element. */
|
|
169
169
|
declare const BlockHandleRoot: ForwardRefExoticComponent<BlockHandleRootProps & HTMLAttributes<BlockHandleRootElement> & RefAttributes<BlockHandleRootElement>>;
|
|
170
170
|
export { BlockHandleAdd, type BlockHandleAddProps, BlockHandleDraggable, type BlockHandleDraggableProps, BlockHandlePopup, type BlockHandlePopupProps, BlockHandlePositioner, type BlockHandlePositionerProps, BlockHandleRoot, type BlockHandleRootProps };
|
|
171
|
-
//# sourceMappingURL=
|
|
171
|
+
//# sourceMappingURL=block-handle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-handle.d.ts","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popup.gen.ts","../src/components/block-handle/block-handle-positioner.gen.ts","../src/components/block-handle/block-handle-root.gen.ts"],"mappings":";;;UAQiB,mBAAA;EAAmB;;;;AAyCpC;;EAlCE,MAAA,GAAS,qBAAA;AAAA;;cAkCE,cAAA,EAAgB,yBAAA,CAA0B,mBAAA,GAAsB,cAAA,CAAe,qBAAA,IAAyB,aAAA,CAAc,qBAAA;;UCzClH,yBAAA;EDAmB;;;;AAyCpC;;EClCE,MAAA,GAAS,2BAAA;AAAA;;cAkCE,oBAAA,EAAsB,yBAAA,CAA0B,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AAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-handle.js","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popup.gen.ts","../src/components/block-handle/block-handle-positioner.gen.ts","../src/components/block-handle/block-handle-root.gen.ts","../src/components/block-handle/index.ts"],"sourcesContent":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerBlockHandleAddElement, type BlockHandleAddElement, type BlockHandleAddProps as BlockHandleAddElementProps } from '@prosekit/web/block-handle';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link BlockHandleAdd} React component. */\nexport interface BlockHandleAddProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleAddElementProps['editor'];\n}\n\nfunction BlockHandleAddComponent(props: BlockHandleAddProps, forwardedRef: ForwardedRef<BlockHandleAddElement>) {\n registerBlockHandleAddElement();\n\n const elementRef = useRef<BlockHandleAddElement>(null);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { editor: p0 ?? p0Fallback });\n });\n\n const mergedRef = useCallback(\n (element: BlockHandleAddElement | 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-block-handle-add', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-block-handle-add` custom element. */\nexport const BlockHandleAdd: ForwardRefExoticComponent<BlockHandleAddProps & HTMLAttributes<BlockHandleAddElement> & RefAttributes<BlockHandleAddElement>> = /* @__PURE__ */ forwardRef(BlockHandleAddComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerBlockHandleDraggableElement, type BlockHandleDraggableElement, type BlockHandleDraggableProps as BlockHandleDraggableElementProps } from '@prosekit/web/block-handle';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link BlockHandleDraggable} React component. */\nexport interface BlockHandleDraggableProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleDraggableElementProps['editor'];\n}\n\nfunction BlockHandleDraggableComponent(props: BlockHandleDraggableProps, forwardedRef: ForwardedRef<BlockHandleDraggableElement>) {\n registerBlockHandleDraggableElement();\n\n const elementRef = useRef<BlockHandleDraggableElement>(null);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { editor: p0 ?? p0Fallback });\n });\n\n const mergedRef = useCallback(\n (element: BlockHandleDraggableElement | 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-block-handle-draggable', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-block-handle-draggable` custom element. */\nexport const BlockHandleDraggable: ForwardRefExoticComponent<BlockHandleDraggableProps & HTMLAttributes<BlockHandleDraggableElement> & RefAttributes<BlockHandleDraggableElement>> = /* @__PURE__ */ forwardRef(BlockHandleDraggableComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerBlockHandlePopupElement, type BlockHandlePopupElement } from '@prosekit/web/block-handle';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes } from 'react';\n\n/** Props for the {@link BlockHandlePopup} React component. */\nexport interface BlockHandlePopupProps {}\n\nfunction BlockHandlePopupComponent(props: BlockHandlePopupProps, forwardedRef: ForwardedRef<BlockHandlePopupElement>) {\n registerBlockHandlePopupElement();\n\n const elementRef = useRef<BlockHandlePopupElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: BlockHandlePopupElement | 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-block-handle-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-block-handle-popup` custom element. */\nexport const BlockHandlePopup: ForwardRefExoticComponent<BlockHandlePopupProps & HTMLAttributes<BlockHandlePopupElement> & RefAttributes<BlockHandlePopupElement>> = /* @__PURE__ */ forwardRef(BlockHandlePopupComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerBlockHandlePositionerElement, type BlockHandlePositionerElement, type BlockHandlePositionerProps as BlockHandlePositionerElementProps } from '@prosekit/web/block-handle';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/** Props for the {@link BlockHandlePositioner} React component. */\nexport interface BlockHandlePositionerProps {\n /**\n * The placement of the popover, relative to the hovered block.\n *\n * @default \"left\"\n */\n placement?: BlockHandlePositionerElementProps['placement'];\n /**\n * Whether to use the browser [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)\n * to place the floating element on top of other page content.\n *\n * @default false\n */\n hoist?: BlockHandlePositionerElementProps['hoist'];\n /**\n * @default false\n * @hidden\n */\n flip?: BlockHandlePositionerElementProps['flip'];\n /**\n * @default false\n * @hidden\n */\n shift?: BlockHandlePositionerElementProps['shift'];\n /**\n * @default true\n * @hidden\n */\n hide?: BlockHandlePositionerElementProps['hide'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: BlockHandlePositionerElementProps['strategy'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: BlockHandlePositionerElementProps['autoUpdate'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: BlockHandlePositionerElementProps['offset'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: BlockHandlePositionerElementProps['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?: BlockHandlePositionerElementProps['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?: BlockHandlePositionerElementProps['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?: BlockHandlePositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: BlockHandlePositionerElementProps['inline'];\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?: BlockHandlePositionerElementProps['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?: BlockHandlePositionerElementProps['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?: BlockHandlePositionerElementProps['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?: BlockHandlePositionerElementProps['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?: BlockHandlePositionerElementProps['altBoundary'];\n}\n\nfunction BlockHandlePositionerComponent(props: BlockHandlePositionerProps, forwardedRef: ForwardedRef<BlockHandlePositionerElement>) {\n registerBlockHandlePositionerElement();\n\n const elementRef = useRef<BlockHandlePositionerElement>(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: BlockHandlePositionerElement | 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-block-handle-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-block-handle-positioner` custom element. */\nexport const BlockHandlePositioner: ForwardRefExoticComponent<BlockHandlePositionerProps & HTMLAttributes<BlockHandlePositionerElement> & RefAttributes<BlockHandlePositionerElement>> = /* @__PURE__ */ forwardRef(BlockHandlePositionerComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerBlockHandleRootElement, type BlockHandleRootElement, type BlockHandleRootProps as BlockHandleRootElementProps, type BlockHandleRootEvents } from '@prosekit/web/block-handle';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link BlockHandleRoot} React component. */\nexport interface BlockHandleRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleRootElementProps['editor'];\n /** Fired when the hovered block changes. */\n onStateChange?: (event: BlockHandleRootEvents['stateChange']) => void;\n}\n\nfunction BlockHandleRootComponent(props: BlockHandleRootProps, forwardedRef: ForwardedRef<BlockHandleRootElement>) {\n registerBlockHandleRootElement();\n\n const elementRef = useRef<BlockHandleRootElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, onStateChange: e0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { editor: p0 ?? p0Fallback });\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 ['stateChange'].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: BlockHandleRootElement | 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-block-handle-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-block-handle-root` custom element. */\nexport const BlockHandleRoot: ForwardRefExoticComponent<BlockHandleRootProps & HTMLAttributes<BlockHandleRootElement> & RefAttributes<BlockHandleRootElement>> = /* @__PURE__ */ forwardRef(BlockHandleRootComponent);\n","/**\n\n@module\n\n## Anatomy\n\n```jsx\nimport {\n BlockHandleAdd,\n BlockHandleDraggable,\n BlockHandlePopup,\n BlockHandlePositioner,\n BlockHandleRoot,\n} from 'prosekit/react/block-handle'\n\n<BlockHandleRoot>\n <BlockHandlePositioner>\n <BlockHandlePopup>\n <BlockHandleAdd>...</BlockHandleAdd>\n <BlockHandleDraggable>...</BlockHandleDraggable>\n </BlockHandlePopup>\n </BlockHandlePositioner>\n</BlockHandleRoot>\n```\n*/\n\n'use client'\n\nexport * from './index.gen.ts'\n"],"mappings":";;;;AAkBA,SAAS,wBAAwB,OAA4B,cAAmD;AAC9G,gCAA+B;CAE/B,MAAM,aAAa,OAA8B,KAAK;CAEtD,MAAM,aAAa,kBAAkB;CAErC,MAAM,EAAE,QAAQ,IAAI,GAAG,cAAc;AAErC,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS,EAAE,QAAQ,MAAM,YAAY,CAAC;GACpD;CAEF,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,6BAA6B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;AAIrH,MAAa,iBAAgK,2BAAW,wBAAwB;AC/BhN,SAAS,8BAA8B,OAAkC,cAAyD;AAChI,sCAAqC;CAErC,MAAM,aAAa,OAAoC,KAAK;CAE5D,MAAM,aAAa,kBAAkB;CAErC,MAAM,EAAE,QAAQ,IAAI,GAAG,cAAc;AAErC,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd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;EAAW,0BAA0B;EAAM,CAAC;;;AAItH,MAAa,kBAAoK,2BAAW,yBAAyB"}
|
|
@@ -19,4 +19,4 @@ interface DropIndicatorProps {
|
|
|
19
19
|
/** A React component that renders an `prosekit-drop-indicator` custom element. */
|
|
20
20
|
declare const DropIndicator: ForwardRefExoticComponent<DropIndicatorProps & HTMLAttributes<DropIndicatorElement> & RefAttributes<DropIndicatorElement>>;
|
|
21
21
|
export { DropIndicator, type DropIndicatorProps };
|
|
22
|
-
//# sourceMappingURL=
|
|
22
|
+
//# sourceMappingURL=drop-indicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drop-indicator.d.ts","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"mappings":";;;UAQiB,kBAAA;EAAkB;;;;;;EAOjC,MAAA,GAAS,oBAAA;EAMwB;;AAkCnC;;;EAlCE,KAAA,GAAQ,oBAAA;AAAA;;cAkCG,aAAA,EAAe,yBAAA,CAA0B,kBAAA,GAAqB,cAAA,CAAe,oBAAA,IAAwB,aAAA,CAAc,oBAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drop-indicator.js","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts","../src/components/drop-indicator/index.ts"],"sourcesContent":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerDropIndicatorElement, type DropIndicatorElement, type DropIndicatorProps as DropIndicatorElementProps } from '@prosekit/web/drop-indicator';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link DropIndicator} React component. */\nexport interface DropIndicatorProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: DropIndicatorElementProps['editor'];\n /**\n * The line width in pixels.\n *\n * @default 2\n */\n width?: DropIndicatorElementProps['width'];\n}\n\nfunction DropIndicatorComponent(props: DropIndicatorProps, forwardedRef: ForwardedRef<DropIndicatorElement>) {\n registerDropIndicatorElement();\n\n const elementRef = useRef<DropIndicatorElement>(null);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, width: p1, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { editor: p0 ?? p0Fallback, width: p1 });\n });\n\n const mergedRef = useCallback(\n (element: DropIndicatorElement | 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-drop-indicator', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-drop-indicator` custom element. */\nexport const DropIndicator: ForwardRefExoticComponent<DropIndicatorProps & HTMLAttributes<DropIndicatorElement> & RefAttributes<DropIndicatorElement>> = /* @__PURE__ */ forwardRef(DropIndicatorComponent);\n","/**\n\n@module\n\n## Anatomy\n\n```jsx\nimport { DropIndicator } from 'prosekit/react/drop-indicator'\n\n<DropIndicator />\n```\n*/\n\n'use client'\n\nexport * from './index.gen.ts'\n"],"mappings":";;;;AAwBA,SAAS,uBAAuB,OAA2B,cAAkD;AAC3G,+BAA8B;CAE9B,MAAM,aAAa,OAA6B,KAAK;CAErD,MAAM,aAAa,kBAAkB;CAErC,MAAM,EAAE,QAAQ,IAAI,OAAO,IAAI,GAAG,cAAc;AAEhD,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS;GAAE,QAAQ,MAAM;GAAY,OAAO;GAAI,CAAC;GAC/D;CAEF,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;;;AAInH,MAAa,gBAA4J,2BAAW,uBAAuB"}
|
|
@@ -153,4 +153,4 @@ type PropsWithClassName<P = unknown> = P & {
|
|
|
153
153
|
className?: string | undefined;
|
|
154
154
|
};
|
|
155
155
|
export { type PropsWithClassName, ProseKit, type ProseKitProps, type ReactMarkViewComponent, type ReactMarkViewOptions, type ReactMarkViewProps, type ReactNodeViewComponent, type ReactNodeViewOptions, type ReactNodeViewProps, type UseEditorDerivedOptions, type UseExtensionOptions, defineReactMarkView, defineReactNodeView, useDocChange, useEditor, useEditorDerivedValue, useExtension, useKeymap, useStateUpdate };
|
|
156
|
-
//# sourceMappingURL=
|
|
156
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/components/prosekit.ts","../src/extensions/react-mark-view.ts","../src/extensions/react-node-view.ts","../src/hooks/use-extension.ts","../src/hooks/use-doc-change.ts","../src/hooks/use-editor-derived-value.ts","../src/hooks/use-editor.ts","../src/hooks/use-keymap.ts","../src/hooks/use-state-update.ts","../src/types.ts"],"mappings":";;;;;;UAOiB,aAAA;EACf,MAAA,EAAQ,MAAA;EACR,QAAA,GAAW,SAAA;AAAA;;AAFb;;;;cAUa,QAAA,EAAU,aAAA,CAAc,aAAA;;;;UCHpB,kBAAA,SAA2B,eAAA;;;;KAKhC,sBAAA,GAAyB,aAAA,CAAc,kBAAA;;;;;ADFnD;UCSiB,oBAAA,SAA6B,uBAAA,CAAwB,sBAAA;;;;EAIpE,IAAA;AAAA;AAXF;;;;;AAAA,iBA6CgB,mBAAA,CAAoB,OAAA,EAAS,oBAAA,GAAuB,SAAA;;;;UClDnD,kBAAA,SAA2B,eAAA;;;;KAKhC,sBAAA,GAAyB,aAAA,CAAc,kBAAA;;;;;AFFnD;UESiB,oBAAA,SAA6B,uBAAA,CAAwB,sBAAA;;;;EAIpE,IAAA;AAAA;ADXF;;;;;AAAA,iBC6CgB,mBAAA,CAAoB,OAAA,EAAS,oBAAA,GAAuB,SAAA;AAAA,UCzDnD,mBAAA;;;;;EAKf,MAAA,GAAS,MAAA;EHLM;;;EGUf,QAAA,GAAW,QAAA;AAAA;;;;iBAMG,YAAA;;AHNhB;;;;AGWE,SAAA,EAAW,SAAA,SACX,OAAA,GAAU,mBAAA;;;;;;iBCjBI,YAAA,CACd,OAAA,GAAU,GAAA,EAAK,eAAA,WACf,OAAA,GAAU,mBAAA;AAAA,UCTK,uBAAA,WAAkC,SAAA;;;;;EAKjD,MAAA,GAAS,MAAA,CAAO,CAAA;AAAA;;;;;;;;;;ALOlB;;iBKOgB,qBAAA,WAAgC,SAAA,UAAA;;;;AJVhD;;;;;;AImBE,MAAA,GAAS,MAAA,EAAQ,MAAA,CAAO,CAAA,MAAO,OAAA,EAC/B,OAAA,GAAU,uBAAA,CAAwB,CAAA,IACjC,OAAA;;;;;;iBCzBa,SAAA,WAAoB,SAAA,OAAA,CAAiB,OAAA;ENHpC;;;;;;;;;;AAUjB;EMKE,MAAA;AAAA,IACE,MAAA,CAAO,CAAA;AAAA,iBClBK,SAAA,CAAU,MAAA,EAAQ,MAAA,EAAQ,OAAA,GAAU,mBAAA;;;;;;iBCOpC,cAAA,CACd,OAAA,GAAU,KAAA,EAAO,WAAA,WACjB,OAAA,GAAU,mBAAA;;;;KCXA,kBAAA,gBAAkC,CAAA;EAC5C,SAAA;AAAA"}
|
|
@@ -207,4 +207,4 @@ function useStateUpdate(handler, options) {
|
|
|
207
207
|
}
|
|
208
208
|
export { ProseKit, defineReactMarkView, defineReactNodeView, useDocChange, useEditor, useEditorDerivedValue, useExtension, useKeymap, useStateUpdate };
|
|
209
209
|
|
|
210
|
-
//# sourceMappingURL=
|
|
210
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/extensions/react-mark-view.ts","../src/extensions/react-node-view.ts","../src/hooks/use-editor-extension.ts","../src/components/view-renderer.ts","../src/components/prosekit.ts","../src/hooks/use-event-callback.ts","../src/hooks/use-priority-extension.ts","../src/hooks/use-extension.ts","../src/hooks/use-doc-change.ts","../src/hooks/use-editor-derived-value.ts","../src/hooks/use-editor.ts","../src/hooks/use-keymap.ts","../src/hooks/use-state-update.ts"],"sourcesContent":["import { defineMarkViewComponent, defineMarkViewFactory, type Extension } from '@prosekit/core'\nimport type { CoreMarkViewUserOptions } from '@prosemirror-adapter/core'\nimport {\n AbstractReactMarkView,\n buildReactMarkViewCreator,\n type MarkViewContext,\n type ReactRendererResult,\n} from '@prosemirror-adapter/react'\nimport { createElement, type ComponentType, type ReactPortal } from 'react'\nimport { createPortal } from 'react-dom'\n\n/**\n * @public\n */\nexport interface ReactMarkViewProps extends MarkViewContext {}\n\n/**\n * @public\n */\nexport type ReactMarkViewComponent = ComponentType<ReactMarkViewProps>\n\n/**\n * Options for {@link defineReactMarkView}.\n *\n * @public\n */\nexport interface ReactMarkViewOptions extends CoreMarkViewUserOptions<ReactMarkViewComponent> {\n /**\n * The name of the mark type.\n */\n name: string\n}\n\nclass ProseKitReactMarkView extends AbstractReactMarkView<ReactMarkViewComponent> {\n render = (): ReactPortal => {\n const UserComponent = this.component\n const props = { ...this.context }\n return createPortal(\n createElement(UserComponent, props),\n this.dom,\n this.key,\n )\n }\n}\n\n/**\n * @internal\n */\nexport function defineReactMarkViewFactory(\n renderReactRenderer: ReactRendererResult['renderReactRenderer'],\n removeReactRenderer: ReactRendererResult['removeReactRenderer'],\n): Extension {\n const factory = buildReactMarkViewCreator(renderReactRenderer, removeReactRenderer, ProseKitReactMarkView)\n return defineMarkViewFactory<ReactMarkViewOptions>({\n group: 'react',\n factory,\n })\n}\n\n/**\n * Defines a mark view using a React component.\n *\n * @public\n */\nexport function defineReactMarkView(options: ReactMarkViewOptions): Extension {\n return defineMarkViewComponent<ReactMarkViewOptions>({\n group: 'react',\n name: options.name,\n args: options,\n })\n}\n","import { defineNodeViewComponent, defineNodeViewFactory, type Extension } from '@prosekit/core'\nimport type { CoreNodeViewUserOptions } from '@prosemirror-adapter/core'\nimport {\n AbstractReactNodeView,\n buildReactNodeViewCreator,\n type NodeViewContext,\n type ReactRendererResult,\n} from '@prosemirror-adapter/react'\nimport { createElement, type ComponentType, type ReactPortal } from 'react'\nimport { createPortal } from 'react-dom'\n\n/**\n * @public\n */\nexport interface ReactNodeViewProps extends NodeViewContext {}\n\n/**\n * @public\n */\nexport type ReactNodeViewComponent = ComponentType<ReactNodeViewProps>\n\n/**\n * Options for {@link defineReactNodeView}.\n *\n * @public\n */\nexport interface ReactNodeViewOptions extends CoreNodeViewUserOptions<ReactNodeViewComponent> {\n /**\n * The name of the node type.\n */\n name: string\n}\n\nclass ProseKitReactNodeView extends AbstractReactNodeView<ReactNodeViewComponent> {\n render = (): ReactPortal => {\n const UserComponent = this.component\n const props = { ...this.context }\n return createPortal(\n createElement(UserComponent, props),\n this.dom,\n this.key,\n )\n }\n}\n\n/**\n * @internal\n */\nexport function defineReactNodeViewFactory(\n renderReactRenderer: ReactRendererResult['renderReactRenderer'],\n removeReactRenderer: ReactRendererResult['removeReactRenderer'],\n): Extension {\n const factory = buildReactNodeViewCreator(renderReactRenderer, removeReactRenderer, ProseKitReactNodeView)\n return defineNodeViewFactory<ReactNodeViewOptions>({\n group: 'react',\n factory,\n })\n}\n\n/**\n * Defines a node view using a React component.\n *\n * @public\n */\nexport function defineReactNodeView(options: ReactNodeViewOptions): Extension {\n return defineNodeViewComponent<ReactNodeViewOptions>({\n group: 'react',\n name: options.name,\n args: options,\n })\n}\n","import { EditorNotFoundError, type Editor, type Extension } from '@prosekit/core'\nimport { queueExtension } from '@prosekit/web'\nimport { useEffect } from 'react'\n\n/**\n * @internal\n */\nexport function useEditorExtension(\n editor: Editor | null | undefined,\n extension: Extension | null,\n): void {\n if (!editor) {\n throw new EditorNotFoundError()\n }\n\n useEffect(() => {\n if (extension) {\n return queueExtension(editor, extension)\n }\n }, [editor, extension])\n}\n","import { union, type Editor } from '@prosekit/core'\nimport { useReactRenderer } from '@prosemirror-adapter/react'\nimport { createElement, Fragment, useMemo, type ComponentType, type ReactNode } from 'react'\n\nimport { defineReactMarkViewFactory } from '../extensions/react-mark-view.ts'\nimport { defineReactNodeViewFactory } from '../extensions/react-node-view.ts'\nimport { useEditorExtension } from '../hooks/use-editor-extension.ts'\n\ninterface ViewRendererProps {\n editor: Editor\n children: ReactNode\n}\n\nexport const ViewRenderer: ComponentType<ViewRendererProps> = ({ editor, children }): ReactNode => {\n const { renderReactRenderer, removeReactRenderer, render } = useReactRenderer()\n\n const extension = useMemo(() => {\n return union([\n defineReactMarkViewFactory(renderReactRenderer, removeReactRenderer),\n defineReactNodeViewFactory(renderReactRenderer, removeReactRenderer),\n ])\n }, [renderReactRenderer, removeReactRenderer])\n\n useEditorExtension(editor, extension)\n\n return createElement(Fragment, null, createElement(Fragment, null, children), createElement(Fragment, null, render()))\n}\n","import type { Editor } from '@prosekit/core'\nimport { createElement, type ComponentType, type ReactNode } from 'react'\n\nimport { EditorContextProvider } from '../contexts/editor-context.ts'\n\nimport { ViewRenderer } from './view-renderer.ts'\n\nexport interface ProseKitProps {\n editor: Editor\n children?: ReactNode\n}\n\n/**\n * The root component for a ProseKit editor.\n *\n * @public\n */\nexport const ProseKit: ComponentType<ProseKitProps> = (props) => {\n const { editor, children } = props\n\n return createElement(\n EditorContextProvider,\n { value: editor },\n createElement(\n ViewRenderer,\n { editor, children },\n ),\n )\n}\n","import { useCallback, useLayoutEffect, useRef } from 'react'\n\n/**\n * @internal\n */\nexport function useEventCallback<Args extends unknown[], Return>(\n callback: (...args: Args) => Return,\n): (...args: Args) => Return {\n const callbackRef = useRef(callback)\n useLayoutEffect(() => {\n callbackRef.current = callback\n }, [callback])\n return useCallback((...args: Args) => callbackRef.current(...args), [])\n}\n","import { withPriority, type Extension, type Priority } from '@prosekit/core'\nimport { useMemo } from 'react'\n\n/**\n * @internal\n */\nexport function usePriorityExtension<T extends Extension = Extension>(\n extension: T | null,\n priority?: Priority | null,\n): T | null {\n return useMemo(() => {\n return extension && priority ? withPriority(extension, priority) : extension\n }, [extension, priority])\n}\n","import type { Editor, Extension, Priority } from '@prosekit/core'\n\nimport { useEditorContext } from '../contexts/editor-context.ts'\n\nimport { useEditorExtension } from './use-editor-extension.ts'\nimport { usePriorityExtension } from './use-priority-extension.ts'\n\nexport interface UseExtensionOptions {\n /**\n * The editor to add the extension to. If not provided, it will use the\n * editor from the nearest `<ProseKit>` component.\n */\n editor?: Editor\n\n /**\n * Optional priority to add the extension with.\n */\n priority?: Priority\n}\n\n/**\n * Add an extension to the editor.\n */\nexport function useExtension(\n /**\n * The extension to add to the editor. If it changes, the previous\n * extension will be removed and the new one (if not null) will be added.\n */\n extension: Extension | null,\n options?: UseExtensionOptions,\n): void {\n const editorContext = useEditorContext()\n useEditorExtension(\n options?.editor || editorContext,\n usePriorityExtension(extension, options?.priority),\n )\n}\n","import { defineDocChangeHandler } from '@prosekit/core'\nimport type { ProseMirrorNode } from '@prosekit/pm/model'\nimport { useMemo } from 'react'\n\nimport { useEventCallback } from './use-event-callback.ts'\nimport { useExtension, type UseExtensionOptions } from './use-extension.ts'\n\n/**\n * Calls the given handler whenever the editor document changes.\n *\n * @public\n */\nexport function useDocChange(\n handler: (doc: ProseMirrorNode) => void,\n options?: UseExtensionOptions,\n): void {\n const memoizedHandler = useEventCallback(handler)\n const extension = useMemo(\n () => defineDocChangeHandler((view) => memoizedHandler(view.state.doc)),\n [memoizedHandler],\n )\n useExtension(extension, options)\n}\n","import { defineMountHandler, defineUpdateHandler, EditorNotFoundError, union, type Editor, type Extension } from '@prosekit/core'\nimport { useMemo, useSyncExternalStore } from 'react'\n\nimport { useEditorContext } from '../contexts/editor-context.ts'\n\nexport interface UseEditorDerivedOptions<E extends Extension = any> {\n /**\n * The editor to add the extension to. If not provided, it will use the\n * editor from the nearest `<ProseKit>` component.\n */\n editor?: Editor<E>\n}\n\n/**\n * Runs a function to derive a value from the editor instance after editor state\n * changes.\n *\n * This is useful when you need to render something based on the editor state,\n * for example, whether the selected text is wrapped in an italic mark.\n *\n * It returns the derived value that updates whenever the editor state changes.\n *\n * @public\n */\nexport function useEditorDerivedValue<E extends Extension, Derived>(\n /**\n * A function that receives the editor instance and returns a derived value.\n *\n * It will be called whenever the editor's document state changes, or when it\n * mounts.\n *\n * This function should be memoized.\n */\n derive: (editor: Editor<E>) => Derived,\n options?: UseEditorDerivedOptions<E>,\n): Derived {\n const editorContext = useEditorContext<E>()\n const editor = options?.editor ?? editorContext\n if (!editor) {\n throw new EditorNotFoundError()\n }\n\n const [subscribe, getSnapshot] = useMemo(() => {\n return createEditorStore(editor, derive)\n }, [editor, derive])\n\n return useSyncExternalStore(subscribe, getSnapshot, getSnapshot)\n}\n\nfunction createEditorStore<Derived, E extends Extension = any>(editor: Editor<E>, derive: (editor: Editor<E>) => Derived) {\n let dirty = true\n let derived: Derived\n\n const subscribe = (onChange: VoidFunction): VoidFunction => {\n const handleChange = () => {\n dirty = true\n onChange()\n }\n const extension = union(\n defineUpdateHandler(handleChange),\n defineMountHandler(handleChange),\n )\n return editor.use(extension)\n }\n\n const getSnapshot = () => {\n if (dirty) {\n dirty = false\n derived = derive(editor)\n }\n return derived\n }\n\n return [subscribe, getSnapshot] as const\n}\n","import { defineMountHandler, defineUpdateHandler, ProseKitError, union, type Editor, type Extension } from '@prosekit/core'\nimport { useEffect, useReducer } from 'react'\n\nimport { useEditorContext } from '../contexts/editor-context.ts'\n\n/**\n * Retrieves the editor instance from the nearest ProseKit component.\n *\n * @public\n */\nexport function useEditor<E extends Extension = any>(options?: {\n /**\n * Whether to update the component when the editor is mounted or editor state\n * is updated.\n *\n * Note this this option doesn't work with [React\n * compiler](https://react.dev/learn/react-compiler) because the returned\n * editor will be the same instance after state updates. If you're using React\n * compiler, you should use {@link useEditorDerivedValue} instead.\n *\n * @default false\n */\n update?: boolean\n}): Editor<E> {\n const update = options?.update ?? false\n\n const editor = useEditorContext<E>()\n if (!editor) {\n throw new ProseKitError(\n 'useEditor must be used within the ProseKit component',\n )\n }\n\n const forceUpdate = useForceUpdate()\n\n useEffect(() => {\n if (update) {\n const extension = union(\n defineMountHandler(forceUpdate),\n defineUpdateHandler(forceUpdate),\n )\n return editor.use(extension)\n }\n }, [editor, update, forceUpdate])\n\n return editor\n}\n\nfunction useForceUpdate() {\n const [, dispatch] = useReducer((x: number) => x + 1, 0)\n return dispatch\n}\n","import { defineKeymap, type Keymap } from '@prosekit/core'\nimport { useMemo } from 'react'\n\nimport { useExtension, type UseExtensionOptions } from './use-extension.ts'\n\nexport function useKeymap(keymap: Keymap, options?: UseExtensionOptions): void {\n const extension = useMemo(() => defineKeymap(keymap), [keymap])\n useExtension(extension, options)\n}\n","import { defineUpdateHandler } from '@prosekit/core'\nimport type { EditorState } from '@prosekit/pm/state'\nimport { useMemo } from 'react'\n\nimport { useEventCallback } from './use-event-callback.ts'\nimport { useExtension, type UseExtensionOptions } from './use-extension.ts'\n\n/**\n * Calls the given handler whenever the editor state changes.\n *\n * @public\n */\nexport function useStateUpdate(\n handler: (state: EditorState) => void,\n options?: UseExtensionOptions,\n): void {\n const memoizedHandler = useEventCallback(handler)\n const extension = useMemo(\n () => defineUpdateHandler((view) => memoizedHandler(view.state)),\n [memoizedHandler],\n )\n useExtension(extension, options)\n}\n"],"mappings":";;;;;;;AAiCA,IAAM,wBAAN,cAAoC,sBAA8C;;;sBACpD;GAC1B,MAAM,gBAAgB,KAAK;AAE3B,UAAO,aACL,cAAc,eAFF,EAAE,GAAG,KAAK,SAAS,CAEI,EACnC,KAAK,KACL,KAAK,IACN;;;;;;;AAOL,SAAgB,2BACd,qBACA,qBACW;AAEX,QAAO,sBAA4C;EACjD,OAAO;EACP,SAHc,0BAA0B,qBAAqB,qBAAqB,sBAAsB;EAIzG,CAAC;;;;;;;AAQJ,SAAgB,oBAAoB,SAA0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,MAAM,SAAS,SAAS,UAAU;CAElC,MAAM,SAAS,kBAAqB;AACpC,KAAI,CAAC,OACH,OAAM,IAAI,cACR,uDACD;CAGH,MAAM,cAAc,gBAAgB;AAEpC,iBAAgB;AACd,MAAI,QAAQ;GACV,MAAM,YAAY,MAChB,mBAAmB,YAAY,EAC/B,oBAAoB,YAAY,CACjC;AACD,UAAO,OAAO,IAAI,UAAU;;IAE7B;EAAC;EAAQ;EAAQ;EAAY,CAAC;AAEjC,QAAO;;AAGT,SAAS,iBAAiB;CACxB,MAAM,GAAG,YAAY,YAAY,MAAc,IAAI,GAAG,EAAE;AACxD,QAAO;;AC7CT,SAAgB,UAAU,QAAgB,SAAqC;AAE7E,cADkB,cAAc,aAAa,OAAO,EAAE,CAAC,OAAO,CAAC,EACvC,QAAQ;;;;;;;ACKlC,SAAgB,eACd,SACA,SACM;CACN,MAAM,kBAAkB,iBAAiB,QAAQ;AAKjD,cAJkB,cACV,qBAAqB,SAAS,gBAAgB,KAAK,MAAM,CAAC,EAChE,CAAC,gBAAgB,CAClB,EACuB,QAAQ"}
|
|
@@ -174,4 +174,4 @@ interface InlinePopoverRootProps {
|
|
|
174
174
|
/** A React component that renders an `prosekit-inline-popover-root` custom element. */
|
|
175
175
|
declare const InlinePopoverRoot: ForwardRefExoticComponent<InlinePopoverRootProps & HTMLAttributes<InlinePopoverRootElement> & RefAttributes<InlinePopoverRootElement>>;
|
|
176
176
|
export { InlinePopoverPopup, type InlinePopoverPopupProps, InlinePopoverPositioner, type InlinePopoverPositionerProps, InlinePopoverRoot, type InlinePopoverRootProps };
|
|
177
|
-
//# sourceMappingURL=
|
|
177
|
+
//# sourceMappingURL=inline-popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-popover.d.ts","names":[],"sources":["../src/components/inline-popover/inline-popover-popup.gen.ts","../src/components/inline-popover/inline-popover-positioner.gen.ts","../src/components/inline-popover/inline-popover-root.gen.ts"],"mappings":";;;UAMiB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AAA;;cAoDZ,iBAAA,EAAmB,yBAAA,CAA0B,sBAAA,GAAyB,cAAA,CAAe,wBAAA,IAA4B,aAAA,CAAc,wBAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-popover.js","names":[],"sources":["../src/components/inline-popover/inline-popover-popup.gen.ts","../src/components/inline-popover/inline-popover-positioner.gen.ts","../src/components/inline-popover/inline-popover-root.gen.ts","../src/components/inline-popover/index.ts"],"sourcesContent":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerInlinePopoverPopupElement, type InlinePopoverPopupElement } from '@prosekit/web/inline-popover';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes } from 'react';\n\n/** Props for the {@link InlinePopoverPopup} React component. */\nexport interface InlinePopoverPopupProps {}\n\nfunction InlinePopoverPopupComponent(props: InlinePopoverPopupProps, forwardedRef: ForwardedRef<InlinePopoverPopupElement>) {\n registerInlinePopoverPopupElement();\n\n const elementRef = useRef<InlinePopoverPopupElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: InlinePopoverPopupElement | 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-inline-popover-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-inline-popover-popup` custom element. */\nexport const InlinePopoverPopup: ForwardRefExoticComponent<InlinePopoverPopupProps & HTMLAttributes<InlinePopoverPopupElement> & RefAttributes<InlinePopoverPopupElement>> = /* @__PURE__ */ forwardRef(InlinePopoverPopupComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerInlinePopoverPositionerElement, type InlinePopoverPositionerElement, type InlinePopoverPositionerProps as InlinePopoverPositionerElementProps } from '@prosekit/web/inline-popover';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/** Props for the {@link InlinePopoverPositioner} React component. */\nexport interface InlinePopoverPositionerProps {\n /**\n * The initial placement of the floating element\n *\n * @default \"top\"\n */\n placement?: InlinePopoverPositionerElementProps['placement'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 12\n */\n offset?: InlinePopoverPositionerElementProps['offset'];\n /**\n * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default true\n */\n hide?: InlinePopoverPositionerElementProps['hide'];\n /**\n * Whether to use the browser [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)\n * to place the floating element on top of other page content.\n *\n * @default false\n */\n hoist?: InlinePopoverPositionerElementProps['hoist'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default true\n */\n overlap?: InlinePopoverPositionerElementProps['overlap'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default true\n */\n inline?: InlinePopoverPositionerElementProps['inline'];\n /**\n * Describes the virtual padding around the boundary to check for overflow.\n *\n * @default 8\n */\n overflowPadding?: InlinePopoverPositionerElementProps['overflowPadding'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: InlinePopoverPositionerElementProps['strategy'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: InlinePopoverPositionerElementProps['autoUpdate'];\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?: InlinePopoverPositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: InlinePopoverPositionerElementProps['shift'];\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?: InlinePopoverPositionerElementProps['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?: InlinePopoverPositionerElementProps['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?: InlinePopoverPositionerElementProps['sameHeight'];\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?: InlinePopoverPositionerElementProps['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?: InlinePopoverPositionerElementProps['rootBoundary'];\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?: InlinePopoverPositionerElementProps['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?: InlinePopoverPositionerElementProps['altBoundary'];\n}\n\nfunction InlinePopoverPositionerComponent(props: InlinePopoverPositionerProps, forwardedRef: ForwardedRef<InlinePopoverPositionerElement>) {\n registerInlinePopoverPositionerElement();\n\n const elementRef = useRef<InlinePopoverPositionerElement>(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: InlinePopoverPositionerElement | 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-inline-popover-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-inline-popover-positioner` custom element. */\nexport const InlinePopoverPositioner: ForwardRefExoticComponent<InlinePopoverPositionerProps & HTMLAttributes<InlinePopoverPositionerElement> & RefAttributes<InlinePopoverPositionerElement>> = /* @__PURE__ */ forwardRef(InlinePopoverPositionerComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerInlinePopoverRootElement, type InlinePopoverRootElement, type InlinePopoverRootProps as InlinePopoverRootElementProps, type InlinePopoverRootEvents } from '@prosekit/web/inline-popover';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link InlinePopoverRoot} React component. */\nexport interface InlinePopoverRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: InlinePopoverRootElementProps['editor'];\n /**\n * Whether the popover is open by default when some inline content is\n * selected.\n *\n * @default true\n */\n defaultOpen?: InlinePopoverRootElementProps['defaultOpen'];\n /**\n * Whether the inline popover should be dismissed when the editor receives an\n * Escape key press.\n *\n * @default true\n */\n dismissOnEscape?: InlinePopoverRootElementProps['dismissOnEscape'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: InlinePopoverRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: InlinePopoverRootElementProps['disabled'];\n /** Emitted when the open state of the popover changes. */\n onOpenChange?: (event: InlinePopoverRootEvents['openChange']) => void;\n}\n\nfunction InlinePopoverRootComponent(props: InlinePopoverRootProps, forwardedRef: ForwardedRef<InlinePopoverRootElement>) {\n registerInlinePopoverRootElement();\n\n const elementRef = useRef<InlinePopoverRootElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const p3Fallback = useEditorContext();\n\n const { defaultOpen: p0, disabled: p1, dismissOnEscape: p2, editor: p3, open: p4, 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, dismissOnEscape: p2, editor: p3 ?? p3Fallback, open: p4 });\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: InlinePopoverRootElement | 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-inline-popover-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-inline-popover-root` custom element. */\nexport const InlinePopoverRoot: ForwardRefExoticComponent<InlinePopoverRootProps & HTMLAttributes<InlinePopoverRootElement> & RefAttributes<InlinePopoverRootElement>> = /* @__PURE__ */ forwardRef(InlinePopoverRootComponent);\n","/**\n\n@module\n\n## Anatomy\n\n```jsx\nimport {\n InlinePopoverPopup,\n InlinePopoverPositioner,\n InlinePopoverRoot,\n} from 'prosekit/react/inline-popover'\n\n<InlinePopoverRoot>\n <InlinePopoverPositioner>\n <InlinePopoverPopup>...</InlinePopoverPopup>\n </InlinePopoverPositioner>\n</InlinePopoverRoot>\n```\n*/\n\n'use client'\n\nexport * from './index.gen.ts'\n"],"mappings":";;;;AAQA,SAAS,4BAA4B,OAAgC,cAAuD;AAC1H,oCAAmC;CAEnC,MAAM,aAAa,OAAkC,KAAK;CAE1D,MAAM,EAAE,GAAG,cAAc;CAEzB,MAAM,YAAY,aACf,YAA8C;AAC7C,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,iCAAiC;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;AAIzH,MAAa,qBAAgL,2BAAW,4BAA4B;ACwGpO,SAAS,iCAAiC,OAAqC,cAA4D;AACzI,yCAAwC;CAExC,MAAM,aAAa,OAAuC,KAAK;CAE/D,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;GAAI,gBAAgB;GAAI,aAAa;GAAI,MAAM;GAAI,MAAM;GAAI,OAAO;GAAI,QAAQ;GAAI,QAAQ;GAAI,iBAAiB;GAAK,SAAS;GAAK,WAAW;GAAK,cAAc;GAAK,YAAY;GAAK,WAAW;GAAK,OAAO;GAAK,UAAU;GAAK,CAAC;GACxS;CAEF,MAAM,YAAY,aACf,YAAmD;AACl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2BAA2B"}
|
|
@@ -244,4 +244,4 @@ interface MenuTriggerProps {
|
|
|
244
244
|
/** A React component that renders an `prosekit-menu-trigger` custom element. */
|
|
245
245
|
declare const MenuTrigger: ForwardRefExoticComponent<MenuTriggerProps & HTMLAttributes<MenuTriggerElement> & RefAttributes<MenuTriggerElement>>;
|
|
246
246
|
export { MenuItem, type MenuItemProps, MenuPopup, type MenuPopupProps, MenuPositioner, type MenuPositionerProps, MenuRoot, type MenuRootProps, MenuSubmenuRoot, type MenuSubmenuRootProps, MenuSubmenuTrigger, type MenuSubmenuTriggerProps, MenuTrigger, type MenuTriggerProps };
|
|
247
|
-
//# sourceMappingURL=
|
|
247
|
+
//# sourceMappingURL=menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.d.ts","names":[],"sources":["../src/components/menu/menu-item.gen.ts","../src/components/menu/menu-popup.gen.ts","../src/components/menu/menu-positioner.gen.ts","../src/components/menu/menu-root.gen.ts","../src/components/menu/menu-submenu-root.gen.ts","../src/components/menu/menu-submenu-trigger.gen.ts","../src/components/menu/menu-trigger.gen.ts"],"mappings":";;;UAMiB,aAAA;EAAa;;;;;EAM5B,KAAA,GAAQ,eAAA;EAcyB;;;;;EARjC,QAAA,GAAW,eAAA;EAMX;;;;;EAAA,aAAA,GAAgB,eAAA;EAE2B;EAA3C,QAAA,IAAY,KAAA,EAAO,cAAA;AAAA;;cAkDR,QAAA,EAAU,yBAAA,CAA0B,aAAA,GAAgB,IAAA,CAAK,cAAA,CAAe,eAAA,iBAAgC,aAAA,CAAc,eAAA;;UCtElH,cAAA;EDAa;;;;;;ECO5B,WAAA,GAAc,gBAAA;AAAA;;cAgCH,SAAA,EAAW,yBAAA,CAA0B,cAAA,GAAiB,cAAA,CAAe,gBAAA,IAAoB,aAAA,CAAc,gBAAA;;UCvCnG,mBAAA;EFAa;;;;;EEM5B,SAAA,GAAY,qBAAA;EFcqB;;;;;EERjC,QAAA,GAAW,qBAAA;EFM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,oBAAA,GAAuB,cAAA,CAAe,sBAAA,IAA0B,aAAA,CAAc,sBAAA;;UCnErH,uBAAA;ELAa;;;;;EKM5B,KAAA,GAAQ,yBAAA;ELcyB;;;;;EKRjC,QAAA,GAAW,yBAAA;AAAA;;cAgCA,kBAAA,EAAoB,yBAAA,CAA0B,uBAAA,GAA0B,cAAA,CAAe,yBAAA,IAA6B,aAAA,CAAc,yBAAA;;UC5C9H,gBAAA;ENAa;;;;;EMM5B,QAAA,GAAW,kBAAA;ENcsB;EMZjC,YAAA,IAAgB,KAAA,EAAO,iBAAA;AAAA;;cAkDZ,WAAA,EAAa,yBAAA,CAA0B,gBAAA,GAAmB,cAAA,CAAe,kBAAA,IAAsB,aAAA,CAAc,kBAAA"}
|
package/dist/menu.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.js","names":[],"sources":["../src/components/menu/menu-item.gen.ts","../src/components/menu/menu-popup.gen.ts","../src/components/menu/menu-positioner.gen.ts","../src/components/menu/menu-root.gen.ts","../src/components/menu/menu-submenu-root.gen.ts","../src/components/menu/menu-submenu-trigger.gen.ts","../src/components/menu/menu-trigger.gen.ts","../src/components/menu/index.ts"],"sourcesContent":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerMenuItemElement, type MenuItemElement, type MenuItemProps as MenuItemElementProps, type MenuItemEvents } from '@prosekit/web/menu';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/** Props for the {@link MenuItem} React component. */\nexport interface MenuItemProps {\n /**\n * The unique value for this menu item.\n *\n * @default \"\"\n */\n value?: MenuItemElementProps['value'];\n /**\n * Whether this menu item is disabled.\n *\n * @default false\n */\n disabled?: MenuItemElementProps['disabled'];\n /**\n * Whether to close the menu when the item is pressed.\n *\n * @default true\n */\n closeOnSelect?: MenuItemElementProps['closeOnSelect'];\n /** Emitted when the the item is selected. */\n onSelect?: (event: MenuItemEvents['select']) => void;\n}\n\nfunction MenuItemComponent(props: MenuItemProps, forwardedRef: ForwardedRef<MenuItemElement>) {\n registerMenuItemElement();\n\n const elementRef = useRef<MenuItemElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const { closeOnSelect: p0, disabled: p1, value: p2, onSelect: e0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { closeOnSelect: p0, disabled: p1, value: p2 });\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 ['select'].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: MenuItemElement | 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-menu-item', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-menu-item` custom element. */\nexport const MenuItem: ForwardRefExoticComponent<MenuItemProps & Omit<HTMLAttributes<MenuItemElement>, 'onSelect'> & RefAttributes<MenuItemElement>> = /* @__PURE__ */ forwardRef(MenuItemComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerMenuPopupElement, type MenuPopupElement, type MenuPopupProps as MenuPopupElementProps } from '@prosekit/web/menu';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/** Props for the {@link MenuPopup} React component. */\nexport interface MenuPopupProps {\n /**\n * By default, the MenuPopup element will listen for keydown events.\n * You can pass a different element to listen for keydown events.\n *\n * @default null\n */\n eventTarget?: MenuPopupElementProps['eventTarget'];\n}\n\nfunction MenuPopupComponent(props: MenuPopupProps, forwardedRef: ForwardedRef<MenuPopupElement>) {\n registerMenuPopupElement();\n\n const elementRef = useRef<MenuPopupElement>(null);\n\n const { eventTarget: p0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { eventTarget: p0 });\n });\n\n const mergedRef = useCallback(\n (element: MenuPopupElement | 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-menu-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-menu-popup` custom element. */\nexport const MenuPopup: ForwardRefExoticComponent<MenuPopupProps & HTMLAttributes<MenuPopupElement> & RefAttributes<MenuPopupElement>> = /* @__PURE__ */ forwardRef(MenuPopupComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerMenuPositionerElement, type MenuPositionerElement, type MenuPositionerProps as MenuPositionerElementProps } from '@prosekit/web/menu';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/** Props for the {@link MenuPositioner} React component. */\nexport interface MenuPositionerProps {\n /**\n * The initial placement of the floating element\n *\n * @default \"bottom-start\"\n */\n placement?: MenuPositionerElementProps['placement'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: MenuPositionerElementProps['strategy'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: MenuPositionerElementProps['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?: MenuPositionerElementProps['hoist'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: MenuPositionerElementProps['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?: MenuPositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['altBoundary'];\n}\n\nfunction MenuPositionerComponent(props: MenuPositionerProps, forwardedRef: ForwardedRef<MenuPositionerElement>) {\n registerMenuPositionerElement();\n\n const elementRef = useRef<MenuPositionerElement>(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: MenuPositionerElement | 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-menu-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-menu-positioner` custom element. */\nexport const MenuPositioner: ForwardRefExoticComponent<MenuPositionerProps & HTMLAttributes<MenuPositionerElement> & RefAttributes<MenuPositionerElement>> = /* @__PURE__ */ forwardRef(MenuPositionerComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerMenuRootElement, type MenuRootElement, type MenuRootProps as MenuRootElementProps, type MenuRootEvents } from '@prosekit/web/menu';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/** Props for the {@link MenuRoot} React component. */\nexport interface MenuRootProps {\n /**\n * Whether the overlay is initially open.\n * @default false\n */\n defaultOpen?: MenuRootElementProps['defaultOpen'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: MenuRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: MenuRootElementProps['disabled'];\n /** Emitted when the menu is opened or closed. */\n onOpenChange?: (event: MenuRootEvents['openChange']) => void;\n}\n\nfunction MenuRootComponent(props: MenuRootProps, forwardedRef: ForwardedRef<MenuRootElement>) {\n registerMenuRootElement();\n\n const elementRef = useRef<MenuRootElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const { defaultOpen: p0, disabled: p1, open: p2, 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, open: p2 });\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: MenuRootElement | 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-menu-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-menu-root` custom element. */\nexport const MenuRoot: ForwardRefExoticComponent<MenuRootProps & HTMLAttributes<MenuRootElement> & RefAttributes<MenuRootElement>> = /* @__PURE__ */ forwardRef(MenuRootComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerMenuSubmenuRootElement, type MenuSubmenuRootElement, type MenuSubmenuRootProps as MenuSubmenuRootElementProps, type MenuSubmenuRootEvents } from '@prosekit/web/menu';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/** Props for the {@link MenuSubmenuRoot} React component. */\nexport interface MenuSubmenuRootProps {\n /**\n * Whether the overlay is initially open.\n * @default false\n */\n defaultOpen?: MenuSubmenuRootElementProps['defaultOpen'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: MenuSubmenuRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: MenuSubmenuRootElementProps['disabled'];\n /** Emitted when the submenu is opened or closed. */\n onOpenChange?: (event: MenuSubmenuRootEvents['openChange']) => void;\n}\n\nfunction MenuSubmenuRootComponent(props: MenuSubmenuRootProps, forwardedRef: ForwardedRef<MenuSubmenuRootElement>) {\n registerMenuSubmenuRootElement();\n\n const elementRef = useRef<MenuSubmenuRootElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const { defaultOpen: p0, disabled: p1, open: p2, 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, open: p2 });\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: MenuSubmenuRootElement | 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-menu-submenu-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-menu-submenu-root` custom element. */\nexport const MenuSubmenuRoot: ForwardRefExoticComponent<MenuSubmenuRootProps & HTMLAttributes<MenuSubmenuRootElement> & RefAttributes<MenuSubmenuRootElement>> = /* @__PURE__ */ forwardRef(MenuSubmenuRootComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerMenuSubmenuTriggerElement, type MenuSubmenuTriggerElement, type MenuSubmenuTriggerProps as MenuSubmenuTriggerElementProps } from '@prosekit/web/menu';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/** Props for the {@link MenuSubmenuTrigger} React component. */\nexport interface MenuSubmenuTriggerProps {\n /**\n * The unique value for this submenu trigger in the parent menu.\n *\n * @default \"\"\n */\n value?: MenuSubmenuTriggerElementProps['value'];\n /**\n * Whether this submenu trigger is disabled.\n *\n * @default false\n */\n disabled?: MenuSubmenuTriggerElementProps['disabled'];\n}\n\nfunction MenuSubmenuTriggerComponent(props: MenuSubmenuTriggerProps, forwardedRef: ForwardedRef<MenuSubmenuTriggerElement>) {\n registerMenuSubmenuTriggerElement();\n\n const elementRef = useRef<MenuSubmenuTriggerElement>(null);\n\n const { disabled: p0, value: p1, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { disabled: p0, value: p1 });\n });\n\n const mergedRef = useCallback(\n (element: MenuSubmenuTriggerElement | 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-menu-submenu-trigger', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-menu-submenu-trigger` custom element. */\nexport const MenuSubmenuTrigger: ForwardRefExoticComponent<MenuSubmenuTriggerProps & HTMLAttributes<MenuSubmenuTriggerElement> & RefAttributes<MenuSubmenuTriggerElement>> = /* @__PURE__ */ forwardRef(MenuSubmenuTriggerComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerMenuTriggerElement, type MenuTriggerElement, type MenuTriggerProps as MenuTriggerElementProps, type MenuTriggerEvents } from '@prosekit/web/menu';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/** Props for the {@link MenuTrigger} React component. */\nexport interface MenuTriggerProps {\n /**\n * Whether the component should ignore user interaction.\n *\n * @default false\n */\n disabled?: MenuTriggerElementProps['disabled'];\n /** Emitted when the menu is opened or closed. */\n onOpenChange?: (event: MenuTriggerEvents['openChange']) => void;\n}\n\nfunction MenuTriggerComponent(props: MenuTriggerProps, forwardedRef: ForwardedRef<MenuTriggerElement>) {\n registerMenuTriggerElement();\n\n const elementRef = useRef<MenuTriggerElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const { disabled: p0, 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, { disabled: p0 });\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: MenuTriggerElement | 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-menu-trigger', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A React component that renders an `prosekit-menu-trigger` custom element. */\nexport const MenuTrigger: ForwardRefExoticComponent<MenuTriggerProps & HTMLAttributes<MenuTriggerElement> & RefAttributes<MenuTriggerElement>> = /* @__PURE__ */ forwardRef(MenuTriggerComponent);\n","/**\n\n@module\n\n## Anatomy\n\n```jsx\nimport {\n MenuItem,\n MenuPopup,\n MenuPositioner,\n MenuRoot,\n MenuSubmenuRoot,\n MenuSubmenuTrigger,\n MenuTrigger,\n} from 'prosekit/react/menu'\n\n<MenuRoot>\n <MenuTrigger>...</MenuTrigger>\n <MenuPositioner>\n <MenuPopup>\n <MenuItem>...</MenuItem>\n <MenuSubmenuRoot>\n <MenuSubmenuTrigger>...</MenuSubmenuTrigger>\n <MenuPositioner>\n <MenuPopup>\n <MenuItem>...</MenuItem>\n </MenuPopup>\n </MenuPositioner>\n </MenuSubmenuRoot>\n </MenuPopup>\n </MenuPositioner>\n</MenuRoot>\n```\n*/\n\n'use client'\n\nexport * from './index.gen.ts'\n"],"mappings":";;;AA6BA,SAAS,kBAAkB,OAAsB,cAA6C;AAC5F,0BAAyB;CAEzB,MAAM,aAAa,OAAwB,KAAK;CAChD,MAAM,cAAc,OAAoD,EAAE,CAAC;CAE3E,MAAM,EAAE,eAAe,IAAI,UAAU,IAAI,OAAO,IAAI,UAAU,IAAI,GAAG,cAAc;AAEnF,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS;GAAE,eAAe;GAAI,UAAU;GAAI,OAAO;GAAI,CAAC;AACtE,cAAY,UAAU,CAAC,GAAG;GAC1B;A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,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;IACtB,EAAE,CAAC;CAEN,MAAM,YAAY,aACf,YAAuC;AACtC,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,yBAAyB;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;AAIjH,MAAa,cAAoJ,2BAAW,qBAAqB"}
|
|
@@ -195,4 +195,4 @@ interface PopoverTriggerProps {
|
|
|
195
195
|
/** A React component that renders an `prosekit-popover-trigger` custom element. */
|
|
196
196
|
declare const PopoverTrigger: ForwardRefExoticComponent<PopoverTriggerProps & HTMLAttributes<PopoverTriggerElement> & RefAttributes<PopoverTriggerElement>>;
|
|
197
197
|
export { PopoverPopup, type PopoverPopupProps, PopoverPositioner, type PopoverPositionerProps, PopoverRoot, type PopoverRootProps, PopoverTrigger, type PopoverTriggerProps };
|
|
198
|
-
//# sourceMappingURL=
|
|
198
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","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"],"mappings":";;;UAMiB,iBAAA;;cAyBJ,YAAA,EAAc,yBAAA,CAA0B,iBAAA,GAAoB,cAAA,CAAe,mBAAA,IAAuB,aAAA,CAAc,mBAAA;;UCzB5G,sBAAA;EDAiB;;;;AAyBlC;ECnBE,QAAA,GAAW,wBAAA;;;;;;EAMX,SAAA,GAAY,wBAAA;EDaa;;;;;;;ECLzB,UAAA,GAAa,wBAAA;EDK8G;;;;ACzB7H;;EA2BE,KAAA,GAAQ,wBAAA;EArBG;;;;;EA2BX,MAAA,GAAS,wBAAA;EAeD;;;;;;;;EANR,IAAA,G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BAAA,IAAyB,aAAA,CAAc,qBAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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","../src/components/popover/index.ts"],"sourcesContent":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link PopoverPopup} React component. */\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/** A React component that renders an `prosekit-popover-popup` custom element. */\nexport const PopoverPopup: ForwardRefExoticComponent<PopoverPopupProps & HTMLAttributes<PopoverPopupElement> & RefAttributes<PopoverPopupElement>> = /* @__PURE__ */ forwardRef(PopoverPopupComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link PopoverPositioner} React component. */\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/** A React component that renders an `prosekit-popover-positioner` custom element. */\nexport const PopoverPositioner: ForwardRefExoticComponent<PopoverPositionerProps & HTMLAttributes<PopoverPositionerElement> & RefAttributes<PopoverPositionerElement>> = /* @__PURE__ */ forwardRef(PopoverPositionerComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link PopoverRoot} React component. */\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/** A React component that renders an `prosekit-popover-root` custom element. */\nexport const PopoverRoot: ForwardRefExoticComponent<PopoverRootProps & HTMLAttributes<PopoverRootElement> & RefAttributes<PopoverRootElement>> = /* @__PURE__ */ forwardRef(PopoverRootComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link PopoverTrigger} React component. */\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/** A React component that renders an `prosekit-popover-trigger` custom element. */\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>\n </PopoverPositioner>\n</PopoverRoot>\n```\n*/\n\n'use client'\n\nexport * from './index.gen.ts'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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;;;AAIpH,MAAa,iBAAgK,2BAAW,wBAAwB"}
|
|
@@ -39,4 +39,4 @@ interface ResizableHandleProps {
|
|
|
39
39
|
/** A React component that renders an `prosekit-resizable-handle` custom element. */
|
|
40
40
|
declare const ResizableHandle: ForwardRefExoticComponent<ResizableHandleProps & HTMLAttributes<ResizableHandleElement> & RefAttributes<ResizableHandleElement>>;
|
|
41
41
|
export { ResizableHandle, type ResizableHandleProps, ResizableRoot, type ResizableRootProps };
|
|
42
|
-
//# sourceMappingURL=
|
|
42
|
+
//# sourceMappingURL=resizable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resizable.d.ts","names":[],"sources":["../src/components/resizable/resizable-root.gen.ts","../src/components/resizable/resizable-handle.gen.ts"],"mappings":";;;UAMiB,kBAAA;EAAkB;;;;;EAMjC,KAAA,GAAQ,oBAAA;EAgBc;;;;;EAVtB,MAAA,GAAS,oBAAA;EAAA;;;;;EAMT,WAAA,GAAc,oBAAA;EAId;EAFA,aAAA,IAAiB,KAAA,EAAO,mBAAA;EAET;EAAf,WAAA,IAAe,KAAA,EAAO,mBAAA;AAAA;AAkDxB;AAAA,cAAa,aAAA,EAAe,yBAAA,CAA0B,kBAAA,GAAqB,cAAA,CAAe,oBAAA,IAAwB,aAAA,CAAc,oBAAA;;UCxE/G,oBAAA;EDAkB;;;;;ECMjC,QAAA,GAAW,sBAAA;AAAA;;cAgCA,eAAA,EAAiB,yBAAA,CAA0B,oBAAA,GAAuB,cAAA,CAAe,sBAAA,IAA0B,aAAA,CAAc,sBAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resizable.js","names":[],"sources":["../src/components/resizable/resizable-root.gen.ts","../src/components/resizable/resizable-handle.gen.ts","../src/components/resizable/index.ts"],"sourcesContent":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link ResizableRoot} React component. */\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/** A React component that renders an `prosekit-resizable-root` custom element. */\nexport const ResizableRoot: ForwardRefExoticComponent<ResizableRootProps & HTMLAttributes<ResizableRootElement> & RefAttributes<ResizableRootElement>> = /* @__PURE__ */ forwardRef(ResizableRootComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link ResizableHandle} React component. */\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/** A React component that renders an `prosekit-resizable-handle` custom element. */\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":";;;AA+BA,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;;;AAInH,MAAa,gBAA4J,2BAAW,uBAAuB;AC/D3M,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;;;AAIrH,MAAa,kBAAoK,2BAAW,yBAAyB"}
|
|
@@ -363,4 +363,4 @@ interface TableHandleRowMenuTriggerProps {
|
|
|
363
363
|
/** A React component that renders an `prosekit-table-handle-row-menu-trigger` custom element. */
|
|
364
364
|
declare const TableHandleRowMenuTrigger: ForwardRefExoticComponent<TableHandleRowMenuTriggerProps & HTMLAttributes<TableHandleRowMenuTriggerElement> & RefAttributes<TableHandleRowMenuTriggerElement>>;
|
|
365
365
|
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 };
|
|
366
|
-
//# sourceMappingURL=
|
|
366
|
+
//# sourceMappingURL=table-handle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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":";;;UAMiB,2BAAA;;cAyBJ,sBAAA,EAAwB,yBAAA,CAA0B,2BAAA,GAA8B,cAAA,CAAe,6BAAA,IAAiC,aAAA,CAAc,6BAAA;;UCvB1I,gCAAA;EDF2B;;;;AAyB5C;ECjBE,SAAA,GAAY,kCAAA;;;;;;EAMZ,QAAA,GAAW,kCAAA;EDWwB;;;;;;;ECHnC,UAAA,GAAa,kCAAA;EDG4I;;;;ACvB3J;;EA2BE,KAAA,GAAQ,kCAAA;EAr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qCT;EMiFE,MAAA,GAAS,+BAAA;AAAA;;cAsDE,wBAAA,EAA0B,yBAAA,CAA0B,6BAAA,GAAgC,cAAA,CAAe,+BAAA,IAAmC,aAAA,CAAc,+BAAA;;UCtLhJ,2BAAA;ETA2B;;;;ESK1C,WAAA,GAAc,6BAAA;EToBwO;;;;ESftP,IAAA,GAAO,6BAAA;ETekJ;;;;ESVzJ,QAAA,GAAW,6BAAA;AAAA;;cAgCA,sBAAA,EAAwB,yBAAA,CAA0B,2BAAA,GAA8B,cAAA,CAAe,6BAAA,IAAiC,aAAA,CAAc,6BAAA;;UC7C1I,8BAAA;EVF2B;;;;EUO1C,MAAA,GAAS,gCAAA;AAAA;;cAkCE,yBAAA,EAA2B,yBAAA,CAA0B,8BAAA,GAAiC,cAAA,CAAe,gCAAA,IAAoC,aAAA,CAAc,gCAAA"}
|
|
@@ -347,4 +347,4 @@ MenuPositioner,
|
|
|
347
347
|
*/
|
|
348
348
|
export { TableHandleColumnMenuRoot, TableHandleColumnMenuTrigger, TableHandleColumnPopup, TableHandleColumnPositioner, TableHandleDragPreview, TableHandleDropIndicator, TableHandleRoot, TableHandleRowMenuRoot, TableHandleRowMenuTrigger, TableHandleRowPopup, TableHandleRowPositioner };
|
|
349
349
|
|
|
350
|
-
//# sourceMappingURL=
|
|
350
|
+
//# sourceMappingURL=table-handle.js.map
|