@kortix/ui 0.16.1 → 0.16.2

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 (277) hide show
  1. package/dist/_vendor/kortix-shared.js +133 -26
  2. package/dist/_vendor/shared/index.d.ts +1 -0
  3. package/dist/_vendor/shared/space-icon.d.ts +30 -0
  4. package/dist/_vendor/shared/space-slug.d.ts +12 -0
  5. package/dist/access/access/access-dialog.js +2 -2
  6. package/dist/access/share-dialog.d.ts +77 -0
  7. package/dist/access/share-dialog.js +160 -0
  8. package/dist/access/sharing-picker.d.ts +8 -1
  9. package/dist/access/sharing-picker.js +2 -2
  10. package/dist/changes/change-list.js +3 -3
  11. package/dist/customize/connectors/catalog/catalog-paging.d.ts +1 -1
  12. package/dist/customize/connectors/catalog/catalog-paging.js +1 -1
  13. package/dist/customize/providers/provider-sheet.js +17 -7
  14. package/dist/customize/sections/component/manifest-copy-block.js +1 -1
  15. package/dist/customize/sections/component/section-wrapper.d.ts +1 -8
  16. package/dist/customize/sections/component/section-wrapper.js +3 -3
  17. package/dist/customize/sections/llm-provider/model-capability-icons.js +1 -1
  18. package/dist/customize/sections/view/gateway/generation-controls.js +1 -1
  19. package/dist/customize/sections/view/git-view.js +1 -1
  20. package/dist/customize/settings/settings-tabs.js +0 -5
  21. package/dist/customize/settings/tabs/general-tab.js +2 -2
  22. package/dist/customize/shared/capability-page-shell.d.ts +2 -2
  23. package/dist/customize/shared/capability-page-shell.js +7 -5
  24. package/dist/customize/shared/capability-scroll-root.js +1 -2
  25. package/dist/customize/shared/catalog/catalog-card.js +1 -1
  26. package/dist/files/project/components/change-requests-panel.js +2 -2
  27. package/dist/files/project/components/checkpoint-detail-dialog.js +4 -4
  28. package/dist/files/project/components/checkpoints-panel.js +2 -2
  29. package/dist/files/project/components/drive-explorer.js +2 -2
  30. package/dist/files/project/components/file-breadcrumbs.js +1 -1
  31. package/dist/files/project/components/file-history-popover.js +2 -2
  32. package/dist/files/project/components/file-thumbnail.js +1 -1
  33. package/dist/files/project/components/open-change-request-dialog.js +1 -1
  34. package/dist/files/renderers/mermaid/mermaid-diagram.js +2 -2
  35. package/dist/files/renderers/show-content-renderer.js +6 -6
  36. package/dist/files/renderers/sqlite-renderer.js +8 -8
  37. package/dist/files/renderers/zip/zip-renderer.js +2 -2
  38. package/dist/files/viewer/file-content-renderer.js +5 -5
  39. package/dist/files/viewer/json-tree-view.js +3 -3
  40. package/dist/i18n/en.d.ts +131 -8
  41. package/dist/i18n/en.js +167 -44
  42. package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +0 -3
  43. package/dist/internal/billing/use-cost-explorer.d.ts +9 -2
  44. package/dist/internal/billing/use-cost-explorer.js +22 -0
  45. package/dist/internal/billing/use-session-costs.d.ts +7 -2
  46. package/dist/internal/billing/use-session-costs.js +6 -0
  47. package/dist/internal/chrome/use-chrome-offered.d.ts +3 -3
  48. package/dist/internal/chrome/use-chrome-offered.js +3 -3
  49. package/dist/internal/components/nav-rail.d.ts +1 -20
  50. package/dist/internal/components/nav-rail.js +1 -15
  51. package/dist/internal/layout/project-page-header.d.ts +13 -9
  52. package/dist/internal/layout/project-page-header.js +14 -10
  53. package/dist/internal/lib/browser-noise/evidence.d.ts +2 -0
  54. package/dist/internal/lib/browser-noise/rules/injected-scripts.js +16 -1
  55. package/dist/internal/lib/error-handler.js +0 -9
  56. package/dist/internal/lib/interface-theme-defaults.js +2 -2
  57. package/dist/internal/lib/project-actions.d.ts +4 -5
  58. package/dist/internal/lib/project-actions.js +3 -5
  59. package/dist/internal/lib/project-preamble.d.ts +42 -4
  60. package/dist/internal/lib/project-preamble.js +49 -5
  61. package/dist/internal/lib/web-notifications.js +17 -29
  62. package/dist/internal/outcomes/outcome-vocabulary.js +1 -1
  63. package/dist/internal/stores/session-filter-store.d.ts +1 -1
  64. package/dist/internal/stores/user-preferences-store.d.ts +2 -2
  65. package/dist/internal/stores/workspace-settings-rail-store.d.ts +0 -8
  66. package/dist/internal/stores/workspace-settings-rail-store.js +0 -2
  67. package/dist/lib/routes.d.ts +7 -0
  68. package/dist/lib/routes.js +6 -1
  69. package/dist/markdown/doc-editor/doc-extensions.js +2 -0
  70. package/dist/markdown/doc-editor/doc-paste.d.ts +13 -0
  71. package/dist/markdown/doc-editor/doc-paste.js +67 -0
  72. package/dist/markdown/markdown-frontmatter.js +3 -3
  73. package/dist/markdown/markdown-policy.d.ts +1 -1
  74. package/dist/markdown/ordered-list.js +1 -1
  75. package/dist/primitives/context-menu.d.ts +1 -0
  76. package/dist/primitives/definition-list.js +1 -1
  77. package/dist/primitives/dropdown-menu.d.ts +1 -0
  78. package/dist/primitives/emoji-picker.js +1 -1
  79. package/dist/primitives/expandable-search.d.ts +57 -0
  80. package/dist/primitives/expandable-search.js +58 -0
  81. package/dist/primitives/favicon-avatar.js +1 -1
  82. package/dist/primitives/file-tree.d.ts +1 -1
  83. package/dist/primitives/file-tree.js +1 -1
  84. package/dist/primitives/glyph-picker.js +2 -2
  85. package/dist/primitives/input-group.js +1 -1
  86. package/dist/primitives/menu-base.d.ts +10 -0
  87. package/dist/primitives/menu-base.js +7 -2
  88. package/dist/primitives/phone-input.js +1 -1
  89. package/dist/primitives/profile-hover-card.d.ts +28 -0
  90. package/dist/primitives/profile-hover-card.js +22 -0
  91. package/dist/primitives/settings-section-header.d.ts +5 -5
  92. package/dist/primitives/settings-section-header.js +5 -5
  93. package/dist/primitives/sort-menu.d.ts +23 -0
  94. package/dist/primitives/sort-menu.js +54 -0
  95. package/dist/primitives/tabs.js +1 -1
  96. package/dist/primitives/toast-clearance.d.ts +12 -28
  97. package/dist/primitives/toast-clearance.js +23 -45
  98. package/dist/primitives/user-avatar.js +2 -3
  99. package/dist/session/agents/subagent-dialog-content.js +28 -70
  100. package/dist/session/composer/ComposerCard.d.ts +4 -1
  101. package/dist/session/composer/ComposerCard.js +51 -7
  102. package/dist/session/composer/composer-chat-input.js +3 -1
  103. package/dist/session/composer/composer-toolbar.d.ts +3 -1
  104. package/dist/session/composer/composer-toolbar.js +6 -2
  105. package/dist/session/composer/composer-underbar.d.ts +3 -1
  106. package/dist/session/composer/composer-underbar.js +2 -2
  107. package/dist/session/composer/composer.d.ts +12 -0
  108. package/dist/session/composer/composer.js +112 -6
  109. package/dist/session/composer/draft/composer-draft.d.ts +1 -0
  110. package/dist/session/composer/draft/composer-draft.js +10 -2
  111. package/dist/session/composer/draft/draft-uploads.js +13 -2
  112. package/dist/session/composer/draft/use-composer-draft.d.ts +2 -0
  113. package/dist/session/composer/draft/use-composer-draft.js +41 -6
  114. package/dist/session/composer/drive-mentions.d.ts +34 -0
  115. package/dist/session/composer/drive-mentions.js +98 -0
  116. package/dist/session/composer/editor/composer-editor.d.ts +3 -0
  117. package/dist/session/composer/editor/composer-editor.js +3 -1
  118. package/dist/session/composer/editor/serialize.js +3 -4
  119. package/dist/session/composer/menus/mention-controller.d.ts +3 -0
  120. package/dist/session/composer/menus/mention-controller.js +5 -0
  121. package/dist/session/composer/menus/mention-menu.d.ts +20 -3
  122. package/dist/session/composer/menus/mention-menu.js +33 -6
  123. package/dist/session/composer/menus/menu-items.d.ts +16 -1
  124. package/dist/session/composer/menus/menu-items.js +21 -1
  125. package/dist/session/composer/submit-latch.d.ts +3 -1
  126. package/dist/session/composer/submit-latch.js +5 -1
  127. package/dist/session/composer/types.d.ts +9 -2
  128. package/dist/session/header/session-changes-indicator.js +1 -1
  129. package/dist/session/header/session-site-header.js +2 -2
  130. package/dist/session/media/sandbox-url-detector.js +3 -3
  131. package/dist/session/models/model-connection-gate.d.ts +5 -0
  132. package/dist/session/models/model-connection-gate.js +12 -3
  133. package/dist/session/models/model-connection-layout.d.ts +7 -0
  134. package/dist/session/models/model-connection-layout.js +7 -0
  135. package/dist/session/models/provider-failure-recovery.js +1 -1
  136. package/dist/session/models/subscription-offer.d.ts +6 -5
  137. package/dist/session/models/subscription-offer.js +6 -6
  138. package/dist/session/panel/advanced/advanced-panel.js +1 -1
  139. package/dist/session/panel/session-detail-panel.js +1 -1
  140. package/dist/session/panel/session-diff-viewer.js +1 -1
  141. package/dist/session/panel/session-files-explorer.js +1 -1
  142. package/dist/session/panel/session-files-panel.js +3 -3
  143. package/dist/session/panel/shared/action-navigator.js +1 -1
  144. package/dist/session/status/provisioning-failure.d.ts +4 -4
  145. package/dist/session/status/provisioning-failure.js +4 -4
  146. package/dist/session/status/session-busy-indicator.js +1 -1
  147. package/dist/session/status/session-error-banner.js +6 -1
  148. package/dist/session/thread/mention-chip.d.ts +1 -1
  149. package/dist/session/thread/mention-segments.d.ts +4 -2
  150. package/dist/session/thread/mention-segments.js +28 -1
  151. package/dist/session/thread/message-parsing.d.ts +11 -0
  152. package/dist/session/thread/message-parsing.js +22 -3
  153. package/dist/session/thread/optimistic-turn.d.ts +4 -2
  154. package/dist/session/thread/optimistic-turn.js +13 -11
  155. package/dist/session/thread/session-chat.js +6 -1
  156. package/dist/session/thread/session-context-message-explorer.js +1 -1
  157. package/dist/session/thread/session-older-autoload.d.ts +2 -3
  158. package/dist/session/thread/session-older-autoload.js +2 -3
  159. package/dist/session/thread/transcript.js +8 -10
  160. package/dist/session/tool/shared/error-and-connector.js +1 -1
  161. package/dist/session/tool/shared/file-list.js +2 -2
  162. package/dist/session/tool/shared/infrastructure-parts.js +1 -1
  163. package/dist/session/tool/shared/infrastructure-preview.js +1 -1
  164. package/dist/session/tool/shared/infrastructure-row-header.js +3 -3
  165. package/dist/session/tool/shared/infrastructure-rows.js +2 -2
  166. package/dist/session/tool/shared/output-block.js +4 -4
  167. package/dist/session/tool/shared/session-helpers.js +3 -3
  168. package/dist/session/tool/shared/structured-output.js +3 -3
  169. package/dist/session/tool/shared/todo-helpers.js +1 -1
  170. package/dist/session/tool/tool-error.js +2 -2
  171. package/dist/session/tool/tools/agent-spawn-tool.js +3 -3
  172. package/dist/session/tool/tools/agent-status-tool.js +1 -1
  173. package/dist/session/tool/tools/apply-patch-tool.js +1 -1
  174. package/dist/session/tool/tools/connector-get-tool.js +1 -1
  175. package/dist/session/tool/tools/connector-list-tool.js +1 -1
  176. package/dist/session/tool/tools/connector-tools.js +1 -1
  177. package/dist/session/tool/tools/edit-tool.js +1 -1
  178. package/dist/session/tool/tools/get-mem-tool.js +1 -1
  179. package/dist/session/tool/tools/glob-tool.js +1 -1
  180. package/dist/session/tool/tools/image-search-tool.js +1 -1
  181. package/dist/session/tool/tools/memory-search-tool.js +1 -1
  182. package/dist/session/tool/tools/memory-tool.js +4 -4
  183. package/dist/session/tool/tools/presentation-gen-tool.js +2 -2
  184. package/dist/session/tool/tools/project-delete-tool.js +1 -1
  185. package/dist/session/tool/tools/project-list-tool.js +1 -1
  186. package/dist/session/tool/tools/pty-read-tool.js +1 -1
  187. package/dist/session/tool/tools/pty-spawn-tool.js +1 -1
  188. package/dist/session/tool/tools/pty-write-tool.js +1 -1
  189. package/dist/session/tool/tools/read-tool.js +1 -1
  190. package/dist/session/tool/tools/removed-connector-tool.js +1 -1
  191. package/dist/session/tool/tools/scrape-webpage-tool.js +1 -1
  192. package/dist/session/tool/tools/session-get-tool.js +3 -3
  193. package/dist/session/tool/tools/session-list-background-tool.js +1 -1
  194. package/dist/session/tool/tools/session-read-tool.js +1 -1
  195. package/dist/session/tool/tools/session-search-tool.js +1 -1
  196. package/dist/session/tool/tools/session-spawn-tool.js +1 -1
  197. package/dist/session/tool/tools/skill-tool.js +1 -1
  198. package/dist/session/tool/tools/todo-write-tool.js +1 -1
  199. package/dist/session/tool/tools/web-fetch-tool.js +1 -1
  200. package/dist/session/tool/tools/write-tool.js +1 -1
  201. package/dist/session/turn/activity-file-chips.js +7 -3
  202. package/dist/session/turn/activity-step.js +1 -1
  203. package/dist/session/turn/burst-summary-trigger.js +3 -3
  204. package/dist/session/turn/chain-step-trigger.js +1 -1
  205. package/dist/session/turn/plan-card.js +1 -1
  206. package/dist/session/turn/thought-chain-step.js +1 -1
  207. package/dist/session/turn/turn-work-accordion.js +1 -1
  208. package/dist/session/turn/user-message.js +13 -6
  209. package/dist/session/voice/use-call-card-position.d.ts +30 -0
  210. package/dist/session/voice/use-call-card-position.js +126 -0
  211. package/dist/session/voice/voice-call-card.js +10 -3
  212. package/dist/styles/theme.css +12 -0
  213. package/dist/styles/tokens.css +12 -6
  214. package/dist/styles.css +1 -1
  215. package/dist/terminal/session-terminal-panel.js +1 -1
  216. package/dist/test-utils/intl.d.ts +131 -8
  217. package/dist/workspace/admin/project-admin-dashboard.js +7 -24
  218. package/dist/workspace/calendar/calendar-page.js +1 -1
  219. package/dist/workspace/home/first-chat.d.ts +4 -3
  220. package/dist/workspace/home/first-chat.js +6 -6
  221. package/dist/workspace/home/welcome-body.js +2 -2
  222. package/dist/workspace/index.d.ts +1 -1
  223. package/dist/workspace/index.js +1 -1
  224. package/dist/workspace/layout/project-home.js +9 -3
  225. package/dist/workspace/layout/use-project-home-send.d.ts +3 -1
  226. package/dist/workspace/layout/use-project-home-send.js +6 -2
  227. package/dist/workspace/memory/company-memory-page.js +2 -4
  228. package/dist/workspace/new/github-source.js +0 -1
  229. package/dist/workspace/new/new-workspace-form.d.ts +0 -1
  230. package/dist/workspace/new/new-workspace-form.js +0 -3
  231. package/dist/workspace/new/use-create-workspace.d.ts +1 -1
  232. package/dist/workspace/new/use-create-workspace.js +1 -2
  233. package/dist/workspace/session-spaces/space-detail-page.d.ts +35 -0
  234. package/dist/workspace/session-spaces/space-detail-page.js +307 -0
  235. package/dist/workspace/session-spaces/space-form-modal.d.ts +16 -0
  236. package/dist/workspace/session-spaces/space-form-modal.js +92 -0
  237. package/dist/workspace/session-spaces/space-icon.d.ts +36 -0
  238. package/dist/workspace/session-spaces/space-icon.js +52 -0
  239. package/dist/workspace/session-spaces/space-people.d.ts +51 -0
  240. package/dist/workspace/session-spaces/space-people.js +91 -0
  241. package/dist/workspace/session-spaces/space-picker.d.ts +11 -0
  242. package/dist/workspace/session-spaces/space-picker.js +42 -0
  243. package/dist/workspace/session-spaces/space-share-modal.d.ts +14 -0
  244. package/dist/workspace/session-spaces/space-share-modal.js +93 -0
  245. package/dist/workspace/session-spaces/spaces-page.d.ts +8 -0
  246. package/dist/workspace/session-spaces/spaces-page.js +125 -0
  247. package/dist/workspace/sessions/session-owner-filters.d.ts +2 -0
  248. package/dist/workspace/sessions/session-owner-filters.js +2 -0
  249. package/dist/workspace/sidebar/footer/project-artifacts-nav.js +1 -1
  250. package/dist/workspace/sidebar/footer/project-promo-cards.d.ts +7 -2
  251. package/dist/workspace/sidebar/footer/project-promo-cards.js +4 -3
  252. package/dist/workspace/sidebar/footer/project-sandbox-alert.js +1 -1
  253. package/dist/workspace/sidebar/footer/promo-card.d.ts +10 -1
  254. package/dist/workspace/sidebar/footer/promo-card.js +31 -2
  255. package/dist/workspace/sidebar/modal/session-people-picker.d.ts +13 -0
  256. package/dist/workspace/sidebar/modal/session-people-picker.js +72 -0
  257. package/dist/workspace/sidebar/modal/share-session-modal.js +2 -1
  258. package/dist/workspace/sidebar/project-nav-items.d.ts +1 -3
  259. package/dist/workspace/sidebar/project-nav-items.js +3 -8
  260. package/dist/workspace/sidebar/project-session-list.js +19 -12
  261. package/dist/workspace/sidebar/project-sidebar.js +13 -13
  262. package/dist/workspace/sidebar/project-spaces-nav.js +1 -2
  263. package/dist/workspace/sidebar/session-filter-menu.js +19 -13
  264. package/dist/workspace/sidebar/session-group-sections.d.ts +12 -12
  265. package/dist/workspace/sidebar/session-group-sections.js +56 -75
  266. package/dist/workspace/sidebar/sidebar-more-group.js +1 -1
  267. package/dist/workspace/sidebar/workspace-settings-sidebar-nav.js +2 -2
  268. package/dist/workspace/spaces/space-tabs.d.ts +26 -6
  269. package/dist/workspace/spaces/space-tabs.js +19 -8
  270. package/package.json +27 -31
  271. package/skills/kortix-ui/references/modules.md +2 -2
  272. package/dist/workspace/new/clone-param.d.ts +0 -11
  273. package/dist/workspace/new/clone-param.js +0 -15
  274. package/dist/workspace/new/provision-new-workspace.d.ts +0 -14
  275. package/dist/workspace/new/provision-new-workspace.js +0 -14
  276. package/dist/workspace/sidebar/footer/project-inbox-nav.d.ts +0 -8
  277. package/dist/workspace/sidebar/footer/project-inbox-nav.js +0 -29
