@haklex/rich-editor 0.0.79 → 0.0.81
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/AlertQuoteEditNode-BDoonB4u.js +267 -0
- package/dist/KaTeXRenderer-BsyRH5_t.js +214 -0
- package/dist/LinkCardRenderer-OEMBDUhD.js +45 -0
- package/dist/MermaidPlugin-Df2Cm2yX.js +67 -0
- package/dist/PresentDialogContext-DQw6MrNh.js +59 -0
- package/dist/RubyRenderer-BpDb_amz.js +14 -0
- package/dist/SubmitShortcutPlugin-6IvsbZD-.js +1463 -0
- package/dist/commands-entry.mjs +14 -23
- package/dist/config-tfg1FWhG.js +1149 -0
- package/dist/favicon-DIWusrrw.js +41 -0
- package/dist/index.mjs +259 -284
- package/dist/node-registry-CeVi2y9f.js +666 -0
- package/dist/nodes-entry.mjs +7 -47
- package/dist/plugins-entry.mjs +10 -27
- package/dist/renderers-entry.mjs +40 -57
- package/dist/rich-editor.css +2 -1
- package/dist/shared.css-wgGgtK_e.js +23 -0
- package/dist/static-entry.mjs +16 -45
- package/dist/styles-entry.mjs +3 -12
- package/dist/theme-DHOUKKSr.js +1034 -0
- package/package.json +4 -4
- package/dist/AlertQuoteEditNode-CHdvQnOr.js +0 -293
- package/dist/KaTeXRenderer-C8jv_5xr.js +0 -214
- package/dist/LinkCardRenderer-QmkOlyXb.js +0 -36
- package/dist/MermaidPlugin-DjLUVZvB.js +0 -97
- package/dist/PresentDialogContext-BpSB8tXC.js +0 -52
- package/dist/RubyRenderer-DbeobSoH.js +0 -13
- package/dist/SubmitShortcutPlugin-BFBAwTb1.js +0 -1627
- package/dist/config-DcR_yktp.js +0 -1236
- package/dist/favicon-BQgbXF_a.js +0 -43
- package/dist/node-registry-B2U2_LrI.js +0 -766
- package/dist/shared.css-DNuMYx6Q.js +0 -21
- package/dist/theme-CYsyGmCL.js +0 -1040
package/dist/favicon-BQgbXF_a.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
const FAVICON_VARIANTS = [
|
|
2
|
-
"/favicon.ico",
|
|
3
|
-
"/favicon.png",
|
|
4
|
-
"/favicon.svg",
|
|
5
|
-
"/apple-touch-icon.png",
|
|
6
|
-
"/apple-touch-icon-precomposed.png"
|
|
7
|
-
];
|
|
8
|
-
const faviconCache = /* @__PURE__ */ new Map();
|
|
9
|
-
function getHostname(href) {
|
|
10
|
-
try {
|
|
11
|
-
const url = new URL(href);
|
|
12
|
-
if (url.protocol !== "http:" && url.protocol !== "https:") return null;
|
|
13
|
-
return url.hostname;
|
|
14
|
-
} catch {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
function probeImage(url) {
|
|
19
|
-
return new Promise((resolve) => {
|
|
20
|
-
const img = new Image();
|
|
21
|
-
img.onload = () => resolve(url);
|
|
22
|
-
img.onerror = () => resolve(null);
|
|
23
|
-
img.src = url;
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
async function probeFavicon(hostname) {
|
|
27
|
-
const cached = faviconCache.get(hostname);
|
|
28
|
-
if (cached !== void 0) return cached;
|
|
29
|
-
for (const variant of FAVICON_VARIANTS) {
|
|
30
|
-
const url = `https://${hostname}${variant}`;
|
|
31
|
-
const result = await probeImage(url);
|
|
32
|
-
if (result) {
|
|
33
|
-
faviconCache.set(hostname, result);
|
|
34
|
-
return result;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
faviconCache.set(hostname, null);
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
export {
|
|
41
|
-
getHostname as g,
|
|
42
|
-
probeFavicon as p
|
|
43
|
-
};
|