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.
Files changed (2) hide show
  1. package/README.md +8 -3
  2. 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 a modern reimplementation of [`@telegram-apps/telegram-ui`](https://github.com/telegram-mini-apps-dev/TelegramUI).
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
- ## What it fixes
34
+ ## Principles
35
35
 
36
- See [`IMPROVEMENTS.md`](./IMPROVEMENTS.md) ref forwarding, theme tokens, touch-safe hover, SSR, a real package build, and a bundle roughly a tenth the size of the original.
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.0",
4
+ "version": "0.5.1",
5
5
  "type": "module",
6
- "description": "React 19 component library for Telegram Mini Apps — a modern reimplementation of @telegram-apps/telegram-ui.",
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",