@blocksuite/virgo
Advanced tools
Comparing version 0.0.0-20230816192550-eeb137dd-nightly to 0.0.0-20230817030423-20f3821a-nightly
@@ -22,3 +22,3 @@ import { baseTextAttributes, getDefaultAttributeRenderer, } from '../utils/index.js'; | ||
.getDeltasByVRange(vRange) | ||
.filter(([delta, position]) => position.index + position.length > vRange.index && | ||
.filter(([_, position]) => position.index + position.length > vRange.index && | ||
position.index <= vRange.index + vRange.length); | ||
@@ -62,3 +62,3 @@ const maybeAttributesList = deltas.map(([delta]) => delta.attributes); | ||
// filter out undefined values | ||
Object.entries(attributeResult.data).filter(([k, v]) => v)); | ||
Object.entries(attributeResult.data).filter(([_, v]) => v)); | ||
}; | ||
@@ -65,0 +65,0 @@ this._editor = editor; |
@@ -196,3 +196,3 @@ import { html, render } from 'lit'; | ||
if (vRange.length >= 1) { | ||
this._editor.mapDeltasInVRange(vRange, (a, rangeIndex, deltaIndex) => { | ||
this._editor.mapDeltasInVRange(vRange, (_, rangeIndex, deltaIndex) => { | ||
if (deltaIndex === normalizedDeltaIndex && | ||
@@ -199,0 +199,0 @@ rangeIndex >= vRange.index) { |
@@ -218,3 +218,3 @@ import { assertExists, Slot } from '@blocksuite/global/utils'; | ||
.filter(([delta, deltaVRange]) => match(delta, deltaVRange)) | ||
.forEach(([delta, deltaVRange]) => { | ||
.forEach(([_delta, deltaVRange]) => { | ||
const targetVRange = intersectVRange(vRange, deltaVRange); | ||
@@ -221,0 +221,0 @@ if (!targetVRange) |
{ | ||
"name": "@blocksuite/virgo", | ||
"version": "0.0.0-20230816192550-eeb137dd-nightly", | ||
"version": "0.0.0-20230817030423-20f3821a-nightly", | ||
"description": "A micro editor.", | ||
@@ -28,3 +28,3 @@ "main": "dist/index.js", | ||
"zod": "^3.21.4", | ||
"@blocksuite/global": "0.0.0-20230816192550-eeb137dd-nightly" | ||
"@blocksuite/global": "0.0.0-20230817030423-20f3821a-nightly" | ||
}, | ||
@@ -31,0 +31,0 @@ "scripts": { |
@@ -57,3 +57,3 @@ import type { z, ZodTypeDef } from 'zod'; | ||
.filter( | ||
([delta, position]) => | ||
([_, position]) => | ||
position.index + position.length > vRange.index && | ||
@@ -105,5 +105,5 @@ position.index <= vRange.index + vRange.length | ||
// filter out undefined values | ||
Object.entries(attributeResult.data).filter(([k, v]) => v) | ||
Object.entries(attributeResult.data).filter(([_, v]) => v) | ||
) as TextAttributes; | ||
}; | ||
} |
@@ -82,3 +82,3 @@ import { html, render } from 'lit'; | ||
vRange, | ||
(a, rangeIndex, deltaIndex) => { | ||
(_, rangeIndex, deltaIndex) => { | ||
if ( | ||
@@ -85,0 +85,0 @@ deltaIndex === normalizedDeltaIndex && |
@@ -333,3 +333,3 @@ import type { NullablePartial } from '@blocksuite/global/utils'; | ||
.filter(([delta, deltaVRange]) => match(delta, deltaVRange)) | ||
.forEach(([delta, deltaVRange]) => { | ||
.forEach(([_delta, deltaVRange]) => { | ||
const targetVRange = intersectVRange(vRange, deltaVRange); | ||
@@ -336,0 +336,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
502822
+ Added@blocksuite/global@0.0.0-20230817030423-20f3821a-nightly(transitive)
- Removed@blocksuite/global@0.0.0-20230816192550-eeb137dd-nightly(transitive)
Updated@blocksuite/global@0.0.0-20230817030423-20f3821a-nightly