@zeyolabs/ui 2026.11.6 → 2026.11.8
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 +4 -7
- package/account/AccountMembers.svelte +199 -0
- package/account/AccountPolicies.svelte +201 -0
- package/form/field-view.svelte.ts +1 -1
- package/form/fields/index.ts +0 -1
- package/form/index.ts +0 -1
- package/package.json +6 -5
- package/stat/Stat.svelte +3 -3
- package/text/Title.svelte +1 -1
- package/typography.css +6 -7
- package/form/fields/PasswordField.svelte +0 -44
package/README.md
CHANGED
|
@@ -31,13 +31,10 @@ The app must enable async Svelte and remote functions in its `vite.config.ts`
|
|
|
31
31
|
|
|
32
32
|
## Versions
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
`
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
pnpm release # sets the version, commits, tags vYYYY.M.D
|
|
39
|
-
git push origin HEAD vYYYY.M.D # the tag publishes to npm (publish.yaml)
|
|
40
|
-
```
|
|
34
|
+
Every merge to `main` publishes a new version (`.github/workflows/publish.yaml`); there is no
|
|
35
|
+
release step. Versions are `YYYY.M.N` in London time: `N` counts that month's releases and resets
|
|
36
|
+
each month (`2026.11.7`, then `2026.12.0`). CI sets the version and pushes the `vYYYY.M.N` tag;
|
|
37
|
+
docs- or CI-only changes don't publish. Publishing uses npm trusted publishing (no stored token).
|
|
41
38
|
|
|
42
39
|
## Checks
|
|
43
40
|
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Trash2 from '@lucide/svelte/icons/trash-2';
|
|
3
|
+
import UserPlus from '@lucide/svelte/icons/user-plus';
|
|
4
|
+
import {
|
|
5
|
+
getAccountMembers,
|
|
6
|
+
inviteMemberForm,
|
|
7
|
+
removeMemberCmd,
|
|
8
|
+
revokeInviteCmd,
|
|
9
|
+
setMemberPolicyCmd,
|
|
10
|
+
} from '@zeyolabs/kit/auth/accounts/accounts.remote';
|
|
11
|
+
import { AccountSchemas } from '@zeyolabs/kit/auth/accounts/schemas';
|
|
12
|
+
import { toast } from 'svelte-sonner';
|
|
13
|
+
|
|
14
|
+
import Badge from '../badge/Badge.svelte';
|
|
15
|
+
import Boundary from '../boundary/Boundary.svelte';
|
|
16
|
+
import Card from '../card/Card.svelte';
|
|
17
|
+
import Button from '../form/Button.svelte';
|
|
18
|
+
import { EmailField, SelectField } from '../form/fields/index';
|
|
19
|
+
import Form from '../form/Form.svelte';
|
|
20
|
+
import Select from '../form/primitives/Select.svelte';
|
|
21
|
+
import SkeletonText from '../skeleton/SkeletonText.svelte';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Members of the request's account (`@zeyolabs/kit/auth`): who is in it, with which policy,
|
|
25
|
+
* pending invites, and an invite form. Controls appear only when the caller's policy allows
|
|
26
|
+
* them; the server checks again on every change.
|
|
27
|
+
*/
|
|
28
|
+
let { title = 'Members' }: { title?: string } = $props();
|
|
29
|
+
|
|
30
|
+
type PolicyOption = { key: string; name: string };
|
|
31
|
+
|
|
32
|
+
const day = new Intl.DateTimeFormat('en-GB', { dateStyle: 'medium' });
|
|
33
|
+
|
|
34
|
+
async function run(work: () => Promise<unknown>, done?: string) {
|
|
35
|
+
try {
|
|
36
|
+
await work();
|
|
37
|
+
if (done) toast.success(done);
|
|
38
|
+
} catch (err) {
|
|
39
|
+
toast.error(err instanceof Error ? err.message : 'Something went wrong');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<Boundary message="Could not load the members.">
|
|
45
|
+
{const data = $derived(await getAccountMembers())}
|
|
46
|
+
{const assignable = $derived(
|
|
47
|
+
data.policies.filter((p) => p.key !== 'owner' || data.me.policy === 'owner') as PolicyOption[]
|
|
48
|
+
)}
|
|
49
|
+
{const policyName = (key: string) => data.policies.find((p) => p.key === key)?.name ?? key}
|
|
50
|
+
|
|
51
|
+
<Card gap="sm" padding="md">
|
|
52
|
+
<h2 class="account-title">{title}</h2>
|
|
53
|
+
<ul class="account-list">
|
|
54
|
+
{#each data.members as member (member.userId)}
|
|
55
|
+
<li>
|
|
56
|
+
<div class="who">
|
|
57
|
+
<span class="name">{member.name}</span>
|
|
58
|
+
<span class="sub">{member.email}</span>
|
|
59
|
+
</div>
|
|
60
|
+
{#if data.can.manage && member.userId !== data.me.userId && (member.policy !== 'owner' || data.me.policy === 'owner')}
|
|
61
|
+
<Select
|
|
62
|
+
class="policy"
|
|
63
|
+
getKey={(p: PolicyOption) => p.key}
|
|
64
|
+
getLabel={(p: PolicyOption) => p.name}
|
|
65
|
+
getValue={(p: PolicyOption) => p.key}
|
|
66
|
+
items={assignable}
|
|
67
|
+
onchange={(policy) =>
|
|
68
|
+
policy &&
|
|
69
|
+
policy !== member.policy &&
|
|
70
|
+
run(() => setMemberPolicyCmd({ policy, userId: member.userId }), 'Policy changed')}
|
|
71
|
+
placeholder="Policy"
|
|
72
|
+
value={member.policy}
|
|
73
|
+
/>
|
|
74
|
+
<Button
|
|
75
|
+
aria-label="Remove {member.email}"
|
|
76
|
+
icon
|
|
77
|
+
onclick={() =>
|
|
78
|
+
run(() => removeMemberCmd({ userId: member.userId }), `Removed ${member.email}`)}
|
|
79
|
+
size="sm"
|
|
80
|
+
variant="ghost-destructive"
|
|
81
|
+
>
|
|
82
|
+
<Trash2 size={13} />
|
|
83
|
+
</Button>
|
|
84
|
+
{:else}
|
|
85
|
+
<Badge color={member.policy === 'owner' ? 'purple' : 'secondary'}>
|
|
86
|
+
{policyName(member.policy)}
|
|
87
|
+
</Badge>
|
|
88
|
+
{/if}
|
|
89
|
+
</li>
|
|
90
|
+
{/each}
|
|
91
|
+
</ul>
|
|
92
|
+
|
|
93
|
+
{#if data.invites.length}
|
|
94
|
+
<h3 class="account-subtitle">Pending invitations</h3>
|
|
95
|
+
<ul class="account-list">
|
|
96
|
+
{#each data.invites as invite (invite.email)}
|
|
97
|
+
<li>
|
|
98
|
+
<div class="who">
|
|
99
|
+
<span class="name">{invite.email}</span>
|
|
100
|
+
<span class="sub">
|
|
101
|
+
{policyName(invite.policy)}, expires {day.format(invite.expiresAt)}
|
|
102
|
+
</span>
|
|
103
|
+
</div>
|
|
104
|
+
{#if data.can.invite}
|
|
105
|
+
<Button
|
|
106
|
+
onclick={() =>
|
|
107
|
+
run(() => revokeInviteCmd({ email: invite.email }), 'Invitation revoked')}
|
|
108
|
+
size="sm"
|
|
109
|
+
variant="ghost"
|
|
110
|
+
>
|
|
111
|
+
Revoke
|
|
112
|
+
</Button>
|
|
113
|
+
{/if}
|
|
114
|
+
</li>
|
|
115
|
+
{/each}
|
|
116
|
+
</ul>
|
|
117
|
+
{/if}
|
|
118
|
+
|
|
119
|
+
{#if data.can.invite}
|
|
120
|
+
<Form class="account-invite" form={inviteMemberForm} schema={AccountSchemas.Invite}>
|
|
121
|
+
<EmailField name="email" form={inviteMemberForm} placeholder="name@example.com">
|
|
122
|
+
Invite by email
|
|
123
|
+
</EmailField>
|
|
124
|
+
<SelectField
|
|
125
|
+
name="policy"
|
|
126
|
+
form={inviteMemberForm}
|
|
127
|
+
getKey={(p: PolicyOption) => p.key}
|
|
128
|
+
getLabel={(p: PolicyOption) => p.name}
|
|
129
|
+
getValue={(p: PolicyOption) => p.key}
|
|
130
|
+
items={assignable}
|
|
131
|
+
label="Policy"
|
|
132
|
+
placeholder="Choose a policy"
|
|
133
|
+
/>
|
|
134
|
+
<Button form={inviteMemberForm}><UserPlus size={14} /> Invite</Button>
|
|
135
|
+
</Form>
|
|
136
|
+
{/if}
|
|
137
|
+
</Card>
|
|
138
|
+
|
|
139
|
+
{#snippet pending()}
|
|
140
|
+
<SkeletonText lines={5} />
|
|
141
|
+
{/snippet}
|
|
142
|
+
</Boundary>
|
|
143
|
+
|
|
144
|
+
<style>
|
|
145
|
+
.account-title {
|
|
146
|
+
margin: 0;
|
|
147
|
+
font-size: var(--text-base);
|
|
148
|
+
font-weight: 600;
|
|
149
|
+
}
|
|
150
|
+
.account-subtitle {
|
|
151
|
+
margin: 4px 0 0;
|
|
152
|
+
font-size: 12px;
|
|
153
|
+
font-weight: 600;
|
|
154
|
+
color: var(--txs);
|
|
155
|
+
}
|
|
156
|
+
.account-list {
|
|
157
|
+
display: flex;
|
|
158
|
+
flex-direction: column;
|
|
159
|
+
margin: 0;
|
|
160
|
+
padding: 0;
|
|
161
|
+
list-style: none;
|
|
162
|
+
}
|
|
163
|
+
.account-list li {
|
|
164
|
+
display: flex;
|
|
165
|
+
align-items: center;
|
|
166
|
+
gap: 8px;
|
|
167
|
+
padding: 8px 0;
|
|
168
|
+
border-top: 1px solid var(--bds);
|
|
169
|
+
}
|
|
170
|
+
.who {
|
|
171
|
+
display: flex;
|
|
172
|
+
flex: 1;
|
|
173
|
+
flex-direction: column;
|
|
174
|
+
min-width: 0;
|
|
175
|
+
}
|
|
176
|
+
.name {
|
|
177
|
+
font-weight: 500;
|
|
178
|
+
}
|
|
179
|
+
.sub {
|
|
180
|
+
color: var(--txt);
|
|
181
|
+
font-size: 12px;
|
|
182
|
+
}
|
|
183
|
+
.account-list :global(.policy) {
|
|
184
|
+
width: 160px;
|
|
185
|
+
}
|
|
186
|
+
:global(form.account-invite) {
|
|
187
|
+
display: grid;
|
|
188
|
+
grid-template-columns: 2fr 1fr auto;
|
|
189
|
+
gap: 8px;
|
|
190
|
+
align-items: end;
|
|
191
|
+
padding-top: 8px;
|
|
192
|
+
border-top: 1px solid var(--bds);
|
|
193
|
+
}
|
|
194
|
+
@media (max-width: 640px) {
|
|
195
|
+
:global(form.account-invite) {
|
|
196
|
+
grid-template-columns: 1fr;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
</style>
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Plus from '@lucide/svelte/icons/plus';
|
|
3
|
+
import {
|
|
4
|
+
deletePolicyCmd,
|
|
5
|
+
getAccountMembers,
|
|
6
|
+
savePolicyCmd,
|
|
7
|
+
} from '@zeyolabs/kit/auth/accounts/accounts.remote';
|
|
8
|
+
import { toast } from 'svelte-sonner';
|
|
9
|
+
|
|
10
|
+
import Badge from '../badge/Badge.svelte';
|
|
11
|
+
import Boundary from '../boundary/Boundary.svelte';
|
|
12
|
+
import Card from '../card/Card.svelte';
|
|
13
|
+
import Button from '../form/Button.svelte';
|
|
14
|
+
import Checkbox from '../form/primitives/Checkbox.svelte';
|
|
15
|
+
import Input from '../form/primitives/Input.svelte';
|
|
16
|
+
import SkeletonText from '../skeleton/SkeletonText.svelte';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The account's policies (`@zeyolabs/kit/auth`): the built-in ones, read-only, and the
|
|
20
|
+
* account's own, which owners can create, edit and delete from the app's permission keys.
|
|
21
|
+
*/
|
|
22
|
+
let { title = 'Policies' }: { title?: string } = $props();
|
|
23
|
+
|
|
24
|
+
type Draft = { isNew: boolean; key: string; name: string; permissions: string[] };
|
|
25
|
+
|
|
26
|
+
let draft = $state<Draft | null>(null);
|
|
27
|
+
let saving = $state(false);
|
|
28
|
+
|
|
29
|
+
function edit(policy?: { key: string; name: string; permissions: readonly string[] }) {
|
|
30
|
+
draft = policy
|
|
31
|
+
? { isNew: false, key: policy.key, name: policy.name, permissions: [...policy.permissions] }
|
|
32
|
+
: { isNew: true, key: '', name: '', permissions: [] };
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function toggle(permission: string, on: boolean) {
|
|
36
|
+
if (!draft) return;
|
|
37
|
+
draft.permissions = on
|
|
38
|
+
? [...draft.permissions, permission]
|
|
39
|
+
: draft.permissions.filter((p) => p !== permission);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async function save() {
|
|
43
|
+
if (!draft) return;
|
|
44
|
+
saving = true;
|
|
45
|
+
try {
|
|
46
|
+
const { key, name, permissions } = draft;
|
|
47
|
+
await savePolicyCmd({ key: key.trim(), name, permissions });
|
|
48
|
+
toast.success(`Saved ${name}`);
|
|
49
|
+
draft = null;
|
|
50
|
+
} catch (err) {
|
|
51
|
+
toast.error(err instanceof Error ? err.message : 'Could not save the policy');
|
|
52
|
+
} finally {
|
|
53
|
+
saving = false;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async function remove(key: string) {
|
|
58
|
+
try {
|
|
59
|
+
await deletePolicyCmd({ key });
|
|
60
|
+
toast.success('Policy deleted');
|
|
61
|
+
} catch (err) {
|
|
62
|
+
toast.error(err instanceof Error ? err.message : 'Could not delete the policy');
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
<Boundary message="Could not load the policies.">
|
|
68
|
+
{const data = $derived(await getAccountMembers())}
|
|
69
|
+
|
|
70
|
+
<Card gap="sm" padding="md">
|
|
71
|
+
<div class="head">
|
|
72
|
+
<h2 class="policies-title">{title}</h2>
|
|
73
|
+
{#if data.can.managePolicies && !draft}
|
|
74
|
+
<Button onclick={() => edit()} size="sm" variant="secondary">
|
|
75
|
+
<Plus size={13} /> New policy
|
|
76
|
+
</Button>
|
|
77
|
+
{/if}
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<ul class="policies">
|
|
81
|
+
{#each data.policies as policy (policy.key)}
|
|
82
|
+
<li>
|
|
83
|
+
<div class="what">
|
|
84
|
+
<span class="name">{policy.name}</span>
|
|
85
|
+
<span class="sub">
|
|
86
|
+
{policy.permissions.includes('*')
|
|
87
|
+
? 'Everything'
|
|
88
|
+
: policy.permissions.join(', ') || 'Nothing'}
|
|
89
|
+
</span>
|
|
90
|
+
</div>
|
|
91
|
+
{#if policy.builtIn}
|
|
92
|
+
<Badge dot={false}>Built in</Badge>
|
|
93
|
+
{:else if data.can.managePolicies}
|
|
94
|
+
<Button onclick={() => edit(policy)} size="sm" variant="ghost">Edit</Button>
|
|
95
|
+
<Button onclick={() => remove(policy.key)} size="sm" variant="ghost-destructive">
|
|
96
|
+
Delete
|
|
97
|
+
</Button>
|
|
98
|
+
{/if}
|
|
99
|
+
</li>
|
|
100
|
+
{/each}
|
|
101
|
+
</ul>
|
|
102
|
+
|
|
103
|
+
{#if draft}
|
|
104
|
+
<div class="editor">
|
|
105
|
+
<div class="row">
|
|
106
|
+
<Input
|
|
107
|
+
aria-label="Policy name"
|
|
108
|
+
placeholder="Name, e.g. Support"
|
|
109
|
+
bind:value={draft.name}
|
|
110
|
+
/>
|
|
111
|
+
<Input
|
|
112
|
+
aria-label="Policy key"
|
|
113
|
+
disabled={!draft.isNew}
|
|
114
|
+
placeholder="key, e.g. support"
|
|
115
|
+
bind:value={draft.key}
|
|
116
|
+
/>
|
|
117
|
+
</div>
|
|
118
|
+
<div class="grants">
|
|
119
|
+
{#each data.permissions as permission (permission)}
|
|
120
|
+
<Checkbox
|
|
121
|
+
checked={draft.permissions.includes(permission)}
|
|
122
|
+
onCheckedChange={(on) => toggle(permission, on)}
|
|
123
|
+
>
|
|
124
|
+
{permission}
|
|
125
|
+
</Checkbox>
|
|
126
|
+
{/each}
|
|
127
|
+
</div>
|
|
128
|
+
<div class="row">
|
|
129
|
+
<Button
|
|
130
|
+
disabled={saving || !draft.name.trim() || !draft.key.trim()}
|
|
131
|
+
onclick={save}
|
|
132
|
+
size="sm"
|
|
133
|
+
>
|
|
134
|
+
{saving ? 'Saving…' : 'Save policy'}
|
|
135
|
+
</Button>
|
|
136
|
+
<Button onclick={() => (draft = null)} size="sm" variant="ghost">Cancel</Button>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
{/if}
|
|
140
|
+
</Card>
|
|
141
|
+
|
|
142
|
+
{#snippet pending()}
|
|
143
|
+
<SkeletonText lines={4} />
|
|
144
|
+
{/snippet}
|
|
145
|
+
</Boundary>
|
|
146
|
+
|
|
147
|
+
<style>
|
|
148
|
+
.head {
|
|
149
|
+
display: flex;
|
|
150
|
+
align-items: center;
|
|
151
|
+
justify-content: space-between;
|
|
152
|
+
}
|
|
153
|
+
.policies-title {
|
|
154
|
+
margin: 0;
|
|
155
|
+
font-size: var(--text-base);
|
|
156
|
+
font-weight: 600;
|
|
157
|
+
}
|
|
158
|
+
.policies {
|
|
159
|
+
display: flex;
|
|
160
|
+
flex-direction: column;
|
|
161
|
+
margin: 0;
|
|
162
|
+
padding: 0;
|
|
163
|
+
list-style: none;
|
|
164
|
+
}
|
|
165
|
+
.policies li {
|
|
166
|
+
display: flex;
|
|
167
|
+
align-items: center;
|
|
168
|
+
gap: 8px;
|
|
169
|
+
padding: 8px 0;
|
|
170
|
+
border-top: 1px solid var(--bds);
|
|
171
|
+
}
|
|
172
|
+
.what {
|
|
173
|
+
display: flex;
|
|
174
|
+
flex: 1;
|
|
175
|
+
flex-direction: column;
|
|
176
|
+
min-width: 0;
|
|
177
|
+
}
|
|
178
|
+
.name {
|
|
179
|
+
font-weight: 500;
|
|
180
|
+
}
|
|
181
|
+
.sub {
|
|
182
|
+
color: var(--txt);
|
|
183
|
+
font-size: 12px;
|
|
184
|
+
}
|
|
185
|
+
.editor {
|
|
186
|
+
display: flex;
|
|
187
|
+
flex-direction: column;
|
|
188
|
+
gap: 10px;
|
|
189
|
+
padding-top: 8px;
|
|
190
|
+
border-top: 1px solid var(--bds);
|
|
191
|
+
}
|
|
192
|
+
.row {
|
|
193
|
+
display: flex;
|
|
194
|
+
gap: 8px;
|
|
195
|
+
}
|
|
196
|
+
.grants {
|
|
197
|
+
display: grid;
|
|
198
|
+
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
|
199
|
+
gap: 6px;
|
|
200
|
+
}
|
|
201
|
+
</style>
|
|
@@ -87,7 +87,7 @@ type LocalOpts<T> = {
|
|
|
87
87
|
};
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
|
-
* Text-like standalone view (text/number/date/time/email/
|
|
90
|
+
* Text-like standalone view (text/number/date/time/email/etc.).
|
|
91
91
|
* Builds its own `oninput`/`onchange` since `as()` does not provide them.
|
|
92
92
|
*/
|
|
93
93
|
export function createLocalTextView<T>(opts: LocalOpts<T>): FieldView {
|
package/form/fields/index.ts
CHANGED
|
@@ -10,7 +10,6 @@ export { default as IntervalField } from './IntervalField.svelte';
|
|
|
10
10
|
export { default as MessageField } from './MessageField.svelte';
|
|
11
11
|
export { default as NumberField } from './NumberField.svelte';
|
|
12
12
|
export { default as Option } from './Option.svelte';
|
|
13
|
-
export { default as PasswordField } from './PasswordField.svelte';
|
|
14
13
|
export { default as RadioField } from './RadioField.svelte';
|
|
15
14
|
export { default as SelectField } from './SelectField.svelte';
|
|
16
15
|
export { default as SliderField } from './SliderField.svelte';
|
package/form/index.ts
CHANGED
|
@@ -11,7 +11,6 @@ export { default as HexColorField } from './fields/HexColorField.svelte';
|
|
|
11
11
|
export { default as MessageField } from './fields/MessageField.svelte';
|
|
12
12
|
export { default as NumberField } from './fields/NumberField.svelte';
|
|
13
13
|
export { default as Option } from './fields/Option.svelte';
|
|
14
|
-
export { default as PasswordField } from './fields/PasswordField.svelte';
|
|
15
14
|
export { default as SelectField } from './fields/SelectField.svelte';
|
|
16
15
|
export { default as SliderField } from './fields/SliderField.svelte';
|
|
17
16
|
export { default as SwitchField } from './fields/SwitchField.svelte';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeyolabs/ui",
|
|
3
|
-
"version": "2026.11.
|
|
3
|
+
"version": "2026.11.8",
|
|
4
4
|
"description": "Shared Svelte 5 components, form fields and design tokens for SvelteKit 3 apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"ci": "pnpm check && pnpm showcase:build",
|
|
25
25
|
"showcase:dev": "pnpm --filter showcase dev",
|
|
26
26
|
"showcase:build": "pnpm --filter showcase build",
|
|
27
|
-
"showcase:deploy": "pnpm --filter showcase cf-deploy"
|
|
28
|
-
"release": "node scripts/release.mjs"
|
|
27
|
+
"showcase:deploy": "pnpm --filter showcase cf-deploy"
|
|
29
28
|
},
|
|
30
29
|
"files": [
|
|
30
|
+
"account",
|
|
31
31
|
"back-button",
|
|
32
32
|
"badge",
|
|
33
33
|
"bar",
|
|
@@ -85,6 +85,7 @@
|
|
|
85
85
|
"./percentage-ring/*": "./percentage-ring/*",
|
|
86
86
|
"./status-row/types": "./status-row/types.ts",
|
|
87
87
|
"./status-row/*": "./status-row/*",
|
|
88
|
+
"./account/*": "./account/*",
|
|
88
89
|
"./boundary/pending-context": "./boundary/pending-context.ts",
|
|
89
90
|
"./boundary/pending-flag": "./boundary/pending-flag.svelte.ts",
|
|
90
91
|
"./boundary/*": "./boundary/*",
|
|
@@ -130,7 +131,7 @@
|
|
|
130
131
|
"./theme/*": "./theme/*"
|
|
131
132
|
},
|
|
132
133
|
"peerDependencies": {
|
|
133
|
-
"@zeyolabs/kit": ">=2026.11.
|
|
134
|
+
"@zeyolabs/kit": ">=2026.11.6",
|
|
134
135
|
"@sveltejs/kit": "^3.1.1",
|
|
135
136
|
"svelte": "^5.57.3"
|
|
136
137
|
},
|
|
@@ -151,7 +152,7 @@
|
|
|
151
152
|
"devDependencies": {
|
|
152
153
|
"@eslint/compat": "2.1.1",
|
|
153
154
|
"@eslint/js": "9.39.4",
|
|
154
|
-
"@zeyolabs/kit": "2026.11.
|
|
155
|
+
"@zeyolabs/kit": "2026.11.6",
|
|
155
156
|
"@sveltejs/kit": "3.1.1",
|
|
156
157
|
"@types/flickity": "2.2.12",
|
|
157
158
|
"eslint": "9.39.4",
|
package/stat/Stat.svelte
CHANGED
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
label: Snippet;
|
|
23
23
|
/** Loading ring on the card while its value reloads; drive it from `pendingFlag()`. */
|
|
24
24
|
loading?: boolean;
|
|
25
|
-
/** Type treatment for the value. `display` (default)
|
|
26
|
-
*
|
|
27
|
-
*
|
|
25
|
+
/** Type treatment for the value. `display` (default) uses `--font-heading`; `plain` keeps
|
|
26
|
+
* `--font-sans` at a slightly smaller size, for dense metric grids where a row of display
|
|
27
|
+
* numerals reads too loud. */
|
|
28
28
|
numerals?: 'display' | 'plain';
|
|
29
29
|
sub?: Snippet;
|
|
30
30
|
value: Snippet;
|
package/text/Title.svelte
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
maxWidth?: string;
|
|
36
36
|
/** Single-line ellipsis. Needs a bounded width from context (a flex child needs its own
|
|
37
37
|
* `min-width: 0`/`flex: 1` via `class`, or pass `maxWidth`). Clips only the inline axis —
|
|
38
|
-
* unlike Tailwind's `truncate`, the vertical axis stays `visible` so descenders (
|
|
38
|
+
* unlike Tailwind's `truncate`, the vertical axis stays `visible` so descenders (the font's
|
|
39
39
|
* glyph box is taller than the tight h1/h2 line-height) don't get cropped by the clip box. */
|
|
40
40
|
truncate?: boolean;
|
|
41
41
|
} = $props();
|
package/typography.css
CHANGED
|
@@ -5,13 +5,12 @@
|
|
|
5
5
|
letter-spacing scale, so no app duplicates or drifts from another. A component's own
|
|
6
6
|
scoped <style> block (higher specificity than these unscoped tag selectors) still
|
|
7
7
|
wins for any heading that needs a bespoke size — this scale is only the default.
|
|
8
|
-
Requires the consuming app.html to load
|
|
9
|
-
app) — every app on the same font-delivery pipeline, same font-family name. */
|
|
8
|
+
Requires the consuming app.html to load Geist and Geist Mono via Google Fonts (see app.html
|
|
9
|
+
in any app) — every app on the same font-delivery pipeline, same font-family name. */
|
|
10
10
|
@theme inline {
|
|
11
|
-
--font-sans:
|
|
12
|
-
|
|
13
|
-
--font-
|
|
14
|
-
--font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
11
|
+
--font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
|
|
12
|
+
--font-heading: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
13
|
+
--font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
@layer base {
|
|
@@ -53,7 +52,7 @@
|
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
h1 {
|
|
56
|
-
font-size:
|
|
55
|
+
font-size: clamp(2.25rem, 6vw, 56px);
|
|
57
56
|
font-weight: 400;
|
|
58
57
|
line-height: 1.08;
|
|
59
58
|
letter-spacing: -2px;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
<script generics="Input extends RemoteFormInput, T = string" lang="ts">
|
|
2
|
-
import type { RemoteForm, RemoteFormInput } from '$app/server';
|
|
3
|
-
import type { Snippet } from 'svelte';
|
|
4
|
-
import type { ZodType } from 'zod';
|
|
5
|
-
|
|
6
|
-
import Field from '../Field.svelte';
|
|
7
|
-
|
|
8
|
-
interface Props {
|
|
9
|
-
children?: Snippet;
|
|
10
|
-
form?: Omit<RemoteForm<Input, unknown>, 'for'> | RemoteForm<Input, unknown>;
|
|
11
|
-
name: keyof Input & string;
|
|
12
|
-
onChange?: (value: T) => void;
|
|
13
|
-
onInput?: (value: T) => void;
|
|
14
|
-
optional?: boolean;
|
|
15
|
-
placeholder?: string;
|
|
16
|
-
schema?: ZodType;
|
|
17
|
-
value?: T;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
let {
|
|
21
|
-
children,
|
|
22
|
-
form,
|
|
23
|
-
name,
|
|
24
|
-
onChange,
|
|
25
|
-
onInput,
|
|
26
|
-
optional,
|
|
27
|
-
placeholder,
|
|
28
|
-
schema,
|
|
29
|
-
value = $bindable(),
|
|
30
|
-
}: Props = $props();
|
|
31
|
-
</script>
|
|
32
|
-
|
|
33
|
-
<Field
|
|
34
|
-
{name}
|
|
35
|
-
{children}
|
|
36
|
-
{form}
|
|
37
|
-
{onChange}
|
|
38
|
-
{onInput}
|
|
39
|
-
{optional}
|
|
40
|
-
{placeholder}
|
|
41
|
-
{schema}
|
|
42
|
-
type="password"
|
|
43
|
-
bind:value
|
|
44
|
-
/>
|