@adaas/are 0.0.4 → 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.
Files changed (68) hide show
  1. package/README.md +11 -1
  2. package/dist/browser/index.d.mts +843 -751
  3. package/dist/browser/index.mjs +2729 -2481
  4. package/dist/browser/index.mjs.map +1 -1
  5. package/dist/node/AreInstruction.entity-Ceyy0tbf.d.mts +163 -0
  6. package/dist/node/AreInstruction.entity-Ceyy0tbf.d.ts +163 -0
  7. package/dist/node/index.d.mts +37 -1
  8. package/dist/node/index.d.ts +37 -1
  9. package/dist/node/index.js +28 -0
  10. package/dist/node/index.mjs +4 -0
  11. package/dist/node/lib/AreAttribute/AreAttribute.entity.d.mts +80 -13
  12. package/dist/node/lib/AreAttribute/AreAttribute.entity.d.ts +80 -13
  13. package/dist/node/lib/AreCompiler/AreCompiler.component.d.mts +3 -13
  14. package/dist/node/lib/AreCompiler/AreCompiler.component.d.ts +3 -13
  15. package/dist/node/lib/AreComponent/Are.context.d.mts +64 -14
  16. package/dist/node/lib/AreComponent/Are.context.d.ts +64 -14
  17. package/dist/node/lib/AreEngine/AreEngine.component.d.mts +9 -23
  18. package/dist/node/lib/AreEngine/AreEngine.component.d.ts +9 -23
  19. package/dist/node/lib/AreEngine/AreEngine.types.d.mts +9 -25
  20. package/dist/node/lib/AreEngine/AreEngine.types.d.ts +9 -25
  21. package/dist/node/lib/AreInstruction/AreInstruction.entity.d.mts +3 -13
  22. package/dist/node/lib/AreInstruction/AreInstruction.entity.d.ts +3 -13
  23. package/dist/node/lib/AreInstruction/AreInstruction.types.d.mts +3 -13
  24. package/dist/node/lib/AreInstruction/AreInstruction.types.d.ts +3 -13
  25. package/dist/node/lib/AreInstruction/types/AreDeclaration.instruction.d.mts +37 -14
  26. package/dist/node/lib/AreInstruction/types/AreDeclaration.instruction.d.ts +37 -14
  27. package/dist/node/lib/AreInstruction/types/AreMutation.instruction.d.mts +29 -14
  28. package/dist/node/lib/AreInstruction/types/AreMutation.instruction.d.ts +29 -14
  29. package/dist/node/lib/AreInterpreter/AreInterpreter.component.d.mts +3 -13
  30. package/dist/node/lib/AreInterpreter/AreInterpreter.component.d.ts +3 -13
  31. package/dist/node/lib/AreLifecycle/AreLifecycle.component.d.mts +4 -13
  32. package/dist/node/lib/AreLifecycle/AreLifecycle.component.d.ts +4 -13
  33. package/dist/node/lib/AreLoader/AreLoader.component.d.mts +2 -13
  34. package/dist/node/lib/AreLoader/AreLoader.component.d.ts +2 -13
  35. package/dist/node/lib/AreNode/AreNode.entity.d.mts +197 -13
  36. package/dist/node/lib/AreNode/AreNode.entity.d.ts +197 -13
  37. package/dist/node/lib/AreNode/AreNode.types.d.mts +8 -14
  38. package/dist/node/lib/AreNode/AreNode.types.d.ts +8 -14
  39. package/dist/node/lib/AreScene/AreScene.context.d.mts +170 -13
  40. package/dist/node/lib/AreScene/AreScene.context.d.ts +170 -13
  41. package/dist/node/lib/AreScene/AreScene.types.d.mts +21 -14
  42. package/dist/node/lib/AreScene/AreScene.types.d.ts +21 -14
  43. package/dist/node/lib/AreSignals/AreSignals.component.d.mts +3 -12
  44. package/dist/node/lib/AreSignals/AreSignals.component.d.ts +3 -12
  45. package/dist/node/lib/AreSignals/AreSignals.context.d.mts +2 -12
  46. package/dist/node/lib/AreSignals/AreSignals.context.d.ts +2 -12
  47. package/dist/node/lib/AreSignals/AreSignals.meta.d.mts +1 -3
  48. package/dist/node/lib/AreSignals/AreSignals.meta.d.ts +1 -3
  49. package/dist/node/lib/AreSignals/AreSignals.types.d.mts +1 -3
  50. package/dist/node/lib/AreSignals/AreSignals.types.d.ts +1 -3
  51. package/dist/node/lib/AreSignals/entities/AreInit.signal.d.mts +1 -2
  52. package/dist/node/lib/AreSignals/entities/AreInit.signal.d.ts +1 -2
  53. package/dist/node/lib/AreSignals/entities/AreRoute.signal.d.mts +1 -1
  54. package/dist/node/lib/AreSignals/entities/AreRoute.signal.d.ts +1 -1
  55. package/dist/node/lib/AreStore/AreStore.context.d.mts +54 -13
  56. package/dist/node/lib/AreStore/AreStore.context.d.ts +54 -13
  57. package/dist/node/lib/AreSyntax/AreSyntax.context.d.mts +10 -12
  58. package/dist/node/lib/AreSyntax/AreSyntax.context.d.ts +10 -12
  59. package/dist/node/lib/AreSyntax/AreSyntax.types.d.mts +79 -14
  60. package/dist/node/lib/AreSyntax/AreSyntax.types.d.ts +79 -14
  61. package/dist/node/lib/AreTokenizer/AreTokenizer.component.d.mts +4 -14
  62. package/dist/node/lib/AreTokenizer/AreTokenizer.component.d.ts +4 -14
  63. package/dist/node/lib/AreTransformer/AreTransformer.component.d.mts +2 -13
  64. package/dist/node/lib/AreTransformer/AreTransformer.component.d.ts +2 -13
  65. package/package.json +3 -2
  66. package/src/index.ts +6 -0
  67. package/dist/node/Are.context-9Ija_fdC.d.ts +0 -846
  68. package/dist/node/Are.context-D7w32H1G.d.mts +0 -846
