Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@blocksuite/blocks

Package Overview
Dependencies
Maintainers
5
Versions
1230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blocksuite/blocks - npm Package Compare versions

Comparing version 0.3.0-alpha.13 to 0.3.0-alpha.14

2

dist/__internal__/rich-text/rich-text-operations.js

@@ -118,3 +118,3 @@ // operations used in rich-text level

if (previousSibling &&
matchFlavours(previousSibling, ['affine:paragraph'])) {
matchFlavours(previousSibling, ['affine:paragraph', 'affine:list'])) {
page.captureSync();

@@ -121,0 +121,0 @@ const preTextLength = previousSibling.text?.length || 0;

@@ -8,5 +8,6 @@ import { Utils } from '@blocksuite/store';

export const matchFlavours = Utils.matchFlavours;
const IS_FIREFOX = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
const isWeb = typeof window !== 'undefined';
const isFirefox = isWeb && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
export function caretRangeFromPoint(clientX, clientY) {
if (IS_FIREFOX) {
if (isFirefox) {
// @ts-ignore

@@ -13,0 +14,0 @@ const caret = document.caretPositionFromPoint(clientX, clientY);

@@ -5,3 +5,3 @@ import { showFormatQuickBar } from '../../components/format-quick-bar';

import { getBlockEditingStateByPosition } from './utils';
import { matchFlavours } from '@blocksuite/store/src/utils/utils';
import { Utils } from '@blocksuite/store';
function intersects(rect, selectionRect, offset) {

@@ -176,3 +176,6 @@ return (rect.left < selectionRect.right + offset.x &&

if (clickBlockInfo &&
matchFlavours(clickBlockInfo.model, ['affine:embed', 'affine:divider'])) {
Utils.matchFlavours(clickBlockInfo.model, [
'affine:embed',
'affine:divider',
])) {
this.state.type = 'block';

@@ -179,0 +182,0 @@ window.getSelection()?.removeAllRanges();

{
"name": "@blocksuite/blocks",
"version": "0.3.0-alpha.13",
"version": "0.3.0-alpha.14",
"description": "Default BlockSuite editable blocks.",

@@ -11,3 +11,3 @@ "main": "dist/index.js",

"dependencies": {
"@blocksuite/store": "0.3.0-alpha.13",
"@blocksuite/store": "0.3.0-alpha.14",
"highlight.js": "^11.7.0",

@@ -14,0 +14,0 @@ "@tldraw/intersect": "^1.8.0",

@@ -171,3 +171,3 @@ // operations used in rich-text level

previousSibling &&
matchFlavours(previousSibling, ['affine:paragraph'])
matchFlavours(previousSibling, ['affine:paragraph', 'affine:list'])
) {

@@ -174,0 +174,0 @@ page.captureSync();

@@ -13,3 +13,5 @@ import { Utils } from '@blocksuite/store';

const IS_FIREFOX = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
const isWeb = typeof window !== 'undefined';
const isFirefox =
isWeb && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;

@@ -20,3 +22,3 @@ export function caretRangeFromPoint(

): Range | null {
if (IS_FIREFOX) {
if (isFirefox) {
// @ts-ignore

@@ -23,0 +25,0 @@ const caret = document.caretPositionFromPoint(clientX, clientY);

@@ -30,3 +30,3 @@ import type { BaseBlockModel, Page } from '@blocksuite/store';

import { getBlockEditingStateByPosition } from './utils';
import { matchFlavours } from '@blocksuite/store/src/utils/utils';
import { Utils } from '@blocksuite/store';
import type { DefaultPageBlockComponent } from './default-page-block';

@@ -423,3 +423,6 @@

clickBlockInfo &&
matchFlavours(clickBlockInfo.model, ['affine:embed', 'affine:divider'])
Utils.matchFlavours(clickBlockInfo.model, [
'affine:embed',
'affine:divider',
])
) {

@@ -426,0 +429,0 @@ this.state.type = 'block';

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

Sorry, the diff of this file is too big to display

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc