@prosekit/svelte 0.6.11 → 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.
@@ -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,2 @@
1
+ import Component from './drop-indicator.gen.svelte';
2
+ export const DropIndicator = Component;
@@ -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';
@@ -1,5 +1,7 @@
1
1
  export { TableHandleColumnRoot, type TableHandleColumnRootProps } from './table-handle-column-root.gen';
2
2
  export { TableHandleColumnTrigger, type TableHandleColumnTriggerProps } from './table-handle-column-trigger.gen';
3
+ export { TableHandleDragPreview, type TableHandleDragPreviewProps } from './table-handle-drag-preview.gen';
4
+ export { TableHandleDropIndicator, type TableHandleDropIndicatorProps } from './table-handle-drop-indicator.gen';
3
5
  export { TableHandlePopoverContent, type TableHandlePopoverContentProps } from './table-handle-popover-content.gen';
4
6
  export { TableHandlePopoverItem, type TableHandlePopoverItemProps } from './table-handle-popover-item.gen';
5
7
  export { TableHandleRoot, type TableHandleRootProps } from './table-handle-root.gen';
@@ -1,5 +1,7 @@
1
1
  export { TableHandleColumnRoot } from './table-handle-column-root.gen';
2
2
  export { TableHandleColumnTrigger } from './table-handle-column-trigger.gen';
3
+ export { TableHandleDragPreview } from './table-handle-drag-preview.gen';
4
+ export { TableHandleDropIndicator } from './table-handle-drop-indicator.gen';
3
5
  export { TableHandlePopoverContent } from './table-handle-popover-content.gen';
4
6
  export { TableHandlePopoverItem } from './table-handle-popover-item.gen';
5
7
  export { TableHandleRoot } from './table-handle-root.gen';
@@ -0,0 +1,10 @@
1
+ import type { TableHandleDragPreviewElement, TableHandleDragPreviewProps as Props, TableHandleDragPreviewEvents as Events } from '@prosekit/web/table-handle';
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 TableHandleDragPreview} component.
7
+ */
8
+ export interface TableHandleDragPreviewProps extends Partial<CreateProps<Props, Events>> {
9
+ }
10
+ export declare const TableHandleDragPreview: typeof SvelteComponent<TableHandleDragPreviewProps & HTMLAttributes<TableHandleDragPreviewElement>>;
@@ -0,0 +1,2 @@
1
+ import Component from './table-handle-drag-preview.gen.svelte';
2
+ export const TableHandleDragPreview = Component;
@@ -0,0 +1,23 @@
1
+ <script lang="ts">
2
+ import '@prosekit/web/table-handle'
3
+
4
+ import { tableHandleDragPreviewProps, tableHandleDragPreviewEvents } from '@prosekit/web/table-handle'
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(tableHandleDragPreviewProps), Object.keys(tableHandleDragPreviewEvents))
13
+
14
+ $: {
15
+ [attributes, eventHandlers] = handleChange(element, $$props)
16
+ }
17
+ </script>
18
+
19
+ <ClientUpdate>
20
+ <prosekit-table-handle-drag-preview {...attributes} use:useEventHandlers={eventHandlers} bind:this={element}>
21
+ <slot />
22
+ </prosekit-table-handle-drag-preview>
23
+ </ClientUpdate>
@@ -0,0 +1,30 @@
1
+ import '@prosekit/web/table-handle';
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 TableHandleDragPreview: $$__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 TableHandleDragPreview = InstanceType<typeof TableHandleDragPreview>;
30
+ export default TableHandleDragPreview;
@@ -0,0 +1,10 @@
1
+ import type { TableHandleDropIndicatorElement, TableHandleDropIndicatorProps as Props, TableHandleDropIndicatorEvents as Events } from '@prosekit/web/table-handle';
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 TableHandleDropIndicator} component.
7
+ */
8
+ export interface TableHandleDropIndicatorProps extends Partial<CreateProps<Props, Events>> {
9
+ }
10
+ export declare const TableHandleDropIndicator: typeof SvelteComponent<TableHandleDropIndicatorProps & HTMLAttributes<TableHandleDropIndicatorElement>>;
@@ -0,0 +1,2 @@
1
+ import Component from './table-handle-drop-indicator.gen.svelte';
2
+ export const TableHandleDropIndicator = Component;
@@ -0,0 +1,23 @@
1
+ <script lang="ts">
2
+ import '@prosekit/web/table-handle'
3
+
4
+ import { tableHandleDropIndicatorProps, tableHandleDropIndicatorEvents } from '@prosekit/web/table-handle'
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(tableHandleDropIndicatorProps), Object.keys(tableHandleDropIndicatorEvents))
13
+
14
+ $: {
15
+ [attributes, eventHandlers] = handleChange(element, $$props)
16
+ }
17
+ </script>
18
+
19
+ <ClientUpdate>
20
+ <prosekit-table-handle-drop-indicator {...attributes} use:useEventHandlers={eventHandlers} bind:this={element}>
21
+ <slot />
22
+ </prosekit-table-handle-drop-indicator>
23
+ </ClientUpdate>
@@ -0,0 +1,30 @@
1
+ import '@prosekit/web/table-handle';
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 TableHandleDropIndicator: $$__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 TableHandleDropIndicator = InstanceType<typeof TableHandleDropIndicator>;
30
+ export default TableHandleDropIndicator;
@@ -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.6.11",
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.2",
76
80
  "@prosekit/pm": "^0.1.11",
77
- "@prosekit/web": "^0.5.11"
81
+ "@prosekit/core": "^0.8.3",
82
+ "@prosekit/web": "^0.7.0"
78
83
  },
79
84
  "peerDependencies": {
80
85
  "svelte": ">= 5.0.0"
@@ -85,14 +90,14 @@
85
90
  }
86
91
  },
87
92
  "devDependencies": {
88
- "@sveltejs/package": "^2.3.11",
93
+ "@sveltejs/package": "^2.4.0",
89
94
  "@types/node": "^20.17.29",
90
95
  "read-pkg": "^9.0.1",
91
- "svelte": "^5.34.1",
92
- "svelte-check": "^4.2.1",
93
- "tsx": "^4.20.2",
96
+ "svelte": "^5.37.2",
97
+ "svelte-check": "^4.3.0",
98
+ "tsx": "^4.20.3",
94
99
  "typescript": "~5.8.3",
95
- "vitest": "^3.2.3",
100
+ "vitest": "^3.2.4",
96
101
  "@prosekit/config-vitest": "0.0.0"
97
102
  },
98
103
  "publishConfig": {
@@ -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
  ],