@solid-primitives/utils 5.5.0 → 5.5.1
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.cjs +5 -2
- package/dist/index.d.ts +2 -5
- package/dist/index.js +4 -5
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -8,8 +8,7 @@ exports.noop = () => void 0;
|
|
|
8
8
|
exports.trueFn = () => true;
|
|
9
9
|
exports.falseFn = () => false;
|
|
10
10
|
exports.isClient = !web.isServer;
|
|
11
|
-
exports.
|
|
12
|
-
exports.isProd = !exports.isDev;
|
|
11
|
+
exports.isProd = !web.isDev;
|
|
13
12
|
exports.ofClass = (v, c) => v instanceof c || v && v.constructor === c;
|
|
14
13
|
function isObject(value) {
|
|
15
14
|
return value !== null && (typeof value === "object" || typeof value === "function");
|
|
@@ -181,6 +180,10 @@ function handleDiffArray(current, prev, handleAdded, handleRemoved) {
|
|
|
181
180
|
}
|
|
182
181
|
}
|
|
183
182
|
|
|
183
|
+
Object.defineProperty(exports, 'isDev', {
|
|
184
|
+
enumerable: true,
|
|
185
|
+
get: function () { return web.isDev; }
|
|
186
|
+
});
|
|
184
187
|
Object.defineProperty(exports, 'isServer', {
|
|
185
188
|
enumerable: true,
|
|
186
189
|
get: function () { return web.isServer; }
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Accessor, Setter, AccessorArray, NoInfer, EffectFunction, onCleanup, SignalOptions, createSignal } from 'solid-js';
|
|
2
|
-
export { isServer } from 'solid-js/web';
|
|
2
|
+
export { isDev, isServer } from 'solid-js/web';
|
|
3
3
|
export { EffectOptions, OnOptions, ResolvedChildren, ResolvedJSXElement } from 'solid-js/types/reactive/signal';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -90,9 +90,6 @@ declare const trueFn: () => boolean;
|
|
|
90
90
|
declare const falseFn: () => boolean;
|
|
91
91
|
|
|
92
92
|
declare const isClient: boolean;
|
|
93
|
-
/** development environment */
|
|
94
|
-
declare const isDev: boolean;
|
|
95
|
-
/** production environment */
|
|
96
93
|
declare const isProd: boolean;
|
|
97
94
|
/**
|
|
98
95
|
* Check if the value is an instance of ___
|
|
@@ -224,4 +221,4 @@ declare function createHydratableStaticStore<T extends Readonly<AnyStatic>>(serv
|
|
|
224
221
|
*/
|
|
225
222
|
declare function handleDiffArray<T>(current: readonly T[], prev: readonly T[], handleAdded: (item: T) => void, handleRemoved: (item: T) => void): void;
|
|
226
223
|
|
|
227
|
-
export { AccessReturnTypes, AnyClass, AnyFunction, AnyObject, AnyStatic, DeepPartialAny, Directive, ExtractIfPossible, Falsy, FalsyValue, ItemsOf, ItemsOfMany, Many, MaybeAccessor, MaybeAccessorValue, Modify, ModifyDeep, Narrow, NonIterable, Noop, OnAccessEffectFunction, Position, PrimitiveValue, RequiredKeys, SetterParam, Simplify, StaticStoreSetter, Tail, Truthy, UnboxLazy, UnionToIntersection, Values, access, accessArray, accessWith, arrayEquals, asAccessor, asArray, chain, clamp, compare, createCallbackStack, createHydratableSignal, createHydratableStaticStore, createHydrateSignal, createMicrotask, createStaticStore, defer, entries, falseFn, handleDiffArray, isClient,
|
|
224
|
+
export { AccessReturnTypes, AnyClass, AnyFunction, AnyObject, AnyStatic, DeepPartialAny, Directive, ExtractIfPossible, Falsy, FalsyValue, ItemsOf, ItemsOfMany, Many, MaybeAccessor, MaybeAccessorValue, Modify, ModifyDeep, Narrow, NonIterable, Noop, OnAccessEffectFunction, Position, PrimitiveValue, RequiredKeys, SetterParam, Simplify, StaticStoreSetter, Tail, Truthy, UnboxLazy, UnionToIntersection, Values, access, accessArray, accessWith, arrayEquals, asAccessor, asArray, chain, clamp, compare, createCallbackStack, createHydratableSignal, createHydratableStaticStore, createHydrateSignal, createMicrotask, createStaticStore, defer, entries, falseFn, handleDiffArray, isClient, isObject, isProd, keys, noop, ofClass, reverseChain, trueFn, tryOnCleanup, withAccess };
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isServer } from 'solid-js/web';
|
|
3
|
-
export { isServer } from 'solid-js/web';
|
|
1
|
+
import { untrack, getOwner, onCleanup, createSignal, sharedConfig, onMount, batch } from 'solid-js';
|
|
2
|
+
import { isServer, isDev } from 'solid-js/web';
|
|
3
|
+
export { isDev, isServer } from 'solid-js/web';
|
|
4
4
|
|
|
5
5
|
// src/index.ts
|
|
6
6
|
var noop = () => void 0;
|
|
7
7
|
var trueFn = () => true;
|
|
8
8
|
var falseFn = () => false;
|
|
9
9
|
var isClient = !isServer;
|
|
10
|
-
var isDev = DEV && isClient;
|
|
11
10
|
var isProd = !isDev;
|
|
12
11
|
var ofClass = (v, c) => v instanceof c || v && v.constructor === c;
|
|
13
12
|
function isObject(value) {
|
|
@@ -180,4 +179,4 @@ function handleDiffArray(current, prev, handleAdded, handleRemoved) {
|
|
|
180
179
|
}
|
|
181
180
|
}
|
|
182
181
|
|
|
183
|
-
export { access, accessArray, accessWith, arrayEquals, asAccessor, asArray, chain, clamp, compare, createCallbackStack, createHydratableSignal, createHydratableStaticStore, createHydrateSignal, createMicrotask, createStaticStore, defer, entries, falseFn, handleDiffArray, isClient,
|
|
182
|
+
export { access, accessArray, accessWith, arrayEquals, asAccessor, asArray, chain, clamp, compare, createCallbackStack, createHydratableSignal, createHydratableStaticStore, createHydrateSignal, createMicrotask, createStaticStore, defer, entries, falseFn, handleDiffArray, isClient, isObject, isProd, keys, noop, ofClass, reverseChain, trueFn, tryOnCleanup, withAccess };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solid-primitives/utils",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.1",
|
|
4
4
|
"description": "A bunch of reactive utility types and functions, for building primitives with Solid.js",
|
|
5
5
|
"author": "Damian Tarnawski @thetarnav <gthetarnav@gmail.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"primitives"
|
|
40
40
|
],
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"solid-js": "^1.6.
|
|
42
|
+
"solid-js": "^1.6.12"
|
|
43
43
|
},
|
|
44
44
|
"typesVersions": {},
|
|
45
45
|
"scripts": {
|