import{_ as e,c as o,o as l,a as r}from"./app.d1307649.js";const g='{"title":"@schlechtenburg/core","description":"","frontmatter":{},"headers":[{"level":2,"title":"SbMode","slug":"sbmode"},{"level":2,"title":"IBlockData","slug":"iblockdata-t"},{"level":2,"title":"IBlockDefinition","slug":"iblockdefinition-t"},{"level":2,"title":"IBlockLibrary","slug":"iblocklibrary"},{"level":2,"title":"IBlockProps","slug":"iblockprops-t"},{"level":2,"title":"ISbMainProps","slug":"isbmainprops"},{"level":2,"title":"ITreeNode","slug":"itreenode"},{"level":2,"title":"OnActivateNextCb","slug":"onactivatenextcb"},{"level":2,"title":"OnActivatePreviousCb","slug":"onactivatepreviouscb"},{"level":2,"title":"OnAppendBlockCb","slug":"onappendblockcb"},{"level":2,"title":"OnPrependBlockCb","slug":"onprependblockcb"},{"level":2,"title":"OnRemoveSelfCb","slug":"onremoveselfcb"},{"level":2,"title":"OnUpdateBlockCb","slug":"onupdateblockcb"},{"level":2,"title":"OnUpdateSelfCb","slug":"onupdateselfcb-t"},{"level":2,"title":"SbBlock","slug":"sbblock"},{"level":3,"title":"Props","slug":"props"},{"level":2,"title":"SbBlockOrdering","slug":"sbblockordering"},{"level":3,"title":"Props","slug":"props-1"},{"level":2,"title":"SbBlockPicker","slug":"sbblockpicker"},{"level":3,"title":"Props","slug":"props-2"},{"level":2,"title":"SbBlockPlaceholder","slug":"sbblockplaceholder"},{"level":3,"title":"Props","slug":"props-3"},{"level":2,"title":"SbButton","slug":"sbbutton"},{"level":3,"title":"Props","slug":"props-4"},{"level":2,"title":"SbMain","slug":"sbmain"},{"level":2,"title":"SbSelect","slug":"sbselect"},{"level":3,"title":"Props","slug":"props-5"},{"level":2,"title":"SbToolbar","slug":"sbtoolbar"},{"level":3,"title":"Props","slug":"props-6"},{"level":2,"title":"SymActiveBlock","slug":"symactiveblock"},{"level":2,"title":"SymBlockDimensions","slug":"symblockdimensions"},{"level":2,"title":"SymBlockLibrary","slug":"symblocklibrary"},{"level":2,"title":"SymEditorDimensions","slug":"symeditordimensions"},{"level":2,"title":"SymMode","slug":"symmode"},{"level":2,"title":"blockProps","slug":"blockprops"},{"level":2,"title":"model","slug":"model"},{"level":2,"title":"generateBlockId","slug":"generateblockid"},{"level":2,"title":"useActivation","slug":"useactivation"},{"level":2,"title":"useBlockSizing","slug":"useblocksizing"},{"level":2,"title":"useDynamicBlocks","slug":"usedynamicblocks"},{"level":2,"title":"useResizeObserver","slug":"useresizeobserver"}],"relativePath":"api/@schlechtenburg/core.md"}',a={},i=r('

@schlechtenburg/core

SbMode

The mode the Schlechtenburg editor is currently in

  • Type Enumeration

  • Members

    • Edit: undefined
    • View: undefined

IBlockData<T>

Schlechtenburg inputs and outputs a plain JS Object that can be JSON stringified. This is the interface type for that data structure. T will be the data type of the specific block being

  • Type Interface

  • Members

    • data: T
    • id: string
    • name: string

IBlockDefinition<T>

Any Block that you create

  • Type Interface

  • Members

    • edit: Component
    • getDefaultData: T
    • icon: string
    • name: string
    • view: Component

IBlockLibrary

Schlechtenburg maintains a library of blocks that are available

  • Type Interface

IBlockProps<T>

Any Block that you create

  • Type Interface

  • Members

    • blockId: string
    • data: T
    • onActivateNext: OnActivateNextCb
    • onActivatePrevious: OnActivatePreviousCb
    • onAppendBlock: OnAppendBlockCb
    • onPrependBlock: OnPrependBlockCb
    • onRemoveSelf: OnRemoveSelfCb
    • onUpdate: OnUpdateSelfCb

ISbMainProps

  • Type Interface

  • Members

    • availableBlocks: undefined
    • block: IBlockData
    • mode: SbMode
    • onUpdate: OnUpdateBlockCb

ITreeNode

Schlechtenburg keeps track of the rendered block tree. This is useful for e.g. the tree select component in the editor header.

  • Type Interface

  • Members

    • children: undefined
    • icon: string
    • id: string
    • name: string

OnActivateNextCb

  • Type Type alias

OnActivatePreviousCb

  • Type Type alias

OnAppendBlockCb

  • Type Type alias

OnPrependBlockCb

  • Type Type alias

OnRemoveSelfCb

  • Type Type alias

OnUpdateBlockCb

  • Type Type alias

OnUpdateSelfCb<T>

  • Type Type alias

SbBlock

Displays a Schlechtenburg block either the mode of the schlechtenburg instance. You can use this to display child blocks inside your own blocks.

  • Type: Component

Props

block

The state for the block.

  • Type IBlockData<any>

onUpdate

Called when the block should be updated.

  • Type OnUpdateBlockCb

  • Default value () => {}

onPrependBlock

Called when a sibling block should be inserted before the block

  • Type OnPrependBlockCb

  • Default value () => {}

onAppendBlock

Called when a sibling block should be inserted after the block

  • Type OnAppendBlockCb

  • Default value () => {}

onRemoveSelf

Called when the block should be removed

  • Type OnRemoveSelfCb

  • Default value () => {}

onActivatePrevious

Called when the previous sibling block should be activated

  • Type OnActivatePreviousCb

  • Default value () => {}

onActivateNext

Called when the next sibling block should be activated

  • Type OnActivateNextCb

  • Default value () => {}

SbBlockOrdering

  • Type: Component

Props

orientation

  • Type string

  • Default value null

onRemove

  • Type func

  • Default value () => {}

onMoveBackward

  • Type func

  • Default value () => {}

onMoveForward

  • Type func

  • Default value () => {}

SbBlockPicker

  • Type: Component

Props

onPickedBlock

  • Type func

  • Default value () => {}

SbBlockPlaceholder

A placeholder for a block. Displays a placeholder for a block, allowing the user to select a block to insert.

  • Type: Component

Props

onInsertBlock

Called when the user picked a block that should be inserted here.

  • Type func

  • Default value () => {}

SbButton

A button in the schlechtenburg theme

  • Type: Component

Props

SbMain

  • Type Variable

SbSelect

A select input in the schlechtenburg theme

  • Type: Component

Props

SbToolbar

Toolbar in the schlechtenburg theme

  • Type: Component

Props

SymActiveBlock

  • Type Variable

SymBlockDimensions

  • Type Variable

SymBlockLibrary

  • Type Variable

SymEditorDimensions

  • Type Variable

SymMode

  • Type Variable

blockProps

  • Type Variable

model

  • Type Variable

generateBlockId

  • Type Function

useActivation

  • Type Function

useBlockSizing

  • Type Function

useDynamicBlocks

  • Type Function

useResizeObserver

  • Type Function
',121),t=[i];function n(d,s,c,h,p,u){return l(),o("div",null,t)}var k=e(a,[["render",n]]);export{g as __pageData,k as default};