fuma-content 1.2.2 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/dist/async-cache-C47yxLCv.js +0 -2
  2. package/dist/bin.js +0 -2
  3. package/dist/{build-mdx-C8u32vDa.js → build-mdx-DjMJg3TP.js} +1 -3
  4. package/dist/bun/index.d.ts +2 -3
  5. package/dist/bun/index.js +1 -3
  6. package/dist/{bun-NahDFkhR.js → bun-qVjHRKNw.js} +0 -2
  7. package/dist/{code-generator-pLUE7Rk7.js → code-generator-DFGEY6P5.js} +12 -14
  8. package/dist/collections/data/runtime.d.ts +6 -6
  9. package/dist/collections/data/runtime.js +0 -2
  10. package/dist/collections/data.d.ts +4 -5
  11. package/dist/collections/data.js +4 -6
  12. package/dist/collections/fs.d.ts +1 -1
  13. package/dist/collections/fs.js +10 -12
  14. package/dist/collections/index.d.ts +1 -1
  15. package/dist/collections/index.js +1 -1
  16. package/dist/collections/json/loader-webpack.d.ts +2 -3
  17. package/dist/collections/json/loader-webpack.js +1 -5
  18. package/dist/collections/mdx/loader-webpack.d.ts +2 -3
  19. package/dist/collections/mdx/loader-webpack.js +1 -5
  20. package/dist/collections/mdx/react.d.ts +3 -4
  21. package/dist/collections/mdx/react.js +0 -2
  22. package/dist/collections/mdx/runtime-browser.d.ts +2 -2
  23. package/dist/collections/mdx/runtime-browser.js +0 -2
  24. package/dist/collections/mdx/runtime-dynamic.d.ts +8 -7
  25. package/dist/collections/mdx/runtime-dynamic.js +4 -7
  26. package/dist/collections/mdx/runtime.d.ts +1 -1
  27. package/dist/collections/mdx/runtime.js +0 -2
  28. package/dist/collections/mdx/vue.d.ts +7 -8
  29. package/dist/collections/mdx/vue.js +0 -2
  30. package/dist/collections/mdx.d.ts +1 -1
  31. package/dist/collections/mdx.js +3 -5
  32. package/dist/collections/obsidian.d.ts +2 -3
  33. package/dist/collections/obsidian.js +4 -7
  34. package/dist/collections/runtime/file-store.d.ts +1 -1
  35. package/dist/collections/runtime/file-store.js +0 -2
  36. package/dist/collections/runtime/store.d.ts +1 -1
  37. package/dist/collections/runtime/store.js +7 -9
  38. package/dist/collections/yaml/loader-webpack.d.ts +2 -3
  39. package/dist/collections/yaml/loader-webpack.js +1 -5
  40. package/dist/{collections-Cl-23FUa.js → collections-Bl9hpWMS.js} +4 -6
  41. package/dist/config/index.d.ts +2 -2
  42. package/dist/config/index.js +0 -2
  43. package/dist/{core-Dkl2eUwU.js → core-CrYszxmc.js} +8 -11
  44. package/dist/{core-1dkeRoD-.d.ts → core-Dmd3yqUH.d.ts} +15 -16
  45. package/dist/{dynamic-DGbONJ46.d.ts → dynamic-C15fv7uG.d.ts} +2 -3
  46. package/dist/dynamic.d.ts +1 -1
  47. package/dist/dynamic.js +1 -3
  48. package/dist/{file-store-NLjnayNa.d.ts → file-store-Bs81Afz5.d.ts} +2 -3
  49. package/dist/{flatten-m0wfHxLH.js → flatten-Db7WzTB7.js} +0 -2
  50. package/dist/{fs-C8dHWQw9.d.ts → fs-DYfoYdl-.d.ts} +3 -7
  51. package/dist/{git-W7QH8hQh.d.ts → git-C0-Uazuh.d.ts} +2 -3
  52. package/dist/{index-h97OPng4.d.ts → index-Dfg2QKTT.d.ts} +3 -4
  53. package/dist/index.d.ts +2 -3
  54. package/dist/index.js +2 -2
  55. package/dist/is-promise-like-C04ERo2r.js +0 -2
  56. package/dist/{load-from-file-C3CnD8mJ.js → load-from-file-DpW8who8.js} +0 -2
  57. package/dist/{loader-ol04zeoP.js → loader-B19JQedw.js} +0 -2
  58. package/dist/{loader-CyhM9SLt.js → loader-BTPxE-0W.js} +3 -5
  59. package/dist/{loader-e2SkeDfY.js → loader-CORy1xd9.js} +1 -3
  60. package/dist/{loader-D_sKOzDc.js → loader-DJcLC5Gg.js} +1 -3
  61. package/dist/{mdx-CBjuia2v.d.ts → mdx-0plToRQa.d.ts} +3 -4
  62. package/dist/next/index.d.ts +2 -3
  63. package/dist/next/index.js +2 -4
  64. package/dist/node/index.d.ts +1 -2
  65. package/dist/node/index.js +0 -2
  66. package/dist/node/loader.d.ts +2 -3
  67. package/dist/node/loader.js +1 -3
  68. package/dist/{node-Du4i4XDg.js → node--IKK4_8Y.js} +0 -2
  69. package/dist/plugins/git.d.ts +1 -1
  70. package/dist/plugins/git.js +1 -3
  71. package/dist/plugins/json-schema.d.ts +2 -3
  72. package/dist/plugins/json-schema.js +1 -3
  73. package/dist/plugins/loader/index.d.ts +1 -1
  74. package/dist/plugins/loader/index.js +4 -6
  75. package/dist/plugins/loader/webpack.d.ts +1 -1
  76. package/dist/plugins/loader/webpack.js +1 -3
  77. package/dist/plugins/remark/include.d.ts +1 -2
  78. package/dist/plugins/remark/include.js +4 -5
  79. package/dist/{runtime-CY1liEj_.d.ts → runtime-4S3BDs-G.d.ts} +8 -7
  80. package/dist/{runtime-browser-BqhaLAei.d.ts → runtime-browser-CXjm3FXK.d.ts} +7 -7
  81. package/dist/{store-DySTeDAM.d.ts → store-j10gHjm1.d.ts} +3 -5
  82. package/dist/utils/frontmatter.d.ts +15 -0
  83. package/dist/{fuma-matter-E30PU53R.js → utils/frontmatter.js} +3 -5
  84. package/dist/validation-Bf_v2L3p.js +0 -2
  85. package/dist/vite/index.d.ts +2 -3
  86. package/dist/vite/index.js +2 -4
  87. package/dist/{vite-DVIOnBqW.js → vite-myuLielb.js} +0 -2
  88. package/package.json +24 -20
  89. package/dist/async-cache-C47yxLCv.js.map +0 -1
  90. package/dist/bin.js.map +0 -1
  91. package/dist/build-mdx-C8u32vDa.js.map +0 -1
  92. package/dist/bun/index.d.ts.map +0 -1
  93. package/dist/bun/index.js.map +0 -1
  94. package/dist/bun-NahDFkhR.js.map +0 -1
  95. package/dist/code-generator-pLUE7Rk7.js.map +0 -1
  96. package/dist/collections/data/runtime.d.ts.map +0 -1
  97. package/dist/collections/data/runtime.js.map +0 -1
  98. package/dist/collections/data.d.ts.map +0 -1
  99. package/dist/collections/data.js.map +0 -1
  100. package/dist/collections/fs.js.map +0 -1
  101. package/dist/collections/json/loader-webpack.d.ts.map +0 -1
  102. package/dist/collections/json/loader-webpack.js.map +0 -1
  103. package/dist/collections/mdx/loader-webpack.d.ts.map +0 -1
  104. package/dist/collections/mdx/loader-webpack.js.map +0 -1
  105. package/dist/collections/mdx/react.d.ts.map +0 -1
  106. package/dist/collections/mdx/react.js.map +0 -1
  107. package/dist/collections/mdx/runtime-browser.js.map +0 -1
  108. package/dist/collections/mdx/runtime-dynamic.d.ts.map +0 -1
  109. package/dist/collections/mdx/runtime-dynamic.js.map +0 -1
  110. package/dist/collections/mdx/runtime.js.map +0 -1
  111. package/dist/collections/mdx/vue.d.ts.map +0 -1
  112. package/dist/collections/mdx/vue.js.map +0 -1
  113. package/dist/collections/mdx.js.map +0 -1
  114. package/dist/collections/obsidian.d.ts.map +0 -1
  115. package/dist/collections/obsidian.js.map +0 -1
  116. package/dist/collections/runtime/file-store.js.map +0 -1
  117. package/dist/collections/runtime/store.js.map +0 -1
  118. package/dist/collections/yaml/loader-webpack.d.ts.map +0 -1
  119. package/dist/collections/yaml/loader-webpack.js.map +0 -1
  120. package/dist/collections-Cl-23FUa.js.map +0 -1
  121. package/dist/config/index.js.map +0 -1
  122. package/dist/core-1dkeRoD-.d.ts.map +0 -1
  123. package/dist/core-Dkl2eUwU.js.map +0 -1
  124. package/dist/dynamic-DGbONJ46.d.ts.map +0 -1
  125. package/dist/dynamic.js.map +0 -1
  126. package/dist/file-store-NLjnayNa.d.ts.map +0 -1
  127. package/dist/flatten-m0wfHxLH.js.map +0 -1
  128. package/dist/fs-C8dHWQw9.d.ts.map +0 -1
  129. package/dist/fuma-matter-E30PU53R.js.map +0 -1
  130. package/dist/git-W7QH8hQh.d.ts.map +0 -1
  131. package/dist/index-h97OPng4.d.ts.map +0 -1
  132. package/dist/index.d.ts.map +0 -1
  133. package/dist/is-promise-like-C04ERo2r.js.map +0 -1
  134. package/dist/load-from-file-C3CnD8mJ.js.map +0 -1
  135. package/dist/loader-CyhM9SLt.js.map +0 -1
  136. package/dist/loader-D_sKOzDc.js.map +0 -1
  137. package/dist/loader-e2SkeDfY.js.map +0 -1
  138. package/dist/loader-ol04zeoP.js.map +0 -1
  139. package/dist/mdx-CBjuia2v.d.ts.map +0 -1
  140. package/dist/next/index.d.ts.map +0 -1
  141. package/dist/next/index.js.map +0 -1
  142. package/dist/node/index.d.ts.map +0 -1
  143. package/dist/node/index.js.map +0 -1
  144. package/dist/node/loader.d.ts.map +0 -1
  145. package/dist/node/loader.js.map +0 -1
  146. package/dist/node-Du4i4XDg.js.map +0 -1
  147. package/dist/plugins/git.js.map +0 -1
  148. package/dist/plugins/json-schema.d.ts.map +0 -1
  149. package/dist/plugins/json-schema.js.map +0 -1
  150. package/dist/plugins/loader/index.js.map +0 -1
  151. package/dist/plugins/loader/webpack.js.map +0 -1
  152. package/dist/plugins/remark/include.d.ts.map +0 -1
  153. package/dist/plugins/remark/include.js.map +0 -1
  154. package/dist/runtime-CY1liEj_.d.ts.map +0 -1
  155. package/dist/runtime-browser-BqhaLAei.d.ts.map +0 -1
  156. package/dist/store-DySTeDAM.d.ts.map +0 -1
  157. package/dist/validation-Bf_v2L3p.js.map +0 -1
  158. package/dist/vite/index.d.ts.map +0 -1
  159. package/dist/vite/index.js.map +0 -1
  160. package/dist/vite-DVIOnBqW.js.map +0 -1
