@bakers-build/addon-bakers-ui 0.0.0-stage → 0.1.0-next.38
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/LICENSE +21 -0
- package/README.md +4 -2
- package/dist/src/Agent/launch.d.ts +25 -0
- package/dist/src/Agent/launch.js +56 -0
- package/dist/src/Component/badge/index.d.ts +11 -0
- package/dist/src/Component/badge/index.js +10 -0
- package/dist/src/Component/bar-chart/index.d.ts +16 -0
- package/dist/src/Component/bar-chart/index.js +63 -0
- package/dist/src/Component/card/index.d.ts +16 -0
- package/dist/src/Component/card/index.js +39 -0
- package/dist/src/Component/divider/index.d.ts +7 -0
- package/dist/src/Component/divider/index.js +13 -0
- package/dist/src/Component/footer-actions/index.d.ts +58 -0
- package/dist/src/Component/footer-actions/index.js +113 -0
- package/dist/src/Component/heat-map/index.d.ts +21 -0
- package/dist/src/Component/heat-map/index.js +86 -0
- package/dist/src/Component/key-value/index.d.ts +18 -0
- package/dist/src/Component/key-value/index.js +30 -0
- package/dist/src/Component/list-chrome/index.d.ts +22 -0
- package/dist/src/Component/list-chrome/index.js +69 -0
- package/dist/src/Component/markdown/index.d.ts +103 -0
- package/dist/src/Component/markdown/index.js +204 -0
- package/dist/src/Component/section-list/index.d.ts +247 -0
- package/dist/src/Component/section-list/index.js +232 -0
- package/dist/src/Component/stats-panel/index.d.ts +61 -0
- package/dist/src/Component/stats-panel/index.js +112 -0
- package/dist/src/Component/team-member-workload-list/index.d.ts +9 -0
- package/dist/src/Component/team-member-workload-list/index.js +31 -0
- package/dist/src/Component/top-tabs/index.d.ts +17 -0
- package/dist/src/Component/top-tabs/index.js +15 -0
- package/dist/src/Component/work-ticket-list/index.d.ts +19 -0
- package/dist/src/Component/work-ticket-list/index.js +14 -0
- package/dist/src/Component/workload-summary/index.d.ts +3 -0
- package/dist/src/Component/workload-summary/index.js +12 -0
- package/dist/src/Data/session-store.d.ts +17 -0
- package/dist/src/Data/session-store.js +93 -0
- package/dist/src/Entity/collection.d.ts +297 -0
- package/dist/src/Entity/collection.js +399 -0
- package/dist/src/Entity/conductor/Data/conductors.d.ts +457 -0
- package/dist/src/Entity/conductor/Data/conductors.js +524 -0
- package/dist/src/Entity/conductor/Data/detail.d.ts +39 -0
- package/dist/src/Entity/conductor/Data/detail.js +69 -0
- package/dist/src/Entity/conductor/Data/liveness.d.ts +11 -0
- package/dist/src/Entity/conductor/Data/liveness.js +21 -0
- package/dist/src/Entity/conductor/Data/log-block.d.ts +18 -0
- package/dist/src/Entity/conductor/Data/log-block.js +32 -0
- package/dist/src/Entity/conductor/Data/log-tail.d.ts +25 -0
- package/dist/src/Entity/conductor/Data/log-tail.js +133 -0
- package/dist/src/Entity/conductor/Data/own-conductor.d.ts +34 -0
- package/dist/src/Entity/conductor/Data/own-conductor.js +97 -0
- package/dist/src/Entity/conductor/Data/own-rows.d.ts +59 -0
- package/dist/src/Entity/conductor/Data/own-rows.js +87 -0
- package/dist/src/Entity/conductor/Data/process.d.ts +125 -0
- package/dist/src/Entity/conductor/Data/process.js +166 -0
- package/dist/src/Entity/conductor/Screen/conductor-log.d.ts +36 -0
- package/dist/src/Entity/conductor/Screen/conductor-log.js +46 -0
- package/dist/src/Entity/conductor/Screen/conductor-overview.d.ts +40 -0
- package/dist/src/Entity/conductor/Screen/conductor-overview.js +61 -0
- package/dist/src/Entity/conductor/Screen/conductor-runs.d.ts +90 -0
- package/dist/src/Entity/conductor/Screen/conductor-runs.js +128 -0
- package/dist/src/Entity/conductor/Screen/conductors.d.ts +152 -0
- package/dist/src/Entity/conductor/Screen/conductors.js +262 -0
- package/dist/src/Entity/conductor/Screen/project-conductors.d.ts +146 -0
- package/dist/src/Entity/conductor/Screen/project-conductors.js +262 -0
- package/dist/src/Entity/cycle.d.ts +18 -0
- package/dist/src/Entity/cycle.js +30 -0
- package/dist/src/Entity/project/Data/project.d.ts +16 -0
- package/dist/src/Entity/project/Data/project.js +28 -0
- package/dist/src/Entity/project/Data/projects.d.ts +144 -0
- package/dist/src/Entity/project/Data/projects.js +198 -0
- package/dist/src/Entity/project/Data/with-tickets.d.ts +25 -0
- package/dist/src/Entity/project/Data/with-tickets.js +40 -0
- package/dist/src/Entity/project/Data/workload.d.ts +16 -0
- package/dist/src/Entity/project/Data/workload.js +63 -0
- package/dist/src/Entity/project/Screen/project-overview.d.ts +34 -0
- package/dist/src/Entity/project/Screen/project-overview.js +76 -0
- package/dist/src/Entity/project/Screen/project-picker.d.ts +69 -0
- package/dist/src/Entity/project/Screen/project-picker.js +179 -0
- package/dist/src/Entity/project/Screen/projects-screen.d.ts +50 -0
- package/dist/src/Entity/project/Screen/projects-screen.js +123 -0
- package/dist/src/Entity/run/Component/run-detail/index.d.ts +33 -0
- package/dist/src/Entity/run/Component/run-detail/index.js +264 -0
- package/dist/src/Entity/run/Data/active-run.d.ts +15 -0
- package/dist/src/Entity/run/Data/active-run.js +23 -0
- package/dist/src/Entity/run/Data/query.d.ts +50 -0
- package/dist/src/Entity/run/Data/query.js +88 -0
- package/dist/src/Entity/run/Data/runs.d.ts +363 -0
- package/dist/src/Entity/run/Data/runs.js +366 -0
- package/dist/src/Entity/run/Data/status.d.ts +12 -0
- package/dist/src/Entity/run/Data/status.js +40 -0
- package/dist/src/Entity/run/Form/edit.d.ts +29 -0
- package/dist/src/Entity/run/Form/edit.js +23 -0
- package/dist/src/Entity/run/Screen/edit-run-form.d.ts +26 -0
- package/dist/src/Entity/run/Screen/edit-run-form.js +117 -0
- package/dist/src/Entity/run/Screen/run-detail.d.ts +66 -0
- package/dist/src/Entity/run/Screen/run-detail.js +112 -0
- package/dist/src/Entity/run/Screen/runs.d.ts +85 -0
- package/dist/src/Entity/run/Screen/runs.js +148 -0
- package/dist/src/Entity/run/Screen/user-runs.d.ts +80 -0
- package/dist/src/Entity/run/Screen/user-runs.js +112 -0
- package/dist/src/Entity/team/Data/members.d.ts +30 -0
- package/dist/src/Entity/team/Data/members.js +83 -0
- package/dist/src/Entity/team/Data/projects.d.ts +3 -0
- package/dist/src/Entity/team/Data/projects.js +23 -0
- package/dist/src/Entity/team/Data/team.d.ts +22 -0
- package/dist/src/Entity/team/Data/team.js +38 -0
- package/dist/src/Entity/team/Data/teams.d.ts +223 -0
- package/dist/src/Entity/team/Data/teams.js +268 -0
- package/dist/src/Entity/team/Data/workload.d.ts +25 -0
- package/dist/src/Entity/team/Data/workload.js +60 -0
- package/dist/src/Entity/team/Screen/team-member-work.d.ts +41 -0
- package/dist/src/Entity/team/Screen/team-member-work.js +56 -0
- package/dist/src/Entity/team/Screen/team-users.d.ts +63 -0
- package/dist/src/Entity/team/Screen/team-users.js +210 -0
- package/dist/src/Entity/team/Screen/team-work.d.ts +39 -0
- package/dist/src/Entity/team/Screen/team-work.js +112 -0
- package/dist/src/Entity/team/Screen/teams-screen.d.ts +110 -0
- package/dist/src/Entity/team/Screen/teams-screen.js +264 -0
- package/dist/src/Entity/term/Data/terms.d.ts +16 -0
- package/dist/src/Entity/term/Data/terms.js +14 -0
- package/dist/src/Entity/ticket/Component/comment-item/index.d.ts +37 -0
- package/dist/src/Entity/ticket/Component/comment-item/index.js +50 -0
- package/dist/src/Entity/ticket/Component/create-form/index.d.ts +28 -0
- package/dist/src/Entity/ticket/Component/create-form/index.js +74 -0
- package/dist/src/Entity/ticket/Component/demo-statistics.d.ts +14 -0
- package/dist/src/Entity/ticket/Component/demo-statistics.js +88 -0
- package/dist/src/Entity/ticket/Component/edit-form/index.d.ts +38 -0
- package/dist/src/Entity/ticket/Component/edit-form/index.js +121 -0
- package/dist/src/Entity/ticket/Component/react-statistics.d.ts +14 -0
- package/dist/src/Entity/ticket/Component/react-statistics.js +23 -0
- package/dist/src/Entity/ticket/Component/sections/index.d.ts +7 -0
- package/dist/src/Entity/ticket/Component/sections/index.js +64 -0
- package/dist/src/Entity/ticket/Component/ticket-content/index.d.ts +54 -0
- package/dist/src/Entity/ticket/Component/ticket-content/index.js +479 -0
- package/dist/src/Entity/ticket/Component/ticket-content/model.d.ts +59 -0
- package/dist/src/Entity/ticket/Component/ticket-content/model.js +509 -0
- package/dist/src/Entity/ticket/Component/ticket-detail/index.d.ts +294 -0
- package/dist/src/Entity/ticket/Component/ticket-detail/index.js +1093 -0
- package/dist/src/Entity/ticket/Component/ticket-teaser/index.d.ts +51 -0
- package/dist/src/Entity/ticket/Component/ticket-teaser/index.js +130 -0
- package/dist/src/Entity/ticket/Data/addons.d.ts +53 -0
- package/dist/src/Entity/ticket/Data/addons.js +35 -0
- package/dist/src/Entity/ticket/Data/detail.d.ts +47 -0
- package/dist/src/Entity/ticket/Data/detail.js +61 -0
- package/dist/src/Entity/ticket/Data/input.d.ts +7 -0
- package/dist/src/Entity/ticket/Data/input.js +8 -0
- package/dist/src/Entity/ticket/Data/parents-all.d.ts +14 -0
- package/dist/src/Entity/ticket/Data/parents-all.js +44 -0
- package/dist/src/Entity/ticket/Data/parents.d.ts +39 -0
- package/dist/src/Entity/ticket/Data/parents.js +122 -0
- package/dist/src/Entity/ticket/Data/projects-search.d.ts +35 -0
- package/dist/src/Entity/ticket/Data/projects-search.js +61 -0
- package/dist/src/Entity/ticket/Data/query.d.ts +95 -0
- package/dist/src/Entity/ticket/Data/query.js +171 -0
- package/dist/src/Entity/ticket/Data/store.d.ts +20 -0
- package/dist/src/Entity/ticket/Data/store.js +144 -0
- package/dist/src/Entity/ticket/Data/tickets.d.ts +368 -0
- package/dist/src/Entity/ticket/Data/tickets.js +419 -0
- package/dist/src/Entity/ticket/Data/url.d.ts +16 -0
- package/dist/src/Entity/ticket/Data/url.js +20 -0
- package/dist/src/Entity/ticket/Data/workflow.d.ts +9 -0
- package/dist/src/Entity/ticket/Data/workflow.js +18 -0
- package/dist/src/Entity/ticket/Data/workload.d.ts +13 -0
- package/dist/src/Entity/ticket/Data/workload.js +9 -0
- package/dist/src/Entity/ticket/Data/write.d.ts +51 -0
- package/dist/src/Entity/ticket/Data/write.js +115 -0
- package/dist/src/Entity/ticket/Form/addon-action.d.ts +37 -0
- package/dist/src/Entity/ticket/Form/addon-action.js +80 -0
- package/dist/src/Entity/ticket/Form/create-data.d.ts +75 -0
- package/dist/src/Entity/ticket/Form/create-data.js +208 -0
- package/dist/src/Entity/ticket/Form/create.d.ts +219 -0
- package/dist/src/Entity/ticket/Form/create.js +190 -0
- package/dist/src/Entity/ticket/Form/edit-data.d.ts +13 -0
- package/dist/src/Entity/ticket/Form/edit-data.js +68 -0
- package/dist/src/Entity/ticket/Form/edit-parent-source.d.ts +8 -0
- package/dist/src/Entity/ticket/Form/edit-parent-source.js +23 -0
- package/dist/src/Entity/ticket/Form/edit.d.ts +184 -0
- package/dist/src/Entity/ticket/Form/edit.js +288 -0
- package/dist/src/Entity/ticket/Form/keys.d.ts +7 -0
- package/dist/src/Entity/ticket/Form/keys.js +7 -0
- package/dist/src/Entity/ticket/Form/my-work-parent-source.d.ts +11 -0
- package/dist/src/Entity/ticket/Form/my-work-parent-source.js +41 -0
- package/dist/src/Entity/ticket/Form/parent-filter.d.ts +36 -0
- package/dist/src/Entity/ticket/Form/parent-filter.js +37 -0
- package/dist/src/Entity/ticket/Form/parent-source.d.ts +27 -0
- package/dist/src/Entity/ticket/Form/parent-source.js +56 -0
- package/dist/src/Entity/ticket/Form/project-filter.d.ts +36 -0
- package/dist/src/Entity/ticket/Form/project-filter.js +36 -0
- package/dist/src/Entity/ticket/Form/project-source.d.ts +20 -0
- package/dist/src/Entity/ticket/Form/project-source.js +40 -0
- package/dist/src/Entity/ticket/Form/reviewer-options.d.ts +10 -0
- package/dist/src/Entity/ticket/Form/reviewer-options.js +48 -0
- package/dist/src/Entity/ticket/Form/who-filter.d.ts +41 -0
- package/dist/src/Entity/ticket/Form/who-filter.js +33 -0
- package/dist/src/Entity/ticket/Form/who-source.d.ts +18 -0
- package/dist/src/Entity/ticket/Form/who-source.js +38 -0
- package/dist/src/Entity/ticket/Screen/conductor-tickets.d.ts +91 -0
- package/dist/src/Entity/ticket/Screen/conductor-tickets.js +135 -0
- package/dist/src/Entity/ticket/Screen/create-ticket-form.d.ts +132 -0
- package/dist/src/Entity/ticket/Screen/create-ticket-form.js +616 -0
- package/dist/src/Entity/ticket/Screen/edit-assignment-form.d.ts +93 -0
- package/dist/src/Entity/ticket/Screen/edit-assignment-form.js +335 -0
- package/dist/src/Entity/ticket/Screen/my-work-parent-filter-form.d.ts +30 -0
- package/dist/src/Entity/ticket/Screen/my-work-parent-filter-form.js +161 -0
- package/dist/src/Entity/ticket/Screen/my-work.d.ts +62 -0
- package/dist/src/Entity/ticket/Screen/my-work.js +189 -0
- package/dist/src/Entity/ticket/Screen/parent-filter-form.d.ts +46 -0
- package/dist/src/Entity/ticket/Screen/parent-filter-form.js +203 -0
- package/dist/src/Entity/ticket/Screen/project-filter-form.d.ts +30 -0
- package/dist/src/Entity/ticket/Screen/project-filter-form.js +173 -0
- package/dist/src/Entity/ticket/Screen/ticket-addons.d.ts +94 -0
- package/dist/src/Entity/ticket/Screen/ticket-addons.js +492 -0
- package/dist/src/Entity/ticket/Screen/ticket-agents.d.ts +134 -0
- package/dist/src/Entity/ticket/Screen/ticket-agents.js +253 -0
- package/dist/src/Entity/ticket/Screen/ticket-comments.d.ts +26 -0
- package/dist/src/Entity/ticket/Screen/ticket-comments.js +26 -0
- package/dist/src/Entity/ticket/Screen/ticket-content-screen.d.ts +94 -0
- package/dist/src/Entity/ticket/Screen/ticket-content-screen.js +468 -0
- package/dist/src/Entity/ticket/Screen/ticket-detail.d.ts +33 -0
- package/dist/src/Entity/ticket/Screen/ticket-detail.js +49 -0
- package/dist/src/Entity/ticket/Screen/ticket-filter-bar.d.ts +29 -0
- package/dist/src/Entity/ticket/Screen/ticket-filter-bar.js +122 -0
- package/dist/src/Entity/ticket/Screen/ticket-planning.d.ts +26 -0
- package/dist/src/Entity/ticket/Screen/ticket-planning.js +29 -0
- package/dist/src/Entity/ticket/Screen/ticket-react-markdown.d.ts +30 -0
- package/dist/src/Entity/ticket/Screen/ticket-react-markdown.js +109 -0
- package/dist/src/Entity/ticket/Screen/ticket-react.d.ts +41 -0
- package/dist/src/Entity/ticket/Screen/ticket-react.js +136 -0
- package/dist/src/Entity/ticket/Screen/ticket-related.d.ts +59 -0
- package/dist/src/Entity/ticket/Screen/ticket-related.js +220 -0
- package/dist/src/Entity/ticket/Screen/ticket-runs.d.ts +55 -0
- package/dist/src/Entity/ticket/Screen/ticket-runs.js +231 -0
- package/dist/src/Entity/ticket/Screen/ticket-search.d.ts +44 -0
- package/dist/src/Entity/ticket/Screen/ticket-search.js +97 -0
- package/dist/src/Entity/ticket/Screen/tickets.d.ts +218 -0
- package/dist/src/Entity/ticket/Screen/tickets.js +582 -0
- package/dist/src/Entity/ticket/Screen/user-tickets.d.ts +107 -0
- package/dist/src/Entity/ticket/Screen/user-tickets.js +136 -0
- package/dist/src/Entity/ticket/Screen/who-filter-form.d.ts +50 -0
- package/dist/src/Entity/ticket/Screen/who-filter-form.js +191 -0
- package/dist/src/Entity/ticket-template/Data/templates.d.ts +26 -0
- package/dist/src/Entity/ticket-template/Data/templates.js +62 -0
- package/dist/src/Entity/transport.d.ts +60 -0
- package/dist/src/Entity/transport.js +50 -0
- package/dist/src/Entity/user/Data/member-context.d.ts +4 -0
- package/dist/src/Entity/user/Data/member-context.js +39 -0
- package/dist/src/Entity/user/Data/users.d.ts +135 -0
- package/dist/src/Entity/user/Data/users.js +174 -0
- package/dist/src/Entity/user/Screen/member-overview.d.ts +48 -0
- package/dist/src/Entity/user/Screen/member-overview.js +63 -0
- package/dist/src/Entity/user/Screen/users.d.ts +41 -0
- package/dist/src/Entity/user/Screen/users.js +106 -0
- package/dist/src/Entity/workspace/Data/members.d.ts +8 -0
- package/dist/src/Entity/workspace/Data/members.js +50 -0
- package/dist/src/Entity/workspace/Data/workspaces.d.ts +20 -0
- package/dist/src/Entity/workspace/Data/workspaces.js +20 -0
- package/dist/src/Entity/workspace/Screen/workspace-picker.d.ts +34 -0
- package/dist/src/Entity/workspace/Screen/workspace-picker.js +163 -0
- package/dist/src/Extension/load.d.ts +10 -0
- package/dist/src/Extension/load.js +21 -0
- package/dist/src/Extension/store.d.ts +7 -0
- package/dist/src/Extension/store.js +19 -0
- package/dist/src/Form/field.d.ts +101 -0
- package/dist/src/Form/field.js +28 -0
- package/dist/src/Form/form.d.ts +53 -0
- package/dist/src/Form/form.js +194 -0
- package/dist/src/Form/index.d.ts +3 -0
- package/dist/src/Form/index.js +5 -0
- package/dist/src/Form/keys.d.ts +25 -0
- package/dist/src/Form/keys.js +112 -0
- package/dist/src/Kernel/braid.d.ts +4 -0
- package/dist/src/Kernel/braid.js +10 -0
- package/dist/src/Kernel/chrome.d.ts +359 -0
- package/dist/src/Kernel/chrome.js +581 -0
- package/dist/src/Kernel/clipboard.d.ts +30 -0
- package/dist/src/Kernel/clipboard.js +51 -0
- package/dist/src/Kernel/contribution-guard.d.ts +4 -0
- package/dist/src/Kernel/contribution-guard.js +48 -0
- package/dist/src/Kernel/key-input.d.ts +50 -0
- package/dist/src/Kernel/key-input.js +155 -0
- package/dist/src/Kernel/mount.d.ts +186 -0
- package/dist/src/Kernel/mount.js +398 -0
- package/dist/src/Kernel/pipe.d.ts +6 -0
- package/dist/src/Kernel/pipe.js +70 -0
- package/dist/src/Kernel/regions.d.ts +64 -0
- package/dist/src/Kernel/regions.js +328 -0
- package/dist/src/Kernel/renderer.d.ts +25 -0
- package/dist/src/Kernel/renderer.js +142 -0
- package/dist/src/Kernel/splash.d.ts +35 -0
- package/dist/src/Kernel/splash.js +89 -0
- package/dist/src/Kernel/tui-kernel.d.ts +2 -0
- package/dist/src/Kernel/tui-kernel.js +614 -0
- package/dist/src/Routing/context.d.ts +46 -0
- package/dist/src/Routing/context.js +70 -0
- package/dist/src/Routing/registry.d.ts +21 -0
- package/dist/src/Routing/registry.js +158 -0
- package/dist/src/Routing/route.d.ts +46 -0
- package/dist/src/Routing/route.js +1 -0
- package/dist/src/Routing/router.d.ts +49 -0
- package/dist/src/Routing/router.js +127 -0
- package/dist/src/Routing/routes.d.ts +24 -0
- package/dist/src/Routing/routes.js +129 -0
- package/dist/src/Routing/tabs.d.ts +3 -0
- package/dist/src/Routing/tabs.js +57 -0
- package/dist/src/Screen/async-modal-screen.d.ts +26 -0
- package/dist/src/Screen/async-modal-screen.js +44 -0
- package/dist/src/Screen/async-screen.d.ts +102 -0
- package/dist/src/Screen/async-screen.js +266 -0
- package/dist/src/Screen/empty-overview.d.ts +9 -0
- package/dist/src/Screen/empty-overview.js +14 -0
- package/dist/src/Screen/full-screen.d.ts +1 -0
- package/dist/src/Screen/full-screen.js +3 -0
- package/dist/src/Screen/list-screen.d.ts +208 -0
- package/dist/src/Screen/list-screen.js +290 -0
- package/dist/src/Screen/modal-screen.d.ts +6 -0
- package/dist/src/Screen/modal-screen.js +2 -0
- package/dist/src/Screen/row-action.d.ts +17 -0
- package/dist/src/Screen/row-action.js +37 -0
- package/dist/src/Screen/screen.d.ts +258 -0
- package/dist/src/Screen/screen.js +34 -0
- package/dist/src/Statistics/client.d.ts +65 -0
- package/dist/src/Statistics/client.js +197 -0
- package/dist/src/Statistics/comparison-chart.d.ts +7 -0
- package/dist/src/Statistics/comparison-chart.js +525 -0
- package/dist/src/Statistics/dashboard.d.ts +93 -0
- package/dist/src/Statistics/dashboard.js +206 -0
- package/dist/src/Statistics/figures.d.ts +18 -0
- package/dist/src/Statistics/figures.js +162 -0
- package/dist/src/Statistics/member-stats.d.ts +58 -0
- package/dist/src/Statistics/member-stats.js +152 -0
- package/dist/src/Statistics/presentation.d.ts +8 -0
- package/dist/src/Statistics/presentation.js +36 -0
- package/dist/src/Statistics/screen.d.ts +49 -0
- package/dist/src/Statistics/screen.js +206 -0
- package/dist/src/Widget/action.d.ts +3 -0
- package/dist/src/Widget/action.js +9 -0
- package/dist/src/Widget/autocomplete.d.ts +3 -0
- package/dist/src/Widget/autocomplete.js +152 -0
- package/dist/src/Widget/chrome.d.ts +38 -0
- package/dist/src/Widget/chrome.js +60 -0
- package/dist/src/Widget/index.d.ts +5 -0
- package/dist/src/Widget/index.js +13 -0
- package/dist/src/Widget/multiselect.d.ts +3 -0
- package/dist/src/Widget/multiselect.js +40 -0
- package/dist/src/Widget/option-source.d.ts +69 -0
- package/dist/src/Widget/option-source.js +111 -0
- package/dist/src/Widget/render.d.ts +57 -0
- package/dist/src/Widget/render.js +149 -0
- package/dist/src/Widget/select.d.ts +3 -0
- package/dist/src/Widget/select.js +26 -0
- package/dist/src/Widget/text.d.ts +3 -0
- package/dist/src/Widget/text.js +112 -0
- package/dist/src/Widget/textarea.d.ts +45 -0
- package/dist/src/Widget/textarea.js +111 -0
- package/dist/src/Widget/types.d.ts +122 -0
- package/dist/src/Widget/types.js +21 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.js +10 -0
- package/dist/src/launcher.d.ts +103 -0
- package/dist/src/launcher.js +74 -0
- package/dist/src/lib/clipboard.d.ts +41 -0
- package/dist/src/lib/clipboard.js +65 -0
- package/dist/src/lib/cursor.d.ts +31 -0
- package/dist/src/lib/cursor.js +45 -0
- package/dist/src/lib/format.d.ts +32 -0
- package/dist/src/lib/format.js +99 -0
- package/dist/src/lib/hyperlink.d.ts +58 -0
- package/dist/src/lib/hyperlink.js +104 -0
- package/dist/src/lib/input-trace.d.ts +48 -0
- package/dist/src/lib/input-trace.js +47 -0
- package/dist/src/lib/jsonapi-error.d.ts +7 -0
- package/dist/src/lib/jsonapi-error.js +43 -0
- package/dist/src/lib/key-vocabulary.d.ts +19 -0
- package/dist/src/lib/key-vocabulary.js +25 -0
- package/dist/src/lib/markdown.d.ts +53 -0
- package/dist/src/lib/markdown.js +522 -0
- package/dist/src/lib/refresh-signal.d.ts +56 -0
- package/dist/src/lib/refresh-signal.js +85 -0
- package/dist/src/lib/repo-url.d.ts +12 -0
- package/dist/src/lib/repo-url.js +64 -0
- package/dist/src/lib/scroll.d.ts +1 -0
- package/dist/src/lib/scroll.js +16 -0
- package/dist/src/lib/theme.d.ts +59 -0
- package/dist/src/lib/theme.js +63 -0
- package/dist/src/lib/version.d.ts +5 -0
- package/dist/src/lib/version.js +46 -0
- package/dist/src/lib/vnode.d.ts +273 -0
- package/dist/src/lib/vnode.js +555 -0
- package/dist/src/lib/width-table.d.ts +4 -0
- package/dist/src/lib/width-table.js +147 -0
- package/dist/src/lib/width.d.ts +85 -0
- package/dist/src/lib/width.js +358 -0
- package/dist/src/plugin.d.ts +13 -0
- package/dist/src/plugin.js +91 -0
- package/dist/src/preset.d.ts +2 -0
- package/dist/src/preset.js +7 -0
- package/dist/src/react-experiment.d.ts +1 -0
- package/dist/src/react-experiment.js +7 -0
- package/dist/src/react-preset.d.ts +3 -0
- package/dist/src/react-preset.js +5 -0
- package/dist/src/route.d.ts +11 -0
- package/dist/src/route.js +249 -0
- package/dist/src/types.d.ts +372 -0
- package/dist/src/types.js +1 -0
- package/dist/src/ui.d.ts +19 -0
- package/dist/src/ui.js +15 -0
- package/package.json +33 -4
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// BB-375 — shared full-screen body helpers: optional filter badges.
|
|
2
|
+
// Body frame lives on region-body ScrollBox (Kernel/regions.ts).
|
|
3
|
+
import { BoxRenderable, h } from '@opentui/core';
|
|
4
|
+
import { BACKGROUND_ACTIVE, BORDER, DEFAULT_BACKGROUND, FOREGROUND, FOREGROUND_ACTIVE, textNode, } from '../../lib/vnode.js';
|
|
5
|
+
/**
|
|
6
|
+
* Rounded filter chips in a row (idle outline + active FOREGROUND_ACTIVE fg).
|
|
7
|
+
* Each badge is its own `borderStyle: 'rounded'` box — the panel border language.
|
|
8
|
+
* Horizontal inset matches the body ScrollBox frame padding (BB-375).
|
|
9
|
+
*/
|
|
10
|
+
export const filterBadgeStrip = (id, badges) => {
|
|
11
|
+
const nodes = [];
|
|
12
|
+
for (const [index, badge] of badges.entries()) {
|
|
13
|
+
if (index > 0) {
|
|
14
|
+
nodes.push(textNode({
|
|
15
|
+
id: `${id}-gap-${index}`,
|
|
16
|
+
content: ' ',
|
|
17
|
+
bg: DEFAULT_BACKGROUND,
|
|
18
|
+
fg: BORDER,
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
const value = badge.value;
|
|
22
|
+
const active = value !== undefined && value !== '';
|
|
23
|
+
const label = active ? value : badge.label;
|
|
24
|
+
nodes.push(h(BoxRenderable, {
|
|
25
|
+
id: `${id}-${badge.id}-chip`,
|
|
26
|
+
border: true,
|
|
27
|
+
borderStyle: 'rounded',
|
|
28
|
+
borderColor: BORDER,
|
|
29
|
+
backgroundColor: DEFAULT_BACKGROUND,
|
|
30
|
+
flexShrink: 0,
|
|
31
|
+
// One extra column of air inside the pill (rounder optical mass).
|
|
32
|
+
paddingLeft: 2,
|
|
33
|
+
paddingRight: 2,
|
|
34
|
+
flexDirection: 'row',
|
|
35
|
+
}, ...(active
|
|
36
|
+
? [
|
|
37
|
+
textNode({
|
|
38
|
+
id: `${id}-${badge.id}-key`,
|
|
39
|
+
content: `${badge.label.split(' ', 1)[0]} `,
|
|
40
|
+
bg: DEFAULT_BACKGROUND,
|
|
41
|
+
fg: FOREGROUND,
|
|
42
|
+
}),
|
|
43
|
+
]
|
|
44
|
+
: []), textNode({
|
|
45
|
+
id: `${id}-${badge.id}`,
|
|
46
|
+
content: label,
|
|
47
|
+
bg: active ? BACKGROUND_ACTIVE : DEFAULT_BACKGROUND,
|
|
48
|
+
fg: active ? FOREGROUND_ACTIVE : FOREGROUND,
|
|
49
|
+
})));
|
|
50
|
+
}
|
|
51
|
+
return h(BoxRenderable, {
|
|
52
|
+
id,
|
|
53
|
+
backgroundColor: DEFAULT_BACKGROUND,
|
|
54
|
+
flexDirection: 'column',
|
|
55
|
+
flexShrink: 0,
|
|
56
|
+
// Match body ScrollBox horizontal inset (BB-375).
|
|
57
|
+
paddingLeft: 1,
|
|
58
|
+
paddingRight: 1,
|
|
59
|
+
paddingTop: 0,
|
|
60
|
+
paddingBottom: 0,
|
|
61
|
+
}, h(BoxRenderable, {
|
|
62
|
+
id: `${id}-row`,
|
|
63
|
+
flexDirection: 'row',
|
|
64
|
+
flexWrap: 'wrap',
|
|
65
|
+
flexShrink: 0,
|
|
66
|
+
backgroundColor: DEFAULT_BACKGROUND,
|
|
67
|
+
gap: 0,
|
|
68
|
+
}, ...nodes));
|
|
69
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { type VNode } from '@opentui/core';
|
|
2
|
+
import type { MarkdownLine, MarkdownSpan } from '../../lib/markdown.js';
|
|
3
|
+
import { type StyledLine, type StyledRun } from '../../lib/vnode.js';
|
|
4
|
+
/**
|
|
5
|
+
* ONE SPAN AS THE RUN A RENDERER CAN PAINT — D7/D11, and the mapping this
|
|
6
|
+
* component owns.
|
|
7
|
+
*
|
|
8
|
+
* `bold`, `italic` and `dim` are ATTRIBUTES and OR together into one bitmask;
|
|
9
|
+
* `code` is a COLOUR and not an attribute at all, which is why a code span that
|
|
10
|
+
* is also emphasised carries both. The colour is {@link BORDER} (indexed, same
|
|
11
|
+
* slot as ordinary foreground after BB-375 dropped cyan) — never a truecolor
|
|
12
|
+
* triplet.
|
|
13
|
+
*
|
|
14
|
+
* `strikethrough` and `underline` are deliberately absent: underline is what a
|
|
15
|
+
* terminal hyperlink looks like and would collide with D6's `text (url)`, and
|
|
16
|
+
* `~~struck~~` is mapped onto `dim` rather than widening the wire vocabulary a
|
|
17
|
+
* second time for a construct bakers.build bodies barely use.
|
|
18
|
+
*/
|
|
19
|
+
export declare const styledRunOf: (span: MarkdownSpan) => StyledRun;
|
|
20
|
+
/**
|
|
21
|
+
* ONE PARSED LINE AS A NEUTRAL STYLED LINE.
|
|
22
|
+
*
|
|
23
|
+
* `text` is carried through UNTOUCHED — that is the pipe constraint in one line
|
|
24
|
+
* of code. The styling step may not change a glyph, and it cannot: it only ever
|
|
25
|
+
* reads a span's flags.
|
|
26
|
+
*/
|
|
27
|
+
export declare const styledLineOf: (line: MarkdownLine) => StyledLine;
|
|
28
|
+
/** A `bb_rich` body as the physical rows a surface draws or prints — D1. */
|
|
29
|
+
export declare function markdownLines(body: string): StyledLine[];
|
|
30
|
+
/** A line NOTHING parses — one unstyled run (D3's plain path, as a value). */
|
|
31
|
+
export declare function plainLine(text: string): StyledLine;
|
|
32
|
+
/**
|
|
33
|
+
* The same line held `columns` in from the left — D5.
|
|
34
|
+
*
|
|
35
|
+
* The indent is an unstyled run PREPENDED TO A RENDERED LINE, never four spaces
|
|
36
|
+
* prepended to the source — see this file's header for why that ordering is
|
|
37
|
+
* load-bearing rather than tidy.
|
|
38
|
+
*/
|
|
39
|
+
export declare function indentLine(source: StyledLine, columns: number): StyledLine;
|
|
40
|
+
/**
|
|
41
|
+
* THE RUN LOG'S OWN MINIMAL RULE — BB-372 D9, and it has exactly ONE caller:
|
|
42
|
+
* `Entity/run/Component/run-detail`.
|
|
43
|
+
*
|
|
44
|
+
* An ATX heading (`#`…`######`) renders as bold with the markers stripped;
|
|
45
|
+
* everything else is returned unchanged. Bullets, emphasis and code fences stay
|
|
46
|
+
* raw.
|
|
47
|
+
*
|
|
48
|
+
* ITS DOC COMMENT ONCE CLAIMED THE OPPOSITE OF WHAT IS NOW TRUE — that it is "ONE
|
|
49
|
+
* function, because every renderer of a body line goes through it". Since
|
|
50
|
+
* BB-372 no body line goes through it at all: a `bb_rich` body is rendered by
|
|
51
|
+
* {@link markdownLines} and reaches a row as a `StyledLine` (D3), and
|
|
52
|
+
* `Component/section-list`'s `sectionRows`/`expandableRows` do not parse a plain
|
|
53
|
+
* string.
|
|
54
|
+
*
|
|
55
|
+
* IT LIVED IN `Component/section-list` UNTIL D11 MOVED IT HERE. That was where it
|
|
56
|
+
* sat while it really was the rule for EVERY body row; once it was not, all it left
|
|
57
|
+
* behind was a Markdown rule inside a generic list primitive. The rule is unchanged,
|
|
58
|
+
* character for character; only its address is.
|
|
59
|
+
*
|
|
60
|
+
* The run log keeps the narrow rule DELIBERATELY, not by omission. A log entry is
|
|
61
|
+
* MACHINE OUTPUT, not authored Markdown: an agent line full of `*`, `_` and
|
|
62
|
+
* backticks would be re-styled and have characters deleted by a renderer meant
|
|
63
|
+
* for prose. Routing the log through the full subset is a separate ticket, not a
|
|
64
|
+
* silent side effect of this one.
|
|
65
|
+
*/
|
|
66
|
+
export declare function markdownRow(line: string): {
|
|
67
|
+
text: string;
|
|
68
|
+
bold: boolean;
|
|
69
|
+
};
|
|
70
|
+
export interface MarkdownProps {
|
|
71
|
+
id: string;
|
|
72
|
+
/** Markdown source, parsed with the production line/span parser. */
|
|
73
|
+
source: string;
|
|
74
|
+
width?: number;
|
|
75
|
+
}
|
|
76
|
+
export interface MarkdownLinesProps {
|
|
77
|
+
id: string;
|
|
78
|
+
/** Rows as {@link markdownLines} renders them. */
|
|
79
|
+
lines: readonly StyledLine[];
|
|
80
|
+
width?: number;
|
|
81
|
+
/** Brighter body copy — terminal cells have no font size. */
|
|
82
|
+
emphasis?: boolean;
|
|
83
|
+
}
|
|
84
|
+
/** Styled rows as one column of wrapped paragraphs, blank rows kept one high. */
|
|
85
|
+
export declare const MarkdownLines: ({ id, lines, width, emphasis, }: MarkdownLinesProps) => VNode;
|
|
86
|
+
/** A Markdown source, parsed and painted. */
|
|
87
|
+
export declare const Markdown: ({ id, source, width }: MarkdownProps) => VNode;
|
|
88
|
+
export interface HeadlineMarkdownProps {
|
|
89
|
+
id: string;
|
|
90
|
+
headline: string;
|
|
91
|
+
children: readonly VNode[];
|
|
92
|
+
paddingBottom?: number;
|
|
93
|
+
paddingLeft?: number;
|
|
94
|
+
/**
|
|
95
|
+
* The id the HEADLINE row carries — a selectable entry's row id, which the
|
|
96
|
+
* kernel scrolls to and binds clicks on. The headline text inside it owns
|
|
97
|
+
* {@link onMouseDown} and consumes the press.
|
|
98
|
+
*/
|
|
99
|
+
headlineId?: string;
|
|
100
|
+
onMouseDown?: () => void;
|
|
101
|
+
}
|
|
102
|
+
/** A `* headline` row above an indented body. */
|
|
103
|
+
export declare const HeadlineMarkdown: ({ id, headline, children, paddingBottom, paddingLeft, headlineId, onMouseDown, }: HeadlineMarkdownProps) => VNode;
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
// THE MARKDOWN COMPONENT — BB-372 D11, and the one place the cockpit knows
|
|
2
|
+
// what Markdown is.
|
|
3
|
+
//
|
|
4
|
+
// WHY IT EXISTS. Markdown arrived in this package as two halves that landed in
|
|
5
|
+
// two wrong places. `lib/markdown.ts` is a pure parser and belongs where it is,
|
|
6
|
+
// but the STYLING half — which span kind means which terminal attribute and which
|
|
7
|
+
// palette colour — ended up inside `lib/vnode.ts`, the package's most-shared
|
|
8
|
+
// render primitive, the one twelve screens draw through. `Component/section-list`
|
|
9
|
+
// then named `MarkdownLine`/`MarkdownSpan` throughout its own contract. So a
|
|
10
|
+
// generic node vocabulary and a generic list primitive both carried Markdown
|
|
11
|
+
// domain knowledge, and no gate caught it: `scripts/assert-acyclic.mjs` enforces
|
|
12
|
+
// PACKAGE layering, and both files live in `lib/`.
|
|
13
|
+
//
|
|
14
|
+
// THE SHAPE. This directory owns all of it, and the import direction inverts:
|
|
15
|
+
//
|
|
16
|
+
// Component/markdown → lib/vnode (attributes, palette, the neutral run)
|
|
17
|
+
// Component/markdown → lib/markdown (the pure parser, no @opentui/core)
|
|
18
|
+
// lib/vnode → nothing about Markdown
|
|
19
|
+
// Component/section-list → lib/vnode (StyledLine, never MarkdownLine)
|
|
20
|
+
//
|
|
21
|
+
// THE HARD CONSTRAINT, and the reason this is not a paint-only component: the
|
|
22
|
+
// non-interactive pipe prints `row.text` and NOTHING ELSE. AC-3's parity is
|
|
23
|
+
// structural precisely because a rendered row carries its rendered TEXT, so
|
|
24
|
+
// `bakers ui <id> | cat` and the interactive tree are the same rendering by
|
|
25
|
+
// construction rather than by agreement (D4). A component that emitted only
|
|
26
|
+
// VNodes would cut the pipe off that rendering and restore the
|
|
27
|
+
// two-renderers-disagree defect this ticket exists to remove. So the output here
|
|
28
|
+
// is DATA — a {@link StyledLine}: rendered text, resolved runs, and the row's own
|
|
29
|
+
// weight — and `Component/section-list`'s `lineText` keeps working unchanged.
|
|
30
|
+
//
|
|
31
|
+
// THE PAINTER sits here too (`Markdown`, `MarkdownLines`, `HeadlineMarkdown`):
|
|
32
|
+
// it turns those same styled rows into renderables, so there is one style rule
|
|
33
|
+
// for a body whether it is piped or drawn, and no second mapping of span kinds
|
|
34
|
+
// to colours anywhere else.
|
|
35
|
+
//
|
|
36
|
+
// WHY `plainLine` AND `indentLine` LIVE HERE rather than in the parser: neither
|
|
37
|
+
// parses. `plainLine` is D3's plain path expressed as a value, and `indentLine`
|
|
38
|
+
// prepends blanks to an ALREADY RENDERED line — which is the whole point of it
|
|
39
|
+
// (four leading spaces prepended to SOURCE would be an indented code block in
|
|
40
|
+
// CommonMark, so applying the indent after rendering is what makes that
|
|
41
|
+
// impossible rather than merely unlikely, Fact 9). Both are shell work on a
|
|
42
|
+
// rendered line, so they sit with the shell.
|
|
43
|
+
import { BoxRenderable, h } from '@opentui/core';
|
|
44
|
+
import { markdownLines as parseMarkdown } from '../../lib/markdown.js';
|
|
45
|
+
import { BOLD, BORDER, DIM, FOREGROUND, FOREGROUND_HIGHLIGHT, ITALIC, paragraphNode, plainRun, } from '../../lib/vnode.js';
|
|
46
|
+
/**
|
|
47
|
+
* ONE SPAN AS THE RUN A RENDERER CAN PAINT — D7/D11, and the mapping this
|
|
48
|
+
* component owns.
|
|
49
|
+
*
|
|
50
|
+
* `bold`, `italic` and `dim` are ATTRIBUTES and OR together into one bitmask;
|
|
51
|
+
* `code` is a COLOUR and not an attribute at all, which is why a code span that
|
|
52
|
+
* is also emphasised carries both. The colour is {@link BORDER} (indexed, same
|
|
53
|
+
* slot as ordinary foreground after BB-375 dropped cyan) — never a truecolor
|
|
54
|
+
* triplet.
|
|
55
|
+
*
|
|
56
|
+
* `strikethrough` and `underline` are deliberately absent: underline is what a
|
|
57
|
+
* terminal hyperlink looks like and would collide with D6's `text (url)`, and
|
|
58
|
+
* `~~struck~~` is mapped onto `dim` rather than widening the wire vocabulary a
|
|
59
|
+
* second time for a construct bakers.build bodies barely use.
|
|
60
|
+
*/
|
|
61
|
+
export const styledRunOf = (span) => ({
|
|
62
|
+
text: span.text,
|
|
63
|
+
attributes: (span.bold === true ? BOLD : 0) |
|
|
64
|
+
(span.italic === true ? ITALIC : 0) |
|
|
65
|
+
(span.dim === true ? DIM : 0),
|
|
66
|
+
// Spread rather than `fg: undefined`, for `exactOptionalPropertyTypes`: an
|
|
67
|
+
// unstyled run must state no colour, so `lib/vnode.ts`'s early exit can still
|
|
68
|
+
// hand the plain string straight to the renderable.
|
|
69
|
+
...(span.code === true ? { fg: BORDER } : {}),
|
|
70
|
+
});
|
|
71
|
+
/**
|
|
72
|
+
* ONE PARSED LINE AS A NEUTRAL STYLED LINE.
|
|
73
|
+
*
|
|
74
|
+
* `text` is carried through UNTOUCHED — that is the pipe constraint in one line
|
|
75
|
+
* of code. The styling step may not change a glyph, and it cannot: it only ever
|
|
76
|
+
* reads a span's flags.
|
|
77
|
+
*/
|
|
78
|
+
export const styledLineOf = (line) => ({
|
|
79
|
+
text: line.text,
|
|
80
|
+
runs: line.spans.map(styledRunOf),
|
|
81
|
+
heading: line.heading,
|
|
82
|
+
});
|
|
83
|
+
/** A `bb_rich` body as the physical rows a surface draws or prints — D1. */
|
|
84
|
+
export function markdownLines(body) {
|
|
85
|
+
return parseMarkdown(body).map(styledLineOf);
|
|
86
|
+
}
|
|
87
|
+
/** A line NOTHING parses — one unstyled run (D3's plain path, as a value). */
|
|
88
|
+
export function plainLine(text) {
|
|
89
|
+
return {
|
|
90
|
+
text,
|
|
91
|
+
runs: text === '' ? [] : [{ text, attributes: 0 }],
|
|
92
|
+
heading: false,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* The same line held `columns` in from the left — D5.
|
|
97
|
+
*
|
|
98
|
+
* The indent is an unstyled run PREPENDED TO A RENDERED LINE, never four spaces
|
|
99
|
+
* prepended to the source — see this file's header for why that ordering is
|
|
100
|
+
* load-bearing rather than tidy.
|
|
101
|
+
*/
|
|
102
|
+
export function indentLine(source, columns) {
|
|
103
|
+
const blanks = ' '.repeat(columns);
|
|
104
|
+
return {
|
|
105
|
+
text: `${blanks}${source.text}`,
|
|
106
|
+
runs: [{ text: blanks, attributes: 0 }, ...source.runs],
|
|
107
|
+
heading: source.heading,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* THE RUN LOG'S OWN MINIMAL RULE — BB-372 D9, and it has exactly ONE caller:
|
|
112
|
+
* `Entity/run/Component/run-detail`.
|
|
113
|
+
*
|
|
114
|
+
* An ATX heading (`#`…`######`) renders as bold with the markers stripped;
|
|
115
|
+
* everything else is returned unchanged. Bullets, emphasis and code fences stay
|
|
116
|
+
* raw.
|
|
117
|
+
*
|
|
118
|
+
* ITS DOC COMMENT ONCE CLAIMED THE OPPOSITE OF WHAT IS NOW TRUE — that it is "ONE
|
|
119
|
+
* function, because every renderer of a body line goes through it". Since
|
|
120
|
+
* BB-372 no body line goes through it at all: a `bb_rich` body is rendered by
|
|
121
|
+
* {@link markdownLines} and reaches a row as a `StyledLine` (D3), and
|
|
122
|
+
* `Component/section-list`'s `sectionRows`/`expandableRows` do not parse a plain
|
|
123
|
+
* string.
|
|
124
|
+
*
|
|
125
|
+
* IT LIVED IN `Component/section-list` UNTIL D11 MOVED IT HERE. That was where it
|
|
126
|
+
* sat while it really was the rule for EVERY body row; once it was not, all it left
|
|
127
|
+
* behind was a Markdown rule inside a generic list primitive. The rule is unchanged,
|
|
128
|
+
* character for character; only its address is.
|
|
129
|
+
*
|
|
130
|
+
* The run log keeps the narrow rule DELIBERATELY, not by omission. A log entry is
|
|
131
|
+
* MACHINE OUTPUT, not authored Markdown: an agent line full of `*`, `_` and
|
|
132
|
+
* backticks would be re-styled and have characters deleted by a renderer meant
|
|
133
|
+
* for prose. Routing the log through the full subset is a separate ticket, not a
|
|
134
|
+
* silent side effect of this one.
|
|
135
|
+
*/
|
|
136
|
+
export function markdownRow(line) {
|
|
137
|
+
const md = /^(#{1,6})\s+(.*)$/.exec(line);
|
|
138
|
+
return md ? { text: md[2] ?? '', bold: true } : { text: line, bold: false };
|
|
139
|
+
}
|
|
140
|
+
/** Collapse blank runs to one blank row and trim blank rows at either end. */
|
|
141
|
+
const compactLines = (lines) => {
|
|
142
|
+
const compacted = [];
|
|
143
|
+
for (const line of lines) {
|
|
144
|
+
if (line.text === '' && compacted.at(-1)?.text === '')
|
|
145
|
+
continue;
|
|
146
|
+
compacted.push(line);
|
|
147
|
+
}
|
|
148
|
+
while (compacted.at(0)?.text === '')
|
|
149
|
+
compacted.shift();
|
|
150
|
+
while (compacted.at(-1)?.text === '')
|
|
151
|
+
compacted.pop();
|
|
152
|
+
return compacted;
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* A row's runs as painted: a heading or an emphasised body is bold and
|
|
156
|
+
* highlighted, and a run's own colour (code) wins over both.
|
|
157
|
+
*/
|
|
158
|
+
const paintedRuns = (line, emphasis) => {
|
|
159
|
+
const strong = line.heading || emphasis;
|
|
160
|
+
return line.runs.map((run) => plainRun(run.text, run.attributes | (strong ? BOLD : 0), run.fg ?? (strong ? FOREGROUND_HIGHLIGHT : FOREGROUND)));
|
|
161
|
+
};
|
|
162
|
+
/** Styled rows as one column of wrapped paragraphs, blank rows kept one high. */
|
|
163
|
+
export const MarkdownLines = ({ id, lines, width, emphasis = false, }) => h(BoxRenderable, { id, flexDirection: 'column', width: width ?? '100%' },
|
|
164
|
+
// The rows of one body, in order: their position is their identity, and
|
|
165
|
+
// every row restates all of its props.
|
|
166
|
+
...compactLines(lines).map((line, index) => line.text === ''
|
|
167
|
+
? h(BoxRenderable, { id: `${id}-${index}`, height: 1 })
|
|
168
|
+
: paragraphNode({
|
|
169
|
+
id: `${id}-${index}`,
|
|
170
|
+
runs: paintedRuns(line, emphasis),
|
|
171
|
+
fg: FOREGROUND,
|
|
172
|
+
width: '100%',
|
|
173
|
+
flexShrink: 0,
|
|
174
|
+
})));
|
|
175
|
+
/** A Markdown source, parsed and painted. */
|
|
176
|
+
export const Markdown = ({ id, source, width }) => MarkdownLines({
|
|
177
|
+
id,
|
|
178
|
+
lines: markdownLines(source),
|
|
179
|
+
...(width === undefined ? {} : { width }),
|
|
180
|
+
});
|
|
181
|
+
/** A `* headline` row above an indented body. */
|
|
182
|
+
export const HeadlineMarkdown = ({ id, headline, children, paddingBottom = 1, paddingLeft = 1, headlineId, onMouseDown, }) => {
|
|
183
|
+
const row = headlineId ?? `${id}-headline`;
|
|
184
|
+
return h(BoxRenderable, {
|
|
185
|
+
id,
|
|
186
|
+
flexDirection: 'column',
|
|
187
|
+
width: '100%',
|
|
188
|
+
flexShrink: 0,
|
|
189
|
+
paddingBottom,
|
|
190
|
+
}, h(BoxRenderable, { id: row, flexDirection: 'row', flexShrink: 0 }, paragraphNode({
|
|
191
|
+
id: `${row}-text`,
|
|
192
|
+
runs: [plainRun(`* ${headline}`)],
|
|
193
|
+
fg: FOREGROUND,
|
|
194
|
+
width: '100%',
|
|
195
|
+
flexShrink: 0,
|
|
196
|
+
onMouseDown,
|
|
197
|
+
})), h(BoxRenderable, {
|
|
198
|
+
id: `${id}-body`,
|
|
199
|
+
flexDirection: 'column',
|
|
200
|
+
width: '100%',
|
|
201
|
+
flexShrink: 0,
|
|
202
|
+
paddingLeft,
|
|
203
|
+
}, ...children));
|
|
204
|
+
};
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import type { VNode } from '@opentui/core';
|
|
2
|
+
import { type Cell, type StyledLine, type StyledRun } from '../../lib/vnode.js';
|
|
3
|
+
/**
|
|
4
|
+
* A section body row that is COLUMNS rather than prose — BB-340 Task 13.
|
|
5
|
+
*
|
|
6
|
+
* The two producers are the dashboard's bars and the ticket detail's Runs
|
|
7
|
+
* table, and both used to compose their columns into one padded string with
|
|
8
|
+
* `lib/format.ts`'s `pad`. They describe their cells instead: the tree lays them
|
|
9
|
+
* out with Yoga budgets, and a surface with no layout — the pipe — prints
|
|
10
|
+
* {@link lineText}'s join. That is the operator-approved cost of retiring the
|
|
11
|
+
* padding, and it is what lets `pad` (and with it two of `lib/width.ts`'s
|
|
12
|
+
* consumers) go.
|
|
13
|
+
*/
|
|
14
|
+
export interface SectionCells {
|
|
15
|
+
readonly cells: readonly Cell[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* One body row of a section — BB-372 D3, where the third variant arrived.
|
|
19
|
+
*
|
|
20
|
+
* A body DECLARES ITSELF MARKDOWN; a plain string stays plain:
|
|
21
|
+
*
|
|
22
|
+
* - a `string` is PLAIN TEXT, rendered verbatim and **never parsed**;
|
|
23
|
+
* - a {@link SectionCells} is columns, unchanged (a run number opens with `#`);
|
|
24
|
+
* - a {@link StyledLine} is an ALREADY RENDERED body row, carrying its styled
|
|
25
|
+
* runs and its `heading` flag.
|
|
26
|
+
*
|
|
27
|
+
* BB-372 D11 — the third variant is NEUTRAL. It used to be `MarkdownLine`, which
|
|
28
|
+
* made this generic list primitive name a domain it does not own; a producer of
|
|
29
|
+
* styled rows is not necessarily a Markdown renderer, and `Component/markdown/` is
|
|
30
|
+
* where that domain lives now.
|
|
31
|
+
*
|
|
32
|
+
* That is what makes AC-5 STRUCTURAL rather than careful. `Assignment`, `Time`,
|
|
33
|
+
* `Branch`, `Links`, `Labels` and the run table hand over plain strings, so no
|
|
34
|
+
* Markdown rule can reach them — a branch called `feat/a_b_c` or a link title
|
|
35
|
+
* holding a `*` cannot be re-styled or re-spelled by a parser that never sees it.
|
|
36
|
+
* It is also strictly LESS parsing than before BB-372, when
|
|
37
|
+
* `Component/markdown/`'s `markdownRow` ran over every one of those rows.
|
|
38
|
+
*
|
|
39
|
+
* The rejected alternative was a block-aware pass inside {@link sectionRows} over
|
|
40
|
+
* `section.lines`, for exactly that reason: it would run the renderer over every
|
|
41
|
+
* non-Markdown section, and the flat `Comments` section would run one stateful
|
|
42
|
+
* pass across ALL comments' bodies, letting an unterminated fence in one comment
|
|
43
|
+
* swallow the next.
|
|
44
|
+
*/
|
|
45
|
+
export type SectionLine = string | SectionCells | StyledLine;
|
|
46
|
+
/**
|
|
47
|
+
* A line as the text a surface with no layout prints.
|
|
48
|
+
*
|
|
49
|
+
* The separator is ONE space because that is the gap `lib/vnode.ts`'s `rowNode`
|
|
50
|
+
* puts between two cells: the pipe and the tree then say the same thing about
|
|
51
|
+
* what separates two columns, and only the alignment inside a column is the
|
|
52
|
+
* renderer's own.
|
|
53
|
+
*
|
|
54
|
+
* BB-372 D4 — for a {@link StyledLine} this returns the RENDERED text, which is the
|
|
55
|
+
* whole of how parity is achieved: `SectionRow.text` carries it and the pipe
|
|
56
|
+
* prints exactly that, so `bakers ui <id> | cat` and the interactive tree are the
|
|
57
|
+
* same rendering by construction. The tree merely adds the attributes a pipe
|
|
58
|
+
* cannot carry. There is no raw-only pipe path left to disagree (AC-3).
|
|
59
|
+
*/
|
|
60
|
+
export declare const lineText: (line: SectionLine) => string;
|
|
61
|
+
/**
|
|
62
|
+
* Any body line as a RENDERED line — BB-372 D3/D8.
|
|
63
|
+
*
|
|
64
|
+
* A plain or columned row is LIFTED (one unparsed span) rather than refused,
|
|
65
|
+
* because a consumer that needs rendered lines — the collapsible Description
|
|
66
|
+
* entry, whose extract reads `line.heading` — is handed a `Description` section
|
|
67
|
+
* whose empty state is the plain string `No description.` Lifting never parses,
|
|
68
|
+
* so nothing here can re-introduce a Markdown rule on the plain path.
|
|
69
|
+
*/
|
|
70
|
+
export declare const styledOf: (line: SectionLine) => StyledLine;
|
|
71
|
+
/** A titled block of already-flattened physical rows. */
|
|
72
|
+
export interface Section {
|
|
73
|
+
heading: string;
|
|
74
|
+
lines: SectionLine[];
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* One flattened row: its text, whether it is bold, and WHICH ROW IT IS
|
|
78
|
+
* (BB-340 D3/D4).
|
|
79
|
+
*
|
|
80
|
+
* `key` is what a converted screen turns into its node's `props.id`, so a row
|
|
81
|
+
* has to be able to say what it is rather than where it sits. It is scoped by
|
|
82
|
+
* the section's own HEADING — `per-user-0`, never `row-14` — so a section keeps
|
|
83
|
+
* its keys when the section above it is absent. Two sections sharing a heading
|
|
84
|
+
* would collide, and `Kernel/mount.ts` refuses a repeated id loudly rather than
|
|
85
|
+
* patching one row's content onto another's node.
|
|
86
|
+
*/
|
|
87
|
+
export interface SectionRow {
|
|
88
|
+
readonly key: string;
|
|
89
|
+
readonly text: string;
|
|
90
|
+
readonly bold: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* The row's columns, when it has any — see {@link SectionCells}.
|
|
93
|
+
*
|
|
94
|
+
* `text` is the same row for a surface that cannot lay one out, so a consumer
|
|
95
|
+
* that only prints never has to know the difference; {@link sectionRowNode} is
|
|
96
|
+
* where the difference is made.
|
|
97
|
+
*/
|
|
98
|
+
readonly cells?: readonly Cell[];
|
|
99
|
+
/**
|
|
100
|
+
* The row's STYLED RUNS, for a row that carries per-run styling — BB-372
|
|
101
|
+
* D5/D11.
|
|
102
|
+
*
|
|
103
|
+
* Absent means everything is exactly as it was: one attribute set for the whole
|
|
104
|
+
* row. `text` is the same row for a surface that cannot paint a run, so the
|
|
105
|
+
* pipe never has to know the difference (D4). Already-resolved attributes and
|
|
106
|
+
* colours: WHICH run asks for which is `Component/markdown/`'s business, not
|
|
107
|
+
* this primitive's.
|
|
108
|
+
*/
|
|
109
|
+
readonly runs?: readonly StyledRun[];
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* A heading as an id fragment: `PER USER` → `per-user`.
|
|
113
|
+
*
|
|
114
|
+
* Exported because a tab that renders one of its sections as a COLLAPSIBLE entry
|
|
115
|
+
* has to key that entry the same way `sectionRows` keys a flat one — otherwise
|
|
116
|
+
* the same section would carry different node ids depending on which tab reached
|
|
117
|
+
* it, and `patchTree` would rebuild it instead of writing to it (BB-340 D4).
|
|
118
|
+
*/
|
|
119
|
+
export declare const sectionKey: (heading: string) => string;
|
|
120
|
+
/**
|
|
121
|
+
* The same, for a heading that is DATA rather than one of the built-in set —
|
|
122
|
+
* BB-373 AC-10.
|
|
123
|
+
*
|
|
124
|
+
* {@link sectionKey} is LOSSY: it lowercases and collapses every run of
|
|
125
|
+
* non-alphanumeric characters onto one `-`. That is injective over the closed
|
|
126
|
+
* built-in headings (`Per user`, `Latest summary`), and it stops being injective
|
|
127
|
+
* the moment a contributed panel heads its sections with whatever it is
|
|
128
|
+
* listing. The shipped artifacts viewer heads them with paths under the ticket's
|
|
129
|
+
* tree, so `/`, `.` and `-` all land on the same character and two ordinary
|
|
130
|
+
* captures collapse onto one key:
|
|
131
|
+
*
|
|
132
|
+
* playwright/logs/walk.txt -> playwright-logs-walk-txt
|
|
133
|
+
* playwright/logs-walk.txt -> playwright-logs-walk-txt
|
|
134
|
+
*
|
|
135
|
+
* A key is an IDENTITY — `Kernel/mount.ts` refuses a repeated id, and it refuses
|
|
136
|
+
* it while MOUNTING, past the host's guard around `panel.sections()` and on a
|
|
137
|
+
* draw path with no `catch` — so a lossy key is not a cosmetic collision, it is
|
|
138
|
+
* the cockpit going down on a message naming neither the addon nor the file.
|
|
139
|
+
*
|
|
140
|
+
* SO THE SEPARATORS ARE ENCODED RATHER THAN COLLAPSED. Every UTF-8 byte outside
|
|
141
|
+
* `[a-z0-9]` becomes `_<hex>`, two digits, lower case. The escape has a fixed
|
|
142
|
+
* length and `_` is itself escaped (`_5f`), so the mapping is reversible and
|
|
143
|
+
* therefore injective — including over case (`README.txt` and `readme.txt` are
|
|
144
|
+
* two files on this filesystem) and over a heading that already looks like an
|
|
145
|
+
* escape.
|
|
146
|
+
*
|
|
147
|
+
* WHY THE OUTPUT CARRIES NO `-`, which is a second property and not a side
|
|
148
|
+
* effect. A key never becomes an id on its own: it is always suffixed
|
|
149
|
+
* (`-heading`, `-gap`, `-empty`, `-header`, `-<index>`). Injectivity of the key
|
|
150
|
+
* alone would not settle the id, because the suffix boundary would be
|
|
151
|
+
* ambiguous — with `-` allowed inside a key, section `a` at body index 12 and
|
|
152
|
+
* section `a-1` at body index 2 would both be `a-12`. With no `-` inside a key
|
|
153
|
+
* the first `-` after the screen's own prefix always ends the key, so a key and
|
|
154
|
+
* its suffix are both recovered from an id and two ids can only be equal when
|
|
155
|
+
* both halves are. Within one section the suffixes are distinct by construction:
|
|
156
|
+
* the indices are digits and the four literals are not.
|
|
157
|
+
*
|
|
158
|
+
* NOT THE BUILT-IN PATH. `sectionRows` and the ticket detail's tabs keep
|
|
159
|
+
* {@link sectionKey} as their default, so no built-in node id moves (AC-2) — a
|
|
160
|
+
* `_` in a key is exactly the mark of a heading that came from a contribution.
|
|
161
|
+
*
|
|
162
|
+
* WHAT THIS STILL DOES NOT FIX, said plainly: two panel sections carrying the
|
|
163
|
+
* SAME heading. No injective map over headings can separate two identical
|
|
164
|
+
* headings, so that case remains the loud refusal it is today. It is out of
|
|
165
|
+
* scope for BB-373 and belongs to whatever gives a panel section an identity
|
|
166
|
+
* distinct from its title.
|
|
167
|
+
*/
|
|
168
|
+
export declare const panelSectionKey: (heading: string) => string;
|
|
169
|
+
/**
|
|
170
|
+
* Flatten `{heading, lines}` sections into KEYED rows: the heading, its body,
|
|
171
|
+
* and the blank line that closes the section.
|
|
172
|
+
*
|
|
173
|
+
* The one description of what a section renders as. {@link flattenSections}
|
|
174
|
+
* derives the row surface from it and a converted screen derives its nodes from
|
|
175
|
+
* it, so the two cannot answer differently for the same document — which is the
|
|
176
|
+
* property that lets Stats hand over renderables while its pipe keeps
|
|
177
|
+
* emitting the bytes it always did (spec F5).
|
|
178
|
+
*/
|
|
179
|
+
export declare function sectionRows(sections: Section[], keyOf?: (heading: string) => string): SectionRow[];
|
|
180
|
+
/**
|
|
181
|
+
* One flattened row as the node a converted screen hands over — BB-340 D1.
|
|
182
|
+
*
|
|
183
|
+
* The ONE place a `SectionRow` becomes a renderable, so the two screens that
|
|
184
|
+
* render section rows (the dashboard and the ticket detail's tabs) cannot
|
|
185
|
+
* disagree about what a columned row looks like. `prefix` is the screen's own
|
|
186
|
+
* body id, which is what keeps two screens' rows apart in one tree.
|
|
187
|
+
*/
|
|
188
|
+
export declare const sectionRowNode: (prefix: string, row: SectionRow, selected?: boolean) => VNode;
|
|
189
|
+
export declare function flattenSections(sections: Section[]): {
|
|
190
|
+
lines: string[];
|
|
191
|
+
boldRows: Set<number>;
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* One collapsible entry: a caret header row plus the rows shown in each state.
|
|
195
|
+
*
|
|
196
|
+
* BB-255 D2: the Comments tab's collapse/expand interaction and the Overview
|
|
197
|
+
* tab's Description are ONE primitive rather than two renderers that happen to
|
|
198
|
+
* agree — AC-2 asks for "the same expand interaction the Comments tab offers",
|
|
199
|
+
* and structural sharing is the only form of that claim a test can hold.
|
|
200
|
+
*/
|
|
201
|
+
export interface ExpandableEntry {
|
|
202
|
+
/**
|
|
203
|
+
* What this entry IS, as an id fragment (BB-340 D4/R4) — a comment's uuid,
|
|
204
|
+
* a section's slug. Its rows are keyed under it, so an entry's content and its
|
|
205
|
+
* identity move together when the list re-sorts.
|
|
206
|
+
*/
|
|
207
|
+
key: string;
|
|
208
|
+
/** The header row's text, after the caret. */
|
|
209
|
+
header: string;
|
|
210
|
+
/**
|
|
211
|
+
* Rows shown while collapsed (indented like the expanded body).
|
|
212
|
+
*
|
|
213
|
+
* BB-372 D3 — a {@link SectionLine}, so a rendered body row keeps its runs
|
|
214
|
+
* on this surface too and a plain string is still never parsed.
|
|
215
|
+
*/
|
|
216
|
+
collapsed: SectionLine[];
|
|
217
|
+
/** Rows shown while expanded. */
|
|
218
|
+
expanded: SectionLine[];
|
|
219
|
+
}
|
|
220
|
+
/** The rendered rows of a list of expandable entries. */
|
|
221
|
+
export interface ExpandableView {
|
|
222
|
+
rows: SectionRow[];
|
|
223
|
+
/** `headerRows[i]` is the row index of entry i's header — the selection map. */
|
|
224
|
+
headerRows: number[];
|
|
225
|
+
selectable: number;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Expandable entries as KEYED rows: one caret header row per entry (`▸`
|
|
229
|
+
* collapsed, `▾` expanded) followed by that state's rows. `headerRows[i]` is
|
|
230
|
+
* entry i's header row, which is both the highlight target and the click map
|
|
231
|
+
* (the rows are NOT uniformly spaced — an expanded entry appends its body).
|
|
232
|
+
*
|
|
233
|
+
* Zero entries render `emptyMessage` and nothing selectable, so an empty list is
|
|
234
|
+
* an explicit statement rather than a blank screen.
|
|
235
|
+
*
|
|
236
|
+
* BB-340 D1/D3 — rows rather than lines-plus-a-`boldRows`-set, and the two
|
|
237
|
+
* halves of that are the same change: the caller turns each row into a node, so
|
|
238
|
+
* "this row is a heading" is a prop on the node and no longer an index into a
|
|
239
|
+
* surface somebody else styles. `SectionRow` is the shape {@link sectionRows}
|
|
240
|
+
* already produces, so a tab that mixes flat sections with expandable ones has
|
|
241
|
+
* one row type rather than two.
|
|
242
|
+
*/
|
|
243
|
+
export declare function expandableRows(entries: ExpandableEntry[], { expanded, emptyMessage, emptyKey, }: {
|
|
244
|
+
expanded?: ReadonlySet<number>;
|
|
245
|
+
emptyMessage: string;
|
|
246
|
+
emptyKey: string;
|
|
247
|
+
}): ExpandableView;
|