@diplodoc/notes-extension 1.0.0-beta.2 → 1.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/README.md +5 -5
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
# @diplodoc/notes-extension
|
|
4
4
|
|
|
5
|
-
A synchronous MarkdownIt plugin for
|
|
5
|
+
A synchronous MarkdownIt plugin for rendering Diplodoc notes. The 1.x series is used by Transform 5.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
npm install @diplodoc/notes-extension
|
|
10
|
+
npm install @diplodoc/notes-extension markdown-it@^15.0.3
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Notes 1.x requires Markdown-it 15.0.3 or later within major version 15.
|
|
14
14
|
|
|
15
15
|
## Node use
|
|
16
16
|
|
|
@@ -62,7 +62,7 @@ import '@diplodoc/notes-extension/runtime/styles.css';
|
|
|
62
62
|
const md = new MarkdownIt().use(transform({runtime: false}), {lang: 'en'});
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
Render HTML inside a `.yfm` container. The browser entry does not import Node modules, construct a parser, copy files or expose `.collect()`. Its optional `bundle` setting can only be false.
|
|
65
|
+
Render HTML inside a `.yfm` container. The browser entry does not import Node modules, construct a parser, copy files or expose `.collect()`. Its optional `bundle` setting can only be false. Bundle the native Markdown-it 15 ESM entry with the browser adapter.
|
|
66
66
|
|
|
67
67
|
`@diplodoc/notes-extension/plugin` exposes the pure `createNotesPlugin(formatPath?, onNote?)` factory, `TokenType`, the canonical `TITLES` dictionary, `DEFAULT_LANG`, and finite public types including `Lang`. The dictionary exports let retained Transform constants paths delegate to this single source. It emits no assets. Transform's built-in bridge can bind its existing diagnostic formatter and reuse its own bundled styles. No private MarkdownIt State imports or Transform dependency are required.
|
|
68
68
|
|
|
@@ -113,7 +113,7 @@ npm run test:package
|
|
|
113
113
|
npm run lint
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
-
The installed package gate checks
|
|
116
|
+
The installed package gate checks Markdown-it 15, strict CJS/ESM declarations, all export targets, real copy/collect/resources, and actual browser/style behavior.
|
|
117
117
|
|
|
118
118
|
See [AGENTS.md](AGENTS.md) for development guidance and [CONTRIBUTING.md](CONTRIBUTING.md) for contribution requirements.
|
|
119
119
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diplodoc/notes-extension",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Notes extension for Diplodoc platform",
|
|
5
5
|
"main": "build/cjs/index.js",
|
|
6
6
|
"types": "build/cjs/plugin/index.d.ts",
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"scripts": {
|
|
66
66
|
"build": "node esbuild/build.mjs",
|
|
67
67
|
"test": "vitest run",
|
|
68
|
+
"test:coverage": "vitest run --coverage",
|
|
68
69
|
"typecheck": "tsc --noEmit",
|
|
69
70
|
"test:package": "node scripts/test-package.mjs",
|
|
70
71
|
"prepublishOnly": "npm run lint && npm run typecheck && npm test && npm run build && npm run test:package",
|
|
@@ -75,27 +76,26 @@
|
|
|
75
76
|
"lock": "npm install --no-workspaces --package-lock-only --ignore-scripts"
|
|
76
77
|
},
|
|
77
78
|
"devDependencies": {
|
|
78
|
-
"@diplodoc/infra": "2.
|
|
79
|
+
"@diplodoc/infra": "2.4.0",
|
|
79
80
|
"@types/node": "^22.19.11",
|
|
80
81
|
"@typescript-eslint/eslint-plugin": "8.72.1",
|
|
81
82
|
"@typescript-eslint/parser": "8.72.1",
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"markdown-it": "15.0.3",
|
|
83
|
+
"@vitest/coverage-v8": "^4.1.9",
|
|
84
|
+
"markdown-it": "^15.0.3",
|
|
85
85
|
"playwright": "^1.60.0",
|
|
86
86
|
"sass": "1.97.3",
|
|
87
87
|
"typescript": "6.0.3",
|
|
88
|
-
"vitest": "^
|
|
88
|
+
"vitest": "^4.1.9"
|
|
89
89
|
},
|
|
90
90
|
"module": "build/esm/index.js",
|
|
91
91
|
"peerDependencies": {
|
|
92
|
-
"markdown-it": "^
|
|
92
|
+
"markdown-it": "^15.0.3"
|
|
93
93
|
},
|
|
94
94
|
"engines": {
|
|
95
95
|
"node": ">=24",
|
|
96
96
|
"npm": ">=11.5.1"
|
|
97
97
|
},
|
|
98
98
|
"dependencies": {
|
|
99
|
-
"@diplodoc/directive": "1.0.0
|
|
99
|
+
"@diplodoc/directive": "^1.0.0"
|
|
100
100
|
}
|
|
101
101
|
}
|