@typeroll/mcp-server 0.15.4 → 0.16.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/AGENTS.md CHANGED
@@ -103,9 +103,20 @@ maps to one HTTP endpoint; the actual logic runs in the customer's portal
103
103
  media URL (run `generate_image_variants` first) and optionally set
104
104
  `radius`. Note: the in-portal preview shows the plain `<img>` — the
105
105
  `<picture>` upgrade appears on the deployed site.
106
- - **`core/icon` / `core/icon_box` icons do not render yet** they
107
- emit `data-icon` placeholders awaiting an icon pipeline. Prefer
108
- numbered markers, emoji, or CSS shapes until that ships.
106
+ - **Icons render inline SVG** (since template_capabilities_version
107
+ 0.16.0). Every `type: 'icon'` schema field on `core/icon`,
108
+ `core/icon_box`, `core/step_card`, and custom block types renders
109
+ a stroke-based inline SVG when the value is a name from
110
+ `get_site_capabilities → core_icon_names` (a curated Lucide subset:
111
+ `check`, `star`, `shield-check`, `mail`, `arrow-right`, `zap`,
112
+ `truck`, `chart-line`, …). Any other value (emoji, plain text) is
113
+ rendered as escaped text, so emoji stand-ins keep working. Icons
114
+ size with `font-size` (the SVG is 1em) and paint with
115
+ `currentColor`. Custom block templates opt in by placing the derived
116
+ raw token `{{{<field>_svg}}}` where the icon should appear. On
117
+ pre-0.16.0 portals icons don't render — use emoji or CSS markers.
118
+ `core/tabs` label icons are the remaining gap (tab strip is built
119
+ client-side).
109
120
  - **`core/section` is natively full-bleed on block pages** (since
110
121
  template_capabilities_version 0.14.0): the section's background runs
111
122
  edge-to-edge and meets the header with zero gap; content inside is
@@ -424,6 +435,16 @@ update_page page_id=about patch={ slug: "om-oss" }
424
435
 
425
436
  The 301 fires automatically — you don't have to remember.
426
437
 
438
+ Redirect hygiene is automatic in both directions (since 0.16.1):
439
+
440
+ - When a **live** (published/unlisted) page takes over a URL — via slug/path
441
+ change, publish, or create — any redirect FROM that URL is retired; the
442
+ response lists them under `retired_redirects`. A real page always beats a
443
+ redirect (on Cloudflare Pages a redirect would otherwise shadow the page).
444
+ - When a page is **deleted**, auto-generated redirects pointing TO its URL
445
+ are removed (reported as `removed_redirects`). Manually created redirects
446
+ are kept — delete them yourself via `delete_redirect` if they're obsolete.
447
+
427
448
  ### "Change the site's fallback URL (slug)"
428
449
 
429
450
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typeroll/mcp-server",
3
- "version": "0.15.4",
3
+ "version": "0.16.1",
4
4
  "description": "Model Context Protocol server for the Typeroll public API. Use with Claude Code or any MCP-compatible client to manage a Typeroll site.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -172,9 +172,23 @@ Use **either** a background-color shift **or** a horizontal divider line at a se
172
172
 
173
173
  ### Sections are full-bleed; content is container-width
174
174
 
175
- The section element ALWAYS spans the full viewport (its bg, border, decorative line). Content inside is constrained by `.container` / `.container.narrow`.
176
-
177
- The renderer wraps `html_content` in `<main class="page-content">` with `max-width: var(--container-medium)` — so a section's bg-color rule alone gives a "1080px-wide stripe in the middle of the page", which is wrong. Every section that has a bg/border must apply the negative-margin escape:
175
+ The section element ALWAYS spans the full viewport (its bg, border, decorative line). Content inside is constrained to a readable column.
176
+
177
+ **Block-mode pages (the default):** this is native. Top-level
178
+ `core/section` blocks are full-bleed out of the box — set `background`
179
+ on the section and it runs edge-to-edge, meeting the header with zero
180
+ gap; the section's `width` field (narrow/normal/wide/full) constrains
181
+ the content column. **NEVER add 100vw negative-margin hacks on block
182
+ pages** — they double-bleed and break. Anchor ids / custom classes on
183
+ sections are safe from template_capabilities_version ≥ 0.15.3 (older
184
+ versions wrapped the section in a div and silently killed full-bleed —
185
+ there, put the anchor on a block inside the section).
186
+
187
+ **HTML-mode pages (`html_content`) only:** the renderer wraps the body
188
+ in `<main class="page-content">` with `max-width: var(--container-medium)`
189
+ — a section's bg-color rule alone gives a "1080px-wide stripe in the
190
+ middle of the page", which is wrong. Every section that has a bg/border
191
+ must apply the negative-margin escape:
178
192
 
