Line

ui/client/features/pages-editor/domain/LivePreviewView

Pure (DOMAIN-001): what the live preview panel is handed to draw.

Cockpit client (features), v0.9. Source: ui/client/features/pages-editor/domain/LivePreviewView.ts.

Type Aliases#

LivePreviewView#

LivePreviewView = object

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:13

Properties#

appError

appError: string | null

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:27

boxRef

boxRef: (node) => void

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:36

Parameters
node

HTMLDivElement | null

Returns

void

draft

draft: string

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:14

frameRef

frameRef: Ref<HTMLIFrameElement>

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:18

frameStyle

frameStyle: object

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:34

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/pages-editor/domain/LivePreviewView.ts:38

Full screen: the Cockpit chrome is hidden and the app owns the viewport.

fullScreenRef

fullScreenRef: Ref<HTMLButtonElement>

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:41

message

message: string | null

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:17

onConnect

onConnect: () => void

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:19

Returns

void

onDisconnect

onDisconnect: () => void

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:20

Returns

void

onDismissAppError

onDismissAppError: () => void

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:28

Returns

void

onDraftChange

onDraftChange: (v) => void

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:15

Parameters
v

string

Returns

void

onExitFullScreen

onExitFullScreen: () => void

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:40

Returns

void

onFullScreen

onFullScreen: () => void

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:39

Returns

void

onLoadAnyway

onLoadAnyway: () => void

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:24

Returns

void

onRetry

onRetry: () => void

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:23

Returns

void

onSize

onSize: (id) => void

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:32

Parameters
id

string

Returns

void

plugin

plugin: PreviewPlugin

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:26

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/pages-editor/domain/LivePreviewView.ts:22

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/pages-editor/domain/LivePreviewView.ts:30

Device size picker: the chosen id, the options, and the change handler.

sizeReadout

sizeReadout: string

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:35

sizes

sizes: object[]

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:31

id

id: string

label

label: string

title

title: string

url

url: string | null

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:16


PreviewPlugin#

PreviewPlugin = "unknown" | "waiting" | "on" | "off"

Defined in: ui/client/features/pages-editor/domain/LivePreviewView.ts:11

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/pages-editor/domain/LivePreviewView.ts:7

What we know about the preview address: nothing yet, being probed, answering, or refusing.