@nivaro/react 0.2.53 → 0.2.55

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 (294) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +99 -98
  3. package/dist/index.d.ts +452 -4
  4. package/dist/index.js +644 -618
  5. package/dist/layout-editor.d.ts +252 -2
  6. package/dist/shared/components/BackgroundRunOffer.js +117 -0
  7. package/dist/shared/components/BroadcastView.js +214 -213
  8. package/dist/shared/components/CollectionBrowserView.js +2592 -2695
  9. package/dist/shared/components/FormWhatsNew.js +60 -0
  10. package/dist/shared/components/ItemEditForm.js +3968 -3618
  11. package/dist/shared/components/JobsTray.js +100 -55
  12. package/dist/shared/components/MyWorkView.js +91 -89
  13. package/dist/shared/components/NotificationBell.js +80 -79
  14. package/dist/shared/components/ProfileView.js +568 -520
  15. package/dist/shared/components/RecordCompare.js +254 -0
  16. package/dist/shared/components/RecordReadView.js +598 -543
  17. package/dist/shared/components/ReportView.js +578 -543
  18. package/dist/shared/components/RowPresence.js +91 -0
  19. package/dist/shared/components/TipLayer.js +27 -27
  20. package/dist/shared/components/WidgetSlot.js +474 -458
  21. package/dist/shared/components/ai/AiAnalyticsView.js +16 -6
  22. package/dist/shared/components/ai/AskPanel.js +139 -119
  23. package/dist/shared/components/ai/FirstWeekCard.js +126 -0
  24. package/dist/shared/components/bulk/BulkFieldUpdate.js +289 -0
  25. package/dist/shared/components/bulk/bulk-field-options.js +45 -0
  26. package/dist/shared/components/charts/CumulativeFlowChart.js +176 -0
  27. package/dist/shared/components/chat/ChannelArchive.js +326 -0
  28. package/dist/shared/components/chat/ChannelExtras.js +141 -121
  29. package/dist/shared/components/chat/ChatAnalyticsView.js +112 -110
  30. package/dist/shared/components/chat/ChatPanel.js +1695 -1733
  31. package/dist/shared/components/chat/Composer.js +357 -303
  32. package/dist/shared/components/chat/MessageActions.js +92 -0
  33. package/dist/shared/components/chat/MessageFormat.js +290 -264
  34. package/dist/shared/components/chat/OutboxBubbles.js +146 -0
  35. package/dist/shared/components/chat/RequestIdCard.js +135 -0
  36. package/dist/shared/components/chat/RoomHeaderMenu.js +202 -0
  37. package/dist/shared/components/chat/RoomParts.js +213 -274
  38. package/dist/shared/components/chat/ScreenClip.js +184 -0
  39. package/dist/shared/components/chat/chat-core.js +402 -483
  40. package/dist/shared/components/chat/chat-drafts.js +59 -0
  41. package/dist/shared/components/chat/chat-emoji.js +348 -0
  42. package/dist/shared/components/chat/chat-local-time.js +41 -0
  43. package/dist/shared/components/chat/chat-outbox.js +303 -0
  44. package/dist/shared/components/chat/chat-window.js +163 -0
  45. package/dist/shared/components/chat/huddle/HuddleControls.js +143 -0
  46. package/dist/shared/components/chat/huddle/HuddleStage.js +164 -0
  47. package/dist/shared/components/chat/huddle/huddle-store.js +342 -0
  48. package/dist/shared/components/chat/huddle/useHuddle.js +58 -0
  49. package/dist/shared/components/help-videos/api.js +80 -67
  50. package/dist/shared/components/help-videos/editor/DetailsTab.js +147 -130
  51. package/dist/shared/components/item-edit/CatalogPickerField.js +113 -112
  52. package/dist/shared/components/item-edit/ChangeReasonDialog.js +13 -13
  53. package/dist/shared/components/item-edit/FieldAffordances.js +9 -8
  54. package/dist/shared/components/item-edit/FieldRenderer.js +248 -245
  55. package/dist/shared/components/item-edit/FieldRow.js +382 -320
  56. package/dist/shared/components/item-edit/FormHelpVideoButton.js +59 -0
  57. package/dist/shared/components/item-edit/GroupSection.js +786 -639
  58. package/dist/shared/components/item-edit/HeaderTools.js +59 -56
  59. package/dist/shared/components/item-edit/InlineTableField.js +3 -1
  60. package/dist/shared/components/item-edit/LayoutContentBlock.js +47 -24
  61. package/dist/shared/components/item-edit/RelationCombobox.js +186 -176
  62. package/dist/shared/components/item-edit/entry/EntryStrip.js +54 -0
  63. package/dist/shared/components/item-edit/entry/entry-keys.js +27 -0
  64. package/dist/shared/components/item-edit/entry/useEntryKeyboard.js +70 -0
  65. package/dist/shared/components/item-edit/entry/useEntryMode.js +59 -0
  66. package/dist/shared/components/item-edit/form-structure-ui.js +105 -0
  67. package/dist/shared/components/item-edit/lazy-sections.js +36 -0
  68. package/dist/shared/components/item-edit/lock-why.js +94 -0
  69. package/dist/shared/components/item-edit/picker-miss.js +26 -0
  70. package/dist/shared/components/item-edit/placement-behaviour.js +196 -0
  71. package/dist/shared/components/item-edit/useFormUsageBeacon.js +65 -0
  72. package/dist/shared/components/layout-editor/AddPanel.js +226 -151
  73. package/dist/shared/components/layout-editor/ArrangeButton.js +34 -0
  74. package/dist/shared/components/layout-editor/AutoArrange.js +86 -0
  75. package/dist/shared/components/layout-editor/CanvasCompare.js +79 -0
  76. package/dist/shared/components/layout-editor/ChangeNote.js +147 -0
  77. package/dist/shared/components/layout-editor/CollabParts.js +175 -0
  78. package/dist/shared/components/layout-editor/DesignNode.js +311 -116
  79. package/dist/shared/components/layout-editor/EditorCanvas.js +30 -26
  80. package/dist/shared/components/layout-editor/EditorTopBar.js +463 -175
  81. package/dist/shared/components/layout-editor/FindReplace.js +188 -0
  82. package/dist/shared/components/layout-editor/FormMapButton.js +141 -0
  83. package/dist/shared/components/layout-editor/HistoryPanel.js +250 -109
  84. package/dist/shared/components/layout-editor/LayoutEditor.js +1196 -305
  85. package/dist/shared/components/layout-editor/LayoutsRail.js +94 -67
  86. package/dist/shared/components/layout-editor/NoteMarker.js +38 -0
  87. package/dist/shared/components/layout-editor/PlacementsTable.js +187 -0
  88. package/dist/shared/components/layout-editor/RestorePiece.js +143 -0
  89. package/dist/shared/components/layout-editor/ScheduleChange.js +106 -0
  90. package/dist/shared/components/layout-editor/SessionHistory.js +84 -0
  91. package/dist/shared/components/layout-editor/StagedChip.js +22 -0
  92. package/dist/shared/components/layout-editor/StructureMenu.js +464 -0
  93. package/dist/shared/components/layout-editor/UnsavedConfirm.js +103 -0
  94. package/dist/shared/components/layout-editor/ai/AiToolsButton.js +625 -0
  95. package/dist/shared/components/layout-editor/ai/ChangeCheck.js +153 -0
  96. package/dist/shared/components/layout-editor/ai/ai-tools-api.js +80 -0
  97. package/dist/shared/components/layout-editor/ai/assist-ops.js +38 -0
  98. package/dist/shared/components/layout-editor/ai/autofill-ops.js +73 -0
  99. package/dist/shared/components/layout-editor/ai/canvas-capture.js +41 -0
  100. package/dist/shared/components/layout-editor/ai-forms/AiComposer.js +271 -0
  101. package/dist/shared/components/layout-editor/ai-forms/AiFormsButton.js +182 -0
  102. package/dist/shared/components/layout-editor/ai-forms/MeaningSuggestions.js +109 -0
  103. package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +170 -0
  104. package/dist/shared/components/layout-editor/ai-forms/ai-forms-api.js +40 -0
  105. package/dist/shared/components/layout-editor/ai-forms/pending.js +25 -0
  106. package/dist/shared/components/layout-editor/ai-forms/plan.js +263 -0
  107. package/dist/shared/components/layout-editor/ai-rules/AiAskPopover.js +160 -0
  108. package/dist/shared/components/layout-editor/ai-rules/CascadeWriter.js +175 -0
  109. package/dist/shared/components/layout-editor/ai-rules/FieldRuleWriter.js +97 -0
  110. package/dist/shared/components/layout-editor/ai-rules/RuleWriter.js +94 -0
  111. package/dist/shared/components/layout-editor/ai-rules/ValidationSuggest.js +153 -0
  112. package/dist/shared/components/layout-editor/ai-rules/api.js +6 -0
  113. package/dist/shared/components/layout-editor/ai-text/AiTextTools.js +383 -0
  114. package/dist/shared/components/layout-editor/ai-text/text-ops.js +125 -0
  115. package/dist/shared/components/layout-editor/assist/AskPanel.js +278 -0
  116. package/dist/shared/components/layout-editor/assist/ExplainDiff.js +93 -0
  117. package/dist/shared/components/layout-editor/assist/ProposalsButton.js +150 -0
  118. package/dist/shared/components/layout-editor/assist/assist-api.js +63 -0
  119. package/dist/shared/components/layout-editor/assist/jump.js +142 -0
  120. package/dist/shared/components/layout-editor/assist/settings-index.js +118 -0
  121. package/dist/shared/components/layout-editor/auto-arrange.js +101 -0
  122. package/dist/shared/components/layout-editor/bulk/BulkChangesButton.js +221 -0
  123. package/dist/shared/components/layout-editor/bulk/BulkRun.js +237 -0
  124. package/dist/shared/components/layout-editor/bulk/MacrosPanel.js +230 -0
  125. package/dist/shared/components/layout-editor/bulk/bulk-api.js +65 -0
  126. package/dist/shared/components/layout-editor/bulk/field-labels.js +22 -0
  127. package/dist/shared/components/layout-editor/bulk/macro-record.js +142 -0
  128. package/dist/shared/components/layout-editor/bulk/useMacroRecorder.js +65 -0
  129. package/dist/shared/components/layout-editor/bundle-to-active.js +1 -0
  130. package/dist/shared/components/layout-editor/canvas-diff.js +157 -0
  131. package/dist/shared/components/layout-editor/collab/FormFollowShare.js +388 -0
  132. package/dist/shared/components/layout-editor/collab/collab-api.js +80 -0
  133. package/dist/shared/components/layout-editor/commands/CommandPalette.js +221 -0
  134. package/dist/shared/components/layout-editor/commands/intents.js +214 -0
  135. package/dist/shared/components/layout-editor/commands/parse.js +242 -0
  136. package/dist/shared/components/layout-editor/design-context.js +26 -6
  137. package/dist/shared/components/layout-editor/dnd/LayoutDndProvider.js +181 -164
  138. package/dist/shared/components/layout-editor/dnd/collision.js +25 -23
  139. package/dist/shared/components/layout-editor/dnd/node.js +69 -57
  140. package/dist/shared/components/layout-editor/dnd/rail-drop.js +56 -0
  141. package/dist/shared/components/layout-editor/draft-recovery.js +131 -0
  142. package/dist/shared/components/layout-editor/editor-notes.js +78 -0
  143. package/dist/shared/components/layout-editor/editors/swap-config.js +1 -0
  144. package/dist/shared/components/layout-editor/entry/PlacementPresets.js +149 -0
  145. package/dist/shared/components/layout-editor/entry/entry-editor-context.js +10 -0
  146. package/dist/shared/components/layout-editor/entry/presets.js +71 -0
  147. package/dist/shared/components/layout-editor/entry/tab-order.js +110 -0
  148. package/dist/shared/components/layout-editor/entry/theme-preview.js +37 -0
  149. package/dist/shared/components/layout-editor/explain/CanvasRules.js +142 -0
  150. package/dist/shared/components/layout-editor/explain/default-ghosts.js +81 -0
  151. package/dist/shared/components/layout-editor/explain/driver-hover.js +62 -0
  152. package/dist/shared/components/layout-editor/explain/field-sources.js +246 -0
  153. package/dist/shared/components/layout-editor/explain/rule-graph.js +215 -0
  154. package/dist/shared/components/layout-editor/explain/use-explain.js +132 -0
  155. package/dist/shared/components/layout-editor/field-zones.js +116 -0
  156. package/dist/shared/components/layout-editor/form-map.js +138 -0
  157. package/dist/shared/components/layout-editor/grid-guides.js +142 -0
  158. package/dist/shared/components/layout-editor/history-api.js +87 -0
  159. package/dist/shared/components/layout-editor/inheritance.js +55 -0
  160. package/dist/shared/components/layout-editor/inspect/inspect-api.js +66 -0
  161. package/dist/shared/components/layout-editor/inspect/picker-preview.js +48 -0
  162. package/dist/shared/components/layout-editor/inspect/width-fit.js +87 -0
  163. package/dist/shared/components/layout-editor/inspector/AiFillSetting.js +85 -0
  164. package/dist/shared/components/layout-editor/inspector/BehaviourSettings.js +402 -0
  165. package/dist/shared/components/layout-editor/inspector/Breadcrumb.js +36 -0
  166. package/dist/shared/components/layout-editor/inspector/BulkInspector.js +179 -0
  167. package/dist/shared/components/layout-editor/inspector/ColumnFit.js +112 -0
  168. package/dist/shared/components/layout-editor/inspector/GroupInspector.js +291 -141
  169. package/dist/shared/components/layout-editor/inspector/HelpTab.js +174 -0
  170. package/dist/shared/components/layout-editor/inspector/Inspector.js +282 -180
  171. package/dist/shared/components/layout-editor/inspector/LookTab.js +166 -109
  172. package/dist/shared/components/layout-editor/inspector/OverrideNotice.js +61 -0
  173. package/dist/shared/components/layout-editor/inspector/PickerMisses.js +129 -0
  174. package/dist/shared/components/layout-editor/inspector/PickerPreview.js +134 -0
  175. package/dist/shared/components/layout-editor/inspector/PickerTab.js +146 -118
  176. package/dist/shared/components/layout-editor/inspector/RulesTab.js +162 -111
  177. package/dist/shared/components/layout-editor/inspector/Translations.js +156 -0
  178. package/dist/shared/components/layout-editor/inspector/kit.js +71 -70
  179. package/dist/shared/components/layout-editor/inspector/tab-request.js +21 -0
  180. package/dist/shared/components/layout-editor/is-typing.js +9 -0
  181. package/dist/shared/components/layout-editor/keyboard-move.js +66 -0
  182. package/dist/shared/components/layout-editor/lint/LintPanel.js +190 -0
  183. package/dist/shared/components/layout-editor/lint/lint-api.js +52 -0
  184. package/dist/shared/components/layout-editor/load-error.js +37 -0
  185. package/dist/shared/components/layout-editor/matrix/FieldStateMatrix.js +305 -0
  186. package/dist/shared/components/layout-editor/matrix/MatrixGrid.js +181 -0
  187. package/dist/shared/components/layout-editor/matrix/RoleSectionMatrix.js +147 -0
  188. package/dist/shared/components/layout-editor/matrix/matrix-api.js +48 -0
  189. package/dist/shared/components/layout-editor/matrix/role-matrix.js +36 -0
  190. package/dist/shared/components/layout-editor/matrix/state-matrix.js +145 -0
  191. package/dist/shared/components/layout-editor/nav/FindPanel.js +109 -0
  192. package/dist/shared/components/layout-editor/nav/NavTools.js +114 -0
  193. package/dist/shared/components/layout-editor/nav/OutlinePanel.js +228 -0
  194. package/dist/shared/components/layout-editor/nav/ShortcutSheet.js +31 -0
  195. package/dist/shared/components/layout-editor/nav/find.js +20 -0
  196. package/dist/shared/components/layout-editor/nav/tree.js +142 -0
  197. package/dist/shared/components/layout-editor/nav/useEditorNav.js +101 -0
  198. package/dist/shared/components/layout-editor/nav/view-prefs.js +34 -0
  199. package/dist/shared/components/layout-editor/ops/ChangeRequestsPanel.js +143 -0
  200. package/dist/shared/components/layout-editor/ops/DependencyDiagram.js +179 -0
  201. package/dist/shared/components/layout-editor/ops/LayoutOpsBlocks.js +92 -0
  202. package/dist/shared/components/layout-editor/ops/PromotePanel.js +287 -0
  203. package/dist/shared/components/layout-editor/ops/ops-api.js +122 -0
  204. package/dist/shared/components/layout-editor/outputs/OutputsButton.js +254 -0
  205. package/dist/shared/components/layout-editor/outputs/help-sheet.js +154 -0
  206. package/dist/shared/components/layout-editor/outputs/output-api.js +61 -0
  207. package/dist/shared/components/layout-editor/overview/OverviewActions.js +15 -3
  208. package/dist/shared/components/layout-editor/overview/describe-conditions.js +24 -14
  209. package/dist/shared/components/layout-editor/overview/overview-api.js +105 -88
  210. package/dist/shared/components/layout-editor/overview/purpose.js +15 -13
  211. package/dist/shared/components/layout-editor/panel-style.js +8 -7
  212. package/dist/shared/components/layout-editor/parity-keys.json.js +4 -0
  213. package/dist/shared/components/layout-editor/pin.js +25 -0
  214. package/dist/shared/components/layout-editor/presence.js +111 -0
  215. package/dist/shared/components/layout-editor/preview/PreviewModes.js +224 -0
  216. package/dist/shared/components/layout-editor/preview/PreviewPanes.js +262 -0
  217. package/dist/shared/components/layout-editor/preview/preview-api.js +57 -0
  218. package/dist/shared/components/layout-editor/preview/preview-model.js +157 -0
  219. package/dist/shared/components/layout-editor/restore-piece.js +192 -0
  220. package/dist/shared/components/layout-editor/reuse/FieldMapStep.js +70 -0
  221. package/dist/shared/components/layout-editor/reuse/FormMoreMenu.js +127 -0
  222. package/dist/shared/components/layout-editor/reuse/LibraryRows.js +150 -0
  223. package/dist/shared/components/layout-editor/reuse/NewFormStart.js +20 -0
  224. package/dist/shared/components/layout-editor/reuse/SectionReuseActions.js +291 -0
  225. package/dist/shared/components/layout-editor/reuse/field-match.js +77 -0
  226. package/dist/shared/components/layout-editor/reuse/reuse-api.js +73 -0
  227. package/dist/shared/components/layout-editor/reuse/seed.js +13 -0
  228. package/dist/shared/components/layout-editor/reuse/useFormFromRecord.js +43 -0
  229. package/dist/shared/components/layout-editor/reuse/useRailCopy.js +34 -0
  230. package/dist/shared/components/layout-editor/section-structure.js +241 -0
  231. package/dist/shared/components/layout-editor/settings/EntrySection.js +296 -0
  232. package/dist/shared/components/layout-editor/settings/FormSettings.js +125 -103
  233. package/dist/shared/components/layout-editor/settings/InheritanceSection.js +1 -1
  234. package/dist/shared/components/layout-editor/settings/ResolveSettings.js +255 -0
  235. package/dist/shared/components/layout-editor/settings/ToolsSection.js +215 -105
  236. package/dist/shared/components/layout-editor/settings/WhoSection.js +139 -100
  237. package/dist/shared/components/layout-editor/settings/controls.js +8 -8
  238. package/dist/shared/components/layout-editor/settings/settings-registry.js +142 -21
  239. package/dist/shared/components/layout-editor/shortcuts.js +88 -0
  240. package/dist/shared/components/layout-editor/show-when.js +35 -0
  241. package/dist/shared/components/layout-editor/slot-names.js +4 -3
  242. package/dist/shared/components/layout-editor/staged-api.js +64 -0
  243. package/dist/shared/components/layout-editor/structure-ops.js +403 -0
  244. package/dist/shared/components/layout-editor/testing/CostLimitSetting.js +42 -0
  245. package/dist/shared/components/layout-editor/testing/TestingPanels.js +556 -0
  246. package/dist/shared/components/layout-editor/testing/testing-api.js +67 -0
  247. package/dist/shared/components/layout-editor/testing/testing-model.js +406 -0
  248. package/dist/shared/components/layout-editor/testing/use-record-check.js +44 -0
  249. package/dist/shared/components/layout-editor/toolbar-kit.js +242 -0
  250. package/dist/shared/components/layout-editor/unsaved-marks.js +72 -0
  251. package/dist/shared/components/layout-editor/usage/AbTestSection.js +355 -0
  252. package/dist/shared/components/layout-editor/usage/FillChip.js +27 -0
  253. package/dist/shared/components/layout-editor/usage/UsagePanel.js +232 -0
  254. package/dist/shared/components/layout-editor/usage/ab-api.js +86 -0
  255. package/dist/shared/components/layout-editor/usage/suggest-collapse.js +32 -0
  256. package/dist/shared/components/layout-editor/usage/suggest-sections.js +55 -0
  257. package/dist/shared/components/layout-editor/usage/usage-api.js +104 -0
  258. package/dist/shared/components/layout-editor/useLayoutDraft.js +573 -306
  259. package/dist/shared/components/notifications/NotificationAnalyticsView.js +148 -77
  260. package/dist/shared/components/panels/ErpFailureBanner.js +18 -17
  261. package/dist/shared/components/panels/ExternalRequestsChip.js +63 -62
  262. package/dist/shared/components/pipeline/PipelineEditorView.js +106 -104
  263. package/dist/shared/components/profile/AgentsPanel.js +479 -0
  264. package/dist/shared/components/queue/QueueWorklist.js +1026 -1040
  265. package/dist/shared/components/support/SuggestFormChange.js +143 -0
  266. package/dist/shared/components/support/SupportAnalytics.js +171 -0
  267. package/dist/shared/components/support/SupportView.js +75 -73
  268. package/dist/shared/lib/ai-fill.js +37 -0
  269. package/dist/shared/lib/background-runs.js +150 -0
  270. package/dist/shared/lib/delivery-ack.js +9 -0
  271. package/dist/shared/lib/entry-badge-style.js +13 -0
  272. package/dist/shared/lib/entry-config.js +71 -0
  273. package/dist/shared/lib/form-sections.js +64 -0
  274. package/dist/shared/lib/form-structure.js +99 -0
  275. package/dist/shared/lib/form-usage-beacon.js +133 -0
  276. package/dist/shared/lib/jobs-tray.js +25 -23
  277. package/dist/shared/lib/keyset-pager.js +37 -0
  278. package/dist/shared/lib/layout-i18n.js +66 -0
  279. package/dist/shared/lib/layout-lint.js +490 -0
  280. package/dist/shared/lib/layout-ops.js +116 -110
  281. package/dist/shared/lib/layout-resolve.js +113 -0
  282. package/dist/shared/lib/placement-behaviour.js +144 -0
  283. package/dist/shared/lib/prefetch.js +149 -0
  284. package/dist/shared/lib/presence-hooks.js +199 -0
  285. package/dist/shared/lib/record-outbox.js +82 -81
  286. package/dist/shared/lib/replay-socket.js +93 -0
  287. package/dist/shared/lib/request-gate.js +51 -50
  288. package/dist/shared/lib/room-gaps.js +96 -0
  289. package/dist/shared/lib/screenshot.js +54 -28
  290. package/dist/shared/lib/search-log.js +27 -0
  291. package/dist/shared/lib/socket-realtime.js +101 -80
  292. package/dist/shared/lib/visible-when.js +34 -0
  293. package/dist/shared/lib/worker-socket.js +200 -0
  294. package/package.json +1 -1
