ui/client/features/live-preview/domain/LivePreviewView
Pure (DOMAIN-001): what the live preview panel is handed to draw.
Cockpit client (features), next. Source: ui/client/features/live-preview/domain/LivePreviewView.ts.
Type Aliases#
LivePreviewImpact#
LivePreviewImpact =
object
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:15
A caller's pending refactor preview (pages-editor's Change tab, ): one line, no paths, plus every file the dry run says it will touch. Generic here on purpose -- this feature knows nothing about refactors, only how to draw a dashed-bordered card over the stage with them.
Properties#
files
files:
object[]
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:15
checked
checked:
boolean
path
path:
string
label
label:
string
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:15
LivePreviewPin#
LivePreviewPin =
object
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:10
-- one numbered marker over a node in the preview (a review finding, today; generic by design --
this feature knows nothing about findings, only how to draw a numbered dot at a rect and report a click
by the caller's own id). rect: null while nothing is on screen for it yet (not drawn, not an error).
Properties#
id
id:
string
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:10
number
number:
number
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:10
rect
rect:
PreviewRect|null
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:10
LivePreviewView#
LivePreviewView =
object
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:24
Properties#
appError
appError:
string|null
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:38
appErrorSrc
appErrorSrc:
string|null
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:41
-- the error's stack's top project frame, data-cx-src-shaped ("file:line:col"), or null when
the stack has no project frame (a library-only stack): the "Show in source" button shows only then.
boxRef
boxRef: (
node) =>void
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:51
Parameters
node
HTMLDivElement | null
Returns
void
draft
draft:
string
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:25
frameRef
frameRef:
Ref<HTMLIFrameElement>
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:29
frameStyle
frameStyle:
object
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:49
The frame's box for the chosen size, and its real measured size (1280 x 720 px).
maxWidth
maxWidth:
string
width
width:
string
fullScreen
fullScreen:
boolean
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:53
Full screen: the Cockpit chrome is hidden and the app owns the viewport.
fullScreenRef
fullScreenRef:
Ref<HTMLButtonElement>
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:56
impactPreview?
optionalimpactPreview?:LivePreviewImpact|null
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:63
— the Inspector Change tab's pending refactor, drawn as a dashed-bordered card over the stage ("Preview of the change... nothing is written until you approve"). Null when Change has no live preview.
message
message:
string|null
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:28
onConnect
onConnect: () =>
void
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:30
Returns
void
onDisconnect
onDisconnect: () =>
void
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:31
Returns
void
onDismissAppError
onDismissAppError: () =>
void
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:42
Returns
void
onDraftChange
onDraftChange: (
v) =>void
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:26
Parameters
v
string
Returns
void
onExitFullScreen
onExitFullScreen: () =>
void
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:55
Returns
void
onFullScreen
onFullScreen: () =>
void
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:54
Returns
void
onLoadAnyway
onLoadAnyway: () =>
void
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:35
Returns
void
onPinClick?
optionalonPinClick?: (id) =>void
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:66
Parameters
id
string
Returns
void
onRetry
onRetry: () =>
void
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:34
Returns
void
onShowInSource
onShowInSource: (
src) =>void
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:43
Parameters
src
string
Returns
void
onSize
onSize: (
id) =>void
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:47
Parameters
id
string
Returns
void
onTogglePick
onTogglePick: () =>
void
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:60
Returns
void
picking
picking:
boolean
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:59
-- Pick: off by default (the app is a normal, clickable app); an un-modified click only selects an element while Pick is on, or with Alt held regardless. Escape leaves Pick.
pins?
optionalpins?:LivePreviewPin[]
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:65
-- numbered pins over nodes in the preview (e.g. Review findings); empty/omitted draws none.
plugin
plugin:
PreviewPlugin
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:37
Plugin state and the app's last uncaught error (the spec's "Click-to-source is off" and "App error" cards).
reach
reach:
PreviewReach
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:33
Whether the dev server answered, and the two ways past a "no" (probe again / show it regardless).
size
size:
string
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:45
Device size picker: the chosen id, the options, and the change handler.
sizeReadout
sizeReadout:
string
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:50
sizes
sizes:
object[]
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:46
id
id:
string
label
label:
string
title
title:
string
url
url:
string|null
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:27
PreviewPlugin#
PreviewPlugin =
"unknown"|"waiting"|"on"|"off"
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:22
Has the target app said it loads the Cockpit preview plugin? waiting until it does or we give up; off means
the server answers but never announced it, so click-to-source cannot work.
PreviewReach#
PreviewReach =
"unknown"|"checking"|"up"|"down"
Defined in: ui/client/features/live-preview/domain/LivePreviewView.ts:18
What we know about the preview address: nothing yet, being probed, answering, or refusing.