zs_library 0.4.12 → 0.4.13
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/components/desktop/types.d.ts +1 -1
- package/dist/components/desktop/utils.d.ts +1 -0
- package/dist/components/index.d.ts +11 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +4146 -12
- package/package.json +1 -6
- package/dist/components/desktop/config.js +0 -15
- package/dist/components/desktop/context/config/context.js +0 -14
- package/dist/components/desktop/context/config/hooks.js +0 -7
- package/dist/components/desktop/context/state/context.js +0 -221
- package/dist/components/desktop/context/state/hooks.js +0 -7
- package/dist/components/desktop/context-menu/index.js +0 -312
- package/dist/components/desktop/index.js +0 -40
- package/dist/components/desktop/items/group-item.js +0 -305
- package/dist/components/desktop/items/modal/group-item-modal.js +0 -158
- package/dist/components/desktop/items/modal/info-modal.js +0 -33
- package/dist/components/desktop/items/sortable-item.js +0 -120
- package/dist/components/desktop/sortable.js +0 -272
- package/dist/components/desktop/style.js +0 -18
- package/dist/components/desktop/theme.js +0 -32
- package/dist/components/desktop/utils.js +0 -15
- package/dist/components/dock/dock-desktop.js +0 -83
- package/dist/components/dock/dock-mobile.js +0 -69
- package/dist/components/dock/index.js +0 -24
- package/dist/components/dock/utils.js +0 -9
- package/dist/components/editor/editor.js +0 -199
- package/dist/components/editor/extensions/drag-handle/clipboard-serializer.js +0 -20
- package/dist/components/editor/extensions/drag-handle/index.js +0 -273
- package/dist/components/editor/extensions.js +0 -131
- package/dist/components/editor/generative/ai-completion-command.js +0 -59
- package/dist/components/editor/generative/ai-selector-commands.js +0 -78
- package/dist/components/editor/generative/ai-selector.js +0 -90
- package/dist/components/editor/generative/drag-handle.js +0 -70
- package/dist/components/editor/generative/generative-dropdown-menu.js +0 -55
- package/dist/components/editor/generative/generative-menu-switch.js +0 -59
- package/dist/components/editor/image-upload.js +0 -36
- package/dist/components/editor/index.js +0 -8
- package/dist/components/editor/lib/colors.js +0 -98
- package/dist/components/editor/lib/content.js +0 -8
- package/dist/components/editor/lib/nodes.js +0 -70
- package/dist/components/editor/lib/url-utils.js +0 -21
- package/dist/components/editor/preview.js +0 -12
- package/dist/components/editor/selectors/color-selector.js +0 -100
- package/dist/components/editor/selectors/link-selector.js +0 -82
- package/dist/components/editor/selectors/math-selector.js +0 -37
- package/dist/components/editor/selectors/node-selector.js +0 -56
- package/dist/components/editor/selectors/text-buttons.js +0 -75
- package/dist/components/editor/slash-command.js +0 -129
- package/dist/components/editor/ui/button.js +0 -44
- package/dist/components/editor/ui/command.js +0 -94
- package/dist/components/editor/ui/dialog.js +0 -68
- package/dist/components/editor/ui/dropdown-menu.js +0 -99
- package/dist/components/editor/ui/icons/crazy-spinner.js +0 -10
- package/dist/components/editor/ui/popover.js +0 -24
- package/dist/components/editor/ui/scroll-area.js +0 -39
- package/dist/components/editor/ui/separator.js +0 -25
- package/dist/components/editor/ui/tooltip.js +0 -25
- package/dist/components/md-editor/editor.js +0 -104
- package/dist/components/md-editor/i18n/index.js +0 -12
- package/dist/components/md-editor/i18n/zh_CN.js +0 -122
- package/dist/components/md-editor/index.js +0 -8
- package/dist/components/md-editor/preview.js +0 -81
- package/dist/components/md-editor/style.js +0 -267
- package/dist/components/md-editor/utils.js +0 -8
- package/dist/i18n/index.js +0 -23
- package/dist/i18n/locales/en-US.js +0 -30
- package/dist/i18n/locales/zh-CN.js +0 -30
- package/dist/node_modules/.pnpm/@tiptap_pm@2.11.5/node_modules/@tiptap/pm/view/dist/index.js +0 -3
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import "./index.css";
|
|
2
|
-
import { jsx as e, jsxs as t, Fragment as l } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as b } from "react";
|
|
4
|
-
import g from "rc-dropdown";
|
|
5
|
-
import o from "rc-menu";
|
|
6
|
-
import { cx as n, css as a } from "@emotion/css";
|
|
7
|
-
import { RiArrowRightSLine as f, RiCheckLine as h } from "@remixicon/react";
|
|
8
|
-
/* empty css */
|
|
9
|
-
/* empty css */
|
|
10
|
-
const x = b(({ children: m, items: s, ...c }, u) => {
|
|
11
|
-
const d = (r) => /* @__PURE__ */ t(
|
|
12
|
-
o.Item,
|
|
13
|
-
{
|
|
14
|
-
onClick: r.onClick,
|
|
15
|
-
className: n(
|
|
16
|
-
"gap-2 !p-1.5 text-sm hover:bg-accent focus:ring-0 rounded-md cursor-pointer",
|
|
17
|
-
r.className
|
|
18
|
-
),
|
|
19
|
-
itemIcon: r.isActive ? /* @__PURE__ */ e(h, { size: 16 }) : void 0,
|
|
20
|
-
children: [
|
|
21
|
-
r.icon,
|
|
22
|
-
r.label,
|
|
23
|
-
/* @__PURE__ */ e("div", { className: "flex-1" })
|
|
24
|
-
]
|
|
25
|
-
},
|
|
26
|
-
r.key
|
|
27
|
-
), p = (r) => {
|
|
28
|
-
var i;
|
|
29
|
-
return /* @__PURE__ */ e(
|
|
30
|
-
o.SubMenu,
|
|
31
|
-
{
|
|
32
|
-
expandIcon: /* @__PURE__ */ e(f, { size: 16 }),
|
|
33
|
-
popupClassName: n(
|
|
34
|
-
"!rounded-lg border border-muted bg-background shadow-xl !p-2 min-w-48 !m-0 z-[1080]",
|
|
35
|
-
a`
|
|
36
|
-
.rc-menu {
|
|
37
|
-
border: none !important;
|
|
38
|
-
box-shadow: none !important;
|
|
39
|
-
}
|
|
40
|
-
`
|
|
41
|
-
),
|
|
42
|
-
popupOffset: [4, 0],
|
|
43
|
-
className: n(
|
|
44
|
-
"gap-2 !p-0 text-sm hover:bg-accent focus:ring-0 rounded-md cursor-pointer",
|
|
45
|
-
a`
|
|
46
|
-
.rc-menu-submenu-title {
|
|
47
|
-
display: flex;
|
|
48
|
-
align-items: center;
|
|
49
|
-
gap: 0.5rem;
|
|
50
|
-
padding: 0.375rem 0 0.375rem 0.375rem !important;
|
|
51
|
-
border-radius: calc(var(--radius) - 2px);
|
|
52
|
-
|
|
53
|
-
&:hover {
|
|
54
|
-
background-color: transparent !important;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
`
|
|
58
|
-
),
|
|
59
|
-
title: /* @__PURE__ */ t(l, { children: [
|
|
60
|
-
r.icon,
|
|
61
|
-
r.label,
|
|
62
|
-
/* @__PURE__ */ e("div", { className: "flex-1" })
|
|
63
|
-
] }),
|
|
64
|
-
children: (i = r.children) == null ? void 0 : i.map(d)
|
|
65
|
-
},
|
|
66
|
-
r.key
|
|
67
|
-
);
|
|
68
|
-
};
|
|
69
|
-
return /* @__PURE__ */ e(
|
|
70
|
-
g,
|
|
71
|
-
{
|
|
72
|
-
ref: u,
|
|
73
|
-
trigger: "click",
|
|
74
|
-
overlay: /* @__PURE__ */ e(
|
|
75
|
-
o,
|
|
76
|
-
{
|
|
77
|
-
className: n(
|
|
78
|
-
"!rounded-lg border border-muted bg-background shadow-xl !p-2 min-w-48 !m-0",
|
|
79
|
-
a`
|
|
80
|
-
.rc-menu-submenu-active {
|
|
81
|
-
.rc-menu-submenu-title {
|
|
82
|
-
background-color: hsl(var(--accent)) !important;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
`
|
|
86
|
-
),
|
|
87
|
-
...c,
|
|
88
|
-
children: s.map((r) => r.type === "divider" ? /* @__PURE__ */ e(o.Divider, { className: "!my-1" }, r.key) : r.type === "submenu" ? p(r) : d(r))
|
|
89
|
-
}
|
|
90
|
-
),
|
|
91
|
-
...c,
|
|
92
|
-
children: m
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
});
|
|
96
|
-
x.displayName = "DropdownMenu";
|
|
97
|
-
export {
|
|
98
|
-
x as DropdownMenu
|
|
99
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import "./index.css";
|
|
2
|
-
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
const i = () => /* @__PURE__ */ a("div", { className: "flex items-center justify-center gap-0.5", children: [
|
|
4
|
-
/* @__PURE__ */ e("div", { className: "h-1.5 w-1.5 animate-bounce rounded-full bg-purple-500 [animation-delay:-0.3s]" }),
|
|
5
|
-
/* @__PURE__ */ e("div", { className: "h-1.5 w-1.5 animate-bounce rounded-full bg-purple-500 [animation-delay:-0.15s]" }),
|
|
6
|
-
/* @__PURE__ */ e("div", { className: "h-1.5 w-1.5 animate-bounce rounded-full bg-purple-500" })
|
|
7
|
-
] });
|
|
8
|
-
export {
|
|
9
|
-
i as default
|
|
10
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import "./index.css";
|
|
2
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import * as n from "react";
|
|
4
|
-
import * as o from "@radix-ui/react-popover";
|
|
5
|
-
import { cx as s } from "@emotion/css";
|
|
6
|
-
const c = o.Root, g = o.Trigger, m = n.forwardRef(({ className: e, align: a = "center", sideOffset: r = 4, ...d }, i) => /* @__PURE__ */ t(o.Portal, { children: /* @__PURE__ */ t(
|
|
7
|
-
o.Content,
|
|
8
|
-
{
|
|
9
|
-
ref: i,
|
|
10
|
-
align: a,
|
|
11
|
-
sideOffset: r,
|
|
12
|
-
className: s(
|
|
13
|
-
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
14
|
-
e
|
|
15
|
-
),
|
|
16
|
-
...d
|
|
17
|
-
}
|
|
18
|
-
) }));
|
|
19
|
-
m.displayName = o.Content.displayName;
|
|
20
|
-
export {
|
|
21
|
-
c as Popover,
|
|
22
|
-
m as PopoverContent,
|
|
23
|
-
g as PopoverTrigger
|
|
24
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import "./index.css";
|
|
2
|
-
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import * as c from "react";
|
|
4
|
-
import * as r from "@radix-ui/react-scroll-area";
|
|
5
|
-
import { cx as s } from "@emotion/css";
|
|
6
|
-
const m = c.forwardRef(({ className: o, children: l, ...a }, t) => /* @__PURE__ */ d(
|
|
7
|
-
r.Root,
|
|
8
|
-
{
|
|
9
|
-
ref: t,
|
|
10
|
-
className: s("relative overflow-hidden", o),
|
|
11
|
-
...a,
|
|
12
|
-
children: [
|
|
13
|
-
/* @__PURE__ */ e(r.Viewport, { className: "h-full w-full rounded-[inherit]", children: l }),
|
|
14
|
-
/* @__PURE__ */ e(i, {}),
|
|
15
|
-
/* @__PURE__ */ e(r.Corner, {})
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
));
|
|
19
|
-
m.displayName = r.Root.displayName;
|
|
20
|
-
const i = c.forwardRef(({ className: o, orientation: l = "vertical", ...a }, t) => /* @__PURE__ */ e(
|
|
21
|
-
r.ScrollAreaScrollbar,
|
|
22
|
-
{
|
|
23
|
-
ref: t,
|
|
24
|
-
orientation: l,
|
|
25
|
-
className: s(
|
|
26
|
-
"flex touch-none select-none transition-colors",
|
|
27
|
-
l === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
28
|
-
l === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
29
|
-
o
|
|
30
|
-
),
|
|
31
|
-
...a,
|
|
32
|
-
children: /* @__PURE__ */ e(r.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
33
|
-
}
|
|
34
|
-
));
|
|
35
|
-
i.displayName = r.ScrollAreaScrollbar.displayName;
|
|
36
|
-
export {
|
|
37
|
-
m as ScrollArea,
|
|
38
|
-
i as ScrollBar
|
|
39
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import "./index.css";
|
|
2
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
-
import * as e from "react";
|
|
4
|
-
import * as o from "@radix-ui/react-separator";
|
|
5
|
-
import { cx as s } from "@emotion/css";
|
|
6
|
-
const f = e.forwardRef(
|
|
7
|
-
({ className: a, orientation: r = "horizontal", decorative: t = !0, ...m }, p) => /* @__PURE__ */ i(
|
|
8
|
-
o.Root,
|
|
9
|
-
{
|
|
10
|
-
ref: p,
|
|
11
|
-
decorative: t,
|
|
12
|
-
orientation: r,
|
|
13
|
-
className: s(
|
|
14
|
-
"shrink-0 bg-border",
|
|
15
|
-
r === "horizontal" ? "h-[1px] w-full" : " w-[1px]",
|
|
16
|
-
a
|
|
17
|
-
),
|
|
18
|
-
...m
|
|
19
|
-
}
|
|
20
|
-
)
|
|
21
|
-
);
|
|
22
|
-
f.displayName = o.Root.displayName;
|
|
23
|
-
export {
|
|
24
|
-
f as Separator
|
|
25
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import "./index.css";
|
|
2
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
-
import { css as t } from "@emotion/css";
|
|
4
|
-
import e from "rc-tooltip";
|
|
5
|
-
/* empty css */
|
|
6
|
-
const m = (o) => /* @__PURE__ */ r(
|
|
7
|
-
e,
|
|
8
|
-
{
|
|
9
|
-
classNames: {
|
|
10
|
-
root: t`
|
|
11
|
-
background-color: transparent;
|
|
12
|
-
padding: 0;
|
|
13
|
-
.rc-tooltip-content {
|
|
14
|
-
border: none;
|
|
15
|
-
}
|
|
16
|
-
`,
|
|
17
|
-
body: "!p-2 !rounded-md !bg-background !border !border-muted !text-secondary-foreground"
|
|
18
|
-
},
|
|
19
|
-
showArrow: !1,
|
|
20
|
-
...o
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
export {
|
|
24
|
-
m as default
|
|
25
|
-
};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import "./index.css";
|
|
2
|
-
import { jsx as e, jsxs as x } from "react/jsx-runtime";
|
|
3
|
-
import { AdmonitionDirectiveDescriptor as C, MDXEditor as D, toolbarPlugin as M, diffSourcePlugin as b, listsPlugin as v, quotePlugin as B, headingsPlugin as I, linkPlugin as y, linkDialogPlugin as E, imagePlugin as L, tablePlugin as j, thematicBreakPlugin as N, frontmatterPlugin as U, codeBlockPlugin as R, codeMirrorPlugin as q, markdownShortcutPlugin as A, directivesPlugin as F, DiffSourceToggleWrapper as J, UndoRedo as W, Separator as t, BoldItalicUnderlineToggles as X, CodeToggle as $, StrikeThroughSupSubToggles as z, ListsToggle as G, CreateLink as H, InsertImage as K, InsertTable as O, InsertThematicBreak as Q, InsertCodeBlock as V, InsertFrontmatter as Y } from "@mdxeditor/editor";
|
|
4
|
-
/* empty css */
|
|
5
|
-
/* empty css */
|
|
6
|
-
import { useRef as Z, useState as _, useEffect as ee } from "react";
|
|
7
|
-
import { $t as te } from "./i18n/index.js";
|
|
8
|
-
import { markdownStyle as re, markdownEditorStyle as oe, markdownEditorDarkStyle as ie, githubMarkdownDarkStyle as ne, githubMarkdownLightStyle as ae } from "./style.js";
|
|
9
|
-
import { cx as le } from "@emotion/css";
|
|
10
|
-
import { isDarkScheme as s } from "./utils.js";
|
|
11
|
-
const he = (c) => {
|
|
12
|
-
const {
|
|
13
|
-
value: r,
|
|
14
|
-
onChange: n,
|
|
15
|
-
translation: g,
|
|
16
|
-
pluginConfig: d,
|
|
17
|
-
className: u,
|
|
18
|
-
theme: a = "auto",
|
|
19
|
-
...m
|
|
20
|
-
} = c, i = Z(null), {
|
|
21
|
-
image: p,
|
|
22
|
-
diffSource: f = {
|
|
23
|
-
viewMode: "rich-text"
|
|
24
|
-
},
|
|
25
|
-
headings: k,
|
|
26
|
-
link: S,
|
|
27
|
-
codeBlock: h,
|
|
28
|
-
codeMirror: P = {
|
|
29
|
-
codeBlockLanguages: {
|
|
30
|
-
js: "JavaScript",
|
|
31
|
-
css: "CSS",
|
|
32
|
-
txt: "Plain Text",
|
|
33
|
-
tsx: "TypeScript",
|
|
34
|
-
"": "Unspecified"
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
directives: w = {
|
|
38
|
-
directiveDescriptors: [C]
|
|
39
|
-
}
|
|
40
|
-
} = d ?? {}, [T, l] = _("");
|
|
41
|
-
return ee(() => {
|
|
42
|
-
var o;
|
|
43
|
-
r !== void 0 && i.current && ((o = i.current) == null || o.setMarkdown(r), l(r));
|
|
44
|
-
}, [r, i]), /* @__PURE__ */ e(
|
|
45
|
-
D,
|
|
46
|
-
{
|
|
47
|
-
ref: i,
|
|
48
|
-
className: le(
|
|
49
|
-
oe,
|
|
50
|
-
s(a) ? ie : "",
|
|
51
|
-
s(a) ? ne : ae,
|
|
52
|
-
u
|
|
53
|
-
),
|
|
54
|
-
contentEditableClassName: re,
|
|
55
|
-
markdown: T,
|
|
56
|
-
onChange: (o) => {
|
|
57
|
-
!r && !n && l(o), n && n(o);
|
|
58
|
-
},
|
|
59
|
-
translation: g ?? te,
|
|
60
|
-
plugins: [
|
|
61
|
-
M({
|
|
62
|
-
toolbarContents: () => /* @__PURE__ */ x(J, { options: ["rich-text", "source"], children: [
|
|
63
|
-
/* @__PURE__ */ e(W, {}),
|
|
64
|
-
/* @__PURE__ */ e(t, {}),
|
|
65
|
-
/* @__PURE__ */ e(X, {}),
|
|
66
|
-
/* @__PURE__ */ e($, {}),
|
|
67
|
-
/* @__PURE__ */ e(t, {}),
|
|
68
|
-
/* @__PURE__ */ e(z, {}),
|
|
69
|
-
/* @__PURE__ */ e(t, {}),
|
|
70
|
-
/* @__PURE__ */ e(G, {}),
|
|
71
|
-
/* @__PURE__ */ e(t, {}),
|
|
72
|
-
/* @__PURE__ */ e(H, {}),
|
|
73
|
-
/* @__PURE__ */ e(K, {}),
|
|
74
|
-
/* @__PURE__ */ e(t, {}),
|
|
75
|
-
/* @__PURE__ */ e(O, {}),
|
|
76
|
-
/* @__PURE__ */ e(Q, {}),
|
|
77
|
-
/* @__PURE__ */ e(t, {}),
|
|
78
|
-
/* @__PURE__ */ e(V, {}),
|
|
79
|
-
/* @__PURE__ */ e(t, {}),
|
|
80
|
-
/* @__PURE__ */ e(Y, {})
|
|
81
|
-
] })
|
|
82
|
-
}),
|
|
83
|
-
b(f),
|
|
84
|
-
v(),
|
|
85
|
-
B(),
|
|
86
|
-
I(k),
|
|
87
|
-
y(S),
|
|
88
|
-
E(),
|
|
89
|
-
L(p),
|
|
90
|
-
j(),
|
|
91
|
-
N(),
|
|
92
|
-
U(),
|
|
93
|
-
R(h),
|
|
94
|
-
q(P),
|
|
95
|
-
A(),
|
|
96
|
-
F(w)
|
|
97
|
-
],
|
|
98
|
-
...m
|
|
99
|
-
}
|
|
100
|
-
);
|
|
101
|
-
};
|
|
102
|
-
export {
|
|
103
|
-
he as PrivMdEditor
|
|
104
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import "./index.css";
|
|
2
|
-
import s from "./zh_CN.js";
|
|
3
|
-
const u = (o, p, n) => {
|
|
4
|
-
const t = o.split(".").reduce(
|
|
5
|
-
(r, e) => typeof r == "string" ? r : r[e],
|
|
6
|
-
s
|
|
7
|
-
);
|
|
8
|
-
return typeof t != "string" ? p : n ? t.replace(/{{(.*?)}}/g, (r, e) => n[e]) : t;
|
|
9
|
-
};
|
|
10
|
-
export {
|
|
11
|
-
u as $t
|
|
12
|
-
};
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import "./index.css";
|
|
2
|
-
const t = {
|
|
3
|
-
frontmatterEditor: {
|
|
4
|
-
title: "编辑前置元数据",
|
|
5
|
-
key: "键",
|
|
6
|
-
value: "值",
|
|
7
|
-
addEntry: "添加项目"
|
|
8
|
-
},
|
|
9
|
-
dialogControls: {
|
|
10
|
-
save: "保存",
|
|
11
|
-
cancel: "取消"
|
|
12
|
-
},
|
|
13
|
-
uploadImage: {
|
|
14
|
-
uploadInstructions: "从您的设备中上传图片:",
|
|
15
|
-
addViaUrlInstructions: "或从网址新增图片:",
|
|
16
|
-
autoCompletePlaceholder: "选择或粘贴图片",
|
|
17
|
-
alt: "替代文本:",
|
|
18
|
-
title: "标题:"
|
|
19
|
-
},
|
|
20
|
-
imageEditor: {
|
|
21
|
-
editImage: "编辑图片"
|
|
22
|
-
},
|
|
23
|
-
createLink: {
|
|
24
|
-
url: "网址",
|
|
25
|
-
urlPlaceholder: "选择或粘贴网址",
|
|
26
|
-
title: "标题",
|
|
27
|
-
saveTooltip: "设置网址",
|
|
28
|
-
cancelTooltip: "取消更改"
|
|
29
|
-
},
|
|
30
|
-
linkPreview: {
|
|
31
|
-
open: "在新窗口中打开 {{url}}",
|
|
32
|
-
edit: "编辑链接网址",
|
|
33
|
-
copyToClipboard: "复制到剪贴板",
|
|
34
|
-
copied: "已复制!",
|
|
35
|
-
remove: "移除链接"
|
|
36
|
-
},
|
|
37
|
-
table: {
|
|
38
|
-
deleteTable: "删除表格",
|
|
39
|
-
columnMenu: "列菜单",
|
|
40
|
-
textAlignment: "文字对齐",
|
|
41
|
-
alignLeft: "左对齐",
|
|
42
|
-
alignCenter: "居中对齐",
|
|
43
|
-
alignRight: "右对齐",
|
|
44
|
-
insertColumnLeft: "在当前列左侧插入一列",
|
|
45
|
-
insertColumnRight: "在当前列右侧插入一列",
|
|
46
|
-
deleteColumn: "删除此列",
|
|
47
|
-
rowMenu: "行菜单",
|
|
48
|
-
insertRowAbove: "在当前行上方插入一行",
|
|
49
|
-
insertRowBelow: "在当前行下方插入一行",
|
|
50
|
-
deleteRow: "删除此行"
|
|
51
|
-
},
|
|
52
|
-
toolbar: {
|
|
53
|
-
blockTypes: {
|
|
54
|
-
paragraph: "段落",
|
|
55
|
-
quote: "引用",
|
|
56
|
-
heading: "标题 {{level}}"
|
|
57
|
-
},
|
|
58
|
-
blockTypeSelect: {
|
|
59
|
-
selectBlockTypeTooltip: "选择块类型",
|
|
60
|
-
placeholder: "块类型"
|
|
61
|
-
},
|
|
62
|
-
toggleGroup: "切换组",
|
|
63
|
-
removeBold: "移除粗体",
|
|
64
|
-
bold: "粗体",
|
|
65
|
-
removeItalic: "移除斜体",
|
|
66
|
-
italic: "斜体",
|
|
67
|
-
underline: "移除下划线",
|
|
68
|
-
removeUnderline: "下划线",
|
|
69
|
-
removeInlineCode: "移除内联代码样式",
|
|
70
|
-
inlineCode: "内联代码样式",
|
|
71
|
-
link: "创建链接",
|
|
72
|
-
richText: "富文本",
|
|
73
|
-
diffMode: "差异模式",
|
|
74
|
-
source: "源码模式",
|
|
75
|
-
admonition: "插入注释区块",
|
|
76
|
-
codeBlock: "插入代码块",
|
|
77
|
-
editFrontmatter: "编辑前置元数据",
|
|
78
|
-
insertFrontmatter: "插入前置元数据",
|
|
79
|
-
image: "插入图片",
|
|
80
|
-
insertSandpack: "插入 Sandpack",
|
|
81
|
-
table: "插入表格",
|
|
82
|
-
thematicBreak: "插入主题换行",
|
|
83
|
-
bulletedList: "无序列表",
|
|
84
|
-
numberedList: "有序列表",
|
|
85
|
-
checkList: "任务列表",
|
|
86
|
-
deleteSandpack: "删除 Sandpack",
|
|
87
|
-
undo: "撤销 {{shortcut}}",
|
|
88
|
-
redo: "重做 {{shortcut}}",
|
|
89
|
-
superscript: "上标",
|
|
90
|
-
subscript: "下标",
|
|
91
|
-
strikethrough: "删除线",
|
|
92
|
-
removeSubscript: "移除下标",
|
|
93
|
-
removeSuperscript: "移除上标",
|
|
94
|
-
removeStrikethrough: "移除删除线"
|
|
95
|
-
},
|
|
96
|
-
admonitions: {
|
|
97
|
-
note: "注意",
|
|
98
|
-
tip: "提示",
|
|
99
|
-
danger: "危险",
|
|
100
|
-
info: "信息",
|
|
101
|
-
caution: "警告",
|
|
102
|
-
changeType: "选择注释区块类型",
|
|
103
|
-
placeholder: "注释区块类型"
|
|
104
|
-
},
|
|
105
|
-
codeBlock: {
|
|
106
|
-
language: "代码块语言",
|
|
107
|
-
selectLanguage: "选择代码块语言",
|
|
108
|
-
inlineLanguage: "代码块语言"
|
|
109
|
-
},
|
|
110
|
-
codeblock: {
|
|
111
|
-
delete: "删除代码块"
|
|
112
|
-
},
|
|
113
|
-
contentArea: {
|
|
114
|
-
editableMarkdown: "可编辑的 Markdown"
|
|
115
|
-
},
|
|
116
|
-
image: {
|
|
117
|
-
delete: "删除图片"
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
export {
|
|
121
|
-
t as default
|
|
122
|
-
};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import "./index.css";
|
|
2
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
-
/* empty css */
|
|
4
|
-
/* empty css */
|
|
5
|
-
import p from "react-markdown";
|
|
6
|
-
import { cx as f, css as g } from "@emotion/css";
|
|
7
|
-
import { githubMarkdownDarkStyle as h, githubMarkdownLightStyle as d, markdownStyle as w } from "./style.js";
|
|
8
|
-
import u from "remark-gfm";
|
|
9
|
-
import L from "remark-emoji";
|
|
10
|
-
import R from "rehype-raw";
|
|
11
|
-
import { Prism as k } from "react-syntax-highlighter";
|
|
12
|
-
import { oneLight as N } from "react-syntax-highlighter/dist/esm/styles/prism";
|
|
13
|
-
import { isDarkScheme as y } from "./utils.js";
|
|
14
|
-
import P from "rc-image";
|
|
15
|
-
import { RiArrowUpDownLine as v, RiArrowLeftRightLine as x, RiArrowRightLine as A, RiArrowLeftLine as S, RiCloseLine as z, RiZoomOutLine as D, RiZoomInLine as I, RiClockwise2Line as M, RiAnticlockwise2Line as b } from "@remixicon/react";
|
|
16
|
-
/* empty css */
|
|
17
|
-
const V = (n) => {
|
|
18
|
-
const { children: a = "", className: s, theme: c = "auto", imageProps: l } = n;
|
|
19
|
-
return /* @__PURE__ */ e(
|
|
20
|
-
"div",
|
|
21
|
-
{
|
|
22
|
-
className: y(c) ? h : d,
|
|
23
|
-
children: /* @__PURE__ */ e(
|
|
24
|
-
p,
|
|
25
|
-
{
|
|
26
|
-
className: f(w, s),
|
|
27
|
-
remarkPlugins: [u, L],
|
|
28
|
-
rehypePlugins: [R],
|
|
29
|
-
components: {
|
|
30
|
-
code(i) {
|
|
31
|
-
const { children: r, className: o, node: j, ref: C, ...t } = i, m = /language-(\w+)/.exec(o || "");
|
|
32
|
-
return m ? /* @__PURE__ */ e(
|
|
33
|
-
k,
|
|
34
|
-
{
|
|
35
|
-
...t,
|
|
36
|
-
PreTag: "div",
|
|
37
|
-
children: String(r).replace(/\n$/, ""),
|
|
38
|
-
language: m[1],
|
|
39
|
-
style: N
|
|
40
|
-
}
|
|
41
|
-
) : /* @__PURE__ */ e("code", { ...t, className: o, children: r });
|
|
42
|
-
},
|
|
43
|
-
img(i) {
|
|
44
|
-
const { preview: r, ...o } = l ?? {};
|
|
45
|
-
return /* @__PURE__ */ e(
|
|
46
|
-
P,
|
|
47
|
-
{
|
|
48
|
-
...i,
|
|
49
|
-
preview: r instanceof Boolean ? r : {
|
|
50
|
-
icons: {
|
|
51
|
-
rotateLeft: /* @__PURE__ */ e(b, {}),
|
|
52
|
-
rotateRight: /* @__PURE__ */ e(M, {}),
|
|
53
|
-
zoomIn: /* @__PURE__ */ e(I, {}),
|
|
54
|
-
zoomOut: /* @__PURE__ */ e(D, {}),
|
|
55
|
-
close: /* @__PURE__ */ e(z, {}),
|
|
56
|
-
left: /* @__PURE__ */ e(S, {}),
|
|
57
|
-
right: /* @__PURE__ */ e(A, {}),
|
|
58
|
-
flipX: /* @__PURE__ */ e(x, {}),
|
|
59
|
-
flipY: /* @__PURE__ */ e(v, {})
|
|
60
|
-
},
|
|
61
|
-
zIndex: 9999,
|
|
62
|
-
mask: " ",
|
|
63
|
-
...r
|
|
64
|
-
},
|
|
65
|
-
className: g`
|
|
66
|
-
cursor: zoom-in;
|
|
67
|
-
`,
|
|
68
|
-
...o
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
children: a
|
|
74
|
-
}
|
|
75
|
-
)
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
};
|
|
79
|
-
export {
|
|
80
|
-
V as default
|
|
81
|
-
};
|