amateras 0.3.0 → 0.4.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 +6 -4
- package/ext/css/README.md +19 -0
- package/ext/css/src/index.ts +347 -331
- package/ext/css/src/lib/colorAssign.ts +1 -1
- package/ext/css/src/structure/$CSSContainerRule.ts +13 -0
- package/ext/css/src/structure/$CSSRule.ts +1 -1
- package/ext/css/src/structure/$CSSStyleRule.ts +0 -7
- package/ext/css/src/structure/$CSSVariable.ts +3 -3
- package/ext/html/html.ts +1 -13
- package/ext/i18n/README.md +53 -0
- package/ext/i18n/package.json +10 -0
- package/ext/i18n/src/index.ts +54 -0
- package/ext/i18n/src/node/I18nText.ts +35 -0
- package/ext/i18n/src/structure/I18n.ts +40 -0
- package/ext/i18n/src/structure/I18nDictionary.ts +31 -0
- package/ext/markdown/index.ts +123 -0
- package/ext/router/index.ts +8 -1
- package/ext/router/node/Page.ts +1 -0
- package/ext/router/node/Route.ts +2 -1
- package/ext/router/node/Router.ts +33 -22
- package/ext/ssr/index.ts +4 -2
- package/ext/ui/lib/VirtualScroll.ts +24 -0
- package/ext/ui/node/Accordian.ts +97 -0
- package/ext/ui/node/Tabs.ts +114 -0
- package/ext/ui/node/Toast.ts +16 -0
- package/ext/ui/node/Waterfall.ts +73 -0
- package/ext/ui/package.json +11 -0
- package/package.json +4 -7
- package/src/core.ts +21 -8
- package/src/lib/assign.ts +8 -9
- package/src/lib/assignHelper.ts +1 -1
- package/src/lib/chain.ts +3 -0
- package/src/lib/debounce.ts +7 -0
- package/src/lib/env.ts +2 -0
- package/src/lib/native.ts +22 -35
- package/src/lib/randomId.ts +1 -1
- package/src/lib/sleep.ts +1 -1
- package/src/node/$Element.ts +182 -20
- package/src/node/$HTMLElement.ts +24 -0
- package/src/node/$Node.ts +75 -52
- package/src/node/$Virtual.ts +58 -0
- package/src/{node/node.ts → node.ts} +2 -5
package/README.md
CHANGED
|
@@ -99,9 +99,11 @@ $(document.body).content([
|
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
## Packages
|
|
102
|
+
The packages size result using Vite 7.0 with default bundle settings, polyfills code size included.
|
|
102
103
|
| Package name | Size | Size(gzip) | Description |
|
|
103
104
|
| --- | --- | --- | --- |
|
|
104
|
-
| amateras | 5.
|
|
105
|
-
| amateras/html | 0.97 kB | 0.
|
|
106
|
-
| [amateras/css](./ext/css/README.md) | 3.
|
|
107
|
-
| [amateras/router](./ext/router/README.md) |
|
|
105
|
+
| amateras | 5.71 kB | 2.48 kB | Core |
|
|
106
|
+
| amateras/html | 0.97 kB | 0.25 kB | Import HTMLElement types and methods |
|
|
107
|
+
| [amateras/css](./ext/css/README.md) | 3.65 kB | 1.41 kB | Style in JS |
|
|
108
|
+
| [amateras/router](./ext/router/README.md) | 3.74 kB | 1.69 kB | Amateras Router |
|
|
109
|
+
| [amateras/i18n](./ext/i18n/README.md) | 1.49 kB | 0.57 kB | I18n translations |
|
package/ext/css/README.md
CHANGED
|
@@ -106,4 +106,23 @@ $(document.body).content([
|
|
|
106
106
|
$('h1').class('title').content('A red color title.')
|
|
107
107
|
])
|
|
108
108
|
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### CSS Colors Preset
|
|
112
|
+
You can import colors preset from `amateras/color/COLOR_NAME` or `amateras/colors` path. These colors are reference from Tailwind colors, read the [documentation](https://tailwindcss.com/docs/colors) to know about the concepts.
|
|
113
|
+
```ts
|
|
114
|
+
// import black and white color preset
|
|
115
|
+
import 'amateras/color/blackwhite';
|
|
116
|
+
$.color.black; // '#000000'
|
|
117
|
+
$.color.white; // '#ffffff'
|
|
118
|
+
|
|
119
|
+
// import slate colors preset
|
|
120
|
+
import 'amateras/color/slate';
|
|
121
|
+
$.color.slate[100]; // '#f1f5f9'
|
|
122
|
+
$.color.slate[200]; // '#e2e8f0'
|
|
123
|
+
|
|
124
|
+
// import all colors preset
|
|
125
|
+
import 'amateras/colors';
|
|
126
|
+
$.color.red[600]; // '#dc2626'
|
|
127
|
+
$.color.zinc[500]; // '#71717a'
|
|
109
128
|
```
|