@nivaro/react 0.3.113 → 0.3.115

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 (285) hide show
  1. package/dist/components/ScreenShareHost.js +24 -0
  2. package/dist/full.css +50 -2
  3. package/dist/hooks/useSessionRecorder.js +61 -60
  4. package/dist/index.d.ts +1727 -19
  5. package/dist/index.js +1091 -950
  6. package/dist/shared/components/ActivityEntry.js +209 -97
  7. package/dist/shared/components/AgentPresenceChip.js +51 -0
  8. package/dist/shared/components/AnnouncementBanner.js +56 -41
  9. package/dist/shared/components/AutolinkedText.js +98 -85
  10. package/dist/shared/components/BroadcastView.js +149 -141
  11. package/dist/shared/components/CacheStamp.js +78 -30
  12. package/dist/shared/components/CollectionBrowserView.js +4088 -3592
  13. package/dist/shared/components/ConfigChangeStrip.js +63 -0
  14. package/dist/shared/components/ConfigReachNote.js +107 -0
  15. package/dist/shared/components/ConformanceView.js +389 -319
  16. package/dist/shared/components/DataTable.js +544 -504
  17. package/dist/shared/components/DelegateCoverLine.js +164 -0
  18. package/dist/shared/components/EnvironmentNotice.js +56 -65
  19. package/dist/shared/components/FilePreviewLightbox.js +89 -43
  20. package/dist/shared/components/FindingFixedMark.js +23 -0
  21. package/dist/shared/components/GridPresenceLine.js +100 -0
  22. package/dist/shared/components/IdleReloadWatcher.js +82 -43
  23. package/dist/shared/components/InStep.js +46 -0
  24. package/dist/shared/components/ItemEditForm.js +5504 -4889
  25. package/dist/shared/components/LiveAnnouncer.js +62 -0
  26. package/dist/shared/components/LiveCount.js +54 -0
  27. package/dist/shared/components/LiveFigure.js +28 -0
  28. package/dist/shared/components/LiveListControls.js +114 -0
  29. package/dist/shared/components/LiveNewMatchesPill.js +25 -0
  30. package/dist/shared/components/LiveOffNote.js +44 -0
  31. package/dist/shared/components/LivePreferenceHost.js +42 -0
  32. package/dist/shared/components/LiveRowMark.js +25 -20
  33. package/dist/shared/components/LiveTraceView.js +257 -0
  34. package/dist/shared/components/MapView.js +30 -29
  35. package/dist/shared/components/MatrixEditor.js +497 -462
  36. package/dist/shared/components/MyWorkView.js +346 -272
  37. package/dist/shared/components/NotificationBell.js +215 -201
  38. package/dist/shared/components/PageRenderer.js +636 -599
  39. package/dist/shared/components/PresenceDot.js +21 -0
  40. package/dist/shared/components/ProfileView.js +656 -536
  41. package/dist/shared/components/RealtimeStatusBanner.js +25 -25
  42. package/dist/shared/components/RecentRecordsRail.js +51 -48
  43. package/dist/shared/components/RecordCompare.js +241 -150
  44. package/dist/shared/components/RecordDrilldownSheet.js +66 -64
  45. package/dist/shared/components/RecordGridEditor.js +350 -311
  46. package/dist/shared/components/RecordHoverCard.js +147 -0
  47. package/dist/shared/components/RecordPeekHost.js +111 -0
  48. package/dist/shared/components/RecordReadView.js +414 -412
  49. package/dist/shared/components/RelativeTime.js +16 -0
  50. package/dist/shared/components/ReportView.js +1396 -1304
  51. package/dist/shared/components/ScreenRefreshButton.js +77 -0
  52. package/dist/shared/components/TabCountHost.js +10 -0
  53. package/dist/shared/components/TickerNumber.js +19 -18
  54. package/dist/shared/components/TipLayer.js +70 -58
  55. package/dist/shared/components/WidgetImageMenu.js +59 -0
  56. package/dist/shared/components/WidgetSlot.js +571 -524
  57. package/dist/shared/components/activity/RecordActivityStream.js +317 -0
  58. package/dist/shared/components/bulk/BulkSelectionNotices.js +220 -0
  59. package/dist/shared/components/cbv/approval-changed.js +20 -0
  60. package/dist/shared/components/cbv/changed-by-others.js +251 -0
  61. package/dist/shared/components/cbv/column-totals.js +75 -67
  62. package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +320 -0
  63. package/dist/shared/components/change-proposals/ProposalValue.js +28 -0
  64. package/dist/shared/components/change-proposals/ProposeChangeButton.js +44 -0
  65. package/dist/shared/components/change-proposals/ProposeChangeDialog.js +359 -0
  66. package/dist/shared/components/change-proposals/types.js +4 -0
  67. package/dist/shared/components/chat/ChatPanel.js +1571 -1528
  68. package/dist/shared/components/chat/Composer.js +276 -298
  69. package/dist/shared/components/chat/room-due.js +13 -0
  70. package/dist/shared/components/collections-directory/CollectionRow.js +76 -75
  71. package/dist/shared/components/collections-directory/CollectionsDirectory.js +415 -395
  72. package/dist/shared/components/collections-directory/directory-data.js +75 -63
  73. package/dist/shared/components/imports/ImportConsole.js +159 -155
  74. package/dist/shared/components/imports/ImportDuplicatesNotice.js +46 -31
  75. package/dist/shared/components/integrations/SendStatus.js +202 -0
  76. package/dist/shared/components/integrations/console/IntegrationsConsole.js +45 -36
  77. package/dist/shared/components/integrations/console/ReadyToSendView.js +453 -0
  78. package/dist/shared/components/integrations/console/api.js +161 -117
  79. package/dist/shared/components/integrations/console/tone.js +15 -12
  80. package/dist/shared/components/item-edit/CatalogPickerField.js +1353 -1245
  81. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +162 -0
  82. package/dist/shared/components/item-edit/CloneDialog.js +208 -206
  83. package/dist/shared/components/item-edit/DerivedCauseNote.js +57 -0
  84. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +81 -70
  85. package/dist/shared/components/item-edit/DuplicateNotice.js +169 -101
  86. package/dist/shared/components/item-edit/FieldAffordances.js +294 -385
  87. package/dist/shared/components/item-edit/FieldComments.js +159 -116
  88. package/dist/shared/components/item-edit/FieldPointer.js +132 -0
  89. package/dist/shared/components/item-edit/FieldRenderer.js +277 -273
  90. package/dist/shared/components/item-edit/FieldRow.js +519 -439
  91. package/dist/shared/components/item-edit/FieldSourceBadge.js +88 -0
  92. package/dist/shared/components/item-edit/FilePickerField.js +454 -369
  93. package/dist/shared/components/item-edit/GroupSection.js +618 -567
  94. package/dist/shared/components/item-edit/HeldEditsChip.js +113 -0
  95. package/dist/shared/components/item-edit/InlineTableField.js +2891 -2723
  96. package/dist/shared/components/item-edit/ListNeighborNav.js +79 -0
  97. package/dist/shared/components/item-edit/LiveTraceSheet.js +26 -0
  98. package/dist/shared/components/item-edit/M2MCombobox.js +284 -273
  99. package/dist/shared/components/item-edit/OutboxReviewTray.js +313 -0
  100. package/dist/shared/components/item-edit/PickerBadges.js +52 -0
  101. package/dist/shared/components/item-edit/PlanGrid.js +434 -439
  102. package/dist/shared/components/item-edit/RecalcValue.js +55 -0
  103. package/dist/shared/components/item-edit/RecordChatActions.js +76 -64
  104. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +103 -0
  105. package/dist/shared/components/item-edit/RecordGrantTools.js +87 -86
  106. package/dist/shared/components/item-edit/RecordHelpChip.js +70 -0
  107. package/dist/shared/components/item-edit/RecordLiveSync.js +230 -217
  108. package/dist/shared/components/item-edit/RecordOutbox.js +53 -52
  109. package/dist/shared/components/item-edit/RecordRecapStrip.js +109 -36
  110. package/dist/shared/components/item-edit/RelationCombobox.js +229 -217
  111. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +105 -100
  112. package/dist/shared/components/item-edit/RemoteChangeUi.js +454 -0
  113. package/dist/shared/components/item-edit/RemoteUploads.js +55 -0
  114. package/dist/shared/components/item-edit/RemovedLineNote.js +92 -0
  115. package/dist/shared/components/item-edit/RichTextEditorImpl.js +298 -223
  116. package/dist/shared/components/item-edit/ScheduledChangeChip.js +244 -0
  117. package/dist/shared/components/item-edit/SectionPresence.js +78 -0
  118. package/dist/shared/components/item-edit/SplitLinesButton.js +166 -0
  119. package/dist/shared/components/item-edit/catalog-line-watch.js +94 -0
  120. package/dist/shared/components/item-edit/coedit/collab.js +84 -0
  121. package/dist/shared/components/item-edit/coedit/context.js +24 -0
  122. package/dist/shared/components/item-edit/coedit/cursors.js +103 -0
  123. package/dist/shared/components/item-edit/coedit/safe-link.js +15 -0
  124. package/dist/shared/components/item-edit/coedit/session.js +382 -0
  125. package/dist/shared/components/item-edit/coedit/useCoedit.js +49 -0
  126. package/dist/shared/components/item-edit/file-live.js +77 -0
  127. package/dist/shared/components/item-edit/file-processing.js +87 -0
  128. package/dist/shared/components/item-edit/layout-switch.js +148 -0
  129. package/dist/shared/components/item-edit/live-related.js +23 -0
  130. package/dist/shared/components/item-edit/live-title.js +66 -0
  131. package/dist/shared/components/item-edit/partner-needs.js +142 -0
  132. package/dist/shared/components/item-edit/removed-line.js +58 -0
  133. package/dist/shared/components/item-edit/render-stability.js +70 -59
  134. package/dist/shared/components/layout-editor/ChangeNote.js +36 -34
  135. package/dist/shared/components/layout-editor/CollabParts.js +72 -70
  136. package/dist/shared/components/layout-editor/LayoutEditor.js +306 -303
  137. package/dist/shared/components/list/InlineEdit.js +504 -208
  138. package/dist/shared/components/list/ListViewers.js +81 -0
  139. package/dist/shared/components/merge/MergeRecordsDialog.js +1227 -0
  140. package/dist/shared/components/merge/MergeWithFlow.js +290 -0
  141. package/dist/shared/components/merge/merge-values.js +110 -0
  142. package/dist/shared/components/monitoring/InactiveUserLinksView.js +285 -258
  143. package/dist/shared/components/notifications/NotificationCenterView.js +388 -321
  144. package/dist/shared/components/notifications/NotificationDetailBits.js +205 -130
  145. package/dist/shared/components/notifications/NotificationRulesEditor.js +72 -52
  146. package/dist/shared/components/notifications/bundles.js +21 -19
  147. package/dist/shared/components/notifications/resolved-line.js +25 -0
  148. package/dist/shared/components/ops/OpsTasksView.js +45 -44
  149. package/dist/shared/components/panels/AccessGrantedNote.js +85 -0
  150. package/dist/shared/components/panels/AlertBanners.js +132 -0
  151. package/dist/shared/components/panels/AsyncUserPicker.js +54 -45
  152. package/dist/shared/components/panels/BranchLanes.js +82 -54
  153. package/dist/shared/components/panels/CommentAwareness.js +332 -0
  154. package/dist/shared/components/panels/CommentImages.js +219 -0
  155. package/dist/shared/components/panels/CommentPanel.js +649 -530
  156. package/dist/shared/components/panels/ExternalRequestsChip.js +98 -80
  157. package/dist/shared/components/panels/NewSinceChip.js +16 -0
  158. package/dist/shared/components/panels/OwnerOpenedLine.js +85 -0
  159. package/dist/shared/components/panels/PipelinePanel.js +1644 -1494
  160. package/dist/shared/components/panels/ResubmissionDiff.js +293 -0
  161. package/dist/shared/components/panels/SlaBreachBanner.js +30 -29
  162. package/dist/shared/components/panels/SlaClock.js +130 -99
  163. package/dist/shared/components/panels/TaskPanel.js +308 -287
  164. package/dist/shared/components/panels/unseen-move-check.js +101 -0
  165. package/dist/shared/components/pipeline/OwnerMatrix.js +80 -71
  166. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +495 -0
  167. package/dist/shared/components/pipeline/PipelineEditorView.js +1855 -1771
  168. package/dist/shared/components/profile/AgentNameField.js +141 -0
  169. package/dist/shared/components/profile/AgentsPanel.js +55 -46
  170. package/dist/shared/components/profile/PersonAccess.js +398 -330
  171. package/dist/shared/components/profile/PersonAdminTools.js +127 -113
  172. package/dist/shared/components/profile/PersonProfile.js +81 -73
  173. package/dist/shared/components/profile/SignInTroubleshooter.js +361 -0
  174. package/dist/shared/components/queue/QueueBulkBar.js +101 -84
  175. package/dist/shared/components/queue/QueueItemSheet.js +66 -66
  176. package/dist/shared/components/queue/QueueTeamStrip.js +279 -0
  177. package/dist/shared/components/queue/QueueWorklist.js +2076 -1686
  178. package/dist/shared/components/queue/queue-totals.js +92 -0
  179. package/dist/shared/components/queue/worklist-helpers.js +18 -14
  180. package/dist/shared/components/send-view/SendViewButton.js +136 -0
  181. package/dist/shared/components/send-view/SentViewCards.js +147 -0
  182. package/dist/shared/components/support/ReportProblem.js +1 -0
  183. package/dist/shared/components/support/ScreenShare.js +554 -0
  184. package/dist/shared/components/support/SupportView.js +160 -129
  185. package/dist/shared/components/support/TicketDetailSheet.js +101 -89
  186. package/dist/shared/components/watch-list/WatchDock.js +1044 -0
  187. package/dist/shared/components/watch-list/WatchExtras.js +723 -0
  188. package/dist/shared/components/watch-list/WatchListButton.js +46 -0
  189. package/dist/shared/components/watch-list/WatchPinButton.js +67 -0
  190. package/dist/shared/components/watch-list/WatchRows.js +348 -0
  191. package/dist/shared/lib/activity-sentence.js +87 -75
  192. package/dist/shared/lib/agent-presence.js +46 -0
  193. package/dist/shared/lib/approval-progress.js +49 -0
  194. package/dist/shared/lib/attention-prefs.js +27 -0
  195. package/dist/shared/lib/cell-locks.js +56 -0
  196. package/dist/shared/lib/co-edit.js +166 -0
  197. package/dist/shared/lib/coedit-registry.js +44 -0
  198. package/dist/shared/lib/comment-awareness.js +124 -0
  199. package/dist/shared/lib/comment-images.js +45 -0
  200. package/dist/shared/lib/config-watch.js +94 -0
  201. package/dist/shared/lib/copy-rules.js +65 -0
  202. package/dist/shared/lib/count-step.js +30 -0
  203. package/dist/shared/lib/deadline-ticker.js +68 -0
  204. package/dist/shared/lib/derived-causes.js +115 -0
  205. package/dist/shared/lib/draft-store.js +114 -85
  206. package/dist/shared/lib/error-hints.js +1 -0
  207. package/dist/shared/lib/field-merge.js +126 -0
  208. package/dist/shared/lib/filter-sentence.js +10 -10
  209. package/dist/shared/lib/focus-mode.js +16 -12
  210. package/dist/shared/lib/grid-cursors.js +77 -0
  211. package/dist/shared/lib/grid-presence.js +182 -0
  212. package/dist/shared/lib/idle-reload.js +100 -73
  213. package/dist/shared/lib/in-step.js +45 -0
  214. package/dist/shared/lib/integration-chip.js +19 -18
  215. package/dist/shared/lib/line-locks.js +141 -0
  216. package/dist/shared/lib/line-split.js +41 -0
  217. package/dist/shared/lib/linked-changes.js +150 -0
  218. package/dist/shared/lib/list-link.js +56 -50
  219. package/dist/shared/lib/list-return.js +231 -0
  220. package/dist/shared/lib/list-viewers.js +52 -0
  221. package/dist/shared/lib/live-announcer.js +86 -0
  222. package/dist/shared/lib/live-counts.js +85 -0
  223. package/dist/shared/lib/live-data-changed.js +108 -0
  224. package/dist/shared/lib/live-deltas.js +81 -0
  225. package/dist/shared/lib/live-findings.js +113 -0
  226. package/dist/shared/lib/live-groups.js +122 -0
  227. package/dist/shared/lib/live-link-labels.js +162 -0
  228. package/dist/shared/lib/live-list-flow.js +334 -0
  229. package/dist/shared/lib/live-list.js +143 -129
  230. package/dist/shared/lib/live-moves.js +51 -0
  231. package/dist/shared/lib/live-ops.js +26 -26
  232. package/dist/shared/lib/live-pickers.js +7 -0
  233. package/dist/shared/lib/live-preference.js +184 -0
  234. package/dist/shared/lib/live-queries.js +226 -181
  235. package/dist/shared/lib/live-screen.js +333 -0
  236. package/dist/shared/lib/live-search.js +108 -0
  237. package/dist/shared/lib/live-seen.js +35 -0
  238. package/dist/shared/lib/live-views.js +100 -0
  239. package/dist/shared/lib/live.js +159 -133
  240. package/dist/shared/lib/missed-updates.js +198 -0
  241. package/dist/shared/lib/newer-file.js +56 -0
  242. package/dist/shared/lib/notification-sound.js +42 -20
  243. package/dist/shared/lib/own-writes.js +59 -41
  244. package/dist/shared/lib/picker-badges.js +94 -0
  245. package/dist/shared/lib/presence-signals.js +131 -84
  246. package/dist/shared/lib/realtime.js +49 -24
  247. package/dist/shared/lib/record-gaps.js +85 -0
  248. package/dist/shared/lib/record-outbox.js +369 -222
  249. package/dist/shared/lib/record-peek.js +75 -0
  250. package/dist/shared/lib/record-tabs.js +92 -72
  251. package/dist/shared/lib/relative-ticker.js +42 -0
  252. package/dist/shared/lib/request-gate.js +119 -119
  253. package/dist/shared/lib/rollup-recalc.js +107 -0
  254. package/dist/shared/lib/room-gaps.js +40 -36
  255. package/dist/shared/lib/rum.js +137 -87
  256. package/dist/shared/lib/save-progress.js +20 -0
  257. package/dist/shared/lib/scheduled-countdown.js +67 -0
  258. package/dist/shared/lib/screen-refresh.js +160 -0
  259. package/dist/shared/lib/screen-share.js +234 -0
  260. package/dist/shared/lib/seen-since.js +74 -0
  261. package/dist/shared/lib/selection-watch.js +205 -0
  262. package/dist/shared/lib/send-status.js +132 -0
  263. package/dist/shared/lib/send-view.js +23 -0
  264. package/dist/shared/lib/socket-liveness.js +155 -0
  265. package/dist/shared/lib/socket-realtime.js +168 -140
  266. package/dist/shared/lib/state-census.js +53 -0
  267. package/dist/shared/lib/summary-mode.js +61 -39
  268. package/dist/shared/lib/tab-attention.js +143 -32
  269. package/dist/shared/lib/table-density.js +64 -0
  270. package/dist/shared/lib/track-travel.js +40 -0
  271. package/dist/shared/lib/unseen-changes.js +68 -0
  272. package/dist/shared/lib/upload-file.js +33 -0
  273. package/dist/shared/lib/upload-presence.js +127 -0
  274. package/dist/shared/lib/urgent-chime.js +65 -0
  275. package/dist/shared/lib/use-online-users.js +32 -11
  276. package/dist/shared/lib/user-sync.js +155 -39
  277. package/dist/shared/lib/waiting-count.js +44 -0
  278. package/dist/shared/lib/watch-desktop.js +83 -0
  279. package/dist/shared/lib/watch-list.js +447 -0
  280. package/dist/shared/lib/widget-image-render.js +64 -0
  281. package/dist/shared/lib/widget-image.js +111 -0
  282. package/dist/shared/lib/worker-socket.js +130 -104
  283. package/dist/shared/lib/write-to-screen.js +133 -0
  284. package/package.json +1 -1
  285. package/styles.css +49 -1
