@adaas/are-html 0.0.15 → 0.0.16
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.d.mts +2 -5
- package/dist/browser/index.mjs +13 -14
- package/dist/browser/index.mjs.map +1 -1
- package/dist/node/lib/AreRoot/AreRoot.component.d.mts +2 -5
- package/dist/node/lib/AreRoot/AreRoot.component.d.ts +2 -5
- package/dist/node/lib/AreRoot/AreRoot.component.js +13 -14
- package/dist/node/lib/AreRoot/AreRoot.component.js.map +1 -1
- package/dist/node/lib/AreRoot/AreRoot.component.mjs +14 -15
- package/dist/node/lib/AreRoot/AreRoot.component.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/AreRoot/AreRoot.component.ts +14 -13
package/dist/browser/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AreStoreWatchingEntity, AreNode, AreAttribute, AreStore, AreScene, AreSyntax, AreMutation, AreDeclaration, AreInstructionSerialized, AreNodeNewProps, Are, AreSignal, AreContext, AreInstruction, AreCompiler, AreEngine, AreSignalsContext, AreSyntaxTokenMatch, AreInterpreter, AreLifecycle, AreTokenizer, AreTransformer
|
|
1
|
+
import { AreStoreWatchingEntity, AreNode, AreAttribute, AreStore, AreScene, AreSyntax, AreMutation, AreDeclaration, AreInstructionSerialized, AreNodeNewProps, Are, AreSignal, AreContext, AreInstruction, AreCompiler, AreEngine, AreSignalsContext, AreSyntaxTokenMatch, AreInterpreter, AreLifecycle, AreTokenizer, AreTransformer } from '@adaas/are';
|
|
2
2
|
import { A_Component, A_TYPES__Ctor, A_Fragment, ASEID, A_Scope, A_Feature, A_ComponentMeta } from '@adaas/a-concept';
|
|
3
3
|
import { A_Logger } from '@adaas/a-utils/a-logger';
|
|
4
4
|
import { A_ExecutionContext } from '@adaas/a-utils/a-execution';
|
|
@@ -624,11 +624,8 @@ type AreDirectiveOrderDecoratorParameters = {
|
|
|
624
624
|
};
|
|
625
625
|
|
|
626
626
|
declare class AreRoot extends Are {
|
|
627
|
-
props: Record<string, ArePropDefinition>;
|
|
628
627
|
template(root: AreNode, logger: A_Logger, signalsContext?: AreSignalsContext): Promise<void>;
|
|
629
|
-
onSignal(root: AreNode, vector: A_SignalVector,
|
|
630
|
-
default: string;
|
|
631
|
-
}>, logger: A_Logger, signalsContext?: AreSignalsContext): Promise<void>;
|
|
628
|
+
onSignal(root: AreNode, vector: A_SignalVector, logger: A_Logger, signalsContext?: AreSignalsContext): Promise<void>;
|
|
632
629
|
}
|
|
633
630
|
|
|
634
631
|
declare class AreRouteWatcher extends A_Component {
|
package/dist/browser/index.mjs
CHANGED
|
@@ -2181,15 +2181,6 @@ AreHTMLEngine = __decorateClass([
|
|
|
2181
2181
|
})
|
|
2182
2182
|
], AreHTMLEngine);
|
|
2183
2183
|
var AreRoot = class extends Are {
|
|
2184
|
-
constructor() {
|
|
2185
|
-
super(...arguments);
|
|
2186
|
-
this.props = {
|
|
2187
|
-
default: {
|
|
2188
|
-
type: "string",
|
|
2189
|
-
default: ""
|
|
2190
|
-
}
|
|
2191
|
-
};
|
|
2192
|
-
}
|
|
2193
2184
|
async template(root, logger, signalsContext) {
|
|
2194
2185
|
const rootId = root.id;
|
|
2195
2186
|
if (signalsContext && !signalsContext.hasRoot(rootId)) {
|
|
@@ -2242,7 +2233,7 @@ var AreRoot = class extends Are {
|
|
|
2242
2233
|
}
|
|
2243
2234
|
root.setContent(`<${componentName}></${componentName}>`);
|
|
2244
2235
|
}
|
|
2245
|
-
async onSignal(root, vector,
|
|
2236
|
+
async onSignal(root, vector, logger, signalsContext) {
|
|
2246
2237
|
const rootId = root.id;
|
|
2247
2238
|
if (signalsContext && !signalsContext.hasRoot(rootId)) {
|
|
2248
2239
|
return;
|
|
@@ -2258,8 +2249,17 @@ var AreRoot = class extends Are {
|
|
|
2258
2249
|
}
|
|
2259
2250
|
}
|
|
2260
2251
|
}
|
|
2261
|
-
const
|
|
2252
|
+
const def = signalsContext?.getDefault(rootId);
|
|
2253
|
+
const componentName = renderTarget?.name ? A_FormatterHelper.toKebabCase(renderTarget.name) : def?.name ? A_FormatterHelper.toKebabCase(def.name) : void 0;
|
|
2262
2254
|
if (!componentName) {
|
|
2255
|
+
for (let i = 0; i < root.children.length; i++) {
|
|
2256
|
+
const child = root.children[i];
|
|
2257
|
+
signalsContext?.unsubscribe(child);
|
|
2258
|
+
child.unmount();
|
|
2259
|
+
child.destroy();
|
|
2260
|
+
root.removeChild(child);
|
|
2261
|
+
}
|
|
2262
|
+
root.setContent("");
|
|
2263
2263
|
return;
|
|
2264
2264
|
}
|
|
2265
2265
|
const currentChild = root.children[0];
|
|
@@ -2298,9 +2298,8 @@ __decorateClass([
|
|
|
2298
2298
|
Are.Signal,
|
|
2299
2299
|
__decorateParam(0, A_Inject(A_Caller)),
|
|
2300
2300
|
__decorateParam(1, A_Inject(A_SignalVector)),
|
|
2301
|
-
__decorateParam(2, A_Inject(
|
|
2302
|
-
__decorateParam(3, A_Inject(
|
|
2303
|
-
__decorateParam(4, A_Inject(AreSignalsContext))
|
|
2301
|
+
__decorateParam(2, A_Inject(A_Logger)),
|
|
2302
|
+
__decorateParam(3, A_Inject(AreSignalsContext))
|
|
2304
2303
|
], AreRoot.prototype, "onSignal", 1);
|
|
2305
2304
|
AreRoot = __decorateClass([
|
|
2306
2305
|
A_Frame.Define({
|