rvlib-shipkit 2.26.0 → 2.27.0
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/CHANGELOG.md +20 -0
- package/package.json +1 -1
- package/src/agent-time/diet.ts +77 -0
- package/src/agent-time/family.ts +72 -0
- package/src/agent-time/hooks.ts +6 -4
- package/src/agent-time/limits.ts +44 -0
- package/src/agent-time/live.ts +1 -3
- package/src/agent-time/mask.ts +96 -18
- package/src/agent-time/refused.ts +45 -0
- package/src/agent-time/render.ts +122 -21
- package/src/agent-time/report-cache.ts +57 -0
- package/src/agent-time/report.ts +314 -40
- package/src/agent-time/shape.ts +50 -3
- package/src/agent-time/store.ts +320 -99
- package/src/agent-time/timeline.ts +140 -21
- package/src/agent-time/turns.ts +18 -8
- package/src/annex/offload.ts +17 -6
- package/src/annex/tidy.ts +70 -10
- package/src/asks/ask-after.ts +40 -0
- package/src/asks/asks-queue.ts +205 -47
- package/src/assets/kit-config.ts +7 -3
- package/src/assets/kits/identity-kit.ts +289 -10
- package/src/check.ts +3 -1
- package/src/checks/SK004-gitignore-policy.check.ts +12 -5
- package/src/checks/SK013-one-way-in-policy.check.ts +8 -3
- package/src/checks/SK026-asks-autoclose.check.ts +5 -5
- package/src/checks/SK028-readme.check.ts +7 -66
- package/src/checks/SK030-cache-audit.check.ts +6 -1
- package/src/checks/SK031-trace-audit.check.ts +2 -0
- package/src/checks/SK033-global-contribution.check.ts +3 -1
- package/src/checks/SK035-public-clean.check.ts +2 -2
- package/src/checks/SK043-scratch-on-the-mac.check.ts +59 -4
- package/src/checks/SK047-login-in-description.check.ts +36 -0
- package/src/checks/SK048-one-local-file.check.ts +36 -0
- package/src/cli/cmd_Asks.ts +71 -5
- package/src/cli/cmd_Backup.ts +2 -2
- package/src/cli/cmd_Capacity.ts +2 -2
- package/src/cli/cmd_CrossRepoActivity.ts +5 -4
- package/src/cli/cmd_Db.ts +253 -0
- package/src/cli/cmd_History.ts +212 -0
- package/src/cli/cmd_Home.ts +31 -3
- package/src/cli/cmd_Hq.ts +516 -0
- package/src/cli/cmd_Machines.ts +36 -0
- package/src/cli/cmd_Media.ts +38 -6
- package/src/cli/cmd_Reflect.ts +23 -2
- package/src/cli/cmd_Review.ts +548 -116
- package/src/cli/cmd_Secret.ts +62 -12
- package/src/cli/cmd_Social.ts +83 -1
- package/src/cli/cmd_Space.ts +324 -0
- package/src/cli/cmd_Time.ts +76 -5
- package/src/cli/cmd_Tmp.ts +28 -4
- package/src/cli/cmd_Trailer.ts +14 -10
- package/src/cli/cmd_Urls.ts +56 -0
- package/src/cli/cmd_Vault.ts +583 -0
- package/src/cli/family-help.ts +4 -2
- package/src/cli/family-pages.ts +1 -1
- package/src/cli/registry.ts +24 -3
- package/src/collections/actions.ts +63 -13
- package/src/collections/collection-types.ts +23 -1
- package/src/collections/providers.ts +117 -23
- package/src/collections/review.ts +4 -4
- package/src/contracts/contract-manifests.ts +6 -5
- package/src/contracts/contract-types.ts +6 -4
- package/src/contracts/contracts-engine.ts +11 -0
- package/src/contracts/manifests/chrome-web-store.contract.ts +31 -0
- package/src/core/budget.ts +12 -17
- package/src/core/capacity.ts +27 -18
- package/src/core/check-runner.ts +7 -4
- package/src/core/layout.ts +3 -0
- package/src/core/machine-busy.ts +127 -0
- package/src/core/machine-commit.ts +6 -1
- package/src/core/machine-db.ts +368 -20
- package/src/core/machine-layout.ts +137 -0
- package/src/core/machine-read.ts +81 -0
- package/src/core/migrate-layout.ts +1 -1
- package/src/core/one-way-in-policy.ts +64 -7
- package/src/core/polling-policy.ts +27 -0
- package/src/core/retention.ts +16 -2
- package/src/core/scope.ts +107 -14
- package/src/core/slots.ts +5 -4
- package/src/drill/clean.ts +25 -1
- package/src/drill/run.ts +1 -1
- package/src/drill/seal.ts +27 -4
- package/src/home/activity-shape.ts +2 -0
- package/src/home/activity.ts +66 -3
- package/src/home/app-sign.ts +15 -4
- package/src/home/daemon-jobs.ts +149 -7
- package/src/home/database-projects.ts +111 -0
- package/src/home/database-words.ts +203 -0
- package/src/home/databases.ts +460 -0
- package/src/home/global-units.ts +6 -0
- package/src/home/gui-app/ShipkitGui.swift +122 -1
- package/src/home/gui-app.ts +6 -3
- package/src/home/home-move.ts +514 -0
- package/src/home/home-paths.ts +12 -3
- package/src/home/home-routes.ts +68 -0
- package/src/home/inbox-shape.ts +24 -14
- package/src/home/machine-fold.ts +820 -0
- package/src/home/machine-host.ts +20 -5
- package/src/home/machine-repair.ts +503 -0
- package/src/home/machine-stores.ts +66 -15
- package/src/home/machine-temp.ts +547 -86
- package/src/home/resume.ts +79 -0
- package/src/home/run-daemon.ts +25 -4
- package/src/home/run-pm.ts +18 -5
- package/src/home/serve-daemon.ts +18 -3
- package/src/home/serve-web.ts +175 -7
- package/src/home/space-job.ts +115 -0
- package/src/home/space-page.ts +257 -0
- package/src/home/space-route.ts +167 -0
- package/src/home/space-words.ts +103 -0
- package/src/home/time-page-shape.ts +202 -0
- package/src/home/time-page.ts +64 -0
- package/src/home/vault-page.ts +482 -0
- package/src/home/vault-words.ts +132 -0
- package/src/hooks/leak-guard.ts +40 -13
- package/src/hooks/one-way-in-guard.ts +17 -4
- package/src/hq/cards.ts +581 -0
- package/src/hq/door-route.ts +43 -0
- package/src/hq/door.ts +163 -0
- package/src/hq/files-send.ts +348 -0
- package/src/hq/forgotten-log.ts +35 -0
- package/src/hq/history-check.ts +255 -0
- package/src/hq/history-place.ts +146 -0
- package/src/hq/history-send.ts +487 -0
- package/src/hq/hq-db.ts +99 -0
- package/src/hq/hq-local.ts +469 -0
- package/src/hq/hq-routes.ts +196 -0
- package/src/hq/hq-store.ts +599 -0
- package/src/hq/kinds/ask.ts +147 -0
- package/src/hq/kinds/card-gone.ts +83 -0
- package/src/hq/kinds/card-msg.ts +66 -0
- package/src/hq/kinds/card.ts +99 -0
- package/src/hq/kinds/index.ts +21 -0
- package/src/hq/kinds/kind.ts +126 -0
- package/src/hq/kinds/media.ts +125 -0
- package/src/hq/kinds/prompt.ts +219 -0
- package/src/hq/kinds/reflection.ts +128 -0
- package/src/hq/kinds/report.ts +55 -0
- package/src/hq/kinds/time-day.ts +236 -0
- package/src/hq/ledger.ts +473 -0
- package/src/hq/machine-key.ts +44 -0
- package/src/hq/machine-notes.ts +131 -0
- package/src/hq/outbox.ts +372 -0
- package/src/hq/replica.ts +168 -0
- package/src/hq/repo-id.ts +4 -0
- package/src/hq/report-facts.ts +117 -0
- package/src/hq/report.ts +274 -0
- package/src/hq/switch.ts +151 -0
- package/src/hq/vault-grant.ts +92 -0
- package/src/identities/identities.ts +15 -3
- package/src/identities/steps.ts +31 -0
- package/src/ledger/db.ts +73 -26
- package/src/ledger/gate-checks.ts +6 -2
- package/src/ledger/run-log.ts +11 -3
- package/src/ledger/store.ts +26 -4
- package/src/media-store/backup/daemon.ts +25 -17
- package/src/media-store/backup/kept.ts +241 -0
- package/src/media-store/backup/restore.ts +14 -4
- package/src/media-store/backup/run.ts +11 -11
- package/src/media-store/backup/secret.ts +6 -4
- package/src/media-store/backup/snapshot.ts +4 -2
- package/src/media-store/backup/sources.ts +67 -16
- package/src/media-store/copy/config.ts +77 -0
- package/src/media-store/copy/copy.ts +194 -0
- package/src/media-store/copy/lifecycle.ts +43 -0
- package/src/media-store/copy/night.ts +90 -0
- package/src/media-store/copy/proof.ts +151 -0
- package/src/media-store/copy/snapshot.ts +152 -0
- package/src/media-store/copy/store.ts +62 -0
- package/src/media-store/copy/stream.ts +176 -0
- package/src/media-store/daemon.ts +66 -16
- package/src/media-store/db.ts +22 -11
- package/src/media-store/forget.ts +23 -3
- package/src/media-store/hand.ts +4 -3
- package/src/media-store/hq-find.ts +75 -0
- package/src/media-store/hq-send.ts +277 -0
- package/src/media-store/kind.ts +2 -0
- package/src/media-store/purge.ts +18 -15
- package/src/media-store/put.ts +24 -8
- package/src/media-store/remote.ts +16 -7
- package/src/media-store/space-listing.ts +240 -0
- package/src/media-store/space.ts +40 -21
- package/src/media-store/sync.ts +5 -5
- package/src/media-store/tidy.ts +98 -0
- package/src/media-store/upload.ts +3 -3
- package/src/media-store/webp.ts +66 -0
- package/src/messages/model.ts +16 -7
- package/src/messages/routes.ts +14 -4
- package/src/messages/score.ts +2 -2
- package/src/messages/suggest.ts +96 -0
- package/src/pages/frame-client.ts +10 -0
- package/src/plan/planner.ts +28 -17
- package/src/recordings/media-kind.ts +1 -0
- package/src/recordings/model.ts +1 -1
- package/src/recordings/recorder-app/Capture.swift +9 -7
- package/src/reflect/hq-corpus.ts +56 -0
- package/src/reflect/prompt-corpus.ts +3 -1
- package/src/reflect/transcript.ts +129 -37
- package/src/release/machine-words.ts +67 -0
- package/src/release/public-clean.ts +8 -3
- package/src/releases/from-card.ts +1 -1
- package/src/releases/routes.ts +10 -5
- package/src/releases/store.ts +10 -1
- package/src/repo-config.ts +32 -2
- package/src/review/anim.ts +2 -2
- package/src/review/auto.ts +2 -2
- package/src/review/card-db.ts +244 -0
- package/src/review/card-rows.ts +266 -0
- package/src/review/cells.ts +76 -5
- package/src/review/draft-card.ts +41 -0
- package/src/review/draft-model.ts +78 -0
- package/src/review/format.ts +29 -10
- package/src/review/gone.ts +98 -0
- package/src/review/inbox-hook.ts +4 -4
- package/src/review/marks.ts +1 -1
- package/src/review/media-kind.ts +7 -5
- package/src/review/media-read.ts +9 -7
- package/src/review/media.ts +32 -5
- package/src/review/model.ts +202 -39
- package/src/review/move.ts +491 -0
- package/src/review/notes.ts +12 -20
- package/src/review/previews.ts +15 -19
- package/src/review/project.ts +1 -1
- package/src/review/rev.ts +8 -0
- package/src/review/role.ts +1 -1
- package/src/review/routes.ts +64 -13
- package/src/review/stage-card.ts +8 -4
- package/src/review/stage-routes.ts +1 -1
- package/src/review/store.ts +529 -83
- package/src/review/thread-fold.ts +51 -0
- package/src/review/threads.ts +147 -9
- package/src/review/trailer-auto-mock.ts +63 -0
- package/src/review/trailer-card.ts +4 -4
- package/src/review/trailer-desk.ts +41 -7
- package/src/review/trailer-media.ts +1 -0
- package/src/review/trailer-model.ts +8 -0
- package/src/review/trailer-notes.ts +1 -1
- package/src/review/trailer-routes.ts +9 -1
- package/src/review/unit.ts +6 -6
- package/src/review/watchers.ts +1 -1
- package/src/rules/untrack-generated.ts +92 -8
- package/src/secrets/held.ts +16 -0
- package/src/secrets/keychain.ts +113 -0
- package/src/secrets/list.ts +16 -6
- package/src/secrets/manager.ts +24 -10
- package/src/secrets/read.ts +257 -0
- package/src/secrets/who-reads.ts +49 -0
- package/src/serve/door-forward.ts +268 -0
- package/src/serve/door-names.ts +47 -0
- package/src/serve/embed.ts +1 -1
- package/src/serve/hub-app/activity-view.tsx +56 -32
- package/src/serve/hub-app/activity.css +7 -1
- package/src/serve/hub-app/asks-page.tsx +48 -0
- package/src/serve/hub-app/asks-st.ts +25 -0
- package/src/serve/hub-app/clock-svc.ts +1 -2
- package/src/serve/hub-app/col-card.tsx +64 -13
- package/src/serve/hub-app/col-list-page.tsx +122 -0
- package/src/serve/hub-app/col-list-st.ts +103 -0
- package/src/serve/hub-app/col-tables-view.tsx +10 -41
- package/src/serve/hub-app/col-tables.ts +76 -8
- package/src/serve/hub-app/cols-svc.ts +70 -16
- package/src/serve/hub-app/database-st.ts +260 -0
- package/src/serve/hub-app/database-view.tsx +289 -0
- package/src/serve/hub-app/database.css +32 -0
- package/src/serve/hub-app/entry-bar.css +14 -0
- package/src/serve/hub-app/entry-bar.tsx +33 -0
- package/src/serve/hub-app/entry-pick.ts +31 -0
- package/src/serve/hub-app/floating.tsx +1 -0
- package/src/serve/hub-app/hash-route.ts +11 -1
- package/src/serve/hub-app/header-bar.tsx +14 -18
- package/src/serve/hub-app/home-st.ts +89 -9
- package/src/serve/hub-app/home-strip.css +5 -19
- package/src/serve/hub-app/home-strip.tsx +58 -92
- package/src/serve/hub-app/home.html +7 -0
- package/src/serve/hub-app/hub-app.tsx +31 -142
- package/src/serve/hub-app/hub-types.ts +3 -1
- package/src/serve/hub-app/hub.css +109 -23
- package/src/serve/hub-app/icons.tsx +18 -1
- package/src/serve/hub-app/identities-st.ts +56 -6
- package/src/serve/hub-app/identities-view.tsx +100 -58
- package/src/serve/hub-app/identities.css +17 -15
- package/src/serve/hub-app/identity-address.ts +5 -0
- package/src/serve/hub-app/inbox-st.ts +41 -24
- package/src/serve/hub-app/inbox-view.tsx +37 -41
- package/src/serve/hub-app/inbox.css +2 -5
- package/src/serve/hub-app/index.html +7 -0
- package/src/serve/hub-app/kept-cols.tsx +7 -0
- package/src/serve/hub-app/keys.ts +28 -15
- package/src/serve/hub-app/later.tsx +26 -0
- package/src/serve/hub-app/list-filter.tsx +14 -0
- package/src/serve/hub-app/list-walk.ts +72 -3
- package/src/serve/hub-app/machines-st.ts +251 -0
- package/src/serve/hub-app/machines-view.tsx +224 -0
- package/src/serve/hub-app/machines.css +76 -0
- package/src/serve/hub-app/md-copy.tsx +79 -0
- package/src/serve/hub-app/media-view.tsx +2 -0
- package/src/serve/hub-app/messages/messages-page.tsx +79 -7
- package/src/serve/hub-app/messages/messages-st.ts +99 -3
- package/src/serve/hub-app/messages.css +14 -0
- package/src/serve/hub-app/page-keys.ts +175 -0
- package/src/serve/hub-app/pages-frames.tsx +11 -3
- package/src/serve/hub-app/palette-st.ts +58 -11
- package/src/serve/hub-app/palette-view.tsx +3 -1
- package/src/serve/hub-app/project-list.css +54 -8
- package/src/serve/hub-app/project-list.tsx +128 -59
- package/src/serve/hub-app/projects-svc.ts +78 -7
- package/src/serve/hub-app/reader-chips.tsx +13 -0
- package/src/serve/hub-app/readme-view.tsx +2 -3
- package/src/serve/hub-app/readme.css +27 -5
- package/src/serve/hub-app/reflections-page.tsx +42 -0
- package/src/serve/hub-app/reflections-st.ts +17 -0
- package/src/serve/hub-app/releases/releases-page.tsx +25 -2
- package/src/serve/hub-app/releases/releases-st.ts +1 -1
- package/src/serve/hub-app/repo-sections.ts +9 -5
- package/src/serve/hub-app/repo-st.ts +35 -8
- package/src/serve/hub-app/review/draft-card.tsx +163 -0
- package/src/serve/hub-app/review/kit.tsx +50 -7
- package/src/serve/hub-app/review/note-place.ts +1 -1
- package/src/serve/hub-app/review/review-board.tsx +2 -2
- package/src/serve/hub-app/review/review-cells.tsx +145 -65
- package/src/serve/hub-app/review/review-kit.ts +27 -1
- package/src/serve/hub-app/review/review-list.tsx +68 -30
- package/src/serve/hub-app/review/review-page.tsx +7 -8
- package/src/serve/hub-app/review/review-st.ts +111 -24
- package/src/serve/hub-app/review/review-thread.tsx +49 -19
- package/src/serve/hub-app/review/review-views.tsx +475 -144
- package/src/serve/hub-app/review/thread-control-st.ts +115 -0
- package/src/serve/hub-app/review/thread-control.tsx +74 -0
- package/src/serve/hub-app/review/thread-st.ts +73 -26
- package/src/serve/hub-app/review/trailer-card.tsx +1 -1
- package/src/serve/hub-app/review/trailer-page.tsx +37 -16
- package/src/serve/hub-app/review/trailer-st.ts +41 -7
- package/src/serve/hub-app/review.css +267 -61
- package/src/serve/hub-app/side-lists.ts +72 -0
- package/src/serve/hub-app/sidebar.tsx +6 -3
- package/src/serve/hub-app/site/site-part.tsx +2 -8
- package/src/serve/hub-app/site/site-st.ts +4 -4
- package/src/serve/hub-app/social/comms-page.tsx +20 -5
- package/src/serve/hub-app/social/kit.tsx +30 -4
- package/src/serve/hub-app/social/post-card.tsx +139 -49
- package/src/serve/hub-app/social/serial-writes.ts +13 -0
- package/src/serve/hub-app/social/social-model.ts +11 -0
- package/src/serve/hub-app/social/social-page.tsx +94 -35
- package/src/serve/hub-app/social/social-st.ts +120 -36
- package/src/serve/hub-app/social/stage-popup.tsx +1 -1
- package/src/serve/hub-app/social/stage-st.ts +1 -1
- package/src/serve/hub-app/social/step-layout.ts +1 -1
- package/src/serve/hub-app/social.css +3 -0
- package/src/serve/hub-app/space-st.ts +209 -0
- package/src/serve/hub-app/space-view.tsx +196 -0
- package/src/serve/hub-app/space.css +27 -0
- package/src/serve/hub-app/stores/stores-page.tsx +91 -23
- package/src/serve/hub-app/stores/stores-st.ts +44 -19
- package/src/serve/hub-app/stores.css +6 -1
- package/src/serve/hub-app/theme-st.ts +22 -9
- package/src/serve/hub-app/time-charts.tsx +291 -0
- package/src/serve/hub-app/time-pages.tsx +749 -0
- package/src/serve/hub-app/time-st.ts +162 -0
- package/src/serve/hub-app/time-view.tsx +76 -0
- package/src/serve/hub-app/time.css +138 -0
- package/src/serve/hub-app/tree-build.ts +52 -42
- package/src/serve/hub-app/tree-row.tsx +4 -4
- package/src/serve/hub-app/tree-svc.ts +18 -9
- package/src/serve/hub-app/urls-svc.ts +154 -0
- package/src/serve/hub-app/urls-view.tsx +117 -0
- package/src/serve/hub-app/urls.css +30 -0
- package/src/serve/hub-app/vault-st.ts +127 -0
- package/src/serve/hub-app/vault-view.tsx +154 -0
- package/src/serve/hub-app/vault.css +38 -0
- package/src/serve/hub-app/veille/veille-st.ts +12 -10
- package/src/serve/hub-app/waiting-svc.ts +29 -0
- package/src/serve/hub-app/wikis-view.tsx +2 -2
- package/src/serve/hub-runtime.ts +15 -2
- package/src/serve/project-gutter-route.ts +27 -14
- package/src/serve/project-gutter.ts +25 -12
- package/src/serve/same-origin.ts +10 -0
- package/src/serve/serve-hub.ts +13 -4
- package/src/shipkit-files.ts +16 -2
- package/src/shipkit.ts +1 -1
- package/src/shot/shooter.ts +616 -420
- package/src/shot/shot-ask.ts +246 -155
- package/src/site/desk.ts +2 -2
- package/src/smoke/run-smoke.ts +3 -2
- package/src/social/cover.ts +202 -0
- package/src/social/discord-layout.ts +37 -13
- package/src/social/drafts.ts +3 -0
- package/src/social/load.ts +23 -2
- package/src/social/media-kind.ts +2 -1
- package/src/social/publish/discord.ts +5 -2
- package/src/social/publish/secret.ts +2 -2
- package/src/social/release-stage.ts +28 -13
- package/src/social/routes.ts +26 -1
- package/src/social/stage.ts +1 -1
- package/src/social/stats.ts +12 -9
- package/src/social/strip.ts +4 -1
- package/src/social/thumbnail.ts +255 -0
- package/src/stores/collection.ts +15 -11
- package/src/stores/desk.ts +236 -42
- package/src/stores/model.ts +72 -6
- package/src/stores/routes.ts +37 -12
- package/src/stores/unit.ts +14 -8
- package/src/suite/judge-suites.ts +41 -11
- package/src/suite/select.ts +45 -3
- package/src/suite/suite-cli.ts +16 -10
- package/src/trailer/bed.ts +1 -1
- package/src/trailer/build.ts +134 -21
- package/src/trailer/ffmpeg.ts +7 -0
- package/src/trailer/fonts.ts +3 -2
- package/src/trailer/grammar.ts +201 -2
- package/src/trailer/graph.ts +42 -5
- package/src/trailer/look.ts +21 -0
- package/src/trailer/mock.ts +154 -0
- package/src/trailer/passage.ts +65 -26
- package/src/trailer/score/heard.ts +89 -0
- package/src/trailer/score/sound.ts +14 -8
- package/src/trailer/sound/run.ts +16 -6
- package/src/trailer/stitch.ts +26 -5
- package/src/trailer/titles.ts +82 -19
- package/src/trailer/versions.ts +1 -3
- package/src/trailer/vertical.ts +3 -1
- package/src/urls/frame.ts +195 -0
- package/src/urls/routes.ts +43 -0
- package/src/urls/rows.ts +171 -0
- package/src/urls/unit.ts +73 -0
- package/src/vault/house-keys.ts +42 -0
- package/src/vault/layout.ts +50 -0
- package/src/vault/policy.ts +165 -0
- package/src/vault/vault-audit.ts +276 -0
- package/src/vault/vault-client.ts +40 -0
- package/src/vault/vault-config.ts +159 -0
- package/src/vault/vault-destroy.ts +78 -0
- package/src/vault/vault-handover.ts +305 -0
- package/src/vault/vault-http.ts +352 -0
- package/src/vault/vault-import.ts +208 -0
- package/src/vault/vault-init.ts +328 -0
- package/src/vault/vault-minter.ts +271 -0
- package/src/vault/vault-restore.ts +333 -0
- package/src/vault/vault-serve.ts +342 -0
- package/src/vault/vault-snapshot.ts +281 -0
- package/src/veille/asks.ts +1 -1
- package/src/veille/desk.ts +2 -2
|
@@ -6,10 +6,9 @@
|
|
|
6
6
|
import { observer } from 'mobx-react-lite'
|
|
7
7
|
import { useLayoutEffect } from 'react'
|
|
8
8
|
import { INBOX_GROUPS, isReviewId, type InboxGroup, type InboxGroupNode, type InboxRow } from '../../home/inbox-shape.ts'
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import type { InboxSt } from './inbox-st.ts'
|
|
9
|
+
import { plainClick, type HomeSt } from './home-st.ts'
|
|
10
|
+
import { Caret } from './icons.tsx'
|
|
11
|
+
import { FOLDS, type FoldList, type InboxSt } from './inbox-st.ts'
|
|
13
12
|
import { ItemView } from './item-view.tsx'
|
|
14
13
|
import { Face } from './project-list.tsx'
|
|
15
14
|
import type { RepoSt } from './repo-st.ts'
|
|
@@ -61,18 +60,21 @@ const Counts = observer(({ ib }: { ib: InboxSt }) =>
|
|
|
61
60
|
ib.page == null ? null : (
|
|
62
61
|
<span className="ib-counts">
|
|
63
62
|
{ib.count > 0 ? <b>{ib.count} for you</b> : <span>nothing for you</span>}
|
|
64
|
-
{ib.
|
|
63
|
+
{FOLDS.map((l) => (ib.foldCount(l) > 0 ? <span key={l} className="ib-dim">{ib.foldCount(l)} {FOLD_WORDS[l]}</span> : null))}
|
|
65
64
|
</span>
|
|
66
65
|
),
|
|
67
66
|
)
|
|
68
67
|
|
|
68
|
+
/** a folded list's head: what can wait, the asks that wait for their day */
|
|
69
|
+
const FOLD_WORDS: Record<FoldList, string> = { yellow: 'can wait', later: 'later' }
|
|
70
|
+
|
|
69
71
|
const GROUP_WORDS: Record<InboxGroup, string> = { repo: 'project', kind: 'type', lane: 'lane' }
|
|
70
72
|
|
|
71
73
|
/** what the list shows (the review cards, or every kind) and what it groups by, each axis on its own */
|
|
72
74
|
const Bar = observer(({ ib }: { ib: InboxSt }) => (
|
|
73
75
|
<div className="ib-bar">
|
|
74
76
|
<span className="seg" title="the review cards only, or every kind: checks, asks and needs too">
|
|
75
|
-
<button className={ib.show === 'cards' ? 'on' : ''} onClick={() => ib.setShow('cards')}>cards</button>
|
|
77
|
+
<button className={ib.show === 'cards' ? 'on' : ''} title="what waits on you: the cards, the questions and the asks for your hands" onClick={() => ib.setShow('cards')}>cards + asks</button>
|
|
76
78
|
<button className={ib.show === 'all' ? 'on' : ''} onClick={() => ib.setShow('all')}>all{ib.show === 'cards' && ib.allCount > ib.cardCount ? <span className="ib-dim"> · {ib.allCount}</span> : null}</button>
|
|
77
79
|
</span>
|
|
78
80
|
<span className="sp" />
|
|
@@ -115,21 +117,23 @@ const InboxList = observer(({ app }: { app: HomeSt }) => {
|
|
|
115
117
|
{p == null ? (
|
|
116
118
|
ib.error === '' ? <div className="ib-wait"><span className="spin" />reading every repo…</div> : null
|
|
117
119
|
) : ib.rows.length === 0 ? (
|
|
118
|
-
<div className="ib-clear">{ib.show === 'cards' ? 'no card waits on you ✨' : 'nothing waits on you ✨'}</div>
|
|
120
|
+
<div className="ib-clear">{ib.show === 'cards' ? 'no card and no ask waits on you ✨' : 'nothing waits on you ✨'}</div>
|
|
119
121
|
) : (
|
|
120
122
|
<Groups app={app} gs={ib.groups} />
|
|
121
123
|
)}
|
|
122
124
|
{ib.more > 0 ? <button className="ib-more" onClick={() => ib.showMore()}>{ib.more} more</button> : null}
|
|
123
|
-
{
|
|
124
|
-
|
|
125
|
-
<
|
|
126
|
-
<
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
125
|
+
{FOLDS.map((l) =>
|
|
126
|
+
ib.foldCount(l) > 0 ? (
|
|
127
|
+
<div key={l} className={`ib-fold${ib.foldOpen[l] ? ' on' : ''}`}>
|
|
128
|
+
<button className="ib-foldhead" aria-expanded={ib.foldOpen[l]} onClick={() => ib.toggleFold(l)}>
|
|
129
|
+
<span className="ib-caret"><Caret open={ib.foldOpen[l]} /></span>
|
|
130
|
+
<span>{FOLD_WORDS[l]}</span>
|
|
131
|
+
<span className="ib-n">{ib.foldCount(l)}</span>
|
|
132
|
+
</button>
|
|
133
|
+
{ib.foldOpen[l] ? <Groups app={app} gs={ib.foldGroups(l)} /> : null}
|
|
134
|
+
</div>
|
|
135
|
+
) : null,
|
|
136
|
+
)}
|
|
133
137
|
{p != null && p.missing.length > 0 ? (
|
|
134
138
|
<div className="ib-missing">
|
|
135
139
|
{p.missing.map((m) => <div key={m.repo}><b>{m.repo}</b>: {m.why}, so its items are not here</div>)}
|
|
@@ -149,7 +153,13 @@ const Row = observer(({ app, r }: { app: HomeSt; r: InboxRow }) => {
|
|
|
149
153
|
e.preventDefault()
|
|
150
154
|
ib.pick(r)
|
|
151
155
|
}}>
|
|
152
|
-
|
|
156
|
+
{/* the project's face is the way to the item in its repo's hub: a link inside the row's link is not html, so a
|
|
157
|
+
span takes the click before the row */}
|
|
158
|
+
<span className="ib-face" role="link" tabIndex={-1} title={`open it in ${r.repo}'s hub`} onClick={(e) => {
|
|
159
|
+
e.preventDefault()
|
|
160
|
+
e.stopPropagation()
|
|
161
|
+
openInHub(app, r.repo, r.id, r.col ?? null)
|
|
162
|
+
}}>{p != null ? <Face p={p} px={28} /> : <span className="pgi h0">{r.repo.charAt(0).toUpperCase()}</span>}</span>
|
|
153
163
|
<span className="ib-main">
|
|
154
164
|
<span className="ib-l1">
|
|
155
165
|
<span className={`ib-tag t-${r.tone}`} title={KIND_WORDS[r.kind]}>{r.tag}</span>
|
|
@@ -166,10 +176,6 @@ const Row = observer(({ app, r }: { app: HomeSt; r: InboxRow }) => {
|
|
|
166
176
|
)
|
|
167
177
|
})
|
|
168
178
|
|
|
169
|
-
/** the address of the item in its repo's own page */
|
|
170
|
-
const hubAddress = (repo: string, id: string, col: string | null): string =>
|
|
171
|
-
`${repoPage(repo)}#${hashFor(isReviewId(id) ? { t: 'review', id } : { t: 'item', col: col ?? '', id }) ?? ''}`
|
|
172
|
-
|
|
173
179
|
/** the item in its repo's own page, in place */
|
|
174
180
|
const openInHub = (app: HomeSt, repo: string, id: string, col: string | null): void => {
|
|
175
181
|
if (isReviewId(id)) app.openReview(repo, id)
|
|
@@ -195,25 +201,15 @@ const OpenIn = observer(({ app, repo, id }: { app: HomeSt; repo: RepoSt; id: str
|
|
|
195
201
|
return <NeedItem app={app} repo={repo} id={id} col={col} />
|
|
196
202
|
})
|
|
197
203
|
|
|
198
|
-
/** the line over an open item: back to the list
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
204
|
+
/** the line over an open item on a phone: the way back to the list. A desk shows none: the row's face opens the item
|
|
205
|
+
* in its repo's hub */
|
|
206
|
+
const ItemTop = observer(({ app }: { app: HomeSt }) =>
|
|
207
|
+
app.inbox.phone ? (
|
|
202
208
|
<div className="rv-phonetop ib-top">
|
|
203
|
-
|
|
204
|
-
{p != null ? <Face p={p} px={20} /> : null}
|
|
205
|
-
<b>{repo.name}</b>
|
|
206
|
-
<span className="sp" />
|
|
207
|
-
<a className="ib-hub" href={hubAddress(repo.name, id, col)} title="open it in its repo's hub" onClick={(e) => {
|
|
208
|
-
if (!plainClick(e)) return
|
|
209
|
-
e.preventDefault()
|
|
210
|
-
openInHub(app, repo.name, id, col)
|
|
211
|
-
}}>
|
|
212
|
-
<Icon d={ICON.link} /> its hub
|
|
213
|
-
</a>
|
|
209
|
+
<button className="ghost rv-back" aria-label="back to the inbox" onClick={() => app.inbox.back()}>◂ the inbox</button>
|
|
214
210
|
</div>
|
|
215
|
-
)
|
|
216
|
-
|
|
211
|
+
) : null,
|
|
212
|
+
)
|
|
217
213
|
|
|
218
214
|
const ReviewItem = observer(({ app, repo, id }: { app: HomeSt; repo: RepoSt; id: string }) => {
|
|
219
215
|
const rv = repo.review
|
|
@@ -225,7 +221,7 @@ const ReviewItem = observer(({ app, repo, id }: { app: HomeSt; repo: RepoSt; id:
|
|
|
225
221
|
}, [rv, id])
|
|
226
222
|
return (
|
|
227
223
|
<div className={app.inbox.phone ? 'rv-phone ib-open' : 'ib-open ib-review'}>
|
|
228
|
-
<ItemTop app={app}
|
|
224
|
+
<ItemTop app={app} />
|
|
229
225
|
<ThreadColumn rv={rv} back={null} />
|
|
230
226
|
</div>
|
|
231
227
|
)
|
|
@@ -238,7 +234,7 @@ const NeedItem = observer(({ app, repo, id, col }: { app: HomeSt; repo: RepoSt;
|
|
|
238
234
|
const ready = repo.cols.loaded || repo.cols.cached
|
|
239
235
|
return (
|
|
240
236
|
<div className={app.inbox.phone ? 'ib-sheet ib-open' : 'ib-open'}>
|
|
241
|
-
<ItemTop app={app}
|
|
237
|
+
<ItemTop app={app} />
|
|
242
238
|
<div className="ib-itembody">
|
|
243
239
|
{!ready ? <div className="ib-wait"><span className="spin" />reading {repo.name}…</div> : col == null ? <div className="ph">this no longer waits on you</div> : <ItemView app={repo} col={col} id={id} />}
|
|
244
240
|
</div>
|
|
@@ -24,7 +24,8 @@ a.ib-row.cur{background:var(--sel)}
|
|
|
24
24
|
a.ib-row.t-review{border-left-color:var(--review)}
|
|
25
25
|
a.ib-row.t-red{border-left-color:var(--red)}
|
|
26
26
|
a.ib-row.t-yellow{border-left-color:var(--warn)}
|
|
27
|
-
.ib-face{flex:none;width:28px;height:28px;display:flex}
|
|
27
|
+
.ib-face{flex:none;width:28px;height:28px;display:flex;border-radius:7px;cursor:pointer}
|
|
28
|
+
.ib-face:hover{box-shadow:0 0 0 2px var(--accent)}
|
|
28
29
|
.ib-face img,.ib-face .pgi{width:28px;height:28px;border-radius:7px;object-fit:contain;font-size:14px}
|
|
29
30
|
.ib-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--s0)}
|
|
30
31
|
.ib-l1{display:flex;align-items:baseline;gap:var(--s2);min-width:0}
|
|
@@ -65,10 +66,6 @@ button.ib-foldhead:hover{color:var(--ink)}
|
|
|
65
66
|
.ib-open{flex:1;min-height:0;display:flex;flex-direction:column}
|
|
66
67
|
.ib-open>.rv-thread{flex:1;min-height:0;height:auto}
|
|
67
68
|
.ib-top{gap:var(--s2);min-height:44px}
|
|
68
|
-
.ib-top img,.ib-top .pgi{width:20px;height:20px;border-radius:5px;object-fit:contain}
|
|
69
|
-
.ib-top .sp{flex:1}
|
|
70
|
-
a.ib-hub,a.ib-hub:visited{display:inline-flex;align-items:center;gap:var(--s1);color:var(--accent);text-decoration:none;font-size:13px;min-height:44px;padding:0 var(--s2)}
|
|
71
|
-
a.ib-hub svg{width:14px;height:14px}
|
|
72
69
|
.ib-itembody{flex:1;min-height:0;display:flex;flex-direction:column;overflow-y:auto}
|
|
73
70
|
|
|
74
71
|
/* the phone: the inbox covers the home as an app; an open item covers the list, which stays where it was below it */
|
|
@@ -9,8 +9,15 @@
|
|
|
9
9
|
<link rel="stylesheet" href="./home-strip.css" />
|
|
10
10
|
<link rel="stylesheet" href="./planned.css" />
|
|
11
11
|
<link rel="stylesheet" href="./when.css" />
|
|
12
|
+
<link rel="stylesheet" href="./urls.css" />
|
|
12
13
|
<link rel="stylesheet" href="./activity.css" />
|
|
13
14
|
<link rel="stylesheet" href="./insights.css" />
|
|
15
|
+
<link rel="stylesheet" href="./time.css" />
|
|
16
|
+
<link rel="stylesheet" href="./machines.css" />
|
|
17
|
+
<link rel="stylesheet" href="./database.css" />
|
|
18
|
+
<link rel="stylesheet" href="./entry-bar.css" />
|
|
19
|
+
<link rel="stylesheet" href="./vault.css" />
|
|
20
|
+
<link rel="stylesheet" href="./space.css" />
|
|
14
21
|
<link rel="stylesheet" href="./readme.css" />
|
|
15
22
|
<link rel="stylesheet" href="./dock.css" />
|
|
16
23
|
<link rel="stylesheet" href="./controls.css" />
|
|
@@ -67,3 +67,10 @@ export const KeptCols = observer(({ id, children, folds, layout }: { id: string;
|
|
|
67
67
|
</div>
|
|
68
68
|
)
|
|
69
69
|
})
|
|
70
|
+
|
|
71
|
+
/** a panel never scrolls itself: the column inside it does (hub-app.tsx, PANEL) */
|
|
72
|
+
export const PANEL = { overflow: 'hidden' } as const
|
|
73
|
+
|
|
74
|
+
/** the size of a page's list column (its second column, after the repo's tree or the rail), the same on every page:
|
|
75
|
+
* a list panel spreads it, never a size of its own (tests/hub-list-col.test.ts) */
|
|
76
|
+
export const LIST_COL = { defaultSize: '22%', minSize: 180 } as const
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
// the page's command keys, read the same on every layout: ⌘1 to ⌘9 select the
|
|
2
|
-
// nth repo of the project list, ⌘↑ and ⌘↓ the
|
|
2
|
+
// nth repo of the project list, ⌘↑ and ⌘↓ the entry above or below in the rail (its pages, its identities, its repos),
|
|
3
|
+
// ⌘/ the global search, then the home row under the right hand: ⌘J
|
|
3
4
|
// the picker, ⌘K the overview, ⌘L the activity, ⌘; the insights, ⌘' the plan, and ⌘I above them the inbox.
|
|
4
5
|
// ⌘B folds the project list to its icon rail and back (layout-st.ts), ⌘⇧B
|
|
5
6
|
// cycles the dock at the bottom of the page (dock-st.ts): the line, slim, open.
|
|
6
|
-
// A digit, the semicolon and the
|
|
7
|
+
// A digit, the semicolon, the quote and the slash are read from the physical key (`code`), so an
|
|
7
8
|
// AZERTY keyboard, where the key under 1 types `&`, selects the same repo. Ctrl stands in for
|
|
8
9
|
// ⌘ off a Mac. The macOS app binds none of these to a menu item, so they
|
|
9
10
|
// reach the page (tests/home-strip.test.tsx reads ShipkitGui.swift).
|
|
10
|
-
export type PageKey = { t: 'repo'; n: number } | { t: 'step'; by: -1 | 1 } | { t: 'home' } | { t: 'inbox' } | { t: 'planned' } | { t: 'activity' } | { t: 'insights' } | { t: 'picker' } | { t: 'dock' } | { t: 'rail' }
|
|
11
|
+
export type PageKey = { t: 'repo'; n: number } | { t: 'step'; by: -1 | 1 } | { t: 'home' } | { t: 'inbox' } | { t: 'planned' } | { t: 'activity' } | { t: 'insights' } | { t: 'picker' } | { t: 'search' } | { t: 'dock' } | { t: 'rail' }
|
|
11
12
|
|
|
12
13
|
type KeyLike = { key: string; code: string; metaKey: boolean; ctrlKey: boolean; shiftKey: boolean; altKey: boolean }
|
|
13
14
|
|
|
@@ -15,6 +16,8 @@ export function pageKey(e: KeyLike): PageKey | null {
|
|
|
15
16
|
if (!(e.metaKey || e.ctrlKey) || e.altKey) return null
|
|
16
17
|
const digit = /^Digit([1-9])$/.exec(e.code)
|
|
17
18
|
if (digit != null) return { t: 'repo', n: Number(digit[1]) }
|
|
19
|
+
// AZERTY types the slash with shift, so a slash with shift is still the search
|
|
20
|
+
if (e.key === '/' || (e.code === 'Slash' && !e.shiftKey)) return { t: 'search' }
|
|
18
21
|
if (e.shiftKey) return e.code === 'KeyB' || e.key.toLowerCase() === 'b' ? { t: 'dock' } : null
|
|
19
22
|
if (e.key === 'ArrowUp') return { t: 'step', by: -1 }
|
|
20
23
|
if (e.key === 'ArrowDown') return { t: 'step', by: 1 }
|
|
@@ -33,23 +36,33 @@ export function pageKey(e: KeyLike): PageKey | null {
|
|
|
33
36
|
export const PLACE_KEY: Record<'overview' | 'inbox' | 'planned' | 'activity' | 'insights', string> & Partial<Record<string, string>> = { overview: '⌘K', inbox: '⌘I', planned: "⌘'", activity: '⌘L', insights: '⌘;' }
|
|
34
37
|
/** the picker's shortcut, on the first button, before home */
|
|
35
38
|
export const PICKER_KEY = '⌘J'
|
|
36
|
-
/** the
|
|
39
|
+
/** the global search: the picker, on the rail's first row */
|
|
40
|
+
export const FIND_KEY = '⌘/'
|
|
41
|
+
/** the entry above and below in the rail, hinted at the project list's foot */
|
|
37
42
|
export const STEP_KEYS = ['⌘↑', '⌘↓'] as const
|
|
38
43
|
/** the dock's shortcut, on the dock's own header */
|
|
39
44
|
export const DOCK_KEY = '⌘⇧B'
|
|
40
45
|
/** the project list between its full width and its icon rail */
|
|
41
46
|
export const RAIL_KEY = '⌘B'
|
|
42
47
|
|
|
43
|
-
/** the
|
|
44
|
-
*
|
|
45
|
-
export
|
|
48
|
+
/** the side lists of a page, left of its content: B its main list (a repo's tree, an identity's rows, a home page's
|
|
49
|
+
* own), C the list a page of its own draws (the review page's cards, a trailer's cuts). The rail, A, takes ⌘ */
|
|
50
|
+
export type SideLevel = 'b' | 'c'
|
|
51
|
+
/** `/` focuses C's filter, `⇧/` B's; ↑ ↓ step C, ⇧↑ ⇧↓ step B, each step opening the entry it lands on. A page with
|
|
52
|
+
* no C list gives them to B (side-lists.ts). Plain keys, so a text field keeps them */
|
|
53
|
+
export type ListKey = { t: 'find'; list: SideLevel } | { t: 'step'; list: SideLevel; by: -1 | 1 }
|
|
46
54
|
|
|
47
|
-
/**
|
|
48
|
-
|
|
49
|
-
export const
|
|
55
|
+
/** the hint at the right of C's filter, and of B's */
|
|
56
|
+
export const SEARCH_KEY = '/'
|
|
57
|
+
export const SEARCH_B_KEY = '⇧/'
|
|
50
58
|
|
|
51
|
-
|
|
52
|
-
|
|
59
|
+
/** `?` is ⇧/ on a US layout and ⇧, on AZERTY, whose slash itself takes shift, so `/` with or without shift is C's */
|
|
60
|
+
export function listKey(e: KeyLike): ListKey | null {
|
|
61
|
+
if (e.metaKey || e.ctrlKey || e.altKey) return null
|
|
62
|
+
if (e.key === '?') return { t: 'find', list: 'b' }
|
|
63
|
+
if (e.key === SEARCH_KEY) return { t: 'find', list: 'c' }
|
|
64
|
+
if (e.key === 'ArrowUp' || e.key === 'ArrowDown') return { t: 'step', list: e.shiftKey ? 'b' : 'c', by: e.key === 'ArrowUp' ? -1 : 1 }
|
|
65
|
+
return null
|
|
53
66
|
}
|
|
54
67
|
|
|
55
68
|
/** a repo page's sections, each on ⌥ and its letter. ⌥ because every other
|
|
@@ -59,10 +72,10 @@ export function isSearchKey(e: Pick<KeyLike, 'key' | 'metaKey' | 'ctrlKey' | 'al
|
|
|
59
72
|
* plus a letter only types a character inside a text field, where the page
|
|
60
73
|
* leaves the key alone. Read from the physical key (`code`): on a Mac ⌥C
|
|
61
74
|
* types ç, and AZERTY moves the letters */
|
|
62
|
-
export type SectionId = 'readme' | 'contracts' | 'shipkit' | 'repo' | 'secrets' | 'when' | 'runs' | 'plan' | 'processes' | 'git' | 'commands' | 'asks' | 'review' | 'reflections' | 'tests' | 'media' | 'trailer' | 'stores' | 'releases' | 'messages' | 'veille' | 'comms' | 'social' | 'wikis' | 'admin'
|
|
63
|
-
export const SECTION_LETTER: Record<SectionId, string> = { readme: 'E', review: 'V', trailer: 'L', stores: 'B', releases: 'H', messages: 'J', veille: 'Y', comms: 'U', social: 'I', contracts: 'K', shipkit: 'S', repo: 'C', secrets: 'X', when: 'O', runs: 'R', plan: 'N', processes: 'P', git: 'G', commands: 'Q', asks: 'A', reflections: 'F', tests: 'T', media: 'M', wikis: 'W', admin: 'D' }
|
|
75
|
+
export type SectionId = 'readme' | 'contracts' | 'shipkit' | 'repo' | 'secrets' | 'when' | 'runs' | 'plan' | 'processes' | 'urls' | 'git' | 'commands' | 'asks' | 'review' | 'reflections' | 'tests' | 'media' | 'trailer' | 'stores' | 'releases' | 'messages' | 'veille' | 'comms' | 'social' | 'wikis' | 'admin'
|
|
76
|
+
export const SECTION_LETTER: Record<SectionId, string> = { readme: 'E', review: 'V', trailer: 'L', stores: 'B', releases: 'H', messages: 'J', veille: 'Y', comms: 'U', social: 'I', contracts: 'K', shipkit: 'S', repo: 'C', secrets: 'X', when: 'O', runs: 'R', plan: 'N', processes: 'P', urls: 'Z', git: 'G', commands: 'Q', asks: 'A', reflections: 'F', tests: 'T', media: 'M', wikis: 'W', admin: 'D' }
|
|
64
77
|
/** a section's words on its row, where the id alone would not say it */
|
|
65
|
-
export const SECTION_LABEL: Partial<Record<SectionId, string>> = { shipkit: 'shipkit checks', repo: 'repo checks' }
|
|
78
|
+
export const SECTION_LABEL: Partial<Record<SectionId, string>> = { shipkit: 'shipkit checks', repo: 'repo checks', review: 'threads' }
|
|
66
79
|
export const sectionLabel = (id: SectionId): string => SECTION_LABEL[id] ?? id
|
|
67
80
|
/** the badge at the end of a section's line */
|
|
68
81
|
export const sectionKeyLabel = (id: SectionId): string => `⌥${SECTION_LETTER[id]}`
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// a part of a long page drawn once it nears the screen of its scroll box: a page opened by a step draws what shows and
|
|
2
|
+
// what is a screen away, and the rest stays a box of its guessed height until a scroll brings it near. A step that
|
|
3
|
+
// draws every entry of a long list at once costs hundreds of ms (100 message cards, their clips autoplaying)
|
|
4
|
+
import { useEffect, useRef, useState, type ReactNode } from 'react'
|
|
5
|
+
|
|
6
|
+
/** how far past its scroll box an entry is drawn already: one box height each way */
|
|
7
|
+
const REACH = '100% 0px'
|
|
8
|
+
|
|
9
|
+
/** `eager` draws it in the frame that opens the page: the first entries, so the step shows them at once */
|
|
10
|
+
export function Later({ eager, guess, children }: { eager: boolean; guess: number; children: ReactNode }): ReactNode {
|
|
11
|
+
const [near, setNear] = useState(eager)
|
|
12
|
+
const box = useRef<HTMLDivElement | null>(null)
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
const el = box.current
|
|
15
|
+
if (near || el == null) return
|
|
16
|
+
// a page with no observer draws it all, as before
|
|
17
|
+
if (typeof IntersectionObserver === 'undefined') return setNear(true)
|
|
18
|
+
const io = new IntersectionObserver((es) => { if (es.some((e) => e.isIntersecting)) setNear(true) }, { root: el.closest('.rv-scroll'), rootMargin: REACH })
|
|
19
|
+
io.observe(el)
|
|
20
|
+
return () => io.disconnect()
|
|
21
|
+
}, [near])
|
|
22
|
+
return near ? children : <div ref={box} className="later" style={{ height: guess }} />
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** the entries of a list a step opens drawn in its own frame */
|
|
26
|
+
export const EAGER = 2
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// a page's own list's filter field (the review's cards, the asks): `/` focuses it from anywhere on the page, ↑ ↓ in it
|
|
2
|
+
// step the list it filters, Escape empties it and gives the keys back (list-walk.ts filterKey)
|
|
3
|
+
import { SEARCH_KEY } from './keys.ts'
|
|
4
|
+
import { filterKey, type SideList } from './list-walk.ts'
|
|
5
|
+
|
|
6
|
+
export function ListFilter(p: { side: SideList; value: string; set: (v: string) => void; keep: (el: HTMLInputElement | null) => void; placeholder: string; label: string }) {
|
|
7
|
+
return (
|
|
8
|
+
<span className="sfield">
|
|
9
|
+
<input ref={p.keep} className="rv-search" placeholder={p.placeholder} aria-label={p.label} value={p.value} onChange={(e) => p.set(e.currentTarget.value)}
|
|
10
|
+
onKeyDown={(e) => filterKey(p.side, () => p.set(''), e)} />
|
|
11
|
+
<kbd className="skey" title="/ focuses the search from anywhere on the page">{SEARCH_KEY}</kbd>
|
|
12
|
+
</span>
|
|
13
|
+
)
|
|
14
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// the arrows over a list of rows: the one keyboard model of the hub's lists, the repo tree (tree-svc.ts) and the
|
|
2
2
|
// identity view (identities-st.ts). ↑ ↓ land on the row above or below, stepping over inert ones; → unfolds a folded
|
|
3
|
-
// row, else steps down; ← folds an unfolded row, else climbs to its parent; Enter and space open the row.
|
|
4
|
-
// and opening do is the host's
|
|
3
|
+
// row, else steps down; ← folds an unfolded row, else climbs to its parent; Enter and space open the row. With no
|
|
4
|
+
// cursor the row is the one of the page shown. What landing and opening do is the host's
|
|
5
5
|
export type WalkRow = { key: string; depth: number; dir: boolean }
|
|
6
6
|
|
|
7
7
|
export type WalkHost<R extends WalkRow> = {
|
|
@@ -36,7 +36,13 @@ function move<R extends WalkRow>(h: WalkHost<R>, d: number): void {
|
|
|
36
36
|
h.land(rows[next]!)
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
const cur = <R extends WalkRow>(h: WalkHost<R>): R | null => h.rows
|
|
39
|
+
const cur = <R extends WalkRow>(h: WalkHost<R>): R | null => h.rows[from(h)] ?? null
|
|
40
|
+
|
|
41
|
+
/** whether ← or → would fold or unfold the row the walk stands on: the one case a page with ← → of its own gives way */
|
|
42
|
+
export function foldsOn<R extends WalkRow>(h: WalkHost<R>, k: string): boolean {
|
|
43
|
+
const r = cur(h)
|
|
44
|
+
return r != null && r.dir && (k === 'ArrowRight' ? !h.isOpen(r.key) : k === 'ArrowLeft' && h.isOpen(r.key))
|
|
45
|
+
}
|
|
40
46
|
|
|
41
47
|
function right<R extends WalkRow>(h: WalkHost<R>): void {
|
|
42
48
|
const r = cur(h)
|
|
@@ -87,3 +93,66 @@ export class WalkEntry {
|
|
|
87
93
|
return h
|
|
88
94
|
}
|
|
89
95
|
}
|
|
96
|
+
|
|
97
|
+
/** a side list as its keys see it (keys.ts listKey): its entries in the order drawn, the one shown, how one opens, and
|
|
98
|
+
* the field `/` focuses. A page declares its list with this and writes no key of its own (side-lists.ts) */
|
|
99
|
+
export type SideList = {
|
|
100
|
+
readonly ids: readonly string[]
|
|
101
|
+
readonly current: string | null
|
|
102
|
+
open(id: string): void
|
|
103
|
+
readonly filter: HTMLInputElement | null
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** the entry above (-1) or below (+1) the one shown, opened; from none, the first or the last, and the ends hold.
|
|
107
|
+
* True = the key was the list's, even at an end, so the page does not also scroll */
|
|
108
|
+
export function stepSide(l: SideList, by: -1 | 1): boolean {
|
|
109
|
+
const ids = l.ids
|
|
110
|
+
if (ids.length === 0) return false
|
|
111
|
+
const at = l.current == null ? -1 : ids.indexOf(l.current)
|
|
112
|
+
const next = at === -1 ? (by > 0 ? 0 : ids.length - 1) : at + by
|
|
113
|
+
if (next >= 0 && next < ids.length && next !== at) l.open(ids[next]!)
|
|
114
|
+
return true
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** a side list from four reads, each read when the keys ask, so it follows the page's state */
|
|
118
|
+
export const sideOf = (o: { ids: () => readonly string[]; current: () => string | null; open: (id: string) => void; filter?: () => HTMLInputElement | null }): SideList => ({
|
|
119
|
+
get ids() {
|
|
120
|
+
return o.ids()
|
|
121
|
+
},
|
|
122
|
+
get current() {
|
|
123
|
+
return o.current()
|
|
124
|
+
},
|
|
125
|
+
open: o.open,
|
|
126
|
+
get filter() {
|
|
127
|
+
return o.filter?.() ?? null
|
|
128
|
+
},
|
|
129
|
+
})
|
|
130
|
+
|
|
131
|
+
/** a walked list (the repo tree, an identity's rows) as a side list: its inert rows are no entries, the cursor's row
|
|
132
|
+
* or the page shown's is the current one, and an entry opens as an arrow landing on it */
|
|
133
|
+
export const walkSide = <R extends WalkRow>(h: WalkHost<R>, filter: () => HTMLInputElement | null): SideList =>
|
|
134
|
+
sideOf({
|
|
135
|
+
ids: () => h.rows.filter((r) => !h.inert(r)).map((r) => r.key),
|
|
136
|
+
current: () => {
|
|
137
|
+
const rows = h.rows
|
|
138
|
+
return rows.find((r) => r.key === h.cursor)?.key ?? rows[h.home(rows)]?.key ?? null
|
|
139
|
+
},
|
|
140
|
+
open: (id) => {
|
|
141
|
+
const r = h.rows.find((x) => x.key === id)
|
|
142
|
+
if (r != null) h.land(r)
|
|
143
|
+
},
|
|
144
|
+
filter,
|
|
145
|
+
})
|
|
146
|
+
|
|
147
|
+
type FieldKey = { key: string; shiftKey: boolean; metaKey: boolean; ctrlKey: boolean; altKey: boolean; preventDefault(): void; currentTarget: { blur(): void } }
|
|
148
|
+
|
|
149
|
+
/** a list's filter field: ↑ ↓ step the list it filters, Escape empties it and gives the focus back to the list (the
|
|
150
|
+
* page's keys reach it again); `clear` empties it */
|
|
151
|
+
export function filterKey(l: SideList, clear: () => void, e: FieldKey): void {
|
|
152
|
+
if (e.metaKey || e.ctrlKey || e.altKey) return
|
|
153
|
+
if (e.key === 'Escape') {
|
|
154
|
+
clear()
|
|
155
|
+
e.currentTarget.blur()
|
|
156
|
+
e.preventDefault()
|
|
157
|
+
} else if ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && !e.shiftKey && stepSide(l, e.key === 'ArrowUp' ? -1 : 1)) e.preventDefault()
|
|
158
|
+
}
|