@mindful-web/marko-web-digital-edition 1.95.0 → 1.96.2

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.
@@ -5,7 +5,8 @@ $ const { manifest, item, eager, inline } = input;
5
5
  $ const entity = adEntity(manifest, item, { placement: inline ? "inline" : "after" });
6
6
  $ const page = item.printPage;
7
7
  $ const src = cropUrl(manifest, page, item.bbox, { w: inline ? 640 : 1200 });
8
- $ const srcset = cropSrcset(manifest, page, item.bbox, inline ? [320, 480, 640, 800] : undefined);
8
+ $ // Inline slot tops out at 352px (see sizes), so 800w is 2x and 1200w covers 3x phones.
9
+ $ const srcset = cropSrcset(manifest, page, item.bbox, inline ? [320, 480, 640, 800, 1200] : undefined);
9
10
  $ const sizes = inline ? "(min-width: 75rem) 352px, (min-width: 48rem) 288px, (min-width: 34rem) 46vw, calc(100vw - 2rem)" : "(min-width: 768px) 700px, 100vw";
10
11
  $ const alt = item.advertiserName ? `Advertisement: ${item.advertiserName}` : "Advertisement";
11
12
  $ const label = item.kind === "advertorial" ? "Sponsored" : "Advertisement";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-digital-edition$1.95.0/components/ad.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-digital-edition$1.96.2/components/ad.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_lib_module = require("../lib"),
8
8
  lib_module = module_lib_module.default || module_lib_module,
