@mindful-web/marko-web-digital-edition 1.95.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.
Files changed (41) hide show
  1. package/.eslintignore +1 -0
  2. package/LICENSE +21 -0
  3. package/README.md +121 -0
  4. package/components/ad.marko +81 -0
  5. package/components/ad.marko.js +102 -0
  6. package/components/article-body.marko +134 -0
  7. package/components/article-body.marko.js +186 -0
  8. package/components/author.marko +30 -0
  9. package/components/author.marko.js +59 -0
  10. package/components/gate.marko +158 -0
  11. package/components/gate.marko.js +147 -0
  12. package/components/ld-json.marko +5 -0
  13. package/components/ld-json.marko.js +29 -0
  14. package/components/marko.json +78 -0
  15. package/components/reflow.marko +67 -0
  16. package/components/reflow.marko.js +106 -0
  17. package/components/replica.marko +86 -0
  18. package/components/replica.marko.js +128 -0
  19. package/components/scroll.marko +134 -0
  20. package/components/scroll.marko.js +23 -0
  21. package/components/theme.marko +73 -0
  22. package/components/theme.marko.js +30 -0
  23. package/components/toc.marko +28 -0
  24. package/components/toc.marko.js +53 -0
  25. package/components/toolbar.marko +47 -0
  26. package/components/toolbar.marko.js +54 -0
  27. package/components/tracking.marko +211 -0
  28. package/components/tracking.marko.js +60 -0
  29. package/lib/authors.js +125 -0
  30. package/lib/entities.js +97 -0
  31. package/lib/index.js +453 -0
  32. package/marko.json +6 -0
  33. package/package.json +33 -0
  34. package/routes/index.js +129 -0
  35. package/scss/index.scss +679 -0
  36. package/templates/article.marko +108 -0
  37. package/templates/article.marko.js +238 -0
  38. package/templates/hub.marko +94 -0
  39. package/templates/hub.marko.js +219 -0
  40. package/templates/partial.marko +17 -0
  41. package/templates/partial.marko.js +44 -0
@@ -0,0 +1,17 @@
1
+ $ const { manifest, item } = data;
2
+
3
+ <!--
4
+ Fragment served for `?partial=1` — the scroll reader appends this. No page shell, no
5
+ <html>: just the article (its print-adjacent ads render INSIDE it — inline floats in
6
+ the body, the rest trailing within <article>), so an appended article is
7
+ byte-identical to the standalone page's AND the fragment stays single-child for the
8
+ scroll reader's append loop.
9
+
10
+ Gating goes through the SAME access component the page uses, rather than a second
11
+ entitlement check in the route, so an appended article can never be more permissive
12
+ than the page it came from.
13
+ -->
14
+ <marko-web-identity-x-access|context| enabled=true>
15
+ $ const canAccess = Boolean(context && context.canAccess);
16
+ <marko-web-digital-edition-article manifest=manifest item=item can-access=canAccess />
17
+ </marko-web-identity-x-access>
@@ -0,0 +1,44 @@
1
+ // Compiled using marko@4.20.2 - DO NOT EDIT
2
+ "use strict";
3
+
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",
6
+ marko_component = require("./partial.marko"),
7
+ marko_renderer = require("marko/dist/runtime/components/renderer"),
8
+ marko_web_digital_edition_article_template = require("../components/article-body.marko"),
9
+ marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
10
+ marko_web_digital_edition_article_tag = marko_loadTag(marko_web_digital_edition_article_template),
11
+ marko_web_identity_x_access_template = require("@mindful-web/marko-web-identity-x/components/access.marko"),
12
+ marko_web_identity_x_access_tag = marko_loadTag(marko_web_identity_x_access_template);
13
+
14
+ function render(input, out, __component, component, state) {
15
+ var data = input;
16
+
17
+ const { manifest, item } = data;
18
+
19
+ marko_web_identity_x_access_tag({
20
+ enabled: true,
21
+ renderBody: function(out, context) {
22
+ const canAccess = Boolean(context && context.canAccess);
23
+
24
+ marko_web_digital_edition_article_tag({
25
+ manifest: manifest,
26
+ item: item,
27
+ canAccess: canAccess
28
+ }, out, __component, "1");
29
+ }
30
+ }, out, __component, "0");
31
+ }
32
+
33
+ marko_template._ = marko_renderer(render, {
34
+ e_: marko_componentType
35
+ }, marko_component);
36
+
37
+ marko_template.meta = {
38
+ id: "/@mindful-web/marko-web-digital-edition$1.95.0/templates/partial.marko",
39
+ component: "./partial.marko",
40
+ tags: [
41
+ "../components/article-body.marko",
42
+ "@mindful-web/marko-web-identity-x/components/access.marko"
43
+ ]
44
+ };