New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@blocksuite/block-std

Package Overview
Dependencies
Maintainers
5
Versions
922
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blocksuite/block-std - npm Package Compare versions

Comparing version 0.0.0-20230814000457-ce469d9b-nightly to 0.0.0-20230814155455-ceb5d5d8-nightly

2

dist/selection/base.d.ts

@@ -6,2 +6,3 @@ export type BaseSelectionOptions = {

static readonly type: string;
static readonly group: string;
readonly path: string[];

@@ -12,2 +13,3 @@ constructor({ path }: BaseSelectionOptions);

get type(): BlockSuiteSelectionType;
get group(): string;
abstract equals(other: BaseSelection): boolean;

@@ -14,0 +16,0 @@ abstract toJSON(): Record<string, unknown>;

@@ -16,2 +16,5 @@ import { PathFinder } from '../utils/index.js';

}
get group() {
return this.constructor.group;
}
static fromJSON(_) {

@@ -18,0 +21,0 @@ throw new Error('You must override this method');

@@ -25,2 +25,4 @@ import { DisposableGroup, Slot } from '@blocksuite/store';

set(selections: BaseSelection[]): void;
setGroup(group: string, selections: BaseSelection[]): void;
getGroup(group: string): BaseSelection[];
update(fn: (currentSelections: BaseSelection[]) => BaseSelection[]): void;

@@ -27,0 +29,0 @@ clear(types?: string[]): void;

@@ -58,2 +58,9 @@ import { DisposableGroup, Slot } from '@blocksuite/store';

}
setGroup(group, selections) {
const current = this.value.filter(s => s.group !== group);
this.set([...current, ...selections]);
}
getGroup(group) {
return this.value.filter(s => s.group === group);
}
update(fn) {

@@ -60,0 +67,0 @@ const selections = fn(this.value);

import { BaseSelection } from '../base.js';
export declare class BlockSelection extends BaseSelection {
static type: string;
static group: string;
equals(other: BaseSelection): boolean;

@@ -5,0 +6,0 @@ toJSON(): Record<string, unknown>;

@@ -23,2 +23,3 @@ import { PathFinder } from '../../utils/index.js';

BlockSelection.type = 'block';
BlockSelection.group = 'note';
//# sourceMappingURL=block.js.map
import { BaseSelection } from '../base.js';
export declare class SurfaceSelection extends BaseSelection {
static type: string;
static group: string;
readonly elements: string[];

@@ -5,0 +6,0 @@ readonly editing: boolean;

@@ -32,2 +32,3 @@ import { BaseSelection } from '../base.js';

SurfaceSelection.type = 'surface';
SurfaceSelection.group = 'edgeless';
//# sourceMappingURL=surface.js.map

@@ -13,2 +13,3 @@ import { BaseSelection } from '../base.js';

static type: string;
static group: string;
from: TextRangePoint;

@@ -15,0 +16,0 @@ to: TextRangePoint | null;

@@ -51,2 +51,3 @@ import { PathFinder } from '../../utils/path-finder.js';

TextSelection.type = 'text';
TextSelection.group = 'note';
//# sourceMappingURL=text.js.map

8

package.json
{
"name": "@blocksuite/block-std",
"version": "0.0.0-20230814000457-ce469d9b-nightly",
"version": "0.0.0-20230814155455-ceb5d5d8-nightly",
"description": "Std for blocksuite blocks",

@@ -12,10 +12,10 @@ "main": "dist/index.js",

"peerDependencies": {
"@blocksuite/store": "0.0.0-20230814000457-ce469d9b-nightly"
"@blocksuite/store": "0.0.0-20230814155455-ceb5d5d8-nightly"
},
"dependencies": {
"w3c-keyname": "^2.2.8",
"@blocksuite/global": "0.0.0-20230814000457-ce469d9b-nightly"
"@blocksuite/global": "0.0.0-20230814155455-ceb5d5d8-nightly"
},
"devDependencies": {
"@blocksuite/store": "0.0.0-20230814000457-ce469d9b-nightly"
"@blocksuite/store": "0.0.0-20230814155455-ceb5d5d8-nightly"
},

@@ -22,0 +22,0 @@ "exports": {

@@ -6,2 +6,3 @@ import { PathFinder } from '../utils/index.js';

type: string;
group: string;
};

@@ -15,2 +16,3 @@

static readonly type: string;
static readonly group: string;
readonly path: string[];

@@ -37,2 +39,6 @@

get group(): string {
return (this.constructor as SelectionConstructor).group;
}
abstract equals(other: BaseSelection): boolean;

@@ -39,0 +45,0 @@

@@ -78,2 +78,11 @@ import type { StackItem } from '@blocksuite/store';

setGroup(group: string, selections: BaseSelection[]) {
const current = this.value.filter(s => s.group !== group);
this.set([...current, ...selections]);
}
getGroup(group: string) {
return this.value.filter(s => s.group === group);
}
update(fn: (currentSelections: BaseSelection[]) => BaseSelection[]) {

@@ -80,0 +89,0 @@ const selections = fn(this.value);

@@ -6,2 +6,3 @@ import { PathFinder } from '../../utils/index.js';

static override type = 'block';
static override group = 'note';

@@ -8,0 +9,0 @@ override equals(other: BaseSelection): boolean {

@@ -5,2 +5,3 @@ import { BaseSelection } from '../base.js';

static override type = 'surface';
static override group = 'edgeless';

@@ -7,0 +8,0 @@ readonly elements: string[];

@@ -17,2 +17,3 @@ import { PathFinder } from '../../utils/path-finder.js';

static override type = 'text';
static override group = 'note';

@@ -19,0 +20,0 @@ from: TextRangePoint;

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 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 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 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