@marp-team/marp-core 3.5.0 → 3.7.0

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.5.0",
3
+ "version": "3.7.0",
4
4
  "description": "The core of Marp tools",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -65,64 +65,64 @@
65
65
  "exec": "./node_modules/.bin/marp"
66
66
  },
67
67
  "devDependencies": {
68
- "@marp-team/marp-cli": "^2.3.0",
69
- "@rollup/plugin-alias": "^4.0.3",
70
- "@rollup/plugin-commonjs": "^24.0.1",
68
+ "@marp-team/marp-cli": "^2.5.0",
69
+ "@rollup/plugin-alias": "^5.0.0",
70
+ "@rollup/plugin-commonjs": "^25.0.0",
71
71
  "@rollup/plugin-json": "^6.0.0",
72
- "@rollup/plugin-node-resolve": "^15.0.1",
72
+ "@rollup/plugin-node-resolve": "^15.1.0",
73
73
  "@rollup/plugin-replace": "^5.0.2",
74
- "@rollup/plugin-terser": "^0.4.0",
75
- "@rollup/plugin-typescript": "^11.0.0",
74
+ "@rollup/plugin-terser": "^0.4.3",
75
+ "@rollup/plugin-typescript": "^11.1.1",
76
76
  "@tsconfig/node12": "^1.0.11",
77
- "@types/jest": "^29.4.0",
78
- "@typescript-eslint/eslint-plugin": "^5.52.0",
79
- "@typescript-eslint/parser": "^5.52.0",
80
- "autoprefixer": "^10.4.13",
77
+ "@twemoji/api": "^14.1.2",
78
+ "@types/jest": "^29.5.2",
79
+ "@typescript-eslint/eslint-plugin": "^5.59.9",
80
+ "@typescript-eslint/parser": "^5.59.9",
81
+ "autoprefixer": "^10.4.14",
81
82
  "cheerio": "^1.0.0-rc.12",
82
- "cssnano": "^5.1.15",
83
+ "cssnano": "^6.0.1",
83
84
  "emoji-regex": "^10.2.1",
84
- "eslint": "^8.34.0",
85
- "eslint-config-prettier": "^8.6.0",
85
+ "eslint": "^8.42.0",
86
+ "eslint-config-prettier": "^8.8.0",
86
87
  "eslint-plugin-import": "^2.27.5",
87
88
  "eslint-plugin-jest": "^27.2.1",
88
89
  "github-markdown-css": "^5.2.0",
89
- "jest": "^29.4.3",
90
- "jest-environment-jsdom": "^29.4.3",
91
- "jest-junit": "^15.0.0",
90
+ "jest": "^29.5.0",
91
+ "jest-environment-jsdom": "^29.5.0",
92
+ "jest-junit": "^16.0.0",
92
93
  "jest-plugin-context": "^2.9.0",
93
94
  "markdown-it": "^13.0.1",
94
95
  "markdown-it-emoji": "^2.0.2",
95
- "mkdirp": "^2.1.3",
96
- "nodemon": "^2.0.20",
96
+ "mkdirp": "^3.0.1",
97
+ "nodemon": "^2.0.22",
97
98
  "npm-run-all": "^4.1.5",
98
- "postcss-minify-params": "^5.1.4",
99
- "postcss-minify-selectors": "^5.2.1",
100
- "postcss-normalize-whitespace": "^5.1.1",
99
+ "postcss-minify-params": "^6.0.0",
100
+ "postcss-minify-selectors": "^6.0.0",
101
+ "postcss-normalize-whitespace": "^6.0.0",
101
102
  "postcss-url": "^10.1.3",
102
- "prettier": "^2.8.4",
103
- "rimraf": "^4.1.2",
104
- "rollup": "^3.17.0",
103
+ "prettier": "^2.8.8",
104
+ "rimraf": "^5.0.1",
105
+ "rollup": "^3.24.0",
105
106
  "rollup-plugin-postcss": "^4.0.2",
106
107
  "rollup-plugin-string": "^3.0.0",
107
- "sass": "^1.58.3",
108
+ "sass": "^1.63.3",
108
109
  "sass-extended-importer": "^0.4.2",
109
110
  "self-closing-tags": "^1.0.1",
110
- "stylelint": "^15.1.0",
111
+ "stylelint": "^15.7.0",
111
112
  "stylelint-config-prettier": "^9.0.5",
112
- "stylelint-config-standard-scss": "^7.0.1",
113
- "ts-jest": "29.0.5",
114
- "tslib": "^2.5.0",
115
- "twemoji": "^14.0.2",
116
- "typescript": "^4.9.5"
113
+ "stylelint-config-standard-scss": "^9.0.0",
114
+ "ts-jest": "29.1.0",
115
+ "tslib": "^2.5.3",
116
+ "typescript": "^5.1.3"
117
117
  },
