@total_onion/onion-library 2.0.94 → 2.0.96
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.
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
export const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export const triggerOptions = {
|
|
2
|
+
// root: document.querySelector('#scrollArea'),
|
|
3
|
+
rootMargin: '0px',
|
|
4
|
+
scrollMargin: '0px',
|
|
5
|
+
threshold: 1
|
|
6
6
|
};
|
|
7
|
-
export function triggerEntryAnimation(element
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
export function triggerEntryAnimation(element) {
|
|
8
|
+
const intersectionCallback = (entries) => {
|
|
9
|
+
entries.forEach((entry) => {
|
|
10
|
+
if (entry.isIntersecting) {
|
|
11
|
+
let elem = entry.target;
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
elem.classList.add('trigger-animation');
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
const observer = new IntersectionObserver(
|
|
18
|
+
intersectionCallback,
|
|
19
|
+
triggerOptions
|
|
20
|
+
);
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
observer.observe(element);
|
|
20
23
|
}
|
|
@@ -8,7 +8,7 @@ acf_register_block_type(
|
|
|
8
8
|
newBlockName.charAt(0).toUpperCase() +
|
|
9
9
|
newBlockName.slice(1).replaceAll('-', ' ')
|
|
10
10
|
}', '${projectName} Admin' ),
|
|
11
|
-
'render_callback' => '
|
|
11
|
+
'render_callback' => 'core_block_render_post_object_v3',
|
|
12
12
|
'category' => 'child-patterns',
|
|
13
13
|
'icon' => get_svg_icon_content('green-brick.svg'),
|
|
14
14
|
'keywords' => array('content', 'text' ),
|