@@ -1,104 +1,105 @@
1
1
  import { jsxs as y, jsx as r, Fragment as ie } from "react/jsx-runtime";
2
- import { useQueryClient as So, useQuery as To } from "@tanstack/react-query";
3
- import { Percent as Lo, OctagonAlert as Co, ListOrdered as Ro, AlertTriangle as Et, Lock as Oo, Plus as Po, BarChart3 as Ao, LayoutGrid as No, Table2 as Eo, Grid3x3 as Io, Users as Do } from "lucide-react";
2
+ import { useQueryClient as To, useQuery as Lo } from "@tanstack/react-query";
3
+ import { Percent as Co, OctagonAlert as Ro, ListOrdered as Oo, AlertTriangle as Et, Lock as Po, Plus as No, BarChart3 as Ao, LayoutGrid as Eo, Table2 as Io, Grid3x3 as Do, Users as Fo } from "lucide-react";
4
4
  import { useState as P, useEffect as B, useMemo as w, useRef as z, useCallback as L } from "react";
5
- import { createPortal as Fo } from "react-dom";
5
+ import { createPortal as Ko } from "react-dom";
6
6
  import { toast as It } from "sonner";
7
- import { useNivaroClient as Ko } from "../../context.js";
8
- import { get as Mo } from "../../lib/commands.js";
9
- import { HEADER_GROUP_KEY as $t, UNGROUPED_KEY as _o } from "../../lib/layout-ops.js";
10
- import { activeFreeze as Bo, dayWords as qo } from "../../lib/layout-resolve.js";
11
- import { withAutoOwnersTile as Uo } from "../../lib/owners-header-tile.js";
12
- import { useMyUserId as zo } from "../../lib/presence-signals.js";
13
- import { useUnsavedWork as $o } from "../../lib/unsaved-work.js";
7
+ import { useNivaroClient as Mo } from "../../context.js";
8
+ import { get as _o } from "../../lib/commands.js";
9
+ import { HEADER_GROUP_KEY as Wt, UNGROUPED_KEY as Bo } from "../../lib/layout-ops.js";
10
+ import { activeFreeze as qo, dayWords as Uo } from "../../lib/layout-resolve.js";
11
+ import { withAutoOwnersTile as zo } from "../../lib/owners-header-tile.js";
12
+ import { useMyUserId as $o } from "../../lib/presence-signals.js";
13
+ import { useUnsavedWork as Wo } from "../../lib/unsaved-work.js";
14
14
  import { cn as G } from "../../lib/utils.js";
