@haklex/rich-ext-code-snippet 0.0.63 → 0.0.64
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/{CodeSnippetNode-BQ5spMAM.js → CodeSnippetNode-HfoBhcBz.js} +62 -54
- package/dist/CodeSnippetRenderer.d.ts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/rich-ext-code-snippet.css +1 -1
- package/dist/static.mjs +2 -2
- package/dist/styles.css.d.ts +5 -0
- package/dist/styles.css.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -113,7 +113,7 @@ var createRuntimeFn = (config) => {
|
|
|
113
113
|
};
|
|
114
114
|
return runtimeFn;
|
|
115
115
|
};
|
|
116
|
-
var semanticClassNames = { container: "rcs-container", header: "rcs-header", tabs: "rcs-tabs", tab: "rcs-tab", tabActive: "rcs-tab-active", titleBar: "rcs-title-bar", headerActions: "rcs-header-actions", copyButton: "rcs-copy-btn", separator: "rcs-separator", codePanel: "rcs-code-panel", codeScroll: "rcs-code-scroll", codeBody: "rcs-code-body", fileIcon: "rcs-file-icon", editContainer: "rcs-edit-container", editOverlay: "rcs-edit-overlay", editLabel: "rcs-edit-label", modal: "rcs-modal", modalTitlebar: "rcs-modal-titlebar", modalTitle: "rcs-modal-title", modalIconButton: "rcs-modal-icon-btn", modalBody: "rcs-modal-body", modalSidebar: "rcs-modal-sidebar", sidebarHeader: "rcs-sidebar-header", sidebarAddButton: "rcs-sidebar-add-btn", fileList: "rcs-file-list", fileItem: "rcs-file-item", fileItemActive: "rcs-file-item-active", fileItemDragging: "rcs-file-item-dragging", fileDragHandle: "rcs-file-drag-handle", fileName: "rcs-file-name", fileDelete: "rcs-file-delete", renameInput: "rcs-rename-input", modalEditor: "rcs-modal-editor", breadcrumb: "rcs-breadcrumb", breadcrumbLeft: "rcs-breadcrumb-left", breadcrumbName: "rcs-breadcrumb-name", breadcrumbLang: "rcs-breadcrumb-lang", editorContainer: "rcs-editor-container", dragOverlay: "rcs-drag-overlay" };
|
|
116
|
+
var semanticClassNames = { container: "rcs-container", header: "rcs-header", tabs: "rcs-tabs", tab: "rcs-tab", tabActive: "rcs-tab-active", titleBar: "rcs-title-bar", headerActions: "rcs-header-actions", copyButton: "rcs-copy-btn", separator: "rcs-separator", codePanelsWrapper: "rcs-code-panels-wrapper", codePanel: "rcs-code-panel", codeScroll: "rcs-code-scroll", codeBody: "rcs-code-body", fileIcon: "rcs-file-icon", editContainer: "rcs-edit-container", editOverlay: "rcs-edit-overlay", editLabel: "rcs-edit-label", modal: "rcs-modal", modalTitlebar: "rcs-modal-titlebar", modalTitle: "rcs-modal-title", modalIconButton: "rcs-modal-icon-btn", modalBody: "rcs-modal-body", modalSidebar: "rcs-modal-sidebar", sidebarHeader: "rcs-sidebar-header", sidebarAddButton: "rcs-sidebar-add-btn", fileList: "rcs-file-list", fileItem: "rcs-file-item", fileItemActive: "rcs-file-item-active", fileItemDragging: "rcs-file-item-dragging", fileDragHandle: "rcs-file-drag-handle", fileName: "rcs-file-name", fileDelete: "rcs-file-delete", renameInput: "rcs-rename-input", modalEditor: "rcs-modal-editor", breadcrumb: "rcs-breadcrumb", breadcrumbLeft: "rcs-breadcrumb-left", breadcrumbName: "rcs-breadcrumb-name", breadcrumbLang: "rcs-breadcrumb-lang", editorContainer: "rcs-editor-container", dragOverlay: "rcs-drag-overlay" };
|
|
117
117
|
var container = "hjkryc0";
|
|
118
118
|
var header = "hjkryc1";
|
|
119
119
|
var tabs = "hjkryc2";
|
|
@@ -122,34 +122,36 @@ var titleBar = "hjkryc7";
|
|
|
122
122
|
var headerActions = "hjkryc8";
|
|
123
123
|
var copyButton = "hjkryc9";
|
|
124
124
|
var separator = "hjkryca";
|
|
125
|
-
var
|
|
126
|
-
var
|
|
127
|
-
var
|
|
128
|
-
var
|
|
129
|
-
var
|
|
130
|
-
var
|
|
131
|
-
var
|
|
132
|
-
var
|
|
133
|
-
var
|
|
134
|
-
var
|
|
135
|
-
var
|
|
136
|
-
var
|
|
137
|
-
var
|
|
138
|
-
var
|
|
139
|
-
var
|
|
140
|
-
var
|
|
141
|
-
var
|
|
142
|
-
var
|
|
143
|
-
var
|
|
144
|
-
var
|
|
145
|
-
var
|
|
146
|
-
var
|
|
147
|
-
var
|
|
148
|
-
var
|
|
149
|
-
var
|
|
150
|
-
var
|
|
151
|
-
var
|
|
152
|
-
var
|
|
125
|
+
var codePanelsWrapper = "hjkrycb";
|
|
126
|
+
var codePanel = "hjkrycc";
|
|
127
|
+
var codeScroll = "hjkrycd";
|
|
128
|
+
var codeBody = "hjkryce";
|
|
129
|
+
var fileIcon = "hjkrycf";
|
|
130
|
+
var editContainer = "hjkrycg";
|
|
131
|
+
var editOverlay = "hjkrych";
|
|
132
|
+
var editLabel = "hjkryci";
|
|
133
|
+
var codeSnippetDialogPopup = "hjkrycj";
|
|
134
|
+
var modal = "hjkryck";
|
|
135
|
+
var modalTitlebar = "hjkrycl";
|
|
136
|
+
var modalTitle = "hjkrycm";
|
|
137
|
+
var modalIconButton = "hjkrycn";
|
|
138
|
+
var modalBody = "hjkryco";
|
|
139
|
+
var modalSidebar = "hjkrycp";
|
|
140
|
+
var sidebarHeader = "hjkrycq";
|
|
141
|
+
var sidebarAddButton = "hjkrycr";
|
|
142
|
+
var fileList = "hjkrycs";
|
|
143
|
+
var fileItem = createRuntimeFn({ defaultClassName: "hjkrycu hjkryct", variantClassNames: { active: { true: "hjkrycv", false: "hjkrycw" }, dragging: { true: "hjkrycx", false: "hjkrycy" } }, defaultVariants: { active: false, dragging: false }, compoundVariants: [] });
|
|
144
|
+
var fileDragHandle = "hjkrycz";
|
|
145
|
+
var fileName = "hjkryc10";
|
|
146
|
+
var fileDelete = "hjkryc11";
|
|
147
|
+
var renameInput = "hjkryc12";
|
|
148
|
+
var modalEditor = "hjkryc13";
|
|
149
|
+
var breadcrumb = "hjkryc14";
|
|
150
|
+
var breadcrumbLeft = "hjkryc15";
|
|
151
|
+
var breadcrumbName = "hjkryc16";
|
|
152
|
+
var breadcrumbLang = "hjkryc17";
|
|
153
|
+
var editorContainer = "hjkryc18";
|
|
154
|
+
var dragOverlay = "hjkryc19";
|
|
153
155
|
const EXT_TO_LANG = {
|
|
154
156
|
ts: "typescript",
|
|
155
157
|
tsx: "tsx",
|
|
@@ -307,37 +309,43 @@ const CodeSnippetRenderer = ({
|
|
|
307
309
|
className: `${separator} ${semanticClassNames.separator}`
|
|
308
310
|
}
|
|
309
311
|
),
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
{
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
style: { display: index === activeIndex ? "block" : "none" },
|
|
318
|
-
children: /* @__PURE__ */ jsx(
|
|
312
|
+
/* @__PURE__ */ jsx(
|
|
313
|
+
"div",
|
|
314
|
+
{
|
|
315
|
+
className: `${codePanelsWrapper} ${semanticClassNames.codePanelsWrapper}`,
|
|
316
|
+
children: files.map((file, index) => {
|
|
317
|
+
const html = htmlMap[file.filename];
|
|
318
|
+
return /* @__PURE__ */ jsx(
|
|
319
319
|
"div",
|
|
320
320
|
{
|
|
321
|
-
|
|
322
|
-
|
|
321
|
+
role: isMultiFile ? "tabpanel" : void 0,
|
|
322
|
+
"data-active": index === activeIndex,
|
|
323
|
+
className: `${codePanel} ${semanticClassNames.codePanel}`,
|
|
324
|
+
children: /* @__PURE__ */ jsx(
|
|
323
325
|
"div",
|
|
324
326
|
{
|
|
325
|
-
className: `${
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
327
|
+
className: `${codeScroll} ${semanticClassNames.codeScroll}`,
|
|
328
|
+
children: html ? /* @__PURE__ */ jsx(
|
|
329
|
+
"div",
|
|
330
|
+
{
|
|
331
|
+
className: `${codeBody} ${semanticClassNames.codeBody}`,
|
|
332
|
+
dangerouslySetInnerHTML: { __html: html }
|
|
333
|
+
}
|
|
334
|
+
) : /* @__PURE__ */ jsx(
|
|
335
|
+
"pre",
|
|
336
|
+
{
|
|
337
|
+
className: `${codeBody} ${semanticClassNames.codeBody}`,
|
|
338
|
+
children: /* @__PURE__ */ jsx("code", { children: file.code.split("\n").map((line, i) => /* @__PURE__ */ jsx("span", { className: "line", children: line }, i)) })
|
|
339
|
+
}
|
|
340
|
+
)
|
|
333
341
|
}
|
|
334
342
|
)
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
343
|
+
},
|
|
344
|
+
file.filename
|
|
345
|
+
);
|
|
346
|
+
})
|
|
347
|
+
}
|
|
348
|
+
)
|
|
341
349
|
]
|
|
342
350
|
}
|
|
343
351
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeSnippetRenderer.d.ts","sourceRoot":"","sources":["../src/CodeSnippetRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAQnE,OAAO,KAAK,EAAE,aAAa,EAAM,MAAM,OAAO,CAAA;AA6B9C,eAAO,MAAM,mBAAmB,EAAE,aAAa,CAAC,wBAAwB,
|
|
1
|
+
{"version":3,"file":"CodeSnippetRenderer.d.ts","sourceRoot":"","sources":["../src/CodeSnippetRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAQnE,OAAO,KAAK,EAAE,aAAa,EAAM,MAAM,OAAO,CAAA;AA6B9C,eAAO,MAAM,mBAAmB,EAAE,aAAa,CAAC,wBAAwB,CA2IvE,CAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { g as getLanguageFromFilename, m as modal, s as semanticClassNames, a as modalTitlebar, b as modalTitle, c as modalIconButton, d as modalBody, e as modalSidebar, f as sidebarHeader, h as sidebarAddButton, i as fileList, j as dragOverlay, k as fileIcon, l as fileName, n as fileItem, o as modalEditor, p as breadcrumb, q as breadcrumbLeft, r as breadcrumbName, t as breadcrumbLang, u as editorContainer, v as fileDragHandle, w as renameInput, x as fileDelete, y as codeSnippetDialogPopup, z as editContainer, C as CodeSnippetRenderer, A as editOverlay, B as editLabel, $ as $isCodeSnippetNode, D as CodeSnippetNode } from "./CodeSnippetNode-
|
|
5
|
-
import { E } from "./CodeSnippetNode-
|
|
4
|
+
import { g as getLanguageFromFilename, m as modal, s as semanticClassNames, a as modalTitlebar, b as modalTitle, c as modalIconButton, d as modalBody, e as modalSidebar, f as sidebarHeader, h as sidebarAddButton, i as fileList, j as dragOverlay, k as fileIcon, l as fileName, n as fileItem, o as modalEditor, p as breadcrumb, q as breadcrumbLeft, r as breadcrumbName, t as breadcrumbLang, u as editorContainer, v as fileDragHandle, w as renameInput, x as fileDelete, y as codeSnippetDialogPopup, z as editContainer, C as CodeSnippetRenderer, A as editOverlay, B as editLabel, $ as $isCodeSnippetNode, D as CodeSnippetNode } from "./CodeSnippetNode-HfoBhcBz.js";
|
|
5
|
+
import { E } from "./CodeSnippetNode-HfoBhcBz.js";
|
|
6
6
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
7
7
|
import { useColorScheme } from "@haklex/rich-editor";
|
|
8
8
|
import { presentDialog } from "@haklex/rich-editor-ui";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--rc-text: #000;--rc-text-secondary: #27272a;--rc-text-tertiary: #71717a;--rc-text-quaternary: #a1a1aa;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f4f4f5;--rc-fill: #e8e8ec;--rc-fill-secondary: #eeeeef;--rc-fill-tertiary: #f4f4f6;--rc-fill-quaternary: #f9f9fa;--rc-border: #f4f4f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #3f3f46;--rc-code-bg: #f4f4f5;--rc-hr-border: #e4e4e7;--rc-quote-border: #2563eb;--rc-quote-bg: #eff6ff;--rc-alert-info: #006bb7;--rc-alert-warning: #cc5500;--rc-alert-tip: #11cc00;--rc-alert-caution: #cc0011;--rc-alert-important: #5500cc;--rc-max-width: 700px;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);--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-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{--rc-text: #fafafa;--rc-text-secondary: #a1a1aa;--rc-text-tertiary: #71717a;--rc-text-quaternary: #52525b;--rc-bg: #09090b;--rc-bg-secondary: #18181b;--rc-bg-tertiary: #27272a;--rc-fill: #2a2a2f;--rc-fill-secondary: #222226;--rc-fill-tertiary: #1b1b1f;--rc-fill-quaternary: #131316;--rc-border: #27272a;--rc-accent: #60a5fa;--rc-accent-light: #60a5fa20;--rc-link: #60a5fa;--rc-code-text: #e4e4e7;--rc-code-bg: #27272a;--rc-hr-border: #27272a;--rc-quote-border: #60a5fa;--rc-quote-bg: #1e3a5f;--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 rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.4), 0 4px 6px -4px rgba(0,0,0,.35);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.25), 0 4px 16px rgba(0,0,0,.4);--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-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}._842nom0{--rc-text: #000;--rc-text-secondary: #27272a;--rc-text-tertiary: #71717a;--rc-text-quaternary: #a1a1aa;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f4f4f5;--rc-fill: #e8e8ec;--rc-fill-secondary: #eeeeef;--rc-fill-tertiary: #f4f4f6;--rc-fill-quaternary: #f9f9fa;--rc-border: #f4f4f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #3f3f46;--rc-code-bg: #f4f4f5;--rc-hr-border: #e4e4e7;--rc-quote-border: #2563eb;--rc-quote-bg: #eff6ff;--rc-alert-info: #006bb7;--rc-alert-warning: #cc5500;--rc-alert-tip: #11cc00;--rc-alert-caution: #cc0011;--rc-alert-important: #5500cc;--rc-max-width: 700px;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);--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-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}._842nom1{--rc-text: #000;--rc-text-secondary: #27272a;--rc-text-tertiary: #71717a;--rc-text-quaternary: #a1a1aa;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f4f4f5;--rc-fill: #e8e8ec;--rc-fill-secondary: #eeeeef;--rc-fill-tertiary: #f4f4f6;--rc-fill-quaternary: #f9f9fa;--rc-border: #f4f4f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #3f3f46;--rc-code-bg: #f4f4f5;--rc-hr-border: #e4e4e7;--rc-quote-border: #2563eb;--rc-quote-bg: #eff6ff;--rc-alert-info: #006bb7;--rc-alert-warning: #cc5500;--rc-alert-tip: #11cc00;--rc-alert-caution: #cc0011;--rc-alert-important: #5500cc;--rc-max-width: 700px;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);--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-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}._842nom2{--rc-text: #000;--rc-text-secondary: #27272a;--rc-text-tertiary: #71717a;--rc-text-quaternary: #a1a1aa;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f4f4f5;--rc-fill: #e8e8ec;--rc-fill-secondary: #eeeeef;--rc-fill-tertiary: #f4f4f6;--rc-fill-quaternary: #f9f9fa;--rc-border: #f4f4f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #3f3f46;--rc-code-bg: #f4f4f5;--rc-hr-border: #e4e4e7;--rc-quote-border: #a1a1aa;--rc-quote-bg: #fafafa;--rc-alert-info: #006bb7;--rc-alert-warning: #cc5500;--rc-alert-tip: #11cc00;--rc-alert-caution: #cc0011;--rc-alert-important: #5500cc;--rc-max-width: none;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);--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-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: 8px}.dark ._842nom0,[data-theme=dark] ._842nom0,.dark._842nom0,[data-theme=dark]._842nom0,.dark ._842nom1,[data-theme=dark] ._842nom1,.dark._842nom1,[data-theme=dark]._842nom1,.dark ._842nom2,[data-theme=dark] ._842nom2,.dark._842nom2,[data-theme=dark]._842nom2{--rc-text: #fafafa;--rc-text-secondary: #a1a1aa;--rc-text-tertiary: #71717a;--rc-text-quaternary: #52525b;--rc-bg: #09090b;--rc-bg-secondary: #18181b;--rc-bg-tertiary: #27272a;--rc-fill: #2a2a2f;--rc-fill-secondary: #222226;--rc-fill-tertiary: #1b1b1f;--rc-fill-quaternary: #131316;--rc-border: #27272a;--rc-accent: #60a5fa;--rc-accent-light: #60a5fa20;--rc-link: #60a5fa;--rc-code-text: #e4e4e7;--rc-code-bg: #27272a;--rc-hr-border: #27272a;--rc-quote-border: #60a5fa;--rc-quote-bg: #1e3a5f;--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 rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.4), 0 4px 6px -4px rgba(0,0,0,.35);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.25), 0 4px 16px rgba(0,0,0,.4)}.hjkryc0{position:relative;border-radius:.5rem;overflow:hidden;border:1px solid color-mix(in srgb,var(--rc-border) 60%,transparent);background:var(--rc-code-bg);font-size:var(--rc-font-size-md)}.hjkryc1{display:flex;align-items:center;justify-content:space-between;padding:0 12px;min-height:40px}.hjkryc2{display:flex;align-items:center;gap:2px;overflow-x:auto;scrollbar-width:none}.hjkryc2::-webkit-scrollbar{display:none}.hjkryc3{display:flex;align-items:center;gap:6px;padding:6px 10px;font-size:var(--rc-font-size-xs);font-family:var(--rc-font-mono);font-weight:500;color:var(--rc-text-secondary);background:transparent;border:none;border-radius:6px;cursor:pointer;white-space:nowrap;flex-shrink:0;transition:color .15s,background .15s}.hjkryc3:hover{color:var(--rc-text);background:color-mix(in srgb,var(--rc-text) 5%,transparent)}.hjkryc5{color:var(--rc-text);background:var(--rc-fill)}.hjkryc7{display:flex;align-items:center;gap:6px;padding:6px 0;font-size:var(--rc-font-size-xs);font-family:var(--rc-font-mono);font-weight:500;color:var(--rc-text-secondary)}.hjkryc8{display:flex;align-items:center;opacity:0;transition:opacity .15s}.hjkryc0:hover .hjkryc8{opacity:1}.hjkryc9{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;border:none;background:transparent;color:var(--rc-text-secondary);cursor:pointer;transition:background .15s,color .15s}.hjkryc9:hover{background:color-mix(in srgb,var(--rc-text) 8%,transparent);color:var(--rc-text)}.hjkryca{height:1px;background:var(--rc-border);opacity:.6}.hjkrycb{overflow-x:auto}.hjkrycc{padding:12px 16px;margin:0;font-size:var(--rc-font-size-sm);line-height:1.7;font-family:var(--rc-font-mono)}.hjkrycc pre{margin:0;background:transparent!important}.hjkrycc code{font-family:inherit}[data-theme=dark] .hjkrycc .shiki-themes,[data-theme=dark] .hjkrycc .shiki-themes span{color:var(--shiki-dark)!important;font-style:var(--shiki-dark-font-style)!important;font-weight:var(--shiki-dark-font-weight)!important;text-decoration:var(--shiki-dark-text-decoration)!important}.hjkrycd{display:inline-flex;flex-shrink:0}.hjkrycd svg{width:100%;height:100%}.hjkryce{position:relative}.hjkrycf{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;cursor:pointer;background:transparent;border:none}.hjkrycf:hover{background:color-mix(in srgb,currentColor 6%,transparent)}.hjkrycg{display:flex;align-items:center;gap:6px;padding:6px 14px;border-radius:6px;background:var(--rc-bg);border:1px solid var(--rc-border);color:var(--rc-text);font-size:var(--rc-font-size-sm);font-weight:500;opacity:0;transition:opacity .2s}.hjkryce:hover .hjkrycg{opacity:1}.hjkrych.hjkrych{padding:0;gap:0;display:flex;flex-direction:column;overflow:hidden;width:calc(100vw - 2rem);height:min(720px,80vh);border-radius:.75rem}.hjkrych.hjkrych[data-open],.hjkrych.hjkrych[data-closed]{animation:none}.hjkryci{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.hjkrycj{display:flex;align-items:center;justify-content:space-between;height:44px;padding:0 16px;border-bottom:1px solid var(--rc-border);flex-shrink:0}.hjkryck{font-size:var(--rc-font-size-xs);font-family:var(--rc-font-mono);color:var(--rc-text-secondary)}.hjkrycl{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;border:none;background:transparent;color:var(--rc-text-secondary);cursor:pointer;transition:background .15s,color .15s}.hjkrycl:hover{background:color-mix(in srgb,var(--rc-text) 8%,transparent);color:var(--rc-text)}.hjkrycm{display:flex;flex:1;min-height:0}.hjkrycn{width:224px;flex-shrink:0;border-right:1px solid var(--rc-border);display:flex;flex-direction:column;overflow:hidden}.hjkryco{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 8px;font-size:var(--rc-font-size-2xs);font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:color-mix(in srgb,var(--rc-text-secondary) 60%,transparent)}.hjkrycp{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:4px;border:none;background:transparent;color:var(--rc-text-secondary);cursor:pointer;transition:background .15s,color .15s}.hjkrycp:hover{background:color-mix(in srgb,var(--rc-text) 8%,transparent);color:var(--rc-text)}.hjkrycq{flex:1;overflow-y:auto;padding:0 6px 8px}.hjkrycr{display:flex;align-items:center;gap:4px;padding:4px 8px;border-radius:6px;height:24px;cursor:pointer;font-size:var(--rc-font-size-xs);font-family:var(--rc-font-mono);color:var(--rc-text-secondary);transition:background .15s,color .15s}.hjkrycr:hover{background:color-mix(in srgb,var(--rc-text) 5%,transparent);color:var(--rc-text)}.hjkryct{background:color-mix(in srgb,var(--rc-text) 8%,transparent);color:var(--rc-text)}.hjkrycv{opacity:.4}.hjkrycx{display:inline-flex;align-items:center;cursor:grab;color:color-mix(in srgb,var(--rc-text-secondary) 40%,transparent);flex-shrink:0;touch-action:none}.hjkrycx:active{cursor:grabbing}.hjkrycy{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hjkrycz{display:none;align-items:center;justify-content:center;width:20px;height:20px;border-radius:4px;border:none;background:transparent;color:var(--rc-text-secondary);cursor:pointer;flex-shrink:0}.hjkrycr:hover .hjkrycz{display:inline-flex}.hjkrycz:hover{color:var(--rc-alert-caution);background:color-mix(in srgb,var(--rc-alert-caution) 10%,transparent)}.hjkryc10{flex:1;min-width:0;padding:1px 4px;font-size:var(--rc-font-size-xs);font-family:var(--rc-font-mono);border-radius:3px;border:1px solid var(--rc-border);background:var(--rc-bg);color:var(--rc-text);outline:none}.hjkryc10:focus{border-color:color-mix(in srgb,var(--rc-text) 30%,transparent)}.hjkryc11{flex:1;display:flex;flex-direction:column;min-width:0}.hjkryc12{display:flex;align-items:center;justify-content:space-between;height:36px;padding:0 16px;border-bottom:1px solid color-mix(in srgb,var(--rc-border) 50%,transparent);flex-shrink:0}.hjkryc13{display:flex;align-items:center;gap:6px;font-size:var(--rc-font-size-xs);font-family:var(--rc-font-mono);color:var(--rc-text-secondary);overflow:hidden}.hjkryc14{color:var(--rc-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hjkryc15{opacity:.5}.hjkryc16{flex:1;min-height:0;position:relative;overflow:auto;background-color:transparent!important}.hjkryc16 .cm-editor{height:100%;background:transparent;color:var(--rc-text);font-family:var(--rc-font-mono);font-size:var(--rc-font-size-sm)}.hjkryc16 .cm-scroller{font-family:var(--rc-font-mono)!important;line-height:1.7}.hjkryc16 .cm-content{padding-top:0;padding-bottom:0;padding-left:.5rem;padding-right:1rem;min-height:1.6em}.hjkryc16 .cm-line{padding:0}.hjkryc16 .cm-gutters{border-right:none;padding-left:1rem}.hjkryc16 .cm-lineNumbers .cm-gutterElement{min-width:3em;text-align:right;padding-right:2em;color:color-mix(in srgb,var(--rc-text-secondary) 40%,transparent)!important}.hjkryc17{background:var(--rc-fill-quaternary);border-radius:6px;box-shadow:var(--rc-shadow-modal)}@media(min-width:640px){.hjkrych.hjkrych{max-width:64rem}}
|
|
1
|
+
:root{--rc-text: #000;--rc-text-secondary: #27272a;--rc-text-tertiary: #71717a;--rc-text-quaternary: #a1a1aa;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f4f4f5;--rc-fill: #e8e8ec;--rc-fill-secondary: #eeeeef;--rc-fill-tertiary: #f4f4f6;--rc-fill-quaternary: #f9f9fa;--rc-border: #f4f4f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #3f3f46;--rc-code-bg: #f4f4f5;--rc-hr-border: #e4e4e7;--rc-quote-border: #2563eb;--rc-quote-bg: #eff6ff;--rc-alert-info: #006bb7;--rc-alert-warning: #cc5500;--rc-alert-tip: #11cc00;--rc-alert-caution: #cc0011;--rc-alert-important: #5500cc;--rc-max-width: 700px;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);--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-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{--rc-text: #fafafa;--rc-text-secondary: #a1a1aa;--rc-text-tertiary: #71717a;--rc-text-quaternary: #52525b;--rc-bg: #09090b;--rc-bg-secondary: #18181b;--rc-bg-tertiary: #27272a;--rc-fill: #2a2a2f;--rc-fill-secondary: #222226;--rc-fill-tertiary: #1b1b1f;--rc-fill-quaternary: #131316;--rc-border: #27272a;--rc-accent: #60a5fa;--rc-accent-light: #60a5fa20;--rc-link: #60a5fa;--rc-code-text: #e4e4e7;--rc-code-bg: #27272a;--rc-hr-border: #27272a;--rc-quote-border: #60a5fa;--rc-quote-bg: #1e3a5f;--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 rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.4), 0 4px 6px -4px rgba(0,0,0,.35);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.25), 0 4px 16px rgba(0,0,0,.4);--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-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}._842nom0{--rc-text: #000;--rc-text-secondary: #27272a;--rc-text-tertiary: #71717a;--rc-text-quaternary: #a1a1aa;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f4f4f5;--rc-fill: #e8e8ec;--rc-fill-secondary: #eeeeef;--rc-fill-tertiary: #f4f4f6;--rc-fill-quaternary: #f9f9fa;--rc-border: #f4f4f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #3f3f46;--rc-code-bg: #f4f4f5;--rc-hr-border: #e4e4e7;--rc-quote-border: #2563eb;--rc-quote-bg: #eff6ff;--rc-alert-info: #006bb7;--rc-alert-warning: #cc5500;--rc-alert-tip: #11cc00;--rc-alert-caution: #cc0011;--rc-alert-important: #5500cc;--rc-max-width: 700px;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);--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-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}._842nom1{--rc-text: #000;--rc-text-secondary: #27272a;--rc-text-tertiary: #71717a;--rc-text-quaternary: #a1a1aa;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f4f4f5;--rc-fill: #e8e8ec;--rc-fill-secondary: #eeeeef;--rc-fill-tertiary: #f4f4f6;--rc-fill-quaternary: #f9f9fa;--rc-border: #f4f4f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #3f3f46;--rc-code-bg: #f4f4f5;--rc-hr-border: #e4e4e7;--rc-quote-border: #2563eb;--rc-quote-bg: #eff6ff;--rc-alert-info: #006bb7;--rc-alert-warning: #cc5500;--rc-alert-tip: #11cc00;--rc-alert-caution: #cc0011;--rc-alert-important: #5500cc;--rc-max-width: 700px;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);--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-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}._842nom2{--rc-text: #000;--rc-text-secondary: #27272a;--rc-text-tertiary: #71717a;--rc-text-quaternary: #a1a1aa;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f4f4f5;--rc-fill: #e8e8ec;--rc-fill-secondary: #eeeeef;--rc-fill-tertiary: #f4f4f6;--rc-fill-quaternary: #f9f9fa;--rc-border: #f4f4f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #3f3f46;--rc-code-bg: #f4f4f5;--rc-hr-border: #e4e4e7;--rc-quote-border: #a1a1aa;--rc-quote-bg: #fafafa;--rc-alert-info: #006bb7;--rc-alert-warning: #cc5500;--rc-alert-tip: #11cc00;--rc-alert-caution: #cc0011;--rc-alert-important: #5500cc;--rc-max-width: none;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);--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-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: 8px}.dark ._842nom0,[data-theme=dark] ._842nom0,.dark._842nom0,[data-theme=dark]._842nom0,.dark ._842nom1,[data-theme=dark] ._842nom1,.dark._842nom1,[data-theme=dark]._842nom1,.dark ._842nom2,[data-theme=dark] ._842nom2,.dark._842nom2,[data-theme=dark]._842nom2{--rc-text: #fafafa;--rc-text-secondary: #a1a1aa;--rc-text-tertiary: #71717a;--rc-text-quaternary: #52525b;--rc-bg: #09090b;--rc-bg-secondary: #18181b;--rc-bg-tertiary: #27272a;--rc-fill: #2a2a2f;--rc-fill-secondary: #222226;--rc-fill-tertiary: #1b1b1f;--rc-fill-quaternary: #131316;--rc-border: #27272a;--rc-accent: #60a5fa;--rc-accent-light: #60a5fa20;--rc-link: #60a5fa;--rc-code-text: #e4e4e7;--rc-code-bg: #27272a;--rc-hr-border: #27272a;--rc-quote-border: #60a5fa;--rc-quote-bg: #1e3a5f;--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 rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.4), 0 4px 6px -4px rgba(0,0,0,.35);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.25), 0 4px 16px rgba(0,0,0,.4)}.hjkryc0{position:relative;border-radius:.5rem;overflow:hidden;border:1px solid color-mix(in srgb,var(--rc-border) 60%,transparent);background:var(--rc-code-bg);font-size:var(--rc-font-size-md)}.hjkryc1{display:flex;align-items:center;justify-content:space-between;padding:0 12px;min-height:40px}.hjkryc2{display:flex;align-items:center;gap:2px;overflow-x:auto;scrollbar-width:none}.hjkryc2::-webkit-scrollbar{display:none}.hjkryc3{display:flex;align-items:center;gap:6px;padding:6px 10px;font-size:var(--rc-font-size-xs);font-family:var(--rc-font-mono);font-weight:500;color:var(--rc-text-secondary);background:transparent;border:none;border-radius:6px;cursor:pointer;white-space:nowrap;flex-shrink:0;transition:color .15s,background .15s}.hjkryc3:hover{color:var(--rc-text);background:color-mix(in srgb,var(--rc-text) 5%,transparent)}.hjkryc5{color:var(--rc-text);background:var(--rc-fill)}.hjkryc7{display:flex;align-items:center;gap:6px;padding:6px 0;font-size:var(--rc-font-size-xs);font-family:var(--rc-font-mono);font-weight:500;color:var(--rc-text-secondary)}.hjkryc8{display:flex;align-items:center;opacity:0;transition:opacity .15s}.hjkryc0:hover .hjkryc8{opacity:1}.hjkryc9{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;border:none;background:transparent;color:var(--rc-text-secondary);cursor:pointer;transition:background .15s,color .15s}.hjkryc9:hover{background:color-mix(in srgb,var(--rc-text) 8%,transparent);color:var(--rc-text)}.hjkryca{height:1px;background:var(--rc-border);opacity:.6}.hjkrycb{position:relative}.hjkrycc{display:grid;grid-template-rows:0fr;transition:grid-template-rows .3s ease}.hjkrycc[data-active=true]{grid-template-rows:1fr}.hjkrycd{overflow:hidden}.hjkrycc[data-active=true] .hjkrycd{overflow-x:auto}.hjkryce{padding:12px 16px;margin:0;font-size:var(--rc-font-size-small);line-height:1.7;font-family:var(--rc-font-mono)}.hjkryce pre{margin:0;background:transparent!important}.hjkryce code{font-family:inherit}[data-theme=dark] .hjkryce .shiki-themes,[data-theme=dark] .hjkryce .shiki-themes span{color:var(--shiki-dark)!important;font-style:var(--shiki-dark-font-style)!important;font-weight:var(--shiki-dark-font-weight)!important;text-decoration:var(--shiki-dark-text-decoration)!important}.hjkrycf{display:inline-flex;flex-shrink:0}.hjkrycf svg{width:100%;height:100%}.hjkrycg{position:relative}.hjkrych{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;cursor:pointer;background:transparent;border:none}.hjkrych:hover{background:color-mix(in srgb,currentColor 6%,transparent)}.hjkryci{display:flex;align-items:center;gap:6px;padding:6px 14px;border-radius:6px;background:var(--rc-bg);border:1px solid var(--rc-border);color:var(--rc-text);font-size:var(--rc-font-size-sm);font-weight:500;opacity:0;transition:opacity .2s}.hjkrycg:hover .hjkryci{opacity:1}.hjkrycj.hjkrycj{padding:0;gap:0;display:flex;flex-direction:column;overflow:hidden;width:calc(100vw - 2rem);height:min(720px,80vh);border-radius:.75rem}.hjkrycj.hjkrycj[data-open],.hjkrycj.hjkrycj[data-closed]{animation:none}.hjkryck{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.hjkrycl{display:flex;align-items:center;justify-content:space-between;height:44px;padding:0 16px;border-bottom:1px solid var(--rc-border);flex-shrink:0}.hjkrycm{font-size:var(--rc-font-size-xs);font-family:var(--rc-font-mono);color:var(--rc-text-secondary)}.hjkrycn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;border:none;background:transparent;color:var(--rc-text-secondary);cursor:pointer;transition:background .15s,color .15s}.hjkrycn:hover{background:color-mix(in srgb,var(--rc-text) 8%,transparent);color:var(--rc-text)}.hjkryco{display:flex;flex:1;min-height:0}.hjkrycp{width:224px;flex-shrink:0;border-right:1px solid var(--rc-border);display:flex;flex-direction:column;overflow:hidden}.hjkrycq{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 8px;font-size:var(--rc-font-size-2xs);font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:color-mix(in srgb,var(--rc-text-secondary) 60%,transparent)}.hjkrycr{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:4px;border:none;background:transparent;color:var(--rc-text-secondary);cursor:pointer;transition:background .15s,color .15s}.hjkrycr:hover{background:color-mix(in srgb,var(--rc-text) 8%,transparent);color:var(--rc-text)}.hjkrycs{flex:1;overflow-y:auto;padding:0 6px 8px}.hjkryct{display:flex;align-items:center;gap:4px;padding:4px 8px;border-radius:6px;height:24px;cursor:pointer;font-size:var(--rc-font-size-xs);font-family:var(--rc-font-mono);color:var(--rc-text-secondary);transition:background .15s,color .15s}.hjkryct:hover{background:color-mix(in srgb,var(--rc-text) 5%,transparent);color:var(--rc-text)}.hjkrycv{background:color-mix(in srgb,var(--rc-text) 8%,transparent);color:var(--rc-text)}.hjkrycx{opacity:.4}.hjkrycz{display:inline-flex;align-items:center;cursor:grab;color:color-mix(in srgb,var(--rc-text-secondary) 40%,transparent);flex-shrink:0;touch-action:none}.hjkrycz:active{cursor:grabbing}.hjkryc10{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hjkryc11{display:none;align-items:center;justify-content:center;width:20px;height:20px;border-radius:4px;border:none;background:transparent;color:var(--rc-text-secondary);cursor:pointer;flex-shrink:0}.hjkryct:hover .hjkryc11{display:inline-flex}.hjkryc11:hover{color:var(--rc-alert-caution);background:color-mix(in srgb,var(--rc-alert-caution) 10%,transparent)}.hjkryc12{flex:1;min-width:0;padding:1px 4px;font-size:var(--rc-font-size-xs);font-family:var(--rc-font-mono);border-radius:3px;border:1px solid var(--rc-border);background:var(--rc-bg);color:var(--rc-text);outline:none}.hjkryc12:focus{border-color:color-mix(in srgb,var(--rc-text) 30%,transparent)}.hjkryc13{flex:1;display:flex;flex-direction:column;min-width:0}.hjkryc14{display:flex;align-items:center;justify-content:space-between;height:36px;padding:0 16px;border-bottom:1px solid color-mix(in srgb,var(--rc-border) 50%,transparent);flex-shrink:0}.hjkryc15{display:flex;align-items:center;gap:6px;font-size:var(--rc-font-size-xs);font-family:var(--rc-font-mono);color:var(--rc-text-secondary);overflow:hidden}.hjkryc16{color:var(--rc-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hjkryc17{opacity:.5}.hjkryc18{flex:1;min-height:0;position:relative;overflow:auto;background-color:transparent!important}.hjkryc18 .cm-editor{height:100%;background:transparent;color:var(--rc-text);font-family:var(--rc-font-mono);font-size:var(--rc-font-size-sm)}.hjkryc18 .cm-scroller{font-family:var(--rc-font-mono)!important;line-height:1.7}.hjkryc18 .cm-content{padding-top:0;padding-bottom:0;padding-left:.5rem;padding-right:1rem;min-height:1.6em}.hjkryc18 .cm-line{padding:0}.hjkryc18 .cm-gutters{border-right:none;padding-left:1rem}.hjkryc18 .cm-lineNumbers .cm-gutterElement{min-width:3em;text-align:right;padding-right:2em;color:color-mix(in srgb,var(--rc-text-secondary) 40%,transparent)!important}.hjkryc19{background:var(--rc-fill-quaternary);border-radius:6px;box-shadow:var(--rc-shadow-modal)}@media(min-width:640px){.hjkrycj.hjkrycj{max-width:64rem}}
|
package/dist/static.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as CodeSnippetNode } from "./CodeSnippetNode-
|
|
2
|
-
import { E, $, C } from "./CodeSnippetNode-
|
|
1
|
+
import { D as CodeSnippetNode } from "./CodeSnippetNode-HfoBhcBz.js";
|
|
2
|
+
import { E, $, C } from "./CodeSnippetNode-HfoBhcBz.js";
|
|
3
3
|
import { CODE_SNIPPET_BLOCK_TRANSFORMER } from "@haklex/rich-headless/transformers";
|
|
4
4
|
const codeSnippetNodes = [CodeSnippetNode];
|
|
5
5
|
export {
|
package/dist/styles.css.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare const semanticClassNames: {
|
|
|
8
8
|
readonly headerActions: "rcs-header-actions";
|
|
9
9
|
readonly copyButton: "rcs-copy-btn";
|
|
10
10
|
readonly separator: "rcs-separator";
|
|
11
|
+
readonly codePanelsWrapper: "rcs-code-panels-wrapper";
|
|
11
12
|
readonly codePanel: "rcs-code-panel";
|
|
12
13
|
readonly codeScroll: "rcs-code-scroll";
|
|
13
14
|
readonly codeBody: "rcs-code-body";
|
|
@@ -55,6 +56,10 @@ export declare const titleBar: string;
|
|
|
55
56
|
export declare const headerActions: string;
|
|
56
57
|
export declare const copyButton: string;
|
|
57
58
|
export declare const separator: string;
|
|
59
|
+
/** Wrapper for tab panels; overflow hidden for height transition */
|
|
60
|
+
export declare const codePanelsWrapper: string;
|
|
61
|
+
/** Panel: grid-template-rows 0fr/1fr for smooth bidirectional height transition */
|
|
62
|
+
export declare const codePanel: string;
|
|
58
63
|
export declare const codeScroll: string;
|
|
59
64
|
export declare const codeBody: string;
|
|
60
65
|
export declare const fileIcon: string;
|
package/dist/styles.css.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../src/styles.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../src/styles.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCrB,CAAA;AAEV,eAAO,MAAM,SAAS,QAOpB,CAAA;AAEF,eAAO,MAAM,MAAM,QAMjB,CAAA;AAEF,eAAO,MAAM,IAAI,QAWf,CAAA;AA0BF,eAAO,MAAM,GAAG;;;;;;;;EAcd,CAAA;AAEF,eAAO,MAAM,QAAQ,QASnB,CAAA;AAEF,eAAO,MAAM,aAAa,QAUxB,CAAA;AAEF,eAAO,MAAM,UAAU,QAkBrB,CAAA;AAEF,eAAO,MAAM,SAAS,QAIpB,CAAA;AAEF,oEAAoE;AACpE,eAAO,MAAM,iBAAiB,QAE5B,CAAA;AAEF,mFAAmF;AACnF,eAAO,MAAM,SAAS,QASpB,CAAA;AAEF,eAAO,MAAM,UAAU,QAOrB,CAAA;AAEF,eAAO,MAAM,QAAQ,QAMnB,CAAA;AAsBF,eAAO,MAAM,QAAQ,QAGnB,CAAA;AAOF,eAAO,MAAM,aAAa,QAExB,CAAA;AAEF,eAAO,MAAM,WAAW,QAetB,CAAA;AAEF,eAAO,MAAM,SAAS,QAkBpB,CAAA;AAEF,QAAA,MAAM,uBAAuB,QAAY,CAAA;AAyBzC,OAAO,EAAE,uBAAuB,IAAI,sBAAsB,EAAE,CAAA;AAE5D,eAAO,MAAM,KAAK,QAMhB,CAAA;AAEF,eAAO,MAAM,aAAa,QAQxB,CAAA;AAEF,eAAO,MAAM,UAAU,QAIrB,CAAA;AAEF,eAAO,MAAM,eAAe,QAkB1B,CAAA;AAEF,eAAO,MAAM,SAAS,QAIpB,CAAA;AAEF,eAAO,MAAM,YAAY,QAOvB,CAAA;AAEF,eAAO,MAAM,aAAa,QAUxB,CAAA;AAEF,eAAO,MAAM,gBAAgB,QAkB3B,CAAA;AAEF,eAAO,MAAM,QAAQ,QAInB,CAAA;AAsBF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;EAqBnB,CAAA;AAEF,eAAO,MAAM,cAAc,QAYzB,CAAA;AAEF,eAAO,MAAM,QAAQ,QAKnB,CAAA;AAEF,eAAO,MAAM,UAAU,QAqBrB,CAAA;AAEF,eAAO,MAAM,WAAW,QAgBtB,CAAA;AAEF,eAAO,MAAM,WAAW,QAKtB,CAAA;AAEF,eAAO,MAAM,UAAU,QAQrB,CAAA;AAEF,eAAO,MAAM,cAAc,QAQzB,CAAA;AAEF,eAAO,MAAM,cAAc,QAKzB,CAAA;AAEF,eAAO,MAAM,cAAc,QAEzB,CAAA;AAEF,eAAO,MAAM,eAAe,QAM1B,CAAA;AAyCF,eAAO,MAAM,WAAW,QAItB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-ext-code-snippet",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.64",
|
|
5
5
|
"description": "Multi-file code snippet extension",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"exports": {
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"@dnd-kit/utilities": "^3.2.2",
|
|
33
33
|
"lucide-react": "^0.577.0",
|
|
34
34
|
"shiki": "^4.0.1",
|
|
35
|
-
"@haklex/
|
|
36
|
-
"@haklex/rich-editor
|
|
37
|
-
"@haklex/
|
|
38
|
-
"@haklex/rich-
|
|
39
|
-
"@haklex/rich-
|
|
40
|
-
"@haklex/rich-
|
|
35
|
+
"@haklex/rich-headless": "0.0.64",
|
|
36
|
+
"@haklex/rich-editor": "0.0.64",
|
|
37
|
+
"@haklex/cm-editor": "0.0.64",
|
|
38
|
+
"@haklex/rich-style-token": "0.0.64",
|
|
39
|
+
"@haklex/rich-renderer-codeblock": "0.0.64",
|
|
40
|
+
"@haklex/rich-editor-ui": "0.0.64"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@lexical/react": "^0.41.0",
|