@celljs/ta-glance 4.22.0 → 4.24.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.
@@ -238,6 +238,7 @@ var FOLDED = 40;
238
238
  var POINTS = 24;
239
239
  var SERIES = 4;
240
240
  var BLOCKS = 8;
241
+ var OPTIONS = 8;
241
242
  var TEXT = 400;
242
243
  var MARKDOWN = 8000;
243
244
  var STATUSES = ["done", "partial", "failed", "blocked", "info"];
@@ -470,7 +471,7 @@ function blockOf(item, partial, labels) {
470
471
  return columns.length && rows.length ? { type, columns, rows } : undefined;
471
472
  }
472
473
  case "options": {
473
- const list = items(value?.items, option).slice(0, 5);
474
+ const list = items(value?.items, option).slice(0, OPTIONS);
474
475
  const question = text(value?.question);
475
476
  return list.length ? { type, items: list, ...question ? { question } : {}, ...value?.multi === true ? { multi: true } : {} } : undefined;
476
477
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ta-glance",
3
- "version": "4.22.0",
3
+ "version": "4.24.0",
4
4
  "description": "A pi package for Ta: replies lead with the answer, short, and show results as cards (key numbers, files, steps, comparisons, choices) rather than paragraphs",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -26,8 +26,8 @@
26
26
  "watch": "tsc -b -w --preserveWatchOutput"
27
27
  },
28
28
  "devDependencies": {
29
- "@celljs/ta-protocol": "4.22.0",
30
- "@celljs/ta-web": "4.22.0",
29
+ "@celljs/ta-protocol": "4.24.0",
30
+ "@celljs/ta-web": "4.24.0",
31
31
  "@types/react": "^19.3.0"
32
32
  },
33
33
  "publishConfig": {
package/web/index.js CHANGED
@@ -627,6 +627,7 @@ var FOLDED = 40;
627
627
  var POINTS = 24;
628
628
  var SERIES = 4;
629
629
  var BLOCKS = 8;
630
+ var OPTIONS = 8;
630
631
  var TEXT = 400;
631
632
  var MARKDOWN = 8000;
632
633
  var STATUSES = ["done", "partial", "failed", "blocked", "info"];
@@ -859,7 +860,7 @@ function blockOf(item, partial, labels) {
859
860
  return columns.length && rows.length ? { type, columns, rows } : undefined;
860
861
  }
861
862
  case "options": {
862
- const list = items(value?.items, option).slice(0, 5);
863
+ const list = items(value?.items, option).slice(0, OPTIONS);
863
864
  const question = text(value?.question);
864
865
  return list.length ? { type, items: list, ...question ? { question } : {}, ...value?.multi === true ? { multi: true } : {} } : undefined;
865
866
  }
@@ -1737,17 +1738,17 @@ var STYLE = `
1737
1738
  .tag-card .tag-table td:last-child:not(:first-child) { min-width: 8em; white-space: normal; }
1738
1739
  /* More: every column but the names wraps, the table sharing the width out by what each holds */
1739
1740
  .tag-card .tag-table table:not([data-columns='1'], [data-columns='2']) td:not(:first-child) { min-width: 7em; white-space: normal; }
1740
- /* More, in a narrow card: a row is a block, its name on top, each value under the name of its column; no table to scroll sideways */
1741
+ /* More, in a narrow card: each row is a small card, its name on top and each value beside the name of its column;
1742
+ * the cards sit side by side as the width allows, one under another on a phone; no table to scroll sideways */
1741
1743
  @container tag-card (max-width: 520px) {
1742
1744
  .tag-card .tag-table table:not([data-columns='1'], [data-columns='2']) { display: block; }
1743
1745
  .tag-card .tag-table table:not([data-columns='1'], [data-columns='2']) thead { display: none; }
1744
- .tag-card .tag-table table:not([data-columns='1'], [data-columns='2']) :is(tbody, tr) { display: block; }
1745
- .tag-card .tag-table table:not([data-columns='1'], [data-columns='2']) tr { padding: var(--tag-y) var(--tag-x); border-bottom: 1px solid var(--tag-line); }
1746
- .tag-card .tag-table table:not([data-columns='1'], [data-columns='2']) tr:last-child { border-bottom: 0; }
1747
- .tag-card .tag-table table:not([data-columns='1'], [data-columns='2']) td:nth-child(n) { display: block; min-width: 0; padding: 0; border: 0; white-space: normal; }
1748
- .tag-card .tag-table table:not([data-columns='1'], [data-columns='2']) td:first-child { font-weight: 600; }
1749
- .tag-card .tag-table table:not([data-columns='1'], [data-columns='2']) td + td { margin-top: 6px; color: var(--ta-body); }
1750
- .tag-card .tag-table table:not([data-columns='1'], [data-columns='2']) td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; margin-bottom: 1px; color: var(--ta-muted); font-size: var(--tag-small); line-height: 1.4; }
1746
+ .tag-card .tag-table table:not([data-columns='1'], [data-columns='2']) tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5em), 1fr)); gap: 8px; padding: var(--tag-y) var(--tag-x); }
1747
+ .tag-card .tag-table table:not([data-columns='1'], [data-columns='2']) tr { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; gap: 4px 12px; padding: 10px 12px; border: 1px solid var(--tag-line); border-radius: 8px; background: var(--ta-raised); }
1748
+ .tag-card .tag-table table:not([data-columns='1'], [data-columns='2']) td:nth-child(n) { min-width: 0; padding: 0; border: 0; white-space: normal; }
1749
+ .tag-card .tag-table table:not([data-columns='1'], [data-columns='2']) td:first-child { grid-column: 1 / -1; margin-bottom: 2px; font-weight: 600; line-height: var(--tag-lh); }
1750
+ .tag-card .tag-table table:not([data-columns='1'], [data-columns='2']) td + td { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: baseline; color: var(--ta-body); line-height: var(--tag-lh); }
1751
+ .tag-card .tag-table table:not([data-columns='1'], [data-columns='2']) td + td::before { content: attr(data-label); color: var(--ta-muted); font-size: var(--tag-small); white-space: nowrap; }
1751
1752
  }
1752
1753
  .tag-card .ta-mermaid { margin: 0; border: 0; border-radius: 0; background: transparent; }
1753
1754
  .tag-card .ta-mermaid .ta-code-bar { padding-left: var(--tag-x); padding-right: calc(var(--tag-x) - 4px); }