@ai-matrx/design-system 0.86.364 → 0.86.366

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 (69) hide show
  1. package/CHANGELOG.md +14 -1
  2. package/dist/carousel.js +3 -3
  3. package/dist/{chunk-RO5CRIOL.js → chunk-3JEAXZKX.js} +2 -2
  4. package/dist/{chunk-HS6GMHKZ.js → chunk-CZGTZJPS.js} +3 -3
  5. package/dist/chunk-CZGTZJPS.js.map +1 -0
  6. package/dist/{chunk-5Z5GTXKL.js → chunk-FEITX4L3.js} +2 -2
  7. package/dist/{chunk-GUGBVQ4T.js → chunk-OAK4ENIP.js} +3 -3
  8. package/dist/{chunk-UGUVTE77.js → chunk-QEQDJBNK.js} +2 -2
  9. package/dist/{chunk-QJ6SQNXD.js → chunk-TBWKBTPM.js} +2 -2
  10. package/dist/{chunk-2QFA6CK4.js → chunk-UAIBCPMB.js} +2 -2
  11. package/dist/{chunk-VOLSYNJY.js → chunk-VG765KBC.js} +2 -2
  12. package/dist/controls.cjs +2 -2
  13. package/dist/controls.cjs.map +1 -1
  14. package/dist/controls.js +3 -3
  15. package/dist/data-table/data-row-inspector.cjs +2 -2
  16. package/dist/data-table/data-row-inspector.cjs.map +1 -1
  17. package/dist/data-table/data-row-inspector.js +3 -3
  18. package/dist/data-table/data-row-window.cjs +2 -2
  19. package/dist/data-table/data-row-window.cjs.map +1 -1
  20. package/dist/data-table/data-row-window.js +4 -4
  21. package/dist/data-table/drill-chart.cjs +2 -2
  22. package/dist/data-table/drill-chart.cjs.map +1 -1
  23. package/dist/data-table/drill-chart.js +2 -2
  24. package/dist/data-table/index.cjs +2 -2
  25. package/dist/data-table/index.cjs.map +1 -1
  26. package/dist/data-table/index.js +5 -5
  27. package/dist/data-table/uuid-cell.cjs +2 -2
  28. package/dist/data-table/uuid-cell.cjs.map +1 -1
  29. package/dist/data-table/uuid-cell.js +2 -2
  30. package/dist/desktop.cjs +2 -2
  31. package/dist/desktop.cjs.map +1 -1
  32. package/dist/desktop.js +3 -3
  33. package/dist/email-input-dialog.cjs +2 -2
  34. package/dist/email-input-dialog.cjs.map +1 -1
  35. package/dist/email-input-dialog.js +2 -2
  36. package/dist/error-sentence.cjs +2 -2
  37. package/dist/error-sentence.cjs.map +1 -1
  38. package/dist/error-sentence.js +1 -1
  39. package/dist/index.cjs +54 -12
  40. package/dist/index.cjs.map +1 -1
  41. package/dist/index.d.cts +7 -2
  42. package/dist/index.d.ts +7 -2
  43. package/dist/index.js +58 -16
  44. package/dist/index.js.map +1 -1
  45. package/dist/lite-table.cjs +2 -2
  46. package/dist/lite-table.cjs.map +1 -1
  47. package/dist/lite-table.js +3 -3
  48. package/dist/record-list.cjs +2 -2
  49. package/dist/record-list.cjs.map +1 -1
  50. package/dist/record-list.js +3 -3
  51. package/dist/swipe-deck.cjs +14 -5
  52. package/dist/swipe-deck.cjs.map +1 -1
  53. package/dist/swipe-deck.css +6 -0
  54. package/dist/swipe-deck.d.cts +11 -0
  55. package/dist/swipe-deck.d.ts +11 -0
  56. package/dist/swipe-deck.js +14 -5
  57. package/dist/swipe-deck.js.map +1 -1
  58. package/dist/text-input-dialog.cjs +2 -2
  59. package/dist/text-input-dialog.cjs.map +1 -1
  60. package/dist/text-input-dialog.js +2 -2
  61. package/package.json +2 -2
  62. package/dist/chunk-HS6GMHKZ.js.map +0 -1
  63. /package/dist/{chunk-RO5CRIOL.js.map → chunk-3JEAXZKX.js.map} +0 -0
  64. /package/dist/{chunk-5Z5GTXKL.js.map → chunk-FEITX4L3.js.map} +0 -0
  65. /package/dist/{chunk-GUGBVQ4T.js.map → chunk-OAK4ENIP.js.map} +0 -0
  66. /package/dist/{chunk-UGUVTE77.js.map → chunk-QEQDJBNK.js.map} +0 -0
  67. /package/dist/{chunk-QJ6SQNXD.js.map → chunk-TBWKBTPM.js.map} +0 -0
  68. /package/dist/{chunk-2QFA6CK4.js.map → chunk-UAIBCPMB.js.map} +0 -0
  69. /package/dist/{chunk-VOLSYNJY.js.map → chunk-VG765KBC.js.map} +0 -0