15
- import { usePretendDownScope as Wo, LAYOUT_PRETEND_SCOPE as Dt, layoutPretendDownOptions as Vo, PretendDownSection as Ho } from "../PretendDown.js";
16
- import { modalHostOf as jo } from "../ui/popover.js";
17
- import { Skeleton as Ft } from "../ui/skeleton.js";
18
- import { AddPanel as Go } from "./AddPanel.js";
19
- import { AutoArrangeButton as Zo } from "./AutoArrange.js";
20
- import { AiToolsButton as Qo } from "./ai/AiToolsButton.js";
21
- import { pinsToMarks as Yo, mergeMarks as Kt } from "./ai/ai-tools-api.js";
22
- import { AiFormsButton as Jo } from "./ai-forms/AiFormsButton.js";
23
- import { AskButton as Xo, AskPanel as er } from "./assist/AskPanel.js";
24
- import { useAskThread as tr } from "./assist/assist-api.js";
25
- import { jumpToSetting as or } from "./assist/jump.js";
26
- import { ProposalsButton as rr } from "./assist/ProposalsButton.js";
27
- import { BulkChangesButton as nr } from "./bulk/BulkChangesButton.js";
28
- import { useMacroRecorder as ar } from "./bulk/useMacroRecorder.js";
29
- import { bundleToActiveLayout as Wt, previewForRole as sr, roleMarker as ir } from "./bundle-to-active.js";
30
- import { useCanvasCompare as lr, CompareBanner as dr } from "./CanvasCompare.js";
31
- import { changeNotePolicyOf as Mt, changeNoteMeta as cr, changeNoteReady as ur, ChangeNoteFields as pr, ChangeNoteSave as mr } from "./ChangeNote.js";
32
- import { PresenceAvatars as fr, DroppedBanner as hr, RecoveryBanner as yr, UnsavedList as vr } from "./CollabParts.js";
33
- import { CommandPalette as gr } from "./commands/CommandPalette.js";
34
- import { nextSelection as kr, targetKey as $ } from "./design-context.js";
35
- import { LayoutDndProvider as wr, useLayoutDnd as br } from "./dnd/LayoutDndProvider.js";
36
- import { NO_DND as xr } from "./dnd/node.js";
37
- import { useTrashWarning as Sr } from "./dnd/trash-links.js";
38
- import { useDraftRecovery as Tr, stagedTip as Lr } from "./draft-recovery.js";
39
- import { canvasRenderer as Cr, EditorCanvas as Rr } from "./EditorCanvas.js";
40
- import { EditorTopBar as Or } from "./EditorTopBar.js";
41
- import { notesOf as Pr, noteKey as Ar } from "./editor-notes.js";
42
- import { EntryEditorContext as _t } from "./entry/entry-editor-context.js";
43
- import { useTabOrderEditor as Nr, TabOrderBar as Er } from "./entry/tab-order.js";
44
- import { useAppIsDark as Ir, ThemePreviewTool as Dr, previewThemeClass as Fr } from "./entry/theme-preview.js";
45
- import { useRulesView as Kr, explainMarks as Mr, RulesToggle as _r, RuleLoopsBanner as Br } from "./explain/CanvasRules.js";
46
- import { useDriverHover as qr } from "./explain/driver-hover.js";
47
- import { fieldLabel as Ur } from "./explain/field-sources.js";
48
- import { useCanvasExplain as zr, useDefaultGhosts as $r } from "./explain/use-explain.js";
49
- import { FindReplaceButton as Wr } from "./FindReplace.js";
50
- import { FormMapButton as Vr } from "./FormMapButton.js";
51
- import { WIDTH_LABELS as Hr } from "./field-zones.js";
52
- import { useSectionChanges as jr } from "./history-api.js";
53
- import { useLayoutEditorHost as Gr } from "./host.js";
54
- import { overriddenTargets as Zr, overrideMark as Qr } from "./inheritance.js";
55
- import { BulkInspector as Yr } from "./inspector/BulkInspector.js";
56
- import { requestInspectorTab as Jr } from "./inspector/tab-request.js";
15
+ import { ConfigReachNote as Dt } from "../ConfigReachNote.js";
16
+ import { usePretendDownScope as Vo, LAYOUT_PRETEND_SCOPE as Ft, layoutPretendDownOptions as Ho, PretendDownSection as jo } from "../PretendDown.js";
17
+ import { modalHostOf as Go } from "../ui/popover.js";
18
+ import { Skeleton as Kt } from "../ui/skeleton.js";
19
+ import { AddPanel as Zo } from "./AddPanel.js";
20
+ import { AutoArrangeButton as Qo } from "./AutoArrange.js";
21
+ import { AiToolsButton as Yo } from "./ai/AiToolsButton.js";
22
+ import { pinsToMarks as Jo, mergeMarks as Mt } from "./ai/ai-tools-api.js";
23
+ import { AiFormsButton as Xo } from "./ai-forms/AiFormsButton.js";
24
+ import { AskButton as er, AskPanel as tr } from "./assist/AskPanel.js";
25
+ import { useAskThread as or } from "./assist/assist-api.js";
26
+ import { jumpToSetting as rr } from "./assist/jump.js";
27
+ import { ProposalsButton as nr } from "./assist/ProposalsButton.js";
28
+ import { BulkChangesButton as ar } from "./bulk/BulkChangesButton.js";
29
+ import { useMacroRecorder as sr } from "./bulk/useMacroRecorder.js";
30
+ import { bundleToActiveLayout as Vt, previewForRole as ir, roleMarker as lr } from "./bundle-to-active.js";
31
+ import { useCanvasCompare as dr, CompareBanner as cr } from "./CanvasCompare.js";
32
+ import { changeNotePolicyOf as _t, changeNoteMeta as ur, changeNoteReady as pr, ChangeNoteFields as mr, ChangeNoteSave as fr } from "./ChangeNote.js";
33
+ import { PresenceAvatars as hr, DroppedBanner as yr, RecoveryBanner as vr, UnsavedList as gr } from "./CollabParts.js";
34
+ import { CommandPalette as kr } from "./commands/CommandPalette.js";
35
+ import { nextSelection as wr, targetKey as $ } from "./design-context.js";
36
+ import { LayoutDndProvider as br, useLayoutDnd as xr } from "./dnd/LayoutDndProvider.js";
37
+ import { NO_DND as Sr } from "./dnd/node.js";
38
+ import { useTrashWarning as Tr } from "./dnd/trash-links.js";
39
+ import { useDraftRecovery as Lr, stagedTip as Cr } from "./draft-recovery.js";
40
+ import { canvasRenderer as Rr, EditorCanvas as Or } from "./EditorCanvas.js";
41
+ import { EditorTopBar as Pr } from "./EditorTopBar.js";
42
+ import { notesOf as Nr, noteKey as Ar } from "./editor-notes.js";
43
+ import { EntryEditorContext as Bt } from "./entry/entry-editor-context.js";
44
+ import { useTabOrderEditor as Er, TabOrderBar as Ir } from "./entry/tab-order.js";
45
+ import { useAppIsDark as Dr, ThemePreviewTool as Fr, previewThemeClass as Kr } from "./entry/theme-preview.js";
46
+ import { useRulesView as Mr, explainMarks as _r, RulesToggle as Br, RuleLoopsBanner as qr } from "./explain/CanvasRules.js";
47
+ import { useDriverHover as Ur } from "./explain/driver-hover.js";
48
+ import { fieldLabel as zr } from "./explain/field-sources.js";
49
+ import { useCanvasExplain as $r, useDefaultGhosts as Wr } from "./explain/use-explain.js";
50
+ import { FindReplaceButton as Vr } from "./FindReplace.js";
51
+ import { FormMapButton as Hr } from "./FormMapButton.js";
52
+ import { WIDTH_LABELS as jr } from "./field-zones.js";
53
+ import { useSectionChanges as Gr } from "./history-api.js";
54
+ import { useLayoutEditorHost as Zr } from "./host.js";
55
+ import { overriddenTargets as Qr, overrideMark as Yr } from "./inheritance.js";
56
+ import { BulkInspector as Jr } from "./inspector/BulkInspector.js";
57
+ import { requestInspectorTab as Xr } from "./inspector/tab-request.js";
57
58
  import { isTyping as Qe } from "./is-typing.js";
58
- import { ARROW_DIRS as Xr, altArrowMove as en } from "./keyboard-move.js";
59
- import { LayoutsRail as tn } from "./LayoutsRail.js";
60
- import { useLabelStyleControls as on } from "./lint/LabelStyle.js";
61
- import { LintButton as rn, LintPanel as nn } from "./lint/LintPanel.js";
62
- import { useLayoutLint as an } from "./lint/lint-api.js";
63
- import { FieldStateMatrix as sn } from "./matrix/FieldStateMatrix.js";
64
- import { RoleSectionMatrix as ln } from "./matrix/RoleSectionMatrix.js";
65
- import { FindTool as dn, OutlineTool as cn, ViewTools as un, ShortcutsTool as pn } from "./nav/NavTools.js";
66
- import { OutlinePanel as mn } from "./nav/OutlinePanel.js";
67
- import { useEditorNav as fn } from "./nav/useEditorNav.js";
68
- import { fitZoom as hn, effectiveZoom as yn } from "./nav/view-prefs.js";
69
- import { ZoomChip as vn } from "./nav/ZoomControls.js";
70
- import { OutputsButton as gn } from "./outputs/OutputsButton.js";
71
- import { useLayoutOverview as kn, useOverviewFields as wn, useInvalidateLayouts as Vt, useRuleChoiceLabels as bn, useApproxRecordCount as xn } from "./overview/overview-api.js";
72
- import { purposeSegments as Sn, Sentence as Tn } from "./overview/purpose.js";
73
- import { PlacementsTable as Ln } from "./PlacementsTable.js";
74
- import { usePlaceTools as Cn, PlaceToolsProvider as Bt } from "./PlaceTools.js";
75
- import { segTrack as Rn, segOption as On, amberStrip as Ve } from "./panel-style.js";
76
- import { usePersonalDefaultMarks as Pn } from "./personal-default-marks.js";
77
- import { useLayoutPresence as An, peersByTarget as Nn } from "./presence.js";
78
- import { PreviewModes as En } from "./preview/PreviewModes.js";
79
- import { PreviewPanes as In } from "./preview/PreviewPanes.js";
80
- import { previewNaturalWidth as Dn } from "./preview/preview-model.js";
81
- import { useRemovalLog as Fn } from "./removed-log.js";
82
- import { FormMoreMenu as Kn } from "./reuse/FormMoreMenu.js";
83
- import { useLinkedSections as Mn, useLinkedSectionMarks as _n, LinkedSectionsProvider as Bn } from "./reuse/linked-sections.js";
84
- import { useRailCopy as qn } from "./reuse/useRailCopy.js";
85
- import { SlashInsert as Un } from "./SlashInsert.js";
86
- import { StagedByOthers as zn } from "./StagedChip.js";
87
- import { StructureActions as $n, usePinMarks as Wn } from "./StructureMenu.js";
88
- import { useRolePreview as Vn } from "./settings/settings-api.js";
89
- import { layoutKindOf as Hn } from "./settings/settings-registry.js";
90
- import { useStagedDraft as jn, useStagedWriter as Gn } from "./staged-api.js";
91
- import { ImpactButton as Zn, TestingButton as Qn } from "./testing/TestingPanels.js";
59
+ import { ARROW_DIRS as en, altArrowMove as tn } from "./keyboard-move.js";
60
+ import { LayoutsRail as on } from "./LayoutsRail.js";
61
+ import { useLabelStyleControls as rn } from "./lint/LabelStyle.js";
62
+ import { LintButton as nn, LintPanel as an } from "./lint/LintPanel.js";
63
+ import { useLayoutLint as sn } from "./lint/lint-api.js";
64
+ import { FieldStateMatrix as ln } from "./matrix/FieldStateMatrix.js";
65
+ import { RoleSectionMatrix as dn } from "./matrix/RoleSectionMatrix.js";
66
+ import { FindTool as cn, OutlineTool as un, ViewTools as pn, ShortcutsTool as mn } from "./nav/NavTools.js";
67
+ import { OutlinePanel as fn } from "./nav/OutlinePanel.js";
68
+ import { useEditorNav as hn } from "./nav/useEditorNav.js";
69
+ import { fitZoom as yn, effectiveZoom as vn } from "./nav/view-prefs.js";
70
+ import { ZoomChip as gn } from "./nav/ZoomControls.js";
71
+ import { OutputsButton as kn } from "./outputs/OutputsButton.js";
72
+ import { useLayoutOverview as wn, useOverviewFields as bn, useInvalidateLayouts as Ht, useRuleChoiceLabels as xn, useApproxRecordCount as Sn } from "./overview/overview-api.js";
73
+ import { purposeSegments as Tn, Sentence as Ln } from "./overview/purpose.js";
74
+ import { PlacementsTable as Cn } from "./PlacementsTable.js";
75
+ import { usePlaceTools as Rn, PlaceToolsProvider as qt } from "./PlaceTools.js";
76
+ import { segTrack as On, segOption as Pn, amberStrip as Ve } from "./panel-style.js";
77
+ import { usePersonalDefaultMarks as Nn } from "./personal-default-marks.js";
78
+ import { useLayoutPresence as An, peersByTarget as En } from "./presence.js";
79
+ import { PreviewModes as In } from "./preview/PreviewModes.js";
80
+ import { PreviewPanes as Dn } from "./preview/PreviewPanes.js";
81
+ import { previewNaturalWidth as Fn } from "./preview/preview-model.js";
82
+ import { useRemovalLog as Kn } from "./removed-log.js";
83
+ import { FormMoreMenu as Mn } from "./reuse/FormMoreMenu.js";
84
+ import { useLinkedSections as _n, useLinkedSectionMarks as Bn, LinkedSectionsProvider as qn } from "./reuse/linked-sections.js";
85
+ import { useRailCopy as Un } from "./reuse/useRailCopy.js";
86
+ import { SlashInsert as zn } from "./SlashInsert.js";
87
+ import { StagedByOthers as $n } from "./StagedChip.js";
88
+ import { StructureActions as Wn, usePinMarks as Vn } from "./StructureMenu.js";
89
+ import { useRolePreview as Hn } from "./settings/settings-api.js";
90
+ import { layoutKindOf as jn } from "./settings/settings-registry.js";
91
+ import { useStagedDraft as Gn, useStagedWriter as Zn } from "./staged-api.js";
92
+ import { ImpactButton as Qn, TestingButton as Yn } from "./testing/TestingPanels.js";
92
93
  import { MenuSeparator as Oe, ToolButton as He } from "./toolbar-kit.js";
