@hypersocial/decks-cli 0.9.24 → 0.9.26

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 (54) hide show
  1. package/package.json +1 -1
  2. package/skills/hyperdecks/SKILL.md +74 -8
  3. package/skills/hyperdecks/chat.md +3 -3
  4. package/skills/hyperdecks/terminal.md +3 -2
  5. package/src/answersCsv.mjs +21 -0
  6. package/src/check.mjs +125 -19
  7. package/src/checkRules.mjs +273 -18
  8. package/src/commands.mjs +92 -4
  9. package/src/embedCapture.mjs +126 -0
  10. package/src/embedSources.mjs +252 -0
  11. package/src/embedsGuide.mjs +36 -0
  12. package/src/files.mjs +3 -0
  13. package/src/guide.mjs +16 -7
  14. package/src/layoutRoutes.mjs +7 -1
  15. package/src/layouts.mjs +8 -3
  16. package/src/ops.mjs +138 -1
  17. package/src/picturesGuide.mjs +1 -0
  18. package/src/preview-capture.mjs +70 -1
  19. package/src/questionFit.mjs +23 -0
  20. package/src/runtime.mjs +7 -2
  21. package/templates/layouts/_deck.html +61 -12
  22. package/templates/layouts/bento.html +8 -6
  23. package/templates/layouts/closer.html +4 -2
  24. package/templates/layouts/cover-band.html +3 -1
  25. package/templates/layouts/cover-frame.html +8 -2
  26. package/templates/layouts/cover-poster.html +8 -2
  27. package/templates/layouts/cover-split.html +13 -2
  28. package/templates/layouts/cover-type.html +6 -3
  29. package/templates/layouts/embed.html +93 -0
  30. package/templates/layouts/features.html +12 -6
  31. package/templates/layouts/funnel.html +24 -5
  32. package/templates/layouts/hero.html +2 -2
  33. package/templates/layouts/lanes.html +18 -6
  34. package/templates/layouts/number.html +6 -3
  35. package/templates/layouts/phone-stage.html +13 -3
  36. package/templates/layouts/picture-full.html +13 -3
  37. package/templates/layouts/portrait.html +8 -0
  38. package/templates/layouts/question-choice.html +126 -0
  39. package/templates/layouts/question-text.html +89 -0
  40. package/templates/layouts/quote.html +7 -3
  41. package/templates/layouts/rail.html +7 -4
  42. package/templates/layouts/scorecard.html +18 -5
  43. package/templates/layouts/sentence.html +2 -2
  44. package/templates/layouts/split.html +14 -1
  45. package/templates/layouts/spotlight.html +4 -1
  46. package/templates/layouts/stack.html +3 -2
  47. package/templates/layouts/staircase.html +34 -5
  48. package/templates/layouts/strike.html +8 -2
  49. package/templates/layouts/team.html +22 -5
  50. package/templates/layouts/timeline.html +5 -2
  51. package/templates/layouts/two-bars.html +10 -1
  52. package/templates/layouts/two-by-two.html +22 -4
  53. package/templates/layouts/video-full.html +5 -4
  54. package/templates/layouts/wall.html +39 -11
@@ -4,8 +4,9 @@ summary: A wall of three to five pictures, one large, and one solid tile beside
4
4
  brief: Three to five photos, one large, and a solid tile for the sentence.
5
5
  says: this is real
6
6
  needs: 3 to 5 photos
