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

@blocksuite/store

Package Overview
Dependencies
Maintainers
5
Versions
1252
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blocksuite/store - npm Package Compare versions

Comparing version 0.3.0-alpha.16 to 0.3.0-alpha.17

2

dist/__tests__/test-utils-dom.d.ts

@@ -1,2 +0,2 @@

import type { Workspace } from '../workspace/workspace';
import type { Workspace } from '../workspace/workspace.js';
declare global {

@@ -3,0 +3,0 @@ interface WindowEventMap {

import type { RelativePosition } from 'yjs';
import type { Awareness } from 'y-protocols/awareness.js';
import type { Space } from './space';
import type { Space } from './space.js';
import { Signal } from './utils/signal.js';

@@ -5,0 +5,0 @@ export interface SelectionRange {

@@ -1,3 +0,3 @@

import type { Page } from './workspace';
import type { TextType } from './text-adapter';
import type { Page } from './workspace/index.js';
import type { TextType } from './text-adapter.js';
import { Signal } from './utils/signal.js';

@@ -4,0 +4,0 @@ interface StaticValue {

import { Signal } from '../utils/signal.js';
import type { BlobId, BlobProvider, BlobURL, IDBInstance } from './types';
import type { BlobId, BlobProvider, BlobURL, IDBInstance } from './types.js';
export declare class IndexedDBBlobProvider implements BlobProvider {

@@ -4,0 +4,0 @@ private readonly _database;

import { Signal } from '../utils/signal.js';
import type { BlobId, BlobProvider, BlobURL } from './types';
import type { BlobId, BlobProvider, BlobURL } from './types.js';
export declare class BlobStorage {

@@ -4,0 +4,0 @@ private _providers;

@@ -1,2 +0,2 @@

import type { Signal } from '../utils/signal';
import type { Signal } from '../utils/signal.js';
export declare type BlobId = string;

@@ -3,0 +3,0 @@ export declare type BlobURL = string;

@@ -1,4 +0,4 @@

/// <reference types="node" />
/// <reference types="node" resolution-mode="require"/>
import type { Buffer } from 'buffer';
import type { IDBInstance } from './types';
import type { IDBInstance } from './types.js';
export declare function sha3(buffer: Buffer): string;

@@ -5,0 +5,0 @@ export declare function getDatabase<T = ArrayBufferLike>(type: string, database: string): IDBInstance<T>;

@@ -13,6 +13,6 @@ import type * as Y from 'yjs';

awareness?: Awareness;
connect: () => void;
disconnect: () => void;
clearData: () => Promise<void>;
destroy: () => void;
connect?: () => void;
disconnect?: () => void;
clearData?: () => Promise<void>;
destroy?: () => void;
}

@@ -19,0 +19,0 @@ /** See {@link DocProvider} */

@@ -0,1 +1,2 @@

// @ts-ignore
import { WebrtcProvider } from 'y-webrtc';

@@ -2,0 +3,0 @@ import { IndexeddbPersistence } from 'y-indexeddb';

import type * as Y from 'yjs';
import { Awareness } from 'y-protocols/awareness.js';
import { AwarenessAdapter, SelectionRange } from './awareness.js';
import type { RichTextAdapter } from './text-adapter';
import type { RichTextAdapter } from './text-adapter.js';
export interface StackItem {

@@ -6,0 +6,0 @@ meta: Map<'cursor-location', SelectionRange | undefined>;

@@ -1,6 +0,6 @@

import type { Space } from './space';
import type { IdGenerator } from './utils/id-generator';
import type { Space } from './space.js';
import type { IdGenerator } from './utils/id-generator.js';
import { Awareness } from 'y-protocols/awareness.js';
import * as Y from 'yjs';
import type { DocProvider, DocProviderConstructor } from './doc-providers';
import type { DocProvider, DocProviderConstructor } from './doc-providers.js';
export interface SerializedStore {

@@ -7,0 +7,0 @@ [key: string]: {

import { Awareness } from 'y-protocols/awareness.js';
import * as Y from 'yjs';
import { serializeYDoc, yDocToJSXNode } from './utils/jsx.js';
import { createAutoIncrementIdGenerator, createAutoIncrementIdGeneratorByClientId, uuidv4, } from './utils/id-generator';
import { createAutoIncrementIdGenerator, createAutoIncrementIdGeneratorByClientId, uuidv4, } from './utils/id-generator.js';
export var Generator;

@@ -6,0 +6,0 @@ (function (Generator) {

import * as Y from 'yjs';
import type { AwarenessAdapter } from './awareness';
import type { AwarenessAdapter } from './awareness.js';
import type { DeltaOperation, Quill } from 'quill';
import type { Space } from './space';
import type { Space } from './space.js';
declare type PrelimTextType = 'splitLeft' | 'splitRight';

@@ -6,0 +6,0 @@ export declare type TextType = PrelimText | Text;

@@ -1,5 +0,5 @@

import type { BaseBlockModel } from '../base';
import type { BlockProps, PrefixedBlockProps, YBlock, YBlocks } from '../workspace/page';
import type { BaseBlockModel } from '../base.js';
import type { BlockProps, PrefixedBlockProps, YBlock, YBlocks } from '../workspace/page.js';
import { PrelimText, Text, TextType } from '../text-adapter.js';
import type { Workspace } from '../workspace';
import type { Workspace } from '../workspace/index.js';
export declare function assertExists<T>(val: T | null | undefined): asserts val is T;

@@ -6,0 +6,0 @@ export declare function assertFlavours(model: BaseBlockModel, allowed: string[]): void;

@@ -1,2 +0,2 @@

import type { PageMeta, Workspace } from '../workspace';
import type { PageMeta, Workspace } from '../workspace.js';
import { LitElement, PropertyValues } from 'lit';

@@ -10,4 +10,4 @@ export declare class TestApp extends LitElement {

firstUpdated(changedProps: PropertyValues): void;
render(): import("lit").TemplateResult<1>;
render(): import("lit-html").TemplateResult<1>;
}
//# sourceMappingURL=test-app.d.ts.map
import * as Y from 'yjs';
import type Quill from 'quill';
import type { Quill } from 'quill';
import type { Awareness } from 'y-protocols/awareness';

@@ -7,5 +7,5 @@ import { BaseBlockModel } from '../base.js';

import { Text, PrelimText, TextType } from '../text-adapter.js';
import type { IdGenerator } from '../utils/id-generator';
import type { IdGenerator } from '../utils/id-generator.js';
import { Signal } from '../utils/signal.js';
import type { PageMeta, Workspace } from './workspace';
import type { PageMeta, Workspace } from './workspace.js';
export declare type YBlock = Y.Map<unknown>;

@@ -12,0 +12,0 @@ export declare type YBlocks = Y.Map<YBlock>;

@@ -8,3 +8,3 @@ import * as Y from 'yjs';

import type { Awareness } from 'y-protocols/awareness';
import type { BaseBlockModel } from '../base';
import type { BaseBlockModel } from '../base.js';
import { BlobStorage } from '../blob/index.js';

@@ -11,0 +11,0 @@ export interface PageMeta {

{
"name": "@blocksuite/store",
"version": "0.3.0-alpha.16",
"version": "0.3.0-alpha.17",
"description": "BlockSuite data store built for general purpose state management.",

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

"dependencies": {
"@types/flexsearch": "^0.7.3",
"@types/quill": "^1.3.7",
"buffer": "^6.0.3",

@@ -24,4 +26,2 @@ "flexsearch": "0.7.21",

"devDependencies": {
"@types/flexsearch": "^0.7.3",
"@types/quill": "^2.0.9",
"cross-env": "^7.0.3",

@@ -28,0 +28,0 @@ "lit": "^2.3.1"

@@ -1,2 +0,2 @@

import type { Workspace } from '../workspace/workspace';
import type { Workspace } from '../workspace/workspace.js';

@@ -3,0 +3,0 @@ declare global {

import { Page, expect } from '@playwright/test';
import type { TestResult } from './test-utils-dom';
import type { TestResult } from './test-utils-dom.js';

@@ -4,0 +4,0 @@ // TODO: use custom playwright reporter

import * as Y from 'yjs';
import type { RelativePosition } from 'yjs';
import type { Awareness } from 'y-protocols/awareness.js';
import type { Space } from './space';
import type { Space } from './space.js';
import { Signal } from './utils/signal.js';

@@ -6,0 +6,0 @@

@@ -1,3 +0,3 @@

import type { Page } from './workspace';
import type { TextType } from './text-adapter';
import type { Page } from './workspace/index.js';
import type { TextType } from './text-adapter.js';
import { Signal } from './utils/signal.js';

@@ -4,0 +4,0 @@

@@ -5,3 +5,3 @@ import { Buffer } from 'buffer';

import type { BlobId, BlobProvider, BlobURL, IDBInstance } from './types';
import type { BlobId, BlobProvider, BlobURL, IDBInstance } from './types.js';
import { getDatabase, sha3, sleep } from './utils.js';

@@ -8,0 +8,0 @@

import { Signal } from '../utils/signal.js';
import type { BlobId, BlobProvider, BlobURL } from './types';
import type { BlobId, BlobProvider, BlobURL } from './types.js';

@@ -4,0 +4,0 @@ export class BlobStorage {

@@ -1,2 +0,2 @@

import type { Signal } from '../utils/signal';
import type { Signal } from '../utils/signal.js';

@@ -3,0 +3,0 @@ export type BlobId = string;

import type { Buffer } from 'buffer';
import { createStore, del, get, keys, set, clear } from 'idb-keyval';
import { SHA3 } from 'sha3';
import type { IDBInstance } from './types';
import type { IDBInstance } from './types.js';

@@ -6,0 +6,0 @@ const hash = new SHA3(256);

import type * as Y from 'yjs';
// @ts-ignore
import { WebrtcProvider } from 'y-webrtc';

@@ -14,6 +15,6 @@ import { IndexeddbPersistence } from 'y-indexeddb';

awareness?: Awareness;
connect: () => void;
disconnect: () => void;
clearData: () => Promise<void>;
destroy: () => void;
connect?: () => void;
disconnect?: () => void;
clearData?: () => Promise<void>;
destroy?: () => void;
}

@@ -20,0 +21,0 @@

import type * as Y from 'yjs';
import { Awareness } from 'y-protocols/awareness.js';
import { AwarenessAdapter, SelectionRange } from './awareness.js';
import type { RichTextAdapter } from './text-adapter';
import type { RichTextAdapter } from './text-adapter.js';

@@ -6,0 +6,0 @@ export interface StackItem {

@@ -1,6 +0,6 @@

import type { Space } from './space';
import type { IdGenerator } from './utils/id-generator';
import type { Space } from './space.js';
import type { IdGenerator } from './utils/id-generator.js';
import { Awareness } from 'y-protocols/awareness.js';
import * as Y from 'yjs';
import type { DocProvider, DocProviderConstructor } from './doc-providers';
import type { DocProvider, DocProviderConstructor } from './doc-providers.js';
import { serializeYDoc, yDocToJSXNode } from './utils/jsx.js';

@@ -11,3 +11,3 @@ import {

uuidv4,
} from './utils/id-generator';
} from './utils/id-generator.js';

@@ -14,0 +14,0 @@ export interface SerializedStore {

/* eslint-disable @typescript-eslint/no-explicit-any */
import * as Y from 'yjs';
import type { AwarenessAdapter } from './awareness';
import type { AwarenessAdapter } from './awareness.js';
import type { DeltaOperation, Quill } from 'quill';
import type { Space } from './space';
import type { Space } from './space.js';

@@ -7,0 +7,0 @@ type PrelimTextType = 'splitLeft' | 'splitRight';

import { AbstractType, Doc, Map, Text, Array } from 'yjs';
import type { PrefixedBlockProps } from '../workspace/page';
import type { PrefixedBlockProps } from '../workspace/page.js';

@@ -4,0 +4,0 @@ type DocRecord = {

import * as Y from 'yjs';
import type { BaseBlockModel } from '../base';
import type { BaseBlockModel } from '../base.js';
import type {

@@ -8,5 +8,5 @@ BlockProps,

YBlocks,
} from '../workspace/page';
} from '../workspace/page.js';
import { PrelimText, Text, TextType } from '../text-adapter.js';
import type { Workspace } from '../workspace';
import type { Workspace } from '../workspace/index.js';
import { fromBase64, toBase64 } from 'lib0/buffer.js';

@@ -13,0 +13,0 @@

@@ -1,2 +0,2 @@

import type { PageMeta, Workspace } from '../workspace';
import type { PageMeta, Workspace } from '../workspace.js';
import { LitElement, html, PropertyValues } from 'lit';

@@ -3,0 +3,0 @@ import { customElement, property, query } from 'lit/decorators.js';

// Test page entry located in playground/examples/workspace/index.html
import { Workspace } from '../workspace.js';
import type { TestApp } from './test-app';
import type { TestApp } from './test-app.js';
import {

@@ -5,0 +5,0 @@ testSerial,

import * as Y from 'yjs';
import type Quill from 'quill';
import type { Quill } from 'quill';
import type { Awareness } from 'y-protocols/awareness';

@@ -13,3 +13,3 @@ import { uuidv4 } from 'lib0/random.js';

} from '../text-adapter.js';
import type { IdGenerator } from '../utils/id-generator';
import type { IdGenerator } from '../utils/id-generator.js';
import { Signal } from '../utils/signal.js';

@@ -24,3 +24,3 @@ import {

} from '../utils/utils.js';
import type { PageMeta, Workspace } from './workspace';
import type { PageMeta, Workspace } from './workspace.js';

@@ -27,0 +27,0 @@ export type YBlock = Y.Map<unknown>;

import FlexSearch from 'flexsearch';
import type { DocumentSearchOptions } from 'flexsearch';
import { Doc, Map as YMap, Text as YText } from 'yjs';
import type { YBlock } from './page';
import type { YBlock } from './page.js';

@@ -6,0 +6,0 @@ const DocumentIndexer = FlexSearch.Document;

@@ -8,3 +8,3 @@ import * as Y from 'yjs';

import type { Awareness } from 'y-protocols/awareness';
import type { BaseBlockModel } from '../base';
import type { BaseBlockModel } from '../base.js';
import { BlobStorage, getBlobStorage } from '../blob/index.js';

@@ -11,0 +11,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

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

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