svelte-dnd-action 0.9.19 → 0.9.21
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/README.md +7 -5
- package/dist/index.js +229 -513
- package/dist/index.mjs +229 -513
- package/package.json +1 -1
- package/src/helpers/styler.js +3 -7
- package/src/pointerAction.js +4 -5
package/README.md
CHANGED
|
@@ -235,13 +235,15 @@ setDebugMode(true);
|
|
|
235
235
|
If you are using Typescript, you will need to add the following block to your `global.d.ts` (at least until [this svelte issue](https://github.com/sveltejs/language-tools/issues/431) is resolved):
|
|
236
236
|
|
|
237
237
|
```typescript
|
|
238
|
-
declare type
|
|
238
|
+
declare type Item = import('svelte-dnd-action').Item;
|
|
239
|
+
declare type DndEvent<ItemType = Item> = import('svelte-dnd-action').DndEvent<ItemType>;
|
|
239
240
|
declare namespace svelte.JSX {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
241
|
+
interface HTMLAttributes<T> {
|
|
242
|
+
onconsider?: (event: CustomEvent<DndEvent<ItemType>> & { target: EventTarget & T }) => void;
|
|
243
|
+
onfinalize?: (event: CustomEvent<DndEvent<ItemType>> & { target: EventTarget & T }) => void;
|
|
244
|
+
}
|
|
244
245
|
}
|
|
246
|
+
|
|
245
247
|
```
|
|
246
248
|
|
|
247
249
|
You may need to edit `tsconfig.json` to include `global.d.ts` if it doesn't already: "include": ["src/**/*", "global.d.ts"].
|