@fuzdev/fuz_app 0.121.0 → 0.122.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.
@@ -43,7 +43,7 @@
43
43
  <h2>
44
44
  Sessions
45
45
  {#if account_sessions.active_count > 0}
46
- <span class="chip color_a">{account_sessions.active_count} active</span>
46
+ <span class="chip palette_a">{account_sessions.active_count} active</span>
47
47
  {/if}
48
48
  </h2>
49
49
 
@@ -64,7 +64,7 @@
64
64
  <Datatable {columns} rows={account_sessions.sessions} height="300px">
65
65
  {#snippet cell(column, row)}
66
66
  {#if column.key === 'id'}
67
- <span class="chip color_b">active</span>
67
+ <span class="chip palette_b">active</span>
68
68
  <code class="text_50">{truncate_uuid(row.id)}</code>
69
69
  {:else if column.key === 'created_at'}
70
70
  <span title={format_datetime_local(row.created_at)}>
@@ -47,7 +47,7 @@
47
47
  <h1>Accounts</h1>
48
48
  {#if admin_accounts.account_count > 0}
49
49
  <p>
50
- <span class="chip color_a">
50
+ <span class="chip palette_a">
51
51
  {admin_accounts.account_count} account{admin_accounts.account_count === 1 ? '' : 's'}
52
52
  </span>
53
53
  </p>
@@ -79,7 +79,7 @@
79
79
  <span class="text_50 font_size_sm">
80
80
  {row.account.email}
81
81
  {#if row.account.email_verified}
82
- <span class="chip font_size_sm color_b">verified</span>
82
+ <span class="chip font_size_sm palette_b">verified</span>
83
83
  {:else}
84
84
  <span class="chip font_size_sm">unverified</span>
85
85
  {/if}
@@ -97,7 +97,7 @@
97
97
  {#each row.role_grants as role_grant (role_grant.id)}
98
98
  {@const scope = scope_label(role_grant.scope_id, role_grant.role)}
99
99
  <div class="row">
100
- <span class="chip color_b">{role_grant.role}</span>
100
+ <span class="chip palette_b">{role_grant.role}</span>
101
101
  {#if scope !== null}
102
102
  <span class="text_50 font_size_sm" title={role_grant.scope_id ?? undefined}>
103
103
  {scope}
@@ -117,7 +117,7 @@
117
117
  <ConfirmButton
118
118
  onconfirm={() => admin_accounts.submit_revoke(actor_id, role_grant.id)}
119
119
  title="revoke {role_grant.role}"
120
- class="sm"
120
+ class="sized_sm"
121
121
  label="revoke"
122
122
  pending={admin_accounts.revoke.loading(role_grant.id)}
123
123
  />
@@ -145,7 +145,7 @@
145
145
  <ConfirmButton
146
146
  onconfirm={() => admin_accounts.submit_retract(offer.id)}
147
147
  title="retract offer"
148
- class="sm"
148
+ class="sized_sm"
149
149
  label="retract"
150
150
  pending={admin_accounts.retract.loading(offer.id)}
151
151
  />
@@ -165,12 +165,16 @@
165
165
  <ConfirmButton
166
166
  onconfirm={() => admin_accounts.submit_grant(row.account.id, role)}
167
167
  title="offer {role}"
168
- class="sm"
168
+ class="sized_sm"
169
169
  label={`+ ${role}`}
170
170
  pending={admin_accounts.grant.loading(key)}
171
171
  >
172
172
  {#snippet popover_content(_popover, do_confirm)}
173
- <button type="button" class="color_b bg_100" onclick={() => do_confirm()}>
173
+ <button
174
+ type="button"
175
+ class="palette_b background-color:var(--bg_100)"
176
+ onclick={() => do_confirm()}
177
+ >
174
178
  <span class="py_sm">offer '{role}' to @{row.account.username}</span>
175
179
  </button>
176
180
  {/snippet}
@@ -184,14 +188,14 @@
184
188
  {#if row.account.deleted_at}
185
189
  {@const undelete_error = admin_accounts.undelete.error(row.account.id)}
186
190
  <span
187
- class="chip font_size_sm color_c"
191
+ class="chip font_size_sm palette_c"
188
192
  title={format_datetime_local(row.account.deleted_at)}
189
193
  >
190
194
  deleted {format_relative_time(row.account.deleted_at)}
191
195
  </span>
192
196
  <button
193
197
  type="button"
194
- class="sm"
198
+ class="sized_sm"
195
199
  disabled={admin_accounts.undelete.loading(row.account.id)}
196
200
  onclick={() => admin_accounts.submit_undelete(row.account.id)}
197
201
  >
@@ -205,12 +209,16 @@
205
209
  <ConfirmButton
206
210
  onconfirm={() => admin_accounts.submit_delete(row.account.id)}
207
211
  title="soft-delete @{row.account.username}"
208
- class="sm"
212
+ class="sized_sm"
209
213
  label="delete"
210
214
  pending={admin_accounts.soft_delete.loading(row.account.id)}
211
215
  >
212
216
  {#snippet popover_content(_popover, do_confirm)}
213
- <button type="button" class="color_c bg_100" onclick={() => do_confirm()}>
217
+ <button
218
+ type="button"
219
+ class="palette_c background-color:var(--bg_100)"
220
+ onclick={() => do_confirm()}
221
+ >
214
222
  <span class="py_sm">soft-delete @{row.account.username} (reversible)</span>
215
223
  </button>
216
224
  {/snippet}
@@ -88,7 +88,7 @@
88
88
  </select>
89
89
  </label>
90
90
  <button type="button" onclick={load}>refresh</button>
91
- <button type="button" onclick={toggle_streaming} class:color_b={streaming}>
91
+ <button type="button" onclick={toggle_streaming} class:palette_b={streaming}>
92
92
  {streaming ? 'stop' : 'stream'}
93
93
  </button>
94
94
  {#if streaming}
@@ -114,8 +114,8 @@
114
114
  {:else if column.key === 'outcome'}
115
115
  <span
116
116
  class="chip"
117
- class:color_b={row.outcome === 'success'}
118
- class:color_c={row.outcome === 'failure'}
117
+ class:palette_b={row.outcome === 'success'}
118
+ class:palette_c={row.outcome === 'failure'}
119
119
  >
120
120
  {row.outcome}
121
121
  </span>
@@ -60,7 +60,7 @@
60
60
  </fieldset>
61
61
  {#if admin_invites.invite_count > 0}
62
62
  <p>
63
- <span class="chip color_a">
63
+ <span class="chip palette_a">
64
64
  {admin_invites.unclaimed_count} unclaimed / {admin_invites.invite_count} total
65
65
  </span>
66
66
  </p>
@@ -75,7 +75,7 @@
75
75
  >
76
76
  <fieldset class="row gap_sm">
77
77
  <legend>Invite Target</legend>
78
- <label class="grow">
78
+ <label class="flex-grow:1">
79
79
  <div class="title">email</div>
80
80
  <input
81
81
  type="email"
@@ -84,7 +84,7 @@
84
84
  disabled={admin_invites.create.loading}
85
85
  />
86
86
  </label>
87
- <label class="grow">
87
+ <label class="flex-grow:1">
88
88
  <div class="title">username</div>
89
89
  <input
90
90
  type="text"
@@ -114,7 +114,7 @@
114
114
  {#snippet cell(column, row)}
115
115
  {#if column.key === 'claimed_at'}
116
116
  {#if row.claimed_at}
117
- <span class="chip color_b">claimed</span>
117
+ <span class="chip palette_b">claimed</span>
118
118
  <span class="text_50 font_size_sm" title={format_datetime_local(row.claimed_at)}>
119
119
  {#if row.claimed_by_username}
120
120
  by {row.claimed_by_username}
@@ -138,7 +138,7 @@
138
138
  <ConfirmButton
139
139
  onconfirm={() => admin_invites.submit_delete(row.id)}
140
140
  title="delete invite"
141
- class="sm"
141
+ class="sized_sm"
142
142
  label="delete"
143
143
  pending={admin_invites.remove.loading(row.id)}
144
144
  />
@@ -169,7 +169,7 @@
169
169
  <div class="baseline-row gap_sm">
170
170
  <span class="text_50">public signup</span>
171
171
  {#if app_settings.settings?.open_signup}
172
- <span class="chip color_b">open</span>
172
+ <span class="chip palette_b">open</span>
173
173
  {:else}
174
174
  <span class="chip">closed</span>
175
175
  {/if}
@@ -187,7 +187,7 @@
187
187
  <li>
188
188
  <span>{invite.email || invite.username || '—'}</span>
189
189
  {#if invite.claimed_at}
190
- <span class="chip font_size_sm color_b">claimed</span>
190
+ <span class="chip font_size_sm palette_b">claimed</span>
191
191
  {:else}
192
192
  <span class="chip font_size_sm">unclaimed</span>
193
193
  {/if}
@@ -221,7 +221,7 @@
221
221
  </span>
222
222
  <code class="font_size_sm">{event.event_type}</code>
223
223
  {#if event.outcome === 'failure'}
224
- <span class="chip font_size_sm color_c">fail</span>
224
+ <span class="chip font_size_sm palette_c">fail</span>
225
225
  {/if}
226
226
  </li>
227
227
  {/each}
@@ -279,7 +279,7 @@
279
279
  <div class="baseline-row gap_sm">
280
280
  <span class="text_50">public signup</span>
281
281
  {#if app_settings.settings?.open_signup}
282
- <span class="chip color_b">open</span>
282
+ <span class="chip palette_b">open</span>
283
283
  {:else}
284
284
  <span class="chip">invite-only</span>
285
285
  {/if}
@@ -50,8 +50,8 @@
50
50
  {#if column.key === 'event_type'}
51
51
  <span
52
52
  class="chip"
53
- class:color_b={row.event_type === 'role_grant_create'}
54
- class:color_c={row.event_type === 'role_grant_revoke'}
53
+ class:palette_b={row.event_type === 'role_grant_create'}
54
+ class:palette_c={row.event_type === 'role_grant_revoke'}
55
55
  >
56
56
  {row.event_type === 'role_grant_create' ? 'grant' : 'revoke'}
57
57
  </span>
@@ -35,7 +35,7 @@
35
35
  <h1>Active Sessions</h1>
36
36
  {#if admin_sessions.active_count > 0}
37
37
  <p>
38
- <span class="chip color_a">{admin_sessions.active_count} active</span>
38
+ <span class="chip palette_a">{admin_sessions.active_count} active</span>
39
39
  </p>
40
40
  {/if}
41
41
 
@@ -62,7 +62,7 @@
62
62
  <ConfirmButton
63
63
  onconfirm={() => admin_sessions.submit_revoke_sessions(row.account_id)}
64
64
  title="revoke all sessions for {row.username}"
65
- class="sm"
65
+ class="sized_sm"
66
66
  label="revoke sessions"
67
67
  pending={admin_sessions.revoke_sessions.loading(row.account_id)}
68
68
  />
@@ -72,7 +72,7 @@
72
72
  <ConfirmButton
73
73
  onconfirm={() => admin_sessions.submit_revoke_tokens(row.account_id)}
74
74
  title="revoke all tokens for {row.username}"
75
- class="sm"
75
+ class="sized_sm"
76
76
  label="revoke tokens"
77
77
  pending={admin_sessions.revoke_tokens.loading(row.account_id)}
78
78
  />
@@ -147,7 +147,7 @@
147
147
  disabled={false}
148
148
  aria-disabled={auth_state.verifying}
149
149
  onclick={handle_bootstrap}
150
- class={auth_state.verify_error ? 'color_c' : ''}
150
+ class={auth_state.verify_error ? 'palette_c' : ''}
151
151
  >
152
152
  create account
153
153
  </PendingButton>
@@ -130,7 +130,7 @@
130
130
  {:else}
131
131
  <button
132
132
  type="button"
133
- class="color_c bg_100"
133
+ class="palette_c background-color:var(--bg_100)"
134
134
  class:icon_button={!popover_button_content}
135
135
  onclick={() => confirm(popover)}
136
136
  title={rest.title ? `confirm ${rest.title}` : 'confirm'}
@@ -156,7 +156,7 @@
156
156
  position: sticky;
157
157
  top: 0;
158
158
  z-index: 1;
159
- background: var(--bg, Canvas);
159
+ background: var(--shade_00, Canvas);
160
160
  border-bottom: var(--border_width, 1px) solid var(--border_color);
161
161
  }
162
162
 
@@ -178,7 +178,7 @@
178
178
  }
179
179
 
180
180
  .datatable-resize-handle:hover {
181
- background: var(--color_a_10);
181
+ background: var(--palette_a_10);
182
182
  }
183
183
 
184
184
  .datatable-row {
@@ -103,7 +103,7 @@
103
103
  disabled={false}
104
104
  aria-disabled={auth_state.verifying}
105
105
  onclick={handle_login}
106
- class={auth_state.verify_error ? 'color_c' : ''}
106
+ class={auth_state.verify_error ? 'palette_c' : ''}
107
107
  >
108
108
  log in
109
109
  </PendingButton>
@@ -56,14 +56,14 @@
56
56
  const status_chip_class = (status: string): string => {
57
57
  switch (status) {
58
58
  case 'accepted':
59
- return 'chip color_b';
59
+ return 'chip palette_b';
60
60
  case 'pending':
61
- return 'chip color_a';
61
+ return 'chip palette_a';
62
62
  case 'declined':
63
63
  case 'retracted':
64
64
  case 'superseded':
65
65
  case 'expired':
66
- return 'chip color_c';
66
+ return 'chip palette_c';
67
67
  default:
68
68
  return 'chip';
69
69
  }
@@ -65,8 +65,8 @@
65
65
  <ul class="column gap_md">
66
66
  {#each role_grant_offers.incoming as offer (offer.id)}
67
67
  <li class="box p_md column gap_sm">
68
- <div class="row gap_sm align_center">
69
- <span class="chip color_a">{format_role(offer.role)}</span>
68
+ <div class="row gap_sm">
69
+ <span class="chip palette_a">{format_role(offer.role)}</span>
70
70
  <span class="text_50 font_size_sm">{scope_label(offer.scope_id, offer.role)}</span>
71
71
  <span class="text_50 font_size_sm">from {format_actor(offer.from_actor_id)}</span>
72
72
  <span
@@ -86,7 +86,7 @@
86
86
  pending={role_grant_offers.accept.loading}
87
87
  disabled={role_grant_offers.accept.loading}
88
88
  onclick={() => role_grant_offers.submit_accept(offer.id)}
89
- class="color_b"
89
+ class="palette_b"
90
90
  >
91
91
  accept
92
92
  </PendingButton>
@@ -117,7 +117,11 @@
117
117
  ></textarea>
118
118
  </label>
119
119
  <div class="row gap_sm">
120
- <button type="button" class="color_c bg_100" onclick={confirm}>
120
+ <button
121
+ type="button"
122
+ class="palette_c background-color:var(--bg_100)"
123
+ onclick={confirm}
124
+ >
121
125
  confirm decline
122
126
  </button>
123
127
  <button type="button" onclick={() => popover.hide()}>cancel</button>
@@ -142,7 +142,7 @@
142
142
  disabled={false}
143
143
  aria-disabled={auth_state.verifying}
144
144
  onclick={handle_signup}
145
- class={auth_state.verify_error ? 'color_c' : ''}
145
+ class={auth_state.verify_error ? 'palette_c' : ''}
146
146
  >
147
147
  sign up
148
148
  </PendingButton>
@@ -90,11 +90,11 @@
90
90
  };
91
91
 
92
92
  const auth_chip_class = (auth: RouteAuth): string => {
93
- if (is_public_auth(auth)) return 'chip color_b';
94
- if (is_keeper_auth(auth)) return 'chip color_c';
95
- if (is_role_auth(auth)) return 'chip color_d';
96
- if (is_credential_gated_auth(auth)) return 'chip color_e';
97
- if (is_plain_authenticated_auth(auth)) return 'chip color_a';
93
+ if (is_public_auth(auth)) return 'chip palette_b';
94
+ if (is_keeper_auth(auth)) return 'chip palette_c';
95
+ if (is_role_auth(auth)) return 'chip palette_d';
96
+ if (is_credential_gated_auth(auth)) return 'chip palette_e';
97
+ if (is_plain_authenticated_auth(auth)) return 'chip palette_a';
98
98
  return 'chip';
99
99
  };
100
100
 
@@ -107,15 +107,15 @@
107
107
  <section>
108
108
  <div class="row" style:gap="var(--space_md)" style:flex-wrap="wrap" style:align-items="center">
109
109
  <span class="chip">{surface.routes.length} routes</span>
110
- {#if summary.none > 0}<span class="chip color_b">{summary.none} public</span>{/if}
110
+ {#if summary.none > 0}<span class="chip palette_b">{summary.none} public</span>{/if}
111
111
  {#if summary.authenticated > 0}
112
- <span class="chip color_a">{summary.authenticated} authenticated</span>
112
+ <span class="chip palette_a">{summary.authenticated} authenticated</span>
113
113
  {/if}
114
- {#if role_count > 0}<span class="chip color_d">{role_count} role</span>{/if}
114
+ {#if role_count > 0}<span class="chip palette_d">{role_count} role</span>{/if}
115
115
  {#if credential_count > 0}
116
- <span class="chip color_e">{credential_count} credential-gated</span>
116
+ <span class="chip palette_e">{credential_count} credential-gated</span>
117
117
  {/if}
118
- {#if summary.keeper > 0}<span class="chip color_c">{summary.keeper} keeper</span>{/if}
118
+ {#if summary.keeper > 0}<span class="chip palette_c">{summary.keeper} keeper</span>{/if}
119
119
  <span class="chip">{surface.middleware.length} middleware</span>
120
120
  {#if rpc_method_count > 0}<span class="chip">{rpc_method_count} rpc methods</span>{/if}
121
121
  {#if ws_method_count > 0}<span class="chip">{ws_method_count} ws methods</span>{/if}
@@ -126,7 +126,7 @@
126
126
  (d: AppSurfaceDiagnostic) => d.level === 'warning'
127
127
  )}
128
128
  {#if warnings.length}
129
- <span class="chip color_e">
129
+ <span class="chip palette_e">
130
130
  {warnings.length} warning{warnings.length === 1 ? '' : 's'}
131
131
  </span>
132
132
  {/if}
@@ -391,10 +391,10 @@
391
391
  <code>{endpoint.path}</code>
392
392
  <span class="chip">{endpoint.methods.length} methods</span>
393
393
  {#each endpoint.required_roles as role (role)}
394
- <span class="chip color_d">role:{role}</span>
394
+ <span class="chip palette_d">role:{role}</span>
395
395
  {/each}
396
396
  {#each endpoint.allowed_origins as origin (origin)}
397
- <span class="chip color_b"><code>{origin}</code></span>
397
+ <span class="chip palette_b"><code>{origin}</code></span>
398
398
  {/each}
399
399
  </div>
400
400
  {#if endpoint.methods.length === 0}
@@ -473,7 +473,7 @@
473
473
  {#each surface.diagnostics as d, i (i)}
474
474
  <tr>
475
475
  <td>
476
- <span class={d.level === 'warning' ? 'chip color_e' : 'chip'}>{d.level}</span>
476
+ <span class={d.level === 'warning' ? 'chip palette_e' : 'chip'}>{d.level}</span>
477
477
  </td>
478
478
  <td><code>{d.category}</code></td>
479
479
  <td>{d.message}</td>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuzdev/fuz_app",
3
- "version": "0.121.0",
3
+ "version": "0.122.0",
4
4
  "description": "fullstack app library",
5
5
  "glyph": "🗝",
6
6
  "logo": "logo.svg",
@@ -33,6 +33,7 @@
33
33
  "peerDependencies": {
34
34
  "@electric-sql/pglite": ">=0.4",
35
35
  "@fuzdev/blake3-wasm": ">=0.2.0",
36
+ "@fuzdev/fuz_css": ">=0.65.0",
36
37
  "@fuzdev/fuz_util": ">=0.70.0",
37
38
  "@hono/node-server": ">=1",
38
39
  "@hono/node-ws": ">=1",
@@ -49,6 +50,9 @@
49
50
  "@electric-sql/pglite": {
50
51
  "optional": true
51
52
  },
53
+ "@fuzdev/fuz_css": {
54
+ "optional": true
55
+ },
52
56
  "@hono/node-server": {
53
57
  "optional": true
54
58
  },
@@ -74,10 +78,10 @@
74
78
  "devDependencies": {
75
79
  "@electric-sql/pglite": "^0.4.5",
76
80
  "@fuzdev/blake3-wasm": "^0.2.0",
77
- "@fuzdev/fuz_code": "^0.48.0",
78
- "@fuzdev/fuz_css": "^0.64.0",
79
- "@fuzdev/fuz_ui": "^0.208.0",
80
- "@fuzdev/fuz_util": "^0.70.0",
81
+ "@fuzdev/fuz_code": "^0.50.0",
82
+ "@fuzdev/fuz_css": "^0.65.0",
83
+ "@fuzdev/fuz_ui": "^0.209.0",
84
+ "@fuzdev/fuz_util": "^0.71.0",
81
85
  "@fuzdev/gro": "^0.213.0",
82
86
  "@fuzdev/mdz": "^0.3.0",
83
87
  "@hono/node-server": "^1.19.14",