vanilla-agent 1.27.0 → 1.28.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vanilla-agent",
3
- "version": "1.27.0",
3
+ "version": "1.28.0",
4
4
  "description": "Themeable, plugable streaming agent widget for websites, in plain JS with support for voice input and reasoning / tool output.",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -1364,10 +1364,13 @@ function generateScriptAdvancedCode(config: any): string {
1364
1364
  " }",
1365
1365
  " };",
1366
1366
  "",
1367
- " // Boot sequence: load CSS, then JS, then wait for hydration, then initialize",
1368
- " loadCSS();",
1369
- " loadJS(function() {",
1370
- " waitForHydration(init);",
1367
+ " // Boot sequence: wait for hydration, then load CSS and JS, then initialize",
1368
+ " // This prevents Next.js/Nuxt/etc. from removing dynamically added CSS during reconciliation",
1369
+ " waitForHydration(function() {",
1370
+ " loadCSS();",
1371
+ " loadJS(function() {",
1372
+ " init();",
1373
+ " });",
1371
1374
  " });",
1372
1375
  "})();",
1373
1376
  "</script>"