histoire 0.4.6 → 0.5.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.
- package/dist/bundled/HomeView.js +1 -0
- package/dist/bundled/MobileOverlay.js +3 -1
- package/dist/bundled/SandboxVue3.js +649 -0
- package/dist/bundled/SearchPane.js +2 -0
- package/dist/bundled/StoryView.js +307 -618
- package/dist/bundled/global-components.js +5 -5
- package/dist/bundled/index2.js +111 -43
- package/dist/bundled/sandbox.js +2 -2
- package/dist/bundled/state.js +16 -83
- package/dist/client/app/App.vue +18 -0
- package/dist/client/app/codegen/serialize-js.js +1 -1
- package/dist/client/app/codegen/vue3.d.ts +2 -0
- package/dist/client/app/codegen/vue3.js +37 -12
- package/dist/client/app/components/app/InitialLoading.vue +46 -0
- package/dist/client/app/components/app/MobileOverlay.vue +1 -1
- package/dist/client/app/components/exposed/Story.vue +2 -1
- package/dist/client/app/components/exposed/Variant.vue +4 -4
- package/dist/client/app/components/panel/ControlsComponentPropItem.vue +96 -0
- package/dist/client/app/components/panel/ControlsComponentProps.vue +33 -0
- package/dist/client/app/components/panel/StatePresets.vue +8 -6
- package/dist/client/app/components/panel/StoryControls.vue +18 -3
- package/dist/client/app/components/sandbox/SandboxVue3.vue +70 -2
- package/dist/client/app/style/transitions.pcss +12 -0
- package/dist/client/app/types.d.ts +11 -0
- package/dist/client/app/util/state.d.ts +1 -0
- package/dist/client/app/util/state.js +11 -2
- package/dist/node/build.js +1 -3
- package/dist/node/collect/index.js +6 -0
- package/dist/node/config.d.ts +23 -23
- package/dist/node/plugin.d.ts +2 -2
- package/dist/node/server.js +16 -5
- package/dist/style.css +92 -13
- package/package.json +2 -2
- package/src/client/app/App.vue +18 -0
- package/src/client/app/codegen/serialize-js.ts +1 -1
- package/src/client/app/codegen/vue3.ts +40 -12
- package/src/client/app/components/app/InitialLoading.vue +46 -0
- package/src/client/app/components/app/MobileOverlay.vue +1 -1
- package/src/client/app/components/exposed/Story.vue +2 -1
- package/src/client/app/components/exposed/Variant.vue +4 -4
- package/src/client/app/components/panel/ControlsComponentPropItem.vue +96 -0
- package/src/client/app/components/panel/ControlsComponentProps.vue +33 -0
- package/src/client/app/components/panel/StatePresets.vue +8 -6
- package/src/client/app/components/panel/StoryControls.vue +18 -3
- package/src/client/app/components/sandbox/SandboxVue3.vue +70 -2
- package/src/client/app/style/transitions.pcss +12 -0
- package/src/client/app/types.ts +13 -0
- package/src/client/app/util/state.ts +12 -2
- package/src/node/build.ts +1 -3
- package/src/node/collect/index.ts +7 -0
- package/src/node/server.ts +20 -5
- package/dist/bundled/dark.js +0 -4
package/src/node/server.ts
CHANGED
|
@@ -110,15 +110,30 @@ export async function createServer (ctx: Context, port: number) {
|
|
|
110
110
|
await executeStoryFile(changedFile)
|
|
111
111
|
|
|
112
112
|
// Queued updates
|
|
113
|
-
|
|
114
|
-
await executeStoryFile(storyFile)
|
|
115
|
-
}
|
|
113
|
+
await Promise.all(queuedFiles.map(storyFile => executeStoryFile(storyFile)))
|
|
116
114
|
} else {
|
|
117
115
|
// Full update
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
|
|
117
|
+
// Progress tracking
|
|
118
|
+
const fileCount = ctx.storyFiles.length
|
|
119
|
+
let loadedFilesCount = 0
|
|
120
|
+
const sendProgress = () => {
|
|
121
|
+
server.ws.send('histoire:stories-loading-progress', {
|
|
122
|
+
loadedFileCount: loadedFilesCount,
|
|
123
|
+
totalFileCount: fileCount,
|
|
124
|
+
})
|
|
120
125
|
}
|
|
126
|
+
|
|
127
|
+
sendProgress()
|
|
128
|
+
|
|
129
|
+
await Promise.all(ctx.storyFiles.map(async storyFile => {
|
|
130
|
+
await executeStoryFile(storyFile)
|
|
131
|
+
loadedFilesCount++
|
|
132
|
+
sendProgress()
|
|
133
|
+
}))
|
|
134
|
+
|
|
121
135
|
didAllStoriesYet = true
|
|
136
|
+
server.ws.send('histoire:all-stories-loaded', {})
|
|
122
137
|
}
|
|
123
138
|
console.log('Collect stories end', Date.now() - time, 'ms')
|
|
124
139
|
|
package/dist/bundled/dark.js
DELETED