@@ -1,57 +1,59 @@
1
- import { jsxs as t, jsx as e, Fragment as z } from "react/jsx-runtime";
2
- import { Megaphone as H, X as O, Link2 as F, Plus as G, Check as M, UserPlus as X, History as q } from "lucide-react";
3
- import { useState as b } from "react";
4
- import { toast as w } from "sonner";
5
- import { cn as i, formatRelative as K } from "../../lib/utils.js";
6
- import { Command as T, CommandInput as $, CommandList as U, CommandEmpty as R, CommandGroup as _, CommandItem as L } from "../ui/command.js";
7
- import { Popover as I, PopoverTrigger as J, PopoverContent as j } from "../ui/popover.js";
8
- import { useChannelAdmin as Q, useChatRoles as D } from "./chat-core.js";
9
- import { useTeams as V, useBulkInvite as Y, useChannelAudit as Z } from "./chat-hooks.js";
10
- function P(l, s) {
11
- var o;
12
- return ((o = l == null ? void 0 : l.response) == null ? void 0 : o.error) ?? s;
1
+ import { jsxs as t, jsx as e, Fragment as H } from "react/jsx-runtime";
2
+ import { Megaphone as M, X as $, Link2 as G, Plus as X, Check as q, UserPlus as K, History as Q } from "lucide-react";
3
+ import { useState as p } from "react";
4
+ import { toast as C } from "sonner";
5
+ import { cn as d, formatRelative as V } from "../../lib/utils.js";
6
+ import { Command as U, CommandInput as R, CommandList as I, CommandEmpty as J, CommandGroup as L, CommandItem as P } from "../ui/command.js";
7
+ import { Popover as W, PopoverTrigger as j, PopoverContent as D } from "../ui/popover.js";
8
+ import { SimpleSelect as Y } from "../ui/SimpleSelect.js";
9
+ import { useChannelAdmin as Z, useChatRoles as B } from "./chat-core.js";
10
+ import { useTeams as ee, useBulkInvite as te, useChannelAudit as ae } from "./chat-hooks.js";
11
+ function A(l, s) {
12
+ var r;
13
+ return ((r = l == null ? void 0 : l.response) == null ? void 0 : r.error) ?? s;
13
14
  }
14
- function ce({
15
+ function ue({
15
16
  channel: l,
16
17
  th: s,
17
- isAdmin: o
18
+ isAdmin: r
18
19
  }) {
19
- const { update: p } = Q(l.id), f = D(), [g, r] = b(!!l.announce), [u, y] = b(l.description ?? ""), [c, h] = b(l.links ?? []), [N, C] = b(l.welcome_note ?? ""), [n, k] = b(
20
+ const { update: h } = Z(l.id), b = B(), [f, o] = p(!!l.announce), [u, w] = p(l.mention_policy ?? "owner"), [c, v] = p(l.description ?? ""), [N, g] = p(l.links ?? []), [n, y] = p(l.welcome_note ?? ""), [S, E] = p(
20
21
  (l.default_roles ?? []).map((a) => String(a).toUpperCase())
21
- ), A = c.filter((a) => a.url.trim()), B = g !== !!l.announce || u !== (l.description ?? "") || N !== (l.welcome_note ?? "") || JSON.stringify(A) !== JSON.stringify(l.links ?? []) || o && JSON.stringify([...n].sort()) !== JSON.stringify((l.default_roles ?? []).map((a) => String(a).toUpperCase()).sort()), W = () => p.mutate(
22
+ ), O = N.filter((a) => a.url.trim()), z = f !== !!l.announce || u !== (l.mention_policy ?? "owner") || c !== (l.description ?? "") || n !== (l.welcome_note ?? "") || JSON.stringify(O) !== JSON.stringify(l.links ?? []) || r && JSON.stringify([...S].sort()) !== JSON.stringify((l.default_roles ?? []).map((a) => String(a).toUpperCase()).sort()), F = () => h.mutate(
22
23
  {
23
- announce: g,
24
- description: u.trim() || null,
25
- links: A.map((a) => ({
24
+ announce: f,
25
+ mention_policy: u,
26
+ description: c.trim() || null,
27
+ links: O.map((a) => ({
26
28
  label: a.label.trim() || a.url.trim(),
27
29
  url: a.url.trim()
28
30
  })),
29
- welcome_note: N.trim() || null,
30
- ...o ? { default_roles: n } : {}
31
+ welcome_note: n.trim() || null,
32
+ ...r ? { default_roles: S } : {}
31
33
  },
32
34
  {
33
- onSuccess: () => w.success("Channel settings saved"),
34
- onError: (a) => w.error(P(a, "Could not save the channel settings"))
35
+ onSuccess: () => C.success("Channel settings saved"),
36
+ onError: (a) => C.error(A(a, "Could not save the channel settings"))
35
37
  }
36
- ), E = (a) => {
37
- var d;
38
- return ((d = f.find((m) => String(m.id).toUpperCase() === a)) == null ? void 0 : d.name) ?? "Unknown role";
38
+ ), T = (a) => {
39
+ var i;
40
+ return ((i = b.find((m) => String(m.id).toUpperCase() === a)) == null ? void 0 : i.name) ?? "Unknown role";
39
41
  };
40
- return /* @__PURE__ */ t("div", { className: i("space-y-3 border-t pt-3", s.divider), "data-chat-channel-extras": !0, children: [
42
+ return /* @__PURE__ */ t("div", { className: d("space-y-3 border-t pt-3", s.divider), "data-chat-channel-extras": !0, children: [
41
43
  /* @__PURE__ */ t("label", { className: "flex items-start gap-2 text-[12px] text-slate-700 dark:text-slate-200", children: [
42
44
  /* @__PURE__ */ e(
43
45
  "input",
44
46
  {
45
47
  type: "checkbox",
46
- checked: g,
47
- onChange: (a) => r(a.target.checked),
48
+ checked: f,
49
+ onChange: (a) => o(a.target.checked),
48
50
  className: "mt-0.5",
49
51
  "data-chat-channel-announce": !0
50
52
  }
51
53
  ),
52
54
  /* @__PURE__ */ t("span", { children: [
53
55
  /* @__PURE__ */ t("span", { className: "inline-flex items-center gap-1 font-medium", children: [
54
- /* @__PURE__ */ e(H, { className: "h-3.5 w-3.5" }),
56
+ /* @__PURE__ */ e(M, { className: "h-3.5 w-3.5" }),
55
57
  " Announcements only"
56
58
  ] }),
57
59
  /* @__PURE__ */ t("span", { className: "block text-[11px] text-slate-500 dark:text-slate-400", children: [
@@ -61,16 +63,34 @@ function ce({
61
63
  ] })
62
64
  ] })
63
65
  ] }),
66
+ l.id !== 0 && /* @__PURE__ */ t("div", { "data-chat-channel-mention-policy": !0, children: [
67
+ /* @__PURE__ */ e("span", { className: "mb-1 block text-[11px] font-medium text-slate-500 dark:text-slate-400", children: "Who can use @channel and @here" }),
68
+ /* @__PURE__ */ e(
69
+ Y,
70
+ {
71
+ value: u,
72
+ onChange: w,
73
+ ariaLabel: "Who can use @channel and @here",
74
+ className: "h-8 w-full max-w-[280px] text-[12px]",
75
+ options: [
76
+ { value: "owner", label: "Channel owner and admins" },
77
+ { value: "members", label: "Every member" },
78
+ { value: "admins", label: "Admins only" }
79
+ ]
80
+ }
81
+ ),
82
+ /* @__PURE__ */ e("p", { className: "mt-1 text-[11px] leading-snug text-slate-500 dark:text-slate-400", children: "They notify everyone in the channel (@here: everyone online). From anyone else they post as plain text and notify nobody." })
83
+ ] }),
64
84
  /* @__PURE__ */ t("label", { className: "block", children: [
65
- /* @__PURE__ */ e("span", { className: "mb-1 block text-[11px] font-medium text-slate-400", children: "Description" }),
85
+ /* @__PURE__ */ e("span", { className: "mb-1 block text-[11px] font-medium text-slate-500 dark:text-slate-400", children: "Description" }),
66
86
  /* @__PURE__ */ e(
67
87
  "textarea",
68
88
  {
69
- value: u,
70
- onChange: (a) => y(a.target.value),
89
+ value: c,
90
+ onChange: (a) => v(a.target.value),
71
91
  rows: 3,
72
92
  placeholder: "What people should know before posting here",
73
- className: i(
93
+ className: d(
74
94
  "w-full resize-none rounded-md px-2 py-1.5 text-[12.5px] outline-none",
75
95
  s.input
76
96
  ),
@@ -79,17 +99,17 @@ function ce({
79
99
  )
80
100
  ] }),
81
101
  /* @__PURE__ */ t("div", { children: [
82
- /* @__PURE__ */ e("span", { className: "mb-1 block text-[11px] font-medium text-slate-400", children: "Links" }),
83
- c.map((a, d) => (
102
+ /* @__PURE__ */ e("span", { className: "mb-1 block text-[11px] font-medium text-slate-500 dark:text-slate-400", children: "Links" }),
103
+ N.map((a, i) => (
84
104
  // biome-ignore lint/suspicious/noArrayIndexKey: rows are edited in place and have no id
85
105
  /* @__PURE__ */ t("div", { className: "mb-1 flex items-center gap-1", children: [
86
106
  /* @__PURE__ */ e(
87
107
  "input",
88
108
  {
89
109
  value: a.label,
90
- onChange: (m) => h((v) => v.map((x, S) => S === d ? { ...x, label: m.target.value } : x)),
110
+ onChange: (m) => g((k) => k.map((x, _) => _ === i ? { ...x, label: m.target.value } : x)),
91
111
  placeholder: "Label",
92
- className: i("h-7 w-[38%] rounded-md px-2 text-[12px] outline-none", s.input),
112
+ className: d("h-7 w-[38%] rounded-md px-2 text-[12px] outline-none", s.input),
93
113
  "aria-label": "Link label"
94
114
  }
95
115
  ),
@@ -97,9 +117,9 @@ function ce({
97
117
  "input",
98
118
  {
99
119
  value: a.url,
100
- onChange: (m) => h((v) => v.map((x, S) => S === d ? { ...x, url: m.target.value } : x)),
120
+ onChange: (m) => g((k) => k.map((x, _) => _ === i ? { ...x, url: m.target.value } : x)),
101
121
  placeholder: "https://… or /reports/…",
102
- className: i(
122
+ className: d(
103
123
  "h-7 min-w-0 flex-1 rounded-md px-2 text-[12px] outline-none",
104
124
  s.input
105
125
  ),
@@ -110,41 +130,41 @@ function ce({
110
130
  "button",
111
131
  {
112
132
  type: "button",
113
- onClick: () => h((m) => m.filter((v, x) => x !== d)),
133
+ onClick: () => g((m) => m.filter((k, x) => x !== i)),
114
134
  className: "rounded p-1 text-slate-400 hover:text-red-500",
115
135
  "aria-label": "Remove link",
116
- children: /* @__PURE__ */ e(O, { className: "h-3 w-3" })
136
+ children: /* @__PURE__ */ e($, { className: "h-3 w-3" })
117
137
  }
118
138
  )
119
- ] }, d)
139
+ ] }, i)
120
140
  )),
121
- c.length < 10 && /* @__PURE__ */ t(
141
+ N.length < 10 && /* @__PURE__ */ t(
122
142
  "button",
123
143
  {
124
144
  type: "button",
125
- onClick: () => h((a) => [...a, { label: "", url: "" }]),
126
- className: i(
145
+ onClick: () => g((a) => [...a, { label: "", url: "" }]),
146
+ className: d(
127
147
  "inline-flex items-center gap-1 text-[11.5px] font-medium",
128
148
  s.accentText
129
149
  ),
130
150
  "data-chat-channel-add-link": !0,
131
151
  children: [
132
- /* @__PURE__ */ e(F, { className: "h-3 w-3" }),
152
+ /* @__PURE__ */ e(G, { className: "h-3 w-3" }),
133
153
  " Add a link"
134
154
  ]
135
155
  }
136
156
  )
137
157
  ] }),
138
158
  /* @__PURE__ */ t("label", { className: "block", children: [
139
- /* @__PURE__ */ e("span", { className: "mb-1 block text-[11px] font-medium text-slate-400", children: "Welcome note — shown once to each new member" }),
159
+ /* @__PURE__ */ e("span", { className: "mb-1 block text-[11px] font-medium text-slate-500 dark:text-slate-400", children: "Welcome note — shown once to each new member" }),
140
160
  /* @__PURE__ */ e(
141
161
  "textarea",
142
162
  {
143
- value: N,
144
- onChange: (a) => C(a.target.value),
163
+ value: n,
164
+ onChange: (a) => y(a.target.value),
145
165
  rows: 3,
146
166
  placeholder: "Say hello, point people at the pinned messages, explain the ground rules",
147
- className: i(
167
+ className: d(
148
168
  "w-full resize-none rounded-md px-2 py-1.5 text-[12.5px] outline-none",
149
169
  s.input
150
170
  ),
@@ -152,66 +172,66 @@ function ce({
152
172
  }
153
173
  )
154
174
  ] }),
155
- o && /* @__PURE__ */ t("div", { children: [
156
- /* @__PURE__ */ e("span", { className: "mb-1 block text-[11px] font-medium text-slate-400", children: "Join automatically — everyone with these roles" }),
175
+ r && /* @__PURE__ */ t("div", { children: [
176
+ /* @__PURE__ */ e("span", { className: "mb-1 block text-[11px] font-medium text-slate-500 dark:text-slate-400", children: "Join automatically — everyone with these roles" }),
157
177
  /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-1", children: [
158
- n.map((a) => /* @__PURE__ */ t(
178
+ S.map((a) => /* @__PURE__ */ t(
159
179
  "span",
160
180
  {
161
- className: i(
181
+ className: d(
162
182
  "inline-flex h-6 items-center gap-1 rounded-full px-2 text-[11px]",
163
183
  s.accentSoft
164
184
  ),
165
185
  children: [
166
- E(a),
186
+ T(a),
167
187
  /* @__PURE__ */ e(
168
188
  "button",
169
189
  {
170
190
  type: "button",
171
- onClick: () => k((d) => d.filter((m) => m !== a)),
172
- "aria-label": `Remove ${E(a)}`,
173
- children: /* @__PURE__ */ e(O, { className: "h-3 w-3" })
191
+ onClick: () => E((i) => i.filter((m) => m !== a)),
192
+ "aria-label": `Remove ${T(a)}`,
193
+ children: /* @__PURE__ */ e($, { className: "h-3 w-3" })
174
194
  }
175
195
  )
176
196
  ]
177
197
  },
178
198
  a
179
199
  )),
180
- /* @__PURE__ */ t(I, { children: [
181
- /* @__PURE__ */ e(J, { asChild: !0, children: /* @__PURE__ */ t(
200
+ /* @__PURE__ */ t(W, { children: [
201
+ /* @__PURE__ */ e(j, { asChild: !0, children: /* @__PURE__ */ t(
182
202
  "button",
183
203
  {
184
204
  type: "button",
185
205
  className: "inline-flex h-6 items-center gap-1 rounded-full border border-slate-200 px-2 text-[11px] text-slate-600 hover:bg-muted dark:border-border dark:text-slate-300",
186
206
  "data-chat-channel-default-roles": !0,
187
207
  children: [
188
- /* @__PURE__ */ e(G, { className: "h-3 w-3" }),
208
+ /* @__PURE__ */ e(X, { className: "h-3 w-3" }),
189
209
  " Role"
190
210
  ]
191
211
  }
192
212
  ) }),
193
- /* @__PURE__ */ e(j, { align: "start", className: "w-[240px] p-0", children: /* @__PURE__ */ t(T, { children: [
194
- /* @__PURE__ */ e($, { placeholder: "Search roles…" }),
195
- /* @__PURE__ */ t(U, { children: [
196
- /* @__PURE__ */ e(R, { children: "No role found" }),
197
- /* @__PURE__ */ e(_, { children: f.map((a) => {
198
- const d = String(a.id).toUpperCase(), m = n.includes(d);
213
+ /* @__PURE__ */ e(D, { align: "start", className: "w-[240px] p-0", children: /* @__PURE__ */ t(U, { children: [
214
+ /* @__PURE__ */ e(R, { placeholder: "Search roles…" }),
215
+ /* @__PURE__ */ t(I, { children: [
216
+ /* @__PURE__ */ e(J, { children: "No role found" }),
217
+ /* @__PURE__ */ e(L, { children: b.map((a) => {
218
+ const i = String(a.id).toUpperCase(), m = S.includes(i);
199
219
  return /* @__PURE__ */ t(
200
- L,
220
+ P,
201
221
  {
202
222
  value: a.name,
203
- onSelect: () => k((v) => m ? v.filter((x) => x !== d) : [...v, d]),
223
+ onSelect: () => E((k) => m ? k.filter((x) => x !== i) : [...k, i]),
204
224
  children: [
205
225
  /* @__PURE__ */ e(
206
- M,
226
+ q,
207
227
  {
208
- className: i("mr-1.5 h-3.5 w-3.5", m ? "opacity-100" : "opacity-0")
228
+ className: d("mr-1.5 h-3.5 w-3.5", m ? "opacity-100" : "opacity-0")
209
229
  }
210
230
  ),
211
231
  a.name
212
232
  ]
213
233
  },
214
- d
234
+ i
215
235
  );
216
236
  }) })
217
237
  ] })
@@ -224,65 +244,65 @@ function ce({
224
244
  "button",
225
245
  {
226
246
  type: "button",
227
- disabled: !B || p.isPending,
228
- onClick: W,
229
- className: i(
247
+ disabled: !z || h.isPending,
248
+ onClick: F,
249
+ className: d(
230
250
  "rounded-md px-2.5 py-1 text-[12px] font-medium disabled:opacity-40",
231
251
  s.action
232
252
  ),
233
253
  "data-chat-channel-extras-save": !0,
234
- children: p.isPending ? "Saving…" : "Save these settings"
254
+ children: h.isPending ? "Saving…" : "Save these settings"
235
255
  }
236
256
  )
237
257
  ] });
238
258
  }
239
- function me({ channelId: l, th: s }) {
240
- const [o, p] = b(!1), f = V(o), g = D(), r = Y(l), [u, y] = b(null), [c, h] = b(null), N = (n) => n.kind === "team" ? { team_id: n.id } : { role_id: n.id }, C = (n) => {
241
- y(n), h(null), r.mutate(
259
+ function xe({ channelId: l, th: s }) {
260
+ const [r, h] = p(!1), b = ee(r), f = B(), o = te(l), [u, w] = p(null), [c, v] = p(null), N = (n) => n.kind === "team" ? { team_id: n.id } : { role_id: n.id }, g = (n) => {
261
+ w(n), v(null), o.mutate(
242
262
  { ...N(n), dry_run: !0 },
243
263
  {
244
- onSuccess: (k) => h({ would_add: k.would_add ?? 0, skipped: k.skipped }),
245
- onError: (k) => w.error(P(k, "Could not count who that would add"))
264
+ onSuccess: (y) => v({ would_add: y.would_add ?? 0, skipped: y.skipped }),
265
+ onError: (y) => C.error(A(y, "Could not count who that would add"))
246
266
  }
247
267
  );
248
268
  };
249
269
  return /* @__PURE__ */ t("div", { "data-chat-bulk-invite": !0, children: [
250
- /* @__PURE__ */ t(I, { open: o, onOpenChange: p, children: [
251
- /* @__PURE__ */ e(J, { asChild: !0, children: /* @__PURE__ */ t(
270
+ /* @__PURE__ */ t(W, { open: r, onOpenChange: h, children: [
271
+ /* @__PURE__ */ e(j, { asChild: !0, children: /* @__PURE__ */ t(
252
272
  "button",
253
273
  {
254
274
  type: "button",
255
- className: i(
275
+ className: d(
256
276
  "inline-flex items-center gap-1 text-[11.5px] font-medium",
257
277
  s.accentText
258
278
  ),
259
279
  children: [
260
- /* @__PURE__ */ e(X, { className: "h-3.5 w-3.5" }),
280
+ /* @__PURE__ */ e(K, { className: "h-3.5 w-3.5" }),
261
281
  " Add a team or role"
262
282
  ]
263
283
  }
264
284
  ) }),
265
- /* @__PURE__ */ e(j, { align: "start", className: "w-[260px] p-0", children: /* @__PURE__ */ t(T, { children: [
266
- /* @__PURE__ */ e($, { placeholder: "Search teams and roles…" }),
267
- /* @__PURE__ */ t(U, { children: [
268
- /* @__PURE__ */ e(R, { children: "Nothing found" }),
269
- f.length > 0 && /* @__PURE__ */ e(_, { heading: "Teams", children: f.map((n) => /* @__PURE__ */ e(
270
- L,
285
+ /* @__PURE__ */ e(D, { align: "start", className: "w-[260px] p-0", children: /* @__PURE__ */ t(U, { children: [
286
+ /* @__PURE__ */ e(R, { placeholder: "Search teams and roles…" }),
287
+ /* @__PURE__ */ t(I, { children: [
288
+ /* @__PURE__ */ e(J, { children: "Nothing found" }),
289
+ b.length > 0 && /* @__PURE__ */ e(L, { heading: "Teams", children: b.map((n) => /* @__PURE__ */ e(
290
+ P,
271
291
  {
272
292
  value: `team ${n.name}`,
273
293
  onSelect: () => {
274
- p(!1), C({ kind: "team", id: n.id, name: n.name });
294
+ h(!1), g({ kind: "team", id: n.id, name: n.name });
275
295
  },
276
296
  children: n.name
277
297
  },
278
298
  `t${n.id}`
279
299
  )) }),
280
- /* @__PURE__ */ e(_, { heading: "Roles", children: g.map((n) => /* @__PURE__ */ e(
281
- L,
300
+ /* @__PURE__ */ e(L, { heading: "Roles", children: f.map((n) => /* @__PURE__ */ e(
301
+ P,
282
302
  {
283
303
  value: `role ${n.name}`,
284
304
  onSelect: () => {
285
- p(!1), C({ kind: "role", id: String(n.id), name: n.name });
305
+ h(!1), g({ kind: "role", id: String(n.id), name: n.name });
286
306
  },
287
307
  children: n.name
288
308
  },
@@ -291,13 +311,13 @@ function me({ channelId: l, th: s }) {
291
311
  ] })
292
312
  ] }) })
293
313
  ] }),
294
- u && /* @__PURE__ */ e("div", { className: i("mt-1.5 rounded-lg border p-2 text-[12px]", s.divider), children: c ? c.would_add === 0 ? /* @__PURE__ */ t("p", { className: "text-slate-600 dark:text-slate-300", children: [
314
+ u && /* @__PURE__ */ e("div", { className: d("mt-1.5 rounded-lg border p-2 text-[12px]", s.divider), children: c ? c.would_add === 0 ? /* @__PURE__ */ t("p", { className: "text-slate-600 dark:text-slate-300", children: [
295
315
  "Everyone in ",
296
316
  u.name,
297
317
  " is already here",
298
318
  c.skipped ? ` (${c.skipped} skipped)` : "",
299
319
  "."
300
- ] }) : /* @__PURE__ */ t(z, { children: [
320
+ ] }) : /* @__PURE__ */ t(H, { children: [
301
321
  /* @__PURE__ */ t("p", { className: "text-slate-700 dark:text-slate-200", children: [
302
322
  "Adds ",
303
323
  c.would_add,
@@ -314,14 +334,14 @@ function me({ channelId: l, th: s }) {
314
334
  "button",
315
335
  {
316
336
  type: "button",
317
- disabled: r.isPending,
318
- onClick: () => r.mutate(N(u), {
337
+ disabled: o.isPending,
338
+ onClick: () => o.mutate(N(u), {
319
339
  onSuccess: (n) => {
320
- w.success(`Added ${n.added ?? 0} to the channel`), y(null), h(null);
340
+ C.success(`Added ${n.added ?? 0} to the channel`), w(null), v(null);
321
341
  },
322
- onError: (n) => w.error(P(n, "Could not add them"))
342
+ onError: (n) => C.error(A(n, "Could not add them"))
323
343
  }),
324
- className: i("h-7 rounded-md px-2 text-[11.5px] font-medium", s.action),
344
+ className: d("h-7 rounded-md px-2 text-[11.5px] font-medium", s.action),
325
345
  "data-chat-bulk-invite-confirm": !0,
326
346
  children: [
327
347
  "Add ",
@@ -334,7 +354,7 @@ function me({ channelId: l, th: s }) {
334
354
  {
335
355
  type: "button",
336
356
  onClick: () => {
337
- y(null), h(null);
357
+ w(null), v(null);
338
358
  },
339
359
  className: "h-7 rounded-md px-2 text-[11.5px] text-slate-600 hover:bg-muted dark:text-slate-300",
340
360
  children: "Cancel"
@@ -348,7 +368,7 @@ function me({ channelId: l, th: s }) {
348
368
  ] }) })
349
369
  ] });
350
370
  }
351
- const ee = {
371
+ const ne = {
352
372
  "chat-channel-create": "created the channel",
353
373
  "chat-channel-update": "changed settings",
354
374
  "chat-channel-join": "joined",
@@ -358,46 +378,46 @@ const ee = {
358
378
  "chat-channel-bulk-invite": "added a group of people",
359
379
  "chat-message-delete": "deleted a message"
360
380
  };
361
- function pe({ channelId: l, th: s }) {
362
- const [o, p] = b(!1), { rows: f, loading: g } = Z(l, o);
381
+ function be({ channelId: l, th: s }) {
382
+ const [r, h] = p(!1), { rows: b, loading: f } = ae(l, r);
363
383
  return /* @__PURE__ */ t("div", { "data-chat-channel-audit": !0, children: [
364
384
  /* @__PURE__ */ t(
365
385
  "button",
366
386
  {
367
387
  type: "button",
368
- onClick: () => p((r) => !r),
369
- "aria-expanded": o,
388
+ onClick: () => h((o) => !o),
389
+ "aria-expanded": r,
370
390
  className: "inline-flex items-center gap-1 text-[11.5px] font-medium text-slate-600 hover:text-slate-900 dark:text-slate-300 dark:hover:text-white",
371
391
  children: [
372
- /* @__PURE__ */ e(q, { className: "h-3.5 w-3.5" }),
392
+ /* @__PURE__ */ e(Q, { className: "h-3.5 w-3.5" }),
373
393
  " ",
374
- o ? "Hide channel history" : "Channel history"
394
+ r ? "Hide channel history" : "Channel history"
375
395
  ]
376
396
  }
377
397
  ),
378
- o && /* @__PURE__ */ e("div", { className: i("mt-1.5 max-h-60 overflow-y-auto rounded-lg border", s.divider), children: g ? /* @__PURE__ */ e("p", { className: "p-2 text-[11.5px] text-slate-500", children: "Loading…" }) : f.length === 0 ? /* @__PURE__ */ e("p", { className: "p-2 text-[11.5px] text-slate-500", children: "No changes recorded yet." }) : f.map((r) => /* @__PURE__ */ t(
398
+ r && /* @__PURE__ */ e("div", { className: d("mt-1.5 max-h-60 overflow-y-auto rounded-lg border", s.divider), children: f ? /* @__PURE__ */ e("p", { className: "p-2 text-[11.5px] text-slate-500", children: "Loading…" }) : b.length === 0 ? /* @__PURE__ */ e("p", { className: "p-2 text-[11.5px] text-slate-500", children: "No changes recorded yet." }) : b.map((o) => /* @__PURE__ */ t(
379
399
  "div",
380
400
  {
381
- className: i("border-b px-2 py-1.5 text-[11.5px] last:border-b-0", s.divider),
401
+ className: d("border-b px-2 py-1.5 text-[11.5px] last:border-b-0", s.divider),
382
402
  children: [
383
403
  /* @__PURE__ */ t("p", { className: "text-slate-700 dark:text-slate-200", children: [
384
- /* @__PURE__ */ e("span", { className: "font-medium", children: r.user_name ?? "Someone" }),
404
+ /* @__PURE__ */ e("span", { className: "font-medium", children: o.user_name ?? "Someone" }),
385
405
  " ",
386
- ee[r.action] ?? r.action.replace(/^chat-/, "").replace(/-/g, " "),
406
+ ne[o.action] ?? o.action.replace(/^chat-/, "").replace(/-/g, " "),
387
407
  /* @__PURE__ */ t("span", { className: "ml-1 text-slate-400", children: [
388
408
  "· ",
389
- K(r.at)
409
+ V(o.at)
390
410
  ] })
391
411
  ] }),
392
- r.comment && /* @__PURE__ */ e("p", { className: "truncate text-[11px] text-slate-500 dark:text-slate-400", children: r.comment })
412
+ o.comment && /* @__PURE__ */ e("p", { className: "truncate text-[11px] text-slate-500 dark:text-slate-400", children: o.comment })
393
413
  ]
394
414
  },
395
- r.id
415
+ o.id
396
416
  )) })
397
417
  ] });
398
418
  }
399
419
  export {
400
- me as BulkInvitePanel,
401
- pe as ChannelAuditLog,
402
- ce as ChannelExtrasEditor
420
+ xe as BulkInvitePanel,
421
+ be as ChannelAuditLog,
422
+ ue as ChannelExtrasEditor
403
423
  };