@actuate-media/cms-admin 0.69.0 → 0.69.1

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 (120) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/__tests__/views/form-entries.render.test.js +14 -4
  3. package/dist/__tests__/views/form-entries.render.test.js.map +1 -1
  4. package/dist/__tests__/views/form-submissions.render.test.js +14 -4
  5. package/dist/__tests__/views/form-submissions.render.test.js.map +1 -1
  6. package/dist/__tests__/views/media-seo-audit.render.test.js +26 -0
  7. package/dist/__tests__/views/media-seo-audit.render.test.js.map +1 -1
  8. package/dist/__tests__/views/redirects-pane.render.test.d.ts +2 -0
  9. package/dist/__tests__/views/redirects-pane.render.test.d.ts.map +1 -0
  10. package/dist/__tests__/views/redirects-pane.render.test.js +121 -0
  11. package/dist/__tests__/views/redirects-pane.render.test.js.map +1 -0
  12. package/dist/actuate-admin.css +1 -1
  13. package/dist/components/SEOPanel.js +3 -3
  14. package/dist/components/SEOPanel.js.map +1 -1
  15. package/dist/components/collections/EntryDetailPane.js +1 -1
  16. package/dist/components/collections/EntryDetailPane.js.map +1 -1
  17. package/dist/components/forms/EntriesTable.d.ts +3 -1
  18. package/dist/components/forms/EntriesTable.d.ts.map +1 -1
  19. package/dist/components/forms/EntriesTable.js +5 -2
  20. package/dist/components/forms/EntriesTable.js.map +1 -1
  21. package/dist/components/forms/FormEntryDetailPane.d.ts +10 -0
  22. package/dist/components/forms/FormEntryDetailPane.d.ts.map +1 -0
  23. package/dist/components/forms/FormEntryDetailPane.js +137 -0
  24. package/dist/components/forms/FormEntryDetailPane.js.map +1 -0
  25. package/dist/components/forms/FormSchemaPane.js +1 -1
  26. package/dist/components/forms/FormSchemaPane.js.map +1 -1
  27. package/dist/components/script-tags/ScriptTagEditorPane.js +1 -1
  28. package/dist/components/script-tags/ScriptTagEditorPane.js.map +1 -1
  29. package/dist/components/seo/RedirectEditorPane.d.ts +12 -0
  30. package/dist/components/seo/RedirectEditorPane.d.ts.map +1 -0
  31. package/dist/components/seo/RedirectEditorPane.js +89 -0
  32. package/dist/components/seo/RedirectEditorPane.js.map +1 -0
  33. package/dist/components/seo/SeoEditorPane.js +1 -1
  34. package/dist/components/seo/SeoEditorPane.js.map +1 -1
  35. package/dist/components/ui/DataTable.js +2 -2
  36. package/dist/components/ui/DataTable.js.map +1 -1
  37. package/dist/components/ui/Skeleton.js +3 -3
  38. package/dist/components/ui/Skeleton.js.map +1 -1
  39. package/dist/components/ui/Toggle.js +1 -1
  40. package/dist/components/ui/Toggle.js.map +1 -1
  41. package/dist/fields/BlockBuilderField.js +1 -1
  42. package/dist/fields/BlockBuilderField.js.map +1 -1
  43. package/dist/fields/MediaField.js +1 -1
  44. package/dist/fields/MediaField.js.map +1 -1
  45. package/dist/fields/PropInput.js +1 -1
  46. package/dist/fields/PropInput.js.map +1 -1
  47. package/dist/layout/Header.js +1 -1
  48. package/dist/layout/Header.js.map +1 -1
  49. package/dist/views/DocumentEdit.js +1 -1
  50. package/dist/views/DocumentEdit.js.map +1 -1
  51. package/dist/views/FormEntries.d.ts.map +1 -1
  52. package/dist/views/FormEntries.js +18 -14
  53. package/dist/views/FormEntries.js.map +1 -1
  54. package/dist/views/FormSubmissions.d.ts.map +1 -1
  55. package/dist/views/FormSubmissions.js +18 -15
  56. package/dist/views/FormSubmissions.js.map +1 -1
  57. package/dist/views/Forms.js +5 -5
  58. package/dist/views/Forms.js.map +1 -1
  59. package/dist/views/MediaBrowser.d.ts.map +1 -1
  60. package/dist/views/MediaBrowser.js +1 -1
  61. package/dist/views/MediaBrowser.js.map +1 -1
  62. package/dist/views/MediaSeoAudit.d.ts +4 -1
  63. package/dist/views/MediaSeoAudit.d.ts.map +1 -1
  64. package/dist/views/MediaSeoAudit.js +12 -2
  65. package/dist/views/MediaSeoAudit.js.map +1 -1
  66. package/dist/views/Pages/PagesListView.js +14 -14
  67. package/dist/views/Pages/PagesListView.js.map +1 -1
  68. package/dist/views/Pages/PagesTreeTable.d.ts.map +1 -1
  69. package/dist/views/Pages/PagesTreeTable.js +3 -3
  70. package/dist/views/Pages/PagesTreeTable.js.map +1 -1
  71. package/dist/views/ScriptTags.d.ts.map +1 -1
  72. package/dist/views/ScriptTags.js +3 -3
  73. package/dist/views/ScriptTags.js.map +1 -1
  74. package/dist/views/seo/ContentTab.js +6 -6
  75. package/dist/views/seo/ContentTab.js.map +1 -1
  76. package/dist/views/seo/RedirectsTab.d.ts.map +1 -1
  77. package/dist/views/seo/RedirectsTab.js +23 -8
  78. package/dist/views/seo/RedirectsTab.js.map +1 -1
  79. package/package.json +1 -1
  80. package/src/__tests__/views/form-entries.render.test.tsx +16 -4
  81. package/src/__tests__/views/form-submissions.render.test.tsx +16 -4
  82. package/src/__tests__/views/media-seo-audit.render.test.tsx +34 -0
  83. package/src/__tests__/views/redirects-pane.render.test.tsx +156 -0
  84. package/src/components/SEOPanel.tsx +9 -9
  85. package/src/components/collections/EntryDetailPane.tsx +1 -1
  86. package/src/components/forms/EntriesTable.tsx +12 -3
  87. package/src/components/forms/{EntryDetailDrawer.tsx → FormEntryDetailPane.tsx} +112 -102
  88. package/src/components/forms/FormSchemaPane.tsx +1 -1
  89. package/src/components/script-tags/ScriptTagEditorPane.tsx +1 -1
  90. package/src/components/seo/RedirectEditorPane.tsx +271 -0
  91. package/src/components/seo/SeoEditorPane.tsx +1 -1
  92. package/src/components/ui/DataTable.tsx +3 -3
  93. package/src/components/ui/Skeleton.tsx +8 -8
  94. package/src/components/ui/Toggle.tsx +1 -1
  95. package/src/fields/BlockBuilderField.tsx +1 -1
  96. package/src/fields/MediaField.tsx +1 -1
  97. package/src/fields/PropInput.tsx +1 -1
  98. package/src/layout/Header.tsx +2 -2
  99. package/src/styles/actuate-tokens.css +4 -0
  100. package/src/styles/theme.css +9 -3
  101. package/src/views/DocumentEdit.tsx +4 -4
  102. package/src/views/FormEntries.tsx +81 -66
  103. package/src/views/FormSubmissions.tsx +78 -64
  104. package/src/views/Forms.tsx +16 -16
  105. package/src/views/MediaBrowser.tsx +6 -1
  106. package/src/views/MediaSeoAudit.tsx +39 -2
  107. package/src/views/Pages/PagesListView.tsx +46 -46
  108. package/src/views/Pages/PagesTreeTable.tsx +11 -8
  109. package/src/views/ScriptTags.tsx +26 -36
  110. package/src/views/seo/ContentTab.tsx +10 -10
  111. package/src/views/seo/RedirectsTab.tsx +145 -109
  112. package/dist/components/forms/EntryDetailDrawer.d.ts +0 -11
  113. package/dist/components/forms/EntryDetailDrawer.d.ts.map +0 -1
  114. package/dist/components/forms/EntryDetailDrawer.js +0 -145
  115. package/dist/components/forms/EntryDetailDrawer.js.map +0 -1
  116. package/dist/components/seo/RedirectEditorDrawer.d.ts +0 -9
  117. package/dist/components/seo/RedirectEditorDrawer.d.ts.map +0 -1
  118. package/dist/components/seo/RedirectEditorDrawer.js +0 -95
  119. package/dist/components/seo/RedirectEditorDrawer.js.map +0 -1
  120. package/src/components/seo/RedirectEditorDrawer.tsx +0 -231
