profectus-docs/assets/api_interfaces_features_grids_grid.BaseGrid.md.e2d80953.js

1 line
14 KiB
JavaScript

import{_ as e,c as t,o as d,a as r}from"./app.54d5a277.js";const g='{"title":"Interface: BaseGrid","description":"","frontmatter":{},"headers":[{"level":2,"title":"Hierarchy","slug":"hierarchy"},{"level":2,"title":"Properties","slug":"properties"},{"level":3,"title":"[Component]","slug":"component"},{"level":3,"title":"[DefaultValue]","slug":"defaultvalue"},{"level":3,"title":"[PersistentState]","slug":"persistentstate"},{"level":3,"title":"cells","slug":"cells"},{"level":3,"title":"id","slug":"id"},{"level":3,"title":"type","slug":"type"},{"level":2,"title":"Methods","slug":"methods"},{"level":3,"title":"[GatherProps]","slug":"gatherprops"},{"level":3,"title":"getID","slug":"getid"},{"level":3,"title":"getState","slug":"getstate"},{"level":3,"title":"setState","slug":"setstate"}],"relativePath":"api/interfaces/features/grids/grid.BaseGrid.md"}',o={},a=r('<h1 id="interface-basegrid" tabindex="-1">Interface: BaseGrid <a class="header-anchor" href="#interface-basegrid" aria-hidden="true">#</a></h1><p><a href="./../../../modules/features/grids/grid.html">features/grids/grid</a>.BaseGrid</p><h2 id="hierarchy" tabindex="-1">Hierarchy <a class="header-anchor" href="#hierarchy" aria-hidden="true">#</a></h2><ul><li><p><a href="./../../../modules/game/persistence.html#persistent"><code>Persistent</code></a>&lt;<code>Record</code>&lt;<code>string</code> | <code>number</code>, <a href="./../../../modules/game/persistence.html#state"><code>State</code></a>&gt;&gt;</p><p>\u21B3 <strong><code>BaseGrid</code></strong></p></li></ul><h2 id="properties" tabindex="-1">Properties <a class="header-anchor" href="#properties" aria-hidden="true">#</a></h2><h3 id="component" tabindex="-1">[Component] <a class="header-anchor" href="#component" aria-hidden="true">#</a></h3><p>\u2022 <strong>[Component]</strong>: <code>DefineComponent</code>&lt;{ <code>cells</code>: { <code>required</code>: <code>true</code> = true; <code>type</code>: <code>PropType</code>&lt;<a href="./../../../modules/util/computed.html#processedcomputable"><code>ProcessedComputable</code></a>&lt;<code>Record</code>&lt;<code>string</code>, <a href="./grid.GridCell"><code>GridCell</code></a>&gt;&gt;&gt; } ; <code>cols</code>: { <code>required</code>: <code>true</code> = true; <code>type</code>: <code>PropType</code>&lt;<a href="./../../../modules/util/computed.html#processedcomputable"><code>ProcessedComputable</code></a>&lt;<code>number</code>&gt;&gt; } ; <code>rows</code>: { <code>required</code>: <code>true</code> = true; <code>type</code>: <code>PropType</code>&lt;<a href="./../../../modules/util/computed.html#processedcomputable"><code>ProcessedComputable</code></a>&lt;<code>number</code>&gt;&gt; } ; <code>visibility</code>: { <code>required</code>: <code>true</code> = true; <code>type</code>: <code>PropType</code>&lt;<a href="./../../../modules/util/computed.html#processedcomputable"><code>ProcessedComputable</code></a>&lt;<a href="../../../enums/features/feature.Visibility"><code>Visibility</code></a>&gt;&gt; } }, { <code>Visibility</code>: typeof <a href="../../../enums/features/feature.Visibility"><code>Visibility</code></a> ; <code>gatherCellProps</code>: (<code>cell</code>: <a href="./grid.GridCell"><code>GridCell</code></a>) =&gt; { <code>canClick</code>: <code>boolean</code> ; <code>display</code>: <a href="./../../../modules/features/feature.html#coercablecomponent"><code>CoercableComponent</code></a> ; <code>id</code>: <code>string</code> ; <code>onClick</code>: <code>undefined</code> | <code>VoidFunction</code> ; <code>onHold</code>: <code>undefined</code> | <code>VoidFunction</code> ; <code>style</code>: <code>undefined</code> | <a href="./../../../modules/features/feature.html#stylevalue"><code>StyleValue</code></a> ; <code>title</code>: <code>undefined</code> | <a href="./../../../modules/features/feature.html#coercablecomponent"><code>CoercableComponent</code></a> ; <code>visibility</code>: <a href="../../../enums/features/feature.Visibility"><code>Visibility</code></a> } ; <code>mergeAdjacent</code>: <code>ComputedRef</code>&lt;<code>boolean</code>&gt; ; <code>unref</code>: &lt;T&gt;(<code>ref</code>: <code>T</code> | <code>Ref</code>&lt;<code>T</code>&gt;) =&gt; <code>T</code> }, <code>unknown</code>, {}, {}, <code>ComponentOptionsMixin</code>, <code>ComponentOptionsMixin</code>, <code>Record</code>&lt;<code>string</code>, <code>any</code>&gt;, <code>string</code>, <code>PublicProps</code>, <code>Readonly</code>&lt;<code>ExtractPropTypes</code>&lt;{ <code>cells</code>: { <code>required</code>: <code>true</code> = true; <code>type</code>: <code>PropType</code>&lt;<a href="./../../../modules/util/computed.html#processedcomputable"><code>ProcessedComputable</code></a>&lt;<code>Record</code>&lt;<code>string</code>, <a href="./grid.GridCell"><code>GridCell</code></a>&gt;&gt;&gt; } ; <code>cols</code>: { <code>required</code>: <code>true</code> = true; <code>type</code>: <code>PropType</code>&lt;<a href="./../../../modules/util/computed.html#processedcomputable"><code>ProcessedComputable</code></a>&lt;<code>number</code>&gt;&gt; } ; <code>rows</code>: { <code>required</code>: <code>true</code> = true; <code>type</code>: <code>PropType</code>&lt;<a href="./../../../modules/util/computed.html#processedcomputable"><code>ProcessedComputable</code></a>&lt;<code>number</code>&gt;&gt; } ; <code>visibility</code>: { <code>required</code>: <code>true</code> = true; <code>type</code>: <code>PropType</code>&lt;<a href="./../../../modules/util/computed.html#processedcomputable"><code>ProcessedComputable</code></a>&lt;<a href="../../../enums/features/feature.Visibility"><code>Visibility</code></a>&gt;&gt; } }&gt;&gt;, {}&gt;</p><h4 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/features/grids/grid.ts#L214" target="_blank" rel="noopener noreferrer">profectus/src/features/grids/grid.ts:214</a></p><hr><h3 id="defaultvalue" tabindex="-1">[DefaultValue] <a class="header-anchor" href="#defaultvalue" aria-hidden="true">#</a></h3><p>\u2022 <strong>[DefaultValue]</strong>: <code>Record</code>&lt;<code>string</code> | <code>number</code>, <a href="./../../../modules/game/persistence.html#state"><code>State</code></a>&gt;</p><h4 id="inherited-from" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from" aria-hidden="true">#</a></h4><p>Persistent.__@DefaultValue@18652</p><h4 id="defined-in-1" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-1" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/game/persistence.ts#L25" target="_blank" rel="noopener noreferrer">profectus/src/game/persistence.ts:25</a></p><hr><h3 id="persistentstate" tabindex="-1">[PersistentState] <a class="header-anchor" href="#persistentstate" aria-hidden="true">#</a></h3><p>\u2022 <strong>[PersistentState]</strong>: <code>Ref</code>&lt;<code>Record</code>&lt;<code>string</code> | <code>number</code>, <a href="./../../../modules/game/persistence.html#state"><code>State</code></a>&gt;&gt;</p><h4 id="inherited-from-1" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-1" aria-hidden="true">#</a></h4><p>Persistent.__@PersistentState@18650</p><h4 id="defined-in-2" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-2" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/game/persistence.ts#L24" target="_blank" rel="noopener noreferrer">profectus/src/game/persistence.ts:24</a></p><hr><h3 id="cells" tabindex="-1">cells <a class="header-anchor" href="#cells" aria-hidden="true">#</a></h3><p>\u2022 <strong>cells</strong>: <code>Record</code>&lt;<code>string</code> | <code>number</code>, <a href="./grid.GridCell"><code>GridCell</code></a>&gt;</p><h4 id="defined-in-3" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-3" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/features/grids/grid.ts#L212" target="_blank" rel="noopener noreferrer">profectus/src/features/grids/grid.ts:212</a></p><hr><h3 id="id" tabindex="-1">id <a class="header-anchor" href="#id" aria-hidden="true">#</a></h3><p>\u2022 <strong>id</strong>: <code>string</code></p><h4 id="defined-in-4" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-4" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/features/grids/grid.ts#L208" target="_blank" rel="noopener noreferrer">profectus/src/features/grids/grid.ts:208</a></p><hr><h3 id="type" tabindex="-1">type <a class="header-anchor" href="#type" aria-hidden="true">#</a></h3><p>\u2022 <strong>type</strong>: typeof <a href="./../../../modules/features/grids/grid.html#gridtype"><code>GridType</code></a></p><h4 id="defined-in-5" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-5" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/features/grids/grid.ts#L213" target="_blank" rel="noopener noreferrer">profectus/src/features/grids/grid.ts:213</a></p><h2 id="methods" tabindex="-1">Methods <a class="header-anchor" href="#methods" aria-hidden="true">#</a></h2><h3 id="gatherprops" tabindex="-1">[GatherProps] <a class="header-anchor" href="#gatherprops" aria-hidden="true">#</a></h3><p>\u25B8 <strong>[GatherProps]</strong>(): <code>Record</code>&lt;<code>string</code>, <code>unknown</code>&gt;</p><h4 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-hidden="true">#</a></h4><p><code>Record</code>&lt;<code>string</code>, <code>unknown</code>&gt;</p><h4 id="defined-in-6" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-6" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/features/grids/grid.ts#L215" target="_blank" rel="noopener noreferrer">profectus/src/features/grids/grid.ts:215</a></p><hr><h3 id="getid" tabindex="-1">getID <a class="header-anchor" href="#getid" aria-hidden="true">#</a></h3><p>\u25B8 <strong>getID</strong>(<code>id</code>, <code>state</code>): <code>string</code></p><h4 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>id</code></td><td style="text-align:left;"><code>string</code> | <code>number</code></td></tr><tr><td style="text-align:left;"><code>state</code></td><td style="text-align:left;"><a href="./../../../modules/game/persistence.html#state"><code>State</code></a></td></tr></tbody></table><h4 id="returns-1" tabindex="-1">Returns <a class="header-anchor" href="#returns-1" aria-hidden="true">#</a></h4><p><code>string</code></p><h4 id="defined-in-7" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-7" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/features/grids/grid.ts#L209" target="_blank" rel="noopener noreferrer">profectus/src/features/grids/grid.ts:209</a></p><hr><h3 id="getstate" tabindex="-1">getState <a class="header-anchor" href="#getstate" aria-hidden="true">#</a></h3><p>\u25B8 <strong>getState</strong>(<code>id</code>): <a href="./../../../modules/game/persistence.html#state"><code>State</code></a></p><h4 id="parameters-1" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-1" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>id</code></td><td style="text-align:left;"><code>string</code> | <code>number</code></td></tr></tbody></table><h4 id="returns-2" tabindex="-1">Returns <a class="header-anchor" href="#returns-2" aria-hidden="true">#</a></h4><p><a href="./../../../modules/game/persistence.html#state"><code>State</code></a></p><h4 id="defined-in-8" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-8" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/features/grids/grid.ts#L210" target="_blank" rel="noopener noreferrer">profectus/src/features/grids/grid.ts:210</a></p><hr><h3 id="setstate" tabindex="-1">setState <a class="header-anchor" href="#setstate" aria-hidden="true">#</a></h3><p>\u25B8 <strong>setState</strong>(<code>id</code>, <code>state</code>): <code>void</code></p><h4 id="parameters-2" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-2" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>id</code></td><td style="text-align:left;"><code>string</code> | <code>number</code></td></tr><tr><td style="text-align:left;"><code>state</code></td><td style="text-align:left;"><a href="./../../../modules/game/persistence.html#state"><code>State</code></a></td></tr></tbody></table><h4 id="returns-3" tabindex="-1">Returns <a class="header-anchor" href="#returns-3" aria-hidden="true">#</a></h4><p><code>void</code></p><h4 id="defined-in-9" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-9" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/features/grids/grid.ts#L211" target="_blank" rel="noopener noreferrer">profectus/src/features/grids/grid.ts:211</a></p>',72),c=[a];function s(i,n,l,h,u,p){return d(),t("div",null,c)}var m=e(o,[["render",s]]);export{g as __pageData,m as default};