@hortonstudio/main 1.1.23 → 1.1.24

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.
@@ -248,8 +248,11 @@ export async function init() {
248
248
  headingSplits = [];
249
249
 
250
250
  if (heading.length > 0) {
251
- headingSplitElements.forEach((parent, index) => {
252
- const textElement = heading[index];
251
+ // Fresh DOM selection like text.js does
252
+ const freshHeadings = document.querySelectorAll('[data-hs-hero="heading"] > *:first-child');
253
+
254
+ freshHeadings.forEach((textElement, index) => {
255
+ const parent = textElement.parentElement;
253
256
  const splitType = parent.getAttribute('data-hs-heroconfig') || 'word';
254
257
 
255
258
  let splitConfig = {};
@@ -289,8 +292,11 @@ export async function init() {
289
292
 
290
293
  // Split text setup for subheadings
291
294
  if (subheading.length > 0) {
292
- subheadingSplitElements.forEach((parent, index) => {
293
- const textElement = subheading[index];
295
+ // Fresh DOM selection like text.js does
296
+ const freshSubheadings = document.querySelectorAll('[data-hs-hero="subheading"] > *:first-child');
297
+
298
+ freshSubheadings.forEach((textElement, index) => {
299
+ const parent = textElement.parentElement;
294
300
  const splitType = parent.getAttribute('data-hs-heroconfig') || 'word';
295
301
 
296
302
  let splitConfig = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hortonstudio/main",
3
- "version": "1.1.23",
3
+ "version": "1.1.24",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "scripts": {
package/styles.css CHANGED
@@ -11,10 +11,6 @@ body .transition {display: block}
11
11
  margin-inline: -.1em;
12
12
  }
13
13
 
14
- /* safari line detection fix */
15
- [data-hs-hero="heading"] {
16
- text-wrap: wrap !important;
17
- }
18
14
 
19
15
  /* scroll cleanliness */
20
16
  html, body {