@justai/cuts 0.69.0 → 0.70.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justai/cuts",
3
- "version": "0.69.0",
3
+ "version": "0.70.0",
4
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": {
@@ -58,6 +58,20 @@ export interface Option {
58
58
  /** Shown, never hidden — an option a person can see and not reach explains itself; one that
59
59
  * vanishes reads as a feature that was removed. */
60
60
  disabled?: boolean;
61
+ /**
62
+ * A translation key, for a consumer that swaps its words after render.
63
+ *
64
+ * queries: translate a segmented control · data-i · the labels stay English · one bundle many
65
+ * languages
66
+ *
67
+ * THE ECOSYSTEM'S OWN CONVENTION, carried by the component rather than left to the caller. A
68
+ * mounted child persona (`/files`, `/me`) is ONE static bundle on every host, so it cannot have
69
+ * per-locale routes and translates in the browser by sweeping `[data-i]`. A control that renders
70
+ * its label as bare text is a control whose words stay English in thirteen languages — and the
71
+ * consumer's only fix would be to reach inside and add the attribute itself, which is the
72
+ * homework law 1 exists to refuse.
73
+ */
74
+ i18n?: string;
61
75
  }
62
76
  interface Props {
63
77
  id: string;
@@ -85,7 +99,7 @@ const on = value && options.some((o) => o.value === value) ? value : options[0]?
85
99
  tabindex={o.value === on ? 0 : -1}
86
100
  >
87
101
  <slot name={`icon-${o.value}`} />
88
- <span class="jseg-label">{o.label}</span>
102
+ <span class="jseg-label" data-i={o.i18n}>{o.label}</span>
89
103
  </button>
90
104
  ))}
91
105
  </div>