@cardinali-studio/adminkit 2.2.48 → 2.2.50

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.
Files changed (64) hide show
  1. package/dist/app/App.js +6 -6
  2. package/dist/app/app.css +67 -1
  3. package/dist/app/delivery.js +7 -7
  4. package/dist/app/guide/TransferGuide.js +1 -1
  5. package/dist/app/lib/deliveries.d.ts +6 -0
  6. package/dist/app/lib/delivery-capabilities.d.ts +31 -0
  7. package/dist/app/lib/delivery-capabilities.js +115 -0
  8. package/dist/app/lib/delivery-checkpoint-pipeline.d.ts +81 -0
  9. package/dist/app/lib/delivery-checkpoint-pipeline.js +195 -0
  10. package/dist/app/lib/delivery-finalize.d.ts +21 -0
  11. package/dist/app/lib/delivery-finalize.js +42 -0
  12. package/dist/app/lib/delivery-multipart-large.d.ts +18 -0
  13. package/dist/app/lib/delivery-multipart-large.js +28 -0
  14. package/dist/app/lib/delivery-network.d.ts +7 -1
  15. package/dist/app/lib/delivery-network.js +85 -18
  16. package/dist/app/lib/delivery-part-pipeline.d.ts +79 -0
  17. package/dist/app/lib/delivery-part-pipeline.js +270 -0
  18. package/dist/app/lib/delivery-upload-coordinator.d.ts +112 -0
  19. package/dist/app/lib/delivery-upload-coordinator.js +229 -0
  20. package/dist/app/lib/delivery-upload.d.ts +19 -3
  21. package/dist/app/lib/delivery-upload.js +226 -29
  22. package/dist/app/lib/upload-queue.d.ts +5 -0
  23. package/dist/app/lib/upload-queue.js +54 -29
  24. package/dist/app/routes/Deliveries.d.ts +9 -3
  25. package/dist/app/routes/Deliveries.js +299 -164
  26. package/dist/app/routes/DeliveryDashboard.js +1 -1
  27. package/dist/app/routes/DeliveryEmail.d.ts +8 -1
  28. package/dist/app/routes/DeliveryEmail.js +63 -23
  29. package/dist/app/routes/Overview.js +5 -5
  30. package/dist/app/routes/UploadDock.js +4 -3
  31. package/dist/form/media/MediaGrid.js +1 -1
  32. package/dist/functions/_shared/b2.js +108 -19
  33. package/dist/functions/_shared/delivery-activation.js +98 -0
  34. package/dist/functions/_shared/delivery-download-bundle.js +280 -0
  35. package/dist/functions/_shared/delivery-email.js +92 -13
  36. package/dist/functions/_shared/delivery-file-names.js +19 -0
  37. package/dist/functions/_shared/delivery-finalization-paid.js +31 -0
  38. package/dist/functions/_shared/delivery-finalization-storage.js +64 -0
  39. package/dist/functions/_shared/delivery-manifest-free.js +74 -0
  40. package/dist/functions/_shared/delivery-manifest.js +277 -20
  41. package/dist/functions/_shared/delivery-multipart-verification.js +68 -0
  42. package/dist/functions/_shared/delivery-request.js +74 -0
  43. package/dist/functions/_shared/delivery-storage-access.js +14 -0
  44. package/dist/functions/_shared/delivery-upload-admission.js +221 -0
  45. package/dist/functions/_shared/delivery-upload-contract.js +44 -0
  46. package/dist/functions/_shared/delivery-upload-free.js +80 -0
  47. package/dist/functions/_shared/delivery-upload-policy.js +64 -0
  48. package/dist/functions/_shared/delivery-upload-session.js +365 -0
  49. package/dist/functions/_shared/delivery-work-budget.js +49 -0
  50. package/dist/functions/_shared/diagnostics.js +59 -0
  51. package/dist/functions/api/deliveries.js +61 -17
  52. package/dist/functions/api/delivery/multipart.js +156 -16
  53. package/dist/functions/delivery-public/assets/client.js +59 -54
  54. package/dist/functions/delivery-public/assets/delivery.css +6 -2
  55. package/dist/functions/delivery-public/index.js +43 -15
  56. package/dist/functions/delivery-public/migrations/0015_delivery_activation_intents.sql +12 -0
  57. package/dist/functions/delivery-public/migrations/0016_delivery_multipart_verification.sql +16 -0
  58. package/dist/functions/delivery-public/migrations/0017_delivery_upload_admission.sql +38 -0
  59. package/dist/functions/delivery-public/migrations/0018_delivery_upload_sessions.sql +26 -0
  60. package/dist/functions/delivery-public/migrations/0019_delivery_manifest_fragments.sql +27 -0
  61. package/dist/functions/delivery-public/migrations/0020_delivery_email_reply_to.sql +1 -0
  62. package/dist/functions/index.js +3 -1
  63. package/dist/theme.css +2 -1
  64. package/package.json +1 -1
