@blocksuite/global
Advanced tools
Comparing version 0.4.0-20230201220903-262005c to 0.4.0-20230203001426-a8854f1
export * from './consts/blockhub.js'; | ||
export * from './consts/database-block.js'; | ||
export * from './consts/affine-style-consts.js'; | ||
@@ -4,0 +3,0 @@ export declare const BLOCK_ID_ATTR: "data-block-id"; |
export * from './consts/blockhub.js'; | ||
export * from './consts/database-block.js'; | ||
export * from './consts/affine-style-consts.js'; | ||
@@ -4,0 +3,0 @@ export const BLOCK_ID_ATTR = 'data-block-id'; |
@@ -80,73 +80,3 @@ // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
declare namespace BlockSuiteInternal { | ||
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; | ||
} | ||
import type { TextType } from '@blocksuite/store'; | ||
interface IBaseBlockProps { | ||
@@ -153,0 +83,0 @@ flavour: string; |
{ | ||
"name": "@blocksuite/global", | ||
"version": "0.4.0-20230201220903-262005c", | ||
"version": "0.4.0-20230203001426-a8854f1", | ||
"types": "./index.d.ts", | ||
@@ -8,2 +8,3 @@ "type": "module", | ||
".": "./index.d.ts", | ||
"./database": "./dist/database.js", | ||
"./utils": "./dist/utils.js", | ||
@@ -10,0 +11,0 @@ "./debug": "./dist/debug.js", |
export * from './consts/blockhub.js'; | ||
export * from './consts/database-block.js'; | ||
export * from './consts/affine-style-consts.js'; | ||
@@ -4,0 +3,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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71
239276
2918