@uniqbit/mate-core 1.0.0-canary.6 → 1.0.0-canary.7

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.
Files changed (168) hide show
  1. package/claude-capability-plugins/companion-mentions/.claude-plugin/plugin.json +1 -1
  2. package/package.json +1 -1
  3. package/src/cli/commands/doctor.ts +51 -0
  4. package/src/cli/commands/friction.ts +558 -0
  5. package/src/cli/commands/studio/connection.ts +53 -0
  6. package/src/cli/commands/studio/routes.ts +3 -0
  7. package/src/cli/commands/studio/selection.ts +10 -1
  8. package/src/cli/commands/studio/server.ts +31 -0
  9. package/src/cli/commands/studio/services.ts +25 -0
  10. package/src/cli/commands/triage.ts +151 -0
  11. package/src/cli/commands/vscode/release-vsix.json +2 -2
  12. package/src/cli/main.ts +35 -13
  13. package/src/cli/plugin-commands.ts +6 -1
  14. package/src/cli/usage.ts +10 -0
  15. package/src/create-mate.ts +11 -5
  16. package/src/distribution.ts +2 -0
  17. package/src/hooks/validate-artifact-path.ts +64 -14
  18. package/src/lib/friction/describe.ts +42 -0
  19. package/src/lib/friction/fields.ts +60 -0
  20. package/src/lib/friction/mark.ts +156 -0
  21. package/src/lib/friction/view/model.ts +67 -0
  22. package/src/lib/friction/view/read.ts +136 -0
  23. package/src/lib/friction/view/select.ts +54 -0
  24. package/src/lib/orchestrator/adapters/claude.ts +5 -4
  25. package/src/lib/orchestrator/adapters/opencode.ts +2 -0
  26. package/src/lib/orchestrator/root-context.ts +23 -6
  27. package/src/lib/package-paths.ts +23 -15
  28. package/src/lib/session-attribution.ts +3 -7
  29. package/src/lib/triage/context.ts +186 -0
  30. package/src/lib/triage/launch.ts +52 -0
  31. package/src/lib/triage/prepare.ts +97 -0
  32. package/src/lib/triage/session.ts +126 -0
  33. package/src/opencode/companion-hooks.ts +53 -5
  34. package/src/opencode/projected-guidance.ts +2 -0
  35. package/src/playbooks/companion-guidance.ts +2 -2
  36. package/src/plugin-api.ts +5 -0
  37. package/src/runtime/command-friction.ts +97 -0
  38. package/src/runtime/companion-guidance.ts +32 -15
  39. package/src/runtime/friction-fingerprint.ts +35 -0
  40. package/src/runtime/friction-log.ts +352 -0
  41. package/src/runtime/friction-recorder.ts +199 -0
  42. package/src/runtime/friction-retention.ts +1 -0
  43. package/src/runtime/friction-state.ts +110 -0
  44. package/src/runtime/friction-switch.ts +26 -0
  45. package/src/runtime/friction-vocabulary.ts +42 -0
  46. package/src/runtime/projected-guidance.ts +2 -1
  47. package/src/runtime/secret-values.ts +16 -0
  48. package/src/runtime/session-id.ts +24 -0
  49. package/src/runtime/session-prepare-runner.ts +3 -0
  50. package/src/runtime/workflow/next-handoff-process.ts +2 -1
  51. package/src/studio.ts +41 -0
  52. package/src/templates/triage/PLAYBOOK.md +112 -0
  53. package/src/tools/setup/capabilities/rtk.ts +19 -8
  54. package/src/tools/setup/plugin.ts +5 -0
  55. package/src/tools/setup/service.ts +4 -0
  56. package/src/tools/setup.ts +16 -2
  57. package/studio-dist/client/assets/app-aIwDxf48.css +2 -0
  58. package/studio-dist/client/assets/button-CX0sWAJl.js +1 -0
  59. package/studio-dist/client/assets/combobox-BmA8RjOc.js +1 -0
  60. package/studio-dist/client/assets/{companion-view-BVaZNtiI.js → companion-view-DINdPF-b.js} +1 -1
  61. package/studio-dist/client/assets/fields-BobQ7zRF.js +1 -0
  62. package/studio-dist/client/assets/friction-YdYd3zaz.js +1 -0
  63. package/studio-dist/client/assets/getting-started-CY7NEtTw.js +1 -0
  64. package/studio-dist/client/assets/getting-started-djaQeWlu.js +1 -0
  65. package/studio-dist/client/assets/getting-started._topic-DVB8e5R9.js +1 -0
  66. package/studio-dist/client/assets/getting-started.index-DQvLHEr1.js +1 -0
  67. package/studio-dist/client/assets/graph-DbNnR884.js +2 -0
  68. package/studio-dist/client/assets/{graph-canvas-DDuzsNSx.js → graph-canvas-DIcAqwtK.js} +1 -1
  69. package/studio-dist/client/assets/guides-D6T6W_jV.js +1 -0
  70. package/studio-dist/client/assets/index-CysBCSxM.js +40 -0
  71. package/studio-dist/client/assets/markdown-view-jMiaBTSO.js +1 -0
  72. package/studio-dist/client/assets/{panel-B8F8sOKQ.js → panel-Csr49lBo.js} +1 -1
  73. package/studio-dist/client/assets/plugins._service._view-CEA_CcPe.js +1 -0
  74. package/studio-dist/client/assets/prepaint-CKsXyJOR.js +27 -0
  75. package/studio-dist/client/assets/{queries-axYk2u9L.js → queries-Dfp5deWj.js} +1 -1
  76. package/studio-dist/client/assets/react-BYUSgtBs.js +1 -0
  77. package/studio-dist/client/assets/reports-CLdgxxkg.js +1 -0
  78. package/studio-dist/client/assets/routes-DGilWbDE.js +1 -0
  79. package/studio-dist/client/assets/search-CXosfvYh.js +1 -0
  80. package/studio-dist/client/assets/select-DdebbX7K.js +1 -0
  81. package/studio-dist/client/assets/skills-C3zNkU8g.js +1 -0
  82. package/studio-dist/client/assets/{specs-DU1kqcp5.js → specs-Dl8HfGlU.js} +1 -1
  83. package/studio-dist/client/assets/specs-view-B_n0Pekv.js +1 -0
  84. package/studio-dist/client/assets/{steps-DhIFuAZy.js → steps-CKUno4lh.js} +1 -1
  85. package/studio-dist/client/assets/store-DyXbi6o9.js +1 -0
  86. package/studio-dist/client/assets/{studio-BR9j15J0.js → studio-0ueISxwP.js} +8 -8
  87. package/studio-dist/client/assets/{studio-queries-CFP_yTpr.js → studio-queries-BflKt9va.js} +2 -2
  88. package/studio-dist/client/assets/{usage-CHmwtkoM.js → usage-Blcl8kA_.js} +16 -16
  89. package/studio-dist/client/assets/useAnchoredPopupScrollLock-BBXJpX5L.js +1 -0
  90. package/studio-dist/client/assets/{useBaseQuery-BlC-AZ35.js → useBaseQuery-C2cjmeH2.js} +1 -1
  91. package/studio-dist/client/assets/useMutation-DI6LbvVa.js +1 -0
  92. package/studio-dist/client/assets/vault-Cb9DmM1i.js +1 -0
  93. package/studio-dist/client/assets/warnings-B-rvoW8q.js +1 -0
  94. package/studio-dist/client/assets/workflow-DN5T19jd.js +1 -0
  95. package/studio-dist/server/assets/{__23tanstack-start-server-fn-resolver-DAbZ6fzY.js → __23tanstack-start-server-fn-resolver-JoHQ5ihx.js} +30 -14
  96. package/studio-dist/server/assets/_tanstack-start-manifest_v.js +66 -50
  97. package/studio-dist/server/assets/{button-BfoNadNR.js → button-B7e1fRyW.js} +228 -3
  98. package/studio-dist/server/assets/combobox--S_OmUfh.js +483 -0
  99. package/studio-dist/server/assets/{companion-view-DHUjPpA0.js → companion-view-D-vGM55e.js} +2 -2
  100. package/studio-dist/server/assets/{companions-kBrJZAd6.js → companions-Dr6IpNAb.js} +1 -1
  101. package/studio-dist/server/assets/{fields-BD_c65T1.js → fields-B4qM2ZwC.js} +1 -1
  102. package/studio-dist/server/assets/friction-CWOTjpCV.js +62 -0
  103. package/studio-dist/server/assets/friction-sLxaWY-H.js +903 -0
  104. package/studio-dist/server/assets/{getting-started-7P0oyWaM.js → getting-started-Cq5Pcnsr.js} +2 -2
  105. package/studio-dist/server/assets/{getting-started._topic-B1mV0kGz.js → getting-started._topic-CmWdl3u3.js} +2 -2
  106. package/studio-dist/server/assets/{getting-started.index-CeGtvUsm.js → getting-started.index-AB8xpTFY.js} +2 -2
  107. package/studio-dist/server/assets/{graph-BWtmJOH2.js → graph-B11ITte0.js} +1 -1
  108. package/studio-dist/server/assets/{graph-DSDVEELZ.js → graph-C_Hn-Wf_.js} +7 -8
  109. package/studio-dist/server/assets/{graph-canvas-CID9Nksc.js → graph-canvas-BthrSmPS.js} +2 -2
  110. package/studio-dist/server/assets/{guides-Bm3RbUB-.js → guides-B8HdeK_C.js} +1 -1
  111. package/studio-dist/server/assets/{guides-BLJenHwQ.js → guides-BVQ4pt5B.js} +1 -1
  112. package/studio-dist/server/assets/{guides.server-rHHqRuzV.js → guides.server-DqFQAStf.js} +1 -1
  113. package/studio-dist/server/assets/{markdown-view-D3v9x-cM.js → markdown-view-rwiiVcPC.js} +1 -1
  114. package/studio-dist/server/assets/{panel-yqOl5GMU.js → panel-CUxRIpYL.js} +3 -3
  115. package/studio-dist/server/assets/{plugins._service._view-DwqJX7s9.js → plugins._service._view-BSvGnlhU.js} +6 -4
  116. package/studio-dist/server/assets/prepaint-B28ClcPN.js +45 -0
  117. package/studio-dist/server/assets/{queries-DYmGrhNO.js → queries-S_Pl90IG.js} +1 -1
  118. package/studio-dist/server/assets/react-CiBZPDs8.js +45 -0
  119. package/studio-dist/server/assets/{reports-C4Y_Jd-x.js → reports-B9k98oE6.js} +1 -1
  120. package/studio-dist/server/assets/{reports-7yaPz7aP.js → reports-CJpAItPk.js} +6 -7
  121. package/studio-dist/server/assets/{router-Dnoq5auE.js → router-DF0etoNa.js} +627 -1563
  122. package/studio-dist/server/assets/{routes-Cok4p3mK.js → routes-6ylCLkyg.js} +7 -8
  123. package/studio-dist/server/assets/{search-DUK7Jl6f.js → search-b-yQesv3.js} +25 -2
  124. package/studio-dist/server/assets/{combobox-oxUI6r4V.js → select-CjuKScan.js} +34 -514
  125. package/studio-dist/server/assets/{shell-DNVXedgE.js → shell-DLkP7wG9.js} +2 -2
  126. package/studio-dist/server/assets/{skills-pKmuAs0F.js → skills-DGg0mWDM.js} +1 -1
  127. package/studio-dist/server/assets/{skills-D8qdXSku.js → skills-zeU80A9S.js} +7 -8
  128. package/studio-dist/server/assets/{specs-DeHYUNFp.js → specs-DDBNT_v1.js} +4 -4
  129. package/studio-dist/server/assets/{specs-view-BGn-5Ik_.js → specs-view-exvmWdg0.js} +9 -9
  130. package/studio-dist/server/assets/{steps-CV7Yk7L7.js → steps-D1tYAyWZ.js} +1 -1
  131. package/studio-dist/server/assets/store-kS7zk0Hr.js +93 -0
  132. package/studio-dist/server/assets/{studio-CB94np48.js → studio-qRvQjRpz.js} +47 -2
  133. package/studio-dist/server/assets/{studio-queries-BqZGBE70.js → studio-queries-qOXOYoPt.js} +66 -8
  134. package/studio-dist/server/assets/{usage-M6Gi6Km7.js → usage-C2um7YiV.js} +12 -43
  135. package/studio-dist/server/assets/{usage-j5jR9gX9.js → usage-Cwle9-xY.js} +1 -1
  136. package/studio-dist/server/assets/useAnchoredPopupScrollLock-kQBB3y_b.js +756 -0
  137. package/studio-dist/server/assets/{useBaseQuery-Tv_QJt9r.js → useBaseQuery--iH3rd-T.js} +1 -1
  138. package/studio-dist/server/assets/useMutation-C-WO6hCM.js +690 -0
  139. package/studio-dist/server/assets/{vault-PqVmssmW.js → vault-B8vgVIH9.js} +6 -6
  140. package/studio-dist/server/assets/{vault-lBlvSyD4.js → vault-CEBBRLMb.js} +1 -1
  141. package/studio-dist/server/assets/{views-CsFp1i1G.js → views-UgO0Qz_g.js} +2 -2
  142. package/studio-dist/server/assets/{warnings-BDs34j_m.js → warnings-BxK4VfV5.js} +1 -2
  143. package/studio-dist/server/assets/{workflow-T0eEldsa.js → workflow-BrTK632u.js} +8 -9
  144. package/studio-dist/server/server.js +2 -2
  145. package/studio-dist/client/assets/app-BFVyWHGo.css +0 -2
  146. package/studio-dist/client/assets/button-D6LrRkOG.js +0 -1
  147. package/studio-dist/client/assets/combobox-Dk2MMZWE.js +0 -1
  148. package/studio-dist/client/assets/fields-D_FYhxQr.js +0 -1
  149. package/studio-dist/client/assets/getting-started-ByWRg7hC.js +0 -1
  150. package/studio-dist/client/assets/getting-started-DZSjYC-b.js +0 -1
  151. package/studio-dist/client/assets/getting-started._topic-C6OyQ4G6.js +0 -1
  152. package/studio-dist/client/assets/getting-started.index-BkmPHdEm.js +0 -1
  153. package/studio-dist/client/assets/graph-7jm2XzyL.js +0 -2
  154. package/studio-dist/client/assets/guides-D9VTjWXP.js +0 -1
  155. package/studio-dist/client/assets/index-BBmFpG4y.js +0 -40
  156. package/studio-dist/client/assets/markdown-view-RL5YvfZg.js +0 -1
  157. package/studio-dist/client/assets/plugins._service._view-CynxTbMx.js +0 -1
  158. package/studio-dist/client/assets/react-r45OnJCw.js +0 -27
  159. package/studio-dist/client/assets/reports-BCAyXh6p.js +0 -1
  160. package/studio-dist/client/assets/routes-BFPqq89E.js +0 -1
  161. package/studio-dist/client/assets/skills-DTks_uBx.js +0 -1
  162. package/studio-dist/client/assets/specs-view-omrd_5P3.js +0 -1
  163. package/studio-dist/client/assets/store-DJ5cncKA.js +0 -1
  164. package/studio-dist/client/assets/vault-DRg8MScm.js +0 -1
  165. package/studio-dist/client/assets/warnings-UHFy6HAp.js +0 -1
  166. package/studio-dist/client/assets/workflow-Bv9vSfVV.js +0 -1
  167. package/studio-dist/server/assets/react-BO0uMhpm.js +0 -89
  168. package/studio-dist/server/assets/store-CWDGIp6x.js +0 -280
