gitoriaLog in with ident

components

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit57408b6e57408b6ecomponents#14: installable app (manifest, service worker, offline index), own iconmre57408b6e/README.md

4.8 KB

  1. # components.hybriel.worldapi.org
  2. Hybriel components, developed standalone (CONCEPT.md). The home lists them; each component has a demo page, a README
  3. and a browser gate. Apps vendor a component by copying its folder. https://components.hybriel.worldapi.org
  4. ## Components
  5. | Component | Demo | README |
  6. |-----------|------|--------|
  7. | Month view | `/month-view` | `components/month-view/README.md` (also `/month-view/README.md`) |
  8. | Date picker | `/date-picker` | `components/date-picker/README.md` (also `/date-picker/README.md`) |
  9. | Date range picker | `/range-picker` | `components/range-picker/README.md` (also `/range-picker/README.md`) |
  10. | Pagination | `/pagination` | `components/pagination/README.md` (also `/pagination/README.md`) |
  11. | Markdown editor | `/md-editor` | `components/md-editor/README.md` (also `/md-editor/README.md`) |
  12. | Code editor | `/code-editor` | `components/code-editor/README.md` (also `/code-editor/README.md`) |
  13. | Modal | `/modal` | `components/modal/README.md` (also `/modal/README.md`) |
  14. The Markdown editor takes files and images (drop, paste, File button) through `emit server mdUpload` (hybriel#94). The one-file upload (`components/file-upload/`, ticket #4) sends its file through `emit server saveFile` (hybriel#94). The multi-file upload (#5) is not built yet.
  15. ## Layout
  16. - `project.hl` routes · `styles.hl` the site's page layout only (tokens from `shared/tokens.hl`, accent = light blue) · `components/main.hl` shell ·
  17. `components/index.hl` the home · `components/<name>/` one folder per component (component, demo, script, README).
  18. - To add a component: its folder, a demo route + a README route in `project.hl`, one entry in `components/index.hl`,
  19. its own `Style` in its file, checks in `tests/browser.mjs`.
  20. - `bin/hybriel` + `plugins/` (core crypto data fs http http1 proc time web) are vendored = hybriel **master e6720b1f**
  21. (2026-09-26, mission 037: #103/#104 client range ownership + awaited client calls, #105 `headers = null`, #106 `let` per
  22. loop pass, #94 files in `emit server …` over HTTP with progress; earlier: #83 hashed `/__hl/…?v=` URLs + immutable cache, #82 reconnect).
  23. Built from a read-only `git archive master` with `zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux-gnu.2.39` in
  24. `native/`; binary sha256 `4316934e…8a2003`. **No local patch**: a re-vendor = copy binary + plugins, run the gate.
  25. Previous copy: `.scratch/pre-037/` (master 13ef4f9b).
  26. ## PWA (mission 046)
  27. Installable, the same way as calendar/tracker: hl:web's own manifest (`/__hl/manifest.webmanifest`) + service worker
  28. (`/__hl/sw.js`) from settings in `project.hl`, no JavaScript of ours.
  29. - `appTitle` "Hybriel components", `appShortName` "Components", `appIcons` (192 + 512 PNG, each `any` + `maskable`),
  30. `appTouchIcon` (180), `appFavicon` `/icons/favicon.svg`, `appThemeColor` = token `darker` (the header,
  31. rgb(15, 20, 25)), `appBackgroundColor` = token `dark`. `/favicon.ico` is a real icon (16/32/48). Each icon has a `file` route.
  32. - **Icons** (`icons/`): `icon.svg` = source (512, hand-written: three stacked building blocks with studs, green-light
  33. `#b5cea8` on rgb(25,30,35), all inside the maskable safe circle r = 204 → one image for `any` + `maskable`);
  34. `favicon.svg` = the same drawing cropped on a rounded tile. Rendered on Loreana:
  35. ```bash
  36. rsvg-convert -w 192 -h 192 icons/icon.svg -o icons/icon-192.png
  37. rsvg-convert -w 512 -h 512 icons/icon.svg -o icons/icon-512.png
  38. rsvg-convert -w 180 -h 180 icons/icon.svg -o icons/apple-touch-icon.png
  39. for s in 16 32 48; do rsvg-convert -w $s -h $s icons/favicon.svg -o /tmp/fav-$s.png; done
  40. magick /tmp/fav-16.png /tmp/fav-32.png /tmp/fav-48.png icons/favicon.ico
  41. ```
  42. - **Offline**: `offline = [ Index ]` — the worker keeps the shell and `/` (the home list). Without a network `/` opens
  43. from the cache and says "You are offline. The demos need the network." (`components/main.hl`: an invisible `netProbe`
  44. runs a 1 s CSS animation, each `animationiteration` reads `navigator.onLine` — hl:web has no connection state / mount
  45. hook). Every demo page offline gets hl:web's "Unavailable offline" page.
  46. - Gate: the `pwa:` / `offline:` checks at the end of `tests/browser.mjs` (manifest + icons over HTTP, Chrome's
  47. installability + manifest parse, worker scope `/`, then CDP offline + the server stopped → reload of `/` shows the
  48. shell; screenshots `.scratch/gate-pwa-phone-{online,offline}.png`, 390 px).
  49. ## Run, test, deploy
  50. - `COMPONENTS_PORT=8700 ./bin/hybriel project.hl` (env: `COMPONENTS_WATCH=0` no watcher, `HL_HOST`).
  51. - `node tests/browser.mjs` — the gate: own server + headless Chrome (ports 8700, 8701–8709). Other ports (workers):
  52. `COMPONENTS_GATE_PORT=8720 COMPONENTS_GATE_CHROME=8721-8729 node tests/browser.mjs`.
  53. - `./deploy.sh` on Loreana (architect): gate → backup → rsync → `docker compose up -d --build` on Byrodin (port 45006) → URL 200.

Branches

Latest commits

  • 57408b6ecomponents#14: installable app (manifest, service worker, offline index), own iconmre
  • 317bd09fdeploy.sh: back up live storage/.sessions/.env before every deploy (newest 5 kept)mre
  • becbd59bcomponents#13: modal dialog (<dialog> based, focus wrap, backdrop/Esc/x close with reason, scroll lock, footer buttons)mre
  • 367dd19adeploy.sh: never send .git or .gitignore to Byrodinmre
  • 4b4dabe5State of 2026-09-27, before the move to gitoriamre