Interface SemanticObject

A high-level semantic description of an object from an editor (or to be imported into an editor).

experimental

May change or be removed in future releases.

Hierarchy

  • SemanticObject

Index

Properties

Optional accent

accent: string

For variables, an optional string describing the type of accent to add, if any.

Optional baseType

baseType: string

The general type of the object.

Optional blue

blue: number

For style nodes that change the colour, the amount of blue in the new colour from 0 to 1 inclusive.

Optional category

category: string

A general mathematical category or subject area to which the object belongs.

Optional dataType

dataType: string

The data type of a variable or identifier.

Optional effectivePlacement

effectivePlacement: OperatorPlacement

The placement of an operator in the context from which it was exported.

Optional field

An alternative to field for objects with a single field.

Optional fields

fields: SemanticObject[][]

For objects with child fields, an array of those fields.

Optional green

green: number

For style nodes that change the colour, the amount of green in the new colour from 0 to 1 inclusive.

Optional hasIndex

hasIndex: boolean

For a script object, whether the object has an index (subscript) field.

Optional hasPower

hasPower: boolean

For a script object, whether the object has an exponent (superscript) field.

Optional heightGrows

heightGrows: boolean

For variable-sized rectangular objects, whether the height (number of rows) can increase.

Optional implicitOperatorThatFollows

implicitOperatorThatFollows: "plus" | "timesDot"

The type of operation, if any, that is implicitly applied to this object and the next one. For example, there is an implicit multiplication ("timesDot") between the coefficient 2 and variable x in the term 2x.

Optional opacity

opacity: number

For style nodes that change the colour, the opacity of the new colour from 0 to 1 inclusive.

Optional placement

The placement of an operator.

Optional red

red: number

For style nodes that change the colour, the amount of red in the new colour from 0 to 1 inclusive.

Optional scale

scale: number

For style nodes that change the content size, the new scale.

Optional size

size: [number, number]

For variable-sized rectangular objects, the width (number of columns) and height (number of rows) of the object.

Optional symbol

symbol: string

The object's symbol, such as a variable name, number value, or operator symbol.

Optional symbolAbove

symbolAbove: string

Optional symbol placed above the operator symbol. Used by certain rare operators. Where a Unicode symbol already combines the elements, it should be used as the symbol instead of using this field.

Optional text

text: string

For text objects, the text content of the object.

type

type: string

The specific type of object; an API name or a general type such as "variable" or "number".

Optional widthGrows

widthGrows: boolean

For variable-sized rectangular objects, whether the width (number of columns) can increase.

This API is still under development and is subject to change. Copyright © Math I Can Do Solutions Incorporated and/or its licensors.