@@ -0,0 +1,163 @@
1
+ import { A_TYPES__Entity_Serialized, A_Entity, A_Scope } from '@adaas/a-concept';
2
+ import { AreNode } from '@adaas/are/node/AreNode.entity';
3
+ import { AreStoreWatchingEntity } from '@adaas/are/store/AreStore.types';
4
+
5
+ type AreInstructionNewProps<T extends any = Record<string, any>> = {
6
+ /**
7
+ * The deduplication ID that prevents duplicated instruction within the same node.
8
+ *
9
+ * For example to prevent duplicated AddAttribute instruction for the same attribute, we can use the attribute name as the deduplication ID, so if we have two AddAttribute instructions with the same attribute name, only the first one will be applied, and the second one will be ignored.
10
+ *
11
+ *
12
+ * [!] Note; By default it uses action name and group if provided
13
+ */
14
+ /**
15
+ * the Host operation to be performed. Exactly this name will be used to call a method from the Host class.
16
+ */
17
+ name: string;
18
+ /**
19
+ * The parent instruction that created this instruction. For example, if we have a CreateElement instruction that creates a new element, and then we have an AddAttribute instruction that adds an attribute to that element, the AddAttribute instruction would have the CreateElement instruction as its parent. This can be used to track the hierarchy of instructions and their dependencies.
20
+ */
21
+ parent?: AreInstruction | undefined;
22
+ /**
23
+ * Group is an optional property that can be used to group instructions together.
24
+ *
25
+ * For example a set of instructions that depend on create CreateElement instruction can be grouped together with the same group name, so if the CreateElement instruction is reverted, all the instructions in the same group will be reverted as well, and so on.
26
+ *
27
+ * This can be useful to manage complex changes that involve multiple instructions.
28
+ *
29
+ * [!] Note, the best option is to use ASEID of the Instruction as a group, so all instructions with the same ASEID will be treated as a single change, and will be applied and reverted together.
30
+ */
31
+ group?: AreInstruction | undefined;
32
+ /**
33
+ * A set of additional parameters that may be needed for the rendering purpose.
34
+ *
35
+ * For example: for AddAttribute instruction, we may need to provide the attribute name and value as a payload, so the Host can use this information to add the attribute to the node.
36
+ */
37
+ payload?: T;
38
+ };
39
+ type AreInstructionSerialized<T extends any = Record<string, any>> = {
40
+ /**
41
+ * The name of the instruction, which corresponds to the operation that should be performed in the Host. This name is used to identify the specific method in the Host that should be called to execute the instruction, allowing for a clear mapping between instructions and their corresponding actions in the rendering process.
42
+ */
43
+ name: string;
44
+ /**
45
+ * The type of the instruction, which can be used to categorize instructions and determine how they should be processed. For example, we can have different types for declaration instructions (e.g., DeclarationInstruction or CreateElement) and mutation instructions (e.g., AddAttribute), allowing for better organization and management of instructions based on their purpose and behavior in the scene.
46
+ */
47
+ type: string;
48
+ /**
49
+ * The parent instruction that created this instruction. For example, if we have a CreateElement instruction that creates a new element, and then we have an AddAttribute instruction that adds an attribute to that element, the AddAttribute instruction would have the CreateElement instruction as its parent. This can be used to track the hierarchy of instructions and their dependencies.
50
+ */
51
+ parent?: string | undefined;
52
+ /**
53
+ * Group is an optional property that can be used to group instructions together. For example a set of instructions that depend on create CreateElement instruction can be grouped together with the same group name, so if the CreateElement instruction is reverted, all the instructions in the same group will be reverted as well, and so on. This can be useful to manage complex changes that involve multiple instructions. The best option is to use ASEID of the Instruction as a group, so all instructions with the same ASEID will be treated as a single change, and will be applied and reverted together.
54
+ */
55
+ group?: string | undefined;
56
+ /**
57
+ * A set of additional parameters that may be needed for the rendering purpose. For example: for AddAttribute instruction, we may need to provide the attribute name and value as a payload, so the Host can use this information to add the attribute to the node.
58
+ */
59
+ payload: T;
60
+ } & A_TYPES__Entity_Serialized;
61
+
62
+ declare class AreInstruction<T extends Record<string, any> = Record<string, any>, S extends AreInstructionSerialized<T> = AreInstructionSerialized<T>> extends A_Entity<AreInstructionNewProps<T>, S> implements AreStoreWatchingEntity {
63
+ /**
64
+ * The name of the instruction, for example "CreateElement", "AddAttribute", "RemoveNode", etc. This is used to identify the type of the instruction and how to process it. The name should be in PascalCase format, and should be unique across all instruction types. It is recommended to use a prefix that indicates the category of the instruction, for example "CreateElement" for instructions that create new elements, "UpdateAttribute" for instructions that update attributes, etc.
65
+ */
66
+ protected _name: string;
67
+ /**
68
+ * The payload of the instruction, which can contain any additional information 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. The payload is optional and can be an empty object if no additional information is needed.
69
+ */
70
+ protected _payload?: T;
71
+ /**
72
+ * Group is an optional property that can be used to group instructions together. For example a set of instructions that depend on create CreateElement instruction can be grouped together with the same group name, so if the CreateElement instruction is reverted, all the instructions in the same group will be reverted as well, and so on. This can be useful to manage complex changes that involve multiple instructions.
73
+ *
74
+ * [!] Note, the best option is to use ASEID of the Instruction as a group, so all instructions with the same ASEID will be treated as a single change, and will be applied and reverted together.
75
+ */
76
+ protected _group: string | undefined;
77
+ /**
78
+ * The parent instruction that created this instruction. For example, if we have a CreateElement instruction that creates a new element, and then we have an AddAttribute instruction that adds an attribute to that element, the AddAttribute instruction would have the CreateElement instruction as its parent. This can be used to track the hierarchy of instructions and their dependencies.
79
+ */
80
+ protected _parent: string | undefined;
81
+ /**
82
+ * A set of properties that influence the behavior of the instruction, for example, for AddTextInstruction, we can interpolation dependent on some key in the store, so we can have a property called "interpolationKey" that will be used to track the dependencies of the instruction, and when the value of this key changes in the scope, we can update the instruction accordingly.
83
+ */
84
+ protected _props: Set<string>;
85
+ /**
86
+ * The name of the instruction, for example "CreateElement", "AddAttribute", "RemoveNode", etc. This is used to identify the type of the instruction and how to process it. The name should be in PascalCase format, and should be unique across all instruction types. It is recommended to use a prefix that indicates the category of the instruction, for example "CreateElement" for instructions that create new elements, "UpdateAttribute" for instructions that update attributes, etc.
87
+ */
88
+ get name(): string;
89
+ /**
90
+ * The payload of the instruction, which can contain any additional information 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. The payload is optional and can be an empty object if no additional information is needed.
91
+ *
92
+ * [!] Note, the payload should be serializable, so it can be stored and transmitted easily. It is recommended to use simple data structures for the payload, such as objects, arrays, strings, numbers, etc., and avoid using complex data types that may not be easily serializable.
93
+ */
94
+ get payload(): T;
95
+ /**
96
+ * Group is an optional property that can be used to group instructions together. For example a set of instructions that depend on create CreateElement instruction can be grouped together with the same group name, so if the CreateElement instruction is reverted, all the instructions in the same group will be reverted as well, and so on. This can be useful to manage complex changes that involve multiple instructions.
97
+ *
98
+ * [!] Note, the best option is to use ASEID of the Instruction as a group, so all instructions with the same ASEID will be treated as a single change, and will be applied and reverted together.
99
+ */
100
+ get group(): string | undefined;
101
+ /**
102
+ * The parent instruction ASEID that created this instruction. For example, if we have a CreateElement instruction that creates a new element, and then we have an AddAttribute instruction that adds an attribute to that element, the AddAttribute instruction would have the CreateElement instruction as its parent. This can be used to track the hierarchy of instructions and their dependencies.
103
+ *
104
+ * [!] Note, the parent should be provided as an ASEID string, so it can be easily referenced and tracked across different contexts and times.
105
+ */
106
+ get parent(): string | undefined;
107
+ get id(): string;
108
+ get owner(): AreNode;
109
+ fromNew(newEntity: AreInstructionNewProps<T>): void;
110
+ fromUndefined(): void;
111
+ /**
112
+ * Group this instruction with another instruction. This means that when one of the instructions in the group is applied or reverted, all the instructions in the same group will be applied or reverted together. This can be useful to manage complex changes that involve multiple instructions.
113
+ *
114
+ * For example, if we have a CreateElement instruction that creates a new element, and then we have an AddAttribute instruction that adds an attribute to that element, we can group them together with the same group name, so if we revert the CreateElement instruction, the AddAttribute instruction will be reverted as well, and so on.
115
+ *
116
+ * @param instruction
117
+ * @returns
118
+ */
119
+ groupWith(instruction: AreInstruction): this;
120
+ /**
121
+ * Ungroup this instruction from any group. This means that this instruction will be treated as an independent instruction, and will not be applied or reverted together with any other instructions. This can be useful when you want to separate an instruction from a group, so it can be applied or reverted independently.
122
+ *
123
+ * @returns
124
+ */
125
+ unGroup(): this;
126
+ /**
127
+ * Attach this instruction to a parent instruction. This means that this instruction will be considered as a child of the parent instruction, and can be used to track the hierarchy of instructions and their dependencies.
128
+ *
129
+ * For example, if we have a CreateElement instruction that creates a new element, and then we have an AddAttribute instruction that adds an attribute to that element, we can attach the AddAttribute instruction to the CreateElement instruction as its parent, so we can track that the AddAttribute instruction is related to the CreateElement instruction.
130
+ *
131
+ * @param parent
132
+ * @returns
133
+ */
134
+ attachTo(parent: AreInstruction): this;
135
+ /**
136
+ * Detach this instruction from its parent instruction. This means that this instruction will no longer be considered as a child of the parent instruction, and will not be related to it in any way. This can be useful when you want to separate an instruction from its parent, so it can be treated as an independent instruction.
137
+ *
138
+ * @returns
139
+ */
140
+ detach(): this;
141
+ /**
142
+ * Apply this instruction to the scene. This means that the changes represented by this instruction will be applied to the scene, and the Host will perform the necessary operations to reflect these changes in the rendered output.
143
+ *
144
+ * For example, if this instruction is a CreateElement instruction, when we apply it, the Host will create a new element in the scene according to the information provided in the payload of the instruction. If this instruction is an AddAttribute instruction, when we apply it, the Host will add the specified attribute to the target element in the scene. The apply method can also accept an optional scope parameter, which can be used to provide additional context or information that may be needed for applying the instruction.
145
+ *
146
+ * @param scope
147
+ */
148
+ apply(scope?: A_Scope): void;
149
+ /**
150
+ * Update this instruction in the scene. This means that the changes represented by this instruction will be updated in the scene, and the Host will perform the necessary operations to reflect these changes in the rendered output. This is particularly useful for instructions that have dynamic properties or effects that may change over time, allowing for adjustments to be made to the instruction's behavior or effects without needing to revert and reapply it entirely. The update method can also accept an optional scope parameter, which can be used to provide additional context or information that may be needed for updating the instruction.
151
+ *
152
+ * @param scope
153
+ */
154
+ update(scope?: A_Scope): void;
155
+ /**
156
+ * Revert this instruction from the scene. This means that the changes represented by this instruction will be reverted from the scene, and the Host will perform the necessary operations to undo these changes in the rendered output.
157
+ *
158
+ * @param scope
159
+ */
160
+ revert(scope?: A_Scope): void;
161
+ }
162
+
163
+ export { AreInstruction as A, type AreInstructionNewProps as a, type AreInstructionSerialized as b };
@@ -0,0 +1,163 @@
1
+ import { A_TYPES__Entity_Serialized, A_Entity, A_Scope } from '@adaas/a-concept';
2
+ import { AreNode } from '@adaas/are/node/AreNode.entity';
3
+ import { AreStoreWatchingEntity } from '@adaas/are/store/AreStore.types';
4
+
5
+ type AreInstructionNewProps<T extends any = Record<string, any>> = {
6
+ /**
7
+ * The deduplication ID that prevents duplicated instruction within the same node.
8
+ *
9
+ * For example to prevent duplicated AddAttribute instruction for the same attribute, we can use the attribute name as the deduplication ID, so if we have two AddAttribute instructions with the same attribute name, only the first one will be applied, and the second one will be ignored.
10
+ *
11
+ *
12
+ * [!] Note; By default it uses action name and group if provided
13
+ */
14
+ /**
15
+ * the Host operation to be performed. Exactly this name will be used to call a method from the Host class.
16
+ */
17
+ name: string;
18
+ /**
19
+ * The parent instruction that created this instruction. For example, if we have a CreateElement instruction that creates a new element, and then we have an AddAttribute instruction that adds an attribute to that element, the AddAttribute instruction would have the CreateElement instruction as its parent. This can be used to track the hierarchy of instructions and their dependencies.
20
+ */
21
+ parent?: AreInstruction | undefined;
22
+ /**
23
+ * Group is an optional property that can be used to group instructions together.
24
+ *
25
+ * For example a set of instructions that depend on create CreateElement instruction can be grouped together with the same group name, so if the CreateElement instruction is reverted, all the instructions in the same group will be reverted as well, and so on.
26
+ *
27
+ * This can be useful to manage complex changes that involve multiple instructions.
28
+ *
29
+ * [!] Note, the best option is to use ASEID of the Instruction as a group, so all instructions with the same ASEID will be treated as a single change, and will be applied and reverted together.
30
+ */
31
+ group?: AreInstruction | undefined;
32
+ /**
33
+ * A set of additional parameters that may be needed for the rendering purpose.
34
+ *
35
+ * For example: for AddAttribute instruction, we may need to provide the attribute name and value as a payload, so the Host can use this information to add the attribute to the node.
36
+ */
37
+ payload?: T;
38
+ };
39
+ type AreInstructionSerialized<T extends any = Record<string, any>> = {
40
+ /**
41
+ * The name of the instruction, which corresponds to the operation that should be performed in the Host. This name is used to identify the specific method in the Host that should be called to execute the instruction, allowing for a clear mapping between instructions and their corresponding actions in the rendering process.
42
+ */
43
+ name: string;
44
+ /**
45
+ * The type of the instruction, which can be used to categorize instructions and determine how they should be processed. For example, we can have different types for declaration instructions (e.g., DeclarationInstruction or CreateElement) and mutation instructions (e.g., AddAttribute), allowing for better organization and management of instructions based on their purpose and behavior in the scene.
46
+ */
47
+ type: string;
48
+ /**
49
+ * The parent instruction that created this instruction. For example, if we have a CreateElement instruction that creates a new element, and then we have an AddAttribute instruction that adds an attribute to that element, the AddAttribute instruction would have the CreateElement instruction as its parent. This can be used to track the hierarchy of instructions and their dependencies.
50
+ */
51
+ parent?: string | undefined;
52
+ /**
53
+ * Group is an optional property that can be used to group instructions together. For example a set of instructions that depend on create CreateElement instruction can be grouped together with the same group name, so if the CreateElement instruction is reverted, all the instructions in the same group will be reverted as well, and so on. This can be useful to manage complex changes that involve multiple instructions. The best option is to use ASEID of the Instruction as a group, so all instructions with the same ASEID will be treated as a single change, and will be applied and reverted together.
54
+ */
55
+ group?: string | undefined;
56
+ /**
57
+ * A set of additional parameters that may be needed for the rendering purpose. For example: for AddAttribute instruction, we may need to provide the attribute name and value as a payload, so the Host can use this information to add the attribute to the node.
58
+ */
59
+ payload: T;
60
+ } & A_TYPES__Entity_Serialized;
61
+
62
+ declare class AreInstruction<T extends Record<string, any> = Record<string, any>, S extends AreInstructionSerialized<T> = AreInstructionSerialized<T>> extends A_Entity<AreInstructionNewProps<T>, S> implements AreStoreWatchingEntity {
63
+ /**
64
+ * The name of the instruction, for example "CreateElement", "AddAttribute", "RemoveNode", etc. This is used to identify the type of the instruction and how to process it. The name should be in PascalCase format, and should be unique across all instruction types. It is recommended to use a prefix that indicates the category of the instruction, for example "CreateElement" for instructions that create new elements, "UpdateAttribute" for instructions that update attributes, etc.
65
+ */
66
+ protected _name: string;
67
+ /**
68
+ * The payload of the instruction, which can contain any additional information 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. The payload is optional and can be an empty object if no additional information is needed.
69
+ */
70
+ protected _payload?: T;
71
+ /**
72
+ * Group is an optional property that can be used to group instructions together. For example a set of instructions that depend on create CreateElement instruction can be grouped together with the same group name, so if the CreateElement instruction is reverted, all the instructions in the same group will be reverted as well, and so on. This can be useful to manage complex changes that involve multiple instructions.
73
+ *
74
+ * [!] Note, the best option is to use ASEID of the Instruction as a group, so all instructions with the same ASEID will be treated as a single change, and will be applied and reverted together.
75
+ */
76
+ protected _group: string | undefined;
77
+ /**
78
+ * The parent instruction that created this instruction. For example, if we have a CreateElement instruction that creates a new element, and then we have an AddAttribute instruction that adds an attribute to that element, the AddAttribute instruction would have the CreateElement instruction as its parent. This can be used to track the hierarchy of instructions and their dependencies.
79
+ */
80
+ protected _parent: string | undefined;
81
+ /**
82
+ * A set of properties that influence the behavior of the instruction, for example, for AddTextInstruction, we can interpolation dependent on some key in the store, so we can have a property called "interpolationKey" that will be used to track the dependencies of the instruction, and when the value of this key changes in the scope, we can update the instruction accordingly.
83
+ */
84
+ protected _props: Set<string>;
85
+ /**
86
+ * The name of the instruction, for example "CreateElement", "AddAttribute", "RemoveNode", etc. This is used to identify the type of the instruction and how to process it. The name should be in PascalCase format, and should be unique across all instruction types. It is recommended to use a prefix that indicates the category of the instruction, for example "CreateElement" for instructions that create new elements, "UpdateAttribute" for instructions that update attributes, etc.
87
+ */
88
+ get name(): string;
89
+ /**
90
+ * The payload of the instruction, which can contain any additional information 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. The payload is optional and can be an empty object if no additional information is needed.
91
+ *
92
+ * [!] Note, the payload should be serializable, so it can be stored and transmitted easily. It is recommended to use simple data structures for the payload, such as objects, arrays, strings, numbers, etc., and avoid using complex data types that may not be easily serializable.
93
+ */
94
+ get payload(): T;
95
+ /**
96
+ * Group is an optional property that can be used to group instructions together. For example a set of instructions that depend on create CreateElement instruction can be grouped together with the same group name, so if the CreateElement instruction is reverted, all the instructions in the same group will be reverted as well, and so on. This can be useful to manage complex changes that involve multiple instructions.
97
+ *
98
+ * [!] Note, the best option is to use ASEID of the Instruction as a group, so all instructions with the same ASEID will be treated as a single change, and will be applied and reverted together.
99
+ */
100
+ get group(): string | undefined;
101
+ /**
102
+ * The parent instruction ASEID that created this instruction. For example, if we have a CreateElement instruction that creates a new element, and then we have an AddAttribute instruction that adds an attribute to that element, the AddAttribute instruction would have the CreateElement instruction as its parent. This can be used to track the hierarchy of instructions and their dependencies.
103
+ *
104
+ * [!] Note, the parent should be provided as an ASEID string, so it can be easily referenced and tracked across different contexts and times.
105
+ */
106
+ get parent(): string | undefined;
107
+ get id(): string;
108
+ get owner(): AreNode;
109
+ fromNew(newEntity: AreInstructionNewProps<T>): void;
110
+ fromUndefined(): void;
111
+ /**
112
+ * Group this instruction with another instruction. This means that when one of the instructions in the group is applied or reverted, all the instructions in the same group will be applied or reverted together. This can be useful to manage complex changes that involve multiple instructions.
113
+ *
114
+ * For example, if we have a CreateElement instruction that creates a new element, and then we have an AddAttribute instruction that adds an attribute to that element, we can group them together with the same group name, so if we revert the CreateElement instruction, the AddAttribute instruction will be reverted as well, and so on.
115
+ *
116
+ * @param instruction
117
+ * @returns
118
+ */
119
+ groupWith(instruction: AreInstruction): this;
120
+ /**
121
+ * Ungroup this instruction from any group. This means that this instruction will be treated as an independent instruction, and will not be applied or reverted together with any other instructions. This can be useful when you want to separate an instruction from a group, so it can be applied or reverted independently.
122
+ *
123
+ * @returns
124
+ */
125
+ unGroup(): this;
126
+ /**
127
+ * Attach this instruction to a parent instruction. This means that this instruction will be considered as a child of the parent instruction, and can be used to track the hierarchy of instructions and their dependencies.
128
+ *
129
+ * For example, if we have a CreateElement instruction that creates a new element, and then we have an AddAttribute instruction that adds an attribute to that element, we can attach the AddAttribute instruction to the CreateElement instruction as its parent, so we can track that the AddAttribute instruction is related to the CreateElement instruction.
130
+ *
131
+ * @param parent
132
+ * @returns
133
+ */
134
+ attachTo(parent: AreInstruction): this;
135
+ /**
136
+ * Detach this instruction from its parent instruction. This means that this instruction will no longer be considered as a child of the parent instruction, and will not be related to it in any way. This can be useful when you want to separate an instruction from its parent, so it can be treated as an independent instruction.
137
+ *
138
+ * @returns
139
+ */
140
+ detach(): this;
141
+ /**
142
+ * Apply this instruction to the scene. This means that the changes represented by this instruction will be applied to the scene, and the Host will perform the necessary operations to reflect these changes in the rendered output.
143
+ *
144
+ * For example, if this instruction is a CreateElement instruction, when we apply it, the Host will create a new element in the scene according to the information provided in the payload of the instruction. If this instruction is an AddAttribute instruction, when we apply it, the Host will add the specified attribute to the target element in the scene. The apply method can also accept an optional scope parameter, which can be used to provide additional context or information that may be needed for applying the instruction.
145
+ *
146
+ * @param scope
147
+ */
148
+ apply(scope?: A_Scope): void;
149
+ /**
150
+ * Update this instruction in the scene. This means that the changes represented by this instruction will be updated in the scene, and the Host will perform the necessary operations to reflect these changes in the rendered output. This is particularly useful for instructions that have dynamic properties or effects that may change over time, allowing for adjustments to be made to the instruction's behavior or effects without needing to revert and reapply it entirely. The update method can also accept an optional scope parameter, which can be used to provide additional context or information that may be needed for updating the instruction.
151
+ *
152
+ * @param scope
153
+ */
154
+ update(scope?: A_Scope): void;
155
+ /**
156
+ * Revert this instruction from the scene. This means that the changes represented by this instruction will be reverted from the scene, and the Host will perform the necessary operations to undo these changes in the rendered output.
157
+ *
158
+ * @param scope
159
+ */
160
+ revert(scope?: A_Scope): void;
161
+ }
162
+
163
+ export { AreInstruction as A, type AreInstructionNewProps as a, type AreInstructionSerialized as b };
@@ -1,11 +1,15 @@
1
1
  export { Are } from './lib/AreComponent/Are.component.mjs';
