@prosekit/solid 0.7.0-beta.3 → 0.7.0-beta.5

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-solid-autocomplete.d.ts +22 -73
  4. package/dist/prosekit-solid-autocomplete.d.ts.map +1 -1
  5. package/dist/prosekit-solid-autocomplete.js +7 -52
  6. package/dist/prosekit-solid-autocomplete.js.map +1 -1
  7. package/dist/prosekit-solid-block-handle.d.ts +22 -73
  8. package/dist/prosekit-solid-block-handle.d.ts.map +1 -1
  9. package/dist/prosekit-solid-block-handle.js +7 -52
  10. package/dist/prosekit-solid-block-handle.js.map +1 -1
  11. package/dist/prosekit-solid-drop-indicator.d.ts +4 -15
  12. package/dist/prosekit-solid-drop-indicator.d.ts.map +1 -1
  13. package/dist/prosekit-solid-drop-indicator.js +1 -10
  14. package/dist/prosekit-solid-drop-indicator.js.map +1 -1
  15. package/dist/prosekit-solid-inline-popover.d.ts +15 -46
  16. package/dist/prosekit-solid-inline-popover.d.ts.map +1 -1
  17. package/dist/prosekit-solid-inline-popover.js +5 -32
  18. package/dist/prosekit-solid-inline-popover.js.map +1 -1
  19. package/dist/prosekit-solid-menu.d.ts +61 -101
  20. package/dist/prosekit-solid-menu.d.ts.map +1 -1
  21. package/dist/prosekit-solid-menu.js +52 -76
  22. package/dist/prosekit-solid-menu.js.map +1 -1
  23. package/dist/prosekit-solid-popover.d.ts +18 -59
  24. package/dist/prosekit-solid-popover.d.ts.map +1 -1
  25. package/dist/prosekit-solid-popover.js +6 -42
  26. package/dist/prosekit-solid-popover.js.map +1 -1
  27. package/dist/prosekit-solid-resizable.d.ts +10 -31
  28. package/dist/prosekit-solid-resizable.d.ts.map +1 -1
  29. package/dist/prosekit-solid-resizable.js +4 -22
  30. package/dist/prosekit-solid-resizable.js.map +1 -1
  31. package/dist/prosekit-solid-table-handle.d.ts +44 -155
  32. package/dist/prosekit-solid-table-handle.d.ts.map +1 -1
  33. package/dist/prosekit-solid-table-handle.js +11 -110
  34. package/dist/prosekit-solid-table-handle.js.map +1 -1
  35. package/dist/prosekit-solid-tooltip.d.ts +18 -59
  36. package/dist/prosekit-solid-tooltip.d.ts.map +1 -1
  37. package/dist/prosekit-solid-tooltip.js +6 -42
  38. package/dist/prosekit-solid-tooltip.js.map +1 -1
  39. package/dist/prosekit-solid.d.ts +0 -21
  40. package/dist/prosekit-solid.d.ts.map +1 -1
  41. package/dist/prosekit-solid.js +0 -28
  42. package/dist/prosekit-solid.js.map +1 -1
  43. package/package.json +4 -4
  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 +66 -19
  68. package/src/components/menu/menu-submenu-trigger.gen.ts +40 -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-solid-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 { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link BlockHandleAdd} Solid component.\n *\n * @public\n */\nexport interface BlockHandleAddProps extends JSX.HTMLAttributes<BlockHandleAddElement> {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleAddElementProps['editor'];\n}\n\n/**\n * A Solid component that renders an `prosekit-block-handle-add` custom element.\n *\n * @public\n */\nexport const BlockHandleAdd: Component<BlockHandleAddProps> = (props): any => {\n registerBlockHandleAddElement();\n\n const [getElement, setElement] = createSignal<BlockHandleAddElement | null>(null);\n\n const [elementProps, restProps] = splitProps(props, ['editor']);\n\n const p0Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { editor: elementProps.editor ?? p0Fallback });\n });\n\n return () =>\n h(\n 'prosekit-block-handle-add',\n mergeProps(restProps, {\n ref: (el: BlockHandleAddElement | null) => {\n setElement(el);\n },\n }),\n );\n};\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 { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link BlockHandleDraggable} Solid component.\n *\n * @public\n */\nexport interface BlockHandleDraggableProps extends JSX.HTMLAttributes<BlockHandleDraggableElement> {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleDraggableElementProps['editor'];\n}\n\n/**\n * A Solid component that renders an `prosekit-block-handle-draggable` custom element.\n *\n * @public\n */\nexport const BlockHandleDraggable: Component<BlockHandleDraggableProps> = (props): any => {\n registerBlockHandleDraggableElement();\n\n const [getElement, setElement] = createSignal<BlockHandleDraggableElement | null>(null);\n\n const [elementProps, restProps] = splitProps(props, ['editor']);\n\n const p0Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { editor: elementProps.editor ?? p0Fallback });\n });\n\n return () =>\n h(\n 'prosekit-block-handle-draggable',\n mergeProps(restProps, {\n ref: (el: BlockHandleDraggableElement | null) => {\n setElement(el);\n },\n }),\n );\n};\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 type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/**\n * Props for the {@link BlockHandlePopup} Solid component.\n *\n * @public\n */\nexport interface BlockHandlePopupProps extends JSX.HTMLAttributes<BlockHandlePopupElement> {}\n\n/**\n * A Solid component that renders an `prosekit-block-handle-popup` custom element.\n *\n * @public\n */\nexport const BlockHandlePopup: Component<BlockHandlePopupProps> = (props): any => {\n registerBlockHandlePopupElement();\n\n const restProps = props;\n\n return () => h('prosekit-block-handle-popup', restProps);\n};\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 { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/**\n * Props for the {@link BlockHandlePositioner} Solid component.\n *\n * @public\n */\nexport interface BlockHandlePositionerProps extends JSX.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\n/**\n * A Solid component that renders an `prosekit-block-handle-positioner` custom element.\n *\n * @public\n */\nexport const BlockHandlePositioner: Component<BlockHandlePositionerProps> = (props): any => {\n registerBlockHandlePositionerElement();\n\n const [getElement, setElement] = createSignal<BlockHandlePositionerElement | null>(null);\n\n const [elementProps, restProps] = splitProps(props, ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy']);\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, {\n altBoundary: elementProps.altBoundary,\n autoUpdate: elementProps.autoUpdate,\n boundary: elementProps.boundary,\n elementContext: elementProps.elementContext,\n fitViewport: elementProps.fitViewport,\n flip: elementProps.flip,\n hide: elementProps.hide,\n hoist: elementProps.hoist,\n inline: elementProps.inline,\n offset: elementProps.offset,\n overflowPadding: elementProps.overflowPadding,\n overlap: elementProps.overlap,\n placement: elementProps.placement,\n rootBoundary: elementProps.rootBoundary,\n sameHeight: elementProps.sameHeight,\n sameWidth: elementProps.sameWidth,\n shift: elementProps.shift,\n strategy: elementProps.strategy,\n });\n });\n\n return () =>\n h(\n 'prosekit-block-handle-positioner',\n mergeProps(restProps, {\n ref: (el: BlockHandlePositionerElement | null) => {\n setElement(el);\n },\n }),\n );\n};\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 BlockHandleRootEvents, type BlockHandleRootProps as BlockHandleRootElementProps } from '@prosekit/web/block-handle';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link BlockHandleRoot} Solid component.\n *\n * @public\n */\nexport interface BlockHandleRootProps extends JSX.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\n/**\n * A Solid component that renders an `prosekit-block-handle-root` custom element.\n *\n * @public\n */\nexport const BlockHandleRoot: Component<BlockHandleRootProps> = (props): any => {\n registerBlockHandleRootElement();\n\n const [getElement, setElement] = createSignal<BlockHandleRootElement | null>(null);\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n const [elementProps, eventHandlers, restProps] = splitProps(props, ['editor'], ['onStateChange']);\n\n const p0Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { editor: elementProps.editor ?? p0Fallback });\n\n handlers.length = 0;\n handlers.push(eventHandlers.onStateChange);\n });\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['stateChange'].entries()) {\n element.addEventListener(\n eventName,\n (event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () =>\n h(\n 'prosekit-block-handle-root',\n mergeProps(restProps, {\n ref: (el: BlockHandleRootElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n\nexport type { BlockHandleRootEvents };\n"],"mappings":";;;;;;;;;;;;;AA+BA,MAAa,kBAAkD,UAAe;AAC5E,gCAA+B;CAE/B,MAAM,CAAC,YAAY,cAAc,aAA2C,KAAK;CAEjF,MAAM,CAAC,cAAc,aAAa,WAAW,OAAO,CAAC,SAAS,CAAC;CAE/D,MAAM,aAAa,kBAAkB;AAErC,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;AAEd,SAAO,OAAO,SAAS,EAAE,QAAQ,aAAa,UAAU,YAAY,CAAC;GACrE;AAEF,cACE,EACE,6BACA,WAAW,WAAW,EACpB,MAAM,OAAqC;AACzC,aAAW,GAAG;IAEjB,CAAC,CACH;;;;;;;;;;;;ACxBL,MAAa,wBAA8D,UAAe;AACxF,sCAAqC;CAErC,MAAM,CAAC,YAAY,cAAc,aAAiD,KAAK;CAEvF,MAAM,CAAC,cAAc,aAAa,WAAW,OAAO,CAAC,SAAS,CAAC;CAE/D,MAAM,aAAa,kBAAkB;AAErC,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;AAEd,SAAO,OAAO,SAAS,EAAE,QAAQ,aAAa,UAAU,YAAY,CAAC;GACrE;AAEF,cACE,EACE,mCACA,WAAW,WAAW,EACpB,MAAM,OAA2C;AAC/C,aAAW,GAAG;IAEjB,CAAC,CACH;;;;;;;;;;;;ACnCL,MAAa,oBAAsD,UAAe;AAChF,kCAAiC;CAEjC,MAAM,YAAY;AAElB,cAAa,EAAE,+BAA+B,UAAU;;;;;;;;;;;;ACqH1D,MAAa,yBAAgE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C5B,MAAI,CAAC,QAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,cAAc,CAAC,SAAS,CACxD,SAAQ,iBACN,YACC,UAAU;AACT,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cACE,EACE,8BACA,WAAW,WAAW,EACpB,MAAM,OAAsC;AAC1C,aAAW,GAAG;IAEjB,CAAC,CACH"}
1
+ {"version":3,"file":"prosekit-solid-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 { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link BlockHandleAdd} Solid component. */\nexport interface BlockHandleAddProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleAddElementProps['editor'];\n}\n\n/** A Solid component that renders an `prosekit-block-handle-add` custom element. */\nexport const BlockHandleAdd: Component<BlockHandleAddProps & JSX.HTMLAttributes<BlockHandleAddElement>> = (props): any => {\n registerBlockHandleAddElement();\n\n const [getElement, setElement] = createSignal<BlockHandleAddElement | null>(null);\n\n const [elementProps, restProps] = splitProps(props, ['editor']);\n\n const p0Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { editor: elementProps.editor ?? p0Fallback });\n });\n\n return () =>\n h(\n 'prosekit-block-handle-add',\n mergeProps(restProps, {\n ref: (el: BlockHandleAddElement | null) => {\n setElement(el);\n },\n }),\n );\n};\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 { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link BlockHandleDraggable} Solid component. */\nexport interface BlockHandleDraggableProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleDraggableElementProps['editor'];\n}\n\n/** A Solid component that renders an `prosekit-block-handle-draggable` custom element. */\nexport const BlockHandleDraggable: Component<BlockHandleDraggableProps & JSX.HTMLAttributes<BlockHandleDraggableElement>> = (props): any => {\n registerBlockHandleDraggableElement();\n\n const [getElement, setElement] = createSignal<BlockHandleDraggableElement | null>(null);\n\n const [elementProps, restProps] = splitProps(props, ['editor']);\n\n const p0Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { editor: elementProps.editor ?? p0Fallback });\n });\n\n return () =>\n h(\n 'prosekit-block-handle-draggable',\n mergeProps(restProps, {\n ref: (el: BlockHandleDraggableElement | null) => {\n setElement(el);\n },\n }),\n );\n};\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 type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/** Props for the {@link BlockHandlePopup} Solid component. */\nexport interface BlockHandlePopupProps {}\n\n/** A Solid component that renders an `prosekit-block-handle-popup` custom element. */\nexport const BlockHandlePopup: Component<BlockHandlePopupProps & JSX.HTMLAttributes<BlockHandlePopupElement>> = (props): any => {\n registerBlockHandlePopupElement();\n\n const restProps = props;\n\n return () => h('prosekit-block-handle-popup', restProps);\n};\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 { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/** Props for the {@link BlockHandlePositioner} Solid 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\n/** A Solid component that renders an `prosekit-block-handle-positioner` custom element. */\nexport const BlockHandlePositioner: Component<BlockHandlePositionerProps & JSX.HTMLAttributes<BlockHandlePositionerElement>> = (props): any => {\n registerBlockHandlePositionerElement();\n\n const [getElement, setElement] = createSignal<BlockHandlePositionerElement | null>(null);\n\n const [elementProps, restProps] = splitProps(props, ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy']);\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, {\n altBoundary: elementProps.altBoundary,\n autoUpdate: elementProps.autoUpdate,\n boundary: elementProps.boundary,\n elementContext: elementProps.elementContext,\n fitViewport: elementProps.fitViewport,\n flip: elementProps.flip,\n hide: elementProps.hide,\n hoist: elementProps.hoist,\n inline: elementProps.inline,\n offset: elementProps.offset,\n overflowPadding: elementProps.overflowPadding,\n overlap: elementProps.overlap,\n placement: elementProps.placement,\n rootBoundary: elementProps.rootBoundary,\n sameHeight: elementProps.sameHeight,\n sameWidth: elementProps.sameWidth,\n shift: elementProps.shift,\n strategy: elementProps.strategy,\n });\n });\n\n return () =>\n h(\n 'prosekit-block-handle-positioner',\n mergeProps(restProps, {\n ref: (el: BlockHandlePositionerElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerBlockHandleRootElement, type BlockHandleRootElement, type BlockHandleRootEvents, type BlockHandleRootProps as BlockHandleRootElementProps } from '@prosekit/web/block-handle';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link BlockHandleRoot} Solid 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\n/** A Solid component that renders an `prosekit-block-handle-root` custom element. */\nexport const BlockHandleRoot: Component<BlockHandleRootProps & JSX.HTMLAttributes<BlockHandleRootElement>> = (props): any => {\n registerBlockHandleRootElement();\n\n const [getElement, setElement] = createSignal<BlockHandleRootElement | null>(null);\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n const [elementProps, eventHandlers, restProps] = splitProps(props, ['editor'], ['onStateChange']);\n\n const p0Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { editor: elementProps.editor ?? p0Fallback });\n\n handlers.length = 0;\n handlers.push(eventHandlers.onStateChange);\n });\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['stateChange'].entries()) {\n element.addEventListener(\n eventName,\n (event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () =>\n h(\n 'prosekit-block-handle-root',\n mergeProps(restProps, {\n ref: (el: BlockHandleRootElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n"],"mappings":";;;;;AAqBA,MAAa,kBAA8F,UAAe;AACxH,gCAA+B;CAE/B,MAAM,CAAC,YAAY,cAAc,aAA2C,KAAK;CAEjF,MAAM,CAAC,cAAc,aAAa,WAAW,OAAO,CAAC,SAAS,CAAC;CAE/D,MAAM,aAAa,kBAAkB;AAErC,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;AAEd,SAAO,OAAO,SAAS,EAAE,QAAQ,aAAa,UAAU,YAAY,CAAC;GACrE;AAEF,cACE,EACE,6BACA,WAAW,WAAW,EACpB,MAAM,OAAqC;AACzC,aAAW,GAAG;IAEjB,CAAC,CACH;;;ACxBL,MAAa,wBAAgH,UAAe;AAC1I,sCAAqC;CAErC,MAAM,CAAC,YAAY,cAAc,aAAiD,KAAK;CAEvF,MAAM,CAAC,cAAc,aAAa,WAAW,OAAO,CAAC,SAAS,CAAC;CAE/D,MAAM,aAAa,kBAAkB;AAErC,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;AAEd,SAAO,OAAO,SAAS,EAAE,QAAQ,aAAa,UAAU,YAAY,CAAC;GACrE;AAEF,cACE,EACE,mCACA,WAAW,WAAW,EACpB,MAAM,OAA2C;AAC/C,aAAW,GAAG;IAEjB,CAAC,CACH;;;ACnCL,MAAa,oB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E,WAAS,SAAS;AAClB,WAAS,KAAK,cAAc,cAAc;GAC1C;AAEF,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,cAAc,CAAC,SAAS,CACxD,SAAQ,iBACN,YACC,UAAU;AACT,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cACE,EACE,8BACA,WAAW,WAAW,EACpB,MAAM,OAAsC;AAC1C,aAAW,GAAG;IAEjB,CAAC,CACH"}
@@ -1,13 +1,7 @@
1
1
  import { Component, JSX } from "solid-js";
2
2
  import { DropIndicatorElement, DropIndicatorProps as DropIndicatorProps$1 } from "@prosekit/web/drop-indicator";
3
-
4
- //#region src/components/drop-indicator/drop-indicator.gen.d.ts
5
- /**
6
- * Props for the {@link DropIndicator} Solid component.
7
- *
8
- * @public
9
- */
10
- interface DropIndicatorProps extends JSX.HTMLAttributes<DropIndicatorElement> {
3
+ /** Props for the {@link DropIndicator} Solid component. */
4
+ interface DropIndicatorProps {
11
5
  /**
12
6
  * The ProseKit editor instance.
13
7
  *
@@ -22,12 +16,7 @@ interface DropIndicatorProps extends JSX.HTMLAttributes<DropIndicatorElement> {
22
16
  */
23
17
  width?: DropIndicatorProps$1['width'];
24
18
  }
25
- /**
26
- * A Solid component that renders an `prosekit-drop-indicator` custom element.
27
- *
28
- * @public
29
- */
30
- declare const DropIndicator: Component<DropIndicatorProps>;
31
- //#endregion
19
+ /** A Solid component that renders an `prosekit-drop-indicator` custom element. */
20
+ declare const DropIndicator: Component<DropIndicatorProps & JSX.HTMLAttributes<DropIndicatorElement>>;
32
21
  export { DropIndicator, type DropIndicatorProps };
33
22
  //# sourceMappingURL=prosekit-solid-drop-indicator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-solid-drop-indicator.d.ts","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"mappings":";;;;;;;;;UAgBiB,kBAAA,SAA2B,GAAA,CAAI,cAAA,CAAe,oBAAA;EAAD;;;;;;EAO5D,MAAA,GAAS,oBAAA;EAMT;;;;AAQF;EARE,KAAA,GAAQ,oBAAA;AAAA;;;;;;cAQG,aAAA,EAAe,SAAA,CAAU,kBAAA"}
1
+ {"version":3,"file":"prosekit-solid-drop-indicator.d.ts","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"mappings":";;;UAUiB,kBAAA;EAAkB;;;;;;EAOjC,MAAA,GAAS,oBAAA;EAMwB;;AAInC;;;EAJE,KAAA,GAAQ,oBAAA;AAAA;;cAIG,aAAA,EAAe,SAAA,CAAU,kBAAA,GAAqB,GAAA,CAAI,cAAA,CAAe,oBAAA"}
@@ -2,15 +2,7 @@ import { n as useEditorContext } from "./editor-context.js";
2
2
  import { createEffect, createSignal, mergeProps, splitProps } from "solid-js";
3
3
  import h from "solid-js/h";
4
4
  import { registerDropIndicatorElement } from "@prosekit/web/drop-indicator";
5
- //#region src/components/drop-indicator/drop-indicator.gen.ts
6
- /**
7
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
8
- */
9
- /**
10
- * A Solid component that renders an `prosekit-drop-indicator` custom element.
11
- *
12
- * @public
13
- */
5
+ /** A Solid component that renders an `prosekit-drop-indicator` custom element. */
14
6
  const DropIndicator = (props) => {
15
7
  registerDropIndicatorElement();
16
8
  const [getElement, setElement] = createSignal(null);
@@ -28,7 +20,6 @@ const DropIndicator = (props) => {
28
20
  setElement(el);
29
21
  } }));
30
22
  };
31
- //#endregion
32
23
  export { DropIndicator };
33
24
 
34
25
  //# sourceMappingURL=prosekit-solid-drop-indicator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-solid-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 { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link DropIndicator} Solid component.\n *\n * @public\n */\nexport interface DropIndicatorProps extends JSX.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\n/**\n * A Solid component that renders an `prosekit-drop-indicator` custom element.\n *\n * @public\n */\nexport const DropIndicator: Component<DropIndicatorProps> = (props): any => {\n registerDropIndicatorElement();\n\n const [getElement, setElement] = createSignal<DropIndicatorElement | null>(null);\n\n const [elementProps, restProps] = splitProps(props, ['editor', 'width']);\n\n const p0Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { editor: elementProps.editor ?? p0Fallback, width: elementProps.width });\n });\n\n return () =>\n h(\n 'prosekit-drop-indicator',\n mergeProps(restProps, {\n ref: (el: DropIndicatorElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAqCA,MAAa,iBAAgD,UAAe;AAC1E,+BAA8B;CAE9B,MAAM,CAAC,YAAY,cAAc,aAA0C,KAAK;CAEhF,MAAM,CAAC,cAAc,aAAa,WAAW,OAAO,CAAC,UAAU,QAAQ,CAAC;CAExE,MAAM,aAAa,kBAAkB;AAErC,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;AAEd,SAAO,OAAO,SAAS;GAAE,QAAQ,aAAa,UAAU;GAAY,OAAO,aAAa;GAAO,CAAC;GAChG;AAEF,cACE,EACE,2BACA,WAAW,WAAW,EACpB,MAAM,OAAoC;AACxC,aAAW,GAAG;IAEjB,CAAC,CACH"}
1
+ {"version":3,"file":"prosekit-solid-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 { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link DropIndicator} Solid 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\n/** A Solid component that renders an `prosekit-drop-indicator` custom element. */\nexport const DropIndicator: Component<DropIndicatorProps & JSX.HTMLAttributes<DropIndicatorElement>> = (props): any => {\n registerDropIndicatorElement();\n\n const [getElement, setElement] = createSignal<DropIndicatorElement | null>(null);\n\n const [elementProps, restProps] = splitProps(props, ['editor', 'width']);\n\n const p0Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { editor: elementProps.editor ?? p0Fallback, width: elementProps.width });\n });\n\n return () =>\n h(\n 'prosekit-drop-indicator',\n mergeProps(restProps, {\n ref: (el: DropIndicatorElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n"],"mappings":";;;;;AA2BA,MAAa,iBAA2F,UAAe;AACrH,+BAA8B;CAE9B,MAAM,CAAC,YAAY,cAAc,aAA0C,KAAK;CAEhF,MAAM,CAAC,cAAc,aAAa,WAAW,OAAO,CAAC,UAAU,QAAQ,CAAC;CAExE,MAAM,aAAa,kBAAkB;AAErC,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;AAEd,SAAO,OAAO,SAAS;GAAE,QAAQ,aAAa,UAAU;GAAY,OAAO,aAAa;GAAO,CAAC;GAChG;AAEF,cACE,EACE,2BACA,WAAW,WAAW,EACpB,MAAM,OAAoC;AACxC,aAAW,GAAG;IAEjB,CAAC,CACH"}
@@ -1,27 +1,11 @@
1
1
  import { Component, JSX } from "solid-js";
