@adaas/are-html 0.0.13 → 0.0.14
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/dist/browser/index.mjs +10 -0
- package/dist/browser/index.mjs.map +1 -1
- package/dist/node/lib/AreRoot/AreRoot.component.js +10 -0
- package/dist/node/lib/AreRoot/AreRoot.component.js.map +1 -1
- package/dist/node/lib/AreRoot/AreRoot.component.mjs +10 -0
- package/dist/node/lib/AreRoot/AreRoot.component.mjs.map +1 -1
- package/package.json +3 -3
- package/src/lib/AreRoot/AreRoot.component.ts +17 -1
package/dist/browser/index.mjs
CHANGED
|
@@ -2220,6 +2220,12 @@ var AreRoot = class extends Are {
|
|
|
2220
2220
|
return;
|
|
2221
2221
|
}
|
|
2222
2222
|
}
|
|
2223
|
+
if (!componentName) {
|
|
2224
|
+
const defaultComp = signalsContext?.getDefault(rootId);
|
|
2225
|
+
if (defaultComp?.name) {
|
|
2226
|
+
componentName = A_FormatterHelper.toKebabCase(defaultComp.name);
|
|
2227
|
+
}
|
|
2228
|
+
}
|
|
2223
2229
|
if (!componentName) {
|
|
2224
2230
|
const defaultMatch = root.markup?.match(/\bdefault=["']([^"']*)["']/);
|
|
2225
2231
|
componentName = defaultMatch?.[1];
|
|
@@ -2244,6 +2250,10 @@ var AreRoot = class extends Are {
|
|
|
2244
2250
|
if (!componentName) {
|
|
2245
2251
|
return;
|
|
2246
2252
|
}
|
|
2253
|
+
const currentChild = root.children[0];
|
|
2254
|
+
if (currentChild?.type === componentName) {
|
|
2255
|
+
return;
|
|
2256
|
+
}
|
|
2247
2257
|
root.setContent(`<${componentName}></${componentName}>`);
|
|
2248
2258
|
for (let i = 0; i < root.children.length; i++) {
|
|
2249
2259
|
const child = root.children[i];
|