@dxos/react-ui-editor 0.3.10-main.cbe7692 → 0.3.10-main.dcfebef
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/lib/browser/index.mjs +123 -689
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/components/TextEditor/MarkdownEditor.stories.d.ts +1 -19
- package/dist/types/src/components/TextEditor/MarkdownEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TextEditor/TextEditor.d.ts +1 -2
- package/dist/types/src/components/TextEditor/TextEditor.d.ts.map +1 -1
- package/dist/types/src/components/TextEditor/extensions/autocomplete.d.ts.map +1 -1
- package/dist/types/src/components/TextEditor/extensions/basic.d.ts +1 -2
- package/dist/types/src/components/TextEditor/extensions/basic.d.ts.map +1 -1
- package/dist/types/src/components/TextEditor/extensions/demo.d.ts +1 -2
- package/dist/types/src/components/TextEditor/extensions/demo.d.ts.map +1 -1
- package/dist/types/src/components/TextEditor/extensions/index.d.ts +0 -4
- package/dist/types/src/components/TextEditor/extensions/index.d.ts.map +1 -1
- package/dist/types/src/components/TextEditor/extensions/link.d.ts.map +1 -1
- package/dist/types/src/components/TextEditor/extensions/listener.d.ts.map +1 -1
- package/dist/types/src/components/TextEditor/extensions/markdown/bundle.d.ts +1 -2
- package/dist/types/src/components/TextEditor/extensions/markdown/bundle.d.ts.map +1 -1
- package/dist/types/src/components/TextEditor/extensions/markdown/highlight.d.ts +2 -6
- package/dist/types/src/components/TextEditor/extensions/markdown/highlight.d.ts.map +1 -1
- package/dist/types/src/components/TextEditor/extensions/tasklist.d.ts +1 -2
- package/dist/types/src/components/TextEditor/extensions/tasklist.d.ts.map +1 -1
- package/dist/types/src/components/TextEditor/themes/default.d.ts +0 -5
- package/dist/types/src/components/TextEditor/themes/default.d.ts.map +1 -1
- package/dist/types/src/{hooks/yjs → components/TextEditor}/yjs.stories.d.ts +1 -1
- package/dist/types/src/components/TextEditor/yjs.stories.d.ts.map +1 -0
- package/dist/types/src/styles/markdown.d.ts +2 -3
- package/dist/types/src/styles/markdown.d.ts.map +1 -1
- package/package.json +20 -20
- package/src/components/TextEditor/MarkdownEditor.stories.tsx +25 -98
- package/src/components/TextEditor/TextEditor.tsx +7 -16
- package/src/components/TextEditor/extensions/autocomplete.ts +20 -5
- package/src/components/TextEditor/extensions/basic.ts +1 -2
- package/src/components/TextEditor/extensions/demo.ts +1 -4
- package/src/components/TextEditor/extensions/index.ts +0 -4
- package/src/components/TextEditor/extensions/link.ts +23 -15
- package/src/components/TextEditor/extensions/listener.ts +3 -3
- package/src/components/TextEditor/extensions/markdown/bundle.ts +5 -10
- package/src/components/TextEditor/extensions/markdown/highlight.ts +104 -118
- package/src/components/TextEditor/extensions/tasklist.ts +20 -34
- package/src/components/TextEditor/themes/default.ts +2 -54
- package/src/{hooks/yjs → components/TextEditor}/yjs.stories.tsx +1 -1
- package/src/styles/markdown.ts +8 -14
- package/dist/types/src/components/TextEditor/extensions/blast.d.ts +0 -25
- package/dist/types/src/components/TextEditor/extensions/blast.d.ts.map +0 -1
- package/dist/types/src/components/TextEditor/extensions/image.d.ts +0 -4
- package/dist/types/src/components/TextEditor/extensions/image.d.ts.map +0 -1
- package/dist/types/src/components/TextEditor/extensions/mention.d.ts +0 -6
- package/dist/types/src/components/TextEditor/extensions/mention.d.ts.map +0 -1
- package/dist/types/src/components/TextEditor/extensions/table.d.ts +0 -8
- package/dist/types/src/components/TextEditor/extensions/table.d.ts.map +0 -1
- package/dist/types/src/hooks/yjs/yjs.stories.d.ts.map +0 -1
- package/src/components/TextEditor/extensions/blast.ts +0 -375
- package/src/components/TextEditor/extensions/image.ts +0 -68
- package/src/components/TextEditor/extensions/mention.ts +0 -31
- package/src/components/TextEditor/extensions/table.ts +0 -123
|
@@ -8,8 +8,6 @@ import { tags, styleTags, Tag } from '@lezer/highlight';
|
|
|
8
8
|
import { type MarkdownConfig } from '@lezer/markdown';
|
|
9
9
|
import get from 'lodash.get';
|
|
10
10
|
|
|
11
|
-
import { mx } from '@dxos/react-ui-theme';
|
|
12
|
-
|
|
13
11
|
import {
|
|
14
12
|
blockquote,
|
|
15
13
|
bold,
|
|
@@ -24,11 +22,6 @@ import {
|
|
|
24
22
|
tokens,
|
|
25
23
|
} from '../../../../styles';
|
|
26
24
|
|
|
27
|
-
// TODO(burdon): Style table in monospace.
|
|
28
|
-
// https://discuss.codemirror.net/t/markdown-table-highlighting/658
|
|
29
|
-
|
|
30
|
-
// TODO(burdon): Readonly: use remark rather than hiding markup chars (which cursor can still move into).
|
|
31
|
-
|
|
32
25
|
/**
|
|
33
26
|
* Custom tags defined and processed by the GFM lezer extension.
|
|
34
27
|
* https://github.com/lezer-parser/markdown
|
|
@@ -57,125 +50,118 @@ export const markdownTagsExtension: MarkdownConfig = {
|
|
|
57
50
|
* Styling based on `lezer` parser tags.
|
|
58
51
|
* https://codemirror.net/examples/styling
|
|
59
52
|
* https://github.com/lezer-parser/highlight
|
|
60
|
-
* https://lezer.codemirror.net/docs/ref/#highlight
|
|
61
|
-
*
|
|
62
|
-
* Examples:
|
|
63
|
-
* - https://github.com/codemirror/language/blob/main/src/highlight.ts#L194
|
|
64
|
-
* - https://github.com/codemirror/theme-one-dark/blob/main/src/one-dark.ts#L115
|
|
53
|
+
* https://lezer.codemirror.net/docs/ref/#highlight (list of tags)
|
|
65
54
|
*/
|
|
66
|
-
export const markdownHighlightStyle = (
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
// Markdown marks.
|
|
109
|
-
{
|
|
110
|
-
tag: [
|
|
111
|
-
tags.meta,
|
|
112
|
-
tags.processingInstruction,
|
|
113
|
-
markdownTags.LinkLabel,
|
|
114
|
-
markdownTags.LinkReference,
|
|
115
|
-
markdownTags.ListMark,
|
|
116
|
-
],
|
|
117
|
-
class: mark,
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
// Markdown marks.
|
|
121
|
-
{
|
|
122
|
-
tag: [markdownTags.CodeMark, markdownTags.HeaderMark, markdownTags.QuoteMark, markdownTags.EmphasisMark],
|
|
123
|
-
class: readonly ? 'hidden' : mark,
|
|
124
|
-
},
|
|
55
|
+
export const markdownHighlightStyle = HighlightStyle.define(
|
|
56
|
+
[
|
|
57
|
+
{
|
|
58
|
+
tag: [
|
|
59
|
+
tags.keyword,
|
|
60
|
+
tags.name,
|
|
61
|
+
tags.deleted,
|
|
62
|
+
tags.character,
|
|
63
|
+
tags.propertyName,
|
|
64
|
+
tags.macroName,
|
|
65
|
+
tags.color,
|
|
66
|
+
tags.constant(tags.name),
|
|
67
|
+
tags.standard(tags.name),
|
|
68
|
+
tags.definition(tags.name),
|
|
69
|
+
tags.separator,
|
|
70
|
+
tags.typeName,
|
|
71
|
+
tags.className,
|
|
72
|
+
tags.number,
|
|
73
|
+
tags.changed,
|
|
74
|
+
tags.annotation,
|
|
75
|
+
tags.modifier,
|
|
76
|
+
tags.self,
|
|
77
|
+
tags.namespace,
|
|
78
|
+
tags.operator,
|
|
79
|
+
tags.operatorKeyword,
|
|
80
|
+
tags.escape,
|
|
81
|
+
tags.regexp,
|
|
82
|
+
tags.special(tags.string),
|
|
83
|
+
tags.meta,
|
|
84
|
+
tags.comment,
|
|
85
|
+
tags.atom,
|
|
86
|
+
tags.bool,
|
|
87
|
+
tags.special(tags.variableName),
|
|
88
|
+
tags.processingInstruction,
|
|
89
|
+
tags.string,
|
|
90
|
+
tags.inserted,
|
|
91
|
+
tags.invalid,
|
|
92
|
+
],
|
|
93
|
+
color: 'inherit !important',
|
|
94
|
+
},
|
|
125
95
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
96
|
+
// Markdown marks.
|
|
97
|
+
{
|
|
98
|
+
tag: [
|
|
99
|
+
tags.meta,
|
|
100
|
+
tags.processingInstruction,
|
|
101
|
+
markdownTags.CodeMark,
|
|
102
|
+
markdownTags.EmphasisMark,
|
|
103
|
+
markdownTags.HeaderMark,
|
|
104
|
+
markdownTags.LinkLabel,
|
|
105
|
+
markdownTags.LinkReference,
|
|
106
|
+
markdownTags.ListMark,
|
|
107
|
+
markdownTags.QuoteMark,
|
|
108
|
+
],
|
|
109
|
+
class: mark,
|
|
110
|
+
},
|
|
131
111
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
112
|
+
// Headings.
|
|
113
|
+
{ tag: tags.heading1, class: heading[1] },
|
|
114
|
+
{ tag: tags.heading2, class: heading[2] },
|
|
115
|
+
{ tag: tags.heading3, class: heading[3] },
|
|
116
|
+
{ tag: tags.heading4, class: heading[4] },
|
|
117
|
+
{ tag: tags.heading5, class: heading[5] },
|
|
118
|
+
{ tag: tags.heading6, class: heading[6] },
|
|
139
119
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
120
|
+
// Emphasis.
|
|
121
|
+
{ tag: tags.emphasis, class: italic },
|
|
122
|
+
{ tag: tags.strong, class: bold },
|
|
123
|
+
{ tag: tags.strikethrough, class: strikethrough },
|
|
144
124
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
125
|
+
// Naked URLs.
|
|
126
|
+
{
|
|
127
|
+
tag: [markdownTags.URL],
|
|
128
|
+
class: inlineUrl,
|
|
129
|
+
},
|
|
150
130
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
{
|
|
157
|
-
tag: [markdownTags.CodeText, markdownTags.InlineCode],
|
|
158
|
-
class: code,
|
|
159
|
-
},
|
|
131
|
+
// E.g., code block language (after ```).
|
|
132
|
+
{
|
|
133
|
+
tag: [tags.function(tags.variableName), tags.labelName],
|
|
134
|
+
class: codeMark,
|
|
135
|
+
},
|
|
160
136
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
137
|
+
// NOTE: The `markdown` extension configures extensions for `lezer` to parse markdown tokens (incl. below).
|
|
138
|
+
// However, since `codeLanguages` is also defined, the `lezer` will not parse fenced code blocks,
|
|
139
|
+
// when a language is specified. In this case, the syntax highlighting extensions will colorize
|
|
140
|
+
// the code, but all other CSS properties will be inherited.
|
|
141
|
+
// IMPORTANT: Therefore, the fenced code block will use the base editor font.
|
|
142
|
+
{
|
|
143
|
+
tag: [markdownTags.CodeText, markdownTags.InlineCode],
|
|
144
|
+
class: code,
|
|
145
|
+
},
|
|
165
146
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
147
|
+
{
|
|
148
|
+
tag: [markdownTags.QuoteMark],
|
|
149
|
+
class: blockquote,
|
|
150
|
+
},
|
|
170
151
|
|
|
171
|
-
// Main content, paragraphs, etc.
|
|
172
|
-
// {
|
|
173
|
-
// tag: [tags.content],
|
|
174
|
-
// fontFamily: get(tokens, 'fontFamily.body', []).join(','),
|
|
175
|
-
// },
|
|
176
|
-
],
|
|
177
152
|
{
|
|
178
|
-
|
|
179
|
-
|
|
153
|
+
tag: [markdownTags.HorizontalRule],
|
|
154
|
+
class: horizontalRule,
|
|
180
155
|
},
|
|
181
|
-
|
|
156
|
+
|
|
157
|
+
// Main content, paragraphs, etc.
|
|
158
|
+
// {
|
|
159
|
+
// tag: [tags.content],
|
|
160
|
+
// fontFamily: get(tokens, 'fontFamily.body', []).join(','),
|
|
161
|
+
// },
|
|
162
|
+
],
|
|
163
|
+
{
|
|
164
|
+
scope: markdownLanguage,
|
|
165
|
+
all: { fontFamily: get(tokens, 'fontFamily.body', []).join(',') },
|
|
166
|
+
},
|
|
167
|
+
);
|
|
@@ -17,7 +17,7 @@ class CheckboxWidget extends WidgetType {
|
|
|
17
17
|
private readonly _pos: number,
|
|
18
18
|
private _checked: boolean,
|
|
19
19
|
private readonly _indent: number,
|
|
20
|
-
private readonly _onCheck
|
|
20
|
+
private readonly _onCheck: (check: boolean) => void,
|
|
21
21
|
) {
|
|
22
22
|
super();
|
|
23
23
|
}
|
|
@@ -35,15 +35,10 @@ class CheckboxWidget extends WidgetType {
|
|
|
35
35
|
const input = wrap.appendChild(document.createElement('input'));
|
|
36
36
|
input.type = 'checkbox';
|
|
37
37
|
input.checked = this._checked;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
input.onchange = (event: Event) => {
|
|
43
|
-
this._onCheck?.((event.target as any).checked);
|
|
44
|
-
return true;
|
|
45
|
-
};
|
|
46
|
-
}
|
|
38
|
+
input.onchange = (event: Event) => {
|
|
39
|
+
this._onCheck((event.target as any).checked);
|
|
40
|
+
return true;
|
|
41
|
+
};
|
|
47
42
|
|
|
48
43
|
return wrap;
|
|
49
44
|
}
|
|
@@ -61,9 +56,7 @@ const styles = EditorView.baseTheme({
|
|
|
61
56
|
},
|
|
62
57
|
});
|
|
63
58
|
|
|
64
|
-
export
|
|
65
|
-
|
|
66
|
-
export const tasklist = (options: TasklistOptions = {}) => {
|
|
59
|
+
export const tasklist = () => {
|
|
67
60
|
// TODO(burdon): Matcher isn't as precise as syntax tree.
|
|
68
61
|
// Allows for indents to be greater than AST would allow.
|
|
69
62
|
const taskMatcher = new MatchDecorator({
|
|
@@ -72,27 +65,20 @@ export const tasklist = (options: TasklistOptions = {}) => {
|
|
|
72
65
|
const indent = Math.floor(match[1].length / 2);
|
|
73
66
|
const checked = match[2] === 'x' || match[2] === 'X';
|
|
74
67
|
return Decoration.replace({
|
|
75
|
-
widget: new CheckboxWidget(
|
|
76
|
-
pos
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
// TODO(burdon): Restore cursor position? More useful to move to end of line (can indent).
|
|
90
|
-
selection: {
|
|
91
|
-
anchor: idx + 3,
|
|
92
|
-
},
|
|
93
|
-
});
|
|
94
|
-
},
|
|
95
|
-
),
|
|
68
|
+
widget: new CheckboxWidget(pos, checked, indent, (checked) => {
|
|
69
|
+
const idx = pos + match[0].indexOf('[') + 1;
|
|
70
|
+
view.dispatch({
|
|
71
|
+
changes: {
|
|
72
|
+
from: idx,
|
|
73
|
+
to: idx + 1,
|
|
74
|
+
insert: checked ? 'x' : ' ',
|
|
75
|
+
},
|
|
76
|
+
// TODO(burdon): Restore cursor position? More useful to move to end of line (can indent).
|
|
77
|
+
selection: {
|
|
78
|
+
anchor: idx + 3,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
}),
|
|
96
82
|
});
|
|
97
83
|
},
|
|
98
84
|
});
|
|
@@ -10,11 +10,6 @@ import { tokens } from '../../../styles';
|
|
|
10
10
|
/**
|
|
11
11
|
* Minimal styles.
|
|
12
12
|
* https://codemirror.net/examples/styling
|
|
13
|
-
*
|
|
14
|
-
* Examples:
|
|
15
|
-
* - https://github.com/codemirror/view/blob/main/src/theme.ts
|
|
16
|
-
* - https://github.com/codemirror/theme-one-dark/blob/main/src/one-dark.ts
|
|
17
|
-
*
|
|
18
13
|
* NOTE: Use one of '&', '&light', and '&dark' prefix to scope instance.
|
|
19
14
|
* NOTE: `light` and `dark` selectors are preprocessed by CodeMirror and can only be in the base theme.
|
|
20
15
|
*/
|
|
@@ -141,55 +136,8 @@ export const defaultTheme: {
|
|
|
141
136
|
'& .cm-tooltip': {
|
|
142
137
|
border: 'none',
|
|
143
138
|
},
|
|
144
|
-
'& .cm-tooltip-below': {},
|
|
145
|
-
|
|
146
|
-
//
|
|
147
|
-
// autocomplete
|
|
148
|
-
//
|
|
149
|
-
'& .cm-tooltip-autocomplete': {
|
|
150
|
-
marginTop: '4px',
|
|
151
|
-
marginLeft: '-3px',
|
|
152
|
-
},
|
|
153
|
-
'& .cm-tooltip-autocomplete ul li': {},
|
|
154
|
-
'& .cm-tooltip-autocomplete ul li[aria-selected]': {},
|
|
155
|
-
'& .cm-completionIcon': {
|
|
156
|
-
display: 'none',
|
|
157
|
-
},
|
|
158
|
-
'& .cm-completionLabel': {
|
|
159
|
-
fontFamily: get(tokens, 'fontFamily.body', []).join(','),
|
|
160
|
-
},
|
|
161
|
-
'& .cm-completionMatchedText': {
|
|
162
|
-
textDecoration: 'none',
|
|
163
|
-
},
|
|
164
|
-
|
|
165
|
-
//
|
|
166
|
-
// widgets
|
|
167
|
-
//
|
|
168
|
-
'& .cm-widgetBuffer': {
|
|
169
|
-
display: 'none',
|
|
170
|
-
height: 0,
|
|
171
|
-
},
|
|
172
|
-
|
|
173
|
-
//
|
|
174
|
-
// table
|
|
175
|
-
//
|
|
176
|
-
'& .cm-table-head': {
|
|
177
|
-
padding: '2px 16px 2px 0px',
|
|
178
|
-
borderBottom: `1px solid ${get(tokens, 'extend.colors.neutral.500')}`,
|
|
179
|
-
fontWeight: 100,
|
|
180
|
-
textAlign: 'left',
|
|
181
|
-
color: get(tokens, 'extend.colors.neutral.500'),
|
|
182
|
-
},
|
|
183
|
-
'& .cm-table-cell': {
|
|
184
|
-
padding: '2px 16px 2px 0px',
|
|
185
|
-
},
|
|
186
|
-
|
|
187
|
-
//
|
|
188
|
-
// image
|
|
189
|
-
//
|
|
190
|
-
'& .cm-image': {
|
|
191
|
-
margin: '0.5rem 0',
|
|
192
|
-
},
|
|
139
|
+
// '& .cm-tooltip-below': {},
|
|
140
|
+
// '& .cm-tooltip-autocomplete': {},
|
|
193
141
|
|
|
194
142
|
//
|
|
195
143
|
// font size
|
|
@@ -12,7 +12,7 @@ import { ClientRepeater, textGenerator, useDataGenerator } from '@dxos/react-cli
|
|
|
12
12
|
import { useId, Input } from '@dxos/react-ui';
|
|
13
13
|
import { withTheme } from '@dxos/storybook-utils';
|
|
14
14
|
|
|
15
|
-
import { MarkdownEditor } from '
|
|
15
|
+
import { MarkdownEditor } from './TextEditor';
|
|
16
16
|
import { Replicator, useYjsModel } from '../../testing';
|
|
17
17
|
|
|
18
18
|
export default {
|
package/src/styles/markdown.ts
CHANGED
|
@@ -7,18 +7,13 @@ import { mx } from '@dxos/react-ui-theme';
|
|
|
7
7
|
export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
8
8
|
|
|
9
9
|
// https://tailwindcss.com/docs/font-weight
|
|
10
|
-
export const
|
|
11
|
-
1:
|
|
12
|
-
2:
|
|
13
|
-
3:
|
|
14
|
-
4:
|
|
15
|
-
5:
|
|
16
|
-
6:
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const heading = (level: HeadingLevel, readonly?: boolean) => {
|
|
20
|
-
const [style, offset] = headings[level];
|
|
21
|
-
return mx(style, readonly && offset);
|
|
10
|
+
export const heading: Record<HeadingLevel, string> = {
|
|
11
|
+
1: 'mbs-4 mbe-2 font-medium text-inherit no-underline text-4xl',
|
|
12
|
+
2: 'mbs-4 mbe-2 font-medium text-inherit no-underline text-3xl',
|
|
13
|
+
3: 'mbs-4 mbe-2 font-medium text-inherit no-underline text-2xl',
|
|
14
|
+
4: 'mbs-4 mbe-2 font-medium text-inherit no-underline text-xl',
|
|
15
|
+
5: 'mbs-4 mbe-2 font-medium text-inherit no-underline text-lg',
|
|
16
|
+
6: 'mbs-4 mbe-2 font-medium text-inherit no-underline',
|
|
22
17
|
};
|
|
23
18
|
|
|
24
19
|
export const text = 'text-neutral-800 dark:text-neutral-200';
|
|
@@ -42,8 +37,7 @@ export const inlineUrl = mx(code, 'px-1');
|
|
|
42
37
|
export const blockquote = mx('pl-1 mr-1 border-is-4 border-primary-500/70 dark:border-primary-500/30', light);
|
|
43
38
|
|
|
44
39
|
// TODO(burdon): Replace with widget.
|
|
45
|
-
export const horizontalRule =
|
|
46
|
-
'flex mlb-4 border-b text-neutral-100 dark:text-neutral-900 border-neutral-200 dark:border-neutral-800';
|
|
40
|
+
export const horizontalRule = 'flex mlb-4 border-b text-neutral-100 dark:text-neutral-900 border-neutral-500/50';
|
|
47
41
|
|
|
48
42
|
// TODO(thure): Tailwind was not seeing `[&>li:before]:content-["•"]` as a utility class, but it would work if instead of `"•"` it was `"X"`… why?
|
|
49
43
|
export const unorderedList =
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { type Extension } from '@codemirror/state';
|
|
2
|
-
export type BlastOptions = {
|
|
3
|
-
effect?: number;
|
|
4
|
-
maxParticles: number;
|
|
5
|
-
particleGravity: number;
|
|
6
|
-
particleAlphaFadeout: number;
|
|
7
|
-
particleSize: {
|
|
8
|
-
min: number;
|
|
9
|
-
max: number;
|
|
10
|
-
};
|
|
11
|
-
particleNumRange: {
|
|
12
|
-
min: number;
|
|
13
|
-
max: number;
|
|
14
|
-
};
|
|
15
|
-
particleVelocityRange: {
|
|
16
|
-
x: [number, number];
|
|
17
|
-
y: [number, number];
|
|
18
|
-
};
|
|
19
|
-
particleShrinkRate: number;
|
|
20
|
-
shakeIntensity: number;
|
|
21
|
-
color?: () => number[];
|
|
22
|
-
};
|
|
23
|
-
export declare const defaultOptions: BlastOptions;
|
|
24
|
-
export declare const blast: (options: Partial<BlastOptions>) => Extension;
|
|
25
|
-
//# sourceMappingURL=blast.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"blast.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TextEditor/extensions/blast.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,SAAS,EAAc,MAAM,mBAAmB,CAAC;AAM/D,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,YAAY,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,gBAAgB,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C,qBAAqB,EAAE;QAAE,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC;IACpE,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,YAS5B,CAAC;AAEF,eAAO,MAAM,KAAK,YAAa,QAAQ,YAAY,CAAC,KAAG,SAsEtD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TextEditor/extensions/image.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,mBAAmB,CAAC;AAG3B,MAAM,MAAM,YAAY,GAAG,EAAE,CAAC;AAE9B,eAAO,MAAM,KAAK,aAAa,YAAY,KAAQ,SAMlD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mention.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TextEditor/extensions/mention.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;CACtC,CAAC;AAEF,eAAO,MAAM,OAAO,iBAAkB,cAAc,KAAG,SAmBtD,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type RangeSet, StateField } from '@codemirror/state';
|
|
2
|
-
export type TableOptions = {};
|
|
3
|
-
/**
|
|
4
|
-
* GFM tables.
|
|
5
|
-
* https://github.github.com/gfm/#tables-extension
|
|
6
|
-
*/
|
|
7
|
-
export declare const table: (options?: TableOptions) => StateField<RangeSet<any>>;
|
|
8
|
-
//# sourceMappingURL=table.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TextEditor/extensions/table.ts"],"names":[],"mappings":"AAKA,OAAO,EAAoB,KAAK,QAAQ,EAAmB,UAAU,EAAoB,MAAM,mBAAmB,CAAC;AAMnH,MAAM,MAAM,YAAY,GAAG,EAAE,CAAC;AAE9B;;;GAGG;AACH,eAAO,MAAM,KAAK,aAAa,YAAY,8BAM1C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"yjs.stories.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/yjs/yjs.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAEpB,OAAO,KAAmB,MAAM,OAAO,CAAC;;;;;AAWxC,wBAGE;AA+BF,eAAO,MAAM,OAAO;;;CAInB,CAAC"}
|