lithent 1.2.2 → 1.2.4
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 +11 -13
- package/dist/lithent.mjs +797 -360
- package/dist/lithent.mjs.map +1 -1
- package/dist/lithent.umd.js +1 -1
- package/dist/lithent.umd.js.map +1 -1
- package/dist/render.d.ts +1 -0
- package/examples/dist/assets/index-dd17bda0.js +2 -0
- package/examples/dist/assets/index-dd17bda0.js.map +1 -0
- package/examples/dist/index.html +1 -1
- package/package.json +1 -1
- package/src/diff.ts +8 -9
- package/src/render.ts +6 -4
- package/src/tests/loop2.tsx +77 -0
- package/examples/dist/assets/index-35f93159.js +0 -2
- package/examples/dist/assets/index-35f93159.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# lithent
|
|
1
|
+
# ➿ lithent
|
|
2
2
|
|
|
3
3
|
> An extensible virtual DOM library for lightweight use in a variety of environments.
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@ used lightly in a variety of situations.
|
|
|
9
9
|
- https://superlucky84.github.io/lithent
|
|
10
10
|
- (This guide page is written in lithent.)
|
|
11
11
|
|
|
12
|
-
`(9.
|
|
12
|
+
`(9.91 kB │ gzip: 3.87 kB)`
|
|
13
13
|
|
|
14
14
|
## 🚩 Table of Contents
|
|
15
15
|
|
|
@@ -41,8 +41,6 @@ We provide code in the form of 'helpers' that extend the basic functionality, bu
|
|
|
41
41
|
|
|
42
42
|
### Approach with the developer-friendly concept of closures between "component mounter" and "renderer"
|
|
43
43
|
|
|
44
|
-
Many existing UI libraries have their advantages, but they also create rules that are too strong and rigid for fear of users making mistakes.
|
|
45
|
-
|
|
46
44
|
JavaScript users are used to using closures and love to develop with them.
|
|
47
45
|
|
|
48
46
|
"Lithent" provides a familiar approach to my JavaScript development, as it leverages the properties of higher-order functions and closures to define and recycle the state of a component.
|
|
@@ -61,12 +59,12 @@ pnpm add lithent
|
|
|
61
59
|
|
|
62
60
|
#### Or Use CDN
|
|
63
61
|
|
|
64
|
-
* UMD : https://cdn.jsdelivr.net/npm/lithent@1.2.
|
|
65
|
-
* UMD-HELPER: https://cdn.jsdelivr.net/npm/lithent@1.2.
|
|
66
|
-
* UMD-TAG: https://cdn.jsdelivr.net/npm/lithent@1.2.
|
|
67
|
-
* ESM : https://cdn.jsdelivr.net/npm/lithent@1.2.
|
|
68
|
-
* ESM-HELPER: https://cdn.jsdelivr.net/npm/lithent@1.2.
|
|
69
|
-
* ESM-TAG: https://cdn.jsdelivr.net/npm/lithent@1.2.
|
|
62
|
+
* UMD : https://cdn.jsdelivr.net/npm/lithent@1.2.4/dist/lithent.umd.js
|
|
63
|
+
* UMD-HELPER: https://cdn.jsdelivr.net/npm/lithent@1.2.4/helper/dist/lithentHelper.umd.js
|
|
64
|
+
* UMD-TAG: https://cdn.jsdelivr.net/npm/lithent@1.2.4/tag/dist/lithentTag.umd.js
|
|
65
|
+
* ESM : https://cdn.jsdelivr.net/npm/lithent@1.2.4/dist/lithent.mjs
|
|
66
|
+
* ESM-HELPER: https://cdn.jsdelivr.net/npm/lithent@1.2.4/helper/dist/lithentHelper.mjs
|
|
67
|
+
* ESM-TAG: https://cdn.jsdelivr.net/npm/lithent@1.2.4/tag/dist/lithentTag.mjs
|
|
70
68
|
|
|
71
69
|
|
|
72
70
|
It's easier to use lithent with JSX or HTM.
|
|
@@ -118,9 +116,9 @@ const destroy = render(lTag`<${Component} />`, document.getElementById('root'),
|
|
|
118
116
|
#### With UMD
|
|
119
117
|
|
|
120
118
|
```html
|
|
121
|
-
<script src="https://cdn.jsdelivr.net/npm/lithent@1.2.
|
|
122
|
-
<!--script src="https://cdn.jsdelivr.net/npm/lithent@1.2.
|
|
123
|
-
<script src="https://cdn.jsdelivr.net/npm/lithent@1.2.
|
|
119
|
+
<script src="https://cdn.jsdelivr.net/npm/lithent@1.2.4/dist/lithent.umd.js"></script>
|
|
120
|
+
<!--script src="https://cdn.jsdelivr.net/npm/lithent@1.2.4/helper/dist/lithentHelper.umd.js"></script-->
|
|
121
|
+
<script src="https://cdn.jsdelivr.net/npm/lithent@1.2.4/tag/dist/lithentTag.umd.js"></script>
|
|
124
122
|
|
|
125
123
|
<div id="root"></div>
|
|
126
124
|
|