inspector/manifestText.svelte#

Classes#

ManifestText#

Defined in: editor/src/inspector/manifestText.svelte.ts:38

The Manifest tab’s state for the inspector’s lifetime.

Constructors#

Constructor#

new ManifestText(): ManifestText

Returns#

ManifestText

Properties#

format#

format: "yaml" | "json" | "toml"

Defined in: editor/src/inspector/manifestText.svelte.ts:40

The format chosen; YAML, the main serialization, until another is chosen.

loadFailure#

loadFailure: string

Defined in: editor/src/inspector/manifestText.svelte.ts:48

Why the chosen format’s codec could not be loaded; empty while none failed.

problems#

problems: readonly InspectorProblem[]

Defined in: editor/src/inspector/manifestText.svelte.ts:44

The problems listed under the text: a refused Apply’s, or writing the manifest’s.

stale#

stale: boolean

Defined in: editor/src/inspector/manifestText.svelte.ts:46

The manifest changed while the text held unapplied edits.

text#

text: string

Defined in: editor/src/inspector/manifestText.svelte.ts:42

The text in the text area.

Accessors#

dirty#
Get Signature#

get dirty(): boolean

Defined in: editor/src/inspector/manifestText.svelte.ts:59

Whether the text differs from the text last written from the manifest; Apply and Revert act only then.

Returns#

boolean

ready#
Get Signature#

get ready(): boolean

Defined in: editor/src/inspector/manifestText.svelte.ts:64

Whether the chosen format can be written and read now (JSON always; YAML and TOML once loaded).

Returns#

boolean

Methods#

apply()#

apply(store): void

Defined in: editor/src/inspector/manifestText.svelte.ts:115

Apply the text to the block it was written for, one set replacing its manifest (none when it stands for the stored manifest). A refused text stays, with its problems listed.

Parameters#
store#

Store

Returns#

void

follow()#

follow(block, options): void

Defined in: editor/src/inspector/manifestText.svelte.ts:76

Follow the block selected, its manifest, the format and the block’s options while the text holds no unapplied edit: the text is written again, or patched when it shows the same block in the same choice. Under an edit nothing is replaced, and a change is noted as stale; a text typed back to the shown text follows at once and drops a refused Apply’s problems. A codec not loaded yet is loaded first.

Parameters#
block#

Block | null

options#

TextOptions

Returns#

void

revert()#

revert(block, options): void

Defined in: editor/src/inspector/manifestText.svelte.ts:133

Drop the unapplied text and show block’s stored manifest with its options, or nothing without a block.

Parameters#
block#

Block | null

options#

TextOptions

Returns#

void