stipe
Import
Section titled “Import”import * as api from "@fungi.computer/stipe";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| type alias | EmbedThemeOptions | Host inputs for the embed and embed-dark themes. Both are optional. |
| type alias | EmbedThemeProperties | Custom properties the embed themes read, keyed by property name. |
| type alias | TerminalPalette | Semantic terminal colors projected from a maintained theme. |
| constant | EMBED_THEME_TOKENS | The embed themes’ default chrome tokens, for surfaces outside Daisy (the
loader’s launcher in a host page’s shadow root). styles.css defines the same
values; a test keeps the two in step. |
| constant | STIPE_GOOEY_FILTER | Frozen Gooey SVG filter constants for Stipe’s visual law. |
| constant | STIPE_SPACING_NAMES | Named spacing scale shared by CSS utilities and class conflict resolution. |
| constant | STIPE_TOKEN_NAMES | Canonical Stipe token names in declaration order. |
| function | readableContentColor() | Black or white, whichever has the higher WCAG contrast on hex. |
| function | embedThemeProperties() | Project host inputs onto the embed themes’ custom properties. The host applies
them (for example with style.setProperty) beside data-theme="embed" or
data-theme="embed-dark". |
| function | terminalPalette() | Return the maintained terminal palette for an exact theme name. |
EmbedThemeOptionstype alias
Section titled “EmbedThemeOptions”type EmbedThemeOptions = Readonly<{ accent?: string; fontFamily?: string;}>;Host inputs for the embed and embed-dark themes. Both are optional.
EmbedThemePropertiestype alias
Section titled “EmbedThemeProperties”type EmbedThemeProperties = Readonly<Record<string, string>>;Custom properties the embed themes read, keyed by property name.
TerminalPalettetype alias
Section titled “TerminalPalette”type TerminalPalette = object;Semantic terminal colors projected from a maintained theme.
Properties
Section titled “Properties”background
Section titled “background”readonly background: string;foreground
Section titled “foreground”readonly foreground: string;cursor
Section titled “cursor”readonly cursor: string;cursorAccent
Section titled “cursorAccent”readonly cursorAccent: string;selectionBackground
Section titled “selectionBackground”readonly selectionBackground: string;surface
Section titled “surface”readonly surface: string;primary
Section titled “primary”readonly primary: string;accent
Section titled “accent”readonly accent: string;success
Section titled “success”readonly success: string;readonly info: string;warning
Section titled “warning”readonly warning: string;readonly error: string;readonly black: string;readonly red: string;readonly green: string;yellow
Section titled “yellow”readonly yellow: string;readonly blue: string;magenta
Section titled “magenta”readonly magenta: string;readonly cyan: string;readonly white: string;brightBlack
Section titled “brightBlack”readonly brightBlack: string;brightRed
Section titled “brightRed”readonly brightRed: string;brightGreen
Section titled “brightGreen”readonly brightGreen: string;brightYellow
Section titled “brightYellow”readonly brightYellow: string;brightBlue
Section titled “brightBlue”readonly brightBlue: string;brightMagenta
Section titled “brightMagenta”readonly brightMagenta: string;brightCyan
Section titled “brightCyan”readonly brightCyan: string;brightWhite
Section titled “brightWhite”readonly brightWhite: string;selectionForeground
Section titled “selectionForeground”readonly selectionForeground: string;EMBED_THEME_TOKENSconstant
Section titled “EMBED_THEME_TOKENS”const EMBED_THEME_TOKENS: object;The embed themes’ default chrome tokens, for surfaces outside Daisy (the
loader’s launcher in a host page’s shadow root). styles.css defines the same
values; a test keeps the two in step.
Type Declaration
Section titled “Type Declaration”STIPE_GOOEY_FILTERconstant
Section titled “STIPE_GOOEY_FILTER”const STIPE_GOOEY_FILTER: Readonly<{ alphaIntercept: -9; alphaSlope: 19; blurStdDeviation: 1.5;}>;Frozen Gooey SVG filter constants for Stipe’s visual law.
STIPE_SPACING_NAMESconstant
Section titled “STIPE_SPACING_NAMES”const STIPE_SPACING_NAMES: readonly [ "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "4xl",];Named spacing scale shared by CSS utilities and class conflict resolution.
STIPE_TOKEN_NAMESconstant
Section titled “STIPE_TOKEN_NAMES”const STIPE_TOKEN_NAMES: readonly [ "--stipe-font-synthesis", "--stipe-surface-frame-width", "--stipe-surface-frame-image", "--stipe-surface-molding-contrast", "--stipe-shadow-raised", "--stipe-shadow-inset", "--stipe-shadow-edge", "--stipe-display-gasket-face", "--stipe-display-texture-image", "--stipe-display-text-shadow", "--stipe-canvas", "--stipe-surface", "--stipe-surface-raised", "--stipe-surface-selected", "--stipe-fg-muted", "--stipe-linework", "--stipe-hairline", "--stipe-figure-ink", "--stipe-density-compact", "--stipe-density-comfortable", "--stipe-motion-spring", "--stipe-motion-squish", "--stipe-motion-fast", "--stipe-motion-normal", "--stipe-motion-slow", "--stipe-motion-ease", "--stipe-motion-ease-exit", "--stipe-motion-bounce", "--stipe-motion-spring-duration", "--stipe-motion-stretch", "--stipe-motion-distance", "--stipe-motion-stagger", "--stipe-motion-blur", "--stipe-motion-shake", "--stipe-motion-steps", "--stipe-motion-fuse", "--stipe-press-depth", "--stipe-press-scale", "--stipe-layer-desktop", "--stipe-layer-windows", "--stipe-layer-chrome", "--stipe-layer-popover", "--stipe-layer-dialog", "--stipe-layer-toast", "--stipe-layer-tooltip", "--stipe-overlay-shadow-outset", "--stipe-icon-size-sm", "--stipe-icon-size-md", "--stipe-icon-size-lg", "--stipe-icon-stroke", "--stipe-card-rim", "--stipe-card-rim-edge", "--stipe-card-face", "--stipe-card-panel", "--stipe-card-ink", "--stipe-card-ink-muted", "--stipe-card-accent", "--stipe-card-shadow", "--stipe-card-foil-highlight", "--stipe-card-foil-warm", "--stipe-card-foil-cool", "--stipe-avatar-shadow", "--stipe-art-coral", "--stipe-art-blue", "--stipe-art-mint", "--stipe-art-grape", "--stipe-art-yellow", "--stipe-art-cream", "--stipe-art-ink", "--stipe-art-inkcap", "--stipe-art-graphite", "--stipe-sketch-ink",];Canonical Stipe token names in declaration order.
readableContentColor()function
Section titled “readableContentColor()”function readableContentColor(hex): "#ffffff" | "#000000";Black or white, whichever has the higher WCAG contrast on hex.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
hex |
string |
Returns
Section titled “Returns”"#ffffff" | "#000000"
embedThemeProperties()function
Section titled “embedThemeProperties()”function embedThemeProperties(options): EmbedThemeProperties;Project host inputs onto the embed themes’ custom properties. The host applies
them (for example with style.setProperty) beside data-theme="embed" or
data-theme="embed-dark".
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
EmbedThemeOptions |
Returns
Section titled “Returns”terminalPalette()function
Section titled “terminalPalette()”function terminalPalette(theme): TerminalPalette | undefined;Return the maintained terminal palette for an exact theme name.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
theme |
string |
Returns
Section titled “Returns”TerminalPalette | undefined
References
Section titled “References”pierreTreesStyle
Section titled “pierreTreesStyle”Re-exports pierreTreesStyle
PierreTreesStyleOptions
Section titled “PierreTreesStyleOptions”Re-exports PierreTreesStyleOptions
STIPE_THEMES
Section titled “STIPE_THEMES”Re-exports STIPE_THEMES
stipeThemeSchema
Section titled “stipeThemeSchema”Re-exports stipeThemeSchema
applyTheme
Section titled “applyTheme”Re-exports applyTheme
getTheme
Section titled “getTheme”Re-exports getTheme
subscribeTheme
Section titled “subscribeTheme”Re-exports subscribeTheme
StipeTheme
Section titled “StipeTheme”Re-exports StipeTheme
ThemeListener
Section titled “ThemeListener”Re-exports ThemeListener