@aldi/ralma 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +67 -0
- package/bin/ralma.js +683 -0
- package/bin/ralma.min.js +175 -0
- package/package.json +81 -0
- package/src/index.js +783 -0
- package/types/index.d.ts +47 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 - github.com/aldi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<img src="https://raw.githubusercontent.com/aldi/ralma/master/logo.png" alt="ralma_logo" width="200px"/>
|
|
2
|
+
|
|
3
|
+
## Ralma - Stateless Ractive Components for Bulma
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@aldi/ralma)
|
|
6
|
+
[](https://github.com/aldi/ralma/actions/workflows/ci.yml)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
This Ractive plugin provides helper shortcuts for most Bulma widgets.
|
|
10
|
+
The goal of this plugin is to help you get started quickly and reduce the overly verbose code that Bulma tends to produce.
|
|
11
|
+
It does not attempt to cover everything in Bulma, but rather offer the most common elements as shortcuts.
|
|
12
|
+
Sometimes, when you want something more specific or fancy, you can still use the original Bulma markup.
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @aldi/ralma
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
```js
|
|
21
|
+
import Ractive from 'ractive';
|
|
22
|
+
import { registerRalma } from '@aldi/ralma';
|
|
23
|
+
|
|
24
|
+
registerRalma(Ractive);
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Package-based projects require Node 22 or newer and Ractive 1.4.4 or newer. Components use Bulma
|
|
28
|
+
1.x classes; load Bulma CSS separately.
|
|
29
|
+
|
|
30
|
+
`registerRalma` skips names already present on `Ractive.components`; pass `{ overwrite: true }` to
|
|
31
|
+
replace them, or `{ warnOnCollision: true }` to log the ones it skipped.
|
|
32
|
+
|
|
33
|
+
**Or download the browser bundle**, which registers every component against `window.Ractive` on load:
|
|
34
|
+
|
|
35
|
+
_Debug_: [bin/ralma.js](https://raw.githubusercontent.com/aldi/ralma/master/bin/ralma.js)
|
|
36
|
+
|
|
37
|
+
_Minified_: [bin/ralma.min.js](https://raw.githubusercontent.com/aldi/ralma/master/bin/ralma.min.js)
|
|
38
|
+
|
|
39
|
+
## Documentation
|
|
40
|
+
|
|
41
|
+
The [documentation site](https://aldi.github.io/ralma/) covers all 61 components, installation,
|
|
42
|
+
registration options, link safety, and focused examples. Run it locally with:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm run docs:install
|
|
46
|
+
npm run docs:dev
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
A typical header would look like this:
|
|
50
|
+
|
|
51
|
+
```html
|
|
52
|
+
<head>
|
|
53
|
+
<meta charset="utf-8" />
|
|
54
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
55
|
+
<title>Ralma!</title>
|
|
56
|
+
<!-- Bulma CSS -->
|
|
57
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@1/css/bulma.min.css" />
|
|
58
|
+
<!-- Ractive Framework -->
|
|
59
|
+
<script src="https://cdn.jsdelivr.net/npm/ractive"></script>
|
|
60
|
+
<!-- Ralma Plugin -->
|
|
61
|
+
<script src="ralma.min.js"></script>
|
|
62
|
+
</head>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## License
|
|
66
|
+
|
|
67
|
+
Code released under [the MIT license](https://github.com/aldi/ralma/blob/master/LICENSE).
|