@blocksuite/inline
Advanced tools
Comparing version 0.0.0-canary-20241029001432 to 0.0.0-canary-20241029113144
# @blocksuite/inline | ||
## 0.0.0-canary-20241029001432 | ||
## 0.0.0-canary-20241029113144 | ||
### Patch Changes | ||
- Release a snapshot version. | ||
- Updated dependencies | ||
- @blocksuite/global@0.0.0-canary-20241029113144 | ||
## 0.17.22 | ||
### Patch Changes | ||
- ba9613a: ## Feat | ||
@@ -35,6 +43,4 @@ | ||
- Release a snapshot version. | ||
- Updated dependencies [ba9613a] | ||
- Updated dependencies | ||
- @blocksuite/global@0.0.0-canary-20241029001432 | ||
- @blocksuite/global@0.17.22 | ||
@@ -41,0 +47,0 @@ ## 0.17.21 |
@@ -17,4 +17,14 @@ import { baseTextAttributes, getDefaultAttributeRenderer, } from '../utils/index.js'; | ||
.getDeltasByInlineRange(inlineRange) | ||
.filter(([_, position]) => position.index + position.length > inlineRange.index && | ||
position.index <= inlineRange.index + inlineRange.length); | ||
.filter(([_, position]) => { | ||
const deltaStart = position.index; | ||
const deltaEnd = position.index + position.length; | ||
const inlineStart = inlineRange.index; | ||
const inlineEnd = inlineRange.index + inlineRange.length; | ||
if (inlineStart === inlineEnd) { | ||
return deltaStart < inlineStart && inlineStart <= deltaEnd; | ||
} | ||
else { | ||
return deltaEnd > inlineStart && deltaStart <= inlineEnd; | ||
} | ||
}); | ||
const maybeAttributesList = deltas.map(([delta]) => delta.attributes); | ||
@@ -21,0 +31,0 @@ if (loose) { |
{ | ||
"name": "@blocksuite/inline", | ||
"version": "0.0.0-canary-20241029001432", | ||
"version": "0.0.0-canary-20241029113144", | ||
"description": "A micro editor.", | ||
@@ -85,3 +85,3 @@ "type": "module", | ||
"dependencies": { | ||
"@blocksuite/global": "0.0.0-canary-20241029001432", | ||
"@blocksuite/global": "0.0.0-canary-20241029113144", | ||
"@preact/signals-core": "^1.8.0", | ||
@@ -88,0 +88,0 @@ "zod": "^3.23.8" |
@@ -24,7 +24,14 @@ import type { z, ZodTypeDef } from 'zod'; | ||
.getDeltasByInlineRange(inlineRange) | ||
.filter( | ||
([_, position]) => | ||
position.index + position.length > inlineRange.index && | ||
position.index <= inlineRange.index + inlineRange.length | ||
); | ||
.filter(([_, position]) => { | ||
const deltaStart = position.index; | ||
const deltaEnd = position.index + position.length; | ||
const inlineStart = inlineRange.index; | ||
const inlineEnd = inlineRange.index + inlineRange.length; | ||
if (inlineStart === inlineEnd) { | ||
return deltaStart < inlineStart && inlineStart <= deltaEnd; | ||
} else { | ||
return deltaEnd > inlineStart && deltaStart <= inlineEnd; | ||
} | ||
}); | ||
const maybeAttributesList = deltas.map(([delta]) => delta.attributes); | ||
@@ -31,0 +38,0 @@ if (loose) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
438371
5820
+ Added@blocksuite/global@0.0.0-canary-20241029113144(transitive)
- Removed@blocksuite/global@0.0.0-canary-20241029001432(transitive)