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.
Files changed (173) hide show
  1. package/dist/controls.d.ts +1 -0
  2. package/dist/controls.d.ts.map +1 -0
  3. package/dist/node/alias.d.ts +1 -0
  4. package/dist/node/alias.d.ts.map +1 -0
  5. package/dist/node/bin.d.ts +1 -0
  6. package/dist/node/bin.d.ts.map +1 -0
  7. package/dist/node/build-serialize.d.ts +1 -0
  8. package/dist/node/build-serialize.d.ts.map +1 -0
  9. package/dist/node/build.d.ts +1 -0
  10. package/dist/node/build.d.ts.map +1 -0
  11. package/dist/node/build.js +10 -8
  12. package/dist/node/builtin-plugins/pinceau-tokens.d.ts +1 -0
  13. package/dist/node/builtin-plugins/pinceau-tokens.d.ts.map +1 -0
  14. package/dist/node/builtin-plugins/tailwind-tokens.d.ts +1 -0
  15. package/dist/node/builtin-plugins/tailwind-tokens.d.ts.map +1 -0
  16. package/dist/node/builtin-plugins/tailwind-tokens.js +2 -2
  17. package/dist/node/builtin-plugins/vanilla-support/MountStory.d.ts +5 -4
  18. package/dist/node/builtin-plugins/vanilla-support/MountStory.d.ts.map +1 -0
  19. package/dist/node/builtin-plugins/vanilla-support/RenderStory.d.ts +10 -9
  20. package/dist/node/builtin-plugins/vanilla-support/RenderStory.d.ts.map +1 -0
  21. package/dist/node/builtin-plugins/vanilla-support/RenderStory.js +2 -2
  22. package/dist/node/builtin-plugins/vanilla-support/client.d.ts +1 -0
  23. package/dist/node/builtin-plugins/vanilla-support/client.d.ts.map +1 -0
  24. package/dist/node/builtin-plugins/vanilla-support/collect.d.ts +1 -0
  25. package/dist/node/builtin-plugins/vanilla-support/collect.d.ts.map +1 -0
  26. package/dist/node/builtin-plugins/vanilla-support/plugin.d.ts +1 -0
  27. package/dist/node/builtin-plugins/vanilla-support/plugin.d.ts.map +1 -0
  28. package/dist/node/builtin-plugins/vanilla-support/types.d.ts +1 -0
  29. package/dist/node/builtin-plugins/vanilla-support/types.d.ts.map +1 -0
  30. package/dist/node/builtin-plugins/vanilla-support/vanilla.story.d.ts +1 -0
  31. package/dist/node/builtin-plugins/vanilla-support/vanilla.story.d.ts.map +1 -0
  32. package/dist/node/collect/index.d.ts +2 -1
  33. package/dist/node/collect/index.d.ts.map +1 -0
  34. package/dist/node/collect/index.js +6 -6
  35. package/dist/node/collect/run.d.ts +1 -0
  36. package/dist/node/collect/run.d.ts.map +1 -0
  37. package/dist/node/collect/worker.d.ts +2 -2
  38. package/dist/node/collect/worker.d.ts.map +1 -0
  39. package/dist/node/collect/worker.js +5 -5
  40. package/dist/node/colors.d.ts +1 -0
  41. package/dist/node/colors.d.ts.map +1 -0
  42. package/dist/node/colors.js +2 -2
  43. package/dist/node/commands/build.d.ts +1 -0
  44. package/dist/node/commands/build.d.ts.map +1 -0
  45. package/dist/node/commands/build.js +0 -2
  46. package/dist/node/commands/dev.d.ts +1 -0
  47. package/dist/node/commands/dev.d.ts.map +1 -0
  48. package/dist/node/commands/preview.d.ts +1 -0
  49. package/dist/node/commands/preview.d.ts.map +1 -0
  50. package/dist/node/config.d.ts +5 -4
  51. package/dist/node/config.d.ts.map +1 -0
  52. package/dist/node/config.js +12 -12
  53. package/dist/node/context.d.ts +2 -1
  54. package/dist/node/context.d.ts.map +1 -0
  55. package/dist/node/dom/dom-keys.d.ts +1 -0
  56. package/dist/node/dom/dom-keys.d.ts.map +1 -0
  57. package/dist/node/dom/env.d.ts +1 -0
  58. package/dist/node/dom/env.d.ts.map +1 -0
  59. package/dist/node/dom/util.d.ts +1 -0
  60. package/dist/node/dom/util.d.ts.map +1 -0
  61. package/dist/node/index.d.ts +3 -2
  62. package/dist/node/index.d.ts.map +1 -0
  63. package/dist/node/index.js +2 -2
  64. package/dist/node/load.d.ts +2 -1
  65. package/dist/node/load.d.ts.map +1 -0
  66. package/dist/node/load.js +3 -3
  67. package/dist/node/markdown.d.ts +2 -1
  68. package/dist/node/markdown.d.ts.map +1 -0
  69. package/dist/node/markdown.js +26 -18
  70. package/dist/node/plugin.d.ts +7 -4
  71. package/dist/node/plugin.d.ts.map +1 -0
  72. package/dist/node/plugin.js +1 -1
  73. package/dist/node/preview.d.ts +1 -0
  74. package/dist/node/preview.d.ts.map +1 -0
  75. package/dist/node/search.d.ts +3 -2
  76. package/dist/node/search.d.ts.map +1 -0
  77. package/dist/node/search.js +7 -49
  78. package/dist/node/server.d.ts +1 -0
  79. package/dist/node/server.d.ts.map +1 -0
  80. package/dist/node/server.js +9 -7
  81. package/dist/node/stories.d.ts +2 -2
  82. package/dist/node/stories.d.ts.map +1 -0
  83. package/dist/node/stories.js +13 -5
  84. package/dist/node/tree.d.ts +1 -0
  85. package/dist/node/tree.d.ts.map +1 -0
  86. package/dist/node/util/find-up.d.ts +1 -0
  87. package/dist/node/util/find-up.d.ts.map +1 -0
  88. package/dist/node/util/fs.d.ts +1 -0
  89. package/dist/node/util/fs.d.ts.map +1 -0
  90. package/dist/node/util/log.d.ts +1 -0
  91. package/dist/node/util/log.d.ts.map +1 -0
  92. package/dist/node/util/slugify.d.ts +1 -0
  93. package/dist/node/util/slugify.d.ts.map +1 -0
  94. package/dist/node/util/vendors.d.ts +1 -0
  95. package/dist/node/util/vendors.d.ts.map +1 -0
  96. package/dist/node/util/vendors.js +7 -2
  97. package/dist/node/vendors/controls.d.ts +1 -0
  98. package/dist/node/vendors/controls.d.ts.map +1 -0
  99. package/dist/node/vendors/vue.d.ts +1 -0
  100. package/dist/node/vendors/vue.d.ts.map +1 -0
  101. package/dist/node/virtual/index.d.ts +11 -10
  102. package/dist/node/virtual/index.d.ts.map +1 -0
  103. package/dist/node/virtual/index.js +19 -19
  104. package/dist/node/virtual/markdown.d.ts +1 -0
  105. package/dist/node/virtual/markdown.d.ts.map +1 -0
  106. package/dist/node/virtual/noop.d.ts +1 -0
  107. package/dist/node/virtual/noop.d.ts.map +1 -0
  108. package/dist/node/virtual/resolved-commands.d.ts +1 -0
  109. package/dist/node/virtual/resolved-commands.d.ts.map +1 -0
  110. package/dist/node/virtual/resolved-config.d.ts +1 -0
  111. package/dist/node/virtual/resolved-config.d.ts.map +1 -0
  112. package/dist/node/virtual/resolved-generated-global-setup.d.ts +1 -0
  113. package/dist/node/virtual/resolved-generated-global-setup.d.ts.map +1 -0
  114. package/dist/node/virtual/resolved-generated-global-setup.js +1 -1
  115. package/dist/node/virtual/resolved-generated-setup-code.d.ts +1 -0
  116. package/dist/node/virtual/resolved-generated-setup-code.d.ts.map +1 -0
  117. package/dist/node/virtual/resolved-markdown-files.d.ts +1 -0
  118. package/dist/node/virtual/resolved-markdown-files.d.ts.map +1 -0
  119. package/dist/node/virtual/resolved-stories.d.ts +1 -0
  120. package/dist/node/virtual/resolved-stories.d.ts.map +1 -0
  121. package/dist/node/virtual/resolved-support-plugins-client.d.ts +1 -0
  122. package/dist/node/virtual/resolved-support-plugins-client.d.ts.map +1 -0
  123. package/dist/node/virtual/resolved-support-plugins-collect.d.ts +1 -0
  124. package/dist/node/virtual/resolved-support-plugins-collect.d.ts.map +1 -0
  125. package/dist/node/virtual/resolved-theme.d.ts +1 -0
  126. package/dist/node/virtual/resolved-theme.d.ts.map +1 -0
  127. package/dist/node/virtual/story-source.d.ts +1 -0
  128. package/dist/node/virtual/story-source.d.ts.map +1 -0
  129. package/dist/node/virtual/story.d.ts +1 -0
  130. package/dist/node/virtual/story.d.ts.map +1 -0
  131. package/dist/node/virtual/util.d.ts +1 -0
  132. package/dist/node/virtual/util.d.ts.map +1 -0
  133. package/dist/node/virtual/vite-plugin.d.ts +2 -1
  134. package/dist/node/virtual/vite-plugin.d.ts.map +1 -0
  135. package/dist/node/virtual/vite-plugin.js +1 -1
  136. package/dist/node/vite.d.ts +1 -0
  137. package/dist/node/vite.d.ts.map +1 -0
  138. package/dist/node/vite.js +3 -3
  139. package/package.json +35 -39
  140. package/src/node/__tests__/markdown.spec.ts +2 -2
  141. package/src/node/__tests__/tree.spec.ts +2 -2
  142. package/src/node/build.ts +22 -18
  143. package/src/node/builtin-plugins/tailwind-tokens.ts +2 -2
  144. package/src/node/builtin-plugins/vanilla-support/MountStory.ts +2 -2
  145. package/src/node/builtin-plugins/vanilla-support/RenderStory.ts +4 -4
  146. package/src/node/builtin-plugins/vanilla-support/plugin.ts +1 -1
  147. package/src/node/collect/index.ts +11 -11
  148. package/src/node/collect/worker.ts +8 -8
  149. package/src/node/colors.ts +2 -2
  150. package/src/node/commands/build.ts +0 -3
  151. package/src/node/commands/dev.ts +2 -1
  152. package/src/node/config.ts +19 -19
  153. package/src/node/context.ts +2 -2
  154. package/src/node/index.ts +2 -2
  155. package/src/node/load.ts +5 -5
  156. package/src/node/markdown.ts +31 -22
  157. package/src/node/plugin.ts +5 -5
  158. package/src/node/preview.ts +1 -1
  159. package/src/node/search.ts +8 -54
  160. package/src/node/server.ts +13 -9
  161. package/src/node/stories.ts +17 -7
  162. package/src/node/tree.ts +1 -1
  163. package/src/node/util/vendors.ts +7 -2
  164. package/src/node/virtual/index.ts +19 -19
  165. package/src/node/virtual/resolved-generated-global-setup.ts +1 -1
  166. package/src/node/virtual/resolved-stories.ts +6 -6
  167. package/src/node/virtual/resolved-support-plugins-client.ts +1 -1
  168. package/src/node/virtual/resolved-support-plugins-collect.ts +1 -1
  169. package/src/node/virtual/resolved-theme.ts +1 -1
  170. package/src/node/virtual/story-source.ts +1 -1
  171. package/src/node/virtual/vite-plugin.ts +2 -2
  172. package/src/node/vite.ts +6 -7
  173. package/tsconfig.json +2 -0