2
2
  export { AreFeatures } from './lib/AreComponent/Are.constants.mjs';
3
- export { A as AreAttribute, a as AreContext, b as AreDeclaration, c as AreInstruction, d as AreInstructionNewProps, e as AreInstructionSerialized, f as AreMutation, g as AreNode, h as AreNodeFeatureNames, i as AreNodeNewProps, j as AreNodeStatusNames, k as AreScene, l as AreSceneChanges, m as AreSceneStatusNames, n as AreScene_Serialized, o as AreStore, p as AreSyntaxCompiledExpression, q as AreSyntaxInitOptions, r as AreSyntaxTokenMatch, s as AreSyntaxTokenPayload, t as AreSyntaxTokenRules } from './Are.context-D7w32H1G.mjs';
3
+ export { AreContext } from './lib/AreComponent/Are.context.mjs';
4
4
  export { AreContextInit, AreFeatureNames, ArePropDefinition } from './lib/AreComponent/Are.types.mjs';
5
+ export { AreNode } from './lib/AreNode/AreNode.entity.mjs';
5
6
  export { AreNodeFeatures, AreNodeStatuses } from './lib/AreNode/AreNode.constants.mjs';
7
+ export { AreNodeFeatureNames, AreNodeNewProps, AreNodeStatusNames } from './lib/AreNode/AreNode.types.mjs';
8
+ export { AreAttribute } from './lib/AreAttribute/AreAttribute.entity.mjs';
6
9
  export { AreAttributeFeatures } from './lib/AreAttribute/AreAttribute.constants.mjs';
