@prosekit/preact 0.7.0-beta.2 → 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.
Files changed (94) hide show
  1. package/dist/editor-context.js +0 -2
  2. package/dist/editor-context.js.map +1 -1
  3. package/dist/prosekit-preact-autocomplete.d.ts +22 -73
  4. package/dist/prosekit-preact-autocomplete.d.ts.map +1 -1
  5. package/dist/prosekit-preact-autocomplete.js +7 -52
  6. package/dist/prosekit-preact-autocomplete.js.map +1 -1
  7. package/dist/prosekit-preact-block-handle.d.ts +22 -73
  8. package/dist/prosekit-preact-block-handle.d.ts.map +1 -1
  9. package/dist/prosekit-preact-block-handle.js +7 -52
  10. package/dist/prosekit-preact-block-handle.js.map +1 -1
  11. package/dist/prosekit-preact-drop-indicator.d.ts +4 -15
  12. package/dist/prosekit-preact-drop-indicator.d.ts.map +1 -1
  13. package/dist/prosekit-preact-drop-indicator.js +1 -10
  14. package/dist/prosekit-preact-drop-indicator.js.map +1 -1
  15. package/dist/prosekit-preact-inline-popover.d.ts +15 -46
  16. package/dist/prosekit-preact-inline-popover.d.ts.map +1 -1
  17. package/dist/prosekit-preact-inline-popover.js +5 -32
  18. package/dist/prosekit-preact-inline-popover.js.map +1 -1
  19. package/dist/prosekit-preact-menu.d.ts +61 -101
  20. package/dist/prosekit-preact-menu.d.ts.map +1 -1
  21. package/dist/prosekit-preact-menu.js +39 -74
  22. package/dist/prosekit-preact-menu.js.map +1 -1
  23. package/dist/prosekit-preact-popover.d.ts +18 -59
  24. package/dist/prosekit-preact-popover.d.ts.map +1 -1
  25. package/dist/prosekit-preact-popover.js +6 -42
  26. package/dist/prosekit-preact-popover.js.map +1 -1
  27. package/dist/prosekit-preact-resizable.d.ts +10 -31
  28. package/dist/prosekit-preact-resizable.d.ts.map +1 -1
  29. package/dist/prosekit-preact-resizable.js +4 -22
  30. package/dist/prosekit-preact-resizable.js.map +1 -1
  31. package/dist/prosekit-preact-table-handle.d.ts +44 -155
  32. package/dist/prosekit-preact-table-handle.d.ts.map +1 -1
  33. package/dist/prosekit-preact-table-handle.js +11 -110
  34. package/dist/prosekit-preact-table-handle.js.map +1 -1
  35. package/dist/prosekit-preact-tooltip.d.ts +18 -59
  36. package/dist/prosekit-preact-tooltip.d.ts.map +1 -1
  37. package/dist/prosekit-preact-tooltip.js +6 -42
  38. package/dist/prosekit-preact-tooltip.js.map +1 -1
  39. package/dist/prosekit-preact.d.ts +0 -21
  40. package/dist/prosekit-preact.d.ts.map +1 -1
  41. package/dist/prosekit-preact.js +0 -26
  42. package/dist/prosekit-preact.js.map +1 -1
  43. package/package.json +5 -5
  44. package/src/components/autocomplete/autocomplete-empty.gen.ts +5 -15
  45. package/src/components/autocomplete/autocomplete-item.gen.ts +5 -17
  46. package/src/components/autocomplete/autocomplete-popup.gen.ts +5 -17
  47. package/src/components/autocomplete/autocomplete-positioner.gen.ts +5 -15
  48. package/src/components/autocomplete/autocomplete-root.gen.ts +5 -17
  49. package/src/components/autocomplete/index.gen.ts +4 -8
  50. package/src/components/block-handle/block-handle-add.gen.ts +5 -15
  51. package/src/components/block-handle/block-handle-draggable.gen.ts +5 -15
  52. package/src/components/block-handle/block-handle-popup.gen.ts +5 -15
  53. package/src/components/block-handle/block-handle-positioner.gen.ts +5 -15
  54. package/src/components/block-handle/block-handle-root.gen.ts +5 -17
  55. package/src/components/block-handle/index.gen.ts +2 -6
  56. package/src/components/drop-indicator/drop-indicator.gen.ts +5 -15
  57. package/src/components/drop-indicator/index.gen.ts +1 -3
  58. package/src/components/inline-popover/index.gen.ts +2 -6
  59. package/src/components/inline-popover/inline-popover-popup.gen.ts +5 -15
  60. package/src/components/inline-popover/inline-popover-positioner.gen.ts +5 -15
  61. package/src/components/inline-popover/inline-popover-root.gen.ts +6 -18
  62. package/src/components/menu/index.gen.ts +4 -8
  63. package/src/components/menu/menu-item.gen.ts +5 -17
  64. package/src/components/menu/menu-popup.gen.ts +5 -15
  65. package/src/components/menu/menu-positioner.gen.ts +5 -15
  66. package/src/components/menu/menu-root.gen.ts +5 -17
  67. package/src/components/menu/menu-submenu-root.gen.ts +50 -18
  68. package/src/components/menu/menu-submenu-trigger.gen.ts +28 -19
  69. package/src/components/menu/menu-trigger.gen.ts +5 -17
  70. package/src/components/popover/index.gen.ts +3 -7
  71. package/src/components/popover/popover-popup.gen.ts +5 -15
  72. package/src/components/popover/popover-positioner.gen.ts +5 -15
  73. package/src/components/popover/popover-root.gen.ts +5 -17
  74. package/src/components/popover/popover-trigger.gen.ts +5 -17
  75. package/src/components/resizable/index.gen.ts +2 -6
  76. package/src/components/resizable/resizable-handle.gen.ts +5 -15
  77. package/src/components/resizable/resizable-root.gen.ts +5 -17
  78. package/src/components/table-handle/index.gen.ts +1 -3
  79. package/src/components/table-handle/table-handle-column-menu-root.gen.ts +5 -15
  80. package/src/components/table-handle/table-handle-column-menu-trigger.gen.ts +5 -15
  81. package/src/components/table-handle/table-handle-column-popup.gen.ts +5 -15
  82. package/src/components/table-handle/table-handle-column-positioner.gen.ts +5 -15
  83. package/src/components/table-handle/table-handle-drag-preview.gen.ts +5 -15
  84. package/src/components/table-handle/table-handle-drop-indicator.gen.ts +5 -15
  85. package/src/components/table-handle/table-handle-root.gen.ts +5 -15
  86. package/src/components/table-handle/table-handle-row-menu-root.gen.ts +5 -15
  87. package/src/components/table-handle/table-handle-row-menu-trigger.gen.ts +5 -15
  88. package/src/components/table-handle/table-handle-row-popup.gen.ts +5 -15
  89. package/src/components/table-handle/table-handle-row-positioner.gen.ts +5 -15
  90. package/src/components/tooltip/index.gen.ts +2 -6
  91. package/src/components/tooltip/tooltip-popup.gen.ts +5 -15
  92. package/src/components/tooltip/tooltip-positioner.gen.ts +5 -15
  93. package/src/components/tooltip/tooltip-root.gen.ts +5 -17
  94. package/src/components/tooltip/tooltip-trigger.gen.ts +5 -15
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-preact-block-handle.js","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popup.gen.ts","../src/components/block-handle/block-handle-positioner.gen.ts","../src/components/block-handle/block-handle-root.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandleAddElement, type BlockHandleAddElement, type BlockHandleAddProps as BlockHandleAddElementProps } from '@prosekit/web/block-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 BlockHandleAdd} Preact component.\n *\n * @public\n */\nexport interface BlockHandleAddProps extends HTMLAttributes<BlockHandleAddElement> {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleAddElementProps['editor'];\n}\n\nfunction BlockHandleAddComponent(props: BlockHandleAddProps, forwardedRef: Ref<BlockHandleAddElement>) {\n registerBlockHandleAddElement();\n\n const elementRef = useRef<BlockHandleAddElement>(null);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { editor: p0 ?? p0Fallback });\n });\n\n const mergedRef = useCallback(\n (element: BlockHandleAddElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-block-handle-add', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-block-handle-add` custom element.\n *\n * @public\n */\nexport const BlockHandleAdd: ForwardRefExoticComponent<BlockHandleAddProps & RefAttributes<BlockHandleAddElement>> = /* @__PURE__ */ forwardRef(BlockHandleAddComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandleDraggableElement, type BlockHandleDraggableElement, type BlockHandleDraggableProps as BlockHandleDraggableElementProps } from '@prosekit/web/block-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 BlockHandleDraggable} Preact component.\n *\n * @public\n */\nexport interface BlockHandleDraggableProps extends HTMLAttributes<BlockHandleDraggableElement> {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleDraggableElementProps['editor'];\n}\n\nfunction BlockHandleDraggableComponent(props: BlockHandleDraggableProps, forwardedRef: Ref<BlockHandleDraggableElement>) {\n registerBlockHandleDraggableElement();\n\n const elementRef = useRef<BlockHandleDraggableElement>(null);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { editor: p0 ?? p0Fallback });\n });\n\n const mergedRef = useCallback(\n (element: BlockHandleDraggableElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-block-handle-draggable', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-block-handle-draggable` custom element.\n *\n * @public\n */\nexport const BlockHandleDraggable: ForwardRefExoticComponent<BlockHandleDraggableProps & RefAttributes<BlockHandleDraggableElement>> = /* @__PURE__ */ forwardRef(BlockHandleDraggableComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandlePopupElement, type BlockHandlePopupElement } from '@prosekit/web/block-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 BlockHandlePopup} Preact component.\n *\n * @public\n */\nexport interface BlockHandlePopupProps extends HTMLAttributes<BlockHandlePopupElement> {}\n\nfunction BlockHandlePopupComponent(props: BlockHandlePopupProps, forwardedRef: Ref<BlockHandlePopupElement>) {\n registerBlockHandlePopupElement();\n\n const elementRef = useRef<BlockHandlePopupElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: BlockHandlePopupElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-block-handle-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-block-handle-popup` custom element.\n *\n * @public\n */\nexport const BlockHandlePopup: ForwardRefExoticComponent<BlockHandlePopupProps & RefAttributes<BlockHandlePopupElement>> = /* @__PURE__ */ forwardRef(BlockHandlePopupComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandlePositionerElement, type BlockHandlePositionerElement, type BlockHandlePositionerProps as BlockHandlePositionerElementProps } from '@prosekit/web/block-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 BlockHandlePositioner} Preact component.\n *\n * @public\n */\nexport interface BlockHandlePositionerProps extends HTMLAttributes<BlockHandlePositionerElement> {\n /**\n * The placement of the popover, relative to the hovered block.\n *\n * @default \"left\"\n */\n placement?: BlockHandlePositionerElementProps['placement'];\n /**\n * Whether to use the browser [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)\n * to place the floating element on top of other page content.\n *\n * @default false\n */\n hoist?: BlockHandlePositionerElementProps['hoist'];\n /**\n * @default false\n * @hidden\n */\n flip?: BlockHandlePositionerElementProps['flip'];\n /**\n * @default false\n * @hidden\n */\n shift?: BlockHandlePositionerElementProps['shift'];\n /**\n * @default true\n * @hidden\n */\n hide?: BlockHandlePositionerElementProps['hide'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: BlockHandlePositionerElementProps['strategy'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: BlockHandlePositionerElementProps['autoUpdate'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: BlockHandlePositionerElementProps['offset'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: BlockHandlePositionerElementProps['overlap'];\n /**\n * Whether to constrain the floating element's width and height to not exceed\n * the viewport.\n *\n * @default false\n */\n fitViewport?: BlockHandlePositionerElementProps['fitViewport'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: BlockHandlePositionerElementProps['sameWidth'];\n /**\n * Whether to constrain the floating element's height so that it matches the\n * reference element.\n *\n * @default false\n */\n sameHeight?: BlockHandlePositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: BlockHandlePositionerElementProps['inline'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: BlockHandlePositionerElementProps['boundary'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: BlockHandlePositionerElementProps['rootBoundary'];\n /**\n * Describes the virtual padding around the boundary to check for overflow.\n * Please see https://floating-ui.com/docs/detectoverflow#padding for more information.\n *\n * @default 4\n */\n overflowPadding?: BlockHandlePositionerElementProps['overflowPadding'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: BlockHandlePositionerElementProps['elementContext'];\n /**\n * Whether to check the alternate elementContext's boundary. Please see\n * https://floating-ui.com/docs/detectoverflow#altboundary for more\n * information.\n *\n * @default false\n */\n altBoundary?: BlockHandlePositionerElementProps['altBoundary'];\n}\n\nfunction BlockHandlePositionerComponent(props: BlockHandlePositionerProps, forwardedRef: Ref<BlockHandlePositionerElement>) {\n registerBlockHandlePositionerElement();\n\n const elementRef = useRef<BlockHandlePositionerElement>(null);\n\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n const mergedRef = useCallback(\n (element: BlockHandlePositionerElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-block-handle-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-block-handle-positioner` custom element.\n *\n * @public\n */\nexport const BlockHandlePositioner: ForwardRefExoticComponent<BlockHandlePositionerProps & RefAttributes<BlockHandlePositionerElement>> = /* @__PURE__ */ forwardRef(BlockHandlePositionerComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandleRootElement, type BlockHandleRootElement, type BlockHandleRootProps as BlockHandleRootElementProps, type BlockHandleRootEvents } from '@prosekit/web/block-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 BlockHandleRoot} Preact component.\n *\n * @public\n */\nexport interface BlockHandleRootProps extends HTMLAttributes<BlockHandleRootElement> {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleRootElementProps['editor'];\n /** Fired when the hovered block changes. */\n onStateChange?: (event: BlockHandleRootEvents['stateChange']) => void;\n}\n\nfunction BlockHandleRootComponent(props: BlockHandleRootProps, forwardedRef: Ref<BlockHandleRootElement>) {\n registerBlockHandleRootElement();\n\n const elementRef = useRef<BlockHandleRootElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, onStateChange: e0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { editor: p0 ?? p0Fallback });\n handlersRef.current = [e0] as Array<((event: Event) => void) | undefined>;\n });\n\n useLayoutEffect(() => {\n const element = elementRef.current;\n if (!element) return;\n const ac = new AbortController();\n for (const [index, eventName] of ['stateChange'].entries()) {\n element.addEventListener(\n eventName,\n (event: Event) => {\n handlersRef.current[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n }, []);\n\n const mergedRef = useCallback(\n (element: BlockHandleRootElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-block-handle-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-block-handle-root` custom element.\n *\n * @public\n */\nexport const BlockHandleRoot: ForwardRefExoticComponent<BlockHandleRootProps & RefAttributes<BlockHandleRootElement>> = /* @__PURE__ */ forwardRef(BlockHandleRootComponent);\n\nexport type { BlockHandleRootEvents };\n"],"mappings":";;;;;;;;;AA0BA,SAAS,wBAAwB,OAA4B,cAA0C;AACrG,gCAA+B;CAE/B,MAAM,aAAa,OAA8B,KAAK;CAEtD,MAAM,aAAa,kBAAkB;CAErC,MAAM,EAAE,QAAQ,IAAI,GAAG,cAAc;AAErC,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS,EAAE,QAAQ,MAAM,YAAY,CAAC;GACpD;CAEF,MAAM,YAAY,aACf,YAA0C;AACzC,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,6BAA6B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQrH,MAAa,iBAAwH,2BAAW,wBAAwB;;;;;;ACnCxK,SAAS,8BAA8B,OAAkC,cAAgD;AACvH,sCAAqC;CAErC,MAAM,aAAa,OAAoC,KAAK;CAE5D,MAAM,aAAa,kBAAkB;CAErC,MAAM,EAAE,QAAQ,IAAI,GAAG,cAAc;AAErC,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS,EAAE,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G;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQtH,MAAa,kBAA2H,2BAAW,yBAAyB"}
1
+ {"version":3,"file":"prosekit-preact-block-handle.js","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popup.gen.ts","../src/components/block-handle/block-handle-positioner.gen.ts","../src/components/block-handle/block-handle-root.gen.ts"],"sourcesContent":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerBlockHandleAddElement, type BlockHandleAddElement, type BlockHandleAddProps as BlockHandleAddElementProps } from '@prosekit/web/block-handle';\nimport { createElement, 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 BlockHandleAdd} Preact component. */\nexport interface BlockHandleAddProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleAddElementProps['editor'];\n}\n\nfunction BlockHandleAddComponent(props: BlockHandleAddProps, forwardedRef: Ref<BlockHandleAddElement>) {\n registerBlockHandleAddElement();\n\n const elementRef = useRef<BlockHandleAddElement>(null);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { editor: p0 ?? p0Fallback });\n });\n\n const mergedRef = useCallback(\n (element: BlockHandleAddElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-block-handle-add', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-block-handle-add` custom element. */\nexport const BlockHandleAdd: ForwardRefExoticComponent<BlockHandleAddProps & HTMLAttributes<BlockHandleAddElement> & RefAttributes<BlockHandleAddElement>> = /* @__PURE__ */ forwardRef(BlockHandleAddComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerBlockHandleDraggableElement, type BlockHandleDraggableElement, type BlockHandleDraggableProps as BlockHandleDraggableElementProps } from '@prosekit/web/block-handle';\nimport { createElement, 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 BlockHandleDraggable} Preact component. */\nexport interface BlockHandleDraggableProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleDraggableElementProps['editor'];\n}\n\nfunction BlockHandleDraggableComponent(props: BlockHandleDraggableProps, forwardedRef: Ref<BlockHandleDraggableElement>) {\n registerBlockHandleDraggableElement();\n\n const elementRef = useRef<BlockHandleDraggableElement>(null);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { editor: p0 ?? p0Fallback });\n });\n\n const mergedRef = useCallback(\n (element: BlockHandleDraggableElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-block-handle-draggable', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-block-handle-draggable` custom element. */\nexport const BlockHandleDraggable: ForwardRefExoticComponent<BlockHandleDraggableProps & HTMLAttributes<BlockHandleDraggableElement> & RefAttributes<BlockHandleDraggableElement>> = /* @__PURE__ */ forwardRef(BlockHandleDraggableComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerBlockHandlePopupElement, type BlockHandlePopupElement } from '@prosekit/web/block-handle';\nimport { createElement, 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 BlockHandlePopup} Preact component. */\nexport interface BlockHandlePopupProps {}\n\nfunction BlockHandlePopupComponent(props: BlockHandlePopupProps, forwardedRef: Ref<BlockHandlePopupElement>) {\n registerBlockHandlePopupElement();\n\n const elementRef = useRef<BlockHandlePopupElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: BlockHandlePopupElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-block-handle-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-block-handle-popup` custom element. */\nexport const BlockHandlePopup: ForwardRefExoticComponent<BlockHandlePopupProps & HTMLAttributes<BlockHandlePopupElement> & RefAttributes<BlockHandlePopupElement>> = /* @__PURE__ */ forwardRef(BlockHandlePopupComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerBlockHandlePositionerElement, type BlockHandlePositionerElement, type BlockHandlePositionerProps as BlockHandlePositionerElementProps } from '@prosekit/web/block-handle';\nimport { createElement, 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 BlockHandlePositioner} Preact component. */\nexport interface BlockHandlePositionerProps {\n /**\n * The placement of the popover, relative to the hovered block.\n *\n * @default \"left\"\n */\n placement?: BlockHandlePositionerElementProps['placement'];\n /**\n * Whether to use the browser [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)\n * to place the floating element on top of other page content.\n *\n * @default false\n */\n hoist?: BlockHandlePositionerElementProps['hoist'];\n /**\n * @default false\n * @hidden\n */\n flip?: BlockHandlePositionerElementProps['flip'];\n /**\n * @default false\n * @hidden\n */\n shift?: BlockHandlePositionerElementProps['shift'];\n /**\n * @default true\n * @hidden\n */\n hide?: BlockHandlePositionerElementProps['hide'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: BlockHandlePositionerElementProps['strategy'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: BlockHandlePositionerElementProps['autoUpdate'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: BlockHandlePositionerElementProps['offset'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: BlockHandlePositionerElementProps['overlap'];\n /**\n * Whether to constrain the floating element's width and height to not exceed\n * the viewport.\n *\n * @default false\n */\n fitViewport?: BlockHandlePositionerElementProps['fitViewport'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: BlockHandlePositionerElementProps['sameWidth'];\n /**\n * Whether to constrain the floating element's height so that it matches the\n * reference element.\n *\n * @default false\n */\n sameHeight?: BlockHandlePositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: BlockHandlePositionerElementProps['inline'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: BlockHandlePositionerElementProps['boundary'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: BlockHandlePositionerElementProps['rootBoundary'];\n /**\n * Describes the virtual padding around the boundary to check for overflow.\n * Please see https://floating-ui.com/docs/detectoverflow#padding for more information.\n *\n * @default 4\n */\n overflowPadding?: BlockHandlePositionerElementProps['overflowPadding'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: BlockHandlePositionerElementProps['elementContext'];\n /**\n * Whether to check the alternate elementContext's boundary. Please see\n * https://floating-ui.com/docs/detectoverflow#altboundary for more\n * information.\n *\n * @default false\n */\n altBoundary?: BlockHandlePositionerElementProps['altBoundary'];\n}\n\nfunction BlockHandlePositionerComponent(props: BlockHandlePositionerProps, forwardedRef: Ref<BlockHandlePositionerElement>) {\n registerBlockHandlePositionerElement();\n\n const elementRef = useRef<BlockHandlePositionerElement>(null);\n\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n const mergedRef = useCallback(\n (element: BlockHandlePositionerElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-block-handle-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-block-handle-positioner` custom element. */\nexport const BlockHandlePositioner: ForwardRefExoticComponent<BlockHandlePositionerProps & HTMLAttributes<BlockHandlePositionerElement> & RefAttributes<BlockHandlePositionerElement>> = /* @__PURE__ */ forwardRef(BlockHandlePositionerComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerBlockHandleRootElement, type BlockHandleRootElement, type BlockHandleRootProps as BlockHandleRootElementProps, type BlockHandleRootEvents } from '@prosekit/web/block-handle';\nimport { createElement, 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 BlockHandleRoot} Preact component. */\nexport interface BlockHandleRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleRootElementProps['editor'];\n /** Fired when the hovered block changes. */\n onStateChange?: (event: BlockHandleRootEvents['stateChange']) => void;\n}\n\nfunction BlockHandleRootComponent(props: BlockHandleRootProps, forwardedRef: Ref<BlockHandleRootElement>) {\n registerBlockHandleRootElement();\n\n const elementRef = useRef<BlockHandleRootElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, onStateChange: e0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { editor: p0 ?? p0Fallback });\n handlersRef.current = [e0] as Array<((event: Event) => void) | undefined>;\n });\n\n useLayoutEffect(() => {\n const element = elementRef.current;\n if (!element) return;\n const ac = new AbortController();\n for (const [index, eventName] of ['stateChange'].entries()) {\n element.addEventListener(\n eventName,\n (event: Event) => {\n handlersRef.current[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n }, []);\n\n const mergedRef = useCallback(\n (element: BlockHandleRootElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-block-handle-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-block-handle-root` custom element. */\nexport const BlockHandleRoot: ForwardRefExoticComponent<BlockHandleRootProps & HTMLAttributes<BlockHandleRootElement> & RefAttributes<BlockHandleRootElement>> = /* @__PURE__ */ forwardRef(BlockHandleRootComponent);\n"],"mappings":";;;;;AAoBA,SAAS,wBAAwB,OAA4B,cAA0C;AACrG,gCAA+B;CAE/B,MAAM,aAAa,OAA8B,KAAK;CAEtD,MAAM,aAAa,kBAAkB;CAErC,MAAM,EAAE,QAAQ,IAAI,GAAG,cAAc;AAErC,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS,EAAE,QAAQ,MAAM,YAAY,CAAC;GACpD;CAEF,MAAM,YAAY,aACf,YAA0C;AACzC,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,6BAA6B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;AAIrH,MAAa,iBAAgK,2BAAW,wBAAwB;AC/BhN,SAAS,8BAA8B,OAAkC,cAAgD;AACvH,sCAAqC;CAErC,MAAM,aAAa,OAAoC,KAAK;CAE5D,MAAM,aAAa,kBAAkB;CAErC,MAAM,EAAE,QAAQ,IAAI,GAAG,cAAc;AAErC,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS,EAAE,QAAQ,MAAM,YAAY,CAAC;GACpD;CAEF,MAAM,YAAY,aACf,YAAgD;AAC/C,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,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, RefAttributes } from "preact/compat";
3
3
  import { DropIndicatorElement, DropIndicatorProps as DropIndicatorProps$1 } from "@prosekit/web/drop-indicator";
4
-
5
- //#region src/components/drop-indicator/drop-indicator.gen.d.ts
6
- /**
7
- * Props for the {@link DropIndicator} Preact component.
8
- *
9
- * @public
10
- */
11
- interface DropIndicatorProps extends HTMLAttributes<DropIndicatorElement> {
4
+ /** Props for the {@link DropIndicator} Preact component. */
5
+ interface DropIndicatorProps {
12
6
  /**
13
7
  * The ProseKit editor instance.
14
8
  *
@@ -23,12 +17,7 @@ interface DropIndicatorProps extends HTMLAttributes<DropIndicatorElement> {
23
17
  */
24
18
  width?: DropIndicatorProps$1['width'];
25
19
  }
26
- /**
27
- * A Preact component that renders an `prosekit-drop-indicator` custom element.
28
- *
29
- * @public
30
- */
31
- declare const DropIndicator: ForwardRefExoticComponent<DropIndicatorProps & RefAttributes<DropIndicatorElement>>;
32
- //#endregion
20
+ /** A Preact component that renders an `prosekit-drop-indicator` custom element. */
21
+ declare const DropIndicator: ForwardRefExoticComponent<DropIndicatorProps & HTMLAttributes<DropIndicatorElement> & RefAttributes<DropIndicatorElement>>;
33
22
  export { DropIndicator, type DropIndicatorProps };
34
23
  //# sourceMappingURL=prosekit-preact-drop-indicator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-preact-drop-indicator.d.ts","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"mappings":";;;;;;;;;;UAgBiB,kBAAA,SAA2B,cAAA,CAAe,oBAAA;EAAD;;;;;;EAOxD,MAAA,GAAS,oBAAA;EAMD;;;AAsCV;;EAtCE,KAAA,GAAQ,oBAAA;AAAA;;;;;;cAsCG,aAAA,EAAe,yBAAA,CAA0B,kBAAA,GAAqB,aAAA,CAAc,oBAAA"}
1
+ {"version":3,"file":"prosekit-preact-drop-indicator.d.ts","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"mappings":";;;;UAUiB,kBAAA;EAAkB;;;;;;EAOjC,MAAA,GAAS,oBAAA;EAMwB;;AAkCnC;;;EAlCE,KAAA,GAAQ,oBAAA;AAAA;;cAkCG,aAAA,EAAe,yBAAA,CAA0B,kBAAA,GAAqB,cAAA,CAAe,oBAAA,IAAwB,aAAA,CAAc,oBAAA"}
@@ -3,10 +3,6 @@ import { createElement } from "preact";
3
3
  import { useCallback, useLayoutEffect, useRef } from "preact/hooks";
4
4
  import { forwardRef } from "preact/compat";
5
5
  import { registerDropIndicatorElement } from "@prosekit/web/drop-indicator";
6
- //#region src/components/drop-indicator/drop-indicator.gen.ts
7
- /**
8
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
9
- */
10
6
  function DropIndicatorComponent(props, forwardedRef) {
11
7
  registerDropIndicatorElement();
12
8
  const elementRef = useRef(null);
@@ -31,13 +27,8 @@ function DropIndicatorComponent(props, forwardedRef) {
31
27
  suppressHydrationWarning: true
32
28
  });
33
29
  }
34
- /**
35
- * A Preact component that renders an `prosekit-drop-indicator` custom element.
36
- *
37
- * @public
38
- */
30
+ /** A Preact component that renders an `prosekit-drop-indicator` custom element. */
39
31
  const DropIndicator = /* @__PURE__ */ forwardRef(DropIndicatorComponent);
40
- //#endregion
41
32
  export { DropIndicator };
42
33
 
43
34
  //# sourceMappingURL=prosekit-preact-drop-indicator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-preact-drop-indicator.js","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerDropIndicatorElement, type DropIndicatorElement, type DropIndicatorProps as DropIndicatorElementProps } from '@prosekit/web/drop-indicator';\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 DropIndicator} Preact component.\n *\n * @public\n */\nexport interface DropIndicatorProps extends HTMLAttributes<DropIndicatorElement> {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: DropIndicatorElementProps['editor'];\n /**\n * The line width in pixels.\n *\n * @default 2\n */\n width?: DropIndicatorElementProps['width'];\n}\n\nfunction DropIndicatorComponent(props: DropIndicatorProps, forwardedRef: Ref<DropIndicatorElement>) {\n registerDropIndicatorElement();\n\n const elementRef = useRef<DropIndicatorElement>(null);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, width: p1, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { editor: p0 ?? p0Fallback, width: p1 });\n });\n\n const mergedRef = useCallback(\n (element: DropIndicatorElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-drop-indicator', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-drop-indicator` custom element.\n *\n * @public\n */\nexport const DropIndicator: ForwardRefExoticComponent<DropIndicatorProps & RefAttributes<DropIndicatorElement>> = /* @__PURE__ */ forwardRef(DropIndicatorComponent);\n"],"mappings":";;;;;;;;;AAgCA,SAAS,uBAAuB,OAA2B,cAAyC;AAClG,+BAA8B;CAE9B,MAAM,aAAa,OAA6B,KAAK;CAErD,MAAM,aAAa,kBAAkB;CAErC,MAAM,EAAE,QAAQ,IAAI,OAAO,IAAI,GAAG,cAAc;AAEhD,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS;GAAE,QAAQ,MAAM;GAAY,OAAO;GAAI,CAAC;GAC/D;CAEF,MAAM,YAAY,aACf,YAAyC;AACxC,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,2BAA2B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQnH,MAAa,gBAAqH,2BAAW,uBAAuB"}
1
+ {"version":3,"file":"prosekit-preact-drop-indicator.js","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"sourcesContent":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerDropIndicatorElement, type DropIndicatorElement, type DropIndicatorProps as DropIndicatorElementProps } from '@prosekit/web/drop-indicator';\nimport { createElement, 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 DropIndicator} Preact component. */\nexport interface DropIndicatorProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: DropIndicatorElementProps['editor'];\n /**\n * The line width in pixels.\n *\n * @default 2\n */\n width?: DropIndicatorElementProps['width'];\n}\n\nfunction DropIndicatorComponent(props: DropIndicatorProps, forwardedRef: Ref<DropIndicatorElement>) {\n registerDropIndicatorElement();\n\n const elementRef = useRef<DropIndicatorElement>(null);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, width: p1, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { editor: p0 ?? p0Fallback, width: p1 });\n });\n\n const mergedRef = useCallback(\n (element: DropIndicatorElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-drop-indicator', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-drop-indicator` custom element. */\nexport const DropIndicator: ForwardRefExoticComponent<DropIndicatorProps & HTMLAttributes<DropIndicatorElement> & RefAttributes<DropIndicatorElement>> = /* @__PURE__ */ forwardRef(DropIndicatorComponent);\n"],"mappings":";;;;;AA0BA,SAAS,uBAAuB,OAA2B,cAAyC;AAClG,+BAA8B;CAE9B,MAAM,aAAa,OAA6B,KAAK;CAErD,MAAM,aAAa,kBAAkB;CAErC,MAAM,EAAE,QAAQ,IAAI,OAAO,IAAI,GAAG,cAAc;AAEhD,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS;GAAE,QAAQ,MAAM;GAAY,OAAO;GAAI,CAAC;GAC/D;CAEF,MAAM,YAAY,aACf,YAAyC;AACxC,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,2BAA2B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;AAInH,MAAa,gBAA4J,2BAAW,uBAAuB"}
@@ -1,28 +1,12 @@
1
1
  import { HTMLAttributes } from "preact";
2
2
  import { ForwardRefExoticComponent, RefAttributes } from "preact/compat";
3
- import { InlinePopoverPopupElement, InlinePopoverPositionerElement, InlinePopoverPositionerProps as InlinePopoverPositionerProps$1, InlinePopoverRootElement, InlinePopoverRootEvents, InlinePopoverRootProps as InlinePopoverRootProps$1, OpenChangeEvent } from "@prosekit/web/inline-popover";
4
-
5
- //#region src/components/inline-popover/inline-popover-popup.gen.d.ts
6
- /**
7
- * Props for the {@link InlinePopoverPopup} Preact component.
8
- *
9
- * @public
10
- */
11
- interface InlinePopoverPopupProps extends HTMLAttributes<InlinePopoverPopupElement> {}
12
- /**
13
- * A Preact component that renders an `prosekit-inline-popover-popup` custom element.
14
- *
15
- * @public
16
- */
17
- declare const InlinePopoverPopup: ForwardRefExoticComponent<InlinePopoverPopupProps & RefAttributes<InlinePopoverPopupElement>>;
18
- //#endregion
19
- //#region src/components/inline-popover/inline-popover-positioner.gen.d.ts
20
- /**
21
- * Props for the {@link InlinePopoverPositioner} Preact component.
22
- *
23
- * @public
24
- */
25
- interface InlinePopoverPositionerProps extends HTMLAttributes<InlinePopoverPositionerElement> {
3
+ import { InlinePopoverPopupElement, InlinePopoverPositionerElement, InlinePopoverPositionerProps as InlinePopoverPositionerProps$1, InlinePopoverRootElement, InlinePopoverRootEvents, InlinePopoverRootProps as InlinePopoverRootProps$1 } from "@prosekit/web/inline-popover";
4
+ /** Props for the {@link InlinePopoverPopup} Preact component. */
5
+ interface InlinePopoverPopupProps {}
6
+ /** A Preact component that renders an `prosekit-inline-popover-popup` custom element. */
7
+ declare const InlinePopoverPopup: ForwardRefExoticComponent<InlinePopoverPopupProps & HTMLAttributes<InlinePopoverPopupElement> & RefAttributes<InlinePopoverPopupElement>>;
8
+ /** Props for the {@link InlinePopoverPositioner} Preact component. */
9
+ interface InlinePopoverPositionerProps {
26
10
  /**
27
11
  * The initial placement of the floating element
28
12
  *
@@ -150,20 +134,10 @@ interface InlinePopoverPositionerProps extends HTMLAttributes<InlinePopoverPosit
150
134
  */
151
135
  altBoundary?: InlinePopoverPositionerProps$1['altBoundary'];
152
136
  }
153
- /**
154
- * A Preact component that renders an `prosekit-inline-popover-positioner` custom element.
155
- *
156
- * @public
157
- */
158
- declare const InlinePopoverPositioner: ForwardRefExoticComponent<InlinePopoverPositionerProps & RefAttributes<InlinePopoverPositionerElement>>;
159
- //#endregion
160
- //#region src/components/inline-popover/inline-popover-root.gen.d.ts
161
- /**
162
- * Props for the {@link InlinePopoverRoot} Preact component.
163
- *
164
- * @public
165
- */
166
- interface InlinePopoverRootProps extends HTMLAttributes<InlinePopoverRootElement> {
137
+ /** A Preact component that renders an `prosekit-inline-popover-positioner` custom element. */
138
+ declare const InlinePopoverPositioner: ForwardRefExoticComponent<InlinePopoverPositionerProps & HTMLAttributes<InlinePopoverPositionerElement> & RefAttributes<InlinePopoverPositionerElement>>;
139
+ /** Props for the {@link InlinePopoverRoot} Preact component. */
140
+ interface InlinePopoverRootProps {
167
141
  /**
168
142
  * The ProseKit editor instance.
169
143
  *
@@ -195,15 +169,10 @@ interface InlinePopoverRootProps extends HTMLAttributes<InlinePopoverRootElement
195
169
  * @default false
196
170
  */
197
171
  disabled?: InlinePopoverRootProps$1['disabled'];
198
- /** */
172
+ /** Emitted when the open state of the popover changes. */
199
173
  onOpenChange?: (event: InlinePopoverRootEvents['openChange']) => void;
200
174
  }
201
- /**
202
- * A Preact component that renders an `prosekit-inline-popover-root` custom element.
203
- *
204
- * @public
205
- */
206
- declare const InlinePopoverRoot: ForwardRefExoticComponent<InlinePopoverRootProps & RefAttributes<InlinePopoverRootElement>>;
207
- //#endregion
208
- export { InlinePopoverPopup, type InlinePopoverPopupProps, InlinePopoverPositioner, type InlinePopoverPositionerProps, InlinePopoverRoot, type InlinePopoverRootEvents, type InlinePopoverRootProps, OpenChangeEvent };
175
+ /** A Preact component that renders an `prosekit-inline-popover-root` custom element. */
176
+ declare const InlinePopoverRoot: ForwardRefExoticComponent<InlinePopoverRootProps & HTMLAttributes<InlinePopoverRootElement> & RefAttributes<InlinePopoverRootElement>>;
177
+ export { InlinePopoverPopup, type InlinePopoverPopupProps, InlinePopoverPositioner, type InlinePopoverPositionerProps, InlinePopoverRoot, type InlinePopoverRootProps };
209
178
  //# sourceMappingURL=prosekit-preact-inline-popover.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-preact-inline-popover.d.ts","names":[],"sources":["../src/components/inline-popover/inline-popover-popup.gen.ts","../src/components/inline-popover/inline-popover-positioner.gen.ts","../src/components/inline-popover/inline-popover-root.gen.ts"],"mappings":";;;;;;;;;AA2CA;UA7BiB,uBAAA,SAAgC,cAAA,CAAe,yBAAA;;;;;;cA6BnD,kBAAA,EAAoB,yBAAA,CAA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AA,EAAmB,yBAAA,CAA0B,sBAAA,GAAyB,aAAA,CAAc,wBAAA"}
1
+ {"version":3,"file":"prosekit-preact-inline-popover.d.ts","names":[],"sources":["../src/components/inline-popover/inline-popover-popup.gen.ts","../src/components/inline-popover/inline-popover-positioner.gen.ts","../src/components/inline-popover/inline-popover-root.gen.ts"],"mappings":";;;;UAQiB,uBAAA;;cAyBJ,kBAAA,EAAoB,yBAAA,CAA0B,uBAAA,GAA0B,cAAA,CAAe,yBAAA,IAA6B,aAAA,CAAc,yBAAA;;UCzB9H,4BAAA;EDAuB;;;;AAyBxC;ECnBE,SAAA,GAAY,8BAAA;;;;;;EAMZ,MAAA,GAAS,8BAAA;EDasB;;;;;;ECN/B,IAAA,GAAO,8BAAA;EDMwH;;;;;ACzBjI;EA0BE,KAAA,GAAQ,8BAAA;;;;;;;EAOR,OAAA,GAAU,8BAAA;EAaQ;;;;;;EANlB,MAAA,GAAS,8BAAA;EAwDI;;;;;EAlDb,eAAA,GAAkB,8BAAA;EAgF+B;;;;;EA1EjD,QAAA,GAAW,8BAAA;EAjCJ;;;;;;;EAyCP,UAAA,GAAa,8BAAA;EAdK;;;;;;;;EAuBlB,IAAA,GAAO,8BAAA;EAaP;;;;;EAPA,KAAA,GAAQ,8BAAA;EA4BR;;;;;;EArBA,WAAA,GAAc,8BAAA;EA4CA;;;AAgChB;;;EArEE,SAAA,GAAY,8BAAA;EAqEgG;;;;;;EA9D5G,UAAA,GAAa,8BAAA;EA8DuB;;;;;;EAvDpC,QAAA,GAAW,8BAAA;EAuD+K;;AC5J5L;;;;ED4GE,YAAA,GAAe,8BAAA;ECvFG;;;;;;;ED+FlB,cAAA,GAAiB,8BAAA;ECtGjB;;;;;;;ED8GA,WAAA,GAAc,8BAAA;AAAA;;cAgCH,uBAAA,EAAyB,yBAAA,CAA0B,4BAAA,GAA+B,cAAA,CAAe,8BAAA,IAAkC,aAAA,CAAc,8BAAA;;UC5J7I,sBAAA;EFFuB;;;;AAyBxC;;EEhBE,MAAA,GAAS,wBAAA;EFgBgD;;;;;;EETzD,WAAA,GAAc,wBAAA;EFS0C;;;;;;EEFxD,eAAA,GAAkB,wBAAA;EFEoJ;;;ACzBxK;EC4BE,IAAA,GAAO,wBAAA;;;;;EAKP,QAAA,GAAW,wBAAA;EDAD;ECEV,YAAA,IAAgB,KAAA,EAAO,uBAAA;AAAA;;cAoDZ,iBAAA,EAAmB,yBAAA,CAA0B,sBAAA,GAAyB,cAAA,CAAe,wBAAA,IAA4B,aAAA,CAAc,wBAAA"}
@@ -2,11 +2,7 @@ import { n as useEditorContext } from "./editor-context.js";
2
2
  import { createElement } from "preact";
3
3
  import { useCallback, useLayoutEffect, useRef } from "preact/hooks";
4
4
  import { forwardRef } from "preact/compat";
5
- import { OpenChangeEvent, registerInlinePopoverPopupElement, registerInlinePopoverPositionerElement, registerInlinePopoverRootElement } from "@prosekit/web/inline-popover";
6
- //#region src/components/inline-popover/inline-popover-popup.gen.ts
7
- /**
8
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
9
- */
5
+ import { registerInlinePopoverPopupElement, registerInlinePopoverPositionerElement, registerInlinePopoverRootElement } from "@prosekit/web/inline-popover";
10
6
  function InlinePopoverPopupComponent(props, forwardedRef) {
11
7
  registerInlinePopoverPopupElement();
12
8
  const elementRef = useRef(null);
@@ -22,17 +18,8 @@ function InlinePopoverPopupComponent(props, forwardedRef) {
22
18
  suppressHydrationWarning: true
23
19
  });
24
20
  }
25
- /**
26
- * A Preact component that renders an `prosekit-inline-popover-popup` custom element.
27
- *
28
- * @public
29
- */
21
+ /** A Preact component that renders an `prosekit-inline-popover-popup` custom element. */
30
22
  const InlinePopoverPopup = /* @__PURE__ */ forwardRef(InlinePopoverPopupComponent);
31
- //#endregion
32
- //#region src/components/inline-popover/inline-popover-positioner.gen.ts
33
- /**
34
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
35
- */
36
23
  function InlinePopoverPositionerComponent(props, forwardedRef) {
37
24
  registerInlinePopoverPositionerElement();
38
25
  const elementRef = useRef(null);
@@ -72,17 +59,8 @@ function InlinePopoverPositionerComponent(props, forwardedRef) {
72
59
  suppressHydrationWarning: true
73
60
  });
74
61
  }
75
- /**
76
- * A Preact component that renders an `prosekit-inline-popover-positioner` custom element.
77
- *
78
- * @public
79
- */
62
+ /** A Preact component that renders an `prosekit-inline-popover-positioner` custom element. */
80
63
  const InlinePopoverPositioner = /* @__PURE__ */ forwardRef(InlinePopoverPositionerComponent);
81
- //#endregion
82
- //#region src/components/inline-popover/inline-popover-root.gen.ts
83
- /**
84
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
85
- */
86
64
  function InlinePopoverRootComponent(props, forwardedRef) {
87
65
  registerInlinePopoverRootElement();
88
66
  const elementRef = useRef(null);
@@ -121,13 +99,8 @@ function InlinePopoverRootComponent(props, forwardedRef) {
121
99
  suppressHydrationWarning: true
122
100
  });
123
101
  }
124
- /**
125
- * A Preact component that renders an `prosekit-inline-popover-root` custom element.
126
- *
127
- * @public
128
- */
102
+ /** A Preact component that renders an `prosekit-inline-popover-root` custom element. */
129
103
  const InlinePopoverRoot = /* @__PURE__ */ forwardRef(InlinePopoverRootComponent);
130
- //#endregion
131
- export { InlinePopoverPopup, InlinePopoverPositioner, InlinePopoverRoot, OpenChangeEvent };
104
+ export { InlinePopoverPopup, InlinePopoverPositioner, InlinePopoverRoot };
132
105
 
133
106
  //# sourceMappingURL=prosekit-preact-inline-popover.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-preact-inline-popover.js","names":[],"sources":["../src/components/inline-popover/inline-popover-popup.gen.ts","../src/components/inline-popover/inline-popover-positioner.gen.ts","../src/components/inline-popover/inline-popover-root.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerInlinePopoverPopupElement, type InlinePopoverPopupElement } from '@prosekit/web/inline-popover';\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 InlinePopoverPopup} Preact component.\n *\n * @public\n */\nexport interface InlinePopoverPopupProps extends HTMLAttributes<InlinePopoverPopupElement> {}\n\nfunction InlinePopoverPopupComponent(props: InlinePopoverPopupProps, forwardedRef: Ref<InlinePopoverPopupElement>) {\n registerInlinePopoverPopupElement();\n\n const elementRef = useRef<InlinePopoverPopupElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: InlinePopoverPopupElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-inline-popover-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-inline-popover-popup` custom element.\n *\n * @public\n */\nexport const InlinePopoverPopup: ForwardRefExoticComponent<InlinePopoverPopupProps & RefAttributes<InlinePopoverPopupElement>> = /* @__PURE__ */ forwardRef(InlinePopoverPopupComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerInlinePopoverPositionerElement, type InlinePopoverPositionerElement, type InlinePopoverPositionerProps as InlinePopoverPositionerElementProps } from '@prosekit/web/inline-popover';\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 InlinePopoverPositioner} Preact component.\n *\n * @public\n */\nexport interface InlinePopoverPositionerProps extends HTMLAttributes<InlinePopoverPositionerElement> {\n /**\n * The initial placement of the floating element\n *\n * @default \"top\"\n */\n placement?: InlinePopoverPositionerElementProps['placement'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 12\n */\n offset?: InlinePopoverPositionerElementProps['offset'];\n /**\n * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default true\n */\n hide?: InlinePopoverPositionerElementProps['hide'];\n /**\n * Whether to use the browser [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)\n * to place the floating element on top of other page content.\n *\n * @default false\n */\n hoist?: InlinePopoverPositionerElementProps['hoist'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default true\n */\n overlap?: InlinePopoverPositionerElementProps['overlap'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default true\n */\n inline?: InlinePopoverPositionerElementProps['inline'];\n /**\n * Describes the virtual padding around the boundary to check for overflow.\n *\n * @default 8\n */\n overflowPadding?: InlinePopoverPositionerElementProps['overflowPadding'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: InlinePopoverPositionerElementProps['strategy'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: InlinePopoverPositionerElementProps['autoUpdate'];\n /**\n * Whether to flip the `placement` in order to keep it in view when the\n * preferred placement(s) will overflow the clipping boundary. You can also\n * provide an array of placements to try sequentially if the preferred\n * `placement` does not fit.\n *\n * @default true\n */\n flip?: InlinePopoverPositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: InlinePopoverPositionerElementProps['shift'];\n /**\n * Whether to constrain the floating element's width and height to not exceed\n * the viewport.\n *\n * @default false\n */\n fitViewport?: InlinePopoverPositionerElementProps['fitViewport'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: InlinePopoverPositionerElementProps['sameWidth'];\n /**\n * Whether to constrain the floating element's height so that it matches the\n * reference element.\n *\n * @default false\n */\n sameHeight?: InlinePopoverPositionerElementProps['sameHeight'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: InlinePopoverPositionerElementProps['boundary'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: InlinePopoverPositionerElementProps['rootBoundary'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: InlinePopoverPositionerElementProps['elementContext'];\n /**\n * Whether to check the alternate elementContext's boundary. Please see\n * https://floating-ui.com/docs/detectoverflow#altboundary for more\n * information.\n *\n * @default false\n */\n altBoundary?: InlinePopoverPositionerElementProps['altBoundary'];\n}\n\nfunction InlinePopoverPositionerComponent(props: InlinePopoverPositionerProps, forwardedRef: Ref<InlinePopoverPositionerElement>) {\n registerInlinePopoverPositionerElement();\n\n const elementRef = useRef<InlinePopoverPositionerElement>(null);\n\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n const mergedRef = useCallback(\n (element: InlinePopoverPositionerElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-inline-popover-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-inline-popover-positioner` custom element.\n *\n * @public\n */\nexport const InlinePopoverPositioner: ForwardRefExoticComponent<InlinePopoverPositionerProps & RefAttributes<InlinePopoverPositionerElement>> = /* @__PURE__ */ forwardRef(InlinePopoverPositionerComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerInlinePopoverRootElement, type InlinePopoverRootElement, type InlinePopoverRootProps as InlinePopoverRootElementProps, type InlinePopoverRootEvents } from '@prosekit/web/inline-popover';\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 InlinePopoverRoot} Preact component.\n *\n * @public\n */\nexport interface InlinePopoverRootProps extends HTMLAttributes<InlinePopoverRootElement> {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: InlinePopoverRootElementProps['editor'];\n /**\n * Whether the popover is open by default when some inline content is\n * selected.\n *\n * @default true\n */\n defaultOpen?: InlinePopoverRootElementProps['defaultOpen'];\n /**\n * Whether the inline popover should be dismissed when the editor receives an\n * Escape key press.\n *\n * @default true\n */\n dismissOnEscape?: InlinePopoverRootElementProps['dismissOnEscape'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: InlinePopoverRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: InlinePopoverRootElementProps['disabled'];\n /** */\n onOpenChange?: (event: InlinePopoverRootEvents['openChange']) => void;\n}\n\nfunction InlinePopoverRootComponent(props: InlinePopoverRootProps, forwardedRef: Ref<InlinePopoverRootElement>) {\n registerInlinePopoverRootElement();\n\n const elementRef = useRef<InlinePopoverRootElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const p3Fallback = useEditorContext();\n\n const { defaultOpen: p0, disabled: p1, dismissOnEscape: p2, editor: p3, open: p4, onOpenChange: e0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { defaultOpen: p0, disabled: p1, dismissOnEscape: p2, editor: p3 ?? p3Fallback, open: p4 });\n handlersRef.current = [e0] as Array<((event: Event) => void) | undefined>;\n });\n\n useLayoutEffect(() => {\n const element = elementRef.current;\n if (!element) return;\n const ac = new AbortController();\n for (const [index, eventName] of ['openChange'].entries()) {\n element.addEventListener(\n eventName,\n (event: Event) => {\n handlersRef.current[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n }, []);\n\n const mergedRef = useCallback(\n (element: InlinePopoverRootElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-inline-popover-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-inline-popover-root` custom element.\n *\n * @public\n */\nexport const InlinePopoverRoot: ForwardRefExoticComponent<InlinePopoverRootProps & RefAttributes<InlinePopoverRootElement>> = /* @__PURE__ */ forwardRef(InlinePopoverRootComponent);\n\nexport type { InlinePopoverRootEvents };\n"],"mappings":";;;;;;;;;AAgBA,SAAS,4BAA4B,OAAgC,cAA8C;AACjH,oCAAmC;CAEnC,MAAM,aAAa,OAAkC,KAAK;CAE1D,MAAM,EAAE,GAAG,cAAc;CAEzB,MAAM,YAAY,aACf,YAA8C;AAC7C,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,iCAAiC;EAAE,GAAG;EAAW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Q,IAAI,MAAM,IAAI,cAAc,IAAI,GAAG,cAAc;AAErH,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS;GAAE,aAAa;GAAI,UAAU;GAAI,iBAAiB;GAAI,QAAQ,MAAM;GAAY,MAAM;GAAI,CAAC;AAClH,cAAY,UAAU,CAAC,GAAG;GAC1B;AAEF,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EACd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,aAAa,CAAC,SAAS,CACvD,SAAQ,iBACN,YACC,UAAiB;AAChB,eAAY,QAAQ,SAAS,MAAM;KAErC,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;IACtB,EAAE,CAAC;CAEN,MAAM,YAAY,aACf,YAA6C;AAC5C,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,gCAAgC;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQxH,MAAa,oBAAiI,2BAAW,2BAA2B"}
1
+ {"version":3,"file":"prosekit-preact-inline-popover.js","names":[],"sources":["../src/components/inline-popover/inline-popover-popup.gen.ts","../src/components/inline-popover/inline-popover-positioner.gen.ts","../src/components/inline-popover/inline-popover-root.gen.ts"],"sourcesContent":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerInlinePopoverPopupElement, type InlinePopoverPopupElement } from '@prosekit/web/inline-popover';\nimport { createElement, 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 InlinePopoverPopup} Preact component. */\nexport interface InlinePopoverPopupProps {}\n\nfunction InlinePopoverPopupComponent(props: InlinePopoverPopupProps, forwardedRef: Ref<InlinePopoverPopupElement>) {\n registerInlinePopoverPopupElement();\n\n const elementRef = useRef<InlinePopoverPopupElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: InlinePopoverPopupElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-inline-popover-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-inline-popover-popup` custom element. */\nexport const InlinePopoverPopup: ForwardRefExoticComponent<InlinePopoverPopupProps & HTMLAttributes<InlinePopoverPopupElement> & RefAttributes<InlinePopoverPopupElement>> = /* @__PURE__ */ forwardRef(InlinePopoverPopupComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerInlinePopoverPositionerElement, type InlinePopoverPositionerElement, type InlinePopoverPositionerProps as InlinePopoverPositionerElementProps } from '@prosekit/web/inline-popover';\nimport { createElement, 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 InlinePopoverPositioner} Preact component. */\nexport interface InlinePopoverPositionerProps {\n /**\n * The initial placement of the floating element\n *\n * @default \"top\"\n */\n placement?: InlinePopoverPositionerElementProps['placement'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 12\n */\n offset?: InlinePopoverPositionerElementProps['offset'];\n /**\n * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default true\n */\n hide?: InlinePopoverPositionerElementProps['hide'];\n /**\n * Whether to use the browser [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)\n * to place the floating element on top of other page content.\n *\n * @default false\n */\n hoist?: InlinePopoverPositionerElementProps['hoist'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default true\n */\n overlap?: InlinePopoverPositionerElementProps['overlap'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default true\n */\n inline?: InlinePopoverPositionerElementProps['inline'];\n /**\n * Describes the virtual padding around the boundary to check for overflow.\n *\n * @default 8\n */\n overflowPadding?: InlinePopoverPositionerElementProps['overflowPadding'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: InlinePopoverPositionerElementProps['strategy'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: InlinePopoverPositionerElementProps['autoUpdate'];\n /**\n * Whether to flip the `placement` in order to keep it in view when the\n * preferred placement(s) will overflow the clipping boundary. You can also\n * provide an array of placements to try sequentially if the preferred\n * `placement` does not fit.\n *\n * @default true\n */\n flip?: InlinePopoverPositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: InlinePopoverPositionerElementProps['shift'];\n /**\n * Whether to constrain the floating element's width and height to not exceed\n * the viewport.\n *\n * @default false\n */\n fitViewport?: InlinePopoverPositionerElementProps['fitViewport'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: InlinePopoverPositionerElementProps['sameWidth'];\n /**\n * Whether to constrain the floating element's height so that it matches the\n * reference element.\n *\n * @default false\n */\n sameHeight?: InlinePopoverPositionerElementProps['sameHeight'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: InlinePopoverPositionerElementProps['boundary'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: InlinePopoverPositionerElementProps['rootBoundary'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: InlinePopoverPositionerElementProps['elementContext'];\n /**\n * Whether to check the alternate elementContext's boundary. Please see\n * https://floating-ui.com/docs/detectoverflow#altboundary for more\n * information.\n *\n * @default false\n */\n altBoundary?: InlinePopoverPositionerElementProps['altBoundary'];\n}\n\nfunction InlinePopoverPositionerComponent(props: InlinePopoverPositionerProps, forwardedRef: Ref<InlinePopoverPositionerElement>) {\n registerInlinePopoverPositionerElement();\n\n const elementRef = useRef<InlinePopoverPositionerElement>(null);\n\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n const mergedRef = useCallback(\n (element: InlinePopoverPositionerElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-inline-popover-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-inline-popover-positioner` custom element. */\nexport const InlinePopoverPositioner: ForwardRefExoticComponent<InlinePopoverPositionerProps & HTMLAttributes<InlinePopoverPositionerElement> & RefAttributes<InlinePopoverPositionerElement>> = /* @__PURE__ */ forwardRef(InlinePopoverPositionerComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerInlinePopoverRootElement, type InlinePopoverRootElement, type InlinePopoverRootProps as InlinePopoverRootElementProps, type InlinePopoverRootEvents } from '@prosekit/web/inline-popover';\nimport { createElement, 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 InlinePopoverRoot} Preact component. */\nexport interface InlinePopoverRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: InlinePopoverRootElementProps['editor'];\n /**\n * Whether the popover is open by default when some inline content is\n * selected.\n *\n * @default true\n */\n defaultOpen?: InlinePopoverRootElementProps['defaultOpen'];\n /**\n * Whether the inline popover should be dismissed when the editor receives an\n * Escape key press.\n *\n * @default true\n */\n dismissOnEscape?: InlinePopoverRootElementProps['dismissOnEscape'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: InlinePopoverRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: InlinePopoverRootElementProps['disabled'];\n /** Emitted when the open state of the popover changes. */\n onOpenChange?: (event: InlinePopoverRootEvents['openChange']) => void;\n}\n\nfunction InlinePopoverRootComponent(props: InlinePopoverRootProps, forwardedRef: Ref<InlinePopoverRootElement>) {\n registerInlinePopoverRootElement();\n\n const elementRef = useRef<InlinePopoverRootElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const p3Fallback = useEditorContext();\n\n const { defaultOpen: p0, disabled: p1, dismissOnEscape: p2, editor: p3, open: p4, onOpenChange: e0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { defaultOpen: p0, disabled: p1, dismissOnEscape: p2, editor: p3 ?? p3Fallback, open: p4 });\n handlersRef.current = [e0] as Array<((event: Event) => void) | undefined>;\n });\n\n useLayoutEffect(() => {\n const element = elementRef.current;\n if (!element) return;\n const ac = new AbortController();\n for (const [index, eventName] of ['openChange'].entries()) {\n element.addEventListener(\n eventName,\n (event: Event) => {\n handlersRef.current[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n }, []);\n\n const mergedRef = useCallback(\n (element: InlinePopoverRootElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-inline-popover-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/** A Preact component that renders an `prosekit-inline-popover-root` custom element. */\nexport const InlinePopoverRoot: ForwardRefExoticComponent<InlinePopoverRootProps & HTMLAttributes<InlinePopoverRootElement> & RefAttributes<InlinePopoverRootElement>> = /* @__PURE__ */ forwardRef(InlinePopoverRootComponent);\n"],"mappings":";;;;;AAUA,SAAS,4BAA4B,OAAgC,cAA8C;AACjH,oCAAmC;CAEnC,MAAM,aAAa,OAAkC,KAAK;CAE1D,MAAM,EAAE,GAAG,cAAc;CAEzB,MAAM,YAAY,aACf,YAA8C;AAC7C,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,iCAAiC;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;AAIzH,MAAa,qBAAgL,2BAAW,4BAA4B;ACwGpO,SAAS,iCAAiC,OAAqC,cAAmD;AAChI,yCAAwC;CAExC,MAAM,aAAa,OAAuC,KAAK;CAE/D,MAAM,EAAE,aAAa,IAAI,YAAY,IAAI,UAAU,IAAI,gBAAgB,IAAI,aAAa,IAAI,MAAM,IAAI,MAAM,IAAI,OAAO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AC3B,MAAI,CAAC,QAAS;EACd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,aAAa,CAAC,SAAS,CACvD,SAAQ,iBACN,YACC,UAAiB;AAChB,eAAY,QAAQ,SAAS,MAAM;KAErC,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;IACtB,EAAE,CAAC;CAEN,MAAM,YAAY,aACf,YAA6C;AAC5C,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,gCAAgC;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;AAIxH,MAAa,oBAA4K,2BAAW,2BAA2B"}
@@ -1,14 +1,8 @@
1
1
  import { HTMLAttributes } from "preact";
2
2
  import { ForwardRefExoticComponent, RefAttributes } from "preact/compat";
3
- import { MenuItemElement, MenuItemEvents, MenuItemProps as MenuItemProps$1, MenuPopupElement, MenuPopupProps as MenuPopupProps$1, MenuPositionerElement, MenuPositionerProps as MenuPositionerProps$1, MenuRootElement, MenuRootEvents, MenuRootProps as MenuRootProps$1, MenuSubmenuRootElement, MenuSubmenuTriggerElement, MenuTriggerElement, MenuTriggerEvents, MenuTriggerProps as MenuTriggerProps$1, OpenChangeEvent, SelectEvent } from "@prosekit/web/menu";
4
-
5
- //#region src/components/menu/menu-item.gen.d.ts
6
- /**
7
- * Props for the {@link MenuItem} Preact component.
8
- *
9
- * @public
10
- */
11
- interface MenuItemProps extends Omit<HTMLAttributes<MenuItemElement>, 'onSelect'> {
3
+ import { MenuItemElement, MenuItemEvents, MenuItemProps as MenuItemProps$1, MenuPopupElement, MenuPopupProps as MenuPopupProps$1, MenuPositionerElement, MenuPositionerProps as MenuPositionerProps$1, MenuRootElement, MenuRootEvents, MenuRootProps as MenuRootProps$1, MenuSubmenuRootElement, MenuSubmenuRootEvents, MenuSubmenuRootProps as MenuSubmenuRootProps$1, MenuSubmenuTriggerElement, MenuSubmenuTriggerProps as MenuSubmenuTriggerProps$1, MenuTriggerElement, MenuTriggerEvents, MenuTriggerProps as MenuTriggerProps$1 } from "@prosekit/web/menu";
4
+ /** Props for the {@link MenuItem} Preact component. */
5
+ interface MenuItemProps {
12
6
  /**
13
7
  * The unique value for this menu item.
14
8
  *
@@ -30,20 +24,10 @@ interface MenuItemProps extends Omit<HTMLAttributes<MenuItemElement>, 'onSelect'
30
24
  /** Emitted when the the item is selected. */
31
25
  onSelect?: (event: MenuItemEvents['select']) => void;
32
26
  }
33
- /**
34
- * A Preact component that renders an `prosekit-menu-item` custom element.
35
- *
36
- * @public
37
- */
38
- declare const MenuItem: ForwardRefExoticComponent<MenuItemProps & RefAttributes<MenuItemElement>>;
39
- //#endregion
40
- //#region src/components/menu/menu-popup.gen.d.ts
41
- /**
42
- * Props for the {@link MenuPopup} Preact component.
43
- *
44
- * @public
45
- */
46
- interface MenuPopupProps extends HTMLAttributes<MenuPopupElement> {
27
+ /** A Preact component that renders an `prosekit-menu-item` custom element. */
28
+ declare const MenuItem: ForwardRefExoticComponent<MenuItemProps & Omit<HTMLAttributes<MenuItemElement>, 'onSelect'> & RefAttributes<MenuItemElement>>;
29
+ /** Props for the {@link MenuPopup} Preact component. */
30
+ interface MenuPopupProps {
47
31
  /**
48
32
  * By default, the MenuPopup element will listen for keydown events.
49
33
  * You can pass a different element to listen for keydown events.
@@ -52,20 +36,10 @@ interface MenuPopupProps extends HTMLAttributes<MenuPopupElement> {
52
36
  */
53
37
  eventTarget?: MenuPopupProps$1['eventTarget'];
54
38
  }
55
- /**
56
- * A Preact component that renders an `prosekit-menu-popup` custom element.
57
- *
58
- * @public
59
- */
60
- declare const MenuPopup: ForwardRefExoticComponent<MenuPopupProps & RefAttributes<MenuPopupElement>>;
61
- //#endregion
62
- //#region src/components/menu/menu-positioner.gen.d.ts
63
- /**
64
- * Props for the {@link MenuPositioner} Preact component.
65
- *
66
- * @public
67
- */
68
- interface MenuPositionerProps extends HTMLAttributes<MenuPositionerElement> {
39
+ /** A Preact component that renders an `prosekit-menu-popup` custom element. */
40
+ declare const MenuPopup: ForwardRefExoticComponent<MenuPopupProps & HTMLAttributes<MenuPopupElement> & RefAttributes<MenuPopupElement>>;
41
+ /** Props for the {@link MenuPositioner} Preact component. */
42
+ interface MenuPositionerProps {
69
43
  /**
70
44
  * The initial placement of the floating element
71
45
  *
@@ -194,20 +168,10 @@ interface MenuPositionerProps extends HTMLAttributes<MenuPositionerElement> {
194
168
  */
195
169
  altBoundary?: MenuPositionerProps$1['altBoundary'];
196
170
  }
197
- /**
198
- * A Preact component that renders an `prosekit-menu-positioner` custom element.
199
- *
200
- * @public
201
- */
202
- declare const MenuPositioner: ForwardRefExoticComponent<MenuPositionerProps & RefAttributes<MenuPositionerElement>>;
203
- //#endregion
204
- //#region src/components/menu/menu-root.gen.d.ts
205
- /**
206
- * Props for the {@link MenuRoot} Preact component.
207
- *
208
- * @public
209
- */
210
- interface MenuRootProps extends HTMLAttributes<MenuRootElement> {
171
+ /** A Preact component that renders an `prosekit-menu-positioner` custom element. */
172
+ declare const MenuPositioner: ForwardRefExoticComponent<MenuPositionerProps & HTMLAttributes<MenuPositionerElement> & RefAttributes<MenuPositionerElement>>;
173
+ /** Props for the {@link MenuRoot} Preact component. */
174
+ interface MenuRootProps {
211
175
  /**
212
176
  * Whether the overlay is initially open.
213
177
  * @default false
@@ -226,48 +190,49 @@ interface MenuRootProps extends HTMLAttributes<MenuRootElement> {
226
190
  /** Emitted when the menu is opened or closed. */
227
191
  onOpenChange?: (event: MenuRootEvents['openChange']) => void;
228
192
  }
229
- /**
230
- * A Preact component that renders an `prosekit-menu-root` custom element.
231
- *
232
- * @public
233
- */
234
- declare const MenuRoot: ForwardRefExoticComponent<MenuRootProps & RefAttributes<MenuRootElement>>;
235
- //#endregion
236
- //#region src/components/menu/menu-submenu-root.gen.d.ts
237
- /**
238
- * Props for the {@link MenuSubmenuRoot} Preact component.
239
- *
240
- * @public
241
- */
242
- interface MenuSubmenuRootProps extends HTMLAttributes<MenuSubmenuRootElement> {}
243
- /**
244
- * A Preact component that renders an `prosekit-menu-submenu-root` custom element.
245
- *
246
- * @public
247
- */
248
- declare const MenuSubmenuRoot: ForwardRefExoticComponent<MenuSubmenuRootProps & RefAttributes<MenuSubmenuRootElement>>;
249
- //#endregion
250
- //#region src/components/menu/menu-submenu-trigger.gen.d.ts
251
- /**
252
- * Props for the {@link MenuSubmenuTrigger} Preact component.
253
- *
254
- * @public
255
- */
256
- interface MenuSubmenuTriggerProps extends HTMLAttributes<MenuSubmenuTriggerElement> {}
257
- /**
258
- * A Preact component that renders an `prosekit-menu-submenu-trigger` custom element.
259
- *
260
- * @public
261
- */
262
- declare const MenuSubmenuTrigger: ForwardRefExoticComponent<MenuSubmenuTriggerProps & RefAttributes<MenuSubmenuTriggerElement>>;
263
- //#endregion
264
- //#region src/components/menu/menu-trigger.gen.d.ts
265
- /**
266
- * Props for the {@link MenuTrigger} Preact component.
267
- *
268
- * @public
269
- */
270
- interface MenuTriggerProps extends HTMLAttributes<MenuTriggerElement> {
193
+ /** A Preact component that renders an `prosekit-menu-root` custom element. */
194
+ declare const MenuRoot: ForwardRefExoticComponent<MenuRootProps & HTMLAttributes<MenuRootElement> & RefAttributes<MenuRootElement>>;
195
+ /** Props for the {@link MenuSubmenuRoot} Preact component. */
196
+ interface MenuSubmenuRootProps {
197
+ /**
198
+ * Whether the overlay is initially open.
199
+ * @default false
200
+ */
201
+ defaultOpen?: MenuSubmenuRootProps$1['defaultOpen'];
202
+ /**
203
+ * Whether the overlay is currently open.
204
+ * @default null
205
+ */
206
+ open?: MenuSubmenuRootProps$1['open'];
207
+ /**
208
+ * Whether the component should ignore user interaction.
209
+ * @default false
210
+ */
211
+ disabled?: MenuSubmenuRootProps$1['disabled'];
212
+ /** Emitted when the submenu is opened or closed. */
213
+ onOpenChange?: (event: MenuSubmenuRootEvents['openChange']) => void;
214
+ }
215
+ /** A Preact component that renders an `prosekit-menu-submenu-root` custom element. */
216
+ declare const MenuSubmenuRoot: ForwardRefExoticComponent<MenuSubmenuRootProps & HTMLAttributes<MenuSubmenuRootElement> & RefAttributes<MenuSubmenuRootElement>>;
217
+ /** Props for the {@link MenuSubmenuTrigger} Preact component. */
218
+ interface MenuSubmenuTriggerProps {
219
+ /**
220
+ * The unique value for this submenu trigger in the parent menu.
221
+ *
222
+ * @default ""
223
+ */
224
+ value?: MenuSubmenuTriggerProps$1['value'];
225
+ /**
226
+ * Whether this submenu trigger is disabled.
227
+ *
228
+ * @default false
229
+ */
230
+ disabled?: MenuSubmenuTriggerProps$1['disabled'];
231
+ }
232
+ /** A Preact component that renders an `prosekit-menu-submenu-trigger` custom element. */
233
+ declare const MenuSubmenuTrigger: ForwardRefExoticComponent<MenuSubmenuTriggerProps & HTMLAttributes<MenuSubmenuTriggerElement> & RefAttributes<MenuSubmenuTriggerElement>>;
234
+ /** Props for the {@link MenuTrigger} Preact component. */
235
+ interface MenuTriggerProps {
271
236
  /**
272
237
  * Whether the component should ignore user interaction.
273
238
  *
@@ -277,12 +242,7 @@ interface MenuTriggerProps extends HTMLAttributes<MenuTriggerElement> {
277
242
  /** Emitted when the menu is opened or closed. */
278
243
  onOpenChange?: (event: MenuTriggerEvents['openChange']) => void;
279
244
  }
280
- /**
281
- * A Preact component that renders an `prosekit-menu-trigger` custom element.
282
- *
283
- * @public
284
- */
285
- declare const MenuTrigger: ForwardRefExoticComponent<MenuTriggerProps & RefAttributes<MenuTriggerElement>>;
286
- //#endregion
287
- export { MenuItem, type MenuItemEvents, type MenuItemProps, MenuPopup, type MenuPopupProps, MenuPositioner, type MenuPositionerProps, MenuRoot, type MenuRootEvents, type MenuRootProps, MenuSubmenuRoot, type MenuSubmenuRootProps, MenuSubmenuTrigger, type MenuSubmenuTriggerProps, MenuTrigger, type MenuTriggerEvents, type MenuTriggerProps, OpenChangeEvent, SelectEvent };
245
+ /** A Preact component that renders an `prosekit-menu-trigger` custom element. */
246
+ declare const MenuTrigger: ForwardRefExoticComponent<MenuTriggerProps & HTMLAttributes<MenuTriggerElement> & RefAttributes<MenuTriggerElement>>;
247
+ export { MenuItem, type MenuItemProps, MenuPopup, type MenuPopupProps, MenuPositioner, type MenuPositionerProps, MenuRoot, type MenuRootProps, MenuSubmenuRoot, type MenuSubmenuRootProps, MenuSubmenuTrigger, type MenuSubmenuTriggerProps, MenuTrigger, type MenuTriggerProps };
288
248
  //# sourceMappingURL=prosekit-preact-menu.d.ts.map