@haklex/rich-plugin-agent-stream 0.0.0-stage → 0.62.2
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 +60 -2
- package/dist/AgentStreamPlugin.d.ts +13 -0
- package/dist/AgentStreamPlugin.d.ts.map +1 -0
- package/dist/dom.d.ts +20 -0
- package/dist/dom.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +471 -0
- package/dist/plan.d.ts +15 -0
- package/dist/plan.d.ts.map +1 -0
- package/dist/player.d.ts +17 -0
- package/dist/player.d.ts.map +1 -0
- package/dist/queue.d.ts +33 -0
- package/dist/queue.d.ts.map +1 -0
- package/dist/rich-plugin-agent-stream.css +2 -0
- package/dist/styles.css.d.ts +6 -0
- package/dist/styles.css.d.ts.map +1 -0
- package/package.json +53 -3
package/README.md
CHANGED
|
@@ -1,3 +1,61 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @haklex/rich-plugin-agent-stream
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Plays agent writes into a Haklex editor as a streaming reveal: the data lands in one update, the plugin reveals the new text character by character with a virtual caret.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @haklex/rich-plugin-agent-stream
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import '@haklex/rich-plugin-agent-stream/style.css';
|
|
15
|
+
import { AgentStreamPlugin } from '@haklex/rich-plugin-agent-stream';
|
|
16
|
+
|
|
17
|
+
<RichEditor>
|
|
18
|
+
<AgentStreamPlugin agentName="Claude" />
|
|
19
|
+
</RichEditor>;
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
With `@haklex/rich-collab-loro`, imports whose changes carry an `agent:` commit message (and are less than 15 seconds old) are played automatically. Older changes, such as those caught up after a reconnect, show at once.
|
|
23
|
+
|
|
24
|
+
Two things the writer must get right:
|
|
25
|
+
|
|
26
|
+
- Loro merges consecutive changes from the same peer with the same commit message, and the merged change keeps the first timestamp. A writer that reuses one peer for several agent writes must give each write a distinct message (for example `agent: <summary> #<n>`) or use a fresh peer per write; otherwise playback stops about 15 seconds into the session.
|
|
27
|
+
- The window compares the writer's clock with the viewer's. Pass `createLoroBinding(editor, doc, { agentLiveWindowSeconds })` to widen it when clocks may drift.
|
|
28
|
+
|
|
29
|
+
Without CRDT, wrap the write:
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import { playAgentWrite } from '@haklex/rich-plugin-agent-stream';
|
|
33
|
+
|
|
34
|
+
playAgentWrite(editor, () => {
|
|
35
|
+
$getRoot().append(paragraph);
|
|
36
|
+
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Props
|
|
40
|
+
|
|
41
|
+
| Prop | Default | Meaning |
|
|
42
|
+
| ------------------ | ------- | ---------------------------------------------------------- |
|
|
43
|
+
| `agentName` | `"AI"` | Label above the caret |
|
|
44
|
+
| `charsPerSecond` | `80` | Base reveal speed |
|
|
45
|
+
| `maxSeconds` | `3` | Longest playback of one write; longer writes speed up |
|
|
46
|
+
| `backlogSeconds` | `6` | Queued playback beyond this is shown at once |
|
|
47
|
+
| `scrollContainer` | nearest | Element followed while the caret moves |
|
|
48
|
+
| `onPlaybackChange` | — | `({ playing, blockKey })` when playback starts/moves/stops |
|
|
49
|
+
|
|
50
|
+
Text blocks (paragraph, heading, quote) reveal character by character; other blocks appear when the reveal reaches them. Typing, pasting or clicking in the editor ends playback immediately. Browsers without the CSS Custom Highlight API show writes without playback.
|
|
51
|
+
|
|
52
|
+
## Peer Dependencies
|
|
53
|
+
|
|
54
|
+
| Package | Version |
|
|
55
|
+
| -------------------------- | --------- |
|
|
56
|
+
| `@haklex/rich-style-token` | workspace |
|
|
57
|
+
| `@lexical/react` | `^0.53.0` |
|
|
58
|
+
| `@lexical/rich-text` | `^0.53.0` |
|
|
59
|
+
| `lexical` | `^0.53.0` |
|
|
60
|
+
| `react` | `>= 19` |
|
|
61
|
+
| `react-dom` | `>= 19` |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PlaybackState } from './player';
|
|
2
|
+
export interface AgentStreamPluginProps {
|
|
3
|
+
agentName?: string;
|
|
4
|
+
backlogSeconds?: number;
|
|
5
|
+
charsPerSecond?: number;
|
|
6
|
+
maxSeconds?: number;
|
|
7
|
+
onPlaybackChange?: (state: PlaybackState) => void;
|
|
8
|
+
scrollContainer?: HTMLElement | null | {
|
|
9
|
+
current: HTMLElement | null;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export declare function AgentStreamPlugin({ agentName, backlogSeconds, charsPerSecond, maxSeconds, onPlaybackChange, scrollContainer, }: AgentStreamPluginProps): null;
|
|
13
|
+
//# sourceMappingURL=AgentStreamPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentStreamPlugin.d.ts","sourceRoot":"","sources":["../src/AgentStreamPlugin.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA2B,KAAK,aAAa,EAAsB,MAAM,UAAU,CAAC;AAE3F,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAClD,eAAe,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG;QAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAAA;KAAE,CAAC;CACxE;AAKD,wBAAgB,iBAAiB,CAAC,EAChC,SAAgB,EAChB,cAAkB,EAClB,cAAmB,EACnB,UAAc,EACd,gBAAgB,EAChB,eAAe,GAChB,EAAE,sBAAsB,QAkBxB"}
|
package/dist/dom.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LexicalEditor, NodeKey } from 'lexical';
|
|
2
|
+
import { QueueCaret } from './queue';
|
|
3
|
+
export interface CaretRect {
|
|
4
|
+
height: number;
|
|
5
|
+
left: number;
|
|
6
|
+
top: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const supportsHighlights: () => boolean;
|
|
9
|
+
export declare function textRange(editor: LexicalEditor, blockKey: NodeKey, start: number, end: number): Range | null;
|
|
10
|
+
export declare function caretRect(editor: LexicalEditor, caret: QueueCaret): CaretRect | null;
|
|
11
|
+
export declare function publishRanges(owner: object, name: string, ranges: Range[]): void;
|
|
12
|
+
export declare function clearRanges(owner: object): void;
|
|
13
|
+
export declare function createCaretElement(): {
|
|
14
|
+
element: HTMLDivElement;
|
|
15
|
+
hide: () => void;
|
|
16
|
+
place: (rect: CaretRect, host: HTMLElement) => void;
|
|
17
|
+
setName: (name: string) => void;
|
|
18
|
+
};
|
|
19
|
+
export declare function findScrollContainer(element: HTMLElement): HTMLElement;
|
|
20
|
+
//# sourceMappingURL=dom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../src/dom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,aAAa,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAE1F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAG1C,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAID,eAAO,MAAM,kBAAkB,eACqD,CAAC;AAOrF,wBAAgB,SAAS,CACvB,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,GACV,KAAK,GAAG,IAAI,CAwBd;AAOD,wBAAgB,SAAS,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,GAAG,SAAS,GAAG,IAAI,CAkBpF;AAID,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAQhF;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAE/C;AAED,wBAAgB,kBAAkB,IAAI;IACpC,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IACpD,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC,CAwBA;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,CAQrE"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { AgentStreamPlugin, type AgentStreamPluginProps } from './AgentStreamPlugin';
|
|
2
|
+
export { planReveal, type RevealSegment } from './plan';
|
|
3
|
+
export { AGENT_WRITE_TAG, createAgentStreamPlayer, playAgentWrite, type PlaybackState, type PlayerOptions, } from './player';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAC;AACxD,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,UAAU,CAAC"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
2
|
+
import { useEffect, useRef } from "react";
|
|
3
|
+
import { $getNodeByKey, $getRoot, $isElementNode, $isParagraphNode } from "lexical";
|
|
4
|
+
import { $isHeadingNode, $isQuoteNode } from "@lexical/rich-text";
|
|
5
|
+
//#region src/styles.css.ts
|
|
6
|
+
var HIDDEN_HIGHLIGHT = "agent-stream-hidden";
|
|
7
|
+
var FADE_HIGHLIGHTS = [
|
|
8
|
+
"agent-stream-fade-1",
|
|
9
|
+
"agent-stream-fade-2",
|
|
10
|
+
"agent-stream-fade-3"
|
|
11
|
+
];
|
|
12
|
+
var caret = "al0vm60";
|
|
13
|
+
var caretVisible = "al0vm61";
|
|
14
|
+
var caretLabel = "al0vm62";
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/dom.ts
|
|
17
|
+
var BLOCK_CARET_HEIGHT = 22;
|
|
18
|
+
var supportsHighlights = () => typeof Highlight !== "undefined" && typeof CSS !== "undefined" && !!CSS.highlights;
|
|
19
|
+
var firstTextNode = (element) => element ? document.createTreeWalker(element, NodeFilter.SHOW_TEXT).nextNode() : null;
|
|
20
|
+
function textRange(editor, blockKey, start, end) {
|
|
21
|
+
return editor.getEditorState().read(() => {
|
|
22
|
+
const block = $getNodeByKey(blockKey);
|
|
23
|
+
if (!$isElementNode(block)) return null;
|
|
24
|
+
const range = document.createRange();
|
|
25
|
+
let offset = 0;
|
|
26
|
+
let started = false;
|
|
27
|
+
for (const node of block.getAllTextNodes()) {
|
|
28
|
+
const size = node.getTextContentSize();
|
|
29
|
+
const dom = firstTextNode(editor.getElementByKey(node.getKey()));
|
|
30
|
+
if (!started && start <= offset + size) {
|
|
31
|
+
if (!dom) return null;
|
|
32
|
+
range.setStart(dom, Math.min(start - offset, dom.length));
|
|
33
|
+
started = true;
|
|
34
|
+
}
|
|
35
|
+
if (started && end <= offset + size) {
|
|
36
|
+
if (!dom) return null;
|
|
37
|
+
range.setEnd(dom, Math.min(end - offset, dom.length));
|
|
38
|
+
return range;
|
|
39
|
+
}
|
|
40
|
+
offset += size;
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
var lastRect = (range) => {
|
|
46
|
+
const rects = range?.getClientRects?.();
|
|
47
|
+
return rects ? Array.from(rects).at(-1) ?? null : null;
|
|
48
|
+
};
|
|
49
|
+
function caretRect(editor, caret) {
|
|
50
|
+
if (caret.kind === "block") {
|
|
51
|
+
const box = editor.getElementByKey(caret.blockKey)?.getBoundingClientRect();
|
|
52
|
+
return box ? {
|
|
53
|
+
left: box.left,
|
|
54
|
+
top: box.bottom - BLOCK_CARET_HEIGHT,
|
|
55
|
+
height: BLOCK_CARET_HEIGHT
|
|
56
|
+
} : null;
|
|
57
|
+
}
|
|
58
|
+
if (caret.offset > 0) {
|
|
59
|
+
const rect = lastRect(textRange(editor, caret.blockKey, caret.offset - 1, caret.offset));
|
|
60
|
+
if (rect) return {
|
|
61
|
+
left: rect.right,
|
|
62
|
+
top: rect.top,
|
|
63
|
+
height: rect.height
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
const rect = textRange(editor, caret.blockKey, caret.offset, caret.offset + 1)?.getClientRects?.()[0];
|
|
67
|
+
return rect ? {
|
|
68
|
+
left: rect.left,
|
|
69
|
+
top: rect.top,
|
|
70
|
+
height: rect.height
|
|
71
|
+
} : null;
|
|
72
|
+
}
|
|
73
|
+
var owners = /* @__PURE__ */ new Map();
|
|
74
|
+
function publishRanges(owner, name, ranges) {
|
|
75
|
+
const byOwner = owners.get(name) ?? /* @__PURE__ */ new Map();
|
|
76
|
+
owners.set(name, byOwner);
|
|
77
|
+
if (ranges.length > 0) byOwner.set(owner, ranges);
|
|
78
|
+
else byOwner.delete(owner);
|
|
79
|
+
const all = [...byOwner.values()].flat();
|
|
80
|
+
if (all.length > 0) CSS.highlights.set(name, new Highlight(...all));
|
|
81
|
+
else CSS.highlights.delete(name);
|
|
82
|
+
}
|
|
83
|
+
function clearRanges(owner) {
|
|
84
|
+
for (const name of owners.keys()) publishRanges(owner, name, []);
|
|
85
|
+
}
|
|
86
|
+
function createCaretElement() {
|
|
87
|
+
const element = document.createElement("div");
|
|
88
|
+
element.className = caret;
|
|
89
|
+
element.setAttribute("aria-hidden", "true");
|
|
90
|
+
const label = document.createElement("span");
|
|
91
|
+
label.className = caretLabel;
|
|
92
|
+
element.append(label);
|
|
93
|
+
return {
|
|
94
|
+
element,
|
|
95
|
+
setName: (name) => {
|
|
96
|
+
label.textContent = name;
|
|
97
|
+
},
|
|
98
|
+
hide: () => element.classList.remove(caretVisible),
|
|
99
|
+
place: (rect, host) => {
|
|
100
|
+
if (element.parentElement !== host) host.append(element);
|
|
101
|
+
const origin = element.offsetParent ?? document.body;
|
|
102
|
+
const base = origin.getBoundingClientRect();
|
|
103
|
+
const left = rect.left - base.left - origin.clientLeft + origin.scrollLeft;
|
|
104
|
+
const top = rect.top - base.top - origin.clientTop + origin.scrollTop;
|
|
105
|
+
element.style.transform = `translate(${left}px, ${top}px)`;
|
|
106
|
+
element.style.height = `${rect.height}px`;
|
|
107
|
+
element.classList.add(caretVisible);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function findScrollContainer(element) {
|
|
112
|
+
for (let node = element.parentElement; node; node = node.parentElement) {
|
|
113
|
+
const { overflowY } = getComputedStyle(node);
|
|
114
|
+
if ((overflowY === "auto" || overflowY === "scroll") && node.scrollHeight > node.clientHeight) return node;
|
|
115
|
+
}
|
|
116
|
+
return document.scrollingElement ?? document.documentElement;
|
|
117
|
+
}
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region src/plan.ts
|
|
120
|
+
var $isRevealTextBlock = (node) => $isParagraphNode(node) || $isHeadingNode(node) || $isQuoteNode(node);
|
|
121
|
+
var $revealText = (node) => $isElementNode(node) ? node.getAllTextNodes().map((text) => text.getTextContent()).join("") : "";
|
|
122
|
+
function snapshot(state) {
|
|
123
|
+
return state.read(() => {
|
|
124
|
+
const blocks = /* @__PURE__ */ new Map();
|
|
125
|
+
for (const child of $getRoot().getChildren()) blocks.set(child.getKey(), {
|
|
126
|
+
isText: $isRevealTextBlock(child),
|
|
127
|
+
text: $revealText(child)
|
|
128
|
+
});
|
|
129
|
+
return blocks;
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
function changedSpan(before, after) {
|
|
133
|
+
const limit = Math.min(before.length, after.length);
|
|
134
|
+
let prefix = 0;
|
|
135
|
+
while (prefix < limit && before[prefix] === after[prefix]) prefix++;
|
|
136
|
+
let suffix = 0;
|
|
137
|
+
while (suffix < limit - prefix && before[before.length - 1 - suffix] === after[after.length - 1 - suffix]) suffix++;
|
|
138
|
+
return {
|
|
139
|
+
from: prefix,
|
|
140
|
+
to: after.length - suffix
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
function planReveal(prev, next) {
|
|
144
|
+
const before = snapshot(prev);
|
|
145
|
+
return next.read(() => {
|
|
146
|
+
const segments = [];
|
|
147
|
+
for (const child of $getRoot().getChildren()) {
|
|
148
|
+
const blockKey = child.getKey();
|
|
149
|
+
const old = before.get(blockKey);
|
|
150
|
+
if (!$isRevealTextBlock(child)) {
|
|
151
|
+
if (!old) segments.push({
|
|
152
|
+
kind: "block",
|
|
153
|
+
blockKey
|
|
154
|
+
});
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
const text = $revealText(child);
|
|
158
|
+
const base = old?.isText ? old.text : "";
|
|
159
|
+
if (text === base) continue;
|
|
160
|
+
const { from, to } = changedSpan(base, text);
|
|
161
|
+
if (to > from) segments.push({
|
|
162
|
+
kind: "text",
|
|
163
|
+
blockKey,
|
|
164
|
+
from,
|
|
165
|
+
to,
|
|
166
|
+
text
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
return segments;
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
//#endregion
|
|
173
|
+
//#region src/queue.ts
|
|
174
|
+
var EPSILON = 1e-9;
|
|
175
|
+
var sizeOf = (segment) => segment.kind === "text" ? segment.to - segment.from : 1;
|
|
176
|
+
var caretOf = (entry) => entry.segment.kind === "text" ? {
|
|
177
|
+
kind: "text",
|
|
178
|
+
blockKey: entry.segment.blockKey,
|
|
179
|
+
offset: entry.segment.from + Math.floor(entry.progress)
|
|
180
|
+
} : {
|
|
181
|
+
kind: "block",
|
|
182
|
+
blockKey: entry.segment.blockKey
|
|
183
|
+
};
|
|
184
|
+
function createRevealQueue(getOptions) {
|
|
185
|
+
let entries = [];
|
|
186
|
+
let caret = null;
|
|
187
|
+
const complete = (entry) => {
|
|
188
|
+
entry.progress = entry.size;
|
|
189
|
+
caret = caretOf(entry);
|
|
190
|
+
};
|
|
191
|
+
const prune = () => {
|
|
192
|
+
entries = entries.filter((entry) => entry.progress < entry.size - EPSILON);
|
|
193
|
+
};
|
|
194
|
+
const mergeIntoPending = (segment) => {
|
|
195
|
+
if (segment.kind !== "text") return false;
|
|
196
|
+
const same = entries.filter((entry) => entry.segment.blockKey === segment.blockKey);
|
|
197
|
+
const entry = same.length === 1 ? same[0] : void 0;
|
|
198
|
+
if (entry?.segment.kind !== "text") {
|
|
199
|
+
for (const stale of same) complete(stale);
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
const old = entry.segment;
|
|
203
|
+
const hiddenFrom = old.from + Math.floor(entry.progress);
|
|
204
|
+
if (segment.from < hiddenFrom) {
|
|
205
|
+
complete(entry);
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
if (segment.from > old.to) return false;
|
|
209
|
+
const shiftedEnd = old.to + segment.text.length - old.text.length;
|
|
210
|
+
const to = Math.max(segment.to, shiftedEnd);
|
|
211
|
+
entry.segment = {
|
|
212
|
+
...old,
|
|
213
|
+
to,
|
|
214
|
+
text: segment.text
|
|
215
|
+
};
|
|
216
|
+
entry.size = to - old.from;
|
|
217
|
+
return true;
|
|
218
|
+
};
|
|
219
|
+
const remainingSeconds = () => entries.reduce((sum, entry) => sum + (entry.size - entry.progress) / entry.rate, 0);
|
|
220
|
+
return {
|
|
221
|
+
enqueue(segments) {
|
|
222
|
+
if (segments.length === 0) return;
|
|
223
|
+
const { backlogSeconds, charsPerSecond, maxSeconds } = getOptions();
|
|
224
|
+
const total = segments.reduce((sum, segment) => sum + sizeOf(segment), 0);
|
|
225
|
+
const rate = Math.max(charsPerSecond, total / maxSeconds);
|
|
226
|
+
if (remainingSeconds() + total / rate > backlogSeconds + EPSILON) {
|
|
227
|
+
for (const entry of entries) complete(entry);
|
|
228
|
+
entries = [];
|
|
229
|
+
}
|
|
230
|
+
for (const segment of segments) {
|
|
231
|
+
if (mergeIntoPending(segment)) continue;
|
|
232
|
+
entries.push({
|
|
233
|
+
progress: 0,
|
|
234
|
+
rate,
|
|
235
|
+
segment,
|
|
236
|
+
size: sizeOf(segment)
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
prune();
|
|
240
|
+
},
|
|
241
|
+
advance(seconds) {
|
|
242
|
+
let time = seconds;
|
|
243
|
+
for (const entry of entries) {
|
|
244
|
+
if (time <= 0) break;
|
|
245
|
+
const needed = (entry.size - entry.progress) / entry.rate;
|
|
246
|
+
if (time + EPSILON >= needed) {
|
|
247
|
+
time -= needed;
|
|
248
|
+
complete(entry);
|
|
249
|
+
} else {
|
|
250
|
+
entry.progress += entry.rate * time;
|
|
251
|
+
time = 0;
|
|
252
|
+
if (entry.progress >= 1) caret = caretOf(entry);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
prune();
|
|
256
|
+
},
|
|
257
|
+
finish() {
|
|
258
|
+
entries = [];
|
|
259
|
+
caret = null;
|
|
260
|
+
},
|
|
261
|
+
invalidate(blockKey) {
|
|
262
|
+
for (const entry of entries) if (entry.segment.blockKey === blockKey) complete(entry);
|
|
263
|
+
prune();
|
|
264
|
+
},
|
|
265
|
+
snapshot() {
|
|
266
|
+
return {
|
|
267
|
+
caret,
|
|
268
|
+
idle: entries.length === 0,
|
|
269
|
+
pending: entries.map((entry) => ({
|
|
270
|
+
revealed: Math.floor(entry.progress + EPSILON),
|
|
271
|
+
segment: entry.segment
|
|
272
|
+
}))
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region src/player.ts
|
|
279
|
+
var AGENT_WRITE_TAG = "agent-write";
|
|
280
|
+
var FADE_STEP = 2;
|
|
281
|
+
var LINGER_MS = 600;
|
|
282
|
+
var FOLLOW_MARGIN = 48;
|
|
283
|
+
var MAX_FRAME_SECONDS = .1;
|
|
284
|
+
function playAgentWrite(editor, fn) {
|
|
285
|
+
editor.update(fn, {
|
|
286
|
+
discrete: true,
|
|
287
|
+
tag: AGENT_WRITE_TAG
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
function createAgentStreamPlayer(editor, getOptions) {
|
|
291
|
+
if (!supportsHighlights()) return { dispose: () => {} };
|
|
292
|
+
const owner = {};
|
|
293
|
+
const queue = createRevealQueue(getOptions);
|
|
294
|
+
const caret = createCaretElement();
|
|
295
|
+
const hiddenBlocks = /* @__PURE__ */ new Set();
|
|
296
|
+
let frame = 0;
|
|
297
|
+
let last = 0;
|
|
298
|
+
let follow = true;
|
|
299
|
+
let playing = false;
|
|
300
|
+
let reported = null;
|
|
301
|
+
let linger;
|
|
302
|
+
const report = (state) => getOptions().onPlaybackChange?.(state);
|
|
303
|
+
const setBlockHidden = (key, hidden) => {
|
|
304
|
+
const element = editor.getElementByKey(key);
|
|
305
|
+
if (element) element.style.visibility = hidden ? "hidden" : "";
|
|
306
|
+
if (hidden) hiddenBlocks.add(key);
|
|
307
|
+
else hiddenBlocks.delete(key);
|
|
308
|
+
};
|
|
309
|
+
const followCaret = (rect) => {
|
|
310
|
+
const root = editor.getRootElement();
|
|
311
|
+
if (!follow || !root) return;
|
|
312
|
+
const container = getOptions().scrollContainer ?? findScrollContainer(root);
|
|
313
|
+
const bottom = container === document.scrollingElement ? window.innerHeight : container.getBoundingClientRect().bottom;
|
|
314
|
+
const overflow = rect.top + rect.height + FOLLOW_MARGIN - bottom;
|
|
315
|
+
if (overflow > 0) container.scrollTop += overflow;
|
|
316
|
+
};
|
|
317
|
+
const render = () => {
|
|
318
|
+
const { pending, caret: at } = queue.snapshot();
|
|
319
|
+
const hidden = [];
|
|
320
|
+
const fades = FADE_HIGHLIGHTS.map(() => []);
|
|
321
|
+
const stillHidden = /* @__PURE__ */ new Set();
|
|
322
|
+
pending.forEach(({ segment, revealed }, index) => {
|
|
323
|
+
if (segment.kind === "block") {
|
|
324
|
+
if (revealed < 1) stillHidden.add(segment.blockKey);
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
const boundary = segment.from + revealed;
|
|
328
|
+
const range = textRange(editor, segment.blockKey, boundary, segment.to);
|
|
329
|
+
if (range) hidden.push(range);
|
|
330
|
+
if (index !== 0 || revealed === 0) return;
|
|
331
|
+
FADE_HIGHLIGHTS.forEach((_, tier) => {
|
|
332
|
+
const end = boundary - tier * FADE_STEP;
|
|
333
|
+
const start = Math.max(segment.from, end - FADE_STEP);
|
|
334
|
+
const fade = end > start ? textRange(editor, segment.blockKey, start, end) : null;
|
|
335
|
+
if (fade) fades[tier].push(fade);
|
|
336
|
+
});
|
|
337
|
+
});
|
|
338
|
+
for (const key of hiddenBlocks) if (!stillHidden.has(key)) setBlockHidden(key, false);
|
|
339
|
+
for (const key of stillHidden) setBlockHidden(key, true);
|
|
340
|
+
publishRanges(owner, HIDDEN_HIGHLIGHT, hidden);
|
|
341
|
+
FADE_HIGHLIGHTS.forEach((name, tier) => publishRanges(owner, name, fades[tier]));
|
|
342
|
+
const blockKey = at?.blockKey ?? pending[0]?.segment.blockKey ?? null;
|
|
343
|
+
if (blockKey !== reported && playing) {
|
|
344
|
+
reported = blockKey;
|
|
345
|
+
report({
|
|
346
|
+
playing: true,
|
|
347
|
+
blockKey
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
const root = editor.getRootElement();
|
|
351
|
+
const rect = at ? caretRect(editor, at) : null;
|
|
352
|
+
if (rect && root?.parentElement) {
|
|
353
|
+
caret.place(rect, root.parentElement);
|
|
354
|
+
followCaret(rect);
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
const stop = () => {
|
|
358
|
+
cancelAnimationFrame(frame);
|
|
359
|
+
frame = 0;
|
|
360
|
+
queue.finish();
|
|
361
|
+
const wasPlaying = playing;
|
|
362
|
+
playing = false;
|
|
363
|
+
reported = null;
|
|
364
|
+
render();
|
|
365
|
+
clearRanges(owner);
|
|
366
|
+
clearTimeout(linger);
|
|
367
|
+
linger = setTimeout(caret.hide, LINGER_MS);
|
|
368
|
+
if (wasPlaying) report({
|
|
369
|
+
playing: false,
|
|
370
|
+
blockKey: null
|
|
371
|
+
});
|
|
372
|
+
};
|
|
373
|
+
const tick = (now) => {
|
|
374
|
+
queue.advance(Math.min(MAX_FRAME_SECONDS, (now - last) / 1e3));
|
|
375
|
+
last = now;
|
|
376
|
+
render();
|
|
377
|
+
if (queue.snapshot().idle) stop();
|
|
378
|
+
else frame = requestAnimationFrame(tick);
|
|
379
|
+
};
|
|
380
|
+
const invalidateChanged = () => {
|
|
381
|
+
const { pending } = queue.snapshot();
|
|
382
|
+
editor.getEditorState().read(() => {
|
|
383
|
+
for (const { segment } of pending) {
|
|
384
|
+
if (segment.kind !== "text") continue;
|
|
385
|
+
const node = $getNodeByKey(segment.blockKey);
|
|
386
|
+
if (!node || $revealText(node) !== segment.text) queue.invalidate(segment.blockKey);
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
};
|
|
390
|
+
const unregisterUpdate = editor.registerUpdateListener(({ tags, prevEditorState, editorState, dirtyElements, dirtyLeaves }) => {
|
|
391
|
+
const hasDirt = dirtyElements.size > 0 || dirtyLeaves.size > 0;
|
|
392
|
+
const agent = tags.has(AGENT_WRITE_TAG);
|
|
393
|
+
if (agent) queue.enqueue(planReveal(prevEditorState, editorState));
|
|
394
|
+
if (hasDirt && (playing || agent)) invalidateChanged();
|
|
395
|
+
if (agent && !queue.snapshot().idle) {
|
|
396
|
+
clearTimeout(linger);
|
|
397
|
+
caret.setName(getOptions().agentName);
|
|
398
|
+
follow = true;
|
|
399
|
+
if (!playing) {
|
|
400
|
+
playing = true;
|
|
401
|
+
reported = null;
|
|
402
|
+
}
|
|
403
|
+
render();
|
|
404
|
+
if (!frame) {
|
|
405
|
+
last = performance.now();
|
|
406
|
+
frame = requestAnimationFrame(tick);
|
|
407
|
+
}
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
if (!playing) return;
|
|
411
|
+
if (queue.snapshot().idle) stop();
|
|
412
|
+
else render();
|
|
413
|
+
});
|
|
414
|
+
const stopFollow = () => {
|
|
415
|
+
follow = false;
|
|
416
|
+
};
|
|
417
|
+
const unregisterRoot = editor.registerRootListener((root, prev) => {
|
|
418
|
+
for (const type of [
|
|
419
|
+
"keydown",
|
|
420
|
+
"paste",
|
|
421
|
+
"pointerdown"
|
|
422
|
+
]) {
|
|
423
|
+
prev?.removeEventListener(type, stop);
|
|
424
|
+
root?.addEventListener(type, stop);
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
const onVisibilityChange = () => {
|
|
428
|
+
if (document.visibilityState === "hidden" && playing) stop();
|
|
429
|
+
};
|
|
430
|
+
window.addEventListener("wheel", stopFollow, { passive: true });
|
|
431
|
+
window.addEventListener("touchmove", stopFollow, { passive: true });
|
|
432
|
+
document.addEventListener("visibilitychange", onVisibilityChange);
|
|
433
|
+
return { dispose() {
|
|
434
|
+
if (playing) report({
|
|
435
|
+
playing: false,
|
|
436
|
+
blockKey: null
|
|
437
|
+
});
|
|
438
|
+
playing = false;
|
|
439
|
+
cancelAnimationFrame(frame);
|
|
440
|
+
clearTimeout(linger);
|
|
441
|
+
for (const key of hiddenBlocks) setBlockHidden(key, false);
|
|
442
|
+
clearRanges(owner);
|
|
443
|
+
caret.element.remove();
|
|
444
|
+
unregisterUpdate();
|
|
445
|
+
unregisterRoot();
|
|
446
|
+
window.removeEventListener("wheel", stopFollow);
|
|
447
|
+
window.removeEventListener("touchmove", stopFollow);
|
|
448
|
+
document.removeEventListener("visibilitychange", onVisibilityChange);
|
|
449
|
+
} };
|
|
450
|
+
}
|
|
451
|
+
//#endregion
|
|
452
|
+
//#region src/AgentStreamPlugin.tsx
|
|
453
|
+
var resolveContainer = (container) => container && "current" in container ? container.current : container ?? null;
|
|
454
|
+
function AgentStreamPlugin({ agentName = "AI", backlogSeconds = 6, charsPerSecond = 80, maxSeconds = 3, onPlaybackChange, scrollContainer }) {
|
|
455
|
+
const [editor] = useLexicalComposerContext();
|
|
456
|
+
const options = useRef(null);
|
|
457
|
+
options.current = () => ({
|
|
458
|
+
agentName,
|
|
459
|
+
backlogSeconds,
|
|
460
|
+
charsPerSecond,
|
|
461
|
+
maxSeconds,
|
|
462
|
+
onPlaybackChange,
|
|
463
|
+
scrollContainer: resolveContainer(scrollContainer)
|
|
464
|
+
});
|
|
465
|
+
useEffect(() => {
|
|
466
|
+
return createAgentStreamPlayer(editor, () => options.current()).dispose;
|
|
467
|
+
}, [editor]);
|
|
468
|
+
return null;
|
|
469
|
+
}
|
|
470
|
+
//#endregion
|
|
471
|
+
export { AGENT_WRITE_TAG, AgentStreamPlugin, createAgentStreamPlayer, planReveal, playAgentWrite };
|
package/dist/plan.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EditorState, LexicalNode, NodeKey } from 'lexical';
|
|
2
|
+
export type RevealSegment = {
|
|
3
|
+
kind: 'text';
|
|
4
|
+
blockKey: NodeKey;
|
|
5
|
+
from: number;
|
|
6
|
+
to: number;
|
|
7
|
+
text: string;
|
|
8
|
+
} | {
|
|
9
|
+
kind: 'block';
|
|
10
|
+
blockKey: NodeKey;
|
|
11
|
+
};
|
|
12
|
+
export declare const $isRevealTextBlock: (node: LexicalNode | null) => boolean;
|
|
13
|
+
export declare const $revealText: (node: LexicalNode | null) => string;
|
|
14
|
+
export declare function planReveal(prev: EditorState, next: EditorState): RevealSegment[];
|
|
15
|
+
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../src/plan.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,OAAO,EACb,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC3E;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAC;AAOzC,eAAO,MAAM,kBAAkB,GAAI,MAAM,WAAW,GAAG,IAAI,KAAG,OACQ,CAAC;AAEvE,eAAO,MAAM,WAAW,GAAI,MAAM,WAAW,GAAG,IAAI,KAAG,MAM/C,CAAC;AA0BT,wBAAgB,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,GAAG,aAAa,EAAE,CAmBhF"}
|
package/dist/player.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LexicalEditor, NodeKey } from 'lexical';
|
|
2
|
+
import { QueueOptions } from './queue';
|
|
3
|
+
export declare const AGENT_WRITE_TAG = "agent-write";
|
|
4
|
+
export interface PlaybackState {
|
|
5
|
+
blockKey: NodeKey | null;
|
|
6
|
+
playing: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface PlayerOptions extends QueueOptions {
|
|
9
|
+
agentName: string;
|
|
10
|
+
onPlaybackChange?: (state: PlaybackState) => void;
|
|
11
|
+
scrollContainer: HTMLElement | null;
|
|
12
|
+
}
|
|
13
|
+
export declare function playAgentWrite(editor: LexicalEditor, fn: () => void): void;
|
|
14
|
+
export declare function createAgentStreamPlayer(editor: LexicalEditor, getOptions: () => PlayerOptions): {
|
|
15
|
+
dispose: () => void;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=player.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"player.d.ts","sourceRoot":"","sources":["../src/player.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,aAAa,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAa1E,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAG/D,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAE7C,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,aAAc,SAAQ,YAAY;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAClD,eAAe,EAAE,WAAW,GAAG,IAAI,CAAC;CACrC;AAOD,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAE1E;AAED,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,MAAM,aAAa,GAC9B;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAuKzB"}
|
package/dist/queue.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { NodeKey } from 'lexical';
|
|
2
|
+
import { RevealSegment } from './plan';
|
|
3
|
+
export interface QueueOptions {
|
|
4
|
+
backlogSeconds: number;
|
|
5
|
+
charsPerSecond: number;
|
|
6
|
+
maxSeconds: number;
|
|
7
|
+
}
|
|
8
|
+
export type QueueCaret = {
|
|
9
|
+
kind: 'text';
|
|
10
|
+
blockKey: NodeKey;
|
|
11
|
+
offset: number;
|
|
12
|
+
} | {
|
|
13
|
+
kind: 'block';
|
|
14
|
+
blockKey: NodeKey;
|
|
15
|
+
};
|
|
16
|
+
export interface PendingSegment {
|
|
17
|
+
revealed: number;
|
|
18
|
+
segment: RevealSegment;
|
|
19
|
+
}
|
|
20
|
+
export interface QueueSnapshot {
|
|
21
|
+
caret: QueueCaret | null;
|
|
22
|
+
idle: boolean;
|
|
23
|
+
pending: PendingSegment[];
|
|
24
|
+
}
|
|
25
|
+
export interface RevealQueue {
|
|
26
|
+
advance: (seconds: number) => void;
|
|
27
|
+
enqueue: (segments: RevealSegment[]) => void;
|
|
28
|
+
finish: () => void;
|
|
29
|
+
invalidate: (blockKey: NodeKey) => void;
|
|
30
|
+
snapshot: () => QueueSnapshot;
|
|
31
|
+
}
|
|
32
|
+
export declare function createRevealQueue(getOptions: () => QueueOptions): RevealQueue;
|
|
33
|
+
//# sourceMappingURL=queue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../src/queue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE5C,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,UAAU,GACpB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAC;AAE7F,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,OAAO,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,KAAK,IAAI,CAAC;IAC7C,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,UAAU,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,QAAQ,EAAE,MAAM,aAAa,CAAC;CAC/B;AAuBD,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,YAAY,GAAG,WAAW,CA2F7E"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
:root{--rc-text:var(--rc-host-text,#171717);--rc-text-secondary:var(--rc-host-text-secondary,#404040);--rc-text-tertiary:var(--rc-host-text-tertiary,#737373);--rc-text-quaternary:var(--rc-host-text-quaternary,#a3a3a3);--rc-bg:var(--rc-host-bg,#fff);--rc-bg-secondary:var(--rc-host-bg-secondary,#fafafa);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#f5f5f5);--rc-bg-elevated:var(--rc-host-bg-elevated,#fff);--rc-fill:var(--rc-host-fill,#00000012);--rc-fill-secondary:var(--rc-host-fill-secondary,#0000000b);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#00000008);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#00000005);--rc-border:var(--rc-host-border,#e5e5e5);--rc-border-subtle:var(--rc-host-border-subtle,#f0f0f0);--rc-ring:var(--rc-host-ring,#00000014);--rc-scrim:var(--rc-host-scrim,#00000052);--rc-accent:var(--rc-host-accent,#2563eb);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 10%, transparent));--rc-link:var(--rc-host-link,#2563eb);--rc-code-text:var(--rc-host-code-text,#171717);--rc-code-bg:var(--rc-host-code-bg,#f5f5f5);--rc-code-header-bg:var(--rc-host-code-header-bg,#f5f5f5);--rc-hr-border:var(--rc-host-hr-border,#e5e5e5);--rc-quote-border:var(--rc-host-quote-border,#e5e5e5);--rc-quote-bg:var(--rc-host-quote-bg,#f5f5f5);--rc-alert-info:var(--rc-host-alert-info,#2563eb);--rc-alert-warning:var(--rc-host-alert-warning,#b45309);--rc-alert-tip:var(--rc-host-alert-tip,#15803d);--rc-alert-caution:var(--rc-host-alert-caution,#dc2626);--rc-alert-important:var(--rc-host-alert-important,#7c3aed);--rc-max-width:700px;--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0000000d;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f;--rc-shadow-modal:0 0 0 1px #0000000f, 0 16px 48px -12px #00000040;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-flow-paragraph:1.25em;--rc-flow-list:.375em;--rc-flow-block:2em;--rc-flow-heading:2em;--rc-font-family-sans:var(--rc-host-font-family-sans,-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji");--rc-font-family-serif:var(--rc-host-font-family-serif,"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif);--rc-font-family-kai:var(--rc-host-font-family-kai,"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif);--rc-font-mono:var(--rc-host-font-mono,"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, "PingFang SC", "Noto Sans SC", 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-font-size-code:.8125em;--rc-font-size-caption:.8125em;--rc-line-height:1.75;--rc-line-height-tight:1.35;--rc-line-height-compact:1.6;--rc-line-height-code:1.7;--rc-font-family:var(--rc-host-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji");--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}:root.dark,[data-theme=dark]{--rc-text:var(--rc-host-text,#ededed);--rc-text-secondary:var(--rc-host-text-secondary,#c4c4c4);--rc-text-tertiary:var(--rc-host-text-tertiary,#8f8f8f);--rc-text-quaternary:var(--rc-host-text-quaternary,#5c5c5c);--rc-bg:var(--rc-host-bg,#0a0a0a);--rc-bg-secondary:var(--rc-host-bg-secondary,#121212);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#1a1a1a);--rc-bg-elevated:var(--rc-host-bg-elevated,#171717);--rc-fill:var(--rc-host-fill,#ffffff17);--rc-fill-secondary:var(--rc-host-fill-secondary,#ffffff0f);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#ffffff0a);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#ffffff06);--rc-border:var(--rc-host-border,#262626);--rc-border-subtle:var(--rc-host-border-subtle,#1c1c1c);--rc-ring:var(--rc-host-ring,#ffffff1f);--rc-scrim:var(--rc-host-scrim,#0000008f);--rc-accent:var(--rc-host-accent,#60a5fa);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 16%, transparent));--rc-link:var(--rc-host-link,#60a5fa);--rc-code-text:var(--rc-host-code-text,#ededed);--rc-code-bg:var(--rc-host-code-bg,#1a1a1a);--rc-code-header-bg:var(--rc-host-code-header-bg,#1a1a1a);--rc-hr-border:var(--rc-host-hr-border,#262626);--rc-quote-border:var(--rc-host-quote-border,#262626);--rc-quote-bg:var(--rc-host-quote-bg,#1a1a1a);--rc-alert-info:var(--rc-host-alert-info,#60a5fa);--rc-alert-warning:var(--rc-host-alert-warning,#fbbf24);--rc-alert-tip:var(--rc-host-alert-tip,#4ade80);--rc-alert-caution:var(--rc-host-alert-caution,#f87171);--rc-alert-important:var(--rc-host-alert-important,#a78bfa);--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0006;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 8px 24px #00000080, 0 16px 40px -8px #0009;--rc-shadow-modal:0 0 0 1px #ffffff14, 0 16px 48px -12px #000000b3;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 8px 24px #00000080, 0 16px 40px -8px #0009}._18gzxi0{--rc-text:var(--rc-host-text,#171717);--rc-text-secondary:var(--rc-host-text-secondary,#404040);--rc-text-tertiary:var(--rc-host-text-tertiary,#737373);--rc-text-quaternary:var(--rc-host-text-quaternary,#a3a3a3);--rc-bg:var(--rc-host-bg,#fff);--rc-bg-secondary:var(--rc-host-bg-secondary,#fafafa);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#f5f5f5);--rc-bg-elevated:var(--rc-host-bg-elevated,#fff);--rc-fill:var(--rc-host-fill,#00000012);--rc-fill-secondary:var(--rc-host-fill-secondary,#0000000b);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#00000008);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#00000005);--rc-border:var(--rc-host-border,#e5e5e5);--rc-border-subtle:var(--rc-host-border-subtle,#f0f0f0);--rc-ring:var(--rc-host-ring,#00000014);--rc-scrim:var(--rc-host-scrim,#00000052);--rc-accent:var(--rc-host-accent,#2563eb);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 10%, transparent));--rc-link:var(--rc-host-link,#2563eb);--rc-code-text:var(--rc-host-code-text,#171717);--rc-code-bg:var(--rc-host-code-bg,#f5f5f5);--rc-code-header-bg:var(--rc-host-code-header-bg,#f5f5f5);--rc-hr-border:var(--rc-host-hr-border,#e5e5e5);--rc-quote-border:var(--rc-host-quote-border,#e5e5e5);--rc-quote-bg:var(--rc-host-quote-bg,#f5f5f5);--rc-alert-info:var(--rc-host-alert-info,#2563eb);--rc-alert-warning:var(--rc-host-alert-warning,#b45309);--rc-alert-tip:var(--rc-host-alert-tip,#15803d);--rc-alert-caution:var(--rc-host-alert-caution,#dc2626);--rc-alert-important:var(--rc-host-alert-important,#7c3aed);--rc-max-width:700px;--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0000000d;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f;--rc-shadow-modal:0 0 0 1px #0000000f, 0 16px 48px -12px #00000040;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-flow-paragraph:1.25em;--rc-flow-list:.375em;--rc-flow-block:2em;--rc-flow-heading:2em;--rc-font-family-sans:var(--rc-host-font-family-sans,-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji");--rc-font-family-serif:var(--rc-host-font-family-serif,"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif);--rc-font-family-kai:var(--rc-host-font-family-kai,"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif);--rc-font-mono:var(--rc-host-font-mono,"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, "PingFang SC", "Noto Sans SC", 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-font-size-code:.8125em;--rc-font-size-caption:.8125em;--rc-line-height:1.75;--rc-line-height-tight:1.35;--rc-line-height-compact:1.6;--rc-line-height-code:1.7;--rc-font-family:var(--rc-host-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji");--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}._18gzxi1{--rc-text:var(--rc-host-text,#171717);--rc-text-secondary:var(--rc-host-text-secondary,#404040);--rc-text-tertiary:var(--rc-host-text-tertiary,#737373);--rc-text-quaternary:var(--rc-host-text-quaternary,#a3a3a3);--rc-bg:var(--rc-host-bg,#fff);--rc-bg-secondary:var(--rc-host-bg-secondary,#fafafa);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#f5f5f5);--rc-bg-elevated:var(--rc-host-bg-elevated,#fff);--rc-fill:var(--rc-host-fill,#00000012);--rc-fill-secondary:var(--rc-host-fill-secondary,#0000000b);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#00000008);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#00000005);--rc-border:var(--rc-host-border,#e5e5e5);--rc-border-subtle:var(--rc-host-border-subtle,#f0f0f0);--rc-ring:var(--rc-host-ring,#00000014);--rc-scrim:var(--rc-host-scrim,#00000052);--rc-accent:var(--rc-host-accent,#2563eb);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 10%, transparent));--rc-link:var(--rc-host-link,#2563eb);--rc-code-text:var(--rc-host-code-text,#171717);--rc-code-bg:var(--rc-host-code-bg,#f5f5f5);--rc-code-header-bg:var(--rc-host-code-header-bg,#f5f5f5);--rc-hr-border:var(--rc-host-hr-border,#e5e5e5);--rc-quote-border:var(--rc-host-quote-border,#e5e5e5);--rc-quote-bg:var(--rc-host-quote-bg,#f5f5f5);--rc-alert-info:var(--rc-host-alert-info,#2563eb);--rc-alert-warning:var(--rc-host-alert-warning,#b45309);--rc-alert-tip:var(--rc-host-alert-tip,#15803d);--rc-alert-caution:var(--rc-host-alert-caution,#dc2626);--rc-alert-important:var(--rc-host-alert-important,#7c3aed);--rc-max-width:700px;--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0000000d;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f;--rc-shadow-modal:0 0 0 1px #0000000f, 0 16px 48px -12px #00000040;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-flow-paragraph:.5em;--rc-flow-list:.375em;--rc-flow-block:2em;--rc-flow-heading:2em;--rc-font-family-sans:var(--rc-host-font-family-sans,-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji");--rc-font-family-serif:var(--rc-host-font-family-serif,"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif);--rc-font-family-kai:var(--rc-host-font-family-kai,"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif);--rc-font-mono:var(--rc-host-font-mono,"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, "PingFang SC", "Noto Sans SC", 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-font-size-code:.8125em;--rc-font-size-caption:.8125em;--rc-line-height:1.85;--rc-line-height-tight:1.35;--rc-line-height-compact:1.6;--rc-line-height-code:1.7;--rc-font-family:var(--rc-host-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}._18gzxi2{--rc-text:var(--rc-host-text,#171717);--rc-text-secondary:var(--rc-host-text-secondary,#404040);--rc-text-tertiary:var(--rc-host-text-tertiary,#737373);--rc-text-quaternary:var(--rc-host-text-quaternary,#a3a3a3);--rc-bg:var(--rc-host-bg,#fff);--rc-bg-secondary:var(--rc-host-bg-secondary,#fafafa);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#f5f5f5);--rc-bg-elevated:var(--rc-host-bg-elevated,#fff);--rc-fill:var(--rc-host-fill,#00000012);--rc-fill-secondary:var(--rc-host-fill-secondary,#0000000b);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#00000008);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#00000005);--rc-border:var(--rc-host-border,#e5e5e5);--rc-border-subtle:var(--rc-host-border-subtle,#f0f0f0);--rc-ring:var(--rc-host-ring,#00000014);--rc-scrim:var(--rc-host-scrim,#00000052);--rc-accent:var(--rc-host-accent,#2563eb);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 10%, transparent));--rc-link:var(--rc-host-link,#2563eb);--rc-code-text:var(--rc-host-code-text,#171717);--rc-code-bg:var(--rc-host-code-bg,#f5f5f5);--rc-code-header-bg:var(--rc-host-code-header-bg,#f5f5f5);--rc-hr-border:var(--rc-host-hr-border,#e5e5e5);--rc-quote-border:var(--rc-host-quote-border,#e5e5e5);--rc-quote-bg:var(--rc-host-quote-bg,#fafafa);--rc-alert-info:var(--rc-host-alert-info,#2563eb);--rc-alert-warning:var(--rc-host-alert-warning,#b45309);--rc-alert-tip:var(--rc-host-alert-tip,#15803d);--rc-alert-caution:var(--rc-host-alert-caution,#dc2626);--rc-alert-important:var(--rc-host-alert-important,#7c3aed);--rc-max-width:none;--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0000000d;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f;--rc-shadow-modal:0 0 0 1px #0000000f, 0 16px 48px -12px #00000040;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f;--rc-space-xs:2px;--rc-space-sm:4px;--rc-space-md:10px;--rc-space-lg:16px;--rc-space-xl:20px;--rc-flow-paragraph:.6em;--rc-flow-list:.25em;--rc-flow-block:1em;--rc-flow-heading:1em;--rc-font-family-sans:var(--rc-host-font-family-sans,-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji");--rc-font-family-serif:var(--rc-host-font-family-serif,"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif);--rc-font-family-kai:var(--rc-host-font-family-kai,"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif);--rc-font-mono:var(--rc-host-font-mono,"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, "PingFang SC", "Noto Sans SC", 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-font-size-code:.9286em;--rc-font-size-caption:.9286em;--rc-line-height:1.6;--rc-line-height-tight:1.3;--rc-line-height-compact:1.6;--rc-line-height-code:1.7;--rc-font-family:var(--rc-host-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji");--rc-radius-sm:3px;--rc-radius-md:6px;--rc-radius-lg:12px}._18gzxi3{--rc-text:var(--rc-host-text,#171717);--rc-text-secondary:var(--rc-host-text-secondary,#404040);--rc-text-tertiary:var(--rc-host-text-tertiary,#737373);--rc-text-quaternary:var(--rc-host-text-quaternary,#a3a3a3);--rc-bg:var(--rc-host-bg,#fff);--rc-bg-secondary:var(--rc-host-bg-secondary,#fafafa);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#f5f5f5);--rc-bg-elevated:var(--rc-host-bg-elevated,#fff);--rc-fill:var(--rc-host-fill,#00000012);--rc-fill-secondary:var(--rc-host-fill-secondary,#0000000b);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#00000008);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#00000005);--rc-border:var(--rc-host-border,#e5e5e5);--rc-border-subtle:var(--rc-host-border-subtle,#f0f0f0);--rc-ring:var(--rc-host-ring,#00000014);--rc-scrim:var(--rc-host-scrim,#00000052);--rc-accent:var(--rc-host-accent,#2563eb);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 10%, transparent));--rc-link:var(--rc-host-link,#2563eb);--rc-code-text:var(--rc-host-code-text,#171717);--rc-code-bg:var(--rc-host-code-bg,#f5f5f5);--rc-code-header-bg:var(--rc-host-code-header-bg,#f5f5f5);--rc-hr-border:var(--rc-host-hr-border,#e5e5e5);--rc-quote-border:var(--rc-host-quote-border,#e5e5e5);--rc-quote-bg:var(--rc-host-quote-bg,#fafafa);--rc-alert-info:var(--rc-host-alert-info,#2563eb);--rc-alert-warning:var(--rc-host-alert-warning,#b45309);--rc-alert-tip:var(--rc-host-alert-tip,#15803d);--rc-alert-caution:var(--rc-host-alert-caution,#dc2626);--rc-alert-important:var(--rc-host-alert-important,#7c3aed);--rc-max-width:none;--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0000000d;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f;--rc-shadow-modal:0 0 0 1px #0000000f, 0 16px 48px -12px #00000040;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-flow-paragraph:.75em;--rc-flow-list:.25em;--rc-flow-block:1em;--rc-flow-heading:1em;--rc-font-family-sans:var(--rc-host-font-family-sans,-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji");--rc-font-family-serif:var(--rc-host-font-family-serif,"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif);--rc-font-family-kai:var(--rc-host-font-family-kai,"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif);--rc-font-mono:var(--rc-host-font-mono,"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, "PingFang SC", "Noto Sans SC", 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:15px;--rc-font-size-small:13px;--rc-font-size-code:.8667em;--rc-font-size-caption:.8667em;--rc-line-height:1.65;--rc-line-height-tight:1.3;--rc-line-height-compact:1.6;--rc-line-height-code:1.7;--rc-font-family:var(--rc-host-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji");--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}.dark ._18gzxi0,[data-theme=dark] ._18gzxi0,.dark._18gzxi0,[data-theme=dark]._18gzxi0,.dark ._18gzxi1,[data-theme=dark] ._18gzxi1,.dark._18gzxi1,[data-theme=dark]._18gzxi1,.dark ._18gzxi2,[data-theme=dark] ._18gzxi2,.dark._18gzxi2,[data-theme=dark]._18gzxi2,.dark ._18gzxi3,[data-theme=dark] ._18gzxi3,.dark._18gzxi3,[data-theme=dark]._18gzxi3{--rc-text:var(--rc-host-text,#ededed);--rc-text-secondary:var(--rc-host-text-secondary,#c4c4c4);--rc-text-tertiary:var(--rc-host-text-tertiary,#8f8f8f);--rc-text-quaternary:var(--rc-host-text-quaternary,#5c5c5c);--rc-bg:var(--rc-host-bg,#0a0a0a);--rc-bg-secondary:var(--rc-host-bg-secondary,#121212);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#1a1a1a);--rc-bg-elevated:var(--rc-host-bg-elevated,#171717);--rc-fill:var(--rc-host-fill,#ffffff17);--rc-fill-secondary:var(--rc-host-fill-secondary,#ffffff0f);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#ffffff0a);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#ffffff06);--rc-border:var(--rc-host-border,#262626);--rc-border-subtle:var(--rc-host-border-subtle,#1c1c1c);--rc-ring:var(--rc-host-ring,#ffffff1f);--rc-scrim:var(--rc-host-scrim,#0000008f);--rc-accent:var(--rc-host-accent,#60a5fa);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 16%, transparent));--rc-link:var(--rc-host-link,#60a5fa);--rc-code-text:var(--rc-host-code-text,#ededed);--rc-code-bg:var(--rc-host-code-bg,#1a1a1a);--rc-code-header-bg:var(--rc-host-code-header-bg,#1a1a1a);--rc-hr-border:var(--rc-host-hr-border,#262626);--rc-quote-border:var(--rc-host-quote-border,#262626);--rc-quote-bg:var(--rc-host-quote-bg,#1a1a1a);--rc-alert-info:var(--rc-host-alert-info,#60a5fa);--rc-alert-warning:var(--rc-host-alert-warning,#fbbf24);--rc-alert-tip:var(--rc-host-alert-tip,#4ade80);--rc-alert-caution:var(--rc-host-alert-caution,#f87171);--rc-alert-important:var(--rc-host-alert-important,#a78bfa);--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0006;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 8px 24px #00000080, 0 16px 40px -8px #0009;--rc-shadow-modal:0 0 0 1px #ffffff14, 0 16px 48px -12px #000000b3;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 8px 24px #00000080, 0 16px 40px -8px #0009}[data-theme=dark] [data-theme=light] ._18gzxi0{--rc-text:var(--rc-host-text,#171717);--rc-text-secondary:var(--rc-host-text-secondary,#404040);--rc-text-tertiary:var(--rc-host-text-tertiary,#737373);--rc-text-quaternary:var(--rc-host-text-quaternary,#a3a3a3);--rc-bg:var(--rc-host-bg,#fff);--rc-bg-secondary:var(--rc-host-bg-secondary,#fafafa);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#f5f5f5);--rc-bg-elevated:var(--rc-host-bg-elevated,#fff);--rc-fill:var(--rc-host-fill,#00000012);--rc-fill-secondary:var(--rc-host-fill-secondary,#0000000b);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#00000008);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#00000005);--rc-border:var(--rc-host-border,#e5e5e5);--rc-border-subtle:var(--rc-host-border-subtle,#f0f0f0);--rc-ring:var(--rc-host-ring,#00000014);--rc-scrim:var(--rc-host-scrim,#00000052);--rc-accent:var(--rc-host-accent,#2563eb);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 10%, transparent));--rc-link:var(--rc-host-link,#2563eb);--rc-code-text:var(--rc-host-code-text,#171717);--rc-code-bg:var(--rc-host-code-bg,#f5f5f5);--rc-code-header-bg:var(--rc-host-code-header-bg,#f5f5f5);--rc-hr-border:var(--rc-host-hr-border,#e5e5e5);--rc-quote-border:var(--rc-host-quote-border,#e5e5e5);--rc-quote-bg:var(--rc-host-quote-bg,#f5f5f5);--rc-alert-info:var(--rc-host-alert-info,#2563eb);--rc-alert-warning:var(--rc-host-alert-warning,#b45309);--rc-alert-tip:var(--rc-host-alert-tip,#15803d);--rc-alert-caution:var(--rc-host-alert-caution,#dc2626);--rc-alert-important:var(--rc-host-alert-important,#7c3aed);--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0000000d;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f;--rc-shadow-modal:0 0 0 1px #0000000f, 0 16px 48px -12px #00000040;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f}[data-theme=light] [data-theme=dark] ._18gzxi0{--rc-text:var(--rc-host-text,#ededed);--rc-text-secondary:var(--rc-host-text-secondary,#c4c4c4);--rc-text-tertiary:var(--rc-host-text-tertiary,#8f8f8f);--rc-text-quaternary:var(--rc-host-text-quaternary,#5c5c5c);--rc-bg:var(--rc-host-bg,#0a0a0a);--rc-bg-secondary:var(--rc-host-bg-secondary,#121212);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#1a1a1a);--rc-bg-elevated:var(--rc-host-bg-elevated,#171717);--rc-fill:var(--rc-host-fill,#ffffff17);--rc-fill-secondary:var(--rc-host-fill-secondary,#ffffff0f);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#ffffff0a);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#ffffff06);--rc-border:var(--rc-host-border,#262626);--rc-border-subtle:var(--rc-host-border-subtle,#1c1c1c);--rc-ring:var(--rc-host-ring,#ffffff1f);--rc-scrim:var(--rc-host-scrim,#0000008f);--rc-accent:var(--rc-host-accent,#60a5fa);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 16%, transparent));--rc-link:var(--rc-host-link,#60a5fa);--rc-code-text:var(--rc-host-code-text,#ededed);--rc-code-bg:var(--rc-host-code-bg,#1a1a1a);--rc-code-header-bg:var(--rc-host-code-header-bg,#1a1a1a);--rc-hr-border:var(--rc-host-hr-border,#262626);--rc-quote-border:var(--rc-host-quote-border,#262626);--rc-quote-bg:var(--rc-host-quote-bg,#1a1a1a);--rc-alert-info:var(--rc-host-alert-info,#60a5fa);--rc-alert-warning:var(--rc-host-alert-warning,#fbbf24);--rc-alert-tip:var(--rc-host-alert-tip,#4ade80);--rc-alert-caution:var(--rc-host-alert-caution,#f87171);--rc-alert-important:var(--rc-host-alert-important,#a78bfa);--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0006;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 8px 24px #00000080, 0 16px 40px -8px #0009;--rc-shadow-modal:0 0 0 1px #ffffff14, 0 16px 48px -12px #000000b3;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 8px 24px #00000080, 0 16px 40px -8px #0009}[data-theme=light][data-theme]._18gzxi0{--rc-text:var(--rc-host-text,#171717);--rc-text-secondary:var(--rc-host-text-secondary,#404040);--rc-text-tertiary:var(--rc-host-text-tertiary,#737373);--rc-text-quaternary:var(--rc-host-text-quaternary,#a3a3a3);--rc-bg:var(--rc-host-bg,#fff);--rc-bg-secondary:var(--rc-host-bg-secondary,#fafafa);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#f5f5f5);--rc-bg-elevated:var(--rc-host-bg-elevated,#fff);--rc-fill:var(--rc-host-fill,#00000012);--rc-fill-secondary:var(--rc-host-fill-secondary,#0000000b);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#00000008);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#00000005);--rc-border:var(--rc-host-border,#e5e5e5);--rc-border-subtle:var(--rc-host-border-subtle,#f0f0f0);--rc-ring:var(--rc-host-ring,#00000014);--rc-scrim:var(--rc-host-scrim,#00000052);--rc-accent:var(--rc-host-accent,#2563eb);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 10%, transparent));--rc-link:var(--rc-host-link,#2563eb);--rc-code-text:var(--rc-host-code-text,#171717);--rc-code-bg:var(--rc-host-code-bg,#f5f5f5);--rc-code-header-bg:var(--rc-host-code-header-bg,#f5f5f5);--rc-hr-border:var(--rc-host-hr-border,#e5e5e5);--rc-quote-border:var(--rc-host-quote-border,#e5e5e5);--rc-quote-bg:var(--rc-host-quote-bg,#f5f5f5);--rc-alert-info:var(--rc-host-alert-info,#2563eb);--rc-alert-warning:var(--rc-host-alert-warning,#b45309);--rc-alert-tip:var(--rc-host-alert-tip,#15803d);--rc-alert-caution:var(--rc-host-alert-caution,#dc2626);--rc-alert-important:var(--rc-host-alert-important,#7c3aed);--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0000000d;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f;--rc-shadow-modal:0 0 0 1px #0000000f, 0 16px 48px -12px #00000040;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f}[data-theme=dark][data-theme]._18gzxi0{--rc-text:var(--rc-host-text,#ededed);--rc-text-secondary:var(--rc-host-text-secondary,#c4c4c4);--rc-text-tertiary:var(--rc-host-text-tertiary,#8f8f8f);--rc-text-quaternary:var(--rc-host-text-quaternary,#5c5c5c);--rc-bg:var(--rc-host-bg,#0a0a0a);--rc-bg-secondary:var(--rc-host-bg-secondary,#121212);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#1a1a1a);--rc-bg-elevated:var(--rc-host-bg-elevated,#171717);--rc-fill:var(--rc-host-fill,#ffffff17);--rc-fill-secondary:var(--rc-host-fill-secondary,#ffffff0f);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#ffffff0a);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#ffffff06);--rc-border:var(--rc-host-border,#262626);--rc-border-subtle:var(--rc-host-border-subtle,#1c1c1c);--rc-ring:var(--rc-host-ring,#ffffff1f);--rc-scrim:var(--rc-host-scrim,#0000008f);--rc-accent:var(--rc-host-accent,#60a5fa);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 16%, transparent));--rc-link:var(--rc-host-link,#60a5fa);--rc-code-text:var(--rc-host-code-text,#ededed);--rc-code-bg:var(--rc-host-code-bg,#1a1a1a);--rc-code-header-bg:var(--rc-host-code-header-bg,#1a1a1a);--rc-hr-border:var(--rc-host-hr-border,#262626);--rc-quote-border:var(--rc-host-quote-border,#262626);--rc-quote-bg:var(--rc-host-quote-bg,#1a1a1a);--rc-alert-info:var(--rc-host-alert-info,#60a5fa);--rc-alert-warning:var(--rc-host-alert-warning,#fbbf24);--rc-alert-tip:var(--rc-host-alert-tip,#4ade80);--rc-alert-caution:var(--rc-host-alert-caution,#f87171);--rc-alert-important:var(--rc-host-alert-important,#a78bfa);--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0006;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 8px 24px #00000080, 0 16px 40px -8px #0009;--rc-shadow-modal:0 0 0 1px #ffffff14, 0 16px 48px -12px #000000b3;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 8px 24px #00000080, 0 16px 40px -8px #0009}[data-theme=dark] [data-theme=light] ._18gzxi1{--rc-text:var(--rc-host-text,#171717);--rc-text-secondary:var(--rc-host-text-secondary,#404040);--rc-text-tertiary:var(--rc-host-text-tertiary,#737373);--rc-text-quaternary:var(--rc-host-text-quaternary,#a3a3a3);--rc-bg:var(--rc-host-bg,#fff);--rc-bg-secondary:var(--rc-host-bg-secondary,#fafafa);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#f5f5f5);--rc-bg-elevated:var(--rc-host-bg-elevated,#fff);--rc-fill:var(--rc-host-fill,#00000012);--rc-fill-secondary:var(--rc-host-fill-secondary,#0000000b);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#00000008);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#00000005);--rc-border:var(--rc-host-border,#e5e5e5);--rc-border-subtle:var(--rc-host-border-subtle,#f0f0f0);--rc-ring:var(--rc-host-ring,#00000014);--rc-scrim:var(--rc-host-scrim,#00000052);--rc-accent:var(--rc-host-accent,#2563eb);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 10%, transparent));--rc-link:var(--rc-host-link,#2563eb);--rc-code-text:var(--rc-host-code-text,#171717);--rc-code-bg:var(--rc-host-code-bg,#f5f5f5);--rc-code-header-bg:var(--rc-host-code-header-bg,#f5f5f5);--rc-hr-border:var(--rc-host-hr-border,#e5e5e5);--rc-quote-border:var(--rc-host-quote-border,#e5e5e5);--rc-quote-bg:var(--rc-host-quote-bg,#f5f5f5);--rc-alert-info:var(--rc-host-alert-info,#2563eb);--rc-alert-warning:var(--rc-host-alert-warning,#b45309);--rc-alert-tip:var(--rc-host-alert-tip,#15803d);--rc-alert-caution:var(--rc-host-alert-caution,#dc2626);--rc-alert-important:var(--rc-host-alert-important,#7c3aed);--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0000000d;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f;--rc-shadow-modal:0 0 0 1px #0000000f, 0 16px 48px -12px #00000040;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f}[data-theme=light] [data-theme=dark] ._18gzxi1{--rc-text:var(--rc-host-text,#ededed);--rc-text-secondary:var(--rc-host-text-secondary,#c4c4c4);--rc-text-tertiary:var(--rc-host-text-tertiary,#8f8f8f);--rc-text-quaternary:var(--rc-host-text-quaternary,#5c5c5c);--rc-bg:var(--rc-host-bg,#0a0a0a);--rc-bg-secondary:var(--rc-host-bg-secondary,#121212);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#1a1a1a);--rc-bg-elevated:var(--rc-host-bg-elevated,#171717);--rc-fill:var(--rc-host-fill,#ffffff17);--rc-fill-secondary:var(--rc-host-fill-secondary,#ffffff0f);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#ffffff0a);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#ffffff06);--rc-border:var(--rc-host-border,#262626);--rc-border-subtle:var(--rc-host-border-subtle,#1c1c1c);--rc-ring:var(--rc-host-ring,#ffffff1f);--rc-scrim:var(--rc-host-scrim,#0000008f);--rc-accent:var(--rc-host-accent,#60a5fa);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 16%, transparent));--rc-link:var(--rc-host-link,#60a5fa);--rc-code-text:var(--rc-host-code-text,#ededed);--rc-code-bg:var(--rc-host-code-bg,#1a1a1a);--rc-code-header-bg:var(--rc-host-code-header-bg,#1a1a1a);--rc-hr-border:var(--rc-host-hr-border,#262626);--rc-quote-border:var(--rc-host-quote-border,#262626);--rc-quote-bg:var(--rc-host-quote-bg,#1a1a1a);--rc-alert-info:var(--rc-host-alert-info,#60a5fa);--rc-alert-warning:var(--rc-host-alert-warning,#fbbf24);--rc-alert-tip:var(--rc-host-alert-tip,#4ade80);--rc-alert-caution:var(--rc-host-alert-caution,#f87171);--rc-alert-important:var(--rc-host-alert-important,#a78bfa);--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0006;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 8px 24px #00000080, 0 16px 40px -8px #0009;--rc-shadow-modal:0 0 0 1px #ffffff14, 0 16px 48px -12px #000000b3;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 8px 24px #00000080, 0 16px 40px -8px #0009}[data-theme=light][data-theme]._18gzxi1{--rc-text:var(--rc-host-text,#171717);--rc-text-secondary:var(--rc-host-text-secondary,#404040);--rc-text-tertiary:var(--rc-host-text-tertiary,#737373);--rc-text-quaternary:var(--rc-host-text-quaternary,#a3a3a3);--rc-bg:var(--rc-host-bg,#fff);--rc-bg-secondary:var(--rc-host-bg-secondary,#fafafa);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#f5f5f5);--rc-bg-elevated:var(--rc-host-bg-elevated,#fff);--rc-fill:var(--rc-host-fill,#00000012);--rc-fill-secondary:var(--rc-host-fill-secondary,#0000000b);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#00000008);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#00000005);--rc-border:var(--rc-host-border,#e5e5e5);--rc-border-subtle:var(--rc-host-border-subtle,#f0f0f0);--rc-ring:var(--rc-host-ring,#00000014);--rc-scrim:var(--rc-host-scrim,#00000052);--rc-accent:var(--rc-host-accent,#2563eb);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 10%, transparent));--rc-link:var(--rc-host-link,#2563eb);--rc-code-text:var(--rc-host-code-text,#171717);--rc-code-bg:var(--rc-host-code-bg,#f5f5f5);--rc-code-header-bg:var(--rc-host-code-header-bg,#f5f5f5);--rc-hr-border:var(--rc-host-hr-border,#e5e5e5);--rc-quote-border:var(--rc-host-quote-border,#e5e5e5);--rc-quote-bg:var(--rc-host-quote-bg,#f5f5f5);--rc-alert-info:var(--rc-host-alert-info,#2563eb);--rc-alert-warning:var(--rc-host-alert-warning,#b45309);--rc-alert-tip:var(--rc-host-alert-tip,#15803d);--rc-alert-caution:var(--rc-host-alert-caution,#dc2626);--rc-alert-important:var(--rc-host-alert-important,#7c3aed);--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0000000d;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f;--rc-shadow-modal:0 0 0 1px #0000000f, 0 16px 48px -12px #00000040;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f}[data-theme=dark][data-theme]._18gzxi1{--rc-text:var(--rc-host-text,#ededed);--rc-text-secondary:var(--rc-host-text-secondary,#c4c4c4);--rc-text-tertiary:var(--rc-host-text-tertiary,#8f8f8f);--rc-text-quaternary:var(--rc-host-text-quaternary,#5c5c5c);--rc-bg:var(--rc-host-bg,#0a0a0a);--rc-bg-secondary:var(--rc-host-bg-secondary,#121212);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#1a1a1a);--rc-bg-elevated:var(--rc-host-bg-elevated,#171717);--rc-fill:var(--rc-host-fill,#ffffff17);--rc-fill-secondary:var(--rc-host-fill-secondary,#ffffff0f);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#ffffff0a);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#ffffff06);--rc-border:var(--rc-host-border,#262626);--rc-border-subtle:var(--rc-host-border-subtle,#1c1c1c);--rc-ring:var(--rc-host-ring,#ffffff1f);--rc-scrim:var(--rc-host-scrim,#0000008f);--rc-accent:var(--rc-host-accent,#60a5fa);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 16%, transparent));--rc-link:var(--rc-host-link,#60a5fa);--rc-code-text:var(--rc-host-code-text,#ededed);--rc-code-bg:var(--rc-host-code-bg,#1a1a1a);--rc-code-header-bg:var(--rc-host-code-header-bg,#1a1a1a);--rc-hr-border:var(--rc-host-hr-border,#262626);--rc-quote-border:var(--rc-host-quote-border,#262626);--rc-quote-bg:var(--rc-host-quote-bg,#1a1a1a);--rc-alert-info:var(--rc-host-alert-info,#60a5fa);--rc-alert-warning:var(--rc-host-alert-warning,#fbbf24);--rc-alert-tip:var(--rc-host-alert-tip,#4ade80);--rc-alert-caution:var(--rc-host-alert-caution,#f87171);--rc-alert-important:var(--rc-host-alert-important,#a78bfa);--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0006;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 8px 24px #00000080, 0 16px 40px -8px #0009;--rc-shadow-modal:0 0 0 1px #ffffff14, 0 16px 48px -12px #000000b3;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 8px 24px #00000080, 0 16px 40px -8px #0009}[data-theme=dark] [data-theme=light] ._18gzxi2{--rc-text:var(--rc-host-text,#171717);--rc-text-secondary:var(--rc-host-text-secondary,#404040);--rc-text-tertiary:var(--rc-host-text-tertiary,#737373);--rc-text-quaternary:var(--rc-host-text-quaternary,#a3a3a3);--rc-bg:var(--rc-host-bg,#fff);--rc-bg-secondary:var(--rc-host-bg-secondary,#fafafa);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#f5f5f5);--rc-bg-elevated:var(--rc-host-bg-elevated,#fff);--rc-fill:var(--rc-host-fill,#00000012);--rc-fill-secondary:var(--rc-host-fill-secondary,#0000000b);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#00000008);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#00000005);--rc-border:var(--rc-host-border,#e5e5e5);--rc-border-subtle:var(--rc-host-border-subtle,#f0f0f0);--rc-ring:var(--rc-host-ring,#00000014);--rc-scrim:var(--rc-host-scrim,#00000052);--rc-accent:var(--rc-host-accent,#2563eb);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 10%, transparent));--rc-link:var(--rc-host-link,#2563eb);--rc-code-text:var(--rc-host-code-text,#171717);--rc-code-bg:var(--rc-host-code-bg,#f5f5f5);--rc-code-header-bg:var(--rc-host-code-header-bg,#f5f5f5);--rc-hr-border:var(--rc-host-hr-border,#e5e5e5);--rc-quote-border:var(--rc-host-quote-border,#e5e5e5);--rc-quote-bg:var(--rc-host-quote-bg,#fafafa);--rc-alert-info:var(--rc-host-alert-info,#2563eb);--rc-alert-warning:var(--rc-host-alert-warning,#b45309);--rc-alert-tip:var(--rc-host-alert-tip,#15803d);--rc-alert-caution:var(--rc-host-alert-caution,#dc2626);--rc-alert-important:var(--rc-host-alert-important,#7c3aed);--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0000000d;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f;--rc-shadow-modal:0 0 0 1px #0000000f, 0 16px 48px -12px #00000040;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f}[data-theme=light] [data-theme=dark] ._18gzxi2{--rc-text:var(--rc-host-text,#ededed);--rc-text-secondary:var(--rc-host-text-secondary,#c4c4c4);--rc-text-tertiary:var(--rc-host-text-tertiary,#8f8f8f);--rc-text-quaternary:var(--rc-host-text-quaternary,#5c5c5c);--rc-bg:var(--rc-host-bg,#0a0a0a);--rc-bg-secondary:var(--rc-host-bg-secondary,#121212);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#1a1a1a);--rc-bg-elevated:var(--rc-host-bg-elevated,#171717);--rc-fill:var(--rc-host-fill,#ffffff17);--rc-fill-secondary:var(--rc-host-fill-secondary,#ffffff0f);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#ffffff0a);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#ffffff06);--rc-border:var(--rc-host-border,#262626);--rc-border-subtle:var(--rc-host-border-subtle,#1c1c1c);--rc-ring:var(--rc-host-ring,#ffffff1f);--rc-scrim:var(--rc-host-scrim,#0000008f);--rc-accent:var(--rc-host-accent,#60a5fa);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 16%, transparent));--rc-link:var(--rc-host-link,#60a5fa);--rc-code-text:var(--rc-host-code-text,#ededed);--rc-code-bg:var(--rc-host-code-bg,#1a1a1a);--rc-code-header-bg:var(--rc-host-code-header-bg,#1a1a1a);--rc-hr-border:var(--rc-host-hr-border,#262626);--rc-quote-border:var(--rc-host-quote-border,#262626);--rc-quote-bg:var(--rc-host-quote-bg,#1a1a1a);--rc-alert-info:var(--rc-host-alert-info,#60a5fa);--rc-alert-warning:var(--rc-host-alert-warning,#fbbf24);--rc-alert-tip:var(--rc-host-alert-tip,#4ade80);--rc-alert-caution:var(--rc-host-alert-caution,#f87171);--rc-alert-important:var(--rc-host-alert-important,#a78bfa);--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0006;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 8px 24px #00000080, 0 16px 40px -8px #0009;--rc-shadow-modal:0 0 0 1px #ffffff14, 0 16px 48px -12px #000000b3;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 8px 24px #00000080, 0 16px 40px -8px #0009}[data-theme=light][data-theme]._18gzxi2{--rc-text:var(--rc-host-text,#171717);--rc-text-secondary:var(--rc-host-text-secondary,#404040);--rc-text-tertiary:var(--rc-host-text-tertiary,#737373);--rc-text-quaternary:var(--rc-host-text-quaternary,#a3a3a3);--rc-bg:var(--rc-host-bg,#fff);--rc-bg-secondary:var(--rc-host-bg-secondary,#fafafa);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#f5f5f5);--rc-bg-elevated:var(--rc-host-bg-elevated,#fff);--rc-fill:var(--rc-host-fill,#00000012);--rc-fill-secondary:var(--rc-host-fill-secondary,#0000000b);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#00000008);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#00000005);--rc-border:var(--rc-host-border,#e5e5e5);--rc-border-subtle:var(--rc-host-border-subtle,#f0f0f0);--rc-ring:var(--rc-host-ring,#00000014);--rc-scrim:var(--rc-host-scrim,#00000052);--rc-accent:var(--rc-host-accent,#2563eb);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 10%, transparent));--rc-link:var(--rc-host-link,#2563eb);--rc-code-text:var(--rc-host-code-text,#171717);--rc-code-bg:var(--rc-host-code-bg,#f5f5f5);--rc-code-header-bg:var(--rc-host-code-header-bg,#f5f5f5);--rc-hr-border:var(--rc-host-hr-border,#e5e5e5);--rc-quote-border:var(--rc-host-quote-border,#e5e5e5);--rc-quote-bg:var(--rc-host-quote-bg,#fafafa);--rc-alert-info:var(--rc-host-alert-info,#2563eb);--rc-alert-warning:var(--rc-host-alert-warning,#b45309);--rc-alert-tip:var(--rc-host-alert-tip,#15803d);--rc-alert-caution:var(--rc-host-alert-caution,#dc2626);--rc-alert-important:var(--rc-host-alert-important,#7c3aed);--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0000000d;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f;--rc-shadow-modal:0 0 0 1px #0000000f, 0 16px 48px -12px #00000040;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f}[data-theme=dark][data-theme]._18gzxi2{--rc-text:var(--rc-host-text,#ededed);--rc-text-secondary:var(--rc-host-text-secondary,#c4c4c4);--rc-text-tertiary:var(--rc-host-text-tertiary,#8f8f8f);--rc-text-quaternary:var(--rc-host-text-quaternary,#5c5c5c);--rc-bg:var(--rc-host-bg,#0a0a0a);--rc-bg-secondary:var(--rc-host-bg-secondary,#121212);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#1a1a1a);--rc-bg-elevated:var(--rc-host-bg-elevated,#171717);--rc-fill:var(--rc-host-fill,#ffffff17);--rc-fill-secondary:var(--rc-host-fill-secondary,#ffffff0f);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#ffffff0a);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#ffffff06);--rc-border:var(--rc-host-border,#262626);--rc-border-subtle:var(--rc-host-border-subtle,#1c1c1c);--rc-ring:var(--rc-host-ring,#ffffff1f);--rc-scrim:var(--rc-host-scrim,#0000008f);--rc-accent:var(--rc-host-accent,#60a5fa);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 16%, transparent));--rc-link:var(--rc-host-link,#60a5fa);--rc-code-text:var(--rc-host-code-text,#ededed);--rc-code-bg:var(--rc-host-code-bg,#1a1a1a);--rc-code-header-bg:var(--rc-host-code-header-bg,#1a1a1a);--rc-hr-border:var(--rc-host-hr-border,#262626);--rc-quote-border:var(--rc-host-quote-border,#262626);--rc-quote-bg:var(--rc-host-quote-bg,#1a1a1a);--rc-alert-info:var(--rc-host-alert-info,#60a5fa);--rc-alert-warning:var(--rc-host-alert-warning,#fbbf24);--rc-alert-tip:var(--rc-host-alert-tip,#4ade80);--rc-alert-caution:var(--rc-host-alert-caution,#f87171);--rc-alert-important:var(--rc-host-alert-important,#a78bfa);--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0006;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 8px 24px #00000080, 0 16px 40px -8px #0009;--rc-shadow-modal:0 0 0 1px #ffffff14, 0 16px 48px -12px #000000b3;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 8px 24px #00000080, 0 16px 40px -8px #0009}[data-theme=dark] [data-theme=light] ._18gzxi3{--rc-text:var(--rc-host-text,#171717);--rc-text-secondary:var(--rc-host-text-secondary,#404040);--rc-text-tertiary:var(--rc-host-text-tertiary,#737373);--rc-text-quaternary:var(--rc-host-text-quaternary,#a3a3a3);--rc-bg:var(--rc-host-bg,#fff);--rc-bg-secondary:var(--rc-host-bg-secondary,#fafafa);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#f5f5f5);--rc-bg-elevated:var(--rc-host-bg-elevated,#fff);--rc-fill:var(--rc-host-fill,#00000012);--rc-fill-secondary:var(--rc-host-fill-secondary,#0000000b);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#00000008);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#00000005);--rc-border:var(--rc-host-border,#e5e5e5);--rc-border-subtle:var(--rc-host-border-subtle,#f0f0f0);--rc-ring:var(--rc-host-ring,#00000014);--rc-scrim:var(--rc-host-scrim,#00000052);--rc-accent:var(--rc-host-accent,#2563eb);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 10%, transparent));--rc-link:var(--rc-host-link,#2563eb);--rc-code-text:var(--rc-host-code-text,#171717);--rc-code-bg:var(--rc-host-code-bg,#f5f5f5);--rc-code-header-bg:var(--rc-host-code-header-bg,#f5f5f5);--rc-hr-border:var(--rc-host-hr-border,#e5e5e5);--rc-quote-border:var(--rc-host-quote-border,#e5e5e5);--rc-quote-bg:var(--rc-host-quote-bg,#fafafa);--rc-alert-info:var(--rc-host-alert-info,#2563eb);--rc-alert-warning:var(--rc-host-alert-warning,#b45309);--rc-alert-tip:var(--rc-host-alert-tip,#15803d);--rc-alert-caution:var(--rc-host-alert-caution,#dc2626);--rc-alert-important:var(--rc-host-alert-important,#7c3aed);--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0000000d;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f;--rc-shadow-modal:0 0 0 1px #0000000f, 0 16px 48px -12px #00000040;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f}[data-theme=light] [data-theme=dark] ._18gzxi3{--rc-text:var(--rc-host-text,#ededed);--rc-text-secondary:var(--rc-host-text-secondary,#c4c4c4);--rc-text-tertiary:var(--rc-host-text-tertiary,#8f8f8f);--rc-text-quaternary:var(--rc-host-text-quaternary,#5c5c5c);--rc-bg:var(--rc-host-bg,#0a0a0a);--rc-bg-secondary:var(--rc-host-bg-secondary,#121212);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#1a1a1a);--rc-bg-elevated:var(--rc-host-bg-elevated,#171717);--rc-fill:var(--rc-host-fill,#ffffff17);--rc-fill-secondary:var(--rc-host-fill-secondary,#ffffff0f);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#ffffff0a);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#ffffff06);--rc-border:var(--rc-host-border,#262626);--rc-border-subtle:var(--rc-host-border-subtle,#1c1c1c);--rc-ring:var(--rc-host-ring,#ffffff1f);--rc-scrim:var(--rc-host-scrim,#0000008f);--rc-accent:var(--rc-host-accent,#60a5fa);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 16%, transparent));--rc-link:var(--rc-host-link,#60a5fa);--rc-code-text:var(--rc-host-code-text,#ededed);--rc-code-bg:var(--rc-host-code-bg,#1a1a1a);--rc-code-header-bg:var(--rc-host-code-header-bg,#1a1a1a);--rc-hr-border:var(--rc-host-hr-border,#262626);--rc-quote-border:var(--rc-host-quote-border,#262626);--rc-quote-bg:var(--rc-host-quote-bg,#1a1a1a);--rc-alert-info:var(--rc-host-alert-info,#60a5fa);--rc-alert-warning:var(--rc-host-alert-warning,#fbbf24);--rc-alert-tip:var(--rc-host-alert-tip,#4ade80);--rc-alert-caution:var(--rc-host-alert-caution,#f87171);--rc-alert-important:var(--rc-host-alert-important,#a78bfa);--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0006;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 8px 24px #00000080, 0 16px 40px -8px #0009;--rc-shadow-modal:0 0 0 1px #ffffff14, 0 16px 48px -12px #000000b3;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 8px 24px #00000080, 0 16px 40px -8px #0009}[data-theme=light][data-theme]._18gzxi3{--rc-text:var(--rc-host-text,#171717);--rc-text-secondary:var(--rc-host-text-secondary,#404040);--rc-text-tertiary:var(--rc-host-text-tertiary,#737373);--rc-text-quaternary:var(--rc-host-text-quaternary,#a3a3a3);--rc-bg:var(--rc-host-bg,#fff);--rc-bg-secondary:var(--rc-host-bg-secondary,#fafafa);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#f5f5f5);--rc-bg-elevated:var(--rc-host-bg-elevated,#fff);--rc-fill:var(--rc-host-fill,#00000012);--rc-fill-secondary:var(--rc-host-fill-secondary,#0000000b);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#00000008);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#00000005);--rc-border:var(--rc-host-border,#e5e5e5);--rc-border-subtle:var(--rc-host-border-subtle,#f0f0f0);--rc-ring:var(--rc-host-ring,#00000014);--rc-scrim:var(--rc-host-scrim,#00000052);--rc-accent:var(--rc-host-accent,#2563eb);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 10%, transparent));--rc-link:var(--rc-host-link,#2563eb);--rc-code-text:var(--rc-host-code-text,#171717);--rc-code-bg:var(--rc-host-code-bg,#f5f5f5);--rc-code-header-bg:var(--rc-host-code-header-bg,#f5f5f5);--rc-hr-border:var(--rc-host-hr-border,#e5e5e5);--rc-quote-border:var(--rc-host-quote-border,#e5e5e5);--rc-quote-bg:var(--rc-host-quote-bg,#fafafa);--rc-alert-info:var(--rc-host-alert-info,#2563eb);--rc-alert-warning:var(--rc-host-alert-warning,#b45309);--rc-alert-tip:var(--rc-host-alert-tip,#15803d);--rc-alert-caution:var(--rc-host-alert-caution,#dc2626);--rc-alert-important:var(--rc-host-alert-important,#7c3aed);--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0000000d;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f;--rc-shadow-modal:0 0 0 1px #0000000f, 0 16px 48px -12px #00000040;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 4px 12px #0000000f, 0 12px 32px -8px #0000001f}[data-theme=dark][data-theme]._18gzxi3{--rc-text:var(--rc-host-text,#ededed);--rc-text-secondary:var(--rc-host-text-secondary,#c4c4c4);--rc-text-tertiary:var(--rc-host-text-tertiary,#8f8f8f);--rc-text-quaternary:var(--rc-host-text-quaternary,#5c5c5c);--rc-bg:var(--rc-host-bg,#0a0a0a);--rc-bg-secondary:var(--rc-host-bg-secondary,#121212);--rc-bg-tertiary:var(--rc-host-bg-tertiary,#1a1a1a);--rc-bg-elevated:var(--rc-host-bg-elevated,#171717);--rc-fill:var(--rc-host-fill,#ffffff17);--rc-fill-secondary:var(--rc-host-fill-secondary,#ffffff0f);--rc-fill-tertiary:var(--rc-host-fill-tertiary,#ffffff0a);--rc-fill-quaternary:var(--rc-host-fill-quaternary,#ffffff06);--rc-border:var(--rc-host-border,#262626);--rc-border-subtle:var(--rc-host-border-subtle,#1c1c1c);--rc-ring:var(--rc-host-ring,#ffffff1f);--rc-scrim:var(--rc-host-scrim,#0000008f);--rc-accent:var(--rc-host-accent,#60a5fa);--rc-accent-light:var(--rc-host-accent-light,color-mix(in oklab, var(--rc-accent) 16%, transparent));--rc-link:var(--rc-host-link,#60a5fa);--rc-code-text:var(--rc-host-code-text,#ededed);--rc-code-bg:var(--rc-host-code-bg,#1a1a1a);--rc-code-header-bg:var(--rc-host-code-header-bg,#1a1a1a);--rc-hr-border:var(--rc-host-hr-border,#262626);--rc-quote-border:var(--rc-host-quote-border,#262626);--rc-quote-bg:var(--rc-host-quote-bg,#1a1a1a);--rc-alert-info:var(--rc-host-alert-info,#60a5fa);--rc-alert-warning:var(--rc-host-alert-warning,#fbbf24);--rc-alert-tip:var(--rc-host-alert-tip,#4ade80);--rc-alert-caution:var(--rc-host-alert-caution,#f87171);--rc-alert-important:var(--rc-host-alert-important,#a78bfa);--rc-shadow-xs:0 0 0 1px var(--rc-ring), 0 1px 2px #0006;--rc-shadow-top-bar:0 0 0 1px var(--rc-ring), 0 8px 24px #00000080, 0 16px 40px -8px #0009;--rc-shadow-modal:0 0 0 1px #ffffff14, 0 16px 48px -12px #000000b3;--rc-shadow-menu:0 0 0 1px var(--rc-ring), 0 8px 24px #00000080, 0 16px 40px -8px #0009}::highlight(agent-stream-hidden){color:#0000;text-decoration-color:#0000}::highlight(agent-stream-fade-1){color:var(--rc-text-quaternary)}::highlight(agent-stream-fade-2){color:var(--rc-text-tertiary)}::highlight(agent-stream-fade-3){color:var(--rc-text-secondary)}.al0vm60{z-index:5;background-color:var(--rc-accent);pointer-events:none;opacity:0;border-radius:1px;width:2px;margin-left:1px;transition:opacity .24s;position:absolute;top:0;left:0}.al0vm61{opacity:1}.al0vm62{background-color:var(--rc-accent);color:var(--rc-bg);white-space:nowrap;border-radius:3px 3px 3px 0;margin-bottom:2px;padding-inline-start:5px;padding-inline-end:5px;font-size:10px;font-weight:600;line-height:16px;position:absolute;bottom:100%;left:0}
|
|
2
|
+
/*$vite$:1*/
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const HIDDEN_HIGHLIGHT = "agent-stream-hidden";
|
|
2
|
+
export declare const FADE_HIGHLIGHTS: readonly ["agent-stream-fade-1", "agent-stream-fade-2", "agent-stream-fade-3"];
|
|
3
|
+
export declare const caret: string;
|
|
4
|
+
export declare const caretVisible: string;
|
|
5
|
+
export declare const caretLabel: string;
|
|
6
|
+
//# sourceMappingURL=styles.css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../src/styles.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AACtD,eAAO,MAAM,eAAe,gFAIlB,CAAC;AAcX,eAAO,MAAM,KAAK,QAYhB,CAAC;AAEH,eAAO,MAAM,YAAY,QAEvB,CAAC;AAEH,eAAO,MAAM,UAAU,QAarB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-plugin-agent-stream",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.62.2",
|
|
4
|
+
"description": "Plays agent writes into the editor as a streaming reveal with a virtual caret",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/Innei/haklex.git",
|
|
8
|
+
"directory": "packages/rich-plugin-agent-stream"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"type": "module",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/index.mjs",
|
|
15
|
+
"types": "./dist/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./style.css": "./dist/rich-plugin-agent-stream.css"
|
|
18
|
+
},
|
|
19
|
+
"main": "./dist/index.mjs",
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@haklex/rich-headless": "0.62.2",
|
|
25
|
+
"@haklex/rich-style-token": "0.62.2",
|
|
26
|
+
"@lexical/headless": "^0.53.0",
|
|
27
|
+
"@lexical/react": "^0.53.0",
|
|
28
|
+
"@lexical/rich-text": "^0.53.0",
|
|
29
|
+
"@types/react": "^19.3.0",
|
|
30
|
+
"@types/react-dom": "^19.3.0",
|
|
31
|
+
"@vanilla-extract/css": "^1.21.3",
|
|
32
|
+
"@vanilla-extract/vite-plugin": "^5.2.6",
|
|
33
|
+
"lexical": "^0.53.0",
|
|
34
|
+
"react": "^19.3.1",
|
|
35
|
+
"react-dom": "^19.3.1",
|
|
36
|
+
"typescript": "^7.0.2",
|
|
37
|
+
"unplugin-dts": "^1.1.2",
|
|
38
|
+
"vite": "^8.3.5"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"@haklex/rich-style-token": "^0.62.2",
|
|
42
|
+
"@lexical/react": "^0.53.0",
|
|
43
|
+
"@lexical/rich-text": "^0.53.0",
|
|
44
|
+
"lexical": "^0.53.0",
|
|
45
|
+
"react": ">=19",
|
|
46
|
+
"react-dom": ">=19"
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"build": "vite build",
|
|
53
|
+
"dev:build": "vite build --watch"
|
|
54
|
+
},
|
|
55
|
+
"types": "./dist/index.d.ts"
|
|
6
56
|
}
|