@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,483 @@
|
|
|
1
|
+
import { n as require_react, o as __toESM, t as require_jsx_runtime } from "./jsx-runtime-Bt0s0YKS.js";
|
|
2
|
+
import { Bt as stopEvent, Cn as cancelOpen, Fn as none, Gn as useButton, Hn as createChangeEventDetails, Jn as useIsoLayoutEffect, Kn as ownerDocument, L as DROPDOWN_COLLISION_AVOIDANCE, M as FloatingPortal, Pn as listNavigation, S as useOpenChangeComplete, Tr as cn, Wt as isInteractiveElement, Xt as popupStateMapping, Y as useTimeout, Yn as useStableCallback, jn as inputPress, mn as getTarget, mr as useRenderElement, on as transitionStatusMapping, or as isElement, pn as contains, qn as formatErrorMessage, r as Icon } from "./button-CgOIVdmD.js";
|
|
3
|
+
import { _ as inertValue, a as InternalBackdrop, c as useLabelableId, l as useLabelableContext, m as useFieldRootContext, o as useSetFieldFocused, v as FloatingFocusManager } from "./fields-BbieQTD0.js";
|
|
4
|
+
import { S as useClick, t as useAnchoredPopupScrollLock } from "./useAnchoredPopupScrollLock-DlBKHRw7.js";
|
|
5
|
+
import { d as ItemIndicator, f as resolveAriaLabelledBy, i as POPUP, m as useTypeahead, n as ITEM, p as isMouseWithinBounds, r as ITEM_CHECK, t as CHEVRON, u as TRIGGER } from "./select-Af7Wibii.js";
|
|
6
|
+
import { $ as ComboboxItem$1, Q as ComboboxEmpty$1, at as useComboboxPositionerContext, bt as useAnchorPositioning, ct as triggerStateAttributesMapping, dt as useComboboxFloatingContext, et as useComboboxItemContext, ft as useComboboxInputValueContext, it as ComboboxPositionerContext, lt as AriaCombobox, nt as ComboboxInput$1, ot as useListEmpty, pt as useComboboxRootContext, rt as ComboboxInternalDismissButton, st as usePopupSide, tt as ComboboxList$1, ut as getComboboxPopupId, vt as usePositioner, yt as getDisabledMountTransitionStyles } from "./router-DkRHNTpE.js";
|
|
7
|
+
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/trigger/ComboboxTrigger.mjs
|
|
8
|
+
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
9
|
+
/**
|
|
10
|
+
* A button that opens the popup.
|
|
11
|
+
* Renders a `<button>` element.
|
|
12
|
+
*
|
|
13
|
+
* Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)
|
|
14
|
+
*/
|
|
15
|
+
var ComboboxTrigger = /*#__PURE__*/ import_react.forwardRef(function ComboboxTrigger(componentProps, forwardedRef) {
|
|
16
|
+
const { render, className, nativeButton = true, disabled: disabledProp = false, id: idProp, style, ...elementProps } = componentProps;
|
|
17
|
+
const { state: fieldState, disabled: fieldDisabled, setTouched, validationMode, validation } = useFieldRootContext();
|
|
18
|
+
const { labelId: fieldLabelId } = useLabelableContext();
|
|
19
|
+
const store = useComboboxRootContext();
|
|
20
|
+
const selectionMode = store.useState("selectionMode");
|
|
21
|
+
const comboboxDisabled = store.useState("disabled");
|
|
22
|
+
const readOnly = store.useState("readOnly");
|
|
23
|
+
const required = store.useState("required");
|
|
24
|
+
const positionerElement = store.useState("positionerElement");
|
|
25
|
+
const listElement = store.useState("listElement");
|
|
26
|
+
const storedPopupId = store.useState("popupId");
|
|
27
|
+
const triggerProps = store.useState("triggerProps");
|
|
28
|
+
const inputInsidePopup = store.useState("inputInsidePopup");
|
|
29
|
+
const rootId = store.useState("id");
|
|
30
|
+
const comboboxLabelId = store.useState("labelId");
|
|
31
|
+
const open = store.useState("open");
|
|
32
|
+
const selectedValue = store.useState("selectedValue");
|
|
33
|
+
const activeIndex = store.useState("activeIndex");
|
|
34
|
+
const selectedIndex = store.useState("selectedIndex");
|
|
35
|
+
const hasSelectedValue = store.useState("hasSelectedValue");
|
|
36
|
+
const floatingRootContext = useComboboxFloatingContext();
|
|
37
|
+
const inputValue = useComboboxInputValueContext();
|
|
38
|
+
const focusTimeout = useTimeout();
|
|
39
|
+
const disabled = fieldDisabled || comboboxDisabled || disabledProp;
|
|
40
|
+
const listEmpty = useListEmpty();
|
|
41
|
+
const popupSide = usePopupSide(store);
|
|
42
|
+
const triggerRef = import_react.useRef(null);
|
|
43
|
+
const setFocused = useSetFieldFocused(disabled, triggerRef);
|
|
44
|
+
useLabelableId({ id: inputInsidePopup ? idProp : void 0 });
|
|
45
|
+
const id = inputInsidePopup ? idProp ?? rootId : idProp;
|
|
46
|
+
const ariaLabelledBy = resolveAriaLabelledBy(fieldLabelId, comboboxLabelId);
|
|
47
|
+
let ariaControls;
|
|
48
|
+
if (open && inputInsidePopup) ariaControls = storedPopupId ?? getComboboxPopupId(rootId);
|
|
49
|
+
else if (open) ariaControls = listElement?.id;
|
|
50
|
+
const currentPointerTypeRef = import_react.useRef("");
|
|
51
|
+
function trackPointerType(event) {
|
|
52
|
+
currentPointerTypeRef.current = event.pointerType;
|
|
53
|
+
}
|
|
54
|
+
const { reference: triggerTypeaheadProps } = useTypeahead(floatingRootContext, {
|
|
55
|
+
enabled: !open && !readOnly && !comboboxDisabled && selectionMode === "single",
|
|
56
|
+
listRef: store.context.labelsRef,
|
|
57
|
+
activeIndex,
|
|
58
|
+
selectedIndex,
|
|
59
|
+
onMatch(index) {
|
|
60
|
+
const nextSelectedValue = store.context.valuesRef.current[index];
|
|
61
|
+
if (nextSelectedValue !== void 0) store.context.setSelectedValue(nextSelectedValue, createChangeEventDetails(none));
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
const { reference: triggerClickProps } = useClick(floatingRootContext, {
|
|
65
|
+
enabled: !comboboxDisabled,
|
|
66
|
+
event: "mousedown"
|
|
67
|
+
});
|
|
68
|
+
const { buttonRef, getButtonProps } = useButton({
|
|
69
|
+
native: nativeButton,
|
|
70
|
+
disabled
|
|
71
|
+
});
|
|
72
|
+
const state = {
|
|
73
|
+
...fieldState,
|
|
74
|
+
readOnly,
|
|
75
|
+
open,
|
|
76
|
+
disabled,
|
|
77
|
+
popupSide,
|
|
78
|
+
listEmpty,
|
|
79
|
+
placeholder: selectionMode === "none" ? false : !hasSelectedValue
|
|
80
|
+
};
|
|
81
|
+
const setTriggerElement = useStableCallback((element) => {
|
|
82
|
+
store.set("triggerElement", element);
|
|
83
|
+
});
|
|
84
|
+
return useRenderElement("button", componentProps, {
|
|
85
|
+
ref: [
|
|
86
|
+
forwardedRef,
|
|
87
|
+
buttonRef,
|
|
88
|
+
triggerRef,
|
|
89
|
+
setTriggerElement
|
|
90
|
+
],
|
|
91
|
+
state,
|
|
92
|
+
props: [
|
|
93
|
+
triggerProps,
|
|
94
|
+
triggerClickProps,
|
|
95
|
+
triggerTypeaheadProps,
|
|
96
|
+
{
|
|
97
|
+
id,
|
|
98
|
+
tabIndex: inputInsidePopup ? 0 : -1,
|
|
99
|
+
role: inputInsidePopup ? "combobox" : void 0,
|
|
100
|
+
"aria-expanded": open,
|
|
101
|
+
"aria-haspopup": inputInsidePopup ? "dialog" : "listbox",
|
|
102
|
+
"aria-controls": ariaControls,
|
|
103
|
+
"aria-required": inputInsidePopup ? required || void 0 : void 0,
|
|
104
|
+
"aria-readonly": inputInsidePopup ? readOnly || void 0 : void 0,
|
|
105
|
+
"aria-labelledby": ariaLabelledBy,
|
|
106
|
+
onPointerDown: trackPointerType,
|
|
107
|
+
onPointerEnter: trackPointerType,
|
|
108
|
+
onFocus() {
|
|
109
|
+
setFocused(true);
|
|
110
|
+
if (disabled) return;
|
|
111
|
+
focusTimeout.start(0, store.context.forceMount);
|
|
112
|
+
},
|
|
113
|
+
onBlur(event) {
|
|
114
|
+
if (contains(positionerElement, event.relatedTarget)) return;
|
|
115
|
+
setTouched(true);
|
|
116
|
+
setFocused(false);
|
|
117
|
+
if (validationMode === "onBlur") {
|
|
118
|
+
const valueToValidate = selectionMode === "none" ? inputValue : selectedValue;
|
|
119
|
+
validation.commit(valueToValidate);
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
onMouseDown(event) {
|
|
123
|
+
if (disabled) return;
|
|
124
|
+
if (!inputInsidePopup) floatingRootContext.set("domReferenceElement", event.currentTarget);
|
|
125
|
+
store.context.forceMount();
|
|
126
|
+
if (currentPointerTypeRef.current !== "touch") {
|
|
127
|
+
store.context.inputRef.current?.focus();
|
|
128
|
+
if (!inputInsidePopup) event.preventDefault();
|
|
129
|
+
}
|
|
130
|
+
if (open) return;
|
|
131
|
+
const doc = ownerDocument(event.currentTarget);
|
|
132
|
+
function handleMouseUp(mouseEvent) {
|
|
133
|
+
const currentTriggerElement = store.state.triggerElement;
|
|
134
|
+
if (!currentTriggerElement) return;
|
|
135
|
+
const mouseUpTarget = getTarget(mouseEvent);
|
|
136
|
+
const positioner = store.state.positionerElement;
|
|
137
|
+
const list = store.state.listElement;
|
|
138
|
+
if (contains(currentTriggerElement, mouseUpTarget) || contains(positioner, mouseUpTarget) || contains(list, mouseUpTarget)) return;
|
|
139
|
+
if (isMouseWithinBounds(mouseEvent, currentTriggerElement)) return;
|
|
140
|
+
store.context.setOpen(false, createChangeEventDetails(cancelOpen, mouseEvent));
|
|
141
|
+
}
|
|
142
|
+
if (inputInsidePopup) doc.addEventListener("mouseup", handleMouseUp, { once: true });
|
|
143
|
+
},
|
|
144
|
+
onKeyDown(event) {
|
|
145
|
+
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
146
|
+
stopEvent(event);
|
|
147
|
+
store.context.setOpen(true, createChangeEventDetails(listNavigation, event.nativeEvent));
|
|
148
|
+
store.context.inputRef.current?.focus();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
validation.getValidationProps(disabled, elementProps),
|
|
153
|
+
getButtonProps
|
|
154
|
+
],
|
|
155
|
+
stateAttributesMapping: triggerStateAttributesMapping
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/utils/handleInputPress.mjs
|
|
159
|
+
function handleInputPress(event, store, disabled, shouldIgnoreTarget) {
|
|
160
|
+
if (event.baseUIHandlerPrevented) return;
|
|
161
|
+
const target = getTarget(event.nativeEvent);
|
|
162
|
+
const targetElement = isElement(target) ? target : null;
|
|
163
|
+
if (targetElement !== event.currentTarget && (shouldIgnoreTarget?.(targetElement) || isInteractiveElement(targetElement))) return;
|
|
164
|
+
event.preventDefault();
|
|
165
|
+
if (disabled) return;
|
|
166
|
+
store.context.inputRef.current?.focus();
|
|
167
|
+
if (store.state.openOnInputClick) store.context.setOpen(true, createChangeEventDetails(inputPress, event.nativeEvent));
|
|
168
|
+
}
|
|
169
|
+
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/input-group/ComboboxInputGroup.mjs
|
|
170
|
+
/**
|
|
171
|
+
* A wrapper for the input and its associated controls.
|
|
172
|
+
* Renders a `<div>` element.
|
|
173
|
+
*
|
|
174
|
+
* Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)
|
|
175
|
+
*/
|
|
176
|
+
var ComboboxInputGroup = /*#__PURE__*/ import_react.forwardRef(function ComboboxInputGroup(componentProps, forwardedRef) {
|
|
177
|
+
const { render, className, style, ...elementProps } = componentProps;
|
|
178
|
+
const { state: fieldState } = useFieldRootContext();
|
|
179
|
+
const store = useComboboxRootContext();
|
|
180
|
+
const open = store.useState("open");
|
|
181
|
+
const comboboxDisabled = store.useState("disabled");
|
|
182
|
+
const readOnly = store.useState("readOnly");
|
|
183
|
+
const hasSelectedValue = store.useState("hasSelectedValue");
|
|
184
|
+
const selectionMode = store.useState("selectionMode");
|
|
185
|
+
const popupSide = usePopupSide(store);
|
|
186
|
+
const disabled = comboboxDisabled;
|
|
187
|
+
const listEmpty = useListEmpty();
|
|
188
|
+
const placeholder = selectionMode === "none" ? false : !hasSelectedValue;
|
|
189
|
+
const state = {
|
|
190
|
+
...fieldState,
|
|
191
|
+
open,
|
|
192
|
+
disabled,
|
|
193
|
+
readOnly,
|
|
194
|
+
popupSide,
|
|
195
|
+
listEmpty,
|
|
196
|
+
placeholder
|
|
197
|
+
};
|
|
198
|
+
const setInputGroupElement = useStableCallback((element) => {
|
|
199
|
+
store.set("inputGroupElement", element);
|
|
200
|
+
});
|
|
201
|
+
return useRenderElement("div", componentProps, {
|
|
202
|
+
ref: [forwardedRef, setInputGroupElement],
|
|
203
|
+
props: [{
|
|
204
|
+
role: "group",
|
|
205
|
+
onMouseDown(event) {
|
|
206
|
+
handleInputPress(event, store, disabled, (target) => {
|
|
207
|
+
return contains(store.context.chipsContainerRef.current, target);
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
}, elementProps],
|
|
211
|
+
state,
|
|
212
|
+
stateAttributesMapping: triggerStateAttributesMapping
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/portal/ComboboxPortalContext.mjs
|
|
216
|
+
var ComboboxPortalContext = /*#__PURE__*/ import_react.createContext(void 0);
|
|
217
|
+
function useComboboxPortalContext() {
|
|
218
|
+
const context = import_react.useContext(ComboboxPortalContext);
|
|
219
|
+
if (context === void 0) throw new Error(formatErrorMessage(20));
|
|
220
|
+
return context;
|
|
221
|
+
}
|
|
222
|
+
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/portal/ComboboxPortal.mjs
|
|
223
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
224
|
+
var ComboboxPortal = /*#__PURE__*/ import_react.forwardRef(function ComboboxPortal(props, forwardedRef) {
|
|
225
|
+
const { keepMounted = false, ...portalProps } = props;
|
|
226
|
+
const store = useComboboxRootContext();
|
|
227
|
+
const mounted = store.useState("mounted");
|
|
228
|
+
const forceMounted = store.useState("forceMounted");
|
|
229
|
+
if (!(mounted || keepMounted || forceMounted)) return null;
|
|
230
|
+
return /*#__PURE__*/ (0, import_jsx_runtime.jsx)(ComboboxPortalContext.Provider, {
|
|
231
|
+
value: keepMounted,
|
|
232
|
+
children: /*#__PURE__*/ (0, import_jsx_runtime.jsx)(FloatingPortal, {
|
|
233
|
+
ref: forwardedRef,
|
|
234
|
+
...portalProps
|
|
235
|
+
})
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/positioner/ComboboxPositioner.mjs
|
|
239
|
+
/**
|
|
240
|
+
* Positions the popup against the trigger.
|
|
241
|
+
* Renders a `<div>` element.
|
|
242
|
+
*
|
|
243
|
+
* Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)
|
|
244
|
+
*/
|
|
245
|
+
var ComboboxPositioner = /*#__PURE__*/ import_react.forwardRef(function ComboboxPositioner(componentProps, forwardedRef) {
|
|
246
|
+
const { render, className, anchor, positionMethod, side, align, sideOffset, alignOffset, collisionBoundary = "clipping-ancestors", collisionPadding, arrowPadding, sticky, disableAnchorTracking = false, collisionAvoidance = DROPDOWN_COLLISION_AVOIDANCE, style: styleProp, ...elementProps } = componentProps;
|
|
247
|
+
const store = useComboboxRootContext();
|
|
248
|
+
const floatingRootContext = useComboboxFloatingContext();
|
|
249
|
+
const keepMounted = useComboboxPortalContext();
|
|
250
|
+
const modal = store.useState("modal");
|
|
251
|
+
const open = store.useState("open");
|
|
252
|
+
const mounted = store.useState("mounted");
|
|
253
|
+
const openMethod = store.useState("openMethod");
|
|
254
|
+
const positionerElement = store.useState("positionerElement");
|
|
255
|
+
const triggerElement = store.useState("triggerElement");
|
|
256
|
+
const inputElement = store.useState("inputElement");
|
|
257
|
+
const inputGroupElement = store.useState("inputGroupElement");
|
|
258
|
+
const inputInsidePopup = store.useState("inputInsidePopup");
|
|
259
|
+
const transitionStatus = store.useState("transitionStatus");
|
|
260
|
+
const empty = useListEmpty();
|
|
261
|
+
const positioning = useAnchorPositioning({
|
|
262
|
+
anchor: anchor ?? (inputInsidePopup ? triggerElement : inputGroupElement ?? inputElement),
|
|
263
|
+
floatingRootContext,
|
|
264
|
+
positionMethod,
|
|
265
|
+
mounted,
|
|
266
|
+
side,
|
|
267
|
+
sideOffset,
|
|
268
|
+
align,
|
|
269
|
+
alignOffset,
|
|
270
|
+
arrowPadding,
|
|
271
|
+
collisionBoundary,
|
|
272
|
+
collisionPadding,
|
|
273
|
+
sticky,
|
|
274
|
+
disableAnchorTracking,
|
|
275
|
+
keepMounted,
|
|
276
|
+
collisionAvoidance,
|
|
277
|
+
lazyFlip: true
|
|
278
|
+
});
|
|
279
|
+
useAnchoredPopupScrollLock(open && modal, openMethod === "touch", positionerElement, triggerElement);
|
|
280
|
+
const state = {
|
|
281
|
+
open,
|
|
282
|
+
side: positioning.side,
|
|
283
|
+
align: positioning.align,
|
|
284
|
+
anchorHidden: positioning.anchorHidden,
|
|
285
|
+
empty
|
|
286
|
+
};
|
|
287
|
+
useIsoLayoutEffect(() => {
|
|
288
|
+
store.set("popupSide", positioning.side);
|
|
289
|
+
}, [store, positioning.side]);
|
|
290
|
+
const setPositionerElement = useStableCallback((element) => {
|
|
291
|
+
store.set("positionerElement", element);
|
|
292
|
+
});
|
|
293
|
+
const element = usePositioner(componentProps, state, {
|
|
294
|
+
styles: positioning.positionerStyles,
|
|
295
|
+
transitionStatus,
|
|
296
|
+
props: elementProps,
|
|
297
|
+
refs: [forwardedRef, setPositionerElement],
|
|
298
|
+
hidden: !mounted,
|
|
299
|
+
inert: !open
|
|
300
|
+
});
|
|
301
|
+
return /*#__PURE__*/ (0, import_jsx_runtime.jsxs)(ComboboxPositionerContext.Provider, {
|
|
302
|
+
value: positioning,
|
|
303
|
+
children: [mounted && modal && /*#__PURE__*/ (0, import_jsx_runtime.jsx)(InternalBackdrop, {
|
|
304
|
+
inert: inertValue(!open),
|
|
305
|
+
cutout: inputGroupElement ?? inputElement ?? triggerElement
|
|
306
|
+
}), element]
|
|
307
|
+
});
|
|
308
|
+
});
|
|
309
|
+
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/popup/ComboboxPopup.mjs
|
|
310
|
+
var stateAttributesMapping = {
|
|
311
|
+
...popupStateMapping,
|
|
312
|
+
...transitionStatusMapping
|
|
313
|
+
};
|
|
314
|
+
/**
|
|
315
|
+
* A container for the list.
|
|
316
|
+
* Renders a `<div>` element.
|
|
317
|
+
*
|
|
318
|
+
* Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)
|
|
319
|
+
*/
|
|
320
|
+
var ComboboxPopup = /*#__PURE__*/ import_react.forwardRef(function ComboboxPopup(componentProps, forwardedRef) {
|
|
321
|
+
const { render, className, style, initialFocus, finalFocus, ...elementProps } = componentProps;
|
|
322
|
+
const store = useComboboxRootContext();
|
|
323
|
+
const positioning = useComboboxPositionerContext();
|
|
324
|
+
const floatingRootContext = useComboboxFloatingContext();
|
|
325
|
+
const mounted = store.useState("mounted");
|
|
326
|
+
const open = store.useState("open");
|
|
327
|
+
const openMethod = store.useState("openMethod");
|
|
328
|
+
const popupProps = store.useState("popupProps");
|
|
329
|
+
const transitionStatus = store.useState("transitionStatus");
|
|
330
|
+
const inputInsidePopup = store.useState("inputInsidePopup");
|
|
331
|
+
const inputElement = store.useState("inputElement");
|
|
332
|
+
const modal = store.useState("modal");
|
|
333
|
+
const rootId = store.useState("id");
|
|
334
|
+
const empty = useListEmpty();
|
|
335
|
+
const popupId = elementProps.id ?? (inputInsidePopup ? getComboboxPopupId(rootId) : void 0);
|
|
336
|
+
useIsoLayoutEffect(() => {
|
|
337
|
+
store.set("popupId", store.context.popupRef.current?.id || popupId);
|
|
338
|
+
return () => {
|
|
339
|
+
store.set("popupId", void 0);
|
|
340
|
+
};
|
|
341
|
+
}, [store, popupId]);
|
|
342
|
+
useOpenChangeComplete({
|
|
343
|
+
open,
|
|
344
|
+
ref: store.context.popupRef,
|
|
345
|
+
onComplete() {
|
|
346
|
+
if (open) store.context.onOpenChangeComplete(true);
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
const state = {
|
|
350
|
+
open,
|
|
351
|
+
side: positioning.side,
|
|
352
|
+
align: positioning.align,
|
|
353
|
+
anchorHidden: positioning.anchorHidden,
|
|
354
|
+
transitionStatus,
|
|
355
|
+
empty
|
|
356
|
+
};
|
|
357
|
+
const element = useRenderElement("div", componentProps, {
|
|
358
|
+
state,
|
|
359
|
+
ref: [forwardedRef, store.context.popupRef],
|
|
360
|
+
props: [
|
|
361
|
+
popupProps,
|
|
362
|
+
{
|
|
363
|
+
id: popupId,
|
|
364
|
+
role: inputInsidePopup ? "dialog" : "presentation",
|
|
365
|
+
onFocus(event) {
|
|
366
|
+
const target = getTarget(event.nativeEvent);
|
|
367
|
+
if (openMethod !== "touch" && (contains(store.state.listElement, target) || target === event.currentTarget)) store.context.inputRef.current?.focus();
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
getDisabledMountTransitionStyles(transitionStatus),
|
|
371
|
+
elementProps
|
|
372
|
+
],
|
|
373
|
+
stateAttributesMapping
|
|
374
|
+
});
|
|
375
|
+
const resolvedInitialFocus = initialFocus === void 0 ? inputInsidePopup ? (interactionType) => interactionType === "touch" ? store.context.popupRef.current : inputElement : false : initialFocus;
|
|
376
|
+
let resolvedFinalFocus;
|
|
377
|
+
if (finalFocus != null) resolvedFinalFocus = finalFocus;
|
|
378
|
+
else resolvedFinalFocus = inputInsidePopup ? void 0 : false;
|
|
379
|
+
const focusManagerModal = !inputInsidePopup || modal;
|
|
380
|
+
return /*#__PURE__*/ (0, import_jsx_runtime.jsx)(FloatingFocusManager, {
|
|
381
|
+
context: floatingRootContext,
|
|
382
|
+
disabled: !mounted,
|
|
383
|
+
modal: focusManagerModal,
|
|
384
|
+
openInteractionType: openMethod,
|
|
385
|
+
initialFocus: resolvedInitialFocus,
|
|
386
|
+
returnFocus: resolvedFinalFocus,
|
|
387
|
+
getInsideElements: () => [store.context.startDismissRef.current, store.context.endDismissRef.current],
|
|
388
|
+
children: /*#__PURE__*/ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [element, focusManagerModal && /*#__PURE__*/ (0, import_jsx_runtime.jsx)(ComboboxInternalDismissButton, { ref: store.context.endDismissRef })] })
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/root/ComboboxRoot.mjs
|
|
392
|
+
/**
|
|
393
|
+
* Groups all parts of the combobox.
|
|
394
|
+
* Doesn't render its own HTML element.
|
|
395
|
+
*
|
|
396
|
+
* Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)
|
|
397
|
+
*/
|
|
398
|
+
function ComboboxRoot(props) {
|
|
399
|
+
const { multiple = false, defaultValue, value, onValueChange, autoComplete, ...other } = props;
|
|
400
|
+
return /*#__PURE__*/ (0, import_jsx_runtime.jsx)(AriaCombobox, {
|
|
401
|
+
...other,
|
|
402
|
+
selectionMode: multiple ? "multiple" : "single",
|
|
403
|
+
selectedValue: value,
|
|
404
|
+
defaultSelectedValue: defaultValue,
|
|
405
|
+
onSelectedValueChange: onValueChange,
|
|
406
|
+
formAutoComplete: autoComplete
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/item-indicator/ComboboxItemIndicator.mjs
|
|
410
|
+
/**
|
|
411
|
+
* Indicates whether the item is selected.
|
|
412
|
+
* Renders a `<span>` element.
|
|
413
|
+
*
|
|
414
|
+
* Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)
|
|
415
|
+
*/
|
|
416
|
+
var ComboboxItemIndicator = /*#__PURE__*/ import_react.forwardRef(function ComboboxItemIndicator(componentProps, forwardedRef) {
|
|
417
|
+
const { selected } = useComboboxItemContext();
|
|
418
|
+
if (!(componentProps.keepMounted || selected)) return null;
|
|
419
|
+
return /*#__PURE__*/ (0, import_jsx_runtime.jsx)(ItemIndicator, {
|
|
420
|
+
...componentProps,
|
|
421
|
+
selected,
|
|
422
|
+
ref: forwardedRef
|
|
423
|
+
});
|
|
424
|
+
});
|
|
425
|
+
// src/components/ui/combobox.tsx
|
|
426
|
+
var Combobox = ComboboxRoot;
|
|
427
|
+
/** A typing field framed like the Select trigger, with the same inset chevron. */
|
|
428
|
+
function ComboboxInput({ className, ...props }) {
|
|
429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ComboboxInputGroup, {
|
|
430
|
+
"data-slot": "combobox-input-group",
|
|
431
|
+
className: cn("relative flex items-center", className),
|
|
432
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxInput$1, {
|
|
433
|
+
"data-slot": "combobox-input",
|
|
434
|
+
className: cn(TRIGGER, "placeholder:text-muted focus:border-accent"),
|
|
435
|
+
...props
|
|
436
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxTrigger, {
|
|
437
|
+
"data-slot": "combobox-trigger",
|
|
438
|
+
"aria-label": "Show options",
|
|
439
|
+
className: "absolute inset-y-0 right-0 flex w-9 items-center justify-center outline-none",
|
|
440
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
|
|
441
|
+
name: "chevron",
|
|
442
|
+
className: CHEVRON
|
|
443
|
+
})
|
|
444
|
+
})]
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
function ComboboxContent({ className, ...props }) {
|
|
448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxPositioner, {
|
|
449
|
+
sideOffset: 6,
|
|
450
|
+
className: "z-40",
|
|
451
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxPopup, {
|
|
452
|
+
"data-slot": "combobox-content",
|
|
453
|
+
className: cn(POPUP, className),
|
|
454
|
+
...props
|
|
455
|
+
})
|
|
456
|
+
}) });
|
|
457
|
+
}
|
|
458
|
+
var ComboboxList = ComboboxList$1;
|
|
459
|
+
function ComboboxEmpty({ className, ...props }) {
|
|
460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxEmpty$1, {
|
|
461
|
+
"data-slot": "combobox-empty",
|
|
462
|
+
className: cn("px-2.5 py-1.5 text-sm text-muted empty:hidden", className),
|
|
463
|
+
...props
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
function ComboboxItem({ className, children, ...props }) {
|
|
467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ComboboxItem$1, {
|
|
468
|
+
"data-slot": "combobox-item",
|
|
469
|
+
className: cn(ITEM, className),
|
|
470
|
+
...props,
|
|
471
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
472
|
+
className: "truncate",
|
|
473
|
+
children
|
|
474
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxItemIndicator, {
|
|
475
|
+
className: ITEM_CHECK,
|
|
476
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
|
|
477
|
+
name: "check",
|
|
478
|
+
className: "size-4"
|
|
479
|
+
})
|
|
480
|
+
})]
|
|
481
|
+
});
|
|
482
|
+
}
|
|
483
|
+
export { ComboboxItem as a, ComboboxInput as i, ComboboxContent as n, ComboboxList as o, ComboboxEmpty as r, Combobox as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { St as useSuspenseQuery } from "./router-DkRHNTpE.js";
|
|
2
|
+
import { o as companionViewQuery } from "./studio-queries-BtRGzDdh.js";
|
|
3
|
+
import { t as require_jsx_runtime } from "./jsx-runtime-Bt0s0YKS.js";
|
|
4
4
|
// src/shell/companion-error.tsx
|
|
5
5
|
var import_jsx_runtime = require_jsx_runtime();
|
|
6
6
|
/**
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { t as createServerRpc } from "./createServerRpc-bFKFpGFG.js";
|
|
2
|
+
import { n as createServerFn } from "../server.js";
|
|
3
|
+
import { u as COMPANION_DIGEST_PATTERN } from "./studio-CAcKp3bM.js";
|
|
4
|
+
// src/server/companions.ts?tss-serverfn-split
|
|
5
|
+
/** Deletes a registered companion's folder and unregisters it; core refuses unless writable. */
|
|
6
|
+
var deleteCompanion_createServerFn_handler = createServerRpc({
|
|
7
|
+
id: "9d1ee2ce056a1b26a05141623f6d836fa1c4c283e555132764a528a212e3c50a",
|
|
8
|
+
name: "deleteCompanion",
|
|
9
|
+
filename: "src/server/companions.ts"
|
|
10
|
+
}, (opts) => deleteCompanion.__executeServer(opts));
|
|
11
|
+
var deleteCompanion = createServerFn({ method: "POST" }).validator((input) => {
|
|
12
|
+
if (typeof input?.companion !== "string" || !COMPANION_DIGEST_PATTERN.test(input.companion)) throw new Error("no registered companion was named");
|
|
13
|
+
return { companion: input.companion };
|
|
14
|
+
}).handler(deleteCompanion_createServerFn_handler, ({ data, context }) => context.studio.deleteCompanion(data.companion));
|
|
15
|
+
var addCompanion_createServerFn_handler = createServerRpc({
|
|
16
|
+
id: "ce3152edd0f9f5f9d010eb4e4217f988b6787024b3f6a48677370a325f4698aa",
|
|
17
|
+
name: "addCompanion",
|
|
18
|
+
filename: "src/server/companions.ts"
|
|
19
|
+
}, (opts) => addCompanion.__executeServer(opts));
|
|
20
|
+
var addCompanion = createServerFn({ method: "POST" }).validator((input) => {
|
|
21
|
+
if (input?.kind === "url" && typeof input.url === "string") return {
|
|
22
|
+
kind: "url",
|
|
23
|
+
url: input.url
|
|
24
|
+
};
|
|
25
|
+
if (input?.kind === "path" && typeof input.path === "string") return {
|
|
26
|
+
kind: "path",
|
|
27
|
+
path: input.path
|
|
28
|
+
};
|
|
29
|
+
throw new Error("name a Git URL or a path");
|
|
30
|
+
}).handler(addCompanion_createServerFn_handler, ({ data, context }) => context.studio.addCompanion(data));
|
|
31
|
+
export { addCompanion_createServerFn_handler, deleteCompanion_createServerFn_handler };
|
package/studio-dist/server/assets/{createServerRpc-tK2lE9R2.js → createServerRpc-bFKFpGFG.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as TSS_SERVER_FUNCTION } from "../server.js";
|
|
2
2
|
// ../../node_modules/.bun/@tanstack+start-server-core@1.169.45/node_modules/@tanstack/start-server-core/dist/esm/createServerRpc.js
|
|
3
3
|
var createServerRpc = (serverFnMeta, splitImportFn) => {
|
|
4
4
|
const url = "/_serverFn/" + serverFnMeta.id;
|