import{_ as e,c as t,o as a,a as o}from"./app.ab34650d.js";const m=JSON.parse('{"title":"Module: data/common","description":"","frontmatter":{"editLink":false},"headers":[{"level":2,"title":"Interfaces","slug":"interfaces"},{"level":2,"title":"Type Aliases","slug":"type-aliases"},{"level":3,"title":"GenericLayerTreeNode","slug":"genericlayertreenode"},{"level":3,"title":"GenericResetButton","slug":"genericresetbutton"},{"level":3,"title":"LayerTreeNode","slug":"layertreenode"},{"level":3,"title":"ResetButton","slug":"resetbutton"},{"level":2,"title":"Functions","slug":"functions"},{"level":3,"title":"colorText","slug":"colortext"},{"level":3,"title":"createCollapsibleModifierSections","slug":"createcollapsiblemodifiersections"},{"level":3,"title":"createLayerTreeNode","slug":"createlayertreenode"},{"level":3,"title":"createResetButton","slug":"createresetbutton"}],"relativePath":"api/modules/data/common.md","lastUpdated":null}'),d={name:"api/modules/data/common.md"},r=o('

Module: data/common

Interfaces

Type Aliases

GenericLayerTreeNode

\u01AC GenericLayerTreeNode: Replace<LayerTreeNode<LayerTreeNodeOptions>, { append?: ProcessedComputable<boolean> ; display: ProcessedComputable<CoercableComponent> }>

A type that matches any valid LayerTreeNode object.

Defined in

profectus/src/data/common.tsx:196


GenericResetButton

\u01AC GenericResetButton: Replace<GenericClickable & ResetButton<ResetButtonOptions>, { canClick: ProcessedComputable<boolean> ; display: ProcessedComputable<CoercableComponent> ; minimumGain: ProcessedComputable<DecimalSource> ; resetDescription: ProcessedComputable<string> ; showNextAt: ProcessedComputable<boolean> }>

A type that matches any valid ResetButton object.

Defined in

profectus/src/data/common.tsx:79


LayerTreeNode

\u01AC LayerTreeNode<T>: Replace<TreeNode<T>, { append: GetComputableType<T["append"]> ; display: GetComputableTypeWithDefault<T["display"], T["layerID"]> }>

A tree node that is associated with a given layer, and which opens the layer when clicked.

Type parameters

NameType
Textends LayerTreeNodeOptions

Defined in

profectus/src/data/common.tsx:188


ResetButton

\u01AC ResetButton<T>: Replace<Clickable<T>, { canClick: GetComputableTypeWithDefault<T["canClick"], Ref<boolean>> ; display: GetComputableTypeWithDefault<T["display"], Ref<JSX.Element>> ; minimumGain: GetComputableTypeWithDefault<T["minimumGain"], 1> ; onClick: VoidFunction ; resetDescription: GetComputableTypeWithDefault<T["resetDescription"], Ref<string>> ; showNextAt: GetComputableTypeWithDefault<T["showNextAt"], true> }>

A button that is used to control a conversion. It will show how much can be converted currently, and can show when that amount will go up, as well as handle only being clickable when a sufficient amount of currency can be gained. Assumes this button is associated with a specific node on a tree, and triggers that tree's reset propagation.

Type parameters

NameType
Textends ResetButtonOptions

Defined in

profectus/src/data/common.tsx:66

Functions

colorText

\u25B8 colorText(textToColor, color?): JSX.Element

Creates an HTML string for a span that writes some given text in a given color.

Parameters

NameTypeDefault valueDescription
textToColorstringundefinedThe content to change the color of
colorstring"var(--accent2)"The color to change the content to look like. Defaults to the current theme's accent 2 variable.

Returns

JSX.Element


createCollapsibleModifierSections

\u25B8 createCollapsibleModifierSections(sections): [JSXFunction, Persistent<boolean>[]]

Takes an array of modifier "sections", and creates a JSXFunction that can render all those sections, and allow each section to be collapsed. Also returns a list of persistent refs that are used to control which sections are currently collapsed.

Parameters

NameType
sectionsSection[]

Returns

[JSXFunction, Persistent<boolean>[]]


createLayerTreeNode

\u25B8 createLayerTreeNode<T>(optionsFunc): LayerTreeNode<T>

Lazily creates a tree node that's associated with a specific layer, with the given options.

Type parameters

NameType
Textends LayerTreeNodeOptions

Parameters

NameTypeDescription
optionsFuncOptionsFunc<T, Record<string, unknown>, Record<string, unknown>>A function that returns the options object for this tree node.

Returns

LayerTreeNode<T>


createResetButton

\u25B8 createResetButton<T>(optionsFunc): ResetButton<T>

Lazily creates a reset button with the given options.

Type parameters

NameType
Textends ClickableOptions & ResetButtonOptions

Parameters

NameTypeDescription
optionsFuncOptionsFunc<T, Record<string, unknown>, Record<string, unknown>>A function that returns the options object for this reset button.

Returns

ResetButton<T>

',67),c=[r];function n(l,s,i,h,u,p){return a(),t("div",null,c)}var g=e(d,[["render",n]]);export{m as __pageData,g as default};