lithent 1.9.2 → 1.10.0
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.
- package/README.md +32 -14
- package/dist/lithent.mjs +367 -832
- package/dist/lithent.mjs.map +1 -1
- package/dist/lithent.umd.js +1 -1
- package/dist/lithent.umd.js.map +1 -1
- package/examples/dist/assets/index-B5wgGeyV.js +2 -0
- package/examples/dist/assets/index-B5wgGeyV.js.map +1 -0
- package/examples/dist/index.html +1 -2
- package/examples/package.json +1 -0
- package/ftags/dist/index.d.ts +0 -10
- package/ftags/dist/lithentFTags.mjs +7 -8
- package/ftags/dist/lithentFTags.mjs.map +1 -1
- package/ftags/dist/lithentFTags.umd.js +1 -1
- package/ftags/dist/lithentFTags.umd.js.map +1 -1
- package/ftags/package.json +1 -0
- package/ftags/src/index.ts +0 -4
- package/helper/package.json +1 -0
- package/package.json +10 -7
- package/src/diff.ts +1 -1
- package/src/tests/unmount.tsx +95 -0
- package/tag/package.json +1 -0
- package/examples/dist/assets/index-08ddebb4.js +0 -2
- package/examples/dist/assets/index-08ddebb4.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
# ➿ lithent
|
|
2
2
|
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+

