Skip to content

Releases: cocopon/tweakpane

4.0.5

03 Nov 16:37
Compare
Choose a tag to compare
  • Improved cursor for color sliders (#630)
  • Minor documentation improvements

4.0.4

30 Jun 01:47
Compare
Choose a tag to compare
  • Fixed parsing a color string (#601)
  • Some minor improvements

4.0.3

22 Dec 13:30
Compare
Choose a tag to compare
  • Added .off() to unlisten events (#579)
  • Added native to button click event (#542)
  • Improved checkbox behavior with unwanted text selection (#545)
  • And some minor improvements for the document

4.0.2

15 Dec 10:15
Compare
Choose a tag to compare

4.0.1

05 Sep 10:21
Compare
Choose a tag to compare
  • Fixed a bug that TabApi isn't refreshable (#570, #571)

4.0.0

06 Aug 15:26
Compare
Choose a tag to compare

Thank you for using Tweakpane. This is the 4th release of the major version!

Summary

  • Migrated to ES modules 📦
  • More consistent APIs ✨ : Easier to understand functionalities
  • Improved serialization structure 💾 : New importState() and exportState() can import/export more information
  • Improved blades specificity 🔓 : Now you can access min and max of the slider, options of the list, etc. without any workarounds.
  • Many other minor improvements and bug fixes 🩹

If you are currently using v3.x, migration guide can be useful for migration.

Breaking changes

  • Migrated to ES modules (#209)
    • Use <script type="module"> to use the package
  • Unified methods to add bindings (#486)
    • Use addBinding() to add input bindings (former addInput())
    • Use addBinding() with {readonly: true} to add monitor bindings (former addMonitor())
  • Changed a event name for monitor bindings
    • Use change event for handling monitor updates instead of update
  • Replaced a preset with a blade state
    • Use importState() and exportState() instead of importPreset() and exportPreset()
  • Changed an option name for changing visual height of monitors
    • lineCount -> rows
  • Changed a way to get a binding key in event handlers
    • Use TpChangeEvent.target.key instead of TpChangeEvent.key
  • Renamed classes
    • ListApi -> ListBindingApi
    • SliderApi -> SliderBladeApi
    • TextApi -> TextBladeApi
  • Renamed fields
    • SliderApi.maxValue -> SliderBladeApi.max
    • SliderApi.minValue -> SliderBladeApi.min

New features

  • Improved blades specificity. (#455)
    • Now you can access min and max of the slider, options of the list, etc. without any workarounds.
  • Importing/exporting all blades individually. (#509)
  • All container blades have refresh() and can be refreshed individually. (#510)
  • Added a shared config to point dimension params. (#417)
  • Added support for a custom formatter to point-nD inputs. (#511)
  • Added support for a custom key / pointer scale to number text inputs. (#471)

For plugin developers

Diff of `@tweakpane/plugin-template can be useful to know how to migrate your plugin to v4.

Breaking changes

  • Added core field to all types of plugins for checking compatibility. Use createPlugin() to fill the core version.
  • Added id field to the plugin bundle.
  • Moved css field from the plugin to the plugin bundle.
  • Changed the core style file for plugins
    • @import '../../node_modules/@tweakpane/core/lib/sass/plugin'; -> @use '../../node_modules/@tweakpane/core/lib/sass/tp';
  • Added a namespace and a prefix tp to mixins, functions, and variables
    • .#{$prefix}-some -> .#{tp.$prefix}-some
      • @extend %input -> @extend %tp-input

New features

  • Added a way to provide a custom API for binding controllers (#455)
    • InputBindingPlugin.api()
    • MonitorBindingPlugin.api()
  • Added more stable way to access internal CSS variables
    • var(--in-bg) -> tp.cssVar('input-bg')
    • Refer _defs.scss to see the list of variables
  • Added more stable way to access CSS modifiers
    • &.#{$prefix}-v-disabled -> &#{tp.$disabled}

4.0.0-beta.2

06 Aug 04:59
Compare
Choose a tag to compare
4.0.0-beta.2 Pre-release
Pre-release
  • Refactored creating a plugin
  • Updated documents

4.0.0-beta.1

21 Jun 13:18
Compare
Choose a tag to compare
4.0.0-beta.1 Pre-release
Pre-release

This is the first beta release for the next major version, v4. See the document for details, and the migration guide for upgrading from v3.

3.1.10

15 Jun 13:43
Compare
Choose a tag to compare
  • Fixed the list API for complex object (#547)

3.1.9

22 Apr 14:09
Compare
Choose a tag to compare
  • Fixed a hit area of inline color picker (#538)