@hanzo/build 0.2.117 → 0.2.119
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/README.md +25 -4
- package/lib/api/agents.d.ts +4 -2
- package/lib/api/agents.js +5 -3
- package/lib/api/chat.d.ts +1 -1
- package/lib/api/chat.js +2 -2
- package/lib/api/draft.d.ts +33 -0
- package/lib/api/draft.js +81 -0
- package/lib/api/gallery.d.ts +32 -0
- package/lib/api/gallery.js +85 -0
- package/lib/api/github.d.ts +12 -1
- package/lib/api/github.js +27 -2
- package/lib/customize/agents.js +35 -8
- package/lib/customize/drafted.d.ts +4 -0
- package/lib/customize/drafted.js +79 -0
- package/lib/customize/inventory.d.ts +11 -0
- package/lib/customize/inventory.js +78 -0
- package/lib/customize/ocean.d.ts +41 -0
- package/lib/customize/ocean.js +332 -0
- package/lib/customize/ui.d.ts +9 -2
- package/lib/customize/ui.js +33 -4
- package/lib/host.d.ts +7 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/landing.js +1 -1
- package/lib/library.js +7 -7
- package/lib/make.d.ts +10 -0
- package/lib/make.js +113 -0
- package/lib/marks.d.ts +15 -0
- package/lib/marks.js +18 -0
- package/lib/mind.d.ts +29 -3
- package/lib/mind.js +73 -6
- package/lib/nav.d.ts +1 -1
- package/lib/nav.js +16 -8
- package/lib/route.d.ts +3 -2
- package/lib/route.js +2 -2
- package/lib/sync.js +8 -4
- package/package.json +5 -5
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
|
|
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 ? () =>
|
|
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…') })) :
|
|
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.
|
|
3
|
+
"version": "0.2.119",
|
|
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.",
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"@hanzo/composer": "0.2.0",
|
|
12
12
|
"@hanzo/font": "1.9.3",
|
|
13
13
|
"@hanzo/gui": "8.3.5",
|
|
14
|
-
"@hanzo/i18n": "0.
|
|
14
|
+
"@hanzo/i18n": "0.5.5",
|
|
15
15
|
"@hanzo/iam": "0.21.28",
|
|
16
|
-
"@hanzo/ui": "8.
|
|
16
|
+
"@hanzo/ui": "8.30.3",
|
|
17
17
|
"@hanzo/vite": "0.1.4",
|
|
18
18
|
"@hanzo/voice": "0.1.19",
|
|
19
19
|
"@hanzogui/lucide-icons-2": "8.3.5",
|
|
@@ -73,12 +73,12 @@
|
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"@hanzo/gui": ">=8.3.5",
|
|
76
|
-
"@hanzo/ui": ">=8.
|
|
76
|
+
"@hanzo/ui": ">=8.30.3",
|
|
77
77
|
"@hanzogui/lucide-icons-2": ">=8.3.5",
|
|
78
78
|
"react": ">=19.2.8",
|
|
79
79
|
"@hanzo/voice": ">=0.1.19",
|
|
80
80
|
"@hanzo/composer": ">=0.2.0",
|
|
81
|
-
"@hanzo/i18n": ">=0.
|
|
81
|
+
"@hanzo/i18n": ">=0.5.5"
|
|
82
82
|
},
|
|
83
83
|
"scripts": {
|
|
84
84
|
"dev": "vite",
|