@xenterprises/nuxt-x-marketing 1.5.2 → 1.6.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.
package/CHANGELOG.md CHANGED
@@ -30,6 +30,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
30
30
  section and its sample product data were dropped with them. Every other section of the
31
31
  demo page is unchanged.
32
32
 
33
+ ## [1.6.0] - 2026-10-12
34
+
35
+ ### Added
36
+
37
+ - **`XMarkHero` `scrimWidth` prop** (opt-in, `overlay="scrim-left"` only). CSS length such as
38
+ `"40%"` or `"36rem"`. On md+ the scrim is 90% black up to `scrimWidth`, then fades out over a
39
+ further ~34% of the width so the photo on the right stays vivid. Below md it darkens a 90% band
40
+ from 18% to 82% of the hero height (35% at the top and bottom edges) instead of a flat 90%.
41
+ Without `scrimWidth`, `scrim-left` and every other default render byte-identical to 1.5.2.
42
+ Keep the whole text column inside the 90% zone: white title over 90% black on a pure-white
43
+ pixel is 17.8:1, white/80 subtitle 11.6:1; outside the zone contrast drops fast.
44
+
33
45
  ## [1.5.2] - 2026-10-12
34
46
 
35
47
  ### Fixed
@@ -40,10 +40,16 @@
40
40
 
41
41
  <!-- Overlay -->
42
42
  <div
43
- v-if="overlay !== 'none'"
43
+ v-if="overlay !== 'none' && !softScrim"
44
44
  class="absolute inset-0"
45
45
  :class="overlayClass"
46
46
  />
47
+ <!-- scrim-left + scrimWidth (opt-in, 1.6.0) -->
48
+ <div
49
+ v-else-if="softScrim"
50
+ class="absolute inset-0 x-hero-scrim-w"
51
+ :style="{ '--x-scrim-w': scrimWidth }"
52
+ />
47
53
  </div>
48
54
 
49
55
  <!-- Content -->
@@ -196,6 +202,18 @@ const props = defineProps({
196
202
  type: String,
197
203
  default: "",
198
204
  },
205
+ /**
206
+ * scrim-left only, opt-in. CSS length for the 90% black zone, e.g. "40%" or "36rem".
207
+ * When set: desktop (md+) keeps 90% up to this width, then a long soft fade so the
208
+ * photo on the right stays vivid; mobile darkens a band behind the text instead of
209
+ * a flat 90% over the whole hero. Keep the text column inside the 90% zone.
210
+ * Unset (default): scrim-left renders exactly as in 1.5.x.
211
+ */
212
+ scrimWidth: {
213
+ type: String,
214
+ default: "",
215
+ validator: (v) => v === "" || /^\d+(\.\d+)?(%|px|rem|em|vw)$/.test(v),
216
+ },
199
217
  /** Add top padding for non-transparent nav */
200
218
  includeNavPadding: {
201
219
  type: Boolean,
@@ -221,6 +239,10 @@ const overlayClass = computed(() => {
221
239
  return overlays[props.overlay] || "";
222
240
  });
223
241
 
242
+ // scrim-left with scrimWidth renders a separate overlay element; without it the
243
+ // 1.5.x overlay element renders unchanged (no extra class or style attribute).
244
+ const softScrim = computed(() => props.overlay === "scrim-left" && !!props.scrimWidth);
245
+
224
246
  const heightClass = computed(() => {
225
247
  const heights = {
226
248
  full: "min-h-[calc(100svh-var(--ui-header-height))]",
@@ -260,3 +282,32 @@ const contentAlignmentClasses = computed(() => {
260
282
  return aligns[props.align];
261
283
  });
262
284
  </script>
285
+
286
+ <style>
287
+ /* scrim-left + scrimWidth (1.6.0). Mobile: 90% band behind the text column,
288
+ * lighter at the top and bottom edges of the hero. */
289
+ .x-hero-scrim-w {
290
+ background-image: linear-gradient(
291
+ to bottom,
292
+ rgb(0 0 0 / 0.35) 0%,
293
+ rgb(0 0 0 / 0.9) 18%,
294
+ rgb(0 0 0 / 0.9) 82%,
295
+ rgb(0 0 0 / 0.35) 100%
296
+ );
297
+ }
298
+ /* md+: 90% up to --x-scrim-w, then a long eased fade to clear. */
299
+ @media (min-width: 768px) {
300
+ .x-hero-scrim-w {
301
+ background-image: linear-gradient(
302
+ to right,
303
+ rgb(0 0 0 / 0.9) 0,
304
+ rgb(0 0 0 / 0.9) var(--x-scrim-w),
305
+ rgb(0 0 0 / 0.72) calc(var(--x-scrim-w) + 4%),
306
+ rgb(0 0 0 / 0.45) calc(var(--x-scrim-w) + 10%),
307
+ rgb(0 0 0 / 0.2) calc(var(--x-scrim-w) + 18%),
308
+ rgb(0 0 0 / 0.06) calc(var(--x-scrim-w) + 26%),
309
+ rgb(0 0 0 / 0) calc(var(--x-scrim-w) + 34%)
310
+ );
311
+ }
312
+ }
313
+ </style>
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@xenterprises/nuxt-x-marketing",
3
3
  "license": "SEE LICENSE IN LICENSE",
4
4
  "type": "module",
5
- "version": "1.5.2",
5
+ "version": "1.6.0",
6
6
  "main": "./nuxt.config.ts",
7
7
  "scripts": {
8
8
  "dev": "nuxi dev .playground",