@astrojs/markdown-remark 3.0.0-beta.0 → 3.0.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.
package/dist/index.js CHANGED
@@ -68,9 +68,7 @@ async function renderMarkdown(content, opts) {
68
68
  } else if (syntaxHighlight === "prism") {
69
69
  parser.use([remarkPrism(scopedClassName)]);
70
70
  }
71
- if (opts.experimentalAssets) {
72
- parser.use([remarkCollectImages]);
73
- }
71
+ parser.use([remarkCollectImages]);
74
72
  }
75
73
  parser.use([
76
74
  [
@@ -85,9 +83,7 @@ async function renderMarkdown(content, opts) {
85
83
  loadedRehypePlugins.forEach(([plugin, pluginOpts]) => {
86
84
  parser.use([[plugin, pluginOpts]]);
87
85
  });
88
- if (opts.experimentalAssets) {
89
- parser.use(rehypeImages());
90
- }
86
+ parser.use(rehypeImages());
91
87
  if (!isPerformanceBenchmark) {
92
88
  parser.use([rehypeHeadingIds]);
93
89
  }
@@ -1,24 +1,7 @@
1
1
  import { getHighlighter } from "shiki";
2
2
  import { visit } from "unist-util-visit";
3
3
  const highlighterCacheAsync = /* @__PURE__ */ new Map();
4
- const compatThemes = {
5
- "material-darker": "material-theme-darker",
6
- "material-default": "material-theme",
7
- "material-lighter": "material-theme-lighter",
8
- "material-ocean": "material-theme-ocean",
9
- "material-palenight": "material-theme-palenight"
10
- };
11
- const normalizeTheme = (theme) => {
12
- if (typeof theme === "string") {
13
- return compatThemes[theme] || theme;
14
- } else if (compatThemes[theme.name]) {
15
- return { ...theme, name: compatThemes[theme.name] };
16
- } else {
17
- return theme;
18
- }
19
- };
20
4
  const remarkShiki = async ({ langs = [], theme = "github-dark", wrap = false }, scopedClassName) => {
21
- theme = normalizeTheme(theme);
22
5
  const cacheID = typeof theme === "string" ? theme : theme.name;
23
6
  let highlighterAsync = highlighterCacheAsync.get(cacheID);
24
7
  if (!highlighterAsync) {
package/dist/types.d.ts CHANGED
@@ -46,7 +46,6 @@ export interface MarkdownRenderingOptions extends AstroMarkdownOptions {
46
46
  };
47
47
  /** Used for frontmatter injection plugins */
48
48
  frontmatter?: Record<string, any>;
49
- experimentalAssets?: boolean;
50
49
  }
51
50
  export interface MarkdownHeading {
52
51
  depth: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrojs/markdown-remark",
3
- "version": "3.0.0-beta.0",
3
+ "version": "3.0.0",
4
4
  "type": "module",
5
5
  "author": "withastro",
6
6
  "license": "MIT",
@@ -20,19 +20,19 @@
20
20
  "dist"
21
21
  ],
22
22
  "peerDependencies": {
23
- "astro": "^3.0.0-beta.0"
23
+ "astro": "^3.0.0"
24
24
  },
25
25
  "dependencies": {
26
- "@astrojs/prism": "^3.0.0-beta.0",
27
- "github-slugger": "^1.5.0",
28
- "import-meta-resolve": "^2.2.2",
26
+ "@astrojs/prism": "^3.0.0",
27
+ "github-slugger": "^2.0.0",
28
+ "import-meta-resolve": "^3.0.0",
29
29
  "rehype-raw": "^6.1.1",
30
- "rehype-stringify": "^9.0.3",
30
+ "rehype-stringify": "^9.0.4",
31
31
  "remark-gfm": "^3.0.1",
32
32
  "remark-parse": "^10.0.2",
33
33
  "remark-rehype": "^10.1.0",
34
34
  "remark-smartypants": "^2.0.0",
35
- "shiki": "^0.14.1",
35
+ "shiki": "^0.14.3",
36
36
  "unified": "^10.1.2",
37
37
  "unist-util-visit": "^4.1.2",
38
38
  "vfile": "^5.3.7"
@@ -40,14 +40,13 @@
40
40
  "devDependencies": {
41
41
  "@types/chai": "^4.3.5",
42
42
  "@types/estree": "^1.0.1",
43
- "@types/github-slugger": "^1.3.0",
44
- "@types/hast": "^2.3.4",
45
- "@types/mdast": "^3.0.11",
46
- "@types/mocha": "^9.1.1",
47
- "@types/unist": "^2.0.6",
43
+ "@types/hast": "^2.3.5",
44
+ "@types/mdast": "^3.0.12",
45
+ "@types/mocha": "^10.0.1",
46
+ "@types/unist": "^2.0.7",
48
47
  "chai": "^4.3.7",
49
48
  "mdast-util-mdx-expression": "^1.3.2",
50
- "mocha": "^9.2.2",
49
+ "mocha": "^10.2.0",
51
50
  "astro-scripts": "0.0.14"
52
51
  },
53
52
  "scripts": {