components
All repositories: gitoria
5.7 KB
// project.hl — components.hybriel.worldapi.org: THE SITE. Hybriel components developed standalone: the home// lists them, each has a demo page (`/<component>`) and its README (`/<component>/README.md`). No login, no data.// Apps vendor a component by copying its folder (README of the component says which files).import WebFramework from 'hl:web'import { env } from 'hl:proc'import { dark, darker } from './shared/tokens.hl'import Styles from './styles.hl'import Index from './components/index.hl'import MonthViewDemo from './components/month-view/demo.hl'import DatePickerDemo from './components/date-picker/demo.hl'import RangePickerDemo from './components/range-picker/demo.hl'import PaginationDemo from './components/pagination/demo.hl'import MdEditorDemo from './components/md-editor/demo.hl'import CodeEditorDemo from './components/code-editor/demo.hl'import FileUploadDemo from './components/file-upload/demo.hl'import ModalDemo from './components/modal/demo.hl'static siteName = "Hybriel components"appTitle = siteName// ---- THE INSTALLABLE APP (mission 046), the same way calendar.worldapi.org / tracker.worldapi.org do it: hl:web's own// web app manifest (/__hl/manifest.webmanifest, linked from every head with the apple-touch-icon and theme-color) and// service worker (/__hl/sw.js) from these settings — no JavaScript of ours. Icons in icons/ (icon.svg is the source,// the PNGs are rendered from it with rsvg-convert, README "PWA"). The theme colour is the header's background// (darker), the splash background the page's (dark) — both off the tokens, not written out again.appShortName = 'Components' // the name under the home-screen icon (the full one is too long there)appThemeColor = darker.valueappBackgroundColor = dark.valueappIcons = [{ src = '/icons/icon-192.png' sizes = '192x192' purpose = 'any' }{ src = '/icons/icon-512.png' sizes = '512x512' purpose = 'any' }{ src = '/icons/icon-192.png' sizes = '192x192' purpose = 'maskable' }{ src = '/icons/icon-512.png' sizes = '512x512' purpose = 'maskable' }]appTouchIcon = '/icons/apple-touch-icon.png'appFavicon = '/icons/favicon.svg'// OFFLINE: only the shell — the header and the home list `/` (components/main.hl says "You are offline" while the// browser has no network). The demo pages are not kept: without a network they get hl:web's "Unavailable offline" page.offline = [ Index ]styles = Styles// the component's README is plain Markdown, served as it isroutes = [{ pattern = "/favicon.ico" file = "./icons/favicon.ico" headers = { 'Cache-Control' = 'no-cache' } }// the installable app (mission 046): the icons (manifest and service worker are hl:web's own, from appIcons / offline){ pattern = "/icons/icon-192.png" file = "./icons/icon-192.png" headers = { 'Cache-Control' = 'no-cache' } }{ pattern = "/icons/icon-512.png" file = "./icons/icon-512.png" headers = { 'Cache-Control' = 'no-cache' } }{ pattern = "/icons/apple-touch-icon.png" file = "./icons/apple-touch-icon.png" headers = { 'Cache-Control' = 'no-cache' } }{ pattern = "/icons/favicon.svg" file = "./icons/favicon.svg" headers = { 'Cache-Control' = 'no-cache' } }{ pattern = "/" component = Index }{ pattern = "/month-view" component = MonthViewDemo }{ pattern = "/month-view/README.md" file = "./components/month-view/README.md" headers = { 'Content-Type' = 'text/markdown; charset=utf-8' 'Cache-Control' = 'no-cache' } }{ pattern = "/date-picker" component = DatePickerDemo }{ pattern = "/date-picker/README.md" file = "./components/date-picker/README.md" headers = { 'Content-Type' = 'text/markdown; charset=utf-8' 'Cache-Control' = 'no-cache' } }{ pattern = "/range-picker" component = RangePickerDemo }{ pattern = "/range-picker/README.md" file = "./components/range-picker/README.md" headers = { 'Content-Type' = 'text/markdown; charset=utf-8' 'Cache-Control' = 'no-cache' } }{ pattern = "/md-editor" component = MdEditorDemo }{ pattern = "/md-editor/README.md" file = "./components/md-editor/README.md" headers = { 'Content-Type' = 'text/markdown; charset=utf-8' 'Cache-Control' = 'no-cache' } }{ pattern = "/md-editor/files/*" directory = "./storage/md-files" headers = { 'X-Content-Type-Options' = 'nosniff' 'Content-Security-Policy' = "sandbox" } }{ pattern = "/code-editor" component = CodeEditorDemo }{ pattern = "/code-editor/README.md" file = "./components/code-editor/README.md" headers = { 'Content-Type' = 'text/markdown; charset=utf-8' 'Cache-Control' = 'no-cache' } }{ pattern = "/file-upload" component = FileUploadDemo }{ pattern = "/file-upload/README.md" file = "./components/file-upload/README.md" headers = { 'Content-Type' = 'text/markdown; charset=utf-8' 'Cache-Control' = 'no-cache' } }{ pattern = "/modal" component = ModalDemo }{ pattern = "/modal/README.md" file = "./components/modal/README.md" headers = { 'Content-Type' = 'text/markdown; charset=utf-8' 'Cache-Control' = 'no-cache' } }{ pattern = "/pagination" component = PaginationDemo }{ pattern = "/pagination/README.md" file = "./components/pagination/README.md" headers = { 'Content-Type' = 'text/markdown; charset=utf-8' 'Cache-Control' = 'no-cache' } }]sessionDir = env('COMPONENTS_SESSIONS') != null ? env('COMPONENTS_SESSIONS') : nullport = env('COMPONENTS_PORT') != null ? toNumber(env('COMPONENTS_PORT')) : 8380// HL_HOST = the interface hl:web binds: 127.0.0.1 on Byrodin behind nginx; unset = 0.0.0.0 (dev on Loreana).// COMPONENTS_WATCH=0 = no dev watcher.watching = env('COMPONENTS_WATCH') != '0'sessionCookie = 'componentssid'server = new WebFramework(routes = routes, styles = styles, minify = true, port = port, watchMode = watching, sessionCookie = sessionCookie, uploadMax = 5242880)on Error(e) { console.log('error absorbed: ' + e.message) }
Branches
- mainmain branch
Latest commits
- ede4d19acomponents: Hybriel master 190aa11d (fc838894 GC correctness, #126 closure scopes, #127); gate 220/0mre
- 2bb9a935components: Hybriel master 8efba065 (re-vendor round 069: #126 memory, #48 lambda copy)mre
- e4f01768antcolony#40: mission references point to the moved missionsmre
- d32b44e2antcolony#40: history (LOG.md), worker briefs (missions/) and reports moved here from antcolony, numbered per project; old numbers in antcolony docs/mission-map.mdmre
- 0fb80b57components: Hybriel master ff51cf46 (re-vendor round)mre
- 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