@byline/richtext-lexical 6.10.0 → 6.11.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/dist/field/content-editable.css +22 -18
- package/dist/field/editor-component.css +33 -29
- package/dist/field/editor.css +1218 -1214
- package/dist/field/extensions/admonition/admonition-modal.css +20 -16
- package/dist/field/extensions/admonition/admonition-node.css +114 -110
- package/dist/field/extensions/admonition/icons/danger-icon.css +13 -9
- package/dist/field/extensions/admonition/icons/note-icon.css +13 -9
- package/dist/field/extensions/admonition/icons/tip-icon.css +13 -9
- package/dist/field/extensions/admonition/icons/warning-icon.css +13 -9
- package/dist/field/extensions/auto-embed/auto-embed-modal.css +14 -10
- package/dist/field/extensions/floating-text-format/index.css +130 -126
- package/dist/field/extensions/inline-image/inline-image-modal.css +120 -116
- package/dist/field/extensions/inline-image/inline-image-node-component.css +243 -239
- package/dist/field/extensions/layout/insert-layout-modal.css +16 -12
- package/dist/field/extensions/link/floating-link-editor.css +113 -109
- package/dist/field/extensions/link/link-target-fields.css +61 -57
- package/dist/field/normalize/adapted-notice.css +2 -4
- package/dist/field/plugins/table-plugin/table-modal.css +17 -13
- package/dist/field/themes/lexical-editor-theme.css +471 -467
- package/dist/field/ui/button.css +28 -24
- package/dist/field/ui/checkbox.css +43 -39
- package/dist/field/ui/color-picker.css +69 -65
- package/dist/field/ui/dialog.css +18 -14
- package/dist/field/ui/input.css +23 -19
- package/dist/field/ui/modal.css +66 -62
- package/dist/field/ui/placeholder.css +25 -21
- package/dist/field/ui/select.css +32 -28
- package/dist/field/ui/text-area.css +29 -25
- package/dist/richtext-field_module.css +21 -17
- package/package.json +6 -6
- package/src/field/content-editable.css +31 -17
- package/src/field/editor-component.css +56 -40
- package/src/field/editor.css +1248 -1232
- package/src/field/extensions/admonition/admonition-modal.css +32 -16
- package/src/field/extensions/admonition/admonition-node.css +105 -89
- package/src/field/extensions/admonition/icons/danger-icon.css +25 -9
- package/src/field/extensions/admonition/icons/note-icon.css +25 -9
- package/src/field/extensions/admonition/icons/tip-icon.css +25 -9
- package/src/field/extensions/admonition/icons/warning-icon.css +25 -9
- package/src/field/extensions/auto-embed/auto-embed-modal.css +25 -9
- package/src/field/extensions/floating-text-format/index.css +142 -126
- package/src/field/extensions/inline-image/inline-image-modal.css +144 -128
- package/src/field/extensions/inline-image/inline-image-node-component.css +258 -242
- package/src/field/extensions/layout/insert-layout-modal.css +28 -12
- package/src/field/extensions/link/floating-link-editor.css +129 -113
- package/src/field/extensions/link/link-target-fields.css +68 -52
- package/src/field/normalize/adapted-notice.css +5 -4
- package/src/field/plugins/table-plugin/table-modal.css +29 -13
- package/src/field/themes/lexical-editor-theme.css +508 -494
- package/src/field/ui/button.css +46 -30
- package/src/field/ui/checkbox.css +62 -46
- package/src/field/ui/color-picker.css +89 -73
- package/src/field/ui/dialog.css +30 -14
- package/src/field/ui/input.css +38 -22
- package/src/field/ui/modal.css +81 -65
- package/src/field/ui/placeholder.css +36 -20
- package/src/field/ui/select.css +46 -30
- package/src/field/ui/text-area.css +45 -29
- package/src/lexical-editor.tsx +2 -0
- package/src/richtext-field.module.css +38 -22
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
@layer base,
|
|
2
|
+
byline-base,
|
|
3
|
+
theme,
|
|
4
|
+
byline-theme,
|
|
5
|
+
byline-functional,
|
|
6
|
+
byline-typography,
|
|
7
|
+
components,
|
|
8
|
+
byline-components,
|
|
9
|
+
overrides,
|
|
10
|
+
byline-utilities,
|
|
11
|
+
utilities;
|
|
12
|
+
|
|
13
|
+
@layer byline-components.primitives, byline-components.cms;
|
|
14
|
+
|
|
1
15
|
/**
|
|
2
16
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
17
|
*
|
|
@@ -7,27 +21,29 @@
|
|
|
7
21
|
*
|
|
8
22
|
*/
|
|
9
23
|
|
|
10
|
-
.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
@layer byline-components.cms {
|
|
25
|
+
.Placeholder__root {
|
|
26
|
+
font-size: 15px;
|
|
27
|
+
color: #999;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
position: absolute;
|
|
30
|
+
text-overflow: ellipsis;
|
|
31
|
+
top: 8px;
|
|
32
|
+
left: 2px;
|
|
33
|
+
right: 0;
|
|
34
|
+
user-select: none;
|
|
35
|
+
white-space: nowrap;
|
|
36
|
+
display: inline-block;
|
|
37
|
+
pointer-events: none;
|
|
38
|
+
}
|
|
24
39
|
|
|
25
|
-
.Placeholder__with_draggable_blocks {
|
|
26
|
-
|
|
27
|
-
}
|
|
40
|
+
.Placeholder__with_draggable_blocks {
|
|
41
|
+
left: 22px;
|
|
42
|
+
}
|
|
28
43
|
|
|
29
|
-
@media (max-width: 1025px) {
|
|
30
|
-
|
|
31
|
-
|
|
44
|
+
@media (max-width: 1025px) {
|
|
45
|
+
.ContentEditable__root {
|
|
46
|
+
left: 2px;
|
|
47
|
+
}
|
|
32
48
|
}
|
|
33
49
|
}
|
package/src/field/ui/select.css
CHANGED
|
@@ -1,34 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
line-height: inherit;
|
|
1
|
+
@layer base,
|
|
2
|
+
byline-base,
|
|
3
|
+
theme,
|
|
4
|
+
byline-theme,
|
|
5
|
+
byline-functional,
|
|
6
|
+
byline-typography,
|
|
7
|
+
components,
|
|
8
|
+
byline-components,
|
|
9
|
+
overrides,
|
|
10
|
+
byline-utilities,
|
|
11
|
+
utilities;
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
outline: none;
|
|
16
|
-
}
|
|
13
|
+
@layer byline-components.primitives, byline-components.cms;
|
|
17
14
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
@layer byline-components.cms {
|
|
16
|
+
select {
|
|
17
|
+
appearance: none;
|
|
18
|
+
-webkit-appearance: none;
|
|
19
|
+
-moz-appearance: none;
|
|
20
|
+
background-color: transparent;
|
|
21
|
+
border: none;
|
|
22
|
+
padding: 0 1em 0 0;
|
|
23
|
+
margin: 0;
|
|
24
|
+
font-family: inherit;
|
|
25
|
+
font-size: inherit;
|
|
26
|
+
cursor: inherit;
|
|
27
|
+
line-height: inherit;
|
|
28
|
+
|
|
29
|
+
z-index: 1;
|
|
30
|
+
outline: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:root {
|
|
34
|
+
--select-border: #393939;
|
|
35
|
+
--select-focus: #101484;
|
|
36
|
+
--select-arrow: var(--select-border);
|
|
37
|
+
}
|
|
23
38
|
|
|
24
|
-
.select {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
.select {
|
|
40
|
+
min-width: 160px;
|
|
41
|
+
max-width: 290px;
|
|
42
|
+
border: 1px solid var(--select-border);
|
|
43
|
+
border-radius: 0.25em;
|
|
44
|
+
padding: 0.25em 0.5em;
|
|
45
|
+
font-size: 1rem;
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
line-height: 1.4;
|
|
48
|
+
background: linear-gradient(to bottom, #ffffff 0%, #e5e5e5 100%);
|
|
49
|
+
}
|
|
34
50
|
}
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
@layer base,
|
|
2
|
+
byline-base,
|
|
3
|
+
theme,
|
|
4
|
+
byline-theme,
|
|
5
|
+
byline-functional,
|
|
6
|
+
byline-typography,
|
|
7
|
+
components,
|
|
8
|
+
byline-components,
|
|
9
|
+
overrides,
|
|
10
|
+
byline-utilities,
|
|
11
|
+
utilities;
|
|
12
|
+
|
|
13
|
+
@layer byline-components.primitives, byline-components.cms;
|
|
14
|
+
|
|
1
15
|
/**
|
|
2
16
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
17
|
*
|
|
@@ -7,39 +21,41 @@
|
|
|
7
21
|
*
|
|
8
22
|
*/
|
|
9
23
|
|
|
10
|
-
.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
.TextArea__label {
|
|
17
|
-
display: flex;
|
|
18
|
-
flex: 1;
|
|
19
|
-
color: #666;
|
|
20
|
-
margin-bottom: 4px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.TextArea__input {
|
|
24
|
-
border: 1px solid #999;
|
|
25
|
-
padding-top: 7px;
|
|
26
|
-
padding-bottom: 7px;
|
|
27
|
-
padding-left: 10px;
|
|
28
|
-
padding-right: 10px;
|
|
29
|
-
font-size: 16px;
|
|
30
|
-
border-radius: 1px;
|
|
31
|
-
min-width: 0;
|
|
32
|
-
}
|
|
24
|
+
@layer byline-components.cms {
|
|
25
|
+
.TextArea__wrapper {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
margin-bottom: 10px;
|
|
29
|
+
}
|
|
33
30
|
|
|
34
|
-
.dark,
|
|
35
|
-
[data-theme="dark"] {
|
|
36
31
|
.TextArea__label {
|
|
37
|
-
|
|
32
|
+
display: flex;
|
|
33
|
+
flex: 1;
|
|
34
|
+
color: #666;
|
|
35
|
+
margin-bottom: 4px;
|
|
38
36
|
}
|
|
39
37
|
|
|
40
38
|
.TextArea__input {
|
|
41
|
-
border: 1px solid #
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
border: 1px solid #999;
|
|
40
|
+
padding-top: 7px;
|
|
41
|
+
padding-bottom: 7px;
|
|
42
|
+
padding-left: 10px;
|
|
43
|
+
padding-right: 10px;
|
|
44
|
+
font-size: 16px;
|
|
45
|
+
border-radius: 1px;
|
|
46
|
+
min-width: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.dark,
|
|
50
|
+
[data-theme="dark"] {
|
|
51
|
+
.TextArea__label {
|
|
52
|
+
color: #ccc;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.TextArea__input {
|
|
56
|
+
border: 1px solid #666;
|
|
57
|
+
background-color: #1c1c1c;
|
|
58
|
+
color: #eee;
|
|
59
|
+
}
|
|
44
60
|
}
|
|
45
61
|
}
|
package/src/lexical-editor.tsx
CHANGED
|
@@ -124,12 +124,14 @@ export function lexicalEditor(configure?: ConfigureFn): RichTextEditorComponent
|
|
|
124
124
|
baked = configure(seed)
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
+
// biome-ignore lint/correctness/noComponentHookFactories: resolved once per lexicalEditor() call at config time, not per render
|
|
127
128
|
const Configured: RichTextEditorComponent = (props) => (
|
|
128
129
|
<RichTextField {...props} editorConfig={baked} />
|
|
129
130
|
)
|
|
130
131
|
return { default: Configured as React.ComponentType<any> }
|
|
131
132
|
})
|
|
132
133
|
|
|
134
|
+
// biome-ignore lint/correctness/noComponentHookFactories: lexicalEditor() runs once at config time and returns this stable component
|
|
133
135
|
const ConfiguredEditor: RichTextEditorComponent = (props) => (
|
|
134
136
|
<Suspense
|
|
135
137
|
fallback={
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
@layer base,
|
|
2
|
+
byline-base,
|
|
3
|
+
theme,
|
|
4
|
+
byline-theme,
|
|
5
|
+
byline-functional,
|
|
6
|
+
byline-typography,
|
|
7
|
+
components,
|
|
8
|
+
byline-components,
|
|
9
|
+
overrides,
|
|
10
|
+
byline-utilities,
|
|
11
|
+
utilities;
|
|
12
|
+
|
|
13
|
+
@layer byline-components.primitives, byline-components.cms;
|
|
14
|
+
|
|
1
15
|
/**
|
|
2
16
|
* RichTextField — Lexical rich text editor field.
|
|
3
17
|
*
|
|
@@ -7,31 +21,33 @@
|
|
|
7
21
|
* .byline-field-richtext-body — vertical stack containing editor + error
|
|
8
22
|
*/
|
|
9
23
|
|
|
10
|
-
.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
24
|
+
@layer byline-components.cms {
|
|
25
|
+
.wrapper,
|
|
26
|
+
:global(.byline-field-richtext) {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex: 1 1 0%;
|
|
29
|
+
height: 100%;
|
|
30
|
+
/* Allow shrinking below content min-content so a wide (white-space:pre)
|
|
16
31
|
* code block inside the editor scrolls internally instead of stretching
|
|
17
32
|
* this field — and the form column — across the sidebar. */
|
|
18
|
-
|
|
19
|
-
}
|
|
33
|
+
min-width: 0;
|
|
34
|
+
}
|
|
20
35
|
|
|
21
|
-
.label-row,
|
|
22
|
-
:global(.byline-field-richtext-label) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
36
|
+
.label-row,
|
|
37
|
+
:global(.byline-field-richtext-label) {
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
margin-bottom: 0.25rem;
|
|
41
|
+
}
|
|
27
42
|
|
|
28
|
-
.body,
|
|
29
|
-
:global(.byline-field-richtext-body) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
43
|
+
.body,
|
|
44
|
+
:global(.byline-field-richtext-body) {
|
|
45
|
+
display: flex;
|
|
46
|
+
flex: 1 1 0%;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
gap: 0.25rem;
|
|
49
|
+
/* Same rationale as .wrapper — keep the editor body from growing to the
|
|
35
50
|
* code block's intrinsic width. */
|
|
36
|
-
|
|
51
|
+
min-width: 0;
|
|
52
|
+
}
|
|
37
53
|
}
|