@hanzo/rooms 0.1.87 → 0.1.89

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/Chat.js CHANGED
@@ -1169,6 +1169,10 @@ function Thread({ placeholder = message(), initial, anonymous = false, heading,
1169
1169
  { id: `u-${Date.now()}`, role: "user", content: text },
1170
1170
  { id: `a-${Date.now()}`, role: "assistant", content: reply },
1171
1171
  ]);
1172
+ // A page a plugin's answer carries (a design system's preview) opens beside it at once.
1173
+ const made = artifacts(reply).filter(renders);
1174
+ if (made.length)
1175
+ see(made[made.length - 1]);
1172
1176
  if (!anonymous)
1173
1177
  void ai.threads
1174
1178
  .record([{ role: "user", content: text }, { role: "assistant", content: reply }], open ?? undefined)
package/dist/Orgs.js CHANGED
@@ -584,7 +584,7 @@ function Pick({ members, current, onPick, onClose, }) {
584
584
  e.preventDefault();
585
585
  if (shown[0])
586
586
  onPick(shown[0].name);
587
- }, children: _jsx(SearchInput, { name: "organizations", value: q, onChange: setQ, placeholder: sudo ? 'Search every organization' : 'Find an organization', actions: sudo ? null : (_jsxs(Button, { type: "button", onClick: () => setFounding(true), children: [_jsx(Plus, { size: 16, "aria-hidden": true }), "New organization"] })) }) }), _jsx(YStack, { render: "ul", "aria-label": "Your organizations", m: 0, p: 0, mt: 14, gap: 8, children: shown.map((o) => (_jsx(Choice, { org: o, current: o.name === current, onPress: () => onPick(o.name) }, o.name))) }), shown.length === 0 ? (_jsxs(Text, { render: "p", mt: 14, fontSize: "$3", color: "$soft", children: ["None of yours matches \u201C", q.trim(), "\u201D."] })) : null, sudo ? _jsx(Everyone, { q: q, skip: members }) : null] }), founding ? _jsx(Found, { onClose: () => setFounding(false), onMade: onPick }) : null] }));
587
+ }, children: _jsx(SearchInput, { name: "organizations", value: q, onChange: setQ, placeholder: sudo ? 'Search every organization' : 'Find an organization', actions: sudo ? null : (_jsxs(Button, { type: "button", onClick: () => setFounding(true), children: [_jsx(Plus, { size: 16, "aria-hidden": true }), "New organization"] })) }) }), _jsx(YStack, { render: "ul", "aria-label": "Your organizations", m: 0, p: 0, mt: 14, gap: 8, children: shown.map((o) => (_jsx(Choice, { org: o, current: o.name === current, onPress: () => onPick(o.name) }, o.name))) }), shown.length === 0 ? (_jsxs(Text, { render: "p", mt: 14, fontSize: "$3", color: "$soft", children: ["None of yours matches \u201C", q.trim(), "\u201D."] })) : null, sudo ? _jsx(Everyone, { q: q, skip: members }) : null] }), founding ? _jsx(Found, { onClose: () => setFounding(false) }) : null] }));
588
588
  }
589
589
  /**
590
590
  * EVERY ORGANIZATION, for a SuperAdmin to step into.
@@ -656,9 +656,12 @@ function Everyone({ q, skip }) {
656
656
  * re-keys the session (cloud cors_origin.go `sessionRoutes`). It is sent the
657
657
  * name when the name makes the slug, and the slug when the slug was typed, the
658
658
  * display name then written on the row (lib/invite.ts `setOrganizationProfile`).
659
- * The token in hand predates it, so it is refreshed before the organization opens.
659
+ * The token in hand predates it, so it is refreshed, and the organization opens on
660
+ * a load: @hanzo/iam's `useOrganizations` reads the token once per mount, and an
661
+ * instance the room mounts on the old token writes its home (the token's first
662
+ * org) back over the pick, which left the room unscoped after one request.
660
663
  */
661
- function Found({ onClose, onMade }) {
664
+ function Found({ onClose }) {
662
665
  const { sdk } = useIam();
663
666
  const [name, setName] = useState('');
664
667
  const [typed, setTyped] = useState(null);
@@ -695,13 +698,8 @@ function Found({ onClose, onMade }) {
695
698
  throw new Error(`${made} is made, and it is still called ${made}: ${say(err)}`);
696
699
  });
697
700
  }
698
- // A token that does not carry it yet is minted on the next load, which opens it.
699
- if (!claimed().includes(made)) {
700
- pick(made);
701
- window.location.reload();
702
- return;
703
- }
704
- onMade(made);
701
+ pick(made);
702
+ window.location.reload();
705
703
  }
706
704
  catch (err) {
707
705
  setRefused(say(err));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/rooms",
3
- "version": "0.1.87",
3
+ "version": "0.1.89",
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",
@@ -49,7 +49,7 @@
49
49
  "peerDependencies": {
50
50
  "@hanzo/ai": ">=0.6.23",
51
51
  "@hanzo/appearance": ">=0.2.6",
52
- "@hanzo/build": ">=0.2.73",
52
+ "@hanzo/build": ">=0.2.74",
53
53
  "@hanzo/composer": ">=0.2.0",
54
54
  "@hanzo/event": ">=0.3.56",
55
55
  "@hanzo/gui": "^8.3.5",
@@ -67,7 +67,7 @@
67
67
  "devDependencies": {
68
68
  "@hanzo/ai": "0.6.23",
69
69
  "@hanzo/appearance": "0.2.8",
70
- "@hanzo/build": "0.2.73",
70
+ "@hanzo/build": "0.2.74",
71
71
  "@hanzo/composer": "0.2.0",
72
72
  "@hanzo/design": "0.5.34",
73
73
  "@hanzo/event": "0.3.56",