2
- import { InlinePopoverPopupElement, InlinePopoverPositionerElement, InlinePopoverPositionerProps as InlinePopoverPositionerProps$1, InlinePopoverRootElement, InlinePopoverRootEvents, InlinePopoverRootProps as InlinePopoverRootProps$1, OpenChangeEvent } from "@prosekit/web/inline-popover";
3
-
4
- //#region src/components/inline-popover/inline-popover-popup.gen.d.ts
5
- /**
6
- * Props for the {@link InlinePopoverPopup} Solid component.
7
- *
8
- * @public
9
- */
10
- interface InlinePopoverPopupProps extends JSX.HTMLAttributes<InlinePopoverPopupElement> {}
11
- /**
12
- * A Solid component that renders an `prosekit-inline-popover-popup` custom element.
13
- *
14
- * @public
15
- */
16
- declare const InlinePopoverPopup: Component<InlinePopoverPopupProps>;
17
- //#endregion
18
- //#region src/components/inline-popover/inline-popover-positioner.gen.d.ts
19
- /**
20
- * Props for the {@link InlinePopoverPositioner} Solid component.
21
- *
22
- * @public
23
- */
24
- interface InlinePopoverPositionerProps extends JSX.HTMLAttributes<InlinePopoverPositionerElement> {
2
+ import { InlinePopoverPopupElement, InlinePopoverPositionerElement, InlinePopoverPositionerProps as InlinePopoverPositionerProps$1, InlinePopoverRootElement, InlinePopoverRootEvents, InlinePopoverRootProps as InlinePopoverRootProps$1 } from "@prosekit/web/inline-popover";
3
+ /** Props for the {@link InlinePopoverPopup} Solid component. */
4
+ interface InlinePopoverPopupProps {}
5
+ /** A Solid component that renders an `prosekit-inline-popover-popup` custom element. */
6
+ declare const InlinePopoverPopup: Component<InlinePopoverPopupProps & JSX.HTMLAttributes<InlinePopoverPopupElement>>;
7
+ /** Props for the {@link InlinePopoverPositioner} Solid component. */
8
+ interface InlinePopoverPositionerProps {
25
9
  /**
26
10
  * The initial placement of the floating element
27
11
  *
@@ -149,20 +133,10 @@ interface InlinePopoverPositionerProps extends JSX.HTMLAttributes<InlinePopoverP
149
133
  */
150
134
  altBoundary?: InlinePopoverPositionerProps$1['altBoundary'];
151
135
  }
152
- /**
153
- * A Solid component that renders an `prosekit-inline-popover-positioner` custom element.
154
- *
155
- * @public
156
- */
157
- declare const InlinePopoverPositioner: Component<InlinePopoverPositionerProps>;
158
- //#endregion
159
- //#region src/components/inline-popover/inline-popover-root.gen.d.ts
160
- /**
161
- * Props for the {@link InlinePopoverRoot} Solid component.
162
- *
163
- * @public
164
- */
165
- interface InlinePopoverRootProps extends JSX.HTMLAttributes<InlinePopoverRootElement> {
136
+ /** A Solid component that renders an `prosekit-inline-popover-positioner` custom element. */
137
+ declare const InlinePopoverPositioner: Component<InlinePopoverPositionerProps & JSX.HTMLAttributes<InlinePopoverPositionerElement>>;
138
+ /** Props for the {@link InlinePopoverRoot} Solid component. */
139
+ interface InlinePopoverRootProps {
166
140
  /**
167
141
  * The ProseKit editor instance.
168
142
  *
@@ -194,15 +168,10 @@ interface InlinePopoverRootProps extends JSX.HTMLAttributes<InlinePopoverRootEle
194
168
  * @default false
195
169
  */
196
170
  disabled?: InlinePopoverRootProps$1['disabled'];
197
- /** */
171
+ /** Emitted when the open state of the popover changes. */
198
172
  onOpenChange?: (event: InlinePopoverRootEvents['openChange']) => void;
199
173
  }
200
- /**
201
- * A Solid component that renders an `prosekit-inline-popover-root` custom element.
202
- *
203
- * @public
204
- */
205
- declare const InlinePopoverRoot: Component<InlinePopoverRootProps>;
206
- //#endregion
207
- export { InlinePopoverPopup, type InlinePopoverPopupProps, InlinePopoverPositioner, type InlinePopoverPositionerProps, InlinePopoverRoot, type InlinePopoverRootEvents, type InlinePopoverRootProps, OpenChangeEvent };
174
+ /** A Solid component that renders an `prosekit-inline-popover-root` custom element. */
175
+ declare const InlinePopoverRoot: Component<InlinePopoverRootProps & JSX.HTMLAttributes<InlinePopoverRootElement>>;
176
+ export { InlinePopoverPopup, type InlinePopoverPopupProps, InlinePopoverPositioner, type InlinePopoverPositionerProps, InlinePopoverRoot, type InlinePopoverRootProps };
208
177
  //# sourceMappingURL=prosekit-solid-inline-popover.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-solid-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":";;;;;;;;;UAaiB,uBAAA,SAAgC,GAAA,CAAI,cAAA,CAAe,yBAAA;;AAOpE;;;;cAAa,kBAAA,EAAoB,SAAA,CAAU,uBAAA;;;;;;;;UCN1B,4BAAA,SAAqC,GAAA,CAAI,cAAA,CAAe,8BAAA;EDDoB;;AAO7F;;;ECAE,SAAA,GAAY,8BAAA;EDAoD;;;;ACNlE;EAYE,MAAA,GAAS,8BAAA;;;;;;;EAOT,IAAA,GAAO,8BAAA;EAqBE;;;;;;EAdT,KAAA,GAAQ,8BAAA;EA+DI;;;;;;EAxDZ,OAAA,GAAU,8BAAA;EAjC4D;;;;;;EAwCtE,MAAA,GAAS,8BAAA;EA5BT;;;;;EAkCA,eAAA,GAAkB,8BAAA;EAblB;;;;;EAmBA,QAAA,GAAW,8BAAA;EAAX;;;;;;;EAQA,UAAA,GAAa,8BAAA;EAsBb;;;;;;;;EAbA,IAAA,GAAO,8BAAA;EAyCQ;;;;;EAnCf,KAAA,GAAQ,8BAAA;EAmDyC;AAQnD;;;;;EApDE,WAAA,GAAc,8BAAA;;;AChFhB;;;;EDuFE,SAAA,GAAY,8BAAA;ECzEE;;;;;;EDgFd,UAAA,GAAa,8BAAA;EC9FmD;;;;;;EDqGhE,QAAA,GAAW,8BAAA;ECvFG;;;;;;ED8Fd,YAAA,GAAe,8BAAA;EC3Ef;;;;;AAQF;;ED2EE,cAAA,GAAiB,8BAAA;EC3Ea;;;;;;;EDmF9B,WAAA,GAAc,8BAAA;AAAA;;;;;;cAQH,uBAAA,EAAyB,SAAA,CAAU,4BAAA;;;;;;;;UCpI/B,sBAAA,SAA+B,GAAA,CAAI,cAAA,CAAe,wBAAA;EFH0B;;AAO7F;;;;EEGE,MAAA,GAAS,wBAAA;;;;ADTX;;;ECgBE,WAAA,GAAc,wBAAA;EDVF;;;;;;ECiBZ,eAAA,GAAkB,wBAAA;ED6BP;;;;ECxBX,IAAA,GAAO,wBAAA;ED6DK;;;;ECxDZ,QAAA,GAAW,wBAAA;ED6FG;EC3Fd,YAAA,IAAgB,KAAA,EAAO,uBAAA;AAAA;;;;;;cAQZ,iBAAA,EAAmB,SAAA,CAAU,sBAAA"}
1
+ {"version":3,"file":"prosekit-solid-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":";;;UAOiB,uBAAA;;cAGJ,kBAAA,EAAoB,SAAA,CAAU,uBAAA,GAA0B,GAAA,CAAI,cAAA,CAAe,yBAAA;;UCFvE,4BAAA;EDDuB;;;;AAGxC;ECIE,SAAA,GAAY,8BAAA;;;;;;EAMZ,MAAA,GAAS,8BAAA;EDV+B;;;;;;ECiBxC,IAAA,GAAO,8BAAA;EDjBwG;;ACFjH;;;;EA0BE,KAAA,GAAQ,8BAAA;EAPD;;;;;;EAcP,OAAA,GAAU,8BAAA;EAoCH;;;;;;EA7BP,MAAA,GAAS,8BAAA;EA8EQ;;;;;EAxEjB,eAAA,GAAkB,8BAAA;EAlClB;;;;;EAwCA,QAAA,GAAW,8BAAA;EAnBX;;;;;;;EA2BA,UAAA,GAAa,8BAAA;EAAb;;;;;;;;EASA,IAAA,GAAO,8BAAA;EAoBK;;;;;EAdZ,KAAA,GAAQ,8BAAA;EAmCO;;;;;;EA5Bf,WAAA,GAAc,8BAAA;EAgDH;;;;;;EAzCX,SAAA,GAAY,8BAAA;EAyCiC;;;;;;EAlC7C,UAAA,GAAa,8BAAA;EAkCiH;;;AChIhI;;;EDqGE,QAAA,GAAW,8BAAA;ECvFG;;;;;;ED8Fd,YAAA,GAAe,8BAAA;ECrGf;;;;;;;ED6GA,cAAA,GAAiB,8BAAA;ECrFjB;;;;;;;ED6FA,WAAA,GAAc,8BAAA;AAAA;;cAIH,uBAAA,EAAyB,SAAA,CAAU,4BAAA,GAA+B,GAAA,CAAI,cAAA,CAAe,8BAAA;;UChIjF,sBAAA;EFHuB;;;;AAGxC;;EEOE,MAAA,GAAS,wBAAA;EFPgC;;;;;;EEczC,WAAA,GAAc,wBAAA;EFd2B;;;;;;EEqBzC,eAAA,GAAkB,wBAAA;EDvBH;;;;EC4Bf,IAAA,GAAO,wBAAA;EDTA;;;;ECcP,QAAA,GAAW,wBAAA;EDmBA;ECjBX,YAAA,IAAgB,KAAA,EAAO,uBAAA;AAAA;;cAIZ,iBAAA,EAAmB,SAAA,CAAU,sBAAA,GAAyB,GAAA,CAAI,cAAA,CAAe,wBAAA"}
@@ -1,31 +1,14 @@
1
1
  import { n as useEditorContext } from "./editor-context.js";
2
2
  import { createEffect, createSignal, mergeProps, splitProps } from "solid-js";
3
3
  import h from "solid-js/h";
4
- import { OpenChangeEvent, registerInlinePopoverPopupElement, registerInlinePopoverPositionerElement, registerInlinePopoverRootElement } from "@prosekit/web/inline-popover";
5
- //#region src/components/inline-popover/inline-popover-popup.gen.ts
6
- /**
7
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
8
- */
9
- /**
10
- * A Solid component that renders an `prosekit-inline-popover-popup` custom element.
11
- *
12
- * @public
13
- */
4
+ import { registerInlinePopoverPopupElement, registerInlinePopoverPositionerElement, registerInlinePopoverRootElement } from "@prosekit/web/inline-popover";
5
+ /** A Solid component that renders an `prosekit-inline-popover-popup` custom element. */
14
6
  const InlinePopoverPopup = (props) => {
15
7
  registerInlinePopoverPopupElement();
16
8
  const restProps = props;
17
9
  return () => h("prosekit-inline-popover-popup", restProps);
18
10
  };
19
- //#endregion
20
- //#region src/components/inline-popover/inline-popover-positioner.gen.ts
21
- /**
22
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
23
- */
24
- /**
25
- * A Solid component that renders an `prosekit-inline-popover-positioner` custom element.
26
- *
27
- * @public
28
- */
11
+ /** A Solid component that renders an `prosekit-inline-popover-positioner` custom element. */
29
12
  const InlinePopoverPositioner = (props) => {
30
13
  registerInlinePopoverPositionerElement();
31
14
  const [getElement, setElement] = createSignal(null);
@@ -77,16 +60,7 @@ const InlinePopoverPositioner = (props) => {
77
60
  setElement(el);
78
61
  } }));
