@agent-native/toolkit 0.4.10 → 0.5.0
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 +17 -6
- package/dist/collab-ui/agent-identity.d.ts +9 -0
- package/dist/collab-ui/agent-identity.d.ts.map +1 -0
- package/dist/collab-ui/agent-identity.js +9 -0
- package/dist/collab-ui/agent-identity.js.map +1 -0
- package/dist/collab-ui/index.d.ts +2 -0
- package/dist/collab-ui/index.d.ts.map +1 -1
- package/dist/collab-ui/index.js +2 -0
- package/dist/collab-ui/index.js.map +1 -1
- package/dist/collab-ui/lead-client.d.ts +3 -0
- package/dist/collab-ui/lead-client.d.ts.map +1 -0
- package/dist/collab-ui/lead-client.js +29 -0
- package/dist/collab-ui/lead-client.js.map +1 -0
- package/dist/context-ui/ContextMeter.d.ts +10 -0
- package/dist/context-ui/ContextMeter.d.ts.map +1 -0
- package/dist/context-ui/ContextMeter.js +20 -0
- package/dist/context-ui/ContextMeter.js.map +1 -0
- package/dist/context-ui/ContextSegmentRow.d.ts +14 -0
- package/dist/context-ui/ContextSegmentRow.d.ts.map +1 -0
- package/dist/context-ui/ContextSegmentRow.js +25 -0
- package/dist/context-ui/ContextSegmentRow.js.map +1 -0
- package/dist/context-ui/ContextTreemap.d.ts +7 -0
- package/dist/context-ui/ContextTreemap.d.ts.map +1 -0
- package/dist/context-ui/ContextTreemap.js +55 -0
- package/dist/context-ui/ContextTreemap.js.map +1 -0
- package/dist/context-ui/ContextXRayPanel.d.ts +13 -0
- package/dist/context-ui/ContextXRayPanel.d.ts.map +1 -0
- package/dist/context-ui/ContextXRayPanel.js +120 -0
- package/dist/context-ui/ContextXRayPanel.js.map +1 -0
- package/dist/context-ui/format.d.ts +6 -0
- package/dist/context-ui/format.d.ts.map +1 -0
- package/dist/context-ui/format.js +58 -0
- package/dist/context-ui/format.js.map +1 -0
- package/dist/context-ui/index.d.ts +7 -0
- package/dist/context-ui/index.d.ts.map +1 -0
- package/dist/context-ui/index.js +6 -0
- package/dist/context-ui/index.js.map +1 -0
- package/dist/context-ui/types.d.ts +39 -0
- package/dist/context-ui/types.d.ts.map +1 -0
- package/dist/context-ui/types.js +2 -0
- package/dist/context-ui/types.js.map +1 -0
- package/dist/design-tweaks/index.d.ts +2 -0
- package/dist/design-tweaks/index.d.ts.map +1 -0
- package/dist/design-tweaks/index.js +2 -0
- package/dist/design-tweaks/index.js.map +1 -0
- package/dist/design-tweaks/visual-style-controls.d.ts +90 -0
- package/dist/design-tweaks/visual-style-controls.d.ts.map +1 -0
- package/dist/design-tweaks/visual-style-controls.js +499 -0
- package/dist/design-tweaks/visual-style-controls.js.map +1 -0
- package/dist/editor/BubbleToolbar.d.ts +37 -0
- package/dist/editor/BubbleToolbar.d.ts.map +1 -0
- package/dist/editor/BubbleToolbar.js +171 -0
- package/dist/editor/BubbleToolbar.js.map +1 -0
- package/dist/editor/CodeBlockNode.d.ts +49 -0
- package/dist/editor/CodeBlockNode.d.ts.map +1 -0
- package/dist/editor/CodeBlockNode.js +127 -0
- package/dist/editor/CodeBlockNode.js.map +1 -0
- package/dist/editor/DragHandle.d.ts +97 -0
- package/dist/editor/DragHandle.d.ts.map +1 -0
- package/dist/editor/DragHandle.js +1066 -0
- package/dist/editor/DragHandle.js.map +1 -0
- package/dist/editor/DragHandle.spec.d.ts +2 -0
- package/dist/editor/DragHandle.spec.d.ts.map +1 -0
- package/dist/editor/DragHandle.spec.js +407 -0
- package/dist/editor/DragHandle.spec.js.map +1 -0
- package/dist/editor/ImageExtension.d.ts +63 -0
- package/dist/editor/ImageExtension.d.ts.map +1 -0
- package/dist/editor/ImageExtension.js +243 -0
- package/dist/editor/ImageExtension.js.map +1 -0
- package/dist/editor/ImageExtension.roundtrip.spec.d.ts +2 -0
- package/dist/editor/ImageExtension.roundtrip.spec.d.ts.map +1 -0
- package/dist/editor/ImageExtension.roundtrip.spec.js +103 -0
- package/dist/editor/ImageExtension.roundtrip.spec.js.map +1 -0
- package/dist/editor/RichMarkdownEditor.collab.spec.d.ts +2 -0
- package/dist/editor/RichMarkdownEditor.collab.spec.d.ts.map +1 -0
- package/dist/editor/RichMarkdownEditor.collab.spec.js +65 -0
- package/dist/editor/RichMarkdownEditor.collab.spec.js.map +1 -0
- package/dist/editor/RichMarkdownEditor.d.ts +52 -0
- package/dist/editor/RichMarkdownEditor.d.ts.map +1 -0
- package/dist/editor/RichMarkdownEditor.js +38 -0
- package/dist/editor/RichMarkdownEditor.js.map +1 -0
- package/dist/editor/RichMarkdownEditor.roundtrip.spec.d.ts +2 -0
- package/dist/editor/RichMarkdownEditor.roundtrip.spec.d.ts.map +1 -0
- package/dist/editor/RichMarkdownEditor.roundtrip.spec.js +186 -0
- package/dist/editor/RichMarkdownEditor.roundtrip.spec.js.map +1 -0
- package/dist/editor/RunId.d.ts +28 -0
- package/dist/editor/RunId.d.ts.map +1 -0
- package/dist/editor/RunId.js +60 -0
- package/dist/editor/RunId.js.map +1 -0
- package/dist/editor/SharedRichEditor.d.ts +110 -0
- package/dist/editor/SharedRichEditor.d.ts.map +1 -0
- package/dist/editor/SharedRichEditor.js +144 -0
- package/dist/editor/SharedRichEditor.js.map +1 -0
- package/dist/editor/SlashCommandMenu.d.ts +41 -0
- package/dist/editor/SlashCommandMenu.d.ts.map +1 -0
- package/dist/editor/SlashCommandMenu.js +221 -0
- package/dist/editor/SlashCommandMenu.js.map +1 -0
- package/dist/editor/disableHistory.spec.d.ts +2 -0
- package/dist/editor/disableHistory.spec.d.ts.map +1 -0
- package/dist/editor/disableHistory.spec.js +73 -0
- package/dist/editor/disableHistory.spec.js.map +1 -0
- package/dist/editor/extensions.d.ts +178 -0
- package/dist/editor/extensions.d.ts.map +1 -0
- package/dist/editor/extensions.js +224 -0
- package/dist/editor/extensions.js.map +1 -0
- package/dist/editor/gfmDoc.d.ts +24 -0
- package/dist/editor/gfmDoc.d.ts.map +1 -0
- package/dist/editor/gfmDoc.js +83 -0
- package/dist/editor/gfmDoc.js.map +1 -0
- package/dist/editor/gfmDoc.spec.d.ts +2 -0
- package/dist/editor/gfmDoc.spec.d.ts.map +1 -0
- package/dist/editor/gfmDoc.spec.js +194 -0
- package/dist/editor/gfmDoc.spec.js.map +1 -0
- package/dist/editor/index.d.ts +13 -0
- package/dist/editor/index.d.ts.map +1 -0
- package/dist/editor/index.js +13 -0
- package/dist/editor/index.js.map +1 -0
- package/dist/editor/structuralReorderUndo.spec.d.ts +2 -0
- package/dist/editor/structuralReorderUndo.spec.d.ts.map +1 -0
- package/dist/editor/structuralReorderUndo.spec.js +120 -0
- package/dist/editor/structuralReorderUndo.spec.js.map +1 -0
- package/dist/editor/surgical-apply.d.ts +66 -0
- package/dist/editor/surgical-apply.d.ts.map +1 -0
- package/dist/editor/surgical-apply.js +147 -0
- package/dist/editor/surgical-apply.js.map +1 -0
- package/dist/editor/surgical-apply.spec.d.ts +2 -0
- package/dist/editor/surgical-apply.spec.d.ts.map +1 -0
- package/dist/editor/surgical-apply.spec.js +257 -0
- package/dist/editor/surgical-apply.spec.js.map +1 -0
- package/dist/editor/useCollabReconcile.concurrent.spec.d.ts +2 -0
- package/dist/editor/useCollabReconcile.concurrent.spec.d.ts.map +1 -0
- package/dist/editor/useCollabReconcile.concurrent.spec.js +329 -0
- package/dist/editor/useCollabReconcile.concurrent.spec.js.map +1 -0
- package/dist/editor/useCollabReconcile.d.ts +110 -0
- package/dist/editor/useCollabReconcile.d.ts.map +1 -0
- package/dist/editor/useCollabReconcile.idempotent.spec.d.ts +2 -0
- package/dist/editor/useCollabReconcile.idempotent.spec.d.ts.map +1 -0
- package/dist/editor/useCollabReconcile.idempotent.spec.js +248 -0
- package/dist/editor/useCollabReconcile.idempotent.spec.js.map +1 -0
- package/dist/editor/useCollabReconcile.js +440 -0
- package/dist/editor/useCollabReconcile.js.map +1 -0
- package/dist/editor.css +510 -0
- package/package.json +63 -9
package/dist/editor.css
ADDED
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
.an-rich-md-wrapper {
|
|
2
|
+
min-height: 100%;
|
|
3
|
+
position: relative;
|
|
4
|
+
cursor: text;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.an-rich-md-wrapper--readonly {
|
|
8
|
+
cursor: default;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.an-rich-md-loading {
|
|
12
|
+
min-height: 7rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.an-rich-md-prose {
|
|
16
|
+
outline: none;
|
|
17
|
+
color: hsl(var(--foreground));
|
|
18
|
+
line-height: 1.65;
|
|
19
|
+
font-size: 0.95rem;
|
|
20
|
+
min-height: 1.65em;
|
|
21
|
+
text-align: start;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.an-rich-md-prose > *:first-child {
|
|
25
|
+
margin-top: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.an-rich-md-prose h1 {
|
|
29
|
+
font-size: 1.85em;
|
|
30
|
+
font-weight: 700;
|
|
31
|
+
margin: 1em 0 0.3em;
|
|
32
|
+
line-height: 1.18;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.an-rich-md-prose h2 {
|
|
36
|
+
font-size: 1.45em;
|
|
37
|
+
font-weight: 650;
|
|
38
|
+
margin: 0.9em 0 0.25em;
|
|
39
|
+
line-height: 1.25;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.an-rich-md-prose h3 {
|
|
43
|
+
font-size: 1.18em;
|
|
44
|
+
font-weight: 650;
|
|
45
|
+
margin: 0.75em 0 0.2em;
|
|
46
|
+
line-height: 1.32;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.an-rich-md-prose h4 {
|
|
50
|
+
font-size: 1em;
|
|
51
|
+
font-weight: 650;
|
|
52
|
+
margin: 0.65em 0 0.15em;
|
|
53
|
+
line-height: 1.35;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.an-rich-md-prose p {
|
|
57
|
+
margin: 0.45em 0;
|
|
58
|
+
min-height: 1.65em;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.an-rich-md-prose ul:not(.an-rich-md-task-list),
|
|
62
|
+
.an-rich-md-prose ol {
|
|
63
|
+
padding-inline-start: 1.45em;
|
|
64
|
+
margin: 0.35em 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.an-rich-md-prose ul:not(.an-rich-md-task-list) {
|
|
68
|
+
list-style-type: disc;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.an-rich-md-prose ol {
|
|
72
|
+
list-style-type: decimal;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.an-rich-md-prose li {
|
|
76
|
+
margin: 0.12em 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.an-rich-md-prose li p {
|
|
80
|
+
margin: 0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.an-rich-md-task-list {
|
|
84
|
+
list-style: none;
|
|
85
|
+
margin: 0.35em 0;
|
|
86
|
+
padding-inline-start: 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.an-rich-md-task-list li {
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: flex-start;
|
|
92
|
+
gap: 0.45em;
|
|
93
|
+
margin: 0.18em 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.an-rich-md-task-list li label {
|
|
97
|
+
display: inline-flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
height: 1.65em;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.an-rich-md-task-list li input[type="checkbox"] {
|
|
103
|
+
width: 0.95em;
|
|
104
|
+
height: 0.95em;
|
|
105
|
+
accent-color: hsl(var(--primary));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.an-rich-md-task-list li > div {
|
|
109
|
+
flex: 1;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.an-rich-md-prose blockquote {
|
|
113
|
+
border-inline-start: 2px solid hsl(var(--border));
|
|
114
|
+
padding-inline-start: 0.9em;
|
|
115
|
+
margin: 0.45em 0;
|
|
116
|
+
color: hsl(var(--muted-foreground));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.an-rich-md-prose code {
|
|
120
|
+
unicode-bidi: isolate;
|
|
121
|
+
font-family:
|
|
122
|
+
ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
|
|
123
|
+
font-size: 0.88em;
|
|
124
|
+
background: hsl(var(--muted));
|
|
125
|
+
padding: 0.12em 0.32em;
|
|
126
|
+
border-radius: 4px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.an-rich-md-prose :not(pre) > code {
|
|
130
|
+
direction: ltr;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.an-rich-md-prose pre {
|
|
134
|
+
font-family:
|
|
135
|
+
ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
|
|
136
|
+
font-size: 0.86em;
|
|
137
|
+
/* Theme-aware code surface: follows the app's muted/foreground/border tokens
|
|
138
|
+
so block code respects light and dark mode (the token palette below is
|
|
139
|
+
tuned to read on a muted surface in both). */
|
|
140
|
+
background: hsl(var(--muted));
|
|
141
|
+
color: hsl(var(--foreground));
|
|
142
|
+
border: 1px solid hsl(var(--border));
|
|
143
|
+
border-radius: 6px;
|
|
144
|
+
padding: 0.8em 1em;
|
|
145
|
+
margin: 0.55em 0;
|
|
146
|
+
overflow-x: auto;
|
|
147
|
+
line-height: 1.5;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.an-rich-md-prose pre code {
|
|
151
|
+
background: none;
|
|
152
|
+
border: none;
|
|
153
|
+
padding: 0;
|
|
154
|
+
font-size: inherit;
|
|
155
|
+
color: inherit;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* highlight.js (lowlight) token palette. Scoped to block code so inline `code`
|
|
159
|
+
keeps its own background. No highlight.js base theme is imported; these rules
|
|
160
|
+
are the entire theme, tuned (mid-lightness HSL) to read on the muted surface
|
|
161
|
+
above in both light and dark mode. */
|
|
162
|
+
.an-rich-md-prose pre code .hljs-comment,
|
|
163
|
+
.an-rich-md-prose pre code .hljs-quote {
|
|
164
|
+
color: hsl(var(--muted-foreground));
|
|
165
|
+
font-style: italic;
|
|
166
|
+
}
|
|
167
|
+
.an-rich-md-prose pre code .hljs-keyword,
|
|
168
|
+
.an-rich-md-prose pre code .hljs-selector-tag,
|
|
169
|
+
.an-rich-md-prose pre code .hljs-literal,
|
|
170
|
+
.an-rich-md-prose pre code .hljs-doctag {
|
|
171
|
+
color: hsl(280 60% 58%);
|
|
172
|
+
}
|
|
173
|
+
.an-rich-md-prose pre code .hljs-string,
|
|
174
|
+
.an-rich-md-prose pre code .hljs-regexp,
|
|
175
|
+
.an-rich-md-prose pre code .hljs-addition {
|
|
176
|
+
color: hsl(140 52% 40%);
|
|
177
|
+
}
|
|
178
|
+
.an-rich-md-prose pre code .hljs-number,
|
|
179
|
+
.an-rich-md-prose pre code .hljs-symbol,
|
|
180
|
+
.an-rich-md-prose pre code .hljs-literal {
|
|
181
|
+
color: hsl(28 78% 48%);
|
|
182
|
+
}
|
|
183
|
+
.an-rich-md-prose pre code .hljs-meta {
|
|
184
|
+
color: hsl(var(--muted-foreground));
|
|
185
|
+
}
|
|
186
|
+
.an-rich-md-prose pre code .hljs-title,
|
|
187
|
+
.an-rich-md-prose pre code .hljs-title.function_,
|
|
188
|
+
.an-rich-md-prose pre code .hljs-section {
|
|
189
|
+
color: hsl(210 72% 52%);
|
|
190
|
+
}
|
|
191
|
+
.an-rich-md-prose pre code .hljs-built_in,
|
|
192
|
+
.an-rich-md-prose pre code .hljs-type,
|
|
193
|
+
.an-rich-md-prose pre code .hljs-title.class_,
|
|
194
|
+
.an-rich-md-prose pre code .hljs-variable.language_ {
|
|
195
|
+
color: hsl(190 64% 40%);
|
|
196
|
+
}
|
|
197
|
+
.an-rich-md-prose pre code .hljs-attr,
|
|
198
|
+
.an-rich-md-prose pre code .hljs-attribute,
|
|
199
|
+
.an-rich-md-prose pre code .hljs-property,
|
|
200
|
+
.an-rich-md-prose pre code .hljs-params {
|
|
201
|
+
color: hsl(35 68% 46%);
|
|
202
|
+
}
|
|
203
|
+
.an-rich-md-prose pre code .hljs-name,
|
|
204
|
+
.an-rich-md-prose pre code .hljs-tag,
|
|
205
|
+
.an-rich-md-prose pre code .hljs-selector-id,
|
|
206
|
+
.an-rich-md-prose pre code .hljs-selector-class {
|
|
207
|
+
color: hsl(350 62% 52%);
|
|
208
|
+
}
|
|
209
|
+
.an-rich-md-prose pre code .hljs-deletion {
|
|
210
|
+
color: hsl(0 62% 52%);
|
|
211
|
+
}
|
|
212
|
+
.an-rich-md-prose pre code .hljs-emphasis {
|
|
213
|
+
font-style: italic;
|
|
214
|
+
}
|
|
215
|
+
.an-rich-md-prose pre code .hljs-strong {
|
|
216
|
+
font-weight: 600;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* In dark mode, lift the token lightness for contrast on the dark muted surface. */
|
|
220
|
+
.dark .an-rich-md-prose pre code .hljs-keyword,
|
|
221
|
+
.dark .an-rich-md-prose pre code .hljs-selector-tag,
|
|
222
|
+
.dark .an-rich-md-prose pre code .hljs-literal,
|
|
223
|
+
.dark .an-rich-md-prose pre code .hljs-doctag {
|
|
224
|
+
color: hsl(280 72% 72%);
|
|
225
|
+
}
|
|
226
|
+
.dark .an-rich-md-prose pre code .hljs-string,
|
|
227
|
+
.dark .an-rich-md-prose pre code .hljs-regexp,
|
|
228
|
+
.dark .an-rich-md-prose pre code .hljs-addition {
|
|
229
|
+
color: hsl(140 48% 62%);
|
|
230
|
+
}
|
|
231
|
+
.dark .an-rich-md-prose pre code .hljs-number,
|
|
232
|
+
.dark .an-rich-md-prose pre code .hljs-symbol,
|
|
233
|
+
.dark .an-rich-md-prose pre code .hljs-literal {
|
|
234
|
+
color: hsl(30 85% 65%);
|
|
235
|
+
}
|
|
236
|
+
.dark .an-rich-md-prose pre code .hljs-title,
|
|
237
|
+
.dark .an-rich-md-prose pre code .hljs-title.function_,
|
|
238
|
+
.dark .an-rich-md-prose pre code .hljs-section {
|
|
239
|
+
color: hsl(210 80% 70%);
|
|
240
|
+
}
|
|
241
|
+
.dark .an-rich-md-prose pre code .hljs-built_in,
|
|
242
|
+
.dark .an-rich-md-prose pre code .hljs-type,
|
|
243
|
+
.dark .an-rich-md-prose pre code .hljs-title.class_,
|
|
244
|
+
.dark .an-rich-md-prose pre code .hljs-variable.language_ {
|
|
245
|
+
color: hsl(190 70% 62%);
|
|
246
|
+
}
|
|
247
|
+
.dark .an-rich-md-prose pre code .hljs-attr,
|
|
248
|
+
.dark .an-rich-md-prose pre code .hljs-attribute,
|
|
249
|
+
.dark .an-rich-md-prose pre code .hljs-property,
|
|
250
|
+
.dark .an-rich-md-prose pre code .hljs-params {
|
|
251
|
+
color: hsl(40 78% 66%);
|
|
252
|
+
}
|
|
253
|
+
.dark .an-rich-md-prose pre code .hljs-name,
|
|
254
|
+
.dark .an-rich-md-prose pre code .hljs-tag,
|
|
255
|
+
.dark .an-rich-md-prose pre code .hljs-selector-id,
|
|
256
|
+
.dark .an-rich-md-prose pre code .hljs-selector-class {
|
|
257
|
+
color: hsl(350 72% 68%);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.an-rich-md-prose hr {
|
|
261
|
+
border: none;
|
|
262
|
+
border-top: 1px solid hsl(var(--border));
|
|
263
|
+
margin: 1.1em 0;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.an-rich-md-table {
|
|
267
|
+
width: 100%;
|
|
268
|
+
border-collapse: collapse;
|
|
269
|
+
margin: 0.7em 0;
|
|
270
|
+
table-layout: fixed;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.an-rich-md-table td,
|
|
274
|
+
.an-rich-md-table th {
|
|
275
|
+
border: 1px solid hsl(var(--border));
|
|
276
|
+
padding: 0.45em 0.55em;
|
|
277
|
+
vertical-align: top;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.an-rich-md-table th {
|
|
281
|
+
background: hsl(var(--muted) / 0.6);
|
|
282
|
+
font-weight: 650;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.an-rich-md-table p {
|
|
286
|
+
margin: 0;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.an-rich-md-prose strong {
|
|
290
|
+
font-weight: 650;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.an-rich-md-prose em {
|
|
294
|
+
font-style: italic;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.an-rich-md-prose s {
|
|
298
|
+
text-decoration: line-through;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.an-rich-md-link {
|
|
302
|
+
color: hsl(var(--foreground));
|
|
303
|
+
text-decoration: underline;
|
|
304
|
+
text-underline-offset: 2px;
|
|
305
|
+
text-decoration-color: hsl(var(--muted-foreground));
|
|
306
|
+
cursor: pointer;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.an-rich-md-link:hover {
|
|
310
|
+
text-decoration-color: hsl(var(--foreground));
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.an-rich-md-prose p.is-editor-empty:first-child::before,
|
|
314
|
+
.an-rich-md-prose p.is-empty::before,
|
|
315
|
+
.an-rich-md-prose h1.is-empty::before,
|
|
316
|
+
.an-rich-md-prose h2.is-empty::before,
|
|
317
|
+
.an-rich-md-prose h3.is-empty::before,
|
|
318
|
+
.an-rich-md-prose h4.is-empty::before {
|
|
319
|
+
content: attr(data-placeholder);
|
|
320
|
+
float: inline-start;
|
|
321
|
+
color: hsl(var(--muted-foreground));
|
|
322
|
+
opacity: 0.55;
|
|
323
|
+
pointer-events: none;
|
|
324
|
+
height: 0;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.an-rich-md-prose ::selection {
|
|
328
|
+
background: hsl(var(--ring) / 0.22);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.an-rich-md-bubble-toolbar {
|
|
332
|
+
z-index: 9999;
|
|
333
|
+
display: flex;
|
|
334
|
+
align-items: center;
|
|
335
|
+
border-radius: 6px;
|
|
336
|
+
background: hsl(var(--popover));
|
|
337
|
+
color: hsl(var(--popover-foreground));
|
|
338
|
+
padding: 3px;
|
|
339
|
+
box-shadow:
|
|
340
|
+
0 4px 16px rgb(0 0 0 / 0.25),
|
|
341
|
+
0 0 0 1px hsl(var(--border));
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.an-rich-md-bubble-items,
|
|
345
|
+
.an-rich-md-link-editor {
|
|
346
|
+
display: flex;
|
|
347
|
+
align-items: center;
|
|
348
|
+
gap: 2px;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.an-rich-md-bubble-button {
|
|
352
|
+
padding: 3px 6px;
|
|
353
|
+
border-radius: 4px;
|
|
354
|
+
font-size: 12px;
|
|
355
|
+
color: hsl(var(--popover-foreground) / 0.76);
|
|
356
|
+
background: none;
|
|
357
|
+
border: none;
|
|
358
|
+
cursor: pointer;
|
|
359
|
+
line-height: 1;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.an-rich-md-bubble-button:hover {
|
|
363
|
+
background: hsl(var(--accent));
|
|
364
|
+
color: hsl(var(--accent-foreground));
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.an-rich-md-bubble-button--active {
|
|
368
|
+
background: hsl(var(--accent));
|
|
369
|
+
color: hsl(var(--accent-foreground));
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.an-rich-md-bubble-divider {
|
|
373
|
+
width: 1px;
|
|
374
|
+
height: 16px;
|
|
375
|
+
margin: 0 2px;
|
|
376
|
+
background: hsl(var(--border));
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.an-rich-md-link-editor {
|
|
380
|
+
padding: 4px;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.an-rich-md-link-editor input {
|
|
384
|
+
width: 10rem;
|
|
385
|
+
border: none;
|
|
386
|
+
outline: none;
|
|
387
|
+
background: transparent;
|
|
388
|
+
color: hsl(var(--popover-foreground));
|
|
389
|
+
font-size: 12px;
|
|
390
|
+
padding: 2px 4px;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.an-rich-md-link-editor button {
|
|
394
|
+
border: none;
|
|
395
|
+
background: none;
|
|
396
|
+
color: hsl(var(--primary));
|
|
397
|
+
cursor: pointer;
|
|
398
|
+
font-size: 11px;
|
|
399
|
+
font-weight: 500;
|
|
400
|
+
padding: 2px 6px;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.an-rich-md-slash-menu {
|
|
404
|
+
z-index: 9999;
|
|
405
|
+
width: min(420px, calc(100vw - 24px));
|
|
406
|
+
min-width: 230px;
|
|
407
|
+
max-height: 320px;
|
|
408
|
+
overflow-y: auto;
|
|
409
|
+
color: hsl(var(--foreground));
|
|
410
|
+
background: hsl(var(--popover));
|
|
411
|
+
border: 1px solid hsl(var(--border));
|
|
412
|
+
border-radius: 7px;
|
|
413
|
+
box-shadow:
|
|
414
|
+
0 4px 20px rgb(0 0 0 / 0.12),
|
|
415
|
+
0 0 0 1px rgb(0 0 0 / 0.04);
|
|
416
|
+
padding: 4px 0;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.an-rich-md-slash-heading {
|
|
420
|
+
padding: 4px 10px;
|
|
421
|
+
font-size: 10px;
|
|
422
|
+
font-weight: 650;
|
|
423
|
+
text-transform: uppercase;
|
|
424
|
+
letter-spacing: 0.06em;
|
|
425
|
+
color: hsl(var(--muted-foreground));
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.an-rich-md-slash-item {
|
|
429
|
+
width: 100%;
|
|
430
|
+
min-width: 0;
|
|
431
|
+
min-height: 44px;
|
|
432
|
+
display: flex;
|
|
433
|
+
align-items: center;
|
|
434
|
+
gap: 8px;
|
|
435
|
+
padding: 6px 10px;
|
|
436
|
+
text-align: start;
|
|
437
|
+
background: none;
|
|
438
|
+
border: none;
|
|
439
|
+
cursor: pointer;
|
|
440
|
+
color: hsl(var(--foreground));
|
|
441
|
+
font-size: 13px;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.an-rich-md-slash-item:hover,
|
|
445
|
+
.an-rich-md-slash-item--active {
|
|
446
|
+
background: hsl(var(--accent));
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.an-rich-md-slash-icon {
|
|
450
|
+
display: flex;
|
|
451
|
+
align-items: center;
|
|
452
|
+
justify-content: center;
|
|
453
|
+
width: 28px;
|
|
454
|
+
height: 28px;
|
|
455
|
+
border-radius: 4px;
|
|
456
|
+
border: 1px solid hsl(var(--border));
|
|
457
|
+
background: hsl(var(--background));
|
|
458
|
+
font-size: 11px;
|
|
459
|
+
font-weight: 650;
|
|
460
|
+
color: hsl(var(--muted-foreground));
|
|
461
|
+
flex-shrink: 0;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.an-rich-md-slash-copy {
|
|
465
|
+
display: block;
|
|
466
|
+
min-width: 0;
|
|
467
|
+
flex: 1;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.an-rich-md-slash-title {
|
|
471
|
+
display: block;
|
|
472
|
+
overflow: hidden;
|
|
473
|
+
text-overflow: ellipsis;
|
|
474
|
+
white-space: nowrap;
|
|
475
|
+
font-weight: 500;
|
|
476
|
+
font-size: 13px;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.an-rich-md-slash-description {
|
|
480
|
+
display: block;
|
|
481
|
+
overflow: hidden;
|
|
482
|
+
text-overflow: ellipsis;
|
|
483
|
+
white-space: nowrap;
|
|
484
|
+
font-size: 11px;
|
|
485
|
+
color: hsl(var(--muted-foreground));
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/* Shared block-level image node (the editor's `.an-rich-md-image` and the
|
|
489
|
+
read-only markdown renderer's <img>). Constrained to the prose width and
|
|
490
|
+
responsive; a still-uploading placeholder (empty src) shows a subtle frame. */
|
|
491
|
+
.an-rich-md-prose img,
|
|
492
|
+
.an-rich-md-image {
|
|
493
|
+
display: block;
|
|
494
|
+
max-width: 100%;
|
|
495
|
+
height: auto;
|
|
496
|
+
margin: 12px 0;
|
|
497
|
+
border-radius: 8px;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
.an-rich-md-image[src=""],
|
|
501
|
+
.an-rich-md-image:not([src]) {
|
|
502
|
+
min-height: 64px;
|
|
503
|
+
background: hsl(var(--muted));
|
|
504
|
+
border: 1px dashed hsl(var(--border));
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.ProseMirror-selectednode.an-rich-md-image {
|
|
508
|
+
outline: 2px solid hsl(var(--ring));
|
|
509
|
+
outline-offset: 2px;
|
|
510
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/toolkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Reusable app-building UI and helpers for Agent-Native apps.",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
"README.md"
|
|
18
18
|
],
|
|
19
19
|
"type": "module",
|
|
20
|
+
"sideEffects": [
|
|
21
|
+
"*.css"
|
|
22
|
+
],
|
|
20
23
|
"main": "./dist/index.js",
|
|
21
24
|
"types": "./dist/index.d.ts",
|
|
22
25
|
"exports": {
|
|
@@ -55,6 +58,34 @@
|
|
|
55
58
|
"import": "./dist/collab-ui/*.js",
|
|
56
59
|
"default": "./dist/collab-ui/*.js"
|
|
57
60
|
},
|
|
61
|
+
"./context-ui": {
|
|
62
|
+
"types": "./dist/context-ui/index.d.ts",
|
|
63
|
+
"browser": "./dist/context-ui/index.js",
|
|
64
|
+
"development": "./dist/context-ui/index.js",
|
|
65
|
+
"import": "./dist/context-ui/index.js",
|
|
66
|
+
"default": "./dist/context-ui/index.js"
|
|
67
|
+
},
|
|
68
|
+
"./design-tweaks": {
|
|
69
|
+
"types": "./dist/design-tweaks/index.d.ts",
|
|
70
|
+
"browser": "./dist/design-tweaks/index.js",
|
|
71
|
+
"development": "./dist/design-tweaks/index.js",
|
|
72
|
+
"import": "./dist/design-tweaks/index.js",
|
|
73
|
+
"default": "./dist/design-tweaks/index.js"
|
|
74
|
+
},
|
|
75
|
+
"./editor": {
|
|
76
|
+
"types": "./dist/editor/index.d.ts",
|
|
77
|
+
"browser": "./dist/editor/index.js",
|
|
78
|
+
"development": "./dist/editor/index.js",
|
|
79
|
+
"import": "./dist/editor/index.js",
|
|
80
|
+
"default": "./dist/editor/index.js"
|
|
81
|
+
},
|
|
82
|
+
"./editor/*": {
|
|
83
|
+
"types": "./dist/editor/*.d.ts",
|
|
84
|
+
"browser": "./dist/editor/*.js",
|
|
85
|
+
"development": "./dist/editor/*.js",
|
|
86
|
+
"import": "./dist/editor/*.js",
|
|
87
|
+
"default": "./dist/editor/*.js"
|
|
88
|
+
},
|
|
58
89
|
"./hooks": {
|
|
59
90
|
"types": "./dist/hooks/index.d.ts",
|
|
60
91
|
"browser": "./dist/hooks/index.js",
|
|
@@ -125,7 +156,8 @@
|
|
|
125
156
|
"import": "./dist/utils.js",
|
|
126
157
|
"default": "./dist/utils.js"
|
|
127
158
|
},
|
|
128
|
-
"./styles.css": "./dist/styles.css"
|
|
159
|
+
"./styles.css": "./dist/styles.css",
|
|
160
|
+
"./editor.css": "./dist/editor.css"
|
|
129
161
|
},
|
|
130
162
|
"publishConfig": {
|
|
131
163
|
"access": "public",
|
|
@@ -139,17 +171,17 @@
|
|
|
139
171
|
"@radix-ui/react-checkbox": "^1.3.6",
|
|
140
172
|
"@radix-ui/react-collapsible": "^1.1.15",
|
|
141
173
|
"@radix-ui/react-context-menu": "^2.3.2",
|
|
142
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
143
|
-
"@radix-ui/react-dropdown-menu": "^2.1.
|
|
144
|
-
"@radix-ui/react-hover-card": "^1.1.
|
|
174
|
+
"@radix-ui/react-dialog": "^1.1.19",
|
|
175
|
+
"@radix-ui/react-dropdown-menu": "^2.1.20",
|
|
176
|
+
"@radix-ui/react-hover-card": "^1.1.19",
|
|
145
177
|
"@radix-ui/react-label": "^2.1.11",
|
|
146
178
|
"@radix-ui/react-menubar": "^1.1.19",
|
|
147
179
|
"@radix-ui/react-navigation-menu": "^1.2.17",
|
|
148
|
-
"@radix-ui/react-popover": "^1.1.
|
|
180
|
+
"@radix-ui/react-popover": "^1.1.19",
|
|
149
181
|
"@radix-ui/react-progress": "^1.1.11",
|
|
150
182
|
"@radix-ui/react-radio-group": "^1.4.2",
|
|
151
183
|
"@radix-ui/react-scroll-area": "^1.2.13",
|
|
152
|
-
"@radix-ui/react-select": "^2.3.
|
|
184
|
+
"@radix-ui/react-select": "^2.3.3",
|
|
153
185
|
"@radix-ui/react-separator": "^1.1.11",
|
|
154
186
|
"@radix-ui/react-slider": "^1.4.2",
|
|
155
187
|
"@radix-ui/react-slot": "^1.3.0",
|
|
@@ -158,14 +190,33 @@
|
|
|
158
190
|
"@radix-ui/react-toast": "^1.2.18",
|
|
159
191
|
"@radix-ui/react-toggle": "^1.1.13",
|
|
160
192
|
"@radix-ui/react-toggle-group": "^1.1.14",
|
|
161
|
-
"@radix-ui/react-tooltip": "^1.2.
|
|
193
|
+
"@radix-ui/react-tooltip": "^1.2.12",
|
|
162
194
|
"@tabler/icons-react": "^3.41.1",
|
|
195
|
+
"@tiptap/core": "3.28.0",
|
|
196
|
+
"@tiptap/extension-code-block-lowlight": "3.28.0",
|
|
197
|
+
"@tiptap/extension-collaboration": "3.28.0",
|
|
198
|
+
"@tiptap/extension-collaboration-caret": "3.28.0",
|
|
199
|
+
"@tiptap/extension-image": "3.28.0",
|
|
200
|
+
"@tiptap/extension-link": "3.28.0",
|
|
201
|
+
"@tiptap/extension-placeholder": "3.28.0",
|
|
202
|
+
"@tiptap/extension-table": "3.28.0",
|
|
203
|
+
"@tiptap/extension-table-cell": "3.28.0",
|
|
204
|
+
"@tiptap/extension-table-header": "3.28.0",
|
|
205
|
+
"@tiptap/extension-table-row": "3.28.0",
|
|
206
|
+
"@tiptap/extension-task-item": "3.28.0",
|
|
207
|
+
"@tiptap/extension-task-list": "3.28.0",
|
|
208
|
+
"@tiptap/pm": "3.28.0",
|
|
209
|
+
"@tiptap/react": "3.28.0",
|
|
210
|
+
"@tiptap/starter-kit": "3.28.0",
|
|
211
|
+
"@tiptap/y-tiptap": "3.0.7",
|
|
163
212
|
"class-variance-authority": "^0.7.1",
|
|
164
213
|
"clsx": "^2.1.1",
|
|
165
214
|
"cmdk": "^1.1.1",
|
|
166
215
|
"date-fns": "^4.4.0",
|
|
167
216
|
"embla-carousel-react": "^8.6.0",
|
|
217
|
+
"highlight.js": "^11.11.1",
|
|
168
218
|
"input-otp": "^1.4.2",
|
|
219
|
+
"lowlight": "^3.3.0",
|
|
169
220
|
"next-themes": "^0.4.6",
|
|
170
221
|
"react-day-picker": "^10.0.1",
|
|
171
222
|
"react-hook-form": "^7.80.0",
|
|
@@ -173,7 +224,10 @@
|
|
|
173
224
|
"recharts": "^3.9.2",
|
|
174
225
|
"sonner": "^2.0.7",
|
|
175
226
|
"tailwind-merge": "^3.5.0",
|
|
176
|
-
"
|
|
227
|
+
"tiptap-markdown": "^0.9.0",
|
|
228
|
+
"vaul": "^1.1.2",
|
|
229
|
+
"y-protocols": "^1.0.7",
|
|
230
|
+
"yjs": "^13.6.31"
|
|
177
231
|
},
|
|
178
232
|
"devDependencies": {
|
|
179
233
|
"@types/react": "^19.2.14",
|