@haklex/rich-ext-embed 0.51.1 → 0.52.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/dist/{EmbedLinkRenderer-DPrf4xJz.js → EmbedLinkRenderer-UWcO3Rut.js} +9 -18
- package/dist/index.mjs +1 -1
- package/dist/renderers/EmbedStaticRenderer.d.ts.map +1 -1
- package/dist/rich-ext-embed.css +1 -1
- package/dist/static.mjs +1 -1
- package/dist/styles-static.css.d.ts +2 -2
- package/dist/styles-static.css.d.ts.map +1 -1
- package/package.json +5 -12
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { $getNodeByKey, DecoratorNode } from "lexical";
|
|
2
2
|
import { Component, Suspense, createContext, createElement, lazy, use, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { useColorScheme } from "@haklex/rich-editor/static";
|
|
4
|
+
import { ActionBar, ActionButton, highlightCode } from "@haklex/rich-editor-ui";
|
|
4
5
|
import { SiGithub } from "@icons-pack/react-simple-icons";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { ExternalLink, Trash2 } from "lucide-react";
|
|
7
|
-
import { ActionBar, ActionButton } from "@haklex/rich-editor-ui";
|
|
8
8
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
9
9
|
//#region src/styles.css.ts
|
|
10
10
|
var semanticClassNames$1 = {
|
|
@@ -76,7 +76,7 @@ var semanticClassNames = {
|
|
|
76
76
|
githubFileCodeLong: "embed-static-github-file__code--long",
|
|
77
77
|
githubFileLine: "embed-static-github-file__line",
|
|
78
78
|
githubFileLineNum: "embed-static-github-file__line-num",
|
|
79
|
-
|
|
79
|
+
code: "embed-static-code",
|
|
80
80
|
fallback: "embed-static-fallback",
|
|
81
81
|
fallbackGeneric: "embed-static-fallback--generic",
|
|
82
82
|
fallbackTweet: "embed-static-fallback--tweet",
|
|
@@ -117,7 +117,7 @@ var githubFileCode = "_1xclnej8";
|
|
|
117
117
|
var githubFileCodeLong = "_1xclnej9";
|
|
118
118
|
var githubFileLine = "_1xclneja";
|
|
119
119
|
var githubFileLineNum = "_1xclnejb";
|
|
120
|
-
var
|
|
120
|
+
var code = "_1xclnejc";
|
|
121
121
|
var fallback = "_1xclnejd";
|
|
122
122
|
var fallbackType = {
|
|
123
123
|
generic: "_1xclneje",
|
|
@@ -266,7 +266,6 @@ function getLangFromPath(path) {
|
|
|
266
266
|
if (dot === -1) return "text";
|
|
267
267
|
return extToLang[path.slice(dot).toLowerCase()] || "text";
|
|
268
268
|
}
|
|
269
|
-
var shikiPromise = import("shiki/bundle/full").catch(() => null);
|
|
270
269
|
var typeLabels$1 = {
|
|
271
270
|
"tweet": "X / Twitter",
|
|
272
271
|
"youtube": "YouTube",
|
|
@@ -361,7 +360,7 @@ function TweetRenderer({ url }) {
|
|
|
361
360
|
});
|
|
362
361
|
}
|
|
363
362
|
function GithubFileEmbed({ url, href }) {
|
|
364
|
-
const
|
|
363
|
+
const highlightScheme = useColorScheme() === "dark" ? "dark" : "light";
|
|
365
364
|
const [, owner, repo, , ...rest] = url.pathname.split("/");
|
|
366
365
|
const ref = rest[0];
|
|
367
366
|
const path = ref ? rest.slice(1).join("/") : rest.join("/");
|
|
@@ -388,24 +387,16 @@ function GithubFileEmbed({ url, href }) {
|
|
|
388
387
|
setHighlightedHtml(null);
|
|
389
388
|
setLoading(true);
|
|
390
389
|
setError(false);
|
|
391
|
-
|
|
390
|
+
fetch(`https://cdn.jsdelivr.net/gh/${owner}/${repo}${ref ? `@${ref}` : ""}/${path}`).then((res) => {
|
|
392
391
|
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
393
392
|
return res.text();
|
|
394
|
-
})
|
|
395
|
-
Promise.all([fetchPromise, shikiPromise]).then(([text, shikiMod]) => {
|
|
393
|
+
}).then((text) => {
|
|
396
394
|
if (cancelled) return;
|
|
397
395
|
setContent(text);
|
|
398
396
|
const lines = text.split("\n");
|
|
399
397
|
const end = endLine ?? lines.length;
|
|
400
398
|
const displayCode = lines.slice(startLine, end).join("\n");
|
|
401
|
-
|
|
402
|
-
setLoading(false);
|
|
403
|
-
return;
|
|
404
|
-
}
|
|
405
|
-
shikiMod.codeToHtml(displayCode, {
|
|
406
|
-
lang,
|
|
407
|
-
theme: shikiTheme
|
|
408
|
-
}).then((html) => {
|
|
399
|
+
highlightCode(displayCode, lang, highlightScheme).then((html) => {
|
|
409
400
|
if (!cancelled) {
|
|
410
401
|
setHighlightedHtml(html);
|
|
411
402
|
setLoading(false);
|
|
@@ -430,7 +421,7 @@ function GithubFileEmbed({ url, href }) {
|
|
|
430
421
|
lang,
|
|
431
422
|
startLine,
|
|
432
423
|
endLine,
|
|
433
|
-
|
|
424
|
+
highlightScheme
|
|
434
425
|
]);
|
|
435
426
|
if (loading$1) return /* @__PURE__ */ jsx("div", {
|
|
436
427
|
className: `${loading} ${semanticClassNames.loading}`,
|
|
@@ -448,7 +439,7 @@ function GithubFileEmbed({ url, href }) {
|
|
|
448
439
|
children: [/* @__PURE__ */ jsx("div", {
|
|
449
440
|
className: `${githubFileCode} ${semanticClassNames.githubFileCode} ${isLong ? `${githubFileCodeLong} ${semanticClassNames.githubFileCodeLong}` : ""}`.trim(),
|
|
450
441
|
children: highlightedHtml ? /* @__PURE__ */ jsx("div", {
|
|
451
|
-
className: `${
|
|
442
|
+
className: `${code} ${semanticClassNames.code}`,
|
|
452
443
|
dangerouslySetInnerHTML: { __html: highlightedHtml },
|
|
453
444
|
style: { "--start-line": startLine }
|
|
454
445
|
}) : /* @__PURE__ */ jsx("pre", { children: /* @__PURE__ */ jsx("code", { children: lines.slice(startLine, end).map((line, i) => /* @__PURE__ */ jsxs("span", {
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as EmbedRendererProvider, a as EmbedStaticRenderer, c as isAppleMusicUrl, d as isGistUrl, f as isGithubFilePreviewUrl, g as matchEmbedUrl, h as isYoutubeUrl, i as EmbedNode, l as isBilibiliVideoUrl, m as isTweetUrl, n as $createEmbedNode, o as _defineProperty, p as isSpotifyUrl, r as $isEmbedNode, s as createSelfThinkingMatcher, t as EmbedLinkRenderer, u as isCodesandboxUrl, v as useEmbedRenderers } from "./EmbedLinkRenderer-
|
|
1
|
+
import { _ as EmbedRendererProvider, a as EmbedStaticRenderer, c as isAppleMusicUrl, d as isGistUrl, f as isGithubFilePreviewUrl, g as matchEmbedUrl, h as isYoutubeUrl, i as EmbedNode, l as isBilibiliVideoUrl, m as isTweetUrl, n as $createEmbedNode, o as _defineProperty, p as isSpotifyUrl, r as $isEmbedNode, s as createSelfThinkingMatcher, t as EmbedLinkRenderer, u as isCodesandboxUrl, v as useEmbedRenderers } from "./EmbedLinkRenderer-UWcO3Rut.js";
|
|
2
2
|
import { $insertNodes, COMMAND_PRIORITY_LOW, PASTE_COMMAND, createCommand } from "lexical";
|
|
3
3
|
import { createElement, useEffect, useMemo } from "react";
|
|
4
4
|
import { Code } from "lucide-react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmbedStaticRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/EmbedStaticRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"EmbedStaticRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/EmbedStaticRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAUvB,OAAO,EAAE,KAAK,SAAS,EAAuB,MAAM,iBAAiB,CAAC;AAoDtE,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;CACb;AA+PD,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,wBAAwB,sCAmI1E"}
|
package/dist/rich-ext-embed.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
:root{--rc-text:#171717;--rc-text-secondary:#404040;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#e8e8e8;--rc-border-subtle:#f0f0f0;--rc-accent:#2563eb;--rc-accent-light:color-mix(in oklab, var(--rc-accent) 12%, transparent);--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-code-header-bg:#f0f0f0;--rc-hr-border:#e8e8e8;--rc-quote-border:color-mix(in oklab, var(--rc-text) 18%, transparent);--rc-quote-bg:#f5f5f5;--rc-alert-info:#2f6db5;--rc-alert-warning:#b7791f;--rc-alert-tip:#2f855a;--rc-alert-caution:#c53030;--rc-alert-important:#6b46c1;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-flow-paragraph:1.25em;--rc-flow-list:.375em;--rc-flow-block:2em;--rc-flow-heading:2em;--rc-font-family-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, "PingFang SC", "Noto Sans SC", monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-font-size-code:.8125em;--rc-font-size-caption:.8125em;--rc-line-height:1.75;--rc-line-height-tight:1.35;--rc-line-height-compact:1.6;--rc-line-height-code:1.7;--rc-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}:root.dark,[data-theme=dark]{--rc-text:#ededed;--rc-text-secondary:#c2c2c2;--rc-text-tertiary:#8a8a8a;--rc-text-quaternary:#525252;--rc-bg:#0a0a0a;--rc-bg-secondary:#171717;--rc-bg-tertiary:#262626;--rc-fill:#2a2a2a;--rc-fill-secondary:#222;--rc-fill-tertiary:#1a1a1a;--rc-fill-quaternary:#141414;--rc-border:#2e2e2e;--rc-border-subtle:#1f1f1f;--rc-accent:#60a5fa;--rc-accent-light:color-mix(in oklab, var(--rc-accent) 12%, transparent);--rc-link:#60a5fa;--rc-code-text:#d4d4d4;--rc-code-bg:#1a1a1a;--rc-code-header-bg:#212121;--rc-hr-border:#2e2e2e;--rc-quote-border:color-mix(in oklab, var(--rc-text) 22%, transparent);--rc-quote-bg:#262626;--rc-alert-info:#7aa7e0;--rc-alert-warning:#e0a458;--rc-alert-tip:#6cbf8f;--rc-alert-caution:#ef7d7d;--rc-alert-important:#a78bfa;--rc-shadow-top-bar:0 8px 30px #00000073, 0 2px 8px #0000004d;--rc-shadow-modal:0 10px 15px -3px #0006, 0 4px 6px -4px #00000059;--rc-shadow-menu:0 1px 4px #00000040, 0 4px 16px #0006}._1cz4fjc0{--rc-text:#171717;--rc-text-secondary:#404040;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#e8e8e8;--rc-border-subtle:#f0f0f0;--rc-accent:#2563eb;--rc-accent-light:color-mix(in oklab, var(--rc-accent) 12%, transparent);--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-code-header-bg:#f0f0f0;--rc-hr-border:#e8e8e8;--rc-quote-border:color-mix(in oklab, var(--rc-text) 18%, transparent);--rc-quote-bg:#f5f5f5;--rc-alert-info:#2f6db5;--rc-alert-warning:#b7791f;--rc-alert-tip:#2f855a;--rc-alert-caution:#c53030;--rc-alert-important:#6b46c1;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-flow-paragraph:1.25em;--rc-flow-list:.375em;--rc-flow-block:2em;--rc-flow-heading:2em;--rc-font-family-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, "PingFang SC", "Noto Sans SC", monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-font-size-code:.8125em;--rc-font-size-caption:.8125em;--rc-line-height:1.75;--rc-line-height-tight:1.35;--rc-line-height-compact:1.6;--rc-line-height-code:1.7;--rc-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}._1cz4fjc1{--rc-text:#171717;--rc-text-secondary:#404040;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#e8e8e8;--rc-border-subtle:#f0f0f0;--rc-accent:#2563eb;--rc-accent-light:color-mix(in oklab, var(--rc-accent) 12%, transparent);--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-code-header-bg:#f0f0f0;--rc-hr-border:#e8e8e8;--rc-quote-border:color-mix(in oklab, var(--rc-text) 18%, transparent);--rc-quote-bg:#f5f5f5;--rc-alert-info:#2f6db5;--rc-alert-warning:#b7791f;--rc-alert-tip:#2f855a;--rc-alert-caution:#c53030;--rc-alert-important:#6b46c1;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-flow-paragraph:.5em;--rc-flow-list:.375em;--rc-flow-block:2em;--rc-flow-heading:2em;--rc-font-family-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, "PingFang SC", "Noto Sans SC", monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-font-size-code:.8125em;--rc-font-size-caption:.8125em;--rc-line-height:1.85;--rc-line-height-tight:1.35;--rc-line-height-compact:1.6;--rc-line-height-code:1.7;--rc-font-family:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}._1cz4fjc2{--rc-text:#171717;--rc-text-secondary:#404040;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#e8e8e8;--rc-border-subtle:#f0f0f0;--rc-accent:#2563eb;--rc-accent-light:color-mix(in oklab, var(--rc-accent) 12%, transparent);--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-code-header-bg:#f0f0f0;--rc-hr-border:#e8e8e8;--rc-quote-border:color-mix(in oklab, var(--rc-text) 18%, transparent);--rc-quote-bg:#fafafa;--rc-alert-info:#2f6db5;--rc-alert-warning:#b7791f;--rc-alert-tip:#2f855a;--rc-alert-caution:#c53030;--rc-alert-important:#6b46c1;--rc-max-width:none;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:2px;--rc-space-sm:4px;--rc-space-md:10px;--rc-space-lg:16px;--rc-space-xl:20px;--rc-flow-paragraph:.6em;--rc-flow-list:.25em;--rc-flow-block:1em;--rc-flow-heading:1em;--rc-font-family-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, "PingFang SC", "Noto Sans SC", monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:14px;--rc-font-size-small:12px;--rc-font-size-code:.9286em;--rc-font-size-caption:.9286em;--rc-line-height:1.6;--rc-line-height-tight:1.3;--rc-line-height-compact:1.6;--rc-line-height-code:1.7;--rc-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";--rc-radius-sm:3px;--rc-radius-md:6px;--rc-radius-lg:12px}._1cz4fjc3{--rc-text:#171717;--rc-text-secondary:#404040;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#e8e8e8;--rc-border-subtle:#f0f0f0;--rc-accent:#2563eb;--rc-accent-light:color-mix(in oklab, var(--rc-accent) 12%, transparent);--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-code-header-bg:#f0f0f0;--rc-hr-border:#e8e8e8;--rc-quote-border:color-mix(in oklab, var(--rc-text) 18%, transparent);--rc-quote-bg:#fafafa;--rc-alert-info:#2f6db5;--rc-alert-warning:#b7791f;--rc-alert-tip:#2f855a;--rc-alert-caution:#c53030;--rc-alert-important:#6b46c1;--rc-max-width:none;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-flow-paragraph:.75em;--rc-flow-list:.25em;--rc-flow-block:1em;--rc-flow-heading:1em;--rc-font-family-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, "PingFang SC", "Noto Sans SC", monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:15px;--rc-font-size-small:13px;--rc-font-size-code:.8667em;--rc-font-size-caption:.8667em;--rc-line-height:1.65;--rc-line-height-tight:1.3;--rc-line-height-compact:1.6;--rc-line-height-code:1.7;--rc-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}.dark ._1cz4fjc0,[data-theme=dark] ._1cz4fjc0,.dark._1cz4fjc0,[data-theme=dark]._1cz4fjc0,.dark ._1cz4fjc1,[data-theme=dark] ._1cz4fjc1,.dark._1cz4fjc1,[data-theme=dark]._1cz4fjc1,.dark ._1cz4fjc2,[data-theme=dark] ._1cz4fjc2,.dark._1cz4fjc2,[data-theme=dark]._1cz4fjc2,.dark ._1cz4fjc3,[data-theme=dark] ._1cz4fjc3,.dark._1cz4fjc3,[data-theme=dark]._1cz4fjc3{--rc-text:#ededed;--rc-text-secondary:#c2c2c2;--rc-text-tertiary:#8a8a8a;--rc-text-quaternary:#525252;--rc-bg:#0a0a0a;--rc-bg-secondary:#171717;--rc-bg-tertiary:#262626;--rc-fill:#2a2a2a;--rc-fill-secondary:#222;--rc-fill-tertiary:#1a1a1a;--rc-fill-quaternary:#141414;--rc-border:#2e2e2e;--rc-border-subtle:#1f1f1f;--rc-accent:#60a5fa;--rc-accent-light:color-mix(in oklab, var(--rc-accent) 12%, transparent);--rc-link:#60a5fa;--rc-code-text:#d4d4d4;--rc-code-bg:#1a1a1a;--rc-code-header-bg:#212121;--rc-hr-border:#2e2e2e;--rc-quote-border:color-mix(in oklab, var(--rc-text) 22%, transparent);--rc-quote-bg:#262626;--rc-alert-info:#7aa7e0;--rc-alert-warning:#e0a458;--rc-alert-tip:#6cbf8f;--rc-alert-caution:#ef7d7d;--rc-alert-important:#a78bfa;--rc-shadow-top-bar:0 8px 30px #00000073, 0 2px 8px #0000004d;--rc-shadow-modal:0 10px 15px -3px #0006, 0 4px 6px -4px #00000059;--rc-shadow-menu:0 1px 4px #00000040, 0 4px 16px #0006}._1qucygc1{margin:8px 0}._1qucygc2{--_1qucygc0:115, 115, 115;border:1px solid color-mix(in srgb, rgb(var(--_1qucygc0)) 25%, transparent);background-color:color-mix(in srgb, rgb(var(--_1qucygc0)) 12%, transparent);height:48px;font-family:var(--rc-font-family-sans);font-size:var(--rc-font-size-md);border-radius:12px;align-items:center;gap:0;padding:0 14px;transition:border-color .15s,background-color .15s;display:flex}._1qucygc2:focus-within{border-color:color-mix(in srgb, rgb(var(--_1qucygc0)) 50%, transparent)}._1qucygc4{--_1qucygc0:29, 155, 240}._1qucygc5{--_1qucygc0:255, 0, 0}._1qucygc6{--_1qucygc0:250, 36, 60}._1qucygc7{--_1qucygc0:29, 185, 84}._1qucygc8{--_1qucygc0:163, 163, 163}._1qucygc9{--_1qucygc0:0, 161, 214}._1qucygca,._1qucygcb{--_1qucygc0:110, 84, 148}._1qucygcc{--_1qucygc0:139, 92, 246}._1qucygcd{font-weight:500;font-size:var(--rc-font-size-md);color:var(--rc-text-secondary);white-space:nowrap;-webkit-user-select:none;user-select:none;font-family:var(--rc-font-family-sans);flex-shrink:0;align-items:center;gap:8px;padding-right:14px;display:inline-flex}._1qucygce{background-color:rgb(var(--_1qucygc0));border-radius:50%;flex-shrink:0;width:8px;height:8px}._1qucygcf{background-color:var(--rc-border);flex-shrink:0;width:1px;height:20px}._1qucygcg{min-width:0;height:100%;font-size:var(--rc-font-size-md);font-family:var(--rc-font-mono);color:var(--rc-text);background:0 0;border:none;outline:none;flex:1;padding:0 14px}._1qucygcg::placeholder{color:color-mix(in srgb, var(--rc-text-secondary) 60%, transparent)}._1xclnej1{justify-content:center;margin:8px 0;display:flex}._1xclnej2{width:100%;height:0;position:relative}._1xclnej3{border:none;border-radius:8px;width:100%;height:100%;position:absolute;top:0;bottom:0;left:0;right:0}._1xclnej4{flex-direction:column;align-items:center;display:flex}._1xclnej5{border:none;width:100%;height:300px;overflow:auto}._1xclnej6{color:var(--rc-text-secondary);font-size:var(--rc-font-size-md);word-break:break-all;align-items:flex-start;gap:8px;margin-top:8px;line-height:1.4;text-decoration:none;display:inline-flex}._1xclnej6:hover{color:var(--rc-text)}._1xclnej6 svg{flex-shrink:0;margin-top:2px}._1xclnej7{flex-direction:column;align-items:center;width:100%;display:flex}._1xclnej8{width:100%;overflow:auto}._1xclnej9{max-height:50vh}._1xclnej8 pre{background:var(--rc-code-bg);font-size:var(--rc-font-size-sm);line-height:1.5;font-family:var(--rc-font-mono);color:var(--rc-text);border-radius:8px;margin:0;padding:16px}._1xclneja{display:block}._1xclnejb{text-align:right;width:4ch;color:color-mix(in srgb, var(--rc-text-secondary) 60%, transparent);-webkit-user-select:none;user-select:none;margin-right:16px;display:inline-block}._1xclnejc{counter-reset:shiki-line var(--start-line,0)}._1xclnejc pre{font-size:var(--rc-font-size-sm);line-height:1.5;font-family:var(--rc-font-mono);border-radius:8px;margin:0;padding:16px;overflow-x:auto}._1xclnejc code{flex-direction:column;font-family:inherit;display:flex}._1xclnejc .line{line-height:1.5;display:flex}._1xclnejc .line:before{content:counter(shiki-line);counter-increment:shiki-line;text-align:right;width:4ch;color:color-mix(in srgb, var(--rc-text-secondary) 60%, transparent);-webkit-user-select:none;user-select:none;flex-shrink:0;margin-right:16px}._1xclnejd{--_1xclnej0:115, 115, 115;border:1px solid color-mix(in srgb, rgb(var(--_1xclnej0)) 25%, transparent);background-color:color-mix(in srgb, rgb(var(--_1xclnej0)) 8%, transparent);height:48px;font-family:var(--rc-font-family-sans);font-size:var(--rc-font-size-md);border-radius:12px;align-items:center;gap:0;margin:8px 0;padding:0 14px;display:flex}._1xclnejf{--_1xclnej0:29, 155, 240}._1xclnejg{--_1xclnej0:255, 0, 0}._1xclnejh{--_1xclnej0:250, 36, 60}._1xclneji{--_1xclnej0:29, 185, 84}._1xclnejj{--_1xclnej0:163, 163, 163}._1xclnejk{--_1xclnej0:0, 161, 214}._1xclnejl,._1xclnejm{--_1xclnej0:110, 84, 148}._1xclnejn{--_1xclnej0:139, 92, 246}._1xclnejo{font-weight:500;font-size:var(--rc-font-size-md);color:var(--rc-text-secondary);white-space:nowrap;-webkit-user-select:none;user-select:none;flex-shrink:0;align-items:center;gap:8px;padding-right:14px;display:inline-flex}._1xclnejp{background-color:rgb(var(--_1xclnej0));border-radius:50%;flex-shrink:0;width:8px;height:8px}._1xclnejq{min-width:0;font-size:var(--rc-font-size-md);font-family:var(--rc-font-mono);color:var(--rc-text-secondary);text-overflow:ellipsis;white-space:nowrap;flex:1;text-decoration:none;overflow:hidden}._1xclnejq:hover{color:var(--rc-text);text-decoration:underline}._1xclnejr{justify-content:center;width:100%;margin:8px 0;display:flex}._1xclnejs{height:200px;color:var(--rc-text-secondary);font-size:var(--rc-font-size-md);justify-content:center;align-items:center;display:flex}
|
|
1
|
+
:root{--rc-text:#171717;--rc-text-secondary:#404040;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#e8e8e8;--rc-border-subtle:#f0f0f0;--rc-accent:#2563eb;--rc-accent-light:color-mix(in oklab, var(--rc-accent) 12%, transparent);--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-code-header-bg:#f0f0f0;--rc-hr-border:#e8e8e8;--rc-quote-border:color-mix(in oklab, var(--rc-text) 18%, transparent);--rc-quote-bg:#f5f5f5;--rc-alert-info:#2f6db5;--rc-alert-warning:#b7791f;--rc-alert-tip:#2f855a;--rc-alert-caution:#c53030;--rc-alert-important:#6b46c1;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-flow-paragraph:1.25em;--rc-flow-list:.375em;--rc-flow-block:2em;--rc-flow-heading:2em;--rc-font-family-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, "PingFang SC", "Noto Sans SC", monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-font-size-code:.8125em;--rc-font-size-caption:.8125em;--rc-line-height:1.75;--rc-line-height-tight:1.35;--rc-line-height-compact:1.6;--rc-line-height-code:1.7;--rc-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}:root.dark,[data-theme=dark]{--rc-text:#ededed;--rc-text-secondary:#c2c2c2;--rc-text-tertiary:#8a8a8a;--rc-text-quaternary:#525252;--rc-bg:#0a0a0a;--rc-bg-secondary:#171717;--rc-bg-tertiary:#262626;--rc-fill:#2a2a2a;--rc-fill-secondary:#222;--rc-fill-tertiary:#1a1a1a;--rc-fill-quaternary:#141414;--rc-border:#2e2e2e;--rc-border-subtle:#1f1f1f;--rc-accent:#60a5fa;--rc-accent-light:color-mix(in oklab, var(--rc-accent) 12%, transparent);--rc-link:#60a5fa;--rc-code-text:#d4d4d4;--rc-code-bg:#1a1a1a;--rc-code-header-bg:#212121;--rc-hr-border:#2e2e2e;--rc-quote-border:color-mix(in oklab, var(--rc-text) 22%, transparent);--rc-quote-bg:#262626;--rc-alert-info:#7aa7e0;--rc-alert-warning:#e0a458;--rc-alert-tip:#6cbf8f;--rc-alert-caution:#ef7d7d;--rc-alert-important:#a78bfa;--rc-shadow-top-bar:0 8px 30px #00000073, 0 2px 8px #0000004d;--rc-shadow-modal:0 10px 15px -3px #0006, 0 4px 6px -4px #00000059;--rc-shadow-menu:0 1px 4px #00000040, 0 4px 16px #0006}._1cz4fjc0{--rc-text:#171717;--rc-text-secondary:#404040;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#e8e8e8;--rc-border-subtle:#f0f0f0;--rc-accent:#2563eb;--rc-accent-light:color-mix(in oklab, var(--rc-accent) 12%, transparent);--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-code-header-bg:#f0f0f0;--rc-hr-border:#e8e8e8;--rc-quote-border:color-mix(in oklab, var(--rc-text) 18%, transparent);--rc-quote-bg:#f5f5f5;--rc-alert-info:#2f6db5;--rc-alert-warning:#b7791f;--rc-alert-tip:#2f855a;--rc-alert-caution:#c53030;--rc-alert-important:#6b46c1;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-flow-paragraph:1.25em;--rc-flow-list:.375em;--rc-flow-block:2em;--rc-flow-heading:2em;--rc-font-family-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, "PingFang SC", "Noto Sans SC", monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-font-size-code:.8125em;--rc-font-size-caption:.8125em;--rc-line-height:1.75;--rc-line-height-tight:1.35;--rc-line-height-compact:1.6;--rc-line-height-code:1.7;--rc-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}._1cz4fjc1{--rc-text:#171717;--rc-text-secondary:#404040;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#e8e8e8;--rc-border-subtle:#f0f0f0;--rc-accent:#2563eb;--rc-accent-light:color-mix(in oklab, var(--rc-accent) 12%, transparent);--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-code-header-bg:#f0f0f0;--rc-hr-border:#e8e8e8;--rc-quote-border:color-mix(in oklab, var(--rc-text) 18%, transparent);--rc-quote-bg:#f5f5f5;--rc-alert-info:#2f6db5;--rc-alert-warning:#b7791f;--rc-alert-tip:#2f855a;--rc-alert-caution:#c53030;--rc-alert-important:#6b46c1;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-flow-paragraph:.5em;--rc-flow-list:.375em;--rc-flow-block:2em;--rc-flow-heading:2em;--rc-font-family-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, "PingFang SC", "Noto Sans SC", monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-font-size-code:.8125em;--rc-font-size-caption:.8125em;--rc-line-height:1.85;--rc-line-height-tight:1.35;--rc-line-height-compact:1.6;--rc-line-height-code:1.7;--rc-font-family:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}._1cz4fjc2{--rc-text:#171717;--rc-text-secondary:#404040;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#e8e8e8;--rc-border-subtle:#f0f0f0;--rc-accent:#2563eb;--rc-accent-light:color-mix(in oklab, var(--rc-accent) 12%, transparent);--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-code-header-bg:#f0f0f0;--rc-hr-border:#e8e8e8;--rc-quote-border:color-mix(in oklab, var(--rc-text) 18%, transparent);--rc-quote-bg:#fafafa;--rc-alert-info:#2f6db5;--rc-alert-warning:#b7791f;--rc-alert-tip:#2f855a;--rc-alert-caution:#c53030;--rc-alert-important:#6b46c1;--rc-max-width:none;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:2px;--rc-space-sm:4px;--rc-space-md:10px;--rc-space-lg:16px;--rc-space-xl:20px;--rc-flow-paragraph:.6em;--rc-flow-list:.25em;--rc-flow-block:1em;--rc-flow-heading:1em;--rc-font-family-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, "PingFang SC", "Noto Sans SC", monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:14px;--rc-font-size-small:12px;--rc-font-size-code:.9286em;--rc-font-size-caption:.9286em;--rc-line-height:1.6;--rc-line-height-tight:1.3;--rc-line-height-compact:1.6;--rc-line-height-code:1.7;--rc-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";--rc-radius-sm:3px;--rc-radius-md:6px;--rc-radius-lg:12px}._1cz4fjc3{--rc-text:#171717;--rc-text-secondary:#404040;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#e8e8e8;--rc-border-subtle:#f0f0f0;--rc-accent:#2563eb;--rc-accent-light:color-mix(in oklab, var(--rc-accent) 12%, transparent);--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-code-header-bg:#f0f0f0;--rc-hr-border:#e8e8e8;--rc-quote-border:color-mix(in oklab, var(--rc-text) 18%, transparent);--rc-quote-bg:#fafafa;--rc-alert-info:#2f6db5;--rc-alert-warning:#b7791f;--rc-alert-tip:#2f855a;--rc-alert-caution:#c53030;--rc-alert-important:#6b46c1;--rc-max-width:none;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-flow-paragraph:.75em;--rc-flow-list:.25em;--rc-flow-block:1em;--rc-flow-heading:1em;--rc-font-family-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, "PingFang SC", "Noto Sans SC", monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:15px;--rc-font-size-small:13px;--rc-font-size-code:.8667em;--rc-font-size-caption:.8667em;--rc-line-height:1.65;--rc-line-height-tight:1.3;--rc-line-height-compact:1.6;--rc-line-height-code:1.7;--rc-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}.dark ._1cz4fjc0,[data-theme=dark] ._1cz4fjc0,.dark._1cz4fjc0,[data-theme=dark]._1cz4fjc0,.dark ._1cz4fjc1,[data-theme=dark] ._1cz4fjc1,.dark._1cz4fjc1,[data-theme=dark]._1cz4fjc1,.dark ._1cz4fjc2,[data-theme=dark] ._1cz4fjc2,.dark._1cz4fjc2,[data-theme=dark]._1cz4fjc2,.dark ._1cz4fjc3,[data-theme=dark] ._1cz4fjc3,.dark._1cz4fjc3,[data-theme=dark]._1cz4fjc3{--rc-text:#ededed;--rc-text-secondary:#c2c2c2;--rc-text-tertiary:#8a8a8a;--rc-text-quaternary:#525252;--rc-bg:#0a0a0a;--rc-bg-secondary:#171717;--rc-bg-tertiary:#262626;--rc-fill:#2a2a2a;--rc-fill-secondary:#222;--rc-fill-tertiary:#1a1a1a;--rc-fill-quaternary:#141414;--rc-border:#2e2e2e;--rc-border-subtle:#1f1f1f;--rc-accent:#60a5fa;--rc-accent-light:color-mix(in oklab, var(--rc-accent) 12%, transparent);--rc-link:#60a5fa;--rc-code-text:#d4d4d4;--rc-code-bg:#1a1a1a;--rc-code-header-bg:#212121;--rc-hr-border:#2e2e2e;--rc-quote-border:color-mix(in oklab, var(--rc-text) 22%, transparent);--rc-quote-bg:#262626;--rc-alert-info:#7aa7e0;--rc-alert-warning:#e0a458;--rc-alert-tip:#6cbf8f;--rc-alert-caution:#ef7d7d;--rc-alert-important:#a78bfa;--rc-shadow-top-bar:0 8px 30px #00000073, 0 2px 8px #0000004d;--rc-shadow-modal:0 10px 15px -3px #0006, 0 4px 6px -4px #00000059;--rc-shadow-menu:0 1px 4px #00000040, 0 4px 16px #0006}._1qucygc1{margin:8px 0}._1qucygc2{--_1qucygc0:115, 115, 115;border:1px solid color-mix(in srgb, rgb(var(--_1qucygc0)) 25%, transparent);background-color:color-mix(in srgb, rgb(var(--_1qucygc0)) 12%, transparent);height:48px;font-family:var(--rc-font-family-sans);font-size:var(--rc-font-size-md);border-radius:12px;align-items:center;gap:0;padding:0 14px;transition:border-color .15s,background-color .15s;display:flex}._1qucygc2:focus-within{border-color:color-mix(in srgb, rgb(var(--_1qucygc0)) 50%, transparent)}._1qucygc4{--_1qucygc0:29, 155, 240}._1qucygc5{--_1qucygc0:255, 0, 0}._1qucygc6{--_1qucygc0:250, 36, 60}._1qucygc7{--_1qucygc0:29, 185, 84}._1qucygc8{--_1qucygc0:163, 163, 163}._1qucygc9{--_1qucygc0:0, 161, 214}._1qucygca,._1qucygcb{--_1qucygc0:110, 84, 148}._1qucygcc{--_1qucygc0:139, 92, 246}._1qucygcd{font-weight:500;font-size:var(--rc-font-size-md);color:var(--rc-text-secondary);white-space:nowrap;-webkit-user-select:none;user-select:none;font-family:var(--rc-font-family-sans);flex-shrink:0;align-items:center;gap:8px;padding-right:14px;display:inline-flex}._1qucygce{background-color:rgb(var(--_1qucygc0));border-radius:50%;flex-shrink:0;width:8px;height:8px}._1qucygcf{background-color:var(--rc-border);flex-shrink:0;width:1px;height:20px}._1qucygcg{min-width:0;height:100%;font-size:var(--rc-font-size-md);font-family:var(--rc-font-mono);color:var(--rc-text);background:0 0;border:none;outline:none;flex:1;padding:0 14px}._1qucygcg::placeholder{color:color-mix(in srgb, var(--rc-text-secondary) 60%, transparent)}._1xclnej1{justify-content:center;margin:8px 0;display:flex}._1xclnej2{width:100%;height:0;position:relative}._1xclnej3{border:none;border-radius:8px;width:100%;height:100%;position:absolute;top:0;bottom:0;left:0;right:0}._1xclnej4{flex-direction:column;align-items:center;display:flex}._1xclnej5{border:none;width:100%;height:300px;overflow:auto}._1xclnej6{color:var(--rc-text-secondary);font-size:var(--rc-font-size-md);word-break:break-all;align-items:flex-start;gap:8px;margin-top:8px;line-height:1.4;text-decoration:none;display:inline-flex}._1xclnej6:hover{color:var(--rc-text)}._1xclnej6 svg{flex-shrink:0;margin-top:2px}._1xclnej7{flex-direction:column;align-items:center;width:100%;display:flex}._1xclnej8{width:100%;overflow:auto}._1xclnej9{max-height:50vh}._1xclnej8 pre{background:var(--rc-code-bg);font-size:var(--rc-font-size-sm);line-height:1.5;font-family:var(--rc-font-mono);color:var(--rc-text);border-radius:8px;margin:0;padding:16px}._1xclneja{display:block}._1xclnejb{text-align:right;width:4ch;color:color-mix(in srgb, var(--rc-text-secondary) 60%, transparent);-webkit-user-select:none;user-select:none;margin-right:16px;display:inline-block}._1xclnejc{counter-reset:code-line var(--start-line,0)}._1xclnejc pre{font-size:var(--rc-font-size-sm);line-height:1.5;font-family:var(--rc-font-mono);border-radius:8px;margin:0;padding:16px;overflow-x:auto}._1xclnejc code{flex-direction:column;font-family:inherit;display:flex}._1xclnejc .line{line-height:1.5;display:flex}._1xclnejc .line:before{content:counter(code-line);counter-increment:code-line;text-align:right;width:4ch;color:color-mix(in srgb, var(--rc-text-secondary) 60%, transparent);-webkit-user-select:none;user-select:none;flex-shrink:0;margin-right:16px}._1xclnejd{--_1xclnej0:115, 115, 115;border:1px solid color-mix(in srgb, rgb(var(--_1xclnej0)) 25%, transparent);background-color:color-mix(in srgb, rgb(var(--_1xclnej0)) 8%, transparent);height:48px;font-family:var(--rc-font-family-sans);font-size:var(--rc-font-size-md);border-radius:12px;align-items:center;gap:0;margin:8px 0;padding:0 14px;display:flex}._1xclnejf{--_1xclnej0:29, 155, 240}._1xclnejg{--_1xclnej0:255, 0, 0}._1xclnejh{--_1xclnej0:250, 36, 60}._1xclneji{--_1xclnej0:29, 185, 84}._1xclnejj{--_1xclnej0:163, 163, 163}._1xclnejk{--_1xclnej0:0, 161, 214}._1xclnejl,._1xclnejm{--_1xclnej0:110, 84, 148}._1xclnejn{--_1xclnej0:139, 92, 246}._1xclnejo{font-weight:500;font-size:var(--rc-font-size-md);color:var(--rc-text-secondary);white-space:nowrap;-webkit-user-select:none;user-select:none;flex-shrink:0;align-items:center;gap:8px;padding-right:14px;display:inline-flex}._1xclnejp{background-color:rgb(var(--_1xclnej0));border-radius:50%;flex-shrink:0;width:8px;height:8px}._1xclnejq{min-width:0;font-size:var(--rc-font-size-md);font-family:var(--rc-font-mono);color:var(--rc-text-secondary);text-overflow:ellipsis;white-space:nowrap;flex:1;text-decoration:none;overflow:hidden}._1xclnejq:hover{color:var(--rc-text);text-decoration:underline}._1xclnejr{justify-content:center;width:100%;margin:8px 0;display:flex}._1xclnejs{height:200px;color:var(--rc-text-secondary);font-size:var(--rc-font-size-md);justify-content:center;align-items:center;display:flex}
|
|
2
2
|
/*$vite$:1*/
|
package/dist/static.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as EmbedRendererProvider, a as EmbedStaticRenderer, c as isAppleMusicUrl, d as isGistUrl, f as isGithubFilePreviewUrl, g as matchEmbedUrl, h as isYoutubeUrl, i as EmbedNode, l as isBilibiliVideoUrl, m as isTweetUrl, n as $createEmbedNode, p as isSpotifyUrl, r as $isEmbedNode, s as createSelfThinkingMatcher, t as EmbedLinkRenderer, u as isCodesandboxUrl, v as useEmbedRenderers } from "./EmbedLinkRenderer-
|
|
1
|
+
import { _ as EmbedRendererProvider, a as EmbedStaticRenderer, c as isAppleMusicUrl, d as isGistUrl, f as isGithubFilePreviewUrl, g as matchEmbedUrl, h as isYoutubeUrl, i as EmbedNode, l as isBilibiliVideoUrl, m as isTweetUrl, n as $createEmbedNode, p as isSpotifyUrl, r as $isEmbedNode, s as createSelfThinkingMatcher, t as EmbedLinkRenderer, u as isCodesandboxUrl, v as useEmbedRenderers } from "./EmbedLinkRenderer-UWcO3Rut.js";
|
|
2
2
|
//#region src/static.ts
|
|
3
3
|
var embedNodes = [EmbedNode];
|
|
4
4
|
//#endregion
|
|
@@ -10,7 +10,7 @@ export declare const semanticClassNames: {
|
|
|
10
10
|
readonly githubFileCodeLong: "embed-static-github-file__code--long";
|
|
11
11
|
readonly githubFileLine: "embed-static-github-file__line";
|
|
12
12
|
readonly githubFileLineNum: "embed-static-github-file__line-num";
|
|
13
|
-
readonly
|
|
13
|
+
readonly code: "embed-static-code";
|
|
14
14
|
readonly fallback: "embed-static-fallback";
|
|
15
15
|
readonly fallbackGeneric: "embed-static-fallback--generic";
|
|
16
16
|
readonly fallbackTweet: "embed-static-fallback--tweet";
|
|
@@ -51,7 +51,7 @@ export declare const githubFileCode: string;
|
|
|
51
51
|
export declare const githubFileCodeLong: string;
|
|
52
52
|
export declare const githubFileLine: string;
|
|
53
53
|
export declare const githubFileLineNum: string;
|
|
54
|
-
export declare const
|
|
54
|
+
export declare const code: string;
|
|
55
55
|
export declare const fallback: string;
|
|
56
56
|
export declare const fallbackType: Record<"generic" | "tweet" | "youtube" | "apple-music" | "spotify" | "codesandbox" | "bilibili" | "github-file" | "github-gist" | "thinking", string>;
|
|
57
57
|
export declare const fallbackBadge: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles-static.css.d.ts","sourceRoot":"","sources":["../src/styles-static.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BrB,CAAC;AAEX,eAAO,MAAM,6BAA6B;;;;;;;;;;;CAWhC,CAAC;AAEX,eAAO,MAAM,cAAc,QAIzB,CAAC;AAEH,eAAO,MAAM,UAAU,QAIrB,CAAC;AAEH,eAAO,MAAM,MAAM,QAOjB,CAAC;AAEH,eAAO,MAAM,IAAI,QAIf,CAAC;AAEH,eAAO,MAAM,UAAU,QAKrB,CAAC;AAEH,eAAO,MAAM,UAAU,QAerB,CAAC;AAOH,eAAO,MAAM,UAAU,QAKrB,CAAC;AAEH,eAAO,MAAM,cAAc,QAGzB,CAAC;AAEH,eAAO,MAAM,kBAAkB,QAE7B,CAAC;AAaH,eAAO,MAAM,cAAc,QAEzB,CAAC;AAEH,eAAO,MAAM,iBAAiB,QAO5B,CAAC;AAEH,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"styles-static.css.d.ts","sourceRoot":"","sources":["../src/styles-static.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BrB,CAAC;AAEX,eAAO,MAAM,6BAA6B;;;;;;;;;;;CAWhC,CAAC;AAEX,eAAO,MAAM,cAAc,QAIzB,CAAC;AAEH,eAAO,MAAM,UAAU,QAIrB,CAAC;AAEH,eAAO,MAAM,MAAM,QAOjB,CAAC;AAEH,eAAO,MAAM,IAAI,QAIf,CAAC;AAEH,eAAO,MAAM,UAAU,QAKrB,CAAC;AAEH,eAAO,MAAM,UAAU,QAerB,CAAC;AAOH,eAAO,MAAM,UAAU,QAKrB,CAAC;AAEH,eAAO,MAAM,cAAc,QAGzB,CAAC;AAEH,eAAO,MAAM,kBAAkB,QAE7B,CAAC;AAaH,eAAO,MAAM,cAAc,QAEzB,CAAC;AAEH,eAAO,MAAM,iBAAiB,QAO5B,CAAC;AAEH,eAAO,MAAM,IAAI,QAEf,CAAC;AAkCH,eAAO,MAAM,QAAQ,QAanB,CAAC;AAEH,eAAO,MAAM,YAAY,uJAWvB,CAAC;AAEH,eAAO,MAAM,aAAa,QAWxB,CAAC;AAEH,eAAO,MAAM,WAAW,QAMtB,CAAC;AAEH,eAAO,MAAM,YAAY,QAgBvB,CAAC;AAEH,eAAO,MAAM,KAAK,QAKhB,CAAC;AAEH,eAAO,MAAM,OAAO,QAOlB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-ext-embed",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.0",
|
|
4
4
|
"description": "Embed extension for Twitter, YouTube, etc.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,26 +37,19 @@
|
|
|
37
37
|
"lexical": "^0.52.0",
|
|
38
38
|
"react": "^19.3.1",
|
|
39
39
|
"react-dom": "^19.3.1",
|
|
40
|
-
"shiki": "^4.5.0",
|
|
41
40
|
"typescript": "^7.0.2",
|
|
42
41
|
"unplugin-dts": "^1.1.2",
|
|
43
42
|
"vite": "^8.3.4"
|
|
44
43
|
},
|
|
45
44
|
"peerDependencies": {
|
|
46
|
-
"@haklex/rich-editor": "^0.
|
|
47
|
-
"@haklex/rich-editor-ui": "^0.
|
|
48
|
-
"@haklex/rich-style-token": "^0.
|
|
45
|
+
"@haklex/rich-editor": "^0.52.0",
|
|
46
|
+
"@haklex/rich-editor-ui": "^0.52.0",
|
|
47
|
+
"@haklex/rich-style-token": "^0.52.0",
|
|
49
48
|
"@lexical/react": "^0.52.0",
|
|
50
49
|
"lexical": "^0.52.0",
|
|
51
50
|
"lucide-react": "^1.0.0",
|
|
52
51
|
"react": ">=19",
|
|
53
|
-
"react-dom": ">=19"
|
|
54
|
-
"shiki": ">=4.0.0"
|
|
55
|
-
},
|
|
56
|
-
"peerDependenciesMeta": {
|
|
57
|
-
"shiki": {
|
|
58
|
-
"optional": true
|
|
59
|
-
}
|
|
52
|
+
"react-dom": ">=19"
|
|
60
53
|
},
|
|
61
54
|
"publishConfig": {
|
|
62
55
|
"access": "public"
|