app: cherry-pick rune's pause and sound fixes onto the checkout
Rune comes from app/vendor/rune now, a checkout of 63ad0209 on branch ported, carrying the four commits of upstream issues 1320 (a pause while a clip is layered holds the layer's picture and time) and 1325 (a video's sound is read ahead of the clock and leads it). Both were written against eb9f1104 and ported across the refactors since. The faults are the first two and the third in docs/rune-upstream.md; the app's workarounds in review.rs stay until the fixes arrive upstream.
No files matched your search
@@ -0,0 +1,5 @@
|
||||
node_modules/
|
||||
dist/
|
||||
.cloudflare/
|
||||
# Built by scripts/build.ts from www/app; never committed.
|
||||
src/wasm/
|
||||
@@ -0,0 +1,83 @@
|
||||
# Rune www
|
||||
|
||||
Rune's public page, written in Rune. The whole page is one Rune app, `app/` (package `rune-www`), in web document
|
||||
mode: the browser scrolls a semantic mirror of it (headings, paragraphs, real links, landmarks), and the canvas draws
|
||||
the part in view. The same app writes its own static HTML with `--html`, which is the page's first paint and what
|
||||
crawlers, readers without WebGPU and readers without JavaScript get.
|
||||
|
||||
- `bun run build`: builds `app/` to wasm (`src/wasm/`, size-optimized with LTO and `wasm-opt`), typechecks, bundles
|
||||
`src/main.ts` and the Worker with Vite, then runs the native app with `--html` to write `index.html` and `404.html`,
|
||||
and adds `robots.txt`, `sitemap.xml` and `llms.txt`, into `.cloudflare/output/v0/workers/default/assets/` (Build
|
||||
Output for the `cf` CLI). `--mode dev` builds for dev.anoma.ly: `noindex` on every page and a `Disallow: /`
|
||||
robots.txt. `--no-opt` skips the size passes for a quicker, larger build.
|
||||
- `bun run serve`: serves the build through `worker.ts` with brotli, close to what Cloudflare does, at
|
||||
`http://127.0.0.1:4253/rune/`. It caches compressed files, so restart it after a build.
|
||||
- `bun run check`: typecheck only. `cargo test -p rune-www` tests the app.
|
||||
|
||||
The build needs Rust with the `wasm32-unknown-unknown` target, the `wasm-bindgen` CLI at the version in `Cargo.lock`
|
||||
and binaryen's `wasm-opt`. Unset `RUSTC_WRAPPER` if you use a compiler cache, so it can't undo the path stripping
|
||||
`scripts/web-build.sh` does.
|
||||
|
||||
Copy and sections live in `app/src/`: the hero and its live card in `hero.rs`, the rest in `sections.rs`, the spring
|
||||
demo in `springs.rs`, the frame diagram in `pipeline.rs`, the wordmark in `wordmark.rs` and colours, type and spacing in
|
||||
`tokens.rs`. Headings state the point of their section, not a topic. The tree is the same at every width and only
|
||||
styles change at the breakpoints, so the static page switches them with `@media` rules.
|
||||
|
||||
## Loading
|
||||
|
||||
`index.html` is the template (title, description, Open Graph and Twitter cards, canonical URL); `scripts/build.ts`
|
||||
fills it in, adds JSON-LD, and the app writes the page's body into it, laid out at each breakpoint. That page paints
|
||||
on its own with no script.
|
||||
|
||||
`src/main.ts` then loads Rune, only where `navigator.gpu` exists, and only after the static page has painted its
|
||||
largest text, so the wasm never competes with it. Rune's first frame matches the static page, then hides the static
|
||||
copy (it stays in the DOM, inert, so nothing shifts). Without WebGPU, or if the wasm fails, the static page stays.
|
||||
|
||||
The wasm isn't committed: Rune's history is public and keeps every file forever. CI builds it before every deploy,
|
||||
which is why changes to Rune deploy the page too.
|
||||
|
||||
## Hosting and deploys
|
||||
|
||||
The page is served at https://anoma.ly/rune and https://dev.anoma.ly/rune.
|
||||
|
||||
- A push to `dev` that touches `www/` or Rune deploys https://dev.anoma.ly/rune (Worker `rune-www-dev`).
|
||||
- A push to `production` that touches `www/` or Rune deploys https://anoma.ly/rune (Worker `rune-www-production`). To
|
||||
release, fast-forward it to `dev`: `git push origin dev:production`.
|
||||
- A pull request runs the tests and the dev build and deploys nothing.
|
||||
|
||||
`.github/workflows/www.yml` runs `bun run build` and `cf deploy --prebuilt` with the `CLOUDFLARE_API_TOKEN` and
|
||||
`CLOUDFLARE_ACCOUNT_ID` secrets, the same ones the docs site uses.
|
||||
|
||||
`cloudflare.config.ts` defines both environments, selected by the build mode. `worker.ts` redirects other hosts to the
|
||||
canonical one, strips the base path `/rune` (from `src/base.ts`), serves the static files and sets cache headers:
|
||||
hashed assets (the wasm and its glue) for a year; images and fonts for a day, then revalidated. `workers.dev` and
|
||||
preview URLs are off.
|
||||
|
||||
## Images and fonts
|
||||
|
||||
`bun run images` cuts the page's images from Rune's own headless renders in `demo/` and the docs site's shots into
|
||||
AVIF at the widths the page shows, into `public/img/`. The widths and aspect ratios match the `Picture`s in
|
||||
`app/src/sections.rs`, which hand the browser a `srcset` so it picks one size; every image has its box before it loads.
|
||||
|
||||
The metal, glass and light stills are drawn by `examples/site-scenes`, which runs rune-fx and rune-light headless at
|
||||
2x over a frame Rune draws. Their PNGs aren't committed, only the cut images, so render them before `bun run images`:
|
||||
|
||||
```sh
|
||||
cargo run --release -p site-scenes # all three, into target/site-scenes/
|
||||
cargo run --release -p site-scenes -- --only glass --t 2.5
|
||||
```
|
||||
|
||||
`--t` is the effect clock in seconds; the liquid metal's flow and the light's sway depend on it.
|
||||
|
||||
`bun run icons` draws the favicons, app icons and `og.png` from the wordmark's pixels in `src/brand/pixels.ts`.
|
||||
|
||||
The Geist fonts in `public/fonts/` are TTF, because Rune loads fonts by URL and doesn't read WOFF2; the static page
|
||||
uses the same files.
|
||||
|
||||
## Motion
|
||||
|
||||
Nothing moves on first paint, and an idle page draws no frames. The wordmark's ᚱ catches a light on hover, and now and
|
||||
then in the masthead while it's on screen. The hero card's switch and puck, and the spring demo, run `rune-motion`'s
|
||||
springs, so a retarget keeps the current velocity and a held puck follows the finger without animation. The frame
|
||||
diagram runs once when it comes into view and again on a click. Under reduced motion, travel becomes a short fade and
|
||||
the idle light stays off.
|
||||
@@ -0,0 +1,25 @@
|
||||
[package]
|
||||
name = "rune-www"
|
||||
version = "0.0.1"
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
description = "Rune's home page, drawn by Rune."
|
||||
publish = false
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib", "rlib"]
|
||||
|
||||
[[bin]]
|
||||
name = "rune-www"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
rune = { workspace = true }
|
||||
rune-kit = { workspace = true, default-features = true }
|
||||
rune-motion = { workspace = true }
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
wasm-bindgen = { workspace = true }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
@@ -0,0 +1,133 @@
|
||||
//! Code examples cut from Rune's own source when the page is built, so an example can't drift
|
||||
//! from the code it shows. A piece starts at the first line beginning with `from` (attributes
|
||||
//! above it come along) and ends at `to`, just before `until`, or at the closing brace at the
|
||||
//! starting line's indent. A marker that stops matching fails the tests.
|
||||
|
||||
use rune::{El, Span, col, rich, row, text};
|
||||
use rune_kit::syntax::{Paint, Syntax, highlight};
|
||||
|
||||
use crate::REPO;
|
||||
use crate::tokens::*;
|
||||
use crate::ui::hairline;
|
||||
|
||||
const HELLO: &str = include_str!("../../../examples/hello/src/main.rs");
|
||||
const SPRING_TESTS: &str = include_str!("../../../crates/rune-motion/tests/integration/spring.rs");
|
||||
|
||||
/// Where a snippet ends.
|
||||
#[derive(Clone, Copy)]
|
||||
pub enum End {
|
||||
/// Just before the first later line starting with this, trailing blank lines dropped.
|
||||
Until(&'static str),
|
||||
/// At the first line from the start that starts with this.
|
||||
To(&'static str),
|
||||
/// At the closing brace at the first line's indent.
|
||||
Brace,
|
||||
}
|
||||
|
||||
pub struct Snippet {
|
||||
pub file: &'static str,
|
||||
source: &'static str,
|
||||
from: &'static str,
|
||||
end: End,
|
||||
}
|
||||
|
||||
pub const HELLO_VIEW: Snippet = Snippet { file: "examples/hello/src/main.rs", source: HELLO, from: "fn view(", end: End::Until("fn main()") };
|
||||
pub const HELLO_TEST: Snippet = Snippet { file: "examples/hello/src/main.rs", source: HELLO, from: " fn a_tap_flips_the_switch", end: End::Brace };
|
||||
pub const RETARGET: Snippet = Snippet {
|
||||
file: "crates/rune-motion/tests/integration/spring.rs",
|
||||
source: SPRING_TESTS,
|
||||
from: "fn animated_value_retargets_keeping_velocity",
|
||||
end: End::To(" assert!((a.velocity(0.1) - v1).abs()"),
|
||||
};
|
||||
|
||||
/// A cut: the code and the 1-based lines it came from.
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub struct Cut {
|
||||
pub code: String,
|
||||
pub start: usize,
|
||||
pub end: usize,
|
||||
}
|
||||
|
||||
fn indent(line: &str) -> usize {
|
||||
line.len() - line.trim_start().len()
|
||||
}
|
||||
|
||||
impl Snippet {
|
||||
pub fn cut(&self) -> Option<Cut> {
|
||||
let lines: Vec<&str> = self.source.trim_end_matches('\n').split('\n').collect();
|
||||
let first = lines.iter().position(|l| l.starts_with(self.from))?;
|
||||
let mut start = first;
|
||||
while start > 0 && lines[start - 1].trim().starts_with("#[") {
|
||||
start -= 1;
|
||||
}
|
||||
let end = match self.end {
|
||||
End::Until(until) => {
|
||||
let mut end = (first + 1..lines.len()).find(|&i| lines[i].starts_with(until))?.checked_sub(1)?;
|
||||
while end > first && lines[end].trim().is_empty() {
|
||||
end -= 1;
|
||||
}
|
||||
end
|
||||
}
|
||||
End::To(to) => (first..lines.len()).find(|&i| lines[i].starts_with(to))?,
|
||||
End::Brace => {
|
||||
let close = format!("{}}}", &lines[first][..indent(lines[first])]);
|
||||
(first + 1..lines.len()).find(|&i| lines[i].trim_end() == close)?
|
||||
}
|
||||
};
|
||||
let taken = &lines[start..=end];
|
||||
let pad = taken.iter().filter(|l| !l.trim().is_empty()).map(|l| indent(l)).min().unwrap_or(0);
|
||||
let mut out: Vec<String> = taken.iter().map(|l| l.get(pad..).unwrap_or("").to_owned()).collect();
|
||||
// A block cut short keeps its shape: an elision inside, then its closing brace.
|
||||
let joined = out.join("\n");
|
||||
if joined.matches('{').count() > joined.matches('}').count() {
|
||||
let lead = " ".repeat(indent(lines[first]).saturating_sub(pad));
|
||||
out.push(format!("{lead} // …"));
|
||||
out.push(format!("{lead}}}"));
|
||||
}
|
||||
Some(Cut { code: out.join("\n"), start: start + 1, end: end + 1 })
|
||||
}
|
||||
}
|
||||
|
||||
fn paint(kind: Syntax) -> rune::Color {
|
||||
match kind {
|
||||
Syntax::Keyword => code_keyword(),
|
||||
Syntax::String | Syntax::Number => code_string(),
|
||||
Syntax::Function => code_call(),
|
||||
Syntax::Comment => fg3(),
|
||||
Syntax::Punctuation => fg2(),
|
||||
_ => fg(),
|
||||
}
|
||||
}
|
||||
|
||||
/// `code` as Rust, coloured like the rest of the page's code.
|
||||
pub fn colored(code: &str) -> Vec<Span> {
|
||||
highlight(Some("rust"), code)
|
||||
.iter()
|
||||
.map(|(range, p)| {
|
||||
let color = match p {
|
||||
Paint::Kind(k) => paint(*k),
|
||||
Paint::Color(c) => *c,
|
||||
};
|
||||
Span::new(range.start, range.end).color(color)
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// A code block: the file and lines it came from, linked to GitHub, over the code.
|
||||
pub fn block(key: &str, s: &Snippet) -> El {
|
||||
let Some(cut) = s.cut() else { return col().key(key) };
|
||||
let href = format!("{REPO}/blob/dev/{}#L{}-L{}", s.file, cut.start, cut.end);
|
||||
let file = format!("{}:{}–{}", s.file, cut.start, cut.end);
|
||||
let lines_from = s.file.len();
|
||||
let head = row().key("head").w_full().justify_between().gap(16.0).px(16.0).py(8.0)
|
||||
.child(row().key("source").href(href).shrink().hover_group()
|
||||
.child(rich(file.clone(), vec![Span::new(0, lines_from).color(fg2()), Span::new(lines_from, file.len()).color(fg3())])
|
||||
.font(MONO_12).color(fg2()).wrap_anywhere().shrink().group_color(fg())))
|
||||
.child(text("Rust").font(MONO_12).color(fg3()));
|
||||
let body = col().key("scroll").w_full().scroll_x()
|
||||
.child(rich(cut.code.clone(), colored(&cut.code)).key("code").font(CODE).color(fg()).selectable(true).padding(16.0));
|
||||
col().key(key).role("figure").w_full().min_w(0.0).radius(R2).fill(surface1()).border(1.0, line()).clip_rounded(R2)
|
||||
.child(head)
|
||||
.child(hairline("rule"))
|
||||
.child(body)
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
//! The hero: the wordmark, the claim, the lede and two buttons, beside a live card you can play
|
||||
//! with (a switch, a spring picker and a puck to throw along a track). Nothing on it moves
|
||||
//! until you touch it.
|
||||
|
||||
use rune::tok;
|
||||
use rune::{Color, Cx, Drag, El, Phase, Spring, TextStyle, Tx, col, el, oklch, oklcha, row, text};
|
||||
|
||||
use crate::tokens::*;
|
||||
use crate::ui::{Button, button, prose};
|
||||
use crate::wordmark::{Glow, wordmark};
|
||||
use crate::{DOCS, REPO, State};
|
||||
|
||||
const SPRINGS: [(&str, Spring); 3] =
|
||||
[("Snappy", Spring::new(0.25, 0.0)), ("Smooth", Spring::new(0.4, 0.0)), ("Bouncy", Spring::new(0.5, 0.3))];
|
||||
const CARD_W: f32 = 376.0;
|
||||
const STAGE_H: f32 = 320.0;
|
||||
const PUCK: f32 = 28.0;
|
||||
const STOPS: usize = 4;
|
||||
|
||||
pub struct Card {
|
||||
pub on: bool,
|
||||
pub spring: usize,
|
||||
/// The puck's position along the track, 0 to 1.
|
||||
pub at: f32,
|
||||
}
|
||||
|
||||
impl Default for Card {
|
||||
fn default() -> Self {
|
||||
Self { on: true, spring: 2, at: 0.0 }
|
||||
}
|
||||
}
|
||||
|
||||
fn snap(at: f32) -> f32 {
|
||||
let n = (STOPS - 1) as f32;
|
||||
(at * n).round() / n
|
||||
}
|
||||
|
||||
fn switch(c: &Card) -> El {
|
||||
let t = tok::theme(true);
|
||||
let (w, h, k) = (44.0, 26.0, 22.0);
|
||||
let inset = (h - k) / 2.0;
|
||||
el().key("switch").role("switch").label("Lights").checked(c.on).focusable(true)
|
||||
.size(w, h).radius(h / 2.0)
|
||||
.fill(if c.on { ink() } else { t.control_off })
|
||||
.motion(SPRINGS[c.spring].1)
|
||||
.on_press(|s: &mut State| s.card.on = !s.card.on)
|
||||
.child(el().key("knob").size(k, k).radius(k / 2.0).fill(t.knob)
|
||||
.absolute(if c.on { w - k - inset } else { inset }, inset)
|
||||
.shadow(1.0, 3.0, t.knob_shadow))
|
||||
}
|
||||
|
||||
fn picker(c: &Card, seg: f32) -> El {
|
||||
let t = tok::theme(true);
|
||||
let (h, pad) = (32.0, 3.0);
|
||||
let mut segs = row().key("springs");
|
||||
for (i, (name, _)) in SPRINGS.into_iter().enumerate() {
|
||||
let selected = i == c.spring;
|
||||
segs = segs.child(
|
||||
el().key(name).role("radio").label(name).checked(selected).focusable(true)
|
||||
.size(seg, h - 2.0 * pad).center()
|
||||
.on_press(move |s: &mut State| s.card.spring = i)
|
||||
.child(text(name).font(TextStyle::new(13.0, 500.0)).color(if selected { t.text } else { t.text_secondary })),
|
||||
);
|
||||
}
|
||||
el().key("picker").role("radiogroup").label("Spring").size(seg * 3.0 + 2.0 * pad, h).radius(h / 2.0).fill(t.control_track)
|
||||
.child(el().key("thumb").size(seg, h - 2.0 * pad).radius((h - 2.0 * pad) / 2.0)
|
||||
.absolute(pad + seg * c.spring as f32, pad)
|
||||
.fill(oklcha(1.0, 0.0, 0.0, 0.12))
|
||||
.motion(SPRINGS[c.spring].1))
|
||||
.child(segs.absolute(pad, pad))
|
||||
}
|
||||
|
||||
fn track(c: &Card, track_w: f32) -> El {
|
||||
let t = tok::theme(true);
|
||||
let travel = track_w - PUCK;
|
||||
let to_at = move |x: f32| ((x - PUCK / 2.0) / travel).clamp(0.0, 1.0);
|
||||
let mut stops = row().key("stops").w(travel).h(PUCK).absolute(PUCK / 2.0, 0.0);
|
||||
for i in 0..STOPS {
|
||||
let x = travel * i as f32 / (STOPS - 1) as f32;
|
||||
stops = stops.child(el().key(format!("stop-{i}")).size(4.0, 4.0).radius(2.0)
|
||||
.fill(oklcha(1.0, 0.0, 0.0, 0.22)).absolute(x - 2.0, PUCK / 2.0 - 2.0));
|
||||
}
|
||||
el().key("track").role("slider").label("Puck").range_value(f64::from(c.at), 0.0, 1.0)
|
||||
.range_step(1.0 / (STOPS - 1) as f64)
|
||||
.on_step(|s: &mut State, steps, _| s.card.at = snap(s.card.at + steps as f32 / (STOPS - 1) as f32).clamp(0.0, 1.0))
|
||||
.size(track_w, PUCK)
|
||||
.motion(SPRINGS[c.spring].1)
|
||||
.on_drag(move |s: &mut State, d: &mut Drag, tx: &mut Tx| match d.phase {
|
||||
Phase::Down => {
|
||||
d.data = s.card.at;
|
||||
let puck = PUCK / 2.0 + s.card.at * travel;
|
||||
if (d.x - puck).abs() > PUCK / 2.0 + 4.0 {
|
||||
// Tapped the track: the puck springs to the nearest stop, keeping its speed.
|
||||
s.card.at = snap(to_at(d.x));
|
||||
}
|
||||
}
|
||||
Phase::Move => {
|
||||
let puck = PUCK / 2.0 + d.data * travel;
|
||||
let grab = if (d.start_x - puck).abs() <= PUCK / 2.0 + 4.0 { d.start_x - puck } else { 0.0 };
|
||||
s.card.at = to_at(d.x - grab);
|
||||
tx.instant();
|
||||
}
|
||||
Phase::Up => {
|
||||
s.card.at = if d.cancelled() { d.data } else { snap(s.card.at) };
|
||||
}
|
||||
})
|
||||
.child(el().key("rail").size(travel, 2.0).radius(1.0).fill(t.control_off)
|
||||
.absolute(PUCK / 2.0, PUCK / 2.0 - 1.0).a11y_hidden())
|
||||
.child(el().key("lit").size(travel * c.at, 2.0).radius(1.0).fill(ink())
|
||||
.absolute(PUCK / 2.0, PUCK / 2.0 - 1.0).a11y_hidden())
|
||||
.child(stops.a11y_hidden())
|
||||
.child(el().key("puck").size(PUCK, PUCK).radius(PUCK / 2.0).fill(t.knob)
|
||||
.absolute(travel * c.at, 0.0)
|
||||
.shadow(2.0, 8.0, oklcha(0.0, 0.0, 0.0, 0.5)).a11y_hidden())
|
||||
}
|
||||
|
||||
fn line_of(key: &str, label: &str, control: El) -> El {
|
||||
let t = tok::theme(true);
|
||||
row().key(key).w_full().h(36.0).center_y()
|
||||
.child(text(label.to_owned()).font(TextStyle::new(14.0, 400.0)).color(t.text_secondary).grow(1.0))
|
||||
.child(control)
|
||||
}
|
||||
|
||||
/// The live card in its black stage, with a caption.
|
||||
fn live(c: &Card, cx: &Cx<State>, bp: Bp) -> El {
|
||||
let stage = cx.layout_size("stage").map_or(520.0, |[w, _]| w);
|
||||
let card_w = (stage - 16.0).clamp(280.0, CARD_W);
|
||||
let pad = if card_w < CARD_W { 20.0 } else { 32.0 };
|
||||
let inner = card_w - 2.0 * pad;
|
||||
let seg = ((inner - 76.0) / 3.0).min(88.0);
|
||||
let card = col().key("card").w(card_w).padding(pad).gap(16.0).radius(20.0)
|
||||
.fill(oklch(0.17, 0.006, 265.0))
|
||||
.border(1.0, oklcha(1.0, 0.0, 0.0, 0.08))
|
||||
.child(line_of("lights", "Lights", switch(c)))
|
||||
.child(line_of("spring", "Spring", picker(c, seg)))
|
||||
.child(el().key("gap").h(8.0))
|
||||
.child(track(c, inner));
|
||||
let live = col().key("live").role("figure").min_w(0.0)
|
||||
.child(col().key("stage").w_full().h(STAGE_H).center().radius(R2).fill(Color::BLACK).border(1.0, line()).child(card))
|
||||
.child(text("Drawn by Rune, live. Flip the switch, pick a spring, throw the puck.").key("caption")
|
||||
.font(TEXT_13).color(fg3()).wrap().mt(12.0));
|
||||
if bp.stack_hero() { live.w_full() } else { live.w(520.0) }
|
||||
}
|
||||
|
||||
pub fn hero(s: &State, cx: &Cx<State>, bp: Bp, glow: Glow) -> El {
|
||||
let cell = cx.layout_with("hero-text", {
|
||||
let width = s.glyphs.width as f32;
|
||||
move |r| (r[2] / width).floor().clamp(2.0, 10.0) as u8
|
||||
}).unwrap_or(8);
|
||||
let reduced = cx.is_reduced_motion();
|
||||
let masthead = col().key("masthead").w_full().label("Rune").role("image")
|
||||
.on_hover_change(|s: &mut State, on: bool, _tx: &mut Tx| if on { let now = s.clock_now(); s.glints.masthead(now) })
|
||||
.on_visible(move |s: &mut State, on: bool, _tx: &mut Tx| {
|
||||
let now = s.clock_now();
|
||||
s.glints.masthead_visible(on, reduced, now);
|
||||
})
|
||||
.child(wordmark(&s.glyphs, f32::from(cell), glow));
|
||||
let text_col = col().key("hero-text").min_w(0.0);
|
||||
let text_col = if bp.stack_hero() { text_col.w_full() } else { text_col.w(0.0).grow(1.0) };
|
||||
let text_col = text_col
|
||||
.child(masthead)
|
||||
.child(text("A Rust UI framework that draws every frame itself, at 120\u{a0}Hz.").key("hero-h").role("heading").level(1)
|
||||
.font(bp.h1()).color(fg()).wrap().selectable(true).max_w(bp.h1().size * 16.0).mt(if bp.phone() { 32.0 } else { 48.0 }))
|
||||
.child(prose("lede", "Rune brings its own GPU renderer, text, layout and springs. Views are plain Rust, a small app's first window opens in about 300\u{a0}ms, and the same code runs on macOS, Windows, Linux, iOS and the web.", bp.lede(), fg2())
|
||||
.max_w(MEASURE).mt(24.0))
|
||||
.child(row().key("actions").flex_wrap().gap(12.0).mt(32.0)
|
||||
.child(button("github", "View on GitHub", REPO, Button::GitHub))
|
||||
.child(button("guide", "Read the guide", DOCS, Button::Secondary)));
|
||||
let body = if bp.stack_hero() { col().gap(48.0) } else { row().gap(64.0).center_y() };
|
||||
body.key("hero").w_full()
|
||||
.pt(if bp.stack_hero() { 32.0 } else { 64.0 }).pb(128.0)
|
||||
.child(text_col)
|
||||
.child(live(&s.card, cx, bp))
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
//! Rune's home page, drawn by Rune. The page is one Rune app in web document mode: the browser
|
||||
//! scrolls a semantic mirror of it (real headings, paragraphs and links), and the canvas draws
|
||||
//! the band in view. `--html` exports the same tree as the static first frame, so the page reads
|
||||
//! before the wasm arrives and without it.
|
||||
|
||||
#![forbid(unsafe_code)]
|
||||
|
||||
use std::collections::HashSet;
|
||||
use std::time::Duration;
|
||||
|
||||
use rune::time::Instant;
|
||||
use rune::{AppSpec, Cx, El, ImageCache, Tx, col, memo};
|
||||
|
||||
mod code;
|
||||
mod hero;
|
||||
mod pipeline;
|
||||
mod sections;
|
||||
mod springs;
|
||||
mod tokens;
|
||||
mod ui;
|
||||
mod wordmark;
|
||||
|
||||
use sections::{HELLO, HOME, LIGHT, GLASS, METAL, SESSION, STREAMING, ready};
|
||||
use tokens::*;
|
||||
use wordmark::{Glints, Glyphs, Which};
|
||||
|
||||
pub const TITLE: &str = "Rune · A Rust UI framework with its own GPU renderer";
|
||||
pub const REPO: &str = "https://github.com/anomalyco/rune";
|
||||
pub const DOCS: &str = "https://github.com/anomalyco/rune/blob/dev/crates/rune/README.md";
|
||||
/// The home page, relative to the site's host.
|
||||
pub const BRAND: &str = "/rune/";
|
||||
/// The commit the Cargo line pins: the one the site was built from.
|
||||
pub const REV: &str = match option_env!("RUNE_REV") {
|
||||
Some(rev) => rev,
|
||||
None => "dev",
|
||||
};
|
||||
/// How long the copy button says "Copied".
|
||||
const COPIED: f64 = 1.6;
|
||||
|
||||
pub struct State {
|
||||
glyphs: Glyphs,
|
||||
card: hero::Card,
|
||||
spring: springs::Demo,
|
||||
pipeline: pipeline::Pipeline,
|
||||
glints: Glints,
|
||||
images: Option<ImageCache>,
|
||||
/// The sections whose pictures the reader has reached: below-the-fold files are asked for
|
||||
/// then, so a first scroll isn't competing with seven decodes and uploads.
|
||||
seen: HashSet<&'static str>,
|
||||
copied_until: Option<f64>,
|
||||
/// The frame's time, in seconds since start, and when it was read.
|
||||
clock: (f64, Instant),
|
||||
not_found: bool,
|
||||
}
|
||||
|
||||
impl State {
|
||||
fn new() -> State {
|
||||
State {
|
||||
glyphs: Glyphs::new(),
|
||||
card: hero::Card::default(),
|
||||
spring: springs::Demo::default(),
|
||||
pipeline: pipeline::Pipeline::default(),
|
||||
glints: Glints::default(),
|
||||
images: None,
|
||||
seen: HashSet::new(),
|
||||
copied_until: None,
|
||||
clock: (0.0, rune::time::now()),
|
||||
not_found: not_found(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Now, on the frame clock: for handlers, which run between frames.
|
||||
fn clock_now(&self) -> f64 {
|
||||
self.clock.0 + self.clock.1.elapsed().as_secs_f64()
|
||||
}
|
||||
|
||||
fn copied(&mut self) {
|
||||
self.copied_until = Some(self.clock_now() + COPIED);
|
||||
}
|
||||
}
|
||||
|
||||
/// The 404 page is exported natively with `RUNE_WWW_PAGE=404`; the browser never runs it.
|
||||
fn not_found() -> bool {
|
||||
rune::env::var("RUNE_WWW_PAGE").is_some_and(|p| p == "404")
|
||||
}
|
||||
|
||||
fn poll(s: &mut State, t: f64, tx: &mut Tx) -> bool {
|
||||
s.clock = (t, rune::time::now());
|
||||
let mut changed = false;
|
||||
let mut moving = false;
|
||||
let was = s.spring.running();
|
||||
let on = s.spring.tick(t);
|
||||
changed |= was || on;
|
||||
moving |= on;
|
||||
let was = s.pipeline.active();
|
||||
let on = s.pipeline.tick(t);
|
||||
changed |= was || on;
|
||||
moving |= on;
|
||||
let (glinted, glinting, next) = s.glints.tick(t);
|
||||
changed |= glinted;
|
||||
moving |= glinting;
|
||||
if let Some(next) = next {
|
||||
tx.wake_after(Duration::from_secs_f64((next - t).max(0.0)));
|
||||
}
|
||||
if let Some(until) = s.copied_until {
|
||||
if t >= until {
|
||||
s.copied_until = None;
|
||||
changed = true;
|
||||
} else {
|
||||
tx.wake_after(Duration::from_secs_f64(until - t));
|
||||
}
|
||||
}
|
||||
if moving {
|
||||
tx.wake_after(Duration::ZERO);
|
||||
}
|
||||
changed
|
||||
}
|
||||
|
||||
fn view(s: &State, cx: &mut Cx<State>) -> El {
|
||||
let bp = cx.layout_with("page", |r| Bp::of(r[2])).unwrap_or(Bp { at: 1000 });
|
||||
let reduced = cx.is_reduced_motion();
|
||||
let t = s.clock.0;
|
||||
let gutter = bp.gutter();
|
||||
let framed = |e: El| e.w_full().max_w(CONTENT + 2.0 * gutter).px(gutter);
|
||||
let main = if s.not_found { col().child(sections::not_found(bp)) } else { home(s, cx, bp, reduced) };
|
||||
col().key("page").w_full().fill(BG).items_center()
|
||||
.child(framed(sections::topbar(s, s.glints.glow(Which::Brand, t, reduced))))
|
||||
.child(framed(main.key("main").role("main")))
|
||||
.child(framed(sections::footer()))
|
||||
}
|
||||
|
||||
fn home(s: &State, cx: &Cx<State>, bp: Bp, reduced: bool) -> El {
|
||||
let images = s.images.as_ref();
|
||||
let glow = s.glints.glow(Which::Masthead, s.clock.0, reduced);
|
||||
let springs = sections::springs_intro(bp)
|
||||
.child(springs::demo(s, cx, bp))
|
||||
.child(memo("retarget", bp, sections::retarget_code));
|
||||
let frame = sections::frame_intro(bp).child(pipeline::pipeline(&s.pipeline, cx.layout_size("pl"), bp, reduced));
|
||||
let (hello, _hello) = ready(images, cx, &[&HELLO]);
|
||||
// The rest of the page's pictures arrive when their section does; an export outside a browser
|
||||
// has every file on disk and writes them all.
|
||||
let eager = cfg!(not(target_arch = "wasm32"));
|
||||
let shown = |name: &str| eager || s.seen.contains(name);
|
||||
let (gallery, _gallery) = if shown("renderer") { ready(images, cx, &[&METAL, &GLASS, &LIGHT]) } else { (Vec::new(), Vec::new()) };
|
||||
let (shots, _shots) = if shown("opencode") { ready(images, cx, &[&SESSION, &HOME, &STREAMING]) } else { (Vec::new(), Vec::new()) };
|
||||
col().w_full()
|
||||
.child(hero::hero(s, cx, bp, glow))
|
||||
.child(memo("views", (bp, hello), || sections::views(cx, images, bp)))
|
||||
.child(springs)
|
||||
.child(frame)
|
||||
.child(memo("renderer", (bp, gallery), || sections::gallery(cx, images, bp)))
|
||||
.child(memo("opencode", (bp, shots), || sections::opencode(cx, images, bp)))
|
||||
.child(memo("agents", bp, || sections::agents(bp)))
|
||||
.child(memo("platforms", bp, || sections::platforms(bp)))
|
||||
.child(sections::cta(bp, s.copied_until.is_some()))
|
||||
}
|
||||
|
||||
pub fn spec() -> AppSpec<State> {
|
||||
AppSpec {
|
||||
families: ("Geist", "Geist Mono"),
|
||||
setup: Some(|s, waker| s.images = Some(ImageCache::new(waker))),
|
||||
poll: Some(poll),
|
||||
..AppSpec::new(TITLE, (1200.0, 900.0), State::new, view)
|
||||
}
|
||||
}
|
||||
|
||||
/// The page as an app: document mode, with the page's own font files.
|
||||
pub fn app() -> rune::App<State> {
|
||||
rune::App::new(spec()).web_document().font_url("fonts/geist.ttf").font_url("fonts/geist-mono.ttf")
|
||||
}
|
||||
|
||||
#[cfg_attr(target_arch = "wasm32", wasm_bindgen::prelude::wasm_bindgen(start))]
|
||||
pub fn start() {
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
if let Err(error) = app().try_run() {
|
||||
log_error(&error);
|
||||
}
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
app().run();
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
#[wasm_bindgen::prelude::wasm_bindgen]
|
||||
extern "C" {
|
||||
#[wasm_bindgen(js_namespace = console, js_name = error)]
|
||||
fn log_error(message: &str);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
@@ -0,0 +1,5 @@
|
||||
#![forbid(unsafe_code)]
|
||||
|
||||
fn main() {
|
||||
rune_www::start();
|
||||
}
|
||||
@@ -0,0 +1,235 @@
|
||||
//! One frame's path as a row of steps (a column on a phone). When it comes into view a light
|
||||
//! runs along it once, warming each step as it passes; a click runs it again. Under reduced
|
||||
//! motion the steps light together and fade.
|
||||
|
||||
use rune::{Color, El, col, el, row, text};
|
||||
|
||||
use crate::State;
|
||||
use crate::tokens::*;
|
||||
|
||||
pub const STEPS: [(&str, &str); 7] = [
|
||||
("Input", "pointer, keys, text"),
|
||||
("State", "your struct, changed"),
|
||||
("View", "your view, called again"),
|
||||
("Diff", "keyed, against the last"),
|
||||
("Layout", "flex and grid, by Taffy"),
|
||||
("Springs", "position and velocity"),
|
||||
("Draw", "one instanced draw"),
|
||||
];
|
||||
|
||||
/// Seconds from the first step to the last.
|
||||
const TRAVEL: f64 = 1.8;
|
||||
const RISE: f64 = 0.06;
|
||||
/// Cooling time constant: a lit step fades, it never cuts out.
|
||||
const TAU: f64 = 0.32;
|
||||
const COMET: f32 = 64.0;
|
||||
const GAP_ROW: f32 = 12.0;
|
||||
const GAP_COL: f32 = 8.0;
|
||||
|
||||
fn smootherstep(x: f64) -> f64 {
|
||||
let x = x.clamp(0.0, 1.0);
|
||||
x * x * x * (x * (x * 6.0 - 15.0) + 10.0)
|
||||
}
|
||||
|
||||
/// When the head passes step `i`, in seconds after the start.
|
||||
fn passes(i: usize) -> f64 {
|
||||
let target = i as f64 / (STEPS.len() - 1) as f64;
|
||||
let (mut lo, mut hi) = (0.0, 1.0);
|
||||
for _ in 0..18 {
|
||||
let m = (lo + hi) / 2.0;
|
||||
if smootherstep(m) < target { lo = m } else { hi = m }
|
||||
}
|
||||
lo * TRAVEL
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Pipeline {
|
||||
/// When the light set off, while it's lit.
|
||||
start: Option<f64>,
|
||||
/// When the reduced-motion fade began, while it shows.
|
||||
fade: Option<f64>,
|
||||
played: bool,
|
||||
visible: bool,
|
||||
/// The time the view draws.
|
||||
t: f64,
|
||||
}
|
||||
|
||||
/// What a frame of the light looks like.
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub struct Light {
|
||||
pub heat: [f32; 7],
|
||||
/// Where the head is (0 to 1 along the steps) and how bright.
|
||||
pub head: f32,
|
||||
pub comet: f32,
|
||||
}
|
||||
|
||||
impl Light {
|
||||
const DARK: Light = Light { heat: [0.0; 7], head: 0.0, comet: 0.0 };
|
||||
}
|
||||
|
||||
impl Pipeline {
|
||||
pub fn active(&self) -> bool {
|
||||
self.start.is_some() || self.fade.is_some()
|
||||
}
|
||||
|
||||
pub fn play(&mut self, now: f64, reduced: bool) {
|
||||
if reduced {
|
||||
self.fade = Some(now);
|
||||
} else {
|
||||
self.start = Some(now);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_visible(&mut self, on: bool, now: f64, reduced: bool) {
|
||||
self.visible = on;
|
||||
if !on {
|
||||
// Off screen: finish cooled, without drawing the rest.
|
||||
self.start = None;
|
||||
self.fade = None;
|
||||
} else if !self.played {
|
||||
self.played = true;
|
||||
self.play(now, reduced);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn light(&self) -> Light {
|
||||
if let Some(f) = self.fade {
|
||||
let s = self.t - f;
|
||||
let h = if s < 0.75 { smootherstep(s / 0.15) } else { 1.0 - smootherstep((s - 0.75) / 0.15) } as f32;
|
||||
return Light { heat: [h; 7], ..Light::DARK };
|
||||
}
|
||||
let Some(start) = self.start else { return Light::DARK };
|
||||
let t = self.t - start;
|
||||
let tail = t - TRAVEL;
|
||||
let comet = if tail < 0.0 { 1.0 } else { (-tail / TAU).exp() as f32 };
|
||||
let mut heat = [0.0; 7];
|
||||
for (i, h) in heat.iter_mut().enumerate() {
|
||||
let since = t - passes(i);
|
||||
let tau = if i == STEPS.len() - 1 { TAU * 2.5 } else { TAU };
|
||||
let v = if since < 0.0 { 0.0 } else if since < RISE { since / RISE } else { (-(since - RISE) / tau).exp() };
|
||||
*h = if v > 0.004 { v as f32 } else { 0.0 };
|
||||
}
|
||||
Light { heat, head: smootherstep(t / TRAVEL) as f32, comet: if comet > 0.004 { comet } else { 0.0 } }
|
||||
}
|
||||
|
||||
/// Advances to `now`. True while the light is on.
|
||||
pub fn tick(&mut self, now: f64) -> bool {
|
||||
self.t = now;
|
||||
if let Some(f) = self.fade
|
||||
&& now - f >= 0.9
|
||||
{
|
||||
self.fade = None;
|
||||
}
|
||||
if let Some(s) = self.start {
|
||||
let light = self.light();
|
||||
let lit = now - s < TRAVEL || light.comet > 0.0 || light.heat.iter().any(|&h| h > 0.0);
|
||||
if !lit {
|
||||
self.start = None;
|
||||
}
|
||||
}
|
||||
self.start.is_some() || self.fade.is_some()
|
||||
}
|
||||
}
|
||||
|
||||
/// The centre of each step in a box `w` by `h`, laid out as a row or a column.
|
||||
fn centers(w: f32, h: f32, stacked: bool) -> Vec<[f32; 2]> {
|
||||
let n = STEPS.len() as f32;
|
||||
(0..STEPS.len())
|
||||
.map(|i| {
|
||||
let i = i as f32;
|
||||
if stacked {
|
||||
let step = (h - GAP_COL * (n - 1.0)) / n;
|
||||
[w / 2.0, i * (step + GAP_COL) + step / 2.0]
|
||||
} else {
|
||||
let step = (w - GAP_ROW * (n - 1.0)) / n;
|
||||
[i * (step + GAP_ROW) + step / 2.0, h / 2.0]
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn along(c: &[[f32; 2]], p: f32) -> [f32; 2] {
|
||||
let span = (c.len() - 1) as f32 * p.clamp(0.0, 1.0);
|
||||
let i = (span.floor() as usize).min(c.len() - 2);
|
||||
let f = span - i as f32;
|
||||
let (a, b) = (c[i], c[i + 1]);
|
||||
[a[0] + (b[0] - a[0]) * f, a[1] + (b[1] - a[1]) * f]
|
||||
}
|
||||
|
||||
fn step(i: usize, heat: f32, stacked: bool) -> El {
|
||||
let (name, note) = STEPS[i];
|
||||
let body = if stacked { row().justify_between().gap(16.0) } else { col().gap(4.0).min_h(96.0).w(0.0).grow(1.0) };
|
||||
let glow = ink().alpha(0.35);
|
||||
body.key(format!("pl-{}", name.to_lowercase())).role("listitem").padding(12.0).radius(R2).fill(rune::oklch(0.15, 0.004, 265.0)).border(1.0, line())
|
||||
.child(el().key("heat").pin(Some(0.0), Some(0.0), Some(0.0), Some(0.0)).radius(R2)
|
||||
.fill(ink().alpha(0.18)).border(1.0, ink().alpha(0.7)).shadow(0.0, 24.0, glow)
|
||||
.opacity(heat).a11y_hidden())
|
||||
.child(text(name).key("name").font(TEXT_14_MEDIUM).color(fg()))
|
||||
.child(text(note).key("note").font(MONO_12).color(fg3()).wrap())
|
||||
}
|
||||
|
||||
pub fn pipeline(p: &Pipeline, size: Option<[f32; 2]>, bp: Bp, reduced: bool) -> El {
|
||||
let stacked = bp.stack_split();
|
||||
let light = p.light();
|
||||
let [w, h] = size.unwrap_or([1000.0, 96.0]);
|
||||
let c = centers(w, h, stacked);
|
||||
let (a, b) = (c[0], c[STEPS.len() - 1]);
|
||||
let wire = if stacked { el().size(1.0, b[1] - a[1]) } else { el().size(b[0] - a[0], 1.0) };
|
||||
let head = along(&c, light.head);
|
||||
let comet = el().key("comet").size(COMET, COMET).radius(COMET / 2.0)
|
||||
.radial_gradient([0.5, 0.5], COMET / 2.0, [(0.0, glint()), (0.2, ink().alpha(0.6)), (1.0, Color::TRANSPARENT)])
|
||||
.absolute(head[0] - COMET / 2.0, head[1] - COMET / 2.0)
|
||||
.opacity(light.comet).a11y_hidden();
|
||||
let body = if stacked { col().gap(GAP_COL) } else { row().gap(GAP_ROW) };
|
||||
let mut steps = body.key("pl").role("list").label("One frame, step by step").w_full();
|
||||
for i in 0..STEPS.len() {
|
||||
steps = steps.child(step(i, light.heat[i], stacked));
|
||||
}
|
||||
// The wire and the light run behind the steps, outside the list so it holds only steps.
|
||||
let diagram = col().key("pl-box").w_full()
|
||||
.on_press(move |s: &mut State| {
|
||||
let now = s.clock_now();
|
||||
s.pipeline.play(now, reduced);
|
||||
})
|
||||
.on_visible(move |s: &mut State, on, _tx: &mut rune::Tx| {
|
||||
let now = s.clock_now();
|
||||
s.pipeline.set_visible(on, now, reduced);
|
||||
})
|
||||
.child(wire.key("wire").fill(line2()).absolute(a[0], a[1]).a11y_hidden())
|
||||
.child(comet)
|
||||
.child(steps);
|
||||
col().key("pipeline").role("figure").w_full().mt(32.0)
|
||||
.child(diagram)
|
||||
.child(text("Click the diagram to run the frame again.").key("caption").font(TEXT_13).color(fg3()).wrap().max_w(MEASURE).mt(12.0))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn the_light_runs_once_and_cools() {
|
||||
let mut p = Pipeline::default();
|
||||
p.set_visible(true, 1.0, false);
|
||||
assert!(p.tick(1.0));
|
||||
assert!(p.tick(1.0 + TRAVEL / 2.0));
|
||||
let mid = p.light();
|
||||
assert!(mid.heat[0] > 0.0 && mid.heat[6] == 0.0, "{mid:?}");
|
||||
assert!(p.tick(1.0 + TRAVEL + 0.1));
|
||||
assert!(!p.tick(1.0 + TRAVEL + 6.0), "it stops asking for frames once cool");
|
||||
assert_eq!(p.light(), Light::DARK);
|
||||
p.set_visible(false, 9.0, false);
|
||||
p.set_visible(true, 10.0, false);
|
||||
assert!(!p.tick(10.0), "it plays on the first view only");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reduced_motion_fades_every_step_together() {
|
||||
let mut p = Pipeline::default();
|
||||
p.set_visible(true, 0.0, true);
|
||||
assert!(p.tick(0.4));
|
||||
assert_eq!(p.light().heat, [1.0; 7]);
|
||||
assert_eq!(p.light().comet, 0.0);
|
||||
assert!(!p.tick(1.0));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,288 @@
|
||||
//! The page below the hero: each section a heading that says its point, a paragraph, and the
|
||||
//! code, demo or pictures that back it. The tree is the same at every width; only styles change
|
||||
//! at the breakpoints, so the static page can switch them with `@media` rules.
|
||||
|
||||
use rune::{Color, Cx, El, Image, ImageCache, Span, SurfaceFit, TextStyle, Tx, col, el, rich, row, text};
|
||||
|
||||
use crate::code::{self, HELLO_TEST, HELLO_VIEW, RETARGET};
|
||||
use crate::tokens::*;
|
||||
use crate::ui::{Button, button, hairline, intro, linked, nav_link, prose};
|
||||
use crate::wordmark::{Glow, wordmark};
|
||||
use crate::{BRAND, DOCS, REPO, REV, State};
|
||||
|
||||
/// A section: its heading (an anchor at `id`) and what follows.
|
||||
pub fn section(id: &str, title: &str, bp: Bp) -> El {
|
||||
let h2 = bp.h2();
|
||||
col().key(id).role("region").label(title).w_full().pt(if bp.phone() { 32.0 } else { 64.0 }).pb(32.0)
|
||||
.child(text(title.to_owned()).key(format!("{id}-h")).role("heading").level(2)
|
||||
.font(h2).color(fg()).wrap().selectable(true).max_w(h2.size * 22.0))
|
||||
}
|
||||
|
||||
/// `e` across the whole width when the parent stacks, else a share `grow` of the row.
|
||||
pub fn fill(e: El, stacked: bool, grow: f32) -> El {
|
||||
if stacked { e.w_full() } else { e.w(0.0).grow(grow) }
|
||||
}
|
||||
|
||||
pub struct Picture<'a> {
|
||||
pub name: &'a str,
|
||||
/// The widths, in pixels, it was exported at: `img/{name}-{width}.avif`.
|
||||
pub widths: &'a [u32],
|
||||
/// How wide it shows, at most, in points: the guess before layout.
|
||||
pub pt: f32,
|
||||
pub alt: &'a str,
|
||||
/// Width over height, so the page keeps its place before the image arrives.
|
||||
pub aspect: f32,
|
||||
}
|
||||
|
||||
impl Picture<'_> {
|
||||
/// The file for the width it shows at, from every size there is. It plans for at most 2.2
|
||||
/// times its box: past that the extra pixels of a larger file are bytes the browser decodes
|
||||
/// and Rune mip-maps and uploads on the main thread, and a 345-point phone tile at `@3x`
|
||||
/// can't tell 760 pixels from 1520.
|
||||
fn image(&self, images: Option<&ImageCache>, cx: &Cx<State>) -> Option<Image> {
|
||||
let shown = cx.layout_size(self.name).map_or(self.pt, |s| s[0]);
|
||||
let scale = cx.env().scale.max(1.0);
|
||||
let plan = shown.min(shown * 2.2 / scale);
|
||||
let urls: Vec<(String, u32)> = self.widths.iter().map(|&w| (format!("img/{}-{w}.avif", self.name), w)).collect();
|
||||
let sources: Vec<(&str, u32)> = urls.iter().map(|(u, w)| (u.as_str(), *w)).collect();
|
||||
images.map(|c| c.url_set(&sources, plan, scale))
|
||||
}
|
||||
|
||||
/// The image as an element, `fit` into its box.
|
||||
pub fn el(&self, images: Option<&ImageCache>, cx: &Cx<State>, fit: SurfaceFit) -> El {
|
||||
let e = el().key(self.name.to_owned()).role("image").label(self.alt).w_full();
|
||||
match self.image(images, cx) {
|
||||
Some(img) => e.pixels_fit(img.pixels(), fit),
|
||||
None => e,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Which file each picture in `pics` shows and whether it has arrived, for a memo's version.
|
||||
/// Hold the handles while the memo builds, so its elements find the same images.
|
||||
pub fn ready(images: Option<&ImageCache>, cx: &Cx<State>, pics: &[&Picture]) -> (Vec<(Option<String>, bool)>, Vec<Image>) {
|
||||
let held: Vec<Image> = pics.iter().filter_map(|p| p.image(images, cx)).collect();
|
||||
(held.iter().map(|i| (i.pixels().source_url().map(str::to_owned), i.is_ready())).collect(), held)
|
||||
}
|
||||
|
||||
pub const HELLO: Picture = Picture {
|
||||
name: "hello",
|
||||
widths: &[320, 640],
|
||||
pt: 320.0,
|
||||
alt: "A dark window reading “Lights on” above a blue switch that is on",
|
||||
aspect: 1.6,
|
||||
};
|
||||
pub const METAL: Picture =
|
||||
Picture { name: "metal", widths: &[760, 1520], pt: 740.0, alt: "A ball of liquid chrome on black, reflecting a cool studio light", aspect: 16.0 / 9.0 };
|
||||
pub const GLASS: Picture = Picture {
|
||||
name: "glass",
|
||||
widths: &[380, 760],
|
||||
pt: 360.0,
|
||||
alt: "A frosted glass tile over a blue disc, sharp beside the glass and soft through it",
|
||||
aspect: 16.0 / 9.0,
|
||||
};
|
||||
pub const LIGHT: Picture =
|
||||
Picture { name: "light", widths: &[380, 760], pt: 360.0, alt: "Nine raised keys under one soft light, the middle one lit blue", aspect: 16.0 / 9.0 };
|
||||
pub const SESSION: Picture = Picture {
|
||||
name: "opencode-session",
|
||||
widths: &[720, 1120, 1680, 2240],
|
||||
pt: 1120.0,
|
||||
alt: "OpenCode drawn by Rune: a session with a sidebar of projects and a conversation with code",
|
||||
aspect: 2560.0 / 1640.0,
|
||||
};
|
||||
pub const HOME: Picture =
|
||||
Picture { name: "opencode-home", widths: &[560, 1100], pt: 548.0, alt: "OpenCode drawn by Rune: the home screen with a prompt field", aspect: 2560.0 / 1640.0 };
|
||||
pub const STREAMING: Picture =
|
||||
Picture { name: "opencode-streaming", widths: &[560, 1100], pt: 548.0, alt: "OpenCode drawn by Rune: a reply streaming in", aspect: 2560.0 / 1640.0 };
|
||||
|
||||
/// The header: the wordmark home and two links.
|
||||
pub fn topbar(s: &State, glow: Glow) -> El {
|
||||
row().key("top").role("banner").w_full().h(TOPBAR).justify_between().center_y()
|
||||
.child(row().key("brand").href(BRAND).label("Rune home").h(28.0).center_y()
|
||||
.on_hover_change(|s: &mut State, on: bool, _tx: &mut Tx| if on { let now = s.clock_now(); s.glints.brand(now) })
|
||||
.child(wordmark(&s.glyphs, 2.0, glow)))
|
||||
.child(row().key("nav").role("navigation").label("Rune").gap(24.0)
|
||||
.child(nav_link("nav-guide", "Guide", DOCS, TEXT_14))
|
||||
.child(nav_link("nav-github", "GitHub", REPO, TEXT_14)))
|
||||
}
|
||||
|
||||
pub fn views(cx: &Cx<State>, images: Option<&ImageCache>, bp: Bp) -> El {
|
||||
let stacked = bp.stack_split();
|
||||
let shot = col().key("shot").role("figure").gap(8.0)
|
||||
.child(HELLO.el(images, cx, SurfaceFit::Fill).aspect_ratio(HELLO.aspect).radius(R2))
|
||||
.child(prose("caption", "What it draws, rendered headless with `--snap`", TEXT_13, fg3()));
|
||||
let split = if stacked { col() } else { row() }.key("split").w_full().gap(24.0).mt(32.0)
|
||||
.child(fill(code::block("hello", &HELLO_VIEW), stacked, 1.0))
|
||||
.child(if stacked { shot.w_full().max_w(320.0) } else { shot.w(320.0) });
|
||||
section("views", "A view is a plain Rust function of your state.", bp)
|
||||
.child(intro("views-p", "There is no markup and no macro language. `view` reads the state and returns elements; a handler changes the state and Rune draws what follows. Give an element `.motion()` and it moves to its new layout on a spring."))
|
||||
.child(split)
|
||||
}
|
||||
|
||||
pub fn springs_intro(bp: Bp) -> El {
|
||||
section("springs", "Every animation is a spring that keeps its speed when you change your mind.", bp)
|
||||
.child(intro("springs-p", "Springs take SwiftUI's numbers, a duration and a bounce, and are solved exactly, so a retarget starts from where the value is and how fast it's going. Nothing animates on the first frame, a finger moves things directly, and reduced motion swaps travel for a short fade."))
|
||||
}
|
||||
|
||||
pub fn retarget_code() -> El {
|
||||
code::block("retarget", &RETARGET).mt(32.0)
|
||||
}
|
||||
|
||||
pub fn frame_intro(bp: Bp) -> El {
|
||||
section("frame", "Every frame takes the same short path, from your input to one draw call.", bp)
|
||||
.child(intro("frame-p", "Input changes your state. Rune calls your view, diffs it by key against the last one, lays it out with Taffy, moves what changed on springs and draws the whole window as one batch of instanced quads. At 120\u{a0}Hz all of it has 8.33\u{a0}ms, and an idle window draws nothing."))
|
||||
}
|
||||
|
||||
/// A gallery tile: the render fading into the page's black at its edges, its caption under it.
|
||||
fn tile(cx: &Cx<State>, images: Option<&ImageCache>, p: &Picture, caption: &str, frame: impl FnOnce(El) -> El) -> El {
|
||||
let key = format!("{}-frame", p.name);
|
||||
let [w, h] = cx.layout_size(&key).unwrap_or([360.0, 202.5]);
|
||||
let vignette = el().key("vignette").pin(Some(0.0), Some(0.0), Some(0.0), Some(0.0))
|
||||
.radial_gradient([0.5, 0.5], [w / 2.0, h / 2.0], [(0.58, Color::TRANSPARENT), (1.0, Color::BLACK)])
|
||||
.a11y_hidden();
|
||||
let img = p.el(images, cx, SurfaceFit::Fill).h_full();
|
||||
col().key(format!("{}-tile", p.name)).role("figure").w_full()
|
||||
.child(frame(el().key(key).w_full().radius(R2).clip_rounded(R2).child(img).child(vignette)))
|
||||
.child(text(caption.to_owned()).key("caption").font(TEXT_13).color(fg3()).w_full().align(rune::Align::Center))
|
||||
}
|
||||
|
||||
pub fn gallery(cx: &Cx<State>, images: Option<&ImageCache>, bp: Bp) -> El {
|
||||
let stacked = bp.stack_gallery();
|
||||
let metal = tile(cx, images, &METAL, "Liquid metal", |f| if stacked { f.aspect_ratio(METAL.aspect) } else { f.grow(1.0) });
|
||||
let small = |p: &Picture, caption: &str| tile(cx, images, p, caption, |f| f.aspect_ratio(p.aspect));
|
||||
let side = col().key("side").gap(24.0).child(small(&GLASS, "Frosted glass")).child(small(&LIGHT, "Raised keys under one light"));
|
||||
let body = if stacked { col() } else { row() }.key("gallery").w_full().gap(24.0).mt(32.0)
|
||||
// Two of three columns and the gap between them: 24 + 2/3 of what's left after both gaps.
|
||||
.child(if stacked { metal.w_full() } else { metal.w(24.0).grow(2.0) })
|
||||
.child(fill(side, stacked, 1.0));
|
||||
section("renderer", "Metal, glass and light are drawn by the same renderer.", bp)
|
||||
.child(intro("renderer-p", "They're GPU shaders, drawn live. These stills come straight out of Rune."))
|
||||
.child(body)
|
||||
// The pictures are megabytes to read back and upload: they're asked for when the section
|
||||
// comes on screen, not while the reader is still on the hero.
|
||||
.on_visible(|s: &mut State, on: bool, _: &mut Tx| if on { s.seen.insert("renderer"); })
|
||||
}
|
||||
|
||||
fn screen(cx: &Cx<State>, images: Option<&ImageCache>, p: &Picture) -> El {
|
||||
let img = p.el(images, cx, SurfaceFit::Fill).aspect_ratio(p.aspect);
|
||||
col().key(format!("{}-fig", p.name)).role("figure").w_full().radius(R2).clip_rounded(R2)
|
||||
.child(img)
|
||||
.child(el().key("outline").pin(Some(0.0), Some(0.0), Some(0.0), Some(0.0)).radius(R2).border(1.0, line()).a11y_hidden())
|
||||
}
|
||||
|
||||
pub fn opencode(cx: &Cx<State>, images: Option<&ImageCache>, bp: Bp) -> El {
|
||||
let stacked = bp.stack_gallery();
|
||||
let pair = if stacked { col() } else { row() }.key("pair").w_full().gap(24.0)
|
||||
.child(fill(screen(cx, images, &HOME), stacked, 1.0))
|
||||
.child(fill(screen(cx, images, &STREAMING), stacked, 1.0));
|
||||
section("opencode", "OpenCode's desktop app is the test Rune is built against.", bp)
|
||||
.child(intro("opencode-p", "Rune's first big job is rebuilding OpenCode's desktop app and raising its bar: long streaming sessions, markdown and code, window chrome and scroll momentum. These screens are drawn by Rune."))
|
||||
.child(col().key("screens").w_full().gap(24.0).mt(32.0).child(screen(cx, images, &SESSION)).child(pair))
|
||||
.on_visible(|s: &mut State, on: bool, _: &mut Tx| if on { s.seen.insert("opencode"); })
|
||||
}
|
||||
|
||||
const FACTS: [(&str, &str); 3] = [
|
||||
("A reference renderer.", "`rune-ref` draws the same scenes on the CPU, and golden tests hold the GPU within two levels per channel of it."),
|
||||
("A motion audit.", "Example apps run scripted scenarios headless at 120\u{a0}fps, and a checker flags snaps, pops, jumps and retargets that lose their speed."),
|
||||
("Over 2,600 tests", "across the framework, its components and its motion."),
|
||||
];
|
||||
|
||||
pub fn agents(bp: Bp) -> El {
|
||||
let stacked = bp.stack_split();
|
||||
let mut facts = if stacked { col() } else { row() }.key("facts").role("list").w_full().gap(24.0).mt(32.0);
|
||||
for (i, (lead, rest)) in FACTS.into_iter().enumerate() {
|
||||
let item = col().key(format!("fact-{i}")).role("listitem").gap(4.0)
|
||||
.child(text(lead).key("lead").font(TEXT_14_MEDIUM).color(fg()).wrap().selectable(true))
|
||||
.child(prose("rest", rest, TEXT_14, fg2()));
|
||||
facts = facts.child(fill(item, stacked, 1.0));
|
||||
}
|
||||
section("agents", "An agent can build, run and check a Rune app without a screen.", bp)
|
||||
.child(intro("agents-p", "Tests drive the real runtime: tap an element by key, step the clock, read where things are. Any app renders headless to a PNG with `--snap`, to a strip of frames with `--frames`, and prints its element tree with `--tree`."))
|
||||
.child(code::block("hello-test", &HELLO_TEST).mt(32.0))
|
||||
.child(facts)
|
||||
}
|
||||
|
||||
const PLATFORMS: [(&str, &str); 5] = [
|
||||
("macOS", "Rune's own Metal backend"),
|
||||
("Windows", "wgpu; windows stay hidden until their first frame"),
|
||||
("Linux", "wgpu on X11 and Wayland"),
|
||||
("iOS", "Embedded in UIKit or SwiftUI"),
|
||||
("Web", "WebGPU on one canvas, experimental"),
|
||||
];
|
||||
|
||||
pub fn platforms(bp: Bp) -> El {
|
||||
let stacked = bp.stack_split();
|
||||
let mut list = if stacked { col() } else { row() }.key("platforms-list").role("list").w_full().mt(32.0).radius(R2).border(1.0, line());
|
||||
for (i, (name, note)) in PLATFORMS.into_iter().enumerate() {
|
||||
let item = if stacked { row().justify_between().center_y().gap(16.0) } else { col().gap(4.0) };
|
||||
let item = fill(item, stacked, 1.0);
|
||||
let mut item = item.key(name.to_lowercase()).role("listitem").padding(16.0)
|
||||
.child(text(name).key("name").font(TEXT_16_MEDIUM).color(fg()))
|
||||
.child(text(note).key("note").font(TEXT_13).color(fg3()).wrap().shrink().align(if stacked { rune::Align::End } else { rune::Align::Start }));
|
||||
if i > 0 {
|
||||
// The hairline between this platform and the last, inside the item so the list holds only items.
|
||||
let rule = el().key("rule").fill(line()).a11y_hidden();
|
||||
let rule = if stacked { rule.pin(Some(0.0), Some(0.0), Some(0.0), None).h(1.0) } else { rule.pin(Some(0.0), Some(0.0), None, Some(0.0)).w(1.0) };
|
||||
item = item.child(rule);
|
||||
}
|
||||
list = list.child(item);
|
||||
}
|
||||
section("platforms", "The same code runs on macOS, Windows, Linux, iOS and the web.", bp).child(list)
|
||||
}
|
||||
|
||||
/// The Cargo line, as the CTA shows and copies it.
|
||||
pub fn cargo_line() -> String {
|
||||
format!("rune = {{ git = \"{REPO}\", rev = \"{REV}\" }}")
|
||||
}
|
||||
|
||||
fn cargo_spans(line: &str) -> Vec<Span> {
|
||||
let mut spans = vec![Span::new(0, 4).color(code_call())];
|
||||
let mut in_string = None;
|
||||
for (i, c) in line.char_indices() {
|
||||
match (c, in_string) {
|
||||
('"', None) => in_string = Some(i),
|
||||
('"', Some(start)) => {
|
||||
spans.push(Span::new(start, i + 1).color(code_string()));
|
||||
in_string = None;
|
||||
}
|
||||
('=' | '{' | '}' | ',', None) => spans.push(Span::new(i, i + 1).color(fg2())),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
spans
|
||||
}
|
||||
|
||||
pub fn cta(bp: Bp, copied: bool) -> El {
|
||||
let cargo = cargo_line();
|
||||
let copy = row().key("copy").role("button").label(if copied { "Copied" } else { "Copy" }).focusable(true)
|
||||
.h(28.0).px(12.0).mr(8.0).radius(14.0).center_y().fill(surface2()).hover(Color::WHITE.alpha(0.04))
|
||||
.on_press_tx(|s: &mut State, tx: &mut Tx| {
|
||||
tx.copy(cargo_line());
|
||||
s.copied();
|
||||
})
|
||||
.child(text(if copied { "Copied" } else { "Copy" }).font(TEXT_12_MEDIUM).color(fg2()).a11y_hidden());
|
||||
let copyline = row().key("copyline").w_full().max_w(832.0).mt(32.0).center_y().radius(R2).fill(surface1()).border(1.0, line())
|
||||
.child(col().key("scroll").w(0.0).grow(1.0).min_w(0.0).scroll_x().scroll_edge_fade(24.0)
|
||||
.child(rich(cargo.clone(), cargo_spans(&cargo)).key("cargo").font(MONO_13).color(fg()).selectable(true).px(16.0).py(12.0)))
|
||||
.child(copy);
|
||||
section("cta", "Pin a commit and start with one view.", bp).pb(96.0)
|
||||
.child(intro("cta-p", "Rune isn't on crates.io yet. Add it from Git at a commit, then start from `examples/hello`."))
|
||||
.child(copyline)
|
||||
.child(row().key("actions").flex_wrap().gap(12.0).mt(32.0)
|
||||
.child(button("cta-guide", "Read the guide", DOCS, Button::Primary))
|
||||
.child(button("cta-examples", "Browse the examples", &format!("{REPO}/tree/dev/examples"), Button::Secondary)))
|
||||
}
|
||||
|
||||
pub fn footer() -> El {
|
||||
row().key("footer").role("contentinfo").w_full().justify_between().flex_wrap().gaps(8.0, 24.0).py(32.0)
|
||||
.child(hairline("rule").pin(Some(0.0), Some(0.0), Some(0.0), None))
|
||||
.child(text("Rune is open source under the MIT license.").key("license").font(TEXT_13).color(fg3()).selectable(true))
|
||||
.child(linked("made", "Made by [Anomaly](https://anoma.ly).", TEXT_13, fg3()))
|
||||
}
|
||||
|
||||
/// The page for a path that isn't there.
|
||||
pub fn not_found(bp: Bp) -> El {
|
||||
col().key("notfound").w_full().py(96.0).min_h(480.0)
|
||||
.child(text("There's no page here.").key("notfound-h").role("heading").level(1).font(TextStyle::new(40.0, 500.0).lh(48.0).tracking(-1.0)).color(fg()).wrap())
|
||||
.child(linked("notfound-p", &format!("Try [Rune's home page]({BRAND}) or the [code on GitHub]({REPO})."), bp.lede(), fg2()).mt(24.0))
|
||||
}
|
||||
@@ -0,0 +1,331 @@
|
||||
//! The springs demo: a puck on a track driven by one of Rune's springs. Click to send it
|
||||
//! somewhere, click again before it lands, or grab it and throw it. The trace under it plots
|
||||
//! its position over the last 2.4 s: with velocity kept, every retarget bends the curve
|
||||
//! smoothly. It draws frames only while something moves and only while it's on screen.
|
||||
|
||||
use std::collections::VecDeque;
|
||||
|
||||
use rune::{AnimExt, Color, Cx, Drag, El, LineCap, Phase, Shape, Spring, TextStyle, Tx, Velocity, canvas, col, el, oklcha, row, text};
|
||||
use rune_motion::Animated;
|
||||
|
||||
use crate::State;
|
||||
use crate::tokens::*;
|
||||
use crate::ui::shape_dot;
|
||||
|
||||
pub const SPRINGS: [(&str, &str, Spring); 3] = [
|
||||
("Snappy", "0.25s", Spring::new(0.25, 0.0)),
|
||||
("Smooth", "0.4s", Spring::new(0.4, 0.0)),
|
||||
("Bouncy", "0.5s · 0.3", Spring::new(0.5, 0.3)),
|
||||
];
|
||||
const STOPS: usize = 5;
|
||||
/// Seconds of history in the trace.
|
||||
const WINDOW: f64 = 2.4;
|
||||
const STAGE_H: f32 = 72.0;
|
||||
const TRACE_H: f32 = 96.0;
|
||||
const PUCK: f32 = 32.0;
|
||||
/// How close to the puck's centre a press catches it, in points.
|
||||
const GRAB: f32 = 22.0;
|
||||
|
||||
fn snap(x: f32) -> f32 {
|
||||
let n = (STOPS - 1) as f32;
|
||||
(x.clamp(0.0, 1.0) * n).round() / n
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
struct Sample {
|
||||
t: f64,
|
||||
x: f32,
|
||||
target: f32,
|
||||
kick: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct Grab {
|
||||
offset: f32,
|
||||
/// Recent (time, position) pairs, for the throw's speed.
|
||||
pts: VecDeque<(f64, f32)>,
|
||||
/// Holding the puck. A press on the track sends it there instead, until the pointer moves.
|
||||
live: bool,
|
||||
}
|
||||
|
||||
pub struct Demo {
|
||||
pub which: usize,
|
||||
pub keep: bool,
|
||||
anim: Animated<f32>,
|
||||
samples: VecDeque<Sample>,
|
||||
kicked: bool,
|
||||
last_motion: f64,
|
||||
grab: Option<Grab>,
|
||||
visible: bool,
|
||||
running: bool,
|
||||
/// Where the last frame drew the puck (0 to 1) and when.
|
||||
pub x: f32,
|
||||
t: f64,
|
||||
}
|
||||
|
||||
impl Default for Demo {
|
||||
fn default() -> Self {
|
||||
Demo {
|
||||
which: 2,
|
||||
keep: true,
|
||||
anim: Animated::new(0.0),
|
||||
samples: VecDeque::new(),
|
||||
kicked: false,
|
||||
last_motion: f64::NEG_INFINITY,
|
||||
grab: None,
|
||||
visible: false,
|
||||
running: false,
|
||||
x: 0.0,
|
||||
t: 0.0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Demo {
|
||||
fn spring(&self) -> Spring {
|
||||
SPRINGS[self.which].2
|
||||
}
|
||||
|
||||
pub fn running(&self) -> bool {
|
||||
self.running
|
||||
}
|
||||
|
||||
pub fn target(&self) -> f32 {
|
||||
self.anim.target()
|
||||
}
|
||||
|
||||
/// Sends the puck to `target` from where it is, keeping its speed unless "Keep velocity"
|
||||
/// is off. Reduced motion puts it there.
|
||||
fn retarget(&mut self, target: f32, now: f64, reduced: bool) {
|
||||
if reduced {
|
||||
self.anim.set(target);
|
||||
} else if self.keep {
|
||||
self.anim.animate_to(target, self.spring(), now);
|
||||
} else {
|
||||
self.anim.animate_to(target, self.spring().velocity(Velocity::Zero), now);
|
||||
}
|
||||
self.kick(now);
|
||||
}
|
||||
|
||||
fn kick(&mut self, now: f64) {
|
||||
self.kicked = true;
|
||||
self.last_motion = now;
|
||||
if self.visible {
|
||||
self.running = true;
|
||||
}
|
||||
}
|
||||
|
||||
pub fn step(&mut self, dir: i32, now: f64, reduced: bool) {
|
||||
let to = snap(self.anim.target() + dir as f32 / (STOPS - 1) as f32);
|
||||
self.retarget(to, now, reduced);
|
||||
}
|
||||
|
||||
pub fn press(&mut self, at: f32, travel: f32, now: f64, reduced: bool) {
|
||||
let x = self.anim.sample(now);
|
||||
let on_puck = ((at - x) * travel).abs() < GRAB;
|
||||
self.grab = Some(Grab { offset: at - x, pts: VecDeque::from([(now, at)]), live: on_puck });
|
||||
if on_puck {
|
||||
// Caught: the finger holds it where it is, with no animation while it's held.
|
||||
self.anim.set(x);
|
||||
self.kick(now);
|
||||
} else {
|
||||
self.retarget(at, now, reduced);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn drag(&mut self, at: f32, travel: f32, now: f64) {
|
||||
let Some(g) = self.grab.as_mut() else { return };
|
||||
g.pts.push_back((now, at));
|
||||
if g.pts.len() > 6 {
|
||||
g.pts.pop_front();
|
||||
}
|
||||
if !g.live {
|
||||
// A press on the track sent the puck there; moving 4 points takes it over from
|
||||
// wherever it is now.
|
||||
if (at - g.pts[0].1).abs() * travel < 4.0 {
|
||||
return;
|
||||
}
|
||||
g.live = true;
|
||||
g.offset = at - self.anim.sample(now);
|
||||
}
|
||||
self.anim.set((at - g.offset).clamp(0.0, 1.0));
|
||||
self.kick(now);
|
||||
}
|
||||
|
||||
pub fn release(&mut self, now: f64, reduced: bool) {
|
||||
let Some(g) = self.grab.take() else { return };
|
||||
if !g.live {
|
||||
return;
|
||||
}
|
||||
let pts: Vec<_> = g.pts.iter().filter(|(t, _)| now - t < 0.1).collect();
|
||||
let v = match (pts.first(), pts.last()) {
|
||||
(Some(a), Some(b)) if pts.len() > 1 => (b.1 - a.1) / ((b.0 - a.0) as f32).max(0.008),
|
||||
_ => 0.0,
|
||||
};
|
||||
let x = self.anim.sample(now);
|
||||
let target = snap(x + v * 0.12);
|
||||
if reduced {
|
||||
self.anim.set(target);
|
||||
} else {
|
||||
self.anim.release(if self.keep { v } else { 0.0 }, target, self.spring(), now);
|
||||
}
|
||||
self.kick(now);
|
||||
}
|
||||
|
||||
pub fn set_visible(&mut self, on: bool, now: f64) {
|
||||
self.visible = on;
|
||||
self.running = on && now - self.last_motion < WINDOW;
|
||||
}
|
||||
|
||||
/// Advances to `now`: samples the puck into the trace. True while it draws frames.
|
||||
pub fn tick(&mut self, now: f64) -> bool {
|
||||
if !self.running {
|
||||
return false;
|
||||
}
|
||||
if self.grab.is_some() || !self.anim.is_settled(now) {
|
||||
self.last_motion = now;
|
||||
}
|
||||
self.x = self.anim.sample(now);
|
||||
self.t = now;
|
||||
self.samples.push_back(Sample { t: now, x: self.x, target: self.anim.target(), kick: self.kicked });
|
||||
self.kicked = false;
|
||||
while self.samples.len() > 2 && self.samples[1].t < now - WINDOW {
|
||||
self.samples.pop_front();
|
||||
}
|
||||
if now - self.last_motion > WINDOW {
|
||||
self.running = false;
|
||||
}
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
/// The puck's position from a press `x` points into a stage `w` wide, 0 to 1.
|
||||
fn frac(x: f32, w: f32) -> f32 {
|
||||
((x - 32.0) / travel(w)).clamp(0.0, 1.0)
|
||||
}
|
||||
|
||||
fn travel(w: f32) -> f32 {
|
||||
(w - 64.0).max(1.0)
|
||||
}
|
||||
|
||||
/// `points` dashed `on` then `off` points along their length.
|
||||
fn dashed(mut shape: Shape, points: &[[f32; 2]], on: f32, off: f32, width: f32, color: Color) -> Shape {
|
||||
let mut phase = 0.0f32;
|
||||
for w in points.windows(2) {
|
||||
let (a, b) = (w[0], w[1]);
|
||||
let len = (b[0] - a[0]).hypot(b[1] - a[1]);
|
||||
let mut d = 0.0;
|
||||
while d < len {
|
||||
let period = on + off;
|
||||
let into = phase % period;
|
||||
let left = if into < on { on - into } else { period - into };
|
||||
let step = left.min(len - d);
|
||||
if into < on {
|
||||
let p = |s: f32| [a[0] + (b[0] - a[0]) * s / len, a[1] + (b[1] - a[1]) * s / len];
|
||||
shape = shape.line(p(d), p(d + step), width, LineCap::Butt, color);
|
||||
}
|
||||
d += step;
|
||||
phase += step;
|
||||
}
|
||||
}
|
||||
shape
|
||||
}
|
||||
|
||||
fn trace(d: &Demo, w: f32) -> Shape {
|
||||
let h = TRACE_H;
|
||||
let pad = 8.0;
|
||||
let x_at = |t: f64| w - ((d.t - t) / WINDOW) as f32 * w;
|
||||
// Bouncy springs overshoot: leave room above and below the track's ends.
|
||||
let y_at = |v: f32| h - pad - (v + 0.15) / 1.3 * (h - 2.0 * pad);
|
||||
let mut shape = Shape::new();
|
||||
if d.samples.len() < 2 {
|
||||
return shape;
|
||||
}
|
||||
let target: Vec<[f32; 2]> = d.samples.iter().map(|s| [x_at(s.t), y_at(s.target)]).collect();
|
||||
shape = dashed(shape, &target, 2.0, 4.0, 1.0, Color::WHITE.alpha(0.12));
|
||||
let path: Vec<[f32; 2]> = d.samples.iter().map(|s| [x_at(s.t), y_at(s.x)]).collect();
|
||||
shape = shape.stroke(path, 1.5, ink());
|
||||
for s in d.samples.iter().filter(|s| s.kick) {
|
||||
shape = shape_dot([x_at(s.t), y_at(s.x)], 2.5, glint(), shape);
|
||||
}
|
||||
shape
|
||||
}
|
||||
|
||||
fn segmented(d: &Demo, stacked: bool) -> El {
|
||||
let mut segs = row().key("springs").role("radiogroup").label("Spring").padding(3.0).radius(18.0).fill(surface2());
|
||||
for (i, (name, note, _)) in SPRINGS.into_iter().enumerate() {
|
||||
let on = i == d.which;
|
||||
let seg = if stacked { col().py(4.0) } else { row().h(30.0).gap(8.0).center_y() };
|
||||
segs = segs.child(seg.key(name).role("radio").label(name).checked(on).focusable(true).px(12.0).radius(15.0)
|
||||
.fill(if on { surface3() } else { Color::TRANSPARENT }).hover_group()
|
||||
.on_press(move |s: &mut State| s.spring.which = i)
|
||||
.child(text(name).font(TextStyle::new(13.0, 500.0).lh(20.0)).color(if on { fg() } else { fg2() }).group_color(fg()))
|
||||
.child(text(note).font(MONO_12).color(fg3()).a11y_hidden()));
|
||||
}
|
||||
segs
|
||||
}
|
||||
|
||||
fn checkbox(on: bool) -> El {
|
||||
let mut b = el().key("box").size(16.0, 16.0).radius(4.0).center();
|
||||
b = if on {
|
||||
b.fill(ink()).child(canvas(Shape::new().view_box(16.0, 16.0)
|
||||
.stroke(vec![[4.0, 8.5], [7.0, 11.5], [12.0, 5.0]], 2.0, Color::BLACK)).key("tick").size(16.0, 16.0))
|
||||
} else {
|
||||
b.border(1.5, line2())
|
||||
};
|
||||
row().key("keep").role("checkbox").label("Keep velocity").checked(on).focusable(true).gap(8.0).center_y()
|
||||
.on_press(|s: &mut State| s.spring.keep = !s.spring.keep)
|
||||
.child(b.a11y_hidden())
|
||||
.child(text("Keep velocity").font(TEXT_14).color(fg2()).a11y_hidden())
|
||||
}
|
||||
|
||||
pub fn demo(s: &State, cx: &Cx<State>, bp: Bp) -> El {
|
||||
let d = &s.spring;
|
||||
let reduced = cx.is_reduced_motion();
|
||||
let w = cx.layout_size("spring-stage").map_or(600.0, |[w, _]| w);
|
||||
let travel_w = travel(w);
|
||||
let mut rail = el().key("rail").h(2.0).radius(1.0).fill(surface3()).pin(Some(32.0), Some(35.0), Some(32.0), None).a11y_hidden();
|
||||
for i in 0..STOPS {
|
||||
let x = travel_w * i as f32 / (STOPS - 1) as f32;
|
||||
rail = rail.child(el().key(format!("stop-{i}")).size(4.0, 4.0).radius(2.0).fill(line2()).absolute(x - 2.0, -1.0));
|
||||
}
|
||||
let puck = el().key("puck").size(PUCK, PUCK).radius(PUCK / 2.0).fill(fg())
|
||||
.absolute(16.0 + d.x * travel_w, 20.0)
|
||||
.shadow(2.0, 8.0, oklcha(0.0, 0.0, 0.0, 0.5))
|
||||
.box_shadow(rune::Shadow { x: 0.0, y: 0.0, blur: 0.0, spread: 4.0, color: ink().alpha(0.25), inset: false })
|
||||
.a11y_hidden();
|
||||
let stage = el().key("spring-stage").w_full().h(STAGE_H).radius(R2).fill(surface1()).border(1.0, line())
|
||||
.role("slider").label("Puck position").focusable(true)
|
||||
.range_value(f64::from(d.target()), 0.0, 1.0).range_step(1.0 / (STOPS - 1) as f64)
|
||||
.on_step(move |s: &mut State, steps, _| {
|
||||
let now = s.clock_now();
|
||||
s.spring.step(steps.signum(), now, reduced);
|
||||
})
|
||||
.on_drag(move |s: &mut State, g: &mut Drag, _tx: &mut Tx| {
|
||||
let now = s.clock_now();
|
||||
let at = frac(g.x, g.w);
|
||||
match g.phase {
|
||||
Phase::Down => s.spring.press(at, travel(g.w), now, reduced),
|
||||
Phase::Move => s.spring.drag(at, travel(g.w), now),
|
||||
Phase::Up => s.spring.release(now, reduced),
|
||||
}
|
||||
})
|
||||
.on_visible(|s: &mut State, on, _tx: &mut Tx| {
|
||||
let now = s.clock_now();
|
||||
s.spring.set_visible(on, now);
|
||||
})
|
||||
.child(rail)
|
||||
.child(puck);
|
||||
let trace_w = cx.layout_size("trace").map_or(w, |[w, _]| w);
|
||||
let trace = canvas(trace(d, trace_w)).key("trace").w_full().h(TRACE_H).mt(8.0)
|
||||
.clip_fade_linear(trace_w * 0.25, 0.0, 0.0, 0.0).a11y_hidden();
|
||||
let controls = row().key("controls").w_full().justify_between().flex_wrap().gaps(12.0, 24.0).center_y().mt(16.0)
|
||||
.child(segmented(d, bp.narrow()))
|
||||
.child(checkbox(d.keep));
|
||||
col().key("spring-demo").role("figure").w_full().mt(32.0)
|
||||
.child(stage)
|
||||
.child(trace)
|
||||
.child(controls)
|
||||
.child(text("Click the track, then click somewhere else before the puck lands. Or grab it and throw it. Turn off \u{201c}Keep velocity\u{201d} to see a spring that starts from rest every time.")
|
||||
.key("caption").font(TEXT_13).color(fg3()).wrap().max_w(MEASURE).mt(12.0))
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
use rune::{Env, Runtime};
|
||||
|
||||
use super::*;
|
||||
use crate::code::{HELLO_TEST, HELLO_VIEW, RETARGET};
|
||||
|
||||
fn page(width: f32) -> Runtime<State> {
|
||||
let mut rt = Runtime::new(State::new(), view, (width, 900.0), Env::new(true, 2.0));
|
||||
for _ in 0..3 {
|
||||
rt.frame(0.0);
|
||||
}
|
||||
rt
|
||||
}
|
||||
|
||||
fn paths(rt: &Runtime<State>) -> Vec<String> {
|
||||
rt.elements().into_iter().filter(|e| !e.exiting).map(|e| e.path).collect()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn every_snippet_still_cuts() {
|
||||
for s in [&HELLO_VIEW, &HELLO_TEST, &RETARGET] {
|
||||
let cut = s.cut().unwrap_or_else(|| panic!("{}: a marker stopped matching", s.file));
|
||||
assert!(cut.start <= cut.end && cut.code.lines().count() > 3, "{}: {cut:?}", s.file);
|
||||
assert_eq!(cut.code.matches('{').count(), cut.code.matches('}').count(), "{}: braces balance\n{}", s.file, cut.code);
|
||||
}
|
||||
}
|
||||
|
||||
/// The static page keeps the narrowest width's tree and switches styles with `@media`, so every
|
||||
/// width must build the same elements.
|
||||
#[test]
|
||||
fn every_breakpoint_builds_the_same_tree() {
|
||||
let narrow = paths(&page(360.0));
|
||||
assert!(narrow.len() > 100, "{} elements", narrow.len());
|
||||
for w in [400.0, 560.0, 760.0, 860.0, 1000.0, 1400.0] {
|
||||
let wide = paths(&page(w));
|
||||
let only: Vec<_> = wide.iter().filter(|p| !narrow.contains(p)).chain(narrow.iter().filter(|p| !wide.contains(p))).collect();
|
||||
assert!(only.is_empty(), "at {w}: {only:?}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_breakpoint_follows_the_window() {
|
||||
let mut rt = page(1200.0);
|
||||
let hero = |rt: &Runtime<State>| rt.presented("hero-text").unwrap().0;
|
||||
let wide = hero(&rt);
|
||||
rt.set_viewport((390.0, 900.0), 2.0);
|
||||
for _ in 0..3 {
|
||||
rt.frame(0.0);
|
||||
}
|
||||
let narrow = hero(&rt);
|
||||
assert!(wide[2] < 1200.0 - 520.0, "the card sits beside the text: {wide:?}");
|
||||
assert!((narrow[2] - (390.0 - 32.0)).abs() < 1.0, "and under it on a phone: {narrow:?}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_cargo_line_names_the_repo_and_a_rev() {
|
||||
let line = sections::cargo_line();
|
||||
assert!(line.starts_with("rune = { git = \"https://github.com/anomalyco/rune\", rev = \""), "{line}");
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
//! The page's tokens: black, one neutral at four strengths, hairlines as translucent white and
|
||||
//! Rune's blue ink as the only accent. One sans (Geist) and one mono (Geist Mono), line heights
|
||||
//! on the 4 pt grid.
|
||||
|
||||
use rune::{Color, TextStyle, oklch};
|
||||
|
||||
pub const BG: Color = Color::BLACK;
|
||||
|
||||
pub fn fg() -> Color {
|
||||
rune::color::hex("#ededed").unwrap_or(Color::WHITE)
|
||||
}
|
||||
pub fn fg2() -> Color {
|
||||
Color::WHITE.alpha(0.62)
|
||||
}
|
||||
pub fn fg3() -> Color {
|
||||
Color::WHITE.alpha(0.5)
|
||||
}
|
||||
pub fn surface1() -> Color {
|
||||
Color::WHITE.alpha(0.03)
|
||||
}
|
||||
pub fn surface2() -> Color {
|
||||
Color::WHITE.alpha(0.06)
|
||||
}
|
||||
pub fn surface3() -> Color {
|
||||
Color::WHITE.alpha(0.1)
|
||||
}
|
||||
pub fn line() -> Color {
|
||||
Color::WHITE.alpha(0.09)
|
||||
}
|
||||
pub fn line2() -> Color {
|
||||
Color::WHITE.alpha(0.16)
|
||||
}
|
||||
pub fn ink() -> Color {
|
||||
oklch(0.74, 0.14, 245.0)
|
||||
}
|
||||
pub fn glint() -> Color {
|
||||
oklch(0.97, 0.035, 245.0)
|
||||
}
|
||||
pub fn code_keyword() -> Color {
|
||||
oklch(0.74, 0.12, 25.0)
|
||||
}
|
||||
pub fn code_string() -> Color {
|
||||
oklch(0.84, 0.06, 80.0)
|
||||
}
|
||||
pub fn code_call() -> Color {
|
||||
oklch(0.84, 0.045, 235.0)
|
||||
}
|
||||
|
||||
pub const R2: f32 = 8.0;
|
||||
/// The content column's width, before gutters.
|
||||
pub const CONTENT: f32 = 1120.0;
|
||||
/// Paragraphs stop at this width (36rem).
|
||||
pub const MEASURE: f32 = 576.0;
|
||||
pub const TOPBAR: f32 = 52.0;
|
||||
|
||||
pub const TEXT_12_MEDIUM: TextStyle = TextStyle::new(12.0, 500.0).lh(16.0);
|
||||
pub const TEXT_13: TextStyle = TextStyle::new(13.0, 400.0).lh(20.0);
|
||||
pub const TEXT_14: TextStyle = TextStyle::new(14.0, 400.0).lh(22.0);
|
||||
pub const TEXT_14_MEDIUM: TextStyle = TextStyle::new(14.0, 500.0).lh(22.0);
|
||||
pub const TEXT_16: TextStyle = TextStyle::new(16.0, 400.0).lh(26.0);
|
||||
pub const TEXT_16_MEDIUM: TextStyle = TextStyle::new(16.0, 500.0).lh(26.0);
|
||||
pub const MONO_12: TextStyle = TextStyle::new(12.0, 400.0).lh(16.0).mono();
|
||||
pub const MONO_13: TextStyle = TextStyle::new(13.0, 400.0).lh(20.0).mono();
|
||||
/// Code blocks: mono 12 on 20 pt lines.
|
||||
pub const CODE: TextStyle = TextStyle::new(12.0, 400.0).lh(20.0).mono();
|
||||
|
||||
/// The page's breakpoints, read from its width once per resize that crosses one.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||
pub struct Bp {
|
||||
/// The widest breakpoint at or under the page's width: 0, 400, 560, 760, 860 or 1000.
|
||||
pub at: u16,
|
||||
}
|
||||
|
||||
impl Bp {
|
||||
pub const STEPS: [u16; 6] = [0, 400, 560, 760, 860, 1000];
|
||||
|
||||
pub fn of(width: f32) -> Bp {
|
||||
let at = Self::STEPS.iter().rev().copied().find(|&s| width >= f32::from(s)).unwrap_or(0);
|
||||
Bp { at }
|
||||
}
|
||||
/// Under 400: 16 pt gutters.
|
||||
pub fn narrow(self) -> bool {
|
||||
self.at < 400
|
||||
}
|
||||
/// Under 560: smaller headings and section padding.
|
||||
pub fn phone(self) -> bool {
|
||||
self.at < 560
|
||||
}
|
||||
/// Under 760: the gallery and OpenCode screens stack.
|
||||
pub fn stack_gallery(self) -> bool {
|
||||
self.at < 760
|
||||
}
|
||||
/// Under 860: code beside its output, the frame diagram, facts and platforms stack.
|
||||
pub fn stack_split(self) -> bool {
|
||||
self.at < 860
|
||||
}
|
||||
/// Under 1000: the hero's live card goes under its text.
|
||||
pub fn stack_hero(self) -> bool {
|
||||
self.at < 1000
|
||||
}
|
||||
pub fn gutter(self) -> f32 {
|
||||
if self.narrow() { 16.0 } else { 24.0 }
|
||||
}
|
||||
pub fn h1(self) -> TextStyle {
|
||||
if self.phone() { TextStyle::new(36.0, 500.0).lh(44.0).tracking(-0.9) } else { TextStyle::new(40.0, 500.0).lh(48.0).tracking(-1.0) }
|
||||
}
|
||||
pub fn h2(self) -> TextStyle {
|
||||
if self.phone() { TextStyle::new(24.0, 500.0).lh(32.0).tracking(-0.48) } else { TextStyle::new(28.0, 500.0).lh(36.0).tracking(-0.56) }
|
||||
}
|
||||
pub fn lede(self) -> TextStyle {
|
||||
if self.phone() { TEXT_16 } else { TextStyle::new(18.0, 400.0).lh(28.0) }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,214 @@
|
||||
//! The page's small parts: hairlines, paragraphs with inline code, buttons and links.
|
||||
|
||||
use rune::{Color, El, Link, LinkPaint, Path, Shape, Span, TextStyle, Tx, canvas, el, rich, row, text};
|
||||
|
||||
use crate::tokens::*;
|
||||
|
||||
pub fn hairline(key: &str) -> El {
|
||||
el().key(key).w_full().h(1.0).fill(line()).a11y_hidden()
|
||||
}
|
||||
|
||||
/// `s` with each `` `code` `` set in mono 13 at the text's full strength, as the page sets
|
||||
/// identifiers inside prose.
|
||||
pub fn prose(key: &str, s: &str, style: TextStyle, color: Color) -> El {
|
||||
let mut content = String::with_capacity(s.len());
|
||||
let mut spans = Vec::new();
|
||||
for (i, piece) in s.split('`').enumerate() {
|
||||
let at = content.len();
|
||||
content.push_str(piece);
|
||||
if i % 2 == 1 {
|
||||
spans.push(Span::new(at, content.len()).mono().size(13.0).color(fg()));
|
||||
}
|
||||
}
|
||||
rich(content, spans).key(key).font(style).color(color).wrap().selectable(true)
|
||||
}
|
||||
|
||||
/// A section's paragraph under its heading.
|
||||
pub fn intro(key: &str, s: &str) -> El {
|
||||
prose(key, s, TEXT_16, fg2()).max_w(MEASURE).mt(16.0)
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, PartialEq)]
|
||||
pub enum Button {
|
||||
/// White, with GitHub's mark.
|
||||
GitHub,
|
||||
/// White: the main action.
|
||||
Primary,
|
||||
/// Quiet: the rest.
|
||||
Secondary,
|
||||
}
|
||||
|
||||
/// A pill button that is a link.
|
||||
pub fn button(key: &str, label: &str, href: &str, kind: Button) -> El {
|
||||
let primary = kind != Button::Secondary;
|
||||
let (fill, hover, ink) = if primary { (fg(), Color::WHITE, Color::BLACK) } else { (surface2(), Color::WHITE.alpha(0.04), fg()) };
|
||||
let mut b = row().key(key).href(href).h(40.0).px(16.0).gap(8.0).center_y().radius(20.0).fill(fill).hover(hover).press_scale(0.98);
|
||||
if kind == Button::GitHub {
|
||||
b = b.child(github_mark(Color::BLACK));
|
||||
}
|
||||
if !primary {
|
||||
b = b.border(1.0, line());
|
||||
}
|
||||
b.child(text(label.to_owned()).font(TEXT_14_MEDIUM).color(ink))
|
||||
}
|
||||
|
||||
/// `s` with `[label](url)` links in it, the links at full strength.
|
||||
pub fn linked(key: &str, s: &str, style: TextStyle, color: Color) -> El {
|
||||
let mut content = String::with_capacity(s.len());
|
||||
let mut links = Vec::new();
|
||||
let mut rest = s;
|
||||
while let Some(open) = rest.find('[') {
|
||||
let Some(mid) = rest[open..].find("](").map(|m| open + m) else { break };
|
||||
let Some(close) = rest[mid..].find(')').map(|c| mid + c) else { break };
|
||||
content.push_str(&rest[..open]);
|
||||
let at = content.len();
|
||||
content.push_str(&rest[open + 1..mid]);
|
||||
links.push((at..content.len(), rest[mid + 2..close].to_owned()));
|
||||
rest = &rest[close + 1..];
|
||||
}
|
||||
content.push_str(rest);
|
||||
let spans = links.iter().map(|(r, _)| Span::new(r.start, r.end).color(fg())).collect();
|
||||
let mut t = rich(content, spans).key(key).font(style).color(color).wrap().selectable(true);
|
||||
for (r, url) in links {
|
||||
t = t.link(Link::new(r, url).hover(LinkPaint::default().underline(fg())));
|
||||
}
|
||||
t.on_link(|_: &mut crate::State, url: &str, tx: &mut Tx| {
|
||||
tx.open_url(url).ok();
|
||||
})
|
||||
}
|
||||
|
||||
/// A text link in a row of them: quiet until hovered.
|
||||
pub fn nav_link(key: &str, label: &str, href: &str, style: TextStyle) -> El {
|
||||
row().key(key).href(href).hover_group()
|
||||
.child(text(label.to_owned()).font(style).color(fg2()).group_color(fg()))
|
||||
}
|
||||
|
||||
/// GitHub's mark, 16 points.
|
||||
pub fn github_mark(color: Color) -> El {
|
||||
canvas(Shape::new().view_box(16.0, 16.0).fill_path(&mark_path(), color)).key("mark").size(16.0, 16.0).a11y_hidden()
|
||||
}
|
||||
|
||||
/// GitHub's octocat mark on a 16-unit square, from its SVG path.
|
||||
fn mark_path() -> Path {
|
||||
svg_path("M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8")
|
||||
}
|
||||
|
||||
/// The numbers in an SVG path's data, in order.
|
||||
fn numbers(d: &str) -> Vec<f32> {
|
||||
let mut out = Vec::new();
|
||||
let mut cur = String::new();
|
||||
let flush = |cur: &mut String, out: &mut Vec<f32>| {
|
||||
if let Ok(v) = cur.parse() {
|
||||
out.push(v);
|
||||
}
|
||||
cur.clear();
|
||||
};
|
||||
for c in d.chars() {
|
||||
match c {
|
||||
'0'..='9' => cur.push(c),
|
||||
'.' if cur.contains('.') => {
|
||||
flush(&mut cur, &mut out);
|
||||
cur.push(c);
|
||||
}
|
||||
'.' => cur.push(c),
|
||||
'-' => {
|
||||
flush(&mut cur, &mut out);
|
||||
cur.push(c);
|
||||
}
|
||||
_ => flush(&mut cur, &mut out),
|
||||
}
|
||||
}
|
||||
flush(&mut cur, &mut out);
|
||||
out
|
||||
}
|
||||
|
||||
/// A path from SVG path data with the commands GitHub's mark uses (M, C, c, s, A as a straight
|
||||
/// line's worth of curve) in absolute and relative forms.
|
||||
pub fn svg_path(d: &str) -> Path {
|
||||
let mut path = Path::new();
|
||||
let mut at = [0.0f32; 2];
|
||||
let mut start = at;
|
||||
let mut ctrl = at;
|
||||
let mut cmds = Vec::new();
|
||||
let mut piece = String::new();
|
||||
for c in d.chars() {
|
||||
if c.is_ascii_alphabetic() {
|
||||
if !piece.is_empty() {
|
||||
cmds.push(std::mem::take(&mut piece));
|
||||
}
|
||||
}
|
||||
piece.push(c);
|
||||
}
|
||||
cmds.push(piece);
|
||||
for cmd in cmds {
|
||||
let mut chars = cmd.chars();
|
||||
let Some(op) = chars.next() else { continue };
|
||||
let n = numbers(chars.as_str());
|
||||
let rel = op.is_ascii_lowercase();
|
||||
let off = |p: [f32; 2], at: [f32; 2]| if rel { [p[0] + at[0], p[1] + at[1]] } else { p };
|
||||
match op.to_ascii_uppercase() {
|
||||
'M' => {
|
||||
for (i, p) in n.chunks_exact(2).enumerate() {
|
||||
at = off([p[0], p[1]], at);
|
||||
path = if i == 0 { path.move_to(at) } else { path.line_to(at) };
|
||||
if i == 0 {
|
||||
start = at;
|
||||
}
|
||||
}
|
||||
ctrl = at;
|
||||
}
|
||||
'L' => {
|
||||
for p in n.chunks_exact(2) {
|
||||
at = off([p[0], p[1]], at);
|
||||
path = path.line_to(at);
|
||||
}
|
||||
ctrl = at;
|
||||
}
|
||||
'C' => {
|
||||
for p in n.chunks_exact(6) {
|
||||
let (c1, c2, end) = (off([p[0], p[1]], at), off([p[2], p[3]], at), off([p[4], p[5]], at));
|
||||
path = path.cubic_to(c1, c2, end);
|
||||
ctrl = c2;
|
||||
at = end;
|
||||
}
|
||||
}
|
||||
'S' => {
|
||||
for p in n.chunks_exact(4) {
|
||||
let c1 = [2.0 * at[0] - ctrl[0], 2.0 * at[1] - ctrl[1]];
|
||||
let (c2, end) = (off([p[0], p[1]], at), off([p[2], p[3]], at));
|
||||
path = path.cubic_to(c1, c2, end);
|
||||
ctrl = c2;
|
||||
at = end;
|
||||
}
|
||||
}
|
||||
'A' => {
|
||||
// The mark's one arc is a quarter turn of a circle; a quadratic through its
|
||||
// corner draws it closely enough at 16 points.
|
||||
for p in n.chunks_exact(7) {
|
||||
let end = off([p[5], p[6]], at);
|
||||
let corner = [end[0], at[1]];
|
||||
path = path.quad_to(corner, end);
|
||||
at = end;
|
||||
ctrl = at;
|
||||
}
|
||||
}
|
||||
'Z' => {
|
||||
path = path.close();
|
||||
at = start;
|
||||
ctrl = at;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
path
|
||||
}
|
||||
|
||||
pub fn shape_dot(center: [f32; 2], r: f32, color: Color, shape: Shape) -> Shape {
|
||||
let pts: Vec<[f32; 2]> = (0..12)
|
||||
.map(|i| {
|
||||
let a = i as f32 / 12.0 * std::f32::consts::TAU;
|
||||
[center[0] + r * a.cos(), center[1] + r * a.sin()]
|
||||
})
|
||||
.collect();
|
||||
shape.fill(pts, color)
|
||||
}
|
||||
@@ -0,0 +1,344 @@
|
||||
//! ᚱUNE on Anomaly's pixel grid: letters 11 pixels tall, 2-pixel stems, notched corners, fitted one
|
||||
//! clear pixel apart. The R is the rune ᚱ (raidō), so the name is spelled with a real rune and
|
||||
//! still reads as RUNE. Drawn as one shape, so the static page gets it as an inline SVG.
|
||||
//!
|
||||
//! A light runs down the ᚱ's strokes on hover (and every 5 to 9 s in the masthead while it's on
|
||||
//! screen): each cell warms in 40 ms and cools with a 180 ms time constant.
|
||||
|
||||
use rune::{El, Shape, canvas};
|
||||
|
||||
use crate::tokens::{glint, ink};
|
||||
|
||||
const RUNE: [&str; 11] = [
|
||||
"###....", "####...", "##.##..", "##..##.", "##..##.", "##.##..", "####...", "##.##..", "##..##.", "##...##", "##...##",
|
||||
];
|
||||
const U: [&str; 11] = [
|
||||
"##...##", "##...##", "##...##", "##...##", "##...##", "##...##", "##...##", "##...##", "##...##", "#######", ".#####.",
|
||||
];
|
||||
const N: [&str; 11] = [
|
||||
"###...##", "####..##", "####..##", "####..##", "##.##.##", "##.##.##", "##.##.##", "##..####", "##..####", "##..####",
|
||||
"##...###",
|
||||
];
|
||||
const E: [&str; 11] = [
|
||||
"######", "######", "##....", "##....", "#####.", "#####.", "##....", "##....", "##....", "######", "######",
|
||||
];
|
||||
|
||||
pub const CAP: usize = 11;
|
||||
|
||||
/// The glint's travel along the ᚱ, its rise and its cooling time constant, in seconds.
|
||||
const TRAVEL: f64 = 0.7;
|
||||
const RISE: f64 = 0.04;
|
||||
const TAU: f64 = 0.18;
|
||||
|
||||
fn ink_cells(rows: &[&str]) -> Vec<(i32, i32)> {
|
||||
rows.iter().enumerate().flat_map(|(y, r)| r.bytes().enumerate().filter(|&(_, c)| c == b'#').map(move |(x, _)| (x as i32, y as i32))).collect()
|
||||
}
|
||||
|
||||
/// Where `next` starts after `prev` (placed at `at`): as far left as keeps one clear pixel
|
||||
/// between their ink in every direction, diagonals included.
|
||||
fn fit(prev: &[&str], at: i32, next: &[&str]) -> i32 {
|
||||
let a: Vec<_> = ink_cells(prev).into_iter().map(|(x, y)| (x + at, y)).collect();
|
||||
let b = ink_cells(next);
|
||||
let mut x = at + 1;
|
||||
while a.iter().any(|&(ax, ay)| b.iter().any(|&(bx, by)| (bx + x - ax).abs() <= 1 && (by - ay).abs() <= 1)) {
|
||||
x += 1;
|
||||
}
|
||||
x
|
||||
}
|
||||
|
||||
pub struct Glyphs {
|
||||
/// Each glyph's rows and where it starts.
|
||||
pub glyphs: Vec<(&'static [&'static str], i32)>,
|
||||
pub width: usize,
|
||||
/// The ᚱ's cells with their place along its carve path, 0 to 1.
|
||||
pub carve: Vec<(i32, i32, f32)>,
|
||||
}
|
||||
|
||||
impl Glyphs {
|
||||
pub fn new() -> Glyphs {
|
||||
let mut glyphs: Vec<(&'static [&'static str], i32)> = Vec::new();
|
||||
for rows in [&RUNE[..], &U[..], &N[..], &E[..]] {
|
||||
let x = glyphs.last().map_or(0, |&(prev, at)| fit(prev, at, rows));
|
||||
glyphs.push((rows, x));
|
||||
}
|
||||
let &(last, at) = glyphs.last().unwrap();
|
||||
let width = at as usize + last[0].len();
|
||||
Glyphs { glyphs, width, carve: carve_order(&RUNE) }
|
||||
}
|
||||
}
|
||||
|
||||
/// Rows to rectangles, merging each row's runs so no seams show between pixels.
|
||||
fn runs(rows: &[&str], dx: i32, out: &mut Vec<[f32; 4]>) {
|
||||
for (y, row) in rows.iter().enumerate() {
|
||||
let row = row.as_bytes();
|
||||
let mut x = 0;
|
||||
while x < row.len() {
|
||||
if row[x] != b'#' {
|
||||
x += 1;
|
||||
continue;
|
||||
}
|
||||
let start = x;
|
||||
while x < row.len() && row[x] == b'#' {
|
||||
x += 1;
|
||||
}
|
||||
out.push([(dx + start as i32) as f32, y as f32, (x - start) as f32, 1.0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn rect(r: [f32; 4]) -> Vec<[f32; 2]> {
|
||||
let [x, y, w, h] = r;
|
||||
vec![[x, y], [x + w, y], [x + w, y + h], [x, y + h]]
|
||||
}
|
||||
|
||||
/// ᚱ's carve order: the stave top to bottom, then the bowl out and back, then the leg. Each
|
||||
/// cell gets the arc length (0 to 1) of its nearest point on that path.
|
||||
fn carve_order(rows: &[&str]) -> Vec<(i32, i32, f32)> {
|
||||
let path: [[[f32; 2]; 2]; 4] =
|
||||
[[[1.0, 0.5], [1.0, 10.5]], [[1.5, 0.5], [5.0, 3.5]], [[5.0, 3.5], [1.5, 6.5]], [[2.5, 6.5], [6.0, 10.5]]];
|
||||
let lens: Vec<f32> = path.iter().map(|[a, b]| (b[0] - a[0]).hypot(b[1] - a[1])).collect();
|
||||
let total: f32 = lens.iter().sum();
|
||||
ink_cells(rows)
|
||||
.into_iter()
|
||||
.map(|(x, y)| {
|
||||
let c = [x as f32 + 0.5, y as f32 + 0.5];
|
||||
let (mut best, mut arc, mut acc) = (f32::INFINITY, 0.0, 0.0);
|
||||
for (i, [a, b]) in path.iter().enumerate() {
|
||||
let (dx, dy) = (b[0] - a[0], b[1] - a[1]);
|
||||
let p = (((c[0] - a[0]) * dx + (c[1] - a[1]) * dy) / (dx * dx + dy * dy)).clamp(0.0, 1.0);
|
||||
let d = (a[0] + dx * p - c[0]).hypot(a[1] + dy * p - c[1]);
|
||||
if d < best - 1e-6 {
|
||||
best = d;
|
||||
arc = acc + p * lens[i];
|
||||
}
|
||||
acc += lens[i];
|
||||
}
|
||||
(x, y, arc / total)
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn ease_in_out(p: f64) -> f64 {
|
||||
if p < 0.5 { 2.0 * p * p } else { 1.0 - (-2.0 * p + 2.0).powi(2) / 2.0 }
|
||||
}
|
||||
|
||||
/// When the head passes `order` (0 to 1) along the carve, in seconds after the start.
|
||||
fn passes(order: f32) -> f64 {
|
||||
let (mut lo, mut hi) = (0.0, 1.0);
|
||||
for _ in 0..20 {
|
||||
let m = (lo + hi) / 2.0;
|
||||
if ease_in_out(m) < f64::from(order) { lo = m } else { hi = m }
|
||||
}
|
||||
(lo + hi) / 2.0 * TRAVEL
|
||||
}
|
||||
|
||||
/// How lit a cell at `order` is `t` seconds into a glint (0 to 1).
|
||||
pub fn heat(order: f32, t: f64) -> f32 {
|
||||
let since = t - passes(order);
|
||||
if since < 0.0 {
|
||||
0.0
|
||||
} else if since < RISE {
|
||||
(since / RISE) as f32
|
||||
} else {
|
||||
let h = (-(since - RISE) / TAU).exp() as f32;
|
||||
if h > 0.004 { h } else { 0.0 }
|
||||
}
|
||||
}
|
||||
|
||||
/// How long a glint runs before every cell has cooled.
|
||||
pub const GLINT_SECONDS: f64 = TRAVEL + RISE + TAU * 6.0;
|
||||
|
||||
/// How the ᚱ is lit.
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq)]
|
||||
pub enum Glow {
|
||||
/// At rest.
|
||||
#[default]
|
||||
Off,
|
||||
/// A light running down the strokes, this many seconds in.
|
||||
Glint(f64),
|
||||
/// Reduced motion: the whole letter lit this much (0 to 1), with no travel.
|
||||
Lit(f32),
|
||||
}
|
||||
|
||||
/// The wordmark at `cell` points a pixel, lit as `glow` says.
|
||||
pub fn wordmark(g: &Glyphs, cell: f32, glow: Glow) -> El {
|
||||
let mut rects = Vec::new();
|
||||
for &(rows, x) in &g.glyphs {
|
||||
runs(rows, x, &mut rects);
|
||||
}
|
||||
let mut shape = Shape::new().view_box(g.width as f32, CAP as f32);
|
||||
for r in rects {
|
||||
shape = shape.fill(rect(r), ink());
|
||||
}
|
||||
let hot = glint();
|
||||
for &(x, y, order) in &g.carve {
|
||||
let h = match glow {
|
||||
Glow::Off => 0.0,
|
||||
Glow::Glint(t) => heat(order, t),
|
||||
Glow::Lit(level) => level,
|
||||
};
|
||||
if h > 0.0 {
|
||||
shape = shape.fill(rect([x as f32, y as f32, 1.0, 1.0]), hot.alpha(h));
|
||||
}
|
||||
}
|
||||
canvas(shape).key("wordmark").size(cell * g.width as f32, cell * CAP as f32).a11y_hidden()
|
||||
}
|
||||
|
||||
/// Reduced motion's stand-in for a glint, `t` seconds in: the letter fades to lit in 90 ms,
|
||||
/// holds half a second and fades back. None once it's over.
|
||||
pub fn lit(t: f64) -> Option<f32> {
|
||||
const FADE: f64 = 0.09;
|
||||
const HOLD: f64 = 0.5;
|
||||
let level = if t < 0.0 {
|
||||
return None;
|
||||
} else if t < FADE {
|
||||
t / FADE
|
||||
} else if t < FADE + HOLD {
|
||||
1.0
|
||||
} else if t < 2.0 * FADE + HOLD {
|
||||
1.0 - (t - FADE - HOLD) / FADE
|
||||
} else {
|
||||
return None;
|
||||
};
|
||||
Some(level as f32)
|
||||
}
|
||||
|
||||
/// When each wordmark's light started, and when the masthead's next idle one is due.
|
||||
#[derive(Default)]
|
||||
pub struct Glints {
|
||||
masthead: Option<f64>,
|
||||
brand: Option<f64>,
|
||||
next: Option<f64>,
|
||||
/// Reduced motion, as the view last saw it: idle glints skip.
|
||||
reduced: bool,
|
||||
seed: u32,
|
||||
}
|
||||
|
||||
impl Glints {
|
||||
pub fn masthead(&mut self, now: f64) {
|
||||
start(&mut self.masthead, now);
|
||||
}
|
||||
|
||||
pub fn brand(&mut self, now: f64) {
|
||||
start(&mut self.brand, now);
|
||||
}
|
||||
|
||||
/// The masthead came on screen or left: idle glints run every 5 to 9 s while it shows.
|
||||
pub fn masthead_visible(&mut self, on: bool, reduced: bool, now: f64) {
|
||||
self.reduced = reduced;
|
||||
self.next = on.then(|| now + self.pause());
|
||||
}
|
||||
|
||||
fn pause(&mut self) -> f64 {
|
||||
// xorshift: the gaps only need to not line up.
|
||||
let mut x = self.seed.wrapping_add(0x9e37_79b9) | 1;
|
||||
x ^= x << 13;
|
||||
x ^= x >> 17;
|
||||
x ^= x << 5;
|
||||
self.seed = x;
|
||||
5.0 + 4.0 * f64::from(x) / f64::from(u32::MAX)
|
||||
}
|
||||
|
||||
/// Advances to `now`: returns (changed, still moving) and sets when to look again.
|
||||
pub fn tick(&mut self, now: f64) -> (bool, bool, Option<f64>) {
|
||||
if let Some(at) = self.next
|
||||
&& now >= at
|
||||
{
|
||||
if !self.reduced {
|
||||
start(&mut self.masthead, now);
|
||||
}
|
||||
self.next = Some(now + self.pause());
|
||||
}
|
||||
let mut changed = false;
|
||||
let mut moving = false;
|
||||
for g in [&mut self.masthead, &mut self.brand] {
|
||||
if let Some(at) = *g {
|
||||
changed = true;
|
||||
if now - at >= GLINT_SECONDS {
|
||||
*g = None;
|
||||
} else {
|
||||
moving = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
(changed, moving, self.next)
|
||||
}
|
||||
|
||||
pub fn glow(&self, which: Which, now: f64, reduced: bool) -> Glow {
|
||||
let Some(at) = (match which {
|
||||
Which::Masthead => self.masthead,
|
||||
Which::Brand => self.brand,
|
||||
}) else {
|
||||
return Glow::Off;
|
||||
};
|
||||
let t = now - at;
|
||||
if reduced {
|
||||
lit(t).map_or(Glow::Off, Glow::Lit)
|
||||
} else if (0.0..GLINT_SECONDS).contains(&t) {
|
||||
Glow::Glint(t)
|
||||
} else {
|
||||
Glow::Off
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub enum Which {
|
||||
Masthead,
|
||||
Brand,
|
||||
}
|
||||
|
||||
/// Starts a light unless one is still running, so hovering in and out doesn't restart it.
|
||||
fn start(at: &mut Option<f64>, now: f64) {
|
||||
if at.is_none_or(|a| now - a >= GLINT_SECONDS) {
|
||||
*at = Some(now);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn idle_glints_wait_five_to_nine_seconds_and_stop_off_screen() {
|
||||
let mut g = Glints::default();
|
||||
g.masthead_visible(true, false, 0.0);
|
||||
let (_, moving, next) = g.tick(1.0);
|
||||
let at = next.unwrap();
|
||||
assert!(!moving && (5.0..=9.0).contains(&at), "{at}");
|
||||
let (changed, moving, _) = g.tick(at);
|
||||
assert!(changed && moving);
|
||||
assert!(matches!(g.glow(Which::Masthead, at + 0.1, false), Glow::Glint(_)));
|
||||
g.masthead_visible(false, false, at + 0.2);
|
||||
let (_, _, next) = g.tick(at + GLINT_SECONDS + 1.0);
|
||||
assert_eq!(next, None);
|
||||
assert_eq!(g.glow(Which::Masthead, at + GLINT_SECONDS + 1.0, false), Glow::Off);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reduced_motion_lights_on_hover_only() {
|
||||
let mut g = Glints::default();
|
||||
g.masthead_visible(true, true, 0.0);
|
||||
let (_, _, next) = g.tick(0.0);
|
||||
let (changed, ..) = g.tick(next.unwrap());
|
||||
assert!(!changed, "no idle light under reduced motion");
|
||||
g.masthead(20.0);
|
||||
assert_eq!(g.glow(Which::Masthead, 20.3, true), Glow::Lit(1.0));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn letters_fit_one_clear_pixel_apart() {
|
||||
let g = Glyphs::new();
|
||||
let starts: Vec<i32> = g.glyphs.iter().map(|&(_, x)| x).collect();
|
||||
assert_eq!(starts[0], 0);
|
||||
assert!(starts.windows(2).all(|w| w[1] > w[0]), "{starts:?}");
|
||||
assert_eq!(g.carve.len(), ink_cells(&RUNE).len());
|
||||
assert!(g.carve.iter().all(|&(_, _, o)| (0.0..=1.0).contains(&o)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_glint_warms_the_stave_first_and_cools_to_nothing() {
|
||||
assert!(heat(0.0, 0.03) > heat(0.9, 0.03));
|
||||
assert_eq!(heat(0.5, GLINT_SECONDS), 0.0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,409 @@
|
||||
{
|
||||
"lockfileVersion": 2,
|
||||
"configVersion": 1,
|
||||
"workspaces": {
|
||||
"": {
|
||||
"name": "rune-www",
|
||||
"devDependencies": {
|
||||
"@cloudflare/build-output-utils": "0.8.5",
|
||||
"@cloudflare/vite-plugin": "2.0.0-beta.v.4",
|
||||
"@types/bun": "1.3.13",
|
||||
"@types/node": "25.5.0",
|
||||
"cf": "1.0.0-beta.12",
|
||||
"typescript": "6.0.2",
|
||||
"vite": "8.1.3",
|
||||
},
|
||||
},
|
||||
},
|
||||
"packages": {
|
||||
"@cloudflare/build-output-utils": ["@cloudflare/build-output-utils@0.8.5", "", { "dependencies": { "@cloudflare/config": "0.23.0" } }, "sha512-xnwcDCyBSErZeOj5eUy1gTrmVjwIY51TZ0Pz9W7mZqLGA3IkIckud7dNtFdGhKSXL2szfxBRbGM4R4qFE4SoPA=="],
|
||||
|
||||
"@cloudflare/codemods": ["@cloudflare/codemods@0.4.0", "", { "bin": { "cloudflare-codemods": "dist/bin.mjs" } }, "sha512-qeRpKNXtvqhTtagx/5cLmDaFx/voBhWJ1S6SdFdBkE3OtgcPVz+Q8MtIG26zltW9Z0Icsu2FGBxV5RFmuHI/Bg=="],
|
||||
|
||||
"@cloudflare/config": ["@cloudflare/config@0.23.0", "", { "dependencies": { "zod": "4.4.3" } }, "sha512-oE0S7X54esZmJHr9hhCoqODR+yTxxkSYWCLtRiItQdPs0gQuqYw9a13zChhK+8DmdCUJIFBsMAR6t+mfu8g+9w=="],
|
||||
|
||||
"@cloudflare/runtime-types": ["@cloudflare/runtime-types@0.1.15", "", { "dependencies": { "miniflare": "5.20261019.2-beta", "workerd": "1.20261019.1" } }, "sha512-E8WCMGir4IRp/ksqodMWGpxHJvgtfgW9lbVM5mNAdWrnonMNOtGocyxVt6hG8/RGW9sjFWR7F7Cp3SCF1Cz6zg=="],
|
||||
|
||||
"@cloudflare/unenv-preset": ["@cloudflare/unenv-preset@2.16.2", "", { "peerDependencies": { "unenv": "2.0.0-rc.24", "workerd": ">1.20260305.0 <2.0.0-0" }, "optionalPeers": ["workerd"] }, "sha512-JBP1+Z7ZSNG/d4mRP+y8VC5dka3tZVMLEZRvS+rzQ4DGV1EoxRFQckcJTTkXbHSQiTj0DtNI01Zwb/V2fX0mvQ=="],
|
||||
|
||||
"@cloudflare/vite-plugin": ["@cloudflare/vite-plugin@2.0.0-beta.v.4", "", { "dependencies": { "@cloudflare/build-output-utils": "0.9.4", "@cloudflare/config": "0.28.0", "@cloudflare/runtime-types": "0.1.15", "@cloudflare/unenv-preset": "2.16.2", "miniflare": "5.20261019.2-beta", "unenv": "2.0.0-rc.24", "ws": "8.21.0" }, "peerDependencies": { "vite": "^7.0.0 || ^8.0.0" }, "bin": { "cf-vite": "bin/cf-vite" } }, "sha512-VNlj5o1Uc3IbfoDIA03jD/vd7hGDgbnx/Sjof6xYVpvCW0CRug67dQN0nabyKKSa27tvdSp0l1i+veTuNurA6g=="],
|
||||
|
||||
"@cloudflare/workerd-darwin-64": ["@cloudflare/workerd-darwin-64@1.20261019.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-5ZILbAta/fBQvhmAYeCE7dKMMYIr7N9wJEX50fEGLKSIwGtvT0HzSfHNIK/O7cBQ4gHQ2WfIiPClvwcye6E0fA=="],
|
||||
|
||||
"@cloudflare/workerd-darwin-arm64": ["@cloudflare/workerd-darwin-arm64@1.20261019.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-cww2Ab6lVMxpTiEEjKmPI58p5EMo0vYTZSH+3WkqXJdQgc3ES66GuL247+U2B2YWajhhu2tqj7jySrXneU749g=="],
|
||||
|
||||
"@cloudflare/workerd-linux-64": ["@cloudflare/workerd-linux-64@1.20261019.1", "", { "os": "linux", "cpu": "x64" }, "sha512-4++VRi9vkQROYqrpZYOixIJuVDmujkwrT4kszsxNFlvcmsX6Mr2GumvxIN3gIixS3vJUh3Umdtkthqj5X0S3Xw=="],
|
||||
|
||||
"@cloudflare/workerd-linux-arm64": ["@cloudflare/workerd-linux-arm64@1.20261019.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-75PVtJOwfjScQ53sbLtQXI7D8yP1c21t+WEUPaYbqkzaz4ZqfR5wAd+zuWs8G5Q7kOj2SQIvEfY5Sn8Y+UVrnA=="],
|
||||
|
||||
"@cloudflare/workerd-windows-64": ["@cloudflare/workerd-windows-64@1.20261019.1", "", { "os": "win32", "cpu": "x64" }, "sha512-z49fvKTETMCnG6wnMcQwxx9CpryFceiKz04FRjq26EkhCyzRNJ6c3UXhyZz3r5f1CXnnBZc5DcU8ZouPkUJCqw=="],
|
||||
|
||||
"@cspotcode/source-map-support": ["@cspotcode/source-map-support@0.8.1", "", { "dependencies": { "@jridgewell/trace-mapping": "0.3.9" } }, "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw=="],
|
||||
|
||||
"@emnapi/core": ["@emnapi/core@1.11.1", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.2", "tslib": "^2.4.0" } }, "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ=="],
|
||||
|
||||
"@emnapi/runtime": ["@emnapi/runtime@1.11.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw=="],
|
||||
|
||||
"@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.2", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA=="],
|
||||
|
||||
"@img/colour": ["@img/colour@1.1.0", "", {}, "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ=="],
|
||||
|
||||
"@img/sharp-darwin-arm64": ["@img/sharp-darwin-arm64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.3.4" }, "os": "darwin", "cpu": "arm64" }, "sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg=="],
|
||||
|
||||
"@img/sharp-darwin-x64": ["@img/sharp-darwin-x64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.3.4" }, "os": "darwin", "cpu": "x64" }, "sha512-+BR255RhDlpygUpOc/Jdt1nT6DQ3XG/ERo5wbcdOf5Q320dKtPCKPLR1LJs9VGXRaMa8l1uUa0tkCNOXiAxZUw=="],
|
||||
|
||||
"@img/sharp-freebsd-wasm32": ["@img/sharp-freebsd-wasm32@0.35.5", "", { "dependencies": { "@img/sharp-wasm32": "0.35.5" }, "os": "freebsd" }, "sha512-Y/z91nEZ4uIBX5X3nfTovjU9lHNKFYbL2lpHCLVNmXQK03VIZvXBBt0KxbPGp2SdGSF+2mQU4e+hQaWOt86iAw=="],
|
||||
|
||||
"@img/sharp-libvips-darwin-arm64": ["@img/sharp-libvips-darwin-arm64@1.3.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-5R89nBYiRdUlSWJxPhO+GVtaXzXSxKnRu/xqMn3KTA3L9EB9Oy/P+Nn2f2vlhPuUdy/Zusb2DarbyTpGCfEDuw=="],
|
||||
|
||||
"@img/sharp-libvips-darwin-x64": ["@img/sharp-libvips-darwin-x64@1.3.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-iR2OKH80yi0U+dUplyh3/xdpFvps6YkCwsXenIJxqxR1v9o+xtKTGbS9H7cps+2Vxjc8B1j96p75NmTGjIhtpQ=="],
|
||||
|
||||
"@img/sharp-libvips-linux-arm": ["@img/sharp-libvips-linux-arm@1.3.4", "", { "os": "linux", "cpu": "arm", "libc": "glibc" }, "sha512-LmRtTsOHuvM2+wlO2Db37dx5MiZhB0FvSunciw48YjdOkZz9KAiRbm8ujeMOA1INqmei5NapFxYEK1D1ZSidmw=="],
|
||||
|
||||
"@img/sharp-libvips-linux-arm64": ["@img/sharp-libvips-linux-arm64@1.3.4", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-Y3dgX/6lE2QhQb+Gxy0WZxfg9MEm/JBjamZpS2IklP7xIQoKN4hzAm7KcMVGtaVDt3neE9OKBC7vAfonA/Lr1A=="],
|
||||
|
||||
"@img/sharp-libvips-linux-ppc64": ["@img/sharp-libvips-linux-ppc64@1.3.4", "", { "os": "linux", "cpu": "ppc64", "libc": "glibc" }, "sha512-Le6boB8Tai0Nis+gIxIpKx68UDVVIqdR8Tin5Yf1z2LJJQLDJvCDRqRu+jC2qCoD+eIomonmOwB4smBRxfVpYQ=="],
|
||||
|
||||
"@img/sharp-libvips-linux-riscv64": ["@img/sharp-libvips-linux-riscv64@1.3.4", "", { "os": "linux", "cpu": "none", "libc": "glibc" }, "sha512-aHkkIEHPRdQEegJN20MLmGtxYD9R2wQr3Cwpddnu5+YKMt6Uzax7S9h5gpZTo8wyrGuZSlfQ63OevL5mTyOC7Q=="],
|
||||
|
||||
"@img/sharp-libvips-linux-s390x": ["@img/sharp-libvips-linux-s390x@1.3.4", "", { "os": "linux", "cpu": "s390x", "libc": "glibc" }, "sha512-ra/mB6MikESDUO7Yg+Mi95bFBb9GsObURuhnOv3OqknjGe9sZrG8tCe9q0xSIGrtLgvgw0gKnFWcK4blSgQOuQ=="],
|
||||
|
||||
"@img/sharp-libvips-linux-x64": ["@img/sharp-libvips-linux-x64@1.3.4", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-GJ//SSXbnwSDes02umB3nDJLFcQzw8a18V8fyhqr6tV515tOEMdImjjxj1AoafMRz56F3PHgftnj1QEKSU1zkw=="],
|
||||
|
||||
"@img/sharp-libvips-linuxmusl-arm64": ["@img/sharp-libvips-linuxmusl-arm64@1.3.4", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-hvulFwtjUcagsis6BBxHwGFwWoNZjgYmULGVrZcyfNbjA8hKILbRxGg15/7w5HDyXHXUos/j6baAWqnCyQ2DWA=="],
|
||||
|
||||
"@img/sharp-libvips-linuxmusl-x64": ["@img/sharp-libvips-linuxmusl-x64@1.3.4", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-6zXKeE/p39I1AmA3cJG35eyBGNqNddLnUXjhwBnsGjFPWqf5VKkDBEqaEkPDoTEtkxwi2vv8Tcr2mDyP4So7Fg=="],
|
||||
|
||||
"@img/sharp-linux-arm": ["@img/sharp-linux-arm@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm": "1.3.4" }, "os": "linux", "cpu": "arm", "libc": "glibc" }, "sha512-LEaXK2WdXVK5ykcw0buWyPMsmLLL2vpHLD6yrNSW+JGEL3BZPA4tpKN6iaMc4AxTTAoaX/sU1rOL51lcIz48ZQ=="],
|
||||
|
||||
"@img/sharp-linux-arm64": ["@img/sharp-linux-arm64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm64": "1.3.4" }, "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-LYVx5JTsOM2CBzmxreh+nl64/3H6Xb09iSLknqH47z2T2DFFxDeFLP5y4dJwe6H7uGQlHPyEEtIqyo3DYsRwdQ=="],
|
||||
|
||||
"@img/sharp-linux-ppc64": ["@img/sharp-linux-ppc64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-ppc64": "1.3.4" }, "os": "linux", "cpu": "ppc64", "libc": "glibc" }, "sha512-QVxAAq8evVRI9ia2vqgwrmWucn5Dfv+JdWzj75pD8omHLPSP7f8p20O8jxzjCcuCEQEOtYOZUmX1hkiZ0kdevA=="],
|
||||
|
||||
"@img/sharp-linux-riscv64": ["@img/sharp-linux-riscv64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-riscv64": "1.3.4" }, "os": "linux", "cpu": "none", "libc": "glibc" }, "sha512-LtdreXguaavKODPIfzJ4kffx7UNt1omwtK0rch4EBbbSTXPnxWmYSayXdLJw0fJzQ97kHt1gL/yh4tvU+nCyRQ=="],
|
||||
|
||||
"@img/sharp-linux-s390x": ["@img/sharp-linux-s390x@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-s390x": "1.3.4" }, "os": "linux", "cpu": "s390x", "libc": "glibc" }, "sha512-UZasTOFiYzotTsGOCu42BfUzP6Tu6Do/947iRm1RsLKvlllxwGcn4RN27LibGWceix4Y+Pmw3jsnTcCQIgWjqA=="],
|
||||
|
||||
"@img/sharp-linux-x64": ["@img/sharp-linux-x64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-x64": "1.3.4" }, "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-SxFtLTeJInhAA9Q836kux2vZNeOBQEx658qvbboZScr0wIARym3IcGmW7KpVD5sbVg0Ojy+udFQdayYIZyoNog=="],
|
||||
|
||||
"@img/sharp-linuxmusl-arm64": ["@img/sharp-linuxmusl-arm64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-arm64": "1.3.4" }, "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-9HbMclmI1zlNkFRs3z9/eBtDjfD0sGlrX1z6b1qwmiFY5ElDLh4BC0LPBdVp7z1DXFiKlIcznf+ZlsuZzLxQqg=="],
|
||||
|
||||
"@img/sharp-linuxmusl-x64": ["@img/sharp-linuxmusl-x64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-x64": "1.3.4" }, "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-4KOphqB035HrVdqLZfCgMzzERrQkkzOwRhl4OAkRO1YCldbaFjySXMaK534Mo0V+LndnlJk+sbUyLeU0ULyD1A=="],
|
||||
|
||||
"@img/sharp-wasm32": ["@img/sharp-wasm32@0.35.5", "", { "dependencies": { "@emnapi/runtime": "^1.11.3" } }, "sha512-Ptsga1su4tQx+LLF1ECS9U6nz5kmrXKo6XVbtR48Ke3ZRxxgaWBu7IDtEe1quo8hiupwm6WFqxVlXaSf7IINGQ=="],
|
||||
|
||||
"@img/sharp-webcontainers-wasm32": ["@img/sharp-webcontainers-wasm32@0.35.5", "", { "dependencies": { "@img/sharp-wasm32": "0.35.5" }, "cpu": "none" }, "sha512-hfhF/FmoQyTUkA0bIKFOtw536BQSeBMe6BF6QyWlrPxT754+TFLaZ7sKKTfvvM0yJgKgaYTwnFCIZ/GuDw5SUA=="],
|
||||
|
||||
"@img/sharp-win32-arm64": ["@img/sharp-win32-arm64@0.35.5", "", { "os": "win32", "cpu": "arm64" }, "sha512-X4t7g+7ZA5DKblCBEXGjUqqemj4vczING/5viFwAL8h4N3qYeyjwdCvRLHi4EdOUI+2Z7UFlp1VM+p/AuEtm6Q=="],
|
||||
|
||||
"@img/sharp-win32-ia32": ["@img/sharp-win32-ia32@0.35.5", "", { "os": "win32", "cpu": "ia32" }, "sha512-5Zm82LoBc43nhwNybZlG7Y1KO//Zhsn306fQl29ZOuStHLGTo3BWL83q3cznX0poxSAMuYL1On/BHBxkBeKr6A=="],
|
||||
|
||||
"@img/sharp-win32-x64": ["@img/sharp-win32-x64@0.35.5", "", { "os": "win32", "cpu": "x64" }, "sha512-x76eH0vEiHlcMQu8Y8IenntaACtddpT6W0wmXtWrnKcnKI7ME5DdgqhAD6SEWOEl1v2zDvkZDhFA9KnURwpfqg=="],
|
||||
|
||||
"@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="],
|
||||
|
||||
"@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.6.0", "", {}, "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw=="],
|
||||
|
||||
"@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.9", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ=="],
|
||||
|
||||
"@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.2.7", "", { "dependencies": { "@tybys/wasm-util": "^0.10.3" }, "peerDependencies": { "@emnapi/core": "^1.7.1 || 2.0.0-beta.2 || 2.0.0-beta.3", "@emnapi/runtime": "^1.7.1 || 2.0.0-beta.2 || 2.0.0-beta.3" } }, "sha512-zJccwplOAbgfZju95IUHazLnx9RAPtPN2YGJXI6UbrgeaR9QfPjGrQL6ERkSAtnVCA4Q+83ApGyaX5zdpCaKkQ=="],
|
||||
|
||||
"@oxc-project/types": ["@oxc-project/types@0.139.0", "", {}, "sha512-r9gHphtCs+1M7J0pw6Sn/hh/Wpa/iQrOOkrNAlVLF/gHq+/CJmHIWKKUUhdWjcD6CIa8idarspCsASiXCXvFUw=="],
|
||||
|
||||
"@poppinss/colors": ["@poppinss/colors@4.1.6", "", { "dependencies": { "kleur": "^4.1.5" } }, "sha512-H9xkIdFswbS8n1d6vmRd8+c10t2Qe+rZITbbDHHkQixH5+2x1FDGmi/0K+WgWiqQFKPSlIYB7jlH6Kpfn6Fleg=="],
|
||||
|
||||
"@poppinss/dumper": ["@poppinss/dumper@0.6.5", "", { "dependencies": { "@poppinss/colors": "^4.1.5", "@sindresorhus/is": "^7.0.2", "supports-color": "^10.0.0" } }, "sha512-NBdYIb90J7LfOI32dOewKI1r7wnkiH6m920puQ3qHUeZkxNkQiFnXVWoE6YtFSv6QOiPPf7ys6i+HWWecDz7sw=="],
|
||||
|
||||
"@poppinss/exception": ["@poppinss/exception@1.2.3", "", {}, "sha512-dCED+QRChTVatE9ibtoaxc+WkdzOSjYTKi/+uacHWIsfodVfpsueo3+DKpgU5Px8qXjgmXkSvhXvSCz3fnP9lw=="],
|
||||
|
||||
"@rolldown/binding-android-arm64": ["@rolldown/binding-android-arm64@1.1.5", "", { "os": "android", "cpu": "arm64" }, "sha512-lZg8fqIv2v7FF237bwMgzGZEJvGL79/s5knJ/i6FmsGF4XXlzccZ4jb+TrFIxtSSxFtIpdsgrPZeMk1I9AFcyQ=="],
|
||||
|
||||
"@rolldown/binding-darwin-arm64": ["@rolldown/binding-darwin-arm64@1.1.5", "", { "os": "darwin", "cpu": "arm64" }, "sha512-51Bnx9pNiMRKSUNtBfySkNJ9vMU9Hh3I1ozDd6gyPPYzaXCfnptUcEZxXGYFn+ul2dtcMUiqGR1Yai2K10uoTw=="],
|
||||
|
||||
"@rolldown/binding-darwin-x64": ["@rolldown/binding-darwin-x64@1.1.5", "", { "os": "darwin", "cpu": "x64" }, "sha512-Tm+gbfC0aHu1tBA/JvKQh32S0K6YgCHkiAF4/W6xX0K0RmNuc94VeK419dJoE65R5aRxmo+noZQSWrAMF6yb6g=="],
|
||||
|
||||
"@rolldown/binding-freebsd-x64": ["@rolldown/binding-freebsd-x64@1.1.5", "", { "os": "freebsd", "cpu": "x64" }, "sha512-JMzDKCCXq93YccG5gz3hvOs1oXRKAf0XYpfOS88e+wZrC8Iugj6j68867vrYZkvpDDpKn/KoKORThmchMpF6TA=="],
|
||||
|
||||
"@rolldown/binding-linux-arm-gnueabihf": ["@rolldown/binding-linux-arm-gnueabihf@1.1.5", "", { "os": "linux", "cpu": "arm" }, "sha512-uML21j2K5TfPGutKxub+M+nLjZIrWjXQ5Grx4lCe/nimTj9B4L63zHpjXLl4y0L3mcm2htEQIb06oCG/szerNw=="],
|
||||
|
||||
"@rolldown/binding-linux-arm64-gnu": ["@rolldown/binding-linux-arm64-gnu@1.1.5", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-navSiuTMogvnQoZoM/v+l3ZWo50/NTwSHSzheABx/RCnmUPaKwq9qSo4Br2OYRs21+Fz8uFqITZM3H4opOB0/Q=="],
|
||||
|
||||
"@rolldown/binding-linux-arm64-musl": ["@rolldown/binding-linux-arm64-musl@1.1.5", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-lAryqH7IteztmCXQXk0etKj4wBQ7Gx5S6LjKhsgp9zb8I5bsuvU/2llH1hDQcjsFeqIsovMVN339/8pUDDBXxA=="],
|
||||
|
||||
"@rolldown/binding-linux-ppc64-gnu": ["@rolldown/binding-linux-ppc64-gnu@1.1.5", "", { "os": "linux", "cpu": "ppc64", "libc": "glibc" }, "sha512-fsK/sNBnxzBlL4O1JNrZakVQxPspqpED5dLtNsZS9oOKmtSpdNIzxH2kkol5HYTWJN47sE20ztMJPxfZ89qGOg=="],
|
||||
|
||||
"@rolldown/binding-linux-s390x-gnu": ["@rolldown/binding-linux-s390x-gnu@1.1.5", "", { "os": "linux", "cpu": "s390x", "libc": "glibc" }, "sha512-gLYb4BIadlfTOYT5gO503n8zQjXflgzpD0FcyKh0Mzx3rqCZKnHoJWV9xe1KXUJ5lx2JfcSHr/mhzS0PC/McAA=="],
|
||||
|
||||
"@rolldown/binding-linux-x64-gnu": ["@rolldown/binding-linux-x64-gnu@1.1.5", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-FjcpEKUyJygHgs1o50VYNvkt5+7Le/VEdYt0AkRpkL33MnyQfwr8l5mXwMmfmTbyMPr5vJLC+8/Gd9gXnwU1QQ=="],
|
||||
|
||||
"@rolldown/binding-linux-x64-musl": ["@rolldown/binding-linux-x64-musl@1.1.5", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-Me+PfPI2TMeOQk0gYWfLQZtTktrmzbr8cDboqX83XKc7UrgAi55gF+2dUkWdxd19n55Essp2yeca+O9N5rBxHg=="],
|
||||
|
||||
"@rolldown/binding-openharmony-arm64": ["@rolldown/binding-openharmony-arm64@1.1.5", "", { "os": "none", "cpu": "arm64" }, "sha512-yc5WrLzXks6zCQfn9Oxr8pORKyl/pF+QjHmW/Qx3qu0oyrrNC+y2JLTU1E2rcWYAmzlnqngWXHQjy51VzW70Vw=="],
|
||||
|
||||
"@rolldown/binding-wasm32-wasi": ["@rolldown/binding-wasm32-wasi@1.1.5", "", { "dependencies": { "@emnapi/core": "1.11.1", "@emnapi/runtime": "1.11.1", "@napi-rs/wasm-runtime": "^1.1.6" }, "cpu": "none" }, "sha512-VbQGPX2b4r48TAMIM2cjgluIM1HYutm4pcTEJsle7iEP7sB1dFqtPLBVbdLAZCxy1txCcPxf4QFf4v8uvltPqA=="],
|
||||
|
||||
"@rolldown/binding-win32-arm64-msvc": ["@rolldown/binding-win32-arm64-msvc@1.1.5", "", { "os": "win32", "cpu": "arm64" }, "sha512-gHv82k63z4qpV5+Q1y/12KrK0ltWBukVDI8nZcbT7Tt/ZlOIVwppazneq0F93oDxTo3IgAMEDIoQh3E2n6mVsw=="],
|
||||
|
||||
"@rolldown/binding-win32-x64-msvc": ["@rolldown/binding-win32-x64-msvc@1.1.5", "", { "os": "win32", "cpu": "x64" }, "sha512-tTZuDBPw85tEN5PQi1pnEBzDy0Z49HtScLAbD5t6hyeU92A95pRWaSMw1GZZi/RwgSgUIl0xrSlXIT/9QzvYSA=="],
|
||||
|
||||
"@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.1", "", {}, "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw=="],
|
||||
|
||||
"@sindresorhus/is": ["@sindresorhus/is@7.2.0", "", {}, "sha512-P1Cz1dWaFfR4IR+U13mqqiGsLFf1KbayybWwdd2vfctdV6hDpUkgCY0nKOLLTMSoRd/jJNjtbqzf13K8DCCXQw=="],
|
||||
|
||||
"@speed-highlight/core": ["@speed-highlight/core@1.2.24", "", {}, "sha512-qeW2e1l78afw8VhRPfPQ1Gjj+KU5XFQ/OFV5ti6eTa9bruO7mJyZtA4vw0ofqmA3tKCkROE9xLk3VZoeRc98nw=="],
|
||||
|
||||
"@tybys/wasm-util": ["@tybys/wasm-util@0.10.4", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-W3c4gRigFS0T/Ma4qIYF3GDAc5AQdHb1yL5znJT1Zv1YaD9Kitx656wBjvr19qbiosmZT8lWDM5BEMynUqX65A=="],
|
||||
|
||||
"@types/bun": ["@types/bun@1.3.13", "", { "dependencies": { "bun-types": "1.3.13" } }, "sha512-9fqXWk5YIHGGnUau9TEi+qdlTYDAnOj+xLCmSTwXfAIqXr2x4tytJb43E9uCvt09zJURKXwAtkoH4nLQfzeTXw=="],
|
||||
|
||||
"@types/node": ["@types/node@25.5.0", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw=="],
|
||||
|
||||
"blake3-wasm": ["blake3-wasm@2.1.5", "", {}, "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g=="],
|
||||
|
||||
"bun-types": ["bun-types@1.3.13", "", { "dependencies": { "@types/node": "*" } }, "sha512-QXKeHLlOLqQX9LgYaHJfzdBaV21T63HhFJnvuRCcjZiaUDpbs5ED1MgxbMra71CsryN/1dAoXuJJJwIv/2drVA=="],
|
||||
|
||||
"cf": ["cf@1.0.0-beta.12", "", { "dependencies": { "@cloudflare/build-output-utils": "0.8.5", "@cloudflare/codemods": "0.4.0", "@cloudflare/config": "0.23.0", "@cloudflare/runtime-types": "0.1.7", "blake3-wasm": "2.1.5", "miniflare": "5.20260930.0-alpha", "minisearch": "7.2.0" }, "bin": { "cf": "./bin/cf", "cloudflare": "./bin/cf" } }, "sha512-tyQ+Jpnw+4NDwDtl7ZNteXBm7N0TeJ6gYww79kkabpcYoCEXkUUpmt9BlDUKH8ub17tjAeiuyqa9NQzH0vp2Aw=="],
|
||||
|
||||
"cookie": ["cookie@1.1.1", "", {}, "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ=="],
|
||||
|
||||
"detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="],
|
||||
|
||||
"error-stack-parser-es": ["error-stack-parser-es@1.0.5", "", {}, "sha512-5qucVt2XcuGMcEGgWI7i+yZpmpByQ8J1lHhcL7PwqCwu9FPP3VUXzT4ltHe5i2z9dePwEHcDVOAfSnHsOlCXRA=="],
|
||||
|
||||
"fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="],
|
||||
|
||||
"fsevents": ["fsevents@2.3.3", "", { "os": "darwin", "hasInstallScript": true }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="],
|
||||
|
||||
"kleur": ["kleur@4.1.5", "", {}, "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ=="],
|
||||
|
||||
"lightningcss": ["lightningcss@1.33.0", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.33.0", "lightningcss-darwin-arm64": "1.33.0", "lightningcss-darwin-x64": "1.33.0", "lightningcss-freebsd-x64": "1.33.0", "lightningcss-linux-arm-gnueabihf": "1.33.0", "lightningcss-linux-arm64-gnu": "1.33.0", "lightningcss-linux-arm64-musl": "1.33.0", "lightningcss-linux-x64-gnu": "1.33.0", "lightningcss-linux-x64-musl": "1.33.0", "lightningcss-win32-arm64-msvc": "1.33.0", "lightningcss-win32-x64-msvc": "1.33.0" } }, "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA=="],
|
||||
|
||||
"lightningcss-android-arm64": ["lightningcss-android-arm64@1.33.0", "", { "os": "android", "cpu": "arm64" }, "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg=="],
|
||||
|
||||
"lightningcss-darwin-arm64": ["lightningcss-darwin-arm64@1.33.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg=="],
|
||||
|
||||
"lightningcss-darwin-x64": ["lightningcss-darwin-x64@1.33.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ=="],
|
||||
|
||||
"lightningcss-freebsd-x64": ["lightningcss-freebsd-x64@1.33.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg=="],
|
||||
|
||||
"lightningcss-linux-arm-gnueabihf": ["lightningcss-linux-arm-gnueabihf@1.33.0", "", { "os": "linux", "cpu": "arm" }, "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ=="],
|
||||
|
||||
"lightningcss-linux-arm64-gnu": ["lightningcss-linux-arm64-gnu@1.33.0", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg=="],
|
||||
|
||||
"lightningcss-linux-arm64-musl": ["lightningcss-linux-arm64-musl@1.33.0", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ=="],
|
||||
|
||||
"lightningcss-linux-x64-gnu": ["lightningcss-linux-x64-gnu@1.33.0", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg=="],
|
||||
|
||||
"lightningcss-linux-x64-musl": ["lightningcss-linux-x64-musl@1.33.0", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw=="],
|
||||
|
||||
"lightningcss-win32-arm64-msvc": ["lightningcss-win32-arm64-msvc@1.33.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA=="],
|
||||
|
||||
"lightningcss-win32-x64-msvc": ["lightningcss-win32-x64-msvc@1.33.0", "", { "os": "win32", "cpu": "x64" }, "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA=="],
|
||||
|
||||
"miniflare": ["miniflare@5.20261019.2-beta", "", { "dependencies": { "@cspotcode/source-map-support": "0.8.1", "sharp": "0.35.5", "undici": "7.29.1", "workerd": "1.20261019.1", "ws": "8.21.0", "youch": "4.1.0-beta.10" } }, "sha512-QNgCA/axizZ7kv7RV3nwbRoz+w4watBlwIsyXjwgYHw4eSw5BrR1F2152s3Kz+Bzy/YxjKFHrZl3LzBRbPgYoQ=="],
|
||||
|
||||
"minisearch": ["minisearch@7.2.0", "", {}, "sha512-dqT2XBYUOZOiC5t2HRnwADjhNS2cecp9u+TJRiJ1Qp/f5qjkeT5APcGPjHw+bz89Ms8Jp+cG4AlE+QZ/QnDglg=="],
|
||||
|
||||
"nanoid": ["nanoid@3.3.20", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ=="],
|
||||
|
||||
"pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="],
|
||||
|
||||
"picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="],
|
||||
|
||||
"picomatch": ["picomatch@4.0.7", "", {}, "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA=="],
|
||||
|
||||
"postcss": ["postcss@8.5.32", "", { "dependencies": { "nanoid": "^3.3.20", "picocolors": "^1.1.1", "source-map-js": "^1.2.2" } }, "sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g=="],
|
||||
|
||||
"rolldown": ["rolldown@1.1.5", "", { "dependencies": { "@oxc-project/types": "=0.139.0", "@rolldown/pluginutils": "^1.0.0" }, "optionalDependencies": { "@rolldown/binding-android-arm64": "1.1.5", "@rolldown/binding-darwin-arm64": "1.1.5", "@rolldown/binding-darwin-x64": "1.1.5", "@rolldown/binding-freebsd-x64": "1.1.5", "@rolldown/binding-linux-arm-gnueabihf": "1.1.5", "@rolldown/binding-linux-arm64-gnu": "1.1.5", "@rolldown/binding-linux-arm64-musl": "1.1.5", "@rolldown/binding-linux-ppc64-gnu": "1.1.5", "@rolldown/binding-linux-s390x-gnu": "1.1.5", "@rolldown/binding-linux-x64-gnu": "1.1.5", "@rolldown/binding-linux-x64-musl": "1.1.5", "@rolldown/binding-openharmony-arm64": "1.1.5", "@rolldown/binding-wasm32-wasi": "1.1.5", "@rolldown/binding-win32-arm64-msvc": "1.1.5", "@rolldown/binding-win32-x64-msvc": "1.1.5" }, "bin": { "rolldown": "./bin/cli.mjs" } }, "sha512-t9z29cJjXf/vxQ8dyhCSpt6H6aSwHTk8cT5I3iy6SMXuFpk5mB6PL6XfC8PCwrPTx93udwKUm9HRteAlTGBLiA=="],
|
||||
|
||||
"semver": ["semver@7.8.6", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw=="],
|
||||
|
||||
"sharp": ["sharp@0.35.5", "", { "dependencies": { "@img/colour": "^1.1.0", "detect-libc": "^2.1.2", "semver": "^7.8.5" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.35.5", "@img/sharp-darwin-x64": "0.35.5", "@img/sharp-freebsd-wasm32": "0.35.5", "@img/sharp-libvips-darwin-arm64": "1.3.4", "@img/sharp-libvips-darwin-x64": "1.3.4", "@img/sharp-libvips-linux-arm": "1.3.4", "@img/sharp-libvips-linux-arm64": "1.3.4", "@img/sharp-libvips-linux-ppc64": "1.3.4", "@img/sharp-libvips-linux-riscv64": "1.3.4", "@img/sharp-libvips-linux-s390x": "1.3.4", "@img/sharp-libvips-linux-x64": "1.3.4", "@img/sharp-libvips-linuxmusl-arm64": "1.3.4", "@img/sharp-libvips-linuxmusl-x64": "1.3.4", "@img/sharp-linux-arm": "0.35.5", "@img/sharp-linux-arm64": "0.35.5", "@img/sharp-linux-ppc64": "0.35.5", "@img/sharp-linux-riscv64": "0.35.5", "@img/sharp-linux-s390x": "0.35.5", "@img/sharp-linux-x64": "0.35.5", "@img/sharp-linuxmusl-arm64": "0.35.5", "@img/sharp-linuxmusl-x64": "0.35.5", "@img/sharp-webcontainers-wasm32": "0.35.5", "@img/sharp-win32-arm64": "0.35.5", "@img/sharp-win32-ia32": "0.35.5", "@img/sharp-win32-x64": "0.35.5" }, "peerDependencies": { "@types/node": "*" }, "optionalPeers": ["@types/node"] }, "sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g=="],
|
||||
|
||||
"source-map-js": ["source-map-js@1.2.2", "", {}, "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw=="],
|
||||
|
||||
"supports-color": ["supports-color@10.2.2", "", {}, "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g=="],
|
||||
|
||||
"tinyglobby": ["tinyglobby@0.2.17", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.4" } }, "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g=="],
|
||||
|
||||
"tslib": ["tslib@2.9.1", "", {}, "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA=="],
|
||||
|
||||
"typescript": ["typescript@6.0.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ=="],
|
||||
|
||||
"undici": ["undici@7.29.1", "", {}, "sha512-RYONW2MeafgYlkVOKYKkA/Ag7BmXqgIWCa8t1m0JcxrQg9pI9lEqRhAOruOBCbAohOa/gkCF+iPi9hrgvTzu6Q=="],
|
||||
|
||||
"undici-types": ["undici-types@7.18.2", "", {}, "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w=="],
|
||||
|
||||
"unenv": ["unenv@2.0.0-rc.24", "", { "dependencies": { "pathe": "^2.0.3" } }, "sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw=="],
|
||||
|
||||
"vite": ["vite@8.1.3", "", { "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.4", "postcss": "^8.5.16", "rolldown": "~1.1.3", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.3.0", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-Ds+gBRbj0lwRO2Y5hwnUBdxSwlAve9LeRyU4sNnAr0ewW0gWF0n5bgXgUzbgZ49MV9BVUAQUFYVcDUcilUExMA=="],
|
||||
|
||||
"workerd": ["workerd@1.20261019.1", "", { "optionalDependencies": { "@cloudflare/workerd-darwin-64": "1.20261019.1", "@cloudflare/workerd-darwin-arm64": "1.20261019.1", "@cloudflare/workerd-linux-64": "1.20261019.1", "@cloudflare/workerd-linux-arm64": "1.20261019.1", "@cloudflare/workerd-windows-64": "1.20261019.1" }, "hasInstallScript": true, "bin": { "workerd": "bin/workerd" } }, "sha512-UUYRUq/7DmeCl11YriNbcVbjUZVLtt8uuCXFu+nz77hGFf8d4DEVXoCYtnA+MlBatE4+wxoj47DVqzK3xGBAiw=="],
|
||||
|
||||
"ws": ["ws@8.21.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g=="],
|
||||
|
||||
"youch": ["youch@4.1.0-beta.10", "", { "dependencies": { "@poppinss/colors": "^4.1.5", "@poppinss/dumper": "^0.6.4", "@speed-highlight/core": "^1.2.7", "cookie": "^1.0.2", "youch-core": "^0.3.3" } }, "sha512-rLfVLB4FgQneDr0dv1oddCVZmKjcJ6yX6mS4pU82Mq/Dt9a3cLZQ62pDBL4AUO+uVrCvtWz3ZFUL2HFAFJ/BXQ=="],
|
||||
|
||||
"youch-core": ["youch-core@0.3.3", "", { "dependencies": { "@poppinss/exception": "^1.2.2", "error-stack-parser-es": "^1.0.5" } }, "sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA=="],
|
||||
|
||||
"zod": ["zod@4.4.3", "", {}, "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ=="],
|
||||
|
||||
"@cloudflare/vite-plugin/@cloudflare/build-output-utils": ["@cloudflare/build-output-utils@0.9.4", "", { "dependencies": { "@cloudflare/config": "0.28.0" } }, "sha512-5rVdn81HEP2Uugs/wSfXu5XbadaZQkgKZl1xwkKb3kgatSOpTH2vszBXWTRh4IlE1vHnc3LwHcnc2O4TcXVbuQ=="],
|
||||
|
||||
"@cloudflare/vite-plugin/@cloudflare/config": ["@cloudflare/config@0.28.0", "", { "dependencies": { "zod": "4.6.5" } }, "sha512-2SaZn5rzNSxAR5VQYIlMm8+zHj2EGfLbaN+abYiPXDI42IFRCHSENpDxjAQpLj2NZnUVszHY4h6T1XljwHk5eQ=="],
|
||||
|
||||
"@img/sharp-wasm32/@emnapi/runtime": ["@emnapi/runtime@1.11.3", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types": ["@cloudflare/runtime-types@0.1.7", "", { "dependencies": { "miniflare": "5.20261001.0-alpha", "workerd": "1.20261001.1" } }, "sha512-avgC1wfTunbVea8HOq4ygiQ0WFQVNxcUHOQvH9TM47+0NTdsVTqB8rPQg6Tb5BfVkcWh/a0RAjk+Elr/h35mtQ=="],
|
||||
|
||||
"cf/miniflare": ["miniflare@5.20260930.0-alpha", "", { "dependencies": { "@cspotcode/source-map-support": "0.8.1", "sharp": "0.35.4", "undici": "7.29.1", "workerd": "1.20260930.2", "ws": "8.21.0", "youch": "4.1.0-beta.10" } }, "sha512-vZljfRtOEeynbhJtuvYsnCU8t6zF5wIUm9ql4YFHB7zvYw2+F2tpT0BzXjzaa++eiUIml1gsODCf02qShBmJdg=="],
|
||||
|
||||
"@cloudflare/vite-plugin/@cloudflare/config/zod": ["zod@4.6.5", "", {}, "sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare": ["miniflare@5.20261001.0-alpha", "", { "dependencies": { "@cspotcode/source-map-support": "0.8.1", "sharp": "0.35.4", "undici": "7.29.1", "workerd": "1.20261001.1", "ws": "8.21.0", "youch": "4.1.0-beta.10" } }, "sha512-GaimS5mSIOMyvd16ga+e1/QkI8cmp3z35QPHFex0DktqNQf2RVZQwMPQXdyoUreUiFP/0Gpe2MoQInTyMAD5xA=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/workerd": ["workerd@1.20261001.1", "", { "optionalDependencies": { "@cloudflare/workerd-darwin-64": "1.20261001.1", "@cloudflare/workerd-darwin-arm64": "1.20261001.1", "@cloudflare/workerd-linux-64": "1.20261001.1", "@cloudflare/workerd-linux-arm64": "1.20261001.1", "@cloudflare/workerd-windows-64": "1.20261001.1" }, "hasInstallScript": true, "bin": { "workerd": "bin/workerd" } }, "sha512-d/SIYHFO0PT/wiFZg8in4NpRIxYuFwslX1HdylOtWkBIIUmSpkGFhK820cV84XACFylwJ48xuRoWW/8DWDPsPQ=="],
|
||||
|
||||
"cf/miniflare/sharp": ["sharp@0.35.4", "", { "dependencies": { "@img/colour": "^1.1.0", "detect-libc": "^2.1.2", "semver": "^7.8.5" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.35.4", "@img/sharp-darwin-x64": "0.35.4", "@img/sharp-freebsd-wasm32": "0.35.4", "@img/sharp-libvips-darwin-arm64": "1.3.3", "@img/sharp-libvips-darwin-x64": "1.3.3", "@img/sharp-libvips-linux-arm": "1.3.3", "@img/sharp-libvips-linux-arm64": "1.3.3", "@img/sharp-libvips-linux-ppc64": "1.3.3", "@img/sharp-libvips-linux-riscv64": "1.3.3", "@img/sharp-libvips-linux-s390x": "1.3.3", "@img/sharp-libvips-linux-x64": "1.3.3", "@img/sharp-libvips-linuxmusl-arm64": "1.3.3", "@img/sharp-libvips-linuxmusl-x64": "1.3.3", "@img/sharp-linux-arm": "0.35.4", "@img/sharp-linux-arm64": "0.35.4", "@img/sharp-linux-ppc64": "0.35.4", "@img/sharp-linux-riscv64": "0.35.4", "@img/sharp-linux-s390x": "0.35.4", "@img/sharp-linux-x64": "0.35.4", "@img/sharp-linuxmusl-arm64": "0.35.4", "@img/sharp-linuxmusl-x64": "0.35.4", "@img/sharp-webcontainers-wasm32": "0.35.4", "@img/sharp-win32-arm64": "0.35.4", "@img/sharp-win32-ia32": "0.35.4", "@img/sharp-win32-x64": "0.35.4" }, "peerDependencies": { "@types/node": "*" }, "optionalPeers": ["@types/node"] }, "sha512-n++8XWcj+jCOr2IOl7h8LbKnGBDY4aPbmprMONBNFdn0ImXqpGVv5zliDs0V9HbmbCQLpbuo2ej9rAoOQTvMDA=="],
|
||||
|
||||
"cf/miniflare/workerd": ["workerd@1.20260930.2", "", { "optionalDependencies": { "@cloudflare/workerd-darwin-64": "1.20260930.2", "@cloudflare/workerd-darwin-arm64": "1.20260930.2", "@cloudflare/workerd-linux-64": "1.20260930.2", "@cloudflare/workerd-linux-arm64": "1.20260930.2", "@cloudflare/workerd-windows-64": "1.20260930.2" }, "hasInstallScript": true, "bin": { "workerd": "bin/workerd" } }, "sha512-k1lQzEiGyCDqaRsR5+o9PBT5wVU5omtas6hXx3spbEHHMFo8a7tkAixVCMsWFeiT7xhrmg21Hd6a9jLNrkcUMg=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp": ["sharp@0.35.4", "", { "dependencies": { "@img/colour": "^1.1.0", "detect-libc": "^2.1.2", "semver": "^7.8.5" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.35.4", "@img/sharp-darwin-x64": "0.35.4", "@img/sharp-freebsd-wasm32": "0.35.4", "@img/sharp-libvips-darwin-arm64": "1.3.3", "@img/sharp-libvips-darwin-x64": "1.3.3", "@img/sharp-libvips-linux-arm": "1.3.3", "@img/sharp-libvips-linux-arm64": "1.3.3", "@img/sharp-libvips-linux-ppc64": "1.3.3", "@img/sharp-libvips-linux-riscv64": "1.3.3", "@img/sharp-libvips-linux-s390x": "1.3.3", "@img/sharp-libvips-linux-x64": "1.3.3", "@img/sharp-libvips-linuxmusl-arm64": "1.3.3", "@img/sharp-libvips-linuxmusl-x64": "1.3.3", "@img/sharp-linux-arm": "0.35.4", "@img/sharp-linux-arm64": "0.35.4", "@img/sharp-linux-ppc64": "0.35.4", "@img/sharp-linux-riscv64": "0.35.4", "@img/sharp-linux-s390x": "0.35.4", "@img/sharp-linux-x64": "0.35.4", "@img/sharp-linuxmusl-arm64": "0.35.4", "@img/sharp-linuxmusl-x64": "0.35.4", "@img/sharp-webcontainers-wasm32": "0.35.4", "@img/sharp-win32-arm64": "0.35.4", "@img/sharp-win32-ia32": "0.35.4", "@img/sharp-win32-x64": "0.35.4" }, "peerDependencies": { "@types/node": "*" }, "optionalPeers": ["@types/node"] }, "sha512-n++8XWcj+jCOr2IOl7h8LbKnGBDY4aPbmprMONBNFdn0ImXqpGVv5zliDs0V9HbmbCQLpbuo2ej9rAoOQTvMDA=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/workerd/@cloudflare/workerd-darwin-64": ["@cloudflare/workerd-darwin-64@1.20261001.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-4cgSgDf28JSw/P5Dj5GCS59hzVqS5XnmGAWNkvYHLI6ODU9idGaMMNEuhJXDkEG/lsABmlVlnCgsdh2VbKWepw=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/workerd/@cloudflare/workerd-darwin-arm64": ["@cloudflare/workerd-darwin-arm64@1.20261001.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-8ulAWruEVouNmEIsQsy9WSSCS9zkLu93W2MTwp5esiFyoPp05BNSVFIFsYSPi1pkFmBBd7fsnwMpbLkaJLaVPQ=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/workerd/@cloudflare/workerd-linux-64": ["@cloudflare/workerd-linux-64@1.20261001.1", "", { "os": "linux", "cpu": "x64" }, "sha512-kZbTZJGrhsMOdqZ2BIybjaBRLZjYsRLWj7mcNw/6Y3hodOhp5MrNzcz4iWGwNVWwyIV+7Pl+/LX5VcgnRqdHOg=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/workerd/@cloudflare/workerd-linux-arm64": ["@cloudflare/workerd-linux-arm64@1.20261001.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-oOk3Zj6k/8oP0FJgZBWDn7+BqbsqIMEMaV95pulHPVbwVu4wYoLfQq2hp0vkbCNsCFLqZb7cqixXdrwD54ZIow=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/workerd/@cloudflare/workerd-windows-64": ["@cloudflare/workerd-windows-64@1.20261001.1", "", { "os": "win32", "cpu": "x64" }, "sha512-uRxm5W4VyBkoSaoP1BfOuH0873tE+vxsknF4sab6/5YIRvIAufChq3QDp+zlAn67PuGPGcn7W8QraA0t4ucmOQ=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-darwin-arm64": ["@img/sharp-darwin-arm64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.3.3" }, "os": "darwin", "cpu": "arm64" }, "sha512-Uhfl4V4lhP2nbUVF9+hyH1+luj86f1gUFeo8ALYxFoULoU+G87D43BfeMP8XHsk9boxAnCY/bf2EHwhA7MuGsA=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-darwin-x64": ["@img/sharp-darwin-x64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.3.3" }, "os": "darwin", "cpu": "x64" }, "sha512-hWniXY3bG5qKpkKrAwPe4y+VTPmf086YQAnkxWh7uA1YrlRouWGa0M0Mxj3ZjnXFkv7/TD1bTy9lGUK26vRvWw=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-freebsd-wasm32": ["@img/sharp-freebsd-wasm32@0.35.4", "", { "dependencies": { "@img/sharp-wasm32": "0.35.4" }, "os": "freebsd" }, "sha512-lIsKw/BU+kjB4eZjxrYrZmwOJYi3Ajrv66iAlBmUPyKc3HpnloevB1g3wxGD9P/5BbQ1brBGl65VRRrCvQDEqA=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-libvips-darwin-arm64": ["@img/sharp-libvips-darwin-arm64@1.3.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-suTBPTDGrI9WodccaDdwZItTSaBYASlBk1NSfElSHrUfzu3szG6lvIF58+WiFvnfzuK8ZBFS5zE00PxqxnRiPg=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-libvips-darwin-x64": ["@img/sharp-libvips-darwin-x64@1.3.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-FVJZ5mITMobmXIz/hPDTw0EintTW5H3WfrxwLqEqjiIihlu+hVRyGrFQ60xl0Lxn7Bt3zdpevPaQi0HEzqz9fw=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-libvips-linux-arm": ["@img/sharp-libvips-linux-arm@1.3.3", "", { "os": "linux", "cpu": "arm", "libc": "glibc" }, "sha512-3rbU4vqXXc3hY/OiXdl52xZvT0F1yEngWfvqudtPJg/KkyiaQw2DRsFrNzpmLvfavbwOq3qXn36GP8obHRULQA=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-libvips-linux-arm64": ["@img/sharp-libvips-linux-arm64@1.3.3", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-0DaL0A6Xu6sQSQFwe4iVCrKWU2cCTItnRsYsCdxAMm9NF6twAA9BKnoqy4hqz4+azQ0JHuA26qiUKsf1XJ/v5A=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-libvips-linux-ppc64": ["@img/sharp-libvips-linux-ppc64@1.3.3", "", { "os": "linux", "cpu": "ppc64", "libc": "glibc" }, "sha512-cdn1OvUBwsXhbC0zSzJnNzf5MZ/mTrobawDvNXBTxe8VtqKAm0sRuEY2Evzovb/w9JMk4TvRxqt1mekSuJz64w=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-libvips-linux-riscv64": ["@img/sharp-libvips-linux-riscv64@1.3.3", "", { "os": "linux", "cpu": "none", "libc": "glibc" }, "sha512-HjPVx7yKz+0lqdhDlTw1tt90wamBoxhiXpvl1XZpJLiHH4RCJ5yDTqH+VlYPv2fwFs89JFw4c1IexYOcQUi4IQ=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-libvips-linux-s390x": ["@img/sharp-libvips-linux-s390x@1.3.3", "", { "os": "linux", "cpu": "s390x", "libc": "glibc" }, "sha512-neWLh+3yCNThxnfy3c4BbVBeGgt9aftno+XbT56iK28RgeDs3UOFWviLWlUu0bArYVYJaFDK+RRohbicUNCm8Q=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-libvips-linux-x64": ["@img/sharp-libvips-linux-x64@1.3.3", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-4vKmvAst9nrowcqquKFAyZJUDolUaIp8uRiN0mWFguJ1IplC9/pitXtlnnlU4aa/eJw3J7i67V+pwUL+wZGdsA=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-libvips-linuxmusl-arm64": ["@img/sharp-libvips-linuxmusl-arm64@1.3.3", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-Y9kQaLMuNoB0bPYOOdcZMaseNrFpPodIWWMrx+CZyydf2xn68j9WYc6sWWRrDwNkzCQjKYfc68L7jKjGlHMibw=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-libvips-linuxmusl-x64": ["@img/sharp-libvips-linuxmusl-x64@1.3.3", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-fj8Mv0HHfD1Rr+4I68+3agJynxDWtBFgicTbSOb9Bke6pIwzGcJ+RX/yHjmiEGFMCavY/dxvem7MyNaJF+wDiw=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-linux-arm": ["@img/sharp-linux-arm@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm": "1.3.3" }, "os": "linux", "cpu": "arm", "libc": "glibc" }, "sha512-7OAS8gI0EReKGVN2HssHlM6umJgxF5VI3xN0p9FA91p/YO+ou5hiNghLdZ5BEHztwaaK5+bLKRf8x/o2L2nk9A=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-linux-arm64": ["@img/sharp-linux-arm64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm64": "1.3.3" }, "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-De4jpEnAU8Hd5oT0j1G3uL4ZvTuipVMn7YC6vPaJhy6/7EwEae0SVAoBrUMYQbkLGDm85taVWwuPc1a44LTzCQ=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-linux-ppc64": ["@img/sharp-linux-ppc64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linux-ppc64": "1.3.3" }, "os": "linux", "cpu": "ppc64", "libc": "glibc" }, "sha512-2oYZJeIl4kCcMGk4ouZVjnkCtFrpQFlNEtJ6GbxzhHQchwH0NH/qEb9ykmOl29dqwMq+JhFdZn+1ak2FKhI9fQ=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-linux-riscv64": ["@img/sharp-linux-riscv64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linux-riscv64": "1.3.3" }, "os": "linux", "cpu": "none", "libc": "glibc" }, "sha512-cPbNChoRURAWdebDIHSenxRpgEdy7JkPydSnUxRm9VvKD7m0/xVaR/8Fzlu81pk5nHEvHH87UZUA7cTtwnbJSA=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-linux-s390x": ["@img/sharp-linux-s390x@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linux-s390x": "1.3.3" }, "os": "linux", "cpu": "s390x", "libc": "glibc" }, "sha512-RY0JFY8Fd6RonCBtHz+DvadaPkXDSI1AUn6yWL9TipqkZ1vY8w8evqdgyDFnkm4/K1ve1TvZiaePP5oSd4+WVQ=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-linux-x64": ["@img/sharp-linux-x64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linux-x64": "1.3.3" }, "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-9qvvEAuk8k89TfWUoX2htWjbAMX8p+NxCppjpcg5k6xMsjhBQPTsoIh36h9Qde4WRuGpJeYnOjdosDn/cnv+OA=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-linuxmusl-arm64": ["@img/sharp-linuxmusl-arm64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-arm64": "1.3.3" }, "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-KB5jxpfWQTr0nc3xdHtWChdbifHrBGsd2SM62Eyxrl8afikm+f5qGBU75SJIZBT/S1MC8XyacdlXBMSWq6OURA=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-linuxmusl-x64": ["@img/sharp-linuxmusl-x64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-x64": "1.3.3" }, "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-f+eZJZIQNEEd26RPSW+76chwOf1XtA2Y/O+5ocVyLliHkeih3e+jhLVBdNTd2rS3IbNXK8+ug93Vf5ZXtF5Lxg=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-webcontainers-wasm32": ["@img/sharp-webcontainers-wasm32@0.35.4", "", { "dependencies": { "@img/sharp-wasm32": "0.35.4" }, "cpu": "none" }, "sha512-ESfNkywmCfPNyaZjxooddJQiQ+l/nTpGEOGthxiLnIHXC/CmcBixnfwUleX9mCz9ovrUUvKMap/pm8RYbzfwaA=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-win32-arm64": ["@img/sharp-win32-arm64@0.35.4", "", { "os": "win32", "cpu": "arm64" }, "sha512-iNdlBX9gLVvqe2I3uIJSIKTq6wckP/DYxZtcqxm09x5Gi24DnFBmPAWZmr60ZyYMG0xlzo6goG3670ar+RXvRw=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-win32-ia32": ["@img/sharp-win32-ia32@0.35.4", "", { "os": "win32", "cpu": "ia32" }, "sha512-kqRsbaa5CS6KHlpxnN7WhE6vAAugXyZButpRdvDWetlv6Qv4N9WTcrWzF7tXfB9T7MsoadqdI8hmwLq6UlLvtw=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-win32-x64": ["@img/sharp-win32-x64@0.35.4", "", { "os": "win32", "cpu": "x64" }, "sha512-XtmnYhBcrORsJ4XJngyzr/EWP0hRZLAZRFaApdKuviyqF78+ylxh2y06ZmtULAMOnObJ3ucpN0AcwSWnMowTRg=="],
|
||||
|
||||
"cf/miniflare/workerd/@cloudflare/workerd-darwin-64": ["@cloudflare/workerd-darwin-64@1.20260930.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-wxKsfekWeev6xkjHEMx3x7nz6WfWOn1/scQ8geqWQhUm8qRl1ZRZhjnj+rucIMLhLhP9RGSYMZIjEm3AV0zwVQ=="],
|
||||
|
||||
"cf/miniflare/workerd/@cloudflare/workerd-darwin-arm64": ["@cloudflare/workerd-darwin-arm64@1.20260930.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-cviPpheZGQ2H5X+Ctxd3wfxhksNrdyoNprjSgg3br2+psetKacjdEvK8CILdN/2GF+u1KOExvr45amSL6lgzGA=="],
|
||||
|
||||
"cf/miniflare/workerd/@cloudflare/workerd-linux-64": ["@cloudflare/workerd-linux-64@1.20260930.2", "", { "os": "linux", "cpu": "x64" }, "sha512-cwrJAC5y/avPd1OzGyhc5OvUUfPXBFc065TY5CjXp7Hb3dhiTx6JeB5Pc8L3G8L8M44HyAfRHSpoLtRr+SR3cQ=="],
|
||||
|
||||
"cf/miniflare/workerd/@cloudflare/workerd-linux-arm64": ["@cloudflare/workerd-linux-arm64@1.20260930.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-FHucB4gak1IuT+IxLx3KbtMBMapZhcqD9EdhHvBxk1FpHwD2QU5x26MRRVN53jIKG/O25HUmE9yffb3cMANQgw=="],
|
||||
|
||||
"cf/miniflare/workerd/@cloudflare/workerd-windows-64": ["@cloudflare/workerd-windows-64@1.20260930.2", "", { "os": "win32", "cpu": "x64" }, "sha512-JHFMdGFMqP+M2QiVzZq1S8Ie66Gvxo7Og5EYz/KtmDvGCqge5L3lK+ksZxAhF3j/tpSLqdvlUvcTKoR9PkwTTQ=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-darwin-arm64": ["@img/sharp-darwin-arm64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.3.3" }, "os": "darwin", "cpu": "arm64" }, "sha512-Uhfl4V4lhP2nbUVF9+hyH1+luj86f1gUFeo8ALYxFoULoU+G87D43BfeMP8XHsk9boxAnCY/bf2EHwhA7MuGsA=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-darwin-x64": ["@img/sharp-darwin-x64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.3.3" }, "os": "darwin", "cpu": "x64" }, "sha512-hWniXY3bG5qKpkKrAwPe4y+VTPmf086YQAnkxWh7uA1YrlRouWGa0M0Mxj3ZjnXFkv7/TD1bTy9lGUK26vRvWw=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-freebsd-wasm32": ["@img/sharp-freebsd-wasm32@0.35.4", "", { "dependencies": { "@img/sharp-wasm32": "0.35.4" }, "os": "freebsd" }, "sha512-lIsKw/BU+kjB4eZjxrYrZmwOJYi3Ajrv66iAlBmUPyKc3HpnloevB1g3wxGD9P/5BbQ1brBGl65VRRrCvQDEqA=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-libvips-darwin-arm64": ["@img/sharp-libvips-darwin-arm64@1.3.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-suTBPTDGrI9WodccaDdwZItTSaBYASlBk1NSfElSHrUfzu3szG6lvIF58+WiFvnfzuK8ZBFS5zE00PxqxnRiPg=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-libvips-darwin-x64": ["@img/sharp-libvips-darwin-x64@1.3.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-FVJZ5mITMobmXIz/hPDTw0EintTW5H3WfrxwLqEqjiIihlu+hVRyGrFQ60xl0Lxn7Bt3zdpevPaQi0HEzqz9fw=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-libvips-linux-arm": ["@img/sharp-libvips-linux-arm@1.3.3", "", { "os": "linux", "cpu": "arm", "libc": "glibc" }, "sha512-3rbU4vqXXc3hY/OiXdl52xZvT0F1yEngWfvqudtPJg/KkyiaQw2DRsFrNzpmLvfavbwOq3qXn36GP8obHRULQA=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-libvips-linux-arm64": ["@img/sharp-libvips-linux-arm64@1.3.3", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-0DaL0A6Xu6sQSQFwe4iVCrKWU2cCTItnRsYsCdxAMm9NF6twAA9BKnoqy4hqz4+azQ0JHuA26qiUKsf1XJ/v5A=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-libvips-linux-ppc64": ["@img/sharp-libvips-linux-ppc64@1.3.3", "", { "os": "linux", "cpu": "ppc64", "libc": "glibc" }, "sha512-cdn1OvUBwsXhbC0zSzJnNzf5MZ/mTrobawDvNXBTxe8VtqKAm0sRuEY2Evzovb/w9JMk4TvRxqt1mekSuJz64w=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-libvips-linux-riscv64": ["@img/sharp-libvips-linux-riscv64@1.3.3", "", { "os": "linux", "cpu": "none", "libc": "glibc" }, "sha512-HjPVx7yKz+0lqdhDlTw1tt90wamBoxhiXpvl1XZpJLiHH4RCJ5yDTqH+VlYPv2fwFs89JFw4c1IexYOcQUi4IQ=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-libvips-linux-s390x": ["@img/sharp-libvips-linux-s390x@1.3.3", "", { "os": "linux", "cpu": "s390x", "libc": "glibc" }, "sha512-neWLh+3yCNThxnfy3c4BbVBeGgt9aftno+XbT56iK28RgeDs3UOFWviLWlUu0bArYVYJaFDK+RRohbicUNCm8Q=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-libvips-linux-x64": ["@img/sharp-libvips-linux-x64@1.3.3", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-4vKmvAst9nrowcqquKFAyZJUDolUaIp8uRiN0mWFguJ1IplC9/pitXtlnnlU4aa/eJw3J7i67V+pwUL+wZGdsA=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-libvips-linuxmusl-arm64": ["@img/sharp-libvips-linuxmusl-arm64@1.3.3", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-Y9kQaLMuNoB0bPYOOdcZMaseNrFpPodIWWMrx+CZyydf2xn68j9WYc6sWWRrDwNkzCQjKYfc68L7jKjGlHMibw=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-libvips-linuxmusl-x64": ["@img/sharp-libvips-linuxmusl-x64@1.3.3", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-fj8Mv0HHfD1Rr+4I68+3agJynxDWtBFgicTbSOb9Bke6pIwzGcJ+RX/yHjmiEGFMCavY/dxvem7MyNaJF+wDiw=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-linux-arm": ["@img/sharp-linux-arm@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm": "1.3.3" }, "os": "linux", "cpu": "arm", "libc": "glibc" }, "sha512-7OAS8gI0EReKGVN2HssHlM6umJgxF5VI3xN0p9FA91p/YO+ou5hiNghLdZ5BEHztwaaK5+bLKRf8x/o2L2nk9A=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-linux-arm64": ["@img/sharp-linux-arm64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm64": "1.3.3" }, "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-De4jpEnAU8Hd5oT0j1G3uL4ZvTuipVMn7YC6vPaJhy6/7EwEae0SVAoBrUMYQbkLGDm85taVWwuPc1a44LTzCQ=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-linux-ppc64": ["@img/sharp-linux-ppc64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linux-ppc64": "1.3.3" }, "os": "linux", "cpu": "ppc64", "libc": "glibc" }, "sha512-2oYZJeIl4kCcMGk4ouZVjnkCtFrpQFlNEtJ6GbxzhHQchwH0NH/qEb9ykmOl29dqwMq+JhFdZn+1ak2FKhI9fQ=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-linux-riscv64": ["@img/sharp-linux-riscv64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linux-riscv64": "1.3.3" }, "os": "linux", "cpu": "none", "libc": "glibc" }, "sha512-cPbNChoRURAWdebDIHSenxRpgEdy7JkPydSnUxRm9VvKD7m0/xVaR/8Fzlu81pk5nHEvHH87UZUA7cTtwnbJSA=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-linux-s390x": ["@img/sharp-linux-s390x@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linux-s390x": "1.3.3" }, "os": "linux", "cpu": "s390x", "libc": "glibc" }, "sha512-RY0JFY8Fd6RonCBtHz+DvadaPkXDSI1AUn6yWL9TipqkZ1vY8w8evqdgyDFnkm4/K1ve1TvZiaePP5oSd4+WVQ=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-linux-x64": ["@img/sharp-linux-x64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linux-x64": "1.3.3" }, "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-9qvvEAuk8k89TfWUoX2htWjbAMX8p+NxCppjpcg5k6xMsjhBQPTsoIh36h9Qde4WRuGpJeYnOjdosDn/cnv+OA=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-linuxmusl-arm64": ["@img/sharp-linuxmusl-arm64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-arm64": "1.3.3" }, "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-KB5jxpfWQTr0nc3xdHtWChdbifHrBGsd2SM62Eyxrl8afikm+f5qGBU75SJIZBT/S1MC8XyacdlXBMSWq6OURA=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-linuxmusl-x64": ["@img/sharp-linuxmusl-x64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-x64": "1.3.3" }, "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-f+eZJZIQNEEd26RPSW+76chwOf1XtA2Y/O+5ocVyLliHkeih3e+jhLVBdNTd2rS3IbNXK8+ug93Vf5ZXtF5Lxg=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-webcontainers-wasm32": ["@img/sharp-webcontainers-wasm32@0.35.4", "", { "dependencies": { "@img/sharp-wasm32": "0.35.4" }, "cpu": "none" }, "sha512-ESfNkywmCfPNyaZjxooddJQiQ+l/nTpGEOGthxiLnIHXC/CmcBixnfwUleX9mCz9ovrUUvKMap/pm8RYbzfwaA=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-win32-arm64": ["@img/sharp-win32-arm64@0.35.4", "", { "os": "win32", "cpu": "arm64" }, "sha512-iNdlBX9gLVvqe2I3uIJSIKTq6wckP/DYxZtcqxm09x5Gi24DnFBmPAWZmr60ZyYMG0xlzo6goG3670ar+RXvRw=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-win32-ia32": ["@img/sharp-win32-ia32@0.35.4", "", { "os": "win32", "cpu": "ia32" }, "sha512-kqRsbaa5CS6KHlpxnN7WhE6vAAugXyZButpRdvDWetlv6Qv4N9WTcrWzF7tXfB9T7MsoadqdI8hmwLq6UlLvtw=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-win32-x64": ["@img/sharp-win32-x64@0.35.4", "", { "os": "win32", "cpu": "x64" }, "sha512-XtmnYhBcrORsJ4XJngyzr/EWP0hRZLAZRFaApdKuviyqF78+ylxh2y06ZmtULAMOnObJ3ucpN0AcwSWnMowTRg=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-freebsd-wasm32/@img/sharp-wasm32": ["@img/sharp-wasm32@0.35.4", "", { "dependencies": { "@emnapi/runtime": "^1.11.3" } }, "sha512-zQnl4Kwp7Q6NHsENtU2T/00Zi+w3AQNwz3+UaTyVBy2FpXrzXzGjndpK61onhZjRtRpQXxCTeqw19bVyXOh7jA=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-webcontainers-wasm32/@img/sharp-wasm32": ["@img/sharp-wasm32@0.35.4", "", { "dependencies": { "@emnapi/runtime": "^1.11.3" } }, "sha512-zQnl4Kwp7Q6NHsENtU2T/00Zi+w3AQNwz3+UaTyVBy2FpXrzXzGjndpK61onhZjRtRpQXxCTeqw19bVyXOh7jA=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-freebsd-wasm32/@img/sharp-wasm32": ["@img/sharp-wasm32@0.35.4", "", { "dependencies": { "@emnapi/runtime": "^1.11.3" } }, "sha512-zQnl4Kwp7Q6NHsENtU2T/00Zi+w3AQNwz3+UaTyVBy2FpXrzXzGjndpK61onhZjRtRpQXxCTeqw19bVyXOh7jA=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-webcontainers-wasm32/@img/sharp-wasm32": ["@img/sharp-wasm32@0.35.4", "", { "dependencies": { "@emnapi/runtime": "^1.11.3" } }, "sha512-zQnl4Kwp7Q6NHsENtU2T/00Zi+w3AQNwz3+UaTyVBy2FpXrzXzGjndpK61onhZjRtRpQXxCTeqw19bVyXOh7jA=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-freebsd-wasm32/@img/sharp-wasm32/@emnapi/runtime": ["@emnapi/runtime@1.11.3", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="],
|
||||
|
||||
"cf/miniflare/sharp/@img/sharp-webcontainers-wasm32/@img/sharp-wasm32/@emnapi/runtime": ["@emnapi/runtime@1.11.3", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-freebsd-wasm32/@img/sharp-wasm32/@emnapi/runtime": ["@emnapi/runtime@1.11.3", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="],
|
||||
|
||||
"cf/@cloudflare/runtime-types/miniflare/sharp/@img/sharp-webcontainers-wasm32/@img/sharp-wasm32/@emnapi/runtime": ["@emnapi/runtime@1.11.3", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="],
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { bindings, defineConfig, triggers } from "cf/config"
|
||||
import { BASE_PATH, hostForMode } from "./src/base.ts"
|
||||
|
||||
// `--mode dev` builds and deploys the dev Worker on dev.anoma.ly; any other mode is production on anoma.ly.
|
||||
// The account comes from CLOUDFLARE_ACCOUNT_ID.
|
||||
export default defineConfig(({ mode }) => {
|
||||
const host = hostForMode(mode)
|
||||
return {
|
||||
worker: {
|
||||
name: mode === "dev" ? "rune-www-dev" : "rune-www-production",
|
||||
compatibilityDate: "2026-10-13",
|
||||
entrypoint: "./worker.ts",
|
||||
assets: { runWorkerFirst: true },
|
||||
env: {
|
||||
ASSETS: bindings.assets(),
|
||||
CANONICAL_HOST: bindings.text(host),
|
||||
},
|
||||
triggers: [
|
||||
triggers.fetch({ pattern: `${host}${BASE_PATH}`, zone: host }),
|
||||
triggers.fetch({ pattern: `${host}${BASE_PATH}/*`, zone: host }),
|
||||
],
|
||||
workersDev: false,
|
||||
previewUrls: false,
|
||||
},
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,54 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
||||
<meta name="color-scheme" content="dark" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<!--robots-->
|
||||
<title>__TITLE__</title>
|
||||
<meta name="description" content="__DESCRIPTION__" />
|
||||
<link rel="canonical" href="__URL__" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:site_name" content="Rune" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta property="og:title" content="__SHARE_TITLE__" />
|
||||
<meta property="og:description" content="__DESCRIPTION__" />
|
||||
<meta property="og:url" content="__URL__" />
|
||||
<meta property="og:image" content="__ORIGIN__/og.png" />
|
||||
<meta property="og:image:type" content="image/png" />
|
||||
<meta property="og:image:width" content="1200" />
|
||||
<meta property="og:image:height" content="630" />
|
||||
<meta property="og:image:alt" content="ᚱUNE in blue pixel letters on black, the R the rune ᚱ" />
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content="__SHARE_TITLE__" />
|
||||
<meta name="twitter:description" content="__DESCRIPTION__" />
|
||||
<meta name="twitter:image" content="__ORIGIN__/og.png" />
|
||||
<link rel="icon" href="%BASE_URL%favicon.ico" sizes="16x16 32x32" />
|
||||
<link rel="icon" type="image/svg+xml" href="%BASE_URL%favicon.svg" />
|
||||
<link rel="apple-touch-icon" href="%BASE_URL%apple-touch-icon.png" />
|
||||
<link rel="manifest" href="%BASE_URL%site.webmanifest" />
|
||||
<link rel="alternate" type="text/plain" href="%BASE_URL%llms.txt" title="llms.txt" />
|
||||
<!-- Rune reads the same files, so the page and the canvas share one download. -->
|
||||
<link rel="preload" href="%BASE_URL%fonts/geist.ttf" as="font" type="font/ttf" crossorigin />
|
||||
<link rel="preload" href="%BASE_URL%fonts/geist-mono.ttf" as="font" type="font/ttf" crossorigin />
|
||||
<style>
|
||||
@font-face { font-family: "Geist"; src: url("/fonts/geist.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
|
||||
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
|
||||
:root {
|
||||
--rune-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
|
||||
--rune-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
|
||||
}
|
||||
html { background: #000; color: #ededed; font: 400 16px/24px var(--rune-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-size-adjust: 100%; }
|
||||
body { margin: 0; }
|
||||
:focus-visible { outline: 2px solid oklch(0.74 0.14 245); outline-offset: 2px; border-radius: 4px; }
|
||||
::selection { background: oklch(0.74 0.14 245 / 0.4); }
|
||||
</style>
|
||||
<!-- rune:css -->
|
||||
<!--jsonld-->
|
||||
</head>
|
||||
<body>
|
||||
<!-- rune:body -->
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "rune-www",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "bun scripts/build.ts",
|
||||
"preview": "vite preview --outDir .cloudflare/output/v0/workers/default/assets",
|
||||
"serve": "bun scripts/serve.ts",
|
||||
"check": "tsc --noEmit",
|
||||
"icons": "bun scripts/icons.ts",
|
||||
"images": "bun scripts/images.ts",
|
||||
"deploy:dev": "bun scripts/build.ts --mode dev && cf deploy --prebuilt --mode dev",
|
||||
"deploy:production": "bun scripts/build.ts --mode production && cf deploy --prebuilt --mode production"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@cloudflare/build-output-utils": "0.8.5",
|
||||
"@cloudflare/vite-plugin": "2.0.0-beta.v.4",
|
||||
"@types/bun": "1.3.13",
|
||||
"@types/node": "25.5.0",
|
||||
"cf": "1.0.0-beta.12",
|
||||
"typescript": "6.0.2",
|
||||
"vite": "8.1.3"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 308 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" shape-rendering="crispEdges" fill="#54b3fd"><rect x="3" y="1" width="4" height="1"/><rect x="3" y="2" width="5" height="1"/><rect x="3" y="3" width="6" height="1"/><rect x="3" y="4" width="3" height="1"/><rect x="7" y="4" width="3" height="1"/><rect x="3" y="5" width="3" height="1"/><rect x="8" y="5" width="3" height="1"/><rect x="3" y="6" width="3" height="1"/><rect x="8" y="6" width="3" height="1"/><rect x="3" y="7" width="3" height="1"/><rect x="7" y="7" width="3" height="1"/><rect x="3" y="8" width="6" height="1"/><rect x="3" y="9" width="5" height="1"/><rect x="3" y="10" width="6" height="1"/><rect x="3" y="11" width="3" height="1"/><rect x="7" y="11" width="3" height="1"/><rect x="3" y="12" width="3" height="1"/><rect x="8" y="12" width="3" height="1"/><rect x="3" y="13" width="3" height="1"/><rect x="9" y="13" width="3" height="1"/><rect x="3" y="14" width="3" height="1"/><rect x="10" y="14" width="3" height="1"/></svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,92 @@
|
||||
Copyright (c) 2023 Vercel, in collaboration with basement.studio
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION AND CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 903 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 20 KiB |
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "Rune",
|
||||
"short_name": "Rune",
|
||||
"description": "A Rust UI framework with its own GPU renderer, text, layout and spring animation.",
|
||||
"start_url": "./",
|
||||
"display": "browser",
|
||||
"background_color": "#000000",
|
||||
"theme_color": "#000000",
|
||||
"icons": [
|
||||
{ "src": "icon-192.png", "sizes": "192x192", "type": "image/png" },
|
||||
{ "src": "icon-512.png", "sizes": "512x512", "type": "image/png" }
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
#!/usr/bin/env bun
|
||||
// `bun run build [--mode dev]`: the page is the Rune app in app/. This builds it to wasm (src/wasm/), bundles
|
||||
// src/main.ts and the Worker with Vite into Build Output, then has the app write its own static HTML (`--html`) into
|
||||
// index.html and 404.html, and adds robots.txt, sitemap.xml and llms.txt.
|
||||
// Needs Rust with the wasm32-unknown-unknown target, the wasm-bindgen CLI at the version in Cargo.lock and binaryen's
|
||||
// wasm-opt (`--no-opt` skips it).
|
||||
import { readFileSync, writeFileSync } from "node:fs"
|
||||
import { join, relative, resolve } from "node:path"
|
||||
import { parseArgs } from "node:util"
|
||||
import { getWorkerAssetsDir } from "@cloudflare/build-output-utils"
|
||||
import { $ } from "bun"
|
||||
import { BASE_PATH, hostForMode } from "../src/base"
|
||||
import { DESCRIPTION, REPO, SHARE_TITLE, TITLE } from "../src/meta"
|
||||
|
||||
const { values } = parseArgs({
|
||||
options: { mode: { type: "string", default: "production" }, "no-opt": { type: "boolean", default: false } },
|
||||
})
|
||||
const production = values.mode !== "dev"
|
||||
const origin = `https://${hostForMode(values.mode)}${BASE_PATH}`
|
||||
|
||||
const www = resolve(import.meta.dirname, "..")
|
||||
const repo = resolve(www, "..")
|
||||
// The commit the page tells you to pin: the one it was built from (or $RUNE_REV, outside a checkout).
|
||||
const rev = process.env.RUNE_REV ?? (await $`git rev-parse --short=12 HEAD`.cwd(repo).text()).trim()
|
||||
const env = { ...process.env, RUNE_REV: rev }
|
||||
const cargo = process.env.CARGO ?? "cargo"
|
||||
// The widths the static page is taken at: its breakpoints and the narrowest phone.
|
||||
const widths = "360,400,560,760,860,1000"
|
||||
|
||||
// Smallest wasm: optimized for size with whole-program LTO, then wasm-opt. `--no-opt` builds quicker and larger.
|
||||
const size = values["no-opt"] ? {} : { CARGO_PROFILE_RELEASE_OPT_LEVEL: "z", CARGO_PROFILE_RELEASE_LTO: "fat" }
|
||||
const opt = values["no-opt"] ? [] : ["--opt"]
|
||||
await $`scripts/web-build.sh rune-www --out www/src/wasm --no-html ${opt}`.cwd(repo).env({ ...env, ...size })
|
||||
await $`tsc --noEmit`.cwd(www)
|
||||
await $`vite build --mode ${values.mode}`.cwd(www)
|
||||
|
||||
const dir = getWorkerAssetsDir(www)
|
||||
const built = readFileSync(join(dir, "index.html"), "utf8")
|
||||
const escape = (s: string) => s.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">")
|
||||
|
||||
const jsonld = {
|
||||
"@context": "https://schema.org",
|
||||
"@graph": [
|
||||
{ "@type": "WebSite", name: "Rune", url: `${origin}/` },
|
||||
{
|
||||
"@type": "SoftwareSourceCode",
|
||||
name: "Rune",
|
||||
description: DESCRIPTION,
|
||||
url: `${origin}/`,
|
||||
codeRepository: REPO,
|
||||
programmingLanguage: "Rust",
|
||||
runtimePlatform: ["macOS", "Windows", "Linux", "Web (WebGPU)", "iOS"],
|
||||
author: { "@type": "Organization", name: "Anomaly", url: "https://anoma.ly" },
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
const head = (path: string, title: string, description: string, html: string) =>
|
||||
html
|
||||
.replace("<!--robots-->", production ? "" : `<meta name="robots" content="noindex, nofollow" />`)
|
||||
.replace("<!--jsonld-->", path === "/" ? `<script type="application/ld+json">${JSON.stringify(jsonld)}</script>` : "")
|
||||
.replaceAll("__URL__", `${origin}${path}`)
|
||||
.replaceAll("__SHARE_TITLE__", escape(path === "/" ? SHARE_TITLE : title))
|
||||
.replaceAll("__TITLE__", escape(title))
|
||||
.replaceAll("__DESCRIPTION__", escape(description))
|
||||
.replaceAll("__ORIGIN__", origin)
|
||||
|
||||
// The app lays itself out at each width and writes the page into the template; run from public/ so it finds the fonts.
|
||||
const page = async (file: string, template: string, extra: Record<string, string> = {}) => {
|
||||
const path = join(dir, file)
|
||||
writeFileSync(path, template)
|
||||
await $`${cargo} run -q -p rune-www -- --html ${path} --html-widths ${widths} --html-template ${path}`
|
||||
.cwd(join(www, "public"))
|
||||
.env({ ...env, ...extra })
|
||||
}
|
||||
|
||||
await page("index.html", head("/", TITLE, DESCRIPTION, built))
|
||||
// The Worker serves this for any missing path under the base, with a 404. It has no wasm and no canonical URL.
|
||||
const notFound = head("/404", "Not found · Rune", "There's no page here.", built)
|
||||
.replace(/\s*<script type="module"[^>]*><\/script>/g, "")
|
||||
.replace(/\s*<link rel="modulepreload"[^>]*>/g, "")
|
||||
.replace(/\s*<link rel="canonical"[^>]*>/, "")
|
||||
await page("404.html", notFound, { RUNE_WWW_PAGE: "404" })
|
||||
|
||||
// Dev is for checking before release: keep it out of search.
|
||||
writeFileSync(
|
||||
join(dir, "robots.txt"),
|
||||
production ? `User-agent: *\nAllow: /\n\nSitemap: ${origin}/sitemap.xml\n` : "User-agent: *\nDisallow: /\n",
|
||||
)
|
||||
if (production) {
|
||||
writeFileSync(
|
||||
join(dir, "sitemap.xml"),
|
||||
`<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n <url><loc>${origin}/</loc></url>\n</urlset>\n`,
|
||||
)
|
||||
}
|
||||
|
||||
// llms.txt (llmstxt.org): what Rune is and where to read more.
|
||||
writeFileSync(
|
||||
join(dir, "llms.txt"),
|
||||
[
|
||||
"# Rune",
|
||||
"",
|
||||
`> ${DESCRIPTION}`,
|
||||
"",
|
||||
"Rune is a Rust UI framework. Views are plain Rust functions of state; Rune diffs them, lays them out with Taffy,",
|
||||
"animates layout and properties with springs, and draws every frame with one instanced GPU draw. It runs on macOS",
|
||||
"(its own Metal backend), Windows, Linux, iOS (embedded in UIKit or SwiftUI) and the web (WebGPU, experimental).",
|
||||
"",
|
||||
"This page is itself a Rune app: the HTML is what the app writes with `--html`, and the canvas is the same app.",
|
||||
"",
|
||||
"## Source",
|
||||
"",
|
||||
`- [anomalyco/rune](${REPO}): the code`,
|
||||
`- [crates/rune/README.md](${REPO}/blob/dev/crates/rune/README.md): the framework guide`,
|
||||
`- [WEB.md](${REPO}/blob/dev/WEB.md): building a Rune app for the browser`,
|
||||
`- [CHANGELOG.md](${REPO}/blob/dev/CHANGELOG.md): what changed, newest first`,
|
||||
`- [www/app](${REPO}/tree/dev/www/app): this page's source`,
|
||||
"",
|
||||
"## Use it",
|
||||
"",
|
||||
"Add Rune to Cargo.toml pinned to a commit:",
|
||||
"",
|
||||
"```toml",
|
||||
`rune = { git = "${REPO}", rev = "${rev}" }`,
|
||||
"```",
|
||||
"",
|
||||
].join("\n"),
|
||||
)
|
||||
|
||||
console.log(`Built ${production ? "production" : "dev"} into ${relative(www, dir)}/`)
|
||||
@@ -0,0 +1,94 @@
|
||||
#!/usr/bin/env bun
|
||||
// `bun scripts/icons.ts`: draws the brand into public/: favicon.svg and favicon.ico (16 and 32) from the 16-cell ᚱ on
|
||||
// transparent; apple-touch-icon.png (180), icon-192.png and icon-512.png from the wordmark's ᚱ on black; and og.png
|
||||
// (1200 × 630), the whole wordmark on black. Every cell is a whole number of pixels, so the PNGs are written directly,
|
||||
// with no browser.
|
||||
import { writeFileSync } from "node:fs"
|
||||
import { join, resolve } from "node:path"
|
||||
import { deflateSync } from "node:zlib"
|
||||
import { ICON16, INK, WORDMARK, oklch, runs, type Grid } from "../src/brand/pixels"
|
||||
|
||||
const out = resolve(import.meta.dirname, "..", "public")
|
||||
const ink = oklch(...INK).map(c => Math.round(c * 255)) as [number, number, number]
|
||||
const hex = `#${ink.map(c => c.toString(16).padStart(2, "0")).join("")}`
|
||||
|
||||
const crcTable = Array.from({ length: 256 }, (_, n) => {
|
||||
let c = n
|
||||
for (let k = 0; k < 8; k++) c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1
|
||||
return c >>> 0
|
||||
})
|
||||
const crc = (bytes: Uint8Array) => {
|
||||
let c = 0xffffffff
|
||||
for (const b of bytes) c = crcTable[(c ^ b) & 0xff]! ^ (c >>> 8)
|
||||
return (c ^ 0xffffffff) >>> 0
|
||||
}
|
||||
function chunk(type: string, data: Uint8Array) {
|
||||
const body = new Uint8Array(4 + data.length)
|
||||
body.set(new TextEncoder().encode(type))
|
||||
body.set(data, 4)
|
||||
const out = new Uint8Array(12 + data.length)
|
||||
const dv = new DataView(out.buffer)
|
||||
dv.setUint32(0, data.length)
|
||||
out.set(body, 4)
|
||||
dv.setUint32(8 + data.length, crc(body))
|
||||
return out
|
||||
}
|
||||
|
||||
/** `rows` at `px` pixels a cell, centred in a `width` × `height` image on `background` (null for transparent), as an
|
||||
* RGBA PNG. */
|
||||
function png(rows: Grid, px: number, background: [number, number, number] | null, width: number, height = width) {
|
||||
const w = rows[0]!.length * px, h = rows.length * px
|
||||
const ox = Math.floor((width - w) / 2), oy = Math.floor((height - h) / 2)
|
||||
const raw = new Uint8Array(height * (width * 4 + 1))
|
||||
for (let y = 0; y < height; y++) {
|
||||
const row = y * (width * 4 + 1)
|
||||
for (let x = 0; x < width; x++) {
|
||||
const cx = Math.floor((x - ox) / px), cy = Math.floor((y - oy) / px)
|
||||
const on = x >= ox && y >= oy && rows[cy]?.[cx] === "#"
|
||||
const rgb = on ? ink : background
|
||||
if (rgb) raw.set([...rgb, 255], row + 1 + x * 4)
|
||||
}
|
||||
}
|
||||
const header = new Uint8Array(13)
|
||||
const dv = new DataView(header.buffer)
|
||||
dv.setUint32(0, width)
|
||||
dv.setUint32(4, height)
|
||||
header.set([8, 6, 0, 0, 0], 8)
|
||||
const parts = [new Uint8Array([137, 80, 78, 71, 13, 10, 26, 10]), chunk("IHDR", header), chunk("IDAT", deflateSync(raw)), chunk("IEND", new Uint8Array())]
|
||||
return Buffer.concat(parts)
|
||||
}
|
||||
|
||||
/** An ICO holding PNGs, one entry per size. */
|
||||
function ico(images: { png: Uint8Array; size: number }[]) {
|
||||
const header = 6 + 16 * images.length
|
||||
const out = new Uint8Array(header + images.reduce((n, i) => n + i.png.length, 0))
|
||||
const dv = new DataView(out.buffer)
|
||||
dv.setUint16(2, 1, true)
|
||||
dv.setUint16(4, images.length, true)
|
||||
let offset = header
|
||||
images.forEach(({ png, size }, k) => {
|
||||
const e = 6 + 16 * k
|
||||
out[e] = size
|
||||
out[e + 1] = size
|
||||
dv.setUint16(e + 4, 1, true)
|
||||
dv.setUint16(e + 6, 32, true)
|
||||
dv.setUint32(e + 8, png.length, true)
|
||||
dv.setUint32(e + 12, offset, true)
|
||||
out.set(png, offset)
|
||||
offset += png.length
|
||||
})
|
||||
return out
|
||||
}
|
||||
|
||||
const rune = WORDMARK.glyphs[0]!.rows
|
||||
const black: [number, number, number] = [0, 0, 0]
|
||||
for (const [name, size, px] of [["icon-512.png", 512, 32], ["icon-192.png", 192, 12], ["apple-touch-icon.png", 180, 12]] as const) {
|
||||
writeFileSync(join(out, name), png(rune, px, black, size))
|
||||
}
|
||||
writeFileSync(join(out, "favicon.ico"), ico([32, 16].map(size => ({ size, png: png(ICON16, size / 16, null, size) }))))
|
||||
const word = Array.from({ length: WORDMARK.height }, (_, y) =>
|
||||
Array.from({ length: WORDMARK.width }, (_, x) => (WORDMARK.glyphs.some(g => g.rows[y]?.[x - g.x] === "#") ? "#" : ".")).join(""))
|
||||
writeFileSync(join(out, "og.png"), png(word, 24, black, 1200, 630))
|
||||
const rects = runs(ICON16).map(([x, y, w, h]) => `<rect x="${x}" y="${y}" width="${w}" height="${h}"/>`).join("")
|
||||
writeFileSync(join(out, "favicon.svg"), `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" shape-rendering="crispEdges" fill="${hex}">${rects}</svg>\n`)
|
||||
console.log(`Icons in ${ink.join(",")} (${hex}) → ${out}`)
|
||||
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env bun
|
||||
// `bun run images`: cuts the page's images from Rune's own renders in demo/ into AVIF at the sizes the page shows
|
||||
// them, into public/img/. The widths and aspect ratios here match the `Picture`s in app/src/sections.rs.
|
||||
// Needs ImageMagick 7 with AVIF. The outputs are committed, so a build never needs it.
|
||||
import { mkdirSync, rmSync, statSync } from "node:fs"
|
||||
import { join, resolve } from "node:path"
|
||||
import { $ } from "bun"
|
||||
|
||||
// Gallery tiles are 16:9, so crop renders of other shapes to 16:9 here. `smooth` is for soft gradients on black, which
|
||||
// band in 8-bit: it encodes 10-bit AVIF at a higher quality.
|
||||
type Spec = { src: string; crop?: [number, number, number, number]; widths: number[]; smooth?: boolean }
|
||||
|
||||
const repo = resolve(import.meta.dirname, "..", "..")
|
||||
const www = resolve(import.meta.dirname, "..")
|
||||
const out = join(www, "public", "img")
|
||||
|
||||
export const specs: Record<string, Spec> = {
|
||||
hello: { src: "site/public/shots/hello-on.png", widths: [320, 640] },
|
||||
"opencode-session": { src: "demo/opencode/session-top.png", widths: [720, 1120, 1680, 2240] },
|
||||
"opencode-home": { src: "demo/opencode/home.png", widths: [560, 1100] },
|
||||
"opencode-streaming": { src: "demo/opencode/streaming.png", widths: [560, 1100] },
|
||||
// `cargo run --release -p site-scenes` renders these into target/; they aren't committed.
|
||||
metal: { src: "target/site-scenes/metal.png", widths: [760, 1520], smooth: true },
|
||||
glass: { src: "target/site-scenes/glass.png", crop: [240, 135, 1440, 810], widths: [380, 760], smooth: true },
|
||||
light: { src: "target/site-scenes/light.png", crop: [240, 135, 1440, 810], widths: [380, 760], smooth: true },
|
||||
}
|
||||
|
||||
rmSync(out, { recursive: true, force: true })
|
||||
mkdirSync(out, { recursive: true })
|
||||
let bytes = 0
|
||||
for (const [name, spec] of Object.entries(specs)) {
|
||||
const src = join(repo, spec.src)
|
||||
const crop = spec.crop ? ["-crop", `${spec.crop[2]}x${spec.crop[3]}+${spec.crop[0]}+${spec.crop[1]}`, "+repage"] : []
|
||||
const w0 = spec.crop ? spec.crop[2] : Number(await $`magick identify -format "%w" ${src}`.text())
|
||||
const widths = spec.widths.filter(w => w <= w0)
|
||||
for (const w of widths) {
|
||||
const [quality, depth] = spec.smooth ? [70, 10] : [52, 8]
|
||||
const file = join(out, `${name}-${w}.avif`)
|
||||
await $`magick ${src} ${crop} -resize ${w}x -strip -depth ${depth} -quality ${quality} ${file}`.quiet()
|
||||
bytes += statSync(file).size
|
||||
}
|
||||
}
|
||||
console.log(`${Object.keys(specs).length} images, ${(bytes / 1024).toFixed(0)} KB → public/img/`)
|
||||
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env bun
|
||||
// `bun run serve [--port 4253]`: serves the built site through worker.ts, with a stand-in for the ASSETS binding that
|
||||
// reads the build output, so the base path, 404 page and headers are the Worker's own. Run `bun run build` first.
|
||||
import { existsSync, statSync } from "node:fs"
|
||||
import { extname, join, resolve } from "node:path"
|
||||
import { parseArgs } from "node:util"
|
||||
import { brotliCompressSync, constants } from "node:zlib"
|
||||
import { getWorkerAssetsDir } from "@cloudflare/build-output-utils"
|
||||
import worker from "../worker"
|
||||
|
||||
const { values } = parseArgs({ options: { port: { type: "string", default: "4253" }, host: { type: "string", default: "127.0.0.1" } } })
|
||||
const dir = getWorkerAssetsDir(resolve(import.meta.dirname, ".."))
|
||||
if (!existsSync(join(dir, "index.html"))) throw new Error(`${dir}/index.html not found; run \`bun run build\` first`)
|
||||
|
||||
const file = (p: string) => existsSync(p) && statSync(p).isFile() ? p : undefined
|
||||
|
||||
// Static assets as Cloudflare serves them with html_handling "auto-trailing-slash": /x finds x.html or x/index.html.
|
||||
const ASSETS = {
|
||||
async fetch(request: Request) {
|
||||
const path = decodeURIComponent(new URL(request.url).pathname)
|
||||
const base = join(dir, path)
|
||||
const hit = path.endsWith("/") ? file(join(base, "index.html")) : file(base) ?? file(`${base}.html`)
|
||||
if (!hit) return new Response("Not found", { status: 404 })
|
||||
const html = extname(hit) === ".html"
|
||||
return new Response(Bun.file(hit), { headers: html ? { "Content-Type": "text/html; charset=utf-8", "Cache-Control": "no-cache" } : {} })
|
||||
},
|
||||
}
|
||||
|
||||
// Cloudflare compresses text and wasm on the way out; do the same so timings here are close to the real thing.
|
||||
const squeezable = /^(text\/|application\/(javascript|json|wasm|manifest\+json)|image\/(svg|x-icon)|font\/(ttf|otf))/
|
||||
const squeezed = new Map<string, Buffer>()
|
||||
|
||||
const server = Bun.serve({
|
||||
hostname: values.host,
|
||||
port: Number(values.port),
|
||||
async fetch(request) {
|
||||
const response = await worker.fetch(request, { ASSETS, CANONICAL_HOST: "localhost", ANY_HOST: "1" })
|
||||
const type = response.headers.get("Content-Type") ?? ""
|
||||
if (!response.ok || !squeezable.test(type) || !request.headers.get("Accept-Encoding")?.includes("br")) return response
|
||||
const key = new URL(request.url).pathname
|
||||
let body = squeezed.get(key)
|
||||
if (!body) {
|
||||
body = brotliCompressSync(new Uint8Array(await response.arrayBuffer()), { params: { [constants.BROTLI_PARAM_QUALITY]: 5 } })
|
||||
squeezed.set(key, body)
|
||||
}
|
||||
const headers = new Headers(response.headers)
|
||||
headers.set("Content-Encoding", "br")
|
||||
headers.delete("Content-Length")
|
||||
return new Response(new Uint8Array(body), { status: response.status, headers })
|
||||
},
|
||||
})
|
||||
console.log(`rune-www on ${server.url}rune/`)
|
||||
@@ -0,0 +1,19 @@
|
||||
// The site lives under /rune on anoma.ly (production) and dev.anoma.ly (dev).
|
||||
// Files keep root-relative paths internally ("/og.png"); these helpers add and remove the prefix at the edges.
|
||||
export const BASE_PATH = "/rune"
|
||||
|
||||
// The build mode (`--mode dev`) picks the environment; every other mode builds production.
|
||||
export function hostForMode(mode: string | undefined): string {
|
||||
return mode === "dev" ? "dev.anoma.ly" : "anoma.ly"
|
||||
}
|
||||
|
||||
export function withBase(path: string): string {
|
||||
return `${BASE_PATH}${path}`
|
||||
}
|
||||
|
||||
// Returns the site path for a request path, or undefined when it is outside the base.
|
||||
export function stripBase(pathname: string): string | undefined {
|
||||
if (pathname === BASE_PATH) return "/"
|
||||
if (!pathname.startsWith(`${BASE_PATH}/`)) return undefined
|
||||
return pathname.slice(BASE_PATH.length)
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
// ᚱUNE on Anomaly's pixel grid: letters 11 pixels tall, 2-pixel stems, notched corners, fitted one clear pixel apart.
|
||||
// The R is the rune ᚱ (raidō), so the name is spelled with a real rune and still reads as RUNE. Plain data and string
|
||||
// builders, so the site and the icon script draw the same pixels.
|
||||
|
||||
export type Grid = readonly string[]
|
||||
const grid = (s: string): Grid => s.trim().split("\n").map(row => row.trim())
|
||||
|
||||
const GLYPHS: Record<string, Grid> = {
|
||||
// The stave, a pointed bowl and a straight leg, all on 45° steps two pixels thick.
|
||||
ᚱ: grid(`
|
||||
###....
|
||||
####...
|
||||
##.##..
|
||||
##..##.
|
||||
##..##.
|
||||
##.##..
|
||||
####...
|
||||
##.##..
|
||||
##..##.
|
||||
##...##
|
||||
##...##`),
|
||||
U: grid(`
|
||||
##...##
|
||||
##...##
|
||||
##...##
|
||||
##...##
|
||||
##...##
|
||||
##...##
|
||||
##...##
|
||||
##...##
|
||||
##...##
|
||||
#######
|
||||
.#####.`),
|
||||
N: grid(`
|
||||
###...##
|
||||
####..##
|
||||
####..##
|
||||
####..##
|
||||
##.##.##
|
||||
##.##.##
|
||||
##.##.##
|
||||
##..####
|
||||
##..####
|
||||
##..####
|
||||
##...###`),
|
||||
E: grid(`
|
||||
######
|
||||
######
|
||||
##....
|
||||
##....
|
||||
#####.
|
||||
#####.
|
||||
##....
|
||||
##....
|
||||
##....
|
||||
######
|
||||
######`),
|
||||
}
|
||||
|
||||
export const CAP = 11
|
||||
|
||||
/** The ᚱ redrawn for 16 and 32 px favicons: 3-pixel stems, one or two device pixels per cell. */
|
||||
export const ICON16: Grid = grid(`
|
||||
................
|
||||
...####.........
|
||||
...#####........
|
||||
...######.......
|
||||
...###.###......
|
||||
...###..###.....
|
||||
...###..###.....
|
||||
...###.###......
|
||||
...######.......
|
||||
...#####........
|
||||
...######.......
|
||||
...###.###......
|
||||
...###..###.....
|
||||
...###...###....
|
||||
...###....###...
|
||||
................`)
|
||||
|
||||
/** A pixel rectangle: x, y, width, height. */
|
||||
export type Rect = readonly [number, number, number, number]
|
||||
export interface Glyph { char: string; x: number; rows: Grid }
|
||||
|
||||
const ink = (rows: Grid) => rows.flatMap((row, y) => [...row].flatMap((c, x) => (c === "#" ? [[x, y] as const] : [])))
|
||||
|
||||
/** Where `next` starts after `prev` (placed at `at`): as far left as keeps one clear pixel between their ink in every
|
||||
* direction, diagonals included. */
|
||||
function fit(prev: Grid, at: number, next: Grid) {
|
||||
const a = ink(prev).map(([x, y]) => [x + at, y] as const), b = ink(next)
|
||||
let x = at + 1
|
||||
while (a.some(([ax, ay]) => b.some(([bx, by]) => Math.abs(bx + x - ax) <= 1 && Math.abs(by - ay) <= 1))) x++
|
||||
return x
|
||||
}
|
||||
|
||||
export const WORDMARK = (() => {
|
||||
const glyphs: Glyph[] = []
|
||||
for (const char of "ᚱUNE") {
|
||||
const rows = GLYPHS[char]!
|
||||
const last = glyphs[glyphs.length - 1]
|
||||
glyphs.push({ char, x: last ? fit(last.rows, last.x, rows) : 0, rows })
|
||||
}
|
||||
const last = glyphs[glyphs.length - 1]!
|
||||
return { glyphs, width: last.x + last.rows[0]!.length, height: CAP }
|
||||
})()
|
||||
|
||||
/** Rows to rectangles, merging each row's runs so no seams show between pixels. */
|
||||
export function runs(rows: Grid, dx = 0, dy = 0): Rect[] {
|
||||
const out: Rect[] = []
|
||||
rows.forEach((row, y) => {
|
||||
for (let x = 0; x < row.length; x++) {
|
||||
if (row[x] !== "#") continue
|
||||
let end = x
|
||||
while (row[end] === "#") end++
|
||||
out.push([dx + x, dy + y, end - x, 1])
|
||||
x = end
|
||||
}
|
||||
})
|
||||
return out
|
||||
}
|
||||
|
||||
/** ᚱ's carve order: the stave top to bottom, then the bowl out and back, then the leg. Each cell gets the arc length
|
||||
* (0–1) of its nearest point on that path. */
|
||||
export function carveOrder(rows: Grid): [number, number, number][] {
|
||||
const path = [[[1, .5], [1, 10.5]], [[1.5, .5], [5, 3.5]], [[5, 3.5], [1.5, 6.5]], [[2.5, 6.5], [6, 10.5]]] as const
|
||||
const lens = path.map(([a, b]) => Math.hypot(b[0] - a[0], b[1] - a[1]))
|
||||
const total = lens.reduce((s, l) => s + l, 0)
|
||||
return ink(rows).map(([x, y]) => {
|
||||
const c = [x + .5, y + .5] as const
|
||||
let best = Infinity, arc = 0, acc = 0
|
||||
path.forEach(([a, b], i) => {
|
||||
const dx = b[0] - a[0], dy = b[1] - a[1]
|
||||
const p = Math.max(0, Math.min(1, ((c[0] - a[0]) * dx + (c[1] - a[1]) * dy) / (dx * dx + dy * dy)))
|
||||
const d = Math.hypot(a[0] + dx * p - c[0], a[1] + dy * p - c[1])
|
||||
if (d < best - 1e-6) { best = d; arc = acc + p * lens[i]! }
|
||||
acc += lens[i]!
|
||||
})
|
||||
return [x, y, arc / total]
|
||||
})
|
||||
}
|
||||
|
||||
/** OKLCH to gamma-encoded sRGB, 0–1 per channel. */
|
||||
export function oklch(l: number, c: number, hDeg: number): [number, number, number] {
|
||||
const h = (hDeg * Math.PI) / 180, a = c * Math.cos(h), b = c * Math.sin(h)
|
||||
const l_ = (l + .3963377774 * a + .2158037573 * b) ** 3
|
||||
const m_ = (l - .1055613458 * a - .0638541728 * b) ** 3
|
||||
const s_ = (l - .0894841775 * a - 1.291485548 * b) ** 3
|
||||
const lin = [
|
||||
4.0767416621 * l_ - 3.3077115913 * m_ + .2309699292 * s_,
|
||||
-1.2684380046 * l_ + 2.6097574011 * m_ - .3413193965 * s_,
|
||||
-.0041960863 * l_ - .7034186147 * m_ + 1.707614701 * s_,
|
||||
]
|
||||
const gamma = (x: number) => { x = Math.min(1, Math.max(0, x)); return x <= .0031308 ? 12.92 * x : 1.055 * x ** (1 / 2.4) - .055 }
|
||||
return [gamma(lin[0]!), gamma(lin[1]!), gamma(lin[2]!)]
|
||||
}
|
||||
|
||||
/** Rune's ink, `--ink` in site.css, and the light the carve runs. */
|
||||
export const INK: [number, number, number] = [.74, .14, 245]
|
||||
export const HOT: [number, number, number] = [.97, .035, 245]
|
||||
@@ -0,0 +1,22 @@
|
||||
// The page is already here as static HTML; this hands it to Rune, which draws the same page on the GPU and hides
|
||||
// the static copy once its first frame is up. Without WebGPU, or if the wasm fails, the static page stays.
|
||||
// Rune's glue loads with the wasm, after the page has painted, not with the page.
|
||||
const start = () => void import("./wasm/app.js").then(rune => rune.default()).catch(error => console.error(error))
|
||||
|
||||
// Once the static page has painted its largest text, so Rune's download never competes with it.
|
||||
function afterFirstPaint(then: () => void) {
|
||||
const type = PerformanceObserver.supportedEntryTypes?.includes("largest-contentful-paint") ? "largest-contentful-paint" : "paint"
|
||||
let done = false
|
||||
const go = () => {
|
||||
if (done) return
|
||||
done = true
|
||||
observer.disconnect()
|
||||
setTimeout(then, 0)
|
||||
}
|
||||
const observer = new PerformanceObserver(go)
|
||||
observer.observe({ type, buffered: true })
|
||||
// A background tab paints nothing until it's shown.
|
||||
setTimeout(go, 3000)
|
||||
}
|
||||
|
||||
if ("gpu" in navigator) afterFirstPaint(start)
|
||||
@@ -0,0 +1,7 @@
|
||||
export const REPO = "https://github.com/anomalyco/rune"
|
||||
export const DOCS = `${REPO}/blob/dev/crates/rune/README.md`
|
||||
export const TITLE = "Rune · A Rust UI framework with its own GPU renderer"
|
||||
/** Link previews cut long titles, so shares get a short one. */
|
||||
export const SHARE_TITLE = "Rune, a Rust UI framework"
|
||||
export const DESCRIPTION =
|
||||
"A Rust UI framework with its own GPU renderer, text, layout and springs. Views are plain Rust, and one codebase runs on macOS, Windows, Linux, iOS and the web."
|
||||
@@ -0,0 +1,5 @@
|
||||
// src/wasm/ is built by scripts/build.ts and never committed. This types its entry point until it exists.
|
||||
declare module "*/wasm/app.js" {
|
||||
const init: () => Promise<unknown>
|
||||
export default init
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "esnext",
|
||||
"lib": ["es2023", "dom", "dom.iterable"],
|
||||
"moduleDetection": "force",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"types": ["vite/client", "bun", "node"],
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noEmit": true,
|
||||
"allowImportingTsExtensions": true,
|
||||
"esModuleInterop": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"include": ["src", "scripts", "worker.ts", "vite.config.ts", "cloudflare.config.ts"]
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { cloudflare } from "@cloudflare/vite-plugin"
|
||||
import { defineConfig } from "vite"
|
||||
import { BASE_PATH } from "./src/base"
|
||||
|
||||
// Vite only bundles src/main.ts with the wasm Rune builds into src/wasm/, and the Cloudflare plugin shapes the result
|
||||
// into Build Output for `cf deploy`. scripts/build.ts then writes the page into index.html.
|
||||
export default defineConfig({
|
||||
plugins: [cloudflare()],
|
||||
base: `${BASE_PATH}/`,
|
||||
build: {
|
||||
outDir: "dist",
|
||||
emptyOutDir: true,
|
||||
assetsInlineLimit: 0,
|
||||
sourcemap: true,
|
||||
},
|
||||
preview: {
|
||||
host: "127.0.0.1",
|
||||
port: 4253,
|
||||
strictPort: true,
|
||||
allowedHosts: [".ts.net"],
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,53 @@
|
||||
import { BASE_PATH, stripBase, withBase } from "./src/base"
|
||||
|
||||
type Env = {
|
||||
ASSETS: { fetch(request: Request): Promise<Response> }
|
||||
CANONICAL_HOST: string
|
||||
ANY_HOST?: string
|
||||
}
|
||||
|
||||
export default {
|
||||
async fetch(request: Request, env: Env): Promise<Response> {
|
||||
const url = new URL(request.url)
|
||||
|
||||
if (!env.ANY_HOST && (url.hostname !== env.CANONICAL_HOST || url.protocol !== "https:")) {
|
||||
url.protocol = "https:"
|
||||
url.hostname = env.CANONICAL_HOST
|
||||
url.port = ""
|
||||
return Response.redirect(url.toString(), 301)
|
||||
}
|
||||
|
||||
if (url.pathname === BASE_PATH) {
|
||||
url.pathname = `${BASE_PATH}/`
|
||||
return Response.redirect(url.toString(), 301)
|
||||
}
|
||||
|
||||
// Paths outside the base aren't ours.
|
||||
const path = stripBase(url.pathname)
|
||||
if (path === undefined) return new Response("Not found", { status: 404 })
|
||||
|
||||
const assetUrl = new URL(url)
|
||||
assetUrl.pathname = path
|
||||
let response = await env.ASSETS.fetch(new Request(assetUrl, request))
|
||||
if (response.status === 404) {
|
||||
const page = await env.ASSETS.fetch(new Request(new URL("/404", assetUrl)))
|
||||
if (page.ok) response = new Response(page.body, { status: 404, headers: page.headers })
|
||||
}
|
||||
const headers = new Headers(response.headers)
|
||||
// Asset redirects (trailing slashes, /index.html) point at root-relative paths.
|
||||
const location = headers.get("Location")
|
||||
if (location?.startsWith("/")) headers.set("Location", withBase(location))
|
||||
if (path.startsWith("/assets/")) {
|
||||
headers.set("Cache-Control", "public, max-age=31536000, immutable")
|
||||
} else if (/^\/(img|fonts)\//.test(path)) {
|
||||
headers.set("Cache-Control", "public, max-age=86400, stale-while-revalidate=604800")
|
||||
}
|
||||
headers.set("X-Content-Type-Options", "nosniff")
|
||||
headers.set("Referrer-Policy", "strict-origin-when-cross-origin")
|
||||
return new Response(response.body, {
|
||||
status: response.status,
|
||||
statusText: response.statusText,
|
||||
headers,
|
||||
})
|
||||
},
|
||||
}
|
||||