diff --git a/.babelrc b/.babelrc
deleted file mode 100644
index bea32a4a7..000000000
--- a/.babelrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "presets": [ "es2015" ]
-}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 000000000..56278952d
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,124 @@
+name: CI
+
+on:
+ push:
+ branches:
+ - main
+ - staging
+ pull_request:
+ branches:
+ - main
+ - staging
+ workflow_dispatch:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ node-version: [22, 24]
+ steps:
+ - uses: actions/checkout@v6
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v6
+ with:
+ node-version: ${{ matrix.node-version }}
+ - run: npm ci
+ - run: npm test
+ - run: npm run build
+ - run: npm run doc
+ - name: Save build
+ if: matrix.node-version == 22
+ uses: actions/upload-artifact@v7
+ with:
+ name: build
+ path: |
+ .
+ !node_modules
+ retention-days: 1
+
+ gh-pages:
+ needs: build
+ runs-on: ubuntu-latest
+ if: github.ref == 'refs/heads/staging'
+ steps:
+ - uses: actions/download-artifact@v8
+ with:
+ name: build
+ - uses: peaceiris/actions-gh-pages@v4
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: .
+
+ dependabot:
+ name: 'Dependabot'
+ needs: build # After the E2E and build jobs, if one of them fails, it won't merge the PR.
+ runs-on: ubuntu-latest
+ if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}} # Detect that the PR author is dependabot
+ permissions:
+ contents: write
+ pull-requests: write
+ steps:
+ - name: Enable auto-merge for Dependabot PRs
+ run: gh pr merge --auto --merge "$PR_URL" # Use Github CLI to merge automatically the PR
+ env:
+ PR_URL: ${{github.event.pull_request.html_url}}
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
+
+ npm-publish-dev:
+ needs: build
+ uses: SolidOS/solidos/.github/workflows/publish-prerelease.yml@main
+ with:
+ node_version: 22
+
+ npm-publish-latest:
+ needs: [build]
+ runs-on: ubuntu-latest
+ if: github.ref == 'refs/heads/main'
+ permissions:
+ id-token: write # Required for OIDC
+ contents: read
+ steps:
+ - uses: actions/download-artifact@v8
+ with:
+ name: build
+ - uses: actions/setup-node@v6
+ with:
+ node-version: 22 # required for OIDC npm@latest
+ registry-url: 'https://registry.npmjs.org'
+ - name: Update npm to latest (required for OIDC)
+ run: npm install -g npm@latest
+ - name: Disable pre- and post-publish actions
+ run: 'sed -i -E "s/\"((pre|post)publish)/\"ignore:\1/" package.json'
+ - name: Publish to npm
+ if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
+ run: npm publish --tag latest
+
+ github-release:
+ needs: [npm-publish-latest]
+ runs-on: ubuntu-latest
+ if: github.ref == 'refs/heads/main' && github.event_name == 'push'
+ permissions:
+ contents: write
+ steps:
+ - uses: actions/checkout@v6
+ with:
+ fetch-depth: 0
+ - name: Create GitHub release with generated notes
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ TAG="v$(node -p 'require("./package.json").version')"
+
+ if gh release view "$TAG" >/dev/null 2>&1; then
+ echo "Release $TAG already exists. Skipping."
+ exit 0
+ fi
+
+ if git ls-remote --exit-code --tags origin "refs/tags/$TAG" >/dev/null 2>&1; then
+ echo "Tag $TAG already exists on origin. Creating release from existing tag."
+ gh release create "$TAG" --verify-tag --generate-notes
+ else
+ echo "Creating tag and release $TAG from commit $GITHUB_SHA."
+ gh release create "$TAG" --target "$GITHUB_SHA" --generate-notes
+ fi
diff --git a/.gitignore b/.gitignore
index 468bb8912..9b1a4436b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,12 @@
node_modules
dist
lib
+src/versionInfo.ts
+.idea
+.vscode
+coverage
+docs/api
+examples/storybook
+.history/
+docs/form-examples/solid-ui.js
+.tsbuildinfo
diff --git a/.nojekyll b/.nojekyll
new file mode 100644
index 000000000..1d24c91bd
--- /dev/null
+++ b/.nojekyll
@@ -0,0 +1,6 @@
+It is now possible to completely bypass Jekyll processing on GitHub Pages by creating a file named .nojekyll in the
+root of your pages repo and pushing it to GitHub. This should only be necessary if your site uses files or directories
+that start with underscores since Jekyll considers these to be special resources and does not copy them to the final
+site.
+
+https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/
\ No newline at end of file
diff --git a/.nvmrc b/.nvmrc
new file mode 100644
index 000000000..42a1c98ac
--- /dev/null
+++ b/.nvmrc
@@ -0,0 +1 @@
+v22.22.0
diff --git a/.storybook/main.js b/.storybook/main.js
new file mode 100644
index 000000000..a80bd7872
--- /dev/null
+++ b/.storybook/main.js
@@ -0,0 +1,42 @@
+export default {
+ stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
+
+ addons: [
+ '@storybook/addon-links',
+ '@storybook/addon-essentials',
+ '@storybook/addon-mdx-gfm',
+ '@storybook/addon-webpack5-compiler-swc'
+ ],
+
+ framework: {
+ name: '@storybook/html-webpack5',
+ options: {}
+ },
+
+ docs: {
+ autodocs: true
+ },
+ webpackFinal: async (config) => {
+ // For Storybook, we DON'T externalize rdflib and solid-logic
+ // Instead, we let webpack bundle them from node_modules
+
+ // Handle Node.js modules for browser
+ config.resolve.fallback = {
+ ...config.resolve.fallback,
+ path: false,
+ fs: false,
+ crypto: false,
+ stream: false,
+ util: false,
+ buffer: false
+ }
+
+ // Alias $rdf to rdflib for solid-logic compatibility
+ config.resolve.alias = {
+ ...config.resolve.alias,
+ $rdf: 'rdflib'
+ }
+
+ return config
+ }
+}
diff --git a/.storybook/preview.js b/.storybook/preview.js
new file mode 100644
index 000000000..996229f9d
--- /dev/null
+++ b/.storybook/preview.js
@@ -0,0 +1,11 @@
+// For backward compatibility, provide rdflib and solid-logic as globals
+import * as rdflib from 'rdflib'
+import * as solidLogic from 'solid-logic'
+
+// Some legacy code might expect these as globals
+if (typeof window !== 'undefined') {
+ window.$rdf = rdflib
+ window.SolidLogic = solidLogic
+}
+
+export const parameters = {}
diff --git a/.web_base b/.web_base
new file mode 100644
index 000000000..664c7c143
--- /dev/null
+++ b/.web_base
@@ -0,0 +1 @@
+https://solidos.github.io/solid-ui
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 000000000..307ecf861
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,8 @@
+MIT License
+
+Copyright (c) 2019 Solid
+
+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.
diff --git a/README.md b/README.md
index c0f202734..c34a97fb8 100644
--- a/README.md
+++ b/README.md
@@ -1,33 +1,432 @@
# solid-ui
-User Interface widgets and utilities for Solid
-These are HTML5 widgets which connect to a solid store. Building blocks for solid-based apps.
+[](https://www.npmjs.com/package/solid-ui)
-A selection
-```
- var UI = require('solid-ui')
+User Interface widgets and utilities for Solid (solid-ui)
- var acl = require('solid-ui').acl
-```
-The submodules at the moment include log, acl, acl-control, messageArea, etc
+These are HTML5 widgets which connect to a solid store. Building blocks for solid-based apps.
+Vanilla JS. Includes large widgets like chat, table, matrix, form fields, and small widgets.
-- A login widget
-- A chat widget: add discussion to any object.
-- A people picker widget for choosing a set of people or an existing group
-- A form system: Forms are defined in RDF, and create/edit RDF data, including form definitions
-- A general purpose table display with built-in facetted browsing
-- An Access Control List widget for Solid ACL system
-- A two-dimentional matrix of editable live data
-- A notepad of shared notes for real-time collaboration.
-- Drag and drop code for linking things and uploading files
-- A set of tabs for holding other widgets and arbitrary UI elements
-- A collection of shortcut namespace objects for a selection of relevant RDF vocabularies.
+See [Solid-Ui Storybook](http://solidos.github.io/solid-ui/examples/storybook/) for UI widgets.
+See [Solid-UI API](https://solidos.github.io/solid-ui/docs/api/) for UI functions.
+See [Forms introduction](./docs/FormsReadme.md) for UI vocabulary implementation.
-The typical style of the widgets is to know what data it has been derived from,
-allow users to edit it, and to automatically sync with data as it changes in the future.
-TO see how these are used, see the panes which use them within the solid-app-set
+## Table of Contents
+- [Getting Started](#getting-started)
+- [Install via npm](#install-via-npm)
+- [Use Directly in Browser](#use-directly-in-a-browser)
+ - [UMD Bundle](#umd-bundle-global-variable)
+ - [ESM Bundle](#esm-bundle-import-as-module)
+- [Web Components](#web-components)
+ - [solid-ui-header](#solid-ui-header)
+- [Development](#development)
+- [Testing](#adding-tests)
+- [Further Documentation](#further-documentation)
+- [Generative AI usage](#generative-ai-usage)
-The level of support for this varies.
+
+## Getting started
Contributions of bug fixes and new functionality, documentation, and tests are
always appreciated.
+
+## Install via npm
+
+```sh
+npm install solid-ui rdflib solid-logic
+```
+
+Then import in your JavaScript/TypeScript code:
+
+```js
+import * as UI from 'solid-ui'
+import * as $rdf from 'rdflib'
+import * as SolidLogic from 'solid-logic'
+
+// Example: Create a button
+const button = UI.widgets.button(
+ document,
+ 'https://solidproject.org/assets/img/solid-emblem.svg',
+ 'Click me',
+ () => alert('Button clicked!')
+)
+document.body.appendChild(button)
+```
+
+## Use Directly in a Browser
+
+Solid-UI provides both **UMD** and **ESM** bundles for direct browser usage. Both bundles externalize `rdflib` and `solid-logic`, which must be loaded separately.
+
+### Available Files
+
+- **UMD (Universal Module Definition)**:
+ - Development: `dist/solid-ui.js` (exposes global `window.UI`)
+ - Production: `dist/solid-ui.min.js` (minified)
+
+- **ESM (ES Modules)**:
+ - Development: `dist/solid-ui.esm.js`
+ - Production: `dist/solid-ui.esm.min.js` (minified)
+
+### UMD Bundle (Global Variable)
+
+If you use the legacy UMD bundle (`solid-ui.js` / `solid-ui.min.js`), `rdflib` must define `window.$rdf` before `solid-ui` loads. If `rdflib` is missing, `solid-ui` will throw `ReferenceError: $rdf is not defined`.
+
+Load via `
+
+
+
+
+
+
+