@@ -290,6 +290,12 @@
290
290
  .matrx-sd-tag { display: inline-flex; align-items: center; gap: 4px; letter-spacing: 0.04em; text-transform: none; font-size: 12px; color: var(--sd-fg); padding: 2px 8px; border-radius: 10px; background: var(--sd-pill); border: 1px solid var(--sd-line); }
291
291
  .matrx-sd-tag svg { width: 12px; height: 12px; color: hsl(var(--success)); stroke-width: 3; flex: none; }
292
292
  .matrx-sd .matrx-sd-hero { font-weight: 800; line-height: 1.06; letter-spacing: -0.03em; margin: 0; padding: 0; text-wrap: balance; overflow-wrap: normal; font-size: 40px; color: var(--sd-fg); }
293
+ /* `titleSize="page"`: the card reads like a page — a page-title line in a reading-width column, the body is the point. */
294
+ .matrx-sd-layer[data-sd-title="page"] { justify-content: flex-start; padding-top: clamp(4px, 2cqh, 24px); }
295
+ .matrx-sd-layer[data-sd-title="page"] .matrx-sd-card { max-width: 760px; }
296
+ .matrx-sd-layer[data-sd-title="page"] .matrx-sd-kicker { margin-bottom: 0.5em; }
297
+ .matrx-sd .matrx-sd-layer[data-sd-title="page"] .matrx-sd-hero { font-size: clamp(1.25rem, 1rem + 0.6vw, 1.625rem); font-weight: var(--matrx-type-display-weight, 600); line-height: 1.2; letter-spacing: -0.015em; }
298
+ .matrx-sd-layer[data-sd-title="page"] .matrx-sd-body { margin-top: 4px; max-width: none; }
293
299
  .matrx-sd-hero[data-quoted]::before { content: "“"; }
294
300
  .matrx-sd-hero[data-quoted]::after { content: "”"; }
