import{_ as t,c as e,o as d,N as l}from"./chunks/framework.0799945b.js";const h=JSON.parse('{"title":"Module: features/trees/tree","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/features/tree.md","lastUpdated":null}'),o={name:"api/modules/features/tree.md"},r=l('
• BaseTree: Object
Name | Type | Description |
---|---|---|
[Component] | GenericComponent | The Vue component used to render this feature. |
[GatherProps] | () => Record <string , unknown > | A function to gather the props the vue component requires for this feature. |
id | string | An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates. |
isResetting | Ref <boolean > | A flag that is true while the reset is still propagating through the tree. |
links | Ref <Link []> | The link objects for each of the branches of the tree. |
reset | (node : GenericTreeNode ) => void | Cause a reset on this node and propagate it through the tree according to resetPropagation. |
resettingNode | Ref <null | GenericTreeNode > | A reference to the node that caused the currently propagating reset. |
type | typeof TreeType | A symbol that helps identify features of the same type. |
profectus/src/features/trees/tree.ts:201
• BaseTreeNode: Object
The properties that are added onto a processed TreeNodeOptions to create an TreeNode.
Name | Type | Description |
---|---|---|
[Component] | GenericComponent | The Vue component used to render this feature. |
[GatherProps] | () => Record <string , unknown > | A function to gather the props the vue component requires for this feature. |
id | string | An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates. |
type | typeof TreeNodeType | A symbol that helps identify features of the same type. |
profectus/src/features/trees/tree.ts:64
• TreeBranch: Object
Represents a branch between two nodes in a tree.
Name | Type | Description |
---|---|---|
accent-height? | Numberish | - |
accumulate? | "none" | "sum" | - |
additive? | "sum" | "replace" | - |
alignment-baseline? | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | "inherit" | - |
allowReorder? | "no" | "yes" | - |
alphabetic? | Numberish | - |
amplitude? | Numberish | - |
arabic-form? | "initial" | "medial" | "terminal" | "isolated" | - |
aria-activedescendant? | string | Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. |
aria-atomic? | Booleanish | Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. |
aria-autocomplete? | "none" | "inline" | "list" | "both" | Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made. |
aria-busy? | Booleanish | Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. |
aria-checked? | Booleanish | "mixed" | Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. See - aria-pressed - aria-selected. |
aria-colcount? | Numberish | Defines the total number of columns in a table, grid, or treegrid. See aria-colindex. |
aria-colindex? | Numberish | Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. See - aria-colcount - aria-colspan. |
aria-colspan? | Numberish | Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. See - aria-colindex - aria-rowspan. |
aria-controls? | string | Identifies the element (or elements) whose contents or presence are controlled by the current element. See aria-owns. |
aria-current? | "time" | Booleanish | "page" | "step" | "location" | "date" | Indicates the element that represents the current item within a container or set of related elements. |
aria-describedby? | string | Identifies the element (or elements) that describes the object. See aria-labelledby |
aria-details? | string | Identifies the element that provides a detailed, extended description for the object. See aria-describedby. |
aria-disabled? | Booleanish | Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. See - aria-hidden - aria-readonly. |
aria-dropeffect? | "none" | "copy" | "execute" | "link" | "move" | "popup" | Indicates what functions can be performed when a dragged object is released on the drop target. Deprecated in ARIA 1.1 |
aria-errormessage? | string | Identifies the element that provides an error message for the object. See - aria-invalid - aria-describedby. |
aria-expanded? | Booleanish | Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. |
aria-flowto? | string | Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. |
aria-grabbed? | Booleanish | Indicates an element's "grabbed" state in a drag-and-drop operation. Deprecated in ARIA 1.1 |
aria-haspopup? | "tree" | Booleanish | "menu" | "listbox" | "grid" | "dialog" | Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. |
aria-hidden? | Booleanish | Indicates whether the element is exposed to an accessibility API. See aria-disabled. |
aria-invalid? | Booleanish | "grammar" | "spelling" | Indicates the entered value does not conform to the format expected by the application. See aria-errormessage. |
aria-keyshortcuts? | string | Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. |
aria-label? | string | Defines a string value that labels the current element. See aria-labelledby. |
aria-labelledby? | string | Identifies the element (or elements) that labels the current element. See aria-describedby. |
aria-level? | Numberish | Defines the hierarchical level of an element within a structure. |
aria-live? | "off" | "assertive" | "polite" | Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. |
aria-modal? | Booleanish | Indicates whether an element is modal when displayed. |
aria-multiline? | Booleanish | Indicates whether a text box accepts multiple lines of input or only a single line. |
aria-multiselectable? | Booleanish | Indicates that the user may select more than one item from the current selectable descendants. |
aria-orientation? | "horizontal" | "vertical" | Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. |
aria-owns? | string | Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. See aria-controls. |
aria-placeholder? | string | Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format. |
aria-posinset? | Numberish | Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See aria-setsize. |
aria-pressed? | Booleanish | "mixed" | Indicates the current "pressed" state of toggle buttons. See - aria-checked - aria-selected. |
aria-readonly? | Booleanish | Indicates that the element is not editable, but is otherwise operable. See aria-disabled. |
aria-relevant? | "additions" | "additions text" | "all" | "removals" | "text" | Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. See aria-atomic. |
aria-required? | Booleanish | Indicates that user input is required on the element before a form may be submitted. |
aria-roledescription? | string | Defines a human-readable, author-localized description for the role of an element. |
aria-rowcount? | Numberish | Defines the total number of rows in a table, grid, or treegrid. See aria-rowindex. |
aria-rowindex? | Numberish | Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. See - aria-rowcount - aria-rowspan. |
aria-rowspan? | Numberish | Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. See - aria-rowindex - aria-colspan. |
aria-selected? | Booleanish | Indicates the current "selected" state of various widgets. See - aria-checked - aria-pressed. |
aria-setsize? | Numberish | Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See aria-posinset. |
aria-sort? | "none" | "ascending" | "descending" | "other" | Indicates if items in a table or grid are sorted in ascending or descending order. |
aria-valuemax? | Numberish | Defines the maximum allowed value for a range widget. |
aria-valuemin? | Numberish | Defines the minimum allowed value for a range widget. |
aria-valuenow? | Numberish | Defines the current value for a range widget. See aria-valuetext. |
aria-valuetext? | string | Defines the human readable text alternative of aria-valuenow for a range widget. |
ascent? | Numberish | - |
attributeName? | string | - |
attributeType? | string | - |
autoReverse? | Numberish | - |
azimuth? | Numberish | - |
baseFrequency? | Numberish | - |
baseProfile? | Numberish | - |
baseline-shift? | Numberish | - |
bbox? | Numberish | - |
begin? | Numberish | - |
bias? | Numberish | - |
by? | Numberish | - |
calcMode? | Numberish | - |
cap-height? | Numberish | - |
class? | any | SVG Styling Attributes See https://www.w3.org/TR/SVG/styling.html#ElementSpecificStyling |
clip? | Numberish | - |
clip-path? | string | - |
clip-rule? | Numberish | - |
clipPathUnits? | Numberish | - |
color? | string | - |
color-interpolation? | Numberish | - |
color-interpolation-filters? | "auto" | "inherit" | "sRGB" | "linearRGB" | - |
color-profile? | Numberish | - |
color-rendering? | Numberish | - |
contentScriptType? | Numberish | - |
contentStyleType? | Numberish | - |
cursor? | Numberish | - |
cx? | Numberish | - |
cy? | Numberish | - |
d? | string | - |
decelerate? | Numberish | - |
descent? | Numberish | - |
diffuseConstant? | Numberish | - |
direction? | Numberish | - |
display? | Numberish | - |
divisor? | Numberish | - |
dominant-baseline? | Numberish | - |
dur? | Numberish | - |
dx? | Numberish | - |
dy? | Numberish | - |
edgeMode? | Numberish | - |
elevation? | Numberish | - |
enable-background? | Numberish | - |
end? | Numberish | - |
endNode | GenericTreeNode | - |
exponent? | Numberish | - |
externalResourcesRequired? | Numberish | - |
fill? | string | - |
fill-opacity? | Numberish | - |
fill-rule? | "inherit" | "nonzero" | "evenodd" | - |
filter? | string | - |
filterRes? | Numberish | - |
filterUnits? | Numberish | - |
flood-color? | Numberish | - |
flood-opacity? | Numberish | - |
focusable? | Numberish | - |
font-family? | string | - |
font-size? | Numberish | - |
font-size-adjust? | Numberish | - |
font-stretch? | Numberish | - |
font-style? | Numberish | - |
font-variant? | Numberish | - |
font-weight? | Numberish | - |
format? | Numberish | - |
from? | Numberish | - |
fx? | Numberish | - |
fy? | Numberish | - |
g1? | Numberish | - |
g2? | Numberish | - |
glyph-name? | Numberish | - |
glyph-orientation-horizontal? | Numberish | - |
glyph-orientation-vertical? | Numberish | - |
glyphRef? | Numberish | - |
gradientTransform? | string | - |
gradientUnits? | string | - |
hanging? | Numberish | - |
height? | Numberish | - |
horiz-adv-x? | Numberish | - |
horiz-origin-x? | Numberish | - |
href? | string | - |
id? | string | - |
ideographic? | Numberish | - |
image-rendering? | Numberish | - |
in? | string | - |
in2? | Numberish | - |
innerHTML? | string | - |
intercept? | Numberish | - |
k? | Numberish | - |
k1? | Numberish | - |
k2? | Numberish | - |
k3? | Numberish | - |
k4? | Numberish | - |
kernelMatrix? | Numberish | - |
kernelUnitLength? | Numberish | - |
kerning? | Numberish | - |
keyPoints? | Numberish | - |
keySplines? | Numberish | - |
keyTimes? | Numberish | - |
lang? | string | - |
lengthAdjust? | Numberish | - |
letter-spacing? | Numberish | - |
lighting-color? | Numberish | - |
limitingConeAngle? | Numberish | - |
local? | Numberish | - |
marker-end? | string | - |
marker-mid? | string | - |
marker-start? | string | - |
markerHeight? | Numberish | - |
markerUnits? | Numberish | - |
markerWidth? | Numberish | - |
mask? | string | - |
maskContentUnits? | Numberish | - |
maskUnits? | Numberish | - |
mathematical? | Numberish | - |
max? | Numberish | - |
media? | string | - |
method? | string | - |
min? | Numberish | - |
mode? | Numberish | - |
name? | string | - |
numOctaves? | Numberish | - |
offset? | Numberish | - |
offsetEnd? | Position | - |
offsetStart? | Position | - |
onAbort? | (payload : Event ) => void | - |
onAnimationend? | (payload : AnimationEvent ) => void | - |
onAnimationiteration? | (payload : AnimationEvent ) => void | - |
onAnimationstart? | (payload : AnimationEvent ) => void | - |
onAuxclick? | (payload : MouseEvent ) => void | - |
onBeforeinput? | (payload : Event ) => void | - |
onBlur? | (payload : FocusEvent ) => void | - |
onCanplay? | (payload : Event ) => void | - |
onCanplaythrough? | (payload : Event ) => void | - |
onChange? | (payload : Event ) => void | - |
onClick? | (payload : MouseEvent ) => void | - |
onCompositionend? | (payload : CompositionEvent ) => void | - |
onCompositionstart? | (payload : CompositionEvent ) => void | - |
onCompositionupdate? | (payload : CompositionEvent ) => void | - |
onContextmenu? | (payload : MouseEvent ) => void | - |
onCopy? | (payload : ClipboardEvent ) => void | - |
onCut? | (payload : ClipboardEvent ) => void | - |
onDblclick? | (payload : MouseEvent ) => void | - |
onDrag? | (payload : DragEvent ) => void | - |
onDragend? | (payload : DragEvent ) => void | - |
onDragenter? | (payload : DragEvent ) => void | - |
onDragexit? | (payload : DragEvent ) => void | - |
onDragleave? | (payload : DragEvent ) => void | - |
onDragover? | (payload : DragEvent ) => void | - |
onDragstart? | (payload : DragEvent ) => void | - |
onDrop? | (payload : DragEvent ) => void | - |
onDurationchange? | (payload : Event ) => void | - |
onEmptied? | (payload : Event ) => void | - |
onEncrypted? | (payload : Event ) => void | - |
onEnded? | (payload : Event ) => void | - |
onError? | (payload : Event ) => void | - |
onFocus? | (payload : FocusEvent ) => void | - |
onFocusin? | (payload : FocusEvent ) => void | - |
onFocusout? | (payload : FocusEvent ) => void | - |
onInput? | (payload : Event ) => void | - |
onInvalid? | (payload : Event ) => void | - |
onKeydown? | (payload : KeyboardEvent ) => void | - |
onKeypress? | (payload : KeyboardEvent ) => void | - |
onKeyup? | (payload : KeyboardEvent ) => void | - |
onLoad? | (payload : Event ) => void | - |
onLoadeddata? | (payload : Event ) => void | - |
onLoadedmetadata? | (payload : Event ) => void | - |
onLoadstart? | (payload : Event ) => void | - |
onMousedown? | (payload : MouseEvent ) => void | - |
onMouseenter? | (payload : MouseEvent ) => void | - |
onMouseleave? | (payload : MouseEvent ) => void | - |
onMousemove? | (payload : MouseEvent ) => void | - |
onMouseout? | (payload : MouseEvent ) => void | - |
onMouseover? | (payload : MouseEvent ) => void | - |
onMouseup? | (payload : MouseEvent ) => void | - |
onPaste? | (payload : ClipboardEvent ) => void | - |
onPause? | (payload : Event ) => void | - |
onPlay? | (payload : Event ) => void | - |
onPlaying? | (payload : Event ) => void | - |
onPointercancel? | (payload : PointerEvent ) => void | - |
onPointerdown? | (payload : PointerEvent ) => void | - |
onPointerenter? | (payload : PointerEvent ) => void | - |
onPointerleave? | (payload : PointerEvent ) => void | - |
onPointermove? | (payload : PointerEvent ) => void | - |
onPointerout? | (payload : PointerEvent ) => void | - |
onPointerover? | (payload : PointerEvent ) => void | - |
onPointerup? | (payload : PointerEvent ) => void | - |
onProgress? | (payload : Event ) => void | - |
onRatechange? | (payload : Event ) => void | - |
onReset? | (payload : Event ) => void | - |
onScroll? | (payload : UIEvent ) => void | - |
onSeeked? | (payload : Event ) => void | - |
onSeeking? | (payload : Event ) => void | - |
onSelect? | (payload : Event ) => void | - |
onStalled? | (payload : Event ) => void | - |
onSubmit? | (payload : Event ) => void | - |
onSuspend? | (payload : Event ) => void | - |
onTimeupdate? | (payload : Event ) => void | - |
onTouchcancel? | (payload : TouchEvent ) => void | - |
onTouchend? | (payload : TouchEvent ) => void | - |
onTouchmove? | (payload : TouchEvent ) => void | - |
onTouchstart? | (payload : TouchEvent ) => void | - |
onTransitionend? | (payload : TransitionEvent ) => void | - |
onTransitionstart? | (payload : TransitionEvent ) => void | - |
onVolumechange? | (payload : Event ) => void | - |
onWaiting? | (payload : Event ) => void | - |
onWheel? | (payload : WheelEvent ) => void | - |
opacity? | Numberish | - |
operator? | Numberish | - |
order? | Numberish | - |
orient? | Numberish | - |
orientation? | Numberish | - |
origin? | Numberish | - |
overflow? | Numberish | - |
overline-position? | Numberish | - |
overline-thickness? | Numberish | - |
paint-order? | Numberish | - |
panose-1? | Numberish | - |
pathLength? | Numberish | - |
patternContentUnits? | string | - |
patternTransform? | Numberish | - |
patternUnits? | string | - |
pointer-events? | Numberish | - |
points? | string | - |
pointsAtX? | Numberish | - |
pointsAtY? | Numberish | - |
pointsAtZ? | Numberish | - |
preserveAlpha? | Numberish | - |
preserveAspectRatio? | string | - |
primitiveUnits? | Numberish | - |
r? | Numberish | - |
radius? | Numberish | - |
refX? | Numberish | - |
refY? | Numberish | - |
renderingIntent? | Numberish | - |
repeatCount? | Numberish | - |
repeatDur? | Numberish | - |
requiredExtensions? | Numberish | - |
requiredFeatures? | Numberish | - |
restart? | Numberish | - |
result? | string | - |
role? | string | - |
rotate? | Numberish | - |
rx? | Numberish | - |
ry? | Numberish | - |
scale? | Numberish | - |
seed? | Numberish | - |
shape-rendering? | Numberish | - |
slope? | Numberish | - |
spacing? | Numberish | - |
specularConstant? | Numberish | - |
specularExponent? | Numberish | - |
speed? | Numberish | - |
spreadMethod? | string | - |
startNode | GenericTreeNode | - |
startOffset? | Numberish | - |
stdDeviation? | Numberish | - |
stemh? | Numberish | - |
stemv? | Numberish | - |
stitchTiles? | Numberish | - |
stop-color? | string | - |
stop-opacity? | Numberish | - |
strikethrough-position? | Numberish | - |
strikethrough-thickness? | Numberish | - |
string? | Numberish | - |
stroke? | string | - |
stroke-dasharray? | Numberish | - |
stroke-dashoffset? | Numberish | - |
stroke-linecap? | "inherit" | "butt" | "round" | "square" | - |
stroke-linejoin? | "inherit" | "round" | "miter" | "bevel" | - |
stroke-miterlimit? | Numberish | - |
stroke-opacity? | Numberish | - |
stroke-width? | Numberish | - |
style? | string | CSSProperties | - |
surfaceScale? | Numberish | - |
systemLanguage? | Numberish | - |
tabindex? | Numberish | - |
tableValues? | Numberish | - |
target? | string | - |
targetX? | Numberish | - |
targetY? | Numberish | - |
text-anchor? | string | - |
text-decoration? | Numberish | - |
text-rendering? | Numberish | - |
textLength? | Numberish | - |
to? | Numberish | - |
transform? | string | - |
type? | string | - |
u1? | Numberish | - |
u2? | Numberish | - |
underline-position? | Numberish | - |
underline-thickness? | Numberish | - |
unicode? | Numberish | - |
unicode-bidi? | Numberish | - |
unicode-range? | Numberish | - |
unitsPer-em? | Numberish | - |
v-alphabetic? | Numberish | - |
v-hanging? | Numberish | - |
v-ideographic? | Numberish | - |
v-mathematical? | Numberish | - |
values? | string | - |
vector-effect? | Numberish | - |
version? | string | - |
vert-adv-y? | Numberish | - |
vert-origin-x? | Numberish | - |
vert-origin-y? | Numberish | - |
viewBox? | string | - |
viewTarget? | Numberish | - |
visibility? | Numberish | - |
width? | Numberish | - |
widths? | Numberish | - |
word-spacing? | Numberish | - |
writing-mode? | Numberish | - |
x? | Numberish | - |
x-height? | Numberish | - |
x1? | Numberish | - |
x2? | Numberish | - |
xChannelSelector? | string | - |
xlinkActuate? | string | - |
xlinkArcrole? | string | - |
xlinkHref? | string | - |
xlinkRole? | string | - |
xlinkShow? | string | - |
xlinkTitle? | string | - |
xlinkType? | string | - |
xmlns? | string | - |
y? | Numberish | - |
y1? | Numberish | - |
y2? | Numberish | - |
yChannelSelector? | string | - |
z? | Numberish | - |
zoomAndPan? | string | - |
profectus/src/features/trees/tree.ts:176
• TreeNodeOptions: Object
An object that configures a TreeNode.
Name | Type | Description |
---|---|---|
canClick? | Computable <boolean > | Whether or not this tree node can be clicked. |
classes? | Computable <Record <string , boolean >> | Dictionary of CSS classes to apply to this feature. |
color? | Computable <string > | The background color for this node. |
display? | Computable <CoercableComponent > | The label to display on this tree node. |
glowColor? | Computable <string > | The color of the glow effect shown to notify the user there's something to do with this node. |
mark? | Computable <string | boolean > | Shows a marker on the corner of the feature. |
onClick? | (e? : MouseEvent | TouchEvent ) => void | A function that is called when the tree node is clicked. |
onHold? | VoidFunction | A function that is called when the tree node is held down. |
reset? | GenericReset | A reset object attached to this node, used for propagating resets through the tree. |
style? | Computable <StyleValue > | CSS to apply to this feature. |
visibility? | Computable <boolean | Visibility > | Whether this tree node should be visible. |
profectus/src/features/trees/tree.ts:36
• TreeOptions: Object
An object that configures a Tree.
Name | Type | Description |
---|---|---|
branches? | Computable <TreeBranch []> | The branches between nodes within this tree. |
leftSideNodes? | Computable <GenericTreeNode []> | Nodes to show on the left side of the tree. |
nodes | Computable <GenericTreeNode [][]> | The nodes within the tree, in a 2D array. |
onReset? | (node : GenericTreeNode ) => void | A function that is called when a node within the tree is reset. |
resetPropagation? | ResetPropagation | How to propagate resets through the tree. |
rightSideNodes? | Computable <GenericTreeNode []> | Nodes to show on the right side of the tree. |
visibility? | Computable <boolean | Visibility > | Whether this clickable should be visible. |
profectus/src/features/trees/tree.ts:184
Ƭ GenericTree: Replace
<Tree
<TreeOptions
>, { visibility
: ProcessedComputable
<Visibility
| boolean
> }>
A type that matches any valid Tree object.
profectus/src/features/trees/tree.ts:233
Ƭ GenericTreeNode: Replace
<TreeNode
<TreeNodeOptions
>, { canClick
: ProcessedComputable
<boolean
> ; visibility
: ProcessedComputable
<Visibility
| boolean
> }>
A type that matches any valid TreeNode object.
profectus/src/features/trees/tree.ts:91
Ƭ ResetPropagation: (tree
: GenericTree
, resettingNode
: GenericTreeNode
) => void
▸ (tree
, resettingNode
): void
A function that is used to propagate resets through a tree.
Name | Type |
---|---|
tree | GenericTree |
resettingNode | GenericTreeNode |
void
profectus/src/features/trees/tree.ts:287
Ƭ Tree<T
>: Replace
<T
& BaseTree
, { branches
: GetComputableType
<T
["branches"
]> ; leftSideNodes
: GetComputableType
<T
["leftSideNodes"
]> ; nodes
: GetComputableType
<T
["nodes"
]> ; rightSideNodes
: GetComputableType
<T
["rightSideNodes"
]> ; visibility
: GetComputableTypeWithDefault
<T
["visibility"
], Visible
> }>
An object that represents a feature that is a tree of nodes with branches between them. Contains support for reset mechanics that can propagate through the tree.
Name | Type |
---|---|
T | extends TreeOptions |
profectus/src/features/trees/tree.ts:221
Ƭ TreeNode<T
>: Replace
<T
& BaseTreeNode
, { canClick
: GetComputableTypeWithDefault
<T
["canClick"
], true
> ; classes
: GetComputableType
<T
["classes"
]> ; color
: GetComputableType
<T
["color"
]> ; display
: GetComputableType
<T
["display"
]> ; glowColor
: GetComputableType
<T
["glowColor"
]> ; mark
: GetComputableType
<T
["mark"
]> ; style
: GetComputableType
<T
["style"
]> ; visibility
: GetComputableTypeWithDefault
<T
["visibility"
], Visible
> }>
An object that represents a node on a tree.
Name | Type |
---|---|
T | extends TreeNodeOptions |
profectus/src/features/trees/tree.ts:76
• Const
TreeNodeType: typeof TreeNodeType
A symbol used to identify TreeNode features.
profectus/src/features/trees/tree.ts:29
• Const
TreeType: typeof TreeType
A symbol used to identify Tree features.
profectus/src/features/trees/tree.ts:31
▸ branchedResetPropagation(tree
, resettingNode
): void
Propagate resets down the branches of the tree.
Name | Type |
---|---|
tree | GenericTree |
resettingNode | GenericTreeNode |
void
profectus/src/features/trees/tree.ts:316
▸ createResourceTooltip(resource
, requiredResource?
, requirement?
): Ref
<string
>
Utility for creating a tooltip for a tree node that displays a resource-based unlock requirement, and after unlock shows the amount of another resource. It sounds oddly specific, but comes up a lot.
Name | Type | Default value |
---|---|---|
resource | Resource <DecimalSource > | undefined |
requiredResource | null | Resource <DecimalSource > | null |
requirement | Computable <DecimalSource > | 0 |
Ref
<string
>
profectus/src/features/trees/tree.ts:355
▸ createTree<T
>(optionsFunc
): Tree
<T
>
Lazily creates a tree with the given options.
Name | Type |
---|---|
T | extends TreeOptions |
Name | Type | Description |
---|---|---|
optionsFunc | OptionsFunc <T , BaseTree , GenericTree > | Tree options. |
Tree
<T
>
profectus/src/features/trees/tree.ts:244
▸ createTreeNode<T
>(optionsFunc?
): TreeNode
<T
>
Lazily creates a tree node with the given options.
Name | Type |
---|---|
T | extends TreeNodeOptions |
Name | Type | Description |
---|---|---|
optionsFunc? | OptionsFunc <T , BaseTreeNode , GenericTreeNode > | Tree Node options. |
TreeNode
<T
>
profectus/src/features/trees/tree.ts:103
▸ defaultResetPropagation(tree
, resettingNode
): void
Propagate resets down the tree by resetting every node in a lower row.
Name | Type |
---|---|
tree | GenericTree |
resettingNode | GenericTreeNode |
void
profectus/src/features/trees/tree.ts:292
▸ invertedResetPropagation(tree
, resettingNode
): void
Propagate resets down the tree by resetting every node in a lower row.
Name | Type |
---|---|
tree | GenericTree |
resettingNode | GenericTreeNode |
void
profectus/src/features/trees/tree.ts:304
Name | Type |
---|---|
nodes * | processedPropType<GenericTreeNode[][]>(Array) |
leftSideNodes | processedPropType<GenericTreeNode[]>(Array) |
rightSideNodes | processedPropType<GenericTreeNode[]>(Array) |
branches | processedPropType<TreeBranch[]>(Array) |
Name | Type |
---|---|
display | processedPropType<CoercableComponent>(Object, String, Function) |
visibility * | processedPropType<Visibility | boolean>(Number, Boolean) |
style | processedPropType<StyleValue>(String, Object, Array) |
classes | processedPropType<Record<string, boolean>>(Object) |
onClick | (e?: MouseEvent | TouchEvent) => void |
onHold | VoidFunction |
color | processedPropType<string>(String) |
glowColor | processedPropType<string>(String) |
canClick * | processedPropType<boolean>(Boolean) |
mark | processedPropType<boolean | string>(Boolean, String) |
id * | string |