1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-09-02 19:52:32 +02:00

fix benchmarks

This commit is contained in:
Ian Storm Taylor
2019-05-01 20:14:06 -07:00
parent dbf6237caf
commit 45b6d245af
23 changed files with 66 additions and 78 deletions

View File

@@ -24,30 +24,37 @@ module.exports.input = (
<block type="level-one">
<block type="level-two">
<block type="coffee-container">
<text />
<inline type="coffee">
Extra, brewed caffeine fair trade, whipped cup bar flavour grounds
organic. Café au lait blue mountain cortado saucer, macchiato ut
that caramelization flavour.
</inline>
<text />
<inline type="coffee">
Crema frappuccino so decaffeinated, sit café au lait irish
cultivar doppio café au lait. Dripper irish fair trade <anchor />kopi-luwak
ut beans skinny saucer.
</inline>
<text />
</block>
<block type="coffee-container">
<text />
<inline type="coffee">
Half and half, irish rich sugar medium frappuccino spoon. Whipped,
caramelization, caffeine french press cinnamon variety rich redeye
acerbic americano aftertaste. Shop crema filter seasonal, filter
aromatic, french press mazagran affogato cappuccino single origin.
</inline>
Plunger pot aromatic, crema, cultivar french press, skinny and
percolator so single origin. Id variety and cinnamon brewed flavour
cultivar acerbic half and half et<focus /> cappuccino.
<text>
Plunger pot aromatic, crema, cultivar french press, skinny and
percolator so single origin. Id variety and cinnamon brewed
flavour cultivar acerbic half and half et<focus /> cappuccino.
</text>
<inline type="coffee">
Cup qui a barista crema white kopi-luwak chicory trifecta.
</inline>
<text />
</block>
</block>
</block>

View File

@@ -24,11 +24,9 @@ const value = (
<quote>
<paragraph>
<paragraph>
This is editable {i === 0 ? <anchor /> : ''}rich{i === 0 ? (
This is editable {i === 0 ? <anchor /> : null}rich{i === 0 ? (
<focus />
) : (
''
)}{' '}
) : null}
text, <i>much</i> better than a textarea! For reals.
</paragraph>
</paragraph>

View File

@@ -22,7 +22,7 @@ const value = (
<paragraph>
This is editable <b>rich</b> text, <i>much</i> better than a
textarea!
{i === 0 ? <cursor /> : ''}
{i === 0 ? <cursor /> : null}
</paragraph>
</paragraph>
</quote>

View File

@@ -20,7 +20,7 @@ const value = (
<quote>
<paragraph>
<paragraph>
{i === 0 ? <cursor /> : ''}
{i === 0 ? <cursor /> : null}
This is editable <b>rich</b> text, <i>much</i> better than a
textarea!
</paragraph>

View File

@@ -10,7 +10,7 @@ const fragment = (
<quote>
<paragraph>
This is editable <b>rich</b> text, <i>much</i> better than a textarea!
{i === 0 ? <cursor /> : ''}
{i === 0 ? <cursor /> : null}
</paragraph>
</quote>
))}

View File

@@ -10,7 +10,7 @@ const fragment = (
<quote key={`a${i}`}>
<paragraph>
This is editable <b>rich</b> text, <i>much</i> better than a textarea!
{i === 0 ? <cursor /> : ''}
{i === 0 ? <cursor /> : null}
</paragraph>
</quote>
))}

View File

@@ -21,7 +21,7 @@ const value = (
<paragraph>
This is editable <b>rich</b> text, <i>much</i> better than a
textarea!
{i === 0 ? <cursor /> : ''}
{i === 0 ? <cursor /> : null}
</paragraph>
</quote>
))}

View File

