Files
marqdo/examples/browser-app/components/index.mq.md
T
cflmy 9331af78e2 release(2.8.0): 合入 CHANGELOG/README/发版说明/skills prove 任务;CI 链接指向 doc/releases
- CHANGELOG.md:v2.8.0 条目(中英双语);
- README.md:版本行 2.7.1→2.8.0 + 愿景第 6 条(知识可证明);
- doc/releases/v2.8.0.md:双语发版说明(亮点/用法/已知限制);
- skills/marqdo-dev/index.mq.md:新增 prove 任务(路径/目录模式/
  require_lean/json;参数用 + 行声明升参,check 与 narrative-ratio 通过);
- 设计文档 §12.5 标记已合入;发版链接统一指向 doc/releases/v2.8.0.md。
2026-11-18 10:29:26 +08:00

51 lines
2.8 KiB
Markdown
Executable File

---
markup: occlusion
title: Browser example recursive page assembly
import:
navigation: navigation.mq.md
home: home/index.mq.md
about: about.mq.md
network: network/index.mq.md
controls: controls.mq.md
component: ext/web/component/index.mq.md
fs: lib/fs.mq.md
table: lib/table.mq.md
---
## nodes
| 返回 | 类型 | 说明 |
|---|---|---|
| result | list | Structured View rows for this component |
Read this root to see the whole page: introduction, path, navigation, three panels, feedback and runtime. Follow one import at a time until a child is a plain Markdown leaf or native control. Business values never become a page HTML string. The official runtime starts only after the server has staged the current built assets and the actual client source. Controls stay disabled until boot succeeds; missing resources therefore remain visible as a loading failure. The readiness target and enable selectors are typed resource metadata, not executable snippets. Styles reference the generated stylesheet produced by serve. Server discovery reads the terminal content leaves under the granted root; the browser receives the same ordered region tree.
We **source = [Read the plain introduction](fs.read_text(path="content/intro.md"))** and **intro = [Retain its Markdown](component.markdown(text=`source`, slot="intro"))** and **path = [Describe the initial pathname](controls.text(id="path", value="path: /"))** and **nav = [Assemble the authored destinations](navigation.nodes())** and **home = [Assemble list and timer](home.nodes())** and **about = [Read the About leaf](about.nodes())** and **network = [Assemble independent network controls](network.nodes())** and **log = [Describe literal runtime feedback](controls.text(id="log", value="loading…", kind="pre"))** and **style = [Reference the compiled declarative theme](component.asset(url="/static/theme.css", kind="stylesheet"))**.
`runtime_attrs` =
| type | data-mq-wasm | data-mq-source-url | data-mq-ready | data-mq-enable |
|---|---|---|---|---|
| module | "/static/marqdo_wasm.wasm" | "/static/app.mq.md" | "#log" | "#draft,#add,#save,#load,#start-tick,#stop-tick,#fetch-all,#ws-open,#ws-msg,#ws-send,#ws-close,#copy-log,#dl-list" |
We **runtime = [Declare the official module and readiness targets](component.asset(url="/static/marqdo-bridge.js", attrs=`runtime_attrs`, slot="runtime"))**.
`groups` =
| rows |
|---|
| `intro` |
| `path` |
| `nav` |
| `home` |
| `about` |
| `network` |
| `log` |
| `style` |
| `runtime` |
We **children = [Start the complete ordered page](table.empty_list())**.
- [Retain each independently inspectable region](for groups as group)
We **children = [Keep typed children in reading order](table.concat(a=`children`, b=`group`))**.
Return *[Wrap the recursive page once](component.wrap(children=`children`, slot="browser-app", style="browser-app"))*.