@bytechain.cn/colamd-themes 0.6.2 → 0.7.1
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 +57 -4
- package/dist/build-info.json +5 -0
- package/dist/cli.js +252 -51
- package/dist/cli.js.map +1 -1
- package/dist/compat.d.ts +14 -0
- package/dist/compat.js +43 -7
- package/dist/compat.js.map +1 -1
- package/dist/export-cli.js +124 -20
- package/dist/export-cli.js.map +1 -1
- package/dist/extractors/local-html.d.ts +43 -0
- package/dist/extractors/local-html.js +338 -0
- package/dist/extractors/local-html.js.map +1 -0
- package/dist/extractors/url-extractor.d.ts +11 -2
- package/dist/extractors/url-extractor.js +11 -0
- package/dist/extractors/url-extractor.js.map +1 -1
- package/dist/generator.js +2 -2
- package/dist/generator.js.map +1 -1
- package/dist/models.d.ts +22 -0
- package/dist/models.js.map +1 -1
- package/dist/pdf-check.d.ts +42 -0
- package/dist/pdf-check.js +206 -0
- package/dist/pdf-check.js.map +1 -0
- package/dist/renderer.d.ts +27 -0
- package/dist/renderer.js +155 -10
- package/dist/renderer.js.map +1 -1
- package/dist/slides-markdown.d.ts +56 -0
- package/dist/slides-markdown.js +355 -6
- package/dist/slides-markdown.js.map +1 -1
- package/dist/slides.d.ts +8 -0
- package/dist/slides.js +76 -0
- package/dist/slides.js.map +1 -1
- package/dist/utils/output.d.ts +51 -0
- package/dist/utils/output.js +89 -0
- package/dist/utils/output.js.map +1 -0
- package/dist/validators.d.ts +5 -0
- package/dist/validators.js +29 -1
- package/dist/validators.js.map +1 -1
- package/mcp-server/dist/index.js +0 -0
- package/package.json +9 -5
- package/skills/build-skills.sh +15 -14
- package/skills/colamd-themes/SKILL.md +109 -13
- package/themes/8-bit-orbit.css +1 -0
- package/themes/README.md +4 -0
- package/themes/biennale-yellow.css +1 -0
- package/themes/block-frame.css +1 -0
- package/themes/blue-professional.css +1 -0
- package/themes/bold-poster.css +1 -0
- package/themes/broadside.css +1187 -837
- package/themes/capsule.css +1 -0
- package/themes/cartesian.css +1 -0
- package/themes/cobalt-grid.css +1 -0
- package/themes/coral.css +1 -0
- package/themes/creative-mode.css +1 -0
- package/themes/daisy-days.css +1 -0
- package/themes/editorial-forest.css +1 -0
- package/themes/editorial-tri-tone.css +1 -0
- package/themes/emerald-editorial.css +1 -0
- package/themes/grove.css +1 -0
- package/themes/long-table.css +1 -0
- package/themes/mat.css +1 -0
- package/themes/monochrome.css +1 -0
- package/themes/neo-grid-bold.css +1 -0
- package/themes/peoples-platform.css +1 -0
- package/themes/pin-and-paper.css +1 -0
- package/themes/pink-script.css +8 -1
- package/themes/playful.css +1 -0
- package/themes/retro-windows.css +1 -0
- package/themes/retro-zine.css +1 -0
- package/themes/sakura-chroma.css +1 -0
- package/themes/scatterbrain.css +1 -0
- package/themes/signal.css +1 -0
- package/themes/soft-editorial.css +1 -0
- package/themes/stencil-tablet.css +1 -0
- package/themes/vellum.css +1 -0
- package/dist/mermaid-presets.d.ts +0 -14
- package/dist/mermaid-presets.js +0 -122
- package/dist/mermaid-presets.js.map +0 -1
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
# ColaMD Themes — Universal AI Agent Skill
|
|
2
2
|
|
|
3
|
-
Generate, validate, export, and manage ColaMD **2.7 contract** CSS themes (2.7.13 anchor, slide layouts stable). Extract formatting from URLs, DOCX, or PDF sources (optionally with PPT `--slide-*` styling); convert Markdown into slide-deck Markdown; export Markdown to standalone HTML/PDF with themes applied; batch export; manage theme configuration.
|
|
3
|
+
Generate, validate, export, and manage ColaMD **2.7 contract** CSS themes (2.7.13 anchor, slide layouts stable). Extract formatting from URLs, DOCX, or PDF sources (optionally with PPT `--slide-*` styling); convert Markdown into slide-deck Markdown — structural fast path (`ppt`) or plan-first 总到分 condensed conversion for long documents; export Markdown to standalone HTML/PDF **or a 16:9 slide PDF** with themes applied; batch export; manage theme configuration.
|
|
4
|
+
|
|
5
|
+
## Quick tasks — one command, no back-and-forth
|
|
6
|
+
|
|
7
|
+
| 任务 | 命令 |
|
|
8
|
+
|---|---|
|
|
9
|
+
| markdown → 16:9 幻灯片 PDF(含生成、校验、导出、PDF 检查) | `colamd-themes ppt report.md` |
|
|
10
|
+
| 长文档 → 精炼幻灯片(总到分,先出 plan 审阅) | 见「总到分精炼生成」工作流 |
|
|
11
|
+
| 只要幻灯片 markdown(不要 PDF) | `colamd-themes ppt report.md --md-only` |
|
|
12
|
+
| 已有 deck markdown → 16:9 PDF | `colamd-themes export-slides deck.md` |
|
|
13
|
+
| markdown → 文档式 HTML / PDF | `colamd-themes export-html doc.md` / `export-pdf doc.md` |
|
|
14
|
+
| 从 URL / DOCX / PDF / HTML 提取主题 | `colamd-themes extract <source> -n my-theme` |
|
|
15
|
+
| 校验主题 CSS 或 deck markdown | `colamd-themes validate <file>` |
|
|
16
|
+
|
|
17
|
+
### Invocation rules (important for agents)
|
|
18
|
+
|
|
19
|
+
1. **One command per task.** `ppt` already chains to-slides → directive/content contract → 16:9 PDF → PDF-01~05. Do not call `to-slides` + `export-slides` + `check-pdf` yourself unless the user explicitly wants the intermediate deck.
|
|
20
|
+
1a. **Condensed (总到分) decks have a fixed sequence:** `validate <deck>.slides.md` once → fix only reported items (at most one fix pass) → `export-slides <deck>.slides.md` once (PDF checks run inside). Never run `ppt`/`to-slides` on an agent-authored deck.
|
|
21
|
+
2. **Do not re-validate.** Every producing command validates internally and only reports failures; a second `validate` call costs tokens and time without adding information.
|
|
22
|
+
3. **Do not read the artifacts back.** Use `--json` and read the one-line result (`ok`, paths, pages, `issues`). Only open the PDF/markdown when the user asks to inspect the content.
|
|
23
|
+
4. **Default output is one line.** `--json` → exactly one line of JSON; `--verbose` → detail lines; failures print only the failing items (`[RULE] message`).
|
|
24
|
+
5. **Stop on failure.** If exit code is 1, report the failing rules plus the one-line fix hint — do not loop, retry, or re-run the same command with the same input.
|
|
25
|
+
6. **Themes are optional.** Omit `-t` to use the configured default theme; pass a built-in name, a registered custom name, or a `.css` path.
|
|
26
|
+
7. **Agent-authored decks bypass `to-slides`/`ppt`.** A deck written from an approved plan already carries `<!-- deck -->` + per-page `<!-- slide: -->` directives; running `to-slides`/`ppt` on it would re-infer layouts and prepend a second, conflicting directive block.
|
|
27
|
+
|
|
28
|
+
Exit codes: `0` success · `1` contract/validation failure or input file not found · `2` theme resolution · `3` render failure · `4` invalid input · `99` unexpected.
|
|
4
29
|
|
|
5
30
|
## Prerequisites
|
|
6
31
|
|
|
@@ -34,9 +59,19 @@ and contrast rules (CR-02). `extract` auto-detects local `.html/.htm` too.
|
|
|
34
59
|
```bash
|
|
35
60
|
colamd-themes export-html <input.md> -t <theme> -o <output.html>
|
|
36
61
|
colamd-themes export-pdf <input.md> -t <theme> -o <output.pdf>
|
|
62
|
+
colamd-themes export-slides <deck.md> -t <theme> -o <output.pdf>
|
|
37
63
|
colamd-themes export <inputs...> --format html|pdf -t <theme> -d <dir>
|
|
38
64
|
```
|
|
39
65
|
|
|
66
|
+
> **`export-slides` vs `export-pdf`**: `export-slides` prints the live editor laid out as
|
|
67
|
+
> 16:9 sheets (deck chrome, hero centering, page breaks) and requires a deck markdown
|
|
68
|
+
> (with `<!-- deck ... -->` or `<!-- slide: ... -->`). `export-pdf` renders the semantic
|
|
69
|
+
> document DOM and produces A4/Letter/A3.
|
|
70
|
+
>
|
|
71
|
+
> Both check the produced PDF automatically. A deck export that would spill a page onto
|
|
72
|
+
> a second sheet is rewritten at a slightly smaller sheet type size so every declared page
|
|
73
|
+
> stays on exactly one sheet; `PDF-03` (pages = deck pages) must pass.
|
|
74
|
+
|
|
40
75
|
> **Token-saving by default**: exports are optimized automatically. When the source
|
|
41
76
|
> markdown contains no math (`$$`, `$...$`, `\(..\)`, `\begin{..}`), the inlined
|
|
42
77
|
> base64 KaTeX fonts are stripped from the HTML artifact, shrinking a typical
|
|
@@ -165,8 +200,6 @@ title: 报告标题
|
|
|
165
200
|
meta: 2026.11 · 汇报版
|
|
166
201
|
-->
|
|
167
202
|
|
|
168
|
-
---
|
|
169
|
-
|
|
170
203
|
<!-- slide: kpi
|
|
171
204
|
kicker: Executive Summary
|
|
172
205
|
label: 核心数据速览
|
|
@@ -183,7 +216,7 @@ chapter: Act I · 数据
|
|
|
183
216
|
- `<!-- slide: 名字 … -->` 页头块:**仅页首生效**(该页第一个真实内容之前);第一行是版式名 `[a-z][a-z0-9-]*`,后续行是字段 `kicker / label / chapter`。单行 `<!-- slide: cover -->` 与 `<!-- slide-kicker: … -->` 旧写法兼容。
|
|
184
217
|
- 页角色由 Markdown 结构决定:一页第一个标题(h1/h2 同权)是页标题,标题后第一段是导语,标题前紧邻段落兜底当 kicker。
|
|
185
218
|
- `<!-- slide-css h1 { … } -->` 页内 CSS 微调(白名单清洗,拒 `position: absolute/fixed`、`z-index`、伪协议);`<!-- slide-js … -->` 页内脚本(放映沙箱执行,导出不执行)。
|
|
186
|
-
- deck 块配置每页 chrome:logo / brand / title / meta
|
|
219
|
+
- deck 块配置每页 chrome:logo / brand / title / meta,文档顶部写一次;deck 块之后**直接写第一页内容,不要紧跟 `---`**(否则 deck 块被单独切成一页,导出多一张空白首页)。
|
|
187
220
|
|
|
188
221
|
### 11 built-in layouts
|
|
189
222
|
|
|
@@ -193,24 +226,74 @@ chapter: Act I · 数据
|
|
|
193
226
|
| `section` | 一个短标题 + 一句说明,大留白 |
|
|
194
227
|
| `agenda` | 有序列表 3-6 项 `**章名** 说明` |
|
|
195
228
|
| `kpi` | 无序列表 2-6 项 `**数字+单位** 说明` |
|
|
196
|
-
| `timeline` | 列表项带年份/日期 `**2019 年**
|
|
229
|
+
| `timeline` | 列表项带年份/日期 `**2019 年** 事件`,3-6 项 |
|
|
197
230
|
| `steps` | 有序列表 3-5 项 `**步骤名** 说明` |
|
|
198
231
|
| `matrix` | 无序列表 3-8 项 `**名称** 说明` |
|
|
199
232
|
| `two-col` | 两个 h2 对半(左论点/右证据) |
|
|
200
233
|
| `figure` | 图片 / Mermaid / 表格为主体的页 |
|
|
201
234
|
| `quote` | 引用块为主体的页,引用后一行可作署名 |
|
|
202
|
-
| `closing` |
|
|
235
|
+
| `closing` | 末页行动清单,2-8 项 |
|
|
203
236
|
|
|
204
237
|
未声明版式的页自动走默认文章版式;未知版式名无害降级。
|
|
205
238
|
|
|
206
|
-
### Markdown → PPT Markdown
|
|
239
|
+
### Markdown → PPT Markdown → 16:9 PDF
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
# 一键:生成 deck + 校验 + 导出 16:9 PDF + PDF 内容检查
|
|
243
|
+
colamd-themes ppt report.md
|
|
244
|
+
colamd-themes ppt report.md -t elegant -d out/ --deck-brand "品牌" --deck-title "年度报告" --deck-meta "2026.11"
|
|
245
|
+
|
|
246
|
+
# 分步(需要中间产物时)
|
|
247
|
+
colamd-themes to-slides report.md -o report.slides.md
|
|
248
|
+
colamd-themes export-slides report.slides.md -t elegant
|
|
249
|
+
colamd-themes check-pdf report.slides.pdf -d report.slides.md
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
按内容结构自动分页并推断上述 11 种版式,生成 deck 块与页头块(kicker/chapter 随章节推进)。
|
|
253
|
+
|
|
254
|
+
**内容适配(默认开启,`--no-adapt` 关闭)**:生成时按版式契约补齐 `**行标题**`、kpi 无数字 / timeline 无日期时降级为 matrix、列表超量拆续页(`label: 标题(续)`)、超长段落按句末拆页。项数沿用上游约定(agenda 3-6、kpi 2-6、timeline 3-6、steps 3-5、matrix 3-8、closing 2-8),超出才拆页。
|
|
255
|
+
|
|
256
|
+
导出时如果任一页在平台默认 24px 版式字号下超过单页高度,会自动按比例微调纸面字号(不低于 0.6),保证 `PDF-03`(页数 = deck 页数)通过。
|
|
257
|
+
|
|
258
|
+
### 总到分精炼生成(长文档 → 精炼幻灯片)
|
|
259
|
+
|
|
260
|
+
`ppt`/`to-slides` 是**结构快路径**:只切页打标签,原文逐块照搬,适合短文档。长文档直接走它会产出冗长、未提炼的 deck。此时改用本工作流——**总到分**总结提炼内容、落盘 plan 审阅、按有效内容选版式、一次性生成,不反复拉锯。方法论参考 guizang-ppt-skill:幻灯片只放「观众此刻必须看见的结论、结构和证据」。
|
|
261
|
+
|
|
262
|
+
**阶段① 总**:通读源文档,产出全局总结(核心结论 2-3 句)+ 叙事弧(Hook 钩子 / Context 定调 / Core 主体 / Shift 转折 / Takeaway 收束)+ 章节划分与页数预算(按 11 版式契约项数与单页容量:≤14 行、每行 ≤46 字估算)。
|
|
263
|
+
|
|
264
|
+
**阶段② 分**:写 `<name>.plan.md`(与源 md 同目录),逐页规划:
|
|
265
|
+
|
|
266
|
+
```markdown
|
|
267
|
+
# Deck Plan — <title>
|
|
268
|
+
- source: report.md · pages: 14 · theme: elegant · date: 2026-11-22
|
|
269
|
+
- 全局总结: <2-3 句:核心结论 + 叙事弧>
|
|
270
|
+
- 章节: A开篇(1-2) B…(3-7) C…(8-12) D收束(13-14)
|
|
271
|
+
|
|
272
|
+
| 页 | 版式 | 章节/kicker | 页面目的 | 有效内容(浓缩后) | 选版理由 |
|
|
273
|
+
|---|---|---|---|---|---|
|
|
274
|
+
| 1 | cover | — | 定调 | h1 主标 / h2 副标 / 导语一句 | 首页契约 |
|
|
275
|
+
| 2 | agenda | A·开篇 | 路线图 | 4 章 `**章名** 一句话` | 有序 4 项 ∈3-6 |
|
|
276
|
+
| … | … | … | … | … | … |
|
|
277
|
+
|
|
278
|
+
每页容量核对: 估算行数 ≤14、行宽 ≤46 字;项数符合版式契约。
|
|
279
|
+
删减清单: 丢弃 <背景铺垫/过渡段/重复细节>;保留 <结论/数据/证据/引言/行动项>。
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
- **浓缩规则**:丢弃背景铺垫、过渡段、hedging、不带数字/结论的次要例子;保留结论、数据、证据、直接引语、决策/行动项。超容量先删文案或拆页(`label: 标题(续)`),**不压字号**。
|
|
283
|
+
- **版式选择(按有效内容形状)**:有数字→kpi、有日期→timeline、有序→agenda/steps、无序并列→matrix、双 h2→two-col、图/表/Mermaid→figure、金句→quote、末页行动→closing、单标题+一句→section。
|
|
284
|
+
- **kicker/chapter 去重**:chapter = 跨页稳定的栏目标签;kicker = 本页独一份钩子短句;两者不互相翻译。
|
|
285
|
+
- **节奏**:避免连续 3 页同版式;每 3-4 页插一个 section 呼吸页;cover 开场、closing 收尾。
|
|
286
|
+
|
|
287
|
+
**审阅门**:plan 文件交用户确认后才进入阶段③;用户对 plan 的修改直接改进生成输入,避免生成后反复翻修。
|
|
288
|
+
|
|
289
|
+
**阶段③ 生成**:依已确认 plan **一次性**写出 `<name>.slides.md`(deck 块 + 每页 `<!-- slide: -->` 指令,语法见 Directive syntax),然后固定序列:
|
|
207
290
|
|
|
208
291
|
```bash
|
|
209
|
-
|
|
210
|
-
|
|
292
|
+
npx tsx src/cli.ts validate <name>.slides.md --json # 第 1 次 — 只修报告项(至多一轮)
|
|
293
|
+
npx tsx src/cli.ts export-slides <name>.slides.md -t <theme> --json # PDF-01…05 内嵌
|
|
211
294
|
```
|
|
212
295
|
|
|
213
|
-
|
|
296
|
+
- **不反复拉锯**:从已确认 plan 单次生成;validate 至多两次(首轮 + 一轮修复),第二次仍失败即停并报告(Stop on failure),只补丁报告行、绝不整篇重生成;export 仅一次。**禁止**对手写 deck 调用 `ppt`/`to-slides`(会重复生成指令块)。
|
|
214
297
|
|
|
215
298
|
### Slide rule validation
|
|
216
299
|
|
|
@@ -223,6 +306,8 @@ colamd-themes validate deck.md
|
|
|
223
306
|
- **SLIDES-03** (SHOULD):未知版式名(无害降级)
|
|
224
307
|
- **SLIDES-04/05** (MUST_NOT):页头块字段键 ∉ kicker/label/chapter、deck 键 ∉ logo/brand/title/meta
|
|
225
308
|
- **SLIDES-06** (MUST_NOT):slide-css 含 `position: absolute/fixed`、`z-index`、伪协议 URL
|
|
309
|
+
- **SLIDES-07** (SHOULD):版式内容不匹配——项数超出契约、缺少 `**行标题**`、kpi 无数字、timeline 无日期、figure/quote/two-col 缺少对应主体
|
|
310
|
+
- **SLIDES-08** (SHOULD):估算单页内容超容量,导出时可能把一页挤出两张纸
|
|
226
311
|
|
|
227
312
|
### Export PDF content checks (PDF-01…05, v0.6.2)
|
|
228
313
|
|
|
@@ -261,7 +346,7 @@ colamd-themes from-url <URL> -n my-brand --ppt sans # presets: serif | sans |
|
|
|
261
346
|
- **v0.6.1 全量版式令牌**:`from-html` 模板来源提供设计提示(`--sz-*` 字号阶梯 + template.json 的 mood/density/formality/scheme)时,生成 **24 个按页类型定制的令牌**——封面/章节/收页字号阶梯取自模板 display/body 比例,页标题 / KPI / 引言 / kicker / chrome / 页边距按气质(bold/quiet/tech)与密度调校;`--ppt` 不带值时信任按 display 字体自动判定的预设。无设计提示的主题保持仅品牌层输出(向后兼容)。
|
|
262
347
|
- 自定义主题 CSS 在 slides.css 之后加载,`:root` 同权重后到先赢;不要写 `body.theme-custom`(文档契约死选择器)。
|
|
263
348
|
- 手写主题里的幻灯片规则须遵守:**SLIDE-01** (SHOULD) 只用已知令牌;**SLIDE-02** (MUST_NOT) `.cm-md-page-*` / `.cm-md-slide-*` / `.slide-chrome|foot|ghost` 必须包裹在 `body.presenting` 或 `body.slides-printing` 作用域下(裸写污染编辑视图);**SLIDE-03** (SHOULD) 标题字体栈含中文字族并以 generic family 结尾。
|
|
264
|
-
- 平台需 ≥ 2.7.13 才消费这些令牌(compat
|
|
349
|
+
- 平台需 ≥ 2.7.13 才消费这些令牌(compat 行「幻灯片版式」);旧平台下令牌惰性。文档式 `export-html` / `export-pdf` 仍是文章排版;需要真正的 16:9 幻灯片 PDF 用 `export-slides` / `ppt`(compat 行「PPT 导出」,要求 lib 暴露 `enterSlidesPrintLayout` / `exitSlidesPrintLayout`,旧平台会给出可操作的升级命令)。
|
|
265
350
|
|
|
266
351
|
## 2.7 Contract Constraints
|
|
267
352
|
|
|
@@ -300,8 +385,19 @@ slide theme (`themes/<slug>.css`) with strict fidelity. Full methodology:
|
|
|
300
385
|
editor/export rules → §4 print.
|
|
301
386
|
5. **Validate**: `npx tsx src/cli.ts validate themes/<slug>.css` must report
|
|
302
387
|
contract pass + slide-layout support + zero SLIDE- / SLIDES- / CSS-03
|
|
303
|
-
findings. Paradigm
|
|
304
|
-
the file header
|
|
388
|
+
findings. Paradigm deviations (SL- / CR- / NT- rules) are allowed only for
|
|
389
|
+
identity items documented in the file header, and must be declared
|
|
390
|
+
machine-readably so `validate` stays green in batch/CI:
|
|
391
|
+
|
|
392
|
+
```css
|
|
393
|
+
/* colamd-allow: SL-01, CR-04 */
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
Only identity-rule families are waivable; contract/mechanical rules
|
|
397
|
+
(`CSS-*`, `SLIDE-*`, `SLIDES-*`) cannot be waived, and waived items are
|
|
398
|
+
still reported under `waived` in `--json`. Never waive a real contrast
|
|
399
|
+
problem — darken the text color instead (e.g. accent stays decorative,
|
|
400
|
+
links get a ≥4.5:1 shade).
|
|
305
401
|
|
|
306
402
|
### Fidelity checklist (walk every page)
|
|
307
403
|
|
package/themes/8-bit-orbit.css
CHANGED
package/themes/README.md
CHANGED
|
@@ -19,6 +19,10 @@ colamd-themes export-html doc.md -t themes/vellum.css -o out.html
|
|
|
19
19
|
|
|
20
20
|
在 ColaMD 应用(≥2.7.13)内:*主题 > 导入主题* 或将 `.css` 放入 `~/.colamd/themes/` 即可放映使用。
|
|
21
21
|
|
|
22
|
+
本目录所有主题均通过 `colamd-themes validate`。模板刻意保留的设计身份偏差(纸底/纸面
|
|
23
|
+
饱和度、装饰色对比度等)以文件内 `/* colamd-allow: SL-01, CR-04 */` 机器可读地声明,
|
|
24
|
+
批量校验与 CI 因此保持绿色,豁免项仍会在 `validate --json` 的 `waived` 中列出。
|
|
25
|
+
|
|
22
26
|
| slug | 名称 | 气质 | 预设 | 明暗 | 显示字体 | 正文字体 | surface | ink | accent |
|
|
23
27
|
|---|---|---|---|---|---|---|---|---|---|
|
|
24
28
|
| 8-bit-orbit | 8-Bit Orbit | retro-tech · playful · cyberpunk | sans | dark | Tektur | Chakra Petch | #0a0e27 | #f0a6ca | #f4d03f |
|
package/themes/block-frame.css
CHANGED