@haklex/rich-renderer-mention 0.0.65 → 0.0.66
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/README.md +62 -12
- package/dist/MentionEditRenderer.d.ts.map +1 -1
- package/dist/{MentionRenderer-Cy9vBX1i.js → MentionRenderer-BGEFZlMr.js} +32 -56
- package/dist/MentionRenderer.d.ts +5 -5
- package/dist/MentionRenderer.d.ts.map +1 -1
- package/dist/index.mjs +83 -144
- package/dist/rich-renderer-mention.css +1 -1
- package/dist/static.mjs +1 -1
- package/dist/styles.css.d.ts +0 -6
- package/dist/styles.css.d.ts.map +1 -1
- package/package.json +9 -4
package/README.md
CHANGED
|
@@ -1,31 +1,81 @@
|
|
|
1
1
|
# @haklex/rich-renderer-mention
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Social mention badge renderer with platform-specific icons and styling.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
pnpm add @haklex/rich-renderer-mention
|
|
8
|
+
pnpm add @haklex/rich-renderer-mention
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Peer Dependencies
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
| Package | Version |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| `lexical` | `^0.41.0` |
|
|
16
|
+
| `@lexical/react` | `^0.41.0` |
|
|
17
|
+
| `react` | `>=19` |
|
|
18
|
+
| `react-dom` | `>=19` |
|
|
17
19
|
|
|
18
|
-
##
|
|
20
|
+
## Usage
|
|
19
21
|
|
|
20
22
|
```tsx
|
|
21
|
-
import { MentionRenderer } from '@haklex/rich-renderer-mention'
|
|
22
|
-
import type { RendererConfig } from '@haklex/rich-editor'
|
|
23
|
+
import { MentionRenderer } from '@haklex/rich-renderer-mention/static'
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
// Register in a static RendererConfig
|
|
26
|
+
const rendererConfig = {
|
|
27
|
+
// ...other renderers
|
|
25
28
|
Mention: MentionRenderer,
|
|
26
29
|
}
|
|
27
30
|
```
|
|
28
31
|
|
|
32
|
+
For edit mode:
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
import { MentionEditRenderer } from '@haklex/rich-renderer-mention'
|
|
36
|
+
|
|
37
|
+
const editRendererConfig = {
|
|
38
|
+
// ...other renderers
|
|
39
|
+
Mention: MentionEditRenderer,
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Configuring platform metadata
|
|
44
|
+
|
|
45
|
+
```tsx
|
|
46
|
+
import { MentionPlatformProvider, platformMetaMap, platformKeys } from '@haklex/rich-renderer-mention'
|
|
47
|
+
|
|
48
|
+
// Wrap your app with the provider to customize platform rendering
|
|
49
|
+
<MentionPlatformProvider>
|
|
50
|
+
{children}
|
|
51
|
+
</MentionPlatformProvider>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Exports
|
|
55
|
+
|
|
56
|
+
### Components
|
|
57
|
+
|
|
58
|
+
- `MentionRenderer` — Static (read-only) renderer for mention badges
|
|
59
|
+
- `MentionEditRenderer` — Edit (interactive) renderer with platform selection
|
|
60
|
+
|
|
61
|
+
### Context and Data
|
|
62
|
+
|
|
63
|
+
- `MentionPlatformProvider` — Provider for platform metadata configuration
|
|
64
|
+
- `platformMetaMap` — Map of platform names to their metadata (icons, colors, URLs)
|
|
65
|
+
- `platformKeys` — Array of all supported platform keys
|
|
66
|
+
|
|
67
|
+
### Sub-path Exports
|
|
68
|
+
|
|
69
|
+
| Path | Description |
|
|
70
|
+
| --- | --- |
|
|
71
|
+
| `@haklex/rich-renderer-mention` | Full exports (edit + static) |
|
|
72
|
+
| `@haklex/rich-renderer-mention/static` | Static-only renderer |
|
|
73
|
+
| `@haklex/rich-renderer-mention/style.css` | Stylesheet |
|
|
74
|
+
|
|
75
|
+
## Part of Haklex
|
|
76
|
+
|
|
77
|
+
This package is part of the [Haklex](../../README.md) rich editor ecosystem.
|
|
78
|
+
|
|
29
79
|
## License
|
|
30
80
|
|
|
31
81
|
MIT
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentionEditRenderer.d.ts","sourceRoot":"","sources":["../src/MentionEditRenderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MentionEditRenderer.d.ts","sourceRoot":"","sources":["../src/MentionEditRenderer.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAM9D,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,oBAAoB,2CAQ9D"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { SiZhihu, SiTelegram, SiX, SiGithub } from "@icons-pack/react-simple-icons";
|
|
3
3
|
import { createContext, use } from "react";
|
|
4
|
-
var semanticClassNames = { mention: "rich-mention", mentionIcon: "rich-mention-icon", mentionIconGitHub: "rich-mention-icon-gh", mentionHandle: "rich-mention-handle", mentionPlain: "rich-mention-plain", editPanel: "rich-mention-edit-panel", editField: "rich-mention-edit-field", editTrigger: "rich-mention-edit-trigger", editFieldIcon: "rich-mention-edit-field-icon", editInput: "rich-mention-edit-input", editSelect: "rich-mention-edit-select"
|
|
4
|
+
var semanticClassNames = { mention: "rich-mention", mentionIcon: "rich-mention-icon", mentionIconGitHub: "rich-mention-icon-gh", mentionHandle: "rich-mention-handle", mentionPlain: "rich-mention-plain", editPanel: "rich-mention-edit-panel", editField: "rich-mention-edit-field", editTrigger: "rich-mention-edit-trigger", editFieldIcon: "rich-mention-edit-field-icon", editInput: "rich-mention-edit-input", editSelect: "rich-mention-edit-select" };
|
|
5
5
|
var mention = "b6sgtu0";
|
|
6
6
|
var mentionPlain = "b6sgtu1";
|
|
7
7
|
var mentionIcon = "b6sgtu2";
|
|
@@ -13,12 +13,7 @@ var editTrigger = "b6sgtu7";
|
|
|
13
13
|
var editFieldIcon = "b6sgtu8";
|
|
14
14
|
var editInput = "b6sgtu9";
|
|
15
15
|
var editSelect = "b6sgtua";
|
|
16
|
-
|
|
17
|
-
var editActionButton = "b6sgtuc";
|
|
18
|
-
var editActionButtonEnd = "b6sgtud";
|
|
19
|
-
const ExtraPlatformContext = createContext(
|
|
20
|
-
{}
|
|
21
|
-
);
|
|
16
|
+
const ExtraPlatformContext = createContext({});
|
|
22
17
|
function MentionPlatformProvider({
|
|
23
18
|
platforms,
|
|
24
19
|
children
|
|
@@ -31,13 +26,13 @@ function useExtraPlatforms() {
|
|
|
31
26
|
const GitHubIcon = /* @__PURE__ */ jsx(
|
|
32
27
|
SiGithub,
|
|
33
28
|
{
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
className: `${mentionIconGitHub} ${semanticClassNames.mentionIconGitHub}`,
|
|
30
|
+
size: "1em"
|
|
36
31
|
}
|
|
37
32
|
);
|
|
38
|
-
const TwitterIcon = /* @__PURE__ */ jsx(SiX, {
|
|
39
|
-
const TelegramIcon = /* @__PURE__ */ jsx(SiTelegram, {
|
|
40
|
-
const ZhihuIcon = /* @__PURE__ */ jsx(SiZhihu, {
|
|
33
|
+
const TwitterIcon = /* @__PURE__ */ jsx(SiX, { color: "#1DA1F2", size: "1em" });
|
|
34
|
+
const TelegramIcon = /* @__PURE__ */ jsx(SiTelegram, { color: "#2AABEE", size: "1em" });
|
|
35
|
+
const ZhihuIcon = /* @__PURE__ */ jsx(SiZhihu, { color: "#0084FF", size: "1em" });
|
|
41
36
|
const platformMetaMap = {
|
|
42
37
|
GH: {
|
|
43
38
|
label: "GitHub",
|
|
@@ -61,57 +56,41 @@ const platformMetaMap = {
|
|
|
61
56
|
}
|
|
62
57
|
};
|
|
63
58
|
const platformKeys = Object.keys(platformMetaMap);
|
|
64
|
-
function MentionRenderer({
|
|
65
|
-
platform,
|
|
66
|
-
handle,
|
|
67
|
-
displayName
|
|
68
|
-
}) {
|
|
59
|
+
function MentionRenderer({ platform, handle, displayName }) {
|
|
69
60
|
const extraPlatforms = useExtraPlatforms();
|
|
70
61
|
const normalizedHandle = handle.replace(/^@+/, "");
|
|
71
62
|
const meta = platformMetaMap[platform] ?? extraPlatforms[platform];
|
|
72
63
|
const label = displayName || normalizedHandle;
|
|
73
64
|
if (meta) {
|
|
74
|
-
return /* @__PURE__ */ jsxs(
|
|
75
|
-
|
|
76
|
-
{
|
|
77
|
-
className: `${mention} ${semanticClassNames.mention}`,
|
|
78
|
-
children: [
|
|
79
|
-
/* @__PURE__ */ jsx(
|
|
80
|
-
"span",
|
|
81
|
-
{
|
|
82
|
-
className: `${mentionIcon} ${semanticClassNames.mentionIcon}`,
|
|
83
|
-
"aria-hidden": true,
|
|
84
|
-
children: meta.icon
|
|
85
|
-
}
|
|
86
|
-
),
|
|
87
|
-
/* @__PURE__ */ jsx(
|
|
88
|
-
"a",
|
|
89
|
-
{
|
|
90
|
-
className: `${mentionHandle} ${semanticClassNames.mentionHandle}`,
|
|
91
|
-
href: meta.getUrl(normalizedHandle),
|
|
92
|
-
target: "_blank",
|
|
93
|
-
rel: "noopener noreferrer",
|
|
94
|
-
children: label
|
|
95
|
-
}
|
|
96
|
-
)
|
|
97
|
-
]
|
|
98
|
-
}
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
return /* @__PURE__ */ jsx(
|
|
102
|
-
"span",
|
|
103
|
-
{
|
|
104
|
-
className: `${mention} ${semanticClassNames.mention} ${mentionPlain} ${semanticClassNames.mentionPlain}`,
|
|
105
|
-
children: /* @__PURE__ */ jsxs(
|
|
65
|
+
return /* @__PURE__ */ jsxs("span", { className: `${mention} ${semanticClassNames.mention}`, children: [
|
|
66
|
+
/* @__PURE__ */ jsx(
|
|
106
67
|
"span",
|
|
68
|
+
{
|
|
69
|
+
"aria-hidden": true,
|
|
70
|
+
className: `${mentionIcon} ${semanticClassNames.mentionIcon}`,
|
|
71
|
+
children: meta.icon
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ jsx(
|
|
75
|
+
"a",
|
|
107
76
|
{
|
|
108
77
|
className: `${mentionHandle} ${semanticClassNames.mentionHandle}`,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
78
|
+
href: meta.getUrl(normalizedHandle),
|
|
79
|
+
rel: "noopener noreferrer",
|
|
80
|
+
target: "_blank",
|
|
81
|
+
children: label
|
|
113
82
|
}
|
|
114
83
|
)
|
|
84
|
+
] });
|
|
85
|
+
}
|
|
86
|
+
return /* @__PURE__ */ jsx(
|
|
87
|
+
"span",
|
|
88
|
+
{
|
|
89
|
+
className: `${mention} ${semanticClassNames.mention} ${mentionPlain} ${semanticClassNames.mentionPlain}`,
|
|
90
|
+
children: /* @__PURE__ */ jsxs("span", { className: `${mentionHandle} ${semanticClassNames.mentionHandle}`, children: [
|
|
91
|
+
"@",
|
|
92
|
+
label
|
|
93
|
+
] })
|
|
115
94
|
}
|
|
116
95
|
);
|
|
117
96
|
}
|
|
@@ -125,9 +104,6 @@ export {
|
|
|
125
104
|
editFieldIcon as f,
|
|
126
105
|
editSelect as g,
|
|
127
106
|
editInput as h,
|
|
128
|
-
editActions as i,
|
|
129
|
-
editActionButton as j,
|
|
130
|
-
editActionButtonEnd as k,
|
|
131
107
|
platformKeys as p,
|
|
132
108
|
semanticClassNames as s
|
|
133
109
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export interface MentionRendererProps {
|
|
2
|
-
platform: string;
|
|
3
|
-
handle: string;
|
|
4
2
|
displayName?: string;
|
|
3
|
+
handle: string;
|
|
4
|
+
platform: string;
|
|
5
5
|
}
|
|
6
6
|
export interface MentionPlatformMeta {
|
|
7
|
-
label: string;
|
|
8
|
-
icon: React.ReactNode;
|
|
9
7
|
getUrl: (handle: string) => string;
|
|
8
|
+
icon: React.ReactNode;
|
|
9
|
+
label: string;
|
|
10
10
|
}
|
|
11
11
|
export declare function MentionPlatformProvider({ platforms, children, }: {
|
|
12
12
|
platforms: Record<string, MentionPlatformMeta>;
|
|
@@ -15,5 +15,5 @@ export declare function MentionPlatformProvider({ platforms, children, }: {
|
|
|
15
15
|
export declare function useExtraPlatforms(): Record<string, MentionPlatformMeta>;
|
|
16
16
|
export declare const platformMetaMap: Record<string, MentionPlatformMeta>;
|
|
17
17
|
export declare const platformKeys: string[];
|
|
18
|
-
export declare function MentionRenderer({ platform, handle, displayName
|
|
18
|
+
export declare function MentionRenderer({ platform, handle, displayName }: MentionRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
//# sourceMappingURL=MentionRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentionRenderer.d.ts","sourceRoot":"","sources":["../src/MentionRenderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MentionRenderer.d.ts","sourceRoot":"","sources":["../src/MentionRenderer.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,oBAAoB;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IACnC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;CACf;AAID,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,QAAQ,GACT,EAAE;IACD,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC/C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,2CAEA;AAED,wBAAgB,iBAAiB,wCAEhC;AAYD,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAqB/D,CAAC;AAEF,eAAO,MAAM,YAAY,UAA+B,CAAC;AAEzD,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,oBAAoB,2CAoCtF"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useRendererMode } from "@haklex/rich-editor";
|
|
3
|
-
import { Popover, PopoverTrigger, PopoverPanel } from "@haklex/rich-editor-ui";
|
|
3
|
+
import { Popover, PopoverTrigger, PopoverPanel, ActionBar, ActionButton } from "@haklex/rich-editor-ui";
|
|
4
4
|
import { vars } from "@haklex/rich-style-token";
|
|
5
5
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
6
6
|
import { $getNearestNodeFromDOMNode } from "lexical";
|
|
7
7
|
import { AtSign, User, ExternalLink, Trash2 } from "lucide-react";
|
|
8
8
|
import { useRef, useState, useEffect, useCallback } from "react";
|
|
9
|
-
import { a as MentionRenderer, b as platformMetaMap, e as editTrigger, s as semanticClassNames, c as editPanel, d as editField, f as editFieldIcon, g as editSelect, p as platformKeys, h as editInput
|
|
10
|
-
import { M } from "./MentionRenderer-
|
|
9
|
+
import { a as MentionRenderer, b as platformMetaMap, e as editTrigger, s as semanticClassNames, c as editPanel, d as editField, f as editFieldIcon, g as editSelect, p as platformKeys, h as editInput } from "./MentionRenderer-BGEFZlMr.js";
|
|
10
|
+
import { M } from "./MentionRenderer-BGEFZlMr.js";
|
|
11
|
+
const LEADING_AT_RE = /^@+/;
|
|
11
12
|
function MentionEditRenderer(props) {
|
|
12
13
|
const mode = useRendererMode();
|
|
13
14
|
if (mode !== "editor") {
|
|
@@ -15,11 +16,7 @@ function MentionEditRenderer(props) {
|
|
|
15
16
|
}
|
|
16
17
|
return /* @__PURE__ */ jsx(MentionEditRendererInner, { ...props });
|
|
17
18
|
}
|
|
18
|
-
function MentionEditRendererInner({
|
|
19
|
-
platform,
|
|
20
|
-
handle,
|
|
21
|
-
displayName
|
|
22
|
-
}) {
|
|
19
|
+
function MentionEditRendererInner({ platform, handle, displayName }) {
|
|
23
20
|
const [editor] = useLexicalComposerContext();
|
|
24
21
|
const editable = editor.isEditable();
|
|
25
22
|
const wrapperRef = useRef(null);
|
|
@@ -55,14 +52,10 @@ function MentionEditRendererInner({
|
|
|
55
52
|
setOpen(false);
|
|
56
53
|
}, [editor]);
|
|
57
54
|
const handleOpen = useCallback(() => {
|
|
58
|
-
const normalizedHandle = handle.replace(
|
|
55
|
+
const normalizedHandle = handle.replace(LEADING_AT_RE, "");
|
|
59
56
|
const meta = platformMetaMap[platform];
|
|
60
57
|
if (meta) {
|
|
61
|
-
window.open(
|
|
62
|
-
meta.getUrl(normalizedHandle),
|
|
63
|
-
"_blank",
|
|
64
|
-
"noopener,noreferrer"
|
|
65
|
-
);
|
|
58
|
+
window.open(meta.getUrl(normalizedHandle), "_blank", "noopener,noreferrer");
|
|
66
59
|
}
|
|
67
60
|
}, [platform, handle]);
|
|
68
61
|
const handleKeyDown = useCallback(
|
|
@@ -81,14 +74,7 @@ function MentionEditRendererInner({
|
|
|
81
74
|
[commitChanges, platform, handle, displayName]
|
|
82
75
|
);
|
|
83
76
|
if (!editable) {
|
|
84
|
-
return /* @__PURE__ */ jsx(
|
|
85
|
-
MentionRenderer,
|
|
86
|
-
{
|
|
87
|
-
platform,
|
|
88
|
-
handle,
|
|
89
|
-
displayName
|
|
90
|
-
}
|
|
91
|
-
);
|
|
77
|
+
return /* @__PURE__ */ jsx(MentionRenderer, { displayName, handle, platform });
|
|
92
78
|
}
|
|
93
79
|
return /* @__PURE__ */ jsxs(
|
|
94
80
|
Popover,
|
|
@@ -110,138 +96,91 @@ function MentionEditRendererInner({
|
|
|
110
96
|
render: /* @__PURE__ */ jsx(
|
|
111
97
|
"span",
|
|
112
98
|
{
|
|
113
|
-
|
|
114
|
-
|
|
99
|
+
className: `${editTrigger} ${semanticClassNames.editTrigger}`,
|
|
100
|
+
ref: wrapperRef
|
|
115
101
|
}
|
|
116
102
|
),
|
|
117
|
-
children: /* @__PURE__ */ jsx(
|
|
118
|
-
MentionRenderer,
|
|
119
|
-
{
|
|
120
|
-
platform,
|
|
121
|
-
handle,
|
|
122
|
-
displayName
|
|
123
|
-
}
|
|
124
|
-
)
|
|
103
|
+
children: /* @__PURE__ */ jsx(MentionRenderer, { displayName, handle, platform })
|
|
125
104
|
}
|
|
126
105
|
),
|
|
127
106
|
/* @__PURE__ */ jsxs(
|
|
128
107
|
PopoverPanel,
|
|
129
108
|
{
|
|
109
|
+
className: `${editPanel} ${semanticClassNames.editPanel}`,
|
|
130
110
|
side: "bottom",
|
|
131
111
|
sideOffset: 8,
|
|
132
|
-
className: `${editPanel} ${semanticClassNames.editPanel}`,
|
|
133
112
|
children: [
|
|
134
|
-
/* @__PURE__ */ jsxs(
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
onBlur: commitChanges,
|
|
206
|
-
onKeyDown: handleKeyDown,
|
|
207
|
-
placeholder: "Display name (optional)"
|
|
208
|
-
}
|
|
209
|
-
)
|
|
210
|
-
]
|
|
211
|
-
}
|
|
212
|
-
),
|
|
213
|
-
/* @__PURE__ */ jsxs(
|
|
214
|
-
"div",
|
|
215
|
-
{
|
|
216
|
-
className: `${editActions} ${semanticClassNames.editActions}`,
|
|
217
|
-
children: [
|
|
218
|
-
/* @__PURE__ */ jsxs(
|
|
219
|
-
"button",
|
|
220
|
-
{
|
|
221
|
-
className: `${editActionButton} ${semanticClassNames.editActionButton}`,
|
|
222
|
-
type: "button",
|
|
223
|
-
onClick: handleOpen,
|
|
224
|
-
children: [
|
|
225
|
-
/* @__PURE__ */ jsx(ExternalLink, { size: 14 }),
|
|
226
|
-
"Open"
|
|
227
|
-
]
|
|
228
|
-
}
|
|
229
|
-
),
|
|
230
|
-
/* @__PURE__ */ jsxs(
|
|
231
|
-
"button",
|
|
232
|
-
{
|
|
233
|
-
className: `${editActionButton} ${semanticClassNames.editActionButton} ${editActionButtonEnd} ${semanticClassNames.editActionButtonEnd}`,
|
|
234
|
-
type: "button",
|
|
235
|
-
onClick: handleDelete,
|
|
236
|
-
children: [
|
|
237
|
-
/* @__PURE__ */ jsx(Trash2, { size: 14 }),
|
|
238
|
-
"Remove"
|
|
239
|
-
]
|
|
240
|
-
}
|
|
241
|
-
)
|
|
242
|
-
]
|
|
243
|
-
}
|
|
244
|
-
)
|
|
113
|
+
/* @__PURE__ */ jsxs("div", { className: `${editField} ${semanticClassNames.editField}`, children: [
|
|
114
|
+
/* @__PURE__ */ jsx(
|
|
115
|
+
"span",
|
|
116
|
+
{
|
|
117
|
+
"aria-hidden": true,
|
|
118
|
+
className: `${editFieldIcon} ${semanticClassNames.editFieldIcon}`,
|
|
119
|
+
style: { fontSize: vars.typography.fontSizeMd },
|
|
120
|
+
children: platformMetaMap[editPlatform]?.icon ?? /* @__PURE__ */ jsx(AtSign, { size: 14 })
|
|
121
|
+
}
|
|
122
|
+
),
|
|
123
|
+
/* @__PURE__ */ jsx(
|
|
124
|
+
"select",
|
|
125
|
+
{
|
|
126
|
+
className: `${editSelect} ${semanticClassNames.editSelect}`,
|
|
127
|
+
value: editPlatform,
|
|
128
|
+
onChange: (e) => setEditPlatform(e.target.value),
|
|
129
|
+
children: platformKeys.map((key) => /* @__PURE__ */ jsx("option", { value: key, children: platformMetaMap[key].label }, key))
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
] }),
|
|
133
|
+
/* @__PURE__ */ jsxs("div", { className: `${editField} ${semanticClassNames.editField}`, children: [
|
|
134
|
+
/* @__PURE__ */ jsx(
|
|
135
|
+
AtSign,
|
|
136
|
+
{
|
|
137
|
+
className: `${editFieldIcon} ${semanticClassNames.editFieldIcon}`,
|
|
138
|
+
size: 14
|
|
139
|
+
}
|
|
140
|
+
),
|
|
141
|
+
/* @__PURE__ */ jsx(
|
|
142
|
+
"input",
|
|
143
|
+
{
|
|
144
|
+
className: `${editInput} ${semanticClassNames.editInput}`,
|
|
145
|
+
placeholder: "handle",
|
|
146
|
+
type: "text",
|
|
147
|
+
value: editHandle,
|
|
148
|
+
onChange: (e) => setEditHandle(e.target.value),
|
|
149
|
+
onKeyDown: handleKeyDown
|
|
150
|
+
}
|
|
151
|
+
)
|
|
152
|
+
] }),
|
|
153
|
+
/* @__PURE__ */ jsxs("div", { className: `${editField} ${semanticClassNames.editField}`, children: [
|
|
154
|
+
/* @__PURE__ */ jsx(
|
|
155
|
+
User,
|
|
156
|
+
{
|
|
157
|
+
className: `${editFieldIcon} ${semanticClassNames.editFieldIcon}`,
|
|
158
|
+
size: 14
|
|
159
|
+
}
|
|
160
|
+
),
|
|
161
|
+
/* @__PURE__ */ jsx(
|
|
162
|
+
"input",
|
|
163
|
+
{
|
|
164
|
+
className: `${editInput} ${semanticClassNames.editInput}`,
|
|
165
|
+
placeholder: "Display name (optional)",
|
|
166
|
+
type: "text",
|
|
167
|
+
value: editDisplayName,
|
|
168
|
+
onBlur: commitChanges,
|
|
169
|
+
onChange: (e) => setEditDisplayName(e.target.value),
|
|
170
|
+
onKeyDown: handleKeyDown
|
|
171
|
+
}
|
|
172
|
+
)
|
|
173
|
+
] }),
|
|
174
|
+
/* @__PURE__ */ jsxs(ActionBar, { children: [
|
|
175
|
+
/* @__PURE__ */ jsxs(ActionButton, { onClick: handleOpen, children: [
|
|
176
|
+
/* @__PURE__ */ jsx(ExternalLink, { size: 14 }),
|
|
177
|
+
"Open"
|
|
178
|
+
] }),
|
|
179
|
+
/* @__PURE__ */ jsxs(ActionButton, { danger: true, onClick: handleDelete, children: [
|
|
180
|
+
/* @__PURE__ */ jsx(Trash2, { size: 14 }),
|
|
181
|
+
"Remove"
|
|
182
|
+
] })
|
|
183
|
+
] })
|
|
245
184
|
]
|
|
246
185
|
}
|
|
247
186
|
)
|
|
@@ -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}._1f8km6h0{--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}._1f8km6h1{--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}._1f8km6h2{--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 ._1f8km6h0,[data-theme=dark] ._1f8km6h0,.dark._1f8km6h0,[data-theme=dark]._1f8km6h0,.dark ._1f8km6h1,[data-theme=dark] ._1f8km6h1,.dark._1f8km6h1,[data-theme=dark]._1f8km6h1,.dark ._1f8km6h2,[data-theme=dark] ._1f8km6h2,.dark._1f8km6h2,[data-theme=dark]._1f8km6h2{--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)}.b6sgtu0{display:inline-flex;align-items:center;gap:.3em;padding:.05em .55em;margin-inline:.25em;border-radius:999px;background:var(--rc-bg-secondary);border:1px solid var(--rc-border);vertical-align:text-bottom;white-space:nowrap;font-family:var(--rc-font-family);font-size:var(--rc-font-size-sm);line-height:1.5;color:var(--rc-text);transition:border-color .15s ease}.b6sgtu0:hover{border-color:var(--rc-accent)}.b6sgtu1{color:var(--rc-text-secondary)}.b6sgtu2{display:inline-flex;align-items:center;flex-shrink:0}.b6sgtu2 svg{display:inline;height:.85em;width:.85em}.b6sgtu3{fill:currentColor}.b6sgtu4{text-decoration:none;color:inherit;font-weight:500;font-family:var(--rc-font-family-sans)}.b6sgtu5{display:flex;flex-direction:column;gap:8px;width:300px;padding:12px;font-size:var(--rc-font-size-sm);font-family:var(--rc-font-family)}.b6sgtu6{display:flex;align-items:center;gap:8px;padding:6px 10px;background-color:var(--rc-bg-secondary);border-radius:6px;min-width:0}.b6sgtu7{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;margin-inline:.15em}.b6sgtu7 a{pointer-events:none}.b6sgtu8{display:inline-flex;align-items:center;justify-content:center}.b6sgtu9{flex:1;appearance:none;border:none;background-color:transparent;color:inherit;font-size:var(--rc-font-size-sm);padding:0;outline:none;min-width:0}.b6sgtu9::placeholder{color:var(--rc-text-secondary)}.b6sgtua{flex:1;appearance:none;border:none;background-color:transparent;color:inherit;font-size:var(--rc-font-size-sm);padding:0;outline:none;cursor:pointer;min-width:0}.b6sgtub{display:flex;align-items:center;gap:4px}.b6sgtuc{display:inline-flex;align-items:center;gap:6px;appearance:none;border:none;background:none;color:inherit;font-size:var(--rc-font-size-sm);font-weight:500;cursor:pointer;padding:4px 8px;border-radius:4px;transition:color .15s ease,background-color .15s ease;white-space:nowrap}.b6sgtuc:hover{background-color:var(--rc-fill-secondary)}.b6sgtud{margin-left:auto}
|
|
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}._1f8km6h0{--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}._1f8km6h1{--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}._1f8km6h2{--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 ._1f8km6h0,[data-theme=dark] ._1f8km6h0,.dark._1f8km6h0,[data-theme=dark]._1f8km6h0,.dark ._1f8km6h1,[data-theme=dark] ._1f8km6h1,.dark._1f8km6h1,[data-theme=dark]._1f8km6h1,.dark ._1f8km6h2,[data-theme=dark] ._1f8km6h2,.dark._1f8km6h2,[data-theme=dark]._1f8km6h2{--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)}.b6sgtu0{display:inline-flex;align-items:center;gap:.3em;padding:.05em .55em;margin-inline:.25em;border-radius:999px;background:var(--rc-bg-secondary);border:1px solid var(--rc-border);vertical-align:text-bottom;white-space:nowrap;font-family:var(--rc-font-family);font-size:var(--rc-font-size-sm);line-height:1.5;color:var(--rc-text);transition:border-color .15s ease}.b6sgtu0:hover{border-color:var(--rc-accent)}.b6sgtu1{color:var(--rc-text-secondary)}.b6sgtu2{display:inline-flex;align-items:center;flex-shrink:0}.b6sgtu2 svg{display:inline;height:.85em;width:.85em}.b6sgtu3{fill:currentColor}.b6sgtu4{text-decoration:none;color:inherit;font-weight:500;font-family:var(--rc-font-family-sans)}.b6sgtu5{display:flex;flex-direction:column;gap:8px;width:300px;padding:12px;font-size:var(--rc-font-size-sm);font-family:var(--rc-font-family)}.b6sgtu6{display:flex;align-items:center;gap:8px;padding:6px 10px;background-color:var(--rc-bg-secondary);border-radius:6px;min-width:0}.b6sgtu7{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;margin-inline:.15em}.b6sgtu7 a{pointer-events:none}.b6sgtu8{display:inline-flex;align-items:center;justify-content:center}.b6sgtu9{flex:1;appearance:none;border:none;background-color:transparent;color:inherit;font-size:var(--rc-font-size-sm);padding:0;outline:none;min-width:0}.b6sgtu9::placeholder{color:var(--rc-text-secondary)}.b6sgtua{flex:1;appearance:none;border:none;background-color:transparent;color:inherit;font-size:var(--rc-font-size-sm);padding:0;outline:none;cursor:pointer;min-width:0}
|
package/dist/static.mjs
CHANGED
package/dist/styles.css.d.ts
CHANGED
|
@@ -10,9 +10,6 @@ export declare const semanticClassNames: {
|
|
|
10
10
|
readonly editFieldIcon: "rich-mention-edit-field-icon";
|
|
11
11
|
readonly editInput: "rich-mention-edit-input";
|
|
12
12
|
readonly editSelect: "rich-mention-edit-select";
|
|
13
|
-
readonly editActions: "rich-mention-edit-actions";
|
|
14
|
-
readonly editActionButton: "rich-mention-edit-action-btn";
|
|
15
|
-
readonly editActionButtonEnd: "rich-mention-edit-action-btn--end";
|
|
16
13
|
};
|
|
17
14
|
export declare const mention: string;
|
|
18
15
|
export declare const mentionPlain: string;
|
|
@@ -25,7 +22,4 @@ export declare const editTrigger: string;
|
|
|
25
22
|
export declare const editFieldIcon: string;
|
|
26
23
|
export declare const editInput: string;
|
|
27
24
|
export declare const editSelect: string;
|
|
28
|
-
export declare const editActions: string;
|
|
29
|
-
export declare const editActionButton: string;
|
|
30
|
-
export declare const editActionButtonEnd: string;
|
|
31
25
|
//# sourceMappingURL=styles.css.d.ts.map
|
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":"AAGA,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../src/styles.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;CAYrB,CAAA;AAGV,eAAO,MAAM,OAAO,QAqBlB,CAAA;AAEF,eAAO,MAAM,YAAY,QAEvB,CAAA;AAEF,eAAO,MAAM,WAAW,QAItB,CAAA;AAQF,eAAO,MAAM,iBAAiB,QAE5B,CAAA;AAEF,eAAO,MAAM,aAAa,QAKxB,CAAA;AAGF,eAAO,MAAM,SAAS,QAQpB,CAAA;AAEF,eAAO,MAAM,SAAS,QAQpB,CAAA;AAEF,eAAO,MAAM,WAAW,QAMtB,CAAA;AAMF,eAAO,MAAM,aAAa,QAIxB,CAAA;AAEF,eAAO,MAAM,SAAS,QAepB,CAAA;AAEF,eAAO,MAAM,UAAU,QAWrB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-renderer-mention",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.66",
|
|
5
5
|
"description": "Social mention renderer with platform badges",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"exports": {
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@icons-pack/react-simple-icons": "^13.12.0",
|
|
30
30
|
"lucide-react": "^0.577.0",
|
|
31
|
-
"@haklex/rich-editor": "0.0.
|
|
32
|
-
"@haklex/rich-
|
|
33
|
-
"@haklex/rich-
|
|
31
|
+
"@haklex/rich-editor": "0.0.66",
|
|
32
|
+
"@haklex/rich-style-token": "0.0.66",
|
|
33
|
+
"@haklex/rich-editor-ui": "0.0.66"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@lexical/react": "^0.41.0",
|
|
@@ -48,6 +48,11 @@
|
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
|
+
"repository": {
|
|
52
|
+
"type": "git",
|
|
53
|
+
"url": "https://github.com/Innei/haklex.git",
|
|
54
|
+
"directory": "packages/rich-renderer-mention"
|
|
55
|
+
},
|
|
51
56
|
"scripts": {
|
|
52
57
|
"build": "vite build",
|
|
53
58
|
"dev:build": "vite build --watch"
|