@prosekit/vue 0.7.0-beta.2 → 0.7.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/prosekit-vue-autocomplete.d.ts +2 -2
- package/dist/prosekit-vue-autocomplete.js +2 -2
- package/dist/prosekit-vue-autocomplete.js.map +1 -1
- package/dist/prosekit-vue-block-handle.d.ts +2 -2
- package/dist/prosekit-vue-block-handle.js +2 -2
- package/dist/prosekit-vue-block-handle.js.map +1 -1
- package/dist/prosekit-vue-inline-popover.d.ts +10 -10
- package/dist/prosekit-vue-inline-popover.d.ts.map +1 -1
- package/dist/prosekit-vue-inline-popover.js +2 -2
- package/dist/prosekit-vue-inline-popover.js.map +1 -1
- package/dist/prosekit-vue-menu.d.ts +2 -2
- package/dist/prosekit-vue-menu.js +2 -2
- package/dist/prosekit-vue-menu.js.map +1 -1
- package/dist/prosekit-vue-popover.d.ts +2 -2
- package/dist/prosekit-vue-popover.js +2 -2
- package/dist/prosekit-vue-popover.js.map +1 -1
- package/dist/prosekit-vue-resizable.d.ts +2 -2
- package/dist/prosekit-vue-resizable.js +2 -2
- package/dist/prosekit-vue-resizable.js.map +1 -1
- package/dist/prosekit-vue-tooltip.d.ts +2 -2
- package/dist/prosekit-vue-tooltip.js +2 -2
- package/dist/prosekit-vue-tooltip.js.map +1 -1
- package/package.json +3 -3
- package/src/components/autocomplete/autocomplete-item.gen.ts +0 -2
- package/src/components/autocomplete/autocomplete-popup.gen.ts +0 -2
- package/src/components/autocomplete/autocomplete-root.gen.ts +0 -2
- package/src/components/autocomplete/index.gen.ts +3 -5
- package/src/components/block-handle/block-handle-root.gen.ts +0 -2
- package/src/components/block-handle/index.gen.ts +1 -3
- package/src/components/inline-popover/index.gen.ts +1 -3
- package/src/components/inline-popover/inline-popover-positioner.gen.ts +7 -7
- package/src/components/inline-popover/inline-popover-root.gen.ts +1 -3
- package/src/components/menu/index.gen.ts +3 -5
- package/src/components/menu/menu-item.gen.ts +0 -2
- package/src/components/menu/menu-root.gen.ts +0 -2
- package/src/components/menu/menu-trigger.gen.ts +0 -2
- package/src/components/popover/index.gen.ts +2 -4
- package/src/components/popover/popover-root.gen.ts +0 -2
- package/src/components/popover/popover-trigger.gen.ts +0 -2
- package/src/components/resizable/index.gen.ts +1 -3
- package/src/components/resizable/resizable-root.gen.ts +0 -2
- package/src/components/tooltip/index.gen.ts +1 -3
- package/src/components/tooltip/tooltip-root.gen.ts +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DefineSetupFnComponent, HTMLAttributes } from "vue";
|
|
2
|
-
import { AutocompleteItemEvents, AutocompleteItemProps as AutocompleteItemProps$1, AutocompletePopupEvents, AutocompletePositionerProps as AutocompletePositionerProps$1, AutocompleteRootEvents, AutocompleteRootProps as AutocompleteRootProps$1
|
|
2
|
+
import { AutocompleteItemEvents, AutocompleteItemProps as AutocompleteItemProps$1, AutocompletePopupEvents, AutocompletePositionerProps as AutocompletePositionerProps$1, AutocompleteRootEvents, AutocompleteRootProps as AutocompleteRootProps$1 } from "@prosekit/web/autocomplete";
|
|
3
3
|
|
|
4
4
|
//#region src/components/autocomplete/autocomplete-empty.gen.d.ts
|
|
5
5
|
/**
|
|
@@ -237,5 +237,5 @@ interface AutocompleteRootProps {
|
|
|
237
237
|
*/
|
|
238
238
|
declare const AutocompleteRoot: DefineSetupFnComponent<AutocompleteRootProps & HTMLAttributes>;
|
|
239
239
|
//#endregion
|
|
240
|
-
export { AutocompleteEmpty, type AutocompleteEmptyProps, AutocompleteItem, type
|
|
240
|
+
export { AutocompleteEmpty, type AutocompleteEmptyProps, AutocompleteItem, type AutocompleteItemProps, AutocompletePopup, type AutocompletePopupProps, AutocompletePositioner, type AutocompletePositionerProps, AutocompleteRoot, type AutocompleteRootProps };
|
|
241
241
|
//# sourceMappingURL=prosekit-vue-autocomplete.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as useEditorContext } from "./editor-context.js";
|
|
2
2
|
import { computed, defineComponent, h, shallowRef, watchEffect } from "vue";
|
|
3
|
-
import {
|
|
3
|
+
import { registerAutocompleteEmptyElement, registerAutocompleteItemElement, registerAutocompletePopupElement, registerAutocompletePositionerElement, registerAutocompleteRootElement } from "@prosekit/web/autocomplete";
|
|
4
4
|
//#region src/components/autocomplete/autocomplete-empty.gen.ts
|
|
5
5
|
/**
|
|
6
6
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
@@ -273,6 +273,6 @@ const AutocompleteRoot = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
273
273
|
"onValuesChange"
|
|
274
274
|
] });
|
|
275
275
|
//#endregion
|
|
276
|
-
export { AutocompleteEmpty, AutocompleteItem, AutocompletePopup, AutocompletePositioner, AutocompleteRoot
|
|
276
|
+
export { AutocompleteEmpty, AutocompleteItem, AutocompletePopup, AutocompletePositioner, AutocompleteRoot };
|
|
277
277
|
|
|
278
278
|
//# sourceMappingURL=prosekit-vue-autocomplete.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-vue-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":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompleteEmptyElement } from '@prosekit/web/autocomplete';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/**\n * Props for the {@link AutocompleteEmpty} Vue component.\n *\n * @public\n */\nexport interface AutocompleteEmptyProps {}\n\n/**\n * A Vue component that renders an `prosekit-autocomplete-empty` custom element.\n *\n * @public\n */\nexport const AutocompleteEmpty: DefineSetupFnComponent<AutocompleteEmptyProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<AutocompleteEmptyProps & HTMLAttributes>(\n (props, { slots }) => {\n registerAutocompleteEmptyElement();\n\n return () => {\n return h('prosekit-autocomplete-empty', props, slots.default?.());\n };\n },\n { props: [] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompleteItemElement, type AutocompleteItemEvents, type AutocompleteItemProps as AutocompleteItemElementProps } from '@prosekit/web/autocomplete';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link AutocompleteItem} Vue component.\n *\n * @public\n */\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/**\n * A Vue component that renders an `prosekit-autocomplete-item` custom element.\n *\n * @public\n */\nexport const AutocompleteItem: DefineSetupFnComponent<AutocompleteItemProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<AutocompleteItemProps & HTMLAttributes>(\n (props, { slots }) => {\n registerAutocompleteItemElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { disabled: p0, value: p1, onSelect: e0, ...restProps } = props;\n return [[p0, p1, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, e0] = splittedProps.value[0];\n\n Object.assign(element, { disabled: p0, value: p1 });\n\n handlers.length = 0;\n handlers.push(e0);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-autocomplete-item', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['disabled', 'value', 'onSelect'] },\n);\n\nexport type { AutocompleteItemEvents };\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompletePopupElement, type AutocompletePopupEvents } from '@prosekit/web/autocomplete';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link AutocompletePopup} Vue component.\n *\n * @public\n */\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/**\n * A Vue component that renders an `prosekit-autocomplete-popup` custom element.\n *\n * @public\n */\nexport const AutocompletePopup: DefineSetupFnComponent<AutocompletePopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<AutocompletePopupProps & HTMLAttributes>(\n (props, { slots }) => {\n registerAutocompletePopupElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { onValueChange: e0, onValuesChange: e1, ...restProps } = props;\n return [[e0, e1], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [e0, e1] = splittedProps.value[0];\n\n handlers.length = 0;\n handlers.push(e0);\n handlers.push(e1);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-autocomplete-popup', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['onValueChange', 'onValuesChange'] },\n);\n\nexport type { AutocompletePopupEvents };\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompletePositionerElement, type AutocompletePositionerProps as AutocompletePositionerElementProps } from '@prosekit/web/autocomplete';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link AutocompletePositioner} Vue component.\n *\n * @public\n */\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 hovered block.\n *\n * @default 4\n */\n offset?: AutocompletePositionerElementProps['offset'];\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 * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default false\n */\n hide?: AutocompletePositionerElementProps['hide'];\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/**\n * A Vue component that renders an `prosekit-autocomplete-positioner` custom element.\n *\n * @public\n */\nexport const AutocompletePositioner: DefineSetupFnComponent<AutocompletePositionerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<AutocompletePositionerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerAutocompletePositionerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n return [[p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17] = splittedProps.value[0];\n\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-autocomplete-positioner', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompleteRootElement, type AutocompleteRootEvents, type AutocompleteRootProps as AutocompleteRootElementProps } from '@prosekit/web/autocomplete';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\nimport { useEditorContext } from '../../injection/editor-context.ts';\n\n/**\n * Props for the {@link AutocompleteRoot} Vue component.\n *\n * @public\n */\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 /** 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/**\n * A Vue component that renders an `prosekit-autocomplete-root` custom element.\n *\n * @public\n */\nexport const AutocompleteRoot: DefineSetupFnComponent<AutocompleteRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<AutocompleteRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerAutocompleteRootElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const p0Fallback = useEditorContext();\n\n const splittedProps = computed(() => {\n const { editor: p0, filter: p1, regex: p2, onOpenChange: e0, onQueryChange: e1, onValueChange: e2, onValuesChange: e3, ...restProps } = props;\n return [[p0, p1, p2, e0, e1, e2, e3], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, e0, e1, e2, e3] = splittedProps.value[0];\n\n Object.assign(element, { editor: p0 ?? p0Fallback, filter: p1, regex: p2 });\n\n handlers.length = 0;\n handlers.push(e0);\n handlers.push(e1);\n handlers.push(e2);\n handlers.push(e3);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-autocomplete-root', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['editor', 'filter', 'regex', 'onOpenChange', 'onQueryChange', 'onValueChange', 'onValuesChange'] },\n);\n\nexport type { AutocompleteRootEvents };\n"],"mapp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MAAM,WAAsD,EAAE;AAE9D,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,MAAM,cAAc,MAAM;AAEzD,SAAO,OAAO,SAAS;GAAE,QAAQ,MAAM;GAAY,QAAQ;GAAI,OAAO;GAAI,CAAC;AAE3E,WAAS,SAAS;AAClB,WAAS,KAAK,GAAG;AACjB,WAAS,KAAK,GAAG;AACjB,WAAS,KAAK,GAAG;AACjB,WAAS,KAAK,GAAG;GACjB;AAEF,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc;GAAC;GAAc;GAAe;GAAe;GAAe,CAAC,SAAS,CACrG,SAAQ,iBACN,YACC,UAAiB;AAChB,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cAAa;EACX,MAAM,YAAY,cAAc,MAAM;AACtC,SAAO,EAAE,8BAA8B;GAAE,GAAG;GAAW,KAAK;GAAY,EAAE,MAAM,WAAW,CAAC;;GAGhG,EAAE,OAAO;CAAC;CAAU;CAAU;CAAS;CAAgB;CAAiB;CAAiB;CAAiB,EAAE,CAC7G"}
|
|
1
|
+
{"version":3,"file":"prosekit-vue-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":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompleteEmptyElement } from '@prosekit/web/autocomplete';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/**\n * Props for the {@link AutocompleteEmpty} Vue component.\n *\n * @public\n */\nexport interface AutocompleteEmptyProps {}\n\n/**\n * A Vue component that renders an `prosekit-autocomplete-empty` custom element.\n *\n * @public\n */\nexport const AutocompleteEmpty: DefineSetupFnComponent<AutocompleteEmptyProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<AutocompleteEmptyProps & HTMLAttributes>(\n (props, { slots }) => {\n registerAutocompleteEmptyElement();\n\n return () => {\n return h('prosekit-autocomplete-empty', props, slots.default?.());\n };\n },\n { props: [] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompleteItemElement, type AutocompleteItemEvents, type AutocompleteItemProps as AutocompleteItemElementProps } from '@prosekit/web/autocomplete';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link AutocompleteItem} Vue component.\n *\n * @public\n */\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/**\n * A Vue component that renders an `prosekit-autocomplete-item` custom element.\n *\n * @public\n */\nexport const AutocompleteItem: DefineSetupFnComponent<AutocompleteItemProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<AutocompleteItemProps & HTMLAttributes>(\n (props, { slots }) => {\n registerAutocompleteItemElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { disabled: p0, value: p1, onSelect: e0, ...restProps } = props;\n return [[p0, p1, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, e0] = splittedProps.value[0];\n\n Object.assign(element, { disabled: p0, value: p1 });\n\n handlers.length = 0;\n handlers.push(e0);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-autocomplete-item', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['disabled', 'value', 'onSelect'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompletePopupElement, type AutocompletePopupEvents } from '@prosekit/web/autocomplete';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link AutocompletePopup} Vue component.\n *\n * @public\n */\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/**\n * A Vue component that renders an `prosekit-autocomplete-popup` custom element.\n *\n * @public\n */\nexport const AutocompletePopup: DefineSetupFnComponent<AutocompletePopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<AutocompletePopupProps & HTMLAttributes>(\n (props, { slots }) => {\n registerAutocompletePopupElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { onValueChange: e0, onValuesChange: e1, ...restProps } = props;\n return [[e0, e1], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [e0, e1] = splittedProps.value[0];\n\n handlers.length = 0;\n handlers.push(e0);\n handlers.push(e1);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-autocomplete-popup', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['onValueChange', 'onValuesChange'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompletePositionerElement, type AutocompletePositionerProps as AutocompletePositionerElementProps } from '@prosekit/web/autocomplete';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link AutocompletePositioner} Vue component.\n *\n * @public\n */\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 hovered block.\n *\n * @default 4\n */\n offset?: AutocompletePositionerElementProps['offset'];\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 * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default false\n */\n hide?: AutocompletePositionerElementProps['hide'];\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/**\n * A Vue component that renders an `prosekit-autocomplete-positioner` custom element.\n *\n * @public\n */\nexport const AutocompletePositioner: DefineSetupFnComponent<AutocompletePositionerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<AutocompletePositionerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerAutocompletePositionerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n return [[p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17] = splittedProps.value[0];\n\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-autocomplete-positioner', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompleteRootElement, type AutocompleteRootEvents, type AutocompleteRootProps as AutocompleteRootElementProps } from '@prosekit/web/autocomplete';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\nimport { useEditorContext } from '../../injection/editor-context.ts';\n\n/**\n * Props for the {@link AutocompleteRoot} Vue component.\n *\n * @public\n */\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 /** 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/**\n * A Vue component that renders an `prosekit-autocomplete-root` custom element.\n *\n * @public\n */\nexport const AutocompleteRoot: DefineSetupFnComponent<AutocompleteRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<AutocompleteRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerAutocompleteRootElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const p0Fallback = useEditorContext();\n\n const splittedProps = computed(() => {\n const { editor: p0, filter: p1, regex: p2, onOpenChange: e0, onQueryChange: e1, onValueChange: e2, onValuesChange: e3, ...restProps } = props;\n return [[p0, p1, p2, e0, e1, e2, e3], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, e0, e1, e2, e3] = splittedProps.value[0];\n\n Object.assign(element, { editor: p0 ?? p0Fallback, filter: p1, regex: p2 });\n\n handlers.length = 0;\n handlers.push(e0);\n handlers.push(e1);\n handlers.push(e2);\n handlers.push(e3);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-autocomplete-root', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['editor', 'filter', 'regex', 'onOpenChange', 'onQueryChange', 'onValueChange', 'onValuesChange'] },\n);\n"],"mappings":";;;;;;;;;;;;AAmBA,MAAa,oBAAqG,iCAC/G,OAAO,EAAE,YAAY;AACpB,mCAAkC;AAElC,cAAa;AACX,SAAO,EAAE,+BAA+B,OAAO,MAAM,WAAW,CAAC;;GAGrE,EAAE,OAAO,EAAE,EAAE,CACd;;;;;;;;;;;ACQD,MAAa,mBAAmG,iCAC7G,OAAO,EAAE,YAAY;AACpB,kCAAiC;CAEjC,MAAM,aAAa,WAA+B,KAAK;CAEvD,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,UAAU,IAAI,OAAO,IAAI,UAAU,IAAI,GAAG,cAAc;AAChE,SAAO,CAAC;GAAC;GAAI;GAAI;GAAG,EAAE,UAAU;GAChC;CAEF,MAAM,WAAsD,EAAE;AAE9D,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,CAAC,IAAI,IAAI,MAAM,cAAc,MAAM;AAEzC,SAAO,OAAO,SAAS;GAAE,UAAU;GAAI,OAAO;GAAI,CAAC;AAEnD,WAAS,SAAS;AAClB,WAAS,KAAK,GAAG;GACjB;AAEF,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,SAAS,CAAC,SAAS,CACnD,SAAQ,iBACN,YACC,UAAiB;AAChB,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cAAa;EACX,MAAM,YAAY,cAAc,MAAM;AACtC,SAAO,EAAE,8BAA8B;GAAE,GAAG;GAAW,KAAK;GAAY,EAAE,MAAM,WAAW,CAAC;;GA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Ae,IAAI,eAAe,IAAI,gBAAgB,IAAI,GAAG,cAAc;AACxI,SAAO,CAAC;GAAC;GAAI;GAAI;GAAI;GAAI;GAAI;GAAI;GAAG,EAAE,UAAU;GAChD;CAEF,MAAM,WAAsD,EAAE;AAE9D,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,MAAM,cAAc,MAAM;AAEzD,SAAO,OAAO,SAAS;GAAE,QAAQ,MAAM;GAAY,QAAQ;GAAI,OAAO;GAAI,CAAC;AAE3E,WAAS,SAAS;AAClB,WAAS,KAAK,GAAG;AACjB,WAAS,KAAK,GAAG;AACjB,WAAS,KAAK,GAAG;AACjB,WAAS,KAAK,GAAG;GACjB;AAEF,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc;GAAC;GAAc;GAAe;GAAe;GAAe,CAAC,SAAS,CACrG,SAAQ,iBACN,YACC,UAAiB;AAChB,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cAAa;EACX,MAAM,YAAY,cAAc,MAAM;AACtC,SAAO,EAAE,8BAA8B;GAAE,GAAG;GAAW,KAAK;GAAY,EAAE,MAAM,WAAW,CAAC;;GAGhG,EAAE,OAAO;CAAC;CAAU;CAAU;CAAS;CAAgB;CAAiB;CAAiB;CAAiB,EAAE,CAC7G"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DefineSetupFnComponent, HTMLAttributes } from "vue";
|
|
2
|
-
import { BlockHandleAddProps as BlockHandleAddProps$1, BlockHandleDraggableProps as BlockHandleDraggableProps$1, BlockHandlePositionerProps as BlockHandlePositionerProps$1, BlockHandleRootEvents, BlockHandleRootProps as BlockHandleRootProps$1
|
|
2
|
+
import { BlockHandleAddProps as BlockHandleAddProps$1, BlockHandleDraggableProps as BlockHandleDraggableProps$1, BlockHandlePositionerProps as BlockHandlePositionerProps$1, BlockHandleRootEvents, BlockHandleRootProps as BlockHandleRootProps$1 } from "@prosekit/web/block-handle";
|
|
3
3
|
|
|
4
4
|
//#region src/components/block-handle/block-handle-add.gen.d.ts
|
|
5
5
|
/**
|
|
@@ -218,5 +218,5 @@ interface BlockHandleRootProps {
|
|
|
218
218
|
*/
|
|
219
219
|
declare const BlockHandleRoot: DefineSetupFnComponent<BlockHandleRootProps & HTMLAttributes>;
|
|
220
220
|
//#endregion
|
|
221
|
-
export { BlockHandleAdd, type BlockHandleAddProps, BlockHandleDraggable, type BlockHandleDraggableProps, BlockHandlePopup, type BlockHandlePopupProps, BlockHandlePositioner, type BlockHandlePositionerProps, BlockHandleRoot, type
|
|
221
|
+
export { BlockHandleAdd, type BlockHandleAddProps, BlockHandleDraggable, type BlockHandleDraggableProps, BlockHandlePopup, type BlockHandlePopupProps, BlockHandlePositioner, type BlockHandlePositionerProps, BlockHandleRoot, type BlockHandleRootProps };
|
|
222
222
|
//# sourceMappingURL=prosekit-vue-block-handle.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as useEditorContext } from "./editor-context.js";
|
|
2
2
|
import { computed, defineComponent, h, shallowRef, watchEffect } from "vue";
|
|
3
|
-
import {
|
|
3
|
+
import { registerBlockHandleAddElement, registerBlockHandleDraggableElement, registerBlockHandlePopupElement, registerBlockHandlePositionerElement, registerBlockHandleRootElement } from "@prosekit/web/block-handle";
|
|
4
4
|
//#region src/components/block-handle/block-handle-add.gen.ts
|
|
5
5
|
/**
|
|
6
6
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
@@ -213,6 +213,6 @@ const BlockHandleRoot = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
213
213
|
};
|
|
214
214
|
}, { props: ["editor", "onStateChange"] });
|
|
215
215
|
//#endregion
|
|
216
|
-
export { BlockHandleAdd, BlockHandleDraggable, BlockHandlePopup, BlockHandlePositioner, BlockHandleRoot
|
|
216
|
+
export { BlockHandleAdd, BlockHandleDraggable, BlockHandlePopup, BlockHandlePositioner, BlockHandleRoot };
|
|
217
217
|
|
|
218
218
|
//# sourceMappingURL=prosekit-vue-block-handle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-vue-block-handle.js","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popup.gen.ts","../src/components/block-handle/block-handle-positioner.gen.ts","../src/components/block-handle/block-handle-root.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandleAddElement, type BlockHandleAddProps as BlockHandleAddElementProps } from '@prosekit/web/block-handle';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\nimport { useEditorContext } from '../../injection/editor-context.ts';\n\n/**\n * Props for the {@link BlockHandleAdd} Vue component.\n *\n * @public\n */\nexport interface BlockHandleAddProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleAddElementProps['editor'];\n}\n\n/**\n * A Vue component that renders an `prosekit-block-handle-add` custom element.\n *\n * @public\n */\nexport const BlockHandleAdd: DefineSetupFnComponent<BlockHandleAddProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<BlockHandleAddProps & HTMLAttributes>(\n (props, { slots }) => {\n registerBlockHandleAddElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const p0Fallback = useEditorContext();\n\n const splittedProps = computed(() => {\n const { editor: p0, ...restProps } = props;\n return [[p0], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0] = splittedProps.value[0];\n\n Object.assign(element, { editor: p0 ?? p0Fallback });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-block-handle-add', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['editor'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandleDraggableElement, type BlockHandleDraggableProps as BlockHandleDraggableElementProps } from '@prosekit/web/block-handle';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\nimport { useEditorContext } from '../../injection/editor-context.ts';\n\n/**\n * Props for the {@link BlockHandleDraggable} Vue component.\n *\n * @public\n */\nexport interface BlockHandleDraggableProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleDraggableElementProps['editor'];\n}\n\n/**\n * A Vue component that renders an `prosekit-block-handle-draggable` custom element.\n *\n * @public\n */\nexport const BlockHandleDraggable: DefineSetupFnComponent<BlockHandleDraggableProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<BlockHandleDraggableProps & HTMLAttributes>(\n (props, { slots }) => {\n registerBlockHandleDraggableElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const p0Fallback = useEditorContext();\n\n const splittedProps = computed(() => {\n const { editor: p0, ...restProps } = props;\n return [[p0], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0] = splittedProps.value[0];\n\n Object.assign(element, { editor: p0 ?? p0Fallback });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-block-handle-draggable', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['editor'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandlePopupElement } from '@prosekit/web/block-handle';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/**\n * Props for the {@link BlockHandlePopup} Vue component.\n *\n * @public\n */\nexport interface BlockHandlePopupProps {}\n\n/**\n * A Vue component that renders an `prosekit-block-handle-popup` custom element.\n *\n * @public\n */\nexport const BlockHandlePopup: DefineSetupFnComponent<BlockHandlePopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<BlockHandlePopupProps & HTMLAttributes>(\n (props, { slots }) => {\n registerBlockHandlePopupElement();\n\n return () => {\n return h('prosekit-block-handle-popup', props, slots.default?.());\n };\n },\n { props: [] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandlePositionerElement, type BlockHandlePositionerProps as BlockHandlePositionerElementProps } from '@prosekit/web/block-handle';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link BlockHandlePositioner} Vue component.\n *\n * @public\n */\nexport interface BlockHandlePositionerProps {\n /**\n * The placement of the popover, relative to the hovered block.\n *\n * @default \"left\"\n */\n placement?: BlockHandlePositionerElementProps['placement'];\n /**\n * Whether to use the browser [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)\n * to place the floating element on top of other page content.\n *\n * @default false\n */\n hoist?: BlockHandlePositionerElementProps['hoist'];\n /**\n * @default false\n * @hidden\n */\n flip?: BlockHandlePositionerElementProps['flip'];\n /**\n * @default false\n * @hidden\n */\n shift?: BlockHandlePositionerElementProps['shift'];\n /**\n * @default true\n * @hidden\n */\n hide?: BlockHandlePositionerElementProps['hide'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: BlockHandlePositionerElementProps['strategy'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: BlockHandlePositionerElementProps['autoUpdate'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: BlockHandlePositionerElementProps['offset'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: BlockHandlePositionerElementProps['overlap'];\n /**\n * Whether to constrain the floating element's width and height to not exceed\n * the viewport.\n *\n * @default false\n */\n fitViewport?: BlockHandlePositionerElementProps['fitViewport'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: BlockHandlePositionerElementProps['sameWidth'];\n /**\n * Whether to constrain the floating element's height so that it matches the\n * reference element.\n *\n * @default false\n */\n sameHeight?: BlockHandlePositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: BlockHandlePositionerElementProps['inline'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: BlockHandlePositionerElementProps['boundary'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: BlockHandlePositionerElementProps['rootBoundary'];\n /**\n * Describes the virtual padding around the boundary to check for overflow.\n * Please see https://floating-ui.com/docs/detectoverflow#padding for more information.\n *\n * @default 4\n */\n overflowPadding?: BlockHandlePositionerElementProps['overflowPadding'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: BlockHandlePositionerElementProps['elementContext'];\n /**\n * Whether to check the alternate elementContext's boundary. Please see\n * https://floating-ui.com/docs/detectoverflow#altboundary for more\n * information.\n *\n * @default false\n */\n altBoundary?: BlockHandlePositionerElementProps['altBoundary'];\n}\n\n/**\n * A Vue component that renders an `prosekit-block-handle-positioner` custom element.\n *\n * @public\n */\nexport const BlockHandlePositioner: DefineSetupFnComponent<BlockHandlePositionerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<BlockHandlePositionerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerBlockHandlePositionerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n return [[p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17] = splittedProps.value[0];\n\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-block-handle-positioner', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandleRootElement, type BlockHandleRootEvents, type BlockHandleRootProps as BlockHandleRootElementProps } from '@prosekit/web/block-handle';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\nimport { useEditorContext } from '../../injection/editor-context.ts';\n\n/**\n * Props for the {@link BlockHandleRoot} Vue component.\n *\n * @public\n */\nexport interface BlockHandleRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleRootElementProps['editor'];\n /** Fired when the hovered block changes. */\n onStateChange?: (event: BlockHandleRootEvents['stateChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-block-handle-root` custom element.\n *\n * @public\n */\nexport const BlockHandleRoot: DefineSetupFnComponent<BlockHandleRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<BlockHandleRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerBlockHandleRootElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const p0Fallback = useEditorContext();\n\n const splittedProps = computed(() => {\n const { editor: p0, onStateChange: e0, ...restProps } = props;\n return [[p0, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, e0] = splittedProps.value[0];\n\n Object.assign(element, { editor: p0 ?? p0Fallback });\n\n handlers.length = 0;\n handlers.push(e0);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-block-handle-root', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['editor', 'onStateChange'] },\n);\n\nexport type { BlockHandleRootEvents };\n"],"mappings":";;;;;;;;;;;;AA6BA,MAAa,iBAA+F,iCACzG,OAAO,EAAE,YAAY;AACpB,gCAA+B;CAE/B,MAAM,aAAa,WAA+B,KAAK;CAEvD,MAAM,aAAa,kBAAkB;CAErC,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,QAAQ,IAAI,GAAG,cAAc;AACrC,SAAO,CAAC,CAAC,GAAG,EAAE,UAAU;GACxB;AAEF,mBAAkB;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AAM,aAAa,kBAAkB;CAErC,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,QAAQ,IAAI,eAAe,IAAI,GAAG,cAAc;AACxD,SAAO,CAAC,CAAC,IAAI,GAAG,EAAE,UAAU;GAC5B;CAEF,MAAM,WAAsD,EAAE;AAE9D,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,CAAC,IAAI,MAAM,cAAc,MAAM;AAErC,SAAO,OAAO,SAAS,EAAE,QAAQ,MAAM,YAAY,CAAC;AAEpD,WAAS,SAAS;AAClB,WAAS,KAAK,GAAG;GACjB;AAEF,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,cAAc,CAAC,SAAS,CACxD,SAAQ,iBACN,YACC,UAAiB;AAChB,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cAAa;EACX,MAAM,YAAY,cAAc,MAAM;AACtC,SAAO,EAAE,8BAA8B;GAAE,GAAG;GAAW,KAAK;GAAY,EAAE,MAAM,WAAW,CAAC;;GAGhG,EAAE,OAAO,CAAC,UAAU,gBAAgB,EAAE,CACvC"}
|
|
1
|
+
{"version":3,"file":"prosekit-vue-block-handle.js","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popup.gen.ts","../src/components/block-handle/block-handle-positioner.gen.ts","../src/components/block-handle/block-handle-root.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandleAddElement, type BlockHandleAddProps as BlockHandleAddElementProps } from '@prosekit/web/block-handle';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\nimport { useEditorContext } from '../../injection/editor-context.ts';\n\n/**\n * Props for the {@link BlockHandleAdd} Vue component.\n *\n * @public\n */\nexport interface BlockHandleAddProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleAddElementProps['editor'];\n}\n\n/**\n * A Vue component that renders an `prosekit-block-handle-add` custom element.\n *\n * @public\n */\nexport const BlockHandleAdd: DefineSetupFnComponent<BlockHandleAddProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<BlockHandleAddProps & HTMLAttributes>(\n (props, { slots }) => {\n registerBlockHandleAddElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const p0Fallback = useEditorContext();\n\n const splittedProps = computed(() => {\n const { editor: p0, ...restProps } = props;\n return [[p0], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0] = splittedProps.value[0];\n\n Object.assign(element, { editor: p0 ?? p0Fallback });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-block-handle-add', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['editor'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandleDraggableElement, type BlockHandleDraggableProps as BlockHandleDraggableElementProps } from '@prosekit/web/block-handle';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\nimport { useEditorContext } from '../../injection/editor-context.ts';\n\n/**\n * Props for the {@link BlockHandleDraggable} Vue component.\n *\n * @public\n */\nexport interface BlockHandleDraggableProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleDraggableElementProps['editor'];\n}\n\n/**\n * A Vue component that renders an `prosekit-block-handle-draggable` custom element.\n *\n * @public\n */\nexport const BlockHandleDraggable: DefineSetupFnComponent<BlockHandleDraggableProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<BlockHandleDraggableProps & HTMLAttributes>(\n (props, { slots }) => {\n registerBlockHandleDraggableElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const p0Fallback = useEditorContext();\n\n const splittedProps = computed(() => {\n const { editor: p0, ...restProps } = props;\n return [[p0], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0] = splittedProps.value[0];\n\n Object.assign(element, { editor: p0 ?? p0Fallback });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-block-handle-draggable', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['editor'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandlePopupElement } from '@prosekit/web/block-handle';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/**\n * Props for the {@link BlockHandlePopup} Vue component.\n *\n * @public\n */\nexport interface BlockHandlePopupProps {}\n\n/**\n * A Vue component that renders an `prosekit-block-handle-popup` custom element.\n *\n * @public\n */\nexport const BlockHandlePopup: DefineSetupFnComponent<BlockHandlePopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<BlockHandlePopupProps & HTMLAttributes>(\n (props, { slots }) => {\n registerBlockHandlePopupElement();\n\n return () => {\n return h('prosekit-block-handle-popup', props, slots.default?.());\n };\n },\n { props: [] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandlePositionerElement, type BlockHandlePositionerProps as BlockHandlePositionerElementProps } from '@prosekit/web/block-handle';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link BlockHandlePositioner} Vue component.\n *\n * @public\n */\nexport interface BlockHandlePositionerProps {\n /**\n * The placement of the popover, relative to the hovered block.\n *\n * @default \"left\"\n */\n placement?: BlockHandlePositionerElementProps['placement'];\n /**\n * Whether to use the browser [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)\n * to place the floating element on top of other page content.\n *\n * @default false\n */\n hoist?: BlockHandlePositionerElementProps['hoist'];\n /**\n * @default false\n * @hidden\n */\n flip?: BlockHandlePositionerElementProps['flip'];\n /**\n * @default false\n * @hidden\n */\n shift?: BlockHandlePositionerElementProps['shift'];\n /**\n * @default true\n * @hidden\n */\n hide?: BlockHandlePositionerElementProps['hide'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: BlockHandlePositionerElementProps['strategy'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: BlockHandlePositionerElementProps['autoUpdate'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: BlockHandlePositionerElementProps['offset'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: BlockHandlePositionerElementProps['overlap'];\n /**\n * Whether to constrain the floating element's width and height to not exceed\n * the viewport.\n *\n * @default false\n */\n fitViewport?: BlockHandlePositionerElementProps['fitViewport'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: BlockHandlePositionerElementProps['sameWidth'];\n /**\n * Whether to constrain the floating element's height so that it matches the\n * reference element.\n *\n * @default false\n */\n sameHeight?: BlockHandlePositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: BlockHandlePositionerElementProps['inline'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: BlockHandlePositionerElementProps['boundary'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: BlockHandlePositionerElementProps['rootBoundary'];\n /**\n * Describes the virtual padding around the boundary to check for overflow.\n * Please see https://floating-ui.com/docs/detectoverflow#padding for more information.\n *\n * @default 4\n */\n overflowPadding?: BlockHandlePositionerElementProps['overflowPadding'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: BlockHandlePositionerElementProps['elementContext'];\n /**\n * Whether to check the alternate elementContext's boundary. Please see\n * https://floating-ui.com/docs/detectoverflow#altboundary for more\n * information.\n *\n * @default false\n */\n altBoundary?: BlockHandlePositionerElementProps['altBoundary'];\n}\n\n/**\n * A Vue component that renders an `prosekit-block-handle-positioner` custom element.\n *\n * @public\n */\nexport const BlockHandlePositioner: DefineSetupFnComponent<BlockHandlePositionerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<BlockHandlePositionerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerBlockHandlePositionerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n return [[p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17] = splittedProps.value[0];\n\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-block-handle-positioner', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandleRootElement, type BlockHandleRootEvents, type BlockHandleRootProps as BlockHandleRootElementProps } from '@prosekit/web/block-handle';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\nimport { useEditorContext } from '../../injection/editor-context.ts';\n\n/**\n * Props for the {@link BlockHandleRoot} Vue component.\n *\n * @public\n */\nexport interface BlockHandleRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleRootElementProps['editor'];\n /** Fired when the hovered block changes. */\n onStateChange?: (event: BlockHandleRootEvents['stateChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-block-handle-root` custom element.\n *\n * @public\n */\nexport const BlockHandleRoot: DefineSetupFnComponent<BlockHandleRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<BlockHandleRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerBlockHandleRootElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const p0Fallback = useEditorContext();\n\n const splittedProps = computed(() => {\n const { editor: p0, onStateChange: e0, ...restProps } = props;\n return [[p0, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, e0] = splittedProps.value[0];\n\n Object.assign(element, { editor: p0 ?? p0Fallback });\n\n handlers.length = 0;\n handlers.push(e0);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-block-handle-root', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['editor', 'onStateChange'] },\n);\n"],"mappings":";;;;;;;;;;;;AA6BA,MAAa,iBAA+F,iCACzG,OAAO,EAAE,YAAY;AACpB,gCAA+B;CAE/B,MAAM,aAAa,WAA+B,KAAK;CAEvD,MAAM,aAAa,kBAAkB;CAErC,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,QAAQ,IAAI,GAAG,cAAc;AACrC,SAAO,CAAC,CAAC,GAAG,EAAE,UAAU;GACxB;AAEF,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,CAAC,MAAM,cAAc,MAAM;AAEjC,SAAO,OAAO,SAAS,EAAE,QAAQ,MAAM,YAAY,CAAC;GACpD;AAEF,cAAa;EACX,MAAM,YAAY,cAAc,MAAM;AACtC,SAAO,EAAE,6BAA6B;GAAE,GAAG;GAAW,KAAK;GAAY,EAAE,MAAM,WAAW,CAAC;;GAG/F,EAAE,OAAO,CAAC,SAAS,EAAE,CACtB;;;;;;;;;;;AC5BD,MAAa,uBAA2G,iCACrH,OAAO,EAAE,YAAY;AACpB,sCAAqC;CAErC,MAAM,aAAa,WAA+B,KAAK;CAEvD,MAAM,aAAa,kBAAkB;CAErC,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,QAAQ,IAAI,GAAG,cAAc;AACrC,SAAO,CAAC,CAAC,GAAG,EAAE,UAAU;GACxB;AAEF,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,CAAC,MAAM,cAA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,GAAG,OAAO;GACvB;AAEF,cAAa;EACX,MAAM,YAAY,cAAc,MAAM;AACtC,SAAO,EAAE,8BAA8B;GAAE,GAAG;GAAW,KAAK;GAAY,EAAE,MAAM,WAAW,CAAC;;GAGhG,EAAE,OAAO,CAAC,UAAU,gBAAgB,EAAE,CACvC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DefineSetupFnComponent, HTMLAttributes } from "vue";
|
|
2
|
-
import { InlinePopoverPositionerProps as InlinePopoverPositionerProps$1, InlinePopoverRootEvents, InlinePopoverRootProps as InlinePopoverRootProps$1
|
|
2
|
+
import { InlinePopoverPositionerProps as InlinePopoverPositionerProps$1, InlinePopoverRootEvents, InlinePopoverRootProps as InlinePopoverRootProps$1 } from "@prosekit/web/inline-popover";
|
|
3
3
|
|
|
4
4
|
//#region src/components/inline-popover/inline-popover-popup.gen.d.ts
|
|
5
5
|
/**
|
|
@@ -41,6 +41,13 @@ interface InlinePopoverPositionerProps {
|
|
|
41
41
|
* @default true
|
|
42
42
|
*/
|
|
43
43
|
hide?: InlinePopoverPositionerProps$1['hide'];
|
|
44
|
+
/**
|
|
45
|
+
* Whether to use the browser [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)
|
|
46
|
+
* to place the floating element on top of other page content.
|
|
47
|
+
*
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
hoist?: InlinePopoverPositionerProps$1['hoist'];
|
|
44
51
|
/**
|
|
45
52
|
* Whether the floating element can overlap the reference element to keep it
|
|
46
53
|
* in view.
|
|
@@ -75,13 +82,6 @@ interface InlinePopoverPositionerProps {
|
|
|
75
82
|
* @default true
|
|
76
83
|
*/
|
|
77
84
|
autoUpdate?: InlinePopoverPositionerProps$1['autoUpdate'];
|
|
78
|
-
/**
|
|
79
|
-
* Whether to use the browser Popover API to place the floating element on
|
|
80
|
-
* top of other page content.
|
|
81
|
-
*
|
|
82
|
-
* @default true
|
|
83
|
-
*/
|
|
84
|
-
hoist?: InlinePopoverPositionerProps$1['hoist'];
|
|
85
85
|
/**
|
|
86
86
|
* Whether to flip the `placement` in order to keep it in view when the
|
|
87
87
|
* preferred placement(s) will overflow the clipping boundary. You can also
|
|
@@ -194,7 +194,7 @@ interface InlinePopoverRootProps {
|
|
|
194
194
|
* @default false
|
|
195
195
|
*/
|
|
196
196
|
disabled?: InlinePopoverRootProps$1['disabled'];
|
|
197
|
-
/** */
|
|
197
|
+
/** Emitted when the open state of the popover changes. */
|
|
198
198
|
onOpenChange?: (event: InlinePopoverRootEvents['openChange']) => void;
|
|
199
199
|
}
|
|
200
200
|
/**
|
|
@@ -204,5 +204,5 @@ interface InlinePopoverRootProps {
|
|
|
204
204
|
*/
|
|
205
205
|
declare const InlinePopoverRoot: DefineSetupFnComponent<InlinePopoverRootProps & HTMLAttributes>;
|
|
206
206
|
//#endregion
|
|
207
|
-
export { InlinePopoverPopup, type InlinePopoverPopupProps, InlinePopoverPositioner, type InlinePopoverPositionerProps, InlinePopoverRoot, type
|
|
207
|
+
export { InlinePopoverPopup, type InlinePopoverPopupProps, InlinePopoverPositioner, type InlinePopoverPositionerProps, InlinePopoverRoot, type InlinePopoverRootProps };
|
|
208
208
|
//# sourceMappingURL=prosekit-vue-inline-popover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-vue-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":";;;;AAYA;;;;;AAAA,UAAiB,uBAAA;;;;;;cAOJ,kBAAA,EAAoB,sBAAA,CAAuB,uBAAA,GAA0B,cAAA;;;;;;;AAAlF;UCPiB,4BAAA;;;;;;EAMf,SAAA,GAAY,8BAAA;EDCmB;;;;;ECK/B,MAAA,GAAS,8BAAA;;;AAZX;;;;EAmBE,IAAA,GAAO,8BAAA;EAAA;;;;;;EAOP,OAAA,GAAU,8BAAA;
|
|
1
|
+
{"version":3,"file":"prosekit-vue-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":";;;;AAYA;;;;;AAAA,UAAiB,uBAAA;;;;;;cAOJ,kBAAA,EAAoB,sBAAA,CAAuB,uBAAA,GAA0B,cAAA;;;;;;;AAAlF;UCPiB,4BAAA;;;;;;EAMf,SAAA,GAAY,8BAAA;EDCmB;;;;;ECK/B,MAAA,GAAS,8BAAA;;;AAZX;;;;EAmBE,IAAA,GAAO,8BAAA;EAAA;;;;;;EAOP,KAAA,GAAQ,8BAAA;EA2CD;;;;;;EApCP,OAAA,GAAU,8BAAA;EAqFO;;;;;;EA9EjB,MAAA,GAAS,8BAAA;EA5BA;;;;;EAkCT,eAAA,GAAkB,8BAAA;EAbR;;;;;EAmBV,QAAA,GAAW,8BAAA;EAAA;;;;;;;EAQX,UAAA,GAAa,8BAAA;EAsBC;;;;;;;;EAbd,IAAA,GAAO,8BAAA;EAiDP;;;;;EA3CA,KAAA,GAAQ,8BAAA;EA2DG;;;;;;EApDX,WAAA,GAAc,8BAAA;EAoD4C;;;;;;EA7C1D,SAAA,GAAY,8BAAA;;;ACvFd;;;;ED8FE,UAAA,GAAa,8BAAA;ECzEK;;;;;;EDgFlB,QAAA,GAAW,8BAAA;EC9FF;;;;;;EDqGT,YAAA,GAAe,8BAAA;EC7Ef;;;;;;;EDqFA,cAAA,GAAiB,8BAAA;ECzBlB;;;;;;;EDiCC,WAAA,GAAc,8BAAA;AAAA;;;;;;cAQH,uBAAA,EAAyB,sBAAA,CAAuB,4BAAA,GAA+B,cAAA;;;;;;;AD/H5F;UELiB,sBAAA;;;;;;;EAOf,MAAA,GAAS,wBAAA;EFF6C;;;;;;EEStD,WAAA,GAAc,wBAAA;EDhBC;;;;;;ECuBf,eAAA,GAAkB,wBAAA;EDUR;;;;ECLV,IAAA,GAAO,wBAAA;EDyCA;;;;ECpCP,QAAA,GAAW,wBAAA;EDsEA;ECpEX,YAAA,IAAgB,KAAA,EAAO,uBAAA;AAAA;;;;;;cAQZ,iBAAA,EAAmB,sBAAA,CAAuB,sBAAA,GAAyB,cAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as useEditorContext } from "./editor-context.js";
|
|
2
2
|
import { computed, defineComponent, h, shallowRef, watchEffect } from "vue";
|
|
3
|
-
import {
|
|
3
|
+
import { registerInlinePopoverPopupElement, registerInlinePopoverPositionerElement, registerInlinePopoverRootElement } from "@prosekit/web/inline-popover";
|
|
4
4
|
//#region src/components/inline-popover/inline-popover-popup.gen.ts
|
|
5
5
|
/**
|
|
6
6
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
@@ -169,6 +169,6 @@ const InlinePopoverRoot = /* @__PURE__ */ defineComponent((props, { slots }) =>
|
|
|
169
169
|
"onOpenChange"
|
|
170
170
|
] });
|
|
171
171
|
//#endregion
|
|
172
|
-
export { InlinePopoverPopup, InlinePopoverPositioner, InlinePopoverRoot
|
|
172
|
+
export { InlinePopoverPopup, InlinePopoverPositioner, InlinePopoverRoot };
|
|
173
173
|
|
|
174
174
|
//# sourceMappingURL=prosekit-vue-inline-popover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-vue-inline-popover.js","names":[],"sources":["../src/components/inline-popover/inline-popover-popup.gen.ts","../src/components/inline-popover/inline-popover-positioner.gen.ts","../src/components/inline-popover/inline-popover-root.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerInlinePopoverPopupElement } from '@prosekit/web/inline-popover';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/**\n * Props for the {@link InlinePopoverPopup} Vue component.\n *\n * @public\n */\nexport interface InlinePopoverPopupProps {}\n\n/**\n * A Vue component that renders an `prosekit-inline-popover-popup` custom element.\n *\n * @public\n */\nexport const InlinePopoverPopup: DefineSetupFnComponent<InlinePopoverPopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<InlinePopoverPopupProps & HTMLAttributes>(\n (props, { slots }) => {\n registerInlinePopoverPopupElement();\n\n return () => {\n return h('prosekit-inline-popover-popup', props, slots.default?.());\n };\n },\n { props: [] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerInlinePopoverPositionerElement, type InlinePopoverPositionerProps as InlinePopoverPositionerElementProps } from '@prosekit/web/inline-popover';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link InlinePopoverPositioner} Vue component.\n *\n * @public\n */\nexport interface InlinePopoverPositionerProps {\n /**\n * The initial placement of the floating element\n *\n * @default \"top\"\n */\n placement?: InlinePopoverPositionerElementProps['placement'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 12\n */\n offset?: InlinePopoverPositionerElementProps['offset'];\n /**\n * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default true\n */\n hide?: InlinePopoverPositionerElementProps['hide'];\n /**\n * Whether 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 use the browser Popover API to place the floating element on\n * top of other page content.\n *\n * @default true\n */\n hoist?: InlinePopoverPositionerElementProps['hoist'];\n /**\n * Whether to flip the `placement` in order to keep it in view when the\n * preferred placement(s) will overflow the clipping boundary. You can also\n * provide an array of placements to try sequentially if the preferred\n * `placement` does not fit.\n *\n * @default true\n */\n flip?: InlinePopoverPositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: InlinePopoverPositionerElementProps['shift'];\n /**\n * Whether to constrain the floating element's width and height to not exceed\n * the viewport.\n *\n * @default false\n */\n fitViewport?: InlinePopoverPositionerElementProps['fitViewport'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: InlinePopoverPositionerElementProps['sameWidth'];\n /**\n * Whether to constrain the floating element's height so that it matches the\n * reference element.\n *\n * @default false\n */\n sameHeight?: InlinePopoverPositionerElementProps['sameHeight'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: InlinePopoverPositionerElementProps['boundary'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: InlinePopoverPositionerElementProps['rootBoundary'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: InlinePopoverPositionerElementProps['elementContext'];\n /**\n * Whether to check the alternate elementContext's boundary. Please see\n * https://floating-ui.com/docs/detectoverflow#altboundary for more\n * information.\n *\n * @default false\n */\n altBoundary?: InlinePopoverPositionerElementProps['altBoundary'];\n}\n\n/**\n * A Vue component that renders an `prosekit-inline-popover-positioner` custom element.\n *\n * @public\n */\nexport const InlinePopoverPositioner: DefineSetupFnComponent<InlinePopoverPositionerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<InlinePopoverPositionerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerInlinePopoverPositionerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n return [[p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17] = splittedProps.value[0];\n\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-inline-popover-positioner', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerInlinePopoverRootElement, type InlinePopoverRootEvents, type InlinePopoverRootProps as InlinePopoverRootElementProps } from '@prosekit/web/inline-popover';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\nimport { useEditorContext } from '../../injection/editor-context.ts';\n\n/**\n * Props for the {@link InlinePopoverRoot} Vue component.\n *\n * @public\n */\nexport interface InlinePopoverRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: InlinePopoverRootElementProps['editor'];\n /**\n * Whether the popover is open by default when some inline content is\n * selected.\n *\n * @default true\n */\n defaultOpen?: InlinePopoverRootElementProps['defaultOpen'];\n /**\n * Whether the inline popover should be dismissed when the editor receives an\n * Escape key press.\n *\n * @default true\n */\n dismissOnEscape?: InlinePopoverRootElementProps['dismissOnEscape'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: InlinePopoverRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: InlinePopoverRootElementProps['disabled'];\n /** */\n onOpenChange?: (event: InlinePopoverRootEvents['openChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-inline-popover-root` custom element.\n *\n * @public\n */\nexport const InlinePopoverRoot: DefineSetupFnComponent<InlinePopoverRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<InlinePopoverRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerInlinePopoverRootElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const p3Fallback = useEditorContext();\n\n const splittedProps = computed(() => {\n const { defaultOpen: p0, disabled: p1, dismissOnEscape: p2, editor: p3, open: p4, onOpenChange: e0, ...restProps } = props;\n return [[p0, p1, p2, p3, p4, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, p4, e0] = splittedProps.value[0];\n\n Object.assign(element, { defaultOpen: p0, disabled: p1, dismissOnEscape: p2, editor: p3 ?? p3Fallback, open: p4 });\n\n handlers.length = 0;\n handlers.push(e0);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-inline-popover-root', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['defaultOpen', 'disabled', 'dismissOnEscape', 'editor', 'open', 'onOpenChange'] },\n);\n\nexport type { InlinePopoverRootEvents };\n"],"mappings":";;;;;;;;;;;;AAmBA,MAAa,qBAAuG,iCACjH,OAAO,EAAE,YAAY;AACpB,oCAAmC;AAEnC,cAAa;AACX,SAAO,EAAE,iCAAiC,OAAO,MAAM,WAAW,CAAC;;GAGvE,EAAE,OAAO,EAAE,EAAE,CACd;;;;;;;;;;;ACsHD,MAAa,0BAAiH,iCAC3H,OAAO,EAAE,YAAY;AACpB,yCAAwC;CAExC,MAAM,aAAa,WAA+B,KAAK;CAEvD,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,aAAa,IAAI,YAAY,IAAI,UAAU,IAAI,gBAAgB,IAAI,aAAa,IAAI,MAAM,IAAI,MAAM,IAAI,OAAO,IAAI,QAAQ,IAAI,QAAQ,IAAI,iBAAiB,KAAK,SAAS,KAAK,WAAW,KAAK,cAAc,KAAK,YAAY,KAAK,WAAW,KAAK,OAAO,KAAK,UAAU,KAAK,GAAG,cAAc;AACvS,SAAO,CAAC;GAAC;GAAI;GAAI;GAAI;GAAI;GAAI;GAAI;GAAI;GAAI;GAAI;GAAI;GAAK;GAAK;GAAK;GAAK;GAAK;GAAK;GAAK;GAAI,EAAE,UAAU;GACpG;AAEF,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,KAAK,KAAK,KAAK,KAAK,KAAK,KAAK,OAAO,cAAc,MAAM;AAE7G,SAAO,OAAO,SAAS;GAAE,aAAa;GAAI,YAAY;GAAI,UAAU;GAAI,gB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AAK,MAAM,CAAC,OAAO,cAAc,CAAC,aAAa,CAAC,SAAS,CACvD,SAAQ,iBACN,YACC,UAAiB;AAChB,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cAAa;EACX,MAAM,YAAY,cAAc,MAAM;AACtC,SAAO,EAAE,gCAAgC;GAAE,GAAG;GAAW,KAAK;GAAY,EAAE,MAAM,WAAW,CAAC;;GAGlG,EAAE,OAAO;CAAC;CAAe;CAAY;CAAmB;CAAU;CAAQ;CAAe,EAAE,CAC5F"}
|
|
1
|
+
{"version":3,"file":"prosekit-vue-inline-popover.js","names":[],"sources":["../src/components/inline-popover/inline-popover-popup.gen.ts","../src/components/inline-popover/inline-popover-positioner.gen.ts","../src/components/inline-popover/inline-popover-root.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerInlinePopoverPopupElement } from '@prosekit/web/inline-popover';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/**\n * Props for the {@link InlinePopoverPopup} Vue component.\n *\n * @public\n */\nexport interface InlinePopoverPopupProps {}\n\n/**\n * A Vue component that renders an `prosekit-inline-popover-popup` custom element.\n *\n * @public\n */\nexport const InlinePopoverPopup: DefineSetupFnComponent<InlinePopoverPopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<InlinePopoverPopupProps & HTMLAttributes>(\n (props, { slots }) => {\n registerInlinePopoverPopupElement();\n\n return () => {\n return h('prosekit-inline-popover-popup', props, slots.default?.());\n };\n },\n { props: [] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerInlinePopoverPositionerElement, type InlinePopoverPositionerProps as InlinePopoverPositionerElementProps } from '@prosekit/web/inline-popover';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link InlinePopoverPositioner} Vue component.\n *\n * @public\n */\nexport interface InlinePopoverPositionerProps {\n /**\n * The initial placement of the floating element\n *\n * @default \"top\"\n */\n placement?: InlinePopoverPositionerElementProps['placement'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 12\n */\n offset?: InlinePopoverPositionerElementProps['offset'];\n /**\n * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default true\n */\n hide?: InlinePopoverPositionerElementProps['hide'];\n /**\n * Whether to use the browser [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)\n * to place the floating element on top of other page content.\n *\n * @default false\n */\n hoist?: InlinePopoverPositionerElementProps['hoist'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default true\n */\n overlap?: InlinePopoverPositionerElementProps['overlap'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default true\n */\n inline?: InlinePopoverPositionerElementProps['inline'];\n /**\n * Describes the virtual padding around the boundary to check for overflow.\n *\n * @default 8\n */\n overflowPadding?: InlinePopoverPositionerElementProps['overflowPadding'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: InlinePopoverPositionerElementProps['strategy'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: InlinePopoverPositionerElementProps['autoUpdate'];\n /**\n * Whether to flip the `placement` in order to keep it in view when the\n * preferred placement(s) will overflow the clipping boundary. You can also\n * provide an array of placements to try sequentially if the preferred\n * `placement` does not fit.\n *\n * @default true\n */\n flip?: InlinePopoverPositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: InlinePopoverPositionerElementProps['shift'];\n /**\n * Whether to constrain the floating element's width and height to not exceed\n * the viewport.\n *\n * @default false\n */\n fitViewport?: InlinePopoverPositionerElementProps['fitViewport'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: InlinePopoverPositionerElementProps['sameWidth'];\n /**\n * Whether to constrain the floating element's height so that it matches the\n * reference element.\n *\n * @default false\n */\n sameHeight?: InlinePopoverPositionerElementProps['sameHeight'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: InlinePopoverPositionerElementProps['boundary'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: InlinePopoverPositionerElementProps['rootBoundary'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: InlinePopoverPositionerElementProps['elementContext'];\n /**\n * Whether to check the alternate elementContext's boundary. Please see\n * https://floating-ui.com/docs/detectoverflow#altboundary for more\n * information.\n *\n * @default false\n */\n altBoundary?: InlinePopoverPositionerElementProps['altBoundary'];\n}\n\n/**\n * A Vue component that renders an `prosekit-inline-popover-positioner` custom element.\n *\n * @public\n */\nexport const InlinePopoverPositioner: DefineSetupFnComponent<InlinePopoverPositionerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<InlinePopoverPositionerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerInlinePopoverPositionerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n return [[p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17] = splittedProps.value[0];\n\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-inline-popover-positioner', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerInlinePopoverRootElement, type InlinePopoverRootEvents, type InlinePopoverRootProps as InlinePopoverRootElementProps } from '@prosekit/web/inline-popover';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\nimport { useEditorContext } from '../../injection/editor-context.ts';\n\n/**\n * Props for the {@link InlinePopoverRoot} Vue component.\n *\n * @public\n */\nexport interface InlinePopoverRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: InlinePopoverRootElementProps['editor'];\n /**\n * Whether the popover is open by default when some inline content is\n * selected.\n *\n * @default true\n */\n defaultOpen?: InlinePopoverRootElementProps['defaultOpen'];\n /**\n * Whether the inline popover should be dismissed when the editor receives an\n * Escape key press.\n *\n * @default true\n */\n dismissOnEscape?: InlinePopoverRootElementProps['dismissOnEscape'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: InlinePopoverRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: InlinePopoverRootElementProps['disabled'];\n /** Emitted when the open state of the popover changes. */\n onOpenChange?: (event: InlinePopoverRootEvents['openChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-inline-popover-root` custom element.\n *\n * @public\n */\nexport const InlinePopoverRoot: DefineSetupFnComponent<InlinePopoverRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<InlinePopoverRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerInlinePopoverRootElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const p3Fallback = useEditorContext();\n\n const splittedProps = computed(() => {\n const { defaultOpen: p0, disabled: p1, dismissOnEscape: p2, editor: p3, open: p4, onOpenChange: e0, ...restProps } = props;\n return [[p0, p1, p2, p3, p4, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, p4, e0] = splittedProps.value[0];\n\n Object.assign(element, { defaultOpen: p0, disabled: p1, dismissOnEscape: p2, editor: p3 ?? p3Fallback, open: p4 });\n\n handlers.length = 0;\n handlers.push(e0);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-inline-popover-root', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['defaultOpen', 'disabled', 'dismissOnEscape', 'editor', 'open', 'onOpenChange'] },\n);\n"],"mappings":";;;;;;;;;;;;AAmBA,MAAa,qBAAuG,iCACjH,OAAO,EAAE,YAAY;AACpB,oCAAmC;AAEnC,cAAa;AACX,SAAO,EAAE,iCAAiC,OAAO,MAAM,WAAW,CAAC;;GAGvE,EAAE,OAAO,EAAE,E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
1
|
import { DefineSetupFnComponent, HTMLAttributes } from "vue";
|
|
2
|
-
import { MenuItemEvents, MenuItemProps as MenuItemProps$1, MenuPopupProps as MenuPopupProps$1, MenuPositionerProps as MenuPositionerProps$1, MenuRootEvents, MenuRootProps as MenuRootProps$1, MenuTriggerEvents, MenuTriggerProps as MenuTriggerProps$1
|
|
2
|
+
import { MenuItemEvents, MenuItemProps as MenuItemProps$1, MenuPopupProps as MenuPopupProps$1, MenuPositionerProps as MenuPositionerProps$1, MenuRootEvents, MenuRootProps as MenuRootProps$1, MenuTriggerEvents, MenuTriggerProps as MenuTriggerProps$1 } from "@prosekit/web/menu";
|
|
3
3
|
|
|
4
4
|
//#region src/components/menu/menu-item.gen.d.ts
|
|
5
5
|
/**
|
|
@@ -283,5 +283,5 @@ interface MenuTriggerProps {
|
|
|
283
283
|
*/
|
|
284
284
|
declare const MenuTrigger: DefineSetupFnComponent<MenuTriggerProps & HTMLAttributes>;
|
|
285
285
|
//#endregion
|
|
286
|
-
export { MenuItem, type
|
|
286
|
+
export { MenuItem, type MenuItemProps, MenuPopup, type MenuPopupProps, MenuPositioner, type MenuPositionerProps, MenuRoot, type MenuRootProps, MenuSubmenuRoot, type MenuSubmenuRootProps, MenuSubmenuTrigger, type MenuSubmenuTriggerProps, MenuTrigger, type MenuTriggerProps };
|
|
287
287
|
//# sourceMappingURL=prosekit-vue-menu.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, defineComponent, h, shallowRef, watchEffect } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { registerMenuItemElement, registerMenuPopupElement, registerMenuPositionerElement, registerMenuRootElement, registerMenuSubmenuRootElement, registerMenuSubmenuTriggerElement, registerMenuTriggerElement } from "@prosekit/web/menu";
|
|
3
3
|
//#region src/components/menu/menu-item.gen.ts
|
|
4
4
|
/**
|
|
5
5
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
@@ -308,6 +308,6 @@ const MenuTrigger = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
308
308
|
};
|
|
309
309
|
}, { props: ["disabled", "onOpenChange"] });
|
|
310
310
|
//#endregion
|
|
311
|
-
export { MenuItem, MenuPopup, MenuPositioner, MenuRoot, MenuSubmenuRoot, MenuSubmenuTrigger, MenuTrigger
|
|
311
|
+
export { MenuItem, MenuPopup, MenuPositioner, MenuRoot, MenuSubmenuRoot, MenuSubmenuTrigger, MenuTrigger };
|
|
312
312
|
|
|
313
313
|
//# sourceMappingURL=prosekit-vue-menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-vue-menu.js","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"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerMenuItemElement, type MenuItemEvents, type MenuItemProps as MenuItemElementProps } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link MenuItem} Vue component.\n *\n * @public\n */\nexport interface MenuItemProps {\n /**\n * The unique value for this menu item.\n *\n * @default \"\"\n */\n value?: MenuItemElementProps['value'];\n /**\n * Whether this menu item is disabled.\n *\n * @default false\n */\n disabled?: MenuItemElementProps['disabled'];\n /**\n * Whether to close the menu when the item is pressed.\n *\n * @default true\n */\n closeOnSelect?: MenuItemElementProps['closeOnSelect'];\n /** Emitted when the the item is selected. */\n onSelect?: (event: MenuItemEvents['select']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-menu-item` custom element.\n *\n * @public\n */\nexport const MenuItem: DefineSetupFnComponent<MenuItemProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuItemProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuItemElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { closeOnSelect: p0, disabled: p1, value: p2, onSelect: e0, ...restProps } = props;\n return [[p0, p1, p2, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, e0] = splittedProps.value[0];\n\n Object.assign(element, { closeOnSelect: p0, disabled: p1, value: p2 });\n\n handlers.length = 0;\n handlers.push(e0);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-menu-item', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['closeOnSelect', 'disabled', 'value', 'onSelect'] },\n);\n\nexport type { MenuItemEvents };\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerMenuPopupElement, type MenuPopupProps as MenuPopupElementProps } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link MenuPopup} Vue component.\n *\n * @public\n */\nexport interface MenuPopupProps {\n /**\n * By default, the MenuPopup element will listen for keydown events.\n * You can pass a different element to listen for keydown events.\n *\n * @default null\n */\n eventTarget?: MenuPopupElementProps['eventTarget'];\n}\n\n/**\n * A Vue component that renders an `prosekit-menu-popup` custom element.\n *\n * @public\n */\nexport const MenuPopup: DefineSetupFnComponent<MenuPopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuPopupProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuPopupElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { eventTarget: p0, ...restProps } = props;\n return [[p0], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0] = splittedProps.value[0];\n\n Object.assign(element, { eventTarget: p0 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-menu-popup', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['eventTarget'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerMenuPositionerElement, type MenuPositionerProps as MenuPositionerElementProps } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link MenuPositioner} Vue component.\n *\n * @public\n */\nexport interface MenuPositionerProps {\n /**\n * The initial placement of the floating element\n *\n * @default \"bottom-start\"\n */\n placement?: MenuPositionerElementProps['placement'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: MenuPositionerElementProps['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?: MenuPositionerElementProps['autoUpdate'];\n /**\n * Whether to use the browser Popover API to place the floating element on\n * top of other page content.\n *\n * @default true\n */\n hoist?: MenuPositionerElementProps['hoist'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: MenuPositionerElementProps['offset'];\n /**\n * Whether to flip the `placement` in order to keep it in view when the\n * preferred placement(s) will overflow the clipping boundary. You can also\n * provide an array of placements to try sequentially if the preferred\n * `placement` does not fit.\n *\n * @default true\n */\n flip?: MenuPositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: MenuPositionerElementProps['inline'];\n /**\n * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default false\n */\n hide?: MenuPositionerElementProps['hide'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['altBoundary'];\n}\n\n/**\n * A Vue component that renders an `prosekit-menu-positioner` custom element.\n *\n * @public\n */\nexport const MenuPositioner: DefineSetupFnComponent<MenuPositionerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuPositionerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuPositionerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n return [[p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17] = splittedProps.value[0];\n\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-menu-positioner', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerMenuRootElement, type MenuRootEvents, type MenuRootProps as MenuRootElementProps } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link MenuRoot} Vue component.\n *\n * @public\n */\nexport interface MenuRootProps {\n /**\n * Whether the overlay is initially open.\n * @default false\n */\n defaultOpen?: MenuRootElementProps['defaultOpen'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: MenuRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: MenuRootElementProps['disabled'];\n /** Emitted when the menu is opened or closed. */\n onOpenChange?: (event: MenuRootEvents['openChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-menu-root` custom element.\n *\n * @public\n */\nexport const MenuRoot: DefineSetupFnComponent<MenuRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuRootElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { defaultOpen: p0, disabled: p1, open: p2, onOpenChange: e0, ...restProps } = props;\n return [[p0, p1, p2, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, e0] = splittedProps.value[0];\n\n Object.assign(element, { defaultOpen: p0, disabled: p1, open: p2 });\n\n handlers.length = 0;\n handlers.push(e0);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-menu-root', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['defaultOpen', 'disabled', 'open', 'onOpenChange'] },\n);\n\nexport type { MenuRootEvents };\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerMenuSubmenuRootElement } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/**\n * Props for the {@link MenuSubmenuRoot} Vue component.\n *\n * @public\n */\nexport interface MenuSubmenuRootProps {}\n\n/**\n * A Vue component that renders an `prosekit-menu-submenu-root` custom element.\n *\n * @public\n */\nexport const MenuSubmenuRoot: DefineSetupFnComponent<MenuSubmenuRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuSubmenuRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuSubmenuRootElement();\n\n return () => {\n return h('prosekit-menu-submenu-root', props, slots.default?.());\n };\n },\n { props: [] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerMenuSubmenuTriggerElement } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/**\n * Props for the {@link MenuSubmenuTrigger} Vue component.\n *\n * @public\n */\nexport interface MenuSubmenuTriggerProps {}\n\n/**\n * A Vue component that renders an `prosekit-menu-submenu-trigger` custom element.\n *\n * @public\n */\nexport const MenuSubmenuTrigger: DefineSetupFnComponent<MenuSubmenuTriggerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuSubmenuTriggerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuSubmenuTriggerElement();\n\n return () => {\n return h('prosekit-menu-submenu-trigger', props, slots.default?.());\n };\n },\n { props: [] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerMenuTriggerElement, type MenuTriggerEvents, type MenuTriggerProps as MenuTriggerElementProps } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link MenuTrigger} Vue component.\n *\n * @public\n */\nexport interface MenuTriggerProps {\n /**\n * Whether the component should ignore user interaction.\n *\n * @default false\n */\n disabled?: MenuTriggerElementProps['disabled'];\n /** Emitted when the menu is opened or closed. */\n onOpenChange?: (event: MenuTriggerEvents['openChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-menu-trigger` custom element.\n *\n * @public\n */\nexport const MenuTrigger: DefineSetupFnComponent<MenuTriggerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuTriggerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuTriggerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { disabled: p0, onOpenChange: e0, ...restProps } = props;\n return [[p0, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, e0] = splittedProps.value[0];\n\n Object.assign(element, { disabled: p0 });\n\n handlers.length = 0;\n handlers.push(e0);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-menu-trigger', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['disabled', 'onOpenChange'] },\n);\n\nexport type { MenuTriggerEvents };\n"],"mappings":";;;;;;;;;;;AAwCA,MAAa,WAAmF,iCAC7F,OAAO,EAAE,YAAY;AACpB,0BAAyB;CAEzB,MAAM,aAAa,WAA+B,KAAK;CAEvD,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,eAAe,IAAI,UAAU,IAAI,OAAO,IAAI,UAAU,IAAI,GAAG,cAAc;AACnF,SAAO,CAAC;GAAC;GAAI;GAAI;GAAI;GAAG,EAAE,UAAU;GACpC;CAEF,MAAM,WAAsD,EAAE;AAE9D,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,CAAC,IAAI,IAAI,IAAI,MAAM,cAAc,MAAM;AAE7C,SAAO,OAAO,SAAS;GAAE,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,WAAW,CAAC;;GAGvE,EAAE,OAAO,EAAE,EAAE,CACd;;;;;;;;;;;ACAD,MAAa,cAAyF,iCACnG,OAAO,EAAE,YAAY;AACpB,6BAA4B;CAE5B,MAAM,aAAa,WAA+B,KAAK;CAEvD,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,UAAU,IAAI,cAAc,IAAI,GAAG,cAAc;AACzD,SAAO,CAAC,CAAC,IAAI,GAAG,EAAE,UAAU;GAC5B;CAEF,MAAM,WAAsD,EAAE;AAE9D,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,CAAC,IAAI,MAAM,cAAc,MAAM;AAErC,SAAO,OAAO,SAAS,EAAE,UAAU,IAAI,CAAC;AAExC,WAAS,SAAS;AAClB,WAAS,KAAK,GAAG;GACjB;AAEF,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,aAAa,CAAC,SAAS,CACvD,SAAQ,iBACN,YACC,UAAiB;AAChB,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cAAa;EACX,MAAM,YAAY,cAAc,MAAM;AACtC,SAAO,EAAE,yBAAyB;GAAE,GAAG;GAAW,KAAK;GAAY,EAAE,MAAM,WAAW,CAAC;;GAG3F,EAAE,OAAO,CAAC,YAAY,eAAe,EAAE,CACxC"}
|
|
1
|
+
{"version":3,"file":"prosekit-vue-menu.js","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"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerMenuItemElement, type MenuItemEvents, type MenuItemProps as MenuItemElementProps } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link MenuItem} Vue component.\n *\n * @public\n */\nexport interface MenuItemProps {\n /**\n * The unique value for this menu item.\n *\n * @default \"\"\n */\n value?: MenuItemElementProps['value'];\n /**\n * Whether this menu item is disabled.\n *\n * @default false\n */\n disabled?: MenuItemElementProps['disabled'];\n /**\n * Whether to close the menu when the item is pressed.\n *\n * @default true\n */\n closeOnSelect?: MenuItemElementProps['closeOnSelect'];\n /** Emitted when the the item is selected. */\n onSelect?: (event: MenuItemEvents['select']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-menu-item` custom element.\n *\n * @public\n */\nexport const MenuItem: DefineSetupFnComponent<MenuItemProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuItemProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuItemElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { closeOnSelect: p0, disabled: p1, value: p2, onSelect: e0, ...restProps } = props;\n return [[p0, p1, p2, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, e0] = splittedProps.value[0];\n\n Object.assign(element, { closeOnSelect: p0, disabled: p1, value: p2 });\n\n handlers.length = 0;\n handlers.push(e0);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-menu-item', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['closeOnSelect', 'disabled', 'value', 'onSelect'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerMenuPopupElement, type MenuPopupProps as MenuPopupElementProps } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link MenuPopup} Vue component.\n *\n * @public\n */\nexport interface MenuPopupProps {\n /**\n * By default, the MenuPopup element will listen for keydown events.\n * You can pass a different element to listen for keydown events.\n *\n * @default null\n */\n eventTarget?: MenuPopupElementProps['eventTarget'];\n}\n\n/**\n * A Vue component that renders an `prosekit-menu-popup` custom element.\n *\n * @public\n */\nexport const MenuPopup: DefineSetupFnComponent<MenuPopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuPopupProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuPopupElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { eventTarget: p0, ...restProps } = props;\n return [[p0], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0] = splittedProps.value[0];\n\n Object.assign(element, { eventTarget: p0 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-menu-popup', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['eventTarget'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerMenuPositionerElement, type MenuPositionerProps as MenuPositionerElementProps } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link MenuPositioner} Vue component.\n *\n * @public\n */\nexport interface MenuPositionerProps {\n /**\n * The initial placement of the floating element\n *\n * @default \"bottom-start\"\n */\n placement?: MenuPositionerElementProps['placement'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: MenuPositionerElementProps['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?: MenuPositionerElementProps['autoUpdate'];\n /**\n * Whether to use the browser Popover API to place the floating element on\n * top of other page content.\n *\n * @default true\n */\n hoist?: MenuPositionerElementProps['hoist'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: MenuPositionerElementProps['offset'];\n /**\n * Whether to flip the `placement` in order to keep it in view when the\n * preferred placement(s) will overflow the clipping boundary. You can also\n * provide an array of placements to try sequentially if the preferred\n * `placement` does not fit.\n *\n * @default true\n */\n flip?: MenuPositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: MenuPositionerElementProps['inline'];\n /**\n * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default false\n */\n hide?: MenuPositionerElementProps['hide'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['altBoundary'];\n}\n\n/**\n * A Vue component that renders an `prosekit-menu-positioner` custom element.\n *\n * @public\n */\nexport const MenuPositioner: DefineSetupFnComponent<MenuPositionerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuPositionerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuPositionerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n return [[p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17] = splittedProps.value[0];\n\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-menu-positioner', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerMenuRootElement, type MenuRootEvents, type MenuRootProps as MenuRootElementProps } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link MenuRoot} Vue component.\n *\n * @public\n */\nexport interface MenuRootProps {\n /**\n * Whether the overlay is initially open.\n * @default false\n */\n defaultOpen?: MenuRootElementProps['defaultOpen'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: MenuRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: MenuRootElementProps['disabled'];\n /** Emitted when the menu is opened or closed. */\n onOpenChange?: (event: MenuRootEvents['openChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-menu-root` custom element.\n *\n * @public\n */\nexport const MenuRoot: DefineSetupFnComponent<MenuRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuRootElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { defaultOpen: p0, disabled: p1, open: p2, onOpenChange: e0, ...restProps } = props;\n return [[p0, p1, p2, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, e0] = splittedProps.value[0];\n\n Object.assign(element, { defaultOpen: p0, disabled: p1, open: p2 });\n\n handlers.length = 0;\n handlers.push(e0);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-menu-root', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['defaultOpen', 'disabled', 'open', 'onOpenChange'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerMenuSubmenuRootElement } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/**\n * Props for the {@link MenuSubmenuRoot} Vue component.\n *\n * @public\n */\nexport interface MenuSubmenuRootProps {}\n\n/**\n * A Vue component that renders an `prosekit-menu-submenu-root` custom element.\n *\n * @public\n */\nexport const MenuSubmenuRoot: DefineSetupFnComponent<MenuSubmenuRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuSubmenuRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuSubmenuRootElement();\n\n return () => {\n return h('prosekit-menu-submenu-root', props, slots.default?.());\n };\n },\n { props: [] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerMenuSubmenuTriggerElement } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/**\n * Props for the {@link MenuSubmenuTrigger} Vue component.\n *\n * @public\n */\nexport interface MenuSubmenuTriggerProps {}\n\n/**\n * A Vue component that renders an `prosekit-menu-submenu-trigger` custom element.\n *\n * @public\n */\nexport const MenuSubmenuTrigger: DefineSetupFnComponent<MenuSubmenuTriggerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuSubmenuTriggerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuSubmenuTriggerElement();\n\n return () => {\n return h('prosekit-menu-submenu-trigger', props, slots.default?.());\n };\n },\n { props: [] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerMenuTriggerElement, type MenuTriggerEvents, type MenuTriggerProps as MenuTriggerElementProps } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link MenuTrigger} Vue component.\n *\n * @public\n */\nexport interface MenuTriggerProps {\n /**\n * Whether the component should ignore user interaction.\n *\n * @default false\n */\n disabled?: MenuTriggerElementProps['disabled'];\n /** Emitted when the menu is opened or closed. */\n onOpenChange?: (event: MenuTriggerEvents['openChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-menu-trigger` custom element.\n *\n * @public\n */\nexport const MenuTrigger: DefineSetupFnComponent<MenuTriggerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuTriggerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuTriggerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { disabled: p0, onOpenChange: e0, ...restProps } = props;\n return [[p0, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, e0] = splittedProps.value[0];\n\n Object.assign(element, { disabled: p0 });\n\n handlers.length = 0;\n handlers.push(e0);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n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AAQ,iBACN,YACC,UAAiB;AAChB,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cAAa;EACX,MAAM,YAAY,cAAc,MAAM;AACtC,SAAO,EAAE,yBAAyB;GAAE,GAAG;GAAW,KAAK;GAAY,EAAE,MAAM,WAAW,CAAC;;GAG3F,EAAE,OAAO,CAAC,YAAY,eAAe,EAAE,CACxC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DefineSetupFnComponent, HTMLAttributes } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { PopoverPositionerProps as PopoverPositionerProps$1, PopoverRootEvents, PopoverRootProps as PopoverRootProps$1, PopoverTriggerEvents, PopoverTriggerProps as PopoverTriggerProps$1 } from "@prosekit/web/popover";
|
|
3
3
|
|
|
4
4
|
//#region src/components/popover/popover-popup.gen.d.ts
|
|
5
5
|
/**
|
|
@@ -235,5 +235,5 @@ interface PopoverTriggerProps {
|
|
|
235
235
|
*/
|
|
236
236
|
declare const PopoverTrigger: DefineSetupFnComponent<PopoverTriggerProps & HTMLAttributes>;
|
|
237
237
|
//#endregion
|
|
238
|
-
export {
|
|
238
|
+
export { PopoverPopup, type PopoverPopupProps, PopoverPositioner, type PopoverPositionerProps, PopoverRoot, type PopoverRootProps, PopoverTrigger, type PopoverTriggerProps };
|
|
239
239
|
//# sourceMappingURL=prosekit-vue-popover.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, defineComponent, h, shallowRef, watchEffect } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { registerPopoverPopupElement, registerPopoverPositionerElement, registerPopoverRootElement, registerPopoverTriggerElement } from "@prosekit/web/popover";
|
|
3
3
|
//#region src/components/popover/popover-popup.gen.ts
|
|
4
4
|
/**
|
|
5
5
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
@@ -224,6 +224,6 @@ const PopoverTrigger = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
224
224
|
"onOpenChange"
|
|
225
225
|
] });
|
|
226
226
|
//#endregion
|
|
227
|
-
export {
|
|
227
|
+
export { PopoverPopup, PopoverPositioner, PopoverRoot, PopoverTrigger };
|
|
228
228
|
|
|
229
229
|
//# sourceMappingURL=prosekit-vue-popover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-vue-popover.js","names":[],"sources":["../src/components/popover/popover-popup.gen.ts","../src/components/popover/popover-positioner.gen.ts","../src/components/popover/popover-root.gen.ts","../src/components/popover/popover-trigger.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerPopoverPopupElement } from '@prosekit/web/popover';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/**\n * Props for the {@link PopoverPopup} Vue component.\n *\n * @public\n */\nexport interface PopoverPopupProps {}\n\n/**\n * A Vue component that renders an `prosekit-popover-popup` custom element.\n *\n * @public\n */\nexport const PopoverPopup: DefineSetupFnComponent<PopoverPopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<PopoverPopupProps & HTMLAttributes>(\n (props, { slots }) => {\n registerPopoverPopupElement();\n\n return () => {\n return h('prosekit-popover-popup', props, slots.default?.());\n };\n },\n { props: [] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerPopoverPositionerElement, type PopoverPositionerProps as PopoverPositionerElementProps } from '@prosekit/web/popover';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link PopoverPositioner} Vue component.\n *\n * @public\n */\nexport interface PopoverPositionerProps {\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: PopoverPositionerElementProps['strategy'];\n /**\n * The initial placement of the floating element\n *\n * @default \"top\"\n */\n placement?: PopoverPositionerElementProps['placement'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: PopoverPositionerElementProps['autoUpdate'];\n /**\n * Whether to use the browser Popover API to place the floating element on\n * top of other page content.\n *\n * @default true\n */\n hoist?: PopoverPositionerElementProps['hoist'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: PopoverPositionerElementProps['offset'];\n /**\n * Whether to flip the `placement` in order to keep it in view when the\n * preferred placement(s) will overflow the clipping boundary. You can also\n * provide an array of placements to try sequentially if the preferred\n * `placement` does not fit.\n *\n * @default true\n */\n flip?: PopoverPositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: PopoverPositionerElementProps['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?: PopoverPositionerElementProps['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?: PopoverPositionerElementProps['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?: PopoverPositionerElementProps['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?: PopoverPositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: PopoverPositionerElementProps['inline'];\n /**\n * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default false\n */\n hide?: PopoverPositionerElementProps['hide'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: PopoverPositionerElementProps['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?: PopoverPositionerElementProps['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?: PopoverPositionerElementProps['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?: PopoverPositionerElementProps['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?: PopoverPositionerElementProps['altBoundary'];\n}\n\n/**\n * A Vue component that renders an `prosekit-popover-positioner` custom element.\n *\n * @public\n */\nexport const PopoverPositioner: DefineSetupFnComponent<PopoverPositionerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<PopoverPositionerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerPopoverPositionerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n return [[p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17] = splittedProps.value[0];\n\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-popover-positioner', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerPopoverRootElement, type PopoverRootEvents, type PopoverRootProps as PopoverRootElementProps } from '@prosekit/web/popover';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link PopoverRoot} Vue component.\n *\n * @public\n */\nexport interface PopoverRootProps {\n /**\n * Whether the popover should be modal.\n * When true, the popover will trap focus and prevent interaction with the rest of the page.\n *\n * @default false\n */\n modal?: PopoverRootElementProps['modal'];\n /**\n * Whether the overlay is initially open.\n * @default false\n */\n defaultOpen?: PopoverRootElementProps['defaultOpen'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: PopoverRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: PopoverRootElementProps['disabled'];\n /** Emitted when the popover is opened or closed. */\n onOpenChange?: (event: PopoverRootEvents['openChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-popover-root` custom element.\n *\n * @public\n */\nexport const PopoverRoot: DefineSetupFnComponent<PopoverRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<PopoverRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerPopoverRootElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { defaultOpen: p0, disabled: p1, modal: p2, open: p3, onOpenChange: e0, ...restProps } = props;\n return [[p0, p1, p2, p3, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, e0] = splittedProps.value[0];\n\n Object.assign(element, { defaultOpen: p0, disabled: p1, modal: p2, open: p3 });\n\n handlers.length = 0;\n handlers.push(e0);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-popover-root', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['defaultOpen', 'disabled', 'modal', 'open', 'onOpenChange'] },\n);\n\nexport type { PopoverRootEvents };\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerPopoverTriggerElement, type PopoverTriggerEvents, type PopoverTriggerProps as PopoverTriggerElementProps } from '@prosekit/web/popover';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link PopoverTrigger} Vue component.\n *\n * @public\n */\nexport interface PopoverTriggerProps {\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: PopoverTriggerElementProps['disabled'];\n /**\n * Whether the popover should also open when the trigger is hovered.\n * @default false\n */\n openOnHover?: PopoverTriggerElementProps['openOnHover'];\n /**\n * The delay in milliseconds before opening the popover when hovering.\n * Only applies when `openOnHover` is true.\n * @default 300\n */\n delay?: PopoverTriggerElementProps['delay'];\n /**\n * The delay in milliseconds before closing the popover when hover ends.\n * Only applies when `openOnHover` is true.\n * @default 0\n */\n closeDelay?: PopoverTriggerElementProps['closeDelay'];\n /** Emitted when the popover is opened or closed. */\n onOpenChange?: (event: PopoverTriggerEvents['openChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-popover-trigger` custom element.\n *\n * @public\n */\nexport const PopoverTrigger: DefineSetupFnComponent<PopoverTriggerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<PopoverTriggerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerPopoverTriggerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { closeDelay: p0, delay: p1, disabled: p2, openOnHover: p3, onOpenChange: e0, ...restProps } = props;\n return [[p0, p1, p2, p3, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, e0] = splittedProps.value[0];\n\n Object.assign(element, { closeDelay: p0, delay: p1, disabled: p2, openOnHover: p3 });\n\n handlers.length = 0;\n handlers.push(e0);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-popover-trigger', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['closeDelay', 'delay', 'disabled', 'openOnHover', 'onOpenChange'] },\n);\n\nexport type { PopoverTriggerEvents };\n"],"mappings":";;;;;;;;;;;AAmBA,MAAa,eAA2F,iCACrG,OAAO,EAAE,YAAY;AACpB,8BAA6B;AAE7B,cAAa;AACX,SAAO,EAAE,0BAA0B,OAAO,MAAM,WAAW,CAAC;;GAGhE,EAAE,OAAO,EAAE,EAAE,CACd;;;;;;;;;;;ACuHD,MAAa,oBAAqG,iCAC/G,OAAO,EAAE,YAAY;AACpB,mCAAkC;CAElC,MAAM,aAAa,WAA+B,KAAK;CAEvD,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,aAAa,IAAI,YAAY,IAAI,UAAU,I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D,EAAE;AAE9D,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,CAAC,IAAI,IAAI,IAAI,IAAI,MAAM,cAAc,MAAM;AAEjD,SAAO,OAAO,SAAS;GAAE,YAAY;GAAI,OAAO;GAAI,UAAU;GAAI,aAAa;GAAI,CAAC;AAEpF,WAAS,SAAS;AAClB,WAAS,KAAK,GAAG;GACjB;AAEF,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,aAAa,CAAC,SAAS,CACvD,SAAQ,iBACN,YACC,UAAiB;AAChB,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cAAa;EACX,MAAM,YAAY,cAAc,MAAM;AACtC,SAAO,EAAE,4BAA4B;GAAE,GAAG;GAAW,KAAK;GAAY,EAAE,MAAM,WAAW,CAAC;;GAG9F,EAAE,OAAO;CAAC;CAAc;CAAS;CAAY;CAAe;CAAe,EAAE,CAC9E"}
|
|
1
|
+
{"version":3,"file":"prosekit-vue-popover.js","names":[],"sources":["../src/components/popover/popover-popup.gen.ts","../src/components/popover/popover-positioner.gen.ts","../src/components/popover/popover-root.gen.ts","../src/components/popover/popover-trigger.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerPopoverPopupElement } from '@prosekit/web/popover';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/**\n * Props for the {@link PopoverPopup} Vue component.\n *\n * @public\n */\nexport interface PopoverPopupProps {}\n\n/**\n * A Vue component that renders an `prosekit-popover-popup` custom element.\n *\n * @public\n */\nexport const PopoverPopup: DefineSetupFnComponent<PopoverPopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<PopoverPopupProps & HTMLAttributes>(\n (props, { slots }) => {\n registerPopoverPopupElement();\n\n return () => {\n return h('prosekit-popover-popup', props, slots.default?.());\n };\n },\n { props: [] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerPopoverPositionerElement, type PopoverPositionerProps as PopoverPositionerElementProps } from '@prosekit/web/popover';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link PopoverPositioner} Vue component.\n *\n * @public\n */\nexport interface PopoverPositionerProps {\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: PopoverPositionerElementProps['strategy'];\n /**\n * The initial placement of the floating element\n *\n * @default \"top\"\n */\n placement?: PopoverPositionerElementProps['placement'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: PopoverPositionerElementProps['autoUpdate'];\n /**\n * Whether to use the browser Popover API to place the floating element on\n * top of other page content.\n *\n * @default true\n */\n hoist?: PopoverPositionerElementProps['hoist'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: PopoverPositionerElementProps['offset'];\n /**\n * Whether to flip the `placement` in order to keep it in view when the\n * preferred placement(s) will overflow the clipping boundary. You can also\n * provide an array of placements to try sequentially if the preferred\n * `placement` does not fit.\n *\n * @default true\n */\n flip?: PopoverPositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: PopoverPositionerElementProps['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?: PopoverPositionerElementProps['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?: PopoverPositionerElementProps['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?: PopoverPositionerElementProps['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?: PopoverPositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: PopoverPositionerElementProps['inline'];\n /**\n * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default false\n */\n hide?: PopoverPositionerElementProps['hide'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: PopoverPositionerElementProps['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?: PopoverPositionerElementProps['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?: PopoverPositionerElementProps['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?: PopoverPositionerElementProps['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?: PopoverPositionerElementProps['altBoundary'];\n}\n\n/**\n * A Vue component that renders an `prosekit-popover-positioner` custom element.\n *\n * @public\n */\nexport const PopoverPositioner: DefineSetupFnComponent<PopoverPositionerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<PopoverPositionerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerPopoverPositionerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n return [[p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17] = splittedProps.value[0];\n\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-popover-positioner', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerPopoverRootElement, type PopoverRootEvents, type PopoverRootProps as PopoverRootElementProps } from '@prosekit/web/popover';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link PopoverRoot} Vue component.\n *\n * @public\n */\nexport interface PopoverRootProps {\n /**\n * Whether the popover should be modal.\n * When true, the popover will trap focus and prevent interaction with the rest of the page.\n *\n * @default false\n */\n modal?: PopoverRootElementProps['modal'];\n /**\n * Whether the overlay is initially open.\n * @default false\n */\n defaultOpen?: PopoverRootElementProps['defaultOpen'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: PopoverRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: PopoverRootElementProps['disabled'];\n /** Emitted when the popover is opened or closed. */\n onOpenChange?: (event: PopoverRootEvents['openChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-popover-root` custom element.\n *\n * @public\n */\nexport const PopoverRoot: DefineSetupFnComponent<PopoverRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<PopoverRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerPopoverRootElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { defaultOpen: p0, disabled: p1, modal: p2, open: p3, onOpenChange: e0, ...restProps } = props;\n return [[p0, p1, p2, p3, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, e0] = splittedProps.value[0];\n\n Object.assign(element, { defaultOpen: p0, disabled: p1, modal: p2, open: p3 });\n\n handlers.length = 0;\n handlers.push(e0);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-popover-root', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['defaultOpen', 'disabled', 'modal', 'open', 'onOpenChange'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerPopoverTriggerElement, type PopoverTriggerEvents, type PopoverTriggerProps as PopoverTriggerElementProps } from '@prosekit/web/popover';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link PopoverTrigger} Vue component.\n *\n * @public\n */\nexport interface PopoverTriggerProps {\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: PopoverTriggerElementProps['disabled'];\n /**\n * Whether the popover should also open when the trigger is hovered.\n * @default false\n */\n openOnHover?: PopoverTriggerElementProps['openOnHover'];\n /**\n * The delay in milliseconds before opening the popover when hovering.\n * Only applies when `openOnHover` is true.\n * @default 300\n */\n delay?: PopoverTriggerElementProps['delay'];\n /**\n * The delay in milliseconds before closing the popover when hover ends.\n * Only applies when `openOnHover` is true.\n * @default 0\n */\n closeDelay?: PopoverTriggerElementProps['closeDelay'];\n /** Emitted when the popover is opened or closed. */\n onOpenChange?: (event: PopoverTriggerEvents['openChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-popover-trigger` custom element.\n *\n * @public\n */\nexport const PopoverTrigger: DefineSetupFnComponent<PopoverTriggerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<PopoverTriggerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerPopoverTriggerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { closeDelay: p0, delay: p1, disabled: p2, openOnHover: p3, onOpenChange: e0, ...restProps } = props;\n return [[p0, p1, p2, p3, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, e0] = splittedProps.value[0];\n\n Object.assign(element, { closeDelay: p0, delay: p1, disabled: p2, openOnHover: p3 });\n\n handlers.length = 0;\n handlers.push(e0);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-popover-trigger', { ...restPro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
import { DefineSetupFnComponent, HTMLAttributes } from "vue";
|
|
2
|
-
import { ResizableHandleProps as ResizableHandleProps$1, ResizableRootEvents, ResizableRootProps as ResizableRootProps$1
|
|
2
|
+
import { ResizableHandleProps as ResizableHandleProps$1, ResizableRootEvents, ResizableRootProps as ResizableRootProps$1 } from "@prosekit/web/resizable";
|
|
3
3
|
|
|
4
4
|
//#region src/components/resizable/resizable-root.gen.d.ts
|
|
5
5
|
/**
|
|
@@ -59,5 +59,5 @@ interface ResizableHandleProps {
|
|
|
59
59
|
*/
|
|
60
60
|
declare const ResizableHandle: DefineSetupFnComponent<ResizableHandleProps & HTMLAttributes>;
|
|
61
61
|
//#endregion
|
|
62
|
-
export { ResizableHandle, type ResizableHandleProps, ResizableRoot, type
|
|
62
|
+
export { ResizableHandle, type ResizableHandleProps, ResizableRoot, type ResizableRootProps };
|
|
63
63
|
//# sourceMappingURL=prosekit-vue-resizable.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, defineComponent, h, shallowRef, watchEffect } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { registerResizableHandleElement, registerResizableRootElement } from "@prosekit/web/resizable";
|
|
3
3
|
//#region src/components/resizable/resizable-root.gen.ts
|
|
4
4
|
/**
|
|
5
5
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
@@ -91,6 +91,6 @@ const ResizableHandle = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
91
91
|
};
|
|
92
92
|
}, { props: ["position"] });
|
|
93
93
|
//#endregion
|
|
94
|
-
export { ResizableHandle, ResizableRoot
|
|
94
|
+
export { ResizableHandle, ResizableRoot };
|
|
95
95
|
|
|
96
96
|
//# sourceMappingURL=prosekit-vue-resizable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-vue-resizable.js","names":[],"sources":["../src/components/resizable/resizable-root.gen.ts","../src/components/resizable/resizable-handle.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerResizableRootElement, type ResizableRootEvents, type ResizableRootProps as ResizableRootElementProps } from '@prosekit/web/resizable';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link ResizableRoot} Vue component.\n *\n * @public\n */\nexport interface ResizableRootProps {\n /**\n * The width of the resizable element.\n *\n * @default null\n */\n width?: ResizableRootElementProps['width'];\n /**\n * The height of the resizable element.\n *\n * @default null\n */\n height?: ResizableRootElementProps['height'];\n /**\n * The aspect ratio of the resizable element.\n *\n * @default null\n */\n aspectRatio?: ResizableRootElementProps['aspectRatio'];\n /** Emitted when a resize operation starts. */\n onResizeStart?: (event: ResizableRootEvents['resizeStart']) => void;\n /** Emitted when a resize operation ends. */\n onResizeEnd?: (event: ResizableRootEvents['resizeEnd']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-resizable-root` custom element.\n *\n * @public\n */\nexport const ResizableRoot: DefineSetupFnComponent<ResizableRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<ResizableRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerResizableRootElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { aspectRatio: p0, height: p1, width: p2, onResizeEnd: e0, onResizeStart: e1, ...restProps } = props;\n return [[p0, p1, p2, e0, e1], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, e0, e1] = splittedProps.value[0];\n\n Object.assign(element, { aspectRatio: p0, height: p1, width: p2 });\n\n handlers.length = 0;\n handlers.push(e0);\n handlers.push(e1);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['resizeEnd', 'resizeStart'].entries()) {\n element.addEventListener(\n eventName,\n (event: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-resizable-root', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['aspectRatio', 'height', 'width', 'onResizeEnd', 'onResizeStart'] },\n);\n
|
|
1
|
+
{"version":3,"file":"prosekit-vue-resizable.js","names":[],"sources":["../src/components/resizable/resizable-root.gen.ts","../src/components/resizable/resizable-handle.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerResizableRootElement, type ResizableRootEvents, type ResizableRootProps as ResizableRootElementProps } from '@prosekit/web/resizable';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link ResizableRoot} Vue component.\n *\n * @public\n */\nexport interface ResizableRootProps {\n /**\n * The width of the resizable element.\n *\n * @default null\n */\n width?: ResizableRootElementProps['width'];\n /**\n * The height of the resizable element.\n *\n * @default null\n */\n height?: ResizableRootElementProps['height'];\n /**\n * The aspect ratio of the resizable element.\n *\n * @default null\n */\n aspectRatio?: ResizableRootElementProps['aspectRatio'];\n /** Emitted when a resize operation starts. */\n onResizeStart?: (event: ResizableRootEvents['resizeStart']) => void;\n /** Emitted when a resize operation ends. */\n onResizeEnd?: (event: ResizableRootEvents['resizeEnd']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-resizable-root` custom element.\n *\n * @public\n */\nexport const ResizableRoot: DefineSetupFnComponent<ResizableRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<ResizableRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerResizableRootElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { aspectRatio: p0, height: p1, width: p2, onResizeEnd: e0, onResizeStart: e1, ...restProps } = props;\n return [[p0, p1, p2, e0, e1], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, e0, e1] = splittedProps.value[0];\n\n Object.assign(element, { aspectRatio: p0, height: p1, width: p2 });\n\n handlers.length = 0;\n handlers.push(e0);\n handlers.push(e1);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['resizeEnd', 'resizeStart'].entries()) {\n element.addEventListener(\n eventName,\n (event: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-resizable-root', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['aspectRatio', 'height', 'width', 'onResizeEnd', 'onResizeStart'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerResizableHandleElement, type ResizableHandleProps as ResizableHandleElementProps } from '@prosekit/web/resizable';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link ResizableHandle} Vue component.\n *\n * @public\n */\nexport interface ResizableHandleProps {\n /**\n * The position of the handle.\n *\n * @default \"bottom-right\"\n */\n position?: ResizableHandleElementProps['position'];\n}\n\n/**\n * A Vue component that renders an `prosekit-resizable-handle` custom element.\n *\n * @public\n */\nexport const ResizableHandle: DefineSetupFnComponent<ResizableHandleProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<ResizableHandleProps & HTMLAttributes>(\n (props, { slots }) => {\n registerResizableHandleElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { position: p0, ...restProps } = props;\n return [[p0], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0] = splittedProps.value[0];\n\n Object.assign(element, { position: p0 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-resizable-handle', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['position'] },\n);\n"],"mappings":";;;;;;;;;;;AA0CA,MAAa,gBAA6F,iCACvG,OAAO,EAAE,YAAY;AACpB,+BAA8B;CAE9B,MAAM,aAAa,WAA+B,KAAK;CAEvD,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,aAAa,IAAI,QAAQ,IAAI,OAAO,IAAI,aAAa,IAAI,eAAe,IAAI,GAAG,cAAc;AACrG,SAAO,CAAC;GAAC;GAAI;GAAI;GAAI;GAAI;GAAG,EAAE,UAAU;GACxC;CAEF,MAAM,WAAsD,EAAE;AAE9D,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,CAAC,IAAI,IAAI,IAAI,IAAI,MAAM,cAAc,MAAM;AAEjD,SAAO,OAAO,SAAS;GAAE,aAAa;GAAI,QAAQ;GAAI,OAAO;GAAI,CAAC;AAElE,WAAS,SAAS;AAClB,WAAS,KAAK,GAAG;AACjB,WAAS,KAAK,GAAG;GACjB;AAEF,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,aAAa,cAAc,CAAC,SAAS,CACrE,SAAQ,iBACN,YACC,UAAiB;AAChB,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cAAa;EACX,MAAM,YAAY,cAAc,MAAM;AACtC,SAAO,EAAE,2BAA2B;GAAE,GAAG;GAAW,KAAK;GAAY,EAAE,MAAM,WAAW,CAAC;;GAG7F,EAAE,OAAO;CAAC;CAAe;CAAU;CAAS;CAAe;CAAgB,EAAE,CAC9E;;;;;;;;;;;ACjED,MAAa,kBAAiG,iCAC3G,OAAO,EAAE,YAAY;AACpB,iCAAgC;CAEhC,MAAM,aAAa,WAA+B,KAAK;CAEvD,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,UAAU,IAAI,GAAG,cAAc;AACvC,SAAO,CAAC,CAAC,GAAG,EAAE,UAAU;GACxB;AAEF,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,CAAC,MAAM,cAAc,MAAM;AAEjC,SAAO,OAAO,SAAS,EAAE,UAAU,IAAI,CAAC;GACxC;AAEF,cAAa;EACX,MAAM,YAAY,cAAc,MAAM;AACtC,SAAO,EAAE,6BAA6B;GAAE,GAAG;GAAW,KAAK;GAAY,EAAE,MAAM,WAAW,CAAC;;GAG/F,EAAE,OAAO,CAAC,WAAW,EAAE,CACxB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DefineSetupFnComponent, HTMLAttributes } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { TooltipPositionerProps as TooltipPositionerProps$1, TooltipRootEvents, TooltipRootProps as TooltipRootProps$1, TooltipTriggerProps as TooltipTriggerProps$1 } from "@prosekit/web/tooltip";
|
|
3
3
|
|
|
4
4
|
//#region src/components/tooltip/tooltip-popup.gen.d.ts
|
|
5
5
|
/**
|
|
@@ -219,5 +219,5 @@ interface TooltipTriggerProps {
|
|
|
219
219
|
*/
|
|
220
220
|
declare const TooltipTrigger: DefineSetupFnComponent<TooltipTriggerProps & HTMLAttributes>;
|
|
221
221
|
//#endregion
|
|
222
|
-
export {
|
|
222
|
+
export { TooltipPopup, type TooltipPopupProps, TooltipPositioner, type TooltipPositionerProps, TooltipRoot, type TooltipRootProps, TooltipTrigger, type TooltipTriggerProps };
|
|
223
223
|
//# sourceMappingURL=prosekit-vue-tooltip.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, defineComponent, h, shallowRef, watchEffect } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { registerTooltipPopupElement, registerTooltipPositionerElement, registerTooltipRootElement, registerTooltipTriggerElement } from "@prosekit/web/tooltip";
|
|
3
3
|
//#region src/components/tooltip/tooltip-popup.gen.ts
|
|
4
4
|
/**
|
|
5
5
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
@@ -204,6 +204,6 @@ const TooltipTrigger = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
204
204
|
"openDelay"
|
|
205
205
|
] });
|
|
206
206
|
//#endregion
|
|
207
|
-
export {
|
|
207
|
+
export { TooltipPopup, TooltipPositioner, TooltipRoot, TooltipTrigger };
|
|
208
208
|
|
|
209
209
|
//# sourceMappingURL=prosekit-vue-tooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-vue-tooltip.js","names":[],"sources":["../src/components/tooltip/tooltip-popup.gen.ts","../src/components/tooltip/tooltip-positioner.gen.ts","../src/components/tooltip/tooltip-root.gen.ts","../src/components/tooltip/tooltip-trigger.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTooltipPopupElement } from '@prosekit/web/tooltip';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/**\n * Props for the {@link TooltipPopup} Vue component.\n *\n * @public\n */\nexport interface TooltipPopupProps {}\n\n/**\n * A Vue component that renders an `prosekit-tooltip-popup` custom element.\n *\n * @public\n */\nexport const TooltipPopup: DefineSetupFnComponent<TooltipPopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<TooltipPopupProps & HTMLAttributes>(\n (props, { slots }) => {\n registerTooltipPopupElement();\n\n return () => {\n return h('prosekit-tooltip-popup', props, slots.default?.());\n };\n },\n { props: [] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTooltipPositionerElement, type TooltipPositionerProps as TooltipPositionerElementProps } from '@prosekit/web/tooltip';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link TooltipPositioner} Vue component.\n *\n * @public\n */\nexport interface TooltipPositionerProps {\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: TooltipPositionerElementProps['strategy'];\n /**\n * The initial placement of the floating element\n *\n * @default \"top\"\n */\n placement?: TooltipPositionerElementProps['placement'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: TooltipPositionerElementProps['autoUpdate'];\n /**\n * Whether to use the browser Popover API to place the floating element on\n * top of other page content.\n *\n * @default true\n */\n hoist?: TooltipPositionerElementProps['hoist'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: TooltipPositionerElementProps['offset'];\n /**\n * Whether to flip the `placement` in order to keep it in view when the\n * preferred placement(s) will overflow the clipping boundary. You can also\n * provide an array of placements to try sequentially if the preferred\n * `placement` does not fit.\n *\n * @default true\n */\n flip?: TooltipPositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: TooltipPositionerElementProps['shift'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: TooltipPositionerElementProps['overlap'];\n /**\n * Whether to constrain the floating element's width and height to not exceed\n * the viewport.\n *\n * @default false\n */\n fitViewport?: TooltipPositionerElementProps['fitViewport'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: TooltipPositionerElementProps['sameWidth'];\n /**\n * Whether to constrain the floating element's height so that it matches the\n * reference element.\n *\n * @default false\n */\n sameHeight?: TooltipPositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: TooltipPositionerElementProps['inline'];\n /**\n * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default false\n */\n hide?: TooltipPositionerElementProps['hide'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: TooltipPositionerElementProps['boundary'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: TooltipPositionerElementProps['rootBoundary'];\n /**\n * Describes the virtual padding around the boundary to check for overflow.\n * Please see https://floating-ui.com/docs/detectoverflow#padding for more information.\n *\n * @default 4\n */\n overflowPadding?: TooltipPositionerElementProps['overflowPadding'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: TooltipPositionerElementProps['elementContext'];\n /**\n * Whether to check the alternate elementContext's boundary. Please see\n * https://floating-ui.com/docs/detectoverflow#altboundary for more\n * information.\n *\n * @default false\n */\n altBoundary?: TooltipPositionerElementProps['altBoundary'];\n}\n\n/**\n * A Vue component that renders an `prosekit-tooltip-positioner` custom element.\n *\n * @public\n */\nexport const TooltipPositioner: DefineSetupFnComponent<TooltipPositionerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<TooltipPositionerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerTooltipPositionerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n return [[p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17] = splittedProps.value[0];\n\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-tooltip-positioner', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTooltipRootElement, type TooltipRootEvents, type TooltipRootProps as TooltipRootElementProps } from '@prosekit/web/tooltip';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link TooltipRoot} Vue component.\n *\n * @public\n */\nexport interface TooltipRootProps {\n /**\n * Whether the overlay is initially open.\n * @default false\n */\n defaultOpen?: TooltipRootElementProps['defaultOpen'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: TooltipRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: TooltipRootElementProps['disabled'];\n /** Emitted when the tooltip is opened or closed. */\n onOpenChange?: (event: TooltipRootEvents['openChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-tooltip-root` custom element.\n *\n * @public\n */\nexport const TooltipRoot: DefineSetupFnComponent<TooltipRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<TooltipRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerTooltipRootElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { defaultOpen: p0, disabled: p1, open: p2, onOpenChange: e0, ...restProps } = props;\n return [[p0, p1, p2, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, e0] = splittedProps.value[0];\n\n Object.assign(element, { defaultOpen: p0, disabled: p1, open: p2 });\n\n handlers.length = 0;\n handlers.push(e0);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-tooltip-root', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['defaultOpen', 'disabled', 'open', 'onOpenChange'] },\n);\n\nexport type { TooltipRootEvents };\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTooltipTriggerElement, type TooltipTriggerProps as TooltipTriggerElementProps } from '@prosekit/web/tooltip';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link TooltipTrigger} Vue component.\n *\n * @public\n */\nexport interface TooltipTriggerProps {\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: TooltipTriggerElementProps['disabled'];\n /**\n * The delay in milliseconds before opening the tooltip on hover.\n * @default 600\n */\n openDelay?: TooltipTriggerElementProps['openDelay'];\n /**\n * The delay in milliseconds before closing the tooltip when hover/focus ends.\n * @default 0\n */\n closeDelay?: TooltipTriggerElementProps['closeDelay'];\n}\n\n/**\n * A Vue component that renders an `prosekit-tooltip-trigger` custom element.\n *\n * @public\n */\nexport const TooltipTrigger: DefineSetupFnComponent<TooltipTriggerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<TooltipTriggerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerTooltipTriggerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { closeDelay: p0, disabled: p1, openDelay: p2, ...restProps } = props;\n return [[p0, p1, p2], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2] = splittedProps.value[0];\n\n Object.assign(element, { closeDelay: p0, disabled: p1, openDelay: p2 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-tooltip-trigger', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['closeDelay', 'disabled', 'openDelay'] },\n);\n"],"mappings":";;;;;;;;;;;AAmBA,MAAa,eAA2F,iCACrG,OAAO,EAAE,YAAY;AACpB,8BAA6B;AAE7B,cAAa;AACX,SAAO,EAAE,0BAA0B,OAAO,MAAM,WAAW,CAAC;;GAGhE,EAAE,OAAO,EAAE,EAAE,CACd;;;;;;;;;;;ACuHD,MAAa,oBAAqG,iCAC/G,OAAO,EAAE,YAAY;AACpB,mCAAkC;CAElC,MAAM,aAAa,WAA+B,KAAK;CAEvD,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,aAAa,IAAI,YAAY,IAAI,UAAU,IAAI,gBAAgB,IAAI,aAAa,IAAI,MAAM,IAAI,MAAM,IAAI,OAAO,IAAI,QAAQ,IAAI,QAAQ,IAAI,iBAAiB,KAAK,SAAS,KAAK,WAAW,KAAK,cAAc,KAAK,YAAY,KAAK,WAAW,KAAK,OAAO,KAAK,UAAU,KAAK,GAAG,cAAc;AACvS,SAAO,CAAC;GAAC;GAAI;GAAI;GAAI;GAAI;GAAI;GAAI;GAAI;GAAI;GAAI;GAAI;GAAK;GAAK;GAAK;GAAK;GAAK;GAAK;GAAK;GAAI,EAAE,UAAU;GACpG;AAEF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src/components/tooltip/tooltip-positioner.gen.ts","../src/components/tooltip/tooltip-root.gen.ts","../src/components/tooltip/tooltip-trigger.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTooltipPopupElement } from '@prosekit/web/tooltip';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/**\n * Props for the {@link TooltipPopup} Vue component.\n *\n * @public\n */\nexport interface TooltipPopupProps {}\n\n/**\n * A Vue component that renders an `prosekit-tooltip-popup` custom element.\n *\n * @public\n */\nexport const TooltipPopup: DefineSetupFnComponent<TooltipPopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<TooltipPopupProps & HTMLAttributes>(\n (props, { slots }) => {\n registerTooltipPopupElement();\n\n return () => {\n return h('prosekit-tooltip-popup', props, slots.default?.());\n };\n },\n { props: [] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTooltipPositionerElement, type TooltipPositionerProps as TooltipPositionerElementProps } from '@prosekit/web/tooltip';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link TooltipPositioner} Vue component.\n *\n * @public\n */\nexport interface TooltipPositionerProps {\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: TooltipPositionerElementProps['strategy'];\n /**\n * The initial placement of the floating element\n *\n * @default \"top\"\n */\n placement?: TooltipPositionerElementProps['placement'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: TooltipPositionerElementProps['autoUpdate'];\n /**\n * Whether to use the browser Popover API to place the floating element on\n * top of other page content.\n *\n * @default true\n */\n hoist?: TooltipPositionerElementProps['hoist'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: TooltipPositionerElementProps['offset'];\n /**\n * Whether to flip the `placement` in order to keep it in view when the\n * preferred placement(s) will overflow the clipping boundary. You can also\n * provide an array of placements to try sequentially if the preferred\n * `placement` does not fit.\n *\n * @default true\n */\n flip?: TooltipPositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: TooltipPositionerElementProps['shift'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: TooltipPositionerElementProps['overlap'];\n /**\n * Whether to constrain the floating element's width and height to not exceed\n * the viewport.\n *\n * @default false\n */\n fitViewport?: TooltipPositionerElementProps['fitViewport'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: TooltipPositionerElementProps['sameWidth'];\n /**\n * Whether to constrain the floating element's height so that it matches the\n * reference element.\n *\n * @default false\n */\n sameHeight?: TooltipPositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: TooltipPositionerElementProps['inline'];\n /**\n * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default false\n */\n hide?: TooltipPositionerElementProps['hide'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: TooltipPositionerElementProps['boundary'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: TooltipPositionerElementProps['rootBoundary'];\n /**\n * Describes the virtual padding around the boundary to check for overflow.\n * Please see https://floating-ui.com/docs/detectoverflow#padding for more information.\n *\n * @default 4\n */\n overflowPadding?: TooltipPositionerElementProps['overflowPadding'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: TooltipPositionerElementProps['elementContext'];\n /**\n * Whether to check the alternate elementContext's boundary. Please see\n * https://floating-ui.com/docs/detectoverflow#altboundary for more\n * information.\n *\n * @default false\n */\n altBoundary?: TooltipPositionerElementProps['altBoundary'];\n}\n\n/**\n * A Vue component that renders an `prosekit-tooltip-positioner` custom element.\n *\n * @public\n */\nexport const TooltipPositioner: DefineSetupFnComponent<TooltipPositionerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<TooltipPositionerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerTooltipPositionerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n return [[p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17] = splittedProps.value[0];\n\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-tooltip-positioner', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTooltipRootElement, type TooltipRootEvents, type TooltipRootProps as TooltipRootElementProps } from '@prosekit/web/tooltip';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link TooltipRoot} Vue component.\n *\n * @public\n */\nexport interface TooltipRootProps {\n /**\n * Whether the overlay is initially open.\n * @default false\n */\n defaultOpen?: TooltipRootElementProps['defaultOpen'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: TooltipRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: TooltipRootElementProps['disabled'];\n /** Emitted when the tooltip is opened or closed. */\n onOpenChange?: (event: TooltipRootEvents['openChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-tooltip-root` custom element.\n *\n * @public\n */\nexport const TooltipRoot: DefineSetupFnComponent<TooltipRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<TooltipRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerTooltipRootElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { defaultOpen: p0, disabled: p1, open: p2, onOpenChange: e0, ...restProps } = props;\n return [[p0, p1, p2, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, e0] = splittedProps.value[0];\n\n Object.assign(element, { defaultOpen: p0, disabled: p1, open: p2 });\n\n handlers.length = 0;\n handlers.push(e0);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\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: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-tooltip-root', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['defaultOpen', 'disabled', 'open', 'onOpenChange'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerTooltipTriggerElement, type TooltipTriggerProps as TooltipTriggerElementProps } from '@prosekit/web/tooltip';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link TooltipTrigger} Vue component.\n *\n * @public\n */\nexport interface TooltipTriggerProps {\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: TooltipTriggerElementProps['disabled'];\n /**\n * The delay in milliseconds before opening the tooltip on hover.\n * @default 600\n */\n openDelay?: TooltipTriggerElementProps['openDelay'];\n /**\n * The delay in milliseconds before closing the tooltip when hover/focus ends.\n * @default 0\n */\n closeDelay?: TooltipTriggerElementProps['closeDelay'];\n}\n\n/**\n * A Vue component that renders an `prosekit-tooltip-trigger` custom element.\n *\n * @public\n */\nexport const TooltipTrigger: DefineSetupFnComponent<TooltipTriggerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<TooltipTriggerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerTooltipTriggerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { closeDelay: p0, disabled: p1, openDelay: p2, ...restProps } = props;\n return [[p0, p1, p2], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2] = splittedProps.value[0];\n\n Object.assign(element, { closeDelay: p0, disabled: p1, openDelay: p2 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-tooltip-trigger', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['closeDelay', 'disabled', 'openDelay'] },\n);\n"],"mappings":";;;;;;;;;;;AAmBA,MAAa,eAA2F,iCACrG,OAAO,EAAE,YAAY;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;AACpB,gCAA+B;CAE/B,MAAM,aAAa,WAA+B,KAAK;CAEvD,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,YAAY,IAAI,UAAU,IAAI,WAAW,IAAI,GAAG,cAAc;AACtE,SAAO,CAAC;GAAC;GAAI;GAAI;GAAG,EAAE,UAAU;GAChC;AAEF,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,CAAC,IAAI,IAAI,MAAM,cAAc,MAAM;AAEzC,SAAO,OAAO,SAAS;GAAE,YAAY;GAAI,UAAU;GAAI,WAAW;GAAI,CAAC;GACvE;AAEF,cAAa;EACX,MAAM,YAAY,cAAc,MAAM;AACtC,SAAO,EAAE,4BAA4B;GAAE,GAAG;GAAW,KAAK;GAAY,EAAE,MAAM,WAAW,CAAC;;GAG9F,EAAE,OAAO;CAAC;CAAc;CAAY;CAAY,EAAE,CACnD"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosekit/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.7.0-beta.
|
|
4
|
+
"version": "0.7.0-beta.4",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Vue components and utilities for ProseKit",
|
|
7
7
|
"author": {
|
|
@@ -74,9 +74,9 @@
|
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@prosemirror-adapter/core": "^0.5.3",
|
|
76
76
|
"@prosemirror-adapter/vue": "^0.5.3",
|
|
77
|
+
"@prosekit/core": "^0.12.0-beta.0",
|
|
77
78
|
"@prosekit/pm": "^0.1.15",
|
|
78
|
-
"@prosekit/web": "^0.8.0-beta.
|
|
79
|
-
"@prosekit/core": "^0.12.0-beta.0"
|
|
79
|
+
"@prosekit/web": "^0.8.0-beta.3"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
82
|
"vue": ">= 3.0.0"
|
|
@@ -4,12 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
export { AutocompleteEmpty, type AutocompleteEmptyProps } from './autocomplete-empty.gen.ts';
|
|
6
6
|
|
|
7
|
-
export { AutocompleteItem, type AutocompleteItemProps
|
|
7
|
+
export { AutocompleteItem, type AutocompleteItemProps } from './autocomplete-item.gen.ts';
|
|
8
8
|
|
|
9
|
-
export { AutocompletePopup, type AutocompletePopupProps
|
|
9
|
+
export { AutocompletePopup, type AutocompletePopupProps } from './autocomplete-popup.gen.ts';
|
|
10
10
|
|
|
11
11
|
export { AutocompletePositioner, type AutocompletePositionerProps } from './autocomplete-positioner.gen.ts';
|
|
12
12
|
|
|
13
|
-
export { AutocompleteRoot, type AutocompleteRootProps
|
|
14
|
-
|
|
15
|
-
export { OpenChangeEvent, QueryChangeEvent, SelectEvent, ValueChangeEvent, ValuesChangeEvent } from '@prosekit/web/autocomplete';
|
|
13
|
+
export { AutocompleteRoot, type AutocompleteRootProps } from './autocomplete-root.gen.ts';
|
|
@@ -10,6 +10,4 @@ export { BlockHandlePopup, type BlockHandlePopupProps } from './block-handle-pop
|
|
|
10
10
|
|
|
11
11
|
export { BlockHandlePositioner, type BlockHandlePositionerProps } from './block-handle-positioner.gen.ts';
|
|
12
12
|
|
|
13
|
-
export { BlockHandleRoot, type BlockHandleRootProps
|
|
14
|
-
|
|
15
|
-
export { BlockHandleStateChangeEvent } from '@prosekit/web/block-handle';
|
|
13
|
+
export { BlockHandleRoot, type BlockHandleRootProps } from './block-handle-root.gen.ts';
|
|
@@ -6,6 +6,4 @@ export { InlinePopoverPopup, type InlinePopoverPopupProps } from './inline-popov
|
|
|
6
6
|
|
|
7
7
|
export { InlinePopoverPositioner, type InlinePopoverPositionerProps } from './inline-popover-positioner.gen.ts';
|
|
8
8
|
|
|
9
|
-
export { InlinePopoverRoot, type InlinePopoverRootProps
|
|
10
|
-
|
|
11
|
-
export { OpenChangeEvent } from '@prosekit/web/inline-popover';
|
|
9
|
+
export { InlinePopoverRoot, type InlinePopoverRootProps } from './inline-popover-root.gen.ts';
|
|
@@ -30,6 +30,13 @@ export interface InlinePopoverPositionerProps {
|
|
|
30
30
|
* @default true
|
|
31
31
|
*/
|
|
32
32
|
hide?: InlinePopoverPositionerElementProps['hide'];
|
|
33
|
+
/**
|
|
34
|
+
* Whether to use the browser [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)
|
|
35
|
+
* to place the floating element on top of other page content.
|
|
36
|
+
*
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
hoist?: InlinePopoverPositionerElementProps['hoist'];
|
|
33
40
|
/**
|
|
34
41
|
* Whether the floating element can overlap the reference element to keep it
|
|
35
42
|
* in view.
|
|
@@ -64,13 +71,6 @@ export interface InlinePopoverPositionerProps {
|
|
|
64
71
|
* @default true
|
|
65
72
|
*/
|
|
66
73
|
autoUpdate?: InlinePopoverPositionerElementProps['autoUpdate'];
|
|
67
|
-
/**
|
|
68
|
-
* Whether to use the browser Popover API to place the floating element on
|
|
69
|
-
* top of other page content.
|
|
70
|
-
*
|
|
71
|
-
* @default true
|
|
72
|
-
*/
|
|
73
|
-
hoist?: InlinePopoverPositionerElementProps['hoist'];
|
|
74
74
|
/**
|
|
75
75
|
* Whether to flip the `placement` in order to keep it in view when the
|
|
76
76
|
* preferred placement(s) will overflow the clipping boundary. You can also
|
|
@@ -44,7 +44,7 @@ export interface InlinePopoverRootProps {
|
|
|
44
44
|
* @default false
|
|
45
45
|
*/
|
|
46
46
|
disabled?: InlinePopoverRootElementProps['disabled'];
|
|
47
|
-
/** */
|
|
47
|
+
/** Emitted when the open state of the popover changes. */
|
|
48
48
|
onOpenChange?: (event: InlinePopoverRootEvents['openChange']) => void;
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -104,5 +104,3 @@ export const InlinePopoverRoot: DefineSetupFnComponent<InlinePopoverRootProps &
|
|
|
104
104
|
},
|
|
105
105
|
{ props: ['defaultOpen', 'disabled', 'dismissOnEscape', 'editor', 'open', 'onOpenChange'] },
|
|
106
106
|
);
|
|
107
|
-
|
|
108
|
-
export type { InlinePopoverRootEvents };
|
|
@@ -2,18 +2,16 @@
|
|
|
2
2
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
export { MenuItem, type MenuItemProps
|
|
5
|
+
export { MenuItem, type MenuItemProps } from './menu-item.gen.ts';
|
|
6
6
|
|
|
7
7
|
export { MenuPopup, type MenuPopupProps } from './menu-popup.gen.ts';
|
|
8
8
|
|
|
9
9
|
export { MenuPositioner, type MenuPositionerProps } from './menu-positioner.gen.ts';
|
|
10
10
|
|
|
11
|
-
export { MenuRoot, type MenuRootProps
|
|
11
|
+
export { MenuRoot, type MenuRootProps } from './menu-root.gen.ts';
|
|
12
12
|
|
|
13
13
|
export { MenuSubmenuRoot, type MenuSubmenuRootProps } from './menu-submenu-root.gen.ts';
|
|
14
14
|
|
|
15
15
|
export { MenuSubmenuTrigger, type MenuSubmenuTriggerProps } from './menu-submenu-trigger.gen.ts';
|
|
16
16
|
|
|
17
|
-
export { MenuTrigger, type MenuTriggerProps
|
|
18
|
-
|
|
19
|
-
export { OpenChangeEvent, SelectEvent } from '@prosekit/web/menu';
|
|
17
|
+
export { MenuTrigger, type MenuTriggerProps } from './menu-trigger.gen.ts';
|
|
@@ -6,8 +6,6 @@ export { PopoverPopup, type PopoverPopupProps } from './popover-popup.gen.ts';
|
|
|
6
6
|
|
|
7
7
|
export { PopoverPositioner, type PopoverPositionerProps } from './popover-positioner.gen.ts';
|
|
8
8
|
|
|
9
|
-
export { PopoverRoot, type PopoverRootProps
|
|
9
|
+
export { PopoverRoot, type PopoverRootProps } from './popover-root.gen.ts';
|
|
10
10
|
|
|
11
|
-
export { PopoverTrigger, type PopoverTriggerProps
|
|
12
|
-
|
|
13
|
-
export { OpenChangeEvent } from '@prosekit/web/popover';
|
|
11
|
+
export { PopoverTrigger, type PopoverTriggerProps } from './popover-trigger.gen.ts';
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
export { ResizableRoot, type ResizableRootProps
|
|
5
|
+
export { ResizableRoot, type ResizableRootProps } from './resizable-root.gen.ts';
|
|
6
6
|
|
|
7
7
|
export { ResizableHandle, type ResizableHandleProps } from './resizable-handle.gen.ts';
|
|
8
|
-
|
|
9
|
-
export { ResizeEndEvent, ResizeStartEvent } from '@prosekit/web/resizable';
|
|
@@ -6,8 +6,6 @@ export { TooltipPopup, type TooltipPopupProps } from './tooltip-popup.gen.ts';
|
|
|
6
6
|
|
|
7
7
|
export { TooltipPositioner, type TooltipPositionerProps } from './tooltip-positioner.gen.ts';
|
|
8
8
|
|
|
9
|
-
export { TooltipRoot, type TooltipRootProps
|
|
9
|
+
export { TooltipRoot, type TooltipRootProps } from './tooltip-root.gen.ts';
|
|
10
10
|
|
|
11
11
|
export { TooltipTrigger, type TooltipTriggerProps } from './tooltip-trigger.gen.ts';
|
|
12
|
-
|
|
13
|
-
export { OpenChangeEvent } from '@prosekit/web/tooltip';
|