@blockprotocol/core
Advanced tools
Comparing version 0.1.0-canary-20230223145025 to 0.1.0-canary-20230225164454
@@ -12,7 +12,8 @@ import { RefObject } from "react"; | ||
Handler: ModuleConstructor<T>; | ||
constructorArgs?: { | ||
constructorArgs?: Omit<{ | ||
callbacks?: Record<string, GenericMessageCallback> | undefined; | ||
} | undefined; | ||
element?: HTMLElement | null | undefined; | ||
}, "element"> | undefined; | ||
ref: RefObject<HTMLElement>; | ||
}) => T; | ||
export {}; |
@@ -26,2 +26,3 @@ import { CoreHandler } from "./core-handler"; | ||
} | string; | ||
type VersionedUrl = `${string}v/${number}`; | ||
export type BlockMetadata = { | ||
@@ -37,5 +38,5 @@ /** | ||
/** | ||
* The default data used as the block's properties on first load - must comply with its schema | ||
* The commit hash of the source this block was built from. If specified, 'repository' must also be specified. | ||
*/ | ||
default?: JsonObject | null; | ||
commit?: string; | ||
/** | ||
@@ -54,3 +55,3 @@ * A short description of the block, to help users understand its capabilities | ||
/** | ||
* A list of examples used to showcase a block's capabilities | ||
* A list of examples property objects which comply with the block's schema, for demonstration purposes | ||
*/ | ||
@@ -79,3 +80,3 @@ examples?: JsonObject[] | null; | ||
/** | ||
* The applicable block protocol version. | ||
* The applicable block protocol version, e.g. 0.3 | ||
*/ | ||
@@ -85,8 +86,9 @@ protocol: string; | ||
* Specify the place where your block's code lives. This is helpful for people who want to explore the source, or contribute to your block's development. | ||
* @see also 'commit'. | ||
*/ | ||
repository?: BlockMetadataRepository | null; | ||
/** | ||
* The path or URL to the block's schema (e.g. block-schema.json) | ||
* The versioned URL to the block's schema | ||
*/ | ||
schema: string; | ||
schema: VersionedUrl; | ||
/** | ||
@@ -106,3 +108,3 @@ * The path or URL to the entrypoint source file (e.g. index.html, index.js). | ||
export type MessageError<ErrorCode extends string> = { | ||
code: ErrorCode; | ||
code: ErrorCode | "INTERNAL_ERROR"; | ||
message: string; | ||
@@ -109,0 +111,0 @@ extensions?: any; |
@@ -12,7 +12,8 @@ import { RefObject } from "react"; | ||
Handler: ModuleConstructor<T>; | ||
constructorArgs?: { | ||
constructorArgs?: Omit<{ | ||
callbacks?: Record<string, GenericMessageCallback> | undefined; | ||
} | undefined; | ||
element?: HTMLElement | null | undefined; | ||
}, "element"> | undefined; | ||
ref: RefObject<HTMLElement>; | ||
}) => T; | ||
export {}; |
@@ -26,2 +26,3 @@ import { CoreHandler } from "./core-handler"; | ||
} | string; | ||
type VersionedUrl = `${string}v/${number}`; | ||
export type BlockMetadata = { | ||
@@ -37,5 +38,5 @@ /** | ||
/** | ||
* The default data used as the block's properties on first load - must comply with its schema | ||
* The commit hash of the source this block was built from. If specified, 'repository' must also be specified. | ||
*/ | ||
default?: JsonObject | null; | ||
commit?: string; | ||
/** | ||
@@ -54,3 +55,3 @@ * A short description of the block, to help users understand its capabilities | ||
/** | ||
* A list of examples used to showcase a block's capabilities | ||
* A list of examples property objects which comply with the block's schema, for demonstration purposes | ||
*/ | ||
@@ -79,3 +80,3 @@ examples?: JsonObject[] | null; | ||
/** | ||
* The applicable block protocol version. | ||
* The applicable block protocol version, e.g. 0.3 | ||
*/ | ||
@@ -85,8 +86,9 @@ protocol: string; | ||
* Specify the place where your block's code lives. This is helpful for people who want to explore the source, or contribute to your block's development. | ||
* @see also 'commit'. | ||
*/ | ||
repository?: BlockMetadataRepository | null; | ||
/** | ||
* The path or URL to the block's schema (e.g. block-schema.json) | ||
* The versioned URL to the block's schema | ||
*/ | ||
schema: string; | ||
schema: VersionedUrl; | ||
/** | ||
@@ -106,3 +108,3 @@ * The path or URL to the entrypoint source file (e.g. index.html, index.js). | ||
export type MessageError<ErrorCode extends string> = { | ||
code: ErrorCode; | ||
code: ErrorCode | "INTERNAL_ERROR"; | ||
message: string; | ||
@@ -109,0 +111,0 @@ extensions?: any; |
{ | ||
"name": "@blockprotocol/core", | ||
"version": "0.1.0-canary-20230223145025", | ||
"version": "0.1.0-canary-20230225164454", | ||
"description": "Implementation of the Block Protocol Core specification for blocks and embedding applications", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
262730
2721