@bkazemi/verily 0.7.0 → 0.8.1

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 (48) hide show
  1. package/README.md +183 -94
  2. package/dist/browser/mark.d.ts +2 -6
  3. package/dist/browser/mark.js +6 -12
  4. package/dist/browser/provider-mark.d.ts +3 -3
  5. package/dist/browser/provider-mark.js +15 -90
  6. package/dist/instance/auth.d.ts +14 -0
  7. package/dist/instance/auth.js +80 -0
  8. package/dist/instance/bin.d.ts +2 -0
  9. package/dist/instance/bin.js +36 -0
  10. package/dist/instance/cloudflare.d.ts +57 -0
  11. package/dist/instance/cloudflare.js +71 -0
  12. package/dist/instance/env.d.ts +51 -0
  13. package/dist/instance/env.js +84 -0
  14. package/dist/instance/index.d.ts +136 -0
  15. package/dist/instance/index.js +777 -0
  16. package/dist/instance/init.d.ts +6 -0
  17. package/dist/instance/init.js +28 -0
  18. package/dist/instance/limits.d.ts +30 -0
  19. package/dist/instance/limits.js +45 -0
  20. package/dist/instance/node.d.ts +13 -0
  21. package/dist/instance/node.js +43 -0
  22. package/dist/instance/page.d.ts +18 -0
  23. package/dist/instance/page.js +30 -0
  24. package/dist/instance/postgres.d.ts +19 -0
  25. package/dist/instance/postgres.js +83 -0
  26. package/dist/instance/routes.d.ts +7 -0
  27. package/dist/instance/routes.js +22 -0
  28. package/dist/instance/serve.d.ts +31 -0
  29. package/dist/instance/serve.js +49 -0
  30. package/dist/instance/sites.d.ts +169 -0
  31. package/dist/instance/sites.js +413 -0
  32. package/dist/instance/starter.d.ts +6 -0
  33. package/dist/instance/starter.js +99 -0
  34. package/dist/instance/store.d.ts +20 -0
  35. package/dist/instance/store.js +11 -0
  36. package/dist/instance/undici.d.ts +8 -0
  37. package/dist/instance/undici.js +9 -0
  38. package/dist/marks.d.ts +44 -0
  39. package/dist/marks.js +98 -0
  40. package/dist/server/index.js +46 -67
  41. package/dist/server/render.d.ts +49 -0
  42. package/dist/server/render.js +104 -0
  43. package/dist/server/style.d.ts +1 -1
  44. package/dist/server/style.js +145 -1
  45. package/dist/verily.js +96 -104
  46. package/dist/version.d.ts +1 -1
  47. package/dist/version.js +1 -1
  48. package/package.json +30 -2
@@ -15,6 +15,7 @@ export const stylesheet = `:root {
15
15
  --surface: #fff;
16
16
  --raised: #f7f9f7;
17
17
  --accent: #245f43;
18
+ --warn: #a4442b;
18
19
  color-scheme: light dark;
19
20
  accent-color: var(--accent);
20
21
  }
@@ -27,6 +28,7 @@ export const stylesheet = `:root {
27
28
  --surface: #161a18;
28
29
  --raised: #1d2220;
29
30
  --accent: #7fc4a2;
31
+ --warn: #e59a82;
30
32
  }
31
33
  }
32
34
 
@@ -74,6 +76,13 @@ h1 {
74
76
  */
75
77
  main.single h1 { margin-bottom: 1.25rem; padding-bottom: 0; border-bottom: none; }
76
78
 
79
+ /*
80
+ * A page holding one thing sits in the middle of the window rather than at its top,
81
+ * where it would leave most of the window empty below it.
82
+ */
83
+ body:has(main.single) { display: flex; min-height: 100vh; min-height: 100dvh; }
84
+ main.single { width: 100%; max-width: 24rem; margin: auto; padding-bottom: 3rem; }
85
+
77
86
  h2 { margin: 2rem 0 .75rem; font-size: 1.125rem; font-weight: 620; letter-spacing: -.01em; }
78
87
 
79
88
  h3 { margin: 0 0 .5rem; font-size: 1rem; font-weight: 620; }
@@ -179,6 +188,9 @@ main:has(.accounts) { max-width: 54rem; }
179
188
  letter-spacing: .02em;
180
189
  }