|
|
7
|
+
|
|
3
8
|
> An extensible JSX-based virtual DOM library for lightweight use in a variety of environments.
|
|
4
9
|
|
|
5
|
-
- [
|
|
10
|
+
- [Manual](https://medium.com/p/13d6fe6d3330)
|
|
11
|
+
- [Korean Manual](https://medium.com/@superlucky84/lithent-전체-기능-설명서-3cfab04c0722)
|
|
6
12
|
- [Home Page](https://superlucky84.github.io/lithent) - (This page is written in lithent.)
|
|
7
13
|
|
|
8
14
|
Lithent were developed to make it easy to insert Virtual DOM component
|
|
9
15
|
fragments into pages already drawn with SSR, and are intended to be
|
|
10
16
|
used lightly in a variety of situations.
|
|
11
17
|
|
|
12
|
-
`(
|
|
18
|
+
`(lithent.mjs 14.11 kB │ gzip: 4.46 kB │ map: 59.97 kB)`
|
|
19
|
+
`(lithent.umd.js 10.30 kB │ gzip: 4.04 kB │ map: 58.39 kB)`
|
|
13
20
|
|
|
14
21
|
## 🚩 Table of Contents
|
|
15
22
|
- [Thanks for the introduction](#thanks-for-the-introduction)
|
|
@@ -65,14 +72,14 @@ pnpm add lithent
|
|
|
65
72
|
|
|
66
73
|
#### Or Use CDN
|
|
67
74
|
|
|
68
|
-
* UMD : https://cdn.jsdelivr.net/npm/lithent@1.
|
|
69
|
-
* UMD-HELPER: https://cdn.jsdelivr.net/npm/lithent@1.
|
|
70
|
-
* UMD-FTAGS: https://cdn.jsdelivr.net/npm/lithent@1.
|
|
71
|
-
* UMD-TAG: https://cdn.jsdelivr.net/npm/lithent@1.
|
|
72
|
-
* ESM : https://cdn.jsdelivr.net/npm/lithent@1.
|
|
73
|
-
* ESM-HELPER: https://cdn.jsdelivr.net/npm/lithent@1.
|
|
74
|
-
* ESM-FTAGS: https://cdn.jsdelivr.net/npm/lithent@1.
|
|
75
|
-
* ESM-TAG: https://cdn.jsdelivr.net/npm/lithent@1.
|
|
75
|
+
* UMD : https://cdn.jsdelivr.net/npm/lithent@1.10.0/dist/lithent.umd.js
|
|
76
|
+
* UMD-HELPER: https://cdn.jsdelivr.net/npm/lithent@1.10.0/helper/dist/lithentHelper.umd.js
|
|
77
|
+
* UMD-FTAGS: https://cdn.jsdelivr.net/npm/lithent@1.10.0/ftags/dist/lithentFTags.umd.js
|
|
78
|
+
* UMD-TAG: https://cdn.jsdelivr.net/npm/lithent@1.10.0/tag/dist/lithentTag.umd.js
|
|
79
|
+
* ESM : https://cdn.jsdelivr.net/npm/lithent@1.10.0/dist/lithent.mjs
|
|
80
|
+
* ESM-HELPER: https://cdn.jsdelivr.net/npm/lithent@1.10.0/helper/dist/lithentHelper.mjs
|
|
81
|
+
* ESM-FTAGS: https://cdn.jsdelivr.net/npm/lithent@1.10.0/ftags/dist/lithentFTags.mjs
|
|
82
|
+
* ESM-TAG: https://cdn.jsdelivr.net/npm/lithent@1.10.0/tag/dist/lithentTag.mjs
|
|
76
83
|
|
|
77
84
|
|
|
78
85
|
It's easier to use lithent with JSX or HTM.
|
|
@@ -90,11 +97,22 @@ When creating a component, use `fMount` instead of `mount`.
|
|
|
90
97
|
When creating a fragment, use `fFragment` instead of `Fragment`.
|
|
91
98
|
|
|
92
99
|
```ts
|
|
100
|
+
/* ESM */
|
|
93
101
|
import { render, h } from 'lithent';
|
|
94
102
|
import { fTags, fFragment, fMount } from 'lithent/ftags';
|
|
95
103
|
|
|
96
104
|
const { section, div, p, br, strong } = fTags;
|
|
97
105
|
|
|
106
|
+
/* UMD
|
|
107
|
+
<script src="https://cdn.jsdelivr.net/npm/lithent@1.10.0/dist/lithent.umd.js"></script>
|
|
108
|
+
<script src="https://cdn.jsdelivr.net/npm/lithent@1.10.0/helper/dist/lithentHelper.umd.js"></script>
|
|
109
|
+
<script src="https://cdn.jsdelivr.net/npm/lithent@1.10.0/ftags/dist/lithentFTags.umd.js"></script>
|
|
110
|
+
|
|
111
|
+
const { render } = lithent;
|
|
112
|
+
const { fTags, fMount, fFragment } = lithentFTags;
|
|
113
|
+
const { section, div, p, br, strong } = fTags;
|
|
114
|
+
*/
|
|
115
|
+
|
|
98
116
|
const fTagComponent = fMount<{ firstProp: number }>((_r, props, children) => {
|
|
99
117
|
return () =>
|
|
100
118
|
fFragment(
|
|
@@ -160,10 +178,10 @@ const destroy = render(lTag`<${Component} />`, document.getElementById('root'),
|
|
|
160
178
|
#### With UMD
|
|
161
179
|
|
|
162
180
|
```html
|
|
163
|
-
<script src="https://cdn.jsdelivr.net/npm/lithent@1.
|
|
164
|
-
<!--script src="https://cdn.jsdelivr.net/npm/lithent@1.
|
|
165
|
-
<script src="https://cdn.jsdelivr.net/npm/lithent@1.
|
|
166
|
-
<!--script src="https://cdn.jsdelivr.net/npm/lithent@1.
|
|
181
|
+
<script src="https://cdn.jsdelivr.net/npm/lithent@1.10.0/dist/lithent.umd.js"></script>
|
|
182
|
+
<!--script src="https://cdn.jsdelivr.net/npm/lithent@1.10.0/helper/dist/lithentHelper.umd.js"></script-->
|
|
183
|
+
<script src="https://cdn.jsdelivr.net/npm/lithent@1.10.0/tag/dist/lithentTag.umd.js"></script>
|
|
184
|
+
<!--script src="https://cdn.jsdelivr.net/npm/lithent@1.10.0/ftags/dist/lithentFTags.umd.js"></script-->
|
|
167
185
|
|
|
168
186
|
<div id="root"></div>
|
|
169
187
|
|