@mdsvex/language-core 0.1.0-next.3 → 0.1.0-next.6

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 (2) hide show
  1. package/dist/index.js +14 -0
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -99,6 +99,8 @@ function document_options(manifest, doc) {
99
99
  highlight: highlight_of(manifest)
100
100
  };
101
101
  if (Object.keys(templates).length !== 0) compile.templates = templates;
102
+ const claims = claims_of(manifest);
103
+ if (claims !== void 0) compile.plugins = claims;
102
104
  if (manifest.unwrap_images === true) compile.unwrap_images = true;
103
105
  if (manifest.import_images === true)
104
106
  compile.import_images = manifest.enhanced_images === true ? { enhanced: true } : true;
@@ -124,6 +126,18 @@ function document_options(manifest, doc) {
124
126
  report_missing_pre: true
125
127
  };
126
128
  }
129
+ const claimed = /* @__PURE__ */ new WeakMap();
130
+ function claims_of(manifest) {
131
+ let out = claimed.get(manifest);
132
+ if (out === void 0) {
133
+ out = [];
134
+ for (const p of manifest.plugins ?? [])
135
+ if (p.fences !== void 0 && p.fences.length !== 0)
136
+ out.push({ name: p.name, fences: p.fences });
137
+ claimed.set(manifest, out);
138
+ }
139
+ return out.length === 0 ? void 0 : out;
140
+ }
127
141
  let twinkleplop = null;
128
142
  function highlight_of(manifest) {
129
143
  if ((manifest.highlight ?? "twinkleplop") !== "twinkleplop") return void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mdsvex/language-core",
3
- "version": "0.1.0-next.3",
3
+ "version": "0.1.0-next.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/pngwn/MDsveX.git",
@@ -23,16 +23,16 @@
23
23
  "@volar/typescript": "^2.4.28",
24
24
  "svelte2tsx": "^0.7.53",
25
25
  "temml": "^0.14.0",
26
- "@mdsvex/render": "1.0.0-next.3",
27
- "@mdsvex/source-map": "0.1.0-next.3",
28
- "mdsvex": "1.0.0-next.3"
26
+ "@mdsvex/render": "1.0.0-next.5",
27
+ "@mdsvex/source-map": "0.1.0-next.6",
28
+ "mdsvex": "1.0.0-next.6"
29
29
  },
30
30
  "devDependencies": {
31
31
  "svelte": "^5.0.0",
32
32
  "typescript": "^5.0.0"
33
33
  },
34
34
  "peerDependencies": {
35
- "typescript": "^5.0.0"
35
+ "typescript": "^5.0.0 || ^6.0.0"
36
36
  },
37
37
  "author": "pngwn <hello@pngwn.io>",
38
38
  "license": "MIT",