@@ -279,9 +279,9 @@ body.is-message .dc-foot { display: none; }
279
279
  e il palcoscenico, che di contenuto non ne ha finché il JS non monta la prima foto,
280
280
  collasserebbe a due padding. */
281
281
  .dc { display: flex; flex-direction: column; align-items: stretch; }
282
- /* Le fotografie per prime: su un telefono sono ciò che si vuole vedere aprendo il link. */
282
+ /* Put the download and its expiry within reach before the cover on phones. */
283
283
  .dc-stage { order: 1; position: static; height: 54svh; min-height: 17rem; padding: 0.75rem 1rem; }
284
- .dc-info { order: 2; min-height: 0; padding: 1.75rem 1.25rem calc(var(--dc-mono) + 1.5rem); gap: 2rem; }
284
+ .dc-info { order: 0; min-height: 0; padding: 1.75rem 1.25rem calc(var(--dc-mono) + 1.5rem); gap: 2rem; }
285
285
  .dc-gallery { padding: 2.5rem 1.25rem 3rem; }
286
286
  .dc-shot--pair { width: 100%; }
287
287
  .dc-gate-row { flex-direction: column; align-items: stretch; }
@@ -295,3 +295,7 @@ body.is-message .dc-foot { display: none; }
295
295
  .dc-shot, .dc-set.is-out .dc-shot, .dc-lb-img { animation: none; opacity: 1; transform: none; }
296
296
  .dc-btn, .dc-cell img, .dc-lb-btn, .dc-gate-input { transition: none; }
297
297
  }
298
+
299
+ .dc-version { display: inline-flex; align-items: center; gap: .6em; font: inherit; font-size: .85rem; }
300
+ .dc-version select { font: inherit; color: inherit; color-scheme: inherit; min-height: 44px; max-width: 100%; background: transparent; border: 1px solid currentColor; border-radius: .4em; padding: .5em; }
301
+ .dc-version select:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@@ -1,3 +1,4 @@
1
+ import { bundleIdentity, bundleResponse, downloadSources } from "../_shared/delivery-download-bundle.js";
1
2
  import {processDeliveryEmails} from "../_shared/delivery-email.js";
2
3
  /* Consegna pubblica: /c/<token>.
3
4
  *
@@ -13,7 +14,7 @@ import {processDeliveryEmails} from "../_shared/delivery-email.js";
13
14
  */
14
15
 
15
16
  import {
16
- b2AbortMultipart, b2Delete, b2Get, b2PresignGetObject,
17
+ b2AbortMultipart, b2Delete, b2Get, b2Head, b2PresignGetObject,
17
18
  } from "../_shared/b2.js";
