@haklex/rich-renderer-mention 0.0.65 → 0.0.67

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 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 @haklex/rich-editor
8
+ pnpm add @haklex/rich-renderer-mention
9
9
  ```
10
10
 
11
- ## 导出
11
+ ## Peer Dependencies
12
12
 
13
- ```ts
14
- export { MentionRenderer } from './MentionRenderer'
15
- export { MentionEditRenderer } from './MentionEditRenderer'
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
- const config: RendererConfig = {
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":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAQ7D,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,oBAAoB,2CAQ9D"}
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", editActions: "rich-mention-edit-actions", editActionButton: "rich-mention-edit-action-btn", editActionButtonEnd: "rich-mention-edit-action-btn--end" };
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
- var editActions = "b6sgtub";
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
- size: "1em",
35
- className: `${mentionIconGitHub} ${semanticClassNames.mentionIconGitHub}`
29
+ className: `${mentionIconGitHub} ${semanticClassNames.mentionIconGitHub}`,
30
+ size: "1em"
36
31
  }
37
32
  );
38
- const TwitterIcon = /* @__PURE__ */ jsx(SiX, { size: "1em", color: "#1DA1F2" });
39
- const TelegramIcon = /* @__PURE__ */ jsx(SiTelegram, { size: "1em", color: "#2AABEE" });
40
- const ZhihuIcon = /* @__PURE__ */ jsx(SiZhihu, { size: "1em", color: "#0084FF" });
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
- "span",
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
- children: [
110
- "@",
111
- label
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, }: MentionRendererProps): import("react/jsx-runtime").JSX.Element;
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":"AAUA,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAA;CACnC;AAMD,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,QAAQ,GACT,EAAE;IACD,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAA;IAC9C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,2CAIA;AAED,wBAAgB,iBAAiB,wCAEhC;AAYD,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAsB/D,CAAA;AAED,eAAO,MAAM,YAAY,UAA+B,CAAA;AAExD,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,MAAM,EACN,WAAW,GACZ,EAAE,oBAAoB,2CAwCtB"}
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, i as editActions, j as editActionButton, k as editActionButtonEnd } from "./MentionRenderer-Cy9vBX1i.js";
10
- import { M } from "./MentionRenderer-Cy9vBX1i.js";
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
- ref: wrapperRef,
114
- className: `${editTrigger} ${semanticClassNames.editTrigger}`
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
- "div",
136
- {
137
- className: `${editField} ${semanticClassNames.editField}`,
138
- children: [
139
- /* @__PURE__ */ jsx(
140
- "span",
141
- {
142
- className: `${editFieldIcon} ${semanticClassNames.editFieldIcon}`,
143
- style: { fontSize: vars.typography.fontSizeMd },
144
- "aria-hidden": true,
145
- children: platformMetaMap[editPlatform]?.icon ?? /* @__PURE__ */ jsx(AtSign, { size: 14 })
146
- }
147
- ),
148
- /* @__PURE__ */ jsx(
149
- "select",
150
- {
151
- className: `${editSelect} ${semanticClassNames.editSelect}`,
152
- value: editPlatform,
153
- onChange: (e) => setEditPlatform(e.target.value),
154
- children: platformKeys.map((key) => /* @__PURE__ */ jsx("option", { value: key, children: platformMetaMap[key].label }, key))
155
- }
156
- )
157
- ]
158
- }
159
- ),
160
- /* @__PURE__ */ jsxs(
161
- "div",
162
- {
163
- className: `${editField} ${semanticClassNames.editField}`,
164
- children: [
165
- /* @__PURE__ */ jsx(
166
- AtSign,
167
- {
168
- className: `${editFieldIcon} ${semanticClassNames.editFieldIcon}`,
169
- size: 14
170
- }
171
- ),
172
- /* @__PURE__ */ jsx(
173
- "input",
174
- {
175
- className: `${editInput} ${semanticClassNames.editInput}`,
176
- type: "text",
177
- value: editHandle,
178
- onChange: (e) => setEditHandle(e.target.value),
179
- onKeyDown: handleKeyDown,
180
- placeholder: "handle"
181
- }
182
- )
183
- ]
184
- }
185
- ),
186
- /* @__PURE__ */ jsxs(
187
- "div",
188
- {
189
- className: `${editField} ${semanticClassNames.editField}`,
190
- children: [
191
- /* @__PURE__ */ jsx(
192
- User,
193
- {
194
- className: `${editFieldIcon} ${semanticClassNames.editFieldIcon}`,
195
- size: 14
196
- }
197
- ),
198
- /* @__PURE__ */ jsx(
199
- "input",
200
- {
201
- className: `${editInput} ${semanticClassNames.editInput}`,
202
- type: "text",
203
- value: editDisplayName,
204
- onChange: (e) => setEditDisplayName(e.target.value),
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
@@ -1,4 +1,4 @@
1
- import { M, a, p, b } from "./MentionRenderer-Cy9vBX1i.js";
1
+ import { M, a, p, b } from "./MentionRenderer-BGEFZlMr.js";
2
2
  export {
3
3
  M as MentionPlatformProvider,
4
4
  a as MentionRenderer,
@@ -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
@@ -1 +1 @@
1
- {"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../src/styles.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;CAerB,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;AAEF,eAAO,MAAM,WAAW,QAItB,CAAA;AAEF,eAAO,MAAM,gBAAgB,QAoB3B,CAAA;AAEF,eAAO,MAAM,mBAAmB,QAE9B,CAAA"}
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,9 +1,14 @@
1
1
  {
2
2
  "name": "@haklex/rich-renderer-mention",
3
- "type": "module",
4
- "version": "0.0.65",
3
+ "version": "0.0.67",
5
4
  "description": "Social mention renderer with platform badges",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/Innei/haklex.git",
8
+ "directory": "packages/rich-renderer-mention"
9
+ },
6
10
  "license": "MIT",
11
+ "type": "module",
7
12
  "exports": {
8
13
  ".": {
9
14
  "import": "./dist/index.mjs",
@@ -19,18 +24,12 @@
19
24
  "files": [
20
25
  "dist"
21
26
  ],
22
- "peerDependencies": {
23
- "@lexical/react": "^0.41.0",
24
- "lexical": "^0.41.0",
25
- "react": ">=19",
26
- "react-dom": ">=19"
27
- },
28
27
  "dependencies": {
29
28
  "@icons-pack/react-simple-icons": "^13.12.0",
30
29
  "lucide-react": "^0.577.0",
31
- "@haklex/rich-editor": "0.0.65",
32
- "@haklex/rich-editor-ui": "0.0.65",
33
- "@haklex/rich-style-token": "0.0.65"
30
+ "@haklex/rich-editor": "0.0.67",
31
+ "@haklex/rich-style-token": "0.0.67",
32
+ "@haklex/rich-editor-ui": "0.0.67"
34
33
  },
35
34
  "devDependencies": {
36
35
  "@lexical/react": "^0.41.0",
@@ -45,6 +44,12 @@
45
44
  "vite": "^7.3.1",
46
45
  "vite-plugin-dts": "^4.5.4"
47
46
  },
47
+ "peerDependencies": {
48
+ "@lexical/react": "^0.41.0",
49
+ "lexical": "^0.41.0",
50
+ "react": ">=19",
51
+ "react-dom": ">=19"
52
+ },
48
53
  "publishConfig": {
49
54
  "access": "public"
50
55
  },