@@ -29,7 +29,9 @@ function render(input, out, __component, component, state) {
29
29
 
30
30
  const src = cropUrl(manifest, page, item.bbox, { w: inline ? 640 : 1200 });
31
31
 
32
- const srcset = cropSrcset(manifest, page, item.bbox, inline ? [320, 480, 640, 800] : undefined);
32
+ // Inline slot tops out at 352px (see sizes), so 800w is 2x and 1200w covers 3x phones.
33
+
34
+ const srcset = cropSrcset(manifest, page, item.bbox, inline ? [320, 480, 640, 800, 1200] : undefined);
33
35
 
34
36
  const sizes = inline ? "(min-width: 75rem) 352px, (min-width: 48rem) 288px, (min-width: 34rem) 46vw, calc(100vw - 2rem)" : "(min-width: 768px) 700px, 100vw";
35
37
 
@@ -98,5 +100,5 @@ marko_template._ = marko_renderer(render, {
98
100
  });
99
101
 
100
102
  marko_template.meta = {
101
- id: "/@mindful-web/marko-web-digital-edition$1.95.0/components/ad.marko"
103
+ id: "/@mindful-web/marko-web-digital-edition$1.96.2/components/ad.marko"
102
104
  };
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-digital-edition$1.95.0/components/article-body.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-digital-edition$1.96.2/components/article-body.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_lib_module = require("../lib"),
8
8
  lib_module = module_lib_module.default || module_lib_module,
@@ -178,7 +178,7 @@ marko_template._ = marko_renderer(render, {
178
178
  });
179
179
 
180
180
  marko_template.meta = {
181
- id: "/@mindful-web/marko-web-digital-edition$1.95.0/components/article-body.marko",
181
+ id: "/@mindful-web/marko-web-digital-edition$1.96.2/components/article-body.marko",
182
182
  tags: [
183
183
  "./author.marko",
184
184
  "./ad.marko"
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-digital-edition$1.95.0/components/author.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-digital-edition$1.96.2/components/author.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
8
8
  helpers_escape_xml = require("marko/dist/runtime/html/helpers/escape-xml"),
@@ -55,5 +55,5 @@ marko_template._ = marko_renderer(render, {
55
55
  });
56
56
 
57
57
  marko_template.meta = {
58
- id: "/@mindful-web/marko-web-digital-edition$1.95.0/components/author.marko"
58
+ id: "/@mindful-web/marko-web-digital-edition$1.96.2/components/author.marko"
59
59
  };
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-digital-edition$1.95.0/components/gate.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-digital-edition$1.96.2/components/gate.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
8
8
  defaultValue = module_defaultValue.default || module_defaultValue,
@@ -139,7 +139,7 @@ marko_template._ = marko_renderer(render, {
139
139
  });
140
140
 
141
141
  marko_template.meta = {
142
- id: "/@mindful-web/marko-web-digital-edition$1.95.0/components/gate.marko",
142
+ id: "/@mindful-web/marko-web-digital-edition$1.96.2/components/gate.marko",
143
143
  tags: [
144
144
  "@mindful-web/marko-web-identity-x/components/form-profile.marko",
145
145
  "@mindful-web/marko-web-identity-x/components/form-login.marko"
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-digital-edition$1.95.0/components/ld-json.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-digital-edition$1.96.2/components/ld-json.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_lib_module = require("../lib"),
8
8
  lib_module = module_lib_module.default || module_lib_module,
@@ -25,5 +25,5 @@ marko_template._ = marko_renderer(render, {
25
25
  });
26
26
 
27
27
  marko_template.meta = {
28
- id: "/@mindful-web/marko-web-digital-edition$1.95.0/components/ld-json.marko"
28
+ id: "/@mindful-web/marko-web-digital-edition$1.96.2/components/ld-json.marko"
29
29
  };
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-digital-edition$1.95.0/components/reflow.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-digital-edition$1.96.2/components/reflow.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_lib_module = require("../lib"),
8
8
  lib_module = module_lib_module.default || module_lib_module,
@@ -98,7 +98,7 @@ marko_template._ = marko_renderer(render, {
98
98
  });
99
99
 
100
100
  marko_template.meta = {
101
- id: "/@mindful-web/marko-web-digital-edition$1.95.0/components/reflow.marko",
101
+ id: "/@mindful-web/marko-web-digital-edition$1.96.2/components/reflow.marko",
102
102
  tags: [
103
103
  "./toc.marko",
104
104
  "./article-body.marko"
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-digital-edition$1.95.0/components/replica.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-digital-edition$1.96.2/components/replica.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_lib_module = require("../lib"),
8
8
  lib_module = module_lib_module.default || module_lib_module,
@@ -124,5 +124,5 @@ marko_template._ = marko_renderer(render, {
124
124
  });
125
125
 
126
126
  marko_template.meta = {
127
- id: "/@mindful-web/marko-web-digital-edition$1.95.0/components/replica.marko"
127
+ id: "/@mindful-web/marko-web-digital-edition$1.96.2/components/replica.marko"
128
128
  };
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-digital-edition$1.95.0/components/scroll.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-digital-edition$1.96.2/components/scroll.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer");
7
7
 
8
8
  function render(input, out, __component, component, state) {
@@ -19,5 +19,5 @@ marko_template._ = marko_renderer(render, {
19
19
  });
20
20
 
21
21
  marko_template.meta = {
22
- id: "/@mindful-web/marko-web-digital-edition$1.95.0/components/scroll.marko"
22
+ id: "/@mindful-web/marko-web-digital-edition$1.96.2/components/scroll.marko"
23
23
  };
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-digital-edition$1.95.0/components/theme.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-digital-edition$1.96.2/components/theme.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  helpers_escape_xml = require("marko/dist/runtime/html/helpers/escape-xml"),
8
8
  marko_escapeXml = helpers_escape_xml.x,
@@ -26,5 +26,5 @@ marko_template._ = marko_renderer(render, {
26
26
  });
27
27
 
28
28
  marko_template.meta = {
29
- id: "/@mindful-web/marko-web-digital-edition$1.95.0/components/theme.marko"
29
+ id: "/@mindful-web/marko-web-digital-edition$1.96.2/components/theme.marko"
30
30
  };
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-digital-edition$1.95.0/components/toc.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-digital-edition$1.96.2/components/toc.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_lib_module = require("../lib"),
8
8
  lib_module = module_lib_module.default || module_lib_module,
@@ -49,5 +49,5 @@ marko_template._ = marko_renderer(render, {
49
49
  });
50
50
 
51
51
  marko_template.meta = {
52
- id: "/@mindful-web/marko-web-digital-edition$1.95.0/components/toc.marko"
52
+ id: "/@mindful-web/marko-web-digital-edition$1.96.2/components/toc.marko"
53
53
  };
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-digital-edition$1.95.0/components/toolbar.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-digital-edition$1.96.2/components/toolbar.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_lib_module = require("../lib"),
8
8
  lib_module = module_lib_module.default || module_lib_module,
@@ -50,5 +50,5 @@ marko_template._ = marko_renderer(render, {
50
50
  });
51
51
 
52
52
  marko_template.meta = {
53
- id: "/@mindful-web/marko-web-digital-edition$1.95.0/components/toolbar.marko"
53
+ id: "/@mindful-web/marko-web-digital-edition$1.96.2/components/toolbar.marko"
54
54
  };
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-digital-edition$1.95.0/components/tracking.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-digital-edition$1.96.2/components/tracking.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_entities_module = require("../lib/entities"),
8
8
  entities_module = module_entities_module.default || module_entities_module,
@@ -53,7 +53,7 @@ marko_template._ = marko_renderer(render, {
53
53
  });
54
54
 
55
55
  marko_template.meta = {
56
- id: "/@mindful-web/marko-web-digital-edition$1.95.0/components/tracking.marko",
56
+ id: "/@mindful-web/marko-web-digital-edition$1.96.2/components/tracking.marko",
57
57
  tags: [
58
58
  "@mindful-web/marko-web-p1-events/components/track-engagement.marko"
59
59
  ]
package/lib/index.js CHANGED
@@ -85,12 +85,19 @@ const cropUrl = (manifest, page, bbox, {
85
85
  })}`;
86
86
  };
87
87
 
88
- /** `srcset` across a few widths, so phones don't pull a 1600px page image. */
89
- const pageSrcset = (manifest, page, widths = [480, 800, 1200, 1600]) => widths
88
+ /**
89
+ * `srcset` ladders. imgix rasterises the PDF at the requested output width (verified:
90
+ * a w=1200 crop is crisp, not an upscaled 72dpi render), so the ladder decides the
91
+ * sharpness a reader actually sees. Each ladder must reach at least 2x the widest
92
+ * slot its `sizes` attribute declares, or a retina display picks the top rung and
93
+ * renders soft — the replica page slot is 62rem (992px) → 2000w; the lead image and
94
+ * trailing ad slots are 672px / 700px → 1600w. Phones still get the small rungs.
95
+ */
96
+ const pageSrcset = (manifest, page, widths = [480, 800, 1200, 1600, 2000]) => widths
90
97
  .map((w) => `${pageImageUrl(manifest, page, { w })} ${w}w`)
91
98
  .join(', ');
92
99
 
93
- const cropSrcset = (manifest, page, bbox, widths = [480, 800, 1200]) => widths
100
+ const cropSrcset = (manifest, page, bbox, widths = [480, 800, 1200, 1600]) => widths
94
101
  .map((w) => `${cropUrl(manifest, page, bbox, { w })} ${w}w`)
95
102
  .join(', ');
96
103
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindful-web/marko-web-digital-edition",
3
- "version": "1.95.0",
3
+ "version": "1.96.2",
4
4
  "description": "Native digital edition (reflow + replica readers) for magazine issues, driven by an ingest manifest, for Mindful Web/Marko websites.",
5
5
  "author": "Brandon Krigbaum <brandon@parameter1.com>",
6
6
  "license": "MIT",
@@ -29,5 +29,5 @@
29
29
  "publishConfig": {
30
30
  "access": "public"
31
31
  },
32
- "gitHead": "ca256c07007f7e4bed54d6e7b79df0f53b0b3a0a"
32
+ "gitHead": "252287ac49a2bd72af862974c464698ccdf806e5"
33
33
  }
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-digital-edition$1.95.0/templates/article.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-digital-edition$1.96.2/templates/article.marko",
6
6
  marko_component = require("./article.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_lib_module = require("../lib"),
@@ -220,7 +220,7 @@ marko_template._ = marko_renderer(render, {
220
220
  }, marko_component);
221
221
 
222
222
  marko_template.meta = {
223
- id: "/@mindful-web/marko-web-digital-edition$1.95.0/templates/article.marko",
223
+ id: "/@mindful-web/marko-web-digital-edition$1.96.2/templates/article.marko",
224
224
  component: "./article.marko",
225
225
  tags: [
226
226
  "@mindful-web/marko-web/components/page/metadata/default.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-digital-edition$1.95.0/templates/hub.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-digital-edition$1.96.2/templates/hub.marko",
6
6
  marko_component = require("./hub.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_lib_module = require("../lib"),
@@ -199,7 +199,7 @@ marko_template._ = marko_renderer(render, {
199
199
  }, marko_component);
200
200
 
201
201
  marko_template.meta = {
202
- id: "/@mindful-web/marko-web-digital-edition$1.95.0/templates/hub.marko",
202
+ id: "/@mindful-web/marko-web-digital-edition$1.96.2/templates/hub.marko",
203
203
  component: "./hub.marko",
204
204
  tags: [
205
205
  "@mindful-web/marko-web/components/page/metadata/default.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-digital-edition$1.95.0/templates/partial.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-digital-edition$1.96.2/templates/partial.marko",
6
6
  marko_component = require("./partial.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  marko_web_digital_edition_article_template = require("../components/article-body.marko"),
@@ -35,7 +35,7 @@ marko_template._ = marko_renderer(render, {
35
35
  }, marko_component);
36
36
 
37
37
  marko_template.meta = {
38
- id: "/@mindful-web/marko-web-digital-edition$1.95.0/templates/partial.marko",
38
+ id: "/@mindful-web/marko-web-digital-edition$1.96.2/templates/partial.marko",
39
39
  component: "./partial.marko",
40
40
  tags: [
41
41
  "../components/article-body.marko",