@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.
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +99 -98
- package/dist/index.d.ts +452 -4
- package/dist/index.js +644 -618
- package/dist/layout-editor.d.ts +252 -2
- package/dist/shared/components/BackgroundRunOffer.js +117 -0
- package/dist/shared/components/BroadcastView.js +214 -213
- package/dist/shared/components/CollectionBrowserView.js +2592 -2695
- package/dist/shared/components/FormWhatsNew.js +60 -0
- package/dist/shared/components/ItemEditForm.js +3968 -3618
- package/dist/shared/components/JobsTray.js +100 -55
- package/dist/shared/components/MyWorkView.js +91 -89
- package/dist/shared/components/NotificationBell.js +80 -79
- package/dist/shared/components/ProfileView.js +568 -520
- package/dist/shared/components/RecordCompare.js +254 -0
- package/dist/shared/components/RecordReadView.js +598 -543
- package/dist/shared/components/ReportView.js +578 -543
- package/dist/shared/components/RowPresence.js +91 -0
- package/dist/shared/components/TipLayer.js +27 -27
- package/dist/shared/components/WidgetSlot.js +474 -458
- package/dist/shared/components/ai/AiAnalyticsView.js +16 -6
- package/dist/shared/components/ai/AskPanel.js +139 -119
- package/dist/shared/components/ai/FirstWeekCard.js +126 -0
- package/dist/shared/components/bulk/BulkFieldUpdate.js +289 -0
- package/dist/shared/components/bulk/bulk-field-options.js +45 -0
- package/dist/shared/components/charts/CumulativeFlowChart.js +176 -0
- package/dist/shared/components/chat/ChannelArchive.js +326 -0
- package/dist/shared/components/chat/ChannelExtras.js +141 -121
- package/dist/shared/components/chat/ChatAnalyticsView.js +112 -110
- package/dist/shared/components/chat/ChatPanel.js +1695 -1733
- package/dist/shared/components/chat/Composer.js +357 -303
- package/dist/shared/components/chat/MessageActions.js +92 -0
- package/dist/shared/components/chat/MessageFormat.js +290 -264
- package/dist/shared/components/chat/OutboxBubbles.js +146 -0
- package/dist/shared/components/chat/RequestIdCard.js +135 -0
- package/dist/shared/components/chat/RoomHeaderMenu.js +202 -0
- package/dist/shared/components/chat/RoomParts.js +213 -274
- package/dist/shared/components/chat/ScreenClip.js +184 -0
- package/dist/shared/components/chat/chat-core.js +402 -483
- package/dist/shared/components/chat/chat-drafts.js +59 -0
- package/dist/shared/components/chat/chat-emoji.js +348 -0
- package/dist/shared/components/chat/chat-local-time.js +41 -0
- package/dist/shared/components/chat/chat-outbox.js +303 -0
- package/dist/shared/components/chat/chat-window.js +163 -0
- package/dist/shared/components/chat/huddle/HuddleControls.js +143 -0
- package/dist/shared/components/chat/huddle/HuddleStage.js +164 -0
- package/dist/shared/components/chat/huddle/huddle-store.js +342 -0
- package/dist/shared/components/chat/huddle/useHuddle.js +58 -0
- package/dist/shared/components/help-videos/api.js +80 -67
- package/dist/shared/components/help-videos/editor/DetailsTab.js +147 -130
- package/dist/shared/components/item-edit/CatalogPickerField.js +113 -112
- package/dist/shared/components/item-edit/ChangeReasonDialog.js +13 -13
- package/dist/shared/components/item-edit/FieldAffordances.js +9 -8
- package/dist/shared/components/item-edit/FieldRenderer.js +248 -245
- package/dist/shared/components/item-edit/FieldRow.js +382 -320
- package/dist/shared/components/item-edit/FormHelpVideoButton.js +59 -0
- package/dist/shared/components/item-edit/GroupSection.js +786 -639
- package/dist/shared/components/item-edit/HeaderTools.js +59 -56
- package/dist/shared/components/item-edit/InlineTableField.js +3 -1
- package/dist/shared/components/item-edit/LayoutContentBlock.js +47 -24
- package/dist/shared/components/item-edit/RelationCombobox.js +186 -176
- package/dist/shared/components/item-edit/entry/EntryStrip.js +54 -0
- package/dist/shared/components/item-edit/entry/entry-keys.js +27 -0
- package/dist/shared/components/item-edit/entry/useEntryKeyboard.js +70 -0
- package/dist/shared/components/item-edit/entry/useEntryMode.js +59 -0
- package/dist/shared/components/item-edit/form-structure-ui.js +105 -0
- package/dist/shared/components/item-edit/lazy-sections.js +36 -0
- package/dist/shared/components/item-edit/lock-why.js +94 -0
- package/dist/shared/components/item-edit/picker-miss.js +26 -0
- package/dist/shared/components/item-edit/placement-behaviour.js +196 -0
- package/dist/shared/components/item-edit/useFormUsageBeacon.js +65 -0
- package/dist/shared/components/layout-editor/AddPanel.js +226 -151
- package/dist/shared/components/layout-editor/ArrangeButton.js +34 -0
- package/dist/shared/components/layout-editor/AutoArrange.js +86 -0
- package/dist/shared/components/layout-editor/CanvasCompare.js +79 -0
- package/dist/shared/components/layout-editor/ChangeNote.js +147 -0
- package/dist/shared/components/layout-editor/CollabParts.js +175 -0
- package/dist/shared/components/layout-editor/DesignNode.js +311 -116
- package/dist/shared/components/layout-editor/EditorCanvas.js +30 -26
- package/dist/shared/components/layout-editor/EditorTopBar.js +463 -175
- package/dist/shared/components/layout-editor/FindReplace.js +188 -0
- package/dist/shared/components/layout-editor/FormMapButton.js +141 -0
- package/dist/shared/components/layout-editor/HistoryPanel.js +250 -109
- package/dist/shared/components/layout-editor/LayoutEditor.js +1196 -305
- package/dist/shared/components/layout-editor/LayoutsRail.js +94 -67
- package/dist/shared/components/layout-editor/NoteMarker.js +38 -0
- package/dist/shared/components/layout-editor/PlacementsTable.js +187 -0
- package/dist/shared/components/layout-editor/RestorePiece.js +143 -0
- package/dist/shared/components/layout-editor/ScheduleChange.js +106 -0
- package/dist/shared/components/layout-editor/SessionHistory.js +84 -0
- package/dist/shared/components/layout-editor/StagedChip.js +22 -0
- package/dist/shared/components/layout-editor/StructureMenu.js +464 -0
- package/dist/shared/components/layout-editor/UnsavedConfirm.js +103 -0
- package/dist/shared/components/layout-editor/ai/AiToolsButton.js +625 -0
- package/dist/shared/components/layout-editor/ai/ChangeCheck.js +153 -0
- package/dist/shared/components/layout-editor/ai/ai-tools-api.js +80 -0
- package/dist/shared/components/layout-editor/ai/assist-ops.js +38 -0
- package/dist/shared/components/layout-editor/ai/autofill-ops.js +73 -0
- package/dist/shared/components/layout-editor/ai/canvas-capture.js +41 -0
- package/dist/shared/components/layout-editor/ai-forms/AiComposer.js +271 -0
- package/dist/shared/components/layout-editor/ai-forms/AiFormsButton.js +182 -0
- package/dist/shared/components/layout-editor/ai-forms/MeaningSuggestions.js +109 -0
- package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +170 -0
- package/dist/shared/components/layout-editor/ai-forms/ai-forms-api.js +40 -0
- package/dist/shared/components/layout-editor/ai-forms/pending.js +25 -0
- package/dist/shared/components/layout-editor/ai-forms/plan.js +263 -0
- package/dist/shared/components/layout-editor/ai-rules/AiAskPopover.js +160 -0
- package/dist/shared/components/layout-editor/ai-rules/CascadeWriter.js +175 -0
- package/dist/shared/components/layout-editor/ai-rules/FieldRuleWriter.js +97 -0
- package/dist/shared/components/layout-editor/ai-rules/RuleWriter.js +94 -0
- package/dist/shared/components/layout-editor/ai-rules/ValidationSuggest.js +153 -0
- package/dist/shared/components/layout-editor/ai-rules/api.js +6 -0
- package/dist/shared/components/layout-editor/ai-text/AiTextTools.js +383 -0
- package/dist/shared/components/layout-editor/ai-text/text-ops.js +125 -0
- package/dist/shared/components/layout-editor/assist/AskPanel.js +278 -0
- package/dist/shared/components/layout-editor/assist/ExplainDiff.js +93 -0
- package/dist/shared/components/layout-editor/assist/ProposalsButton.js +150 -0
- package/dist/shared/components/layout-editor/assist/assist-api.js +63 -0
- package/dist/shared/components/layout-editor/assist/jump.js +142 -0
- package/dist/shared/components/layout-editor/assist/settings-index.js +118 -0
- package/dist/shared/components/layout-editor/auto-arrange.js +101 -0
- package/dist/shared/components/layout-editor/bulk/BulkChangesButton.js +221 -0
- package/dist/shared/components/layout-editor/bulk/BulkRun.js +237 -0
- package/dist/shared/components/layout-editor/bulk/MacrosPanel.js +230 -0
- package/dist/shared/components/layout-editor/bulk/bulk-api.js +65 -0
- package/dist/shared/components/layout-editor/bulk/field-labels.js +22 -0
- package/dist/shared/components/layout-editor/bulk/macro-record.js +142 -0
- package/dist/shared/components/layout-editor/bulk/useMacroRecorder.js +65 -0
- package/dist/shared/components/layout-editor/bundle-to-active.js +1 -0
- package/dist/shared/components/layout-editor/canvas-diff.js +157 -0
- package/dist/shared/components/layout-editor/collab/FormFollowShare.js +388 -0
- package/dist/shared/components/layout-editor/collab/collab-api.js +80 -0
- package/dist/shared/components/layout-editor/commands/CommandPalette.js +221 -0
- package/dist/shared/components/layout-editor/commands/intents.js +214 -0
- package/dist/shared/components/layout-editor/commands/parse.js +242 -0
- package/dist/shared/components/layout-editor/design-context.js +26 -6
- package/dist/shared/components/layout-editor/dnd/LayoutDndProvider.js +181 -164
- package/dist/shared/components/layout-editor/dnd/collision.js +25 -23
- package/dist/shared/components/layout-editor/dnd/node.js +69 -57
- package/dist/shared/components/layout-editor/dnd/rail-drop.js +56 -0
- package/dist/shared/components/layout-editor/draft-recovery.js +131 -0
- package/dist/shared/components/layout-editor/editor-notes.js +78 -0
- package/dist/shared/components/layout-editor/editors/swap-config.js +1 -0
- package/dist/shared/components/layout-editor/entry/PlacementPresets.js +149 -0
- package/dist/shared/components/layout-editor/entry/entry-editor-context.js +10 -0
- package/dist/shared/components/layout-editor/entry/presets.js +71 -0
- package/dist/shared/components/layout-editor/entry/tab-order.js +110 -0
- package/dist/shared/components/layout-editor/entry/theme-preview.js +37 -0
- package/dist/shared/components/layout-editor/explain/CanvasRules.js +142 -0
- package/dist/shared/components/layout-editor/explain/default-ghosts.js +81 -0
- package/dist/shared/components/layout-editor/explain/driver-hover.js +62 -0
- package/dist/shared/components/layout-editor/explain/field-sources.js +246 -0
- package/dist/shared/components/layout-editor/explain/rule-graph.js +215 -0
- package/dist/shared/components/layout-editor/explain/use-explain.js +132 -0
- package/dist/shared/components/layout-editor/field-zones.js +116 -0
- package/dist/shared/components/layout-editor/form-map.js +138 -0
- package/dist/shared/components/layout-editor/grid-guides.js +142 -0
- package/dist/shared/components/layout-editor/history-api.js +87 -0
- package/dist/shared/components/layout-editor/inheritance.js +55 -0
- package/dist/shared/components/layout-editor/inspect/inspect-api.js +66 -0
- package/dist/shared/components/layout-editor/inspect/picker-preview.js +48 -0
- package/dist/shared/components/layout-editor/inspect/width-fit.js +87 -0
- package/dist/shared/components/layout-editor/inspector/AiFillSetting.js +85 -0
- package/dist/shared/components/layout-editor/inspector/BehaviourSettings.js +402 -0
- package/dist/shared/components/layout-editor/inspector/Breadcrumb.js +36 -0
- package/dist/shared/components/layout-editor/inspector/BulkInspector.js +179 -0
- package/dist/shared/components/layout-editor/inspector/ColumnFit.js +112 -0
- package/dist/shared/components/layout-editor/inspector/GroupInspector.js +291 -141
- package/dist/shared/components/layout-editor/inspector/HelpTab.js +174 -0
- package/dist/shared/components/layout-editor/inspector/Inspector.js +282 -180
- package/dist/shared/components/layout-editor/inspector/LookTab.js +166 -109
- package/dist/shared/components/layout-editor/inspector/OverrideNotice.js +61 -0
- package/dist/shared/components/layout-editor/inspector/PickerMisses.js +129 -0
- package/dist/shared/components/layout-editor/inspector/PickerPreview.js +134 -0
- package/dist/shared/components/layout-editor/inspector/PickerTab.js +146 -118
- package/dist/shared/components/layout-editor/inspector/RulesTab.js +162 -111
- package/dist/shared/components/layout-editor/inspector/Translations.js +156 -0
- package/dist/shared/components/layout-editor/inspector/kit.js +71 -70
- package/dist/shared/components/layout-editor/inspector/tab-request.js +21 -0
- package/dist/shared/components/layout-editor/is-typing.js +9 -0
- package/dist/shared/components/layout-editor/keyboard-move.js +66 -0
- package/dist/shared/components/layout-editor/lint/LintPanel.js +190 -0
- package/dist/shared/components/layout-editor/lint/lint-api.js +52 -0
- package/dist/shared/components/layout-editor/load-error.js +37 -0
- package/dist/shared/components/layout-editor/matrix/FieldStateMatrix.js +305 -0
- package/dist/shared/components/layout-editor/matrix/MatrixGrid.js +181 -0
- package/dist/shared/components/layout-editor/matrix/RoleSectionMatrix.js +147 -0
- package/dist/shared/components/layout-editor/matrix/matrix-api.js +48 -0
- package/dist/shared/components/layout-editor/matrix/role-matrix.js +36 -0
- package/dist/shared/components/layout-editor/matrix/state-matrix.js +145 -0
- package/dist/shared/components/layout-editor/nav/FindPanel.js +109 -0
- package/dist/shared/components/layout-editor/nav/NavTools.js +114 -0
- package/dist/shared/components/layout-editor/nav/OutlinePanel.js +228 -0
- package/dist/shared/components/layout-editor/nav/ShortcutSheet.js +31 -0
- package/dist/shared/components/layout-editor/nav/find.js +20 -0
- package/dist/shared/components/layout-editor/nav/tree.js +142 -0
- package/dist/shared/components/layout-editor/nav/useEditorNav.js +101 -0
- package/dist/shared/components/layout-editor/nav/view-prefs.js +34 -0
- package/dist/shared/components/layout-editor/ops/ChangeRequestsPanel.js +143 -0
- package/dist/shared/components/layout-editor/ops/DependencyDiagram.js +179 -0
- package/dist/shared/components/layout-editor/ops/LayoutOpsBlocks.js +92 -0
- package/dist/shared/components/layout-editor/ops/PromotePanel.js +287 -0
- package/dist/shared/components/layout-editor/ops/ops-api.js +122 -0
- package/dist/shared/components/layout-editor/outputs/OutputsButton.js +254 -0
- package/dist/shared/components/layout-editor/outputs/help-sheet.js +154 -0
- package/dist/shared/components/layout-editor/outputs/output-api.js +61 -0
- package/dist/shared/components/layout-editor/overview/OverviewActions.js +15 -3
- package/dist/shared/components/layout-editor/overview/describe-conditions.js +24 -14
- package/dist/shared/components/layout-editor/overview/overview-api.js +105 -88
- package/dist/shared/components/layout-editor/overview/purpose.js +15 -13
- package/dist/shared/components/layout-editor/panel-style.js +8 -7
- package/dist/shared/components/layout-editor/parity-keys.json.js +4 -0
- package/dist/shared/components/layout-editor/pin.js +25 -0
- package/dist/shared/components/layout-editor/presence.js +111 -0
- package/dist/shared/components/layout-editor/preview/PreviewModes.js +224 -0
- package/dist/shared/components/layout-editor/preview/PreviewPanes.js +262 -0
- package/dist/shared/components/layout-editor/preview/preview-api.js +57 -0
- package/dist/shared/components/layout-editor/preview/preview-model.js +157 -0
- package/dist/shared/components/layout-editor/restore-piece.js +192 -0
- package/dist/shared/components/layout-editor/reuse/FieldMapStep.js +70 -0
- package/dist/shared/components/layout-editor/reuse/FormMoreMenu.js +127 -0
- package/dist/shared/components/layout-editor/reuse/LibraryRows.js +150 -0
- package/dist/shared/components/layout-editor/reuse/NewFormStart.js +20 -0
- package/dist/shared/components/layout-editor/reuse/SectionReuseActions.js +291 -0
- package/dist/shared/components/layout-editor/reuse/field-match.js +77 -0
- package/dist/shared/components/layout-editor/reuse/reuse-api.js +73 -0
- package/dist/shared/components/layout-editor/reuse/seed.js +13 -0
- package/dist/shared/components/layout-editor/reuse/useFormFromRecord.js +43 -0
- package/dist/shared/components/layout-editor/reuse/useRailCopy.js +34 -0
- package/dist/shared/components/layout-editor/section-structure.js +241 -0
- package/dist/shared/components/layout-editor/settings/EntrySection.js +296 -0
- package/dist/shared/components/layout-editor/settings/FormSettings.js +125 -103
- package/dist/shared/components/layout-editor/settings/InheritanceSection.js +1 -1
- package/dist/shared/components/layout-editor/settings/ResolveSettings.js +255 -0
- package/dist/shared/components/layout-editor/settings/ToolsSection.js +215 -105
- package/dist/shared/components/layout-editor/settings/WhoSection.js +139 -100
- package/dist/shared/components/layout-editor/settings/controls.js +8 -8
- package/dist/shared/components/layout-editor/settings/settings-registry.js +142 -21
- package/dist/shared/components/layout-editor/shortcuts.js +88 -0
- package/dist/shared/components/layout-editor/show-when.js +35 -0
- package/dist/shared/components/layout-editor/slot-names.js +4 -3
- package/dist/shared/components/layout-editor/staged-api.js +64 -0
- package/dist/shared/components/layout-editor/structure-ops.js +403 -0
- package/dist/shared/components/layout-editor/testing/CostLimitSetting.js +42 -0
- package/dist/shared/components/layout-editor/testing/TestingPanels.js +556 -0
- package/dist/shared/components/layout-editor/testing/testing-api.js +67 -0
- package/dist/shared/components/layout-editor/testing/testing-model.js +406 -0
- package/dist/shared/components/layout-editor/testing/use-record-check.js +44 -0
- package/dist/shared/components/layout-editor/toolbar-kit.js +242 -0
- package/dist/shared/components/layout-editor/unsaved-marks.js +72 -0
- package/dist/shared/components/layout-editor/usage/AbTestSection.js +355 -0
- package/dist/shared/components/layout-editor/usage/FillChip.js +27 -0
- package/dist/shared/components/layout-editor/usage/UsagePanel.js +232 -0
- package/dist/shared/components/layout-editor/usage/ab-api.js +86 -0
- package/dist/shared/components/layout-editor/usage/suggest-collapse.js +32 -0
- package/dist/shared/components/layout-editor/usage/suggest-sections.js +55 -0
- package/dist/shared/components/layout-editor/usage/usage-api.js +104 -0
- package/dist/shared/components/layout-editor/useLayoutDraft.js +573 -306
- package/dist/shared/components/notifications/NotificationAnalyticsView.js +148 -77
- package/dist/shared/components/panels/ErpFailureBanner.js +18 -17
- package/dist/shared/components/panels/ExternalRequestsChip.js +63 -62
- package/dist/shared/components/pipeline/PipelineEditorView.js +106 -104
- package/dist/shared/components/profile/AgentsPanel.js +479 -0
- package/dist/shared/components/queue/QueueWorklist.js +1026 -1040
- package/dist/shared/components/support/SuggestFormChange.js +143 -0
- package/dist/shared/components/support/SupportAnalytics.js +171 -0
- package/dist/shared/components/support/SupportView.js +75 -73
- package/dist/shared/lib/ai-fill.js +37 -0
- package/dist/shared/lib/background-runs.js +150 -0
- package/dist/shared/lib/delivery-ack.js +9 -0
- package/dist/shared/lib/entry-badge-style.js +13 -0
- package/dist/shared/lib/entry-config.js +71 -0
- package/dist/shared/lib/form-sections.js +64 -0
- package/dist/shared/lib/form-structure.js +99 -0
- package/dist/shared/lib/form-usage-beacon.js +133 -0
- package/dist/shared/lib/jobs-tray.js +25 -23
- package/dist/shared/lib/keyset-pager.js +37 -0
- package/dist/shared/lib/layout-i18n.js +66 -0
- package/dist/shared/lib/layout-lint.js +490 -0
- package/dist/shared/lib/layout-ops.js +116 -110
- package/dist/shared/lib/layout-resolve.js +113 -0
- package/dist/shared/lib/placement-behaviour.js +144 -0
- package/dist/shared/lib/prefetch.js +149 -0
- package/dist/shared/lib/presence-hooks.js +199 -0
- package/dist/shared/lib/record-outbox.js +82 -81
- package/dist/shared/lib/replay-socket.js +93 -0
- package/dist/shared/lib/request-gate.js +51 -50
- package/dist/shared/lib/room-gaps.js +96 -0
- package/dist/shared/lib/screenshot.js +54 -28
- package/dist/shared/lib/search-log.js +27 -0
- package/dist/shared/lib/socket-realtime.js +101 -80
- package/dist/shared/lib/visible-when.js +34 -0
- package/dist/shared/lib/worker-socket.js +200 -0
- package/package.json +1 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsxs as o, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Rows3 as x } from "lucide-react";
|
|
3
|
+
import { useState as h, useMemo as w } from "react";
|
|
4
|
+
import { Popover as b, PopoverContent as k } from "../ui/popover.js";
|
|
5
|
+
import { Switch as y } from "../ui/switch.js";
|
|
6
|
+
import { planAutoArrange as v } from "./auto-arrange.js";
|
|
7
|
+
import { plural as p } from "./field-zones.js";
|
|
8
|
+
import { ToolButton as N } from "./toolbar-kit.js";
|
|
9
|
+
function A(e) {
|
|
10
|
+
const r = [];
|
|
11
|
+
return e.rowsAfter !== e.rowsBefore && r.push(`${e.rowsBefore} rows → ${e.rowsAfter}`), e.gapsBefore > e.gapsAfter && r.push(`${p(e.gapsBefore - e.gapsAfter, "gap")} closed`), e.moved && r.push(`${p(e.moved, "field")} ${e.moved === 1 ? "moves" : "move"}`), e.widened.length && r.push(`${p(e.widened.length, "field")} widened`), r.join(" · ");
|
|
12
|
+
}
|
|
13
|
+
function S({
|
|
14
|
+
bundle: e,
|
|
15
|
+
apply: r,
|
|
16
|
+
zone: s,
|
|
17
|
+
zoneLabel: u,
|
|
18
|
+
className: f
|
|
19
|
+
}) {
|
|
20
|
+
const [d, n] = h(!1), [l, g] = h(!0), a = w(
|
|
21
|
+
() => d ? v(e, { zone: s, widen: l }) : null,
|
|
22
|
+
[d, e, s, l]
|
|
23
|
+
), i = s === void 0, m = i ? "Auto-arrange the form" : `Auto-arrange ${u ?? "this section"}`;
|
|
24
|
+
return /* @__PURE__ */ o(b, { open: d, onOpenChange: n, children: [
|
|
25
|
+
/* @__PURE__ */ t(
|
|
26
|
+
N,
|
|
27
|
+
{
|
|
28
|
+
popover: !0,
|
|
29
|
+
onOpen: () => n(!0),
|
|
30
|
+
label: i ? "Auto-arrange" : "Auto-arrange fields",
|
|
31
|
+
icon: /* @__PURE__ */ t(x, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
32
|
+
tip: "Pack fields into tidy rows by width and close the gaps",
|
|
33
|
+
hint: "Tidy rows by width, gaps closed",
|
|
34
|
+
className: f,
|
|
35
|
+
data: { "data-auto-arrange": i ? "form" : "section" }
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
/* @__PURE__ */ o(k, { align: "end", className: "w-[340px] p-3", "data-auto-arrange-plan": "", children: [
|
|
39
|
+
/* @__PURE__ */ t("p", { className: "text-[13px] font-semibold text-slate-900 dark:text-foreground", children: m }),
|
|
40
|
+
/* @__PURE__ */ t("p", { className: "mt-0.5 text-[12px] leading-snug text-slate-500 dark:text-muted-foreground", children: "Fills each row of the 12-column grid, pulling a later field up when it fits. Undo puts everything back." }),
|
|
41
|
+
/* @__PURE__ */ o("div", { className: "mt-3 flex items-center justify-between gap-3 text-[12.5px] text-slate-700 dark:text-foreground", children: [
|
|
42
|
+
"Widen fields to fill rows",
|
|
43
|
+
/* @__PURE__ */ t(
|
|
44
|
+
y,
|
|
45
|
+
{
|
|
46
|
+
checked: l,
|
|
47
|
+
onCheckedChange: g,
|
|
48
|
+
"aria-label": "Widen fields to fill rows",
|
|
49
|
+
className: "h-[18px] w-8 border-0 data-[state=checked]:bg-nvr-cyan data-[state=unchecked]:bg-slate-300 dark:data-[state=unchecked]:bg-slate-600 [&>span]:mx-0.5 [&>span]:h-3.5 [&>span]:w-3.5 [&>span]:bg-white [&>span]:shadow-sm [&>span]:data-[state=checked]:translate-x-3.5"
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ t("div", { className: "mt-3 border-t border-slate-100 pt-2.5 dark:border-border", children: a && a.zones.length > 0 ? /* @__PURE__ */ t("ul", { className: "space-y-1.5", "aria-label": "What changes", children: a.zones.map((c) => /* @__PURE__ */ o("li", { className: "text-[12.5px] leading-snug", children: [
|
|
54
|
+
/* @__PURE__ */ t("span", { className: "font-medium text-slate-800 dark:text-foreground", children: c.label }),
|
|
55
|
+
/* @__PURE__ */ t("span", { className: "block text-slate-500 dark:text-muted-foreground", children: A(c) })
|
|
56
|
+
] }, c.key ?? "")) }) : /* @__PURE__ */ t("p", { className: "text-[12.5px] text-slate-500 dark:text-muted-foreground", children: a && a.checked === 0 ? "There are no fields to arrange here." : "Every row is already tidy." }) }),
|
|
57
|
+
/* @__PURE__ */ o("div", { className: "mt-3 flex justify-end gap-2", children: [
|
|
58
|
+
/* @__PURE__ */ t(
|
|
59
|
+
"button",
|
|
60
|
+
{
|
|
61
|
+
type: "button",
|
|
62
|
+
onClick: () => n(!1),
|
|
63
|
+
className: "h-7 rounded-md px-2.5 text-[12px] font-medium text-slate-600 hover:bg-muted dark:text-muted-foreground",
|
|
64
|
+
children: "Cancel"
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ t(
|
|
68
|
+
"button",
|
|
69
|
+
{
|
|
70
|
+
type: "button",
|
|
71
|
+
"data-auto-arrange-apply": "",
|
|
72
|
+
disabled: !a || a.ops.length === 0,
|
|
73
|
+
onClick: () => {
|
|
74
|
+
a != null && a.ops.length && (r(a.ops, { label: m }), n(!1));
|
|
75
|
+
},
|
|
76
|
+
className: "h-7 rounded-md bg-nvr-cyan px-3 text-[12px] font-medium text-white transition-opacity hover:opacity-90 disabled:opacity-40",
|
|
77
|
+
children: "Arrange"
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
] })
|
|
81
|
+
] })
|
|
82
|
+
] });
|
|
83
|
+
}
|
|
84
|
+
export {
|
|
85
|
+
S as AutoArrangeButton
|
|
86
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsxs as d, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { X as k } from "lucide-react";
|
|
3
|
+
import { useState as p, useEffect as c, useMemo as v, useCallback as o } from "react";
|
|
4
|
+
import { canvasDiff as u, diffSummary as h } from "./canvas-diff.js";
|
|
5
|
+
function D(e, r, a, l) {
|
|
6
|
+
const [n, s] = p(null);
|
|
7
|
+
c(() => s(null), [l]), c(() => {
|
|
8
|
+
a === 0 && s((t) => (t == null ? void 0 : t.kind) === "unsaved" ? null : t);
|
|
9
|
+
}, [a]);
|
|
10
|
+
const m = v(() => !n || !e ? null : n.kind === "version" ? { kind: "version", label: n.label, diff: u(n.base, e) } : r ? { kind: "unsaved", label: "your unsaved changes", diff: u(r, e) } : null, [n, e, r]), f = o(
|
|
11
|
+
(t, x) => s({ kind: "version", base: t, label: x }),
|
|
12
|
+
[]
|
|
13
|
+
), g = o(
|
|
14
|
+
() => s((t) => (t == null ? void 0 : t.kind) === "unsaved" ? null : { kind: "unsaved" }),
|
|
15
|
+
[]
|
|
16
|
+
), b = o(() => s(null), []);
|
|
17
|
+
return { compare: m, showVersion: f, toggleReview: g, close: b };
|
|
18
|
+
}
|
|
19
|
+
const w = [
|
|
20
|
+
{ kind: "added", text: "Added", cls: "bg-emerald-500 dark:bg-emerald-400" },
|
|
21
|
+
{ kind: "moved", text: "Moved", cls: "bg-amber-500 dark:bg-amber-400" },
|
|
22
|
+
{ kind: "changed", text: "Changed", cls: "bg-violet-500 dark:bg-violet-400" },
|
|
23
|
+
{ kind: "removed", text: "Removed", cls: "bg-rose-400" }
|
|
24
|
+
];
|
|
25
|
+
function E({
|
|
26
|
+
compare: e,
|
|
27
|
+
onClose: r
|
|
28
|
+
}) {
|
|
29
|
+
const a = h(e.diff), l = e.kind === "unsaved" ? "Reviewing your unsaved changes" : `Compared with ${e.label}`;
|
|
30
|
+
return /* @__PURE__ */ d(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
role: "status",
|
|
34
|
+
"data-canvas-compare": e.kind,
|
|
35
|
+
className: "sticky top-0 z-40 flex flex-wrap items-center gap-x-3 gap-y-1 border-b border-slate-200 bg-white/95 px-4 py-1.5 text-[12.5px] text-slate-700 dark:border-border dark:bg-card/95 dark:text-slate-200",
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ d("p", { className: "m-0 min-w-0 flex-1", children: [
|
|
38
|
+
/* @__PURE__ */ i("b", { className: "font-semibold text-slate-900 dark:text-foreground", children: l }),
|
|
39
|
+
" — ",
|
|
40
|
+
a ?? "nothing differs",
|
|
41
|
+
e.diff.settings.length > 0 && /* @__PURE__ */ d(
|
|
42
|
+
"span",
|
|
43
|
+
{
|
|
44
|
+
className: "ml-1 text-slate-500 dark:text-muted-foreground",
|
|
45
|
+
"data-tip": `Form settings: ${e.diff.settings.join(", ")}`,
|
|
46
|
+
children: [
|
|
47
|
+
"(settings: ",
|
|
48
|
+
e.diff.settings.slice(0, 3).join(", "),
|
|
49
|
+
e.diff.settings.length > 3 ? "…" : "",
|
|
50
|
+
")"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ i("span", { className: "flex items-center gap-2.5 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: w.map((n) => /* @__PURE__ */ d("span", { className: "inline-flex items-center gap-1", children: [
|
|
56
|
+
/* @__PURE__ */ i("span", { "aria-hidden": !0, className: `h-2 w-2 rounded-full ${n.cls}` }),
|
|
57
|
+
n.text
|
|
58
|
+
] }, n.kind)) }),
|
|
59
|
+
/* @__PURE__ */ d(
|
|
60
|
+
"button",
|
|
61
|
+
{
|
|
62
|
+
type: "button",
|
|
63
|
+
"data-canvas-compare-close": "",
|
|
64
|
+
onClick: r,
|
|
65
|
+
className: "inline-flex h-7 items-center gap-1 rounded-md border border-slate-200 px-2 text-[12px] font-medium hover:bg-muted dark:border-border",
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ i(k, { className: "h-3.5 w-3.5" }),
|
|
68
|
+
e.kind === "unsaved" ? "Done reviewing" : "Close comparison"
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
export {
|
|
77
|
+
E as CompareBanner,
|
|
78
|
+
D as useCanvasCompare
|
|
79
|
+
};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { jsxs as r, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as v, useMemo as b } from "react";
|
|
3
|
+
import { cn as u } from "../../lib/utils.js";
|
|
4
|
+
import { Popover as N, PopoverAnchor as y, PopoverContent as w } from "../ui/popover.js";
|
|
5
|
+
import { inputBase as f } from "./panel-style.js";
|
|
6
|
+
import { unsavedText as C } from "./UnsavedConfirm.js";
|
|
7
|
+
function D(e) {
|
|
8
|
+
const t = e == null ? void 0 : e.change_note;
|
|
9
|
+
return t === "note" || t === "note_ticket" ? t : null;
|
|
10
|
+
}
|
|
11
|
+
function P(e, t) {
|
|
12
|
+
return e ? t.reason.trim().length < 3 ? !1 : e !== "note_ticket" || t.ticket.trim().length > 0 : !0;
|
|
13
|
+
}
|
|
14
|
+
function F(e) {
|
|
15
|
+
return { reason: e.reason.trim(), ticket: e.ticket.trim() || null };
|
|
16
|
+
}
|
|
17
|
+
function S({
|
|
18
|
+
policy: e,
|
|
19
|
+
value: t,
|
|
20
|
+
onChange: o,
|
|
21
|
+
onSubmit: i
|
|
22
|
+
}) {
|
|
23
|
+
const s = (n) => {
|
|
24
|
+
n.key === "Enter" && !n.shiftKey && (n.preventDefault(), i == null || i());
|
|
25
|
+
};
|
|
26
|
+
return /* @__PURE__ */ r("div", { className: "space-y-2", "data-change-note-fields": e, children: [
|
|
27
|
+
/* @__PURE__ */ r("label", { className: "block", children: [
|
|
28
|
+
/* @__PURE__ */ a("span", { className: "mb-1 block text-[12px] font-medium text-slate-700 dark:text-foreground", children: "Why this change?" }),
|
|
29
|
+
/* @__PURE__ */ a(
|
|
30
|
+
"input",
|
|
31
|
+
{
|
|
32
|
+
autoFocus: !0,
|
|
33
|
+
value: t.reason,
|
|
34
|
+
maxLength: 200,
|
|
35
|
+
onChange: (n) => o({ ...t, reason: n.target.value }),
|
|
36
|
+
onKeyDown: s,
|
|
37
|
+
placeholder: "A short reason, kept with this version",
|
|
38
|
+
"data-change-note-reason": "",
|
|
39
|
+
className: u(f, "h-8 w-full")
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
] }),
|
|
43
|
+
/* @__PURE__ */ r("label", { className: "block", children: [
|
|
44
|
+
/* @__PURE__ */ r("span", { className: "mb-1 block text-[12px] font-medium text-slate-700 dark:text-foreground", children: [
|
|
45
|
+
"Ticket link",
|
|
46
|
+
e === "note_ticket" ? "" : " (optional)"
|
|
47
|
+
] }),
|
|
48
|
+
/* @__PURE__ */ a(
|
|
49
|
+
"input",
|
|
50
|
+
{
|
|
51
|
+
value: t.ticket,
|
|
52
|
+
maxLength: 300,
|
|
53
|
+
onChange: (n) => o({ ...t, ticket: n.target.value }),
|
|
54
|
+
onKeyDown: s,
|
|
55
|
+
placeholder: "https://… or OPS-123",
|
|
56
|
+
"data-change-note-ticket": "",
|
|
57
|
+
className: u(f, "h-8 w-full")
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
] })
|
|
61
|
+
] });
|
|
62
|
+
}
|
|
63
|
+
function K({
|
|
64
|
+
open: e,
|
|
65
|
+
anchor: t,
|
|
66
|
+
policy: o,
|
|
67
|
+
count: i,
|
|
68
|
+
value: s,
|
|
69
|
+
onChange: n,
|
|
70
|
+
onSave: p,
|
|
71
|
+
onClose: l,
|
|
72
|
+
intro: x
|
|
73
|
+
}) {
|
|
74
|
+
const [c, d] = v(!1), g = b(
|
|
75
|
+
() => ({ current: t ?? document.body }),
|
|
76
|
+
[t]
|
|
77
|
+
);
|
|
78
|
+
if (!e) return null;
|
|
79
|
+
const m = P(o, s), h = async () => {
|
|
80
|
+
if (!(!m || c)) {
|
|
81
|
+
d(!0);
|
|
82
|
+
try {
|
|
83
|
+
await p() && l();
|
|
84
|
+
} finally {
|
|
85
|
+
d(!1);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
return /* @__PURE__ */ r(
|
|
90
|
+
N,
|
|
91
|
+
{
|
|
92
|
+
open: !0,
|
|
93
|
+
onOpenChange: (k) => {
|
|
94
|
+
!k && !c && l();
|
|
95
|
+
},
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ a(y, { virtualRef: g }),
|
|
98
|
+
/* @__PURE__ */ r(w, { align: "end", className: "w-[320px] p-3", "data-change-note-save": "", children: [
|
|
99
|
+
/* @__PURE__ */ r("p", { className: "text-[13px] font-semibold text-slate-900 dark:text-foreground", children: [
|
|
100
|
+
"Save ",
|
|
101
|
+
C(i)
|
|
102
|
+
] }),
|
|
103
|
+
/* @__PURE__ */ a("p", { className: "mb-2 mt-0.5 text-[12px] leading-snug text-slate-600 dark:text-muted-foreground", children: x ?? "This layout keeps a reason with every save. It shows in History." }),
|
|
104
|
+
/* @__PURE__ */ a(
|
|
105
|
+
S,
|
|
106
|
+
{
|
|
107
|
+
policy: o,
|
|
108
|
+
value: s,
|
|
109
|
+
onChange: n,
|
|
110
|
+
onSubmit: () => void h()
|
|
111
|
+
}
|
|
112
|
+
),
|
|
113
|
+
/* @__PURE__ */ r("div", { className: "mt-3 flex items-center justify-end gap-1.5", children: [
|
|
114
|
+
/* @__PURE__ */ a(
|
|
115
|
+
"button",
|
|
116
|
+
{
|
|
117
|
+
type: "button",
|
|
118
|
+
onClick: l,
|
|
119
|
+
disabled: c,
|
|
120
|
+
className: "inline-flex h-7 items-center rounded-md px-2.5 text-[12px] font-medium text-slate-600 transition-colors hover:bg-muted hover:text-slate-900 disabled:pointer-events-none disabled:opacity-40 dark:text-muted-foreground dark:hover:text-foreground",
|
|
121
|
+
children: "Cancel"
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
/* @__PURE__ */ a(
|
|
125
|
+
"button",
|
|
126
|
+
{
|
|
127
|
+
type: "button",
|
|
128
|
+
"data-change-note-submit": "",
|
|
129
|
+
onClick: () => void h(),
|
|
130
|
+
disabled: !m || c,
|
|
131
|
+
className: "inline-flex h-7 items-center rounded-md bg-nvr-cyan px-3 text-[12px] font-medium text-white transition-opacity hover:opacity-90 disabled:pointer-events-none disabled:opacity-40",
|
|
132
|
+
children: c ? "Saving…" : "Save"
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
] })
|
|
136
|
+
] })
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
export {
|
|
142
|
+
S as ChangeNoteFields,
|
|
143
|
+
K as ChangeNoteSave,
|
|
144
|
+
F as changeNoteMeta,
|
|
145
|
+
D as changeNotePolicyOf,
|
|
146
|
+
P as changeNoteReady
|
|
147
|
+
};
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { jsxs as r, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { AlertTriangle as b, History as v, ArrowUpRight as k, Settings2 as y } from "lucide-react";
|
|
3
|
+
import { useMemo as w } from "react";
|
|
4
|
+
import { cn as m, formatRelative as N } from "../../lib/utils.js";
|
|
5
|
+
import { Popover as C, PopoverAnchor as R, PopoverContent as $ } from "../ui/popover.js";
|
|
6
|
+
import { initials as T } from "./presence.js";
|
|
7
|
+
import { unsavedText as u } from "./UnsavedConfirm.js";
|
|
8
|
+
import { stepTargets as j, touchesSettings as S } from "./unsaved-marks.js";
|
|
9
|
+
const p = "flex shrink-0 items-start gap-3 border-b px-4 py-1.5 text-[12.5px] border-amber-200 bg-amber-50 text-amber-800 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-200", f = "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";
|
|
10
|
+
function H({ labels: e, onDismiss: i }) {
|
|
11
|
+
return e.length === 0 ? null : /* @__PURE__ */ r("div", { role: "alert", "data-dropped-changes": "", className: p, children: [
|
|
12
|
+
/* @__PURE__ */ n(b, { className: "mt-1 h-3.5 w-3.5 shrink-0" }),
|
|
13
|
+
/* @__PURE__ */ r("div", { className: "min-w-0 flex-1 py-1", children: [
|
|
14
|
+
/* @__PURE__ */ r("p", { className: "m-0", children: [
|
|
15
|
+
"Someone else saved this layout first.",
|
|
16
|
+
" ",
|
|
17
|
+
e.length === 1 ? "This change" : `These ${e.length} changes`,
|
|
18
|
+
" no longer fit their version and ",
|
|
19
|
+
e.length === 1 ? "was" : "were",
|
|
20
|
+
" not kept — redo",
|
|
21
|
+
" ",
|
|
22
|
+
e.length === 1 ? "it" : "them",
|
|
23
|
+
" by hand:"
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ n("ul", { className: "m-0 mt-1 list-disc space-y-0.5 pl-5", children: e.map((s, a) => (
|
|
26
|
+
// Labels repeat ("Rename field"); their order is the identity.
|
|
27
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: see above
|
|
28
|
+
/* @__PURE__ */ n("li", { "data-dropped-change": "", children: s }, a)
|
|
29
|
+
)) })
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ n("button", { type: "button", onClick: i, className: m(f, "mt-0.5"), children: "Got it" })
|
|
32
|
+
] });
|
|
33
|
+
}
|
|
34
|
+
function I({
|
|
35
|
+
state: e,
|
|
36
|
+
onRecover: i,
|
|
37
|
+
onDismiss: s
|
|
38
|
+
}) {
|
|
39
|
+
if (!e) return null;
|
|
40
|
+
const a = e.draft.steps.length, t = N(new Date(e.draft.at).toISOString()), o = e.source === "server" ? "kept for you" : "left in this browser";
|
|
41
|
+
return /* @__PURE__ */ r(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
role: "note",
|
|
45
|
+
"data-draft-recovery": e.kind,
|
|
46
|
+
"data-draft-stale": e.stale ? "" : void 0,
|
|
47
|
+
className: m(p, "items-center"),
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ n(v, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
50
|
+
/* @__PURE__ */ r("p", { className: "m-0 min-w-0 flex-1", children: [
|
|
51
|
+
"You have ",
|
|
52
|
+
u(a),
|
|
53
|
+
" on this layout, ",
|
|
54
|
+
o,
|
|
55
|
+
" ",
|
|
56
|
+
t,
|
|
57
|
+
".",
|
|
58
|
+
e.stale && " The layout was saved since: Recover lays them on top of it and lists any that no longer fit."
|
|
59
|
+
] }),
|
|
60
|
+
/* @__PURE__ */ n(
|
|
61
|
+
"button",
|
|
62
|
+
{
|
|
63
|
+
type: "button",
|
|
64
|
+
"data-draft-recover": "",
|
|
65
|
+
onClick: i,
|
|
66
|
+
className: "inline-flex h-7 shrink-0 items-center rounded-md bg-nvr-cyan px-3 text-[12px] font-medium text-white transition-opacity hover:opacity-90",
|
|
67
|
+
children: "Recover"
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
/* @__PURE__ */ n("button", { type: "button", "data-draft-dismiss": "", onClick: s, className: f, children: "Discard" })
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
function L({
|
|
76
|
+
peers: e,
|
|
77
|
+
describe: i,
|
|
78
|
+
onJump: s
|
|
79
|
+
}) {
|
|
80
|
+
if (e.length === 0) return null;
|
|
81
|
+
const a = e.slice(0, 4);
|
|
82
|
+
return /* @__PURE__ */ r("div", { "data-presence": "", className: "flex shrink-0 items-center -space-x-1.5", children: [
|
|
83
|
+
a.map((t) => {
|
|
84
|
+
const o = t.selected ? i(t.selected) : null;
|
|
85
|
+
return /* @__PURE__ */ n(
|
|
86
|
+
"button",
|
|
87
|
+
{
|
|
88
|
+
type: "button",
|
|
89
|
+
"data-presence-peer": t.id,
|
|
90
|
+
"data-tip": o ? `${t.name} — on ${o}` : `${t.name} is editing this form too`,
|
|
91
|
+
"aria-label": o ? `${t.name}, on ${o}` : `${t.name}, editing this form`,
|
|
92
|
+
disabled: !o,
|
|
93
|
+
onClick: () => t.selected && s(t.selected),
|
|
94
|
+
className: m(
|
|
95
|
+
"inline-flex h-7 w-7 items-center justify-center rounded-full text-[11px] font-semibold ring-2 ring-white disabled:cursor-default dark:ring-card",
|
|
96
|
+
t.tone.chip
|
|
97
|
+
),
|
|
98
|
+
children: T(t.name)
|
|
99
|
+
},
|
|
100
|
+
t.id
|
|
101
|
+
);
|
|
102
|
+
}),
|
|
103
|
+
e.length > a.length && /* @__PURE__ */ r(
|
|
104
|
+
"span",
|
|
105
|
+
{
|
|
106
|
+
"data-tip": e.slice(a.length).map((t) => t.name).join(", "),
|
|
107
|
+
className: "inline-flex h-7 min-w-7 items-center justify-center rounded-full bg-slate-100 px-1 text-[11px] font-semibold text-slate-600 ring-2 ring-white dark:bg-muted dark:text-muted-foreground dark:ring-card",
|
|
108
|
+
children: [
|
|
109
|
+
"+",
|
|
110
|
+
e.length - a.length
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
] });
|
|
115
|
+
}
|
|
116
|
+
function M({
|
|
117
|
+
anchor: e,
|
|
118
|
+
steps: i,
|
|
119
|
+
exists: s,
|
|
120
|
+
describe: a,
|
|
121
|
+
onJump: t,
|
|
122
|
+
onSettings: o,
|
|
123
|
+
onClose: x
|
|
124
|
+
}) {
|
|
125
|
+
const g = w(
|
|
126
|
+
() => ({ current: e ?? document.body }),
|
|
127
|
+
[e]
|
|
128
|
+
);
|
|
129
|
+
return /* @__PURE__ */ r(C, { open: !0, onOpenChange: (d) => !d && x(), children: [
|
|
130
|
+
/* @__PURE__ */ n(R, { virtualRef: g }),
|
|
131
|
+
/* @__PURE__ */ r(
|
|
132
|
+
$,
|
|
133
|
+
{
|
|
134
|
+
align: "end",
|
|
135
|
+
className: "max-h-[min(70vh,480px)] w-[340px] overflow-y-auto overscroll-contain p-2",
|
|
136
|
+
"data-unsaved-list": "",
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ n("p", { className: "px-1.5 pb-1.5 pt-1 text-[13px] font-semibold text-slate-900 dark:text-foreground", children: u(i.length) }),
|
|
139
|
+
i.length === 0 ? /* @__PURE__ */ n("p", { className: "px-1.5 pb-1.5 text-[12px] text-slate-500 dark:text-muted-foreground", children: "Everything is saved." }) : /* @__PURE__ */ n("ol", { className: "m-0 list-none space-y-0.5 p-0", children: i.map((d, h) => {
|
|
140
|
+
const l = j(d).filter(s).pop() ?? null, c = !l && S(d);
|
|
141
|
+
return (
|
|
142
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: steps have no id; order is identity
|
|
143
|
+
/* @__PURE__ */ n("li", { children: /* @__PURE__ */ r(
|
|
144
|
+
"button",
|
|
145
|
+
{
|
|
146
|
+
type: "button",
|
|
147
|
+
"data-unsaved-step": h,
|
|
148
|
+
disabled: !l && !c,
|
|
149
|
+
onClick: () => {
|
|
150
|
+
l ? t(l) : c && o();
|
|
151
|
+
},
|
|
152
|
+
className: "flex w-full items-center gap-2 rounded-md px-1.5 py-1.5 text-left hover:bg-muted disabled:pointer-events-none",
|
|
153
|
+
children: [
|
|
154
|
+
/* @__PURE__ */ n("span", { className: "h-1.5 w-1.5 shrink-0 rounded-full bg-amber-500 dark:bg-amber-400" }),
|
|
155
|
+
/* @__PURE__ */ r("span", { className: "min-w-0 flex-1", children: [
|
|
156
|
+
/* @__PURE__ */ n("span", { className: "block truncate text-[12.5px] text-slate-800 dark:text-foreground", children: d.label }),
|
|
157
|
+
l && /* @__PURE__ */ n("span", { className: "block truncate text-[11.5px] text-slate-500 dark:text-muted-foreground", children: a(l) })
|
|
158
|
+
] }),
|
|
159
|
+
l ? /* @__PURE__ */ n(k, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }) : c ? /* @__PURE__ */ n(y, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }) : null
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
) }, h)
|
|
163
|
+
);
|
|
164
|
+
}) })
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
)
|
|
168
|
+
] });
|
|
169
|
+
}
|
|
170
|
+
export {
|
|
171
|
+
H as DroppedBanner,
|
|
172
|
+
L as PresenceAvatars,
|
|
173
|
+
I as RecoveryBanner,
|
|
174
|
+
M as UnsavedList
|
|
175
|
+
};
|