@@ -1,12 +1,11 @@
1
- import { t as CompanionView } from "./companion-view-DHUjPpA0.js";
2
- import { J as Link, Y as useNavigate, f as vaultChildrenQuery, m as vaultQuery } from "./studio-queries-BqZGBE70.js";
1
+ import { t as CompanionView } from "./companion-view-D-vGM55e.js";
2
+ import { at as useNavigate, f as vaultChildrenQuery, it as Link, m as vaultQuery } from "./studio-queries-qOXOYoPt.js";
3
3
  import { n as require_react, o as __toESM, t as require_jsx_runtime } from "./jsx-runtime-Bt0s0YKS.js";
4
- import { Dr as useQuery, Tr as cn, r as Icon, t as Button } from "./button-BfoNadNR.js";
5
- import { a as Count, c as PAGE_PAD, d as Progress, f as ROW, i as CommandLine, o as EmptyNote, p as StatusWord, r as Age, s as ListCard, u as Pills } from "./store-CWDGIp6x.js";
6
- import { n as PanelSection, r as SidePanel, t as PanelHead } from "./panel-yqOl5GMU.js";
7
- import { t as Warnings } from "./warnings-BDs34j_m.js";
8
- import { t as MarkdownView } from "./markdown-view-D3v9x-cM.js";
9
- import { C as groupChanges, S as changeStep, _ as GROUP_TITLES, b as changePath, f as Route, g as CHANGE_GROUPS, v as activeChanges, x as changeProgress, y as changeGroup } from "./router-Dnoq5auE.js";
4
+ import { $ as Age, Lr as cn, ct as ROW, et as CommandLine, it as PAGE_PAD, lt as StatusWord, nt as EmptyNote, ot as Pills, r as Icon, rt as ListCard, st as Progress, t as Button, tt as Count, zr as useQuery } from "./button-B7e1fRyW.js";
5
+ import { n as PanelSection, r as SidePanel, t as PanelHead } from "./panel-CUxRIpYL.js";
6
+ import { t as Warnings } from "./warnings-BxK4VfV5.js";
7
+ import { t as MarkdownView } from "./markdown-view-rwiiVcPC.js";
8
+ import { A as changeStep, D as changeGroup, E as activeChanges, O as changePath, T as GROUP_TITLES, j as groupChanges, k as changeProgress, p as Route, w as CHANGE_GROUPS } from "./router-DF0etoNa.js";
10
9
  // src/views/overview/changed-specs.ts