@@ -26,5 +26,3 @@ function createCache(store = /* @__PURE__ */ new Map()) {
26
26
  }
27
27
  //#endregion
28
28
  export { createCache as t };
29
-
30
- //# sourceMappingURL=async-cache-C47yxLCv.js.map
package/dist/bin.js CHANGED
@@ -20,5 +20,3 @@ async function start() {
20
20
  start();
21
21
  //#endregion
22
22
  export {};
23
-
24
- //# sourceMappingURL=bin.js.map
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-CiIaOW0V.js";
2
2
  import { t as createCache } from "./async-cache-C47yxLCv.js";
3
- import { t as flattenNode } from "./flatten-m0wfHxLH.js";
3
+ import { t as flattenNode } from "./flatten-Db7WzTB7.js";
4
4
  import { visit } from "unist-util-visit";
5
5
  import { VFile } from "vfile";
6
6
  import { createProcessor } from "@mdx-js/mdx";
@@ -154,5 +154,3 @@ async function buildMDX({ core, collection, filePath, frontmatter, source, compi
154
154
  }
155
155
  //#endregion
156
156
  export { build_mdx_exports as n, buildMDX as t };
157
-
158
- //# sourceMappingURL=build-mdx-C8u32vDa.js.map
@@ -1,4 +1,4 @@
1
- import { n as CoreOptions, t as Core } from "../core-1dkeRoD-.js";
1
+ import { n as CoreOptions, t as Core } from "../core-Dmd3yqUH.js";
2
2
  import { BunPlugin } from "bun";
3
3
 
4
4
  //#region src/bun/index.d.ts
@@ -8,5 +8,4 @@ declare class BunCore extends Core {
8
8
  createBunPlugin(): BunPlugin;
9
9
  }
10
10
  //#endregion
11
- export { BunCore, BunOptions, createContent };
12
- //# sourceMappingURL=index.d.ts.map
11
+ export { BunCore, BunOptions, createContent };
package/dist/bun/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as Core } from "../core-Dkl2eUwU.js";
1
+ import { t as Core } from "../core-CrYszxmc.js";
2
2
  import { loaderPlugin } from "../plugins/loader/index.js";
3
3
  import { pathToFileURL } from "node:url";
4
4
  //#region src/bun/index.ts
@@ -27,5 +27,3 @@ var BunCore = class extends Core {
27
27
  };
28
28
  //#endregion
29
29
  export { BunCore, createContent };
30
-
31
- //# sourceMappingURL=index.js.map
@@ -31,5 +31,3 @@ function toBun(test = /.+/, loader) {
31
31
  }
32
32
  //#endregion
33
33
  export { toBun };
34
-
35
- //# sourceMappingURL=bun-NahDFkhR.js.map
@@ -5,9 +5,9 @@ import { URLSearchParams } from "node:url";
5
5
  * Code generator (one instance per file)
6
6
  */
7
7
  var CodeGenerator = class {
8
- lines = [];
9
- importInfos = /* @__PURE__ */ new Map();
10
- eagerImportId = 0;
8
+ #lines = [];
9
+ #importInfos = /* @__PURE__ */ new Map();
10
+ #eagerImportId = 0;
11
11
  options;
12
12
  constructor({ jsExtension = false, outDir = "" }) {
13
13
  this.options = {
@@ -16,8 +16,8 @@ var CodeGenerator = class {
16
16
  };
17
17
  }
18
18
  addNamespaceImport(namespace, specifier, typeOnly = false) {
19
- const info = this.importInfos.get(specifier) ?? {};
20
- this.importInfos.set(specifier, info);
19
+ const info = this.#importInfos.get(specifier) ?? {};
20
+ this.#importInfos.set(specifier, info);
21
21
  if (!typeOnly) {
22
22
  info.isUsed ??= /* @__PURE__ */ new Set();
23
23
  info.isUsed.add(namespace);
@@ -26,8 +26,8 @@ var CodeGenerator = class {
26
26
  info.namespaces.add(namespace);
27
27
  }
28
28
  addNamedImport(names, specifier, typeOnly = false) {
29
- const info = this.importInfos.get(specifier) ?? {};
30
- this.importInfos.set(specifier, info);
29
+ const info = this.#importInfos.get(specifier) ?? {};
30
+ this.#importInfos.set(specifier, info);
31
31
  info.named ??= /* @__PURE__ */ new Map();
32
32
  for (const name of names) {
33
33
  const [memberName, importName = memberName] = name.split(/\s+as\s+/, 2);
@@ -39,17 +39,17 @@ var CodeGenerator = class {
39
39
  }
40
40
  }
41
41
  push(...insert) {
42
- this.lines.push(...insert);
42
+ this.#lines.push(...insert);
43
43
  }
44
44
  async pushAsync(insert) {
45
45
  for (const line of await Promise.all(insert)) {
46
46
  if (line === void 0) continue;
47
- this.lines.push(line);
47
+ this.#lines.push(line);
48
48
  }
49
49
  }
50
50
  /** generate a random import name that is unique in file. */
51
51
  generateImportName() {
52
- return `__${this.eagerImportId++}`;
52
+ return `__${this.#eagerImportId++}`;
53
53
  }
54
54
  formatDynamicImport(specifier, mod) {
55
55
  let s = `import("${specifier}")`;
@@ -80,7 +80,7 @@ var CodeGenerator = class {
80
80
  }
81
81
  toString() {
82
82
  const final = ["// @ts-nocheck"];
83
- for (const [specifier, { namespaces, isUsed, named }] of this.importInfos) {
83
+ for (const [specifier, { namespaces, isUsed, named }] of this.#importInfos) {
84
84
  if (namespaces) for (const namespace of namespaces) final.push(isUsed?.has(namespace) ? `import * as ${namespace} from "${specifier}";` : `import type * as ${namespace} from "${specifier}";`);
85
85
  if (named && named.size > 0) {
86
86
  const namedImports = [];
@@ -91,7 +91,7 @@ var CodeGenerator = class {
91
91
  final.push(`import { ${namedImports.join(", ")} } from "${specifier}";`);
92
92
  }
93
93
  }
94
- final.push(...this.lines);
94
+ final.push(...this.#lines);
95
95
  return final.join("\n");
96
96
  }
97
97
  };
@@ -101,5 +101,3 @@ function slash(path) {
101
101
  }
102
102
  //#endregion
103
103
  export { slash as n, CodeGenerator as t };
104
-
105
- //# sourceMappingURL=code-generator-pLUE7Rk7.js.map
@@ -1,11 +1,11 @@
1
- import { D as GetCollectionConfig } from "../../core-1dkeRoD-.js";
2
- import { DataCollection } from "../data.js";
3
- import { t as FileCollectionStore } from "../../file-store-NLjnayNa.js";
1
+ import { D as GetCollectionConfig } from "../../core-Dmd3yqUH.js";
2
+ import { t as FileCollectionStore } from "../../file-store-Bs81Afz5.js";
4
3
 
5
4
  //#region src/collections/data/runtime.d.ts
6
5
  declare function dataStore<Config, Name extends string>(_name: Name, base: string, input: Record<string, unknown>): FileCollectionStore<{
7
- data: GetCollectionConfig<Config, Name> extends DataCollection ? GetCollectionConfig<Config, Name>["$inferOutput"] : never;
6
+ data: GetCollectionConfig<Config, Name> extends {
7
+ $inferOutput: unknown;
8
+ } ? GetCollectionConfig<Config, Name>["$inferOutput"] : never;
8
9
  }>;
9
10
  //#endregion
10
- export { dataStore };
11
- //# sourceMappingURL=runtime.d.ts.map
11
+ export { dataStore };
@@ -7,5 +7,3 @@ function dataStore(_name, base, input) {
7
7
  }
8
8
  //#endregion
9
9
  export { dataStore };
10
-
11
- //# sourceMappingURL=runtime.js.map
@@ -1,6 +1,6 @@
1
- import { v as AsyncPipe } from "../core-1dkeRoD-.js";
2
- import { n as LoaderConfig } from "../index-h97OPng4.js";
3
- import { n as FileSystemCollectionConfig, t as FileSystemCollection } from "../fs-C8dHWQw9.js";
1
+ import { v as AsyncPipe } from "../core-Dmd3yqUH.js";
2
+ import { n as LoaderConfig } from "../index-Dfg2QKTT.js";
3
+ import { n as FileSystemCollectionConfig, t as FileSystemCollection } from "../fs-DYfoYdl-.js";
4
4
  import { StandardSchemaV1 } from "@standard-schema/spec";
5
5
 
6
6
  //#region src/collections/data.d.ts
@@ -42,5 +42,4 @@ declare function dataCollection<Schema extends StandardSchemaV1 | undefined = un
42
42
  declare function yamlLoader(): LoaderConfig;
43
43
  declare function jsonLoader(): LoaderConfig;
44
44
  //#endregion
45
- export { DataCollection, DataCollectionConfig, DataTransformationContext, dataCollection, jsonLoader, yamlLoader };
46
- //# sourceMappingURL=data.d.ts.map
45
+ export { DataCollection, DataCollectionConfig, DataTransformationContext, dataCollection, jsonLoader, yamlLoader };
@@ -1,5 +1,5 @@
1
- import { r as asyncPipe } from "../collections-Cl-23FUa.js";
2
- import { n as slash } from "../code-generator-pLUE7Rk7.js";
1
+ import { r as asyncPipe } from "../collections-Bl9hpWMS.js";
2
+ import { n as slash } from "../code-generator-DFGEY6P5.js";
3
3
  import { loaderHook } from "../plugins/loader/index.js";
4
4
  import { FileSystemCollection } from "./fs.js";
5
5
  import path from "node:path";
@@ -101,7 +101,7 @@ function yamlLoader() {
101
101
  };
102
102
  },
103
103
  async createLoader() {
104
- const { createYamlLoader } = await import("../loader-D_sKOzDc.js").then((n) => n.n);
104
+ const { createYamlLoader } = await import("../loader-DJcLC5Gg.js").then((n) => n.n);
105
105
  const core = this.core;
106
106
  return createYamlLoader({ getCore: () => core });
107
107
  }
@@ -146,7 +146,7 @@ function jsonLoader() {
146
146
  };
147
147
  },
148
148
  async createLoader(environment) {
149
- const { createJsonLoader } = await import("../loader-e2SkeDfY.js").then((n) => n.n);
149
+ const { createJsonLoader } = await import("../loader-CORy1xd9.js").then((n) => n.n);
150
150
  const core = this.core;
151
151
  return createJsonLoader({ getCore: () => core }, environment === "vite" ? "json" : "js");
152
152
  }
@@ -154,5 +154,3 @@ function jsonLoader() {
154
154
  }
155
155
  //#endregion
156
156
  export { DataCollection, dataCollection, jsonLoader, yamlLoader };
157
-
158
- //# sourceMappingURL=data.js.map
@@ -1,2 +1,2 @@
1
- import { n as FileSystemCollectionConfig, r as fileSystemCollection, t as FileSystemCollection } from "../fs-C8dHWQw9.js";
1
+ import { n as FileSystemCollectionConfig, r as fileSystemCollection, t as FileSystemCollection } from "../fs-DYfoYdl-.js";
2
2
  export { FileSystemCollection, FileSystemCollectionConfig, fileSystemCollection };
@@ -1,23 +1,23 @@
1
- import { t as Collection } from "../collections-Cl-23FUa.js";
1
+ import { t as Collection } from "../collections-Bl9hpWMS.js";
2
2
  import { t as createCache } from "../async-cache-C47yxLCv.js";
3
3
  import path from "node:path";
4
4
  import picomatch from "picomatch";
5
5
  //#region src/collections/fs.ts
6
6
  var FileSystemCollection = class extends Collection {
7
- matcher;
7
+ #matcher;
8
8
  /**
9
9
  * content directory (absolute)
10
10
  */
11
11
  dir;
12
- filesCache = createCache();
12
+ #filesCache = createCache();
13
13
  /** the glob patterns to match files in collection, this doesn't take `supportedFormats` into account. */
14
- patterns;
14
+ #patterns;
15
15
  supportedFileFormats;
16
16
  constructor(config) {
17
17
  super();
18
18
  const { files, supportedFormats } = config;
19
19
  this.dir = config.dir;
20
- this.patterns = files ?? [supportedFormats ? `**/*.{${supportedFormats.join(",")}}` : `**/*`];
20
+ this.#patterns = files ?? [supportedFormats ? `**/*.{${supportedFormats.join(",")}}` : `**/*`];
21
21
  this.supportedFileFormats = supportedFormats;
22
22
  this.onInit.hook(({ core }) => {
23
23
  this.dir = path.resolve(core.getOptions().cwd, this.dir);
@@ -27,7 +27,7 @@ var FileSystemCollection = class extends Collection {
27
27
  server.watcher.add(this.dir);
28
28
  server.watcher.on("all", (event, file) => {
29
29
  if (event === "change" || !this.hasFile(file)) return;
30
- this.filesCache.invalidate("");
30
+ this.#filesCache.invalidate("");
31
31
  });
32
32
  });
33
33
  }
@@ -41,19 +41,19 @@ var FileSystemCollection = class extends Collection {
41
41
  * the result is cached.
42
42
  */
43
43
  async getFiles() {
44
- return this.filesCache.cached("", async () => {
44
+ return this.#filesCache.cached("", async () => {
45
45
  const { glob } = await import("tinyglobby");
46
- return (await glob(this.patterns, { cwd: this.dir })).filter((v) => this.isFileSupported(v));
46
+ return (await glob(this.#patterns, { cwd: this.dir })).filter((v) => this.isFileSupported(v));
47
47
  });
48
48
  }
49
49
  hasFile(filePath) {
50
50
  if (!this.isFileSupported(filePath)) return false;
51
51
  const relativePath = path.relative(this.dir, filePath);
52
52
  if (relativePath.startsWith(`..${path.sep}`)) return false;
53
- return (this.matcher ??= picomatch(this.patterns))(relativePath);
53
+ return (this.#matcher ??= picomatch(this.#patterns))(relativePath);
54
54
  }
55
55
  invalidateCache() {
56
- this.filesCache.invalidate("");
56
+ this.#filesCache.invalidate("");
57
57
  }
58
58
  };
59
59
  function fileSystemCollection(config) {
@@ -61,5 +61,3 @@ function fileSystemCollection(config) {
61
61
  }
62
62
  //#endregion
63
63
  export { FileSystemCollection, fileSystemCollection };
64
-
65
- //# sourceMappingURL=fs.js.map
@@ -1,2 +1,2 @@
1
- import { _ as defineCollectionHook, g as CollectionHookContext, h as CollectionHook, m as Collection } from "../core-1dkeRoD-.js";
1
+ import { _ as defineCollectionHook, g as CollectionHookContext, h as CollectionHook, m as Collection } from "../core-Dmd3yqUH.js";
2
2
  export { Collection, CollectionHook, CollectionHookContext, defineCollectionHook };
@@ -1,2 +1,2 @@
1
- import { n as defineCollectionHook, t as Collection } from "../collections-Cl-23FUa.js";
1
+ import { n as defineCollectionHook, t as Collection } from "../collections-Bl9hpWMS.js";
2
2
  export { Collection, defineCollectionHook };
@@ -1,7 +1,6 @@
1
- import { c as WebpackLoader } from "../../index-h97OPng4.js";
1
+ import { c as WebpackLoader } from "../../index-Dfg2QKTT.js";
2
2
 
3
3
  //#region src/collections/json/loader-webpack.d.ts
4
4
  declare const _default: WebpackLoader;
5
5
  //#endregion
6
- export { _default as default };
7
- //# sourceMappingURL=loader-webpack.d.ts.map
6
+ export { _default as default };
@@ -1,10 +1,6 @@
1
- import "../../validation-Bf_v2L3p.js";
2
1
  import { createWebpackLoader } from "../../plugins/loader/webpack.js";
3
- import "../../loader-ol04zeoP.js";
4
- import { t as createJsonLoader } from "../../loader-e2SkeDfY.js";
2
+ import { t as createJsonLoader } from "../../loader-CORy1xd9.js";
5
3
  //#region src/collections/json/loader-webpack.ts
6
4
  var loader_webpack_default = createWebpackLoader((core) => createJsonLoader(core, "json"));
7
5
  //#endregion
8
6
  export { loader_webpack_default as default };
9
-
10
- //# sourceMappingURL=loader-webpack.js.map
@@ -1,7 +1,6 @@
1
- import { c as WebpackLoader } from "../../index-h97OPng4.js";
1
+ import { c as WebpackLoader } from "../../index-Dfg2QKTT.js";
2
2
 
3
3
  //#region src/collections/mdx/loader-webpack.d.ts
4
4
  declare const _default: WebpackLoader;
5
5
  //#endregion
6
- export { _default as default };
7
- //# sourceMappingURL=loader-webpack.d.ts.map
6
+ export { _default as default };
@@ -1,10 +1,6 @@
1
- import "../../validation-Bf_v2L3p.js";
2
- import "../../fuma-matter-E30PU53R.js";
3
1
  import { createWebpackLoader } from "../../plugins/loader/webpack.js";
4
- import { t as createMdxLoader } from "../../loader-CyhM9SLt.js";
2
+ import { t as createMdxLoader } from "../../loader-BTPxE-0W.js";
5
3
  //#region src/collections/mdx/loader-webpack.ts
6
4
  var loader_webpack_default = createWebpackLoader(createMdxLoader);
7
5
  //#endregion
8
6
  export { loader_webpack_default as default };
9
-
10
- //# sourceMappingURL=loader-webpack.js.map
@@ -1,5 +1,5 @@
1
- import { i as CompiledMDX } from "../../mdx-CBjuia2v.js";
2
- import { t as MDXStoreBrowserData } from "../../runtime-browser-BqhaLAei.js";
1
+ import { i as CompiledMDX } from "../../mdx-0plToRQa.js";
2
+ import { t as MDXStoreBrowserData } from "../../runtime-browser-CXjm3FXK.js";
3
3
  import { ReactNode } from "react";
4
4
 
5
5
  //#region src/collections/mdx/react.d.ts
@@ -10,5 +10,4 @@ import { ReactNode } from "react";
10
10
  */
11
11
  declare function useRenderer<Frontmatter, Attached>(entry: MDXStoreBrowserData<Frontmatter, Attached> | undefined, renderFn: (data: CompiledMDX<Frontmatter> & Attached) => ReactNode): ReactNode;
12
12
  //#endregion
13
- export { useRenderer };
14
- //# sourceMappingURL=react.d.ts.map
13
+ export { useRenderer };
@@ -31,5 +31,3 @@ function useRenderer(entry, renderFn) {
31
31
  }
32
32
  //#endregion
33
33
  export { useRenderer };
34
-
35
- //# sourceMappingURL=react.js.map
@@ -1,3 +1,3 @@
1
- import { n as _internal_data, r as mdxStoreBrowser, t as MDXStoreBrowserData } from "../../runtime-browser-BqhaLAei.js";
2
- import { r as WithGit } from "../../runtime-CY1liEj_.js";
1
+ import { n as _internal_data, r as mdxStoreBrowser, t as MDXStoreBrowserData } from "../../runtime-browser-CXjm3FXK.js";
2
+ import { r as WithGit } from "../../runtime-4S3BDs-G.js";
3
3
  export { MDXStoreBrowserData, WithGit, _internal_data, mdxStoreBrowser };
@@ -25,5 +25,3 @@ function mdxStoreBrowser(name, _input) {
25
25
  }
26
26
  //#endregion
27
27
  export { _internal_data, mdxStoreBrowser };
28
-
29
- //# sourceMappingURL=runtime-browser.js.map
@@ -1,7 +1,7 @@
1
- import { D as GetCollectionConfig, n as CoreOptions } from "../../core-1dkeRoD-.js";
2
- import { t as FileCollectionStore } from "../../file-store-NLjnayNa.js";
3
- import { i as CompiledMDX, t as MDXCollection } from "../../mdx-CBjuia2v.js";
4
- import { r as WithGit } from "../../runtime-CY1liEj_.js";
1
+ import { D as GetCollectionConfig, n as CoreOptions } from "../../core-Dmd3yqUH.js";
2
+ import { t as FileCollectionStore } from "../../file-store-Bs81Afz5.js";
3
+ import { i as CompiledMDX } from "../../mdx-0plToRQa.js";
4
+ import { r as WithGit } from "../../runtime-4S3BDs-G.js";
5
5
  import { MDXContent } from "mdx/types";
6
6
 
7
7
  //#region src/collections/mdx/runtime-dynamic.d.ts
@@ -10,9 +10,10 @@ interface MDXStoreDynamicData<Frontmatter, Attached = unknown> {
10
10
  frontmatter: Frontmatter;
11
11
  compile: () => Promise<CompiledMDX<Frontmatter> & Attached>;
12
12
  }
13
- type GetFrontmatter<Config, Name extends string> = GetCollectionConfig<Config, Name> extends MDXCollection ? GetCollectionConfig<Config, Name>["$inferFrontmatter"] : never;
13
+ type GetFrontmatter<Config, Name extends string> = GetCollectionConfig<Config, Name> extends {
14
+ $inferFrontmatter: unknown;
15
+ } ? GetCollectionConfig<Config, Name>["$inferFrontmatter"] : never;
14
16
  declare function mdxStoreDynamic<Config, Name extends string, Attached>(config: Config, coreOptions: CoreOptions, name: Name, base: string, _frontmatter: Record<string, unknown>, jsxRuntime: unknown): Promise<FileCollectionStore<MDXStoreDynamicData<GetFrontmatter<Config, Name>, Attached>>>;
15
17
  type MdxContent = MDXContent;
16
18
  //#endregion
17
- export { MDXStoreDynamicData, MdxContent, type WithGit, mdxStoreDynamic };
18
- //# sourceMappingURL=runtime-dynamic.d.ts.map
19
+ export { MDXStoreDynamicData, MdxContent, type WithGit, mdxStoreDynamic };
@@ -1,10 +1,9 @@
1
- import { t as Core } from "../../core-Dkl2eUwU.js";
2
- import "../../validation-Bf_v2L3p.js";
1
+ import { t as Core } from "../../core-CrYszxmc.js";
3
2
  import { t as createCache } from "../../async-cache-C47yxLCv.js";
4
3
  import { MDXCollection } from "../mdx.js";
5
- import { t as fumaMatter } from "../../fuma-matter-E30PU53R.js";
4
+ import { parseFrontmatter } from "../../utils/frontmatter.js";
6
5
  import { FileCollectionStore } from "../runtime/file-store.js";
7
- import { t as buildMDX } from "../../build-mdx-C8u32vDa.js";
6
+ import { t as buildMDX } from "../../build-mdx-DjMJg3TP.js";
8
7
  import fs from "node:fs/promises";
9
8
  import path from "node:path";
10
9
  import { pathToFileURL } from "node:url";
@@ -29,7 +28,7 @@ async function mdxStoreDynamic(config, coreOptions, name, base, _frontmatter, js
29
28
  return cache.cached(k, async () => {
30
29
  const filePath = path.join(base, k);
31
30
  let content = (await fs.readFile(filePath)).toString();
32
- content = fumaMatter(content).content;
31
+ content = parseFrontmatter(content).content;
33
32
  const compiled = await buildMDX({
34
33
  core,
35
34
  collection,
@@ -69,5 +68,3 @@ async function executeMdx(compiled, options = {}) {
69
68
  }
70
69
  //#endregion
71
70
  export { mdxStoreDynamic };
72
-
73
- //# sourceMappingURL=runtime-dynamic.js.map
@@ -1,2 +1,2 @@
1
- import { a as mdxStoreLazy, i as mdxStore, n as MDXStoreLazyData, r as WithGit, t as MDXStoreData } from "../../runtime-CY1liEj_.js";
1
+ import { a as mdxStoreLazy, i as mdxStore, n as MDXStoreLazyData, r as WithGit, t as MDXStoreData } from "../../runtime-4S3BDs-G.js";
2
2
  export { MDXStoreData, MDXStoreLazyData, WithGit, mdxStore, mdxStoreLazy };
@@ -21,5 +21,3 @@ function mdxStoreLazy(_name, base, _input) {
21
21
  }
22
22
  //#endregion
23
23
  export { mdxStore, mdxStoreLazy };
24
-
25
- //# sourceMappingURL=runtime.js.map
@@ -1,10 +1,10 @@
1
- import { i as CompiledMDX } from "../../mdx-CBjuia2v.js";
2
- import { t as MDXStoreBrowserData } from "../../runtime-browser-BqhaLAei.js";
3
- import * as vue from "vue";
1
+ import { i as CompiledMDX } from "../../mdx-0plToRQa.js";
2
+ import { t as MDXStoreBrowserData } from "../../runtime-browser-CXjm3FXK.js";
3
+ import * as _$vue from "vue";
4
4
 
5
5
  //#region src/collections/mdx/vue.vue.d.ts
6
6
  declare const __VLS_export: <Frontmatter, Attached = unknown>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
7
- props: vue.PublicProps & __VLS_PrettifyLocal<{
7
+ props: _$vue.PublicProps & __VLS_PrettifyLocal<{
8
8
  entry?: MDXStoreBrowserData<Frontmatter, Attached>;
9
9
  }> & (typeof globalThis extends {
10
10
  __VLS_PROPS_FALLBACK: infer P;
@@ -17,11 +17,10 @@ declare const __VLS_export: <Frontmatter, Attached = unknown>(__VLS_props: NonNu
17
17
  }) => any;
18
18
  };
19
19
  emit: {};
20
- }>) => vue.VNode & {
20
+ }>) => _$vue.VNode & {
21
21
  __ctx?: Awaited<typeof __VLS_setup>;
22
22
  };
23
23
  declare const _default: typeof __VLS_export;
24
- type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {}; //# sourceMappingURL=vue.vue.d.ts.map
24
+ type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
25
25
  //#endregion
26
- export { _default as Vue };
27
- //# sourceMappingURL=vue.d.ts.map
26
+ export { _default as Vue };
@@ -30,5 +30,3 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
30
30
  });
31
31
  //#endregion
32
32
  export { _sfc_main as Vue };
33
-
34
- //# sourceMappingURL=vue.js.map
@@ -1,2 +1,2 @@
1
- import { a as LinkReference, i as CompiledMDX, n as MDXCollectionConfig, r as mdxCollection, t as MDXCollection } from "../mdx-CBjuia2v.js";
1
+ import { a as LinkReference, i as CompiledMDX, n as MDXCollectionConfig, r as mdxCollection, t as MDXCollection } from "../mdx-0plToRQa.js";
2
2
  export { CompiledMDX, LinkReference, MDXCollection, MDXCollectionConfig, mdxCollection };
@@ -1,5 +1,5 @@
1
- import { i as pipe, r as asyncPipe } from "../collections-Cl-23FUa.js";
2
- import { n as slash } from "../code-generator-pLUE7Rk7.js";
1
+ import { i as pipe, r as asyncPipe } from "../collections-Bl9hpWMS.js";
2
+ import { n as slash } from "../code-generator-DFGEY6P5.js";
3
3
  import { r as validate } from "../validation-Bf_v2L3p.js";
4
4
  import { t as createCache } from "../async-cache-C47yxLCv.js";
5
5
  import { loaderHook } from "../plugins/loader/index.js";
@@ -312,12 +312,10 @@ function mdxLoader() {
312
312
  };
313
313
  },
314
314
  async createLoader() {
315
- const { createMdxLoader } = await import("../loader-CyhM9SLt.js").then((n) => n.n);
315
+ const { createMdxLoader } = await import("../loader-BTPxE-0W.js").then((n) => n.n);
316
316
  return createMdxLoader({ getCore: () => this.core });
317
317
  }
318
318
  };
319
319
  }
320
320
  //#endregion
321
321
  export { MDXCollection, mdxCollection };
322
-
323
- //# sourceMappingURL=mdx.js.map
@@ -1,9 +1,8 @@
1
- import { n as MDXCollectionConfig, t as MDXCollection } from "../mdx-CBjuia2v.js";
1
+ import { n as MDXCollectionConfig, t as MDXCollection } from "../mdx-0plToRQa.js";
2
2
  import { StandardSchemaV1 } from "@standard-schema/spec";
3
3
 
4
4
  //#region src/collections/obsidian.d.ts
5
5
  type MDXObsidianCollectionConfig<FrontmatterSchema extends StandardSchemaV1 | undefined = undefined> = MDXCollectionConfig<FrontmatterSchema>;
6
6
  declare function mdxObsidianCollection<FrontmatterSchema extends StandardSchemaV1 | undefined = undefined>(config: MDXObsidianCollectionConfig<FrontmatterSchema>): MDXCollection<FrontmatterSchema>;
7
7
  //#endregion
8
- export { MDXObsidianCollectionConfig, mdxObsidianCollection };
9
- //# sourceMappingURL=obsidian.d.ts.map
8
+ export { MDXObsidianCollectionConfig, mdxObsidianCollection };
@@ -1,8 +1,7 @@
1
- import { n as slash } from "../code-generator-pLUE7Rk7.js";
2
- import "../validation-Bf_v2L3p.js";
1
+ import { n as slash } from "../code-generator-DFGEY6P5.js";
3
2
  import { MDXCollection, mdxCollection } from "./mdx.js";
4
- import { t as fumaMatter } from "../fuma-matter-E30PU53R.js";
5
- import { t as flattenNode } from "../flatten-m0wfHxLH.js";
3
+ import { parseFrontmatter } from "../utils/frontmatter.js";
4
+ import { t as flattenNode } from "../flatten-Db7WzTB7.js";
6
5
  import { remarkInclude } from "../plugins/remark/include.js";
7
6
  import { readFile } from "node:fs/promises";
8
7
  import path from "node:path";
@@ -47,7 +46,7 @@ async function buildStorage(options) {
47
46
  case ".md":
48
47
  case ".mdx": {
49
48
  const rawContent = await raw.read();
50
- const { data, content } = fumaMatter(rawContent);
49
+ const { data, content } = parseFrontmatter(rawContent);
51
50
  if (enforceMdx) outPath = outPath.slice(0, -path.extname(outPath).length) + ".mdx";
52
51
  parsed = {
53
52
  format: "content",
@@ -534,5 +533,3 @@ function mdxObsidianCollection(config) {
534
533
  }
535
534
  //#endregion
536
535
  export { mdxObsidianCollection };
537
-
538
- //# sourceMappingURL=obsidian.js.map
@@ -1,2 +1,2 @@
1
- import { n as FileInfo, t as FileCollectionStore } from "../../file-store-NLjnayNa.js";
1
+ import { n as FileInfo, t as FileCollectionStore } from "../../file-store-Bs81Afz5.js";
2
2
  export { FileCollectionStore, FileInfo };
@@ -24,5 +24,3 @@ var FileCollectionStore = class extends MapCollectionStore {
24
24
  };
25
25
  //#endregion
26
26
  export { FileCollectionStore };
27
-
28
- //# sourceMappingURL=file-store.js.map
@@ -1,2 +1,2 @@
1
- import { n as MapCollectionStore, t as CollectionStore } from "../../store-DySTeDAM.js";
1
+ import { n as MapCollectionStore, t as CollectionStore } from "../../store-j10gHjm1.js";
2
2
  export { CollectionStore, MapCollectionStore };
@@ -1,16 +1,16 @@
1
1
  //#region src/collections/runtime/store.ts
2
2
  var MapCollectionStore = class MapCollectionStore {
3
- dataMap;
4
- dataList;
3
+ #dataMap;
4
+ #dataList;
5
5
  constructor(input) {
6
- this.dataMap = input;
7
- this.dataList = Array.from(input.values());
6
+ this.#dataMap = input;
7
+ this.#dataList = Array.from(input.values());
8
8
  }
9
9
  get(id) {
10
- return this.dataMap.get(id);
10
+ return this.#dataMap.get(id);
11
11
  }
12
12
  list() {
13
- return this.dataList;
13
+ return this.#dataList;
14
14
  }
15
15
  castData(_cast) {
16
16
  return this;
@@ -20,7 +20,7 @@ var MapCollectionStore = class MapCollectionStore {
20
20
  */
21
21
  transform(fn) {
22
22
  const updated = /* @__PURE__ */ new Map();
23
- for (const [k, v] of this.dataMap) {
23
+ for (const [k, v] of this.#dataMap) {
24
24
  const out = fn(k, v);
25
25
  updated.set(out[0], out[1]);
26
26
  }
@@ -30,5 +30,3 @@ var MapCollectionStore = class MapCollectionStore {
30
30
  };
31
31
  //#endregion
32
32
  export { MapCollectionStore };
33
-
34
- //# sourceMappingURL=store.js.map
@@ -1,7 +1,6 @@
1
- import { c as WebpackLoader } from "../../index-h97OPng4.js";
1
+ import { c as WebpackLoader } from "../../index-Dfg2QKTT.js";
2
2
 
3
3
  //#region src/collections/yaml/loader-webpack.d.ts
4
4
  declare const _default: WebpackLoader;
5
5
  //#endregion
6
- export { _default as default };
7
- //# sourceMappingURL=loader-webpack.d.ts.map
6
+ export { _default as default };