rvlib-shipkit 2.28.0 → 2.30.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 +75 -1
- package/package.json +11 -2
- package/src/advisors/acts.ts +277 -0
- package/src/advisors/advice.ts +384 -0
- package/src/advisors/advisor-view.ts +417 -0
- package/src/advisors/app-graph.ts +112 -0
- package/src/advisors/app.ts +75 -0
- package/src/advisors/door.ts +59 -0
- package/src/advisors/edge/api.ts +292 -0
- package/src/advisors/edge/bucket.ts +43 -0
- package/src/advisors/edge/certs.ts +20 -0
- package/src/advisors/edge/form.ts +45 -0
- package/src/advisors/edge/handler.ts +156 -0
- package/src/advisors/edge/jwt.ts +76 -0
- package/src/advisors/edge/shell.ts +27 -0
- package/src/advisors/edge/status.ts +12 -0
- package/src/advisors/edge/types.ts +137 -0
- package/src/advisors/edge/worker.ts +52 -0
- package/src/advisors/expose.ts +154 -0
- package/src/advisors/job.ts +35 -0
- package/src/advisors/owner-store.ts +226 -0
- package/src/advisors/photos.ts +182 -0
- package/src/advisors/project.ts +311 -0
- package/src/advisors/r2.ts +46 -0
- package/src/advisors/routes.ts +496 -0
- package/src/advisors/scan.ts +205 -0
- package/src/advisors/sync.ts +363 -0
- package/src/agent-time/accounts-usage-disk.ts +29 -0
- package/src/agent-time/accounts-usage.ts +105 -0
- package/src/agent-time/claude-sessions.ts +32 -0
- package/src/agent-time/hooks.ts +64 -27
- package/src/agent-time/lane-name.ts +7 -0
- package/src/agent-time/leads.ts +95 -0
- package/src/agent-time/live.ts +5 -2
- package/src/agent-time/registry.ts +248 -86
- package/src/agent-time/render.ts +35 -4
- package/src/agent-time/report-cache.ts +4 -8
- package/src/agent-time/report.ts +19 -1
- package/src/agent-time/store.ts +16 -20
- package/src/annex/snapshots.ts +3 -3
- package/src/annex/tidy.ts +10 -23
- package/src/asks/ask-after.ts +2 -1
- package/src/asks/ask-carry.ts +190 -0
- package/src/asks/ask-close.ts +72 -0
- package/src/asks/ask-doc.ts +42 -0
- package/src/asks/ask-migrate.ts +9 -9
- package/src/asks/ask-steps-fold.ts +71 -114
- package/src/asks/ask-store.ts +190 -58
- package/src/asks/ask-words-fold.ts +208 -0
- package/src/check.ts +9 -1
- package/src/checks/SK001-package-json-shape.check.ts +6 -7
- package/src/checks/SK003-claude-md-shape.check.ts +1 -0
- package/src/checks/SK004-gitignore-policy.check.ts +25 -19
- package/src/checks/SK008-reviewer-agent.check.ts +4 -7
- package/src/checks/SK010-undeclared-unit.check.ts +77 -64
- package/src/checks/SK013-one-way-in-policy.check.ts +21 -8
- package/src/checks/SK017-vscode-hub-task.check.ts +1 -0
- package/src/checks/SK024-identity-colors.check.ts +1 -1
- package/src/checks/SK027-agent-wiki-links.check.ts +47 -6
- package/src/checks/SK033-global-contribution.check.ts +2 -1
- package/src/checks/SK034-commit-gates-armed.check.ts +1 -0
- package/src/checks/SK036-draft-media-size.check.ts +5 -4
- package/src/checks/SK039-vscode-watch-generated.check.ts +2 -1
- package/src/checks/SK040-release-words.check.ts +39 -10
- package/src/checks/SK042-post-kinds.check.ts +2 -2
- package/src/checks/SK045-slow-hooks.check.ts +5 -2
- package/src/checks/SK049-thread-answers-hook.check.ts +11 -5
- package/src/checks/SK050-retired-commands.check.ts +1 -0
- package/src/checks/SK051-no-formatter.check.ts +486 -0
- package/src/cli/channel-run.ts +17 -0
- package/src/cli/cmd_Advisors.ts +357 -0
- package/src/cli/cmd_Annex.ts +10 -10
- package/src/cli/cmd_Asks.ts +113 -12
- package/src/cli/cmd_Backup.ts +12 -8
- package/src/cli/cmd_CacheAudit.ts +2 -2
- package/src/cli/cmd_Channel.ts +43 -0
- package/src/cli/cmd_Check.ts +3 -3
- package/src/cli/cmd_Checks.ts +1 -1
- package/src/cli/cmd_Ci.ts +15 -16
- package/src/cli/cmd_Db.ts +9 -9
- package/src/cli/cmd_FleetPush.ts +1 -1
- package/src/cli/cmd_GlobalProcesses.ts +1 -0
- package/src/cli/cmd_History.ts +2 -2
- package/src/cli/cmd_Home.ts +17 -11
- package/src/cli/cmd_Hooks.ts +14 -4
- package/src/cli/cmd_Hq.ts +73 -19
- package/src/cli/cmd_Keys.ts +1 -1
- package/src/cli/cmd_Lanes.ts +22 -4
- package/src/cli/cmd_Media.ts +67 -16
- package/src/cli/cmd_Orchestrator.ts +307 -0
- package/src/cli/cmd_OrchestratorRole.ts +163 -0
- package/src/cli/cmd_Rec.ts +5 -2
- package/src/cli/cmd_Reflect.ts +17 -3
- package/src/cli/cmd_Releases.ts +38 -38
- package/src/cli/cmd_Review.ts +760 -409
- package/src/cli/cmd_Secret.ts +44 -14
- package/src/cli/cmd_Shot.ts +12 -6
- package/src/cli/cmd_Social.ts +5 -4
- package/src/cli/cmd_SocialDrafts.ts +23 -10
- package/src/cli/cmd_Sound.ts +1 -0
- package/src/cli/cmd_Space.ts +1 -1
- package/src/cli/cmd_Start.ts +1 -1
- package/src/cli/cmd_ThreadKinds.ts +18 -11
- package/src/cli/cmd_ThreadReflect.ts +20 -12
- package/src/cli/cmd_ThreadSyncNeeds.ts +7 -7
- package/src/cli/cmd_Time.ts +2 -1
- package/src/cli/cmd_Tmp.ts +9 -8
- package/src/cli/cmd_TraceAudit.ts +1 -1
- package/src/cli/cmd_Trailer.ts +5 -5
- package/src/cli/cmd_Urls.ts +6 -6
- package/src/cli/cmd_Vault.ts +4 -4
- package/src/cli/cmd_When.ts +1 -1
- package/src/cli/cmd_Worktrees.ts +109 -0
- package/src/cli/inbox-hook-run.ts +109 -0
- package/src/cli/registry.ts +19 -4
- package/src/cli/review-here.ts +136 -0
- package/src/cli.ts +64 -25
- package/src/collections/actions.ts +7 -5
- package/src/collections/checks.ts +6 -1
- package/src/collections/collection-types.ts +20 -8
- package/src/collections/pings.ts +7 -1
- package/src/collections/providers.ts +21 -19
- package/src/collections/review.ts +25 -23
- package/src/collections/state-rules.ts +8 -7
- package/src/collections/tests.ts +7 -4
- package/src/comfy/comfy-panel.ts +2 -2
- package/src/commands/model.ts +1 -1
- package/src/commands/routes.ts +1 -1
- package/src/commands/runs.ts +1 -1
- package/src/core/app-icon-frame.ts +62 -0
- package/src/core/app-icon.ts +178 -22
- package/src/core/archived.ts +10 -7
- package/src/core/atomic-write.ts +36 -0
- package/src/core/budget.ts +16 -1
- package/src/core/bun-builtins.ts +7 -7
- package/src/core/canonical-scripts.ts +4 -6
- package/src/core/check-ctx.ts +54 -6
- package/src/core/check-pass.ts +7 -0
- package/src/core/day-stamp.ts +20 -0
- package/src/core/foreign.ts +87 -0
- package/src/core/git-bin.ts +10 -0
- package/src/core/git.ts +60 -16
- package/src/core/gui-color.ts +75 -0
- package/src/core/hard-reset.ts +1 -2
- package/src/core/history-files.ts +4 -8
- package/src/core/house-layout.ts +3 -0
- package/src/core/hub-theme.ts +14 -0
- package/src/core/identity.ts +1 -1
- package/src/core/in-base.ts +19 -0
- package/src/core/instance.ts +15 -5
- package/src/core/last-good.ts +42 -133
- package/src/core/layout.ts +4 -1
- package/src/core/load-probe.ts +4 -8
- package/src/core/locked-write.ts +117 -47
- package/src/core/loop-watch.ts +24 -3
- package/src/core/machine-commit.ts +9 -1
- package/src/core/machine-db.ts +54 -12
- package/src/core/machine-link.ts +1 -1
- package/src/core/memory-watch.ts +3 -2
- package/src/core/motherhome.ts +2 -1
- package/src/core/nearest.ts +23 -0
- package/src/core/on-loop.ts +57 -0
- package/src/core/one-lib.ts +2 -1
- package/src/core/one-way-in-policy.ts +43 -25
- package/src/core/owner-word-policy.ts +123 -0
- package/src/core/panel-shades.ts +140 -0
- package/src/core/raw-access.ts +9 -2
- package/src/core/reexec.ts +3 -5
- package/src/core/repo-gui-color.ts +16 -0
- package/src/core/repo-walk.ts +104 -0
- package/src/core/retention.ts +10 -12
- package/src/core/role-policy.ts +17 -0
- package/src/core/run-dirs.ts +45 -0
- package/src/core/runs-matrix.ts +1 -1
- package/src/core/scope.ts +6 -3
- package/src/core/slots.ts +2 -2
- package/src/core/slug.ts +33 -0
- package/src/core/spawn-timeout.ts +3 -1
- package/src/core/squircle.ts +0 -8
- package/src/core/throwaway-worktree.ts +21 -2
- package/src/core/tmux-policy.ts +264 -0
- package/src/core/unit-files.ts +4 -4
- package/src/core/unit-icon.ts +43 -0
- package/src/core/when-block.ts +4 -5
- package/src/core/when.ts +1 -3
- package/src/core/words.ts +33 -0
- package/src/fleet/push-fleet.ts +6 -11
- package/src/fleet/scan-fleet.ts +3 -0
- package/src/{core → gate}/cache-audit.ts +8 -2
- package/src/{core → gate}/check-runner.ts +24 -54
- package/src/{core → gate}/discover-checks.ts +5 -102
- package/src/{core → gate}/discover-legacy-checks.ts +3 -3
- package/src/{ledger → gate}/gate-checks.ts +19 -14
- package/src/gate/head-gate.ts +151 -0
- package/src/{core → gate}/job-follow.ts +1 -1
- package/src/{core → gate}/job-run.ts +3 -3
- package/src/{core → gate}/pre-commit-discovery.ts +2 -2
- package/src/{core → gate}/run-check.ts +7 -7
- package/src/{core → gate}/run-ci.ts +9 -9
- package/src/gate/run-fix.ts +198 -0
- package/src/{core → gate}/run-fixers.ts +22 -17
- package/src/{core → gate}/trace-audit.ts +8 -8
- package/src/home/activity-shape.ts +3 -1
- package/src/home/activity.ts +15 -12
- package/src/home/app-sign.ts +17 -9
- package/src/home/daemon-guard.ts +24 -0
- package/src/home/daemon-jobs.ts +66 -16
- package/src/home/database-words.ts +21 -27
- package/src/home/databases.ts +3 -3
- package/src/home/global-context.ts +2 -2
- package/src/home/global-units.ts +1 -1
- package/src/home/gui-app/ShipkitGui.swift +2129 -187
- package/src/home/gui-app/icon.svg +8 -0
- package/src/home/gui-app.ts +95 -31
- package/src/home/handover.ts +126 -0
- package/src/home/home-move.ts +29 -16
- package/src/home/home-paths.ts +30 -8
- package/src/home/home-routes.ts +120 -6
- package/src/home/home-start.ts +28 -4
- package/src/home/home-state.ts +12 -6
- package/src/home/hubs.ts +28 -5
- package/src/home/inbox-shape.ts +64 -37
- package/src/home/inbox.ts +2 -1
- package/src/home/lib-watch.ts +93 -74
- package/src/home/log-follow.ts +117 -0
- package/src/home/machine-fold.ts +47 -44
- package/src/home/machine-repair.ts +5 -6
- package/src/home/machine-stores.ts +3 -3
- package/src/home/machine-temp.ts +58 -67
- package/src/home/open-app.ts +9 -3
- package/src/home/page-build.ts +334 -0
- package/src/home/page-held.ts +338 -0
- package/src/home/pm-config.ts +2 -2
- package/src/home/pm.ts +96 -5
- package/src/home/process-apps.ts +73 -26
- package/src/home/process-rows.ts +16 -1
- package/src/home/push-sources.ts +137 -0
- package/src/home/resources.ts +16 -7
- package/src/home/run-daemon.ts +58 -5
- package/src/home/run-pm.ts +2 -1
- package/src/home/run-web.ts +11 -6
- package/src/home/search-shape.ts +54 -0
- package/src/home/search.ts +114 -0
- package/src/home/serve-daemon.ts +51 -20
- package/src/home/serve-web.ts +214 -149
- package/src/home/space-page.ts +10 -10
- package/src/home/space-route.ts +2 -2
- package/src/home/space-words.ts +11 -10
- package/src/home/supervise.ts +26 -1
- package/src/home/time-page-shape.ts +0 -13
- package/src/home/vault-page.ts +17 -16
- package/src/home/vault-reveal.ts +29 -0
- package/src/home/vault-words.ts +3 -3
- package/src/home/via-hub.ts +3 -4
- package/src/home/web-places.ts +239 -0
- package/src/home/widgets.ts +16 -2
- package/src/home/worktree-tidy.ts +236 -0
- package/src/hooks/commit-message.ts +11 -9
- package/src/hooks/edit-guard.ts +12 -0
- package/src/hooks/hook-gates.ts +2 -0
- package/src/hooks/leak-guard.ts +9 -3
- package/src/hooks/one-way-in-guard.ts +146 -61
- package/src/hooks/run-hooks.ts +70 -7
- package/src/hooks/shared-file.ts +364 -0
- package/src/hooks/shell-writes.ts +620 -0
- package/src/hooks/write-log.ts +149 -0
- package/src/{serve → house}/project-gutter.ts +5 -1
- package/src/hq/door-route.ts +64 -8
- package/src/hq/door.ts +47 -14
- package/src/hq/files-send.ts +5 -5
- package/src/hq/forgotten-log.ts +1 -1
- package/src/hq/history-check.ts +7 -6
- package/src/hq/history-send.ts +15 -15
- package/src/hq/hq-db.ts +11 -4
- package/src/hq/hq-local.ts +36 -15
- package/src/hq/hq-routes.ts +4 -2
- package/src/hq/hq-store.ts +13 -7
- package/src/hq/kinds/ask.ts +4 -3
- package/src/hq/kinds/index.ts +5 -4
- package/src/hq/kinds/{card-gone.ts → item-gone.ts} +24 -25
- package/src/hq/kinds/{card-msg.ts → item-msg.ts} +25 -27
- package/src/hq/kinds/{card.ts → item.ts} +31 -29
- package/src/hq/kinds/kind.ts +12 -4
- package/src/hq/kinds/media.ts +2 -3
- package/src/hq/kinds/presence-rule.ts +56 -0
- package/src/hq/kinds/presence.ts +210 -0
- package/src/hq/kinds/prompt.ts +2 -1
- package/src/hq/kinds/report.ts +8 -5
- package/src/hq/kinds/time-day.ts +5 -4
- package/src/hq/lead-order.ts +68 -0
- package/src/hq/ledger.ts +22 -22
- package/src/hq/machine-notes.ts +14 -15
- package/src/hq/outbox.ts +38 -22
- package/src/hq/replica.ts +5 -7
- package/src/hq/report-facts.ts +14 -7
- package/src/hq/report.ts +57 -14
- package/src/hq/switch.ts +21 -23
- package/src/hq/terminal-hop.ts +64 -0
- package/src/hq/{cards.ts → thread-sync.ts} +140 -105
- package/src/hq/vault-route.ts +1 -1
- package/src/{serve → http}/door-forward.ts +21 -16
- package/src/{serve → http}/door-names.ts +9 -0
- package/src/http/hop-caller.ts +23 -0
- package/src/http/hop-names.ts +14 -0
- package/src/http/loopback-serve.ts +106 -0
- package/src/http/owner-word.ts +128 -0
- package/src/{serve → http}/same-origin.ts +15 -2
- package/src/{serve → http}/tailnet-caller.ts +5 -4
- package/src/identities/machine-route.ts +2 -2
- package/src/identities/shown.ts +2 -6
- package/src/ledger/check-table.ts +1 -1
- package/src/ledger/db.ts +1 -0
- package/src/ledger/git-key.ts +9 -3
- package/src/ledger/git-scan.ts +2 -2
- package/src/ledger/ledger.ts +6 -16
- package/src/ledger/run-log.ts +25 -1
- package/src/media-kinds.ts +4 -1
- package/src/media-store/backup/daemon.ts +3 -2
- package/src/media-store/backup/keys.ts +0 -3
- package/src/media-store/backup/manifest.ts +1 -1
- package/src/media-store/backup/prune.ts +15 -18
- package/src/media-store/backup/retention.ts +2 -2
- package/src/media-store/backup/run.ts +8 -27
- package/src/media-store/backup/sources.ts +63 -17
- package/src/media-store/backup/thread-copy.ts +16 -13
- package/src/media-store/backup/watch.ts +10 -6
- package/src/media-store/content.ts +3 -0
- package/src/media-store/copy/config.ts +10 -9
- package/src/media-store/copy/night.ts +4 -4
- package/src/media-store/daemon.ts +10 -6
- package/src/media-store/db.ts +10 -20
- package/src/media-store/forget-one.ts +247 -0
- package/src/media-store/forget.ts +23 -4
- package/src/media-store/hq-send.ts +5 -4
- package/src/media-store/purge.ts +2 -2
- package/src/media-store/put.ts +3 -0
- package/src/media-store/remote.ts +2 -2
- package/src/media-store/space-listing.ts +0 -5
- package/src/media-store/space.ts +15 -16
- package/src/media-store/tidy.ts +3 -3
- package/src/media-store/upload.ts +6 -2
- package/src/media-store/webp.ts +3 -3
- package/src/messages/collection.ts +2 -2
- package/src/messages/model.ts +6 -1
- package/src/messages/objects.ts +5 -3
- package/src/messages/routes.ts +3 -0
- package/src/messages/score.ts +1 -3
- package/src/messages/store-doc.ts +114 -0
- package/src/messages/verdicts.ts +6 -0
- package/src/messages/write.ts +3 -3
- package/src/mv/mv-md.ts +43 -12
- package/src/orchestrator/brief.md +31 -0
- package/src/orchestrator/channel-declare.ts +58 -0
- package/src/orchestrator/channel.ts +226 -0
- package/src/orchestrator/guards.ts +72 -0
- package/src/orchestrator/host.ts +35 -0
- package/src/orchestrator/lead-shape.ts +86 -0
- package/src/orchestrator/now.ts +88 -0
- package/src/orchestrator/phone.ts +101 -0
- package/src/orchestrator/places-file.ts +38 -0
- package/src/orchestrator/places-look.ts +180 -0
- package/src/orchestrator/places-shape.ts +151 -0
- package/src/orchestrator/places.ts +50 -0
- package/src/orchestrator/presence-shape.ts +28 -0
- package/src/orchestrator/presence.ts +79 -0
- package/src/orchestrator/push.ts +97 -0
- package/src/orchestrator/role-shape.ts +270 -0
- package/src/orchestrator/role.ts +242 -0
- package/src/orchestrator/routes.ts +218 -0
- package/src/orchestrator/sessions-shape.ts +78 -0
- package/src/orchestrator/sessions.ts +86 -0
- package/src/orchestrator/share.ts +71 -0
- package/src/orchestrator/start-notice.ts +61 -0
- package/src/orchestrator/start.ts +137 -0
- package/src/orchestrator/started.ts +55 -0
- package/src/orchestrator/stuck.ts +196 -0
- package/src/orchestrator/unheard.ts +79 -0
- package/src/pages/frame-client.ts +44 -6
- package/src/pages/unit.ts +1 -1
- package/src/plan/repo-source.ts +1 -1
- package/src/problems/failure-words.ts +80 -0
- package/src/recordings/load.ts +1 -1
- package/src/recordings/model.ts +18 -10
- package/src/recordings/place.ts +3 -3
- package/src/recordings/recorder-app/Capture.swift +69 -21
- package/src/recordings/recorder-app/Editor.swift +214 -11
- package/src/recordings/recorder-app/main.swift +229 -47
- package/src/recordings/recorder-app.ts +1 -1
- package/src/recordings/routes.ts +11 -1
- package/src/recordings/take.ts +7 -5
- package/src/recordings/view.ts +6 -0
- package/src/reflect/prompt-corpus.ts +5 -3
- package/src/reflect/thread-words.ts +51 -0
- package/src/reflections/reflection-close.ts +123 -0
- package/src/reflections/reflection-doc.ts +59 -0
- package/src/reflections/reflection-place.ts +60 -0
- package/src/release/gate-checkout.ts +122 -20
- package/src/release/git-facts.ts +9 -8
- package/src/release/machine-words.ts +21 -3
- package/src/release/public-clean.ts +78 -19
- package/src/release/run-bump.ts +29 -10
- package/src/release/run-release.ts +76 -52
- package/src/releases/add.ts +33 -87
- package/src/releases/{from-card.ts → from-thread.ts} +47 -46
- package/src/releases/model.ts +207 -36
- package/src/releases/routes.ts +2 -2
- package/src/releases/shape.ts +184 -0
- package/src/releases/store.ts +10 -10
- package/src/repo-config.ts +46 -8
- package/src/review/anim.ts +7 -7
- package/src/review/answer-kinds.ts +39 -10
- package/src/review/aside-at.ts +19 -0
- package/src/review/auto.ts +3 -3
- package/src/review/band.ts +95 -3
- package/src/review/branch-hold.ts +12 -5
- package/src/review/cells.ts +169 -46
- package/src/review/doc-card.ts +41 -0
- package/src/review/doc-model.ts +100 -0
- package/src/review/doc-routes.ts +66 -0
- package/src/review/doc-save.ts +152 -0
- package/src/review/{draft-card.ts → draft-item.ts} +10 -7
- package/src/review/draft-model.ts +125 -17
- package/src/review/events.ts +5 -12
- package/src/review/file-tags.ts +52 -0
- package/src/review/format.ts +84 -41
- package/src/review/gone.ts +20 -20
- package/src/review/hand-over.ts +58 -0
- package/src/review/heard.ts +29 -0
- package/src/review/house-kind-defs.ts +34 -4
- package/src/review/http.ts +1 -1
- package/src/review/inbox-hook.ts +64 -10
- package/src/review/inbox-read.ts +54 -16
- package/src/review/instruction-guards.ts +137 -0
- package/src/review/instructions.ts +56 -2
- package/src/review/{card-db.ts → item-db.ts} +84 -32
- package/src/review/{card-rows.ts → item-rows.ts} +77 -50
- package/src/review/kind-still.ts +125 -0
- package/src/review/kinds.ts +46 -10
- package/src/review/lane-ask.ts +6 -2
- package/src/review/live-post.ts +107 -0
- package/src/review/live-view.ts +137 -0
- package/src/review/media-kind.ts +4 -4
- package/src/review/media-read.ts +4 -4
- package/src/review/media.ts +3 -5
- package/src/review/mentions.ts +102 -0
- package/src/review/model-moved.ts +76 -0
- package/src/review/model.ts +474 -151
- package/src/review/move.ts +59 -58
- package/src/review/need-address.ts +5 -5
- package/src/review/need-threads.ts +15 -57
- package/src/review/notes.ts +2 -1
- package/src/review/one-block.ts +64 -0
- package/src/review/owner-read.ts +41 -0
- package/src/review/owner-verdict.ts +3 -3
- package/src/review/parties.ts +172 -11
- package/src/review/paste.ts +4 -4
- package/src/review/phone-push.ts +137 -0
- package/src/review/previews.ts +16 -16
- package/src/review/project.ts +1 -1
- package/src/review/push.ts +286 -0
- package/src/review/referring.ts +26 -4
- package/src/review/reflection-object.ts +13 -18
- package/src/review/rev.ts +1 -1
- package/src/review/role.ts +3 -3
- package/src/review/routes.ts +124 -77
- package/src/review/search-index.ts +218 -0
- package/src/review/search-job.ts +40 -0
- package/src/review/search-ocr.ts +138 -0
- package/src/review/search-text.ts +129 -0
- package/src/review/secret-route.ts +45 -15
- package/src/review/settle.ts +67 -0
- package/src/review/snooze.ts +1 -16
- package/src/review/stage-routes.ts +15 -13
- package/src/review/{stage-card.ts → stage-thread.ts} +18 -17
- package/src/review/store-index.ts +49 -0
- package/src/review/store-parties.ts +22 -0
- package/src/review/store.ts +394 -214
- package/src/review/supersede.ts +23 -7
- package/src/review/take-back.ts +20 -6
- package/src/review/threads.ts +196 -64
- package/src/review/traces.ts +21 -33
- package/src/review/trailer-desk.ts +7 -7
- package/src/review/{trailer-card.ts → trailer-item.ts} +10 -10
- package/src/review/trailer-model.ts +4 -4
- package/src/review/trailer-notes.ts +2 -2
- package/src/review/trailer-routes.ts +5 -4
- package/src/review/trailer-shots.ts +3 -3
- package/src/review/unit.ts +71 -9
- package/src/review/uploads.ts +103 -0
- package/src/review/verdict-items.ts +2 -2
- package/src/review/verdict-write.ts +1 -1
- package/src/review/view-layout.ts +76 -0
- package/src/review/wait.ts +11 -5
- package/src/review/wakes.ts +115 -0
- package/src/review/watch-feed.ts +183 -0
- package/src/review/watchers.ts +48 -6
- package/src/rules/untrack-generated.ts +40 -39
- package/src/scaffold/files/bunfig.toml +1 -9
- package/src/scaffold/files/vscode-settings.json +1 -1
- package/src/scaffold/project-scaffold.ts +14 -10
- package/src/secrets/archive.ts +2 -1
- package/src/secrets/key-pair.ts +14 -0
- package/src/secrets/keychain-write.ts +11 -3
- package/src/secrets/lapse-mark.ts +8 -3
- package/src/secrets/lapse.ts +28 -17
- package/src/secrets/manager.ts +5 -1
- package/src/secrets/name-template.ts +83 -0
- package/src/secrets/name.ts +3 -0
- package/src/secrets/read.ts +10 -6
- package/src/secrets/secrets-view.ts +299 -0
- package/src/secrets/security-line.ts +19 -0
- package/src/secrets/who-reads.ts +2 -1
- package/src/serve/embed.ts +1 -1
- package/src/serve/frame-part.ts +49 -0
- package/src/serve/house-runs.ts +1 -1
- package/src/serve/hub-app/accounts-line.tsx +55 -0
- package/src/serve/hub-app/activity-st.ts +50 -53
- package/src/serve/hub-app/activity-view.tsx +10 -9
- package/src/serve/hub-app/advice-box.tsx +67 -0
- package/src/serve/hub-app/advisor-app.tsx +48 -0
- package/src/serve/hub-app/advisor-face.tsx +30 -0
- package/src/serve/hub-app/advisor-host.ts +142 -0
- package/src/serve/hub-app/advisor.html +23 -0
- package/src/serve/hub-app/advisors-st.ts +261 -0
- package/src/serve/hub-app/advisors-view.tsx +311 -0
- package/src/serve/hub-app/advisors.css +61 -0
- package/src/serve/hub-app/app-bridge.ts +53 -24
- package/src/serve/hub-app/ask-steps-st.ts +60 -0
- package/src/serve/hub-app/ask-steps.tsx +23 -0
- package/src/serve/hub-app/asked-page.ts +24 -0
- package/src/serve/hub-app/asks-page.tsx +16 -9
- package/src/serve/hub-app/asks-st.ts +1 -4
- package/src/serve/hub-app/auto-text.tsx +110 -16
- package/src/serve/hub-app/card-head.tsx +3 -2
- package/src/serve/hub-app/check-view.tsx +10 -9
- package/src/serve/hub-app/checks-svc.ts +96 -32
- package/src/serve/hub-app/clock-svc.ts +41 -9
- package/src/serve/hub-app/code-copy.ts +173 -12
- package/src/serve/hub-app/col-card.tsx +15 -21
- package/src/serve/hub-app/col-list-page.tsx +14 -8
- package/src/serve/hub-app/col-list-st.ts +18 -3
- package/src/serve/hub-app/col-tables-view.tsx +8 -44
- package/src/serve/hub-app/col-tables.ts +14 -22
- package/src/serve/hub-app/cols-svc.ts +17 -13
- package/src/serve/hub-app/columns.ts +94 -0
- package/src/serve/hub-app/comfy-svc.ts +3 -2
- package/src/serve/hub-app/comfy-view.tsx +8 -7
- package/src/serve/hub-app/commands/commands-page.tsx +4 -3
- package/src/serve/hub-app/commands/commands-st.ts +37 -27
- package/src/serve/hub-app/controls.css +80 -18
- package/src/serve/hub-app/cursor-spot.ts +81 -0
- package/src/serve/hub-app/cycle-button.tsx +2 -1
- package/src/serve/hub-app/database-st.ts +32 -27
- package/src/serve/hub-app/database-view.tsx +16 -14
- package/src/serve/hub-app/deaf.tsx +27 -0
- package/src/serve/hub-app/dock-st.ts +72 -26
- package/src/serve/hub-app/dock-view.tsx +32 -12
- package/src/serve/hub-app/editor/doc-editor-st.ts +223 -0
- package/src/serve/hub-app/editor/doc-editor.tsx +116 -0
- package/src/serve/hub-app/editor/doc-saved.tsx +26 -0
- package/src/serve/hub-app/editor/doc-slot.ts +66 -0
- package/src/serve/hub-app/editor.css +36 -0
- package/src/serve/hub-app/emoji-names.ts +1915 -0
- package/src/serve/hub-app/emoji.ts +133 -0
- package/src/serve/hub-app/empty-section.tsx +30 -0
- package/src/serve/hub-app/entry-bar.css +1 -1
- package/src/serve/hub-app/entry-bar.tsx +11 -6
- package/src/serve/hub-app/entry-list.css +32 -0
- package/src/serve/hub-app/entry-list.tsx +123 -0
- package/src/serve/hub-app/entry-pick.ts +1 -1
- package/src/serve/hub-app/entry-sections.ts +140 -0
- package/src/serve/hub-app/event-stream-reader.ts +56 -0
- package/src/serve/hub-app/floating.tsx +217 -7
- package/src/serve/hub-app/geometry-view.tsx +3 -2
- package/src/serve/hub-app/git-st.ts +25 -19
- package/src/serve/hub-app/git-view.tsx +3 -2
- package/src/serve/hub-app/hash-route.ts +15 -3
- package/src/serve/hub-app/header-bar.tsx +53 -35
- package/src/serve/hub-app/held-keys.ts +25 -0
- package/src/serve/hub-app/home-st.ts +238 -23
- package/src/serve/hub-app/home-strip.css +24 -12
- package/src/serve/hub-app/home-strip.tsx +134 -66
- package/src/serve/hub-app/home.html +12 -0
- package/src/serve/hub-app/hub-app.tsx +123 -81
- package/src/serve/hub-app/hub.css +92 -89
- package/src/serve/hub-app/icons.tsx +26 -0
- package/src/serve/hub-app/identities-st.ts +53 -78
- package/src/serve/hub-app/identities-view.tsx +34 -30
- package/src/serve/hub-app/identity-address.ts +2 -2
- package/src/serve/hub-app/in-sight.ts +10 -0
- package/src/serve/hub-app/inbox-st.ts +57 -11
- package/src/serve/hub-app/inbox-view.tsx +24 -12
- package/src/serve/hub-app/inbox.css +7 -3
- package/src/serve/hub-app/index.html +12 -0
- package/src/serve/hub-app/insights-st.ts +27 -19
- package/src/serve/hub-app/insights-view.tsx +6 -5
- package/src/serve/hub-app/instructions.css +13 -7
- package/src/serve/hub-app/kept-cols.tsx +83 -20
- package/src/serve/hub-app/kept-folds.ts +43 -0
- package/src/serve/hub-app/kept-width.tsx +76 -0
- package/src/serve/hub-app/keys.ts +122 -38
- package/src/serve/hub-app/later.tsx +1 -1
- package/src/serve/hub-app/layout-st.ts +118 -77
- package/src/serve/hub-app/lightbox-zoom.css +36 -0
- package/src/serve/hub-app/list-filter.tsx +15 -6
- package/src/serve/hub-app/list-head.tsx +29 -0
- package/src/serve/hub-app/list-row.ts +8 -0
- package/src/serve/hub-app/list-walk.ts +26 -105
- package/src/serve/hub-app/live-bar.css +12 -0
- package/src/serve/hub-app/live-socket.ts +274 -0
- package/src/serve/hub-app/live-sources.ts +189 -0
- package/src/serve/hub-app/live-svc.ts +12 -2
- package/src/serve/hub-app/machine-st.ts +105 -18
- package/src/serve/hub-app/machines-st.ts +40 -34
- package/src/serve/hub-app/machines-view.tsx +5 -5
- package/src/serve/hub-app/main-panel.css +211 -0
- package/src/serve/hub-app/main-panel.tsx +259 -0
- package/src/serve/hub-app/markdown.css +81 -4
- package/src/serve/hub-app/md.ts +155 -9
- package/src/serve/hub-app/media-svc.ts +49 -16
- package/src/serve/hub-app/media-view.tsx +13 -12
- package/src/serve/hub-app/messages/messages-page.tsx +63 -18
- package/src/serve/hub-app/messages/messages-st.ts +29 -22
- package/src/serve/hub-app/new-thread-st.ts +170 -0
- package/src/serve/hub-app/new-thread.tsx +147 -0
- package/src/serve/hub-app/objects.css +1 -0
- package/src/serve/hub-app/orchestrator-line.tsx +174 -0
- package/src/serve/hub-app/orchestrator-places.tsx +86 -0
- package/src/serve/hub-app/orchestrator.css +89 -0
- package/src/serve/hub-app/page-keys.ts +111 -69
- package/src/serve/hub-app/page-reload.ts +151 -0
- package/src/serve/hub-app/pages-frames.tsx +42 -4
- package/src/serve/hub-app/pages-svc.ts +11 -4
- package/src/serve/hub-app/palette-st.ts +200 -40
- package/src/serve/hub-app/palette-view.tsx +32 -8
- package/src/serve/hub-app/pane-boundary.tsx +13 -0
- package/src/serve/hub-app/pane-errors.ts +2 -1
- package/src/serve/hub-app/panel-head-action.tsx +39 -0
- package/src/serve/hub-app/panel-head.tsx +70 -0
- package/src/serve/hub-app/panel-repo.ts +42 -0
- package/src/serve/hub-app/panel-source.ts +195 -0
- package/src/serve/hub-app/panel-tint.css +6 -0
- package/src/serve/hub-app/panel-tint.ts +23 -0
- package/src/serve/hub-app/panel-walk.ts +107 -0
- package/src/serve/hub-app/pano.css +20 -0
- package/src/serve/hub-app/pill-row.tsx +2 -1
- package/src/serve/hub-app/place-path.ts +4 -0
- package/src/serve/hub-app/places-svc.ts +75 -0
- package/src/serve/hub-app/plan-view.tsx +4 -3
- package/src/serve/hub-app/planned-st.ts +30 -26
- package/src/serve/hub-app/planned-view.tsx +16 -9
- package/src/serve/hub-app/polled.ts +211 -0
- package/src/serve/hub-app/presence-st.ts +144 -0
- package/src/serve/hub-app/processes-view.tsx +2 -2
- package/src/serve/hub-app/project-bar.tsx +116 -0
- package/src/serve/hub-app/project-list.css +39 -149
- package/src/serve/hub-app/project-list.tsx +63 -344
- package/src/serve/hub-app/projects-svc.ts +166 -87
- package/src/serve/hub-app/push-sign.tsx +16 -0
- package/src/serve/hub-app/push-svc.ts +290 -0
- package/src/serve/hub-app/quiet-st.ts +61 -0
- package/src/serve/hub-app/rail-groups.ts +144 -0
- package/src/serve/hub-app/reach.ts +16 -0
- package/src/serve/hub-app/reader-chips.tsx +2 -1
- package/src/serve/hub-app/recordings-st.ts +171 -10
- package/src/serve/hub-app/recordings-take.ts +58 -0
- package/src/serve/hub-app/recordings-view.tsx +51 -72
- package/src/serve/hub-app/recordings.css +0 -2
- package/src/serve/hub-app/reflections-page.tsx +24 -8
- package/src/serve/hub-app/releases/releases-page.tsx +56 -22
- package/src/serve/hub-app/releases/releases-st.ts +39 -26
- package/src/serve/hub-app/releases.css +4 -0
- package/src/serve/hub-app/repo-sections.ts +143 -43
- package/src/serve/hub-app/repo-st.ts +91 -43
- package/src/serve/hub-app/review/advisor-bar.tsx +41 -0
- package/src/serve/hub-app/review/ask-proof.tsx +79 -0
- package/src/serve/hub-app/review/attach-st.ts +195 -0
- package/src/serve/hub-app/review/attach-view.tsx +261 -0
- package/src/serve/hub-app/review/box-view.ts +479 -0
- package/src/serve/hub-app/review/box-zoom.tsx +70 -0
- package/src/serve/hub-app/review/clip-st.ts +1 -1
- package/src/serve/hub-app/review/cta.tsx +11 -0
- package/src/serve/hub-app/review/diff-view.tsx +40 -37
- package/src/serve/hub-app/review/doc-body.tsx +110 -0
- package/src/serve/hub-app/review/dock.tsx +38 -23
- package/src/serve/hub-app/review/draft-body.tsx +236 -0
- package/src/serve/hub-app/review/faces.tsx +18 -0
- package/src/serve/hub-app/review/group-block.tsx +80 -49
- package/src/serve/hub-app/review/heard-line.tsx +32 -0
- package/src/serve/hub-app/review/instructions-view.tsx +58 -32
- package/src/serve/hub-app/review/item-verdict.tsx +99 -26
- package/src/serve/hub-app/review/kind-states.tsx +149 -76
- package/src/serve/hub-app/review/kind-view.tsx +22 -7
- package/src/serve/hub-app/review/kit.tsx +27 -31
- package/src/serve/hub-app/review/lane-bar.tsx +33 -31
- package/src/serve/hub-app/review/lightbox.tsx +18 -0
- package/src/serve/hub-app/review/line-window.ts +149 -0
- package/src/serve/hub-app/review/live-bar-st.ts +145 -0
- package/src/serve/hub-app/review/live-bar.tsx +127 -0
- package/src/serve/hub-app/review/live-view.tsx +105 -0
- package/src/serve/hub-app/review/mention-st.ts +85 -0
- package/src/serve/hub-app/review/mesh-view.tsx +9 -0
- package/src/serve/hub-app/review/object-card.tsx +2 -1
- package/src/serve/hub-app/review/object-panel.tsx +41 -22
- package/src/serve/hub-app/review/pano-gl.ts +145 -0
- package/src/serve/hub-app/review/pano-view.tsx +193 -0
- package/src/serve/hub-app/review/phone-top.tsx +16 -0
- package/src/serve/hub-app/review/pictures-st.ts +38 -0
- package/src/serve/hub-app/review/question-views.tsx +111 -108
- package/src/serve/hub-app/review/review-board.tsx +1 -1
- package/src/serve/hub-app/review/review-cells.tsx +175 -116
- package/src/serve/hub-app/review/review-host.ts +72 -0
- package/src/serve/hub-app/review/review-kit.ts +41 -24
- package/src/serve/hub-app/review/review-list.tsx +210 -61
- package/src/serve/hub-app/review/review-page.tsx +10 -21
- package/src/serve/hub-app/review/review-st.ts +307 -148
- package/src/serve/hub-app/review/review-thread.tsx +633 -224
- package/src/serve/hub-app/review/review-views.tsx +636 -570
- package/src/serve/hub-app/review/scene-view.tsx +26 -0
- package/src/serve/hub-app/review/secret-facts.ts +26 -0
- package/src/serve/hub-app/review/space3d.tsx +122 -0
- package/src/serve/hub-app/review/splat-view.tsx +9 -0
- package/src/serve/hub-app/review/superseded-runs.ts +76 -0
- package/src/serve/hub-app/review/thread-close.tsx +40 -38
- package/src/serve/hub-app/review/thread-control-st.ts +2 -1
- package/src/serve/hub-app/review/thread-st.ts +542 -158
- package/src/serve/hub-app/review/thread-views.ts +71 -0
- package/src/serve/hub-app/review/{trailer-card.tsx → trailer-body.tsx} +38 -37
- package/src/serve/hub-app/review/trailer-page.tsx +41 -41
- package/src/serve/hub-app/review/trailer-st.ts +41 -40
- package/src/serve/hub-app/review/trailer-timeline.tsx +32 -27
- package/src/serve/hub-app/review/trailer-voices.tsx +32 -30
- package/src/serve/hub-app/review.css +398 -169
- package/src/serve/hub-app/row-acts.tsx +126 -0
- package/src/serve/hub-app/row-face.tsx +29 -0
- package/src/serve/hub-app/running-rows.tsx +142 -0
- package/src/serve/hub-app/running-st.ts +110 -0
- package/src/serve/hub-app/search-st.ts +138 -0
- package/src/serve/hub-app/search-view.tsx +93 -0
- package/src/serve/hub-app/secrets-page.tsx +290 -0
- package/src/serve/hub-app/secrets-st.ts +181 -0
- package/src/serve/hub-app/secrets.css +65 -0
- package/src/serve/hub-app/section-head.tsx +6 -4
- package/src/serve/hub-app/session-chips.tsx +55 -0
- package/src/serve/hub-app/shell-rows.ts +126 -0
- package/src/serve/hub-app/shell.ts +56 -0
- package/src/serve/hub-app/site/site-part.tsx +6 -5
- package/src/serve/hub-app/site/site-st.ts +18 -29
- package/src/serve/hub-app/site.css +0 -1
- package/src/serve/hub-app/social/calendar.tsx +7 -6
- package/src/serve/hub-app/social/comms-page.tsx +41 -35
- package/src/serve/hub-app/social/group-editor.tsx +45 -0
- package/src/serve/hub-app/social/kit.tsx +19 -57
- package/src/serve/hub-app/social/next-release.tsx +5 -4
- package/src/serve/hub-app/social/post-card.tsx +35 -70
- package/src/serve/hub-app/social/post-page.tsx +2 -1
- package/src/serve/hub-app/social/problems.tsx +8 -6
- package/src/serve/hub-app/social/social-page.tsx +32 -30
- package/src/serve/hub-app/social/social-st.ts +35 -86
- package/src/serve/hub-app/social/stage-popup.tsx +17 -16
- package/src/serve/hub-app/social/stage-st.ts +9 -9
- package/src/serve/hub-app/social.css +7 -13
- package/src/serve/hub-app/source-acts.ts +79 -0
- package/src/serve/hub-app/source-page.tsx +17 -0
- package/src/serve/hub-app/space-st.ts +38 -48
- package/src/serve/hub-app/space-view.tsx +10 -9
- package/src/serve/hub-app/stores/stores-page.tsx +25 -23
- package/src/serve/hub-app/stores/stores-st.ts +20 -24
- package/src/serve/hub-app/stores.css +1 -1
- package/src/serve/hub-app/terminal-history-st.ts +112 -0
- package/src/serve/hub-app/terminal-input.ts +12 -0
- package/src/serve/hub-app/terminal-keys.ts +79 -0
- package/src/serve/hub-app/terminal-lib.ts +110 -0
- package/src/serve/hub-app/terminal-links.ts +55 -0
- package/src/serve/hub-app/terminal-list-st.ts +304 -0
- package/src/serve/hub-app/terminal-log-st.ts +242 -0
- package/src/serve/hub-app/terminal-out.ts +135 -0
- package/src/serve/hub-app/terminal-pages.tsx +115 -0
- package/src/serve/hub-app/terminal-panel.tsx +91 -0
- package/src/serve/hub-app/terminal-sources.tsx +335 -0
- package/src/serve/hub-app/terminal-st.ts +696 -0
- package/src/serve/hub-app/terminal-stream.ts +233 -0
- package/src/serve/hub-app/terminal-tab.tsx +64 -0
- package/src/serve/hub-app/terminal-widths.ts +30 -0
- package/src/serve/hub-app/terminal.css +61 -0
- package/src/serve/hub-app/test-view.tsx +5 -3
- package/src/serve/hub-app/tests-svc.ts +3 -2
- package/src/serve/hub-app/tests-view.tsx +16 -15
- package/src/serve/hub-app/theme-st.ts +6 -9
- package/src/serve/hub-app/thread-row.tsx +68 -25
- package/src/serve/hub-app/time-ago.tsx +41 -17
- package/src/serve/hub-app/time-st.ts +43 -27
- package/src/serve/hub-app/time-view.tsx +4 -3
- package/src/serve/hub-app/time.css +1 -1
- package/src/serve/hub-app/timeline-chart.tsx +5 -4
- package/src/serve/hub-app/timeline-view.tsx +10 -9
- package/src/serve/hub-app/tips.ts +247 -0
- package/src/serve/hub-app/tree-build.ts +42 -10
- package/src/serve/hub-app/tree-svc.ts +168 -135
- package/src/serve/hub-app/unit-icons.ts +26 -0
- package/src/serve/hub-app/url-address.ts +154 -0
- package/src/serve/hub-app/url-faces.ts +88 -0
- package/src/serve/hub-app/url-forms.tsx +183 -0
- package/src/serve/hub-app/urls-svc.ts +172 -9
- package/src/serve/hub-app/urls-view.tsx +56 -20
- package/src/serve/hub-app/urls.css +26 -0
- package/src/serve/hub-app/vault-st.ts +32 -27
- package/src/serve/hub-app/vault-view.tsx +56 -4
- package/src/serve/hub-app/vault.css +2 -0
- package/src/serve/hub-app/veille/veille-page.tsx +38 -37
- package/src/serve/hub-app/veille/veille-st.ts +60 -50
- package/src/serve/hub-app/view-layout.css +90 -0
- package/src/serve/hub-app/waiting-svc.ts +2 -1
- package/src/serve/hub-app/when-view.tsx +5 -4
- package/src/serve/hub-app/wiki-st.ts +3 -2
- package/src/serve/hub-app/wikis-view.tsx +24 -20
- package/src/serve/hub-app/words.tsx +22 -0
- package/src/serve/hub-collections.ts +105 -0
- package/src/serve/hub-runtime.ts +68 -89
- package/src/serve/live-hop.ts +102 -0
- package/src/serve/orchestrator-host.ts +58 -0
- package/src/serve/other-repos.ts +1 -1
- package/src/serve/page-live.ts +147 -0
- package/src/serve/project-gutter-route.ts +116 -42
- package/src/serve/read-thread.ts +76 -0
- package/src/serve/read-worker.ts +58 -0
- package/src/serve/run-serve.ts +11 -7
- package/src/serve/runs-stamp.ts +33 -0
- package/src/serve/secrets-read.ts +156 -0
- package/src/serve/serve-hub.ts +168 -50
- package/src/serve/terminal-claudes.ts +185 -0
- package/src/serve/terminal-guard.ts +55 -0
- package/src/serve/terminal-host.ts +517 -0
- package/src/serve/terminal-record.ts +104 -0
- package/src/serve/terminal-route.ts +539 -0
- package/src/serve/terminal-shells.ts +3 -0
- package/src/serve/terminal-watch.ts +102 -0
- package/src/shipkit-files.ts +9 -4
- package/src/shipkit.ts +8 -8
- package/src/shot/client.ts +27 -16
- package/src/shot/dom-clip.ts +30 -5
- package/src/shot/film-box.ts +23 -8
- package/src/shot/serve-shot.ts +16 -5
- package/src/shot/shooter.ts +70 -24
- package/src/shot/shot-ask.ts +12 -6
- package/src/shot/shot-guard.ts +53 -0
- package/src/shot/shot-theme.ts +59 -0
- package/src/shot/still-file.ts +60 -0
- package/src/site/desk.ts +4 -3
- package/src/social/compose.ts +13 -7
- package/src/social/cover.ts +4 -3
- package/src/social/desk-index.ts +2 -2
- package/src/social/draft-doc.ts +88 -0
- package/src/social/draft-versions.ts +80 -0
- package/src/social/drafts.ts +22 -4
- package/src/social/fit.ts +4 -3
- package/src/social/house.ts +1 -1
- package/src/social/import-drafts.ts +1 -1
- package/src/social/kinds.ts +1 -1
- package/src/social/load.ts +21 -13
- package/src/social/media-facts.ts +1 -19
- package/src/social/media-kind.ts +2 -2
- package/src/social/media-limit.ts +3 -18
- package/src/social/no-account.ts +38 -0
- package/src/social/post-sources.ts +4 -4
- package/src/social/post-text.ts +33 -13
- package/src/social/posts.ts +73 -18
- package/src/social/presence.ts +10 -8
- package/src/social/release-stage.ts +22 -22
- package/src/social/routes.ts +14 -32
- package/src/social/stage.ts +3 -3
- package/src/social/stats.ts +3 -4
- package/src/social/strip.ts +4 -6
- package/src/social/text.ts +2 -1
- package/src/social/{card-drafts.ts → thread-drafts.ts} +3 -3
- package/src/social/unit.ts +12 -3
- package/src/social/writes.ts +3 -6
- package/src/start-repo.ts +33 -13
- package/src/stores/desk.ts +1 -1
- package/src/suite/core-counters.ts +31 -3
- package/src/suite/judge-suites.ts +69 -47
- package/src/suite/select.ts +1 -27
- package/src/suite/suite-cli.ts +18 -8
- package/src/suite/suite-cpu-preload.ts +10 -6
- package/src/suite/test-units.ts +6 -2
- package/src/trace/tracer.ts +4 -5
- package/src/trailer/build.ts +30 -15
- package/src/trailer/ffmpeg.ts +90 -31
- package/src/trailer/fonts.ts +5 -6
- package/src/trailer/footage.ts +9 -3
- package/src/trailer/grammar.ts +2 -1
- package/src/trailer/graph.ts +12 -10
- package/src/trailer/load-unit.ts +1 -1
- package/src/trailer/passage.ts +4 -3
- package/src/trailer/prune.ts +4 -4
- package/src/trailer/score/sound.ts +3 -3
- package/src/trailer/shot-plan.ts +5 -5
- package/src/trailer/shot-state.ts +25 -31
- package/src/trailer/sound/eleven.ts +3 -1
- package/src/trailer/sound/gen.ts +3 -3
- package/src/trailer/sound/run.ts +76 -64
- package/src/trailer/sound/takes.ts +0 -3
- package/src/trailer/take-fault.ts +41 -0
- package/src/trailer/titles.ts +17 -13
- package/src/trailer/url.ts +1 -1
- package/src/trailer/vertical-draw.ts +7 -7
- package/src/trailer/vertical.ts +3 -3
- package/src/trailer/vocab.ts +3 -4
- package/src/ts/config.ts +60 -24
- package/src/ts/cycles.ts +3 -1
- package/src/ts/imports.ts +17 -3
- package/src/ts/rename.ts +6 -7
- package/src/ts/source-graph.ts +15 -9
- package/src/ts/workspaces.ts +26 -0
- package/src/tui/build-steps-panel.ts +3 -3
- package/src/tui/checks-panel.ts +2 -2
- package/src/urls/added.ts +111 -0
- package/src/urls/frame.ts +3 -3
- package/src/urls/icons.ts +294 -0
- package/src/urls/places.ts +139 -0
- package/src/urls/routes.ts +18 -8
- package/src/urls/rows.ts +49 -16
- package/src/urls/unit.ts +57 -3
- package/src/urls/write-routes.ts +207 -0
- package/src/vault/house-keys.ts +1 -1
- package/src/vault/vault-audit.ts +2 -3
- package/src/vault/vault-config.ts +6 -2
- package/src/vault/vault-destroy.ts +2 -1
- package/src/vault/vault-import.ts +4 -11
- package/src/vault/vault-restore.ts +6 -11
- package/src/vault/vault-serve.ts +47 -11
- package/src/vault/vault-snapshot.ts +5 -14
- package/src/veille/chrome.ts +18 -3
- package/src/veille/desk.ts +2 -2
- package/src/veille/identity.ts +6 -0
- package/src/veille/routes.ts +1 -1
- package/src/view3d/cam.ts +85 -0
- package/src/view3d/lib.ts +87 -0
- package/src/view3d/loop.ts +39 -0
- package/src/view3d/scene-cache.ts +62 -0
- package/src/view3d/viewer.ts +454 -0
- package/src/wiki/agent-paths.ts +56 -0
- package/src/wiki/run-wiki.ts +4 -1
- package/src/wiki/serve-graph.ts +2 -3
- package/src/core/run-fix.ts +0 -120
- package/src/home/hmr-keep.ts +0 -134
- package/src/serve/hub-app/review/draft-card.tsx +0 -163
- package/src/serve/hub-app/review/note-place.ts +0 -31
- package/src/serve/hub-app/side-lists.ts +0 -72
- package/src/serve/hub-app/sidebar.tsx +0 -62
- package/src/serve/hub-app/tree-row.tsx +0 -100
- /package/src/{serve → http}/hub-port.ts +0 -0
- /package/src/{serve → http}/secret-gate.ts +0 -0
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
// the inbox page (wiki tools/shipkit/home-inbox.md): every repo's threads, newest first, each row with its repo's icon,
|
|
2
2
|
// what it waits on from him (judge, answer, do, read), its title, its age and a thumb; working, later and done folded
|
|
3
3
|
// at the bottom. A row opens
|
|
4
|
-
// its item in place with its repo's own views: a
|
|
4
|
+
// its item in place with its repo's own views: a thread in its thread view (review-thread.tsx), an ask or a need in
|
|
5
5
|
// its item view (item-view.tsx). On the desktop the list and the item side by side; on a phone one pane at a time,
|
|
6
6
|
// the list kept under the item so back finds it where it was. The head is one row: the title, the counts, and one icon
|
|
7
7
|
// per filter (what to do, projects, state, group by), each opening its toggles in a popover
|
|
8
8
|
import { observer } from 'mobx-react-lite'
|
|
9
|
+
import { ListFoldBar } from './kept-cols.tsx'
|
|
9
10
|
import { useLayoutEffect } from 'react'
|
|
10
11
|
import type { ReactNode } from 'react'
|
|
11
12
|
import { DEFAULT_STATE, INBOX_GROUPS, INBOX_LISTS, isReviewId, type InboxGroup, type InboxGroupNode, type InboxList, type InboxRow, type Wait } from '../../home/inbox-shape.ts'
|
|
12
13
|
import { BAND_WORDS } from '../../review/band.ts'
|
|
13
14
|
import { isOwnerWait } from '../../review/wait.ts'
|
|
14
15
|
import { waitGlyph } from './review/object-panel.tsx'
|
|
16
|
+
import { DeafMark, deafThread } from './deaf.tsx'
|
|
15
17
|
import { Pop } from './floating.tsx'
|
|
16
18
|
import { plainClick, type HomeSt } from './home-st.ts'
|
|
17
19
|
import { Icon, ICON } from './icons.tsx'
|
|
@@ -22,6 +24,8 @@ import type { RepoSt } from './repo-st.ts'
|
|
|
22
24
|
import { SectionHead } from './section-head.tsx'
|
|
23
25
|
import { ThreadColumn } from './review/review-thread.tsx'
|
|
24
26
|
import { ThreadRow as ThreadRowView, VerbGlyph } from './thread-row.tsx'
|
|
27
|
+
import { SearchField, SearchResults } from './search-view.tsx'
|
|
28
|
+
import { tip } from './tips.ts'
|
|
25
29
|
|
|
26
30
|
/** what each verb asks of him, on its badge's tooltip and its toggle */
|
|
27
31
|
const WAIT_SAYS: Record<Wait, string> = {
|
|
@@ -40,17 +44,21 @@ export const InboxView = observer(({ app }: { app: HomeSt }) => {
|
|
|
40
44
|
<div className="ib-phone">
|
|
41
45
|
<div className="ib-pane">
|
|
42
46
|
<Head app={app} />
|
|
43
|
-
<
|
|
47
|
+
<SearchField app={app} />
|
|
48
|
+
{ib.find.on ? <SearchResults app={app} /> : <InboxList app={app} />}
|
|
44
49
|
</div>
|
|
45
50
|
{open != null ? <OpenItem app={app} item={open} /> : null}
|
|
46
51
|
</div>
|
|
47
52
|
)
|
|
48
53
|
return (
|
|
49
|
-
<div className=
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
<div className={`ib-desk${app.layout.foldedOn('inbox', 'left') ? ' ib-folded' : ''}`}>
|
|
55
|
+
{app.layout.foldedOn('inbox', 'left') ? <ListFoldBar layout={app.layout} id="inbox" /> : (
|
|
56
|
+
<div className="ib-pane ib-listcol">
|
|
57
|
+
<Head app={app} />
|
|
58
|
+
<SearchField app={app} />
|
|
59
|
+
{ib.find.on ? <SearchResults app={app} /> : <InboxList app={app} />}
|
|
60
|
+
</div>
|
|
61
|
+
)}
|
|
54
62
|
<div className="ib-itemcol">{open != null ? <OpenItem app={app} item={open} /> : <div className="ph">{ib.count > 0 ? 'pick a row: it opens here' : ''}</div>}</div>
|
|
55
63
|
</div>
|
|
56
64
|
)
|
|
@@ -97,7 +105,7 @@ const FilterIcons = observer(({ app }: { app: HomeSt }) => {
|
|
|
97
105
|
<FilterPop icon={ICON.byLane} n={a.group} name="group by" says={a.group === 0 ? 'group by: nothing, one list' : `group by ${ib.groupBy.map((g) => GROUP_WORDS[g]).join(', then ')}`}>
|
|
98
106
|
<GroupPop ib={ib} />
|
|
99
107
|
</FilterPop>
|
|
100
|
-
{ib.filtered ? <button type="button" className="ib-fbtn ib-clearall"
|
|
108
|
+
{ib.filtered ? <button type="button" className="ib-fbtn ib-clearall" {...tip('every filter back to its default')} aria-label="clear every filter" onClick={() => ib.clearFilters()}>✕</button> : null}
|
|
101
109
|
</span>
|
|
102
110
|
)
|
|
103
111
|
})
|
|
@@ -119,7 +127,7 @@ const PopHead = ({ title, clear }: { title: string; clear: (() => void) | null }
|
|
|
119
127
|
|
|
120
128
|
/** one choice: its box (`some` when part of it is on), its words and count, and « only » beside it */
|
|
121
129
|
const Opt = ({ on, some = false, label, n, says, set, only, lead, cls = '' }: { on: boolean; some?: boolean; label: string; n?: number; says?: string; set: () => void; only?: () => void; lead?: ReactNode; cls?: string }) => (
|
|
122
|
-
<div className={`ib-opt${on ? ' on' : ''}${n === 0 ? ' none' : ''}${cls}`}
|
|
130
|
+
<div className={`ib-opt${on ? ' on' : ''}${n === 0 ? ' none' : ''}${cls}`} {...tip(says)}>
|
|
123
131
|
<label>
|
|
124
132
|
<input type="checkbox" checked={on} ref={(el) => { if (el != null) el.indeterminate = some }} onChange={set} />
|
|
125
133
|
{lead}
|
|
@@ -245,19 +253,23 @@ const InboxList = observer(({ app }: { app: HomeSt }) => {
|
|
|
245
253
|
|
|
246
254
|
const Row = observer(({ app, r }: { app: HomeSt; r: InboxRow }) => {
|
|
247
255
|
const ib = app.inbox
|
|
256
|
+
const proj = app.projects.list.find((x) => x.name === r.repo)
|
|
248
257
|
return (
|
|
249
258
|
<ThreadRowView
|
|
250
259
|
head={r.id}
|
|
260
|
+
row={r.key}
|
|
251
261
|
title={r.title}
|
|
252
262
|
href={r.open}
|
|
253
263
|
on={ib.open?.repo === r.repo && ib.open.id === r.id}
|
|
254
264
|
{...(r.unread ? { unread: true } : {})}
|
|
255
265
|
thumb={r.thumb}
|
|
256
266
|
// the verb of his turn; working and done are said by the list's own head
|
|
257
|
-
{...(isOwnerWait(r.wait) ? { need: r.wait, needSays: WAIT_SAYS[r.wait] } : {})}
|
|
267
|
+
{...(isOwnerWait(r.wait) ? { need: r.wait, needSays: WAIT_SAYS[r.wait] } : r.owed ? { owed: r.owed } : {})}
|
|
258
268
|
glyph={r.waitsOn ? waitGlyph(r.waitsOn, null) : null}
|
|
259
269
|
project={r.repo}
|
|
260
|
-
|
|
270
|
+
face={<Face p={proj ?? { name: r.repo, icon: null }} px={16} />}
|
|
271
|
+
// a list of every project: each row nobody hears wears the mark (deaf.tsx)
|
|
272
|
+
words={[...(r.sub != null ? [r.sub] : []), ...(r.deaf != null ? [<DeafMark key="deaf" why={deafThread(r.deaf === 'nobody holds it' ? null : r.deaf)} />] : [])]}
|
|
261
273
|
{...(r.at != null ? { at: r.at } : {})}
|
|
262
274
|
clock={ib.clock}
|
|
263
275
|
tip={WAIT_SAYS[r.wait]}
|
|
@@ -301,7 +313,7 @@ const ItemTop = observer(({ app }: { app: HomeSt }) =>
|
|
|
301
313
|
|
|
302
314
|
const ReviewItem = observer(({ app, repo, id }: { app: HomeSt; repo: RepoSt; id: string }) => {
|
|
303
315
|
const rv = repo.review
|
|
304
|
-
// before the first paint, so the column never draws the
|
|
316
|
+
// before the first paint, so the column never draws the thread the repo's page held
|
|
305
317
|
useLayoutEffect(() => {
|
|
306
318
|
rv.select(id)
|
|
307
319
|
rv.start()
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* the inbox (inbox-view.tsx): the list and the item side by side on a desktop, one pane at a time on a phone, where
|
|
2
2
|
the page covers the home as an app (the safe area kept clear, every target a thumb's size, no field under 16px) */
|
|
3
3
|
.ib-desk{flex:1;min-height:0;display:grid;grid-template-columns:minmax(300px,440px) minmax(0,1fr)}
|
|
4
|
+
.ib-desk.ib-folded{grid-template-columns:auto minmax(0,1fr)}
|
|
4
5
|
.ib-pane{min-height:0;overflow-y:auto;overscroll-behavior:contain}
|
|
5
6
|
.ib-listcol{border-right:1px solid var(--line);background:var(--bg-side)}
|
|
6
7
|
.ib-itemcol{min-width:0;min-height:0;display:flex;flex-direction:column}
|
|
@@ -13,13 +14,16 @@
|
|
|
13
14
|
.ib-counts>*{white-space:nowrap}
|
|
14
15
|
.ib-counts b{color:var(--review)}
|
|
15
16
|
.ib-dim{color:var(--dim)}
|
|
16
|
-
|
|
17
|
+
/* the search over every thread: its field under the head, its count and time over its rows */
|
|
18
|
+
.ib-find{display:flex;align-items:center;gap:var(--s2);padding:0 var(--s3) var(--s2) var(--s4)}
|
|
19
|
+
.ib-find .rv-search{flex:1;min-width:0}
|
|
20
|
+
.ib-foundhead{display:flex;flex-wrap:wrap;gap:var(--s2);padding:var(--s1) var(--s4) var(--s2);font-size:12.5px;color:var(--ink)}
|
|
21
|
+
/* a size container: the shared row (thread-row.tsx) draws one line where its list is 320px or wider */
|
|
22
|
+
.ib-list{display:flex;flex-direction:column;padding:0 0 var(--s4);container-type:inline-size}
|
|
17
23
|
.ib-list>.err{color:var(--red);padding:var(--s2) var(--s4);font-size:13px}
|
|
18
24
|
.ib-wait{display:flex;align-items:center;gap:var(--s2);color:var(--dim);padding:var(--s4)}
|
|
19
25
|
.ib-clear{color:var(--dim);font-size:15px;padding:var(--s4);display:flex;flex-wrap:wrap;align-items:center;gap:var(--s2)}
|
|
20
26
|
|
|
21
|
-
.ib-sub{overflow:hidden;text-overflow:ellipsis;min-width:0}
|
|
22
|
-
|
|
23
27
|
/* the filter icons: each opens its popover; one that filters reads accent, the number of its choices on it */
|
|
24
28
|
.ib-filters{flex:none;display:flex;align-items:center;gap:2px;margin-left:auto}
|
|
25
29
|
button.ib-fbtn{display:inline-flex;align-items:center;justify-content:center;gap:2px;height:28px;min-width:28px;padding:0 var(--s1);color:var(--dim);background:transparent;border:1px solid transparent;border-radius:5px}
|
|
@@ -6,11 +6,15 @@
|
|
|
6
6
|
<title>hub</title>
|
|
7
7
|
<link rel="stylesheet" href="./hub.css" />
|
|
8
8
|
<link rel="stylesheet" href="./markdown.css" />
|
|
9
|
+
<link rel="stylesheet" href="./terminal.css" />
|
|
9
10
|
<link rel="stylesheet" href="./project-list.css" />
|
|
11
|
+
<link rel="stylesheet" href="./panel-tint.css" />
|
|
12
|
+
<link rel="stylesheet" href="./main-panel.css" />
|
|
10
13
|
<link rel="stylesheet" href="./home-strip.css" />
|
|
11
14
|
<link rel="stylesheet" href="./planned.css" />
|
|
12
15
|
<link rel="stylesheet" href="./when.css" />
|
|
13
16
|
<link rel="stylesheet" href="./urls.css" />
|
|
17
|
+
<link rel="stylesheet" href="./live-bar.css" />
|
|
14
18
|
<link rel="stylesheet" href="./activity.css" />
|
|
15
19
|
<link rel="stylesheet" href="./insights.css" />
|
|
16
20
|
<link rel="stylesheet" href="./time.css" />
|
|
@@ -18,16 +22,24 @@
|
|
|
18
22
|
<link rel="stylesheet" href="./database.css" />
|
|
19
23
|
<link rel="stylesheet" href="./entry-bar.css" />
|
|
20
24
|
<link rel="stylesheet" href="./vault.css" />
|
|
25
|
+
<link rel="stylesheet" href="./advisors.css" />
|
|
21
26
|
<link rel="stylesheet" href="./space.css" />
|
|
22
27
|
<link rel="stylesheet" href="./readme.css" />
|
|
23
28
|
<link rel="stylesheet" href="./dock.css" />
|
|
24
29
|
<link rel="stylesheet" href="./controls.css" />
|
|
25
30
|
<link rel="stylesheet" href="./review.css" />
|
|
31
|
+
<link rel="stylesheet" href="./pano.css" />
|
|
32
|
+
<link rel="stylesheet" href="./view-layout.css" />
|
|
33
|
+
<link rel="stylesheet" href="./lightbox-zoom.css" />
|
|
34
|
+
<link rel="stylesheet" href="./orchestrator.css" />
|
|
26
35
|
<link rel="stylesheet" href="./instructions.css" />
|
|
27
36
|
<link rel="stylesheet" href="./objects.css" />
|
|
28
37
|
<link rel="stylesheet" href="./stores.css" />
|
|
29
38
|
<link rel="stylesheet" href="./messages.css" />
|
|
39
|
+
<link rel="stylesheet" href="./entry-list.css" />
|
|
40
|
+
<link rel="stylesheet" href="./secrets.css" />
|
|
30
41
|
<link rel="stylesheet" href="./releases.css" />
|
|
42
|
+
<link rel="stylesheet" href="./editor.css" />
|
|
31
43
|
<link rel="stylesheet" href="./commands.css" />
|
|
32
44
|
<link rel="stylesheet" href="./veille.css" />
|
|
33
45
|
<link rel="stylesheet" href="./social.css" />
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
// reads once when the page shows and on the refresh button, never on a clock:
|
|
4
4
|
// manifests change far slower than anyone reads them. The scope and the tag
|
|
5
5
|
// are remembered per viewer.
|
|
6
|
-
import { makeAutoObservable
|
|
6
|
+
import { makeAutoObservable } from 'mobx'
|
|
7
7
|
import { rowMatches, SCOPES, tagsOf, type InsightBox, type InsightRow, type InsightsAnswer, type Scope } from '../../home/insights-shape.ts'
|
|
8
8
|
import type { HomeSt } from './home-st.ts'
|
|
9
|
+
import { PolledResource } from './polled.ts'
|
|
9
10
|
import { ownTrouble, reach } from './reach.ts'
|
|
10
11
|
|
|
11
12
|
/** the rows a box shows before its "show all" */
|
|
@@ -25,9 +26,8 @@ function keep(key: string, v: string): void {
|
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
export class InsightsSt {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
loading = false
|
|
29
|
+
/** `GET /api/home/insights.json` for the scope picked, read when the page shows; `fresh` reads every manifest again */
|
|
30
|
+
readonly res: PolledResource<InsightsAnswer>
|
|
31
31
|
scope: Scope = (SCOPES as readonly string[]).includes(kept(SCOPE_KEY) ?? '') ? (kept(SCOPE_KEY) as Scope) : 'house'
|
|
32
32
|
/** the tag whose boxes show, null for every box */
|
|
33
33
|
tag: string | null = kept(TAG_KEY) || null
|
|
@@ -36,10 +36,29 @@ export class InsightsSt {
|
|
|
36
36
|
full = new Set<string>()
|
|
37
37
|
/** `box/key` of each row whose uses show under it */
|
|
38
38
|
open = new Set<string>()
|
|
39
|
-
private gen = 0
|
|
40
39
|
|
|
41
40
|
constructor(private st: HomeSt) {
|
|
42
|
-
|
|
41
|
+
this.res = new PolledResource({
|
|
42
|
+
read: async (fresh) => {
|
|
43
|
+
const r = await reach(`/api/home/insights.json?scope=${this.scope}${fresh ? '&fresh=1' : ''}`, { signal: AbortSignal.timeout(60_000) })
|
|
44
|
+
if (!r.ok) throw new Error(`${r.status} ${await r.text()}`)
|
|
45
|
+
return (await r.json()) as InsightsAnswer
|
|
46
|
+
},
|
|
47
|
+
trouble: (e) => ownTrouble(e, this.st.machine),
|
|
48
|
+
})
|
|
49
|
+
makeAutoObservable<this, 'st'>(this, { st: false, res: false })
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
get data(): InsightsAnswer | null {
|
|
53
|
+
return this.res.value ?? null
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
get error(): string {
|
|
57
|
+
return this.res.error
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
get loading(): boolean {
|
|
61
|
+
return this.res.reading
|
|
43
62
|
}
|
|
44
63
|
|
|
45
64
|
get tags(): string[] {
|
|
@@ -89,19 +108,8 @@ export class InsightsSt {
|
|
|
89
108
|
if (!this.loading) void this.load(true)
|
|
90
109
|
}
|
|
91
110
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
this.loading = true
|
|
95
|
-
try {
|
|
96
|
-
const r = await reach(`/api/home/insights.json?scope=${this.scope}${fresh ? '&fresh=1' : ''}`, { signal: AbortSignal.timeout(60_000) })
|
|
97
|
-
if (!r.ok) throw new Error(`${r.status} ${await r.text()}`)
|
|
98
|
-
const j = (await r.json()) as InsightsAnswer
|
|
99
|
-
runInAction(() => { if (id === this.gen) { this.data = j; this.error = '' } })
|
|
100
|
-
} catch (e) {
|
|
101
|
-
runInAction(() => { if (id === this.gen) this.error = ownTrouble(e, this.st.machine) })
|
|
102
|
-
} finally {
|
|
103
|
-
runInAction(() => { if (id === this.gen) this.loading = false })
|
|
104
|
-
}
|
|
111
|
+
load(fresh = false): Promise<void> {
|
|
112
|
+
return this.res.refresh(fresh)
|
|
105
113
|
}
|
|
106
114
|
|
|
107
115
|
/** reads when the page shows */
|
|
@@ -8,6 +8,7 @@ import { placeWords, type InsightBox, type InsightRow, type Scope } from '../../
|
|
|
8
8
|
import type { HomeSt } from './home-st.ts'
|
|
9
9
|
import { plainClick, repoPage } from './home-st.ts'
|
|
10
10
|
import { BOX_ROWS } from './insights-st.ts'
|
|
11
|
+
import { tip } from './tips.ts'
|
|
11
12
|
|
|
12
13
|
const SCOPE_WORDS: Record<Scope, { label: string; title: string }> = {
|
|
13
14
|
house: { label: 'house', title: 'the repos on the project list' },
|
|
@@ -23,7 +24,7 @@ const Row = observer(({ app, box, r }: { app: HomeSt; box: InsightBox; r: Insigh
|
|
|
23
24
|
const house = new Set(app.projects.list.map((p) => p.name))
|
|
24
25
|
return (
|
|
25
26
|
<>
|
|
26
|
-
<tr className={`inrow${open ? ' open' : ''}`} onClick={() => st.toggleRow(box.id, r.key)}
|
|
27
|
+
<tr className={`inrow${open ? ' open' : ''}`} onClick={() => st.toggleRow(box.id, r.key)} {...tip(`${r.uses.length} use${r.uses.length === 1 ? '' : 's'}: click to list them`)}>
|
|
27
28
|
<td className="inkey">{r.key}</td>
|
|
28
29
|
<td className="incount">{r.repos}</td>
|
|
29
30
|
<td className="invals">
|
|
@@ -82,7 +83,7 @@ export const InsightsView = observer(({ app }: { app: HomeSt }) => {
|
|
|
82
83
|
<div className="actop">
|
|
83
84
|
<div className="seg" role="radiogroup" aria-label="which repos">
|
|
84
85
|
{(Object.keys(SCOPE_WORDS) as Scope[]).map((s) => (
|
|
85
|
-
<button key={s} role="radio" aria-checked={st.scope === s} className={st.scope === s ? 'on' : ''}
|
|
86
|
+
<button key={s} role="radio" aria-checked={st.scope === s} className={st.scope === s ? 'on' : ''} {...tip(SCOPE_WORDS[s].title)} onClick={() => st.setScope(s)}>{SCOPE_WORDS[s].label}</button>
|
|
86
87
|
))}
|
|
87
88
|
</div>
|
|
88
89
|
<div className="seg" role="radiogroup" aria-label="which boxes">
|
|
@@ -90,8 +91,8 @@ export const InsightsView = observer(({ app }: { app: HomeSt }) => {
|
|
|
90
91
|
{st.tags.map((t) => <button key={t} role="radio" aria-checked={st.tag === t} className={st.tag === t ? 'on' : ''} onClick={() => st.setTag(t)}>{t}</button>)}
|
|
91
92
|
</div>
|
|
92
93
|
{/* focused as the page opens (⌘; then type a package name) */}
|
|
93
|
-
<input className="inquery" type="search"
|
|
94
|
-
<button type="button" className="acpill" disabled={st.loading} onClick={() => st.refresh()}
|
|
94
|
+
<input className="inquery" type="search" placeholder="filter: a package, a script…" aria-label="filter every box" value={st.query} onChange={(e) => st.setQuery(e.currentTarget.value)} />
|
|
95
|
+
<button type="button" className="acpill" disabled={st.loading} onClick={() => st.refresh()} {...tip('read every package.json again now · an answer is kept 5 minutes')}>
|
|
95
96
|
<span className={`acring${st.loading ? ' on' : ''}`}>↻</span>
|
|
96
97
|
</button>
|
|
97
98
|
{d == null ? <span className="acdim">reading every package.json…</span> : (
|
|
@@ -103,7 +104,7 @@ export const InsightsView = observer(({ app }: { app: HomeSt }) => {
|
|
|
103
104
|
)}
|
|
104
105
|
</div>
|
|
105
106
|
{st.error !== '' ? <div className="hnote">{st.error}</div> : null}
|
|
106
|
-
{d != null && d.errors.length > 0 ? <div className="hnote"
|
|
107
|
+
{d != null && d.errors.length > 0 ? <div className="hnote" {...tip(d.errors.join('\n'))}>{d.errors.length} package.json would not parse</div> : null}
|
|
107
108
|
<div className={`ingrid${d != null && d.scope !== st.scope ? ' stale' : ''}`}>
|
|
108
109
|
{st.boxes.map(({ box, rows }) => <Box key={box.id} app={app} box={box} rows={rows} />)}
|
|
109
110
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* an ask's instructions (review/instructions-view.tsx, wiki tools/shipkit/threads-instructions.md): the why, then each
|
|
2
|
-
step with its box; a ticked step folds to its title; a copy block wraps, never scrolls sideways, its « copy » always
|
|
2
|
+
step with its box; a ticked step folds to its title, a click on its head unfolds it; a copy block wraps, never scrolls sideways, its « copy » always
|
|
3
3
|
shown */
|
|
4
4
|
/* sizes, not steps of the scale: the room the « copy » button (its widest word and its inset) keeps clear on a block,
|
|
5
5
|
and a step's box, whose width the body's indent follows */
|
|
@@ -7,16 +7,19 @@
|
|
|
7
7
|
.rv-instr .md pre{white-space:pre-wrap;overflow-wrap:anywhere;overflow-x:visible;padding-right:var(--copy-room)}
|
|
8
8
|
.rv-instr .mdcopy{opacity:1}
|
|
9
9
|
.rv-iwhy{min-width:0}
|
|
10
|
+
.rv-iedit{display:flex;justify-content:flex-end}
|
|
10
11
|
.rv-istep{border:1px solid var(--line);border-radius:8px;padding:var(--s2) var(--s3);background:var(--panel);min-width:0}
|
|
11
12
|
.rv-istep.ticked{background:transparent}
|
|
12
|
-
|
|
13
|
-
.rv-
|
|
14
|
-
.rv-istepbox
|
|
13
|
+
/* the head folds and unfolds its step; only the box ticks it */
|
|
14
|
+
.rv-istephead{display:flex;align-items:baseline;gap:var(--s2);cursor:pointer;user-select:none;min-width:0}
|
|
15
|
+
.rv-istepbox{font-weight:600;font-size:14px;line-height:1.45}
|
|
16
|
+
.rv-istephead:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
|
|
17
|
+
.rv-istepcheck{flex:none;width:var(--stepbox-w);height:var(--stepbox-w);margin:0;transform:translateY(3px);accent-color:var(--accent);cursor:pointer}
|
|
15
18
|
.rv-istepn{flex:none;color:var(--dim);font-size:12px;font-variant-numeric:tabular-nums;min-width:1.2em}
|
|
16
|
-
.rv-isteptitle{min-width:0;overflow-wrap:anywhere}
|
|
19
|
+
.rv-isteptitle{flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
|
|
17
20
|
.rv-istep.ticked .rv-isteptitle{color:var(--dim);text-decoration:line-through;text-decoration-color:color-mix(in srgb,var(--dim) 50%,transparent)}
|
|
18
21
|
.rv-ipicked{flex:none;font-size:12px;color:var(--ok);font-weight:600}
|
|
19
|
-
.rv-
|
|
22
|
+
.rv-istepfold{flex:none;color:var(--dim);display:inline-flex;align-self:center}
|
|
20
23
|
.rv-istepbody{margin:var(--s2) 0 0 calc(var(--stepbox-w) + 1.2em + 2 * var(--s2));min-width:0}
|
|
21
24
|
.rv-ichoice{display:flex;flex-direction:column;align-items:stretch;gap:var(--s1);margin-bottom:var(--s2)}
|
|
22
25
|
.rv-ichoice .rv-askopt{justify-content:flex-start;width:100%}
|
|
@@ -27,4 +30,7 @@
|
|
|
27
30
|
.rv-icheck{font-size:12px;color:var(--dim)}
|
|
28
31
|
.rv-icheck summary{cursor:pointer;width:max-content}
|
|
29
32
|
.rv-icheck code{display:block;margin-top:var(--s1);white-space:pre-wrap;overflow-wrap:anywhere;font:11.5px/1.5 ui-monospace,Menlo,monospace}
|
|
30
|
-
|
|
33
|
+
/* a narrow column: the step's words take the step's width, never an indent that leaves three words a line */
|
|
34
|
+
.rv-phone .rv-istepbody,.rv-thread.slim .rv-istepbody{margin-left:0}
|
|
35
|
+
.rv-thread.slim .rv-istep{padding:var(--s2)}
|
|
36
|
+
.rv-thread.slim .rv-istephead{gap:var(--s1)}
|
|
@@ -2,12 +2,19 @@
|
|
|
2
2
|
// leave are kept per browser and page, so a reload draws them as he left them from the first paint. One group per
|
|
3
3
|
// page id; the panel ids inside must stay the same for a kept layout to apply (useDefaultLayout's own rule), so each
|
|
4
4
|
// fold has its own kept layout. A page names the panel W folds (its list, the left) and the one T folds (the right):
|
|
5
|
-
// a folded side leaves a thin bar with a knob where it was, and a click on the bar brings it back. W
|
|
6
|
-
//
|
|
5
|
+
// a folded side leaves a thin bar with a knob where it was, and a click on the bar brings it back. W folds the list
|
|
6
|
+
// panel of every page that has one (page-keys.ts, columns.ts listFoldId); a list drawn outside KeptCols leaves the
|
|
7
|
+
// same bar (ListFoldBar). A page that asks for it (`placed`) draws its list at the left or across its top
|
|
8
|
+
// (LayoutSt.placeOf): on top the group is vertical, the list keeps a height in px on the same handle, and its fold
|
|
9
|
+
// leaves the bar across the page's top. ListPlaceButton flips it.
|
|
7
10
|
import { observer } from 'mobx-react-lite'
|
|
8
|
-
import { Children, isValidElement, type ReactNode } from 'react'
|
|
9
|
-
import { Group, useDefaultLayout, type LayoutStorage } from 'react-resizable-panels'
|
|
10
|
-
import
|
|
11
|
+
import { Children, isValidElement, useEffect, useRef, type CSSProperties, type ReactNode } from 'react'
|
|
12
|
+
import { Group, Separator, useDefaultLayout, type LayoutStorage } from 'react-resizable-panels'
|
|
13
|
+
import { WidthHandle, WidthPanel } from './kept-width.tsx'
|
|
14
|
+
import { LIST_FOLD_KEY, MAIN_PANEL_KEY } from './keys.ts'
|
|
15
|
+
import { Icon, ICON } from './icons.tsx'
|
|
16
|
+
import { LIST, listOf, type Bounds, type FoldSide, type LayoutSt } from './layout-st.ts'
|
|
17
|
+
import { tip } from './tips.ts'
|
|
11
18
|
|
|
12
19
|
/** the browser's storage, or nothing: a private window or blocked site data keeps the layout for the tab only */
|
|
13
20
|
const STORE: LayoutStorage = {
|
|
@@ -45,23 +52,79 @@ export function unfolded(children: ReactNode, folds: ColFolds, folded: (side: Fo
|
|
|
45
52
|
return all.filter((_, i) => !drop.has(i))
|
|
46
53
|
}
|
|
47
54
|
|
|
48
|
-
/** the
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
)
|
|
55
|
+
/** the page's list (its first panel) at the px kept for this page's list, the separator after it its handle
|
|
56
|
+
* (kept-width.tsx): its width at the left (`b` the list's bounds), its height on top */
|
|
57
|
+
function keptList(children: ReactNode[], id: string | undefined, layout: LayoutSt | undefined, b: Bounds, top: boolean): ReactNode[] {
|
|
58
|
+
const at = children.findIndex((c) => isValidElement<{ id?: string }>(c) && c.props.id === id)
|
|
59
|
+
if (id == null || layout == null || at < 0) return children
|
|
60
|
+
return children.map((c, i) => {
|
|
61
|
+
if (i === at && isValidElement<{ className?: string; style?: CSSProperties; children?: ReactNode }>(c))
|
|
62
|
+
return <WidthPanel key={id} layout={layout} b={b} id={id} className={c.props.className} style={c.props.style}>{c.props.children}</WidthPanel>
|
|
63
|
+
if (i === at + 1 && isValidElement(c) && c.type === Separator) return <WidthHandle key={`${id}:handle`} layout={layout} b={b} across={top} />
|
|
64
|
+
return c
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** the bar a folded side leaves: the whole height, a knob at mid height, a click brings the side back. `main`: the bar
|
|
69
|
+
* of the hidden main panel (hub-app.tsx). `top`: the bar of a list that sat across the page's top, the whole width */
|
|
70
|
+
export const FoldBar = ({ side, onClick, main, top }: { side: FoldSide; onClick: () => void; main?: boolean; top?: boolean }) => {
|
|
71
|
+
const says = main ? 'show the main panel again' : side === 'left' ? 'show the list again' : 'show the right panel again'
|
|
72
|
+
const key = main ? MAIN_PANEL_KEY : side === 'left' ? LIST_FOLD_KEY : 'T'
|
|
73
|
+
return (
|
|
74
|
+
<button className={`rv-widebar ${side}${top ? ' top' : ''}`} data-fold={main ? 'main' : side === 'left' ? 'list' : 'right'} {...tip(says, key)} aria-label={says} onClick={onClick}>
|
|
75
|
+
<span className="rv-wideknob" aria-hidden="true">{top ? '⌄' : side === 'left' ? '›' : '‹'}</span>
|
|
76
|
+
</button>
|
|
77
|
+
)
|
|
78
|
+
}
|
|
54
79
|
|
|
55
|
-
|
|
80
|
+
/** the one button that flips a page's list between the left and the top (LayoutSt.flipPlace): its icon is the layout a
|
|
81
|
+
* click gives. A page's list toolbar draws it; a narrow page, one pane at a time, has none */
|
|
82
|
+
export const ListPlaceButton = observer(({ layout, id }: { layout: LayoutSt; id: string }) => {
|
|
83
|
+
if (layout.narrow) return null
|
|
84
|
+
const top = layout.placeOf(id) === 'top'
|
|
85
|
+
const says = top ? 'the list at the left, a column beside the page' : 'the list on top, across the page'
|
|
86
|
+
return (
|
|
87
|
+
<button type="button" className="rv-filterbtn rv-listtoggle" data-check="list-place" data-place={top ? 'top' : 'left'} {...tip(`put ${says}`)} aria-label={says} onClick={() => layout.flipPlace(id)}><Icon d={top ? ICON.listLeft : ICON.listTop} /></button>
|
|
88
|
+
)
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
/** a list panel drawn outside KeptCols (the entry's list, the inbox, a bar of entries): the bar that stands where it
|
|
92
|
+
* was while W has it folded, null while it shows. `id`: its page's fold id (columns.ts listFoldId) */
|
|
93
|
+
export const ListFoldBar = observer(({ layout, id }: { layout: LayoutSt; id: string }) =>
|
|
94
|
+
layout.foldedOn(id, 'left') ? <FoldBar side="left" onClick={() => layout.toggleFold(id, 'left')} /> : null)
|
|
95
|
+
|
|
96
|
+
/** `placed`: the page's list (its `folds.left` panel, the first) sits where LayoutSt.placeOf says, the left or the top */
|
|
97
|
+
export const KeptCols = observer(({ id, children, folds, layout, placed }: { id: string; children: ReactNode; folds?: ColFolds; layout?: LayoutSt; placed?: boolean }) => {
|
|
56
98
|
const folded = (side: FoldSide): boolean => layout?.foldedOn(id, side) === true
|
|
57
|
-
const
|
|
99
|
+
const top = placed === true && layout?.placeOf(id) === 'top'
|
|
100
|
+
// a place has its own kept layout, as each fold has
|
|
101
|
+
const tag = `${top ? ':top' : ''}${(['left', 'right'] as const).filter((s) => folds?.[s] != null && folded(s)).map((s) => `:${s}`).join('')}`
|
|
58
102
|
const kept = useDefaultLayout({ id: `hub:cols:${id}${tag}`, storage: STORE, onlySaveAfterUserInteractions: true })
|
|
59
|
-
const bar = (side: FoldSide): ReactNode => (layout != null && folded(side) &&
|
|
103
|
+
const bar = (side: FoldSide): ReactNode => (layout != null && folded(side) && folds?.[side] != null ? <FoldBar side={side} top={top && side === 'left'} onClick={() => layout.toggleFold(id, side)} /> : null)
|
|
104
|
+
// the room the page has, for a list whose place he never picked: this row's own width, whatever the place
|
|
105
|
+
const row = useRef<HTMLDivElement | null>(null)
|
|
106
|
+
useEffect(() => {
|
|
107
|
+
const el = row.current
|
|
108
|
+
if (el == null || layout == null || placed !== true || typeof ResizeObserver === 'undefined') return
|
|
109
|
+
// the room lands on the next frame: a place that flips inside the callback relays the page out in the
|
|
110
|
+
// observer's own delivery, its loop error
|
|
111
|
+
let raf = 0
|
|
112
|
+
const ro = new ResizeObserver(([e]) => {
|
|
113
|
+
const w = Math.round(e!.contentRect.width)
|
|
114
|
+
cancelAnimationFrame(raf)
|
|
115
|
+
raf = requestAnimationFrame(() => layout.fitRoom(id, w))
|
|
116
|
+
})
|
|
117
|
+
ro.observe(el)
|
|
118
|
+
return () => {
|
|
119
|
+
cancelAnimationFrame(raf)
|
|
120
|
+
ro.disconnect()
|
|
121
|
+
}
|
|
122
|
+
}, [layout, id, placed])
|
|
60
123
|
return (
|
|
61
|
-
<div className=
|
|
124
|
+
<div ref={row} className={`rv-foldrow${top ? ' top' : ''}`}>
|
|
62
125
|
{bar('left')}
|
|
63
|
-
<Group key={tag} className="rv-cols" orientation=
|
|
64
|
-
{folds == null ? children : unfolded(children, folds, folded)}
|
|
126
|
+
<Group key={tag} className="rv-cols" orientation={top ? 'vertical' : 'horizontal'} defaultLayout={kept.defaultLayout} onLayoutChanged={kept.onLayoutChanged}>
|
|
127
|
+
{keptList(folds == null ? Children.toArray(children) : unfolded(children, folds, folded), folds?.left, layout, top && layout != null ? layout.listTop(id) : listOf(id), top)}
|
|
65
128
|
</Group>
|
|
66
129
|
{bar('right')}
|
|
67
130
|
</div>
|
|
@@ -71,6 +134,6 @@ export const KeptCols = observer(({ id, children, folds, layout }: { id: string;
|
|
|
71
134
|
/** a panel never scrolls itself: the column inside it does (hub-app.tsx, PANEL) */
|
|
72
135
|
export const PANEL = { overflow: 'hidden' } as const
|
|
73
136
|
|
|
74
|
-
/** the
|
|
75
|
-
*
|
|
76
|
-
export const LIST_COL = {
|
|
137
|
+
/** the bounds of a page's list column (its second column), the same on every page: a list panel spreads it, never a
|
|
138
|
+
* size of its own (tests/hub-list-col.test.ts); KeptCols draws it at the width kept for its page (kept-width.tsx) */
|
|
139
|
+
export const LIST_COL = { minSize: LIST.min, maxSize: LIST.max } as const
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// a page's group folds as the viewer leaves them, kept per browser under the page's own key: each group open or shut
|
|
2
|
+
// by hand, its default before. The store behind a SectionHead's fold on a page that keeps no fold of its own; a blocked
|
|
3
|
+
// storage only loses persistence
|
|
4
|
+
import { makeAutoObservable } from 'mobx'
|
|
5
|
+
import type { Folds } from './social/kit.tsx'
|
|
6
|
+
|
|
7
|
+
const read = (key: string): Record<string, boolean> => {
|
|
8
|
+
try {
|
|
9
|
+
const raw: unknown = JSON.parse(globalThis.localStorage?.getItem(key) ?? '{}')
|
|
10
|
+
if (raw == null || typeof raw !== 'object') return {}
|
|
11
|
+
return Object.fromEntries(Object.entries(raw).filter((e): e is [string, boolean] => typeof e[1] === 'boolean'))
|
|
12
|
+
} catch {
|
|
13
|
+
return {}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class KeptFolds implements Folds {
|
|
18
|
+
private open: Record<string, boolean>
|
|
19
|
+
|
|
20
|
+
constructor(private readonly key: string) {
|
|
21
|
+
this.open = read(key)
|
|
22
|
+
makeAutoObservable<this, 'key'>(this, { key: false })
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
isOpen(group: string, init: boolean): boolean {
|
|
26
|
+
return this.open[group] ?? init
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
flipFold(group: string, init: boolean): void {
|
|
30
|
+
this.setFold(group, !this.isOpen(group, init))
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** a group open or shut whatever it was: a jump to what it holds opens it */
|
|
34
|
+
setFold(group: string, open: boolean): void {
|
|
35
|
+
if (this.open[group] === open) return
|
|
36
|
+
this.open[group] = open
|
|
37
|
+
try {
|
|
38
|
+
globalThis.localStorage?.setItem(this.key, JSON.stringify(this.open))
|
|
39
|
+
} catch {
|
|
40
|
+
// a private window: the fold lasts the tab
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// a panel of a kept width, and its handle: the main panel and the list (the second column) of every page. The width is
|
|
2
|
+
// px, dragged on the handle at the panel's right and kept per browser (layout-st.ts MAIN, listOf); the group keeps the
|
|
3
|
+
// panel's px when the window resizes (preserve-pixel-size), and a neighbour's drag that moves it is put back on the
|
|
4
|
+
// next frame, so only its own handle moves it: never a window resize, never another panel. A double click on the handle
|
|
5
|
+
// brings the default back, or where the bounds say `fit`, the width of the panel's widest row. Each entry's and each
|
|
6
|
+
// page's list keeps a width of its own
|
|
7
|
+
import { observable, runInAction } from 'mobx'
|
|
8
|
+
import { observer } from 'mobx-react-lite'
|
|
9
|
+
import { useEffect, useState, type CSSProperties, type ReactNode } from 'react'
|
|
10
|
+
import { Panel, Separator, usePanelRef } from 'react-resizable-panels'
|
|
11
|
+
import type { Bounds, LayoutSt } from './layout-st.ts'
|
|
12
|
+
|
|
13
|
+
// the handle held down now: only a drag on it keeps a width
|
|
14
|
+
const held = observable.box<string | null>(null)
|
|
15
|
+
const release = (): void => runInAction(() => held.set(null))
|
|
16
|
+
|
|
17
|
+
export const WidthPanel = observer(({ layout, b, id, className, style, children }: { layout: LayoutSt; b: Bounds; id: string; className?: string; style?: CSSProperties; children: ReactNode }) => {
|
|
18
|
+
const ref = usePanelRef()
|
|
19
|
+
const px = layout.widthOf(b)
|
|
20
|
+
// the width read at mount: a drag that moves the kept width never re-registers the panel under the pointer
|
|
21
|
+
const [first] = useState(px)
|
|
22
|
+
// the kept width wins over a group's kept shares, and follows a drag on another page's list or a double click
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
const p = ref.current
|
|
25
|
+
if (p == null || held.get() === b.key) return
|
|
26
|
+
let now: number
|
|
27
|
+
try {
|
|
28
|
+
now = p.getSize().inPixels
|
|
29
|
+
} catch {
|
|
30
|
+
// no group registered it (a render with no layout): its defaultSize already holds the kept px
|
|
31
|
+
return
|
|
32
|
+
}
|
|
33
|
+
if (Math.abs(now - px) > 1) p.resize(px)
|
|
34
|
+
}, [ref, px, b.key])
|
|
35
|
+
return (
|
|
36
|
+
<Panel id={id} panelRef={ref} defaultSize={first} minSize={b.min} maxSize={b.max} groupResizeBehavior="preserve-pixel-size" className={className} style={style}
|
|
37
|
+
onResize={(size) => {
|
|
38
|
+
if (held.get() === b.key) layout.setWidth(b, size.inPixels)
|
|
39
|
+
// another handle took from it: its width back, the page gives the room
|
|
40
|
+
else if (Math.abs(size.inPixels - layout.widthOf(b)) > 1) requestAnimationFrame(() => ref.current?.resize(layout.widthOf(b)))
|
|
41
|
+
}}>
|
|
42
|
+
{children}
|
|
43
|
+
</Panel>
|
|
44
|
+
)
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
/** the width at which the panel's widest row shows its name whole, null where no row has a name to measure. A row's
|
|
48
|
+
* name is the part cut with an ellipsis that takes the row's spare room (flex-grow): the room each lacks, or has to
|
|
49
|
+
* spare, moves the panel's own width */
|
|
50
|
+
export function contentWidth(panel: Element | null): number | null {
|
|
51
|
+
if (panel == null) return null
|
|
52
|
+
const range = document.createRange()
|
|
53
|
+
let lack: number | null = null
|
|
54
|
+
for (const e of panel.querySelectorAll<HTMLElement>('*')) {
|
|
55
|
+
if (e.matches('input, textarea, select') || e.getClientRects().length === 0) continue
|
|
56
|
+
const cs = getComputedStyle(e)
|
|
57
|
+
if (cs.textOverflow !== 'ellipsis' || !(Number(cs.flexGrow) > 0)) continue
|
|
58
|
+
range.selectNodeContents(e)
|
|
59
|
+
const room = e.clientWidth - parseFloat(cs.paddingLeft) - parseFloat(cs.paddingRight)
|
|
60
|
+
lack = Math.max(lack ?? -Infinity, range.getBoundingClientRect().width - room)
|
|
61
|
+
}
|
|
62
|
+
return lack == null ? null : Math.ceil(panel.getBoundingClientRect().width + lack) + 1
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** `across`: the handle under a panel that spans the page (a list on top), its px a height */
|
|
66
|
+
export const WidthHandle = ({ layout, b, across }: { layout: LayoutSt; b: Bounds; across?: boolean }) => (
|
|
67
|
+
<Separator className={across ? 'rsep hsep' : 'rsep'} disableDoubleClick title={`drag to set the ${across ? 'height' : 'width'}, a double click ${b.fit == null ? 'for the default' : 'fits its content'}`}
|
|
68
|
+
onPointerDown={() => {
|
|
69
|
+
runInAction(() => held.set(b.key))
|
|
70
|
+
globalThis.addEventListener?.('pointerup', release, { once: true })
|
|
71
|
+
}}
|
|
72
|
+
onDoubleClick={(e) => {
|
|
73
|
+
const fit = b.fit == null ? null : contentWidth(e.currentTarget.previousElementSibling)
|
|
74
|
+
layout.setWidth(b, fit == null ? b.def : Math.min(b.fit ?? fit, fit))
|
|
75
|
+
}} />
|
|
76
|
+
)
|