Skip to content

Releases: pmndrs/leva

@leva-ui/[email protected]

21 Mar 15:22
2b10e96
Compare
Choose a tag to compare

Patch Changes

  • edc8847: Breaking: change how leva/plugin exports components.

    // before
    import { Row, Label, String } from 'leva/plugin'
    
    // after
    import { Components } from 'leva/plugin'
    const { Row, Label, String } = Components

    Feat: add useValue / useValues hooks that let an input query other inputs values.

    Feat: normalize has additional arguments to its signature:

    /**
     * @path the path of the input
     * @data the data available in the store
     */
    const normalize = (input: Input, path: string, data: Data)

    Feat: sanitize has additional arguments to its signature:

    /**
     * @path the path of the input
     * @store the store
     */
    const sanitize = (
      value: any,
      settings: Settings,
      prevValue: any,
      path: string,
      store: StoreType
    )

    Styles: better feedback when dragging number from inner label.

    Plugin: add the Plot plugin 📈

    import { plot } from '@leva-ui/plugin-plot'
    useControls({ y: plot({ expression: 'cos(x)', graph: true, boundsX: [-10, 10], boundsY: [0, 100] }) })
  • Updated dependencies [edc8847]

@leva-ui/[email protected]

21 Mar 15:22
2b10e96
Compare
Choose a tag to compare

Patch Changes

  • edc8847: Breaking: change how leva/plugin exports components.

    // before
    import { Row, Label, String } from 'leva/plugin'
    
    // after
    import { Components } from 'leva/plugin'
    const { Row, Label, String } = Components

    Feat: add useValue / useValues hooks that let an input query other inputs values.

    Feat: normalize has additional arguments to its signature:

    /**
     * @path the path of the input
     * @data the data available in the store
     */
    const normalize = (input: Input, path: string, data: Data)

    Feat: sanitize has additional arguments to its signature:

    /**
     * @path the path of the input
     * @store the store
     */
    const sanitize = (
      value: any,
      settings: Settings,
      prevValue: any,
      path: string,
      store: StoreType
    )

    Styles: better feedback when dragging number from inner label.

    Plugin: add the Plot plugin 📈

    import { plot } from '@leva-ui/plugin-plot'
    useControls({ y: plot({ expression: 'cos(x)', graph: true, boundsX: [-10,10], boundsY: [0, 100] }) })
  • Updated dependencies [edc8847]

[email protected]

19 Mar 14:05
c27ca3e
Compare
Choose a tag to compare

Patch Changes

  • f9f7f1e: - Have Select accept functions as value or options. Fixes #165.
    • Temporarily type the set function values with any when useControls is used with the function API. In the future, we should infer th value type from the sanitize function.

[email protected]

18 Mar 23:21
9ca3821
Compare
Choose a tag to compare

Patch Changes

  • d2eaf58: fix: properly resolves value-keyed objects for the Select input.

[email protected]

18 Mar 22:14
5a0cc1c
Compare
Choose a tag to compare

Patch Changes

  • 98984e1: types: fix `set types in transient mode

[email protected]

18 Mar 16:48
072f37c
Compare
Choose a tag to compare

Minor Changes

  • 0b7e968: Add the invertY setting for the Vector2D joystick for inverting the y coordinate.

    BREAKING: The default behavior has been changed. If you want the same behavior as in previous versions you will have to set the joystick option to 'invertY'.

    const values = useControl({
      vector2d: {
        value: [0, 0],
        joystick: 'invertY',
      },
    })

Patch Changes

  • f323cfc: Feat: onChange callback for transient updates

    useControls({ color: { value: 'red', onChange: v => console.log(v) } })

@leva-ui/[email protected]

18 Mar 16:48
072f37c
Compare
Choose a tag to compare

Patch Changes

[email protected]

17 Mar 16:28
9a2d10f
Compare
Choose a tag to compare

Patch Changes

  • fa909f0: Allow useControls to update settings and input options when dependency array changes. (See #124)

[email protected]

15 Mar 09:23
f3f44eb
Compare
Choose a tag to compare

Patch Changes

[email protected]

14 Mar 21:29
672f69d
Compare
Choose a tag to compare

Patch Changes

  • 66dcb79: Add id to root div so that we're sure to always use the same root div. This should fix #106.
  • c6a69e3: Fix scrollbars flashing when collapsing a folder. Fixes #139.
  • 9e32b2c: Prevent errors in node environments by aliasing stitches global identifier to _global as global indentifier is reserved