@prosekit/svelte 0.6.12 → 0.7.0
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/drop-indicator/drop-indicator.gen.d.ts +10 -0
- package/dist/build/components/drop-indicator/drop-indicator.gen.js +2 -0
- package/dist/build/components/drop-indicator/drop-indicator.gen.svelte +23 -0
- package/dist/build/components/drop-indicator/drop-indicator.gen.svelte.d.ts +30 -0
- package/dist/build/components/drop-indicator/index.gen.d.ts +1 -0
- package/dist/build/components/drop-indicator/index.gen.js +1 -0
- package/dist/prosekit-svelte-drop-indicator.d.ts +1 -0
- package/dist/prosekit-svelte-drop-indicator.js +1 -0
- package/package.json +16 -7
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DropIndicatorElement, DropIndicatorProps as Props, DropIndicatorEvents as Events } from '@prosekit/web/drop-indicator';
|
|
2
|
+
import type { SvelteComponent } from 'svelte';
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
+
import type { CreateProps } from '../create-props';
|
|
5
|
+
/**
|
|
6
|
+
* Props for the {@link DropIndicator} component.
|
|
7
|
+
*/
|
|
8
|
+
export interface DropIndicatorProps extends Partial<CreateProps<Props, Events>> {
|
|
9
|
+
}
|
|
10
|
+
export declare const DropIndicator: typeof SvelteComponent<DropIndicatorProps & HTMLAttributes<DropIndicatorElement>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import '@prosekit/web/drop-indicator'
|
|
3
|
+
|
|
4
|
+
import { dropIndicatorProps, dropIndicatorEvents } from '@prosekit/web/drop-indicator'
|
|
5
|
+
import { ClientUpdate } from '../client-update'
|
|
6
|
+
import { useComponent } from '../use-component'
|
|
7
|
+
import { useEventHandlers } from '../use-event-handlers'
|
|
8
|
+
|
|
9
|
+
let attributes: Record<string, unknown> = {}
|
|
10
|
+
let eventHandlers: Record<string, (...args: any[]) => any> = {}
|
|
11
|
+
let element: HTMLElement | undefined = undefined
|
|
12
|
+
const handleChange = useComponent(Object.keys(dropIndicatorProps), Object.keys(dropIndicatorEvents))
|
|
13
|
+
|
|
14
|
+
$: {
|
|
15
|
+
[attributes, eventHandlers] = handleChange(element, $$props)
|
|
16
|
+
}
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<ClientUpdate>
|
|
20
|
+
<prosekit-drop-indicator {...attributes} use:useEventHandlers={eventHandlers} bind:this={element}>
|
|
21
|
+
<slot />
|
|
22
|
+
</prosekit-drop-indicator>
|
|
23
|
+
</ClientUpdate>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import '@prosekit/web/drop-indicator';
|
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: Props & {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
12
|
+
};
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
14
|
+
}
|
|
15
|
+
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
16
|
+
default: any;
|
|
17
|
+
} ? Props extends Record<string, never> ? any : {
|
|
18
|
+
children?: any;
|
|
19
|
+
} : {});
|
|
20
|
+
declare const DropIndicator: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
21
|
+
[x: string]: any;
|
|
22
|
+
}, {
|
|
23
|
+
default: {};
|
|
24
|
+
}>, {
|
|
25
|
+
[evt: string]: CustomEvent<any>;
|
|
26
|
+
}, {
|
|
27
|
+
default: {};
|
|
28
|
+
}, {}, string>;
|
|
29
|
+
type DropIndicator = InstanceType<typeof DropIndicator>;
|
|
30
|
+
export default DropIndicator;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropIndicator, type DropIndicatorProps } from './drop-indicator.gen';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropIndicator } from './drop-indicator.gen';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './build/components/drop-indicator/index.gen'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './build/components/drop-indicator/index.gen'
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosekit/svelte",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Svelte components and utilities for ProseKit",
|
|
7
7
|
"author": {
|
|
@@ -40,6 +40,11 @@
|
|
|
40
40
|
"svelte": "./dist/prosekit-svelte-block-handle.js",
|
|
41
41
|
"default": "./dist/prosekit-svelte-block-handle.js"
|
|
42
42
|
},
|
|
43
|
+
"./drop-indicator": {
|
|
44
|
+
"types": "./dist/prosekit-svelte-drop-indicator.d.ts",
|
|
45
|
+
"svelte": "./dist/prosekit-svelte-drop-indicator.js",
|
|
46
|
+
"default": "./dist/prosekit-svelte-drop-indicator.js"
|
|
47
|
+
},
|
|
43
48
|
"./inline-popover": {
|
|
44
49
|
"types": "./dist/prosekit-svelte-inline-popover.d.ts",
|
|
45
50
|
"svelte": "./dist/prosekit-svelte-inline-popover.js",
|
|
@@ -72,9 +77,9 @@
|
|
|
72
77
|
"dependencies": {
|
|
73
78
|
"@prosemirror-adapter/core": "^0.4.0",
|
|
74
79
|
"@prosemirror-adapter/svelte": "^0.4.1",
|
|
75
|
-
"@prosekit/core": "^0.8.3",
|
|
76
80
|
"@prosekit/pm": "^0.1.11",
|
|
77
|
-
"@prosekit/
|
|
81
|
+
"@prosekit/core": "^0.8.3",
|
|
82
|
+
"@prosekit/web": "^0.7.0"
|
|
78
83
|
},
|
|
79
84
|
"peerDependencies": {
|
|
80
85
|
"svelte": ">= 5.0.0"
|
|
@@ -85,11 +90,11 @@
|
|
|
85
90
|
}
|
|
86
91
|
},
|
|
87
92
|
"devDependencies": {
|
|
88
|
-
"@sveltejs/package": "^2.
|
|
93
|
+
"@sveltejs/package": "^2.4.0",
|
|
89
94
|
"@types/node": "^20.17.29",
|
|
90
95
|
"read-pkg": "^9.0.1",
|
|
91
|
-
"svelte": "^5.
|
|
92
|
-
"svelte-check": "^4.
|
|
96
|
+
"svelte": "^5.37.2",
|
|
97
|
+
"svelte-check": "^4.3.0",
|
|
93
98
|
"tsx": "^4.20.3",
|
|
94
99
|
"typescript": "~5.8.3",
|
|
95
100
|
"vitest": "^3.2.4",
|
|
@@ -107,7 +112,8 @@
|
|
|
107
112
|
"prosekit-svelte-popover": "./src/components/popover/index.gen.ts",
|
|
108
113
|
"prosekit-svelte-resizable": "./src/components/resizable/index.gen.ts",
|
|
109
114
|
"prosekit-svelte-table-handle": "./src/components/table-handle/index.gen.ts",
|
|
110
|
-
"prosekit-svelte-tooltip": "./src/components/tooltip/index.gen.ts"
|
|
115
|
+
"prosekit-svelte-tooltip": "./src/components/tooltip/index.gen.ts",
|
|
116
|
+
"prosekit-svelte-drop-indicator": "./src/components/drop-indicator/index.gen.ts"
|
|
111
117
|
}
|
|
112
118
|
},
|
|
113
119
|
"scripts": {
|
|
@@ -125,6 +131,9 @@
|
|
|
125
131
|
"block-handle": [
|
|
126
132
|
"./dist/prosekit-svelte-block-handle.d.ts"
|
|
127
133
|
],
|
|
134
|
+
"drop-indicator": [
|
|
135
|
+
"./dist/prosekit-svelte-drop-indicator.d.ts"
|
|
136
|
+
],
|
|
128
137
|
"inline-popover": [
|
|
129
138
|
"./dist/prosekit-svelte-inline-popover.d.ts"
|
|
130
139
|
],
|