@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marp-team/marp-core",
3
- "version": "3.9.0",
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": "^12.20 || ^14.13.1 || >=16"
37
+ "node": ">=18"
38
38
  },
39
39
  "scripts": {
40
- "build": "yarn -s clean && rollup -c",
41
- "check:audit": "yarn audit",
42
- "check:format": "yarn -s format -c",
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": "yarn -s format --write",
47
- "lint:js": "eslint --ext .js,.mjs,.ts --report-unused-disable-directives --cache .",
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
- "@rollup/plugin-alias": "^5.0.1",
69
- "@rollup/plugin-commonjs": "^25.0.5",
70
- "@rollup/plugin-json": "^6.0.1",
71
- "@rollup/plugin-node-resolve": "^15.2.3",
72
- "@rollup/plugin-replace": "^5.0.3",
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": "^11.1.5",
75
- "@tsconfig/node12": "^12.1.0",
76
- "@twemoji/api": "^14.1.2",
77
- "@types/jest": "^29.5.5",
78
- "@typescript-eslint/eslint-plugin": "^6.7.5",
79
- "@typescript-eslint/parser": "^6.7.5",
80
- "autoprefixer": "^10.4.16",
81
- "cheerio": "^1.0.0-rc.12",
82
- "cssnano": "^6.0.1",
83
- "emoji-regex": "^10.2.1",
84
- "eslint": "^8.51.0",
85
- "eslint-config-prettier": "^9.0.0",
86
- "eslint-plugin-import": "^2.28.1",
87
- "eslint-plugin-jest": "^27.4.2",
88
- "github-markdown-css": "^5.3.0",
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": "^13.0.2",
94
- "markdown-it-emoji": "^2.0.2",
95
+ "markdown-it": "^14.1.0",
96
+ "markdown-it-emoji": "^3.0.0",
95
97
  "mkdirp": "^3.0.1",
96
- "nodemon": "^3.0.1",
97
- "npm-run-all": "^4.1.5",
98
- "postcss-minify-params": "^6.0.0",
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.0.3",
103
- "rimraf": "^5.0.5",
104
- "rollup": "^4.1.1",
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.69.3",
108
- "sass-extended-importer": "^1.0.1",
107
+ "sass": "^1.83.0",
109
108
  "self-closing-tags": "^1.0.1",
110
- "stylelint": "^15.10.3",
111
- "stylelint-config-prettier": "^9.0.5",
112
- "stylelint-config-standard-scss": "^11.0.0",
113
- "ts-jest": "29.1.1",
114
- "tslib": "^2.6.2",
115
- "typescript": "^5.2.2"
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": "^2.6.1",
117
+ "@marp-team/marpit": "^3.1.2",
119
118
  "@marp-team/marpit-svg-polyfill": "^2.1.0",
120
- "highlight.js": "11.8.0",
121
- "katex": "^0.16.9",
119
+ "highlight.js": "^11.11.0",
120
+ "katex": "^0.16.18",
122
121
  "mathjax-full": "^3.2.2",
123
- "postcss": "^8.4.31",
124
- "postcss-selector-parser": "^6.0.13",
125
- "xss": "^1.0.14"
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 = {}> = new (...args: any[]) => 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> | undefined;
4
- style?: string | undefined;
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 | undefined): void;
35
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
36
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
37
- removeEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void;
38
- removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
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 | undefined): boolean;
63
- closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2] | null;
64
- closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3] | null;
65
- closest<K_4 extends keyof MathMLElementTagNameMap>(selector: K_4): MathMLElementTagNameMap[K_4] | null;
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<K_5 extends keyof HTMLElementTagNameMap>(qualifiedName: K_5): HTMLCollectionOf<HTMLElementTagNameMap[K_5]>;
77
- getElementsByTagName<K_6 extends keyof SVGElementTagNameMap>(qualifiedName: K_6): HTMLCollectionOf<SVGElementTagNameMap[K_6]>;
78
- getElementsByTagName<K_7 extends keyof MathMLElementTagNameMap>(qualifiedName: K_7): HTMLCollectionOf<MathMLElementTagNameMap[K_7]>;
79
- getElementsByTagName<K_8 extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K_8): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K_8]>;
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, text: string): void;
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 | undefined): Promise<void>;
98
- requestPointerLock(): void;
99
- scroll(options?: ScrollToOptions | undefined): void;
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 | undefined): void;
106
+ scrollBy(options?: ScrollToOptions): void;
102
107
  scrollBy(x: number, y: number): void;
