@humanspeak/svelte-markdown 0.8.10 → 0.8.11
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.
|
@@ -5,6 +5,7 @@ export { default as Code } from './Code.svelte';
|
|
|
5
5
|
export { default as Codespan } from './Codespan.svelte';
|
|
6
6
|
export { default as Del } from './Del.svelte';
|
|
7
7
|
export { default as Em } from './Em.svelte';
|
|
8
|
+
export { default as Escape } from './Escape.svelte';
|
|
8
9
|
export { default as Heading } from './Heading.svelte';
|
|
9
10
|
export { default as Hr } from './Hr.svelte';
|
|
10
11
|
export { default as Html } from './html/index.js';
|
package/dist/renderers/index.js
CHANGED
|
@@ -5,6 +5,7 @@ export { default as Code } from './Code.svelte';
|
|
|
5
5
|
export { default as Codespan } from './Codespan.svelte';
|
|
6
6
|
export { default as Del } from './Del.svelte';
|
|
7
7
|
export { default as Em } from './Em.svelte';
|
|
8
|
+
export { default as Escape } from './Escape.svelte';
|
|
8
9
|
export { default as Heading } from './Heading.svelte';
|
|
9
10
|
export { default as Hr } from './Hr.svelte';
|
|
10
11
|
export { default as Html } from './html/index.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { default as Slugger } from 'github-slugger';
|
|
2
2
|
export { Lexer, type MarkedOptions, type Token, type Tokens, type TokensList } from 'marked';
|
|
3
|
-
import type { Component } from 'svelte';
|
|
4
3
|
import { type HtmlRenderers } from '../renderers/html/index.js';
|
|
4
|
+
import type { Component } from 'svelte';
|
|
5
5
|
import type { SvelteMarkdownOptions } from '../types.js';
|
|
6
6
|
/**
|
|
7
7
|
* Represents a Svelte component that can be used as a renderer.
|
|
@@ -26,6 +26,7 @@ export type RendererComponent = Component<any, any, any> | undefined | null;
|
|
|
26
26
|
export type Renderers = {
|
|
27
27
|
html: HtmlRenderers;
|
|
28
28
|
rawtext: RendererComponent;
|
|
29
|
+
escape: RendererComponent;
|
|
29
30
|
heading: RendererComponent;
|
|
30
31
|
paragraph: RendererComponent;
|
|
31
32
|
blockquote: RendererComponent;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { default as Slugger } from 'github-slugger';
|
|
2
2
|
export { Lexer } from 'marked';
|
|
3
3
|
import {} from '../renderers/html/index.js';
|
|
4
|
-
import { Blockquote, Br, Code, Codespan, Del, Em, Heading, Hr, Html, Image, Link, List, ListItem, Paragraph, RawText, Strong, Table, TableBody, TableCell, TableHead, TableRow, Text } from '../renderers/index.js';
|
|
4
|
+
import { Blockquote, Br, Code, Codespan, Del, Em, Escape, Heading, Hr, Html, Image, Link, List, ListItem, Paragraph, RawText, Strong, Table, TableBody, TableCell, TableHead, TableRow, Text } from '../renderers/index.js';
|
|
5
5
|
/**
|
|
6
6
|
* Default renderer configuration mapping markdown elements to Svelte components.
|
|
7
7
|
* Provides out-of-the-box rendering capabilities while allowing for customization.
|
|
@@ -20,6 +20,7 @@ export const defaultRenderers = {
|
|
|
20
20
|
image: Image,
|
|
21
21
|
link: Link,
|
|
22
22
|
em: Em,
|
|
23
|
+
escape: Escape,
|
|
23
24
|
strong: Strong,
|
|
24
25
|
codespan: Codespan,
|
|
25
26
|
del: Del,
|
package/package.json
CHANGED
|
@@ -1,131 +1,129 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
"
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
"
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
"
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
"
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
]
|
|
131
|
-
}
|
|
2
|
+
"name": "@humanspeak/svelte-markdown",
|
|
3
|
+
"version": "0.8.11",
|
|
4
|
+
"description": "A powerful, customizable markdown renderer for Svelte with TypeScript support",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"svelte",
|
|
7
|
+
"markdown",
|
|
8
|
+
"renderer",
|
|
9
|
+
"parser",
|
|
10
|
+
"marked",
|
|
11
|
+
"component",
|
|
12
|
+
"sveltekit",
|
|
13
|
+
"svelte5",
|
|
14
|
+
"md",
|
|
15
|
+
"documentation",
|
|
16
|
+
"html",
|
|
17
|
+
"converter",
|
|
18
|
+
"formatting"
|
|
19
|
+
],
|
|
20
|
+
"homepage": "https://markdown.svelte.page",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/humanspeak/svelte-markdown/issues"
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/humanspeak/svelte-markdown.git"
|
|
27
|
+
},
|
|
28
|
+
"funding": {
|
|
29
|
+
"type": "github",
|
|
30
|
+
"url": "https://github.com/sponsors/humanspeak"
|
|
31
|
+
},
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"author": "Humanspeak, Inc.",
|
|
34
|
+
"sideEffects": [
|
|
35
|
+
"**/*.css"
|
|
36
|
+
],
|
|
37
|
+
"type": "module",
|
|
38
|
+
"exports": {
|
|
39
|
+
".": {
|
|
40
|
+
"types": "./dist/index.d.ts",
|
|
41
|
+
"svelte": "./dist/index.js"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"svelte": "./dist/index.js",
|
|
45
|
+
"types": "./dist/index.d.ts",
|
|
46
|
+
"files": [
|
|
47
|
+
"dist",
|
|
48
|
+
"!dist/**/*.test.*",
|
|
49
|
+
"!dist/**/*.spec.*",
|
|
50
|
+
"!dist/test/**/*"
|
|
51
|
+
],
|
|
52
|
+
"overrides": {
|
|
53
|
+
"@sveltejs/kit": {
|
|
54
|
+
"cookie": "^0.7.0"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"github-slugger": "^2.0.0",
|
|
59
|
+
"htmlparser2": "^10.0.0",
|
|
60
|
+
"marked": "^16.2.0"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@eslint/compat": "^1.3.2",
|
|
64
|
+
"@eslint/js": "^9.33.0",
|
|
65
|
+
"@playwright/test": "^1.55.0",
|
|
66
|
+
"@sveltejs/adapter-auto": "^6.1.0",
|
|
67
|
+
"@sveltejs/kit": "^2.36.1",
|
|
68
|
+
"@sveltejs/package": "^2.5.0",
|
|
69
|
+
"@sveltejs/vite-plugin-svelte": "^6.1.3",
|
|
70
|
+
"@testing-library/jest-dom": "^6.8.0",
|
|
71
|
+
"@testing-library/svelte": "^5.2.8",
|
|
72
|
+
"@testing-library/user-event": "^14.6.1",
|
|
73
|
+
"@types/node": "^24.3.0",
|
|
74
|
+
"@typescript-eslint/eslint-plugin": "^8.40.0",
|
|
75
|
+
"@typescript-eslint/parser": "^8.40.0",
|
|
76
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
77
|
+
"eslint": "^9.33.0",
|
|
78
|
+
"eslint-config-prettier": "^10.1.8",
|
|
79
|
+
"eslint-plugin-import": "^2.32.0",
|
|
80
|
+
"eslint-plugin-svelte": "^3.11.0",
|
|
81
|
+
"eslint-plugin-unused-imports": "^4.2.0",
|
|
82
|
+
"globals": "^16.3.0",
|
|
83
|
+
"husky": "^9.1.7",
|
|
84
|
+
"jsdom": "^26.1.0",
|
|
85
|
+
"prettier": "^3.6.2",
|
|
86
|
+
"prettier-plugin-organize-imports": "^4.2.0",
|
|
87
|
+
"prettier-plugin-svelte": "^3.4.0",
|
|
88
|
+
"prettier-plugin-tailwindcss": "^0.6.14",
|
|
89
|
+
"publint": "^0.3.12",
|
|
90
|
+
"svelte": "^5.38.2",
|
|
91
|
+
"svelte-check": "^4.3.1",
|
|
92
|
+
"typescript": "^5.9.2",
|
|
93
|
+
"typescript-eslint": "^8.40.0",
|
|
94
|
+
"vite": "^7.1.3",
|
|
95
|
+
"vitest": "^3.2.4"
|
|
96
|
+
},
|
|
97
|
+
"peerDependencies": {
|
|
98
|
+
"svelte": "^5.0.0"
|
|
99
|
+
},
|
|
100
|
+
"volta": {
|
|
101
|
+
"node": "22.17.1"
|
|
102
|
+
},
|
|
103
|
+
"publishConfig": {
|
|
104
|
+
"access": "public"
|
|
105
|
+
},
|
|
106
|
+
"tags": [
|
|
107
|
+
"svelte",
|
|
108
|
+
"markdown"
|
|
109
|
+
],
|
|
110
|
+
"scripts": {
|
|
111
|
+
"build": "vite build && npm run package",
|
|
112
|
+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
113
|
+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
114
|
+
"dev": "vite dev",
|
|
115
|
+
"format": "prettier --write .",
|
|
116
|
+
"lint": "prettier --check . && eslint .",
|
|
117
|
+
"lint:fix": "npm run format && eslint . --fix",
|
|
118
|
+
"package": "svelte-kit sync && svelte-package && publint",
|
|
119
|
+
"preview": "vite preview",
|
|
120
|
+
"test": "vitest run --coverage",
|
|
121
|
+
"test:all": "npm run test && npm run test:e2e",
|
|
122
|
+
"test:e2e": "playwright test",
|
|
123
|
+
"test:e2e:debug": "playwright test --debug",
|
|
124
|
+
"test:e2e:report": "playwright show-report",
|
|
125
|
+
"test:e2e:ui": "playwright test --ui",
|
|
126
|
+
"test:only": "vitest run",
|
|
127
|
+
"test:watch": "vitest"
|
|
128
|
+
}
|
|
129
|
+
}
|