181
190
 
191
+ /* A provider's mark before its name, at the height of the letters. */
192
+ .who .provider { display: inline-block; width: .875rem; height: .875rem; margin-right: .375rem; vertical-align: -.125rem; }
193
+
182
194
  /* Clipped 4px left of the text, which hides the date's dot when the date wraps to a new line. */
183
195
  .name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 1rem; margin: 0 0 0 -4px; padding-left: 4px; overflow-x: clip; font-size: 1.0625rem; font-weight: 620; letter-spacing: -.01em; }
184
196
 
@@ -228,6 +240,10 @@ dd { margin: 0; font-variant-numeric: tabular-nums; }
228
240
  section dl { margin: .5rem 0 1rem; padding-top: 0; border-top: 0; }
229
241
  .side dl { margin: .625rem 0 0; padding-top: .625rem; }
230
242
 
243
+ /* The links under a record, ruled off from the record and its disclaimer. */
244
+ footer { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
245
+ footer > :last-child { margin-bottom: 0; }
246
+
231
247
  section {
232
248
  margin: 0 0 1.25rem;
233
249
  padding: 1.25rem 1.375rem;
@@ -264,12 +280,140 @@ button {
264
280
  border-radius: 6px;
265
281
  background: var(--accent);
266
282
  color: var(--surface);
267
- font: 500 .9375rem/1.4 inherit;
283
+ font: 500 .9375rem/1.4 system-ui, -apple-system, 'Segoe UI', sans-serif;
268
284
  cursor: pointer;
269
285
  }
270
286
 
287
+ /* A link that starts something, drawn as a button. */
288
+ a.button {
289
+ display: inline-block;
290
+ padding: .5rem 1rem;
291
+ border: 1px solid var(--accent);
292
+ border-radius: 6px;
293
+ background: var(--accent);
294
+ color: var(--surface);
295
+ font-weight: 500;
296
+ font-size: .9375rem;
297
+ line-height: 1.4;
298
+ text-decoration: none;
299
+ }
300
+
271
301
  button + button { margin-left: .5rem; border-color: var(--line); background: none; color: var(--ink); }
272
302
 
303
+ /* The other choice beside a page's one action, such as Cancel. */
304
+ a.button.secondary { border-color: var(--line); background: none; color: var(--ink); }
305
+
306
+ /* A page's action and its alternative, side by side. */
307
+ .choice { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
308
+ .choice form { margin: 0; }
309
+
310
+ /* Ways to verify: one full-width button per method, none filled over the others. */
311
+ .choices { display: grid; gap: .5rem; margin-bottom: 1.5rem; }
312
+ .choices form { margin: 0; }
313
+
314
+ .choices button {
315
+ width: 100%;
316
+ text-align: left;
317
+ border-color: var(--line);
318
+ background: var(--surface);
319
+ color: var(--ink);
320
+ }
321
+
322
+ .choices button:hover { border-color: var(--muted); }
323
+
324
+ /* A provider's mark before a button's label, at the height of the letters. */
325
+ button .provider { width: 1rem; height: 1rem; margin-right: .5rem; vertical-align: -.1875rem; }
326
+
327
+ /* A control that ends something. Filled where it is the page's one action. */
328
+ button.danger { border-color: var(--warn); background: var(--warn); }
329
+
330
+ /*
331
+ * A connection on the settings page: the account's card, then what can be done with it.
332
+ * Its state sits in the card's corner, on the line that names the method.
333
+ */
334
+ .connection { position: relative; margin-bottom: 1rem; }
335
+
336
+ .state {
337
+ position: absolute;
338
+ top: .75rem;
339
+ right: .875rem;
340
+ display: flex;
341
+ align-items: center;
342
+ gap: .375rem;
343
+ height: 1.625rem;
344
+ padding: 0 .75rem 0 .5rem;
345
+ border: 1px solid var(--line);
346
+ border-radius: 999px;
347
+ background: var(--surface);
348
+ color: var(--ink);
349
+ font-size: .8125rem;
350
+ font-weight: 550;
351
+ }
352
+
353
+ /*
354
+ * The V the badge draws, in the tone that says how the record stands. A record that claims
355
+ * nothing is drawn faint in the text colour, as the badge draws it.
356
+ */
357
+ .verdict { flex-shrink: 0; width: 1rem; height: 1rem; }
358
+ .verdict.pending { opacity: .45; }
359
+ .how .verdict { width: .875rem; height: .875rem; margin-right: .3125rem; vertical-align: -.125rem; }
360
+ /* Cropped to its strokes and taller than the heading's letters, centred beside them. */
361
+ h1:has(.verdict) { display: flex; align-items: center; gap: .75rem; }
362
+ h1 .verdict { width: auto; height: 2.25rem; }
363
+
364
+ /*
365
+ * In a state pill the V is cropped to its strokes and fills the pill's height, so its arms
366
+ * and its foot meet the border. The pill's left padding keeps the arms clear of its curve.
367
+ */
368
+ .state .verdict { width: auto; height: 100%; }
369
+
370
+ /*
371
+ * A pill's line includes room for descenders below the letters, which leaves its text
372
+ * sitting high. Trimmed to the letters, the padding alone sets the space above and below.
373
+ * In a state pill the word alone is trimmed, so it centres on the V by its letters.
374
+ */
375
+ @supports (text-box: trim-both cap alphabetic) {
376
+ .listing { padding: .3125rem .5rem; text-box: trim-both cap alphabetic; }
377
+ .state > span { text-box: trim-both cap alphabetic; }
378
+ }
379
+
380
+ /* Links that sit together on one line, wrapping where there is no room. */
381
+ .links { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; font-size: .875rem; }
382
+
383
+ /* Under the account's id, with the facts about it rather than the controls. */
384
+ .evidence { margin: .375rem 0 0; font-size: .8125rem; }
385
+
386
+ .connection dl { margin-bottom: .75rem; }
387
+ .connection .side > :last-child { margin-bottom: 0; }
388
+ .connection pre { margin: .75rem 0; background: var(--surface); }
389
+ .connection .actions { margin-top: .875rem; }
390
+
391
+ /* The buttons for one connection in a row, wrapping where there is no room. */
392
+ .actions { display: flex; flex-wrap: wrap; gap: .5rem; }
393
+ .actions form { display: contents; }
394
+
395
+ .actions button, .actions a.button {
396
+ margin: 0;
397
+ padding: .3125rem .75rem;
398
+ border-color: var(--line);
399
+ background: var(--surface);
400
+ color: var(--ink);
401
+ font-size: .8125rem;
402
+ }
403
+
404
+ .actions button:hover, .actions a.button:hover { border-color: var(--muted); }
405
+
406
+ /* The controls that cannot be undone, together at the foot of the card. */
407
+ .ending { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--line); }
408
+ .ending form { margin: 0; }
409
+
410
+ .ending button.danger {
411
+ padding: .3125rem .75rem;
412
+ background: var(--surface);
413
+ color: var(--warn);
414
+ font-size: .8125rem;
415
+ }
416
+
273
417
  fieldset { margin: 0 0 1.25rem; padding: 1rem 1.125rem .25rem; border: 1px solid var(--line); border-radius: 8px; }
274
418
 
275
419
  legend { padding: 0 .375rem; color: var(--muted); font-size: .8125rem; }
package/dist/verily.js CHANGED
@@ -9627,9 +9627,9 @@ var Verily = (() => {
9627
9627
  async function read(signed) {
9628
9628
  if (typeof signed !== "string" || signed.length > maxSignedLength) return void 0;
9629
9629
  const text = signed.trim();
9630
- const lines2 = text.split(/\r?\n/);
9631
- const only = (line) => lines2.indexOf(line) === lines2.lastIndexOf(line);
9632
- if (lines2[0] !== "-----BEGIN PGP SIGNED MESSAGE-----" || lines2.at(-1) !== "-----END PGP SIGNATURE-----" || !lines2.includes("-----BEGIN PGP SIGNATURE-----") || ![lines2[0], lines2.at(-1), "-----BEGIN PGP SIGNATURE-----"].every(only))
9630
+ const lines = text.split(/\r?\n/);
9631
+ const only = (line) => lines.indexOf(line) === lines.lastIndexOf(line);
9632
+ if (lines[0] !== "-----BEGIN PGP SIGNED MESSAGE-----" || lines.at(-1) !== "-----END PGP SIGNATURE-----" || !lines.includes("-----BEGIN PGP SIGNATURE-----") || ![lines[0], lines.at(-1), "-----BEGIN PGP SIGNATURE-----"].every(only))
9633
9633
  return void 0;
9634
9634
  try {
9635
9635
  const { pgp, config } = await library();
@@ -9825,12 +9825,75 @@ var Verily = (() => {
9825
9825
  return attestation.hosted ? where : `${where} | Last checked ${when(attestation.confirmedAt)}`;
9826
9826
  }
9827
9827
 
9828
- // src/browser/mark.ts
9828
+ // src/marks.ts
9829
+ var github = {
9830
+ viewBox: "0 0 16 16",
9831
+ paths: [
9832
+ "M6.766 11.328c-2.063-.25-3.516-1.734-3.516-3.656 0-.781.281-1.625.75-2.188-.203-.515-.172-1.609.063-2.062.625-.078 1.468.25 1.968.703.594-.187 1.219-.281 1.985-.281.765 0 1.39.094 1.953.265.484-.437 1.344-.765 1.969-.687.218.422.25 1.515.046 2.047.5.593.766 1.39.766 2.203 0 1.922-1.453 3.375-3.547 3.64.531.344.89 1.094.89 1.954v1.625c0 .468.391.734.86.547C13.781 14.359 16 11.53 16 8.03 16 3.61 12.406 0 7.984 0 3.563 0 0 3.61 0 8.031a7.88 7.88 0 0 0 5.172 7.422c.422.156.828-.125.828-.547v-1.25c-.219.094-.5.156-.75.156-1.031 0-1.64-.562-2.078-1.609-.172-.422-.36-.672-.719-.719-.187-.015-.25-.093-.25-.187 0-.188.313-.328.625-.328.453 0 .844.281 1.25.86.313.452.64.655 1.031.655s.641-.14 1-.5c.266-.265.47-.5.657-.656"
9833
+ ]
9834
+ };
9835
+ var discord = {
9836
+ viewBox: "0 0 24 24",
9837
+ paths: [
9838
+ "M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"
9839
+ ]
9840
+ };
9841
+ var youtube = {
9842
+ viewBox: "0 0 24 24",
9843
+ paths: [
9844
+ "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"
9845
+ ]
9846
+ };
9847
+ var key = {
9848
+ viewBox: "0 0 16 16",
9849
+ stroke: true,
9850
+ paths: [
9851
+ "M7.4 8.6a3.3 3.3 0 1 0-4.7 4.7 3.3 3.3 0 0 0 4.7-4.7Z",
9852
+ "M7.4 8.6 14 2",
9853
+ "M11.2 4.8l1.6 1.6",
9854
+ "M9.4 6.6l1.6 1.6"
9855
+ ]
9856
+ };
9857
+ var globe = {
9858
+ viewBox: "0 0 16 16",
9859
+ stroke: true,
9860
+ paths: [
9861
+ "M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Z",
9862
+ "M1.5 8h13",
9863
+ "M8 1.5C6.1 3.3 5.1 5.5 5.1 8s1 4.7 2.9 6.5",
9864
+ "M8 1.5c1.9 1.8 2.9 4 2.9 6.5s-1 4.7-2.9 6.5"
9865
+ ]
9866
+ };
9867
+ var envelope = {
9868
+ viewBox: "0 0 16 16",
9869
+ stroke: true,
9870
+ paths: ["M2 3.5h12v9H2z", "M2.4 4l5.6 4.6L13.6 4"]
9871
+ };
9872
+ var marks2 = { github, discord, youtube, openpgp: key, email: envelope };
9873
+ function markOf(provider, method) {
9874
+ return marks2[provider] ?? (["backlink", "dns", "wellknown"].includes(method ?? "") ? globe : void 0);
9875
+ }
9876
+ var pathAttributes = (mark) => mark.stroke ? [
9877
+ ["stroke", "currentColor"],
9878
+ ["stroke-width", "1.6"],
9879
+ ["stroke-linecap", "round"],
9880
+ ["stroke-linejoin", "round"]
9881
+ ] : [];
9829
9882
  var tones = {
9830
9883
  current: ["#D3444C", "#149766"],
9831
9884
  inactive: ["#149766", "#D3444C"],
9832
9885
  pending: ["currentColor", "currentColor"]
9833
9886
  };
9887
+ var verification = {
9888
+ viewBox: "-4 -4 264 264",
9889
+ /** The box around the strokes alone: the arms' squared ends and the mitred foot. */
9890
+ strokes: "25.6 29.1 204.8 228",
9891
+ path: "M40 36 128 220 216 36",
9892
+ /** The check's stretch of the V, as a dash along a path measured as 176 long. */
9893
+ check: { pathLength: "176", "stroke-dasharray": "108 176", "stroke-dashoffset": "-54" }
9894
+ };
9895
+
9896
+ // src/browser/mark.ts
9834
9897
  var markStyles = `
9835
9898
  @media (prefers-reduced-motion: no-preference) {
9836
9899
  .mark.current path:last-child { animation: verily-draw .8s cubic-bezier(.65, 0, .35, 1) .1s backwards; }
@@ -9846,20 +9909,18 @@ var Verily = (() => {
9846
9909
  function verificationMark(tone = "current") {
9847
9910
  const namespace2 = "http://www.w3.org/2000/svg";
9848
9911
  const svg = document.createElementNS(namespace2, "svg");
9849
- svg.setAttribute("viewBox", "-4 -4 264 264");
9912
+ svg.setAttribute("viewBox", verification.viewBox);
9850
9913
  svg.setAttribute("fill", "none");
9851
9914
  svg.setAttribute("aria-hidden", "true");
9852
9915
  svg.setAttribute("focusable", "false");
9853
9916
  for (const layer of [0, 1]) {
9854
9917
  const path = document.createElementNS(namespace2, "path");
9855
- path.setAttribute("d", "M40 36 128 220 216 36");
9918
+ path.setAttribute("d", verification.path);
9856
9919
  path.setAttribute("stroke-width", "32");
9857
9920
  path.setAttribute("stroke-linejoin", "miter");
9858
- if (layer === 1) {
9859
- path.setAttribute("pathLength", "176");
9860
- path.setAttribute("stroke-dasharray", "108 176");
9861
- path.setAttribute("stroke-dashoffset", "-54");
9862
- }
9921
+ if (layer === 1)
9922
+ for (const [name, value] of Object.entries(verification.check))
9923
+ path.setAttribute(name, value);
9863
9924
  svg.append(path);
9864
9925
  }
9865
9926
  paintMark(svg, tone);
@@ -9896,92 +9957,23 @@ var Verily = (() => {
9896
9957
 
9897
9958
  // src/browser/provider-mark.ts
9898
9959
  var namespace = "http://www.w3.org/2000/svg";
9899
- function mark() {
9960
+ function providerMark(provider, method) {
9961
+ const mark = markOf(provider, method);
9962
+ if (!mark) return void 0;
9900
9963
  const svg = document.createElementNS(namespace, "svg");
9901
- svg.setAttribute("viewBox", "0 0 16 16");
9964
+ svg.setAttribute("viewBox", mark.viewBox);
9902
9965
  svg.setAttribute("class", "provider");
9903
9966
  svg.setAttribute("aria-hidden", "true");
9904
9967
  svg.setAttribute("focusable", "false");
9905
- return svg;
9906
- }
9907
- function github() {
9908
- const svg = mark();
9909
- const path = document.createElementNS(namespace, "path");
9910
- svg.setAttribute("fill", "currentColor");
9911
- path.setAttribute(
9912
- "d",
9913
- "M6.766 11.328c-2.063-.25-3.516-1.734-3.516-3.656 0-.781.281-1.625.75-2.188-.203-.515-.172-1.609.063-2.062.625-.078 1.468.25 1.968.703.594-.187 1.219-.281 1.985-.281.765 0 1.39.094 1.953.265.484-.437 1.344-.765 1.969-.687.218.422.25 1.515.046 2.047.5.593.766 1.39.766 2.203 0 1.922-1.453 3.375-3.547 3.64.531.344.89 1.094.89 1.954v1.625c0 .468.391.734.86.547C13.781 14.359 16 11.53 16 8.03 16 3.61 12.406 0 7.984 0 3.563 0 0 3.61 0 8.031a7.88 7.88 0 0 0 5.172 7.422c.422.156.828-.125.828-.547v-1.25c-.219.094-.5.156-.75.156-1.031 0-1.64-.562-2.078-1.609-.172-.422-.36-.672-.719-.719-.187-.015-.25-.093-.25-.187 0-.188.313-.328.625-.328.453 0 .844.281 1.25.86.313.452.64.655 1.031.655s.641-.14 1-.5c.266-.265.47-.5.657-.656"
9914
- );
9915
- svg.append(path);
9916
- return svg;
9917
- }
9918
- function discord() {
9919
- const svg = mark();
9920
- const path = document.createElementNS(namespace, "path");
9921
- svg.setAttribute("viewBox", "0 0 24 24");
9922
- svg.setAttribute("fill", "currentColor");
9923
- path.setAttribute(
9924
- "d",
9925
- "M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"
9926
- );
9927
- svg.append(path);
9928
- return svg;
9929
- }
9930
- function youtube() {
9931
- const svg = mark();
9932
- const path = document.createElementNS(namespace, "path");
9933
- svg.setAttribute("viewBox", "0 0 24 24");
9934
- svg.setAttribute("fill", "currentColor");
9935
- path.setAttribute(
9936
- "d",
9937
- "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"
9938
- );
9939
- svg.append(path);
9940
- return svg;
9941
- }
9942
- function key() {
9943
- return lines([
9944
- "M7.4 8.6a3.3 3.3 0 1 0-4.7 4.7 3.3 3.3 0 0 0 4.7-4.7Z",
9945
- "M7.4 8.6 14 2",
9946
- "M11.2 4.8l1.6 1.6",
9947
- "M9.4 6.6l1.6 1.6"
9948
- ]);
9949
- }
9950
- function globe() {
9951
- return lines([
9952
- "M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Z",
9953
- "M1.5 8h13",
9954
- "M8 1.5C6.1 3.3 5.1 5.5 5.1 8s1 4.7 2.9 6.5",
9955
- "M8 1.5c1.9 1.8 2.9 4 2.9 6.5s-1 4.7-2.9 6.5"
9956
- ]);
9957
- }
9958
- function envelope() {
9959
- return lines(["M2 3.5h12v9H2z", "M2.4 4l5.6 4.6L13.6 4"]);
9960
- }
9961
- function lines(paths) {
9962
- const svg = mark();
9963
- svg.setAttribute("fill", "none");
9964
- for (const d2 of paths) {
9968
+ svg.setAttribute("fill", mark.stroke ? "none" : "currentColor");
9969
+ for (const d2 of mark.paths) {
9965
9970
  const path = document.createElementNS(namespace, "path");
9966
9971
  path.setAttribute("d", d2);
9967
- path.setAttribute("stroke", "currentColor");
9968
- path.setAttribute("stroke-width", "1.6");
9969
- path.setAttribute("stroke-linecap", "round");
9970
- path.setAttribute("stroke-linejoin", "round");
9972
+ for (const [name, value] of pathAttributes(mark)) path.setAttribute(name, value);
9971
9973
  svg.append(path);
9972
9974
  }
9973
9975
  return svg;
9974
9976
  }
9975
- function providerMark(provider, method) {
9976
- const marks2 = {
9977
- github,
9978
- discord,
9979
- youtube,
9980
- openpgp: key,
9981
- email: envelope
9982
- };
9983
- return marks2[provider]?.() ?? (["backlink", "dns", "wellknown"].includes(method ?? "") ? globe() : void 0);
9984
- }
9985
9977
 
9986
9978
  // src/browser/badge.ts
9987
9979
  var styles = `
@@ -10134,8 +10126,8 @@ var Verily = (() => {
10134
10126
  }
10135
10127
  function renderBadgePending(element) {
10136
10128
  if (intact(element) && messages.get(element) === pendingKey) return;
10137
- const { pill, mark: mark2 } = frame(element, "pending");
10138
- paintMark(mark2, "pending");
10129
+ const { pill, mark } = frame(element, "pending");
10130
+ paintMark(mark, "pending");
10139
10131
  pill.setAttribute("role", "status");
10140
10132
  pill.setAttribute("aria-label", "Checking verification");
10141
10133
  const divider = span("divider", "");
@@ -10147,8 +10139,8 @@ var Verily = (() => {
10147
10139
  }
10148
10140
  function renderBadgeMessage(element, message) {
10149
10141
  if (intact(element) && messages.get(element) === message) return;
10150
- const { pill, mark: mark2 } = frame(element, "message");
10151
- paintMark(mark2, "inactive");
10142
+ const { pill, mark } = frame(element, "message");
10143
+ paintMark(mark, "inactive");
10152
10144
  pill.setAttribute("tabindex", "0");
10153
10145
  pill.setAttribute("role", "status");
10154
10146
  pill.setAttribute("aria-label", message);
@@ -10175,11 +10167,11 @@ var Verily = (() => {
10175
10167
  const key2 = renderKey(evidence, current, label, more, linked, rows, peek, href);
10176
10168
  if (intact(element) && shown.get(element) === key2) return null;
10177
10169
  const handle = externalName(evidence.external);
10178
- const { pill: badge, mark: mark2 } = frame(element, state, !linked);
10170
+ const { pill: badge, mark } = frame(element, state, !linked);
10179
10171
  const unnamed = Math.max(more - rows.length, 0);
10180
10172
  const named = rows.map((row) => `, ${row.providerName} ${externalName(row.external)}`).join("");
10181
10173
  const others = `${named}${unnamed ? ` and ${unnamed} more` : ""}`;
10182
- paintMark(mark2, current ? "current" : retired ? "pending" : "inactive");
10174
+ paintMark(mark, current ? "current" : retired ? "pending" : "inactive");
10183
10175
  if (linked) {
10184
10176
  badge.href = href;
10185
10177
  badge.rel = "noreferrer";
@@ -10316,9 +10308,9 @@ var Verily = (() => {
10316
10308
  panel.style.left = `${Math.max(edge, Math.min(at2.left, innerWidth - edge - size.width))}px`;
10317
10309
  }
10318
10310
  function renderConnectPill(element) {
10319
- const { pill, mark: mark2 } = frame(element, "connect");
10311
+ const { pill, mark } = frame(element, "connect");
10320
10312
  const button2 = pill;
10321
- paintMark(mark2, "pending");
10313
+ paintMark(mark, "pending");
10322
10314
  button2.type = "button";
10323
10315
  const divider = span("divider", "");
10324
10316
  divider.setAttribute("aria-hidden", "true");
@@ -10528,7 +10520,7 @@ ${claims(evidence)}`;
10528
10520
  }
10529
10521
 
10530
10522
  // src/version.ts
10531
- var version = "v0.7.0";
10523
+ var version = "v0.8.1";
10532
10524
 
10533
10525
  // src/browser/evidence-dialog.ts
10534
10526
  function stampLink() {
@@ -10828,14 +10820,14 @@ ${claims(evidence)}`;
10828
10820
  return control;
10829
10821
  };
10830
10822
  const [named] = removable(evidence);
10831
- const { mark: mark2 } = manage;
10832
- const listable = mark2 !== void 0 && named !== void 0 && !["revoked", "retired"].includes(evidence.status);
10823
+ const { mark } = manage;
10824
+ const listable = mark !== void 0 && named !== void 0 && !["revoked", "retired"].includes(evidence.status);
10833
10825
  const list = (label, as2) => {
10834
10826
  const control = act(label);
10835
10827
  control.onclick = async () => {
10836
10828
  for (const other of row.children) other.disabled = true;
10837
10829
  try {
10838
- await mark2(named, as2);
10830
+ await mark(named, as2);
10839
10831
  } catch {
10840
10832
  offer("That did not go through.");
10841
10833
  }
@@ -10910,7 +10902,7 @@ ${claims(evidence)}`;
10910
10902
  );
10911
10903
  }
10912
10904
  function signedMark(evidence, later, warned) {
10913
- const mark2 = node("span");
10905
+ const mark = node("span");
10914
10906
  const link = outward(node("a", "signed", "signed"), `${evidence.evidenceUrl}#signed`);
10915
10907
  const see = "See the signature (opens in a new tab)";
10916
10908
  const settle = (results) => {
@@ -10919,14 +10911,14 @@ ${claims(evidence)}`;
10919
10911
  const warning = node("span", "bad signature", "signed bad");
10920
10912
  warning.setAttribute("role", "alert");
10921
10913
  warning.title = `This record does not match the signature ${evidence.verifierName} put on it, so it may have been altered. Do not rely on it.`;
10922
- mark2.replaceChildren(warning);
10914
+ mark.replaceChildren(warning);
10923
10915
  warned();
10924
10916
  return;
10925
10917
  }
10926
10918
  if (first?.state === "valid" && results.every((result) => result.state === "valid")) {
10927
10919
  link.textContent = "signed";
10928
10920
  link.title = `Signature checked in this browser against the keys ${new URL(evidence.evidenceUrl).host} publishes (key ${first.keyId}). ${see}`;
10929
- mark2.replaceChildren(link);
10921
+ mark.replaceChildren(link);
10930
10922
  return;
10931
10923
  }
10932
10924
  const why = results.find((result) => result.state === "unchecked");
@@ -10939,11 +10931,11 @@ ${claims(evidence)}`;
10939
10931
  link.textContent = "signed";
10940
10932
  link.append(caution);
10941
10933
  link.title = `${reason} ${see}`;
10942
- mark2.replaceChildren(link);
10934
+ mark.replaceChildren(link);
10943
10935
  if (why) later(() => void signatures(evidence).then(settle));
10944
10936
  };
10945
10937
  void signatures(evidence).then(settle);
10946
- return mark2;
10938
+ return mark;
10947
10939
  }
10948
10940
  function cautionMark() {
10949
10941
  const namespace2 = "http://www.w3.org/2000/svg";
package/dist/version.d.ts CHANGED
@@ -7,4 +7,4 @@
7
7
  * output stays what tsc emitted and nothing has to be substituted into it. A version bump
8
8
  * changes this line with package.json.
9
9
  */
10
- export declare const version = "v0.7.0";
10
+ export declare const version = "v0.8.1";
package/dist/version.js CHANGED
@@ -7,4 +7,4 @@
7
7
  * output stays what tsc emitted and nothing has to be substituted into it. A version bump
8
8
  * changes this line with package.json.
9
9
  */
10
- export const version = 'v0.7.0';
10
+ export const version = 'v0.8.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bkazemi/verily",
3
- "version": "0.7.0",
3
+ "version": "0.8.1",
4
4
  "description": "Self-hosted account-to-account verification for Node.js",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -30,7 +30,8 @@
30
30
  "preview": "npm run build && tsx example/preview.ts",
31
31
  "cloudflare:dev": "wrangler dev --local",
32
32
  "cloudflare:check": "wrangler deploy --dry-run --outdir .wrangler/build",
33
- "cloudflare:deploy": "wrangler deploy"
33
+ "starter:check": "rm -rf .wrangler/starter && node dist/instance/bin.js init cloudflare .wrangler/starter && wrangler deploy --dry-run --config .wrangler/starter/wrangler.jsonc --outdir .wrangler/starter-build",
34
+ "release:deploy": "wrangler deploy"
34
35
  },
35
36
  "devDependencies": {
36
37
  "@cloudflare/workers-types": "^5.20260915.1",
@@ -62,6 +63,9 @@
62
63
  "dist",
63
64
  "docs/licenses"
64
65
  ],
66
+ "bin": {
67
+ "verily": "./dist/instance/bin.js"
68
+ },
65
69
  "exports": {
66
70
  ".": {
67
71
  "browser": {
@@ -81,6 +85,30 @@
81
85
  "types": "./dist/site/index.d.ts",
82
86
  "default": "./dist/site/index.js"
83
87
  },
88
+ "./instance": {
89
+ "types": "./dist/instance/index.d.ts",
90
+ "default": "./dist/instance/index.js"
91
+ },
92
+ "./instance/node": {
93
+ "types": "./dist/instance/node.d.ts",
94
+ "default": "./dist/instance/node.js"
95
+ },
96
+ "./instance/postgres": {
97
+ "types": "./dist/instance/postgres.d.ts",
98
+ "default": "./dist/instance/postgres.js"
99
+ },
100
+ "./instance/serve": {
101
+ "types": "./dist/instance/serve.d.ts",
102
+ "default": "./dist/instance/serve.js"
103
+ },
104
+ "./instance/cloudflare": {
105
+ "types": "./dist/instance/cloudflare.d.ts",
106
+ "default": "./dist/instance/cloudflare.js"
107
+ },
108
+ "./instance/undici": {
109
+ "types": "./dist/instance/undici.d.ts",
110
+ "default": "./dist/instance/undici.js"
111
+ },
84
112
  "./verily.js": "./dist/verily.js"
85
113
  }
86
114
  }