@hortonstudio/main 1.2.21 → 1.2.23
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/animations/hero.js +8 -0
- package/animations/text.js +8 -0
- package/index.js +6 -2
- package/package.json +1 -1
package/animations/hero.js
CHANGED
@@ -176,8 +176,16 @@ export async function init() {
|
|
176
176
|
|
177
177
|
// Check if there's a persistent config stored globally
|
178
178
|
const api = window[API_NAME] || {};
|
179
|
+
console.log('🔄 Hero animations init - full API object:', api);
|
180
|
+
console.log('🔄 Hero animations init - _persistentConfigs:', api._persistentConfigs);
|
179
181
|
console.log('🔄 Hero animations init - checking persistent config:', api._persistentConfigs?.heroAnimations);
|
180
182
|
|
183
|
+
// Ensure _persistentConfigs exists
|
184
|
+
if (!api._persistentConfigs) {
|
185
|
+
api._persistentConfigs = {};
|
186
|
+
console.log('🏗️ Hero animations - created _persistentConfigs object');
|
187
|
+
}
|
188
|
+
|
181
189
|
if (api._persistentConfigs?.heroAnimations) {
|
182
190
|
console.log('📝 Hero animations - applying persistent config:', api._persistentConfigs.heroAnimations);
|
183
191
|
// Merge persistent config into current config
|
package/animations/text.js
CHANGED
@@ -345,8 +345,16 @@ async function initAnimations() {
|
|
345
345
|
export async function init() {
|
346
346
|
// Check if there's a persistent config stored globally
|
347
347
|
const api = window[API_NAME] || {};
|
348
|
+
console.log('🔄 Text animations init - full API object:', api);
|
349
|
+
console.log('🔄 Text animations init - _persistentConfigs:', api._persistentConfigs);
|
348
350
|
console.log('🔄 Text animations init - checking persistent config:', api._persistentConfigs?.textAnimations);
|
349
351
|
|
352
|
+
// Ensure _persistentConfigs exists
|
353
|
+
if (!api._persistentConfigs) {
|
354
|
+
api._persistentConfigs = {};
|
355
|
+
console.log('🏗️ Text animations - created _persistentConfigs object');
|
356
|
+
}
|
357
|
+
|
350
358
|
if (api._persistentConfigs?.textAnimations) {
|
351
359
|
console.log('📝 Text animations - applying persistent config:', api._persistentConfigs.textAnimations);
|
352
360
|
// Merge persistent config into current config
|
package/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
// Version: 1.2.
|
1
|
+
// Version: 1.2.23
|
2
2
|
|
3
3
|
const API_NAME = 'hsmain';
|
4
4
|
|
@@ -109,6 +109,10 @@ const initializeHsMain = async () => {
|
|
109
109
|
|
110
110
|
const readyCallbacks = [];
|
111
111
|
|
112
|
+
// Initialize persistent config storage first, preserving any existing configs
|
113
|
+
const existingConfigs = window[API_NAME]?._persistentConfigs || {};
|
114
|
+
console.log('🏗️ Initializing main API - existing persistent configs:', existingConfigs);
|
115
|
+
|
112
116
|
window[API_NAME] = {
|
113
117
|
scripts,
|
114
118
|
modules: {},
|
@@ -116,7 +120,7 @@ const initializeHsMain = async () => {
|
|
116
120
|
load: loadModule,
|
117
121
|
loaded: false,
|
118
122
|
// Persistent config storage
|
119
|
-
_persistentConfigs:
|
123
|
+
_persistentConfigs: existingConfigs,
|
120
124
|
push(...items) {
|
121
125
|
for (const [moduleName, callback] of items) {
|
122
126
|
if (typeof callback === 'function') {
|