@benev/slate
Advanced tools
Changelog
v0.1.0
nexus rewrite
Slate
renamed to Nexus
ObsidianRenderer
to ShadowViewRenderer
CarbonRenderer
to ShadowComponentRenderer
QuartzRenderer
to LightViewRenderer
OxygenRenderer
to LightComponentRenderer
shadow views and components
slate.shadow_view({name: "coolview", styles}, use => () => {
return html`hi`
})
slate.shadow_view(use => () => {
use.name("coolview")
use.styles(styles)
return html`hi`
})
use
use.setup
renamed to use.mount
use.prepare
renamed to use.once
SetupFn
to Mount
Setdown
to Unmount
InitFn
to Init
setupFn
to mountFn
use.effect(fn, dependencies)
(all views and components)use.defer(fn)
(all views and components)use.name(name)
(all views)use.styles(styles)
(shadow_view and shadow_component)views
<obsidian-view>
renamed to <slate-view>
<slate-view>
ops (and OpSignal)
Op.run
to Op.load
OpSignal->run
to OpSignal->load
Op.load
and OpSignal->load
now throws errors
Op.Mode
to Op.Status
op.mode
to op.status
on your op objectsop.loading
to op.isLoading()
op.error
to op.isError()
op.ready
to op.isReady()
Op.is.loading
to have proper ts type guardstools
MapSubset
type to MapBase
maptool(map).grab(..)
to maptool(map).guarantee(..)
mapGuarantee(map, k, v)
function, technically more efficient than maptool(map).guarantee(k, v)
ob
tool syntax
ob.map(object, transform)
becomes ob(object).map(transform)
ob.filter(object, predicate)
becomes ob(object).filter(predicate)
deepEqual
and deepFreeze
into new deep
tool
deepEqual
becomes deep.equal
deepFreeze
becomes deep.freeze
is
tool
is.object(x)
is.array(x)
is.defined(x)
watch
watch.track
now returns an unsubscribe function, instead of the collector's data
Historian
and AppCore
for creating apps with undo/redo capabilities