@solid-primitives/transition-group
Advanced tools
Comparing version 1.0.0 to 1.0.1
import { untrack, createSignal, useTransition, createComputed, batch, createMemo, $TRACK } from 'solid-js'; | ||
import { isServer } from 'solid-js/web'; | ||
@@ -10,2 +11,5 @@ // src/index.ts | ||
const initReturned = initSource ? [initSource] : []; | ||
if (isServer) { | ||
return () => initReturned; | ||
} | ||
const { onEnter = noopTransition, onExit = noopTransition } = options; | ||
@@ -70,2 +74,6 @@ const [returned, setReturned] = createSignal( | ||
const initSource = untrack(source); | ||
if (isServer) { | ||
const copy = initSource.slice(); | ||
return () => copy; | ||
} | ||
const { onChange } = options; | ||
@@ -72,0 +80,0 @@ let prevSet = new Set(options.appear ? void 0 : initSource); |
{ | ||
"name": "@solid-primitives/transition-group", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Reactive primitives for implementing transition effects in SolidJS", | ||
@@ -18,3 +18,3 @@ "author": "Damian Tarnawski <gthetarnav@gmail.com>", | ||
"name": "transition-group", | ||
"stage": 1, | ||
"stage": 2, | ||
"list": [ | ||
@@ -39,41 +39,26 @@ "createSwitchTransition", | ||
"type": "module", | ||
"main": "./dist/server.cjs", | ||
"module": "./dist/server.js", | ||
"browser": { | ||
"./dist/server.cjs": "./dist/index.cjs", | ||
"./dist/server.js": "./dist/index.js" | ||
}, | ||
"main": "./dist/index.cjs", | ||
"module": "./dist/index.js", | ||
"browser": {}, | ||
"types": "./dist/index.d.ts", | ||
"exports": { | ||
"worker": { | ||
"import": "./dist/server.js", | ||
"require": "./dist/server.cjs" | ||
"import": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.js" | ||
}, | ||
"browser": { | ||
"import": "./dist/index.js", | ||
"require": "./dist/index.cjs" | ||
}, | ||
"deno": { | ||
"import": "./dist/server.js", | ||
"require": "./dist/server.cjs" | ||
}, | ||
"node": { | ||
"import": "./dist/server.js", | ||
"require": "./dist/server.cjs" | ||
}, | ||
"import": "./dist/index.js", | ||
"require": "./dist/index.cjs" | ||
}, | ||
"peerDependencies": { | ||
"solid-js": "^1.6.0" | ||
"solid-js": "^1.6.12" | ||
}, | ||
"devDependencies": { | ||
"@solid-primitives/refs": "^1.0.0", | ||
"@solid-primitives/utils": "^5.4.0", | ||
"@solidjs/router": "^0.7.0" | ||
"@solid-primitives/refs": "^1.0.1", | ||
"@solid-primitives/utils": "^5.5.1", | ||
"@solidjs/router": "^0.8.0" | ||
}, | ||
"typesVersions": {}, | ||
"scripts": { | ||
"dev": "vite serve dev", | ||
"page": "vite build dev", | ||
"build": "jiti ../../scripts/build.ts --ssr", | ||
"build": "jiti ../../scripts/build.ts", | ||
"test": "vitest -c ../../configs/vitest.config.ts", | ||
@@ -80,0 +65,0 @@ "test:ssr": "pnpm run test --mode ssr" |
@@ -10,3 +10,3 @@ <p> | ||
[![version](https://img.shields.io/npm/v/@solid-primitives/transition-group?style=for-the-badge)](https://www.npmjs.com/package/@solid-primitives/transition-group) | ||
[![stage](https://img.shields.io/endpoint?style=for-the-badge&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-1.json)](https://github.com/solidjs-community/solid-primitives#contribution-process) | ||
[![stage](https://img.shields.io/endpoint?style=for-the-badge&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-2.json)](https://github.com/solidjs-community/solid-primitives#contribution-process) | ||
@@ -190,9 +190,10 @@ Provides reactive primitives for implementing transition effects on a group of elements, or your own `<Transition>` and `<TransitionGroup>` components. | ||
Deployed example: | ||
[Deployed example](https://solidjs-community.github.io/solid-primitives/transition-group) | [Source code](https://github.com/solidjs-community/solid-primitives/tree/main/packages/transition-group/dev) | ||
https://solidjs-community.github.io/solid-primitives/transition-group | ||
## Usage references | ||
Source code: | ||
Packages that use `@solid-primitives/transition-group`: | ||
https://github.com/solidjs-community/solid-primitives/tree/main/packages/transition-group/dev | ||
- [`solid-transition-group`](https://github.com/solidjs-community/solid-transition-group/tree/main/src) | ||
- [`motionone/solid`](https://github.com/motiondivision/motionone/tree/main/packages/solid/src) | ||
@@ -199,0 +200,0 @@ ## Changelog |
Sorry, the diff of this file is not supported yet
201
25235
6
389