18
19
  import {
19
20
  DELIVERY_LINK_MIN_LENGTH, sha256, signValue, unseal, verifyValue,
@@ -147,16 +148,23 @@ async function post({ request, env, params, waitUntil }) {
147
148
  if (access.filesExpired) {
148
149
  return json({ ok: false, error: "I file di questa consegna sono scaduti" }, 410);
149
150
  }
150
- const packageId = String(body.packageId || "");
151
- const variant = body.variant === "web" ? "web" : "originals";
152
- const pkg = access.packages.find((p) => p.id === packageId);
153
- if (!pkg || (variant === "web" && !pkg.web_key) ||
154
- (variant === "originals" && (!pkg.originals_key || access.delivery.status === "archived"))) {
151
+ const requestedId = String(body.packageId || "");
152
+ let variant = body.variant || "originals";
153
+ const all = requestedId === "all";
154
+ if (!["originals", "web"].includes(variant) && !(all && variant === "available")) {
155
+ return json({ ok: false, error: "Variante non valida" }, 400);
156
+ }
157
+ const sources = downloadSources(access, variant);
158
+ if (all ? !sources.length : !sources.some(p => p.id === requestedId)) {
155
159
  return json({ ok: false, error: "Questo download non è più disponibile" }, 404);
156
160
  }
161
+ const combined = all && sources.length > 1;
162
+ const packageId = all && !combined ? sources[0].id : requestedId;
163
+ if (!combined && variant === "available") variant = sources[0].variant;
164
+ const generation = combined ? await bundleIdentity(sources) : null;
157
165
  const ticket = await signValue(env.DELIVERY_SECRET, {
158
166
  kind: "download", linkId: access.link.id, deliveryId: access.delivery.id,
159
- packageId, variant,
167
+ packageId, variant, ...(combined ? { generation } : {}),
160
168
  }, 300);
161
169
  const now = new Date().toISOString();
162
170
  await env.DB.batch([
@@ -165,7 +173,7 @@ async function post({ request, env, params, waitUntil }) {
165
173
  env.DB.prepare(`
166
174
  INSERT INTO delivery_events(delivery_id,link_id,package_id,kind,variant,created_at)
167
175
  VALUES (?,?,?,'download_started',?,?)
168
- `).bind(access.delivery.id, access.link.id, packageId, variant, now),
176
+ `).bind(access.delivery.id, access.link.id, combined ? null : packageId, variant, now),
169
177
  ]);
170
178
  if(env.DELIVERY_EMAIL_ENABLED==='true'){
171
179
  try {
@@ -220,7 +228,8 @@ async function accessFor(env, request, token) {
220
228
  SELECT
221
229
  l.id link_id,l.delivery_id,l.pin_ciphertext,l.expires_at link_expires,l.revoked_at,
222
230
  d.client_name,d.title,d.description,d.license_notes,d.cta_enabled,d.cta_label,d.cta_url,
223
- d.expires_at delivery_expires,d.files_expires_at,d.status,d.hero_json
231
+ d.expires_at delivery_expires,d.files_expires_at,d.status,d.hero_json,
232
+ EXISTS(SELECT 1 FROM delivery_packages up WHERE up.delivery_id=d.id AND up.state='uploading') AS pending_packages
224
233
  ${env.DELIVERY_DOWNLOAD_LABELS === "true" ? ",d.download_originals_label,d.download_web_label" : ""}
225
234
  FROM delivery_links l JOIN deliveries d ON d.id=l.delivery_id
226
235
  WHERE l.token_hash=? AND l.revoked_at IS NULL AND d.status IN ('uploading','active','archived')
@@ -237,7 +246,10 @@ async function accessFor(env, request, token) {
237
246
  const expiry = earliest(row.link_expires, row.delivery_expires);
238
247
  const expired = !!expiry && new Date(expiry).getTime() < Date.now();
239
248
  const packagesResult = await env.DB.prepare(`
240
- SELECT * FROM delivery_packages WHERE delivery_id=? AND state='ready' ORDER BY position
249
+ SELECT p.*,
250
+ (SELECT bytes FROM delivery_uploads WHERE package_id=p.id AND variant='originals' AND state='completed') AS originals_bytes,
251
+ (SELECT bytes FROM delivery_uploads WHERE package_id=p.id AND variant='web' AND state='completed') AS web_bytes
252
+ FROM delivery_packages p WHERE p.delivery_id=? AND p.state='ready' ORDER BY p.position,p.id
241
253
  `).bind(row.delivery_id).all();
242
254
  let authorized = !row.pin_ciphertext;
243
255
  if (!authorized) {
@@ -267,7 +279,7 @@ async function accessFor(env, request, token) {
267
279
  filesExpiresAt: row.files_expires_at, status: row.status,
268
280
  },
269
281
  packages,
270
- filesExpired,
282
+ filesExpired, pendingPackages: !!row.pending_packages,
271
283
  protectedLink: !!row.pin_ciphertext,
272
284
  heroes: await resolveHeroes(env, filesExpired ? "[]" : row.hero_json, packages),
273
285
  };
@@ -288,7 +300,7 @@ async function publicImages(env, pkg, token, after = -1) {
288
300
  async function deliveryPage(context, access, token) {
289
301
  const d = access.delivery;
290
302
  const locked = !access.authorized;
291
- const preparing = d.status === "uploading";
303
+ const preparing = !access.filesExpired && d.status !== "archived" && (d.status === "uploading" || access.pendingPackages);
292
304
  const heroes = access.heroes.map((item) => item.kind === "media"
293
305
  ? item.url
294
306
  : item.kind === "object"
@@ -317,8 +329,9 @@ async function deliveryPage(context, access, token) {
317
329
  label: p.label,
318
330
  fileCount: Number(p.file_count || 0),
319
331
  bytes: Number(p.source_bytes || 0),
332
+ originalsBytes: p.originals_bytes ?? null, webBytes: p.web_bytes ?? null,
320
333
  originals: d.status !== "archived" && !!p.originals_key,
321
- light: !!p.web_enabled && !!p.web_key,
334
+ light: !!p.web_enabled && !!p.web_key && Number(p.web_bytes) !== 22,
322
335
  ...(p.gallery_enabled ? await publicImages(context.env, p, token) : { images: [], nextCursor: null }),
323
336
  }))),
324
337
  };
@@ -446,9 +459,23 @@ async function download(env, request, access, packageId, variant) {
446
459
  ticket.variant !== variant) {
447
460
  return new Response("Download non autorizzato", { status: 401, headers: securityHeaders("text/plain; charset=utf-8") });
448
461
  }
462
+ if (packageId === "all") {
463
+ if (access.filesExpired) return new Response(null, { status: 410 });
464
+ const sources = downloadSources(access, variant);
465
+ if (!sources.length) return new Response(null, { status: 404 });
466
+ const identity = await bundleIdentity(sources);
467
+ if (identity !== ticket.generation) {
468
+ return new Response("Il transfer è cambiato. Riapri la pagina per scaricare i file aggiornati.", { status: 409 });
469
+ }
470
+ const filename = safeFilename(access.delivery.title) + (variant === "web" ? "-web" : "") + ".zip";
471
+ return bundleResponse(request, sources, {
472
+ get: (key, range) => b2Get(env, key, range),
473
+ head: key => b2Head(env, key),
474
+ }, identity, disposition(filename));
475
+ }
449
476
  const pkg = access.packages.find((p) => p.id === packageId);
450
477
  const key = variant === "web" ? pkg?.web_key : pkg?.originals_key;
451
- if (!pkg || !key) {
478
+ if (!pkg || !key || (variant === "web" ? !pkg.web_enabled : access.delivery.status === "archived")) {
452
479
  return new Response("Non disponibile", { status: 404, headers: securityHeaders("text/plain; charset=utf-8") });
453
480
  }
454
481
  const filename = `${safeFilename(pkg.label)}${variant === "web" ? "-web" : ""}.zip`;
@@ -563,7 +590,8 @@ function securityHeaders(contentType) {
563
590
  }
564
591
 
565
592
  function isReady(access) {
566
- return access.delivery.status !== "uploading" && access.packages.length > 0;
593
+ return access.filesExpired || access.delivery.status === "archived" ||
594
+ (!access.pendingPackages && access.delivery.status !== "uploading" && access.packages.length > 0);
567
595
  }
568
596
 
569
597
  /* Un browser vero manda `Sec-Fetch-Mode: navigate` quando apre una pagina; i generatori di
@@ -0,0 +1,12 @@
1
+ -- Apply only with compatible readers/workers, before enabling common finalize.
2
+ -- Merely shipping this migration does not enable the new HTTP capabilities.
3
+ CREATE TABLE IF NOT EXISTS delivery_activation_intents (
4
+ delivery_id TEXT NOT NULL REFERENCES deliveries(id) ON DELETE CASCADE,
5
+ generation TEXT NOT NULL, link_id TEXT NOT NULL, packages_json TEXT NOT NULL CHECK(length(CAST(packages_json AS BLOB))<=16384),
6
+ policy_json TEXT NOT NULL CHECK(length(CAST(policy_json AS BLOB))<=4096),
7
+ state TEXT NOT NULL DEFAULT 'pending' CHECK(state IN ('pending','preparing','prepared','cancelled','review')),
8
+ attempts INTEGER NOT NULL DEFAULT 0, created_at TEXT NOT NULL,
9
+ next_attempt_at TEXT NOT NULL, lease_token TEXT, lease_until TEXT, error_code TEXT,
10
+ PRIMARY KEY(delivery_id,generation)
11
+ );
12
+ CREATE INDEX IF NOT EXISTS delivery_activation_intents_due ON delivery_activation_intents(state,next_attempt_at);
@@ -0,0 +1,16 @@
1
+ -- Optional bounded preparation only. Apply with compatible readers before rollout.
2
+ -- This proof never substitutes the final S3 completion/checkpoint checks.
3
+ CREATE TABLE IF NOT EXISTS delivery_multipart_verification (
4
+ upload_id TEXT NOT NULL REFERENCES delivery_uploads(id) ON DELETE CASCADE,
5
+ remote_upload_id TEXT NOT NULL,
6
+ object_key TEXT NOT NULL,
7
+ expected_count INTEGER NOT NULL CHECK(expected_count BETWEEN 1 AND 10000),
8
+ expected_bytes INTEGER NOT NULL CHECK(expected_bytes BETWEEN 1 AND 167772160000),
9
+ cursor INTEGER NOT NULL DEFAULT 0,
10
+ verified_bytes INTEGER NOT NULL DEFAULT 0,
11
+ chain TEXT NOT NULL,
12
+ state TEXT NOT NULL DEFAULT 'scanning' CHECK(state IN ('scanning','verified')),
13
+ PRIMARY KEY(upload_id,remote_upload_id),
14
+ CHECK(cursor BETWEEN 0 AND expected_count),
15
+ CHECK(verified_bytes BETWEEN 0 AND expected_bytes)
16
+ );
@@ -0,0 +1,38 @@
1
+ -- Prepared only: internal accounting primitives, no public admission endpoint.
2
+ CREATE TABLE IF NOT EXISTS delivery_upload_budgets (
3
+ resource TEXT PRIMARY KEY,
4
+ period TEXT NOT NULL,
5
+ revision TEXT NOT NULL,
6
+ transfer_limit INTEGER NOT NULL CHECK(transfer_limit >= 0),
7
+ account_remaining INTEGER NOT NULL CHECK(account_remaining >= 0),
8
+ observed_used INTEGER NOT NULL CHECK(observed_used >= 0),
9
+ used INTEGER NOT NULL DEFAULT 0 CHECK(used >= 0),
10
+ reserved INTEGER NOT NULL DEFAULT 0 CHECK(reserved >= 0),
11
+ observed_at INTEGER NOT NULL,
12
+ expires_at INTEGER NOT NULL
13
+ );
14
+ CREATE TABLE IF NOT EXISTS delivery_upload_admissions (
15
+ session_id TEXT PRIMARY KEY,
16
+ plan_hash TEXT NOT NULL,
17
+ contract_json TEXT NOT NULL,
18
+ remaining_json TEXT NOT NULL,
19
+ state TEXT NOT NULL DEFAULT 'reserved' CHECK(state IN ('reserved','closed')),
20
+ decision_token TEXT NOT NULL,
21
+ lease_owner TEXT,
22
+ lease_token TEXT,
23
+ lease_until INTEGER NOT NULL DEFAULT 0,
24
+ created_at INTEGER NOT NULL
25
+ );
26
+ CREATE INDEX IF NOT EXISTS delivery_upload_admission_leases ON delivery_upload_admissions(state,lease_until);
27
+ CREATE TABLE IF NOT EXISTS delivery_upload_budget_events (
28
+ event_id TEXT PRIMARY KEY,
29
+ session_id TEXT NOT NULL,
30
+ delta_hash TEXT NOT NULL,
31
+ decision_token TEXT NOT NULL,
32
+ created_at INTEGER NOT NULL
33
+ );
34
+ -- A failed compare-and-swap rolls the whole batch back, including previous rows.
35
+ CREATE TABLE IF NOT EXISTS delivery_upload_budget_guards (
36
+ token TEXT PRIMARY KEY,
37
+ ok INTEGER NOT NULL CHECK(ok=1)
38
+ );
@@ -0,0 +1,26 @@
1
+ -- Prepared only; public coordinator and all optimized features stay disabled.
2
+ CREATE TABLE IF NOT EXISTS delivery_upload_sessions (
3
+ session_id TEXT PRIMARY KEY REFERENCES delivery_upload_admissions(session_id),
4
+ delivery_id TEXT NOT NULL,
5
+ contract_hash TEXT NOT NULL,
6
+ next_sequence INTEGER NOT NULL DEFAULT 0 CHECK(next_sequence>=0),
7
+ created_at INTEGER NOT NULL
8
+ );
9
+ CREATE TABLE IF NOT EXISTS delivery_upload_units (
10
+ session_id TEXT NOT NULL REFERENCES delivery_upload_sessions(session_id),
11
+ sequence INTEGER NOT NULL CHECK(sequence>=0),
12
+ action TEXT NOT NULL,
13
+ digest TEXT NOT NULL,
14
+ payload_json TEXT,
15
+ state TEXT NOT NULL CHECK(state IN ('running','committed','uncertain')),
16
+ execution_token TEXT NOT NULL,
17
+ attempts INTEGER NOT NULL DEFAULT 1 CHECK(attempts BETWEEN 1 AND 3),
18
+ baseline_json TEXT,
19
+ recovery_allowed INTEGER NOT NULL DEFAULT 0 CHECK(recovery_allowed IN (0,1)),
20
+ result_json TEXT,
21
+ created_at INTEGER NOT NULL,
22
+ PRIMARY KEY(session_id,sequence),
23
+ CHECK(result_json IS NULL OR length(CAST(result_json AS BLOB))<=32768)
24
+ );
25
+ CREATE UNIQUE INDEX IF NOT EXISTS delivery_upload_one_pending_unit ON delivery_upload_units(session_id)
26
+ WHERE state IN ('running','uncertain');
@@ -0,0 +1,27 @@
1
+ -- Private preparation, never a new public page format or publication proof.
2
+ -- Optional until the negotiated coordinator is explicitly rolled out.
3
+ CREATE TABLE IF NOT EXISTS delivery_manifest_read_work (
4
+ package_id TEXT NOT NULL REFERENCES delivery_manifest_state(package_id) ON DELETE CASCADE,
5
+ page_number INTEGER NOT NULL CHECK(page_number>=0),
6
+ start_cursor INTEGER NOT NULL CHECK(start_cursor>=0),
7
+ read_cursor INTEGER NOT NULL,
8
+ entry_count INTEGER NOT NULL DEFAULT 0 CHECK(entry_count BETWEEN 0 AND 200),
9
+ packed_bytes INTEGER NOT NULL DEFAULT 128 CHECK(packed_bytes BETWEEN 128 AND 262144),
10
+ wire_bytes INTEGER NOT NULL DEFAULT 0 CHECK(wire_bytes>=0),
11
+ chain TEXT NOT NULL DEFAULT '',
12
+ prepared INTEGER NOT NULL DEFAULT 0 CHECK(prepared IN (0,1)),
13
+ last_sequence INTEGER NOT NULL DEFAULT -1,
14
+ last_result TEXT,
15
+ PRIMARY KEY(package_id,page_number),
16
+ CHECK(read_cursor=start_cursor+entry_count)
17
+ );
18
+ CREATE TABLE IF NOT EXISTS delivery_manifest_read_fragments (
19
+ package_id TEXT NOT NULL,
20
+ page_number INTEGER NOT NULL,
21
+ start_cursor INTEGER NOT NULL,
22
+ end_cursor INTEGER NOT NULL CHECK(end_cursor>start_cursor),
23
+ rows_json TEXT NOT NULL CHECK(length(CAST(rows_json AS BLOB))<=12288),
24
+ digest TEXT NOT NULL CHECK(length(digest)=64),
25
+ PRIMARY KEY(package_id,page_number,start_cursor),
26
+ FOREIGN KEY(package_id,page_number) REFERENCES delivery_manifest_read_work(package_id,page_number) ON DELETE CASCADE
27
+ );
@@ -0,0 +1 @@
1
+ ALTER TABLE delivery_email_preferences ADD COLUMN reply_to_email TEXT NOT NULL DEFAULT '';
@@ -23,6 +23,7 @@
23
23
  * dov'è senza inventare nessun punto di innesto.
24
24
  */
25
25
  import { setServerConfig, moduleEnabled, contentPersistenceMode } from "./site.js";
26
+ import { deliveryWaitUntil } from './_shared/delivery-activation.js';
26
27
 
27
28
  import * as analytics from "./api/analytics.js";
28
29
  import * as assets from "./api/assets.js";
@@ -137,5 +138,6 @@ export async function handleAdminApi(context, config) {
137
138
  return json({ ok: false, error: "metodo non ammesso" }, 405);
138
139
  }
139
140
 
140
- return handler({ ...context, config });
141
+ const waitUntil = deliveryWaitUntil(context);
142
+ return handler({ ...context, config, ...(waitUntil ? { waitUntil } : {}) });
141
143
  }
package/dist/theme.css CHANGED
@@ -425,7 +425,8 @@ a.ak-btn { text-decoration: none; display: inline-flex; align-items: center; }
425
425
  border: 1px solid var(--ak-line); background: rgba(255, 255, 255, .94);
426
426
  font: 700 12px/1 var(--ak-font); color: var(--ak-accent-ink);
427
427
  }
428
- .mg-item:hover .mg-check, .mg-item.is-on .mg-check { display: flex; }
428
+ .mb-modal .mg-check, .mg-item:hover .mg-check, .mg-item.is-on .mg-check { display: flex; }
429
+ .mb-modal .mg-check:focus-visible { outline: 2px solid var(--ak-accent); outline-offset: 2px; }
429
430
  .mg-item.is-on .mg-check { background: var(--ak-accent); border-color: var(--ak-accent); }
430
431
  .mg-cap {
431
432
  font: 400 11px/1.3 var(--ak-font); color: var(--ak-ink-quiet); text-align: center;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cardinali-studio/adminkit",
3
- "version": "2.2.48",
3
+ "version": "2.2.50",
4
4
  "type": "module",
5
5
  "description": "Motore riusabile di un pannello di amministrazione per siti Hugo su Cloudflare Pages: codec del front matter guidato dallo schema, form React, libreria media su R2. NIENTE di specifico di un sito qui dentro.",
6
6
  "license": "0BSD",