import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const u=JSON.parse('{"title":"Module: features/repeatable","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/features/repeatable.md","lastUpdated":null}'),l={name:"api/modules/features/repeatable.md"},r=o('

Module: features/repeatable

Interfaces

BaseRepeatable

BaseRepeatable: Object

The properties that are added onto a processed RepeatableOptions to create a Repeatable.

NameTypeDescription
[Component]GenericComponentThe Vue component used to render this feature.
[GatherProps]() => Record<string, unknown>A function to gather the props the vue component requires for this feature.
amountPersistent<DecimalSource>The current amount this repeatable has.
amountToIncreaseRef<DecimalSource>How much amount can be increased by, or 1 if unclickable. Capped at 1 if maximize is false.
canClickProcessedComputable<boolean>Whether or not this repeatable can be clicked.
idstringAn auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
maxedRef<boolean>Whether or not this repeatable's amount is at it's limit.
onClick(event?: MouseEvent | TouchEvent) => voidA function that gets called when this repeatable is clicked.
typetypeof RepeatableTypeA symbol that helps identify features of the same type.

Defined in

profectus/src/features/repeatable.tsx:79


RepeatableOptions

RepeatableOptions: Object

An object that configures a Repeatable.

NameTypeDescription
classes?Computable<Record<string, boolean>>Dictionary of CSS classes to apply to this feature.
display?Computable<RepeatableDisplay>The display to use for this repeatable.
initialAmount?DecimalSourceThe initial amount this repeatable has on a new save / after reset.
limit?Computable<DecimalSource>The maximum amount obtainable for this repeatable.
mark?Computable<string | boolean>Shows a marker on the corner of the feature.
maximize?Computable<boolean>Whether or not clicking this repeatable should attempt to maximize amount based on the requirements met. Requires requirements to be a requirement or array of requirements with Requirement.canMaximize true.
requirementsRequirementsThe requirement(s) to increase this repeatable.
small?Computable<boolean>Toggles a smaller design for the feature.
style?Computable<StyleValue>CSS to apply to this feature.
visibility?Computable<boolean | Visibility>Whether this repeatable should be visible.

Defined in

profectus/src/features/repeatable.tsx:53

Type Aliases

GenericRepeatable

Ƭ GenericRepeatable: Replace<Repeatable<RepeatableOptions>, { limit: ProcessedComputable<DecimalSource> ; visibility: ProcessedComputable<Visibility | boolean> }>

A type that matches any valid Repeatable object.

Defined in

profectus/src/features/repeatable.tsx:120


Repeatable

Ƭ Repeatable<T>: Replace<T & BaseRepeatable, { classes: GetComputableType<T["classes"]> ; display: Ref<CoercableComponent> ; limit: GetComputableTypeWithDefault<T["limit"], default> ; mark: GetComputableType<T["mark"]> ; maximize: GetComputableType<T["maximize"]> ; requirements: GetComputableType<T["requirements"]> ; small: GetComputableType<T["small"]> ; style: GetComputableType<T["style"]> ; visibility: GetComputableTypeWithDefault<T["visibility"], Visible> }>

An object that represents a feature with multiple "levels" with scaling requirements.

Type parameters

NameType
Textends RepeatableOptions

Defined in

profectus/src/features/repeatable.tsx:104


RepeatableDisplay

Ƭ RepeatableDisplay: CoercableComponent | { description?: CoercableComponent ; effectDisplay?: CoercableComponent ; showAmount?: boolean ; title?: CoercableComponent }

A type that can be used to customize the Repeatable display.

Defined in

profectus/src/features/repeatable.tsx:39

Variables

RepeatableType

Const RepeatableType: typeof RepeatableType

A symbol used to identify Repeatable features.

Defined in

profectus/src/features/repeatable.tsx:36

Functions

createRepeatable

createRepeatable<T>(optionsFunc, ...decorators): Repeatable<T>

Lazily creates a repeatable with the given options.

Type parameters
NameType
Textends RepeatableOptions
Parameters
NameTypeDescription
optionsFuncOptionsFunc<T, BaseRepeatable, GenericRepeatable>Repeatable options.
...decoratorsGenericDecorator[]-
Returns

Repeatable<T>

Defined in

profectus/src/features/repeatable.tsx:132

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