From a27bbec59af233be5f60dbc509106bbddd0fcabf Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Sun, 1 Nov 2026 18:39:14 +0100 Subject: [PATCH] docs: plan Astro migration Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01WzxdWXTUM9dpnCS2wtFkx4 --- web_ui/TODO-astro-port.md | 73 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 web_ui/TODO-astro-port.md diff --git a/web_ui/TODO-astro-port.md b/web_ui/TODO-astro-port.md new file mode 100644 index 0000000..c3cb1d5 --- /dev/null +++ b/web_ui/TODO-astro-port.md @@ -0,0 +1,73 @@ +# Port @kuhyx/web-ui from React to Astro + vanilla TS + +## what +kuhy chose one framework for every web UI: Astro, with no React islands. This +package is the first blocker. `RangeSlider` is its only React export. It +becomes `RangeSlider.astro` plus a `` custom element. The +pure-TS helpers and the CSS stay as they are. Every repo's +`TODO-astro-migration.md` waits for the tag this produces. + +## steps +1. Keep these as they are: `quantile.ts` (`nth`, `clamp01`, `quantileValue`, + `valueQuantile`, `fractionFromPointer`), `stepped-value.ts` (`keyTarget`, + `steppedValue`), `text.ts` (`fuzzyMatch`), `tokens.css`, `range-slider.css`. +2. Write `src/range-slider-element.ts`, a `RangeSliderElement extends HTMLElement` + registered as `range-slider`. Inputs: a `values` property (number[]), `lo` and + `hi` attributes, a `label` attribute, and a `format` property (a function). + Output: a bubbling `change` CustomEvent with `{ lo, hi }`. Keep the current + DOM: two `