@astrojs/markdoc 0.5.0 → 0.5.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/README.md CHANGED
@@ -42,15 +42,15 @@ npm install @astrojs/markdoc
42
42
 
43
43
  Then, apply this integration to your `astro.config.*` file using the `integrations` property:
44
44
 
45
- ```js ins={3} "markdoc()"
46
- // astro.config.mjs
47
- import { defineConfig } from 'astro/config';
48
- import markdoc from '@astrojs/markdoc';
49
-
50
- export default defineConfig({
51
- // ...
52
- integrations: [markdoc()],
53
- });
45
+ ```diff lang="js" "markdoc()"
46
+ // astro.config.mjs
47
+ import { defineConfig } from 'astro/config';
48
+ + import markdoc from '@astrojs/markdoc';
49
+ export default defineConfig({
50
+ // ...
51
+ integrations: [markdoc()],
52
+ // ^^^^^^^^^
53
+ });
54
54
  ```
55
55
 
56
56
  ### Editor Integration
@@ -443,15 +443,16 @@ By default, Markdoc will not recognize HTML markup as semantic content.
443
443
 
444
444
  To achieve a more Markdown-like experience, where HTML elements can be included alongside your content, set `allowHTML:true` as a `markdoc` integration option. This will enable HTML parsing in Markdoc markup.
445
445
 
446
- ```js {7} "allowHTML: true"
447
- // astro.config.mjs
448
- import { defineConfig } from 'astro/config';
449
- import markdoc from '@astrojs/markdoc';
446
+ ```diff lang="js" "allowHTML: true"
447
+ // astro.config.mjs
448
+ import { defineConfig } from 'astro/config';
449
+ import markdoc from '@astrojs/markdoc';
450
450
 
451
- export default defineConfig({
452
- // ...
453
- integrations: [markdoc({ allowHTML: true })],
454
- });
451
+ export default defineConfig({
452
+ // ...
453
+ + integrations: [markdoc({ allowHTML: true })],
454
+ // ^^^^^^^^^^^^^^^
455
+ });
455
456
  ```
456
457
 
457
458
  > **Warning**
@@ -92,14 +92,11 @@ export const ComponentNode = createComponent({
92
92
  // `result.propagators` has been moved to `result._metadata.propagators`
93
93
  // TODO: remove this fallback in the next markdoc integration major
94
94
  const propagators = result._metadata.propagators || result.propagators;
95
- propagators.set(
96
- {},
97
- {
98
- init() {
99
- return headAndContent;
100
- },
101
- }
102
- );
95
+ propagators.add({
96
+ init() {
97
+ return headAndContent;
98
+ },
99
+ });
103
100
 
104
101
  return headAndContent;
105
102
  }
@@ -1,2 +1,2 @@
1
- export { htmlTag } from './tagdefs/html.tag';
2
- export { htmlTokenTransform } from './transform/html-token-transform';
1
+ export { htmlTag } from './tagdefs/html.tag.js';
2
+ export { htmlTokenTransform } from './transform/html-token-transform.js';
@@ -1,5 +1,5 @@
1
- import { htmlTag } from "./tagdefs/html.tag";
2
- import { htmlTokenTransform } from "./transform/html-token-transform";
1
+ import { htmlTag } from "./tagdefs/html.tag.js";
2
+ import { htmlTokenTransform } from "./transform/html-token-transform.js";
3
3
  export {
4
4
  htmlTag,
5
5
  htmlTokenTransform
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@astrojs/markdoc",
3
3
  "description": "Add support for Markdoc in your Astro site",
4
- "version": "0.5.0",
4
+ "version": "0.5.2",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
7
7
  "author": "withastro",
@@ -64,11 +64,11 @@
64
64
  "kleur": "^4.1.5",
65
65
  "shiki": "^0.14.3",
66
66
  "zod": "3.21.1",
67
- "@astrojs/internal-helpers": "0.2.0",
67
+ "@astrojs/internal-helpers": "0.2.1",
68
68
  "@astrojs/prism": "3.0.0"
69
69
  },
70
70
  "peerDependencies": {
71
- "astro": "^3.0.0"
71
+ "astro": "^3.2.3"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@types/chai": "^4.3.5",
@@ -81,13 +81,16 @@
81
81
  "mocha": "^10.2.0",
82
82
  "rollup": "^3.28.1",
83
83
  "vite": "^4.4.9",
84
- "@astrojs/markdown-remark": "3.0.0",
85
- "astro": "3.0.0",
84
+ "@astrojs/markdown-remark": "3.2.1",
85
+ "astro": "3.2.3",
86
86
  "astro-scripts": "0.0.14"
87
87
  },
88
88
  "engines": {
89
89
  "node": ">=18.14.1"
90
90
  },
91
+ "publishConfig": {
92
+ "provenance": true
93
+ },
91
94
  "scripts": {
92
95
  "build": "astro-scripts build \"src/**/*.ts\" && tsc",
93
96
  "build:ci": "astro-scripts build \"src/**/*.ts\"",