@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.
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 +10 -61
  4. package/dist/prosekit-preact-autocomplete.d.ts.map +1 -1
  5. package/dist/prosekit-preact-autocomplete.js +5 -50
  6. package/dist/prosekit-preact-autocomplete.js.map +1 -1
  7. package/dist/prosekit-preact-block-handle.d.ts +10 -61
  8. package/dist/prosekit-preact-block-handle.d.ts.map +1 -1
  9. package/dist/prosekit-preact-block-handle.js +5 -50
  10. package/dist/prosekit-preact-block-handle.js.map +1 -1
  11. package/dist/prosekit-preact-drop-indicator.d.ts +2 -13
  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 +6 -37
  16. package/dist/prosekit-preact-inline-popover.d.ts.map +1 -1
  17. package/dist/prosekit-preact-inline-popover.js +3 -30
  18. package/dist/prosekit-preact-inline-popover.js.map +1 -1
  19. package/dist/prosekit-preact-menu.d.ts +48 -88
  20. package/dist/prosekit-preact-menu.d.ts.map +1 -1
  21. package/dist/prosekit-preact-menu.js +37 -72
  22. package/dist/prosekit-preact-menu.js.map +1 -1
  23. package/dist/prosekit-preact-popover.d.ts +8 -49
  24. package/dist/prosekit-preact-popover.d.ts.map +1 -1
  25. package/dist/prosekit-preact-popover.js +4 -40
  26. package/dist/prosekit-preact-popover.js.map +1 -1
  27. package/dist/prosekit-preact-resizable.d.ts +4 -25
  28. package/dist/prosekit-preact-resizable.d.ts.map +1 -1
  29. package/dist/prosekit-preact-resizable.js +2 -20
  30. package/dist/prosekit-preact-resizable.js.map +1 -1
  31. package/dist/prosekit-preact-table-handle.d.ts +22 -133
  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 +8 -49
  36. package/dist/prosekit-preact-tooltip.d.ts.map +1 -1
  37. package/dist/prosekit-preact-tooltip.js +4 -40
  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 +3 -13
  45. package/src/components/autocomplete/autocomplete-item.gen.ts +3 -13
  46. package/src/components/autocomplete/autocomplete-popup.gen.ts +3 -13
  47. package/src/components/autocomplete/autocomplete-positioner.gen.ts +3 -13
  48. package/src/components/autocomplete/autocomplete-root.gen.ts +3 -13
  49. package/src/components/autocomplete/index.gen.ts +1 -3
  50. package/src/components/block-handle/block-handle-add.gen.ts +3 -13
  51. package/src/components/block-handle/block-handle-draggable.gen.ts +3 -13
  52. package/src/components/block-handle/block-handle-popup.gen.ts +3 -13
  53. package/src/components/block-handle/block-handle-positioner.gen.ts +3 -13
  54. package/src/components/block-handle/block-handle-root.gen.ts +3 -13
  55. package/src/components/block-handle/index.gen.ts +1 -3
  56. package/src/components/drop-indicator/drop-indicator.gen.ts +3 -13
  57. package/src/components/drop-indicator/index.gen.ts +1 -3
  58. package/src/components/inline-popover/index.gen.ts +1 -3
  59. package/src/components/inline-popover/inline-popover-popup.gen.ts +3 -13
  60. package/src/components/inline-popover/inline-popover-positioner.gen.ts +3 -13
  61. package/src/components/inline-popover/inline-popover-root.gen.ts +3 -13
  62. package/src/components/menu/index.gen.ts +1 -3
  63. package/src/components/menu/menu-item.gen.ts +3 -13
  64. package/src/components/menu/menu-popup.gen.ts +3 -13
  65. package/src/components/menu/menu-positioner.gen.ts +3 -13
  66. package/src/components/menu/menu-root.gen.ts +3 -13
  67. package/src/components/menu/menu-submenu-root.gen.ts +49 -17
  68. package/src/components/menu/menu-submenu-trigger.gen.ts +27 -18
  69. package/src/components/menu/menu-trigger.gen.ts +3 -13
  70. package/src/components/popover/index.gen.ts +1 -3
  71. package/src/components/popover/popover-popup.gen.ts +3 -13
  72. package/src/components/popover/popover-positioner.gen.ts +3 -13
  73. package/src/components/popover/popover-root.gen.ts +3 -13
  74. package/src/components/popover/popover-trigger.gen.ts +3 -13
  75. package/src/components/resizable/index.gen.ts +1 -3
  76. package/src/components/resizable/resizable-handle.gen.ts +3 -13
  77. package/src/components/resizable/resizable-root.gen.ts +3 -13
  78. package/src/components/table-handle/index.gen.ts +1 -3
  79. package/src/components/table-handle/table-handle-column-menu-root.gen.ts +3 -13
  80. package/src/components/table-handle/table-handle-column-menu-trigger.gen.ts +3 -13
  81. package/src/components/table-handle/table-handle-column-popup.gen.ts +3 -13
  82. package/src/components/table-handle/table-handle-column-positioner.gen.ts +3 -13
  83. package/src/components/table-handle/table-handle-drag-preview.gen.ts +3 -13
  84. package/src/components/table-handle/table-handle-drop-indicator.gen.ts +3 -13
  85. package/src/components/table-handle/table-handle-root.gen.ts +3 -13
  86. package/src/components/table-handle/table-handle-row-menu-root.gen.ts +3 -13
  87. package/src/components/table-handle/table-handle-row-menu-trigger.gen.ts +3 -13
  88. package/src/components/table-handle/table-handle-row-popup.gen.ts +3 -13
  89. package/src/components/table-handle/table-handle-row-positioner.gen.ts +3 -13
  90. package/src/components/tooltip/index.gen.ts +1 -3
  91. package/src/components/tooltip/tooltip-popup.gen.ts +3 -13
  92. package/src/components/tooltip/tooltip-positioner.gen.ts +3 -13
  93. package/src/components/tooltip/tooltip-root.gen.ts +3 -13
  94. package/src/components/tooltip/tooltip-trigger.gen.ts +3 -13