@@ -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"}
@@ -1,16 +1,17 @@
1
- import MarkdownIt from 'markdown-it';
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 { getHighlighter } from 'shiki-es';
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 chokidar from 'chokidar';
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 { slugify } from './util/slugify.js';
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 getHighlighter({
25
- theme: 'github-dark',
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(['**/*.story.md'], {
119
+ const watcher = chokidar.watch('.', {
120
120
  cwd: ctx.root,
121
- ignored: ctx.config.storyIgnored,
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: paramCase(relativePath.toLowerCase()),
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', async (relativePath) => {
196
- await addFile(relativePath);
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
  }
@@ -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: typeof chokidar;
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"}
@@ -1,6 +1,6 @@
1
1
  import chokidar from 'chokidar';
2
- import path from 'pathe';
3
2
  import fs from 'fs-extra';
3
+ import path from 'pathe';
4
4
  import pc from 'picocolors';
5
5
  import { TEMP_PATH } from './alias.js';
6
6
  import { addStory, removeStory } from './stories.js';
@@ -5,3 +5,4 @@ interface ReturnPayload {
5
5
  }
6
6
  export declare function startPreview(port: number | null, ctx: Context): Promise<ReturnPayload>;
7
7
  export {};
8
+ //# sourceMappingURL=preview.d.ts.map
@@ -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"}
@@ -1,16 +1,17 @@
1
1
  import type { Context } from './context.js';
2
2
  export declare function generateTitleSearchData(ctx: Context): Promise<{
3
- index: unknown;
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: unknown;
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"}
@@ -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 = await createIndex();
3
+ const searchIndex = [];
9
4
  const { idMap, addToIdMap } = createIdMap();
10
5
  for (const storyFile of ctx.storyFiles) {
11
6
  if (storyFile.story) {
12
- searchIndex.add({
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.add({
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: await exportSearchIndex(searchIndex),
20
+ index: searchIndex,
26
21
  idMap,
27
22
  };
28
23
  }
29
24
  export async function generateDocSearchData(ctx) {
30
- const searchIndex = await createIndex();
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.add({
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: await exportSearchIndex(searchIndex),
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
  }
@@ -8,3 +8,4 @@ export declare function createServer(ctx: Context, options?: CreateServerOptions
8
8
  viteConfigFile: string;
9
9
  close: () => Promise<void>;
10
10
  }>;
11
+ //# sourceMappingURL=server.d.ts.map
@@ -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"}
@@ -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 { getViteConfigWithPlugins } from './vite.js';
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,
@@ -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"}
@@ -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(context.config.storyMatch, {
35
+ const watcher = chokidar.watch('.', {
36
36
  cwd: context.root,
37
- ignored: context.config.storyIgnored,
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 = paramCase(relativeFilePath.toLowerCase());
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('.'));
@@ -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"}
@@ -1 +1,2 @@
1
1
  export declare function findUp(cwd: string, fileNames: string[]): string;
2
+ //# sourceMappingURL=find-up.d.ts.map
@@ -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"}
@@ -1 +1,2 @@
1
1
  export declare const slash: (str: string) => string;
2
+ //# sourceMappingURL=fs.d.ts.map
@@ -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"}
@@ -1 +1,2 @@
1
1
  export declare function wrapLogError(id: string, cb: () => unknown): Promise<void>;
2
+ //# sourceMappingURL=log.d.ts.map
@@ -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"}
@@ -1 +1,2 @@
1
1
  export declare function slugify(str: string): string;
2
+ //# sourceMappingURL=slugify.d.ts.map
@@ -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"}
@@ -1,2 +1,3 @@
1
1
  export declare const __dirname: string;
2
2
  export declare function getInjectedImport(request: string): string;
3
+ //# sourceMappingURL=vendors.d.ts.map
@@ -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
- return JSON.stringify(id);
16
+ if (path.isAbsolute(id)) {
17
+ return JSON.stringify(pathToFileURL(id).href);
18
+ }
19
+ else {
20
+ return JSON.stringify(id);
21
+ }
17
22
  }
@@ -1 +1,2 @@
1
1
  export * from '@histoire/controls';
2
+ //# sourceMappingURL=controls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../../src/node/vendors/controls.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1 +1,2 @@
1
1
  export * from '@histoire/vendors/vue';
2
+ //# sourceMappingURL=vue.d.ts.map
@@ -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 = "/__resolved__virtual:$histoire-config";
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 = "/__resolved__virtual:$histoire-theme.css";
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 = "/__resolved__virtual:$histoire-search-title-data";
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 = "/__resolved__virtual:$histoire-search-docs-data";
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 = "/__resolved__virtual:$histoire-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 = "/__resolved__virtual:$histoire-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 = "/__resolved__virtual:$histoire-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 = "/__resolved__virtual:$histoire-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 = "/__resolved__virtual:$histoire-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
- // export const RESOLVED_CONFIG_ID = `\0${CONFIG_ID}`
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
- // export const RESOLVED_THEME_ID = `\0${THEME_ID}.css`
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
- // export const RESOLVED_SEARCH_TITLE_DATA_ID = `\0${SEARCH_TITLE_DATA_ID}`
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
- // export const RESOLVED_SEARCH_DOCS_DATA_ID = `\0${SEARCH_DOCS_DATA_ID}`
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
- // export const RESOLVED_GENERATED_GLOBAL_SETUP = `\0${GENERATED_GLOBAL_SETUP}`
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
- // export const RESOLVED_GENERATED_SETUP_CODE = `\0${GENERATED_SETUP_CODE}`
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
- // export const RESOLVED_SUPPORT_PLUGINS_CLIENT = `\0${SUPPORT_PLUGINS_CLIENT}`
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
- // export const RESOLVED_SUPPORT_PLUGINS_COLLECT = `\0${SUPPORT_PLUGINS_COLLECT}`
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
- // export const RESOLVED_MARKDOWN_FILES = `\0${MARKDOWN_FILES}`
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';
@@ -1,2 +1,3 @@
1
1
  import type { Context } from '../context.js';
2
2
  export declare function markdown(ctx: Context, id: string): string;
3
+ //# sourceMappingURL=markdown.d.ts.map
@@ -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"}
@@ -1 +1,2 @@
1
1
  export declare const noop: () => string;
2
+ //# sourceMappingURL=noop.d.ts.map
@@ -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"}
@@ -1,2 +1,3 @@
1
1
  import type { Context } from '../context.js';
2
2
  export declare function resolvedCommands(ctx: Context): string;
3
+ //# sourceMappingURL=resolved-commands.d.ts.map
@@ -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"}
@@ -1,2 +1,3 @@
1
1
  import type { Context } from '../context.js';
2
2
  export declare function resolvedConfig(ctx: Context): string;
3
+ //# sourceMappingURL=resolved-config.d.ts.map
@@ -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"}
@@ -1,2 +1,3 @@
1
1
  import type { Context } from '../context.js';
2
2
  export declare function resolvedGeneratedGlobalSetup(ctx: Context): string;
3
+ //# sourceMappingURL=resolved-generated-global-setup.d.ts.map
@@ -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"}