@sveltia/ui 0.30.3 → 0.31.1
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/components/text-editor/constants.js +6 -1
- package/dist/components/text-editor/core.js +2 -1
- package/dist/components/text-editor/lexical-root.svelte +3 -0
- package/dist/components/text-editor/toolbar/toolbar-wrapper.svelte +3 -2
- package/dist/locales/en.d.ts +1 -0
- package/dist/locales/en.js +1 -0
- package/dist/locales/ja.d.ts +1 -0
- package/dist/locales/ja.js +1 -0
- package/dist/typedefs.d.ts +1 -1
- package/dist/typedefs.js +1 -1
- package/package.json +1 -1
|
@@ -17,6 +17,11 @@ export const AVAILABLE_BUTTONS = {
|
|
|
17
17
|
icon: 'format_italic',
|
|
18
18
|
inline: true,
|
|
19
19
|
},
|
|
20
|
+
strikethrough: {
|
|
21
|
+
labelKey: 'strikethrough',
|
|
22
|
+
icon: 'strikethrough_s',
|
|
23
|
+
inline: true,
|
|
24
|
+
},
|
|
20
25
|
code: {
|
|
21
26
|
labelKey: 'code',
|
|
22
27
|
icon: 'code',
|
|
@@ -87,7 +92,7 @@ export const AVAILABLE_BUTTONS = {
|
|
|
87
92
|
/**
|
|
88
93
|
* @type {TextEditorFormatType[]}
|
|
89
94
|
*/
|
|
90
|
-
export const TEXT_FORMAT_BUTTON_TYPES = ['bold', 'italic', 'code'];
|
|
95
|
+
export const TEXT_FORMAT_BUTTON_TYPES = ['bold', 'italic', 'strikethrough', 'code'];
|
|
91
96
|
|
|
92
97
|
/**
|
|
93
98
|
* @type {TextEditorInlineType[]}
|
|
@@ -89,10 +89,11 @@ const editorConfig = {
|
|
|
89
89
|
theme: {
|
|
90
90
|
text: {
|
|
91
91
|
/**
|
|
92
|
-
* Enable bold+italic styling.
|
|
92
|
+
* Enable bold+italic and strikethrough styling.
|
|
93
93
|
* @see https://github.com/facebook/lexical/discussions/4381
|
|
94
94
|
*/
|
|
95
95
|
italic: 'italic',
|
|
96
|
+
strikethrough: 'strikethrough',
|
|
96
97
|
},
|
|
97
98
|
list: {
|
|
98
99
|
nested: {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
top: 0;
|
|
43
43
|
z-index: 1;
|
|
44
44
|
display: flex;
|
|
45
|
-
gap:
|
|
45
|
+
gap: 4px;
|
|
46
46
|
border-width: 1px 1px 0;
|
|
47
47
|
border-style: solid;
|
|
48
48
|
border-color: var(--sui-textbox-border-color);
|
|
@@ -50,7 +50,8 @@
|
|
|
50
50
|
border-start-end-radius: var(--sui-textbox-border-radius);
|
|
51
51
|
border-end-start-radius: 0;
|
|
52
52
|
border-end-end-radius: 0;
|
|
53
|
-
padding:
|
|
53
|
+
padding: 0 4px;
|
|
54
|
+
height: 40px;
|
|
54
55
|
background-color: var(--sui-tertiary-background-color);
|
|
55
56
|
}
|
|
56
57
|
@media (width < 768px) {
|
package/dist/locales/en.d.ts
CHANGED
package/dist/locales/en.js
CHANGED
package/dist/locales/ja.d.ts
CHANGED
package/dist/locales/ja.js
CHANGED
package/dist/typedefs.d.ts
CHANGED
|
@@ -587,7 +587,7 @@ export type InputEventHandlers = {
|
|
|
587
587
|
export type PopupPosition = ("top-left" | "top-right" | "right-top" | "right-bottom" | "bottom-left" | "bottom-right" | "left-top" | "left-bottom");
|
|
588
588
|
export type ToastPosition = "auto" | "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
589
589
|
export type TextEditorBlockType = "paragraph" | "heading-1" | "heading-2" | "heading-3" | "heading-4" | "heading-5" | "heading-6" | "bulleted-list" | "numbered-list" | "blockquote" | "code-block";
|
|
590
|
-
export type TextEditorFormatType = "bold" | "italic" | "code";
|
|
590
|
+
export type TextEditorFormatType = "bold" | "italic" | "strikethrough" | "code";
|
|
591
591
|
export type TextEditorInlineType = TextEditorFormatType | "link";
|
|
592
592
|
export type TextEditorMode = "rich-text" | "plain-text";
|
|
593
593
|
export type TextEditorComponent = {
|
package/dist/typedefs.js
CHANGED