@sanity/themer

0.8.10.9.0
dist/index.d.ts
~dist/index.d.tsModified
+66−1
Index: package/dist/index.d.ts
===================================================================
--- package/dist/index.d.ts
+++ package/dist/index.d.ts
@@ -1,8 +1,73 @@
-import { n as SchemeThemeOptions, t as BuildThemeOptions } from "./options-CU-emn_p.js";
 import { ColorHueKey, ColorTintKey } from "@sanity/color";
 import { RootTheme, ThemeColorSchemeKey } from "@sanity/ui/theme";
 /**
+ * The colors of one color scheme, for {@link BuildThemeOptions}. Every color
+ * is a hex color (`#rgb` or `#rrggbb`), and everything is optional: omitted
+ * options fall back to the stock Studio colors, so an empty object reproduces
+ * the stock scheme exactly.
+ *
+ * @public
+ */
+interface SchemeThemeOptions {
+  /**
+   * The accent color — the brand color of the scheme. Replaces the `blue`
+   * scale of the palette, which Sanity UI uses for primary buttons, focus
+   * rings and links.
+   *
+   * The stock accent is `#556bfc` (`blue/500` of `@sanity/color`).
+   */
+  accent?: string;
+  /**
+   * The background of the scheme — every other color of the scheme is
+   * blended onto it. The dark scheme's background replaces `black` in the
+   * palette and the light scheme's replaces `white`.
+   *
+   * It is kept far enough from the text and accent colors to stay usable:
+   * a dark background is made darker until it has enough contrast with them
+   * (it can never be lighter than either), and a light background can never
+   * be darker than either.
+   *
+   * The stock backgrounds are `#0d0e12` (dark) and `#ffffff` (light).
+   */
+  background?: string;
+  /**
+   * How strongly text and borders separate from the accent color, between 15
+   * and 100. The default is 85, which uses the text color as-is. Above 85 the
+   * text scale loses its tint until it is fully neutral at 100 — a high
+   * contrast scheme with no mixing of the text and accent colors. Below 85
+   * more and more of the accent color mixes into the text scale, giving text
+   * and borders more color, until the scale fully adopts the accent hue and
+   * saturation at 15.
+   */
+  contrast?: number;
+  /**
+   * The text color. Replaces the `gray` scale of the palette, which Sanity UI
+   * uses for text, icons, borders and neutral surfaces. When omitted, it is
+   * derived from the accent color: a mostly desaturated version of it, the
+   * way the stock `gray` scale carries a hint of the stock blue.
+   *
+   * The stock text color is `#727892` (`gray/500` of `@sanity/color`).
+   */
+  text?: string;
+}
+/**
+ * Options for {@link buildTheme} and {@link buildPalette}: the colors of the
+ * dark and the light scheme, each with its own accent, text, background and
+ * contrast — so the two schemes can differ in more than their background.
+ * Both schemes are optional, and so is every color: whatever is omitted
+ * falls back to the stock Studio colors, so `buildTheme({})` matches
+ * `buildTheme()` from `@sanity/ui/theme` exactly.
+ *
+ * @public
+ */
+interface BuildThemeOptions {
+  /** The colors of the dark scheme */
+  dark?: SchemeThemeOptions;
+  /** The colors of the light scheme */
+  light?: SchemeThemeOptions;
+}
+/**
  * A color palette generated by {@link buildPalette}: the `palette` config of
  * `buildTheme` from `@sanity/ui/theme`, with every color as a hex string.
  *
  * @public