reactive-md 0.9.0 → 0.9.1
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/CHANGELOG-ch.md +13 -0
- package/CHANGELOG.md +13 -0
- package/README-ch.md +6 -6
- package/README-en.md +6 -6
- package/README.md +6 -6
- package/SECURITY-ch.md +3 -3
- package/SECURITY.md +3 -3
- package/THIRD_PARTY_NOTICES.md +111 -1
- package/cli/build.mjs +1 -0
- package/cli/init.mjs +1 -1
- package/dist-library/{LocalDocumentView-K7Y-2bRJ.js → LocalDocumentView-sthUP0ct.js} +10 -10
- package/dist-library/LocalDocumentViewCore-GiWV3bey.js +9829 -0
- package/dist-library/LocalReactiveDocumentCore-ZjQSGyHE.js +275 -0
- package/dist-library/{authoring-Co_TiE-P.js → authoring-Dsune4Hy.js} +40 -20
- package/dist-library/{compile-LhpTKqCR.js → compile-wUv8KEge.js} +1 -1
- package/dist-library/{compiler-core-DTxY-qYz.js → compiler-core-As_m-MNm.js} +2449 -1742
- package/dist-library/{compiler-DfGbQhyD.js → compiler-eOfcinZs.js} +19 -19
- package/dist-library/{component-state-BBJ08vML.js → component-state-C52ZFJGl.js} +1 -1
- package/dist-library/{config-BUo-8O5C.js → config-BadfhjdP.js} +1 -1
- package/dist-library/{config-validation-C5kJYk-J.js → config-validation-F47AcE6o.js} +49 -1
- package/dist-library/{controls-BWiLLtBO.js → controls-CcT6n7k_.js} +2433 -2409
- package/dist-library/{coordinate-BSl6enWV.js → coordinate-CWS9p5q_.js} +108 -107
- package/dist-library/{data-table-DfvytZKQ.js → data-table-Bgccxd7h.js} +68 -65
- package/dist-library/{display-lw3BT1TA.js → display-B-VhqVND.js} +1 -1
- package/dist-library/{export-C7IDW9ul.js → export-BqVmTXm8.js} +145 -87
- package/dist-library/{gallery-B8kSt1oI.js → gallery-CY6mTx8i.js} +151 -147
- package/dist-library/html-CNT4KD-2.js +757 -0
- package/dist-library/{incremental-D_6vwAAE.js → incremental-Dv0FSp_U.js} +404 -142
- package/dist-library/layout-C0YlEPGr.js +562 -0
- package/dist-library/{mount-preset-C5s9ebEH.js → mount-preset-KxvtKgJb.js} +2 -2
- package/dist-library/options-1aDLK7JY.js +121 -0
- package/dist-library/{package-core-D0POW4Gd.js → package-core-WFK1RhAZ.js} +3 -3
- package/dist-library/{parser-standard-OToYcOBL.js → parser-standard-Yuf3A_VI.js} +3270 -3778
- package/dist-library/react-D5iGiUdL.js +7 -0
- package/dist-library/reactive-md-authoring.js +16 -18
- package/dist-library/reactive-md-build.js +51 -51
- package/dist-library/reactive-md-compiler-standard.js +10 -9
- package/dist-library/reactive-md-compiler.js +3 -3
- package/dist-library/reactive-md-export.js +4 -4
- package/dist-library/reactive-md-minimal-react-preset.js +3 -3
- package/dist-library/reactive-md-pdf.js +127 -3
- package/dist-library/reactive-md-plugin-chart.js +2 -2
- package/dist-library/reactive-md-plugin-data.js +4 -4
- package/dist-library/reactive-md-plugin-diagram.js +3 -3
- package/dist-library/reactive-md-plugin-forms.js +2 -2
- package/dist-library/reactive-md-plugin-gallery.js +2 -2
- package/dist-library/reactive-md-plugin-navigation.js +2 -2
- package/dist-library/reactive-md-plugin-network.js +117 -115
- package/dist-library/reactive-md-plugin-plot.js +3 -3
- package/dist-library/reactive-md-react-minimal.js +4 -4
- package/dist-library/reactive-md-react-server.js +6 -6
- package/dist-library/reactive-md-react-unstyled.js +10 -11
- package/dist-library/reactive-md-react.js +10 -11
- package/dist-library/reactive-md-sdk.js +3 -3
- package/dist-library/reactive-md-standalone-configured.js +2 -2
- package/dist-library/reactive-md-standalone-host.js +2 -2
- package/dist-library/reactive-md-testing-browser.js +2 -2
- package/dist-library/reactive-md-testing-react.js +6 -6
- package/dist-library/reactive-md-testing.js +4 -4
- package/dist-library/reactive-md.js +280 -193
- package/dist-library/{registry-05JiqmEp.js → registry-B9NGct4d.js} +1 -1
- package/dist-library/{resources-IeJomeUT.js → resources-D2GDQS0p.js} +1 -1
- package/dist-library/{runtime-CuOyRe9f.js → runtime-kcA7bG7G.js} +341 -341
- package/dist-library/{schema-C-AeByPp.js → schema-BufhKUSM.js} +5 -5
- package/dist-library/{sdk-core-BJLJaVR5.js → sdk-core-BoJT1SIt.js} +490 -150
- package/dist-library/{session-core-BGka5D1J.js → session-core-nmJHuR9c.js} +170 -156
- package/dist-library/{shareable-jkGi2g6y.js → shareable-DpbE-59H.js} +207 -242
- package/dist-library/types/authoring/catalog.d.ts +1 -2
- package/dist-library/types/components/shared/visual-frame.d.ts +6 -2
- package/dist-library/types/local/compilation/compiler-capabilities.d.ts +3 -0
- package/dist-library/types/local/compilation/compiler-core.d.ts +11 -3
- package/dist-library/types/local/compilation/compiler-services.d.ts +8 -4
- package/dist-library/types/local/compilation/compiler.d.ts +3 -3
- package/dist-library/types/local/compilation/session/incremental.d.ts +20 -5
- package/dist-library/types/local/compilation/streaming.d.ts +27 -0
- package/dist-library/types/local/configuration/capability-policy.d.ts +3 -0
- package/dist-library/types/local/configuration/diagnostic-messages.d.ts +48 -0
- package/dist-library/types/local/configuration/options-core.d.ts +1 -2
- package/dist-library/types/local/configuration/options.d.ts +1 -0
- package/dist-library/types/local/css/author-css.d.ts +66 -0
- package/dist-library/types/local/html/extended-fragment.d.ts +41 -0
- package/dist-library/types/local/html/html.d.ts +39 -3
- package/dist-library/types/local/index.d.ts +1 -1
- package/dist-library/types/local/parsing/author-markdown.d.ts +11 -0
- package/dist-library/types/local/parsing/parse-session.d.ts +2 -2
- package/dist-library/types/local/parsing/parser-convert.d.ts +2 -1
- package/dist-library/types/local/parsing/parser-core.d.ts +8 -1
- package/dist-library/types/local/parsing/parser.d.ts +2 -2
- package/dist-library/types/local/rendering/document/ExtendedHtmlFragment.d.ts +14 -0
- package/dist-library/types/local/rendering/document/LocalDocumentViewCore.d.ts +25 -1
- package/dist-library/types/local/rendering/document/LocalReactiveDocumentCore.d.ts +1 -1
- package/dist-library/types/local/rendering/document/use-author-script.d.ts +3 -0
- package/dist-library/types/local/rendering/document/view-render-context.d.ts +11 -1
- package/dist-library/types/local/runtime/author-script-protocol.d.ts +59 -0
- package/dist-library/types/local/transport/worker.d.ts +27 -4
- package/dist-library/types/local/types.d.ts +52 -16
- package/dist-library/types/react/component-api.d.ts +10 -1
- package/dist-library/types/react/component-utils.d.ts +9 -1
- package/dist-library/types/react/sdk-core.d.ts +4 -1
- package/dist-library/types/shareable.d.ts +5 -4
- package/dist-library/types/standalone/prepare.d.ts +1 -1
- package/dist-library/types/standalone/session-core.d.ts +3 -2
- package/dist-library/{types-BFC5rzC4.js → types-BeNtPqdY.js} +1 -1
- package/dist-library/{validation-BlDL2uD9.js → validation-BEBA_HvS.js} +88 -72
- package/dist-library/{visual-frame-G8PHoj1e.js → visual-frame-CyV1FXzs.js} +6 -5
- package/dist-library/{visuals-BkYRmYGO.js → visuals-BZbZYA7w.js} +24181 -24180
- package/dist-standalone/reactive-md-standalone.js +124 -117
- package/docs/README-ch.md +2 -1
- package/docs/README.md +2 -1
- package/docs/compatibility/compatibility-ch.md +6 -6
- package/docs/compatibility/compatibility-en.md +6 -6
- package/docs/compatibility/source-versioning-ch.md +1 -1
- package/docs/compatibility/source-versioning-en.md +1 -1
- package/docs/development/component-development-ch.md +2 -2
- package/docs/development/component-development-en.md +2 -2
- package/docs/development/component-development-reference-ch.md +2 -2
- package/docs/development/component-development-reference-en.md +2 -2
- package/docs/development/component-protocol-ch.md +2 -2
- package/docs/development/component-protocol-en.md +2 -2
- package/docs/development/extension-tutorial-ch.md +3 -3
- package/docs/development/extension-tutorial-en.md +3 -3
- package/docs/integration/author-tools-ch.md +1 -1
- package/docs/integration/author-tools-en.md +1 -1
- package/docs/integration/compiler-ch.md +3 -1
- package/docs/integration/compiler-en.md +3 -1
- package/docs/integration/editor-ch.md +3 -3
- package/docs/integration/editor-en.md +3 -3
- package/docs/integration/extension-sdk-ch.md +2 -2
- package/docs/integration/extension-sdk-en.md +2 -2
- package/docs/integration/local-integration-ch.md +130 -8
- package/docs/integration/local-integration-en.md +130 -8
- package/docs/integration/shareable-export-ch.md +4 -2
- package/docs/integration/shareable-export-en.md +4 -2
- package/docs/reference/html-compatibility-ch.md +20 -67
- package/docs/reference/html-compatibility-en.md +19 -64
- package/docs/reference/public-api-ch.md +10 -7
- package/docs/reference/public-api-en.md +10 -7
- package/docs/releases/release-0.9.1-ch.md +29 -0
- package/docs/releases/release-0.9.1-en.md +29 -0
- package/examples/component-package/README-ch.md +1 -1
- package/examples/component-package/README.md +1 -1
- package/examples/game-2048-package/README-ch.md +1 -1
- package/examples/game-2048-package/README.md +1 -1
- package/examples/integration/README-ch.md +21 -2
- package/examples/integration/README.md +21 -2
- package/examples/integration/extension-sdk/README-ch.md +1 -1
- package/examples/integration/extension-sdk/README.md +1 -1
- package/examples/integration/streaming/index.html +48 -0
- package/examples/integration/streaming/main.js +175 -0
- package/examples/integration/streaming/package.json +13 -0
- package/examples/integration/streaming/worker.js +3 -0
- package/examples/minimal-extension/README-ch.md +3 -3
- package/examples/minimal-extension/README.md +3 -3
- package/examples/tetris-package/README-ch.md +1 -1
- package/examples/tetris-package/README.md +1 -1
- package/package.json +6 -1
- package/dist-library/LocalDocumentViewCore-BLG4hMuO.js +0 -9535
- package/dist-library/LocalReactiveDocumentCore-DVQ6WA9G.js +0 -259
- package/dist-library/component-utils-BvHL8VGt.js +0 -298
- package/dist-library/layout-C22VjZh0.js +0 -542
- package/dist-library/options-CdSKOi7p.js +0 -116
- package/dist-library/react-LY5qsVeP.js +0 -7
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { LocalCompileScheduler } from 'reactive-md';
|
|
2
|
+
|
|
3
|
+
const sourceOutput = document.getElementById('source');
|
|
4
|
+
const statusOutput = document.getElementById('status');
|
|
5
|
+
const transientOutput = document.getElementById('transient');
|
|
6
|
+
const diagnosticsOutput = document.getElementById('diagnostics');
|
|
7
|
+
const previewOutput = document.getElementById('preview');
|
|
8
|
+
const staleOutput = document.getElementById('stale');
|
|
9
|
+
const startButton = document.getElementById('start');
|
|
10
|
+
const cancelButton = document.getElementById('cancel');
|
|
11
|
+
|
|
12
|
+
const CHUNK_DELAY_MS = 700;
|
|
13
|
+
const COMPILE_OPTIONS = { strict: true };
|
|
14
|
+
// The fixed chunks grow the document locally. Several intermediate snapshots
|
|
15
|
+
// contain an unclosed panel or slider, so the streaming result must expose a
|
|
16
|
+
// readable prefix and provisional diagnostics.
|
|
17
|
+
const CHUNKS = [
|
|
18
|
+
'# Streaming snapshots\n\n',
|
|
19
|
+
'This page appends fixed text chunks on a timer. ',
|
|
20
|
+
'The host submits each complete snapshot with `sourcePhase: "streaming"`.\n\n',
|
|
21
|
+
'<panel title="Still generating">\n',
|
|
22
|
+
'<slider bind="people" label="People" initial="2" min="1" max="20">\n',
|
|
23
|
+
'Estimated cost: **{{ people * 100 }} USD**.\n\n',
|
|
24
|
+
'</panel>\n\n',
|
|
25
|
+
'The last snapshot is compiled with `sourcePhase: "final"`.\n',
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
let activeRun = 0;
|
|
29
|
+
let runNumber = 0;
|
|
30
|
+
let timer = null;
|
|
31
|
+
let chunkIndex = 0;
|
|
32
|
+
let text = '';
|
|
33
|
+
let finished = false;
|
|
34
|
+
let staleCount = 0;
|
|
35
|
+
const snapshotOwners = new Map();
|
|
36
|
+
|
|
37
|
+
function formatDiagnostics(list) {
|
|
38
|
+
return list && list.length
|
|
39
|
+
? list.map((diagnostic) => `${diagnostic.line}:${diagnostic.column} ${diagnostic.code}: ${diagnostic.message}`).join('\n')
|
|
40
|
+
: 'None.';
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function documentTitle(document) {
|
|
44
|
+
const heading = document.nodes.find((node) => node.type === 'heading');
|
|
45
|
+
return heading
|
|
46
|
+
? (heading.children ?? []).map((child) => child.value ?? '').join('') || 'Untitled'
|
|
47
|
+
: 'Untitled';
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function summarize(result) {
|
|
51
|
+
if (!result.ok) return 'No document: the snapshot reported a deterministic failure.';
|
|
52
|
+
const document = result.document;
|
|
53
|
+
const bindings = Object.keys(document.bindings);
|
|
54
|
+
return [
|
|
55
|
+
`Status: ${result.status ?? 'legacy'}`,
|
|
56
|
+
`Title: ${documentTitle(document)}`,
|
|
57
|
+
`Nodes: ${document.nodes.length}`,
|
|
58
|
+
`Bindings: ${bindings.length ? bindings.join(', ') : 'none'}`,
|
|
59
|
+
].join('\n');
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function modeLabel(mode) {
|
|
63
|
+
return mode === 'worker' ? 'a Worker' : 'the main-thread fallback';
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function updateStale() {
|
|
67
|
+
staleOutput.textContent = `${staleCount} stale result${staleCount === 1 ? '' : 's'} discarded.`;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function showOutcome(outcome) {
|
|
71
|
+
// A generation only accepts results for the run that submitted this exact
|
|
72
|
+
// snapshot. Cancel and restart invalidate earlier runs, so a late result is
|
|
73
|
+
// counted and ignored instead of repainting the page.
|
|
74
|
+
if (snapshotOwners.get(outcome.source) !== activeRun) {
|
|
75
|
+
staleCount += 1;
|
|
76
|
+
updateStale();
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const { result, sourcePhase, duration, mode } = outcome;
|
|
81
|
+
const phase = sourcePhase ?? 'final';
|
|
82
|
+
const status = result.status ?? (result.ok ? 'valid' : 'failed');
|
|
83
|
+
|
|
84
|
+
if (phase === 'streaming') {
|
|
85
|
+
statusOutput.textContent = [
|
|
86
|
+
`Streaming snapshot: ${status}`,
|
|
87
|
+
`${outcome.source.length} chars in ${duration} ms on ${modeLabel(mode)}`,
|
|
88
|
+
].join(' · ');
|
|
89
|
+
transientOutput.textContent = formatDiagnostics(result.transientDiagnostics);
|
|
90
|
+
diagnosticsOutput.textContent = result.ok
|
|
91
|
+
? 'Final diagnostics arrive with the final snapshot.'
|
|
92
|
+
: formatDiagnostics(result.diagnostics);
|
|
93
|
+
previewOutput.textContent = summarize(result);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
finished = true;
|
|
98
|
+
statusOutput.textContent = [
|
|
99
|
+
`Final snapshot: ${status}`,
|
|
100
|
+
`${outcome.source.length} chars in ${duration} ms on ${modeLabel(mode)}`,
|
|
101
|
+
].join(' · ');
|
|
102
|
+
transientOutput.textContent = 'None.';
|
|
103
|
+
diagnosticsOutput.textContent = formatDiagnostics(result.diagnostics);
|
|
104
|
+
previewOutput.textContent = summarize(result);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const scheduler = new LocalCompileScheduler({
|
|
108
|
+
createWorker: () => new Worker(new URL('./worker.js', import.meta.url), { type: 'module' }),
|
|
109
|
+
onResult: showOutcome,
|
|
110
|
+
onModeChange: (mode, detail) => {
|
|
111
|
+
if (mode === 'fallback' && detail) console.info('Compile mode fallback:', detail);
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
function submit(snapshot, sourcePhase) {
|
|
116
|
+
snapshotOwners.set(snapshot, activeRun);
|
|
117
|
+
scheduler.schedule(snapshot, COMPILE_OPTIONS, undefined, sourcePhase);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function stopTimer() {
|
|
121
|
+
if (timer !== null) {
|
|
122
|
+
clearTimeout(timer);
|
|
123
|
+
timer = null;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function pump(run) {
|
|
128
|
+
if (run !== activeRun) return;
|
|
129
|
+
if (chunkIndex >= CHUNKS.length) {
|
|
130
|
+
submit(text, 'final');
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
text += CHUNKS[chunkIndex];
|
|
134
|
+
chunkIndex += 1;
|
|
135
|
+
sourceOutput.textContent = text;
|
|
136
|
+
submit(text, 'streaming');
|
|
137
|
+
timer = setTimeout(() => {
|
|
138
|
+
timer = null;
|
|
139
|
+
pump(run);
|
|
140
|
+
}, CHUNK_DELAY_MS);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function startGeneration() {
|
|
144
|
+
stopTimer();
|
|
145
|
+
activeRun += 1;
|
|
146
|
+
runNumber += 1;
|
|
147
|
+
chunkIndex = 0;
|
|
148
|
+
text = '';
|
|
149
|
+
finished = false;
|
|
150
|
+
sourceOutput.textContent = '';
|
|
151
|
+
transientOutput.textContent = 'None.';
|
|
152
|
+
diagnosticsOutput.textContent = 'None.';
|
|
153
|
+
previewOutput.textContent = 'Waiting for the first snapshot.';
|
|
154
|
+
statusOutput.textContent = `Generation ${runNumber}: submitting snapshots...`;
|
|
155
|
+
pump(activeRun);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function cancelGeneration() {
|
|
159
|
+
if (finished) {
|
|
160
|
+
statusOutput.textContent = 'Generation already finished. Use Start / restart to run it again.';
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
stopTimer();
|
|
164
|
+
// Invalidate the current run without scheduling a replacement. If a compile
|
|
165
|
+
// is still in flight, its result will be dropped by showOutcome.
|
|
166
|
+
activeRun += 1;
|
|
167
|
+
statusOutput.textContent = 'Generation cancelled. Late results are discarded.';
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
startButton.addEventListener('click', startGeneration);
|
|
171
|
+
cancelButton.addEventListener('click', cancelGeneration);
|
|
172
|
+
window.addEventListener('beforeunload', () => scheduler.dispose());
|
|
173
|
+
|
|
174
|
+
updateStale();
|
|
175
|
+
startGeneration();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "reactive-md-streaming-example",
|
|
3
|
+
"private": true,
|
|
4
|
+
"type": "module",
|
|
5
|
+
"engines": { "node": ">=22.12.0" },
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite --host 127.0.0.1",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"preview": "vite preview --host 127.0.0.1"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": { "reactive-md": "0.9.1" },
|
|
12
|
+
"devDependencies": { "vite": "^8.3.5" }
|
|
13
|
+
}
|
|
@@ -32,13 +32,13 @@ npm install
|
|
|
32
32
|
npm run preview
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
模板声明 `reactive-md@^0.8.0`,请把范围调整为要验证的发布版本。测试尚未发布的候选版本时,把 `npm install` 换成当前源码打包的引擎 tarball:
|
|
36
36
|
|
|
37
37
|
```sh
|
|
38
|
-
npm install ../reactive-md
|
|
38
|
+
npm install ../reactive-md-<version>.tgz
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
该命令同时安装 `react`、`react-dom`
|
|
41
|
+
该命令同时安装 `react`、`react-dom` 和开发依赖;常规安装直接运行 `npm install`。打开 Vite 打印的地址(默认 `http://localhost:5173`),页面显示示例文档和评分卡。
|
|
42
42
|
|
|
43
43
|
## 文件
|
|
44
44
|
|
|
@@ -32,13 +32,13 @@ npm install
|
|
|
32
32
|
npm run preview
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
The template
|
|
35
|
+
The template declares `reactive-md@^0.8.0`; adjust the range to the release you are validating. To test an unreleased candidate, replace `npm install` with a tarball packed from the current source:
|
|
36
36
|
|
|
37
37
|
```sh
|
|
38
|
-
npm install ../reactive-md
|
|
38
|
+
npm install ../reactive-md-<version>.tgz
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
That command also installs `react`, `react-dom` and the dev dependencies.
|
|
41
|
+
That command also installs `react`, `react-dom` and the dev dependencies. Otherwise run plain `npm install`. Open the Vite URL (default `http://localhost:5173`); the page shows the sample document and the rating card.
|
|
42
42
|
|
|
43
43
|
## Files
|
|
44
44
|
|
|
@@ -21,7 +21,7 @@ npm pack ./examples/tetris-package --ignore-scripts
|
|
|
21
21
|
再在宿主项目中安装生成的两个 `.tgz`:
|
|
22
22
|
|
|
23
23
|
```sh
|
|
24
|
-
npm install ../ReactiveMD/reactive-md
|
|
24
|
+
npm install ../ReactiveMD/reactive-md-<version>.tgz ../ReactiveMD/reactive-md-tetris-package-0.1.0.tgz
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
ReactiveMD、React 和 React DOM 声明为 peer dependencies,由宿主提供同一份实例。
|
|
@@ -23,7 +23,7 @@ npm pack ./examples/tetris-package --ignore-scripts
|
|
|
23
23
|
Then install both tarballs in the host project:
|
|
24
24
|
|
|
25
25
|
```sh
|
|
26
|
-
npm install ../ReactiveMD/reactive-md
|
|
26
|
+
npm install ../ReactiveMD/reactive-md-<version>.tgz ../ReactiveMD/reactive-md-tetris-package-0.1.0.tgz
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
ReactiveMD, React and React DOM are peer dependencies supplied by the host.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reactive-md",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Author interactive local documents in Markdown, with expression-bound inputs, charts and diagrams.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"markdown",
|
|
@@ -59,12 +59,15 @@
|
|
|
59
59
|
"check": "npm run check:styles && npm run build && npm test && npm run test:boundary && npm run test:compiler-entry && npm run check:versions",
|
|
60
60
|
"check:styles": "node scripts/verify-style-boundaries.mjs",
|
|
61
61
|
"test:theme:browser": "node scripts/verify-shared-theme-browser.mjs",
|
|
62
|
+
"test:capabilities:browser": "node scripts/verify-document-capabilities.mjs",
|
|
63
|
+
"test:streaming:browser": "node scripts/verify-streaming-browser.mjs",
|
|
62
64
|
"test:boundary": "node scripts/verify-public-package.mjs",
|
|
63
65
|
"test:compiler-entry": "node scripts/verify-compiler-entry.mjs",
|
|
64
66
|
"test:pdf": "node scripts/verify-pdf.mjs",
|
|
65
67
|
"test:preset-scaffold": "node scripts/verify-preset-scaffold.mjs",
|
|
66
68
|
"check:versions": "node scripts/check-versions.mjs",
|
|
67
69
|
"check:loc": "node scripts/check-loc.mjs",
|
|
70
|
+
"bench:streaming": "node benchmarks/streaming-source.mjs",
|
|
68
71
|
"sci-fi:dev": "vite --config examples/sci-fi-theme/vite.config.ts",
|
|
69
72
|
"sci-fi:build": "vite build --config examples/sci-fi-theme/vite.config.ts",
|
|
70
73
|
"sci-fi:typecheck": "tsc -p examples/sci-fi-theme/tsconfig.json --noEmit",
|
|
@@ -238,6 +241,7 @@
|
|
|
238
241
|
}
|
|
239
242
|
},
|
|
240
243
|
"devDependencies": {
|
|
244
|
+
"@jitl/quickjs-singlefile-browser-release-sync": "0.32.0",
|
|
241
245
|
"@lezer/common": "1.5.4",
|
|
242
246
|
"@lezer/highlight": "1.2.5",
|
|
243
247
|
"@lezer/markdown": "1.8.1",
|
|
@@ -256,6 +260,7 @@
|
|
|
256
260
|
"motion": "14.12.0",
|
|
257
261
|
"parse5": "8.0.1",
|
|
258
262
|
"postcss": "8.5.31",
|
|
263
|
+
"quickjs-emscripten-core": "0.32.0",
|
|
259
264
|
"react": "19.3.1",
|
|
260
265
|
"react-dom": "19.3.1",
|
|
261
266
|
"remark-gfm": "4.0.1",
|