@clearly-hub/node 0.2.0 → 0.3.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.
- package/README.md +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -59,14 +59,15 @@ Or `npm install @clearly-hub/browser` and `import { clearlyHub } from '@clearly-
|
|
|
59
59
|
|
|
60
60
|
## The browser package
|
|
61
61
|
|
|
62
|
-
| |
|
|
63
|
-
| ------------------------------------------------ |
|
|
64
|
-
| `clearlyHub.session()` | `{ signedIn: false }`, or the signed-in user (`sub`, `email`, `name`, `appUserId`)
|
|
65
|
-
| `clearlyHub.signIn()`, `signOut()` | Go through Clearly.HUB and come back to this page
|
|
66
|
-
| `clearlyHub.open(action, { data, display })` | Opens a hosted screen; resolves with its checked answer. Call it from a click: browsers only allow popups there
|
|
67
|
-
| `clearlyHub.result()` | After a redirect screen: its answer, on the page it came back to
|
|
68
|
-
|
|
|
69
|
-
|
|
|
62
|
+
| | |
|
|
63
|
+
| ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
64
|
+
| `clearlyHub.session()` | `{ signedIn: false }`, or the signed-in user (`sub`, `email`, `name`, `appUserId`) |
|
|
65
|
+
| `clearlyHub.signIn()`, `signOut()` | Go through Clearly.HUB and come back to this page |
|
|
66
|
+
| `clearlyHub.open(action, { data, display })` | Opens a hosted screen; resolves with its checked answer. Call it from a click: browsers only allow popups there |
|
|
67
|
+
| `clearlyHub.result()` | After a redirect screen: its answer, on the page it came back to |
|
|
68
|
+
| `clearlyHub.onAnswer(callback)` | Every answer, once each, from a popup or after a redirect; also when you start listening after it arrived (React). Returns a function that stops listening |
|
|
69
|
+
| `<clearly-hub-button action display data label>` | Branded button for `sign-in`, `sign-out` and each screen |
|
|
70
|
+
| `clearly-hub-answer` event | Every answer, from a popup or after a redirect |
|
|
70
71
|
|
|
71
72
|
**Styling the button.** It uses your page's font. Attributes for the common cases:
|
|
72
73
|
`variant="outline"`, `size="small"` or `size="large"`. CSS custom properties for your look:
|
|
@@ -131,7 +132,6 @@ store; it's split over several cookies because tokens are large.
|
|
|
131
132
|
|
|
132
133
|
- Setting up your own workspaces or tenants: do it by hand, with plans that need approval, or in
|
|
133
134
|
`onAnswer` for `SELECT_SUBSCRIPTION`.
|
|
134
|
-
- Child hubs in `session().hubs`: Clearly.HUB only returns root hubs today.
|
|
135
135
|
- Other server languages: follow the Build checklist.
|
|
136
136
|
|
|
137
137
|
## Working on this repo
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clearly-hub/node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Clearly.HUB for Node servers: sign-in, hosted screens, subscriptions and usage in one handler",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Future Insight Group BV",
|