@prosekit/solid 0.7.1 → 0.7.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete.d.ts","names":[],"sources":["../src/components/autocomplete/autocomplete-empty.gen.ts","../src/components/autocomplete/autocomplete-item.gen.ts","../src/components/autocomplete/autocomplete-popup.gen.ts","../src/components/autocomplete/autocomplete-positioner.gen.ts","../src/components/autocomplete/autocomplete-root.gen.ts"],"mappings":";;;UAOiB,sBAAA;;cAGJ,iBAAA,EAAmB,SAAA,CAAU,sBAAA,GAAyB,GAAA,CAAI,cAAA,CAAe,wBAAA;;UCFrE,qBAAA;EDDsB;;;;AAGvC;;;ECME,KAAA,GAAQ,uBAAA;EDN4E;;;;;ECYpF,QAAA,GAAW,uBAAA;EDZ6B;ECcxC,QAAA,IAAY,KAAA,EAAO,sBAAA;AAAA;;cAIR,gBAAA,EAAkB,SAAA,CAAU,qBAAA,GAAwB,GAAA,CAAI,cAAA,CAAe,uBAAA;;UCpBnE,sBAAA;EFDsB;;;;EEMrC,aAAA,IAAiB,KAAA,EAAO,uBAAA;EFGzB;;;;EEEC,cAAA,IAAkB,KAAA,EAAO,uBAAA;AAAA;;cAId,iBAAA,EAAmB,SAAA,CAAU,sBAAA,GAAyB,GAAA,CAAI,cAAA,CAAe,wBAAA;;UCdrE,2BAAA;EHDsB;;;;AAGvC;EGIE,SAAA,GAAY,6BAAA;;;;;;EAMZ,MAAA,GAAS,6BAAA;EHV8B;;;;;;EGiBvC,IAAA,GAAO,6BAAA;EHjBqG;EGmB5G,MAAA,GAAS,6BAAA;EFrBM;EEuBf,KAAA,GAAQ,6BAAA;;EAER,WAAA,GAAc,6BAAA;EFXH;EEaX,QAAA,GAAW,6BAAA;EFX8B;EEazC,eAAA,GAAkB,6BAAA;EFrBlB;;;;;EE2BA,QAAA,GAAW,6BAAA;EFnBC;;;AAId;;;;EEuBE,UAAA,GAAa,6BAAA;EFvBkD;;;;;;;;EEgC/D,IAAA,GAAO,6BAAA;EFhCkG;;;ACpB3G;;EC0DE,KAAA,GAAQ,6BAAA;EDhDwC;;;;;;ECuDhD,OAAA,GAAU,6BAAA;EDvDsD;;AAIlE;;;;EC0DE,SAAA,GAAY,6BAAA;ED1DqD;;;;;;ECiEjE,UAAA,GAAa,6BAAA;EDjEwD;;;;;ACdvE;EAsFE,YAAA,GAAe,6BAAA;;;;;;;;EAQf,cAAA,GAAiB,6BAAA;EAjEC;;;;;;;EAyElB,WAAA,GAAc,6BAAA;AAAA;;cAIH,sBAAA,EAAwB,SAAA,CAAU,2BAAA,GAA8B,GAAA,CAAI,cAAA,CAAe,6BAAA;;UCxG/E,qBAAA;EJHsB;;;;AAGvC;;EIOE,MAAA,GAAS,uBAAA;EJP+B;;;;;EIaxC,KAAA,GAAQ,uBAAA;EJbsB;;;;;;EIoB9B,MAAA,GAAS,uBAAA;;AHtBX;;;;;;;EG+BE,MAAA,GAAS,uBAAA;EHvBT;EGyBA,YAAA,IAAgB,KAAA,EAAO,sBAAA;EHnBvB;EGqBA,aAAA,IAAiB,KAAA,EAAO,sBAAA;EHnBxB;;;;EGwBA,aAAA,IAAiB,KAAA,EAAO,sBAAA;EHpBb;;;;EGyBX,cAAA,IAAkB,KAAA,EAAO,sBAAA;AAAA;;cAId,gBAAA,EAAkB,SAAA,CAAU,qBAAA,GAAwB,GAAA,CAAI,cAAA,CAAe,uBAAA"}
1
+ {"version":3,"file":"autocomplete.d.ts","names":[],"sources":["../src/components/autocomplete/autocomplete-empty.gen.ts","../src/components/autocomplete/autocomplete-item.gen.ts","../src/components/autocomplete/autocomplete-popup.gen.ts","../src/components/autocomplete/autocomplete-positioner.gen.ts","../src/components/autocomplete/autocomplete-root.gen.ts"],"mappings":";;;UAOiB,sBAAA;;cAGJ,iBAAA,EAAmB,SAAA,CAAU,sBAAA,GAAyB,GAAA,CAAI,cAAA,CAAe,wBAAA;;UCFrE,qBAAA;EDDsB;;;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A,CAAI,cAAA,CAAe,6BAAA;;UCxG/E,qBAAA;EJHsB;;;AAAA;AAGvC;;EIOE,MAAA,GAAS,uBAAA;EJP+B;;;;;EIaxC,KAAA,GAAQ,uBAAA;EJbsB;;;;;;EIoB9B,MAAA,GAAS,uBAAA;;AHtBX;;;;;;;EG+BE,MAAA,GAAS,uBAAA;EHvBT;EGyBA,YAAA,IAAgB,KAAA,EAAO,sBAAA;EHnBvB;EGqBA,aAAA,IAAiB,KAAA,EAAO,sBAAA;EHnBxB;;;;EGwBA,aAAA,IAAiB,KAAA,EAAO,sBAAA;EHpBb;;;;EGyBX,cAAA,IAAkB,KAAA,EAAO,sBAAA;AAAA;;cAId,gBAAA,EAAkB,SAAA,CAAU,qBAAA,GAAwB,GAAA,CAAI,cAAA,CAAe,uBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete.js","names":[],"sources":["../src/components/autocomplete/autocomplete-empty.gen.ts","../src/components/autocomplete/autocomplete-item.gen.ts","../src/components/autocomplete/autocomplete-popup.gen.ts","../src/components/autocomplete/autocomplete-positioner.gen.ts","../src/components/autocomplete/autocomplete-root.gen.ts"],"sourcesContent":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerAutocompleteEmptyElement, type AutocompleteEmptyElement } from '@prosekit/web/autocomplete';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/** Props for the {@link AutocompleteEmpty} Solid component. */\nexport interface AutocompleteEmptyProps {}\n\n/** A Solid component that renders an `prosekit-autocomplete-empty` custom element. */\nexport const AutocompleteEmpty: Component<AutocompleteEmptyProps & JSX.HTMLAttributes<AutocompleteEmptyElement>> = (props): any => {\n registerAutocompleteEmptyElement();\n\n const restProps = props;\n\n return () => h('prosekit-autocomplete-empty', restProps);\n};\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerAutocompleteItemElement, type AutocompleteItemElement, type AutocompleteItemEvents, type AutocompleteItemProps as AutocompleteItemElementProps } from '@prosekit/web/autocomplete';\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 AutocompleteItem} Solid component. */\nexport interface AutocompleteItemProps {\n /**\n * The value of the item, which will be matched against the query.\n *\n * If not provided, the value is the item's text content.\n *\n * @default \"\"\n */\n value?: AutocompleteItemElementProps['value'];\n /**\n * Whether this option is disabled.\n *\n * @default false\n */\n disabled?: AutocompleteItemElementProps['disabled'];\n /** Emitted when the the item is selected. */\n onSelect?: (event: AutocompleteItemEvents['select']) => void;\n}\n\n/** A Solid component that renders an `prosekit-autocomplete-item` custom element. */\nexport const AutocompleteItem: Component<AutocompleteItemProps & JSX.HTMLAttributes<AutocompleteItemElement>> = (props): any => {\n registerAutocompleteItemElement();\n\n const [getElement, setElement] = createSignal<AutocompleteItemElement | null>(null);\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n const [elementProps, eventHandlers, restProps] = splitProps(props, ['disabled', 'value'], ['onSelect']);\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { disabled: elementProps.disabled, value: elementProps.value });\n\n handlers.length = 0;\n handlers.push(eventHandlers.onSelect);\n });\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['select'].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-autocomplete-item',\n mergeProps(restProps, {\n ref: (el: AutocompleteItemElement | 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 { registerAutocompletePopupElement, type AutocompletePopupElement, type AutocompletePopupEvents } from '@prosekit/web/autocomplete';\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 AutocompletePopup} Solid component. */\nexport interface AutocompletePopupProps {\n /**\n * Emitted when the selected value changes. Only available when multiple is\n * false.\n */\n onValueChange?: (event: AutocompletePopupEvents['valueChange']) => void;\n /**\n * Emitted when the selected values change. Only available when multiple is\n * true.\n */\n onValuesChange?: (event: AutocompletePopupEvents['valuesChange']) => void;\n}\n\n/** A Solid component that renders an `prosekit-autocomplete-popup` custom element. */\nexport const AutocompletePopup: Component<AutocompletePopupProps & JSX.HTMLAttributes<AutocompletePopupElement>> = (props): any => {\n registerAutocompletePopupElement();\n\n const [getElement, setElement] = createSignal<AutocompletePopupElement | null>(null);\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n const [eventHandlers, restProps] = splitProps(props, ['onValueChange', 'onValuesChange']);\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n handlers.length = 0;\n handlers.push(eventHandlers.onValueChange);\n handlers.push(eventHandlers.onValuesChange);\n });\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['valueChange', 'valuesChange'].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-autocomplete-popup',\n mergeProps(restProps, {\n ref: (el: AutocompletePopupElement | 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 { registerAutocompletePositionerElement, type AutocompletePositionerElement, type AutocompletePositionerProps as AutocompletePositionerElementProps } from '@prosekit/web/autocomplete';\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 AutocompletePositioner} Solid component. */\nexport interface AutocompletePositionerProps {\n /**\n * The placement of the popover, relative to the text cursor.\n *\n * @default \"bottom-start\"\n */\n placement?: AutocompletePositionerElementProps['placement'];\n /**\n * The distance between the popover and the text selection.\n *\n * @default { mainAxis: 8, crossAxis: -4 }\n */\n offset?: AutocompletePositionerElementProps['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?: AutocompletePositionerElementProps['hide'];\n /** @default true */\n inline?: AutocompletePositionerElementProps['inline'];\n /** @default true */\n hoist?: AutocompletePositionerElementProps['hoist'];\n /** @default true */\n fitViewport?: AutocompletePositionerElementProps['fitViewport'];\n /** @default \"The body element\" */\n boundary?: AutocompletePositionerElementProps['boundary'];\n /** @default 8 */\n overflowPadding?: AutocompletePositionerElementProps['overflowPadding'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: AutocompletePositionerElementProps['strategy'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: AutocompletePositionerElementProps['autoUpdate'];\n /**\n * Whether to flip the `placement` in order to keep it in view when the\n * preferred placement(s) will overflow the clipping boundary. You can also\n * provide an array of placements to try sequentially if the preferred\n * `placement` does not fit.\n *\n * @default true\n */\n flip?: AutocompletePositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: AutocompletePositionerElementProps['shift'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: AutocompletePositionerElementProps['overlap'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: AutocompletePositionerElementProps['sameWidth'];\n /**\n * Whether to constrain the floating element's height so that it matches the\n * reference element.\n *\n * @default false\n */\n sameHeight?: AutocompletePositionerElementProps['sameHeight'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: AutocompletePositionerElementProps['rootBoundary'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: AutocompletePositionerElementProps['elementContext'];\n /**\n * Whether to check the alternate elementContext's boundary. Please see\n * https://floating-ui.com/docs/detectoverflow#altboundary for more\n * information.\n *\n * @default false\n */\n altBoundary?: AutocompletePositionerElementProps['altBoundary'];\n}\n\n/** A Solid component that renders an `prosekit-autocomplete-positioner` custom element. */\nexport const AutocompletePositioner: Component<AutocompletePositionerProps & JSX.HTMLAttributes<AutocompletePositionerElement>> = (props): any => {\n registerAutocompletePositionerElement();\n\n const [getElement, setElement] = createSignal<AutocompletePositionerElement | 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-autocomplete-positioner',\n mergeProps(restProps, {\n ref: (el: AutocompletePositionerElement | 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 { registerAutocompleteRootElement, type AutocompleteRootElement, type AutocompleteRootEvents, type AutocompleteRootProps as AutocompleteRootElementProps } from '@prosekit/web/autocomplete';\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 AutocompleteRoot} Solid component. */\nexport interface AutocompleteRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: AutocompleteRootElementProps['editor'];\n /**\n * The regular expression to match the query text to autocomplete.\n *\n * @default null\n */\n regex?: AutocompleteRootElementProps['regex'];\n /**\n * The filter function to determine if an item should be shown in the\n * listbox.\n *\n * @default defaultItemFilter\n */\n filter?: AutocompleteRootElementProps['filter'];\n /**\n * The reference to position the popup against. This can be a DOM element, a\n * Floating UI virtual element, or a function that returns either of them.\n * By default, the popup will be positioned against the text content that\n * triggers the autocomplete.\n *\n * @default null\n */\n anchor?: AutocompleteRootElementProps['anchor'];\n /** Fired when the open state changes. */\n onOpenChange?: (event: AutocompleteRootEvents['openChange']) => void;\n /** Fired when the query changes. */\n onQueryChange?: (event: AutocompleteRootEvents['queryChange']) => void;\n /**\n * Emitted when the selected value changes. Only available when multiple is\n * false.\n */\n onValueChange?: (event: AutocompleteRootEvents['valueChange']) => void;\n /**\n * Emitted when the selected values change. Only available when multiple is\n * true.\n */\n onValuesChange?: (event: AutocompleteRootEvents['valuesChange']) => void;\n}\n\n/** A Solid component that renders an `prosekit-autocomplete-root` custom element. */\nexport const AutocompleteRoot: Component<AutocompleteRootProps & JSX.HTMLAttributes<AutocompleteRootElement>> = (props): any => {\n registerAutocompleteRootElement();\n\n const [getElement, setElement] = createSignal<AutocompleteRootElement | null>(null);\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n const [elementProps, eventHandlers, restProps] = splitProps(props, ['anchor', 'editor', 'filter', 'regex'], ['onOpenChange', 'onQueryChange', 'onValueChange', 'onValuesChange']);\n\n const p1Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { anchor: elementProps.anchor, editor: elementProps.editor ?? p1Fallback, filter: elementProps.filter, regex: elementProps.regex });\n\n handlers.length = 0;\n handlers.push(eventHandlers.onOpenChange);\n handlers.push(eventHandlers.onQueryChange);\n handlers.push(eventHandlers.onValueChange);\n handlers.push(eventHandlers.onValuesChange);\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', 'queryChange', 'valueChange', 'valuesChange'].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-autocomplete-root',\n mergeProps(restProps, {\n ref: (el: AutocompleteRootElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n"],"mappings":";;;;;AAUA,MAAa,qBAAuG,UAAe;CACjI,kCAAkC;CAElC,MAAM,YAAY;CAElB,aAAa,EAAE,+BAA+B,UAAU;;;ACa1D,MAAa,oBAAoG,UAAe;CAC9H,iCAAiC;CAEjC,MAAM,CAAC,YAAY,cAAc,aAA6C,KAAK;CACnF,MAAM,WAAsD,EAAE;CAE9D,MAAM,CAAC,cAAc,eAAe,aAAa,WAAW,OAAO,CAAC,YAAY,QAAQ,EAAE,CAAC,WAAW,CAAC;CAEvG,mBAAmB;EACjB,MAAM,UAAU,YAAY;EAC5B,IAAI,CAAC,SAAS;EAEd,OAAO,OAAO,SAAS;GAAE,UAAU,aAAa;GAAU,OAAO,aAAa;GAAO,CAAC;EAEtF,SAAS,SAAS;EAClB,SAAS,KAAK,cAAc,SAAS;GACrC;CAEF,mBAAmB;EACjB,MAAM,UAAU,YAAY;EAC5B,IAAI,CAAC,SAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;EAChC,KAAK,MAAM,CAAC,OAAO,cAAc,CAAC,SAAS,CAAC,SAAS,EACnD,QAAQ,iBACN,YACC,UAAU;GACT,SAAS,SAAS,MAAM;KAE1B,EAAE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KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;EAEH,aAAa,GAAG,OAAO;GACvB;CAEF,aACE,EACE,8BACA,WAAW,WAAW,EACpB,MAAM,OAAuC;EAC3C,WAAW,GAAG;IAEjB,CAAC,CACH"}
1
+ {"version":3,"file":"autocomplete.js","names":[],"sources":["../src/components/autocomplete/autocomplete-empty.gen.ts","../src/components/autocomplete/autocomplete-item.gen.ts","../src/components/autocomplete/autocomplete-popup.gen.ts","../src/components/autocomplete/autocomplete-positioner.gen.ts","../src/components/autocomplete/autocomplete-root.gen.ts"],"sourcesContent":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerAutocompleteEmptyElement, type AutocompleteEmptyElement } from '@prosekit/web/autocomplete';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/** Props for the {@link AutocompleteEmpty} Solid component. */\nexport interface AutocompleteEmptyProps {}\n\n/** A Solid component that renders an `prosekit-autocomplete-empty` custom element. */\nexport const AutocompleteEmpty: Component<AutocompleteEmptyProps & JSX.HTMLAttributes<AutocompleteEmptyElement>> = (props): any => {\n registerAutocompleteEmptyElement();\n\n const restProps = props;\n\n return () => h('prosekit-autocomplete-empty', restProps);\n};\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerAutocompleteItemElement, type AutocompleteItemElement, type AutocompleteItemEvents, type AutocompleteItemProps as AutocompleteItemElementProps } from '@prosekit/web/autocomplete';\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 AutocompleteItem} Solid component. */\nexport interface AutocompleteItemProps {\n /**\n * The value of the item, which will be matched against the query.\n *\n * If not provided, the value is the item's text content.\n *\n * @default \"\"\n */\n value?: AutocompleteItemElementProps['value'];\n /**\n * Whether this option is disabled.\n *\n * @default false\n */\n disabled?: AutocompleteItemElementProps['disabled'];\n /** Emitted when the the item is selected. */\n onSelect?: (event: AutocompleteItemEvents['select']) => void;\n}\n\n/** A Solid component that renders an `prosekit-autocomplete-item` custom element. */\nexport const AutocompleteItem: Component<AutocompleteItemProps & JSX.HTMLAttributes<AutocompleteItemElement>> = (props): any => {\n registerAutocompleteItemElement();\n\n const [getElement, setElement] = createSignal<AutocompleteItemElement | null>(null);\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n const [elementProps, eventHandlers, restProps] = splitProps(props, ['disabled', 'value'], ['onSelect']);\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { disabled: elementProps.disabled, value: elementProps.value });\n\n handlers.length = 0;\n handlers.push(eventHandlers.onSelect);\n });\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['select'].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-autocomplete-item',\n mergeProps(restProps, {\n ref: (el: AutocompleteItemElement | 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 { registerAutocompletePopupElement, type AutocompletePopupElement, type AutocompletePopupEvents } from '@prosekit/web/autocomplete';\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 AutocompletePopup} Solid component. */\nexport interface AutocompletePopupProps {\n /**\n * Emitted when the selected value changes. Only available when multiple is\n * false.\n */\n onValueChange?: (event: AutocompletePopupEvents['valueChange']) => void;\n /**\n * Emitted when the selected values change. Only available when multiple is\n * true.\n */\n onValuesChange?: (event: AutocompletePopupEvents['valuesChange']) => void;\n}\n\n/** A Solid component that renders an `prosekit-autocomplete-popup` custom element. */\nexport const AutocompletePopup: Component<AutocompletePopupProps & JSX.HTMLAttributes<AutocompletePopupElement>> = (props): any => {\n registerAutocompletePopupElement();\n\n const [getElement, setElement] = createSignal<AutocompletePopupElement | null>(null);\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n const [eventHandlers, restProps] = splitProps(props, ['onValueChange', 'onValuesChange']);\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n handlers.length = 0;\n handlers.push(eventHandlers.onValueChange);\n handlers.push(eventHandlers.onValuesChange);\n });\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['valueChange', 'valuesChange'].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-autocomplete-popup',\n mergeProps(restProps, {\n ref: (el: AutocompletePopupElement | 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 { registerAutocompletePositionerElement, type AutocompletePositionerElement, type AutocompletePositionerProps as AutocompletePositionerElementProps } from '@prosekit/web/autocomplete';\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 AutocompletePositioner} Solid component. */\nexport interface AutocompletePositionerProps {\n /**\n * The placement of the popover, relative to the text cursor.\n *\n * @default \"bottom-start\"\n */\n placement?: AutocompletePositionerElementProps['placement'];\n /**\n * The distance between the popover and the text selection.\n *\n * @default { mainAxis: 8, crossAxis: -4 }\n */\n offset?: AutocompletePositionerElementProps['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?: AutocompletePositionerElementProps['hide'];\n /** @default true */\n inline?: AutocompletePositionerElementProps['inline'];\n /** @default true */\n hoist?: AutocompletePositionerElementProps['hoist'];\n /** @default true */\n fitViewport?: AutocompletePositionerElementProps['fitViewport'];\n /** @default \"The body element\" */\n boundary?: AutocompletePositionerElementProps['boundary'];\n /** @default 8 */\n overflowPadding?: AutocompletePositionerElementProps['overflowPadding'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: AutocompletePositionerElementProps['strategy'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: AutocompletePositionerElementProps['autoUpdate'];\n /**\n * Whether to flip the `placement` in order to keep it in view when the\n * preferred placement(s) will overflow the clipping boundary. You can also\n * provide an array of placements to try sequentially if the preferred\n * `placement` does not fit.\n *\n * @default true\n */\n flip?: AutocompletePositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: AutocompletePositionerElementProps['shift'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: AutocompletePositionerElementProps['overlap'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: AutocompletePositionerElementProps['sameWidth'];\n /**\n * Whether to constrain the floating element's height so that it matches the\n * reference element.\n *\n * @default false\n */\n sameHeight?: AutocompletePositionerElementProps['sameHeight'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: AutocompletePositionerElementProps['rootBoundary'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: AutocompletePositionerElementProps['elementContext'];\n /**\n * Whether to check the alternate elementContext's boundary. Please see\n * https://floating-ui.com/docs/detectoverflow#altboundary for more\n * information.\n *\n * @default false\n */\n altBoundary?: AutocompletePositionerElementProps['altBoundary'];\n}\n\n/** A Solid component that renders an `prosekit-autocomplete-positioner` custom element. */\nexport const AutocompletePositioner: Component<AutocompletePositionerProps & JSX.HTMLAttributes<AutocompletePositionerElement>> = (props): any => {\n registerAutocompletePositionerElement();\n\n const [getElement, setElement] = createSignal<AutocompletePositionerElement | 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-autocomplete-positioner',\n mergeProps(restProps, {\n ref: (el: AutocompletePositionerElement | 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 { registerAutocompleteRootElement, type AutocompleteRootElement, type AutocompleteRootEvents, type AutocompleteRootProps as AutocompleteRootElementProps } from '@prosekit/web/autocomplete';\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 AutocompleteRoot} Solid component. */\nexport interface AutocompleteRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: AutocompleteRootElementProps['editor'];\n /**\n * The regular expression to match the query text to autocomplete.\n *\n * @default null\n */\n regex?: AutocompleteRootElementProps['regex'];\n /**\n * The filter function to determine if an item should be shown in the\n * listbox.\n *\n * @default defaultItemFilter\n */\n filter?: AutocompleteRootElementProps['filter'];\n /**\n * The reference to position the popup against. This can be a DOM element, a\n * Floating UI virtual element, or a function that returns either of them.\n * By default, the popup will be positioned against the text content that\n * triggers the autocomplete.\n *\n * @default null\n */\n anchor?: AutocompleteRootElementProps['anchor'];\n /** Fired when the open state changes. */\n onOpenChange?: (event: AutocompleteRootEvents['openChange']) => void;\n /** Fired when the query changes. */\n onQueryChange?: (event: AutocompleteRootEvents['queryChange']) => void;\n /**\n * Emitted when the selected value changes. Only available when multiple is\n * false.\n */\n onValueChange?: (event: AutocompleteRootEvents['valueChange']) => void;\n /**\n * Emitted when the selected values change. Only available when multiple is\n * true.\n */\n onValuesChange?: (event: AutocompleteRootEvents['valuesChange']) => void;\n}\n\n/** A Solid component that renders an `prosekit-autocomplete-root` custom element. */\nexport const AutocompleteRoot: Component<AutocompleteRootProps & JSX.HTMLAttributes<AutocompleteRootElement>> = (props): any => {\n registerAutocompleteRootElement();\n\n const [getElement, setElement] = createSignal<AutocompleteRootElement | null>(null);\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n const [elementProps, eventHandlers, restProps] = splitProps(props, ['anchor', 'editor', 'filter', 'regex'], ['onOpenChange', 'onQueryChange', 'onValueChange', 'onValuesChange']);\n\n const p1Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { anchor: elementProps.anchor, editor: elementProps.editor ?? p1Fallback, filter: elementProps.filter, regex: elementProps.regex });\n\n handlers.length = 0;\n handlers.push(eventHandlers.onOpenChange);\n handlers.push(eventHandlers.onQueryChange);\n handlers.push(eventHandlers.onValueChange);\n handlers.push(eventHandlers.onValuesChange);\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', 'queryChange', 'valueChange', 'valuesChange'].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-autocomplete-root',\n mergeProps(restProps, {\n ref: (el: AutocompleteRootElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n"],"mappings":";;;;;AAUA,MAAa,qBAAuG,UAAe;CACjI,iCAAiC;CAEjC,MAAM,YAAY;CAElB,aAAa,EAAE,+BAA+B,SAAS;AACzD;;ACYA,MAAa,oBAAoG,UAAe;CAC9H,gCAAgC;CAEhC,MAAM,CAAC,YAAY,cAAc,aAA6C,IAAI;CAClF,MAAM,WAAsD,CAAC;CAE7D,MAAM,CAAC,cAAc,eAAe,aAAa,WAAW,OAAO,CAAC,YAAY,OAAO,GAAG,CAAC,UAAU,CAAC;CAEtG,mBAAmB;EACjB,MAAM,UAAU,WAAW;EAC3B,IAAI,CAAC,SAAS;EAEd,OAAO,OAAO,SAAS;GAAE,UAAU,aAAa;GAAU,OAAO,aAAa;EAAM,CAAC;EAErF,SAAS,SAAS;EAClB,SAAS,KAAK,cAAc,QAAQ;CACtC,CAAC;CAED,mBAAmB;EACjB,MAAM,UAAU,WAAW;EAC3B,IAAI,CAAC,SAAS;EAEd,MAAM,KAAK,IAAI,gBAAgB;EAC/B,KAAK,MAAM,CAAC,OAAO,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAClD,QAAQ,iBACN,YACC,UAAU;GACT,SAAS,SAAS,KAAK;EACzB,GACA,EAAE,QAAQ,GAAG,OAAO,CACtB;EAEF,aAAa,GAAG,MAAM;CACxB,CAAC;CAED,aACE,EACE,8BACA,WAAW,WAAW,EACpB,MAAM,OAAuC;EAC3C,WAAW,EAAE;CACf,EACF,CAAC,CACH;AACJ;;AClDA,MAAa,qBAAuG,UAAe;CACjI,iCAAiC;CAEjC,MAAM,CAAC,YAAY,cAAc,aAA8C,IAAI;CACnF,MAAM,WAAsD,CAAC;CAE7D,MAAM,CAAC,eAAe,aAAa,WAAW,OAAO,CAAC,iBAAiB,gBAAg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CACH,CAAC;CAED,aACE,EACE,oCACA,WAAW,WAAW,EACpB,MAAM,OAA6C;EACjD,WAAW,EAAE;CACf,EACF,CAAC,CACH;AACJ;;ACnGA,MAAa,oBAAoG,UAAe;CAC9H,gCAAgC;CAEhC,MAAM,CAAC,YAAY,cAAc,aAA6C,IAAI;CAClF,MAAM,WAAsD,CAAC;CAE7D,MAAM,CAAC,cAAc,eAAe,aAAa,WAAW,OAAO;EAAC;EAAU;EAAU;EAAU;CAAO,GAAG;EAAC;EAAgB;EAAiB;EAAiB;CAAgB,CAAC;CAEhL,MAAM,aAAa,iBAAiB;CAEpC,mBAAmB;EACjB,MAAM,UAAU,WAAW;EAC3B,IAAI,CAAC,SAAS;EAEd,OAAO,OAAO,SAAS;GAAE,QAAQ,aAAa;GAAQ,QAAQ,aAAa,UAAU;GAAY,QAAQ,aAAa;GAAQ,OAAO,aAAa;EAAM,CAAC;EAEzJ,SAAS,SAAS;EAClB,SAAS,KAAK,cAAc,YAAY;EACxC,SAAS,KAAK,cAAc,aAAa;EACzC,SAAS,KAAK,cAAc,aAAa;EACzC,SAAS,KAAK,cAAc,cAAc;CAC5C,CAAC;CAED,mBAAmB;EACjB,MAAM,UAAU,WAAW;EAC3B,IAAI,CAAC,SAAS;EAEd,MAAM,KAAK,IAAI,gBAAgB;EAC/B,KAAK,MAAM,CAAC,OAAO,cAAc;GAAC;GAAc;GAAe;GAAe;EAAc,EAAE,QAAQ,GACpG,QAAQ,iBACN,YACC,UAAU;GACT,SAAS,SAAS,KAAK;EACzB,GACA,EAAE,QAAQ,GAAG,OAAO,CACtB;EAEF,aAAa,GAAG,MAAM;CACxB,CAAC;CAED,aACE,EACE,8BACA,WAAW,WAAW,EACpB,MAAM,OAAuC;EAC3C,WAAW,EAAE;CACf,EACF,CAAC,CACH;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"block-handle.d.ts","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popup.gen.ts","../src/components/block-handle/block-handle-positioner.gen.ts","../src/components/block-handle/block-handle-root.gen.ts"],"mappings":";;;UAUiB,mBAAA;EAAmB;;;;AAWpC;;EAJE,MAAA,GAAS,qBAAA;AAAA;;cAIE,cAAA,EAAgB,SAAA,CAAU,mBAAA,GAAsB,GAAA,CAAI,cAAA,CAAe,qBAAA;;UCX/D,yBAAA;EDAmB;;;;AAWpC;;ECJE,MAAA,GAAS,2BAAA;AAAA;;cAIE,oBAAA,EAAsB,SAAA,CAAU,yBAAA,GAA4B,GAAA,CAAI,cAAA,CAAe,2BAAA;;UCd3E,qBAAA;;cAGJ,gBAAA,EAAkB,SAAA,CAAU,qBAAA,GAAwB,GAAA,CAAI,cAAA,CAAe,uBAAA;;UCFnE,0BAAA;EHEmB;;;;AAWpC;EGPE,SAAA,GAAY,4BAAA;;;;;;;EAOZ,KAAA,GAAQ,4BAAA;EHAmB;;;;EGK3B,IAAA,GAAO,4BAAA;EHL4F;;;ACXrG;EEqBE,KAAA,GAAQ,4BAAA;;;;AFVV;EEeE,IAAA,GAAO,4BAAA;;;;;;EAMP,QAAA,GAAW,4BAAA;EFrB+B;;;;;;;EE6B1C,UAAA,GAAa,4BAAA;;AD3Cf;;;;ECiDE,MAAA,GAAS,4BAAA;ED9CE;;;;;;ECqDX,OAAA,GAAU,4BAAA;EDrD4B;;;;;;EC4DtC,WAAA,GAAc,4BAAA;ED5D2F;;;ACF3G;;;EAqEE,SAAA,GAAY,4BAAA;EAxDJ;;;;;;EA+DR,UAAA,GAAa,4BAAA;EArBH;;;;;;EA4BV,MAAA,GAAS,4BAAA;EAqBS;;;;;;EAdlB,QAAA,GAAW,4BAAA;EA7EX;;;;;;EAoFA,YAAA,GAAe,4BAAA;EArER;;;;;;EA4EP,eAAA,GAAkB,4BAAA;EAjDlB;;;;;;;EAyDA,cAAA,GAAiB,4BAAA;EA7BjB;;;;;;;EAqCA,WAAA,GAAc,4BAAA;AAAA;;cAIH,qBAAA,EAAuB,SAAA,CAAU,0BAAA,GAA6B,GAAA,CAAI,cAAA,CAAe,4BAAA;;UC1H7E,oBAAA;EJAmB;;;;AAWpC;;EIJE,MAAA,GAAS,sBAAA;EJI4B;EIFrC,aAAA,IAAiB,KAAA,EAAO,qBAAA;AAAA;;cAIb,eAAA,EAAiB,SAAA,CAAU,oBAAA,GAAuB,GAAA,CAAI,cAAA,CAAe,sBAAA"}
1
+ {"version":3,"file":"block-handle.d.ts","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popup.gen.ts","../src/components/block-handle/block-handle-positioner.gen.ts","../src/components/block-handle/block-handle-root.gen.ts"],"mappings":";;;UAUiB,mBAAA;EAAmB;;;AAOC;AAIrC;;EAJE,MAAA,GAAS,qBAA0B;AAAA;;cAIxB,cAAA,EAAgB,SAAA,CAAU,mBAAA,GAAsB,GAAA,CAAI,cAAA,CAAe,qBAAA;;UCX/D,yBAAA;EDAmB;;;AAOC;AAIrC;;ECJE,MAAA,GAAS,2BAAgC;AAAA;;cAI9B,oBAAA,EAAsB,SAAA,CAAU,yBAAA,GAA4B,GAAA,CAAI,cAAA,CAAe,2BAAA;;UCd3E,qBAAA;;cAGJ,gBAAA,EAAkB,SAAA,CAAU,qBAAA,GAAwB,GAAA,CAAI,cAAA,CAAe,uBAAA;;UCFnE,0BAAA;EHEmB;;;AAOC;AAIrC;EGPE,SAAA,GAAY,4BAAA;;;;;;;EAOZ,KAAA,GAAQ,4BAAA;EHAmB;;;;EGK3B,IAAA,GAAO,4BAAA;EHL4F;AAAA;;ACXrG;EEqBE,KAAA,GAAQ,4BAAA;;;AFdiC;AAI3C;EEeE,IAAA,GAAO,4BAAA;;;;;;EAMP,QAAA,GAAW,4BAAA;EFrB+B;;;;;;;EE6B1C,UAAA,GAAa,4BAAA;;AD3Cf;;;;ECiDE,MAAA,GAAS,4BAAA;ED9CE;;;;;;ECqDX,OAAA,GAAU,4BAAA;EDrD4B;;;;;;EC4DtC,WAAA,GAAc,4BAAA;ED5D2F;AAAA;;ACF3G;;;EAqEE,SAAA,GAAY,4BAAA;EAxDJ;;;;;;EA+DR,UAAA,GAAa,4BAAA;EArBH;;;;;;EA4BV,MAAA,GAAS,4BAAA;EAqBS;;;;;;EAdlB,QAAA,GAAW,4BAAA;EA7EX;;;;;;EAoFA,YAAA,GAAe,4BAAA;EArER;;;;;;EA4EP,eAAA,GAAkB,4BAAA;EAjDlB;;;;;;;EAyDA,cAAA,GAAiB,4BAAA;EA7BjB;;;;;;;EAqCA,WAAA,GAAc,4BAAA;AAAA;;cAIH,qBAAA,EAAuB,SAAA,CAAU,0BAAA,GAA6B,GAAA,CAAI,cAAA,CAAe,4BAAA;;UC1H7E,oBAAA;EJAmB;;;AAOC;AAIrC;;EIJE,MAAA,GAAS,sBAAA;EJI4B;EIFrC,aAAA,IAAiB,KAAA,EAAO,qBAAqB;AAAA;;cAIlC,eAAA,EAAiB,SAAA,CAAU,oBAAA,GAAuB,GAAA,CAAI,cAAA,CAAe,sBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"block-handle.js","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popup.gen.ts","../src/components/block-handle/block-handle-positioner.gen.ts","../src/components/block-handle/block-handle-root.gen.ts"],"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;CACxH,+BAA+B;CAE/B,MAAM,CAAC,YAAY,cAAc,aAA2C,KAAK;CAEjF,MAAM,CAAC,cAAc,aAAa,WAAW,OAAO,CAAC,SAAS,CAAC;CAE/D,MAAM,aAAa,kBAAkB;CAErC,mBAAmB;EACjB,MAAM,UAAU,YAAY;EAC5B,IAAI,CAAC,SAAS;EAEd,OAAO,OAAO,SAAS,EAAE,QAAQ,aAAa,UAAU,YAAY,CAAC;GACrE;CAEF,aACE,EACE,6BACA,WAAW,WAAW,EACpB,MAAM,OAAqC;EACzC,WAAW,GAAG;IAEjB,CAAC,CACH;;;ACxBL,MAAa,wBAAgH,UAAe;CAC1I,qCAAqC;CAErC,MAAM,CAAC,YAAY,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Aa,mBAAiG,UAAe;CAC3H,gCAAgC;CAEhC,MAAM,CAAC,YAAY,cAAc,aAA4C,KAAK;CAClF,MAAM,WAAsD,EAAE;CAE9D,MAAM,CAAC,cAAc,eAAe,aAAa,WAAW,OAAO,CAAC,SAAS,EAAE,CAAC,gBAAgB,CAAC;CAEjG,MAAM,aAAa,kBAAkB;CAErC,mBAAmB;EACjB,MAAM,UAAU,YAAY;EAC5B,IAAI,CAAC,SAAS;EAEd,OAAO,OAAO,SAAS,EAAE,QAAQ,aAAa,UAAU,YAAY,CAAC;EAErE,SAAS,SAAS;EAClB,SAAS,KAAK,cAAc,cAAc;GAC1C;CAEF,mBAAmB;EACjB,MAAM,UAAU,YAAY;EAC5B,IAAI,CAAC,SAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;EAChC,KAAK,MAAM,CAAC,OAAO,cAAc,CAAC,cAAc,CAAC,SAAS,EACxD,QAAQ,iBACN,YACC,UAAU;GACT,SAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;EAEH,aAAa,GAAG,OAAO;GACvB;CAEF,aACE,EACE,8BACA,WAAW,WAAW,EACpB,MAAM,OAAsC;EAC1C,WAAW,GAAG;IAEjB,CAAC,CACH"}
1
+ {"version":3,"file":"block-handle.js","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popup.gen.ts","../src/components/block-handle/block-handle-positioner.gen.ts","../src/components/block-handle/block-handle-root.gen.ts"],"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;CACxH,8BAA8B;CAE9B,MAAM,CAAC,YAAY,cAAc,aAA2C,IAAI;CAEhF,MAAM,CAAC,cAAc,aAAa,WAAW,OAAO,CAAC,QAAQ,CAAC;CAE9D,MAAM,aAAa,iBAAiB;CAEpC,mBAAmB;EACjB,MAAM,UAAU,WAAW;EAC3B,IAAI,CAAC,SAAS;EAEd,OAAO,OAAO,SAAS,EAAE,QAAQ,aAAa,UAAU,WAAW,CAAC;CACtE,CAAC;CAED,aACE,EACE,6BACA,WAAW,WAAW,EACpB,MAAM,OAAqC;EACzC,WAAW,EAA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ACzB,CAAC;CACH,CAAC;CAED,aACE,EACE,oCACA,WAAW,WAAW,EACpB,MAAM,OAA4C;EAChD,WAAW,EAAE;CACf,EACF,CAAC,CACH;AACJ;;ACvJA,MAAa,mBAAiG,UAAe;CAC3H,+BAA+B;CAE/B,MAAM,CAAC,YAAY,cAAc,aAA4C,IAAI;CACjF,MAAM,WAAsD,CAAC;CAE7D,MAAM,CAAC,cAAc,eAAe,aAAa,WAAW,OAAO,CAAC,QAAQ,GAAG,CAAC,eAAe,CAAC;CAEhG,MAAM,aAAa,iBAAiB;CAEpC,mBAAmB;EACjB,MAAM,UAAU,WAAW;EAC3B,IAAI,CAAC,SAAS;EAEd,OAAO,OAAO,SAAS,EAAE,QAAQ,aAAa,UAAU,WAAW,CAAC;EAEpE,SAAS,SAAS;EAClB,SAAS,KAAK,cAAc,aAAa;CAC3C,CAAC;CAED,mBAAmB;EACjB,MAAM,UAAU,WAAW;EAC3B,IAAI,CAAC,SAAS;EAEd,MAAM,KAAK,IAAI,gBAAgB;EAC/B,KAAK,MAAM,CAAC,OAAO,cAAc,CAAC,aAAa,EAAE,QAAQ,GACvD,QAAQ,iBACN,YACC,UAAU;GACT,SAAS,SAAS,KAAK;EACzB,GACA,EAAE,QAAQ,GAAG,OAAO,CACtB;EAEF,aAAa,GAAG,MAAM;CACxB,CAAC;CAED,aACE,EACE,8BACA,WAAW,WAAW,EACpB,MAAM,OAAsC;EAC1C,WAAW,EAAE;CACf,EACF,CAAC,CACH;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"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"}
1
+ {"version":3,"file":"drop-indicator.d.ts","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"mappings":";;;UAUiB,kBAAA;EAAkB;;;;;;EAOjC,MAAA,GAAS,oBAAA;EAMwB;AAAA;AAInC;;;EAJE,KAAA,GAAQ,oBAAyB;AAAA;;cAItB,aAAA,EAAe,SAAA,CAAU,kBAAA,GAAqB,GAAA,CAAI,cAAA,CAAe,oBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"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;CACrH,8BAA8B;CAE9B,MAAM,CAAC,YAAY,cAAc,aAA0C,KAAK;CAEhF,MAAM,CAAC,cAAc,aAAa,WAAW,OAAO,CAAC,UAAU,QAAQ,CAAC;CAExE,MAAM,aAAa,kBAAkB;CAErC,mBAAmB;EACjB,MAAM,UAAU,YAAY;EAC5B,IAAI,CAAC,SAAS;EAEd,OAAO,OAAO,SAAS;GAAE,QAAQ,aAAa,UAAU;GAAY,OAAO,aAAa;GAAO,CAAC;GAChG;CAEF,aACE,EACE,2BACA,WAAW,WAAW,EACpB,MAAM,OAAoC;EACxC,WAAW,GAAG;IAEjB,CAAC,CACH"}
1
+ {"version":3,"file":"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;CACrH,6BAA6B;CAE7B,MAAM,CAAC,YAAY,cAAc,aAA0C,IAAI;CAE/E,MAAM,CAAC,cAAc,aAAa,WAAW,OAAO,CAAC,UAAU,OAAO,CAAC;CAEvE,MAAM,aAAa,iBAAiB;CAEpC,mBAAmB;EACjB,MAAM,UAAU,WAAW;EAC3B,IAAI,CAAC,SAAS;EAEd,OAAO,OAAO,SAAS;GAAE,QAAQ,aAAa,UAAU;GAAY,OAAO,aAAa;EAAM,CAAC;CACjG,CAAC;CAED,aACE,EACE,2BACA,WAAW,WAAW,EACpB,MAAM,OAAoC;EACxC,WAAW,EAAE;CACf,EACF,CAAC,CACH;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"editor-context.js","names":[],"sources":["../src/contexts/editor-context.ts"],"sourcesContent":["import type { Editor, Extension } from '@prosekit/core'\nimport { createContext, useContext, type ContextProviderComponent } from 'solid-js'\n\nconst editorContext = createContext<Editor | null>(null)\n\n/**\n * @internal\n */\nexport function useEditorContext<E extends Extension>(): Editor<E> | null {\n return useContext(editorContext)\n}\n\n/**\n * @internal\n */\nexport const EditorContextProvider: ContextProviderComponent<Editor | null> = editorContext.Provider\n"],"mappings":";AAGA,MAAM,gBAAgB,cAA6B,KAAK;;;;AAKxD,SAAgB,mBAA0D;CACxE,OAAO,WAAW,cAAc;;;;;AAMlC,MAAa,wBAAiE,cAAc"}
1
+ {"version":3,"file":"editor-context.js","names":[],"sources":["../src/contexts/editor-context.ts"],"sourcesContent":["import type { Editor, Extension } from '@prosekit/core'\nimport { createContext, useContext, type ContextProviderComponent } from 'solid-js'\n\nconst editorContext = createContext<Editor | null>(null)\n\n/**\n * @internal\n */\nexport function useEditorContext<E extends Extension>(): Editor<E> | null {\n return useContext(editorContext)\n}\n\n/**\n * @internal\n */\nexport const EditorContextProvider: ContextProviderComponent<Editor | null> = editorContext.Provider\n"],"mappings":";AAGA,MAAM,gBAAgB,cAA6B,IAAI;;;;AAKvD,SAAgB,mBAA0D;CACxE,OAAO,WAAW,aAAa;AACjC;;;;AAKA,MAAa,wBAAiE,cAAc"}
package/dist/index.d.ts CHANGED
@@ -9,22 +9,12 @@ type ProseKitProps = ParentProps<{
9
9
  }>;
10
10
  /**
11
11
  * The root component for a ProseKit editor.
12
- *
13
- * @public
14
12
  */
15
13
  declare const ProseKit: Component<ProseKitProps>;
16
- /**
17
- * @public
18
- */
19
14
  interface SolidMarkViewProps extends MarkViewContextProps {}
20
- /**
21
- * @public
22
- */
23
15
  type SolidMarkViewComponent = Component<SolidMarkViewProps>;
24
16
  /**
25
17
  * Options for {@link defineSolidMarkView}.
26
- *
27
- * @public
28
18
  */
29
19
  interface SolidMarkViewOptions extends CoreMarkViewUserOptions<SolidMarkViewComponent> {
30
20
  /**
@@ -34,22 +24,12 @@ interface SolidMarkViewOptions extends CoreMarkViewUserOptions<SolidMarkViewComp
34
24
  }
35
25
  /**
36
26
  * Defines a mark view using a Solid component.
37
- *
38
- * @public
39
27
  */
40
28
  declare function defineSolidMarkView(options: SolidMarkViewOptions): Extension;
41
- /**
42
- * @public
43
- */
44
29
  interface SolidNodeViewProps extends NodeViewContextProps {}
45
- /**
46
- * @public
47
- */
48
30
  type SolidNodeViewComponent = Component<SolidNodeViewProps>;
49
31
  /**
50
32
  * Options for {@link defineSolidNodeView}.
51
- *
52
- * @public
53
33
  */
54
34
  interface SolidNodeViewOptions extends CoreNodeViewUserOptions<SolidNodeViewComponent> {
55
35
  /**
@@ -59,8 +39,6 @@ interface SolidNodeViewOptions extends CoreNodeViewUserOptions<SolidNodeViewComp
59
39
  }
60
40
  /**
61
41
  * Defines a node view using a Solid component.
62
- *
63
- * @public
64
42
  */
65
43
  declare function defineSolidNodeView(options: SolidNodeViewOptions): Extension;
66
44
  /**
@@ -106,8 +84,6 @@ declare function useExtension(
106
84
  extension: Accessor<Extension | null>, options?: UseExtensionOptions): void;
107
85
  /**
108
86
  * Calls the given handler whenever the editor document changes.
109
- *
110
- * @public
111
87
  */
112
88
  declare function useDocChange(handler: (doc: ProseMirrorNode) => void, options?: UseExtensionOptions): void;
113
89
  interface UseEditorDerivedOptions<E extends Extension = any> {
@@ -126,8 +102,6 @@ interface UseEditorDerivedOptions<E extends Extension = any> {
126
102
  *
127
103
  * It returns an accessor of the derived value that updates whenever the editor
128
104
  * state changes.
129
- *
130
- * @public
131
105
  */
132
106
  declare function useEditorDerivedValue<E extends Extension, Derived>(
133
107
  /**
@@ -140,8 +114,6 @@ declare function useEditorDerivedValue<E extends Extension, Derived>(
140
114
  derive: (editor: Editor<E>) => Derived, options?: UseEditorDerivedOptions<E>): Accessor<Derived>;
141
115
  /**
142
116
  * Retrieves the editor instance from the nearest ProseKit component.
143
- *
144
- * @public
145
117
  */
146
118
  declare function useEditor<E extends Extension = any>(options?: {
147
119
  /**
@@ -155,8 +127,6 @@ declare function useEditor<E extends Extension = any>(options?: {
155
127
  declare function useKeymap(keymap: () => Keymap, options?: UseExtensionOptions): void;
156
128
  /**
157
129
  * Calls the given handler whenever the editor state changes.
158
- *
159
- * @public
160
130
  */
161
131
  declare function useStateUpdate(handler: (state: EditorState) => void, options?: UseExtensionOptions): void;
162
132
  export { type MaybeAccessor, type PropsWithChildren, type PropsWithClass, type PropsWithElement, ProseKit, type ProseKitProps, type SolidMarkViewComponent, type SolidMarkViewOptions, type SolidMarkViewProps, type SolidNodeViewComponent, type SolidNodeViewOptions, type SolidNodeViewProps, type UseEditorDerivedOptions, type UseExtensionOptions, defineSolidMarkView, defineSolidNodeView, useDocChange, useEditor, useEditorDerivedValue, useExtension, useKeymap, useStateUpdate };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/components/prosekit.ts","../src/extensions/solid-mark-view.ts","../src/extensions/solid-node-view.ts","../src/types.ts","../src/hooks/use-extension.ts","../src/hooks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AA;;;;ANDnD;EMME,MAAA,GAAS,aAAA,CAAc,MAAA,CAAO,CAAA;AAAA;;;;;;;ANGhC;;;;;;iBMYgB,qBAAA,WAAgC,SAAA,UAAA;;;;;ALPhD;;;AKcE,MAAA,GAAS,MAAA,EAAQ,MAAA,CAAO,CAAA,MAAO,OAAA,EAC/B,OAAA,GAAU,uBAAA,CAAwB,CAAA,IACjC,QAAA,CAAS,OAAA;;;;;;iBC3BI,SAAA,WAAoB,SAAA,OAAA,CAAiB,OAAA;EPHzC;;;;;;EOUV,MAAA;AAAA,UACQ,MAAA,CAAO,CAAA;AAAA,iBCdD,SAAA,CAAU,MAAA,QAAc,MAAA,EAAQ,OAAA,GAAU,mBAAA;;;;;;iBCM1C,cAAA,CACd,OAAA,GAAU,KAAA,EAAO,WAAA,WACjB,OAAA,GAAU,mBAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/components/prosekit.ts","../src/extensions/solid-mark-view.ts","../src/extensions/solid-node-view.ts","../src/types.ts","../src/hooks/use-extension.ts","../src/hooks/use-doc-change.ts","../src/hooks/use-editor-derived-value.ts","../src/hooks/use-editor.ts","../src/hooks/use-keymap.ts","../src/hooks/use-state-update.ts"],"mappings":";;;;;;KAOY,aAAA,GAAgB,WAAW;EACrC,MAAA,EAAQ,MAAA;AAAA;;;AADV;cAOa,QAAA,EAAU,SAAS,CAAC,aAAA;AAAA,UCDhB,kBAAA,SAA2B,oBAAoB;AAAA,KAEpD,sBAAA,GAAyB,SAAS,CAAC,kBAAA;ADR/C;;;AAAA,UCaiB,oBAAA,SAA6B,uBAAuB,CAAC,sBAAA;EDb1C;;;ECiB1B,IAAA;AAAA;ADV4C;;ACD9C;ADC8C,iBCqD9B,mBAAA,CAAoB,OAAA,EAAS,oBAAA,GAAuB,SAAS;AAAA,UCtD5D,kBAAA,SAA2B,oBAAoB;AAAA,KAEpD,sBAAA,GAAyB,SAAS,CAAC,kBAAA;AFR/C;;;AAAA,UEaiB,oBAAA,SAA6B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AAmB"}
package/dist/index.js CHANGED
@@ -42,8 +42,6 @@ function defineSolidMarkViewFactory(renderSolidRenderer, removeSolidRenderer) {
42
42
  }
43
43
  /**
44
44
  * Defines a mark view using a Solid component.
45
- *
46
- * @public
47
45
  */
48
46
  function defineSolidMarkView(options) {
49
47
  return defineMarkViewComponent({
@@ -102,8 +100,6 @@ function defineSolidNodeViewFactory(renderSolidRenderer, removeSolidRenderer) {
102
100
  }
103
101
  /**
104
102
  * Defines a node view using a Solid component.
105
- *
106
- * @public
107
103
  */
108
104
  function defineSolidNodeView(options) {
109
105
  return defineNodeViewComponent({
@@ -144,8 +140,6 @@ const ViewRenderer = (props) => {
144
140
  };
145
141
  /**
146
142
  * The root component for a ProseKit editor.
147
- *
148
- * @public
149
143
  */
150
144
  const ProseKit = (props) => {
151
145
  return createComponent(EditorContextProvider, {
@@ -181,8 +175,6 @@ function useExtension(extension, options) {
181
175
  }
182
176
  /**
183
177
  * Calls the given handler whenever the editor document changes.
184
- *
185
- * @public
186
178
  */
187
179
  function useDocChange(handler, options) {
188
180
  const extension = defineDocChangeHandler((view) => handler(view.state.doc));
@@ -190,8 +182,6 @@ function useDocChange(handler, options) {
190
182
  }
191
183
  /**
192
184
  * Retrieves the editor instance from the nearest ProseKit component.
193
- *
194
- * @public
195
185
  */
196
186
  function useEditor(options) {
197
187
  const update = options?.update ?? false;
@@ -225,8 +215,6 @@ function useForceUpdate() {
225
215
  *
226
216
  * It returns an accessor of the derived value that updates whenever the editor
227
217
  * state changes.
228
- *
229
- * @public
230
218
  */
231
219
  function useEditorDerivedValue(derive, options) {
232
220
  const initialEditor = options?.editor;
@@ -239,8 +227,6 @@ function useKeymap(keymap, options) {
239
227
  }
240
228
  /**
241
229
  * Calls the given handler whenever the editor state changes.
242
- *
243
- * @public
244
230
  */
245
231
  function useStateUpdate(handler, options) {
246
232
  const extension = defineUpdateHandler((view) => handler(view.state));
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/extensions/helpers.ts","../src/extensions/solid-mark-view.ts","../src/extensions/solid-node-view.ts","../src/utils/to-value.ts","../src/hooks/use-editor-extension.ts","../src/components/view-renderer.ts","../src/components/prosekit.ts","../src/hooks/use-priority-extension.ts","../src/hooks/use-extension.ts","../src/hooks/use-doc-change.ts","../src/hooks/use-editor.ts","../src/hooks/use-editor-derived-value.ts","../src/hooks/use-keymap.ts","../src/hooks/use-state-update.ts"],"sourcesContent":["export function hidePortalDiv(el: HTMLElement): void {\n el.style.display = 'contents'\n el.dataset.solidPortal = 'true'\n}\n","import { defineMarkViewComponent, defineMarkViewFactory, type Extension } from '@prosekit/core'\nimport type { CoreMarkViewUserOptions } from '@prosemirror-adapter/core'\nimport {\n AbstractSolidMarkView,\n buildSolidMarkViewCreator,\n type MarkViewContextProps,\n type SolidRendererResult,\n} from '@prosemirror-adapter/solid'\nimport { createComponent, type Component, type JSX } from 'solid-js'\nimport { Portal } from 'solid-js/web'\n\nimport { hidePortalDiv } from './helpers.ts'\n\n/**\n * @public\n */\nexport interface SolidMarkViewProps extends MarkViewContextProps {}\n\n/**\n * @public\n */\nexport type SolidMarkViewComponent = Component<SolidMarkViewProps>\n\n/**\n * Options for {@link defineSolidMarkView}.\n *\n * @public\n */\nexport interface SolidMarkViewOptions extends CoreMarkViewUserOptions<SolidMarkViewComponent> {\n /**\n * The name of the mark type.\n */\n name: string\n}\n\nclass ProseKitSolidMarkView extends AbstractSolidMarkView<SolidMarkViewComponent> {\n render = (): JSX.Element => {\n const UserComponent = this.component\n const getProps: () => SolidMarkViewProps = this.context\n const props: SolidMarkViewProps = {\n get contentRef() {\n return getProps().contentRef\n },\n get view() {\n return getProps().view\n },\n get mark() {\n return getProps().mark\n },\n }\n return createComponent(Portal, {\n mount: this.dom,\n children: createComponent(UserComponent, props),\n ref: hidePortalDiv,\n })\n }\n}\n\n/**\n * @internal\n */\nexport function defineSolidMarkViewFactory(\n renderSolidRenderer: SolidRendererResult['renderSolidRenderer'],\n removeSolidRenderer: SolidRendererResult['removeSolidRenderer'],\n): Extension {\n const factory = buildSolidMarkViewCreator(renderSolidRenderer, removeSolidRenderer, ProseKitSolidMarkView)\n return defineMarkViewFactory<SolidMarkViewOptions>({\n group: 'solid',\n factory,\n })\n}\n\n/**\n * Defines a mark view using a Solid component.\n *\n * @public\n */\nexport function defineSolidMarkView(options: SolidMarkViewOptions): Extension {\n return defineMarkViewComponent<SolidMarkViewOptions>({\n group: 'solid',\n name: options.name,\n args: options,\n })\n}\n","import { defineNodeViewComponent, defineNodeViewFactory, type Extension } from '@prosekit/core'\nimport type { CoreNodeViewUserOptions } from '@prosemirror-adapter/core'\nimport {\n AbstractSolidNodeView,\n buildSolidNodeViewCreator,\n type NodeViewContextProps,\n type SolidRendererResult,\n} from '@prosemirror-adapter/solid'\nimport { createComponent, type Component, type JSX } from 'solid-js'\nimport { Portal } from 'solid-js/web'\n\nimport { hidePortalDiv } from './helpers.ts'\n\n/**\n * @public\n */\nexport interface SolidNodeViewProps extends NodeViewContextProps {}\n\n/**\n * @public\n */\nexport type SolidNodeViewComponent = Component<SolidNodeViewProps>\n\n/**\n * Options for {@link defineSolidNodeView}.\n *\n * @public\n */\nexport interface SolidNodeViewOptions extends CoreNodeViewUserOptions<SolidNodeViewComponent> {\n /**\n * The name of the node type.\n */\n name: string\n}\n\nclass ProseKitSolidNodeView extends AbstractSolidNodeView<SolidNodeViewComponent> {\n render = (): JSX.Element => {\n const UserComponent = this.component\n const getProps: () => SolidNodeViewProps = this.context\n const props: SolidNodeViewProps = {\n get contentRef() {\n return getProps().contentRef\n },\n get view() {\n return getProps().view\n },\n get getPos() {\n return getProps().getPos\n },\n get setAttrs() {\n return getProps().setAttrs\n },\n get node() {\n return getProps().node\n },\n get selected() {\n return getProps().selected\n },\n get decorations() {\n return getProps().decorations\n },\n get innerDecorations() {\n return getProps().innerDecorations\n },\n }\n return createComponent(Portal, {\n mount: this.dom,\n children: createComponent(UserComponent, props),\n ref: hidePortalDiv,\n })\n }\n}\n\n/**\n * @internal\n */\nexport function defineSolidNodeViewFactory(\n renderSolidRenderer: SolidRendererResult['renderSolidRenderer'],\n removeSolidRenderer: SolidRendererResult['removeSolidRenderer'],\n): Extension {\n const factory = buildSolidNodeViewCreator(renderSolidRenderer, removeSolidRenderer, ProseKitSolidNodeView)\n return defineNodeViewFactory<SolidNodeViewOptions>({\n group: 'solid',\n factory,\n })\n}\n\n/**\n * Defines a node view using a Solid component.\n *\n * @public\n */\nexport function defineSolidNodeView(options: SolidNodeViewOptions): Extension {\n return defineNodeViewComponent<SolidNodeViewOptions>({\n group: 'solid',\n name: options.name,\n args: options,\n })\n}\n","/**\n * Accesses the value of a MaybeAccessor\n *\n * @example\n * ```ts\n * access(\"foo\") // => \"foo\"\n * access(() => \"foo\") // => \"foo\"\n * ```\n */\nexport function toValue<T>(\n v: (() => T) | T,\n): T {\n return (typeof v === 'function') ? (v as () => T)() : v\n}\n","import { EditorNotFoundError, type Editor, type Extension } from '@prosekit/core'\nimport { createEffect, onCleanup, type Accessor } from 'solid-js'\n\nimport { useEditorContext } from '../contexts/editor-context.ts'\nimport type { MaybeAccessor } from '../types.ts'\nimport { toValue } from '../utils/to-value.ts'\n\n/**\n * @internal\n */\nexport function useEditorExtension(\n editorAccessor: MaybeAccessor<Editor> | undefined | null,\n extensionAccessor: Accessor<Extension | null>,\n): void {\n const editorContext = useEditorContext()\n\n createEffect(() => {\n const editor = toValue(editorAccessor) || toValue(editorContext)\n const extension = extensionAccessor()\n\n if (!editor) {\n throw new EditorNotFoundError()\n }\n if (extension) {\n onCleanup(editor.use(extension))\n }\n })\n}\n","import { union, type Editor } from '@prosekit/core'\nimport { useSolidRenderer } from '@prosemirror-adapter/solid'\nimport type { Component, JSX, ParentProps } from 'solid-js'\n\nimport { defineSolidMarkViewFactory } from '../extensions/solid-mark-view.ts'\nimport { defineSolidNodeViewFactory } from '../extensions/solid-node-view.ts'\nimport { useEditorExtension } from '../hooks/use-editor-extension.ts'\n\ntype ViewRendererProps = ParentProps<{\n editor: Editor\n}>\n\nexport const ViewRenderer: Component<ViewRendererProps> = (props): JSX.Element => {\n const { renderSolidRenderer, removeSolidRenderer, render } = useSolidRenderer()\n\n const extension = union([\n defineSolidMarkViewFactory(renderSolidRenderer, removeSolidRenderer),\n defineSolidNodeViewFactory(renderSolidRenderer, removeSolidRenderer),\n ])\n\n useEditorExtension(() => props.editor, () => extension)\n\n return [props.children, render] as unknown as JSX.Element\n}\n","import type { Editor } from '@prosekit/core'\nimport { createComponent, type Component, type ParentProps } from 'solid-js'\n\nimport { EditorContextProvider } from '../contexts/editor-context.ts'\n\nimport { ViewRenderer } from './view-renderer.ts'\n\nexport type ProseKitProps = ParentProps<{\n editor: Editor\n}>\n\n/**\n * The root component for a ProseKit editor.\n *\n * @public\n */\nexport const ProseKit: Component<ProseKitProps> = (props) => {\n return createComponent(EditorContextProvider, {\n get value() {\n return props.editor\n },\n get children() {\n return createComponent(ViewRenderer, {\n get editor() {\n return props.editor\n },\n get children() {\n return props.children\n },\n })\n },\n })\n}\n","import { withPriority, type Extension, type Priority } from '@prosekit/core'\n\n/**\n * @internal\n */\nexport function usePriorityExtension<T extends Extension = Extension>(\n extension: () => T | null,\n priority?: Priority | null,\n): () => T | null {\n return () => {\n const ext = extension()\n return ext && priority ? withPriority(ext, priority) : ext\n }\n}\n","import type { Editor, Extension, Priority } from '@prosekit/core'\nimport type { Accessor } from 'solid-js'\n\nimport type { MaybeAccessor } from '../types.ts'\n\nimport { useEditorExtension } from './use-editor-extension.ts'\nimport { usePriorityExtension } from './use-priority-extension.ts'\n\nexport interface UseExtensionOptions {\n /**\n * The editor to add the extension to. If not provided, it will use the\n * editor from the nearest `<ProseKit>` component.\n */\n editor?: MaybeAccessor<Editor>\n\n /**\n * Optional priority to add the extension with.\n */\n priority?: Priority\n}\n\n/**\n * Add an extension to the editor.\n */\nexport function useExtension(\n /**\n * The accessor to an extension to add to the editor. If it changes, the previous\n * extension will be removed and the new one (if not null) will be added.\n */\n extension: Accessor<Extension | null>,\n options?: UseExtensionOptions,\n): void {\n useEditorExtension(\n options?.editor,\n usePriorityExtension(extension, options?.priority),\n )\n}\n","import { defineDocChangeHandler } from '@prosekit/core'\nimport type { ProseMirrorNode } from '@prosekit/pm/model'\n\nimport { useExtension, type UseExtensionOptions } from './use-extension.ts'\n\n/**\n * Calls the given handler whenever the editor document changes.\n *\n * @public\n */\nexport function useDocChange(\n handler: (doc: ProseMirrorNode) => void,\n options?: UseExtensionOptions,\n): void {\n const extension = defineDocChangeHandler((view) => handler(view.state.doc))\n useExtension(() => extension, options)\n}\n","import { defineMountHandler, defineUpdateHandler, ProseKitError, union, type Editor, type Extension } from '@prosekit/core'\nimport { createEffect, createSignal } from 'solid-js'\n\nimport { useEditorContext } from '../contexts/editor-context.ts'\n\n/**\n * Retrieves the editor instance from the nearest ProseKit component.\n *\n * @public\n */\nexport function useEditor<E extends Extension = any>(options?: {\n /**\n * Whether to update the component when the editor is mounted or editor state\n * is updated.\n *\n * @default false\n */\n update?: boolean\n}): () => Editor<E> {\n const update = options?.update ?? false\n\n const editor = useEditorContext<E>()\n if (!editor) {\n throw new ProseKitError(\n 'useEditor must be used within the ProseKit component',\n )\n }\n\n const [depend, forceUpdate] = useForceUpdate()\n\n createEffect(() => {\n if (update) {\n const extension = union(\n defineMountHandler(forceUpdate),\n defineUpdateHandler(forceUpdate),\n )\n return editor.use(extension)\n }\n }, [editor, update, forceUpdate])\n\n return () => {\n depend()\n return editor\n }\n}\n\nfunction useForceUpdate() {\n return createSignal(undefined, { equals: false })\n}\n","import type { Editor, Extension } from '@prosekit/core'\nimport { createMemo, type Accessor } from 'solid-js'\n\nimport type { MaybeAccessor } from '../types.ts'\nimport { toValue } from '../utils/to-value.ts'\n\nimport { useEditor } from './use-editor.ts'\n\nexport interface UseEditorDerivedOptions<E extends Extension = any> {\n /**\n * The editor to add the extension to. If not provided, it will use the\n * editor from the nearest `<ProseKit>` component.\n */\n editor?: MaybeAccessor<Editor<E>>\n}\n\n/**\n * Runs a function to derive a value from the editor instance after editor state\n * changes.\n *\n * This is useful when you need to render something based on the editor state,\n * for example, whether the selected text is wrapped in an italic mark.\n *\n * It returns an accessor of the derived value that updates whenever the editor\n * state changes.\n *\n * @public\n */\nexport function useEditorDerivedValue<E extends Extension, Derived>(\n /**\n * A function that receives the editor instance and returns a derived value.\n *\n * It will be called whenever the editor's document state changes, or when it\n * mounts.\n */\n derive: (editor: Editor<E>) => Derived,\n options?: UseEditorDerivedOptions<E>,\n): Accessor<Derived> {\n const initialEditor = options?.editor\n const editorAccessor: Accessor<Editor<E>> = initialEditor\n ? () => toValue(initialEditor)\n : useEditor<E>({ update: true })\n\n return createMemo(() => derive(editorAccessor()))\n}\n","import { defineKeymap, type Keymap } from '@prosekit/core'\n\nimport { useExtension, type UseExtensionOptions } from './use-extension.ts'\n\nexport function useKeymap(keymap: () => Keymap, options?: UseExtensionOptions): void {\n const extension = () => defineKeymap(keymap())\n useExtension(extension, options)\n}\n","import { defineUpdateHandler } from '@prosekit/core'\nimport type { EditorState } from '@prosekit/pm/state'\n\nimport { useExtension, type UseExtensionOptions } from './use-extension.ts'\n\n/**\n * Calls the given handler whenever the editor state changes.\n *\n * @public\n */\nexport function useStateUpdate(\n handler: (state: EditorState) => void,\n options?: UseExtensionOptions,\n): void {\n const extension = defineUpdateHandler((view) => handler(view.state))\n useExtension(() => extension, options)\n}\n"],"mappings":";;;;;AAAA,SAAgB,cAAc,IAAuB;CACnD,GAAG,MAAM,UAAU;CACnB,GAAG,QAAQ,cAAc;;ACiC3B,IAAM,wBAAN,cAAoC,sBAA8C;;;sBACpD;GAC1B,MAAM,gBAAgB,KAAK;GAC3B,MAAM,WAAqC,KAAK;GAYhD,OAAO,gBAAgB,QAAQ;IAC7B,OAAO,KAAK;IACZ,UAAU,gBAAgB,eAAe;KAZzC,IAAI,aAAa;MACf,OAAO,UAAU,CAAC;;KAEpB,IAAI,OAAO;MACT,OAAO,UAAU,CAAC;;KAEpB,IAAI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B;EACjB,IAAI,QAAQ;GACV,MAAM,YAAY,MAChB,mBAAmB,YAAY,EAC/B,oBAAoB,YAAY,CACjC;GACD,OAAO,OAAO,IAAI,UAAU;;IAE7B;EAAC;EAAQ;EAAQ;EAAY,CAAC;CAEjC,aAAa;EACX,QAAQ;EACR,OAAO;;;AAIX,SAAS,iBAAiB;CACxB,OAAO,aAAa,KAAA,GAAW,EAAE,QAAQ,OAAO,CAAC;;;;;;;;;;;;;;ACnBnD,SAAgB,sBAOd,QACA,SACmB;CACnB,MAAM,gBAAgB,SAAS;CAC/B,MAAM,iBAAsC,sBAClC,QAAQ,cAAc,GAC5B,UAAa,EAAE,QAAQ,MAAM,CAAC;CAElC,OAAO,iBAAiB,OAAO,gBAAgB,CAAC,CAAC;;ACvCnD,SAAgB,UAAU,QAAsB,SAAqC;CACnF,MAAM,kBAAkB,aAAa,QAAQ,CAAC;CAC9C,aAAa,WAAW,QAAQ;;;;;;;ACIlC,SAAgB,eACd,SACA,SACM;CACN,MAAM,YAAY,qBAAqB,SAAS,QAAQ,KAAK,MAAM,CAAC;CACpE,mBAAmB,WAAW,QAAQ"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/extensions/helpers.ts","../src/extensions/solid-mark-view.ts","../src/extensions/solid-node-view.ts","../src/utils/to-value.ts","../src/hooks/use-editor-extension.ts","../src/components/view-renderer.ts","../src/components/prosekit.ts","../src/hooks/use-priority-extension.ts","../src/hooks/use-extension.ts","../src/hooks/use-doc-change.ts","../src/hooks/use-editor.ts","../src/hooks/use-editor-derived-value.ts","../src/hooks/use-keymap.ts","../src/hooks/use-state-update.ts"],"sourcesContent":["export function hidePortalDiv(el: HTMLElement): void {\n el.style.display = 'contents'\n el.dataset.solidPortal = 'true'\n}\n","import { defineMarkViewComponent, defineMarkViewFactory, type Extension } from '@prosekit/core'\nimport type { CoreMarkViewUserOptions } from '@prosemirror-adapter/core'\nimport {\n AbstractSolidMarkView,\n buildSolidMarkViewCreator,\n type MarkViewContextProps,\n type SolidRendererResult,\n} from '@prosemirror-adapter/solid'\nimport { createComponent, type Component, type JSX } from 'solid-js'\nimport { Portal } from 'solid-js/web'\n\nimport { hidePortalDiv } from './helpers.ts'\n\nexport interface SolidMarkViewProps extends MarkViewContextProps {}\n\nexport type SolidMarkViewComponent = Component<SolidMarkViewProps>\n\n/**\n * Options for {@link defineSolidMarkView}.\n */\nexport interface SolidMarkViewOptions extends CoreMarkViewUserOptions<SolidMarkViewComponent> {\n /**\n * The name of the mark type.\n */\n name: string\n}\n\nclass ProseKitSolidMarkView extends AbstractSolidMarkView<SolidMarkViewComponent> {\n render = (): JSX.Element => {\n const UserComponent = this.component\n const getProps: () => SolidMarkViewProps = this.context\n const props: SolidMarkViewProps = {\n get contentRef() {\n return getProps().contentRef\n },\n get view() {\n return getProps().view\n },\n get mark() {\n return getProps().mark\n },\n }\n return createComponent(Portal, {\n mount: this.dom,\n children: createComponent(UserComponent, props),\n ref: hidePortalDiv,\n })\n }\n}\n\n/**\n * @internal\n */\nexport function defineSolidMarkViewFactory(\n renderSolidRenderer: SolidRendererResult['renderSolidRenderer'],\n removeSolidRenderer: SolidRendererResult['removeSolidRenderer'],\n): Extension {\n const factory = buildSolidMarkViewCreator(renderSolidRenderer, removeSolidRenderer, ProseKitSolidMarkView)\n return defineMarkViewFactory<SolidMarkViewOptions>({\n group: 'solid',\n factory,\n })\n}\n\n/**\n * Defines a mark view using a Solid component.\n */\nexport function defineSolidMarkView(options: SolidMarkViewOptions): Extension {\n return defineMarkViewComponent<SolidMarkViewOptions>({\n group: 'solid',\n name: options.name,\n args: options,\n })\n}\n","import { defineNodeViewComponent, defineNodeViewFactory, type Extension } from '@prosekit/core'\nimport type { CoreNodeViewUserOptions } from '@prosemirror-adapter/core'\nimport {\n AbstractSolidNodeView,\n buildSolidNodeViewCreator,\n type NodeViewContextProps,\n type SolidRendererResult,\n} from '@prosemirror-adapter/solid'\nimport { createComponent, type Component, type JSX } from 'solid-js'\nimport { Portal } from 'solid-js/web'\n\nimport { hidePortalDiv } from './helpers.ts'\n\nexport interface SolidNodeViewProps extends NodeViewContextProps {}\n\nexport type SolidNodeViewComponent = Component<SolidNodeViewProps>\n\n/**\n * Options for {@link defineSolidNodeView}.\n */\nexport interface SolidNodeViewOptions extends CoreNodeViewUserOptions<SolidNodeViewComponent> {\n /**\n * The name of the node type.\n */\n name: string\n}\n\nclass ProseKitSolidNodeView extends AbstractSolidNodeView<SolidNodeViewComponent> {\n render = (): JSX.Element => {\n const UserComponent = this.component\n const getProps: () => SolidNodeViewProps = this.context\n const props: SolidNodeViewProps = {\n get contentRef() {\n return getProps().contentRef\n },\n get view() {\n return getProps().view\n },\n get getPos() {\n return getProps().getPos\n },\n get setAttrs() {\n return getProps().setAttrs\n },\n get node() {\n return getProps().node\n },\n get selected() {\n return getProps().selected\n },\n get decorations() {\n return getProps().decorations\n },\n get innerDecorations() {\n return getProps().innerDecorations\n },\n }\n return createComponent(Portal, {\n mount: this.dom,\n children: createComponent(UserComponent, props),\n ref: hidePortalDiv,\n })\n }\n}\n\n/**\n * @internal\n */\nexport function defineSolidNodeViewFactory(\n renderSolidRenderer: SolidRendererResult['renderSolidRenderer'],\n removeSolidRenderer: SolidRendererResult['removeSolidRenderer'],\n): Extension {\n const factory = buildSolidNodeViewCreator(renderSolidRenderer, removeSolidRenderer, ProseKitSolidNodeView)\n return defineNodeViewFactory<SolidNodeViewOptions>({\n group: 'solid',\n factory,\n })\n}\n\n/**\n * Defines a node view using a Solid component.\n */\nexport function defineSolidNodeView(options: SolidNodeViewOptions): Extension {\n return defineNodeViewComponent<SolidNodeViewOptions>({\n group: 'solid',\n name: options.name,\n args: options,\n })\n}\n","/**\n * Accesses the value of a MaybeAccessor\n *\n * @example\n * ```ts\n * access(\"foo\") // => \"foo\"\n * access(() => \"foo\") // => \"foo\"\n * ```\n */\nexport function toValue<T>(\n v: (() => T) | T,\n): T {\n return (typeof v === 'function') ? (v as () => T)() : v\n}\n","import { EditorNotFoundError, type Editor, type Extension } from '@prosekit/core'\nimport { createEffect, onCleanup, type Accessor } from 'solid-js'\n\nimport { useEditorContext } from '../contexts/editor-context.ts'\nimport type { MaybeAccessor } from '../types.ts'\nimport { toValue } from '../utils/to-value.ts'\n\n/**\n * @internal\n */\nexport function useEditorExtension(\n editorAccessor: MaybeAccessor<Editor> | undefined | null,\n extensionAccessor: Accessor<Extension | null>,\n): void {\n const editorContext = useEditorContext()\n\n createEffect(() => {\n const editor = toValue(editorAccessor) || toValue(editorContext)\n const extension = extensionAccessor()\n\n if (!editor) {\n throw new EditorNotFoundError()\n }\n if (extension) {\n onCleanup(editor.use(extension))\n }\n })\n}\n","import { union, type Editor } from '@prosekit/core'\nimport { useSolidRenderer } from '@prosemirror-adapter/solid'\nimport type { Component, JSX, ParentProps } from 'solid-js'\n\nimport { defineSolidMarkViewFactory } from '../extensions/solid-mark-view.ts'\nimport { defineSolidNodeViewFactory } from '../extensions/solid-node-view.ts'\nimport { useEditorExtension } from '../hooks/use-editor-extension.ts'\n\ntype ViewRendererProps = ParentProps<{\n editor: Editor\n}>\n\nexport const ViewRenderer: Component<ViewRendererProps> = (props): JSX.Element => {\n const { renderSolidRenderer, removeSolidRenderer, render } = useSolidRenderer()\n\n const extension = union([\n defineSolidMarkViewFactory(renderSolidRenderer, removeSolidRenderer),\n defineSolidNodeViewFactory(renderSolidRenderer, removeSolidRenderer),\n ])\n\n useEditorExtension(() => props.editor, () => extension)\n\n return [props.children, render] as unknown as JSX.Element\n}\n","import type { Editor } from '@prosekit/core'\nimport { createComponent, type Component, type ParentProps } from 'solid-js'\n\nimport { EditorContextProvider } from '../contexts/editor-context.ts'\n\nimport { ViewRenderer } from './view-renderer.ts'\n\nexport type ProseKitProps = ParentProps<{\n editor: Editor\n}>\n\n/**\n * The root component for a ProseKit editor.\n */\nexport const ProseKit: Component<ProseKitProps> = (props) => {\n return createComponent(EditorContextProvider, {\n get value() {\n return props.editor\n },\n get children() {\n return createComponent(ViewRenderer, {\n get editor() {\n return props.editor\n },\n get children() {\n return props.children\n },\n })\n },\n })\n}\n","import { withPriority, type Extension, type Priority } from '@prosekit/core'\n\n/**\n * @internal\n */\nexport function usePriorityExtension<T extends Extension = Extension>(\n extension: () => T | null,\n priority?: Priority | null,\n): () => T | null {\n return () => {\n const ext = extension()\n return ext && priority ? withPriority(ext, priority) : ext\n }\n}\n","import type { Editor, Extension, Priority } from '@prosekit/core'\nimport type { Accessor } from 'solid-js'\n\nimport type { MaybeAccessor } from '../types.ts'\n\nimport { useEditorExtension } from './use-editor-extension.ts'\nimport { usePriorityExtension } from './use-priority-extension.ts'\n\nexport interface UseExtensionOptions {\n /**\n * The editor to add the extension to. If not provided, it will use the\n * editor from the nearest `<ProseKit>` component.\n */\n editor?: MaybeAccessor<Editor>\n\n /**\n * Optional priority to add the extension with.\n */\n priority?: Priority\n}\n\n/**\n * Add an extension to the editor.\n */\nexport function useExtension(\n /**\n * The accessor to an extension to add to the editor. If it changes, the previous\n * extension will be removed and the new one (if not null) will be added.\n */\n extension: Accessor<Extension | null>,\n options?: UseExtensionOptions,\n): void {\n useEditorExtension(\n options?.editor,\n usePriorityExtension(extension, options?.priority),\n )\n}\n","import { defineDocChangeHandler } from '@prosekit/core'\nimport type { ProseMirrorNode } from '@prosekit/pm/model'\n\nimport { useExtension, type UseExtensionOptions } from './use-extension.ts'\n\n/**\n * Calls the given handler whenever the editor document changes.\n */\nexport function useDocChange(\n handler: (doc: ProseMirrorNode) => void,\n options?: UseExtensionOptions,\n): void {\n const extension = defineDocChangeHandler((view) => handler(view.state.doc))\n useExtension(() => extension, options)\n}\n","import { defineMountHandler, defineUpdateHandler, ProseKitError, union, type Editor, type Extension } from '@prosekit/core'\nimport { createEffect, createSignal } from 'solid-js'\n\nimport { useEditorContext } from '../contexts/editor-context.ts'\n\n/**\n * Retrieves the editor instance from the nearest ProseKit component.\n */\nexport function useEditor<E extends Extension = any>(options?: {\n /**\n * Whether to update the component when the editor is mounted or editor state\n * is updated.\n *\n * @default false\n */\n update?: boolean\n}): () => Editor<E> {\n const update = options?.update ?? false\n\n const editor = useEditorContext<E>()\n if (!editor) {\n throw new ProseKitError(\n 'useEditor must be used within the ProseKit component',\n )\n }\n\n const [depend, forceUpdate] = useForceUpdate()\n\n createEffect(() => {\n if (update) {\n const extension = union(\n defineMountHandler(forceUpdate),\n defineUpdateHandler(forceUpdate),\n )\n return editor.use(extension)\n }\n }, [editor, update, forceUpdate])\n\n return () => {\n depend()\n return editor\n }\n}\n\nfunction useForceUpdate() {\n return createSignal(undefined, { equals: false })\n}\n","import type { Editor, Extension } from '@prosekit/core'\nimport { createMemo, type Accessor } from 'solid-js'\n\nimport type { MaybeAccessor } from '../types.ts'\nimport { toValue } from '../utils/to-value.ts'\n\nimport { useEditor } from './use-editor.ts'\n\nexport interface UseEditorDerivedOptions<E extends Extension = any> {\n /**\n * The editor to add the extension to. If not provided, it will use the\n * editor from the nearest `<ProseKit>` component.\n */\n editor?: MaybeAccessor<Editor<E>>\n}\n\n/**\n * Runs a function to derive a value from the editor instance after editor state\n * changes.\n *\n * This is useful when you need to render something based on the editor state,\n * for example, whether the selected text is wrapped in an italic mark.\n *\n * It returns an accessor of the derived value that updates whenever the editor\n * state changes.\n */\nexport function useEditorDerivedValue<E extends Extension, Derived>(\n /**\n * A function that receives the editor instance and returns a derived value.\n *\n * It will be called whenever the editor's document state changes, or when it\n * mounts.\n */\n derive: (editor: Editor<E>) => Derived,\n options?: UseEditorDerivedOptions<E>,\n): Accessor<Derived> {\n const initialEditor = options?.editor\n const editorAccessor: Accessor<Editor<E>> = initialEditor\n ? () => toValue(initialEditor)\n : useEditor<E>({ update: true })\n\n return createMemo(() => derive(editorAccessor()))\n}\n","import { defineKeymap, type Keymap } from '@prosekit/core'\n\nimport { useExtension, type UseExtensionOptions } from './use-extension.ts'\n\nexport function useKeymap(keymap: () => Keymap, options?: UseExtensionOptions): void {\n const extension = () => defineKeymap(keymap())\n useExtension(extension, options)\n}\n","import { defineUpdateHandler } from '@prosekit/core'\nimport type { EditorState } from '@prosekit/pm/state'\n\nimport { useExtension, type UseExtensionOptions } from './use-extension.ts'\n\n/**\n * Calls the given handler whenever the editor state changes.\n */\nexport function useStateUpdate(\n handler: (state: EditorState) => void,\n options?: UseExtensionOptions,\n): void {\n const extension = defineUpdateHandler((view) => handler(view.state))\n useExtension(() => extension, options)\n}\n"],"mappings":";;;;;AAAA,SAAgB,cAAc,IAAuB;CACnD,GAAG,MAAM,UAAU;CACnB,GAAG,QAAQ,cAAc;AAC3B;ACwBA,IAAM,wBAAN,cAAoC,sBAA8C;;;sBACpD;GAC1B,MAAM,gBAAgB,KAAK;GAC3B,MAAM,WAAqC,KAAK;GAYhD,OAAO,gBAAgB,QAAQ;IAC7B,OAAO,KAAK;IACZ,UAAU,gBAAgB,eAAe;KAZzC,IAAI,aAAa;MACf,OAAO,SAAS,EAAE;KACpB;KACA,IAAI,OAAO;MACT,OAAO,SAAS,EAAE;KACpB;KACA,IAAI,OAAO;MACT,OAAO,SAAS,EAAE;KACpB;IAI6C,CAAC;IAC9C,KAAK;GACP,CAAC;EACH;;AACF;;;;AAKA,SAAgB,2BACd,qBACA,qBACW;CAEX,OAAO,sBAA4C;EACjD,OAAO;EACP,SAHc,0BAA0B,qBAAqB,qBAAqB,qBAG5E;CACR,CAAC;AACH;;;;AAKA,SAAgB,oBAAoB,SAA0C;CAC5E,OAAO,wBAA8C;EACnD,OAAO;EACP,MAAM,QAAQ;EACd,MAAM;CACR,CAAC;AACH;AC9CA,IAAM,wBAAN,cAAoC,sBAA8C;;;sBACpD;GAC1B,MAAM,gBAAgB,KAAK;GAC3B,MAAM,WAAqC,KAAK;GA2BhD,OAAO,gBAAgB,QAAQ;IAC7B,OAAO,KAAK;IACZ,UAAU,gBAAgB,eAAe;KA3BzC,IAAI,aAAa;MACf,OAAO,SAAS,EAAE;KACpB;KACA,IAAI,OAAO;MACT,OAAO,SAAS,EAAE;KACpB;KACA,IAAI,SAAS;MACX,OAAO,SAAS,EAAE;KACpB;KACA,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AO,CAAC;CAC7C,aAAa,WAAW,OAAO;AACjC;;;;ACCA,SAAgB,eACd,SACA,SACM;CACN,MAAM,YAAY,qBAAqB,SAAS,QAAQ,KAAK,KAAK,CAAC;CACnE,mBAAmB,WAAW,OAAO;AACvC"}
@@ -1 +1 @@
1
- {"version":3,"file":"inline-popover.d.ts","names":[],"sources":["../src/components/inline-popover/inline-popover-popup.gen.ts","../src/components/inline-popover/inline-popover-positioner.gen.ts","../src/components/inline-popover/inline-popover-root.gen.ts"],"mappings":";;;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
+ {"version":3,"file":"inline-popover.d.ts","names":[],"sources":["../src/components/inline-popover/inline-popover-popup.gen.ts","../src/components/inline-popover/inline-popover-positioner.gen.ts","../src/components/inline-popover/inline-popover-root.gen.ts"],"mappings":";;;UAOiB,uBAAA;;cAGJ,kBAAA,EAAoB,SAAA,CAAU,uBAAA,GAA0B,GAAA,CAAI,cAAA,CAAe,yBAAA;;UCFvE,4BAAA;EDDuB;;;AAAA;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;AAAA;;AChIhI;;;EDqGE,QAAA,GAAW,8BAAA;ECvFG;;;;;;ED8Fd,YAAA,GAAe,8BAAA;ECrGf;;;;;;;ED6GA,cAAA,GAAiB,8BAAA;ECrFjB;;;;;;AAE4D;ED2F5D,WAAA,GAAc,8BAAA;AAAA;;cAIH,uBAAA,EAAyB,SAAA,CAAU,4BAAA,GAA+B,GAAA,CAAI,cAAA,CAAe,8BAAA;;UChIjF,sBAAA;EFHuB;;;AAAA;AAGxC;;EEOE,MAAA,GAAS,wBAAA;EFPgC;;;;;;EEczC,WAAA,GAAc,wBAAA;EFd2B;;;;;AAAsE;EEqB/G,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 +1 @@
1
- {"version":3,"file":"inline-popover.js","names":[],"sources":["../src/components/inline-popover/inline-popover-popup.gen.ts","../src/components/inline-popover/inline-popover-positioner.gen.ts","../src/components/inline-popover/inline-popover-root.gen.ts"],"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;CACpI,mCAAmC;CAEnC,MAAM,YAAY;CAElB,aAAa,EAAE,iCAAiC,UAAU;;;AC2H5D,MAAa,2BAAyH,UAAe;CACnJ,wCAAwC;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;CAEvR,mBAAmB;EACjB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E1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;EAEH,aAAa,GAAG,OAAO;GACvB;CAEF,aACE,EACE,gCACA,WAAW,WAAW,EACpB,MAAM,OAAwC;EAC5C,WAAW,GAAG;IAEjB,CAAC,CACH"}
1
+ {"version":3,"file":"inline-popover.js","names":[],"sources":["../src/components/inline-popover/inline-popover-popup.gen.ts","../src/components/inline-popover/inline-popover-positioner.gen.ts","../src/components/inline-popover/inline-popover-root.gen.ts"],"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;CACpI,kCAAkC;CAElC,MAAM,YAAY;CAElB,aAAa,EAAE,iCAAiC,SAAS;AAC3D;;AC0HA,MAAa,2BAAyH,UAAe;CACnJ,uCAAuC;CAEvC,MAAM,CAAC,YAAY,cAAc,aAAoD,IAAI;CAEzF,MAAM,CAAC,cAAc,aAAa,WAAW,OAAO;EAAC;EAAe;EAAc;EAAY;EAAkB;EAAe;EAAQ;EAAQ;EAAS;EAAU;EAAU;EAAmB;EAAW;EAAa;EAAgB;EAAc;EAAa;EAAS;CAAU,CAAC;CAEtR,mBAAmB;EACjB,MAAM,UAAU,WAAW;EAC3B,IAAI,CAAC,SAAS;EAEd,OAAO,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;EACzB,CAAC;CACH,CAAC;CAED,aACE,EACE,sCACA,WAAW,WAAW,EACpB,MAAM,OAA8C;EAClD,WAAW,EAAE;CACf,EACF,CAAC,CACH;AACJ;;ACrIA,MAAa,qBAAuG,UAAe;CACjI,iCAAiC;CAEjC,MAAM,CAAC,YAAY,cAAc,aAA8C,IAAI;CACnF,MAAM,WAAsD,CAAC;CAE7D,MAAM,CAAC,cAAc,eAAe,aAAa,WAAW,OAAO;EAAC;EAAe;EAAY;EAAmB;EAAU;CAAM,GAAG,CAAC,cAAc,CAAC;CAErJ,MAAM,aAAa,iBAAiB;CAEpC,mBAAmB;EACjB,MAAM,UAAU,WAAW;EAC3B,IAAI,CAAC,SAAS;EAEd,OAAO,OAAO,SAAS;GAAE,aAAa,aAAa;GAAa,UAAU,aAAa;GAAU,iBAAiB,aAAa;GAAiB,QAAQ,aAAa,UAAU;GAAY,MAAM,aAAa;EAAK,CAAC;EAEpN,SAAS,SAAS;EAClB,SAAS,KAAK,cAAc,YAAY;CAC1C,CAAC;CAED,mBAAmB;EACjB,MAAM,UAAU,WAAW;EAC3B,IAAI,CAAC,SAAS;EAEd,MAAM,KAAK,IAAI,gBAAgB;EAC/B,KAAK,MAAM,CAAC,OAAO,cAAc,CAAC,YAAY,EAAE,QAAQ,GACtD,QAAQ,iBACN,YACC,UAAU;GACT,SAAS,SAAS,KAAK;EACzB,GACA,EAAE,QAAQ,GAAG,OAAO,CACtB;EAEF,aAAa,GAAG,MAAM;CACxB,CAAC;CAED,aACE,EACE,gCACA,WAAW,WAAW,EACpB,MAAM,OAAwC;EAC5C,WAAW,EAAE;CACf,EACF,CAAC,CACH;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"menu.d.ts","names":[],"sources":["../src/components/menu/menu-item.gen.ts","../src/components/menu/menu-popup.gen.ts","../src/components/menu/menu-positioner.gen.ts","../src/components/menu/menu-root.gen.ts","../src/components/menu/menu-submenu-root.gen.ts","../src/components/menu/menu-submenu-trigger.gen.ts","../src/components/menu/menu-trigger.gen.ts"],"mappings":";;;UAQiB,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AA,GAAc,eAAA;EHeK;;;;EGVnB,IAAA,GAAO,eAAA;EHEP;;;;EGGA,QAAA,GAAW,eAAA;EHKQ;EGHnB,YAAA,IAAgB,KAAA,EAAO,cAAA;AAAA;;cAIZ,QAAA,EAAU,SAAA,CAAU,aAAA,GAAgB,GAAA,CAAI,cAAA,CAAe,eAAA;;UCrBnD,oBAAA;EJAa;;;;EIK5B,WAAA,GAAc,sBAAA;EJeK;;;;EIVnB,IAAA,GAAO,sBAAA;EJEP;;;;EIGA,QAAA,GAAW,sBAAA;EJKQ;EIHnB,YAAA,IAAgB,KAAA,EAAO,qBAAA;AAAA;;cAIZ,eAAA,EAAiB,SAAA,CAAU,oBAAA,GAAuB,GAAA,CAAI,cAAA,CAAe,sBAAA;;UCrBjE,uBAAA;ELAa;;;;;EKM5B,KAAA,GAAQ,yBAAA;ELcyB;;;;;EKRjC,QAAA,GAAW,yBAAA;AAAA;;cAIA,kBAAA,EAAoB,SAAA,CAAU,uBAAA,GAA0B,GAAA,CAAI,cAAA,CAAe,yBAAA;;UChBvE,gBAAA;ENAa;;;;;EMM5B,QAAA,GAAW,kBAAA;ENcsB;EMZjC,YAAA,IAAgB,KAAA,EAAO,iBAAA;AAAA;;cAIZ,WAAA,EAAa,SAAA,CAAU,gBAAA,GAAmB,GAAA,CAAI,cAAA,CAAe,kBAAA"}
1
+ {"version":3,"file":"menu.d.ts","names":[],"sources":["../src/components/menu/menu-item.gen.ts","../src/components/menu/menu-popup.gen.ts","../src/components/menu/menu-positioner.gen.ts","../src/components/menu/menu-root.gen.ts","../src/components/menu/menu-submenu-root.gen.ts","../src/components/menu/menu-submenu-trigger.gen.ts","../src/components/menu/menu-trigger.gen.ts"],"mappings":";;;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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