11
10
  var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
12
11
  /** Each capability once, at the newest shipped change that touched it. */
@@ -1,5 +1,18 @@
1
- import { C as STUDIO_MODE_PARAM, D as viewsFor, E as requestedMode, _ as COMPANION_PARAM, g as COMPANION_DIGEST_PATTERN, y as LEGACY_ROLE_PARAM } from "./studio-CB94np48.js";
1
+ import { C as COMPANION_PARAM, M as requestedMode, N as viewsFor, S as COMPANION_DIGEST_PATTERN, T as LEGACY_ROLE_PARAM, _ as REPORT_KINDS, k as STUDIO_MODE_PARAM, v as STATE_FILTERS, y as SUBJECT_TYPES } from "./studio-qRvQjRpz.js";
2
+ // ../mate-core/src/lib/friction/view/model.ts
3
+ var FRICTION_VIEW_DAYS = [
4
+ 7,
5
+ 30,
6
+ 90
7
+ ];
8
+ /** The period a value names, as a number or its text; `undefined` for any other. */
9
+ function frictionViewDays(value) {
10
+ return FRICTION_VIEW_DAYS.find((days) => String(days) === String(value));
11
+ }
2
12
  // src/lib/search.ts
13
+ var FRICTION_SORTS = ["repeats", "recent"];
14
+ /** The option `value` names, or `undefined`. */
15
+ var oneOf = (options, value) => options.find((option) => option === value);
3
16
  /**
4
17
  * Forgiving like the server's own parsing: an unknown value selects nothing rather than failing.
5
18
  * Reads the mode with core's precedence, so an unknown `studioMode` never revives a legacy `role`.
@@ -15,6 +28,16 @@ function validateStudioSearch(raw) {
15
28
  const days = Number(raw.usageDays);
16
29
  if (/^\d+$/.test(String(raw.usageDays)) && Number.isInteger(days) && days >= 1 && days <= 365) search.usageDays = days;
17
30
  if (typeof raw.usageRepository === "string" && /^[a-zA-Z0-9_-]{1,64}$/.test(raw.usageRepository)) search.usageRepository = raw.usageRepository;
31
+ const frictionDays = frictionViewDays(raw.frictionDays);
32
+ if (frictionDays) search.frictionDays = frictionDays;
33
+ const frictionState = oneOf(STATE_FILTERS, raw.frictionState);
34
+ if (frictionState) search.frictionState = frictionState;
35
+ const frictionType = oneOf(SUBJECT_TYPES, raw.frictionType);
36
+ if (frictionType) search.frictionType = frictionType;
37
+ const frictionKind = oneOf(REPORT_KINDS, raw.frictionKind);
38
+ if (frictionKind) search.frictionKind = frictionKind;
39
+ const frictionSort = oneOf(FRICTION_SORTS, raw.frictionSort);
40
+ if (frictionSort) search.frictionSort = frictionSort;
18
41
  return search;
19
42
  }
20
43
  /** The router JSON-parses search values, so `?q=2026` arrives as a number; read it as typed. */
