From ab4cb3b6d90f3172b363072ede44a7caac37eb82 Mon Sep 17 00:00:00 2001 From: Damir Date: Mon, 24 Oct 2022 04:07:34 +0200 Subject: [PATCH] Upgrade version --- changelog.md | 5 + docs/demo.html | 8 +- docs/docs.html | 8 +- docs/index.html | 15 +- docs/test.html | 277 ++++++++++++++++++++++++++++--- examples/dist/demo.html | 8 +- examples/dist/docs.html | 8 +- examples/dist/index.html | 15 +- examples/dist/test.html | 277 ++++++++++++++++++++++++++++--- examples/src/layouts/header.html | 6 +- examples/src/layouts/html.html | 2 +- examples/src/pages/index.html | 5 +- examples/src/pages/test.html | 62 +++++-- package.json | 2 +- 14 files changed, 585 insertions(+), 113 deletions(-) diff --git a/changelog.md b/changelog.md index aca63b1..554fc27 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,8 @@ +## 1.0.0-beta.5 (2022-10-24) + +* 100% coverage test +* Fix components with same slot name in the same node + ## 1.0.0-beta.4 (2022-10-23) * Refactor with underscore.js diff --git a/docs/demo.html b/docs/demo.html index df842dd..d650180 100644 --- a/docs/demo.html +++ b/docs/demo.html @@ -3,7 +3,7 @@ - PostHTML UI + PostHTML X Components + + +
+
+
+ <x-components/> + +
+ NPM + GitHub +
+
+
+
+
+
+
+
+

Demo

+
+
+

anObjectDefault

+

+ first + : First default item +

+

+ second + : Second default item +

+

anObjectOverride

+

+ third + : Third override item +

+

+ fourth + : Fourth override item +

+

anObjectMerged

+

+ first + : First merged item +

+

+ second + : Second merged item +

+

+ anObjectMerged1 + : {"first":"First1 merged item","second":"Second1 merged item","anObjectMerged2":{"first":"First2 merged item","second":"Second2 merged item"},"third":"Third merged item (UPDATED?)","fourth1":"Fourth merged item"} +

+

+ third + : Third merged item +

+

+ fourth + : Fourth merged item +

+

aStringDefault

+

My default string

+

aStringOverride

+

My override string changed

+
+

post

+ My post title My post body +

+ 1 + : My comment 1 +

+

+ 2 + : My comment 2 +

+

+ 1 + : My comment 1 new +

+

+ 3 + : My comment 3 +

+

anArrayOfObjects

+

+ 0 + : {"id":1,"title":"My default title 1"} +

+

+ 1 + : {"id":2,"title":"My default title 2"} +

+

+ 2 + : {"id":1,"title":"My new title 1"} +

+

+ 3 + : {"id":2,"title":"My new title 2","somethingnew":"New"} +

+

anArray

+

+ 0 + : first +

+

+ 1 + : second +

+

+ 2 + : first +

+

+ 3 + : third +

+

+ 4 + : fourth +

+

+ 5 + : ten +

+
+

aComputed

+

Yes

+ My filled slot + Hello +
+
+
+
+

Parent

+
YIELD PARENT IN CHILD-PARENT.html
+ Test SLOT PARENT INSIDE CHILD-PARENT.html -
-
-

Child

-
YIELD CHILD INSIDE CHILD-PARENT.html
- SLOT CHILD INSIDE CHILD-PARENT.html -
-
-

Parent

-
YIELD PARENT IN TEST.html
- undefined - - +
+
+

Child

+
YIELD CHILD INSIDE CHILD-PARENT.html
+ SLOT CHILD INSIDE CHILD-PARENT.html +
+
+

Parent

+
YIELD PARENT IN TEST.html
+ undefined + + - SLOT PARENT INSIDE TEST.html -
-
-

Child

-
YIELD CHILD INSIDE TEST.html
- SLOT CHILD INSIDE TEST.html -
+ SLOT PARENT INSIDE TEST.html +
+
+

Child

+
YIELD CHILD INSIDE TEST.html
+ SLOT CHILD INSIDE TEST.html +
+
+
+ +
+ + + + + + diff --git a/examples/dist/demo.html b/examples/dist/demo.html index df842dd..d650180 100644 --- a/examples/dist/demo.html +++ b/examples/dist/demo.html @@ -3,7 +3,7 @@ - PostHTML UI + PostHTML X Components + + +
+
+
+ <x-components/> + +
+ NPM + GitHub +
+
+
+
+
+
+
+
+

Demo

+
+
+

anObjectDefault

+

+ first + : First default item +

+

+ second + : Second default item +

+

anObjectOverride

+

+ third + : Third override item +

+

+ fourth + : Fourth override item +

+

anObjectMerged

+

