Text
Exports related to text.
interface ClientFont
extends FontFace {}
interface ClippedText
extends VisibleInstance {
asset: Media
assetFrames: (quantize: number) => Numbers
assetId: string
assetTime: (masherTime: Time) => Time
boolean: (key: string) => boolean
cacheInstance: (args: InstanceCacheArgs) => Promise<DataOrError<number>>
canBeMuted: boolean
changeObject: (propertyId: SignalId, scalar?: Scalar) => ChangeEditObject
changeScalars: (scalars: ScalarsById) => void
changesObject: (scalars: ScalarsById) => ChangePropertiesEditObject
clip: Clip
clippedElement: (content: VisibleInstance, args: ContainerSvgItemArgs) => DataOrError<SvgItemsRecord>
constrainedValue: (found: Property, value?: Scalar) => Scalar | undefined
containedItem: (contentItem: MaybeComplexSvgItem, containerItem: MaybeComplexSvgItem, args: ContainerSvgItemArgs) => DataOrError<SvgItemsRecord>
containerRects: (args: ContainerRectArgs, sizingSize: Size) => RectTuple
containerSvgItem: (args: ContainerSvgItemArgs) => DataOrError<MaybeComplexSvgItem>
contentRect: (time: Time, containerRect: Rect, outputSize: Size) => Rect
contentRects: (args: ContentRectArgs) => RectTuple
contentSvgItem: (args: ContentSvgItemArgs) => DataOrError<MaybeComplexSvgItem>
cropDirections: SideDirectionRecord
frames: (quantize: number) => number
host: Plugins
id: string
instanceObject: InstanceObject
intrinsicRect: Rect
intrinsicsKnown: (options: IntrinsicOptions) => boolean
isDefault: boolean
mediaIds: Strings
muted: boolean
number: (key: string) => number
properties: Array<Property>
propertiesOfTarget: (targetId: string) => Array<Property>
propertyFind: (name: string) => Property | undefined
propertyIds: (targetId: string) => Array<SignalId>
scalarsById: (targetId: string, time?: Time, timeIsStart?: boolean, useNames?: boolean) => SignalScalarRecord
scalarsRecord: (idOrNames: Strings) => ScalarRecord
scaleRects: (time: Time, range: TimeRange) => RectTuple
setValue: (nameOrId: string, scalar?: Scalar, dontConstrain?: boolean) => void
shouldSelectProperty: (property: Property) => boolean
sizeKey?: SizeKey
string: (key: string) => string
svgVector: (rect: Rect, forecolor?: string, opacity?: Scalar) => SvgVector
targetId: string
toJSON: () => unknown
tweenValues: (key: string, time: Time, range: TimeRange) => Array<Scalar>
tweening: boolean
tweens: (key: string) => boolean
value: (key: string) => Scalar | undefined
}
interface ClippedTextImage
extends ClippedText {
asset: Media
assetFrames: (quantize: number) => Numbers
assetId: string
assetTime: (masherTime: Time) => Time
boolean: (key: string) => boolean
cacheInstance: (args: InstanceCacheArgs) => Promise<DataOrError<number>>
canBeMuted: boolean
changeObject: (propertyId: SignalId, scalar?: Scalar) => ChangeEditObject
changeScalars: (scalars: ScalarsById) => void
changesObject: (scalars: ScalarsById) => ChangePropertiesEditObject
clip: Clip
clippedElement: (content: VisibleInstance, args: ContainerSvgItemArgs) => DataOrError<SvgItemsRecord>
constrainedValue: (found: Property, value?: Scalar) => Scalar | undefined
containedItem: (contentItem: MaybeComplexSvgItem, containerItem: MaybeComplexSvgItem, args: ContainerSvgItemArgs) => DataOrError<SvgItemsRecord>
containerRects: (args: ContainerRectArgs, sizingSize: Size) => RectTuple
containerSvgItem: (args: ContainerSvgItemArgs) => DataOrError<MaybeComplexSvgItem>
contentRect: (time: Time, containerRect: Rect, outputSize: Size) => Rect
contentRects: (args: ContentRectArgs) => RectTuple
contentSvgItem: (args: ContentSvgItemArgs) => DataOrError<MaybeComplexSvgItem>
cropDirections: SideDirectionRecord
frames: (quantize: number) => number
host: Plugins
id: string
instanceObject: InstanceObject
intrinsicRect: Rect
intrinsicsKnown: (options: IntrinsicOptions) => boolean
isDefault: boolean
mediaIds: Strings
muted: boolean
number: (key: string) => number
properties: Array<Property>
propertiesOfTarget: (targetId: string) => Array<Property>
propertyFind: (name: string) => Property | undefined
propertyIds: (targetId: string) => Array<SignalId>
scalarsById: (targetId: string, time?: Time, timeIsStart?: boolean, useNames?: boolean) => SignalScalarRecord
scalarsRecord: (idOrNames: Strings) => ScalarRecord
scaleRects: (time: Time, range: TimeRange) => RectTuple
setValue: (nameOrId: string, scalar?: Scalar, dontConstrain?: boolean) => void
shouldSelectProperty: (property: Property) => boolean
sizeKey?: SizeKey
string: (key: string) => string
svgVector: (rect: Rect, forecolor?: string, opacity?: Scalar) => SvgVector
targetId: string
toJSON: () => unknown
tweenValues: (key: string, time: Time, range: TimeRange) => Array<Scalar>
tweening: boolean
tweens: (key: string) => boolean
value: (key: string) => Scalar | undefined
}
interface CssElement {
cssProperties: Array<Property>
target: string
variable: (name: string) => number
variableString: (name: string) => string
}
interface CssInfo {
clientUrl: FetchUrl
cssUrl: FetchUrl
extension: string
family: string
}
interface CssReactive {
cssProperties: Array<Property>
target: string
}
type CssResultTuple = ArrayOf2<CSSResult, CSSResult>
type FetchTextFunction = (args: Fetched, opts?: JobOptions) => Promise<DataOrError<string>>
interface TextImage
extends TextMedia {
accountId: string
/** True if I have transparency. */
alpha?: boolean
api: () => Promise<DataOrError<Api>>
asStored: unknown
boolean: (key: string) => boolean
cacheMedia: (args: MediaCacheArgs) => Promise<DataOrError<number>>
/** True if I can be a clipped container. */
canBeContainer?: boolean
/** True if I can be clipped content. */
canBeContent?: boolean
/** True if I am a fill color. */
canBeFill?: boolean
canBeMuted: boolean
changeObject: (propertyId: SignalId, scalar?: Scalar) => ChangeEditObject
changeScalars: (scalars: ScalarsById) => void
changesObject: (scalars: ScalarsById) => ChangePropertiesEditObject
clipObject: (object?: InstanceObject) => ClipObject
constrainedValue: (found: Property, value?: Scalar) => Scalar | undefined
createdAt?: number
deletedAt?: number
duration: number
family: string
fetchResource: (resource: Resource) => Promise<DataOrError<true>>
findResource: (types: Strings) => Resource | undefined
frames: (quantize: number) => number
hasIntrinsicSizing?: boolean
hasIntrinsicTiming?: boolean
host: Plugins
id: string
instanceArgs: (object?: InstanceObject) => InstanceArgs
instanceFromObject: (object?: InstanceObject) => Instance
/** True if I am vector-based. */
isVector?: boolean
label: string
mediaIds: Strings
number: (key: string) => number
/** Size drawn from sized resource. */
probeSize?: Size
properties: Array<Property>
propertiesOfTarget: (targetId: string) => Array<Property>
propertyFind: (name: string) => Property | undefined
propertyIds: (targetId: string) => Array<SignalId>
resources: Array<Resource>
scalarsRecord: (idOrNames: Strings) => ScalarRecord
setValue: (nameOrId: string, scalar?: Scalar, dontConstrain?: boolean) => void
shouldSelectProperty: (property: Property) => boolean
source: string
string: (key: string) => string
style: (prefix?: string) => SvgStyleElement
targetId: string
textRect: Rect
toJSON: () => unknown
tweenValues: (key: string, time: Time, range: TimeRange) => Array<Scalar>
tweens: (key: string) => boolean
type: string
unload: () => void
updatedAt?: number
userId?: string
value: (key: string) => Scalar | undefined
}
interface TextInstanceObject
extends VisibleInstanceObject {
container?: boolean
height?: number
heightEnd?: number
lock?: string
opacity?: number
opacityEnd?: number
pointAspect?: string
sizeAspect?: string
text?: string
transparency?: Transparency | string
width?: number
widthEnd?: number
x?: number
xEnd?: number
y?: number
yEnd?: number
}
interface TextMedia
extends VisibleMedia {
accountId: string
/** True if I have transparency. */
alpha?: boolean
api: () => Promise<DataOrError<Api>>
asStored: unknown
boolean: (key: string) => boolean
cacheMedia: (args: MediaCacheArgs) => Promise<DataOrError<number>>
/** True if I can be a clipped container. */
canBeContainer?: boolean
/** True if I can be clipped content. */
canBeContent?: boolean
/** True if I am a fill color. */
canBeFill?: boolean
canBeMuted: boolean
changeObject: (propertyId: SignalId, scalar?: Scalar) => ChangeEditObject
changeScalars: (scalars: ScalarsById) => void
changesObject: (scalars: ScalarsById) => ChangePropertiesEditObject
clipObject: (object?: InstanceObject) => ClipObject
constrainedValue: (found: Property, value?: Scalar) => Scalar | undefined
createdAt?: number
deletedAt?: number
duration: number
family: string
fetchResource: (resource: Resource) => Promise<DataOrError<true>>
findResource: (types: Strings) => Resource | undefined
frames: (quantize: number) => number
hasIntrinsicSizing?: boolean
hasIntrinsicTiming?: boolean
host: Plugins
id: string
instanceArgs: (object?: InstanceObject) => InstanceArgs
instanceFromObject: (object?: InstanceObject) => Instance
/** True if I am vector-based. */
isVector?: boolean
label: string
mediaIds: Strings
number: (key: string) => number
/** Size drawn from sized resource. */
probeSize?: Size
properties: Array<Property>
propertiesOfTarget: (targetId: string) => Array<Property>
propertyFind: (name: string) => Property | undefined
propertyIds: (targetId: string) => Array<SignalId>
resources: Array<Resource>
scalarsRecord: (idOrNames: Strings) => ScalarRecord
setValue: (nameOrId: string, scalar?: Scalar, dontConstrain?: boolean) => void
shouldSelectProperty: (property: Property) => boolean
source: string
string: (key: string) => string
style: (prefix?: string) => SvgStyleElement
targetId: string
textRect: Rect
toJSON: () => unknown
tweenValues: (key: string, time: Time, range: TimeRange) => Array<Scalar>
tweens: (key: string) => boolean
type: string
unload: () => void
updatedAt?: number
userId?: string
value: (key: string) => Scalar | undefined
}
interface TextProperties {
text?: string
}
interface TextRectArgs {
document: Document
family: string
fontPath?: AbsolutePath
size: number
text: string
}
/** @implements TextMedia */
class ClientTextImageClass {
accountId: string
/** True if I have transparency. */
alpha?: boolean
api: () => Promise<DataOrError<Api>>
asStored: unknown
boolean: (key: string) => boolean
cacheMedia: (args: MediaCacheArgs) => Promise<DataOrError<number>>
/** True if I can be a clipped container. */
canBeContainer?: boolean
/** True if I can be clipped content. */
canBeContent?: boolean
/** True if I am a fill color. */
canBeFill?: boolean
canBeMuted: boolean
changeObject: (propertyId: SignalId, scalar?: Scalar) => ChangeEditObject
changeScalars: (scalars: ScalarsById) => void
changesObject: (scalars: ScalarsById) => ChangePropertiesEditObject
clipObject: (object?: InstanceObject) => ClipObject
constrainedValue: (found: Property, value?: Scalar) => Scalar | undefined
createdAt?: number
deletedAt?: number
duration: number
family: string
familyInitialize: () => string
fetchResource: (resource: Resource) => Promise<DataOrError<true>>
findResource: (types: Strings) => Resource | undefined
frames: (quantize: number) => number
hasIntrinsicSizing?: boolean
hasIntrinsicTiming?: boolean
host: Plugins
id: string
instanceArgs: (object?: InstanceObject) => InstanceArgs
instanceFromObject: (object?: InstanceObject) => Instance
/** True if I am vector-based. */
isVector?: boolean
label: string
mediaIds: Strings
number: (key: string) => number
/** Size drawn from sized resource. */
probeSize?: Size
properties: Array<Property>
propertiesOfTarget: (targetId: string) => Array<Property>
propertyFind: (name: string) => Property | undefined
propertyIds: (targetId: string) => Array<SignalId>
resources: Array<Resource>
scalarsRecord: (idOrNames: Strings) => ScalarRecord
setValue: (nameOrId: string, scalar?: Scalar, dontConstrain?: boolean) => void
shouldSelectProperty: (property: Property) => boolean
source: string
string: (key: string) => string
style: (prefix?: string) => SvgStyleElement
targetId: string
textRect: Rect
toJSON: () => unknown
tweenValues: (key: string, time: Time, range: TimeRange) => Array<Scalar>
tweens: (key: string) => boolean
type: string
unload: () => void
updatedAt?: number
userId?: string
value: (key: string) => Scalar | undefined
}
/** @implements ClippedText */
class ClippedClientTextImageClass
extends TextInstanceClass {
asset: Media
assetFrames: (quantize: number) => Numbers
assetId: string
assetTime: (masherTime: Time) => Time
boolean: (key: string) => boolean
cacheInstance: (args: InstanceCacheArgs) => Promise<DataOrError<number>>
canBeMuted: boolean
changeObject: (propertyId: SignalId, scalar?: Scalar) => ChangeEditObject
changeScalars: (scalars: ScalarsById) => void
changesObject: (scalars: ScalarsById) => ChangePropertiesEditObject
clip: Clip
clippedElement: (content: VisibleInstance, args: ContainerSvgItemArgs) => DataOrError<SvgItemsRecord>
constrainedValue: (found: Property, value?: Scalar) => Scalar | undefined
containedItem: (contentItem: MaybeComplexSvgItem, containerItem: MaybeComplexSvgItem, args: ContainerSvgItemArgs) => DataOrError<SvgItemsRecord>
containerRects: (args: ContainerRectArgs, sizingSize: Size) => RectTuple
containerSvgItem: (args: ContainerSvgItemArgs) => DataOrError<MaybeComplexSvgItem>
contentRect: (time: Time, containerRect: Rect, outputSize: Size) => Rect
contentRects: (args: ContentRectArgs) => RectTuple
contentSvgItem: (args: ContentSvgItemArgs) => DataOrError<MaybeComplexSvgItem>
cropDirections: SideDirectionRecord
frames: (quantize: number) => number
hasIntrinsicTiming: boolean
host: Plugins
id: string
instanceObject: InstanceObject
intrinsicRect: Rect
intrinsicsKnown: (options: IntrinsicOptions) => boolean
isDefault: boolean
mediaIds: Strings
muted: boolean
number: (key: string) => number
properties: Array<Property>
propertiesOfTarget: (targetId: string) => Array<Property>
propertyFind: (name: string) => Property | undefined
propertyIds: (targetId: string) => Array<SignalId>
scalarsById: (targetId: string, time?: Time, timeIsStart?: boolean, useNames?: boolean) => SignalScalarRecord
scalarsRecord: (idOrNames: Strings) => ScalarRecord
scaleRects: (time: Time, range: TimeRange) => RectTuple
setValue: (nameOrId: string, scalar?: Scalar, dontConstrain?: boolean) => void
shouldSelectProperty: (property: Property) => boolean
sizeKey?: SizeKey
string: (key: string) => string
svgVector: (rect: Rect, forecolor?: string, opacity?: Scalar) => SvgVector
targetId: string
textAsset: () => TextMedia
toJSON: () => unknown
tweenValues: (key: string, time: Time, range: TimeRange) => Array<Scalar>
tweening: boolean
tweens: (key: string) => boolean
tweensProperty: (key: string) => boolean
value: (key: string) => Scalar | undefined
}
/** @implements ClippedTextImage */
class ClippedTextImageClass
extends TextInstanceClass {
asset: Media
assetFrames: (quantize: number) => Numbers
assetId: string
assetTime: (masherTime: Time) => Time
boolean: (key: string) => boolean
cacheInstance: (args: InstanceCacheArgs) => Promise<DataOrError<number>>
canBeMuted: boolean
changeObject: (propertyId: SignalId, scalar?: Scalar) => ChangeEditObject
changeScalars: (scalars: ScalarsById) => void
changesObject: (scalars: ScalarsById) => ChangePropertiesEditObject
clip: Clip
clippedElement: (content: VisibleInstance, args: ContainerSvgItemArgs) => DataOrError<SvgItemsRecord>
constrainedValue: (found: Property, value?: Scalar) => Scalar | undefined
containedItem: (contentItem: MaybeComplexSvgItem, containerItem: MaybeComplexSvgItem, args: ContainerSvgItemArgs) => DataOrError<SvgItemsRecord>
containerRects: (args: ContainerRectArgs, sizingSize: Size) => RectTuple
containerSvgItem: (args: ContainerSvgItemArgs) => DataOrError<MaybeComplexSvgItem>
contentRect: (time: Time, containerRect: Rect, outputSize: Size) => Rect
contentRects: (args: ContentRectArgs) => RectTuple
contentSvgItem: (args: ContentSvgItemArgs) => DataOrError<MaybeComplexSvgItem>
cropDirections: SideDirectionRecord
frames: (quantize: number) => number
hasIntrinsicTiming: boolean
host: Plugins
id: string
instanceObject: InstanceObject
intrinsicRect: Rect
intrinsicsKnown: (options: IntrinsicOptions) => boolean
isDefault: boolean
mediaIds: Strings
muted: boolean
number: (key: string) => number
properties: Array<Property>
propertiesOfTarget: (targetId: string) => Array<Property>
propertyFind: (name: string) => Property | undefined
propertyIds: (targetId: string) => Array<SignalId>
scalarsById: (targetId: string, time?: Time, timeIsStart?: boolean, useNames?: boolean) => SignalScalarRecord
scalarsRecord: (idOrNames: Strings) => ScalarRecord
scaleRects: (time: Time, range: TimeRange) => RectTuple
setValue: (nameOrId: string, scalar?: Scalar, dontConstrain?: boolean) => void
shouldSelectProperty: (property: Property) => boolean
sizeKey?: SizeKey
string: (key: string) => string
svgVector: (rect: Rect, forecolor?: string, opacity?: Scalar) => SvgVector
targetId: string
textAsset: () => TextMedia
toJSON: () => unknown
tweenValues: (key: string, time: Time, range: TimeRange) => Array<Scalar>
tweening: boolean
tweens: (key: string) => boolean
tweensProperty: (key: string) => boolean
value: (key: string) => Scalar | undefined
}
class ImporterTextElement
extends LoaderElementBase {
connectedCallback: () => void
cssBorderBoxSizing: CSSResult
cssHostDropping: CSSResult
cssHostFlex: CSSResult
defaultContent: () => OptionalContent
disconnectedCallback: () => void
mediaMasher: () => MediaMasherNode
pluginsNeeded: Array<PluginId>
signals: () => SignalsRecord
styles: CSSResult
subscribe: (handler: SignalFunction, arg: string | SignalId | PropertyObject, name?: string, type?: string) => Signal
templateContent: (contents: TemplateContents) => TemplateContent
unsubscribe: (arg: string | SignalId | PropertyObject, name?: string, type?: string) => void
variable: (name: string) => number
variableSet: (nameOrSignal: Signal | string, value?: Scalar, suffix?: string) => void
variableString: (name: string) => string
}
/** @implements Importer */
class TextClientImporter {
canImport: () => boolean
icon: Node
import: () => void
label?: string
media: (file: File | FileSystemFileHandle | ImporterFileDetails) => Promise<DataOrError<Media>>
styles: CSSResult
ui: () => Node
}
/** @implements TextMedia */
class TextImageClass
extends TextMediaClass {
accountId: string
/** True if I have transparency. */
alpha?: boolean
api: () => Promise<DataOrError<Api>>
asStored: unknown
boolean: (key: string) => boolean
cacheMedia: (args: MediaCacheArgs) => Promise<DataOrError<number>>
/** True if I can be a clipped container. */
canBeContainer?: boolean
/** True if I can be clipped content. */
canBeContent?: boolean
/** True if I am a fill color. */
canBeFill?: boolean
canBeMuted: boolean
changeObject: (propertyId: SignalId, scalar?: Scalar) => ChangeEditObject
changeScalars: (scalars: ScalarsById) => void
changesObject: (scalars: ScalarsById) => ChangePropertiesEditObject
clipObject: (object?: InstanceObject) => ClipObject
constrainedValue: (found: Property, value?: Scalar) => Scalar | undefined
createdAt?: number
deletedAt?: number
duration: number
family: string
familyInitialize: () => string
fetchResource: (resource: Resource) => Promise<DataOrError<true>>
findResource: (types: Strings) => Resource | undefined
frames: (quantize: number) => number
hasIntrinsicSizing?: boolean
hasIntrinsicTiming?: boolean
host: Plugins
id: string
instanceArgs: (object?: InstanceObject) => InstanceArgs
instanceFromObject: (object?: InstanceObject) => Instance
/** True if I am vector-based. */
isVector?: boolean
label: string
mediaIds: Strings
number: (key: string) => number
/** Size drawn from sized resource. */
probeSize?: Size
properties: Array<Property>
propertiesOfTarget: (targetId: string) => Array<Property>
propertyFind: (name: string) => Property | undefined
propertyIds: (targetId: string) => Array<SignalId>
resources: Array<Resource>
scalarsRecord: (idOrNames: Strings) => ScalarRecord
setValue: (nameOrId: string, scalar?: Scalar, dontConstrain?: boolean) => void
shouldSelectProperty: (property: Property) => boolean
source: string
string: (key: string) => string
style: (prefix?: string) => SvgStyleElement
targetId: string
textRect: Rect
toJSON: () => unknown
tweenValues: (key: string, time: Time, range: TimeRange) => Array<Scalar>
tweens: (key: string) => boolean
tweensProperty: (key: string) => boolean
type: string
unload: () => void
updatedAt?: number
userId?: string
value: (key: string) => Scalar | undefined
}
/** @implements ClippedText */
class TextInstanceClass
extends VisibleInstanceClass {
asset: Media
assetFrames: (quantize: number) => Numbers
assetId: string
assetTime: (masherTime: Time) => Time
boolean: (key: string) => boolean
cacheInstance: (args: InstanceCacheArgs) => Promise<DataOrError<number>>
canBeMuted: boolean
changeObject: (propertyId: SignalId, scalar?: Scalar) => ChangeEditObject
changeScalars: (scalars: ScalarsById) => void
changesObject: (scalars: ScalarsById) => ChangePropertiesEditObject
clip: Clip
clippedElement: (content: VisibleInstance, args: ContainerSvgItemArgs) => DataOrError<SvgItemsRecord>
constrainedValue: (found: Property, value?: Scalar) => Scalar | undefined
containedItem: (contentItem: MaybeComplexSvgItem, containerItem: MaybeComplexSvgItem, args: ContainerSvgItemArgs) => DataOrError<SvgItemsRecord>
containerRects: (args: ContainerRectArgs, sizingSize: Size) => RectTuple
containerSvgItem: (args: ContainerSvgItemArgs) => DataOrError<MaybeComplexSvgItem>
contentRect: (time: Time, containerRect: Rect, outputSize: Size) => Rect
contentRects: (args: ContentRectArgs) => RectTuple
contentSvgItem: (args: ContentSvgItemArgs) => DataOrError<MaybeComplexSvgItem>
cropDirections: SideDirectionRecord
frames: (quantize: number) => number
hasIntrinsicTiming: boolean
host: Plugins
id: string
instanceObject: InstanceObject
intrinsicRect: Rect
intrinsicsKnown: (options: IntrinsicOptions) => boolean
isDefault: boolean
mediaIds: Strings
muted: boolean
number: (key: string) => number
properties: Array<Property>
propertiesOfTarget: (targetId: string) => Array<Property>
propertyFind: (name: string) => Property | undefined
propertyIds: (targetId: string) => Array<SignalId>
scalarsById: (targetId: string, time?: Time, timeIsStart?: boolean, useNames?: boolean) => SignalScalarRecord
scalarsRecord: (idOrNames: Strings) => ScalarRecord
scaleRects: (time: Time, range: TimeRange) => RectTuple
setValue: (nameOrId: string, scalar?: Scalar, dontConstrain?: boolean) => void
shouldSelectProperty: (property: Property) => boolean
sizeKey?: SizeKey
string: (key: string) => string
svgVector: (rect: Rect, forecolor?: string, opacity?: Scalar) => SvgVector
targetId: string
textAsset: () => TextMedia
toJSON: () => unknown
tweenValues: (key: string, time: Time, range: TimeRange) => Array<Scalar>
tweening: boolean
tweens: (key: string) => boolean
tweensProperty: (key: string) => boolean
value: (key: string) => Scalar | undefined
}
/** @implements TextMedia */
class TextMediaClass
extends VisibleMediaClass {
accountId: string
/** True if I have transparency. */
alpha?: boolean
api: () => Promise<DataOrError<Api>>
asStored: unknown
boolean: (key: string) => boolean
cacheMedia: (args: MediaCacheArgs) => Promise<DataOrError<number>>
/** True if I can be a clipped container. */
canBeContainer?: boolean
/** True if I can be clipped content. */
canBeContent?: boolean
/** True if I am a fill color. */
canBeFill?: boolean
canBeMuted: boolean
changeObject: (propertyId: SignalId, scalar?: Scalar) => ChangeEditObject
changeScalars: (scalars: ScalarsById) => void
changesObject: (scalars: ScalarsById) => ChangePropertiesEditObject
clipObject: (object?: InstanceObject) => ClipObject
constrainedValue: (found: Property, value?: Scalar) => Scalar | undefined
createdAt?: number
deletedAt?: number
duration: number
family: string
fetchResource: (resource: Resource) => Promise<DataOrError<true>>
findResource: (types: Strings) => Resource | undefined
frames: (quantize: number) => number
hasIntrinsicSizing?: boolean
hasIntrinsicTiming?: boolean
host: Plugins
id: string
instanceArgs: (object?: InstanceObject) => InstanceArgs
instanceFromObject: (object?: InstanceObject) => Instance
/** True if I am vector-based. */
isVector?: boolean
label: string
mediaIds: Strings
number: (key: string) => number
/** Size drawn from sized resource. */
probeSize?: Size
properties: Array<Property>
propertiesOfTarget: (targetId: string) => Array<Property>
propertyFind: (name: string) => Property | undefined
propertyIds: (targetId: string) => Array<SignalId>
resources: Array<Resource>
scalarsRecord: (idOrNames: Strings) => ScalarRecord
setValue: (nameOrId: string, scalar?: Scalar, dontConstrain?: boolean) => void
shouldSelectProperty: (property: Property) => boolean
source: string
string: (key: string) => string
style: (prefix?: string) => SvgStyleElement
targetId: string
textRect: Rect
toJSON: () => unknown
tweenValues: (key: string, time: Time, range: TimeRange) => Array<Scalar>
tweens: (key: string) => boolean
tweensProperty: (key: string) => boolean
type: string
unload: () => void
updatedAt?: number
userId?: string
value: (key: string) => Scalar | undefined
}
function TextMediaMixin<T = Constrained<VisibleMedia>>(
Base: T
): Mixed<T, TextMedia>
function cssReduce(
entries: Array<CssResultTuple>
): CSSResult
function cssSuffixForType(
type: string
): string
function familyFromCss(
string: string
): string
/** Type guard for ClientFont */
function isClientFont(
value: unknown
): boolean
function svgElementText(
document: Document,
string: Value,
color?: string,
size?: number,
family?: string,
transform?: string
): SVGTextElement
function urlFromCss(
string: string
): FetchUrl | undefined
const DROP_CSS = {
_$cssResult$: true,
cssText: '
:host {
position: relative;
}
div.drop-box {
inset: 0px;
pointer-events: none;
color: transparent;
position: absolute;
display: block;
}
:host(.dropping) div.drop-box {
box-shadow: var(--dropping-shadow);
}
',
t: [
'
:host {
position: relative;
}
div.drop-box {
inset: 0px;
pointer-events: none;
color: transparent;
position: absolute;
display: block;
}
:host(.dropping) div.drop-box {
box-shadow: var(--dropping-shadow);
}
'
]
}
/** Applied to all previews except timeline */
const MEDIA_PREVIEW_CSS = {
_$cssResult$: true,
cssText: '
:host {
display: inline-block;
padding: var(--pad-item-pix);
border-width: var(--border-item-stroke-pix);
border-style: solid;
border-radius: var(--border-item-radius-pix);
border-color: var(--fore-content);
color: var(--fore-content);
background-color: var(--back-content);
width: var(--previewable-width-px);
height: var(--previewable-height-px);
cursor: grab;
}
:host([undraggable]) {
cursor: default;
}
:host(:is(:hover, .selected)) {
background-color: var(--over-fore-content);
color: var(--over-back-content);
border-color: var(--over-back-content);
}
#preview {
overflow: hidden;
height: calc(var(--preview-height));
width: calc(var(--preview-width));
height: var(--preview-height);
width: var(--preview-width);
}
#label {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
#head {
width: var(--preview-width);
padding-bottom: var(--pad-item-pix);
display: flex;
gap: var(--pad-item-pix);
font-size: var(--size-label-pix);
line-height: var(--size-label-pix);
overflow-x: hidden;
}
#preview > * {
height: var(--preview-height);
width: var(--preview-width);
}
',
t: [
'
',
'
#preview > * {
height: var(--preview-height);
width: var(--preview-width);
}
'
]
}
/**
* Applied to timeline previews and others
* via MEDIA_PREVIEW_CSS
*/
const PREVIEW_CSS = {
_$cssResult$: true,
cssText: '
:host {
display: inline-block;
padding: var(--pad-item-pix);
border-width: var(--border-item-stroke-pix);
border-style: solid;
border-radius: var(--border-item-radius-pix);
border-color: var(--fore-content);
color: var(--fore-content);
background-color: var(--back-content);
width: var(--previewable-width-px);
height: var(--previewable-height-px);
cursor: grab;
}
:host([undraggable]) {
cursor: default;
}
:host(:is(:hover, .selected)) {
background-color: var(--over-fore-content);
color: var(--over-back-content);
border-color: var(--over-back-content);
}
#preview {
overflow: hidden;
height: calc(var(--preview-height));
width: calc(var(--preview-width));
height: var(--preview-height);
width: var(--preview-width);
}
#label {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
#head {
width: var(--preview-width);
padding-bottom: var(--pad-item-pix);
display: flex;
gap: var(--pad-item-pix);
font-size: var(--size-label-pix);
line-height: var(--size-label-pix);
overflow-x: hidden;
}
',
t: [
'
:host {
display: inline-block;
padding: var(--pad-item-pix);
border-width: var(--border-item-stroke-pix);
border-style: solid;
border-radius: var(--border-item-radius-pix);
border-color: var(--fore-content);
color: var(--fore-content);
background-color: var(--back-content);
width: var(--previewable-width-px);
height: var(--previewable-height-px);
cursor: grab;
}
:host([undraggable]) {
cursor: default;
}
:host(:is(:hover, .selected)) {
background-color: var(--over-fore-content);
color: var(--over-back-content);
border-color: var(--over-back-content);
}
#preview {
overflow: hidden;
height: calc(var(--preview-height));
width: calc(var(--preview-width));
height: var(--preview-height);
width: var(--preview-width);
}
#label {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
#head {
width: var(--preview-width);
padding-bottom: var(--pad-item-pix);
display: flex;
gap: var(--pad-item-pix);
font-size: var(--size-label-pix);
line-height: var(--size-label-pix);
overflow-x: hidden;
}
'
]
}