1.5.0 • Published 2 years ago
pollination-widgets v1.5.0
Pollination Widgets
A series of components for Pollination CAD and web.
Notes
PythonWrapper component creates a python instance to execute scripts.
You can create custom components based on PythonWrapper install python and install modules using packages props (e.g. ShapeScript)
{
official: [],
micropip: [ 'ladybug-core' ]
}Current script limits
- The script has just one source file
- The script can have variables and the syntax for a variable is
{{ my_variable }} - A variable can be a
primitive,list,dictbut python object is not supported - It does not support
returnvalue on runtime. You must usestdoutas workaround for now
Building
yarn buildStorybook
To run a live-reload Storybook server on your local machine:
yarn storybookTo export your Storybook as static files:
yarn build-storybookYou can then serve the files under storybook-static using S3, GitHub pages, Express etc. I've hosted this library at: https://www.harveydelaney.com/react-component-library
Components
Basic
- Button
- NumberInput
- PythonWrapper
Widgets
- CrossShape
- EShape
- LShape
- NorthSign
- Rectangle
- ShapeScript
- TShape
- UShape
Script
- ShapeScript