@@ -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 {\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 & HTMLAttributes<BlockHandleAddElement> & 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 {\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 & HTMLAttributes<BlockHandleDraggableElement> & 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 {}\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 & HTMLAttributes<BlockHandlePopupElement> & 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 {\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 & HTMLAttributes<BlockHandlePositionerElement> & 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 {\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 & HTMLAttributes<BlockHandleRootElement> & RefAttributes<BlockHandleRootElement>> = /* @__PURE__ */ forwardRef(BlockHandleRootComponent);\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,iBAAgK,2BAAW,wBAAwB;;;;;;ACnChN,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;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M,CAAC;;;;;;;AAQtH,MAAa,kBAAoK,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,cAAa,QAAQ;WACZ,aACT,cAAa,UA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ndicatorElement, 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
- */
4
+ /** Props for the {@link DropIndicator} Preact component. */
11
5
  interface DropIndicatorProps {
12
6
  /**
13
7
  * The ProseKit editor instance.
@@ -23,12 +17,7 @@ interface DropIndicatorProps {
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
- */
20
+ /** A Preact component that renders an `prosekit-drop-indicator` custom element. */
31
21
  declare const DropIndicator: ForwardRefExoticComponent<DropIndicatorProps & HTMLAttributes<DropIndicatorElement> & RefAttributes<DropIndicatorElement>>;
32
- //#endregion
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;EAaP;;;AAsCV;;;EA5CE,MAAA,GAAS,oBAAA;EA4C+E;;;;;EAtCxF,KAAA,GAAQ,oBAAA;AAAA;;;;;;cAsCG,aAAA,EAAe,yBAAA,CAA0B,kBAAA,GAAqB,cAAA,CAAe,oBAAA,IAAwB,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 {\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 & HTMLAttributes<DropIndicatorElement> & 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,gBAA4J,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,27 +1,11 @@
1
1
  import { HTMLAttributes } from "preact";
2
2
  import { ForwardRefExoticComponent, RefAttributes } from "preact/compat";
3
3
  import { InlinePopoverPopupElement, InlinePopoverPositionerElement, InlinePopoverPositionerProps as InlinePopoverPositionerProps$1, InlinePopoverRootElement, InlinePopoverRootEvents, InlinePopoverRootProps as InlinePopoverRootProps$1 } 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
- */
4
+ /** Props for the {@link InlinePopoverPopup} Preact component. */
11
5
  interface InlinePopoverPopupProps {}
12
- /**
13
- * A Preact component that renders an `prosekit-inline-popover-popup` custom element.
14
- *
15
- * @public
16
- */
6
+ /** A Preact component that renders an `prosekit-inline-popover-popup` custom element. */
17
7
  declare const InlinePopoverPopup: ForwardRefExoticComponent<InlinePopoverPopupProps & HTMLAttributes<InlinePopoverPopupElement> & 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
- */
8
+ /** Props for the {@link InlinePopoverPositioner} Preact component. */
25
9
  interface InlinePopoverPositionerProps {
26
10
  /**
27
11
  * The initial placement of the floating element
@@ -150,19 +134,9 @@ interface InlinePopoverPositionerProps {
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
- */
137
+ /** A Preact component that renders an `prosekit-inline-popover-positioner` custom element. */
158
138
  declare const InlinePopoverPositioner: ForwardRefExoticComponent<InlinePopoverPositionerProps & HTMLAttributes<InlinePopoverPositionerElement> & 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
- */
139
+ /** Props for the {@link InlinePopoverRoot} Preact component. */
166
140
  interface InlinePopoverRootProps {
167
141
  /**
168
142
  * The ProseKit editor instance.
@@ -198,12 +172,7 @@ interface InlinePopoverRootProps {
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
- */
175
+ /** A Preact component that renders an `prosekit-inline-popover-root` custom element. */
206
176
  declare const InlinePopoverRoot: ForwardRefExoticComponent<InlinePopoverRootProps & HTMLAttributes<InlinePopoverRootElement> & RefAttributes<InlinePopoverRootElement>>;
207
- //#endregion
208
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;;;;;;cA6BJ,kBAAA,EAAoB,yBAAA,CAA0B,uBAAA,GAA0B,cAAA,CAAe,yBAAA,IAA6B,aAAA,CAAc,yBAAA;;;;;;;AAA/I;UC7BiB,4BAAA;;;;;;EAMf,SAAA,GAAY,8BAAA;EDuBmB;;;;;ECjB/B,MAAA,GAAS,8BAAA;EDiByF;;;;;;ECVlG,IAAA,GAAO,8BAAA;;AAnBT;;;;;EA0BE,KAAA,GAAQ,8BAAA;EAAA;;;;;;EAOR,OAAA,GAAU,8BAAA;EA0CF;;;;;;EAnCR,MAAA,GAAS,8BAAA;EAsFK;;;;;EAhFd,eAAA,GAAkB,8BAAA;EAlCT;;;;;EAwCT,QAAA,GAAW,8BAAA;EAnBD;;;;;;;EA2BV,UAAA,GAAa,8BAAA;EAAA;;;;;;;;EASb,IAAA,GAAO,8BAAA;EA2BP;;;;;EArBA,KAAA,GAAQ,8BAAA;EA2CR;;;;;;EApCA,WAAA,GAAc,8BAAA;EAgF6O;;;;;;EAzE3P,SAAA,GAAY,8BAAA;EAyEwB;;;;;;EAlEpC,UAAA,GAAa,8BAAA;EAkEiI;;;;;;EA3D9I,QAAA,GAAW,8BAAA;ECrGI;;;;;;ED4Gf,YAAA,GAAe,8BAAA;EC7EJ;;;;;;;EDqFX,cAAA,GAAiB,8BAAA;EC/FjB;;;;;;;EDuGA,WAAA,GAAc,8BAAA;AAAA;;;ACnChB;;;cDuEa,uBAAA,EAAyB,yBAAA,CAA0B,4BAAA,GAA+B,cAAA,CAAe,8BAAA,IAAkC,aAAA,CAAc,8BAAA;;;;;;;ADrI9J;UE3BiB,sBAAA;;;;;;;EAOf,MAAA,GAAS,wBAAA;EFoB+C;;;;;;EEbxD,WAAA,GAAc,wBAAA;EFa+H;;;;;;EEN7I,eAAA,GAAkB,wBAAA;EDvByB;;;;EC4B3C,IAAA,GAAO,wBAAA;EDFC;;;;ECOR,QAAA,GAAW,wBAAA;ED2BE;ECzBb,YAAA,IAAgB,KAAA,EAAO,uBAAA;AAAA;;;;;;cAwDZ,iBAAA,EAAmB,yBAAA,CAA0B,sBAAA,GAAyB,cAAA,CAAe,wBAAA,IAA4B,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"}
@@ -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 { 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
- */
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
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 {}\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 & HTMLAttributes<InlinePopoverPopupElement> & 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 {\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 & HTMLAttributes<InlinePopoverPositionerElement> & 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 {\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/**\n * A Preact component that renders an `prosekit-inline-popover-root` custom element.\n *\n * @public\n */\nexport const InlinePopoverRoot: ForwardRefExoticComponent<InlinePopoverRootProps & HTMLAttributes<InlinePopoverRootElement> & RefAttributes<InlinePopoverRootElement>> = /* @__PURE__ */ forwardRef(InlinePopoverRootComponent);\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,Q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AAI,UAAU,IAAI,iBAAiB,IAAI,QAAQ,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,oBAA4K,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,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,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;;;AAIxH,MAAa,oBAA4K,2BAAW,2BAA2B"}
@@ -1,13 +1,7 @@
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 } 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
- */
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. */
11
5
  interface MenuItemProps {
12
6
  /**
13
7
  * The unique value for this menu item.
@@ -30,19 +24,9 @@ interface MenuItemProps {
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
- */
27
+ /** A Preact component that renders an `prosekit-menu-item` custom element. */
38
28
  declare const MenuItem: ForwardRefExoticComponent<MenuItemProps & Omit<HTMLAttributes<MenuItemElement>, 'onSelect'> & 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
- */
29
+ /** Props for the {@link MenuPopup} Preact component. */
46
30
  interface MenuPopupProps {
47
31
  /**
48
32
  * By default, the MenuPopup element will listen for keydown events.
@@ -52,19 +36,9 @@ interface MenuPopupProps {
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
- */
39
+ /** A Preact component that renders an `prosekit-menu-popup` custom element. */
60
40
  declare const MenuPopup: ForwardRefExoticComponent<MenuPopupProps & HTMLAttributes<MenuPopupElement> & 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
- */
41
+ /** Props for the {@link MenuPositioner} Preact component. */
68
42
  interface MenuPositionerProps {
69
43
  /**
70
44
  * The initial placement of the floating element
@@ -194,19 +168,9 @@ interface MenuPositionerProps {
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
- */
171
+ /** A Preact component that renders an `prosekit-menu-positioner` custom element. */
202
172
  declare const MenuPositioner: ForwardRefExoticComponent<MenuPositionerProps & HTMLAttributes<MenuPositionerElement> & 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
- */
173
+ /** Props for the {@link MenuRoot} Preact component. */
210
174
  interface MenuRootProps {
211
175
  /**
212
176
  * Whether the overlay is initially open.
@@ -226,47 +190,48 @@ interface MenuRootProps {
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
- */
193
+ /** A Preact component that renders an `prosekit-menu-root` custom element. */
234
194
  declare const MenuRoot: ForwardRefExoticComponent<MenuRootProps & HTMLAttributes<MenuRootElement> & 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 {}
243
- /**
244
- * A Preact component that renders an `prosekit-menu-submenu-root` custom element.
245
- *
246
- * @public
247
- */
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. */
248
216
  declare const MenuSubmenuRoot: ForwardRefExoticComponent<MenuSubmenuRootProps & HTMLAttributes<MenuSubmenuRootElement> & 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 {}
257
- /**
258
- * A Preact component that renders an `prosekit-menu-submenu-trigger` custom element.
259
- *
260
- * @public
261
- */
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. */
262
233
  declare const MenuSubmenuTrigger: ForwardRefExoticComponent<MenuSubmenuTriggerProps & HTMLAttributes<MenuSubmenuTriggerElement> & 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
- */
234
+ /** Props for the {@link MenuTrigger} Preact component. */
270
235
  interface MenuTriggerProps {
271
236
  /**
272
237
  * Whether the component should ignore user interaction.
@@ -277,12 +242,7 @@ interface MenuTriggerProps {
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
- */
245
+ /** A Preact component that renders an `prosekit-menu-trigger` custom element. */
285
246
  declare const MenuTrigger: ForwardRefExoticComponent<MenuTriggerProps & HTMLAttributes<MenuTriggerElement> & RefAttributes<MenuTriggerElement>>;
286
- //#endregion
287
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
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-preact-menu.d.ts","names":[],"sources":["../src/components/menu/menu-item.gen.ts","../src/components/menu/menu-popup.gen.ts","../src/components/menu/menu-positioner.gen.ts","../src/components/menu/menu-root.gen.ts","../src/components/menu/menu-submenu-root.gen.ts","../src/components/menu/menu-submenu-trigger.gen.ts","../src/components/menu/menu-trigger.gen.ts"],"mappings":";;;;;;;;;;UAciB,aAAA;EAoBkB;;;;;EAdjC,KAAA,GAAQ,eAAA;EAYR;;;;;EANA,QAAA,GAAW,eAAA;EAQgC;AAsD7C;;;;EAxDE,aAAA,GAAgB,eAAA;EAwDoD;EAtDpE,QAAA,IAAY,KAAA,EAAO,cAAA;AAAA;;;;;;cAsDR,QAAA,EAAU,yBAAA,CAA0B,aAAA,GAAgB,IAAA,CAAK,cAAA,CAAe,eAAA,iBAAgC,aAAA,CAAc,eAAA;;;;;;;;UC1ElH,cAAA;EDoBkB;;;;;;ECbjC,WAAA,GAAc,gBAAA;AAAA;;;;;;cAoCH,SAAA,EAAW,yBAAA,CAA0B,cAAA,GAAiB,cAAA,CAAe,gBAAA,IAAoB,aAAA,CAAc,gBAAA;;;;;;;;UC3CnG,mBAAA;EFoBkB;;;;;EEdjC,SAAA,GAAY,qBAAA;EFYZ;;;;;EENA,QAAA,GAAW,qBAAA;EFQgC;AAsD7C;;;;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AAA,GAA0B,cAAA,CAAe,yBAAA,IAA6B,aAAA,CAAc,yBAAA;;;;;;;;UC7B9H,gBAAA;ENoBkB;;;;;EMdjC,QAAA,GAAW,kBAAA;ENYX;EMVA,YAAA,IAAgB,KAAA,EAAO,iBAAA;AAAA;;;;;ANkEzB;cMZa,WAAA,EAAa,yBAAA,CAA0B,gBAAA,GAAmB,cAAA,CAAe,kBAAA,IAAsB,aAAA,CAAc,kBAAA"}
1
+ {"version":3,"file":"prosekit-preact-menu.d.ts","names":[],"sources":["../src/components/menu/menu-item.gen.ts","../src/components/menu/menu-popup.gen.ts","../src/components/menu/menu-positioner.gen.ts","../src/components/menu/menu-root.gen.ts","../src/components/menu/menu-submenu-root.gen.ts","../src/components/menu/menu-submenu-trigger.gen.ts","../src/components/menu/menu-trigger.gen.ts"],"mappings":";;;;UAQiB,aAAA;EAAa;;;;;EAM5B,KAAA,GAAQ,eAAA;EAcyB;;;;;EARjC,QAAA,GAAW,eAAA;EAMX;;;;;EAAA,aAAA,GAAgB,eAAA;EAE2B;EAA3C,QAAA,IAAY,KAAA,EAAO,cAAA;AAAA;;cAkDR,QAAA,EAAU,yBAAA,CAA0B,aAAA,GAAgB,IAAA,CAAK,cAAA,CAAe,eAAA,iBAAgC,aAAA,CAAc,eAAA;;UCtElH,cAAA;EDAa;;;;;;ECO5B,WAAA,GAAc,gBAAA;AAAA;;cAgCH,SAAA,EAAW,yBAAA,CAA0B,cAAA,GAAiB,cAAA,CAAe,gBAAA,IAAoB,aAAA,CAAc,gBAAA;;UCvCnG,mBAAA;EFAa;;;;;EEM5B,SAAA,GAAY,qBAAA;EFcqB;;;;;EERjC,QAAA,GAAW,qBAAA;EFMX;;;;;;;EEEA,UAAA,GAAa,qBAAA;EFkDqL;;;;;;EE3ClM,KAAA,GAAQ,qBAAA;EF2C2G;;;;;EErCnH,MAAA,GAAS,qBAAA;EFqCsD;;;;;;;;EE5B/D,IAAA,GAAO,qBAAA;ED1CsB;;;;AAuC/B;ECSE,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