2 lines
5.1 KiB
JavaScript
2 lines
5.1 KiB
JavaScript
import{_ as t,a,b as h,ag as r}from"./chunks/framework.BcrMLAmg.js";const p=JSON.parse('{"title":"BaseElement","description":"","frontmatter":{},"headers":[],"relativePath":"references/plugins/theme.md","filePath":"references/plugins/theme.md","lastUpdated":1757844696000}'),l={name:"references/plugins/theme.md"};function o(s,e,n,m,i,d){return h(),a("div",null,e[0]||(e[0]=[r('<h1 id="baseelement" tabindex="-1">BaseElement <a class="header-anchor" href="#baseelement" aria-label="Permalink to "BaseElement""></a></h1><p><em>This is the theme plugin. It provides a theming system that allows for consistent styling across elements</em><em>with support for inheritance, named styles, and dynamic theme switching.</em></p><h2 id="functions" tabindex="-1">Functions <a class="header-anchor" href="#functions" aria-label="Permalink to "Functions""></a></h2><table tabindex="0"><thead><tr><th>Method</th><th>Returns</th><th>Description</th></tr></thead><tbody><tr><td><a href="#baseelement-applytheme-self-applytochildren">BaseElement:applyTheme</a></td><td>BaseElement</td><td>Applies theme styles to the element</td></tr><tr><td><a href="#baseelement-gettheme-self">BaseElement:getTheme</a></td><td>table</td><td>Gets theme properties for the element</td></tr></tbody></table><h2 id="baseelement-applytheme-self-applytochildren" tabindex="-1">BaseElement:applyTheme(self, applyToChildren) <a class="header-anchor" href="#baseelement-applytheme-self-applytochildren" aria-label="Permalink to "BaseElement:applyTheme(self, applyToChildren)""></a></h2><p>Applies the current theme to this element</p><h3 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to "Parameters""></a></h3><ul><li><code>self</code> <code>BaseElement</code> The element to apply theme to</li><li><code>applyToChildren</code> <code>boolean</code> ? Whether to apply theme to child elements (default: true)</li></ul><h3 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to "Returns""></a></h3><ul><li><code>BaseElement</code> <code>self</code> The element instance</li></ul><h2 id="baseelement-gettheme-self" tabindex="-1">BaseElement:getTheme(self) <a class="header-anchor" href="#baseelement-gettheme-self" aria-label="Permalink to "BaseElement:getTheme(self)""></a></h2><p>Gets the theme properties for this element</p><h3 id="parameters-1" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-1" aria-label="Permalink to "Parameters""></a></h3><ul><li><code>self</code> <code>BaseElement</code> The element to get theme for</li></ul><h3 id="returns-1" tabindex="-1">Returns <a class="header-anchor" href="#returns-1" aria-label="Permalink to "Returns""></a></h3><ul><li><code>table</code> <code>styles</code> The theme properties</li></ul><h1 id="themeapi" tabindex="-1">ThemeAPI <a class="header-anchor" href="#themeapi" aria-label="Permalink to "ThemeAPI""></a></h1><p><em>The Theme API provides methods for managing themes globally</em></p><h2 id="functions-1" tabindex="-1">Functions <a class="header-anchor" href="#functions-1" aria-label="Permalink to "Functions""></a></h2><table tabindex="0"><thead><tr><th>Method</th><th>Returns</th><th>Description</th></tr></thead><tbody><tr><td><a href="#themeapi-settheme-newtheme">ThemeAPI.setTheme</a></td><td>-</td><td>Sets a new theme</td></tr><tr><td><a href="#themeapi-gettheme">ThemeAPI.getTheme</a></td><td>table</td><td>Gets the current theme</td></tr><tr><td><a href="#themeapi-loadtheme-path">ThemeAPI.loadTheme</a></td><td>-</td><td>Loads theme from JSON file</td></tr></tbody></table><h2 id="themeapi-settheme-newtheme" tabindex="-1">ThemeAPI.setTheme(newTheme) <a class="header-anchor" href="#themeapi-settheme-newtheme" aria-label="Permalink to "ThemeAPI.setTheme(newTheme)""></a></h2><p>Sets the current theme</p><h3 id="parameters-2" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-2" aria-label="Permalink to "Parameters""></a></h3><ul><li><code>newTheme</code> <code>table</code> The theme configuration to set</li></ul><h2 id="themeapi-gettheme" tabindex="-1">ThemeAPI.getTheme() <a class="header-anchor" href="#themeapi-gettheme" aria-label="Permalink to "ThemeAPI.getTheme()""></a></h2><p>Gets the current theme configuration</p><h3 id="returns-2" tabindex="-1">Returns <a class="header-anchor" href="#returns-2" aria-label="Permalink to "Returns""></a></h3><ul><li><code>table</code> <code>theme</code> The current theme configuration</li></ul><h2 id="themeapi-loadtheme-path" tabindex="-1">ThemeAPI.loadTheme(path) <a class="header-anchor" href="#themeapi-loadtheme-path" aria-label="Permalink to "ThemeAPI.loadTheme(path)""></a></h2><p>Loads a theme from a JSON file</p><h3 id="parameters-3" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-3" aria-label="Permalink to "Parameters""></a></h3><ul><li><code>path</code> <code>string</code> Path to the theme JSON file</li></ul>',32)]))}const u=t(l,[["render",o]]);export{p as __pageData,u as default};
|