@hanzo/rooms 0.1.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/LICENSE-APACHE +205 -0
- package/LICENSE-MIT +21 -0
- package/README.md +23 -0
- package/dist/Account.d.ts +8 -0
- package/dist/Account.js +58 -0
- package/dist/Beluga.d.ts +12 -0
- package/dist/Beluga.js +152 -0
- package/dist/Billing.d.ts +1 -0
- package/dist/Billing.js +31 -0
- package/dist/Board.d.ts +9 -0
- package/dist/Board.js +447 -0
- package/dist/Boxes.d.ts +1 -0
- package/dist/Boxes.js +173 -0
- package/dist/CalScheduler.d.ts +15 -0
- package/dist/CalScheduler.js +196 -0
- package/dist/Chat.d.ts +35 -0
- package/dist/Chat.js +1049 -0
- package/dist/Column.d.ts +15 -0
- package/dist/Column.js +88 -0
- package/dist/Contacts.d.ts +1 -0
- package/dist/Contacts.js +301 -0
- package/dist/Directory.d.ts +24 -0
- package/dist/Directory.js +356 -0
- package/dist/Drive.d.ts +2 -0
- package/dist/Drive.js +466 -0
- package/dist/Find.d.ts +7 -0
- package/dist/Find.js +82 -0
- package/dist/Guide.d.ts +6 -0
- package/dist/Guide.js +272 -0
- package/dist/Home.d.ts +39 -0
- package/dist/Home.js +306 -0
- package/dist/Inbox.d.ts +9 -0
- package/dist/Inbox.js +193 -0
- package/dist/Market.d.ts +3 -0
- package/dist/Market.js +149 -0
- package/dist/Me.d.ts +27 -0
- package/dist/Me.js +251 -0
- package/dist/Meet.d.ts +9 -0
- package/dist/Meet.js +370 -0
- package/dist/ModeMark.d.ts +8 -0
- package/dist/ModeMark.js +18 -0
- package/dist/OrgSwitcher.d.ts +31 -0
- package/dist/OrgSwitcher.js +120 -0
- package/dist/Orgs.d.ts +10 -0
- package/dist/Orgs.js +582 -0
- package/dist/Profile.d.ts +4 -0
- package/dist/Profile.js +67 -0
- package/dist/Prose.d.ts +5 -0
- package/dist/Prose.js +111 -0
- package/dist/ProviderMark.d.ts +17 -0
- package/dist/ProviderMark.js +277 -0
- package/dist/Recents.d.ts +10 -0
- package/dist/Recents.js +91 -0
- package/dist/RightPane.d.ts +13 -0
- package/dist/RightPane.js +426 -0
- package/dist/Room.d.ts +8 -0
- package/dist/Room.js +50 -0
- package/dist/Scene.d.ts +12 -0
- package/dist/Scene.js +105 -0
- package/dist/Settings.d.ts +46 -0
- package/dist/Settings.js +321 -0
- package/dist/Setup.d.ts +1 -0
- package/dist/Setup.js +36 -0
- package/dist/Share.d.ts +3 -0
- package/dist/Share.js +130 -0
- package/dist/Shared.d.ts +1 -0
- package/dist/Shared.js +113 -0
- package/dist/Shell.d.ts +63 -0
- package/dist/Shell.js +1225 -0
- package/dist/Start.d.ts +1 -0
- package/dist/Start.js +96 -0
- package/dist/Support.d.ts +14 -0
- package/dist/Support.js +122 -0
- package/dist/Talk.d.ts +4 -0
- package/dist/Talk.js +107 -0
- package/dist/Upgrade.d.ts +11 -0
- package/dist/Upgrade.js +75 -0
- package/dist/Usage.d.ts +1 -0
- package/dist/Usage.js +21 -0
- package/dist/Vibe.d.ts +2 -0
- package/dist/Vibe.js +188 -0
- package/dist/Work.d.ts +12 -0
- package/dist/Work.js +256 -0
- package/dist/bots/Bots.d.ts +2 -0
- package/dist/bots/Bots.js +456 -0
- package/dist/bots/Lights.d.ts +8 -0
- package/dist/bots/Lights.js +13 -0
- package/dist/bots/api.d.ts +120 -0
- package/dist/bots/api.js +75 -0
- package/dist/bots/face.d.ts +5 -0
- package/dist/bots/face.js +13 -0
- package/dist/bots/ink.d.ts +7 -0
- package/dist/bots/ink.js +29 -0
- package/dist/bots/kit.d.ts +113 -0
- package/dist/bots/kit.js +43 -0
- package/dist/bots/runtime.d.ts +4 -0
- package/dist/bots/runtime.js +326 -0
- package/dist/card.d.ts +52 -0
- package/dist/card.js +52 -0
- package/dist/cast.d.ts +143 -0
- package/dist/cast.js +251 -0
- package/dist/connect.d.ts +29 -0
- package/dist/connect.js +64 -0
- package/dist/contacts-store.d.ts +111 -0
- package/dist/contacts-store.js +276 -0
- package/dist/conversations.d.ts +54 -0
- package/dist/conversations.js +98 -0
- package/dist/copy.d.ts +23 -0
- package/dist/copy.js +39 -0
- package/dist/crew.d.ts +36 -0
- package/dist/crew.js +304 -0
- package/dist/dev.d.ts +3 -0
- package/dist/dev.js +102 -0
- package/dist/enso.d.ts +70 -0
- package/dist/enso.js +112 -0
- package/dist/failure.d.ts +57 -0
- package/dist/failure.js +143 -0
- package/dist/ground.d.ts +32 -0
- package/dist/ground.js +32 -0
- package/dist/host.d.ts +76 -0
- package/dist/host.js +76 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +12 -0
- package/dist/kept.d.ts +5 -0
- package/dist/kept.js +27 -0
- package/dist/lib/account.d.ts +49 -0
- package/dist/lib/account.js +229 -0
- package/dist/lib/ai.d.ts +46 -0
- package/dist/lib/ai.js +140 -0
- package/dist/lib/api.d.ts +43 -0
- package/dist/lib/api.js +62 -0
- package/dist/lib/bare.d.ts +9 -0
- package/dist/lib/bare.js +7 -0
- package/dist/lib/coding.d.ts +105 -0
- package/dist/lib/coding.js +87 -0
- package/dist/lib/destination.d.ts +102 -0
- package/dist/lib/destination.js +260 -0
- package/dist/lib/durable.d.ts +66 -0
- package/dist/lib/durable.js +107 -0
- package/dist/lib/first.d.ts +11 -0
- package/dist/lib/first.js +23 -0
- package/dist/lib/home.d.ts +61 -0
- package/dist/lib/home.js +54 -0
- package/dist/lib/host.d.ts +104 -0
- package/dist/lib/host.js +132 -0
- package/dist/lib/hostname.d.ts +1 -0
- package/dist/lib/hostname.js +14 -0
- package/dist/lib/hydrated.d.ts +1 -0
- package/dist/lib/hydrated.js +20 -0
- package/dist/lib/integrations.d.ts +21 -0
- package/dist/lib/integrations.js +1 -0
- package/dist/lib/intent.d.ts +6 -0
- package/dist/lib/intent.js +71 -0
- package/dist/lib/invite.d.ts +155 -0
- package/dist/lib/invite.js +245 -0
- package/dist/lib/limits.d.ts +55 -0
- package/dist/lib/limits.js +119 -0
- package/dist/lib/list.d.ts +9 -0
- package/dist/lib/list.js +11 -0
- package/dist/lib/mark.d.ts +13 -0
- package/dist/lib/mark.js +85 -0
- package/dist/lib/mix.d.ts +22 -0
- package/dist/lib/mix.js +22 -0
- package/dist/lib/models.d.ts +27 -0
- package/dist/lib/models.js +106 -0
- package/dist/lib/org.d.ts +109 -0
- package/dist/lib/org.js +140 -0
- package/dist/lib/path.d.ts +9 -0
- package/dist/lib/path.js +29 -0
- package/dist/lib/plans.d.ts +193 -0
- package/dist/lib/plans.js +310 -0
- package/dist/lib/prose.d.ts +13 -0
- package/dist/lib/prose.js +62 -0
- package/dist/lib/reach.d.ts +17 -0
- package/dist/lib/reach.js +70 -0
- package/dist/lib/rooms.json +23 -0
- package/dist/lib/served.d.ts +20 -0
- package/dist/lib/served.js +92 -0
- package/dist/lib/session.d.ts +211 -0
- package/dist/lib/session.js +493 -0
- package/dist/lib/share.d.ts +131 -0
- package/dist/lib/share.js +216 -0
- package/dist/lib/signout.d.ts +14 -0
- package/dist/lib/signout.js +40 -0
- package/dist/lib/tags.d.ts +27 -0
- package/dist/lib/tags.js +46 -0
- package/dist/lib/tap.d.ts +17 -0
- package/dist/lib/tap.js +9 -0
- package/dist/lib/tier.d.ts +115 -0
- package/dist/lib/tier.js +207 -0
- package/dist/lib/tiers.d.ts +9 -0
- package/dist/lib/tiers.js +141 -0
- package/dist/lib/todo.d.ts +125 -0
- package/dist/lib/todo.js +379 -0
- package/dist/look.d.ts +1 -0
- package/dist/look.js +21 -0
- package/dist/meters.d.ts +8 -0
- package/dist/meters.js +31 -0
- package/dist/model.d.ts +4 -0
- package/dist/model.js +44 -0
- package/dist/network.d.ts +64 -0
- package/dist/network.js +216 -0
- package/dist/open.d.ts +81 -0
- package/dist/open.js +149 -0
- package/dist/pane.d.ts +92 -0
- package/dist/pane.js +231 -0
- package/dist/progress.d.ts +46 -0
- package/dist/progress.js +51 -0
- package/dist/recent.d.ts +67 -0
- package/dist/recent.js +161 -0
- package/dist/rooms.d.ts +131 -0
- package/dist/rooms.js +195 -0
- package/dist/roster.d.ts +28 -0
- package/dist/roster.js +70 -0
- package/dist/span.d.ts +14 -0
- package/dist/span.js +50 -0
- package/dist/speech.d.ts +44 -0
- package/dist/speech.js +229 -0
- package/dist/stars.d.ts +16 -0
- package/dist/stars.js +75 -0
- package/dist/tabs.d.ts +26 -0
- package/dist/tabs.js +25 -0
- package/dist/team.d.ts +11 -0
- package/dist/team.gen.d.ts +10 -0
- package/dist/team.gen.js +11 -0
- package/dist/team.js +30 -0
- package/dist/tools.d.ts +35 -0
- package/dist/tools.js +143 -0
- package/dist/tours.d.ts +24 -0
- package/dist/tours.js +311 -0
- package/dist/waiting.d.ts +15 -0
- package/dist/waiting.js +17 -0
- package/dist/where.d.ts +54 -0
- package/dist/where.js +14 -0
- package/package.json +108 -0
package/dist/Shared.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
// A conversation someone shared, read at /chat/shared.
|
|
4
|
+
//
|
|
5
|
+
// Opened from a link (`/chat/shared#<token>`), the token has already left the
|
|
6
|
+
// address by the time this runs (lib/share.ts `SEAL`) and waits in this tab.
|
|
7
|
+
// Signed out, the platform answers the title alone and the page asks the reader
|
|
8
|
+
// to sign in or sign up — through this site's /login and /signup, which hand off
|
|
9
|
+
// to Hanzo IAM and come back to /chat/shared, where the token is still waiting.
|
|
10
|
+
// Signed in, from any organization, the reader is first told who shared it and
|
|
11
|
+
// that opening it shows that person their name; one press opens it, records
|
|
12
|
+
// them as a viewer, and the address becomes `/chat/shared?s=<share>`: the chat
|
|
13
|
+
// is theirs to open again from Shared with you, and the token is forgotten.
|
|
14
|
+
// Nothing about their organization is read or changed here (lib/share.ts). A
|
|
15
|
+
// link that opens nothing says so.
|
|
16
|
+
import { useEffect, useState } from 'react';
|
|
17
|
+
import { useIam } from '@hanzo/iam/react';
|
|
18
|
+
import { Anchor, Button, Text, XStack, YStack } from '@hanzo/ui';
|
|
19
|
+
import { useHydrated } from './lib/hydrated.js';
|
|
20
|
+
import { enter, LOGIN, signUp } from './lib/destination.js';
|
|
21
|
+
import { Prose } from './Prose.js';
|
|
22
|
+
import { address, opened, opening, read, readShared, take } from './lib/share.js';
|
|
23
|
+
function target() {
|
|
24
|
+
const token = opening();
|
|
25
|
+
if (token)
|
|
26
|
+
return { token };
|
|
27
|
+
const share = new URLSearchParams(window.location.search).get('s')?.trim();
|
|
28
|
+
return share ? { share } : null;
|
|
29
|
+
}
|
|
30
|
+
const MEASURE = 'var(--container-prose, 48rem)';
|
|
31
|
+
export function Shared() {
|
|
32
|
+
const hydrated = useHydrated();
|
|
33
|
+
const { isLoading, isAuthenticated, accessToken } = useIam();
|
|
34
|
+
const [aim, setAim] = useState(undefined);
|
|
35
|
+
const [agreed, setAgreed] = useState(false);
|
|
36
|
+
const [state, setState] = useState({ kind: 'reading' });
|
|
37
|
+
// A link pasted into this tab while the page is open arrives as a new
|
|
38
|
+
// fragment: it is taken out of the address exactly as the head does.
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
if (!hydrated)
|
|
41
|
+
return;
|
|
42
|
+
const on = () => {
|
|
43
|
+
take();
|
|
44
|
+
setAim(target());
|
|
45
|
+
};
|
|
46
|
+
on();
|
|
47
|
+
window.addEventListener('hashchange', on);
|
|
48
|
+
return () => window.removeEventListener('hashchange', on);
|
|
49
|
+
}, [hydrated]);
|
|
50
|
+
// Read once IAM has settled, and again when the session changes: signing in
|
|
51
|
+
// turns the title into the chat. Only a signed-in reader reads by share id.
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
if (!hydrated || isLoading || !aim)
|
|
54
|
+
return;
|
|
55
|
+
if (!('token' in aim) && !isAuthenticated)
|
|
56
|
+
return;
|
|
57
|
+
let on = true;
|
|
58
|
+
const got = 'token' in aim ? read(aim.token, agreed) : readShared(aim.share);
|
|
59
|
+
got
|
|
60
|
+
.then((shared) => {
|
|
61
|
+
if (!on)
|
|
62
|
+
return;
|
|
63
|
+
if (shared?.full && shared.share && 'token' in aim) {
|
|
64
|
+
opened();
|
|
65
|
+
history.replaceState(null, '', address(shared.share));
|
|
66
|
+
}
|
|
67
|
+
setState(shared ? { kind: 'read', shared } : { kind: 'gone' });
|
|
68
|
+
})
|
|
69
|
+
.catch((e) => on && setState({ kind: 'wrong', said: e instanceof Error ? e.message : 'This chat could not be read. Try again.' }));
|
|
70
|
+
return () => {
|
|
71
|
+
on = false;
|
|
72
|
+
};
|
|
73
|
+
}, [hydrated, isLoading, aim, agreed, isAuthenticated, accessToken]);
|
|
74
|
+
const shown = hydrated && aim === null
|
|
75
|
+
? { kind: 'missing' }
|
|
76
|
+
: hydrated && !isLoading && aim && !('token' in aim) && !isAuthenticated
|
|
77
|
+
? { kind: 'ask' }
|
|
78
|
+
: state;
|
|
79
|
+
return (_jsxs(YStack, { role: "main", height: "100dvh", overflowY: "auto", bg: "$background", children: [_jsxs(XStack, { height: 48, px: "$4", items: "center", justify: "space-between", borderBottomWidth: 1, borderColor: "$borderColor", shrink: 0, children: [_jsx(Anchor, { href: "/", "aria-label": "Hanzo", children: _jsx(Text, { fontSize: "$4", fontWeight: "600", color: "$ink", children: "Hanzo" }) }), shown.kind === 'read' && shown.shared.full ? (_jsx(Text, { fontSize: "$1", color: "$soft", children: "Shared with you \u00B7 Read only" })) : null] }), _jsx(YStack, { width: "100%", maxW: MEASURE, mx: "auto", px: "$4", py: "$6", gap: "$4", children: _jsx(Body, { state: shown, signedIn: Boolean(isAuthenticated), onOpen: () => setAgreed(true) }) })] }));
|
|
80
|
+
}
|
|
81
|
+
function Body({ state, signedIn, onOpen }) {
|
|
82
|
+
if (state.kind === 'reading') {
|
|
83
|
+
return (_jsx(Text, { fontSize: "$3", color: "$soft", "aria-live": "polite", children: "Opening the chat." }));
|
|
84
|
+
}
|
|
85
|
+
if (state.kind === 'missing' || state.kind === 'gone') {
|
|
86
|
+
return (_jsxs(YStack, { gap: "$3", items: "flex-start", children: [_jsx(Text, { render: "h1", fontSize: "$7", fontWeight: "600", color: "$ink", children: "This chat is no longer shared." }), _jsx(Text, { fontSize: "$3", color: "$soft", children: state.kind === 'missing' ? 'The link is incomplete. Ask for it again.' : 'The link was turned off, or it was never a link to a chat.' }), _jsx(Anchor, { href: "/", children: _jsx(Button, { size: "sm", variant: "outline", children: "Go to Hanzo" }) })] }));
|
|
87
|
+
}
|
|
88
|
+
if (state.kind === 'ask') {
|
|
89
|
+
return _jsx(Ask, { signedIn: signedIn });
|
|
90
|
+
}
|
|
91
|
+
if (state.kind === 'wrong') {
|
|
92
|
+
return (_jsxs(YStack, { gap: "$3", items: "flex-start", children: [_jsx(Text, { render: "h1", fontSize: "$6", fontWeight: "600", color: "$ink", children: "This chat could not be opened." }), _jsx(Text, { role: "alert", fontSize: "$3", color: "$soft", children: state.said }), _jsx(Button, { size: "sm", onClick: () => window.location.reload(), children: "Try again" })] }));
|
|
93
|
+
}
|
|
94
|
+
const { shared } = state;
|
|
95
|
+
const by = shared.by || 'The person who shared it';
|
|
96
|
+
if (!shared.full) {
|
|
97
|
+
return (_jsxs(_Fragment, { children: [_jsx(Text, { render: "h1", fontSize: "$7", lineHeight: "$7", fontWeight: "600", color: "$ink", children: shared.title }), shared.confirm ? (_jsxs(YStack, { gap: "$3", p: "$4", rounded: "$4", borderWidth: 1, borderColor: "$borderColor", bg: "$backgroundHover", role: "region", "aria-label": "Open the chat", children: [_jsx(Text, { fontSize: "$4", fontWeight: "600", color: "$ink", children: shared.by ? `${shared.by} shared this chat with you` : 'This chat was shared with you' }), _jsxs(Text, { fontSize: "$2", color: "$soft", children: ["Opening it shows ", shared.by || 'them', " the name you signed in with, and keeps it under Shared with you."] }), _jsx(XStack, { children: _jsx(Button, { size: "sm", onClick: onOpen, children: `Open — ${by} will see your name` }) })] })) : (_jsx(Ask, { signedIn: signedIn }))] }));
|
|
98
|
+
}
|
|
99
|
+
return (_jsxs(_Fragment, { children: [_jsx(Text, { render: "h1", fontSize: "$7", lineHeight: "$7", fontWeight: "600", color: "$ink", children: shared.title }), shared.by ? (_jsxs(Text, { fontSize: "$2", color: "$soft", children: ["Shared by ", shared.by] })) : null, _jsx(YStack, { gap: "$4", render: "ol", m: 0, p: 0, "aria-label": "Messages", children: shared.messages.map((turn, i) => (_jsxs(YStack, { render: "li", gap: "$1", children: [_jsx(Text, { fontSize: "$1", color: "$soft", textTransform: "uppercase", children: turn.role === 'user' ? 'Asked' : turn.model ? `Answered · ${turn.model}` : 'Recorded by the person who shared this' }), turn.role === 'assistant' && turn.model ? (_jsx(Prose, { text: turn.content })) : (_jsx(Text, { fontSize: "$3", color: "$ink", whiteSpace: "pre-wrap", children: turn.content }))] }, i))) })] }));
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* What a reader who is not signed in is shown under the title: sign up or sign
|
|
103
|
+
* in, and come back here. A reader who is signed in and still not shown the
|
|
104
|
+
* chat holds a session the platform did not accept, so they are asked to sign
|
|
105
|
+
* in again.
|
|
106
|
+
*/
|
|
107
|
+
function Ask({ signedIn }) {
|
|
108
|
+
const seen = 'The person who shared it will see that you opened it.';
|
|
109
|
+
if (signedIn) {
|
|
110
|
+
return (_jsxs(YStack, { gap: "$3", p: "$4", rounded: "$4", borderWidth: 1, borderColor: "$borderColor", bg: "$backgroundHover", role: "region", "aria-label": "Sign in to read the chat", children: [_jsx(Text, { fontSize: "$4", fontWeight: "600", color: "$ink", children: "Sign in again to read this chat" }), _jsxs(Text, { fontSize: "$2", color: "$soft", children: ["Your session has ended; signing in brings you straight back here. ", seen] }), _jsx(XStack, { gap: "$2", children: _jsx(Button, { size: "sm", onClick: () => enter(LOGIN), children: "Sign in" }) })] }));
|
|
111
|
+
}
|
|
112
|
+
return (_jsxs(YStack, { gap: "$3", p: "$4", rounded: "$4", borderWidth: 1, borderColor: "$borderColor", bg: "$backgroundHover", role: "region", "aria-label": "Sign in to read the chat", children: [_jsx(Text, { fontSize: "$4", fontWeight: "600", color: "$ink", children: "Sign in to read this chat" }), _jsxs(Text, { fontSize: "$2", color: "$soft", children: ["A free Hanzo account opens it, and you come straight back here. ", seen] }), _jsxs(XStack, { gap: "$2", flexWrap: "wrap", children: [_jsx(Button, { size: "sm", onClick: () => enter(signUp()), children: "Sign up to view" }), _jsx(Button, { size: "sm", variant: "outline", onClick: () => enter(LOGIN), children: "Sign in" })] })] }));
|
|
113
|
+
}
|
package/dist/Shell.d.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type LucideIcon } from "lucide-react";
|
|
3
|
+
export type Mode = "home" | "chat" | "dev" | "inbox" | "agents" | "tasks" | "drive" | "contacts" | "bots" | "meet" | "cal";
|
|
4
|
+
export interface ConsoleProduct {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
icon: LucideIcon;
|
|
8
|
+
href: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const CONSOLE_PRODUCTS: ConsoleProduct[];
|
|
11
|
+
/**
|
|
12
|
+
* WHERE "GO THERE" COMES FROM, and why it is a prop.
|
|
13
|
+
*
|
|
14
|
+
* The rail moves between rooms, which is the one thing in this shell only the
|
|
15
|
+
* HOST can do: a Next route pushes through its router, a Tauri window swaps a
|
|
16
|
+
* view, an embedded surface may refuse to navigate at all. Taking `navigate`
|
|
17
|
+
* as a prop is what leaves this file — and every component under it — with no
|
|
18
|
+
* import from any framework, so the same shell mounts under Next, under Vite
|
|
19
|
+
* in a desktop webview, or under a test that just records where it was asked
|
|
20
|
+
* to go.
|
|
21
|
+
*
|
|
22
|
+
* Measured before the change: `next/navigation` here and `next/link` in
|
|
23
|
+
* `Chat.tsx` were the ONLY two framework imports in the whole /chat + /dev
|
|
24
|
+
* surface — 13 files, all `'use client'`, no RSC. Those two were the entire
|
|
25
|
+
* cost of the port, and this removes one of them.
|
|
26
|
+
*/
|
|
27
|
+
export declare function Workspace({ mode, children, navigate, back, forward, }: {
|
|
28
|
+
mode: Mode;
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
/** Take the reader to a route. Absent, the rail's places do not navigate. */
|
|
31
|
+
navigate?: (route: string) => void;
|
|
32
|
+
/** Step back through this reader's own history. Absent, the arrows are not drawn. */
|
|
33
|
+
back?: () => void;
|
|
34
|
+
/** And forward again. */
|
|
35
|
+
forward?: () => void;
|
|
36
|
+
}): import("react").JSX.Element;
|
|
37
|
+
/** Whether the room is drawn in the app's frame (`Paned framed`), where what
|
|
38
|
+
* floats on the frame's ground is cut as a pane. */
|
|
39
|
+
export declare const Framed: import("react").Context<boolean>;
|
|
40
|
+
/** Puts its children in the column beside the room. Draws nothing where the
|
|
41
|
+
* frame has no column open. */
|
|
42
|
+
export declare function Beside({ children }: {
|
|
43
|
+
children: ReactNode;
|
|
44
|
+
}): import("react").ReactPortal;
|
|
45
|
+
/**
|
|
46
|
+
* A PANE AND THE COLUMN BESIDE IT. The room draws the pane; the column is open
|
|
47
|
+
* while `useOpen().aside` names one, and `Beside` fills it. The rooms' frame and
|
|
48
|
+
* the app at `/` lay a room out with this, so a room's column is one mechanism.
|
|
49
|
+
* `swap` stands in the pane in the room's place (a chosen Settings row).
|
|
50
|
+
*
|
|
51
|
+
* `framed` is the app at `/`: both are panes floating on the frame's ground
|
|
52
|
+
* (app/_web.tsx), filled with `--pane-fill` and cut by `pane()`, and the edge
|
|
53
|
+
* that sizes the column sits in the gutter between them. In a room they lie on
|
|
54
|
+
* the paper ladder instead. In the rooms' shell the two are its `pane` and
|
|
55
|
+
* `side` grid areas. `bare` leaves the framed pane uncut, for a room that floats
|
|
56
|
+
* panes of its own: a Dev run, which @hanzo/build draws as two.
|
|
57
|
+
*/
|
|
58
|
+
export declare function Paned({ children, swap, framed, bare, }: {
|
|
59
|
+
children: ReactNode;
|
|
60
|
+
swap?: ReactNode;
|
|
61
|
+
framed?: boolean;
|
|
62
|
+
bare?: boolean;
|
|
63
|
+
}): import("react").JSX.Element;
|