From 4ca54727f15bdcefe78f08e83efc207a45acd46e Mon Sep 17 00:00:00 2001 From: Miel Truyen Date: Sat, 21 Dec 2019 21:48:38 +0100 Subject: [PATCH] Fixed a bug relating to custom-elements's first vnode where render(){ return
} would set the example-class on the custom-element itself. Added support for className and style similar to react Cleaned up some comments Reworked how tests are built in order to add a new test "pdf" which was a small side-project where previous mentioned bug showed up, it's an example using HTML to create a PDF for printing --- .idea/codeStyles/Project.xml | 24 - .idea/webResources.xml | 1 + package.json | 21 +- .../babel-plugin-transform-csx/package.json | 1 + .../csx/src/custom-element/custom-element.js | 5 +- packages/csx/src/vdom/render.js | 144 +- packages/csx/src/vdom/renderers/nodetree.js | 81 +- {test => tests}/.babelrc | 0 {test => tests}/basic/index.html | 0 {test => tests}/basic/index.jsx | 0 {test => tests}/basic/index.scss | 0 {test => tests}/basic/page.jsx | 0 tests/cfg/.babelrc | 19 + tests/cfg/rollup-build.js | 166 ++ {test => tests}/index.html | 3 + {test => tests}/index.jsx | 0 tests/pdf/assets/fonts/DINPro-Black.otf | Bin 0 -> 144904 bytes tests/pdf/assets/fonts/DINPro-BlackItalic.otf | Bin 0 -> 133572 bytes tests/pdf/assets/fonts/DINPro-Bold.otf | Bin 0 -> 143848 bytes tests/pdf/assets/fonts/DINPro-BoldItalic.otf | Bin 0 -> 133200 bytes tests/pdf/assets/fonts/DINPro-Cond.otf | Bin 0 -> 127972 bytes tests/pdf/assets/fonts/DINPro-CondBlack.otf | Bin 0 -> 132196 bytes .../pdf/assets/fonts/DINPro-CondBlackIta.otf | Bin 0 -> 141868 bytes tests/pdf/assets/fonts/DINPro-CondBold.otf | Bin 0 -> 130296 bytes tests/pdf/assets/fonts/DINPro-CondBoldIta.otf | Bin 0 -> 140116 bytes tests/pdf/assets/fonts/DINPro-CondIta.otf | Bin 0 -> 140084 bytes tests/pdf/assets/fonts/DINPro-CondLight.otf | Bin 0 -> 126752 bytes .../pdf/assets/fonts/DINPro-CondLightIta.otf | Bin 0 -> 136800 bytes tests/pdf/assets/fonts/DINPro-CondMediIta.otf | Bin 0 -> 140284 bytes tests/pdf/assets/fonts/DINPro-CondMedium.otf | Bin 0 -> 130456 bytes tests/pdf/assets/fonts/DINPro-Italic.otf | Bin 0 -> 131004 bytes tests/pdf/assets/fonts/DINPro-Light.otf | Bin 0 -> 139220 bytes tests/pdf/assets/fonts/DINPro.otf | Bin 0 -> 139444 bytes tests/pdf/assets/logo.svg | 73 + tests/pdf/fonts.pcss | 106 + tests/pdf/index.html | 10 + tests/pdf/index.jsx | 88 + tests/pdf/index.pcss | 158 ++ tests/postcss.config.js | 9 + {test => tests}/svg/index.html | 0 {test => tests}/svg/index.jsx | 0 {test => tests}/svg/index.scss | 0 {test => tests}/svg/svg-loader.jsx | 0 {test => tests}/svg/svg-loader.shadow.scss | 0 {test => tests}/svg/svg-tester-two.jsx | 0 {test => tests}/svg/svg-tester.jsx | 0 .../todos-mvc/components/my-todo.jsx | 0 .../todos-mvc/components/my-todo.scss | 0 .../todos-mvc/components/todo-input.jsx | 0 .../todos-mvc/components/todo-input.scss | 0 .../todos-mvc/components/todo-item.jsx | 0 .../todos-mvc/components/todo-item.scss | 0 {test => tests}/todos-mvc/index.html | 0 {test => tests}/todos-mvc/index.jsx | 0 {test => tests}/todos-mvc/index.scss | 0 yarn.lock | 1869 ++++++++++++++--- 56 files changed, 2397 insertions(+), 381 deletions(-) rename {test => tests}/.babelrc (100%) rename {test => tests}/basic/index.html (100%) rename {test => tests}/basic/index.jsx (100%) rename {test => tests}/basic/index.scss (100%) rename {test => tests}/basic/page.jsx (100%) create mode 100644 tests/cfg/.babelrc create mode 100644 tests/cfg/rollup-build.js rename {test => tests}/index.html (91%) rename {test => tests}/index.jsx (100%) create mode 100644 tests/pdf/assets/fonts/DINPro-Black.otf create mode 100644 tests/pdf/assets/fonts/DINPro-BlackItalic.otf create mode 100644 tests/pdf/assets/fonts/DINPro-Bold.otf create mode 100644 tests/pdf/assets/fonts/DINPro-BoldItalic.otf create mode 100644 tests/pdf/assets/fonts/DINPro-Cond.otf create mode 100644 tests/pdf/assets/fonts/DINPro-CondBlack.otf create mode 100644 tests/pdf/assets/fonts/DINPro-CondBlackIta.otf create mode 100644 tests/pdf/assets/fonts/DINPro-CondBold.otf create mode 100644 tests/pdf/assets/fonts/DINPro-CondBoldIta.otf create mode 100644 tests/pdf/assets/fonts/DINPro-CondIta.otf create mode 100644 tests/pdf/assets/fonts/DINPro-CondLight.otf create mode 100644 tests/pdf/assets/fonts/DINPro-CondLightIta.otf create mode 100644 tests/pdf/assets/fonts/DINPro-CondMediIta.otf create mode 100644 tests/pdf/assets/fonts/DINPro-CondMedium.otf create mode 100644 tests/pdf/assets/fonts/DINPro-Italic.otf create mode 100644 tests/pdf/assets/fonts/DINPro-Light.otf create mode 100644 tests/pdf/assets/fonts/DINPro.otf create mode 100644 tests/pdf/assets/logo.svg create mode 100644 tests/pdf/fonts.pcss create mode 100644 tests/pdf/index.html create mode 100644 tests/pdf/index.jsx create mode 100644 tests/pdf/index.pcss create mode 100644 tests/postcss.config.js rename {test => tests}/svg/index.html (100%) rename {test => tests}/svg/index.jsx (100%) rename {test => tests}/svg/index.scss (100%) rename {test => tests}/svg/svg-loader.jsx (100%) rename {test => tests}/svg/svg-loader.shadow.scss (100%) rename {test => tests}/svg/svg-tester-two.jsx (100%) rename {test => tests}/svg/svg-tester.jsx (100%) rename {test => tests}/todos-mvc/components/my-todo.jsx (100%) rename {test => tests}/todos-mvc/components/my-todo.scss (100%) rename {test => tests}/todos-mvc/components/todo-input.jsx (100%) rename {test => tests}/todos-mvc/components/todo-input.scss (100%) rename {test => tests}/todos-mvc/components/todo-item.jsx (100%) rename {test => tests}/todos-mvc/components/todo-item.scss (100%) rename {test => tests}/todos-mvc/index.html (100%) rename {test => tests}/todos-mvc/index.jsx (100%) rename {test => tests}/todos-mvc/index.scss (100%) diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 49f7b87..3cdc6ae 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -24,29 +24,5 @@