@histoire/shared 0.11.5 → 0.11.7

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.
@@ -18,6 +18,7 @@ export interface ResponsivePreset {
18
18
  export interface BackgroundPreset {
19
19
  label: string;
20
20
  color: string;
21
+ contrastColor?: string;
21
22
  }
22
23
  export interface TreeGroupConfig {
23
24
  title: string;
@@ -146,6 +147,10 @@ export interface HistoireConfig {
146
147
  * Background color of the story preview.
147
148
  */
148
149
  backgroundPresets?: BackgroundPreset[];
150
+ /**
151
+ * Automatically apply the current background preset's contrast color to the story preview text.
152
+ */
153
+ autoApplyContrastColor?: boolean;
149
154
  /**
150
155
  * Class added to the html root of the story preview when dark mode is enabled.
151
156
  */
@@ -47,6 +47,7 @@ export interface Story {
47
47
  file?: StoryFile;
48
48
  lastSelectedVariant?: Variant;
49
49
  slots?: () => any;
50
+ meta?: any;
50
51
  }
51
52
  export interface Variant {
52
53
  id: string;
@@ -65,6 +66,7 @@ export interface Variant {
65
66
  autoPropsDisabled?: boolean;
66
67
  configReady?: boolean;
67
68
  previewReady?: boolean;
69
+ meta?: any;
68
70
  }
69
71
  export interface PropDefinition {
70
72
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@histoire/shared",
3
- "version": "0.11.5",
3
+ "version": "0.11.7",
4
4
  "description": "Shared utilities for Histoire",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -25,6 +25,7 @@ export interface ResponsivePreset {
25
25
  export interface BackgroundPreset {
26
26
  label: string
27
27
  color: string
28
+ contrastColor?: string
28
29
  }
29
30
 
30
31
  export interface TreeGroupConfig {
@@ -155,6 +156,10 @@ export interface HistoireConfig {
155
156
  * Background color of the story preview.
156
157
  */
157
158
  backgroundPresets?: BackgroundPreset[]
159
+ /**
160
+ * Automatically apply the current background preset's contrast color to the story preview text.
161
+ */
162
+ autoApplyContrastColor?: boolean
158
163
  /**
159
164
  * Class added to the html root of the story preview when dark mode is enabled.
160
165
  */
@@ -52,6 +52,7 @@ export interface Story {
52
52
  file?: StoryFile
53
53
  lastSelectedVariant?: Variant
54
54
  slots?: () => any
55
+ meta?: any
55
56
  }
56
57
 
57
58
  export interface Variant {
@@ -67,6 +68,7 @@ export interface Variant {
67
68
  autoPropsDisabled?: boolean
68
69
  configReady?: boolean
69
70
  previewReady?: boolean
71
+ meta?: any
70
72
  }
71
73
 
72
74
  export interface PropDefinition {