lithent 1.9.3 → 1.10.2
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 +37 -15
- 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/package.json +1 -0
- package/helper/package.json +1 -0
- package/package.json +20 -18
- package/tag/package.json +1 -0
- package/examples/dist/assets/index-60b445f0.js +0 -2
- package/examples/dist/assets/index-60b445f0.js.map +0 -1
- package/src/tests/loop.tsx +0 -33
- package/src/tests/nested.tsx +0 -44
- package/src/tests/selectbox.tsx +0 -42
- package/src/tests/svg.tsx +0 -44
- /package/src/tests/{callback.tsx → core-callback.tsx} +0 -0
- /package/src/tests/{test10.tsx → core-checkbox.tsx} +0 -0
- /package/src/tests/{test13-2.tsx → core-complexRootFragment.tsx} +0 -0
- /package/src/tests/{destroy.tsx → core-destroy.tsx} +0 -0
- /package/src/tests/{test16.tsx → core-destroyForLoop.tsx} +0 -0
- /package/src/tests/{fragment.tsx → core-fragment.tsx} +0 -0
- /package/src/tests/{hoc.tsx → core-hoc.tsx} +0 -0
- /package/src/tests/{test7.tsx → core-innerhtml.tsx} +0 -0
- /package/src/tests/{test9.tsx → core-input.tsx} +0 -0
- /package/src/tests/{insert.tsx → core-insert.tsx} +0 -0
- /package/src/tests/{loop2.tsx → core-loop.tsx} +0 -0
- /package/src/tests/{loopWithoutKey.tsx → core-loopWithoutKey.tsx} +0 -0
- /package/src/tests/{test6.tsx → core-loopkey.tsx} +0 -0
- /package/src/tests/{test12.tsx → core-mixedComponentUpdate.tsx} +0 -0
- /package/src/tests/{test5.tsx → core-nested.tsx} +0 -0
- /package/src/tests/{test14.tsx → core-nestedUnmount.tsx} +0 -0
- /package/src/tests/{test11.tsx → core-radio.tsx} +0 -0
- /package/src/tests/{renew.tsx → core-renew.tsx} +0 -0
- /package/src/tests/{renewEventTest.tsx → core-renewEventTest.tsx} +0 -0
- /package/src/tests/{test13.tsx → core-rootFragmentUpdate.tsx} +0 -0
- /package/src/tests/{test8.tsx → core-selectbox.tsx} +0 -0
- /package/src/tests/{test17.tsx → core-svg.tsx} +0 -0
- /package/src/tests/{textarea.tsx → core-textarea.tsx} +0 -0
- /package/src/tests/{test15.tsx → core-thrillProps.tsx} +0 -0
- /package/src/tests/{unmount.tsx → core-unmount.tsx} +0 -0
- /package/src/tests/{test18.tsx → helper-cacheupdate.tsx} +0 -0
- /package/src/tests/{test1.tsx → helper-computed.tsx} +0 -0
- /package/src/tests/{test4.tsx → helper-effect.tsx} +0 -0
- /package/src/tests/{test3.tsx → helper-store.tsx} +0 -0
- /package/src/tests/{test2.tsx → helper-store2.tsx} +0 -0
- /package/src/tests/{storeObserver.tsx → helper-storeObserver.tsx} +0 -0
package/README.md
CHANGED
|
@@ -1,15 +1,26 @@
|
|
|
1
|
-
# ➿ lithent
|
|
2
1
|
|
|
2
|
+
## ➿ lithent
|
|
3
3
|
> An extensible JSX-based virtual DOM library for lightweight use in a variety of environments.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
|
|
10
|
+

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