@clevertask/scribe 0.1.10 → 0.1.12
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 +11 -1
- package/dist/{BarMenu-5S2vKAtc.js → BarMenu-5M9g9Y1j.js} +7 -5
- package/dist/components/Menu/BarMenu.js +1 -1
- package/dist/components/Menu/BubbleMenu.js +2 -2
- package/dist/components/Menu/CalloutBubbleMenu.d.ts +7 -0
- package/dist/components/Menu/CalloutBubbleMenu.d.ts.map +1 -0
- package/dist/components/Menu/CalloutBubbleMenu.js +156 -0
- package/dist/components/Menu/LinkBubbleMenu.js +2 -2
- package/dist/components/Menu/Mobile/ListOptionBar.js +1 -1
- package/dist/components/Menu/TableBubbleMenu.d.ts +8 -0
- package/dist/components/Menu/TableBubbleMenu.d.ts.map +1 -0
- package/dist/components/Menu/TableBubbleMenu.js +306 -0
- package/dist/components/Menu/calloutBubbleMenuPlugin.d.ts +10 -0
- package/dist/components/Menu/calloutBubbleMenuPlugin.d.ts.map +1 -0
- package/dist/components/Menu/calloutBubbleMenuPlugin.js +22 -0
- package/dist/components/Menu/contextualMenuOwner.d.ts +4 -0
- package/dist/components/Menu/contextualMenuOwner.d.ts.map +1 -0
- package/dist/components/Menu/contextualMenuOwner.js +9 -0
- package/dist/components/Menu/tableBubbleMenuPlugin.d.ts +11 -0
- package/dist/components/Menu/tableBubbleMenuPlugin.d.ts.map +1 -0
- package/dist/components/Menu/tableBubbleMenuPlugin.js +22 -0
- package/dist/components/Scribe/extension/callout.d.ts +32 -0
- package/dist/components/Scribe/extension/callout.d.ts.map +1 -0
- package/dist/components/Scribe/extension/callout.js +118 -0
- package/dist/components/Scribe/extension/emoji/suggest.js +1 -1
- package/dist/components/Scribe/extension/extension-link.js +1 -1
- package/dist/components/Scribe/extension/extension-markdown-paste.js +2 -2
- package/dist/components/Scribe/extension/extension-selectedText.js +1 -1
- package/dist/components/Scribe/extension/index.d.ts +1 -1
- package/dist/components/Scribe/extension/index.d.ts.map +1 -1
- package/dist/components/Scribe/extension/index.js +1 -1
- package/dist/components/Scribe/extension/resizable-table.d.ts +8 -0
- package/dist/components/Scribe/extension/resizable-table.d.ts.map +1 -0
- package/dist/components/Scribe/extension/resizable-table.js +2 -0
- package/dist/components/Scribe/extension/slashCommand/SlashCommandList.js +1390 -1390
- package/dist/components/Scribe/extension/slashCommand/index.js +1 -1
- package/dist/components/Scribe/extension/slashCommand/items.d.ts.map +1 -1
- package/dist/components/Scribe/extension/slashCommand/items.js +73 -26
- package/dist/components/Scribe/extension/slashCommand/renderItems.js +1 -1
- package/dist/components/Scribe/extension/tableOfContents.js +1 -1
- package/dist/components/Scribe/index.d.ts +2 -1
- package/dist/components/Scribe/index.d.ts.map +1 -1
- package/dist/components/Scribe/index.js +140 -133
- package/dist/{dist-DErUltkU.js → dist-DFua_Xbu.js} +37 -31
- package/dist/{dist-wYqYXEOz.js → dist-Dw4STOPE.js} +1 -1
- package/dist/{extension-6I5t1ZxQ.js → extension-_8uh0Ik9.js} +1323 -1780
- package/dist/{extension-link-DJy7XDoj.js → extension-link-CjfUZ90W.js} +1 -1
- package/dist/{html-to-markdown-Cta7-ssO.js → html-to-markdown-C920nQtn.js} +155 -56
- package/dist/icons/CalloutIcon.d.ts +9 -0
- package/dist/icons/CalloutIcon.d.ts.map +1 -0
- package/dist/icons/CalloutIcon.js +72 -0
- package/dist/main.css +170 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +9 -8
- package/dist/{markdown-to-html-DwSNqq2i.js → markdown-to-html-CW0Nb9Ye.js} +103 -60
- package/dist/{menus-m_EkiaUN.js → menus-_EXlLMjz.js} +2 -2
- package/dist/{purify.es-CFiLaBu1.js → purify.es-BES4pJF7.js} +267 -260
- package/dist/resizable-table-Ddw3l6DJ.js +489 -0
- package/dist/{slashCommand-DuSH9sXJ.js → slashCommand-CxX07Nbk.js} +24 -22
- package/dist/utils/html-to-markdown.d.ts.map +1 -1
- package/dist/utils/html-to-markdown.js +1 -1
- package/dist/utils/index.js +4 -4
- package/dist/utils/markdown-to-html.d.ts.map +1 -1
- package/dist/utils/markdown-to-html.js +1 -1
- package/package.json +47 -24
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as e, N as t, _ as n, f as r, h as i, i as a, j as o, m as s, o as c, r as l, u } from "./dist-
|
|
1
|
+
import { M as e, N as t, _ as n, f as r, h as i, i as a, j as o, m as s, o as c, r as l, u } from "./dist-DFua_Xbu.js";
|
|
2
2
|
import { Plugin as d, PluginKey as f } from "@tiptap/pm/state";
|
|
3
3
|
//#region node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.mjs
|
|
4
4
|
var p = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", m = "ελ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", h = "numeric", g = "ascii", _ = "alpha", v = "asciinumeric", y = "alphanumeric", b = "domain", x = "emoji", ee = "scheme", S = "slashscheme", C = "whitespace";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./purify.es-
|
|
1
|
+
import { t as e } from "./purify.es-BES4pJF7.js";
|
|
2
2
|
//#region node_modules/.pnpm/turndown@7.2.4/node_modules/turndown/lib/turndown.browser.es.js
|
|
3
3
|
function t(e) {
|
|
4
4
|
for (var t = 1; t < arguments.length; t++) {
|
|
@@ -271,10 +271,10 @@ S.prototype = {
|
|
|
271
271
|
function C(e, t, n) {
|
|
272
272
|
for (var r = 0; r < e.length; r++) {
|
|
273
273
|
var i = e[r];
|
|
274
|
-
if (
|
|
274
|
+
if (ee(i, t, n)) return i;
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function ee(e, t, n) {
|
|
278
278
|
var r = e.filter;
|
|
279
279
|
if (typeof r == "string") {
|
|
280
280
|
if (r === t.nodeName.toLowerCase()) return !0;
|
|
@@ -284,48 +284,48 @@ function w(e, t, n) {
|
|
|
284
284
|
if (r.call(e, t, n)) return !0;
|
|
285
285
|
} else throw TypeError("`filter` needs to be a string, array, or function");
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function w(e) {
|
|
288
288
|
var t = e.element, n = e.isBlock, r = e.isVoid, i = e.isPre || function(e) {
|
|
289
289
|
return e.nodeName === "PRE";
|
|
290
290
|
};
|
|
291
291
|
if (!(!t.firstChild || i(t))) {
|
|
292
|
-
for (var a = null, o = !1, s = null, c =
|
|
292
|
+
for (var a = null, o = !1, s = null, c = E(s, t, i); c !== t;) {
|
|
293
293
|
if (c.nodeType === 3 || c.nodeType === 4) {
|
|
294
294
|
var l = c.data.replace(/[ \r\n\t]+/g, " ");
|
|
295
295
|
if ((!a || / $/.test(a.data)) && !o && l[0] === " " && (l = l.substr(1)), !l) {
|
|
296
|
-
c =
|
|
296
|
+
c = T(c);
|
|
297
297
|
continue;
|
|
298
298
|
}
|
|
299
299
|
c.data = l, a = c;
|
|
300
300
|
} else if (c.nodeType === 1) n(c) || c.nodeName === "BR" ? (a && (a.data = a.data.replace(/ $/, "")), a = null, o = !1) : r(c) || i(c) ? (a = null, o = !0) : a && (o = !1);
|
|
301
301
|
else {
|
|
302
|
-
c =
|
|
302
|
+
c = T(c);
|
|
303
303
|
continue;
|
|
304
304
|
}
|
|
305
|
-
var u =
|
|
305
|
+
var u = E(s, c, i);
|
|
306
306
|
s = c, c = u;
|
|
307
307
|
}
|
|
308
|
-
a && (a.data = a.data.replace(/ $/, ""), a.data ||
|
|
308
|
+
a && (a.data = a.data.replace(/ $/, ""), a.data || T(a));
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function T(e) {
|
|
312
312
|
var t = e.nextSibling || e.parentNode;
|
|
313
313
|
return e.parentNode.removeChild(e), t;
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function E(e, t, n) {
|
|
316
316
|
return e && e.parentNode === t || n(t) ? t.nextSibling || t.parentNode : t.firstChild || t.nextSibling || t.parentNode;
|
|
317
317
|
}
|
|
318
|
-
var
|
|
319
|
-
function
|
|
320
|
-
var e =
|
|
318
|
+
var D = typeof window < "u" ? window : {};
|
|
319
|
+
function O() {
|
|
320
|
+
var e = D.DOMParser, t = !1;
|
|
321
321
|
try {
|
|
322
322
|
new e().parseFromString("", "text/html") && (t = !0);
|
|
323
323
|
} catch {}
|
|
324
324
|
return t;
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function k() {
|
|
327
327
|
var e = function() {};
|
|
328
|
-
return
|
|
328
|
+
return A() ? e.prototype.parseFromString = function(e) {
|
|
329
329
|
var t = new window.ActiveXObject("htmlfile");
|
|
330
330
|
return t.designMode = "on", t.open(), t.write(e), t.close(), t;
|
|
331
331
|
} : e.prototype.parseFromString = function(e) {
|
|
@@ -333,50 +333,50 @@ function A() {
|
|
|
333
333
|
return t.open(), t.write(e), t.close(), t;
|
|
334
334
|
}, e;
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function A() {
|
|
337
337
|
var e = !1;
|
|
338
338
|
try {
|
|
339
339
|
document.implementation.createHTMLDocument("").open();
|
|
340
340
|
} catch {
|
|
341
|
-
|
|
341
|
+
D.ActiveXObject && (e = !0);
|
|
342
342
|
}
|
|
343
343
|
return e;
|
|
344
344
|
}
|
|
345
|
-
var
|
|
346
|
-
function
|
|
347
|
-
var n = typeof e == "string" ?
|
|
348
|
-
return
|
|
345
|
+
var te = O() ? D.DOMParser : k();
|
|
346
|
+
function ne(e, t) {
|
|
347
|
+
var n = typeof e == "string" ? re().parseFromString("<x-turndown id=\"turndown-root\">" + e + "</x-turndown>", "text/html").getElementById("turndown-root") : e.cloneNode(!0);
|
|
348
|
+
return w({
|
|
349
349
|
element: n,
|
|
350
350
|
isBlock: s,
|
|
351
351
|
isVoid: l,
|
|
352
|
-
isPre: t.preformattedCode ?
|
|
352
|
+
isPre: t.preformattedCode ? ie : null
|
|
353
353
|
}), n;
|
|
354
354
|
}
|
|
355
|
-
var
|
|
356
|
-
function
|
|
357
|
-
return
|
|
355
|
+
var j;
|
|
356
|
+
function re() {
|
|
357
|
+
return j ||= new te(), j;
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function ie(e) {
|
|
360
360
|
return e.nodeName === "PRE" || e.nodeName === "CODE";
|
|
361
361
|
}
|
|
362
|
-
function
|
|
363
|
-
return e.isBlock = s(e), e.isCode = e.nodeName === "CODE" || e.parentNode.isCode, e.isBlank =
|
|
362
|
+
function M(e, t) {
|
|
363
|
+
return e.isBlock = s(e), e.isCode = e.nodeName === "CODE" || e.parentNode.isCode, e.isBlank = N(e), e.flankingWhitespace = P(e, t), e;
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function N(e) {
|
|
366
366
|
return !l(e) && !f(e) && /^\s*$/i.test(e.textContent) && !u(e) && !p(e);
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function P(e, t) {
|
|
369
369
|
if (e.isBlock || t.preformattedCode && e.isCode) return {
|
|
370
370
|
leading: "",
|
|
371
371
|
trailing: ""
|
|
372
372
|
};
|
|
373
|
-
var n =
|
|
374
|
-
return n.leadingAscii &&
|
|
373
|
+
var n = F(e.textContent);
|
|
374
|
+
return n.leadingAscii && I("left", e, t) && (n.leading = n.leadingNonAscii), n.trailingAscii && I("right", e, t) && (n.trailing = n.trailingNonAscii), {
|
|
375
375
|
leading: n.leading,
|
|
376
376
|
trailing: n.trailing
|
|
377
377
|
};
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function F(e) {
|
|
380
380
|
var t = e.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);
|
|
381
381
|
return {
|
|
382
382
|
leading: t[1],
|
|
@@ -387,13 +387,13 @@ function B(e) {
|
|
|
387
387
|
trailingAscii: t[6]
|
|
388
388
|
};
|
|
389
389
|
}
|
|
390
|
-
function
|
|
390
|
+
function I(e, t, n) {
|
|
391
391
|
var r, i, a;
|
|
392
392
|
return e === "left" ? (r = t.previousSibling, i = / $/) : (r = t.nextSibling, i = /^ /), r && (r.nodeType === 3 ? a = i.test(r.nodeValue) : n.preformattedCode && r.nodeName === "CODE" ? a = !1 : r.nodeType === 1 && !s(r) && (a = i.test(r.textContent))), a;
|
|
393
393
|
}
|
|
394
|
-
var
|
|
395
|
-
function
|
|
396
|
-
if (!(this instanceof
|
|
394
|
+
var L = Array.prototype.reduce;
|
|
395
|
+
function R(e) {
|
|
396
|
+
if (!(this instanceof R)) return new R(e);
|
|
397
397
|
var n = {
|
|
398
398
|
rules: v,
|
|
399
399
|
headingStyle: "setext",
|
|
@@ -419,12 +419,12 @@ function U(e) {
|
|
|
419
419
|
};
|
|
420
420
|
this.options = t({}, n, e), this.rules = new S(this.options);
|
|
421
421
|
}
|
|
422
|
-
|
|
422
|
+
R.prototype = {
|
|
423
423
|
turndown: function(e) {
|
|
424
|
-
if (!
|
|
424
|
+
if (!U(e)) throw TypeError(e + " is not a string, or an element/document/fragment node.");
|
|
425
425
|
if (e === "") return "";
|
|
426
|
-
var t =
|
|
427
|
-
return
|
|
426
|
+
var t = z.call(this, new ne(e, this.options));
|
|
427
|
+
return B.call(this, t);
|
|
428
428
|
},
|
|
429
429
|
use: function(e) {
|
|
430
430
|
if (Array.isArray(e)) for (var t = 0; t < e.length; t++) this.use(e[t]);
|
|
@@ -445,35 +445,134 @@ U.prototype = {
|
|
|
445
445
|
return _(e);
|
|
446
446
|
}
|
|
447
447
|
};
|
|
448
|
-
function
|
|
448
|
+
function z(e) {
|
|
449
449
|
var t = this;
|
|
450
|
-
return
|
|
451
|
-
n = new
|
|
450
|
+
return L.call(e.childNodes, function(e, n) {
|
|
451
|
+
n = new M(n, t.options);
|
|
452
452
|
var r = "";
|
|
453
|
-
return n.nodeType === 3 ? r = n.isCode ? n.nodeValue : t.escape(n.nodeValue) : n.nodeType === 1 && (r =
|
|
453
|
+
return n.nodeType === 3 ? r = n.isCode ? n.nodeValue : t.escape(n.nodeValue) : n.nodeType === 1 && (r = V.call(t, n)), H(e, r);
|
|
454
454
|
}, "");
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function B(e) {
|
|
457
457
|
var t = this;
|
|
458
458
|
return this.rules.forEach(function(n) {
|
|
459
|
-
typeof n.append == "function" && (e =
|
|
459
|
+
typeof n.append == "function" && (e = H(e, n.append(t.options)));
|
|
460
460
|
}), e.replace(/^[\t\r\n]+/, "").replace(/[\t\r\n\s]+$/, "");
|
|
461
461
|
}
|
|
462
|
-
function
|
|
463
|
-
var t = this.rules.forNode(e), n =
|
|
462
|
+
function V(e) {
|
|
463
|
+
var t = this.rules.forNode(e), n = z.call(this, e), r = e.flankingWhitespace;
|
|
464
464
|
return (r.leading || r.trailing) && (n = n.trim()), r.leading + t.replacement(n, e, this.options) + r.trailing;
|
|
465
465
|
}
|
|
466
|
-
function
|
|
466
|
+
function H(e, t) {
|
|
467
467
|
var n = i(e), a = r(t), o = Math.max(e.length - n.length, t.length - a.length);
|
|
468
468
|
return n + "\n\n".substring(0, o) + a;
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function U(e) {
|
|
471
471
|
return e != null && (typeof e == "string" || e.nodeType && (e.nodeType === 1 || e.nodeType === 9 || e.nodeType === 11));
|
|
472
472
|
}
|
|
473
473
|
//#endregion
|
|
474
474
|
//#region lib/utils/html-to-markdown.ts
|
|
475
|
-
var
|
|
476
|
-
|
|
475
|
+
var W = "scribe-table-break", G = /* @__PURE__ */ new Set([
|
|
476
|
+
"info",
|
|
477
|
+
"tip",
|
|
478
|
+
"warning",
|
|
479
|
+
"caution"
|
|
480
|
+
]), K = [
|
|
481
|
+
"width",
|
|
482
|
+
"min-width",
|
|
483
|
+
"max-width",
|
|
484
|
+
"text-align"
|
|
485
|
+
], q = (/* @__PURE__ */ "address.article.aside.blockquote.details.dialog.dd.div.dl.dt.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hr.li.main.menu.nav.ol.p.pre.section.summary.table.ul".split(".")).join(","), ae = /* @__PURE__ */ new Set([
|
|
486
|
+
"A",
|
|
487
|
+
"B",
|
|
488
|
+
"BR",
|
|
489
|
+
"CODE",
|
|
490
|
+
"DEL",
|
|
491
|
+
"EM",
|
|
492
|
+
"I",
|
|
493
|
+
"IMG",
|
|
494
|
+
"S",
|
|
495
|
+
"STRONG"
|
|
496
|
+
]), J = (e) => ae.has(e.tagName) || e.tagName === "SPAN" && e.getAttribute("data-type") === "latex", Y = (e) => J(e) && Array.from(e.querySelectorAll("*")).every(J), X = (e) => e.nodeType !== Node.TEXT_NODE || !!e.textContent?.trim(), oe = (e) => {
|
|
497
|
+
let t = Array.from(e.childNodes).filter(X);
|
|
498
|
+
return t.length === 0 ? !0 : t.length === 1 && t[0] instanceof HTMLParagraphElement ? !t[0].querySelector(q) && Array.from(t[0].children).every(Y) : t.every((e) => !(e instanceof Element) && e.nodeType === Node.TEXT_NODE || e instanceof Element && !e.matches(q) && !e.querySelector(q) && Y(e));
|
|
499
|
+
}, se = (e) => e.hasAttribute("width") || /(?:^|;)\s*width\s*:/i.test(e.getAttribute("style") ?? "") ? !0 : Array.from(e.querySelectorAll("th, td, col")).some((e) => !!(e.hasAttribute("colwidth") || e.hasAttribute("width") || /(?:^|;)\s*width\s*:/i.test(e.getAttribute("style") ?? ""))), ce = (e) => {
|
|
500
|
+
let t = e.style.textAlign.trim().toLowerCase(), n = (e.getAttribute("align") ?? "").trim().toLowerCase();
|
|
501
|
+
if (t && n && t !== n) return;
|
|
502
|
+
let r = t || n;
|
|
503
|
+
if (!r) return null;
|
|
504
|
+
if (r === "left" || r === "center" || r === "right") return r;
|
|
505
|
+
}, le = (e) => {
|
|
506
|
+
if (e.caption || e.tFoot || se(e)) return null;
|
|
507
|
+
let t = Array.from(e.rows), n = t[0]?.cells.length ?? 0;
|
|
508
|
+
if (t.length === 0 || n === 0) return null;
|
|
509
|
+
let r = t.map((e) => Array.from(e.cells));
|
|
510
|
+
if (r.some((t, r) => t.length !== n || t.some((t) => t.closest("table") !== e || t.colSpan !== 1 || t.rowSpan !== 1 || !oe(t) || (r === 0 ? t.tagName !== "TH" : t.tagName !== "TD")))) return null;
|
|
511
|
+
let i = r[0].map((e, t) => {
|
|
512
|
+
let n = r.map((e) => ce(e[t])), i = n[0];
|
|
513
|
+
if (!(i === void 0 || n.some((e) => e !== i))) return i;
|
|
514
|
+
});
|
|
515
|
+
return i.some((e) => e === void 0) ? null : {
|
|
516
|
+
rows: r,
|
|
517
|
+
alignments: i
|
|
518
|
+
};
|
|
519
|
+
}, ue = (e, t) => {
|
|
520
|
+
let n = Array.from(t.childNodes).filter(X), r = (n.length === 1 && n[0] instanceof HTMLParagraphElement ? n[0] : t).cloneNode(!0);
|
|
521
|
+
r.querySelectorAll("br").forEach((e) => {
|
|
522
|
+
e.replaceWith(e.ownerDocument.createTextNode(W));
|
|
523
|
+
});
|
|
524
|
+
let i = e.turndown(r.innerHTML).split(W).join("<br>").split("|").join("\\|").trim();
|
|
525
|
+
return /[\r\n]/.test(i) ? null : i;
|
|
526
|
+
}, Z = (e) => {
|
|
527
|
+
let t = e.cloneNode(!0);
|
|
528
|
+
return t.querySelectorAll("span[data-type=\"latex\"]").forEach((e) => {
|
|
529
|
+
e.textContent === "•" && (e.textContent = "");
|
|
530
|
+
}), $(t), t.outerHTML;
|
|
531
|
+
}, Q = (e) => {
|
|
532
|
+
let t = e?.trim().toLowerCase();
|
|
533
|
+
return t && G.has(t) ? t : "info";
|
|
534
|
+
}, de = (e) => {
|
|
535
|
+
let t = Q(e.getAttribute("data-variant"));
|
|
536
|
+
Array.from(e.attributes).forEach((t) => {
|
|
537
|
+
t.name !== "data-type" && t.name !== "data-variant" && t.name !== "role" && e.removeAttribute(t.name);
|
|
538
|
+
}), e.setAttribute("data-type", "callout"), e.setAttribute("data-variant", t), e.setAttribute("role", "note");
|
|
539
|
+
}, fe = (e) => {
|
|
540
|
+
let t = e.matches("table, col, th, td") ? K.map((t) => [t, e.style.getPropertyValue(t)]).filter(([, e]) => !!e) : [];
|
|
541
|
+
e.removeAttribute("style"), t.forEach(([t, n]) => {
|
|
542
|
+
e.style.setProperty(t, n);
|
|
543
|
+
});
|
|
544
|
+
}, $ = (e) => {
|
|
545
|
+
[...e.matches("aside[data-type=\"callout\"]") ? [e] : [], ...Array.from(e.querySelectorAll("aside[data-type=\"callout\"]"))].forEach((e) => {
|
|
546
|
+
[e, ...Array.from(e.querySelectorAll("*"))].forEach((e) => {
|
|
547
|
+
fe(e), Array.from(e.attributes).forEach((t) => {
|
|
548
|
+
t.name.toLowerCase().startsWith("on") && e.removeAttribute(t.name);
|
|
549
|
+
});
|
|
550
|
+
}), de(e);
|
|
551
|
+
});
|
|
552
|
+
}, pe = (e) => {
|
|
553
|
+
let t = e.cloneNode(!0);
|
|
554
|
+
return t.querySelectorAll("span[data-type=\"latex\"]").forEach((e) => {
|
|
555
|
+
e.textContent === "•" && (e.textContent = "");
|
|
556
|
+
}), $(t), t.outerHTML;
|
|
557
|
+
}, me = (e) => {
|
|
558
|
+
e.addRule("scribeCallout", {
|
|
559
|
+
filter: (e) => e.nodeName === "ASIDE" && e.getAttribute("data-type") === "callout",
|
|
560
|
+
replacement: (e, t) => `\n\n${pe(t)}\n\n`
|
|
561
|
+
});
|
|
562
|
+
}, he = (e) => {
|
|
563
|
+
e.addRule("scribeTable", {
|
|
564
|
+
filter: "table",
|
|
565
|
+
replacement: (t, n) => {
|
|
566
|
+
let r = n, i = le(r);
|
|
567
|
+
if (!i) return `\n\n${Z(r)}\n\n`;
|
|
568
|
+
let { rows: a, alignments: o } = i, s = a.map((t) => t.map((t) => ue(e, t)));
|
|
569
|
+
if (s.some((e) => e.some((e) => e === null))) return `\n\n${Z(r)}\n\n`;
|
|
570
|
+
let c = s.map((e) => `| ${e.join(" | ")} |`), l = `| ${o.map((e) => e === "left" ? ":---" : e === "center" ? ":---:" : e === "right" ? "---:" : "---").join(" | ")} |`;
|
|
571
|
+
return c.splice(1, 0, l), `\n\n${c.join("\n")}\n\n`;
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
}, ge = (t) => {
|
|
575
|
+
let n = new R({
|
|
477
576
|
headingStyle: "atx",
|
|
478
577
|
hr: "---",
|
|
479
578
|
bulletListMarker: "-",
|
|
@@ -492,7 +591,7 @@ var Y = (t) => {
|
|
|
492
591
|
replacement: function(e) {
|
|
493
592
|
return "~~" + e + "~~";
|
|
494
593
|
}
|
|
495
|
-
}), n.turndown(e.sanitize(((e) => e.replace(/<span([^>]+data-type="latex"[^>]*)><\/span>/g, "<span$1>•</span>"))(t)));
|
|
594
|
+
}), me(n), he(n), n.turndown(e.sanitize(((e) => e.replace(/<span([^>]+data-type="latex"[^>]*)><\/span>/g, "<span$1>•</span>"))(t), { ADD_ATTR: ["colwidth"] }));
|
|
496
595
|
};
|
|
497
596
|
//#endregion
|
|
498
|
-
export {
|
|
597
|
+
export { ge as t };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
import type { CalloutVariant } from "../components/Scribe/extension/callout";
|
|
3
|
+
export interface CalloutIconProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
variant: CalloutVariant;
|
|
6
|
+
}
|
|
7
|
+
export declare const CalloutIcon: FC<CalloutIconProps>;
|
|
8
|
+
export declare const RemoveCalloutIcon: FC;
|
|
9
|
+
//# sourceMappingURL=CalloutIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalloutIcon.d.ts","sourceRoot":"","sources":["../../lib/icons/CalloutIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAE7E,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA0D5C,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,EAiB/B,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
//#region lib/icons/CalloutIcon.tsx
|
|
3
|
+
var n = ({ className: n = "scribe-callout-icon", variant: r }) => {
|
|
4
|
+
let i = {
|
|
5
|
+
"aria-hidden": !0,
|
|
6
|
+
className: n,
|
|
7
|
+
fill: "none",
|
|
8
|
+
height: 18,
|
|
9
|
+
viewBox: "0 0 20 20",
|
|
10
|
+
width: 18
|
|
11
|
+
}, a = {
|
|
12
|
+
stroke: "currentColor",
|
|
13
|
+
strokeLinecap: "round",
|
|
14
|
+
strokeLinejoin: "round",
|
|
15
|
+
strokeWidth: 1.5
|
|
16
|
+
};
|
|
17
|
+
return r === "tip" ? /* @__PURE__ */ t("svg", {
|
|
18
|
+
...i,
|
|
19
|
+
children: [/* @__PURE__ */ e("path", {
|
|
20
|
+
d: "M6.5 12.1a5 5 0 1 1 7 0c-.8.75-1.2 1.4-1.2 2.15H7.7c0-.75-.4-1.4-1.2-2.15Z",
|
|
21
|
+
...a
|
|
22
|
+
}), /* @__PURE__ */ e("path", {
|
|
23
|
+
d: "M7.9 16.6h4.2M8.8 14.25v2.35M11.2 14.25v2.35",
|
|
24
|
+
...a
|
|
25
|
+
})]
|
|
26
|
+
}) : r === "warning" ? /* @__PURE__ */ t("svg", {
|
|
27
|
+
...i,
|
|
28
|
+
children: [/* @__PURE__ */ e("path", {
|
|
29
|
+
d: "M9.1 3.6 2.3 15.4a1.05 1.05 0 0 0 .9 1.55h13.6a1.05 1.05 0 0 0 .9-1.55L10.9 3.6a1.04 1.04 0 0 0-1.8 0Z",
|
|
30
|
+
...a
|
|
31
|
+
}), /* @__PURE__ */ e("path", {
|
|
32
|
+
d: "M10 7.6v4.45M10 14.65v.05",
|
|
33
|
+
...a
|
|
34
|
+
})]
|
|
35
|
+
}) : r === "caution" ? /* @__PURE__ */ t("svg", {
|
|
36
|
+
...i,
|
|
37
|
+
children: [/* @__PURE__ */ e("path", {
|
|
38
|
+
d: "m6.45 2.75-3.7 3.7v7.1l3.7 3.7h7.1l3.7-3.7v-7.1l-3.7-3.7h-7.1Z",
|
|
39
|
+
...a
|
|
40
|
+
}), /* @__PURE__ */ e("path", {
|
|
41
|
+
d: "M10 6.2v5.65M10 14.45v.05",
|
|
42
|
+
...a
|
|
43
|
+
})]
|
|
44
|
+
}) : /* @__PURE__ */ t("svg", {
|
|
45
|
+
...i,
|
|
46
|
+
children: [/* @__PURE__ */ e("circle", {
|
|
47
|
+
cx: "10",
|
|
48
|
+
cy: "10",
|
|
49
|
+
r: "7.25",
|
|
50
|
+
...a
|
|
51
|
+
}), /* @__PURE__ */ e("path", {
|
|
52
|
+
d: "M10 8.5v5M10 5.65v.05",
|
|
53
|
+
...a
|
|
54
|
+
})]
|
|
55
|
+
});
|
|
56
|
+
}, r = () => /* @__PURE__ */ e("svg", {
|
|
57
|
+
"aria-hidden": "true",
|
|
58
|
+
className: "scribe-callout-icon",
|
|
59
|
+
fill: "none",
|
|
60
|
+
height: "18",
|
|
61
|
+
viewBox: "0 0 20 20",
|
|
62
|
+
width: "18",
|
|
63
|
+
children: /* @__PURE__ */ e("path", {
|
|
64
|
+
d: "M7.25 4.5h7.25M7.25 8.5h7.25M7.25 12.5h4.5M5.25 15.5l-2.5-2.5 2.5-2.5M2.75 13h4",
|
|
65
|
+
stroke: "currentColor",
|
|
66
|
+
strokeLinecap: "round",
|
|
67
|
+
strokeLinejoin: "round",
|
|
68
|
+
strokeWidth: "1.5"
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
//#endregion
|
|
72
|
+
export { n as CalloutIcon, r as RemoveCalloutIcon };
|
package/dist/main.css
CHANGED
|
@@ -120,6 +120,103 @@
|
|
|
120
120
|
padding-left: 1rem;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
.scribe-content .tiptap [data-type="callout"] {
|
|
124
|
+
--scribe-callout-background: var(--blue-2);
|
|
125
|
+
--scribe-callout-border: var(--blue-6);
|
|
126
|
+
--scribe-callout-icon: var(--blue-11);
|
|
127
|
+
--scribe-callout-label: var(--blue-12);
|
|
128
|
+
|
|
129
|
+
background: var(--scribe-callout-background);
|
|
130
|
+
border: 1px solid var(--scribe-callout-border);
|
|
131
|
+
border-radius: 10px;
|
|
132
|
+
box-sizing: border-box;
|
|
133
|
+
color: var(--gray-12);
|
|
134
|
+
margin: 0 0 1rem;
|
|
135
|
+
padding: 12px 14px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.scribe-content .tiptap [data-type="callout"][data-variant="tip"] {
|
|
139
|
+
--scribe-callout-background: var(--green-2);
|
|
140
|
+
--scribe-callout-border: var(--green-6);
|
|
141
|
+
--scribe-callout-icon: var(--green-11);
|
|
142
|
+
--scribe-callout-label: var(--green-12);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.scribe-content .tiptap [data-type="callout"][data-variant="warning"] {
|
|
146
|
+
--scribe-callout-background: var(--amber-2);
|
|
147
|
+
--scribe-callout-border: var(--amber-6);
|
|
148
|
+
--scribe-callout-icon: var(--amber-11);
|
|
149
|
+
--scribe-callout-label: var(--amber-12);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.scribe-content .tiptap [data-type="callout"][data-variant="caution"] {
|
|
153
|
+
--scribe-callout-background: var(--red-2);
|
|
154
|
+
--scribe-callout-border: var(--red-6);
|
|
155
|
+
--scribe-callout-icon: var(--red-11);
|
|
156
|
+
--scribe-callout-label: var(--red-12);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.scribe-content .tiptap [data-callout-header] {
|
|
160
|
+
align-items: center;
|
|
161
|
+
color: var(--scribe-callout-label);
|
|
162
|
+
display: flex;
|
|
163
|
+
font-size: 0.875rem;
|
|
164
|
+
font-weight: 600;
|
|
165
|
+
gap: 8px;
|
|
166
|
+
line-height: 1.25rem;
|
|
167
|
+
margin-bottom: 6px;
|
|
168
|
+
user-select: none;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.scribe-content .tiptap [data-callout-icon] {
|
|
172
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='10' r='7.25'/%3E%3Cpath d='M10 8.5v5M10 5.65v.05'/%3E%3C/svg%3E");
|
|
173
|
+
-webkit-mask-position: center;
|
|
174
|
+
-webkit-mask-repeat: no-repeat;
|
|
175
|
+
-webkit-mask-size: contain;
|
|
176
|
+
background: var(--scribe-callout-icon);
|
|
177
|
+
display: inline-block;
|
|
178
|
+
flex: 0 0 18px;
|
|
179
|
+
height: 18px;
|
|
180
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='10' r='7.25'/%3E%3Cpath d='M10 8.5v5M10 5.65v.05'/%3E%3C/svg%3E");
|
|
181
|
+
mask-position: center;
|
|
182
|
+
mask-repeat: no-repeat;
|
|
183
|
+
mask-size: contain;
|
|
184
|
+
width: 18px;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.scribe-content .tiptap [data-type="callout"][data-variant="tip"] [data-callout-icon] {
|
|
188
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 12.1a5 5 0 1 1 7 0c-.8.75-1.2 1.4-1.2 2.15H7.7c0-.75-.4-1.4-1.2-2.15Z'/%3E%3Cpath d='M7.9 16.6h4.2M8.8 14.25v2.35M11.2 14.25v2.35'/%3E%3C/svg%3E");
|
|
189
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 12.1a5 5 0 1 1 7 0c-.8.75-1.2 1.4-1.2 2.15H7.7c0-.75-.4-1.4-1.2-2.15Z'/%3E%3Cpath d='M7.9 16.6h4.2M8.8 14.25v2.35M11.2 14.25v2.35'/%3E%3C/svg%3E");
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.scribe-content .tiptap [data-type="callout"][data-variant="warning"] [data-callout-icon] {
|
|
193
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.1 3.6 2.3 15.4a1.05 1.05 0 0 0 .9 1.55h13.6a1.05 1.05 0 0 0 .9-1.55L10.9 3.6a1.04 1.04 0 0 0-1.8 0Z'/%3E%3Cpath d='M10 7.6v4.45M10 14.65v.05'/%3E%3C/svg%3E");
|
|
194
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.1 3.6 2.3 15.4a1.05 1.05 0 0 0 .9 1.55h13.6a1.05 1.05 0 0 0 .9-1.55L10.9 3.6a1.04 1.04 0 0 0-1.8 0Z'/%3E%3Cpath d='M10 7.6v4.45M10 14.65v.05'/%3E%3C/svg%3E");
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.scribe-content .tiptap [data-type="callout"][data-variant="caution"] [data-callout-icon] {
|
|
198
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.45 2.75-3.7 3.7v7.1l3.7 3.7h7.1l3.7-3.7v-7.1l-3.7-3.7h-7.1Z'/%3E%3Cpath d='M10 6.2v5.65M10 14.45v.05'/%3E%3C/svg%3E");
|
|
199
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.45 2.75-3.7 3.7v7.1l3.7 3.7h7.1l3.7-3.7v-7.1l-3.7-3.7h-7.1Z'/%3E%3Cpath d='M10 6.2v5.65M10 14.45v.05'/%3E%3C/svg%3E");
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.scribe-content .tiptap [data-callout-content] {
|
|
203
|
+
color: var(--gray-12);
|
|
204
|
+
min-width: 0;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.scribe-content .tiptap [data-callout-content] > *:first-child {
|
|
208
|
+
margin-top: 0;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.scribe-content .tiptap [data-callout-content] > *:last-child {
|
|
212
|
+
margin-bottom: 0;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.scribe-content .tiptap [data-type="callout"].ProseMirror-selectednode {
|
|
216
|
+
outline: 2px solid var(--accent-8);
|
|
217
|
+
outline-offset: 2px;
|
|
218
|
+
}
|
|
219
|
+
|
|
123
220
|
.scribe-content .tiptap code {
|
|
124
221
|
background: var(--gray-a3);
|
|
125
222
|
border-radius: 6px;
|
|
@@ -151,10 +248,24 @@
|
|
|
151
248
|
width: 100%;
|
|
152
249
|
}
|
|
153
250
|
|
|
251
|
+
.scribe-content .tiptap .tableWrapper {
|
|
252
|
+
margin: 0 0 1rem;
|
|
253
|
+
max-width: 100%;
|
|
254
|
+
overflow-x: auto;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.scribe-content .tiptap .tableWrapper table {
|
|
258
|
+
margin: 0;
|
|
259
|
+
min-width: 100%;
|
|
260
|
+
}
|
|
261
|
+
|
|
154
262
|
.scribe-content .tiptap th,
|
|
155
263
|
.scribe-content .tiptap td {
|
|
156
264
|
border: 1px solid var(--gray-6);
|
|
265
|
+
box-sizing: border-box;
|
|
266
|
+
min-width: 1em;
|
|
157
267
|
padding: 0.6rem 0.75rem;
|
|
268
|
+
position: relative;
|
|
158
269
|
text-align: left;
|
|
159
270
|
vertical-align: top;
|
|
160
271
|
}
|
|
@@ -164,6 +275,33 @@
|
|
|
164
275
|
font-weight: 600;
|
|
165
276
|
}
|
|
166
277
|
|
|
278
|
+
.scribe-content .tiptap .selectedCell::after {
|
|
279
|
+
background: var(--accent-a3);
|
|
280
|
+
bottom: 0;
|
|
281
|
+
content: "";
|
|
282
|
+
left: 0;
|
|
283
|
+
pointer-events: none;
|
|
284
|
+
position: absolute;
|
|
285
|
+
right: 0;
|
|
286
|
+
top: 0;
|
|
287
|
+
z-index: 2;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.scribe-content .tiptap .column-resize-handle {
|
|
291
|
+
background-color: var(--accent-9);
|
|
292
|
+
bottom: -2px;
|
|
293
|
+
pointer-events: none;
|
|
294
|
+
position: absolute;
|
|
295
|
+
right: -2px;
|
|
296
|
+
top: 0;
|
|
297
|
+
width: 4px;
|
|
298
|
+
z-index: 3;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.scribe-content .tiptap.resize-cursor {
|
|
302
|
+
cursor: col-resize;
|
|
303
|
+
}
|
|
304
|
+
|
|
167
305
|
.scribe-content .tiptap img {
|
|
168
306
|
display: block;
|
|
169
307
|
max-width: 100%;
|
|
@@ -182,7 +320,9 @@
|
|
|
182
320
|
width: 1em;
|
|
183
321
|
}
|
|
184
322
|
|
|
185
|
-
.scribe-bubble-menu
|
|
323
|
+
.scribe-bubble-menu,
|
|
324
|
+
.scribe-table-bubble-menu,
|
|
325
|
+
.scribe-callout-bubble-menu {
|
|
186
326
|
background: var(--color-panel-solid);
|
|
187
327
|
border: 1px solid var(--gray-6);
|
|
188
328
|
border-radius: 12px;
|
|
@@ -192,6 +332,35 @@
|
|
|
192
332
|
padding: 8px;
|
|
193
333
|
}
|
|
194
334
|
|
|
335
|
+
.scribe-table-bubble-menu {
|
|
336
|
+
max-width: calc(100vw - 16px);
|
|
337
|
+
overflow-x: auto;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.scribe-callout-bubble-menu {
|
|
341
|
+
max-width: calc(100vw - 16px);
|
|
342
|
+
width: max-content;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.scribe-callout-type-button {
|
|
346
|
+
flex-shrink: 0;
|
|
347
|
+
white-space: nowrap;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.scribe-callout-menu-separator {
|
|
351
|
+
height: 20px;
|
|
352
|
+
margin: 0 2px;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.scribe-callout-icon {
|
|
356
|
+
display: block;
|
|
357
|
+
flex: 0 0 auto;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.scribe-table-bubble-menu > * {
|
|
361
|
+
flex-shrink: 0;
|
|
362
|
+
}
|
|
363
|
+
|
|
195
364
|
.scribe-link-popover {
|
|
196
365
|
background: var(--color-panel-solid);
|
|
197
366
|
border: 1px solid var(--gray-6);
|
package/dist/main.d.ts
CHANGED
package/dist/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../lib/main.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC;AACxB,YAAY,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../lib/main.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,uCAAuC,CAAC;AACtD,cAAc,SAAS,CAAC;AACxB,YAAY,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC"}
|