|
| 1 | +# 100 More Upgrades — v3.6 (101-200) |
| 2 | + |
| 3 | +Round-2 catalog. Deduplicated against `docs/UPGRADES-100.md`. Sources at bottom. |
| 4 | + |
| 5 | +## K. Native HTML primitives (101-110) |
| 6 | +101. **`<dialog>` modal** wrapper component — top-layer + focus trap + Esc + backdrop |
| 7 | +102. **Popover API** primitive — `popovertarget` / `popovertargetaction` / `popover-target` |
| 8 | +103. **Anchor positioning** — `anchor-name` / `position-anchor` / `position-area` for tooltips |
| 9 | +104. **`<details name="X">`** exclusive accordion (replaces ARIA accordion JS) |
| 10 | +105. **Customizable `<select>`** — `appearance: base-select` + `<selectedoption>` shadow part |
| 11 | +106. **`<search>` element** — semantic wrapper for the Cmd+K palette + site search |
| 12 | +107. **`field-sizing: content`** auto-sizing textarea + select |
| 13 | +108. **`accent-color: var(--color-accent)`** — themed checkboxes, radios, progress |
| 14 | +109. **`caret-color: var(--color-accent)`** — branded text caret |
| 15 | +110. **`@property --brand-hue { syntax: '<number>'; ... }`** — registered custom property animations |
| 16 | + |
| 17 | +## L. Edge runtime + serverless (111-120) |
| 18 | +111. **Cloudflare Pages Functions** at `functions/api/contact.ts` — Resend / Slack / Discord webhook |
| 19 | +112. **`functions/api/newsletter.ts`** — Listmonk SMTP relay |
| 20 | +113. **`functions/api/turnstile.ts`** — Turnstile token verification |
| 21 | +114. **`functions/api/reports/csp.ts`** — CSP violation log receiver |
| 22 | +115. **Workers AI route** at `functions/api/ai/chat.ts` — Llama 3.3 / Claude via AI Gateway |
| 23 | +116. **Hono router** under `/api/*` for typed handlers |
| 24 | +117. **D1 stub** schema + migration scaffolding |
| 25 | +118. **R2 stub** for image uploads |
| 26 | +119. **KV stub** for cache + session |
| 27 | +120. **Workers Tracing (OTLP)** — `[observability] enabled = true` in `wrangler.jsonc` |
| 28 | + |
| 29 | +## M. AI-native UX (121-130) |
| 30 | +121. **`<AiChat>` component** — Cmd+K-style chat overlay, streams from `/api/ai/chat` |
| 31 | +122. **`<AskAnything>` inline search** with model-routed answers (search vs RAG vs chat) |
| 32 | +123. **AI-generated FAQ ideas** — script that calls Claude to expand FAQ from a brief |
| 33 | +124. **AI image alt-text generator** — script that proposes alt for uploaded images |
| 34 | +125. **AI-rewrite suggestions** — slash command in dev for copy improvements |
| 35 | +126. **AI summary slot** — `<AiSummary text={postBody} />` renders a 2-sentence TL;DR |
| 36 | +127. **Speakable JSON-LD** on the lead paragraph (voice-assistant pickup) |
| 37 | +128. **GEO citation tracker** — script that probes Perplexity for citations of the domain |
| 38 | +129. **Tone-checker** — Vitest rule that fails build on banned-slop words |
| 39 | +130. **`window.__brand` global** exposing the resolved brand for any chat / AI agent in-page |
| 40 | + |
| 41 | +## N. Real-time + collaboration (131-140) |
| 42 | +131. **EventSource (SSE)** stub at `functions/api/live/visitors.ts` |
| 43 | +132. **`<LiveVisitorCount>`** component that streams active visitors |
| 44 | +133. **Web Push** declarative skeleton (Safari 18.4+) |
| 45 | +134. **Web Locks API** — coordinate critical actions across tabs |
| 46 | +135. **Broadcast Channel API** — same-origin tab sync (theme + cart) |
| 47 | +136. **Web Share API** wrapper — share current page |
| 48 | +137. **Clipboard API** — copy-link button for blog posts |
| 49 | +138. **Media Session API** — bind media controls when a `<VideoEmbed>` plays |
| 50 | +139. **Picture-in-Picture toggle** on video embeds |
| 51 | +140. **`navigator.scheduling.isInputPending()`** for INP-friendly background work |
| 52 | + |
| 53 | +## O. Auth + payments + forms (141-150) |
| 54 | +141. **WebAuthn passkey login** — `<PasskeyLogin>` with `autocomplete="username webauthn"` + conditional UI |
| 55 | +142. **Magic-link login stub** — `functions/api/auth/magic.ts` |
| 56 | +143. **Stripe Checkout link generator** — `lib/stripe.ts` with brand-aware product builder |
| 57 | +144. **Stripe `<PriceTag>`** — server-fetched price with `loading="lazy"` |
| 58 | +145. **Multi-step form** primitive with progress bar + back/forward |
| 59 | +146. **Form autosave** to `IndexedDB` on each field change |
| 60 | +147. **Optimistic likes/reactions** — `useOptimistic` on blog posts |
| 61 | +148. **Real-time form validation** with `useDeferredValue` |
| 62 | +149. **`requestIdleCallback`** for non-critical analytics events |
| 63 | +150. **Newsletter double-opt-in** flow via Resend / Listmonk |
| 64 | + |
| 65 | +## P. Content + search + i18n (151-160) |
| 66 | +151. **Pagefind** — static-site search build step + `<SearchPalette>` integration |
| 67 | +152. **RSS feed** — `public/rss.xml` auto-built from blog content |
| 68 | +153. **Atom feed** — `public/atom.xml` alongside RSS |
| 69 | +154. **JSON Feed** — `public/feed.json` (jsonfeed.org v1.1) |
| 70 | +155. **MDX-ready blog** content scaffolding |
| 71 | +156. **i18n stub** — `src/lib/i18n.ts` with `useTranslation(key)`, locale switch via `?lang=` |
| 72 | +157. **`<link rel="alternate" hreflang>`** per supported locale |
| 73 | +158. **`lang`-aware date/number formatting** via `Intl.DateTimeFormat` + `Intl.NumberFormat` |
| 74 | +159. **RTL support** — `dir="rtl"` opt-in via `brand.locale.dir` |
| 75 | +160. **Sitemap with `<xhtml:link rel="alternate">`** per locale |
| 76 | + |
| 77 | +## Q. Animation + interaction polish (161-170) |
| 78 | +161. **Scroll-driven progress bar** — top-of-page using `animation-timeline: scroll(root)` |
| 79 | +162. **Magnetic button** hover — small JS that nudges the button toward the cursor |
| 80 | +163. **Marquee on hover-pause** improved with `animation-play-state: paused` |
| 81 | +164. **Parallax image** via `animation-timeline: view()` |
| 82 | +165. **Cursor spotlight** — pointer-tracked radial gradient (decorative, no JS animation) |
| 83 | +166. **Page-corner crests** — rotating badges |
| 84 | +167. **Numbered list reveal** — staggered count-up |
| 85 | +168. **Confetti on conversion** via canvas-confetti (lazy) |
| 86 | +169. **`@starting-style` toast** entry animation |
| 87 | +170. **`prefers-reduced-motion`** double-pass — every new animation respects it |
| 88 | + |
| 89 | +## R. Brand customizer + DX (171-180) |
| 90 | +171. **`/studio`** route — live brand picker (hue, chroma, mode, fonts) that mutates `_brand.json` in-memory |
| 91 | +172. **`<input type="color">`** for primary / accent (with OKLCH conversion) |
| 92 | +173. **`<input type="range">`** for brandHue with `accent-color` |
| 93 | +174. **Export `_brand.json`** download button on the studio |
| 94 | +175. **Apply preset** dropdown reading `examples/_brand.*.json` |
| 95 | +176. **`npm run brand:preview`** runs `vite preview` on the brand at a temp port |
| 96 | +177. **`npm run new:section`** scaffolds a section component matching AGENTS.md conventions |
| 97 | +178. **`npm run new:page`** scaffolds a route + sitemap entry + Cmd+K action |
| 98 | +179. **Vite plugin** that inlines critical CSS at build time |
| 99 | +180. **Vite plugin** that emits a per-route preload manifest |
| 100 | + |
| 101 | +## S. Privacy + security + accessibility deep cuts (181-190) |
| 102 | +181. **Trusted Types policies** at runtime — `trustedTypes.createPolicy('default', ...)` |
| 103 | +182. **CSP report-only** initially, then enforced — `Content-Security-Policy-Report-Only` header |
| 104 | +183. **`<iframe sandbox>`** locked-down for `<Demo>` embeds |
| 105 | +184. **`<iframe credentialless>`** for cross-origin iframes |
| 106 | +185. **Subresource Integrity (SRI)** on external CDN scripts (none currently — preempt future) |
| 107 | +186. **`aria-keyshortcuts`** on Cmd+K + theme toggle + skip-link |
| 108 | +187. **Focus-trap utility** — small lib for new dialog/popover wrappers |
| 109 | +188. **`role="status"` + `aria-live="polite"`** on the live counter / brand-swap announcer |
| 110 | +189. **`prefers-reduced-data: reduce`** — skip the gallery card images, show 4-cell wireframes |
| 111 | +190. **`@scope`** isolation for the `/studio` route so its experimental CSS doesn't leak |
| 112 | + |
| 113 | +## T. Analytics + observability + RUM (191-200) |
| 114 | +191. **Cloudflare Web Analytics beacon** — auto-injected via `_headers` snippet |
| 115 | +192. **PostHog snippet** with `persistence: 'memory'` (cookie-free) |
| 116 | +193. **Sentry init** with `withSentry` wrapper on Pages Functions |
| 117 | +194. **GA4 via GTM** — 14-step automation per skill 13 |
| 118 | +195. **Plausible / Fathom / Umami** opt-in via `brand.analytics.provider` |
| 119 | +196. **Real User Monitoring**: `web-vitals` library + soft-nav (replaces hand-rolled perfMonitor) |
| 120 | +197. **Error boundary breadcrumb** posts to `/api/reports/error` |
| 121 | +198. **`navigation.timing`** parsed + emitted as `navigation_*` events |
| 122 | +199. **Resource Timing** events for slow asset loads (>500ms) |
| 123 | +200. **Lighthouse CI** GitHub Action that comments on PRs with deltas |
| 124 | + |
| 125 | +## Sources |
| 126 | + |
| 127 | +- [Popover API + Anchor Positioning — MDN](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API/Using) |
| 128 | +- [Native Dialog + Popover — web.dev](https://web.dev/learn/css/popover-and-dialog) |
| 129 | +- [Cloudflare Pages vs Workers 2026](https://www.morphllm.com/comparisons/cloudflare-pages-vs-workers) |
| 130 | +- [Workers AI](https://www.cloudflare.com/products/workers-ai/) · [AI Gateway](https://www.cloudflare.com/products/ai-gateway/) |
| 131 | +- [WebAuthn Conditional UI — Corbado](https://www.corbado.com/blog/webauthn-conditional-ui-passkeys-autofill) |
| 132 | +- [WebAuthn passwordless sign-in — Chrome](https://developer.chrome.com/docs/identity/webauthn-conditional-ui) |
| 133 | +- [`field-sizing` — MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/field-sizing) |
| 134 | +- [`interpolate-size` — CSS-Tricks](https://css-tricks.com/almanac/properties/i/interpolate-size/) |
| 135 | +- [`text-wrap: pretty` — Chrome](https://developer.chrome.com/blog/css-text-wrap-pretty) |
| 136 | +- [`text-box-trim` — Chrome](https://developer.chrome.com/blog/css-text-box-trim) |
| 137 | +- [Pagefind static-site search](https://pagefind.app/) |
0 commit comments