@radio4000/components v0.1.69
Web components for Radio4000
These components can be inserted in the HTML of any web pages, and are made to interact with Radio4000 through the use of its @radio4000/sdk, which talks to @radio4000/supabase.
Usage
Depending on whether you have a build system or not, you can either import the module from NPM, from a CDN or download it locally.
All methods are available on the imported sdk
module.
With build system and NPM
import '@radio4000/components'
// use any <r4-component*> in your templates
With browser via CDN
<script type="module">
import 'https://cdn.jsdelivr.net/npm/@radio4000/components'
// use any <r4-*> component in your HTML
</script>
Changelog
See https://github.com/radio4000/components/releases
Development
- The components are in the
./src
folder - Inside
./examples
you'll find demos of all components - The
./index.html
file renders the<r4-app>
component, which requires a SPA router.
If you'd like to help out, clone the repository, install dependencies and start the local server.
git clone git@github.com:radio4000/components.git radio4000-components
cd radio4000-components
npm install
npm run dev
Themes
See the themes github repo
Build and releases
To release this package under @radio4000/components
on NPM, bump the version in package.json, create a commit, tag it. Create a new release on Github and let the Github action publish it.
To make sure the build workflows:
- npm run build
- npm run dev
- open http://localhost:4000/tests/dist-test.html
Creating a new component
- create a
./src/components/r4-*.js
file - export default HTMLElement
- import and export it in
./src/components/index.js
- create an demo in
./examples/r4-*/index.html
- reference the demo HTML page in
./vite.config.js
Connection to the Radio4000 database
All components use the @radio4000/sdk. The exact db is configured in https://github.com/radio4000/components/blob/main/src/libs/sdk.js.
Production
Currently deployed on cloudflare pages (which has the env vars manually added).
Github pages is not used because it does not support SPA redirects (like in the public folder for other hosting; @TODO: wait then migrate)
7 days ago
8 days ago
10 days ago
12 days ago
12 days ago
11 days ago
12 days ago
12 days ago
14 days ago
14 days ago
13 days ago
13 days ago
13 days ago
13 days ago
14 days ago
14 days ago
15 days ago
16 days ago
16 days ago
16 days ago
16 days ago
18 days ago
17 days ago
17 days ago
18 days ago
18 days ago
18 days ago
19 days ago
19 days ago
20 days ago
20 days ago
7 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
10 months ago
7 months ago
7 months ago
7 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
12 months ago
12 months ago
12 months ago
11 months ago
11 months ago
11 months ago
12 months ago
12 months ago
11 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago