@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.
Files changed (60) hide show
  1. package/dist/field/content-editable.css +22 -18
  2. package/dist/field/editor-component.css +33 -29
  3. package/dist/field/editor.css +1218 -1214
  4. package/dist/field/extensions/admonition/admonition-modal.css +20 -16
  5. package/dist/field/extensions/admonition/admonition-node.css +114 -110
  6. package/dist/field/extensions/admonition/icons/danger-icon.css +13 -9
  7. package/dist/field/extensions/admonition/icons/note-icon.css +13 -9
  8. package/dist/field/extensions/admonition/icons/tip-icon.css +13 -9
  9. package/dist/field/extensions/admonition/icons/warning-icon.css +13 -9
  10. package/dist/field/extensions/auto-embed/auto-embed-modal.css +14 -10
  11. package/dist/field/extensions/floating-text-format/index.css +130 -126
  12. package/dist/field/extensions/inline-image/inline-image-modal.css +120 -116
  13. package/dist/field/extensions/inline-image/inline-image-node-component.css +243 -239
  14. package/dist/field/extensions/layout/insert-layout-modal.css +16 -12
  15. package/dist/field/extensions/link/floating-link-editor.css +113 -109
  16. package/dist/field/extensions/link/link-target-fields.css +61 -57
  17. package/dist/field/normalize/adapted-notice.css +2 -4
  18. package/dist/field/plugins/table-plugin/table-modal.css +17 -13
  19. package/dist/field/themes/lexical-editor-theme.css +471 -467
  20. package/dist/field/ui/button.css +28 -24
  21. package/dist/field/ui/checkbox.css +43 -39
  22. package/dist/field/ui/color-picker.css +69 -65
  23. package/dist/field/ui/dialog.css +18 -14
  24. package/dist/field/ui/input.css +23 -19
  25. package/dist/field/ui/modal.css +66 -62
  26. package/dist/field/ui/placeholder.css +25 -21
  27. package/dist/field/ui/select.css +32 -28
  28. package/dist/field/ui/text-area.css +29 -25
  29. package/dist/richtext-field_module.css +21 -17
  30. package/package.json +6 -6
  31. package/src/field/content-editable.css +31 -17
  32. package/src/field/editor-component.css +56 -40
  33. package/src/field/editor.css +1248 -1232
  34. package/src/field/extensions/admonition/admonition-modal.css +32 -16
  35. package/src/field/extensions/admonition/admonition-node.css +105 -89
  36. package/src/field/extensions/admonition/icons/danger-icon.css +25 -9
  37. package/src/field/extensions/admonition/icons/note-icon.css +25 -9
  38. package/src/field/extensions/admonition/icons/tip-icon.css +25 -9
  39. package/src/field/extensions/admonition/icons/warning-icon.css +25 -9
  40. package/src/field/extensions/auto-embed/auto-embed-modal.css +25 -9
  41. package/src/field/extensions/floating-text-format/index.css +142 -126
  42. package/src/field/extensions/inline-image/inline-image-modal.css +144 -128
  43. package/src/field/extensions/inline-image/inline-image-node-component.css +258 -242
  44. package/src/field/extensions/layout/insert-layout-modal.css +28 -12
  45. package/src/field/extensions/link/floating-link-editor.css +129 -113
  46. package/src/field/extensions/link/link-target-fields.css +68 -52
  47. package/src/field/normalize/adapted-notice.css +5 -4
  48. package/src/field/plugins/table-plugin/table-modal.css +29 -13
  49. package/src/field/themes/lexical-editor-theme.css +508 -494
  50. package/src/field/ui/button.css +46 -30
  51. package/src/field/ui/checkbox.css +62 -46
  52. package/src/field/ui/color-picker.css +89 -73
  53. package/src/field/ui/dialog.css +30 -14
  54. package/src/field/ui/input.css +38 -22
  55. package/src/field/ui/modal.css +81 -65
  56. package/src/field/ui/placeholder.css +36 -20
  57. package/src/field/ui/select.css +46 -30
  58. package/src/field/ui/text-area.css +45 -29
  59. package/src/lexical-editor.tsx +2 -0
  60. 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
- .Placeholder__root {
11
- font-size: 15px;
12
- color: #999;
13
- overflow: hidden;
14
- position: absolute;
15
- text-overflow: ellipsis;
16
- top: 8px;
17
- left: 2px;
18
- right: 0;
19
- user-select: none;
20
- white-space: nowrap;
21
- display: inline-block;
22
- pointer-events: none;
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
- left: 22px;
27
- }
40
+ .Placeholder__with_draggable_blocks {
41
+ left: 22px;
42
+ }
28
43
 
29
- @media (max-width: 1025px) {
30
- .ContentEditable__root {
31
- left: 2px;
44
+ @media (max-width: 1025px) {
45
+ .ContentEditable__root {
46
+ left: 2px;
47
+ }
32
48
  }
33
49
  }
@@ -1,34 +1,50 @@
1
- select {
2
- appearance: none;
3
- -webkit-appearance: none;
4
- -moz-appearance: none;
5
- background-color: transparent;
6
- border: none;
7
- padding: 0 1em 0 0;
8
- margin: 0;
9
- font-family: inherit;
10
- font-size: inherit;
11
- cursor: inherit;
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
- z-index: 1;
15
- outline: none;
16
- }
13
+ @layer byline-components.primitives, byline-components.cms;
17
14
 
18
- :root {
19
- --select-border: #393939;
20
- --select-focus: #101484;
21
- --select-arrow: var(--select-border);
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
- min-width: 160px;
26
- max-width: 290px;
27
- border: 1px solid var(--select-border);
28
- border-radius: 0.25em;
29
- padding: 0.25em 0.5em;
30
- font-size: 1rem;
31
- cursor: pointer;
32
- line-height: 1.4;
33
- background: linear-gradient(to bottom, #ffffff 0%, #e5e5e5 100%);
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
- .TextArea__wrapper {
11
- display: flex;
12
- flex-direction: column;
13
- margin-bottom: 10px;
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
- color: #ccc;
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 #666;
42
- background-color: #1c1c1c;
43
- color: #eee;
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
  }
@@ -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
- .wrapper,
11
- :global(.byline-field-richtext) {
12
- display: flex;
13
- flex: 1 1 0%;
14
- height: 100%;
15
- /* Allow shrinking below content min-content so a wide (white-space:pre)
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
- min-width: 0;
19
- }
33
+ min-width: 0;
34
+ }
20
35
 
21
- .label-row,
22
- :global(.byline-field-richtext-label) {
23
- display: flex;
24
- align-items: center;
25
- margin-bottom: 0.25rem;
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
- display: flex;
31
- flex: 1 1 0%;
32
- flex-direction: column;
33
- gap: 0.25rem;
34
- /* Same rationale as .wrapper — keep the editor body from growing to the
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
- min-width: 0;
51
+ min-width: 0;
52
+ }
37
53
  }