@justai/cuts 0.46.0 → 0.46.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 (2) hide show
  1. package/package.json +2 -2
  2. package/src/Base.astro +14 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@justai/cuts",
3
- "version": "0.46.0",
4
- "description": "A persona's named parts the page shell that holds them, and the cuts themselves.",
3
+ "version": "0.46.1",
4
+ "description": "A persona's named parts \u2014 the page shell that holds them, and the cuts themselves.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
7
7
  "type": "git",
package/src/Base.astro CHANGED
@@ -40,7 +40,20 @@ import ConfirmSheet from "./ConfirmSheet.astro";
40
40
 
41
41
  interface Props {
42
42
  lang: string;
43
- t: Record<string, string>;
43
+ /**
44
+ * The persona's strings, in the shape the persona keeps them.
45
+ *
46
+ * NOT `Record<string, string>` — that was the declaration for a year and it was wrong for every
47
+ * consumer: a persona's dictionary is NESTED (`t.share.title`, `t.types.wifi`), so the one type
48
+ * this layout advertised was the one type nobody passes. It compiled everywhere because nobody
49
+ * ran a typechecker over a page; qr turned one on and the framework's own contract was the first
50
+ * thing it caught.
51
+ *
52
+ * This layout only ever reads a handful of top-level strings off it and forwards the rest to the
53
+ * cuts, so what it actually requires is "an object of strings, possibly nested" — stated here
54
+ * rather than narrowed to a shape only this package would recognise.
55
+ */
56
+ t: Record<string, unknown>;
44
57
  /** The persona's own origin, e.g. https://tabata.app.zone — canonical, hreflang and OG all read it. */
45
58
  site: string;
46
59
  /** From the consuming repo's src/i18n — never from this package. */