118
118
  "dependencies": {
119
- "@marp-team/marpit": "^2.4.2",
119
+ "@marp-team/marpit": "^2.5.0",
120
120
  "@marp-team/marpit-svg-polyfill": "^2.1.0",
121
- "highlight.js": "^11.7.0",
122
- "katex": "^0.16.4",
121
+ "highlight.js": "^11.8.0",
122
+ "katex": "^0.16.7",
123
123
  "mathjax-full": "^3.2.2",
124
124
  "postcss": "^8.4.21",
125
- "postcss-selector-parser": "^6.0.11",
125
+ "postcss-selector-parser": "^6.0.13",
126
126
  "xss": "^1.0.14"
127
127
  },
128
128
  "resolutions": {
@@ -55,9 +55,12 @@ export declare const createMarpCustomElement: <T extends Constructor<HTMLElement
55
55
  slot: string;
56
56
  readonly tagName: string;
57
57
  attachShadow(init: ShadowRootInit): ShadowRoot;
58
+ checkVisibility(options?: CheckVisibilityOptions | undefined): boolean;
58
59
  closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2] | null;
59
60
  closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3] | null;
61
+ closest<K_4 extends keyof MathMLElementTagNameMap>(selector: K_4): MathMLElementTagNameMap[K_4] | null;
60
62
  closest<E extends Element = Element>(selectors: string): E | null;
63
+ computedStyleMap(): StylePropertyMapReadOnly;
61
64
  getAttribute(qualifiedName: string): string | null;
62
65
  getAttributeNS(namespace: string | null, localName: string): string | null;
63
66
  getAttributeNames(): string[];
@@ -66,11 +69,14 @@ export declare const createMarpCustomElement: <T extends Constructor<HTMLElement
66
69
  getBoundingClientRect(): DOMRect;
67
70
  getClientRects(): DOMRectList;
68
71
  getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
69
- getElementsByTagName<K_4 extends keyof HTMLElementTagNameMap>(qualifiedName: K_4): HTMLCollectionOf<HTMLElementTagNameMap[K_4]>;
70
- getElementsByTagName<K_5 extends keyof SVGElementTagNameMap>(qualifiedName: K_5): HTMLCollectionOf<SVGElementTagNameMap[K_5]>;
72
+ getElementsByTagName<K_5 extends keyof HTMLElementTagNameMap>(qualifiedName: K_5): HTMLCollectionOf<HTMLElementTagNameMap[K_5]>;
73
+ getElementsByTagName<K_6 extends keyof SVGElementTagNameMap>(qualifiedName: K_6): HTMLCollectionOf<SVGElementTagNameMap[K_6]>;
74
+ getElementsByTagName<K_7 extends keyof MathMLElementTagNameMap>(qualifiedName: K_7): HTMLCollectionOf<MathMLElementTagNameMap[K_7]>;
75
+ getElementsByTagName<K_8 extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K_8): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K_8]>;
71
76
  getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
72
77
  getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
73
78
  getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
79
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>;
74
80
  getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
75
81
  hasAttribute(qualifiedName: string): boolean;
76
82
  hasAttributeNS(namespace: string | null, localName: string): boolean;
