@dnd-kit/state 0.1.19 → 0.1.20-beta-20250611144002

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/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { ReadonlySignal } from '@preact/signals-core';
1
+ import { ReadonlySignal, effect } from '@preact/signals-core';
2
2
  export { ReadonlySignal, Signal, batch, effect, signal, untracked } from '@preact/signals-core';
3
3
 
4
4
  declare function computed<T>(compute: () => T, comparator?: (a: T, b: T) => boolean): ReadonlySignal<T>;
@@ -16,7 +16,7 @@ declare function derived<This, Return>(target: (this: This) => Return, _: ClassG
16
16
  declare function enumerable(enumerable?: boolean): (_value: unknown, context: ClassFieldDecoratorContext<any, any> | ClassGetterDecoratorContext<any, any> | ClassSetterDecoratorContext<any, any> | ClassAccessorDecoratorContext<any, any> | ClassMethodDecoratorContext<any, any>) => void;
17
17
 
18
18
  type CleanupFunction = () => void;
19
- type Effect = () => CleanupFunction | void;
19
+ type Effect = Parameters<typeof effect>[0];
20
20
 
21
21
  declare function effects(...entries: Effect[]): CleanupFunction;
22
22
 
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ReadonlySignal } from '@preact/signals-core';
1
+ import { ReadonlySignal, effect } from '@preact/signals-core';
2
2
  export { ReadonlySignal, Signal, batch, effect, signal, untracked } from '@preact/signals-core';
3
3
 
4
4
  declare function computed<T>(compute: () => T, comparator?: (a: T, b: T) => boolean): ReadonlySignal<T>;
@@ -16,7 +16,7 @@ declare function derived<This, Return>(target: (this: This) => Return, _: ClassG
16
16
  declare function enumerable(enumerable?: boolean): (_value: unknown, context: ClassFieldDecoratorContext<any, any> | ClassGetterDecoratorContext<any, any> | ClassSetterDecoratorContext<any, any> | ClassAccessorDecoratorContext<any, any> | ClassMethodDecoratorContext<any, any>) => void;
17
17
 
18
18
  type CleanupFunction = () => void;
19
- type Effect = () => CleanupFunction | void;
19
+ type Effect = Parameters<typeof effect>[0];
20
20
 
21
21
  declare function effects(...entries: Effect[]): CleanupFunction;
22
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnd-kit/state",
3
- "version": "0.1.19",
3
+ "version": "0.1.20-beta-20250611144002",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -17,7 +17,7 @@
17
17
  "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
18
18
  },
19
19
  "dependencies": {
20
- "@preact/signals-core": "^1.8.0",
20
+ "@preact/signals-core": "^1.10.0",
21
21
  "tslib": "^2.6.2"
22
22
  },
23
23
  "devDependencies": {