@@ -52,4 +75,4 @@ function canonicalHref(pathname, searchStr, view, studioMode) {
52
75
  params.set(STUDIO_MODE_PARAM, studioMode);
53
76
  return `${pathname}?${params}`;
54
77
  }
55
- export { validateSpecsSearch as n, validateStudioSearch as r, canonicalHref as t };
78
+ export { FRICTION_VIEW_DAYS as a, validateStudioSearch as i, oneOf as n, frictionViewDays as o, validateSpecsSearch as r, canonicalHref as t };
@@ -1,7 +1,8 @@
1
1
  import { n as require_react, o as __toESM, t as require_jsx_runtime } from "./jsx-runtime-Bt0s0YKS.js";
2
- import { $t as triggerOpenStateMapping, Bt as stopEvent, Cn as cancelOpen, Fn as none, Ft as rectToClientRect, G as useValueAsRef, Gn as useButton, H as visuallyHiddenInput, Hn as createChangeEventDetails, Jn as useIsoLayoutEffect, Kn as ownerDocument, L as DROPDOWN_COLLISION_AVOIDANCE, M as FloatingPortal, Mn as itemPress, On as imperativeAction, Pn as listNavigation, Qt as pressableTriggerOpenStateMapping, Rt as isVirtualClick, S as useOpenChangeComplete, Sn as CompositeList, T as useDismiss, Tr as cn, Ut as getFloatingFocusElement, V as visuallyHidden, Vn as windowResize, W as useAnimationFrame, Wn as useCompositeListItem, Wt as isInteractiveElement, Xt as popupStateMapping, Y as useTimeout, Yn as useStableCallback, _n as webkit, _r as EMPTY_OBJECT, _t as isListIndexDisabled, a as ReactStore, br as useMergedRefs, f as attachPreventUnmountOnClose, gr as EMPTY_ARRAY, hn as jsdom, hr as mergeProps, ht as isElementVisible, ir as getWindow, jn as inputPress, l as FOCUSABLE_POPUP_PROPS, mn as getTarget, mr as useRenderElement, nt as useDirection, on as transitionStatusMapping, or as isElement, pn as contains, q as addEventListener, qn as formatErrorMessage, r as Icon, rt as COMPOSITE_KEYS, tt as useToolbarRootContext, vr as NOOP, w as useTransitionStatus, wr as useControlled, x as useUnmountAfterClose, xn as isElementDisabled, xr as useRefWithInit } from "./button-BfoNadNR.js";
3
- import { _ as inertValue, a as InternalBackdrop, c as useLabelableId, d as useRegisterFieldControl, g as fieldValidityMapping, l as useLabelableContext, m as useFieldRootContext, o as useSetFieldFocused, s as useValueChanged, u as useFormContext, v as FloatingFocusManager } from "./fields-BD_c65T1.js";
4
- import { $ as findItemIndex, B as useListEmpty, F as ComboboxList$1, G as getComboboxPopupId, H as triggerStateAttributesMapping, I as ComboboxInput$1, J as resolveSelectedLabel, K as hasNullItemLabel, L as ComboboxInternalDismissButton, M as ComboboxItem$1, N as useComboboxItemContext, P as useAnchoredPopupScrollLock, Q as defaultItemEquality, R as ComboboxPositionerContext, U as AriaCombobox, V as usePopupSide, W as useOpenInteractionType, X as stringifyAsValue, Y as stringifyAsLabel, Z as compareItemEquality, _t as useFloatingRootContext, at as useComboboxInputValueContext, et as findSelectionIndex, ft as usePositioner, gt as useListNavigation, ht as platform, it as useComboboxFloatingContext, j as ComboboxEmpty$1, mt as useAnchorPositioning, nt as removeItem, ot as useComboboxRootContext, pt as getDisabledMountTransitionStyles, q as resolveMultipleLabels, rt as resolveSelectedIndex, st as useOnFirstRender, tt as isSelectedValueDirty, vt as useClick, z as useComboboxPositionerContext } from "./router-Dnoq5auE.js";
2
+ import { $n as windowResize, Ar as NOOP, Bn as imperativeAction, Dn as jsdom, Dr as mergeProps, Dt as isElementVisible, Er as useRenderElement, Fn as cancelOpen, G as useValueAsRef, H as visuallyHiddenInput, Ir as useControlled, L as DROPDOWN_COLLISION_AVOIDANCE, Lr as cn, M as FloatingPortal, Mr as useMergedRefs, Nn as isElementDisabled, Nr as useRefWithInit, Or as EMPTY_ARRAY, Pn as CompositeList, Qt as stopEvent, S as useOpenChangeComplete, T as useDismiss, Tn as contains, V as visuallyHidden, W as useAnimationFrame, Wn as itemPress, Xt as isVirtualClick, Y as useTimeout, a as ReactStore, ar as formatErrorMessage, cn as popupStateMapping, dn as triggerOpenStateMapping, er as createChangeEventDetails, f as attachPreventUnmountOnClose, gr as getWindow, ht as COMPOSITE_KEYS, ir as ownerDocument, kn as webkit, kr as EMPTY_OBJECT, kt as isListIndexDisabled, l as FOCUSABLE_POPUP_PROPS, mt as useDirection, nr as useCompositeListItem, or as useIsoLayoutEffect, pt as useToolbarRootContext, q as addEventListener, qn as none, qt as rectToClientRect, r as Icon, rr as useButton, sr as useStableCallback, tn as getFloatingFocusElement, un as pressableTriggerOpenStateMapping, vn as transitionStatusMapping, w as useTransitionStatus, x as useUnmountAfterClose } from "./button-B7e1fRyW.js";
3
+ import { _ as inertValue, a as InternalBackdrop, c as useLabelableId, d as useRegisterFieldControl, g as fieldValidityMapping, l as useLabelableContext, m as useFieldRootContext, o as useSetFieldFocused, s as useValueChanged, u as useFormContext, v as FloatingFocusManager } from "./fields-B4qM2ZwC.js";
4
+ import { S as useClick, _ as resolveSelectedIndex, a as hasNullItemLabel, b as useListNavigation, c as resolveSelectedLabel, d as compareItemEquality, f as defaultItemEquality, g as removeItem, h as isSelectedValueDirty, l as stringifyAsLabel, m as findSelectionIndex, n as useOpenInteractionType, p as findItemIndex, s as resolveMultipleLabels, t as useAnchoredPopupScrollLock, u as stringifyAsValue, x as useFloatingRootContext, y as useOnFirstRender } from "./useAnchoredPopupScrollLock-kQBB3y_b.js";
5
+ import { ct as useAnchorPositioning, lt as platform, ot as usePositioner, st as getDisabledMountTransitionStyles } from "./router-DF0etoNa.js";
5
6
  // ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/floating-ui-react/hooks/useTypeahead.mjs