7
10
  export { AreAttributeFeatureNames, AreAttribute_Init, AreAttribute_Serialized } from './lib/AreAttribute/AreAttribute.types.mjs';
8
11
  export { AreSyntax } from './lib/AreSyntax/AreSyntax.context.mjs';
12
+ export { AreSyntaxCompiledExpression, AreSyntaxInitOptions, AreSyntaxTokenMatch, AreSyntaxTokenPayload, AreSyntaxTokenRules } from './lib/AreSyntax/AreSyntax.types.mjs';
9
13
  export { AreSyntaxError } from './lib/AreSyntax/AreSyntax.error.mjs';
10
14
  export { AreTokenizer } from './lib/AreTokenizer/AreTokenizer.component.mjs';
11
15
  export { AreTokenizerError } from './lib/AreTokenizer/AreTokenizer.error.mjs';
@@ -14,14 +18,20 @@ export { AreCompilerError } from './lib/AreCompiler/AreCompiler.error.mjs';
14
18
  export { AreTransformer } from './lib/AreTransformer/AreTransformer.component.mjs';
15
19
  export { AreInterpreter } from './lib/AreInterpreter/AreInterpreter.component.mjs';
16
20
  export { AreInterpreterError } from './lib/AreInterpreter/AreInterpreter.error.mjs';