@@ -0,0 +1,91 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { listProjectAccess } from '@kortix/sdk';
4
+ import { contract, qk } from '@kortix/sdk/react';
5
+ import { LockSimpleIcon, UsersThreeIcon } from '@phosphor-icons/react';
6
+ import { useQuery } from '@tanstack/react-query';
7
+ import { useTranslations } from '../../i18n/index.js';
8
+ import { cn } from '../../lib/utils.js';
9
+ import { UserAvatar } from '../../primitives/user-avatar.js';
10
+ export function spaceAudience(space) {
11
+ if (space.visibility === 'project')
12
+ return { kind: 'everyone' };
13
+ const members = space.member_ids ?? [];
14
+ if (members.length === 0)
15
+ return { kind: 'private' };
16
+ return { kind: 'people', ids: [space.created_by, ...members].filter((id) => !!id) };
17
+ }
18
+ /** The audience in words: "Everyone in this workspace", "Only you", "Shared with 3 people". */
19
+ export function useSpaceAudienceLabel(space) {
20
+ const t = useTranslations('sessionSpaces');
21
+ const audience = spaceAudience(space);
22
+ if (audience.kind === 'everyone')
23
+ return t('visibility');
24
+ if (audience.kind === 'private')
25
+ return space.can_manage === true ? t('onlyYou') : t('private');
26
+ return t('sharedWith', { count: audience.ids.length - 1 });
27
+ }
28
+ /**
29
+ * The space's own people (creator, then members) with their profiles, as the
30
+ * API returns them on the space: every viewer of the space can read these,
31
+ * unlike the workspace access list, which only managers can.
32
+ */
33
+ export function spacePeople(space) {
34
+ const out = new Map();
35
+ for (const person of space.people ?? []) {
36
+ out.set(person.user_id, { email: person.email ?? '', name: person.name?.trim() || null, avatarUrl: person.avatar_url });
37
+ }
38
+ return out;
39
+ }
40
+ /** The workspace's people by id, for avatars: email, name and picture. A viewer who may not read the list gets an empty map. */
41
+ export function useWorkspacePeople(projectId, enabled) {
42
+ const access = useQuery({
43
+ queryKey: qk.project.access(projectId),
44
+ queryFn: () => listProjectAccess(projectId),
45
+ enabled,
46
+ retry: false,
47
+ ...contract('inventory'),
48
+ });
49
+ const people = new Map();
50
+ for (const member of access.data?.members ?? []) {
51
+ people.set(member.user_id, { email: member.email ?? '', name: member.name?.trim() || null, avatarUrl: member.avatar_url ?? null });
52
+ }
53
+ return people;
54
+ }
55
+ /**
56
+ * Who sees the space, drawn small: up to `max` avatars and "+N", the people
57
+ * glyph for the whole workspace, a lock for its creator alone. A viewer who
58
+ * may not read the people list sees the count beside the people glyph, never
59
+ * a "?" avatar.
60
+ */
61
+ export function SpaceAudienceMark({ space, max = 4, className }) {
62
+ const audience = spaceAudience(space);
63
+ const people = spacePeople(space);
64
+ if (audience.kind === 'everyone')
65
+ return _jsx(UsersThreeIcon, { "aria-hidden": true, className: cn('text-muted-foreground size-4 shrink-0', className) });
66
+ if (audience.kind === 'private')
67
+ return _jsx(LockSimpleIcon, { "aria-hidden": true, className: cn('text-muted-foreground size-4 shrink-0', className) });
68
+ const shown = audience.ids.slice(0, max);
69
+ if (!shown.every((id) => people.has(id))) {
70
+ return (_jsxs("span", { "aria-hidden": true, className: cn('text-muted-foreground flex items-center gap-1 text-xs tabular-nums', className), children: [_jsx(UsersThreeIcon, { className: "size-4 shrink-0" }), audience.ids.length] }));
71
+ }
72
+ return (_jsxs("span", { "aria-hidden": true, className: cn('flex items-center', className), children: [shown.map((id, index) => {
73
+ const person = people.get(id);
74
+ return (_jsx("span", { className: cn('ring-background rounded-sm ring-2', index > 0 && '-ml-1.5'), children: _jsx(UserAvatar, { email: person.email, name: person.name ?? person.email, avatarUrl: person.avatarUrl, colorKey: id, size: "xs" }) }, id));
75
+ }), audience.ids.length > max ? _jsxs("span", { className: "text-muted-foreground ml-1.5 text-xs tabular-nums", children: ["+", audience.ids.length - max] }) : null] }));
76
+ }
77
+ /** A space's people in the shape of the session header's avatar stack (`SessionParticipantStack`), creator first. */
78
+ export function spaceParticipants(space) {
79
+ const people = space.people ?? [];
80
+ return {
81
+ participants: people.map((person) => ({
82
+ user_id: person.user_id,
83
+ name: person.name,
84
+ email: person.email,
85
+ avatar_url: person.avatar_url,
86
+ is_viewer: false,
87
+ })),
88
+ total: people.length,
89
+ multi_user: people.length > 1,
90
+ };
91
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The composer's Space chip (flag `session_groups`): the space a new session
3
+ * is filed in. "No space" files it in none. "New space" creates one and picks
4
+ * it. Renders nothing while the flag is off.
5
+ */
6
+ export declare function SpacePicker({ projectId, value, onChange, }: {
7
+ projectId: string;
8
+ /** The picked space's id; null for no space. */
9
+ value: string | null;
10
+ onChange: (groupId: string | null) => void;
11
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,42 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useFeatureFlag, useWorkspaceSessionGroups } from '@kortix/sdk/react';
4
+ import { CaretDownIcon, CheckIcon, PlusIcon, StackIcon } from '@phosphor-icons/react';
5
+ import { useState } from 'react';
6
+ import { useTranslations } from '../../i18n/index.js';
7
+ import { cn } from '../../lib/utils.js';
8
+ import { Button } from '../../primitives/button.js';
9
+ import { CommandGroup, CommandInput, CommandItem, CommandList, CommandPopover, CommandPopoverContent, CommandPopoverTrigger, CommandSeparator, } from '../../primitives/command.js';
10
+ import { SpaceFormModal } from './space-form-modal.js';
11
+ import { SpaceIcon } from './space-icon.js';
12
+ /** Spaces on screen before the popover shows its search field (it stays mounted for the arrow keys). */
13
+ const SEARCH_THRESHOLD = 8;
14
+ /**
15
+ * The composer's Space chip (flag `session_groups`): the space a new session
16
+ * is filed in. "No space" files it in none. "New space" creates one and picks
17
+ * it. Renders nothing while the flag is off.
18
+ */
19
+ export function SpacePicker({ projectId, value, onChange, }) {
20
+ const t = useTranslations('sessionSpaces');
21
+ const enabled = useFeatureFlag(projectId, 'session_groups').enabled;
22
+ const groups = useWorkspaceSessionGroups(enabled ? projectId : null);
23
+ const [open, setOpen] = useState(false);
24
+ const [creating, setCreating] = useState(false);
25
+ const [search, setSearch] = useState('');
26
+ if (!enabled)
27
+ return null;
28
+ const spaces = groups.data ?? [];
29
+ const picked = value ? (spaces.find((space) => space.group_id === value) ?? null) : null;
30
+ const query = search.trim().toLowerCase();
31
+ const shown = query ? spaces.filter((space) => space.name.toLowerCase().includes(query)) : spaces;
32
+ const pick = (groupId) => {
33
+ onChange(groupId);
34
+ setOpen(false);
35
+ setSearch('');
36
+ };
37
+ const row = (space) => (_jsxs(CommandItem, { value: `space-${space.group_id}`, className: "gap-2", onSelect: () => pick(space.group_id), children: [_jsx(SpaceIcon, { space: space, size: "sm", className: "size-5 rounded-[calc(var(--radius)-3px)]" }), _jsx("span", { className: "min-w-0 flex-1 truncate", children: space.name }), space.group_id === value ? _jsx(CheckIcon, { className: "text-foreground size-4 shrink-0" }) : null] }, space.group_id));
38
+ return (_jsxs(_Fragment, { children: [_jsxs(CommandPopover, { open: open, onOpenChange: setOpen, children: [_jsx(CommandPopoverTrigger, { children: _jsxs(Button, { type: "button", variant: "ghost", size: "sm", "aria-label": picked ? `${t('picker')}: ${picked.name}` : t('picker'), className: cn('rounded-lg hit-area-y-3', picked ? 'text-foreground' : 'text-muted-foreground'), children: [picked ? _jsx(SpaceIcon, { space: picked, size: "sm", className: "size-5 rounded-[calc(var(--radius)-3px)]" }) : _jsx(StackIcon, { className: "size-4 shrink-0" }), _jsx("span", { className: "max-w-[140px] truncate", children: picked ? picked.name : t('picker') }), _jsx(CaretDownIcon, { className: cn('size-3 transition-transform duration-moderate ease-out', open && 'rotate-180') })] }) }), _jsxs(CommandPopoverContent, { side: "top", align: "start", sideOffset: 8, className: "w-[min(300px,calc(100vw-1.5rem))]", children: [_jsx("div", { className: spaces.length > SEARCH_THRESHOLD ? undefined : 'sr-only', children: _jsx(CommandInput, { compact: true, placeholder: t('pickerSearch'), value: search, onValueChange: setSearch }) }), _jsx(CommandList, { className: "max-h-[320px]", children: _jsxs(CommandGroup, { forceMount: true, className: "[&_[cmdk-group-items]]:flex [&_[cmdk-group-items]]:flex-col [&_[cmdk-group-items]]:gap-px", children: [query ? null : (_jsxs(CommandItem, { value: "space-none", className: "gap-2", onSelect: () => pick(null), children: [_jsx("span", { className: "text-muted-foreground min-w-0 flex-1 truncate", children: t('pickerNone') }), value === null ? _jsx(CheckIcon, { className: "text-foreground size-4 shrink-0" }) : null] })), shown.map(row), query && shown.length === 0 ? (_jsx("div", { className: "text-muted-foreground py-6 text-center text-xs", children: t('pickerEmpty') })) : null, _jsx(CommandSeparator, { className: "my-1" }), _jsxs(CommandItem, { value: "space-new", className: "gap-2", onSelect: () => {
39
+ setOpen(false);
40
+ setCreating(true);
41
+ }, children: [_jsx(PlusIcon, { className: "size-4 shrink-0" }), _jsx("span", { className: "min-w-0 flex-1 truncate", children: t('newSpace') })] })] }) })] })] }), _jsx(SpaceFormModal, { projectId: projectId, space: null, open: creating, onOpenChange: setCreating, onSaved: (space) => onChange(space.group_id) })] }));
42
+ }
@@ -0,0 +1,14 @@
1
+ import { type ProjectSessionGroup } from '@kortix/sdk';
2
+ /**
3
+ * Share a space. Every change saves at once; there is no Save button.
4
+ * Add people, the people with access (the creator is Owner, the rest can be
5
+ * removed after a confirm), general access (only the people added, or the
6
+ * whole workspace: "everyone" clears the list) and the space's link.
7
+ * Whoever it is shared with sees every session in it and its Files folder.
8
+ */
9
+ export declare function SpaceShareModal({ projectId, space, open, onOpenChange, }: {
10
+ projectId: string;
11
+ space: ProjectSessionGroup;
12
+ open: boolean;
13
+ onOpenChange: (open: boolean) => void;
14
+ }): import("react").JSX.Element;
@@ -0,0 +1,93 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { ApiError } from '@kortix/sdk';
4
+ import { useSetWorkspaceSessionGroupSharing } from '@kortix/sdk/react';
5
+ import { LockSimpleIcon, TrashIcon, UsersThreeIcon } from '@phosphor-icons/react';
6
+ import { useMemo, useState } from 'react';
7
+ import { SHARE_GROUP, ShareAddField, ShareGeneralAccess, ShareLinkField, ShareRole, ShareRoleMenu, ShareRow, ShareSection, } from '../../access/share-dialog.js';
8
+ import { useTranslations } from '../../i18n/index.js';
9
+ import { uiRoutes } from '../../lib/routes.js';
10
+ import { ConfirmDialog } from '../../primitives/confirm-dialog.js';
11
+ import { Modal, ModalBody, ModalContent, ModalHeader, ModalTitle } from '../../primitives/modal.js';
12
+ import { errorToast, successToast } from '../../primitives/toast.js';
13
+ import { spacePeople, useWorkspacePeople } from './space-people.js';
14
+ function sharingOf(space) {
15
+ return { visibility: space.visibility === 'project' ? 'project' : 'private', member_ids: [...(space.member_ids ?? [])] };
16
+ }
17
+ function candidateOf(id, person) {
18
+ return {
19
+ id,
20
+ kind: 'member',
21
+ label: person?.name ?? person?.email ?? id,
22
+ sublabel: person?.name ? person.email : null,
23
+ email: person?.email ?? null,
24
+ avatarUrl: person?.avatarUrl ?? null,
25
+ };
26
+ }
27
+ /**
28
+ * Share a space. Every change saves at once; there is no Save button.
29
+ * Add people, the people with access (the creator is Owner, the rest can be
30
+ * removed after a confirm), general access (only the people added, or the
31
+ * whole workspace: "everyone" clears the list) and the space's link.
32
+ * Whoever it is shared with sees every session in it and its Files folder.
33
+ */
34
+ export function SpaceShareModal({ projectId, space, open, onOpenChange, }) {
35
+ const t = useTranslations('sessionSpaces');
36
+ const share = useSetWorkspaceSessionGroupSharing(projectId);
37
+ const people = useWorkspacePeople(projectId, open);
38
+ // Rows read the space's own people first: they carry profiles even before the workspace list loads.
39
+ const own = spacePeople(space);
40
+ const personOf = (id) => own.get(id) ?? people.get(id);
41
+ const [removing, setRemoving] = useState(null);
42
+ // The pending write is what the dialog shows, so a change never flickers back.
43
+ const sharing = share.isPending && share.variables?.groupId === space.group_id
44
+ ? { visibility: share.variables.input.visibility, member_ids: share.variables.input.member_ids ?? [] }
45
+ : sharingOf(space);
46
+ const everyone = sharing.visibility === 'project';
47
+ const creator = space.created_by;
48
+ const save = async (next) => {
49
+ try {
50
+ await share.mutateAsync({
51
+ groupId: space.group_id,
52
+ input: next.visibility === 'project' ? { visibility: 'project' } : { visibility: 'private', member_ids: next.member_ids },
53
+ });
54
+ successToast(t('shared'));
55
+ return true;
56
+ }
57
+ catch (error) {
58
+ const code = error instanceof ApiError ? error.code : undefined;
59
+ errorToast(code === 'not_a_member' ? t('shareNotMember') : t('shareFailed'));
60
+ return false;
61
+ }
62
+ };
63
+ const candidates = useMemo(() => [...people].map(([id, person]) => candidateOf(id, person)), [people]);
64
+ const excludeIds = useMemo(() => new Set([creator, ...sharing.member_ids].filter((id) => !!id)), [creator, sharing.member_ids]);
65
+ const href = uiRoutes().sessionSpace?.(projectId, space.group_id);
66
+ const link = href && typeof window !== 'undefined' ? `${window.location.origin}${href}` : null;
67
+ const copy = async () => {
68
+ if (!link)
69
+ return;
70
+ try {
71
+ await navigator.clipboard.writeText(link);
72
+ successToast(t('linkCopied'));
73
+ }
74
+ catch {
75
+ errorToast(t('linkCopyFailed'));
76
+ }
77
+ };
78
+ const removingPerson = removing ? personOf(removing) : undefined;
79
+ return (_jsxs(_Fragment, { children: [_jsx(Modal, { open: open, onOpenChange: onOpenChange, children: _jsxs(ModalContent, { className: "lg:max-w-lg", children: [_jsx(ModalHeader, { children: _jsx(ModalTitle, { children: t('shareTitle', { name: space.name }) }) }), _jsxs(ModalBody, { className: "space-y-5", children: [_jsx(ShareAddField, { candidates: candidates, excludeIds: excludeIds, onShare: (picked) => save({ visibility: 'private', member_ids: [...sharing.member_ids, ...picked.map((candidate) => candidate.id)] }), pending: share.isPending, disabled: everyone, placeholder: everyone ? t('shareEveryoneHint') : t('shareAddPlaceholder'), shareLabel: t('share'), removeLabel: t('shareRemove'), onUnknownEmails: () => errorToast(t('shareNotMember')) }), _jsx(ShareSection, { label: t('sharePeopleWithAccess'), children: _jsxs("ul", { className: SHARE_GROUP, children: [creator ? _jsx(ShareRow, { candidate: candidateOf(creator, personOf(creator)), trailing: _jsx(ShareRole, { children: t('shareOwner') }) }) : null, everyone
80
+ ? null
81
+ : sharing.member_ids.map((id) => (_jsx(ShareRow, { candidate: candidateOf(id, personOf(id)), trailing: _jsx(ShareRoleMenu, { label: t('roleMember'), removeLabel: t('shareRemove'), removeIcon: _jsx(TrashIcon, {}), onRemove: () => setRemoving(id), disabled: share.isPending }) }, id)))] }) }), _jsx(ShareSection, { label: t('shareGeneralAccess'), children: _jsx(ShareGeneralAccess, { value: sharing.visibility, changeLabel: t('shareChange'), disabled: share.isPending, onChange: (next) => void save({ visibility: next, member_ids: [] }), options: [
82
+ { value: 'private', label: t('shareRestricted'), hint: t('shareRestrictedHint'), icon: _jsx(LockSimpleIcon, {}) },
83
+ { value: 'project', label: t('shareEveryone'), hint: t('shareEveryoneHint'), icon: _jsx(UsersThreeIcon, {}) },
84
+ ] }) }), link ? _jsx(ShareLinkField, { link: link, copyLabel: t('copyLink'), onCopy: () => void copy() }) : null] })] }) }), _jsx(ConfirmDialog, { open: removing !== null, onOpenChange: (next) => {
85
+ if (!next)
86
+ setRemoving(null);
87
+ }, title: t('shareRemoveTitle'), description: t('shareRemoveDescription', { name: removingPerson?.name ?? removingPerson?.email ?? '' }), confirmLabel: t('shareRemove'), confirmVariant: "destructive", isPending: share.isPending, onConfirm: () => {
88
+ const id = removing;
89
+ if (!id)
90
+ return;
91
+ void save({ visibility: 'private', member_ids: sharing.member_ids.filter((other) => other !== id) }).then(() => setRemoving(null));
92
+ } })] }));
93
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The workspace's Spaces (flag `session_groups`) as one list: a header bar
3
+ * (sort, search, New space), then the spaces the viewer made and the spaces
4
+ * shared with them, each a collapsible group of one-line rows.
5
+ */
6
+ export declare function SpacesPage({ projectId }: {
7
+ projectId: string;
8
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,125 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useFeatureFlag, useWorkspaceSessionGroups } from '@kortix/sdk/react';
4
+ import { CaretDownIcon, DotsThreeIcon, LockSimpleIcon, MagnifyingGlassIcon, PlusIcon, StackIcon, UsersIcon, UsersThreeIcon, } from '@phosphor-icons/react';
5
+ import { formatDistanceToNowStrict } from 'date-fns';
6
+ import { useState } from 'react';
7
+ import { FeatureGateScreen } from '../../customize/shared/feature-gate-screen.js';
8
+ import { useTranslations } from '../../i18n/index.js';
9
+ import { ProjectPageHeader } from '../../internal/layout/project-page-header.js';
10
+ import { uiRoutes } from '../../lib/routes.js';
11
+ import { Button } from '../../primitives/button.js';
12
+ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../../primitives/collapsible.js';
13
+ import { EmptyArt } from '../../primitives/empty-art.js';
14
+ import { EmptyState } from '../../primitives/empty-state.js';
15
+ import { ErrorState } from '../../primitives/error-state.js';
16
+ import { ExpandableSearch } from '../../primitives/expandable-search.js';
17
+ import { Skeleton } from '../../primitives/skeleton.js';
18
+ import { SortMenu, useStoredSort } from '../../primitives/sort-menu.js';
19
+ import { UiLink as Link, useUiRouter, useUiViewerId } from '../../providers/ui-provider.js';
20
+ import { SpaceSettingsMenu } from './space-detail-page.js';
21
+ import { SpaceFormModal } from './space-form-modal.js';
22
+ import { SpaceIconBare } from './space-icon.js';
23
+ import { spaceAudience, spaceParticipants } from './space-people.js';
24
+ import { SessionParticipantStack } from '../../session/participants/session-participants.js';
25
+ const SORTS = ['activity', 'name', 'created'];
26
+ const SORT_STORAGE_KEY = 'kortix:spaces-sort';
27
+ const SKELETON_KEYS = ['a', 'b', 'c', 'd', 'e'];
28
+ /**
29
+ * The workspace's Spaces (flag `session_groups`) as one list: a header bar
30
+ * (sort, search, New space), then the spaces the viewer made and the spaces
31
+ * shared with them, each a collapsible group of one-line rows.
32
+ */
33
+ export function SpacesPage({ projectId }) {
34
+ const t = useTranslations('sessionSpaces');
35
+ const flag = useFeatureFlag(projectId, 'session_groups');
36
+ const groups = useWorkspaceSessionGroups(flag.enabled ? projectId : null);
37
+ const viewerId = useUiViewerId();
38
+ const router = useUiRouter();
39
+ const [search, setSearch] = useState('');
40
+ const [sort, setSort] = useStoredSort(SORT_STORAGE_KEY, SORTS, 'activity');
41
+ const [creating, setCreating] = useState(false);
42
+ const [editing, setEditing] = useState(null);
43
+ if (flag.isLoading)
44
+ return null;
45
+ if (!flag.enabled) {
46
+ return _jsx(FeatureGateScreen, { featureKey: "session_groups", featureName: t('title'), description: t('gateDescription') });
47
+ }
48
+ const spaces = groups.data ?? [];
49
+ const query = search.trim().toLowerCase();
50
+ const shown = sortSpaces(query
51
+ ? spaces.filter((space) => space.name.toLowerCase().includes(query) || (space.description ?? '').toLowerCase().includes(query))
52
+ : spaces, sort);
53
+ // Without a known viewer every space counts as theirs: one group, no empty "Shared" header.
54
+ const mine = shown.filter((space) => !viewerId || space.created_by === viewerId);
55
+ const shared = shown.filter((space) => viewerId && space.created_by !== viewerId);
56
+ const open = (space) => {
57
+ const href = uiRoutes().sessionSpace?.(projectId, space.group_id);
58
+ if (href)
59
+ router.push(href);
60
+ };
61
+ const sortLabel = { activity: t('sortActivity'), name: t('sortName'), created: t('sortCreated') };
62
+ let body;
63
+ if (groups.isLoading) {
64
+ body = (_jsx("ul", { "aria-hidden": true, className: "space-y-1 px-3", children: SKELETON_KEYS.map((key) => (_jsxs("li", { className: "flex h-11 items-center gap-3", children: [_jsx(Skeleton, { className: "size-6 shrink-0 rounded-md py-0" }), _jsx(Skeleton, { className: "h-3.5 w-40 py-0" })] }, key))) }));
65
+ }
66
+ else if (groups.isError) {
67
+ body = (_jsx(ErrorState, { size: "sm", title: t('loadFailed'), action: _jsx(Button, { variant: "outline", size: "sm", onClick: () => void groups.refetch(), children: t('tryAgain') }) }));
68
+ }
69
+ else if (spaces.length === 0) {
70
+ body = _jsx(EmptyState, { media: _jsx(EmptyArt, { icon: StackIcon }), title: t('emptyTitle'), description: t('emptyDescription') });
71
+ }
72
+ else if (shown.length === 0) {
73
+ body = (_jsx(EmptyState, { media: _jsx(EmptyArt, { icon: MagnifyingGlassIcon }), title: t('noResultsTitle'), description: t('noResultsDescription') }));
74
+ }
75
+ else {
76
+ body = (_jsxs("div", { className: "space-y-1", children: [mine.length > 0 ? (_jsx(SpaceGroup, { label: t('yourSpaces'), spaces: mine, projectId: projectId, onEdit: setEditing })) : null, shared.length > 0 ? (_jsx(SpaceGroup, { label: t('sharedWithYou'), spaces: shared, projectId: projectId, onEdit: setEditing })) : null] }));
77
+ }
78
+ return (
79
+ // Capped at the screen height so the header bar stays put and only the list scrolls.
80
+ _jsxs("div", { className: "bg-background flex h-svh max-h-svh min-h-0 flex-1 flex-col overflow-clip", children: [_jsxs(ProjectPageHeader, { title: t('title'), children: [spaces.length > 0 ? (_jsxs(_Fragment, { children: [_jsx(ExpandableSearch, { value: search, onValueChange: setSearch, label: t('searchPlaceholder'), size: "sm", buttonVariant: "outline", className: "w-40 sm:w-56" }), _jsx(SortMenu, { value: sort, onValueChange: setSort, options: SORTS.map((mode) => ({ value: mode, label: sortLabel[mode] })), label: t('sortBy', { mode: sortLabel[sort] }) })] })) : null, _jsxs(Button, { size: "sm", className: "gap-1.5", onClick: () => setCreating(true), children: [_jsx(PlusIcon, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "hidden sm:inline", children: t('newSpace') })] })] }), _jsx("div", { className: "min-h-0 flex-1 overflow-y-auto px-2 py-2 sm:px-3", children: body }), _jsx(SpaceFormModal, { projectId: projectId, space: null, open: creating, onOpenChange: setCreating, onSaved: open }), _jsx(SpaceFormModal, { projectId: projectId, space: editing, open: editing !== null, onOpenChange: (next) => {
81
+ if (!next)
82
+ setEditing(null);
83
+ } })] }));
84
+ }
85
+ /** A filled header that folds its rows away, with how many it holds. */
86
+ function SpaceGroup({ label, spaces, projectId, onEdit, }) {
87
+ return (_jsxs(Collapsible, { defaultOpen: true, children: [_jsxs(CollapsibleTrigger, { className: "group/trigger bg-muted/60 text-muted-foreground hover:text-foreground duration-fast flex h-9 w-full items-center gap-2 rounded-md px-3 text-sm transition-colors", children: [_jsx("span", { className: "truncate", children: label }), _jsx("span", { className: "text-muted-foreground tabular-nums", children: spaces.length }), _jsx(CaretDownIcon, { "aria-hidden": true, className: "duration-fast ml-auto size-3.5 shrink-0 transition-transform ease-out group-data-[state=closed]/trigger:-rotate-90" })] }), _jsx(CollapsibleContent, { children: _jsx("ul", { className: "py-1", children: spaces.map((space) => (_jsx(SpaceRow, { projectId: projectId, space: space, onEdit: () => onEdit(space) }, space.group_id))) }) })] }));
88
+ }
89
+ /**
90
+ * One space on one line: its icon and name, then fixed columns on the right
91
+ * (who is in it, who can open it, when it last moved, its menu) so every row
92
+ * lines up. The menu shows on hover or focus, and always on touch.
93
+ */
94
+ function SpaceRow({ projectId, space, onEdit }) {
95
+ const t = useTranslations('sessionSpaces');
96
+ const href = uiRoutes().sessionSpace?.(projectId, space.group_id);
97
+ const audience = spaceAudience(space);
98
+ const when = relativeTime(space.last_activity_at ?? space.updated_at);
99
+ if (!href)
100
+ return null;
101
+ let access;
102
+ if (audience.kind === 'everyone')
103
+ access = { icon: _jsx(UsersThreeIcon, { className: "size-3.5" }), label: t('everyone') };
104
+ else if (audience.kind === 'private')
105
+ access = { icon: _jsx(LockSimpleIcon, { className: "size-3.5" }), label: t('private') };
106
+ else
107
+ access = { icon: _jsx(UsersIcon, { className: "size-3.5" }), label: t('sharedShort') };
108
+ return (_jsxs("li", { className: "group/row hover:bg-hover focus-within:bg-hover duration-fast flex items-center rounded-md pr-2 transition-colors", children: [_jsxs(Link, { href: href, prefetch: true, className: "focus-visible:ring-ring flex h-11 min-w-0 flex-1 items-center gap-3 rounded-md px-3 outline-none focus-visible:ring-2", children: [_jsx(SpaceIconBare, { space: space, className: "size-5 text-base" }), _jsx("span", { className: "text-foreground min-w-0 flex-1 truncate text-sm first-letter:uppercase", children: space.name }), audience.kind === 'people' ? (_jsx("span", { className: "hidden sm:flex", children: _jsx(SessionParticipantStack, { participants: spaceParticipants(space), label: t('peopleCount', { count: space.people?.length ?? 0 }) }) })) : null, _jsxs("span", { className: "text-muted-foreground hidden w-24 shrink-0 items-center gap-1.5 text-xs sm:flex", children: [access.icon, _jsx("span", { className: "truncate", children: access.label })] }), _jsx("span", { className: "text-muted-foreground w-28 shrink-0 text-right text-xs whitespace-nowrap tabular-nums", children: when })] }), _jsx("span", { className: "ml-1 flex w-7 shrink-0 items-center justify-center", children: space.can_manage === true ? (_jsx(SpaceSettingsMenu, { projectId: projectId, space: space, onEdit: onEdit, trigger: _jsx(Button, { variant: "ghost", size: "icon-xs", "aria-label": t('options'), className: "text-muted-foreground hover:text-foreground duration-fast opacity-0 transition-opacity group-hover/row:opacity-100 group-focus-within/row:opacity-100 pointer-coarse:opacity-100 data-[state=open]:opacity-100", children: _jsx(DotsThreeIcon, { weight: "bold", className: "size-4" }) }) })) : null })] }));
109
+ }
110
+ function sortSpaces(spaces, sort) {
111
+ const sorted = [...spaces];
112
+ if (sort === 'name')
113
+ return sorted.sort((a, b) => a.name.localeCompare(b.name, undefined, { sensitivity: 'base' }));
114
+ if (sort === 'created')
115
+ return sorted.sort((a, b) => b.created_at.localeCompare(a.created_at));
116
+ const moved = (space) => space.last_activity_at ?? space.updated_at;
117
+ return sorted.sort((a, b) => moved(b).localeCompare(moved(a)));
118
+ }
119
+ /** "3h ago" from an ISO time; empty when it does not parse. */
120
+ function relativeTime(iso) {
121
+ const at = new Date(iso);
122
+ if (Number.isNaN(at.getTime()))
123
+ return null;
124
+ return formatDistanceToNowStrict(at, { addSuffix: true });
125
+ }
@@ -23,6 +23,8 @@ export interface SessionOwnerFacetOption {
23
23
  value: string;
24
24
  name: string | null;
25
25
  email: string | null;
26
+ /** Their profile picture; null when they have none. */
27
+ avatarUrl?: string | null;
26
28
  /** The viewer's own sessions. Rendered as "You" and listed first. */
27
29
  isViewer: boolean;
28
30
  count: number;
@@ -50,12 +50,14 @@ export function resolveOwnerFacetOptions(sessions, activeOwners) {
50
50
  existing.count += 1;
51
51
  existing.name ??= session.owner_name ?? null;
52
52
  existing.email ??= session.owner_email ?? null;
53
+ existing.avatarUrl ??= session.owner_avatar_url ?? null;
53
54
  continue;
54
55
  }
55
56
  byOwner.set(key, {
56
57
  value: key,
57
58
  name: session.owner_name ?? null,
58
59
  email: session.owner_email ?? null,
60
+ avatarUrl: session.owner_avatar_url ?? null,
59
61
  isViewer: key !== UNKNOWN_OWNER_KEY && session.is_owner === true,
60
62
  count: 1,
61
63
  });
@@ -56,7 +56,7 @@ export function ProjectArtifactsNavItem({ projectId }) {
56
56
  card.setOpen(next);
57
57
  if (!next)
58
58
  setQuery('');
59
- }, children: [_jsx(PopoverAnchor, { virtualRef: card.anchorRef }), _jsxs(ProjectNavRow, { active: pathname?.startsWith(href) === true, label: t('artifacts'), href: href, prefetch: true, ...card.rowProps, children: [_jsx("span", { className: "shrink-0", children: _jsx(CardsThreeIcon, {}) }), t('artifacts')] }), _jsxs(NavHoverCardContent, { ...card.contentProps, children: [showSearch ? (_jsx("div", { className: "border-border border-b p-1", children: _jsxs(InputGroupSearch, { children: [_jsx(InputGroupSearchIcon, { children: _jsx(MagnifyingGlassIcon, {}) }), _jsx(InputGroupSearchInput, { ref: searchRef, variant: "popover", size: "xs", value: query, onChange: (event) => setQuery(event.target.value), placeholder: t('searchArtifacts'), "aria-label": t('searchArtifacts') })] }) })) : null, _jsxs(NavHoverCardList, { className: "max-h-80 overflow-x-hidden overflow-y-auto overscroll-contain", children: [shown.map((artifact) => (_jsx("li", { children: _jsx(ArtifactRow, { artifact: artifact, href: `${href}/${encodeURIComponent(artifact.artifact_id)}`, onOpen: close }) }, artifact.artifact_id))), shown.length === 0 ? (_jsx("li", { className: menuRow('sm', 'default', 'text-muted-foreground pointer-events-none'), children: t('appsNoMatches') })) : null] })] })] }));
59
+ }, children: [_jsx(PopoverAnchor, { virtualRef: card.anchorRef }), _jsxs(ProjectNavRow, { active: pathname?.startsWith(href) === true, label: t('artifacts'), href: href, prefetch: true, ...card.rowProps, children: [_jsx("span", { className: "shrink-0", children: _jsx(CardsThreeIcon, {}) }), t('artifacts')] }), _jsxs(NavHoverCardContent, { ...card.contentProps, className: "w-80", children: [showSearch ? (_jsx("div", { className: "border-border border-b p-1", children: _jsxs(InputGroupSearch, { children: [_jsx(InputGroupSearchIcon, { children: _jsx(MagnifyingGlassIcon, {}) }), _jsx(InputGroupSearchInput, { ref: searchRef, variant: "popover", size: "xs", value: query, onChange: (event) => setQuery(event.target.value), placeholder: t('searchArtifacts'), "aria-label": t('searchArtifacts') })] }) })) : null, _jsxs(NavHoverCardList, { className: "max-h-80 overflow-x-hidden overflow-y-auto overscroll-contain", children: [shown.map((artifact) => (_jsx("li", { children: _jsx(ArtifactRow, { artifact: artifact, href: `${href}/${encodeURIComponent(artifact.artifact_id)}`, onOpen: close }) }, artifact.artifact_id))), shown.length === 0 ? (_jsx("li", { className: menuRow('sm', 'default', 'text-muted-foreground pointer-events-none'), children: t('appsNoMatches') })) : null] })] })] }));
60
60
  }
