@haklex/rich-ext-embed 0.18.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -125,7 +125,7 @@ var fallbackLink = "_1xclnejo";
|
|
|
125
125
|
var tweet = "_1xclnejp";
|
|
126
126
|
var loading = "_1xclnejq";
|
|
127
127
|
//#endregion
|
|
128
|
-
//#region \0@oxc-project+runtime@0.
|
|
128
|
+
//#region \0@oxc-project+runtime@0.132.0/helpers/typeof.js
|
|
129
129
|
function _typeof(o) {
|
|
130
130
|
"@babel/helpers - typeof";
|
|
131
131
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -135,7 +135,7 @@ function _typeof(o) {
|
|
|
135
135
|
}, _typeof(o);
|
|
136
136
|
}
|
|
137
137
|
//#endregion
|
|
138
|
-
//#region \0@oxc-project+runtime@0.
|
|
138
|
+
//#region \0@oxc-project+runtime@0.132.0/helpers/toPrimitive.js
|
|
139
139
|
function toPrimitive(t, r) {
|
|
140
140
|
if ("object" != _typeof(t) || !t) return t;
|
|
141
141
|
var e = t[Symbol.toPrimitive];
|
|
@@ -147,13 +147,13 @@ function toPrimitive(t, r) {
|
|
|
147
147
|
return ("string" === r ? String : Number)(t);
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
150
|
-
//#region \0@oxc-project+runtime@0.
|
|
150
|
+
//#region \0@oxc-project+runtime@0.132.0/helpers/toPropertyKey.js
|
|
151
151
|
function toPropertyKey(t) {
|
|
152
152
|
var i = toPrimitive(t, "string");
|
|
153
153
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
154
154
|
}
|
|
155
155
|
//#endregion
|
|
156
|
-
//#region \0@oxc-project+runtime@0.
|
|
156
|
+
//#region \0@oxc-project+runtime@0.132.0/helpers/defineProperty.js
|
|
157
157
|
function _defineProperty(e, r, t) {
|
|
158
158
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
159
159
|
value: t,
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as isGistUrl, c as isYoutubeUrl, d as $isEmbedNode, f as EmbedNode, g as useEmbedRenderers, h as EmbedRendererProvider, i as isCodesandboxUrl, l as matchEmbedUrl, m as _defineProperty, n as createSelfThinkingMatcher, o as isGithubFilePreviewUrl, p as EmbedStaticRenderer, r as isBilibiliVideoUrl, s as isTweetUrl, t as EmbedLinkRenderer, u as $createEmbedNode } from "./EmbedLinkRenderer-
|
|
1
|
+
import { a as isGistUrl, c as isYoutubeUrl, d as $isEmbedNode, f as EmbedNode, g as useEmbedRenderers, h as EmbedRendererProvider, i as isCodesandboxUrl, l as matchEmbedUrl, m as _defineProperty, n as createSelfThinkingMatcher, o as isGithubFilePreviewUrl, p as EmbedStaticRenderer, r as isBilibiliVideoUrl, s as isTweetUrl, t as EmbedLinkRenderer, u as $createEmbedNode } from "./EmbedLinkRenderer-C5x_7O2_.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";
|
package/dist/rich-ext-embed.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
:root{--rc-text:#000;--rc-text-secondary:#262626;--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:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#2563eb;--rc-quote-bg:#f5f5f5;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--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-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not 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, 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-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}:root.dark,[data-theme=dark]{--rc-text:#fafafa;--rc-text-secondary:#a3a3a3;--rc-text-tertiary:#737373;--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:#262626;--rc-accent:#60a5fa;--rc-accent-light:#60a5fa20;--rc-link:#60a5fa;--rc-code-text:#d4d4d4;--rc-code-bg:#262626;--rc-hr-border:#262626;--rc-quote-border:#60a5fa;--rc-quote-bg:#262626;--rc-alert-info:#7db9e5;--rc-alert-warning:#da864a;--rc-alert-tip:#54da48;--rc-alert-caution:#e16973;--rc-alert-important:#9966e0;--rc-max-width:700px;--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;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not 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, 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-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}._1cz4fjc0{--rc-text:#000;--rc-text-secondary:#262626;--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:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#2563eb;--rc-quote-bg:#f5f5f5;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--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-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not 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, 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-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}._1cz4fjc1{--rc-text:#000;--rc-text-secondary:#262626;--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:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#2563eb;--rc-quote-bg:#f5f5f5;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--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-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not 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, 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-line-height:1.8;--rc-line-height-tight:1.4;--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:#000;--rc-text-secondary:#262626;--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:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#a3a3a3;--rc-quote-bg:#fafafa;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--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-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not 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, 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-line-height:1.5;--rc-line-height-tight:1.3;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:3px;--rc-radius-md:6px;--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{--rc-text:#fafafa;--rc-text-secondary:#a3a3a3;--rc-text-tertiary:#737373;--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:#262626;--rc-accent:#60a5fa;--rc-accent-light:#60a5fa20;--rc-link:#60a5fa;--rc-code-text:#d4d4d4;--rc-code-bg:#262626;--rc-hr-border:#262626;--rc-quote-border:#60a5fa;--rc-quote-bg:#262626;--rc-alert-info:#7db9e5;--rc-alert-warning:#da864a;--rc-alert-tip:#54da48;--rc-alert-caution:#e16973;--rc-alert-important:#9966e0;--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);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:163, 163, 163}._1qucygc7{--_1qucygc0:0, 161, 214}._1qucygc8,._1qucygc9{--_1qucygc0:110, 84, 148}._1qucygca{--_1qucygc0:139, 92, 246}._1qucygcb{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}._1qucygcc{background-color:rgb(var(--_1qucygc0));border-radius:50%;flex-shrink:0;width:8px;height:8px}._1qucygcd{background-color:var(--rc-border);flex-shrink:0;width:1px;height:20px}._1qucygce{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}._1qucygce::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);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:163, 163, 163}._1xclneji{--_1xclnej0:0, 161, 214}._1xclnejj,._1xclnejk{--_1xclnej0:110, 84, 148}._1xclnejl{--_1xclnej0:139, 92, 246}._1xclnejm{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}._1xclnejn{background-color:rgb(var(--_1xclnej0));border-radius:50%;flex-shrink:0;width:8px;height:8px}._1xclnejo{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}._1xclnejo:hover{color:var(--rc-text);text-decoration:underline}._1xclnejp{justify-content:center;width:100%;margin:8px 0;display:flex}._1xclnejq{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:#000;--rc-text-secondary:#262626;--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:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#2563eb;--rc-quote-bg:#f5f5f5;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--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-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not 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, 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-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}:root.dark,[data-theme=dark]{--rc-text:#fafafa;--rc-text-secondary:#a3a3a3;--rc-text-tertiary:#737373;--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:#262626;--rc-accent:#60a5fa;--rc-accent-light:#60a5fa20;--rc-link:#60a5fa;--rc-code-text:#d4d4d4;--rc-code-bg:#262626;--rc-hr-border:#262626;--rc-quote-border:#60a5fa;--rc-quote-bg:#262626;--rc-alert-info:#7db9e5;--rc-alert-warning:#da864a;--rc-alert-tip:#54da48;--rc-alert-caution:#e16973;--rc-alert-important:#9966e0;--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:#000;--rc-text-secondary:#262626;--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:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#2563eb;--rc-quote-bg:#f5f5f5;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--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-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not 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, 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-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}._1cz4fjc1{--rc-text:#000;--rc-text-secondary:#262626;--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:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#2563eb;--rc-quote-bg:#f5f5f5;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--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-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not 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, 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-line-height:1.8;--rc-line-height-tight:1.4;--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:#000;--rc-text-secondary:#262626;--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:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#a3a3a3;--rc-quote-bg:#fafafa;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--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-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not 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, 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-line-height:1.5;--rc-line-height-tight:1.3;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:3px;--rc-radius-md:6px;--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{--rc-text:#fafafa;--rc-text-secondary:#a3a3a3;--rc-text-tertiary:#737373;--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:#262626;--rc-accent:#60a5fa;--rc-accent-light:#60a5fa20;--rc-link:#60a5fa;--rc-code-text:#d4d4d4;--rc-code-bg:#262626;--rc-hr-border:#262626;--rc-quote-border:#60a5fa;--rc-quote-bg:#262626;--rc-alert-info:#7db9e5;--rc-alert-warning:#da864a;--rc-alert-tip:#54da48;--rc-alert-caution:#e16973;--rc-alert-important:#9966e0;--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);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:163, 163, 163}._1qucygc7{--_1qucygc0:0, 161, 214}._1qucygc8,._1qucygc9{--_1qucygc0:110, 84, 148}._1qucygca{--_1qucygc0:139, 92, 246}._1qucygcb{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}._1qucygcc{background-color:rgb(var(--_1qucygc0));border-radius:50%;flex-shrink:0;width:8px;height:8px}._1qucygcd{background-color:var(--rc-border);flex-shrink:0;width:1px;height:20px}._1qucygce{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}._1qucygce::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);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:163, 163, 163}._1xclneji{--_1xclnej0:0, 161, 214}._1xclnejj,._1xclnejk{--_1xclnej0:110, 84, 148}._1xclnejl{--_1xclnej0:139, 92, 246}._1xclnejm{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}._1xclnejn{background-color:rgb(var(--_1xclnej0));border-radius:50%;flex-shrink:0;width:8px;height:8px}._1xclnejo{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}._1xclnejo:hover{color:var(--rc-text);text-decoration:underline}._1xclnejp{justify-content:center;width:100%;margin:8px 0;display:flex}._1xclnejq{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 { a as isGistUrl, c as isYoutubeUrl, d as $isEmbedNode, f as EmbedNode, g as useEmbedRenderers, h as EmbedRendererProvider, i as isCodesandboxUrl, l as matchEmbedUrl, n as createSelfThinkingMatcher, o as isGithubFilePreviewUrl, p as EmbedStaticRenderer, r as isBilibiliVideoUrl, s as isTweetUrl, t as EmbedLinkRenderer, u as $createEmbedNode } from "./EmbedLinkRenderer-
|
|
1
|
+
import { a as isGistUrl, c as isYoutubeUrl, d as $isEmbedNode, f as EmbedNode, g as useEmbedRenderers, h as EmbedRendererProvider, i as isCodesandboxUrl, l as matchEmbedUrl, n as createSelfThinkingMatcher, o as isGithubFilePreviewUrl, p as EmbedStaticRenderer, r as isBilibiliVideoUrl, s as isTweetUrl, t as EmbedLinkRenderer, u as $createEmbedNode } from "./EmbedLinkRenderer-C5x_7O2_.js";
|
|
2
2
|
//#region src/static.ts
|
|
3
3
|
var embedNodes = [EmbedNode];
|
|
4
4
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-ext-embed",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.1",
|
|
4
4
|
"description": "Embed extension for Twitter, YouTube, etc.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,29 +29,29 @@
|
|
|
29
29
|
"react-tweet": "npm:@innei/react-tweet@3.4.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@lexical/react": "^0.
|
|
32
|
+
"@lexical/react": "^0.45.0",
|
|
33
33
|
"@types/react": "^19.2.15",
|
|
34
34
|
"@types/react-dom": "^19.2.3",
|
|
35
35
|
"@vanilla-extract/css": "^1.20.1",
|
|
36
36
|
"@vanilla-extract/vite-plugin": "^5.2.2",
|
|
37
|
-
"lexical": "^0.
|
|
37
|
+
"lexical": "^0.45.0",
|
|
38
38
|
"react": "19.2.6",
|
|
39
39
|
"react-dom": "19.2.6",
|
|
40
40
|
"shiki": "^4.1.0",
|
|
41
41
|
"typescript": "^5.9.3",
|
|
42
42
|
"unplugin-dts": "^1.0.1",
|
|
43
|
-
"vite": "^8.0.
|
|
43
|
+
"vite": "^8.0.14"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@lexical/react": "^0.
|
|
47
|
-
"lexical": "^0.
|
|
46
|
+
"@lexical/react": "^0.45.0",
|
|
47
|
+
"lexical": "^0.45.0",
|
|
48
48
|
"lucide-react": "^1.0.0",
|
|
49
49
|
"react": ">=19",
|
|
50
50
|
"react-dom": ">=19",
|
|
51
51
|
"shiki": ">=3",
|
|
52
|
-
"@haklex/rich-editor": "0.
|
|
53
|
-
"@haklex/rich-editor-ui": "0.
|
|
54
|
-
"@haklex/rich-style-token": "0.
|
|
52
|
+
"@haklex/rich-editor": "0.21.1",
|
|
53
|
+
"@haklex/rich-editor-ui": "0.21.1",
|
|
54
|
+
"@haklex/rich-style-token": "0.21.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependenciesMeta": {
|
|
57
57
|
"shiki": {
|