21
+ export { AreStore } from './lib/AreStore/AreStore.context.mjs';
17
22
  export { AreStoreAreComponentMetaKeys } from './lib/AreStore/AreStore.constants.mjs';
18
23
  export { AreStoreAreComponentMetaKeyNames, AreStorePathValue, AreStoreWatchingEntity } from './lib/AreStore/AreStore.types.mjs';
19
24
  export { AreEvent } from './lib/AreEvent/AreEvent.context.mjs';
20
25
  export { AreEventProps } from './lib/AreEvent/AreEvent.types.mjs';
26
+ export { AreScene } from './lib/AreScene/AreScene.context.mjs';
21
27
  export { AreSceneStatuses } from './lib/AreScene/AreScene.constants.mjs';
28
+ export { AreSceneChanges, AreSceneStatusNames, AreScene_Serialized } from './lib/AreScene/AreScene.types.mjs';
22
29
  export { AreSceneError } from './lib/AreScene/AreScene.error.mjs';
30
+ export { A as AreInstruction, a as AreInstructionNewProps, b as AreInstructionSerialized } from './AreInstruction.entity-Ceyy0tbf.mjs';
23
31
  export { AreInstructionDefaultNames, AreInstructionFeatures } from './lib/AreInstruction/AreInstruction.constants.mjs';
