@marianmeres/stuic 3.136.0 → 3.137.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.
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
} from "../../actions/validate.svelte.js";
|
|
7
7
|
import type { THC } from "../Thc/Thc.svelte";
|
|
8
8
|
import type { InputWrapClassProps } from "../Input/types.js";
|
|
9
|
+
import { DEFAULT_MOBILE_TOOLBAR } from "../MarkdownEditor/index.js";
|
|
9
10
|
import type {
|
|
10
11
|
MarkdownEditorMode,
|
|
11
12
|
ToolbarItem,
|
|
@@ -18,14 +19,18 @@
|
|
|
18
19
|
export type CommentInputMode = MarkdownEditorMode;
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
|
-
*
|
|
22
|
-
* (
|
|
22
|
+
* Default toolbar for the comment box — mirrors the reduced mobile toolbar
|
|
23
|
+
* ({@link DEFAULT_MOBILE_TOOLBAR}) so the desktop and touch experiences stay
|
|
24
|
+
* consistent. Pass your own `toolbar` array to customize.
|
|
23
25
|
*/
|
|
24
26
|
export const DEFAULT_COMMENT_TOOLBAR: ToolbarItem[] = [
|
|
25
27
|
"bold",
|
|
26
28
|
"italic",
|
|
29
|
+
"|",
|
|
30
|
+
"bulletList",
|
|
31
|
+
"orderedList",
|
|
32
|
+
"|",
|
|
27
33
|
"link",
|
|
28
|
-
"codeBlock",
|
|
29
34
|
];
|
|
30
35
|
|
|
31
36
|
export interface Props extends InputWrapClassProps {
|
|
@@ -9,8 +9,9 @@ type SnippetWithId = Snippet<[{
|
|
|
9
9
|
/** Active editing surface of the comment box (mirrors `MarkdownEditor`). */
|
|
10
10
|
export type CommentInputMode = MarkdownEditorMode;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
* (
|
|
12
|
+
* Default toolbar for the comment box — mirrors the reduced mobile toolbar
|
|
13
|
+
* ({@link DEFAULT_MOBILE_TOOLBAR}) so the desktop and touch experiences stay
|
|
14
|
+
* consistent. Pass your own `toolbar` array to customize.
|
|
14
15
|
*/
|
|
15
16
|
export declare const DEFAULT_COMMENT_TOOLBAR: ToolbarItem[];
|
|
16
17
|
export interface Props extends InputWrapClassProps {
|
|
@@ -51,11 +51,11 @@ console error explains why.
|
|
|
51
51
|
|
|
52
52
|
## Toolbar
|
|
53
53
|
|
|
54
|
-
`toolbar` accepts `true` (the
|
|
54
|
+
`toolbar` accepts `true` (the default), `false` (hidden), or an ordered
|
|
55
55
|
array of items (`"|"` for a separator):
|
|
56
56
|
|
|
57
57
|
```svelte
|
|
58
|
-
<!--
|
|
58
|
+
<!-- Default: ["bold", "italic", "|", "bulletList", "orderedList", "|", "link"] -->
|
|
59
59
|
<CommentInput bind:value onSubmit={post} />
|
|
60
60
|
|
|
61
61
|
<!-- Custom set -->
|