Skip to content

Releases: sc0ttj/component

Released v1.3.0

21 Feb 19:51
Compare
Choose a tag to compare
  • new optional add-ons:
    • html JSX-like HTML templating, returns templates as a String
    • htmel JSX-like HTML templating, returns templates as HTMLObject (browser) or String (Node)
    • storage - persistent state between page refreshes (browser) or script invocations (Node)
    • devtools - easier debugging of your components (browser only)
  • updates to src/component.js:
    • fixed: in NodeJS, debounced logging now falls back to using setTimeout, if needed
    • added: support for all new add-ons
    • added: allow view to be HTML Object, not only String
    • added: App.actionsList property - the list of defined actions functions
    • added: App() will return the container (an HTML Element)
      • App({...}) still returns App (for chainable actions, etc)
    • added: App.html property - alias of App.container (returns an HTML Element)
  • update docs:
    • re-write README and examples to show re-usable components
    • add the new add-ons to README and examples
  • updated build configs

v1.1.12

26 Jul 00:25
95477b5
Compare
Choose a tag to compare
  • new feature: state validation
    • requires @scottjarvis/validator (~300 bytes) to be added
    • updated README

v1.1.11 Released

25 Jul 17:04
756b001
Compare
Choose a tag to compare
  • updated rollup deps and rebuilt files in dist/

v1.1.10 Released

25 Jul 16:50
61ca16a
Compare
Choose a tag to compare
  • adds debouncing to render() function for improved DOM rendering performance

v1.1.9 Released

27 Jun 14:49
4d59a8c
Compare
Choose a tag to compare
  • New feature: middleware
    • allows for customisation of a components setState/render behaviour:
      • define an array of functions as myComponent.middleware = [ someFunc, otherFunc ]
      • each function will be run at the end of setState()

v.1.1.8 Released

27 Jun 12:50
Compare
Choose a tag to compare
  • fix in package.json: the "main" field should dist/index.js

v1.1.7 Released

27 Jun 12:46
a9d0f81
Compare
Choose a tag to compare
  • new feature: event emitter
    • if emitter is installed, component "actions" will emit an event
      • other components can listen to it with myComponent.on('actionName', (props) => { ... })
      • props will contain the latest state of the component that emitted the event
  • added src/emitter.js, implemented as an optional, extra module
  • updated build process to also build dist/emitter.min.js
  • added examples and updated README
    • added examples/usage-emitter.js

v1.1.6 Released

23 Jun 20:42
Compare
Choose a tag to compare
  • added a tweenState module:
    • can be imported and added to Component as a method
    • lets you tween from one state to another:
      • sets state on every frame of animation, or only the frames you define
      • includes many easing functions, see src/easings.js
      • provides useful callbacks for the tween (onStart, onUpdate, onComplete, etc)
  • works in browsers, and in Node 10 and above
  • added rollup and a build process (use npm run build)
  • updated Travis CI to test build on Node versions 10, 11 and 12
  • updated installation instructions
  • updated README

v1.1.5 Released

12 Apr 16:06
Compare
Choose a tag to compare
  • fixed: scoped CSS sometimes not applied on page load:
    • here is the new implementation:
      • prefix component CSS with the containers existing id or class, if any
      • fall back to previous behaviour only if container has no id or class:
        • add unique class to container
        • prefix component CSS with that same unique class
  • better performance:
    • when debug is true, don't console log state history on state change
    • to see the state history, access App.log yourself instead
  • see examples/usage-in-browser.html
  • updated README

v1.1.4 Released

11 Apr 17:48
Compare
Choose a tag to compare
  • new: automatic "scoping" of component CSS
  • prevents component styles affecting other parts of page
  • simplifies writing CSS for your components:
    • removes the need to define unique namespaces (IDs, classes) in your component CSS
  • you can disable automatic CSS scoping like so: App.scopedCss = false
  • see examples/usage-in-browser.html
  • adds only ~300 bytes to minified bundle
  • README and example updates