6
7
  var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
7
8
  /**
@@ -106,7 +107,6 @@ function useTypeahead(store, props) {
106
107
  } : {}, [enabled, sharedProps]);
107
108
  }
108
109
  // ../../node_modules/.bun/@base-ui+utils@0.5.0+9e489665888c9e4a/node_modules/@base-ui/utils/usePreviousValue.mjs
109
- var import_jsx_runtime = require_jsx_runtime();
110
110
  /**
111
111
  * Returns a previous value of its argument.
112
112
  * @param value Current value.
@@ -124,6 +124,7 @@ function usePreviousValue(value) {
124
124
  return state.previous;
125
125
  }
126
126
  // ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/utils/getPseudoElementBounds.mjs
127
+ var import_jsx_runtime = require_jsx_runtime();
127
128
  var BOUNDARY_OFFSET = 5;
128
129
  /**
129
130
  * Determines if a mouse event occurred within the bounds of an element
@@ -159,457 +160,6 @@ function getPseudoElementBounds(element) {
159
160
  function resolveAriaLabelledBy(fieldLabelId, localLabelId) {
160
161
  return fieldLabelId ?? localLabelId;
161
162
  }
162
- // ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/trigger/ComboboxTrigger.mjs
163
- /**
164
- * A button that opens the popup.
165
- * Renders a `<button>` element.
166
- *
167
- * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)
168
- */
169
- var ComboboxTrigger = /*#__PURE__*/ import_react.forwardRef(function ComboboxTrigger(componentProps, forwardedRef) {
170
- const { render, className, nativeButton = true, disabled: disabledProp = false, id: idProp, style, ...elementProps } = componentProps;
171
- const { state: fieldState, disabled: fieldDisabled, setTouched, validationMode, validation } = useFieldRootContext();
172
- const { labelId: fieldLabelId } = useLabelableContext();
173
- const store = useComboboxRootContext();
174
- const selectionMode = store.useState("selectionMode");
175
- const comboboxDisabled = store.useState("disabled");
176
- const readOnly = store.useState("readOnly");
177
- const required = store.useState("required");
178
- const positionerElement = store.useState("positionerElement");
179
- const listElement = store.useState("listElement");
180
- const storedPopupId = store.useState("popupId");
181
- const triggerProps = store.useState("triggerProps");
182
- const inputInsidePopup = store.useState("inputInsidePopup");
183
- const rootId = store.useState("id");
184
- const comboboxLabelId = store.useState("labelId");
185
- const open = store.useState("open");
186
- const selectedValue = store.useState("selectedValue");
187
- const activeIndex = store.useState("activeIndex");
188
- const selectedIndex = store.useState("selectedIndex");
189
- const hasSelectedValue = store.useState("hasSelectedValue");
190
- const floatingRootContext = useComboboxFloatingContext();
191
- const inputValue = useComboboxInputValueContext();
192
- const focusTimeout = useTimeout();
193
- const disabled = fieldDisabled || comboboxDisabled || disabledProp;
194
- const listEmpty = useListEmpty();
195
- const popupSide = usePopupSide(store);
196
- const triggerRef = import_react.useRef(null);
197
- const setFocused = useSetFieldFocused(disabled, triggerRef);
198
- useLabelableId({ id: inputInsidePopup ? idProp : void 0 });
199
- const id = inputInsidePopup ? idProp ?? rootId : idProp;
200
- const ariaLabelledBy = resolveAriaLabelledBy(fieldLabelId, comboboxLabelId);
201
- let ariaControls;
202
- if (open && inputInsidePopup) ariaControls = storedPopupId ?? getComboboxPopupId(rootId);
203
- else if (open) ariaControls = listElement?.id;
204
- const currentPointerTypeRef = import_react.useRef("");
205
- function trackPointerType(event) {
206
- currentPointerTypeRef.current = event.pointerType;
207
- }
208
- const { reference: triggerTypeaheadProps } = useTypeahead(floatingRootContext, {
209
- enabled: !open && !readOnly && !comboboxDisabled && selectionMode === "single",
210
- listRef: store.context.labelsRef,
211
- activeIndex,
212
- selectedIndex,
213
- onMatch(index) {
214
- const nextSelectedValue = store.context.valuesRef.current[index];
215
- if (nextSelectedValue !== void 0) store.context.setSelectedValue(nextSelectedValue, createChangeEventDetails(none));
216
- }
217
- });
218
- const { reference: triggerClickProps } = useClick(floatingRootContext, {
219
- enabled: !comboboxDisabled,
220
- event: "mousedown"
221
- });
222
- const { buttonRef, getButtonProps } = useButton({
223
- native: nativeButton,
224
- disabled
225
- });
226
- const state = {
227
- ...fieldState,
228
- readOnly,
229
- open,
230
- disabled,
231
- popupSide,
232
- listEmpty,
233
- placeholder: selectionMode === "none" ? false : !hasSelectedValue
234
- };
235
- const setTriggerElement = useStableCallback((element) => {
236
- store.set("triggerElement", element);
237
- });
238
- return useRenderElement("button", componentProps, {
239
- ref: [
240
- forwardedRef,
241
- buttonRef,
242
- triggerRef,
243
- setTriggerElement
244
- ],
245
- state,
246
- props: [
247
- triggerProps,
248
- triggerClickProps,
249
- triggerTypeaheadProps,
250
- {
251
- id,
252
- tabIndex: inputInsidePopup ? 0 : -1,
253
- role: inputInsidePopup ? "combobox" : void 0,
254
- "aria-expanded": open,
255
- "aria-haspopup": inputInsidePopup ? "dialog" : "listbox",
256
- "aria-controls": ariaControls,
257
- "aria-required": inputInsidePopup ? required || void 0 : void 0,
258
- "aria-readonly": inputInsidePopup ? readOnly || void 0 : void 0,
259
- "aria-labelledby": ariaLabelledBy,
260
- onPointerDown: trackPointerType,
261
- onPointerEnter: trackPointerType,
262
- onFocus() {
263
- setFocused(true);
264
- if (disabled) return;
265
- focusTimeout.start(0, store.context.forceMount);
266
- },
267
- onBlur(event) {
268
- if (contains(positionerElement, event.relatedTarget)) return;
269
- setTouched(true);
270
- setFocused(false);
271
- if (validationMode === "onBlur") {
272
- const valueToValidate = selectionMode === "none" ? inputValue : selectedValue;
273
- validation.commit(valueToValidate);
274
- }
275
- },
276
- onMouseDown(event) {
277
- if (disabled) return;
278
- if (!inputInsidePopup) floatingRootContext.set("domReferenceElement", event.currentTarget);
279
- store.context.forceMount();
280
- if (currentPointerTypeRef.current !== "touch") {
281
- store.context.inputRef.current?.focus();
282
- if (!inputInsidePopup) event.preventDefault();
283
- }
284
- if (open) return;
285
- const doc = ownerDocument(event.currentTarget);
286
- function handleMouseUp(mouseEvent) {
287
- const currentTriggerElement = store.state.triggerElement;
288
- if (!currentTriggerElement) return;
289
- const mouseUpTarget = getTarget(mouseEvent);
290
- const positioner = store.state.positionerElement;
291
- const list = store.state.listElement;
292
- if (contains(currentTriggerElement, mouseUpTarget) || contains(positioner, mouseUpTarget) || contains(list, mouseUpTarget)) return;
293
- if (isMouseWithinBounds(mouseEvent, currentTriggerElement)) return;
294
- store.context.setOpen(false, createChangeEventDetails(cancelOpen, mouseEvent));
295
- }
296
- if (inputInsidePopup) doc.addEventListener("mouseup", handleMouseUp, { once: true });
297
- },
298
- onKeyDown(event) {
299
- if (event.key === "ArrowDown" || event.key === "ArrowUp") {
300
- stopEvent(event);
301
- store.context.setOpen(true, createChangeEventDetails(listNavigation, event.nativeEvent));
302
- store.context.inputRef.current?.focus();
303
- }
304
- }
305
- },
306
- validation.getValidationProps(disabled, elementProps),
307
- getButtonProps
308
- ],
309
- stateAttributesMapping: triggerStateAttributesMapping
310
- });
311
- });
312
- // ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/utils/handleInputPress.mjs
313
- function handleInputPress(event, store, disabled, shouldIgnoreTarget) {
314
- if (event.baseUIHandlerPrevented) return;
315
- const target = getTarget(event.nativeEvent);
316
- const targetElement = isElement(target) ? target : null;
317
- if (targetElement !== event.currentTarget && (shouldIgnoreTarget?.(targetElement) || isInteractiveElement(targetElement))) return;
318
- event.preventDefault();
319
- if (disabled) return;
320
- store.context.inputRef.current?.focus();
321
- if (store.state.openOnInputClick) store.context.setOpen(true, createChangeEventDetails(inputPress, event.nativeEvent));
322
- }
323
- // ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/input-group/ComboboxInputGroup.mjs
324
- /**
325
- * A wrapper for the input and its associated controls.
326
- * Renders a `<div>` element.
327
- *
328
- * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)
329
- */
330
- var ComboboxInputGroup = /*#__PURE__*/ import_react.forwardRef(function ComboboxInputGroup(componentProps, forwardedRef) {
331
- const { render, className, style, ...elementProps } = componentProps;
332
- const { state: fieldState } = useFieldRootContext();
333
- const store = useComboboxRootContext();
334
- const open = store.useState("open");
335
- const comboboxDisabled = store.useState("disabled");
336
- const readOnly = store.useState("readOnly");
337
- const hasSelectedValue = store.useState("hasSelectedValue");
338
- const selectionMode = store.useState("selectionMode");
339
- const popupSide = usePopupSide(store);
340
- const disabled = comboboxDisabled;
341
- const listEmpty = useListEmpty();
342
- const placeholder = selectionMode === "none" ? false : !hasSelectedValue;
343
- const state = {
344
- ...fieldState,
345
- open,
346
- disabled,
347
- readOnly,
348
- popupSide,
349
- listEmpty,
350
- placeholder
351
- };
352
- const setInputGroupElement = useStableCallback((element) => {
353
- store.set("inputGroupElement", element);
354
- });
355
- return useRenderElement("div", componentProps, {
356
- ref: [forwardedRef, setInputGroupElement],
357
- props: [{
358
- role: "group",
359
- onMouseDown(event) {
360
- handleInputPress(event, store, disabled, (target) => {
361
- return contains(store.context.chipsContainerRef.current, target);
362
- });
363
- }
364
- }, elementProps],
365
- state,
366
- stateAttributesMapping: triggerStateAttributesMapping
367
- });
368
- });
369
- // ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/portal/ComboboxPortalContext.mjs
370
- var ComboboxPortalContext = /*#__PURE__*/ import_react.createContext(void 0);
371
- function useComboboxPortalContext() {
372
- const context = import_react.useContext(ComboboxPortalContext);
373
- if (context === void 0) throw new Error(formatErrorMessage(20));
374
- return context;
375
- }
376
- // ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/portal/ComboboxPortal.mjs
377
- /**
378
- * A portal element that moves the popup to a different part of the DOM.
379
- * By default, the portal element is appended to `<body>`.
380
- * Renders a `<div>` element.
381
- *
382
- * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)
383
- */
384
- var ComboboxPortal = /*#__PURE__*/ import_react.forwardRef(function ComboboxPortal(props, forwardedRef) {
385
- const { keepMounted = false, ...portalProps } = props;
386
- const store = useComboboxRootContext();
387
- const mounted = store.useState("mounted");
388
- const forceMounted = store.useState("forceMounted");
389
- if (!(mounted || keepMounted || forceMounted)) return null;
390
- return /*#__PURE__*/ (0, import_jsx_runtime.jsx)(ComboboxPortalContext.Provider, {
391
- value: keepMounted,
392
- children: /*#__PURE__*/ (0, import_jsx_runtime.jsx)(FloatingPortal, {
393
- ref: forwardedRef,
394
- ...portalProps
395
- })
396
- });
397
- });
398
- // ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/positioner/ComboboxPositioner.mjs
399
- /**
400
- * Positions the popup against the trigger.
401
- * Renders a `<div>` element.
402
- *
403
- * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)
404
- */
405
- var ComboboxPositioner = /*#__PURE__*/ import_react.forwardRef(function ComboboxPositioner(componentProps, forwardedRef) {
406
- 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;
407
- const store = useComboboxRootContext();
408
- const floatingRootContext = useComboboxFloatingContext();
409
- const keepMounted = useComboboxPortalContext();
410
- const modal = store.useState("modal");
411
- const open = store.useState("open");
412
- const mounted = store.useState("mounted");
413
- const openMethod = store.useState("openMethod");
414
- const positionerElement = store.useState("positionerElement");
415
- const triggerElement = store.useState("triggerElement");
416
- const inputElement = store.useState("inputElement");
417
- const inputGroupElement = store.useState("inputGroupElement");
418
- const inputInsidePopup = store.useState("inputInsidePopup");
419
- const transitionStatus = store.useState("transitionStatus");
420
- const empty = useListEmpty();
421
- const positioning = useAnchorPositioning({
422
- anchor: anchor ?? (inputInsidePopup ? triggerElement : inputGroupElement ?? inputElement),
423
- floatingRootContext,
424
- positionMethod,
425
- mounted,
426
- side,
427
- sideOffset,
428
- align,
429
- alignOffset,
430
- arrowPadding,
431
- collisionBoundary,
432
- collisionPadding,
433
- sticky,
434
- disableAnchorTracking,
435
- keepMounted,
436
- collisionAvoidance,
437
- lazyFlip: true
438
- });
439
- useAnchoredPopupScrollLock(open && modal, openMethod === "touch", positionerElement, triggerElement);
440
- const state = {
441
- open,
442
- side: positioning.side,
443
- align: positioning.align,
444
- anchorHidden: positioning.anchorHidden,
445
- empty
446
- };
447
- useIsoLayoutEffect(() => {
448
- store.set("popupSide", positioning.side);
449
- }, [store, positioning.side]);
450
- const setPositionerElement = useStableCallback((element) => {
451
- store.set("positionerElement", element);
452
- });
453
- const element = usePositioner(componentProps, state, {
454
- styles: positioning.positionerStyles,
455
- transitionStatus,
456
- props: elementProps,
457
- refs: [forwardedRef, setPositionerElement],
458
- hidden: !mounted,
459
- inert: !open
460
- });
461
- return /*#__PURE__*/ (0, import_jsx_runtime.jsxs)(ComboboxPositionerContext.Provider, {
462
- value: positioning,
463
- children: [mounted && modal && /*#__PURE__*/ (0, import_jsx_runtime.jsx)(InternalBackdrop, {
464
- inert: inertValue(!open),
465
- cutout: inputGroupElement ?? inputElement ?? triggerElement
466
- }), element]
467
- });
468
- });
469
- // ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/popup/ComboboxPopup.mjs
470
- var stateAttributesMapping$3 = {
471
- ...popupStateMapping,
472
- ...transitionStatusMapping
473
- };
474
- /**
475
- * A container for the list.
476
- * Renders a `<div>` element.
477
- *
478
- * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)
479
- */
480
- var ComboboxPopup = /*#__PURE__*/ import_react.forwardRef(function ComboboxPopup(componentProps, forwardedRef) {
481
- const { render, className, style, initialFocus, finalFocus, ...elementProps } = componentProps;
482
- const store = useComboboxRootContext();
483
- const positioning = useComboboxPositionerContext();
484
- const floatingRootContext = useComboboxFloatingContext();
485
- const mounted = store.useState("mounted");
486
- const open = store.useState("open");
487
- const openMethod = store.useState("openMethod");
488
- const popupProps = store.useState("popupProps");
489
- const transitionStatus = store.useState("transitionStatus");
490
- const inputInsidePopup = store.useState("inputInsidePopup");
491
- const inputElement = store.useState("inputElement");
492
- const modal = store.useState("modal");
493
- const rootId = store.useState("id");
494
- const empty = useListEmpty();
495
- const popupId = elementProps.id ?? (inputInsidePopup ? getComboboxPopupId(rootId) : void 0);
496
- useIsoLayoutEffect(() => {
497
- store.set("popupId", store.context.popupRef.current?.id || popupId);
498
- return () => {
499
- store.set("popupId", void 0);
500
- };
501
- }, [store, popupId]);
502
- useOpenChangeComplete({
503
- open,
504
- ref: store.context.popupRef,
505
- onComplete() {
506
- if (open) store.context.onOpenChangeComplete(true);
507
- }
508
- });
509
- const state = {
510
- open,
511
- side: positioning.side,
512
- align: positioning.align,
513
- anchorHidden: positioning.anchorHidden,
514
- transitionStatus,
515
- empty
516
- };
517
- const element = useRenderElement("div", componentProps, {
518
- state,
519
- ref: [forwardedRef, store.context.popupRef],
520
- props: [
521
- popupProps,
522
- {
523
- id: popupId,
524
- role: inputInsidePopup ? "dialog" : "presentation",
525
- onFocus(event) {
526
- const target = getTarget(event.nativeEvent);
527
- if (openMethod !== "touch" && (contains(store.state.listElement, target) || target === event.currentTarget)) store.context.inputRef.current?.focus();
528
- }
529
- },
530
- getDisabledMountTransitionStyles(transitionStatus),
531
- elementProps
532
- ],
533
- stateAttributesMapping: stateAttributesMapping$3
534
- });
535
- const resolvedInitialFocus = initialFocus === void 0 ? inputInsidePopup ? (interactionType) => interactionType === "touch" ? store.context.popupRef.current : inputElement : false : initialFocus;
536
- let resolvedFinalFocus;
537
- if (finalFocus != null) resolvedFinalFocus = finalFocus;
538
- else resolvedFinalFocus = inputInsidePopup ? void 0 : false;
539
- const focusManagerModal = !inputInsidePopup || modal;
540
- return /*#__PURE__*/ (0, import_jsx_runtime.jsx)(FloatingFocusManager, {
541
- context: floatingRootContext,
542
- disabled: !mounted,
543
- modal: focusManagerModal,
544
- openInteractionType: openMethod,
545
- initialFocus: resolvedInitialFocus,
546
- returnFocus: resolvedFinalFocus,
547
- getInsideElements: () => [store.context.startDismissRef.current, store.context.endDismissRef.current],
548
- children: /*#__PURE__*/ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [element, focusManagerModal && /*#__PURE__*/ (0, import_jsx_runtime.jsx)(ComboboxInternalDismissButton, { ref: store.context.endDismissRef })] })
549
- });
550
- });
551
- // ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/root/ComboboxRoot.mjs
552
- /**
553
- * Groups all parts of the combobox.
554
- * Doesn't render its own HTML element.
555
- *
556
- * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)
557
- */
558
- function ComboboxRoot(props) {
559
- const { multiple = false, defaultValue, value, onValueChange, autoComplete, ...other } = props;
560
- return /*#__PURE__*/ (0, import_jsx_runtime.jsx)(AriaCombobox, {
561
- ...other,
562
- selectionMode: multiple ? "multiple" : "single",
563
- selectedValue: value,
564
- defaultSelectedValue: defaultValue,
565
- onSelectedValueChange: onValueChange,
566
- formAutoComplete: autoComplete
567
- });
568
- }
569
- // ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/utils/ItemIndicator.mjs
570
- var ItemIndicator = /*#__PURE__*/ import_react.memo(/*#__PURE__*/ import_react.forwardRef(function ItemIndicator(componentProps, forwardedRef) {
571
- const { render, className, style, keepMounted, selected, ...elementProps } = componentProps;
572
- const indicatorRef = import_react.useRef(null);
573
- const { transitionStatus, setMounted } = useTransitionStatus(selected);
574
- const element = useRenderElement("span", componentProps, {
575
- ref: [forwardedRef, indicatorRef],
576
- state: {
577
- selected,
578
- transitionStatus
579
- },
580
- props: [{
581
- "aria-hidden": true,
582
- children: "✔️"
583
- }, elementProps],
584
- stateAttributesMapping: transitionStatusMapping
585
- });
586
- useOpenChangeComplete({
587
- batch: true,
588
- enabled: !selected,
589
- open: selected,
590
- ref: indicatorRef,
591
- onComplete() {
592
- if (!selected) setMounted(false);
593
- }
594
- });
595
- return element;
596
- }));
597
- // ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/combobox/item-indicator/ComboboxItemIndicator.mjs
598
- /**
599
- * Indicates whether the item is selected.
600
- * Renders a `<span>` element.
601
- *
602
- * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)
603
- */
604
- var ComboboxItemIndicator = /*#__PURE__*/ import_react.forwardRef(function ComboboxItemIndicator(componentProps, forwardedRef) {
605
- const { selected } = useComboboxItemContext();
606
- if (!(componentProps.keepMounted || selected)) return null;
607
- return /*#__PURE__*/ (0, import_jsx_runtime.jsx)(ItemIndicator, {
608
- ...componentProps,
609
- selected,
610
- ref: forwardedRef
611
- });
612
- });
613
163
  // ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/select/root/SelectRootContext.mjs
