@parameter1/base-cms-marko-web 4.0.0 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. package/browser/index.js +13 -11
  2. package/components/browser-component.marko.js +10 -10
  3. package/components/document/components/body-wrapper.marko.js +8 -8
  4. package/components/document/components/error.marko.js +9 -9
  5. package/components/document/components/live-reload.marko.js +7 -7
  6. package/components/document/components/polyfill.marko.js +7 -7
  7. package/components/document/container.marko.js +9 -9
  8. package/components/document/index.marko +1 -1
  9. package/components/document/index.marko.js +18 -18
  10. package/components/element/array.marko.js +9 -9
  11. package/components/element/audio.marko.js +8 -8
  12. package/components/element/block.marko.js +8 -8
  13. package/components/element/clear.marko.js +7 -7
  14. package/components/element/components/image.marko.js +7 -7
  15. package/components/element/components/text.marko.js +9 -9
  16. package/components/element/content/address1.marko.js +8 -8
  17. package/components/element/content/address2.marko.js +8 -8
  18. package/components/element/content/audio.marko.js +8 -8
  19. package/components/element/content/authors.marko.js +7 -7
  20. package/components/element/content/body.marko.js +8 -8
  21. package/components/element/content/byline.marko.js +8 -8
  22. package/components/element/content/city-state-zip.marko.js +8 -8
  23. package/components/element/content/contributors.marko.js +7 -7
  24. package/components/element/content/country.marko.js +8 -8
  25. package/components/element/content/embed-code.marko.js +8 -8
  26. package/components/element/content/end-date.marko.js +8 -8
  27. package/components/element/content/ends.marko.js +8 -8
  28. package/components/element/content/fax.marko.js +8 -8
  29. package/components/element/content/images.marko.js +7 -7
  30. package/components/element/content/mobile.marko.js +8 -8
  31. package/components/element/content/name.marko.js +8 -8
  32. package/components/element/content/phone.marko.js +8 -8
  33. package/components/element/content/photographers.marko.js +7 -7
  34. package/components/element/content/public-email.marko.js +8 -8
  35. package/components/element/content/published.marko.js +8 -8
  36. package/components/element/content/short-name.marko.js +8 -8
  37. package/components/element/content/sidebar-stubs.marko.js +7 -7
  38. package/components/element/content/sidebars.marko.js +7 -7
  39. package/components/element/content/source.marko.js +8 -8
  40. package/components/element/content/sponsors.marko.js +7 -7
  41. package/components/element/content/start-date.marko.js +8 -8
  42. package/components/element/content/starts.marko.js +8 -8
  43. package/components/element/content/teaser.marko.js +8 -8
  44. package/components/element/content/title.marko.js +8 -8
  45. package/components/element/content/tollfree.marko.js +8 -8
  46. package/components/element/content/transcript.marko.js +8 -8
  47. package/components/element/content/website.marko.js +8 -8
  48. package/components/element/date.marko.js +7 -7
  49. package/components/element/image/caption.marko.js +8 -8
  50. package/components/element/image/credit.marko.js +8 -8
  51. package/components/element/image/display-name.marko.js +8 -8
  52. package/components/element/image/slider.marko.js +7 -7
  53. package/components/element/img.marko.js +8 -8
  54. package/components/element/index.marko.js +8 -8
  55. package/components/element/link.marko.js +8 -8
  56. package/components/element/magazine-issue/description.marko.js +8 -8
  57. package/components/element/magazine-issue/digital-edition-url.marko.js +8 -8
  58. package/components/element/magazine-issue/name.marko.js +8 -8
  59. package/components/element/magazine-issue/pdf-url.marko.js +8 -8
  60. package/components/element/magazine-publication/cancel-url.marko.js +8 -8
  61. package/components/element/magazine-publication/change-address-url.marko.js +8 -8
  62. package/components/element/magazine-publication/description.marko.js +8 -8
  63. package/components/element/magazine-publication/einquiry-url.marko.js +8 -8
  64. package/components/element/magazine-publication/name.marko.js +8 -8
  65. package/components/element/magazine-publication/renewal-url.marko.js +8 -8
  66. package/components/element/magazine-publication/reprints-url.marko.js +8 -8
  67. package/components/element/magazine-publication/subscribe-url.marko.js +8 -8
  68. package/components/element/obj-array.marko.js +7 -7
  69. package/components/element/obj-audio.marko.js +7 -7
  70. package/components/element/obj-date.marko.js +7 -7
  71. package/components/element/obj-nodes.marko.js +7 -7
  72. package/components/element/obj-text.marko.js +7 -7
  73. package/components/element/obj.marko.js +7 -7
  74. package/components/element/picture.marko.js +9 -9
  75. package/components/element/text.marko.js +9 -9
  76. package/components/element/website-section/description.marko.js +8 -8
  77. package/components/element/website-section/hierarchy.marko.js +7 -7
  78. package/components/element/website-section/name.marko.js +8 -8
  79. package/components/load-more/index.marko.js +9 -9
  80. package/components/load-more/trigger.marko.js +7 -7
  81. package/components/node/body.marko.js +9 -9
  82. package/components/node/element.marko.js +8 -8
  83. package/components/node/footer.marko.js +8 -8
  84. package/components/node/header.marko.js +8 -8
  85. package/components/node/image-inner-wrapper.marko.js +9 -9
  86. package/components/node/image-wrapper.marko.js +8 -8
  87. package/components/node/image.marko.js +8 -8
  88. package/components/node/index.marko.js +9 -9
  89. package/components/node-list/body.marko.js +8 -8
  90. package/components/node-list/element.marko.js +8 -8
  91. package/components/node-list/footer.marko.js +8 -8
  92. package/components/node-list/header.marko.js +8 -8
  93. package/components/node-list/index.marko.js +8 -8
  94. package/components/node-list/node.marko.js +8 -8
  95. package/components/node-list/nodes.marko.js +10 -10
  96. package/components/page/container.marko.js +8 -8
  97. package/components/page/description.marko.js +7 -7
  98. package/components/page/image.marko.js +8 -8
  99. package/components/page/layouts/content.marko.js +8 -8
  100. package/components/page/layouts/default.marko.js +8 -8
  101. package/components/page/layouts/dynamic-page.marko.js +8 -8
  102. package/components/page/layouts/magazine-issue.marko.js +8 -8
  103. package/components/page/layouts/magazine-publication.marko.js +8 -8
  104. package/components/page/layouts/website-section.marko.js +8 -8
  105. package/components/page/metadata/components/common.marko.js +7 -7
  106. package/components/page/metadata/content.marko.js +9 -9
  107. package/components/page/metadata/default.marko.js +7 -7
  108. package/components/page/metadata/dynamic-page.marko.js +6 -6
  109. package/components/page/metadata/magazine-issue.marko.js +6 -6
  110. package/components/page/metadata/magazine-publication.marko.js +6 -6
  111. package/components/page/metadata/website-section.marko.js +6 -6
  112. package/components/page/rel-canonical.marko.js +8 -8
  113. package/components/page/title.marko.js +8 -8
  114. package/components/page/wrapper.marko.js +10 -10
  115. package/components/resolve/page.marko.js +7 -7
  116. package/components/rss/website-section.marko.js +7 -7
  117. package/config/asset-manifest.js +3 -3
  118. package/eslint.log +3 -0
  119. package/package.json +16 -16
  120. package/scss/node.scss +3 -1
  121. package/.eslintrc.js +0 -9
  122. package/express/marko.js +0 -36
