https://github.com/flarebyte/bubblegum-entity
Access to settings and states for widgets of the Bubblegum UI toolkit
https://github.com/flarebyte/bubblegum-entity
experimental
Last synced: over 1 year ago
JSON representation
Access to settings and states for widgets of the Bubblegum UI toolkit
- Host: GitHub
- URL: https://github.com/flarebyte/bubblegum-entity
- Owner: flarebyte
- License: bsd-3-clause
- Created: 2018-05-23T18:33:58.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-07-09T07:34:57.000Z (almost 4 years ago)
- Last Synced: 2025-01-04T10:35:06.662Z (over 1 year ago)
- Topics: experimental
- Language: Elm
- Homepage: https://package.elm-lang.org/packages/flarebyte/bubblegum-entity/latest/
- Size: 55.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Bubblegum-entity



> Access to settings and states for widgets of the Bubblegum UI toolkit
## Model
### Attribute
An attribute represents a small piece of information such as a [Semantic
triple](https://en.wikipedia.org/wiki/Semantic_triple).
```
attrLabel =
{ id = Just "id:1234"
, key = "ui:label"
, facets = ["blue"]
, values = ["Some label"]
}
```
### Outcome
An outcome is a type which borrows concepts from both Elm Maybe and Result.
```
type Outcome value
= Valid value
| None
| Warning String
```
### Settings
A settings entity represents some configuration that is applied to a widget.
```
{
attributes = [
attr "ui:label" "some label"
, attr "ui:font" "Arial"
]
}
```
### State
A state entity is similar to settings but represents the live state that is
applied to a widget.
```
{
attributes = [
attr "ui:selection" "first item"
]
}
```
### Validation
List of validations that can be applied to an outcome.
For most validations:
- None will propagate as None.
- Warning will propagate as Warning.
- A failure to validate the outcome will produce a Warning.
## Documentation and links
- [Code Maintenance](MAINTENANCE.md)
- [Code Of Conduct](CODE_OF_CONDUCT.md)
- [Contributing](CONTRIBUTING.md)
- [Glossary](GLOSSARY.md)
- [Vocabulary used in the code base](CODE_VOCABULARY.md)
- [Architectural Decision Records](DECISIONS.md)
- [Contributors](https://github.com/flarebyte/bubblegum-entity/graphs/contributors)
- [Dependencies](https://github.com/flarebyte/bubblegum-entity/network/dependencies)
## Installation
```bash
elm install flarebyte/bubblegum-entity
```