comark-solid 0.0.1 → 0.0.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 +5 -0
- package/dist/index.js +4 -4
- package/package.json +40 -24
package/README.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Solid renderer for [Comark](https://comark.dev).
|
|
4
4
|
|
|
5
|
+
> [!WARNING]
|
|
6
|
+
> **Pre-release: Solid 2.0 RC**
|
|
7
|
+
>
|
|
8
|
+
> This package targets the Solid 2.0 RC versions of `solid-js` and `@solidjs/web`. Solid 2.0 is not stable yet, so bugs and compatibility issues may occur. Test before using it in production. See the [official RC announcement](https://github.com/solidjs/solid/discussions/2995).
|
|
9
|
+
|
|
5
10
|
## Installation
|
|
6
11
|
|
|
7
12
|
```bash
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { className, createComponent, dynamic, effect, insert, mergeProps, template } from "@solidjs/web";
|
|
2
2
|
import { parseMarkdown } from "comark";
|
|
3
3
|
import { isMarkdownDocument, resolveAttributes } from "comark/utils";
|
|
4
|
-
import { Loading, createMemo } from "solid-js";
|
|
4
|
+
import { Loading, createMemo, merge } from "solid-js";
|
|
5
5
|
//#region src/utils/ast.ts
|
|
6
6
|
function getTag(node) {
|
|
7
7
|
if (Array.isArray(node) && node.length >= 1 && typeof node[0] === "string") return node[0];
|
|
@@ -17,7 +17,7 @@ function getChildren(node) {
|
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/components/MarkdownDocument.tsx
|
|
20
|
-
var _tmpl$ =
|
|
20
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
21
21
|
const DEFAULT_LOCAL_CONTEXT = {
|
|
22
22
|
parent: void 0,
|
|
23
23
|
renderData: {
|
|
@@ -152,7 +152,7 @@ function createNodeRenderer(components) {
|
|
|
152
152
|
* ```
|
|
153
153
|
*/
|
|
154
154
|
const MarkdownDocument = (_props) => {
|
|
155
|
-
const props =
|
|
155
|
+
const props = merge({
|
|
156
156
|
components: {},
|
|
157
157
|
data: {},
|
|
158
158
|
class: void 0
|
|
@@ -212,7 +212,7 @@ const MarkdownDocument = (_props) => {
|
|
|
212
212
|
* ```
|
|
213
213
|
*/
|
|
214
214
|
const Markdown = (_props) => {
|
|
215
|
-
const props =
|
|
215
|
+
const props = merge({
|
|
216
216
|
components: {},
|
|
217
217
|
data: {}
|
|
218
218
|
}, _props);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "comark-solid",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Solid renderer for Comark.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"comark",
|
|
@@ -8,15 +8,19 @@
|
|
|
8
8
|
"solid",
|
|
9
9
|
"solidjs"
|
|
10
10
|
],
|
|
11
|
-
"homepage": "https://github.com/shiguri-01/
|
|
11
|
+
"homepage": "https://github.com/shiguri-01/comark-solid#readme",
|
|
12
12
|
"bugs": {
|
|
13
|
-
"url": "https://github.com/shiguri-01/
|
|
13
|
+
"url": "https://github.com/shiguri-01/comark-solid/issues"
|
|
14
14
|
},
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "shiguri",
|
|
18
18
|
"url": "https://github.com/shiguri-01"
|
|
19
19
|
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/shiguri-01/comark-solid.git"
|
|
23
|
+
},
|
|
20
24
|
"files": [
|
|
21
25
|
"dist"
|
|
22
26
|
],
|
|
@@ -29,30 +33,42 @@
|
|
|
29
33
|
"publishConfig": {
|
|
30
34
|
"access": "public"
|
|
31
35
|
},
|
|
32
|
-
"scripts": {
|
|
33
|
-
"build": "vp pack",
|
|
34
|
-
"dev": "vp pack --watch",
|
|
35
|
-
"test": "vp test",
|
|
36
|
-
"check": "vp check",
|
|
37
|
-
"prepublishOnly": "vp run build"
|
|
38
|
-
},
|
|
39
36
|
"devDependencies": {
|
|
40
|
-
"@solidjs/testing-library": "
|
|
41
|
-
"@solidjs/
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
37
|
+
"@solidjs/testing-library": "^1.0.0-beta.3",
|
|
38
|
+
"@solidjs/vite-plugin": "^3.0.0-next.39",
|
|
39
|
+
"@solidjs/web": "2.0.0-rc.6",
|
|
40
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
44
41
|
"bumpp": "^11.1.0",
|
|
45
|
-
"comark": "
|
|
46
|
-
"
|
|
47
|
-
"
|
|
42
|
+
"comark": "^0.6.2",
|
|
43
|
+
"eslint-plugin-solid": "~0.18.0",
|
|
44
|
+
"jsdom": "^30.0.1",
|
|
45
|
+
"solid-js": "^2.0.0-rc.6",
|
|
48
46
|
"typescript": "^7.0.2",
|
|
49
|
-
"
|
|
50
|
-
"vite": "
|
|
51
|
-
"vite-plus": "catalog:"
|
|
47
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.0",
|
|
48
|
+
"vite-plus": "0.3.0"
|
|
52
49
|
},
|
|
53
50
|
"peerDependencies": {
|
|
54
|
-
"@solidjs/web": "
|
|
55
|
-
"comark": "
|
|
56
|
-
"solid-js": "
|
|
51
|
+
"@solidjs/web": "^2.0.0-rc.6",
|
|
52
|
+
"comark": "^0.6.2",
|
|
53
|
+
"solid-js": "^2.0.0-rc.6"
|
|
54
|
+
},
|
|
55
|
+
"devEngines": {
|
|
56
|
+
"packageManager": {
|
|
57
|
+
"name": "pnpm",
|
|
58
|
+
"version": "12.3.4",
|
|
59
|
+
"onFail": "download"
|
|
60
|
+
},
|
|
61
|
+
"runtime": {
|
|
62
|
+
"name": "node",
|
|
63
|
+
"version": "24.21.0",
|
|
64
|
+
"onFail": "download"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"scripts": {
|
|
68
|
+
"build": "vp pack",
|
|
69
|
+
"dev": "vp pack --watch",
|
|
70
|
+
"test": "vp test",
|
|
71
|
+
"check": "vp check",
|
|
72
|
+
"bump": "bumpp"
|
|
57
73
|
}
|
|
58
|
-
}
|
|
74
|
+
}
|