7
- use: people, an event, places, a set of things made: proof it happened, many times over. Each .pic is a placeholder check fails on: put in photos (`hyperdecks asset add`, upload_deck_asset; found ones: `hyperdecks photos add <id> --for wall`, deck_guide topic photos) as <img class="pic" src="…" alt="…" width="…" height="…">, the strongest first (it takes the large cell). On a wide screen the wall's cells are its shape, so each photo fills its cell (cover). Pick the cells for the set: by default they stand upright (about square with three photos, taller with four or five), for upright photos; for square photos write <div class="pics square"> (about square cells); for landscape photos <div class="pics wide"> (the large one across the top, the rest in a row under it, each about 16:9). check --layout warns when a cell crops a third of its photo and names the class; keep subjects near the middle, or set object-position on one. check asks to trim a photo's flat ground only when the trimmed photo still suits its cell; otherwise the cell crops the ground away. On a phone the photos stand in two columns at their own shapes, so nothing is cut. Three to five: in the default cells five fill two columns of two beside the large one, three keep one column and four let the last stand tall (so four upright photos crop the last one hard: use three or five, or square cells); square cells stand four as the large one beside a column of three; wide cells put every photo after the first in one row under it. Real photos only, never generated or stock stand-ins for real people or events. A caption (optional, any theme): wrap the picture as <figure class="mount" data-caption="Where, when">…</figure>; short (about 40 characters), never the alt text.
7
+ use: people, an event, places, a set of things made: proof it happened, many times over. Each .pic is a placeholder check fails on: put in photos (`hyperdecks asset add`, upload_deck_asset; found ones: `hyperdecks photos add <id> --for wall`, deck_guide topic photos) as <img class="pic" src="…" alt="…" width="…" height="…">, the strongest first (it takes the large cell). On a wide screen the wall's cells are its shape, so each photo fills its cell (cover). Pick the cells for the set: by default they stand upright (about square with three photos, taller with four or five), for upright photos; for square photos write <div class="pics square"> (about square cells); for landscape photos <div class="pics wide"> (the large one across the top, the rest in a row under it, each about 16:9). check --layout warns when a cell crops a third of its photo and names the class; keep subjects near the middle, or set object-position on one. check asks to trim a photo's flat ground only when the trimmed photo still suits its cell; otherwise the cell crops the ground away. On a phone the photos fill the height under the words at their own shapes, so nothing is cut (wide: the first across, the rest two to a row), and a photo credit stands under them. Three to five: in the default cells five fill two columns of two beside the large one, three keep one column and four let the last stand tall (so four upright photos crop the last one hard: use three or five, or square cells); square cells stand four as the large one beside a column of three; wide cells put every photo after the first in one row under it. Real photos only, never generated or stock stand-ins for real people or events. A caption (optional, any theme): wrap the picture as <figure class="mount" data-caption="Where, when">…</figure>; short (about 40 characters), never the alt text.
8
8
  slot: bottom-right
9
+ flip: data-flip on the section mirrors it: the tile on the left with the presenter at its foot, the photos on the right (the large one at the right edge). Alternate it with a neighbouring wall slide.
9
10
  presenter: stage
10
11
  nopresenter: The tile's sentence centres in its height instead of keeping clear of the presenter at its foot.