+ first + : First merged item +

+

+ second + : Second merged item +

+

+ anObjectMerged1 + : {"first":"First1 merged item","second":"Second1 merged item","anObjectMerged2":{"first":"First2 merged item","second":"Second2 merged item"},"third":"Third merged item (UPDATED?)","fourth1":"Fourth merged item"} +

+

+ third + : Third merged item +

+

+ fourth + : Fourth merged item +

+

aStringDefault

+

My default string

+

aStringOverride

+

My override string changed

+
+

post

+ My post title My post body +

+ 1 + : My comment 1 +

+

+ 2 + : My comment 2 +

+

+ 1 + : My comment 1 new +

+

+ 3 + : My comment 3 +

+

anArrayOfObjects

+

+ 0 + : {"id":1,"title":"My default title 1"} +

+

+ 1 + : {"id":2,"title":"My default title 2"} +

+

+ 2 + : {"id":1,"title":"My new title 1"} +

+

+ 3 + : {"id":2,"title":"My new title 2","somethingnew":"New"} +

+

anArray

+

+ 0 + : first +

+

+ 1 + : second +

+

+ 2 + : first +

+

+ 3 + : third +

+

+ 4 + : fourth +

+

+ 5 + : ten +

+
+

aComputed

+

Yes

+ My filled slot + Hello +
+
+
+
+

Parent

+
YIELD PARENT IN CHILD-PARENT.html
+ Test SLOT PARENT INSIDE CHILD-PARENT.html -
-
-

Child

-
YIELD CHILD INSIDE CHILD-PARENT.html
- SLOT CHILD INSIDE CHILD-PARENT.html -
-
-

Parent

-
YIELD PARENT IN TEST.html
- undefined - - +
+
+

Child

+
YIELD CHILD INSIDE CHILD-PARENT.html
+ SLOT CHILD INSIDE CHILD-PARENT.html +
+
+

Parent

+
YIELD PARENT IN TEST.html
+ undefined + + - SLOT PARENT INSIDE TEST.html -
-
-

Child

-
YIELD CHILD INSIDE TEST.html
- SLOT CHILD INSIDE TEST.html -
+ SLOT PARENT INSIDE TEST.html +
+
+

Child

+
YIELD CHILD INSIDE TEST.html
+ SLOT CHILD INSIDE TEST.html +
+
+
+ +
+ + + + + + diff --git a/examples/src/layouts/header.html b/examples/src/layouts/header.html index 46b87ba..92adc88 100644 --- a/examples/src/layouts/header.html +++ b/examples/src/layouts/header.html @@ -1,10 +1,8 @@
- - - - + + <x-components/> diff --git a/examples/src/layouts/html.html b/examples/src/layouts/html.html index 986d6e0..9b0772d 100644 --- a/examples/src/layouts/html.html +++ b/examples/src/layouts/html.html @@ -3,7 +3,7 @@ - PostHTML UI + PostHTML X Components diff --git a/examples/src/pages/index.html b/examples/src/pages/index.html index f1ecb8b..99a187e 100644 --- a/examples/src/pages/index.html +++ b/examples/src/pages/index.html @@ -4,9 +4,8 @@

Build the web with PostHTML

- Quickly design and customize responsive mobile-first sites with Bootstrap, the world's most popular front-end - open source toolkit, and with PostHTML, the simple, yet powerful tool for transforming HTML/XML with JS plugins. - Powered with PostHTML Components plugin which give you additional superpowers! + Quickly design with PostHTML, the simple, yet powerful tool for transforming HTML/XML with JS plugins. + Fueled with x-components plugin which give you additional superpowers!

diff --git a/examples/src/pages/test.html b/examples/src/pages/test.html index 9b2b15f..a03b2de 100644 --- a/examples/src/pages/test.html +++ b/examples/src/pages/test.html @@ -1,16 +1,46 @@ - - - -
YIELD PARENT IN TEST.html
- {{ alocal }} - - SLOT PARENT INSIDE TEST.html - -
- - -
YIELD CHILD INSIDE TEST.html
- - SLOT CHILD INSIDE TEST.html - -
+ +
+
+

Demo

+ + + My filled slot + + +
+ + + + +
YIELD PARENT IN TEST.html
+ {{ alocal }} + + SLOT PARENT INSIDE TEST.html + +
+ + +
YIELD CHILD INSIDE TEST.html
+ + SLOT CHILD INSIDE TEST.html + +
+
+
+
diff --git a/package.json b/package.json index 89d5a3a..f878b05 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "posthtml-component", - "version": "1.0.0-beta.4", + "version": "1.0.0-beta.5", "description": "PostHTML Components Blade-like with slots, attributes as props and custom tag", "license": "MIT", "repository": "thewebartisan7/posthtml-components",