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

@blocksuite/global

Package Overview
Dependencies
Maintainers
5
Versions
1141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blocksuite/global - npm Package Compare versions

Comparing version 0.4.0-20230115125610-fb61886 to 0.4.0-20230116190618-0dc5fd3

2

dist/utils.js

@@ -23,3 +23,3 @@ export const SYS_KEYS = new Set(['id', 'flavour', 'children']);

if (a && b) {
if (!Object.is(a, b)) {
if (!Object.is(val, expected)) {
throw new Error('val is not same as expected');

@@ -26,0 +26,0 @@ }

@@ -28,2 +28,71 @@ declare module 'quill' {

import { TextType } from '@blocksuite/store';
interface SchemaMeta {
/**
* color of the tag
*/
color: `#${string}`;
/**
* width of a column
*/
width: number; // px
/**
* whether this display in the table
*/
hide: boolean;
}
// Threat this type as a column type
interface BaseTagSchema<BaseValue = unknown> {
/**
* each instance of tag type has its own unique uuid
*/
id: string;
type: string;
/**
* column name
*/
name: string;
meta: SchemaMeta;
/**
* this value is just for hold the `BaseValue`,
* don't use this value in the runtime.
*/
__$TYPE_HOLDER$__?: BaseValue;
}
interface TextTagSchema extends BaseTagSchema<string> {
type: 'text';
}
interface NumberTagSchema extends BaseTagSchema<number> {
type: 'number';
decimal: number;
}
interface SelectTagSchema<Selection extends string = string>
extends BaseTagSchema<string> {
type: 'select';
selection: Selection[];
}
interface RichTextTagSchema extends BaseTagSchema<TextType> {
type: 'rich-text';
}
type TagSchema =
| SelectTagSchema
| NumberTagSchema
| TextTagSchema
| RichTextTagSchema;
// threat this type as row type
interface BlockTag<Schema extends TagSchema = TagSchema> {
type: Schema['id'];
value: Schema extends BaseTagSchema<infer U>
? U
: Type extends BlockColumnType
? undefined
: never;
}
interface IBaseBlockProps {

@@ -30,0 +99,0 @@ flavour: string;

{
"name": "@blocksuite/global",
"version": "0.4.0-20230115125610-fb61886",
"version": "0.4.0-20230116190618-0dc5fd3",
"types": "./index.d.ts",

@@ -5,0 +5,0 @@ "type": "module",

@@ -47,3 +47,3 @@ export const SYS_KEYS = new Set(['id', 'flavour', 'children']);

if (a && b) {
if (!Object.is(a, b)) {
if (!Object.is(val, expected)) {
throw new Error('val is not same as expected');

@@ -50,0 +50,0 @@ }

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