@@ -128,24 +134,24 @@ export declare const createMarpCustomElement: <T extends Constructor<HTMLElement
128
134
  normalize(): void;
129
135
  removeChild<T_3 extends Node>(child: T_3): T_3;
130
136
  replaceChild<T_4 extends Node>(node: Node, child: T_4): T_4;
131
- readonly ATTRIBUTE_NODE: number;
132
- readonly CDATA_SECTION_NODE: number;
133
- readonly COMMENT_NODE: number;
134
- readonly DOCUMENT_FRAGMENT_NODE: number;
135
- readonly DOCUMENT_NODE: number;
136
- readonly DOCUMENT_POSITION_CONTAINED_BY: number;
137
- readonly DOCUMENT_POSITION_CONTAINS: number;
138
- readonly DOCUMENT_POSITION_DISCONNECTED: number;
139
- readonly DOCUMENT_POSITION_FOLLOWING: number;
140
- readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
141
- readonly DOCUMENT_POSITION_PRECEDING: number;
142
- readonly DOCUMENT_TYPE_NODE: number;
143
- readonly ELEMENT_NODE: number;
144
- readonly ENTITY_NODE: number;
145
- readonly ENTITY_REFERENCE_NODE: number;
146
- readonly NOTATION_NODE: number;
147
- readonly PROCESSING_INSTRUCTION_NODE: number;
148
- readonly TEXT_NODE: number;
137
+ readonly ELEMENT_NODE: 1;
138
+ readonly ATTRIBUTE_NODE: 2;
139
+ readonly TEXT_NODE: 3;
140
+ readonly CDATA_SECTION_NODE: 4;
141
+ readonly ENTITY_REFERENCE_NODE: 5;
142
+ readonly ENTITY_NODE: 6;
143
+ readonly PROCESSING_INSTRUCTION_NODE: 7;
144
+ readonly COMMENT_NODE: 8;
145
+ readonly DOCUMENT_NODE: 9;
146
+ readonly DOCUMENT_TYPE_NODE: 10;
147
+ readonly DOCUMENT_FRAGMENT_NODE: 11;
148
+ readonly NOTATION_NODE: 12;
149
+ readonly DOCUMENT_POSITION_DISCONNECTED: 1;
150
+ readonly DOCUMENT_POSITION_PRECEDING: 2;
151
+ readonly DOCUMENT_POSITION_FOLLOWING: 4;
152
+ readonly DOCUMENT_POSITION_CONTAINS: 8;
153
+ readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
154
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
149
155
  dispatchEvent(event: Event): boolean;
150
156
  ariaAtomic: string | null;
151
157
  ariaAutoComplete: string | null;
@@ -153,7 +159,6 @@ export declare const createMarpCustomElement: <T extends Constructor<HTMLElement
153
159
  ariaChecked: string | null;
154
160
  ariaColCount: string | null;
155
161
  ariaColIndex: string | null;
156
- ariaColIndexText: string | null;
157
162
  ariaColSpan: string | null;
158
163
  ariaCurrent: string | null;
159
164
  ariaDisabled: string | null;
@@ -177,7 +182,6 @@ export declare const createMarpCustomElement: <T extends Constructor<HTMLElement
177
182
  ariaRoleDescription: string | null;
178
183
  ariaRowCount: string | null;
179
184
  ariaRowIndex: string | null;
180
- ariaRowIndexText: string | null;
181
185
  ariaRowSpan: string | null;
182
186
  ariaSelected: string | null;
183
187
  ariaSetSize: string | null;
@@ -202,17 +206,19 @@ export declare const createMarpCustomElement: <T extends Constructor<HTMLElement
202
206
  readonly lastElementChild: Element | null;
203
207
  append(...nodes: (string | Node)[]): void;
204
208
  prepend(...nodes: (string | Node)[]): void;
