@okcontract/sdk
Version:
One-stop-shop permissionless SDK for building any blockchain frontend
28 lines (27 loc) • 1.26 kB
TypeScript
import { type AnyCell, type SheetProxy } from "@okcontract/cells";
import { type EditorNode, type LabelledTypeDefinition } from "@okcontract/fred";
import type { Environment } from "@okcontract/lambdascript";
import type { OKPage } from "./instance";
export type ThemeElementType = "Color" | "Image" | "Gradient";
type SThemeElementType = "color" | "img" | "grad";
type ThemeImage = {
img?: AnyCell<`ipfs://${string}`>;
};
type ThemeGradient = {
col1?: AnyCell<string>;
col2?: AnyCell<string>;
deg?: AnyCell<number>;
};
type ThemeSolidColor = {
col?: AnyCell<string>;
};
export type ThemeProperty = {
allowed: AnyCell<ThemeElementType[]>;
sty: AnyCell<SThemeElementType>;
} & ThemeImage & ThemeGradient & ThemeSolidColor;
export declare const ThemePropertyDefinition: (instance: OKPage) => (node?: EditorNode, env?: Environment) => AnyCell<LabelledTypeDefinition>;
/** all definitions of theme */
export declare const themeDefinitions: (proxy: SheetProxy) => Record<string, LabelledTypeDefinition | AnyCell<() => LabelledTypeDefinition>>;
/** the Theme global map of definitions */
export declare const themeDefinition: (proxy: SheetProxy) => (node?: EditorNode, env?: Environment) => AnyCell<LabelledTypeDefinition>;
export {};