@@ -13,20 +13,32 @@ https://web-cell.dev/cell-router/preview/
1313
1414## Feature
1515
16- - [x] ` <iframe /> ` -like ** Route Component** as a ** Page Container**
16+ - [x] ` <iframe /> ` -like ** Route Component** as a ** Page Container**
1717
18- - [x] ** Page Link** (support ` <a /> ` , ` <area /> ` & ` <form /> ` )
18+ - [x] ** Page Link** (support ` <a /> ` , ` <area /> ` & ` <form /> ` )
1919
20- - ` <a href="route/path">Page title</a> `
21- - ` <a href="route/path" title="Page title">Example page</a> `
22- - ` <a href="#page-section">Page section</a> ` (Scroll to an Anchor smoothly)
23- - ` <form method="get" action="route/path" /> ` (Form Data processed by ` URLSearchParams ` )
20+ - ` <a href="route/path">Page title</a> `
21+ - ` <a href="route/path" title="Page title">Example page</a> `
22+ - ` <a href="#page-section">Page section</a> ` (Scroll to an Anchor smoothly)
23+ - ` <form method="get" action="route/path" /> ` (Form Data processed by ` URLSearchParams ` )
2424
25- - [x] ** Path Mode** : ` location.hash ` (default) & ` history.pushState() `
25+ - [x] ** Path Mode** : ` location.hash ` (default) & ` history.pushState() `
2626
27- - [x] ** Async Loading** (based on ` import() ` ECMAScript syntax)
27+ - [x] ** Async Loading** (based on ` import() ` ECMAScript syntax)
2828
29- - [x] [ View Transition API] [ 7 ] based ** Page Transition Animation**
29+ - [x] [ View Transition API] [ 7 ] based ** Page Transition Animation**
30+
31+ ## Version
32+
33+ | SemVer | status | WebCell | API | async page | page transition | nested router |
34+ | :------------------: | :----: | :-----: | :------------------------------: | :--------: | :-------------: | :-----------: |
35+ | ` 4.x ` | ✅ | ` >=3.1 ` | HTML tags (+ JSON) | ✅ | ✅ | ❌ |
36+ | ` 3.x ` | ❌ | ` 3.x ` | HTML tags | ✅ | ✅ | ❌ |
37+ | ` 2.x ` | ❌ | ` 2.x ` | HTML tag + JSON | ✅ | ✅ | ✅ |
38+ | ` >=2.0.0-alpha.0 <2 ` | ❌ | ` 2.x ` | ` abstract class ` + JSON | ✅ | ❌ | ✅ |
39+ | ` 1.x ` | ❌ | ` 1.x ` | ` abstract class ` + ES decorators | ❌ | ❌ | ❌ |
40+ | ` >=0.9 <1.0 ` | ❌ | ` 0.x ` | ` abstract class ` + ES decorators | ❌ | ❌ | ❌ |
41+ | ` <0.9 ` | ❌ | ` 0.x ` | ` class ` + HTML tags | ❌ | ❌ | ❌ |
3042
3143## Installation
3244
@@ -70,7 +82,7 @@ npm install parcel @parcel/config-default @parcel/transformer-typescript-tsc -D
7082``` tsx
7183import { DOMRenderer } from ' dom-renderer' ;
7284import { FC } from ' web-cell' ;
73- import { createRouter , PageProps } from ' cell-router' ;
85+ import { CellRouter , createRouter , PageProps } from ' cell-router' ;
7486
7587const { Route, Link } = createRouter ();
7688
@@ -93,14 +105,14 @@ new DOMRenderer().render(
93105 <Link to = " test?a=1" >Test</Link >
94106 <Link to = " example/2" >Example</Link >
95107 </nav >
96- <main className = " router" >
108+ <CellRouter className = " router" >
97109 <Route
98110 path = " "
99111 component = { props => <div { ... props } >Home Page</div >}
100112 />
101113 <Route path = " test" component = { TestPage } />
102114 <Route path = " example/:id" component = { TestPage } />
103- </main >
115+ </CellRouter >
104116 </>
105117);
106118```
@@ -122,7 +134,7 @@ new DOMRenderer().render(
122134``` tsx
123135import { DOMRenderer } from ' dom-renderer' ;
124136import { FC , lazy } from ' web-cell' ;
125- import { createRouter , PageProps } from ' cell-router' ;
137+ import { CellRouter , createRouter , PageProps } from ' cell-router' ;
126138
127139const { Route, Link } = createRouter ();
128140
@@ -146,14 +158,14 @@ new DOMRenderer().render(
146158 <Link to = " test?a=1" >Test</Link >
147159 <Link to = " example/2" >Example</Link >
148160 </nav >
149- <main className = " router" >
161+ <CellRouter className = " router" >
150162 <Route
151163 path = " "
152164 component = { props => <div { ... props } >Home Page</div >}
153165 />
154166 <Route path = " test" component = { TestPage } />
155167 <Route path = " example/:id" component = { AsyncPage } />
156- </main >
168+ </CellRouter >
157169 </>
158170);
159171```
0 commit comments