定制 semitexa/skins-base 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

semitexa/skins-base

Composer 安装命令:

composer require semitexa/skins-base

包简介

Framework default skin + Semitexa skin CLI (generate, refine, explain-prompt). Projects generate their own skins into src/skins/; framework ships only the single 'default' reference skin used as fallback.

README 文档

README

Framework default skin + Semitexa skin CLI.

What ships here

One skin. src/Application/Static/skins/default/ — a neutral-gray reference skin (balanced algorithm, seed #808080, light mode, default knobs) used as the fallback when no project skin matches. Deliberately minimal — "Times New Roman for skins". All 41 design tokens emitted; all three primitives renderable.

Three commands (src/Console/):

Command Role
skins:generate Generate a new skin (seed mode or --prompt="…" LLM mode). Writes to project src/skins/<name>/.
skins:refine Iterate an existing skin's knobs (LLM deltas or --set=name:value). Reads via SkinDiscovery — refining a framework-shipped skin writes the override to project src/skins/<slug>/.
skins:explain-prompt Preview LLM resolution without writing any files.

Full semantics: platform-ui/docs/skin-generation.md, skin-algorithms.md, skin-refinement.md.

Package boundary

Package Owns
semitexa/platform-ui Skin domain: algorithms (SkinAlgorithm), token contract (41 tokens), LLM library (PromptResolverFactory, OutputValidator, RefinementResolver), grammar, primitives.
semitexa/skins-base CLI commands that orchestrate the domain, and the single framework-default skin.
semitexa/theme SkinDiscovery — finds skins in both framework (here) and project (src/skins/), resolves slugs to URLs.

The commands depend on platform-ui (for algorithms + token emitter + LLM resolvers) and theme (for SkinDiscovery / ProjectRoot). platform-ui does not depend on skins-base — it's a pure library.

Asset serving

Both framework default and project skins serve at the unified URL prefix:

/assets/skins/<slug>/tokens.css

The alias is registered at worker boot by Semitexa\Theme\Runtime\BootProjectSkinsAssetAliasListener — project first (higher priority), framework second (fallback). When a project skin and a framework skin share a slug, the project wins.

Extending

Projects never modify this package. To add a new skin, run skins:generate in the consumer project — output lands in that project's src/skins/ and is auto-discovered.

To change the framework default (rare — most projects just override via a project-local default skin), regenerate directly against this package:

bin/semitexa skins:generate balanced "#808080" --name=tmp-default --write
# then manually move tokens.css + skin.json from src/skins/tmp-default/ into
# vendor/semitexa/skins-base/src/Application/Static/skins/default/

The deliberate friction here reflects that the framework default is shared infrastructure, not an everyday edit.

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 12
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固