@@ -0,0 +1,271 @@
1
+ 'use client'
2
+
3
+ /**
4
+ * Inline redirect editor pane — design-parity replacement for the old
5
+ * `RedirectEditorDrawer` overlay. Rendered inside an `<InspectorPane>` beside
6
+ * the redirect rules table. Same fields, validation, and create/update save
7
+ * paths as the drawer; only the presentation pattern changed.
8
+ */
9
+ import { useState } from 'react'
10
+ import { Trash2 } from 'lucide-react'
11
+ import { toast } from 'sonner'
12
+ import {
13
+ createRedirectRule,
14
+ updateRedirectRule,
15
+ type RedirectRule,
16
+ type RedirectRulePayload,
17
+ type RedirectStatusCode,
18
+ } from '../../lib/seo-service.js'
19
+ import {
20
+ InspectorPaneBody,
21
+ InspectorPaneFooter,
22
+ InspectorPaneHeader,
23
+ InspectorPaneSection,
24
+ } from '../ui/InspectorPane.js'
25
+ import { Toggle } from '../ui/Toggle.js'
26
+
27
+ const STATUS_CODES: { value: RedirectStatusCode; label: string }[] = [
28
+ { value: 301, label: '301 — Permanent' },
29
+ { value: 302, label: '302 — Temporary' },
30
+ { value: 307, label: '307 — Temporary (preserve method)' },
31
+ { value: 308, label: '308 — Permanent (preserve method)' },
32
+ { value: 410, label: '410 — Gone (no destination)' },
33
+ ]
34
+
35
+ const inputCls =
36
+ 'w-full rounded-[7px] border border-[var(--bdr)] bg-[var(--card)] px-2.5 py-1.5 text-[12.5px] text-[var(--txt)] placeholder:text-[var(--muted)] focus:border-[var(--acc)] focus:outline-none'
37
+
38
+ const labelCls = 'mb-1 block text-[11.5px] font-medium text-[var(--sub)]'
39
+
40
+ function normalizePath(p: string): string {
41
+ const t = p.trim()
42
+ if (!t) return ''
43
+ if (/^https?:\/\//i.test(t)) return t
44
+ return t.startsWith('/') ? t : `/${t}`
45
+ }
46
+
47
+ function PaneToggleRow({
48
+ label,
49
+ hint,
50
+ checked,
51
+ onCheckedChange,
52
+ variant,
53
+ }: {
54
+ label: string
55
+ hint?: string
56
+ checked: boolean
57
+ onCheckedChange: (checked: boolean) => void
58
+ variant?: 'enabled'
59
+ }) {
60
+ return (
61
+ <div className="flex items-center justify-between gap-3 py-1.5">
62
+ <div className="min-w-0">
63
+ <div className="text-[12.5px] font-medium text-[var(--txt)]">{label}</div>
64
+ {hint && <div className="text-[11px] text-[var(--muted)]">{hint}</div>}
65
+ </div>
66
+ <Toggle
67
+ checked={checked}
68
+ onCheckedChange={onCheckedChange}
69
+ variant={variant}
70
+ aria-label={label}
71
+ />
72
+ </div>
73
+ )
74
+ }
75
+
76
+ export interface RedirectEditorPaneProps {
77
+ /** null = create mode */
78
+ rule: RedirectRule | null
79
+ onClose: () => void
80
+ /** Called after a successful save so the list can refetch / close the pane. */
81
+ onSaved?: () => void
82
+ /** Ask the parent to confirm-and-delete this rule (edit mode only). */
83
+ onDelete?: (rule: RedirectRule) => void
84
+ }
85
+
86
+ export function RedirectEditorPane({ rule, onClose, onSaved, onDelete }: RedirectEditorPaneProps) {
87
+ // The parent keys this pane by rule id, so initializing from props is safe.
88
+ const [form, setForm] = useState<RedirectRulePayload>(() =>
89
+ rule
90
+ ? {
91
+ type: rule.type,
92
+ fromPath: rule.fromPath,
93
+ toPath: rule.toPath,
94
+ enabled: rule.enabled,
95
+ preserveQuery: rule.preserveQuery,
96
+ notes: rule.notes ?? '',
97
+ }
98
+ : {
99
+ type: 301,
100
+ fromPath: '',
101
+ toPath: '',
102
+ enabled: true,
103
+ preserveQuery: false,
104
+ notes: '',
105
+ },
106
+ )
107
+ const [saving, setSaving] = useState(false)
108
+ const [clientError, setClientError] = useState<string | null>(null)
109
+
110
+ const isGone = form.type === 410
111
+ const update = (patch: Partial<RedirectRulePayload>) => setForm((f) => ({ ...f, ...patch }))
112
+
113
+ async function handleSave() {
114
+ const fromPath = normalizePath(form.fromPath)
115
+ const toPath = isGone ? '' : normalizePath(form.toPath)
116
+ if (!fromPath) {
117
+ setClientError('Source path is required.')
118
+ return
119
+ }
120
+ if (!isGone && !toPath) {
121
+ setClientError('Destination is required for redirect status codes.')
122
+ return
123
+ }
124
+ if (!isGone && fromPath === toPath) {
125
+ setClientError('Source and destination cannot be identical (would create a loop).')
126
+ return
127
+ }
128
+ setClientError(null)
129
+ setSaving(true)
130
+ const payload: RedirectRulePayload = { ...form, fromPath, toPath }
131
+ const res = rule
132
+ ? await updateRedirectRule(rule.id, payload)
133
+ : await createRedirectRule(payload)
134
+ setSaving(false)
135
+ if (res.error) {
136
+ toast.error(res.error)
137
+ return
138
+ }
139
+ toast.success(rule ? 'Redirect updated.' : 'Redirect created.')
140
+ onSaved?.()
141
+ }
142
+
143
+ return (
144
+ <>
145
+ <InspectorPaneHeader onClose={onClose} closeLabel="Close redirect editor">
146
+ <div className="truncate text-[13.5px] font-semibold text-[var(--txt)]">
147
+ {rule ? 'Edit redirect' : 'New redirect'}
148
+ </div>
149
+ {rule && (
150
+ <div className="mt-0.5 truncate font-mono text-[11.5px] text-[var(--muted)]">
151
+ {rule.fromPath}
152
+ </div>
153
+ )}
154
+ </InspectorPaneHeader>
155
+
156
+ <InspectorPaneBody>
157
+ {clientError && (
158
+ <div className="px-4 pt-3.5">
159
+ <p
160
+ className="rounded-[7px] bg-[var(--err-l)] px-3 py-2 text-[12px] text-[var(--err)]"
161
+ role="alert"
162
+ >
163
+ {clientError}
164
+ </p>
165
+ </div>
166
+ )}
167
+
168
+ <InspectorPaneSection title="Rule">
169
+ <div className="mb-3">
170
+ <label className={labelCls} htmlFor="redir-type">
171
+ Status code
172
+ </label>
173
+ <select
174
+ id="redir-type"
175
+ className={inputCls}
176
+ value={form.type}
177
+ onChange={(e) => update({ type: Number(e.target.value) as RedirectStatusCode })}
178
+ >
179
+ {STATUS_CODES.map((s) => (
180
+ <option key={s.value} value={s.value}>
181
+ {s.label}
182
+ </option>
183
+ ))}
184
+ </select>
185
+ </div>
186
+
187
+ <div className="mb-3">
188
+ <label className={labelCls} htmlFor="redir-from">
189
+ Source path
190
+ </label>
191
+ <input
192
+ id="redir-from"
193
+ className={inputCls}
194
+ value={form.fromPath}
195
+ onChange={(e) => update({ fromPath: e.target.value })}
196
+ placeholder="/old-path"
197
+ />
198
+ </div>
199
+
200
+ {!isGone && (
201
+ <div className="mb-3 last:mb-0">
202
+ <label className={labelCls} htmlFor="redir-to">
203
+ Destination
204
+ </label>
205
+ <input
206
+ id="redir-to"
207
+ className={inputCls}
208
+ value={form.toPath}
209
+ onChange={(e) => update({ toPath: e.target.value })}
210
+ placeholder="/new-path or https://example.com/page"
211
+ />
212
+ </div>
213
+ )}
214
+ </InspectorPaneSection>
215
+
216
+ <InspectorPaneSection title="Options">
217
+ <PaneToggleRow
218
+ label="Enabled"
219
+ checked={!!form.enabled}
220
+ onCheckedChange={(v) => update({ enabled: v })}
221
+ variant="enabled"
222
+ />
223
+ {!isGone && (
224
+ <PaneToggleRow
225
+ label="Preserve query string"
226
+ hint="Append the original query params to the destination."
227
+ checked={!!form.preserveQuery}
228
+ onCheckedChange={(v) => update({ preserveQuery: v })}
229
+ />
230
+ )}
231
+ <div className="mt-2">
232
+ <label className={labelCls} htmlFor="redir-notes">
233
+ Notes <span className="font-normal text-[var(--muted)]">(optional)</span>
234
+ </label>
235
+ <input
236
+ id="redir-notes"
237
+ className={inputCls}
238
+ value={form.notes ?? ''}
239
+ onChange={(e) => update({ notes: e.target.value })}
240
+ placeholder="Why this redirect exists"
241
+ />
242
+ </div>
243
+ </InspectorPaneSection>
244
+ </InspectorPaneBody>
245
+
246
+ <InspectorPaneFooter>
247
+ <div className="flex items-center gap-2">
248
+ {rule && onDelete && (
249
+ <button
250
+ type="button"
251
+ onClick={() => onDelete(rule)}
252
+ disabled={saving}
253
+ aria-label={`Delete redirect ${rule.fromPath}`}
254
+ className="flex h-9 w-9 shrink-0 items-center justify-center rounded-[7px] border border-[var(--bdr)] text-[var(--err)] transition-colors duration-[var(--motion-fast)] hover:bg-[var(--err-l)] focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:outline-none disabled:opacity-50"
255
+ >
256
+ <Trash2 size={16} aria-hidden />
257
+ </button>
258
+ )}
259
+ <button
260
+ type="button"
261
+ onClick={() => void handleSave()}
262
+ disabled={saving}
263
+ className="bg-primary text-primary-foreground min-w-0 flex-1 rounded-[7px] px-3 py-2 text-[13px] font-semibold transition-colors duration-[var(--motion-fast)] hover:opacity-90 focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50"
264
+ >
265
+ {saving ? 'Saving…' : rule ? 'Save changes' : 'Create redirect'}
266
+ </button>
267
+ </div>
268
+ </InspectorPaneFooter>
269
+ </>
270
+ )
271
+ }
@@ -523,7 +523,7 @@ export function SeoEditorPane({ entityType, entityId, onClose, onSaved }: SeoEdi
523
523
  type="button"
524
524
  onClick={() => void handleSave()}
525
525
  disabled={saving || loading || !!error}
526
- className="w-full rounded-[7px] bg-[var(--acc)] px-3 py-2 text-[13px] font-semibold text-white transition-colors duration-[var(--motion-fast)] hover:opacity-90 focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50"
526
+ className="bg-primary text-primary-foreground w-full rounded-[7px] px-3 py-2 text-[13px] font-semibold transition-colors duration-[var(--motion-fast)] hover:opacity-90 focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50"
527
527
  >
528
528
  {saving ? 'Saving…' : 'Save Changes'}
529
529
  </button>
@@ -59,7 +59,7 @@ export function DataTable({
59
59
  return (
60
60
  <div className="overflow-x-auto rounded-lg border border-[var(--border)]">
61
61
  <table className="w-full text-left text-sm">
62
- <thead className="border-b border-[var(--border)] bg-[var(--muted)]">
62
+ <thead className="bg-muted border-b border-[var(--border)]">
63
63
  <tr>
64
64
  <th className="w-10 px-4 py-3">
65
65
  <input
@@ -146,7 +146,7 @@ function RowActionsMenu({ actions, row }: { actions: RowAction[]; row: Row }) {
146
146
  <button
147
147
  key={action.key}
148
148
  onClick={() => action.onClick(row)}
149
- className="rounded p-1 text-[var(--muted-foreground)] hover:bg-[var(--muted)] hover:text-[var(--foreground)]"
149
+ className="hover:bg-muted rounded p-1 text-[var(--muted-foreground)] hover:text-[var(--foreground)]"
150
150
  aria-label={action.label}
151
151
  title={action.label}
152
152
  >
@@ -155,7 +155,7 @@ function RowActionsMenu({ actions, row }: { actions: RowAction[]; row: Row }) {
155
155
  ))}
156
156
  <button
157
157
  onClick={() => setOpen((o) => !o)}
158
- className="rounded p-1 hover:bg-[var(--muted)]"
158
+ className="hover:bg-muted rounded p-1"
159
159
  aria-label="More actions"
160
160
  >
161
161
  <MoreVerticalIcon />
@@ -10,10 +10,10 @@ export function Skeleton({ variant = 'text', lines = 3, className = '' }: Skelet
10
10
  if (variant === 'card') {
11
11
  return (
12
12
  <div className={`animate-pulse rounded-lg border border-[var(--border)] p-5 ${className}`}>
13
- <div className="mb-3 h-4 w-1/3 rounded bg-[var(--muted)]" />
13
+ <div className="bg-muted mb-3 h-4 w-1/3 rounded" />
14
14
  <div className="space-y-2">
15
- <div className="h-3 w-full rounded bg-[var(--muted)]" />
16
- <div className="h-3 w-2/3 rounded bg-[var(--muted)]" />
15
+ <div className="bg-muted h-3 w-full rounded" />
16
+ <div className="bg-muted h-3 w-2/3 rounded" />
17
17
  </div>
18
18
  </div>
19
19
  )
@@ -24,10 +24,10 @@ export function Skeleton({ variant = 'text', lines = 3, className = '' }: Skelet
24
24
  <div className={`animate-pulse ${className}`}>
25
25
  {Array.from({ length: lines }, (_, i) => (
26
26
  <div key={i} className="flex gap-4 border-b border-[var(--border)] px-4 py-3">
27
- <div className="h-4 w-8 rounded bg-[var(--muted)]" />
28
- <div className="h-4 flex-1 rounded bg-[var(--muted)]" />
29
- <div className="h-4 w-20 rounded bg-[var(--muted)]" />
30
- <div className="h-4 w-24 rounded bg-[var(--muted)]" />
27
+ <div className="bg-muted h-4 w-8 rounded" />
28
+ <div className="bg-muted h-4 flex-1 rounded" />
29
+ <div className="bg-muted h-4 w-20 rounded" />
30
+ <div className="bg-muted h-4 w-24 rounded" />
31
31
  </div>
32
32
  ))}
33
33
  </div>
@@ -39,7 +39,7 @@ export function Skeleton({ variant = 'text', lines = 3, className = '' }: Skelet
39
39
  {Array.from({ length: lines }, (_, i) => (
40
40
  <div
41
41
  key={i}
42
- className="h-3 rounded bg-[var(--muted)]"
42
+ className="bg-muted h-3 rounded"
43
43
  style={{ width: `${Math.max(40, 100 - i * 15)}%` }}
44
44
  />
45
45
  ))}
@@ -26,7 +26,7 @@ const toggleTrack = cv(
26
26
  )
27
27
 
28
28
  const toggleThumb = cv(
29
- 'pointer-events-none block rounded-full bg-white shadow-[0_1px_3px_rgba(0,0,0,0.2)] transition-transform duration-[var(--motion-base)]',
29
+ 'pointer-events-none block rounded-full bg-[var(--toggle-thumb)] shadow-[0_1px_3px_rgba(0,0,0,0.2)] transition-transform duration-[var(--motion-base)]',
30
30
  {
31
31
  variants: {
32
32
  size: {
@@ -114,7 +114,7 @@ function BlockField({ field, value, onChange }: BlockFieldProps) {
114
114
  {field.required && <span className="ml-0.5 text-[var(--destructive)]">*</span>}
115
115
  </label>
116
116
  <div className="flex items-center gap-3 rounded-md border border-dashed border-[var(--border)] p-3">
117
- <div className="flex h-12 w-12 shrink-0 items-center justify-center rounded-md bg-[var(--muted)]">
117
+ <div className="bg-muted flex h-12 w-12 shrink-0 items-center justify-center rounded-md">
118
118
  <Image className="h-5 w-5 text-[var(--muted-foreground)]" />
119
119
  </div>
120
120
  <span className="text-sm text-[var(--muted-foreground)]">
@@ -18,7 +18,7 @@ export function MediaField({ label, value, onChange, required, helpText }: Media
18
18
 
19
19
  {value ? (
20
20
  <div className="flex items-center gap-3 rounded-md border border-[var(--border)] p-3">
21
- <div className="h-16 w-16 shrink-0 rounded-md bg-[var(--muted)]" />
21
+ <div className="bg-muted h-16 w-16 shrink-0 rounded-md" />
22
22
  <div className="flex-1">
23
23
  <p className="text-sm font-medium">{value.filename}</p>
24
24
  <button
@@ -302,7 +302,7 @@ function LiteralDisplay({
302
302
  return (
303
303
  <div className="text-sm">
304
304
  <div className="mb-1">{label}</div>
305
- <div className="rounded-md border border-dashed border-[var(--border)] bg-[var(--muted)] px-3 py-2 text-xs text-[var(--muted-foreground)]">
305
+ <div className="bg-muted rounded-md border border-dashed border-[var(--border)] px-3 py-2 text-xs text-[var(--muted-foreground)]">
306
306
  Fixed: <code>{String(literal)}</code>
307
307
  </div>
308
308
  </div>
@@ -127,8 +127,8 @@ export function Header({
127
127
  className="hover:bg-accent flex items-center gap-1.5 rounded-lg p-1 transition-colors"
128
128
  aria-label="Account menu"
129
129
  >
130
- <div className="flex h-8 w-8 items-center justify-center rounded-full bg-[var(--acc)]">
131
- <span className="text-xs font-semibold text-white">{initial}</span>
130
+ <div className="bg-primary flex h-8 w-8 items-center justify-center rounded-full">
131
+ <span className="text-primary-foreground text-xs font-semibold">{initial}</span>
132
132
  </div>
133
133
  <ChevronDown
134
134
  className="text-muted-foreground hidden h-4 w-4 sm:block"
@@ -63,6 +63,10 @@
63
63
  --motion-fast: 0.12s;
64
64
  --motion-base: 0.18s;
65
65
  --motion-layout: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
66
+
67
+ /* Controls — the toggle thumb stays white in both modes per the design
68
+ system (.tog-thumb { background: #fff }), tokenized for themeability. */
69
+ --toggle-thumb: #ffffff;
66
70
  }
67
71
 
68
72
  .dark .actuate-admin,
@@ -19,7 +19,13 @@
19
19
  --primary-foreground: #ffffff;
20
20
  --secondary: var(--acc-l);
21
21
  --secondary-foreground: var(--txt);
22
- --muted: color-mix(in srgb, var(--bdr) 55%, var(--card));
22
+ /*
23
+ * IMPORTANT: never redefine --muted here. The raw design token --muted
24
+ * (actuate-tokens.css) is a faint TEXT color used by design-parity
25
+ * surfaces via text-[var(--muted)]. The muted SURFACE used by the
26
+ * Tailwind bg-muted utility is a separate private token below.
27
+ */
28
+ --surface-muted: color-mix(in srgb, var(--bdr) 55%, var(--card));
23
29
  --muted-foreground: var(--sub);
24
30
  --accent: var(--acc-l);
25
31
  --accent-foreground: var(--acc);
@@ -68,7 +74,7 @@
68
74
  --info-foreground: #0d0c18;
69
75
  --destructive-foreground: #0d0c18;
70
76
  --sidebar-primary-foreground: #0d0c18;
71
- --muted: color-mix(in srgb, var(--bdr) 40%, var(--card));
77
+ --surface-muted: color-mix(in srgb, var(--bdr) 40%, var(--card));
72
78
  }
73
79
 
74
80
  @theme inline {
@@ -82,7 +88,7 @@
82
88
  --color-primary-foreground: var(--primary-foreground);
83
89
  --color-secondary: var(--secondary);
84
90
  --color-secondary-foreground: var(--secondary-foreground);
85
- --color-muted: var(--muted);
91
+ --color-muted: var(--surface-muted);
86
92
  --color-muted-foreground: var(--muted-foreground);
87
93
  --color-accent: var(--accent);
88
94
  --color-accent-foreground: var(--accent-foreground);
@@ -321,7 +321,7 @@ export function DocumentEdit({
321
321
  <div className="flex items-center gap-2">
322
322
  <button
323
323
  onClick={() => setShowPreview((v) => !v)}
324
- className="inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm text-[var(--muted-foreground)] hover:bg-[var(--muted)] hover:text-[var(--foreground)]"
324
+ className="hover:bg-muted inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm text-[var(--muted-foreground)] hover:text-[var(--foreground)]"
325
325
  title={showPreview ? 'Hide preview' : 'Show preview'}
326
326
  >
327
327
  {showPreview ? <EyeOff className="h-4 w-4" /> : <Eye className="h-4 w-4" />}
@@ -331,7 +331,7 @@ export function DocumentEdit({
331
331
  <>
332
332
  <button
333
333
  onClick={() => setShowShareLink(true)}
334
- className="inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm text-[var(--muted-foreground)] hover:bg-[var(--muted)] hover:text-[var(--foreground)]"
334
+ className="hover:bg-muted inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm text-[var(--muted-foreground)] hover:text-[var(--foreground)]"
335
335
  title="Share a signed preview link for the current draft"
336
336
  >
337
337
  <Share2 className="h-4 w-4" />
@@ -339,7 +339,7 @@ export function DocumentEdit({
339
339
  </button>
340
340
  <button
341
341
  onClick={() => setShowVersions(true)}
342
- className="inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm text-[var(--muted-foreground)] hover:bg-[var(--muted)] hover:text-[var(--foreground)]"
342
+ className="hover:bg-muted inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm text-[var(--muted-foreground)] hover:text-[var(--foreground)]"
343
343
  title="Version history"
344
344
  >
345
345
  <Clock className="h-4 w-4" />
@@ -347,7 +347,7 @@ export function DocumentEdit({
347
347
  </button>
348
348
  <button
349
349
  onClick={handleDuplicate}
350
- className="inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm text-[var(--muted-foreground)] hover:bg-[var(--muted)] hover:text-[var(--foreground)]"
350
+ className="hover:bg-muted inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm text-[var(--muted-foreground)] hover:text-[var(--foreground)]"
351
351
  title="Duplicate this document"
352
352
  >
353
353
  <Copy className="h-4 w-4" />
@@ -3,8 +3,9 @@
3
3
  /**
4
4
  * All Entries — a cross-form submissions inbox. Same token-only table, search,
5
5
  * status pills (All / Unread / Starred / Archived), bulk actions, CSV export,
6
- * pagination, and detail drawer as the per-form Submissions view, plus a Form
7
- * filter and a Form column so editors can triage every form from one place.
6
+ * pagination, and inline detail pane as the per-form Submissions view, plus a
7
+ * Form filter and a Form column so editors can triage every form from one
8
+ * place.
8
9
  */
9
10
  import { useCallback, useEffect, useState } from 'react'
10
11
  import { Download, Inbox, Search } from 'lucide-react'
@@ -22,9 +23,10 @@ import {
22
23
  type FormSubmission,
23
24
  } from '../lib/forms-service.js'
24
25
  import { emitFormsChanged, onFormsChanged } from '../lib/forms-events.js'
25
- import { EntryDetailDrawer } from '../components/forms/EntryDetailDrawer.js'
26
+ import { FormEntryDetailPane } from '../components/forms/FormEntryDetailPane.js'
26
27
  import { EntriesTable } from '../components/forms/EntriesTable.js'
27
28
  import { ConfirmDialog } from '../components/ui/ConfirmDialog.js'
29
+ import { InspectorPane, SplitPaneLayout, SplitPaneList } from '../components/ui/InspectorPane.js'
28
30
  import {
29
31
  FormsEmptyState,
30
32
  FormsErrorState,
@@ -106,7 +108,6 @@ export function FormEntries({ onNavigate }: FormEntriesProps) {
106
108
  const [page, setPage] = useState(1)
107
109
  const [selected, setSelected] = useState<Set<string>>(new Set())
108
110
  const [activeEntry, setActiveEntry] = useState<string | null>(null)
109
- const [drawerOpen, setDrawerOpen] = useState(false)
110
111
  const [confirmBulkDelete, setConfirmBulkDelete] = useState(false)
111
112
 
112
113
  const scopedFormId = formFilter === 'all' ? undefined : formFilter
@@ -167,8 +168,8 @@ export function FormEntries({ onNavigate }: FormEntriesProps) {
167
168
  }, [load, loadCounts])
168
169
 
169
170
  const openEntry = useCallback((id: string) => {
170
- setActiveEntry(id)
171
- setDrawerOpen(true)
171
+ // Toggle: clicking the open row again collapses the pane.
172
+ setActiveEntry((cur) => (cur === id ? null : id))
172
173
  setEntries((cur) => cur.map((e) => (e.id === id ? { ...e, unread: false } : e)))
173
174
  }, [])
174
175
 
@@ -372,68 +373,82 @@ export function FormEntries({ onNavigate }: FormEntriesProps) {
372
373
  </div>
373
374
  )}
374
375
 
375
- {error ? (
376
- <FormsErrorState message={error} onRetry={load} />
377
- ) : loading ? (
378
- <FormsLoading label="Loading entries…" />
379
- ) : showEmpty ? (
380
- <FormsEmptyState
381
- icon={<Inbox className="h-6 w-6" aria-hidden />}
382
- title={isFiltered ? 'No entries match your filters' : 'No entries yet'}
383
- description={
384
- isFiltered
385
- ? 'Try a different search term, form, or status filter.'
386
- : 'Submissions across all your forms will appear here.'
387
- }
388
- action={
389
- isFiltered ? (
390
- <button
391
- type="button"
392
- onClick={() => {
393
- setSearch('')
394
- setFilter('all')
395
- setFormFilter('all')
396
- setPage(1)
397
- }}
398
- className="text-primary text-sm font-medium hover:underline"
399
- >
400
- Clear filters
401
- </button>
402
- ) : undefined
403
- }
404
- />
405
- ) : (
406
- <EntriesTable
407
- entries={entries}
408
- selected={selected}
409
- allSelected={allSelected}
410
- onToggleSelectAll={toggleSelectAll}
411
- onToggleSelect={toggleSelect}
412
- onOpen={openEntry}
413
- onToggleStar={toggleStar}
414
- showForm
415
- onOpenForm={(id) => onNavigate?.(`/forms/${id}/submissions`)}
416
- ariaLabel="All entries"
417
- footer={
418
- <FormsPagination
419
- page={page}
420
- pageSize={PAGE_SIZE}
421
- total={total}
422
- onPageChange={setPage}
423
- noun="submission"
424
- label="Entries pagination"
376
+ {/* The page scrolls, so the split area takes a viewport-derived height
377
+ to keep the pane's body/footer independently scrollable. */}
378
+ <SplitPaneLayout className="h-[calc(100vh-340px)] min-h-[480px]">
379
+ <SplitPaneList>
380
+ {error ? (
381
+ <FormsErrorState message={error} onRetry={load} />
382
+ ) : loading ? (
383
+ <FormsLoading label="Loading entries…" />
384
+ ) : showEmpty ? (
385
+ <FormsEmptyState
386
+ icon={<Inbox className="h-6 w-6" aria-hidden />}
387
+ title={isFiltered ? 'No entries match your filters' : 'No entries yet'}
388
+ description={
389
+ isFiltered
390
+ ? 'Try a different search term, form, or status filter.'
391
+ : 'Submissions across all your forms will appear here.'
392
+ }
393
+ action={
394
+ isFiltered ? (
395
+ <button
396
+ type="button"
397
+ onClick={() => {
398
+ setSearch('')
399
+ setFilter('all')
400
+ setFormFilter('all')
401
+ setPage(1)
402
+ }}
403
+ className="text-primary text-sm font-medium hover:underline"
404
+ >
405
+ Clear filters
406
+ </button>
407
+ ) : undefined
408
+ }
425
409
  />
426
- }
427
- />
428
- )}
410
+ ) : (
411
+ <EntriesTable
412
+ entries={entries}
413
+ selected={selected}
414
+ allSelected={allSelected}
415
+ onToggleSelectAll={toggleSelectAll}
416
+ onToggleSelect={toggleSelect}
417
+ onOpen={openEntry}
418
+ onToggleStar={toggleStar}
419
+ activeId={activeEntry}
420
+ showForm
421
+ onOpenForm={(id) => onNavigate?.(`/forms/${id}/submissions`)}
422
+ ariaLabel="All entries"
423
+ footer={
424
+ <FormsPagination
425
+ page={page}
426
+ pageSize={PAGE_SIZE}
427
+ total={total}
428
+ onPageChange={setPage}
429
+ noun="submission"
430
+ label="Entries pagination"
431
+ />
432
+ }
433
+ />
434
+ )}
435
+ </SplitPaneList>
429
436
 
430
- <EntryDetailDrawer
431
- entryId={activeEntry}
432
- open={drawerOpen}
433
- onOpenChange={setDrawerOpen}
434
- onChanged={refresh}
435
- onDeleted={() => refresh()}
436
- />
437
+ <InspectorPane open={activeEntry !== null} width={400} aria-label="Entry details">
438
+ {activeEntry && (
439
+ <FormEntryDetailPane
440
+ key={activeEntry}
441
+ entryId={activeEntry}
442
+ onClose={() => setActiveEntry(null)}
443
+ onChanged={refresh}
444
+ onDeleted={() => {
445
+ setActiveEntry(null)
446
+ refresh()
447
+ }}
448
+ />
449
+ )}
450
+ </InspectorPane>
451
+ </SplitPaneLayout>
437
452
 
438
453
  <ConfirmDialog
439
454
  open={confirmBulkDelete}