24
32
  export { AreInstructionError } from './lib/AreInstruction/AreInstruction.error.mjs';
33
+ export { AreDeclaration } from './lib/AreInstruction/types/AreDeclaration.instruction.mjs';
34
+ export { AreMutation } from './lib/AreInstruction/types/AreMutation.instruction.mjs';
25
35
  export { AreLifecycle } from './lib/AreLifecycle/AreLifecycle.component.mjs';
26
36
  export { AreLifecycleError } from './lib/AreLifecycle/AreLifecycle.error.mjs';
27
37
  export { AreLoader } from './lib/AreLoader/AreLoader.component.mjs';
@@ -33,9 +43,35 @@ export { AreSignalsContext } from './lib/AreSignals/AreSignals.context.mjs';
33
43
  export { AreSignalsContextConfig } from './lib/AreSignals/AreSignals.types.mjs';
34
44
  export { AreInit } from './lib/AreSignals/entities/AreInit.signal.mjs';
35
45
  export { AreRoute } from './lib/AreSignals/entities/AreRoute.signal.mjs';
46
+ export { AreEngine } from './lib/AreEngine/AreEngine.component.mjs';
47
+ export { AreEngineFeatures } from './lib/AreEngine/AreEngine.constants.mjs';
48
+ export { AreEngineDependencies } from './lib/AreEngine/AreEngine.types.mjs';
49
+ export { AreEngineError } from './lib/AreEngine/AreEngine.error.mjs';
36
50
  import '@adaas/a-concept';
