@prenta/admin 2.16.2 → 2.16.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"EditorTopBar.d.ts","sourceRoot":"","sources":["../../../src/views/page-editor/EditorTopBar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAoBhD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAClE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAC1F,OAAO,EAML,KAAK,aAAa,EACnB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAGhE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAA;AAE7D,UAAU,iBAAiB;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,UAAU,CAAA;IAClB,aAAa,EAAE,aAAa,CAAA;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,OAAO,CAAA;IACd,SAAS,EAAE,SAAS,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,sEAAsE;IACtE,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,6EAA6E;IAC7E,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,QAAQ,EAAE,UAAU,CAAA;IACpB,oDAAoD;IACpD,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAA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,iBAAiB,EAAE,MAAM,IAAI,CAAA;IAC7B,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACxC,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,qFAAqF;IACrF,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpC;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;CAC3B;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,MAAM,EACN,aAAa,EACb,UAAU,EACV,IAAI,EACJ,KAAK,EACL,SAAS,EACT,UAAU,EACV,OAAO,EACP,YAAmB,EACnB,qBAAqB,EACrB,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,MAAM,EACN,SAAmB,EACnB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,MAAM,EACN,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,SAAS,EACT,WAAmB,EACnB,cAAc,EACd,SAAS,EACT,OAAe,EACf,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,MAAM,EACN,MAAM,EACN,OAAe,EACf,OAAe,EACf,aAAa,EACb,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,UAAU,EACV,aAAoB,EACpB,WAAkB,EAClB,oBAA2B,GAC5B,EAAE,iBAAiB,2CA2UnB"}
1
+ {"version":3,"file":"EditorTopBar.d.ts","sourceRoot":"","sources":["../../../src/views/page-editor/EditorTopBar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAsBhD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAClE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0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C,EAAE,MAAM,EAAE,CAAA;CAC3B;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,MAAM,EACN,aAAa,EACb,UAAU,EACV,IAAI,EACJ,KAAK,EACL,SAAS,EACT,UAAU,EACV,OAAO,EACP,YAAmB,EACnB,qBAAqB,EACrB,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,MAAM,EACN,SAAmB,EACnB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,MAAM,EACN,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,SAAS,EACT,WAAmB,EACnB,cAAc,EACd,SAAS,EACT,OAAe,EACf,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,MAAM,EACN,MAAM,EACN,OAAe,EACf,OAAe,EACf,aAAa,EACb,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,UAAU,EACV,aAAoB,EACpB,WAAkB,EAClB,oBAA2B,GAC5B,EAAE,iBAAiB,2CAuWnB"}
@@ -2,7 +2,8 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { useState } from 'react';
4
4
  import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
5
- import { Calendar, Check, ChevronDown, ExternalLink, History, Loader2, Redo2, Settings2, Share2, TriangleAlert, Undo2, } from 'lucide-react';
5
+ import { Calendar, Check, ChevronDown, ExternalLink, History, Loader2, MessageSquareWarning, Redo2, Settings2, Share2, TriangleAlert, Undo2, } from 'lucide-react';
6
+ import { Button } from '../../components/ui/Button.js';
6
7
  import { EditorSeoScoreBadge } from '../../components/seo/EditorSeoScoreBadge.js';
7
8
  import { BreakpointPicker } from '../../components/BreakpointPicker.js';
8
9
  import { RequestChangesDialog } from '../../components/RequestChangesDialog.js';
@@ -11,6 +12,14 @@ import { adminPortalContainer } from '../../lib/portal-container.js';
11
12
  import { resolveViewSiteChrome } from '../../lib/view-site-chrome.js';
12
13
  import { APPROVE_LABEL, REQUEST_CHANGES_LABEL, REVIEWER_NOTE_PREFIX, SUBMIT_FOR_REVIEW_LABEL, resolveWorkflowChrome, } from '../../lib/workflow-chrome.js';
13
14
  import { ThemeChromeModeToggle } from './theme-chrome/ThemeChromeModeToggle.js';
15
+ /**
16
+ * The shared Button stops pointer events while disabled, which also stops the
17
+ * browser showing its title. These actions use the title to say why they are
18
+ * disabled (not ready to publish, no site URL), so they keep the pointer.
19
+ */
20
+ const DISABLED_WITH_REASON = 'disabled:pointer-events-auto! disabled:cursor-not-allowed disabled:hover:border-bdr! disabled:hover:text-txt!';
21
+ /** The same for the filled primary action, whose hover is a brightness lift. */
22
+ const DISABLED_PRIMARY_WITH_REASON = 'disabled:pointer-events-auto! disabled:cursor-not-allowed disabled:hover:brightness-100!';
14
23
  export function EditorTopBar({ title, status, workflowStage, reviewNote, role, dirty, saveState, publishing, canEdit, publishReady = true, publishDisabledReason, viewport, zoom, canvasScale, onZoom, backLabel = 'Pages', onViewport, chromeMode, onChromeMode, onBack, onViewOnSite, onShare, hasPublicSiteUrl, matchesAdminOrigin, onHistory, historyOpen = false, onOpenSettings, onOpenSeo, seoOpen = false, seoScore, seoScoreBand, onSaveDraft, onUndo, onRedo, canUndo = false, canRedo = false, localeControl, onSubmitForReview, onApprove, onRequestChanges, onSchedule, scheduleReady = true, scheduledAt = null, scheduledUnpublishAt = null, }) {
15
24
  const [requestChangesOpen, setRequestChangesOpen] = useState(false);
16
25
  const workflow = resolveWorkflowChrome({ stage: workflowStage, status, role, canEdit });
@@ -55,13 +64,13 @@ export function EditorTopBar({ title, status, workflowStage, reviewNote, role, d
55
64
  let primaryAction;
56
65
  switch (workflow.primary) {
57
66
  case 'submit':
58
- primaryAction = (_jsxs("button", { type: "button", onClick: onSubmitForReview, disabled: submitBlocked, title: submitTitle, "aria-disabled": submitBlocked, className: "bg-primary text-primary-foreground hover:bg-primary/90 inline-flex items-center gap-1.5 rounded-lg px-3.5 py-1.5 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50", children: [publishing && _jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin", "aria-hidden": true }), SUBMIT_FOR_REVIEW_LABEL] }));
67
+ primaryAction = (_jsx(Button, { type: "button", variant: "primary", onClick: onSubmitForReview, className: DISABLED_PRIMARY_WITH_REASON, disabled: submitBlocked, title: submitTitle, "aria-disabled": submitBlocked, leftIcon: publishing ? _jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin", "aria-hidden": true }) : undefined, children: SUBMIT_FOR_REVIEW_LABEL }));
59
68
  break;
60
69
  case 'approve':
61
- primaryAction = (_jsxs("button", { type: "button", onClick: onApprove, disabled: approveBlocked, title: approveTitle, "aria-disabled": approveBlocked, className: "bg-primary text-primary-foreground hover:bg-primary/90 inline-flex items-center gap-1.5 rounded-lg px-3.5 py-1.5 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50", children: [publishing && _jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin", "aria-hidden": true }), APPROVE_LABEL] }));
70
+ primaryAction = (_jsx(Button, { type: "button", variant: "primary", onClick: onApprove, className: DISABLED_PRIMARY_WITH_REASON, disabled: approveBlocked, title: approveTitle, "aria-disabled": approveBlocked, leftIcon: publishing ? _jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin", "aria-hidden": true }) : undefined, children: APPROVE_LABEL }));
62
71
  break;
63
72
  case 'waiting':
64
- primaryAction = (_jsx("span", { className: "text-muted-foreground text-sm", "aria-live": "polite", children: workflow.waitingLabel }));
73
+ primaryAction = (_jsx("span", { className: "text-muted-foreground text-sm whitespace-nowrap", "aria-live": "polite", children: workflow.waitingLabel }));
65
74
  break;
66
75
  case null:
67
76
  primaryAction = null;
@@ -71,32 +80,34 @@ export function EditorTopBar({ title, status, workflowStage, reviewNote, role, d
71
80
  primaryAction = _exhaustive;
72
81
  }
73
82
  }
74
- return (_jsxs("header", { className: "prenta-editor-header bg-card border-border flex h-14 shrink-0 items-center justify-between gap-4 border-b px-4", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsxs("nav", { "aria-label": "Breadcrumb", className: "flex min-w-0 items-center gap-1.5 text-sm", children: [_jsx("button", { type: "button", onClick: onBack, className: "text-muted-foreground hover:text-foreground shrink-0", children: backLabel }), _jsx("span", { className: "text-muted-foreground", "aria-hidden": true, children: "/" }), _jsx("span", { className: "text-foreground truncate font-medium", children: title || 'Untitled page' })] }), _jsx("span", { className: `ml-2 shrink-0 text-xs font-medium ${workflow.statusClassName}`, "aria-label": `Status: ${workflow.statusLabel}`, children: workflow.statusLabel }), reviewNote ? (_jsxs("span", { className: "text-muted-foreground text-xs", children: [REVIEWER_NOTE_PREFIX, " ", reviewNote] })) : null, scheduledAt && (_jsxs("span", { className: "text-muted-foreground ml-1 hidden shrink-0 text-xs sm:inline", title: scheduledUnpublishAt
83
+ return (
84
+ // The bar is a size container (responsive.css): its secondary actions drop
85
+ // their labels by the bar's own width, which the sidebar and the rail
86
+ // change independently of the viewport. When it is still too narrow the
87
+ // actions wrap to a second line: the left group's minimum width is its
88
+ // fixed parts plus a 5rem title, so the title is never squeezed to nothing.
89
+ _jsxs("header", { className: "prenta-editor-header bg-card border-border flex min-h-14 shrink-0 flex-wrap items-center justify-between gap-x-4 gap-y-2 border-b px-4 py-2", children: [_jsxs("div", { className: "flex min-w-min flex-[1_1_0%] items-center gap-2", children: [_jsxs("nav", { "aria-label": "Breadcrumb", className: "flex min-w-[5rem] flex-[0_1_auto] items-center gap-1.5 overflow-hidden text-sm", children: [_jsx("button", { type: "button", onClick: onBack, className: "text-muted-foreground hover:text-foreground shrink-0", children: backLabel }), _jsx("span", { className: "text-muted-foreground", "aria-hidden": true, children: "/" }), _jsx("span", { className: "text-foreground truncate font-medium", children: title || 'Untitled page' })] }), _jsx("span", { className: `ml-2 shrink-0 text-xs font-medium ${workflow.statusClassName}`, "aria-label": `Status: ${workflow.statusLabel}`, children: workflow.statusLabel }), reviewNote ? (_jsxs("span", { className: "text-muted-foreground max-w-[16rem] min-w-0 shrink truncate text-xs", title: `${REVIEWER_NOTE_PREFIX} ${reviewNote}`, children: [REVIEWER_NOTE_PREFIX, " ", reviewNote] })) : null, scheduledAt && (_jsxs("span", { className: "text-muted-foreground ml-1 hidden shrink-0 text-xs sm:inline", title: scheduledUnpublishAt
75
90
  ? `Publishes ${formatScheduleLabel(scheduledAt)} · Unpublishes ${formatScheduleLabel(scheduledUnpublishAt)}`
76
- : `Publishes ${formatScheduleLabel(scheduledAt)}`, children: ["\u00B7 ", formatScheduleLabel(scheduledAt)] })), _jsx(SaveStatus, { state: saveState, dirty: dirty }), onUndo && onRedo && (_jsxs("span", { className: "ml-1 inline-flex shrink-0 items-center", children: [_jsx("button", { type: "button", onClick: onUndo, disabled: !canUndo, "aria-label": "Undo", title: "Undo the last edit (Ctrl+Z or \u2318Z). Text fields keep their own undo.", className: "prenta-touch-target text-muted-foreground hover:text-foreground hover:bg-accent rounded-lg p-2 disabled:cursor-not-allowed disabled:opacity-40", children: _jsx(Undo2, { className: "h-4 w-4", "aria-hidden": true }) }), _jsx("button", { type: "button", onClick: onRedo, disabled: !canRedo, "aria-label": "Redo", title: "Redo (Ctrl+Shift+Z, Ctrl+Y, or \u2318\u21E7Z).", className: "prenta-touch-target text-muted-foreground hover:text-foreground hover:bg-accent rounded-lg p-2 disabled:cursor-not-allowed disabled:opacity-40", children: _jsx(Redo2, { className: "h-4 w-4", "aria-hidden": true }) })] })), localeControl ? _jsx("span", { className: "ml-1 inline-flex shrink-0", children: localeControl }) : null] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("div", { className: "hidden items-center gap-1.5 md:flex", children: [_jsx(BreakpointPicker, { value: viewport, onChange: onViewport }), zoom !== undefined && onZoom && (_jsx(ZoomChip, { zoom: zoom, scale: canvasScale ?? 1, onChange: onZoom })), chromeMode && onChromeMode ? (_jsx(ThemeChromeModeToggle, { mode: chromeMode, onChange: onChromeMode })) : null] }), _jsx("button", { type: "button", onClick: onOpenSettings, "aria-label": backLabel === 'Posts' ? 'Post settings' : 'Page settings', title: backLabel === 'Posts' ? 'Post settings' : 'Page settings', className: "prenta-touch-target text-muted-foreground hover:text-foreground hover:bg-accent rounded-lg p-2", children: _jsx(Settings2, { className: "h-4 w-4", "aria-hidden": true }) }), onOpenSeo && (_jsxs("button", { type: "button", onClick: onOpenSeo, "aria-pressed": seoOpen, "aria-label": seoScore === undefined ? 'SEO' : `SEO, score ${seoScore} out of 100`, title: seoScore === undefined
91
+ : `Publishes ${formatScheduleLabel(scheduledAt)}`, children: ["\u00B7 ", formatScheduleLabel(scheduledAt)] })), _jsx(SaveStatus, { state: saveState, dirty: dirty }), onUndo && onRedo && (_jsxs("span", { className: "ml-1 inline-flex shrink-0 items-center", children: [_jsx(Button, { type: "button", variant: "icon", size: "icon-lg", onClick: onUndo, disabled: !canUndo, "aria-label": "Undo", title: "Undo the last edit (Ctrl+Z or \u2318Z). Text fields keep their own undo.", className: "prenta-touch-target", children: _jsx(Undo2, { className: "h-4 w-4", "aria-hidden": true }) }), _jsx(Button, { type: "button", variant: "icon", size: "icon-lg", onClick: onRedo, disabled: !canRedo, "aria-label": "Redo", title: "Redo (Ctrl+Shift+Z, Ctrl+Y, or \u2318\u21E7Z).", className: "prenta-touch-target", children: _jsx(Redo2, { className: "h-4 w-4", "aria-hidden": true }) })] })), localeControl ? _jsx("span", { className: "ml-1 inline-flex shrink-0", children: localeControl }) : null] }), _jsxs("div", { className: "ml-auto flex max-w-full shrink-0 flex-wrap items-center justify-end gap-2", children: [_jsxs("div", { className: "hidden items-center gap-1.5 md:flex", children: [_jsx(BreakpointPicker, { value: viewport, onChange: onViewport }), zoom !== undefined && onZoom && (_jsx(ZoomChip, { zoom: zoom, scale: canvasScale ?? 1, onChange: onZoom })), chromeMode && onChromeMode ? (_jsx(ThemeChromeModeToggle, { mode: chromeMode, onChange: onChromeMode })) : null] }), _jsx(Button, { type: "button", variant: "icon", size: "icon-lg", onClick: onOpenSettings, "aria-label": backLabel === 'Posts' ? 'Post settings' : 'Page settings', title: backLabel === 'Posts' ? 'Post settings' : 'Page settings', className: "prenta-touch-target", children: _jsx(Settings2, { className: "h-4 w-4", "aria-hidden": true }) }), onOpenSeo && (_jsxs(Button, { type: "button", variant: seoOpen ? 'primary' : 'ghost', onClick: onOpenSeo, "aria-pressed": seoOpen, "aria-label": seoScore === undefined ? 'SEO' : `SEO, score ${seoScore} out of 100`, title: seoScore === undefined
77
92
  ? 'SEO — meta tags, social preview, schema, and analysis.'
78
- : `SEO — score ${seoScore}/100. Meta tags, social preview, schema, and analysis.`, className: `inline-flex items-center gap-1.5 rounded-lg px-2 py-1.5 text-sm font-medium transition-colors ${seoOpen
79
- ? 'bg-primary text-primary-foreground'
80
- : 'text-muted-foreground hover:text-foreground hover:bg-accent'}`, children: [seoScore !== undefined && (_jsx(EditorSeoScoreBadge, { score: seoScore, band: seoScoreBand, inverted: seoOpen })), _jsx("span", { className: "hidden sm:inline", children: "SEO" })] })), onHistory && (_jsx("button", { type: "button", onClick: onHistory, "aria-pressed": historyOpen, "aria-label": "Version history", title: historyOpen ? 'Close version history' : 'Version history', className: `prenta-touch-target rounded-lg p-2 transition-colors ${historyOpen
81
- ? 'bg-primary text-primary-foreground'
82
- : 'text-muted-foreground hover:text-foreground hover:bg-accent'}`, children: _jsx(History, { className: "h-4 w-4", "aria-hidden": true }) })), chrome && (_jsxs(_Fragment, { children: [_jsxs("button", { type: "button", onClick: () => onViewOnSite?.(chrome.primaryIntent), disabled: !chrome.viewEnabled, title: chrome.viewDisabledReason ??
93
+ : `SEO — score ${seoScore}/100. Meta tags, social preview, schema, and analysis.`, className: "px-2!", children: [seoScore !== undefined && (_jsx(EditorSeoScoreBadge, { score: seoScore, band: seoScoreBand, inverted: seoOpen })), _jsx("span", { className: "hidden sm:inline", children: "SEO" })] })), onHistory && (_jsx(Button, { type: "button", variant: historyOpen ? 'primary' : 'icon', size: "icon-lg", onClick: onHistory, "aria-pressed": historyOpen, "aria-label": "Version history", title: historyOpen ? 'Close version history' : 'Version history', className: "prenta-touch-target", children: _jsx(History, { className: "h-4 w-4", "aria-hidden": true }) })), chrome && (_jsxs(_Fragment, { children: [_jsx(Button, { type: "button", variant: "secondary", onClick: () => onViewOnSite?.(chrome.primaryIntent), disabled: !chrome.viewEnabled, title: chrome.viewDisabledReason ??
83
94
  (chrome.primaryIntent === 'view-live'
84
95
  ? 'Open the published page in a new tab.'
85
- : 'Open the draft on your site in a new tab.'), className: "border-border text-foreground hover:bg-accent inline-flex items-center gap-1.5 rounded-lg border px-3 py-1.5 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50", children: [_jsx(ExternalLink, { className: "h-3.5 w-3.5", "aria-hidden": true }), chrome.primaryIntent === 'view-live' ? 'View live' : 'View site'] }), chrome.showViewLive && (_jsxs(DropdownMenu.Root, { children: [_jsx(DropdownMenu.Trigger, { asChild: true, children: _jsx("button", { type: "button", disabled: !chrome.viewEnabled, "aria-label": "More view options", className: "prenta-touch-target border-border text-foreground hover:bg-accent inline-flex h-[34px] items-center rounded-lg border px-2 text-sm font-medium disabled:cursor-not-allowed disabled:opacity-50", children: _jsx(ChevronDown, { className: "h-3.5 w-3.5", "aria-hidden": true }) }) }), _jsx(DropdownMenu.Portal, { container: adminPortalContainer(), children: _jsx(DropdownMenu.Content, { align: "end", sideOffset: 6, className: "border-border bg-popover z-[120] rounded-[10px] border p-[5px] shadow-[0_12px_34px_rgba(26,24,39,0.17)]", children: _jsx(DropdownMenu.Item, { onSelect: () => onViewOnSite?.('view-live'), className: "hover:bg-accent focus:bg-accent cursor-pointer rounded-md px-2.5 py-1.5 text-sm outline-none", children: "View live" }) }) })] })), chrome.shareVisible && onShare && (_jsxs("button", { type: "button", onClick: onShare, disabled: !chrome.viewEnabled, title: chrome.viewDisabledReason ??
86
- 'Copy a link so someone can view this draft without signing in.', className: "border-border text-foreground hover:bg-accent inline-flex items-center gap-1.5 rounded-lg border px-3 py-1.5 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50", children: [_jsx(Share2, { className: "h-3.5 w-3.5", "aria-hidden": true }), "Share"] }))] })), _jsx("button", { type: "button", onClick: onSaveDraft, disabled: !canEdit || saveState === 'saving' || (!dirty && saveState !== 'error'), className: "border-border text-foreground hover:bg-accent rounded-lg border px-3 py-1.5 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50", children: saveState === 'saving' ? 'Saving…' : workflow.saveLabel }), onSchedule && workflow.showSchedule && (_jsxs("button", { type: "button", onClick: onSchedule, disabled: scheduleBlocked, title: scheduleTitle, "aria-label": scheduledAt ? 'Reschedule publish' : 'Schedule publish', className: "border-border text-foreground hover:bg-accent inline-flex items-center gap-1.5 rounded-lg border px-3 py-1.5 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50", children: [_jsx(Calendar, { className: "h-3.5 w-3.5", "aria-hidden": true }), _jsx("span", { className: "hidden sm:inline", children: scheduledAt ? 'Reschedule' : 'Schedule' })] })), primaryAction, workflow.showRequestChanges && (_jsx("button", { type: "button", onClick: () => setRequestChangesOpen(true), disabled: requestChangesBlocked, className: "border-border text-foreground hover:bg-accent rounded-lg border px-3 py-1.5 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50", children: REQUEST_CHANGES_LABEL })), _jsx(RequestChangesDialog, { open: requestChangesOpen, onClose: () => setRequestChangesOpen(false), onConfirm: onRequestChanges })] })] }));
96
+ : 'Open the draft on your site in a new tab.'), className: DISABLED_WITH_REASON, leftIcon: _jsx(ExternalLink, { className: "h-3.5 w-3.5", "aria-hidden": true }), children: chrome.primaryIntent === 'view-live' ? 'View live' : 'View site' }), chrome.showViewLive && (_jsxs(DropdownMenu.Root, { children: [_jsx(DropdownMenu.Trigger, { asChild: true, children: _jsx(Button, { type: "button", variant: "secondary", size: "icon-lg", disabled: !chrome.viewEnabled, "aria-label": "More view options", className: "prenta-touch-target", children: _jsx(ChevronDown, { className: "h-3.5 w-3.5", "aria-hidden": true }) }) }), _jsx(DropdownMenu.Portal, { container: adminPortalContainer(), children: _jsx(DropdownMenu.Content, { align: "end", sideOffset: 6, className: "border-border bg-popover z-[120] rounded-[10px] border p-[5px] shadow-[0_12px_34px_rgba(26,24,39,0.17)]", children: _jsx(DropdownMenu.Item, { onSelect: () => onViewOnSite?.('view-live'), className: "hover:bg-accent focus:bg-accent cursor-pointer rounded-md px-2.5 py-1.5 text-sm outline-none", children: "View live" }) }) })] })), chrome.shareVisible && onShare && (_jsx(Button, { type: "button", variant: "secondary", onClick: onShare, disabled: !chrome.viewEnabled, "aria-label": "Share", title: chrome.viewDisabledReason ??
97
+ 'Copy a link so someone can view this draft without signing in.', className: `prenta-editor-collapsible prenta-touch-target ${DISABLED_WITH_REASON}`, leftIcon: _jsx(Share2, { className: "h-3.5 w-3.5", "aria-hidden": true }), children: _jsx("span", { className: "prenta-editor-label", children: "Share" }) }))] })), _jsx(Button, { type: "button", variant: "secondary", onClick: onSaveDraft, disabled: !canEdit || saveState === 'saving' || (!dirty && saveState !== 'error'), children: saveState === 'saving' ? 'Saving…' : workflow.saveLabel }), onSchedule && workflow.showSchedule && (_jsx(Button, { type: "button", variant: "secondary", onClick: onSchedule, disabled: scheduleBlocked, title: scheduleTitle, "aria-label": scheduledAt ? 'Reschedule publish' : 'Schedule publish', className: `prenta-editor-collapsible prenta-touch-target ${DISABLED_WITH_REASON}`, leftIcon: _jsx(Calendar, { className: "h-3.5 w-3.5", "aria-hidden": true }), children: _jsx("span", { className: "prenta-editor-label", children: scheduledAt ? 'Reschedule' : 'Schedule' }) })), primaryAction, workflow.showRequestChanges && (_jsx(Button, { type: "button", variant: "secondary", onClick: () => setRequestChangesOpen(true), disabled: requestChangesBlocked, "aria-label": REQUEST_CHANGES_LABEL, title: REQUEST_CHANGES_LABEL, className: "prenta-editor-collapsible prenta-touch-target", leftIcon: _jsx(MessageSquareWarning, { className: "h-3.5 w-3.5", "aria-hidden": true }), children: _jsx("span", { className: "prenta-editor-label", children: REQUEST_CHANGES_LABEL }) })), _jsx(RequestChangesDialog, { open: requestChangesOpen, onClose: () => setRequestChangesOpen(false), onConfirm: onRequestChanges })] })] }));
87
98
  }
88
99
  function SaveStatus({ state, dirty }) {
89
100
  if (state === 'saving') {
90
- return (_jsxs("span", { className: "text-muted-foreground ml-2 inline-flex items-center gap-1 text-xs", "aria-live": "polite", children: [_jsx(Loader2, { className: "h-3 w-3 animate-spin", "aria-hidden": true }), "Saving\u2026"] }));
101
+ return (_jsxs("span", { className: "text-muted-foreground ml-2 inline-flex min-w-0 shrink items-center gap-1 overflow-hidden text-xs whitespace-nowrap", "aria-live": "polite", children: [_jsx(Loader2, { className: "h-3 w-3 animate-spin", "aria-hidden": true }), "Saving\u2026"] }));
91
102
  }
92
103
  if (state === 'error') {
93
- return (_jsxs("span", { className: "text-destructive ml-2 inline-flex items-center gap-1 text-xs", "aria-live": "polite", children: [_jsx(TriangleAlert, { className: "h-3 w-3", "aria-hidden": true }), "Failed to save"] }));
104
+ return (_jsxs("span", { className: "text-destructive ml-2 inline-flex min-w-0 shrink items-center gap-1 overflow-hidden text-xs whitespace-nowrap", "aria-live": "polite", children: [_jsx(TriangleAlert, { className: "h-3 w-3", "aria-hidden": true }), "Failed to save"] }));
94
105
  }
95
106
  if (dirty) {
96
- return (_jsx("span", { className: "text-muted-foreground ml-2 text-xs", "aria-live": "polite", children: "Unsaved changes" }));
107
+ return (_jsx("span", { className: "text-muted-foreground ml-2 min-w-0 shrink truncate text-xs", "aria-live": "polite", children: "Unsaved changes" }));
97
108
  }
98
109
  if (state === 'saved') {
99
- return (_jsxs("span", { className: "text-muted-foreground ml-2 inline-flex items-center gap-1 text-xs", "aria-live": "polite", children: [_jsx(Check, { className: "h-3 w-3", "aria-hidden": true }), "Saved"] }));
110
+ return (_jsxs("span", { className: "text-muted-foreground ml-2 inline-flex min-w-0 shrink items-center gap-1 overflow-hidden text-xs whitespace-nowrap", "aria-live": "polite", children: [_jsx(Check, { className: "h-3 w-3", "aria-hidden": true }), "Saved"] }));
100
111
  }
101
112
  return null;
102
113
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EditorTopBar.js","sourceRoot":"","sources":["../../../src/views/page-editor/EditorTopBar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AAChD,OAAO,KAAK,YAAY,MAAM,+BAA+B,CAAA;AAC7D,OAAO,EACL,QAAQ,EACR,KAAK,EACL,WAAW,EACX,YAAY,EACZ,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,MAAM,EACN,aAAa,EACb,KAAK,GACN,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAA;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAA;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AAGpE,OAAO,EAAE,qBAAqB,EAAuB,MAAM,+BAA+B,CAAA;AAC1F,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,GAEtB,MAAM,8BAA8B,CAAA;AAGrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAA;AA4F/E,MAAM,UAAU,YAAY,CAAC,EAC3B,KAAK,EACL,MAAM,EACN,aAAa,EACb,UAAU,EACV,IAAI,EACJ,KAAK,EACL,SAAS,EACT,UAAU,EACV,OAAO,EACP,YAAY,GAAG,IAAI,EACnB,qBAAqB,EACrB,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,MAAM,EACN,SAAS,GAAG,OAAO,EACnB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,MAAM,EACN,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,SAAS,EACT,WAAW,GAAG,K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nE,QAAQ,aAElB,KAAC,OAAO,IAAC,SAAS,EAAC,sBAAsB,wBAAe,oBAEnD,CACR,CAAA;IACH,CAAC;IACD,IAAI,KAAK,KAAK,OAAO,EAAE,CAAC;QACtB,OAAO,CACL,gBACE,SAAS,EAAC,8DAA8D,eAC9D,QAAQ,aAElB,KAAC,aAAa,IAAC,SAAS,EAAC,SAAS,wBAAe,sBAE5C,CACR,CAAA;IACH,CAAC;IACD,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,CACL,eAAM,SAAS,EAAC,oCAAoC,eAAW,QAAQ,gCAEhE,CACR,CAAA;IACH,CAAC;IACD,IAAI,KAAK,KAAK,OAAO,EAAE,CAAC;QACtB,OAAO,CACL,gBACE,SAAS,EAAC,mEAAmE,eACnE,QAAQ,aAElB,KAAC,KAAK,IAAC,SAAS,EAAC,SAAS,wBAAe,aAEpC,CACR,CAAA;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC;AAED,SAAS,mBAAmB,CAAC,GAAW;IACtC,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;IACvB,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;QAAE,OAAO,GAAG,CAAA;IACzC,OAAO,CAAC,CAAC,cAAc,CAAC,SAAS,EAAE;QACjC,KAAK,EAAE,OAAO;QACd,GAAG,EAAE,SAAS;QACd,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;KAClB,CAAC,CAAA;AACJ,CAAC"}
1
+ {"version":3,"file":"EditorTopBar.js","sourceRoot":"","sources":["../../../src/views/page-editor/EditorTopBar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AAChD,OAAO,KAAK,YAAY,MAAM,+BAA+B,CAAA;AAC7D,OAAO,EACL,QAAQ,EACR,KAAK,EACL,WAAW,EACX,YAAY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eAC5D,QAAQ,gCAGb,CACR,CAAA;IACH,CAAC;IACD,IAAI,KAAK,KAAK,OAAO,EAAE,CAAC;QACtB,OAAO,CACL,gBACE,SAAS,EAAC,oHAAoH,eACpH,QAAQ,aAElB,KAAC,KAAK,IAAC,SAAS,EAAC,SAAS,wBAAe,aAEpC,CACR,CAAA;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC;AAED,SAAS,mBAAmB,CAAC,GAAW;IACtC,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;IACvB,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;QAAE,OAAO,GAAG,CAAA;IACzC,OAAO,CAAC,CAAC,cAAc,CAAC,SAAS,EAAE;QACjC,KAAK,EAAE,OAAO;QACd,GAAG,EAAE,SAAS;QACd,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;KAClB,CAAC,CAAA;AACJ,CAAC"}
@@ -48,6 +48,6 @@ export function SectionEditForm({ section, canEdit, onContentChange, onMetaChang
48
48
  // The validator reads the same helper, so it can never require a field the
49
49
  // editor is not drawing.
50
50
  const contentFields = visibleFields(def?.fields ?? [], section.content).filter((f) => !(editPostBodyField && f.key === 'body')) ?? [];
51
- return (_jsxs("div", { className: "border-border bg-muted/40 border-t px-3 py-3.5", children: [_jsxs("fieldset", { disabled: !canEdit, className: "space-y-3", children: [editPostBodyField && (_jsx(RichTextField, { label: "Post body field", value: postBody ?? '', onChange: onPostBodyChange, className: "[&_.ProseMirror]:min-h-[240px]", helpText: "Shared with post settings. Edits here change the post's Body field, which the canvas and the live site both render." })), contentFields.map((field) => (_jsx(ContentField, { id: `sec-${section.id}-${field.key}`, field: field, value: section.content[field.key], onChange: (v) => onContentChange({ [field.key]: v }), onPatch: (patch) => onContentChange(patch) }, field.key))), contentFields.length === 0 && !editPostBodyField && (_jsx("p", { className: "text-muted-foreground text-xs", children: "This section has no editable content \u2014 it is rendered entirely from the template." })), _jsxs("details", { className: "group", children: [_jsx("summary", { className: "text-muted-foreground hover:text-foreground cursor-pointer list-none text-[11px] font-medium tracking-wider uppercase", children: "Section settings" }), _jsxs("div", { className: "mt-2.5 space-y-3", children: [_jsxs("div", { children: [_jsx("label", { className: FIELD_LABEL, htmlFor: `sec-${section.id}-name`, children: "Section name" }), _jsx("input", { id: `sec-${section.id}-name`, className: FIELD_INPUT, value: section.name, onChange: (e) => onMetaChange({ name: e.target.value }) })] }), _jsxs("div", { children: [_jsx("label", { className: FIELD_LABEL, htmlFor: `sec-${section.id}-internal`, children: "Internal label" }), _jsx("input", { id: `sec-${section.id}-internal`, className: FIELD_INPUT, placeholder: "Team-only note (optional)", value: section.internalLabel ?? '', onChange: (e) => onMetaChange({ internalLabel: e.target.value }) })] })] })] })] }), _jsxs("p", { className: "text-muted-foreground mt-3 flex items-start gap-1.5 text-[11px] leading-relaxed", children: [_jsx(Lock, { className: "mt-0.5 h-3 w-3 shrink-0", "aria-hidden": true }), _jsxs("span", { children: ["Background, spacing and layout come from the template.", ' ', _jsxs("a", { href: "https://github.com/actuate-media/prenta/blob/main/docs/design-owned-sections.md", target: "_blank", rel: "noopener noreferrer", className: "text-brand inline-flex items-center gap-0.5 hover:underline", children: ["Why", _jsx(ExternalLink, { className: "h-2.5 w-2.5", "aria-hidden": true })] })] })] })] }));
51
+ return (_jsxs("div", { className: "border-border bg-muted/40 border-t px-3 py-3.5", children: [_jsxs("fieldset", { disabled: !canEdit, className: "space-y-3", children: [editPostBodyField && (_jsx(RichTextField, { label: "Post body field", value: postBody ?? '', onChange: onPostBodyChange, className: "[&_.ProseMirror]:min-h-[240px]", helpText: "Shared with post settings. Edits here change the post's Body field, which the canvas and the live site both render." })), contentFields.map((field) => (_jsx(ContentField, { id: `sec-${section.id}-${field.key}`, field: field, value: section.content[field.key], onChange: (v) => onContentChange({ [field.key]: v }), onPatch: (patch) => onContentChange(patch) }, field.key))), contentFields.length === 0 && !editPostBodyField && (_jsx("p", { className: "text-muted-foreground text-xs", children: "This section has no editable content \u2014 it is rendered entirely from the template." })), _jsxs("details", { className: "group", children: [_jsx("summary", { className: "text-muted-foreground hover:text-foreground cursor-pointer list-none text-[11px] font-medium tracking-wider uppercase", children: "Section settings" }), _jsxs("div", { className: "mt-2.5 space-y-3", children: [_jsxs("div", { children: [_jsx("label", { className: FIELD_LABEL, htmlFor: `sec-${section.id}-name`, children: "Section name" }), _jsx("input", { id: `sec-${section.id}-name`, className: FIELD_INPUT, value: section.name, onChange: (e) => onMetaChange({ name: e.target.value }) })] }), _jsxs("div", { children: [_jsx("label", { className: FIELD_LABEL, htmlFor: `sec-${section.id}-internal`, children: "Internal label" }), _jsx("input", { id: `sec-${section.id}-internal`, className: FIELD_INPUT, placeholder: "Team-only note (optional)", value: section.internalLabel ?? '', onChange: (e) => onMetaChange({ internalLabel: e.target.value }) })] })] })] })] }), _jsxs("p", { className: "text-muted-foreground mt-3 flex items-start gap-1.5 text-[11px] leading-relaxed", children: [_jsx(Lock, { className: "mt-0.5 h-3 w-3 shrink-0", "aria-hidden": true }), _jsxs("span", { children: ["Background, spacing and layout come from the template.", ' ', _jsxs("a", { href: "https://github.com/Prenta-dev/prenta/blob/main/docs/design-owned-sections.md", target: "_blank", rel: "noopener noreferrer", className: "text-brand inline-flex items-center gap-0.5 hover:underline", children: ["Why", _jsx(ExternalLink, { className: "h-2.5 w-2.5", "aria-hidden": true })] })] })] })] }));
52
52
  }
53
53
  //# sourceMappingURL=SectionEditForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionEditForm.js","sourceRoot":"","sources":["../../../src/views/page-editor/SectionEditForm.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAE7D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA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AAW,EAChC,SAAS,EAAE,WAAW,EACtB,WAAW,EAAC,2BAA2B,EACvC,KAAK,EAAE,OAAO,CAAC,aAAa,IAAI,EAAE,EAClC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,GAChE,IACE,IACF,IACE,IACD,EAIX,aAAG,SAAS,EAAC,iFAAiF,aAC5F,KAAC,IAAI,IAAC,SAAS,EAAC,yBAAyB,wBAAe,EACxD,qFACyD,GAAG,EAC1D,aACE,IAAI,EAAC,8EAA8E,EACnF,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,SAAS,EAAC,6DAA6D,oBAGvE,KAAC,YAAY,IAAC,SAAS,EAAC,aAAa,wBAAe,IAClD,IACC,IACL,IACA,CACP,CAAA;AACH,CAAC"}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@prenta/admin",
3
- "version": "2.16.2",
3
+ "version": "2.16.4",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "https://github.com/actuate-media/prenta.git",
7
+ "url": "https://github.com/Prenta-dev/prenta.git",
8
8
  "directory": "packages/cms-admin"
9
9
  },
10
10
  "publishConfig": {
@@ -99,16 +99,16 @@
99
99
  "tailwindcss": "^4.0.0",
100
100
  "typescript": "^5.7.0",
101
101
  "vitest": "^4.1.12",
102
- "@prenta/component-blocks": "0.3.1",
103
- "@prenta/plugin-ai": "4.0.1",
104
- "@prenta/plugin-blocks": "1.0.1",
105
- "@prenta/plugin-commerce": "1.0.1",
106
- "@prenta/core": "8.21.8",
107
- "@prenta/plugin-navigation": "1.1.0",
108
- "@prenta/plugin-forms": "1.0.2",
109
- "@prenta/plugin-seo": "2.0.1",
110
- "@prenta/plugin-media": "1.0.1",
111
- "@prenta/sections-react": "0.20.24"
102
+ "@prenta/component-blocks": "0.3.2",
103
+ "@prenta/core": "8.21.11",
104
+ "@prenta/plugin-ai": "4.0.2",
105
+ "@prenta/plugin-blocks": "1.0.2",
106
+ "@prenta/plugin-commerce": "1.0.2",
107
+ "@prenta/plugin-forms": "1.0.3",
108
+ "@prenta/plugin-media": "1.0.2",
109
+ "@prenta/plugin-navigation": "1.1.1",
110
+ "@prenta/plugin-seo": "2.0.2",
111
+ "@prenta/sections-react": "0.20.27"
112
112
  },
113
113
  "scripts": {
114
114
  "build": "tsc --project tsconfig.json && npx @tailwindcss/cli -i src/styles/build-input.css -o dist/prenta-admin.css --minify && node scripts/copy-font-files.mjs",
@@ -0,0 +1,198 @@
1
+ // @vitest-environment happy-dom
2
+ import { readFileSync } from 'node:fs'
3
+ import path from 'node:path'
4
+ import { afterEach, describe, expect, it, vi } from 'vitest'
5
+ import { cleanup, render, screen } from '@testing-library/react'
6
+
7
+ import { EditorTopBar } from '../../views/page-editor/EditorTopBar.js'
8
+
9
+ afterEach(cleanup)
10
+
11
+ /**
12
+ * A post in review, seen by an editor, with a public site: the fullest bar
13
+ * the editor shows. This is the state that wrapped its buttons onto two
14
+ * lines at 1280px with the sidebar open.
15
+ */
16
+ const reviewProps = {
17
+ title: 'Mary Frances: +60% Ecommerce Revenue with an Integrated Digital Strategy',
18
+ status: 'DRAFT' as const,
19
+ workflowStage: 'IN_REVIEW' as const,
20
+ role: 'EDITOR',
21
+ dirty: true,
22
+ saveState: 'idle' as const,
23
+ publishing: false,
24
+ canEdit: true,
25
+ publishReady: true,
26
+ hasPublicSiteUrl: true,
27
+ viewport: 'wide' as const,
28
+ backLabel: 'Posts',
29
+ onViewport: vi.fn(),
30
+ onBack: vi.fn(),
31
+ onOpenSettings: vi.fn(),
32
+ onOpenSeo: vi.fn(),
33
+ onHistory: vi.fn(),
34
+ onViewOnSite: vi.fn(),
35
+ onShare: vi.fn(),
36
+ onSchedule: vi.fn(),
37
+ onSaveDraft: vi.fn(),
38
+ onSubmitForReview: vi.fn(),
39
+ onApprove: vi.fn(),
40
+ onRequestChanges: vi.fn(),
41
+ }
42
+
43
+ const TEXT_ACTIONS = [
44
+ 'View site',
45
+ 'Share',
46
+ 'Save Draft',
47
+ 'Schedule publish',
48
+ 'Approve',
49
+ 'Request changes',
50
+ ]
51
+
52
+ // happy-dom gives this module an http URL, so resolve from the package root.
53
+ const css = readFileSync(path.resolve(process.cwd(), 'src/styles/responsive.css'), 'utf-8')
54
+
55
+ describe('EditorTopBar layout', () => {
56
+ it('gives every text action the same height and never lets its label wrap', () => {
57
+ render(<EditorTopBar {...reviewProps} />)
58
+
59
+ for (const name of TEXT_ACTIONS) {
60
+ const button = screen.getByRole('button', { name })
61
+ const classes = button.className.split(/\s+/)
62
+ expect(classes, `${name} can wrap`).toContain('whitespace-nowrap')
63
+ expect(classes, `${name} can be squeezed`).toContain('shrink-0')
64
+ expect(classes, `${name} is not 34px tall`).toContain('h-[34px]')
65
+ }
66
+ })
67
+
68
+ it('makes the icon buttons the same height as the text actions', () => {
69
+ render(<EditorTopBar {...reviewProps} onUndo={vi.fn()} onRedo={vi.fn()} />)
70
+
71
+ for (const name of ['Post settings', 'Version history', 'Undo', 'Redo']) {
72
+ const classes = screen.getByRole('button', { name }).className.split(/\s+/)
73
+ expect(classes, `${name} is not 34px`).toEqual(
74
+ expect.arrayContaining(['h-[34px]', 'w-[34px]']),
75
+ )
76
+ }
77
+ })
78
+
79
+ it('lets the bar grow and wrap instead of crushing the title into a fixed row', () => {
80
+ const { container } = render(<EditorTopBar {...reviewProps} />)
81
+ const classes = container.querySelector('header')!.className.split(/\s+/)
82
+
83
+ expect(classes).toContain('flex-wrap')
84
+ expect(classes).toContain('min-h-14')
85
+ expect(classes).not.toContain('h-14')
86
+ })
87
+
88
+ it('keeps the breadcrumb inside its own box so the status cannot print over it', () => {
89
+ render(<EditorTopBar {...reviewProps} />)
90
+ const nav = screen.getByRole('navigation', { name: 'Breadcrumb' })
91
+ expect(nav.className.split(/\s+/)).toContain('overflow-hidden')
92
+ })
93
+
94
+ it('reserves room for a readable title before the actions may stay on its line', () => {
95
+ render(<EditorTopBar {...reviewProps} />)
96
+ const nav = screen.getByRole('navigation', { name: 'Breadcrumb' })
97
+ // The title's floor, and a left group that cannot shrink below its content.
98
+ expect(nav.className.split(/\s+/)).toContain('min-w-[5rem]')
99
+ expect(nav.parentElement!.className.split(/\s+/)).toContain('min-w-min')
100
+ // A stylesheet reset of that minimum is what let the title collapse.
101
+ expect(css).not.toMatch(/\.prenta-editor-header > \*\s*\{\s*min-width:\s*0/)
102
+ })
103
+
104
+ it('never breaks the save status onto two lines, and lets it give way before the bar wraps', () => {
105
+ render(<EditorTopBar {...reviewProps} />)
106
+ expect(screen.getByText('Unsaved changes').className.split(/\s+/)).toContain('truncate')
107
+ })
108
+
109
+ it('gives each collapsible action a touch target, since it becomes an icon button', () => {
110
+ render(<EditorTopBar {...reviewProps} />)
111
+ for (const name of ['Share', 'Schedule publish', 'Request changes']) {
112
+ expect(screen.getByRole('button', { name }).className).toContain('prenta-touch-target')
113
+ }
114
+ })
115
+
116
+ it('forces the narrow SEO padding past the shared button padding', () => {
117
+ render(<EditorTopBar {...reviewProps} seoScore={80} />)
118
+ const seo = screen.getByRole('button', { name: /^SEO/ })
119
+ expect(seo.className.split(/\s+/)).toContain('px-2!')
120
+ })
121
+
122
+ it('truncates a long reviewer note and keeps the full text in a title', () => {
123
+ const note =
124
+ 'Please tighten the opening, check every figure against the client report, and add a quote.'
125
+ render(<EditorTopBar {...reviewProps} workflowStage="DRAFT" reviewNote={note} />)
126
+ const shown = screen.getByText(new RegExp(note.slice(0, 20)))
127
+ expect(shown.className.split(/\s+/)).toContain('truncate')
128
+ expect(shown.getAttribute('title')).toContain(note)
129
+ })
130
+
131
+ it('marks the secondary actions as collapsible, each with a name that survives a hidden label', () => {
132
+ render(<EditorTopBar {...reviewProps} />)
133
+
134
+ for (const name of ['Share', 'Schedule publish', 'Request changes']) {
135
+ const button = screen.getByRole('button', { name })
136
+ expect(button.className, `${name} cannot collapse`).toContain('prenta-editor-collapsible')
137
+ expect(button.getAttribute('aria-label'), `${name} loses its name as an icon`).toBeTruthy()
138
+ expect(
139
+ button.querySelector('.prenta-editor-label'),
140
+ `${name} has no label to hide`,
141
+ ).not.toBeNull()
142
+ expect(button.querySelector('svg'), `${name} has no icon to fall back to`).not.toBeNull()
143
+ }
144
+ })
145
+
146
+ it('never collapses the actions an author must be able to read', () => {
147
+ render(<EditorTopBar {...reviewProps} />)
148
+
149
+ for (const name of ['View site', 'Save Draft', 'Approve']) {
150
+ const button = screen.getByRole('button', { name })
151
+ expect(button.className).not.toContain('prenta-editor-collapsible')
152
+ expect(button.querySelector('.prenta-editor-label')).toBeNull()
153
+ }
154
+ })
155
+
156
+ it('still shows the reason on a disabled action', () => {
157
+ render(
158
+ <EditorTopBar
159
+ {...reviewProps}
160
+ publishReady={false}
161
+ publishDisabledReason="Add a title before publishing"
162
+ />,
163
+ )
164
+ const approve = screen.getByRole('button', { name: 'Approve' })
165
+ expect(approve.getAttribute('title')).toBe('Add a title before publishing')
166
+ // The shared Button ignores the pointer while disabled, which would hide
167
+ // the title; these opt back in.
168
+ expect(approve.className).toContain('disabled:pointer-events-auto!')
169
+ })
170
+ })
171
+
172
+ describe('editor bar responsive rules', () => {
173
+ it("collapses by the bar's own width, not the viewport's", () => {
174
+ expect(css).toMatch(
175
+ /\.prenta-editor-header\s*\{\s*container:\s*editor-header\s*\/\s*inline-size/,
176
+ )
177
+ expect(css).toMatch(/@container editor-header \(max-width: 1360px\)/)
178
+ // The old rule keyed off the window, so a 1280px window with the sidebar
179
+ // open (a 1050px bar) never triggered it.
180
+ expect(css).not.toMatch(
181
+ /@media \(max-width: 1180px\)\s*\{\s*\.prenta-admin \.prenta-editor-header/,
182
+ )
183
+ })
184
+
185
+ it('draws the back button focus ring inside the clipped breadcrumb', () => {
186
+ // overflow-hidden on the breadcrumb would cut off an outline drawn outside it.
187
+ expect(css).toMatch(
188
+ /\.prenta-editor-header nav button:focus-visible\s*\{\s*outline-offset:\s*-2px/,
189
+ )
190
+ })
191
+
192
+ it('hides labels, shows the short canvas name and squares the buttons when collapsed', () => {
193
+ const block = css.slice(css.indexOf('@container editor-header'))
194
+ expect(block).toMatch(/\.prenta-editor-label\s*\{\s*display:\s*none/)
195
+ expect(block).toMatch(/\.prenta-editor-abbr\s*\{\s*display:\s*inline/)
196
+ expect(block).toMatch(/\.prenta-editor-collapsible\s*\{[^}]*width:\s*34px/)
197
+ })
198
+ })
@@ -43,18 +43,19 @@ export function BreakpointPicker({ value, onChange, disabled }: BreakpointPicker
43
43
  disabled={disabled}
44
44
  aria-label={canvasWidthLabel}
45
45
  title={canvasWidthLabel}
46
- className={`border-border flex h-[34px] items-center gap-1.5 rounded-lg border px-2.5 text-[12.5px] font-medium transition-colors disabled:opacity-50 ${
46
+ className={`border-border flex h-[34px] shrink-0 items-center gap-1.5 rounded-lg border px-2.5 text-[12.5px] font-medium transition-colors disabled:opacity-50 ${
47
47
  open
48
48
  ? 'border-brand bg-accent text-accent-foreground'
49
49
  : 'bg-card text-foreground hover:bg-accent'
50
50
  }`}
51
51
  >
52
52
  <ActiveIcon className={`h-4 w-4 shrink-0 ${open ? '' : 'text-brand'}`} aria-hidden />
53
- {/* The name is the useful label; below `lg` the header is too tight
54
- for it, so fall back to the two-letter form rather than truncating. */}
55
- <span className="hidden lg:inline">{active.name}</span>
56
- <span className="lg:hidden">{active.abbr}</span>
57
- <span className="text-muted-foreground hidden text-[11.5px] tabular-nums xl:inline">
53
+ {/* The name is the useful label; when the editor bar is too tight for
54
+ it, fall back to the two-letter form rather than truncating. The
55
+ switch follows the bar's width (responsive.css), not the viewport. */}
56
+ <span className="prenta-editor-label whitespace-nowrap">{active.name}</span>
57
+ <span className="prenta-editor-abbr">{active.abbr}</span>
58
+ <span className="prenta-editor-label text-muted-foreground text-[11.5px] tabular-nums">
58
59
  {active.width}
59
60
  </span>
60
61
  <ChevronDown
@@ -598,25 +598,50 @@
598
598
  }
599
599
  }
600
600
 
601
- /* ── Editor header (≤1180px): let the action cluster wrap ─────────── */
601
+ /* ── Editor header: collapse by the bar's own width, then wrap ─────── */
602
602
  /*
603
- * The breakpoint picker and zoom chip already hide below `md`. What remains
604
- * still outgrows the bar before then, and a fixed-height flex row resolves
605
- * that by crushing the title. Wrapping keeps the title readable and gives the
606
- * actions a second line.
603
+ * The bar's room depends on the sidebar and on which review actions are
604
+ * showing, not only on the viewport: a 1280px window with the sidebar open
605
+ * leaves it about 1050px. So the bar is a size container, and below 1360px of
606
+ * its own width the secondary actions (Share, Schedule, Request changes) drop
607
+ * to icons and the canvas-width picker to its two-letter form. Each of those
608
+ * keeps an aria-label and a title.
609
+ *
610
+ * The bar also wraps (classes in EditorTopBar): once the actions no longer fit
611
+ * beside a readable title they take a second line, at any width. The left
612
+ * group sets its own minimum width there, so nothing here may reset it.
607
613
  */
608
- @media (max-width: 1180px) {
609
- .prenta-admin .prenta-editor-header {
610
- height: auto;
611
- min-height: 0;
612
- flex-wrap: wrap;
613
- row-gap: 8px;
614
- padding-top: 8px;
615
- padding-bottom: 8px;
614
+ .prenta-admin .prenta-editor-header {
615
+ container: editor-header / inline-size;
616
+ }
617
+
618
+ .prenta-admin .prenta-editor-abbr {
619
+ display: none;
620
+ }
621
+
622
+ /*
623
+ * The breadcrumb clips its overflow so a long title cannot spill over the
624
+ * status label. That would also clip the focus ring of the back button, which
625
+ * sits flush against the edge, so its ring is drawn inside the box.
626
+ */
627
+ .prenta-admin .prenta-editor-header nav button:focus-visible {
628
+ outline-offset: -2px;
629
+ }
630
+
631
+ @container editor-header (max-width: 1360px) {
632
+ .prenta-admin .prenta-editor-header .prenta-editor-label {
633
+ display: none;
616
634
  }
617
635
 
618
- .prenta-admin .prenta-editor-header > * {
619
- min-width: 0;
636
+ .prenta-admin .prenta-editor-header .prenta-editor-abbr {
637
+ display: inline;
638
+ }
639
+
640
+ /* An icon-only action is a square, the size of the bar's icon buttons. */
641
+ .prenta-admin .prenta-editor-header .prenta-editor-collapsible {
642
+ width: 34px;
643
+ padding-left: 0;
644
+ padding-right: 0;
620
645
  }
621
646
  }
622
647
 
@@ -671,9 +696,9 @@
671
696
 
672
697
  /* ── Mobile (≤460px) ──────────────────────────────────────────────── */
673
698
  @media (max-width: 460px) {
674
- /* Buttons that read as a pair go full width rather than shrinking to
675
- nothing — the review bar's Restore / Back to current, in particular. */
676
- .prenta-admin .prenta-editor-header button {
699
+ /* Text actions share each wrapped line rather than leaving a ragged edge.
700
+ Icon buttons (anything with a touch target) keep their own size. */
701
+ .prenta-admin .prenta-editor-header button:not(.prenta-touch-target) {
677
702
  flex: 1 1 auto;
678
703
  justify-content: center;
679
704
  }
@@ -686,6 +711,7 @@
686
711
  }
687
712
 
688
713
  .prenta-admin .prenta-editor-header {
714
+ min-height: 0;
689
715
  padding-top: 4px;
690
716
  padding-bottom: 4px;
691
717
  }