Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@solid-primitives/props

Package Overview
Dependencies
Maintainers
3
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solid-primitives/props - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

2

dist/index.d.ts

@@ -0,3 +1,3 @@

import { JSX, MergeProps } from 'solid-js';
import { AnyObject } from '@solid-primitives/utils';
import { JSX, MergeProps } from 'solid-js';

@@ -4,0 +4,0 @@ declare const propTraps: ProxyHandler<{

@@ -128,30 +128,39 @@ import { $PROXY, createMemo, mergeProps } from 'solid-js';

}
return new Proxy(merge, {
get(target, key) {
if (typeof key !== "string")
return Reflect.get(target, key);
if (key === "style")
return reduce("style", combineStyle);
if (key === "ref") {
const callbacks = [];
for (const props of sources) {
const cb = props[key];
if (typeof cb === "function")
callbacks.push(cb);
return new Proxy(
{
get(key) {
if (typeof key !== "string")
return Reflect.get(merge, key);
if (key === "style")
return reduce("style", combineStyle);
if (key === "ref") {
const callbacks = [];
for (const props of sources) {
const cb = props[key];
if (typeof cb === "function")
callbacks.push(cb);
}
return chain(callbacks);
}
return chain(callbacks);
if (isEventListenerKey(key)) {
const callbacks = listeners[key.toLowerCase()];
return Array.isArray(callbacks) ? chain(callbacks) : Reflect.get(merge, key);
}
if (key === "class" || key === "className")
return reduce(key, (a, b) => `${a} ${b}`);
if (key === "classList")
return reduce(key, (a, b) => ({ ...a, ...b }));
return Reflect.get(merge, key);
},
has(key) {
return Reflect.has(merge, key);
},
keys() {
return Object.keys(merge);
}
if (isEventListenerKey(key)) {
const callbacks = listeners[key.toLowerCase()];
return Array.isArray(callbacks) ? chain(callbacks) : Reflect.get(target, key);
}
if (key === "class" || key === "className")
return reduce(key, (a, b) => `${a} ${b}`);
if (key === "classList")
return reduce(key, (a, b) => ({ ...a, ...b }));
return Reflect.get(target, key);
}
});
},
propTraps
);
}
export { combineProps, combineStyle, createPropsPredicate, filterProps, propTraps, stringStyleToObject };

@@ -128,30 +128,39 @@ import { $PROXY, createMemo, mergeProps } from 'solid-js';

}
return new Proxy(merge, {
get(target, key) {
if (typeof key !== "string")
return Reflect.get(target, key);
if (key === "style")
return reduce("style", combineStyle);
if (key === "ref") {
const callbacks = [];
for (const props of sources) {
const cb = props[key];
if (typeof cb === "function")
callbacks.push(cb);
return new Proxy(
{
get(key) {
if (typeof key !== "string")
return Reflect.get(merge, key);
if (key === "style")
return reduce("style", combineStyle);
if (key === "ref") {
const callbacks = [];
for (const props of sources) {
const cb = props[key];
if (typeof cb === "function")
callbacks.push(cb);
}
return chain(callbacks);
}
return chain(callbacks);
if (isEventListenerKey(key)) {
const callbacks = listeners[key.toLowerCase()];
return Array.isArray(callbacks) ? chain(callbacks) : Reflect.get(merge, key);
}
if (key === "class" || key === "className")
return reduce(key, (a, b) => `${a} ${b}`);
if (key === "classList")
return reduce(key, (a, b) => ({ ...a, ...b }));
return Reflect.get(merge, key);
},
has(key) {
return Reflect.has(merge, key);
},
keys() {
return Object.keys(merge);
}
if (isEventListenerKey(key)) {
const callbacks = listeners[key.toLowerCase()];
return Array.isArray(callbacks) ? chain(callbacks) : Reflect.get(target, key);
}
if (key === "class" || key === "className")
return reduce(key, (a, b) => `${a} ${b}`);
if (key === "classList")
return reduce(key, (a, b) => ({ ...a, ...b }));
return Reflect.get(target, key);
}
});
},
propTraps
);
}
export { combineProps, combineStyle, createPropsPredicate, filterProps, propTraps, stringStyleToObject };
{
"name": "@solid-primitives/props",
"version": "3.0.0",
"version": "3.0.1",
"description": "Library of primitives focused around component props.",

@@ -61,13 +61,13 @@ "author": "Damian Tarnawski <gthetarnav@gmail.com>",

"dependencies": {
"@solid-primitives/utils": "^3.1.0"
"@solid-primitives/utils": "^4.0.0"
},
"devDependencies": {
"nanospy": "^0.5.0",
"solid-js": "^1.5.0"
"solid-js": "^1.6.0"
},
"peerDependencies": {
"solid-js": "^1.5.0"
"solid-js": "^1.6.0"
},
"scripts": {
"dev": "npm run start",
"dev": "vite serve dev",
"build": "jiti ../../scripts/build.ts --ssr",

@@ -74,0 +74,0 @@ "test": "vitest -c ../../configs/vitest.config.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc