@total_onion/onion-library 1.0.245 → 1.0.247

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.
@@ -10,6 +10,6 @@
10
10
  {{gridLayoutElement}}
11
11
  }
12
12
  </style>
13
- <div class="{{blockClassName}}__content-container {{textEditorContainerClasses}} {{block.id}}">
14
- <{{elementType|default('p')}} class="{{blockClassName}}__post-categories {{blockClassName}}__info-item {{field.text_style.typography_style|ru}} {{block.id}}" data-pattern-post-info="post_categories.0.name">{{post.categories.0.name}}</{{elementType|default('p')}}>
13
+ <div class="{{blockClassName}}__content-container {{blockClassName}}__post-categories {{blockClassName}}__info-item {{textEditorContainerClasses}} {{block.id}}">
14
+ <{{elementType|default('p')}} class="{{blockClassName}}__post-categories {{field.text_style.typography_style|ru}} {{block.id}}" data-pattern-post-info="post_categories.0.name">{{post.categories.0.name}}</{{elementType|default('p')}}>
15
15
  </div>
@@ -64,4 +64,5 @@
64
64
  <span class="{{blockClassName}}__post-cover-label">{{post.title}}</span>
65
65
  </a>
66
66
  {% endif %}
67
- {{htmlEntryPoint}}</section>
67
+ {{htmlEntryPoint}}
68
+ </section>
@@ -1,9 +1,6 @@
1
- @use 'NodeModules/@total_onion/onion-library/components/fields-core-typography-mixins-v3/core-typography-mixins-v3';
2
- @use 'NodeModules/@total_onion/onion-library/components/fields-core-critical-v3/core-critical-v3';
3
- @use 'Assets/scss/modules/dynamicBlocksPreview.scss';
4
- @use 'Assets/scss/theme/font-face';
5
- @use 'Assets/scss/theme/typography';
6
- @use 'NodeModules/swiper/swiper-bundle';
1
+ @use '../fields-core-typography-mixins-v3/core-typography-mixins-v3';
2
+ @use '../fields-core-critical-v3/core-critical-v3';
3
+ @use '../../public/dynamicBlockScss-v3.scss';
7
4
  @include core-critical-v3.coreCriticalV3();
8
5
 
9
6
  /* Box sizing rules */
@@ -33,8 +30,6 @@ html :where([style*='border-width'][data-assetkey]) {
33
30
  }
34
31
 
35
32
  .acf-block-component.acf-block-body .acf-block-preview {
36
- @include typography.typography();
37
-
38
33
  .swiper {
39
34
  &::before {
40
35
  content: '';
@@ -6,17 +6,16 @@ const themePath =
6
6
  process.env.THEME_PATH || 'web/wp-content/themes/global-theme';
7
7
 
8
8
  // Create the directory path for the target file
9
- const scssModulePath = path.join(themePath, 'assets/scss/modules');
9
+ const scssModulePath = path.join(
10
+ './node_modules/@total_onion/onion-library/public'
11
+ );
10
12
  const scssFilePath = path.join(scssModulePath, 'dynamicBlockScss-v3.scss');
11
13
 
12
14
  // Create directories if they don't exist
13
15
  fs.mkdirSync(scssModulePath, {recursive: true});
14
16
 
15
17
  // Write the initial content to the target file
16
- fs.writeFileSync(
17
- scssFilePath,
18
- '// This file is auto-generated. To include assets for the lazyloader, just add your .scss file to Assets/scss/blocks/ and it will be included here.\n'
19
- );
18
+ fs.writeFileSync(scssFilePath, '// This file is auto-generated.\n');
20
19
 
21
20
  const dynamicEntryPoints = globSync(
22
21
  `${themePath}/node_modules/@total_onion/onion-library/components/block-*/*-v3.scss`
@@ -0,0 +1,40 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+ const {globSync} = require('glob');
4
+
5
+ const dynamicEntryPoints = globSync(
6
+ `./node_modules/@total_onion/onion-library/components/block-*/*.js`
7
+ ).map((filePath) => {
8
+ const assetKey = path.basename(filePath, '.js');
9
+ return assetKey;
10
+ });
11
+ const assetArray = dynamicEntryPoints.map((entry) => {
12
+ return {assetKey: entry};
13
+ });
14
+
15
+ // Create the directory path for the target file
16
+ const jsModulePath = path.join(
17
+ './node_modules/@total_onion/onion-library/public'
18
+ );
19
+ const jsAssetsFilePath = path.join(jsModulePath, 'jsAssets.mjs');
20
+
21
+ // Create directories if they don't exist
22
+ fs.mkdirSync(jsModulePath, {recursive: true});
23
+
24
+ // Write the initial content to the target file
25
+ fs.writeFileSync(
26
+ jsAssetsFilePath,
27
+ '// This file is auto-generated. To include assets for the lazyloader, just add your .scss file to Assets/scss/blocks/ and it will be included here.\n'
28
+ );
29
+
30
+ // Create directories if they don't exist
31
+ const dirPath = path.dirname(jsAssetsFilePath);
32
+ fs.mkdirSync(dirPath, {recursive: true});
33
+
34
+ const data = `
35
+ const dynamicAssets = ${JSON.stringify(assetArray)};
36
+ const api = {dynamicAssets};
37
+ export default api;
38
+ `;
39
+
40
+ fs.writeFileSync(jsAssetsFilePath, data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@total_onion/onion-library",
3
- "version": "1.0.245",
3
+ "version": "1.0.247",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/createJsAssets.js DELETED
@@ -1,27 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
- const {globSync} = require('glob');
4
-
5
- const dynamicEntryPoints = globSync(`./components/block-*/*.js`).map(
6
- (filePath) => {
7
- const assetKey = path.basename(filePath, '.js');
8
- return assetKey;
9
- }
10
- );
11
- const assetArray = dynamicEntryPoints.map((entry) => {
12
- return {assetKey: entry};
13
- });
14
-
15
- const jsAssetsFilePath = './jsAssets.mjs';
16
-
17
- // Create directories if they don't exist
18
- const dirPath = path.dirname(jsAssetsFilePath);
19
- fs.mkdirSync(dirPath, {recursive: true});
20
-
21
- const data = `
22
- const dynamicAssets = ${JSON.stringify(assetArray)};
23
- const api = {dynamicAssets};
24
- export default api;
25
- `;
26
-
27
- fs.writeFileSync(jsAssetsFilePath, data);