@blue-patterns/richtext 0.0.0-stage → 0.7.18
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/CHANGELOG.md +275 -0
- package/LICENSE +22 -0
- package/README.md +88 -2
- package/astryx.integration.mjs +11 -0
- package/blocks/RichTextEditorShowcase.template.mjs +13 -0
- package/blocks/RichTextEditorShowcase.tsx +19 -0
- package/dist/RichTextEditor.d.ts +282 -0
- package/dist/RichTextEditor.d.ts.map +1 -0
- package/dist/RichTextEditor.js +657 -0
- package/dist/RichTextEditorAutoLinkPlugin.d.ts +83 -0
- package/dist/RichTextEditorAutoLinkPlugin.d.ts.map +1 -0
- package/dist/RichTextEditorAutoLinkPlugin.js +99 -0
- package/dist/RichTextEditorToolbar.d.ts +186 -0
- package/dist/RichTextEditorToolbar.d.ts.map +1 -0
- package/dist/RichTextEditorToolbar.js +688 -0
- package/dist/RichTextView.d.ts +92 -0
- package/dist/RichTextView.d.ts.map +1 -0
- package/dist/RichTextView.js +267 -0
- package/dist/codeLanguages.d.ts +14 -0
- package/dist/codeLanguages.d.ts.map +1 -0
- package/dist/codeLanguages.js +34 -0
- package/dist/codeLineTokens.d.ts +53 -0
- package/dist/codeLineTokens.d.ts.map +1 -0
- package/dist/codeLineTokens.js +188 -0
- package/dist/editorNodes.d.ts +8 -0
- package/dist/editorNodes.d.ts.map +1 -0
- package/dist/editorNodes.js +30 -0
- package/dist/editorTheme.d.ts +7 -0
- package/dist/editorTheme.d.ts.map +1 -0
- package/dist/editorTheme.js +328 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/internal/CodeBackspacePlugin.d.ts +2 -0
- package/dist/internal/CodeBackspacePlugin.d.ts.map +1 -0
- package/dist/internal/CodeBackspacePlugin.js +70 -0
- package/dist/internal/CodeBlockHeaderPlugin.d.ts +11 -0
- package/dist/internal/CodeBlockHeaderPlugin.d.ts.map +1 -0
- package/dist/internal/CodeBlockHeaderPlugin.js +204 -0
- package/dist/internal/CodePastePlugin.d.ts +5 -0
- package/dist/internal/CodePastePlugin.d.ts.map +1 -0
- package/dist/internal/CodePastePlugin.js +104 -0
- package/dist/internal/CodeSyntaxPlugin.d.ts +8 -0
- package/dist/internal/CodeSyntaxPlugin.d.ts.map +1 -0
- package/dist/internal/CodeSyntaxPlugin.js +397 -0
- package/dist/internal/CodeTabPlugin.d.ts +2 -0
- package/dist/internal/CodeTabPlugin.d.ts.map +1 -0
- package/dist/internal/CodeTabPlugin.js +256 -0
- package/dist/internal/DisabledLinkGuardPlugin.d.ts +4 -0
- package/dist/internal/DisabledLinkGuardPlugin.d.ts.map +1 -0
- package/dist/internal/DisabledLinkGuardPlugin.js +93 -0
- package/dist/internal/ImageSourceCaretPlugin.d.ts +3 -0
- package/dist/internal/ImageSourceCaretPlugin.d.ts.map +1 -0
- package/dist/internal/ImageSourceCaretPlugin.js +105 -0
- package/dist/internal/ListItemShortcutsPlugin.d.ts +6 -0
- package/dist/internal/ListItemShortcutsPlugin.d.ts.map +1 -0
- package/dist/internal/ListItemShortcutsPlugin.js +314 -0
- package/dist/internal/MarkdownExtensionsPlugin.d.ts +17 -0
- package/dist/internal/MarkdownExtensionsPlugin.d.ts.map +1 -0
- package/dist/internal/MarkdownExtensionsPlugin.js +185 -0
- package/dist/internal/SelectAllScopePlugin.d.ts +2 -0
- package/dist/internal/SelectAllScopePlugin.d.ts.map +1 -0
- package/dist/internal/SelectAllScopePlugin.js +67 -0
- package/dist/internal/TableColumnFloorPlugin.d.ts +12 -0
- package/dist/internal/TableColumnFloorPlugin.d.ts.map +1 -0
- package/dist/internal/TableColumnFloorPlugin.js +84 -0
- package/dist/internal/TablePastePlugin.d.ts +9 -0
- package/dist/internal/TablePastePlugin.d.ts.map +1 -0
- package/dist/internal/TablePastePlugin.js +183 -0
- package/dist/internal/TableScrollRegionPlugin.d.ts +9 -0
- package/dist/internal/TableScrollRegionPlugin.d.ts.map +1 -0
- package/dist/internal/TableScrollRegionPlugin.js +95 -0
- package/dist/internal/TaskCheckboxPlugin.d.ts +7 -0
- package/dist/internal/TaskCheckboxPlugin.d.ts.map +1 -0
- package/dist/internal/TaskCheckboxPlugin.js +193 -0
- package/dist/internal/ToolbarLinkPopover.d.ts +74 -0
- package/dist/internal/ToolbarLinkPopover.d.ts.map +1 -0
- package/dist/internal/ToolbarLinkPopover.js +292 -0
- package/dist/linkEditing.d.ts +6 -0
- package/dist/linkEditing.d.ts.map +1 -0
- package/dist/linkEditing.js +20 -0
- package/dist/linkForm.d.ts +28 -0
- package/dist/linkForm.d.ts.map +1 -0
- package/dist/linkForm.js +137 -0
- package/dist/linkUtils.d.ts +27 -0
- package/dist/linkUtils.d.ts.map +1 -0
- package/dist/linkUtils.js +101 -0
- package/dist/markdown.d.ts +17 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/markdown.js +17 -0
- package/dist/markdownCharacterReferences.d.ts +135 -0
- package/dist/markdownCharacterReferences.d.ts.map +1 -0
- package/dist/markdownCharacterReferences.js +1127 -0
- package/dist/markdownCodeFence.d.ts +4 -0
- package/dist/markdownCodeFence.d.ts.map +1 -0
- package/dist/markdownCodeFence.js +167 -0
- package/dist/markdownExtensionNode.d.ts +88 -0
- package/dist/markdownExtensionNode.d.ts.map +1 -0
- package/dist/markdownExtensionNode.js +248 -0
- package/dist/markdownExtensions.d.ts +115 -0
- package/dist/markdownExtensions.d.ts.map +1 -0
- package/dist/markdownExtensions.js +392 -0
- package/dist/markdownHardLineBreak.d.ts +25 -0
- package/dist/markdownHardLineBreak.d.ts.map +1 -0
- package/dist/markdownHardLineBreak.js +59 -0
- package/dist/markdownHeading.d.ts +20 -0
- package/dist/markdownHeading.d.ts.map +1 -0
- package/dist/markdownHeading.js +30 -0
- package/dist/markdownLink.d.ts +5 -0
- package/dist/markdownLink.d.ts.map +1 -0
- package/dist/markdownLink.js +80 -0
- package/dist/markdownListExport.d.ts +3 -0
- package/dist/markdownListExport.d.ts.map +1 -0
- package/dist/markdownListExport.js +68 -0
- package/dist/markdownListIndentation.d.ts +8 -0
- package/dist/markdownListIndentation.d.ts.map +1 -0
- package/dist/markdownListIndentation.js +101 -0
- package/dist/markdownOrderedList.d.ts +3 -0
- package/dist/markdownOrderedList.d.ts.map +1 -0
- package/dist/markdownOrderedList.js +51 -0
- package/dist/markdownQuote.d.ts +22 -0
- package/dist/markdownQuote.d.ts.map +1 -0
- package/dist/markdownQuote.js +32 -0
- package/dist/markdownSerializers.d.ts +49 -0
- package/dist/markdownSerializers.d.ts.map +1 -0
- package/dist/markdownSerializers.js +83 -0
- package/dist/markdownSource.d.ts +71 -0
- package/dist/markdownSource.d.ts.map +1 -0
- package/dist/markdownSource.js +804 -0
- package/dist/markdownSpaceRuns.d.ts +24 -0
- package/dist/markdownSpaceRuns.d.ts.map +1 -0
- package/dist/markdownSpaceRuns.js +147 -0
- package/dist/markdownTable.d.ts +35 -0
- package/dist/markdownTable.d.ts.map +1 -0
- package/dist/markdownTable.js +227 -0
- package/dist/markdownTaskList.d.ts +48 -0
- package/dist/markdownTaskList.d.ts.map +1 -0
- package/dist/markdownTaskList.js +166 -0
- package/dist/markdownThematicBreak.d.ts +3 -0
- package/dist/markdownThematicBreak.d.ts.map +1 -0
- package/dist/markdownThematicBreak.js +55 -0
- package/dist/privateAttributes/layerPortalBoundary.stylex.d.ts +12 -0
- package/dist/privateAttributes/layerPortalBoundary.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/layerPortalBoundary.stylex.js +16 -0
- package/dist/richtext.css +213 -0
- package/dist/textSemantics.d.ts +3 -0
- package/dist/textSemantics.d.ts.map +1 -0
- package/dist/textSemantics.js +87 -0
- package/package.json +158 -3
- package/src/RichTextEditor.doc.mjs +308 -0
- package/src/RichTextEditor.tsx +1109 -0
- package/src/RichTextEditorAutoLinkPlugin.doc.mjs +43 -0
- package/src/RichTextEditorAutoLinkPlugin.tsx +126 -0
- package/src/RichTextEditorToolbar.doc.mjs +92 -0
- package/src/RichTextEditorToolbar.tsx +871 -0
- package/src/RichTextView.doc.mjs +101 -0
- package/src/RichTextView.tsx +351 -0
- package/src/codeLanguages.ts +42 -0
- package/src/codeLineTokens.ts +241 -0
- package/src/doc-mjs.d.ts +23 -0
- package/src/editorNodes.ts +44 -0
- package/src/editorTheme.ts +550 -0
- package/src/index.ts +59 -0
- package/src/internal/CodeBackspacePlugin.tsx +96 -0
- package/src/internal/CodeBlockHeaderPlugin.tsx +282 -0
- package/src/internal/CodePastePlugin.tsx +144 -0
- package/src/internal/CodeSyntaxPlugin.tsx +493 -0
- package/src/internal/CodeTabPlugin.tsx +298 -0
- package/src/internal/DisabledLinkGuardPlugin.tsx +93 -0
- package/src/internal/ImageSourceCaretPlugin.tsx +159 -0
- package/src/internal/ListItemShortcutsPlugin.tsx +404 -0
- package/src/internal/MarkdownExtensionsPlugin.tsx +289 -0
- package/src/internal/SelectAllScopePlugin.tsx +86 -0
- package/src/internal/TableColumnFloorPlugin.tsx +99 -0
- package/src/internal/TablePastePlugin.tsx +223 -0
- package/src/internal/TableScrollRegionPlugin.tsx +107 -0
- package/src/internal/TaskCheckboxPlugin.tsx +246 -0
- package/src/internal/ToolbarLinkPopover.tsx +392 -0
- package/src/linkEditing.ts +20 -0
- package/src/linkForm.tsx +156 -0
- package/src/linkUtils.ts +106 -0
- package/src/markdown.ts +25 -0
- package/src/markdownCharacterReferences.ts +1137 -0
- package/src/markdownCodeFence.ts +216 -0
- package/src/markdownExtensionNode.ts +339 -0
- package/src/markdownExtensions.ts +496 -0
- package/src/markdownHardLineBreak.ts +73 -0
- package/src/markdownHeading.ts +33 -0
- package/src/markdownLink.ts +86 -0
- package/src/markdownListExport.ts +85 -0
- package/src/markdownListIndentation.ts +105 -0
- package/src/markdownOrderedList.ts +60 -0
- package/src/markdownQuote.ts +35 -0
- package/src/markdownSerializers.ts +108 -0
- package/src/markdownSource.ts +1045 -0
- package/src/markdownSpaceRuns.ts +164 -0
- package/src/markdownTable.ts +309 -0
- package/src/markdownTaskList.ts +222 -0
- package/src/markdownThematicBreak.ts +66 -0
- package/src/privateAttributes/layerPortalBoundary.stylex.ts +18 -0
- package/src/textSemantics.ts +104 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file markdownThematicBreak.ts
|
|
5
|
+
* @input Uses @lexical/extension (HorizontalRuleNode), @lexical/markdown
|
|
6
|
+
* (ElementTransformer), and lexical.
|
|
7
|
+
* @output Exports THEMATIC_BREAK, the Markdown transformer that turns a
|
|
8
|
+
* thematic break line into a horizontal rule and writes a rule back as `---`.
|
|
9
|
+
* @position Part of DEFAULT_TRANSFORMERS (markdownTable.ts), ahead of
|
|
10
|
+
* Lexical's list transformers so `* * *` and `- - -` are rules, as in
|
|
11
|
+
* CommonMark. Matches core Markdown's thematic breaks (spec:AST-061 FR5).
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { $createHorizontalRuleNode, $isHorizontalRuleNode, HorizontalRuleNode } from '@lexical/extension';
|
|
15
|
+
import { $isParagraphNode, $isTextNode } from 'lexical';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Three or more `-`, `*`, or `_` of one kind, optionally spaced, indented at
|
|
19
|
+
* most three spaces (CommonMark 0.31, thematic breaks).
|
|
20
|
+
*/
|
|
21
|
+
const THEMATIC_BREAK_LINE = /^ {0,3}([-*_])(?:[ \t]*\1){2,}[ \t]*$/;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* A setext heading underline made of dashes: no spaces between them, so
|
|
25
|
+
* `- - -` under a paragraph is still a thematic break (CommonMark 0.31).
|
|
26
|
+
*/
|
|
27
|
+
const SETEXT_UNDERLINE = /^ {0,3}-+[ \t]*$/;
|
|
28
|
+
export const THEMATIC_BREAK = {
|
|
29
|
+
dependencies: [HorizontalRuleNode],
|
|
30
|
+
export: node => $isHorizontalRuleNode(node) ? '---' : null,
|
|
31
|
+
regExp: THEMATIC_BREAK_LINE,
|
|
32
|
+
replace: (parentNode, children, match, isImport) => {
|
|
33
|
+
// A dash line right under a paragraph line underlines it as a heading
|
|
34
|
+
// (setext) rather than breaking. Lexical has already cut the matched text
|
|
35
|
+
// out of the line; put it back and leave the line to the paragraph, which
|
|
36
|
+
// keeps it as literal text.
|
|
37
|
+
const previous = parentNode.getPreviousSibling();
|
|
38
|
+
if (isImport && SETEXT_UNDERLINE.test(match[0]) && $isParagraphNode(previous) && previous.getTextContentSize() > 0) {
|
|
39
|
+
const [line] = children;
|
|
40
|
+
if ($isTextNode(line)) {
|
|
41
|
+
// The pattern is anchored to the whole line, so its match is the line.
|
|
42
|
+
line.setTextContent(match[0]);
|
|
43
|
+
}
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
const rule = $createHorizontalRuleNode();
|
|
47
|
+
if (isImport || parentNode.getNextSibling() != null) {
|
|
48
|
+
parentNode.replace(rule);
|
|
49
|
+
} else {
|
|
50
|
+
parentNode.insertBefore(rule);
|
|
51
|
+
}
|
|
52
|
+
rule.selectNext();
|
|
53
|
+
},
|
|
54
|
+
type: 'element'
|
|
55
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file privateAttributes/layerPortalBoundary.stylex.ts
|
|
3
|
+
* @input The editable root Lexical reconciles
|
|
4
|
+
* @output rendererManagedRootProps, which marks that root
|
|
5
|
+
* @position Owner module of the private layer-portal-boundary attribute in
|
|
6
|
+
* RichText: the only RichText file that writes its name. Core's Layer reads
|
|
7
|
+
* the mark through its own owner module of the same name. No package entry
|
|
8
|
+
* exports it.
|
|
9
|
+
*/
|
|
10
|
+
/** Spread on the editable root, whose DOM Lexical reconciles. */
|
|
11
|
+
export declare const rendererManagedRootProps: Readonly<Record<`data-${string}`, string>>;
|
|
12
|
+
//# sourceMappingURL=layerPortalBoundary.stylex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layerPortalBoundary.stylex.d.ts","sourceRoot":"","sources":["../../src/privateAttributes/layerPortalBoundary.stylex.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,iEAAiE;AACjE,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAC7C,MAAM,CAAC,QAAQ,MAAM,EAAE,EAAE,MAAM,CAAC,CAGjC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file privateAttributes/layerPortalBoundary.stylex.ts
|
|
5
|
+
* @input The editable root Lexical reconciles
|
|
6
|
+
* @output rendererManagedRootProps, which marks that root
|
|
7
|
+
* @position Owner module of the private layer-portal-boundary attribute in
|
|
8
|
+
* RichText: the only RichText file that writes its name. Core's Layer reads
|
|
9
|
+
* the mark through its own owner module of the same name. No package entry
|
|
10
|
+
* exports it.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/** Spread on the editable root, whose DOM Lexical reconciles. */
|
|
14
|
+
export const rendererManagedRootProps = {
|
|
15
|
+
'data-astryx-layer-portal-boundary': 'external'
|
|
16
|
+
};
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/* Astryx Rich Text Pre-compiled StyleX CSS — Lexical editor and viewer */
|
|
2
|
+
/* Auto-generated. Do not edit manually. */
|
|
3
|
+
|
|
4
|
+
@layer reset, astryx-base, astryx-theme;
|
|
5
|
+
|
|
6
|
+
@layer astryx-base {
|
|
7
|
+
@property --x-left { syntax: "*"; inherits: false;}
|
|
8
|
+
@property --x-minHeight { syntax: "*"; inherits: false;}
|
|
9
|
+
@property --x-top { syntax: "*"; inherits: false;}
|
|
10
|
+
@property --x-width { syntax: "*"; inherits: false;}
|
|
11
|
+
:root, .x1ovvdif{--border-width:1px;}
|
|
12
|
+
:root, .x1vhn10t{--color-accent:light-dark(#0064E0, #0171E3);--color-accent-muted:light-dark(#0082FB33, #0082FB3F);--color-on-accent:light-dark(#FFFFFF, #FFFFFF);--color-neutral:light-dark(rgba(5, 54, 89, 0.1), rgba(223, 226, 229, 0.2));--color-background-surface:light-dark(#FFFFFF, #1F1F22);--color-background-body:light-dark(#F1F4F7, #111112);--color-overlay:light-dark(#01122866, #11111299);--color-overlay-hover:light-dark(#0536590C, #FFFFFF0C);--color-overlay-pressed:light-dark(#05365919, #FFFFFF19);--color-background-muted:light-dark(#0536590C, #1111127F);--color-text-primary:light-dark(#0A1317, #DFE2E5);--color-text-secondary:light-dark(#4E606F, #AAAFB5);--color-text-disabled:light-dark(#A4B0BC, #6F747C);--color-text-accent:light-dark(#0064E0, #3E9EFB);--color-on-dark:light-dark(#FFFFFF, #FFFFFF);--color-on-light:light-dark(#000000, #000000);--color-icon-accent:light-dark(#0064E0, #2694FE);--color-icon-primary:light-dark(#0A1317, #DFE2E5);--color-icon-secondary:light-dark(#4E606F, #AAAFB5);--color-icon-disabled:light-dark(#A4B0BC, #6F747C);--color-background-card:light-dark(#FFFFFF, #1F1F22);--color-background-popover:light-dark(#FFFFFF, #28292C);--color-background-inverted:light-dark(#0A1317, #FFFFFF);--color-background-error-inverted:light-dark(#AA071E, #E3193B);--color-info:light-dark(#0064E0, #0064E0);--color-info-muted:light-dark(#0082FB33, #0082FB3F);--color-on-info:light-dark(#FFFFFF, #FFFFFF);--color-success:light-dark(#0D8626, #0D8626);--color-success-muted:light-dark(#0B991F33, #0B991F3F);--color-on-success:light-dark(#FFFFFF, #FFFFFF);--color-error:light-dark(#E3193B, #F5394F);--color-error-muted:light-dark(#E3193B33, #F5394F3F);--color-on-error:light-dark(#FFFFFF, #0A1317);--color-warning:light-dark(#E9AF08, #F2C00B);--color-warning-muted:light-dark(#E2A40033, #E2A4003F);--color-on-warning:light-dark(#0A1317, #0A1317);--color-text-info:var(--color-text-blue);--color-text-success:var(--color-text-green);--color-text-warning:var(--color-text-yellow);--color-text-error:var(--color-text-red);--color-icon-info:var(--color-text-info);--color-icon-success:var(--color-text-success);--color-icon-warning:var(--color-text-warning);--color-icon-error:var(--color-text-error);--color-border-info:var(--color-text-info);--color-border-success:var(--color-text-success);--color-border-warning:var(--color-text-warning);--color-border-error:var(--color-text-error);--color-on-info-muted:var(--color-text-blue);--color-on-success-muted:var(--color-text-green);--color-on-warning-muted:var(--color-text-yellow);--color-on-error-muted:var(--color-text-red);--color-border:light-dark(#05365919, #F2F4F619);--color-border-emphasized:light-dark(#CCD3DB, #494D53);--color-skeleton:light-dark(#CCD3DB, #5A5E66);--color-track:light-dark(#CCD3DB, #5A5E66);--color-shadow:light-dark(rgba(5, 54, 89, 0.1), rgba(0, 0, 0, 0.3));--color-tint-hover:light-dark(black, white);--color-background-blue:light-dark(#0171E333, #0171E333);--color-border-blue:light-dark(#0064E0, #2694FE);--color-icon-blue:light-dark(#0064E0, #2694FE);--color-text-blue:light-dark(#042F97, #AFD7FF);--color-background-cyan:light-dark(#03A7D733, #03A7D733);--color-border-cyan:light-dark(#089DD0, #0171A4);--color-icon-cyan:light-dark(#00ACC1, #26C6DA);--color-text-cyan:light-dark(#014975, #A1EEF9);--color-background-gray:light-dark(#0A131733, #666A724C);--color-border-gray:light-dark(#647685, #748695);--color-icon-gray:light-dark(#4E606F, #AAAFB5);--color-text-gray:light-dark(#0A1317, #E7EAED);--color-background-green:light-dark(#24BB5E33, #24BB5E33);--color-border-green:light-dark(#0D8626, #0B991F);--color-icon-green:light-dark(#0D8626, #26A756);--color-text-green:light-dark(#09441F, #A5F690);--color-background-orange:light-dark(#F2790233, #F2790233);--color-border-orange:light-dark(#EB6E00, #B34A01);--color-icon-orange:light-dark(#E9690B, #FB8C00);--color-text-orange:light-dark(#6B2203, #FDB876);--color-background-pink:light-dark(#E638B333, #E638B333);--color-border-pink:light-dark(#F351C0, #C02294);--color-icon-pink:light-dark(#C2185B, #EC407A);--color-text-pink:light-dark(#650053, #FEADE3);--color-background-purple:light-dark(#7952FF33, #7952FF33);--color-border-purple:light-dark(#9081FF, #7340FE);--color-icon-purple:light-dark(#5B08D8, #7952FF);--color-text-purple:light-dark(#3E0697, #B3B0FE);--color-background-red:light-dark(#E3193B33, #E3193B33);--color-border-red:light-dark(#E3193B, #F5394F);--color-icon-red:light-dark(#D31130, #E3193B);--color-text-red:light-dark(#7B0210, #FFB2B8);--color-background-teal:light-dark(#0DB7AF33, #0DB7AF33);--color-border-teal:light-dark(#08A3A3, #08767D);--color-icon-teal:light-dark(#009688, #26A69A);--color-text-teal:light-dark(#083943, #40DCCD);--color-background-yellow:light-dark(#E2A40033, #E2A40033);--color-border-yellow:light-dark(#C58600, #B47700);--color-icon-yellow:light-dark(#FBC02D, #FFEE58);--color-text-yellow:light-dark(#753F07, #FBCE03);}
|
|
13
|
+
:root, .x1lm7ezh{--duration-fast-min:130ms;--duration-fast:175ms;--duration-fast-max:230ms;--duration-medium-min:310ms;--duration-medium:410ms;--duration-medium-max:550ms;--duration-slow-min:730ms;--duration-slow:975ms;--duration-slow-max:1300ms;--duration-exit:var(--duration-fast);}
|
|
14
|
+
:root, .xn1667j{--ease-standard:cubic-bezier(0.24, 1, 0.4, 1);--ease-entrance:cubic-bezier(0.24, 1, 0.4, 1);--ease-move:cubic-bezier(0.24, 1, 0.4, 1);--ease-exit:cubic-bezier(0.3, 0, 0.6, 0.6);}
|
|
15
|
+
:root, .x1q59i2g{--focus-outline-width:2px;--focus-outline-style:solid;--focus-outline-color:var(--color-accent);--focus-outline-offset:3px;}
|
|
16
|
+
:root, .x1ut5255{--font-family-body:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;--font-family-code:"SF Mono", Monaco, Consolas, monospace;--font-family-heading:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;}
|
|
17
|
+
:root, .xc7z9t2{--font-size-4xs:0.375rem;--font-size-3xs:0.4375rem;--font-size-2xs:0.5rem;--font-size-xs:0.625rem;--font-size-sm:0.75rem;--font-size-base:0.875rem;--font-size-lg:1.0625rem;--font-size-xl:1.25rem;--font-size-2xl:1.5rem;--font-size-3xl:1.8125rem;--font-size-4xl:2.1875rem;--font-size-5xl:2.625rem;}
|
|
18
|
+
:root, .x1cm0oje{--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;}
|
|
19
|
+
:root, .x164hse8{--radius-none:0px;--radius-inner:4px;--radius-element:8px;--radius-container:12px;--radius-page:28px;--radius-chat:28px;--radius-full:9999px;}
|
|
20
|
+
:root, .x159f4zj{--shadow-low:0px 1px 1px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), 0px 2px 8px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2));--shadow-med:0px 1px 2px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), 0px 2px 12px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2));--shadow-high:0px 2px 2px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), 0px 8px 24px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3));--shadow-inset-hover:inset 0px 0px 0px 2px light-dark(rgba(5, 54, 89, 0.15), rgba(223, 226, 229, 0.2));--shadow-inset-selected:inset 0px 0px 0px 2px rgba(1, 113, 227, 0.5);--shadow-inset-success:inset 0px 0px 0px 2px rgba(38, 167, 86, 0.3);--shadow-inset-warning:inset 0px 0px 0px 2px rgba(226, 164, 0, 0.3);--shadow-inset-error:inset 0px 0px 0px 2px rgba(227, 25, 59, 0.3);}
|
|
21
|
+
:root, .x1d8su97{--size-element-sm:28px;--size-element-md:32px;--size-element-lg:36px;}
|
|
22
|
+
:root, .xr6wagp{--spacing-0:0rem;--spacing-0-5:0.125rem;--spacing-1:0.25rem;--spacing-1-5:0.375rem;--spacing-2:0.5rem;--spacing-3:0.75rem;--spacing-4:1rem;--spacing-5:1.25rem;--spacing-6:1.5rem;--spacing-7:1.75rem;--spacing-8:2rem;--spacing-9:2.25rem;--spacing-10:2.5rem;--spacing-11:2.75rem;--spacing-12:3rem;}
|
|
23
|
+
:root, .xcjw8h0{--text-heading-1-size:var(--font-size-2xl);--text-heading-1-weight:var(--font-weight-semibold);--text-heading-1-leading:1.3333;--text-heading-2-size:var(--font-size-xl);--text-heading-2-weight:var(--font-weight-semibold);--text-heading-2-leading:1.4;--text-heading-3-size:var(--font-size-lg);--text-heading-3-weight:var(--font-weight-semibold);--text-heading-3-leading:1.4118;--text-heading-4-size:var(--font-size-base);--text-heading-4-weight:var(--font-weight-semibold);--text-heading-4-leading:1.4286;--text-heading-5-size:var(--font-size-sm);--text-heading-5-weight:var(--font-weight-semibold);--text-heading-5-leading:1.6667;--text-heading-6-size:var(--font-size-xs);--text-heading-6-weight:var(--font-weight-semibold);--text-heading-6-leading:1.6;--text-body-size:var(--font-size-base);--text-body-weight:var(--font-weight-normal);--text-body-leading:1.4286;--text-large-size:var(--font-size-lg);--text-large-weight:var(--font-weight-semibold);--text-large-leading:1.4118;--text-label-size:var(--font-size-base);--text-label-weight:var(--font-weight-medium);--text-label-leading:1.4286;--text-code-size:var(--font-size-base);--text-code-weight:var(--font-weight-normal);--text-code-leading:1.4286;--text-supporting-size:var(--font-size-sm);--text-supporting-weight:var(--font-weight-normal);--text-supporting-leading:1.6667;--text-display-1-size:var(--font-size-5xl);--text-display-1-weight:var(--font-weight-normal);--text-display-1-leading:1.2381;--text-display-2-size:var(--font-size-4xl);--text-display-2-weight:var(--font-weight-normal);--text-display-2-leading:1.2571;--text-display-3-size:var(--font-size-3xl);--text-display-3-weight:var(--font-weight-normal);--text-display-3-leading:1.2414;}
|
|
24
|
+
.x1qgjean{--astryx-section-padding-inline-end:var(--spacing-1)}
|
|
25
|
+
.xcfn0br{--astryx-section-padding-inline-start:var(--spacing-1)}
|
|
26
|
+
.xax9j7h{--container-padding-block-end:0px}
|
|
27
|
+
.x1047aw6{--container-padding-block-start:0px}
|
|
28
|
+
.xjsfl84{--container-padding-inline-end:0px}
|
|
29
|
+
.xrhngw9{--container-padding-inline-start:0px}
|
|
30
|
+
.x1717udv:not(#\#){padding:0}
|
|
31
|
+
.xlsj2fj:not(#\#){padding:var(--spacing-2)}
|
|
32
|
+
.x14i3s5s:not(#\#):not(#\#){border-color:var(--color-border)}
|
|
33
|
+
.xh6dtrn:not(#\#):not(#\#){border-radius:var(--radius-element)}
|
|
34
|
+
.xx3sua9:not(#\#):not(#\#){border-radius:var(--radius-inner)}
|
|
35
|
+
.xng3xce:not(#\#):not(#\#){border-style:none}
|
|
36
|
+
.x1y0btm7:not(#\#):not(#\#){border-style:solid}
|
|
37
|
+
.xc342km:not(#\#):not(#\#){border-width:0}
|
|
38
|
+
.x1litavf:not(#\#):not(#\#){border-width:var(--border-width)}
|
|
39
|
+
.x845mor:not(#\#):not(#\#){flex:1 1 0%}
|
|
40
|
+
.xsn7fz1:not(#\#):not(#\#){gap:var(--spacing-0)}
|
|
41
|
+
.xrxpjvj:not(#\#):not(#\#){margin-inline:0}
|
|
42
|
+
.x1a2a7pz:not(#\#):not(#\#){outline:none}
|
|
43
|
+
.xb3r6kr:not(#\#):not(#\#){overflow:hidden}
|
|
44
|
+
.x1hp7d8q:not(#\#):not(#\#){padding-block:var(--spacing-0)}
|
|
45
|
+
.xu0wf1k:not(#\#):not(#\#){padding-block:var(--spacing-1)}
|
|
46
|
+
.xce4md1:not(#\#):not(#\#){padding-block:var(--spacing-2)}
|
|
47
|
+
.x17a0aqu:not(#\#):not(#\#){padding-inline:var(--spacing-0)}
|
|
48
|
+
.x7a5moj:not(#\#):not(#\#){padding-inline:var(--spacing-1)}
|
|
49
|
+
.xf314gf:not(#\#):not(#\#){padding-inline:var(--spacing-2)}
|
|
50
|
+
.x1pzlopt:not(#\#):not(#\#){padding-inline:var(--spacing-4)}
|
|
51
|
+
.xmqliwb:not(#\#):not(#\#){text-decoration:line-through}
|
|
52
|
+
.x1bvjpef:not(#\#):not(#\#){text-decoration:underline}
|
|
53
|
+
.x6s0dn4:not(#\#):not(#\#):not(#\#){align-items:center}
|
|
54
|
+
.x1qjc9v5:not(#\#):not(#\#):not(#\#){align-items:stretch}
|
|
55
|
+
.xkh2ocl:not(#\#):not(#\#):not(#\#){align-self:stretch}
|
|
56
|
+
.xwmxj5m:not(#\#):not(#\#):not(#\#){background-color:var(--color-background-muted)}
|
|
57
|
+
.xzyc27v:not(#\#):not(#\#):not(#\#){background-color:var(--color-syntax-background)}
|
|
58
|
+
.x1mwwwfo:not(#\#):not(#\#):not(#\#){border-collapse:collapse}
|
|
59
|
+
.x1gejf6u:not(#\#):not(#\#):not(#\#){border-inline-end-color:var(--color-border)}
|
|
60
|
+
.x18b5jzi:not(#\#):not(#\#):not(#\#){border-inline-end-style:solid}
|
|
61
|
+
.xw8tdv1:not(#\#):not(#\#):not(#\#){border-inline-end-width:var(--border-width)}
|
|
62
|
+
.x14ydlgx:not(#\#):not(#\#):not(#\#){border-inline-start-color:var(--color-border-emphasized)}
|
|
63
|
+
.x1t7ytsu:not(#\#):not(#\#):not(#\#){border-inline-start-style:solid}
|
|
64
|
+
.xyumdvf:not(#\#):not(#\#):not(#\#){border-inline-start-width:2px}
|
|
65
|
+
.x9f619:not(#\#):not(#\#):not(#\#){box-sizing:border-box}
|
|
66
|
+
.x1afcbsf:not(#\#):not(#\#):not(#\#){box-sizing:content-box}
|
|
67
|
+
.x1heor9g:not(#\#):not(#\#):not(#\#){color:inherit}
|
|
68
|
+
.x1mjzq1q:not(#\#):not(#\#):not(#\#){color:var(--color-syntax-comment)}
|
|
69
|
+
.xjse4m1:not(#\#):not(#\#):not(#\#){color:var(--color-text-accent)}
|
|
70
|
+
.x1wj83wy:not(#\#):not(#\#):not(#\#){color:var(--color-text-error)}
|
|
71
|
+
.x1tgivj0:not(#\#):not(#\#):not(#\#){color:var(--color-text-primary)}
|
|
72
|
+
.xv1l7n4:not(#\#):not(#\#):not(#\#){color:var(--color-text-secondary)}
|
|
73
|
+
.xt0e3qv:not(#\#):not(#\#):not(#\#){cursor:default}
|
|
74
|
+
.x1ypdohk:not(#\#):not(#\#):not(#\#){cursor:pointer}
|
|
75
|
+
.x1epdd7z:not(#\#):not(#\#):not(#\#){direction:inherit}
|
|
76
|
+
.x1lliihq:not(#\#):not(#\#):not(#\#){display:block}
|
|
77
|
+
.x78zum5:not(#\#):not(#\#):not(#\#){display:flex}
|
|
78
|
+
.xrvj5dj:not(#\#):not(#\#):not(#\#){display:grid}
|
|
79
|
+
.x3nfvp2:not(#\#):not(#\#):not(#\#){display:inline-flex}
|
|
80
|
+
.xdt5ytf:not(#\#):not(#\#):not(#\#){flex-direction:column}
|
|
81
|
+
.x2lah0s:not(#\#):not(#\#):not(#\#){flex-shrink:0}
|
|
82
|
+
.x9ynric:not(#\#):not(#\#):not(#\#){font-family:var(--font-family-body)}
|
|
83
|
+
.x9m5x89:not(#\#):not(#\#):not(#\#){font-family:var(--font-family-code)}
|
|
84
|
+
.x1g81bgm:not(#\#):not(#\#):not(#\#){font-family:var(--font-family-heading)}
|
|
85
|
+
.xjm74w1:not(#\#):not(#\#):not(#\#){font-size:var(--text-body-size)}
|
|
86
|
+
.xp03k98:not(#\#):not(#\#):not(#\#){font-size:var(--text-code-size)}
|
|
87
|
+
.xcg7oai:not(#\#):not(#\#):not(#\#){font-size:var(--text-heading-1-size)}
|
|
88
|
+
.x1xvnhcw:not(#\#):not(#\#):not(#\#){font-size:var(--text-heading-2-size)}
|
|
89
|
+
.xii13ha:not(#\#):not(#\#):not(#\#){font-size:var(--text-heading-3-size)}
|
|
90
|
+
.x8tkxat:not(#\#):not(#\#):not(#\#){font-size:var(--text-heading-4-size)}
|
|
91
|
+
.xsgqta0:not(#\#):not(#\#):not(#\#){font-size:var(--text-heading-5-size)}
|
|
92
|
+
.xw5ohdf:not(#\#):not(#\#):not(#\#){font-size:var(--text-heading-6-size)}
|
|
93
|
+
.x141an7d:not(#\#):not(#\#):not(#\#){font-size:var(--text-supporting-size)}
|
|
94
|
+
.x1k4tb9n:not(#\#):not(#\#):not(#\#){font-style:italic}
|
|
95
|
+
.xss6m8b:not(#\#):not(#\#):not(#\#){font-variant-numeric:tabular-nums}
|
|
96
|
+
.x1pd3egz:not(#\#):not(#\#):not(#\#){font-weight:inherit}
|
|
97
|
+
.x1lvx875:not(#\#):not(#\#):not(#\#){font-weight:var(--font-weight-bold)}
|
|
98
|
+
.x1e4wzip:not(#\#):not(#\#):not(#\#){font-weight:var(--font-weight-medium)}
|
|
99
|
+
.x2mo6ok:not(#\#):not(#\#):not(#\#){font-weight:var(--font-weight-semibold)}
|
|
100
|
+
.x1v68xuy:not(#\#):not(#\#):not(#\#){font-weight:var(--text-heading-1-weight)}
|
|
101
|
+
.x12yy4cs:not(#\#):not(#\#):not(#\#){font-weight:var(--text-heading-2-weight)}
|
|
102
|
+
.x1jcxfy8:not(#\#):not(#\#):not(#\#){font-weight:var(--text-heading-3-weight)}
|
|
103
|
+
.x2hcmsi:not(#\#):not(#\#):not(#\#){font-weight:var(--text-heading-4-weight)}
|
|
104
|
+
.xno150v:not(#\#):not(#\#):not(#\#){font-weight:var(--text-heading-5-weight)}
|
|
105
|
+
.x1pw4frv:not(#\#):not(#\#):not(#\#){font-weight:var(--text-heading-6-weight)}
|
|
106
|
+
.x1mkdm3x:not(#\#):not(#\#):not(#\#){grid-template-columns:minmax(0,1fr)}
|
|
107
|
+
.x72tfeb:not(#\#):not(#\#):not(#\#){inset-inline-end:var(--spacing-2)}
|
|
108
|
+
.x1o0tod:not(#\#):not(#\#):not(#\#){inset-inline-start:0}
|
|
109
|
+
.x13a6bvl:not(#\#):not(#\#):not(#\#){justify-content:flex-end}
|
|
110
|
+
.x1qughib:not(#\#):not(#\#):not(#\#){justify-content:space-between}
|
|
111
|
+
.xw6l6zx:not(#\#):not(#\#):not(#\#){line-height:var(--text-body-leading)}
|
|
112
|
+
.x17iicif:not(#\#):not(#\#):not(#\#){line-height:var(--text-code-leading)}
|
|
113
|
+
.xfmsba7:not(#\#):not(#\#):not(#\#){line-height:var(--text-heading-1-leading)}
|
|
114
|
+
.x1cpk1wn:not(#\#):not(#\#):not(#\#){line-height:var(--text-heading-2-leading)}
|
|
115
|
+
.xwjzt0u:not(#\#):not(#\#):not(#\#){line-height:var(--text-heading-3-leading)}
|
|
116
|
+
.xqerer:not(#\#):not(#\#):not(#\#){line-height:var(--text-heading-4-leading)}
|
|
117
|
+
.xo3gurs:not(#\#):not(#\#):not(#\#){line-height:var(--text-heading-5-leading)}
|
|
118
|
+
.xeixjfn:not(#\#):not(#\#):not(#\#){line-height:var(--text-heading-6-leading)}
|
|
119
|
+
.x1ltkj2j:not(#\#):not(#\#):not(#\#){line-height:var(--text-supporting-leading)}
|
|
120
|
+
.x43c9pm:not(#\#):not(#\#):not(#\#){list-style-position:outside}
|
|
121
|
+
.xrylv2j:not(#\#):not(#\#):not(#\#){list-style-type:circle}
|
|
122
|
+
.x3yw8vx:not(#\#):not(#\#):not(#\#){list-style-type:decimal}
|
|
123
|
+
.xtaz4m5:not(#\#):not(#\#):not(#\#){list-style-type:disc}
|
|
124
|
+
.x1sle589:not(#\#):not(#\#):not(#\#){list-style-type:inherit}
|
|
125
|
+
.x1rrqm6h:not(#\#):not(#\#):not(#\#){list-style-type:lower-alpha}
|
|
126
|
+
.x19k9dhg:not(#\#):not(#\#):not(#\#){list-style-type:lower-roman}
|
|
127
|
+
.x152237o:not(#\#):not(#\#):not(#\#){list-style-type:square}
|
|
128
|
+
.x8yim9t:not(#\#):not(#\#):not(#\#){margin-inline-start:calc(var(--spacing-0))}
|
|
129
|
+
.x19bwoy8:not(#\#):not(#\#):not(#\#){outline-color:var(--focus-outline-color)}
|
|
130
|
+
.x1c097ug:not(#\#):not(#\#):not(#\#){outline-offset:calc(-1 * var(--focus-outline-width))}
|
|
131
|
+
.x1eqjuhu:not(#\#):not(#\#):not(#\#){outline-offset:var(--focus-outline-offset)}
|
|
132
|
+
.x9ssot5:not(#\#):not(#\#):not(#\#){outline-style:var(--focus-outline-style)}
|
|
133
|
+
.xak0ai5:not(#\#):not(#\#):not(#\#){outline-width:var(--focus-outline-width)}
|
|
134
|
+
.x1mzt3pk:not(#\#):not(#\#):not(#\#){overflow-wrap:break-word}
|
|
135
|
+
.xp74n0j:not(#\#):not(#\#):not(#\#){padding-inline-end:calc(var(--spacing-2) + var(--spacing-6))}
|
|
136
|
+
.xza90q5:not(#\#):not(#\#):not(#\#){padding-inline-end:calc(var(--spacing-4) + var(--size-element-sm) + 2 * var(--spacing-2))}
|
|
137
|
+
.xbj1ybn:not(#\#):not(#\#):not(#\#){padding-inline-start:calc(var(--spacing-0))}
|
|
138
|
+
.x1rey3nv:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--spacing-4)}
|
|
139
|
+
.x31w388:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--spacing-6)}
|
|
140
|
+
.x67bb7w:not(#\#):not(#\#):not(#\#){pointer-events:auto}
|
|
141
|
+
.x47corl:not(#\#):not(#\#):not(#\#){pointer-events:none}
|
|
142
|
+
.x10l6tqk:not(#\#):not(#\#):not(#\#){position:absolute}
|
|
143
|
+
.x1n2onr6:not(#\#):not(#\#):not(#\#){position:relative}
|
|
144
|
+
.x1597r2g:not(#\#):not(#\#):not(#\#){scrollbar-width:thin}
|
|
145
|
+
.x1yc453h:not(#\#):not(#\#):not(#\#){text-align:start}
|
|
146
|
+
.xlyipyv:not(#\#):not(#\#):not(#\#){text-overflow:ellipsis}
|
|
147
|
+
.x87ps6o:not(#\#):not(#\#):not(#\#){user-select:none}
|
|
148
|
+
.xxymvpz:not(#\#):not(#\#):not(#\#){vertical-align:middle}
|
|
149
|
+
.xuxw1ft:not(#\#):not(#\#):not(#\#){white-space:nowrap}
|
|
150
|
+
.x126k92a:not(#\#):not(#\#):not(#\#){white-space:pre-wrap}
|
|
151
|
+
.x1yn0g08:not(#\#):not(#\#):not(#\#){word-break:break-all}
|
|
152
|
+
.x1vjfegm:not(#\#):not(#\#):not(#\#){z-index:1}
|
|
153
|
+
.x16khyan:is(:disabled,[aria-disabled="true"]):not(#\#):not(#\#):not(#\#){cursor:default}
|
|
154
|
+
.x2i8j16:is([data-richtext-task]):not(#\#):not(#\#):not(#\#){list-style-type:none}
|
|
155
|
+
.x1pvqllw:is([data-richtext-task]):not(#\#):not(#\#):not(#\#){margin-inline-start:calc(-1 * var(--spacing-6))}
|
|
156
|
+
.x18crcbm:is([data-language]:not([data-language="plaintext"])):not(#\#):not(#\#):not(#\#){padding-inline-end:var(--spacing-4)}
|
|
157
|
+
.x1kuvm45:is([data-richtext-task]):not(#\#):not(#\#):not(#\#){padding-inline-start:calc(20px + var(--spacing-2))}
|
|
158
|
+
.x81k3mc:has(ul):not(#\#):not(#\#):not(#\#){list-style-type:none}
|
|
159
|
+
.xovwveo:has(ol):not(#\#):not(#\#):not(#\#){list-style-type:none}
|
|
160
|
+
.x1qlsc9e:last-child:not(#\#):not(#\#):not(#\#){border-inline-end-width:0}
|
|
161
|
+
@supports (-webkit-touch-callout: none){@media (pointer: coarse){.xf9zqsd.xf9zqsd.xf9zqsd:not(#\#):not(#\#):not(#\#){font-size:max(1rem,var(--text-body-size))}}}
|
|
162
|
+
.xw8gpjh:not(#\#):not(#\#):not(#\#):not(#\#){border-bottom-color:var(--color-border)}
|
|
163
|
+
.x1q0q8m5:not(#\#):not(#\#):not(#\#):not(#\#){border-bottom-style:solid}
|
|
164
|
+
.xso031l:not(#\#):not(#\#):not(#\#):not(#\#){border-bottom-width:1px}
|
|
165
|
+
.x1pc3f07:not(#\#):not(#\#):not(#\#):not(#\#){border-top-color:var(--color-border)}
|
|
166
|
+
.x13fuv20:not(#\#):not(#\#):not(#\#):not(#\#){border-top-style:solid}
|
|
167
|
+
.x178xt8z:not(#\#):not(#\#):not(#\#):not(#\#){border-top-width:1px}
|
|
168
|
+
.x11xkdxz:not(#\#):not(#\#):not(#\#):not(#\#){border-top-width:var(--border-width)}
|
|
169
|
+
.xt7dq6l:not(#\#):not(#\#):not(#\#):not(#\#){height:auto}
|
|
170
|
+
.xgq9j65:not(#\#):not(#\#):not(#\#):not(#\#){left:var(--x-left)}
|
|
171
|
+
.x199tud:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:calc(-1 * var(--spacing-1))}
|
|
172
|
+
.x10j6jf0:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:calc(var(--spacing-0-5))}
|
|
173
|
+
.x1hws3vx:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:calc(var(--spacing-2))}
|
|
174
|
+
.x18pneqc:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:calc(var(--spacing-3))}
|
|
175
|
+
.x1u2y747:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:calc(var(--spacing-4))}
|
|
176
|
+
.x1qaki06:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:calc(var(--spacing-6))}
|
|
177
|
+
.x1uy92hs:not(#\#):not(#\#):not(#\#):not(#\#){margin-top:calc(-1 * var(--spacing-1))}
|
|
178
|
+
.x1wqhfsw:not(#\#):not(#\#):not(#\#):not(#\#){margin-top:calc(var(--spacing-0))}
|
|
179
|
+
.x1ftnraw:not(#\#):not(#\#):not(#\#):not(#\#){margin-top:calc(var(--spacing-3))}
|
|
180
|
+
.x1w2a574:not(#\#):not(#\#):not(#\#):not(#\#){margin-top:calc(var(--spacing-4))}
|
|
181
|
+
.x13xmvwt:not(#\#):not(#\#):not(#\#):not(#\#){margin-top:calc(var(--spacing-6))}
|
|
182
|
+
.xcsaf9d:not(#\#):not(#\#):not(#\#):not(#\#){margin-top:var(--spacing-1)}
|
|
183
|
+
.x193iq5w:not(#\#):not(#\#):not(#\#):not(#\#){max-width:100%}
|
|
184
|
+
.x7ep2pv:not(#\#):not(#\#):not(#\#):not(#\#){max-width:680px}
|
|
185
|
+
.x65nank:not(#\#):not(#\#):not(#\#):not(#\#){min-height:auto}
|
|
186
|
+
.x82snj4:not(#\#):not(#\#):not(#\#):not(#\#){min-height:var(--x-minHeight)}
|
|
187
|
+
.xeuugli:not(#\#):not(#\#):not(#\#):not(#\#){min-width:0}
|
|
188
|
+
.xejm5pw:not(#\#):not(#\#):not(#\#):not(#\#){min-width:min(680px,100%)}
|
|
189
|
+
.xw2csxc:not(#\#):not(#\#):not(#\#):not(#\#){overflow-x:auto}
|
|
190
|
+
.x10wlt62:not(#\#):not(#\#):not(#\#):not(#\#){overflow-y:hidden}
|
|
191
|
+
.x7p5m3t:not(#\#):not(#\#):not(#\#):not(#\#){overscroll-behavior-x:contain}
|
|
192
|
+
.x13xdy6z:not(#\#):not(#\#):not(#\#):not(#\#){padding-bottom:calc(var(--spacing-1))}
|
|
193
|
+
.xvmdzux:not(#\#):not(#\#):not(#\#):not(#\#){padding-bottom:var(--spacing-3)}
|
|
194
|
+
.x1f3mx8c:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:calc(var(--spacing-1))}
|
|
195
|
+
.xekneqv:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:calc(var(--spacing-3))}
|
|
196
|
+
.x4xegtk:not(#\#):not(#\#):not(#\#):not(#\#){top:var(--spacing-0)}
|
|
197
|
+
.xctzyg:not(#\#):not(#\#):not(#\#):not(#\#){top:var(--spacing-2)}
|
|
198
|
+
.xjbys53:not(#\#):not(#\#):not(#\#):not(#\#){top:var(--x-top)}
|
|
199
|
+
.xnalus7:not(#\#):not(#\#):not(#\#):not(#\#){width:0}
|
|
200
|
+
.xh8yej3:not(#\#):not(#\#):not(#\#):not(#\#){width:100%}
|
|
201
|
+
.xeq5yr9:not(#\#):not(#\#):not(#\#):not(#\#){width:fit-content}
|
|
202
|
+
.x5lhr3w:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--x-width)}
|
|
203
|
+
.xe66n16:is([data-lexical-decorator-boundary]:first-child + *):not(#\#):not(#\#):not(#\#):not(#\#){margin-top:var(--spacing-0)}
|
|
204
|
+
.x2w4pp4:is([data-language]:not([data-language="plaintext"])):not(#\#):not(#\#):not(#\#):not(#\#){padding-top:calc(var(--spacing-2) + var(--size-element-sm) + var(--spacing-3))}
|
|
205
|
+
.x1vugyqv:has(+ [data-lexical-decorator-boundary]:last-child):not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:var(--spacing-0)}
|
|
206
|
+
.xkuhcwz:has(ul):not(#\#):not(#\#):not(#\#):not(#\#){margin-top:calc(var(--spacing-2))}
|
|
207
|
+
.xsgnyjk:has(ol):not(#\#):not(#\#):not(#\#):not(#\#){margin-top:calc(var(--spacing-2))}
|
|
208
|
+
.x1uerj9w:has(ol):not(#\#):not(#\#):not(#\#):not(#\#){padding-top:var(--spacing-0)}
|
|
209
|
+
.xmvvslv:has(ul):not(#\#):not(#\#):not(#\#):not(#\#){padding-top:var(--spacing-0)}
|
|
210
|
+
.xnhvf09:first-child:not(#\#):not(#\#):not(#\#):not(#\#){margin-top:var(--spacing-0)}
|
|
211
|
+
.x1bta2m4:last-child:not(#\#):not(#\#):not(#\#):not(#\#){border-bottom-color:transparent}
|
|
212
|
+
.xfo59cc:last-child:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:var(--spacing-0)}
|
|
213
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textSemantics.d.ts","sourceRoot":"","sources":["../src/textSemantics.ts"],"names":[],"mappings":"AAyBA,OAAO,EAIL,KAAK,2BAA2B,EACjC,MAAM,SAAS,CAAC;AAgCjB,eAAO,MAAM,sBAAsB,EAAE,2BAyCjC,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file textSemantics.ts
|
|
5
|
+
* @input Uses lexical (TextNode, configExtension) and @lexical/html
|
|
6
|
+
* (DOMRenderExtension, domOverride).
|
|
7
|
+
* @output Exports TextSemanticsExtension, which renders struck-through text
|
|
8
|
+
* inside a `<del>` and bold italic text inside an `<em>`, the elements core
|
|
9
|
+
* Markdown renders for them.
|
|
10
|
+
* @position A dependency of the RichTextEditor and RichTextView extensions.
|
|
11
|
+
* Lexical draws struck text as a styled `<span>`, or as the `<strong>`,
|
|
12
|
+
* `<em>`, or `<code>` its other marks call for, and draws bold italic text
|
|
13
|
+
* as a `<strong>` alone, so assistive technology hears no deletion, and no
|
|
14
|
+
* emphasis on bold italic text, where core Markdown exposes them
|
|
15
|
+
* (spec:AST-061 FR7). Giving Lexical's element another role would replace
|
|
16
|
+
* the one it already has; instead each text node's element, exactly as
|
|
17
|
+
* Lexical builds it, sits inside the elements it is missing — a `<del>`,
|
|
18
|
+
* then an `<em>` — so every mark is exposed together. Struck text inside a
|
|
19
|
+
* link is a deletion inside the link. The document, its Markdown, and the
|
|
20
|
+
* selection model are unchanged: the text node's element is still the one
|
|
21
|
+
* Lexical created and updates, and Lexical finds its text by walking down
|
|
22
|
+
* from the outermost element.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import { DOMRenderExtension, domOverride } from '@lexical/html';
|
|
26
|
+
import { configExtension, TEXT_TYPE_TO_FORMAT, TextNode } from 'lexical';
|
|
27
|
+
const STRIKETHROUGH = TEXT_TYPE_TO_FORMAT.strikethrough;
|
|
28
|
+
const BOLD_ITALIC = TEXT_TYPE_TO_FORMAT.bold | TEXT_TYPE_TO_FORMAT.italic;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The elements this version of `node` sits inside, outermost first. Reads the
|
|
32
|
+
* version's own field: Lexical's getters read the latest version, so
|
|
33
|
+
* `prevNode.hasFormat()` would answer for the next one.
|
|
34
|
+
*/
|
|
35
|
+
function wrappersOf(node) {
|
|
36
|
+
const format = node.__format;
|
|
37
|
+
const wrappers = [];
|
|
38
|
+
if ((format & STRIKETHROUGH) !== 0) {
|
|
39
|
+
wrappers.push('del');
|
|
40
|
+
}
|
|
41
|
+
// Lexical draws bold italic text as a `<strong>` with an italic class.
|
|
42
|
+
if ((format & BOLD_ITALIC) === BOLD_ITALIC) {
|
|
43
|
+
wrappers.push('em');
|
|
44
|
+
}
|
|
45
|
+
return wrappers;
|
|
46
|
+
}
|
|
47
|
+
function sameWrappers(a, b) {
|
|
48
|
+
return a.length === b.length && a.every((tag, index) => tag === b[index]);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Typed as an extension argument: its inferred type names Lexical types the
|
|
52
|
+
// package's declarations cannot (TS4023).
|
|
53
|
+
export const TextSemanticsExtension = configExtension(DOMRenderExtension, {
|
|
54
|
+
overrides: [domOverride([TextNode], {
|
|
55
|
+
$createDOM(node, $next) {
|
|
56
|
+
let element = $next();
|
|
57
|
+
for (const tag of [...wrappersOf(node)].reverse()) {
|
|
58
|
+
const wrapper = document.createElement(tag);
|
|
59
|
+
wrapper.append(element);
|
|
60
|
+
element = wrapper;
|
|
61
|
+
}
|
|
62
|
+
return element;
|
|
63
|
+
},
|
|
64
|
+
$updateDOM(nextNode, prevNode, dom, $next, editor) {
|
|
65
|
+
const wrappers = wrappersOf(nextNode);
|
|
66
|
+
if (!sameWrappers(wrappers, wrappersOf(prevNode))) {
|
|
67
|
+
// Adding or removing a wrapper recreates the element.
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
if (wrappers.length === 0) {
|
|
71
|
+
return $next();
|
|
72
|
+
}
|
|
73
|
+
// Lexical updates its own element, inside the wrappers.
|
|
74
|
+
let element = dom;
|
|
75
|
+
for (const tag of wrappers) {
|
|
76
|
+
if (element?.tagName.toLowerCase() !== tag) {
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
element = element.firstElementChild;
|
|
80
|
+
}
|
|
81
|
+
if (element == null) {
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
return nextNode.updateDOM(prevNode, element, editor._config);
|
|
85
|
+
}
|
|
86
|
+
})]
|
|
87
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,161 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blue-patterns/richtext",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
3
|
+
"displayName": "Rich Text",
|
|
4
|
+
"version": "0.7.18",
|
|
5
|
+
"description": "Astryx rich text — a Lexical-based rich text editor and viewer, styled with Astryx design tokens.",
|
|
6
|
+
"author": "Meta Open Source",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"homepage": "https://github.com/meta/astryx#readme",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/meta/astryx.git",
|
|
12
|
+
"directory": "packages/richtext"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/meta/astryx/issues"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"astryx",
|
|
19
|
+
"richtext",
|
|
20
|
+
"rich-text",
|
|
21
|
+
"editor",
|
|
22
|
+
"lexical",
|
|
23
|
+
"design-system"
|
|
24
|
+
],
|
|
25
|
+
"type": "module",
|
|
26
|
+
"main": "./dist/index.js",
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"sideEffects": [
|
|
29
|
+
"**/*.css"
|
|
30
|
+
],
|
|
31
|
+
"files": [
|
|
32
|
+
"astryx.integration.mjs",
|
|
33
|
+
"blocks",
|
|
34
|
+
"dist",
|
|
35
|
+
"src",
|
|
36
|
+
"README.md",
|
|
37
|
+
"CHANGELOG.md",
|
|
38
|
+
"!**/*.test.*",
|
|
39
|
+
"!**/*.spec.js",
|
|
40
|
+
"!**/*.spec.jsx",
|
|
41
|
+
"!**/*.spec.mjs",
|
|
42
|
+
"!**/*.spec.cjs",
|
|
43
|
+
"!**/*.spec.ts",
|
|
44
|
+
"!**/*.spec.tsx",
|
|
45
|
+
"!**/*.spec.mts",
|
|
46
|
+
"!**/*.spec.cts",
|
|
47
|
+
"!**/*.spec.d.ts",
|
|
48
|
+
"!**/__tests__/**",
|
|
49
|
+
"!**/__mocks__/**",
|
|
50
|
+
"!**/*.bench.*"
|
|
51
|
+
],
|
|
52
|
+
"exports": {
|
|
53
|
+
".": {
|
|
54
|
+
"source": "./src/index.ts",
|
|
55
|
+
"types": "./dist/index.d.ts",
|
|
56
|
+
"default": "./dist/index.js"
|
|
57
|
+
},
|
|
58
|
+
"./markdown": {
|
|
59
|
+
"source": "./src/markdown.ts",
|
|
60
|
+
"types": "./dist/markdown.d.ts",
|
|
61
|
+
"default": "./dist/markdown.js"
|
|
62
|
+
},
|
|
63
|
+
"./richtext.css": {
|
|
64
|
+
"default": "./dist/richtext.css"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"peerDependencies": {
|
|
68
|
+
"@stylexjs/stylex": ">=0.10.0",
|
|
69
|
+
"@blue-patterns/core": "0.7.18",
|
|
70
|
+
"react": ">=19.0.0",
|
|
71
|
+
"react-dom": ">=19.0.0",
|
|
72
|
+
"lexical": "^0.52.0",
|
|
73
|
+
"@lexical/react": "^0.52.0",
|
|
74
|
+
"@lexical/markdown": "^0.52.0",
|
|
75
|
+
"@lexical/headless": "^0.52.0",
|
|
76
|
+
"@lexical/html": "^0.52.0",
|
|
77
|
+
"@lexical/link": "^0.52.0",
|
|
78
|
+
"@lexical/list": "^0.52.0",
|
|
79
|
+
"@lexical/rich-text": "^0.52.0",
|
|
80
|
+
"@lexical/selection": "^0.52.0",
|
|
81
|
+
"@lexical/code": "^0.52.0",
|
|
82
|
+
"@lexical/extension": "^0.52.0",
|
|
83
|
+
"@lexical/table": "^0.52.0",
|
|
84
|
+
"@lexical/utils": "^0.52.0"
|
|
85
|
+
},
|
|
86
|
+
"peerDependenciesMeta": {
|
|
87
|
+
"lexical": {
|
|
88
|
+
"optional": true
|
|
89
|
+
},
|
|
90
|
+
"@lexical/react": {
|
|
91
|
+
"optional": true
|
|
92
|
+
},
|
|
93
|
+
"@lexical/markdown": {
|
|
94
|
+
"optional": true
|
|
95
|
+
},
|
|
96
|
+
"@lexical/headless": {
|
|
97
|
+
"optional": true
|
|
98
|
+
},
|
|
99
|
+
"@lexical/html": {
|
|
100
|
+
"optional": true
|
|
101
|
+
},
|
|
102
|
+
"@lexical/link": {
|
|
103
|
+
"optional": true
|
|
104
|
+
},
|
|
105
|
+
"@lexical/list": {
|
|
106
|
+
"optional": true
|
|
107
|
+
},
|
|
108
|
+
"@lexical/rich-text": {
|
|
109
|
+
"optional": true
|
|
110
|
+
},
|
|
111
|
+
"@lexical/selection": {
|
|
112
|
+
"optional": true
|
|
113
|
+
},
|
|
114
|
+
"@lexical/code": {
|
|
115
|
+
"optional": true
|
|
116
|
+
},
|
|
117
|
+
"@lexical/extension": {
|
|
118
|
+
"optional": true
|
|
119
|
+
},
|
|
120
|
+
"@lexical/table": {
|
|
121
|
+
"optional": true
|
|
122
|
+
},
|
|
123
|
+
"@lexical/utils": {
|
|
124
|
+
"optional": true
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"devDependencies": {
|
|
128
|
+
"@babel/cli": "^7.29.7",
|
|
129
|
+
"@babel/core": "^7.29.7",
|
|
130
|
+
"@babel/preset-react": "^7.29.7",
|
|
131
|
+
"@babel/preset-typescript": "^7.29.7",
|
|
132
|
+
"@lexical/code": "^0.52.0",
|
|
133
|
+
"@lexical/extension": "^0.52.0",
|
|
134
|
+
"@lexical/headless": "^0.52.0",
|
|
135
|
+
"@lexical/html": "^0.52.0",
|
|
136
|
+
"@lexical/link": "^0.52.0",
|
|
137
|
+
"@lexical/list": "^0.52.0",
|
|
138
|
+
"@lexical/markdown": "^0.52.0",
|
|
139
|
+
"@lexical/react": "^0.52.0",
|
|
140
|
+
"@lexical/rich-text": "^0.52.0",
|
|
141
|
+
"@lexical/selection": "^0.52.0",
|
|
142
|
+
"@lexical/table": "^0.52.0",
|
|
143
|
+
"@lexical/utils": "^0.52.0",
|
|
144
|
+
"@stylexjs/babel-plugin": "^0.19.1",
|
|
145
|
+
"@testing-library/react": "^16.3.3",
|
|
146
|
+
"lexical": "^0.52.0",
|
|
147
|
+
"@blue-patterns/a11y-spec": "0.0.0",
|
|
148
|
+
"@blue-patterns/cli": "0.7.18"
|
|
149
|
+
},
|
|
150
|
+
"scripts": {
|
|
151
|
+
"build": "node ../../scripts/clean-dist.mjs && pnpm build:esm && tsc --project tsconfig.build.json && node ../../scripts/add-declaration-extensions.mjs && pnpm build:css && node ../../scripts/check-no-dev-jsx.mjs && node ../../scripts/check-fully-specified.mjs",
|
|
152
|
+
"build:esm": "babel src --out-dir dist --extensions \".ts,.tsx\" --out-file-extension \".js\" --ignore \"**/*.test.ts,**/*.test.tsx,**/__tests__/**,**/*.perf.test.*,**/*.doc.mjs,**/*.d.ts,**/*.css,**/*.css.d.ts\" --config-file ./babel.config.cjs",
|
|
153
|
+
"build:css": "node ../../scripts/build-css.mjs --package richtext",
|
|
154
|
+
"dev": "babel src --watch --out-dir dist --extensions \".ts,.tsx\" --out-file-extension \".js\" --ignore \"**/*.test.*,**/*.doc.mjs,**/*.d.ts,**/*.css*\" --config-file ./babel.config.cjs",
|
|
155
|
+
"test": "vitest run --root ../..",
|
|
156
|
+
"test:watch": "vitest --root ../..",
|
|
157
|
+
"lint": "eslint src",
|
|
158
|
+
"typecheck:docs": "tsc --project tsconfig.docs.json",
|
|
159
|
+
"typecheck": "tsc --project tsconfig.json --noEmit && pnpm typecheck:docs"
|
|
160
|
+
}
|
|
6
161
|
}
|