solid-ui 3.0.6 → 3.1.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.
Files changed (129) hide show
  1. package/README.md +128 -2
  2. package/dist/acl/access-groups.js +1 -1
  3. package/dist/components/footer/index.d.ts +1 -0
  4. package/dist/components/footer/index.esm.js +24364 -0
  5. package/dist/components/footer/index.esm.js.map +1 -0
  6. package/dist/components/footer/index.esm.min.js +137 -0
  7. package/dist/components/footer/index.esm.min.js.map +1 -0
  8. package/dist/components/footer/index.js +23252 -0
  9. package/dist/components/footer/index.js.map +1 -0
  10. package/dist/components/footer/index.min.js +125 -0
  11. package/dist/components/footer/index.min.js.map +1 -0
  12. package/dist/components/header/index.d.ts +1 -0
  13. package/dist/components/header/index.esm.js +1894 -0
  14. package/dist/components/header/index.esm.js.map +1 -0
  15. package/dist/components/header/index.esm.min.js +1083 -0
  16. package/dist/components/header/index.esm.min.js.map +1 -0
  17. package/dist/components/header/index.js +1855 -0
  18. package/dist/components/header/index.js.map +1 -0
  19. package/dist/components/header/index.min.js +1084 -0
  20. package/dist/components/header/index.min.js.map +1 -0
  21. package/dist/components/loginButton/index.d.ts +1 -0
  22. package/dist/components/loginButton/index.esm.js +719 -0
  23. package/dist/components/loginButton/index.esm.js.map +1 -0
  24. package/dist/components/loginButton/index.esm.min.js +402 -0
  25. package/dist/components/loginButton/index.esm.min.js.map +1 -0
  26. package/dist/components/loginButton/index.js +701 -0
  27. package/dist/components/loginButton/index.js.map +1 -0
  28. package/dist/components/loginButton/index.min.js +402 -0
  29. package/dist/components/loginButton/index.min.js.map +1 -0
  30. package/dist/components/signupButton/index.d.ts +1 -0
  31. package/dist/components/signupButton/index.esm.js +270 -0
  32. package/dist/components/signupButton/index.esm.js.map +1 -0
  33. package/dist/components/signupButton/index.esm.min.js +82 -0
  34. package/dist/components/signupButton/index.esm.min.js.map +1 -0
  35. package/dist/components/signupButton/index.js +264 -0
  36. package/dist/components/signupButton/index.js.map +1 -0
  37. package/dist/components/signupButton/index.min.js +82 -0
  38. package/dist/components/signupButton/index.min.js.map +1 -0
  39. package/dist/footer/index.d.ts.map +1 -1
  40. package/dist/footer/index.js +8 -4
  41. package/dist/footer/index.js.map +1 -1
  42. package/dist/icons/v2/icons-svg/contactIcons.d.ts +3 -0
  43. package/dist/icons/v2/icons-svg/contactIcons.d.ts.map +1 -0
  44. package/dist/icons/v2/icons-svg/contactIcons.js +27 -0
  45. package/dist/icons/v2/icons-svg/contactIcons.js.map +1 -0
  46. package/dist/icons/v2/icons-svg/headerIcons.d.ts +18 -0
  47. package/dist/icons/v2/icons-svg/headerIcons.d.ts.map +1 -0
  48. package/dist/icons/v2/icons-svg/headerIcons.js +245 -0
  49. package/dist/icons/v2/icons-svg/headerIcons.js.map +1 -0
  50. package/dist/icons/v2/icons-svg/pngIcons.d.ts +3 -0
  51. package/dist/icons/v2/icons-svg/pngIcons.d.ts.map +1 -0
  52. package/dist/icons/v2/icons-svg/pngIcons.js +4 -0
  53. package/dist/icons/v2/icons-svg/pngIcons.js.map +1 -0
  54. package/dist/icons/v2/icons-svg/profileIcons.d.ts +23 -0
  55. package/dist/icons/v2/icons-svg/profileIcons.d.ts.map +1 -0
  56. package/dist/icons/v2/icons-svg/profileIcons.js +317 -0
  57. package/dist/icons/v2/icons-svg/profileIcons.js.map +1 -0
  58. package/dist/pad.d.ts.map +1 -1
  59. package/dist/pad.js +13 -13
  60. package/dist/pad.js.map +1 -1
  61. package/dist/solid-ui.esm.js +9560 -12181
  62. package/dist/solid-ui.esm.js.map +1 -1
  63. package/dist/solid-ui.esm.min.js +15 -14
  64. package/dist/solid-ui.esm.min.js.map +1 -1
  65. package/dist/solid-ui.js +12531 -14794
  66. package/dist/solid-ui.js.map +1 -1
  67. package/dist/solid-ui.min.js +23 -22
  68. package/dist/solid-ui.min.js.map +1 -1
  69. package/dist/utils/headerFooterHelpers.d.ts.map +1 -1
  70. package/dist/utils/headerFooterHelpers.js +11 -2
  71. package/dist/utils/headerFooterHelpers.js.map +1 -1
  72. package/dist/v2/components/footer/Footer.d.ts +60 -0
  73. package/dist/v2/components/footer/Footer.d.ts.map +1 -0
  74. package/dist/v2/components/footer/Footer.js +148 -0
  75. package/dist/v2/components/footer/Footer.js.map +1 -0
  76. package/dist/v2/components/footer/Footer.test.d.ts +2 -0
  77. package/dist/v2/components/footer/Footer.test.d.ts.map +1 -0
  78. package/dist/v2/components/footer/Footer.test.js +53 -0
  79. package/dist/v2/components/footer/Footer.test.js.map +1 -0
  80. package/dist/v2/components/footer/index.d.ts +3 -0
  81. package/dist/v2/components/footer/index.d.ts.map +1 -0
  82. package/dist/v2/components/footer/index.js +7 -0
  83. package/dist/v2/components/footer/index.js.map +1 -0
  84. package/dist/v2/components/header/Header.d.ts +155 -0
  85. package/dist/v2/components/header/Header.d.ts.map +1 -0
  86. package/dist/v2/components/header/Header.js +845 -0
  87. package/dist/v2/components/header/Header.js.map +1 -0
  88. package/dist/v2/components/header/header.test.d.ts +2 -0
  89. package/dist/v2/components/header/header.test.d.ts.map +1 -0
  90. package/dist/v2/components/header/header.test.js +242 -0
  91. package/dist/v2/components/header/header.test.js.map +1 -0
  92. package/dist/v2/components/header/index.d.ts +4 -0
  93. package/dist/v2/components/header/index.d.ts.map +1 -0
  94. package/dist/v2/components/header/index.js +7 -0
  95. package/dist/v2/components/header/index.js.map +1 -0
  96. package/dist/v2/components/loginButton/LoginButton.d.ts +62 -0
  97. package/dist/v2/components/loginButton/LoginButton.d.ts.map +1 -0
  98. package/dist/v2/components/loginButton/LoginButton.js +497 -0
  99. package/dist/v2/components/loginButton/LoginButton.js.map +1 -0
  100. package/dist/v2/components/loginButton/LoginButton.test.d.ts +2 -0
  101. package/dist/v2/components/loginButton/LoginButton.test.d.ts.map +1 -0
  102. package/dist/v2/components/loginButton/LoginButton.test.js +53 -0
  103. package/dist/v2/components/loginButton/LoginButton.test.js.map +1 -0
  104. package/dist/v2/components/loginButton/downArrow.d.ts +2 -0
  105. package/dist/v2/components/loginButton/downArrow.d.ts.map +1 -0
  106. package/dist/v2/components/loginButton/downArrow.js +10 -0
  107. package/dist/v2/components/loginButton/downArrow.js.map +1 -0
  108. package/dist/v2/components/loginButton/index.d.ts +3 -0
  109. package/dist/v2/components/loginButton/index.d.ts.map +1 -0
  110. package/dist/v2/components/loginButton/index.js +7 -0
  111. package/dist/v2/components/loginButton/index.js.map +1 -0
  112. package/dist/v2/components/signupButton/SignupButton.d.ts +36 -0
  113. package/dist/v2/components/signupButton/SignupButton.d.ts.map +1 -0
  114. package/dist/v2/components/signupButton/SignupButton.js +84 -0
  115. package/dist/v2/components/signupButton/SignupButton.js.map +1 -0
  116. package/dist/v2/components/signupButton/SignupButton.test.d.ts +2 -0
  117. package/dist/v2/components/signupButton/SignupButton.test.d.ts.map +1 -0
  118. package/dist/v2/components/signupButton/SignupButton.test.js +49 -0
  119. package/dist/v2/components/signupButton/SignupButton.test.js.map +1 -0
  120. package/dist/v2/components/signupButton/index.d.ts +3 -0
  121. package/dist/v2/components/signupButton/index.d.ts.map +1 -0
  122. package/dist/v2/components/signupButton/index.js +7 -0
  123. package/dist/v2/components/signupButton/index.js.map +1 -0
  124. package/dist/versionInfo.js +7 -7
  125. package/dist/widgets/buttons.d.ts +9 -3
  126. package/dist/widgets/buttons.d.ts.map +1 -1
  127. package/dist/widgets/buttons.js +68 -7
  128. package/dist/widgets/buttons.js.map +1 -1
  129. package/package.json +34 -7