61
61
  /** One artifact: its type glyph and its title. */
62
62
  /** The desktop tab strip is mounted (apps/web/src/features/desktop-tabs/desktop-tabs-gate.tsx). */
@@ -1,6 +1,7 @@
1
1
  import type { ReactNode } from 'react';
2
2
  /**
3
- * The sidebar's one promo card. Every way to reach Kortix from somewhere else
3
+ * The workspace's one promo card: in the sidebar on a phone, floating in the
4
+ * window's bottom-right corner on desktop. Every way to reach Kortix from somewhere else
4
5
  * is a slide, in this order: the chat apps people already use (MCP), their
5
6
  * own computer, Chrome, the desktop app, the phone app. Each slide is
6
7
  * dismissed on its own and leaves once it is done (a paired computer, a
@@ -10,8 +11,12 @@ import type { ReactNode } from 'react';
10
11
  * The computer and Chrome slides read a list from the API, so they mount only
11
12
  * while they are not dismissed (`ComputerPromoSlide`, `ChromePromoSlide`).
12
13
  */
13
- export declare function ProjectPromoCards({ projectId, onOpenMcp, onOpenComputer, onOpenChrome, onOpenDownloadApp, }: {
14
+ export declare function ProjectPromoCards({ projectId, onOpenMcp, onOpenComputer, onOpenChrome, onOpenDownloadApp, variant, composer, }: {
14
15
  projectId: string;
16
+ /** `floating` pins the card to the window's bottom-right corner (desktop). */
17
+ variant?: 'inline' | 'floating';
18
+ /** Floating only: the page's bottom composer (see `PromoSwitcher`). */
19
+ composer?: 'centered' | 'full';
15
20
  onOpenMcp: () => void;
16
21
  onOpenComputer: () => void;
17
22
  /** Absent when Kortix in Chrome is off for this workspace. */
@@ -8,7 +8,8 @@ import { usePhoneAppPromo } from './project-phone-app-nav.js';
8
8
  import { PromoSwitcher } from './promo-card.js';
9
9
  import { useTranslations } from '../../../i18n/index.js';
10
10
  /**
11
- * The sidebar's one promo card. Every way to reach Kortix from somewhere else
11
+ * The workspace's one promo card: in the sidebar on a phone, floating in the
12
+ * window's bottom-right corner on desktop. Every way to reach Kortix from somewhere else
12
13
  * is a slide, in this order: the chat apps people already use (MCP), their
13
14
  * own computer, Chrome, the desktop app, the phone app. Each slide is
14
15
  * dismissed on its own and leaves once it is done (a paired computer, a
@@ -18,14 +19,14 @@ import { useTranslations } from '../../../i18n/index.js';
18
19
  * The computer and Chrome slides read a list from the API, so they mount only
19
20
  * while they are not dismissed (`ComputerPromoSlide`, `ChromePromoSlide`).
20
21
  */
21
- export function ProjectPromoCards({ projectId, onOpenMcp, onOpenComputer, onOpenChrome, onOpenDownloadApp, }) {
22
+ export function ProjectPromoCards({ projectId, onOpenMcp, onOpenComputer, onOpenChrome, onOpenDownloadApp, variant = 'inline', composer, }) {
22
23
  const t = useTranslations('sidebar');
23
24
  const mcp = useMcpPromo(onOpenMcp);
24
25
  const desktop = useDesktopAppPromo(onOpenDownloadApp);
25
26
  const phone = usePhoneAppPromo(onOpenDownloadApp);
26
27
  const [computerDismissed, dismissComputer] = useComputerPromoDismissed();
27
28
  const [chromeDismissed, dismissChrome] = useChromePromoDismissed();
28
- const render = (computer, chrome) => (_jsx(PromoSwitcher, { label: t('promos'), slides: [mcp, computer, chrome, desktop, phone].filter((slide) => slide !== null) }));
29
+ const render = (computer, chrome) => (_jsx(PromoSwitcher, { label: t('promos'), variant: variant, composer: composer, slides: [mcp, computer, chrome, desktop, phone].filter((slide) => slide !== null) }));
29
30
  const withChrome = (computer) => !onOpenChrome || chromeDismissed ? (render(computer, null)) : (_jsx(ChromePromoSlide, { onOpenConnect: onOpenChrome, onDismiss: dismissChrome, children: (chrome) => render(computer, chrome) }));
30
31
  if (computerDismissed)
31
32
  return withChrome(null);
@@ -93,7 +93,7 @@ function SandboxAlertContent({ projectId, health, severity, }) {
93
93
  /* Grouped by SPACE, not a hairline — the card already carries two
94
94
  (the tray's and the trigger's). `mt-2.5` against the sentence's own
95
95
  leading is the 2x gap that reads as a new group on its own. */
96
- _jsxs("div", { className: "mt-2.5 space-y-1", children: [_jsxs("p", { className: "text-xs leading-5", children: [_jsx("span", { className: cn('font-medium', CATEGORY_TEXT[tone]), children: CATEGORY_LABEL[failure.error_category ?? 'unknown'] ?? failure.error_category }), failedAt ? (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": true, className: "text-muted-foreground/40", children: ' · ' }), _jsx("span", { className: "text-muted-foreground tabular-nums", children: failedAt })] })) : null] }), _jsx(SidebarAlertText, { children: CATEGORY_CAUSE[failure.error_category ?? 'unknown'] ?? CATEGORY_CAUSE_FALLBACK })] }))] }), hasTray ? (_jsxs(SidebarAlertActions, { children: [recovery?.fix && (_jsxs(Button, { size: "sm", className: ACTION_BUTTON, disabled: fixWithAgent.isPending, onClick: () => fixWithAgent.mutate(), children: [fixWithAgent.isPending ? (_jsx(Loading, { className: "size-3.5 shrink-0" })) : (_jsx(SparklesSolid, { weight: "fill", className: "size-3.5 shrink-0" })), _jsx("span", { className: "truncate", children: tI18nHardcoded.raw('autoFeaturesCoWorkerProjectSidebarFooterProjectSandboxAlertJsxe7d8ac75') })] })), _jsxs("div", { className: "flex flex-col gap-1.5 @2xs/alert:flex-row", children: [recovery ? (_jsxs(Button, { size: "sm", variant: recovery.retryVariant, className: ACTION_BUTTON, disabled: retry.isPending, onClick: () => retry.mutate(failure?.template_slug), children: [retry.isPending ? (_jsx(Loading, { className: "size-3.5 shrink-0" })) : (_jsx(RefreshCw, { className: "size-3.5 shrink-0" })), _jsx("span", { className: "truncate", children: tI18nHardcoded.raw('autoFeaturesCoWorkerProjectSidebarFooterProjectSandboxAlertJsx8794c0a3') })] })) : null, detailsButton] })] })) : null] }));
96
+ _jsxs("div", { className: "mt-2.5 space-y-1", children: [_jsxs("p", { className: "text-xs leading-5", children: [_jsx("span", { className: cn('font-medium', CATEGORY_TEXT[tone]), children: CATEGORY_LABEL[failure.error_category ?? 'unknown'] ?? failure.error_category }), failedAt ? (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": true, className: "text-muted-foreground", children: ' · ' }), _jsx("span", { className: "text-muted-foreground tabular-nums", children: failedAt })] })) : null] }), _jsx(SidebarAlertText, { children: CATEGORY_CAUSE[failure.error_category ?? 'unknown'] ?? CATEGORY_CAUSE_FALLBACK })] }))] }), hasTray ? (_jsxs(SidebarAlertActions, { children: [recovery?.fix && (_jsxs(Button, { size: "sm", className: ACTION_BUTTON, disabled: fixWithAgent.isPending, onClick: () => fixWithAgent.mutate(), children: [fixWithAgent.isPending ? (_jsx(Loading, { className: "size-3.5 shrink-0" })) : (_jsx(SparklesSolid, { weight: "fill", className: "size-3.5 shrink-0" })), _jsx("span", { className: "truncate", children: tI18nHardcoded.raw('autoFeaturesCoWorkerProjectSidebarFooterProjectSandboxAlertJsxe7d8ac75') })] })), _jsxs("div", { className: "flex flex-col gap-1.5 @2xs/alert:flex-row", children: [recovery ? (_jsxs(Button, { size: "sm", variant: recovery.retryVariant, className: ACTION_BUTTON, disabled: retry.isPending, onClick: () => retry.mutate(failure?.template_slug), children: [retry.isPending ? (_jsx(Loading, { className: "size-3.5 shrink-0" })) : (_jsx(RefreshCw, { className: "size-3.5 shrink-0" })), _jsx("span", { className: "truncate", children: tI18nHardcoded.raw('autoFeaturesCoWorkerProjectSidebarFooterProjectSandboxAlertJsx8794c0a3') })] })) : null, detailsButton] })] })) : null] }));
97
97
  }
98
98
  export function ProjectSandboxAlert({ projectId }) {
99
99
  const [isOpen, setIsOpen] = useState(false);
@@ -27,9 +27,18 @@ export interface PromoSlide {
27
27
  * In flow, so a border and no shadow (effects.md); hover is color only. On a
28
28
  * window under 52rem tall the sentence folds away.
29
29
  */
30
- export declare function PromoSwitcher({ slides, label }: {
30
+ export declare function PromoSwitcher({ slides, label, variant, composer, }: {
31
31
  slides: readonly PromoSlide[];
32
32
  label: string;
33
+ /** `floating`: a card pinned to the window's bottom-right corner, over the page. */
34
+ variant?: 'inline' | 'floating';
35
+ /**
36
+ * Floating only: the page's bottom composer. `centered` (home, a session):
37
+ * the card clears it only from a 1700px window, so below that it hides.
38
+ * `full` (chat, DMs, channels, Spaces): the composer runs to the window's
39
+ * right edge, so the card never shows.
40
+ */
41
+ composer?: 'centered' | 'full';
33
42
  }): import("react").JSX.Element | null;
34
43
  /**
35
44
  * One mark on a card's art, with no tile: white under the art's `dark` scope
@@ -1,7 +1,8 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { ArrowRightIcon, XIcon } from '@phosphor-icons/react';
4
- import { useId, useState } from 'react';
4
+ import { useId, useState, useSyncExternalStore } from 'react';
5
+ import { createPortal } from 'react-dom';
5
6
  import Loading from '../../../primitives/loading.js';
6
7
  import { BeamsStill } from '../../../primitives/paper-wallpaper-shaders.js';
7
8
  import { cn } from '../../../internal/lib/utils.js';
@@ -19,13 +20,16 @@ import { cn } from '../../../internal/lib/utils.js';
19
20
  * In flow, so a border and no shadow (effects.md); hover is color only. On a
20
21
  * window under 52rem tall the sentence folds away.
21
22
  */
22
- export function PromoSwitcher({ slides, label }) {
23
+ export function PromoSwitcher({ slides, label, variant = 'inline', composer, }) {
23
24
  const id = useId();
24
25
  const [activeId, setActiveId] = useState(null);
25
26
  if (slides.length === 0)
26
27
  return null;
27
28
  // The chosen slide, or the first one when it was dismissed or none was chosen.
28
29
  const active = slides.find((slide) => slide.id === activeId) ?? slides[0];
30
+ if (variant === 'floating') {
31
+ return (_jsx(FloatingPromo, { id: id, slides: slides, active: active, label: label, composer: composer, onSelect: setActiveId }));
32
+ }
29
33
  return (_jsxs("li", { className: "group/promo relative list-none", role: "region", "aria-roledescription": "carousel", "aria-label": label, children: [_jsx("div", { className: "grid", children: slides.map((slide) => {
30
34
  const current = slide.id === active.id;
31
35
  return (_jsxs("button", { type: "button", disabled: slide.pending, "aria-busy": slide.pending || undefined, "aria-labelledby": `${id}-${slide.id}-title`, "aria-describedby": `${id}-${slide.id}-description`, inert: !current, onClick: slide.onClick, className: cn('bg-background border-border hover:bg-hover focus-visible:ring-ring col-start-1 row-start-1 flex w-full cursor-pointer flex-col overflow-hidden rounded-md border text-left transition-[background-color,opacity] duration-moderate outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-60 motion-reduce:transition-none', !current && 'pointer-events-none opacity-0'), children: [_jsxs("span", { "aria-hidden": "true", className: "dark bg-background relative isolate flex h-16 w-full shrink-0 items-center justify-center gap-4 border-b", children: [_jsx(BeamsStill, {}), _jsx("span", { className: "bg-background/50 absolute inset-0" }), slide.marks] }), _jsxs("span", { className: "flex flex-1 flex-col gap-2 p-3", children: [_jsxs("span", { className: "space-y-1", children: [_jsx("span", { id: `${id}-${slide.id}-title`, className: "text-foreground block text-sm leading-snug font-medium text-balance", children: slide.title }), _jsx("span", { id: `${id}-${slide.id}-description`, className: "text-muted-foreground block text-xs leading-relaxed text-pretty [@media(max-height:52rem)]:hidden", children: slide.description })] }), _jsxs("span", { className: "text-foreground mt-auto inline-flex items-center gap-1 text-xs font-medium", children: [slide.pending ? _jsx(Loading, { className: "size-3.5 shrink-0" }) : null, slide.cta, slide.pending ? null : _jsx(ArrowRightIcon, { className: "size-3 shrink-0" })] })] })] }, slide.id));
@@ -38,6 +42,31 @@ export function PromoSwitcher({ slides, label }) {
38
42
  : 'bg-muted-foreground/40 group-hover/dot:bg-muted-foreground w-1.5') }) }, slide.id));
39
43
  }) })) : null] }));
40
44
  }
45
+ /**
46
+ * The promo card floating in the window's bottom-right corner, over the page:
47
+ * a lifted card (`bg-popover`, `smooth-shadow-ring-lg`, the shadow and its
48
+ * hairline in one) with the art inset in a rounded panel, the close button on
49
+ * the art, then the title, one sentence, the call to action and the dots.
50
+ * Floating, so shadow + hairline (effects.md). Portaled to `document.body` so
51
+ * no sidebar transform or overflow clips it.
52
+ */
53
+ const subscribeNoop = () => () => { };
54
+ function FloatingPromo({ id, slides, active, label, composer, onSelect, }) {
55
+ // `false` on the server and while hydrating, `true` after: the portal mounts
56
+ // only once the page is hydrated, so both passes render the same nothing.
57
+ const hydrated = useSyncExternalStore(subscribeNoop, () => true, () => false);
58
+ if (!hydrated || composer === 'full')
59
+ return null;
60
+ return createPortal(_jsxs("div", { role: "region", "aria-roledescription": "carousel", "aria-label": label, className: cn('bg-popover text-popover-foreground smooth-shadow-ring-lg fixed right-4 bottom-4 z-40 w-80 rounded-xl p-1.5', composer === 'centered' && 'hidden min-[1700px]:block'), children: [_jsx("div", { className: "grid", children: slides.map((slide) => {
61
+ const current = slide.id === active.id;
62
+ return (_jsxs("button", { type: "button", disabled: slide.pending, "aria-busy": slide.pending || undefined, "aria-labelledby": `${id}-${slide.id}-title`, "aria-describedby": `${id}-${slide.id}-description`, inert: !current, onClick: slide.onClick, className: cn('focus-visible:ring-ring col-start-1 row-start-1 flex w-full cursor-pointer flex-col rounded-lg text-left transition-opacity duration-moderate outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-60 motion-reduce:transition-none', !current && 'pointer-events-none opacity-0'), children: [_jsxs("span", { "aria-hidden": "true", className: "dark bg-background relative isolate flex h-28 w-full shrink-0 items-center justify-center gap-5 overflow-hidden rounded-lg", children: [_jsx(BeamsStill, {}), _jsx("span", { className: "bg-background/50 absolute inset-0" }), slide.marks] }), _jsx("span", { className: "flex flex-col px-2 pt-3", children: _jsxs("span", { className: "space-y-1", children: [_jsx("span", { id: `${id}-${slide.id}-title`, className: "text-foreground block text-sm leading-snug font-medium text-balance", children: slide.title }), _jsx("span", { id: `${id}-${slide.id}-description`, className: "text-muted-foreground block text-sm leading-relaxed text-pretty", children: slide.description })] }) })] }, slide.id));
63
+ }) }), _jsx("button", { type: "button", onClick: active.onDismiss, "aria-label": active.dismissLabel, className: "text-foreground hover:bg-active focus-visible:ring-ring dark absolute top-3 right-3 flex size-7 items-center justify-center rounded-md transition-colors duration-fast outline-none focus-visible:ring-2", children: _jsx(XIcon, { className: "size-4" }) }), _jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2 px-2 pt-3 pb-1.5", children: [_jsxs("button", { type: "button", disabled: active.pending, onClick: active.onClick, className: "bg-secondary text-secondary-foreground hover:bg-active focus-visible:ring-ring inline-flex h-8 items-center gap-1.5 rounded-md px-3 text-sm font-medium transition-colors duration-fast outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-60", children: [active.pending ? _jsx(Loading, { className: "size-3.5 shrink-0" }) : null, active.cta, active.pending ? null : _jsx(ArrowRightIcon, { className: "size-3.5 shrink-0" })] }), slides.length > 1 ? (_jsx("div", { className: "flex items-center", children: slides.map((slide) => {
64
+ const current = slide.id === active.id;
65
+ return (_jsx("button", { type: "button", "aria-label": slide.title, "aria-current": current || undefined, onClick: () => onSelect(slide.id), className: "group/dot focus-visible:ring-ring flex size-6 cursor-pointer items-center justify-center rounded-sm outline-none focus-visible:ring-2", children: _jsx("span", { className: cn('h-1.5 rounded-full transition-colors duration-fast', current
66
+ ? 'bg-foreground w-4'
67
+ : 'bg-muted-foreground/40 group-hover/dot:bg-muted-foreground w-1.5') }) }, slide.id));
68
+ }) })) : null] })] }), document.body);
69
+ }
41
70
  /**
42
71
  * One mark on a card's art, with no tile: white under the art's `dark` scope
43
72
  * (`text-foreground`) unless it carries its own brand colors.
@@ -0,0 +1,13 @@
1
+ import { type ProjectSession } from '@kortix/sdk';
2
+ import type { SharingSelection } from '../../../access/sharing-intent.js';
3
+ /**
4
+ * "Specific people" in the session access dialog: add people and groups
5
+ * (several at once) and the people with access, owner first. It edits the
6
+ * dialog's selection only; the dialog's Save writes it.
7
+ */
8
+ export declare function SessionPeoplePicker({ projectId, session, value, onChange, }: {
9
+ projectId: string;
10
+ session: ProjectSession | null;
11
+ value: SharingSelection;
12
+ onChange: (next: SharingSelection) => void;
13
+ }): import("react").JSX.Element;