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

@solid-primitives/props

Package Overview
Dependencies
Maintainers
2
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 1.0.0 to 1.0.2

dist/index.cjs

39

dist/index.d.ts

@@ -1,5 +0,6 @@

import type { Accessor, Component, JSX, Setter } from "solid-js";
export declare type PropType = "boolean" | "number" | "string" | "object";
export declare type PropObjectOptions<T> = T[] | Record<string, T> | any;
export declare type PropOptions<T> = (T extends undefined ? {
import { Accessor, Setter, Component, JSX } from 'solid-js';
declare type PropType = "boolean" | "number" | "string" | "object";
declare type PropObjectOptions<T> = T[] | Record<string, T> | any;
declare type PropOptions<T> = (T extends undefined ? {
initialValue?: T;

@@ -14,4 +15,4 @@ } : {

};
export declare type PropReturn<T> = [value: Accessor<T>, setValue: Setter<T>, field: Component];
export declare type PropProps<T> = {
declare type PropReturn<T> = [value: Accessor<T>, setValue: Setter<T>, field: Component];
declare type PropProps<T> = {
name: string;

@@ -23,6 +24,6 @@ value: Accessor<T>;

};
export declare const BoolProp: Component<PropProps<boolean>>;
export declare const NumberProp: Component<PropProps<number>>;
export declare const StringProp: Component<PropProps<string>>;
export declare const SelectProp: <T extends unknown>(props: PropProps<T> & {
declare const BoolProp: Component<PropProps<boolean>>;
declare const NumberProp: Component<PropProps<number>>;
declare const StringProp: Component<PropProps<string>>;
declare const SelectProp: <T extends unknown>(props: PropProps<T> & {
options: any;

@@ -46,9 +47,9 @@ }) => JSX.Element;

*/
export declare function createProp<T extends undefined>(name: string, options?: PropOptions<T>): PropReturn<T>;
export declare function createProp<T = boolean>(name: string, options: PropOptions<T> | T): PropReturn<T>;
export declare function createProp<T = number>(name: string, options: PropOptions<T> | T): PropReturn<T>;
export declare function createProp<T = string>(name: string, options: PropOptions<T> | T): PropReturn<T>;
export declare function createProp<T = any>(name: string, options: PropOptions<T>): PropReturn<T>;
export declare function createProp<T>(name: string, options: T extends undefined ? never : T extends object ? PropOptions<T> : PropOptions<T> | T): PropReturn<T>;
export declare type CreateProps = <Props extends {
declare function createProp<T extends undefined>(name: string, options?: PropOptions<T>): PropReturn<T>;
declare function createProp<T = boolean>(name: string, options: PropOptions<T> | T): PropReturn<T>;
declare function createProp<T = number>(name: string, options: PropOptions<T> | T): PropReturn<T>;
declare function createProp<T = string>(name: string, options: PropOptions<T> | T): PropReturn<T>;
declare function createProp<T = any>(name: string, options: PropOptions<T>): PropReturn<T>;
declare function createProp<T>(name: string, options: T extends undefined ? never : T extends object ? PropOptions<T> : PropOptions<T> | T): PropReturn<T>;
declare type CreateProps = <Props extends {
[name: string]: boolean | number | string | PropOptions<boolean | number | string | object>;

@@ -90,2 +91,4 @@ }>(props: Props) => [

*/
export declare const createProps: CreateProps;
declare const createProps: CreateProps;
export { BoolProp, CreateProps, NumberProp, PropObjectOptions, PropOptions, PropProps, PropReturn, PropType, SelectProp, StringProp, createProp, createProps };
{
"name": "@solid-primitives/props",
"version": "1.0.0",
"version": "1.0.2",
"description": "Primitive that provides controllable props signals like knobs/controls",

@@ -8,20 +8,26 @@ "author": "Alex Lohr <alex.lohr@logmein.com>",

"homepage": "https://github.com/davedbase/solid-primitives/tree/main/packages/props",
"private": false,
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"repository": {
"type": "git",
"url": "git+https://github.com/davedbase/solid-primitives.git"
},
"primitive": {
"name": "props",
"stage": 3,
"list": [
"createProps"
],
"category": "Utilities"
},
"files": [
"dist"
],
"exports": {
"require": "./dist/cjs/index.js",
"import": "./dist/index.js",
"default": "./dist/index.js"
},
"sideEffects": "false",
"private": false,
"sideEffects": false,
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"prebuild": "npm run clean",
"clean": "rimraf dist/",
"build": "tsc && tsc --target es5 --module commonjs --declaration false --outDir ./dist/cjs",
"test": "jest"
"build": "tsup",
"test": "uvu -r solid-register"
},

@@ -36,23 +42,15 @@ "keywords": [

"devDependencies": {
"@babel/core": "7.14.8",
"@babel/preset-env": "7.14.8",
"@babel/preset-typescript": "7.14.5",
"@types/jest": "27.0.1",
"babel-preset-solid": "1.1.3",
"jest": "27.0.1",
"esbuild-plugin-solid": "^0.4.1",
"jsdom": "^18.1.0",
"prettier": "^2.0.5",
"solid-register": "^0.1.1",
"solid-testing-library": "^0.2.0",
"solid-jest": "0.2.0",
"tslib": "^2.3.1",
"typescript": "^4.4.3"
"tsup": "^5.10.1",
"typescript": "^4.4.3",
"uvu": "^0.5.2"
},
"dependencies": {
"solid-js": "^1.1.6"
},
"jest": {
"preset": "solid-jest/preset/browser",
"setupFiles": [
"./test/setup.ts"
]
"solid-js": "^1.2.5"
}
}

@@ -1,16 +0,17 @@

---
Name: props
Stage: 3
Package: "@solid-primitives/props"
Primitives: createProps
---
# @solid-primitives/props
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
[![size](https://img.shields.io/bundlephobia/minzip/@solid-primitives/props)](https://bundlephobia.com/package/@solid-primitives/props)
[![size](https://img.shields.io/npm/v/@solid-primitives/props)](https://www.npmjs.com/package/@solid-primitives/props)
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg?style=for-the-badge)](https://lerna.js.org/)
[![size](https://img.shields.io/bundlephobia/minzip/@solid-primitives/props?style=for-the-badge)](https://bundlephobia.com/package/@solid-primitives/props)
[![size](https://img.shields.io/npm/v/@solid-primitives/props?style=for-the-badge)](https://www.npmjs.com/package/@solid-primitives/props)
Creates a primitive to provide props signals for simple component testing
## Installation
```
npm install @solid-primitives/props
# or
yarn add @solid-primitives/props
```
## How to use it

@@ -88,3 +89,3 @@

1.0.0
1.0.2

@@ -91,0 +92,0 @@ Release initial version with CJS support.

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