@adaas/are 0.0.2 → 0.0.4
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/.conf/tsconfig.base.json +25 -32
- package/.conf/tsconfig.browser.json +24 -32
- package/.conf/tsconfig.node.json +24 -33
- package/CHANGELOG.md +39 -0
- package/LICENSE +10 -19
- package/README.md +216 -2
- package/dist/browser/index.d.mts +1375 -727
- package/dist/browser/index.mjs +2812 -2170
- package/dist/browser/index.mjs.map +1 -1
- package/dist/node/Are.context-9Ija_fdC.d.ts +846 -0
- package/dist/node/Are.context-D7w32H1G.d.mts +846 -0
- package/dist/node/index.d.mts +32 -31
- package/dist/node/index.d.ts +32 -31
- package/dist/node/index.js +371 -42
- package/dist/node/index.mjs +61 -14
- package/dist/node/lib/AreAttribute/AreAttribute.constants.d.mts +24 -0
- package/dist/node/lib/AreAttribute/AreAttribute.constants.d.ts +24 -0
- package/dist/node/lib/AreAttribute/AreAttribute.constants.js +28 -0
- package/dist/node/lib/AreAttribute/AreAttribute.constants.js.map +1 -0
- package/dist/node/lib/AreAttribute/AreAttribute.constants.mjs +28 -0
- package/dist/node/lib/AreAttribute/AreAttribute.constants.mjs.map +1 -0
- package/dist/node/lib/AreAttribute/AreAttribute.entity.d.mts +14 -0
- package/dist/node/lib/AreAttribute/AreAttribute.entity.d.ts +14 -0
- package/dist/node/lib/AreAttribute/AreAttribute.entity.js +113 -0
- package/dist/node/lib/AreAttribute/AreAttribute.entity.js.map +1 -0
- package/dist/node/lib/AreAttribute/AreAttribute.entity.mjs +104 -0
- package/dist/node/lib/AreAttribute/AreAttribute.entity.mjs.map +1 -0
- package/dist/node/lib/AreAttribute/AreAttribute.types.d.mts +47 -0
- package/dist/node/lib/AreAttribute/AreAttribute.types.d.ts +47 -0
- package/dist/node/lib/AreAttribute/AreAttribute.types.js +4 -0
- package/dist/node/lib/AreAttribute/AreAttribute.types.js.map +1 -0
- package/dist/node/lib/AreAttribute/AreAttribute.types.mjs +3 -0
- package/dist/node/lib/AreAttribute/AreAttribute.types.mjs.map +1 -0
- package/dist/node/lib/AreCompiler/AreCompiler.component.d.mts +19 -224
- package/dist/node/lib/AreCompiler/AreCompiler.component.d.ts +19 -224
- package/dist/node/lib/AreCompiler/AreCompiler.component.js +31 -607
- package/dist/node/lib/AreCompiler/AreCompiler.component.js.map +1 -1
- package/dist/node/lib/AreCompiler/AreCompiler.component.mjs +29 -605
- package/dist/node/lib/AreCompiler/AreCompiler.component.mjs.map +1 -1
- package/dist/node/lib/AreComponent/Are.component.d.mts +59 -7
- package/dist/node/lib/AreComponent/Are.component.d.ts +59 -7
- package/dist/node/lib/AreComponent/Are.component.js +84 -25
- package/dist/node/lib/AreComponent/Are.component.js.map +1 -1
- package/dist/node/lib/AreComponent/Are.component.mjs +85 -26
- package/dist/node/lib/AreComponent/Are.component.mjs.map +1 -1
- package/dist/node/lib/AreComponent/Are.constants.d.mts +46 -30
- package/dist/node/lib/AreComponent/Are.constants.d.ts +46 -30
- package/dist/node/lib/AreComponent/Are.constants.js +58 -21
- package/dist/node/lib/AreComponent/Are.constants.js.map +1 -1
- package/dist/node/lib/AreComponent/Are.constants.mjs +58 -21
- package/dist/node/lib/AreComponent/Are.constants.mjs.map +1 -1
- package/dist/node/lib/AreComponent/Are.context.d.mts +13 -21
- package/dist/node/lib/AreComponent/Are.context.d.ts +13 -21
- package/dist/node/lib/AreComponent/Are.context.js +91 -2
- package/dist/node/lib/AreComponent/Are.context.js.map +1 -1
- package/dist/node/lib/AreComponent/Are.context.mjs +92 -3
- package/dist/node/lib/AreComponent/Are.context.mjs.map +1 -1
- package/dist/node/lib/AreComponent/Are.meta.d.mts +14 -0
- package/dist/node/lib/AreComponent/Are.meta.d.ts +14 -0
- package/dist/node/lib/AreComponent/Are.meta.js +10 -0
- package/dist/node/lib/AreComponent/Are.meta.js.map +1 -0
- package/dist/node/lib/AreComponent/Are.meta.mjs +9 -0
- package/dist/node/lib/AreComponent/Are.meta.mjs.map +1 -0
- package/dist/node/lib/AreComponent/Are.types.d.mts +30 -1
- package/dist/node/lib/AreComponent/Are.types.d.ts +30 -1
- package/dist/node/lib/AreEngine/AreEngine.component.d.mts +77 -0
- package/dist/node/lib/AreEngine/AreEngine.component.d.ts +77 -0
- package/dist/node/lib/AreEngine/AreEngine.component.js +259 -0
- package/dist/node/lib/AreEngine/AreEngine.component.js.map +1 -0
- package/dist/node/lib/AreEngine/AreEngine.component.mjs +249 -0
- package/dist/node/lib/AreEngine/AreEngine.component.mjs.map +1 -0
- package/dist/node/lib/AreEngine/AreEngine.constants.d.mts +7 -0
- package/dist/node/lib/AreEngine/AreEngine.constants.d.ts +7 -0
- package/dist/node/lib/AreEngine/AreEngine.constants.js +11 -0
- package/dist/node/lib/AreEngine/AreEngine.constants.js.map +1 -0
- package/dist/node/lib/AreEngine/AreEngine.constants.mjs +11 -0
- package/dist/node/lib/AreEngine/AreEngine.constants.mjs.map +1 -0
- package/dist/node/lib/AreEngine/AreEngine.error.d.mts +7 -0
- package/dist/node/lib/AreEngine/AreEngine.error.d.ts +7 -0
- package/dist/node/lib/AreEngine/AreEngine.error.js +11 -0
- package/dist/node/lib/AreEngine/AreEngine.error.js.map +1 -0
- package/dist/node/lib/AreEngine/AreEngine.error.mjs +10 -0
- package/dist/node/lib/AreEngine/AreEngine.error.mjs.map +1 -0
- package/dist/node/lib/AreEngine/AreEngine.types.d.mts +40 -0
- package/dist/node/lib/AreEngine/AreEngine.types.d.ts +40 -0
- package/dist/node/lib/AreEngine/AreEngine.types.js +4 -0
- package/dist/node/lib/AreEngine/AreEngine.types.js.map +1 -0
- package/dist/node/lib/AreEngine/AreEngine.types.mjs +3 -0
- package/dist/node/lib/AreEngine/AreEngine.types.mjs.map +1 -0
- package/dist/node/lib/AreEvent/AreEvent.context.d.mts +6 -8
- package/dist/node/lib/AreEvent/AreEvent.context.d.ts +6 -8
- package/dist/node/lib/AreEvent/AreEvent.context.js +2 -12
- package/dist/node/lib/AreEvent/AreEvent.context.js.map +1 -1
- package/dist/node/lib/AreEvent/AreEvent.context.mjs +2 -12
- package/dist/node/lib/AreEvent/AreEvent.context.mjs.map +1 -1
- package/dist/node/lib/AreInstruction/AreInstruction.constants.d.mts +21 -0
- package/dist/node/lib/AreInstruction/AreInstruction.constants.d.ts +21 -0
- package/dist/node/lib/AreInstruction/AreInstruction.constants.js +26 -0
- package/dist/node/lib/AreInstruction/AreInstruction.constants.js.map +1 -0
- package/dist/node/lib/AreInstruction/AreInstruction.constants.mjs +25 -0
- package/dist/node/lib/AreInstruction/AreInstruction.constants.mjs.map +1 -0
- package/dist/node/lib/AreInstruction/AreInstruction.entity.d.mts +14 -0
- package/dist/node/lib/AreInstruction/AreInstruction.entity.d.ts +14 -0
- package/dist/node/lib/AreInstruction/AreInstruction.entity.js +152 -0
- package/dist/node/lib/AreInstruction/AreInstruction.entity.js.map +1 -0
- package/dist/node/lib/AreInstruction/AreInstruction.entity.mjs +145 -0
- package/dist/node/lib/AreInstruction/AreInstruction.entity.mjs.map +1 -0
- package/dist/node/lib/AreInstruction/AreInstruction.error.d.mts +6 -0
- package/dist/node/lib/AreInstruction/AreInstruction.error.d.ts +6 -0
- package/dist/node/lib/AreInstruction/AreInstruction.error.js +10 -0
- package/dist/node/lib/AreInstruction/AreInstruction.error.js.map +1 -0
- package/dist/node/lib/AreInstruction/AreInstruction.error.mjs +9 -0
- package/dist/node/lib/AreInstruction/AreInstruction.error.mjs.map +1 -0
- package/dist/node/lib/AreInstruction/AreInstruction.types.d.mts +14 -0
- package/dist/node/lib/AreInstruction/AreInstruction.types.d.ts +14 -0
- package/dist/node/lib/AreInstruction/AreInstruction.types.js +4 -0
- package/dist/node/lib/AreInstruction/AreInstruction.types.js.map +1 -0
- package/dist/node/lib/AreInstruction/AreInstruction.types.mjs +3 -0
- package/dist/node/lib/AreInstruction/AreInstruction.types.mjs.map +1 -0
- package/dist/node/lib/AreInstruction/types/AreDeclaration.instruction.d.mts +14 -0
- package/dist/node/lib/AreInstruction/types/AreDeclaration.instruction.d.ts +14 -0
- package/dist/node/lib/AreInstruction/types/AreDeclaration.instruction.js +37 -0
- package/dist/node/lib/AreInstruction/types/AreDeclaration.instruction.js.map +1 -0
- package/dist/node/lib/AreInstruction/types/AreDeclaration.instruction.mjs +30 -0
- package/dist/node/lib/AreInstruction/types/AreDeclaration.instruction.mjs.map +1 -0
- package/dist/node/lib/AreInstruction/types/AreMutation.instruction.d.mts +14 -0
- package/dist/node/lib/AreInstruction/types/AreMutation.instruction.d.ts +14 -0
- package/dist/node/lib/AreInstruction/types/AreMutation.instruction.js +52 -0
- package/dist/node/lib/AreInstruction/types/AreMutation.instruction.js.map +1 -0
- package/dist/node/lib/AreInstruction/types/AreMutation.instruction.mjs +45 -0
- package/dist/node/lib/AreInstruction/types/AreMutation.instruction.mjs.map +1 -0
- package/dist/node/lib/AreInterpreter/AreInterpreter.component.d.mts +49 -0
- package/dist/node/lib/AreInterpreter/AreInterpreter.component.d.ts +49 -0
- package/dist/node/lib/AreInterpreter/AreInterpreter.component.js +164 -0
- package/dist/node/lib/AreInterpreter/AreInterpreter.component.js.map +1 -0
- package/dist/node/lib/AreInterpreter/AreInterpreter.component.mjs +154 -0
- package/dist/node/lib/AreInterpreter/AreInterpreter.component.mjs.map +1 -0
- package/dist/node/lib/AreInterpreter/AreInterpreter.constants.js +4 -0
- package/dist/node/lib/AreInterpreter/AreInterpreter.constants.js.map +1 -0
- package/dist/node/lib/AreInterpreter/AreInterpreter.constants.mjs +3 -0
- package/dist/node/lib/AreInterpreter/AreInterpreter.constants.mjs.map +1 -0
- package/dist/node/lib/AreInterpreter/AreInterpreter.error.d.mts +6 -0
- package/dist/node/lib/AreInterpreter/AreInterpreter.error.d.ts +6 -0
- package/dist/node/lib/AreInterpreter/AreInterpreter.error.js +10 -0
- package/dist/node/lib/AreInterpreter/AreInterpreter.error.js.map +1 -0
- package/dist/node/lib/AreInterpreter/AreInterpreter.error.mjs +9 -0
- package/dist/node/lib/AreInterpreter/AreInterpreter.error.mjs.map +1 -0
- package/dist/node/lib/AreInterpreter/AreInterpreter.types.js +4 -0
- package/dist/node/lib/AreInterpreter/AreInterpreter.types.js.map +1 -0
- package/dist/node/lib/AreInterpreter/AreInterpreter.types.mjs +3 -0
- package/dist/node/lib/AreInterpreter/AreInterpreter.types.mjs.map +1 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.component.d.mts +188 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.component.d.ts +188 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.component.js +349 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.component.js.map +1 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.component.mjs +339 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.component.mjs.map +1 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.constants.d.mts +2 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.constants.d.ts +2 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.constants.js +4 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.constants.js.map +1 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.constants.mjs +3 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.constants.mjs.map +1 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.error.d.mts +7 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.error.d.ts +7 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.error.js +11 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.error.js.map +1 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.error.mjs +10 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.error.mjs.map +1 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.types.d.mts +2 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.types.d.ts +2 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.types.js +4 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.types.js.map +1 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.types.mjs +3 -0
- package/dist/node/lib/AreLifecycle/AreLifecycle.types.mjs.map +1 -0
- package/dist/node/lib/AreLoader/AreLoader.component.d.mts +31 -0
- package/dist/node/lib/AreLoader/AreLoader.component.d.ts +31 -0
- package/dist/node/lib/AreLoader/AreLoader.component.js +64 -0
- package/dist/node/lib/AreLoader/AreLoader.component.js.map +1 -0
- package/dist/node/lib/AreLoader/AreLoader.component.mjs +54 -0
- package/dist/node/lib/AreLoader/AreLoader.component.mjs.map +1 -0
- package/dist/node/lib/AreLoader/AreLoader.constants.d.mts +2 -0
- package/dist/node/lib/AreLoader/AreLoader.constants.d.ts +2 -0
- package/dist/node/lib/AreLoader/AreLoader.constants.js +4 -0
- package/dist/node/lib/AreLoader/AreLoader.constants.js.map +1 -0
- package/dist/node/lib/AreLoader/AreLoader.constants.mjs +3 -0
- package/dist/node/lib/AreLoader/AreLoader.constants.mjs.map +1 -0
- package/dist/node/lib/AreLoader/AreLoader.error.d.mts +8 -0
- package/dist/node/lib/AreLoader/AreLoader.error.d.ts +8 -0
- package/dist/node/lib/AreLoader/AreLoader.error.js +12 -0
- package/dist/node/lib/AreLoader/AreLoader.error.js.map +1 -0
- package/dist/node/lib/AreLoader/AreLoader.error.mjs +11 -0
- package/dist/node/lib/AreLoader/AreLoader.error.mjs.map +1 -0
- package/dist/node/lib/AreLoader/AreLoader.types.d.mts +2 -0
- package/dist/node/lib/AreLoader/AreLoader.types.d.ts +2 -0
- package/dist/node/lib/AreLoader/AreLoader.types.js +4 -0
- package/dist/node/lib/AreLoader/AreLoader.types.js.map +1 -0
- package/dist/node/lib/AreLoader/AreLoader.types.mjs +3 -0
- package/dist/node/lib/AreLoader/AreLoader.types.mjs.map +1 -0
- package/dist/node/lib/AreNode/AreNode.constants.d.mts +87 -17
- package/dist/node/lib/AreNode/AreNode.constants.d.ts +87 -17
- package/dist/node/lib/AreNode/AreNode.constants.js +111 -11
- package/dist/node/lib/AreNode/AreNode.constants.js.map +1 -1
- package/dist/node/lib/AreNode/AreNode.constants.mjs +111 -12
- package/dist/node/lib/AreNode/AreNode.constants.mjs.map +1 -1
- package/dist/node/lib/AreNode/AreNode.entity.d.mts +12 -6
- package/dist/node/lib/AreNode/AreNode.entity.d.ts +12 -6
- package/dist/node/lib/AreNode/AreNode.entity.js +281 -49
- package/dist/node/lib/AreNode/AreNode.entity.js.map +1 -1
- package/dist/node/lib/AreNode/AreNode.entity.mjs +282 -50
- package/dist/node/lib/AreNode/AreNode.entity.mjs.map +1 -1
- package/dist/node/lib/AreNode/AreNode.types.d.mts +14 -13
- package/dist/node/lib/AreNode/AreNode.types.d.ts +14 -13
- package/dist/node/lib/AreScene/AreScene.constants.d.mts +7 -0
- package/dist/node/lib/AreScene/AreScene.constants.d.ts +7 -0
- package/dist/node/lib/AreScene/AreScene.constants.js +11 -0
- package/dist/node/lib/AreScene/AreScene.constants.js.map +1 -0
- package/dist/node/lib/AreScene/AreScene.constants.mjs +11 -0
- package/dist/node/lib/AreScene/AreScene.constants.mjs.map +1 -0
- package/dist/node/lib/AreScene/AreScene.context.d.mts +12 -6
- package/dist/node/lib/AreScene/AreScene.context.d.ts +12 -6
- package/dist/node/lib/AreScene/AreScene.context.js +284 -186
- package/dist/node/lib/AreScene/AreScene.context.js.map +1 -1
- package/dist/node/lib/AreScene/AreScene.context.mjs +277 -185
- package/dist/node/lib/AreScene/AreScene.context.mjs.map +1 -1
- package/dist/node/lib/AreScene/AreScene.error.d.mts +4 -0
- package/dist/node/lib/AreScene/AreScene.error.d.ts +4 -0
- package/dist/node/lib/AreScene/AreScene.error.js +4 -0
- package/dist/node/lib/AreScene/AreScene.error.js.map +1 -1
- package/dist/node/lib/AreScene/AreScene.error.mjs +4 -0
- package/dist/node/lib/AreScene/AreScene.error.mjs.map +1 -1
- package/dist/node/lib/AreScene/AreScene.types.d.mts +14 -9
- package/dist/node/lib/AreScene/AreScene.types.d.ts +14 -9
- package/dist/node/lib/AreSignals/AreSignal.entity.d.mts +6 -0
- package/dist/node/lib/AreSignals/AreSignal.entity.d.ts +6 -0
- package/dist/node/lib/AreSignals/AreSignal.entity.js +24 -0
- package/dist/node/lib/AreSignals/AreSignal.entity.js.map +1 -0
- package/dist/node/lib/AreSignals/AreSignal.entity.mjs +17 -0
- package/dist/node/lib/AreSignals/AreSignal.entity.mjs.map +1 -0
- package/dist/node/lib/AreSignals/AreSignals.component.d.mts +35 -0
- package/dist/node/lib/AreSignals/AreSignals.component.d.ts +35 -0
- package/dist/node/lib/AreSignals/AreSignals.component.js +90 -0
- package/dist/node/lib/AreSignals/AreSignals.component.js.map +1 -0
- package/dist/node/lib/AreSignals/AreSignals.component.mjs +80 -0
- package/dist/node/lib/AreSignals/AreSignals.component.mjs.map +1 -0
- package/dist/node/lib/AreSignals/AreSignals.constants.d.mts +2 -0
- package/dist/node/lib/AreSignals/AreSignals.constants.d.ts +2 -0
- package/dist/node/lib/AreSignals/AreSignals.constants.js +4 -0
- package/dist/node/lib/AreSignals/AreSignals.constants.js.map +1 -0
- package/dist/node/lib/AreSignals/AreSignals.constants.mjs +3 -0
- package/dist/node/lib/AreSignals/AreSignals.constants.mjs.map +1 -0
- package/dist/node/lib/AreSignals/AreSignals.context.d.mts +86 -0
- package/dist/node/lib/AreSignals/AreSignals.context.d.ts +86 -0
- package/dist/node/lib/AreSignals/AreSignals.context.js +153 -0
- package/dist/node/lib/AreSignals/AreSignals.context.js.map +1 -0
- package/dist/node/lib/AreSignals/AreSignals.context.mjs +146 -0
- package/dist/node/lib/AreSignals/AreSignals.context.mjs.map +1 -0
- package/dist/node/lib/AreSignals/AreSignals.meta.d.mts +15 -0
- package/dist/node/lib/AreSignals/AreSignals.meta.d.ts +15 -0
- package/dist/node/lib/AreSignals/AreSignals.meta.js +48 -0
- package/dist/node/lib/AreSignals/AreSignals.meta.js.map +1 -0
- package/dist/node/lib/AreSignals/AreSignals.meta.mjs +47 -0
- package/dist/node/lib/AreSignals/AreSignals.meta.mjs.map +1 -0
- package/dist/node/lib/AreSignals/AreSignals.types.d.mts +18 -0
- package/dist/node/lib/AreSignals/AreSignals.types.d.ts +18 -0
- package/dist/node/lib/AreSignals/AreSignals.types.js +4 -0
- package/dist/node/lib/AreSignals/AreSignals.types.js.map +1 -0
- package/dist/node/lib/AreSignals/AreSignals.types.mjs +3 -0
- package/dist/node/lib/AreSignals/AreSignals.types.mjs.map +1 -0
- package/dist/node/lib/AreSignals/entities/AreInit.signal.d.mts +8 -0
- package/dist/node/lib/AreSignals/entities/AreInit.signal.d.ts +8 -0
- package/dist/node/lib/AreSignals/entities/AreInit.signal.js +13 -0
- package/dist/node/lib/AreSignals/entities/AreInit.signal.js.map +1 -0
- package/dist/node/lib/AreSignals/entities/AreInit.signal.mjs +12 -0
- package/dist/node/lib/AreSignals/entities/AreInit.signal.mjs.map +1 -0
- package/dist/node/lib/AreSignals/entities/AreRoute.signal.d.mts +12 -0
- package/dist/node/lib/AreSignals/entities/AreRoute.signal.d.ts +12 -0
- package/dist/node/lib/AreSignals/entities/AreRoute.signal.js +25 -0
- package/dist/node/lib/AreSignals/entities/AreRoute.signal.js.map +1 -0
- package/dist/node/lib/AreSignals/entities/AreRoute.signal.mjs +24 -0
- package/dist/node/lib/AreSignals/entities/AreRoute.signal.mjs.map +1 -0
- package/dist/node/lib/AreStore/AreStore.constants.d.mts +5 -0
- package/dist/node/lib/AreStore/AreStore.constants.d.ts +5 -0
- package/dist/node/lib/AreStore/AreStore.constants.js +9 -0
- package/dist/node/lib/AreStore/AreStore.constants.js.map +1 -0
- package/dist/node/lib/AreStore/AreStore.constants.mjs +9 -0
- package/dist/node/lib/AreStore/AreStore.constants.mjs.map +1 -0
- package/dist/node/lib/AreStore/AreStore.context.d.mts +14 -10
- package/dist/node/lib/AreStore/AreStore.context.d.ts +14 -10
- package/dist/node/lib/AreStore/AreStore.context.js +162 -6
- package/dist/node/lib/AreStore/AreStore.context.js.map +1 -1
- package/dist/node/lib/AreStore/AreStore.context.mjs +162 -6
- package/dist/node/lib/AreStore/AreStore.context.mjs.map +1 -1
- package/dist/node/lib/AreStore/AreStore.types.d.mts +9 -0
- package/dist/node/lib/AreStore/AreStore.types.d.ts +9 -0
- package/dist/node/lib/AreStore/AreStore.types.js +4 -0
- package/dist/node/lib/AreStore/AreStore.types.js.map +1 -0
- package/dist/node/lib/AreStore/AreStore.types.mjs +3 -0
- package/dist/node/lib/AreStore/AreStore.types.mjs.map +1 -0
- package/dist/node/lib/AreSyntax/AreSyntax.constants.d.mts +2 -0
- package/dist/node/lib/AreSyntax/AreSyntax.constants.d.ts +2 -0
- package/dist/node/lib/AreSyntax/AreSyntax.constants.js +4 -0
- package/dist/node/lib/AreSyntax/AreSyntax.constants.js.map +1 -0
- package/dist/node/lib/AreSyntax/AreSyntax.constants.mjs +3 -0
- package/dist/node/lib/AreSyntax/AreSyntax.constants.mjs.map +1 -0
- package/dist/node/lib/AreSyntax/AreSyntax.context.d.mts +99 -51
- package/dist/node/lib/AreSyntax/AreSyntax.context.d.ts +99 -51
- package/dist/node/lib/AreSyntax/AreSyntax.context.js +305 -73
- package/dist/node/lib/AreSyntax/AreSyntax.context.js.map +1 -1
- package/dist/node/lib/AreSyntax/AreSyntax.context.mjs +306 -74
- package/dist/node/lib/AreSyntax/AreSyntax.context.mjs.map +1 -1
- package/dist/node/lib/AreSyntax/AreSyntax.types.d.mts +14 -132
- package/dist/node/lib/AreSyntax/AreSyntax.types.d.ts +14 -132
- package/dist/node/lib/AreSyntax/AreSyntax.types.js.map +1 -1
- package/dist/node/lib/AreSyntax/AreSyntax.types.mjs.map +1 -1
- package/dist/node/lib/AreTokenizer/AreTokenizer.component.d.mts +43 -0
- package/dist/node/lib/AreTokenizer/AreTokenizer.component.d.ts +43 -0
- package/dist/node/lib/AreTokenizer/AreTokenizer.component.js +238 -0
- package/dist/node/lib/AreTokenizer/AreTokenizer.component.js.map +1 -0
- package/dist/node/lib/AreTokenizer/AreTokenizer.component.mjs +228 -0
- package/dist/node/lib/AreTokenizer/AreTokenizer.component.mjs.map +1 -0
- package/dist/node/lib/AreTokenizer/AreTokenizer.error.d.mts +6 -0
- package/dist/node/lib/AreTokenizer/AreTokenizer.error.d.ts +6 -0
- package/dist/node/lib/AreTokenizer/AreTokenizer.error.js +10 -0
- package/dist/node/lib/AreTokenizer/AreTokenizer.error.js.map +1 -0
- package/dist/node/lib/AreTokenizer/AreTokenizer.error.mjs +9 -0
- package/dist/node/lib/AreTokenizer/AreTokenizer.error.mjs.map +1 -0
- package/dist/node/lib/AreTransformer/AreTransformer.component.d.mts +20 -0
- package/dist/node/lib/AreTransformer/AreTransformer.component.d.ts +20 -0
- package/dist/node/lib/AreTransformer/AreTransformer.component.js +48 -0
- package/dist/node/lib/AreTransformer/AreTransformer.component.js.map +1 -0
- package/dist/node/lib/AreTransformer/AreTransformer.component.mjs +38 -0
- package/dist/node/lib/AreTransformer/AreTransformer.component.mjs.map +1 -0
- package/dist/node/lib/AreTransformer/AreTransformer.constants.d.mts +2 -0
- package/dist/node/lib/AreTransformer/AreTransformer.constants.d.ts +2 -0
- package/dist/node/lib/AreTransformer/AreTransformer.constants.js +4 -0
- package/dist/node/lib/AreTransformer/AreTransformer.constants.js.map +1 -0
- package/dist/node/lib/AreTransformer/AreTransformer.constants.mjs +3 -0
- package/dist/node/lib/AreTransformer/AreTransformer.constants.mjs.map +1 -0
- package/dist/node/lib/AreTransformer/AreTransformer.types.d.mts +2 -0
- package/dist/node/lib/AreTransformer/AreTransformer.types.d.ts +2 -0
- package/dist/node/lib/AreTransformer/AreTransformer.types.js +4 -0
- package/dist/node/lib/AreTransformer/AreTransformer.types.js.map +1 -0
- package/dist/node/lib/AreTransformer/AreTransformer.types.mjs +3 -0
- package/dist/node/lib/AreTransformer/AreTransformer.types.mjs.map +1 -0
- package/dist/node/lib/AreWatcher/AreWatcher.component.d.mts +18 -0
- package/dist/node/lib/AreWatcher/AreWatcher.component.d.ts +18 -0
- package/dist/node/lib/AreWatcher/AreWatcher.component.js +78 -0
- package/dist/node/lib/AreWatcher/AreWatcher.component.js.map +1 -0
- package/dist/node/lib/AreWatcher/AreWatcher.component.mjs +71 -0
- package/dist/node/lib/AreWatcher/AreWatcher.component.mjs.map +1 -0
- package/dist/node/lib/AreWatcher/AreWatcher.constants.d.mts +2 -0
- package/dist/node/lib/AreWatcher/AreWatcher.constants.d.ts +2 -0
- package/dist/node/lib/AreWatcher/AreWatcher.constants.js +4 -0
- package/dist/node/lib/AreWatcher/AreWatcher.constants.js.map +1 -0
- package/dist/node/lib/AreWatcher/AreWatcher.constants.mjs +3 -0
- package/dist/node/lib/AreWatcher/AreWatcher.constants.mjs.map +1 -0
- package/dist/node/lib/AreWatcher/AreWatcher.context.d.mts +2 -0
- package/dist/node/lib/AreWatcher/AreWatcher.context.d.ts +2 -0
- package/dist/node/lib/AreWatcher/AreWatcher.context.js +4 -0
- package/dist/node/lib/AreWatcher/AreWatcher.context.js.map +1 -0
- package/dist/node/lib/AreWatcher/AreWatcher.context.mjs +3 -0
- package/dist/node/lib/AreWatcher/AreWatcher.context.mjs.map +1 -0
- package/dist/node/lib/AreWatcher/AreWatcher.types.d.mts +2 -0
- package/dist/node/lib/AreWatcher/AreWatcher.types.d.ts +2 -0
- package/dist/node/lib/AreWatcher/AreWatcher.types.js +4 -0
- package/dist/node/lib/AreWatcher/AreWatcher.types.js.map +1 -0
- package/dist/node/lib/AreWatcher/AreWatcher.types.mjs +3 -0
- package/dist/node/lib/AreWatcher/AreWatcher.types.mjs.map +1 -0
- package/jest.config.ts +30 -19
- package/package.json +39 -23
- package/src/index.ts +92 -15
- package/src/lib/AreAttribute/AreAttribute.constants.ts +22 -0
- package/src/lib/AreAttribute/AreAttribute.entity.ts +136 -0
- package/src/lib/AreAttribute/AreAttribute.types.ts +51 -0
- package/src/lib/AreCompiler/AreCompiler.component.ts +48 -980
- package/src/lib/AreComponent/Are.component.ts +102 -50
- package/src/lib/AreComponent/Are.constants.ts +59 -39
- package/src/lib/AreComponent/Are.context.ts +120 -8
- package/src/lib/AreComponent/Are.meta.ts +16 -0
- package/src/lib/AreComponent/Are.types.ts +30 -0
- package/src/lib/AreEngine/AreEngine.component.ts +317 -0
- package/src/lib/AreEngine/AreEngine.constants.ts +7 -0
- package/src/lib/AreEngine/AreEngine.error.ts +9 -0
- package/src/lib/AreEngine/AreEngine.types.ts +24 -0
- package/src/lib/AreEvent/AreEvent.context.ts +3 -27
- package/src/lib/AreInstruction/AreInstruction.constants.ts +23 -0
- package/src/lib/AreInstruction/AreInstruction.entity.ts +207 -0
- package/src/lib/AreInstruction/AreInstruction.error.ts +7 -0
- package/src/lib/AreInstruction/AreInstruction.types.ts +63 -0
- package/src/lib/AreInstruction/types/AreDeclaration.instruction.ts +77 -0
- package/src/lib/AreInstruction/types/AreMutation.instruction.ts +87 -0
- package/src/lib/AreInterpreter/AreInterpreter.component.ts +208 -0
- package/src/lib/AreInterpreter/AreInterpreter.error.ts +6 -0
- package/src/lib/AreLifecycle/AreLifecycle.component.ts +638 -0
- package/src/lib/AreLifecycle/AreLifecycle.constants.ts +0 -0
- package/src/lib/AreLifecycle/AreLifecycle.error.ts +9 -0
- package/src/lib/AreLifecycle/AreLifecycle.types.ts +0 -0
- package/src/lib/AreLoader/AreLoader.component.ts +89 -0
- package/src/lib/AreLoader/AreLoader.constants.ts +0 -0
- package/src/lib/AreLoader/AreLoader.error.ts +10 -0
- package/src/lib/AreLoader/AreLoader.types.ts +0 -0
- package/src/lib/AreNode/AreNode.constants.ts +111 -16
- package/src/lib/AreNode/AreNode.entity.ts +380 -91
- package/src/lib/AreNode/AreNode.types.ts +7 -11
- package/src/lib/AreScene/AreScene.constants.ts +7 -0
- package/src/lib/AreScene/AreScene.context.ts +305 -284
- package/src/lib/AreScene/AreScene.error.ts +9 -1
- package/src/lib/AreScene/AreScene.types.ts +21 -3
- package/src/lib/AreSignals/AreSignal.entity.ts +17 -0
- package/src/lib/AreSignals/AreSignals.component.ts +98 -0
- package/src/lib/AreSignals/AreSignals.constants.ts +0 -0
- package/src/lib/AreSignals/AreSignals.context.ts +196 -0
- package/src/lib/AreSignals/AreSignals.meta.ts +75 -0
- package/src/lib/AreSignals/AreSignals.types.ts +18 -0
- package/src/lib/AreSignals/entities/AreInit.signal.ts +7 -0
- package/src/lib/AreSignals/entities/AreRoute.signal.ts +27 -0
- package/src/lib/AreStore/AreStore.constants.ts +6 -0
- package/src/lib/AreStore/AreStore.context.ts +243 -14
- package/src/lib/AreStore/AreStore.types.ts +19 -0
- package/src/lib/AreSyntax/AreSyntax.constants.ts +0 -0
- package/src/lib/AreSyntax/AreSyntax.context.ts +352 -78
- package/src/lib/AreSyntax/AreSyntax.types.ts +75 -139
- package/src/lib/AreTokenizer/AreTokenizer.component.ts +289 -0
- package/src/lib/AreTokenizer/AreTokenizer.error.ts +7 -0
- package/src/lib/AreTransformer/AreTransformer.component.ts +46 -0
- package/src/lib/AreTransformer/AreTransformer.constants.ts +0 -0
- package/src/lib/AreTransformer/AreTransformer.types.ts +0 -0
- package/src/lib/AreWatcher/AreWatcher.component.ts +84 -0
- package/src/lib/AreWatcher/AreWatcher.constants.ts +0 -0
- package/src/lib/AreWatcher/AreWatcher.context.ts +0 -0
- package/src/lib/AreWatcher/AreWatcher.types.ts +0 -0
- package/tests/AreInstruction.test.ts +73 -0
- package/tests/AreScene.test.ts +62 -0
- package/tests/AreSignals.test.ts +55 -0
- package/tests/AreTokenizer.test.ts +254 -0
- package/tests/jest.setup.ts +30 -0
- package/tsconfig.json +19 -19
- package/tsup.config.ts +6 -0
- package/dist/node/engines/html/AreHTML.compiler.d.mts +0 -114
- package/dist/node/engines/html/AreHTML.compiler.d.ts +0 -114
- package/dist/node/engines/html/AreHTML.compiler.js +0 -408
- package/dist/node/engines/html/AreHTML.compiler.js.map +0 -1
- package/dist/node/engines/html/AreHTML.compiler.mjs +0 -398
- package/dist/node/engines/html/AreHTML.compiler.mjs.map +0 -1
- package/dist/node/engines/html/AreHTML.engine.d.mts +0 -36
- package/dist/node/engines/html/AreHTML.engine.d.ts +0 -36
- package/dist/node/engines/html/AreHTML.engine.js +0 -122
- package/dist/node/engines/html/AreHTML.engine.js.map +0 -1
- package/dist/node/engines/html/AreHTML.engine.mjs +0 -112
- package/dist/node/engines/html/AreHTML.engine.mjs.map +0 -1
- package/dist/node/engines/html/index.d.mts +0 -26
- package/dist/node/engines/html/index.d.ts +0 -26
- package/dist/node/engines/html/index.js +0 -17
- package/dist/node/engines/html/index.js.map +0 -1
- package/dist/node/engines/html/index.mjs +0 -5
- package/dist/node/engines/html/index.mjs.map +0 -1
- package/dist/node/engines/json/AreJSON.compiler.d.mts +0 -21
- package/dist/node/engines/json/AreJSON.compiler.d.ts +0 -21
- package/dist/node/engines/json/AreJSON.compiler.js +0 -24
- package/dist/node/engines/json/AreJSON.compiler.js.map +0 -1
- package/dist/node/engines/json/AreJSON.compiler.mjs +0 -17
- package/dist/node/engines/json/AreJSON.compiler.mjs.map +0 -1
- package/dist/node/index-BD-6iOuR.d.ts +0 -238
- package/dist/node/index-DMXWCL7R.d.mts +0 -238
- package/dist/node/lib/AreApp/AreApp.container.d.mts +0 -22
- package/dist/node/lib/AreApp/AreApp.container.d.ts +0 -22
- package/dist/node/lib/AreApp/AreApp.container.js +0 -60
- package/dist/node/lib/AreApp/AreApp.container.js.map +0 -1
- package/dist/node/lib/AreApp/AreApp.container.mjs +0 -48
- package/dist/node/lib/AreApp/AreApp.container.mjs.map +0 -1
- package/dist/node/lib/AreApp/AreApp.env.js +0 -4
- package/dist/node/lib/AreApp/AreApp.env.js.map +0 -1
- package/dist/node/lib/AreApp/AreApp.env.mjs +0 -3
- package/dist/node/lib/AreApp/AreApp.env.mjs.map +0 -1
- package/dist/node/lib/AreApp/AreApp.error.d.mts +0 -6
- package/dist/node/lib/AreApp/AreApp.error.d.ts +0 -6
- package/dist/node/lib/AreApp/AreApp.error.js +0 -10
- package/dist/node/lib/AreApp/AreApp.error.js.map +0 -1
- package/dist/node/lib/AreApp/AreApp.error.mjs +0 -9
- package/dist/node/lib/AreApp/AreApp.error.mjs.map +0 -1
- package/dist/node/lib/AreApp/AreApp.types.js +0 -4
- package/dist/node/lib/AreApp/AreApp.types.js.map +0 -1
- package/dist/node/lib/AreApp/AreApp.types.mjs +0 -3
- package/dist/node/lib/AreApp/AreApp.types.mjs.map +0 -1
- package/dist/node/lib/AreApp/index.d.mts +0 -17
- package/dist/node/lib/AreApp/index.d.ts +0 -17
- package/dist/node/lib/AreApp/index.js +0 -24
- package/dist/node/lib/AreApp/index.js.map +0 -1
- package/dist/node/lib/AreApp/index.mjs +0 -6
- package/dist/node/lib/AreApp/index.mjs.map +0 -1
- package/dist/node/lib/AreCompiler/index.d.mts +0 -17
- package/dist/node/lib/AreCompiler/index.d.ts +0 -17
- package/dist/node/lib/AreCompiler/index.js +0 -24
- package/dist/node/lib/AreCompiler/index.js.map +0 -1
- package/dist/node/lib/AreCompiler/index.mjs +0 -6
- package/dist/node/lib/AreCompiler/index.mjs.map +0 -1
- package/dist/node/lib/AreComponent/index.d.mts +0 -11
- package/dist/node/lib/AreComponent/index.d.ts +0 -11
- package/dist/node/lib/AreComponent/index.js +0 -31
- package/dist/node/lib/AreComponent/index.js.map +0 -1
- package/dist/node/lib/AreComponent/index.mjs +0 -7
- package/dist/node/lib/AreComponent/index.mjs.map +0 -1
- package/dist/node/lib/AreEvent/index.d.mts +0 -8
- package/dist/node/lib/AreEvent/index.d.ts +0 -8
- package/dist/node/lib/AreEvent/index.js +0 -19
- package/dist/node/lib/AreEvent/index.js.map +0 -1
- package/dist/node/lib/AreEvent/index.mjs +0 -5
- package/dist/node/lib/AreEvent/index.mjs.map +0 -1
- package/dist/node/lib/AreIndex/AreIndex.context.d.mts +0 -8
- package/dist/node/lib/AreIndex/AreIndex.context.d.ts +0 -8
- package/dist/node/lib/AreIndex/AreIndex.context.js +0 -142
- package/dist/node/lib/AreIndex/AreIndex.context.js.map +0 -1
- package/dist/node/lib/AreIndex/AreIndex.context.mjs +0 -141
- package/dist/node/lib/AreIndex/AreIndex.context.mjs.map +0 -1
- package/dist/node/lib/AreIndex/index.d.mts +0 -8
- package/dist/node/lib/AreIndex/index.d.ts +0 -8
- package/dist/node/lib/AreIndex/index.js +0 -12
- package/dist/node/lib/AreIndex/index.js.map +0 -1
- package/dist/node/lib/AreIndex/index.mjs +0 -4
- package/dist/node/lib/AreIndex/index.mjs.map +0 -1
- package/dist/node/lib/AreNode/index.d.mts +0 -9
- package/dist/node/lib/AreNode/index.d.ts +0 -9
- package/dist/node/lib/AreNode/index.js +0 -26
- package/dist/node/lib/AreNode/index.js.map +0 -1
- package/dist/node/lib/AreNode/index.mjs +0 -6
- package/dist/node/lib/AreNode/index.mjs.map +0 -1
- package/dist/node/lib/AreProps/AreProps.context.d.mts +0 -9
- package/dist/node/lib/AreProps/AreProps.context.d.ts +0 -9
- package/dist/node/lib/AreProps/AreProps.context.js +0 -32
- package/dist/node/lib/AreProps/AreProps.context.js.map +0 -1
- package/dist/node/lib/AreProps/AreProps.context.mjs +0 -25
- package/dist/node/lib/AreProps/AreProps.context.mjs.map +0 -1
- package/dist/node/lib/AreProps/index.d.mts +0 -3
- package/dist/node/lib/AreProps/index.d.ts +0 -3
- package/dist/node/lib/AreProps/index.js +0 -12
- package/dist/node/lib/AreProps/index.js.map +0 -1
- package/dist/node/lib/AreProps/index.mjs +0 -4
- package/dist/node/lib/AreProps/index.mjs.map +0 -1
- package/dist/node/lib/AreRoot/AreRoot.component.d.mts +0 -18
- package/dist/node/lib/AreRoot/AreRoot.component.d.ts +0 -18
- package/dist/node/lib/AreRoot/AreRoot.component.js +0 -53
- package/dist/node/lib/AreRoot/AreRoot.component.js.map +0 -1
- package/dist/node/lib/AreRoot/AreRoot.component.mjs +0 -41
- package/dist/node/lib/AreRoot/AreRoot.component.mjs.map +0 -1
- package/dist/node/lib/AreRoot/index.d.mts +0 -11
- package/dist/node/lib/AreRoot/index.d.ts +0 -11
- package/dist/node/lib/AreRoot/index.js +0 -12
- package/dist/node/lib/AreRoot/index.js.map +0 -1
- package/dist/node/lib/AreRoot/index.mjs +0 -4
- package/dist/node/lib/AreRoot/index.mjs.map +0 -1
- package/dist/node/lib/AreRouter/AreRouter.componeent.d.mts +0 -17
- package/dist/node/lib/AreRouter/AreRouter.componeent.d.ts +0 -17
- package/dist/node/lib/AreRouter/AreRouter.componeent.js +0 -37
- package/dist/node/lib/AreRouter/AreRouter.componeent.js.map +0 -1
- package/dist/node/lib/AreRouter/AreRouter.componeent.mjs +0 -25
- package/dist/node/lib/AreRouter/AreRouter.componeent.mjs.map +0 -1
- package/dist/node/lib/AreRouter/index.d.mts +0 -12
- package/dist/node/lib/AreRouter/index.d.ts +0 -12
- package/dist/node/lib/AreRouter/index.js +0 -12
- package/dist/node/lib/AreRouter/index.js.map +0 -1
- package/dist/node/lib/AreRouter/index.mjs +0 -4
- package/dist/node/lib/AreRouter/index.mjs.map +0 -1
- package/dist/node/lib/AreScene/index.d.mts +0 -9
- package/dist/node/lib/AreScene/index.d.ts +0 -9
- package/dist/node/lib/AreScene/index.js +0 -24
- package/dist/node/lib/AreScene/index.js.map +0 -1
- package/dist/node/lib/AreScene/index.mjs +0 -6
- package/dist/node/lib/AreScene/index.mjs.map +0 -1
- package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.constants.d.mts +0 -7
- package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.constants.d.ts +0 -7
- package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.constants.js +0 -12
- package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.constants.js.map +0 -1
- package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.constants.mjs +0 -12
- package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.constants.mjs.map +0 -1
- package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.entity.d.mts +0 -8
- package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.entity.d.ts +0 -8
- package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.entity.js +0 -95
- package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.entity.js.map +0 -1
- package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.entity.mjs +0 -94
- package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.entity.mjs.map +0 -1
- package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.types.d.mts +0 -8
- package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.types.d.ts +0 -8
- package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.types.js +0 -4
- package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.types.js.map +0 -1
- package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.types.mjs +0 -3
- package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.types.mjs.map +0 -1
- package/dist/node/lib/AreSceneInstruction/index.d.mts +0 -19
- package/dist/node/lib/AreSceneInstruction/index.d.ts +0 -19
- package/dist/node/lib/AreSceneInstruction/index.js +0 -33
- package/dist/node/lib/AreSceneInstruction/index.js.map +0 -1
- package/dist/node/lib/AreSceneInstruction/index.mjs +0 -7
- package/dist/node/lib/AreSceneInstruction/index.mjs.map +0 -1
- package/dist/node/lib/AreSceneInstruction/types/AddAttribute.instruction.d.mts +0 -19
- package/dist/node/lib/AreSceneInstruction/types/AddAttribute.instruction.d.ts +0 -19
- package/dist/node/lib/AreSceneInstruction/types/AddAttribute.instruction.js +0 -27
- package/dist/node/lib/AreSceneInstruction/types/AddAttribute.instruction.js.map +0 -1
- package/dist/node/lib/AreSceneInstruction/types/AddAttribute.instruction.mjs +0 -26
- package/dist/node/lib/AreSceneInstruction/types/AddAttribute.instruction.mjs.map +0 -1
- package/dist/node/lib/AreSceneInstruction/types/AddDirective.instruction.d.mts +0 -20
- package/dist/node/lib/AreSceneInstruction/types/AddDirective.instruction.d.ts +0 -20
- package/dist/node/lib/AreSceneInstruction/types/AddDirective.instruction.js +0 -27
- package/dist/node/lib/AreSceneInstruction/types/AddDirective.instruction.js.map +0 -1
- package/dist/node/lib/AreSceneInstruction/types/AddDirective.instruction.mjs +0 -26
- package/dist/node/lib/AreSceneInstruction/types/AddDirective.instruction.mjs.map +0 -1
- package/dist/node/lib/AreSceneInstruction/types/AddStyle.instruction.d.mts +0 -17
- package/dist/node/lib/AreSceneInstruction/types/AddStyle.instruction.d.ts +0 -17
- package/dist/node/lib/AreSceneInstruction/types/AddStyle.instruction.js +0 -23
- package/dist/node/lib/AreSceneInstruction/types/AddStyle.instruction.js.map +0 -1
- package/dist/node/lib/AreSceneInstruction/types/AddStyle.instruction.mjs +0 -22
- package/dist/node/lib/AreSceneInstruction/types/AddStyle.instruction.mjs.map +0 -1
- package/dist/node/lib/AreSceneInstruction/types/AddStyleProperty.instruction.d.mts +0 -19
- package/dist/node/lib/AreSceneInstruction/types/AddStyleProperty.instruction.d.ts +0 -19
- package/dist/node/lib/AreSceneInstruction/types/AddStyleProperty.instruction.js +0 -27
- package/dist/node/lib/AreSceneInstruction/types/AddStyleProperty.instruction.js.map +0 -1
- package/dist/node/lib/AreSceneInstruction/types/AddStyleProperty.instruction.mjs +0 -26
- package/dist/node/lib/AreSceneInstruction/types/AddStyleProperty.instruction.mjs.map +0 -1
- package/dist/node/lib/AreSceneInstruction/types/AttachListener.instruction.d.mts +0 -23
- package/dist/node/lib/AreSceneInstruction/types/AttachListener.instruction.d.ts +0 -23
- package/dist/node/lib/AreSceneInstruction/types/AttachListener.instruction.js +0 -41
- package/dist/node/lib/AreSceneInstruction/types/AttachListener.instruction.js.map +0 -1
- package/dist/node/lib/AreSceneInstruction/types/AttachListener.instruction.mjs +0 -40
- package/dist/node/lib/AreSceneInstruction/types/AttachListener.instruction.mjs.map +0 -1
- package/dist/node/lib/AreSceneInstruction/types/AttachRootNode.instruction.d.mts +0 -15
- package/dist/node/lib/AreSceneInstruction/types/AttachRootNode.instruction.d.ts +0 -15
- package/dist/node/lib/AreSceneInstruction/types/AttachRootNode.instruction.js +0 -21
- package/dist/node/lib/AreSceneInstruction/types/AttachRootNode.instruction.js.map +0 -1
- package/dist/node/lib/AreSceneInstruction/types/AttachRootNode.instruction.mjs +0 -20
- package/dist/node/lib/AreSceneInstruction/types/AttachRootNode.instruction.mjs.map +0 -1
- package/dist/node/lib/AreSceneInstruction/types/MountNode.instruction.d.mts +0 -17
- package/dist/node/lib/AreSceneInstruction/types/MountNode.instruction.d.ts +0 -17
- package/dist/node/lib/AreSceneInstruction/types/MountNode.instruction.js +0 -23
- package/dist/node/lib/AreSceneInstruction/types/MountNode.instruction.js.map +0 -1
- package/dist/node/lib/AreSceneInstruction/types/MountNode.instruction.mjs +0 -22
- package/dist/node/lib/AreSceneInstruction/types/MountNode.instruction.mjs.map +0 -1
- package/dist/node/lib/AreSceneInstruction/types/ReplaceInterpolation.instruction.d.mts +0 -23
- package/dist/node/lib/AreSceneInstruction/types/ReplaceInterpolation.instruction.d.ts +0 -23
- package/dist/node/lib/AreSceneInstruction/types/ReplaceInterpolation.instruction.js +0 -34
- package/dist/node/lib/AreSceneInstruction/types/ReplaceInterpolation.instruction.js.map +0 -1
- package/dist/node/lib/AreSceneInstruction/types/ReplaceInterpolation.instruction.mjs +0 -33
- package/dist/node/lib/AreSceneInstruction/types/ReplaceInterpolation.instruction.mjs.map +0 -1
- package/dist/node/lib/AreSceneInstruction/types/UnmountNode.instruction.d.mts +0 -16
- package/dist/node/lib/AreSceneInstruction/types/UnmountNode.instruction.d.ts +0 -16
- package/dist/node/lib/AreSceneInstruction/types/UnmountNode.instruction.js +0 -20
- package/dist/node/lib/AreSceneInstruction/types/UnmountNode.instruction.js.map +0 -1
- package/dist/node/lib/AreSceneInstruction/types/UnmountNode.instruction.mjs +0 -19
- package/dist/node/lib/AreSceneInstruction/types/UnmountNode.instruction.mjs.map +0 -1
- package/dist/node/lib/AreSceneInstruction/types/index.d.mts +0 -18
- package/dist/node/lib/AreSceneInstruction/types/index.d.ts +0 -18
- package/dist/node/lib/AreSceneInstruction/types/index.js +0 -52
- package/dist/node/lib/AreSceneInstruction/types/index.js.map +0 -1
- package/dist/node/lib/AreSceneInstruction/types/index.mjs +0 -12
- package/dist/node/lib/AreSceneInstruction/types/index.mjs.map +0 -1
- package/dist/node/lib/AreSlot/AreSlot.component.d.mts +0 -8
- package/dist/node/lib/AreSlot/AreSlot.component.d.ts +0 -8
- package/dist/node/lib/AreSlot/AreSlot.component.js +0 -37
- package/dist/node/lib/AreSlot/AreSlot.component.js.map +0 -1
- package/dist/node/lib/AreSlot/AreSlot.component.mjs +0 -36
- package/dist/node/lib/AreSlot/AreSlot.component.mjs.map +0 -1
- package/dist/node/lib/AreStore/index.d.mts +0 -3
- package/dist/node/lib/AreStore/index.d.ts +0 -3
- package/dist/node/lib/AreStore/index.js +0 -12
- package/dist/node/lib/AreStore/index.js.map +0 -1
- package/dist/node/lib/AreStore/index.mjs +0 -4
- package/dist/node/lib/AreStore/index.mjs.map +0 -1
- package/dist/node/lib/AreSyntax/AreSyntax.component.d.mts +0 -89
- package/dist/node/lib/AreSyntax/AreSyntax.component.d.ts +0 -89
- package/dist/node/lib/AreSyntax/AreSyntax.component.js +0 -241
- package/dist/node/lib/AreSyntax/AreSyntax.component.js.map +0 -1
- package/dist/node/lib/AreSyntax/AreSyntax.component.mjs +0 -232
- package/dist/node/lib/AreSyntax/AreSyntax.component.mjs.map +0 -1
- package/dist/node/lib/AreSyntax/index.d.mts +0 -12
- package/dist/node/lib/AreSyntax/index.d.ts +0 -12
- package/dist/node/lib/AreSyntax/index.js +0 -29
- package/dist/node/lib/AreSyntax/index.js.map +0 -1
- package/dist/node/lib/AreSyntax/index.mjs +0 -7
- package/dist/node/lib/AreSyntax/index.mjs.map +0 -1
- package/dist/node/signals/AreInit.signal.d.mts +0 -7
- package/dist/node/signals/AreInit.signal.d.ts +0 -7
- package/dist/node/signals/AreInit.signal.js +0 -13
- package/dist/node/signals/AreInit.signal.js.map +0 -1
- package/dist/node/signals/AreInit.signal.mjs +0 -12
- package/dist/node/signals/AreInit.signal.mjs.map +0 -1
- package/dist/node/signals/AreRoute.signal.d.mts +0 -12
- package/dist/node/signals/AreRoute.signal.d.ts +0 -12
- package/dist/node/signals/AreRoute.signal.js +0 -24
- package/dist/node/signals/AreRoute.signal.js.map +0 -1
- package/dist/node/signals/AreRoute.signal.mjs +0 -23
- package/dist/node/signals/AreRoute.signal.mjs.map +0 -1
- package/dist/node/signals/index.d.mts +0 -4
- package/dist/node/signals/index.d.ts +0 -4
- package/dist/node/signals/index.js +0 -17
- package/dist/node/signals/index.js.map +0 -1
- package/dist/node/signals/index.mjs +0 -5
- package/dist/node/signals/index.mjs.map +0 -1
- package/examples/jumpstart/concept.ts +0 -60
- package/examples/jumpstart/containers/UI.container.ts +0 -172
- package/examples/jumpstart/dist/index.html +0 -22
- package/examples/jumpstart/dist/mls3rrlq-lofs95.js +0 -129
- package/examples/jumpstart/dist/static/css/main.css +0 -40
- package/examples/jumpstart/dist/static/img/test.png +0 -0
- package/examples/jumpstart/public/index.html +0 -22
- package/examples/jumpstart/public/static/css/main.css +0 -40
- package/examples/jumpstart/public/static/img/test.png +0 -0
- package/examples/jumpstart/src/components/A-Btn.component.ts +0 -124
- package/examples/jumpstart/src/components/A-Input.component.ts +0 -78
- package/examples/jumpstart/src/components/A-Navigation.component.ts +0 -167
- package/examples/jumpstart/src/components/SignInComponent.component.ts +0 -127
- package/examples/jumpstart/src/concept.ts +0 -92
- package/src/engines/html/AreHTML.compiler.ts +0 -657
- package/src/engines/html/AreHTML.engine.ts +0 -62
- package/src/engines/html/index.ts +0 -2
- package/src/engines/json/AreJSON.compiler.ts +0 -13
- package/src/lib/AreApp/AreApp.container.ts +0 -77
- package/src/lib/AreApp/AreApp.error.ts +0 -7
- package/src/lib/AreApp/index.ts +0 -4
- package/src/lib/AreCompiler/index.ts +0 -3
- package/src/lib/AreComponent/index.ts +0 -4
- package/src/lib/AreEvent/index.ts +0 -2
- package/src/lib/AreIndex/AreIndex.context.ts +0 -174
- package/src/lib/AreIndex/index.ts +0 -1
- package/src/lib/AreNode/index.ts +0 -4
- package/src/lib/AreProps/AreProps.context.ts +0 -26
- package/src/lib/AreProps/index.ts +0 -1
- package/src/lib/AreRoot/AreRoot.component.ts +0 -54
- package/src/lib/AreRoot/index.ts +0 -1
- package/src/lib/AreRouter/AreRouter.componeent.ts +0 -24
- package/src/lib/AreRouter/index.ts +0 -1
- package/src/lib/AreScene/index.ts +0 -3
- package/src/lib/AreSceneInstruction/AreSceneInstruction.constants.ts +0 -7
- package/src/lib/AreSceneInstruction/AreSceneInstruction.entity.ts +0 -156
- package/src/lib/AreSceneInstruction/AreSceneInstruction.types.ts +0 -8
- package/src/lib/AreSceneInstruction/index.ts +0 -4
- package/src/lib/AreSceneInstruction/types/AddAttribute.instruction.ts +0 -34
- package/src/lib/AreSceneInstruction/types/AddDirective.instruction.ts +0 -36
- package/src/lib/AreSceneInstruction/types/AddStyle.instruction.ts +0 -26
- package/src/lib/AreSceneInstruction/types/AddStyleProperty.instruction.ts +0 -32
- package/src/lib/AreSceneInstruction/types/AttachListener.instruction.ts +0 -57
- package/src/lib/AreSceneInstruction/types/AttachRootNode.instruction.ts +0 -23
- package/src/lib/AreSceneInstruction/types/MountNode.instruction.ts +0 -29
- package/src/lib/AreSceneInstruction/types/ReplaceInterpolation.instruction.ts +0 -45
- package/src/lib/AreSceneInstruction/types/UnmountNode.instruction.ts +0 -22
- package/src/lib/AreSceneInstruction/types/index.ts +0 -10
- package/src/lib/AreSlot/AreSlot.component.ts +0 -48
- package/src/lib/AreStore/index.ts +0 -1
- package/src/lib/AreSyntax/AreSyntax.component.ts +0 -378
- package/src/lib/AreSyntax/index.ts +0 -4
- package/src/signals/AreInit.signal.ts +0 -7
- package/src/signals/AreRoute.signal.ts +0 -25
- package/src/signals/index.ts +0 -2
- package/tests/A-HttpChannel.test.ts +0 -204
- package/tests/A-HttpServerError.test.ts +0 -204
- package/tests/A-Request.test.ts +0 -742
- package/tests/A-Service.test.ts +0 -18
- /package/dist/node/lib/{AreApp/AreApp.env.d.mts → AreInterpreter/AreInterpreter.constants.d.mts} +0 -0
- /package/dist/node/lib/{AreApp/AreApp.env.d.ts → AreInterpreter/AreInterpreter.constants.d.ts} +0 -0
- /package/dist/node/lib/{AreApp/AreApp.types.d.mts → AreInterpreter/AreInterpreter.types.d.mts} +0 -0
- /package/dist/node/lib/{AreApp/AreApp.types.d.ts → AreInterpreter/AreInterpreter.types.d.ts} +0 -0
- /package/src/lib/{AreApp/AreApp.env.ts → AreInterpreter/AreInterpreter.constants.ts} +0 -0
- /package/src/lib/{AreApp/AreApp.types.ts → AreInterpreter/AreInterpreter.types.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/AreNode/AreNode.entity.ts"],"names":["AreNode","A_Entity","A_Scope","AreScene","A_TypeGuards","AreNodeFeatures","A_Context","A_Error","A_Frame"],"mappings":";;;;;;;;;;;;;;;AAcaA,eAAA,GAAN,sBAAsBC,iBAAA,CAA0B;AAAA,EAqBnD,IAAI,EAAA,GAAa;AACb,IAAA,OAAO,KAAK,KAAA,CAAM,EAAA;AAAA,EACtB;AAAA,EAEA,IAAI,KAAA,GAAiB;AACjB,IAAA,IAAI,CAAC,KAAK,MAAA,EAAQ;AACd,MAAA,IAAA,CAAK,MAAA,GAAS,IAAIC,gBAAA,CAAQ;AAAA,QACtB,IAAA,EAAM,CAAA,EAAG,IAAA,CAAK,KAAA,CAAM,EAAE,CAAA;AAAA,OACzB,CAAA;AAAA,IACL;AAEA,IAAA,OAAO,IAAA,CAAK,MAAA;AAAA,EAChB;AAAA,EAEA,IAAI,OAAA,GAAoB;AACpB,IAAA,OAAO,IAAA,CAAK,KAAA,CAAM,WAAA,CAAsBC,cAAQ,CAAA;AAAA,EACpD;AAAA,EAEA,IAAI,IAAA,GAAe;AACf,IAAA,OAAO,KAAK,KAAA,CAAM,MAAA;AAAA,EACtB;AAAA,EAEA,IAAI,QAAA,GAAmB;AACnB,IAAA,OAAO,IAAA,CAAK,SAAA;AAAA,EAChB;AAAA,EAGA,IAAI,MAAA,GAAiB;AACjB,IAAA,OAAO,IAAA,CAAK,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AA,EAAoC,IAAA,CAAK,KAAA,CAAM,UAAU,CAAA,qGAAA,CAAA;AAAA,QACtE,aAAA,EAAe;AAAA,OAClB,CAAA;AAAA,IACL;AAAA,EACJ;AACJ;AA1OaP,eAAA,GAAN,eAAA,CAAA;AAAA,EALNQ,eAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,OAAA;AAAA,IACX,IAAA,EAAM,SAAA;AAAA,IACN,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACYR,eAAA,CAAA","file":"AreNode.entity.js","sourcesContent":["import { A_Context, A_Entity, A_Error, A_FormatterHelper, A_IdentityHelper, A_Scope, A_TypeGuards, ASEID } from \"@adaas/a-concept\";\nimport { AreNodeNewProps } from \"./AreNode.types\";\nimport { AreEvent } from \"@adaas/are/event\";\nimport { AreNodeFeatures } from \"./AreNode.constants\";\nimport { AreScene } from \"@adaas/are/scene\";\nimport { A_Frame } from \"@adaas/a-frame\";\n\n\n\n@A_Frame.Entity({\n namespace: 'A-ARE',\n name: 'AreNode',\n description: 'An AreNode entity represents a node within the A-Concept Rendering Engine (ARE) framework. It encapsulates template, markup, and styles, and manages its own scope for nested fragments and entities. AreNodes are responsible for handling events, compiling, rendering, updating, and lifecycle management within the ARE context.'\n})\nexport class AreNode extends A_Entity<AreNodeNewProps> {\n /**\n * Template string defined for the node\n * Example: `<div>{{name}}</div>`\n */\n _template!: string\n /**\n * Markup string defined for the node\n * Example: `<custom-component :prop=\"value\"> <div>Inner Content</div> </custom-component>`\n */\n _markup!: string\n /**\n * Styles string defined for the node\n */\n _styles!: string\n /**\n * The scope associated with this node\n * uses to store all nested fragments and entities like other AreNodes and Scene\n */\n protected _scope!: A_Scope\n\n get id(): string {\n return this.aseid.id;\n }\n\n get scope(): A_Scope {\n if (!this._scope) {\n this._scope = new A_Scope({\n name: `${this.aseid.id}`,\n });\n }\n\n return this._scope;\n }\n\n get content(): AreScene {\n return this.scope.resolveFlat<AreScene>(AreScene)!;\n }\n\n get type(): string {\n return this.aseid.entity;\n }\n\n get template(): string {\n return this._template;\n }\n\n\n get markup(): string {\n return this._markup;\n }\n\n get styles(): string {\n return this._styles;\n }\n\n\n fromNew(newEntity: AreNodeNewProps): void {\n this.aseid = this.generateASEID({\n id: newEntity.id,\n entity: newEntity.component,\n scope: newEntity.scope,\n });\n\n this._template = newEntity.template || '';\n this._markup = newEntity.markup || '';\n this._styles = newEntity.styles || '';\n }\n\n\n fromASEID(aseid: string | ASEID): void {\n super.fromASEID(aseid);\n\n this._template = '';\n this._markup = '';\n this._styles = '';\n }\n\n\n setTemplate(template: string): void {\n this._template = template;\n }\n\n setMarkup(markup: string): void {\n this._markup = markup;\n }\n\n setStyles(styles: string): void {\n this._styles = styles;\n }\n\n\n\n async emit(\n scope: A_Scope,\n )\n async emit(\n event: AreEvent,\n )\n async emit(\n eventOrScope: AreEvent | A_Scope,\n ) {\n this.checkScopeInheritance();\n\n /**\n * isolated event scope to avoid polluting the node scope\n */\n const eventScope = A_TypeGuards.isScopeInstance(eventOrScope)\n ? eventOrScope\n .inherit(this.scope)\n : new A_Scope({\n name: `${eventOrScope.name}-scope`,\n fragments: [eventOrScope]\n })\n .inherit(this.scope)\n\n try {\n\n await this.call(AreNodeFeatures.onEvent, eventScope)\n\n eventScope.destroy()\n\n } catch (error) {\n\n eventScope.destroy();\n\n throw error;\n }\n\n }\n\n compile(): void {\n\n this.checkScopeInheritance();\n\n try {\n\n this.call(AreNodeFeatures.onCompile, this.scope);\n\n } catch (error) {\n throw error;\n }\n }\n\n render(): void {\n this.checkScopeInheritance();\n\n try {\n\n return this.call(AreNodeFeatures.onRender, this.scope);\n\n } catch (error) {\n throw error;\n }\n }\n\n\n async update(): Promise<void> {\n\n this.checkScopeInheritance();\n\n try {\n await this.call(AreNodeFeatures.onUpdate, this.scope);\n\n } catch (error) {\n throw error;\n }\n }\n\n\n async reset(): Promise<void> {\n this.scope.destroy();\n\n this._template = '';\n this._styles = '';\n\n this._scope = new A_Scope({\n name: `${this.aseid.id}`,\n });\n }\n\n unmount(): void {\n this.checkScopeInheritance();\n\n try {\n this.call(AreNodeFeatures.onUnmount, this.scope);\n } catch (error) {\n throw error;\n }\n }\n\n\n async load(): Promise<any> {\n return await super.load(this.scope);\n }\n\n async destroy(): Promise<any> {\n this.checkScopeInheritance();\n try {\n\n await super.destroy(this.scope);\n\n this.scope.destroy();\n\n } catch (error) {\n\n this._scope.destroy();\n\n throw error;\n }\n }\n\n\n //============================================================================================\n // Helpers Methods\n //============================================================================================\n /**\n * Method to ensure that the current scope is inherited from the context scope\n * \n * @throws A_Error if the scope is not inherited from the context scope\n */\n protected checkScopeInheritance(): void {\n let attachedScope: A_Scope;\n\n try {\n attachedScope = A_Context.scope(this);\n } catch (error) {\n throw new A_Error({\n title: `A_UI_Node Scope Inheritance Error`,\n description: `The A_UI_Node entity with ASEID '${this.aseid.toString()}' is not bound to any context scope. Please ensure that the entity is created within a valid context.`,\n originalError: error\n });\n }\n }\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/AreNode/AreNode.entity.ts"],"names":["AreNode","A_Entity","A_Context","A_Scope","AreAttribute","A_FormatterHelper","AreScene","AreNodeStatuses","AreNodeFeatures","AreContext","A_TypeGuards","A_Error","A_Frame"],"mappings":";;;;;;;;;;;;;;;;;AAkBaA,eAAA,GAAN,sBAAsBC,iBAAA,CAA0B;AAAA;AAAA;AAAA;AAAA,EAyCnD,IAAI,EAAA,GAAa;AACb,IAAA,OAAO,KAAK,KAAA,CAAM,EAAA;AAAA,EACtB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,IAAA,GAAe;AACf,IAAA,OAAO,KAAK,KAAA,CAAM,MAAA;AAAA,EACtB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,OAAA,GAAkB;AAClB,IAAA,OAAO,IAAA,CAAK,QAAA;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,MAAA,GAAiB;AACjB,IAAA,OAAO,IAAA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,OAAA,EAAQ;AAAA,IAEvB,SAAS,KAAA,EAAO;AAEZ,MAAA,IAAA,CAAK,OAAO,OAAA,EAAQ;AAEpB,MAAA,MAAM,KAAA;AAAA,IACV;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWU,qBAAA,GAA8B;AACpC,IAAA,IAAI,aAAA;AAEJ,IAAA,IAAI;AACA,MAAA,aAAA,GAAgBN,kBAAA,CAAU,MAAM,IAAI,CAAA;AAAA,IACxC,SAAS,KAAA,EAAO;AACZ,MAAA,MAAM,IAAIS,gBAAA,CAAQ;AAAA,QACd,KAAA,EAAO,CAAA,iCAAA,CAAA;AAAA,QACP,WAAA,EAAa,CAAA,iCAAA,EAAoC,IAAA,CAAK,KAAA,CAAM,UAAU,CAAA,qGAAA,CAAA;AAAA,QACtE,aAAA,EAAe;AAAA,OAClB,CAAA;AAAA,IACL;AAAA,EACJ;AACJ;AAvgBaX,eAAA,GAAN,eAAA,CAAA;AAAA,EALNY,eAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,OAAA;AAAA,IACX,IAAA,EAAM,SAAA;AAAA,IACN,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACYZ,eAAA,CAAA","file":"AreNode.entity.js","sourcesContent":["import { A_Context, A_Entity, A_Error, A_Feature, A_FormatterHelper, A_Scope, A_TypeGuards, ASEID } from \"@adaas/a-concept\";\nimport { A_Frame } from \"@adaas/a-frame\";\nimport { AreEvent } from \"@adaas/are/event/AreEvent.context\";\nimport { AreScene } from \"@adaas/are/scene/AreScene.context\";\nimport { AreAttribute } from \"@adaas/are/attribute/AreAttribute.entity\";\nimport { Are } from \"@adaas/are/component/Are.component\";\nimport { AreNodeFeatures, AreNodeStatuses } from \"./AreNode.constants\";\nimport { AreNodeNewProps, AreNodeStatusNames } from \"./AreNode.types\";\nimport { AreSyntaxTokenPayload } from \"@adaas/are/syntax/AreSyntax.types\";\nimport { A_Logger } from \"@adaas/a-utils/a-logger\";\nimport { AreContext } from \"@adaas/are/component/Are.context\";\n\n\n@A_Frame.Entity({\n namespace: 'A-ARE',\n name: 'AreNode',\n description: 'An AreNode entity represents a node within the A-Concept Rendering Engine (ARE) framework. It encapsulates content, markup, and styles, and manages its own scope for nested fragments and entities. AreNodes are responsible for handling events, compiling, rendering, updating, and lifecycle management within the ARE context.'\n})\nexport class AreNode extends A_Entity<AreNodeNewProps> {\n /**\n * The current status of the node, which can be used to track the lifecycle and rendering state of the node within the scene. \n */\n status!: AreNodeStatusNames;\n\n /**\n * 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.\n */\n protected _opening!: string;\n /**\n * 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.\n */\n protected _closing!: string;\n /**\n * 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.\n */\n protected _position!: number;\n /**\n * 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.\n */\n protected _payload?: AreSyntaxTokenPayload\n /**\n * Content string defined for the node — the inner content between delimiters.\n * Example: `{{name}}`\n */\n protected _content!: string\n /**\n * Markup string defined for the node\n * Example: `<custom-component :prop=\"value\"> <div>Inner Content</div> </custom-component>`\n */\n protected _markup!: string\n /**\n * The scope associated with this node\n * uses to store all nested fragments and entities like other AreNodes and Scene\n */\n protected _scope!: A_Scope\n\n /**\n * Actual node identifier. \n */\n get id(): string {\n return this.aseid.id;\n }\n /**\n * Actual node type. \n * By default it's a tag name\n */\n get type(): string {\n return this.aseid.entity;\n }\n /**\n * Content string defined for the node — the inner content between delimiters.\n * Example: `{{name}}`\n */\n get content(): string {\n return this._content;\n }\n /**\n * Markup string defined for the node\n * Example: `<custom-component :prop=\"value\"> <div>Inner Content</div> </custom-component>`\n */\n get markup(): string {\n return this._markup;\n }\n /**\n * The scope associated with this node\n * uses to store all nested fragments and entities like other AreNodes and Scene\n */\n get scope(): A_Scope {\n if (!this._scope) {\n this._scope = A_Context.allocate(this, new A_Scope({ name: `${this.aseid.id}-scope` }));\n }\n\n return this._scope;\n }\n /**\n * 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.\n */\n get attributes(): AreAttribute[] {\n return this.scope.resolveFlatAll<AreAttribute>(AreAttribute);\n }\n /**\n * 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.\n * \n * 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.\n * \n * [!] 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.\n */\n get component(): Are | undefined {\n return this.scope.resolve<Are>(A_FormatterHelper.toPascalCase(this.aseid.entity)) as Are | undefined;\n }\n /**\n * 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.\n * \n * 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.\n */\n get parent(): AreNode | undefined {\n const parentIssuer = this.scope.parent?.issuer();\n\n if (!parentIssuer || !(parentIssuer instanceof AreNode)) return undefined;\n\n return parentIssuer as AreNode | undefined;\n }\n /**\n * 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.\n * \n * 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.\n */\n get children(): (AreNode)[] {\n return this.scope.resolveFlatAll<AreNode>(AreNode) || [];\n }\n /**\n * It returns the scene where the node exists, so it should be the scene of the rootNode, \n * primary parent of this node.\n */\n get scene(): AreScene {\n if (!this._scene)\n this._scene = this.scope.resolve<AreScene>(AreScene)!;\n return this._scene;\n }\n\n\n protected _scene!: AreScene;\n\n\n fromNew(newEntity: AreNodeNewProps): void {\n this.aseid = this.generateASEID({\n id: newEntity.payload?.id,\n entity: newEntity.payload?.entity || 'node',\n scope: newEntity.payload?.scope,\n });\n\n this.status = AreNodeStatuses.Pending;\n this._content = newEntity.content || '';\n this._markup = newEntity.raw || '';\n this._opening = newEntity.opening || '';\n this._closing = newEntity.closing || '';\n this._position = newEntity.position || 0;\n this._payload = newEntity.payload;\n }\n\n\n fromASEID(aseid: string | ASEID): void {\n super.fromASEID(aseid);\n\n this._content = '';\n this._markup = '';\n this.status = AreNodeStatuses.Pending;\n }\n /**\n * Sets the content string for the node — the inner text/markup between the node's\n * opening and closing delimiters. Content is processed by the rendering engine to\n * generate the corresponding SceneInstructions for rendering the node.\n * \n * @param content \n */\n setContent(content: string): void {\n this._content = content;\n }\n /**\n * 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.\n * \n * @param markup \n */\n setMarkup(markup: string): void {\n this._markup = markup;\n }\n /**\n * Adds a child node to the current node's scope and ensures the child inherits from this node's scope.\n * \n * @param child - The node to add as a child\n */\n addChild(child: AreNode): void {\n this.scope.register(child);\n\n if (!child.scope.isInheritedFrom(this.scope))\n child.scope.inherit(this.scope);\n }\n /**\n * 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.\n * \n * @param node - The child node to be removed from the current node's scope\n */\n removeChild(node: AreNode): void {\n this.scope.deregister(node);\n }\n\n // ============================================================================================\n // Node Lifecycle Methods\n // ============================================================================================\n /**\n * 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.\n */\n init(): void {\n\n // const context = this.scope.resolve(AreContext);\n\n // context?.startPerformance('Node Init');\n this.call(AreNodeFeatures.onBeforeInit, this.scope);\n this.call(AreNodeFeatures.onInit, this.scope);\n this.call(AreNodeFeatures.onAfterInit, this.scope);\n // context?.endPerformance('Node Init');\n }\n\n\n /**\n * 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.\n */\n async load(): Promise<any> {\n this.checkScopeInheritance();\n try {\n const context = this.scope.resolve(AreContext);\n\n context?.startPerformance('Node Load');\n\n const res = super.load(this.scope);\n\n context?.endPerformance('Node Load');\n\n return res;\n } catch (error) {\n throw error;\n }\n }\n /**\n * 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.\n */\n tokenize(): void {\n this.checkScopeInheritance();\n try {\n const context = this.scope.resolve(AreContext);\n\n context?.startPerformance('Node Tokenize');\n this.call(AreNodeFeatures.onTokenize, this.scope);\n context?.endPerformance('Node Tokenize');\n\n } catch (error) {\n throw error;\n }\n }\n /**\n * 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.\n */\n transform(): void {\n this.checkScopeInheritance();\n try {\n const context = this.scope.resolve(AreContext);\n\n context?.startPerformance('Node Transform');\n\n this.call(AreNodeFeatures.onTransform, this.scope);\n\n context?.endPerformance('Node Transform');\n } catch (error) {\n throw error;\n }\n }\n\n /**\n * 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.\n * \n * [!] 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.\n */\n compile(): void {\n this.checkScopeInheritance();\n\n try {\n const context = this.scope.resolve(AreContext);\n\n context?.startPerformance('Node Compile');\n\n this.call(AreNodeFeatures.onCompile, this.scope);\n\n context?.endPerformance('Node Compile');\n } catch (error) {\n throw error;\n }\n }\n /**\n * 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.\n * \n * [!] 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.\n */\n mount(): void {\n\n this.checkScopeInheritance();\n\n try {\n const context = this.scope.resolve(AreContext);\n\n context?.startPerformance('Node Mount');\n\n this.call(AreNodeFeatures.onBeforeMount, this.scope);\n this.call(AreNodeFeatures.onMount, this.scope);\n this.call(AreNodeFeatures.onAfterMount, this.scope);\n\n context?.endPerformance('Node Mount');\n\n } catch (error) {\n throw error;\n }\n }\n /**\n * 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.\n * \n * [!] Note: The interpret method should NOT go though own child, since it may be used by both mount and update operations!\n */\n interpret(): void {\n this.checkScopeInheritance();\n\n try {\n const context = this.scope.resolve(AreContext);\n\n context?.startPerformance('Node Interpret');\n\n this.call(AreNodeFeatures.onInterpret, this.scope);\n\n context?.endPerformance('Node Interpret');\n\n } catch (error) {\n throw error;\n }\n }\n /**\n * 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.\n * \n * [!] 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.\n */\n update(): void {\n\n this.checkScopeInheritance();\n\n try {\n const context = this.scope.resolve(AreContext);\n\n context?.startPerformance('Node Update');\n this.call(AreNodeFeatures.onBeforeUpdate, this.scope);\n this.call(AreNodeFeatures.onUpdate, this.scope);\n this.call(AreNodeFeatures.onAfterUpdate, this.scope);\n\n context?.endPerformance('Node Update');\n\n } catch (error) {\n throw error;\n }\n }\n /**\n * 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.\n * \n * [!] 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.\n */\n unmount(): void {\n\n this.checkScopeInheritance();\n\n try {\n const context = this.scope.resolve(AreContext);\n\n context?.startPerformance('Node Unmount');\n\n this.call(AreNodeFeatures.onBeforeUnmount, this.scope);\n this.call(AreNodeFeatures.onUnmount, this.scope); \n this.call(AreNodeFeatures.onAfterUnmount, this.scope);\n\n context?.endPerformance('Node Unmount');\n\n } catch (error) {\n throw error;\n }\n }\n\n cloneWithScope<T extends AreNode = AreNode>(this: T): T {\n const currentScope = this.scope;\n\n A_Context.deallocate(currentScope);\n\n const newNode = new (this.constructor as new (props: AreNodeNewProps) => T)({\n opening: this._opening,\n closing: this._closing,\n position: this._position,\n payload: this._payload || {},\n content: this._content,\n raw: this._markup,\n });\n\n if (newNode._scope)\n A_Context.deallocate(newNode._scope);\n\n newNode._scope = currentScope;\n\n A_Context.allocate(newNode, currentScope);\n\n this._scope = A_Context.allocate(this);\n\n return newNode as T;\n }\n\n reset(): void {\n for (const child of this.children) {\n this.scope.deregister(child);\n }\n\n for (const attribute of this.attributes) {\n this.scope.deregister(attribute);\n }\n }\n\n clone<T extends AreNode = AreNode>(this: T): T {\n const newNode = new (this.constructor as new (props: AreNodeNewProps) => T)({\n opening: this._opening,\n closing: this._closing,\n position: this._position,\n payload: this._payload || {},\n content: this._content,\n raw: this._markup,\n });\n\n /**\n * Clone all content\n */\n for (const child of this.children) {\n newNode.addChild(child.clone());\n }\n /**\n * Clone all attributes\n */\n for (const attribute of this.attributes) {\n newNode.scope.register(attribute.clone());\n }\n\n return newNode as T;\n }\n\n /**\n * 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.\n * \n * @param scope - The scope or event to be emitted to the node\n */\n async emit(\n scope: A_Scope,\n )\n async emit(\n event: AreEvent,\n )\n async emit(\n eventOrScope: AreEvent | A_Scope,\n ) {\n this.checkScopeInheritance();\n\n /**\n * isolated event scope to avoid polluting the node scope\n */\n const eventScope = A_TypeGuards.isScopeInstance(eventOrScope)\n ? eventOrScope\n .inherit(this.scope)\n : new A_Scope({\n name: `${eventOrScope.name}-scope`,\n fragments: [eventOrScope]\n })\n .inherit(this.scope)\n\n try {\n await this.call(AreNodeFeatures.onEmit, eventScope)\n\n eventScope.destroy()\n\n } catch (error) {\n eventScope.destroy();\n\n throw error;\n }\n\n }\n\n\n /**\n * 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.\n * \n * [!] 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.\n */\n async destroy(): Promise<any> {\n this.checkScopeInheritance();\n try {\n\n await super.destroy(this.scope);\n\n this.scope.destroy();\n\n } catch (error) {\n\n this._scope.destroy();\n\n throw error;\n }\n }\n\n\n //============================================================================================\n // Helpers Methods\n //============================================================================================\n /**\n * Method to ensure that the current scope is inherited from the context scope\n * \n * @throws A_Error if the scope is not inherited from the context scope\n */\n protected checkScopeInheritance(): void {\n let attachedScope: A_Scope;\n\n try {\n attachedScope = A_Context.scope(this);\n } catch (error) {\n throw new A_Error({\n title: `A_UI_Node Scope Inheritance Error`,\n description: `The A_UI_Node entity with ASEID '${this.aseid.toString()}' is not bound to any context scope. Please ensure that the entity is created within a valid context.`,\n originalError: error\n });\n }\n }\n}"]}
|
|
@@ -1,118 +1,350 @@
|
|
|
1
1
|
import { __decorateClass } from '../../chunk-EQQGB2QZ.mjs';
|
|
2
|
-
import { A_Entity, A_Scope,
|
|
3
|
-
import { AreNodeFeatures } from './AreNode.constants';
|
|
4
|
-
import { AreScene } from '@adaas/are/scene';
|
|
2
|
+
import { A_Entity, A_Context, A_Scope, A_FormatterHelper, A_TypeGuards, A_Error } from '@adaas/a-concept';
|
|
5
3
|
import { A_Frame } from '@adaas/a-frame';
|
|
4
|
+
import { AreScene } from '@adaas/are/scene/AreScene.context';
|
|
5
|
+
import { AreAttribute } from '@adaas/are/attribute/AreAttribute.entity';
|
|
6
|
+
import { AreNodeStatuses, AreNodeFeatures } from './AreNode.constants';
|
|
7
|
+
import { AreContext } from '@adaas/are/component/Are.context';
|
|
6
8
|
|
|
7
9
|
let AreNode = class extends A_Entity {
|
|
10
|
+
/**
|
|
11
|
+
* Actual node identifier.
|
|
12
|
+
*/
|
|
8
13
|
get id() {
|
|
9
14
|
return this.aseid.id;
|
|
10
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Actual node type.
|
|
18
|
+
* By default it's a tag name
|
|
19
|
+
*/
|
|
20
|
+
get type() {
|
|
21
|
+
return this.aseid.entity;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Content string defined for the node — the inner content between delimiters.
|
|
25
|
+
* Example: `{{name}}`
|
|
26
|
+
*/
|
|
27
|
+
get content() {
|
|
28
|
+
return this._content;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Markup string defined for the node
|
|
32
|
+
* Example: `<custom-component :prop="value"> <div>Inner Content</div> </custom-component>`
|
|
33
|
+
*/
|
|
34
|
+
get markup() {
|
|
35
|
+
return this._markup;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The scope associated with this node
|
|
39
|
+
* uses to store all nested fragments and entities like other AreNodes and Scene
|
|
40
|
+
*/
|
|
11
41
|
get scope() {
|
|
12
42
|
if (!this._scope) {
|
|
13
|
-
this._scope = new A_Scope({
|
|
14
|
-
name: `${this.aseid.id}`
|
|
15
|
-
});
|
|
43
|
+
this._scope = A_Context.allocate(this, new A_Scope({ name: `${this.aseid.id}-scope` }));
|
|
16
44
|
}
|
|
17
45
|
return this._scope;
|
|
18
46
|
}
|
|
19
|
-
|
|
20
|
-
|
|
47
|
+
/**
|
|
48
|
+
* 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.
|
|
49
|
+
*/
|
|
50
|
+
get attributes() {
|
|
51
|
+
return this.scope.resolveFlatAll(AreAttribute);
|
|
21
52
|
}
|
|
22
|
-
|
|
23
|
-
|
|
53
|
+
/**
|
|
54
|
+
* 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.
|
|
55
|
+
*
|
|
56
|
+
* 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.
|
|
57
|
+
*
|
|
58
|
+
* [!] 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.
|
|
59
|
+
*/
|
|
60
|
+
get component() {
|
|
61
|
+
return this.scope.resolve(A_FormatterHelper.toPascalCase(this.aseid.entity));
|
|
24
62
|
}
|
|
25
|
-
|
|
26
|
-
|
|
63
|
+
/**
|
|
64
|
+
* 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.
|
|
65
|
+
*
|
|
66
|
+
* 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.
|
|
67
|
+
*/
|
|
68
|
+
get parent() {
|
|
69
|
+
const parentIssuer = this.scope.parent?.issuer();
|
|
70
|
+
if (!parentIssuer || !(parentIssuer instanceof AreNode)) return void 0;
|
|
71
|
+
return parentIssuer;
|
|
27
72
|
}
|
|
28
|
-
|
|
29
|
-
|
|
73
|
+
/**
|
|
74
|
+
* 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.
|
|
75
|
+
*
|
|
76
|
+
* 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.
|
|
77
|
+
*/
|
|
78
|
+
get children() {
|
|
79
|
+
return this.scope.resolveFlatAll(AreNode) || [];
|
|
30
80
|
}
|
|
31
|
-
|
|
32
|
-
|
|
81
|
+
/**
|
|
82
|
+
* It returns the scene where the node exists, so it should be the scene of the rootNode,
|
|
83
|
+
* primary parent of this node.
|
|
84
|
+
*/
|
|
85
|
+
get scene() {
|
|
86
|
+
if (!this._scene)
|
|
87
|
+
this._scene = this.scope.resolve(AreScene);
|
|
88
|
+
return this._scene;
|
|
33
89
|
}
|
|
34
90
|
fromNew(newEntity) {
|
|
35
91
|
this.aseid = this.generateASEID({
|
|
36
|
-
id: newEntity.id,
|
|
37
|
-
entity: newEntity.
|
|
38
|
-
scope: newEntity.scope
|
|
92
|
+
id: newEntity.payload?.id,
|
|
93
|
+
entity: newEntity.payload?.entity || "node",
|
|
94
|
+
scope: newEntity.payload?.scope
|
|
39
95
|
});
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
42
|
-
this.
|
|
96
|
+
this.status = AreNodeStatuses.Pending;
|
|
97
|
+
this._content = newEntity.content || "";
|
|
98
|
+
this._markup = newEntity.raw || "";
|
|
99
|
+
this._opening = newEntity.opening || "";
|
|
100
|
+
this._closing = newEntity.closing || "";
|
|
101
|
+
this._position = newEntity.position || 0;
|
|
102
|
+
this._payload = newEntity.payload;
|
|
43
103
|
}
|
|
44
104
|
fromASEID(aseid) {
|
|
45
105
|
super.fromASEID(aseid);
|
|
46
|
-
this.
|
|
106
|
+
this._content = "";
|
|
47
107
|
this._markup = "";
|
|
48
|
-
this.
|
|
108
|
+
this.status = AreNodeStatuses.Pending;
|
|
49
109
|
}
|
|
50
|
-
|
|
51
|
-
|
|
110
|
+
/**
|
|
111
|
+
* Sets the content string for the node — the inner text/markup between the node's
|
|
112
|
+
* opening and closing delimiters. Content is processed by the rendering engine to
|
|
113
|
+
* generate the corresponding SceneInstructions for rendering the node.
|
|
114
|
+
*
|
|
115
|
+
* @param content
|
|
116
|
+
*/
|
|
117
|
+
setContent(content) {
|
|
118
|
+
this._content = content;
|
|
52
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* 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.
|
|
122
|
+
*
|
|
123
|
+
* @param markup
|
|
124
|
+
*/
|
|
53
125
|
setMarkup(markup) {
|
|
54
126
|
this._markup = markup;
|
|
55
127
|
}
|
|
56
|
-
|
|
57
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Adds a child node to the current node's scope and ensures the child inherits from this node's scope.
|
|
130
|
+
*
|
|
131
|
+
* @param child - The node to add as a child
|
|
132
|
+
*/
|
|
133
|
+
addChild(child) {
|
|
134
|
+
this.scope.register(child);
|
|
135
|
+
if (!child.scope.isInheritedFrom(this.scope))
|
|
136
|
+
child.scope.inherit(this.scope);
|
|
58
137
|
}
|
|
59
|
-
|
|
138
|
+
/**
|
|
139
|
+
* 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.
|
|
140
|
+
*
|
|
141
|
+
* @param node - The child node to be removed from the current node's scope
|
|
142
|
+
*/
|
|
143
|
+
removeChild(node) {
|
|
144
|
+
this.scope.deregister(node);
|
|
145
|
+
}
|
|
146
|
+
// ============================================================================================
|
|
147
|
+
// Node Lifecycle Methods
|
|
148
|
+
// ============================================================================================
|
|
149
|
+
/**
|
|
150
|
+
* 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.
|
|
151
|
+
*/
|
|
152
|
+
init() {
|
|
153
|
+
this.call(AreNodeFeatures.onBeforeInit, this.scope);
|
|
154
|
+
this.call(AreNodeFeatures.onInit, this.scope);
|
|
155
|
+
this.call(AreNodeFeatures.onAfterInit, this.scope);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* 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.
|
|
159
|
+
*/
|
|
160
|
+
async load() {
|
|
60
161
|
this.checkScopeInheritance();
|
|
61
|
-
const eventScope = A_TypeGuards.isScopeInstance(eventOrScope) ? eventOrScope.inherit(this.scope) : new A_Scope({
|
|
62
|
-
name: `${eventOrScope.name}-scope`,
|
|
63
|
-
fragments: [eventOrScope]
|
|
64
|
-
}).inherit(this.scope);
|
|
65
162
|
try {
|
|
66
|
-
|
|
67
|
-
|
|
163
|
+
const context = this.scope.resolve(AreContext);
|
|
164
|
+
context?.startPerformance("Node Load");
|
|
165
|
+
const res = super.load(this.scope);
|
|
166
|
+
context?.endPerformance("Node Load");
|
|
167
|
+
return res;
|
|
168
|
+
} catch (error) {
|
|
169
|
+
throw error;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* 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.
|
|
174
|
+
*/
|
|
175
|
+
tokenize() {
|
|
176
|
+
this.checkScopeInheritance();
|
|
177
|
+
try {
|
|
178
|
+
const context = this.scope.resolve(AreContext);
|
|
179
|
+
context?.startPerformance("Node Tokenize");
|
|
180
|
+
this.call(AreNodeFeatures.onTokenize, this.scope);
|
|
181
|
+
context?.endPerformance("Node Tokenize");
|
|
182
|
+
} catch (error) {
|
|
183
|
+
throw error;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* 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.
|
|
188
|
+
*/
|
|
189
|
+
transform() {
|
|
190
|
+
this.checkScopeInheritance();
|
|
191
|
+
try {
|
|
192
|
+
const context = this.scope.resolve(AreContext);
|
|
193
|
+
context?.startPerformance("Node Transform");
|
|
194
|
+
this.call(AreNodeFeatures.onTransform, this.scope);
|
|
195
|
+
context?.endPerformance("Node Transform");
|
|
68
196
|
} catch (error) {
|
|
69
|
-
eventScope.destroy();
|
|
70
197
|
throw error;
|
|
71
198
|
}
|
|
72
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* 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.
|
|
202
|
+
*
|
|
203
|
+
* [!] 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.
|
|
204
|
+
*/
|
|
73
205
|
compile() {
|
|
74
206
|
this.checkScopeInheritance();
|
|
75
207
|
try {
|
|
208
|
+
const context = this.scope.resolve(AreContext);
|
|
209
|
+
context?.startPerformance("Node Compile");
|
|
76
210
|
this.call(AreNodeFeatures.onCompile, this.scope);
|
|
211
|
+
context?.endPerformance("Node Compile");
|
|
77
212
|
} catch (error) {
|
|
78
213
|
throw error;
|
|
79
214
|
}
|
|
80
215
|
}
|
|
81
|
-
|
|
216
|
+
/**
|
|
217
|
+
* 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.
|
|
218
|
+
*
|
|
219
|
+
* [!] 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.
|
|
220
|
+
*/
|
|
221
|
+
mount() {
|
|
82
222
|
this.checkScopeInheritance();
|
|
83
223
|
try {
|
|
84
|
-
|
|
224
|
+
const context = this.scope.resolve(AreContext);
|
|
225
|
+
context?.startPerformance("Node Mount");
|
|
226
|
+
this.call(AreNodeFeatures.onBeforeMount, this.scope);
|
|
227
|
+
this.call(AreNodeFeatures.onMount, this.scope);
|
|
228
|
+
this.call(AreNodeFeatures.onAfterMount, this.scope);
|
|
229
|
+
context?.endPerformance("Node Mount");
|
|
85
230
|
} catch (error) {
|
|
86
231
|
throw error;
|
|
87
232
|
}
|
|
88
233
|
}
|
|
89
|
-
|
|
234
|
+
/**
|
|
235
|
+
* 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.
|
|
236
|
+
*
|
|
237
|
+
* [!] Note: The interpret method should NOT go though own child, since it may be used by both mount and update operations!
|
|
238
|
+
*/
|
|
239
|
+
interpret() {
|
|
90
240
|
this.checkScopeInheritance();
|
|
91
241
|
try {
|
|
92
|
-
|
|
242
|
+
const context = this.scope.resolve(AreContext);
|
|
243
|
+
context?.startPerformance("Node Interpret");
|
|
244
|
+
this.call(AreNodeFeatures.onInterpret, this.scope);
|
|
245
|
+
context?.endPerformance("Node Interpret");
|
|
93
246
|
} catch (error) {
|
|
94
247
|
throw error;
|
|
95
248
|
}
|
|
96
249
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
250
|
+
/**
|
|
251
|
+
* 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.
|
|
252
|
+
*
|
|
253
|
+
* [!] 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.
|
|
254
|
+
*/
|
|
255
|
+
update() {
|
|
256
|
+
this.checkScopeInheritance();
|
|
257
|
+
try {
|
|
258
|
+
const context = this.scope.resolve(AreContext);
|
|
259
|
+
context?.startPerformance("Node Update");
|
|
260
|
+
this.call(AreNodeFeatures.onBeforeUpdate, this.scope);
|
|
261
|
+
this.call(AreNodeFeatures.onUpdate, this.scope);
|
|
262
|
+
this.call(AreNodeFeatures.onAfterUpdate, this.scope);
|
|
263
|
+
context?.endPerformance("Node Update");
|
|
264
|
+
} catch (error) {
|
|
265
|
+
throw error;
|
|
266
|
+
}
|
|
104
267
|
}
|
|
268
|
+
/**
|
|
269
|
+
* 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.
|
|
270
|
+
*
|
|
271
|
+
* [!] 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.
|
|
272
|
+
*/
|
|
105
273
|
unmount() {
|
|
106
274
|
this.checkScopeInheritance();
|
|
107
275
|
try {
|
|
276
|
+
const context = this.scope.resolve(AreContext);
|
|
277
|
+
context?.startPerformance("Node Unmount");
|
|
278
|
+
this.call(AreNodeFeatures.onBeforeUnmount, this.scope);
|
|
108
279
|
this.call(AreNodeFeatures.onUnmount, this.scope);
|
|
280
|
+
this.call(AreNodeFeatures.onAfterUnmount, this.scope);
|
|
281
|
+
context?.endPerformance("Node Unmount");
|
|
109
282
|
} catch (error) {
|
|
110
283
|
throw error;
|
|
111
284
|
}
|
|
112
285
|
}
|
|
113
|
-
|
|
114
|
-
|
|
286
|
+
cloneWithScope() {
|
|
287
|
+
const currentScope = this.scope;
|
|
288
|
+
A_Context.deallocate(currentScope);
|
|
289
|
+
const newNode = new this.constructor({
|
|
290
|
+
opening: this._opening,
|
|
291
|
+
closing: this._closing,
|
|
292
|
+
position: this._position,
|
|
293
|
+
payload: this._payload || {},
|
|
294
|
+
content: this._content,
|
|
295
|
+
raw: this._markup
|
|
296
|
+
});
|
|
297
|
+
if (newNode._scope)
|
|
298
|
+
A_Context.deallocate(newNode._scope);
|
|
299
|
+
newNode._scope = currentScope;
|
|
300
|
+
A_Context.allocate(newNode, currentScope);
|
|
301
|
+
this._scope = A_Context.allocate(this);
|
|
302
|
+
return newNode;
|
|
115
303
|
}
|
|
304
|
+
reset() {
|
|
305
|
+
for (const child of this.children) {
|
|
306
|
+
this.scope.deregister(child);
|
|
307
|
+
}
|
|
308
|
+
for (const attribute of this.attributes) {
|
|
309
|
+
this.scope.deregister(attribute);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
clone() {
|
|
313
|
+
const newNode = new this.constructor({
|
|
314
|
+
opening: this._opening,
|
|
315
|
+
closing: this._closing,
|
|
316
|
+
position: this._position,
|
|
317
|
+
payload: this._payload || {},
|
|
318
|
+
content: this._content,
|
|
319
|
+
raw: this._markup
|
|
320
|
+
});
|
|
321
|
+
for (const child of this.children) {
|
|
322
|
+
newNode.addChild(child.clone());
|
|
323
|
+
}
|
|
324
|
+
for (const attribute of this.attributes) {
|
|
325
|
+
newNode.scope.register(attribute.clone());
|
|
326
|
+
}
|
|
327
|
+
return newNode;
|
|
328
|
+
}
|
|
329
|
+
async emit(eventOrScope) {
|
|
330
|
+
this.checkScopeInheritance();
|
|
331
|
+
const eventScope = A_TypeGuards.isScopeInstance(eventOrScope) ? eventOrScope.inherit(this.scope) : new A_Scope({
|
|
332
|
+
name: `${eventOrScope.name}-scope`,
|
|
333
|
+
fragments: [eventOrScope]
|
|
334
|
+
}).inherit(this.scope);
|
|
335
|
+
try {
|
|
336
|
+
await this.call(AreNodeFeatures.onEmit, eventScope);
|
|
337
|
+
eventScope.destroy();
|
|
338
|
+
} catch (error) {
|
|
339
|
+
eventScope.destroy();
|
|
340
|
+
throw error;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* 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.
|
|
345
|
+
*
|
|
346
|
+
* [!] 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.
|
|
347
|
+
*/
|
|
116
348
|
async destroy() {
|
|
117
349
|
this.checkScopeInheritance();
|
|
118
350
|
try {
|
|
@@ -148,7 +380,7 @@ AreNode = __decorateClass([
|
|
|
148
380
|
A_Frame.Entity({
|
|
149
381
|
namespace: "A-ARE",
|
|
150
382
|
name: "AreNode",
|
|
151
|
-
description: "An AreNode entity represents a node within the A-Concept Rendering Engine (ARE) framework. It encapsulates
|
|
383
|
+
description: "An AreNode entity represents a node within the A-Concept Rendering Engine (ARE) framework. It encapsulates content, markup, and styles, and manages its own scope for nested fragments and entities. AreNodes are responsible for handling events, compiling, rendering, updating, and lifecycle management within the ARE context."
|
|
152
384
|
})
|
|
153
385
|
], AreNode);
|
|
154
386
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/AreNode/AreNode.entity.ts"],"names":[],"mappings":";;;;;;AAcO,IAAM,OAAA,GAAN,cAAsB,QAAA,CAA0B;AAAA,EAqBnD,IAAI,EAAA,GAAa;AACb,IAAA,OAAO,KAAK,KAAA,CAAM,EAAA;AAAA,EACtB;AAAA,EAEA,IAAI,KAAA,GAAiB;AACjB,IAAA,IAAI,CAAC,KAAK,MAAA,EAAQ;AACd,MAAA,IAAA,CAAK,MAAA,GAAS,IAAI,OAAA,CAAQ;AAAA,QACtB,IAAA,EAAM,CAAA,EAAG,IAAA,CAAK,KAAA,CAAM,EAAE,CAAA;AAAA,OACzB,CAAA;AAAA,IACL;AAEA,IAAA,OAAO,IAAA,CAAK,MAAA;AAAA,EAChB;AAAA,EAEA,IAAI,OAAA,GAAoB;AACpB,IAAA,OAAO,IAAA,CAAK,KAAA,CAAM,WAAA,CAAsB,QAAQ,CAAA;AAAA,EACpD;AAAA,EAEA,IAAI,IAAA,GAAe;AACf,IAAA,OAAO,KAAK,KAAA,CAAM,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ACxC,SAAS,KAAA,EAAO;AACZ,MAAA,MAAM,IAAI,OAAA,CAAQ;AAAA,QACd,KAAA,EAAO,CAAA,iCAAA,CAAA;AAAA,QACP,WAAA,EAAa,CAAA,iCAAA,EAAoC,IAAA,CAAK,KAAA,CAAM,UAAU,CAAA,qGAAA,CAAA;AAAA,QACtE,aAAA,EAAe;AAAA,OAClB,CAAA;AAAA,IACL;AAAA,EACJ;AACJ;AA1Oa,OAAA,GAAN,eAAA,CAAA;AAAA,EALN,QAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,OAAA;AAAA,IACX,IAAA,EAAM,SAAA;AAAA,IACN,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACY,OAAA,CAAA","file":"AreNode.entity.mjs","sourcesContent":["import { A_Context, A_Entity, A_Error, A_FormatterHelper, A_IdentityHelper, A_Scope, A_TypeGuards, ASEID } from \"@adaas/a-concept\";\nimport { AreNodeNewProps } from \"./AreNode.types\";\nimport { AreEvent } from \"@adaas/are/event\";\nimport { AreNodeFeatures } from \"./AreNode.constants\";\nimport { AreScene } from \"@adaas/are/scene\";\nimport { A_Frame } from \"@adaas/a-frame\";\n\n\n\n@A_Frame.Entity({\n namespace: 'A-ARE',\n name: 'AreNode',\n description: 'An AreNode entity represents a node within the A-Concept Rendering Engine (ARE) framework. It encapsulates template, markup, and styles, and manages its own scope for nested fragments and entities. AreNodes are responsible for handling events, compiling, rendering, updating, and lifecycle management within the ARE context.'\n})\nexport class AreNode extends A_Entity<AreNodeNewProps> {\n /**\n * Template string defined for the node\n * Example: `<div>{{name}}</div>`\n */\n _template!: string\n /**\n * Markup string defined for the node\n * Example: `<custom-component :prop=\"value\"> <div>Inner Content</div> </custom-component>`\n */\n _markup!: string\n /**\n * Styles string defined for the node\n */\n _styles!: string\n /**\n * The scope associated with this node\n * uses to store all nested fragments and entities like other AreNodes and Scene\n */\n protected _scope!: A_Scope\n\n get id(): string {\n return this.aseid.id;\n }\n\n get scope(): A_Scope {\n if (!this._scope) {\n this._scope = new A_Scope({\n name: `${this.aseid.id}`,\n });\n }\n\n return this._scope;\n }\n\n get content(): AreScene {\n return this.scope.resolveFlat<AreScene>(AreScene)!;\n }\n\n get type(): string {\n return this.aseid.entity;\n }\n\n get template(): string {\n return this._template;\n }\n\n\n get markup(): string {\n return this._markup;\n }\n\n get styles(): string {\n return this._styles;\n }\n\n\n fromNew(newEntity: AreNodeNewProps): void {\n this.aseid = this.generateASEID({\n id: newEntity.id,\n entity: newEntity.component,\n scope: newEntity.scope,\n });\n\n this._template = newEntity.template || '';\n this._markup = newEntity.markup || '';\n this._styles = newEntity.styles || '';\n }\n\n\n fromASEID(aseid: string | ASEID): void {\n super.fromASEID(aseid);\n\n this._template = '';\n this._markup = '';\n this._styles = '';\n }\n\n\n setTemplate(template: string): void {\n this._template = template;\n }\n\n setMarkup(markup: string): void {\n this._markup = markup;\n }\n\n setStyles(styles: string): void {\n this._styles = styles;\n }\n\n\n\n async emit(\n scope: A_Scope,\n )\n async emit(\n event: AreEvent,\n )\n async emit(\n eventOrScope: AreEvent | A_Scope,\n ) {\n this.checkScopeInheritance();\n\n /**\n * isolated event scope to avoid polluting the node scope\n */\n const eventScope = A_TypeGuards.isScopeInstance(eventOrScope)\n ? eventOrScope\n .inherit(this.scope)\n : new A_Scope({\n name: `${eventOrScope.name}-scope`,\n fragments: [eventOrScope]\n })\n .inherit(this.scope)\n\n try {\n\n await this.call(AreNodeFeatures.onEvent, eventScope)\n\n eventScope.destroy()\n\n } catch (error) {\n\n eventScope.destroy();\n\n throw error;\n }\n\n }\n\n compile(): void {\n\n this.checkScopeInheritance();\n\n try {\n\n this.call(AreNodeFeatures.onCompile, this.scope);\n\n } catch (error) {\n throw error;\n }\n }\n\n render(): void {\n this.checkScopeInheritance();\n\n try {\n\n return this.call(AreNodeFeatures.onRender, this.scope);\n\n } catch (error) {\n throw error;\n }\n }\n\n\n async update(): Promise<void> {\n\n this.checkScopeInheritance();\n\n try {\n await this.call(AreNodeFeatures.onUpdate, this.scope);\n\n } catch (error) {\n throw error;\n }\n }\n\n\n async reset(): Promise<void> {\n this.scope.destroy();\n\n this._template = '';\n this._styles = '';\n\n this._scope = new A_Scope({\n name: `${this.aseid.id}`,\n });\n }\n\n unmount(): void {\n this.checkScopeInheritance();\n\n try {\n this.call(AreNodeFeatures.onUnmount, this.scope);\n } catch (error) {\n throw error;\n }\n }\n\n\n async load(): Promise<any> {\n return await super.load(this.scope);\n }\n\n async destroy(): Promise<any> {\n this.checkScopeInheritance();\n try {\n\n await super.destroy(this.scope);\n\n this.scope.destroy();\n\n } catch (error) {\n\n this._scope.destroy();\n\n throw error;\n }\n }\n\n\n //============================================================================================\n // Helpers Methods\n //============================================================================================\n /**\n * Method to ensure that the current scope is inherited from the context scope\n * \n * @throws A_Error if the scope is not inherited from the context scope\n */\n protected checkScopeInheritance(): void {\n let attachedScope: A_Scope;\n\n try {\n attachedScope = A_Context.scope(this);\n } catch (error) {\n throw new A_Error({\n title: `A_UI_Node Scope Inheritance Error`,\n description: `The A_UI_Node entity with ASEID '${this.aseid.toString()}' is not bound to any context scope. Please ensure that the entity is created within a valid context.`,\n originalError: error\n });\n }\n }\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/AreNode/AreNode.entity.ts"],"names":[],"mappings":";;;;;;;;AAkBO,IAAM,OAAA,GAAN,cAAsB,QAAA,CAA0B;AAAA;AAAA;AAAA;AAAA,EAyCnD,IAAI,EAAA,GAAa;AACb,IAAA,OAAO,KAAK,KAAA,CAAM,EAAA;AAAA,EACtB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,IAAA,GAAe;AACf,IAAA,OAAO,KAAK,KAAA,CAAM,MAAA;AAAA,EACtB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,OAAA,GAAkB;AAClB,IAAA,OAAO,IAAA,CAAK,QAAA;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,MAAA,GAAiB;AACjB,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,CAAK,OAAO,OAAA,EAAQ;AAEpB,MAAA,MAAM,KAAA;AAAA,IACV;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWU,qBAAA,GAA8B;AACpC,IAAA,IAAI,aAAA;AAEJ,IAAA,IAAI;AACA,MAAA,aAAA,GAAgB,SAAA,CAAU,MAAM,IAAI,CAAA;AAAA,IACxC,SAAS,KAAA,EAAO;AACZ,MAAA,MAAM,IAAI,OAAA,CAAQ;AAAA,QACd,KAAA,EAAO,CAAA,iCAAA,CAAA;AAAA,QACP,WAAA,EAAa,CAAA,iCAAA,EAAoC,IAAA,CAAK,KAAA,CAAM,UAAU,CAAA,qGAAA,CAAA;AAAA,QACtE,aAAA,EAAe;AAAA,OAClB,CAAA;AAAA,IACL;AAAA,EACJ;AACJ;AAvgBa,OAAA,GAAN,eAAA,CAAA;AAAA,EALN,QAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,OAAA;AAAA,IACX,IAAA,EAAM,SAAA;AAAA,IACN,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACY,OAAA,CAAA","file":"AreNode.entity.mjs","sourcesContent":["import { A_Context, A_Entity, A_Error, A_Feature, A_FormatterHelper, A_Scope, A_TypeGuards, ASEID } from \"@adaas/a-concept\";\nimport { A_Frame } from \"@adaas/a-frame\";\nimport { AreEvent } from \"@adaas/are/event/AreEvent.context\";\nimport { AreScene } from \"@adaas/are/scene/AreScene.context\";\nimport { AreAttribute } from \"@adaas/are/attribute/AreAttribute.entity\";\nimport { Are } from \"@adaas/are/component/Are.component\";\nimport { AreNodeFeatures, AreNodeStatuses } from \"./AreNode.constants\";\nimport { AreNodeNewProps, AreNodeStatusNames } from \"./AreNode.types\";\nimport { AreSyntaxTokenPayload } from \"@adaas/are/syntax/AreSyntax.types\";\nimport { A_Logger } from \"@adaas/a-utils/a-logger\";\nimport { AreContext } from \"@adaas/are/component/Are.context\";\n\n\n@A_Frame.Entity({\n namespace: 'A-ARE',\n name: 'AreNode',\n description: 'An AreNode entity represents a node within the A-Concept Rendering Engine (ARE) framework. It encapsulates content, markup, and styles, and manages its own scope for nested fragments and entities. AreNodes are responsible for handling events, compiling, rendering, updating, and lifecycle management within the ARE context.'\n})\nexport class AreNode extends A_Entity<AreNodeNewProps> {\n /**\n * The current status of the node, which can be used to track the lifecycle and rendering state of the node within the scene. \n */\n status!: AreNodeStatusNames;\n\n /**\n * 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.\n */\n protected _opening!: string;\n /**\n * 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.\n */\n protected _closing!: string;\n /**\n * 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.\n */\n protected _position!: number;\n /**\n * 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.\n */\n protected _payload?: AreSyntaxTokenPayload\n /**\n * Content string defined for the node — the inner content between delimiters.\n * Example: `{{name}}`\n */\n protected _content!: string\n /**\n * Markup string defined for the node\n * Example: `<custom-component :prop=\"value\"> <div>Inner Content</div> </custom-component>`\n */\n protected _markup!: string\n /**\n * The scope associated with this node\n * uses to store all nested fragments and entities like other AreNodes and Scene\n */\n protected _scope!: A_Scope\n\n /**\n * Actual node identifier. \n */\n get id(): string {\n return this.aseid.id;\n }\n /**\n * Actual node type. \n * By default it's a tag name\n */\n get type(): string {\n return this.aseid.entity;\n }\n /**\n * Content string defined for the node — the inner content between delimiters.\n * Example: `{{name}}`\n */\n get content(): string {\n return this._content;\n }\n /**\n * Markup string defined for the node\n * Example: `<custom-component :prop=\"value\"> <div>Inner Content</div> </custom-component>`\n */\n get markup(): string {\n return this._markup;\n }\n /**\n * The scope associated with this node\n * uses to store all nested fragments and entities like other AreNodes and Scene\n */\n get scope(): A_Scope {\n if (!this._scope) {\n this._scope = A_Context.allocate(this, new A_Scope({ name: `${this.aseid.id}-scope` }));\n }\n\n return this._scope;\n }\n /**\n * 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.\n */\n get attributes(): AreAttribute[] {\n return this.scope.resolveFlatAll<AreAttribute>(AreAttribute);\n }\n /**\n * 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.\n * \n * 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.\n * \n * [!] 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.\n */\n get component(): Are | undefined {\n return this.scope.resolve<Are>(A_FormatterHelper.toPascalCase(this.aseid.entity)) as Are | undefined;\n }\n /**\n * 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.\n * \n * 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.\n */\n get parent(): AreNode | undefined {\n const parentIssuer = this.scope.parent?.issuer();\n\n if (!parentIssuer || !(parentIssuer instanceof AreNode)) return undefined;\n\n return parentIssuer as AreNode | undefined;\n }\n /**\n * 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.\n * \n * 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.\n */\n get children(): (AreNode)[] {\n return this.scope.resolveFlatAll<AreNode>(AreNode) || [];\n }\n /**\n * It returns the scene where the node exists, so it should be the scene of the rootNode, \n * primary parent of this node.\n */\n get scene(): AreScene {\n if (!this._scene)\n this._scene = this.scope.resolve<AreScene>(AreScene)!;\n return this._scene;\n }\n\n\n protected _scene!: AreScene;\n\n\n fromNew(newEntity: AreNodeNewProps): void {\n this.aseid = this.generateASEID({\n id: newEntity.payload?.id,\n entity: newEntity.payload?.entity || 'node',\n scope: newEntity.payload?.scope,\n });\n\n this.status = AreNodeStatuses.Pending;\n this._content = newEntity.content || '';\n this._markup = newEntity.raw || '';\n this._opening = newEntity.opening || '';\n this._closing = newEntity.closing || '';\n this._position = newEntity.position || 0;\n this._payload = newEntity.payload;\n }\n\n\n fromASEID(aseid: string | ASEID): void {\n super.fromASEID(aseid);\n\n this._content = '';\n this._markup = '';\n this.status = AreNodeStatuses.Pending;\n }\n /**\n * Sets the content string for the node — the inner text/markup between the node's\n * opening and closing delimiters. Content is processed by the rendering engine to\n * generate the corresponding SceneInstructions for rendering the node.\n * \n * @param content \n */\n setContent(content: string): void {\n this._content = content;\n }\n /**\n * 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.\n * \n * @param markup \n */\n setMarkup(markup: string): void {\n this._markup = markup;\n }\n /**\n * Adds a child node to the current node's scope and ensures the child inherits from this node's scope.\n * \n * @param child - The node to add as a child\n */\n addChild(child: AreNode): void {\n this.scope.register(child);\n\n if (!child.scope.isInheritedFrom(this.scope))\n child.scope.inherit(this.scope);\n }\n /**\n * 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.\n * \n * @param node - The child node to be removed from the current node's scope\n */\n removeChild(node: AreNode): void {\n this.scope.deregister(node);\n }\n\n // ============================================================================================\n // Node Lifecycle Methods\n // ============================================================================================\n /**\n * 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.\n */\n init(): void {\n\n // const context = this.scope.resolve(AreContext);\n\n // context?.startPerformance('Node Init');\n this.call(AreNodeFeatures.onBeforeInit, this.scope);\n this.call(AreNodeFeatures.onInit, this.scope);\n this.call(AreNodeFeatures.onAfterInit, this.scope);\n // context?.endPerformance('Node Init');\n }\n\n\n /**\n * 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.\n */\n async load(): Promise<any> {\n this.checkScopeInheritance();\n try {\n const context = this.scope.resolve(AreContext);\n\n context?.startPerformance('Node Load');\n\n const res = super.load(this.scope);\n\n context?.endPerformance('Node Load');\n\n return res;\n } catch (error) {\n throw error;\n }\n }\n /**\n * 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.\n */\n tokenize(): void {\n this.checkScopeInheritance();\n try {\n const context = this.scope.resolve(AreContext);\n\n context?.startPerformance('Node Tokenize');\n this.call(AreNodeFeatures.onTokenize, this.scope);\n context?.endPerformance('Node Tokenize');\n\n } catch (error) {\n throw error;\n }\n }\n /**\n * 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.\n */\n transform(): void {\n this.checkScopeInheritance();\n try {\n const context = this.scope.resolve(AreContext);\n\n context?.startPerformance('Node Transform');\n\n this.call(AreNodeFeatures.onTransform, this.scope);\n\n context?.endPerformance('Node Transform');\n } catch (error) {\n throw error;\n }\n }\n\n /**\n * 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.\n * \n * [!] 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.\n */\n compile(): void {\n this.checkScopeInheritance();\n\n try {\n const context = this.scope.resolve(AreContext);\n\n context?.startPerformance('Node Compile');\n\n this.call(AreNodeFeatures.onCompile, this.scope);\n\n context?.endPerformance('Node Compile');\n } catch (error) {\n throw error;\n }\n }\n /**\n * 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.\n * \n * [!] 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.\n */\n mount(): void {\n\n this.checkScopeInheritance();\n\n try {\n const context = this.scope.resolve(AreContext);\n\n context?.startPerformance('Node Mount');\n\n this.call(AreNodeFeatures.onBeforeMount, this.scope);\n this.call(AreNodeFeatures.onMount, this.scope);\n this.call(AreNodeFeatures.onAfterMount, this.scope);\n\n context?.endPerformance('Node Mount');\n\n } catch (error) {\n throw error;\n }\n }\n /**\n * 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.\n * \n * [!] Note: The interpret method should NOT go though own child, since it may be used by both mount and update operations!\n */\n interpret(): void {\n this.checkScopeInheritance();\n\n try {\n const context = this.scope.resolve(AreContext);\n\n context?.startPerformance('Node Interpret');\n\n this.call(AreNodeFeatures.onInterpret, this.scope);\n\n context?.endPerformance('Node Interpret');\n\n } catch (error) {\n throw error;\n }\n }\n /**\n * 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.\n * \n * [!] 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.\n */\n update(): void {\n\n this.checkScopeInheritance();\n\n try {\n const context = this.scope.resolve(AreContext);\n\n context?.startPerformance('Node Update');\n this.call(AreNodeFeatures.onBeforeUpdate, this.scope);\n this.call(AreNodeFeatures.onUpdate, this.scope);\n this.call(AreNodeFeatures.onAfterUpdate, this.scope);\n\n context?.endPerformance('Node Update');\n\n } catch (error) {\n throw error;\n }\n }\n /**\n * 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.\n * \n * [!] 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.\n */\n unmount(): void {\n\n this.checkScopeInheritance();\n\n try {\n const context = this.scope.resolve(AreContext);\n\n context?.startPerformance('Node Unmount');\n\n this.call(AreNodeFeatures.onBeforeUnmount, this.scope);\n this.call(AreNodeFeatures.onUnmount, this.scope); \n this.call(AreNodeFeatures.onAfterUnmount, this.scope);\n\n context?.endPerformance('Node Unmount');\n\n } catch (error) {\n throw error;\n }\n }\n\n cloneWithScope<T extends AreNode = AreNode>(this: T): T {\n const currentScope = this.scope;\n\n A_Context.deallocate(currentScope);\n\n const newNode = new (this.constructor as new (props: AreNodeNewProps) => T)({\n opening: this._opening,\n closing: this._closing,\n position: this._position,\n payload: this._payload || {},\n content: this._content,\n raw: this._markup,\n });\n\n if (newNode._scope)\n A_Context.deallocate(newNode._scope);\n\n newNode._scope = currentScope;\n\n A_Context.allocate(newNode, currentScope);\n\n this._scope = A_Context.allocate(this);\n\n return newNode as T;\n }\n\n reset(): void {\n for (const child of this.children) {\n this.scope.deregister(child);\n }\n\n for (const attribute of this.attributes) {\n this.scope.deregister(attribute);\n }\n }\n\n clone<T extends AreNode = AreNode>(this: T): T {\n const newNode = new (this.constructor as new (props: AreNodeNewProps) => T)({\n opening: this._opening,\n closing: this._closing,\n position: this._position,\n payload: this._payload || {},\n content: this._content,\n raw: this._markup,\n });\n\n /**\n * Clone all content\n */\n for (const child of this.children) {\n newNode.addChild(child.clone());\n }\n /**\n * Clone all attributes\n */\n for (const attribute of this.attributes) {\n newNode.scope.register(attribute.clone());\n }\n\n return newNode as T;\n }\n\n /**\n * 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.\n * \n * @param scope - The scope or event to be emitted to the node\n */\n async emit(\n scope: A_Scope,\n )\n async emit(\n event: AreEvent,\n )\n async emit(\n eventOrScope: AreEvent | A_Scope,\n ) {\n this.checkScopeInheritance();\n\n /**\n * isolated event scope to avoid polluting the node scope\n */\n const eventScope = A_TypeGuards.isScopeInstance(eventOrScope)\n ? eventOrScope\n .inherit(this.scope)\n : new A_Scope({\n name: `${eventOrScope.name}-scope`,\n fragments: [eventOrScope]\n })\n .inherit(this.scope)\n\n try {\n await this.call(AreNodeFeatures.onEmit, eventScope)\n\n eventScope.destroy()\n\n } catch (error) {\n eventScope.destroy();\n\n throw error;\n }\n\n }\n\n\n /**\n * 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.\n * \n * [!] 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.\n */\n async destroy(): Promise<any> {\n this.checkScopeInheritance();\n try {\n\n await super.destroy(this.scope);\n\n this.scope.destroy();\n\n } catch (error) {\n\n this._scope.destroy();\n\n throw error;\n }\n }\n\n\n //============================================================================================\n // Helpers Methods\n //============================================================================================\n /**\n * Method to ensure that the current scope is inherited from the context scope\n * \n * @throws A_Error if the scope is not inherited from the context scope\n */\n protected checkScopeInheritance(): void {\n let attachedScope: A_Scope;\n\n try {\n attachedScope = A_Context.scope(this);\n } catch (error) {\n throw new A_Error({\n title: `A_UI_Node Scope Inheritance Error`,\n description: `The A_UI_Node entity with ASEID '${this.aseid.toString()}' is not bound to any context scope. Please ensure that the entity is created within a valid context.`,\n originalError: error\n });\n }\n }\n}"]}
|