614
164
  var SelectRootContext = /*#__PURE__*/ import_react.createContext(void 0);
615
165
  var SelectFloatingContext = /*#__PURE__*/ import_react.createContext(void 0);
@@ -1919,6 +1469,34 @@ var SelectItem$1 = /*#__PURE__*/ import_react.memo(/*#__PURE__*/ import_react.fo
1919
1469
  children: element
1920
1470
  });
1921
1471
  }));
1472
+ // ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/utils/ItemIndicator.mjs
1473
+ var ItemIndicator = /*#__PURE__*/ import_react.memo(/*#__PURE__*/ import_react.forwardRef(function ItemIndicator(componentProps, forwardedRef) {
1474
+ const { render, className, style, keepMounted, selected, ...elementProps } = componentProps;
1475
+ const indicatorRef = import_react.useRef(null);
1476
+ const { transitionStatus, setMounted } = useTransitionStatus(selected);
1477
+ const element = useRenderElement("span", componentProps, {
1478
+ ref: [forwardedRef, indicatorRef],
1479
+ state: {
1480
+ selected,
1481
+ transitionStatus
1482
+ },
1483
+ props: [{
1484
+ "aria-hidden": true,
1485
+ children: "✔️"
1486
+ }, elementProps],
1487
+ stateAttributesMapping: transitionStatusMapping
1488
+ });
1489
+ useOpenChangeComplete({
1490
+ batch: true,
1491
+ enabled: !selected,
1492
+ open: selected,
1493
+ ref: indicatorRef,
1494
+ onComplete() {
1495
+ if (!selected) setMounted(false);
1496
+ }
1497
+ });
1498
+ return element;
1499
+ }));
1922
1500
  // ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/select/item-indicator/SelectItemIndicator.mjs