295
301
  .matrx-sd-part {
@@ -544,6 +544,17 @@ interface SwipeDeckProps {
544
544
  readonly controller?: DeckController;
545
545
  /** Show each item's choices on the card, by their direction (a quiz). Default: when the item has its own answers. */
546
546
  readonly choicesOnCard?: boolean | "auto";
547
+ /**
548
+ * How big the card's own text is: `fit` (default) grows it to fill the card (a word, a short line);
549
+ * `page` holds it at a page-title size in a reading-width column, for a card whose body is the point
550
+ * (evidence to read before answering).
551
+ */
552
+ readonly titleSize?: "fit" | "page";
553
+ /**
554
+ * Draw the answers off the edges (`more`) as the card's row of buttons (default true). `false` when the
555
+ * host draws every answer itself in its body through `context.answer`; their keyboard shortcuts stay.
556
+ */
557
+ readonly moreOnCard?: boolean;
547
558
  /** The copy corner's text (default: the item, or the whole deck at a pick or the end). */
548
559
  readonly copyText?: (context: SwipeDeckCopyContext) => string;
549
560
  /** Where "the walkthrough already played" is remembered; `null` never plays it on its own. */
@@ -544,6 +544,17 @@ interface SwipeDeckProps {
544
544
  readonly controller?: DeckController;
545
545
  /** Show each item's choices on the card, by their direction (a quiz). Default: when the item has its own answers. */
546
546
  readonly choicesOnCard?: boolean | "auto";
547
+ /**
548
+ * How big the card's own text is: `fit` (default) grows it to fill the card (a word, a short line);
549
+ * `page` holds it at a page-title size in a reading-width column, for a card whose body is the point
550
+ * (evidence to read before answering).
551
+ */
552
+ readonly titleSize?: "fit" | "page";
553
+ /**
554
+ * Draw the answers off the edges (`more`) as the card's row of buttons (default true). `false` when the
555
+ * host draws every answer itself in its body through `context.answer`; their keyboard shortcuts stay.
556
+ */
557
+ readonly moreOnCard?: boolean;
547
558
  /** The copy corner's text (default: the item, or the whole deck at a pick or the end). */
548
559
  readonly copyText?: (context: SwipeDeckCopyContext) => string;
549
560
  /** Where "the walkthrough already played" is remembered; `null` never plays it on its own. */
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import {
3
3
  ErrorBox
4
- } from "./chunk-5Z5GTXKL.js";
4
+ } from "./chunk-FEITX4L3.js";
5
5
  import {
6
6
  Input
7
7
  } from "./chunk-TDMVH77G.js";
8
- import "./chunk-HS6GMHKZ.js";
8
+ import "./chunk-CZGTZJPS.js";
9
9
  import "./chunk-WAT2XW7L.js";
10
10
  import {
11
11
  ArrowDownIcon,
@@ -143,6 +143,10 @@ function fitText(box, inner, text2, min, max) {
143
143
  else box.removeAttribute("data-sd-overflow");
144
144
  return size;
145
145
  }
146
+ function markOverflow(box, inner) {
147
+ if (inner.offsetHeight > box.clientHeight + 1) box.setAttribute("data-sd-overflow", "");
148
+ else box.removeAttribute("data-sd-overflow");
149
+ }
146
150
  function keepFitted(box, run) {
147
151
  run();
148
152
  let alive = true;
@@ -1963,7 +1967,8 @@ function SwipeDeck(props) {
1963
1967
  conflict,
1964
1968
  labels,
1965
1969
  suggestedDir,
1966
- more: cardMoreShown,
1970
+ more: props.moreOnCard === false ? [] : cardMoreShown,
1971
+ titleSize: props.titleSize ?? "fit",
1967
1972
  detail: detailNow,
1968
1973
  onDetail: (d) => setCardDetail({ id: step.item.id, detail: d }),
1969
1974
  body: cardContext && props.renderCardBody ? props.renderCardBody(cardContext) : null,
@@ -2063,6 +2068,7 @@ function CardView({
2063
2068
  onChoose,
2064
2069
  more,
2065
2070
  onChooseMore,
2071
+ titleSize,
2066
2072
  detail,
2067
2073
  onDetail,
2068
2074
  body,
@@ -2095,9 +2101,11 @@ function CardView({
2095
2101
  const box = layer.current;
2096
2102
  if (!box || !inner.current || !hero.current) return;
2097
2103
  return keepFitted(box, () => {
2098
- if (inner.current && hero.current) fitText(box, inner.current, hero.current, 20, heroMax(box));
2104
+ if (!inner.current || !hero.current) return;
2105
+ if (titleSize === "fit") fitText(box, inner.current, hero.current, 20, heroMax(box));
2106
+ else markOverflow(box, inner.current);
2099
2107
  });
2100
- }, [item.text, partsKey, item.members?.length, more.length]);
2108
+ }, [item.text, partsKey, item.members?.length, more.length, titleSize]);
2101
2109
  const nodes = [];
2102
2110
  for (let i = 0; i < tokens.length; ) {
2103
2111
  const p = parts.find((x) => x.start === i);
@@ -2128,6 +2136,7 @@ function CardView({
2128
2136
  ref: layer,
2129
2137
  className: "matrx-sd-layer",
2130
2138
  "data-sd-item": item.id,
2139
+ "data-sd-title": titleSize === "page" ? "page" : void 0,
2131
2140
  "aria-label": [item.kicker, item.text].filter(Boolean).join(": "),
2132
2141
  onDoubleClick: (e) => {
2133
2142
  const t = e.target instanceof Element ? e.target.closest("[data-sd-t]") : null;