@prosekit/preact 0.7.0-beta.3 → 0.7.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editor-context.js +0 -2
- package/dist/editor-context.js.map +1 -1
- package/dist/prosekit-preact-autocomplete.d.ts +10 -61
- package/dist/prosekit-preact-autocomplete.d.ts.map +1 -1
- package/dist/prosekit-preact-autocomplete.js +5 -50
- package/dist/prosekit-preact-autocomplete.js.map +1 -1
- package/dist/prosekit-preact-block-handle.d.ts +10 -61
- package/dist/prosekit-preact-block-handle.d.ts.map +1 -1
- package/dist/prosekit-preact-block-handle.js +5 -50
- package/dist/prosekit-preact-block-handle.js.map +1 -1
- package/dist/prosekit-preact-drop-indicator.d.ts +2 -13
- package/dist/prosekit-preact-drop-indicator.d.ts.map +1 -1
- package/dist/prosekit-preact-drop-indicator.js +1 -10
- package/dist/prosekit-preact-drop-indicator.js.map +1 -1
- package/dist/prosekit-preact-inline-popover.d.ts +6 -37
- package/dist/prosekit-preact-inline-popover.d.ts.map +1 -1
- package/dist/prosekit-preact-inline-popover.js +3 -30
- package/dist/prosekit-preact-inline-popover.js.map +1 -1
- package/dist/prosekit-preact-menu.d.ts +48 -88
- package/dist/prosekit-preact-menu.d.ts.map +1 -1
- package/dist/prosekit-preact-menu.js +37 -72
- package/dist/prosekit-preact-menu.js.map +1 -1
- package/dist/prosekit-preact-popover.d.ts +8 -49
- package/dist/prosekit-preact-popover.d.ts.map +1 -1
- package/dist/prosekit-preact-popover.js +4 -40
- package/dist/prosekit-preact-popover.js.map +1 -1
- package/dist/prosekit-preact-resizable.d.ts +4 -25
- package/dist/prosekit-preact-resizable.d.ts.map +1 -1
- package/dist/prosekit-preact-resizable.js +2 -20
- package/dist/prosekit-preact-resizable.js.map +1 -1
- package/dist/prosekit-preact-table-handle.d.ts +22 -133
- package/dist/prosekit-preact-table-handle.d.ts.map +1 -1
- package/dist/prosekit-preact-table-handle.js +11 -110
- package/dist/prosekit-preact-table-handle.js.map +1 -1
- package/dist/prosekit-preact-tooltip.d.ts +8 -49
- package/dist/prosekit-preact-tooltip.d.ts.map +1 -1
- package/dist/prosekit-preact-tooltip.js +4 -40
- package/dist/prosekit-preact-tooltip.js.map +1 -1
- package/dist/prosekit-preact.d.ts +0 -21
- package/dist/prosekit-preact.d.ts.map +1 -1
- package/dist/prosekit-preact.js +0 -26
- package/dist/prosekit-preact.js.map +1 -1
- package/package.json +5 -5
- package/src/components/autocomplete/autocomplete-empty.gen.ts +3 -13
- package/src/components/autocomplete/autocomplete-item.gen.ts +3 -13
- package/src/components/autocomplete/autocomplete-popup.gen.ts +3 -13
- package/src/components/autocomplete/autocomplete-positioner.gen.ts +3 -13
- package/src/components/autocomplete/autocomplete-root.gen.ts +3 -13
- package/src/components/autocomplete/index.gen.ts +1 -3
- package/src/components/block-handle/block-handle-add.gen.ts +3 -13
- package/src/components/block-handle/block-handle-draggable.gen.ts +3 -13
- package/src/components/block-handle/block-handle-popup.gen.ts +3 -13
- package/src/components/block-handle/block-handle-positioner.gen.ts +3 -13
- package/src/components/block-handle/block-handle-root.gen.ts +3 -13
- package/src/components/block-handle/index.gen.ts +1 -3
- package/src/components/drop-indicator/drop-indicator.gen.ts +3 -13
- package/src/components/drop-indicator/index.gen.ts +1 -3
- package/src/components/inline-popover/index.gen.ts +1 -3
- package/src/components/inline-popover/inline-popover-popup.gen.ts +3 -13
- package/src/components/inline-popover/inline-popover-positioner.gen.ts +3 -13
- package/src/components/inline-popover/inline-popover-root.gen.ts +3 -13
- package/src/components/menu/index.gen.ts +1 -3
- package/src/components/menu/menu-item.gen.ts +3 -13
- package/src/components/menu/menu-popup.gen.ts +3 -13
- package/src/components/menu/menu-positioner.gen.ts +3 -13
- package/src/components/menu/menu-root.gen.ts +3 -13
- package/src/components/menu/menu-submenu-root.gen.ts +49 -17
- package/src/components/menu/menu-submenu-trigger.gen.ts +27 -18
- package/src/components/menu/menu-trigger.gen.ts +3 -13
- package/src/components/popover/index.gen.ts +1 -3
- package/src/components/popover/popover-popup.gen.ts +3 -13
- package/src/components/popover/popover-positioner.gen.ts +3 -13
- package/src/components/popover/popover-root.gen.ts +3 -13
- package/src/components/popover/popover-trigger.gen.ts +3 -13
- package/src/components/resizable/index.gen.ts +1 -3
- package/src/components/resizable/resizable-handle.gen.ts +3 -13
- package/src/components/resizable/resizable-root.gen.ts +3 -13
- package/src/components/table-handle/index.gen.ts +1 -3
- package/src/components/table-handle/table-handle-column-menu-root.gen.ts +3 -13
- package/src/components/table-handle/table-handle-column-menu-trigger.gen.ts +3 -13
- package/src/components/table-handle/table-handle-column-popup.gen.ts +3 -13
- package/src/components/table-handle/table-handle-column-positioner.gen.ts +3 -13
- package/src/components/table-handle/table-handle-drag-preview.gen.ts +3 -13
- package/src/components/table-handle/table-handle-drop-indicator.gen.ts +3 -13
- package/src/components/table-handle/table-handle-root.gen.ts +3 -13
- package/src/components/table-handle/table-handle-row-menu-root.gen.ts +3 -13
- package/src/components/table-handle/table-handle-row-menu-trigger.gen.ts +3 -13
- package/src/components/table-handle/table-handle-row-popup.gen.ts +3 -13
- package/src/components/table-handle/table-handle-row-positioner.gen.ts +3 -13
- package/src/components/tooltip/index.gen.ts +1 -3
- package/src/components/tooltip/tooltip-popup.gen.ts +3 -13
- package/src/components/tooltip/tooltip-positioner.gen.ts +3 -13
- package/src/components/tooltip/tooltip-root.gen.ts +3 -13
- package/src/components/tooltip/tooltip-trigger.gen.ts +3 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-preact-table-handle.js","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"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTableHandleColumnPopupElement, type TableHandleColumnPopupElement } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef } from 'preact/hooks';\n\n/**\n * Props for the {@link TableHandleColumnPopup} Preact component.\n *\n * @public\n */\nexport interface TableHandleColumnPopupProps {}\n\nfunction TableHandleColumnPopupComponent(props: TableHandleColumnPopupProps, forwardedRef: Ref<TableHandleColumnPopupElement>) {\n registerTableHandleColumnPopupElement();\n\n const elementRef = useRef<TableHandleColumnPopupElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: TableHandleColumnPopupElement | 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-table-handle-column-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-table-handle-column-popup` custom element.\n *\n * @public\n */\nexport const TableHandleColumnPopup: ForwardRefExoticComponent<TableHandleColumnPopupProps & HTMLAttributes<TableHandleColumnPopupElement> & RefAttributes<TableHandleColumnPopupElement>> = /* @__PURE__ */ forwardRef(TableHandleColumnPopupComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTableHandleColumnPositionerElement, type TableHandleColumnPositionerElement, type TableHandleColumnPositionerProps as TableHandleColumnPositionerElementProps } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link TableHandleColumnPositioner} Preact component.\n *\n * @public\n */\nexport interface TableHandleColumnPositionerProps {\n /**\n * The placement of the popover, relative to the hovered table cell.\n *\n * @default \"top\"\n */\n placement?: TableHandleColumnPositionerElementProps['placement'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: TableHandleColumnPositionerElementProps['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?: TableHandleColumnPositionerElementProps['autoUpdate'];\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?: TableHandleColumnPositionerElementProps['hoist'];\n /**\n * @default 0\n * @hidden\n */\n offset?: TableHandleColumnPositionerElementProps['offset'];\n /**\n * @default false\n * @hidden\n */\n flip?: TableHandleColumnPositionerElementProps['flip'];\n /**\n * @default false\n * @hidden\n */\n shift?: TableHandleColumnPositionerElementProps['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?: TableHandleColumnPositionerElementProps['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?: TableHandleColumnPositionerElementProps['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?: TableHandleColumnPositionerElementProps['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?: TableHandleColumnPositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: TableHandleColumnPositionerElementProps['inline'];\n /**\n * @default true\n * @hidden\n */\n hide?: TableHandleColumnPositionerElementProps['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?: TableHandleColumnPositionerElementProps['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?: TableHandleColumnPositionerElementProps['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?: TableHandleColumnPositionerElementProps['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?: TableHandleColumnPositionerElementProps['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?: TableHandleColumnPositionerElementProps['altBoundary'];\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: TableHandleColumnPositionerElementProps['editor'];\n}\n\nfunction TableHandleColumnPositionerComponent(props: TableHandleColumnPositionerProps, forwardedRef: Ref<TableHandleColumnPositionerElement>) {\n registerTableHandleColumnPositionerElement();\n\n const elementRef = useRef<TableHandleColumnPositionerElement>(null);\n\n const p3Fallback = useEditorContext();\n\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, editor: p3, elementContext: p4, fitViewport: p5, flip: p6, hide: p7, hoist: p8, inline: p9, offset: p10, overflowPadding: p11, overlap: p12, placement: p13, rootBoundary: p14, sameHeight: p15, sameWidth: p16, shift: p17, strategy: p18, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, {\n altBoundary: p0,\n autoUpdate: p1,\n boundary: p2,\n editor: p3 ?? p3Fallback,\n elementContext: p4,\n fitViewport: p5,\n flip: p6,\n hide: p7,\n hoist: p8,\n inline: p9,\n offset: p10,\n overflowPadding: p11,\n overlap: p12,\n placement: p13,\n rootBoundary: p14,\n sameHeight: p15,\n sameWidth: p16,\n shift: p17,\n strategy: p18,\n });\n });\n\n const mergedRef = useCallback(\n (element: TableHandleColumnPositionerElement | 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-table-handle-column-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-table-handle-column-positioner` custom element.\n *\n * @public\n */\nexport const TableHandleColumnPositioner: ForwardRefExoticComponent<TableHandleColumnPositionerProps & HTMLAttributes<TableHandleColumnPositionerElement> & RefAttributes<TableHandleColumnPositionerElement>> = /* @__PURE__ */ forwardRef(TableHandleColumnPositionerComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTableHandleColumnMenuRootElement, type TableHandleColumnMenuRootElement, type TableHandleColumnMenuRootProps as TableHandleColumnMenuRootElementProps } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\n/**\n * Props for the {@link TableHandleColumnMenuRoot} Preact component.\n *\n * @public\n */\nexport interface TableHandleColumnMenuRootProps {\n /**\n * Whether the overlay is initially open.\n * @default false\n */\n defaultOpen?: TableHandleColumnMenuRootElementProps['defaultOpen'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: TableHandleColumnMenuRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: TableHandleColumnMenuRootElementProps['disabled'];\n}\n\nfunction TableHandleColumnMenuRootComponent(props: TableHandleColumnMenuRootProps, forwardedRef: Ref<TableHandleColumnMenuRootElement>) {\n registerTableHandleColumnMenuRootElement();\n\n const elementRef = useRef<TableHandleColumnMenuRootElement>(null);\n\n const { defaultOpen: p0, disabled: p1, open: p2, ...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 });\n\n const mergedRef = useCallback(\n (element: TableHandleColumnMenuRootElement | 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-table-handle-column-menu-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-table-handle-column-menu-root` custom element.\n *\n * @public\n */\nexport const TableHandleColumnMenuRoot: ForwardRefExoticComponent<TableHandleColumnMenuRootProps & HTMLAttributes<TableHandleColumnMenuRootElement> & RefAttributes<TableHandleColumnMenuRootElement>> = /* @__PURE__ */ forwardRef(TableHandleColumnMenuRootComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTableHandleColumnMenuTriggerElement, type TableHandleColumnMenuTriggerElement, type TableHandleColumnMenuTriggerProps as TableHandleColumnMenuTriggerElementProps } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link TableHandleColumnMenuTrigger} Preact component.\n *\n * @public\n */\nexport interface TableHandleColumnMenuTriggerProps {\n /**\n * @default null\n * @hidden\n */\n editor?: TableHandleColumnMenuTriggerElementProps['editor'];\n}\n\nfunction TableHandleColumnMenuTriggerComponent(props: TableHandleColumnMenuTriggerProps, forwardedRef: Ref<TableHandleColumnMenuTriggerElement>) {\n registerTableHandleColumnMenuTriggerElement();\n\n const elementRef = useRef<TableHandleColumnMenuTriggerElement>(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: TableHandleColumnMenuTriggerElement | 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-table-handle-column-menu-trigger', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-table-handle-column-menu-trigger` custom element.\n *\n * @public\n */\nexport const TableHandleColumnMenuTrigger: ForwardRefExoticComponent<TableHandleColumnMenuTriggerProps & HTMLAttributes<TableHandleColumnMenuTriggerElement> & RefAttributes<TableHandleColumnMenuTriggerElement>> = /* @__PURE__ */ forwardRef(TableHandleColumnMenuTriggerComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTableHandleDragPreviewElement, type TableHandleDragPreviewElement, type TableHandleDragPreviewProps as TableHandleDragPreviewElementProps } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link TableHandleDragPreview} Preact component.\n *\n * @public\n */\nexport interface TableHandleDragPreviewProps {\n /**\n * @default null\n * @hidden\n */\n editor?: TableHandleDragPreviewElementProps['editor'];\n}\n\nfunction TableHandleDragPreviewComponent(props: TableHandleDragPreviewProps, forwardedRef: Ref<TableHandleDragPreviewElement>) {\n registerTableHandleDragPreviewElement();\n\n const elementRef = useRef<TableHandleDragPreviewElement>(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: TableHandleDragPreviewElement | 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-table-handle-drag-preview', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-table-handle-drag-preview` custom element.\n *\n * @public\n */\nexport const TableHandleDragPreview: ForwardRefExoticComponent<TableHandleDragPreviewProps & HTMLAttributes<TableHandleDragPreviewElement> & RefAttributes<TableHandleDragPreviewElement>> = /* @__PURE__ */ forwardRef(TableHandleDragPreviewComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTableHandleDropIndicatorElement, type TableHandleDropIndicatorElement, type TableHandleDropIndicatorProps as TableHandleDropIndicatorElementProps } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link TableHandleDropIndicator} Preact component.\n *\n * @public\n */\nexport interface TableHandleDropIndicatorProps {\n /**\n * @default null\n * @hidden\n */\n editor?: TableHandleDropIndicatorElementProps['editor'];\n}\n\nfunction TableHandleDropIndicatorComponent(props: TableHandleDropIndicatorProps, forwardedRef: Ref<TableHandleDropIndicatorElement>) {\n registerTableHandleDropIndicatorElement();\n\n const elementRef = useRef<TableHandleDropIndicatorElement>(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: TableHandleDropIndicatorElement | 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-table-handle-drop-indicator', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-table-handle-drop-indicator` custom element.\n *\n * @public\n */\nexport const TableHandleDropIndicator: ForwardRefExoticComponent<TableHandleDropIndicatorProps & HTMLAttributes<TableHandleDropIndicatorElement> & RefAttributes<TableHandleDropIndicatorElement>> = /* @__PURE__ */ forwardRef(TableHandleDropIndicatorComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTableHandleRootElement, type TableHandleRootElement, type TableHandleRootProps as TableHandleRootElementProps } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link TableHandleRoot} Preact component.\n *\n * @public\n */\nexport interface TableHandleRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: TableHandleRootElementProps['editor'];\n}\n\nfunction TableHandleRootComponent(props: TableHandleRootProps, forwardedRef: Ref<TableHandleRootElement>) {\n registerTableHandleRootElement();\n\n const elementRef = useRef<TableHandleRootElement>(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: TableHandleRootElement | 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-table-handle-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-table-handle-root` custom element.\n *\n * @public\n */\nexport const TableHandleRoot: ForwardRefExoticComponent<TableHandleRootProps & HTMLAttributes<TableHandleRootElement> & RefAttributes<TableHandleRootElement>> = /* @__PURE__ */ forwardRef(TableHandleRootComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTableHandleRowPopupElement, type TableHandleRowPopupElement } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef } from 'preact/hooks';\n\n/**\n * Props for the {@link TableHandleRowPopup} Preact component.\n *\n * @public\n */\nexport interface TableHandleRowPopupProps {}\n\nfunction TableHandleRowPopupComponent(props: TableHandleRowPopupProps, forwardedRef: Ref<TableHandleRowPopupElement>) {\n registerTableHandleRowPopupElement();\n\n const elementRef = useRef<TableHandleRowPopupElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: TableHandleRowPopupElement | 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-table-handle-row-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-table-handle-row-popup` custom element.\n *\n * @public\n */\nexport const TableHandleRowPopup: ForwardRefExoticComponent<TableHandleRowPopupProps & HTMLAttributes<TableHandleRowPopupElement> & RefAttributes<TableHandleRowPopupElement>> = /* @__PURE__ */ forwardRef(TableHandleRowPopupComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTableHandleRowPositionerElement, type TableHandleRowPositionerElement, type TableHandleRowPositionerProps as TableHandleRowPositionerElementProps } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link TableHandleRowPositioner} Preact component.\n *\n * @public\n */\nexport interface TableHandleRowPositionerProps {\n /**\n * The placement of the popover, relative to the hovered table cell.\n *\n * @default \"left\"\n */\n placement?: TableHandleRowPositionerElementProps['placement'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: TableHandleRowPositionerElementProps['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?: TableHandleRowPositionerElementProps['autoUpdate'];\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?: TableHandleRowPositionerElementProps['hoist'];\n /**\n * @default 0\n * @hidden\n */\n offset?: TableHandleRowPositionerElementProps['offset'];\n /**\n * @default false\n * @hidden\n */\n flip?: TableHandleRowPositionerElementProps['flip'];\n /**\n * @default false\n * @hidden\n */\n shift?: TableHandleRowPositionerElementProps['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?: TableHandleRowPositionerElementProps['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?: TableHandleRowPositionerElementProps['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?: TableHandleRowPositionerElementProps['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?: TableHandleRowPositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: TableHandleRowPositionerElementProps['inline'];\n /**\n * @default true\n * @hidden\n */\n hide?: TableHandleRowPositionerElementProps['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?: TableHandleRowPositionerElementProps['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?: TableHandleRowPositionerElementProps['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?: TableHandleRowPositionerElementProps['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?: TableHandleRowPositionerElementProps['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?: TableHandleRowPositionerElementProps['altBoundary'];\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: TableHandleRowPositionerElementProps['editor'];\n}\n\nfunction TableHandleRowPositionerComponent(props: TableHandleRowPositionerProps, forwardedRef: Ref<TableHandleRowPositionerElement>) {\n registerTableHandleRowPositionerElement();\n\n const elementRef = useRef<TableHandleRowPositionerElement>(null);\n\n const p3Fallback = useEditorContext();\n\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, editor: p3, elementContext: p4, fitViewport: p5, flip: p6, hide: p7, hoist: p8, inline: p9, offset: p10, overflowPadding: p11, overlap: p12, placement: p13, rootBoundary: p14, sameHeight: p15, sameWidth: p16, shift: p17, strategy: p18, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, {\n altBoundary: p0,\n autoUpdate: p1,\n boundary: p2,\n editor: p3 ?? p3Fallback,\n elementContext: p4,\n fitViewport: p5,\n flip: p6,\n hide: p7,\n hoist: p8,\n inline: p9,\n offset: p10,\n overflowPadding: p11,\n overlap: p12,\n placement: p13,\n rootBoundary: p14,\n sameHeight: p15,\n sameWidth: p16,\n shift: p17,\n strategy: p18,\n });\n });\n\n const mergedRef = useCallback(\n (element: TableHandleRowPositionerElement | 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-table-handle-row-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-table-handle-row-positioner` custom element.\n *\n * @public\n */\nexport const TableHandleRowPositioner: ForwardRefExoticComponent<TableHandleRowPositionerProps & HTMLAttributes<TableHandleRowPositionerElement> & RefAttributes<TableHandleRowPositionerElement>> = /* @__PURE__ */ forwardRef(TableHandleRowPositionerComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTableHandleRowMenuRootElement, type TableHandleRowMenuRootElement, type TableHandleRowMenuRootProps as TableHandleRowMenuRootElementProps } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\n/**\n * Props for the {@link TableHandleRowMenuRoot} Preact component.\n *\n * @public\n */\nexport interface TableHandleRowMenuRootProps {\n /**\n * Whether the overlay is initially open.\n * @default false\n */\n defaultOpen?: TableHandleRowMenuRootElementProps['defaultOpen'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: TableHandleRowMenuRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: TableHandleRowMenuRootElementProps['disabled'];\n}\n\nfunction TableHandleRowMenuRootComponent(props: TableHandleRowMenuRootProps, forwardedRef: Ref<TableHandleRowMenuRootElement>) {\n registerTableHandleRowMenuRootElement();\n\n const elementRef = useRef<TableHandleRowMenuRootElement>(null);\n\n const { defaultOpen: p0, disabled: p1, open: p2, ...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 });\n\n const mergedRef = useCallback(\n (element: TableHandleRowMenuRootElement | 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-table-handle-row-menu-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-table-handle-row-menu-root` custom element.\n *\n * @public\n */\nexport const TableHandleRowMenuRoot: ForwardRefExoticComponent<TableHandleRowMenuRootProps & HTMLAttributes<TableHandleRowMenuRootElement> & RefAttributes<TableHandleRowMenuRootElement>> = /* @__PURE__ */ forwardRef(TableHandleRowMenuRootComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTableHandleRowMenuTriggerElement, type TableHandleRowMenuTriggerElement, type TableHandleRowMenuTriggerProps as TableHandleRowMenuTriggerElementProps } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link TableHandleRowMenuTrigger} Preact component.\n *\n * @public\n */\nexport interface TableHandleRowMenuTriggerProps {\n /**\n * @default null\n * @hidden\n */\n editor?: TableHandleRowMenuTriggerElementProps['editor'];\n}\n\nfunction TableHandleRowMenuTriggerComponent(props: TableHandleRowMenuTriggerProps, forwardedRef: Ref<TableHandleRowMenuTriggerElement>) {\n registerTableHandleRowMenuTriggerElement();\n\n const elementRef = useRef<TableHandleRowMenuTriggerElement>(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: TableHandleRowMenuTriggerElement | 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-table-handle-row-menu-trigger', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-table-handle-row-menu-trigger` custom element.\n *\n * @public\n */\nexport const TableHandleRowMenuTrigger: ForwardRefExoticComponent<TableHandleRowMenuTriggerProps & HTMLAttributes<TableHandleRowMenuTriggerElement> & RefAttributes<TableHandleRowMenuTriggerElement>> = /* @__PURE__ */ forwardRef(TableHandleRowMenuTriggerComponent);\n"],"mappings":";;;;;;;;;AAgBA,SAAS,gCAAgC,OAAoC,cAAkD;AAC7H,wCAAuC;CAEvC,MAAM,aAAa,OAAsC,KAAK;CAE9D,MAAM,EAAE,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AAS;AACd,SAAO,OAAO,SAAS,EAAE,QAAQ,MAAM,YAAY,CAAC;GACpD;CAEF,MAAM,YAAY,aACf,YAAqD;AACpD,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,0CAA0C;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQlI,MAAa,4BAA4M,2BAAW,mCAAmC"}
|
|
1
|
+
{"version":3,"file":"prosekit-preact-table-handle.js","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"],"sourcesContent":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerTableHandleColumnPopupElement, type TableHandleColumnPopupElement } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef } from 'preact/hooks';\n\n/** Props for the {@link TableHandleColumnPopup} Preact component. */\nexport interface TableHandleColumnPopupProps {}\n\nfunction TableHandleColumnPopupComponent(props: TableHandleColumnPopupProps, forwardedRef: Ref<TableHandleColumnPopupElement>) {\n registerTableHandleColumnPopupElement();\n\n const elementRef = useRef<TableHandleColumnPopupElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: TableHandleColumnPopupElement | 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-table-handle-column-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-table-handle-column-popup` custom element. */\nexport const TableHandleColumnPopup: ForwardRefExoticComponent<TableHandleColumnPopupProps & HTMLAttributes<TableHandleColumnPopupElement> & RefAttributes<TableHandleColumnPopupElement>> = /* @__PURE__ */ forwardRef(TableHandleColumnPopupComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerTableHandleColumnPositionerElement, type TableHandleColumnPositionerElement, type TableHandleColumnPositionerProps as TableHandleColumnPositionerElementProps } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link TableHandleColumnPositioner} Preact component. */\nexport interface TableHandleColumnPositionerProps {\n /**\n * The placement of the popover, relative to the hovered table cell.\n *\n * @default \"top\"\n */\n placement?: TableHandleColumnPositionerElementProps['placement'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: TableHandleColumnPositionerElementProps['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?: TableHandleColumnPositionerElementProps['autoUpdate'];\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?: TableHandleColumnPositionerElementProps['hoist'];\n /**\n * @default 0\n * @hidden\n */\n offset?: TableHandleColumnPositionerElementProps['offset'];\n /**\n * @default false\n * @hidden\n */\n flip?: TableHandleColumnPositionerElementProps['flip'];\n /**\n * @default false\n * @hidden\n */\n shift?: TableHandleColumnPositionerElementProps['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?: TableHandleColumnPositionerElementProps['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?: TableHandleColumnPositionerElementProps['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?: TableHandleColumnPositionerElementProps['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?: TableHandleColumnPositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: TableHandleColumnPositionerElementProps['inline'];\n /**\n * @default true\n * @hidden\n */\n hide?: TableHandleColumnPositionerElementProps['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?: TableHandleColumnPositionerElementProps['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?: TableHandleColumnPositionerElementProps['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?: TableHandleColumnPositionerElementProps['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?: TableHandleColumnPositionerElementProps['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?: TableHandleColumnPositionerElementProps['altBoundary'];\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: TableHandleColumnPositionerElementProps['editor'];\n}\n\nfunction TableHandleColumnPositionerComponent(props: TableHandleColumnPositionerProps, forwardedRef: Ref<TableHandleColumnPositionerElement>) {\n registerTableHandleColumnPositionerElement();\n\n const elementRef = useRef<TableHandleColumnPositionerElement>(null);\n\n const p3Fallback = useEditorContext();\n\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, editor: p3, elementContext: p4, fitViewport: p5, flip: p6, hide: p7, hoist: p8, inline: p9, offset: p10, overflowPadding: p11, overlap: p12, placement: p13, rootBoundary: p14, sameHeight: p15, sameWidth: p16, shift: p17, strategy: p18, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, {\n altBoundary: p0,\n autoUpdate: p1,\n boundary: p2,\n editor: p3 ?? p3Fallback,\n elementContext: p4,\n fitViewport: p5,\n flip: p6,\n hide: p7,\n hoist: p8,\n inline: p9,\n offset: p10,\n overflowPadding: p11,\n overlap: p12,\n placement: p13,\n rootBoundary: p14,\n sameHeight: p15,\n sameWidth: p16,\n shift: p17,\n strategy: p18,\n });\n });\n\n const mergedRef = useCallback(\n (element: TableHandleColumnPositionerElement | 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-table-handle-column-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-table-handle-column-positioner` custom element. */\nexport const TableHandleColumnPositioner: ForwardRefExoticComponent<TableHandleColumnPositionerProps & HTMLAttributes<TableHandleColumnPositionerElement> & RefAttributes<TableHandleColumnPositionerElement>> = /* @__PURE__ */ forwardRef(TableHandleColumnPositionerComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerTableHandleColumnMenuRootElement, type TableHandleColumnMenuRootElement, type TableHandleColumnMenuRootProps as TableHandleColumnMenuRootElementProps } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\n/** Props for the {@link TableHandleColumnMenuRoot} Preact component. */\nexport interface TableHandleColumnMenuRootProps {\n /**\n * Whether the overlay is initially open.\n * @default false\n */\n defaultOpen?: TableHandleColumnMenuRootElementProps['defaultOpen'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: TableHandleColumnMenuRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: TableHandleColumnMenuRootElementProps['disabled'];\n}\n\nfunction TableHandleColumnMenuRootComponent(props: TableHandleColumnMenuRootProps, forwardedRef: Ref<TableHandleColumnMenuRootElement>) {\n registerTableHandleColumnMenuRootElement();\n\n const elementRef = useRef<TableHandleColumnMenuRootElement>(null);\n\n const { defaultOpen: p0, disabled: p1, open: p2, ...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 });\n\n const mergedRef = useCallback(\n (element: TableHandleColumnMenuRootElement | 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-table-handle-column-menu-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-table-handle-column-menu-root` custom element. */\nexport const TableHandleColumnMenuRoot: ForwardRefExoticComponent<TableHandleColumnMenuRootProps & HTMLAttributes<TableHandleColumnMenuRootElement> & RefAttributes<TableHandleColumnMenuRootElement>> = /* @__PURE__ */ forwardRef(TableHandleColumnMenuRootComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerTableHandleColumnMenuTriggerElement, type TableHandleColumnMenuTriggerElement, type TableHandleColumnMenuTriggerProps as TableHandleColumnMenuTriggerElementProps } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link TableHandleColumnMenuTrigger} Preact component. */\nexport interface TableHandleColumnMenuTriggerProps {\n /**\n * @default null\n * @hidden\n */\n editor?: TableHandleColumnMenuTriggerElementProps['editor'];\n}\n\nfunction TableHandleColumnMenuTriggerComponent(props: TableHandleColumnMenuTriggerProps, forwardedRef: Ref<TableHandleColumnMenuTriggerElement>) {\n registerTableHandleColumnMenuTriggerElement();\n\n const elementRef = useRef<TableHandleColumnMenuTriggerElement>(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: TableHandleColumnMenuTriggerElement | 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-table-handle-column-menu-trigger', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-table-handle-column-menu-trigger` custom element. */\nexport const TableHandleColumnMenuTrigger: ForwardRefExoticComponent<TableHandleColumnMenuTriggerProps & HTMLAttributes<TableHandleColumnMenuTriggerElement> & RefAttributes<TableHandleColumnMenuTriggerElement>> = /* @__PURE__ */ forwardRef(TableHandleColumnMenuTriggerComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerTableHandleDragPreviewElement, type TableHandleDragPreviewElement, type TableHandleDragPreviewProps as TableHandleDragPreviewElementProps } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link TableHandleDragPreview} Preact component. */\nexport interface TableHandleDragPreviewProps {\n /**\n * @default null\n * @hidden\n */\n editor?: TableHandleDragPreviewElementProps['editor'];\n}\n\nfunction TableHandleDragPreviewComponent(props: TableHandleDragPreviewProps, forwardedRef: Ref<TableHandleDragPreviewElement>) {\n registerTableHandleDragPreviewElement();\n\n const elementRef = useRef<TableHandleDragPreviewElement>(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: TableHandleDragPreviewElement | 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-table-handle-drag-preview', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-table-handle-drag-preview` custom element. */\nexport const TableHandleDragPreview: ForwardRefExoticComponent<TableHandleDragPreviewProps & HTMLAttributes<TableHandleDragPreviewElement> & RefAttributes<TableHandleDragPreviewElement>> = /* @__PURE__ */ forwardRef(TableHandleDragPreviewComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerTableHandleDropIndicatorElement, type TableHandleDropIndicatorElement, type TableHandleDropIndicatorProps as TableHandleDropIndicatorElementProps } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link TableHandleDropIndicator} Preact component. */\nexport interface TableHandleDropIndicatorProps {\n /**\n * @default null\n * @hidden\n */\n editor?: TableHandleDropIndicatorElementProps['editor'];\n}\n\nfunction TableHandleDropIndicatorComponent(props: TableHandleDropIndicatorProps, forwardedRef: Ref<TableHandleDropIndicatorElement>) {\n registerTableHandleDropIndicatorElement();\n\n const elementRef = useRef<TableHandleDropIndicatorElement>(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: TableHandleDropIndicatorElement | 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-table-handle-drop-indicator', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-table-handle-drop-indicator` custom element. */\nexport const TableHandleDropIndicator: ForwardRefExoticComponent<TableHandleDropIndicatorProps & HTMLAttributes<TableHandleDropIndicatorElement> & RefAttributes<TableHandleDropIndicatorElement>> = /* @__PURE__ */ forwardRef(TableHandleDropIndicatorComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerTableHandleRootElement, type TableHandleRootElement, type TableHandleRootProps as TableHandleRootElementProps } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link TableHandleRoot} Preact component. */\nexport interface TableHandleRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: TableHandleRootElementProps['editor'];\n}\n\nfunction TableHandleRootComponent(props: TableHandleRootProps, forwardedRef: Ref<TableHandleRootElement>) {\n registerTableHandleRootElement();\n\n const elementRef = useRef<TableHandleRootElement>(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: TableHandleRootElement | 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-table-handle-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-table-handle-root` custom element. */\nexport const TableHandleRoot: ForwardRefExoticComponent<TableHandleRootProps & HTMLAttributes<TableHandleRootElement> & RefAttributes<TableHandleRootElement>> = /* @__PURE__ */ forwardRef(TableHandleRootComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerTableHandleRowPopupElement, type TableHandleRowPopupElement } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef } from 'preact/hooks';\n\n/** Props for the {@link TableHandleRowPopup} Preact component. */\nexport interface TableHandleRowPopupProps {}\n\nfunction TableHandleRowPopupComponent(props: TableHandleRowPopupProps, forwardedRef: Ref<TableHandleRowPopupElement>) {\n registerTableHandleRowPopupElement();\n\n const elementRef = useRef<TableHandleRowPopupElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: TableHandleRowPopupElement | 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-table-handle-row-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-table-handle-row-popup` custom element. */\nexport const TableHandleRowPopup: ForwardRefExoticComponent<TableHandleRowPopupProps & HTMLAttributes<TableHandleRowPopupElement> & RefAttributes<TableHandleRowPopupElement>> = /* @__PURE__ */ forwardRef(TableHandleRowPopupComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerTableHandleRowPositionerElement, type TableHandleRowPositionerElement, type TableHandleRowPositionerProps as TableHandleRowPositionerElementProps } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link TableHandleRowPositioner} Preact component. */\nexport interface TableHandleRowPositionerProps {\n /**\n * The placement of the popover, relative to the hovered table cell.\n *\n * @default \"left\"\n */\n placement?: TableHandleRowPositionerElementProps['placement'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: TableHandleRowPositionerElementProps['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?: TableHandleRowPositionerElementProps['autoUpdate'];\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?: TableHandleRowPositionerElementProps['hoist'];\n /**\n * @default 0\n * @hidden\n */\n offset?: TableHandleRowPositionerElementProps['offset'];\n /**\n * @default false\n * @hidden\n */\n flip?: TableHandleRowPositionerElementProps['flip'];\n /**\n * @default false\n * @hidden\n */\n shift?: TableHandleRowPositionerElementProps['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?: TableHandleRowPositionerElementProps['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?: TableHandleRowPositionerElementProps['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?: TableHandleRowPositionerElementProps['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?: TableHandleRowPositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: TableHandleRowPositionerElementProps['inline'];\n /**\n * @default true\n * @hidden\n */\n hide?: TableHandleRowPositionerElementProps['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?: TableHandleRowPositionerElementProps['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?: TableHandleRowPositionerElementProps['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?: TableHandleRowPositionerElementProps['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?: TableHandleRowPositionerElementProps['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?: TableHandleRowPositionerElementProps['altBoundary'];\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: TableHandleRowPositionerElementProps['editor'];\n}\n\nfunction TableHandleRowPositionerComponent(props: TableHandleRowPositionerProps, forwardedRef: Ref<TableHandleRowPositionerElement>) {\n registerTableHandleRowPositionerElement();\n\n const elementRef = useRef<TableHandleRowPositionerElement>(null);\n\n const p3Fallback = useEditorContext();\n\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, editor: p3, elementContext: p4, fitViewport: p5, flip: p6, hide: p7, hoist: p8, inline: p9, offset: p10, overflowPadding: p11, overlap: p12, placement: p13, rootBoundary: p14, sameHeight: p15, sameWidth: p16, shift: p17, strategy: p18, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, {\n altBoundary: p0,\n autoUpdate: p1,\n boundary: p2,\n editor: p3 ?? p3Fallback,\n elementContext: p4,\n fitViewport: p5,\n flip: p6,\n hide: p7,\n hoist: p8,\n inline: p9,\n offset: p10,\n overflowPadding: p11,\n overlap: p12,\n placement: p13,\n rootBoundary: p14,\n sameHeight: p15,\n sameWidth: p16,\n shift: p17,\n strategy: p18,\n });\n });\n\n const mergedRef = useCallback(\n (element: TableHandleRowPositionerElement | 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-table-handle-row-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-table-handle-row-positioner` custom element. */\nexport const TableHandleRowPositioner: ForwardRefExoticComponent<TableHandleRowPositionerProps & HTMLAttributes<TableHandleRowPositionerElement> & RefAttributes<TableHandleRowPositionerElement>> = /* @__PURE__ */ forwardRef(TableHandleRowPositionerComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerTableHandleRowMenuRootElement, type TableHandleRowMenuRootElement, type TableHandleRowMenuRootProps as TableHandleRowMenuRootElementProps } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\n/** Props for the {@link TableHandleRowMenuRoot} Preact component. */\nexport interface TableHandleRowMenuRootProps {\n /**\n * Whether the overlay is initially open.\n * @default false\n */\n defaultOpen?: TableHandleRowMenuRootElementProps['defaultOpen'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: TableHandleRowMenuRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: TableHandleRowMenuRootElementProps['disabled'];\n}\n\nfunction TableHandleRowMenuRootComponent(props: TableHandleRowMenuRootProps, forwardedRef: Ref<TableHandleRowMenuRootElement>) {\n registerTableHandleRowMenuRootElement();\n\n const elementRef = useRef<TableHandleRowMenuRootElement>(null);\n\n const { defaultOpen: p0, disabled: p1, open: p2, ...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 });\n\n const mergedRef = useCallback(\n (element: TableHandleRowMenuRootElement | 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-table-handle-row-menu-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-table-handle-row-menu-root` custom element. */\nexport const TableHandleRowMenuRoot: ForwardRefExoticComponent<TableHandleRowMenuRootProps & HTMLAttributes<TableHandleRowMenuRootElement> & RefAttributes<TableHandleRowMenuRootElement>> = /* @__PURE__ */ forwardRef(TableHandleRowMenuRootComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerTableHandleRowMenuTriggerElement, type TableHandleRowMenuTriggerElement, type TableHandleRowMenuTriggerProps as TableHandleRowMenuTriggerElementProps } from '@prosekit/web/table-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link TableHandleRowMenuTrigger} Preact component. */\nexport interface TableHandleRowMenuTriggerProps {\n /**\n * @default null\n * @hidden\n */\n editor?: TableHandleRowMenuTriggerElementProps['editor'];\n}\n\nfunction TableHandleRowMenuTriggerComponent(props: TableHandleRowMenuTriggerProps, forwardedRef: Ref<TableHandleRowMenuTriggerElement>) {\n registerTableHandleRowMenuTriggerElement();\n\n const elementRef = useRef<TableHandleRowMenuTriggerElement>(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: TableHandleRowMenuTriggerElement | 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-table-handle-row-menu-trigger', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-table-handle-row-menu-trigger` custom element. */\nexport const TableHandleRowMenuTrigger: ForwardRefExoticComponent<TableHandleRowMenuTriggerProps & HTMLAttributes<TableHandleRowMenuTriggerElement> & RefAttributes<TableHandleRowMenuTriggerElement>> = /* @__PURE__ */ forwardRef(TableHandleR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AC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS,EAAE,QAAQ,MAAM,YAAY,CAAC;GACpD;CAEF,MAAM,YAAY,aACf,YAAqD;AACpD,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,0CAA0C;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;AAIlI,MAAa,4BAA4M,2BAAW,mCAAmC"}
|
|
@@ -1,27 +1,11 @@
|
|
|
1
1
|
import { HTMLAttributes } from "preact";
|
|
2
2
|
import { ForwardRefExoticComponent, RefAttributes } from "preact/compat";
|
|
3
3
|
import { TooltipPopupElement, TooltipPositionerElement, TooltipPositionerProps as TooltipPositionerProps$1, TooltipRootElement, TooltipRootEvents, TooltipRootProps as TooltipRootProps$1, TooltipTriggerElement, TooltipTriggerProps as TooltipTriggerProps$1 } from "@prosekit/web/tooltip";
|
|
4
|
-
|
|
5
|
-
//#region src/components/tooltip/tooltip-popup.gen.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* Props for the {@link TooltipPopup} Preact component.
|
|
8
|
-
*
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
4
|
+
/** Props for the {@link TooltipPopup} Preact component. */
|
|
11
5
|
interface TooltipPopupProps {}
|
|
12
|
-
/**
|
|
13
|
-
* A Preact component that renders an `prosekit-tooltip-popup` custom element.
|
|
14
|
-
*
|
|
15
|
-
* @public
|
|
16
|
-
*/
|
|
6
|
+
/** A Preact component that renders an `prosekit-tooltip-popup` custom element. */
|
|
17
7
|
declare const TooltipPopup: ForwardRefExoticComponent<TooltipPopupProps & HTMLAttributes<TooltipPopupElement> & RefAttributes<TooltipPopupElement>>;
|
|
18
|
-
|
|
19
|
-
//#region src/components/tooltip/tooltip-positioner.gen.d.ts
|
|
20
|
-
/**
|
|
21
|
-
* Props for the {@link TooltipPositioner} Preact component.
|
|
22
|
-
*
|
|
23
|
-
* @public
|
|
24
|
-
*/
|
|
8
|
+
/** Props for the {@link TooltipPositioner} Preact component. */
|
|
25
9
|
interface TooltipPositionerProps {
|
|
26
10
|
/**
|
|
27
11
|
* The strategy to use for positioning
|
|
@@ -151,19 +135,9 @@ interface TooltipPositionerProps {
|
|
|
151
135
|
*/
|
|
152
136
|
altBoundary?: TooltipPositionerProps$1['altBoundary'];
|
|
153
137
|
}
|
|
154
|
-
/**
|
|
155
|
-
* A Preact component that renders an `prosekit-tooltip-positioner` custom element.
|
|
156
|
-
*
|
|
157
|
-
* @public
|
|
158
|
-
*/
|
|
138
|
+
/** A Preact component that renders an `prosekit-tooltip-positioner` custom element. */
|
|
159
139
|
declare const TooltipPositioner: ForwardRefExoticComponent<TooltipPositionerProps & HTMLAttributes<TooltipPositionerElement> & RefAttributes<TooltipPositionerElement>>;
|
|
160
|
-
|
|
161
|
-
//#region src/components/tooltip/tooltip-root.gen.d.ts
|
|
162
|
-
/**
|
|
163
|
-
* Props for the {@link TooltipRoot} Preact component.
|
|
164
|
-
*
|
|
165
|
-
* @public
|
|
166
|
-
*/
|
|
140
|
+
/** Props for the {@link TooltipRoot} Preact component. */
|
|
167
141
|
interface TooltipRootProps {
|
|
168
142
|
/**
|
|
169
143
|
* Whether the overlay is initially open.
|
|
@@ -183,19 +157,9 @@ interface TooltipRootProps {
|
|
|
183
157
|
/** Emitted when the tooltip is opened or closed. */
|
|
184
158
|
onOpenChange?: (event: TooltipRootEvents['openChange']) => void;
|
|
185
159
|
}
|
|
186
|
-
/**
|
|
187
|
-
* A Preact component that renders an `prosekit-tooltip-root` custom element.
|
|
188
|
-
*
|
|
189
|
-
* @public
|
|
190
|
-
*/
|
|
160
|
+
/** A Preact component that renders an `prosekit-tooltip-root` custom element. */
|
|
191
161
|
declare const TooltipRoot: ForwardRefExoticComponent<TooltipRootProps & HTMLAttributes<TooltipRootElement> & RefAttributes<TooltipRootElement>>;
|
|
192
|
-
|
|
193
|
-
//#region src/components/tooltip/tooltip-trigger.gen.d.ts
|
|
194
|
-
/**
|
|
195
|
-
* Props for the {@link TooltipTrigger} Preact component.
|
|
196
|
-
*
|
|
197
|
-
* @public
|
|
198
|
-
*/
|
|
162
|
+
/** Props for the {@link TooltipTrigger} Preact component. */
|
|
199
163
|
interface TooltipTriggerProps {
|
|
200
164
|
/**
|
|
201
165
|
* Whether the component should ignore user interaction.
|
|
@@ -213,12 +177,7 @@ interface TooltipTriggerProps {
|
|
|
213
177
|
*/
|
|
214
178
|
closeDelay?: TooltipTriggerProps$1['closeDelay'];
|
|
215
179
|
}
|
|
216
|
-
/**
|
|
217
|
-
* A Preact component that renders an `prosekit-tooltip-trigger` custom element.
|
|
218
|
-
*
|
|
219
|
-
* @public
|
|
220
|
-
*/
|
|
180
|
+
/** A Preact component that renders an `prosekit-tooltip-trigger` custom element. */
|
|
221
181
|
declare const TooltipTrigger: ForwardRefExoticComponent<TooltipTriggerProps & HTMLAttributes<TooltipTriggerElement> & RefAttributes<TooltipTriggerElement>>;
|
|
222
|
-
//#endregion
|
|
223
182
|
export { TooltipPopup, type TooltipPopupProps, TooltipPositioner, type TooltipPositionerProps, TooltipRoot, type TooltipRootProps, TooltipTrigger, type TooltipTriggerProps };
|
|
224
183
|
//# sourceMappingURL=prosekit-preact-tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-preact-tooltip.d.ts","names":[],"sources":["../src/components/tooltip/tooltip-popup.gen.ts","../src/components/tooltip/tooltip-positioner.gen.ts","../src/components/tooltip/tooltip-root.gen.ts","../src/components/tooltip/tooltip-trigger.gen.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"prosekit-preact-tooltip.d.ts","names":[],"sources":["../src/components/tooltip/tooltip-popup.gen.ts","../src/components/tooltip/tooltip-positioner.gen.ts","../src/components/tooltip/tooltip-root.gen.ts","../src/components/tooltip/tooltip-trigger.gen.ts"],"mappings":";;;;UAQiB,iBAAA;;cA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CnEzG,mBAAA;EHAiB;;;;EGKhC,QAAA,GAAW,qBAAA;EHoByL;;;;EGfpM,SAAA,GAAY,qBAAA;EHe+G;;;;EGV3H,UAAA,GAAa,qBAAA;AAAA;;cAgCF,cAAA,EAAgB,yBAAA,CAA0B,mBAAA,GAAsB,cAAA,CAAe,qBAAA,IAAyB,aAAA,CAAc,qBAAA"}
|
|
@@ -2,10 +2,6 @@ import { createElement } from "preact";
|
|
|
2
2
|
import { useCallback, useLayoutEffect, useRef } from "preact/hooks";
|
|
3
3
|
import { forwardRef } from "preact/compat";
|
|
4
4
|
import { registerTooltipPopupElement, registerTooltipPositionerElement, registerTooltipRootElement, registerTooltipTriggerElement } from "@prosekit/web/tooltip";
|
|
5
|
-
//#region src/components/tooltip/tooltip-popup.gen.ts
|
|
6
|
-
/**
|
|
7
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
8
|
-
*/
|
|
9
5
|
function TooltipPopupComponent(props, forwardedRef) {
|
|
10
6
|
registerTooltipPopupElement();
|
|
11
7
|
const elementRef = useRef(null);
|
|
@@ -21,17 +17,8 @@ function TooltipPopupComponent(props, forwardedRef) {
|
|
|
21
17
|
suppressHydrationWarning: true
|
|
22
18
|
});
|
|
23
19
|
}
|
|
24
|
-
/**
|
|
25
|
-
* A Preact component that renders an `prosekit-tooltip-popup` custom element.
|
|
26
|
-
*
|
|
27
|
-
* @public
|
|
28
|
-
*/
|
|
20
|
+
/** A Preact component that renders an `prosekit-tooltip-popup` custom element. */
|
|
29
21
|
const TooltipPopup = /* @__PURE__ */ forwardRef(TooltipPopupComponent);
|
|
30
|
-
//#endregion
|
|
31
|
-
//#region src/components/tooltip/tooltip-positioner.gen.ts
|
|
32
|
-
/**
|
|
33
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
34
|
-
*/
|
|
35
22
|
function TooltipPositionerComponent(props, forwardedRef) {
|
|
36
23
|
registerTooltipPositionerElement();
|
|
37
24
|
const elementRef = useRef(null);
|
|
@@ -71,17 +58,8 @@ function TooltipPositionerComponent(props, forwardedRef) {
|
|
|
71
58
|
suppressHydrationWarning: true
|
|
72
59
|
});
|
|
73
60
|
}
|
|
74
|
-
/**
|
|
75
|
-
* A Preact component that renders an `prosekit-tooltip-positioner` custom element.
|
|
76
|
-
*
|
|
77
|
-
* @public
|
|
78
|
-
*/
|
|
61
|
+
/** A Preact component that renders an `prosekit-tooltip-positioner` custom element. */
|
|
79
62
|
const TooltipPositioner = /* @__PURE__ */ forwardRef(TooltipPositionerComponent);
|
|
80
|
-
//#endregion
|
|
81
|
-
//#region src/components/tooltip/tooltip-root.gen.ts
|
|
82
|
-
/**
|
|
83
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
84
|
-
*/
|
|
85
63
|
function TooltipRootComponent(props, forwardedRef) {
|
|
86
64
|
registerTooltipRootElement();
|
|
87
65
|
const elementRef = useRef(null);
|
|
@@ -117,17 +95,8 @@ function TooltipRootComponent(props, forwardedRef) {
|
|
|
117
95
|
suppressHydrationWarning: true
|
|
118
96
|
});
|
|
119
97
|
}
|
|
120
|
-
/**
|
|
121
|
-
* A Preact component that renders an `prosekit-tooltip-root` custom element.
|
|
122
|
-
*
|
|
123
|
-
* @public
|
|
124
|
-
*/
|
|
98
|
+
/** A Preact component that renders an `prosekit-tooltip-root` custom element. */
|
|
125
99
|
const TooltipRoot = /* @__PURE__ */ forwardRef(TooltipRootComponent);
|
|
126
|
-
//#endregion
|
|
127
|
-
//#region src/components/tooltip/tooltip-trigger.gen.ts
|
|
128
|
-
/**
|
|
129
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
130
|
-
*/
|
|
131
100
|
function TooltipTriggerComponent(props, forwardedRef) {
|
|
132
101
|
registerTooltipTriggerElement();
|
|
133
102
|
const elementRef = useRef(null);
|
|
@@ -152,13 +121,8 @@ function TooltipTriggerComponent(props, forwardedRef) {
|
|
|
152
121
|
suppressHydrationWarning: true
|
|
153
122
|
});
|
|
154
123
|
}
|
|
155
|
-
/**
|
|
156
|
-
* A Preact component that renders an `prosekit-tooltip-trigger` custom element.
|
|
157
|
-
*
|
|
158
|
-
* @public
|
|
159
|
-
*/
|
|
124
|
+
/** A Preact component that renders an `prosekit-tooltip-trigger` custom element. */
|
|
160
125
|
const TooltipTrigger = /* @__PURE__ */ forwardRef(TooltipTriggerComponent);
|
|
161
|
-
//#endregion
|
|
162
126
|
export { TooltipPopup, TooltipPositioner, TooltipRoot, TooltipTrigger };
|
|
163
127
|
|
|
164
128
|
//# sourceMappingURL=prosekit-preact-tooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-preact-tooltip.js","names":[],"sources":["../src/components/tooltip/tooltip-popup.gen.ts","../src/components/tooltip/tooltip-positioner.gen.ts","../src/components/tooltip/tooltip-root.gen.ts","../src/components/tooltip/tooltip-trigger.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTooltipPopupElement, type TooltipPopupElement } from '@prosekit/web/tooltip';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef } from 'preact/hooks';\n\n/**\n * Props for the {@link TooltipPopup} Preact component.\n *\n * @public\n */\nexport interface TooltipPopupProps {}\n\nfunction TooltipPopupComponent(props: TooltipPopupProps, forwardedRef: Ref<TooltipPopupElement>) {\n registerTooltipPopupElement();\n\n const elementRef = useRef<TooltipPopupElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: TooltipPopupElement | 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-tooltip-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-tooltip-popup` custom element.\n *\n * @public\n */\nexport const TooltipPopup: ForwardRefExoticComponent<TooltipPopupProps & HTMLAttributes<TooltipPopupElement> & RefAttributes<TooltipPopupElement>> = /* @__PURE__ */ forwardRef(TooltipPopupComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTooltipPositionerElement, type TooltipPositionerElement, type TooltipPositionerProps as TooltipPositionerElementProps } from '@prosekit/web/tooltip';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\n/**\n * Props for the {@link TooltipPositioner} Preact component.\n *\n * @public\n */\nexport interface TooltipPositionerProps {\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: TooltipPositionerElementProps['strategy'];\n /**\n * The initial placement of the floating element\n *\n * @default \"top\"\n */\n placement?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['hoist'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['altBoundary'];\n}\n\nfunction TooltipPositionerComponent(props: TooltipPositionerProps, forwardedRef: Ref<TooltipPositionerElement>) {\n registerTooltipPositionerElement();\n\n const elementRef = useRef<TooltipPositionerElement>(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: TooltipPositionerElement | 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-tooltip-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-tooltip-positioner` custom element.\n *\n * @public\n */\nexport const TooltipPositioner: ForwardRefExoticComponent<TooltipPositionerProps & HTMLAttributes<TooltipPositionerElement> & RefAttributes<TooltipPositionerElement>> = /* @__PURE__ */ forwardRef(TooltipPositionerComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTooltipRootElement, type TooltipRootElement, type TooltipRootProps as TooltipRootElementProps, type TooltipRootEvents } from '@prosekit/web/tooltip';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\n/**\n * Props for the {@link TooltipRoot} Preact component.\n *\n * @public\n */\nexport interface TooltipRootProps {\n /**\n * Whether the overlay is initially open.\n * @default false\n */\n defaultOpen?: TooltipRootElementProps['defaultOpen'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: TooltipRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: TooltipRootElementProps['disabled'];\n /** Emitted when the tooltip is opened or closed. */\n onOpenChange?: (event: TooltipRootEvents['openChange']) => void;\n}\n\nfunction TooltipRootComponent(props: TooltipRootProps, forwardedRef: Ref<TooltipRootElement>) {\n registerTooltipRootElement();\n\n const elementRef = useRef<TooltipRootElement>(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: TooltipRootElement | 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-tooltip-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-tooltip-root` custom element.\n *\n * @public\n */\nexport const TooltipRoot: ForwardRefExoticComponent<TooltipRootProps & HTMLAttributes<TooltipRootElement> & RefAttributes<TooltipRootElement>> = /* @__PURE__ */ forwardRef(TooltipRootComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTooltipTriggerElement, type TooltipTriggerElement, type TooltipTriggerProps as TooltipTriggerElementProps } from '@prosekit/web/tooltip';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\n/**\n * Props for the {@link TooltipTrigger} Preact component.\n *\n * @public\n */\nexport interface TooltipTriggerProps {\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: TooltipTriggerElementProps['disabled'];\n /**\n * The delay in milliseconds before opening the tooltip on hover.\n * @default 600\n */\n openDelay?: TooltipTriggerElementProps['openDelay'];\n /**\n * The delay in milliseconds before closing the tooltip when hover/focus ends.\n * @default 0\n */\n closeDelay?: TooltipTriggerElementProps['closeDelay'];\n}\n\nfunction TooltipTriggerComponent(props: TooltipTriggerProps, forwardedRef: Ref<TooltipTriggerElement>) {\n registerTooltipTriggerElement();\n\n const elementRef = useRef<TooltipTriggerElement>(null);\n\n const { closeDelay: p0, disabled: p1, openDelay: p2, ...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, disabled: p1, openDelay: p2 });\n });\n\n const mergedRef = useCallback(\n (element: TooltipTriggerElement | 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-tooltip-trigger', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-tooltip-trigger` custom element.\n *\n * @public\n */\nexport const TooltipTrigger: ForwardRefExoticComponent<TooltipTriggerProps & HTMLAttributes<TooltipTriggerElement> & RefAttributes<TooltipTriggerElement>> = /* @__PURE__ */ forwardRef(TooltipTriggerComponent);\n"],"mappings":";;;;;;;;AAgBA,SAAS,sBAAsB,OAA0B,cAAwC;AAC/F,8BAA6B;CAE7B,MAAM,aAAa,OAA4B,KAAK;CAEpD,MAAM,EAAE,GAAG,cAAc;CAEzB,MAAM,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C,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,4BAA4B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQpH,MAAa,iBAAgK,2BAAW,wBAAwB"}
|
|
1
|
+
{"version":3,"file":"prosekit-preact-tooltip.js","names":[],"sources":["../src/components/tooltip/tooltip-popup.gen.ts","../src/components/tooltip/tooltip-positioner.gen.ts","../src/components/tooltip/tooltip-root.gen.ts","../src/components/tooltip/tooltip-trigger.gen.ts"],"sourcesContent":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerTooltipPopupElement, type TooltipPopupElement } from '@prosekit/web/tooltip';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef } from 'preact/hooks';\n\n/** Props for the {@link TooltipPopup} Preact component. */\nexport interface TooltipPopupProps {}\n\nfunction TooltipPopupComponent(props: TooltipPopupProps, forwardedRef: Ref<TooltipPopupElement>) {\n registerTooltipPopupElement();\n\n const elementRef = useRef<TooltipPopupElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: TooltipPopupElement | 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-tooltip-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-tooltip-popup` custom element. */\nexport const TooltipPopup: ForwardRefExoticComponent<TooltipPopupProps & HTMLAttributes<TooltipPopupElement> & RefAttributes<TooltipPopupElement>> = /* @__PURE__ */ forwardRef(TooltipPopupComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerTooltipPositionerElement, type TooltipPositionerElement, type TooltipPositionerProps as TooltipPositionerElementProps } from '@prosekit/web/tooltip';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\n/** Props for the {@link TooltipPositioner} Preact component. */\nexport interface TooltipPositionerProps {\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: TooltipPositionerElementProps['strategy'];\n /**\n * The initial placement of the floating element\n *\n * @default \"top\"\n */\n placement?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['hoist'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['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?: TooltipPositionerElementProps['altBoundary'];\n}\n\nfunction TooltipPositionerComponent(props: TooltipPositionerProps, forwardedRef: Ref<TooltipPositionerElement>) {\n registerTooltipPositionerElement();\n\n const elementRef = useRef<TooltipPositionerElement>(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: TooltipPositionerElement | 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-tooltip-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-tooltip-positioner` custom element. */\nexport const TooltipPositioner: ForwardRefExoticComponent<TooltipPositionerProps & HTMLAttributes<TooltipPositionerElement> & RefAttributes<TooltipPositionerElement>> = /* @__PURE__ */ forwardRef(TooltipPositionerComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerTooltipRootElement, type TooltipRootElement, type TooltipRootProps as TooltipRootElementProps, type TooltipRootEvents } from '@prosekit/web/tooltip';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\n/** Props for the {@link TooltipRoot} Preact component. */\nexport interface TooltipRootProps {\n /**\n * Whether the overlay is initially open.\n * @default false\n */\n defaultOpen?: TooltipRootElementProps['defaultOpen'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: TooltipRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: TooltipRootElementProps['disabled'];\n /** Emitted when the tooltip is opened or closed. */\n onOpenChange?: (event: TooltipRootEvents['openChange']) => void;\n}\n\nfunction TooltipRootComponent(props: TooltipRootProps, forwardedRef: Ref<TooltipRootElement>) {\n registerTooltipRootElement();\n\n const elementRef = useRef<TooltipRootElement>(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: TooltipRootElement | 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-tooltip-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-tooltip-root` custom element. */\nexport const TooltipRoot: ForwardRefExoticComponent<TooltipRootProps & HTMLAttributes<TooltipRootElement> & RefAttributes<TooltipRootElement>> = /* @__PURE__ */ forwardRef(TooltipRootComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerTooltipTriggerElement, type TooltipTriggerElement, type TooltipTriggerProps as TooltipTriggerElementProps } from '@prosekit/web/tooltip';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\n/** Props for the {@link TooltipTrigger} Preact component. */\nexport interface TooltipTriggerProps {\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: TooltipTriggerElementProps['disabled'];\n /**\n * The delay in milliseconds before opening the tooltip on hover.\n * @default 600\n */\n openDelay?: TooltipTriggerElementProps['openDelay'];\n /**\n * The delay in milliseconds before closing the tooltip when hover/focus ends.\n * @default 0\n */\n closeDelay?: TooltipTriggerElementProps['closeDelay'];\n}\n\nfunction TooltipTriggerComponent(props: TooltipTriggerProps, forwardedRef: Ref<TooltipTriggerElement>) {\n registerTooltipTriggerElement();\n\n const elementRef = useRef<TooltipTriggerElement>(null);\n\n const { closeDelay: p0, disabled: p1, openDelay: p2, ...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, disabled: p1, openDelay: p2 });\n });\n\n const mergedRef = useCallback(\n (element: TooltipTriggerElement | 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-tooltip-trigger', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-tooltip-trigger` custom element. */\nexport const TooltipTrigger: ForwardRefExoticComponent<TooltipTriggerProps & HTMLAttributes<TooltipTriggerElement> & RefAttributes<TooltipTriggerElement>> = /* @__PURE__ */ forwardRef(TooltipTriggerComponent);\n"],"mappings":";;;;AAUA,SAAS,sBAAsB,OAA0B,cAAwC;AAC/F,8BAA6B;CAE7B,MAAM,aAAa,OAA4B,KAAK;CAEpD,MAAM,EAAE,GAAG,cAAc;CAEzB,MAAM,YAAY,aACf,YAAwC;AACvC,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,0BAA0B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;AAIlH,MAAa,eAAwJ,2BAAW,sBAAsB;ACyGtM,SAAS,2BAA2B,OAA+B,cAA6C;AAC9G,mCAAkC;CAElC,MAAM,aAAa,OAAiC,KAAK;CAEzD,MAAM,EAAE,aAAa,IAAI,YAAY,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,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,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;ACjDjM,SAAS,wBAAwB,OAA4B,cAA0C;AACrG,gCAA+B;CAE/B,MAAM,aAAa,OAA8B,KAAK;CAEtD,MAAM,EAAE,YAAY,IAAI,UAAU,IAAI,WAAW,IAAI,GAAG,cAAc;AAEtE,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS;GAAE,YAAY;GAAI,UAAU;GAAI,WAAW;GAAI,CAAC;GACvE;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,4BAA4B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;AAIpH,MAAa,iBAAgK,2BAAW,wBAAwB"}
|
|
@@ -4,8 +4,6 @@ import { MarkViewContext, NodeViewContext } from "@prosemirror-adapter/preact";
|
|
|
4
4
|
import { CoreMarkViewUserOptions, CoreNodeViewUserOptions } from "@prosemirror-adapter/core";
|
|
5
5
|
import { ProseMirrorNode } from "@prosekit/pm/model";
|
|
6
6
|
import { EditorState } from "@prosekit/pm/state";
|
|
7
|
-
|
|
8
|
-
//#region src/components/prosekit.d.ts
|
|
9
7
|
interface ProseKitProps {
|
|
10
8
|
editor: Editor;
|
|
11
9
|
children?: ComponentChildren;
|
|
@@ -16,8 +14,6 @@ interface ProseKitProps {
|
|
|
16
14
|
* @public
|
|
17
15
|
*/
|
|
18
16
|
declare const ProseKit: ComponentType<ProseKitProps>;
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region src/extensions/preact-mark-view.d.ts
|
|
21
17
|
/**
|
|
22
18
|
* @public
|
|
23
19
|
*/
|
|
@@ -43,8 +39,6 @@ interface PreactMarkViewOptions extends CoreMarkViewUserOptions<PreactMarkViewCo
|
|
|
43
39
|
* @public
|
|
44
40
|
*/
|
|
45
41
|
declare function definePreactMarkView(options: PreactMarkViewOptions): Extension;
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region src/extensions/preact-node-view.d.ts
|
|
48
42
|
/**
|
|
49
43
|
* @public
|
|
50
44
|
*/
|
|
@@ -70,8 +64,6 @@ interface PreactNodeViewOptions extends CoreNodeViewUserOptions<PreactNodeViewCo
|
|
|
70
64
|
* @public
|
|
71
65
|
*/
|
|
72
66
|
declare function definePreactNodeView(options: PreactNodeViewOptions): Extension;
|
|
73
|
-
//#endregion
|
|
74
|
-
//#region src/hooks/use-extension.d.ts
|
|
75
67
|
interface UseExtensionOptions {
|
|
76
68
|
/**
|
|
77
69
|
* The editor to add the extension to. If not provided, it will use the
|
|
@@ -93,16 +85,12 @@ declare function useExtension(
|
|
|
93
85
|
*/
|
|
94
86
|
|
|
95
87
|
extension: Extension | null, options?: UseExtensionOptions): void;
|
|
96
|
-
//#endregion
|
|
97
|
-
//#region src/hooks/use-doc-change.d.ts
|
|
98
88
|
/**
|
|
99
89
|
* Calls the given handler whenever the editor document changes.
|
|
100
90
|
*
|
|
101
91
|
* @public
|
|
102
92
|
*/
|
|
103
93
|
declare function useDocChange(handler: (doc: ProseMirrorNode) => void, options?: UseExtensionOptions): void;
|
|
104
|
-
//#endregion
|
|
105
|
-
//#region src/hooks/use-editor-derived-value.d.ts
|
|
106
94
|
interface UseEditorDerivedOptions<E extends Extension = any> {
|
|
107
95
|
/**
|
|
108
96
|
* The editor to add the extension to. If not provided, it will use the
|
|
@@ -132,8 +120,6 @@ declare function useEditorDerivedValue<E extends Extension, Derived>(
|
|
|
132
120
|
*/
|
|
133
121
|
|
|
134
122
|
derive: (editor: Editor<E>) => Derived, options?: UseEditorDerivedOptions<E>): Derived;
|
|
135
|
-
//#endregion
|
|
136
|
-
//#region src/hooks/use-editor.d.ts
|
|
137
123
|
/**
|
|
138
124
|
* Retrieves the editor instance from the nearest ProseKit component.
|
|
139
125
|
*
|
|
@@ -148,19 +134,13 @@ declare function useEditor<E extends Extension = any>(options?: {
|
|
|
148
134
|
*/
|
|
149
135
|
update?: boolean;
|
|
150
136
|
}): Editor<E>;
|
|
151
|
-
//#endregion
|
|
152
|
-
//#region src/hooks/use-keymap.d.ts
|
|
153
137
|
declare function useKeymap(keymap: Keymap, options?: UseExtensionOptions): void;
|
|
154
|
-
//#endregion
|
|
155
|
-
//#region src/hooks/use-state-update.d.ts
|
|
156
138
|
/**
|
|
157
139
|
* Calls the given handler whenever the editor state changes.
|
|
158
140
|
*
|
|
159
141
|
* @public
|
|
160
142
|
*/
|
|
161
143
|
declare function useStateUpdate(handler: (state: EditorState) => void, options?: UseExtensionOptions): void;
|
|
162
|
-
//#endregion
|
|
163
|
-
//#region src/types.d.ts
|
|
164
144
|
/**
|
|
165
145
|
* @internal
|
|
166
146
|
*/
|
|
@@ -174,6 +154,5 @@ type PropsWithClass<P = unknown> = P & {
|
|
|
174
154
|
type PropsWithChildren<P = unknown> = P & {
|
|
175
155
|
children?: ComponentChildren | undefined;
|
|
176
156
|
};
|
|
177
|
-
//#endregion
|
|
178
157
|
export { type PreactMarkViewComponent, type PreactMarkViewOptions, type PreactMarkViewProps, type PreactNodeViewComponent, type PreactNodeViewOptions, type PreactNodeViewProps, type PropsWithChildren, type PropsWithClass, ProseKit, type ProseKitProps, type UseEditorDerivedOptions, type UseExtensionOptions, definePreactMarkView, definePreactNodeView, useDocChange, useEditor, useEditorDerivedValue, useExtension, useKeymap, useStateUpdate };
|
|
179
158
|
//# sourceMappingURL=prosekit-preact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-preact.d.ts","names":[],"sources":["../src/components/prosekit.ts","../src/extensions/preact-mark-view.ts","../src/extensions/preact-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":"
|
|
1
|
+
{"version":3,"file":"prosekit-preact.d.ts","names":[],"sources":["../src/components/prosekit.ts","../src/extensions/preact-mark-view.ts","../src/extensions/preact-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,iBAAA;AAAA;;AAFb;;;;cAUa,QAAA,EAAU,aAAA,CAAc,aAAA;;;;UCHpB,mBAAA,SAA4B,eAAA;;;;KAKjC,uBAAA,GAA0B,aAAA,CAAc,mBAAA;;;;;ADFpD;UCSiB,qBAAA,SAA8B,uBAAA,CAAwB,uBAAA;;;;EAIrE,IAAA;AAAA;AAXF;;;;;AAAA,iBA4CgB,oBAAA,CAAqB,OAAA,EAAS,qBAAA,GAAwB,SAAA;;;;UCjDrD,mBAAA,SAA4B,eAAA;;;;KAKjC,uBAAA,GAA0B,aAAA,CAAc,mBAAA;;;;;AFFpD;UESiB,qBAAA,SAA8B,uBAAA,CAAwB,uBAAA;;;;EAIrE,IAAA;AAAA;ADXF;;;;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