103
- scrollIntoView(arg?: boolean | ScrollIntoViewOptions | undefined): void;
104
- scrollTo(options?: ScrollToOptions | undefined): void;
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 | undefined): 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 | undefined): Node;
133
+ cloneNode(deep?: boolean): Node;
128
134
  compareDocumentPosition(other: Node): number;
129
135
  contains(other: Node | null): boolean;
130
- getRootNode(options?: GetRootNodeOptions | undefined): Node;
136
+ getRootNode(options?: GetRootNodeOptions): Node;
131
137
  hasChildNodes(): boolean;
132
- insertBefore<T_2 extends Node>(node: T_2, child: Node | null): T_2;
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<T_3 extends Node>(child: T_3): T_3;
140
- replaceChild<T_4 extends Node>(node: Node, child: T_4): T_4;
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 | undefined): Animation;
199
- getAnimations(options?: GetAnimationsOptions | undefined): Animation[];
200
- after(...nodes: (string | Node)[]): void;
201
- before(...nodes: (string | Node)[]): void;
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: (string | Node)[]): void;
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: (string | Node)[]): void;
212
- prepend(...nodes: (string | Node)[]): void;
213
- querySelector<K_9 extends keyof HTMLElementTagNameMap>(selectors: K_9): HTMLElementTagNameMap[K_9] | null;
214
- querySelector<K_10 extends keyof SVGElementTagNameMap>(selectors: K_10): SVGElementTagNameMap[K_10] | null;
215
- querySelector<K_11 extends keyof MathMLElementTagNameMap>(selectors: K_11): MathMLElementTagNameMap[K_11] | null;
216
- querySelector<K_12 extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K_12): HTMLElementDeprecatedTagNameMap[K_12] | null;
217
- querySelector<E_1 extends Element = Element>(selectors: string): E_1 | null;
218
- querySelectorAll<K_13 extends keyof HTMLElementTagNameMap>(selectors: K_13): NodeListOf<HTMLElementTagNameMap[K_13]>;
219
- querySelectorAll<K_14 extends keyof SVGElementTagNameMap>(selectors: K_14): NodeListOf<SVGElementTagNameMap[K_14]>;
220
- querySelectorAll<K_15 extends keyof MathMLElementTagNameMap>(selectors: K_15): NodeListOf<MathMLElementTagNameMap[K_15]>;
221
- querySelectorAll<K_16 extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K_16): NodeListOf<HTMLElementDeprecatedTagNameMap[K_16]>;
222
- querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>;
223
- replaceChildren(...nodes: (string | Node)[]): void;
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<EventTarget>) => any) | null;
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 | undefined;
341
+ nonce?: string;
329
342
  tabIndex: number;
330
343
  blur(): void;
331
- focus(options?: FocusOptions | undefined): void;
344
+ focus(options?: FocusOptions): void;
332
345
  };
333
346
  readonly observedAttributes: string[];
334
347
  } & T;
@@ -1,2 +1 @@
1
- /// <reference types="highlight.js" />
2
1
  export declare const generateHighlightJSInstance: () => import("highlight.js").HLJSApi;
@@ -0,0 +1,6 @@
1
+ export type HTMLAllowList = {
2
+ [tag: string]: string[] | {
3
+ [attr: string]: boolean | ((value: string) => string);
4
+ };
5
+ };
6
+ export declare const defaultHTMLAllowList: HTMLAllowList;
@@ -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;
@@ -1,4 +1,3 @@
1
- /// <reference types="@marp-team/marpit" />
2
1
  export declare const markdown: Marpit.Plugin<[], {
3
2
  marpit: Marpit.Marpit;
4
3
  }>;
@@ -1,2 +0,0 @@
1
- declare const _default: () => never[];
2
- export default _default;
@@ -1,3 +0,0 @@
1
- import postcssMinifyParams from 'postcss-minify-params';
2
- declare const _default: (typeof postcssMinifyParams)[];
3
- export default _default;