histoire 0.2.2 → 0.2.3
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/client/app/App.vue +1 -1
- package/dist/client/app/codegen/vue3.js +11 -2
- package/dist/client/app/codegen/vue3.ts +9 -1
- package/dist/client/app/components/exposed/Story.vue +5 -0
- package/dist/client/app/components/exposed/Variant.vue +7 -0
- package/dist/client/app/components/story/StoryResponsivePreview.vue +72 -77
- package/dist/client/app/components/story/StorySidePanel.vue +1 -1
- package/dist/client/app/components/story/StorySourceCode.vue +3 -17
- package/dist/client/app/components/story/StoryVariantGridItem.vue +3 -3
- package/dist/client/app/components/story/StoryVariantSingleView.vue +10 -11
- package/dist/client/app/components/story/StoryViewer.vue +2 -0
- package/{src/client/app/components/story/variant → dist/client/app/components/story/toolbar}/StoryVariantBackground.vue +4 -4
- package/{src/client/app/components/story/variant → dist/client/app/components/story/toolbar}/StoryVariantNewTab.vue +2 -2
- package/{src/client/app/components/story/variant → dist/client/app/components/story/toolbar}/StoryVariantResponsiveSize.vue +5 -5
- package/dist/client/app/components/story/{variant → toolbar}/StoryVariantTitle.vue +0 -0
- package/dist/client/app/global-components.js +0 -1
- package/dist/client/app/index.js +0 -1
- package/dist/client/app/sandbox.js +0 -1
- package/dist/client/app/stores/preview-settings.d.ts +8 -0
- package/dist/client/app/stores/preview-settings.js +14 -0
- package/dist/client/app/stores/preview-settings.ts +17 -0
- package/dist/client/app/stores/story.d.ts +45 -15
- package/dist/client/app/stores/story.js +0 -1
- package/dist/client/app/types.d.ts +10 -1
- package/dist/client/app/types.ts +11 -1
- package/dist/client/app/util/keyboard.js +0 -1
- package/dist/client/app/util/mapping.js +10 -10
- package/dist/client/app/util/mapping.ts +10 -5
- package/dist/client/app/util/preview-settings.d.ts +1 -8
- package/dist/client/app/util/preview-settings.js +0 -11
- package/dist/client/app/util/preview-settings.ts +1 -19
- package/dist/client/app/util/reactivity.js +0 -1
- package/dist/client/app/util/scroll.js +0 -1
- package/dist/client/app/util/variant.js +0 -1
- package/dist/client/index.js +0 -1
- package/dist/client/server/index.js +0 -1
- package/dist/controls.js +0 -1
- package/dist/node/plugin.js +14 -6
- package/dist/style.css +58 -4
- package/package.json +19 -19
- package/src/client/app/App.vue +1 -1
- package/src/client/app/codegen/vue3.ts +9 -1
- package/src/client/app/components/exposed/Story.vue +5 -0
- package/src/client/app/components/exposed/Variant.vue +7 -0
- package/src/client/app/components/story/StoryResponsivePreview.vue +72 -77
- package/src/client/app/components/story/StorySidePanel.vue +1 -1
- package/src/client/app/components/story/StorySourceCode.vue +3 -17
- package/src/client/app/components/story/StoryVariantGridItem.vue +3 -3
- package/src/client/app/components/story/StoryVariantSingleView.vue +10 -11
- package/src/client/app/components/story/StoryViewer.vue +2 -0
- package/{dist/client/app/components/story/variant → src/client/app/components/story/toolbar}/StoryVariantBackground.vue +4 -4
- package/{dist/client/app/components/story/variant → src/client/app/components/story/toolbar}/StoryVariantNewTab.vue +2 -2
- package/{dist/client/app/components/story/variant → src/client/app/components/story/toolbar}/StoryVariantResponsiveSize.vue +5 -5
- package/src/client/app/components/story/{variant → toolbar}/StoryVariantTitle.vue +0 -0
- package/src/client/app/stores/preview-settings.ts +17 -0
- package/src/client/app/types.ts +11 -1
- package/src/client/app/util/mapping.ts +10 -5
- package/src/client/app/util/preview-settings.ts +1 -19
- package/src/node/plugin.ts +15 -6
- package/dist/client/app/codegen/vue3.js.map +0 -1
- package/dist/client/app/global-components.js.map +0 -1
- package/dist/client/app/index.js.map +0 -1
- package/dist/client/app/sandbox.js.map +0 -1
- package/dist/client/app/stores/story.js.map +0 -1
- package/dist/client/app/util/keyboard.js.map +0 -1
- package/dist/client/app/util/mapping.js.map +0 -1
- package/dist/client/app/util/preview-settings.js.map +0 -1
- package/dist/client/app/util/reactivity.js.map +0 -1
- package/dist/client/app/util/scroll.js.map +0 -1
- package/dist/client/app/util/variant.js.map +0 -1
- package/dist/client/index.js.map +0 -1
- package/dist/client/server/index.js.map +0 -1
- package/dist/controls.js.map +0 -1
|
@@ -12,7 +12,9 @@ export declare const useStoryStore: import("pinia").StoreDefinition<"story", imp
|
|
|
12
12
|
slots?: () => Readonly<any>;
|
|
13
13
|
state?: any;
|
|
14
14
|
source?: string;
|
|
15
|
-
|
|
15
|
+
responsiveDisabled?: boolean;
|
|
16
|
+
configReady?: boolean;
|
|
17
|
+
previewReady?: boolean;
|
|
16
18
|
}[];
|
|
17
19
|
layout?: {
|
|
18
20
|
type: "single";
|
|
@@ -38,7 +40,9 @@ export declare const useStoryStore: import("pinia").StoreDefinition<"story", imp
|
|
|
38
40
|
slots?: () => Readonly<any>;
|
|
39
41
|
state?: any;
|
|
40
42
|
source?: string;
|
|
41
|
-
|
|
43
|
+
responsiveDisabled?: boolean;
|
|
44
|
+
configReady?: boolean;
|
|
45
|
+
previewReady?: boolean;
|
|
42
46
|
};
|
|
43
47
|
}[]>;
|
|
44
48
|
setStories: (value: Story[]) => void;
|
|
@@ -54,7 +58,9 @@ export declare const useStoryStore: import("pinia").StoreDefinition<"story", imp
|
|
|
54
58
|
slots?: () => Readonly<any>;
|
|
55
59
|
state?: any;
|
|
56
60
|
source?: string;
|
|
57
|
-
|
|
61
|
+
responsiveDisabled?: boolean;
|
|
62
|
+
configReady?: boolean;
|
|
63
|
+
previewReady?: boolean;
|
|
58
64
|
}[];
|
|
59
65
|
layout?: {
|
|
60
66
|
type: "single";
|
|
@@ -80,7 +86,9 @@ export declare const useStoryStore: import("pinia").StoreDefinition<"story", imp
|
|
|
80
86
|
slots?: () => Readonly<any>;
|
|
81
87
|
state?: any;
|
|
82
88
|
source?: string;
|
|
83
|
-
|
|
89
|
+
responsiveDisabled?: boolean;
|
|
90
|
+
configReady?: boolean;
|
|
91
|
+
previewReady?: boolean;
|
|
84
92
|
};
|
|
85
93
|
}>;
|
|
86
94
|
currentVariant: import("vue").ComputedRef<{
|
|
@@ -92,7 +100,9 @@ export declare const useStoryStore: import("pinia").StoreDefinition<"story", imp
|
|
|
92
100
|
slots?: () => Readonly<any>;
|
|
93
101
|
state?: any;
|
|
94
102
|
source?: string;
|
|
95
|
-
|
|
103
|
+
responsiveDisabled?: boolean;
|
|
104
|
+
configReady?: boolean;
|
|
105
|
+
previewReady?: boolean;
|
|
96
106
|
}>;
|
|
97
107
|
isFolderOpened: (path: Array<string>) => boolean;
|
|
98
108
|
toggleFolder: (path: Array<string>, force?: boolean) => void;
|
|
@@ -109,7 +119,9 @@ export declare const useStoryStore: import("pinia").StoreDefinition<"story", imp
|
|
|
109
119
|
slots?: () => Readonly<any>;
|
|
110
120
|
state?: any;
|
|
111
121
|
source?: string;
|
|
112
|
-
|
|
122
|
+
responsiveDisabled?: boolean;
|
|
123
|
+
configReady?: boolean;
|
|
124
|
+
previewReady?: boolean;
|
|
113
125
|
}[];
|
|
114
126
|
layout?: {
|
|
115
127
|
type: "single";
|
|
@@ -135,7 +147,9 @@ export declare const useStoryStore: import("pinia").StoreDefinition<"story", imp
|
|
|
135
147
|
slots?: () => Readonly<any>;
|
|
136
148
|
state?: any;
|
|
137
149
|
source?: string;
|
|
138
|
-
|
|
150
|
+
responsiveDisabled?: boolean;
|
|
151
|
+
configReady?: boolean;
|
|
152
|
+
previewReady?: boolean;
|
|
139
153
|
};
|
|
140
154
|
}[]>;
|
|
141
155
|
setStories: (value: Story[]) => void;
|
|
@@ -151,7 +165,9 @@ export declare const useStoryStore: import("pinia").StoreDefinition<"story", imp
|
|
|
151
165
|
slots?: () => Readonly<any>;
|
|
152
166
|
state?: any;
|
|
153
167
|
source?: string;
|
|
154
|
-
|
|
168
|
+
responsiveDisabled?: boolean;
|
|
169
|
+
configReady?: boolean;
|
|
170
|
+
previewReady?: boolean;
|
|
155
171
|
}[];
|
|
156
172
|
layout?: {
|
|
157
173
|
type: "single";
|
|
@@ -177,7 +193,9 @@ export declare const useStoryStore: import("pinia").StoreDefinition<"story", imp
|
|
|
177
193
|
slots?: () => Readonly<any>;
|
|
178
194
|
state?: any;
|
|
179
195
|
source?: string;
|
|
180
|
-
|
|
196
|
+
responsiveDisabled?: boolean;
|
|
197
|
+
configReady?: boolean;
|
|
198
|
+
previewReady?: boolean;
|
|
181
199
|
};
|
|
182
200
|
}>;
|
|
183
201
|
currentVariant: import("vue").ComputedRef<{
|
|
@@ -189,7 +207,9 @@ export declare const useStoryStore: import("pinia").StoreDefinition<"story", imp
|
|
|
189
207
|
slots?: () => Readonly<any>;
|
|
190
208
|
state?: any;
|
|
191
209
|
source?: string;
|
|
192
|
-
|
|
210
|
+
responsiveDisabled?: boolean;
|
|
211
|
+
configReady?: boolean;
|
|
212
|
+
previewReady?: boolean;
|
|
193
213
|
}>;
|
|
194
214
|
isFolderOpened: (path: Array<string>) => boolean;
|
|
195
215
|
toggleFolder: (path: Array<string>, force?: boolean) => void;
|
|
@@ -206,7 +226,9 @@ export declare const useStoryStore: import("pinia").StoreDefinition<"story", imp
|
|
|
206
226
|
slots?: () => Readonly<any>;
|
|
207
227
|
state?: any;
|
|
208
228
|
source?: string;
|
|
209
|
-
|
|
229
|
+
responsiveDisabled?: boolean;
|
|
230
|
+
configReady?: boolean;
|
|
231
|
+
previewReady?: boolean;
|
|
210
232
|
}[];
|
|
211
233
|
layout?: {
|
|
212
234
|
type: "single";
|
|
@@ -232,7 +254,9 @@ export declare const useStoryStore: import("pinia").StoreDefinition<"story", imp
|
|
|
232
254
|
slots?: () => Readonly<any>;
|
|
233
255
|
state?: any;
|
|
234
256
|
source?: string;
|
|
235
|
-
|
|
257
|
+
responsiveDisabled?: boolean;
|
|
258
|
+
configReady?: boolean;
|
|
259
|
+
previewReady?: boolean;
|
|
236
260
|
};
|
|
237
261
|
}[]>;
|
|
238
262
|
setStories: (value: Story[]) => void;
|
|
@@ -248,7 +272,9 @@ export declare const useStoryStore: import("pinia").StoreDefinition<"story", imp
|
|
|
248
272
|
slots?: () => Readonly<any>;
|
|
249
273
|
state?: any;
|
|
250
274
|
source?: string;
|
|
251
|
-
|
|
275
|
+
responsiveDisabled?: boolean;
|
|
276
|
+
configReady?: boolean;
|
|
277
|
+
previewReady?: boolean;
|
|
252
278
|
}[];
|
|
253
279
|
layout?: {
|
|
254
280
|
type: "single";
|
|
@@ -274,7 +300,9 @@ export declare const useStoryStore: import("pinia").StoreDefinition<"story", imp
|
|
|
274
300
|
slots?: () => Readonly<any>;
|
|
275
301
|
state?: any;
|
|
276
302
|
source?: string;
|
|
277
|
-
|
|
303
|
+
responsiveDisabled?: boolean;
|
|
304
|
+
configReady?: boolean;
|
|
305
|
+
previewReady?: boolean;
|
|
278
306
|
};
|
|
279
307
|
}>;
|
|
280
308
|
currentVariant: import("vue").ComputedRef<{
|
|
@@ -286,7 +314,9 @@ export declare const useStoryStore: import("pinia").StoreDefinition<"story", imp
|
|
|
286
314
|
slots?: () => Readonly<any>;
|
|
287
315
|
state?: any;
|
|
288
316
|
source?: string;
|
|
289
|
-
|
|
317
|
+
responsiveDisabled?: boolean;
|
|
318
|
+
configReady?: boolean;
|
|
319
|
+
previewReady?: boolean;
|
|
290
320
|
}>;
|
|
291
321
|
isFolderOpened: (path: Array<string>) => boolean;
|
|
292
322
|
toggleFolder: (path: Array<string>, force?: boolean) => void;
|
|
@@ -30,7 +30,9 @@ export interface Variant {
|
|
|
30
30
|
slots?: () => Readonly<any>;
|
|
31
31
|
state?: any;
|
|
32
32
|
source?: string;
|
|
33
|
-
|
|
33
|
+
responsiveDisabled?: boolean;
|
|
34
|
+
configReady?: boolean;
|
|
35
|
+
previewReady?: boolean;
|
|
34
36
|
}
|
|
35
37
|
export declare type TreeLeaf = {
|
|
36
38
|
title: string;
|
|
@@ -51,3 +53,10 @@ export interface SearchResult {
|
|
|
51
53
|
icon?: string;
|
|
52
54
|
iconColor?: string;
|
|
53
55
|
}
|
|
56
|
+
export interface PreviewSettings {
|
|
57
|
+
responsiveWidth: number;
|
|
58
|
+
responsiveHeight: number;
|
|
59
|
+
rotate: boolean;
|
|
60
|
+
backgroundColor: string;
|
|
61
|
+
checkerboard: boolean;
|
|
62
|
+
}
|
package/dist/client/app/types.ts
CHANGED
|
@@ -33,7 +33,9 @@ export interface Variant {
|
|
|
33
33
|
slots?: () => Readonly<any>
|
|
34
34
|
state?: any
|
|
35
35
|
source?: string
|
|
36
|
-
|
|
36
|
+
responsiveDisabled?: boolean
|
|
37
|
+
configReady?: boolean
|
|
38
|
+
previewReady?: boolean
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
export type TreeLeaf = {
|
|
@@ -58,3 +60,11 @@ export interface SearchResult {
|
|
|
58
60
|
icon?: string
|
|
59
61
|
iconColor?: string
|
|
60
62
|
}
|
|
63
|
+
|
|
64
|
+
export interface PreviewSettings {
|
|
65
|
+
responsiveWidth: number
|
|
66
|
+
responsiveHeight: number
|
|
67
|
+
rotate: boolean
|
|
68
|
+
backgroundColor: string
|
|
69
|
+
checkerboard: boolean
|
|
70
|
+
}
|
|
@@ -15,14 +15,15 @@ export function mapFile(file, existingFile) {
|
|
|
15
15
|
const variant = result.story.variants[index];
|
|
16
16
|
const existingVariant = existingFile.story.variants[index];
|
|
17
17
|
if (existingVariant) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
for (const key in existingVariant) {
|
|
19
|
+
if (typeof existingVariant[key] !== 'undefined') {
|
|
20
|
+
if (key === 'state') {
|
|
21
|
+
Object.assign(variant.state, existingVariant.state);
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
variant[key] = existingVariant[key];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
if (existingFile.story.lastSelectedVariant) {
|
|
@@ -37,7 +38,6 @@ export function mapVariant(variant) {
|
|
|
37
38
|
state: {},
|
|
38
39
|
initState: null,
|
|
39
40
|
slots: () => ({}),
|
|
40
|
-
|
|
41
|
+
previewReady: false,
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
|
-
//# sourceMappingURL=mapping.js.map
|
|
@@ -18,10 +18,15 @@ export function mapFile (file: StoryFile, existingFile?: StoryFile): StoryFile {
|
|
|
18
18
|
const variant = result.story.variants[index]
|
|
19
19
|
const existingVariant = existingFile.story.variants[index]
|
|
20
20
|
if (existingVariant) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
for (const key in existingVariant) {
|
|
22
|
+
if (typeof existingVariant[key] !== 'undefined') {
|
|
23
|
+
if (key === 'state') {
|
|
24
|
+
Object.assign(variant.state, existingVariant.state)
|
|
25
|
+
continue
|
|
26
|
+
}
|
|
27
|
+
variant[key] = existingVariant[key]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
25
30
|
}
|
|
26
31
|
}
|
|
27
32
|
if (existingFile.story.lastSelectedVariant) {
|
|
@@ -38,6 +43,6 @@ export function mapVariant (variant: Variant): Variant {
|
|
|
38
43
|
state: {},
|
|
39
44
|
initState: null,
|
|
40
45
|
slots: () => ({}),
|
|
41
|
-
|
|
46
|
+
previewReady: false,
|
|
42
47
|
}
|
|
43
48
|
}
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
responsiveWidth: number;
|
|
3
|
-
responsiveHeight: number;
|
|
4
|
-
rotate: boolean;
|
|
5
|
-
backgroundColor: string;
|
|
6
|
-
checkerboard: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare function usePreviewSettings(): import("@vueuse/shared").RemovableRef<PreviewSettings>;
|
|
1
|
+
import type { PreviewSettings } from '../types';
|
|
9
2
|
export declare const receivedSettings: {
|
|
10
3
|
responsiveWidth: number;
|
|
11
4
|
responsiveHeight: number;
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
import { useStorage } from '@vueuse/core';
|
|
2
1
|
import { reactive } from 'vue';
|
|
3
|
-
export function usePreviewSettings() {
|
|
4
|
-
return useStorage('_histoire-sandbox-settings-v1', {
|
|
5
|
-
responsiveWidth: 720,
|
|
6
|
-
responsiveHeight: null,
|
|
7
|
-
rotate: false,
|
|
8
|
-
backgroundColor: 'transparent',
|
|
9
|
-
checkerboard: false,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
2
|
export const receivedSettings = reactive({});
|
|
13
3
|
export function applyPreviewSettings(settings) {
|
|
14
4
|
Object.assign(receivedSettings, settings);
|
|
15
5
|
}
|
|
16
|
-
//# sourceMappingURL=preview-settings.js.map
|
|
@@ -1,23 +1,5 @@
|
|
|
1
|
-
import { useStorage } from '@vueuse/core'
|
|
2
1
|
import { reactive } from 'vue'
|
|
3
|
-
|
|
4
|
-
export interface PreviewSettings {
|
|
5
|
-
responsiveWidth: number
|
|
6
|
-
responsiveHeight: number
|
|
7
|
-
rotate: boolean
|
|
8
|
-
backgroundColor: string
|
|
9
|
-
checkerboard: boolean
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function usePreviewSettings () {
|
|
13
|
-
return useStorage<PreviewSettings>('_histoire-sandbox-settings-v1', {
|
|
14
|
-
responsiveWidth: 720,
|
|
15
|
-
responsiveHeight: null,
|
|
16
|
-
rotate: false,
|
|
17
|
-
backgroundColor: 'transparent',
|
|
18
|
-
checkerboard: false,
|
|
19
|
-
})
|
|
20
|
-
}
|
|
2
|
+
import type { PreviewSettings } from '../types'
|
|
21
3
|
|
|
22
4
|
export const receivedSettings = reactive<PreviewSettings>({} as PreviewSettings)
|
|
23
5
|
|
package/dist/client/index.js
CHANGED
package/dist/controls.js
CHANGED
package/dist/node/plugin.js
CHANGED
|
@@ -137,10 +137,10 @@ if (import.meta.hot) {
|
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
139
|
configureServer(server) {
|
|
140
|
-
server.middlewares.use((req, res, next) => {
|
|
140
|
+
server.middlewares.use(async (req, res, next) => {
|
|
141
141
|
if (req.url.startsWith('/__sandbox')) {
|
|
142
142
|
res.statusCode = 200;
|
|
143
|
-
|
|
143
|
+
let html = `
|
|
144
144
|
<!DOCTYPE html>
|
|
145
145
|
<html>
|
|
146
146
|
<head>
|
|
@@ -162,17 +162,21 @@ if (import.meta.hot) {
|
|
|
162
162
|
</script>
|
|
163
163
|
<script type="module" src="/@fs/${APP_PATH}/sandbox.js"></script>
|
|
164
164
|
</body>
|
|
165
|
-
</html
|
|
165
|
+
</html>`;
|
|
166
|
+
// Apply Vite HTML transforms. This injects the Vite HMR client, and
|
|
167
|
+
// also applies HTML transforms from Vite plugins
|
|
168
|
+
html = await server.transformIndexHtml(req.url, html);
|
|
169
|
+
res.end(html);
|
|
166
170
|
return;
|
|
167
171
|
}
|
|
168
172
|
next();
|
|
169
173
|
});
|
|
170
174
|
// serve our index.html after vite history fallback
|
|
171
175
|
return () => {
|
|
172
|
-
server.middlewares.use((req, res, next) => {
|
|
176
|
+
server.middlewares.use(async (req, res, next) => {
|
|
173
177
|
if (req.url.endsWith('.html')) {
|
|
174
178
|
res.statusCode = 200;
|
|
175
|
-
|
|
179
|
+
let html = `
|
|
176
180
|
<!DOCTYPE html>
|
|
177
181
|
<html>
|
|
178
182
|
<head>
|
|
@@ -187,7 +191,11 @@ if (import.meta.hot) {
|
|
|
187
191
|
<div id="app"></div>
|
|
188
192
|
<script type="module" src="/@fs/${APP_PATH}/index.js"></script>
|
|
189
193
|
</body>
|
|
190
|
-
</html
|
|
194
|
+
</html>`;
|
|
195
|
+
// Apply Vite HTML transforms. This injects the Vite HMR client, and
|
|
196
|
+
// also applies HTML transforms from Vite plugins
|
|
197
|
+
html = await server.transformIndexHtml(req.url, html);
|
|
198
|
+
res.end(html);
|
|
191
199
|
return;
|
|
192
200
|
}
|
|
193
201
|
next();
|
package/dist/style.css
CHANGED
|
@@ -880,6 +880,11 @@ button {
|
|
|
880
880
|
margin:1rem
|
|
881
881
|
}
|
|
882
882
|
|
|
883
|
+
.htw-my-0{
|
|
884
|
+
margin-top:0px;
|
|
885
|
+
margin-bottom:0px
|
|
886
|
+
}
|
|
887
|
+
|
|
883
888
|
.-htw-my-1{
|
|
884
889
|
margin-top:-0.25rem;
|
|
885
890
|
margin-bottom:-0.25rem
|
|
@@ -977,6 +982,12 @@ button {
|
|
|
977
982
|
height:1rem
|
|
978
983
|
}
|
|
979
984
|
|
|
985
|
+
.htw-h-fit{
|
|
986
|
+
height:-webkit-fit-content;
|
|
987
|
+
height:-moz-fit-content;
|
|
988
|
+
height:fit-content
|
|
989
|
+
}
|
|
990
|
+
|
|
980
991
|
.htw-h-2{
|
|
981
992
|
height:0.5rem
|
|
982
993
|
}
|
|
@@ -989,6 +1000,10 @@ button {
|
|
|
989
1000
|
height:2.5rem
|
|
990
1001
|
}
|
|
991
1002
|
|
|
1003
|
+
.htw-h-\[100px\]{
|
|
1004
|
+
height:100px
|
|
1005
|
+
}
|
|
1006
|
+
|
|
992
1007
|
.htw-max-h-full{
|
|
993
1008
|
max-height:100%
|
|
994
1009
|
}
|
|
@@ -1033,6 +1048,12 @@ button {
|
|
|
1033
1048
|
width:1rem
|
|
1034
1049
|
}
|
|
1035
1050
|
|
|
1051
|
+
.htw-w-fit{
|
|
1052
|
+
width:-webkit-fit-content;
|
|
1053
|
+
width:-moz-fit-content;
|
|
1054
|
+
width:fit-content
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1036
1057
|
.htw-w-px{
|
|
1037
1058
|
width:1px
|
|
1038
1059
|
}
|
|
@@ -1055,6 +1076,10 @@ button {
|
|
|
1055
1076
|
width:7rem
|
|
1056
1077
|
}
|
|
1057
1078
|
|
|
1079
|
+
.htw-w-16{
|
|
1080
|
+
width:4rem
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1058
1083
|
.htw-min-w-0{
|
|
1059
1084
|
min-width:0px
|
|
1060
1085
|
}
|
|
@@ -1135,6 +1160,10 @@ button {
|
|
|
1135
1160
|
resize:vertical
|
|
1136
1161
|
}
|
|
1137
1162
|
|
|
1163
|
+
.htw-grid-cols-\[repeat\(auto-fill\,minmax\(100px\,1fr\)\)\]{
|
|
1164
|
+
grid-template-columns:repeat(auto-fill,minmax(100px,1fr))
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1138
1167
|
.htw-flex-col{
|
|
1139
1168
|
flex-direction:column
|
|
1140
1169
|
}
|
|
@@ -1147,6 +1176,10 @@ button {
|
|
|
1147
1176
|
place-content:space-between
|
|
1148
1177
|
}
|
|
1149
1178
|
|
|
1179
|
+
.htw-items-end{
|
|
1180
|
+
align-items:flex-end
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1150
1183
|
.htw-items-center{
|
|
1151
1184
|
align-items:center
|
|
1152
1185
|
}
|
|
@@ -1159,14 +1192,14 @@ button {
|
|
|
1159
1192
|
justify-content:center
|
|
1160
1193
|
}
|
|
1161
1194
|
|
|
1162
|
-
.htw-gap-2{
|
|
1163
|
-
gap:0.5rem
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
1195
|
.htw-gap-1{
|
|
1167
1196
|
gap:0.25rem
|
|
1168
1197
|
}
|
|
1169
1198
|
|
|
1199
|
+
.htw-gap-2{
|
|
1200
|
+
gap:0.5rem
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1170
1203
|
.htw-gap-4{
|
|
1171
1204
|
gap:1rem
|
|
1172
1205
|
}
|
|
@@ -1269,6 +1302,10 @@ button {
|
|
|
1269
1302
|
border-width:8px
|
|
1270
1303
|
}
|
|
1271
1304
|
|
|
1305
|
+
.htw-border-2{
|
|
1306
|
+
border-width:2px
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1272
1309
|
.htw-border-b-2{
|
|
1273
1310
|
border-bottom-width:2px
|
|
1274
1311
|
}
|
|
@@ -1529,6 +1566,11 @@ button {
|
|
|
1529
1566
|
line-height:1.75rem
|
|
1530
1567
|
}
|
|
1531
1568
|
|
|
1569
|
+
.htw-text-5xl{
|
|
1570
|
+
font-size:3rem;
|
|
1571
|
+
line-height:1
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1532
1574
|
.htw-text-white\/40{
|
|
1533
1575
|
color:rgb(255 255 255 / 0.4)
|
|
1534
1576
|
}
|
|
@@ -1736,6 +1778,10 @@ body {
|
|
|
1736
1778
|
color:rgb(var(--_histoire-color-primary-500) / var(--tw-text-opacity))
|
|
1737
1779
|
}
|
|
1738
1780
|
|
|
1781
|
+
.hover\:htw-opacity-100:hover{
|
|
1782
|
+
opacity:1
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1739
1785
|
.focus\:htw-border-primary-500:focus{
|
|
1740
1786
|
--tw-border-opacity:1;
|
|
1741
1787
|
border-color:rgb(var(--_histoire-color-primary-500) / var(--tw-border-opacity))
|
|
@@ -1750,10 +1796,18 @@ body {
|
|
|
1750
1796
|
border-color:rgb(var(--_histoire-color-primary-500) / var(--tw-border-opacity))
|
|
1751
1797
|
}
|
|
1752
1798
|
|
|
1799
|
+
.htw-group:hover .group-hover\:htw-block{
|
|
1800
|
+
display:block
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1753
1803
|
.htw-group:hover .group-hover\:htw-opacity-90{
|
|
1754
1804
|
opacity:0.9
|
|
1755
1805
|
}
|
|
1756
1806
|
|
|
1807
|
+
.htw-group:hover .group-hover\:htw-opacity-100{
|
|
1808
|
+
opacity:1
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1757
1811
|
.htw-group:active .group-active\:htw-bg-gray-500\/20{
|
|
1758
1812
|
background-color:rgb(var(--_histoire-color-gray-500) / 0.2)
|
|
1759
1813
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "histoire",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "A fast story book powered by Vite",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -33,35 +33,35 @@
|
|
|
33
33
|
"histoire": "./bin.mjs"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
36
|
+
"@histoire/controls": "^0.2.3",
|
|
37
|
+
"@iconify/vue": "^3.2.1",
|
|
38
38
|
"@vitejs/plugin-vue": "^2.3.1",
|
|
39
|
-
"@vueuse/core": "^8.
|
|
40
|
-
"birpc": "^0.1.
|
|
39
|
+
"@vueuse/core": "^8.2.5",
|
|
40
|
+
"birpc": "^0.1.1",
|
|
41
41
|
"case": "^1.6.3",
|
|
42
42
|
"chokidar": "^3.5.3",
|
|
43
43
|
"connect": "^3.7.0",
|
|
44
44
|
"defu": "^5.0.1",
|
|
45
45
|
"diacritics": "^1.3.0",
|
|
46
|
-
"floating-vue": "^2.0.0-beta.
|
|
47
|
-
"fs-extra": "^10.0.
|
|
46
|
+
"floating-vue": "^2.0.0-beta.14",
|
|
47
|
+
"fs-extra": "^10.0.1",
|
|
48
48
|
"globby": "^13.1.1",
|
|
49
|
-
"happy-dom": "^2.
|
|
49
|
+
"happy-dom": "^2.55.0",
|
|
50
50
|
"markdown-it": "^12.3.2",
|
|
51
|
-
"markdown-it-anchor": "^8.
|
|
51
|
+
"markdown-it-anchor": "^8.6.2",
|
|
52
52
|
"markdown-it-attrs": "^4.1.3",
|
|
53
53
|
"markdown-it-emoji": "^2.0.0",
|
|
54
54
|
"mrmime": "^1.0.0",
|
|
55
55
|
"pathe": "^0.2.0",
|
|
56
56
|
"picocolors": "^1.0.0",
|
|
57
|
-
"pinia": "^2.0.
|
|
57
|
+
"pinia": "^2.0.13",
|
|
58
58
|
"sade": "^1.8.1",
|
|
59
59
|
"scroll-into-view-if-needed": "^2.2.29",
|
|
60
60
|
"shiki": "^0.10.1",
|
|
61
61
|
"sirv": "^2.0.2",
|
|
62
62
|
"tinypool": "^0.1.2",
|
|
63
|
-
"vite-node": "
|
|
64
|
-
"vue-router": "^4.0.
|
|
63
|
+
"vite-node": "0.7.6",
|
|
64
|
+
"vue-router": "^4.0.14"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"vite": "^2.9.0",
|
|
@@ -72,14 +72,14 @@
|
|
|
72
72
|
"@tailwindcss/typography": "^0.5.2",
|
|
73
73
|
"@types/fs-extra": "^9.0.13",
|
|
74
74
|
"@types/markdown-it": "^12.2.3",
|
|
75
|
-
"@types/node": "^17.0.
|
|
76
|
-
"autoprefixer": "^10.4.
|
|
77
|
-
"concurrently": "^7.
|
|
78
|
-
"postcss": "^8.4.
|
|
79
|
-
"postcss-import": "^14.0
|
|
75
|
+
"@types/node": "^17.0.23",
|
|
76
|
+
"autoprefixer": "^10.4.4",
|
|
77
|
+
"concurrently": "^7.1.0",
|
|
78
|
+
"postcss": "^8.4.12",
|
|
79
|
+
"postcss-import": "^14.1.0",
|
|
80
80
|
"tailwindcss": "^3.0.23",
|
|
81
|
-
"typescript": "^4.
|
|
82
|
-
"vite": "^2.9.
|
|
81
|
+
"typescript": "^4.6.3",
|
|
82
|
+
"vite": "^2.9.1",
|
|
83
83
|
"vue": "^3.2.31"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|
package/src/client/app/App.vue
CHANGED
|
@@ -102,7 +102,7 @@ onKeyboardShortcut(['ctrl+k', 'meta+k'], (event) => {
|
|
|
102
102
|
class="htw-h-full"
|
|
103
103
|
>
|
|
104
104
|
<template #first>
|
|
105
|
-
<div class="htw-flex htw-flex-col htw-h-full
|
|
105
|
+
<div class="htw-flex htw-flex-col htw-h-full">
|
|
106
106
|
<AppHeader
|
|
107
107
|
class="htw-flex-none"
|
|
108
108
|
@search="isSearchOpen = true"
|