@adaas/are 0.0.3 → 0.0.5
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/LICENSE +10 -19
- package/README.md +14 -2
- package/dist/browser/index.d.mts +843 -751
- package/dist/browser/index.mjs +2729 -2481
- package/dist/browser/index.mjs.map +1 -1
- package/dist/node/AreInstruction.entity-Ceyy0tbf.d.mts +163 -0
- package/dist/node/AreInstruction.entity-Ceyy0tbf.d.ts +163 -0
- package/dist/node/index.d.mts +37 -1
- package/dist/node/index.d.ts +37 -1
- package/dist/node/index.js +28 -0
- package/dist/node/index.mjs +4 -0
- package/dist/node/lib/AreAttribute/AreAttribute.entity.d.mts +80 -13
- package/dist/node/lib/AreAttribute/AreAttribute.entity.d.ts +80 -13
- package/dist/node/lib/AreCompiler/AreCompiler.component.d.mts +3 -13
- package/dist/node/lib/AreCompiler/AreCompiler.component.d.ts +3 -13
- package/dist/node/lib/AreComponent/Are.context.d.mts +64 -14
- package/dist/node/lib/AreComponent/Are.context.d.ts +64 -14
- package/dist/node/lib/AreEngine/AreEngine.component.d.mts +9 -23
- package/dist/node/lib/AreEngine/AreEngine.component.d.ts +9 -23
- package/dist/node/lib/AreEngine/AreEngine.types.d.mts +9 -25
- package/dist/node/lib/AreEngine/AreEngine.types.d.ts +9 -25
- package/dist/node/lib/AreInstruction/AreInstruction.entity.d.mts +3 -13
- package/dist/node/lib/AreInstruction/AreInstruction.entity.d.ts +3 -13
- package/dist/node/lib/AreInstruction/AreInstruction.types.d.mts +3 -13
- package/dist/node/lib/AreInstruction/AreInstruction.types.d.ts +3 -13
- package/dist/node/lib/AreInstruction/types/AreDeclaration.instruction.d.mts +37 -14
- package/dist/node/lib/AreInstruction/types/AreDeclaration.instruction.d.ts +37 -14
- package/dist/node/lib/AreInstruction/types/AreMutation.instruction.d.mts +29 -14
- package/dist/node/lib/AreInstruction/types/AreMutation.instruction.d.ts +29 -14
- package/dist/node/lib/AreInterpreter/AreInterpreter.component.d.mts +3 -13
- package/dist/node/lib/AreInterpreter/AreInterpreter.component.d.ts +3 -13
- package/dist/node/lib/AreLifecycle/AreLifecycle.component.d.mts +4 -13
- package/dist/node/lib/AreLifecycle/AreLifecycle.component.d.ts +4 -13
- package/dist/node/lib/AreLoader/AreLoader.component.d.mts +2 -13
- package/dist/node/lib/AreLoader/AreLoader.component.d.ts +2 -13
- package/dist/node/lib/AreNode/AreNode.entity.d.mts +197 -13
- package/dist/node/lib/AreNode/AreNode.entity.d.ts +197 -13
- package/dist/node/lib/AreNode/AreNode.types.d.mts +8 -14
- package/dist/node/lib/AreNode/AreNode.types.d.ts +8 -14
- package/dist/node/lib/AreScene/AreScene.context.d.mts +170 -13
- package/dist/node/lib/AreScene/AreScene.context.d.ts +170 -13
- package/dist/node/lib/AreScene/AreScene.types.d.mts +21 -14
- package/dist/node/lib/AreScene/AreScene.types.d.ts +21 -14
- package/dist/node/lib/AreSignals/AreSignals.component.d.mts +3 -12
- package/dist/node/lib/AreSignals/AreSignals.component.d.ts +3 -12
- package/dist/node/lib/AreSignals/AreSignals.context.d.mts +2 -12
- package/dist/node/lib/AreSignals/AreSignals.context.d.ts +2 -12
- package/dist/node/lib/AreSignals/AreSignals.meta.d.mts +1 -3
- package/dist/node/lib/AreSignals/AreSignals.meta.d.ts +1 -3
- package/dist/node/lib/AreSignals/AreSignals.types.d.mts +1 -3
- package/dist/node/lib/AreSignals/AreSignals.types.d.ts +1 -3
- package/dist/node/lib/AreSignals/entities/AreInit.signal.d.mts +1 -2
- package/dist/node/lib/AreSignals/entities/AreInit.signal.d.ts +1 -2
- package/dist/node/lib/AreSignals/entities/AreRoute.signal.d.mts +1 -1
- package/dist/node/lib/AreSignals/entities/AreRoute.signal.d.ts +1 -1
- package/dist/node/lib/AreStore/AreStore.context.d.mts +54 -13
- package/dist/node/lib/AreStore/AreStore.context.d.ts +54 -13
- package/dist/node/lib/AreSyntax/AreSyntax.context.d.mts +10 -12
- package/dist/node/lib/AreSyntax/AreSyntax.context.d.ts +10 -12
- package/dist/node/lib/AreSyntax/AreSyntax.types.d.mts +79 -14
- package/dist/node/lib/AreSyntax/AreSyntax.types.d.ts +79 -14
- package/dist/node/lib/AreTokenizer/AreTokenizer.component.d.mts +4 -14
- package/dist/node/lib/AreTokenizer/AreTokenizer.component.d.ts +4 -14
- package/dist/node/lib/AreTransformer/AreTransformer.component.d.mts +2 -13
- package/dist/node/lib/AreTransformer/AreTransformer.component.d.ts +2 -13
- package/package.json +32 -17
- package/src/index.ts +6 -0
- package/dist/node/Are.context-9Ija_fdC.d.ts +0 -846
- package/dist/node/Are.context-D7w32H1G.d.mts +0 -846
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import '@adaas/a-concept';
|
|
2
|
-
export {
|
|
3
|
-
import '@adaas/
|
|
4
|
-
import '
|
|
5
|
-
import '@adaas/a-utils/a-execution';
|
|
6
|
-
import '../AreStore/AreStore.types.js';
|
|
7
|
-
import '../AreStore/AreStore.constants.js';
|
|
8
|
-
import '../AreScene/AreScene.constants.js';
|
|
9
|
-
import '../AreAttribute/AreAttribute.types.js';
|
|
10
|
-
import '../AreAttribute/AreAttribute.constants.js';
|
|
11
|
-
import '../AreComponent/Are.component.js';
|
|
12
|
-
import '../AreComponent/Are.types.js';
|
|
13
|
-
import '../AreComponent/Are.constants.js';
|
|
14
|
-
import '../AreNode/AreNode.constants.js';
|
|
2
|
+
export { a as AreInstructionNewProps, b as AreInstructionSerialized } from '../../AreInstruction.entity-Ceyy0tbf.js';
|
|
3
|
+
import '@adaas/are/node/AreNode.entity';
|
|
4
|
+
import '@adaas/are/store/AreStore.types';
|
|
@@ -1,14 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
import '@adaas/
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { AreInstruction } from '@adaas/are/instruction/AreInstruction.entity';
|
|
2
|
+
import { AreInstructionSerialized } from '@adaas/are/instruction/AreInstruction.types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* This is a top-level instruction that represents the creation of a new element in the scene. It contains all the necessary information to create a new element, such as its tag and parent. This instruction can be applied to the scene to create a new element and can be reverted to remove the created element.
|
|
6
|
+
*/
|
|
7
|
+
declare class AreDeclaration<T extends Record<string, any> = Record<string, any>, S extends AreInstructionSerialized<T> = AreInstructionSerialized<T>> extends AreInstruction<T, S> {
|
|
8
|
+
constructor(
|
|
9
|
+
/**
|
|
10
|
+
* Serialized form of the instruction, used for deserialization and reconstruction of the instruction instance. This allows for the instruction to be easily stored, transmitted, and recreated in different contexts or at different times, while maintaining all the necessary information and relationships intact.
|
|
11
|
+
*/
|
|
12
|
+
serialized: AreInstructionSerialized);
|
|
13
|
+
constructor(
|
|
14
|
+
/**
|
|
15
|
+
* The name of the operation to be performed in Host. For example, for CreateElement instruction, the name can be "createElement", so the Host can have a method with the same name to handle this instruction.
|
|
16
|
+
*/
|
|
17
|
+
name: string,
|
|
18
|
+
/**
|
|
19
|
+
* In case this is a child instruction that is related to a declaration instruction, we can pass the parent declaration instruction to establish the relationship between them. This allows us to manage related instructions together and ensure that they are executed in the correct order in the scene.
|
|
20
|
+
*/
|
|
21
|
+
parent: AreDeclaration,
|
|
22
|
+
/**
|
|
23
|
+
* A set of additional parameters that may be needed for the rendering purpose. For example, for CreateElement instruction, the payload can contain the tag name and parent information, so the Host can use this information to create the element in the correct place in the scene.
|
|
24
|
+
*/
|
|
25
|
+
payload: T);
|
|
26
|
+
constructor(
|
|
27
|
+
/**
|
|
28
|
+
* The name of the operation to be performed in Host. For example, for CreateElement instruction, the name can be "createElement", so the Host can have a method with the same name to handle this instruction.
|
|
29
|
+
*/
|
|
30
|
+
name?: string,
|
|
31
|
+
/**
|
|
32
|
+
* A set of additional parameters that may be needed for the rendering purpose. For example, for CreateElement instruction, the payload can contain the tag name and parent information, so the Host can use this information to create the element in the correct place in the scene.
|
|
33
|
+
*/
|
|
34
|
+
payload?: T);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { AreDeclaration };
|
|
@@ -1,14 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
import '@adaas/
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { AreInstruction } from '@adaas/are/instruction/AreInstruction.entity';
|
|
2
|
+
import { AreInstructionSerialized } from '@adaas/are/instruction/AreInstruction.types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* This is a top-level instruction that represents the creation of a new element in the scene. It contains all the necessary information to create a new element, such as its tag and parent. This instruction can be applied to the scene to create a new element and can be reverted to remove the created element.
|
|
6
|
+
*/
|
|
7
|
+
declare class AreDeclaration<T extends Record<string, any> = Record<string, any>, S extends AreInstructionSerialized<T> = AreInstructionSerialized<T>> extends AreInstruction<T, S> {
|
|
8
|
+
constructor(
|
|
9
|
+
/**
|
|
10
|
+
* Serialized form of the instruction, used for deserialization and reconstruction of the instruction instance. This allows for the instruction to be easily stored, transmitted, and recreated in different contexts or at different times, while maintaining all the necessary information and relationships intact.
|
|
11
|
+
*/
|
|
12
|
+
serialized: AreInstructionSerialized);
|
|
13
|
+
constructor(
|
|
14
|
+
/**
|
|
15
|
+
* The name of the operation to be performed in Host. For example, for CreateElement instruction, the name can be "createElement", so the Host can have a method with the same name to handle this instruction.
|
|
16
|
+
*/
|
|
17
|
+
name: string,
|
|
18
|
+
/**
|
|
19
|
+
* In case this is a child instruction that is related to a declaration instruction, we can pass the parent declaration instruction to establish the relationship between them. This allows us to manage related instructions together and ensure that they are executed in the correct order in the scene.
|
|
20
|
+
*/
|
|
21
|
+
parent: AreDeclaration,
|
|
22
|
+
/**
|
|
23
|
+
* A set of additional parameters that may be needed for the rendering purpose. For example, for CreateElement instruction, the payload can contain the tag name and parent information, so the Host can use this information to create the element in the correct place in the scene.
|
|
24
|
+
*/
|
|
25
|
+
payload: T);
|
|
26
|
+
constructor(
|
|
27
|
+
/**
|
|
28
|
+
* The name of the operation to be performed in Host. For example, for CreateElement instruction, the name can be "createElement", so the Host can have a method with the same name to handle this instruction.
|
|
29
|
+
*/
|
|
30
|
+
name?: string,
|
|
31
|
+
/**
|
|
32
|
+
* A set of additional parameters that may be needed for the rendering purpose. For example, for CreateElement instruction, the payload can contain the tag name and parent information, so the Host can use this information to create the element in the correct place in the scene.
|
|
33
|
+
*/
|
|
34
|
+
payload?: T);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { AreDeclaration };
|
|
@@ -1,14 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
import '@adaas/
|
|
3
|
-
import '
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { AreInstruction } from '@adaas/are/instruction/AreInstruction.entity';
|
|
2
|
+
import { AreInstructionSerialized, AreInstructionNewProps } from '@adaas/are/instruction/AreInstruction.types';
|
|
3
|
+
import { AreDeclaration } from './AreDeclaration.instruction.mjs';
|
|
4
|
+
|
|
5
|
+
declare class AreMutation<T extends Record<string, any> = Record<string, any>, S extends AreInstructionSerialized<T> = AreInstructionSerialized<T>> extends AreInstruction<T, S> {
|
|
6
|
+
get parent(): string;
|
|
7
|
+
get group(): string;
|
|
8
|
+
constructor(
|
|
9
|
+
/**
|
|
10
|
+
* Serialized form of the instruction, used for deserialization and reconstruction of the instruction instance. This allows for the instruction to be easily stored, transmitted, and recreated in different contexts or at different times, while maintaining all the necessary information and relationships intact.
|
|
11
|
+
*/
|
|
12
|
+
serialized: S);
|
|
13
|
+
constructor(
|
|
14
|
+
/**
|
|
15
|
+
* The name of the operation to be performed in Host.
|
|
16
|
+
*/
|
|
17
|
+
name: string,
|
|
18
|
+
/**
|
|
19
|
+
* Parent instruction for grouping in case of mutations related to a specific declaration. This allows for better organization and management of instructions in the scene, as all mutations related to the same declaration will be executed together.
|
|
20
|
+
*/
|
|
21
|
+
parent: AreDeclaration,
|
|
22
|
+
/**
|
|
23
|
+
* A set of additional parameters that may be needed for the rendering purpose. For example, for AddAttribute instruction, the payload can contain the attribute name and value as a payload, so the Host can use this information to add the attribute to the node.
|
|
24
|
+
*/
|
|
25
|
+
payload?: T);
|
|
26
|
+
fromNew(newEntity: AreInstructionNewProps<T>): void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { AreMutation };
|
|
@@ -1,14 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
import '@adaas/
|
|
3
|
-
import '
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { AreInstruction } from '@adaas/are/instruction/AreInstruction.entity';
|
|
2
|
+
import { AreInstructionSerialized, AreInstructionNewProps } from '@adaas/are/instruction/AreInstruction.types';
|
|
3
|
+
import { AreDeclaration } from './AreDeclaration.instruction.js';
|
|
4
|
+
|
|
5
|
+
declare class AreMutation<T extends Record<string, any> = Record<string, any>, S extends AreInstructionSerialized<T> = AreInstructionSerialized<T>> extends AreInstruction<T, S> {
|
|
6
|
+
get parent(): string;
|
|
7
|
+
get group(): string;
|
|
8
|
+
constructor(
|
|
9
|
+
/**
|
|
10
|
+
* Serialized form of the instruction, used for deserialization and reconstruction of the instruction instance. This allows for the instruction to be easily stored, transmitted, and recreated in different contexts or at different times, while maintaining all the necessary information and relationships intact.
|
|
11
|
+
*/
|
|
12
|
+
serialized: S);
|
|
13
|
+
constructor(
|
|
14
|
+
/**
|
|
15
|
+
* The name of the operation to be performed in Host.
|
|
16
|
+
*/
|
|
17
|
+
name: string,
|
|
18
|
+
/**
|
|
19
|
+
* Parent instruction for grouping in case of mutations related to a specific declaration. This allows for better organization and management of instructions in the scene, as all mutations related to the same declaration will be executed together.
|
|
20
|
+
*/
|
|
21
|
+
parent: AreDeclaration,
|
|
22
|
+
/**
|
|
23
|
+
* A set of additional parameters that may be needed for the rendering purpose. For example, for AddAttribute instruction, the payload can contain the attribute name and value as a payload, so the Host can use this information to add the attribute to the node.
|
|
24
|
+
*/
|
|
25
|
+
payload?: T);
|
|
26
|
+
fromNew(newEntity: AreInstructionNewProps<T>): void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { AreMutation };
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
import { A_Component, A_Scope, A_Feature } from '@adaas/a-concept';
|
|
2
|
-
import {
|
|
3
|
-
import '@adaas/
|
|
4
|
-
import '
|
|
5
|
-
import '@adaas/a-utils/a-execution';
|
|
6
|
-
import '../AreStore/AreStore.types.mjs';
|
|
7
|
-
import '../AreStore/AreStore.constants.mjs';
|
|
8
|
-
import '../AreScene/AreScene.constants.mjs';
|
|
9
|
-
import '../AreAttribute/AreAttribute.types.mjs';
|
|
10
|
-
import '../AreAttribute/AreAttribute.constants.mjs';
|
|
11
|
-
import '../AreComponent/Are.component.mjs';
|
|
12
|
-
import '../AreComponent/Are.types.mjs';
|
|
13
|
-
import '../AreComponent/Are.constants.mjs';
|
|
14
|
-
import '../AreNode/AreNode.constants.mjs';
|
|
2
|
+
import { AreScene } from '@adaas/are/scene/AreScene.context';
|
|
3
|
+
import { AreInstruction } from '@adaas/are/instruction/AreInstruction.entity';
|
|
4
|
+
import { AreStore } from '@adaas/are/store/AreStore.context';
|
|
15
5
|
|
|
16
6
|
declare class AreInterpreter extends A_Component {
|
|
17
7
|
/**
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
import { A_Component, A_Scope, A_Feature } from '@adaas/a-concept';
|
|
2
|
-
import {
|
|
3
|
-
import '@adaas/
|
|
4
|
-
import '
|
|
5
|
-
import '@adaas/a-utils/a-execution';
|
|
6
|
-
import '../AreStore/AreStore.types.js';
|
|
7
|
-
import '../AreStore/AreStore.constants.js';
|
|
8
|
-
import '../AreScene/AreScene.constants.js';
|
|
9
|
-
import '../AreAttribute/AreAttribute.types.js';
|
|
10
|
-
import '../AreAttribute/AreAttribute.constants.js';
|
|
11
|
-
import '../AreComponent/Are.component.js';
|
|
12
|
-
import '../AreComponent/Are.types.js';
|
|
13
|
-
import '../AreComponent/Are.constants.js';
|
|
14
|
-
import '../AreNode/AreNode.constants.js';
|
|
2
|
+
import { AreScene } from '@adaas/are/scene/AreScene.context';
|
|
3
|
+
import { AreInstruction } from '@adaas/are/instruction/AreInstruction.entity';
|
|
4
|
+
import { AreStore } from '@adaas/are/store/AreStore.context';
|
|
15
5
|
|
|
16
6
|
declare class AreInterpreter extends A_Component {
|
|
17
7
|
/**
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { A_Component, A_TYPES__Entity_Constructor, A_Scope, A_Feature } from '@adaas/a-concept';
|
|
2
|
-
import {
|
|
2
|
+
import { AreScene } from '@adaas/are/scene/AreScene.context';
|
|
3
|
+
import { AreNode } from '@adaas/are/node/AreNode.entity';
|
|
3
4
|
import { A_Logger } from '@adaas/a-utils/a-logger';
|
|
4
|
-
import '@adaas/
|
|
5
|
-
import '
|
|
6
|
-
import '@adaas/a-utils/a-execution';
|
|
7
|
-
import '../AreStore/AreStore.types.mjs';
|
|
8
|
-
import '../AreStore/AreStore.constants.mjs';
|
|
9
|
-
import '../AreScene/AreScene.constants.mjs';
|
|
10
|
-
import '../AreAttribute/AreAttribute.types.mjs';
|
|
11
|
-
import '../AreAttribute/AreAttribute.constants.mjs';
|
|
12
|
-
import '../AreComponent/Are.component.mjs';
|
|
13
|
-
import '../AreComponent/Are.types.mjs';
|
|
14
|
-
import '../AreComponent/Are.constants.mjs';
|
|
15
|
-
import '../AreNode/AreNode.constants.mjs';
|
|
5
|
+
import { AreAttribute } from '@adaas/are/attribute/AreAttribute.entity';
|
|
6
|
+
import { AreContext } from '@adaas/are/component/Are.context';
|
|
16
7
|
|
|
17
8
|
declare class AreLifecycle extends A_Component {
|
|
18
9
|
static Init<T extends AreNode>(node: A_TYPES__Entity_Constructor<T>): any;
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { A_Component, A_TYPES__Entity_Constructor, A_Scope, A_Feature } from '@adaas/a-concept';
|
|
2
|
-
import {
|
|
2
|
+
import { AreScene } from '@adaas/are/scene/AreScene.context';
|
|
3
|
+
import { AreNode } from '@adaas/are/node/AreNode.entity';
|
|
3
4
|
import { A_Logger } from '@adaas/a-utils/a-logger';
|
|
4
|
-
import '@adaas/
|
|
5
|
-
import '
|
|
6
|
-
import '@adaas/a-utils/a-execution';
|
|
7
|
-
import '../AreStore/AreStore.types.js';
|
|
8
|
-
import '../AreStore/AreStore.constants.js';
|
|
9
|
-
import '../AreScene/AreScene.constants.js';
|
|
10
|
-
import '../AreAttribute/AreAttribute.types.js';
|
|
11
|
-
import '../AreAttribute/AreAttribute.constants.js';
|
|
12
|
-
import '../AreComponent/Are.component.js';
|
|
13
|
-
import '../AreComponent/Are.types.js';
|
|
14
|
-
import '../AreComponent/Are.constants.js';
|
|
15
|
-
import '../AreNode/AreNode.constants.js';
|
|
5
|
+
import { AreAttribute } from '@adaas/are/attribute/AreAttribute.entity';
|
|
6
|
+
import { AreContext } from '@adaas/are/component/Are.context';
|
|
16
7
|
|
|
17
8
|
declare class AreLifecycle extends A_Component {
|
|
18
9
|
static Init<T extends AreNode>(node: A_TYPES__Entity_Constructor<T>): any;
|
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
import { A_Component, A_Scope, A_Feature } from '@adaas/a-concept';
|
|
2
2
|
import { A_Logger } from '@adaas/a-utils/a-logger';
|
|
3
|
-
import {
|
|
4
|
-
import '@adaas/
|
|
5
|
-
import '../AreEvent/AreEvent.context.mjs';
|
|
6
|
-
import '@adaas/a-utils/a-execution';
|
|
7
|
-
import '../AreStore/AreStore.types.mjs';
|
|
8
|
-
import '../AreStore/AreStore.constants.mjs';
|
|
9
|
-
import '../AreScene/AreScene.constants.mjs';
|
|
10
|
-
import '../AreAttribute/AreAttribute.types.mjs';
|
|
11
|
-
import '../AreAttribute/AreAttribute.constants.mjs';
|
|
12
|
-
import '../AreComponent/Are.component.mjs';
|
|
13
|
-
import '../AreComponent/Are.types.mjs';
|
|
14
|
-
import '../AreComponent/Are.constants.mjs';
|
|
15
|
-
import '../AreNode/AreNode.constants.mjs';
|
|
3
|
+
import { AreNode } from '@adaas/are/node/AreNode.entity';
|
|
4
|
+
import { AreContext } from '@adaas/are/component/Are.context';
|
|
16
5
|
|
|
17
6
|
declare class AreLoader extends A_Component {
|
|
18
7
|
/**
|
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
import { A_Component, A_Scope, A_Feature } from '@adaas/a-concept';
|
|
2
2
|
import { A_Logger } from '@adaas/a-utils/a-logger';
|
|
3
|
-
import {
|
|
4
|
-
import '@adaas/
|
|
5
|
-
import '../AreEvent/AreEvent.context.js';
|
|
6
|
-
import '@adaas/a-utils/a-execution';
|
|
7
|
-
import '../AreStore/AreStore.types.js';
|
|
8
|
-
import '../AreStore/AreStore.constants.js';
|
|
9
|
-
import '../AreScene/AreScene.constants.js';
|
|
10
|
-
import '../AreAttribute/AreAttribute.types.js';
|
|
11
|
-
import '../AreAttribute/AreAttribute.constants.js';
|
|
12
|
-
import '../AreComponent/Are.component.js';
|
|
13
|
-
import '../AreComponent/Are.types.js';
|
|
14
|
-
import '../AreComponent/Are.constants.js';
|
|
15
|
-
import '../AreNode/AreNode.constants.js';
|
|
3
|
+
import { AreNode } from '@adaas/are/node/AreNode.entity';
|
|
4
|
+
import { AreContext } from '@adaas/are/component/Are.context';
|
|
16
5
|
|
|
17
6
|
declare class AreLoader extends A_Component {
|
|
18
7
|
/**
|
|
@@ -1,14 +1,198 @@
|
|
|
1
|
-
import '@adaas/a-concept';
|
|
2
|
-
import '
|
|
3
|
-
|
|
4
|
-
import '
|
|
5
|
-
import '@adaas/
|
|
6
|
-
import '
|
|
7
|
-
import '
|
|
8
|
-
import '../AreStore/AreStore.constants.mjs';
|
|
9
|
-
import '../AreScene/AreScene.constants.mjs';
|
|
10
|
-
import '../AreAttribute/AreAttribute.types.mjs';
|
|
11
|
-
import '../AreAttribute/AreAttribute.constants.mjs';
|
|
1
|
+
import { A_Entity, A_Scope, ASEID } from '@adaas/a-concept';
|
|
2
|
+
import { AreEvent } from '@adaas/are/event/AreEvent.context';
|
|
3
|
+
import { AreScene } from '@adaas/are/scene/AreScene.context';
|
|
4
|
+
import { AreAttribute } from '@adaas/are/attribute/AreAttribute.entity';
|
|
5
|
+
import { Are } from '@adaas/are/component/Are.component';
|
|
6
|
+
import { AreNodeNewProps, AreNodeStatusNames } from './AreNode.types.mjs';
|
|
7
|
+
import { AreSyntaxTokenPayload } from '@adaas/are/syntax/AreSyntax.types';
|
|
12
8
|
import './AreNode.constants.mjs';
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
|
|
10
|
+
declare class AreNode extends A_Entity<AreNodeNewProps> {
|
|
11
|
+
/**
|
|
12
|
+
* The current status of the node, which can be used to track the lifecycle and rendering state of the node within the scene.
|
|
13
|
+
*/
|
|
14
|
+
status: AreNodeStatusNames;
|
|
15
|
+
/**
|
|
16
|
+
* The opening string that defines the start of a node in the source. This is typically used for parsing and tokenizing the source to identify the structure and content of the node. The opening string can include the tag name, attributes, and other syntax that indicates the beginning of a node.
|
|
17
|
+
*/
|
|
18
|
+
protected _opening: string;
|
|
19
|
+
/**
|
|
20
|
+
* The closing string that defines the end of a node in the source. This is typically used for parsing and tokenizing the source to identify the structure and content of the node. The closing string can include the tag name, attributes, and other syntax that indicates the end of a node.
|
|
21
|
+
*/
|
|
22
|
+
protected _closing: string;
|
|
23
|
+
/**
|
|
24
|
+
* The position of the node in the source string, which can be used for error reporting, debugging, and other purposes related to tracking the location of the node within the original source. The position is a character index identifying where the node is defined.
|
|
25
|
+
*/
|
|
26
|
+
protected _position: number;
|
|
27
|
+
/**
|
|
28
|
+
* The payload associated with the node, which can include any additional data or metadata that is extracted during the tokenization process. The payload can be used to store custom information related to the node, such as directive arguments, binding expressions, or any other relevant data that may be needed for processing and rendering the node within the scene.
|
|
29
|
+
*/
|
|
30
|
+
protected _payload?: AreSyntaxTokenPayload;
|
|
31
|
+
/**
|
|
32
|
+
* Content string defined for the node — the inner content between delimiters.
|
|
33
|
+
* Example: `{{name}}`
|
|
34
|
+
*/
|
|
35
|
+
protected _content: string;
|
|
36
|
+
/**
|
|
37
|
+
* Markup string defined for the node
|
|
38
|
+
* Example: `<custom-component :prop="value"> <div>Inner Content</div> </custom-component>`
|
|
39
|
+
*/
|
|
40
|
+
protected _markup: string;
|
|
41
|
+
/**
|
|
42
|
+
* The scope associated with this node
|
|
43
|
+
* uses to store all nested fragments and entities like other AreNodes and Scene
|
|
44
|
+
*/
|
|
45
|
+
protected _scope: A_Scope;
|
|
46
|
+
/**
|
|
47
|
+
* Actual node identifier.
|
|
48
|
+
*/
|
|
49
|
+
get id(): string;
|
|
50
|
+
/**
|
|
51
|
+
* Actual node type.
|
|
52
|
+
* By default it's a tag name
|
|
53
|
+
*/
|
|
54
|
+
get type(): string;
|
|
55
|
+
/**
|
|
56
|
+
* Content string defined for the node — the inner content between delimiters.
|
|
57
|
+
* Example: `{{name}}`
|
|
58
|
+
*/
|
|
59
|
+
get content(): string;
|
|
60
|
+
/**
|
|
61
|
+
* Markup string defined for the node
|
|
62
|
+
* Example: `<custom-component :prop="value"> <div>Inner Content</div> </custom-component>`
|
|
63
|
+
*/
|
|
64
|
+
get markup(): string;
|
|
65
|
+
/**
|
|
66
|
+
* The scope associated with this node
|
|
67
|
+
* uses to store all nested fragments and entities like other AreNodes and Scene
|
|
68
|
+
*/
|
|
69
|
+
get scope(): A_Scope;
|
|
70
|
+
/**
|
|
71
|
+
* The attributes defined for the node, which can include static attributes, binding attributes, directive attributes, and event attributes. These attributes are extracted during tokenization and processed during the compilation phase to generate the corresponding SceneInstructions for rendering and updating the node in the scene.
|
|
72
|
+
*/
|
|
73
|
+
get attributes(): AreAttribute[];
|
|
74
|
+
/**
|
|
75
|
+
* A custom component associated with this node, which can be used to provide custom logic and behavior for the node. This component is typically defined in the context and can be resolved based on the node's type or other identifying information. The component can include its own content, markup, styles, and features that are specific to the functionality it provides.
|
|
76
|
+
*
|
|
77
|
+
* Example: If the node type is "custom-component", the corresponding component would be resolved from the context and can be used to provide custom rendering and behavior for nodes of that type.
|
|
78
|
+
*
|
|
79
|
+
* [!] Note: The component is optional and may not be defined for all nodes. If no component is associated with the node, it will be treated as a standard HTML element or a basic node without custom logic.
|
|
80
|
+
*/
|
|
81
|
+
get component(): Are | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* The parent node of this node, which is the node that registered the current node in its scope. This is typically the node that is responsible for rendering the current node and managing its lifecycle within the scene. The parent node can be used to access shared context, propagate events, and manage interactions between nodes in a hierarchical structure.
|
|
84
|
+
*
|
|
85
|
+
* Example: For a node defined as `<div><span>Child Node</span></div>`, the parent node of the `<span>` element would be the `<div>` element, which is responsible for rendering the `<span>` and managing its lifecycle within the scene.
|
|
86
|
+
*/
|
|
87
|
+
get parent(): AreNode | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* The child nodes of this node, which are typically defined in the markup and registered in the scope as child entities. These child nodes can represent nested elements or components within the node and can have their own content, markup, styles, and features. The child nodes are managed within the scope of the parent node and can be accessed and manipulated as needed for rendering, updating, and lifecycle management.
|
|
90
|
+
*
|
|
91
|
+
* Example: For a node defined as `<div><span>Child Node</span></div>`, the child node would be the `<span>` element, which is registered as a child entity in the scope of the parent `<div>` node.
|
|
92
|
+
*/
|
|
93
|
+
get children(): (AreNode)[];
|
|
94
|
+
/**
|
|
95
|
+
* It returns the scene where the node exists, so it should be the scene of the rootNode,
|
|
96
|
+
* primary parent of this node.
|
|
97
|
+
*/
|
|
98
|
+
get scene(): AreScene;
|
|
99
|
+
protected _scene: AreScene;
|
|
100
|
+
fromNew(newEntity: AreNodeNewProps): void;
|
|
101
|
+
fromASEID(aseid: string | ASEID): void;
|
|
102
|
+
/**
|
|
103
|
+
* Sets the content string for the node — the inner text/markup between the node's
|
|
104
|
+
* opening and closing delimiters. Content is processed by the rendering engine to
|
|
105
|
+
* generate the corresponding SceneInstructions for rendering the node.
|
|
106
|
+
*
|
|
107
|
+
* @param content
|
|
108
|
+
*/
|
|
109
|
+
setContent(content: string): void;
|
|
110
|
+
/**
|
|
111
|
+
* Sets the markup string for the node, which is the full raw matched string including delimiters. The markup can include HTML-like syntax, custom components, directives, and other features that are processed by the rendering engine to generate the corresponding SceneInstructions for rendering the node.
|
|
112
|
+
*
|
|
113
|
+
* @param markup
|
|
114
|
+
*/
|
|
115
|
+
setMarkup(markup: string): void;
|
|
116
|
+
/**
|
|
117
|
+
* Adds a child node to the current node's scope and ensures the child inherits from this node's scope.
|
|
118
|
+
*
|
|
119
|
+
* @param child - The node to add as a child
|
|
120
|
+
*/
|
|
121
|
+
addChild(child: AreNode): void;
|
|
122
|
+
/**
|
|
123
|
+
* Removes a child node from the current node's scope. This is typically used when a child node is no longer needed or should be detached from the parent node. The method ensures that the child node is properly deregistered from the scope and any associated resources are cleaned up as necessary.
|
|
124
|
+
*
|
|
125
|
+
* @param node - The child node to be removed from the current node's scope
|
|
126
|
+
*/
|
|
127
|
+
removeChild(node: AreNode): void;
|
|
128
|
+
/**
|
|
129
|
+
* Executes initialization logic for the node, which typically involves setting up the node's scope, registering any necessary entities, and preparing the node for rendering and interaction within the scene. This method is called during the initial phase of the node's lifecycle and is responsible for ensuring that the node is properly initialized before it is compiled and rendered in the scene.
|
|
130
|
+
*/
|
|
131
|
+
init(): void;
|
|
132
|
+
/**
|
|
133
|
+
* Loads the node, which typically involves executing any necessary setup or initialization logic to prepare the node for rendering and interaction within the scene. This may include processing the node's content, markup, styles, and features to generate the corresponding SceneInstructions, as well as setting up any event listeners or reactive properties as needed.
|
|
134
|
+
*/
|
|
135
|
+
load(): Promise<any>;
|
|
136
|
+
/**
|
|
137
|
+
* Tokenizes the node content, which typically involves parsing the raw content string to identify the structure, child nodes, attributes, directives, and other features. This process is essential for breaking down the content into its constituent parts and preparing it for further processing during the compilation phase. The tokenization process can involve creating child nodes, extracting attributes and their values, and identifying any directives or bindings that need to be processed during rendering.
|
|
138
|
+
*/
|
|
139
|
+
tokenize(): void;
|
|
140
|
+
/**
|
|
141
|
+
* Transforms the node, which typically involves executing any necessary logic to reshape the node's structure or content before it is compiled and rendered in the scene. This may include applying any transformations defined by directives, processing any dynamic content or expressions, and performing any other necessary tasks to ensure that the node is properly prepared for compilation and rendering based on its content, markup, styles, and features.
|
|
142
|
+
*/
|
|
143
|
+
transform(): void;
|
|
144
|
+
/**
|
|
145
|
+
* Compile the node. This method should transform the node's content, markup, and styles into a set of SceneInstructions that can be executed to render the node in the scene. The compile method is responsible for processing the node's features, attributes, directives, and other properties to generate the necessary instructions for rendering and updating the node in response to changes in state or context.
|
|
146
|
+
*
|
|
147
|
+
* [!] Note: The compile method should ensure that the node's scope is properly inherited from the context scope before processing, and it should handle any errors that may occur during compilation to ensure that the node can be rendered correctly in the scene.
|
|
148
|
+
*/
|
|
149
|
+
compile(): void;
|
|
150
|
+
/**
|
|
151
|
+
* Mounts the node, which typically involves executing any necessary logic to render the node in the scene and to set up any interactions or behaviors associated with the node. This may include applying the generated SceneInstructions from the compile phase, attaching event listeners, and performing any other necessary tasks to ensure that the node is properly rendered and functional within the scene.
|
|
152
|
+
*
|
|
153
|
+
* [!] Note: The mount method should ensure that the node's scope is properly inherited from the context scope before performing any mounting logic, and it should handle any errors that may occur during mounting to ensure that the node can be rendered correctly in the scene.
|
|
154
|
+
*/
|
|
155
|
+
mount(): void;
|
|
156
|
+
/**
|
|
157
|
+
* Interprets the node, which typically involves executing any necessary logic to process the node's features, attributes, directives, and other properties to generate the corresponding SceneInstructions for rendering and updating the node in response to changes in state or context. This method is responsible for ensuring that the node is properly interpreted based on its content, markup, styles, and features to enable dynamic behavior and responsiveness within the scene.
|
|
158
|
+
*
|
|
159
|
+
* [!] Note: The interpret method should NOT go though own child, since it may be used by both mount and update operations!
|
|
160
|
+
*/
|
|
161
|
+
interpret(): void;
|
|
162
|
+
/**
|
|
163
|
+
* Updates the node, which typically involves executing any necessary logic to update the node's rendering and behavior in response to changes in state, context, or other factors. This may include reapplying SceneInstructions, updating event listeners, and performing any other necessary tasks to ensure that the node remains functional and correctly rendered within the scene as changes occur.
|
|
164
|
+
*
|
|
165
|
+
* [!] Note: The update method should ensure that the node's scope is properly inherited from the context scope before performing any update logic, and it should handle any errors that may occur during updating to ensure that the node can be updated correctly in the scene.
|
|
166
|
+
*/
|
|
167
|
+
update(): void;
|
|
168
|
+
/**
|
|
169
|
+
* Unmounts the node, which typically involves executing any necessary logic to remove the node from the scene and to clean up any resources associated with the node. This may include reverting any applied SceneInstructions, detaching event listeners, and performing any other necessary tasks to ensure that the node is properly removed from the scene and that resources are released as needed.
|
|
170
|
+
*
|
|
171
|
+
* [!] Note: The unmount method should ensure that the node's scope is properly inherited from the context scope before performing any unmounting logic, and it should handle any errors that may occur during unmounting to ensure that the node can be removed correctly from the scene.
|
|
172
|
+
*/
|
|
173
|
+
unmount(): void;
|
|
174
|
+
cloneWithScope<T extends AreNode = AreNode>(this: T): T;
|
|
175
|
+
reset(): void;
|
|
176
|
+
clone<T extends AreNode = AreNode>(this: T): T;
|
|
177
|
+
/**
|
|
178
|
+
* Emits an event or a scope to the node, which can be used to trigger event handlers or to provide additional context for processing within the node. The method can accept either an AreEvent instance or an A_Scope instance, and it will handle the emission accordingly. This allows for flexible communication and interaction within the node's context, enabling dynamic behavior and responsiveness based on events or changes in scope.
|
|
179
|
+
*
|
|
180
|
+
* @param scope - The scope or event to be emitted to the node
|
|
181
|
+
*/
|
|
182
|
+
emit(scope: A_Scope): any;
|
|
183
|
+
emit(event: AreEvent): any;
|
|
184
|
+
/**
|
|
185
|
+
* Destroys the node, which typically involves executing any necessary cleanup logic to remove the node from the scene and to free up any resources associated with the node. This may include deregistering the node from its scope, removing any event listeners or reactive properties, and performing any other necessary cleanup tasks to ensure that the node is properly removed from the scene and that resources are released as needed.
|
|
186
|
+
*
|
|
187
|
+
* [!] Note: The destroy method should ensure that the node's scope is properly inherited from the context scope before performing any cleanup, and it should handle any errors that may occur during destruction to ensure that resources are released correctly.
|
|
188
|
+
*/
|
|
189
|
+
destroy(): Promise<any>;
|
|
190
|
+
/**
|
|
191
|
+
* Method to ensure that the current scope is inherited from the context scope
|
|
192
|
+
*
|
|
193
|
+
* @throws A_Error if the scope is not inherited from the context scope
|
|
194
|
+
*/
|
|
195
|
+
protected checkScopeInheritance(): void;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export { AreNode };
|