@hanzo/app 0.2.57 → 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.
Files changed (128) hide show
  1. package/README.md +8 -8
  2. package/dist/{Me.d.ts → Account.d.ts} +1 -1
  3. package/dist/{Me.js → Account.js} +3 -3
  4. package/dist/App.d.ts +2 -2
  5. package/dist/App.js +18 -15
  6. package/dist/{Top.d.ts → Bar.d.ts} +1 -1
  7. package/dist/{Top.js → Bar.js} +3 -3
  8. package/dist/Betas.js +1 -1
  9. package/dist/Board.js +4 -4
  10. package/dist/Chat.d.ts +4 -4
  11. package/dist/Chat.js +96 -96
  12. package/dist/Contacts.js +17 -15
  13. package/dist/Directory.js +7 -21
  14. package/dist/Drive.js +6 -6
  15. package/dist/{Orgs.d.ts → Gate.d.ts} +1 -1
  16. package/dist/{Orgs.js → Gate.js} +32 -32
  17. package/dist/{Chrome.d.ts → Header.d.ts} +1 -1
  18. package/dist/{Chrome.js → Header.js} +1 -1
  19. package/dist/Home.d.ts +3 -3
  20. package/dist/Home.js +30 -30
  21. package/dist/Inbox.js +29 -33
  22. package/dist/Meet.js +22 -22
  23. package/dist/Rail.js +6 -6
  24. package/dist/RightPane.js +2 -2
  25. package/dist/{Palette.d.ts → Search.d.ts} +1 -1
  26. package/dist/{Palette.js → Search.js} +1 -1
  27. package/dist/Settings.d.ts +3 -3
  28. package/dist/Settings.js +5 -5
  29. package/dist/SettingsPane.d.ts +2 -2
  30. package/dist/SettingsPane.js +5 -5
  31. package/dist/Setup.js +2 -2
  32. package/dist/Shell.d.ts +22 -31
  33. package/dist/Shell.js +167 -114
  34. package/dist/{Column.d.ts → Sidebar.d.ts} +1 -1
  35. package/dist/{Column.js → Sidebar.js} +5 -5
  36. package/dist/Support.js +2 -2
  37. package/dist/Talk.d.ts +3 -3
  38. package/dist/Talk.js +18 -18
  39. package/dist/TeamPreview.js +26 -26
  40. package/dist/TeamStory.js +1 -1
  41. package/dist/Usage.js +2 -2
  42. package/dist/Work.js +2 -2
  43. package/dist/bots/Bots.js +2 -2
  44. package/dist/bots/Lights.d.ts +1 -1
  45. package/dist/bots/Lights.js +1 -1
  46. package/dist/bots/api.d.ts +8 -7
  47. package/dist/bots/api.js +4 -4
  48. package/dist/bots/ink.js +3 -3
  49. package/dist/bots/kit.d.ts +2 -2
  50. package/dist/bots/kit.js +4 -4
  51. package/dist/bots/runtime.js +12 -12
  52. package/dist/cast.d.ts +14 -14
  53. package/dist/cast.js +12 -12
  54. package/dist/channels.d.ts +132 -0
  55. package/dist/{rooms.js → channels.js} +56 -55
  56. package/dist/conversations.d.ts +8 -8
  57. package/dist/conversations.js +18 -17
  58. package/dist/crew.d.ts +1 -1
  59. package/dist/crew.js +12 -12
  60. package/dist/dev.js +6 -6
  61. package/dist/failure.d.ts +2 -2
  62. package/dist/failure.js +6 -6
  63. package/dist/ground.d.ts +1 -1
  64. package/dist/ground.js +1 -1
  65. package/dist/help.d.ts +1 -1
  66. package/dist/help.js +2 -2
  67. package/dist/hint.d.ts +1 -1
  68. package/dist/hint.js +1 -1
  69. package/dist/host.d.ts +15 -15
  70. package/dist/host.js +13 -13
  71. package/dist/index.d.ts +5 -5
  72. package/dist/index.js +4 -4
  73. package/dist/lib/ai.js +1 -1
  74. package/dist/lib/api.d.ts +1 -1
  75. package/dist/lib/api.js +1 -1
  76. package/dist/lib/destination.d.ts +3 -3
  77. package/dist/lib/destination.js +3 -3
  78. package/dist/lib/home.d.ts +2 -2
  79. package/dist/lib/home.js +2 -2
  80. package/dist/lib/host.d.ts +17 -16
  81. package/dist/lib/host.js +19 -18
  82. package/dist/lib/hostname.d.ts +1 -1
  83. package/dist/lib/hostname.js +1 -1
  84. package/dist/lib/list.d.ts +1 -1
  85. package/dist/lib/list.js +1 -1
  86. package/dist/lib/models.js +1 -1
  87. package/dist/lib/org.d.ts +1 -1
  88. package/dist/lib/org.js +1 -1
  89. package/dist/lib/orgname.d.ts +1 -1
  90. package/dist/lib/orgname.js +1 -1
  91. package/dist/lib/session.d.ts +4 -4
  92. package/dist/lib/session.js +6 -6
  93. package/dist/lib/tier.d.ts +4 -4
  94. package/dist/lib/tier.js +5 -5
  95. package/dist/lib/tiers.d.ts +1 -1
  96. package/dist/lib/tiers.js +10 -10
  97. package/dist/lib/web.d.ts +1 -1
  98. package/dist/lib/web.js +1 -1
  99. package/dist/network.d.ts +18 -18
  100. package/dist/network.js +28 -28
  101. package/dist/open.d.ts +24 -22
  102. package/dist/open.js +19 -19
  103. package/dist/pane.d.ts +6 -6
  104. package/dist/pane.js +10 -10
  105. package/dist/roster.d.ts +2 -2
  106. package/dist/roster.js +1 -1
  107. package/dist/seek.js +1 -1
  108. package/dist/slide.d.ts +1 -1
  109. package/dist/slide.js +1 -1
  110. package/dist/span.js +1 -1
  111. package/dist/stars.d.ts +4 -4
  112. package/dist/stars.js +8 -10
  113. package/dist/tabs.d.ts +1 -1
  114. package/dist/tabs.js +1 -1
  115. package/dist/team.js +1 -1
  116. package/dist/thread.d.ts +3 -3
  117. package/dist/thread.js +4 -4
  118. package/dist/ui.d.ts +1 -1
  119. package/dist/ui.js +1 -1
  120. package/dist/where.d.ts +7 -7
  121. package/dist/where.js +2 -2
  122. package/dist/workday.d.ts +26 -26
  123. package/dist/workday.js +187 -187
  124. package/package.json +3 -3
  125. package/dist/Room.d.ts +0 -8
  126. package/dist/Room.js +0 -51
  127. package/dist/rooms.d.ts +0 -131
  128. /package/dist/lib/{rooms.json → routes.json} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/app",
