@tbox.cn/app-theme-tbox 0.1.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/LICENSE +21 -0
- package/README.md +49 -0
- package/assets/tbox-bumpin-bg.jpg +0 -0
- package/assets/tbox-home-poster-compact.jpg +0 -0
- package/assets/tbox-home-poster-stage.jpg +0 -0
- package/assets/tbox-member-login-hero.jpg +0 -0
- package/assets/tbox-member-mascot.jpg +0 -0
- package/assets/tbox-parking-hero.jpg +0 -0
- package/assets/tbox-promotion-activity-header.jpg +0 -0
- package/assets/tbox-promotion-coupon-header.jpg +0 -0
- package/assets/tbox-sg-header.jpg +0 -0
- package/assets.css +21 -0
- package/brand.js +10 -0
- package/domains.css +5 -0
- package/index.css +23 -0
- package/motion.css +5 -0
- package/overrides.css +4 -0
- package/package.json +24 -0
- package/tokens.css +5 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 tbox.cn
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# @tbox.cn/app-theme-tbox(平台品牌主题包,公开)
|
|
2
|
+
|
|
3
|
+
平台品牌主题包——五段 CSS 覆写 + 平台 IP 素材九语义位 + `brand.js` 品牌副作用入口。
|
|
4
|
+
**素材独立化载体**:模块侧零品牌资产(兜底 = 中立渐变),IP 换代 = 本包单点补丁(六模块零重发)。
|
|
5
|
+
|
|
6
|
+
## 接线(生成应用侧三行;模板出厂已接线)
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
// apps/client/src/main.tsx 自由区(CLI 永不触碰)
|
|
10
|
+
import '@tbox.cn/app-theme-tbox/index.css';
|
|
11
|
+
import '@tbox.cn/app-theme-tbox/brand.js';
|
|
12
|
+
import { applyTheme } from '@app/agent-ui-kit/theme';
|
|
13
|
+
applyTheme('tbox');
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
- 安装:模板 `catalog:` 引用(`@tbox.cn/app-theme-tbox`),registry 解析;本地验证态经 create `--local-deps` 注入 file: override。
|
|
17
|
+
- **换主题 = 替换语义**:remove 本包 + 替换三行(叠加会致旧主题 css import 残留死重);换入品牌主题包步骤见 cookbook·build-app-image「主题接线」节。
|
|
18
|
+
- 装而未接线 → `tbox-app module doctor` ㉖ 告警(theme-import warning)。
|
|
19
|
+
|
|
20
|
+
## 结构与覆写契约
|
|
21
|
+
|
|
22
|
+
五段(`index.css` 依序 @import):`tokens.css` / `motion.css` / `overrides.css` / `domains.css`(四段空骨架——
|
|
23
|
+
平台视觉 = kit 蓝系默认)/ `assets.css`(素材九位);`assets/` 物理素材;`brand.js`(v1 仅 `document.title = '商圈搭子'`)。
|
|
24
|
+
|
|
25
|
+
**覆写面必须 ⊆ kit 主题契约封闭清单**(`@app/agent-ui-kit/theme/contract`):
|
|
26
|
+
平台 token + `--tbox-domain-*` + `--tbox-asset-*` + `.tbox-*` 壳类;
|
|
27
|
+
`doctor theme-package-structure` 校验(error)。变量声明唯一合法位 = `html[data-theme='tbox']` 段。
|
|
28
|
+
|
|
29
|
+
## 素材契约(九语义位)
|
|
30
|
+
|
|
31
|
+
| 语义位 | 素材 | 消费点(模块) |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| parking-hero | tbox-parking-hero.jpg | module-parking 停车支付卡主视觉 |
|
|
34
|
+
| member-mascot | tbox-member-mascot.jpg | module-member 登录 CTA 吉祥物 |
|
|
35
|
+
| promotion-activity-header | tbox-promotion-activity-header.jpg | module-promotion 活动头图 |
|
|
36
|
+
| promotion-coupon-header | tbox-promotion-coupon-header.jpg | module-promotion 券头图 |
|
|
37
|
+
| sg-header | tbox-sg-header.jpg | module-shopping-guide 门店导览头图 |
|
|
38
|
+
| bumpin-bg | tbox-bumpin-bg.jpg | module-alipay-activity 联单全幅背景 |
|
|
39
|
+
| home-poster-stage | tbox-home-poster-stage.jpg | mall-home 联单海报(桌面) |
|
|
40
|
+
| home-poster-compact | tbox-home-poster-compact.jpg | mall-home 联单海报(移动断点) |
|
|
41
|
+
| member-login-hero | tbox-member-login-hero.jpg | mall-home 会员登录 sheet 主视觉 |
|
|
42
|
+
|
|
43
|
+
同语义位素材须与模块兜底规格同尺寸/同裁切预期(背景 cover 语义);语义位名 = `--tbox-asset-*` 契约键。
|
|
44
|
+
|
|
45
|
+
## 语义档位
|
|
46
|
+
|
|
47
|
+
- 本包 = 素材三档第②档(主题包覆写主通道);模块兜底(第①档)= 中立渐变(零资产);
|
|
48
|
+
配置 URL(第③档)= 运行期覆盖(home-config assets 键 / bumpin backgroundUrl,扩展位)。
|
|
49
|
+
- 版本策略:公开发布;IP 换代(素材换批)= minor/patch 补丁,接线零变更。
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/assets.css
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 平台 IP 素材覆写(主题品牌资产轨 B1)——九语义位(平台方盒 IP)。
|
|
3
|
+
*
|
|
4
|
+
* 素材源 = 原模块内嵌资产迁入(2026-09-17 方盒 IP 换代载体;模块侧已清零,
|
|
5
|
+
* IP 换代 = 本包单点补丁,六模块零重发)。
|
|
6
|
+
* url 相对本文件位置;尺寸/裁切契约与模块语义位规格一致。
|
|
7
|
+
* 消费形态(模块侧唯一合法形态)= var(--tbox-asset-<语义位>, …):
|
|
8
|
+
* 本段 html 层声明经继承到达元素(元素自身不声明,恒胜模块兜底——A1 级联修复)。
|
|
9
|
+
* 素材归属 = 平台品牌,随本包公开分发(publishable:true)。
|
|
10
|
+
*/
|
|
11
|
+
html[data-theme='tbox'] {
|
|
12
|
+
--tbox-asset-parking-hero: url('./assets/tbox-parking-hero.jpg');
|
|
13
|
+
--tbox-asset-member-mascot: url('./assets/tbox-member-mascot.jpg');
|
|
14
|
+
--tbox-asset-promotion-activity-header: url('./assets/tbox-promotion-activity-header.jpg');
|
|
15
|
+
--tbox-asset-promotion-coupon-header: url('./assets/tbox-promotion-coupon-header.jpg');
|
|
16
|
+
--tbox-asset-sg-header: url('./assets/tbox-sg-header.jpg');
|
|
17
|
+
--tbox-asset-bumpin-bg: url('./assets/tbox-bumpin-bg.jpg');
|
|
18
|
+
--tbox-asset-home-poster-stage: url('./assets/tbox-home-poster-stage.jpg');
|
|
19
|
+
--tbox-asset-home-poster-compact: url('./assets/tbox-home-poster-compact.jpg');
|
|
20
|
+
--tbox-asset-member-login-hero: url('./assets/tbox-member-login-hero.jpg');
|
|
21
|
+
}
|
package/brand.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 平台品牌副作用入口(v1 仅标题)。
|
|
3
|
+
*
|
|
4
|
+
* 接线(生成应用侧三行之二;模板出厂已接线):import '@tbox.cn/app-theme-tbox/brand.js';
|
|
5
|
+
* 质量门 = doctor ㉖ 对称检查(exports 含 ./brand.js 而入口未 import → 已安装未接线告警)
|
|
6
|
+
* + verify-cli P4.7 产物断言(标题字符串入 bundle)。
|
|
7
|
+
* v1 限 document.title 单赋值;复杂化前须先补 AST 纯度校验(质量门边界登记见
|
|
8
|
+
* .agents/notes/implemented/feature/2026-09-17-theme-brand-assets.md)。
|
|
9
|
+
*/
|
|
10
|
+
document.title = '商圈搭子';
|
package/domains.css
ADDED
package/index.css
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 平台品牌主题包入口(@tbox.cn/app-theme-tbox,公开)——品牌资产包,零 npm 依赖。
|
|
3
|
+
*
|
|
4
|
+
* 接线(生成应用侧三行,main.tsx 自由区;模板出厂已接线):
|
|
5
|
+
* import '@tbox.cn/app-theme-tbox/index.css';
|
|
6
|
+
* import '@tbox.cn/app-theme-tbox/brand.js';
|
|
7
|
+
* import { applyTheme } from '@app/agent-ui-kit/theme';
|
|
8
|
+
* applyTheme('tbox');
|
|
9
|
+
*
|
|
10
|
+
* 五段结构(主题契约,doctor theme-package-structure 校验):
|
|
11
|
+
* tokens 品牌彩部覆写(空骨架——kit 蓝系默认即平台视觉,无彩部定制)
|
|
12
|
+
* motion 动效节奏覆写(空骨架)
|
|
13
|
+
* overrides 壳类 .tbox-* 覆写(空骨架)
|
|
14
|
+
* domains 域色通道覆写(--tbox-domain-*,空骨架)
|
|
15
|
+
* assets 素材变量覆写(--tbox-asset-* 九语义位——平台 IP 素材唯一归宿;A1 级联修复后元素侧只消费不声明)
|
|
16
|
+
*
|
|
17
|
+
* 覆写变量必须 ⊆ kit 主题契约封闭清单(@app/agent-ui-kit/theme/contract)。
|
|
18
|
+
*/
|
|
19
|
+
@import './tokens.css';
|
|
20
|
+
@import './motion.css';
|
|
21
|
+
@import './overrides.css';
|
|
22
|
+
@import './domains.css';
|
|
23
|
+
@import './assets.css';
|
package/motion.css
ADDED
package/overrides.css
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tbox.cn/app-theme-tbox",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "平台品牌主题包(公开发布):五段 CSS 覆写 + 平台 IP 素材九语义位 + brand.js 品牌副作用入口(v1 仅标题)。接线 = import 本包 index.css + brand.js + applyTheme('tbox') 三行。素材独立化——IP 换代 = 本包补丁,模块零品牌资产。",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./index.css",
|
|
8
|
+
"./index.css": "./index.css",
|
|
9
|
+
"./brand.js": "./brand.js",
|
|
10
|
+
"./package.json": "./package.json"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"index.css",
|
|
14
|
+
"tokens.css",
|
|
15
|
+
"motion.css",
|
|
16
|
+
"overrides.css",
|
|
17
|
+
"domains.css",
|
|
18
|
+
"assets.css",
|
|
19
|
+
"assets",
|
|
20
|
+
"brand.js",
|
|
21
|
+
"LICENSE",
|
|
22
|
+
"README.md"
|
|
23
|
+
]
|
|
24
|
+
}
|