@total_onion/onion-library 2.0.201 → 2.0.203
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/assembleAssetList.js +21 -2
- package/components/fields-core-css-sizing-vars-v3/core-css-sizing-vars-v3.scss +102 -74
- package/components/fields-core-root-variables-v3/core-root-variables-v3.scss +39 -37
- package/components/webc-loadmore-trigger/index.html +30 -0
- package/components/webc-loadmore-trigger/loadmore-trigger.css +20 -0
- package/components/webc-loadmore-trigger/loadmore-trigger.html +3 -0
- package/components/webc-loadmore-trigger/loadmore-trigger.js +23 -0
- package/components/webc-post-filter-module/dev-content/dev-content.js +68 -0
- package/components/webc-post-filter-module/index.html +30 -0
- package/components/webc-post-filter-module/post-filter-module.css +10 -0
- package/components/webc-post-filter-module/post-filter-module.html +14 -0
- package/components/webc-post-filter-module/post-filter-module.js +197 -0
- package/components/webc-post-grid-display-module/index.html +30 -0
- package/components/webc-post-grid-display-module/post-grid-display-module.css +20 -0
- package/components/webc-post-grid-display-module/post-grid-display-module.html +7 -0
- package/components/webc-post-grid-display-module/post-grid-display-module.js +37 -0
- package/components/webc-ptfg-9000/index.html +50 -0
- package/components/webc-ptfg-9000/ptfg-9000.css +8 -0
- package/components/webc-ptfg-9000/ptfg-9000.html +5 -0
- package/components/webc-ptfg-9000/ptfg-9000.js +39 -0
- package/createJsAssets-v3.js +1 -1
- package/esbuild.mjs +39 -6
- package/onion-loader-local.js +1 -1
- package/package.json +1 -1
- package/public/assetList.mjs +78 -2
- package/public/block-group-container-v3/group-container-v3.css +26 -26
- package/public/block-post-info-v3/post-info-v3.css +429 -429
- package/public/block-post-type-filter-grid-v4/dev-content/dev-content.js +38 -0
- package/public/block-post-type-filter-grid-v4/post-type-filter-grid-v4.css +42 -0
- package/public/block-post-type-filter-grid-v4/post-type-filter-grid-v4.js +181 -0
- package/public/block-product-info-v3/product-info-v3.css +257 -257
- package/public/block-sub-group-container-v3/sub-group-container-v3.css +23 -23
- package/public/jsAssets.mjs +41 -3
- package/public/publicBundleBase.css +4800 -0
- package/public/{publicBundle.scss → publicBundleBase.scss} +6 -2
- package/public/publicBundle.css +0 -6392
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
export default function postfiltermoduleJs(options = {}) {
|
|
2
|
+
try {
|
|
3
|
+
customElements.define(
|
|
4
|
+
'post-filter-module',
|
|
5
|
+
class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.enableLogs = this.dataset.enablelogs;
|
|
9
|
+
this.filterState = {
|
|
10
|
+
allposts: [],
|
|
11
|
+
filteredposts: [],
|
|
12
|
+
activefilters: new Set(),
|
|
13
|
+
allcategories: [],
|
|
14
|
+
groupingcategories: [],
|
|
15
|
+
filtercategories: [],
|
|
16
|
+
setActiveFilters: function (newState) {
|
|
17
|
+
Object.assign(this.filterState, newState);
|
|
18
|
+
this.filterPosts.bind(this)();
|
|
19
|
+
},
|
|
20
|
+
setFilteredPosts: function (newState) {
|
|
21
|
+
Object.assign(this.filterState, newState);
|
|
22
|
+
this.dispatchEvent(
|
|
23
|
+
new CustomEvent('filteredposts-updated')
|
|
24
|
+
);
|
|
25
|
+
console.log('filter state: ', this.filterState);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
this.filterCategoriesDisplay = this.querySelector(
|
|
29
|
+
'.post-filter-module__filter-categories-display'
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
this.clearFiltersButton = this.querySelector(
|
|
33
|
+
'.post-filter-module__clear-filters-button'
|
|
34
|
+
);
|
|
35
|
+
this.clearFiltersButton.addEventListener(
|
|
36
|
+
'click',
|
|
37
|
+
this.clearFilters.bind(this)
|
|
38
|
+
);
|
|
39
|
+
this.devMode = this.dataset.dev;
|
|
40
|
+
this.devModeContent = this.dataset.devcontent;
|
|
41
|
+
}
|
|
42
|
+
async connectedCallback() {
|
|
43
|
+
console.log('Filter Module element added to page.');
|
|
44
|
+
let data;
|
|
45
|
+
if (this.devMode) {
|
|
46
|
+
data = await import('./dev-content/dev-content.js');
|
|
47
|
+
}
|
|
48
|
+
this.filterState.allposts =
|
|
49
|
+
data[`devContent${this.devModeContent}`];
|
|
50
|
+
|
|
51
|
+
this.filterState.allcategories =
|
|
52
|
+
data[`devContentCategories`];
|
|
53
|
+
|
|
54
|
+
if (this.filterState.allcategories.length > 0) {
|
|
55
|
+
this.filterState.allcategories.forEach((category) => {
|
|
56
|
+
if (category.parentid != null) {
|
|
57
|
+
this.filterState.filtercategories.push(
|
|
58
|
+
category
|
|
59
|
+
);
|
|
60
|
+
} else {
|
|
61
|
+
this.filterState.groupingcategories.push(
|
|
62
|
+
category
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
if (this.filterState.groupingcategories.length > 0) {
|
|
68
|
+
this.filterState.groupingcategories.forEach(
|
|
69
|
+
(category) => {
|
|
70
|
+
const groupCategoryContainer =
|
|
71
|
+
document.createElement('div');
|
|
72
|
+
groupCategoryContainer.className =
|
|
73
|
+
'post-filter-module__grouping-category-container';
|
|
74
|
+
groupCategoryContainer.insertAdjacentHTML(
|
|
75
|
+
'beforeend',
|
|
76
|
+
`<button class="post-filter-module__grouping-category-button" data-categoryid="${category.id}">${category.name}</button>`
|
|
77
|
+
);
|
|
78
|
+
const filterCategoryContainer =
|
|
79
|
+
document.createElement('div');
|
|
80
|
+
filterCategoryContainer.className =
|
|
81
|
+
'post-filter-module__filter-category-container';
|
|
82
|
+
const groupedFilters =
|
|
83
|
+
this.filterState.filtercategories.filter(
|
|
84
|
+
(filtercat) => {
|
|
85
|
+
return (
|
|
86
|
+
filtercat.parentid ==
|
|
87
|
+
category.id
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
groupedFilters.forEach((filter) => {
|
|
92
|
+
filterCategoryContainer.insertAdjacentHTML(
|
|
93
|
+
'beforeend',
|
|
94
|
+
`<button class="post-filter-module__filter-category-button" data-categoryid="${filter.id}">${filter.name}</button>`
|
|
95
|
+
);
|
|
96
|
+
});
|
|
97
|
+
groupCategoryContainer.appendChild(
|
|
98
|
+
filterCategoryContainer
|
|
99
|
+
);
|
|
100
|
+
this.filterCategoriesDisplay.appendChild(
|
|
101
|
+
groupCategoryContainer
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
} else {
|
|
106
|
+
this.filterState.filtercategories.forEach(
|
|
107
|
+
(category) => {
|
|
108
|
+
if (category.parentid) {
|
|
109
|
+
this.filterCategoriesDisplay.insertAdjacentHTML(
|
|
110
|
+
'beforeend',
|
|
111
|
+
`<button class="post-filter-module__filter-category-button" data-categoryid="${category.id}">${category.name}</button>`
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
this.categorybuttons = this.querySelectorAll(
|
|
119
|
+
'.post-filter-module__filter-category-button'
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
this.categorybuttons.forEach((button) => {
|
|
123
|
+
button.addEventListener('click', () => {
|
|
124
|
+
if (
|
|
125
|
+
this.filterState.activefilters.has(
|
|
126
|
+
Number(button.dataset.categoryid)
|
|
127
|
+
)
|
|
128
|
+
) {
|
|
129
|
+
const newActiveFilters = new Set(
|
|
130
|
+
this.filterState.activefilters
|
|
131
|
+
);
|
|
132
|
+
button.classList.remove('active-cat');
|
|
133
|
+
newActiveFilters.delete(
|
|
134
|
+
Number(button.dataset.categoryid)
|
|
135
|
+
);
|
|
136
|
+
this.filterState.setActiveFilters.bind(this)({
|
|
137
|
+
activefilters: newActiveFilters
|
|
138
|
+
});
|
|
139
|
+
} else {
|
|
140
|
+
const newActiveFilters = new Set(
|
|
141
|
+
this.filterState.activefilters
|
|
142
|
+
);
|
|
143
|
+
button.classList.add('active-cat');
|
|
144
|
+
newActiveFilters.add(
|
|
145
|
+
Number(button.dataset.categoryid)
|
|
146
|
+
);
|
|
147
|
+
this.filterState.setActiveFilters.bind(this)({
|
|
148
|
+
activefilters: newActiveFilters
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
this.filterState.setFilteredPosts.bind(this)({
|
|
154
|
+
filteredposts: this.filterState.allposts
|
|
155
|
+
});
|
|
156
|
+
this.classList.add('loaded');
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
160
|
+
// console.log(`Attribute ${name} has changed.`);
|
|
161
|
+
}
|
|
162
|
+
filterPosts(event) {
|
|
163
|
+
if (this.filterState.activefilters.size === 0) {
|
|
164
|
+
this.filterState.setFilteredPosts.bind(this)({
|
|
165
|
+
filteredposts: this.filterState.allposts
|
|
166
|
+
});
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const newFilteredPosts = this.filterState.allposts.filter(
|
|
171
|
+
(post) => {
|
|
172
|
+
return (
|
|
173
|
+
this.filterState.activefilters.intersection(
|
|
174
|
+
new Set(post.categories)
|
|
175
|
+
).size > 0
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
|
|
180
|
+
this.filterState.setFilteredPosts.bind(this)({
|
|
181
|
+
filteredposts: newFilteredPosts
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
clearFilters(event) {
|
|
185
|
+
this.categorybuttons.forEach((button) => {
|
|
186
|
+
button.classList.remove('active-cat');
|
|
187
|
+
});
|
|
188
|
+
this.filterState.setActiveFilters.bind(this)({
|
|
189
|
+
activefilters: new Set()
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
);
|
|
194
|
+
} catch (error) {
|
|
195
|
+
console.error(error);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<link rel="stylesheet" href="../../public/publicBundleBase.css" />
|
|
7
|
+
<link rel="stylesheet" href="./post-filter-module.css" />
|
|
8
|
+
<title>PTFG</title>
|
|
9
|
+
<style>
|
|
10
|
+
body {
|
|
11
|
+
background-color: #e7b8b8;
|
|
12
|
+
}
|
|
13
|
+
main {
|
|
14
|
+
max-width: 600px;
|
|
15
|
+
margin-inline: auto;
|
|
16
|
+
padding: 50px;
|
|
17
|
+
}
|
|
18
|
+
</style>
|
|
19
|
+
</head>
|
|
20
|
+
<body>
|
|
21
|
+
<main class="main-container"></main>
|
|
22
|
+
<script async type="module">
|
|
23
|
+
const template = await fetch("./post-grid-display-module.html");
|
|
24
|
+
const html = await template.text();
|
|
25
|
+
document.querySelector(".main-container").innerHTML = html;
|
|
26
|
+
import blockjs from "./post-grid-display-module.js";
|
|
27
|
+
blockjs();
|
|
28
|
+
</script>
|
|
29
|
+
</body>
|
|
30
|
+
</html>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
post-grid-display-module {
|
|
2
|
+
--padding-block-multiplier-mobile-top: 1;
|
|
3
|
+
--padding-inline-multiplier-mobile-right: 1;
|
|
4
|
+
--padding-block-multiplier-mobile-bottom: 1;
|
|
5
|
+
--padding-inline-multiplier-mobile-left: 1;
|
|
6
|
+
|
|
7
|
+
display: grid;
|
|
8
|
+
background-color: hotpink;
|
|
9
|
+
.post-grid-display-module__grid-container {
|
|
10
|
+
place-self: stretch;
|
|
11
|
+
display: grid;
|
|
12
|
+
padding: 10px;
|
|
13
|
+
gap: 10px;
|
|
14
|
+
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
|
|
15
|
+
}
|
|
16
|
+
.post-grid-display-module__post-image {
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: auto;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export default function postFilterDisplayJS(options = {}) {
|
|
2
|
+
try {
|
|
3
|
+
customElements.define(
|
|
4
|
+
'post-grid-display-module',
|
|
5
|
+
class extends HTMLElement {
|
|
6
|
+
static observedAttributes = ['data-posts'];
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.gridContainer = this.querySelector(
|
|
10
|
+
'.post-grid-display-module__grid-container'
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
connectedCallback() {
|
|
14
|
+
console.log('Display module added to page.');
|
|
15
|
+
this.classList.add('loaded');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
19
|
+
// console.log(`Attribute ${name} has changed.`);
|
|
20
|
+
this.gridContainer.innerHTML = '';
|
|
21
|
+
if (newValue) {
|
|
22
|
+
const posts = JSON.parse(newValue);
|
|
23
|
+
posts.forEach((post) => {
|
|
24
|
+
const postContent = `<div class="post-grid-display-module__post-container"><h2>${post.postname}</h2><img class="post-grid-display-module__post-image" src="${post['image-src']}" alt="${post.postname}"></div>`;
|
|
25
|
+
this.gridContainer.insertAdjacentHTML(
|
|
26
|
+
'beforeend',
|
|
27
|
+
postContent
|
|
28
|
+
);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
} catch (error) {
|
|
35
|
+
console.error(error);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<link rel="stylesheet" href="../../public/publicBundleBase.css" />
|
|
7
|
+
<link rel="stylesheet" href="./ptfg-9000.css" />
|
|
8
|
+
<link
|
|
9
|
+
rel="stylesheet"
|
|
10
|
+
href="../webc-post-filter-module/post-filter-module.css"
|
|
11
|
+
/>
|
|
12
|
+
<link
|
|
13
|
+
rel="stylesheet"
|
|
14
|
+
href="../webc-post-grid-display-module/post-grid-display-module.css"
|
|
15
|
+
/>
|
|
16
|
+
<title>PTFG</title>
|
|
17
|
+
</head>
|
|
18
|
+
<body>
|
|
19
|
+
<ptfg-9000
|
|
20
|
+
class="ptfg-9000 ptfg-9000__main-container cmpl-block-padding"
|
|
21
|
+
data-assetkey="ptfg-9000"
|
|
22
|
+
>
|
|
23
|
+
</ptfg-9000>
|
|
24
|
+
|
|
25
|
+
<script type="module">
|
|
26
|
+
const postfiltermoduletemplate = await fetch(
|
|
27
|
+
"../webc-post-filter-module/post-filter-module.html"
|
|
28
|
+
);
|
|
29
|
+
const postfiltermodulehtml = await postfiltermoduletemplate.text();
|
|
30
|
+
document
|
|
31
|
+
.querySelector("ptfg-9000")
|
|
32
|
+
.insertAdjacentHTML("beforeend", postfiltermodulehtml);
|
|
33
|
+
|
|
34
|
+
const postgriddisplay = await fetch(
|
|
35
|
+
"../webc-post-grid-display-module/post-grid-display-module.html"
|
|
36
|
+
);
|
|
37
|
+
const postgriddisplayhtml = await postgriddisplay.text();
|
|
38
|
+
document
|
|
39
|
+
.querySelector("ptfg-9000")
|
|
40
|
+
.insertAdjacentHTML("beforeend", postgriddisplayhtml);
|
|
41
|
+
|
|
42
|
+
import blockfilterjs from "../webc-post-filter-module/post-filter-module.js";
|
|
43
|
+
blockfilterjs();
|
|
44
|
+
import blockgridjs from "../webc-post-grid-display-module/post-grid-display-module.js";
|
|
45
|
+
blockgridjs();
|
|
46
|
+
import blockptfgjs from "./ptfg-9000.js";
|
|
47
|
+
blockptfgjs();
|
|
48
|
+
</script>
|
|
49
|
+
</body>
|
|
50
|
+
</html>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export default function posttypefiltergridJs(options = {}) {
|
|
2
|
+
try {
|
|
3
|
+
const {block} = options;
|
|
4
|
+
|
|
5
|
+
customElements.define(
|
|
6
|
+
'ptfg-9000',
|
|
7
|
+
class extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.data = this.dataset;
|
|
11
|
+
this.filterModule = this.querySelector('#filter-module');
|
|
12
|
+
this.displayModule = this.querySelector('#display-module');
|
|
13
|
+
}
|
|
14
|
+
connectedCallback() {
|
|
15
|
+
console.log('PTFG element added to page.');
|
|
16
|
+
if (this.filterModule) {
|
|
17
|
+
this.filterModule.addEventListener(
|
|
18
|
+
'filteredposts-updated',
|
|
19
|
+
() => {
|
|
20
|
+
this.displayModule.dataset.posts =
|
|
21
|
+
JSON.stringify(
|
|
22
|
+
this.filterModule.filterState
|
|
23
|
+
.filteredposts
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
this.classList.add('loaded');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
32
|
+
// console.log(`Attribute ${name} has changed.`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
} catch (error) {
|
|
37
|
+
console.error(error);
|
|
38
|
+
}
|
|
39
|
+
}
|
package/createJsAssets-v3.js
CHANGED
|
@@ -2,7 +2,7 @@ const fs = require('fs');
|
|
|
2
2
|
const path = require('path');
|
|
3
3
|
const {globSync} = require('glob');
|
|
4
4
|
|
|
5
|
-
const dynamicEntryPoints = globSync(`./components/block-*/*-
|
|
5
|
+
const dynamicEntryPoints = globSync(`./components/block-*/*-v{3,4}.js`).map(
|
|
6
6
|
(filePath) => {
|
|
7
7
|
const assetKey = path.basename(filePath, '.js');
|
|
8
8
|
return assetKey;
|
package/esbuild.mjs
CHANGED
|
@@ -4,13 +4,11 @@ import assets from "./public/assetList.mjs";
|
|
|
4
4
|
import postcss from "postcss";
|
|
5
5
|
import autoprefixer from "autoprefixer";
|
|
6
6
|
import postcssPresetEnv from "postcss-preset-env";
|
|
7
|
-
// Simplified build: separate SCSS and JS passes to avoid key collisions and post-build renames.
|
|
8
7
|
|
|
9
|
-
// Split sources.
|
|
10
8
|
const scssSources = assets.filter((a) => a.endsWith(".scss"));
|
|
9
|
+
const cssSources = assets.filter((a) => a.endsWith(".css"));
|
|
11
10
|
const jsSources = assets.filter((a) => /\.(?:js|mjs)$/.test(a));
|
|
12
11
|
|
|
13
|
-
// Helper: flatten leading ./, remove leading public/ or components/.
|
|
14
12
|
function flattenPath(p) {
|
|
15
13
|
return p
|
|
16
14
|
.replace(/^\.\//, "")
|
|
@@ -18,19 +16,55 @@ function flattenPath(p) {
|
|
|
18
16
|
.replace(/^components\//, "");
|
|
19
17
|
}
|
|
20
18
|
|
|
21
|
-
// Create entry maps: drop extension so esbuild appends single correct one.
|
|
22
19
|
const scssEntries = scssSources.reduce((acc, src) => {
|
|
23
20
|
acc[flattenPath(src).replace(/\.scss$/i, "")] = src;
|
|
24
21
|
return acc;
|
|
25
22
|
}, {});
|
|
23
|
+
const cssEntries = cssSources.reduce((acc, src) => {
|
|
24
|
+
acc[flattenPath(src).replace(/\.css$/i, "")] = src;
|
|
25
|
+
return acc;
|
|
26
|
+
}, {});
|
|
26
27
|
const jsEntries = jsSources.reduce((acc, src) => {
|
|
27
28
|
acc[flattenPath(src).replace(/\.(?:js|mjs)$/i, "")] = src;
|
|
28
29
|
return acc;
|
|
29
30
|
}, {});
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
await esbuild.build({
|
|
33
|
+
entryPoints: ["./public/publicBundleBase.scss"],
|
|
34
|
+
plugins: [
|
|
35
|
+
sassPlugin({
|
|
36
|
+
async transform(source) {
|
|
37
|
+
const { css } = await postcss([
|
|
38
|
+
autoprefixer,
|
|
39
|
+
postcssPresetEnv({ stage: 0 }),
|
|
40
|
+
]).process(source);
|
|
41
|
+
return css;
|
|
42
|
+
},
|
|
43
|
+
}),
|
|
44
|
+
],
|
|
45
|
+
bundle: false,
|
|
46
|
+
outdir: "./public",
|
|
47
|
+
});
|
|
48
|
+
|
|
32
49
|
await esbuild.build({
|
|
33
50
|
entryPoints: scssEntries,
|
|
51
|
+
plugins: [
|
|
52
|
+
sassPlugin({
|
|
53
|
+
async transform(source) {
|
|
54
|
+
const { css } = await postcss([
|
|
55
|
+
autoprefixer,
|
|
56
|
+
postcssPresetEnv({ stage: 0, from: "css" }),
|
|
57
|
+
]).process(source);
|
|
58
|
+
return css;
|
|
59
|
+
},
|
|
60
|
+
}),
|
|
61
|
+
],
|
|
62
|
+
bundle: false,
|
|
63
|
+
outdir: "./public",
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
await esbuild.build({
|
|
67
|
+
entryPoints: cssEntries,
|
|
34
68
|
plugins: [
|
|
35
69
|
sassPlugin({
|
|
36
70
|
async transform(source) {
|
|
@@ -46,7 +80,6 @@ await esbuild.build({
|
|
|
46
80
|
outdir: "./public",
|
|
47
81
|
});
|
|
48
82
|
|
|
49
|
-
// JS build (outputs .js files)
|
|
50
83
|
await esbuild.build({
|
|
51
84
|
entryPoints: jsEntries,
|
|
52
85
|
bundle: false,
|
package/onion-loader-local.js
CHANGED
|
@@ -52,7 +52,7 @@ function lazyloaderInit() {
|
|
|
52
52
|
options.debugLogMessages && console.log('Lazy Loader initialized!');
|
|
53
53
|
options.lazyBlocksToSearchFor = [];
|
|
54
54
|
assetArray.forEach((asset) => {
|
|
55
|
-
if (asset.assetKey.includes('-v3')) {
|
|
55
|
+
if (asset.assetKey.includes('-v3') || asset.assetKey.includes('-v4')) {
|
|
56
56
|
options.assetMap[asset.assetKey] = {
|
|
57
57
|
js: () =>
|
|
58
58
|
import(
|
package/package.json
CHANGED
package/public/assetList.mjs
CHANGED
|
@@ -1,3 +1,79 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const dynamicAssets = [
|
|
2
|
+
"./components/block-video-content-v3/video-content-v3.scss",
|
|
3
|
+
"./components/block-sub-group-container-v3/sub-group-container-v3.scss",
|
|
4
|
+
"./components/block-sticky-buy-cta-v3/sticky-buy-cta-v3.scss",
|
|
5
|
+
"./components/block-standard-content-v3/standard-content-v3.scss",
|
|
6
|
+
"./components/block-spotify-embed-v3/spotify-embed-v3.scss",
|
|
7
|
+
"./components/block-spacer-v3/spacer-v3.scss",
|
|
8
|
+
"./components/block-social-networks-v3/social-networks-v3.scss",
|
|
9
|
+
"./components/block-smash-balloon-social-media-v3/smash-balloon-social-media-v3.scss",
|
|
10
|
+
"./components/block-site-title-and-tagline-v3/site-title-and-tagline-v3.scss",
|
|
11
|
+
"./components/block-site-logo-container-v3/site-logo-container-v3.scss",
|
|
12
|
+
"./components/block-site-copyright-notice-v3/site-copyright-notice-v3.scss",
|
|
13
|
+
"./components/block-single-responsive-image-v3/single-responsive-image-v3.scss",
|
|
14
|
+
"./components/block-single-column-container-v3/single-column-container-v3.scss",
|
|
15
|
+
"./components/block-section-separator-v3/section-separator-v3.scss",
|
|
16
|
+
"./components/block-scrolling-banner-v3/scrolling-banner-v3.scss",
|
|
17
|
+
"./components/block-responsive-table-v3/responsive-table-v3.scss",
|
|
18
|
+
"./components/block-raw-html-v3/raw-html-v3.scss",
|
|
19
|
+
"./components/block-product-info-v3/product-info-v3.scss",
|
|
20
|
+
"./components/block-post-type-filter-grid-v3/post-type-filter-grid-v3.scss",
|
|
21
|
+
"./components/block-post-info-v3/post-info-v3.scss",
|
|
22
|
+
"./components/block-nav-menu-container-v3/nav-menu-container-v3.scss",
|
|
23
|
+
"./components/block-modal-form-v3/modal-form-v3.scss",
|
|
24
|
+
"./components/block-market-selector-v3/market-selector-v3.scss",
|
|
25
|
+
"./components/block-lottie-content-v3/lottie-content-v3.scss",
|
|
26
|
+
"./components/block-group-container-v3/group-container-v3.scss",
|
|
27
|
+
"./components/block-gradient-layer-v3/gradient-layer-v3.scss",
|
|
28
|
+
"./components/block-form-selection-v3/form-selection-v3.scss",
|
|
29
|
+
"./components/block-featured-image-gallery-v3/featured-image-gallery-v3.scss",
|
|
30
|
+
"./components/block-divider-v3/divider-v3.scss",
|
|
31
|
+
"./components/block-cover-link-v3/cover-link-v3.scss",
|
|
32
|
+
"./components/block-cocktail-recipe-v3/cocktail-recipe-v3.scss",
|
|
33
|
+
"./components/block-carousel-multi-layout-v3/carousel-multi-layout-v3.scss",
|
|
34
|
+
"./components/block-block-interactions-v3/block-interactions-v3.scss",
|
|
35
|
+
"./components/block-betterreviews-display-v3/betterreviews-display-v3.scss",
|
|
36
|
+
"./components/block-back-to-top-button-v3/back-to-top-button-v3.scss",
|
|
37
|
+
"./components/block-accordion-v3/accordion-v3.scss",
|
|
38
|
+
"./components/block-accent-image-v3/accent-image-v3.scss",
|
|
39
|
+
"./components/block-post-type-filter-grid-v4/post-type-filter-grid-v4.css",
|
|
40
|
+
"./components/block-video-content-v3/video-content-v3.js",
|
|
41
|
+
"./components/block-sub-group-container-v3/sub-group-container-v3.js",
|
|
42
|
+
"./components/block-sticky-buy-cta-v3/sticky-buy-cta-v3.js",
|
|
43
|
+
"./components/block-standard-content-v3/standard-content-v3.js",
|
|
44
|
+
"./components/block-spotify-embed-v3/spotify-embed-v3.js",
|
|
45
|
+
"./components/block-spacer-v3/spacer-v3.js",
|
|
46
|
+
"./components/block-social-networks-v3/social-networks-v3.js",
|
|
47
|
+
"./components/block-smash-balloon-social-media-v3/smash-balloon-social-media-v3.js",
|
|
48
|
+
"./components/block-site-title-and-tagline-v3/site-title-and-tagline-v3.js",
|
|
49
|
+
"./components/block-site-logo-container-v3/site-logo-container-v3.js",
|
|
50
|
+
"./components/block-site-copyright-notice-v3/site-copyright-notice-v3.js",
|
|
51
|
+
"./components/block-single-responsive-image-v3/single-responsive-image-v3.js",
|
|
52
|
+
"./components/block-single-column-container-v3/single-column-container-v3.js",
|
|
53
|
+
"./components/block-section-separator-v3/section-separator-v3.js",
|
|
54
|
+
"./components/block-scrolling-banner-v3/scrolling-banner-v3.js",
|
|
55
|
+
"./components/block-responsive-table-v3/responsive-table-v3.js",
|
|
56
|
+
"./components/block-raw-html-v3/raw-html-v3.js",
|
|
57
|
+
"./components/block-product-info-v3/product-info-v3.js",
|
|
58
|
+
"./components/block-post-type-filter-grid-v3/post-type-filter-grid-v3.js",
|
|
59
|
+
"./components/block-post-info-v3/post-info-v3.js",
|
|
60
|
+
"./components/block-nav-menu-container-v3/nav-menu-container-v3.js",
|
|
61
|
+
"./components/block-modal-form-v3/modal-form-v3.js",
|
|
62
|
+
"./components/block-market-selector-v3/market-selector-v3.js",
|
|
63
|
+
"./components/block-lottie-content-v3/lottie-content-v3.js",
|
|
64
|
+
"./components/block-group-container-v3/group-container-v3.js",
|
|
65
|
+
"./components/block-gradient-layer-v3/gradient-layer-v3.js",
|
|
66
|
+
"./components/block-form-selection-v3/form-selection-v3.js",
|
|
67
|
+
"./components/block-featured-image-gallery-v3/featured-image-gallery-v3.js",
|
|
68
|
+
"./components/block-divider-v3/divider-v3.js",
|
|
69
|
+
"./components/block-cover-link-v3/cover-link-v3.js",
|
|
70
|
+
"./components/block-cocktail-recipe-v3/cocktail-recipe-v3.js",
|
|
71
|
+
"./components/block-carousel-multi-layout-v3/carousel-multi-layout-v3.js",
|
|
72
|
+
"./components/block-block-interactions-v3/block-interactions-v3.js",
|
|
73
|
+
"./components/block-betterreviews-display-v3/betterreviews-display-v3.js",
|
|
74
|
+
"./components/block-back-to-top-button-v3/back-to-top-button-v3.js",
|
|
75
|
+
"./components/block-accordion-v3/accordion-v3.js",
|
|
76
|
+
"./components/block-accent-image-v3/accent-image-v3.js",
|
|
77
|
+
"./components/block-post-type-filter-grid-v4/post-type-filter-grid-v4.js",
|
|
78
|
+
];
|
|
3
79
|
export default dynamicAssets;
|