@@ -21,9 +21,8 @@ const value = (
<paragraph>
<paragraph>
<text key={`T${i}`}>
This is editable <b>rich</b> text, <i>much</i> better than a
textarea!
{i === 0 ? <cursor /> : ''}
This is editable rich text, much better than a textarea!
{i === 0 ? <cursor /> : null}
</text>
</paragraph>
</paragraph>

View File

@@ -24,7 +24,7 @@ const value = (
<quote>
<paragraph>
<paragraph>
{i === 0 ? <cursor /> : ''}
{i === 0 ? <cursor /> : null}
This is editable <b>rich</b> text, <i>much</i> better than a
textarea!
</paragraph>

View File

@@ -15,13 +15,18 @@ const value = (
<quote>
<paragraph>
<paragraph>
<text />
<link>link text</link>
<text />
</paragraph>
<paragraph />
<paragraph>
<paragraph>
<text />
<link>link text</link>
<text />
<text> more text after</text>
<text />
</paragraph>
</paragraph>
</paragraph>

View File

@@ -24,7 +24,7 @@ const value = (
<quote>
<paragraph>
<paragraph>
{i === 0 ? <cursor /> : ''}
{i === 0 ? <cursor /> : null}
This is editable <b>rich</b> text, <i>much</i> better than a
textarea!
</paragraph>

View File

@@ -21,9 +21,8 @@ const value = (
<paragraph>
<paragraph>
<text key={`T${i}`}>
{i === 0 ? <cursor /> : ''}
This is editable <b>rich</b> text, <i>much</i> better than a
textarea!
{i === 0 ? <cursor /> : null}
This is editable rich text, much better than a textarea!
</text>
</paragraph>
</paragraph>

View File

@@ -22,7 +22,7 @@ const value = (
<paragraph>
This is editable <b>rich</b> text, <i>much</i> better than a
textarea!
{i === 0 ? <cursor /> : ''}
{i === 0 ? <cursor /> : null}
</paragraph>
</paragraph>
</quote>

View File

@@ -25,7 +25,7 @@ const value = (
<paragraph>
<paragraph>
This
{i === 0 ? <cursor /> : ''}
{i === 0 ? <cursor /> : null}
is editable <b>rich</b> text, <i>much</i> better than a textarea!
</paragraph>
</paragraph>

View File

@@ -7,25 +7,22 @@ module.exports.default = function(json) {
}
const input = {
object: 'value',
document: {
object: 'document',
nodes: Array.from(Array(100)).map(() => ({
type: 'list',
object: 'block',
type: 'list',
data: {},
nodes: Array.from(Array(10)).map(() => ({
type: 'list-item',
object: 'block',
type: 'list-item',
data: {},
nodes: [
{
leaves: [
{
object: 'leaf',
marks: [],
text: '',
},
],
object: 'text',
marks: [],
text: '',
},
{
type: 'link',
@@ -35,26 +32,16 @@ const input = {
},
nodes: [
{
leaves: [
{
object: 'leaf',
marks: [],
text: 'Some text for a link',
},
],
object: 'text',
marks: [],
text: 'Some text for a link',
},
],
},
{
leaves: [
{
object: 'leaf',
marks: [],
text: '',
},
],
object: 'text',
marks: [],
text: '',
},
],
})),

View File

@@ -18,25 +18,25 @@ const input = {
nodes: [
{
object: 'text',
leaves: [
{
text: 'This is editable ',
},
{
text: 'rich',
marks: [{ type: 'bold' }],
},
{
text: ' text, ',
},
{
text: 'much',
marks: [{ type: 'italic' }],
},
{
text: ' better than a textarea!',
},
],
text: 'This is editable ',
},
{
object: 'text',
text: 'rich',
marks: [{ type: 'bold' }],
},
{
object: 'text',
text: ' text, ',
},
{
object: 'text',
text: 'much',
marks: [{ type: 'italic' }],
},
{
object: 'text',
text: ' better than a textarea!',
},
],
},

View File

@@ -19,8 +19,7 @@ const value = (
<paragraph>
<paragraph>
<text key={`T${i}`}>
This is editable <b>rich</b> text, <i>much</i> better than a
textarea!
This is editable rich text, much better than a textarea!
</text>
</paragraph>
</paragraph>

View File

@@ -19,8 +19,7 @@ const value = (
<paragraph>
<paragraph>
<text key={`T${i}`}>
This is editable <b>rich</b> text, <i>much</i> better than a
textarea!
This is editable rich text, much better than a textarea!
</text>
</paragraph>
</paragraph>

View File

@@ -19,8 +19,7 @@ const value = (
<paragraph>
<paragraph>
<text key={`T${i}`}>
This is editable <b>rich</b> text, <i>much</i> better than a
textarea!
This is editable rich text, much better than a textarea!
</text>
</paragraph>
</paragraph>

View File

@@ -19,8 +19,7 @@ const value = (
<paragraph>
<paragraph>
<text key={`T${i}`}>
This is editable <b>rich</b> text, <i>much</i> better than a
textarea!
This is editable rich text, much better than a textarea!
</text>
</paragraph>
</paragraph>

View File

@@ -19,8 +19,7 @@ const value = (
<paragraph>
<paragraph>
<text key={`T${i}`}>
This is editable <b>rich</b> text, <i>much</i> better than a
textarea!
This is editable rich text, much better than a textarea!
</text>
</paragraph>
</paragraph>

View File

@@ -19,8 +19,7 @@ const value = (
<paragraph>
<paragraph>
<text key={`T${i}`}>
This is editable <b>rich</b> text, <i>much</i> better than a
textarea!
This is editable rich text, much better than a textarea!
</text>
</paragraph>
</paragraph>

View File

@@ -19,8 +19,7 @@ const value = (
<paragraph>
<paragraph>
<text key={`T${i}`}>
This is editable <b>rich</b> text, <i>much</i> better than a
textarea!
This is editable rich text, much better than a textarea!
</text>
</paragraph>
</paragraph>