From 3ab62b1f728c3a351528d513084416c2324381cb Mon Sep 17 00:00:00 2001 From: William Zujkowski Date: Tue, 6 Oct 2026 00:35:00 -0400 Subject: [PATCH 1/2] feat(web): adopt USWDS civic design system, word-level redline diffs, and bump LTS deps --- apps/web/astro.config.mjs | 5 +- apps/web/package.json | 28 +- .../src/__tests__/markdown-sanitize.test.ts | 4 +- apps/web/src/components/CivicBanner.astro | 56 + apps/web/src/components/DiffViewer.svelte | 446 +- apps/web/src/components/ReadingToolbar.svelte | 119 + apps/web/src/components/SummaryBox.astro | 141 + apps/web/src/content.config.ts | 3 +- apps/web/src/layouts/BaseLayout.astro | 84 +- .../src/pages/browse/[title]/[chapter].astro | 2 +- apps/web/src/pages/index.astro | 211 +- apps/web/src/pages/statute/[...slug].astro | 64 +- apps/web/src/styles/global.css | 191 +- package.json | 21 +- packages/annotator/package.json | 8 +- packages/fetcher/package.json | 6 +- packages/shared/package.json | 6 +- packages/transformer/package.json | 10 +- packages/types/package.json | 6 +- pnpm-lock.yaml | 4490 ++++++++++------- 20 files changed, 3584 insertions(+), 2317 deletions(-) create mode 100644 apps/web/src/components/CivicBanner.astro create mode 100644 apps/web/src/components/ReadingToolbar.svelte create mode 100644 apps/web/src/components/SummaryBox.astro diff --git a/apps/web/astro.config.mjs b/apps/web/astro.config.mjs index bdf97ca..f1a026f 100644 --- a/apps/web/astro.config.mjs +++ b/apps/web/astro.config.mjs @@ -2,6 +2,7 @@ import { defineConfig } from 'astro/config'; import svelte from '@astrojs/svelte'; import tailwindcss from '@tailwindcss/vite'; import rehypeSanitize from 'rehype-sanitize'; +import { unified } from '@astrojs/markdown-remark'; export default defineConfig({ integrations: [svelte()], @@ -13,6 +14,8 @@ export default defineConfig({ // (e.g. , -
+
{#if loading} -

Loading history...

+

Loading version history...

{:else if error} -

{error}

+

{error}

{:else} - + {#if selectedTag && selectedTag !== currentTag} -
- +
+ - - Viewing historical version at {formatTagName(selectedTag)} — not current law. - + + Viewing historical version at {formatTagName(selectedTag)} — this is not current law. +
{/if} {#if tags.length > 0} - -
-
-

Version Timeline

-