@byline/richtext-lexical 6.10.1 → 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 (59) 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/richtext-field.module.css +38 -22
@@ -1,249 +1,265 @@
1
- .LexicalEditor__inline-image {
2
- cursor: default;
3
- display: inline-block;
4
- position: relative;
5
- z-index: 1;
6
- /* user-select: none; */
7
- }
8
-
9
- .LexicalEditor__inline-image img {
10
- max-width: 100%;
11
- cursor: default;
12
- }
13
-
14
- /*
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
+
15
+ @layer byline-components.cms {
16
+ .LexicalEditor__inline-image {
17
+ cursor: default;
18
+ display: inline-block;
19
+ position: relative;
20
+ z-index: 1;
21
+ /* user-select: none; */
22
+ }
23
+
24
+ .LexicalEditor__inline-image img {
25
+ max-width: 100%;
26
+ cursor: default;
27
+ }
28
+
29
+ /*
15
30
  * A linked image gets the pointer cursor, which is honest because
16
31
  * cmd/ctrl-click opens the target (see the CLICK_COMMAND handler in
17
32
  * inline-image-node-component.tsx). A plain click still selects the node,
18
33
  * so the hover hint is paired with a real action rather than promising
19
34
  * navigation the editor never performs.
20
35
  */
21
- .LexicalEditor__inline-image.has-link img {
22
- cursor: pointer;
23
- }
24
-
25
- /* Selection and dragging outrank the link hint. */
26
- .LexicalEditor__inline-image.has-link img.focused.draggable {
27
- cursor: grab;
28
- }
29
-
30
- .LexicalEditor__inline-image img.focused {
31
- outline: 2px solid rgb(60, 132, 244);
32
- /* user-select: none; */
33
- }
34
-
35
- .LexicalEditor__inline-image img.focused.draggable {
36
- cursor: grab;
37
- }
38
-
39
- .LexicalEditor__inline-image img.focused.draggable:active {
40
- cursor: grabbing;
41
- }
42
-
43
- .LexicalEditor__inline-image.position-full,
44
- .LexicalEditor__inline-image.position-default {
45
- width: 100%;
46
- margin: 1em 0 1em 0;
47
- }
48
-
49
- .LexicalEditor__inline-image.position-full img,
50
- .LexicalEditor__inline-image.position-default img {
51
- width: 100%;
52
- }
53
-
54
- .LexicalEditor__inline-image.position-left {
55
- float: left;
56
- width: 50%;
57
- margin: 0.75rem 1.5rem 0.45rem 0;
58
- }
59
-
60
- .LexicalEditor__inline-image.position-right {
61
- float: right;
62
- width: 50%;
63
- /* The illusion of a 0 right margin looks too far right, so set right to 0.45rem */
64
- margin: 0.75rem 0.45rem 0.45rem 1.5rem;
65
- }
66
-
67
- .LexicalEditor__inline-image .image-edit-button {
68
- display: block;
69
- position: absolute;
70
- top: 12px;
71
- right: 12px;
72
- padding: 1px 4px;
73
- margin: 0 auto;
74
- border: 1px solid rgba(255, 255, 255, 0.3);
75
- border-radius: 5px;
76
- background-color: rgba(0, 0, 0, 0.5);
77
- min-width: 50px;
78
- font-size: 0.95rem;
79
- color: #fff;
80
- cursor: pointer;
81
- user-select: none;
82
- }
83
-
84
- .LexicalEditor__inline-image .image-edit-button:hover {
85
- background-color: rgba(60, 132, 244, 0.5);
86
- }
87
-
88
- .LexicalEditor__inline-image .image-link-badge {
89
- display: flex;
90
- align-items: center;
91
- gap: 4px;
92
- position: absolute;
93
- top: 12px;
94
- left: 12px;
95
- max-width: calc(100% - 90px);
96
- padding: 1px 6px;
97
- border: 1px solid rgba(255, 255, 255, 0.3);
98
- border-radius: 5px;
99
- background-color: rgba(0, 0, 0, 0.5);
100
- font-size: 0.8rem;
101
- color: #fff;
102
- cursor: pointer;
103
- user-select: none;
104
- }
105
-
106
- .LexicalEditor__inline-image .image-link-badge:hover {
107
- background-color: rgba(60, 132, 244, 0.5);
108
- }
109
-
110
- .LexicalEditor__inline-image .image-link-badge__label {
111
- overflow: hidden;
112
- text-overflow: ellipsis;
113
- white-space: nowrap;
114
- }
115
-
116
- .LexicalEditor__inline-image .InlineImageNode__caption_container {
117
- display: block;
118
- position: relative;
119
- font-size: 0.95rem;
120
- background-color: #f4f4f4;
121
- min-width: 100%;
122
- color: #000;
123
- overflow: hidden;
124
- }
125
-
126
- .LexicalEditor__inline-image .InlineImageNode__caption_container .tree-view-output {
127
- margin: 0;
128
- border-radius: 0;
129
- }
130
-
131
- .LexicalEditor__inline-image .image-caption-button:hover {
132
- background-color: rgba(60, 132, 244, 0.5);
133
- }
134
-
135
- .LexicalEditor__inline-image .image-resizer {
136
- display: block;
137
- width: 7px;
138
- height: 7px;
139
- position: absolute;
140
- background-color: rgb(60, 132, 244);
141
- border: 1px solid #fff;
142
- }
143
-
144
- .LexicalEditor__inline-image .image-resizer.image-resizer-n {
145
- top: -6px;
146
- left: 48%;
147
- cursor: n-resize;
148
- }
149
-
150
- .LexicalEditor__inline-image .image-resizer.image-resizer-ne {
151
- top: -6px;
152
- right: -6px;
153
- cursor: ne-resize;
154
- }
155
-
156
- .LexicalEditor__inline-image .image-resizer.image-resizer-e {
157
- bottom: 48%;
158
- right: -6px;
159
- cursor: e-resize;
160
- }
161
-
162
- .LexicalEditor__inline-image .image-resizer.image-resizer-se {
163
- bottom: -2px;
164
- right: -6px;
165
- cursor: nwse-resize;
166
- }
167
-
168
- .LexicalEditor__inline-image .image-resizer.image-resizer-s {
169
- bottom: -2px;
170
- left: 48%;
171
- cursor: s-resize;
172
- }
173
-
174
- .LexicalEditor__inline-image .image-resizer.image-resizer-sw {
175
- bottom: -2px;
176
- left: -6px;
177
- cursor: sw-resize;
178
- }
179
-
180
- .LexicalEditor__inline-image .image-resizer.image-resizer-w {
181
- bottom: 48%;
182
- left: -6px;
183
- cursor: w-resize;
184
- }
185
-
186
- .LexicalEditor__inline-image .image-resizer.image-resizer-nw {
187
- top: -6px;
188
- left: -6px;
189
- cursor: nw-resize;
190
- }
191
-
192
- .InlineImageNode__container {
193
- display: block;
194
- }
195
-
196
- .InlineImageNode__container.focused {
197
- outline: 2px solid rgb(60, 132, 244);
198
- /* user-select: none; */
199
- }
200
-
201
- .InlineImageNode__contentEditable {
202
- min-height: 20px;
203
- border: 0px;
204
- resize: none;
205
- cursor: text;
206
- caret-color: rgb(5, 5, 5);
207
- display: block;
208
- position: relative;
209
- tab-size: 1;
210
- outline: 0px;
211
- padding: 10px;
212
- user-select: text;
213
- font-size: 14px;
214
- line-height: 1.4em;
215
- white-space: pre-wrap;
216
- word-break: break-word;
217
- }
218
-
219
- .InlineImageNode__contentEditable p {
220
- margin-bottom: 0.25em;
221
- }
222
-
223
- .InlineImageNode__placeholder {
224
- font-size: 12px;
225
- color: #888;
226
- overflow: hidden;
227
- position: absolute;
228
- text-overflow: ellipsis;
229
- top: 10px;
230
- left: 10px;
231
- right: unset;
232
- user-select: none;
233
- white-space: nowrap;
234
- display: inline-block;
235
- pointer-events: none;
236
- }
237
-
238
- .dark .InlineImageNode__contentEditable {
239
- color: #eeeeee;
240
- caret-color: auto;
241
- }
242
-
243
- .dark .LexicalEditor__inline-image .InlineImageNode__caption_container {
244
- background-color: #222222;
245
- }
246
-
247
- .dark .InlineImageNode__placeholder {
248
- color: #888;
36
+ .LexicalEditor__inline-image.has-link img {
37
+ cursor: pointer;
38
+ }
39
+
40
+ /* Selection and dragging outrank the link hint. */
41
+ .LexicalEditor__inline-image.has-link img.focused.draggable {
42
+ cursor: grab;
43
+ }
44
+
45
+ .LexicalEditor__inline-image img.focused {
46
+ outline: 2px solid rgb(60, 132, 244);
47
+ /* user-select: none; */
48
+ }
49
+
50
+ .LexicalEditor__inline-image img.focused.draggable {
51
+ cursor: grab;
52
+ }
53
+
54
+ .LexicalEditor__inline-image img.focused.draggable:active {
55
+ cursor: grabbing;
56
+ }
57
+
58
+ .LexicalEditor__inline-image.position-full,
59
+ .LexicalEditor__inline-image.position-default {
60
+ width: 100%;
61
+ margin: 1em 0 1em 0;
62
+ }
63
+
64
+ .LexicalEditor__inline-image.position-full img,
65
+ .LexicalEditor__inline-image.position-default img {
66
+ width: 100%;
67
+ }
68
+
69
+ .LexicalEditor__inline-image.position-left {
70
+ float: left;
71
+ width: 50%;
72
+ margin: 0.75rem 1.5rem 0.45rem 0;
73
+ }
74
+
75
+ .LexicalEditor__inline-image.position-right {
76
+ float: right;
77
+ width: 50%;
78
+ /* The illusion of a 0 right margin looks too far right, so set right to 0.45rem */
79
+ margin: 0.75rem 0.45rem 0.45rem 1.5rem;
80
+ }
81
+
82
+ .LexicalEditor__inline-image .image-edit-button {
83
+ display: block;
84
+ position: absolute;
85
+ top: 12px;
86
+ right: 12px;
87
+ padding: 1px 4px;
88
+ margin: 0 auto;
89
+ border: 1px solid rgba(255, 255, 255, 0.3);
90
+ border-radius: 5px;
91
+ background-color: rgba(0, 0, 0, 0.5);
92
+ min-width: 50px;
93
+ font-size: 0.95rem;
94
+ color: #fff;
95
+ cursor: pointer;
96
+ user-select: none;
97
+ }
98
+
99
+ .LexicalEditor__inline-image .image-edit-button:hover {
100
+ background-color: rgba(60, 132, 244, 0.5);
101
+ }
102
+
103
+ .LexicalEditor__inline-image .image-link-badge {
104
+ display: flex;
105
+ align-items: center;
106
+ gap: 4px;
107
+ position: absolute;
108
+ top: 12px;
109
+ left: 12px;
110
+ max-width: calc(100% - 90px);
111
+ padding: 1px 6px;
112
+ border: 1px solid rgba(255, 255, 255, 0.3);
113
+ border-radius: 5px;
114
+ background-color: rgba(0, 0, 0, 0.5);
115
+ font-size: 0.8rem;
116
+ color: #fff;
117
+ cursor: pointer;
118
+ user-select: none;
119
+ }
120
+
121
+ .LexicalEditor__inline-image .image-link-badge:hover {
122
+ background-color: rgba(60, 132, 244, 0.5);
123
+ }
124
+
125
+ .LexicalEditor__inline-image .image-link-badge__label {
126
+ overflow: hidden;
127
+ text-overflow: ellipsis;
128
+ white-space: nowrap;
129
+ }
130
+
131
+ .LexicalEditor__inline-image .InlineImageNode__caption_container {
132
+ display: block;
133
+ position: relative;
134
+ font-size: 0.95rem;
135
+ background-color: #f4f4f4;
136
+ min-width: 100%;
137
+ color: #000;
138
+ overflow: hidden;
139
+ }
140
+
141
+ .LexicalEditor__inline-image .InlineImageNode__caption_container .tree-view-output {
142
+ margin: 0;
143
+ border-radius: 0;
144
+ }
145
+
146
+ .LexicalEditor__inline-image .image-caption-button:hover {
147
+ background-color: rgba(60, 132, 244, 0.5);
148
+ }
149
+
150
+ .LexicalEditor__inline-image .image-resizer {
151
+ display: block;
152
+ width: 7px;
153
+ height: 7px;
154
+ position: absolute;
155
+ background-color: rgb(60, 132, 244);
156
+ border: 1px solid #fff;
157
+ }
158
+
159
+ .LexicalEditor__inline-image .image-resizer.image-resizer-n {
160
+ top: -6px;
161
+ left: 48%;
162
+ cursor: n-resize;
163
+ }
164
+
165
+ .LexicalEditor__inline-image .image-resizer.image-resizer-ne {
166
+ top: -6px;
167
+ right: -6px;
168
+ cursor: ne-resize;
169
+ }
170
+
171
+ .LexicalEditor__inline-image .image-resizer.image-resizer-e {
172
+ bottom: 48%;
173
+ right: -6px;
174
+ cursor: e-resize;
175
+ }
176
+
177
+ .LexicalEditor__inline-image .image-resizer.image-resizer-se {
178
+ bottom: -2px;
179
+ right: -6px;
180
+ cursor: nwse-resize;
181
+ }
182
+
183
+ .LexicalEditor__inline-image .image-resizer.image-resizer-s {
184
+ bottom: -2px;
185
+ left: 48%;
186
+ cursor: s-resize;
187
+ }
188
+
189
+ .LexicalEditor__inline-image .image-resizer.image-resizer-sw {
190
+ bottom: -2px;
191
+ left: -6px;
192
+ cursor: sw-resize;
193
+ }
194
+
195
+ .LexicalEditor__inline-image .image-resizer.image-resizer-w {
196
+ bottom: 48%;
197
+ left: -6px;
198
+ cursor: w-resize;
199
+ }
200
+
201
+ .LexicalEditor__inline-image .image-resizer.image-resizer-nw {
202
+ top: -6px;
203
+ left: -6px;
204
+ cursor: nw-resize;
205
+ }
206
+
207
+ .InlineImageNode__container {
208
+ display: block;
209
+ }
210
+
211
+ .InlineImageNode__container.focused {
212
+ outline: 2px solid rgb(60, 132, 244);
213
+ /* user-select: none; */
214
+ }
215
+
216
+ .InlineImageNode__contentEditable {
217
+ min-height: 20px;
218
+ border: 0px;
219
+ resize: none;
220
+ cursor: text;
221
+ caret-color: rgb(5, 5, 5);
222
+ display: block;
223
+ position: relative;
224
+ tab-size: 1;
225
+ outline: 0px;
226
+ padding: 10px;
227
+ user-select: text;
228
+ font-size: 14px;
229
+ line-height: 1.4em;
230
+ white-space: pre-wrap;
231
+ word-break: break-word;
232
+ }
233
+
234
+ .InlineImageNode__contentEditable p {
235
+ margin-bottom: 0.25em;
236
+ }
237
+
238
+ .InlineImageNode__placeholder {
239
+ font-size: 12px;
240
+ color: #888;
241
+ overflow: hidden;
242
+ position: absolute;
243
+ text-overflow: ellipsis;
244
+ top: 10px;
245
+ left: 10px;
246
+ right: unset;
247
+ user-select: none;
248
+ white-space: nowrap;
249
+ display: inline-block;
250
+ pointer-events: none;
251
+ }
252
+
253
+ .dark .InlineImageNode__contentEditable {
254
+ color: #eeeeee;
255
+ caret-color: auto;
256
+ }
257
+
258
+ .dark .LexicalEditor__inline-image .InlineImageNode__caption_container {
259
+ background-color: #222222;
260
+ }
261
+
262
+ .dark .InlineImageNode__placeholder {
263
+ color: #888;
264
+ }
249
265
  }
@@ -1,19 +1,35 @@
1
- .insert-layout-modal-container {
2
- min-width: 340px;
3
- max-width: 600px;
4
- }
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;
5
12
 
6
- .insert-layout-modal-select {
7
- margin: 2rem 0 0;
8
- }
13
+ @layer byline-components.primitives, byline-components.cms;
14
+
15
+ @layer byline-components.cms {
16
+ .insert-layout-modal-container {
17
+ min-width: 340px;
18
+ max-width: 600px;
19
+ }
9
20
 
10
- @media screen and (min-width: 640px) {
11
21
  .insert-layout-modal-select {
12
- margin: 1rem 0 0.5rem;
13
- width: 100%;
22
+ margin: 2rem 0 0;
14
23
  }
15
24
 
16
- .insert-layout-modal-actions {
17
- margin: 0;
25
+ @media screen and (min-width: 640px) {
26
+ .insert-layout-modal-select {
27
+ margin: 1rem 0 0.5rem;
28
+ width: 100%;
29
+ }
30
+
31
+ .insert-layout-modal-actions {
32
+ margin: 0;
33
+ }
18
34
  }
19
35
  }