@mdaemon/html-editor 1.2.0 → 1.2.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/dist/index.js +57 -40
- package/dist/index.mjs +57 -40
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17437,6 +17437,26 @@ function canInsertNode(state, nodeType) {
|
|
|
17437
17437
|
}
|
|
17438
17438
|
return false;
|
|
17439
17439
|
}
|
|
17440
|
+
function getStyleProperty(element, propertyName) {
|
|
17441
|
+
const styleAttr = element.getAttribute("style");
|
|
17442
|
+
if (!styleAttr) {
|
|
17443
|
+
return null;
|
|
17444
|
+
}
|
|
17445
|
+
const decls = styleAttr.split(";").map((decl) => decl.trim()).filter(Boolean);
|
|
17446
|
+
const target = propertyName.toLowerCase();
|
|
17447
|
+
for (let i = decls.length - 1; i >= 0; i -= 1) {
|
|
17448
|
+
const decl = decls[i];
|
|
17449
|
+
const colonIndex = decl.indexOf(":");
|
|
17450
|
+
if (colonIndex === -1) {
|
|
17451
|
+
continue;
|
|
17452
|
+
}
|
|
17453
|
+
const prop = decl.slice(0, colonIndex).trim().toLowerCase();
|
|
17454
|
+
if (prop === target) {
|
|
17455
|
+
return decl.slice(colonIndex + 1).trim();
|
|
17456
|
+
}
|
|
17457
|
+
}
|
|
17458
|
+
return null;
|
|
17459
|
+
}
|
|
17440
17460
|
var markdown_exports = {};
|
|
17441
17461
|
__export$1(markdown_exports, {
|
|
17442
17462
|
createAtomBlockMarkdownSpec: () => createAtomBlockMarkdownSpec,
|
|
@@ -18874,7 +18894,7 @@ var Italic = Mark2.create({
|
|
|
18874
18894
|
];
|
|
18875
18895
|
}
|
|
18876
18896
|
});
|
|
18877
|
-
const encodedTlds = "
|
|
18897
|
+
const encodedTlds = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2";
|
|
18878
18898
|
const encodedUtlds = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2";
|
|
18879
18899
|
const numeric = "numeric";
|
|
18880
18900
|
const ascii = "ascii";
|
|
@@ -19804,8 +19824,6 @@ function init$1({
|
|
|
19804
19824
|
ta(Email$1, groups.domain, EmailDomain);
|
|
19805
19825
|
tt(Email$1, DOT, EmailDomainDot);
|
|
19806
19826
|
tt(Email$1, HYPHEN, EmailDomainHyphen);
|
|
19807
|
-
const EmailColon = tt(Email$1, COLON);
|
|
19808
|
-
ta(EmailColon, groups.numeric, Email);
|
|
19809
19827
|
const DomainHyphen = tt(Domain, HYPHEN);
|
|
19810
19828
|
const DomainDot = tt(Domain, DOT);
|
|
19811
19829
|
tt(DomainHyphen, HYPHEN, DomainHyphen);
|
|
@@ -19869,11 +19887,11 @@ function init$1({
|
|
|
19869
19887
|
const [OPEN, CLOSE] = bracketPairs[i];
|
|
19870
19888
|
const UrlOpen = tt(Url$1, OPEN);
|
|
19871
19889
|
tt(UrlNonaccept, OPEN, UrlOpen);
|
|
19872
|
-
tt(UrlOpen, CLOSE, Url$1);
|
|
19873
19890
|
const UrlOpenQ = makeState(Url);
|
|
19874
19891
|
ta(UrlOpen, qsAccepting, UrlOpenQ);
|
|
19875
19892
|
const UrlOpenSyms = makeState();
|
|
19876
|
-
ta(UrlOpen, qsNonAccepting);
|
|
19893
|
+
ta(UrlOpen, qsNonAccepting, UrlOpenSyms);
|
|
19894
|
+
tt(UrlOpen, CLOSE, Url$1);
|
|
19877
19895
|
ta(UrlOpenQ, qsAccepting, UrlOpenQ);
|
|
19878
19896
|
ta(UrlOpenQ, qsNonAccepting, UrlOpenSyms);
|
|
19879
19897
|
ta(UrlOpenSyms, qsAccepting, UrlOpenQ);
|
|
@@ -22608,6 +22626,7 @@ var CharacterCount = Extension.create({
|
|
|
22608
22626
|
addOptions() {
|
|
22609
22627
|
return {
|
|
22610
22628
|
limit: null,
|
|
22629
|
+
autoTrim: true,
|
|
22611
22630
|
mode: "textSize",
|
|
22612
22631
|
textCounter: (text) => text.length,
|
|
22613
22632
|
wordCounter: (text) => text.split(" ").filter((word) => word !== "").length
|
|
@@ -22645,7 +22664,8 @@ var CharacterCount = Extension.create({
|
|
|
22645
22664
|
return;
|
|
22646
22665
|
}
|
|
22647
22666
|
const limit = this.options.limit;
|
|
22648
|
-
|
|
22667
|
+
const autoTrim = this.options.autoTrim;
|
|
22668
|
+
if (limit === null || limit === void 0 || limit === 0 || autoTrim === false) {
|
|
22649
22669
|
initialEvaluationDone = true;
|
|
22650
22670
|
return;
|
|
22651
22671
|
}
|
|
@@ -23195,21 +23215,8 @@ var BackgroundColor = Extension.create({
|
|
|
23195
23215
|
default: null,
|
|
23196
23216
|
parseHTML: (element) => {
|
|
23197
23217
|
var _a;
|
|
23198
|
-
const
|
|
23199
|
-
|
|
23200
|
-
const decls = styleAttr.split(";").map((s) => s.trim()).filter(Boolean);
|
|
23201
|
-
for (let i = decls.length - 1; i >= 0; i -= 1) {
|
|
23202
|
-
const parts = decls[i].split(":");
|
|
23203
|
-
if (parts.length >= 2) {
|
|
23204
|
-
const prop = parts[0].trim().toLowerCase();
|
|
23205
|
-
const val = parts.slice(1).join(":").trim();
|
|
23206
|
-
if (prop === "background-color") {
|
|
23207
|
-
return val.replace(/['"]+/g, "");
|
|
23208
|
-
}
|
|
23209
|
-
}
|
|
23210
|
-
}
|
|
23211
|
-
}
|
|
23212
|
-
return (_a = element.style.backgroundColor) == null ? void 0 : _a.replace(/['"]+/g, "");
|
|
23218
|
+
const value = (_a = getStyleProperty(element, "background-color")) != null ? _a : element.style.backgroundColor;
|
|
23219
|
+
return value == null ? void 0 : value.replace(/['"]+/g, "");
|
|
23213
23220
|
},
|
|
23214
23221
|
renderHTML: (attributes) => {
|
|
23215
23222
|
if (!attributes.backgroundColor) {
|
|
@@ -23251,21 +23258,8 @@ var Color = Extension.create({
|
|
|
23251
23258
|
default: null,
|
|
23252
23259
|
parseHTML: (element) => {
|
|
23253
23260
|
var _a;
|
|
23254
|
-
const
|
|
23255
|
-
|
|
23256
|
-
const decls = styleAttr.split(";").map((s) => s.trim()).filter(Boolean);
|
|
23257
|
-
for (let i = decls.length - 1; i >= 0; i -= 1) {
|
|
23258
|
-
const parts = decls[i].split(":");
|
|
23259
|
-
if (parts.length >= 2) {
|
|
23260
|
-
const prop = parts[0].trim().toLowerCase();
|
|
23261
|
-
const val = parts.slice(1).join(":").trim();
|
|
23262
|
-
if (prop === "color") {
|
|
23263
|
-
return val.replace(/['"]+/g, "");
|
|
23264
|
-
}
|
|
23265
|
-
}
|
|
23266
|
-
}
|
|
23267
|
-
}
|
|
23268
|
-
return (_a = element.style.color) == null ? void 0 : _a.replace(/['"]+/g, "");
|
|
23261
|
+
const value = (_a = getStyleProperty(element, "color")) != null ? _a : element.style.color;
|
|
23262
|
+
return value == null ? void 0 : value.replace(/['"]+/g, "");
|
|
23269
23263
|
},
|
|
23270
23264
|
renderHTML: (attributes) => {
|
|
23271
23265
|
if (!attributes.color) {
|
|
@@ -23305,7 +23299,14 @@ var FontFamily = Extension.create({
|
|
|
23305
23299
|
attributes: {
|
|
23306
23300
|
fontFamily: {
|
|
23307
23301
|
default: null,
|
|
23308
|
-
|
|
23302
|
+
// Prefer the raw inline `style` attribute so unquoted or
|
|
23303
|
+
// single-quoted multi-word names are preserved instead of being
|
|
23304
|
+
// canonicalized by `element.style.fontFamily`, which forces double
|
|
23305
|
+
// quotes that then get HTML-encoded to `"` on serialization.
|
|
23306
|
+
parseHTML: (element) => {
|
|
23307
|
+
var _a;
|
|
23308
|
+
return (_a = getStyleProperty(element, "font-family")) != null ? _a : element.style.fontFamily;
|
|
23309
|
+
},
|
|
23309
23310
|
renderHTML: (attributes) => {
|
|
23310
23311
|
if (!attributes.fontFamily) {
|
|
23311
23312
|
return {};
|
|
@@ -23344,7 +23345,13 @@ var FontSize$1 = Extension.create({
|
|
|
23344
23345
|
attributes: {
|
|
23345
23346
|
fontSize: {
|
|
23346
23347
|
default: null,
|
|
23347
|
-
|
|
23348
|
+
// Prefer the raw inline `style` attribute so the original format
|
|
23349
|
+
// is preserved instead of the canonicalized value returned by
|
|
23350
|
+
// `element.style.fontSize`.
|
|
23351
|
+
parseHTML: (element) => {
|
|
23352
|
+
var _a;
|
|
23353
|
+
return (_a = getStyleProperty(element, "font-size")) != null ? _a : element.style.fontSize;
|
|
23354
|
+
},
|
|
23348
23355
|
renderHTML: (attributes) => {
|
|
23349
23356
|
if (!attributes.fontSize) {
|
|
23350
23357
|
return {};
|
|
@@ -23383,7 +23390,13 @@ var LineHeight$1 = Extension.create({
|
|
|
23383
23390
|
attributes: {
|
|
23384
23391
|
lineHeight: {
|
|
23385
23392
|
default: null,
|
|
23386
|
-
|
|
23393
|
+
// Prefer the raw inline `style` attribute so the original format
|
|
23394
|
+
// is preserved instead of the canonicalized value returned by
|
|
23395
|
+
// `element.style.lineHeight`.
|
|
23396
|
+
parseHTML: (element) => {
|
|
23397
|
+
var _a;
|
|
23398
|
+
return (_a = getStyleProperty(element, "line-height")) != null ? _a : element.style.lineHeight;
|
|
23399
|
+
},
|
|
23387
23400
|
renderHTML: (attributes) => {
|
|
23388
23401
|
if (!attributes.lineHeight) {
|
|
23389
23402
|
return {};
|
|
@@ -23450,7 +23463,11 @@ var Highlight = Mark2.create({
|
|
|
23450
23463
|
return {
|
|
23451
23464
|
color: {
|
|
23452
23465
|
default: null,
|
|
23453
|
-
|
|
23466
|
+
// Prefer `data-color` (set by our own `renderHTML`) for lossless
|
|
23467
|
+
// round-trips. Otherwise parse the raw inline `style` attribute so
|
|
23468
|
+
// the original color format (e.g. `#rrggbb`) is preserved instead of
|
|
23469
|
+
// the canonicalized `rgb(...)` value from `element.style.backgroundColor`.
|
|
23470
|
+
parseHTML: (element) => element.getAttribute("data-color") || getStyleProperty(element, "background-color") || element.style.backgroundColor,
|
|
23454
23471
|
renderHTML: (attributes) => {
|
|
23455
23472
|
if (!attributes.color) {
|
|
23456
23473
|
return {};
|
package/dist/index.mjs
CHANGED
|
@@ -17435,6 +17435,26 @@ function canInsertNode(state, nodeType) {
|
|
|
17435
17435
|
}
|
|
17436
17436
|
return false;
|
|
17437
17437
|
}
|
|
17438
|
+
function getStyleProperty(element, propertyName) {
|
|
17439
|
+
const styleAttr = element.getAttribute("style");
|
|
17440
|
+
if (!styleAttr) {
|
|
17441
|
+
return null;
|
|
17442
|
+
}
|
|
17443
|
+
const decls = styleAttr.split(";").map((decl) => decl.trim()).filter(Boolean);
|
|
17444
|
+
const target = propertyName.toLowerCase();
|
|
17445
|
+
for (let i = decls.length - 1; i >= 0; i -= 1) {
|
|
17446
|
+
const decl = decls[i];
|
|
17447
|
+
const colonIndex = decl.indexOf(":");
|
|
17448
|
+
if (colonIndex === -1) {
|
|
17449
|
+
continue;
|
|
17450
|
+
}
|
|
17451
|
+
const prop = decl.slice(0, colonIndex).trim().toLowerCase();
|
|
17452
|
+
if (prop === target) {
|
|
17453
|
+
return decl.slice(colonIndex + 1).trim();
|
|
17454
|
+
}
|
|
17455
|
+
}
|
|
17456
|
+
return null;
|
|
17457
|
+
}
|
|
17438
17458
|
var markdown_exports = {};
|
|
17439
17459
|
__export$1(markdown_exports, {
|
|
17440
17460
|
createAtomBlockMarkdownSpec: () => createAtomBlockMarkdownSpec,
|
|
@@ -18872,7 +18892,7 @@ var Italic = Mark2.create({
|
|
|
18872
18892
|
];
|
|
18873
18893
|
}
|
|
18874
18894
|
});
|
|
18875
|
-
const encodedTlds = "
|
|
18895
|
+
const encodedTlds = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2";
|
|
18876
18896
|
const encodedUtlds = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2";
|
|
18877
18897
|
const numeric = "numeric";
|
|
18878
18898
|
const ascii = "ascii";
|
|
@@ -19802,8 +19822,6 @@ function init$1({
|
|
|
19802
19822
|
ta(Email$1, groups.domain, EmailDomain);
|
|
19803
19823
|
tt(Email$1, DOT, EmailDomainDot);
|
|
19804
19824
|
tt(Email$1, HYPHEN, EmailDomainHyphen);
|
|
19805
|
-
const EmailColon = tt(Email$1, COLON);
|
|
19806
|
-
ta(EmailColon, groups.numeric, Email);
|
|
19807
19825
|
const DomainHyphen = tt(Domain, HYPHEN);
|
|
19808
19826
|
const DomainDot = tt(Domain, DOT);
|
|
19809
19827
|
tt(DomainHyphen, HYPHEN, DomainHyphen);
|
|
@@ -19867,11 +19885,11 @@ function init$1({
|
|
|
19867
19885
|
const [OPEN, CLOSE] = bracketPairs[i];
|
|
19868
19886
|
const UrlOpen = tt(Url$1, OPEN);
|
|
19869
19887
|
tt(UrlNonaccept, OPEN, UrlOpen);
|
|
19870
|
-
tt(UrlOpen, CLOSE, Url$1);
|
|
19871
19888
|
const UrlOpenQ = makeState(Url);
|
|
19872
19889
|
ta(UrlOpen, qsAccepting, UrlOpenQ);
|
|
19873
19890
|
const UrlOpenSyms = makeState();
|
|
19874
|
-
ta(UrlOpen, qsNonAccepting);
|
|
19891
|
+
ta(UrlOpen, qsNonAccepting, UrlOpenSyms);
|
|
19892
|
+
tt(UrlOpen, CLOSE, Url$1);
|
|
19875
19893
|
ta(UrlOpenQ, qsAccepting, UrlOpenQ);
|
|
19876
19894
|
ta(UrlOpenQ, qsNonAccepting, UrlOpenSyms);
|
|
19877
19895
|
ta(UrlOpenSyms, qsAccepting, UrlOpenQ);
|
|
@@ -22606,6 +22624,7 @@ var CharacterCount = Extension.create({
|
|
|
22606
22624
|
addOptions() {
|
|
22607
22625
|
return {
|
|
22608
22626
|
limit: null,
|
|
22627
|
+
autoTrim: true,
|
|
22609
22628
|
mode: "textSize",
|
|
22610
22629
|
textCounter: (text) => text.length,
|
|
22611
22630
|
wordCounter: (text) => text.split(" ").filter((word) => word !== "").length
|
|
@@ -22643,7 +22662,8 @@ var CharacterCount = Extension.create({
|
|
|
22643
22662
|
return;
|
|
22644
22663
|
}
|
|
22645
22664
|
const limit = this.options.limit;
|
|
22646
|
-
|
|
22665
|
+
const autoTrim = this.options.autoTrim;
|
|
22666
|
+
if (limit === null || limit === void 0 || limit === 0 || autoTrim === false) {
|
|
22647
22667
|
initialEvaluationDone = true;
|
|
22648
22668
|
return;
|
|
22649
22669
|
}
|
|
@@ -23193,21 +23213,8 @@ var BackgroundColor = Extension.create({
|
|
|
23193
23213
|
default: null,
|
|
23194
23214
|
parseHTML: (element) => {
|
|
23195
23215
|
var _a;
|
|
23196
|
-
const
|
|
23197
|
-
|
|
23198
|
-
const decls = styleAttr.split(";").map((s) => s.trim()).filter(Boolean);
|
|
23199
|
-
for (let i = decls.length - 1; i >= 0; i -= 1) {
|
|
23200
|
-
const parts = decls[i].split(":");
|
|
23201
|
-
if (parts.length >= 2) {
|
|
23202
|
-
const prop = parts[0].trim().toLowerCase();
|
|
23203
|
-
const val = parts.slice(1).join(":").trim();
|
|
23204
|
-
if (prop === "background-color") {
|
|
23205
|
-
return val.replace(/['"]+/g, "");
|
|
23206
|
-
}
|
|
23207
|
-
}
|
|
23208
|
-
}
|
|
23209
|
-
}
|
|
23210
|
-
return (_a = element.style.backgroundColor) == null ? void 0 : _a.replace(/['"]+/g, "");
|
|
23216
|
+
const value = (_a = getStyleProperty(element, "background-color")) != null ? _a : element.style.backgroundColor;
|
|
23217
|
+
return value == null ? void 0 : value.replace(/['"]+/g, "");
|
|
23211
23218
|
},
|
|
23212
23219
|
renderHTML: (attributes) => {
|
|
23213
23220
|
if (!attributes.backgroundColor) {
|
|
@@ -23249,21 +23256,8 @@ var Color = Extension.create({
|
|
|
23249
23256
|
default: null,
|
|
23250
23257
|
parseHTML: (element) => {
|
|
23251
23258
|
var _a;
|
|
23252
|
-
const
|
|
23253
|
-
|
|
23254
|
-
const decls = styleAttr.split(";").map((s) => s.trim()).filter(Boolean);
|
|
23255
|
-
for (let i = decls.length - 1; i >= 0; i -= 1) {
|
|
23256
|
-
const parts = decls[i].split(":");
|
|
23257
|
-
if (parts.length >= 2) {
|
|
23258
|
-
const prop = parts[0].trim().toLowerCase();
|
|
23259
|
-
const val = parts.slice(1).join(":").trim();
|
|
23260
|
-
if (prop === "color") {
|
|
23261
|
-
return val.replace(/['"]+/g, "");
|
|
23262
|
-
}
|
|
23263
|
-
}
|
|
23264
|
-
}
|
|
23265
|
-
}
|
|
23266
|
-
return (_a = element.style.color) == null ? void 0 : _a.replace(/['"]+/g, "");
|
|
23259
|
+
const value = (_a = getStyleProperty(element, "color")) != null ? _a : element.style.color;
|
|
23260
|
+
return value == null ? void 0 : value.replace(/['"]+/g, "");
|
|
23267
23261
|
},
|
|
23268
23262
|
renderHTML: (attributes) => {
|
|
23269
23263
|
if (!attributes.color) {
|
|
@@ -23303,7 +23297,14 @@ var FontFamily = Extension.create({
|
|
|
23303
23297
|
attributes: {
|
|
23304
23298
|
fontFamily: {
|
|
23305
23299
|
default: null,
|
|
23306
|
-
|
|
23300
|
+
// Prefer the raw inline `style` attribute so unquoted or
|
|
23301
|
+
// single-quoted multi-word names are preserved instead of being
|
|
23302
|
+
// canonicalized by `element.style.fontFamily`, which forces double
|
|
23303
|
+
// quotes that then get HTML-encoded to `"` on serialization.
|
|
23304
|
+
parseHTML: (element) => {
|
|
23305
|
+
var _a;
|
|
23306
|
+
return (_a = getStyleProperty(element, "font-family")) != null ? _a : element.style.fontFamily;
|
|
23307
|
+
},
|
|
23307
23308
|
renderHTML: (attributes) => {
|
|
23308
23309
|
if (!attributes.fontFamily) {
|
|
23309
23310
|
return {};
|
|
@@ -23342,7 +23343,13 @@ var FontSize$1 = Extension.create({
|
|
|
23342
23343
|
attributes: {
|
|
23343
23344
|
fontSize: {
|
|
23344
23345
|
default: null,
|
|
23345
|
-
|
|
23346
|
+
// Prefer the raw inline `style` attribute so the original format
|
|
23347
|
+
// is preserved instead of the canonicalized value returned by
|
|
23348
|
+
// `element.style.fontSize`.
|
|
23349
|
+
parseHTML: (element) => {
|
|
23350
|
+
var _a;
|
|
23351
|
+
return (_a = getStyleProperty(element, "font-size")) != null ? _a : element.style.fontSize;
|
|
23352
|
+
},
|
|
23346
23353
|
renderHTML: (attributes) => {
|
|
23347
23354
|
if (!attributes.fontSize) {
|
|
23348
23355
|
return {};
|
|
@@ -23381,7 +23388,13 @@ var LineHeight$1 = Extension.create({
|
|
|
23381
23388
|
attributes: {
|
|
23382
23389
|
lineHeight: {
|
|
23383
23390
|
default: null,
|
|
23384
|
-
|
|
23391
|
+
// Prefer the raw inline `style` attribute so the original format
|
|
23392
|
+
// is preserved instead of the canonicalized value returned by
|
|
23393
|
+
// `element.style.lineHeight`.
|
|
23394
|
+
parseHTML: (element) => {
|
|
23395
|
+
var _a;
|
|
23396
|
+
return (_a = getStyleProperty(element, "line-height")) != null ? _a : element.style.lineHeight;
|
|
23397
|
+
},
|
|
23385
23398
|
renderHTML: (attributes) => {
|
|
23386
23399
|
if (!attributes.lineHeight) {
|
|
23387
23400
|
return {};
|
|
@@ -23448,7 +23461,11 @@ var Highlight = Mark2.create({
|
|
|
23448
23461
|
return {
|
|
23449
23462
|
color: {
|
|
23450
23463
|
default: null,
|
|
23451
|
-
|
|
23464
|
+
// Prefer `data-color` (set by our own `renderHTML`) for lossless
|
|
23465
|
+
// round-trips. Otherwise parse the raw inline `style` attribute so
|
|
23466
|
+
// the original color format (e.g. `#rrggbb`) is preserved instead of
|
|
23467
|
+
// the canonicalized `rgb(...)` value from `element.style.backgroundColor`.
|
|
23468
|
+
parseHTML: (element) => element.getAttribute("data-color") || getStyleProperty(element, "background-color") || element.style.backgroundColor,
|
|
23452
23469
|
renderHTML: (attributes) => {
|
|
23453
23470
|
if (!attributes.color) {
|
|
23454
23471
|
return {};
|