Metadata-Version: 2.3
Name: trame-tweakpane
Version: 0.1.2
Summary: TweakPane widgets for trame
Author-email: Sebastien Jourdain <sebastien.jourdain@kitware.com>
Maintainer-email: Sebastien Jourdain <sebastien.jourdain@kitware.com>
License: MIT License
        
        Copyright (c) 2024, Kitware Inc.
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: components,trame,tweakpane,web
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Requires-Python: >=3.7
Requires-Dist: trame-client
Provides-Extra: ci
Requires-Dist: build; extra == 'ci'
Requires-Dist: pre-commit; extra == 'ci'
Provides-Extra: dev
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: python-semantic-release; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Description-Content-Type: text/x-rst

===============
trame-tweakpane
===============

TweakPane widgets for trame made easy.

License
------------------------

trame-tweakpane is made available under the MIT License. For more details, see `LICENSE <https://raw.githubusercontent.com/Kitware/trame-tweakpane/master/LICENSE>`_. This license has been chosen to match the one used by `tweakpane <https://tweakpane.github.io/docs/>`_ which that project expose to trame.


Installation
------------------------

.. code-block:: console

    pip install trame-tweakpane


Usage
------------------------

.. code-block:: python

    from trame.widgets import tweakpane

    with layout:
        with tweakpane.Pane(title="Welcome", expanded=True, style="width: 200px;"):
            tweakpane.Binding(name="a", default=1, options="{ min: -6, max: 10, step: 0.2 }")
            with tweakpane.Folder(title="Sub-section"):
                tweakpane.Binding(name="b", default="Hello")
                tweakpane.BladeSeparator()
                tweakpane.Binding(name="c", default=0.465, options="{ label: 'Another number' }")
            with tweakpane.Tabs(pages="['First', 'Second', 'Third']"):
                with tweakpane.Tab(index=0):
                    tweakpane.Binding(name="d", default="something")
                with tweakpane.Tab(index=1):
                    tweakpane.Button(label="Click =>", title="Me", click=(print, "['clicked']"))
                with tweakpane.Tab(index=2):
                    tweakpane.Binding(name="f", default="something")

.. image:: https://raw.githubusercontent.com/Kitware/trame-tweakpane/master/examples/readme_example.png
  :width: 400
  :alt: Visual output of the code above

Development
------------------------

Build and install the Vue components

.. code-block:: console

    cd vue-components
    npm i
    npm run build
    cd -

Install the application

.. code-block:: console

    pip install -e .


