feat(standalone): demo follow-ups — waitlist, analytics, move-to-local, file tree, load progress

- Waitlist signup form on the home page (between Projects and Tools),
  cross-posting to the landing site's /api/waitlist (CORS + OPTIONS added there,
  gated by WAITLIST_ALLOWED_ORIGINS).
- Version badge gains a pcbjam.com landing-page link (VITE_LANDING_URL).
- Optional Plausible analytics from VITE_PLAUSIBLE_DOMAIN (off by default);
  wired into build-demo + both deploy workflows via vars.PLAUSIBLE_DOMAIN.
- Opening a read-only gallery project auto-"moves to local": it forks into a
  writable browser-local project at the same slug, shadowing the gallery row.
- Project + local-folder views use the same iconed tool launcher (ToolGrid)
  and a navigable directory FileTree instead of a flat file list.
- Boot overlay shows real wasm download progress (Module.instantiateWasm +
  streaming byte counter) and a "taking too long" state after 60s.
- Home Libraries section lists the active libs source (the read-only R2/CDN
  set in the demo) with a name filter; useLibs now reads libsSourceConfig.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TPJYx4urFVhdMjEmYfMCMD
This commit is contained in:
Gergő Törcsvári 2026-06-27 07:59:09 +02:00
commit 39cb04b127
No known key found for this signature in database
GPG key ID: 8E75F2CDE64E5322
22 changed files with 830 additions and 258 deletions

View file

@ -31,6 +31,21 @@ VITE_WASM_ROOT=/wasm
# <repo>/tests/apps/kicad). Useful when serving prebuilt artifacts from elsewhere.
# WASM_SRC_DIR=
# Marketing / landing page the version badge links to (default https://pcbjam.com).
# VITE_LANDING_URL=https://pcbjam.com
# Where the in-editor waitlist form POSTs (default https://pcbjam.com/api/waitlist).
# The demo is static with no backend, so it cross-posts to the landing site's
# serverless endpoint, which must send CORS for this origin (see
# site/src/pages/api/waitlist.ts). Same JSON contract {email, source, company_url}.
# VITE_WAITLIST_URL=https://pcbjam.com/api/waitlist
# Plausible analytics. Unset ⇒ no tracking (dev/checkout default). Set the
# data-domain to enable; override the script URL only if the default plausible.io
# script won't load under COEP require-corp (then self-host/proxy on cdn.pcbjam.com).
# VITE_PLAUSIBLE_DOMAIN=demo.pcbjam.com
# VITE_PLAUSIBLE_SRC=https://plausible.io/js/script.js
# Where a backend project's DOCUMENT content lives ("api" default | "ydoc").
# Same /p/<project> URLs either way. "api": file bytes come from the REST
# backend and a user save (File->Save in the editor) is uploaded back to it.