@port60/template-kit 1.2.0 → 1.2.1
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/README.md
CHANGED
|
@@ -50,11 +50,19 @@ See the [AI quickstart](https://developers.port60.com/guides/ai-quickstart/).
|
|
|
50
50
|
|
|
51
51
|
## The contract
|
|
52
52
|
|
|
53
|
-
Kit 1.2.
|
|
53
|
+
Kit 1.2.1 authors **port60-liquid@2**, content model **2.0**, using the contract under
|
|
54
54
|
`src/vendor/contract/v2`. Collection envelopes, independent header/footer navigation,
|
|
55
55
|
resolved actions and page-scoped sections are explicit. V1 sources need a deliberate migration,
|
|
56
56
|
not a manifest-only relabel. Historical v1 contracts remain frozen for existing platform pins.
|
|
57
57
|
|
|
58
|
+
### Photo-only hero playback in 1.2.1
|
|
59
|
+
|
|
60
|
+
The compatible host supplies `.hero-playback` on the `hero_carousel` island. Photo-only
|
|
61
|
+
templates may hide the optional dots and reveal playback on hover or keyboard focus,
|
|
62
|
+
while retaining a reachable control on touch devices. The preview supplies inactive
|
|
63
|
+
geometry only. Campaign/content carousel controls are unchanged. Deploy the compatible
|
|
64
|
+
host before publishing templates that depend on this control.
|
|
65
|
+
|
|
58
66
|
### Optional editor controls in 1.2.0
|
|
59
67
|
|
|
60
68
|
The editor only offers controls supported by the exact selected template version. Declare
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@port60/template-kit",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Build Port60 site templates locally: scaffold, live-preview, validate against the platform contract, and package for studio upload. AI-agent ready: every scaffold ships AGENTS.md and validate emits machine-readable JSON.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"name": "hero_carousel",
|
|
107
107
|
"label": "Hero image carousel",
|
|
108
108
|
"status": "available",
|
|
109
|
-
"description": "
|
|
109
|
+
"description": "Photo-only rotation for homeHero.images (2+): advances every ~6s, pauses on hover and offers persistent Pause/Resume. Keyboard navigation or focus outside that button stops rotation until explicitly resumed. Reduced motion prevents autoplay, including after a live preference change. Supports horizontal touch swipe and direction-aware arrow keys, Home/End, plus optional dot navigation. Templates may hide dots when the .hero-playback control exists. They may reveal playback on photograph hover and keyboard focus, but must retain keyboard reachability, a visible focus indicator and a control that is available without hover on touch devices. This is separate from campaign/content carousels. The platform owns motion; the template styles the frame and the empty .hero-slide-scrim tonal layer using its palette. Fewer than 2 images render nothing: the template owns single/no-image states.",
|
|
110
110
|
"params": [],
|
|
111
111
|
"stylingApi": [
|
|
112
112
|
".hero-carousel",
|
|
@@ -117,7 +117,8 @@
|
|
|
117
117
|
".hero-slide-scrim",
|
|
118
118
|
".hero-dots",
|
|
119
119
|
".hero-dot",
|
|
120
|
-
".hero-dot--active"
|
|
120
|
+
".hero-dot--active",
|
|
121
|
+
".hero-playback"
|
|
121
122
|
]
|
|
122
123
|
},
|
|
123
124
|
{
|
|
@@ -5568,7 +5568,7 @@
|
|
|
5568
5568
|
"name": "hero_carousel",
|
|
5569
5569
|
"label": "Hero image carousel",
|
|
5570
5570
|
"status": "available",
|
|
5571
|
-
"description": "
|
|
5571
|
+
"description": "Photo-only rotation for homeHero.images (2+): advances every ~6s, pauses on hover and offers persistent Pause/Resume. Keyboard navigation or focus outside that button stops rotation until explicitly resumed. Reduced motion prevents autoplay, including after a live preference change. Supports horizontal touch swipe and direction-aware arrow keys, Home/End, plus optional dot navigation. Templates may hide dots when the .hero-playback control exists. They may reveal playback on photograph hover and keyboard focus, but must retain keyboard reachability, a visible focus indicator and a control that is available without hover on touch devices. This is separate from campaign/content carousels. The platform owns motion; the template styles the frame and the empty .hero-slide-scrim tonal layer using its palette. Fewer than 2 images render nothing: the template owns single/no-image states.",
|
|
5572
5572
|
"params": [],
|
|
5573
5573
|
"stylingApi": [
|
|
5574
5574
|
".hero-carousel",
|
|
@@ -5579,7 +5579,8 @@
|
|
|
5579
5579
|
".hero-slide-scrim",
|
|
5580
5580
|
".hero-dots",
|
|
5581
5581
|
".hero-dot",
|
|
5582
|
-
".hero-dot--active"
|
|
5582
|
+
".hero-dot--active",
|
|
5583
|
+
".hero-playback"
|
|
5583
5584
|
]
|
|
5584
5585
|
},
|
|
5585
5586
|
{
|
|
@@ -8,6 +8,29 @@
|
|
|
8
8
|
template ships a themeCss injected at body-end. Fonts load from the layout <head> (preconnect +
|
|
9
9
|
stylesheet link) instead of a CSS @import, an @import chains render-blocking requests. */
|
|
10
10
|
|
|
11
|
+
/* Photo-only hero rotation. Templates style these hooks, not the campaign carousel. */
|
|
12
|
+
.hero-carousel .hero-playback {
|
|
13
|
+
position: absolute; z-index: 5; inset-block-start: 12px; inset-inline-end: 12px;
|
|
14
|
+
display: grid; place-items: center; width: 44px; height: 44px; padding: 8px;
|
|
15
|
+
border: 1px solid #ffffffb3; border-radius: 50%; background: #14241ce6; color: #fff;
|
|
16
|
+
cursor: pointer; touch-action: manipulation;
|
|
17
|
+
}
|
|
18
|
+
.hero-carousel .hero-playback svg { width: 20px; height: 20px; fill: currentColor; }
|
|
19
|
+
.hero-carousel .hero-playback:disabled { cursor: default; opacity: .65; }
|
|
20
|
+
.hero-carousel:focus-visible, .hero-carousel .hero-playback:focus-visible {
|
|
21
|
+
outline: 2px solid var(--ink); outline-offset: 4px;
|
|
22
|
+
}
|
|
23
|
+
.hero-carousel .hero-playback[hidden], .hero-carousel .hero-dots[hidden] { display: none !important; }
|
|
24
|
+
.hero-carousel-instructions {
|
|
25
|
+
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
|
|
26
|
+
overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
|
|
27
|
+
}
|
|
28
|
+
@media (prefers-reduced-motion: reduce) {
|
|
29
|
+
.hero-carousel .hero-slide, .hero-carousel .hero-slide-img {
|
|
30
|
+
animation: none !important; transition: none !important;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
11
34
|
:root {
|
|
12
35
|
--bg: #fbf6ef;
|
|
13
36
|
--bg-tint: #f4ece1;
|
|
@@ -115,6 +115,7 @@ function islandSkeleton(name, ctx = {}, fx = STUDIO_FX) {
|
|
|
115
115
|
return `<section class="hero-carousel" data-p60-preview-island="hero_carousel">
|
|
116
116
|
${previewNote(name)}
|
|
117
117
|
<div class="hero-slides">${slides}</div>
|
|
118
|
+
<button class="hero-playback" type="button" aria-label="Pause photographs" disabled><svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M7 5h4v14H7zm6 0h4v14h-4z" /></svg></button>
|
|
118
119
|
<div class="hero-dots" aria-hidden="true">${Array.from({ length: dots }, (_, i) => `<span class="hero-dot${i === 0 ? ' hero-dot--active' : ''}"></span>`).join('')}</div>
|
|
119
120
|
</section>`;
|
|
120
121
|
}
|