@marp-team/marp-core 3.9.0 → 4.0.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/README.md +16 -14
- package/lib/browser.cjs.js +1 -1
- package/lib/browser.js +1 -1
- package/lib/marp.js +2 -2
- package/package.json +50 -51
- package/types/src/custom-elements/browser/marp-custom-element.d.ts +65 -52
- package/types/src/highlightjs.d.ts +0 -1
- package/types/src/html/allowlist.d.ts +6 -0
- package/types/src/marp.d.ts +3 -8
- package/types/src/size/size.d.ts +0 -1
- package/types/src/prebundles/mocks/browserslist.d.ts +0 -2
- package/types/src/prebundles/postcss-minify-plugins.d.ts +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marp-team/marp-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "The core of Marp tools",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -34,17 +34,17 @@
|
|
|
34
34
|
"browser.d.ts"
|
|
35
35
|
],
|
|
36
36
|
"engines": {
|
|
37
|
-
"node": "
|
|
37
|
+
"node": ">=18"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
|
-
"build": "
|
|
41
|
-
"check:audit": "
|
|
42
|
-
"check:format": "
|
|
40
|
+
"build": "npm -s run clean && rollup -c",
|
|
41
|
+
"check:audit": "npm audit",
|
|
42
|
+
"check:format": "npm -s run format -- -c",
|
|
43
43
|
"check:ts": "tsc --noEmit",
|
|
44
44
|
"clean": "rimraf lib",
|
|
45
45
|
"format": "prettier \"**/*.{css,js,json,md,mjs,scss,ts,yaml,yml}\"",
|
|
46
|
-
"format:write": "
|
|
47
|
-
"lint:js": "eslint --
|
|
46
|
+
"format:write": "npm -s run format -- --write",
|
|
47
|
+
"lint:js": "eslint --cache",
|
|
48
48
|
"lint:css": "stylelint \"{src,themes}/**/*.{css,scss}\"",
|
|
49
49
|
"prepack": "npm-run-all --parallel check:* lint:* test:coverage --parallel build types",
|
|
50
50
|
"preversion": "run-p check:* lint:* test:coverage",
|
|
@@ -65,64 +65,63 @@
|
|
|
65
65
|
"exec": "npx @marp-team/marp-cli@latest -y"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@
|
|
69
|
-
"@rollup/plugin-
|
|
70
|
-
"@rollup/plugin-
|
|
71
|
-
"@rollup/plugin-
|
|
72
|
-
"@rollup/plugin-
|
|
68
|
+
"@csstools/postcss-minify": "^2.0.3",
|
|
69
|
+
"@rollup/plugin-alias": "^5.1.1",
|
|
70
|
+
"@rollup/plugin-commonjs": "^28.0.2",
|
|
71
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
72
|
+
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
73
73
|
"@rollup/plugin-terser": "^0.4.4",
|
|
74
|
-
"@rollup/plugin-typescript": "^
|
|
75
|
-
"@tsconfig/
|
|
76
|
-
"@
|
|
77
|
-
"@
|
|
78
|
-
"@
|
|
79
|
-
"@
|
|
80
|
-
"autoprefixer": "^10.4.
|
|
81
|
-
"cheerio": "^1.0.0
|
|
82
|
-
"cssnano": "^
|
|
83
|
-
"emoji-regex": "
|
|
84
|
-
"eslint": "^
|
|
85
|
-
"eslint-config-prettier": "^9.
|
|
86
|
-
"eslint-
|
|
87
|
-
"eslint-plugin-
|
|
88
|
-
"
|
|
74
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
75
|
+
"@tsconfig/node20": "^20.1.4",
|
|
76
|
+
"@tsconfig/recommended": "^1.0.8",
|
|
77
|
+
"@twemoji/api": "^15.1.0",
|
|
78
|
+
"@types/eslint__js": "^8.42.3",
|
|
79
|
+
"@types/jest": "^29.5.14",
|
|
80
|
+
"autoprefixer": "^10.4.20",
|
|
81
|
+
"cheerio": "^1.0.0",
|
|
82
|
+
"cssnano": "^7.0.6",
|
|
83
|
+
"emoji-regex": "10.4.0",
|
|
84
|
+
"eslint": "^9.17.0",
|
|
85
|
+
"eslint-config-prettier": "^9.1.0",
|
|
86
|
+
"eslint-import-resolver-typescript": "^3.7.0",
|
|
87
|
+
"eslint-plugin-import-x": "^4.6.1",
|
|
88
|
+
"eslint-plugin-jest": "^28.10.0",
|
|
89
|
+
"github-markdown-css": "5.8.1",
|
|
90
|
+
"globals": "^15.14.0",
|
|
89
91
|
"jest": "^29.7.0",
|
|
90
92
|
"jest-environment-jsdom": "^29.7.0",
|
|
91
93
|
"jest-junit": "^16.0.0",
|
|
92
94
|
"jest-plugin-context": "^2.9.0",
|
|
93
|
-
"markdown-it": "^
|
|
94
|
-
"markdown-it-emoji": "^
|
|
95
|
+
"markdown-it": "^14.1.0",
|
|
96
|
+
"markdown-it-emoji": "^3.0.0",
|
|
95
97
|
"mkdirp": "^3.0.1",
|
|
96
|
-
"nodemon": "^3.
|
|
97
|
-
"npm-
|
|
98
|
-
"
|
|
99
|
-
"postcss-minify-selectors": "^6.0.0",
|
|
100
|
-
"postcss-normalize-whitespace": "^6.0.0",
|
|
98
|
+
"nodemon": "^3.1.9",
|
|
99
|
+
"npm-check-updates": "^17.1.12",
|
|
100
|
+
"npm-run-all2": "^7.0.2",
|
|
101
101
|
"postcss-url": "^10.1.3",
|
|
102
|
-
"prettier": "^3.
|
|
103
|
-
"rimraf": "^
|
|
104
|
-
"rollup": "^4.
|
|
102
|
+
"prettier": "^3.4.2",
|
|
103
|
+
"rimraf": "^6.0.1",
|
|
104
|
+
"rollup": "^4.29.1",
|
|
105
105
|
"rollup-plugin-postcss": "^4.0.2",
|
|
106
106
|
"rollup-plugin-string": "^3.0.0",
|
|
107
|
-
"sass": "^1.
|
|
108
|
-
"sass-extended-importer": "^1.0.1",
|
|
107
|
+
"sass": "^1.83.0",
|
|
109
108
|
"self-closing-tags": "^1.0.1",
|
|
110
|
-
"stylelint": "^
|
|
111
|
-
"stylelint-config-
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"typescript": "^
|
|
109
|
+
"stylelint": "^16.12.0",
|
|
110
|
+
"stylelint-config-standard-scss": "^14.0.0",
|
|
111
|
+
"ts-jest": "29.2.5",
|
|
112
|
+
"tslib": "^2.8.1",
|
|
113
|
+
"typescript": "^5.7.2",
|
|
114
|
+
"typescript-eslint": "^8.18.2"
|
|
116
115
|
},
|
|
117
116
|
"dependencies": {
|
|
118
|
-
"@marp-team/marpit": "^
|
|
117
|
+
"@marp-team/marpit": "^3.1.2",
|
|
119
118
|
"@marp-team/marpit-svg-polyfill": "^2.1.0",
|
|
120
|
-
"highlight.js": "11.
|
|
121
|
-
"katex": "^0.16.
|
|
119
|
+
"highlight.js": "^11.11.0",
|
|
120
|
+
"katex": "^0.16.18",
|
|
122
121
|
"mathjax-full": "^3.2.2",
|
|
123
|
-
"postcss": "^8.4.
|
|
124
|
-
"postcss-selector-parser": "^
|
|
125
|
-
"xss": "^1.0.
|
|
122
|
+
"postcss": "^8.4.49",
|
|
123
|
+
"postcss-selector-parser": "^7.0.0",
|
|
124
|
+
"xss": "^1.0.15"
|
|
126
125
|
},
|
|
127
126
|
"publishConfig": {
|
|
128
127
|
"access": "public"
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
type Constructor<T =
|
|
1
|
+
type Constructor<T = object> = new (...args: any[]) => T;
|
|
2
2
|
export declare const createMarpCustomElement: <T extends Constructor<HTMLElement>>(Base: T, { attrs, style }: {
|
|
3
|
-
attrs?: Record<string, string
|
|
4
|
-
style?: string
|
|
3
|
+
attrs?: Record<string, string>;
|
|
4
|
+
style?: string;
|
|
5
5
|
}) => {
|
|
6
6
|
new (...args: any[]): {
|
|
7
|
-
shadowRoot: ShadowRoot;
|
|
7
|
+
readonly shadowRoot: ShadowRoot | null;
|
|
8
8
|
connectedCallback(): void;
|
|
9
9
|
attributeChangedCallback(): void;
|
|
10
|
+
_shadow(): ShadowRoot | null;
|
|
10
11
|
_update(): void;
|
|
11
12
|
accessKey: string;
|
|
12
13
|
readonly accessKeyLabel: string;
|
|
@@ -27,15 +28,16 @@ export declare const createMarpCustomElement: <T extends Constructor<HTMLElement
|
|
|
27
28
|
spellcheck: boolean;
|
|
28
29
|
title: string;
|
|
29
30
|
translate: boolean;
|
|
31
|
+
writingSuggestions: string;
|
|
30
32
|
attachInternals(): ElementInternals;
|
|
31
33
|
click(): void;
|
|
32
34
|
hidePopover(): void;
|
|
33
35
|
showPopover(): void;
|
|
34
|
-
togglePopover(force?: boolean
|
|
35
|
-
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions
|
|
36
|
-
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions
|
|
37
|
-
removeEventListener<
|
|
38
|
-
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions
|
|
36
|
+
togglePopover(force?: boolean): boolean;
|
|
37
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
38
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
39
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
40
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
39
41
|
readonly attributes: NamedNodeMap;
|
|
40
42
|
readonly classList: DOMTokenList;
|
|
41
43
|
className: string;
|
|
@@ -43,7 +45,9 @@ export declare const createMarpCustomElement: <T extends Constructor<HTMLElement
|
|
|
43
45
|
readonly clientLeft: number;
|
|
44
46
|
readonly clientTop: number;
|
|
45
47
|
readonly clientWidth: number;
|
|
48
|
+
readonly currentCSSZoom: number;
|
|
46
49
|
id: string;
|
|
50
|
+
innerHTML: string;
|
|
47
51
|
readonly localName: string;
|
|
48
52
|
readonly namespaceURI: string | null;
|
|
49
53
|
onfullscreenchange: ((this: Element, ev: Event) => any) | null;
|
|
@@ -59,10 +63,10 @@ export declare const createMarpCustomElement: <T extends Constructor<HTMLElement
|
|
|
59
63
|
slot: string;
|
|
60
64
|
readonly tagName: string;
|
|
61
65
|
attachShadow(init: ShadowRootInit): ShadowRoot;
|
|
62
|
-
checkVisibility(options?: CheckVisibilityOptions
|
|
63
|
-
closest<
|
|
64
|
-
closest<
|
|
65
|
-
closest<
|
|
66
|
+
checkVisibility(options?: CheckVisibilityOptions): boolean;
|
|
67
|
+
closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;
|
|
68
|
+
closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;
|
|
69
|
+
closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null;
|
|
66
70
|
closest<E extends Element = Element>(selectors: string): E | null;
|
|
67
71
|
computedStyleMap(): StylePropertyMapReadOnly;
|
|
68
72
|
getAttribute(qualifiedName: string): string | null;
|
|
@@ -73,42 +77,44 @@ export declare const createMarpCustomElement: <T extends Constructor<HTMLElement
|
|
|
73
77
|
getBoundingClientRect(): DOMRect;
|
|
74
78
|
getClientRects(): DOMRectList;
|
|
75
79
|
getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
|
|
76
|
-
getElementsByTagName<
|
|
77
|
-
getElementsByTagName<
|
|
78
|
-
getElementsByTagName<
|
|
79
|
-
getElementsByTagName<
|
|
80
|
+
getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
|
|
81
|
+
getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
|
|
82
|
+
getElementsByTagName<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
|
|
83
|
+
getElementsByTagName<K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
|
|
80
84
|
getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
|
|
81
85
|
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
|
|
82
86
|
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
|
|
83
87
|
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>;
|
|
84
88
|
getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
|
|
89
|
+
getHTML(options?: GetHTMLOptions): string;
|
|
85
90
|
hasAttribute(qualifiedName: string): boolean;
|
|
86
91
|
hasAttributeNS(namespace: string | null, localName: string): boolean;
|
|
87
92
|
hasAttributes(): boolean;
|
|
88
93
|
hasPointerCapture(pointerId: number): boolean;
|
|
89
94
|
insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
|
|
90
|
-
insertAdjacentHTML(position: InsertPosition,
|
|
95
|
+
insertAdjacentHTML(position: InsertPosition, string: string): void;
|
|
91
96
|
insertAdjacentText(where: InsertPosition, data: string): void;
|
|
92
97
|
matches(selectors: string): boolean;
|
|
93
98
|
releasePointerCapture(pointerId: number): void;
|
|
94
99
|
removeAttribute(qualifiedName: string): void;
|
|
95
100
|
removeAttributeNS(namespace: string | null, localName: string): void;
|
|
96
101
|
removeAttributeNode(attr: Attr): Attr;
|
|
97
|
-
requestFullscreen(options?: FullscreenOptions
|
|
98
|
-
requestPointerLock(): void
|
|
99
|
-
scroll(options?: ScrollToOptions
|
|
102
|
+
requestFullscreen(options?: FullscreenOptions): Promise<void>;
|
|
103
|
+
requestPointerLock(options?: PointerLockOptions): Promise<void>;
|
|
104
|
+
scroll(options?: ScrollToOptions): void;
|
|
100
105
|
scroll(x: number, y: number): void;
|
|
101
|
-
scrollBy(options?: ScrollToOptions
|
|
106
|
+
scrollBy(options?: ScrollToOptions): void;
|
|
102
107
|
scrollBy(x: number, y: number): void;
|
|
103
|
-
scrollIntoView(arg?: boolean | ScrollIntoViewOptions
|
|
104
|
-
scrollTo(options?: ScrollToOptions
|
|
108
|
+
scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
|
|
109
|
+
scrollTo(options?: ScrollToOptions): void;
|
|
105
110
|
scrollTo(x: number, y: number): void;
|
|
106
111
|
setAttribute(qualifiedName: string, value: string): void;
|
|
107
112
|
setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
|
|
108
113
|
setAttributeNode(attr: Attr): Attr | null;
|
|
109
114
|
setAttributeNodeNS(attr: Attr): Attr | null;
|
|
115
|
+
setHTMLUnsafe(html: string): void;
|
|
110
116
|
setPointerCapture(pointerId: number): void;
|
|
111
|
-
toggleAttribute(qualifiedName: string, force?: boolean
|
|
117
|
+
toggleAttribute(qualifiedName: string, force?: boolean): boolean;
|
|
112
118
|
webkitMatchesSelector(selectors: string): boolean;
|
|
113
119
|
readonly baseURI: string;
|
|
114
120
|
readonly childNodes: NodeListOf<ChildNode>;
|
|
@@ -124,20 +130,20 @@ export declare const createMarpCustomElement: <T extends Constructor<HTMLElement
|
|
|
124
130
|
readonly previousSibling: ChildNode | null;
|
|
125
131
|
textContent: string | null;
|
|
126
132
|
appendChild<T_1 extends Node>(node: T_1): T_1;
|
|
127
|
-
cloneNode(deep?: boolean
|
|
133
|
+
cloneNode(deep?: boolean): Node;
|
|
128
134
|
compareDocumentPosition(other: Node): number;
|
|
129
135
|
contains(other: Node | null): boolean;
|
|
130
|
-
getRootNode(options?: GetRootNodeOptions
|
|
136
|
+
getRootNode(options?: GetRootNodeOptions): Node;
|
|
131
137
|
hasChildNodes(): boolean;
|
|
132
|
-
insertBefore<
|
|
138
|
+
insertBefore<T_1 extends Node>(node: T_1, child: Node | null): T_1;
|
|
133
139
|
isDefaultNamespace(namespace: string | null): boolean;
|
|
134
140
|
isEqualNode(otherNode: Node | null): boolean;
|
|
135
141
|
isSameNode(otherNode: Node | null): boolean;
|
|
136
142
|
lookupNamespaceURI(prefix: string | null): string | null;
|
|
137
143
|
lookupPrefix(namespace: string | null): string | null;
|
|
138
144
|
normalize(): void;
|
|
139
|
-
removeChild<
|
|
140
|
-
replaceChild<
|
|
145
|
+
removeChild<T_1 extends Node>(child: T_1): T_1;
|
|
146
|
+
replaceChild<T_1 extends Node>(node: Node, child: T_1): T_1;
|
|
141
147
|
readonly ELEMENT_NODE: 1;
|
|
142
148
|
readonly ATTRIBUTE_NODE: 2;
|
|
143
149
|
readonly TEXT_NODE: 3;
|
|
@@ -159,12 +165,16 @@ export declare const createMarpCustomElement: <T extends Constructor<HTMLElement
|
|
|
159
165
|
dispatchEvent(event: Event): boolean;
|
|
160
166
|
ariaAtomic: string | null;
|
|
161
167
|
ariaAutoComplete: string | null;
|
|
168
|
+
ariaBrailleLabel: string | null;
|
|
169
|
+
ariaBrailleRoleDescription: string | null;
|
|
162
170
|
ariaBusy: string | null;
|
|
163
171
|
ariaChecked: string | null;
|
|
164
172
|
ariaColCount: string | null;
|
|
165
173
|
ariaColIndex: string | null;
|
|
174
|
+
ariaColIndexText: string | null;
|
|
166
175
|
ariaColSpan: string | null;
|
|
167
176
|
ariaCurrent: string | null;
|
|
177
|
+
ariaDescription: string | null;
|
|
168
178
|
ariaDisabled: string | null;
|
|
169
179
|
ariaExpanded: string | null;
|
|
170
180
|
ariaHasPopup: string | null;
|
|
@@ -186,6 +196,7 @@ export declare const createMarpCustomElement: <T extends Constructor<HTMLElement
|
|
|
186
196
|
ariaRoleDescription: string | null;
|
|
187
197
|
ariaRowCount: string | null;
|
|
188
198
|
ariaRowIndex: string | null;
|
|
199
|
+
ariaRowIndexText: string | null;
|
|
189
200
|
ariaRowSpan: string | null;
|
|
190
201
|
ariaSelected: string | null;
|
|
191
202
|
ariaSetSize: string | null;
|
|
@@ -195,32 +206,31 @@ export declare const createMarpCustomElement: <T extends Constructor<HTMLElement
|
|
|
195
206
|
ariaValueNow: string | null;
|
|
196
207
|
ariaValueText: string | null;
|
|
197
208
|
role: string | null;
|
|
198
|
-
animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions
|
|
199
|
-
getAnimations(options?: GetAnimationsOptions
|
|
200
|
-
after(...nodes: (
|
|
201
|
-
before(...nodes: (
|
|
209
|
+
animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation;
|
|
210
|
+
getAnimations(options?: GetAnimationsOptions): Animation[];
|
|
211
|
+
after(...nodes: (Node | string)[]): void;
|
|
212
|
+
before(...nodes: (Node | string)[]): void;
|
|
202
213
|
remove(): void;
|
|
203
|
-
replaceWith(...nodes: (
|
|
204
|
-
innerHTML: string;
|
|
214
|
+
replaceWith(...nodes: (Node | string)[]): void;
|
|
205
215
|
readonly nextElementSibling: Element | null;
|
|
206
216
|
readonly previousElementSibling: Element | null;
|
|
207
217
|
readonly childElementCount: number;
|
|
208
218
|
readonly children: HTMLCollection;
|
|
209
219
|
readonly firstElementChild: Element | null;
|
|
210
220
|
readonly lastElementChild: Element | null;
|
|
211
|
-
append(...nodes: (
|
|
212
|
-
prepend(...nodes: (
|
|
213
|
-
querySelector<
|
|
214
|
-
querySelector<
|
|
215
|
-
querySelector<
|
|
216
|
-
querySelector<
|
|
217
|
-
querySelector<
|
|
218
|
-
querySelectorAll<
|
|
219
|
-
querySelectorAll<
|
|
220
|
-
querySelectorAll<
|
|
221
|
-
querySelectorAll<
|
|
222
|
-
querySelectorAll<
|
|
223
|
-
replaceChildren(...nodes: (
|
|
221
|
+
append(...nodes: (Node | string)[]): void;
|
|
222
|
+
prepend(...nodes: (Node | string)[]): void;
|
|
223
|
+
querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
|
|
224
|
+
querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
|
|
225
|
+
querySelector<K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null;
|
|
226
|
+
querySelector<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null;
|
|
227
|
+
querySelector<E extends Element = Element>(selectors: string): E | null;
|
|
228
|
+
querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
|
|
229
|
+
querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
|
|
230
|
+
querySelectorAll<K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>;
|
|
231
|
+
querySelectorAll<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
|
|
232
|
+
querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
|
|
233
|
+
replaceChildren(...nodes: (Node | string)[]): void;
|
|
224
234
|
readonly assignedSlot: HTMLSlotElement | null;
|
|
225
235
|
readonly attributeStyleMap: StylePropertyMap;
|
|
226
236
|
readonly style: CSSStyleDeclaration;
|
|
@@ -235,6 +245,7 @@ export declare const createMarpCustomElement: <T extends Constructor<HTMLElement
|
|
|
235
245
|
onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
236
246
|
onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
237
247
|
onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
|
|
248
|
+
onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
238
249
|
onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
239
250
|
oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
240
251
|
oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
@@ -242,7 +253,9 @@ export declare const createMarpCustomElement: <T extends Constructor<HTMLElement
|
|
|
242
253
|
onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
243
254
|
onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
244
255
|
onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
256
|
+
oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
245
257
|
oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
258
|
+
oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
246
259
|
oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
247
260
|
oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
248
261
|
oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
@@ -290,7 +303,7 @@ export declare const createMarpCustomElement: <T extends Constructor<HTMLElement
|
|
|
290
303
|
onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
291
304
|
onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
292
305
|
onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
293
|
-
onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent
|
|
306
|
+
onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
|
|
294
307
|
onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
295
308
|
onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
296
309
|
onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
@@ -325,10 +338,10 @@ export declare const createMarpCustomElement: <T extends Constructor<HTMLElement
|
|
|
325
338
|
onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
|
|
326
339
|
autofocus: boolean;
|
|
327
340
|
readonly dataset: DOMStringMap;
|
|
328
|
-
nonce?: string
|
|
341
|
+
nonce?: string;
|
|
329
342
|
tabIndex: number;
|
|
330
343
|
blur(): void;
|
|
331
|
-
focus(options?: FocusOptions
|
|
344
|
+
focus(options?: FocusOptions): void;
|
|
332
345
|
};
|
|
333
346
|
readonly observedAttributes: string[];
|
|
334
347
|
} & T;
|
package/types/src/marp.d.ts
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { Marpit, Options, ThemeSetPackOptions } from '@marp-team/marpit';
|
|
2
2
|
import type { HLJSApi } from 'highlight.js';
|
|
3
3
|
import * as emojiPlugin from './emoji/emoji';
|
|
4
|
+
import { type HTMLAllowList } from './html/allowlist';
|
|
4
5
|
import * as mathPlugin from './math/math';
|
|
5
6
|
import * as scriptPlugin from './script/script';
|
|
6
7
|
import * as slugPlugin from './slug/slug';
|
|
7
8
|
export interface MarpOptions extends Options {
|
|
8
9
|
emoji?: emojiPlugin.EmojiOptions;
|
|
9
|
-
html?: boolean |
|
|
10
|
-
[tag: string]: string[] | {
|
|
11
|
-
[attr: string]: boolean | ((value: string) => string);
|
|
12
|
-
};
|
|
13
|
-
};
|
|
10
|
+
html?: boolean | HTMLAllowList;
|
|
14
11
|
markdown?: object;
|
|
15
12
|
math?: mathPlugin.MathOptions;
|
|
16
13
|
minifyCSS?: boolean;
|
|
@@ -20,9 +17,7 @@ export interface MarpOptions extends Options {
|
|
|
20
17
|
export declare class Marp extends Marpit {
|
|
21
18
|
readonly options: Required<MarpOptions>;
|
|
22
19
|
private _highlightjs;
|
|
23
|
-
static readonly html:
|
|
24
|
-
br: never[];
|
|
25
|
-
};
|
|
20
|
+
static readonly html: HTMLAllowList;
|
|
26
21
|
constructor(opts?: MarpOptions);
|
|
27
22
|
protected applyMarkdownItPlugins(md: any): void;
|
|
28
23
|
get highlightjs(): HLJSApi;
|
package/types/src/size/size.d.ts
CHANGED