@yoyaflow/yoya-ui 0.3.1 → 0.3.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 CHANGED
@@ -44,19 +44,20 @@ function HelloWorldExampleI18n() {
44
44
 
45
45
  ## Installation
46
46
 
47
- ### Scaffold a new project
47
+ ### Quick experience
48
48
 
49
49
  ```bash
50
- npx create-yoya-ui@latest my-app # basic template (SPA)
51
- npx create-yoya-ui@latest my-app --template ssr # SSR template (renderPage + hydrateOrMount)
52
- npx create-yoya-ui@latest my-app --template admin # admin console template (top nav + collapsible sidebar + RouterViews)
50
+ # Install the scaffold
51
+ npm install -g create-yoya-ui
52
+
53
+ # Create a project with the admin template
54
+ create-yoya-ui my-app --template admin
53
55
  cd my-app
54
56
  npm install
55
- npm run dev # basic / admin: dev server
56
- # SSR: npm run build && npm start
57
+ npm run dev
57
58
  ```
58
59
 
59
- `--template admin` scaffolds a standard admin console: top navigation, collapsible sidebar and a titled RouterViews content area, with feature examples for dashboard (data boards & charts), member / role / permission management, and dictionary management (type table with an item editor dialog).
60
+ `--template admin` scaffolds a standard admin console: top navigation, sidebar and a titled RouterViews content area, with feature examples for dashboard (data boards & charts), member / role / permission management, and dictionary management (type table with an item editor dialog).
60
61
 
61
62
  yoya-ui has its own unique development paradigm — declarative node DSL, page composition, and feature-module organization. The admin template is the recommended way to get familiar with it: it demonstrates the full stack of a real admin console (shell, routing, tables / forms / dialogs, dashboard boards & charts) using the library's idiomatic patterns.
62
63
 
@@ -127,16 +128,7 @@ Key points:
127
128
  - Per-request i18n instance, render-context id allocator, auto-destroy after render — the server stays stateless
128
129
  - `maxNodes` falls back to client rendering automatically when exceeded
129
130
 
130
- Full integration guide: [docs/ssr.md](docs/ssr.md) (Chinese); quick start with the SSR template:
131
-
132
- ```bash
133
- npx create-yoya-ui@latest my-app --template ssr
134
- cd my-app
135
- npm install
136
- npm run build && npm start
137
- ```
138
-
139
- Or run the in-repo example:
131
+ Full integration guide: [docs/ssr.md](docs/ssr.md) (Chinese). Or run the in-repo example:
140
132
 
141
133
  ```bash
142
134
  npm run build
package/README.zh-CN.md CHANGED
@@ -45,19 +45,20 @@ function HelloWorldExampleI18n() {
45
45
 
46
46
  ## 安装
47
47
 
48
- ### 脚手架快速搭建
48
+ ### 快速体验
49
49
 
50
50
  ```bash
51
- npx create-yoya-ui@latest my-app # basic 模板(SPA)
52
- npx create-yoya-ui@latest my-app --template ssr # SSR 模板(renderPage + hydrateOrMount)
53
- npx create-yoya-ui@latest my-app --template admin # admin 后台管理模板(顶部导航 + 可折叠侧栏 + RouterViews)
51
+ # 安装脚手架
52
+ npm install -g create-yoya-ui
53
+
54
+ # 使用 admin 模板创建项目
55
+ create-yoya-ui my-app --template admin
54
56
  cd my-app
55
57
  npm install
56
- npm run dev # basic / admin:开发服务器
57
- # SSR:npm run build && npm start
58
+ npm run dev
58
59
  ```
59
60
 
60
- `--template admin` 生成标准后台管理模板:顶部导航 + 可折叠侧栏 + 带标题的 RouterViews 内容区,内置数据概览看板与图表,以及成员 / 角色 / 权限 / 字典管理等业务域示例。
61
+ `--template admin` 生成标准后台管理模板:顶部导航 + 左侧菜单 + 带标题的 RouterViews 内容区,内置数据概览看板与图表,以及成员 / 角色 / 权限 / 字典管理等业务域示例。
61
62
 
62
63
  yoya-ui 拥有自己独特的开发范式:声明式节点 DSL、页面编排与 feature 模块组织。推荐使用 admin 模板创建项目来了解这些范式——它用库的原生写法完整展示了一个真实后台(页面壳、路由、表格/表单/弹窗、数据看板与图表)。
63
64
 
@@ -128,16 +129,7 @@ hydrateOrMount(HomePage, { messages });
128
129
  - 每请求 i18n 实例、渲染上下文 id 分配器、渲染后自动销毁——服务端保持无状态
129
130
  - `maxNodes` 超限自动回退客户端渲染
130
131
 
131
- 完整集成指南见 [docs/ssr.md](docs/ssr.md);用 SSR 模板快速开始:
132
-
133
- ```bash
134
- npx create-yoya-ui@latest my-app --template ssr
135
- cd my-app
136
- npm install
137
- npm run build && npm start
138
- ```
139
-
140
- 或运行仓库内示例:
132
+ 完整集成指南见 [docs/ssr.md](docs/ssr.md)。或运行仓库内示例:
141
133
 
142
134
  ```bash
143
135
  npm run build
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoyaflow/yoya-ui",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "A browser-native JS UI library with declarative HTML authoring: component library, router, i18n, theming and layout, works with or without a build tool, SSR-ready.",
5
5
  "type": "module",
6
6
  "private": false,