@prosekit/vue 0.8.0-beta.19 → 0.8.0-beta.20
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/autocomplete.d.ts +8 -0
- package/dist/autocomplete.d.ts.map +1 -1
- package/dist/autocomplete.js +7 -4
- package/dist/autocomplete.js.map +1 -1
- package/dist/block-handle.d.ts.map +1 -1
- package/dist/drop-indicator.d.ts.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/inline-popover.d.ts.map +1 -1
- package/dist/menu.d.ts.map +1 -1
- package/dist/popover.d.ts.map +1 -1
- package/dist/resizable.d.ts.map +1 -1
- package/dist/table-handle.d.ts.map +1 -1
- package/dist/tooltip.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/components/autocomplete/autocomplete-root.gen.ts +13 -5
- package/src/extensions/vue-node-view.spec.ts +4 -4
package/dist/autocomplete.d.ts
CHANGED
|
@@ -188,6 +188,14 @@ interface AutocompleteRootProps {
|
|
|
188
188
|
* @default null
|
|
189
189
|
*/
|
|
190
190
|
anchor?: AutocompleteRootProps$1['anchor'];
|
|
191
|
+
/**
|
|
192
|
+
* Whether the autocomplete match should follow the text cursor when it
|
|
193
|
+
* moves without editing, growing and shrinking the query as the cursor
|
|
194
|
+
* moves over existing text (for example with arrow keys).
|
|
195
|
+
*
|
|
196
|
+
* @default false
|
|
197
|
+
*/
|
|
198
|
+
followCursor?: AutocompleteRootProps$1['followCursor'];
|
|
191
199
|
/** Fired when the open state changes. */
|
|
192
200
|
onOpenChange?: (event: AutocompleteRootEvents['openChange']) => void;
|
|
193
201
|
/** Fired when the query changes. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.d.ts","names":[],"sources":["../src/components/autocomplete/autocomplete-empty.gen.ts","../src/components/autocomplete/autocomplete-item.gen.ts","../src/components/autocomplete/autocomplete-popup.gen.ts","../src/components/autocomplete/autocomplete-positioner.gen.ts","../src/components/autocomplete/autocomplete-root.gen.ts"],"mappings":";;;UAMiB
|
|
1
|
+
{"version":3,"file":"autocomplete.d.ts","names":[],"sources":["../src/components/autocomplete/autocomplete-empty.gen.ts","../src/components/autocomplete/autocomplete-item.gen.ts","../src/components/autocomplete/autocomplete-popup.gen.ts","../src/components/autocomplete/autocomplete-positioner.gen.ts","../src/components/autocomplete/autocomplete-root.gen.ts"],"mappings":";;;UAMiB;;cAGJ,mBAAmB,uBAAuB,yBAAyB;;UCH/D;;;;;;;;EAQf,QAAQ;;;;;;EAMR,WAAW;;EAEX,YAAY,OAAO;;;cAIR,kBAAkB,uBAAuB,wBAAwB;;UCpB7D;;;;;EAKf,iBAAiB,OAAO;;;;;EAKxB,kBAAkB,OAAO;;;cAId,mBAAmB,uBAAuB,yBAAyB;;UCd/D;;;;;;EAMf,YAAY;;;;;;EAMZ,SAAS;;;;;;;EAOT,OAAO;;EAEP,SAAS;;EAET,QAAQ;;EAER,cAAc;;EAEd,WAAW;;EAEX,kBAAkB;;;;;;EAMlB,WAAW;;;;;;;;EAQX,aAAa;;;;;;;;;EASb,OAAO;;;;;;EAMP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,eAAe;;;;;;;;EAQf,iBAAiB;;;;;;;;EAQjB,cAAc;;;cAIH,wBAAwB,uBAAuB,8BAA8B;;UCxGzE;;;;;;;EAOf,SAAS;;;;;;EAMT,QAAQ;;;;;;;EAOR,SAAS;;;;;;;;;;EAUT,eAAe;;;;;;;;;EASf,SAAS;;;;;;;;EAQT,eAAe;;EAEf,gBAAgB,OAAO;;EAEvB,iBAAiB,OAAO;;;;;EAKxB,iBAAiB,OAAO;;;;;EAKxB,kBAAkB,OAAO;;;cAId,kBAAkB,uBAAuB,wBAAwB"}
|
package/dist/autocomplete.js
CHANGED
|
@@ -171,13 +171,14 @@ const AutocompleteRoot = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
171
171
|
const elementRef = shallowRef(null);
|
|
172
172
|
const p1Fallback = useEditorContext();
|
|
173
173
|
const splittedProps = computed(() => {
|
|
174
|
-
const { anchor: p0, editor: p1, filter: p2,
|
|
174
|
+
const { anchor: p0, editor: p1, filter: p2, followCursor: p3, queryBuilder: p4, regex: p5, onOpenChange: e0, onQueryChange: e1, onValueChange: e2, onValuesChange: e3, ...restProps } = props;
|
|
175
175
|
return [[
|
|
176
176
|
p0,
|
|
177
177
|
p1,
|
|
178
178
|
p2,
|
|
179
179
|
p3,
|
|
180
180
|
p4,
|
|
181
|
+
p5,
|
|
181
182
|
e0,
|
|
182
183
|
e1,
|
|
183
184
|
e2,
|
|
@@ -188,13 +189,14 @@ const AutocompleteRoot = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
188
189
|
watchEffect(() => {
|
|
189
190
|
const element = elementRef.value;
|
|
190
191
|
if (!element) return;
|
|
191
|
-
const [p0, p1, p2, p3, p4, e0, e1, e2, e3] = splittedProps.value[0];
|
|
192
|
+
const [p0, p1, p2, p3, p4, p5, e0, e1, e2, e3] = splittedProps.value[0];
|
|
192
193
|
Object.assign(element, {
|
|
193
194
|
anchor: p0,
|
|
194
195
|
editor: p1 ?? p1Fallback,
|
|
195
196
|
filter: p2,
|
|
196
|
-
|
|
197
|
-
|
|
197
|
+
followCursor: p3,
|
|
198
|
+
queryBuilder: p4,
|
|
199
|
+
regex: p5
|
|
198
200
|
});
|
|
199
201
|
handlers.length = 0;
|
|
200
202
|
handlers.push(e0);
|
|
@@ -227,6 +229,7 @@ const AutocompleteRoot = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
227
229
|
"anchor",
|
|
228
230
|
"editor",
|
|
229
231
|
"filter",
|
|
232
|
+
"followCursor",
|
|
230
233
|
"queryBuilder",
|
|
231
234
|
"regex",
|
|
232
235
|
"onOpenChange",
|
package/dist/autocomplete.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.js","names":[],"sources":["../src/components/autocomplete/autocomplete-empty.gen.ts","../src/components/autocomplete/autocomplete-item.gen.ts","../src/components/autocomplete/autocomplete-popup.gen.ts","../src/components/autocomplete/autocomplete-positioner.gen.ts","../src/components/autocomplete/autocomplete-root.gen.ts"],"sourcesContent":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerAutocompleteEmptyElement } from '@prosekit/web/autocomplete';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/** Props for the {@link AutocompleteEmpty} Vue component. */\nexport interface AutocompleteEmptyProps {}\n\n/** A Vue component that renders an `prosekit-autocomplete-empty` custom element. */\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","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link AutocompleteItem} Vue component. */\nexport interface AutocompleteItemProps {\n /**\n * The value of the item, which will be matched against the query.\n *\n * If not provided, the value is the item's text content.\n *\n * @default \"\"\n */\n value?: AutocompleteItemElementProps['value'];\n /**\n * Whether this option is disabled.\n *\n * @default false\n */\n disabled?: AutocompleteItemElementProps['disabled'];\n /** Emitted when the the item is selected. */\n onSelect?: (event: AutocompleteItemEvents['select']) => void;\n}\n\n/** A Vue component that renders an `prosekit-autocomplete-item` custom element. */\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","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerAutocompletePopupElement, type AutocompletePopupEvents } from '@prosekit/web/autocomplete';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/** Props for the {@link AutocompletePopup} Vue component. */\nexport interface AutocompletePopupProps {\n /**\n * Emitted when the selected value changes. Only available when multiple is\n * false.\n */\n onValueChange?: (event: AutocompletePopupEvents['valueChange']) => void;\n /**\n * Emitted when the selected values change. Only available when multiple is\n * true.\n */\n onValuesChange?: (event: AutocompletePopupEvents['valuesChange']) => void;\n}\n\n/** A Vue component that renders an `prosekit-autocomplete-popup` custom element. */\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","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link AutocompletePositioner} Vue component. */\nexport interface AutocompletePositionerProps {\n /**\n * The placement of the popover, relative to the text cursor.\n *\n * @default \"bottom-start\"\n */\n placement?: AutocompletePositionerElementProps['placement'];\n /**\n * The distance between the popover and the text selection.\n *\n * @default { mainAxis: 8, crossAxis: -4 }\n */\n offset?: AutocompletePositionerElementProps['offset'];\n /**\n * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default true\n */\n hide?: AutocompletePositionerElementProps['hide'];\n /** @default true */\n inline?: AutocompletePositionerElementProps['inline'];\n /** @default true */\n hoist?: AutocompletePositionerElementProps['hoist'];\n /** @default true */\n fitViewport?: AutocompletePositionerElementProps['fitViewport'];\n /** @default \"The body element\" */\n boundary?: AutocompletePositionerElementProps['boundary'];\n /** @default 8 */\n overflowPadding?: AutocompletePositionerElementProps['overflowPadding'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: AutocompletePositionerElementProps['strategy'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: AutocompletePositionerElementProps['autoUpdate'];\n /**\n * Whether to flip the `placement` in order to keep it in view when the\n * preferred placement(s) will overflow the clipping boundary. You can also\n * provide an array of placements to try sequentially if the preferred\n * `placement` does not fit.\n *\n * @default true\n */\n flip?: AutocompletePositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: AutocompletePositionerElementProps['shift'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: AutocompletePositionerElementProps['overlap'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: AutocompletePositionerElementProps['sameWidth'];\n /**\n * Whether to constrain the floating element's height so that it matches the\n * reference element.\n *\n * @default false\n */\n sameHeight?: AutocompletePositionerElementProps['sameHeight'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: AutocompletePositionerElementProps['rootBoundary'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: AutocompletePositionerElementProps['elementContext'];\n /**\n * Whether to check the alternate elementContext's boundary. Please see\n * https://floating-ui.com/docs/detectoverflow#altboundary for more\n * information.\n *\n * @default false\n */\n altBoundary?: AutocompletePositionerElementProps['altBoundary'];\n}\n\n/** A Vue component that renders an `prosekit-autocomplete-positioner` custom element. */\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","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link AutocompleteRoot} Vue component. */\nexport interface AutocompleteRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: AutocompleteRootElementProps['editor'];\n /**\n * The regular expression to match the query text to autocomplete.\n *\n * @default null\n */\n regex?: AutocompleteRootElementProps['regex'];\n /**\n * The filter function to determine if an item should be shown in the\n * listbox.\n *\n * @default defaultItemFilter\n */\n filter?: AutocompleteRootElementProps['filter'];\n /**\n * Builds the query string from the regex match found before the cursor. The\n * query is exposed via the `queryChange` event and used by the built-in item\n * filter. The default builder lowercases the match and strips punctuation.\n * Provide a custom builder to control the query, for example to preserve the\n * casing and punctuation the user typed.\n *\n * @default defaultQueryBuilder\n */\n queryBuilder?: AutocompleteRootElementProps['queryBuilder'];\n /**\n * The reference to position the popup against. This can be a DOM element, a\n * Floating UI virtual element, or a function that returns either of them.\n * By default, the popup will be positioned against the text content that\n * triggers the autocomplete.\n *\n * @default null\n */\n anchor?: AutocompleteRootElementProps['anchor'];\n /** Fired when the open state changes. */\n onOpenChange?: (event: AutocompleteRootEvents['openChange']) => void;\n /** Fired when the query changes. */\n onQueryChange?: (event: AutocompleteRootEvents['queryChange']) => void;\n /**\n * Emitted when the selected value changes. Only available when multiple is\n * false.\n */\n onValueChange?: (event: AutocompleteRootEvents['valueChange']) => void;\n /**\n * Emitted when the selected values change. Only available when multiple is\n * true.\n */\n onValuesChange?: (event: AutocompleteRootEvents['valuesChange']) => void;\n}\n\n/** A Vue component that renders an `prosekit-autocomplete-root` custom element. */\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 p1Fallback = useEditorContext();\n\n const splittedProps = computed(() => {\n const { anchor: p0, editor: p1, filter: p2, queryBuilder: p3, regex: p4, onOpenChange: e0, onQueryChange: e1, onValueChange: e2, onValuesChange: e3, ...restProps } = props;\n return [[p0, p1, p2, p3, p4, 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, p3, p4, e0, e1, e2, e3] = splittedProps.value[0];\n\n Object.assign(element, { anchor: p0, editor: p1 ?? p1Fallback, filter: p2, queryBuilder: p3, regex: p4 });\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: ['anchor', 'editor', 'filter', 'queryBuilder', 'regex', 'onOpenChange', 'onQueryChange', 'onValueChange', 'onValuesChange'] },\n);\n"],"mappings":";;;;AASA,MAAa,oBAAqG,iCAC/G,OAAO,EAAE,YAAY;CACpB,iCAAiC;CAEjC,aAAa;EACX,OAAO,EAAE,+BAA+B,OAAO,MAAM,UAAU,CAAC;CAClE;AACF,GACA,EAAE,OAAO,CAAC,EAAE,CACd;;ACQA,MAAa,mBAAmG,iCAC7G,OAAO,EAAE,YAAY;CACpB,gCAAgC;CAEhC,MAAM,aAAa,WAA+B,IAAI;CAEtD,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,UAAU,IAAI,OAAO,IAAI,UAAU,IAAI,GAAG,cAAc;EAChE,OAAO,CAAC;GAAC;GAAI;GAAI;EAAE,GAAG,SAAS;CACjC,CAAC;CAED,MAAM,WAAsD,CAAC;CAE7D,kBAAkB;EAChB,MAAM,UAAU,WAAW;EAC3B,IAAI,CAAC,SAAS;EAEd,MAAM,CAAC,IAAI,IAAI,MAAM,cAA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EAEd,MAAM,KAAK,IAAI,gBAAgB;EAC/B,KAAK,MAAM,CAAC,OAAO,cAAc;GAAC;GAAc;GAAe;GAAe;EAAc,CAAC,CAAC,QAAQ,GACpG,QAAQ,iBACN,YACC,UAAiB;GAChB,SAAS,MAAM,GAAG,KAAK;EACzB,GACA,EAAE,QAAQ,GAAG,OAAO,CACtB;EAEF,aAAa,GAAG,MAAM;CACxB,CAAC;CAED,aAAa;EACX,MAAM,YAAY,cAAc,MAAM;EACtC,OAAO,EAAE,8BAA8B;GAAE,GAAG;GAAW,KAAK;EAAW,GAAG,MAAM,UAAU,CAAC;CAC7F;AACF,GACA,EAAE,OAAO;CAAC;CAAU;CAAU;CAAU;CAAgB;CAAS;CAAgB;CAAiB;CAAiB;AAAgB,EAAE,CACvI"}
|
|
1
|
+
{"version":3,"file":"autocomplete.js","names":[],"sources":["../src/components/autocomplete/autocomplete-empty.gen.ts","../src/components/autocomplete/autocomplete-item.gen.ts","../src/components/autocomplete/autocomplete-popup.gen.ts","../src/components/autocomplete/autocomplete-positioner.gen.ts","../src/components/autocomplete/autocomplete-root.gen.ts"],"sourcesContent":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerAutocompleteEmptyElement } from '@prosekit/web/autocomplete';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/** Props for the {@link AutocompleteEmpty} Vue component. */\nexport interface AutocompleteEmptyProps {}\n\n/** A Vue component that renders an `prosekit-autocomplete-empty` custom element. */\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","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link AutocompleteItem} Vue component. */\nexport interface AutocompleteItemProps {\n /**\n * The value of the item, which will be matched against the query.\n *\n * If not provided, the value is the item's text content.\n *\n * @default \"\"\n */\n value?: AutocompleteItemElementProps['value'];\n /**\n * Whether this option is disabled.\n *\n * @default false\n */\n disabled?: AutocompleteItemElementProps['disabled'];\n /** Emitted when the the item is selected. */\n onSelect?: (event: AutocompleteItemEvents['select']) => void;\n}\n\n/** A Vue component that renders an `prosekit-autocomplete-item` custom element. */\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","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerAutocompletePopupElement, type AutocompletePopupEvents } from '@prosekit/web/autocomplete';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/** Props for the {@link AutocompletePopup} Vue component. */\nexport interface AutocompletePopupProps {\n /**\n * Emitted when the selected value changes. Only available when multiple is\n * false.\n */\n onValueChange?: (event: AutocompletePopupEvents['valueChange']) => void;\n /**\n * Emitted when the selected values change. Only available when multiple is\n * true.\n */\n onValuesChange?: (event: AutocompletePopupEvents['valuesChange']) => void;\n}\n\n/** A Vue component that renders an `prosekit-autocomplete-popup` custom element. */\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","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link AutocompletePositioner} Vue component. */\nexport interface AutocompletePositionerProps {\n /**\n * The placement of the popover, relative to the text cursor.\n *\n * @default \"bottom-start\"\n */\n placement?: AutocompletePositionerElementProps['placement'];\n /**\n * The distance between the popover and the text selection.\n *\n * @default { mainAxis: 8, crossAxis: -4 }\n */\n offset?: AutocompletePositionerElementProps['offset'];\n /**\n * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default true\n */\n hide?: AutocompletePositionerElementProps['hide'];\n /** @default true */\n inline?: AutocompletePositionerElementProps['inline'];\n /** @default true */\n hoist?: AutocompletePositionerElementProps['hoist'];\n /** @default true */\n fitViewport?: AutocompletePositionerElementProps['fitViewport'];\n /** @default \"The body element\" */\n boundary?: AutocompletePositionerElementProps['boundary'];\n /** @default 8 */\n overflowPadding?: AutocompletePositionerElementProps['overflowPadding'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: AutocompletePositionerElementProps['strategy'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: AutocompletePositionerElementProps['autoUpdate'];\n /**\n * Whether to flip the `placement` in order to keep it in view when the\n * preferred placement(s) will overflow the clipping boundary. You can also\n * provide an array of placements to try sequentially if the preferred\n * `placement` does not fit.\n *\n * @default true\n */\n flip?: AutocompletePositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: AutocompletePositionerElementProps['shift'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: AutocompletePositionerElementProps['overlap'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: AutocompletePositionerElementProps['sameWidth'];\n /**\n * Whether to constrain the floating element's height so that it matches the\n * reference element.\n *\n * @default false\n */\n sameHeight?: AutocompletePositionerElementProps['sameHeight'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: AutocompletePositionerElementProps['rootBoundary'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: AutocompletePositionerElementProps['elementContext'];\n /**\n * Whether to check the alternate elementContext's boundary. Please see\n * https://floating-ui.com/docs/detectoverflow#altboundary for more\n * information.\n *\n * @default false\n */\n altBoundary?: AutocompletePositionerElementProps['altBoundary'];\n}\n\n/** A Vue component that renders an `prosekit-autocomplete-positioner` custom element. */\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","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link AutocompleteRoot} Vue component. */\nexport interface AutocompleteRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: AutocompleteRootElementProps['editor'];\n /**\n * The regular expression to match the query text to autocomplete.\n *\n * @default null\n */\n regex?: AutocompleteRootElementProps['regex'];\n /**\n * The filter function to determine if an item should be shown in the\n * listbox.\n *\n * @default defaultItemFilter\n */\n filter?: AutocompleteRootElementProps['filter'];\n /**\n * Builds the query string from the regex match found before the cursor. The\n * query is exposed via the `queryChange` event and used by the built-in item\n * filter. The default builder lowercases the match and strips punctuation.\n * Provide a custom builder to control the query, for example to preserve the\n * casing and punctuation the user typed.\n *\n * @default defaultQueryBuilder\n */\n queryBuilder?: AutocompleteRootElementProps['queryBuilder'];\n /**\n * The reference to position the popup against. This can be a DOM element, a\n * Floating UI virtual element, or a function that returns either of them.\n * By default, the popup will be positioned against the text content that\n * triggers the autocomplete.\n *\n * @default null\n */\n anchor?: AutocompleteRootElementProps['anchor'];\n /**\n * Whether the autocomplete match should follow the text cursor when it\n * moves without editing, growing and shrinking the query as the cursor\n * moves over existing text (for example with arrow keys).\n *\n * @default false\n */\n followCursor?: AutocompleteRootElementProps['followCursor'];\n /** Fired when the open state changes. */\n onOpenChange?: (event: AutocompleteRootEvents['openChange']) => void;\n /** Fired when the query changes. */\n onQueryChange?: (event: AutocompleteRootEvents['queryChange']) => void;\n /**\n * Emitted when the selected value changes. Only available when multiple is\n * false.\n */\n onValueChange?: (event: AutocompleteRootEvents['valueChange']) => void;\n /**\n * Emitted when the selected values change. Only available when multiple is\n * true.\n */\n onValuesChange?: (event: AutocompleteRootEvents['valuesChange']) => void;\n}\n\n/** A Vue component that renders an `prosekit-autocomplete-root` custom element. */\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 p1Fallback = useEditorContext();\n\n const splittedProps = computed(() => {\n const { anchor: p0, editor: p1, filter: p2, followCursor: p3, queryBuilder: p4, regex: p5, onOpenChange: e0, onQueryChange: e1, onValueChange: e2, onValuesChange: e3, ...restProps } = props;\n return [[p0, p1, p2, p3, p4, p5, 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, p3, p4, p5, e0, e1, e2, e3] = splittedProps.value[0];\n\n Object.assign(element, { anchor: p0, editor: p1 ?? p1Fallback, filter: p2, followCursor: p3, queryBuilder: p4, regex: p5 });\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: ['anchor', 'editor', 'filter', 'followCursor', 'queryBuilder', 'regex', 'onOpenChange', 'onQueryChange', 'onValueChange', 'onValuesChange'] },\n);\n"],"mappings":";;;;AASA,MAAa,oBAAqG,iCAC/G,OAAO,EAAE,YAAY;CACpB,iCAAiC;CAEjC,aAAa;EACX,OAAO,EAAE,+BAA+B,OAAO,MAAM,UAAU,CAAC;CAClE;AACF,GACA,EAAE,OAAO,CAAC,EAAE,CACd;;ACQA,MAAa,mBAAmG,iCAC7G,OAAO,EAAE,YAAY;CACpB,gCAAgC;CAEhC,MAAM,aAAa,WAA+B,IAAI;CAEtD,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,UAAU,IAAI,OAAO,IAAI,UAAU,IAAI,GAAG,cAAc;EAChE,OAAO,CAAC;GAAC;GAAI;GAAI;EAAE,GAAG,SAAS;CACjC,CAAC;CAED,MAAM,WAAsD,CAAC;CAE7D,kBAAkB;EAChB,MAAM,UAAU,WAAW;EAC3B,IAAI,CAAC,SAAS;EAEd,MAAM,CAAC,IAAI,IAAI,MAAM,cAAc,MAAM;EAEzC,OAAO,OAAO,SAAS;GAAE,UAAU;GAAI,OAAO;EAAG,CAAC;EAElD,SAAS,SAAS;EAClB,SAAS,KAAK,EAAE;CAClB,CAAC;CAED,kBAAkB;EAChB,MAAM,UAAU,WAAW;EAC3B,IAAI,CAAC,SAAS;EAEd,MAAM,KAAK,IAAI,gBAAgB;EAC/B,KAAK,MAAM,CAAC,OAAO,cAAc,CAAC,QAAQ,CAAC,CAAC,QAAQ,GAClD,QAAQ,iBACN,YACC,UAAiB;GAChB,SAAS,MAAM,GAAG,KAAK;EACzB,GACA,EAAE,QAAQ,GAAG,OAAO,CACtB;EAEF,aAAa,GAAG,MAAM;CACxB,CAAC;CAED,aAAa;EACX,MAAM,YAAY,cAAc,MAAM;EACtC,OAAO,EAAE,8BAA8B;GAAE,GAAG;GAAW,KAAK;EAAW,GAAG,MAAM,UAAU,CAAC;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 @@
|
|
|
1
|
-
{"version":3,"file":"block-handle.d.ts","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popup.gen.ts","../src/components/block-handle/block-handle-positioner.gen.ts","../src/components/block-handle/block-handle-root.gen.ts"],"mappings":";;;UAQiB,
|
|
1
|
+
{"version":3,"file":"block-handle.d.ts","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popup.gen.ts","../src/components/block-handle/block-handle-positioner.gen.ts","../src/components/block-handle/block-handle-root.gen.ts"],"mappings":";;;UAQiB;;;;;;;EAOf,SAAS;;;cAIE,gBAAgB,uBAAuB,sBAAsB;;UCXzD;;;;;;;EAOf,SAAS;;;cAIE,sBAAsB,uBAAuB,4BAA4B;;UCbrE;;cAGJ,kBAAkB,uBAAuB,wBAAwB;;UCH7D;;;;;;EAMf,YAAY;;;;;;;EAOZ,QAAQ;;;;;EAKR,OAAO;;;;;EAKP,QAAQ;;;;;EAKR,OAAO;;;;;;EAMP,WAAW;;;;;;;;EAQX,aAAa;;;;;;EAMb,SAAS;;;;;;;EAOT,UAAU;;;;;;;EAOV,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,SAAS;;;;;;;EAOT,WAAW;;;;;;;EAOX,eAAe;;;;;;;EAOf,kBAAkB;;;;;;;;EAQlB,iBAAiB;;;;;;;;EAQjB,cAAc;;;cAIH,uBAAuB,uBAAuB,6BAA6B;;UC1HvE;;;;;;;EAOf,SAAS;;EAET,iBAAiB,OAAO;;;cAIb,iBAAiB,uBAAuB,uBAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drop-indicator.d.ts","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"mappings":";;;UAQiB,
|
|
1
|
+
{"version":3,"file":"drop-indicator.d.ts","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"mappings":";;;UAQiB;;;;;;;EAOf,SAAS;;;;;;EAMT,QAAQ;;;cAIG,eAAe,uBAAuB,qBAAqB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -60,7 +60,6 @@ declare function useExtension(
|
|
|
60
60
|
* The ref to an extension to add to the editor. If it changes, the previous
|
|
61
61
|
* extension will be removed and the new one (if not null) will be added.
|
|
62
62
|
*/
|
|
63
|
-
|
|
64
63
|
extension: MaybeRefOrGetter<Extension | null>, options?: UseExtensionOptions): void;
|
|
65
64
|
/**
|
|
66
65
|
* Calls the given handler whenever the editor document changes.
|
|
@@ -90,7 +89,6 @@ declare function useEditorDerivedValue<E extends Extension, Derived>(
|
|
|
90
89
|
* It will be called whenever the editor's document state changes, or when it
|
|
91
90
|
* mounts.
|
|
92
91
|
*/
|
|
93
|
-
|
|
94
92
|
derive: (editor: Editor<E>) => Derived, options?: UseEditorDerivedOptions<E>): ShallowRef<Derived>;
|
|
95
93
|
/**
|
|
96
94
|
* Retrieves the editor instance from the nearest ProseKit component.
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/components/prosekit.ts","../src/extensions/vue-mark-view.ts","../src/extensions/vue-node-view.ts","../src/hooks/use-extension.ts","../src/hooks/use-doc-change.ts","../src/hooks/use-editor-derived-value.ts","../src/hooks/use-editor.ts","../src/hooks/use-keymap.ts","../src/hooks/use-state-update.ts"],"mappings":";;;;;;UAOiB
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/components/prosekit.ts","../src/extensions/vue-mark-view.ts","../src/extensions/vue-node-view.ts","../src/hooks/use-extension.ts","../src/hooks/use-doc-change.ts","../src/hooks/use-editor-derived-value.ts","../src/hooks/use-editor.ts","../src/hooks/use-keymap.ts","../src/hooks/use-state-update.ts"],"mappings":";;;;;;UAOiB;EACf,QAAQ;;;;;cAMG,UAAU,uBAAuB;UCH7B,yBAAyB;KAE9B,uBAAuB,gBAAgB;;;;UAKlC,2BAA2B,wBAAwB;;;;EAIlE;;;;;iBAqCc,kBAAkB,SAAS,qBAAqB;UChD/C,yBAAyB;KAE9B,uBAAuB,gBAAgB;;;;UAKlC,2BAA2B,wBAAwB;;;;EAIlE;;;;;iBAqCc,kBAAkB,SAAS,qBAAqB;UCrD/C;;;;;EAKf,SAAS,iBAAiB;;;;EAK1B,WAAW;;;;;iBAMG,aAKd;;;;;AAAA,WAAW,iBAAiB,mBAC5B,UAAU;;;;iBCpBI,aACd,UAAU,KAAK,0BACf,UAAU;UCLK,wBAAwB,UAAU;;;;;EAKjD,SAAS,iBAAiB,OAAO;;;;;;;;;;;;iBAanB,sBAAsB,UAAU,WAAW,SAOzD;;;;;;;AAAA,SAAS,QAAQ,OAAO,OAAO,SAC/B,UAAU,wBAAwB,KACjC,WAAW;;;;iBCxBE,UAAU,UAAU,iBAAiB;;;;;;;EAOnD;IACE,WAAW,OAAO;iBCXN,UACd,QAAQ,iBAAiB,SACzB,UAAU;;;;iBCCI,eACd,UAAU,OAAO,sBACjB,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-popover.d.ts","names":[],"sources":["../src/components/inline-popover/inline-popover-popup.gen.ts","../src/components/inline-popover/inline-popover-positioner.gen.ts","../src/components/inline-popover/inline-popover-root.gen.ts"],"mappings":";;;UAMiB
|
|
1
|
+
{"version":3,"file":"inline-popover.d.ts","names":[],"sources":["../src/components/inline-popover/inline-popover-popup.gen.ts","../src/components/inline-popover/inline-popover-positioner.gen.ts","../src/components/inline-popover/inline-popover-root.gen.ts"],"mappings":";;;UAMiB;;cAGJ,oBAAoB,uBAAuB,0BAA0B;;UCHjE;;;;;;EAMf,YAAY;;;;;;EAMZ,SAAS;;;;;;;EAOT,OAAO;;;;;;;EAOP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,SAAS;;;;;;EAMT,kBAAkB;;;;;;EAMlB,WAAW;;;;;;;;EAQX,aAAa;;;;;;;;;EASb,OAAO;;;;;;EAMP,QAAQ;;;;;;;EAOR,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,WAAW;;;;;;;EAOX,eAAe;;;;;;;;EAQf,iBAAiB;;;;;;;;EAQjB,cAAc;;;cAIH,yBAAyB,uBAAuB,+BAA+B;;UChI3E;;;;;;;EAOf,SAAS;;;;;;;EAOT,cAAc;;;;;;;EAOd,kBAAkB;;;;;;;;;;;EAWlB,SAAS;;;;;EAKT,OAAO;;;;;EAKP,WAAW;;EAEX,gBAAgB,OAAO;;;cAIZ,mBAAmB,uBAAuB,yBAAyB"}
|
package/dist/menu.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.d.ts","names":[],"sources":["../src/components/menu/menu-item.gen.ts","../src/components/menu/menu-popup.gen.ts","../src/components/menu/menu-positioner.gen.ts","../src/components/menu/menu-root.gen.ts","../src/components/menu/menu-submenu-root.gen.ts","../src/components/menu/menu-submenu-trigger.gen.ts","../src/components/menu/menu-trigger.gen.ts"],"mappings":";;;UAMiB,
|
|
1
|
+
{"version":3,"file":"menu.d.ts","names":[],"sources":["../src/components/menu/menu-item.gen.ts","../src/components/menu/menu-popup.gen.ts","../src/components/menu/menu-positioner.gen.ts","../src/components/menu/menu-root.gen.ts","../src/components/menu/menu-submenu-root.gen.ts","../src/components/menu/menu-submenu-trigger.gen.ts","../src/components/menu/menu-trigger.gen.ts"],"mappings":";;;UAMiB;;;;;;EAMf,QAAQ;;;;;;EAMR,WAAW;;;;;;EAMX,gBAAgB;;EAEhB,YAAY,OAAO;;;cAIR,UAAU,uBAAuB,gBAAgB;;UCxB7C;;;;;;;EAOf,cAAc;;;cAIH,WAAW,uBAAuB,iBAAiB;;UCX/C;;;;;;EAMf,YAAY;;;;;;EAMZ,WAAW;;;;;;;;EAQX,aAAa;;;;;;;EAOb,QAAQ;;;;;;EAMR,SAAS;;;;;;;;;EAST,OAAO;;;;;;EAMP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,SAAS;;;;;;;EAOT,OAAO;;;;;;;EAOP,WAAW;;;;;;;EAOX,eAAe;;;;;;;EAOf,kBAAkB;;;;;;;;EAQlB,iBAAiB;;;;;;;;EAQjB,cAAc;;;cAIH,gBAAgB,uBAAuB,sBAAsB;;UCnIzD;;;;;EAKf,cAAc;;;;;EAKd,OAAO;;;;;EAKP,WAAW;;EAEX,gBAAgB,OAAO;;;cAIZ,UAAU,uBAAuB,gBAAgB;;UCrB7C;;;;;EAKf,cAAc;;;;;EAKd,OAAO;;;;;EAKP,WAAW;;EAEX,gBAAgB,OAAO;;;cAIZ,iBAAiB,uBAAuB,uBAAuB;;UCrB3D;;;;;;EAMf,QAAQ;;;;;;EAMR,WAAW;;;cAIA,oBAAoB,uBAAuB,0BAA0B;;UChBjE;;;;;;EAMf,WAAW;;EAEX,gBAAgB,OAAO;;;cAIZ,aAAa,uBAAuB,mBAAmB"}
|
package/dist/popover.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.d.ts","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"],"mappings":";;;UAMiB
|
|
1
|
+
{"version":3,"file":"popover.d.ts","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"],"mappings":";;;UAMiB;;cAGJ,cAAc,uBAAuB,oBAAoB;;UCHrD;;;;;;EAMf,WAAW;;;;;;EAMX,YAAY;;;;;;;;EAQZ,aAAa;;;;;;;EAOb,QAAQ;;;;;;EAMR,SAAS;;;;;;;;;EAST,OAAO;;;;;;EAMP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,SAAS;;;;;;;EAOT,OAAO;;;;;;;EAOP,WAAW;;;;;;;EAOX,eAAe;;;;;;;EAOf,kBAAkB;;;;;;;;EAQlB,iBAAiB;;;;;;;;EAQjB,cAAc;;;cAIH,mBAAmB,uBAAuB,yBAAyB;;UCnI/D;;;;;;;EAOf,QAAQ;;;;;EAKR,cAAc;;;;;EAKd,OAAO;;;;;EAKP,WAAW;;EAEX,gBAAgB,OAAO;;;cAIZ,aAAa,uBAAuB,mBAAmB;;UC5BnD;;;;;EAKf,WAAW;;;;;EAKX,cAAc;;;;;;EAMd,QAAQ;;;;;;EAMR,aAAa;;EAEb,gBAAgB,OAAO;;;cAIZ,gBAAgB,uBAAuB,sBAAsB"}
|
package/dist/resizable.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable.d.ts","names":[],"sources":["../src/components/resizable/resizable-root.gen.ts","../src/components/resizable/resizable-handle.gen.ts"],"mappings":";;;UAMiB,
|
|
1
|
+
{"version":3,"file":"resizable.d.ts","names":[],"sources":["../src/components/resizable/resizable-root.gen.ts","../src/components/resizable/resizable-handle.gen.ts"],"mappings":";;;UAMiB;;;;;;EAMf,QAAQ;;;;;;EAMR,SAAS;;;;;;EAMT,cAAc;;EAEd,iBAAiB,OAAO;;EAExB,eAAe,OAAO;;;cAIX,eAAe,uBAAuB,qBAAqB;;UC1BvD;;;;;;EAMf,WAAW;;;cAIA,iBAAiB,uBAAuB,uBAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-handle.d.ts","names":[],"sources":["../src/components/table-handle/table-handle-column-popup.gen.ts","../src/components/table-handle/table-handle-column-positioner.gen.ts","../src/components/table-handle/table-handle-column-menu-root.gen.ts","../src/components/table-handle/table-handle-column-menu-trigger.gen.ts","../src/components/table-handle/table-handle-drag-preview.gen.ts","../src/components/table-handle/table-handle-drop-indicator.gen.ts","../src/components/table-handle/table-handle-root.gen.ts","../src/components/table-handle/table-handle-row-popup.gen.ts","../src/components/table-handle/table-handle-row-positioner.gen.ts","../src/components/table-handle/table-handle-row-menu-root.gen.ts","../src/components/table-handle/table-handle-row-menu-trigger.gen.ts"],"mappings":";;;UAMiB
|
|
1
|
+
{"version":3,"file":"table-handle.d.ts","names":[],"sources":["../src/components/table-handle/table-handle-column-popup.gen.ts","../src/components/table-handle/table-handle-column-positioner.gen.ts","../src/components/table-handle/table-handle-column-menu-root.gen.ts","../src/components/table-handle/table-handle-column-menu-trigger.gen.ts","../src/components/table-handle/table-handle-drag-preview.gen.ts","../src/components/table-handle/table-handle-drop-indicator.gen.ts","../src/components/table-handle/table-handle-root.gen.ts","../src/components/table-handle/table-handle-row-popup.gen.ts","../src/components/table-handle/table-handle-row-positioner.gen.ts","../src/components/table-handle/table-handle-row-menu-root.gen.ts","../src/components/table-handle/table-handle-row-menu-trigger.gen.ts"],"mappings":";;;UAMiB;;cAGJ,wBAAwB,uBAAuB,8BAA8B;;UCDzE;;;;;;EAMf,YAAY;;;;;;EAMZ,WAAW;;;;;;;;EAQX,aAAa;;;;;;;EAOb,QAAQ;;;;;EAKR,SAAS;;;;;EAKT,OAAO;;;;;EAKP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,SAAS;;;;;EAKT,OAAO;;;;;;;EAOP,WAAW;;;;;;;EAOX,eAAe;;;;;;;EAOf,kBAAkB;;;;;;;;EAQlB,iBAAiB;;;;;;;;EAQjB,cAAc;;;;;;;EAOd,SAAS;;;cAIE,6BAA6B,uBAAuB,mCAAmC;;UCpInF;;;;;EAKf,cAAc;;;;;EAKd,OAAO;;;;;EAKP,WAAW;;;cAIA,2BAA2B,uBAAuB,iCAAiC;;UCjB/E;;;;;EAKf,SAAS;;;cAIE,8BAA8B,uBAAuB,oCAAoC;;UCTrF;;;;;EAKf,SAAS;;;cAIE,wBAAwB,uBAAuB,8BAA8B;;UCTzE;;;;;EAKf,SAAS;;;cAIE,0BAA0B,uBAAuB,gCAAgC;;UCT7E;;;;;;;EAOf,SAAS;;;cAIE,iBAAiB,uBAAuB,uBAAuB;;UCb3D;;cAGJ,qBAAqB,uBAAuB,2BAA2B;;UCDnE;;;;;;EAMf,YAAY;;;;;;EAMZ,WAAW;;;;;;;;EAQX,aAAa;;;;;;;EAOb,QAAQ;;;;;EAKR,SAAS;;;;;EAKT,OAAO;;;;;EAKP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,SAAS;;;;;EAKT,OAAO;;;;;;;EAOP,WAAW;;;;;;;EAOX,eAAe;;;;;;;EAOf,kBAAkB;;;;;;;;EAQlB,iBAAiB;;;;;;;;EAQjB,cAAc;;;;;;;EAOd,SAAS;;;cAIE,0BAA0B,uBAAuB,gCAAgC;;UCpI7E;;;;;EAKf,cAAc;;;;;EAKd,OAAO;;;;;EAKP,WAAW;;;cAIA,wBAAwB,uBAAuB,8BAA8B;;UCjBzE;;;;;EAKf,SAAS;;;cAIE,2BAA2B,uBAAuB,iCAAiC"}
|
package/dist/tooltip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","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"],"mappings":";;;UAMiB
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","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"],"mappings":";;;UAMiB;;cAGJ,cAAc,uBAAuB,oBAAoB;;UCHrD;;;;;;EAMf,WAAW;;;;;;EAMX,YAAY;;;;;;;;EAQZ,aAAa;;;;;;;EAOb,QAAQ;;;;;;EAMR,SAAS;;;;;;;;;EAST,OAAO;;;;;;EAMP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,SAAS;;;;;;;EAOT,OAAO;;;;;;;EAOP,WAAW;;;;;;;EAOX,eAAe;;;;;;;EAOf,kBAAkB;;;;;;;;EAQlB,iBAAiB;;;;;;;;EAQjB,cAAc;;;cAIH,mBAAmB,uBAAuB,yBAAyB;;UCnI/D;;;;;EAKf,cAAc;;;;;EAKd,OAAO;;;;;EAKP,WAAW;;EAEX,gBAAgB,OAAO;;;cAIZ,aAAa,uBAAuB,mBAAmB;;UCrBnD;;;;;EAKf,WAAW;;;;;EAKX,YAAY;;;;;EAKZ,aAAa;;;cAIF,gBAAgB,uBAAuB,sBAAsB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosekit/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.8.0-beta.
|
|
4
|
+
"version": "0.8.0-beta.20",
|
|
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.13.0-beta.5",
|
|
77
78
|
"@prosekit/pm": "^0.1.19-beta.2",
|
|
78
|
-
"@prosekit/web": "^0.9.0-beta.
|
|
79
|
-
"@prosekit/core": "^0.13.0-beta.5"
|
|
79
|
+
"@prosekit/web": "^0.9.0-beta.20"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
82
|
"vue": ">= 3.0.0"
|
|
@@ -88,15 +88,15 @@
|
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
91
|
-
"@vue/test-utils": "^2.4.
|
|
92
|
-
"tsdown": "^0.22.
|
|
91
|
+
"@vue/test-utils": "^2.4.11",
|
|
92
|
+
"tsdown": "^0.22.4",
|
|
93
93
|
"typescript": "~6.0.3",
|
|
94
|
-
"vitest": "^4.1.
|
|
94
|
+
"vitest": "^4.1.10",
|
|
95
95
|
"vitest-browser-vue": "^2.1.0",
|
|
96
|
-
"vue": "^3.5.
|
|
96
|
+
"vue": "^3.5.39",
|
|
97
97
|
"@prosekit/config-ts": "0.0.0",
|
|
98
|
-
"@prosekit/config-vitest": "0.0.0",
|
|
99
98
|
"@prosekit/config-tsdown": "0.0.0",
|
|
99
|
+
"@prosekit/config-vitest": "0.0.0",
|
|
100
100
|
"@prosekit/testing": "0.0.0"
|
|
101
101
|
},
|
|
102
102
|
"scripts": {
|
|
@@ -46,6 +46,14 @@ export interface AutocompleteRootProps {
|
|
|
46
46
|
* @default null
|
|
47
47
|
*/
|
|
48
48
|
anchor?: AutocompleteRootElementProps['anchor'];
|
|
49
|
+
/**
|
|
50
|
+
* Whether the autocomplete match should follow the text cursor when it
|
|
51
|
+
* moves without editing, growing and shrinking the query as the cursor
|
|
52
|
+
* moves over existing text (for example with arrow keys).
|
|
53
|
+
*
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
followCursor?: AutocompleteRootElementProps['followCursor'];
|
|
49
57
|
/** Fired when the open state changes. */
|
|
50
58
|
onOpenChange?: (event: AutocompleteRootEvents['openChange']) => void;
|
|
51
59
|
/** Fired when the query changes. */
|
|
@@ -72,8 +80,8 @@ export const AutocompleteRoot: DefineSetupFnComponent<AutocompleteRootProps & HT
|
|
|
72
80
|
const p1Fallback = useEditorContext();
|
|
73
81
|
|
|
74
82
|
const splittedProps = computed(() => {
|
|
75
|
-
const { anchor: p0, editor: p1, filter: p2,
|
|
76
|
-
return [[p0, p1, p2, p3, p4, e0, e1, e2, e3], restProps] as const;
|
|
83
|
+
const { anchor: p0, editor: p1, filter: p2, followCursor: p3, queryBuilder: p4, regex: p5, onOpenChange: e0, onQueryChange: e1, onValueChange: e2, onValuesChange: e3, ...restProps } = props;
|
|
84
|
+
return [[p0, p1, p2, p3, p4, p5, e0, e1, e2, e3], restProps] as const;
|
|
77
85
|
});
|
|
78
86
|
|
|
79
87
|
const handlers: Array<((event: any) => void) | undefined> = [];
|
|
@@ -82,9 +90,9 @@ export const AutocompleteRoot: DefineSetupFnComponent<AutocompleteRootProps & HT
|
|
|
82
90
|
const element = elementRef.value;
|
|
83
91
|
if (!element) return;
|
|
84
92
|
|
|
85
|
-
const [p0, p1, p2, p3, p4, e0, e1, e2, e3] = splittedProps.value[0];
|
|
93
|
+
const [p0, p1, p2, p3, p4, p5, e0, e1, e2, e3] = splittedProps.value[0];
|
|
86
94
|
|
|
87
|
-
Object.assign(element, { anchor: p0, editor: p1 ?? p1Fallback, filter: p2,
|
|
95
|
+
Object.assign(element, { anchor: p0, editor: p1 ?? p1Fallback, filter: p2, followCursor: p3, queryBuilder: p4, regex: p5 });
|
|
88
96
|
|
|
89
97
|
handlers.length = 0;
|
|
90
98
|
handlers.push(e0);
|
|
@@ -115,5 +123,5 @@ export const AutocompleteRoot: DefineSetupFnComponent<AutocompleteRootProps & HT
|
|
|
115
123
|
return h('prosekit-autocomplete-root', { ...restProps, ref: elementRef }, slots.default?.());
|
|
116
124
|
};
|
|
117
125
|
},
|
|
118
|
-
{ props: ['anchor', 'editor', 'filter', 'queryBuilder', 'regex', 'onOpenChange', 'onQueryChange', 'onValueChange', 'onValuesChange'] },
|
|
126
|
+
{ props: ['anchor', 'editor', 'filter', 'followCursor', 'queryBuilder', 'regex', 'onOpenChange', 'onQueryChange', 'onValueChange', 'onValuesChange'] },
|
|
119
127
|
);
|
|
@@ -104,12 +104,12 @@ describe('VueNodeView', () => {
|
|
|
104
104
|
|
|
105
105
|
const urls = new Set<string>()
|
|
106
106
|
const check = () => {
|
|
107
|
-
imageRefresh.elements()
|
|
107
|
+
for (const element of imageRefresh.elements()) {
|
|
108
108
|
const url = element.getAttribute('data-url')
|
|
109
109
|
if (url) {
|
|
110
110
|
urls.add(url)
|
|
111
111
|
}
|
|
112
|
-
}
|
|
112
|
+
}
|
|
113
113
|
return urls.size >= 5
|
|
114
114
|
}
|
|
115
115
|
|
|
@@ -136,12 +136,12 @@ describe('VueNodeView', () => {
|
|
|
136
136
|
|
|
137
137
|
const urls = new Set<string>()
|
|
138
138
|
const check = () => {
|
|
139
|
-
imageRefresh.elements()
|
|
139
|
+
for (const element of imageRefresh.elements()) {
|
|
140
140
|
const url = element.getAttribute('data-url')
|
|
141
141
|
if (url) {
|
|
142
142
|
urls.add(url)
|
|
143
143
|
}
|
|
144
|
-
}
|
|
144
|
+
}
|
|
145
145
|
return urls.size >= 15
|
|
146
146
|
}
|
|
147
147
|
|