@fasl-work/caos-app-shell 0.19.3 → 0.19.5
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/dist/index.d.ts +3 -0
- package/dist/index.js +3 -2
- package/gate/inpage.mjs +5 -1
- package/package.json +1 -1
- package/styles.css +11 -0
package/dist/index.d.ts
CHANGED
|
@@ -1219,6 +1219,9 @@ interface CaseWorkbenchProps {
|
|
|
1219
1219
|
controls?: Record<string, unknown>;
|
|
1220
1220
|
/** A workbench whose views have no live control declares it, so the reactivity gate does not expect one. */
|
|
1221
1221
|
replayOnly?: boolean;
|
|
1222
|
+
/** The notes of the case's filling cards are text the reader needs whole: at 1280 px and wider each takes the height it
|
|
1223
|
+
* needs instead of 35% of its card, the body keeping the stage floor (`data-caos-note-fit`, 0.19.5, SHC-101). */
|
|
1224
|
+
noteFit?: boolean;
|
|
1222
1225
|
/** The regimes of the case, shown in the rail under the case picker; omit only for a case with no meaningful
|
|
1223
1226
|
* parametric or temporal family. */
|
|
1224
1227
|
variants?: VariantBarProps;
|
package/dist/index.js
CHANGED
|
@@ -3855,7 +3855,7 @@ function panel(id, lane, provenance, content) {
|
|
|
3855
3855
|
return /* @__PURE__ */ jsx("div", { className: "caos-cw-panel", "data-group": id, "data-lane": lane, "data-provenance": provenance, children: content });
|
|
3856
3856
|
}
|
|
3857
3857
|
function CaseWorkbench(props) {
|
|
3858
|
-
const { caseId, cases, source, controls, replayOnly, variants, rail, railLabel, groups, compare, context, group, onGroupChange, deepLinkView = true, ariaLabel, focus } = props;
|
|
3858
|
+
const { caseId, cases, source, controls, replayOnly, noteFit, variants, rail, railLabel, groups, compare, context, group, onGroupChange, deepLinkView = true, ariaLabel, focus } = props;
|
|
3859
3859
|
const lang = useShellLang();
|
|
3860
3860
|
const focusCfg = focus === true ? {} : focus || null;
|
|
3861
3861
|
const { show: showFocus, setFocus, enterRef, memory } = useFocusMode(focusCfg);
|
|
@@ -3913,7 +3913,8 @@ function CaseWorkbench(props) {
|
|
|
3913
3913
|
"data-variant": variantId ?? "",
|
|
3914
3914
|
"data-source": source ?? "",
|
|
3915
3915
|
"data-state-key": stateKey,
|
|
3916
|
-
"data-replay-only": replayOnly ? "1" : void 0
|
|
3916
|
+
"data-replay-only": replayOnly ? "1" : void 0,
|
|
3917
|
+
"data-caos-note-fit": noteFit ? "" : void 0
|
|
3917
3918
|
};
|
|
3918
3919
|
if (showFocus && focusCfg) {
|
|
3919
3920
|
const open = tabs.find((t2) => t2.id === openGroup) ?? tabs[0];
|
package/gate/inpage.mjs
CHANGED
|
@@ -413,7 +413,11 @@ export function installLib() {
|
|
|
413
413
|
const y = Math.max(cy0, r.top);
|
|
414
414
|
const x2 = Math.min(cx1, r.right);
|
|
415
415
|
const y2 = Math.min(cy1, r.bottom);
|
|
416
|
-
|
|
416
|
+
// Only the visible part counts (known shell defect, 0.19.4): a surface mostly past the edge of the viewport is measured
|
|
417
|
+
// when the gate scrolls to it. Judged from a sliver, a table card with 5 px of its body inside the fold was called
|
|
418
|
+
// blank (nothing is painted in 5 px of padding) while it renders whole once scrolled to. The visible part must be at
|
|
419
|
+
// least the drawing's own minimum, the one applied to its full rectangle above.
|
|
420
|
+
if (x2 - x < min || y2 - y < min) continue;
|
|
417
421
|
// The stage a drawing is judged against: the view's body, else the sized stage, else the surface itself; the
|
|
418
422
|
// view is the card that holds it. A drawing that fills a small corner of a large view underfills its stage.
|
|
419
423
|
const stageEl = el.closest('.caos-plot-body') || el.closest('[data-drawn]') || el;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fasl-work/caos-app-shell",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.5",
|
|
4
4
|
"description": "Shared web-app shell, workbench primitives, content primitives, design system and measured gate for the CAOS / Faena public apps (ADR-0016, ADR-0017, ADR-0071).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Felipe Santibáñez-Leal",
|
package/styles.css
CHANGED
|
@@ -507,6 +507,9 @@ svg.lucide { flex: none; }
|
|
|
507
507
|
.cs-kind-uploaded { color: var(--color-warn); border-color: color-mix(in oklab, var(--color-warn) 40%, transparent); }
|
|
508
508
|
.cs-modified { display: flex; align-items: center; gap: 0.35rem 0.5rem; flex-wrap: wrap; min-width: 0; }
|
|
509
509
|
.cs-modified .badge { white-space: normal; max-width: 100%; }
|
|
510
|
+
/* A lane badge in the workbench rail wraps inside the rail: the Spanish replay label is wider than the 248px rail and, nowrap, spilled out of it and widened it (known shell defect 44, shell 0.19.4). Outside the rail a badge stays nowrap. */
|
|
511
|
+
.caos-wb-rail .caos-badges { max-width: 100%; }
|
|
512
|
+
.caos-wb-rail .badge { white-space: normal; max-width: 100%; }
|
|
510
513
|
.cs-reset { border: none; background: transparent; color: var(--color-accent); font-size: 0.8rem; font-weight: 600; padding: 0.1rem 0.2rem; text-decoration: underline; text-underline-offset: 2px; }
|
|
511
514
|
/* The compact one-of-N case picker (ADR-0071 rule 7): ten cases in four categories cost a 308px chip block, 21% of a
|
|
512
515
|
2560x1440 viewport, and one row as a dropdown. */
|
|
@@ -625,6 +628,14 @@ svg.lucide { flex: none; }
|
|
|
625
628
|
/* The note of a filling card keeps at most 35% of the card and scrolls beyond it, so the drawing keeps a floor
|
|
626
629
|
(CAOS_APP_SHELL#95: a long note left plots of 10 to 90 px at 1280 x 800). */
|
|
627
630
|
.caos-plot.fill > .caos-plot-note { flex: 0 1 auto; max-height: 35%; overflow-y: auto; }
|
|
631
|
+
/* A product whose notes carry what the reader needs whole (CAOS_Contraste C04's data-driven notes, cut by 9 to 117 px under the
|
|
632
|
+
cap) opts out of the cap with `data-caos-note-fit` on any ancestor: at 1280 px and wider, where the body keeps the stage floor,
|
|
633
|
+
the note takes the height it needs and, only where the drawing needs its floor, shrinks and scrolls in its own box. Below
|
|
634
|
+
1280 px the cap stays (no floor there), and at 900 px and below the note is whole as before (0.19.5, SHC-101; known shell
|
|
635
|
+
defect 46). */
|
|
636
|
+
@media (min-width: 1280px) {
|
|
637
|
+
[data-caos-note-fit] .caos-plot.fill > .caos-plot-note { max-height: none; min-height: 0; }
|
|
638
|
+
}
|
|
628
639
|
|
|
629
640
|
/* The stage floor of a filling card (shell 0.11.2; the gate's G6 floor, `--stage-floor` 140 px). At 1280 px and wider the
|
|
630
641
|
body of a filling card, the box the gate measures, keeps at least the floor itself, so the card grows when its header
|