@neodrag/solid
Advanced tools
+1
-1
@@ -10,3 +10,3 @@ import * as _neodrag_core from '@neodrag/core'; | ||
| declare const useDraggable: (element: Accessor<HTMLElement | SVGElement | null | undefined>, plugins?: Accessor<Plugin[]> | ReturnType<PluginResolver>) => Accessor<DragState>; | ||
| declare function createCompartment<T extends Plugin>(reactive: () => T): Compartment; | ||
| declare function createCompartment(reactive: ConstructorParameters<typeof Compartment>[0]): Compartment; | ||
@@ -13,0 +13,0 @@ declare const instances: Map<HTMLElement | SVGElement, _neodrag_core.DraggableInstance>; |
+2
-2
@@ -61,5 +61,5 @@ import { DraggableFactory, DEFAULTS } from '@neodrag/core'; | ||
| function createCompartment(reactive) { | ||
| const compartment = new Compartment(() => untrack(reactive)); | ||
| const compartment = new Compartment(reactive); | ||
| createRenderEffect(() => { | ||
| compartment.current = reactive(); | ||
| compartment.current = reactive?.(); | ||
| }); | ||
@@ -66,0 +66,0 @@ return compartment; |
+2
-2
| { | ||
| "name": "@neodrag/solid", | ||
| "version": "3.0.0-next.6", | ||
| "version": "3.0.0-next.7", | ||
| "description": "SolidJS library to add dragging to your apps 😉", | ||
@@ -41,3 +41,3 @@ "type": "module", | ||
| "solid-js": "^1.0.0", | ||
| "@neodrag/core": "3.0.0-next.6" | ||
| "@neodrag/core": "3.0.0-next.7" | ||
| }, | ||
@@ -44,0 +44,0 @@ "scripts": { |
8424
0.07%