11
12
  cues: [look: #__ID__-wall] as the narration turns to the pictures; [go: #__ID__-p1] for the large one if the script names it, then [go: slot].
@@ -48,21 +49,48 @@ script: This is what it looks like in real life. [look: #__ID__-wall] Every one
48
49
  .l-wall { display: flex; flex-direction: column; gap: 12px; }
49
50
  .l-wall .tile { order: -1; gap: 8px; padding: 0; border-radius: 0; background: none; color: inherit; }
50
51
  .on-ink.l-wall .tile { background: none; color: inherit; }
51
- /* Two columns (three for five photos), each photo at its own shape, the strongest first, at most two to a column
52
- and 210px tall so the wall fits above the presenter: nothing is cut but a very tall one. It keeps its own height
53
- (never squeezed into a third column off the card); the words sit directly above it. */
54
- .l-wall .pics { flex: none; display: block; columns: 2; column-gap: 8px; }
55
- .l-wall .pics:has(> :is(.pic, .mount):nth-child(5)) { columns: 3; }
56
- .l-wall .pics > :is(.pic, .mount) { width: 100%; margin-bottom: 8px; break-inside: avoid; }
57
- .l-wall .pic { height: auto; max-height: 210px; border-width: calc(2 * var(--line)); --frame-min: 41px; border-radius: min(calc(10 * var(--round)), var(--frame-min) / 8); }
58
- .l-wall .mount > .pic { flex: none; }
59
- .l-wall div.pic { aspect-ratio: 4 / 3; }
60
- .l-wall div.pic:first-child { aspect-ratio: 1; }
52
+ /* The photos take the free height in a grid, each as large as its cell allows at its own shape (never cropped,
53
+ never stretched): wide photos (.pics.wide) the strongest across the top and the rest two to a row (one row with the presenter); square
54
+ (.pics.square) two to a row; upright (the default) three to a row for three or five, two for four. A long title
55
+ leaves the grid at least 160px. */
56
+ .l-wall .pics { flex: 1 1 0; min-height: 160px; display: grid; grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 8px; place-items: center; }
57
+ /* With the presenter (--hd-phone-presenter: 1) the room is short, so wide photos stand at the title's width: the
58
+ strongest across, the rest in one row under it (four, three or two across), edge to edge. Each stands at its own
59
+ shape, top-aligned in the row: stretched to the row's tallest, a 1.62 photo beside 3:2 ones lost 7% to the crop.
60
+ A browser without style queries keeps the grid above, which fits too. */
61
+ @container style(--hd-phone-presenter: 1) {
62
+ .l-wall .pics.wide { flex: 0 1 auto; grid-template-rows: none; grid-auto-rows: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); place-items: start stretch; }
63
+ .l-wall .pics.wide:not(:has(> :nth-child(5))) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
64
+ .l-wall .pics.wide:not(:has(> :nth-child(4))) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
65
+ .l-wall .pics.wide > img.pic { width: 100%; max-height: none; }
66
+ }
67
+ .l-wall .pics > :is(.pic, .mount):first-child, .l-wall .pics:has(> :is(.pic, .mount):nth-child(4):last-child) > :is(.pic, .mount):last-child { grid-row: auto; }
68
+ .l-wall .pics:not(.wide, .square):has(> :is(.pic, .mount):nth-child(5)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
69
+ .l-wall .pics:not(.wide, .square):not(:has(> :is(.pic, .mount):nth-child(4))) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
70
+ .l-wall .pics.wide { grid-template-rows: minmax(0, 2fr); }
71
+ .l-wall .pics.wide > :is(.pic, .mount):first-child { grid-column: 1 / -1; }
72
+ .l-wall .pic { border-width: calc(2 * var(--line)); --frame-min: 41px; border-radius: min(calc(10 * var(--round)), var(--frame-min) / 8); }
73
+ .l-wall .pics > img.pic { width: auto; height: auto; max-width: 100%; max-height: 100%; }
74
+ .l-wall .pics > div.pic { width: auto; height: 100%; max-width: 100%; aspect-ratio: 4 / 3; }
75
+ .l-wall .pics > div.pic:first-child { aspect-ratio: 1; }
76
+ .l-wall .pics > .mount { display: flex; flex-direction: column; align-items: center; width: 100%; height: 100%; min-height: 0; }
77
+ .l-wall .mount > .pic { flex: 1 1 0; min-height: 0; width: auto; height: auto; max-width: 100%; }
78
+ /* A photo credit (.hd-credit, the player draws it at the slide's top corner) stands under the photos on a phone:
79
+ at the top it covered the kicker and title. */
80
+ section.slide.l-wall > .hd-credit { position: static; order: 1; align-self: flex-start; max-width: none; margin: 0; }
61
81
  }
62
82
  /* No presenter (:root.hd-no-presenter: no face and no captions, deck_guide look): the corner is free. Phones keep this layout's rules. */
63
83
  @media (min-width: 651px) {
64
84
  :root.hd-no-presenter .l-wall .tile { justify-content: center; }
65
85
  }
86
+ /* Flipped (data-flip on the section): the mirror image, for a neighbour of the same layout. Wide screens only; a phone
87
+ stacks the same either way. The presenter follows the panel (layouts/_deck.html). */
88
+ @media not all and (max-width: 650px) {
89
+ .l-wall[data-flip] { grid-template-columns: 380px minmax(0, 1fr); }
90
+ .l-wall[data-flip] .tile { grid-column: 1; grid-row: 1; }
91
+ .l-wall[data-flip] .pics { grid-column: 2; grid-row: 1; direction: rtl; }
92
+ .l-wall[data-flip] .pics > * { direction: ltr; }
93
+ }
66
94
  </style>
67
95
  <section class="slide l-wall" id="__ID__" data-chapter="In real life" data-note="Photos: say who took them, where and when, and that you may show the people in them.">
68
96
  <div class="pics" id="__ID__-wall">