Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@benev/slate

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@benev/slate - npm Package Versions

1
8

0.1.0

Diff

Changelog

Source

v0.1.0

nexus rewrite

  • 🟥 Slate renamed to Nexus
  • 🟥 silly names have been purged
    • renamed ObsidianRenderer to ShadowViewRenderer
    • renamed CarbonRenderer to ShadowComponentRenderer
    • renamed QuartzRenderer to LightViewRenderer
    • renamed OxygenRenderer to LightComponentRenderer
    • tons of renames following the same pattern have occurred

shadow views and components

  • 🟥 simpler syntax: remove settings array, in favor of new hooks
    • old way
      slate.shadow_view({name: "coolview", styles}, use => () => {
        return html`hi`
      })
      
    • new way
      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
  • 🟥 renamed various types and helpers
    • types
      • SetupFn to Mount
      • Setdown to Unmount
      • InitFn to Init
    • helpers
      • setupFn to mountFn
  • 🍏 add hook use.effect(fn, dependencies) (all views and components)
  • 🍏 add hook use.defer(fn) (all views and components)
  • 🍏 add hook use.name(name) (all views)
  • 🍏 add hook use.styles(styles) (shadow_view and shadow_component)

views

  • 🟥 <obsidian-view> renamed to <slate-view>
  • 🟥 light_view (quartz) contents are now wrapped in <slate-view>
    • this is to provide an anchor point from which the view can query its own contents
    • this also helps light_view behavior match shadow_view

ops (and OpSignal)

  • 🟥 rename Op.run to Op.load
    • also rename OpSignal->run to OpSignal->load
  • 🟥 Op.load and OpSignal->load now throws errors
    • it still sets the op to an error state
    • but now it also throws an error, so you can catch it directly
  • 🟥 rename op 'mode' to 'status'
    • change Op.Mode to Op.Status
    • change op.mode to op.status on your op objects
  • 🟥 rework OpSignal checkers, from getters to functions
    • change op.loading to op.isLoading()
    • change op.error to op.isError()
    • change op.ready to op.isReady()
    • this was necessary for the new form to be proper ts type guards
  • 🍏 fix checkers like Op.is.loading to have proper ts type guards
  • 🍏 fix signals.op return type to be OpSignal

tools

  • 🟥 rename MapSubset type to MapBase
  • 🟥 rename maptool(map).grab(..) to maptool(map).guarantee(..)
  • 🍏 export mapGuarantee(map, k, v) function, technically more efficient than maptool(map).guarantee(k, v)
  • 🟥 rework ob tool syntax
    • ob.map(object, transform) becomes ob(object).map(transform)
    • ob.filter(object, predicate) becomes ob(object).filter(predicate)
  • 🟥 recapitulated deepEqual and deepFreeze into new deep tool
    • deepEqual becomes deep.equal
    • deepFreeze becomes deep.freeze
    • both functions have been reworked to handle maps and sets
  • 🍏 add is tool
    • proper typescript type guard support
    • is.object(x)
    • is.array(x)
    • is.defined(x)

watch

  • 🟥 watch.track now returns an unsubscribe function, instead of the collector's data
    • if you need the data from your collector, just run the collector yourself
  • 🍏 add Historian and AppCore for creating apps with undo/redo capabilities
<br/>

v0.0

chasemoskal
published 0.1.0-x.14 •

chasemoskal
published 0.1.0-x.13 •

chasemoskal
published 0.1.0-x.12 •

chasemoskal
published 0.1.0-x.11 •

chasemoskal
published 0.1.0-x.10 •

chasemoskal
published 0.1.0-x.9 •

chasemoskal
published 0.1.0-x.8 •

chasemoskal
published 0.1.0-x.7 •

chasemoskal
published 0.1.0-x.6 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc