isomorfeus-preact 10.5.3 → 10.5.7
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.
- checksums.yaml +4 -4
- data/lib/isomorfeus/preact/config.rb +5 -18
- data/lib/isomorfeus/preact/imports.rb +0 -3
- data/lib/isomorfeus/preact_view_helper.rb +19 -19
- data/lib/isomorfeus/props/validator.rb +1 -1
- data/lib/isomorfeus/top_level.rb +3 -6
- data/lib/isomorfeus-preact.rb +1 -1
- data/lib/preact/version.rb +1 -1
- data/lib/preact.rb +17 -7
- data/node_modules/.package-lock.json +3 -11
- data/node_modules/csstype/README.md +4 -6
- data/node_modules/csstype/index.d.ts +541 -598
- data/node_modules/csstype/index.js.flow +47 -12
- data/node_modules/csstype/package.json +28 -26
- data/package.json +2 -3
- metadata +20 -35
- data/node_modules/preact-deep-force-update/.babelrc +0 -8
- data/node_modules/preact-deep-force-update/.eslintrc +0 -66
- data/node_modules/preact-deep-force-update/.npmignore +0 -2
- data/node_modules/preact-deep-force-update/.travis.yml +0 -3
- data/node_modules/preact-deep-force-update/LICENSE +0 -21
- data/node_modules/preact-deep-force-update/README.md +0 -53
- data/node_modules/preact-deep-force-update/dist/deep-force-update.js +0 -36
- data/node_modules/preact-deep-force-update/dist/deep-force-update.js.map +0 -1
- data/node_modules/preact-deep-force-update/dist/deep-force-update.min.js +0 -2
- data/node_modules/preact-deep-force-update/dist/deep-force-update.min.js.map +0 -1
- data/node_modules/preact-deep-force-update/karma.conf.js +0 -32
- data/node_modules/preact-deep-force-update/package.json +0 -80
- data/node_modules/preact-deep-force-update/rollup.config.js +0 -17
- data/node_modules/preact-deep-force-update/src/index.js +0 -27
- data/node_modules/preact-deep-force-update/test/index.js +0 -50
@@ -1,66 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"parser": "babel-eslint",
|
3
|
-
"extends": "eslint:recommended",
|
4
|
-
"plugins": [
|
5
|
-
"react"
|
6
|
-
],
|
7
|
-
"env": {
|
8
|
-
"browser": true,
|
9
|
-
"mocha": true,
|
10
|
-
"es6": true,
|
11
|
-
"node": true
|
12
|
-
},
|
13
|
-
"parserOptions": {
|
14
|
-
"ecmaFeatures": {
|
15
|
-
"modules": true,
|
16
|
-
"jsx": true
|
17
|
-
}
|
18
|
-
},
|
19
|
-
"globals": {
|
20
|
-
"sinon": true,
|
21
|
-
"expect": true
|
22
|
-
},
|
23
|
-
"rules": {
|
24
|
-
"react/jsx-uses-react": 2,
|
25
|
-
"react/jsx-uses-vars": 2,
|
26
|
-
"no-unused-vars": [1, { "varsIgnorePattern": "^h$" }],
|
27
|
-
"no-cond-assign": 1,
|
28
|
-
"no-empty": 0,
|
29
|
-
"no-console": 1,
|
30
|
-
"semi": 2,
|
31
|
-
"camelcase": 0,
|
32
|
-
"comma-style": 2,
|
33
|
-
"comma-dangle": [2, "never"],
|
34
|
-
"indent": [2, "tab", {"SwitchCase": 1}],
|
35
|
-
"no-mixed-spaces-and-tabs": [2, "smart-tabs"],
|
36
|
-
"no-trailing-spaces": [2, { "skipBlankLines": true }],
|
37
|
-
"max-nested-callbacks": [2, 5],
|
38
|
-
"no-eval": 2,
|
39
|
-
"no-implied-eval": 2,
|
40
|
-
"no-new-func": 2,
|
41
|
-
"guard-for-in": 2,
|
42
|
-
"eqeqeq": 0,
|
43
|
-
"no-else-return": 2,
|
44
|
-
"no-redeclare": 2,
|
45
|
-
"no-dupe-keys": 2,
|
46
|
-
"radix": 2,
|
47
|
-
"strict": [2, "never"],
|
48
|
-
"no-shadow": 0,
|
49
|
-
"callback-return": [1, ["callback", "cb", "next", "done"]],
|
50
|
-
"no-delete-var": 2,
|
51
|
-
"no-undef-init": 2,
|
52
|
-
"no-shadow-restricted-names": 2,
|
53
|
-
"handle-callback-err": 0,
|
54
|
-
"no-lonely-if": 2,
|
55
|
-
"keyword-spacing": 2,
|
56
|
-
"constructor-super": 2,
|
57
|
-
"no-this-before-super": 2,
|
58
|
-
"no-dupe-class-members": 2,
|
59
|
-
"no-const-assign": 2,
|
60
|
-
"prefer-spread": 2,
|
61
|
-
"no-useless-concat": 2,
|
62
|
-
"no-var": 2,
|
63
|
-
"object-shorthand": 2,
|
64
|
-
"prefer-arrow-callback": 2
|
65
|
-
}
|
66
|
-
}
|
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2016 Jason Miller
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
@@ -1,53 +0,0 @@
|
|
1
|
-
# preact-deep-force-update
|
2
|
-
|
3
|
-
[](https://www.npmjs.com/package/preact-deep-force-update)
|
4
|
-
[](https://travis-ci.org/developit/preact-deep-force-update)
|
5
|
-
|
6
|
-
Recursively invoke forceUpdate() on a tree of components.
|
7
|
-
|
8
|
-
#### [JSFiddle Example](https://jsfiddle.net/developit/642ctu04/)
|
9
|
-
|
10
|
-
|
11
|
-
---
|
12
|
-
|
13
|
-
|
14
|
-
### Usage Example
|
15
|
-
|
16
|
-
```js
|
17
|
-
import { h, Component, render } from 'preact';
|
18
|
-
import deepForceUpdate from 'preact-deep-force-update';
|
19
|
-
|
20
|
-
class Main extends Component {
|
21
|
-
render() {
|
22
|
-
return <div><Inner /></div>;
|
23
|
-
}
|
24
|
-
}
|
25
|
-
|
26
|
-
class Inner extends Component {
|
27
|
-
render() {
|
28
|
-
let time = new Date().toTimeString();
|
29
|
-
return <span>{time}</span>;
|
30
|
-
}
|
31
|
-
}
|
32
|
-
|
33
|
-
let main;
|
34
|
-
render(<Main ref={c => main=c } />, document.body);
|
35
|
-
|
36
|
-
// force an update to the whole tree:
|
37
|
-
deepForceUpdate(main);
|
38
|
-
|
39
|
-
// you can also pass an Element:
|
40
|
-
deepForceUpdate(document.body.firstChild);
|
41
|
-
```
|
42
|
-
|
43
|
-
|
44
|
-
---
|
45
|
-
|
46
|
-
|
47
|
-
### License
|
48
|
-
|
49
|
-
[MIT]
|
50
|
-
|
51
|
-
|
52
|
-
[Preact]: https://github.com/developit/preact
|
53
|
-
[MIT]: http://choosealicense.com/licenses/mit/
|
@@ -1,36 +0,0 @@
|
|
1
|
-
(function (global, factory) {
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
3
|
-
typeof define === 'function' && define.amd ? define(factory) :
|
4
|
-
(global.preactDeepForceUpdate = factory());
|
5
|
-
}(this, function () {
|
6
|
-
|
7
|
-
/** Invoke `.forceUpdate()` on a component and all descendants. */
|
8
|
-
function deepForceUpdate(component) {
|
9
|
-
if (component.forceUpdate) {
|
10
|
-
component.forceUpdate();
|
11
|
-
}
|
12
|
-
|
13
|
-
// high-order child recursion
|
14
|
-
if (component._component) {
|
15
|
-
deepForceUpdate(component._component);
|
16
|
-
} else if (component.base) {
|
17
|
-
updateComponentsFromDom(component.base);
|
18
|
-
}
|
19
|
-
}
|
20
|
-
|
21
|
-
function updateComponentsFromDom(node, fn) {
|
22
|
-
var children = node.childNodes;
|
23
|
-
for (var i = children && children.length; i--;) {
|
24
|
-
var child = children[i];
|
25
|
-
if (child._component) {
|
26
|
-
deepForceUpdate(child._component);
|
27
|
-
} else {
|
28
|
-
updateComponentsFromDom(child, fn);
|
29
|
-
}
|
30
|
-
}
|
31
|
-
}
|
32
|
-
|
33
|
-
return deepForceUpdate;
|
34
|
-
|
35
|
-
}));
|
36
|
-
//# sourceMappingURL=deep-force-update.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":null,"sources":["../src/index.js"],"sourcesContent":["/** Invoke `.forceUpdate()` on a component and all descendants. */\nexport default function deepForceUpdate(component) {\n\tif (component.forceUpdate) {\n\t\tcomponent.forceUpdate();\n\t}\n\n\t// high-order child recursion\n\tif (component._component) {\n\t\tdeepForceUpdate(component._component);\n\t}\n\telse if (component.base) {\n\t\tupdateComponentsFromDom(component.base);\n\t}\n}\n\nfunction updateComponentsFromDom(node, fn) {\n\tlet children = node.childNodes;\n\tfor (let i=children && children.length; i--; ) {\n\t\tlet child = children[i];\n\t\tif (child._component) {\n\t\t\tdeepForceUpdate(child._component);\n\t\t}\n\t\telse {\n\t\t\tupdateComponentsFromDom(child, fn);\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;;;;;CAAA;AACA,AAAe,CAAA,SAAS,eAAT,CAAyB,SAAzB,EAAoC;AAClD,CAAA,KAAI,UAAU,WAAd,EAA2B;AAC1B,CAAA,YAAU,WAAV;AACA,CAAA;;AAED,CAAA;AACA,CAAA,KAAI,UAAU,UAAd,EAA0B;AACzB,CAAA,kBAAgB,UAAU,UAA1B;AACA,CAAA,EAFD,MAGK,IAAI,UAAU,IAAd,EAAoB;AACxB,CAAA,0BAAwB,UAAU,IAAlC;AACA,CAAA;AACD,CAAA;;AAED,CAAA,SAAS,uBAAT,CAAiC,IAAjC,EAAuC,EAAvC,EAA2C;AAC1C,CAAA,KAAI,WAAW,KAAK,UAApB;AACA,CAAA,MAAK,IAAI,IAAE,YAAY,SAAS,MAAhC,EAAwC,GAAxC,GAA+C;AAC9C,CAAA,MAAI,QAAQ,SAAS,CAAT,CAAZ;AACA,CAAA,MAAI,MAAM,UAAV,EAAsB;AACrB,CAAA,mBAAgB,MAAM,UAAtB;AACA,CAAA,GAFD,MAGK;AACJ,CAAA,2BAAwB,KAAxB,EAA+B,EAA/B;AACA,CAAA;AACD,CAAA;AACD,CAAA;;;;"}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):e.preactDeepForceUpdate=o()}(this,function(){function e(n){n.forceUpdate&&n.forceUpdate(),n._component?e(n._component):n.base&&o(n.base)}function o(n,t){for(var c=n.childNodes,f=c&&c.length;f--;){var p=c[f];p._component?e(p._component):o(p,t)}}return e});
|
2
|
-
//# sourceMappingURL=deep-force-update.min.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":["deepForceUpdate","component","forceUpdate","_component","base","updateComponentsFromDom","node","fn","children","childNodes","i","length","child"],"mappings":"oLACe,QAASA,GAAgBC,GACnCA,EAAUC,aACbD,EAAUC,cAIPD,EAAUE,WACbH,EAAgBC,EAAUE,YAElBF,EAAUG,MAClBC,EAAwBJ,EAAUG,MAIpC,QAASC,GAAwBC,EAAMC,GAEtC,IAAK,GADDC,GAAWF,EAAKG,WACXC,EAAEF,GAAYA,EAASG,OAAQD,KAAO,CAC9C,GAAIE,GAAQJ,EAASE,EACjBE,GAAMT,WACTH,EAAgBY,EAAMT,YAGtBE,EAAwBO,EAAOL","file":"deep-force-update.min.js"}
|
@@ -1,32 +0,0 @@
|
|
1
|
-
module.exports = function(config) {
|
2
|
-
config.set({
|
3
|
-
frameworks: ['mocha', 'chai-sinon'],
|
4
|
-
reporters: ['mocha'],
|
5
|
-
browsers: ['PhantomJS'],
|
6
|
-
|
7
|
-
files: ['test/**/*.js'],
|
8
|
-
|
9
|
-
preprocessors: {
|
10
|
-
'{src,test}/**/*.js': ['webpack', 'sourcemap']
|
11
|
-
},
|
12
|
-
|
13
|
-
webpack: {
|
14
|
-
module: {
|
15
|
-
loaders: [{
|
16
|
-
test: /\.jsx?$/,
|
17
|
-
exclude: /node_modules/,
|
18
|
-
loader: 'babel'
|
19
|
-
}]
|
20
|
-
},
|
21
|
-
resolve: {
|
22
|
-
alias: {
|
23
|
-
src: __dirname+'/src'
|
24
|
-
}
|
25
|
-
}
|
26
|
-
},
|
27
|
-
|
28
|
-
webpackMiddleware: {
|
29
|
-
noInfo: true
|
30
|
-
}
|
31
|
-
});
|
32
|
-
};
|
@@ -1,80 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "preact-deep-force-update",
|
3
|
-
"amdName": "preactDeepForceUpdate",
|
4
|
-
"version": "0.1.0",
|
5
|
-
"description": "Recursively invoke forceUpdate() on a tree of components.",
|
6
|
-
"main": "dist/deep-force-update.js",
|
7
|
-
"jsnext:main": "src/index.js",
|
8
|
-
"minified:main": "dist/deep-force-update.min.js",
|
9
|
-
"scripts": {
|
10
|
-
"clean": "rimraf dist/",
|
11
|
-
"build": "npm-run-all clean transpile minify size",
|
12
|
-
"transpile": "rollup -c rollup.config.js -m ${npm_package_main}.map -f umd -n $npm_package_amdName $npm_package_jsnext_main -o $npm_package_main",
|
13
|
-
"minify": "uglifyjs $npm_package_main -cm -o $npm_package_minified_main -p relative --in-source-map ${npm_package_main}.map --source-map ${npm_package_minified_main}.map",
|
14
|
-
"size": "size=$(gzip-size $npm_package_minified_main) && echo \"gzip size: $size / $(pretty-bytes $size)\"",
|
15
|
-
"test": "npm-run-all lint build test:karma",
|
16
|
-
"lint": "eslint {src,test}",
|
17
|
-
"test:karma": "karma start --single-run",
|
18
|
-
"test:watch": "karma start",
|
19
|
-
"prepublish": "npm-run-all build test",
|
20
|
-
"release": "npm run build && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"
|
21
|
-
},
|
22
|
-
"keywords": [
|
23
|
-
"preact",
|
24
|
-
"update",
|
25
|
-
"force"
|
26
|
-
],
|
27
|
-
"author": "Jason Miller <jason@developit.ca>",
|
28
|
-
"license": "MIT",
|
29
|
-
"repository": {
|
30
|
-
"type": "git",
|
31
|
-
"url": "https://github.com/developit/preact-deep-force-update.git"
|
32
|
-
},
|
33
|
-
"bugs": {
|
34
|
-
"url": "https://github.com/developit/preact-deep-force-update/issues"
|
35
|
-
},
|
36
|
-
"homepage": "https://github.com/developit/preact-deep-force-update",
|
37
|
-
"peerDependencies": {
|
38
|
-
"preact": "*"
|
39
|
-
},
|
40
|
-
"devDependencies": {
|
41
|
-
"babel-cli": "^6.9.0",
|
42
|
-
"babel-core": "^6.9.1",
|
43
|
-
"babel-eslint": "^6.0.4",
|
44
|
-
"babel-loader": "^6.2.4",
|
45
|
-
"babel-plugin-transform-class-properties": "^6.9.1",
|
46
|
-
"babel-plugin-transform-es2015-classes": "^6.9.0",
|
47
|
-
"babel-plugin-transform-react-jsx": "^6.8.0",
|
48
|
-
"babel-preset-es2015": "^6.9.0",
|
49
|
-
"babel-preset-es2015-minimal": "^2.0.0",
|
50
|
-
"babel-preset-es2015-minimal-rollup": "^2.0.0",
|
51
|
-
"babel-preset-react": "^6.5.0",
|
52
|
-
"babel-preset-stage-0": "^6.5.0",
|
53
|
-
"chai": "^3.5.0",
|
54
|
-
"diff": "^2.2.3",
|
55
|
-
"eslint": "^3.0.0",
|
56
|
-
"eslint-plugin-react": "^5.1.1",
|
57
|
-
"gzip-size-cli": "^1.0.0",
|
58
|
-
"karma": "^1.0.0",
|
59
|
-
"karma-chai-sinon": "^0.1.5",
|
60
|
-
"karma-mocha": "^1.0.1",
|
61
|
-
"karma-mocha-reporter": "^2.0.3",
|
62
|
-
"karma-phantomjs-launcher": "^1.0.0",
|
63
|
-
"karma-sourcemap-loader": "^0.3.7",
|
64
|
-
"karma-webpack": "^1.7.0",
|
65
|
-
"mkdirp": "^0.5.1",
|
66
|
-
"mocha": "^2.5.0",
|
67
|
-
"npm-run-all": "^2.0.0",
|
68
|
-
"phantomjs-prebuilt": "^2.1.7",
|
69
|
-
"preact": "^5.3.1",
|
70
|
-
"pretty-bytes-cli": "^1.0.0",
|
71
|
-
"rimraf": "^2.5.1",
|
72
|
-
"rollup": "^0.34.1",
|
73
|
-
"rollup-plugin-babel": "^2.4.0",
|
74
|
-
"rollup-plugin-memory": "^1.0.0",
|
75
|
-
"sinon": "^1.17.4",
|
76
|
-
"sinon-chai": "^2.8.0",
|
77
|
-
"uglify-js": "^2.6.1",
|
78
|
-
"webpack": "^1.13.1"
|
79
|
-
}
|
80
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import fs from 'fs';
|
2
|
-
import babel from 'rollup-plugin-babel';
|
3
|
-
|
4
|
-
var babelRc = JSON.parse(fs.readFileSync('.babelrc','utf8')); // eslint-disable-line
|
5
|
-
|
6
|
-
export default {
|
7
|
-
exports: 'default',
|
8
|
-
useStrict: false,
|
9
|
-
plugins: [
|
10
|
-
babel({
|
11
|
-
babelrc: false,
|
12
|
-
presets: ['es2015-minimal-rollup'].concat(babelRc.presets.slice(1)),
|
13
|
-
plugins: babelRc.plugins,
|
14
|
-
exclude: 'node_modules/**'
|
15
|
-
})
|
16
|
-
]
|
17
|
-
};
|
@@ -1,27 +0,0 @@
|
|
1
|
-
/** Invoke `.forceUpdate()` on a component and all descendants. */
|
2
|
-
export default function deepForceUpdate(component) {
|
3
|
-
if (component.forceUpdate) {
|
4
|
-
component.forceUpdate();
|
5
|
-
}
|
6
|
-
|
7
|
-
// high-order child recursion
|
8
|
-
if (component._component) {
|
9
|
-
deepForceUpdate(component._component);
|
10
|
-
}
|
11
|
-
else if (component.base) {
|
12
|
-
updateComponentsFromDom(component.base);
|
13
|
-
}
|
14
|
-
}
|
15
|
-
|
16
|
-
function updateComponentsFromDom(node, fn) {
|
17
|
-
let children = node.childNodes;
|
18
|
-
for (let i=children && children.length; i--; ) {
|
19
|
-
let child = children[i];
|
20
|
-
if (child._component) {
|
21
|
-
deepForceUpdate(child._component);
|
22
|
-
}
|
23
|
-
else {
|
24
|
-
updateComponentsFromDom(child, fn);
|
25
|
-
}
|
26
|
-
}
|
27
|
-
}
|
@@ -1,50 +0,0 @@
|
|
1
|
-
import { h, Component, render } from 'preact';
|
2
|
-
import deepForceUpdate from 'src';
|
3
|
-
|
4
|
-
describe('deepForceUpdate', () => {
|
5
|
-
let scratch = document.createElement('div');
|
6
|
-
|
7
|
-
before( () => document.body.appendChild(scratch) );
|
8
|
-
afterEach( () => scratch.innerHTML = '' );
|
9
|
-
after( () => document.body.removeChild(scratch) );
|
10
|
-
|
11
|
-
it('should force updates', () => {
|
12
|
-
let renders = {
|
13
|
-
outer: 0,
|
14
|
-
inner: 0
|
15
|
-
};
|
16
|
-
|
17
|
-
class Outer extends Component {
|
18
|
-
render() {
|
19
|
-
renders.outer++;
|
20
|
-
return <div><Inner /></div>;
|
21
|
-
}
|
22
|
-
}
|
23
|
-
|
24
|
-
class Inner extends Component {
|
25
|
-
render() {
|
26
|
-
renders.inner++;
|
27
|
-
let time = new Date().toTimeString();
|
28
|
-
return <span>{time}</span>;
|
29
|
-
}
|
30
|
-
}
|
31
|
-
|
32
|
-
let outer;
|
33
|
-
let root = render(<Outer ref={c => outer=c } />, scratch);
|
34
|
-
|
35
|
-
expect(renders).to.have.property('outer', 1);
|
36
|
-
expect(renders).to.have.property('inner', 1);
|
37
|
-
|
38
|
-
// force an update to the whole tree:
|
39
|
-
deepForceUpdate(outer);
|
40
|
-
|
41
|
-
expect(renders).to.have.property('outer', 2);
|
42
|
-
expect(renders).to.have.property('inner', 3);
|
43
|
-
|
44
|
-
// you can also pass an Element:
|
45
|
-
deepForceUpdate(root);
|
46
|
-
|
47
|
-
expect(renders).to.have.property('outer', 3);
|
48
|
-
expect(renders).to.have.property('inner', 5);
|
49
|
-
});
|
50
|
-
});
|