3
- "version": "0.2.57",
3
+ "version": "0.3.0",
4
4
  "description": "Hanzo's app: the shell and its apps (Home, Chat, Inbox, Contacts, Meet, Calendar, Drive, Board, Work, Bots), once, for every Hanzo surface.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -49,7 +49,7 @@
49
49
  "simple-icons": "16.30.0"
50
50
  },
51
51
  "peerDependencies": {
52
- "@hanzo/ai": ">=0.6.23",
52
+ "@hanzo/ai": ">=0.7.0",
53
53
  "@hanzo/appearance": ">=0.2.12",
54
54
  "@hanzo/build": ">=0.2.84",
55
55
  "@hanzo/composer": ">=0.2.0",
@@ -69,7 +69,7 @@
69
69
  "react-dom": ">=19.2.8"
70
70
  },
71
71
  "devDependencies": {
72
- "@hanzo/ai": "0.6.23",
72
+ "@hanzo/ai": "0.7.0",
73
73
  "@hanzo/appearance": "0.2.12",
74
74
  "@hanzo/build": "0.2.84",
75
75
  "@hanzo/composer": "0.2.0",
package/dist/Room.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import { type Mode } from './Shell.js';
3
- export declare function Room({ mode, front, children, }: {
4
- mode: Mode;
5
- /** Home at `/` on a workspace rooted there: a stranger meets the host's Landing (`Orgs`). */
6
- front?: boolean;
7
- children: ReactNode;
8
- }): import("react").JSX.Element;
package/dist/Room.js DELETED
@@ -1,51 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { useEffect } from 'react';
4
- import { Workspace } from './Shell.js';
5
- import { Orgs } from './Orgs.js';
6
- import { rememberDestination } from './lib/destination.js';
7
- import { away } from './lib/host.js';
8
- import { useHost } from './lib/hostname.js';
9
- import { link } from './lib/tags.js';
10
- import { useRooms } from './host.js';
11
- export function Room({ mode, front = false, children, }) {
12
- const { router } = useRooms();
13
- // A sign-in leaves for the issuer and returns to a FIXED callback that knows
14
- // nothing of the room the reader was in. So the room is written down here,
15
- // the one place the app meets the router, and the trip `Orgs` starts for a
16
- // signed-out reader returns HERE — address, `?q=` and all — rather than to
17
- // the host's landing.
18
- useEffect(() => {
19
- rememberDestination();
20
- }, []);
21
- // THE APEX KEEPS THE APP AND THE WORKSPACE KEEPS ITS ROOMS. A room asked for
22
- // on hanzo.ai is the same path and query on hanzo.team, and the location is
23
- // replaced with it once React owns the page: the export is static, so nothing
24
- // earlier knows the host. The room draws nothing while it leaves, so `Orgs`
25
- // never starts a sign-in on the host being left.
26
- const host = useHost();
27
- const here = host ? window.location : null;
28
- const to = here ? away(host, `${here.pathname}${here.search}${here.hash}`) : null;
29
- useEffect(() => {
30
- if (to)
31
- window.location.replace(link(to));
32
- }, [to]);
33
- if (to)
34
- return null;
35
- // A session comes first, then the organization: nothing of the workspace is
36
- // drawn until the reader has signed in at hanzo.id and picked the
37
- // organization they are working in, and on the workspace's own host until
38
- // that organization's plan is live (`Orgs`).
39
- // Going to a room from the apex is going to hanzo.team, in this tab.
40
- return (_jsx(Orgs, { front: front, children: _jsx(Workspace, { mode: mode, navigate: (route) => {
41
- // A page of another origin — hanzo.ai's from hanzo.team — is a
42
- // document load, not a client route the host's router can take.
43
- if (/^https?:\/\//.test(route))
44
- return window.location.assign(link(route));
45
- const to = away(window.location.hostname, route);
46
- if (to)
47
- window.location.assign(link(to));
48
- else
49
- router.push(route);
50
- }, back: () => router.back(), forward: () => router.forward(), children: children }) }));
51
- }
package/dist/rooms.d.ts DELETED
@@ -1,131 +0,0 @@
1
- /**
2
- * A room as Team keeps it: a channel, a direct message, or a room bound to work.
3
- *
4
- * `direct` is the distinction the sidebar draws — a channel anyone in the org
5
- * can read against a conversation between two people — so it decides the sigil
6
- * and the section rather than a guess from the name.
7
- *
8
- * `space` is half of a room's address: two spaces of one org may each hold a
9
- * room called #general, so the pair identifies one and the id alone does not.
10
- * It is also the box a file goes in — `/v1/team/files/{space}` is addressed by
11
- * space, never by room. The field is the server's own name for it
12
- * (apps/team/room.go, teamRoom.Space).
13
- */
14
- export interface TeamRoom {
15
- id: string;
16
- space: string;
17
- name: string;
18
- topic?: string;
19
- desc?: string;
20
- direct: boolean;
21
- private: boolean;
22
- visibility?: 'public' | 'org' | 'private';
23
- orgId?: string;
24
- archived: boolean;
25
- members: string[];
26
- count?: number;
27
- /**
28
- * What the room is FOR — "standing" for one meant to outlive any task,
29
- * "bound" for one opened for a single piece of work. Absent reads standing.
30
- * It is intent, not state: whether the room is open now is `archived`.
31
- */
32
- life?: string;
33
- /**
34
- * What the room is ABOUT, each a "<kind>:<ref>" — "repo:hanzoai/cloud",
35
- * "issue:1010". References, never copies: the app that owns a project is the
36
- * one that can resolve it.
37
- */
38
- bindings?: string[];
39
- }
40
- /**
41
- * The key the workspace selects a room by, and puts in the address:
42
- * `team:<space>/<id>`. Both halves, because a room id is unique within a space
43
- * and not across the org. Prefixed rather than hashed, because a key a person
44
- * can read in a URL is one they can report in a bug.
45
- */
46
- export declare const teamKey: (room: Pick<TeamRoom, 'space' | 'id'>) => string;
47
- /** The address a key names, or null for a key that is not a room's. */
48
- export declare function roomKey(key: string | null): {
49
- space: string;
50
- id: string;
51
- } | null;
52
- /** The page a key opens on: Home, carrying it as the `?room=` that
53
- * `app/(app)/home/_workspace.tsx` reads on arrival. */
54
- export declare const roomHref: (key: string) => string;
55
- /** Asks the platform again. The list held stays on screen until it answers. */
56
- export declare function reloadRooms(): void;
57
- /**
58
- * The org's real rooms, from Team, and the way to add one.
59
- *
60
- * `/v1/team/rooms` is the org's own list and answers only a validated
61
- * principal. An archived room is not drawn: it is a room the org closed, and a
62
- * sidebar that lists them makes leaving one meaningless.
63
- *
64
- * NULL IS UNKNOWN AND IT IS NOT EMPTY. Three states, and the caller owes a
65
- * sentence for each: `null` while nothing is known, `[]` for an org that
66
- * genuinely has no rooms, and `wrong` for a service that answered no. A list is
67
- * never fabricated to cover any of them.
68
- *
69
- * `open` posts a room and HOLDS the row the platform answered with: a 201 is
70
- * the stored room, so every view carries it from that moment and the reader can
71
- * step into it without a second read. The caller is not added to a room by the
72
- * server, so it names its own members.
73
- */
74
- export declare function useTeamRooms(): {
75
- rooms: TeamRoom[] | null;
76
- wrong: unknown;
77
- reload: () => void;
78
- open: (room: {
79
- name: string;
80
- space?: string;
81
- members: string[];
82
- }) => Promise<TeamRoom>;
83
- };
84
- /** The room with that id, or undefined for none open. */
85
- export declare function roomOf(rooms: TeamRoom[] | null, id: string | null): TeamRoom | undefined;
86
- /**
87
- * One thing somebody said in a room.
88
- *
89
- * `author` is the team ACCOUNT that wrote it, not a name: what to call somebody
90
- * is the roster's answer (`roster.ts`), and copying it onto every message is
91
- * how the two come to disagree. `text` is plain — the platform stores the
92
- * client's markup and reduces it on the way out, so nothing here parses HTML.
93
- */
94
- export interface RoomMessage {
95
- id: string;
96
- room: string;
97
- author: string;
98
- text: string;
99
- /** Unix MILLIseconds, which is what the platform stamps. */
100
- createdOn: number;
101
- }
102
- /**
103
- * A room's conversation, and the way to add to it.
104
- *
105
- * READ AND WRITE IN ONE HOOK, because they are one question — a pane that can
106
- * show a room and not answer in it is a directory — and because the poller and
107
- * the sender then cannot disagree about what the room holds.
108
- *
109
- * THE ROOM IS POLLED, every two seconds while it is open and the tab is
110
- * showing. The team plane has no push a browser can read but its transactor
111
- * socket, which is a binary protocol rather than a line; a read costs a few
112
- * hundred milliseconds and nothing on the server past the space's own
113
- * messages, so half a request a second per open room is the honest price of
114
- * seeing an answer land. Each read carries its own AbortController, and the
115
- * cleanup aborts the one in flight and stops the clock — on unmount, and when
116
- * the room or its space changes.
117
- *
118
- * `send` posts and answers the row the platform stored: a 201 is the message,
119
- * with its id and stamp, so the hook holds it at once and the next poll finds
120
- * the same id and keeps one. Nothing the platform did not accept is ever held.
121
- *
122
- * `space` is half a room's address (two spaces of one org may each hold a room
123
- * with one id), so both calls carry it and a room with neither reads empty
124
- * rather than guessing.
125
- */
126
- export declare function useRoomMessages(room: string | null, space: string | undefined): {
127
- messages: RoomMessage[];
128
- failed: unknown;
129
- send: (text: string) => Promise<RoomMessage>;
130
- reload: () => void;
131
- };
File without changes