reactive-md 0.4.1 → 0.5.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 +144 -113
- package/CHANGELOG.md +144 -113
- package/LICENSE +21 -21
- package/README-ch.md +154 -123
- package/README-en.md +179 -147
- package/README.md +179 -147
- package/SECURITY-ch.md +4 -3
- package/SECURITY.md +4 -3
- package/THIRD_PARTY_NOTICES.md +138 -1
- package/bin/reactive-md.mjs +1 -1
- package/dist-library/reactive-md-editor.css +2 -0
- package/dist-library/reactive-md-editor.js +3834 -0
- package/dist-library/reactive-md-react.js +9324 -1670
- package/dist-library/reactive-md.css +1 -1
- package/dist-library/reactive-md.js +426 -305
- package/dist-library/{runtime-D3QTVYaz.js → runtime-CXBdLQ3A.js} +8950 -2895
- package/dist-library/types/editor/ReactiveMarkdownEditor.d.ts +7 -0
- package/dist-library/types/editor/editor-commands.d.ts +50 -0
- package/dist-library/types/editor/editor-i18n.d.ts +109 -0
- package/dist-library/types/editor/editor-toolbar.d.ts +24 -0
- package/dist-library/types/editor/editor-view-bar.d.ts +11 -0
- package/dist-library/types/editor/extended-native-components.d.ts +58 -0
- package/dist-library/types/editor/index.d.ts +9 -0
- package/dist-library/types/editor/locale.d.ts +13 -0
- package/dist-library/types/editor/native-components.d.ts +47 -0
- package/dist-library/types/editor/source-authoring.d.ts +57 -0
- package/dist-library/types/editor/types.d.ts +51 -0
- package/dist-library/types/editor/use-gutter-metrics.d.ts +5 -0
- package/dist-library/types/editor/use-source-history.d.ts +16 -0
- package/dist-library/types/local/LocalDocumentView.d.ts +10 -3
- package/dist-library/types/local/code-block.d.ts +26 -0
- package/dist-library/types/local/diagnostics.d.ts +25 -0
- package/dist-library/types/local/footnotes.d.ts +51 -0
- package/dist-library/types/local/heading-anchors.d.ts +2 -0
- package/dist-library/types/local/html.d.ts +16 -0
- package/dist-library/types/local/image-view.d.ts +23 -0
- package/dist-library/types/local/index.d.ts +1 -1
- package/dist-library/types/local/options.d.ts +29 -0
- package/dist-library/types/local/types.d.ts +42 -1
- package/dist-library/types/local/worker.d.ts +18 -6
- package/dist-library/types/shareable.d.ts +9 -1
- package/dist-standalone/reactive-md-standalone.css +1 -1
- package/dist-standalone/reactive-md-standalone.js +49 -38
- package/docs/compatibility-ch.md +12 -8
- package/docs/compatibility-en.md +12 -8
- package/docs/component-protocol-ch.md +2 -2
- package/docs/component-protocol-en.md +2 -2
- package/docs/editor-ch.md +235 -0
- package/docs/editor-en.md +235 -0
- package/docs/html-compatibility-ch.md +98 -0
- package/docs/html-compatibility-en.md +98 -0
- package/docs/local-guide-ch.md +11 -5
- package/docs/local-guide-en.md +11 -5
- package/docs/local-integration-ch.md +4 -1
- package/docs/local-integration-en.md +4 -1
- package/docs/local-interaction-syntax-ch.md +9 -2
- package/docs/local-interaction-syntax-en.md +7 -2
- package/docs/release-0.4.1-ch.md +23 -23
- package/docs/release-0.4.1-en.md +23 -23
- package/docs/release-0.5.0-ch.md +41 -0
- package/docs/release-0.5.0-en.md +41 -0
- package/docs/release-0.5.1-ch.md +39 -0
- package/docs/release-0.5.1-en.md +39 -0
- package/docs/releasing-ch.md +108 -101
- package/docs/releasing-en.md +108 -101
- package/docs/shareable-export-ch.md +6 -2
- package/docs/shareable-export-en.md +6 -2
- package/examples/integration/core/package.json +7 -7
- package/examples/integration/react/index.html +12 -12
- package/examples/integration/react/main.jsx +21 -21
- package/examples/integration/react/package.json +9 -9
- package/examples/integration/react-editor.tsx +74 -0
- package/examples/local/README.md +2 -0
- package/examples/local/catalog.reactive.md +20 -20
- package/examples/local/checklist.reactive.md +32 -32
- package/examples/local/comparison.reactive.md +47 -47
- package/examples/local/components.reactive.md +44 -44
- package/examples/local/counter.reactive.md +7 -7
- package/examples/local/diagnostics.reactive.md +54 -54
- package/examples/local/diagram.reactive.md +44 -44
- package/examples/local/gallery.reactive.md +61 -61
- package/examples/local/html-compat.reactive.md +24 -0
- package/examples/local/parameters.reactive.md +36 -36
- package/examples/local/planning.reactive.md +24 -24
- package/examples/local/pricing.reactive.md +20 -20
- package/examples/local/zh/catalog.reactive.md +20 -20
- package/examples/local/zh/charts.reactive.md +73 -73
- package/examples/local/zh/checklist.reactive.md +32 -32
- package/examples/local/zh/comparison.reactive.md +47 -47
- package/examples/local/zh/components.reactive.md +44 -44
- package/examples/local/zh/counter.reactive.md +7 -7
- package/examples/local/zh/diagnostics.reactive.md +54 -54
- package/examples/local/zh/diagram.reactive.md +44 -44
- package/examples/local/zh/gallery.reactive.md +61 -61
- package/examples/local/zh/parameters.reactive.md +36 -36
- package/examples/local/zh/planning.reactive.md +24 -24
- package/examples/local/zh/pricing.reactive.md +20 -20
- package/package.json +135 -91
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
# 方案计算器
|
|
2
|
-
|
|
3
|
-
调整人数和付款方式,比较每月平均费用。每人每月 100 元,年度付款享受八折。
|
|
4
|
-
|
|
5
|
-
<panel title="你的方案">
|
|
6
|
-
<slider bind="seats" label="人数" initial="2" min="1" max="20">
|
|
7
|
-
<toggle bind="annual" label="年度付款">
|
|
8
|
-
</panel>
|
|
9
|
-
|
|
10
|
-
当前人数:**{{ seats }}**。
|
|
11
|
-
|
|
12
|
-
每人每月:**{{ annual ? 80 : 100 }} 元**。
|
|
13
|
-
|
|
14
|
-
每月合计:**{{ seats * (annual ? 80 : 100) }} 元**。
|
|
15
|
-
|
|
16
|
-
<if when="{{ seats >= 5 }}">
|
|
17
|
-
<alert title="团队方案">
|
|
18
|
-
你选择了至少 5 人,可以继续切换付款方式比较费用。
|
|
19
|
-
</alert>
|
|
20
|
-
</if>
|
|
1
|
+
# 方案计算器
|
|
2
|
+
|
|
3
|
+
调整人数和付款方式,比较每月平均费用。每人每月 100 元,年度付款享受八折。
|
|
4
|
+
|
|
5
|
+
<panel title="你的方案">
|
|
6
|
+
<slider bind="seats" label="人数" initial="2" min="1" max="20">
|
|
7
|
+
<toggle bind="annual" label="年度付款">
|
|
8
|
+
</panel>
|
|
9
|
+
|
|
10
|
+
当前人数:**{{ seats }}**。
|
|
11
|
+
|
|
12
|
+
每人每月:**{{ annual ? 80 : 100 }} 元**。
|
|
13
|
+
|
|
14
|
+
每月合计:**{{ seats * (annual ? 80 : 100) }} 元**。
|
|
15
|
+
|
|
16
|
+
<if when="{{ seats >= 5 }}">
|
|
17
|
+
<alert title="团队方案">
|
|
18
|
+
你选择了至少 5 人,可以继续切换付款方式比较费用。
|
|
19
|
+
</alert>
|
|
20
|
+
</if>
|
package/package.json
CHANGED
|
@@ -1,91 +1,135 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "reactive-md",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Author interactive local documents in Markdown, with expression-bound inputs, charts and diagrams.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"markdown",
|
|
7
|
-
"interactive",
|
|
8
|
-
"local-first",
|
|
9
|
-
"reactive",
|
|
10
|
-
"charts",
|
|
11
|
-
"diagrams",
|
|
12
|
-
"react",
|
|
13
|
-
"typescript"
|
|
14
|
-
],
|
|
15
|
-
"license": "MIT",
|
|
16
|
-
"repository": {
|
|
17
|
-
"type": "git",
|
|
18
|
-
"url": "git+https://github.com/yao1145/ReactiveMD.git"
|
|
19
|
-
},
|
|
20
|
-
"homepage": "https://github.com/yao1145/ReactiveMD#readme",
|
|
21
|
-
"bugs": {
|
|
22
|
-
"url": "https://github.com/yao1145/ReactiveMD/issues"
|
|
23
|
-
},
|
|
24
|
-
"engines": {
|
|
25
|
-
"node": ">=22.12.0"
|
|
26
|
-
},
|
|
27
|
-
"type": "module",
|
|
28
|
-
"workspaces": [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
|
|
91
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "reactive-md",
|
|
3
|
+
"version": "0.5.1",
|
|
4
|
+
"description": "Author interactive local documents in Markdown, with expression-bound inputs, charts and diagrams.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"markdown",
|
|
7
|
+
"interactive",
|
|
8
|
+
"local-first",
|
|
9
|
+
"reactive",
|
|
10
|
+
"charts",
|
|
11
|
+
"diagrams",
|
|
12
|
+
"react",
|
|
13
|
+
"typescript"
|
|
14
|
+
],
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/yao1145/ReactiveMD.git"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://github.com/yao1145/ReactiveMD#readme",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/yao1145/ReactiveMD/issues"
|
|
23
|
+
},
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=22.12.0"
|
|
26
|
+
},
|
|
27
|
+
"type": "module",
|
|
28
|
+
"workspaces": [
|
|
29
|
+
"demo"
|
|
30
|
+
],
|
|
31
|
+
"files": [
|
|
32
|
+
"dist-library",
|
|
33
|
+
"dist-standalone",
|
|
34
|
+
"bin",
|
|
35
|
+
"cli",
|
|
36
|
+
"README.md",
|
|
37
|
+
"README-en.md",
|
|
38
|
+
"README-ch.md",
|
|
39
|
+
"CONTRIBUTING.md",
|
|
40
|
+
"CONTRIBUTING-ch.md",
|
|
41
|
+
"CHANGELOG.md",
|
|
42
|
+
"CHANGELOG-ch.md",
|
|
43
|
+
"SECURITY.md",
|
|
44
|
+
"SECURITY-ch.md",
|
|
45
|
+
"THIRD_PARTY_NOTICES.md",
|
|
46
|
+
"docs",
|
|
47
|
+
"examples"
|
|
48
|
+
],
|
|
49
|
+
"bin": {
|
|
50
|
+
"reactive-md": "./bin/reactive-md.mjs"
|
|
51
|
+
},
|
|
52
|
+
"sideEffects": [
|
|
53
|
+
"**/*.css"
|
|
54
|
+
],
|
|
55
|
+
"scripts": {
|
|
56
|
+
"dev": "npm run build:lib && npm run dev --workspace=@reactive-md/demo",
|
|
57
|
+
"dev:lib": "vite build --config vite.lib.config.ts --watch",
|
|
58
|
+
"build": "npm run typecheck && npm run build:lib",
|
|
59
|
+
"build:standalone": "vite build --config vite.standalone.config.ts",
|
|
60
|
+
"build:lib": "vite build --config vite.lib.config.ts && vite build --config vite.editor.config.ts && npm run build:standalone && tsc -p tsconfig.lib.json && node scripts/finalize-declarations.mjs",
|
|
61
|
+
"build:demo": "npm run build && npm run build --workspace=@reactive-md/demo",
|
|
62
|
+
"preview": "npm run preview --workspace=@reactive-md/demo",
|
|
63
|
+
"typecheck": "tsc --noEmit",
|
|
64
|
+
"test": "vitest run --config vitest.config.ts",
|
|
65
|
+
"lint": "node bin/reactive-md.mjs lint",
|
|
66
|
+
"test:components": "vitest run --config vitest.config.ts tests/component-protocol.test.ts tests/conformance.test.ts",
|
|
67
|
+
"test:demo": "npm run build:lib && npm run test --workspace=@reactive-md/demo",
|
|
68
|
+
"test:browser": "npm run test:browser --workspace=@reactive-md/demo",
|
|
69
|
+
"test:shareable": "node scripts/verify-shareable.mjs",
|
|
70
|
+
"test:toolbar": "npm run test:toolbar --workspace=@reactive-md/demo",
|
|
71
|
+
"test:package": "node scripts/verify-package.mjs",
|
|
72
|
+
"test:packed": "node scripts/verify-packed.mjs",
|
|
73
|
+
"test:docs": "node scripts/verify-docs.mjs",
|
|
74
|
+
"test:theme-browser": "node scripts/verify-theme-browser.mjs",
|
|
75
|
+
"test:date-browser": "node scripts/verify-date-input-browser.mjs",
|
|
76
|
+
"test:editor-browser": "node scripts/verify-editor-browser.mjs",
|
|
77
|
+
"test:markdown-browser": "node scripts/verify-markdown-browser.mjs",
|
|
78
|
+
"test:html-browser": "node scripts/verify-html-compat-browser.mjs",
|
|
79
|
+
"test:media-browser": "node scripts/verify-media-browser.mjs",
|
|
80
|
+
"test:computations-browser": "node scripts/verify-computations-browser.mjs",
|
|
81
|
+
"test:constraints-browser": "node scripts/verify-constraints-browser.mjs",
|
|
82
|
+
"verify:memo": "node scripts/verify-memo-browser.mjs",
|
|
83
|
+
"verify:release": "node scripts/verify-release.mjs",
|
|
84
|
+
"verify:release:node": "node scripts/verify-release.mjs --node",
|
|
85
|
+
"verify:release:browser": "node scripts/verify-release.mjs --browser",
|
|
86
|
+
"test:release-browser": "node scripts/verify-release-browser.mjs",
|
|
87
|
+
"benchmark": "node scripts/benchmark.mjs",
|
|
88
|
+
"benchmark:stages": "node scripts/benchmark-stages.mjs",
|
|
89
|
+
"notices": "node scripts/generate-notices.mjs",
|
|
90
|
+
"prepack": "npm run build && npm run notices"
|
|
91
|
+
},
|
|
92
|
+
"exports": {
|
|
93
|
+
".": {
|
|
94
|
+
"types": "./dist-library/types/index.d.ts",
|
|
95
|
+
"import": "./dist-library/reactive-md.js"
|
|
96
|
+
},
|
|
97
|
+
"./react": {
|
|
98
|
+
"types": "./dist-library/types/react/index.d.ts",
|
|
99
|
+
"import": "./dist-library/reactive-md-react.js"
|
|
100
|
+
},
|
|
101
|
+
"./styles.css": "./dist-library/reactive-md.css",
|
|
102
|
+
"./editor": {
|
|
103
|
+
"types": "./dist-library/types/editor/index.d.ts",
|
|
104
|
+
"import": "./dist-library/reactive-md-editor.js"
|
|
105
|
+
},
|
|
106
|
+
"./editor/styles.css": "./dist-library/reactive-md-editor.css"
|
|
107
|
+
},
|
|
108
|
+
"peerDependencies": {
|
|
109
|
+
"react": "^19.0.0",
|
|
110
|
+
"react-dom": "^19.0.0"
|
|
111
|
+
},
|
|
112
|
+
"peerDependenciesMeta": {
|
|
113
|
+
"react": {
|
|
114
|
+
"optional": true
|
|
115
|
+
},
|
|
116
|
+
"react-dom": {
|
|
117
|
+
"optional": true
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"devDependencies": {
|
|
121
|
+
"@types/node": "26.6.5",
|
|
122
|
+
"@types/react": "19.3.0",
|
|
123
|
+
"@types/react-dom": "19.3.0",
|
|
124
|
+
"lowlight": "3.3.0",
|
|
125
|
+
"parse5": "8.0.1",
|
|
126
|
+
"react": "19.3.1",
|
|
127
|
+
"react-dom": "19.3.1",
|
|
128
|
+
"remark-gfm": "4.0.1",
|
|
129
|
+
"remark-parse": "11.0.0",
|
|
130
|
+
"typescript": "7.0.2",
|
|
131
|
+
"unified": "11.0.5",
|
|
132
|
+
"vite": "8.3.5",
|
|
133
|
+
"vitest": "5.0.5"
|
|
134
|
+
}
|
|
135
|
+
}
|