93
- import { unsavedText as Yn, UnsavedConfirm as Jn } from "./UnsavedConfirm.js";
94
- import { unsavedKeys as Xn, targetFromKey as qt, describeTarget as Ut } from "./unsaved-marks.js";
95
- import { useRefusalLens as ea } from "./usage/refusal-lens.js";
96
- import { UsagePanel as ta } from "./usage/UsagePanel.js";
97
- import { useShowFillRates as oa, useFieldFillRates as ra, usageTodayText as na, useLayoutUsageToday as aa } from "./usage/usage-api.js";
98
- import { useLayoutDraft as sa, useLayoutBundle as je, layoutDraftKeys as ia, touchesOverview as la } from "./useLayoutDraft.js";
99
- import { FormSettings as da } from "./settings/FormSettings.js";
100
- import { Inspector as ca } from "./inspector/Inspector.js";
101
- function ua(o) {
94
+ import { unsavedText as Jn, UnsavedConfirm as Xn } from "./UnsavedConfirm.js";
95
+ import { unsavedKeys as ea, targetFromKey as Ut, describeTarget as zt } from "./unsaved-marks.js";
96
+ import { useRefusalLens as ta } from "./usage/refusal-lens.js";
97
+ import { UsagePanel as oa } from "./usage/UsagePanel.js";
98
+ import { useShowFillRates as ra, useFieldFillRates as na, usageTodayText as aa, useLayoutUsageToday as sa } from "./usage/usage-api.js";
99
+ import { useLayoutDraft as ia, useLayoutBundle as je, layoutDraftKeys as la, touchesOverview as da } from "./useLayoutDraft.js";
100
+ import { FormSettings as ca } from "./settings/FormSettings.js";
101
+ import { Inspector as ua } from "./inspector/Inspector.js";
102
+ function pa(o) {
102
103
  B(() => {
103
104
  const i = (s) => {
104
105
  if (!(s.metaKey || s.ctrlKey) || s.altKey) return;
@@ -113,13 +114,13 @@ function ua(o) {
113
114
  return window.addEventListener("keydown", i), () => window.removeEventListener("keydown", i);
114
115
  }, [o.undo, o.redo, o.autosave, o.flush, o.save]);
115
116
  }
116
- function pa(o, i, s, l, m) {
117
+ function ma(o, i, s, l, m) {
117
118
  B(() => {
118
119
  const d = (u) => {
119
- const v = Xr[u.key];
120
+ const v = en[u.key];
120
121
  if (!v || !u.altKey || u.metaKey || u.ctrlKey || u.shiftKey || u.defaultPrevented || !o || i.length !== 1 || l.current || Qe(u.target) || document.querySelector('[data-radix-popper-content-wrapper], [role="menu"]')) return;
121
122
  u.preventDefault();
122
- const p = en(o, i[0], v);
123
+ const p = tn(o, i[0], v);
123
124
  if (!p) return;
124
125
  s(p.ops, { label: p.label }), m(p.next);
125
126
  const c = $(p.next);
@@ -134,9 +135,9 @@ function pa(o, i, s, l, m) {
134
135
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
135
136
  }, [o, i, s, l, m]);
136
137
  }
137
- function ma(o) {
138
+ function fa(o) {
138
139
  const i = o.status === "saving" || o.dirty;
139
- $o(i, "Layout changes"), B(() => {
140
+ Wo(i, "Layout changes"), B(() => {
140
141
  if (!i) return;
141
142
  const s = (l) => {
142
143
  o.flush(), l.preventDefault(), l.returnValue = "";
@@ -147,28 +148,28 @@ function ma(o) {
147
148
  return window.addEventListener("pagehide", s), () => window.removeEventListener("pagehide", s);
148
149
  }, [o.flush]);
149
150
  }
150
- function fa(o) {
151
- const i = So(), s = Vt(o);
151
+ function ha(o) {
152
+ const i = To(), s = Ht(o);
152
153
  return L(
153
154
  (l, m) => {
154
155
  const d = Number(l.layout.id);
155
- Number.isFinite(d) && i.invalidateQueries({ queryKey: ia.versions(d) }), s({ lazy: !la(m) });
156
+ Number.isFinite(d) && i.invalidateQueries({ queryKey: la.versions(d) }), s({ lazy: !da(m) });
156
157
  },
157
158
  [i, s]
158
159
  );
159
160
  }
160
- function ha(o, i) {
161
- const s = Ko();
162
- return To({
161
+ function ya(o, i) {
162
+ const s = Mo();
163
+ return Lo({
163
164
  queryKey: ["layout-editor", "preview-record", o, i],
164
165
  queryFn: () => s.request(
165
- Mo(`/items/${encodeURIComponent(o)}/${encodeURIComponent(String(i))}`)
166
+ _o(`/items/${encodeURIComponent(o)}/${encodeURIComponent(String(i))}`)
166
167
  ).then((l) => l.data ?? null),
167
168
  enabled: i != null,
168
169
  staleTime: 3e4
169
170
  });
170
171
  }
171
- function ya(o, i) {
172
+ function va(o, i) {
172
173
  const s = z(i);
173
174
  s.current = i, B(() => {
174
175
  if (!o) return;
@@ -198,13 +199,13 @@ function ya(o, i) {
198
199
  }
199
200
  function Ge(o, i, s = null) {
200
201
  const l = (m) => {
201
- if (o.kind === "group") return o.key === _o || m.groups.some((u) => u.key === o.key);
202
- const d = o.kind === "header" ? $t : o.group_key;
202
+ if (o.kind === "group") return o.key === Bo || m.groups.some((u) => u.key === o.key);
203
+ const d = o.kind === "header" ? Wt : o.group_key;
203
204
  return m.placements.some((u) => u.field === o.field && u.group_key === d);
204
205
  };
205
206
  return l(i) || s != null && l(s);
206
207
  }
207
- function va(o, i, s) {
208
+ function ga(o, i, s) {
208
209
  const l = z(null), m = z(i);
209
210
  return m.current = i, B(() => {
210
211
  var v;
@@ -219,7 +220,7 @@ function va(o, i, s) {
219
220
  };
220
221
  }, [o, s]), l;
221
222
  }
222
- function ga({
223
+ function ka({
223
224
  collection: o,
224
225
  bundle: i,
225
226
  parent: s,
@@ -242,26 +243,26 @@ function ga({
242
243
  whenIdle: q,
243
244
  fillRate: re,
244
245
  unsaved: U,
245
- peers: A,
246
+ peers: N,
246
247
  compare: Q,
247
248
  lastChanges: ue
248
249
  }) {
249
- const Pe = br(), pe = g ? xr : Pe, b = Cr(String(i.layout.layout_type ?? "grouped")), W = (b === "item-edit-form" || b === "read-view") && (Q == null ? void 0 : Q.diff.bundle) || i, O = w(() => Wt(W, s), [W, s]), V = w(
250
- () => s ? Zr(i, s) : null,
250
+ const Pe = xr(), pe = g ? Sr : Pe, b = Rr(String(i.layout.layout_type ?? "grouped")), W = (b === "item-edit-form" || b === "read-view") && (Q == null ? void 0 : Q.diff.bundle) || i, O = w(() => Vt(W, s), [W, s]), V = w(
251
+ () => s ? Qr(i, s) : null,
251
252
  [i, s]
252
253
  ), Y = w(() => V != null && V.size ? (f) => {
253
254
  const K = V.get($(f)), C = (d == null ? void 0 : d(f)) ?? [];
254
- return K ? [...C, Qr(K)] : C;
255
+ return K ? [...C, Yr(K)] : C;
255
256
  } : d, [V, d]), Te = w(
256
- () => sr(O.active, l, le),
257
+ () => ir(O.active, l, le),
257
258
  [O.active, l, le]
258
- ), { data: H = null } = Vn(o, l), me = w(
259
- () => l ? ir(H) : void 0,
259
+ ), { data: H = null } = Hn(o, l), me = w(
260
+ () => l ? lr(H) : void 0,
260
261
  [l, H]
261
- ), ne = w(() => Pr(i), [i]), Ae = w(
262
+ ), ne = w(() => Nr(i), [i]), Ne = w(
262
263
  () => Y && v ? (f) => [...Y(f), ...v(f)] : Y ?? v,
263
264
  [Y, v]
264
- ), de = Pn(i, Ae), T = _n(de), J = Wn(i, T.marks), N = w(
265
+ ), de = Nn(i, Ne), T = Bn(de), J = Vn(i, T.marks), A = w(
265
266
  () => ({
266
267
  selected: we,
267
268
  selection: be,
@@ -280,7 +281,7 @@ function ga({
280
281
  fold: n,
281
282
  reveal: Se,
282
283
  unsaved: U,
283
- peers: A,
284
+ peers: N,
284
285
  diffMark: Q ? (f) => Q.diff.marks.get($(f)) ?? null : void 0,
285
286
  lastChange: ue ? (f) => f.kind === "group" ? ue[f.key] ?? null : null : void 0,
286
287
  ghost: p,
@@ -294,7 +295,7 @@ function ga({
294
295
  patch: { col_span: K === 12 ? null : K }
295
296
  }
296
297
  ],
297
- { label: `Set the width to ${Hr[K] ?? K}` }
298
+ { label: `Set the width to ${jr[K] ?? K}` }
298
299
  );
299
300
  }
300
301
  }),
@@ -313,7 +314,7 @@ function ga({
313
314
  n,
314
315
  Se,
315
316
  U,
316
- A,
317
+ N,
317
318
  Q,
318
319
  ue,
319
320
  p,
@@ -321,9 +322,9 @@ function ga({
321
322
  t,
322
323
  g
323
324
  ]
324
- ), E = qr(c);
325
+ ), E = Ur(c);
325
326
  return /* @__PURE__ */ r("div", { ref: E, className: "flex min-h-0 flex-1 flex-col", children: /* @__PURE__ */ r(
326
- Rr,
327
+ Or,
327
328
  {
328
329
  collection: o,
329
330
  bundle: W,
@@ -331,13 +332,13 @@ function ga({
331
332
  record: Z,
332
333
  stateKey: m,
333
334
  roleId: l,
334
- design: N,
335
+ design: A,
335
336
  apply: t,
336
337
  whenIdle: q
337
338
  }
338
339
  ) });
339
340
  }
340
- function ka({
341
+ function wa({
341
342
  collection: o,
342
343
  name: i,
343
344
  row: s,
@@ -346,7 +347,7 @@ function ka({
346
347
  fields: d,
347
348
  onDone: u
348
349
  }) {
349
- const v = bn(o, d, m), { data: p } = xn(o, s, m), c = na(aa(l).data), g = s ? s.section === "forms" && (s.reason.kind === "default" || s.reason.kind === "fallback") ? [{ text: "used by every record no rule catches" }] : Sn(s, d, v) : [];
350
+ const v = xn(o, d, m), { data: p } = Sn(o, s, m), c = aa(sa(l).data), g = s ? s.section === "forms" && (s.reason.kind === "default" || s.reason.kind === "fallback") ? [{ text: "used by every record no rule catches" }] : Tn(s, d, v) : [];
350
351
  return g.length > 0 && typeof p == "number" && g.push({ text: ` (≈ ${p.toLocaleString()} ${p === 1 ? "record" : "records"})` }), c && g.push({ text: g.length > 0 ? `; ${c}` : c }), /* @__PURE__ */ y(
351
352
  "div",
352
353
  {
@@ -358,7 +359,7 @@ function ka({
358
359
  /* @__PURE__ */ r("b", { className: "font-semibold text-slate-900 dark:text-foreground", children: i }),
359
360
  g.length > 0 && /* @__PURE__ */ y(ie, { children: [
360
361
  " — ",
361
- /* @__PURE__ */ r(Tn, { segs: g, muted: !0 })
362
+ /* @__PURE__ */ r(Ln, { segs: g, muted: !0 })
362
363
  ] })
363
364
  ] }),
364
365
  /* @__PURE__ */ r(
@@ -374,7 +375,7 @@ function ka({
374
375
  }
375
376
  );
376
377
  }
377
- function wa({ view: o, onView: i }) {
378
+ function ba({ view: o, onView: i }) {
378
379
  const s = (l, m, d, u) => /* @__PURE__ */ y(
379
380
  "button",
380
381
  {
@@ -384,7 +385,7 @@ function wa({ view: o, onView: i }) {
384
385
  "data-editor-view": l,
385
386
  "data-tip": u,
386
387
  onClick: () => i(l),
387
- className: G(On(o === l), "inline-flex items-center justify-center gap-1"),
388
+ className: G(Pn(o === l), "inline-flex items-center justify-center gap-1"),
388
389
  children: [
389
390
  /* @__PURE__ */ r(d, { className: "h-3.5 w-3.5 shrink-0" }),
390
391
  /* @__PURE__ */ r("span", { "data-tb-xwide": "", children: m })
@@ -395,17 +396,17 @@ function wa({ view: o, onView: i }) {
395
396
  "fieldset",
396
397
  {
397
398
  "aria-label": "Show the form as",
398
- className: G("m-0 min-w-0 shrink-0 border-0", Rn(4)),
399
+ className: G("m-0 min-w-0 shrink-0 border-0", On(4)),
399
400
  children: [
400
- s("canvas", "Canvas", No, "The form as people see it"),
401
- s("table", "Table", Eo, "Every field as a row: label, section, width, rules"),
401
+ s("canvas", "Canvas", Eo, "The form as people see it"),
402
+ s("table", "Table", Io, "Every field as a row: label, section, width, rules"),
402
403
  s(
403
404
  "states",
404
405
  "States",
405
- Io,
406
+ Do,
406
407
  "Every field by workflow state: editable, read-only, required"
407
408
  ),
408
- s("roles", "Roles", Do, "Every section by role: can edit, read-only, hidden")
409
+ s("roles", "Roles", Fo, "Every section by role: can edit, read-only, hidden")
409
410
  ]
410
411
  }
411
412
  );
@@ -414,7 +415,7 @@ const Ze = (o) => G(
414
415
  "inline-flex h-7 items-center gap-1 rounded-md px-2.5 text-[12px] font-medium transition-colors",
415
416
  o ? "bg-accent text-slate-900 dark:text-foreground" : "text-slate-500 hover:bg-muted hover:text-slate-800 dark:text-muted-foreground dark:hover:text-foreground"
416
417
  );
417
- function mi({
418
+ function hi({
418
419
  collection: o,
419
420
  layoutId: i,
420
421
  onBack: s,
@@ -424,41 +425,41 @@ function mi({
424
425
  portalContainer: u,
425
426
  onDirtyChange: v
426
427
  }) {
427
- var Ct, Rt, Ot, Pt, At, Nt;
428
- const p = Gr(), [c, g] = P(i);
428
+ var Ct, Rt, Ot, Pt, Nt, At;
429
+ const p = Zr(), [c, g] = P(i);
429
430
  B(() => g(i), [i]);
430
- const Z = fa(o), { draft: we, recorder: be } = ar(
431
+ const Z = ha(o), { draft: we, recorder: be } = sr(
431
432
  // The record page's automatic Owners tile is listed like any header tile (Rob 2026-11-13).
432
- sa(c, { onSaved: Z, autoOwnersTile: !0 })
433
- ), { draft: xe, removed: le } = Fn(we, c), { draft: n, value: Se } = Mn(c, xe), t = n.bundle, [q, re] = P("layouts"), [U, A] = P("inspector"), [Q, ue] = tr(), [Pe, pe] = P(null), [b, F] = P([]), W = b.length > 0 ? b[b.length - 1] : null, [O, V] = P("canvas"), [Y, Te] = P(!1), [H, me] = oa(), { data: ne } = ra(o, H), Ae = w(
433
+ ia(c, { onSaved: Z, autoOwnersTile: !0 })
434
+ ), { draft: xe, removed: le } = Kn(we, c), { draft: n, value: Se } = _n(c, xe), t = n.bundle, [q, re] = P("layouts"), [U, N] = P("inspector"), [Q, ue] = or(), [Pe, pe] = P(null), [b, F] = P([]), W = b.length > 0 ? b[b.length - 1] : null, [O, V] = P("canvas"), [Y, Te] = P(!1), [H, me] = ra(), { data: ne } = na(o, H), Ne = w(
434
435
  () => H && ne && ne.total > 0 ? (e) => ne.pct.get(e) ?? null : void 0,
435
436
  [H, ne]
436
- ), de = ea(c), [T, J] = P({
437
+ ), de = ta(c), [T, J] = P({
437
438
  record: d ? { id: d, label: `#${d}` } : null,
438
439
  roleId: null
439
- }), { data: N } = kn(o), { data: E = [] } = wn(o), f = N == null ? void 0 : N.rows.find((e) => e.layout_id === c), K = (t == null ? void 0 : t.layout.parent_layout_id) != null ? Number(t.layout.parent_layout_id) : null, { data: C = null } = je(K), { data: Ht = null } = ha(o, ((Ct = T.record) == null ? void 0 : Ct.id) ?? null), fe = w(
440
- () => t ? Wt(t, C).active : null,
440
+ }), { data: A } = wn(o), { data: E = [] } = bn(o), f = A == null ? void 0 : A.rows.find((e) => e.layout_id === c), K = (t == null ? void 0 : t.layout.parent_layout_id) != null ? Number(t.layout.parent_layout_id) : null, { data: C = null } = je(K), { data: jt = null } = ya(o, ((Ct = T.record) == null ? void 0 : Ct.id) ?? null), fe = w(
441
+ () => t ? Vt(t, C).active : null,
441
442
  [t, C]
442
443
  );
443
- Wo(Dt);
444
- const jt = w(() => Vo(fe), [fe]), Le = an(o, t, C), Ye = on(U === "checks"), { data: Ne } = je(c), Je = w(() => Ne ? Uo(Ne) : null, [Ne]), X = lr(t, Je, n.unsavedCount, c), { data: Gt } = jr(c, t != null), [Xe, Zt] = P([]), Qt = w(() => {
445
- const e = Yo(Xe), a = /* @__PURE__ */ new WeakMap();
444
+ Vo(Ft);
445
+ const Gt = w(() => Ho(fe), [fe]), Le = sn(o, t, C), Ye = rn(U === "checks"), { data: Ae } = je(c), Je = w(() => Ae ? zo(Ae) : null, [Ae]), X = dr(t, Je, n.unsavedCount, c), { data: Zt } = Gr(c, t != null), [Xe, Qt] = P([]), Yt = w(() => {
446
+ const e = Jo(Xe), a = /* @__PURE__ */ new WeakMap();
446
447
  return (h) => {
447
- if (!h || !e) return Kt(h, e);
448
+ if (!h || !e) return Mt(h, e);
448
449
  const S = a.get(h);
449
450
  if (S) return S;
450
- const D = Kt(h, e);
451
+ const D = Mt(h, e);
451
452
  return a.set(h, D), D;
452
453
  };
453
- }, [Xe]), [he, Yt] = Kr(), ee = zr(o, fe, he), ye = $r(
454
+ }, [Xe]), [he, Jt] = Mr(), ee = $r(o, fe, he), ye = Wr(
454
455
  o,
455
456
  fe,
456
457
  he && !T.record && !T.sample
457
- ), { data: ce } = je(c), te = Bo(((Rt = ce == null ? void 0 : ce.layout) == null ? void 0 : Rt.conditions) ?? ((Ot = t == null ? void 0 : t.layout) == null ? void 0 : Ot.conditions)), I = Mt(ce == null ? void 0 : ce.layout) ?? Mt(t == null ? void 0 : t.layout) ?? (te ? "note" : null), [ve, Ee] = P({ reason: "", ticket: "" }), [et, tt] = P(null), Ie = z(ve);
458
+ ), { data: ce } = je(c), te = qo(((Rt = ce == null ? void 0 : ce.layout) == null ? void 0 : Rt.conditions) ?? ((Ot = t == null ? void 0 : t.layout) == null ? void 0 : Ot.conditions)), I = _t(ce == null ? void 0 : ce.layout) ?? _t(t == null ? void 0 : t.layout) ?? (te ? "note" : null), [ve, Ee] = P({ reason: "", ticket: "" }), [et, tt] = P(null), Ie = z(ve);
458
459
  Ie.current = ve;
459
460
  const ot = L(async () => {
460
461
  const e = I ? {
461
- ...cr(Ie.current),
462
+ ...ur(Ie.current),
462
463
  ...te ? { freeze_override: Ie.current.reason.trim() } : {}
463
464
  } : void 0;
464
465
  await n.save(e);
@@ -473,17 +474,17 @@ function mi({
473
474
  B(() => {
474
475
  I && n.autosave && n.setAutosave(!1);
475
476
  }, [I, n.autosave, n.setAutosave]);
476
- const Jt = I ? { ...n, save: rt, setAutosave: void 0 } : n;
477
- ua(I ? { ...n, save: rt } : n), ma(n);
478
- const M = z(null), [Xt, nt] = P(null), at = z(n.dirty);
477
+ const Xt = I ? { ...n, save: rt, setAutosave: void 0 } : n;
478
+ pa(I ? { ...n, save: rt } : n), fa(n);
479
+ const M = z(null), [eo, nt] = P(null), at = z(n.dirty);
479
480
  at.current = n.dirty;
480
481
  const ae = L((e, a, h) => {
481
482
  var D, ke;
482
483
  if (!at.current) return a();
483
484
  const S = ((D = M.current) == null ? void 0 : D.querySelector("[data-editor-save]")) ?? ((ke = M.current) == null ? void 0 : ke.querySelector("[data-editor-topbar]")) ?? null;
484
485
  nt({ what: e, go: a, anchor: h ?? S });
485
- }, []), eo = ot;
486
- ya(n.dirty, (e, a) => ae("leave this page", e, a)), B(() => {
486
+ }, []), to = ot;
487
+ va(n.dirty, (e, a) => ae("leave this page", e, a)), B(() => {
487
488
  v == null || v(n.dirty);
488
489
  }, [n.dirty, v]);
489
490
  const st = z(n.unsavedOps);
@@ -493,7 +494,7 @@ function mi({
493
494
  },
494
495
  []
495
496
  );
496
- const it = Vt(o), lt = L(() => {
497
+ const it = Ht(o), lt = L(() => {
497
498
  const e = n.whenIdle();
498
499
  e.then(() => it()), s(e);
499
500
  }, [n.whenIdle, it, s]), De = L(
@@ -505,11 +506,11 @@ function mi({
505
506
  const e = b.filter((a) => Ge(a, t, C));
506
507
  e.length !== b.length && F(e);
507
508
  }, [b, t, C]);
508
- const se = l === "overlay", [Fe, to] = P(null), Ke = z(!1), oo = L((e) => {
509
+ const se = l === "overlay", [Fe, oo] = P(null), Ke = z(!1), ro = L((e) => {
509
510
  Ke.current = e;
510
- }, []), ro = va(se && Fe != null, () => De(), Ke), R = L((e, a) => {
511
- F((h) => kr(h, e, a)), A("inspector");
512
- }, []), dt = L((e) => F([e]), []), _ = Nr(t, n.apply), no = w(() => _.intercept(R), [_.intercept, R]), [Me, ao] = P(!1), _e = Ir(), Be = w(
511
+ }, []), no = ga(se && Fe != null, () => De(), Ke), R = L((e, a) => {
512
+ F((h) => wr(h, e, a)), N("inspector");
513
+ }, []), dt = L((e) => F([e]), []), _ = Er(t, n.apply), ao = w(() => _.intercept(R), [_.intercept, R]), [Me, so] = P(!1), _e = Dr(), Be = w(
513
514
  () => ({
514
515
  tabOrderActive: _.active,
515
516
  startTabOrder: () => {
@@ -521,7 +522,7 @@ function mi({
521
522
  (e, a) => {
522
523
  if (e.kind === "group") return R({ kind: "group", key: e.key });
523
524
  if (e.kind === "tab") {
524
- R(a), (a.kind === "field" || a.kind === "header") && Jr(a.field, e.tab);
525
+ R(a), (a.kind === "field" || a.kind === "header") && Xr(a.field, e.tab);
525
526
  return;
526
527
  }
527
528
  if (e.kind === "pipeline")
@@ -535,22 +536,22 @@ function mi({
535
536
  );
536
537
  },
537
538
  [R, ae, p, o]
538
- ), so = w(() => {
539
+ ), io = w(() => {
539
540
  const e = /* @__PURE__ */ new Map();
540
541
  for (const [a, h] of ye)
541
542
  (h.type === "boolean" || h.text.endsWith(" linked")) && e.set(a, h.text);
542
- return Mr(ee, { chips: he, ghostTags: e, open: ct });
543
- }, [ee, he, ye, ct]), io = w(
543
+ return _r(ee, { chips: he, ghostTags: e, open: ct });
544
+ }, [ee, he, ye, ct]), lo = w(
544
545
  () => ye.size > 0 ? (e) => {
545
546
  var a;
546
547
  return ((a = ye.get(e)) == null ? void 0 : a.text) ?? null;
547
548
  } : void 0,
548
549
  [ye]
549
- ), lo = L(
550
+ ), co = L(
550
551
  (e) => {
551
552
  const a = t == null ? void 0 : t.placements.find((S) => S.field === e);
552
553
  if (!a) return;
553
- const h = a.group_key === $t ? { kind: "header", field: e } : { kind: "field", field: e, group_key: a.group_key };
554
+ const h = a.group_key === Wt ? { kind: "header", field: e } : { kind: "field", field: e, group_key: a.group_key };
554
555
  R(h), requestAnimationFrame(
555
556
  () => {
556
557
  var S, D;
@@ -560,14 +561,14 @@ function mi({
560
561
  },
561
562
  [t, R]
562
563
  );
563
- pa(t, b, n.apply, Ke, dt);
564
- const co = L(
565
- (e) => Ur(e, ee.describe),
564
+ ma(t, b, n.apply, Ke, dt);
565
+ const uo = L(
566
+ (e) => zr(e, ee.describe),
566
567
  [ee.describe]
567
- ), uo = Sr(o, ee.deps, co, ee.groupLabel), po = w(
568
+ ), po = Tr(o, ee.deps, uo, ee.groupLabel), mo = w(
568
569
  () => ({ run: n.undo, label: n.undoLabel }),
569
570
  [n.undo, n.undoLabel]
570
- ), qe = An(c, W ? $(W) : null), ut = w(() => Nn(qe), [qe]), mo = L(
571
+ ), qe = An(c, W ? $(W) : null), ut = w(() => En(qe), [qe]), fo = L(
571
572
  (e) => (ut.get($(e)) ?? []).map((a) => ({
572
573
  id: a.id,
573
574
  name: a.name,
@@ -575,15 +576,15 @@ function mi({
575
576
  chip: a.tone.chip
576
577
  })),
577
578
  [ut]
578
- ), pt = w(() => Xn(n.unsavedSteps), [n.unsavedSteps]), fo = L((e) => pt.has($(e)), [pt]), [mt, Ce] = P(null), ft = L((e) => {
579
- V("canvas"), F([e]), A("inspector"), requestAnimationFrame(() => {
579
+ ), pt = w(() => ea(n.unsavedSteps), [n.unsavedSteps]), ho = L((e) => pt.has($(e)), [pt]), [mt, Ce] = P(null), ft = L((e) => {
580
+ V("canvas"), F([e]), N("inspector"), requestAnimationFrame(() => {
580
581
  var h;
581
582
  const a = document.querySelector(
582
583
  `[data-layout-editor] [data-design-target="${CSS.escape($(e))}"]`
583
584
  );
584
585
  (h = a == null ? void 0 : a.scrollIntoView) == null || h.call(a, { block: "center" }), a == null || a.focus({ preventScroll: !0 });
585
586
  });
586
- }, []), ho = zo(), j = jn(c), ht = Gn(), yo = w(
587
+ }, []), yo = $o(), j = Gn(c), ht = Zn(), vo = w(
587
588
  () => {
588
589
  var e, a;
589
590
  return {
@@ -594,12 +595,12 @@ function mi({
594
595
  };
595
596
  },
596
597
  [j.isFetched, j.isError, j.data, ht]
597
- ), Re = Tr(n, c, ho, yo), vo = L(
598
+ ), Re = Lr(n, c, yo, vo), go = L(
598
599
  (e) => J((a) => a.roleId === e ? a : { ...a, roleId: e }),
599
600
  []
600
601
  ), oe = (e) => {
601
602
  var S;
602
- if (A("inspector"), e === c) return;
603
+ if (N("inspector"), e === c) return;
603
604
  const a = document.activeElement, h = a instanceof HTMLElement && ((S = M.current) != null && S.contains(a)) ? a : null;
604
605
  ae(
605
606
  "open another form",
@@ -608,21 +609,21 @@ function mi({
608
609
  },
609
610
  h
610
611
  );
611
- }, go = qn(o, t, (N == null ? void 0 : N.rows) ?? [], oe), ko = L(
612
- (e) => t ? or(e, {
612
+ }, ko = Un(o, t, (A == null ? void 0 : A.rows) ?? [], oe), wo = L(
613
+ (e) => t ? rr(e, {
613
614
  bundle: t,
614
615
  selection: b,
615
616
  select: (a) => {
616
- F([a]), A("inspector");
617
+ F([a]), N("inspector");
617
618
  },
618
- openSettings: () => A("settings"),
619
+ openSettings: () => N("settings"),
619
620
  openAddPanel: () => re("add"),
620
621
  root: M.current
621
622
  }) : Promise.resolve({ ok: !1, message: "The form is still loading" }),
622
623
  [t, b]
623
624
  ), yt = z(oe);
624
625
  yt.current = oe;
625
- const wo = L(
626
+ const bo = L(
626
627
  (e) => {
627
628
  if (e.kind === "record")
628
629
  J((a) => ({ ...a, record: { id: e.id, label: `#${e.id}` }, sample: null }));
@@ -640,7 +641,7 @@ function mi({
640
641
  }
641
642
  },
642
643
  [t, R]
643
- ), ge = String((t == null ? void 0 : t.layout.name) ?? (f == null ? void 0 : f.name) ?? ""), Ue = String((t == null ? void 0 : t.layout.layout_type) ?? (f == null ? void 0 : f.layout_type) ?? "grouped"), k = Ue !== "table" && Ue !== "file", x = fn({
644
+ ), ge = String((t == null ? void 0 : t.layout.name) ?? (f == null ? void 0 : f.name) ?? ""), Ue = String((t == null ? void 0 : t.layout.layout_type) ?? (f == null ? void 0 : f.layout_type) ?? "grouped"), k = Ue !== "table" && Ue !== "file", x = hn({
644
645
  bodyRef: M,
645
646
  bundle: t,
646
647
  parent: C,
@@ -649,7 +650,7 @@ function mi({
649
650
  showHidden: Y,
650
651
  setShowHidden: Te,
651
652
  canvasShown: !(k && O === "table")
652
- }), vt = x.outlineOpen && !!t && k, gt = z(null), ze = yn(x.zoom, x.compact), { zoom: kt, setZoom: $e, compact: wt } = x, bt = Dn(
653
+ }), vt = x.outlineOpen && !!t && k, gt = z(null), ze = vn(x.zoom, x.compact), { zoom: kt, setZoom: $e, compact: wt } = x, bt = Fn(
653
654
  T.device,
654
655
  T.roleId && T.compareRoleId ? 2 : 1
655
656
  ), xt = w(
@@ -658,11 +659,11 @@ function mi({
658
659
  onChange: $e,
659
660
  onFit: () => {
660
661
  var e;
661
- return $e(hn(((e = gt.current) == null ? void 0 : e.clientWidth) ?? 0, bt, wt));
662
+ return $e(yn(((e = gt.current) == null ? void 0 : e.clientWidth) ?? 0, bt, wt));
662
663
  }
663
664
  }),
664
665
  [kt, $e, wt, bt]
665
- ), St = p.warning ?? (N == null ? void 0 : N.warning) ?? null, We = Cn({
666
+ ), St = p.warning ?? (A == null ? void 0 : A.warning) ?? null, We = Rn({
666
667
  bundle: t,
667
668
  savedBundle: Je ?? null,
668
669
  collection: o,
@@ -673,27 +674,27 @@ function mi({
673
674
  apply: n.apply,
674
675
  onSelection: F,
675
676
  rootRef: M
676
- }), bo = se ? {
677
+ }), xo = se ? {
677
678
  role: "dialog",
678
679
  "aria-modal": !0,
679
680
  "aria-label": `Edit form ${ge}`,
680
681
  tabIndex: -1
681
- } : {}, xo = /* @__PURE__ */ y(
682
+ } : {}, So = /* @__PURE__ */ y(
682
683
  "div",
683
684
  {
684
685
  ref: (e) => {
685
- M.current = e, se && (ro.current = e);
686
+ M.current = e, se && (no.current = e);
686
687
  },
687
688
  "data-layout-editor": "",
688
689
  "data-mode": l,
689
- ...bo,
690
+ ...xo,
690
691
  className: G(
691
692
  "flex min-h-0 flex-col bg-slate-50 outline-none dark:bg-background",
692
693
  se ? "fixed inset-0 z-[90]" : "flex-1"
693
694
  ),
694
695
  children: [
695
696
  /* @__PURE__ */ r(
696
- Or,
697
+ Pr,
697
698
  {
698
699
  collection: o,
699
700
  layoutId: c,
@@ -701,7 +702,7 @@ function mi({
701
702
  layoutType: Ue,
702
703
  row: f,
703
704
  fields: E,
704
- draft: Jt,
705
+ draft: Xt,
705
706
  preview: T,
706
707
  onPreview: J,
707
708
  showHidden: Y,
@@ -712,23 +713,23 @@ function mi({
712
713
  onReviewChanges: X.toggleReview,
713
714
  reviewing: ((Pt = X.compare) == null ? void 0 : Pt.kind) === "unsaved",
714
715
  onOpenUnsaved: Ce,
715
- pendingTip: Lr(Re.sync),
716
+ pendingTip: Cr(Re.sync),
716
717
  presence: /* @__PURE__ */ y(ie, { children: [
717
718
  /* @__PURE__ */ r(
718
- fr,
719
+ hr,
719
720
  {
720
721
  peers: qe,
721
722
  describe: (e) => {
722
- const a = qt(e);
723
- return a && t && Ge(a, t, C) ? Ut(a, t, E) : null;
723
+ const a = Ut(e);
724
+ return a && t && Ge(a, t, C) ? zt(a, t, E) : null;
724
725
  },
725
726
  onJump: (e) => {
726
- const a = qt(e);
727
+ const a = Ut(e);
727
728
  a && ft(a);
728
729
  }
729
730
  }
730
731
  ),
731
- /* @__PURE__ */ r(zn, { others: ((At = j.data) == null ? void 0 : At.others) ?? [] })
732
+ /* @__PURE__ */ r($n, { others: ((Nt = j.data) == null ? void 0 : Nt.others) ?? [] })
732
733
  ] }),
733
734
  onSelectField: (e) => {
734
735
  var a;
@@ -739,17 +740,17 @@ function mi({
739
740
  });
740
741
  },
741
742
  view: t && k ? /* @__PURE__ */ y(ie, { children: [
742
- /* @__PURE__ */ r(wa, { view: O, onView: V }),
743
- /* @__PURE__ */ r(_r, { on: he, onChange: Yt })
743
+ /* @__PURE__ */ r(ba, { view: O, onView: V }),
744
+ /* @__PURE__ */ r(Br, { on: he, onChange: Jt })
744
745
  ] }) : null,
745
746
  tools: /* @__PURE__ */ y(ie, { children: [
746
- t && k && /* @__PURE__ */ r(Zo, { bundle: t, apply: n.apply }),
747
- t && /* @__PURE__ */ r(dn, { find: x.find }),
748
- t && k && /* @__PURE__ */ r(Wr, { bundle: t, apply: n.apply, collection: o }),
749
- t && k && /* @__PURE__ */ r(gn, { bundle: t, apply: n.apply, collection: o }),
747
+ t && k && /* @__PURE__ */ r(Qo, { bundle: t, apply: n.apply }),
748
+ t && /* @__PURE__ */ r(cn, { find: x.find }),
749
+ t && k && /* @__PURE__ */ r(Vr, { bundle: t, apply: n.apply, collection: o }),
750
+ t && k && /* @__PURE__ */ r(kn, { bundle: t, apply: n.apply, collection: o }),
750
751
  /* @__PURE__ */ r(Oe, {}),
751
752
  t && /* @__PURE__ */ r(
752
- cn,
753
+ un,
753
754
  {
754
755
  outline: k ? {
755
756
  open: x.outlineOpen,
@@ -758,7 +759,7 @@ function mi({
758
759
  }
759
760
  ),
760
761
  t && /* @__PURE__ */ r(
761
- un,
762
+ pn,
762
763
  {
763
764
  view: k && O === "canvas" ? {
764
765
  compact: x.compact,
@@ -773,7 +774,7 @@ function mi({
773
774
  He,
774
775
  {
775
776
  label: "Show how full each field is",
776
- icon: /* @__PURE__ */ r(Lo, { className: "h-3.5 w-3.5" }),
777
+ icon: /* @__PURE__ */ r(Co, { className: "h-3.5 w-3.5" }),
777
778
  hint: "The share of records with a value, on each field",
778
779
  checked: H,
779
780
  onClick: () => me(!H),
@@ -784,7 +785,7 @@ function mi({
784
785
  He,
785
786
  {
786
787
  label: "Show where saves fail",
787
- icon: /* @__PURE__ */ r(Co, { className: "h-3.5 w-3.5" }),
788
+ icon: /* @__PURE__ */ r(Ro, { className: "h-3.5 w-3.5" }),
788
789
  hint: "Tint each field by how often a save is refused on it",
789
790
  checked: de.on,
790
791
  onClick: () => de.setOn(!de.on),
@@ -795,7 +796,7 @@ function mi({
795
796
  He,
796
797
  {
797
798
  label: "Set the tab order",
798
- icon: /* @__PURE__ */ r(Ro, { className: "h-3.5 w-3.5" }),
799
+ icon: /* @__PURE__ */ r(Oo, { className: "h-3.5 w-3.5" }),
799
800
  hint: "Click fields in the order Tab should visit them",
800
801
  checked: _.active,
801
802
  onClick: () => _.active ? _.cancel() : Be.startTabOrder(),
@@ -803,17 +804,17 @@ function mi({
803
804
  }
804
805
  ),
805
806
  t && k && /* @__PURE__ */ r(
806
- Dr,
807
+ Fr,
807
808
  {
808
809
  on: Me,
809
- onChange: ao,
810
+ onChange: so,
810
811
  appDark: _e,
811
812
  disabled: O !== "canvas"
812
813
  }
813
814
  ),
814
815
  /* @__PURE__ */ r(Oe, {}),
815
816
  /* @__PURE__ */ r(
816
- nr,
817
+ ar,
817
818
  {
818
819
  collection: o,
819
820
  layoutId: c,
@@ -821,13 +822,13 @@ function mi({
821
822
  recorder: be
822
823
  }
823
824
  ),
824
- /* @__PURE__ */ r(Vr, { bundle: t, collection: o }),
825
+ /* @__PURE__ */ r(Hr, { bundle: t, collection: o }),
825
826
  /* @__PURE__ */ r(Oe, {}),
826
- t && /* @__PURE__ */ r(pn, { shortcuts: x.shortcuts })
827
+ t && /* @__PURE__ */ r(mn, { shortcuts: x.shortcuts })
827
828
  ] }),
828
829
  ai: /* @__PURE__ */ y(ie, { children: [
829
830
  t && k && /* @__PURE__ */ r(
830
- Jo,
831
+ Xo,
831
832
  {
832
833
  collection: o,
833
834
  layoutId: c,
@@ -836,30 +837,30 @@ function mi({
836
837
  }
837
838
  ),
838
839
  t && /* @__PURE__ */ r(
839
- Qo,
840
+ Yo,
840
841
  {
841
842
  collection: o,
842
843
  layoutId: c,
843
844
  bundle: t,
844
845
  apply: n.apply,
845
846
  previewRecordShown: T.record != null,
846
- onPins: Zt,
847
+ onPins: Qt,
847
848
  onSelect: R
848
849
  }
849
850
  ),
850
851
  /* @__PURE__ */ r(Oe, {}),
851
852
  t && p.isAdmin && /* @__PURE__ */ r(
852
- Xo,
853
+ er,
853
854
  {
854
855
  active: U === "ask",
855
- onClick: () => A((e) => e === "ask" ? "inspector" : "ask")
856
+ onClick: () => N((e) => e === "ask" ? "inspector" : "ask")
856
857
  }
857
858
  ),
858
- /* @__PURE__ */ r(gr, { collection: o, layoutId: c, draft: n }),
859
- t && /* @__PURE__ */ r(rr, { layoutId: c, draft: n })
859
+ /* @__PURE__ */ r(kr, { collection: o, layoutId: c, draft: n }),
860
+ t && /* @__PURE__ */ r(nr, { layoutId: c, draft: n })
860
861
  ] }),
861
862
  testing: t ? /* @__PURE__ */ r(
862
- Qn,
863
+ Yn,
863
864
  {
864
865
  collection: o,
865
866
  layoutId: c,
@@ -871,7 +872,7 @@ function mi({
871
872
  }
872
873
  ) : null,
873
874
  beforeSave: t ? /* @__PURE__ */ r(
874
- Zn,
875
+ Qn,
875
876
  {
876
877
  collection: o,
877
878
  layoutId: c,
@@ -884,7 +885,7 @@ function mi({
884
885
  ) : null,
885
886
  previewExtra: /* @__PURE__ */ y(ie, { children: [
886
887
  /* @__PURE__ */ r(
887
- En,
888
+ In,
888
889
  {
889
890
  collection: o,
890
891
  value: T,
@@ -893,18 +894,18 @@ function mi({
893
894
  fields: E
894
895
  }
895
896
  ),
896
- /* @__PURE__ */ r(Ho, { scope: Dt, options: jt })
897
+ /* @__PURE__ */ r(jo, { scope: Ft, options: Gt })
897
898
  ] }),
898
899
  problems: t && /* @__PURE__ */ r(
899
- rn,
900
+ nn,
900
901
  {
901
902
  findings: Le.findings,
902
903
  active: U === "checks",
903
- onClick: () => A((e) => e === "checks" ? "inspector" : "checks")
904
+ onClick: () => N((e) => e === "checks" ? "inspector" : "checks")
904
905
  }
905
906
  ),
906
907
  more: /* @__PURE__ */ r(
907
- Kn,
908
+ Mn,
908
909
  {
909
910
  collection: o,
910
911
  bundle: t,
@@ -915,13 +916,13 @@ function mi({
915
916
  }
916
917
  ),
917
918
  se && /* @__PURE__ */ r(
918
- ka,
919
+ wa,
919
920
  {
920
921
  collection: o,
921
922
  layoutId: c,
922
923
  name: ge,
923
924
  row: f,
924
- rows: (N == null ? void 0 : N.rows) ?? [],
925
+ rows: (A == null ? void 0 : A.rows) ?? [],
925
926
  fields: E,
926
927
  onDone: De
927
928
  }
@@ -950,7 +951,7 @@ function mi({
950
951
  className: "inline-flex h-7 shrink-0 items-center rounded-md border border-amber-300 px-2.5 text-[12px] font-medium hover:bg-amber-100 dark:border-amber-500/40 dark:hover:bg-amber-500/15",
951
952
  children: [
952
953
  "Reload (discard my ",
953
- Yn(n.unsavedCount),
954
+ Jn(n.unsavedCount),
954
955
  ")"
955
956
  ]
956
957
  }
@@ -958,9 +959,9 @@ function mi({
958
959
  ]
959
960
  }
960
961
  ),
961
- /* @__PURE__ */ r(hr, { labels: n.dropped, onDismiss: n.clearDropped }),
962
+ /* @__PURE__ */ r(yr, { labels: n.dropped, onDismiss: n.clearDropped }),
962
963
  /* @__PURE__ */ r(
963
- yr,
964
+ vr,
964
965
  {
965
966
  state: Re.state,
966
967
  onRecover: Re.recover,
@@ -991,22 +992,22 @@ function mi({
991
992
  Ve
992
993
  ),
993
994
  children: [
994
- /* @__PURE__ */ r(Oo, { className: "h-3.5 w-3.5 shrink-0" }),
995
- zt(te)
995
+ /* @__PURE__ */ r(Po, { className: "h-3.5 w-3.5 shrink-0" }),
996
+ $t(te)
996
997
  ]
997
998
  }
998
999
  ),
999
- /* @__PURE__ */ r(Br, { explain: ee, onShow: lo }),
1000
+ /* @__PURE__ */ r(qr, { explain: ee, onShow: co }),
1000
1001
  /* @__PURE__ */ r(
1001
- wr,
1002
+ br,
1002
1003
  {
1003
1004
  bundle: t,
1004
1005
  apply: n.apply,
1005
- onDragActive: oo,
1006
- onDropOnLayout: go,
1006
+ onDragActive: ro,
1007
+ onDropOnLayout: ko,
1007
1008
  selection: b,
1008
- undo: po,
1009
- warnTrash: uo,
1009
+ undo: mo,
1010
+ warnTrash: po,
1010
1011
  children: /* @__PURE__ */ y("div", { className: "flex min-h-0 flex-1 overflow-hidden", children: [
1011
1012
  /* @__PURE__ */ y(
1012
1013
  "aside",
@@ -1047,7 +1048,7 @@ function mi({
1047
1048
  disabled: !t,
1048
1049
  "data-tip": "Add a field, section, panel or widget after the selection",
1049
1050
  children: [
1050
- /* @__PURE__ */ r(Po, { className: "h-3.5 w-3.5" }),
1051
+ /* @__PURE__ */ r(No, { className: "h-3.5 w-3.5" }),
1051
1052
  "Add"
1052
1053
  ]
1053
1054
  }
@@ -1073,7 +1074,7 @@ function mi({
1073
1074
  }
1074
1075
  ),
1075
1076
  /* @__PURE__ */ r("div", { className: "min-h-0 flex-1 overflow-y-auto", children: q === "add" && t ? /* @__PURE__ */ r(
1076
- Go,
1077
+ Zo,
1077
1078
  {
1078
1079
  bundle: t,
1079
1080
  collection: o,
@@ -1083,7 +1084,7 @@ function mi({
1083
1084
  removed: le.entries
1084
1085
  }
1085
1086
  ) : q === "usage" && t ? /* @__PURE__ */ r(
1086
- ta,
1087
+ oa,
1087
1088
  {
1088
1089
  bundle: t,
1089
1090
  collection: o,
@@ -1094,13 +1095,13 @@ function mi({
1094
1095
  onOpenLayout: oe
1095
1096
  }
1096
1097
  ) : /* @__PURE__ */ r(
1097
- tn,
1098
+ on,
1098
1099
  {
1099
1100
  collection: o,
1100
1101
  currentId: c,
1101
1102
  onOpen: oe,
1102
1103
  settingsOpen: U === "settings",
1103
- onSettings: () => A("settings"),
1104
+ onSettings: () => N("settings"),
1104
1105
  dropTargets: !0
1105
1106
  }
1106
1107
  ) })
@@ -1113,7 +1114,7 @@ function mi({
1113
1114
  "data-editor-outline-panel": "",
1114
1115
  className: "flex w-[260px] shrink-0 flex-col border-r border-slate-200 bg-white dark:border-border dark:bg-card",
1115
1116
  children: /* @__PURE__ */ r(
1116
- mn,
1117
+ fn,
1117
1118
  {
1118
1119
  bundle: t,
1119
1120
  nodes: x.nodes,
@@ -1127,10 +1128,10 @@ function mi({
1127
1128
  }
1128
1129
  ),
1129
1130
  /* @__PURE__ */ y("main", { ref: gt, className: "flex min-w-0 flex-1 flex-col overflow-y-auto", children: [
1130
- O === "canvas" && /* @__PURE__ */ r(Er, { editor: _ }),
1131
- X.compare && (O === "canvas" || !k) && /* @__PURE__ */ r(dr, { compare: X.compare, onClose: X.close }),
1131
+ O === "canvas" && /* @__PURE__ */ r(Ir, { editor: _ }),
1132
+ X.compare && (O === "canvas" || !k) && /* @__PURE__ */ r(cr, { compare: X.compare, onClose: X.close }),
1132
1133
  t && k && O === "states" ? /* @__PURE__ */ r(
1133
- sn,
1134
+ ln,
1134
1135
  {
1135
1136
  bundle: t,
1136
1137
  parent: C,
@@ -1139,7 +1140,7 @@ function mi({
1139
1140
  onSelect: R
1140
1141
  }
1141
1142
  ) : t && k && O === "roles" ? /* @__PURE__ */ r(
1142
- ln,
1143
+ dn,
1143
1144
  {
1144
1145
  bundle: t,
1145
1146
  parent: C,
@@ -1147,7 +1148,7 @@ function mi({
1147
1148
  onSelect: R
1148
1149
  }
1149
1150
  ) : t && k && O === "table" ? /* @__PURE__ */ r(
1150
- Ln,
1151
+ Cn,
1151
1152
  {
1152
1153
  bundle: t,
1153
1154
  collection: o,
@@ -1165,57 +1166,57 @@ function mi({
1165
1166
  style: k && ze !== 1 ? { zoom: ze } : void 0,
1166
1167
  className: G(
1167
1168
  "flex min-h-0 flex-1 flex-col",
1168
- Fr(Me, _e),
1169
+ Kr(Me, _e),
1169
1170
  Me && !_e && "bg-background text-foreground"
1170
1171
  ),
1171
1172
  children: /* @__PURE__ */ r(
1172
- In,
1173
+ Dn,
1173
1174
  {
1174
1175
  collection: o,
1175
1176
  bundle: t,
1176
1177
  parent: C,
1177
1178
  preview: T,
1178
1179
  onPreview: J,
1179
- record: T.sample ?? Ht,
1180
+ record: T.sample ?? jt,
1180
1181
  fields: E,
1181
1182
  renderPane: (e) => /* @__PURE__ */ r(
1182
- ga,
1183
+ ka,
1183
1184
  {
1184
1185
  collection: o,
1185
1186
  bundle: t,
1186
1187
  parent: C,
1187
1188
  roleId: e.roleId,
1188
1189
  stateKey: e.stateKey,
1189
- marks: Qt(e.marks),
1190
+ marks: Yt(e.marks),
1190
1191
  overlay: _.overlay(de.wrap(e.overlay)),
1191
- ruleMarks: so,
1192
- ghost: io,
1192
+ ruleMarks: io,
1193
+ ghost: lo,
1193
1194
  deps: ee.deps,
1194
1195
  noDnd: e.noDnd,
1195
1196
  record: e.record,
1196
1197
  selected: W,
1197
1198
  selection: b,
1198
- onSelect: no,
1199
+ onSelect: ao,
1199
1200
  showHidden: Y,
1200
1201
  fold: x.fold,
1201
1202
  reveal: x.reveal,
1202
1203
  apply: n.apply,
1203
1204
  whenIdle: n.whenIdle,
1204
- fillRate: Ae,
1205
- unsaved: fo,
1206
- peers: mo,
1205
+ fillRate: Ne,
1206
+ unsaved: ho,
1207
+ peers: fo,
1207
1208
  compare: X.compare,
1208
- lastChanges: X.compare ? void 0 : Gt
1209
+ lastChanges: X.compare ? void 0 : Zt
1209
1210
  }
1210
1211
  )
1211
1212
  }
1212
1213
  )
1213
1214
  }
1214
1215
  ) : n.error ? /* @__PURE__ */ r("p", { className: "p-6 text-[13px] text-red-700 dark:text-red-300", children: n.error }) : /* @__PURE__ */ y("div", { className: "flex flex-col gap-3 p-6", children: [
1215
- /* @__PURE__ */ r(Ft, { className: "h-10 w-full rounded-lg" }),
1216
- /* @__PURE__ */ r(Ft, { className: "h-48 w-full rounded-lg" })
1216
+ /* @__PURE__ */ r(Kt, { className: "h-10 w-full rounded-lg" }),
1217
+ /* @__PURE__ */ r(Kt, { className: "h-48 w-full rounded-lg" })
1217
1218
  ] }),
1218
- t && k && O === "canvas" && /* @__PURE__ */ r(vn, { zoom: xt })
1219
+ t && k && O === "canvas" && /* @__PURE__ */ r(gn, { zoom: xt })
1219
1220
  ] }),
1220
1221
  /* @__PURE__ */ r(
1221
1222
  "aside",
@@ -1223,47 +1224,47 @@ function mi({
1223
1224
  "data-editor-inspector": "",
1224
1225
  className: "flex w-[344px] shrink-0 flex-col overflow-hidden border-l border-slate-200 bg-white dark:border-border dark:bg-card",
1225
1226
  children: t && (U === "ask" ? /* @__PURE__ */ r(
1226
- er,
1227
+ tr,
1227
1228
  {
1228
1229
  layoutId: c,
1229
1230
  layoutName: ge,
1230
- kind: Hn(t.layout),
1231
+ kind: jn(t.layout),
1231
1232
  bundle: t,
1232
1233
  thread: Q,
1233
1234
  setThread: ue,
1234
1235
  pending: Pe,
1235
1236
  onPendingTaken: () => pe(null),
1236
- jump: ko,
1237
- onCite: wo,
1238
- recordId: ((Nt = T.record) == null ? void 0 : Nt.id) ?? null
1237
+ jump: wo,
1238
+ onCite: bo,
1239
+ recordId: ((At = T.record) == null ? void 0 : At.id) ?? null
1239
1240
  }
1240
1241
  ) : U === "checks" ? /* @__PURE__ */ r(
1241
- nn,
1242
+ an,
1242
1243
  {
1243
1244
  findings: Le.findings,
1244
1245
  health: Le.health,
1245
1246
  ready: Le.ready,
1246
1247
  onSelect: (e) => F([e]),
1247
1248
  apply: n.apply,
1248
- onOpenAiReview: p.aiReviewSlot ? () => A("settings") : void 0,
1249
+ onOpenAiReview: p.aiReviewSlot ? () => N("settings") : void 0,
1249
1250
  onTurnOff: Ye.onTurnOff,
1250
1251
  styleSettings: Ye.settings
1251
1252
  }
1252
1253
  ) : U === "settings" ? /* @__PURE__ */ r(
1253
- da,
1254
+ ca,
1254
1255
  {
1255
1256
  bundle: t,
1256
1257
  apply: n.apply,
1257
1258
  flush: n.flush,
1258
1259
  collection: o,
1259
1260
  previewRoleId: T.roleId,
1260
- onPreviewRoleChange: vo,
1261
+ onPreviewRoleChange: go,
1261
1262
  onAskWhere: p.isAdmin ? (e) => {
1262
- pe(e), A("ask");
1263
+ pe(e), N("ask");
1263
1264
  } : void 0
1264
1265
  }
1265
1266
  ) : b.length > 1 ? /* @__PURE__ */ r(
1266
- Yr,
1267
+ Jr,
1267
1268
  {
1268
1269
  bundle: t,
1269
1270
  selection: b,
@@ -1272,7 +1273,7 @@ function mi({
1272
1273
  onSelection: F
1273
1274
  }
1274
1275
  ) : /* @__PURE__ */ r(
1275
- ca,
1276
+ ua,
1276
1277
  {
1277
1278
  bundle: t,
1278
1279
  target: W,
@@ -1289,7 +1290,7 @@ function mi({
1289
1290
  }
1290
1291
  ),
1291
1292
  /* @__PURE__ */ r(
1292
- $n,
1293
+ Wn,
1293
1294
  {
1294
1295
  bundle: t,
1295
1296
  selection: b,
@@ -1300,7 +1301,7 @@ function mi({
1300
1301
  }
1301
1302
  ),
1302
1303
  /* @__PURE__ */ r(
1303
- Un,
1304
+ zn,
1304
1305
  {
1305
1306
  bundle: t,
1306
1307
  fields: E,
@@ -1311,64 +1312,66 @@ function mi({
1311
1312
  }
1312
1313
  ),
1313
1314
  /* @__PURE__ */ r(
1314
- Jn,
1315
+ Xn,
1315
1316
  {
1316
- request: Xt,
1317
+ request: eo,
1317
1318
  count: n.unsavedCount,
1318
- onSave: eo,
1319
+ onSave: to,
1319
1320
  onDiscard: n.discard,
1320
1321
  onKeep: () => nt(null),
1321
- note: I ? /* @__PURE__ */ r(pr, { policy: I, value: ve, onChange: Ee }) : void 0,
1322
- canSave: ur(I, ve)
1322
+ note: I ? /* @__PURE__ */ r(mr, { policy: I, value: ve, onChange: Ee }) : void 0,
1323
+ canSave: pr(I, ve)
1323
1324
  }
1324
1325
  ),
1325
1326
  I && et && /* @__PURE__ */ r(
1326
- mr,
1327
+ fr,
1327
1328
  {
1328
1329
  open: !0,
1329
1330
  anchor: et,
1330
1331
  policy: I,
1331
- intro: te ? zt(te) : void 0,
1332
+ intro: te ? $t(te) : void 0,
1332
1333
  count: n.unsavedCount,
1333
1334
  value: ve,
1334
1335
  onChange: Ee,
1335
1336
  onSave: ot,
1336
- onClose: () => tt(null)
1337
+ onClose: () => tt(null),
1338
+ footer: /* @__PURE__ */ r(Dt, { collections: [o] })
1337
1339
  }
1338
1340
  ),
1339
1341
  mt && /* @__PURE__ */ r(
1340
- vr,
1342
+ gr,
1341
1343
  {
1342
1344
  anchor: mt,
1343
1345
  steps: n.unsavedSteps,
1344
1346
  exists: (e) => !!t && Ge(e, t, C),
1345
- describe: (e) => Ut(e, t, E),
1347
+ describe: (e) => zt(e, t, E),
1346
1348
  onJump: (e) => {
1347
1349
  Ce(null), ft(e);
1348
1350
  },
1349
1351
  onSettings: () => {
1350
- Ce(null), A("settings");
1352
+ Ce(null), N("settings");
1351
1353
  },
1354
+ footer: /* @__PURE__ */ r(Dt, { collections: [o] }),
1352
1355
  onClose: () => Ce(null)
1353
1356
  }
1354
1357
  )
1355
1358
  ]
1356
1359
  }
1357
- ), Tt = /* @__PURE__ */ r(Bn, { value: Se, children: xo });
1360
+ ), Tt = /* @__PURE__ */ r(qn, { value: Se, children: So });
1358
1361
  if (!se)
1359
- return /* @__PURE__ */ r(_t.Provider, { value: Be, children: /* @__PURE__ */ r(Bt, { value: We, children: Tt }) });
1360
- const Lt = u ?? (Fe ? jo(Fe) ?? document.body : null);
1362
+ return /* @__PURE__ */ r(Bt.Provider, { value: Be, children: /* @__PURE__ */ r(qt, { value: We, children: Tt }) });
1363
+ const Lt = u ?? (Fe ? Go(Fe) ?? document.body : null);
1361
1364
  return /* @__PURE__ */ y(ie, { children: [
1362
- /* @__PURE__ */ r("span", { ref: to, hidden: !0, "data-layout-editor-marker": "" }),
1363
- /* @__PURE__ */ r(_t.Provider, { value: Be, children: /* @__PURE__ */ r(Bt, { value: We, children: Lt && Fo(Tt, Lt) }) })
1365
+ /* @__PURE__ */ r("span", { ref: oo, hidden: !0, "data-layout-editor-marker": "" }),
1366
+ /* @__PURE__ */ r(Bt.Provider, { value: Be, children: /* @__PURE__ */ r(qt, { value: We, children: Lt && Ko(Tt, Lt) }) })
1364
1367
  ] });
1365
1368
  }
1366
- function zt(o) {
1369
+ function $t(o) {
1367
1370
  const i = o.reason.trim() ? `: ${o.reason.trim()}` : "";
1368
- return `Frozen until ${qo(o.until)}${i}. Saving asks for an override note, kept in History.`;
1371
+ return `Frozen until ${Uo(o.until)}${i}. Saving asks for an override note, kept in History.`;
1369
1372
  }
1370
1373
  export {
1371
- mi as LayoutEditor,
1374
+ hi as LayoutEditor,
1372
1375
  Qe as isTyping,
1373
1376
  Ge as targetExists
1374
1377
  };