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

@polymorphic-factory/solid

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polymorphic-factory/solid - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

12

dist/index.cjs.js

@@ -28,4 +28,6 @@ "use strict";

// src/polymorphic-factory.tsx
var import_web = require("solid-js/web");
var import_web2 = require("solid-js/web");
var import_solid_js = require("solid-js");
var import_web = require("solid-js/web");
var import_web3 = require("solid-js/web");
function defaultStyled(originalComponent) {

@@ -35,6 +37,10 @@ return (props) => {

const component = local.as || originalComponent;
return <import_web.Dynamic component={component} {...others} />;
return (0, import_web.createComponent)(import_web3.Dynamic, (0, import_web2.mergeProps)({
component
}, others));
};
}
function polymorphicFactory({ styled = defaultStyled } = {}) {
function polymorphicFactory({
styled = defaultStyled
} = {}) {
const cache = /* @__PURE__ */ new Map();

@@ -41,0 +47,0 @@ return new Proxy(styled, {

// src/polymorphic-factory.tsx
import { createComponent as _$createComponent } from "solid-js/web";
import { mergeProps as _$mergeProps } from "solid-js/web";
import { splitProps } from "solid-js";

@@ -8,6 +10,10 @@ import { Dynamic } from "solid-js/web";

const component = local.as || originalComponent;
return <Dynamic component={component} {...others} />;
return _$createComponent(Dynamic, _$mergeProps({
component
}, others));
};
}
function polymorphicFactory({ styled = defaultStyled } = {}) {
function polymorphicFactory({
styled = defaultStyled
} = {}) {
const cache = /* @__PURE__ */ new Map();

@@ -14,0 +20,0 @@ return new Proxy(styled, {

{
"name": "@polymorphic-factory/solid",
"version": "0.1.0",
"version": "0.1.1",
"description": "",

@@ -32,2 +32,4 @@ "keywords": [],

"clean-package": "2.1.2",
"esbuild": "0.15.14",
"esbuild-plugin-solid": "0.4.2",
"jsdom": "20.0.2",

@@ -38,3 +40,3 @@ "solid-js": "1.6.2",

"typescript": "4.8.4",
"vite": "3.2.3",
"vite": "3.2.4",
"vite-plugin-solid": "2.4.0",

@@ -41,0 +43,0 @@ "vitest": "0.25.1"

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