79
62
  };
80
- //#endregion
81
- //#region src/components/inline-popover/inline-popover-root.gen.ts
82
- /**
83
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
84
- */
85
- /**
86
- * A Solid component that renders an `prosekit-inline-popover-root` custom element.
87
- *
88
- * @public
89
- */
63
+ /** A Solid component that renders an `prosekit-inline-popover-root` custom element. */
90
64
  const InlinePopoverRoot = (props) => {
91
65
  registerInlinePopoverRootElement();
92
66
  const [getElement, setElement] = createSignal(null);
@@ -125,7 +99,6 @@ const InlinePopoverRoot = (props) => {
125
99
  setElement(el);
126
100
  } }));
127
101
  };
128
- //#endregion
129
- export { InlinePopoverPopup, InlinePopoverPositioner, InlinePopoverRoot, OpenChangeEvent };
102
+ export { InlinePopoverPopup, InlinePopoverPositioner, InlinePopoverRoot };
130
103
 
131
104
  //# sourceMappingURL=prosekit-solid-inline-popover.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-solid-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 type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/**\n * Props for the {@link InlinePopoverPopup} Solid component.\n *\n * @public\n */\nexport interface InlinePopoverPopupProps extends JSX.HTMLAttributes<InlinePopoverPopupElement> {}\n\n/**\n * A Solid component that renders an `prosekit-inline-popover-popup` custom element.\n *\n * @public\n */\nexport const InlinePopoverPopup: Component<InlinePopoverPopupProps> = (props): any => {\n registerInlinePopoverPopupElement();\n\n const restProps = props;\n\n return () => h('prosekit-inline-popover-popup', restProps);\n};\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 { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/**\n * Props for the {@link InlinePopoverPositioner} Solid component.\n *\n * @public\n */\nexport interface InlinePopoverPositionerProps extends JSX.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\n/**\n * A Solid component that renders an `prosekit-inline-popover-positioner` custom element.\n *\n * @public\n */\nexport const InlinePopoverPositioner: Component<InlinePopoverPositionerProps> = (props): any => {\n registerInlinePopoverPositionerElement();\n\n const [getElement, setElement] = createSignal<InlinePopoverPositionerElement | null>(null);\n\n const [elementProps, restProps] = splitProps(props, ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy']);\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, {\n altBoundary: elementProps.altBoundary,\n autoUpdate: elementProps.autoUpdate,\n boundary: elementProps.boundary,\n elementContext: elementProps.elementContext,\n fitViewport: elementProps.fitViewport,\n flip: elementProps.flip,\n hide: elementProps.hide,\n hoist: elementProps.hoist,\n inline: elementProps.inline,\n offset: elementProps.offset,\n overflowPadding: elementProps.overflowPadding,\n overlap: elementProps.overlap,\n placement: elementProps.placement,\n rootBoundary: elementProps.rootBoundary,\n sameHeight: elementProps.sameHeight,\n sameWidth: elementProps.sameWidth,\n shift: elementProps.shift,\n strategy: elementProps.strategy,\n });\n });\n\n return () =>\n h(\n 'prosekit-inline-popover-positioner',\n mergeProps(restProps, {\n ref: (el: InlinePopoverPositionerElement | null) => {\n setElement(el);\n },\n }),\n );\n};\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 InlinePopoverRootEvents, type InlinePopoverRootProps as InlinePopoverRootElementProps } from '@prosekit/web/inline-popover';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link InlinePopoverRoot} Solid component.\n *\n * @public\n */\nexport interface InlinePopoverRootProps extends JSX.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\n/**\n * A Solid component that renders an `prosekit-inline-popover-root` custom element.\n *\n * @public\n */\nexport const InlinePopoverRoot: Component<InlinePopoverRootProps> = (props): any => {\n registerInlinePopoverRootElement();\n\n const [getElement, setElement] = createSignal<InlinePopoverRootElement | null>(null);\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n const [elementProps, eventHandlers, restProps] = splitProps(props, ['defaultOpen', 'disabled', 'dismissOnEscape', 'editor', 'open'], ['onOpenChange']);\n\n const p3Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { defaultOpen: elementProps.defaultOpen, disabled: elementProps.disabled, dismissOnEscape: elementProps.dismissOnEscape, editor: elementProps.editor ?? p3Fallback, open: elementProps.open });\n\n handlers.length = 0;\n handlers.push(eventHandlers.onOpenChange);\n });\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['openChange'].entries()) {\n element.addEventListener(\n eventName,\n (event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () =>\n h(\n 'prosekit-inline-popover-root',\n mergeProps(restProps, {\n ref: (el: InlinePopoverRootElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n\nexport type { InlinePopoverRootEvents };\n"],"mappings":";;;;;;;;;;;;;AAoBA,MAAa,sBAA0D,UAAe;AACpF,oCAAmC;CAEnC,MAAM,YAAY;AAElB,cAAa,EAAE,iCAAiC,UAAU;;;;;;;;;;;;AC2H5D,MAAa,2BAAoE,UAAe;AAC9F,yCAAwC;CAExC,MAAM,CAAC,YAAY,cAAc,aAAoD,KAAK;CAE1F,MAAM,CAAC,cAAc,aAAa,WAAW,OAAO;EAAC;EAAe;EAAc;EAAY;EAAkB;EAAe;EAAQ;EAAQ;EAAS;EAAU;EAAU;EAAmB;EAAW;EAAa;EAAgB;EAAc;EAAa;EAAS;EAAW,CAAC;AAEvR,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;AAEd,SAAO,OAAO,SAAS;GACrB,aAAa,aAAa;GAC1B,YAAY,aAAa;GACzB,UAAU,aAAa;GACvB,gBAAgB,aAAa;GAC7B,aAAa,aAAa;GAC1B,MAAM,aAAa;GACnB,MAAM,aAAa;GACnB,OAAO,aAAa;GACpB,QAAQ,aAAa;GACrB,QAAQ,aAAa;GACrB,iBAAiB,aAAa;GAC9B,SAAS,aAAa;GACtB,WAAW,aAAa;GACxB,cAAc,aAAa;GAC3B,YAAY,aAAa;GACzB,WAAW,aAAa;GACxB,OAAO,aAAa;GACpB,UAAU,aAAa;GACxB,CAAC;GACF;AAEF,cACE,EACE,sCACA,WAAW,WAAW,EACpB,MAAM,OAA8C;AAClD,aAAW,GAAG;IAEjB,CAAC,CACH;;;;;;;;;;;;ACpIL,MAAa,qBAAwD,UAAe;AAClF,mCAAkC;CAElC,MAAM,CAAC,YAAY,cAAc,aAA8C,KAAK;CACpF,MAAM,WAAsD,EAAE;CAE9D,MAAM,CAAC,cAAc,eAAe,aAAa,WAAW,OAAO;EAAC;EAAe;EAAY;EAAmB;EAAU;EAAO,EAAE,CAAC,eAAe,CAAC;CAEtJ,MAAM,aAAa,kBAAkB;AAErC,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;AAEd,SAAO,OAAO,SAAS;GAAE,aAAa,aAAa;GAAa,UAAU,aAAa;GAAU,iBAAiB,aAAa;GAAiB,QAAQ,aAAa,UAAU;GAAY,MAAM,aAAa;GAAM,CAAC;AAErN,WAAS,SAAS;AAClB,WAAS,KAAK,cAAc,aAAa;GACzC;AAEF,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,aAAa,CAAC,SAAS,CACvD,SAAQ,iBACN,YACC,UAAU;AACT,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cACE,EACE,gCACA,WAAW,WAAW,EACpB,MAAM,OAAwC;AAC5C,aAAW,GAAG;IAEjB,CAAC,CACH"}
