@textbus/core
Advanced tools
Comparing version 2.0.0-alpha.33 to 2.0.0-alpha.34
@@ -8,6 +8,11 @@ import { Draft } from 'immer'; | ||
import { Slots } from './slots'; | ||
export interface ComponentData<State = unknown> { | ||
export interface SlotsComponentData<State> { | ||
slots: Slot[]; | ||
state?: State; | ||
} | ||
export interface StateComponentData<State> { | ||
slots?: Slot[]; | ||
state?: State | null; | ||
state: State; | ||
} | ||
export declare type ComponentData<State = unknown> = SlotsComponentData<State> | StateComponentData<State>; | ||
export interface ComponentLiteral<State = any> { | ||
@@ -14,0 +19,0 @@ name: string; |
@@ -39,3 +39,3 @@ import { produce, enablePatches } from 'immer'; | ||
name: options.name, | ||
createInstance(contextInjector, initData = {}) { | ||
createInstance(contextInjector, initData = { slots: [] }) { | ||
const marker = new ChangeMarker(); | ||
@@ -42,0 +42,0 @@ const stateChangeSubject = new Subject(); |
{ | ||
"name": "@textbus/core", | ||
"version": "2.0.0-alpha.33", | ||
"version": "2.0.0-alpha.34", | ||
"description": "TextBus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.", | ||
@@ -43,3 +43,3 @@ "main": "./bundles/public-api.js", | ||
}, | ||
"gitHead": "feae02fc4f039bca2deb714b8a2efe75a673f11a" | ||
"gitHead": "1bb03e6d9d559d8af5274e27673384ea0a87b605" | ||
} |
Sorry, the diff of this file is not supported yet
409303
6658