@mindful-web/marko-web 1.0.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/.eslintignore +3 -0
- package/LICENSE +21 -0
- package/browser/.eslintrc.js +1 -0
- package/browser/components/element-id.js +1 -0
- package/browser/components/gated-download/wufoo.vue +97 -0
- package/browser/components/image-slide.vue +54 -0
- package/browser/components/image-slider.vue +87 -0
- package/browser/components/index.js +15 -0
- package/browser/components/load-more-trigger.vue +129 -0
- package/browser/components/oembed.vue +133 -0
- package/browser/components/trigger-in-view-event.vue +41 -0
- package/browser/components/trigger-screen-change-event.vue +94 -0
- package/browser/event-bus.js +5 -0
- package/browser/index.js +83 -0
- package/browser/jquery-full.js +3 -0
- package/browser/jquery.js +3 -0
- package/browser/utils/clean-path.js +4 -0
- package/browser/vue.js +3 -0
- package/components/browser-component/script.marko +10 -0
- package/components/browser-component/script.marko.js +39 -0
- package/components/browser-component.marko +25 -0
- package/components/browser-component.marko.js +75 -0
- package/components/deferred-stylesheet.marko +6 -0
- package/components/deferred-stylesheet.marko.js +28 -0
- package/components/document/components/body-wrapper.marko +8 -0
- package/components/document/components/body-wrapper.marko.js +33 -0
- package/components/document/components/error.marko +26 -0
- package/components/document/components/error.marko.js +88 -0
- package/components/document/components/live-reload.marko +7 -0
- package/components/document/components/live-reload.marko.js +30 -0
- package/components/document/components/polyfill.marko +8 -0
- package/components/document/components/polyfill.marko.js +33 -0
- package/components/document/components/styles.marko +20 -0
- package/components/document/components/styles.marko.js +61 -0
- package/components/document/container.marko +15 -0
- package/components/document/container.marko.js +54 -0
- package/components/document/index.marko +63 -0
- package/components/document/index.marko.js +139 -0
- package/components/document/marko.json +46 -0
- package/components/element/array.marko +19 -0
- package/components/element/array.marko.js +67 -0
- package/components/element/audio.marko +5 -0
- package/components/element/audio.marko.js +33 -0
- package/components/element/block.marko +11 -0
- package/components/element/block.marko.js +44 -0
- package/components/element/clear.marko +4 -0
- package/components/element/clear.marko.js +32 -0
- package/components/element/components/image.marko +32 -0
- package/components/element/components/image.marko.js +62 -0
- package/components/element/components/text.marko +11 -0
- package/components/element/components/text.marko.js +37 -0
- package/components/element/content/address1.marko +14 -0
- package/components/element/content/address1.marko.js +40 -0
- package/components/element/content/address2.marko +14 -0
- package/components/element/content/address2.marko.js +40 -0
- package/components/element/content/audio.marko +13 -0
- package/components/element/content/audio.marko.js +39 -0
- package/components/element/content/authors.marko +12 -0
- package/components/element/content/authors.marko.js +43 -0
- package/components/element/content/body.marko +28 -0
- package/components/element/content/body.marko.js +66 -0
- package/components/element/content/byline.marko +15 -0
- package/components/element/content/byline.marko.js +41 -0
- package/components/element/content/city-state-zip.marko +14 -0
- package/components/element/content/city-state-zip.marko.js +40 -0
- package/components/element/content/contributors.marko +12 -0
- package/components/element/content/contributors.marko.js +43 -0
- package/components/element/content/country.marko +14 -0
- package/components/element/content/country.marko.js +40 -0
- package/components/element/content/embed-code.marko +15 -0
- package/components/element/content/embed-code.marko.js +41 -0
- package/components/element/content/end-date.marko +17 -0
- package/components/element/content/end-date.marko.js +43 -0
- package/components/element/content/ends.marko +14 -0
- package/components/element/content/ends.marko.js +40 -0
- package/components/element/content/fax.marko +14 -0
- package/components/element/content/fax.marko.js +40 -0
- package/components/element/content/images.marko +12 -0
- package/components/element/content/images.marko.js +43 -0
- package/components/element/content/marko.json +328 -0
- package/components/element/content/mobile.marko +14 -0
- package/components/element/content/mobile.marko.js +40 -0
- package/components/element/content/name.marko +15 -0
- package/components/element/content/name.marko.js +41 -0
- package/components/element/content/phone.marko +14 -0
- package/components/element/content/phone.marko.js +40 -0
- package/components/element/content/photographers.marko +12 -0
- package/components/element/content/photographers.marko.js +43 -0
- package/components/element/content/public-email.marko +19 -0
- package/components/element/content/public-email.marko.js +47 -0
- package/components/element/content/published.marko +17 -0
- package/components/element/content/published.marko.js +43 -0
- package/components/element/content/short-name.marko +15 -0
- package/components/element/content/short-name.marko.js +41 -0
- package/components/element/content/sidebar-stubs.marko +24 -0
- package/components/element/content/sidebar-stubs.marko.js +63 -0
- package/components/element/content/sidebars.marko +27 -0
- package/components/element/content/sidebars.marko.js +63 -0
- package/components/element/content/source.marko +14 -0
- package/components/element/content/source.marko.js +40 -0
- package/components/element/content/sponsors.marko +12 -0
- package/components/element/content/sponsors.marko.js +43 -0
- package/components/element/content/start-date.marko +17 -0
- package/components/element/content/start-date.marko.js +43 -0
- package/components/element/content/starts.marko +14 -0
- package/components/element/content/starts.marko.js +40 -0
- package/components/element/content/teaser.marko +15 -0
- package/components/element/content/teaser.marko.js +41 -0
- package/components/element/content/title.marko +14 -0
- package/components/element/content/title.marko.js +40 -0
- package/components/element/content/tollfree.marko +14 -0
- package/components/element/content/tollfree.marko.js +40 -0
- package/components/element/content/transcript.marko +22 -0
- package/components/element/content/transcript.marko.js +53 -0
- package/components/element/content/website.marko +22 -0
- package/components/element/content/website.marko.js +51 -0
- package/components/element/date.marko +2 -0
- package/components/element/date.marko.js +27 -0
- package/components/element/extract-render.js +1 -0
- package/components/element/image/caption.marko +15 -0
- package/components/element/image/caption.marko.js +41 -0
- package/components/element/image/credit.marko +15 -0
- package/components/element/image/credit.marko.js +41 -0
- package/components/element/image/display-name.marko +14 -0
- package/components/element/image/display-name.marko.js +40 -0
- package/components/element/image/marko.json +38 -0
- package/components/element/image/slider.marko +18 -0
- package/components/element/image/slider.marko.js +50 -0
- package/components/element/img.marko +12 -0
- package/components/element/img.marko.js +43 -0
- package/components/element/index.marko +12 -0
- package/components/element/index.marko.js +47 -0
- package/components/element/link.marko +25 -0
- package/components/element/link.marko.js +54 -0
- package/components/element/magazine-issue/description.marko +14 -0
- package/components/element/magazine-issue/description.marko.js +40 -0
- package/components/element/magazine-issue/digital-edition-url.marko +22 -0
- package/components/element/magazine-issue/digital-edition-url.marko.js +51 -0
- package/components/element/magazine-issue/marko.json +42 -0
- package/components/element/magazine-issue/name.marko +14 -0
- package/components/element/magazine-issue/name.marko.js +40 -0
- package/components/element/magazine-issue/pdf-url.marko +22 -0
- package/components/element/magazine-issue/pdf-url.marko.js +51 -0
- package/components/element/magazine-publication/cancel-url.marko +22 -0
- package/components/element/magazine-publication/cancel-url.marko.js +51 -0
- package/components/element/magazine-publication/change-address-url.marko +22 -0
- package/components/element/magazine-publication/change-address-url.marko.js +51 -0
- package/components/element/magazine-publication/description.marko +14 -0
- package/components/element/magazine-publication/description.marko.js +40 -0
- package/components/element/magazine-publication/einquiry-url.marko +22 -0
- package/components/element/magazine-publication/einquiry-url.marko.js +51 -0
- package/components/element/magazine-publication/marko.json +82 -0
- package/components/element/magazine-publication/name.marko +14 -0
- package/components/element/magazine-publication/name.marko.js +40 -0
- package/components/element/magazine-publication/renewal-url.marko +22 -0
- package/components/element/magazine-publication/renewal-url.marko.js +51 -0
- package/components/element/magazine-publication/reprints-url.marko +22 -0
- package/components/element/magazine-publication/reprints-url.marko.js +51 -0
- package/components/element/magazine-publication/subscribe-url.marko +22 -0
- package/components/element/magazine-publication/subscribe-url.marko.js +51 -0
- package/components/element/marko.json +211 -0
- package/components/element/obj-array.marko +17 -0
- package/components/element/obj-array.marko.js +56 -0
- package/components/element/obj-audio.marko +20 -0
- package/components/element/obj-audio.marko.js +50 -0
- package/components/element/obj-date.marko +25 -0
- package/components/element/obj-date.marko.js +55 -0
- package/components/element/obj-nodes.marko +20 -0
- package/components/element/obj-nodes.marko.js +62 -0
- package/components/element/obj-text.marko +23 -0
- package/components/element/obj-text.marko.js +53 -0
- package/components/element/obj.marko +23 -0
- package/components/element/obj.marko.js +61 -0
- package/components/element/object-link.js +49 -0
- package/components/element/object-type.js +9 -0
- package/components/element/picture.marko +38 -0
- package/components/element/picture.marko.js +85 -0
- package/components/element/show-element.js +8 -0
- package/components/element/text.marko +37 -0
- package/components/element/text.marko.js +76 -0
- package/components/element/website-section/description.marko +16 -0
- package/components/element/website-section/description.marko.js +44 -0
- package/components/element/website-section/hierarchy.marko +19 -0
- package/components/element/website-section/hierarchy.marko.js +60 -0
- package/components/element/website-section/marko.json +31 -0
- package/components/element/website-section/name.marko +18 -0
- package/components/element/website-section/name.marko.js +46 -0
- package/components/font/google.marko +6 -0
- package/components/font/google.marko.js +41 -0
- package/components/font/link.marko +14 -0
- package/components/font/link.marko.js +45 -0
- package/components/font/marko.json +21 -0
- package/components/font/typekit.marko +5 -0
- package/components/font/typekit.marko.js +38 -0
- package/components/load-more/index.marko +53 -0
- package/components/load-more/index.marko.js +119 -0
- package/components/load-more/marko.json +30 -0
- package/components/load-more/trigger.marko +11 -0
- package/components/load-more/trigger.marko.js +40 -0
- package/components/marko.json +37 -0
- package/components/node/body.marko +40 -0
- package/components/node/body.marko.js +112 -0
- package/components/node/element.marko +6 -0
- package/components/node/element.marko.js +39 -0
- package/components/node/footer.marko +19 -0
- package/components/node/footer.marko.js +63 -0
- package/components/node/header.marko +19 -0
- package/components/node/header.marko.js +63 -0
- package/components/node/image-inner-wrapper.marko +61 -0
- package/components/node/image-inner-wrapper.marko.js +116 -0
- package/components/node/image-wrapper.marko +34 -0
- package/components/node/image-wrapper.marko.js +98 -0
- package/components/node/image.marko +51 -0
- package/components/node/image.marko.js +93 -0
- package/components/node/index.marko +35 -0
- package/components/node/index.marko.js +100 -0
- package/components/node/marko.json +189 -0
- package/components/node/utils/image-height.js +3 -0
- package/components/node/utils/image-values.js +17 -0
- package/components/node-list/body.marko +19 -0
- package/components/node-list/body.marko.js +50 -0
- package/components/node-list/element.marko +3 -0
- package/components/node-list/element.marko.js +35 -0
- package/components/node-list/footer.marko +19 -0
- package/components/node-list/footer.marko.js +50 -0
- package/components/node-list/header.marko +19 -0
- package/components/node-list/header.marko.js +50 -0
- package/components/node-list/index.marko +36 -0
- package/components/node-list/index.marko.js +93 -0
- package/components/node-list/marko.json +121 -0
- package/components/node-list/node.marko +15 -0
- package/components/node-list/node.marko.js +49 -0
- package/components/node-list/nodes.marko +82 -0
- package/components/node-list/nodes.marko.js +126 -0
- package/components/page/container.marko +13 -0
- package/components/page/container.marko.js +46 -0
- package/components/page/description.marko +4 -0
- package/components/page/description.marko.js +26 -0
- package/components/page/image.marko +50 -0
- package/components/page/image.marko.js +122 -0
- package/components/page/layouts/content.marko +23 -0
- package/components/page/layouts/content.marko.js +63 -0
- package/components/page/layouts/default.marko +20 -0
- package/components/page/layouts/default.marko.js +61 -0
- package/components/page/layouts/dynamic-page.marko +19 -0
- package/components/page/layouts/dynamic-page.marko.js +59 -0
- package/components/page/layouts/magazine-issue.marko +19 -0
- package/components/page/layouts/magazine-issue.marko.js +59 -0
- package/components/page/layouts/magazine-publication.marko +19 -0
- package/components/page/layouts/magazine-publication.marko.js +59 -0
- package/components/page/layouts/marko.json +86 -0
- package/components/page/layouts/website-section.marko +25 -0
- package/components/page/layouts/website-section.marko.js +78 -0
- package/components/page/marko.json +93 -0
- package/components/page/metadata/components/common.marko +54 -0
- package/components/page/metadata/components/common.marko.js +117 -0
- package/components/page/metadata/content.marko +147 -0
- package/components/page/metadata/content.marko.js +216 -0
- package/components/page/metadata/default.marko +2 -0
- package/components/page/metadata/default.marko.js +29 -0
- package/components/page/metadata/dynamic-page.marko +40 -0
- package/components/page/metadata/dynamic-page.marko.js +84 -0
- package/components/page/metadata/google-structured-data/content.js +138 -0
- package/components/page/metadata/magazine-issue.marko +39 -0
- package/components/page/metadata/magazine-issue.marko.js +83 -0
- package/components/page/metadata/magazine-publication.marko +35 -0
- package/components/page/metadata/magazine-publication.marko.js +79 -0
- package/components/page/metadata/marko.json +32 -0
- package/components/page/metadata/website-section.marko +48 -0
- package/components/page/metadata/website-section.marko.js +92 -0
- package/components/page/rel-canonical.marko +13 -0
- package/components/page/rel-canonical.marko.js +42 -0
- package/components/page/title.marko +18 -0
- package/components/page/title.marko.js +46 -0
- package/components/page/wrapper.marko +16 -0
- package/components/page/wrapper.marko.js +63 -0
- package/components/resolve/marko.json +6 -0
- package/components/resolve/page.marko +10 -0
- package/components/resolve/page.marko.js +49 -0
- package/components/rss/marko.json +10 -0
- package/components/rss/website-section.marko +17 -0
- package/components/rss/website-section.marko.js +46 -0
- package/config/abstract-config.js +42 -0
- package/config/core.js +48 -0
- package/config/site.js +6 -0
- package/express/apollo.js +34 -0
- package/express/asset-loader.js +55 -0
- package/express/cdn.js +27 -0
- package/express/css-loader.js +117 -0
- package/express/embedded-media.js +31 -0
- package/express/error-handlers.js +113 -0
- package/express/find-content-alias.js +30 -0
- package/express/get-redirect.js +44 -0
- package/express/graphql-proxy.js +17 -0
- package/express/index.js +153 -0
- package/express/json-error-handler.js +30 -0
- package/express/load-document.js +3 -0
- package/express/load-more.js +6 -0
- package/express/load-object.js +10 -0
- package/express/oembed.js +18 -0
- package/express/rss.js +19 -0
- package/express/sitemaps.js +16 -0
- package/express/website-context.js +19 -0
- package/index.js +8 -0
- package/integration/test-website-boot.js +198 -0
- package/marko.json +6 -0
- package/middleware/disabled-features.js +15 -0
- package/middleware/index.js +15 -0
- package/middleware/page-node/index.js +45 -0
- package/middleware/page-node/resolved.js +26 -0
- package/middleware/with-content.js +54 -0
- package/middleware/with-dynamic-page.js +37 -0
- package/middleware/with-load-more.js +9 -0
- package/middleware/with-magazine-issue.js +24 -0
- package/middleware/with-magazine-publication.js +24 -0
- package/middleware/with-website-section.js +47 -0
- package/package.json +64 -0
- package/scss/carousel.scss +42 -0
- package/scss/document.scss +55 -0
- package/scss/fonts/alata-fallback.scss +7 -0
- package/scss/fonts/alegreya-fallback.scss +6 -0
- package/scss/fonts/arimo-fallback.scss +7 -0
- package/scss/fonts/fira-sans-fallback.scss +7 -0
- package/scss/fonts/ibm-plex-sans-fallback.scss +7 -0
- package/scss/fonts/informapro-fallback.scss +6 -0
- package/scss/fonts/lato-fallback.scss +7 -0
- package/scss/fonts/manrope-fallback.scss +6 -0
- package/scss/fonts/merriweather-fallback.scss +7 -0
- package/scss/fonts/montserrat-fallback.scss +7 -0
- package/scss/fonts/open-sans-condensed-fallback.scss +6 -0
- package/scss/fonts/open-sans-fallback.scss +7 -0
- package/scss/fonts/oswald-fallback.scss +7 -0
- package/scss/fonts/poppins-fallback.scss +6 -0
- package/scss/fonts/pt-sans-fallback.scss +6 -0
- package/scss/fonts/pt-serif-fallback.scss +6 -0
- package/scss/fonts/public-sans-fallback.scss +7 -0
- package/scss/fonts/raleway-fallback.scss +6 -0
- package/scss/fonts/roboto-condensed-fallback.scss +7 -0
- package/scss/fonts/roboto-fallback.scss +7 -0
- package/scss/fonts/roboto-slab-fallback.scss +7 -0
- package/scss/fonts/solitaire-mvb-pro-fallback.scss +6 -0
- package/scss/fonts/source-sans-4-fallback.scss +7 -0
- package/scss/fonts/source-serif-pro-fallback.scss +7 -0
- package/scss/fonts/synthese-fallback.scss +6 -0
- package/scss/fonts/zilla-slab-fallback.scss +6 -0
- package/scss/load-more.scss +3 -0
- package/scss/node-list.scss +144 -0
- package/scss/node.scss +371 -0
- package/scss/page-image.scss +15 -0
- package/start-server.js +169 -0
- package/utils/apply-query-params.js +16 -0
- package/utils/build-content-input.js +9 -0
- package/utils/build-marko-global.js +1 -0
- package/utils/default-value.js +1 -0
- package/utils/embedded-media/facebook-oembed.js +50 -0
- package/utils/embedded-media/image.js +71 -0
- package/utils/embedded-media/index.js +8 -0
- package/utils/embedded-media/instagram-oembed.js +57 -0
- package/utils/embedded-media/oembed.js +18 -0
- package/utils/hierarchy-aliases.js +3 -0
- package/utils/hierarchy-ids.js +3 -0
- package/utils/index.js +11 -0
- package/utils/is-dev.js +1 -0
- package/utils/published-content/description.js +1 -0
- package/utils/render-ssr-component-from-marko.js +18 -0
- package/utils/render-ssr-component.js +15 -0
- package/utils/should-collapse.js +1 -0
package/browser/index.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* eslint-disable no-new */
|
|
2
|
+
import Vue from './vue';
|
|
3
|
+
import Components from './components';
|
|
4
|
+
import EventBus from './event-bus';
|
|
5
|
+
|
|
6
|
+
const components = {};
|
|
7
|
+
const providers = {};
|
|
8
|
+
const listeners = {};
|
|
9
|
+
|
|
10
|
+
const load = async ({
|
|
11
|
+
el,
|
|
12
|
+
name,
|
|
13
|
+
props,
|
|
14
|
+
on,
|
|
15
|
+
hydrate,
|
|
16
|
+
skipWhenExists,
|
|
17
|
+
} = {}) => {
|
|
18
|
+
if (!el || !name) throw new Error('A Vue component name and element must be provided.');
|
|
19
|
+
const Component = components[name];
|
|
20
|
+
if (!Component) throw new Error(`No Vue component found for '${name}'`);
|
|
21
|
+
const shouldRender = skipWhenExists ? document.querySelectorAll(`script.component[data-name="${name}"]`).length <= 1 : true;
|
|
22
|
+
if (!shouldRender) return;
|
|
23
|
+
const component = new Vue({
|
|
24
|
+
provide: providers[name],
|
|
25
|
+
render: (h) => h(Component, { props, on: { ...on, ...listeners[name] } }),
|
|
26
|
+
});
|
|
27
|
+
component.$mount(el, hydrate);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const register = async (name, Component, { provide, on } = {}) => {
|
|
31
|
+
if (!name) throw new Error('A Vue component name must be provided.');
|
|
32
|
+
if (components[name]) throw new Error(`A Vue component already exists for '${name}'`);
|
|
33
|
+
components[name] = Component;
|
|
34
|
+
providers[name] = provide;
|
|
35
|
+
listeners[name] = on;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Register built-in components.
|
|
40
|
+
*/
|
|
41
|
+
Components({ register, EventBus });
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated Use `load` instead.
|
|
45
|
+
*/
|
|
46
|
+
const loadComponent = (el, name, props) => {
|
|
47
|
+
load({ el, name, props });
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated Use `register` instead.
|
|
52
|
+
*/
|
|
53
|
+
const registerComponent = (name, Component, provide) => {
|
|
54
|
+
register(name, Component, { provide });
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const methods = {
|
|
58
|
+
load,
|
|
59
|
+
register,
|
|
60
|
+
loadComponent,
|
|
61
|
+
registerComponent,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
let initialized = false;
|
|
65
|
+
if (window && window.markoCompQueue) {
|
|
66
|
+
window.markoCompQueue.flush = () => {
|
|
67
|
+
if (initialized) return;
|
|
68
|
+
const { markoCompQueue } = window;
|
|
69
|
+
if (!markoCompQueue) throw new Error('Unable to load Marko Web components queue!');
|
|
70
|
+
|
|
71
|
+
for (let i = 0; i < markoCompQueue.length; i += 1) {
|
|
72
|
+
const [method, args] = markoCompQueue[i];
|
|
73
|
+
if (methods[method]) methods[method](...args);
|
|
74
|
+
}
|
|
75
|
+
window.CMSBrowserComponents = methods;
|
|
76
|
+
initialized = true;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export default {
|
|
81
|
+
...methods,
|
|
82
|
+
EventBus,
|
|
83
|
+
};
|
package/browser/vue.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import defaultValue from "@mindful-web/marko-core/utils/default-value";
|
|
2
|
+
|
|
3
|
+
$ const { id, name } = input;
|
|
4
|
+
|
|
5
|
+
$ const props = JSON.stringify(input.props || {})
|
|
6
|
+
$ const hydrate = defaultValue(input.hydrate, false);
|
|
7
|
+
$ const skipWhenExists = defaultValue(input.skipWhenExists, false);
|
|
8
|
+
$ const contents = `CMSBrowserComponents.load({ el: '#${id}', name: '${name}', props: ${props}, hydrate: ${hydrate}, skipWhenExists: ${skipWhenExists} });`;
|
|
9
|
+
|
|
10
|
+
<script class="component" data-name=name>$!{contents}</script>
|
|
@@ -0,0 +1,39 @@
|
|
|
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$1.0.0/components/browser-component/script.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
|
|
8
|
+
defaultValue = module_defaultValue.default || module_defaultValue,
|
|
9
|
+
marko_str = require("marko/dist/runtime/helpers/to-string"),
|
|
10
|
+
marko_attr = require("marko/dist/runtime/html/helpers/attr");
|
|
11
|
+
|
|
12
|
+
function render(input, out, __component, component, state) {
|
|
13
|
+
var data = input;
|
|
14
|
+
|
|
15
|
+
const { id, name } = input;
|
|
16
|
+
|
|
17
|
+
const props = JSON.stringify(input.props || {})
|
|
18
|
+
|
|
19
|
+
const hydrate = defaultValue(input.hydrate, false);
|
|
20
|
+
|
|
21
|
+
const skipWhenExists = defaultValue(input.skipWhenExists, false);
|
|
22
|
+
|
|
23
|
+
const contents = `CMSBrowserComponents.load({ el: '#${id}', name: '${name}', props: ${props}, hydrate: ${hydrate}, skipWhenExists: ${skipWhenExists} });`;
|
|
24
|
+
|
|
25
|
+
out.w("<script class=\"component\"" +
|
|
26
|
+
marko_attr("data-name", name) +
|
|
27
|
+
">" +
|
|
28
|
+
marko_str(contents) +
|
|
29
|
+
"</script>");
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
marko_template._ = marko_renderer(render, {
|
|
33
|
+
d_: true,
|
|
34
|
+
e_: marko_componentType
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
marko_template.meta = {
|
|
38
|
+
id: "/@mindful-web/marko-web$1.0.0/components/browser-component/script.marko"
|
|
39
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import defaultValue from "@mindful-web/marko-core/utils/default-value";
|
|
2
|
+
import { randomElementId } from "@mindful-web/utils";
|
|
3
|
+
import renderComponent from "../utils/render-ssr-component-from-marko";
|
|
4
|
+
|
|
5
|
+
$ const id = randomElementId({ prefix: "vue" });
|
|
6
|
+
$ const tag = defaultValue(input.tag, "div");
|
|
7
|
+
$ const ssr = defaultValue(input.ssr, false);
|
|
8
|
+
|
|
9
|
+
<if(ssr)>
|
|
10
|
+
<marko-web-resolve|{ resolved: html }| promise=renderComponent({ id, input, out })>
|
|
11
|
+
$!{html}
|
|
12
|
+
</marko-web-resolve>
|
|
13
|
+
</if>
|
|
14
|
+
<else>
|
|
15
|
+
<${tag} ...input.attrs id=id class=input.class>
|
|
16
|
+
<${input.renderBody} />
|
|
17
|
+
</>
|
|
18
|
+
<marko-web-browser-component-script
|
|
19
|
+
id=id
|
|
20
|
+
hydrate=input.hydrate
|
|
21
|
+
name=input.name
|
|
22
|
+
props=input.props
|
|
23
|
+
skip-when-exists=input.skipWhenExists
|
|
24
|
+
/>
|
|
25
|
+
</else>
|
|
@@ -0,0 +1,75 @@
|
|
|
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$1.0.0/components/browser-component.marko",
|
|
6
|
+
marko_component = require("./browser-component.marko"),
|
|
7
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
|
+
module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
|
|
9
|
+
defaultValue = module_defaultValue.default || module_defaultValue,
|
|
10
|
+
module_utils_module = require("@mindful-web/utils"),
|
|
11
|
+
utils_module = module_utils_module.default || module_utils_module,
|
|
12
|
+
randomElementId = module_utils_module.randomElementId,
|
|
13
|
+
module_renderComponent = require("../utils/render-ssr-component-from-marko"),
|
|
14
|
+
renderComponent = module_renderComponent.default || module_renderComponent,
|
|
15
|
+
marko_str = require("marko/dist/runtime/helpers/to-string"),
|
|
16
|
+
marko_web_resolve_template = require("@mindful-web/marko-core/components/resolve.marko"),
|
|
17
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
18
|
+
marko_web_resolve_tag = marko_loadTag(marko_web_resolve_template),
|
|
19
|
+
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
|
|
20
|
+
marko_assign = require("marko/dist/runtime/helpers/assign"),
|
|
21
|
+
marko_web_browser_component_script_template = require("./browser-component/script.marko"),
|
|
22
|
+
marko_web_browser_component_script_tag = marko_loadTag(marko_web_browser_component_script_template);
|
|
23
|
+
|
|
24
|
+
function render(input, out, __component, component, state) {
|
|
25
|
+
var data = input;
|
|
26
|
+
|
|
27
|
+
const id = randomElementId({ prefix: "vue" });
|
|
28
|
+
|
|
29
|
+
const tag = defaultValue(input.tag, "div");
|
|
30
|
+
|
|
31
|
+
const ssr = defaultValue(input.ssr, false);
|
|
32
|
+
|
|
33
|
+
if (ssr) {
|
|
34
|
+
marko_web_resolve_tag({
|
|
35
|
+
promise: renderComponent({
|
|
36
|
+
id: id,
|
|
37
|
+
input: input,
|
|
38
|
+
out: out
|
|
39
|
+
}),
|
|
40
|
+
renderBody: function(out, { resolved: html }) {
|
|
41
|
+
out.w(marko_str(html));
|
|
42
|
+
}
|
|
43
|
+
}, out, __component, "0");
|
|
44
|
+
} else {
|
|
45
|
+
marko_dynamicTag(out, tag, function() {
|
|
46
|
+
return marko_assign({}, input.attrs, {
|
|
47
|
+
id: id,
|
|
48
|
+
class: input.class
|
|
49
|
+
});
|
|
50
|
+
}, function(out) {
|
|
51
|
+
marko_dynamicTag(out, input.renderBody, null, null, null, null, __component, "2");
|
|
52
|
+
}, null, null, __component, "1");
|
|
53
|
+
|
|
54
|
+
marko_web_browser_component_script_tag({
|
|
55
|
+
id: id,
|
|
56
|
+
hydrate: input.hydrate,
|
|
57
|
+
name: input.name,
|
|
58
|
+
props: input.props,
|
|
59
|
+
skipWhenExists: input.skipWhenExists
|
|
60
|
+
}, out, __component, "3");
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
marko_template._ = marko_renderer(render, {
|
|
65
|
+
e_: marko_componentType
|
|
66
|
+
}, marko_component);
|
|
67
|
+
|
|
68
|
+
marko_template.meta = {
|
|
69
|
+
id: "/@mindful-web/marko-web$1.0.0/components/browser-component.marko",
|
|
70
|
+
component: "./browser-component.marko",
|
|
71
|
+
tags: [
|
|
72
|
+
"@mindful-web/marko-core/components/resolve.marko",
|
|
73
|
+
"./browser-component/script.marko"
|
|
74
|
+
]
|
|
75
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
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$1.0.0/components/deferred-stylesheet.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
marko_attr = require("marko/dist/runtime/html/helpers/attr");
|
|
8
|
+
|
|
9
|
+
function render(input, out, __component, component, state) {
|
|
10
|
+
var data = input;
|
|
11
|
+
|
|
12
|
+
const { href } = input;
|
|
13
|
+
|
|
14
|
+
out.w("<link rel=\"preload\"" +
|
|
15
|
+
marko_attr("href", href) +
|
|
16
|
+
" as=\"style\" onload=\"this.onload=null;this.rel='stylesheet'\"><noscript><link rel=\"stylesheet\"" +
|
|
17
|
+
marko_attr("href", href) +
|
|
18
|
+
"></noscript>");
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
marko_template._ = marko_renderer(render, {
|
|
22
|
+
d_: true,
|
|
23
|
+
e_: marko_componentType
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
marko_template.meta = {
|
|
27
|
+
id: "/@mindful-web/marko-web$1.0.0/components/deferred-stylesheet.marko"
|
|
28
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
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$1.0.0/components/document/components/body-wrapper.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
|
|
8
|
+
marko_attrs = require("marko/dist/runtime/html/helpers/attrs");
|
|
9
|
+
|
|
10
|
+
function render(input, out, __component, component, state) {
|
|
11
|
+
var data = input;
|
|
12
|
+
|
|
13
|
+
if (input.enabled) {
|
|
14
|
+
out.w("<div" +
|
|
15
|
+
marko_attrs(input.attrs) +
|
|
16
|
+
">");
|
|
17
|
+
|
|
18
|
+
marko_dynamicTag(out, input.renderBody, null, null, null, null, __component, "1");
|
|
19
|
+
|
|
20
|
+
out.w("</div>");
|
|
21
|
+
} else {
|
|
22
|
+
marko_dynamicTag(out, input.renderBody, null, null, null, null, __component, "2");
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
marko_template._ = marko_renderer(render, {
|
|
27
|
+
d_: true,
|
|
28
|
+
e_: marko_componentType
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
marko_template.meta = {
|
|
32
|
+
id: "/@mindful-web/marko-web$1.0.0/components/document/components/body-wrapper.marko"
|
|
33
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import isDev from '../../../utils/is-dev';
|
|
2
|
+
|
|
3
|
+
$ const { document } = out.global;
|
|
4
|
+
$ const error = input.error || {};
|
|
5
|
+
|
|
6
|
+
<${document}>
|
|
7
|
+
<@head>
|
|
8
|
+
<marko-web-page-title value=`${input.statusCode} ${input.statusMessage}` />
|
|
9
|
+
<if(input.statusCode === 404)>
|
|
10
|
+
<meta name="robots" content="noindex">
|
|
11
|
+
</if>
|
|
12
|
+
</@head>
|
|
13
|
+
<@container>
|
|
14
|
+
<@page for="error">
|
|
15
|
+
<marko-web-page-wrapper>
|
|
16
|
+
<@section>
|
|
17
|
+
<h3 data-marko-error=error.message>${input.statusCode} ${input.statusMessage}</h3>
|
|
18
|
+
<h4>${error.message}</h4>
|
|
19
|
+
<if(isDev)>
|
|
20
|
+
<pre>${error.stack}</pre>
|
|
21
|
+
</if>
|
|
22
|
+
</@section>
|
|
23
|
+
</marko-web-page-wrapper>
|
|
24
|
+
</@page>
|
|
25
|
+
</@container>
|
|
26
|
+
</>
|
|
@@ -0,0 +1,88 @@
|
|
|
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$1.0.0/components/document/components/error.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
module_isDev = require("../../../utils/is-dev"),
|
|
8
|
+
isDev = module_isDev.default || module_isDev,
|
|
9
|
+
marko_web_page_title_template = require("../../page/title.marko"),
|
|
10
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
11
|
+
marko_web_page_title_tag = marko_loadTag(marko_web_page_title_template),
|
|
12
|
+
helpers_escape_xml = require("marko/dist/runtime/html/helpers/escape-xml"),
|
|
13
|
+
marko_escapeXml = helpers_escape_xml.x,
|
|
14
|
+
marko_attr = require("marko/dist/runtime/html/helpers/attr"),
|
|
15
|
+
marko_web_page_wrapper_template = require("../../page/wrapper.marko"),
|
|
16
|
+
marko_web_page_wrapper_tag = marko_loadTag(marko_web_page_wrapper_template),
|
|
17
|
+
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag");
|
|
18
|
+
|
|
19
|
+
function render(input, out, __component, component, state) {
|
|
20
|
+
var data = input;
|
|
21
|
+
|
|
22
|
+
const { document } = out.global;
|
|
23
|
+
|
|
24
|
+
const error = input.error || {};
|
|
25
|
+
|
|
26
|
+
marko_dynamicTag(out, document, function() {
|
|
27
|
+
return {
|
|
28
|
+
head: {
|
|
29
|
+
renderBody: function(out) {
|
|
30
|
+
marko_web_page_title_tag({
|
|
31
|
+
concatWith: "|",
|
|
32
|
+
value: (input.statusCode + " ") + input.statusMessage
|
|
33
|
+
}, out, __component, "2");
|
|
34
|
+
|
|
35
|
+
if (input.statusCode === 404) {
|
|
36
|
+
out.w("<meta name=\"robots\" content=\"noindex\">");
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
container: {
|
|
41
|
+
page: {
|
|
42
|
+
for: "error",
|
|
43
|
+
renderBody: function(out) {
|
|
44
|
+
marko_web_page_wrapper_tag({
|
|
45
|
+
blockName: "page-wrapper",
|
|
46
|
+
tag: "div",
|
|
47
|
+
sections: [
|
|
48
|
+
{
|
|
49
|
+
tag: "div",
|
|
50
|
+
renderBody: function(out) {
|
|
51
|
+
out.w("<h3" +
|
|
52
|
+
marko_attr("data-marko-error", error.message) +
|
|
53
|
+
">" +
|
|
54
|
+
marko_escapeXml(input.statusCode) +
|
|
55
|
+
" " +
|
|
56
|
+
marko_escapeXml(input.statusMessage) +
|
|
57
|
+
"</h3><h4>" +
|
|
58
|
+
marko_escapeXml(error.message) +
|
|
59
|
+
"</h4>");
|
|
60
|
+
|
|
61
|
+
if (isDev) {
|
|
62
|
+
out.w("<pre>" +
|
|
63
|
+
marko_escapeXml(error.stack) +
|
|
64
|
+
"</pre>");
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}, out, __component, "6");
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}, null, null, null, __component, "0");
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
marko_template._ = marko_renderer(render, {
|
|
78
|
+
d_: true,
|
|
79
|
+
e_: marko_componentType
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
marko_template.meta = {
|
|
83
|
+
id: "/@mindful-web/marko-web$1.0.0/components/document/components/error.marko",
|
|
84
|
+
tags: [
|
|
85
|
+
"../../page/title.marko",
|
|
86
|
+
"../../page/wrapper.marko"
|
|
87
|
+
]
|
|
88
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
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$1.0.0/components/document/components/live-reload.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
module_isDev = require("../../../utils/is-dev"),
|
|
8
|
+
isDev = module_isDev.default || module_isDev,
|
|
9
|
+
marko_attr = require("marko/dist/runtime/html/helpers/attr");
|
|
10
|
+
|
|
11
|
+
function render(input, out, __component, component, state) {
|
|
12
|
+
var data = input;
|
|
13
|
+
|
|
14
|
+
const { LIVERELOAD_PORT, EXPOSED_HOST } = process.env;
|
|
15
|
+
|
|
16
|
+
if (isDev && LIVERELOAD_PORT) {
|
|
17
|
+
out.w("<script" +
|
|
18
|
+
marko_attr("src", ((("http://" + EXPOSED_HOST) + ":") + LIVERELOAD_PORT) + "/livereload.js") +
|
|
19
|
+
" async></script>");
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
marko_template._ = marko_renderer(render, {
|
|
24
|
+
d_: true,
|
|
25
|
+
e_: marko_componentType
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
marko_template.meta = {
|
|
29
|
+
id: "/@mindful-web/marko-web$1.0.0/components/document/components/live-reload.marko"
|
|
30
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { getAsArray } from "@mindful-web/object-path";
|
|
2
|
+
|
|
3
|
+
$ const features = getAsArray(input, "features");
|
|
4
|
+
$ const src = `https://polyfill.io/v3/polyfill.min.js?flags=gated&features=${encodeURIComponent(features.join(','))}`;
|
|
5
|
+
|
|
6
|
+
<if(features.length)>
|
|
7
|
+
<script src=src></script>
|
|
8
|
+
</if>
|
|
@@ -0,0 +1,33 @@
|
|
|
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$1.0.0/components/document/components/polyfill.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
module_objectPath_module = require("@mindful-web/object-path"),
|
|
8
|
+
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
9
|
+
getAsArray = module_objectPath_module.getAsArray,
|
|
10
|
+
marko_attr = require("marko/dist/runtime/html/helpers/attr");
|
|
11
|
+
|
|
12
|
+
function render(input, out, __component, component, state) {
|
|
13
|
+
var data = input;
|
|
14
|
+
|
|
15
|
+
const features = getAsArray(input, "features");
|
|
16
|
+
|
|
17
|
+
const src = `https://polyfill.io/v3/polyfill.min.js?flags=gated&features=${encodeURIComponent(features.join(','))}`;
|
|
18
|
+
|
|
19
|
+
if (features.length) {
|
|
20
|
+
out.w("<script" +
|
|
21
|
+
marko_attr("src", src) +
|
|
22
|
+
"></script>");
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
marko_template._ = marko_renderer(render, {
|
|
27
|
+
d_: true,
|
|
28
|
+
e_: marko_componentType
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
marko_template.meta = {
|
|
32
|
+
id: "/@mindful-web/marko-web$1.0.0/components/document/components/polyfill.marko"
|
|
33
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
$ const { css, route } = out.global;
|
|
2
|
+
$ const { mode } = css;
|
|
3
|
+
$ const { kind } = route;
|
|
4
|
+
|
|
5
|
+
<if(mode === "main")>
|
|
6
|
+
<link rel="stylesheet" href=css.main() />
|
|
7
|
+
</if>
|
|
8
|
+
<else-if(mode === "purged")>
|
|
9
|
+
<link rel="stylesheet" href=css.purged() />
|
|
10
|
+
</else-if>
|
|
11
|
+
<else>
|
|
12
|
+
$ const critical = css.critical(route);
|
|
13
|
+
$ const optimized = css.optimized(route);
|
|
14
|
+
<if(critical)>
|
|
15
|
+
<style>${critical}</style>
|
|
16
|
+
</if>
|
|
17
|
+
<if(mode === "optimized" && optimized)>
|
|
18
|
+
<marko-web-deferred-stylesheet href=optimized />
|
|
19
|
+
</if>
|
|
20
|
+
</else>
|
|
@@ -0,0 +1,61 @@
|
|
|
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$1.0.0/components/document/components/styles.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
marko_attr = require("marko/dist/runtime/html/helpers/attr"),
|
|
8
|
+
helpers_escape_xml = require("marko/dist/runtime/html/helpers/escape-xml"),
|
|
9
|
+
marko_escapeXml = helpers_escape_xml.x,
|
|
10
|
+
marko_escapeStyle = require("marko/dist/runtime/html/helpers/escape-style-placeholder"),
|
|
11
|
+
marko_web_deferred_stylesheet_template = require("../../deferred-stylesheet.marko"),
|
|
12
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
13
|
+
marko_web_deferred_stylesheet_tag = marko_loadTag(marko_web_deferred_stylesheet_template);
|
|
14
|
+
|
|
15
|
+
function render(input, out, __component, component, state) {
|
|
16
|
+
var data = input;
|
|
17
|
+
|
|
18
|
+
const { css, route } = out.global;
|
|
19
|
+
|
|
20
|
+
const { mode } = css;
|
|
21
|
+
|
|
22
|
+
const { kind } = route;
|
|
23
|
+
|
|
24
|
+
if (mode === "main") {
|
|
25
|
+
out.w("<link rel=\"stylesheet\"" +
|
|
26
|
+
marko_attr("href", css.main()) +
|
|
27
|
+
">");
|
|
28
|
+
} else if (mode === "purged") {
|
|
29
|
+
out.w("<link rel=\"stylesheet\"" +
|
|
30
|
+
marko_attr("href", css.purged()) +
|
|
31
|
+
">");
|
|
32
|
+
} else {
|
|
33
|
+
const critical = css.critical(route);
|
|
34
|
+
|
|
35
|
+
const optimized = css.optimized(route);
|
|
36
|
+
|
|
37
|
+
if (critical) {
|
|
38
|
+
out.w("<style>" +
|
|
39
|
+
marko_escapeStyle(critical) +
|
|
40
|
+
"</style>");
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if ((mode === "optimized") && optimized) {
|
|
44
|
+
marko_web_deferred_stylesheet_tag({
|
|
45
|
+
href: optimized
|
|
46
|
+
}, out, __component, "3");
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
marko_template._ = marko_renderer(render, {
|
|
52
|
+
d_: true,
|
|
53
|
+
e_: marko_componentType
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
marko_template.meta = {
|
|
57
|
+
id: "/@mindful-web/marko-web$1.0.0/components/document/components/styles.marko",
|
|
58
|
+
tags: [
|
|
59
|
+
"../../deferred-stylesheet.marko"
|
|
60
|
+
]
|
|
61
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { getAsArray } from "@mindful-web/object-path";
|
|
2
|
+
|
|
3
|
+
$ const blockName = input.blockName || "document-container";
|
|
4
|
+
$ const tag = input.tag || "div";
|
|
5
|
+
|
|
6
|
+
$ const modifiers = [...getAsArray(input.modifiers)];
|
|
7
|
+
$ const classNames = [blockName, ...modifiers.map(mod => `${blockName}--${mod}`), input.class];
|
|
8
|
+
|
|
9
|
+
<${tag} ...input.attrs class=classNames>
|
|
10
|
+
<${input.abovePage} />
|
|
11
|
+
<if(input.page)>
|
|
12
|
+
<marko-web-page-container ...input.page />
|
|
13
|
+
</if>
|
|
14
|
+
<${input.belowPage} />
|
|
15
|
+
</>
|