SuperAPI AI 工具集

design-tokens

设计与创作

查看项目

更新于 10-16 08:45

技能介绍

用途:回答关于 SAP Design System 和 SAP Fiori design tokens 的问题,例如存在哪些主题、某个主题参数(如 sapButton_Background)的取值等。

主要能力:识别用户问题所指向的 SAP 主题(可选主题 ID 来自 theming-base-content/content/Base/baseLib,未指定时默认 sap_horizon),并判断目标框架:UI5(openui5)、UI5 Web Components(webcomponents)、Fundamental Styles(fundamental-styles)或 Other(theming-base-content)。随后按需惰性克隆对应仓库,读取 .theming 文件确定 sBaseLibraryId 与 sSourcePathPattern,沿 oExtends 合并主题配置,再展开 ${sBaseFileId}.less 的 @import 并映射参数前的标注(含合并、追加、去除正反标注等处理),最终据此作答。

使用方式:前提是先准备 overview-of-sap-theming-content-91ebfe2.md(若无则从指定 raw 地址获取)和 theming-base-content(通过 git clone --depth 1 --filter=blob:none --no-checkout --sparse https://github.com/SAP/theming-base-content theming-base-content,再 sparse-checkout set content/ 与 checkout)。框架仓库按需克隆:UI5 用 git clone --depth 1 --filter=blob:none --no-checkout https://github.com/UI5/openui5 openui5;UI5 Web Components 用 git clone --depth 1 --filter=blob:none --no-checkout https://github.com/UI5/webcomponents webcomponents;Fundamental Styles 用 git clone --depth 1 --filter=blob:none --no-checkout https://github.com/SAP/fundamental-styles fundamental-styles,随后分别执行各自的 sparse-checkout set 与 checkout 命令。

适用场景与限制:适用于查询 SAP 主题参数来源、取值与框架间差异;未指定组件时默认框架为 Other,指定组件但未说明框架时默认 UI5 Web Components。仅报告 theming-base-content 参数,不展示 webcomponents 内部 CSS 自定义属性。具体支持的主题范围、版本与时效性暂未提供。