@histoire/shared 0.11.2 → 0.11.4
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/state.d.ts +1 -1
- package/dist/state.js +2 -7
- package/dist/types/config.d.ts +10 -0
- package/dist/types/story.d.ts +1 -0
- package/package.json +1 -1
- package/src/state.ts +2 -6
- package/src/types/config.ts +10 -0
- package/src/types/story.ts +1 -0
package/dist/state.d.ts
CHANGED
package/dist/state.js
CHANGED
|
@@ -22,13 +22,8 @@ export function omit(data, keys) {
|
|
|
22
22
|
}
|
|
23
23
|
return copy;
|
|
24
24
|
}
|
|
25
|
-
export function applyState(target, state
|
|
25
|
+
export function applyState(target, state) {
|
|
26
26
|
for (const key in state) {
|
|
27
|
-
|
|
28
|
-
Object.assign(target[key], state[key]);
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
target[key] = state[key];
|
|
32
|
-
}
|
|
27
|
+
target[key] = state[key];
|
|
33
28
|
}
|
|
34
29
|
}
|
package/dist/types/config.d.ts
CHANGED
|
@@ -119,6 +119,16 @@ export interface HistoireConfig {
|
|
|
119
119
|
* Only loaded in the browser client.
|
|
120
120
|
*/
|
|
121
121
|
browser: string;
|
|
122
|
+
} | {
|
|
123
|
+
/**
|
|
124
|
+
* Only loaded while collecting stories in the node server.
|
|
125
|
+
*/
|
|
126
|
+
server: string;
|
|
127
|
+
} | {
|
|
128
|
+
/**
|
|
129
|
+
* Only loaded in the browser client.
|
|
130
|
+
*/
|
|
131
|
+
browser: string;
|
|
122
132
|
/**
|
|
123
133
|
* Only loaded while collecting stories in the node server.
|
|
124
134
|
*/
|
package/dist/types/story.d.ts
CHANGED
package/package.json
CHANGED
package/src/state.ts
CHANGED
|
@@ -22,12 +22,8 @@ export function omit (data, keys: string[]) {
|
|
|
22
22
|
return copy
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
export function applyState (target: any, state: any
|
|
25
|
+
export function applyState (target: any, state: any) {
|
|
26
26
|
for (const key in state) {
|
|
27
|
-
|
|
28
|
-
Object.assign(target[key], state[key])
|
|
29
|
-
} else {
|
|
30
|
-
target[key] = state[key]
|
|
31
|
-
}
|
|
27
|
+
target[key] = state[key]
|
|
32
28
|
}
|
|
33
29
|
}
|
package/src/types/config.ts
CHANGED
|
@@ -128,6 +128,16 @@ export interface HistoireConfig {
|
|
|
128
128
|
* Only loaded in the browser client.
|
|
129
129
|
*/
|
|
130
130
|
browser: string
|
|
131
|
+
} | {
|
|
132
|
+
/**
|
|
133
|
+
* Only loaded while collecting stories in the node server.
|
|
134
|
+
*/
|
|
135
|
+
server: string
|
|
136
|
+
} | {
|
|
137
|
+
/**
|
|
138
|
+
* Only loaded in the browser client.
|
|
139
|
+
*/
|
|
140
|
+
browser: string
|
|
131
141
|
/**
|
|
132
142
|
* Only loaded while collecting stories in the node server.
|
|
133
143
|
*/
|