@justai/cuts 0.41.0 → 0.42.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.41.0",
3
+ "version": "0.42.0",
4
4
  "description": "A persona's named parts — the page shell that holds them, and the cuts themselves.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -51,11 +51,18 @@ interface Props {
51
51
  // without knowing this component's internals.
52
52
  /** Key for a runtime translator — lands on the LABEL, never on the row. */
53
53
  i18n?: string;
54
+ /**
55
+ * ANYTHING ELSE LANDS ON THE BUTTON. A consumer's `data-*` is how strings reach a bundled script
56
+ * in this ecosystem — a module script cannot read the frontmatter, so the DOM carries them — and
57
+ * a component that silently swallowed them would send the consumer looking for a bug in its own
58
+ * code. Astro drops unknown props unless they are spread, so they are spread.
59
+ */
60
+ [key: string]: unknown;
54
61
  }
55
- const { id, label, tone = "plain", detail, hidden, i18n } = Astro.props;
62
+ const { id, label, tone = "plain", detail, hidden, i18n, ...rest } = Astro.props;
56
63
  ---
57
64
 
58
- <button class:list={["jal-row", tone !== "plain" && `is-${tone}`]} type="button" id={id} hidden={hidden}>
65
+ <button class:list={["jal-row", tone !== "plain" && `is-${tone}`]} type="button" id={id} hidden={hidden} {...rest}>
59
66
  <span class="jal-ico" aria-hidden="true"><slot name="icon" /></span>
60
67
  <span class="jal-label" id={id ? `${id}-label` : undefined} data-i={i18n}>{label}</span>
61
68
  {detail && <span class="jal-detail">{detail}</span>}