From 30a861f910ddcbc2a473a56342afbd92dcd96792 Mon Sep 17 00:00:00 2001 From: xfy Date: Fri, 26 Jun 2026 14:07:42 +0800 Subject: [PATCH] =?UTF-8?q?docs(agents):=20=E6=96=B0=E5=A2=9E=20yggdrasil-?= =?UTF-8?q?core=20=E5=AD=90=E5=B7=A5=E7=A8=8B=E7=AB=A0=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 与 lightbox/tiptap-editor 并列,记录用途、构建、注入方式与 主题展开动画的 View Transitions 实现。同步更新 make test 注释 与 Build Artifacts 列表。 --- AGENTS.md | 19 ++++++++++++++++--- src/theme.rs | 5 +++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index f9213a4..2ebb69a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,7 +15,7 @@ make build # build-editor → highlight-css → tailwindcss → doc → make build-linux # same as build but targets x86_64-unknown-linux-musl make css # one-shot CSS make css-watch # watch mode -make test # cargo test + vitest (tiptap-editor + lightbox libs) +make test # cargo test + vitest (tiptap-editor + lightbox + yggdrasil-core libs) make doc # cargo doc (ayu 主题) → 拷贝到 public/doc/,随 build 发布 make doc-open # 同 doc,生成后自动用浏览器打开(本地预览,不拷贝) make clean # cargo clean + rm public/style.css @@ -150,6 +150,18 @@ Image lightbox (click-to-zoom) in `libs/lightbox/`, built as an IIFE library. Un Do not edit `public/lightbox/` — they are build artifacts. +## Yggdrasil-Core Subproject + +Core JavaScript bundle in `libs/yggdrasil-core/`, built as an IIFE library exposing `window.__initPostContent` and `window.__startThemeTransition` (and future core JS entry points). This is the designated home for all new core JS — add to it rather than creating new `public/js/` scripts. + +- Output: `public/yggdrasil-core/` (`yggdrasil-core.js`, `yggdrasil-core.css`, `yggdrasil-core.js.map`) +- `make build` runs `npm ci --include=dev && npm run build` inside `libs/yggdrasil-core`; the `build` script is `tsc --noEmit && vite build` (Vite 8 / Rolldown, type-check before bundle). Source is ES module, output is IIFE (`formats: ['iife']` in `vite.config.ts`) because Dioxus `[web.resource] script` injects bare `