179
193
  ```css
180
194
  .my-page .section {
@@ -266,13 +280,20 @@ Open in browser. Check:
266
280
  - **Dark themes need dark surface too.** Setting `background: #0f0f0f`
267
281
  but leaving `surface: #f8fafc` (white) breaks every card/input. Always
268
282
  update all 7 tokens as a set.
269
- - **The renderer's `.page-content` layout shell.** The renderer wraps
270
- `html_content` in `<main class="page-content">` with constrained
271
- `max-width` and default typography. The typography defaults now sit
272
- inside `:where()` so they have specificity 0 — a customer's class
273
- rules trivially win. The layout shell (width + padding) is still at
274
- normal specificity by design: it's what gives a brand-new page
283
+ - **The renderer's `.page-content` layout shell (html-mode only).** The
284
+ renderer wraps `html_content` in `<main class="page-content">` with
285
+ constrained `max-width` and default typography. The typography defaults
286
+ now sit inside `:where()` so they have specificity 0 — a customer's
287
+ class rules trivially win. The layout shell (width + padding) is still
288
+ at normal specificity by design: it's what gives a brand-new page
275
289
  reasonable margins out of the box. If a section needs to escape the
276
290
  shell (full-bleed bg, full-width hero), apply the negative-margin
277
291
  pattern shown in Step 4b. Don't fight the shell with `overflow-x`
278
- hacks.
292
+ hacks. Block-mode pages don't have the width problem — sections are
293
+ natively full-bleed there.
294
+ - **The shell's global `img` rule leaks into custom figures.** Both modes
295
+ apply `:where(.page-content) img { margin: …; border-radius: … }`. A
296
+ hand-built image card (rounded clipping wrapper around an `<img>`) gets
297
+ phantom margins inside the wrapper — visible as white bands above and
298
+ below the photo. Zero it explicitly in your figure CSS:
299
+ `.my-figure img { margin: 0; border-radius: 0 }`.
@@ -172,10 +172,19 @@ passing the whole tree inline (`block={ type: 'core/columns', slots:
172
172
  slot_index=0|1`. Requires template_capabilities_version ≥ 0.15.2 — on
173
173
  older sites use `core/grid` (children flow into columns) instead.
174
174
 
175
+ Icons (template_capabilities_version ≥ 0.16.0): `type: 'icon'` fields on
176
+ `core/icon`, `core/icon_box`, and `core/step_card` render inline SVG when
177
+ the value is a name from `get_site_capabilities → core_icon_names` (a
178
+ curated Lucide subset — `check`, `star`, `shield-check`, `mail`,
179
+ `arrow-right`, `truck`, `chart-line`, …). Any other value (emoji, plain
180
+ text) renders as text, so emoji stand-ins keep working. Icons inherit
181
+ size from font-size and color from `currentColor`/the block's color
182
+ field. On older sites icons don't render — use emoji or CSS markers.
183
+
175
184
  Known limitations (honest list — don't fight them):
176
185
 
177
- - **`core/icon` / `core/icon_box` icons don't render yet** (pending icon
178
- pipeline). Use `step_card` numbers, emoji, or CSS markers.
186
+ - **`core/tabs` label icons don't render** (the tab strip is built
187
+ client-side without the icon pipeline). Text labels only.
179
188
 
180
189
  Theming: block primitives render neutral. Brand color/typography comes
181
190
  from settings (step 2). For page-specific polish (e.g. a colored card