@histoire/shared 0.9.6 → 0.10.2

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.
package/dist/types.d.ts CHANGED
@@ -4,6 +4,7 @@ export interface StoryFile {
4
4
  component: any;
5
5
  story: Story;
6
6
  path: string[];
7
+ filePath: string;
7
8
  }
8
9
  export declare type StoryLayout = {
9
10
  type: 'single';
@@ -78,6 +79,10 @@ export interface ServerStoryFile {
78
79
  * Absolute path
79
80
  */
80
81
  path: string;
82
+ /**
83
+ * Relative path
84
+ */
85
+ relativePath: string;
81
86
  /**
82
87
  * File name without extension
83
88
  */
@@ -102,18 +107,33 @@ export interface ServerStoryFile {
102
107
  * Data sent to user tree config functions
103
108
  */
104
109
  treeFile?: ServerTreeFile;
110
+ /**
111
+ * Is virtual module
112
+ */
113
+ virtual?: boolean;
114
+ /**
115
+ * Virtual module code
116
+ */
117
+ moduleCode?: string;
118
+ /**
119
+ * Related markdown docs
120
+ */
121
+ markdownFile?: ServerMarkdownFile;
122
+ }
123
+ export interface ServerMarkdownFile {
124
+ relativePath: string;
125
+ absolutePath: string;
126
+ isRelatedToStory: boolean;
127
+ frontmatter?: any;
128
+ html?: string;
129
+ storyFile?: ServerStoryFile;
105
130
  }
106
131
  export interface ServerStory {
107
132
  id: string;
108
133
  title: string;
109
134
  group?: string;
110
135
  variants: ServerVariant[];
111
- layout?: {
112
- type: 'single';
113
- } | {
114
- type: 'grid';
115
- width?: number | string;
116
- };
136
+ layout?: StoryLayout;
117
137
  icon?: string;
118
138
  iconColor?: string;
119
139
  docsOnly?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@histoire/shared",
3
- "version": "0.9.6",
3
+ "version": "0.10.2",
4
4
  "description": "Shared utilities for Histoire",
5
5
  "license": "MIT",
6
6
  "author": {
package/src/types.ts CHANGED
@@ -4,6 +4,7 @@ export interface StoryFile {
4
4
  component: any
5
5
  story: Story
6
6
  path: string[]
7
+ filePath: string
7
8
  }
8
9
 
9
10
  export type StoryLayout = {
@@ -88,6 +89,10 @@ export interface ServerStoryFile {
88
89
  * Absolute path
89
90
  */
90
91
  path: string
92
+ /**
93
+ * Relative path
94
+ */
95
+ relativePath: string
91
96
  /**
92
97
  * File name without extension
93
98
  */
@@ -112,6 +117,27 @@ export interface ServerStoryFile {
112
117
  * Data sent to user tree config functions
113
118
  */
114
119
  treeFile?: ServerTreeFile
120
+ /**
121
+ * Is virtual module
122
+ */
123
+ virtual?: boolean
124
+ /**
125
+ * Virtual module code
126
+ */
127
+ moduleCode?: string
128
+ /**
129
+ * Related markdown docs
130
+ */
131
+ markdownFile?: ServerMarkdownFile
132
+ }
133
+
134
+ export interface ServerMarkdownFile {
135
+ relativePath: string
136
+ absolutePath: string
137
+ isRelatedToStory: boolean
138
+ frontmatter?: any
139
+ html?: string
140
+ storyFile?: ServerStoryFile
115
141
  }
116
142
 
117
143
  export interface ServerStory {
@@ -119,12 +145,7 @@ export interface ServerStory {
119
145
  title: string
120
146
  group?: string
121
147
  variants: ServerVariant[]
122
- layout?: {
123
- type: 'single'
124
- } | {
125
- type: 'grid'
126
- width?: number | string
127
- }
148
+ layout?: StoryLayout
128
149
  icon?: string
129
150
  iconColor?: string
130
151
  docsOnly?: boolean