import { Gib } from "@ibgib/ts-gib/dist/types.mjs"; import { GibInfo } from "@ibgib/ts-gib/dist/V1/types.mjs"; import { MetaspaceService } from "@ibgib/core-gib/dist/witness/space/metaspace/metaspace-types.mjs"; /** * deterministically driven colors based on a given {@link gib} */ export interface GibColorInfo { /** * Gib that was used to drive the color calculation */ gib: Gib; gibInfo: GibInfo; /** * Color that corresponds to the punctiliar part of {@link gib} */ punctiliarColor: string; /** * Translucent version of {@link punctiliarColor} */ punctiliarColorTranslucent: string; /** * contrasting color against punctiliar color */ punctiliarColorContrast: string; /** * Color that corresponds to the tjp (timeline) part of {@link gib} */ tjpColor?: string; /** * Translucent version of {@link tjpColor} */ tjpColorTranslucent?: string; /** * contrasting color against tjp color */ tjpColorContrast?: string; /** * If there was an error deriving the color info, this will show the error * message. */ errorMsg?: string; } /** * hack. ibgib apps need to have access to global state that really should be * tied to them alone (if we even should have global state in the first place). * * Most importantly, we need a metaspace, db name, and a store name. * * I'm just shoving it here because life is life. * * ## how to use * * Going to shove this in globalThis.ibgib, but other web apps may want to just * descend from this and store it in their own places, e.g., * `globalThis.ibgib.myApp` */ export interface IbGibGlobalThisInfo { /** * @see {@link IbGibGlobalThisInfo} */ metaspace?: MetaspaceService; /** * @see {@link IbGibGlobalThisInfo} */ dbName_hack: string; /** * @see {@link IbGibGlobalThisInfo} */ storeName_hack: string; /** * @see {@link IbGibGlobalThisInfo} */ apiKeyName_hack: string; }