1
+ {"version":3,"file":"prosekit-solid-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 type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/** Props for the {@link InlinePopoverPopup} Solid component. */\nexport interface InlinePopoverPopupProps {}\n\n/** A Solid component that renders an `prosekit-inline-popover-popup` custom element. */\nexport const InlinePopoverPopup: Component<InlinePopoverPopupProps & JSX.HTMLAttributes<InlinePopoverPopupElement>> = (props): any => {\n registerInlinePopoverPopupElement();\n\n const restProps = props;\n\n return () => h('prosekit-inline-popover-popup', restProps);\n};\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 { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/** Props for the {@link InlinePopoverPositioner} Solid 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\n/** A Solid component that renders an `prosekit-inline-popover-positioner` custom element. */\nexport const InlinePopoverPositioner: Component<InlinePopoverPositionerProps & JSX.HTMLAttributes<InlinePopoverPositionerElement>> = (props): any => {\n registerInlinePopoverPositionerElement();\n\n const [getElement, setElement] = createSignal<InlinePopoverPositionerElement | null>(null);\n\n const [elementProps, restProps] = splitProps(props, ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy']);\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, {\n altBoundary: elementProps.altBoundary,\n autoUpdate: elementProps.autoUpdate,\n boundary: elementProps.boundary,\n elementContext: elementProps.elementContext,\n fitViewport: elementProps.fitViewport,\n flip: elementProps.flip,\n hide: elementProps.hide,\n hoist: elementProps.hoist,\n inline: elementProps.inline,\n offset: elementProps.offset,\n overflowPadding: elementProps.overflowPadding,\n overlap: elementProps.overlap,\n placement: elementProps.placement,\n rootBoundary: elementProps.rootBoundary,\n sameHeight: elementProps.sameHeight,\n sameWidth: elementProps.sameWidth,\n shift: elementProps.shift,\n strategy: elementProps.strategy,\n });\n });\n\n return () =>\n h(\n 'prosekit-inline-popover-positioner',\n mergeProps(restProps, {\n ref: (el: InlinePopoverPositionerElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerInlinePopoverRootElement, type InlinePopoverRootElement, type InlinePopoverRootEvents, type InlinePopoverRootProps as InlinePopoverRootElementProps } from '@prosekit/web/inline-popover';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link InlinePopoverRoot} Solid 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\n/** A Solid component that renders an `prosekit-inline-popover-root` custom element. */\nexport const InlinePopoverRoot: Component<InlinePopoverRootProps & JSX.HTMLAttributes<InlinePopoverRootElement>> = (props): any => {\n registerInlinePopoverRootElement();\n\n const [getElement, setElement] = createSignal<InlinePopoverRootElement | null>(null);\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n const [elementProps, eventHandlers, restProps] = splitProps(props, ['defaultOpen', 'disabled', 'dismissOnEscape', 'editor', 'open'], ['onOpenChange']);\n\n const p3Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { defaultOpen: elementProps.defaultOpen, disabled: elementProps.disabled, dismissOnEscape: elementProps.dismissOnEscape, editor: elementProps.editor ?? p3Fallback, open: elementProps.open });\n\n handlers.length = 0;\n handlers.push(eventHandlers.onOpenChange);\n });\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['openChange'].entries()) {\n element.addEventListener(\n eventName,\n (event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () =>\n h(\n 'prosekit-inline-popover-root',\n mergeProps(restProps, {\n ref: (el: InlinePopoverRootElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n"],"mappings":";;;;;AAUA,MAAa,sBAA0G,UAAe;AACpI,oCAAmC;CAEnC,MAAM,YAAY;AAElB,cAAa,EAAE,iCAAiC,UAAU;;;AC2H5D,MAAa,2BAAyH,UAAe;AACnJ,yCAAwC;CAExC,MAAM,CAAC,YAAY,cAAc,aAAoD,KAAK;CAE1F,MAAM,CAAC,cAAc,aAAa,WAAW,OAAO;EAAC;EAAe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KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,aAAa,CAAC,SAAS,CACvD,SAAQ,iBACN,YACC,UAAU;AACT,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cACE,EACE,gCACA,WAAW,WAAW,EACpB,MAAM,OAAwC;AAC5C,aAAW,GAAG;IAEjB,CAAC,CACH"}
@@ -1,13 +1,7 @@
1
1
  import { Component, JSX } from "solid-js";
