@prosekit/svelte 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build/components/autocomplete-empty.gen.d.ts +2 -3
- package/dist/build/components/autocomplete-empty.gen.d.ts.map +1 -1
- package/dist/build/components/autocomplete-item.gen.d.ts +2 -3
- package/dist/build/components/autocomplete-item.gen.d.ts.map +1 -1
- package/dist/build/components/autocomplete-list.gen.d.ts +2 -3
- package/dist/build/components/autocomplete-list.gen.d.ts.map +1 -1
- package/dist/build/components/autocomplete-popover.gen.d.ts +2 -3
- package/dist/build/components/autocomplete-popover.gen.d.ts.map +1 -1
- package/dist/build/components/combo-box-input.gen.d.ts +2 -3
- package/dist/build/components/combo-box-input.gen.d.ts.map +1 -1
- package/dist/build/components/combo-box-item.gen.d.ts +2 -3
- package/dist/build/components/combo-box-item.gen.d.ts.map +1 -1
- package/dist/build/components/combo-box-list.gen.d.ts +2 -3
- package/dist/build/components/combo-box-list.gen.d.ts.map +1 -1
- package/dist/build/components/combo-box.gen.d.ts +2 -3
- package/dist/build/components/combo-box.gen.d.ts.map +1 -1
- package/dist/build/components/inline-popover.gen.d.ts +2 -3
- package/dist/build/components/inline-popover.gen.d.ts.map +1 -1
- package/dist/build/components/popover.gen.d.ts +2 -3
- package/dist/build/components/popover.gen.d.ts.map +1 -1
- package/dist/build/hooks/use-editor.d.ts +1 -0
- package/dist/build/hooks/use-editor.d.ts.map +1 -1
- package/dist/build/hooks/use-extension.d.ts +1 -0
- package/dist/build/hooks/use-extension.d.ts.map +1 -1
- package/dist/build/hooks/use-keymap.d.ts +5 -2
- package/dist/build/hooks/use-keymap.d.ts.map +1 -1
- package/dist/build/hooks/use-keymap.js +4 -4
- package/dist/build/hooks/use-priority-extension.d.ts +5 -0
- package/dist/build/hooks/use-priority-extension.d.ts.map +1 -0
- package/dist/build/hooks/use-priority-extension.js +9 -0
- package/dist/build/index.d.ts +2 -1
- package/dist/build/index.d.ts.map +1 -1
- package/dist/build/index.js +1 -1
- package/dist/build/types.d.ts +7 -0
- package/dist/build/types.d.ts.map +1 -0
- package/dist/build/types.js +1 -0
- package/package.json +10 -10
- package/src/index.ts +2 -2
@@ -1,7 +1,6 @@
|
|
1
1
|
import type { AutocompleteEmptyProps as AutocompleteEmptyElementProps } from '@prosekit/lit/autocomplete-empty';
|
2
2
|
import type { SvelteComponent } from 'svelte';
|
3
|
-
|
4
|
-
|
5
|
-
} & AutocompleteEmptyElementProps;
|
3
|
+
import type { PropsWithClass } from '../types';
|
4
|
+
export type AutocompleteEmptyProps = PropsWithClass<AutocompleteEmptyElementProps>;
|
6
5
|
export declare const AutocompleteEmpty: typeof SvelteComponent<AutocompleteEmptyProps>;
|
7
6
|
//# sourceMappingURL=autocomplete-empty.gen.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"autocomplete-empty.gen.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete-empty.gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,IAAI,6BAA6B,EAAE,MAAM,kCAAkC,CAAA;AAC/G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;
|
1
|
+
{"version":3,"file":"autocomplete-empty.gen.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete-empty.gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,IAAI,6BAA6B,EAAE,MAAM,kCAAkC,CAAA;AAC/G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAI9C,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,6BAA6B,CAAC,CAAA;AAElF,eAAO,MAAM,iBAAiB,EAAgE,uBAAuB,sBAAsB,CAAC,CAAA"}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import type { AutocompleteItemProps as AutocompleteItemElementProps } from '@prosekit/lit/autocomplete-item';
|
2
2
|
import type { SvelteComponent } from 'svelte';
|
3
|
-
|
4
|
-
|
5
|
-
} & AutocompleteItemElementProps;
|
3
|
+
import type { PropsWithClass } from '../types';
|
4
|
+
export type AutocompleteItemProps = PropsWithClass<AutocompleteItemElementProps>;
|
6
5
|
export declare const AutocompleteItem: typeof SvelteComponent<AutocompleteItemProps>;
|
7
6
|
//# sourceMappingURL=autocomplete-item.gen.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"autocomplete-item.gen.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete-item.gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,IAAI,4BAA4B,EAAE,MAAM,iCAAiC,CAAA;AAC5G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;
|
1
|
+
{"version":3,"file":"autocomplete-item.gen.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete-item.gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,IAAI,4BAA4B,EAAE,MAAM,iCAAiC,CAAA;AAC5G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAI9C,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,4BAA4B,CAAC,CAAA;AAEhF,eAAO,MAAM,gBAAgB,EAA+D,uBAAuB,qBAAqB,CAAC,CAAA"}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import type { AutocompleteListProps as AutocompleteListElementProps } from '@prosekit/lit/autocomplete-list';
|
2
2
|
import type { SvelteComponent } from 'svelte';
|
3
|
-
|
4
|
-
|
5
|
-
} & AutocompleteListElementProps;
|
3
|
+
import type { PropsWithClass } from '../types';
|
4
|
+
export type AutocompleteListProps = PropsWithClass<AutocompleteListElementProps>;
|
6
5
|
export declare const AutocompleteList: typeof SvelteComponent<AutocompleteListProps>;
|
7
6
|
//# sourceMappingURL=autocomplete-list.gen.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"autocomplete-list.gen.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete-list.gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,IAAI,4BAA4B,EAAE,MAAM,iCAAiC,CAAA;AAC5G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;
|
1
|
+
{"version":3,"file":"autocomplete-list.gen.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete-list.gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,IAAI,4BAA4B,EAAE,MAAM,iCAAiC,CAAA;AAC5G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAI9C,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,4BAA4B,CAAC,CAAA;AAEhF,eAAO,MAAM,gBAAgB,EAA+D,uBAAuB,qBAAqB,CAAC,CAAA"}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import type { AutocompletePopoverProps as AutocompletePopoverElementProps } from '@prosekit/lit/autocomplete-popover';
|
2
2
|
import type { SvelteComponent } from 'svelte';
|
3
|
-
|
4
|
-
|
5
|
-
} & AutocompletePopoverElementProps;
|
3
|
+
import type { PropsWithClass } from '../types';
|
4
|
+
export type AutocompletePopoverProps = PropsWithClass<AutocompletePopoverElementProps>;
|
6
5
|
export declare const AutocompletePopover: typeof SvelteComponent<AutocompletePopoverProps>;
|
7
6
|
//# sourceMappingURL=autocomplete-popover.gen.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"autocomplete-popover.gen.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete-popover.gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,IAAI,+BAA+B,EAAE,MAAM,oCAAoC,CAAA;AACrH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;
|
1
|
+
{"version":3,"file":"autocomplete-popover.gen.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete-popover.gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,IAAI,+BAA+B,EAAE,MAAM,oCAAoC,CAAA;AACrH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAI9C,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,+BAA+B,CAAC,CAAA;AAEtF,eAAO,MAAM,mBAAmB,EAAkE,uBAAuB,wBAAwB,CAAC,CAAA"}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import type { ComboBoxInputProps as ComboBoxInputElementProps } from '@prosekit/lit/combo-box-input';
|
2
2
|
import type { SvelteComponent } from 'svelte';
|
3
|
-
|
4
|
-
|
5
|
-
} & ComboBoxInputElementProps;
|
3
|
+
import type { PropsWithClass } from '../types';
|
4
|
+
export type ComboBoxInputProps = PropsWithClass<ComboBoxInputElementProps>;
|
6
5
|
export declare const ComboBoxInput: typeof SvelteComponent<ComboBoxInputProps>;
|
7
6
|
//# sourceMappingURL=combo-box-input.gen.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"combo-box-input.gen.d.ts","sourceRoot":"","sources":["../../../../src/components/combo-box-input.gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,IAAI,yBAAyB,EAAE,MAAM,+BAA+B,CAAA;AACpG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;
|
1
|
+
{"version":3,"file":"combo-box-input.gen.d.ts","sourceRoot":"","sources":["../../../../src/components/combo-box-input.gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,IAAI,yBAAyB,EAAE,MAAM,+BAA+B,CAAA;AACpG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAI9C,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,yBAAyB,CAAC,CAAA;AAE1E,eAAO,MAAM,aAAa,EAA4D,uBAAuB,kBAAkB,CAAC,CAAA"}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import type { ComboBoxItemProps as ComboBoxItemElementProps } from '@prosekit/lit/combo-box-item';
|
2
2
|
import type { SvelteComponent } from 'svelte';
|
3
|
-
|
4
|
-
|
5
|
-
} & ComboBoxItemElementProps;
|
3
|
+
import type { PropsWithClass } from '../types';
|
4
|
+
export type ComboBoxItemProps = PropsWithClass<ComboBoxItemElementProps>;
|
6
5
|
export declare const ComboBoxItem: typeof SvelteComponent<ComboBoxItemProps>;
|
7
6
|
//# sourceMappingURL=combo-box-item.gen.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"combo-box-item.gen.d.ts","sourceRoot":"","sources":["../../../../src/components/combo-box-item.gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,IAAI,wBAAwB,EAAE,MAAM,8BAA8B,CAAA;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;
|
1
|
+
{"version":3,"file":"combo-box-item.gen.d.ts","sourceRoot":"","sources":["../../../../src/components/combo-box-item.gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,IAAI,wBAAwB,EAAE,MAAM,8BAA8B,CAAA;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAI9C,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,wBAAwB,CAAC,CAAA;AAExE,eAAO,MAAM,YAAY,EAA2D,uBAAuB,iBAAiB,CAAC,CAAA"}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import type { ComboBoxListProps as ComboBoxListElementProps } from '@prosekit/lit/combo-box-list';
|
2
2
|
import type { SvelteComponent } from 'svelte';
|
3
|
-
|
4
|
-
|
5
|
-
} & ComboBoxListElementProps;
|
3
|
+
import type { PropsWithClass } from '../types';
|
4
|
+
export type ComboBoxListProps = PropsWithClass<ComboBoxListElementProps>;
|
6
5
|
export declare const ComboBoxList: typeof SvelteComponent<ComboBoxListProps>;
|
7
6
|
//# sourceMappingURL=combo-box-list.gen.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"combo-box-list.gen.d.ts","sourceRoot":"","sources":["../../../../src/components/combo-box-list.gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,IAAI,wBAAwB,EAAE,MAAM,8BAA8B,CAAA;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;
|
1
|
+
{"version":3,"file":"combo-box-list.gen.d.ts","sourceRoot":"","sources":["../../../../src/components/combo-box-list.gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,IAAI,wBAAwB,EAAE,MAAM,8BAA8B,CAAA;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAI9C,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,wBAAwB,CAAC,CAAA;AAExE,eAAO,MAAM,YAAY,EAA2D,uBAAuB,iBAAiB,CAAC,CAAA"}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import type { ComboBoxProps as ComboBoxElementProps } from '@prosekit/lit/combo-box';
|
2
2
|
import type { SvelteComponent } from 'svelte';
|
3
|
-
|
4
|
-
|
5
|
-
} & ComboBoxElementProps;
|
3
|
+
import type { PropsWithClass } from '../types';
|
4
|
+
export type ComboBoxProps = PropsWithClass<ComboBoxElementProps>;
|
6
5
|
export declare const ComboBox: typeof SvelteComponent<ComboBoxProps>;
|
7
6
|
//# sourceMappingURL=combo-box.gen.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"combo-box.gen.d.ts","sourceRoot":"","sources":["../../../../src/components/combo-box.gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AACpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;
|
1
|
+
{"version":3,"file":"combo-box.gen.d.ts","sourceRoot":"","sources":["../../../../src/components/combo-box.gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AACpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAI9C,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,oBAAoB,CAAC,CAAA;AAEhE,eAAO,MAAM,QAAQ,EAAuD,uBAAuB,aAAa,CAAC,CAAA"}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import type { InlinePopoverProps as InlinePopoverElementProps } from '@prosekit/lit/inline-popover';
|
2
2
|
import type { SvelteComponent } from 'svelte';
|
3
|
-
|
4
|
-
|
5
|
-
} & InlinePopoverElementProps;
|
3
|
+
import type { PropsWithClass } from '../types';
|
4
|
+
export type InlinePopoverProps = PropsWithClass<InlinePopoverElementProps>;
|
6
5
|
export declare const InlinePopover: typeof SvelteComponent<InlinePopoverProps>;
|
7
6
|
//# sourceMappingURL=inline-popover.gen.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"inline-popover.gen.d.ts","sourceRoot":"","sources":["../../../../src/components/inline-popover.gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,IAAI,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AACnG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;
|
1
|
+
{"version":3,"file":"inline-popover.gen.d.ts","sourceRoot":"","sources":["../../../../src/components/inline-popover.gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,IAAI,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AACnG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAI9C,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,yBAAyB,CAAC,CAAA;AAE1E,eAAO,MAAM,aAAa,EAA4D,uBAAuB,kBAAkB,CAAC,CAAA"}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import type { PopoverProps as PopoverElementProps } from '@prosekit/lit/popover';
|
2
2
|
import type { SvelteComponent } from 'svelte';
|
3
|
-
|
4
|
-
|
5
|
-
} & PopoverElementProps;
|
3
|
+
import type { PropsWithClass } from '../types';
|
4
|
+
export type PopoverProps = PropsWithClass<PopoverElementProps>;
|
6
5
|
export declare const Popover: typeof SvelteComponent<PopoverProps>;
|
7
6
|
//# sourceMappingURL=popover.gen.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"popover.gen.d.ts","sourceRoot":"","sources":["../../../../src/components/popover.gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;
|
1
|
+
{"version":3,"file":"popover.gen.d.ts","sourceRoot":"","sources":["../../../../src/components/popover.gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAI9C,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAA;AAE9D,eAAO,MAAM,OAAO,EAAsD,uBAAuB,YAAY,CAAC,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-editor.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,MAAM,EACX,KAAK,SAAS,EACf,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAsB,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAA;AAIhE,wBAAgB,SAAS,CAAC,CAAC,SAAS,SAAS,GAAG,GAAG,EAAE,OAAO,CAAC,EAAE;IAC7D,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAiBtB"}
|
1
|
+
{"version":3,"file":"use-editor.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-editor.ts"],"names":[],"mappings":";AAAA,OAAO,EAEL,KAAK,MAAM,EACX,KAAK,SAAS,EACf,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAsB,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAA;AAIhE,wBAAgB,SAAS,CAAC,CAAC,SAAS,SAAS,GAAG,GAAG,EAAE,OAAO,CAAC,EAAE;IAC7D,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAiBtB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-extension.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAA;AAIrD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EAC1D,cAAc,EAAE,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,GACjC,IAAI,CAWN"}
|
1
|
+
{"version":3,"file":"use-extension.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-extension.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAA;AAIrD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EAC1D,cAAc,EAAE,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,GACjC,IAAI,CAWN"}
|
@@ -1,4 +1,7 @@
|
|
1
|
-
|
1
|
+
/// <reference types="svelte" />
|
2
|
+
import { Priority, type Keymap } from '@prosekit/core';
|
2
3
|
import { type Readable } from 'svelte/store';
|
3
|
-
export declare function useKeymap(keymapStore: Readable<Keymap
|
4
|
+
export declare function useKeymap(keymapStore: Readable<Keymap>, options?: {
|
5
|
+
priority?: Priority;
|
6
|
+
}): void;
|
4
7
|
//# sourceMappingURL=use-keymap.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-keymap.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-keymap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAA;
|
1
|
+
{"version":3,"file":"use-keymap.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-keymap.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAgB,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACpE,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAA;AAIrD,wBAAgB,SAAS,CACvB,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,EAC7B,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAE,GAChC,IAAI,CAGN"}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { defineKeymap } from '@prosekit/core';
|
1
|
+
import { Priority, defineKeymap } from '@prosekit/core';
|
2
2
|
import { derived } from 'svelte/store';
|
3
|
-
import {
|
4
|
-
export function useKeymap(keymapStore) {
|
3
|
+
import { usePriorityExtension } from './use-priority-extension';
|
4
|
+
export function useKeymap(keymapStore, options) {
|
5
5
|
const extension = derived(keymapStore, (keymap) => defineKeymap(keymap));
|
6
|
-
|
6
|
+
usePriorityExtension(extension, options === null || options === void 0 ? void 0 : options.priority);
|
7
7
|
}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/// <reference types="svelte" />
|
2
|
+
import { Priority, type Extension } from '@prosekit/core';
|
3
|
+
import { type Readable } from 'svelte/store';
|
4
|
+
export declare function usePriorityExtension<T extends Extension = Extension>(extensionStore: Readable<T | null>, priority?: Priority | null): void;
|
5
|
+
//# sourceMappingURL=use-priority-extension.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"use-priority-extension.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-priority-extension.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAgB,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AACvE,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAA;AAIrD,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EAClE,cAAc,EAAE,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,EAClC,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,GACzB,IAAI,CAKN"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { Priority, withPriority } from '@prosekit/core';
|
2
|
+
import { derived } from 'svelte/store';
|
3
|
+
import { useExtension } from './use-extension';
|
4
|
+
export function usePriorityExtension(extensionStore, priority) {
|
5
|
+
const extensionWithPriorityStore = derived(extensionStore, (extension) => {
|
6
|
+
return extension && priority ? withPriority(extension, priority) : extension;
|
7
|
+
});
|
8
|
+
return useExtension(extensionWithPriorityStore);
|
9
|
+
}
|
package/dist/build/index.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
+
export { ProseKit } from './components/prosekit';
|
1
2
|
export { useEditor } from './hooks/use-editor';
|
2
3
|
export { useExtension } from './hooks/use-extension';
|
3
4
|
export { useKeymap } from './hooks/use-keymap';
|
4
|
-
export {
|
5
|
+
export type { PropsWithClass } from './types';
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA"}
|
package/dist/build/index.js
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,GAAG;IAC5C,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC3B,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@prosekit/svelte",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.1.
|
4
|
+
"version": "0.1.3",
|
5
5
|
"private": false,
|
6
6
|
"author": {
|
7
7
|
"name": "ocavue",
|
@@ -95,8 +95,8 @@
|
|
95
95
|
"dist"
|
96
96
|
],
|
97
97
|
"dependencies": {
|
98
|
-
"@prosekit/core": "^0.
|
99
|
-
"@prosekit/lit": "^0.1.
|
98
|
+
"@prosekit/core": "^0.2.0",
|
99
|
+
"@prosekit/lit": "^0.1.5"
|
100
100
|
},
|
101
101
|
"peerDependencies": {
|
102
102
|
"svelte": ">= 3.0.0"
|
@@ -108,14 +108,14 @@
|
|
108
108
|
},
|
109
109
|
"devDependencies": {
|
110
110
|
"@prosekit/dev": "*",
|
111
|
-
"@sveltejs/package": "^2.2.
|
112
|
-
"@types/node": "^20.
|
111
|
+
"@sveltejs/package": "^2.2.4",
|
112
|
+
"@types/node": "^20.10.5",
|
113
113
|
"read-pkg": "^9.0.1",
|
114
|
-
"svelte": "^4.2.
|
115
|
-
"svelte-check": "^3.6.
|
116
|
-
"tsx": "^4.
|
117
|
-
"typescript": "^5.3.
|
118
|
-
"vitest": "^
|
114
|
+
"svelte": "^4.2.8",
|
115
|
+
"svelte-check": "^3.6.2",
|
116
|
+
"tsx": "^4.7.0",
|
117
|
+
"typescript": "^5.3.3",
|
118
|
+
"vitest": "^1.1.0"
|
119
119
|
},
|
120
120
|
"scripts": {
|
121
121
|
"build": "svelte-package -i src -o dist/build && tsx scripts/re-export.ts"
|
package/src/index.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
+
export { ProseKit } from './components/prosekit'
|
1
2
|
export { useEditor } from './hooks/use-editor'
|
2
3
|
export { useExtension } from './hooks/use-extension'
|
3
4
|
export { useKeymap } from './hooks/use-keymap'
|
4
|
-
|
5
|
-
export { ProseKit } from './components/prosekit'
|
5
|
+
export type { PropsWithClass } from './types'
|