@hanzo/rooms 0.1.65 → 0.1.66
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/dist/host.js +2 -2
- package/dist/lib/account.js +3 -3
- package/dist/lib/api.d.ts +5 -0
- package/dist/lib/api.js +5 -0
- package/dist/look.js +2 -2
- package/package.json +1 -1
package/dist/host.js
CHANGED
|
@@ -25,7 +25,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
25
25
|
import { createContext, useContext } from 'react';
|
|
26
26
|
import { useIam, useOrganizations } from '@hanzo/iam/react';
|
|
27
27
|
import { useAppearance } from '@hanzo/appearance';
|
|
28
|
-
import {
|
|
28
|
+
import { api } from './lib/api.js';
|
|
29
29
|
const Plain = ({ prefetch: _prefetch, ...rest }) => _jsx("a", { ...rest });
|
|
30
30
|
const Context = createContext({
|
|
31
31
|
router: {
|
|
@@ -59,7 +59,7 @@ export function useLook() {
|
|
|
59
59
|
// passing through a room on the way to sign in sends nothing to the issuer.
|
|
60
60
|
return useAppearance({
|
|
61
61
|
org: org.id,
|
|
62
|
-
account: accessToken ? { base:
|
|
62
|
+
account: accessToken ? { base: api(), token: accessToken } : undefined,
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
/**
|
package/dist/lib/account.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { createContext, useContext, useState, useEffect, useMemo } from 'react';
|
|
4
4
|
import { useIam, useIamIdentity, useIamToken, useOrganizations } from '@hanzo/iam/react';
|
|
5
|
-
import {
|
|
5
|
+
import { api } from './api.js';
|
|
6
6
|
const AccountContext = createContext(undefined);
|
|
7
7
|
function mapUser(u) {
|
|
8
8
|
return {
|
|
@@ -54,8 +54,8 @@ function mapOrg(o, role) {
|
|
|
54
54
|
// once the new address has proved it can receive one. That is the verification
|
|
55
55
|
// flow's job, not a profile save's, so they are not here and this app does not
|
|
56
56
|
// draw a control that pretends otherwise.
|
|
57
|
-
/** IAM's self-scoped account door,
|
|
58
|
-
const account = () => `${
|
|
57
|
+
/** IAM's self-scoped account door, asked through the gateway (`api()`), which answers /v1/iam. */
|
|
58
|
+
const account = () => `${api()}/v1/iam/account`;
|
|
59
59
|
// ── The read ───────────────────────────────────────────────────────────────
|
|
60
60
|
//
|
|
61
61
|
// THE SAME DOOR, and that is the point: the row this page edits is the row it
|
package/dist/lib/api.d.ts
CHANGED
|
@@ -43,6 +43,11 @@ export declare function api(): string;
|
|
|
43
43
|
* Two spellings of one setting are indistinguishable from a working one until
|
|
44
44
|
* the day it is changed.
|
|
45
45
|
*/
|
|
46
|
+
/**
|
|
47
|
+
* The identity origin, for IAM's own PAGES (/account, /join). IAM's API is asked
|
|
48
|
+
* through the gateway, `api()`, which answers /v1/iam for every Hanzo origin, so
|
|
49
|
+
* a browser on hanzo.ai sends nothing to the identity origin.
|
|
50
|
+
*/
|
|
46
51
|
export declare function iam(): string;
|
|
47
52
|
/**
|
|
48
53
|
* The IAM application hanzo.ai signs people in through, and the one an invited
|
package/dist/lib/api.js
CHANGED
|
@@ -64,6 +64,11 @@ export function api() {
|
|
|
64
64
|
* Two spellings of one setting are indistinguishable from a working one until
|
|
65
65
|
* the day it is changed.
|
|
66
66
|
*/
|
|
67
|
+
/**
|
|
68
|
+
* The identity origin, for IAM's own PAGES (/account, /join). IAM's API is asked
|
|
69
|
+
* through the gateway, `api()`, which answers /v1/iam for every Hanzo origin, so
|
|
70
|
+
* a browser on hanzo.ai sends nothing to the identity origin.
|
|
71
|
+
*/
|
|
67
72
|
export function iam() {
|
|
68
73
|
if (onDevnet())
|
|
69
74
|
return IAM_DEV;
|
package/dist/look.js
CHANGED
|
@@ -12,11 +12,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
12
12
|
import { Text, YStack } from "@hanzo/ui";
|
|
13
13
|
import { Appearance } from "@hanzo/appearance";
|
|
14
14
|
import { useIam } from "@hanzo/iam/react";
|
|
15
|
-
import {
|
|
15
|
+
import { api } from "./lib/api.js";
|
|
16
16
|
import { useOrg } from "./host.js";
|
|
17
17
|
import { brand } from "./where.js";
|
|
18
18
|
export function Look() {
|
|
19
19
|
const { accessToken } = useIam();
|
|
20
20
|
const org = useOrg();
|
|
21
|
-
return (_jsxs(YStack, { gap: "$3", maxW: 420, children: [_jsx(Text, { fontSize: "$3", color: "$soft", children: "Kept with your account, so it follows you to every Hanzo surface." }), _jsx(Appearance, { org: org.id, orgName: org.name || brand(), account: { base:
|
|
21
|
+
return (_jsxs(YStack, { gap: "$3", maxW: 420, children: [_jsx(Text, { fontSize: "$3", color: "$soft", children: "Kept with your account, so it follows you to every Hanzo surface." }), _jsx(Appearance, { org: org.id, orgName: org.name || brand(), account: { base: api(), token: accessToken ?? undefined } })] }));
|
|
22
22
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/rooms",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.66",
|
|
4
4
|
"description": "The workspace rooms — Home, Chat, Inbox, Contacts, Meet, Cal, Drive, Board, Work, Bots — and the frame that holds them, once, for every Hanzo surface.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|