@uniqbit/mate-core 1.0.0-canary.6 → 1.0.0-canary.8
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/package.json +6 -3
- package/src/cli/commands/artifact/delivery/submit.ts +6 -4
- package/src/cli/commands/artifact/finish/command.ts +28 -11
- package/src/cli/commands/artifact/pending/command.ts +71 -7
- package/src/cli/commands/cap/tokensave.ts +2 -2
- package/src/cli/commands/companion/update.ts +2 -3
- package/src/cli/commands/doctor.ts +67 -4
- package/src/cli/commands/friction.ts +558 -0
- package/src/cli/commands/install.ts +8 -4
- package/src/cli/commands/plugin/install.ts +82 -35
- package/src/cli/commands/studio/connection.ts +53 -0
- package/src/cli/commands/studio/routes.ts +3 -0
- package/src/cli/commands/studio/selection.ts +10 -1
- package/src/cli/commands/studio/server.ts +31 -0
- package/src/cli/commands/studio/service-host.ts +3 -0
- package/src/cli/commands/studio/services.ts +25 -0
- package/src/cli/commands/triage.ts +172 -0
- package/src/cli/commands/vscode/release-vsix.json +2 -2
- package/src/cli/install-plan.tsx +3 -0
- package/src/cli/main.ts +85 -19
- package/src/cli/plugin-commands.ts +6 -1
- package/src/cli/usage.ts +12 -2
- package/src/create-mate.ts +11 -5
- package/src/distribution.ts +2 -0
- package/src/factory-host.ts +6 -0
- package/src/hooks/validate-artifact-path.ts +64 -14
- package/src/index.ts +1 -0
- package/src/lib/delivery/merge-git.ts +31 -7
- package/src/lib/delivery/overlap.ts +14 -1
- package/src/lib/delivery/repository-access.ts +11 -6
- package/src/lib/delivery/staging/apply-chain.ts +25 -7
- package/src/lib/delivery/staging/linked-merges.ts +175 -0
- package/src/lib/delivery/staging/naming.ts +3 -0
- package/src/lib/delivery/staging/openspec-type.ts +38 -7
- package/src/lib/delivery/staging/pending.ts +153 -11
- package/src/lib/delivery/staging/preflight.ts +239 -0
- package/src/lib/delivery/staging/project.ts +243 -104
- package/src/lib/delivery/staging/replay.ts +5 -3
- package/src/lib/delivery/staging/settle-linked.ts +5 -119
- package/src/lib/delivery/staging/submit.ts +139 -18
- package/src/lib/delivery/submit-change.ts +163 -37
- package/src/lib/friction/describe.ts +42 -0
- package/src/lib/friction/fields.ts +60 -0
- package/src/lib/friction/mark.ts +194 -0
- package/src/lib/friction/view/model.ts +67 -0
- package/src/lib/friction/view/read.ts +145 -0
- package/src/lib/friction/view/select.ts +54 -0
- package/src/lib/openspec-cli.ts +10 -5
- package/src/lib/orchestrator/adapters/claude.ts +5 -4
- package/src/lib/orchestrator/adapters/opencode.ts +2 -0
- package/src/lib/orchestrator/root-context.ts +23 -6
- package/src/lib/package-paths.ts +23 -15
- package/src/lib/session-attribution.ts +3 -7
- package/src/lib/skills-cli.ts +38 -0
- package/src/lib/tool-manifest.ts +73 -0
- package/src/lib/triage/context.ts +312 -0
- package/src/lib/triage/launch.ts +52 -0
- package/src/lib/triage/prepare.ts +112 -0
- package/src/lib/triage/session.ts +126 -0
- package/src/opencode/companion-hooks.ts +53 -5
- package/src/opencode/projected-guidance.ts +2 -0
- package/src/playbooks/companion-guidance.ts +2 -2
- package/src/plugin-api.ts +6 -0
- package/src/runtime/command-arg.ts +15 -0
- package/src/runtime/command-friction.ts +97 -0
- package/src/runtime/companion-guidance.ts +33 -16
- package/src/runtime/friction-fingerprint.ts +35 -0
- package/src/runtime/friction-log.ts +376 -0
- package/src/runtime/friction-recorder.ts +212 -0
- package/src/runtime/friction-retention.ts +1 -0
- package/src/runtime/friction-state.ts +110 -0
- package/src/runtime/friction-switch.ts +26 -0
- package/src/runtime/friction-vocabulary.ts +42 -0
- package/src/runtime/git-tracked.ts +13 -2
- package/src/runtime/projected-guidance.ts +2 -1
- package/src/runtime/secret-values.ts +16 -0
- package/src/runtime/session-id.ts +24 -0
- package/src/runtime/session-prepare-runner.ts +3 -0
- package/src/runtime/workflow/next-handoff-process.ts +2 -1
- package/src/studio.ts +47 -1
- package/src/templates/capabilities/openspec-cap/mate-minimal/schema.yaml +5 -1
- package/src/templates/capabilities/react-doctor/mate-react-doctor/SKILL.md +28 -0
- package/src/templates/mate-skills/agents/mate-apply-change/SKILL.md +42 -4
- package/src/templates/mate-skills/agents/mate-archive-change/SKILL.md +27 -2
- package/src/templates/mate-skills/agents/mate-backfill-spec/SKILL.md +23 -1
- package/src/templates/mate-skills/agents/mate-clarify-intent/SKILL.md +26 -1
- package/src/templates/mate-skills/agents/mate-domain-modeling/SKILL.md +28 -0
- package/src/templates/mate-skills/agents/mate-explore-change/SKILL.md +28 -3
- package/src/templates/mate-skills/agents/mate-grill-me/SKILL.md +28 -0
- package/src/templates/mate-skills/agents/mate-grill-with-docs/SKILL.md +28 -0
- package/src/templates/mate-skills/agents/mate-grilling/SKILL.md +25 -0
- package/src/templates/mate-skills/agents/mate-interview-me/SKILL.md +28 -0
- package/src/templates/mate-skills/agents/mate-propose-change/SKILL.md +28 -3
- package/src/templates/mate-skills/agents/mate-publish-artifact/SKILL.md +28 -6
- package/src/templates/mate-skills/agents/mate-show-me/SKILL.md +27 -2
- package/src/templates/mate-skills/agents/mate-simplify-code/SKILL.md +28 -0
- package/src/templates/mate-skills/agents/mate-submit-change/SKILL.md +24 -2
- package/src/templates/mate-skills/claude/mate-apply-change/SKILL.md +42 -4
- package/src/templates/mate-skills/claude/mate-archive-change/SKILL.md +27 -2
- package/src/templates/mate-skills/claude/mate-backfill-spec/SKILL.md +23 -1
- package/src/templates/mate-skills/claude/mate-clarify-intent/SKILL.md +26 -1
- package/src/templates/mate-skills/claude/mate-domain-modeling/SKILL.md +28 -0
- package/src/templates/mate-skills/claude/mate-explore-change/SKILL.md +28 -3
- package/src/templates/mate-skills/claude/mate-grill-me/SKILL.md +28 -0
- package/src/templates/mate-skills/claude/mate-grill-with-docs/SKILL.md +28 -0
- package/src/templates/mate-skills/claude/mate-grilling/SKILL.md +25 -0
- package/src/templates/mate-skills/claude/mate-interview-me/SKILL.md +28 -0
- package/src/templates/mate-skills/claude/mate-propose-change/SKILL.md +28 -3
- package/src/templates/mate-skills/claude/mate-publish-artifact/SKILL.md +28 -6
- package/src/templates/mate-skills/claude/mate-show-me/SKILL.md +27 -2
- package/src/templates/mate-skills/claude/mate-simplify-code/SKILL.md +28 -0
- package/src/templates/mate-skills/claude/mate-submit-change/SKILL.md +24 -2
- package/src/templates/triage/PLAYBOOK.md +120 -0
- package/src/tools/setup/__snapshots__/runtime-surface-golden.test.ts.snap +108 -108
- package/src/tools/setup/capabilities/graphify.ts +23 -1
- package/src/tools/setup/capabilities/rtk.ts +46 -94
- package/src/tools/setup/capabilities/tokensave.ts +76 -54
- package/src/tools/setup/dynamic-plugins/audiences.ts +28 -14
- package/src/tools/setup/dynamic-plugins/hydrate.ts +32 -14
- package/src/tools/setup/dynamic-plugins/install.ts +2 -0
- package/src/tools/setup/dynamic-plugins/installed.ts +73 -0
- package/src/tools/setup/dynamic-plugins/loader.ts +12 -10
- package/src/tools/setup/dynamic-plugins/local.ts +492 -0
- package/src/tools/setup/dynamic-plugins/paths.ts +34 -6
- package/src/tools/setup/dynamic-plugins/verify.ts +34 -14
- package/src/tools/setup/dynamic-plugins/workspaces.ts +17 -8
- package/src/tools/setup/mate.ts +26 -1
- package/src/tools/setup/plugin.ts +5 -0
- package/src/tools/setup/plugins/gitignore.ts +45 -12
- package/src/tools/setup/service.ts +12 -0
- package/src/tools/setup/utils.ts +10 -1
- package/src/tools/setup.ts +16 -2
- package/studio-dist/client/assets/app-ggXJ_QVh.css +2 -0
- package/studio-dist/client/assets/button-amJ3g5oD.js +1 -0
- package/studio-dist/client/assets/cn-BQPKiwI4.js +1 -0
- package/studio-dist/client/assets/combobox-CJ7aGFid.js +1 -0
- package/studio-dist/client/assets/{companion-view-BVaZNtiI.js → companion-view-C_N237bf.js} +1 -1
- package/studio-dist/client/assets/fields-BAiGkJ5N.js +1 -0
- package/studio-dist/client/assets/friction-DqOU59v7.js +1 -0
- package/studio-dist/client/assets/getting-started-djaQeWlu.js +1 -0
- package/studio-dist/client/assets/getting-started-yp42dj5S.js +1 -0
- package/studio-dist/client/assets/getting-started._topic-C9zVXz_m.js +1 -0
- package/studio-dist/client/assets/getting-started.index-DWbDKICP.js +1 -0
- package/studio-dist/client/assets/graph-BYaD_5Bq.js +2 -0
- package/studio-dist/client/assets/{graph-canvas-DDuzsNSx.js → graph-canvas-ySGKMhmk.js} +1 -1
- package/studio-dist/client/assets/guides-D6T6W_jV.js +1 -0
- package/studio-dist/client/assets/index-Qx7reRPD.js +40 -0
- package/studio-dist/client/assets/markdown-view-jMiaBTSO.js +1 -0
- package/studio-dist/client/assets/panel-C4bf_h2W.js +1 -0
- package/studio-dist/client/assets/plugins._service._view-y6f2FDAB.js +1 -0
- package/studio-dist/client/assets/prepaint-CKsXyJOR.js +27 -0
- package/studio-dist/client/assets/{queries-axYk2u9L.js → queries-Dfp5deWj.js} +1 -1
- package/studio-dist/client/assets/react-BYUSgtBs.js +1 -0
- package/studio-dist/client/assets/reports-JFSwSueq.js +1 -0
- package/studio-dist/client/assets/routes-BdOWSgzK.js +1 -0
- package/studio-dist/client/assets/search-CXosfvYh.js +1 -0
- package/studio-dist/client/assets/select-BHYYWPhK.js +1 -0
- package/studio-dist/client/assets/skills-Bo9FLsBd.js +1 -0
- package/studio-dist/client/assets/{specs-DU1kqcp5.js → specs-BrCOjOch.js} +1 -1
- package/studio-dist/client/assets/specs-view-CdE2rlli.js +1 -0
- package/studio-dist/client/assets/{steps-DhIFuAZy.js → steps-CKUno4lh.js} +1 -1
- package/studio-dist/client/assets/store-C3vJq8Wj.js +1 -0
- package/studio-dist/client/assets/{studio-BR9j15J0.js → studio-0ueISxwP.js} +8 -8
- package/studio-dist/client/assets/{studio-queries-CFP_yTpr.js → studio-queries-BflKt9va.js} +2 -2
- package/studio-dist/client/assets/{usage-CHmwtkoM.js → usage-BLsLy0nN.js} +16 -16
- package/studio-dist/client/assets/useAnchoredPopupScrollLock-DC7f8GOp.js +1 -0
- package/studio-dist/client/assets/useMutation-uJUrejsi.js +1 -0
- package/studio-dist/client/assets/vault-BB1B_OhR.js +1 -0
- package/studio-dist/client/assets/warnings-CqOOGlPD.js +1 -0
- package/studio-dist/client/assets/workflow-BFzmI-06.js +1 -0
- package/studio-dist/server/assets/{__23tanstack-start-server-fn-resolver-DAbZ6fzY.js → __23tanstack-start-server-fn-resolver-gVfW5vIV.js} +30 -14
- package/studio-dist/server/assets/_tanstack-start-manifest_v.js +66 -50
- package/studio-dist/server/assets/{button-BfoNadNR.js → button-D6bvrFmm.js} +226 -3478
- package/studio-dist/server/assets/cn-FXJAM0KO.js +5528 -0
- package/studio-dist/server/assets/combobox-D2MbYV1O.js +484 -0
- package/studio-dist/server/assets/{companion-view-DHUjPpA0.js → companion-view-Mf1ANbMb.js} +2 -2
- package/studio-dist/server/assets/{companions-kBrJZAd6.js → companions-Dr6IpNAb.js} +1 -1
- package/studio-dist/server/assets/{fields-BD_c65T1.js → fields-B4mAPETz.js} +2 -1
- package/studio-dist/server/assets/friction-9a5S1m7U.js +943 -0
- package/studio-dist/server/assets/friction-CWOTjpCV.js +62 -0
- package/studio-dist/server/assets/{getting-started-7P0oyWaM.js → getting-started-RU6tYU2Q.js} +2 -2
- package/studio-dist/server/assets/{getting-started._topic-B1mV0kGz.js → getting-started._topic-C02HGrC6.js} +2 -2
- package/studio-dist/server/assets/{getting-started.index-CeGtvUsm.js → getting-started.index-EzLRosbb.js} +2 -2
- package/studio-dist/server/assets/{graph-BWtmJOH2.js → graph-B11ITte0.js} +1 -1
- package/studio-dist/server/assets/{graph-DSDVEELZ.js → graph-CZ2H9Fzr.js} +8 -8
- package/studio-dist/server/assets/{graph-canvas-CID9Nksc.js → graph-canvas-rP5TT14Z.js} +2 -2
- package/studio-dist/server/assets/{guides-Bm3RbUB-.js → guides-B8HdeK_C.js} +1 -1
- package/studio-dist/server/assets/{guides-BLJenHwQ.js → guides-BGftp4wf.js} +1 -1
- package/studio-dist/server/assets/{guides.server-rHHqRuzV.js → guides.server-DqFQAStf.js} +1 -1
- package/studio-dist/server/assets/{markdown-view-D3v9x-cM.js → markdown-view-CArpV-CS.js} +1 -1
- package/studio-dist/server/assets/{panel-yqOl5GMU.js → panel-DR0iq46J.js} +4 -3
- package/studio-dist/server/assets/{plugins._service._view-DwqJX7s9.js → plugins._service._view-n7u2k5dF.js} +11 -6
- package/studio-dist/server/assets/prepaint-B28ClcPN.js +45 -0
- package/studio-dist/server/assets/{queries-DYmGrhNO.js → queries-D-yVP9i0.js} +1 -1
- package/studio-dist/server/assets/react-CiBZPDs8.js +45 -0
- package/studio-dist/server/assets/{reports-C4Y_Jd-x.js → reports-B9k98oE6.js} +1 -1
- package/studio-dist/server/assets/{reports-7yaPz7aP.js → reports-C2SmTgqh.js} +7 -7
- package/studio-dist/server/assets/{router-Dnoq5auE.js → router-CPt0TAk_.js} +654 -1565
- package/studio-dist/server/assets/{routes-Cok4p3mK.js → routes-CwH8LEy2.js} +8 -8
- package/studio-dist/server/assets/{search-DUK7Jl6f.js → search-b-yQesv3.js} +25 -2
- package/studio-dist/server/assets/{combobox-oxUI6r4V.js → select-C3i6TTX-.js} +35 -514
- package/studio-dist/server/assets/{shell-DNVXedgE.js → shell-CagqZZMZ.js} +4 -3
- package/studio-dist/server/assets/{skills-D8qdXSku.js → skills-C21Mg_8-.js} +8 -8
- package/studio-dist/server/assets/{skills-pKmuAs0F.js → skills-DGg0mWDM.js} +1 -1
- package/studio-dist/server/assets/{specs-DeHYUNFp.js → specs-DetoMiaB.js} +4 -4
- package/studio-dist/server/assets/{specs-view-BGn-5Ik_.js → specs-view-CmbfLDwN.js} +10 -9
- package/studio-dist/server/assets/{steps-CV7Yk7L7.js → steps-D1tYAyWZ.js} +1 -1
- package/studio-dist/server/assets/store-aC-I6f6o.js +93 -0
- package/studio-dist/server/assets/{studio-CB94np48.js → studio-qRvQjRpz.js} +47 -2
- package/studio-dist/server/assets/{studio-queries-BqZGBE70.js → studio-queries-Dqf-3nzj.js} +66 -8
- package/studio-dist/server/assets/{usage-M6Gi6Km7.js → usage-CS4CBK9D.js} +13 -44
- package/studio-dist/server/assets/{usage-j5jR9gX9.js → usage-Cwle9-xY.js} +1 -1
- package/studio-dist/server/assets/useAnchoredPopupScrollLock-BjMNgXv9.js +756 -0
- package/studio-dist/server/assets/useMutation-DpBIuWXt.js +690 -0
- package/studio-dist/server/assets/{vault-lBlvSyD4.js → vault-CEBBRLMb.js} +1 -1
- package/studio-dist/server/assets/{vault-PqVmssmW.js → vault-DVQidlId.js} +6 -6
- package/studio-dist/server/assets/{views-CsFp1i1G.js → views-UgO0Qz_g.js} +2 -2
- package/studio-dist/server/assets/{warnings-BDs34j_m.js → warnings-C7hgXpdk.js} +2 -2
- package/studio-dist/server/assets/{workflow-T0eEldsa.js → workflow-6dZZ1ofw.js} +9 -9
- package/studio-dist/server/server.js +2 -2
- package/tool-manifest.yaml +85 -0
- package/studio-dist/client/assets/app-BFVyWHGo.css +0 -2
- package/studio-dist/client/assets/button-D6LrRkOG.js +0 -1
- package/studio-dist/client/assets/combobox-Dk2MMZWE.js +0 -1
- package/studio-dist/client/assets/fields-D_FYhxQr.js +0 -1
- package/studio-dist/client/assets/getting-started-ByWRg7hC.js +0 -1
- package/studio-dist/client/assets/getting-started-DZSjYC-b.js +0 -1
- package/studio-dist/client/assets/getting-started._topic-C6OyQ4G6.js +0 -1
- package/studio-dist/client/assets/getting-started.index-BkmPHdEm.js +0 -1
- package/studio-dist/client/assets/graph-7jm2XzyL.js +0 -2
- package/studio-dist/client/assets/guides-D9VTjWXP.js +0 -1
- package/studio-dist/client/assets/index-BBmFpG4y.js +0 -40
- package/studio-dist/client/assets/markdown-view-RL5YvfZg.js +0 -1
- package/studio-dist/client/assets/panel-B8F8sOKQ.js +0 -1
- package/studio-dist/client/assets/plugins._service._view-CynxTbMx.js +0 -1
- package/studio-dist/client/assets/react-r45OnJCw.js +0 -27
- package/studio-dist/client/assets/reports-BCAyXh6p.js +0 -1
- package/studio-dist/client/assets/routes-BFPqq89E.js +0 -1
- package/studio-dist/client/assets/skills-DTks_uBx.js +0 -1
- package/studio-dist/client/assets/specs-view-omrd_5P3.js +0 -1
- package/studio-dist/client/assets/store-DJ5cncKA.js +0 -1
- package/studio-dist/client/assets/useBaseQuery-BlC-AZ35.js +0 -1
- package/studio-dist/client/assets/vault-DRg8MScm.js +0 -1
- package/studio-dist/client/assets/warnings-UHFy6HAp.js +0 -1
- package/studio-dist/client/assets/workflow-Bv9vSfVV.js +0 -1
- package/studio-dist/server/assets/react-BO0uMhpm.js +0 -89
- package/studio-dist/server/assets/store-CWDGIp6x.js +0 -280
- package/studio-dist/server/assets/useBaseQuery-Tv_QJt9r.js +0 -2051
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
import { n as require_react, o as __toESM, t as require_jsx_runtime } from "./jsx-runtime-Bt0s0YKS.js";
|
|
2
|
+
import { t as cn } from "./cn-FXJAM0KO.js";
|
|
3
|
+
import { En as getTarget, Er as useRenderElement, Fn as cancelOpen, Kn as listNavigation, L as DROPDOWN_COLLISION_AVOIDANCE, M as FloatingPortal, Qt as stopEvent, S as useOpenChangeComplete, Tn as contains, Un as inputPress, Y as useTimeout, ar as formatErrorMessage, cn as popupStateMapping, er as createChangeEventDetails, ir as ownerDocument, nn as isInteractiveElement, or as useIsoLayoutEffect, qn as none, r as Icon, rr as useButton, sr as useStableCallback, vn as transitionStatusMapping, vr as isElement } from "./button-D6bvrFmm.js";
|
|
4
|
+
import { _ as inertValue, a as InternalBackdrop, c as useLabelableId, l as useLabelableContext, m as useFieldRootContext, o as useSetFieldFocused, v as FloatingFocusManager } from "./fields-B4mAPETz.js";
|
|
5
|
+
import { S as useClick, t as useAnchoredPopupScrollLock } from "./useAnchoredPopupScrollLock-BjMNgXv9.js";
|
|
6
|
+
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-C3i6TTX-.js";
|
|
7
|
+
import { $ as useComboboxInputValueContext, B as ComboboxItem$1, G as ComboboxPositionerContext, H as ComboboxList$1, J as usePopupSide, K as useComboboxPositionerContext, Q as useComboboxFloatingContext, U as ComboboxInput$1, V as useComboboxItemContext, W as ComboboxInternalDismissButton, X as AriaCombobox, Y as triggerStateAttributesMapping, Z as getComboboxPopupId, ct as useAnchorPositioning, et as useComboboxRootContext, ot as usePositioner, q as useListEmpty, st as getDisabledMountTransitionStyles, z as ComboboxEmpty$1 } from "./router-CPt0TAk_.js";
|
|
8
|
+
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/trigger/ComboboxTrigger.mjs
|
|
9
|
+
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
10
|
+
/**
|
|
11
|
+
* A button that opens the popup.
|
|
12
|
+
* Renders a `<button>` element.
|
|
13
|
+
*
|
|
14
|
+
* Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)
|
|
15
|
+
*/
|
|
16
|
+
var ComboboxTrigger = /*#__PURE__*/ import_react.forwardRef(function ComboboxTrigger(componentProps, forwardedRef) {
|
|
17
|
+
const { render, className, nativeButton = true, disabled: disabledProp = false, id: idProp, style, ...elementProps } = componentProps;
|
|
18
|
+
const { state: fieldState, disabled: fieldDisabled, setTouched, validationMode, validation } = useFieldRootContext();
|
|
19
|
+
const { labelId: fieldLabelId } = useLabelableContext();
|
|
20
|
+
const store = useComboboxRootContext();
|
|
21
|
+
const selectionMode = store.useState("selectionMode");
|
|
22
|
+
const comboboxDisabled = store.useState("disabled");
|
|
23
|
+
const readOnly = store.useState("readOnly");
|
|
24
|
+
const required = store.useState("required");
|
|
25
|
+
const positionerElement = store.useState("positionerElement");
|
|
26
|
+
const listElement = store.useState("listElement");
|
|
27
|
+
const storedPopupId = store.useState("popupId");
|
|
28
|
+
const triggerProps = store.useState("triggerProps");
|
|
29
|
+
const inputInsidePopup = store.useState("inputInsidePopup");
|
|
30
|
+
const rootId = store.useState("id");
|
|
31
|
+
const comboboxLabelId = store.useState("labelId");
|
|
32
|
+
const open = store.useState("open");
|
|
33
|
+
const selectedValue = store.useState("selectedValue");
|
|
34
|
+
const activeIndex = store.useState("activeIndex");
|
|
35
|
+
const selectedIndex = store.useState("selectedIndex");
|
|
36
|
+
const hasSelectedValue = store.useState("hasSelectedValue");
|
|
37
|
+
const floatingRootContext = useComboboxFloatingContext();
|
|
38
|
+
const inputValue = useComboboxInputValueContext();
|
|
39
|
+
const focusTimeout = useTimeout();
|
|
40
|
+
const disabled = fieldDisabled || comboboxDisabled || disabledProp;
|
|
41
|
+
const listEmpty = useListEmpty();
|
|
42
|
+
const popupSide = usePopupSide(store);
|
|
43
|
+
const triggerRef = import_react.useRef(null);
|
|
44
|
+
const setFocused = useSetFieldFocused(disabled, triggerRef);
|
|
45
|
+
useLabelableId({ id: inputInsidePopup ? idProp : void 0 });
|
|
46
|
+
const id = inputInsidePopup ? idProp ?? rootId : idProp;
|
|
47
|
+
const ariaLabelledBy = resolveAriaLabelledBy(fieldLabelId, comboboxLabelId);
|
|
48
|
+
let ariaControls;
|
|
49
|
+
if (open && inputInsidePopup) ariaControls = storedPopupId ?? getComboboxPopupId(rootId);
|
|
50
|
+
else if (open) ariaControls = listElement?.id;
|
|
51
|
+
const currentPointerTypeRef = import_react.useRef("");
|
|
52
|
+
function trackPointerType(event) {
|
|
53
|
+
currentPointerTypeRef.current = event.pointerType;
|
|
54
|
+
}
|
|
55
|
+
const { reference: triggerTypeaheadProps } = useTypeahead(floatingRootContext, {
|
|
56
|
+
enabled: !open && !readOnly && !comboboxDisabled && selectionMode === "single",
|
|
57
|
+
listRef: store.context.labelsRef,
|
|
58
|
+
activeIndex,
|
|
59
|
+
selectedIndex,
|
|
60
|
+
onMatch(index) {
|
|
61
|
+
const nextSelectedValue = store.context.valuesRef.current[index];
|
|
62
|
+
if (nextSelectedValue !== void 0) store.context.setSelectedValue(nextSelectedValue, createChangeEventDetails(none));
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
const { reference: triggerClickProps } = useClick(floatingRootContext, {
|
|
66
|
+
enabled: !comboboxDisabled,
|
|
67
|
+
event: "mousedown"
|
|
68
|
+
});
|
|
69
|
+
const { buttonRef, getButtonProps } = useButton({
|
|
70
|
+
native: nativeButton,
|
|
71
|
+
disabled
|
|
72
|
+
});
|
|
73
|
+
const state = {
|
|
74
|
+
...fieldState,
|
|
75
|
+
readOnly,
|
|
76
|
+
open,
|
|
77
|
+
disabled,
|
|
78
|
+
popupSide,
|
|
79
|
+
listEmpty,
|
|
80
|
+
placeholder: selectionMode === "none" ? false : !hasSelectedValue
|
|
81
|
+
};
|
|
82
|
+
const setTriggerElement = useStableCallback((element) => {
|
|
83
|
+
store.set("triggerElement", element);
|
|
84
|
+
});
|
|
85
|
+
return useRenderElement("button", componentProps, {
|
|
86
|
+
ref: [
|
|
87
|
+
forwardedRef,
|
|
88
|
+
buttonRef,
|
|
89
|
+
triggerRef,
|
|
90
|
+
setTriggerElement
|
|
91
|
+
],
|
|
92
|
+
state,
|
|
93
|
+
props: [
|
|
94
|
+
triggerProps,
|
|
95
|
+
triggerClickProps,
|
|
96
|
+
triggerTypeaheadProps,
|
|
97
|
+
{
|
|
98
|
+
id,
|
|
99
|
+
tabIndex: inputInsidePopup ? 0 : -1,
|
|
100
|
+
role: inputInsidePopup ? "combobox" : void 0,
|
|
101
|
+
"aria-expanded": open,
|
|
102
|
+
"aria-haspopup": inputInsidePopup ? "dialog" : "listbox",
|
|
103
|
+
"aria-controls": ariaControls,
|
|
104
|
+
"aria-required": inputInsidePopup ? required || void 0 : void 0,
|
|
105
|
+
"aria-readonly": inputInsidePopup ? readOnly || void 0 : void 0,
|
|
106
|
+
"aria-labelledby": ariaLabelledBy,
|
|
107
|
+
onPointerDown: trackPointerType,
|
|
108
|
+
onPointerEnter: trackPointerType,
|
|
109
|
+
onFocus() {
|
|
110
|
+
setFocused(true);
|
|
111
|
+
if (disabled) return;
|
|
112
|
+
focusTimeout.start(0, store.context.forceMount);
|
|
113
|
+
},
|
|
114
|
+
onBlur(event) {
|
|
115
|
+
if (contains(positionerElement, event.relatedTarget)) return;
|
|
116
|
+
setTouched(true);
|
|
117
|
+
setFocused(false);
|
|
118
|
+
if (validationMode === "onBlur") {
|
|
119
|
+
const valueToValidate = selectionMode === "none" ? inputValue : selectedValue;
|
|
120
|
+
validation.commit(valueToValidate);
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
onMouseDown(event) {
|
|
124
|
+
if (disabled) return;
|
|
125
|
+
if (!inputInsidePopup) floatingRootContext.set("domReferenceElement", event.currentTarget);
|
|
126
|
+
store.context.forceMount();
|
|
127
|
+
if (currentPointerTypeRef.current !== "touch") {
|
|
128
|
+
store.context.inputRef.current?.focus();
|
|
129
|
+
if (!inputInsidePopup) event.preventDefault();
|
|
130
|
+
}
|
|
131
|
+
if (open) return;
|
|
132
|
+
const doc = ownerDocument(event.currentTarget);
|
|
133
|
+
function handleMouseUp(mouseEvent) {
|
|
134
|
+
const currentTriggerElement = store.state.triggerElement;
|
|
135
|
+
if (!currentTriggerElement) return;
|
|
136
|
+
const mouseUpTarget = getTarget(mouseEvent);
|
|
137
|
+
const positioner = store.state.positionerElement;
|
|
138
|
+
const list = store.state.listElement;
|
|
139
|
+
if (contains(currentTriggerElement, mouseUpTarget) || contains(positioner, mouseUpTarget) || contains(list, mouseUpTarget)) return;
|
|
140
|
+
if (isMouseWithinBounds(mouseEvent, currentTriggerElement)) return;
|
|
141
|
+
store.context.setOpen(false, createChangeEventDetails(cancelOpen, mouseEvent));
|
|
142
|
+
}
|
|
143
|
+
if (inputInsidePopup) doc.addEventListener("mouseup", handleMouseUp, { once: true });
|
|
144
|
+
},
|
|
145
|
+
onKeyDown(event) {
|
|
146
|
+
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
147
|
+
stopEvent(event);
|
|
148
|
+
store.context.setOpen(true, createChangeEventDetails(listNavigation, event.nativeEvent));
|
|
149
|
+
store.context.inputRef.current?.focus();
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
validation.getValidationProps(disabled, elementProps),
|
|
154
|
+
getButtonProps
|
|
155
|
+
],
|
|
156
|
+
stateAttributesMapping: triggerStateAttributesMapping
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/utils/handleInputPress.mjs
|
|
160
|
+
function handleInputPress(event, store, disabled, shouldIgnoreTarget) {
|
|
161
|
+
if (event.baseUIHandlerPrevented) return;
|
|
162
|
+
const target = getTarget(event.nativeEvent);
|
|
163
|
+
const targetElement = isElement(target) ? target : null;
|
|
164
|
+
if (targetElement !== event.currentTarget && (shouldIgnoreTarget?.(targetElement) || isInteractiveElement(targetElement))) return;
|
|
165
|
+
event.preventDefault();
|
|
166
|
+
if (disabled) return;
|
|
167
|
+
store.context.inputRef.current?.focus();
|
|
168
|
+
if (store.state.openOnInputClick) store.context.setOpen(true, createChangeEventDetails(inputPress, event.nativeEvent));
|
|
169
|
+
}
|
|
170
|
+
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/input-group/ComboboxInputGroup.mjs
|
|
171
|
+
/**
|
|
172
|
+
* A wrapper for the input and its associated controls.
|
|
173
|
+
* Renders a `<div>` element.
|
|
174
|
+
*
|
|
175
|
+
* Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)
|
|
176
|
+
*/
|
|
177
|
+
var ComboboxInputGroup = /*#__PURE__*/ import_react.forwardRef(function ComboboxInputGroup(componentProps, forwardedRef) {
|
|
178
|
+
const { render, className, style, ...elementProps } = componentProps;
|
|
179
|
+
const { state: fieldState } = useFieldRootContext();
|
|
180
|
+
const store = useComboboxRootContext();
|
|
181
|
+
const open = store.useState("open");
|
|
182
|
+
const comboboxDisabled = store.useState("disabled");
|
|
183
|
+
const readOnly = store.useState("readOnly");
|
|
184
|
+
const hasSelectedValue = store.useState("hasSelectedValue");
|
|
185
|
+
const selectionMode = store.useState("selectionMode");
|
|
186
|
+
const popupSide = usePopupSide(store);
|
|
187
|
+
const disabled = comboboxDisabled;
|
|
188
|
+
const listEmpty = useListEmpty();
|
|
189
|
+
const placeholder = selectionMode === "none" ? false : !hasSelectedValue;
|
|
190
|
+
const state = {
|
|
191
|
+
...fieldState,
|
|
192
|
+
open,
|
|
193
|
+
disabled,
|
|
194
|
+
readOnly,
|
|
195
|
+
popupSide,
|
|
196
|
+
listEmpty,
|
|
197
|
+
placeholder
|
|
198
|
+
};
|
|
199
|
+
const setInputGroupElement = useStableCallback((element) => {
|
|
200
|
+
store.set("inputGroupElement", element);
|
|
201
|
+
});
|
|
202
|
+
return useRenderElement("div", componentProps, {
|
|
203
|
+
ref: [forwardedRef, setInputGroupElement],
|
|
204
|
+
props: [{
|
|
205
|
+
role: "group",
|
|
206
|
+
onMouseDown(event) {
|
|
207
|
+
handleInputPress(event, store, disabled, (target) => {
|
|
208
|
+
return contains(store.context.chipsContainerRef.current, target);
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
}, elementProps],
|
|
212
|
+
state,
|
|
213
|
+
stateAttributesMapping: triggerStateAttributesMapping
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/portal/ComboboxPortalContext.mjs
|
|
217
|
+
var ComboboxPortalContext = /*#__PURE__*/ import_react.createContext(void 0);
|
|
218
|
+
function useComboboxPortalContext() {
|
|
219
|
+
const context = import_react.useContext(ComboboxPortalContext);
|
|
220
|
+
if (context === void 0) throw new Error(formatErrorMessage(20));
|
|
221
|
+
return context;
|
|
222
|
+
}
|
|
223
|
+
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/portal/ComboboxPortal.mjs
|
|
224
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
225
|
+
var ComboboxPortal = /*#__PURE__*/ import_react.forwardRef(function ComboboxPortal(props, forwardedRef) {
|
|
226
|
+
const { keepMounted = false, ...portalProps } = props;
|
|
227
|
+
const store = useComboboxRootContext();
|
|
228
|
+
const mounted = store.useState("mounted");
|
|
229
|
+
const forceMounted = store.useState("forceMounted");
|
|
230
|
+
if (!(mounted || keepMounted || forceMounted)) return null;
|
|
231
|
+
return /*#__PURE__*/ (0, import_jsx_runtime.jsx)(ComboboxPortalContext.Provider, {
|
|
232
|
+
value: keepMounted,
|
|
233
|
+
children: /*#__PURE__*/ (0, import_jsx_runtime.jsx)(FloatingPortal, {
|
|
234
|
+
ref: forwardedRef,
|
|
235
|
+
...portalProps
|
|
236
|
+
})
|
|
237
|
+
});
|
|
238
|
+
});
|
|
239
|
+
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/positioner/ComboboxPositioner.mjs
|
|
240
|
+
/**
|
|
241
|
+
* Positions the popup against the trigger.
|
|
242
|
+
* Renders a `<div>` element.
|
|
243
|
+
*
|
|
244
|
+
* Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)
|
|
245
|
+
*/
|
|
246
|
+
var ComboboxPositioner = /*#__PURE__*/ import_react.forwardRef(function ComboboxPositioner(componentProps, forwardedRef) {
|
|
247
|
+
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;
|
|
248
|
+
const store = useComboboxRootContext();
|
|
249
|
+
const floatingRootContext = useComboboxFloatingContext();
|
|
250
|
+
const keepMounted = useComboboxPortalContext();
|
|
251
|
+
const modal = store.useState("modal");
|
|
252
|
+
const open = store.useState("open");
|
|
253
|
+
const mounted = store.useState("mounted");
|
|
254
|
+
const openMethod = store.useState("openMethod");
|
|
255
|
+
const positionerElement = store.useState("positionerElement");
|
|
256
|
+
const triggerElement = store.useState("triggerElement");
|
|
257
|
+
const inputElement = store.useState("inputElement");
|
|
258
|
+
const inputGroupElement = store.useState("inputGroupElement");
|
|
259
|
+
const inputInsidePopup = store.useState("inputInsidePopup");
|
|
260
|
+
const transitionStatus = store.useState("transitionStatus");
|
|
261
|
+
const empty = useListEmpty();
|
|
262
|
+
const positioning = useAnchorPositioning({
|
|
263
|
+
anchor: anchor ?? (inputInsidePopup ? triggerElement : inputGroupElement ?? inputElement),
|
|
264
|
+
floatingRootContext,
|
|
265
|
+
positionMethod,
|
|
266
|
+
mounted,
|
|
267
|
+
side,
|
|
268
|
+
sideOffset,
|
|
269
|
+
align,
|
|
270
|
+
alignOffset,
|
|
271
|
+
arrowPadding,
|
|
272
|
+
collisionBoundary,
|
|
273
|
+
collisionPadding,
|
|
274
|
+
sticky,
|
|
275
|
+
disableAnchorTracking,
|
|
276
|
+
keepMounted,
|
|
277
|
+
collisionAvoidance,
|
|
278
|
+
lazyFlip: true
|
|
279
|
+
});
|
|
280
|
+
useAnchoredPopupScrollLock(open && modal, openMethod === "touch", positionerElement, triggerElement);
|
|
281
|
+
const state = {
|
|
282
|
+
open,
|
|
283
|
+
side: positioning.side,
|
|
284
|
+
align: positioning.align,
|
|
285
|
+
anchorHidden: positioning.anchorHidden,
|
|
286
|
+
empty
|
|
287
|
+
};
|
|
288
|
+
useIsoLayoutEffect(() => {
|
|
289
|
+
store.set("popupSide", positioning.side);
|
|
290
|
+
}, [store, positioning.side]);
|
|
291
|
+
const setPositionerElement = useStableCallback((element) => {
|
|
292
|
+
store.set("positionerElement", element);
|
|
293
|
+
});
|
|
294
|
+
const element = usePositioner(componentProps, state, {
|
|
295
|
+
styles: positioning.positionerStyles,
|
|
296
|
+
transitionStatus,
|
|
297
|
+
props: elementProps,
|
|
298
|
+
refs: [forwardedRef, setPositionerElement],
|
|
299
|
+
hidden: !mounted,
|
|
300
|
+
inert: !open
|
|
301
|
+
});
|
|
302
|
+
return /*#__PURE__*/ (0, import_jsx_runtime.jsxs)(ComboboxPositionerContext.Provider, {
|
|
303
|
+
value: positioning,
|
|
304
|
+
children: [mounted && modal && /*#__PURE__*/ (0, import_jsx_runtime.jsx)(InternalBackdrop, {
|
|
305
|
+
inert: inertValue(!open),
|
|
306
|
+
cutout: inputGroupElement ?? inputElement ?? triggerElement
|
|
307
|
+
}), element]
|
|
308
|
+
});
|
|
309
|
+
});
|
|
310
|
+
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/popup/ComboboxPopup.mjs
|
|
311
|
+
var stateAttributesMapping = {
|
|
312
|
+
...popupStateMapping,
|
|
313
|
+
...transitionStatusMapping
|
|
314
|
+
};
|
|
315
|
+
/**
|
|
316
|
+
* A container for the list.
|
|
317
|
+
* Renders a `<div>` element.
|
|
318
|
+
*
|
|
319
|
+
* Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)
|
|
320
|
+
*/
|
|
321
|
+
var ComboboxPopup = /*#__PURE__*/ import_react.forwardRef(function ComboboxPopup(componentProps, forwardedRef) {
|
|
322
|
+
const { render, className, style, initialFocus, finalFocus, ...elementProps } = componentProps;
|
|
323
|
+
const store = useComboboxRootContext();
|
|
324
|
+
const positioning = useComboboxPositionerContext();
|
|
325
|
+
const floatingRootContext = useComboboxFloatingContext();
|
|
326
|
+
const mounted = store.useState("mounted");
|
|
327
|
+
const open = store.useState("open");
|
|
328
|
+
const openMethod = store.useState("openMethod");
|
|
329
|
+
const popupProps = store.useState("popupProps");
|
|
330
|
+
const transitionStatus = store.useState("transitionStatus");
|
|
331
|
+
const inputInsidePopup = store.useState("inputInsidePopup");
|
|
332
|
+
const inputElement = store.useState("inputElement");
|
|
333
|
+
const modal = store.useState("modal");
|
|
334
|
+
const rootId = store.useState("id");
|
|
335
|
+
const empty = useListEmpty();
|
|
336
|
+
const popupId = elementProps.id ?? (inputInsidePopup ? getComboboxPopupId(rootId) : void 0);
|
|
337
|
+
useIsoLayoutEffect(() => {
|
|
338
|
+
store.set("popupId", store.context.popupRef.current?.id || popupId);
|
|
339
|
+
return () => {
|
|
340
|
+
store.set("popupId", void 0);
|
|
341
|
+
};
|
|
342
|
+
}, [store, popupId]);
|
|
343
|
+
useOpenChangeComplete({
|
|
344
|
+
open,
|
|
345
|
+
ref: store.context.popupRef,
|
|
346
|
+
onComplete() {
|
|
347
|
+
if (open) store.context.onOpenChangeComplete(true);
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
const state = {
|
|
351
|
+
open,
|
|
352
|
+
side: positioning.side,
|
|
353
|
+
align: positioning.align,
|
|
354
|
+
anchorHidden: positioning.anchorHidden,
|
|
355
|
+
transitionStatus,
|
|
356
|
+
empty
|
|
357
|
+
};
|
|
358
|
+
const element = useRenderElement("div", componentProps, {
|
|
359
|
+
state,
|
|
360
|
+
ref: [forwardedRef, store.context.popupRef],
|
|
361
|
+
props: [
|
|
362
|
+
popupProps,
|
|
363
|
+
{
|
|
364
|
+
id: popupId,
|
|
365
|
+
role: inputInsidePopup ? "dialog" : "presentation",
|
|
366
|
+
onFocus(event) {
|
|
367
|
+
const target = getTarget(event.nativeEvent);
|
|
368
|
+
if (openMethod !== "touch" && (contains(store.state.listElement, target) || target === event.currentTarget)) store.context.inputRef.current?.focus();
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
getDisabledMountTransitionStyles(transitionStatus),
|
|
372
|
+
elementProps
|
|
373
|
+
],
|
|
374
|
+
stateAttributesMapping
|
|
375
|
+
});
|
|
376
|
+
const resolvedInitialFocus = initialFocus === void 0 ? inputInsidePopup ? (interactionType) => interactionType === "touch" ? store.context.popupRef.current : inputElement : false : initialFocus;
|
|
377
|
+
let resolvedFinalFocus;
|
|
378
|
+
if (finalFocus != null) resolvedFinalFocus = finalFocus;
|
|
379
|
+
else resolvedFinalFocus = inputInsidePopup ? void 0 : false;
|
|
380
|
+
const focusManagerModal = !inputInsidePopup || modal;
|
|
381
|
+
return /*#__PURE__*/ (0, import_jsx_runtime.jsx)(FloatingFocusManager, {
|
|
382
|
+
context: floatingRootContext,
|
|
383
|
+
disabled: !mounted,
|
|
384
|
+
modal: focusManagerModal,
|
|
385
|
+
openInteractionType: openMethod,
|
|
386
|
+
initialFocus: resolvedInitialFocus,
|
|
387
|
+
returnFocus: resolvedFinalFocus,
|
|
388
|
+
getInsideElements: () => [store.context.startDismissRef.current, store.context.endDismissRef.current],
|
|
389
|
+
children: /*#__PURE__*/ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [element, focusManagerModal && /*#__PURE__*/ (0, import_jsx_runtime.jsx)(ComboboxInternalDismissButton, { ref: store.context.endDismissRef })] })
|
|
390
|
+
});
|
|
391
|
+
});
|
|
392
|
+
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/root/ComboboxRoot.mjs
|
|
393
|
+
/**
|
|
394
|
+
* Groups all parts of the combobox.
|
|
395
|
+
* Doesn't render its own HTML element.
|
|
396
|
+
*
|
|
397
|
+
* Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)
|
|
398
|
+
*/
|
|
399
|
+
function ComboboxRoot(props) {
|
|
400
|
+
const { multiple = false, defaultValue, value, onValueChange, autoComplete, ...other } = props;
|
|
401
|
+
return /*#__PURE__*/ (0, import_jsx_runtime.jsx)(AriaCombobox, {
|
|
402
|
+
...other,
|
|
403
|
+
selectionMode: multiple ? "multiple" : "single",
|
|
404
|
+
selectedValue: value,
|
|
405
|
+
defaultSelectedValue: defaultValue,
|
|
406
|
+
onSelectedValueChange: onValueChange,
|
|
407
|
+
formAutoComplete: autoComplete
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/item-indicator/ComboboxItemIndicator.mjs
|
|
411
|
+
/**
|
|
412
|
+
* Indicates whether the item is selected.
|
|
413
|
+
* Renders a `<span>` element.
|
|
414
|
+
*
|
|
415
|
+
* Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)
|
|
416
|
+
*/
|
|
417
|
+
var ComboboxItemIndicator = /*#__PURE__*/ import_react.forwardRef(function ComboboxItemIndicator(componentProps, forwardedRef) {
|
|
418
|
+
const { selected } = useComboboxItemContext();
|
|
419
|
+
if (!(componentProps.keepMounted || selected)) return null;
|
|
420
|
+
return /*#__PURE__*/ (0, import_jsx_runtime.jsx)(ItemIndicator, {
|
|
421
|
+
...componentProps,
|
|
422
|
+
selected,
|
|
423
|
+
ref: forwardedRef
|
|
424
|
+
});
|
|
425
|
+
});
|
|
426
|
+
// src/components/ui/combobox.tsx
|
|
427
|
+
var Combobox = ComboboxRoot;
|
|
428
|
+
/** A typing field framed like the Select trigger, with the same inset chevron. */
|
|
429
|
+
function ComboboxInput({ className, ...props }) {
|
|
430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ComboboxInputGroup, {
|
|
431
|
+
"data-slot": "combobox-input-group",
|
|
432
|
+
className: cn("relative flex items-center", className),
|
|
433
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxInput$1, {
|
|
434
|
+
"data-slot": "combobox-input",
|
|
435
|
+
className: cn(TRIGGER, "placeholder:text-muted focus:border-accent"),
|
|
436
|
+
...props
|
|
437
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxTrigger, {
|
|
438
|
+
"data-slot": "combobox-trigger",
|
|
439
|
+
"aria-label": "Show options",
|
|
440
|
+
className: "absolute inset-y-0 right-0 flex w-9 items-center justify-center outline-none",
|
|
441
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
|
|
442
|
+
name: "chevron",
|
|
443
|
+
className: CHEVRON
|
|
444
|
+
})
|
|
445
|
+
})]
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
function ComboboxContent({ className, ...props }) {
|
|
449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxPositioner, {
|
|
450
|
+
sideOffset: 6,
|
|
451
|
+
className: "z-40",
|
|
452
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxPopup, {
|
|
453
|
+
"data-slot": "combobox-content",
|
|
454
|
+
className: cn(POPUP, className),
|
|
455
|
+
...props
|
|
456
|
+
})
|
|
457
|
+
}) });
|
|
458
|
+
}
|
|
459
|
+
var ComboboxList = ComboboxList$1;
|
|
460
|
+
function ComboboxEmpty({ className, ...props }) {
|
|
461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxEmpty$1, {
|
|
462
|
+
"data-slot": "combobox-empty",
|
|
463
|
+
className: cn("px-2.5 py-1.5 text-sm text-muted empty:hidden", className),
|
|
464
|
+
...props
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
function ComboboxItem({ className, children, ...props }) {
|
|
468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ComboboxItem$1, {
|
|
469
|
+
"data-slot": "combobox-item",
|
|
470
|
+
className: cn(ITEM, className),
|
|
471
|
+
...props,
|
|
472
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
473
|
+
className: "truncate",
|
|
474
|
+
children
|
|
475
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxItemIndicator, {
|
|
476
|
+
className: ITEM_CHECK,
|
|
477
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
|
|
478
|
+
name: "check",
|
|
479
|
+
className: "size-4"
|
|
480
|
+
})
|
|
481
|
+
})]
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
export { ComboboxItem as a, ComboboxInput as i, ComboboxContent as n, ComboboxList as o, ComboboxEmpty as r, Combobox as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as companionViewQuery } from "./studio-queries-
|
|
1
|
+
import { ut as useSuspenseQuery } from "./router-CPt0TAk_.js";
|
|
2
|
+
import { a as companionViewQuery } from "./studio-queries-Dqf-3nzj.js";
|
|
3
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();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as createServerRpc } from "./createServerRpc-bFKFpGFG.js";
|
|
2
2
|
import { n as createServerFn } from "../server.js";
|
|
3
|
-
import {
|
|
3
|
+
import { S as COMPANION_DIGEST_PATTERN } from "./studio-qRvQjRpz.js";
|
|
4
4
|
// src/server/companions.ts?tss-serverfn-split
|
|
5
5
|
/** Deletes a registered companion's folder and unregisters it; core refuses unless writable. */
|
|
6
6
|
var deleteCompanion_createServerFn_handler = createServerRpc({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { n as require_react, o as __toESM, t as require_jsx_runtime } from "./jsx-runtime-Bt0s0YKS.js";
|
|
2
|
-
import {
|
|
2
|
+
import { t as cn } from "./cn-FXJAM0KO.js";
|
|
3
|
+
import { $t as getNodeAncestors, Ar as NOOP, B as FocusGuard, Cn as activeElement, Dt as isElementVisible, E as resolveRef, En as getTarget, Er as useRenderElement, G as useValueAsRef, J as Timeout, K as mergeCleanups, Mr as useMergedRefs, Nr as useRefWithInit, P as usePortalContext, Pr as useBaseUiId, Qt as stopEvent, Sr as isShadowRoot, St as tabbable, Tn as contains, U as AnimationFrame, W as useAnimationFrame, Xt as isVirtualClick, Y as useTimeout, Zt as isVirtualPointerEvent, _t as getNextTabbable, an as isTypeableElement, ar as formatErrorMessage, bt as isOutsideEvent, en as getNodeChildren, er as createChangeEventDetails, fr as getNodeName, gr as getWindow, gt as focusable, in as isTypeableCombobox, ir as ownerDocument, j as useFloatingTree, jn as ios, jr as isReactVersionAtLeast, kn as webkit, kr as EMPTY_OBJECT, or as useIsoLayoutEffect, q as addEventListener, qn as none, sr as useStableCallback, tn as getFloatingFocusElement, vt as getPreviousTabbable, wn as closest, xr as isOverflowElement, xt as isTabbable, yr as isHTMLElement, z as createAttribute, zn as focusOut } from "./button-D6bvrFmm.js";
|
|
3
4
|
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/floating-ui-react/utils/enqueueFocus.mjs
|
|
4
5
|
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
5
6
|
var rafId = 0;
|