tguikit 0.5.0 → 0.5.1
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 +8 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# tguikit
|
|
2
2
|
|
|
3
|
-
React 19 component library for Telegram Mini Apps
|
|
3
|
+
React 19 component library for Telegram Mini Apps. Telegram's iOS design language, bound to the user's theme, SSR-safe, one stylesheet.
|
|
4
4
|
|
|
5
5
|
> Pre-release. The API is still moving before `1.0`.
|
|
6
6
|
|
|
@@ -31,9 +31,14 @@ export function App() {
|
|
|
31
31
|
|
|
32
32
|
`TguiProvider` supplies the theme and platform. It follows the Telegram / system light–dark theme automatically; pass `appearance` or `platform` to pin them.
|
|
33
33
|
|
|
34
|
-
##
|
|
34
|
+
## Principles
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
- `ref` is a plain prop on every component — React 19 baseline, no `forwardRef`.
|
|
37
|
+
- Consumer `className` and `style` always win; components merge, never replace.
|
|
38
|
+
- Every colour is a `--tgui--*` token bound to a `--tg-theme-*` variable — components follow the user's Telegram theme and custom themes.
|
|
39
|
+
- Touch-safe: `:hover` is gated behind `(hover: hover)`.
|
|
40
|
+
- SSR-safe: platform and theme detection is `typeof window` guarded, tokens scoped to the provider — no hydration flash.
|
|
41
|
+
- One stylesheet, React externalised as a peer, `publint` + `arethetypeswrong` clean.
|
|
37
42
|
|
|
38
43
|
## Develop
|
|
39
44
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tguikit",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.1",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"description": "React 19 component library for Telegram Mini Apps —
|
|
6
|
+
"description": "React 19 component library for Telegram Mini Apps — Telegram's iOS design language, theme-aware, SSR-safe.",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"telegram",
|
|
9
9
|
"telegram-mini-apps",
|