@solid-primitives/idle
Advanced tools
Comparing version 0.0.104 to 0.0.105
import { createSignal, onMount, onCleanup, batch } from 'solid-js'; | ||
import { isServer } from 'solid-js/web'; | ||
@@ -28,2 +29,14 @@ // src/createIdleTimer.ts | ||
} = {}) => { | ||
if (isServer) { | ||
return { | ||
isIdle: () => false, | ||
isPrompted: () => false, | ||
reset: () => { | ||
}, | ||
start: () => { | ||
}, | ||
stop: () => { | ||
} | ||
}; | ||
} | ||
let listenersAreOn = false; | ||
@@ -30,0 +43,0 @@ const [isPrompted, setIsPrompted] = createSignal(false); |
{ | ||
"name": "@solid-primitives/idle", | ||
"version": "0.0.104", | ||
"version": "0.0.105", | ||
"description": "A primitive to observe the user's idle status and react to its changes.", | ||
@@ -30,52 +30,7 @@ "author": "Aylo Srd <aylo.srd@gmail.com>", | ||
"type": "module", | ||
"main": "./dist/server.cjs", | ||
"module": "./dist/server.js", | ||
"browser": { | ||
"./dist/server.js": "./dist/index.js", | ||
"./dist/server.cjs": "./dist/index.cjs" | ||
}, | ||
"main": "./dist/index.cjs", | ||
"module": "./dist/index.js", | ||
"browser": {}, | ||
"types": "./dist/index.d.ts", | ||
"exports": { | ||
"worker": { | ||
"import": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/server.js" | ||
}, | ||
"require": "./dist/server.cjs" | ||
}, | ||
"browser": { | ||
"development": { | ||
"import": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/dev.js" | ||
}, | ||
"require": "./dist/dev.cjs" | ||
}, | ||
"import": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.js" | ||
}, | ||
"require": "./dist/index.cjs" | ||
}, | ||
"deno": { | ||
"import": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/server.js" | ||
}, | ||
"require": "./dist/server.cjs" | ||
}, | ||
"node": { | ||
"import": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/server.js" | ||
}, | ||
"require": "./dist/server.cjs" | ||
}, | ||
"development": { | ||
"import": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/dev.js" | ||
}, | ||
"require": "./dist/dev.cjs" | ||
}, | ||
"import": { | ||
@@ -95,3 +50,3 @@ "types": "./dist/index.d.ts", | ||
"peerDependencies": { | ||
"solid-js": "^1.6.0" | ||
"solid-js": "^1.6.12" | ||
}, | ||
@@ -103,3 +58,3 @@ "typesVersions": {}, | ||
"page": "vite build dev", | ||
"build": "jiti ../../scripts/build.ts --ssr --dev", | ||
"build": "jiti ../../scripts/build.ts", | ||
"test": "vitest -c ../../configs/vitest.config.ts", | ||
@@ -106,0 +61,0 @@ "test:ssr": "pnpm run test --mode ssr" |
Sorry, the diff of this file is not supported yet
16969
6
322