@symbiotejs/symbiote 3.3.9 → 3.4.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/CHANGELOG.md +6 -0
- package/core/tpl-processors.js +7 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.4.0
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **DevMode warning for `{{prop}}` in SSR/ISO mode.** Text-node bindings produce no `bind=` attribute in SSR output, so they render correctly on the server but cannot be hydrated on the client. When `devMode = true` and the component has `ssrMode` or `isoMode` enabled, a `console.warn` now suggests using `${{textContent: 'prop'}}` for hydratable text.
|
|
8
|
+
|
|
3
9
|
## 3.3.9
|
|
4
10
|
|
|
5
11
|
### Improved
|
package/core/tpl-processors.js
CHANGED
|
@@ -155,6 +155,13 @@ const txtNodesProcessor = function (fr, fnCtx) {
|
|
|
155
155
|
if (!fnCtx.has(prop) && fnCtx.allowTemplateInits) {
|
|
156
156
|
initPropFallback(fnCtx, prop);
|
|
157
157
|
}
|
|
158
|
+
if (fnCtx.Symbiote?.devMode && (fnCtx.ssrMode || fnCtx.isoMode)) {
|
|
159
|
+
console.warn(
|
|
160
|
+
`[Symbiote dev] <${fnCtx.localName}>: text-node binding "{{${prop}}}" has no hydration attribute. `
|
|
161
|
+
+ 'In ssrMode/isoMode it will be rendered by the server but won\'t update on the client. '
|
|
162
|
+
+ 'Use property binding (${{textContent: \'' + prop + '\'}}) for hydratable text.'
|
|
163
|
+
);
|
|
164
|
+
}
|
|
158
165
|
fnCtx.sub(prop, (val) => {
|
|
159
166
|
tNode.textContent = val;
|
|
160
167
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@symbiotejs/symbiote",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.4.0",
|
|
5
5
|
"description": "Symbiote.js - zero-dependency close-to-platform frontend library to build super-powered web components",
|
|
6
6
|
"author": "team@rnd-pro.com",
|
|
7
7
|
"license": "MIT",
|