@hanzo/build 0.2.116 → 0.2.118

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.
@@ -116,6 +116,8 @@ export interface Grants {
116
116
  repos: Grant[];
117
117
  /** Accounts the connection could not read. */
118
118
  unread: string[];
119
+ /** The accounts the organization added (`added`), each listed even before any of its repositories is. */
120
+ added?: string[];
119
121
  }
120
122
  export interface Account {
121
123
  name: string;
@@ -131,7 +133,7 @@ export interface Account {
131
133
  * `imported` is decided by `grants` from the links and the forge.
132
134
  */
133
135
  export declare function grant(raw: unknown): Grant | null;
134
- /** Accounts the grant names, plus any account that could not be read. */
136
+ /** Accounts the grant names, plus any account that could not be read or that the organization added. */
135
137
  export declare function accounts(g: Grants): Account[];
136
138
  /**
137
139
  * Every repository the GitHub connection grants, every page, with whether the
@@ -139,6 +141,15 @@ export declare function accounts(g: Grants): Account[];
139
141
  * state), or a forge repository under its codebase name (GET /v1/git/repos).
140
142
  */
141
143
  export declare function grants(t: Target, signal?: AbortSignal): Promise<Grants>;
144
+ /**
145
+ * The repositories this organization can bring in: `grants`, narrowed to the
146
+ * accounts the organization has added (`installations`, `connected`). The list
147
+ * is the person's own GitHub, which reaches accounts another Hanzo workspace
148
+ * added; the import goes through this organization's own, so it refuses every
149
+ * repository of those. With the organization's accounts unreadable, `grants` as
150
+ * it is: the import still says which it refuses.
151
+ */
152
+ export declare function added(t: Target, signal?: AbortSignal): Promise<Grants>;
142
153
  /** What an import queued: how many, and the name each takes on the forge, by `owner/name`. */
143
154
  export interface Queued {
144
155
  queued: number;
package/lib/api/github.js CHANGED
@@ -7,7 +7,7 @@
7
7
  * POST /v1/provider/github/user/connect {return} → {authorizeUrl}
8
8
  * POST /v1/provider/github/user/complete {grant} → the connection
9
9
  * POST /v1/provider/github/user/disconnect
10
- * GET /v1/provider/github/installations the accounts this org has bound the App on
10
+ * GET /v1/provider/github/installations the accounts this org has bound the App on (`added` narrows to them)
11
11
  * POST /v1/provider/github/issues/backfill {state, repo?} → mirror GitHub issues onto the board
12
12
  *
13
13
  * Paged by an opaque `after` cursor; `next` is the cursor for the page after
@@ -152,7 +152,7 @@ export function grant(raw) {
152
152
  status: '',
153
153
  };
154
154
  }
155
- /** Accounts the grant names, plus any account that could not be read. */
155
+ /** Accounts the grant names, plus any account that could not be read or that the organization added. */
156
156
  export function accounts(g) {
157
157
  const counts = new Map();
158
158
  for (const r of g.repos) {
@@ -162,6 +162,14 @@ export function accounts(g) {
162
162
  }
163
163
  const unread = new Set(g.unread.filter(Boolean));
164
164
  const names = new Set([...counts.keys(), ...unread]);
165
+ // GitHub's logins are case-blind: an added account is named once, as its repositories spell it.
166
+ const seen = new Set([...names].map((n) => n.toLowerCase()));
167
+ for (const n of g.added ?? []) {
168
+ if (!n || seen.has(n.toLowerCase()))
169
+ continue;
170
+ names.add(n);
171
+ seen.add(n.toLowerCase());
172
+ }
165
173
  return [...names]
166
174
  .sort((a, b) => a.localeCompare(b))
167
175
  .map((name) => {
@@ -211,6 +219,23 @@ export async function grants(t, signal) {
211
219
  unread: unread.filter(Boolean),
212
220
  };
213
221
  }
222
+ /**
223
+ * The repositories this organization can bring in: `grants`, narrowed to the
224
+ * accounts the organization has added (`installations`, `connected`). The list
225
+ * is the person's own GitHub, which reaches accounts another Hanzo workspace
226
+ * added; the import goes through this organization's own, so it refuses every
227
+ * repository of those. With the organization's accounts unreadable, `grants` as
228
+ * it is: the import still says which it refuses.
229
+ */
230
+ export async function added(t, signal) {
231
+ const [g, mine] = await Promise.all([grants(t, signal), installations(t).catch(() => null)]);
232
+ if (!mine)
233
+ return g;
234
+ const logins = mine.filter((i) => i.connected).map((i) => i.login);
235
+ const held = new Set(logins.map((l) => l.toLowerCase()));
236
+ const ours = (name) => held.has(name.toLowerCase());
237
+ return { repos: g.repos.filter((r) => ours(r.owner)), unread: g.unread.filter(ours), added: logins };
238
+ }
214
239
  /** Queue a mirror of the named repositories onto the forge. The names are `owner/name`. */
215
240
  export async function bring(t, repos) {
216
241
  const names = repos.map((n) => n.trim()).filter(Boolean);
package/lib/index.d.ts CHANGED
@@ -49,7 +49,7 @@ export { href, parse, path, PLACES, route, SESSION, SLUG, type Route, type Scree
49
49
  * (`Reply`), and the side panel (`Panel` over a `Deck` of tabs). The composer is
50
50
  * @hanzo/ui/chat's, for Chat and Dev alike.
51
51
  */
52
- export { catalog, EFFORTS, FIRST, FREE, grants, isFree, keep, kept, level, nameOf, pacing, useCatalog, useChoice, useMind, type Choice, type Effort, type Mind } from './mind.ts';
52
+ export { catalog, EFFORTS, FIRST, grants, isFree, keep, kept, level, nameOf, pacing, useCatalog, useChoice, useMind, type Choice, type Effort, type Mind } from './mind.ts';
53
53
  export { useEar } from './voice.ts';
54
54
  export { BARE, CHAT_MODES, DEV_MODES, gearOf, MODES, useGear, useLanguage, type Gear, type GearState, type Mode as GearMode } from './gear.ts';
55
55
  export { useCarry, type Carry } from './carry.tsx';
package/lib/index.js CHANGED
@@ -44,7 +44,7 @@ export { href, parse, path, PLACES, route, SESSION, SLUG } from './route.js';
44
44
  * (`Reply`), and the side panel (`Panel` over a `Deck` of tabs). The composer is
45
45
  * @hanzo/ui/chat's, for Chat and Dev alike.
46
46
  */
47
- export { catalog, EFFORTS, FIRST, FREE, grants, isFree, keep, kept, level, nameOf, pacing, useCatalog, useChoice, useMind } from './mind.js';
47
+ export { catalog, EFFORTS, FIRST, grants, isFree, keep, kept, level, nameOf, pacing, useCatalog, useChoice, useMind } from './mind.js';
48
48
  export { useEar } from './voice.js';
49
49
  export { BARE, CHAT_MODES, DEV_MODES, gearOf, MODES, useGear, useLanguage } from './gear.js';
50
50
  export { useCarry } from './carry.js';
package/lib/mind.d.ts CHANGED
@@ -36,9 +36,7 @@ export interface Choice {
36
36
  effort: Effort;
37
37
  }
38
38
  export declare const FIRST: Choice;
39
- /** What Free answers on: the catalog's free lane, Enso's first. `free` is an alias of it. */
40
- export declare const FREE = "enso-free";
41
- /** Whether a plan grants only the free lane. An unknown plan is not taken for Free. */
39
+ /** Whether a plan grants only Enso Auto. An unknown plan is not taken for Free. */
42
40
  export declare const isFree: (plan: string | null | undefined) => boolean;
43
41
  /** The kept choice, Enso and Auto where nothing is kept. Stable while the stored text is. Low and Medium, offered once, read as Auto. */
44
42
  export declare function kept(): Choice;
@@ -46,7 +44,7 @@ export declare function kept(): Choice;
46
44
  export declare function keep(patch: Partial<Choice>): void;
47
45
  /** The kept choice and the way to change it. The server and the first render read the default. */
48
46
  export declare function useChoice(): readonly [Choice, (patch: Partial<Choice>) => void];
49
- /** A model's name as the catalog spells it; Enso for the router. */
47
+ /** A model's name as the catalog spells it; Enso Auto for the router. */
50
48
  export declare function nameOf(model: string, catalog: readonly Model[]): string;
51
49
  /** An id said as a name: its last path part, each word capitalised (`enso-flash` → Enso Flash). */
52
50
  export declare function spelled(id: string): string;
@@ -74,8 +72,8 @@ export interface Catalog {
74
72
  * the reason in the chooser — never the platform's own words.
75
73
  */
76
74
  export declare function useCatalog(t: Target): Catalog;
77
- /** Whether `model` is one this plan may send: on Free, the catalog's free class alone. */
78
- export declare function grants(free: boolean, model: string, catalog: readonly Model[]): boolean;
75
+ /** Whether `model` is one this plan may send: on Free, Enso Auto alone (commerce's `allowedModels`). */
76
+ export declare function grants(free: boolean, model: string): boolean;
79
77
  /** The effort as the composer reads it: the one in force, its list, and the way to change it. */
80
78
  export declare const pacing: (m: Pick<Mind, 'effort' | 'pace'>) => Modes<Effort>;
81
79
  /** The chip's whole state: the catalog, what answers next, and how to change either. */
@@ -87,7 +85,7 @@ export interface Mind {
87
85
  error: string | null;
88
86
  /** A list shown from before, because this read failed. */
89
87
  note: string;
90
- /** The plan grants only the free lane: anything else is an upgrade, never a pick. */
88
+ /** The plan grants only Enso Auto: anything else is an upgrade, never a pick. */
91
89
  free: boolean;
92
90
  /** A premium pick holds for this screen; any other is kept. */
93
91
  pick: (id: string) => void;
@@ -95,7 +93,7 @@ export interface Mind {
95
93
  }
96
94
  /**
97
95
  * The model and effort for the plan `plan` names (`GET /v1/ai/limits` `plan`).
98
- * On Free the default is `FREE` and a kept pick outside the free lane is set
99
- * aside rather than sent — it comes back once the plan grants it.
96
+ * On Free the model is Enso Auto, and a kept pick of any other is set aside
97
+ * rather than sent — it comes back once the plan grants it.
100
98
  */
101
99
  export declare function useMind(t: Target, plan?: string | null): Mind;
package/lib/mind.js CHANGED
@@ -9,9 +9,7 @@ export const EFFORTS = EVERY.filter((e) => ['auto', 'high', 'xhigh', 'max'].incl
9
9
  /** The effort a coding run names (apps/coding takes low, medium or high): medium for Auto, high for the rest. */
10
10
  export const level = (effort) => (effort === 'auto' ? 'medium' : 'high');
11
11
  export const FIRST = { model: ENSO, effort: 'auto' };
12
- /** What Free answers on: the catalog's free lane, Enso's first. `free` is an alias of it. */
13
- export const FREE = 'enso-free';
14
- /** Whether a plan grants only the free lane. An unknown plan is not taken for Free. */
12
+ /** Whether a plan grants only Enso Auto. An unknown plan is not taken for Free. */
15
13
  export const isFree = (plan) => plan === 'free';
16
14
  const KEY = 'hanzo.mind';
17
15
  const CHANGE = 'hanzo:mind';
@@ -79,12 +77,10 @@ function subscribe(change) {
79
77
  export function useChoice() {
80
78
  return [useSyncExternalStore(subscribe, kept, () => FIRST), keep];
81
79
  }
82
- /** A model's name as the catalog spells it; Enso for the router. */
80
+ /** A model's name as the catalog spells it; Enso Auto for the router. */
83
81
  export function nameOf(model, catalog) {
84
82
  if (model === ENSO)
85
- return 'Enso';
86
- if (model === 'free')
87
- return nameOf(FREE, catalog);
83
+ return 'Enso Auto';
88
84
  const row = catalog.find((m) => m.id === model);
89
85
  return row?.name ?? spelled(model);
90
86
  }
@@ -98,14 +94,14 @@ export function spelled(id) {
98
94
  .join(' ');
99
95
  }
100
96
  /** The ids that are the router under another name: the picker's Enso row stands for all of them. */
101
- export const ROUTER_IDS = new Set([ENSO, 'enso', 'hanzo/enso', 'free']);
97
+ export const ROUTER_IDS = new Set([ENSO, 'enso', 'hanzo/enso']);
102
98
  // The catalog, once per platform for the page: Chat and Dev read the same list.
103
99
  const catalogs = new Map();
104
100
  const settled = new Map();
105
101
  /** Where this browser keeps the last list it read. */
106
102
  const LAST = 'hanzo.build.models';
107
- /** The router alone: what a chooser offers before any list was ever read, so it reads "Enso" and not an id. */
108
- const ROUTER = parseModels([{ id: ENSO, name: 'Enso', family: 'enso', class: 'ours' }]);
103
+ /** The router alone: what a chooser offers before any list was ever read, so it reads "Enso Auto" and not an id. */
104
+ const ROUTER = parseModels([{ id: ENSO, name: 'Enso Auto', family: 'enso', class: 'ours' }]);
109
105
  /** The last list this browser read, or none. */
110
106
  function last() {
111
107
  try {
@@ -172,25 +168,23 @@ export function useCatalog(t) {
172
168
  note: '',
173
169
  };
174
170
  }
175
- /** Whether `model` is one this plan may send: on Free, the catalog's free class alone. */
176
- export function grants(free, model, catalog) {
177
- if (!free)
178
- return true;
179
- return catalog.find((m) => m.id === model)?.class === 'free';
171
+ /** Whether `model` is one this plan may send: on Free, Enso Auto alone (commerce's `allowedModels`). */
172
+ export function grants(free, model) {
173
+ return !free || model === ENSO;
180
174
  }
181
175
  /** The effort as the composer reads it: the one in force, its list, and the way to change it. */
182
176
  export const pacing = (m) => ({ value: m.effort, set: m.pace, items: EFFORTS });
183
177
  /**
184
178
  * The model and effort for the plan `plan` names (`GET /v1/ai/limits` `plan`).
185
- * On Free the default is `FREE` and a kept pick outside the free lane is set
186
- * aside rather than sent — it comes back once the plan grants it.
179
+ * On Free the model is Enso Auto, and a kept pick of any other is set aside
180
+ * rather than sent — it comes back once the plan grants it.
187
181
  */
188
182
  export function useMind(t, plan) {
189
183
  const [choice, change] = useChoice();
190
184
  const { models, list, loading, error, note } = useCatalog(t);
191
185
  const free = isFree(plan);
192
186
  const [picked, pick] = usePick(choice.model, (id) => change({ model: id }), list);
193
- const model = free && !grants(true, picked, models) ? FREE : picked;
187
+ const model = grants(free, picked) ? picked : ENSO;
194
188
  return {
195
189
  model,
196
190
  effort: choice.effort,
@@ -200,7 +194,7 @@ export function useMind(t, plan) {
200
194
  note,
201
195
  free,
202
196
  pick: (id) => {
203
- if (grants(free, id, models))
197
+ if (grants(free, id))
204
198
  pick(id);
205
199
  },
206
200
  pace: (effort) => change({ effort }),
package/lib/sync.js CHANGED
@@ -2,7 +2,9 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
2
2
  /**
3
3
  * Bring repositories the GitHub connection already grants onto the forge.
4
4
  *
5
- * The list is GET /v1/provider/github/repos. The queue is POST
5
+ * The list is GET /v1/provider/github/repos, narrowed to the accounts this
6
+ * organization added (github.ts `added`): those are the only ones the import
7
+ * brings repositories in through. The queue is POST
6
8
  * /v1/provider/github/repos/import, which mirrors `owner/name` into this
7
9
  * organization's forge in the background. An account named unread and holding
8
10
  * no repositories is shown as needing an organization admin. One repository
@@ -18,7 +20,7 @@ import { Button, Input } from '@hanzo/ui';
18
20
  import { useEffect, useMemo, useState } from 'react';
19
21
  import { here, useBack } from './back.js';
20
22
  import { Refusal } from './api/call.js';
21
- import { accounts, bring, grants } from './api/github.js';
23
+ import { accounts, added, bring, grants } from './api/github.js';
22
24
  import { authorize } from './api/provider.js';
23
25
  import { pinHub, readPending, writePending } from './choice.js';
24
26
  import { useRead } from './data.js';
@@ -39,7 +41,7 @@ export function Sync() {
39
41
  const [error, setError] = useState('');
40
42
  // The import was refused because this organization holds no GitHub account of its own (the list is the person's).
41
43
  const [unbound, setUnbound] = useState(false);
42
- const list = useRead(signed ? () => grants(target) : null, EMPTY, [target, signed]);
44
+ const list = useRead(signed ? () => added(target) : null, EMPTY, [target, signed]);
43
45
  const rows = list.value.repos;
44
46
  const orgs = useMemo(() => accounts(list.value), [list.value]);
45
47
  const needle = q.trim().toLowerCase();
@@ -136,7 +138,9 @@ export function Sync() {
136
138
  window.clearInterval(id);
137
139
  };
138
140
  }, [syncing, target, host.org, host.go, picked]);
139
- return (_jsxs(YStack, { flex: 1, minH: 0, overflow: "scroll", children: [_jsxs(XStack, { px: "$6", pt: "$5", pb: "$2", gap: "$2", items: "center", children: [_jsx(XStack, { render: "button", "aria-label": t('Back to projects'), onPress: back, children: _jsx(SizableText, { size: "$2", color: "$soft", children: t('Projects') }) }), _jsx(SizableText, { size: "$2", color: "$soft", children: "/" }), _jsx(SizableText, { size: "$2", color: "$ink", children: t('Sync') })] }), _jsxs(YStack, { flex: 1, items: "center", justify: "center", px: "$6", pb: "$10", gap: "$5", children: [_jsxs(XStack, { justify: "center", gap: "$6", children: [_jsx(Step, { label: t('Select repositories'), done: step === 'access', current: step === 'pick' }), _jsx(Step, { label: t('Repository access'), done: false, current: step === 'access' })] }), _jsxs(YStack, { borderWidth: 1, borderColor: "$borderColor", rounded: "$5", bg: "$panel", px: "$6", py: "$6", gap: "$4", width: "100%", maxW: 460, children: [step === 'pick' && !owner ? (_jsxs(_Fragment, { children: [_jsxs(YStack, { gap: "$1", items: "center", children: [_jsx(SizableText, { size: "$5", color: "$ink", children: t('Select repositories') }), _jsx(SizableText, { size: "$2", color: "$soft", style: { textAlign: 'center' }, children: t('Choose repositories to bring into {place}', { place: dest }) })] }), _jsxs(Panel, { children: [_jsx(Input, { value: q, onChangeText: setQ, placeholder: t('Search organizations'), "aria-label": t('Search organizations'), disabled: !signed }), signed ? (_jsx(SizableText, { size: "$1", color: "$soft", children: orgs.length === 1 ? t('1 organization') : t('{n} organizations', { n: orgs.length }) })) : null, list.error ? _jsx(Soft, { children: t('The GitHub connection could not be read right now.') }) : null, !signed ? (_jsx(Soft, { children: t('Sign in to choose repositories the GitHub connection can read.') })) : list.loading && rows.length === 0 && orgs.length === 0 ? (_jsx(Soft, { children: t('Reading the connection…') })) : shownOrgs.length === 0 ? (_jsx(Soft, { children: orgs.length === 0 ? t('No organizations on this connection yet.') : t('Nothing matches.') })) : (shownOrgs.map((a) => (_jsxs(XStack, { render: "button", "aria-label": a.blocked ? t('{name} needs an organization admin', { name: a.name }) : t('Open {name}', { name: a.name }), disabled: a.blocked, items: "center", gap: "$2", py: "$2", borderTopWidth: 1, borderColor: "$borderColor", onPress: () => {
141
+ return (_jsxs(YStack, { flex: 1, minH: 0, overflow: "scroll", children: [_jsxs(XStack, { px: "$6", pt: "$5", pb: "$2", gap: "$2", items: "center", children: [_jsx(XStack, { render: "button", "aria-label": t('Back to projects'), onPress: back, children: _jsx(SizableText, { size: "$2", color: "$soft", children: t('Projects') }) }), _jsx(SizableText, { size: "$2", color: "$soft", children: "/" }), _jsx(SizableText, { size: "$2", color: "$ink", children: t('Sync') })] }), _jsxs(YStack, { flex: 1, items: "center", justify: "center", px: "$6", pb: "$10", gap: "$5", children: [_jsxs(XStack, { justify: "center", gap: "$6", children: [_jsx(Step, { label: t('Select repositories'), done: step === 'access', current: step === 'pick' }), _jsx(Step, { label: t('Repository access'), done: false, current: step === 'access' })] }), _jsxs(YStack, { borderWidth: 1, borderColor: "$borderColor", rounded: "$5", bg: "$panel", px: "$6", py: "$6", gap: "$4", width: "100%", maxW: 460, children: [step === 'pick' && !owner ? (_jsxs(_Fragment, { children: [_jsxs(YStack, { gap: "$1", items: "center", children: [_jsx(SizableText, { size: "$5", color: "$ink", children: t('Select repositories') }), _jsx(SizableText, { size: "$2", color: "$soft", style: { textAlign: 'center' }, children: t('Choose repositories to bring into {place}', { place: dest }) })] }), _jsxs(Panel, { children: [_jsx(Input, { value: q, onChangeText: setQ, placeholder: t('Search organizations'), "aria-label": t('Search organizations'), disabled: !signed }), signed && !(list.loading && orgs.length === 0) ? (_jsx(SizableText, { size: "$1", color: "$soft", children: orgs.length === 1 ? t('1 organization') : t('{n} organizations', { n: orgs.length }) })) : null, list.error ? _jsx(Soft, { children: t('The GitHub connection could not be read right now.') }) : null, !signed ? (_jsx(Soft, { children: t('Sign in to choose repositories the GitHub connection can read.') })) : list.loading && rows.length === 0 && orgs.length === 0 ? (_jsx(Soft, { children: t('Reading the connection…') })) : list.error && orgs.length === 0 ? null : shownOrgs.length === 0 ? (_jsx(Soft, { children: orgs.length === 0
142
+ ? t('No GitHub account is added to {place} yet. Add organization installs the Hanzo app on one.', { place: dest })
143
+ : t('Nothing matches.') })) : (shownOrgs.map((a) => (_jsxs(XStack, { render: "button", "aria-label": a.blocked ? t('{name} needs an organization admin', { name: a.name }) : t('Open {name}', { name: a.name }), disabled: a.blocked, items: "center", gap: "$2", py: "$2", borderTopWidth: 1, borderColor: "$borderColor", onPress: () => {
140
144
  setOwner(a.name);
141
145
  setQ('');
142
146
  }, children: [_jsx(SizableText, { flex: 1, size: "$2", color: a.blocked ? '$soft' : '$ink', numberOfLines: 1, children: a.name }), a.blocked ? (_jsx(SizableText, { size: "$1", color: "$soft", children: t('Needs organization admin') })) : (_jsx(ChevronRight, { size: 14, 'data-i18n-mirror': '' }))] }, a.name)))), _jsxs(XStack, { render: "button", "aria-label": t('Add organization'), items: "center", gap: "$2", py: "$2", onPress: () => void addOrg(), disabled: !signed, children: [_jsx(Plus, { size: 14 }), _jsx(SizableText, { size: "$2", color: "$ink", children: t('Add organization') })] })] })] })) : null, step === 'pick' && owner ? (_jsxs(_Fragment, { children: [_jsxs(YStack, { gap: "$1", items: "center", children: [_jsx(SizableText, { size: "$5", color: "$ink", children: t('Select repositories') }), _jsx(SizableText, { size: "$2", color: "$soft", style: { textAlign: 'center' }, children: t('Choose repositories to bring into {place}', { place: dest }) })] }), _jsxs(Panel, { children: [_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(XStack, { render: "button", "aria-label": t('All organizations'), onPress: () => setOwner(''), children: _jsx(ChevronLeft, { size: 16, 'data-i18n-mirror': '' }) }), _jsx(SizableText, { flex: 1, size: "$2", color: "$ink", numberOfLines: 1, children: owner })] }), _jsx(Input, { value: q, onChangeText: setQ, placeholder: t('Search repositories'), "aria-label": t('Search repositories') }), _jsxs(XStack, { justify: "space-between", items: "center", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: ofOwner.length === 1 ? t('1 repository') : t('{n} repositories', { n: ofOwner.length }) }), _jsx(XStack, { render: "button", "aria-label": t('Select all'), onPress: selectShown, disabled: shownRepos.length === 0, children: _jsx(SizableText, { size: "$1", color: "$ink", children: t('Select all') }) })] }), shownRepos.length === 0 ? (_jsx(Soft, { children: t('Nothing matches.') })) : (shownRepos.map((r) => (_jsx(RepoRow, { repo: r, on: picked.includes(r.fullName), onPress: () => toggle(r.fullName) }, r.fullName)))), _jsxs(XStack, { render: "button", "aria-label": t('Grant more repositories'), items: "center", gap: "$2", py: "$2", onPress: () => void addOrg(), children: [_jsx(Plus, { size: 14 }), _jsx(SizableText, { size: "$2", color: "$ink", children: t('Add repositories') })] })] })] })) : null, step === 'access' ? (_jsxs(_Fragment, { children: [_jsxs(YStack, { gap: "$1", items: "center", children: [_jsx(SizableText, { size: "$5", color: "$ink", children: t('Repository access') }), _jsx(SizableText, { size: "$2", color: "$soft", style: { textAlign: 'center' }, children: t('Review who can read these repositories') })] }), _jsxs(XStack, { gap: "$2", items: "center", children: [_jsxs(XStack, { flex: 1, items: "center", gap: "$2", px: "$3", py: "$2", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", children: [_jsx(XStack, { render: "button", "aria-label": t('Clear the selection'), onPress: () => { setPicked([]); setStep('pick'); }, children: _jsx(X, { size: 12 }) }), _jsx(SizableText, { flex: 1, size: "$2", color: "$ink", numberOfLines: 1, children: more ? t('{name}, +{n} more', { name: lead, n: more }) : lead })] }), _jsx(Button, { size: "sm", variant: "outline", onPress: () => setStep('pick'), children: t('Edit') })] }), _jsxs(XStack, { justify: "space-between", gap: "$4", children: [_jsxs(YStack, { gap: "$1", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: t('Who gets access') }), _jsx(SizableText, { size: "$2", color: "$ink", children: t('{name} · You', { name: host.person?.name || host.person?.email || t('You') }) })] }), _jsxs(YStack, { gap: "$1", items: "flex-end", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: t('Role') }), _jsx(SizableText, { size: "$2", color: "$ink", children: host.admin ? t('Repository admin') : t('Member') })] })] }), _jsx(SizableText, { size: "$2", color: "$soft", style: { textAlign: 'center' }, children: t('Anyone with access to {place}', { place: dest }) })] })) : null, error ? _jsx(Soft, { children: error }) : null, unbound && step === 'access' ? (_jsxs(Button, { width: "100%", variant: "outline", onPress: () => void addOrg(), children: [_jsx(Plus, { size: 14 }), t('Add organization')] })) : null, step === 'pick' ? (_jsx(Button, { width: "100%", disabled: !owner || picked.length === 0, onPress: () => setStep('access'), children: t('Continue') })) : (_jsxs(YStack, { gap: "$3", items: "center", width: "100%", children: [_jsx(Button, { width: "100%", disabled: busy || syncing || picked.length === 0, onPress: () => void send(), children: syncing || busy
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/build",
3
- "version": "0.2.116",
3
+ "version": "0.2.118",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "description": "Hanzo Build — say what you want, watch it built, deployed and running. The builder as a component, mounted by the Hanzo app at hanzo.ai.",