@uniqbit/mate-core 0.20.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/claude-capability-plugins/companion-mentions/.claude-plugin/plugin.json +1 -1
- package/claude-capability-plugins/companion-mentions/hooks/register.ts +1 -1
- package/claude-plugin/hooks/hooks.json +10 -1
- package/claude-plugin/hooks/rtk-worktree-git.mjs +58 -0
- package/opencode-plugin/src/server.ts +9 -2
- package/package.json +2 -1
- package/src/cli/commands/artifact/delivery/environment.ts +28 -8
- package/src/cli/commands/artifact/delivery/link.ts +28 -9
- package/src/cli/commands/artifact/delivery/output.ts +7 -0
- package/src/cli/commands/companion/update.ts +2 -19
- package/src/cli/commands/factory/factory.ts +11 -1
- package/src/cli/commands/install.ts +47 -36
- package/src/cli/commands/launch/claude.ts +2 -0
- package/src/cli/commands/launch/shared.ts +33 -6
- package/src/cli/commands/plugin/install.ts +27 -11
- package/src/cli/commands/report/index.ts +180 -184
- package/src/cli/commands/report/markdown.ts +67 -72
- package/src/cli/commands/shared/companion-selection.ts +3 -1
- package/src/cli/commands/studio/access.ts +6 -14
- package/src/cli/commands/studio/areas.ts +112 -33
- package/src/cli/commands/studio/companion-add.ts +87 -0
- package/src/cli/commands/studio/companion-removal.ts +15 -8
- package/src/cli/commands/studio/factory-credential.ts +1 -15
- package/src/cli/commands/studio/factory-git-tokens.ts +40 -0
- package/src/cli/commands/studio/factory-relay.ts +18 -0
- package/src/cli/commands/studio/graph-model.ts +61 -0
- package/src/cli/commands/studio/graph.ts +336 -0
- package/src/cli/commands/studio/index.ts +4 -4
- package/src/cli/commands/studio/payload.ts +42 -15
- package/src/cli/commands/studio/repository-add.ts +116 -0
- package/src/cli/commands/studio/routes.ts +6 -0
- package/src/cli/commands/studio/selection.ts +12 -3
- package/src/cli/commands/studio/server.ts +127 -5
- package/src/cli/commands/studio/services.ts +40 -0
- package/src/cli/commands/studio/terminal.ts +45 -3
- package/src/cli/commands/studio/views/vault/markdown-tree.ts +84 -3
- package/src/cli/commands/studio/workset-session.ts +47 -14
- package/src/cli/commands/unwrap.ts +3 -0
- package/src/cli/commands/update.ts +2 -0
- package/src/cli/commands/vscode/release-vsix.json +4 -0
- package/src/cli/commands/vscode/setup.ts +71 -13
- package/src/cli/commands/vscode/vsix.ts +48 -7
- package/src/cli/commands/working/cleanup.ts +40 -8
- package/src/cli/commands/working/worktree.ts +176 -35
- package/src/cli/main.ts +17 -2
- package/src/cli/usage.ts +1 -1
- package/src/hooks/rtk-worktree-git.ts +48 -0
- package/src/hooks/validate-artifact-path.ts +38 -7
- package/src/lib/delivery/branch-template.ts +122 -0
- package/src/lib/delivery/branches.ts +21 -16
- package/src/lib/delivery/checkout.ts +102 -0
- package/src/lib/delivery/environment.ts +2 -0
- package/src/lib/delivery/merge-git.ts +13 -1
- package/src/lib/delivery/record-delivery.ts +83 -29
- package/src/lib/delivery/record.ts +15 -3
- package/src/lib/delivery/resolve-branch.ts +157 -110
- package/src/lib/factory/attach-client.ts +11 -1
- package/src/lib/factory/broker.ts +37 -40
- package/src/lib/factory/client.ts +22 -1
- package/src/lib/factory/clone-url.ts +39 -0
- package/src/lib/factory/command.ts +21 -5
- package/src/lib/factory/git-auth.ts +61 -0
- package/src/lib/factory/git-credential-store.ts +181 -0
- package/src/lib/factory/ids.ts +12 -2
- package/src/lib/factory/outcomes/actions.ts +20 -4
- package/src/lib/factory/outcomes/index.ts +77 -11
- package/src/lib/factory/outcomes/lifecycle.ts +9 -2
- package/src/lib/factory/outcomes/sessions.ts +23 -1
- package/src/lib/factory/prepare.ts +9 -3
- package/src/lib/factory/runner/scheduler.ts +96 -14
- package/src/lib/factory/runner/workflow.ts +5 -1
- package/src/lib/factory/runtime.ts +143 -43
- package/src/lib/orchestrator/companion-hub.ts +6 -1
- package/src/lib/orchestrator/engine-floor.ts +48 -0
- package/src/lib/orchestrator/launcher.ts +34 -1
- package/src/lib/orchestrator/projection-claude-commands.ts +2 -2
- package/src/lib/orchestrator/projection-claude-entry.ts +42 -21
- package/src/lib/orchestrator/projection-claude-links.ts +32 -8
- package/src/lib/orchestrator/projection-claude-skills.ts +2 -2
- package/src/lib/orchestrator/projection-entries.ts +22 -18
- package/src/lib/orchestrator/projection-opencode-copies.ts +65 -21
- package/src/lib/orchestrator/projection-runtime-documents.ts +66 -43
- package/src/lib/orchestrator/projection-types.ts +28 -1
- package/src/lib/orchestrator/refresh-working-claude-links.ts +3 -1
- package/src/lib/orchestrator/session-prepare.ts +6 -1
- package/src/lib/orchestrator/setup-compatibilities.ts +1 -1
- package/src/lib/orchestrator/types.ts +4 -0
- package/src/lib/orchestrator/umbrella-checkouts.ts +102 -0
- package/src/lib/orchestrator/working-repo-projection.ts +24 -4
- package/src/lib/orchestrator/wrap-pass.ts +1 -0
- package/src/lib/public-npm.ts +95 -50
- package/src/lib/session-state.ts +72 -2
- package/src/lib/update-checker.ts +7 -1
- package/src/lib/usage/aggregate.ts +202 -0
- package/src/lib/usage/cache.ts +87 -0
- package/src/lib/usage/claude-pricing.ts +71 -0
- package/src/lib/usage/claude.ts +189 -0
- package/src/lib/usage/collect.ts +56 -0
- package/src/lib/usage/opencode.ts +188 -0
- package/src/lib/usage/records.ts +80 -0
- package/src/lib/usage/rtk-database.ts +72 -0
- package/src/lib/usage/savings.ts +209 -0
- package/src/lib/usage/scope.ts +182 -0
- package/src/lib/usage/source.ts +102 -0
- package/src/lib/usage/types.ts +143 -0
- package/src/lib/usage/window.ts +37 -0
- package/src/lib/workset/factory-local.ts +157 -0
- package/src/lib/workset/record.ts +25 -11
- package/src/lib/workset/repositories.ts +118 -25
- package/src/lib/workset/worktree-include.ts +161 -0
- package/src/lib/workset/worktree-index.ts +6 -2
- package/src/lib/workset/worktree.ts +591 -101
- package/src/opencode/companion-hooks.ts +46 -8
- package/src/opencode/companion-policy.ts +18 -5
- package/src/opencode/enter-worktree.ts +254 -6
- package/src/opencode/session-register.ts +2 -2
- package/src/runtime/claude-bg-isolation.ts +138 -0
- package/src/runtime/companion-git.ts +10 -2
- package/src/runtime/companion-guidance.ts +17 -4
- package/src/runtime/current-branch.ts +16 -2
- package/src/runtime/entered-worktree.ts +24 -0
- package/src/runtime/git-tracked.ts +60 -0
- package/src/runtime/repo-destination.ts +72 -0
- package/src/runtime/repo-local.ts +25 -3
- package/src/runtime/rtk-git-guard.ts +66 -0
- package/src/runtime/runtime-document-manifest.ts +229 -19
- package/src/runtime/runtime-document-manifest.typecheck.ts +10 -0
- package/src/runtime/secret-guard.ts +9 -2
- package/src/runtime/secret-policy-weakening.ts +122 -0
- package/src/runtime/serving-claude-wrap.ts +15 -2
- package/src/runtime/umbrella-folder.ts +56 -0
- package/src/runtime/wrap-state.ts +5 -13
- package/src/studio.ts +37 -0
- package/src/templates/mate-skills/agents/mate-apply-change/SKILL.md +61 -6
- package/src/templates/mate-skills/agents/mate-explore-change/SKILL.md +8 -4
- package/src/templates/mate-skills/agents/mate-propose-change/SKILL.md +9 -5
- package/src/templates/mate-skills/agents/mate-publish-artifact/SKILL.md +5 -4
- package/src/templates/mate-skills/agents/mate-show-me/SKILL.md +10 -4
- package/src/templates/mate-skills/agents/mate-simplify-code/SKILL.md +5 -1
- package/src/templates/mate-skills/claude/mate-apply-change/SKILL.md +61 -6
- package/src/templates/mate-skills/claude/mate-explore-change/SKILL.md +8 -4
- package/src/templates/mate-skills/claude/mate-propose-change/SKILL.md +9 -5
- package/src/templates/mate-skills/claude/mate-publish-artifact/SKILL.md +5 -4
- package/src/templates/mate-skills/claude/mate-show-me/SKILL.md +10 -4
- package/src/templates/mate-skills/claude/mate-simplify-code/SKILL.md +5 -1
- package/src/tools/setup/__snapshots__/runtime-surface-golden.test.ts.snap +307 -42
- package/src/tools/setup/capabilities/rtk.ts +93 -1
- package/src/tools/setup/dynamic-plugins/audiences.ts +65 -21
- package/src/tools/setup/dynamic-plugins/frozen.ts +32 -13
- package/src/tools/setup/dynamic-plugins/hydrate.ts +4 -4
- package/src/tools/setup/dynamic-plugins/install.ts +24 -22
- package/src/tools/setup/dynamic-plugins/loader.ts +11 -7
- package/src/tools/setup/dynamic-plugins/paths.ts +30 -10
- package/src/tools/setup/dynamic-plugins/verify.ts +10 -7
- package/src/tools/setup/dynamic-plugins/workspaces.ts +153 -0
- package/src/tools/setup/mate.ts +3 -3
- package/src/tools/setup/plugins/gitignore.ts +15 -9
- package/src/tools/setup/providers/claude-plugin-hooks.ts +12 -0
- package/src/tools/setup/providers/claude.ts +25 -3
- package/src/tools/setup/utils.ts +4 -2
- package/src/tools/setup/working-repo-cleanup.ts +2 -2
- package/src/tools/setup/working-repo-local-state.ts +2 -0
- package/src/tools/setup.ts +25 -14
- package/studio-dist/client/assets/app-D9cw6szy.css +2 -0
- package/studio-dist/client/assets/artifacts-WD2ZXYrx.js +1 -0
- package/studio-dist/client/assets/button-Br0O1sXw.js +1 -0
- package/studio-dist/client/assets/combobox-DA7RAUUZ.js +1 -0
- package/studio-dist/client/assets/companion-view-CrabvxS8.js +1 -0
- package/studio-dist/client/assets/factory-DGS0E16C.js +6 -0
- package/studio-dist/client/assets/fields-6aXBpFhJ.js +1 -0
- package/studio-dist/client/assets/getting-started-Clde4w6P.js +1 -0
- package/studio-dist/client/assets/getting-started-D6kgWwWZ.js +1 -0
- package/studio-dist/client/assets/getting-started._topic-BiunccbT.js +1 -0
- package/studio-dist/client/assets/getting-started.index-DpiNoGw8.js +1 -0
- package/studio-dist/client/assets/graph-B_TCBVbu.js +2 -0
- package/studio-dist/client/assets/graph-canvas-Ba37Y5AE.js +3242 -0
- package/studio-dist/client/assets/guides-Du_RtJxP.js +1 -0
- package/studio-dist/client/assets/index-Df8L1LQa.js +40 -0
- package/studio-dist/client/assets/jsx-runtime-MZURdZre.js +1 -0
- package/studio-dist/client/assets/markdown-view-BOX6x0rL.js +1 -0
- package/studio-dist/client/assets/panel-dbmCx7Mx.js +1 -0
- package/studio-dist/client/assets/queries-RvHeXY12.js +1 -0
- package/studio-dist/client/assets/react-3QStrcDO.js +27 -0
- package/studio-dist/client/assets/report-url-XRL0x1SY.js +1 -0
- package/studio-dist/client/assets/reports-r3IK7Doz.js +1 -0
- package/studio-dist/client/assets/routes-C0A5LTFc.js +1 -0
- package/studio-dist/client/assets/select-CnaMd617.js +1 -0
- package/studio-dist/client/assets/skills-CzjzHpBT.js +1 -0
- package/studio-dist/client/assets/specs-B0ldF_6J.js +1 -0
- package/studio-dist/client/assets/specs-view-BnCLA0gW.js +1 -0
- package/studio-dist/client/assets/spinner-Dcm3fqK1.js +1 -0
- package/studio-dist/client/assets/steps-C0p2N1Pb.js +1 -0
- package/studio-dist/client/assets/store-Dw34catY.js +1 -0
- package/studio-dist/client/assets/studio-Cpz_HRHp.js +100 -0
- package/studio-dist/client/assets/studio-queries-ibmpFo6R.js +2 -0
- package/studio-dist/client/assets/usage-C2QJ_0IZ.js +55 -0
- package/studio-dist/client/assets/useAnchoredPopupScrollLock-Bj-FWb8z.js +1 -0
- package/studio-dist/client/assets/useMutation-aAr2uiay.js +1 -0
- package/studio-dist/client/assets/useSelector-AYcH7lB0.js +2 -0
- package/studio-dist/client/assets/vault-BGcxkSIY.js +1 -0
- package/studio-dist/client/assets/warnings-R1cE1rLf.js +1 -0
- package/studio-dist/client/assets/workflow-C2qTrMDH.js +1 -0
- package/studio-dist/server/assets/__23tanstack-start-server-fn-resolver-Bn896ZYj.js +122 -0
- package/studio-dist/server/assets/_tanstack-start-manifest_v.js +102 -35
- package/studio-dist/server/assets/{actions-Bvgj9eb8.js → actions-DYSv-9VV.js} +10 -4
- package/studio-dist/server/assets/artifacts-DnF9L3dZ.js +216 -0
- package/studio-dist/server/assets/{button-CIJqAhni.js → button-CgOIVdmD.js} +13 -1702
- package/studio-dist/server/assets/combobox-DV_s9W0s.js +483 -0
- package/studio-dist/server/assets/{companion-view-DISASvdJ.js → companion-view-BKVXD3TO.js} +3 -3
- package/studio-dist/server/assets/companions-C7fctnU9.js +31 -0
- package/studio-dist/server/assets/{createServerRpc-tK2lE9R2.js → createServerRpc-bFKFpGFG.js} +1 -1
- package/studio-dist/server/assets/{factory-DUTa0eDs.js → factory-C7Ybg0xG.js} +1256 -353
- package/studio-dist/server/assets/{factory-DGPmNGbo.js → factory-Df5uAHjb.js} +53 -6
- package/studio-dist/server/assets/fields-BbieQTD0.js +1190 -0
- package/studio-dist/server/assets/getting-started-B136TP57.js +4 -0
- package/studio-dist/server/assets/getting-started-CRxMWorQ.js +67 -0
- package/studio-dist/server/assets/getting-started._topic-DJKQAzYl.js +13 -0
- package/studio-dist/server/assets/getting-started.index-D84gec1t.js +13 -0
- package/studio-dist/server/assets/graph-CSje3029.js +801 -0
- package/studio-dist/server/assets/graph-DDZzXM1L.js +16 -0
- package/studio-dist/server/assets/graph-canvas-22bWB5-2.js +21066 -0
- package/studio-dist/server/assets/graph-wire-BdSUx0G5.js +58 -0
- package/studio-dist/server/assets/guides-D9dk1Frq.js +13 -0
- package/studio-dist/server/assets/guides-IE-19POz.js +5 -0
- package/studio-dist/server/assets/guides.server-vcYRY5wx.js +66 -0
- package/studio-dist/server/assets/jsx-runtime-Bt0s0YKS.js +451 -0
- package/studio-dist/server/assets/{markdown-view-Bn7xPdks.js → markdown-view-BR8dJ7aR.js} +28 -9
- package/studio-dist/server/assets/{panel-3Jmn4awF.js → panel-BR_t9iMM.js} +4 -4
- package/studio-dist/server/assets/queries-DWoTin-q.js +32 -0
- package/studio-dist/server/assets/react-CdqSUhaL.js +89 -0
- package/studio-dist/server/assets/redirect-BaZ_QyqF.js +39 -0
- package/studio-dist/server/assets/report-url-BUXPcE_8.js +9 -0
- package/studio-dist/server/assets/{reports-D6YMqhnO.js → reports-CQ9qQ1-n.js} +9 -10
- package/studio-dist/server/assets/{reports-C06RXVE2.js → reports-dYDEoBeq.js} +3 -3
- package/studio-dist/server/assets/{router-C8MGqlAY.js → router-DkRHNTpE.js} +787 -2862
- package/studio-dist/server/assets/{routes-BcFgvqf7.js → routes-B6GfOew4.js} +22 -171
- package/studio-dist/server/assets/{search-JAKurDNh.js → search-BJnWLfkG.js} +21 -2
- package/studio-dist/server/assets/select-Af7Wibii.js +1609 -0
- package/studio-dist/server/assets/{shell-DS3wUexh.js → shell-Hq-hXgnT.js} +6 -5
- package/studio-dist/server/assets/{skills-BEnOxiDl.js → skills-B7nEuVbx.js} +9 -8
- package/studio-dist/server/assets/{skills-CtrBAtX3.js → skills-B_YYL7q8.js} +3 -3
- package/studio-dist/server/assets/specs-BpLUFntA.js +51 -0
- package/studio-dist/server/assets/specs-view-0peMVd22.js +426 -0
- package/studio-dist/server/assets/spinner-CdwJW4VB.js +20 -0
- package/studio-dist/server/assets/{steps-Dq_CwY_s.js → steps-D56DApvK.js} +1 -1
- package/studio-dist/server/assets/store-Cs17okNG.js +280 -0
- package/studio-dist/server/assets/studio-CAcKp3bM.js +10340 -0
- package/studio-dist/server/assets/studio-queries-BtRGzDdh.js +1451 -0
- package/studio-dist/server/assets/usage-COdjd1gD.js +25570 -0
- package/studio-dist/server/assets/usage-f6pqE1tm.js +24 -0
- package/studio-dist/server/assets/useAnchoredPopupScrollLock-DlBKHRw7.js +756 -0
- package/studio-dist/server/assets/useMutation-DzTZGenE.js +690 -0
- package/studio-dist/server/assets/{__23tanstack-start-server-fn-resolver-M2GBs8s3.js → useSelector-DUmCUXAs.js} +4 -668
- package/studio-dist/server/assets/{vault-Fvxt2Tzl.js → vault-BDuIUq0F.js} +8 -5
- package/studio-dist/server/assets/{vault-BmWnryh3.js → vault-BVLp6zu3.js} +3 -3
- package/studio-dist/server/assets/{views-BgYa-za2.js → views-flRUr21z.js} +4 -4
- package/studio-dist/server/assets/{warnings-DzR6fyZh.js → warnings-CDy9pdgL.js} +3 -2
- package/studio-dist/server/assets/{delivery-path-C29fBynY.js → workflow-D9GKI2EV.js} +132 -106
- package/studio-dist/server/server.js +582 -8
- package/src/cli/commands/report/collector.ts +0 -288
- package/studio-dist/client/assets/app-CdPiFv59.css +0 -2
- package/studio-dist/client/assets/button-BIIHE0EQ.js +0 -3
- package/studio-dist/client/assets/companion-view-DM6YyXaR.js +0 -1
- package/studio-dist/client/assets/delivery-path-DELxj0Av.js +0 -1
- package/studio-dist/client/assets/factory-BZy0E8ty.js +0 -4
- package/studio-dist/client/assets/index-B3wkMzjA.js +0 -40
- package/studio-dist/client/assets/markdown-view-pQ2Qp_i5.js +0 -1
- package/studio-dist/client/assets/panel-CbajlC3p.js +0 -1
- package/studio-dist/client/assets/prepaint-CwSrpdFA.js +0 -27
- package/studio-dist/client/assets/react-CN2GSx7x.js +0 -1
- package/studio-dist/client/assets/reports-DllhYQ5_.js +0 -1
- package/studio-dist/client/assets/rolldown-runtime-WkwZ5CU-.js +0 -1
- package/studio-dist/client/assets/routes-COm-G3mK.js +0 -1
- package/studio-dist/client/assets/skills-DmWAy-jZ.js +0 -1
- package/studio-dist/client/assets/specs-BG3Wi3ln.js +0 -1
- package/studio-dist/client/assets/steps-DFsH3Neu.js +0 -1
- package/studio-dist/client/assets/vault-B2q1nBY5.js +0 -1
- package/studio-dist/client/assets/warnings-BSXIyuSQ.js +0 -1
- package/studio-dist/client/assets/workflow-DlsQD6Hc.js +0 -1
- package/studio-dist/server/assets/companions-BYbHWKOZ.js +0 -15
- package/studio-dist/server/assets/createServerFn-F5sAOF8V.js +0 -459
- package/studio-dist/server/assets/prepaint-DJfTQ_VH.js +0 -45
- package/studio-dist/server/assets/react-Ce6dj15C.js +0 -46
- package/studio-dist/server/assets/rolldown-runtime-DYf_mQCB.js +0 -34
- package/studio-dist/server/assets/specs-C8rv34-5.js +0 -211
- package/studio-dist/server/assets/studio-BeltxxKt.js +0 -216
- package/studio-dist/server/assets/workflow-liRYecHk.js +0 -73
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { n as require_react, o as __toESM, t as require_jsx_runtime } from "./jsx-runtime-Bt0s0YKS.js";
|
|
2
|
+
import { $ as ToggleGroup, Tr as cn, _r as EMPTY_OBJECT, et as ToggleGroupItem, i as FloatingRootStore } from "./button-CgOIVdmD.js";
|
|
3
|
+
// src/components/view-parts.tsx
|
|
4
|
+
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
5
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
6
|
+
/** A view's title and one plain line on what it shows; no eyebrow. */
|
|
7
|
+
function PageHeader({ title, description, actions }) {
|
|
8
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", {
|
|
9
|
+
className: "page-header flex flex-wrap items-end gap-x-4 gap-y-2 px-6 pt-5 pb-1 max-sm:px-4",
|
|
10
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
11
|
+
className: "min-w-0",
|
|
12
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
|
|
13
|
+
className: "m-0 text-xl font-semibold tracking-[-0.015em]",
|
|
14
|
+
children: title
|
|
15
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
16
|
+
className: "m-0 mt-0.5 text-sm text-muted",
|
|
17
|
+
children: description
|
|
18
|
+
})]
|
|
19
|
+
}), actions ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
20
|
+
className: "ml-auto flex items-center gap-1.5",
|
|
21
|
+
children: actions
|
|
22
|
+
}) : null]
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/** The page's padding for content under the header. */
|
|
26
|
+
var PAGE_PAD = "px-6 max-sm:px-4";
|
|
27
|
+
var TONE_TEXT = {
|
|
28
|
+
warn: "text-warn",
|
|
29
|
+
bad: "text-bad",
|
|
30
|
+
accent: "text-accent",
|
|
31
|
+
why: "text-why",
|
|
32
|
+
muted: "text-muted"
|
|
33
|
+
};
|
|
34
|
+
/** A count beside its label: a small tabular chip, amber only when the items need the person. */
|
|
35
|
+
function Count({ value, tone, className, label }) {
|
|
36
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
37
|
+
className: cn("count inline-grid h-[18px] min-w-[18px] flex-none place-items-center rounded-full px-1.5 font-mono text-2xs leading-none font-medium tabular-nums", tone === "warn" && value > 0 ? "bg-warn-soft text-warn" : "bg-[color-mix(in_srgb,var(--muted)_16%,transparent)] text-muted", className),
|
|
38
|
+
"aria-label": label,
|
|
39
|
+
children: value
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* A group of items: the title bar carries the name, count and an optional hint on the surface
|
|
44
|
+
* tint; the rows sit on the page. Never nested, never around a graph, document or form.
|
|
45
|
+
*/
|
|
46
|
+
function ListCard({ title, count, hint, tone, children, className, label, level = 2 }) {
|
|
47
|
+
const Heading = level === 3 ? "h3" : "h2";
|
|
48
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
|
|
49
|
+
className: cn("list-card overflow-hidden rounded-card border border-rule", className),
|
|
50
|
+
"aria-label": label ?? (typeof title === "string" ? title : void 0),
|
|
51
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
52
|
+
className: cn("list-card-head flex items-center gap-2.5 border-b border-rule bg-surface px-4 py-2 text-[0.9rem] font-semibold", tone ? TONE_TEXT[tone] : null),
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Heading, {
|
|
55
|
+
className: "m-0 text-[inherit] font-[inherit]",
|
|
56
|
+
children: title
|
|
57
|
+
}),
|
|
58
|
+
count !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Count, {
|
|
59
|
+
value: count,
|
|
60
|
+
tone: tone === "warn" ? "warn" : void 0
|
|
61
|
+
}) : null,
|
|
62
|
+
hint ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
63
|
+
className: "ml-auto text-xs font-normal text-muted",
|
|
64
|
+
children: hint
|
|
65
|
+
}) : null
|
|
66
|
+
]
|
|
67
|
+
}), children]
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/** A row in a list card: one line, soft rule above, the surface tint on hover and when current. */
|
|
71
|
+
var ROW = "list-row flex w-full min-w-0 items-center gap-4 border-0 border-t border-rule-soft bg-transparent px-4 py-2 text-left text-base text-text no-underline transition-colors first:border-t-0 hover:bg-surface aria-[current=true]:bg-surface aria-[current=true]:shadow-[inset_2px_0_0_var(--accent)]";
|
|
72
|
+
/** Narrows a list in place; one value is always chosen. */
|
|
73
|
+
function Pills({ label, options, value, onChange, className }) {
|
|
74
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroup, {
|
|
75
|
+
"aria-label": label,
|
|
76
|
+
value: [value],
|
|
77
|
+
onValueChange: (next) => {
|
|
78
|
+
const chosen = next[0];
|
|
79
|
+
if (chosen) onChange(chosen);
|
|
80
|
+
},
|
|
81
|
+
className,
|
|
82
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ToggleGroupItem, {
|
|
83
|
+
value: option.value,
|
|
84
|
+
children: [option.label, option.count !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Count, {
|
|
85
|
+
value: option.count,
|
|
86
|
+
tone: option.tone === "warn" ? "warn" : void 0
|
|
87
|
+
}) : null]
|
|
88
|
+
}, option.value))
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
var MARKERS = {
|
|
92
|
+
/** Diamond: waiting on a person. */
|
|
93
|
+
review: "rotate-45 rounded-[2px] size-[7px] bg-why",
|
|
94
|
+
/** Diamond: under way. */
|
|
95
|
+
build: "rotate-45 rounded-[2px] size-[7px] bg-accent",
|
|
96
|
+
/** Circle: done. */
|
|
97
|
+
done: "rounded-full size-2 bg-accent",
|
|
98
|
+
/** Square: something is wrong. */
|
|
99
|
+
issue: "rounded-[1px] size-2 bg-bad",
|
|
100
|
+
/** Ring: nothing happening. */
|
|
101
|
+
idle: "rounded-full size-2 ring-[1.5px] ring-muted ring-inset",
|
|
102
|
+
warn: "rounded-full size-2 bg-warn"
|
|
103
|
+
};
|
|
104
|
+
var MARKER_TEXT = {
|
|
105
|
+
review: "text-why",
|
|
106
|
+
build: "text-accent",
|
|
107
|
+
done: "text-accent",
|
|
108
|
+
issue: "text-bad",
|
|
109
|
+
idle: "text-muted",
|
|
110
|
+
warn: "text-warn"
|
|
111
|
+
};
|
|
112
|
+
/** A status word with its marker shape, so the state never rests on colour alone. */
|
|
113
|
+
function StatusWord({ marker, children }) {
|
|
114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
115
|
+
className: cn("status-word inline-flex items-center gap-2 text-xs whitespace-nowrap", MARKER_TEXT[marker]),
|
|
116
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
117
|
+
className: cn("flex-none", MARKERS[marker]),
|
|
118
|
+
"aria-hidden": "true"
|
|
119
|
+
}), children]
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/** "N of M tasks" with its bar. */
|
|
123
|
+
function Progress({ done, total, unit = "tasks" }) {
|
|
124
|
+
if (total === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
125
|
+
className: "text-xs text-muted",
|
|
126
|
+
children: ["No ", unit]
|
|
127
|
+
});
|
|
128
|
+
const percent = Math.min(100, Math.round(done / total * 100));
|
|
129
|
+
const label = `${done} of ${total} ${unit}`;
|
|
130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
131
|
+
className: "grid min-w-[120px] gap-1.5 text-xs text-muted",
|
|
132
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: label }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
133
|
+
className: "relative block h-1 w-full max-w-[140px] overflow-hidden rounded-full bg-rule",
|
|
134
|
+
role: "progressbar",
|
|
135
|
+
"aria-valuemin": 0,
|
|
136
|
+
"aria-valuemax": 100,
|
|
137
|
+
"aria-valuenow": percent,
|
|
138
|
+
"aria-label": label,
|
|
139
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
140
|
+
className: "absolute inset-y-0 left-0 rounded-full bg-accent",
|
|
141
|
+
style: { width: `${percent}%` }
|
|
142
|
+
})
|
|
143
|
+
})]
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
var subscribe = () => () => {};
|
|
147
|
+
/** "22m ago" from the viewer's clock; filled in after hydration so server and browser agree. */
|
|
148
|
+
function Age({ at, className }) {
|
|
149
|
+
const text = (0, import_react.useSyncExternalStore)(subscribe, () => at === void 0 ? "" : ageText(at, Date.now()), () => "");
|
|
150
|
+
if (at === void 0) return null;
|
|
151
|
+
const date = new Date(at);
|
|
152
|
+
if (Number.isNaN(date.getTime())) return null;
|
|
153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("time", {
|
|
154
|
+
dateTime: date.toISOString(),
|
|
155
|
+
className: cn("font-mono text-xs whitespace-nowrap text-muted", className),
|
|
156
|
+
children: text
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
function ageText(at, now) {
|
|
160
|
+
const seconds = Math.max(0, Math.round((now - new Date(at).getTime()) / 1e3));
|
|
161
|
+
if (seconds < 60) return "just now";
|
|
162
|
+
if (seconds < 3600) return `${Math.floor(seconds / 60)}m ago`;
|
|
163
|
+
if (seconds < 86400) return `${Math.floor(seconds / 3600)}h ago`;
|
|
164
|
+
return `${Math.floor(seconds / 86400)}d ago`;
|
|
165
|
+
}
|
|
166
|
+
/** A plain sentence for a list with nothing in it; no empty card. */
|
|
167
|
+
function EmptyNote({ children, className }) {
|
|
168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
169
|
+
className: cn("empty m-0 rounded-card border border-dashed border-rule px-5 py-5 text-base text-muted", className),
|
|
170
|
+
children
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
/** A command as the person would type it; `copy` is the text copied when it differs. */
|
|
174
|
+
function CommandLine({ text, copy = text, label = "prompt" }) {
|
|
175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
176
|
+
className: "flex min-w-0 items-center gap-2 rounded-control border border-rule bg-page py-1.5 pr-1.5 pl-3 font-mono text-xs",
|
|
177
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
|
|
178
|
+
className: "min-w-0 flex-1 truncate",
|
|
179
|
+
children: text
|
|
180
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
181
|
+
type: "button",
|
|
182
|
+
className: "inline-flex h-7 flex-none items-center rounded-[6px] border border-rule bg-surface px-2.5 font-sans text-xs text-text hover:border-accent hover:bg-accent-soft",
|
|
183
|
+
"data-copy": copy,
|
|
184
|
+
"data-copy-label": label,
|
|
185
|
+
children: "Copy"
|
|
186
|
+
})]
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/utils/popups/store.mjs
|
|
190
|
+
/**
|
|
191
|
+
* State common to all popup stores.
|
|
192
|
+
*/
|
|
193
|
+
function createInitialPopupStoreState(triggerElements, floatingId, nested = false) {
|
|
194
|
+
return {
|
|
195
|
+
open: false,
|
|
196
|
+
openProp: void 0,
|
|
197
|
+
mounted: false,
|
|
198
|
+
transitionStatus: void 0,
|
|
199
|
+
floatingRootContext: new FloatingRootStore({
|
|
200
|
+
open: false,
|
|
201
|
+
transitionStatus: void 0,
|
|
202
|
+
floatingElement: null,
|
|
203
|
+
referenceElement: null,
|
|
204
|
+
triggerElements,
|
|
205
|
+
floatingId,
|
|
206
|
+
syncOnly: true,
|
|
207
|
+
nested,
|
|
208
|
+
onOpenChange: void 0
|
|
209
|
+
}),
|
|
210
|
+
floatingId,
|
|
211
|
+
triggerCount: 0,
|
|
212
|
+
preventUnmountingOnClose: false,
|
|
213
|
+
payload: void 0,
|
|
214
|
+
activeTriggerId: null,
|
|
215
|
+
activeTriggerElement: null,
|
|
216
|
+
openedWithoutTrigger: false,
|
|
217
|
+
triggerIdProp: void 0,
|
|
218
|
+
popupElement: null,
|
|
219
|
+
positionerElement: null,
|
|
220
|
+
activeTriggerProps: EMPTY_OBJECT,
|
|
221
|
+
inactiveTriggerProps: EMPTY_OBJECT,
|
|
222
|
+
popupProps: EMPTY_OBJECT
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
var activeTriggerIdSelector = (state) => state.triggerIdProp ?? state.activeTriggerId;
|
|
226
|
+
var openSelector = (state) => state.openProp ?? state.open;
|
|
227
|
+
var popupIdSelector = (state) => {
|
|
228
|
+
return (state.popupElement?.id ?? state.floatingId) || void 0;
|
|
229
|
+
};
|
|
230
|
+
function triggerOwnsOpenPopup(state, triggerId) {
|
|
231
|
+
return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) === triggerId;
|
|
232
|
+
}
|
|
233
|
+
function triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) {
|
|
234
|
+
if (triggerOwnsOpenPopup(state, triggerId)) return true;
|
|
235
|
+
return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) == null && !state.openedWithoutTrigger && state.triggerCount === 1;
|
|
236
|
+
}
|
|
237
|
+
var popupStoreSelectors = {
|
|
238
|
+
open: openSelector,
|
|
239
|
+
mounted: (state) => state.mounted,
|
|
240
|
+
transitionStatus: (state) => openSelector(state) && !state.mounted ? "starting" : state.transitionStatus,
|
|
241
|
+
floatingRootContext: (state) => state.floatingRootContext,
|
|
242
|
+
triggerCount: (state) => state.triggerCount,
|
|
243
|
+
preventUnmountingOnClose: (state) => state.preventUnmountingOnClose,
|
|
244
|
+
payload: (state) => state.payload,
|
|
245
|
+
activeTriggerId: activeTriggerIdSelector,
|
|
246
|
+
activeTriggerElement: (state) => state.mounted ? state.activeTriggerElement : null,
|
|
247
|
+
popupId: popupIdSelector,
|
|
248
|
+
/**
|
|
249
|
+
* Whether the trigger with the given ID was used to open the popup.
|
|
250
|
+
*/
|
|
251
|
+
isTriggerActive: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId,
|
|
252
|
+
/**
|
|
253
|
+
* Whether the popup is open and was activated by a trigger with the given ID.
|
|
254
|
+
*/
|
|
255
|
+
isOpenedByTrigger: (state, triggerId) => triggerOwnsOpenPopup(state, triggerId),
|
|
256
|
+
/**
|
|
257
|
+
* Whether the popup is mounted and was activated by a trigger with the given ID.
|
|
258
|
+
*/
|
|
259
|
+
isMountedByTrigger: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId && state.mounted,
|
|
260
|
+
triggerProps: (state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps,
|
|
261
|
+
/**
|
|
262
|
+
* Popup id for the trigger that currently owns the open popup.
|
|
263
|
+
*/
|
|
264
|
+
triggerPopupId: (state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : void 0,
|
|
265
|
+
popupProps: (state) => state.popupProps,
|
|
266
|
+
popupElement: (state) => state.popupElement,
|
|
267
|
+
positionerElement: (state) => state.positionerElement
|
|
268
|
+
};
|
|
269
|
+
/**
|
|
270
|
+
* Store members a detached handle-backed trigger reads or invokes for trigger registration and data
|
|
271
|
+
* forwarding. `set`/`update` are included only for trigger-count and trigger-data bookkeeping; on a
|
|
272
|
+
* detached (inert) store they are intentionally no-ops, so a write through them is not guaranteed to
|
|
273
|
+
* be durable. Component handle-store views Pick these from their concrete store (preserving its
|
|
274
|
+
* context and selectors) and add any component-specific trigger-invoked members such as `setOpen`.
|
|
275
|
+
*/
|
|
276
|
+
/**
|
|
277
|
+
* The subset of a popup store that trigger registration and data forwarding rely on. Narrow enough
|
|
278
|
+
* that an inert store can be passed while detached.
|
|
279
|
+
*/
|
|
280
|
+
export { Count as a, PAGE_PAD as c, Progress as d, ROW as f, CommandLine as i, PageHeader as l, popupStoreSelectors as n, EmptyNote as o, StatusWord as p, Age as r, ListCard as s, createInitialPopupStoreState as t, Pills as u };
|