@@ -1,13 +1,13 @@
1
1
  // Compiled using marko@4.20.2 - DO NOT EDIT
2
2
  "use strict";
3
3
 
4
- var marko_template = module.exports = require("marko/src/html").t(__filename),
5
- marko_componentType = "/@parameter1/base-cms-marko-web$4.0.0/components/rss/website-section.marko",
6
- marko_renderer = require("marko/src/runtime/components/renderer"),
4
+ var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
+ marko_componentType = "/@parameter1/base-cms-marko-web$4.1.0/components/rss/website-section.marko",
6
+ marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_url_module = require("url"),
8
8
  url_module = module_url_module.default || module_url_module,
9
9
  URLSearchParams = module_url_module.URLSearchParams,
10
- marko_attr = require("marko/src/runtime/html/helpers/attr");
10
+ marko_attr = require("marko/dist/runtime/html/helpers/attr");
11
11
 
12
12
  function render(input, out, __component, component, state) {
13
13
  var data = input;
@@ -37,10 +37,10 @@ function render(input, out, __component, component, state) {
37
37
  }
38
38
 
39
39
  marko_template._ = marko_renderer(render, {
40
- ___implicit: true,
41
- ___type: marko_componentType
40
+ d_: true,
41
+ e_: marko_componentType
42
42
  });
43
43
 
44
44
  marko_template.meta = {
45
- id: "/@parameter1/base-cms-marko-web$4.0.0/components/rss/website-section.marko"
45
+ id: "/@parameter1/base-cms-marko-web$4.1.0/components/rss/website-section.marko"
46
46
  };
@@ -8,7 +8,7 @@ class AssetManifest {
8
8
  js() {
9
9
  if (!this.scripts) {
10
10
  const { js } = this.load();
11
- this.scripts = [js['main.js']];
11
+ this.scripts = [js['browser/index.js']];
12
12
  }
13
13
  return this.scripts;
14
14
  }
@@ -16,7 +16,7 @@ class AssetManifest {
16
16
  css() {
17
17
  if (!this.stylesheets) {
18
18
  const { css } = this.load();
19
- this.stylesheets = [css['main.css']];
19
+ this.stylesheets = [css['server/styles/index.scss']];
20
20
  }
21
21
  return this.stylesheets;
22
22
  }
@@ -36,7 +36,7 @@ class AssetManifest {
36
36
  const distFolder = distDir.split('/').pop();
37
37
  // eslint-disable-next-line global-require, import/no-dynamic-require
38
38
  const json = require(join(distDir, type, 'manifest.json'));
39
- return Object.keys(json).reduce((o, k) => ({ ...o, [k]: join('/', distFolder, type, json[k]) }), {});
39
+ return Object.keys(json).reduce((o, k) => ({ ...o, [k]: join('/', distFolder, type, json[k].file) }), {});
40
40
  }
41
41
  }
42
42
 
package/eslint.log ADDED
@@ -0,0 +1,3 @@
1
+ yarn run v1.22.10
2
+ $ eslint --ext .js --ext .vue --max-warnings 5 ./
3
+ Done in 3.75s.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parameter1/base-cms-marko-web",
3
- "version": "4.0.0",
3
+ "version": "4.1.0",
4
4
  "description": "Core Marko+Express components for BaseCMS websites",
5
5
  "author": "Jacob Bare <jacob@parameter1.com>",
6
6
  "main": "index.js",
@@ -23,20 +23,20 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@godaddy/terminus": "^4.11.2",
26
- "@parameter1/base-cms-apollo-ssr": "^4.0.0",
27
- "@parameter1/base-cms-dayjs": "^4.0.0",
28
- "@parameter1/base-cms-embedded-media": "^4.0.0",
29
- "@parameter1/base-cms-express-apollo": "^4.0.0",
30
- "@parameter1/base-cms-graphql-fragment-types": "^4.0.0",
31
- "@parameter1/base-cms-image": "^4.0.0",
32
- "@parameter1/base-cms-inflector": "^4.0.0",
33
- "@parameter1/base-cms-marko-express": "^4.0.0",
34
- "@parameter1/base-cms-marko-node-require": "^4.0.0",
35
- "@parameter1/base-cms-marko-web-deferred-script-loader": "^4.0.0",
36
- "@parameter1/base-cms-object-path": "^4.0.0",
37
- "@parameter1/base-cms-tenant-context": "^4.0.0",
38
- "@parameter1/base-cms-utils": "^4.0.0",
39
- "@parameter1/base-cms-web-common": "^4.0.0",
26
+ "@parameter1/base-cms-apollo-ssr": "^4.0.2",
27
+ "@parameter1/base-cms-dayjs": "^4.0.2",
28
+ "@parameter1/base-cms-embedded-media": "^4.0.2",
29
+ "@parameter1/base-cms-express-apollo": "^4.0.2",
30
+ "@parameter1/base-cms-graphql-fragment-types": "^4.0.2",
31
+ "@parameter1/base-cms-image": "^4.0.2",
32
+ "@parameter1/base-cms-inflector": "^4.0.2",
33
+ "@parameter1/base-cms-marko-express": "^4.0.2",
34
+ "@parameter1/base-cms-marko-node-require": "^4.0.2",
35
+ "@parameter1/base-cms-marko-web-deferred-script-loader": "^4.1.0",
36
+ "@parameter1/base-cms-object-path": "^4.0.2",
37
+ "@parameter1/base-cms-tenant-context": "^4.0.2",
38
+ "@parameter1/base-cms-utils": "^4.0.2",
39
+ "@parameter1/base-cms-web-common": "^4.0.2",
40
40
  "cheerio": "^1.0.0-rc.12",
41
41
  "cookie-parser": "^1.4.6",
42
42
  "express": "^4.18.2",
@@ -56,5 +56,5 @@
56
56
  "publishConfig": {
57
57
  "access": "public"
58
58
  },
59
- "gitHead": "5a70f4f025093e8aa62949b6732ba86647dc7aa1"
59
+ "gitHead": "8a5353f4c06ccc6b21a0fb99220cb9f992107cde"
60
60
  }
package/scss/node.scss CHANGED
@@ -1,4 +1,6 @@
1
1
 
2
+ @use "sass:math";
3
+
2
4
  $marko-web-node-image-aspect-ratios: () !default;
3
5
  // stylelint-disable-next-line scss/dollar-variable-default
4
6
  $marko-web-node-image-aspect-ratios: join(
@@ -38,7 +40,7 @@ $marko-web-node-placeholder-image-opacity: .2 !default;
38
40
  display: block;
39
41
  content: "";
40
42
  @if $ratio-y and $ratio-x {
41
- padding-top: percentage($ratio-y / $ratio-x);
43
+ padding-top: percentage(math.div($ratio-y, $ratio-x));
42
44
  }
43
45
  }
44
46
  }
