@lark-apaas/client-toolkit-lite 1.0.0 → 1.1.0-alpha.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 CHANGED
@@ -16,31 +16,14 @@ npm install react react-dom react-router-dom @tanstack/react-query
16
16
 
17
17
  ## 快速接入
18
18
 
19
- ### 1. 引入主题样式
20
-
21
- 在项目入口文件(如 `main.tsx`)中引入全局样式:
22
-
23
- ```tsx
24
- // main.tsx
25
- import '@lark-apaas/client-toolkit-lite/styles';
26
- import { createRoot } from 'react-dom/client';
27
- import App from './App';
28
-
29
- createRoot(document.getElementById('root')!).render(<App />);
30
- ```
31
-
32
- 样式包含:
33
- - **theme-layer.css** — Tailwind CSS 层声明(由消费端 Vite + PostCSS 处理)
34
- - **tailwind-theme.css** — 设计系统 CSS 变量(颜色体系)
35
- - **override.css** — 全局基础样式(border-color、background、container)
36
- - **font-family.css** — 字体定义
37
-
38
- ### 2. 使用 AppContainer
19
+ ### 1. 使用 AppContainer
39
20
 
40
21
  `AppContainer` 是应用根容器,内部集成:
22
+ - **全局样式** — 自动导入主题样式(theme-layer / tailwind-theme / override / font-family),无需手动 import CSS
41
23
  - **Safety** — 生产环境「妙搭构建」安全标识
42
24
  - **QueryProvider** — React Query 数据管理
43
25
  - **useAppInfo** — 自动同步 document title / favicon / OG meta
26
+ - **Tea 埋点** — 生产环境自动上报页面访问事件
44
27
  - **Runtime** — React DevTools Hook + Axios CSRF 全局注入(防重复)
45
28
 
46
29
  ```tsx
@@ -209,6 +192,7 @@ import type {
209
192
  | Hooks | useAppInfo, useCurrentUserProfile, useIsMobile, useLogout |
210
193
  | Utils | clsxWithTw, isPreview, normalizeBasePath, getWsPath, getAppId, getCsrfToken, scopedStorage, copyToClipboard, isIpad, isMobile, isIOS, resolveAppUrl, getEnvPath, safeStringify, getAxiosForBackend, axiosForBackend, initAxiosConfig |
211
194
  | Integrations | getAppInfo, getCurrentUserProfile, getDataloom |
195
+ | Tea | reportTeaEvent, TrackKey, TrackParams |
212
196
  | Types | AppInfoPayload, IUserProfile, IJson, IFileAttachment |
213
197
  | Constants | avatarImages, bannerImages, coverImages |
214
198