@blocknote/core 0.2.2-alpha.0 → 0.2.3
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/blocknote.js +696 -691
- package/dist/blocknote.js.map +1 -1
- package/dist/blocknote.umd.cjs +1 -1
- package/dist/blocknote.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +6 -4
- package/src/BlockNoteExtensions.ts +1 -10
- package/src/extensions/Blocks/PreviousBlockTypePlugin.ts +22 -26
- package/src/extensions/Blocks/apiTypes.ts +48 -0
- package/src/extensions/Blocks/helpers/findBlock.ts +3 -1
- package/src/extensions/Blocks/helpers/getBlockInfoFromPos.ts +1 -1
- package/src/extensions/Blocks/index.ts +10 -8
- package/src/extensions/Blocks/nodes/Block.module.css +31 -29
- package/src/extensions/Blocks/{BlockAttributes.ts → nodes/BlockAttributes.ts} +0 -0
- package/src/extensions/Blocks/nodes/{Block.ts → BlockContainer.ts} +75 -94
- package/src/extensions/Blocks/nodes/{BlockTypes/HeadingBlock/HeadingContent.ts → BlockContent/HeadingBlockContent/HeadingBlockContent.ts} +16 -24
- package/src/extensions/Blocks/nodes/BlockContent/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts +76 -0
- package/src/extensions/Blocks/nodes/BlockContent/ListItemBlockContent/ListItemKeyboardShortcuts.ts +47 -0
- package/src/extensions/Blocks/nodes/{BlockTypes/ListItemBlock/OrderedListItemIndexPlugin.ts → BlockContent/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts} +10 -14
- package/src/extensions/Blocks/nodes/BlockContent/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts +95 -0
- package/src/extensions/Blocks/nodes/{BlockTypes/TextBlock/TextContent.ts → BlockContent/ParagraphBlockContent/ParagraphBlockContent.ts} +3 -8
- package/src/extensions/Blocks/nodes/BlockGroup.ts +4 -4
- package/src/extensions/DraggableBlocks/BlockSideMenuFactoryTypes.ts +1 -1
- package/src/extensions/DraggableBlocks/DraggableBlocksPlugin.ts +7 -7
- package/src/extensions/{Blocks → DraggableBlocks}/MultipleNodeSelection.ts +0 -0
- package/src/extensions/FormattingToolbar/FormattingToolbarFactoryTypes.ts +4 -7
- package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +17 -9
- package/src/extensions/HyperlinkToolbar/HyperlinkToolbarFactoryTypes.ts +1 -1
- package/src/extensions/HyperlinkToolbar/HyperlinkToolbarPlugin.ts +3 -1
- package/src/extensions/SlashMenu/defaultCommands.tsx +22 -23
- package/src/extensions/TrailingNode/TrailingNodeExtension.ts +4 -4
- package/src/extensions/UniqueID/UniqueID.ts +6 -0
- package/src/index.ts +2 -1
- package/src/shared/EditorElement.ts +12 -6
- package/src/shared/plugins/suggestion/SuggestionPlugin.ts +2 -2
- package/src/shared/plugins/suggestion/SuggestionsMenuFactoryTypes.ts +1 -1
- package/types/src/BlockNoteEditor.d.ts +1 -1
- package/types/src/BlockNoteExtensions.d.ts +1 -3
- package/types/src/extensions/Blocks/apiTypes.d.ts +16 -0
- package/types/src/extensions/Blocks/helpers/getBlockInfoFromPos.d.ts +1 -1
- package/types/src/extensions/Blocks/nodes/BlockAttributes.d.ts +2 -0
- package/types/src/extensions/Blocks/nodes/BlockContainer.d.ts +21 -0
- package/types/src/extensions/Blocks/nodes/BlockContent/BlockContentTypes.d.ts +4 -0
- package/types/src/extensions/Blocks/nodes/BlockContent/HeadingBlockContent/HeadingBlockContent.d.ts +2 -0
- package/types/src/extensions/Blocks/nodes/BlockContent/HeadingBlockContent/HeadingBlockContentTypes.d.ts +4 -0
- package/types/src/extensions/Blocks/nodes/BlockContent/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.d.ts +2 -0
- package/types/src/extensions/Blocks/nodes/BlockContent/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContentTypes.d.ts +2 -0
- package/types/src/extensions/Blocks/nodes/BlockContent/ListItemBlockContent/ListItemKeyboardShortcuts.d.ts +2 -0
- package/types/src/extensions/Blocks/nodes/BlockContent/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.d.ts +2 -0
- package/types/src/extensions/Blocks/nodes/BlockContent/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.d.ts +2 -0
- package/types/src/extensions/Blocks/nodes/BlockContent/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContentTypes.d.ts +2 -0
- package/types/src/extensions/Blocks/nodes/BlockContent/ParagraphBlockContent/ParagraphBlockContent.d.ts +2 -0
- package/types/src/extensions/Blocks/nodes/BlockContent/ParagraphBlockContent/ParagraphBlockContentTypes.d.ts +2 -0
- package/types/src/extensions/DraggableBlocks/BlockSideMenuFactoryTypes.d.ts +5 -5
- package/types/src/extensions/DraggableBlocks/DraggableBlocksExtension.d.ts +1 -1
- package/types/src/extensions/DraggableBlocks/DraggableBlocksPlugin.d.ts +2 -2
- package/types/src/extensions/DraggableBlocks/MultipleNodeSelection.d.ts +24 -0
- package/types/src/extensions/FormattingToolbar/FormattingToolbarFactoryTypes.d.ts +8 -8
- package/types/src/extensions/FormattingToolbar/FormattingToolbarPlugin.d.ts +1 -1
- package/types/src/extensions/HyperlinkToolbar/HyperlinkToolbarFactoryTypes.d.ts +5 -5
- package/types/src/extensions/HyperlinkToolbar/HyperlinkToolbarPlugin.d.ts +2 -2
- package/types/src/extensions/SlashMenu/SlashMenuExtension.d.ts +1 -1
- package/types/src/extensions/SlashMenu/SlashMenuItem.d.ts +1 -1
- package/types/src/index.d.ts +2 -1
- package/types/src/shared/EditorElement.d.ts +6 -2
- package/types/src/shared/plugins/suggestion/SuggestionPlugin.d.ts +3 -3
- package/types/src/shared/plugins/suggestion/SuggestionsMenuFactoryTypes.d.ts +5 -5
- package/src/extensions/Blocks/nodes/BlockTypes/ListItemBlock/ListItemContent.ts +0 -177
- package/src/extensions/Paragraph/FixedParagraph.ts +0 -12
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"homepage": "https://github.com/yousefed/blocknote",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
|
-
"version": "0.2.
|
|
6
|
+
"version": "0.2.3",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
9
9
|
"types",
|
|
@@ -71,13 +71,15 @@
|
|
|
71
71
|
"prosemirror-gapcursor": "^1.3.1",
|
|
72
72
|
"prosemirror-history": "^1.3.0",
|
|
73
73
|
"prosemirror-keymap": "^1.2.0",
|
|
74
|
-
"prosemirror-model": "
|
|
74
|
+
"prosemirror-model": "~1.18.3",
|
|
75
75
|
"prosemirror-schema-list": "^1.2.2",
|
|
76
76
|
"prosemirror-state": "^1.4.2",
|
|
77
77
|
"prosemirror-transform": "^1.7.1",
|
|
78
78
|
"prosemirror-view": "^1.30.0",
|
|
79
79
|
"uuid": "^8.3.2",
|
|
80
|
-
"y-prosemirror": "1.0.20"
|
|
80
|
+
"y-prosemirror": "1.0.20",
|
|
81
|
+
"y-protocols": "1.0.5",
|
|
82
|
+
"yjs": "13.5.44"
|
|
81
83
|
},
|
|
82
84
|
"devDependencies": {
|
|
83
85
|
"@types/lodash": "^4.14.179",
|
|
@@ -102,5 +104,5 @@
|
|
|
102
104
|
"access": "public",
|
|
103
105
|
"registry": "https://registry.npmjs.org/"
|
|
104
106
|
},
|
|
105
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "04fb17b9fd76a5a9a5a3476c0a1d441848110ea9"
|
|
106
108
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Extensions, extensions } from "@tiptap/core";
|
|
2
2
|
|
|
3
|
-
import { Node } from "@tiptap/core";
|
|
4
3
|
import Bold from "@tiptap/extension-bold";
|
|
5
4
|
import Code from "@tiptap/extension-code";
|
|
6
5
|
import DropCursor from "@tiptap/extension-dropcursor";
|
|
@@ -16,7 +15,6 @@ import blockStyles from "./extensions/Blocks/nodes/Block.module.css";
|
|
|
16
15
|
import { FormattingToolbarExtension } from "./extensions/FormattingToolbar/FormattingToolbarExtension";
|
|
17
16
|
import { DraggableBlocksExtension } from "./extensions/DraggableBlocks/DraggableBlocksExtension";
|
|
18
17
|
import HyperlinkMark from "./extensions/HyperlinkToolbar/HyperlinkMark";
|
|
19
|
-
import { FixedParagraph } from "./extensions/Paragraph/FixedParagraph";
|
|
20
18
|
import { Placeholder } from "./extensions/Placeholder/PlaceholderExtension";
|
|
21
19
|
import SlashMenuExtension from "./extensions/SlashMenu";
|
|
22
20
|
import { TrailingNode } from "./extensions/TrailingNode/TrailingNodeExtension";
|
|
@@ -28,12 +26,6 @@ import { BlockSideMenuFactory } from "./extensions/DraggableBlocks/BlockSideMenu
|
|
|
28
26
|
import { Link } from "@tiptap/extension-link";
|
|
29
27
|
import { SlashMenuItem } from "./extensions/SlashMenu/SlashMenuItem";
|
|
30
28
|
|
|
31
|
-
export const Document = Node.create({
|
|
32
|
-
name: "doc",
|
|
33
|
-
topNode: true,
|
|
34
|
-
content: "block+",
|
|
35
|
-
});
|
|
36
|
-
|
|
37
29
|
export type UiFactories = Partial<{
|
|
38
30
|
formattingToolbarFactory: FormattingToolbarFactory;
|
|
39
31
|
hyperlinkToolbarFactory: HyperlinkToolbarFactory;
|
|
@@ -64,7 +56,7 @@ export const getBlockNoteExtensions = (uiFactories: UiFactories) => {
|
|
|
64
56
|
showOnlyCurrent: false,
|
|
65
57
|
}),
|
|
66
58
|
UniqueID.configure({
|
|
67
|
-
types: ["
|
|
59
|
+
types: ["blockContainer"],
|
|
68
60
|
}),
|
|
69
61
|
HardBreak,
|
|
70
62
|
// Comments,
|
|
@@ -78,7 +70,6 @@ export const getBlockNoteExtensions = (uiFactories: UiFactories) => {
|
|
|
78
70
|
Italic,
|
|
79
71
|
Strike,
|
|
80
72
|
Underline,
|
|
81
|
-
FixedParagraph,
|
|
82
73
|
|
|
83
74
|
// custom blocks:
|
|
84
75
|
...blocks,
|
|
@@ -9,9 +9,11 @@ import { Decoration, DecorationSet } from "prosemirror-view";
|
|
|
9
9
|
const PLUGIN_KEY = new PluginKey(`previous-blocks`);
|
|
10
10
|
|
|
11
11
|
const nodeAttributes: Record<string, string> = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
// Numbered List Items
|
|
13
|
+
index: "index",
|
|
14
|
+
// Headings
|
|
15
|
+
level: "level",
|
|
16
|
+
// All Blocks
|
|
15
17
|
type: "type",
|
|
16
18
|
depth: "depth",
|
|
17
19
|
"depth-change": "depth-change",
|
|
@@ -91,43 +93,40 @@ export const PreviousBlockTypePlugin = () => {
|
|
|
91
93
|
const newContentNode = node.node.firstChild;
|
|
92
94
|
if (oldNode && oldContentNode && newContentNode) {
|
|
93
95
|
const newAttrs = {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
headingLevel: newContentNode.attrs.headingLevel,
|
|
96
|
+
index: newContentNode.attrs.index,
|
|
97
|
+
level: newContentNode.attrs.level,
|
|
97
98
|
type: newContentNode.type.name,
|
|
98
99
|
depth: newState.doc.resolve(node.pos).depth,
|
|
99
100
|
};
|
|
100
101
|
|
|
101
102
|
const oldAttrs = {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
headingLevel: oldContentNode.attrs.headingLevel,
|
|
103
|
+
index: oldContentNode.attrs.index,
|
|
104
|
+
level: oldContentNode.attrs.level,
|
|
105
105
|
type: oldContentNode.type.name,
|
|
106
106
|
depth: oldState.doc.resolve(oldNode.pos).depth,
|
|
107
107
|
};
|
|
108
108
|
|
|
109
|
-
// Hacky fix to avoid processing certain transactions created by
|
|
109
|
+
// Hacky fix to avoid processing certain transactions created by the numbered list indexing plugin.
|
|
110
110
|
|
|
111
|
-
// True when an existing
|
|
111
|
+
// True when an existing numbered list item is assigned an index for the first time, which happens
|
|
112
112
|
// immediately after it's created. Using this condition to start an animation ensures it's not
|
|
113
|
-
// immediately overridden by a different transaction created by the
|
|
113
|
+
// immediately overridden by a different transaction created by the numbered list indexing plugin.
|
|
114
114
|
const indexInitialized =
|
|
115
|
-
oldAttrs.
|
|
116
|
-
newAttrs.listItemIndex !== null;
|
|
115
|
+
oldAttrs.index === null && newAttrs.index !== null;
|
|
117
116
|
|
|
118
|
-
// True when an existing
|
|
119
|
-
//
|
|
120
|
-
//
|
|
117
|
+
// True when an existing numbered list item changes nesting levels, before its index is updated by the
|
|
118
|
+
// numbered list indexing plugin. This condition ensures that animations for indentation still work with
|
|
119
|
+
// numbered list items, while preventing unnecessary animations being done when dragging/dropping them.
|
|
121
120
|
const depthChanged =
|
|
122
|
-
oldAttrs.
|
|
123
|
-
newAttrs.
|
|
124
|
-
oldAttrs.
|
|
121
|
+
oldAttrs.index !== null &&
|
|
122
|
+
newAttrs.index !== null &&
|
|
123
|
+
oldAttrs.index === newAttrs.index;
|
|
125
124
|
|
|
126
|
-
// Only false for transactions in which the block remains
|
|
125
|
+
// Only false for transactions in which the block remains a numbered list item before & after, but neither
|
|
127
126
|
// of the previous conditions apply.
|
|
128
127
|
const shouldUpdate =
|
|
129
|
-
oldAttrs.
|
|
130
|
-
newAttrs.
|
|
128
|
+
oldAttrs.type === "numberedListItem" &&
|
|
129
|
+
newAttrs.type === "numberedListItem"
|
|
131
130
|
? indexInitialized || depthChanged
|
|
132
131
|
: true;
|
|
133
132
|
|
|
@@ -162,7 +161,6 @@ export const PreviousBlockTypePlugin = () => {
|
|
|
162
161
|
decorations(state) {
|
|
163
162
|
const pluginState = (this as Plugin).getState(state);
|
|
164
163
|
if (!pluginState.needsUpdate) {
|
|
165
|
-
// console.log("0");
|
|
166
164
|
return undefined;
|
|
167
165
|
}
|
|
168
166
|
|
|
@@ -170,12 +168,10 @@ export const PreviousBlockTypePlugin = () => {
|
|
|
170
168
|
|
|
171
169
|
state.doc.descendants((node, pos) => {
|
|
172
170
|
if (!node.attrs.id) {
|
|
173
|
-
// console.log("1");
|
|
174
171
|
return;
|
|
175
172
|
}
|
|
176
173
|
const prevAttrs = pluginState.prevBlockAttrs[node.attrs.id];
|
|
177
174
|
if (!prevAttrs) {
|
|
178
|
-
// console.log("2");
|
|
179
175
|
return;
|
|
180
176
|
}
|
|
181
177
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export type BlockSpec<
|
|
2
|
+
// Type of the block.
|
|
3
|
+
// Examples might include: "paragraph", "heading", or "bulletListItem".
|
|
4
|
+
Type extends string,
|
|
5
|
+
// Changeable props which affect the block's behaviour or appearance.
|
|
6
|
+
// An example might be: { textAlignment: "left" | "right" | "center" | "justify" } for a paragraph block.
|
|
7
|
+
Props extends Record<string, string>
|
|
8
|
+
> = {
|
|
9
|
+
type: Type;
|
|
10
|
+
props: Props;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type BlockSpecUpdate<Spec> = Spec extends BlockSpec<
|
|
14
|
+
infer Type,
|
|
15
|
+
infer Props
|
|
16
|
+
>
|
|
17
|
+
? {
|
|
18
|
+
type: Type;
|
|
19
|
+
props?: Partial<Props>;
|
|
20
|
+
}
|
|
21
|
+
: never;
|
|
22
|
+
|
|
23
|
+
export type NumberedListItemBlock = BlockSpec<"numberedListItem", {}>;
|
|
24
|
+
|
|
25
|
+
export type BulletListItemBlock = BlockSpec<"bulletListItem", {}>;
|
|
26
|
+
|
|
27
|
+
export type HeadingBlock = BlockSpec<
|
|
28
|
+
"heading",
|
|
29
|
+
{
|
|
30
|
+
level: "1" | "2" | "3";
|
|
31
|
+
}
|
|
32
|
+
>;
|
|
33
|
+
|
|
34
|
+
export type ParagraphBlock = BlockSpec<"paragraph", {}>;
|
|
35
|
+
|
|
36
|
+
export type Block =
|
|
37
|
+
| ParagraphBlock
|
|
38
|
+
| HeadingBlock
|
|
39
|
+
| BulletListItemBlock
|
|
40
|
+
| NumberedListItemBlock;
|
|
41
|
+
|
|
42
|
+
export type BlockUpdate = BlockSpecUpdate<Block>;
|
|
43
|
+
|
|
44
|
+
/*
|
|
45
|
+
TODO:
|
|
46
|
+
1) guard read / writes (now we just pass on internal node attrs)
|
|
47
|
+
2) where to locate this code / types
|
|
48
|
+
*/
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { Node } from "@tiptap/core";
|
|
2
|
-
import {
|
|
2
|
+
import { BlockContainer } from "./nodes/BlockContainer";
|
|
3
3
|
import { BlockGroup } from "./nodes/BlockGroup";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { ParagraphBlockContent } from "./nodes/BlockContent/ParagraphBlockContent/ParagraphBlockContent";
|
|
5
|
+
import { HeadingBlockContent } from "./nodes/BlockContent/HeadingBlockContent/HeadingBlockContent";
|
|
6
|
+
import { BulletListItemBlockContent } from "./nodes/BlockContent/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent";
|
|
7
|
+
import { NumberedListItemBlockContent } from "./nodes/BlockContent/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent";
|
|
7
8
|
|
|
8
9
|
export const blocks: any[] = [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
ParagraphBlockContent,
|
|
11
|
+
HeadingBlockContent,
|
|
12
|
+
BulletListItemBlockContent,
|
|
13
|
+
NumberedListItemBlockContent,
|
|
14
|
+
BlockContainer,
|
|
13
15
|
BlockGroup,
|
|
14
16
|
Node.create({
|
|
15
17
|
name: "doc",
|
|
@@ -115,34 +115,34 @@ NESTED BLOCKS
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
/* HEADINGS*/
|
|
118
|
-
[data-
|
|
118
|
+
[data-level="1"] {
|
|
119
119
|
--level: 3em;
|
|
120
120
|
}
|
|
121
|
-
[data-
|
|
121
|
+
[data-level="2"] {
|
|
122
122
|
--level: 2em;
|
|
123
123
|
}
|
|
124
|
-
[data-
|
|
124
|
+
[data-level="3"] {
|
|
125
125
|
--level: 1.3em;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
[data-prev-
|
|
128
|
+
[data-prev-level="1"] {
|
|
129
129
|
--prev-level: 3em;
|
|
130
130
|
}
|
|
131
|
-
[data-prev-
|
|
131
|
+
[data-prev-level="2"] {
|
|
132
132
|
--prev-level: 2em;
|
|
133
133
|
}
|
|
134
|
-
[data-prev-
|
|
134
|
+
[data-prev-level="3"] {
|
|
135
135
|
--prev-level: 1.3em;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
.blockOuter[data-prev-type="
|
|
138
|
+
.blockOuter[data-prev-type="heading"] > .block > .blockContent {
|
|
139
139
|
font-size: var(--prev-level);
|
|
140
140
|
font-weight: bold;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
.blockOuter:not([data-prev-type])
|
|
144
144
|
> .block
|
|
145
|
-
> .blockContent[data-content-type="
|
|
145
|
+
> .blockContent[data-content-type="heading"] {
|
|
146
146
|
font-size: var(--level);
|
|
147
147
|
font-weight: bold;
|
|
148
148
|
}
|
|
@@ -155,15 +155,15 @@ NESTED BLOCKS
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
/* Ordered */
|
|
158
|
-
[data-
|
|
159
|
-
--index: attr(data-
|
|
158
|
+
[data-content-type="numberedListItem"] {
|
|
159
|
+
--index: attr(data-index)
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
[data-prev-
|
|
163
|
-
--prev-index: attr(data-prev-
|
|
162
|
+
[data-prev-type="numberedListItem"] {
|
|
163
|
+
--prev-index: attr(data-prev-index)
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
.blockOuter[data-prev-
|
|
166
|
+
.blockOuter[data-prev-type="numberedListItem"]:not([data-prev-index="none"])
|
|
167
167
|
> .block
|
|
168
168
|
> .blockContent::before {
|
|
169
169
|
margin-right: 1.2em;
|
|
@@ -172,14 +172,14 @@ NESTED BLOCKS
|
|
|
172
172
|
|
|
173
173
|
.blockOuter:not([data-prev-type])
|
|
174
174
|
> .block
|
|
175
|
-
> .blockContent[data-
|
|
175
|
+
> .blockContent[data-content-type="numberedListItem"]::before {
|
|
176
176
|
margin-right: 1.2em;
|
|
177
177
|
content: var(--index)".";
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
/* Unordered */
|
|
181
181
|
/* No list nesting */
|
|
182
|
-
.blockOuter[data-prev-
|
|
182
|
+
.blockOuter[data-prev-type="bulletListItem"]
|
|
183
183
|
> .block
|
|
184
184
|
> .blockContent::before {
|
|
185
185
|
margin-right: 1.2em;
|
|
@@ -188,43 +188,43 @@ NESTED BLOCKS
|
|
|
188
188
|
|
|
189
189
|
.blockOuter:not([data-prev-type])
|
|
190
190
|
> .block
|
|
191
|
-
> .blockContent[data-
|
|
191
|
+
> .blockContent[data-content-type="bulletListItem"]::before {
|
|
192
192
|
margin-right: 1.2em;
|
|
193
193
|
content: "•";
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
/* 1 level of list nesting */
|
|
197
|
-
[data-
|
|
198
|
-
> .blockOuter[data-prev-
|
|
197
|
+
[data-content-type="bulletListItem"]~.blockGroup
|
|
198
|
+
> .blockOuter[data-prev-type="bulletListItem"]
|
|
199
199
|
> .block
|
|
200
200
|
> .blockContent::before {
|
|
201
201
|
margin-right: 1.2em;
|
|
202
202
|
content: "◦";
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
[data-
|
|
205
|
+
[data-content-type="bulletListItem"]~.blockGroup
|
|
206
206
|
> .blockOuter:not([data-prev-type])
|
|
207
207
|
> .block
|
|
208
|
-
> .blockContent[data-
|
|
208
|
+
> .blockContent[data-content-type="bulletListItem"]::before {
|
|
209
209
|
margin-right: 1.2em;
|
|
210
210
|
content: "◦";
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
/* 2 levels of list nesting */
|
|
214
|
-
[data-
|
|
215
|
-
[data-
|
|
216
|
-
> .blockOuter[data-prev-
|
|
214
|
+
[data-content-type="bulletListItem"]~.blockGroup
|
|
215
|
+
[data-content-type="bulletListItem"]~.blockGroup
|
|
216
|
+
> .blockOuter[data-prev-type="bulletListItem"]
|
|
217
217
|
> .block
|
|
218
218
|
> .blockContent::before {
|
|
219
219
|
margin-right: 1.2em;
|
|
220
220
|
content: "▪";
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
[data-
|
|
224
|
-
[data-
|
|
223
|
+
[data-content-type="bulletListItem"]~.blockGroup
|
|
224
|
+
[data-content-type="bulletListItem"]~.blockGroup
|
|
225
225
|
> .blockOuter:not([data-prev-type])
|
|
226
226
|
> .block
|
|
227
|
-
> .blockContent[data-
|
|
227
|
+
> .blockContent[data-content-type="bulletListItem"]::before {
|
|
228
228
|
margin-right: 1.2em;
|
|
229
229
|
content: "▪";
|
|
230
230
|
}
|
|
@@ -257,12 +257,14 @@ NESTED BLOCKS
|
|
|
257
257
|
content: "Type to filter";
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
-
.blockContent[data-content-type="
|
|
260
|
+
.blockContent[data-content-type="heading"].isEmpty
|
|
261
261
|
> :first-child::before {
|
|
262
262
|
content: "Heading";
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
.blockContent[data-content-type="
|
|
266
|
-
|
|
265
|
+
.blockContent[data-content-type="bulletListItem"].isEmpty
|
|
266
|
+
> :first-child:before,
|
|
267
|
+
.blockContent[data-content-type="numberedListItem"].isEmpty
|
|
268
|
+
> :first-child:before {
|
|
267
269
|
content: "List";
|
|
268
270
|
}
|
|
File without changes
|