205
- querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6] | null;
206
- querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7] | null;
209
+ querySelector<K_9 extends keyof HTMLElementTagNameMap>(selectors: K_9): HTMLElementTagNameMap[K_9] | null;
210
+ querySelector<K_10 extends keyof SVGElementTagNameMap>(selectors: K_10): SVGElementTagNameMap[K_10] | null;
211
+ querySelector<K_11 extends keyof MathMLElementTagNameMap>(selectors: K_11): MathMLElementTagNameMap[K_11] | null;
212
+ querySelector<K_12 extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K_12): HTMLElementDeprecatedTagNameMap[K_12] | null;
207
213
  querySelector<E_1 extends Element = Element>(selectors: string): E_1 | null;
208
- querySelectorAll<K_8 extends keyof HTMLElementTagNameMap>(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>;
209
- querySelectorAll<K_9 extends keyof SVGElementTagNameMap>(selectors: K_9): NodeListOf<SVGElementTagNameMap[K_9]>;
214
+ querySelectorAll<K_13 extends keyof HTMLElementTagNameMap>(selectors: K_13): NodeListOf<HTMLElementTagNameMap[K_13]>;
215
+ querySelectorAll<K_14 extends keyof SVGElementTagNameMap>(selectors: K_14): NodeListOf<SVGElementTagNameMap[K_14]>;
216
+ querySelectorAll<K_15 extends keyof MathMLElementTagNameMap>(selectors: K_15): NodeListOf<MathMLElementTagNameMap[K_15]>;
217
+ querySelectorAll<K_16 extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K_16): NodeListOf<HTMLElementDeprecatedTagNameMap[K_16]>;
210
218
  querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>;
211
219
  replaceChildren(...nodes: (string | Node)[]): void;
212
220
  readonly assignedSlot: HTMLSlotElement | null;
213
- oncopy: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
214
- oncut: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
215
- onpaste: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
221
+ readonly attributeStyleMap: StylePropertyMap;
216
222
  readonly style: CSSStyleDeclaration;
217
223
  contentEditable: string;
218
224
  enterKeyHint: string;
@@ -233,7 +239,9 @@ export declare const createMarpCustomElement: <T extends Constructor<HTMLElement
233
239
  onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
234
240
  onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
235
241
  oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
242
+ oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
236
243
  oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
244
+ oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
237
245
  ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
238
246
  ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
239
247
  ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
@@ -266,6 +274,7 @@ export declare const createMarpCustomElement: <T extends Constructor<HTMLElement
266
274
  onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
267
275
  onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
268
276
  onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
277
+ onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
269
278
  onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
270
279
  onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
271
280
  onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
@@ -2,6 +2,7 @@ import { Marpit, Options, ThemeSetPackOptions } from '@marp-team/marpit';
2
2
  import * as emojiPlugin from './emoji/emoji';
3
3
  import * as mathPlugin from './math/math';
4
4
  import * as scriptPlugin from './script/script';
5
+ import * as slugPlugin from './slug/slug';
5
6
  export interface MarpOptions extends Options {
6
7
  emoji?: emojiPlugin.EmojiOptions;
7
8
  html?: boolean | {
@@ -13,6 +14,7 @@ export interface MarpOptions extends Options {
13
14
  math?: mathPlugin.MathOptions;
14
15
  minifyCSS?: boolean;
15
16
  script?: boolean | scriptPlugin.ScriptOptions;
17
+ slug?: slugPlugin.SlugOptions;
16
18
  }
17
19
  export declare class Marp extends Marpit {
18
20
  readonly options: Required<MarpOptions>;
@@ -0,0 +1,12 @@
1
+ export type Slugifier = (text: string) => string;
2
+ export type PostSlugify = (slug: string, index: number) => string;
3
+ export type SlugOptions = boolean | Slugifier | SlugOptionsObject;
4
+ type SlugOptionsObject = {
5
+ slugifier?: Slugifier;
6
+ postSlugify?: PostSlugify;
7
+ };
8
+ export declare const markdown: Marpit.Plugin<[], {
9
+ marpit: Marpit.Marpit;
10
+ }>;
11
+ export declare const githubSlugify: Slugifier;
12
+ export {};