skin

package
v0.0.0-...-861cdb6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Skin

type Skin struct {
	// Metadata
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
	Description string `json:"description"`
	Author      string `json:"author,omitempty"`
	Version     string `json:"version,omitempty"`
	IsBuiltIn   bool   `json:"isBuiltIn"`

	// Mantine color arrays (9 shades each)
	Primary []string `json:"primary"` // Main theme color
	Success []string `json:"success"` // Green variants
	Warning []string `json:"warning"` // Yellow variants
	Error   []string `json:"error"`   // Red variants

	// Typography (visually impactful)
	FontFamily     string `json:"fontFamily"`     // Main font family
	FontFamilyMono string `json:"fontFamilyMono"` // Monospace font family

	// Border Radius System (dramatic visual impact)
	DefaultRadius string            `json:"defaultRadius"` // Default border radius (xs, sm, md, lg, xl)
	Radius        map[string]string `json:"radius"`        // Custom radius values

	// Shadow System (depth and elevation)
	Shadows map[string]string `json:"shadows"` // Shadow definitions (xs, sm, md, lg, xl)

	// Gradient System (for accent elements)
	DefaultGradient map[string]interface{} `json:"defaultGradient"` // {from: "color", to: "color", deg: number}

	// Visual Enhancement Options
	AutoContrast bool `json:"autoContrast"` // Automatic text contrast adjustment

	// Font size system (5-tier Mantine mapping)
	TinySize   string `json:"tinySize,omitempty"`   // xs: 0.75rem
	SmallSize  string `json:"smallSize,omitempty"`  // sm: 0.875rem
	MediumSize string `json:"mediumSize,omitempty"` // md: 1rem
	LargeSize  string `json:"largeSize,omitempty"`  // lg: 1.125rem
	HugeSize   string `json:"hugeSize,omitempty"`   // xl: 1.25rem
}

Skin represents a hybrid Mantine-focused visual theme with enhanced visual properties

type SkinManager

type SkinManager struct {
	// contains filtered or unexported fields
}

SkinManager handles loading, saving, and managing skins

func NewSkinManager

func NewSkinManager(configPath string) *SkinManager

NewSkinManager creates a new skin manager with the specified config directory

func (*SkinManager) DeleteCustomSkin

func (sm *SkinManager) DeleteCustomSkin(name string) error

DeleteCustomSkin deletes a user-created skin

func (*SkinManager) GetAllSkins

func (sm *SkinManager) GetAllSkins() map[string]*Skin

GetAllSkins returns all loaded skins

func (*SkinManager) GetAvailableSkins

func (sm *SkinManager) GetAvailableSkins() []SkinMetadata

GetAvailableSkins returns metadata for all available skins

func (*SkinManager) GetSkinByName

func (sm *SkinManager) GetSkinByName(name string) (*Skin, error)

GetSkinByName returns a specific skin by name

func (*SkinManager) ImportSkin

func (sm *SkinManager) ImportSkin(skinData []byte) error

ImportSkin imports a skin from JSON data

func (*SkinManager) Initialize

func (sm *SkinManager) Initialize() error

Initialize sets up the skin directories and loads all skins

func (*SkinManager) LoadAllSkins

func (sm *SkinManager) LoadAllSkins() error

LoadAllSkins loads all skins from built-in and user directories

type SkinManifest

type SkinManifest struct {
	Version     string                       `json:"version"`
	LastUpdated string                       `json:"lastUpdated"`
	Skins       map[string]SkinManifestEntry `json:"skins"`
}

SkinManifest represents the manifest file for embedded skins

type SkinManifestEntry

type SkinManifestEntry struct {
	Hash    string `json:"hash"`
	Version string `json:"version"`
	Size    int    `json:"size"`
}

SkinManifestEntry represents an entry in the skin manifest

type SkinMetadata

type SkinMetadata struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
	Description string `json:"description"`
	Author      string `json:"author,omitempty"`
	Version     string `json:"version,omitempty"`
	IsBuiltIn   bool   `json:"isBuiltIn"`
}

SkinMetadata provides basic information about a skin without full content

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL