Comparing version 0.0.12 to 0.0.13
import { createRuntime } from 'babel-plugin-jsx-dom-expressions'; | ||
import S from 's-js'; | ||
import { unwrap, from } from 'solid-js'; | ||
@@ -20,18 +19,3 @@ function handleEvent(handler, id) { | ||
const r = createRuntime({ | ||
wrap(el, accessor, isAttr, fn, deep) { | ||
S.makeComputationNode(() => { | ||
let value = accessor(); | ||
if ((value != null) && value instanceof Object) { | ||
if ('then' in value || 'subscribe' in value) value = from(value); | ||
if (typeof value === 'function' && !isAttr && !deep) { | ||
r.wrap(el, value, isAttr, fn, true); | ||
return; | ||
} | ||
if (isAttr) value = unwrap(value); | ||
} | ||
S.sample(() => fn(el, value)); | ||
}); | ||
} | ||
}); | ||
const r = createRuntime({wrap: S.makeComputationNode}); | ||
@@ -38,0 +22,0 @@ let eventId = 0; |
@@ -9,3 +9,2 @@ 'use strict'; | ||
var S = _interopDefault(require('s-js')); | ||
var solidJs = require('solid-js'); | ||
@@ -27,18 +26,3 @@ function handleEvent(handler, id) { | ||
const r = babelPluginJsxDomExpressions.createRuntime({ | ||
wrap(el, accessor, isAttr, fn, deep) { | ||
S.makeComputationNode(() => { | ||
let value = accessor(); | ||
if ((value != null) && value instanceof Object) { | ||
if ('then' in value || 'subscribe' in value) value = solidJs.from(value); | ||
if (typeof value === 'function' && !isAttr && !deep) { | ||
r.wrap(el, value, isAttr, fn, true); | ||
return; | ||
} | ||
if (isAttr) value = solidJs.unwrap(value); | ||
} | ||
S.sample(() => fn(el, value)); | ||
}); | ||
} | ||
}); | ||
const r = babelPluginJsxDomExpressions.createRuntime({wrap: S.makeComputationNode}); | ||
@@ -45,0 +29,0 @@ let eventId = 0; |
{ | ||
"name": "solid-js", | ||
"description": "A declarative JavaScript library for building user interfaces.", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"author": "Ryan Carniato", | ||
@@ -22,3 +22,3 @@ "license": "MIT", | ||
"peerDependencies": { | ||
"babel-plugin-jsx-dom-expressions": "~0.0.25", | ||
"babel-plugin-jsx-dom-expressions": "~0.0.26", | ||
"s-js": "~0.4.9" | ||
@@ -25,0 +25,0 @@ }, |
@@ -14,3 +14,3 @@ # Solid.js | ||
* Easy interopt with existing libraries that manage services and state. | ||
* All Selectors and bindings when resolved to these automatically update asynchronously allowing for 100% pure data declarations. | ||
* All Selectors when resolved to these automatically update asynchronously allowing for 100% pure data declarations. | ||
* Async Functions are first class citizens and Selectors can be written using them. | ||
@@ -17,0 +17,0 @@ * Truly just a render library |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
90946
2013