cabloy 5.1.60 → 5.1.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/hooks/contract-loop-gate.ts +296 -0
- package/.claude/settings.json +16 -0
- package/.claude/skills/cabloy-backend-scaffold/SKILL.md +2 -0
- package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +1 -0
- package/.claude/skills/cabloy-contract-loop/SKILL.md +89 -16
- package/.claude/skills/cabloy-contract-loop/references/contract-loop-map.md +102 -14
- package/.claude/skills/cabloy-contract-loop/references/resource-custom-state-pattern.md +4 -0
- package/.claude/skills/cabloy-contract-loop/references/verification-checklist.md +32 -14
- package/.claude/skills/cabloy-domain-planning/SKILL.md +212 -0
- package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +13 -0
- package/.claude/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md +2 -0
- package/.claude/skills/cabloy-module-removal/SKILL.md +144 -0
- package/.claude/skills/cabloy-resource-field-update/SKILL.md +7 -0
- package/.claude/skills/cabloy-zova-source-reading/SKILL.md +221 -0
- package/.claude/skills/cabloy-zova-source-reading/references/analysis-modes.md +91 -0
- package/.claude/skills/cabloy-zova-source-reading/references/core-reading-paths.md +117 -0
- package/CHANGELOG.md +64 -0
- package/CLAUDE.md +11 -0
- package/cabloy-docs/.vitepress/config.mjs +197 -5
- package/cabloy-docs/ai/cli-to-skill-map.md +7 -0
- package/cabloy-docs/ai/docs-skills-rules-mapping.md +22 -0
- package/cabloy-docs/ai/future-skill-roadmap.md +12 -7
- package/cabloy-docs/ai/introduction.md +1 -0
- package/cabloy-docs/ai/playbook-backend-module.md +6 -0
- package/cabloy-docs/ai/playbook-module-removal.md +164 -0
- package/cabloy-docs/ai/skills.md +12 -0
- package/cabloy-docs/backend/backend-contract-emission-output-inspection.md +189 -0
- package/cabloy-docs/backend/backend-contract-emission-source-reading-map.md +160 -0
- package/cabloy-docs/backend/backend-contract-emission-specimen.md +170 -0
- package/cabloy-docs/backend/backend-resource-module-contract-chain.md +323 -0
- package/cabloy-docs/backend/backend-source-reading-debug-checklist.md +173 -0
- package/cabloy-docs/backend/backend-source-reading-roadmap.md +129 -0
- package/cabloy-docs/backend/backend-source-reading-verify-playbook.md +166 -0
- package/cabloy-docs/backend/bean-scene-authoring.md +4 -4
- package/cabloy-docs/backend/broadcast-guide.md +3 -3
- package/cabloy-docs/backend/cli.md +20 -11
- package/cabloy-docs/backend/config-guide.md +4 -4
- package/cabloy-docs/backend/controller-aop-guide.md +10 -10
- package/cabloy-docs/backend/controller-guide.md +12 -2
- package/cabloy-docs/backend/crud-workflow.md +7 -3
- package/cabloy-docs/backend/dto-guide.md +18 -2
- package/cabloy-docs/backend/dto-infer-generation.md +201 -25
- package/cabloy-docs/backend/election-guide.md +2 -2
- package/cabloy-docs/backend/entity-guide.md +30 -3
- package/cabloy-docs/backend/error-guide.md +3 -3
- package/cabloy-docs/backend/event-guide.md +4 -4
- package/cabloy-docs/backend/external-aop-guide.md +2 -2
- package/cabloy-docs/backend/field-indexes.md +9 -3
- package/cabloy-docs/backend/foundation.md +8 -8
- package/cabloy-docs/backend/i18n-guide.md +6 -6
- package/cabloy-docs/backend/internal-aop-guide.md +2 -2
- package/cabloy-docs/backend/introduction.md +15 -0
- package/cabloy-docs/backend/migration-and-changes.md +3 -3
- package/cabloy-docs/backend/model-guide.md +16 -6
- package/cabloy-docs/backend/openapi-guide.md +3 -0
- package/cabloy-docs/backend/queue-guide.md +3 -3
- package/cabloy-docs/backend/redlock-guide.md +2 -2
- package/cabloy-docs/backend/schedule-guide.md +2 -2
- package/cabloy-docs/backend/scripts.md +8 -0
- package/cabloy-docs/backend/serialization-guide.md +12 -2
- package/cabloy-docs/backend/service-guide.md +18 -9
- package/cabloy-docs/backend/startup-guide.md +5 -5
- package/cabloy-docs/backend/status-guide.md +271 -0
- package/cabloy-docs/backend/unit-testing.md +3 -3
- package/cabloy-docs/backend/vona-source-reading-map.md +157 -0
- package/cabloy-docs/backend/websocket-protocol-guide.md +5 -5
- package/cabloy-docs/backend/websocket-usage-guide.md +15 -8
- package/cabloy-docs/frontend/a-model-under-the-hood.md +281 -0
- package/cabloy-docs/frontend/a-openapi-under-the-hood.md +248 -0
- package/cabloy-docs/frontend/a-router-guide.md +307 -0
- package/cabloy-docs/frontend/api-guide.md +6 -4
- package/cabloy-docs/frontend/api-schema-guide.md +1 -0
- package/cabloy-docs/frontend/app-startup-guide.md +7 -4
- package/cabloy-docs/frontend/bean-scene-authoring.md +3 -1
- package/cabloy-docs/frontend/behavior-guide.md +16 -16
- package/cabloy-docs/frontend/cli.md +14 -2
- package/cabloy-docs/frontend/command-scene-authoring.md +504 -0
- package/cabloy-docs/frontend/component-guide.md +5 -5
- package/cabloy-docs/frontend/component-props-guide.md +1 -1
- package/cabloy-docs/frontend/component-v-model-guide.md +2 -2
- package/cabloy-docs/frontend/design-principles.md +6 -0
- package/cabloy-docs/frontend/fetch-interceptor-guide.md +440 -0
- package/cabloy-docs/frontend/filter-query-select-data-flow-guide.md +260 -0
- package/cabloy-docs/frontend/form-guide.md +786 -0
- package/cabloy-docs/frontend/form-scene-to-page-meta-guide.md +303 -0
- package/cabloy-docs/frontend/foundation.md +33 -0
- package/cabloy-docs/frontend/frontend-source-reading-roadmap.md +249 -0
- package/cabloy-docs/frontend/generated-contract-consumption-debug-checklist.md +190 -0
- package/cabloy-docs/frontend/generated-contract-consumption-entry-branch.md +205 -0
- package/cabloy-docs/frontend/generated-contract-consumption-list-branch.md +157 -0
- package/cabloy-docs/frontend/generated-contract-consumption-specimen.md +203 -0
- package/cabloy-docs/frontend/generated-contract-consumption-verify-playbook.md +189 -0
- package/cabloy-docs/frontend/generic-component-guide.md +1 -1
- package/cabloy-docs/frontend/introduction.md +38 -5
- package/cabloy-docs/frontend/ioc-and-beans.md +6 -0
- package/cabloy-docs/frontend/mock-guide.md +1 -0
- package/cabloy-docs/frontend/model-architecture.md +288 -39
- package/cabloy-docs/frontend/model-resource-best-practices.md +379 -0
- package/cabloy-docs/frontend/model-resource-cookbook.md +508 -0
- package/cabloy-docs/frontend/model-resource-internals-deep-dive.md +238 -0
- package/cabloy-docs/frontend/model-resource-owner-pattern.md +402 -0
- package/cabloy-docs/frontend/model-resource-usage-guide.md +334 -0
- package/cabloy-docs/frontend/model-state-guide.md +371 -15
- package/cabloy-docs/frontend/module-scope.md +8 -8
- package/cabloy-docs/frontend/modules-and-suites.md +2 -1
- package/cabloy-docs/frontend/navigation-guards-guide.md +7 -0
- package/cabloy-docs/frontend/openapi-sdk-guide.md +17 -6
- package/cabloy-docs/frontend/page-guide.md +15 -9
- package/cabloy-docs/frontend/page-meta-guide.md +466 -0
- package/cabloy-docs/frontend/page-params-guide.md +3 -3
- package/cabloy-docs/frontend/page-query-guide.md +2 -2
- package/cabloy-docs/frontend/page-route-guide.md +6 -0
- package/cabloy-docs/frontend/permission-formscene-action-visibility-guide.md +263 -0
- package/cabloy-docs/frontend/quickstart.md +18 -2
- package/cabloy-docs/frontend/reading-zova-for-vue-developers.md +266 -0
- package/cabloy-docs/frontend/resource-entry-page-deep-dive.md +271 -0
- package/cabloy-docs/frontend/resource-list-page-deep-dive.md +279 -0
- package/cabloy-docs/frontend/rest-resource-source-reading-map.md +522 -0
- package/cabloy-docs/frontend/rest-resource-under-the-hood.md +622 -0
- package/cabloy-docs/frontend/root-behaviors-guide.md +282 -0
- package/cabloy-docs/frontend/route-alias-guide.md +6 -0
- package/cabloy-docs/frontend/router-stack-guide.md +229 -0
- package/cabloy-docs/frontend/router-tabs-introduction.md +26 -3
- package/cabloy-docs/frontend/router-tabs-layout-integration.md +367 -0
- package/cabloy-docs/frontend/router-tabs-mechanism.md +6 -0
- package/cabloy-docs/frontend/router-tabs-route-meta-cookbook.md +7 -0
- package/cabloy-docs/frontend/router-tabs-vs-stack.md +167 -0
- package/cabloy-docs/frontend/router-view-hosts-guide.md +450 -0
- package/cabloy-docs/frontend/server-data.md +4 -1
- package/cabloy-docs/frontend/system-startup-guide.md +2 -2
- package/cabloy-docs/frontend/table-action-visibility-permission-flow-guide.md +263 -0
- package/cabloy-docs/frontend/table-cell-cookbook.md +568 -0
- package/cabloy-docs/frontend/table-guide.md +373 -0
- package/cabloy-docs/frontend/table-resource-crud-cookbook.md +496 -0
- package/cabloy-docs/frontend/zova-app-guide.md +251 -0
- package/cabloy-docs/frontend/zova-form-source-reading-map.md +293 -0
- package/cabloy-docs/frontend/zova-form-under-the-hood.md +561 -0
- package/cabloy-docs/frontend/zova-reactivity-under-the-hood.md +320 -0
- package/cabloy-docs/frontend/zova-router-under-the-hood.md +561 -0
- package/cabloy-docs/frontend/zova-source-reading-map.md +421 -0
- package/cabloy-docs/frontend/zova-table-controller-render-supplement.md +225 -0
- package/cabloy-docs/frontend/zova-table-source-reading-map.md +317 -0
- package/cabloy-docs/frontend/zova-table-under-the-hood.md +532 -0
- package/cabloy-docs/frontend/zova-vs-vue3-comparison.md +308 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-debug-checklist.md +245 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-source-reading-map.md +139 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-verify-playbook.md +248 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions.md +511 -0
- package/cabloy-docs/fullstack/contract-loop-playbook.md +356 -0
- package/cabloy-docs/fullstack/edition-collaboration-differences.md +6 -0
- package/cabloy-docs/fullstack/frontend-metadata-to-backend.md +199 -23
- package/cabloy-docs/fullstack/introduction.md +15 -1
- package/cabloy-docs/fullstack/openapi-to-sdk.md +135 -11
- package/cabloy-docs/fullstack/suites-and-modules.md +333 -0
- package/cabloy-docs/fullstack/tutorial-1-first-module.md +3 -0
- package/cabloy-docs/fullstack/tutorial-2-first-crud.md +4 -0
- package/cabloy-docs/fullstack/tutorial-3-frontend-metadata-sharing.md +6 -2
- package/cabloy-docs/fullstack/tutorial-4-custom-level-renderers.md +60 -23
- package/cabloy-docs/fullstack/tutorial-5-backend-contract-sharing.md +14 -7
- package/cabloy-docs/fullstack/tutorial-6-one-contract-four-uses.md +6 -0
- package/cabloy-docs/fullstack/tutorials-overview.md +17 -4
- package/cabloy-docs/reference/bean-scene-boilerplates.md +15 -13
- package/cabloy-docs/reference/package-map.md +4 -3
- package/package.json +2 -1
- package/scripts/init.ts +2 -18
- package/scripts/initTestData.ts +25 -0
- package/scripts/upgrade.ts +17 -2
- package/vona/pnpm-lock.yaml +48 -194
- package/vona/src/suite/a-training/modules/training-student/package.json +53 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/index.ts +400 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +18 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/meta.index.ts +12 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/meta.version.ts +21 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/ssrMenu.student.ts +29 -0
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +15 -0
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +15 -0
- package/vona/src/suite/a-training/modules/training-student/src/controller/student.ts +74 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentCreate.tsx +28 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectReq.tsx +44 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectRes.tsx +11 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectResItem.tsx +45 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSummary.tsx +42 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentUpdate.tsx +28 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentView.tsx +25 -0
- package/vona/src/suite/a-training/modules/training-student/src/entity/student.tsx +84 -0
- package/vona/src/suite/a-training/modules/training-student/src/index.ts +2 -0
- package/vona/src/suite/a-training/modules/training-student/src/model/student.ts +10 -0
- package/vona/src/suite/a-training/modules/training-student/src/service/student.ts +57 -0
- package/vona/src/suite/a-training/modules/training-student/test/student.test.ts +173 -0
- package/vona/src/suite/a-training/modules/training-student/tsconfig.build.json +11 -0
- package/vona/src/suite/a-training/modules/training-student/tsconfig.json +7 -0
- package/vona/src/suite/a-training/package.json +12 -0
- package/vona/src/suite/a-training/tsconfig.base.json +4 -0
- package/vona/src/suite/a-training/tsconfig.json +10 -0
- package/zova/packages-cli/cli/package.json +2 -2
- package/zova/packages-cli/cli-set-front/cli/templates/openapi/config/boilerplate/module/openapi.config.ts +6 -1
- package/zova/packages-cli/cli-set-front/package.json +1 -1
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.openapi.generate.ts +34 -4
- package/zova/packages-zova/zova/package.json +2 -2
- package/zova/pnpm-lock.yaml +416 -690
- package/zova/src/suite/a-training/modules/training-student/cli/openapi.config.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/package.json +52 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/component/formFieldLevel.ts +31 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/index.ts +258 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +7 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/baseURL.ts +5 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/index.ts +3 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/schemas.ts +196 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/types.ts +4146 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/trainingStudent.ts +151 -0
- package/zova/src/suite/a-training/modules/training-student/src/apiSchema/trainingStudent.ts +43 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionDeleteForce.tsx +51 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionSummary.tsx +56 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.level.tsx +63 -0
- package/zova/src/suite/a-training/modules/training-student/src/component/formFieldLevel/controller.tsx +117 -0
- package/zova/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/src/index.ts +2 -0
- package/zova/src/suite/a-training/modules/training-student/src/model/student.ts +42 -0
- package/zova/src/suite/a-training/modules/training-student/tsconfig.build.json +13 -0
- package/zova/src/suite/a-training/modules/training-student/tsconfig.json +5 -0
- package/zova/src/suite/a-training/package.json +12 -0
- package/zova/src/suite/a-training/tsconfig.base.json +4 -0
- package/zova/src/suite/a-training/tsconfig.json +4 -0
- package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/formFieldSelect/controller.tsx +29 -7
- package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/select/controller.tsx +34 -11
- package/zova/src/suite-vendor/a-zova/modules/a-table/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-table/src/component/table/controller.tsx +3 -3
- package/zova/src/suite-vendor/a-zova/modules/a-table/src/lib/tableCell.ts +1 -1
- package/zova/src/suite-vendor/a-zova/package.json +2 -2
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
# Root Behaviors Guide
|
|
2
|
+
|
|
3
|
+
This guide explains app-wide root behaviors in Zova through the current public Cabloy Basic source.
|
|
4
|
+
|
|
5
|
+
Use this page when you want to understand:
|
|
6
|
+
|
|
7
|
+
- what root behaviors are responsible for
|
|
8
|
+
- where root behavior configuration is injected
|
|
9
|
+
- how the routed tree is wrapped from the app host
|
|
10
|
+
- how `BeanBehaviorsHolder`, `BehaviorRoot`, and `ServiceComposer` cooperate
|
|
11
|
+
- what kinds of concerns belong at root behavior scope
|
|
12
|
+
- where root behaviors stop and routing or routed-host behavior begins
|
|
13
|
+
|
|
14
|
+
## Why this page exists
|
|
15
|
+
|
|
16
|
+
Several existing docs already explain important parts of the story:
|
|
17
|
+
|
|
18
|
+
- [Behavior Guide](/frontend/behavior-guide) explains generic Behavior concepts and authoring
|
|
19
|
+
- [Zova App Guide](/frontend/zova-app-guide) explains `a-app` as the root app host
|
|
20
|
+
- [A-Router Guide](/frontend/a-router-guide) explains the router runtime boundary
|
|
21
|
+
- [Router View Hosts Guide](/frontend/router-view-hosts-guide) explains routed-page host ownership
|
|
22
|
+
- [Zova Source Reading Map](/frontend/zova-source-reading-map) explains compact reading paths
|
|
23
|
+
|
|
24
|
+
What those pages do not isolate directly is the end-to-end app-wide behavior flow.
|
|
25
|
+
|
|
26
|
+
That is the gap this page fills.
|
|
27
|
+
|
|
28
|
+
In the current Basic source, root behaviors are not just “some behaviors used near the app.” They are the app-scope composition layer that wraps the routed tree from the root host, using behavior declarations from `scope.config.behaviors` and routing them through the behavior composition engine.
|
|
29
|
+
|
|
30
|
+
## The shortest accurate mental model
|
|
31
|
+
|
|
32
|
+
A practical mental model is:
|
|
33
|
+
|
|
34
|
+
1. `a-app` exposes the root behavior injection point through `scope.config.behaviors`
|
|
35
|
+
2. `ControllerApp.__init__()` initializes `BeanBehaviorsHolder`
|
|
36
|
+
3. the holder builds a synthetic root behavior declaration for `a-behavior:root`
|
|
37
|
+
4. `BehaviorRoot` creates an inner composer for the declared app-wide behaviors
|
|
38
|
+
5. `ServiceComposer` normalizes and loads the behavior stack
|
|
39
|
+
6. `ControllerApp.render()` renders the routed tree through that composed root wrapper
|
|
40
|
+
7. the routed content continues into router and host layers only after the root behavior chain has already wrapped it
|
|
41
|
+
|
|
42
|
+
That means root behaviors are the app-wide render-time composition layer around the routed tree.
|
|
43
|
+
|
|
44
|
+
This page starts where [Zova App Guide](/frontend/zova-app-guide) stops: the app host is already established, and the remaining question is how app-wide behavior composition works behind that host boundary.
|
|
45
|
+
|
|
46
|
+
## What root behaviors are
|
|
47
|
+
|
|
48
|
+
In the current Basic source, root behaviors are mainly these five things:
|
|
49
|
+
|
|
50
|
+
- an **app-scope behavior declaration surface** through `scope.config.behaviors`
|
|
51
|
+
- a **root behavior holder** through `BeanBehaviorsHolder`
|
|
52
|
+
- a **synthetic root wrapper** through `a-behavior:root` / `BehaviorRoot`
|
|
53
|
+
- a **behavior composition pipeline** through `ServiceComposer`
|
|
54
|
+
- a **render-time wrapper around the routed tree** rather than around one page or one component only
|
|
55
|
+
|
|
56
|
+
This is why root behaviors are best understood as part of the app host layer, not only as a generic behavior-scene feature.
|
|
57
|
+
|
|
58
|
+
## What root behaviors are not
|
|
59
|
+
|
|
60
|
+
It is equally important to avoid over-assigning responsibilities to root behaviors.
|
|
61
|
+
|
|
62
|
+
Root behaviors do **not** themselves own:
|
|
63
|
+
|
|
64
|
+
- the generic explanation of `@Behavior()` authoring
|
|
65
|
+
- route registration or route-state injection
|
|
66
|
+
- routed-host ownership such as tabs, stack, or keep-alive semantics
|
|
67
|
+
- page-local render concerns that do not need app scope
|
|
68
|
+
- standalone business state ownership that should live in a service or model bean
|
|
69
|
+
|
|
70
|
+
So when you read this topic, read it as **app-wide render-time composition around routed content**, not as a replacement for routing, hosts, or generic behavior authoring.
|
|
71
|
+
|
|
72
|
+
## The core source-reading path
|
|
73
|
+
|
|
74
|
+
When reading root behaviors, use this order:
|
|
75
|
+
|
|
76
|
+
1. `zova/src/suite-vendor/a-zova/modules/a-app/src/component/app/controller.tsx`
|
|
77
|
+
2. `zova/src/suite-vendor/a-zova/modules/a-app/src/config/config.ts`
|
|
78
|
+
3. `zova/src/suite-vendor/a-zova/modules/a-behavior/src/types/behavior.ts`
|
|
79
|
+
4. `zova/src/suite-vendor/a-zova/modules/a-behavior/src/lib/useBehavior.ts`
|
|
80
|
+
5. `zova/src/suite-vendor/a-zova/modules/a-behavior/src/lib/behavior.ts`
|
|
81
|
+
6. `zova/src/suite-vendor/a-zova/modules/a-behavior/src/bean/bean.behaviorBase.ts`
|
|
82
|
+
7. `zova/src/suite-vendor/a-zova/modules/a-behavior/src/bean/bean.behaviorsHolder.ts`
|
|
83
|
+
8. `zova/src/suite-vendor/a-zova/modules/a-behavior/src/bean/behavior.root_.ts`
|
|
84
|
+
9. `zova/src/suite-vendor/a-zova/modules/a-behavior/src/service/composer.ts`
|
|
85
|
+
|
|
86
|
+
That order moves from root app host, to injection point, to declaration surface, to authoring helpers, to base contract, to root bridge, to synthetic root wrapper, and finally to the composition engine.
|
|
87
|
+
|
|
88
|
+
## What each source file clarifies
|
|
89
|
+
|
|
90
|
+
### `a-app/src/component/app/controller.tsx`
|
|
91
|
+
|
|
92
|
+
This is the root app controller.
|
|
93
|
+
|
|
94
|
+
Its root-behavior jobs are:
|
|
95
|
+
|
|
96
|
+
- initialize `BeanBehaviorsHolder`
|
|
97
|
+
- read app-wide behavior declarations from `scope.config.behaviors`
|
|
98
|
+
- render `<RouterView />` through the behavior holder
|
|
99
|
+
|
|
100
|
+
This file is the clearest proof that root behaviors wrap the routed tree from the app host.
|
|
101
|
+
|
|
102
|
+
### `a-app/src/config/config.ts`
|
|
103
|
+
|
|
104
|
+
This file is the root behavior injection point.
|
|
105
|
+
|
|
106
|
+
It exposes:
|
|
107
|
+
|
|
108
|
+
- `behaviors`
|
|
109
|
+
|
|
110
|
+
That matters because it shows root behaviors are configured through the app module config surface instead of being hard-coded directly into the root controller.
|
|
111
|
+
|
|
112
|
+
### `a-behavior/src/types/behavior.ts`
|
|
113
|
+
|
|
114
|
+
This file is the behavior declaration and type contract.
|
|
115
|
+
|
|
116
|
+
It defines:
|
|
117
|
+
|
|
118
|
+
- `IBehaviorTag`
|
|
119
|
+
- `IBehaviorItem`
|
|
120
|
+
- `IBehaviors`
|
|
121
|
+
- behavior-scene type registration
|
|
122
|
+
- behavior-related JSX / HTML attribute surfaces
|
|
123
|
+
|
|
124
|
+
This is the file to read when you want to understand what a behavior declaration looks like before runtime composition begins.
|
|
125
|
+
|
|
126
|
+
### `a-behavior/src/lib/useBehavior.ts`
|
|
127
|
+
|
|
128
|
+
This file exposes the public declaration helpers:
|
|
129
|
+
|
|
130
|
+
- `$UseBehavior(...)`
|
|
131
|
+
- `$UseBehaviorTag(...)`
|
|
132
|
+
|
|
133
|
+
These helpers matter because root behavior composition starts from behavior declarations, not from manual wiring of raw behavior instances.
|
|
134
|
+
|
|
135
|
+
### `a-behavior/src/lib/behavior.ts`
|
|
136
|
+
|
|
137
|
+
This file defines the public `@Behavior()` decorator.
|
|
138
|
+
|
|
139
|
+
That matters because root behaviors still use the same behavior scene as other behavior beans. They are not a separate special-purpose scene. What makes them special is their app-scope host position.
|
|
140
|
+
|
|
141
|
+
### `a-behavior/src/bean/bean.behaviorBase.ts`
|
|
142
|
+
|
|
143
|
+
This is the base behavior contract.
|
|
144
|
+
|
|
145
|
+
It shows that a behavior bean can:
|
|
146
|
+
|
|
147
|
+
- keep behavior options as `$options`
|
|
148
|
+
- use host-scoped injections such as `$$beanBehavior` and `$$behaviorTag`
|
|
149
|
+
- create a nested composer
|
|
150
|
+
- default to `next()` pass-through when it does not need extra wrapping
|
|
151
|
+
|
|
152
|
+
This file is the best place to confirm that a behavior is a bean-scene render interceptor, not just a free helper.
|
|
153
|
+
|
|
154
|
+
### `a-behavior/src/bean/bean.behaviorsHolder.ts`
|
|
155
|
+
|
|
156
|
+
This file is the bridge from app-level config to the actual behavior composition pipeline.
|
|
157
|
+
|
|
158
|
+
Its main jobs are:
|
|
159
|
+
|
|
160
|
+
- accept root holder options
|
|
161
|
+
- store the host behavior tag
|
|
162
|
+
- create a composer from a synthetic `a-behavior:root` declaration
|
|
163
|
+
- watch reactive behavior sources and reload the composer when declarations change
|
|
164
|
+
- remove behavior-only props before rendering
|
|
165
|
+
- render the final chain around the default vnode, which in the app root is the routed tree
|
|
166
|
+
|
|
167
|
+
This is the most important implementation file for understanding root behaviors end to end.
|
|
168
|
+
|
|
169
|
+
### `a-behavior/src/bean/behavior.root_.ts`
|
|
170
|
+
|
|
171
|
+
This file defines the synthetic root behavior.
|
|
172
|
+
|
|
173
|
+
Its main jobs are:
|
|
174
|
+
|
|
175
|
+
- create an inner composer from the declared root behaviors
|
|
176
|
+
- reload that inner composer when root behavior options change
|
|
177
|
+
- delegate render to the inner composer
|
|
178
|
+
|
|
179
|
+
This matters because the root behavior chain is not composed directly on the app controller. It is composed through a stable synthetic root layer.
|
|
180
|
+
|
|
181
|
+
### `a-behavior/src/service/composer.ts`
|
|
182
|
+
|
|
183
|
+
This file is the behavior composition engine.
|
|
184
|
+
|
|
185
|
+
Its main jobs are:
|
|
186
|
+
|
|
187
|
+
- normalize behavior declarations into onion items
|
|
188
|
+
- load onion slices from the behavior scene
|
|
189
|
+
- reuse existing behavior instances when possible
|
|
190
|
+
- update options when reused instances change
|
|
191
|
+
- dispose removed behavior instances
|
|
192
|
+
- build the final composed render chain
|
|
193
|
+
|
|
194
|
+
This is the file to read when your next question is not only “where are root behaviors declared?” but “how does the app-wide behavior stack actually become a render pipeline?”.
|
|
195
|
+
|
|
196
|
+
## Runtime flow from root config to wrapped routed tree
|
|
197
|
+
|
|
198
|
+
The shortest practical runtime flow is:
|
|
199
|
+
|
|
200
|
+
1. `a-app` exposes `scope.config.behaviors`
|
|
201
|
+
2. `ControllerApp.__init__()` calls `BeanBehaviorsHolder.initialize(...)`
|
|
202
|
+
3. the holder stores the behavior tag for the current host
|
|
203
|
+
4. the holder creates a synthetic root declaration for `a-behavior:root`
|
|
204
|
+
5. `BehaviorRoot` creates an inner composer from the declared behaviors
|
|
205
|
+
6. `ServiceComposer` normalizes, loads, reuses, and composes behavior slices
|
|
206
|
+
7. `ControllerApp.render()` returns the routed tree through the composed root wrapper
|
|
207
|
+
8. individual root behaviors may call `next()` and then append app-wide UI around that routed output
|
|
208
|
+
|
|
209
|
+
This explains why root behaviors are best described as app-scope wrapping around routed content rather than as page-local behavior selection.
|
|
210
|
+
|
|
211
|
+
## What belongs in a root behavior
|
|
212
|
+
|
|
213
|
+
Root behavior is a good fit when the concern should surround the routed tree as a whole.
|
|
214
|
+
|
|
215
|
+
Typical fits include:
|
|
216
|
+
|
|
217
|
+
- app-wide overlays or modal layers
|
|
218
|
+
- app-shell wrappers that should apply around all routed content
|
|
219
|
+
- global render-time concerns that depend on app-level service state
|
|
220
|
+
- app-wide UI composition that should remain configurable instead of being copied into page code
|
|
221
|
+
|
|
222
|
+
A practical rule is:
|
|
223
|
+
|
|
224
|
+
- if the concern belongs around the routed tree, consider a root behavior
|
|
225
|
+
- if the concern belongs only around one component or one page, keep it at component/page scope instead
|
|
226
|
+
|
|
227
|
+
## Service-owned state and root behavior rendering
|
|
228
|
+
|
|
229
|
+
A common root-behavior pattern is:
|
|
230
|
+
|
|
231
|
+
- a service owns mutable UI state
|
|
232
|
+
- the root behavior reads that state
|
|
233
|
+
- the root behavior calls `next()` and then renders extra app-wide UI around the routed output
|
|
234
|
+
|
|
235
|
+
This keeps state ownership and render wrapping separate:
|
|
236
|
+
|
|
237
|
+
- services own state and actions
|
|
238
|
+
- root behaviors own render-time composition around the app tree
|
|
239
|
+
|
|
240
|
+
That separation usually produces cleaner app-shell code than forcing global overlay logic directly into unrelated pages.
|
|
241
|
+
|
|
242
|
+
## Where root behaviors stop and other docs begin
|
|
243
|
+
|
|
244
|
+
A useful boundary rule is:
|
|
245
|
+
|
|
246
|
+
- **Behavior Guide** owns generic Behavior concepts and authoring
|
|
247
|
+
- **Zova App Guide** owns the root app host boundary
|
|
248
|
+
- **Root Behaviors Guide** owns app-wide behavior composition around the routed tree
|
|
249
|
+
- **A-Router Guide** owns route registration and route-state injection
|
|
250
|
+
- **Router View Hosts Guide** owns page-instance hosting, keep-alive, and empty/tabs/stack behavior
|
|
251
|
+
|
|
252
|
+
So if your next question is:
|
|
253
|
+
|
|
254
|
+
- “how do I author a behavior bean?” continue with [Behavior Guide](/frontend/behavior-guide)
|
|
255
|
+
- “how does the app host mount the routed tree?” continue with [Zova App Guide](/frontend/zova-app-guide)
|
|
256
|
+
- “how do routes become operational?” continue with [A-Router Guide](/frontend/a-router-guide)
|
|
257
|
+
- “which host owns the routed page instance now?” continue with [Router View Hosts Guide](/frontend/router-view-hosts-guide)
|
|
258
|
+
|
|
259
|
+
## Read together with
|
|
260
|
+
|
|
261
|
+
Use this page together with:
|
|
262
|
+
|
|
263
|
+
- [Behavior Guide](/frontend/behavior-guide)
|
|
264
|
+
- [Zova App Guide](/frontend/zova-app-guide)
|
|
265
|
+
- [A-Router Guide](/frontend/a-router-guide)
|
|
266
|
+
- [Router View Hosts Guide](/frontend/router-view-hosts-guide)
|
|
267
|
+
- [Zova Source Reading Map](/frontend/zova-source-reading-map)
|
|
268
|
+
|
|
269
|
+
## Final takeaway
|
|
270
|
+
|
|
271
|
+
The most accurate way to read root behaviors in Zova is not as a generic “global wrapper” shortcut and not as a routing feature.
|
|
272
|
+
|
|
273
|
+
Read them as the app-scope behavior composition layer that:
|
|
274
|
+
|
|
275
|
+
- starts from `scope.config.behaviors`
|
|
276
|
+
- is initialized by the root app controller
|
|
277
|
+
- is bridged by `BeanBehaviorsHolder`
|
|
278
|
+
- is stabilized through `BehaviorRoot`
|
|
279
|
+
- is executed through `ServiceComposer`
|
|
280
|
+
- wraps the routed tree before control continues into routing and host layers
|
|
281
|
+
|
|
282
|
+
That is the source-confirmed role of root behaviors in the current Basic frontend architecture.
|
|
@@ -59,3 +59,9 @@ When changing user-facing routes, ask:
|
|
|
59
59
|
3. is the page params-aware, meaning the name-based alias path is the correct layer?
|
|
60
60
|
|
|
61
61
|
That helps avoid breaking modular routing semantics.
|
|
62
|
+
|
|
63
|
+
## Where to read next
|
|
64
|
+
|
|
65
|
+
- If you want the broader public routing surface first, continue with [Page Route Guide](/frontend/page-route-guide).
|
|
66
|
+
- If the alias decision depends on route metadata or shell behavior, continue with [Page Meta Guide](/frontend/page-meta-guide).
|
|
67
|
+
- If you want the deeper routing runtime after the public surface is clear, descend into [Zova Router Under the Hood](/frontend/zova-router-under-the-hood).
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
# Router Stack Guide
|
|
2
|
+
|
|
3
|
+
This guide explains the Router Stack host in Zova through the current public Cabloy Basic source.
|
|
4
|
+
|
|
5
|
+
Use this page when you want to understand:
|
|
6
|
+
|
|
7
|
+
- what `routerViewStack` is responsible for
|
|
8
|
+
- how stack hosting differs from Router Tabs
|
|
9
|
+
- where `ControllerRouterViewStack` stops and `ModelStack` begins
|
|
10
|
+
- how stack identity, pruning, and keep-alive work
|
|
11
|
+
- why stack should be read as a routed-host primitive rather than as a workbench-tabs model
|
|
12
|
+
|
|
13
|
+
## Why this page exists
|
|
14
|
+
|
|
15
|
+
The existing router docs already explain several nearby layers:
|
|
16
|
+
|
|
17
|
+
- [Router View Hosts Guide](/frontend/router-view-hosts-guide) explains the shared routed-host layer
|
|
18
|
+
- [Router Tabs Introduction](/frontend/router-tabs-introduction) and the rest of the tabs series explain the workbench-tabs branch
|
|
19
|
+
- [A-Router Guide](/frontend/a-router-guide) explains the router runtime boundary before routed-host ownership begins
|
|
20
|
+
|
|
21
|
+
What those pages do not isolate directly is the stack branch as a first-class host concept.
|
|
22
|
+
|
|
23
|
+
That is the gap this page fills.
|
|
24
|
+
|
|
25
|
+
In the current public Basic source, Router Stack is a framework-level routed-host primitive. It is smaller than the tabs model, uses a linear fullPath-keyed identity model, and does not add tabs-style workbench or page-meta semantics.
|
|
26
|
+
|
|
27
|
+
## The shortest accurate mental model
|
|
28
|
+
|
|
29
|
+
A practical mental model is:
|
|
30
|
+
|
|
31
|
+
1. the route has already become operational in `a-router`
|
|
32
|
+
2. `routerViewStack` receives the routed page through the shared host contract
|
|
33
|
+
3. `ControllerRouterViewStack` forwards host events into `ModelStack`
|
|
34
|
+
4. `ModelStack` treats each route visit as a linear stack item keyed by `fullPath`
|
|
35
|
+
5. `ModelStack` maintains stack contents, recency pruning, and keep-alive inclusion
|
|
36
|
+
6. the host renders routed instances through the shared `BeanRouterViewBase` / `KeepAlive` contract
|
|
37
|
+
|
|
38
|
+
That means Router Stack is best understood as a linear routed-cache host, not as a workbench/grouped-tabs host.
|
|
39
|
+
|
|
40
|
+
## What Router Stack is
|
|
41
|
+
|
|
42
|
+
In the current Basic source, Router Stack is mainly these four things:
|
|
43
|
+
|
|
44
|
+
- a **shared routed-host specialization** built on `BeanRouterViewBase`
|
|
45
|
+
- a **thin controller adapter** through `ControllerRouterViewStack`
|
|
46
|
+
- a **linear stack state owner** through `ModelStack`
|
|
47
|
+
- a **fullPath-keyed keep-alive and pruning model** for routed instances
|
|
48
|
+
|
|
49
|
+
Those roles are enough to make it a distinct routed-host strategy, even though its implementation is much smaller than the tabs branch.
|
|
50
|
+
|
|
51
|
+
## What Router Stack is not
|
|
52
|
+
|
|
53
|
+
It is equally important to avoid over-assigning responsibilities to Router Stack.
|
|
54
|
+
|
|
55
|
+
Router Stack does **not** itself own:
|
|
56
|
+
|
|
57
|
+
- route registration or route-state injection
|
|
58
|
+
- business workspace grouping
|
|
59
|
+
- two-level tab semantics
|
|
60
|
+
- tabs-style page-meta coordination
|
|
61
|
+
- Admin/Web tabs layout behavior
|
|
62
|
+
|
|
63
|
+
So when you read Router Stack, read it as a compact routed-host strategy after route resolution, not as the owner of the broader routing model and not as a smaller copy of Router Tabs.
|
|
64
|
+
|
|
65
|
+
## The core source-reading path
|
|
66
|
+
|
|
67
|
+
When reading Router Stack, use this order:
|
|
68
|
+
|
|
69
|
+
1. `zova/src/suite-vendor/a-zova/modules/a-router/src/lib/routerViewBase.tsx`
|
|
70
|
+
2. `zova/src/suite-vendor/a-zova/modules/a-routerstack/src/component/routerViewStack/controller.tsx`
|
|
71
|
+
3. `zova/src/suite-vendor/a-zova/modules/a-routerstack/src/model/stack.ts`
|
|
72
|
+
4. `zova/src/suite-vendor/a-zova/modules/a-routerstack/src/types/stack.ts`
|
|
73
|
+
|
|
74
|
+
That order moves from the shared host contract, to the stack host adapter, to the real stack owner, and finally to the stack model shape.
|
|
75
|
+
|
|
76
|
+
## What each source file clarifies
|
|
77
|
+
|
|
78
|
+
### `a-router/src/lib/routerViewBase.tsx`
|
|
79
|
+
|
|
80
|
+
This is the shared routed-host contract.
|
|
81
|
+
|
|
82
|
+
Its main jobs are:
|
|
83
|
+
|
|
84
|
+
- register the host with `$router`
|
|
85
|
+
- receive routed output through `RouterView`
|
|
86
|
+
- wrap routed instances in `KeepAlive`
|
|
87
|
+
- assign vnode identity from host-prepared route meta
|
|
88
|
+
- inject the current page route into the hosted vnode
|
|
89
|
+
|
|
90
|
+
This file matters because Router Stack is not a standalone host system. It is a specialization built on this shared contract.
|
|
91
|
+
|
|
92
|
+
### `a-routerstack/src/component/routerViewStack/controller.tsx`
|
|
93
|
+
|
|
94
|
+
This is the Router Stack host controller.
|
|
95
|
+
|
|
96
|
+
Its main jobs are very small and explicit:
|
|
97
|
+
|
|
98
|
+
- inject `$$modelStack`
|
|
99
|
+
- forward `backRoute(...)`
|
|
100
|
+
- forward `forwardRoute(...)`
|
|
101
|
+
- delegate `prepareRouteMeta(...)`
|
|
102
|
+
- delegate `getKeepAliveInclude()`
|
|
103
|
+
|
|
104
|
+
That is the key source-confirmed boundary:
|
|
105
|
+
|
|
106
|
+
- the controller is a thin adapter
|
|
107
|
+
- the real stack semantics live in `ModelStack`
|
|
108
|
+
|
|
109
|
+
Unlike the tabs controller, the stack controller does **not** override `setPageMeta(...)`.
|
|
110
|
+
|
|
111
|
+
### `a-routerstack/src/model/stack.ts`
|
|
112
|
+
|
|
113
|
+
This is the real stack owner.
|
|
114
|
+
|
|
115
|
+
Its main jobs are:
|
|
116
|
+
|
|
117
|
+
- keep the linear stack in `tabs`
|
|
118
|
+
- track `keepAliveInclude`
|
|
119
|
+
- add or update routed stack items on forward navigation
|
|
120
|
+
- delete stack items on back navigation
|
|
121
|
+
- prune the stack by recency when `max` is bounded
|
|
122
|
+
- prepare routed identity from `route.fullPath`
|
|
123
|
+
|
|
124
|
+
This file is the source of truth for what “stack” really means in the framework.
|
|
125
|
+
|
|
126
|
+
### `a-routerstack/src/types/stack.ts`
|
|
127
|
+
|
|
128
|
+
This file defines the compact stack model shape.
|
|
129
|
+
|
|
130
|
+
It confirms that the stack branch is much smaller than the tabs branch:
|
|
131
|
+
|
|
132
|
+
- `ModelStackOptionsBase`
|
|
133
|
+
- `RouteTabTransient`
|
|
134
|
+
- `RouteTab`
|
|
135
|
+
|
|
136
|
+
There is no tabs-style `items` structure or richer tab info contract here.
|
|
137
|
+
|
|
138
|
+
## Stack identity model
|
|
139
|
+
|
|
140
|
+
The most important stack rule is in `ModelStack.prepareRouteMeta(...)`.
|
|
141
|
+
|
|
142
|
+
It returns:
|
|
143
|
+
|
|
144
|
+
- `tabKey = route.fullPath`
|
|
145
|
+
- `componentKey = route.fullPath`
|
|
146
|
+
- `fullPath = route.fullPath`
|
|
147
|
+
|
|
148
|
+
That means Router Stack collapses routed identity into one linear per-visit key.
|
|
149
|
+
|
|
150
|
+
This is very different from Router Tabs, where:
|
|
151
|
+
|
|
152
|
+
- `tabKey` is business/workspace grouping identity
|
|
153
|
+
- `componentKey` is page-instance identity inside that grouping
|
|
154
|
+
|
|
155
|
+
In Router Stack, one route visit is one stack identity.
|
|
156
|
+
|
|
157
|
+
## Keep-alive and pruning behavior
|
|
158
|
+
|
|
159
|
+
Router Stack still participates in keep-alive through the shared host layer, but its inclusion model is simple:
|
|
160
|
+
|
|
161
|
+
- `keepAliveInclude` is derived from the current stack contents
|
|
162
|
+
- each stack item contributes its own key
|
|
163
|
+
- pruning removes older entries when the configured max is exceeded
|
|
164
|
+
|
|
165
|
+
The pruning rule is recency-based, not workspace-based.
|
|
166
|
+
|
|
167
|
+
That means Router Stack behaves more like a bounded linear routed cache than like a persistent workbench model.
|
|
168
|
+
|
|
169
|
+
## Forward and back behavior
|
|
170
|
+
|
|
171
|
+
The stack host reacts to route flow in a compact way:
|
|
172
|
+
|
|
173
|
+
- `forwardRoute(route)` prepares the stack route meta and adds/updates the stack entry
|
|
174
|
+
- `backRoute(route)` removes the matching `fullPath` entry
|
|
175
|
+
|
|
176
|
+
This is another important semantic difference from tabs:
|
|
177
|
+
|
|
178
|
+
- tabs maintain grouped workspace state and page-meta-aware items
|
|
179
|
+
- stack mainly tracks linear routed presence
|
|
180
|
+
|
|
181
|
+
## Current Cabloy Basic boundary
|
|
182
|
+
|
|
183
|
+
In the current public Basic source:
|
|
184
|
+
|
|
185
|
+
- Router Stack exists as a real framework primitive
|
|
186
|
+
- the currently visible public Basic shell is centered on Router Tabs
|
|
187
|
+
- Router Stack should therefore be read as an available routed-host strategy, not as the main visible Basic shell pattern
|
|
188
|
+
|
|
189
|
+
This keeps the docs source-confirmed without overstating current public usage.
|
|
190
|
+
|
|
191
|
+
## Where Router Stack stops and other docs begin
|
|
192
|
+
|
|
193
|
+
A useful boundary rule is:
|
|
194
|
+
|
|
195
|
+
- [A-Router Guide](/frontend/a-router-guide) owns route registration and route-state injection before host ownership begins
|
|
196
|
+
- [Router View Hosts Guide](/frontend/router-view-hosts-guide) owns the shared host layer and the first tabs/stack distinction
|
|
197
|
+
- this page owns the Stack branch specifically
|
|
198
|
+
- the existing Router Tabs pages own the workbench-tabs branch
|
|
199
|
+
|
|
200
|
+
So if your next question is:
|
|
201
|
+
|
|
202
|
+
- “how do routes become operational?” go back to [A-Router Guide](/frontend/a-router-guide)
|
|
203
|
+
- “what is the shared host contract?” go to [Router View Hosts Guide](/frontend/router-view-hosts-guide)
|
|
204
|
+
- “how does the workbench-tabs model work?” go to [Router Tabs Mechanism](/frontend/router-tabs-mechanism)
|
|
205
|
+
|
|
206
|
+
## Read together with
|
|
207
|
+
|
|
208
|
+
Use this page together with:
|
|
209
|
+
|
|
210
|
+
- [Router View Hosts Guide](/frontend/router-view-hosts-guide)
|
|
211
|
+
- [Router Tabs Introduction](/frontend/router-tabs-introduction)
|
|
212
|
+
- [Router Tabs Mechanism](/frontend/router-tabs-mechanism)
|
|
213
|
+
- [Router Tabs vs Stack](/frontend/router-tabs-vs-stack)
|
|
214
|
+
- [A-Router Guide](/frontend/a-router-guide)
|
|
215
|
+
- [Zova Source Reading Map](/frontend/zova-source-reading-map)
|
|
216
|
+
|
|
217
|
+
## Final takeaway
|
|
218
|
+
|
|
219
|
+
The most accurate way to read Router Stack is not as “tabs, but simpler” and not as a replacement for the broader router runtime.
|
|
220
|
+
|
|
221
|
+
Read it as the stack-oriented routed-host primitive that:
|
|
222
|
+
|
|
223
|
+
- builds on the shared `BeanRouterViewBase` host contract
|
|
224
|
+
- delegates host behavior through `ControllerRouterViewStack`
|
|
225
|
+
- owns linear fullPath-keyed routed presence through `ModelStack`
|
|
226
|
+
- participates in keep-alive and recency pruning
|
|
227
|
+
- stays smaller than the Router Tabs workbench model
|
|
228
|
+
|
|
229
|
+
That is the source-confirmed role of Router Stack in the current Basic frontend architecture.
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
This guide is the landing page for the router-tabs documentation set in Zova within the Cabloy monorepo.
|
|
4
4
|
|
|
5
|
-
Use it to understand what the router-tabs mechanism is, which questions each companion document answers, and what order to read them in.
|
|
5
|
+
Use it to understand what the router-tabs mechanism is, how it fits into the broader routed-host layer, which questions each companion document answers, and what order to read them in.
|
|
6
6
|
|
|
7
7
|
## What router tabs are
|
|
8
8
|
|
|
9
|
+
Router tabs are one routed-host strategy built on top of the shared Zova router-view host layer.
|
|
10
|
+
|
|
9
11
|
Router tabs provide a workbench-style navigation model for frontend layouts that need more than a simple route-transition model.
|
|
10
12
|
|
|
11
13
|
In the current Cabloy Basic source, the mechanism supports:
|
|
@@ -34,6 +36,8 @@ This document explains:
|
|
|
34
36
|
|
|
35
37
|
Read [Router Tabs Mechanism](/frontend/router-tabs-mechanism).
|
|
36
38
|
|
|
39
|
+
If your real question is whether this should be modeled as tabs at all, compare it first with [Router Tabs vs Stack](/frontend/router-tabs-vs-stack), then read [Router Stack Guide](/frontend/router-stack-guide) if the stack branch is a better fit.
|
|
40
|
+
|
|
37
41
|
This document explains:
|
|
38
42
|
|
|
39
43
|
- the shared state model
|
|
@@ -41,6 +45,8 @@ This document explains:
|
|
|
41
45
|
- page metadata, keep-alive, cache, and pruning behavior
|
|
42
46
|
- the relationship between the shared model and concrete layouts
|
|
43
47
|
|
|
48
|
+
For authoring-focused page metadata usage, continue with [Page Meta Guide](/frontend/page-meta-guide).
|
|
49
|
+
|
|
44
50
|
### How should I author route meta for this?
|
|
45
51
|
|
|
46
52
|
Read [Router Tabs Route Meta Cookbook](/frontend/router-tabs-route-meta-cookbook).
|
|
@@ -64,6 +70,21 @@ This document explains:
|
|
|
64
70
|
- how Web reuses the same model with a different shell style
|
|
65
71
|
- why layout-specific UI should not be confused with shared mechanism semantics
|
|
66
72
|
|
|
73
|
+
## Router ecosystem map
|
|
74
|
+
|
|
75
|
+
Use this compact map when you want the shortest accurate document order for Zova routing and routed-shell behavior.
|
|
76
|
+
|
|
77
|
+
| If your question is mainly about | Read this next | Then continue with |
|
|
78
|
+
| ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
79
|
+
| route records, shell/layout choice, and the public route surface | [Page Route Guide](/frontend/page-route-guide) | [Route Alias Guide](/frontend/route-alias-guide), [Navigation Guards Guide](/frontend/navigation-guards-guide) |
|
|
80
|
+
| route registration, startup, lazy loading, and controller route-state injection | [Zova Router Under the Hood](/frontend/zova-router-under-the-hood) | [Router View Hosts Guide](/frontend/router-view-hosts-guide) |
|
|
81
|
+
| why one routed page behaves like an empty shell while another behaves like a workbench host | [Router View Hosts Guide](/frontend/router-view-hosts-guide) | this page, then [Router Tabs Mechanism](/frontend/router-tabs-mechanism) |
|
|
82
|
+
| the business meaning of router tabs | [Router Tabs Overview](/frontend/router-tabs-overview) | [Router Tabs Admin and Web Comparison](/frontend/router-tabs-admin-web-comparison) |
|
|
83
|
+
| how the tabs model works in code | [Router Tabs Mechanism](/frontend/router-tabs-mechanism) | [Page Meta Guide](/frontend/page-meta-guide), [Router Tabs Layout Integration](/frontend/router-tabs-layout-integration), then [Router Tabs Route Meta Cookbook](/frontend/router-tabs-route-meta-cookbook) |
|
|
84
|
+
| how the current Basic layouts turn the shared tabs model into a visible shell | [Router Tabs Layout Integration](/frontend/router-tabs-layout-integration) | [Router Tabs Admin and Web Comparison](/frontend/router-tabs-admin-web-comparison) |
|
|
85
|
+
| how to intentionally author `tabKey`, `componentKey`, and `keepAlive` | [Router Tabs Route Meta Cookbook](/frontend/router-tabs-route-meta-cookbook) | [Zova Source Reading Map](/frontend/zova-source-reading-map) |
|
|
86
|
+
| which files to read first for a targeted source dive | [Zova Source Reading Map](/frontend/zova-source-reading-map) | the branch that matches your current question |
|
|
87
|
+
|
|
67
88
|
## Recommended reading paths
|
|
68
89
|
|
|
69
90
|
### Product or architecture perspective
|
|
@@ -79,8 +100,9 @@ Recommended order:
|
|
|
79
100
|
Recommended order:
|
|
80
101
|
|
|
81
102
|
1. [Router Tabs Mechanism](/frontend/router-tabs-mechanism)
|
|
82
|
-
2. [Router Tabs
|
|
83
|
-
3. [Router Tabs
|
|
103
|
+
2. [Router Tabs Layout Integration](/frontend/router-tabs-layout-integration)
|
|
104
|
+
3. [Router Tabs Route Meta Cookbook](/frontend/router-tabs-route-meta-cookbook)
|
|
105
|
+
4. [Router Tabs Admin and Web Comparison](/frontend/router-tabs-admin-web-comparison)
|
|
84
106
|
|
|
85
107
|
### Maintenance and refactor perspective
|
|
86
108
|
|
|
@@ -100,6 +122,7 @@ For internal design boundaries, maintenance invariants, and refactor safety rule
|
|
|
100
122
|
|
|
101
123
|
## See also
|
|
102
124
|
|
|
125
|
+
- [Router View Hosts Guide](/frontend/router-view-hosts-guide)
|
|
103
126
|
- [Router Tabs Overview](/frontend/router-tabs-overview)
|
|
104
127
|
- [Router Tabs Mechanism](/frontend/router-tabs-mechanism)
|
|
105
128
|
- [Router Tabs Route Meta Cookbook](/frontend/router-tabs-route-meta-cookbook)
|