@@ -6,22 +6,60 @@ User Interface widgets and utilities for Solid
66
77These are HTML5 widgets which connect to a solid store. Building blocks for solid-based apps.
88
9- Use:
9+ ## Getting started
10+ ### In npm-based projects
11+ When including solid-ui in an npm-based project, you can use it with:
1012
11- ```
13+ ``` js
1214 import { ns , rdf , acl , aclControl , authn , create , dom , icons , log , matrix , media ,
1315 messageArea , infiniteMessageArea , pad , preferences , store , style , table , tabs , utils , widgets , versionInfo
1416} from ' solid-ui'
1517
1618```
19+ ### Directly in a webpage
20+ Clone this repo, and in the repo root run:
21+
22+ * ` npm install `
23+ * ` npm run build `
24+
25+ This will generate a ` lib/ ` folder containing, among other artifacts, ` lib/webpack-bundle.js ` .
26+ Now run ` npx serve ` and go to http://localhost:5000/examples/ with your browser to see some examples.
27+ See the [ 'examples' folder] ( https://github.com/solid/solid-ui/tree/examples/examples ) for the
28+ source code of those examples.
29+
30+ While viewing one of those examples, you can open the web console in your browser and for instance
31+ try how you can create a button:
32+ ``` js
33+ const solidLogo = ' https://solidproject.org/assets/img/solid-emblem.svg'
34+ const myButton = UI .widgets .button (document , solidLogo, ' test' , () => window .alert (' clicked!' ))
35+ UI .widgets .clearElement (document .body )
36+ document .body .appendChild (myButton)
37+ ```
38+
39+ Or a chat widget:
40+ ``` js
41+ const chatChannel = ' https://example-user.inrupt.net/public/example-chat/index.ttl#this'
42+ const chat = UI .infiniteMessageArea (document , UI .store , UI .rdf .namedNode (chatChannel))
43+ document .body .appendChild (chat)
44+ ```
45+
46+ Or a full ACL Control Box:
47+ ``` js
48+ const exampleFolder = ' https://example-user.inrupt.net/public/public-control/'
49+ const aclControlBox = UI .aclControl .ACLControlBox5 (UI .rdf .namedNode (exampleFolder), { dom: document }, ' ' , UI .store )
50+ document .body .appendChild (aclControlBox)
51+ ```
52+
1753
18- Please refer to the [ API documentation] ( http://solid.github.io/solid-ui//Documentation/api/ ) .
54+ ## Documentation
55+ See https://solid.github.io/solid-ui/Documentation/api/ for the API documentation.
1956
57+ ## Overview
2058This has been a place to put any functionality from solid views which has been generalized to be usable in other views.
2159
2260- Authentication UI: manage the user's logged in/out state.
23- - Discovery: finding the users stuff, and leaving records of new things
24- - Preferences: UI fo rmanaging a user's preefrences with two axes of defaults
61+ - Discovery: finding the user's stuff, and leaving records of new things
62+ - Preferences: UI for managing a user's preferences with two axes of defaults
2563- An Access Control List widget for Solid ACL system
2664- Acess Control Logic
2765- Create a new object from modules/extensions which have registered their ability to create things
@@ -33,11 +71,11 @@ This has been a place to put any functionality from solid views which has been g
3371
3472Some of the larger controls include:
3573
36- - A chat widget: add discussion to any object. Infinte scroll, embedded images, social reactions, etc etc
74+ - A chat widget: add discussion to any object. Infinite scroll, embedded images, social reactions, etc etc
3775- A people picker widget for choosing a set of people or an existing group
38- - A general purpose table display with built-in facetted browsing
39- - A two-dimentional matrix of editable live data extends in both domension .
40- - A notepad of shared notes for real-time collaboration.
76+ - A general purpose table display with built-in faceted browsing
77+ - A two-dimentional matrix of editable live data that extends in both dimensions .
78+ - A notepad of shared notes for real-time collaboration
4179- Drag and drop code for linking things and uploading files
4280- A set of tabs for holding other widgets and arbitrary UI elements
4381
0 commit comments