2
- 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";
3
-
4
- //#region src/components/menu/menu-item.gen.d.ts
5
- /**
6
- * Props for the {@link MenuItem} Solid component.
7
- *
8
- * @public
9
- */
10
- interface MenuItemProps extends JSX.HTMLAttributes<MenuItemElement> {
2
+ 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";
3
+ /** Props for the {@link MenuItem} Solid component. */
4
+ interface MenuItemProps {
11
5
  /**
12
6
  * The unique value for this menu item.
13
7
  *
@@ -29,20 +23,10 @@ interface MenuItemProps extends JSX.HTMLAttributes<MenuItemElement> {
29
23
  /** Emitted when the the item is selected. */
30
24
  onSelect?: (event: MenuItemEvents['select']) => void;
31
25
  }
32
- /**
33
- * A Solid component that renders an `prosekit-menu-item` custom element.
34
- *
35
- * @public
36
- */
37
- declare const MenuItem: Component<MenuItemProps>;
38
- //#endregion
39
- //#region src/components/menu/menu-popup.gen.d.ts
40
- /**
41
- * Props for the {@link MenuPopup} Solid component.
42
- *
43
- * @public
44
- */
45
- interface MenuPopupProps extends JSX.HTMLAttributes<MenuPopupElement> {
26
+ /** A Solid component that renders an `prosekit-menu-item` custom element. */
27
+ declare const MenuItem: Component<MenuItemProps & JSX.HTMLAttributes<MenuItemElement>>;
28
+ /** Props for the {@link MenuPopup} Solid component. */
29
+ interface MenuPopupProps {
46
30
  /**
47
31
  * By default, the MenuPopup element will listen for keydown events.
48
32
  * You can pass a different element to listen for keydown events.
@@ -51,20 +35,10 @@ interface MenuPopupProps extends JSX.HTMLAttributes<MenuPopupElement> {
51
35
  */
52
36
  eventTarget?: MenuPopupProps$1['eventTarget'];
53
37
  }
54
- /**
55
- * A Solid component that renders an `prosekit-menu-popup` custom element.
56
- *
57
- * @public
58
- */
59
- declare const MenuPopup: Component<MenuPopupProps>;
60
- //#endregion
61
- //#region src/components/menu/menu-positioner.gen.d.ts
62
- /**
63
- * Props for the {@link MenuPositioner} Solid component.
64
- *
65
- * @public
66
- */
67
- interface MenuPositionerProps extends JSX.HTMLAttributes<MenuPositionerElement> {
38
+ /** A Solid component that renders an `prosekit-menu-popup` custom element. */
39
+ declare const MenuPopup: Component<MenuPopupProps & JSX.HTMLAttributes<MenuPopupElement>>;
40
+ /** Props for the {@link MenuPositioner} Solid component. */
41
+ interface MenuPositionerProps {
68
42
  /**
69
43
  * The initial placement of the floating element
70
44
  *
@@ -193,20 +167,10 @@ interface MenuPositionerProps extends JSX.HTMLAttributes<MenuPositionerElement>
193
167
  */
194
168
  altBoundary?: MenuPositionerProps$1['altBoundary'];
195
169
  }
196
- /**
197
- * A Solid component that renders an `prosekit-menu-positioner` custom element.
198
- *
199
- * @public
200
- */
201
- declare const MenuPositioner: Component<MenuPositionerProps>;
202
- //#endregion
203
- //#region src/components/menu/menu-root.gen.d.ts
204
- /**
205
- * Props for the {@link MenuRoot} Solid component.
206
- *
207
- * @public
208
- */
209
- interface MenuRootProps extends JSX.HTMLAttributes<MenuRootElement> {
170
+ /** A Solid component that renders an `prosekit-menu-positioner` custom element. */
171
+ declare const MenuPositioner: Component<MenuPositionerProps & JSX.HTMLAttributes<MenuPositionerElement>>;
172
+ /** Props for the {@link MenuRoot} Solid component. */
173
+ interface MenuRootProps {
210
174
  /**
211
175
  * Whether the overlay is initially open.
212
176
  * @default false
@@ -225,48 +189,49 @@ interface MenuRootProps extends JSX.HTMLAttributes<MenuRootElement> {
225
189
  /** Emitted when the menu is opened or closed. */
226
190
  onOpenChange?: (event: MenuRootEvents['openChange']) => void;
227
191
  }
228
- /**
229
- * A Solid component that renders an `prosekit-menu-root` custom element.
230
- *
231
- * @public
232
- */
233
- declare const MenuRoot: Component<MenuRootProps>;
234
- //#endregion
235
- //#region src/components/menu/menu-submenu-root.gen.d.ts
236
- /**
237
- * Props for the {@link MenuSubmenuRoot} Solid component.
238
- *
239
- * @public
240
- */
241
- interface MenuSubmenuRootProps extends JSX.HTMLAttributes<MenuSubmenuRootElement> {}
242
- /**
243
- * A Solid component that renders an `prosekit-menu-submenu-root` custom element.
244
- *
245
- * @public
246
- */
247
- declare const MenuSubmenuRoot: Component<MenuSubmenuRootProps>;
248
- //#endregion
249
- //#region src/components/menu/menu-submenu-trigger.gen.d.ts
250
- /**
251
- * Props for the {@link MenuSubmenuTrigger} Solid component.
252
- *
253
- * @public
254
- */
255
- interface MenuSubmenuTriggerProps extends JSX.HTMLAttributes<MenuSubmenuTriggerElement> {}
256
- /**
257
- * A Solid component that renders an `prosekit-menu-submenu-trigger` custom element.
258
- *
259
- * @public
260
- */
261
- declare const MenuSubmenuTrigger: Component<MenuSubmenuTriggerProps>;
262
- //#endregion
263
- //#region src/components/menu/menu-trigger.gen.d.ts
264
- /**
265
- * Props for the {@link MenuTrigger} Solid component.
266
- *
267
- * @public
268
- */
269
- interface MenuTriggerProps extends JSX.HTMLAttributes<MenuTriggerElement> {
192
+ /** A Solid component that renders an `prosekit-menu-root` custom element. */
193
+ declare const MenuRoot: Component<MenuRootProps & JSX.HTMLAttributes<MenuRootElement>>;
194
+ /** Props for the {@link MenuSubmenuRoot} Solid component. */
195
+ interface MenuSubmenuRootProps {
196
+ /**
197
+ * Whether the overlay is initially open.
198
+ * @default false
199
+ */
200
+ defaultOpen?: MenuSubmenuRootProps$1['defaultOpen'];
201
+ /**
202
+ * Whether the overlay is currently open.
203
+ * @default null
204
+ */
205
+ open?: MenuSubmenuRootProps$1['open'];
206
+ /**
207
+ * Whether the component should ignore user interaction.
208
+ * @default false
209
+ */
210
+ disabled?: MenuSubmenuRootProps$1['disabled'];
211
+ /** Emitted when the submenu is opened or closed. */
212
+ onOpenChange?: (event: MenuSubmenuRootEvents['openChange']) => void;
213
+ }
214
+ /** A Solid component that renders an `prosekit-menu-submenu-root` custom element. */
215
+ declare const MenuSubmenuRoot: Component<MenuSubmenuRootProps & JSX.HTMLAttributes<MenuSubmenuRootElement>>;
216
+ /** Props for the {@link MenuSubmenuTrigger} Solid component. */
217
+ interface MenuSubmenuTriggerProps {
218
+ /**
219
+ * The unique value for this submenu trigger in the parent menu.
220
+ *
221
+ * @default ""
222
+ */
223
+ value?: MenuSubmenuTriggerProps$1['value'];
224
+ /**
225
+ * Whether this submenu trigger is disabled.
226
+ *
227
+ * @default false
228
+ */
229
+ disabled?: MenuSubmenuTriggerProps$1['disabled'];
230
+ }
231
+ /** A Solid component that renders an `prosekit-menu-submenu-trigger` custom element. */
232
+ declare const MenuSubmenuTrigger: Component<MenuSubmenuTriggerProps & JSX.HTMLAttributes<MenuSubmenuTriggerElement>>;
233
+ /** Props for the {@link MenuTrigger} Solid component. */
234
+ interface MenuTriggerProps {
270
235
  /**
271
236
  * Whether the component should ignore user interaction.
272
237
  *
@@ -276,12 +241,7 @@ interface MenuTriggerProps extends JSX.HTMLAttributes<MenuTriggerElement> {
276
241
  /** Emitted when the menu is opened or closed. */
277
242
  onOpenChange?: (event: MenuTriggerEvents['openChange']) => void;
278
243
  }
279
- /**
280
- * A Solid component that renders an `prosekit-menu-trigger` custom element.
281
- *
282
- * @public
283
- */
284
- declare const MenuTrigger: Component<MenuTriggerProps>;
285
- //#endregion
286
- 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 };
244
+ /** A Solid component that renders an `prosekit-menu-trigger` custom element. */
245
+ declare const MenuTrigger: Component<MenuTriggerProps & JSX.HTMLAttributes<MenuTriggerElement>>;
246
+ export { MenuItem, type MenuItemProps, MenuPopup, type MenuPopupProps, MenuPositioner, type MenuPositionerProps, MenuRoot, type MenuRootProps, MenuSubmenuRoot, type MenuSubmenuRootProps, MenuSubmenuTrigger, type MenuSubmenuTriggerProps, MenuTrigger, type MenuTriggerProps };
287
247
  //# sourceMappingURL=prosekit-solid-menu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-solid-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,SAAsB,GAAA,CAAI,cAAA,CAAe,eAAA;EAoBrC;;;;;EAdnB,KAAA,GAAQ,eAAA;EANgD;;;;;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,GAAc,eAAA;EHL2B;;;;EGUzC,IAAA,GAAO,eAAA;EHEI;;;;EGGX,QAAA,GAAW,eAAA;EHKC;EGHZ,YAAA,IAAgB,KAAA,EAAO,cAAA;AAAA;AHWzB;;;;;AAAA,cGHa,QAAA,EAAU,SAAA,CAAU,aAAA;;;;;;;;UC1BhB,oBAAA,SAA6B,GAAA,CAAI,cAAA,CAAe,sBAAA;;;;;;cAOpD,eAAA,EAAiB,SAAA,CAAU,oBAAA;;;;;;;;UCPvB,uBAAA,SAAgC,GAAA,CAAI,cAAA,CAAe,yBAAA;;;;;;cAOvD,kBAAA,EAAoB,SAAA,CAAU,uBAAA;;;;;;;;UCN1B,gBAAA,SAAyB,GAAA,CAAI,cAAA,CAAe,kBAAA;ENoBxC;;;;;EMdnB,QAAA,GAAW,kBAAA;ENN6C;EMQxD,YAAA,IAAgB,KAAA,EAAO,iBAAA;AAAA;;;;;;cAQZ,WAAA,EAAa,SAAA,CAAU,gBAAA"}
1
+ {"version":3,"file":"prosekit-solid-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;;cAIR,QAAA,EAAU,SAAA,CAAU,aAAA,GAAgB,GAAA,CAAI,cAAA,CAAe,eAAA;;UCxBnD,cAAA;EDAa;;;;;;ECO5B,WAAA,GAAc,gBAAA;AAAA;;cAIH,SAAA,EAAW,SAAA,CAAU,cAAA,GAAiB,GAAA,CAAI,cAAA,CAAe,gBAAA;;UCXrD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