histoire 0.17.17 → 1.0.0-alpha.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/controls.d.ts +1 -0
- package/dist/controls.d.ts.map +1 -0
- package/dist/node/alias.d.ts +1 -0
- package/dist/node/alias.d.ts.map +1 -0
- package/dist/node/bin.d.ts +1 -0
- package/dist/node/bin.d.ts.map +1 -0
- package/dist/node/build-serialize.d.ts +1 -0
- package/dist/node/build-serialize.d.ts.map +1 -0
- package/dist/node/build.d.ts +1 -0
- package/dist/node/build.d.ts.map +1 -0
- package/dist/node/build.js +10 -8
- package/dist/node/builtin-plugins/pinceau-tokens.d.ts +1 -0
- package/dist/node/builtin-plugins/pinceau-tokens.d.ts.map +1 -0
- package/dist/node/builtin-plugins/tailwind-tokens.d.ts +1 -0
- package/dist/node/builtin-plugins/tailwind-tokens.d.ts.map +1 -0
- package/dist/node/builtin-plugins/tailwind-tokens.js +2 -2
- package/dist/node/builtin-plugins/vanilla-support/MountStory.d.ts +5 -4
- package/dist/node/builtin-plugins/vanilla-support/MountStory.d.ts.map +1 -0
- package/dist/node/builtin-plugins/vanilla-support/RenderStory.d.ts +10 -9
- package/dist/node/builtin-plugins/vanilla-support/RenderStory.d.ts.map +1 -0
- package/dist/node/builtin-plugins/vanilla-support/RenderStory.js +2 -2
- package/dist/node/builtin-plugins/vanilla-support/client.d.ts +1 -0
- package/dist/node/builtin-plugins/vanilla-support/client.d.ts.map +1 -0
- package/dist/node/builtin-plugins/vanilla-support/collect.d.ts +1 -0
- package/dist/node/builtin-plugins/vanilla-support/collect.d.ts.map +1 -0
- package/dist/node/builtin-plugins/vanilla-support/plugin.d.ts +1 -0
- package/dist/node/builtin-plugins/vanilla-support/plugin.d.ts.map +1 -0
- package/dist/node/builtin-plugins/vanilla-support/types.d.ts +1 -0
- package/dist/node/builtin-plugins/vanilla-support/types.d.ts.map +1 -0
- package/dist/node/builtin-plugins/vanilla-support/vanilla.story.d.ts +1 -0
- package/dist/node/builtin-plugins/vanilla-support/vanilla.story.d.ts.map +1 -0
- package/dist/node/collect/index.d.ts +2 -1
- package/dist/node/collect/index.d.ts.map +1 -0
- package/dist/node/collect/index.js +6 -6
- package/dist/node/collect/run.d.ts +1 -0
- package/dist/node/collect/run.d.ts.map +1 -0
- package/dist/node/collect/worker.d.ts +2 -2
- package/dist/node/collect/worker.d.ts.map +1 -0
- package/dist/node/collect/worker.js +5 -5
- package/dist/node/colors.d.ts +1 -0
- package/dist/node/colors.d.ts.map +1 -0
- package/dist/node/colors.js +2 -2
- package/dist/node/commands/build.d.ts +1 -0
- package/dist/node/commands/build.d.ts.map +1 -0
- package/dist/node/commands/build.js +0 -2
- package/dist/node/commands/dev.d.ts +1 -0
- package/dist/node/commands/dev.d.ts.map +1 -0
- package/dist/node/commands/preview.d.ts +1 -0
- package/dist/node/commands/preview.d.ts.map +1 -0
- package/dist/node/config.d.ts +5 -4
- package/dist/node/config.d.ts.map +1 -0
- package/dist/node/config.js +12 -12
- package/dist/node/context.d.ts +2 -1
- package/dist/node/context.d.ts.map +1 -0
- package/dist/node/dom/dom-keys.d.ts +1 -0
- package/dist/node/dom/dom-keys.d.ts.map +1 -0
- package/dist/node/dom/env.d.ts +1 -0
- package/dist/node/dom/env.d.ts.map +1 -0
- package/dist/node/dom/util.d.ts +1 -0
- package/dist/node/dom/util.d.ts.map +1 -0
- package/dist/node/index.d.ts +3 -2
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.js +2 -2
- package/dist/node/load.d.ts +2 -1
- package/dist/node/load.d.ts.map +1 -0
- package/dist/node/load.js +3 -3
- package/dist/node/markdown.d.ts +2 -1
- package/dist/node/markdown.d.ts.map +1 -0
- package/dist/node/markdown.js +26 -18
- package/dist/node/plugin.d.ts +7 -4
- package/dist/node/plugin.d.ts.map +1 -0
- package/dist/node/plugin.js +1 -1
- package/dist/node/preview.d.ts +1 -0
- package/dist/node/preview.d.ts.map +1 -0
- package/dist/node/search.d.ts +3 -2
- package/dist/node/search.d.ts.map +1 -0
- package/dist/node/search.js +7 -49
- package/dist/node/server.d.ts +1 -0
- package/dist/node/server.d.ts.map +1 -0
- package/dist/node/server.js +9 -7
- package/dist/node/stories.d.ts +2 -2
- package/dist/node/stories.d.ts.map +1 -0
- package/dist/node/stories.js +13 -5
- package/dist/node/tree.d.ts +1 -0
- package/dist/node/tree.d.ts.map +1 -0
- package/dist/node/util/find-up.d.ts +1 -0
- package/dist/node/util/find-up.d.ts.map +1 -0
- package/dist/node/util/fs.d.ts +1 -0
- package/dist/node/util/fs.d.ts.map +1 -0
- package/dist/node/util/log.d.ts +1 -0
- package/dist/node/util/log.d.ts.map +1 -0
- package/dist/node/util/slugify.d.ts +1 -0
- package/dist/node/util/slugify.d.ts.map +1 -0
- package/dist/node/util/vendors.d.ts +1 -0
- package/dist/node/util/vendors.d.ts.map +1 -0
- package/dist/node/util/vendors.js +7 -2
- package/dist/node/vendors/controls.d.ts +1 -0
- package/dist/node/vendors/controls.d.ts.map +1 -0
- package/dist/node/vendors/vue.d.ts +1 -0
- package/dist/node/vendors/vue.d.ts.map +1 -0
- package/dist/node/virtual/index.d.ts +11 -10
- package/dist/node/virtual/index.d.ts.map +1 -0
- package/dist/node/virtual/index.js +19 -19
- package/dist/node/virtual/markdown.d.ts +1 -0
- package/dist/node/virtual/markdown.d.ts.map +1 -0
- package/dist/node/virtual/noop.d.ts +1 -0
- package/dist/node/virtual/noop.d.ts.map +1 -0
- package/dist/node/virtual/resolved-commands.d.ts +1 -0
- package/dist/node/virtual/resolved-commands.d.ts.map +1 -0
- package/dist/node/virtual/resolved-config.d.ts +1 -0
- package/dist/node/virtual/resolved-config.d.ts.map +1 -0
- package/dist/node/virtual/resolved-generated-global-setup.d.ts +1 -0
- package/dist/node/virtual/resolved-generated-global-setup.d.ts.map +1 -0
- package/dist/node/virtual/resolved-generated-global-setup.js +1 -1
- package/dist/node/virtual/resolved-generated-setup-code.d.ts +1 -0
- package/dist/node/virtual/resolved-generated-setup-code.d.ts.map +1 -0
- package/dist/node/virtual/resolved-markdown-files.d.ts +1 -0
- package/dist/node/virtual/resolved-markdown-files.d.ts.map +1 -0
- package/dist/node/virtual/resolved-stories.d.ts +1 -0
- package/dist/node/virtual/resolved-stories.d.ts.map +1 -0
- package/dist/node/virtual/resolved-support-plugins-client.d.ts +1 -0
- package/dist/node/virtual/resolved-support-plugins-client.d.ts.map +1 -0
- package/dist/node/virtual/resolved-support-plugins-collect.d.ts +1 -0
- package/dist/node/virtual/resolved-support-plugins-collect.d.ts.map +1 -0
- package/dist/node/virtual/resolved-theme.d.ts +1 -0
- package/dist/node/virtual/resolved-theme.d.ts.map +1 -0
- package/dist/node/virtual/story-source.d.ts +1 -0
- package/dist/node/virtual/story-source.d.ts.map +1 -0
- package/dist/node/virtual/story.d.ts +1 -0
- package/dist/node/virtual/story.d.ts.map +1 -0
- package/dist/node/virtual/util.d.ts +1 -0
- package/dist/node/virtual/util.d.ts.map +1 -0
- package/dist/node/virtual/vite-plugin.d.ts +2 -1
- package/dist/node/virtual/vite-plugin.d.ts.map +1 -0
- package/dist/node/virtual/vite-plugin.js +1 -1
- package/dist/node/vite.d.ts +1 -0
- package/dist/node/vite.d.ts.map +1 -0
- package/dist/node/vite.js +3 -3
- package/package.json +35 -39
- package/src/node/__tests__/markdown.spec.ts +2 -2
- package/src/node/__tests__/tree.spec.ts +2 -2
- package/src/node/build.ts +22 -18
- package/src/node/builtin-plugins/tailwind-tokens.ts +2 -2
- package/src/node/builtin-plugins/vanilla-support/MountStory.ts +2 -2
- package/src/node/builtin-plugins/vanilla-support/RenderStory.ts +4 -4
- package/src/node/builtin-plugins/vanilla-support/plugin.ts +1 -1
- package/src/node/collect/index.ts +11 -11
- package/src/node/collect/worker.ts +8 -8
- package/src/node/colors.ts +2 -2
- package/src/node/commands/build.ts +0 -3
- package/src/node/commands/dev.ts +2 -1
- package/src/node/config.ts +19 -19
- package/src/node/context.ts +2 -2
- package/src/node/index.ts +2 -2
- package/src/node/load.ts +5 -5
- package/src/node/markdown.ts +31 -22
- package/src/node/plugin.ts +5 -5
- package/src/node/preview.ts +1 -1
- package/src/node/search.ts +8 -54
- package/src/node/server.ts +13 -9
- package/src/node/stories.ts +17 -7
- package/src/node/tree.ts +1 -1
- package/src/node/util/vendors.ts +7 -2
- package/src/node/virtual/index.ts +19 -19
- package/src/node/virtual/resolved-generated-global-setup.ts +1 -1
- package/src/node/virtual/resolved-stories.ts +6 -6
- package/src/node/virtual/resolved-support-plugins-client.ts +1 -1
- package/src/node/virtual/resolved-support-plugins-collect.ts +1 -1
- package/src/node/virtual/resolved-theme.ts +1 -1
- package/src/node/virtual/story-source.ts +1 -1
- package/src/node/virtual/vite-plugin.ts +2 -2
- package/src/node/vite.ts +6 -7
- package/tsconfig.json +2 -0
package/dist/node/markdown.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import MarkdownIt from 'markdown-it';
|
|
2
1
|
import type { Plugin as VitePlugin } from 'vite';
|
|
3
2
|
import type { Context } from './context.js';
|
|
3
|
+
import MarkdownIt from 'markdown-it';
|
|
4
4
|
export declare function onMarkdownListChange(handler: () => unknown): void;
|
|
5
5
|
export declare function createMarkdownRenderer(ctx: Context): Promise<MarkdownIt>;
|
|
6
6
|
export declare function createMarkdownPlugins(ctx: Context): Promise<VitePlugin<any>[]>;
|
|
@@ -8,3 +8,4 @@ export declare function createMarkdownFilesWatcher(ctx: Context): Promise<{
|
|
|
8
8
|
stop: () => Promise<void>;
|
|
9
9
|
}>;
|
|
10
10
|
export type MarkdownFilesWatcher = ReturnType<typeof createMarkdownFilesWatcher>;
|
|
11
|
+
//# sourceMappingURL=markdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/node/markdown.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,MAAM,CAAA;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAK3C,OAAO,UAAU,MAAM,aAAa,CAAA;AAapC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,OAAO,QAE1D;AAQD,wBAAsB,sBAAsB,CAAC,GAAG,EAAE,OAAO,uBAsExD;AAaD,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,OAAO,8BAqBvD;AAED,wBAAsB,0BAA0B,CAAC,GAAG,EAAE,OAAO;;GAgI5D;AAED,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAA"}
|
package/dist/node/markdown.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { kebabCase } from 'change-case';
|
|
2
|
+
import chokidar from 'chokidar';
|
|
3
|
+
import fs from 'fs-extra';
|
|
2
4
|
import matter from 'gray-matter';
|
|
3
|
-
import
|
|
5
|
+
import MarkdownIt from 'markdown-it';
|
|
4
6
|
import anchor from 'markdown-it-anchor';
|
|
5
7
|
import attrs from 'markdown-it-attrs';
|
|
6
|
-
import emoji from 'markdown-it-emoji';
|
|
7
|
-
import
|
|
8
|
-
import fs from 'fs-extra';
|
|
8
|
+
import { full as emoji } from 'markdown-it-emoji';
|
|
9
|
+
import micromatch from 'micromatch';
|
|
9
10
|
import path from 'pathe';
|
|
10
|
-
import { paramCase } from 'change-case';
|
|
11
11
|
import pc from 'picocolors';
|
|
12
|
-
import {
|
|
12
|
+
import { bundledLanguages, createHighlighter } from 'shiki';
|
|
13
13
|
import { addStory, notifyStoryChange, removeStory } from './stories.js';
|
|
14
|
+
import { slugify } from './util/slugify.js';
|
|
14
15
|
const onMarkdownListChangeHandlers = [];
|
|
15
16
|
export function onMarkdownListChange(handler) {
|
|
16
17
|
onMarkdownListChangeHandlers.push(handler);
|
|
@@ -21,13 +22,12 @@ function notifyMarkdownListChange() {
|
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
export async function createMarkdownRenderer(ctx) {
|
|
24
|
-
const highlighter = await
|
|
25
|
-
|
|
25
|
+
const highlighter = await createHighlighter({
|
|
26
|
+
themes: ['github-dark'],
|
|
27
|
+
langs: Object.keys(bundledLanguages), // not ideal but markdown-it does not provide async highlight
|
|
26
28
|
});
|
|
27
29
|
const md = new MarkdownIt({
|
|
28
|
-
highlight: (code, lang) => `<div class="htw-relative htw-not-prose __histoire-code"><div class="htw-absolute htw-top-0 htw-right-0 htw-text-xs htw-text-white/40">${lang}</div>${highlighter.codeToHtml(code, {
|
|
29
|
-
lang,
|
|
30
|
-
})}</div>`,
|
|
30
|
+
highlight: (code, lang) => `<div class="htw-relative htw-not-prose __histoire-code"><div class="htw-absolute htw-top-0 htw-right-0 htw-text-xs htw-text-white/40">${lang}</div>${highlighter.codeToHtml(code, { theme: 'github-dark', lang })}</div>`,
|
|
31
31
|
linkify: true,
|
|
32
32
|
html: true,
|
|
33
33
|
breaks: false,
|
|
@@ -116,9 +116,17 @@ export async function createMarkdownPlugins(ctx) {
|
|
|
116
116
|
}
|
|
117
117
|
export async function createMarkdownFilesWatcher(ctx) {
|
|
118
118
|
const md = await createMarkdownRendererWithPlugins(ctx);
|
|
119
|
-
const watcher = chokidar.watch(
|
|
119
|
+
const watcher = chokidar.watch('.', {
|
|
120
120
|
cwd: ctx.root,
|
|
121
|
-
ignored:
|
|
121
|
+
ignored: (path, stats) => {
|
|
122
|
+
if (ctx.config.storyIgnored.some(pattern => micromatch.isMatch(path, pattern))) {
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
if (micromatch.isMatch(path, '**/*.story.md')) {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
return stats?.isFile();
|
|
129
|
+
},
|
|
122
130
|
});
|
|
123
131
|
/**
|
|
124
132
|
* Initial scan is complete.
|
|
@@ -140,7 +148,7 @@ export async function createMarkdownFilesWatcher(ctx) {
|
|
|
140
148
|
});
|
|
141
149
|
}
|
|
142
150
|
const file = {
|
|
143
|
-
id:
|
|
151
|
+
id: kebabCase(relativePath.toLowerCase()),
|
|
144
152
|
relativePath,
|
|
145
153
|
absolutePath,
|
|
146
154
|
isRelatedToStory,
|
|
@@ -192,8 +200,8 @@ export async function createMarkdownFilesWatcher(ctx) {
|
|
|
192
200
|
await watcher.close();
|
|
193
201
|
}
|
|
194
202
|
watcher
|
|
195
|
-
.on('add',
|
|
196
|
-
|
|
203
|
+
.on('add', (relativePath) => {
|
|
204
|
+
addFile(relativePath);
|
|
197
205
|
})
|
|
198
206
|
.on('unlink', (relativePath) => {
|
|
199
207
|
removeFile(relativePath);
|
|
@@ -214,7 +222,7 @@ export async function createMarkdownFilesWatcher(ctx) {
|
|
|
214
222
|
};
|
|
215
223
|
}
|
|
216
224
|
catch (e) {
|
|
217
|
-
stop();
|
|
225
|
+
await stop();
|
|
218
226
|
throw e;
|
|
219
227
|
}
|
|
220
228
|
}
|
package/dist/node/plugin.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import chokidar from 'chokidar';
|
|
2
|
-
import path from 'pathe';
|
|
3
|
-
import fs from 'fs-extra';
|
|
4
1
|
import type { BuildEndCallback, ChangeViteConfigCallback, HistoireConfig, ModuleLoader, Plugin, PluginApiBase, PluginApiBuild, PluginApiDev, PluginApiDevEvent, PreviewStoryCallback, ServerStory } from '@histoire/shared';
|
|
5
2
|
import type { Context } from './context.js';
|
|
3
|
+
import fs from 'fs-extra';
|
|
4
|
+
import path from 'pathe';
|
|
6
5
|
export declare class BasePluginApi implements PluginApiBase {
|
|
7
6
|
protected ctx: Context;
|
|
8
7
|
protected plugin: Plugin;
|
|
@@ -22,7 +21,10 @@ export declare class BasePluginApi implements PluginApiBase {
|
|
|
22
21
|
getConfig(): HistoireConfig;
|
|
23
22
|
}
|
|
24
23
|
export declare class DevPluginApi extends BasePluginApi implements PluginApiDev {
|
|
25
|
-
watcher:
|
|
24
|
+
watcher: {
|
|
25
|
+
watch: typeof import("chokidar").watch;
|
|
26
|
+
FSWatcher: typeof import("chokidar").FSWatcher;
|
|
27
|
+
};
|
|
26
28
|
}
|
|
27
29
|
export declare class BuildPluginApi extends BasePluginApi implements PluginApiBuild {
|
|
28
30
|
changeViteConfigCallbacks: ChangeViteConfigCallback[];
|
|
@@ -37,3 +39,4 @@ export declare class DevEventPluginApi extends BasePluginApi implements PluginAp
|
|
|
37
39
|
payload: any;
|
|
38
40
|
constructor(ctx: Context, plugin: Plugin, moduleLoader: ModuleLoader, event: string, payload: any);
|
|
39
41
|
}
|
|
42
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/node/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,wBAAwB,EACxB,cAAc,EACd,YAAY,EACZ,MAAM,EACN,aAAa,EACb,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,EACZ,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAE3C,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,IAAI,MAAM,OAAO,CAAA;AAKxB,qBAAa,aAAc,YAAW,aAAa;IAM/C,SAAS,CAAC,GAAG,EAAE,OAAO;IACtB,SAAS,CAAC,MAAM,EAAE,MAAM;IACjB,YAAY,EAAE,YAAY;IAPnC,MAAM;8BAlBK,CAAC;MAkBD;IACX,IAAI,cAAO;IACX,EAAE,YAAK;gBAGK,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,MAAM,EACjB,YAAY,EAAE,YAAY;IAGnC,IAAI,aAAa,WAEhB;IAED,GAAG,CAAC,GAAG,GAAG,OAAA;IAIV,IAAI,CAAC,GAAG,GAAG,OAAA;IAIX,KAAK,CAAC,GAAG,GAAG,OAAA;IAIZ,YAAY,CAAC,IAAI,EAAE,MAAM;IAKzB,UAAU,IAAI,WAAW,EAAE;IAI3B,SAAS,IAAI,cAAc;CAG5B;AAED,qBAAa,YAAa,SAAQ,aAAc,YAAW,YAAY;IACrE,OAAO;;;MAAW;CACnB;AAED,qBAAa,cAAe,SAAQ,aAAc,YAAW,cAAc;IACzE,yBAAyB,EAAE,wBAAwB,EAAE,CAAK;IAC1D,iBAAiB,EAAE,gBAAgB,EAAE,CAAK;IAC1C,qBAAqB,EAAE,oBAAoB,EAAE,CAAK;IAElD,gBAAgB,CAAC,EAAE,EAAE,wBAAwB;IAI7C,UAAU,CAAC,EAAE,EAAE,gBAAgB;IAI/B,cAAc,CAAC,EAAE,EAAE,oBAAoB;CAGxC;AAED,qBAAa,iBAAkB,SAAQ,aAAc,YAAW,iBAAiB;IAKtE,KAAK,EAAE,MAAM;IACb,OAAO,EAAE,GAAG;gBAJnB,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,YAAY,EACnB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,GAAG;CAItB"}
|
package/dist/node/plugin.js
CHANGED
package/dist/node/preview.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../src/node/preview.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAK3C,UAAU,aAAa;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC3B;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,CA8C5F"}
|
package/dist/node/search.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import type { Context } from './context.js';
|
|
2
2
|
export declare function generateTitleSearchData(ctx: Context): Promise<{
|
|
3
|
-
index:
|
|
3
|
+
index: any[];
|
|
4
4
|
idMap: Record<number, {
|
|
5
5
|
id: string;
|
|
6
6
|
kind: string;
|
|
7
7
|
}>;
|
|
8
8
|
}>;
|
|
9
9
|
export declare function generateDocSearchData(ctx: Context): Promise<{
|
|
10
|
-
index:
|
|
10
|
+
index: any[];
|
|
11
11
|
idMap: Record<number, {
|
|
12
12
|
id: string;
|
|
13
13
|
kind: string;
|
|
14
14
|
}>;
|
|
15
15
|
}>;
|
|
16
16
|
export declare function getSearchDataJS(data: any): string;
|
|
17
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/node/search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAG3C,wBAAsB,uBAAuB,CAAC,GAAG,EAAE,OAAO;;;YA8CtB,MAAM;cAAQ,MAAM;;GAvBvD;AAED,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,OAAO;;;YAqBpB,MAAM;cAAQ,MAAM;;GAJvD;AAuBD,wBAAgB,eAAe,CAAC,IAAI,EAAE,GAAG,UAexC"}
|
package/dist/node/search.js
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';
|
|
2
|
-
import flexsearch from 'flexsearch';
|
|
3
|
-
import path from 'pathe';
|
|
4
1
|
import { noCase } from 'change-case';
|
|
5
|
-
import { loadModule } from './load.js';
|
|
6
|
-
const require = createRequire(import.meta.url);
|
|
7
2
|
export async function generateTitleSearchData(ctx) {
|
|
8
|
-
const searchIndex =
|
|
3
|
+
const searchIndex = [];
|
|
9
4
|
const { idMap, addToIdMap } = createIdMap();
|
|
10
5
|
for (const storyFile of ctx.storyFiles) {
|
|
11
6
|
if (storyFile.story) {
|
|
12
|
-
searchIndex.
|
|
7
|
+
searchIndex.push({
|
|
13
8
|
id: addToIdMap(storyFile.story.id, 'story'),
|
|
14
9
|
text: convertTitleToSentence(storyFile.story.title),
|
|
15
10
|
});
|
|
16
11
|
for (const variant of storyFile.story.variants) {
|
|
17
|
-
searchIndex.
|
|
12
|
+
searchIndex.push({
|
|
18
13
|
id: addToIdMap(`${storyFile.story.id}:${variant.id}`, 'variant'),
|
|
19
14
|
text: convertTitleToSentence(`${storyFile.story.title} ${variant.title}`),
|
|
20
15
|
});
|
|
@@ -22,41 +17,26 @@ export async function generateTitleSearchData(ctx) {
|
|
|
22
17
|
}
|
|
23
18
|
}
|
|
24
19
|
return {
|
|
25
|
-
index:
|
|
20
|
+
index: searchIndex,
|
|
26
21
|
idMap,
|
|
27
22
|
};
|
|
28
23
|
}
|
|
29
24
|
export async function generateDocSearchData(ctx) {
|
|
30
|
-
const searchIndex =
|
|
25
|
+
const searchIndex = [];
|
|
31
26
|
const { idMap, addToIdMap } = createIdMap();
|
|
32
27
|
for (const storyFile of ctx.storyFiles) {
|
|
33
28
|
if (storyFile.story && storyFile.story.docsText) {
|
|
34
|
-
searchIndex.
|
|
29
|
+
searchIndex.push({
|
|
35
30
|
id: addToIdMap(storyFile.story.id, 'story'),
|
|
36
31
|
text: storyFile.story.docsText,
|
|
37
32
|
});
|
|
38
33
|
}
|
|
39
34
|
}
|
|
40
35
|
return {
|
|
41
|
-
index:
|
|
36
|
+
index: searchIndex,
|
|
42
37
|
idMap,
|
|
43
38
|
};
|
|
44
39
|
}
|
|
45
|
-
async function createIndex() {
|
|
46
|
-
const flexsearchRoot = path.dirname(require.resolve('flexsearch/package.json'));
|
|
47
|
-
return new flexsearch.Document({
|
|
48
|
-
preset: 'match',
|
|
49
|
-
document: {
|
|
50
|
-
id: 'id',
|
|
51
|
-
index: [
|
|
52
|
-
'text',
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
charset: await loadModule(`${flexsearchRoot}/dist/module/lang/latin/advanced.js`),
|
|
56
|
-
language: await loadModule(`${flexsearchRoot}/dist/module/lang/en.js`),
|
|
57
|
-
tokenize: 'forward',
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
40
|
function createIdMap() {
|
|
61
41
|
let uid = 0;
|
|
62
42
|
const idMap = {};
|
|
@@ -70,28 +50,6 @@ function createIdMap() {
|
|
|
70
50
|
addToIdMap,
|
|
71
51
|
};
|
|
72
52
|
}
|
|
73
|
-
const exportKeys = new Set([
|
|
74
|
-
'reg',
|
|
75
|
-
'text.cfg',
|
|
76
|
-
'text.map',
|
|
77
|
-
'text.ctx',
|
|
78
|
-
'tag',
|
|
79
|
-
'store',
|
|
80
|
-
]);
|
|
81
|
-
async function exportSearchIndex(index) {
|
|
82
|
-
// eslint-disable-next-line no-async-promise-executor
|
|
83
|
-
return new Promise(async (resolve) => {
|
|
84
|
-
const exportedData = {};
|
|
85
|
-
const exportedKeys = new Set();
|
|
86
|
-
await index.export((key, data) => {
|
|
87
|
-
exportedData[key] = data;
|
|
88
|
-
exportedKeys.add(key);
|
|
89
|
-
if (exportedKeys.size === exportKeys.size) {
|
|
90
|
-
resolve(exportedData);
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
53
|
function convertTitleToSentence(text) {
|
|
96
54
|
return text.split(' ').map(str => noCase(str)).join(' ');
|
|
97
55
|
}
|
package/dist/node/server.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/node/server.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAa3C,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED,wBAAsB,YAAY,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,GAAE,mBAAwB;;;;GAgNjF"}
|
package/dist/node/server.js
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { performance } from 'node:perf_hooks';
|
|
2
|
-
import { createServer as createViteServer } from 'vite';
|
|
3
2
|
import pc from 'picocolors';
|
|
4
|
-
import {
|
|
5
|
-
import * as VirtualFiles from './virtual/index.js';
|
|
6
|
-
import { onStoryChange, onStoryListChange, watchStories } from './stories.js';
|
|
3
|
+
import { createServer as createViteServer, mergeConfig as mergeViteConfig } from 'vite';
|
|
7
4
|
import { useCollectStories } from './collect/index.js';
|
|
8
|
-
import { DevEventPluginApi, DevPluginApi } from './plugin.js';
|
|
9
5
|
import { useModuleLoader } from './load.js';
|
|
10
|
-
import { wrapLogError } from './util/log.js';
|
|
11
6
|
import { createMarkdownFilesWatcher, onMarkdownListChange } from './markdown.js';
|
|
7
|
+
import { DevEventPluginApi, DevPluginApi } from './plugin.js';
|
|
8
|
+
import { onStoryChange, onStoryListChange, watchStories } from './stories.js';
|
|
9
|
+
import { wrapLogError } from './util/log.js';
|
|
10
|
+
import * as VirtualFiles from './virtual/index.js';
|
|
11
|
+
import { getViteConfigWithPlugins } from './vite.js';
|
|
12
12
|
export async function createServer(ctx, options = {}) {
|
|
13
13
|
const getViteServer = async (collecting) => {
|
|
14
14
|
const { viteConfig, viteConfigFile } = await getViteConfigWithPlugins(collecting, ctx);
|
|
15
15
|
if (!collecting && options.open) {
|
|
16
16
|
viteConfig.server.open = true;
|
|
17
17
|
}
|
|
18
|
-
const server = await createViteServer(viteConfig
|
|
18
|
+
const server = await createViteServer(mergeViteConfig(viteConfig, {
|
|
19
|
+
optimizeDeps: { include: [], noDiscovery: true },
|
|
20
|
+
}));
|
|
19
21
|
await server.pluginContainer.buildStart({});
|
|
20
22
|
return {
|
|
21
23
|
server,
|
package/dist/node/stories.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import chokidar from 'chokidar';
|
|
2
1
|
import type { ServerStoryFile } from '@histoire/shared';
|
|
3
2
|
import type { Context } from './context.js';
|
|
4
3
|
type StoryChangeHandler = (file?: ServerStoryFile) => unknown;
|
|
@@ -15,8 +14,9 @@ type StoryListChangeHandler = () => unknown;
|
|
|
15
14
|
*/
|
|
16
15
|
export declare function onStoryListChange(handler: StoryListChangeHandler): void;
|
|
17
16
|
export declare function notifyStoryListChange(): void;
|
|
18
|
-
export declare function watchStories(newContext: Context): Promise<chokidar.FSWatcher>;
|
|
17
|
+
export declare function watchStories(newContext: Context): Promise<import("chokidar").FSWatcher>;
|
|
19
18
|
export declare function addStory(relativeFilePath: string, virtualModuleCode?: string): ServerStoryFile;
|
|
20
19
|
export declare function removeStory(relativeFilePath: string): void;
|
|
21
20
|
export declare function findAllStories(newContext: Context): Promise<void>;
|
|
22
21
|
export {};
|
|
22
|
+
//# sourceMappingURL=stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stories.d.ts","sourceRoot":"","sources":["../../src/node/stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAO3C,KAAK,kBAAkB,GAAG,CAAC,IAAI,CAAC,EAAE,eAAe,KAAK,OAAO,CAAA;AAG7D;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,kBAAkB,QAExD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,CAAC,EAAE,eAAe,QAIvD;AAED,KAAK,sBAAsB,GAAG,MAAM,OAAO,CAAA;AAG3C;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,sBAAsB,QAEhE;AAED,wBAAgB,qBAAqB,SAIpC;AAID,wBAAsB,YAAY,CAAC,UAAU,EAAE,OAAO,yCA4BrD;AAMD,wBAAgB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,mBA0C5E;AAED,wBAAgB,WAAW,CAAC,gBAAgB,EAAE,MAAM,QAInD;AAED,wBAAsB,cAAc,CAAC,UAAU,EAAE,OAAO,iBAWvD"}
|
package/dist/node/stories.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { kebabCase } from 'change-case';
|
|
1
2
|
import chokidar from 'chokidar';
|
|
2
3
|
import { globby } from 'globby';
|
|
3
|
-
import { paramCase } from 'change-case';
|
|
4
|
-
import { basename, resolve } from 'pathe';
|
|
5
4
|
import micromatch from 'micromatch';
|
|
5
|
+
import { basename, resolve } from 'pathe';
|
|
6
6
|
const storyChangeHandlers = [];
|
|
7
7
|
/**
|
|
8
8
|
* Called when a new story is added or modified. Collecting should be done.
|
|
@@ -32,9 +32,17 @@ export function notifyStoryListChange() {
|
|
|
32
32
|
let context;
|
|
33
33
|
export async function watchStories(newContext) {
|
|
34
34
|
context = newContext;
|
|
35
|
-
const watcher = chokidar.watch(
|
|
35
|
+
const watcher = chokidar.watch('.', {
|
|
36
36
|
cwd: context.root,
|
|
37
|
-
ignored:
|
|
37
|
+
ignored: (path, stats) => {
|
|
38
|
+
if (context.config.storyIgnored.some(pattern => micromatch.isMatch(path, pattern))) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
if (context.config.storyMatch.some(pattern => micromatch.isMatch(path, pattern))) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
return stats?.isFile();
|
|
45
|
+
},
|
|
38
46
|
});
|
|
39
47
|
watcher
|
|
40
48
|
.on('add', (file) => {
|
|
@@ -57,7 +65,7 @@ export function addStory(relativeFilePath, virtualModuleCode) {
|
|
|
57
65
|
return file;
|
|
58
66
|
}
|
|
59
67
|
}
|
|
60
|
-
const fileId =
|
|
68
|
+
const fileId = kebabCase(relativeFilePath.toLowerCase());
|
|
61
69
|
let fileName = basename(relativeFilePath);
|
|
62
70
|
if (fileName.includes('.')) {
|
|
63
71
|
fileName = fileName.substring(0, fileName.indexOf('.'));
|
package/dist/node/tree.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { HistoireConfig, ServerStoryFile, ServerTree, ServerTreeFile } from '@histoire/shared';
|
|
2
2
|
export declare function createPath(config: HistoireConfig, file: ServerTreeFile): string[];
|
|
3
3
|
export declare function makeTree(config: HistoireConfig, files: ServerStoryFile[]): ServerTree;
|
|
4
|
+
//# sourceMappingURL=tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../src/node/tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,UAAU,EACV,cAAc,EAEf,MAAM,kBAAkB,CAAA;AAGzB,wBAAgB,UAAU,CAAC,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,YAmBtE;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,eAAe,EAAE,cA+HxE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-up.d.ts","sourceRoot":"","sources":["../../../src/node/util/find-up.ts"],"names":[],"mappings":"AAGA,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAsB,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAoB/E"}
|
package/dist/node/util/fs.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../../src/node/util/fs.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,QAAS,MAAM,WAA4B,CAAA"}
|
package/dist/node/util/log.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/node/util/log.ts"],"names":[],"mappings":"AAEA,wBAAsB,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,OAAO,iBAO/D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slugify.d.ts","sourceRoot":"","sources":["../../../src/node/util/slugify.ts"],"names":[],"mappings":"AASA,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAgB3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendors.d.ts","sourceRoot":"","sources":["../../../src/node/util/vendors.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,QAA+C,CAAA;AAQrE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,UAahD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
-
import { fileURLToPath } from 'node:url';
|
|
2
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
3
3
|
// Resolve an absolute path to e.g. node_modules/.pnpm/histoire@0.11.7_vite@3.2.4/node_modules/histoire/dist/node/vendors/controls.js
|
|
4
4
|
// https://github.com/histoire-dev/histoire/issues/282
|
|
5
5
|
export const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
@@ -13,5 +13,10 @@ export function getInjectedImport(request) {
|
|
|
13
13
|
if (alias[id]) {
|
|
14
14
|
id = alias[id];
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
if (path.isAbsolute(id)) {
|
|
17
|
+
return JSON.stringify(pathToFileURL(id).href);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return JSON.stringify(id);
|
|
21
|
+
}
|
|
17
22
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../../src/node/vendors/controls.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vue.d.ts","sourceRoot":"","sources":["../../../src/node/vendors/vue.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
|
|
@@ -3,23 +3,23 @@ export declare const RESOLVED_STORIES_ID = "/__resolved__virtual:$histoire-stori
|
|
|
3
3
|
export declare const SETUP_ID = "virtual:$histoire-setup";
|
|
4
4
|
export declare const NOOP_ID = "virtual:$histoire-noop";
|
|
5
5
|
export declare const CONFIG_ID = "virtual:$histoire-config";
|
|
6
|
-
export declare const RESOLVED_CONFIG_ID = "
|
|
6
|
+
export declare const RESOLVED_CONFIG_ID = "\0virtual:$histoire-config";
|
|
7
7
|
export declare const THEME_ID = "virtual:$histoire-theme";
|
|
8
|
-
export declare const RESOLVED_THEME_ID = "
|
|
8
|
+
export declare const RESOLVED_THEME_ID = "\0virtual:$histoire-theme.css";
|
|
9
9
|
export declare const SEARCH_TITLE_DATA_ID = "virtual:$histoire-search-title-data";
|
|
10
|
-
export declare const RESOLVED_SEARCH_TITLE_DATA_ID = "
|
|
10
|
+
export declare const RESOLVED_SEARCH_TITLE_DATA_ID = "\0virtual:$histoire-search-title-data";
|
|
11
11
|
export declare const SEARCH_DOCS_DATA_ID = "virtual:$histoire-search-docs-data";
|
|
12
|
-
export declare const RESOLVED_SEARCH_DOCS_DATA_ID = "
|
|
12
|
+
export declare const RESOLVED_SEARCH_DOCS_DATA_ID = "\0virtual:$histoire-search-docs-data";
|
|
13
13
|
export declare const GENERATED_GLOBAL_SETUP = "virtual:$histoire-generated-global-setup";
|
|
14
|
-
export declare const RESOLVED_GENERATED_GLOBAL_SETUP = "
|
|
14
|
+
export declare const RESOLVED_GENERATED_GLOBAL_SETUP = "\0virtual:$histoire-generated-global-setup";
|
|
15
15
|
export declare const GENERATED_SETUP_CODE = "virtual:$histoire-generated-setup-code";
|
|
16
|
-
export declare const RESOLVED_GENERATED_SETUP_CODE = "
|
|
16
|
+
export declare const RESOLVED_GENERATED_SETUP_CODE = "\0virtual:$histoire-generated-setup-code";
|
|
17
17
|
export declare const SUPPORT_PLUGINS_CLIENT = "virtual:$histoire-support-plugins-client";
|
|
18
|
-
export declare const RESOLVED_SUPPORT_PLUGINS_CLIENT = "
|
|
18
|
+
export declare const RESOLVED_SUPPORT_PLUGINS_CLIENT = "\0virtual:$histoire-support-plugins-client";
|
|
19
19
|
export declare const SUPPORT_PLUGINS_COLLECT = "virtual:$histoire-support-plugins-collect";
|
|
20
|
-
export declare const RESOLVED_SUPPORT_PLUGINS_COLLECT = "
|
|
20
|
+
export declare const RESOLVED_SUPPORT_PLUGINS_COLLECT = "\0virtual:$histoire-support-plugins-collect";
|
|
21
21
|
export declare const MARKDOWN_FILES = "virtual:$histoire-markdown-files";
|
|
22
|
-
export declare const RESOLVED_MARKDOWN_FILES = "
|
|
22
|
+
export declare const RESOLVED_MARKDOWN_FILES = "\0virtual:$histoire-markdown-files";
|
|
23
23
|
export declare const COMMANDS = "virtual:$histoire-commands";
|
|
24
24
|
export declare const RESOLVED_COMMANDS = "/__resolved__virtual:$histoire-commands";
|
|
25
25
|
export * from './markdown.js';
|
|
@@ -33,5 +33,6 @@ export * from './resolved-stories.js';
|
|
|
33
33
|
export * from './resolved-support-plugins-client.js';
|
|
34
34
|
export * from './resolved-support-plugins-collect.js';
|
|
35
35
|
export * from './resolved-theme.js';
|
|
36
|
-
export * from './story.js';
|
|
37
36
|
export * from './story-source.js';
|
|
37
|
+
export * from './story.js';
|
|
38
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/virtual/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,8BAA8B,CAAA;AACrD,eAAO,MAAM,mBAAmB,2CAA+B,CAAA;AAE/D,eAAO,MAAM,QAAQ,4BAA4B,CAAA;AACjD,eAAO,MAAM,OAAO,2BAA2B,CAAA;AAC/C,eAAO,MAAM,SAAS,6BAA6B,CAAA;AAEnD,eAAO,MAAM,kBAAkB,+BAAmB,CAAA;AAClD,eAAO,MAAM,QAAQ,4BAA4B,CAAA;AAEjD,eAAO,MAAM,iBAAiB,kCAAsB,CAAA;AACpD,eAAO,MAAM,oBAAoB,wCAAwC,CAAA;AAEzE,eAAO,MAAM,6BAA6B,0CAA8B,CAAA;AACxE,eAAO,MAAM,mBAAmB,uCAAuC,CAAA;AAEvE,eAAO,MAAM,4BAA4B,yCAA6B,CAAA;AACtE,eAAO,MAAM,sBAAsB,6CAA6C,CAAA;AAEhF,eAAO,MAAM,+BAA+B,+CAAgC,CAAA;AAC5E,eAAO,MAAM,oBAAoB,2CAA2C,CAAA;AAE5E,eAAO,MAAM,6BAA6B,6CAA8B,CAAA;AACxE,eAAO,MAAM,sBAAsB,6CAA6C,CAAA;AAEhF,eAAO,MAAM,+BAA+B,+CAAgC,CAAA;AAC5E,eAAO,MAAM,uBAAuB,8CAA8C,CAAA;AAElF,eAAO,MAAM,gCAAgC,gDAAiC,CAAA;AAC9E,eAAO,MAAM,cAAc,qCAAqC,CAAA;AAEhE,eAAO,MAAM,uBAAuB,uCAAwB,CAAA;AAC5D,eAAO,MAAM,QAAQ,+BAA+B,CAAA;AACpD,eAAO,MAAM,iBAAiB,4CAA6B,CAAA;AAE3D,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sCAAsC,CAAA;AACpD,cAAc,oCAAoC,CAAA;AAClD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,uBAAuB,CAAA;AACrC,cAAc,sCAAsC,CAAA;AACpD,cAAc,uCAAuC,CAAA;AACrD,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA"}
|
|
@@ -6,32 +6,32 @@ export const RESOLVED_STORIES_ID = `/__resolved__${STORIES_ID}`;
|
|
|
6
6
|
export const SETUP_ID = 'virtual:$histoire-setup';
|
|
7
7
|
export const NOOP_ID = 'virtual:$histoire-noop';
|
|
8
8
|
export const CONFIG_ID = 'virtual:$histoire-config';
|
|
9
|
-
export const RESOLVED_CONFIG_ID = `/__resolved__${CONFIG_ID}
|
|
10
|
-
|
|
9
|
+
// export const RESOLVED_CONFIG_ID = `/__resolved__${CONFIG_ID}`
|
|
10
|
+
export const RESOLVED_CONFIG_ID = `\0${CONFIG_ID}`;
|
|
11
11
|
export const THEME_ID = 'virtual:$histoire-theme';
|
|
12
|
-
export const RESOLVED_THEME_ID = `/__resolved__${THEME_ID}.css
|
|
13
|
-
|
|
12
|
+
// export const RESOLVED_THEME_ID = `/__resolved__${THEME_ID}.css`
|
|
13
|
+
export const RESOLVED_THEME_ID = `\0${THEME_ID}.css`;
|
|
14
14
|
export const SEARCH_TITLE_DATA_ID = 'virtual:$histoire-search-title-data';
|
|
15
|
-
export const RESOLVED_SEARCH_TITLE_DATA_ID = `/__resolved__${SEARCH_TITLE_DATA_ID}
|
|
16
|
-
|
|
15
|
+
// export const RESOLVED_SEARCH_TITLE_DATA_ID = `/__resolved__${SEARCH_TITLE_DATA_ID}`
|
|
16
|
+
export const RESOLVED_SEARCH_TITLE_DATA_ID = `\0${SEARCH_TITLE_DATA_ID}`;
|
|
17
17
|
export const SEARCH_DOCS_DATA_ID = 'virtual:$histoire-search-docs-data';
|
|
18
|
-
export const RESOLVED_SEARCH_DOCS_DATA_ID = `/__resolved__${SEARCH_DOCS_DATA_ID}
|
|
19
|
-
|
|
18
|
+
// export const RESOLVED_SEARCH_DOCS_DATA_ID = `/__resolved__${SEARCH_DOCS_DATA_ID}`
|
|
19
|
+
export const RESOLVED_SEARCH_DOCS_DATA_ID = `\0${SEARCH_DOCS_DATA_ID}`;
|
|
20
20
|
export const GENERATED_GLOBAL_SETUP = 'virtual:$histoire-generated-global-setup';
|
|
21
|
-
export const RESOLVED_GENERATED_GLOBAL_SETUP = `/__resolved__${GENERATED_GLOBAL_SETUP}
|
|
22
|
-
|
|
21
|
+
// export const RESOLVED_GENERATED_GLOBAL_SETUP = `/__resolved__${GENERATED_GLOBAL_SETUP}`
|
|
22
|
+
export const RESOLVED_GENERATED_GLOBAL_SETUP = `\0${GENERATED_GLOBAL_SETUP}`;
|
|
23
23
|
export const GENERATED_SETUP_CODE = 'virtual:$histoire-generated-setup-code';
|
|
24
|
-
export const RESOLVED_GENERATED_SETUP_CODE = `/__resolved__${GENERATED_SETUP_CODE}
|
|
25
|
-
|
|
24
|
+
// export const RESOLVED_GENERATED_SETUP_CODE = `/__resolved__${GENERATED_SETUP_CODE}`
|
|
25
|
+
export const RESOLVED_GENERATED_SETUP_CODE = `\0${GENERATED_SETUP_CODE}`;
|
|
26
26
|
export const SUPPORT_PLUGINS_CLIENT = 'virtual:$histoire-support-plugins-client';
|
|
27
|
-
export const RESOLVED_SUPPORT_PLUGINS_CLIENT = `/__resolved__${SUPPORT_PLUGINS_CLIENT}
|
|
28
|
-
|
|
27
|
+
// export const RESOLVED_SUPPORT_PLUGINS_CLIENT = `/__resolved__${SUPPORT_PLUGINS_CLIENT}`
|
|
28
|
+
export const RESOLVED_SUPPORT_PLUGINS_CLIENT = `\0${SUPPORT_PLUGINS_CLIENT}`;
|
|
29
29
|
export const SUPPORT_PLUGINS_COLLECT = 'virtual:$histoire-support-plugins-collect';
|
|
30
|
-
export const RESOLVED_SUPPORT_PLUGINS_COLLECT = `/__resolved__${SUPPORT_PLUGINS_COLLECT}
|
|
31
|
-
|
|
30
|
+
// export const RESOLVED_SUPPORT_PLUGINS_COLLECT = `/__resolved__${SUPPORT_PLUGINS_COLLECT}`
|
|
31
|
+
export const RESOLVED_SUPPORT_PLUGINS_COLLECT = `\0${SUPPORT_PLUGINS_COLLECT}`;
|
|
32
32
|
export const MARKDOWN_FILES = 'virtual:$histoire-markdown-files';
|
|
33
|
-
export const RESOLVED_MARKDOWN_FILES = `/__resolved__${MARKDOWN_FILES}
|
|
34
|
-
|
|
33
|
+
// export const RESOLVED_MARKDOWN_FILES = `/__resolved__${MARKDOWN_FILES}`
|
|
34
|
+
export const RESOLVED_MARKDOWN_FILES = `\0${MARKDOWN_FILES}`;
|
|
35
35
|
export const COMMANDS = 'virtual:$histoire-commands';
|
|
36
36
|
export const RESOLVED_COMMANDS = `/__resolved__${COMMANDS}`;
|
|
37
37
|
export * from './markdown.js';
|
|
@@ -45,5 +45,5 @@ export * from './resolved-stories.js';
|
|
|
45
45
|
export * from './resolved-support-plugins-client.js';
|
|
46
46
|
export * from './resolved-support-plugins-collect.js';
|
|
47
47
|
export * from './resolved-theme.js';
|
|
48
|
-
export * from './story.js';
|
|
49
48
|
export * from './story-source.js';
|
|
49
|
+
export * from './story.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../src/node/virtual/markdown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,UAkBhD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"noop.d.ts","sourceRoot":"","sources":["../../../src/node/virtual/noop.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,cAAkC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolved-commands.d.ts","sourceRoot":"","sources":["../../../src/node/virtual/resolved-commands.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAI5C,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,UAY5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolved-config.d.ts","sourceRoot":"","sources":["../../../src/node/virtual/resolved-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,UAS1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolved-generated-global-setup.d.ts","sourceRoot":"","sources":["../../../src/node/virtual/resolved-generated-global-setup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAI5C,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,OAAO,UAoBxD"}
|