package/README.md CHANGED
@@ -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.
270
+
271
+ **Subpath export:** `solid-ui/components/header`
272
+
273
+ ```typescript
274
+ import { Header } from 'solid-ui/components/header'
275
+ import type { HeaderMenuItem, HeaderAccountMenuItem, HeaderAuthState } from 'solid-ui/components/header'
276
+ ```
277
+
278
+ ```html
279
+ <solid-ui-header theme="dark" layout="desktop" brand-link="/">
280
+ <a slot="help-menu" href="/help">Help</a>
281
+ </solid-ui-header>
282
+ ```
283
+
284
+ Importing this module automatically registers `<solid-ui-header>` as a custom element.
285
+
286
+ ### solid-ui-login-button
287
+
288
+ A standalone login button that encapsulates the Solid OIDC login flow and emits `login-success` when authentication succeeds.
289
+
290
+ **Subpath export:** `solid-ui/components/login-button`
291
+
292
+ ```typescript
293
+ import { LoginButton } from 'solid-ui/components/login-button'
294
+ ```
295
+
296
+ ```html
297
+ <solid-ui-login-button label="Log in" issuer-url="https://solidcommunity.net" icon="https://example.com/login-icon.svg"></solid-ui-login-button>
298
+ ```
299
+
300
+ ```typescript
301
+ const loginButton = document.querySelector('solid-ui-login-button') as LoginButton
302
+ loginButton.addEventListener('login-success', (event: CustomEvent) => {
303
+ console.log('Logged in as', event.detail.webId)
304
+ })
305
+ ```
306
+
307
+ ### solid-ui-signup-button
308
+
309
+ A standalone sign-up button that opens a signup URL in a new browser tab.
310
+
311
+ **Subpath export:** `solid-ui/components/signup-button`
312
+
313
+ ```typescript
314
+ import { SignupButton } from 'solid-ui/components/signup-button'
315
+ ```
316
+
317
+ ```html
318
+ <solid-ui-signup-button label="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:
330
+
331
+ ```json
332
+ "./components/header": {
333
+ "types": "./dist/components/header/index.d.ts",
334
+ "import": "./dist/components/header/index.esm.js",
335
+ "require": "./dist/components/header/index.js"
336
+ }
337
+ ```
338
+
339
+ Consumers never import from `dist/v2/components/...`; that path is an internal build artifact only.
340
+
341
+ ## Development
257
342
 
258
343
  When developing a component in solid-ui you can test it in isolation using storybook
259
344
 
@@ -286,3 +371,44 @@ The following document gives guidance on how to add and perform testing in solid
286
371
  ## Further documentation
287
372
 
288
373
  - [Some code know-how](https://github.com/SolidOS/solidos/wiki/2.-Solid-UI-know-how)
374
+
375
+ ## Generative AI usage
376
+ 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
@@ -230,7 +230,7 @@ export class AccessGroups {
230
230
  ? `Detected RDF types: ${detectedTypes.join(', ')}`
231
231
  : 'No RDF type was detected for this URI.';
232
232
  const error = `Error: Failed to add access target: ${uri} is not a recognized ACL target type.` +
233
- ` Expected one of: vcard:WebID, vcard:Group, foaf:Person, foaf:Agent, solid:AppProvider, solid:AppProviderClass, or recognized ACL classes.` +
233
+ ' Expected one of: vcard:WebID, vcard:Group, foaf:Person, foaf:Agent, solid:AppProvider, solid:AppProviderClass, or recognized ACL classes.' +
234
234
  ' Hint: try dropping a WebID profile URI, a vcard:Group URI, or a web app origin.' +
235
235
  typeDetails;
236
236
  debug.error(error);
@@ -0,0 +1 @@
1
+ export * from '../../v2/components/footer/index';