@remit/ui 0.0.106 → 0.0.108
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/package.json +1 -1
- package/src/components/nav-link-surface.interaction.test.ts +117 -0
- package/src/components/nav-link-surface.render.test.ts +126 -0
- package/src/components/nav-link-surface.tsx +97 -0
- package/src/components/rich-text-editor.stories.tsx +164 -1
- package/src/components/rich-text-editor.tsx +364 -53
- package/src/components/rich-text-spellcheck-provider.test.ts +217 -0
- package/src/components/rich-text-spellcheck-provider.ts +83 -0
- package/src/components/rich-text-spellcheck-words.ts +214 -0
- package/src/components/rich-text-spellcheck-worker-provider.ts +42 -0
- package/src/components/rich-text-spellcheck-worker.ts +54 -0
- package/src/components/rich-text-spellcheck.test.ts +638 -0
- package/src/components/rich-text-spellcheck.ts +75 -0
- package/src/index.ts +1 -0
- package/src/rich-text.ts +14 -0
- package/src/tokens.css +17 -0
package/src/rich-text.ts
CHANGED
|
@@ -33,6 +33,20 @@ export {
|
|
|
33
33
|
type RichTextEditorProps,
|
|
34
34
|
} from "./components/rich-text-editor.js";
|
|
35
35
|
export { COMPOSE_TRANSFORMERS } from "./components/rich-text-markdown.js";
|
|
36
|
+
export type {
|
|
37
|
+
CheckRequest,
|
|
38
|
+
CheckResponse,
|
|
39
|
+
CheckSpan,
|
|
40
|
+
Finding,
|
|
41
|
+
LanguageTag,
|
|
42
|
+
ProviderStatus,
|
|
43
|
+
SpellcheckOptions,
|
|
44
|
+
SpellProvider,
|
|
45
|
+
} from "./components/rich-text-spellcheck.js";
|
|
46
|
+
export {
|
|
47
|
+
openSpellProvider,
|
|
48
|
+
type SpellWorkerPort,
|
|
49
|
+
} from "./components/rich-text-spellcheck-provider.js";
|
|
36
50
|
export {
|
|
37
51
|
EMPTY_RICH_TEXT,
|
|
38
52
|
type RichTextValue,
|
package/src/tokens.css
CHANGED
|
@@ -164,6 +164,10 @@
|
|
|
164
164
|
--danger: oklch(0.56 0.16 25);
|
|
165
165
|
--danger-soft: oklch(0.93 0.04 25);
|
|
166
166
|
|
|
167
|
+
/* the spelling squiggle: violet, so a misspelt word never reads as loud as
|
|
168
|
+
a phishing banner, which owns --danger */
|
|
169
|
+
--spell-mark: oklch(0.52 0.19 320);
|
|
170
|
+
|
|
167
171
|
--ring: oklch(0.55 0.14 150);
|
|
168
172
|
}
|
|
169
173
|
|
|
@@ -198,6 +202,8 @@
|
|
|
198
202
|
--danger: oklch(0.68 0.15 25);
|
|
199
203
|
--danger-soft: oklch(0.32 0.07 25);
|
|
200
204
|
|
|
205
|
+
--spell-mark: oklch(0.76 0.16 320);
|
|
206
|
+
|
|
201
207
|
--ring: oklch(0.78 0.16 150);
|
|
202
208
|
}
|
|
203
209
|
|
|
@@ -232,6 +238,17 @@ body {
|
|
|
232
238
|
text-rendering: optimizeLegibility;
|
|
233
239
|
}
|
|
234
240
|
|
|
241
|
+
/* The composer's own spelling marks. The ranges live in the CSS Custom
|
|
242
|
+
Highlight registry and nothing enters the document, so a marked word looks
|
|
243
|
+
the same to undo, to the outgoing HTML and to the Markdown. Firefox ignores
|
|
244
|
+
text-decoration on a highlight and paints the tint alone; that is the whole
|
|
245
|
+
fallback. */
|
|
246
|
+
::highlight(spell-error) {
|
|
247
|
+
background-color: color-mix(in srgb, var(--spell-mark) 12%, transparent);
|
|
248
|
+
text-decoration: underline wavy var(--spell-mark);
|
|
249
|
+
text-underline-offset: 3px;
|
|
250
|
+
}
|
|
251
|
+
|
|
235
252
|
/* thin, unobtrusive scrollbars — calm density */
|
|
236
253
|
* {
|
|
237
254
|
scrollbar-width: thin;
|