@novaprose/core 0.6.0 → 0.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/README.md +7 -4
- package/dist/{advlist-K2U3VPH2.js → advlist-5FNKPLUX.js} +10 -19
- package/dist/advlist-5FNKPLUX.js.map +1 -0
- package/dist/{autolink-XWDTLY37.js → autolink-45LTODWB.js} +6 -3
- package/dist/{autolink-XWDTLY37.js.map → autolink-45LTODWB.js.map} +1 -1
- package/dist/{autosave-MWNRUNU3.js → autosave-GMWJ5BPE.js} +6 -10
- package/dist/autosave-GMWJ5BPE.js.map +1 -0
- package/dist/{charmap-ADLYOIB3.js → charmap-2GC7LF7G.js} +6 -11
- package/dist/charmap-2GC7LF7G.js.map +1 -0
- package/dist/{chunk-NPKAIW34.js → chunk-5AW2HHG6.js} +6 -1
- package/dist/chunk-5AW2HHG6.js.map +1 -0
- package/dist/{chunk-46RIM5KP.js → chunk-DWZLSZDG.js} +689 -974
- package/dist/chunk-DWZLSZDG.js.map +1 -0
- package/dist/{chunk-7ON7PR5R.js → chunk-FCMZ7TUQ.js} +213 -20
- package/dist/chunk-FCMZ7TUQ.js.map +1 -0
- package/dist/{chunk-HZRIBOPW.js → chunk-JPJVTB45.js} +38 -2
- package/dist/chunk-JPJVTB45.js.map +1 -0
- package/dist/{chunk-435CRWKA.js → chunk-KPE3QRPB.js} +163 -422
- package/dist/chunk-KPE3QRPB.js.map +1 -0
- package/dist/chunk-KWXFL4WS.js +174 -0
- package/dist/chunk-KWXFL4WS.js.map +1 -0
- package/dist/chunk-ND2CWNVG.js +51 -0
- package/dist/chunk-ND2CWNVG.js.map +1 -0
- package/dist/chunk-PVFKXRID.js +27 -0
- package/dist/chunk-PVFKXRID.js.map +1 -0
- package/dist/chunk-R2UMUCVI.js +351 -0
- package/dist/chunk-R2UMUCVI.js.map +1 -0
- package/dist/{chunk-GHEFKKRC.js → chunk-T3GY6IVK.js} +41 -24
- package/dist/chunk-T3GY6IVK.js.map +1 -0
- package/dist/{comments-panel-FYJE3U64.js → comments-panel-HXMWSRAW.js} +5 -3
- package/dist/comments-panel-HXMWSRAW.js.map +1 -0
- package/dist/{directionality-XOHJFSL6.js → directionality-5JLWQGP2.js} +12 -10
- package/dist/directionality-5JLWQGP2.js.map +1 -0
- package/dist/editor-CXkltf1R.d.ts +1886 -0
- package/dist/editor-CgSBFTke.d.cts +1886 -0
- package/dist/{emoticons-TP4N4ZGY.js → emoticons-ZD6ZRIWG.js} +6 -11
- package/dist/emoticons-ZD6ZRIWG.js.map +1 -0
- package/dist/form-dialog-QH6KAERD.js +180 -0
- package/dist/form-dialog-QH6KAERD.js.map +1 -0
- package/dist/html-rules-api-D3fKQi-R.d.cts +40 -0
- package/dist/html-rules-api-D3fKQi-R.d.ts +40 -0
- package/dist/html-rules.cjs +480 -0
- package/dist/html-rules.cjs.map +1 -0
- package/dist/html-rules.d.cts +87 -0
- package/dist/html-rules.d.ts +87 -0
- package/dist/html-rules.js +413 -0
- package/dist/html-rules.js.map +1 -0
- package/dist/i18n/de.cjs +324 -0
- package/dist/i18n/de.cjs.map +1 -0
- package/dist/i18n/de.d.cts +9 -0
- package/dist/i18n/de.d.ts +9 -0
- package/dist/i18n/de.js +303 -0
- package/dist/i18n/de.js.map +1 -0
- package/dist/i18n/es.cjs +324 -0
- package/dist/i18n/es.cjs.map +1 -0
- package/dist/i18n/es.d.cts +9 -0
- package/dist/i18n/es.d.ts +9 -0
- package/dist/i18n/es.js +303 -0
- package/dist/i18n/es.js.map +1 -0
- package/dist/i18n/fr.cjs +324 -0
- package/dist/i18n/fr.cjs.map +1 -0
- package/dist/i18n/fr.d.cts +9 -0
- package/dist/i18n/fr.d.ts +9 -0
- package/dist/i18n/fr.js +303 -0
- package/dist/i18n/fr.js.map +1 -0
- package/dist/i18n/it.cjs +324 -0
- package/dist/i18n/it.cjs.map +1 -0
- package/dist/i18n/it.d.cts +9 -0
- package/dist/i18n/it.d.ts +9 -0
- package/dist/i18n/it.js +303 -0
- package/dist/i18n/it.js.map +1 -0
- package/dist/i18n/pt-BR.cjs +324 -0
- package/dist/i18n/pt-BR.cjs.map +1 -0
- package/dist/i18n/pt-BR.d.cts +9 -0
- package/dist/i18n/pt-BR.d.ts +9 -0
- package/dist/i18n/pt-BR.js +303 -0
- package/dist/i18n/pt-BR.js.map +1 -0
- package/dist/i18n/ru.cjs +324 -0
- package/dist/i18n/ru.cjs.map +1 -0
- package/dist/i18n/ru.d.cts +10 -0
- package/dist/i18n/ru.d.ts +10 -0
- package/dist/i18n/ru.js +303 -0
- package/dist/i18n/ru.js.map +1 -0
- package/dist/index-C603bU6r.d.cts +216 -0
- package/dist/index-C603bU6r.d.ts +216 -0
- package/dist/index.cjs +2159 -1178
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +46 -1788
- package/dist/index.d.ts +46 -1788
- package/dist/index.js +96 -152
- package/dist/index.js.map +1 -1
- package/dist/{insertdatetime-T4SEMQWP.js → insertdatetime-CRO7TJAQ.js} +9 -15
- package/dist/insertdatetime-CRO7TJAQ.js.map +1 -0
- package/dist/markdown.cjs +273 -0
- package/dist/markdown.cjs.map +1 -0
- package/dist/markdown.d.cts +23 -0
- package/dist/markdown.d.ts +23 -0
- package/dist/markdown.js +241 -0
- package/dist/markdown.js.map +1 -0
- package/dist/{nonbreaking-HG5HV6AL.js → nonbreaking-66LFZV2W.js} +7 -6
- package/dist/nonbreaking-66LFZV2W.js.map +1 -0
- package/dist/paste-office-F3QW4WWO.js +440 -0
- package/dist/paste-office-F3QW4WWO.js.map +1 -0
- package/dist/{quickbars-4NU4SIPL.js → quickbars-7E2QRS7J.js} +12 -8
- package/dist/quickbars-7E2QRS7J.js.map +1 -0
- package/dist/{revisionhistory-3YQPLPLM.js → revisionhistory-DXE7KU4R.js} +17 -31
- package/dist/revisionhistory-DXE7KU4R.js.map +1 -0
- package/dist/table-SSNABG5W.js +301 -0
- package/dist/table-SSNABG5W.js.map +1 -0
- package/dist/{visualblocks-RTAYJOGR.js → visualblocks-6DLBXYOA.js} +7 -6
- package/dist/visualblocks-6DLBXYOA.js.map +1 -0
- package/package.json +45 -5
- package/src/style.css +187 -31
- package/dist/advlist-K2U3VPH2.js.map +0 -1
- package/dist/autosave-MWNRUNU3.js.map +0 -1
- package/dist/charmap-ADLYOIB3.js.map +0 -1
- package/dist/chunk-435CRWKA.js.map +0 -1
- package/dist/chunk-46RIM5KP.js.map +0 -1
- package/dist/chunk-6RJENZXT.js +0 -104
- package/dist/chunk-6RJENZXT.js.map +0 -1
- package/dist/chunk-7ON7PR5R.js.map +0 -1
- package/dist/chunk-GHEFKKRC.js.map +0 -1
- package/dist/chunk-HZRIBOPW.js.map +0 -1
- package/dist/chunk-NPKAIW34.js.map +0 -1
- package/dist/comments-panel-FYJE3U64.js.map +0 -1
- package/dist/directionality-XOHJFSL6.js.map +0 -1
- package/dist/emoticons-TP4N4ZGY.js.map +0 -1
- package/dist/insertdatetime-T4SEMQWP.js.map +0 -1
- package/dist/nonbreaking-HG5HV6AL.js.map +0 -1
- package/dist/quickbars-4NU4SIPL.js.map +0 -1
- package/dist/revisionhistory-3YQPLPLM.js.map +0 -1
- package/dist/visualblocks-RTAYJOGR.js.map +0 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Schema, DOMOutputSpec, NodeSpec, MarkSpec } from 'prosemirror-model';
|
|
2
|
+
import { H as HtmlRulesInstance, a as HtmlRulesOptions, S as SchemaSpecs, b as HtmlRulesModule } from './html-rules-api-D3fKQi-R.cjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Правила HTML-элементов и атрибутов: validElements (с атрибутами), extendedValidElements и
|
|
6
|
+
* customElements. Синтаксис — как у одноимённых опций TinyMCE (по их публичной документации):
|
|
7
|
+
* `a[href|title],div[class|data-*],@[id],my-widget`.
|
|
8
|
+
*
|
|
9
|
+
* Два направления:
|
|
10
|
+
* 1. Ограничение. Список в [...] — полный список атрибутов элемента: `a[href|title]` снимает
|
|
11
|
+
* target и class. Значения: `name=v` — по умолчанию, `name:v` — всегда, `name<a?b` — только из
|
|
12
|
+
* списка, `!name` — обязателен (без него элемент не распознаётся). `@[...]` и `*[...]` — для всех.
|
|
13
|
+
* 2. Расширение. Атрибуты, которых встроенная схема не знает (`h2[id]`, `a[rel|data-*]`), хранятся в
|
|
14
|
+
* атрибуте узла `htmlAttrs`. Новые элементы (`div`, `section`, `abbr`, `<i class>` для иконок,
|
|
15
|
+
* свои `my-widget`) — универсальные узлы html_block / html_textblock / html_inline_atom и марка
|
|
16
|
+
* html_inline с атрибутом `tag`.
|
|
17
|
+
*
|
|
18
|
+
* Безопасность правилами не отключается: script, iframe, формы и т. п. не разрешаются, обработчики
|
|
19
|
+
* on*, srcdoc и formaction не сохраняются, адреса и CSS проверяются при разборе и при выводе
|
|
20
|
+
* (документ может прийти через JSON в обход разбора).
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/** Элементы встроенной схемы (их атрибуты можно ограничить и расширить). */
|
|
24
|
+
declare const BASE_TAGS: Set<string>;
|
|
25
|
+
type Attrs = Record<string, unknown>;
|
|
26
|
+
declare class HtmlRules implements HtmlRulesInstance {
|
|
27
|
+
/** Список атрибутов элемента (null — список не задан, атрибуты встроенные). */
|
|
28
|
+
private readonly elements;
|
|
29
|
+
private readonly globals;
|
|
30
|
+
/** Универсальные элементы: тег во входном HTML → тег на выходе (синонимы `div/section`). */
|
|
31
|
+
readonly blockTags: Map<string, string>;
|
|
32
|
+
readonly inlineTags: Map<string, string>;
|
|
33
|
+
constructor(options: HtmlRulesOptions);
|
|
34
|
+
apply(specs: SchemaSpecs, ref: {
|
|
35
|
+
schema?: Schema;
|
|
36
|
+
}): SchemaSpecs;
|
|
37
|
+
/** Есть ли что применять (иначе редактор обходится без этого модуля). */
|
|
38
|
+
get active(): boolean;
|
|
39
|
+
/** Правила касаются элемента: список атрибутов, значения или общие атрибуты. */
|
|
40
|
+
touches(tag: string): boolean;
|
|
41
|
+
private rulesFor;
|
|
42
|
+
/** Разрешает ли правило атрибут (без учёта встроенных атрибутов элемента). */
|
|
43
|
+
allows(tag: string, name: string): boolean;
|
|
44
|
+
/** Может ли у встроенного элемента быть атрибут сверх встроенных (кроме class и style). */
|
|
45
|
+
extends(tag: string): boolean;
|
|
46
|
+
/** Правила разрешают class у какого-либо встроенного элемента (тогда классы сохраняются). */
|
|
47
|
+
get classOnBuiltIn(): boolean;
|
|
48
|
+
/** Все обязательные атрибуты на месте. */
|
|
49
|
+
hasRequired(tag: string, dom: HTMLElement): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Разрешённые правилом атрибуты элемента (значения проверены) или null. `skip` — атрибуты, которые
|
|
52
|
+
* хранит не элемент: у встроенных class и style (validClasses, validStyles, марки оформления).
|
|
53
|
+
* Собственный style новых элементов парсер заранее переносит в OWN_STYLE (см. parser.ts).
|
|
54
|
+
*/
|
|
55
|
+
readAttrs(tag: string, dom: HTMLElement, skip: readonly string[]): Record<string, string> | null;
|
|
56
|
+
/**
|
|
57
|
+
* Атрибуты для вывода: встроенные + сохранённые (`extras`, могли прийти из JSON чем угодно),
|
|
58
|
+
* затем список элемента и правила значений.
|
|
59
|
+
*/
|
|
60
|
+
outputAttrs(tag: string, builtIn: Attrs, extras: unknown): Attrs;
|
|
61
|
+
/** Применить правила к выводу toDOM: атрибуты верхнего элемента спеки. */
|
|
62
|
+
decorate(spec: DOMOutputSpec, extras: unknown): DOMOutputSpec;
|
|
63
|
+
}
|
|
64
|
+
/** Правила из опций или null, если применять нечего. */
|
|
65
|
+
declare function createHtmlRules(options: HtmlRulesOptions): HtmlRules | null;
|
|
66
|
+
interface SchemaRef {
|
|
67
|
+
schema?: Schema;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Применить правила к спекам схемы: встроенные узлы и марки получают правила атрибутов, новые
|
|
71
|
+
* элементы — свои узлы и марки (в конце: встроенные правила разбора остаются в приоритете).
|
|
72
|
+
* После создания схемы её нужно записать в `ref.schema`.
|
|
73
|
+
*/
|
|
74
|
+
declare function applyHtmlRules(nodes: Record<string, NodeSpec>, marks: Record<string, MarkSpec>, rules: HtmlRules, ref: SchemaRef): {
|
|
75
|
+
nodes: Record<string, NodeSpec>;
|
|
76
|
+
marks: Record<string, MarkSpec>;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Модуль для регистрации в ядре:
|
|
80
|
+
*
|
|
81
|
+
* import { registerHtmlRules } from '@novaprose/core';
|
|
82
|
+
* import { htmlRules } from '@novaprose/core/html-rules';
|
|
83
|
+
* registerHtmlRules(htmlRules);
|
|
84
|
+
*/
|
|
85
|
+
declare const htmlRules: HtmlRulesModule;
|
|
86
|
+
|
|
87
|
+
export { BASE_TAGS, HtmlRules, HtmlRulesOptions, applyHtmlRules, createHtmlRules, htmlRules };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Schema, DOMOutputSpec, NodeSpec, MarkSpec } from 'prosemirror-model';
|
|
2
|
+
import { H as HtmlRulesInstance, a as HtmlRulesOptions, S as SchemaSpecs, b as HtmlRulesModule } from './html-rules-api-D3fKQi-R.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Правила HTML-элементов и атрибутов: validElements (с атрибутами), extendedValidElements и
|
|
6
|
+
* customElements. Синтаксис — как у одноимённых опций TinyMCE (по их публичной документации):
|
|
7
|
+
* `a[href|title],div[class|data-*],@[id],my-widget`.
|
|
8
|
+
*
|
|
9
|
+
* Два направления:
|
|
10
|
+
* 1. Ограничение. Список в [...] — полный список атрибутов элемента: `a[href|title]` снимает
|
|
11
|
+
* target и class. Значения: `name=v` — по умолчанию, `name:v` — всегда, `name<a?b` — только из
|
|
12
|
+
* списка, `!name` — обязателен (без него элемент не распознаётся). `@[...]` и `*[...]` — для всех.
|
|
13
|
+
* 2. Расширение. Атрибуты, которых встроенная схема не знает (`h2[id]`, `a[rel|data-*]`), хранятся в
|
|
14
|
+
* атрибуте узла `htmlAttrs`. Новые элементы (`div`, `section`, `abbr`, `<i class>` для иконок,
|
|
15
|
+
* свои `my-widget`) — универсальные узлы html_block / html_textblock / html_inline_atom и марка
|
|
16
|
+
* html_inline с атрибутом `tag`.
|
|
17
|
+
*
|
|
18
|
+
* Безопасность правилами не отключается: script, iframe, формы и т. п. не разрешаются, обработчики
|
|
19
|
+
* on*, srcdoc и formaction не сохраняются, адреса и CSS проверяются при разборе и при выводе
|
|
20
|
+
* (документ может прийти через JSON в обход разбора).
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/** Элементы встроенной схемы (их атрибуты можно ограничить и расширить). */
|
|
24
|
+
declare const BASE_TAGS: Set<string>;
|
|
25
|
+
type Attrs = Record<string, unknown>;
|
|
26
|
+
declare class HtmlRules implements HtmlRulesInstance {
|
|
27
|
+
/** Список атрибутов элемента (null — список не задан, атрибуты встроенные). */
|
|
28
|
+
private readonly elements;
|
|
29
|
+
private readonly globals;
|
|
30
|
+
/** Универсальные элементы: тег во входном HTML → тег на выходе (синонимы `div/section`). */
|
|
31
|
+
readonly blockTags: Map<string, string>;
|
|
32
|
+
readonly inlineTags: Map<string, string>;
|
|
33
|
+
constructor(options: HtmlRulesOptions);
|
|
34
|
+
apply(specs: SchemaSpecs, ref: {
|
|
35
|
+
schema?: Schema;
|
|
36
|
+
}): SchemaSpecs;
|
|
37
|
+
/** Есть ли что применять (иначе редактор обходится без этого модуля). */
|
|
38
|
+
get active(): boolean;
|
|
39
|
+
/** Правила касаются элемента: список атрибутов, значения или общие атрибуты. */
|
|
40
|
+
touches(tag: string): boolean;
|
|
41
|
+
private rulesFor;
|
|
42
|
+
/** Разрешает ли правило атрибут (без учёта встроенных атрибутов элемента). */
|
|
43
|
+
allows(tag: string, name: string): boolean;
|
|
44
|
+
/** Может ли у встроенного элемента быть атрибут сверх встроенных (кроме class и style). */
|
|
45
|
+
extends(tag: string): boolean;
|
|
46
|
+
/** Правила разрешают class у какого-либо встроенного элемента (тогда классы сохраняются). */
|
|
47
|
+
get classOnBuiltIn(): boolean;
|
|
48
|
+
/** Все обязательные атрибуты на месте. */
|
|
49
|
+
hasRequired(tag: string, dom: HTMLElement): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Разрешённые правилом атрибуты элемента (значения проверены) или null. `skip` — атрибуты, которые
|
|
52
|
+
* хранит не элемент: у встроенных class и style (validClasses, validStyles, марки оформления).
|
|
53
|
+
* Собственный style новых элементов парсер заранее переносит в OWN_STYLE (см. parser.ts).
|
|
54
|
+
*/
|
|
55
|
+
readAttrs(tag: string, dom: HTMLElement, skip: readonly string[]): Record<string, string> | null;
|
|
56
|
+
/**
|
|
57
|
+
* Атрибуты для вывода: встроенные + сохранённые (`extras`, могли прийти из JSON чем угодно),
|
|
58
|
+
* затем список элемента и правила значений.
|
|
59
|
+
*/
|
|
60
|
+
outputAttrs(tag: string, builtIn: Attrs, extras: unknown): Attrs;
|
|
61
|
+
/** Применить правила к выводу toDOM: атрибуты верхнего элемента спеки. */
|
|
62
|
+
decorate(spec: DOMOutputSpec, extras: unknown): DOMOutputSpec;
|
|
63
|
+
}
|
|
64
|
+
/** Правила из опций или null, если применять нечего. */
|
|
65
|
+
declare function createHtmlRules(options: HtmlRulesOptions): HtmlRules | null;
|
|
66
|
+
interface SchemaRef {
|
|
67
|
+
schema?: Schema;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Применить правила к спекам схемы: встроенные узлы и марки получают правила атрибутов, новые
|
|
71
|
+
* элементы — свои узлы и марки (в конце: встроенные правила разбора остаются в приоритете).
|
|
72
|
+
* После создания схемы её нужно записать в `ref.schema`.
|
|
73
|
+
*/
|
|
74
|
+
declare function applyHtmlRules(nodes: Record<string, NodeSpec>, marks: Record<string, MarkSpec>, rules: HtmlRules, ref: SchemaRef): {
|
|
75
|
+
nodes: Record<string, NodeSpec>;
|
|
76
|
+
marks: Record<string, MarkSpec>;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Модуль для регистрации в ядре:
|
|
80
|
+
*
|
|
81
|
+
* import { registerHtmlRules } from '@novaprose/core';
|
|
82
|
+
* import { htmlRules } from '@novaprose/core/html-rules';
|
|
83
|
+
* registerHtmlRules(htmlRules);
|
|
84
|
+
*/
|
|
85
|
+
declare const htmlRules: HtmlRulesModule;
|
|
86
|
+
|
|
87
|
+
export { BASE_TAGS, HtmlRules, HtmlRulesOptions, applyHtmlRules, createHtmlRules, htmlRules };
|
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OWN_STYLE,
|
|
3
|
+
safeAttr
|
|
4
|
+
} from "./chunk-ND2CWNVG.js";
|
|
5
|
+
import "./chunk-PVFKXRID.js";
|
|
6
|
+
|
|
7
|
+
// src/html-rules.ts
|
|
8
|
+
var NEVER = new Set(
|
|
9
|
+
"script,style,iframe,frame,frameset,object,embed,applet,base,link,meta,title,head,html,body,template,slot,noscript,form,input,button,select,option,optgroup,textarea,fieldset,legend,datalist,output,progress,meter,svg,math,canvas,audio,video,source,track,picture,map,area,portal,dialog,param,xmp,plaintext,listing,noembed,noframes,image".split(",")
|
|
10
|
+
);
|
|
11
|
+
var NEVER_ATTR = /^(on|xmlns)|^(srcdoc|formaction|action|contenteditable|autofocus|is|slot|nonce)$/;
|
|
12
|
+
var ATTR_NAME = /^[a-z_:][a-z0-9_.:-]*$/;
|
|
13
|
+
var TAG_NAME = /^[a-z][a-z0-9._-]*$/;
|
|
14
|
+
var BASE_TAGS = new Set(
|
|
15
|
+
"p,h1,h2,h3,h4,h5,h6,blockquote,pre,hr,ul,ol,li,img,figure,figcaption,br,table,tr,td,th,strong,em,u,s,code,a,sub,sup".split(
|
|
16
|
+
","
|
|
17
|
+
)
|
|
18
|
+
);
|
|
19
|
+
var SPLIT = /* @__PURE__ */ new Set(["span", "i", "b", "del", "strike", "mark"]);
|
|
20
|
+
var INLINE = new Set(
|
|
21
|
+
"abbr,acronym,bdi,bdo,big,cite,data,dfn,ins,kbd,q,samp,small,time,tt,var,label,ruby,rt,rp,wbr".split(
|
|
22
|
+
","
|
|
23
|
+
)
|
|
24
|
+
);
|
|
25
|
+
var BLOCK = new Set(
|
|
26
|
+
"div,section,article,aside,header,footer,nav,main,address,details,summary,dl,dt,dd,center,hgroup,search".split(
|
|
27
|
+
","
|
|
28
|
+
)
|
|
29
|
+
);
|
|
30
|
+
var BLOCK_LEVEL = /* @__PURE__ */ new Set([
|
|
31
|
+
...BLOCK,
|
|
32
|
+
..."p,h1,h2,h3,h4,h5,h6,blockquote,pre,hr,ul,ol,li,table,figure".split(",")
|
|
33
|
+
]);
|
|
34
|
+
var ESSENTIAL = {
|
|
35
|
+
a: ["href"],
|
|
36
|
+
img: ["src"],
|
|
37
|
+
td: ["colspan", "rowspan"],
|
|
38
|
+
th: ["colspan", "rowspan"]
|
|
39
|
+
};
|
|
40
|
+
function splitTopLevel(text) {
|
|
41
|
+
const out = [];
|
|
42
|
+
let depth = 0;
|
|
43
|
+
let current = "";
|
|
44
|
+
for (const ch of text) {
|
|
45
|
+
if (ch === "[") depth++;
|
|
46
|
+
else if (ch === "]") depth = Math.max(0, depth - 1);
|
|
47
|
+
if (ch === "," && !depth) {
|
|
48
|
+
out.push(current);
|
|
49
|
+
current = "";
|
|
50
|
+
} else current += ch;
|
|
51
|
+
}
|
|
52
|
+
out.push(current);
|
|
53
|
+
return out.map((s) => s.trim()).filter(Boolean);
|
|
54
|
+
}
|
|
55
|
+
function parseAttr(raw) {
|
|
56
|
+
let text = raw.trim();
|
|
57
|
+
const required = text.startsWith("!");
|
|
58
|
+
if (required) text = text.slice(1);
|
|
59
|
+
const m = /^([^=:<]+)(?:([=:<])(.*))?$/s.exec(text);
|
|
60
|
+
if (!m) return null;
|
|
61
|
+
const name = m[1].trim().toLowerCase();
|
|
62
|
+
if (!name) return null;
|
|
63
|
+
const rule = { name, required };
|
|
64
|
+
const value = m[3] ?? "";
|
|
65
|
+
if (m[2] === "=") rule.def = value;
|
|
66
|
+
else if (m[2] === ":") rule.forced = value;
|
|
67
|
+
else if (m[2] === "<") rule.values = value.split("?");
|
|
68
|
+
return rule;
|
|
69
|
+
}
|
|
70
|
+
function matches(pattern, name) {
|
|
71
|
+
if (pattern === "*") return true;
|
|
72
|
+
return pattern.endsWith("*") ? name.startsWith(pattern.slice(0, -1)) : pattern === name;
|
|
73
|
+
}
|
|
74
|
+
var warned = /* @__PURE__ */ new Set();
|
|
75
|
+
function warn(tag, reason) {
|
|
76
|
+
if (warned.has(tag)) return;
|
|
77
|
+
warned.add(tag);
|
|
78
|
+
console.warn(`[nova] <${tag}> in content rules is ignored: ${reason}`);
|
|
79
|
+
}
|
|
80
|
+
var HtmlRules = class {
|
|
81
|
+
/** Список атрибутов элемента (null — список не задан, атрибуты встроенные). */
|
|
82
|
+
elements = /* @__PURE__ */ new Map();
|
|
83
|
+
globals = [];
|
|
84
|
+
/** Универсальные элементы: тег во входном HTML → тег на выходе (синонимы `div/section`). */
|
|
85
|
+
blockTags = /* @__PURE__ */ new Map();
|
|
86
|
+
inlineTags = /* @__PURE__ */ new Map();
|
|
87
|
+
constructor(options) {
|
|
88
|
+
const invalid = new Set(
|
|
89
|
+
(options.invalidElements ?? "").split(",").map((s) => s.trim().toLowerCase()).filter(Boolean)
|
|
90
|
+
);
|
|
91
|
+
const inlineCustom = /* @__PURE__ */ new Set();
|
|
92
|
+
const custom = /* @__PURE__ */ new Set();
|
|
93
|
+
for (const raw of (options.customElements ?? "").split(",")) {
|
|
94
|
+
const name = raw.trim().toLowerCase();
|
|
95
|
+
const tag = name.replace(/^~/, "");
|
|
96
|
+
if (!TAG_NAME.test(tag)) continue;
|
|
97
|
+
if (NEVER.has(tag) || BASE_TAGS.has(tag)) {
|
|
98
|
+
warn(tag, "it cannot be a custom element");
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
custom.add(tag);
|
|
102
|
+
if (name.startsWith("~")) inlineCustom.add(tag);
|
|
103
|
+
}
|
|
104
|
+
const declare = (names, attrs) => {
|
|
105
|
+
const [main, ...aliases] = names;
|
|
106
|
+
if (!main) return;
|
|
107
|
+
if (main === "@" || main === "*") {
|
|
108
|
+
this.globals.push(...attrs ?? []);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
for (const tag of names) {
|
|
112
|
+
if (!TAG_NAME.test(tag) || invalid.has(tag)) continue;
|
|
113
|
+
if (NEVER.has(tag)) {
|
|
114
|
+
warn(tag, "not allowed for security reasons (iframes and video: use the media plugin)");
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
this.elements.set(tag, attrs);
|
|
118
|
+
const output = BASE_TAGS.has(tag) || SPLIT.has(tag) ? tag : main;
|
|
119
|
+
if (BASE_TAGS.has(tag)) continue;
|
|
120
|
+
if (SPLIT.has(tag)) {
|
|
121
|
+
if (tag === main && attrs?.length) this.inlineTags.set(tag, tag);
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
const isCustom = custom.has(tag) || custom.has(main) || tag.includes("-");
|
|
125
|
+
if (INLINE.has(main) || inlineCustom.has(main)) this.inlineTags.set(tag, output);
|
|
126
|
+
else if (BLOCK.has(main) || isCustom) this.blockTags.set(tag, output);
|
|
127
|
+
else if (!aliases.includes(tag) || tag === main) warn(tag, "unknown element");
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
for (const raw of splitTopLevel(options.validElements ?? "")) {
|
|
131
|
+
const { names, attrs } = parseRule(raw);
|
|
132
|
+
if (attrs) declare(names, attrs);
|
|
133
|
+
else if (!names.every((n) => BASE_TAGS.has(n) || SPLIT.has(n))) declare(names, null);
|
|
134
|
+
}
|
|
135
|
+
for (const raw of splitTopLevel(options.extendedValidElements ?? "")) {
|
|
136
|
+
const { names, attrs } = parseRule(raw);
|
|
137
|
+
declare(names, attrs);
|
|
138
|
+
}
|
|
139
|
+
for (const tag of custom) {
|
|
140
|
+
if (invalid.has(tag)) continue;
|
|
141
|
+
if (!this.elements.has(tag)) this.elements.set(tag, [{ name: "*", required: false }]);
|
|
142
|
+
if (inlineCustom.has(tag)) this.inlineTags.set(tag, tag);
|
|
143
|
+
else if (!this.inlineTags.has(tag)) this.blockTags.set(tag, tag);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
apply(specs, ref) {
|
|
147
|
+
return applyHtmlRules(specs.nodes, specs.marks, this, ref);
|
|
148
|
+
}
|
|
149
|
+
/** Есть ли что применять (иначе редактор обходится без этого модуля). */
|
|
150
|
+
get active() {
|
|
151
|
+
return this.elements.size > 0 || this.globals.length > 0;
|
|
152
|
+
}
|
|
153
|
+
/** Правила касаются элемента: список атрибутов, значения или общие атрибуты. */
|
|
154
|
+
touches(tag) {
|
|
155
|
+
return this.globals.length > 0 || this.elements.has(tag);
|
|
156
|
+
}
|
|
157
|
+
rulesFor(tag) {
|
|
158
|
+
return [...this.elements.get(tag) ?? [], ...this.globals];
|
|
159
|
+
}
|
|
160
|
+
/** Разрешает ли правило атрибут (без учёта встроенных атрибутов элемента). */
|
|
161
|
+
allows(tag, name) {
|
|
162
|
+
if (NEVER_ATTR.test(name) || !ATTR_NAME.test(name)) return false;
|
|
163
|
+
return this.rulesFor(tag).some((rule) => matches(rule.name, name));
|
|
164
|
+
}
|
|
165
|
+
/** Может ли у встроенного элемента быть атрибут сверх встроенных (кроме class и style). */
|
|
166
|
+
extends(tag) {
|
|
167
|
+
return this.rulesFor(tag).some((rule) => rule.name !== "class" && rule.name !== "style");
|
|
168
|
+
}
|
|
169
|
+
/** Правила разрешают class у какого-либо встроенного элемента (тогда классы сохраняются). */
|
|
170
|
+
get classOnBuiltIn() {
|
|
171
|
+
if (this.globals.some((r) => matches(r.name, "class"))) return true;
|
|
172
|
+
for (const [tag, attrs] of this.elements) {
|
|
173
|
+
if (BASE_TAGS.has(tag) && attrs?.some((r) => matches(r.name, "class"))) return true;
|
|
174
|
+
}
|
|
175
|
+
return false;
|
|
176
|
+
}
|
|
177
|
+
/** Все обязательные атрибуты на месте. */
|
|
178
|
+
hasRequired(tag, dom) {
|
|
179
|
+
return this.rulesFor(tag).every((rule) => !rule.required || dom.hasAttribute(rule.name));
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Разрешённые правилом атрибуты элемента (значения проверены) или null. `skip` — атрибуты, которые
|
|
183
|
+
* хранит не элемент: у встроенных class и style (validClasses, validStyles, марки оформления).
|
|
184
|
+
* Собственный style новых элементов парсер заранее переносит в OWN_STYLE (см. parser.ts).
|
|
185
|
+
*/
|
|
186
|
+
readAttrs(tag, dom, skip) {
|
|
187
|
+
let out = null;
|
|
188
|
+
for (const attr of Array.from(dom.attributes)) {
|
|
189
|
+
let name = attr.name.toLowerCase();
|
|
190
|
+
if (name === OWN_STYLE) name = "style";
|
|
191
|
+
if (skip.includes(name) || !this.allows(tag, name)) continue;
|
|
192
|
+
const value = safeAttr(name, attr.value);
|
|
193
|
+
if (value !== null) (out ??= {})[name] = value;
|
|
194
|
+
}
|
|
195
|
+
return out;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Атрибуты для вывода: встроенные + сохранённые (`extras`, могли прийти из JSON чем угодно),
|
|
199
|
+
* затем список элемента и правила значений.
|
|
200
|
+
*/
|
|
201
|
+
outputAttrs(tag, builtIn, extras) {
|
|
202
|
+
const out = { ...builtIn };
|
|
203
|
+
if (extras && typeof extras === "object" && !Array.isArray(extras)) {
|
|
204
|
+
for (const [raw, value] of Object.entries(extras)) {
|
|
205
|
+
const name = raw.toLowerCase();
|
|
206
|
+
if (out[name] != null || !this.allows(tag, name)) continue;
|
|
207
|
+
if (!["string", "number", "boolean"].includes(typeof value)) continue;
|
|
208
|
+
const safe = safeAttr(name, String(value));
|
|
209
|
+
if (safe !== null) out[name] = safe;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
const list = this.elements.get(tag);
|
|
213
|
+
if (list) {
|
|
214
|
+
for (const name of Object.keys(out)) {
|
|
215
|
+
if (this.allows(tag, name) || ESSENTIAL[tag]?.includes(name)) continue;
|
|
216
|
+
if (name.startsWith("data-nova-")) continue;
|
|
217
|
+
delete out[name];
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
for (const rule of this.rulesFor(tag)) {
|
|
221
|
+
if (rule.name.includes("*")) continue;
|
|
222
|
+
if (rule.forced !== void 0) out[rule.name] = rule.forced;
|
|
223
|
+
else if (rule.def !== void 0 && out[rule.name] == null) out[rule.name] = rule.def;
|
|
224
|
+
const value = out[rule.name];
|
|
225
|
+
if (rule.values && value != null && !rule.values.includes(String(value))) {
|
|
226
|
+
delete out[rule.name];
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
if (tag === "a" && out.target != null && out.rel == null) out.rel = "noopener noreferrer";
|
|
230
|
+
return out;
|
|
231
|
+
}
|
|
232
|
+
/** Применить правила к выводу toDOM: атрибуты верхнего элемента спеки. */
|
|
233
|
+
decorate(spec, extras) {
|
|
234
|
+
if (!Array.isArray(spec) || typeof spec[0] !== "string") return spec;
|
|
235
|
+
const raw = spec[0];
|
|
236
|
+
const tag = (raw.includes(" ") ? raw.split(" ")[1] : raw).toLowerCase();
|
|
237
|
+
if (!this.touches(tag)) return spec;
|
|
238
|
+
const second = spec[1];
|
|
239
|
+
const hasAttrs = !!second && typeof second === "object" && !Array.isArray(second) && second.nodeType === void 0;
|
|
240
|
+
const attrs = this.outputAttrs(tag, hasAttrs ? second : {}, extras);
|
|
241
|
+
return [raw, attrs, ...spec.slice(hasAttrs ? 2 : 1)];
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
function parseRule(raw) {
|
|
245
|
+
const m = /^([^[]*)(?:\[(.*)\])?$/s.exec(raw.trim());
|
|
246
|
+
const names = (m?.[1] ?? "").trim().replace(/^[-#+!]+/, "").split("/").map((n) => n.trim().toLowerCase()).filter(Boolean);
|
|
247
|
+
const list = m?.[2];
|
|
248
|
+
const attrs = list === void 0 ? null : list.split("|").map(parseAttr).filter((a) => a !== null);
|
|
249
|
+
return { names, attrs };
|
|
250
|
+
}
|
|
251
|
+
function createHtmlRules(options) {
|
|
252
|
+
if (!options.validElements && !options.extendedValidElements && !options.customElements) {
|
|
253
|
+
return null;
|
|
254
|
+
}
|
|
255
|
+
const rules = new HtmlRules(options);
|
|
256
|
+
return rules.active ? rules : null;
|
|
257
|
+
}
|
|
258
|
+
var tagOf = (selector) => (/^[a-z][a-z0-9-]*/i.exec(selector)?.[0] ?? "").toLowerCase();
|
|
259
|
+
function producedNames(ref, kind, name, attrs, toDOM) {
|
|
260
|
+
try {
|
|
261
|
+
const schema = ref.schema;
|
|
262
|
+
const spec = kind === "node" ? toDOM(schema.nodes[name].create(attrs)) : toDOM(schema.marks[name].create(attrs), true);
|
|
263
|
+
const second = Array.isArray(spec) ? spec[1] : null;
|
|
264
|
+
return second && typeof second === "object" && !Array.isArray(second) ? Object.keys(second) : [];
|
|
265
|
+
} catch {
|
|
266
|
+
return [];
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
function wrapBase(name, spec, kind, rules, ref) {
|
|
270
|
+
const tags = (spec.parseDOM ?? []).map((rule) => rule.tag ? tagOf(rule.tag) : "").filter((tag) => BASE_TAGS.has(tag) && rules.touches(tag));
|
|
271
|
+
if (!tags.length || !spec.toDOM) return spec;
|
|
272
|
+
const withExtras = tags.some((tag) => rules.extends(tag));
|
|
273
|
+
const toDOM = spec.toDOM;
|
|
274
|
+
return {
|
|
275
|
+
...spec,
|
|
276
|
+
...withExtras ? { attrs: { ...spec.attrs, htmlAttrs: { default: null } } } : {},
|
|
277
|
+
parseDOM: spec.parseDOM.map((rule) => {
|
|
278
|
+
const tag = rule.tag ? tagOf(rule.tag) : "";
|
|
279
|
+
if (!tags.includes(tag)) return rule;
|
|
280
|
+
const getAttrs = rule.getAttrs;
|
|
281
|
+
return {
|
|
282
|
+
...rule,
|
|
283
|
+
getAttrs: (dom) => {
|
|
284
|
+
const base = getAttrs ? getAttrs(dom) : rule.attrs ?? null;
|
|
285
|
+
if (base === false || !rules.hasRequired(tag, dom)) return false;
|
|
286
|
+
if (!withExtras) return base;
|
|
287
|
+
const extras = rules.readAttrs(tag, dom, ["class", "style"]);
|
|
288
|
+
if (!extras) return base;
|
|
289
|
+
for (const produced of producedNames(ref, kind, name, { ...base }, toDOM)) {
|
|
290
|
+
delete extras[produced];
|
|
291
|
+
}
|
|
292
|
+
return Object.keys(extras).length ? { ...base, htmlAttrs: extras } : base;
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
}),
|
|
296
|
+
toDOM: ((value, inline) => rules.decorate(toDOM(value, inline), value.attrs.htmlAttrs))
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
function hasBlockChild(dom, rules) {
|
|
300
|
+
return Array.from(dom.children).some((child) => {
|
|
301
|
+
const tag = child.localName;
|
|
302
|
+
return BLOCK_LEVEL.has(tag) || rules.blockTags.has(tag);
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
function genericSpecs(rules) {
|
|
306
|
+
const nodes = {};
|
|
307
|
+
const marks = {};
|
|
308
|
+
const read = (output, dom, mark) => {
|
|
309
|
+
if (!rules.hasRequired(output, dom)) return false;
|
|
310
|
+
const split = SPLIT.has(output);
|
|
311
|
+
const skip = !split ? [] : mark && output === "span" ? ["class", "style"] : ["style"];
|
|
312
|
+
const htmlAttrs = rules.readAttrs(output, dom, skip);
|
|
313
|
+
if (split && !htmlAttrs) return false;
|
|
314
|
+
return { tag: output, htmlAttrs };
|
|
315
|
+
};
|
|
316
|
+
const ownStyle = (tags) => [...tags].filter(([, output]) => !SPLIT.has(output)).map(([input]) => input);
|
|
317
|
+
const out = (allowed, fallback, attrs) => {
|
|
318
|
+
const tag = typeof attrs.tag === "string" && allowed.has(attrs.tag) ? attrs.tag : fallback;
|
|
319
|
+
return { tag, attrs: rules.outputAttrs(tag, {}, attrs.htmlAttrs) };
|
|
320
|
+
};
|
|
321
|
+
const blocks = [...rules.blockTags];
|
|
322
|
+
if (blocks.length) {
|
|
323
|
+
const allowed = new Set(rules.blockTags.values());
|
|
324
|
+
const fallback = allowed.has("div") ? "div" : [...allowed][0];
|
|
325
|
+
const attrs = { tag: { default: fallback }, htmlAttrs: { default: null } };
|
|
326
|
+
nodes.html_block = {
|
|
327
|
+
ownStyleTags: ownStyle(rules.blockTags),
|
|
328
|
+
group: "block",
|
|
329
|
+
content: "block+",
|
|
330
|
+
defining: true,
|
|
331
|
+
attrs,
|
|
332
|
+
parseDOM: blocks.map(([input, output]) => ({
|
|
333
|
+
tag: input,
|
|
334
|
+
getAttrs: (dom) => hasBlockChild(dom, rules) ? read(output, dom, false) : false
|
|
335
|
+
})),
|
|
336
|
+
toDOM: (node) => {
|
|
337
|
+
const { tag, attrs: a } = out(allowed, fallback, node.attrs);
|
|
338
|
+
return [tag, a, 0];
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
nodes.html_textblock = {
|
|
342
|
+
group: "block",
|
|
343
|
+
content: "inline*",
|
|
344
|
+
attrs,
|
|
345
|
+
parseDOM: blocks.map(([input, output]) => ({
|
|
346
|
+
tag: input,
|
|
347
|
+
getAttrs: (dom) => hasBlockChild(dom, rules) ? false : read(output, dom, false)
|
|
348
|
+
})),
|
|
349
|
+
toDOM: (node) => {
|
|
350
|
+
const { tag, attrs: a } = out(allowed, fallback, node.attrs);
|
|
351
|
+
return [tag, a, 0];
|
|
352
|
+
}
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
const inline = [...rules.inlineTags];
|
|
356
|
+
if (inline.length) {
|
|
357
|
+
const allowed = new Set(rules.inlineTags.values());
|
|
358
|
+
const fallback = allowed.has("span") ? "span" : [...allowed][0];
|
|
359
|
+
const attrs = { tag: { default: fallback }, htmlAttrs: { default: null } };
|
|
360
|
+
nodes.html_inline_atom = {
|
|
361
|
+
ownStyleTags: ownStyle(rules.inlineTags),
|
|
362
|
+
group: "inline",
|
|
363
|
+
inline: true,
|
|
364
|
+
atom: true,
|
|
365
|
+
attrs,
|
|
366
|
+
parseDOM: inline.map(([input, output]) => ({
|
|
367
|
+
tag: input,
|
|
368
|
+
// Раньше марки того же тега (у неё 60) и встроенных марок (курсив для <i>).
|
|
369
|
+
priority: 65,
|
|
370
|
+
getAttrs: (dom) => dom.firstChild ? false : read(output, dom, false)
|
|
371
|
+
})),
|
|
372
|
+
toDOM: (node) => {
|
|
373
|
+
const { tag, attrs: a } = out(allowed, fallback, node.attrs);
|
|
374
|
+
return [tag, a];
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
marks.html_inline = {
|
|
378
|
+
attrs,
|
|
379
|
+
// Разные элементы (abbr внутри kbd) — экземпляры одной марки, они не должны вытеснять друг друга.
|
|
380
|
+
excludes: "",
|
|
381
|
+
parseDOM: inline.map(([input, output]) => ({
|
|
382
|
+
tag: input,
|
|
383
|
+
// span: после марок классов и узлов плагинов (они разбирают свои span раньше).
|
|
384
|
+
priority: output === "span" ? 40 : 60,
|
|
385
|
+
getAttrs: (dom) => dom.firstChild ? read(output, dom, true) : false
|
|
386
|
+
})),
|
|
387
|
+
toDOM: (mark) => {
|
|
388
|
+
const { tag, attrs: a } = out(allowed, fallback, mark.attrs);
|
|
389
|
+
return [tag, a, 0];
|
|
390
|
+
}
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
return { nodes, marks };
|
|
394
|
+
}
|
|
395
|
+
function applyHtmlRules(nodes, marks, rules, ref) {
|
|
396
|
+
const wrap = (specs, kind) => Object.fromEntries(
|
|
397
|
+
Object.entries(specs).map(([name, spec]) => [name, wrapBase(name, spec, kind, rules, ref)])
|
|
398
|
+
);
|
|
399
|
+
const generic = genericSpecs(rules);
|
|
400
|
+
return {
|
|
401
|
+
nodes: { ...wrap(nodes, "node"), ...generic.nodes },
|
|
402
|
+
marks: { ...wrap(marks, "mark"), ...generic.marks }
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
var htmlRules = { create: createHtmlRules };
|
|
406
|
+
export {
|
|
407
|
+
BASE_TAGS,
|
|
408
|
+
HtmlRules,
|
|
409
|
+
applyHtmlRules,
|
|
410
|
+
createHtmlRules,
|
|
411
|
+
htmlRules
|
|
412
|
+
};
|
|
413
|
+
//# sourceMappingURL=html-rules.js.map
|