1923
1501
  /**
1924
1502
  * Indicates whether the select item is selected.
@@ -2028,62 +1606,4 @@ function SelectItem({ className, children, ...props }) {
2028
1606
  })]
2029
1607
  });
2030
1608
  }
2031
- // src/components/ui/combobox.tsx
2032
- var Combobox = ComboboxRoot;
2033
- /** A typing field framed like the Select trigger, with the same inset chevron. */
2034
- function ComboboxInput({ className, ...props }) {
2035
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ComboboxInputGroup, {
2036
- "data-slot": "combobox-input-group",
2037
- className: cn("relative flex items-center", className),
2038
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxInput$1, {
2039
- "data-slot": "combobox-input",
2040
- className: cn(TRIGGER, "placeholder:text-muted focus:border-accent"),
2041
- ...props
2042
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxTrigger, {
2043
- "data-slot": "combobox-trigger",
2044
- "aria-label": "Show options",
2045
- className: "absolute inset-y-0 right-0 flex w-9 items-center justify-center outline-none",
2046
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
2047
- name: "chevron",
2048
- className: CHEVRON
2049
- })
2050
- })]
2051
- });
2052
- }
2053
- function ComboboxContent({ className, ...props }) {
2054
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxPositioner, {
2055
- sideOffset: 6,
2056
- className: "z-40",
2057
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxPopup, {
2058
- "data-slot": "combobox-content",
2059
- className: cn(POPUP, className),
2060
- ...props
2061
- })
2062
- }) });
2063
- }
2064
- var ComboboxList = ComboboxList$1;
2065
- function ComboboxEmpty({ className, ...props }) {
2066
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxEmpty$1, {
2067
- "data-slot": "combobox-empty",
2068
- className: cn("px-2.5 py-1.5 text-sm text-muted empty:hidden", className),
2069
- ...props
2070
- });
2071
- }
2072
- function ComboboxItem({ className, children, ...props }) {
2073
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ComboboxItem$1, {
2074
- "data-slot": "combobox-item",
2075
- className: cn(ITEM, className),
2076
- ...props,
2077
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
2078
- className: "truncate",
2079
- children
2080
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComboboxItemIndicator, {
2081
- className: ITEM_CHECK,
2082
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
2083
- name: "check",
2084
- className: "size-4"
2085
- })
2086
- })]
2087
- });
2088
- }
2089
- export { ComboboxItem as a, SelectContent as c, SelectValue as d, ComboboxInput as i, SelectItem as l, ComboboxContent as n, ComboboxList as o, ComboboxEmpty as r, Select as s, Combobox as t, SelectTrigger as u };
1609
+ export { Select as a, SelectTrigger as c, ItemIndicator as d, resolveAriaLabelledBy as f, POPUP as i, SelectValue as l, useTypeahead as m, ITEM as n, SelectContent as o, isMouseWithinBounds as p, ITEM_CHECK as r, SelectItem as s, CHEVRON as t, TRIGGER as u };
@@ -1,8 +1,8 @@
1
1
  import { t as createServerRpc } from "./createServerRpc-bFKFpGFG.js";
2
2
  import { n as healthNote } from "./model-PyPALjii.js";
3
3
  import { n as createServerFn } from "../server.js";
4
- import { C as STUDIO_MODE_PARAM, T as companionDigest, _ as COMPANION_PARAM } from "./studio-CB94np48.js";
5
- import { r as validateStudioSearch } from "./search-DUK7Jl6f.js";
4
+ import { C as COMPANION_PARAM, j as companionDigest, k as STUDIO_MODE_PARAM } from "./studio-qRvQjRpz.js";
5
+ import { i as validateStudioSearch } from "./search-b-yQesv3.js";
6
6
  // src/server/shell.ts?tss-serverfn-split
7
7
  /** `refresh` collects the companion again; every other call reads the held snapshot. */
8
8
  var getShell_createServerFn_handler = createServerRpc({