37
51
  import '@adaas/a-utils/a-signal';
52
+ import '@adaas/are/node/AreNode.entity';
38
53
  import '@adaas/a-utils/a-execution';
54
+ import '@adaas/are/event/AreEvent.context';
55
+ import '@adaas/are/scene/AreScene.context';
56
+ import '@adaas/are/attribute/AreAttribute.entity';
57
+ import '@adaas/are/component/Are.component';
58
+ import '@adaas/are/syntax/AreSyntax.types';
59
+ import '@adaas/are/store/AreStore.context';
60
+ import '@adaas/are/syntax/AreSyntax.context';
61
+ import '@adaas/are/component/Are.context';
39
62
  import '@adaas/a-utils/a-logger';
63
+ import '@adaas/are/instruction/AreInstruction.entity';
64
+ import '@adaas/are/instruction/types/AreDeclaration.instruction';
65
+ import '@adaas/are/instruction/types/AreMutation.instruction';
66
+ import '@adaas/are/instruction/AreInstruction.types';
67
+ import '@adaas/are/store/AreStore.types';
40
68
  import './lib/AreSignals/AreSignals.meta.mjs';
69
+ import '@adaas/are/signals/AreSignal.entity';
41
70
  import '@adaas/a-utils/a-route';
71
+ import '@adaas/are/compiler/AreCompiler.component';
72
+ import '@adaas/are/transformer/AreTransformer.component';
73
+ import '@adaas/are/loader/AreLoader.component';
74
+ import '@adaas/are/interpreter/AreInterpreter.component';
75
+ import '@adaas/are/lifecycle/AreLifecycle.component';
76
+ import '@adaas/are/tokenizer/AreTokenizer.component';
77
+ import '@adaas/are/signals/AreSignals.component';
@@ -1,11 +1,15 @@
1
1
  export { Are } from './lib/AreComponent/Are.component.js';
2
2
  export { AreFeatures } from './lib/AreComponent/Are.constants.js';
3
- export { A as AreAttribute, a as AreContext, b as AreDeclaration, c as AreInstruction, d as AreInstructionNewProps, e as AreInstructionSerialized, f as AreMutation, g as AreNode, h as AreNodeFeatureNames, i as AreNodeNewProps, j as AreNodeStatusNames, k as AreScene, l as AreSceneChanges, m as AreSceneStatusNames, n as AreScene_Serialized, o as AreStore, p as AreSyntaxCompiledExpression, q as AreSyntaxInitOptions, r as AreSyntaxTokenMatch, s as AreSyntaxTokenPayload, t as AreSyntaxTokenRules } from './Are.context-9Ija_fdC.js';
3
+ export { AreContext } from './lib/AreComponent/Are.context.js';
4
4
  export { AreContextInit, AreFeatureNames, ArePropDefinition } from './lib/AreComponent/Are.types.js';
5
+ export { AreNode } from './lib/AreNode/AreNode.entity.js';
5
6
  export { AreNodeFeatures, AreNodeStatuses } from './lib/AreNode/AreNode.constants.js';
7
+ export { AreNodeFeatureNames, AreNodeNewProps, AreNodeStatusNames } from './lib/AreNode/AreNode.types.js';
8
+ export { AreAttribute } from './lib/AreAttribute/AreAttribute.entity.js';
6
9
  export { AreAttributeFeatures } from './lib/AreAttribute/AreAttribute.constants.js';
7
10
  export { AreAttributeFeatureNames, AreAttribute_Init, AreAttribute_Serialized } from './lib/AreAttribute/AreAttribute.types.js';
8
11
  export { AreSyntax } from './lib/AreSyntax/AreSyntax.context.js';
12
+ export { AreSyntaxCompiledExpression, AreSyntaxInitOptions, AreSyntaxTokenMatch, AreSyntaxTokenPayload, AreSyntaxTokenRules } from './lib/AreSyntax/AreSyntax.types.js';
9
13
  export { AreSyntaxError } from './lib/AreSyntax/AreSyntax.error.js';
10
14
  export { AreTokenizer } from './lib/AreTokenizer/AreTokenizer.component.js';
11
15
  export { AreTokenizerError } from './lib/AreTokenizer/AreTokenizer.error.js';
@@ -14,14 +18,20 @@ export { AreCompilerError } from './lib/AreCompiler/AreCompiler.error.js';
14
18
  export { AreTransformer } from './lib/AreTransformer/AreTransformer.component.js';
15
19
  export { AreInterpreter } from './lib/AreInterpreter/AreInterpreter.component.js';
16
20
  export { AreInterpreterError } from './lib/AreInterpreter/AreInterpreter.error.js';
21
+ export { AreStore } from './lib/AreStore/AreStore.context.js';
17
22
  export { AreStoreAreComponentMetaKeys } from './lib/AreStore/AreStore.constants.js';
18
23
  export { AreStoreAreComponentMetaKeyNames, AreStorePathValue, AreStoreWatchingEntity } from './lib/AreStore/AreStore.types.js';
19
24
  export { AreEvent } from './lib/AreEvent/AreEvent.context.js';
20
25
  export { AreEventProps } from './lib/AreEvent/AreEvent.types.js';
26
+ export { AreScene } from './lib/AreScene/AreScene.context.js';
21
27
  export { AreSceneStatuses } from './lib/AreScene/AreScene.constants.js';
28
+ export { AreSceneChanges, AreSceneStatusNames, AreScene_Serialized } from './lib/AreScene/AreScene.types.js';
22
29
  export { AreSceneError } from './lib/AreScene/AreScene.error.js';
30
+ export { A as AreInstruction, a as AreInstructionNewProps, b as AreInstructionSerialized } from './AreInstruction.entity-Ceyy0tbf.js';
23
31
  export { AreInstructionDefaultNames, AreInstructionFeatures } from './lib/AreInstruction/AreInstruction.constants.js';
