part.svelte.ts

Declarations
#

19 declarations

view source

DiskfilePart
#

part.svelte.ts view source

Diskfile part - references content from a Diskfile.

inheritance

extends:
  • Part<typeof DiskfilePartJson>

type

readonly

diskfile

type Diskfile | null | undefined

readonly

relative_path

readonly

constructor

type new (options: DiskfilePartOptions): DiskfilePart

options

link_editor_state

Links this part to an editor state.

type (editor_state: { current_content: string; } | null): void

editor_state
type { current_content: string; } | null
returns void

DiskfilePartJson
#

part.svelte.ts view source

ZodObject<{ id: ZodDefault<$ZodBranded<ZodUUID, "Uuid">>; created: ZodDefault<$ZodBranded<ZodISODateTime, "Datetime">>; ... 11 more ...; has_xml_tag: ZodDefault<...>; }, $strict>

Diskfile part schema - references a diskfile.

DiskfilePartJsonInput
#

part.svelte.ts view source

{ id?: string | undefined; created?: string | undefined; updated?: string | undefined; name?: string | undefined; start?: number | null | undefined; end?: number | null | undefined; xml_tag_name?: string | undefined; ... 6 more ...; has_xml_tag?: boolean | undefined; }

DiskfilePartOptions
#

DiskfilePartSchema
#

Part
#

part.svelte.ts view source

Abstract base class for all part types.

generics

T

constraint z.ZodType
default typeof PartJsonBase

inheritance

extends:
  • Cell<T>

type

type string

abstractreadonly

start

type number | null

end

type number | null

length

type number | null | undefined

readonly

token_count

type number | null | undefined

readonly

content_preview

content with a max length

readonly

name

type string

has_xml_tag

type boolean

xml_tag_name

type string

attributes

type Array<XmlAttributeWithDefaults>

enabled

type boolean

title

type string | null

summary

type string | null

xml_tag_name_default

type string

readonly

add_attribute

type (partial?: { id?: string | undefined; key?: string | undefined; value?: string | undefined; }): void

partial
type { id?: string | undefined; key?: string | undefined; value?: string | undefined; }
default EMPTY_OBJECT
returns void

update_attribute

type (id: string & $brand<"Uuid">, updates: Partial<OmitStrict<{ id: string & $brand<"Uuid">; key: string; value: string; }, "id">>): boolean

id
type string & $brand<"Uuid">
updates
type Partial<OmitStrict<{ id: string & $brand<"Uuid">; key: string; value: string; }, "id">>
returns boolean

true if the attribute was updated, false if the attribute was not found

remove_attribute

type (id: string & $brand<"Uuid">): void

id
type string & $brand<"Uuid">
returns void

create

type (app: Frontend, json: { id?: string | undefined; created?: string | undefined; updated?: string | undefined; name?: string | undefined; start?: number | null | undefined; end?: number | ... 1 more ... | undefined; ... 7 more ...; content?: string | undefined; }, options?: TextPartOptions | undefined): TextPart

static
app
json
type { id?: string | undefined; created?: string | undefined; updated?: string | undefined; name?: string | undefined; start?: number | null | undefined; end?: number | null | undefined; has_xml_tag?: boolean | undefined; ... 6 more ...; content?: string | undefined; }
options?
type TextPartOptions | undefined
optional
returns TextPart

create

type (app: Frontend, json: { id?: string | undefined; created?: string | undefined; updated?: string | undefined; name?: string | undefined; start?: number | null | undefined; end?: number | ... 1 more ... | undefined; ... 7 more ...; content?: string | undefined; }, options?: TextPartOptions | undefined): TextPart

static
app
json
type { id?: string | undefined; created?: string | undefined; updated?: string | undefined; name?: string | undefined; start?: number | null | undefined; end?: number | null | undefined; has_xml_tag?: boolean | undefined; ... 6 more ...; content?: string | undefined; }
options?
type TextPartOptions | undefined
optional
returns TextPart

create

type (app: Frontend, json: { id?: string | undefined; created?: string | undefined; updated?: string | undefined; name?: string | undefined; start?: number | null | undefined; end?: number | ... 1 more ... | undefined; ... 7 more ...; content?: string | undefined; }, options?: TextPartOptions | undefined): TextPart

static
app
json
type { id?: string | undefined; created?: string | undefined; updated?: string | undefined; name?: string | undefined; start?: number | null | undefined; end?: number | null | undefined; has_xml_tag?: boolean | undefined; ... 6 more ...; content?: string | undefined; }
options?
type TextPartOptions | undefined
optional
returns TextPart

create

type (app: Frontend, json: { id?: string | undefined; created?: string | undefined; updated?: string | undefined; name?: string | undefined; start?: number | null | undefined; end?: number | ... 1 more ... | undefined; ... 7 more ...; content?: string | undefined; }, options?: TextPartOptions | undefined): TextPart

static
app
json
type { id?: string | undefined; created?: string | undefined; updated?: string | undefined; name?: string | undefined; start?: number | null | undefined; end?: number | null | undefined; has_xml_tag?: boolean | undefined; ... 6 more ...; content?: string | undefined; }
options?
type TextPartOptions | undefined
optional
returns TextPart

PartJson
#

part.svelte.ts view source

ZodDiscriminatedUnion<[ZodObject<{ id: ZodDefault<$ZodBranded<ZodUUID, "Uuid">>; created: ZodDefault<$ZodBranded<ZodISODateTime, "Datetime">>; ... 11 more ...; content: ZodDefault<...>; }, $strict>, ZodObject<...>], "type">

Union of all part types for deserialization.

PartJsonBase
#

part.svelte.ts view source

ZodObject<{ id: ZodDefault<$ZodBranded<ZodUUID, "Uuid">>; created: ZodDefault<$ZodBranded<ZodISODateTime, "Datetime">>; ... 10 more ...; summary: ZodDefault<...>; }, $strict>

Common properties for all part types.

PartJsonInput
#

part.svelte.ts view source

{ id?: string | undefined; created?: string | undefined; updated?: string | undefined; name?: string | undefined; start?: number | null | undefined; end?: number | null | undefined; ... 7 more ...; content?: string | undefined; } | { ...; }

PartJsonType
#

PartOptions
#

part.svelte.ts view source

PartOptions<T>

generics

T

constraint z.ZodType
default typeof PartJsonBase

inheritance

extends:
  • CellOptions<T>

json

type z.input<T>

PartOptionsUnion
#

PartSchema
#

part.svelte.ts view source

ZodCustom<Part<ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>>, Part<ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>>>

PartUnion
#

TextPart
#

part.svelte.ts view source

Text part - stores content directly.

inheritance

extends:
  • Part<typeof TextPartJson>

type

readonly

content

type string

constructor

type new (options: TextPartOptions): TextPart

options

TextPartJson
#

part.svelte.ts view source

ZodObject<{ id: ZodDefault<$ZodBranded<ZodUUID, "Uuid">>; created: ZodDefault<$ZodBranded<ZodISODateTime, "Datetime">>; ... 11 more ...; content: ZodDefault<...>; }, $strict>

Text part schema - direct content storage.

TextPartJsonInput
#

part.svelte.ts view source

{ id?: string | undefined; created?: string | undefined; updated?: string | undefined; name?: string | undefined; start?: number | null | undefined; end?: number | null | undefined; has_xml_tag?: boolean | undefined; ... 6 more ...; content?: string | undefined; }

TextPartOptions
#

TextPartSchema
#

Depends on
#

Imported by
#