@gryt/ui 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,15 @@ export type GrytRadiusKey = (typeof GRYT_RADIUS_KEYS)[number];
9
9
  export type GrytHues = Record<GrytHueKey, string>;
10
10
  export type GrytNeutrals = Record<GrytNeutralKey, string>;
11
11
  export interface GrytTheme {
12
+ /**
13
+ * What its author called it, if they called it anything.
14
+ *
15
+ * Metadata rather than a colour: nothing about how a theme looks depends on
16
+ * it, and grytThemeToOptions drops it. It exists because a link full of hex
17
+ * values says nothing about what it is, and the person who made it already
18
+ * knew — so the receiving end should not have to ask.
19
+ */
20
+ name?: string;
12
21
  hue: GrytHues;
13
22
  /** Null when light borrows the hues above, which is the usual case. */
14
23
  lightHue: GrytHues | null;
@@ -16,12 +25,20 @@ export interface GrytTheme {
16
25
  light: GrytNeutrals;
17
26
  radius: Record<GrytRadiusKey, number>;
18
27
  }
28
+ /** Long enough for a name, short enough not to be a payload. */
29
+ export declare const GRYT_THEME_NAME_MAX = 60;
30
+ export declare function normalizeThemeName(value: string): string;
19
31
  /** What the library ships, as a document. */
20
32
  export declare const grytTheme: GrytTheme;
21
33
  export declare function cloneGrytTheme(theme: GrytTheme): GrytTheme;
22
34
  /** Which hues this appearance reads. */
23
35
  export declare function grytThemeHues(theme: GrytTheme, appearance: GrytAppearance): GrytHues;
24
- /** One appearance of a theme, in the shape createGrytTheme takes. */
36
+ /**
37
+ * One appearance of a theme, in the shape createGrytTheme takes.
38
+ *
39
+ * The name does not come along: createGrytTheme returns CSS variables, and a
40
+ * name is not one.
41
+ */
25
42
  export declare function grytThemeToOptions(theme: GrytTheme, appearance: GrytAppearance): GrytThemeOptions;
26
43
  export declare function isHexColor(value: string): boolean;
27
44
  /** #abc to #aabbcc, lower case, so two of the same colour compare equal. */
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/theme/theme.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component library for Gryt, the open-source WebRTC voice chat platform.",
5
5
  "type": "module",
6
6
  "license": "MIT",