package/.eslintrc.js DELETED
@@ -1,9 +0,0 @@
1
- module.exports = {
2
- settings: {
3
- 'import/resolver': {
4
- node: {
5
- extensions: ['.js', '.marko'],
6
- },
7
- },
8
- },
9
- };
package/express/marko.js DELETED
@@ -1,36 +0,0 @@
1
- /* eslint-disable no-underscore-dangle */
2
- require('marko');
3
- const buildGlobal = require('@parameter1/base-cms-marko-core/utils/build-marko-global');
4
-
5
- // eslint-disable-next-line import/no-extraneous-dependencies
6
- const express = module.main ? module.main.require('express') : require('express');
7
-
8
- if (!express) throw new Error('Unable to load Express.');
9
-
10
- const patch = (response) => {
11
- response.marko = response.marko || function markoResponse(template, data) {
12
- if (typeof template === 'string') throw new Error('res.marko does not accept a string or path as a template.');
13
-
14
- const res = this;
15
- const { req } = res;
16
- res.set({ 'content-type': 'text/html; charset=utf-8' });
17
- const $global = buildGlobal(res, data);
18
- return template.render({ ...(data || {}), $global }, res).on('error', req.next);
19
- };
20
- };
21
-
22
- patch(express.response);
23
- delete require.cache[__filename];
24
-
25
- module.exports = () => {
26
- const app = express();
27
- app.once('mount', (parent) => {
28
- patch(parent.response);
29
- if (parent._router) {
30
- parent._router.stack.pop(); // express <= 4.x
31
- } else {
32
- parent.router.stack.pop(); // express 5.x
33
- }
34
- });
35
- return app;
36
- };