You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+128-2Lines changed: 128 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,9 +17,12 @@ See [Forms introduction](./docs/FormsReadme.md) for UI vocabulary implementation
17
17
-[Use Directly in Browser](#use-directly-in-a-browser)
18
18
-[UMD Bundle](#umd-bundle-global-variable)
19
19
-[ESM Bundle](#esm-bundle-import-as-module)
20
-
-[Development](#development-new-components)
20
+
-[Web Components](#web-components)
21
+
-[solid-ui-header](#solid-ui-header)
22
+
-[Development](#development)
21
23
-[Testing](#adding-tests)
22
24
-[Further Documentation](#further-documentation)
25
+
-[Generative AI usage](#generative-ai-usage)
23
26
24
27
25
28
## Getting started
@@ -66,6 +69,8 @@ Solid-UI provides both **UMD** and **ESM** bundles for direct browser usage. Bot
66
69
67
70
### UMD Bundle (Global Variable)
68
71
72
+
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`.
73
+
69
74
Load via `<script>` tags and access through global variables `window.$rdf`, `window.SolidLogic`, and `window.UI`.
70
75
71
76
```html
@@ -253,7 +258,87 @@ Use import maps for cleaner module specifiers:
253
258
</html>
254
259
```
255
260
256
-
### Development new components
261
+
## Web Components
262
+
263
+
solid-ui ships self-contained Lit-based custom elements as subpath exports. Each component is independently importable, registers its custom element on import, and ships its own styles encapsulated in a Shadow DOM.
264
+
265
+
> Component UMD bundles do not export a shared global like `window.UI`. They only register the custom element on import, while the legacy main bundle still provides the `UI` global.
266
+
267
+
### solid-ui-header
268
+
269
+
A header bar with branding, auth state (logged-out / logged-in), an account dropdown, an optional logout icon, and a desktop-only help menu.
<solid-ui-signup-buttonlabel="Get a Pod"signup-url="https://solidproject.org/get_a_pod"icon="https://example.com/icon.svg"></solid-ui-signup-button>
319
+
```
320
+
321
+
### Component build pipeline
322
+
323
+
Web components use a two-stage build to produce a clean public runtime layout while keeping internal TypeScript artifacts separate:
324
+
325
+
1.**webpack** (`npm run build-dist`) bundles each component entrypoint and emits the runtime files to `dist/components/<name>/index.js` and `dist/components/<name>/index.esm.js`.
326
+
2.**tsc** (`npm run build-js`) emits internal declaration and JS artifacts mirroring the source tree under `dist/v2/components/<name>/`.
327
+
3.**`scripts/build-component-dts.mjs`** (runs automatically after tsc as part of `postbuild-js`) writes thin public declaration wrappers at `dist/components/<name>/index.d.ts`, re-exporting from the internal `dist/v2/components/<name>/` output.
328
+
329
+
This keeps the `package.json` subpath export fully aligned while exposing only the public `dist/components/...` layout:
The SolidOS team is using GitHub Copilot integrated in Visual Studio Code.
377
+
We have added comments in the code to make it explicit which parts are 100% written by AI.
378
+
379
+
### Prompt usage history:
380
+
381
+
* Raptor mini: If I want to make the header a web component with a self contained CSS which only consumes CSS variables from a theme, how would I do this?
382
+
383
+
* Raptor mini: Go ahead and create a header web component, for backward compatibility keep the current code too.
384
+
In the new header component I need to be flexible and receive from consumer - the layout (mobile or desktop) and the theme (light or dark) and its according CSS variables for light to dark.
385
+
386
+
* Raptor mini: Propose code. how about webpack config for distribution?
387
+
388
+
* Raptor mini: pls add a readme in the component documenting it usage and test and all
389
+
390
+
* Raptor mini: the helpMenuList should be menu items inside the help icon drop down menu
391
+
392
+
* Raptor mini: When I am not logged in I want the header to display: Log in button and Sign Up button.
393
+
When the user is logged in, there is only one button, a drop down button called Accounts. The icon of the button is the avatar of the profile and it displays a list of available accounts of the user.
394
+
I want this all to be presented flexible in the component.
395
+
396
+
* Claude Sonnet 4.6: create a LitElement also for the signupButton in the SignupButton.ts based on the signup.js code and wire it into the header like you did the loginButton.
397
+
398
+
* Raptor mini: when we are on layout mobile we do not want to display the help menu at all.
399
+
400
+
* Raptor mini: Create for me a footer Lit Component in tsy style of the components I have and under v2. Take the code from this index.ts to start with.
401
+
402
+
* Raptor mini: Good. Now, I want the footer to be a rectangular with round corners, grey background and it should have an adjustable position.
403
+
404
+
* Raptor mini: The content of the footer should be different upon loggedin or not.
405
+
If not logged in, it should say:
406
+
Title Public View
407
+
You are viewving this profile as a guest,
408
+
And if logged in:
409
+
Title: Logged in View
410
+
You are logged in as nameOfLoggedIn user.
411
+
412
+
* Raptor mini: add a readme to the Footer component with example.
413
+
414
+
* Claude Sonnet 4.6: Make the dop down as a list under the input field and entlarge the pop up, make it higher, adjustable to fit the drop down. And make the drop down arrow area larger
0 commit comments