24
32
  export { AreInstructionError } from './lib/AreInstruction/AreInstruction.error.js';
33
+ export { AreDeclaration } from './lib/AreInstruction/types/AreDeclaration.instruction.js';
34
+ export { AreMutation } from './lib/AreInstruction/types/AreMutation.instruction.js';
25
35
  export { AreLifecycle } from './lib/AreLifecycle/AreLifecycle.component.js';
26
36
  export { AreLifecycleError } from './lib/AreLifecycle/AreLifecycle.error.js';
27
37
  export { AreLoader } from './lib/AreLoader/AreLoader.component.js';
@@ -33,9 +43,35 @@ export { AreSignalsContext } from './lib/AreSignals/AreSignals.context.js';
33
43
  export { AreSignalsContextConfig } from './lib/AreSignals/AreSignals.types.js';
34
44
  export { AreInit } from './lib/AreSignals/entities/AreInit.signal.js';
35
45
  export { AreRoute } from './lib/AreSignals/entities/AreRoute.signal.js';
46
+ export { AreEngine } from './lib/AreEngine/AreEngine.component.js';
47
+ export { AreEngineFeatures } from './lib/AreEngine/AreEngine.constants.js';
48
+ export { AreEngineDependencies } from './lib/AreEngine/AreEngine.types.js';
49
+ export { AreEngineError } from './lib/AreEngine/AreEngine.error.js';
36
50
  import '@adaas/a-concept';
37
51
  import '@adaas/a-utils/a-signal';
52
+ import '@adaas/are/node/AreNode.entity';
38
53
  import '@adaas/a-utils/a-execution';
54
+ import '@adaas/are/event/AreEvent.context';
55
+ import '@adaas/are/scene/AreScene.context';
56
+ import '@adaas/are/attribute/AreAttribute.entity';
57
+ import '@adaas/are/component/Are.component';
58
+ import '@adaas/are/syntax/AreSyntax.types';
59
+ import '@adaas/are/store/AreStore.context';
60
+ import '@adaas/are/syntax/AreSyntax.context';
61
+ import '@adaas/are/component/Are.context';
39
62
  import '@adaas/a-utils/a-logger';
63
+ import '@adaas/are/instruction/AreInstruction.entity';
64
+ import '@adaas/are/instruction/types/AreDeclaration.instruction';
65
+ import '@adaas/are/instruction/types/AreMutation.instruction';
66
+ import '@adaas/are/instruction/AreInstruction.types';
67
+ import '@adaas/are/store/AreStore.types';
40
68
  import './lib/AreSignals/AreSignals.meta.js';
69
+ import '@adaas/are/signals/AreSignal.entity';
41
70
  import '@adaas/a-utils/a-route';
71
+ import '@adaas/are/compiler/AreCompiler.component';
72
+ import '@adaas/are/transformer/AreTransformer.component';
73
+ import '@adaas/are/loader/AreLoader.component';
74
+ import '@adaas/are/interpreter/AreInterpreter.component';
75
+ import '@adaas/are/lifecycle/AreLifecycle.component';
76
+ import '@adaas/are/tokenizer/AreTokenizer.component';
77
+ import '@adaas/are/signals/AreSignals.component';
@@ -61,6 +61,10 @@ var AreSignals_context = require('./lib/AreSignals/AreSignals.context');
61
61
  var AreSignals_types = require('./lib/AreSignals/AreSignals.types');
62
62
  var AreInit_signal = require('./lib/AreSignals/entities/AreInit.signal');
63
63
  var AreRoute_signal = require('./lib/AreSignals/entities/AreRoute.signal');
64
+ var AreEngine_component = require('./lib/AreEngine/AreEngine.component');
65
+ var AreEngine_constants = require('./lib/AreEngine/AreEngine.constants');
66
+ var AreEngine_types = require('./lib/AreEngine/AreEngine.types');
67
+ var AreEngine_error = require('./lib/AreEngine/AreEngine.error');
64
68
 
65
69
 
66
70
 
@@ -430,5 +434,29 @@ Object.keys(AreRoute_signal).forEach(function (k) {
430
434
  get: function () { return AreRoute_signal[k]; }
431
435
  });
432
436
  });
437
+ Object.keys(AreEngine_component).forEach(function (k) {
438
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
439
+ enumerable: true,
440
+ get: function () { return AreEngine_component[k]; }
441
+ });
442
+ });
443
+ Object.keys(AreEngine_constants).forEach(function (k) {
444
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
445
+ enumerable: true,
446
+ get: function () { return AreEngine_constants[k]; }
447
+ });
448
+ });
449
+ Object.keys(AreEngine_types).forEach(function (k) {
450
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
451
+ enumerable: true,
452
+ get: function () { return AreEngine_types[k]; }
453
+ });
454
+ });
455
+ Object.keys(AreEngine_error).forEach(function (k) {
456
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
457
+ enumerable: true,
458
+ get: function () { return AreEngine_error[k]; }
459
+ });
460
+ });
433
461
  //# sourceMappingURL=index.js.map
434
462
  //# sourceMappingURL=index.js.map
@@ -59,5 +59,9 @@ export * from './lib/AreSignals/AreSignals.context';
59
59
  export * from './lib/AreSignals/AreSignals.types';
60
60
  export * from './lib/AreSignals/entities/AreInit.signal';
61
61
  export * from './lib/AreSignals/entities/AreRoute.signal';
62
+ export * from './lib/AreEngine/AreEngine.component';
63
+ export * from './lib/AreEngine/AreEngine.constants';
64
+ export * from './lib/AreEngine/AreEngine.types';
65
+ export * from './lib/AreEngine/AreEngine.error';
62
66
  //# sourceMappingURL=index.mjs.map
63
67
  //# sourceMappingURL=index.mjs.map