@adaas/are-html 0.0.22 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.d.mts +194 -10
- package/dist/browser/index.mjs +696 -245
- package/dist/browser/index.mjs.map +1 -1
- package/dist/node/{AreBinding.attribute-doUvtOjc.d.mts → AreBinding.attribute-BWzEIw6H.d.mts} +45 -0
- package/dist/node/{AreBinding.attribute-Bm5LlOyE.d.ts → AreBinding.attribute-GpT-5Qmf.d.ts} +45 -0
- package/dist/node/attributes/AreBinding.attribute.d.mts +1 -1
- package/dist/node/attributes/AreBinding.attribute.d.ts +1 -1
- package/dist/node/attributes/AreDirective.attribute.d.mts +1 -1
- package/dist/node/attributes/AreDirective.attribute.d.ts +1 -1
- package/dist/node/attributes/AreEvent.attribute.d.mts +1 -1
- package/dist/node/attributes/AreEvent.attribute.d.ts +1 -1
- package/dist/node/attributes/AreStatic.attribute.d.mts +1 -1
- package/dist/node/attributes/AreStatic.attribute.d.ts +1 -1
- package/dist/node/directives/AreDirectiveFor.directive.d.mts +18 -1
- package/dist/node/directives/AreDirectiveFor.directive.d.ts +18 -1
- package/dist/node/directives/AreDirectiveFor.directive.js +57 -9
- package/dist/node/directives/AreDirectiveFor.directive.js.map +1 -1
- package/dist/node/directives/AreDirectiveFor.directive.mjs +57 -9
- package/dist/node/directives/AreDirectiveFor.directive.mjs.map +1 -1
- package/dist/node/directives/AreDirectiveIf.directive.d.mts +18 -2
- package/dist/node/directives/AreDirectiveIf.directive.d.ts +18 -2
- package/dist/node/directives/AreDirectiveIf.directive.js +29 -6
- package/dist/node/directives/AreDirectiveIf.directive.js.map +1 -1
- package/dist/node/directives/AreDirectiveIf.directive.mjs +29 -6
- package/dist/node/directives/AreDirectiveIf.directive.mjs.map +1 -1
- package/dist/node/directives/AreDirectiveShow.directive.d.mts +1 -1
- package/dist/node/directives/AreDirectiveShow.directive.d.ts +1 -1
- package/dist/node/engine/AreHTML.compiler.d.mts +4 -2
- package/dist/node/engine/AreHTML.compiler.d.ts +4 -2
- package/dist/node/engine/AreHTML.compiler.js +11 -4
- package/dist/node/engine/AreHTML.compiler.js.map +1 -1
- package/dist/node/engine/AreHTML.compiler.mjs +11 -4
- package/dist/node/engine/AreHTML.compiler.mjs.map +1 -1
- package/dist/node/engine/AreHTML.constants.d.mts +33 -1
- package/dist/node/engine/AreHTML.constants.d.ts +33 -1
- package/dist/node/engine/AreHTML.constants.js +166 -0
- package/dist/node/engine/AreHTML.constants.js.map +1 -1
- package/dist/node/engine/AreHTML.constants.mjs +165 -1
- package/dist/node/engine/AreHTML.constants.mjs.map +1 -1
- package/dist/node/engine/AreHTML.context.d.mts +66 -0
- package/dist/node/engine/AreHTML.context.d.ts +66 -0
- package/dist/node/engine/AreHTML.context.js +98 -0
- package/dist/node/engine/AreHTML.context.js.map +1 -1
- package/dist/node/engine/AreHTML.context.mjs +98 -0
- package/dist/node/engine/AreHTML.context.mjs.map +1 -1
- package/dist/node/engine/AreHTML.interpreter.d.mts +3 -0
- package/dist/node/engine/AreHTML.interpreter.d.ts +3 -0
- package/dist/node/engine/AreHTML.interpreter.js +66 -10
- package/dist/node/engine/AreHTML.interpreter.js.map +1 -1
- package/dist/node/engine/AreHTML.interpreter.mjs +66 -10
- package/dist/node/engine/AreHTML.interpreter.mjs.map +1 -1
- package/dist/node/engine/AreHTML.lifecycle.d.mts +1 -8
- package/dist/node/engine/AreHTML.lifecycle.d.ts +1 -8
- package/dist/node/engine/AreHTML.lifecycle.js +29 -44
- package/dist/node/engine/AreHTML.lifecycle.js.map +1 -1
- package/dist/node/engine/AreHTML.lifecycle.mjs +29 -44
- package/dist/node/engine/AreHTML.lifecycle.mjs.map +1 -1
- package/dist/node/engine/AreHTML.tokenizer.d.mts +1 -1
- package/dist/node/engine/AreHTML.tokenizer.d.ts +1 -1
- package/dist/node/engine/AreHTML.tokenizer.js +7 -1
- package/dist/node/engine/AreHTML.tokenizer.js.map +1 -1
- package/dist/node/engine/AreHTML.tokenizer.mjs +7 -1
- package/dist/node/engine/AreHTML.tokenizer.mjs.map +1 -1
- package/dist/node/engine/AreHTML.transformer.d.mts +1 -1
- package/dist/node/engine/AreHTML.transformer.d.ts +1 -1
- package/dist/node/index.d.mts +4 -3
- package/dist/node/index.d.ts +4 -3
- package/dist/node/index.js +7 -0
- package/dist/node/index.mjs +1 -0
- package/dist/node/instructions/AddStaticHTML.instruction.d.mts +8 -0
- package/dist/node/instructions/AddStaticHTML.instruction.d.ts +8 -0
- package/dist/node/instructions/AddStaticHTML.instruction.js +31 -0
- package/dist/node/instructions/AddStaticHTML.instruction.js.map +1 -0
- package/dist/node/instructions/AddStaticHTML.instruction.mjs +24 -0
- package/dist/node/instructions/AddStaticHTML.instruction.mjs.map +1 -0
- package/dist/node/instructions/AreHTML.instructions.constants.d.mts +1 -0
- package/dist/node/instructions/AreHTML.instructions.constants.d.ts +1 -0
- package/dist/node/instructions/AreHTML.instructions.constants.js +1 -0
- package/dist/node/instructions/AreHTML.instructions.constants.js.map +1 -1
- package/dist/node/instructions/AreHTML.instructions.constants.mjs +1 -0
- package/dist/node/instructions/AreHTML.instructions.constants.mjs.map +1 -1
- package/dist/node/instructions/AreHTML.instructions.types.d.mts +9 -1
- package/dist/node/instructions/AreHTML.instructions.types.d.ts +9 -1
- package/dist/node/lib/AreDirective/AreDirective.component.d.mts +1 -1
- package/dist/node/lib/AreDirective/AreDirective.component.d.ts +1 -1
- package/dist/node/lib/AreDirective/AreDirective.types.d.mts +1 -1
- package/dist/node/lib/AreDirective/AreDirective.types.d.ts +1 -1
- package/dist/node/lib/AreHTML/AreHTML.tokenizer.d.mts +1 -1
- package/dist/node/lib/AreHTML/AreHTML.tokenizer.d.ts +1 -1
- package/dist/node/lib/AreHTMLAttribute/AreHTML.attribute.d.mts +1 -1
- package/dist/node/lib/AreHTMLAttribute/AreHTML.attribute.d.ts +1 -1
- package/dist/node/lib/AreHTMLNode/AreHTMLNode.d.mts +1 -1
- package/dist/node/lib/AreHTMLNode/AreHTMLNode.d.ts +1 -1
- package/dist/node/lib/AreHTMLNode/AreHTMLNode.js +51 -0
- package/dist/node/lib/AreHTMLNode/AreHTMLNode.js.map +1 -1
- package/dist/node/lib/AreHTMLNode/AreHTMLNode.mjs +51 -0
- package/dist/node/lib/AreHTMLNode/AreHTMLNode.mjs.map +1 -1
- package/dist/node/lib/AreRoot/AreRoot.component.js.map +1 -1
- package/dist/node/lib/AreRoot/AreRoot.component.mjs.map +1 -1
- package/dist/node/nodes/AreComment.d.mts +1 -1
- package/dist/node/nodes/AreComment.d.ts +1 -1
- package/dist/node/nodes/AreComponent.d.mts +1 -1
- package/dist/node/nodes/AreComponent.d.ts +1 -1
- package/dist/node/nodes/AreInterpolation.d.mts +1 -1
- package/dist/node/nodes/AreInterpolation.d.ts +1 -1
- package/dist/node/nodes/AreRoot.d.mts +1 -1
- package/dist/node/nodes/AreRoot.d.ts +1 -1
- package/dist/node/nodes/AreText.d.mts +1 -1
- package/dist/node/nodes/AreText.d.ts +1 -1
- package/examples/dashboard/concept.ts +1 -1
- package/examples/dashboard/dist/index.html +1 -1
- package/examples/dashboard/dist/{mqh9ryml-xat335.js → mqiw5sqa-ypckmj.js} +403 -57
- package/examples/for-perf/dist/index.html +1 -1
- package/examples/for-perf/dist/{mqh9ryfo-6a8d0o.js → mqp8i2py-vltsx0.js} +3030 -2474
- package/examples/lazy-loading/README.md +76 -0
- package/examples/lazy-loading/concept.ts +55 -0
- package/examples/lazy-loading/containers/UI.container.ts +215 -0
- package/examples/lazy-loading/dist/app.js +3803 -0
- package/examples/{for-perf/dist/mqh9ryfq-4pf5cv.js → lazy-loading/dist/chunks/chunk-6K72IBO4.js} +2708 -5476
- package/examples/lazy-loading/dist/index.html +36 -0
- package/examples/lazy-loading/dist/lazy/about-page.js +59 -0
- package/examples/lazy-loading/dist/lazy/reports-page.js +65 -0
- package/examples/lazy-loading/dist/lazy/settings-page.js +54 -0
- package/examples/lazy-loading/public/index.html +36 -0
- package/examples/lazy-loading/src/components/AppShell.component.ts +44 -0
- package/examples/lazy-loading/src/components/HomePage.component.ts +59 -0
- package/examples/lazy-loading/src/components/LazyOutlet.component.ts +108 -0
- package/examples/lazy-loading/src/components/NavBar.component.ts +98 -0
- package/examples/lazy-loading/src/concept.ts +116 -0
- package/examples/lazy-loading/src/lazy/AboutPage.component.ts +54 -0
- package/examples/lazy-loading/src/lazy/ReportsPage.component.ts +56 -0
- package/examples/lazy-loading/src/lazy/SettingsPage.component.ts +45 -0
- package/examples/lazy-loading/src/runtime/ComponentManifest.fragment.ts +61 -0
- package/examples/lazy-loading/src/runtime/LazyComponentResolver.fragment.ts +77 -0
- package/examples/os-desktop/README.md +91 -0
- package/examples/os-desktop/concept.ts +54 -0
- package/examples/os-desktop/containers/OS.container.ts +198 -0
- package/examples/os-desktop/containers/apps/AppBackend.ts +29 -0
- package/examples/os-desktop/containers/apps/GanttApp.backend.ts +56 -0
- package/examples/os-desktop/containers/apps/MarketingApp.backend.ts +68 -0
- package/examples/os-desktop/dist/app.js +4410 -0
- package/examples/os-desktop/dist/apps/gantt/app.js +271 -0
- package/examples/os-desktop/dist/apps/marketing/app.js +346 -0
- package/examples/{for-perf/dist/mqh9ryde-m243t8.js → os-desktop/dist/chunks/chunk-6K72IBO4.js} +2708 -5476
- package/examples/os-desktop/dist/chunks/chunk-EIIGUL6N.js +30 -0
- package/examples/os-desktop/dist/chunks/chunk-WOH7L5UR.js +30 -0
- package/examples/os-desktop/dist/index.html +33 -0
- package/examples/os-desktop/public/index.html +33 -0
- package/examples/os-desktop/src/apps/gantt/GanttApp.component.ts +41 -0
- package/examples/os-desktop/src/apps/gantt/GanttChart.component.ts +126 -0
- package/examples/os-desktop/src/apps/gantt/GanttStore.ts +47 -0
- package/examples/os-desktop/src/apps/gantt/GanttToolbar.component.ts +73 -0
- package/examples/os-desktop/src/apps/gantt/index.ts +13 -0
- package/examples/os-desktop/src/apps/marketing/MarketingApp.component.ts +53 -0
- package/examples/os-desktop/src/apps/marketing/MarketingStore.ts +34 -0
- package/examples/os-desktop/src/apps/marketing/PostEditor.component.ts +153 -0
- package/examples/os-desktop/src/apps/marketing/PostPreview.component.ts +110 -0
- package/examples/os-desktop/src/apps/marketing/index.ts +16 -0
- package/examples/os-desktop/src/concept.ts +126 -0
- package/examples/os-desktop/src/os/AppStage.component.ts +112 -0
- package/examples/os-desktop/src/os/AppWindow.component.ts +102 -0
- package/examples/os-desktop/src/os/Desktop.component.ts +106 -0
- package/examples/os-desktop/src/os/Dock.component.ts +174 -0
- package/examples/os-desktop/src/os/Hud.component.ts +83 -0
- package/examples/os-desktop/src/os/Launchpad.component.ts +191 -0
- package/examples/os-desktop/src/os/MenuBar.component.ts +156 -0
- package/examples/os-desktop/src/runtime/AppComponentResolver.fragment.ts +121 -0
- package/examples/os-desktop/src/runtime/AppRegistry.fragment.ts +104 -0
- package/examples/os-desktop/src/signals/MouseState.signal.ts +34 -0
- package/examples/os-desktop/src/signals/OSRoute.signal.ts +37 -0
- package/examples/os-desktop/src/signals/SelectionState.signal.ts +34 -0
- package/examples/signal-routing/dist/index.html +1 -1
- package/examples/signal-routing/dist/{mqh9ryc9-dkcbkx.js → mqp8hgce-4d6rh0.js} +3196 -2640
- package/package.json +13 -9
- package/src/directives/AreDirectiveFor.directive.ts +99 -16
- package/src/directives/AreDirectiveIf.directive.ts +33 -4
- package/src/engine/AreHTML.compiler.ts +25 -2
- package/src/engine/AreHTML.constants.ts +142 -0
- package/src/engine/AreHTML.context.ts +112 -0
- package/src/engine/AreHTML.interpreter.ts +114 -13
- package/src/engine/AreHTML.lifecycle.ts +81 -74
- package/src/engine/AreHTML.tokenizer.ts +30 -1
- package/src/index.ts +1 -0
- package/src/instructions/AddStaticHTML.instruction.ts +23 -0
- package/src/instructions/AreHTML.instructions.constants.ts +1 -0
- package/src/instructions/AreHTML.instructions.types.ts +9 -0
- package/src/lib/AreHTMLNode/AreHTMLNode.ts +74 -0
- package/src/lib/AreRoot/AreRoot.component.ts +3 -3
- package/tests/PropPropagation.test.ts +181 -0
- package/tests/StaticIsland.test.ts +115 -0
- package/tests/jest.setup.ts +11 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/engine/AreHTML.lifecycle.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAmBO,IAAM,gBAAA,GAAN,cAA+B,YAAA,CAAa;AAAA,EAW/C,cACwB,IAAA,EACD,KAAA,EACa,OAAA,EACH,cAAA,EACT,WACjB,IAAA,EACC;AAEJ,IAAA,IAAI,IAAA,CAAK,SAAA;AACL,MAAA,cAAA,EAAgB,UAAU,IAAI,CAAA;AAElC,IAAA,KAAA,CAAM,KAAK,IAAA,EAAM,KAAA,EAAO,OAAA,EAAS,MAAA,EAAQ,GAAG,IAAI,CAAA;AAAA,EACpD;AAAA,EAIA,SACwB,IAAA,EACD,KAAA,EACa,OAAA,EACH,cAAA,EACT,WACjB,IAAA,EACC;AACJ,IAAA,cAAA,EAAgB,UAAU,IAAI,CAAA;AAC9B,IAAA,KAAA,CAAM,KAAK,IAAA,EAAM,KAAA,EAAO,OAAA,EAAS,MAAA,EAAQ,GAAG,IAAI,CAAA;AAAA,EACpD;AAAA,EAIA,QAAA,CACwB,IAAA,EACD,KAAA,EACa,OAAA,EACZ,WACjB,IAAA,EACC;AACJ,IAAA,MAAM,KAAA,GAAQ,IAAI,QAAA,CAAS,IAAA,CAAK,KAAK,CAAA;AAErC,IAAA,KAAA,CAAM,SAAS,KAAK,CAAA;AAAA,EACxB;AAAA,EAIA,iBAAA,CACwB,IAAA,EACD,KAAA,EACa,OAAA,EACZ,WACjB,IAAA,EACC;AACJ,IAAA,MAAM,KAAA,GAAQ,IAAI,QAAA,CAAS,IAAA,CAAK,KAAK,CAAA;AAErC,IAAA,KAAA,CAAM,SAAS,KAAK,CAAA;AAAA,EACxB;AAAA,EAMA,KAAA,CAIwB,IAAA,EAIA,KAAA,EAEA,MAAA,EAAA,GACjB,IAAA,EACiB;AAEpB,I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,CAAA;AAgBA,eAAA,CAAA;AAAA,EAJC,UAAU,MAAA,CAAO;AAAA,IACd,MAAM,eAAA,CAAgB,OAAA;AAAA,IACtB,KAAA,EAAO,CAAC,WAAW;AAAA,GACtB,CAAA;AAAA,EAKI,4BAAS,QAAQ,CAAA,CAAA;AAAA,EAIjB,4BAAS,QAAQ,CAAA,CAAA;AAAA,EAEjB,4BAAS,QAAQ,CAAA;AAAA,CAAA,EAlFb,gBAAA,CAwET,SAAA,EAAA,OAAA,EAAA,CAAA,CAAA;AA2GA,eAAA,CAAA;AAAA,EAJC,UAAU,MAAA,CAAO;AAAA,IACd,MAAM,oBAAA,CAAqB,MAAA;AAAA,IAC3B,KAAA,EAAO,CAAC,qBAAqB;AAAA,GAChC,CAAA;AAAA,EAEI,4BAAS,QAAQ,CAAA,CAAA;AAAA,EACjB,4BAAS,OAAO,CAAA,CAAA;AAAA,EAChB,4BAAS,SAAS,CAAA,CAAA;AAAA,EAClB,4BAAS,QAAQ,CAAA;AAAA,CAAA,EAvLb,gBAAA,CAmLT,SAAA,EAAA,0BAAA,EAAA,CAAA,CAAA;AAnLS,gBAAA,GAAN,eAAA,CAAA;AAAA,EAJN,QAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,YAAA;AAAA,IACX,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACY,gBAAA,CAAA","file":"AreHTML.lifecycle.mjs","sourcesContent":["import { A_Caller, A_Feature, A_FormatterHelper, A_Inject, A_Scope } from \"@adaas/a-concept\";\nimport { AreLifecycle, AreScene, AreAttributeFeatures, AreSignalsContext, AreNodeFeatures, AreFeatures } from \"@adaas/are\";\nimport { A_Logger } from \"@adaas/a-utils/a-logger\";\nimport { AreComponentNode } from \"@adaas/are-html/nodes/AreComponent\";\nimport { AreRootNode } from \"@adaas/are-html/nodes/AreRoot\";\nimport { AreInterpolation } from \"@adaas/are-html/nodes/AreInterpolation\";\nimport { AreText } from \"@adaas/are-html/nodes/AreText\";\nimport { AreDirectiveAttribute } from \"@adaas/are-html/attributes/AreDirective.attribute\";\nimport { AreDirectiveFeatures } from \"@adaas/are-html/directive/AreDirective.constants\";\nimport { AreHTMLEngineContext } from \"./AreHTML.context\";\nimport { AreHTMLNode } from \"../lib/AreHTMLNode/AreHTMLNode\";\nimport { A_Frame } from \"@adaas/a-frame/core\";\nimport { AreSchedulerHelper } from \"@adaas/are-html/helpers/AreScheduler.helper\";\n\n\n@A_Frame.Define({\n namespace: 'a-are-html',\n description: 'HTML-specific lifecycle handler extending AreLifecycle. Wires DOM-aware init hooks for component nodes, root nodes, interpolations, text nodes, and directive attributes to the ARE rendering pipeline, connecting each entity to its HTML engine context and priming the scene for subsequent compilation and interpretation.'\n})\nexport class AreHTMLLifecycle extends AreLifecycle {\n\n /**\n * Per-chunk time budget (ms) for the time-sliced initial mount walk. While\n * mounting a large subtree we keep applying nodes until this much wall-clock\n * time has elapsed, then yield to the browser so it can paint and process\n * input before the next chunk. ~16ms targets a single animation frame.\n */\n private static readonly MOUNT_BUDGET_MS = 16;\n\n @AreLifecycle.Init(AreComponentNode)\n initComponent(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n\n if (node.component)\n signalsContext?.subscribe(node);\n\n super.init(node, scope, context, logger, ...args);\n }\n\n\n @AreLifecycle.Init(AreRootNode)\n initRoot(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n signalsContext?.subscribe(node);\n super.init(node, scope, context, logger, ...args);\n }\n\n\n @AreLifecycle.Init(AreText)\n initText(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n const scene = new AreScene(node.aseid);\n\n scope.register(scene);\n }\n\n\n @AreLifecycle.Init(AreInterpolation)\n initInterpolation(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n const scene = new AreScene(node.aseid);\n\n scope.register(scene);\n }\n\n @A_Feature.Extend({\n name: AreNodeFeatures.onMount,\n scope: [AreHTMLNode]\n })\n mount(\n /**\n * Node to be mounted\n */\n @A_Inject(A_Caller) node: AreHTMLNode,\n /**\n * Node Content\n */\n @A_Inject(AreScene) scene: AreScene,\n\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void | Promise<void> {\n\n logger?.debug(`[Mount] Component Trigger for <${node.aseid.entity}> with aseid :{${node.aseid.toString()}}`);\n\n /**\n * Skip mounting nodes whose scene has been deactivated (e.g. $if template nodes\n * when the condition is false). Mirrors the guard in AreLifecycle.mount.\n */\n if (scene.isInactive) return;\n\n /**\n * 1. Render the root of this mount itself.\n */\n node.interpret();\n\n /**\n * 2. Walk the descendant subtree iteratively with an explicit enter/exit\n * stack so we can TIME-SLICE the work. The previous implementation\n * recursed via `child.mount()`, which fires onBeforeMount → onMount\n * (interpret + recurse) → onAfterMount per node and runs the whole tree\n * in one synchronous, un-yielding block. For large initial trees that\n * froze the main thread on first page load.\n *\n * We replicate the exact per-node hook ordering:\n * - enter → onBeforeMount, then (if active) interpret + queue children\n * - exit → onAfterMount (fires AFTER the node's whole subtree, i.e.\n * post-order, matching the recursive `node.mount()` contract)\n *\n * Small trees complete entirely within a single time budget and the\n * handler returns `void` synchronously — a true fast-path with NO\n * behavioural change for typical UIs. Only genuinely large trees exceed\n * the budget, at which point we yield a macrotask (letting the browser\n * paint / stay responsive) and resume the remaining work, returning a\n * Promise that resolves when the whole subtree is mounted.\n */\n interface MountFrame { node: AreHTMLNode; entered: boolean; }\n\n const stack: MountFrame[] = [];\n for (let i = node.children.length - 1; i >= 0; i--) {\n stack.push({ node: node.children[i] as AreHTMLNode, entered: false });\n }\n\n const step = (): void => {\n const frame = stack[stack.length - 1];\n const current = frame.node;\n\n if (frame.entered) {\n // Post-order exit: the whole subtree below `current` is mounted.\n stack.pop();\n current.call(AreNodeFeatures.onAfterMount, current.scope);\n return;\n }\n\n frame.entered = true;\n\n // onBeforeMount always fires (even for inactive nodes), matching the\n // recursive AreNode.mount() semantics.\n current.call(AreNodeFeatures.onBeforeMount, current.scope);\n\n if (!current.scene.isInactive) {\n current.interpret();\n // Push children in reverse so they pop in document order.\n for (let i = current.children.length - 1; i >= 0; i--) {\n stack.push({ node: current.children[i] as AreHTMLNode, entered: false });\n }\n }\n };\n\n const drive = (): void | Promise<void> => {\n const start = AreSchedulerHelper.now();\n while (stack.length > 0) {\n step();\n if (stack.length > 0 && AreSchedulerHelper.now() - start >= AreHTMLLifecycle.MOUNT_BUDGET_MS) {\n // Budget exhausted with work remaining — yield, then resume.\n return new Promise<void>((resolve, reject) => {\n AreSchedulerHelper.scheduleMacrotask(() => {\n try {\n resolve(drive());\n } catch (error) {\n reject(error);\n }\n });\n });\n }\n }\n };\n\n return drive();\n }\n\n\n @A_Feature.Extend({\n name: AreAttributeFeatures.Update,\n scope: [AreDirectiveAttribute],\n })\n updateDirectiveAttribute(\n @A_Inject(A_Caller) directive: AreDirectiveAttribute,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(A_Feature) feature: A_Feature,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ) {\n /**\n * 3. If the attribute is a directive, then we should find a component that is responsible for\n * the directive compiling logic, and call it. \n * In case component is not found we just want to log a warning, \n * since the directive may be handled by some parent component or simply is a mistake in the template.\n */\n if (directive.component) {\n feature.chain(directive.component, AreDirectiveFeatures.Update, directive.owner.scope);\n } else {\n logger?.warning(`Directive handler component not found for directive: ${directive.name}. Make sure to create a component named \"AreDirective${A_FormatterHelper.toPascalCase(directive.name)}\" to handle this directive.`);\n }\n }\n\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/engine/AreHTML.lifecycle.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAkBO,IAAM,gBAAA,GAAN,cAA+B,YAAA,CAAa;AAAA,EAG/C,cACwB,IAAA,EACD,KAAA,EACa,OAAA,EACH,cAAA,EACT,WACjB,IAAA,EACC;AAEJ,IAAA,IAAI,IAAA,CAAK,SAAA;AACL,MAAA,cAAA,EAAgB,UAAU,IAAI,CAAA;AAElC,IAAA,KAAA,CAAM,KAAK,IAAA,EAAM,KAAA,EAAO,OAAA,EAAS,MAAA,EAAQ,GAAG,IAAI,CAAA;AAAA,EACpD;AAAA,EAIA,SACwB,IAAA,EACD,KAAA,EACa,OAAA,EACH,cAAA,EACT,WACjB,IAAA,EACC;AACJ,IAAA,cAAA,EAAgB,UAAU,IAAI,CAAA;AAC9B,IAAA,KAAA,CAAM,KAAK,IAAA,EAAM,KAAA,EAAO,OAAA,EAAS,MAAA,EAAQ,GAAG,IAAI,CAAA;AAAA,EACpD;AAAA,EAIA,QAAA,CACwB,IAAA,EACD,KAAA,EACa,OAAA,EACZ,WACjB,IAAA,EACC;AACJ,IAAA,MAAM,KAAA,GAAQ,IAAI,QAAA,CAAS,IAAA,CAAK,KAAK,CAAA;AAErC,IAAA,KAAA,CAAM,SAAS,KAAK,CAAA;AAAA,EACxB;AAAA,EAIA,iBAAA,CACwB,IAAA,EACD,KAAA,EACa,OAAA,EACZ,WACjB,IAAA,EACC;AACJ,IAAA,MAAM,KAAA,GAAQ,IAAI,QAAA,CAAS,IAAA,CAAK,KAAK,CAAA;AAErC,IAAA,KAAA,CAAM,SAAS,KAAK,CA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CAAA;AAAA,EAKI,4BAAS,QAAQ,CAAA,CAAA;AAAA,EAIjB,4BAAS,QAAQ,CAAA,CAAA;AAAA,EAEjB,4BAAS,QAAQ,CAAA;AAAA,CAAA,EA1Eb,gBAAA,CAgET,SAAA,EAAA,OAAA,EAAA,CAAA,CAAA;AA2HA,eAAA,CAAA;AAAA,EAJC,UAAU,MAAA,CAAO;AAAA,IACd,MAAM,oBAAA,CAAqB,MAAA;AAAA,IAC3B,KAAA,EAAO,CAAC,qBAAqB;AAAA,GAChC,CAAA;AAAA,EAEI,4BAAS,QAAQ,CAAA,CAAA;AAAA,EACjB,4BAAS,OAAO,CAAA,CAAA;AAAA,EAChB,4BAAS,SAAS,CAAA,CAAA;AAAA,EAClB,4BAAS,QAAQ,CAAA;AAAA,CAAA,EA/Lb,gBAAA,CA2LT,SAAA,EAAA,0BAAA,EAAA,CAAA,CAAA;AA3LS,gBAAA,GAAN,eAAA,CAAA;AAAA,EAJN,QAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,YAAA;AAAA,IACX,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACY,gBAAA,CAAA","file":"AreHTML.lifecycle.mjs","sourcesContent":["import { A_Caller, A_Feature, A_FormatterHelper, A_Inject, A_Scope } from \"@adaas/a-concept\";\nimport { AreLifecycle, AreScene, AreAttributeFeatures, AreSignalsContext, AreNodeFeatures, AreFeatures } from \"@adaas/are\";\nimport { A_Logger } from \"@adaas/a-utils/a-logger\";\nimport { AreComponentNode } from \"@adaas/are-html/nodes/AreComponent\";\nimport { AreRootNode } from \"@adaas/are-html/nodes/AreRoot\";\nimport { AreInterpolation } from \"@adaas/are-html/nodes/AreInterpolation\";\nimport { AreText } from \"@adaas/are-html/nodes/AreText\";\nimport { AreDirectiveAttribute } from \"@adaas/are-html/attributes/AreDirective.attribute\";\nimport { AreDirectiveFeatures } from \"@adaas/are-html/directive/AreDirective.constants\";\nimport { AreHTMLEngineContext } from \"./AreHTML.context\";\nimport { AreHTMLNode } from \"../lib/AreHTMLNode/AreHTMLNode\";\nimport { A_Frame } from \"@adaas/a-frame/core\";\n\n\n@A_Frame.Define({\n namespace: 'a-are-html',\n description: 'HTML-specific lifecycle handler extending AreLifecycle. Wires DOM-aware init hooks for component nodes, root nodes, interpolations, text nodes, and directive attributes to the ARE rendering pipeline, connecting each entity to its HTML engine context and priming the scene for subsequent compilation and interpretation.'\n})\nexport class AreHTMLLifecycle extends AreLifecycle {\n\n @AreLifecycle.Init(AreComponentNode)\n initComponent(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n\n if (node.component)\n signalsContext?.subscribe(node);\n\n super.init(node, scope, context, logger, ...args);\n }\n\n\n @AreLifecycle.Init(AreRootNode)\n initRoot(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n signalsContext?.subscribe(node);\n super.init(node, scope, context, logger, ...args);\n }\n\n\n @AreLifecycle.Init(AreText)\n initText(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n const scene = new AreScene(node.aseid);\n\n scope.register(scene);\n }\n\n\n @AreLifecycle.Init(AreInterpolation)\n initInterpolation(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n const scene = new AreScene(node.aseid);\n\n scope.register(scene);\n }\n\n @A_Feature.Extend({\n name: AreNodeFeatures.onMount,\n scope: [AreHTMLNode]\n })\n mount(\n /**\n * Node to be mounted\n */\n @A_Inject(A_Caller) node: AreHTMLNode,\n /**\n * Node Content\n */\n @A_Inject(AreScene) scene: AreScene,\n\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void | Promise<void> {\n\n logger?.debug(`[Mount] Component Trigger for <${node.aseid.entity}> with aseid :{${node.aseid.toString()}}`);\n\n /**\n * Skip mounting nodes whose scene has been deactivated (e.g. $if template nodes\n * when the condition is false). Mirrors the guard in AreLifecycle.mount.\n */\n if (scene.isInactive) return;\n\n /**\n * Open a batching scope for the whole (synchronous) mount pass. Every\n * element created below is built into a *detached* root and attached to\n * the live DOM only when the batch flushes — turning O(nodes) reflows into\n * a single one per mount root. `try/finally` guarantees the batch closes\n * (and the depth counter stays balanced) even if interpretation throws.\n *\n * The context is resolved from the node's scope (the scope the onMount\n * feature runs in) so the override keeps the base `mount` signature.\n */\n const context = node.scope.resolve<AreHTMLEngineContext>(AreHTMLEngineContext);\n\n context?.beginBatch();\n\n /**\n * `onAfterMount` must observe the node already connected to the live\n * document (consumer components may measure layout / focus there). Since\n * the subtree is built off-document and attached only when the batch\n * flushes, we collect the post-order `onAfterMount` targets here and fire\n * them once the flush has connected everything.\n */\n const afterMountQueue: AreHTMLNode[] = [];\n\n try {\n /**\n * 1. Render the root of this mount itself.\n */\n node.interpret();\n\n /**\n * 2. Walk the descendant subtree iteratively with an explicit enter/exit\n * stack. We keep the iterative (non-recursive) shape — it is cheaper\n * than deep recursion and gives us a single, clear place that owns the\n * per-node hook ordering:\n * - enter → onBeforeMount, then (if active) interpret + queue children\n * - exit → onAfterMount (fires AFTER the node's whole subtree, i.e.\n * post-order, matching the recursive `node.mount()` contract)\n *\n * [!] The initial mount is intentionally ATOMIC (fully synchronous). It\n * does NOT time-slice / yield. Yielding mid-walk exposes a partially\n * mounted tree to the event loop: any update dispatched during a gap\n * (signal-driven re-render, async data load, etc.) interprets a node\n * whose parent has not been mounted yet — producing\n * `mount-point-not-found` and out-of-order DOM. The whole page must\n * therefore appear in the DOM in one uninterrupted pass. Heavy lists\n * are sliced at the source instead (see AreDirectiveFor), where the\n * batching is reentrancy-safe.\n */\n interface MountFrame { node: AreHTMLNode; entered: boolean; }\n\n const stack: MountFrame[] = [];\n for (let i = node.children.length - 1; i >= 0; i--) {\n stack.push({ node: node.children[i] as AreHTMLNode, entered: false });\n }\n\n while (stack.length > 0) {\n const frame = stack[stack.length - 1];\n const current = frame.node;\n\n if (frame.entered) {\n // Post-order exit: the whole subtree below `current` is mounted.\n // Defer the onAfterMount hook until after the batch flush so the\n // node is connected to the live DOM when it runs.\n stack.pop();\n afterMountQueue.push(current);\n continue;\n }\n\n frame.entered = true;\n\n // onBeforeMount always fires (even for inactive nodes), matching the\n // recursive AreNode.mount() semantics.\n current.call(AreNodeFeatures.onBeforeMount, current.scope);\n\n if (!current.scene.isInactive) {\n current.interpret();\n // Push children in reverse so they pop in document order.\n for (let i = current.children.length - 1; i >= 0; i--) {\n stack.push({ node: current.children[i] as AreHTMLNode, entered: false });\n }\n }\n }\n } finally {\n // Flush the deferred attachments — the fully built subtree lands in the\n // live DOM in a single pass.\n context?.endBatch();\n }\n\n // The subtree is now connected; fire onAfterMount in the original\n // post-order, each with its node live in the document.\n for (let i = 0; i < afterMountQueue.length; i++) {\n const mounted = afterMountQueue[i];\n mounted.call(AreNodeFeatures.onAfterMount, mounted.scope);\n }\n }\n\n\n @A_Feature.Extend({\n name: AreAttributeFeatures.Update,\n scope: [AreDirectiveAttribute],\n })\n updateDirectiveAttribute(\n @A_Inject(A_Caller) directive: AreDirectiveAttribute,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(A_Feature) feature: A_Feature,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ) {\n /**\n * 3. If the attribute is a directive, then we should find a component that is responsible for\n * the directive compiling logic, and call it. \n * In case component is not found we just want to log a warning, \n * since the directive may be handled by some parent component or simply is a mistake in the template.\n */\n if (directive.component) {\n feature.chain(directive.component, AreDirectiveFeatures.Update, directive.owner.scope);\n } else {\n logger?.warning(`Directive handler component not found for directive: ${directive.name}. Make sure to create a component named \"AreDirective${A_FormatterHelper.toPascalCase(directive.name)}\" to handle this directive.`);\n }\n }\n\n}"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A_Logger } from '@adaas/a-utils/a-logger';
|
|
2
2
|
import { AreTokenizer, AreNode, AreContext } from '@adaas/are';
|
|
3
|
-
import { d as AreHTMLAttribute } from '../AreBinding.attribute-
|
|
3
|
+
import { d as AreHTMLAttribute } from '../AreBinding.attribute-BWzEIw6H.mjs';
|
|
4
4
|
import '@adaas/a-concept';
|
|
5
5
|
import '../lib/AreStyle/AreStyle.context.mjs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A_Logger } from '@adaas/a-utils/a-logger';
|
|
2
2
|
import { AreTokenizer, AreNode, AreContext } from '@adaas/are';
|
|
3
|
-
import { d as AreHTMLAttribute } from '../AreBinding.attribute-
|
|
3
|
+
import { d as AreHTMLAttribute } from '../AreBinding.attribute-GpT-5Qmf.js';
|
|
4
4
|
import '@adaas/a-concept';
|
|
5
5
|
import '../lib/AreStyle/AreStyle.context.js';
|
|
6
6
|
|
|
@@ -9,6 +9,7 @@ var AreDirective_attribute = require('@adaas/are-html/attributes/AreDirective.at
|
|
|
9
9
|
var AreEvent_attribute = require('@adaas/are-html/attributes/AreEvent.attribute');
|
|
10
10
|
var AreBinding_attribute = require('@adaas/are-html/attributes/AreBinding.attribute');
|
|
11
11
|
var AreStatic_attribute = require('@adaas/are-html/attributes/AreStatic.attribute');
|
|
12
|
+
var AreHTML_constants = require('./AreHTML.constants');
|
|
12
13
|
var core = require('@adaas/a-frame/core');
|
|
13
14
|
|
|
14
15
|
var __defProp = Object.defineProperty;
|
|
@@ -28,7 +29,12 @@ exports.AreHTMLTokenizer = class AreHTMLTokenizer extends are.AreTokenizer {
|
|
|
28
29
|
this.ATTR_PATTERN = /([$:@]?[\w.-]+(?::[\w.-]+)?)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>/"'=]+)))?/g;
|
|
29
30
|
}
|
|
30
31
|
tokenize(node, context, logger) {
|
|
31
|
-
|
|
32
|
+
const isStaticIsland = node instanceof AreComponent.AreComponentNode && !!node.content && AreHTML_constants.isStaticMarkup(node.content);
|
|
33
|
+
if (isStaticIsland) {
|
|
34
|
+
node.markStatic(node.content);
|
|
35
|
+
} else {
|
|
36
|
+
super.tokenize(node, context, logger);
|
|
37
|
+
}
|
|
32
38
|
context.startPerformance("attributeExtraction");
|
|
33
39
|
const attributes = this.extractAttributes(node.markup);
|
|
34
40
|
for (const attr of attributes) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/engine/AreHTML.tokenizer.ts"],"names":["AreHTMLTokenizer","AreTokenizer","AreBindingAttribute","AreEventAttribute","AreDirectiveAttribute","AreStaticAttribute","A_Feature","AreNodeFeatures","
|
|
1
|
+
{"version":3,"sources":["../../../src/engine/AreHTML.tokenizer.ts"],"names":["AreHTMLTokenizer","AreTokenizer","AreComponentNode","isStaticMarkup","AreBindingAttribute","AreEventAttribute","AreDirectiveAttribute","AreStaticAttribute","A_Feature","AreNodeFeatures","AreRootNode","A_Caller","AreContext","A_Logger","A_Frame"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAmBaA,wBAAA,GAAN,+BAA+BC,gBAAA,CAAa;AAAA,EAA5C,WAAA,GAAA;AAAA,IAAA,KAAA,CAAA,GAAA,SAAA,CAAA;AAEH,IAAA,IAAA,CAAA,YAAA,GAAe,gFAAA;AAAA,EAAA;AAAA,EAOf,QAAA,CACwB,IAAA,EACE,OAAA,EACF,MAAA,EAChB;AAoBJ,IAAA,MAAM,cAAA,GAC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A,CAAmB,IAAI,CAAC,CAAA;AAAA,IAClD;AAEA,IAAA,OAAO,OAAA;AAAA,EACX;AAEJ;AA/FI,eAAA,CAAA;AAAA,EAJCC,mBAAU,MAAA,CAAO;AAAA,IACd,MAAMC,mBAAA,CAAgB,UAAA;AAAA,IACtB,KAAA,EAAO,CAACP,6BAAA,EAAkBQ,mBAAW;AAAA,GACxC,CAAA;AAAA,EAEI,qCAASC,iBAAQ,CAAA,CAAA;AAAA,EACjB,qCAASC,cAAU,CAAA,CAAA;AAAA,EACnB,qCAASC,gBAAQ,CAAA;AAAA,CAAA,EAZbb,wBAAA,CAST,SAAA,EAAA,UAAA,EAAA,CAAA,CAAA;AATSA,wBAAA,GAAN,eAAA,CAAA;AAAA,EAJNc,aAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,YAAA;AAAA,IACX,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACYd,wBAAA,CAAA","file":"AreHTML.tokenizer.js","sourcesContent":["import { A_Caller, A_Feature, A_Inject } from \"@adaas/a-concept\";\nimport { A_Logger } from \"@adaas/a-utils/a-logger\";\nimport { AreNodeFeatures, AreNode, AreTokenizer, AreAttribute_Init, AreContext } from \"@adaas/are\";\nimport { AreComponentNode } from \"@adaas/are-html/nodes/AreComponent\";\nimport { AreRootNode } from \"@adaas/are-html/nodes/AreRoot\";\nimport { AreDirectiveAttribute } from \"@adaas/are-html/attributes/AreDirective.attribute\";\nimport { AreEventAttribute } from \"@adaas/are-html/attributes/AreEvent.attribute\";\nimport { AreBindingAttribute } from \"@adaas/are-html/attributes/AreBinding.attribute\";\nimport { AreStaticAttribute } from \"@adaas/are-html/attributes/AreStatic.attribute\";\nimport { AreHTMLAttribute } from \"../lib/AreHTMLAttribute/AreHTML.attribute\";\nimport { AreHTMLNode } from \"../lib/AreHTMLNode/AreHTMLNode\";\nimport { isStaticMarkup } from \"./AreHTML.constants\";\nimport { A_Frame } from \"@adaas/a-frame/core\";\n\n\n@A_Frame.Define({\n namespace: 'a-are-html',\n description: 'HTML-specific tokenizer extending AreTokenizer. Parses raw HTML template strings into AreHTMLNode trees by scanning element tags and resolving directive ($), event (@), binding (:), and static attributes to their typed attribute classes, constructing AreComponentNode and AreRootNode instances where required.'\n})\nexport class AreHTMLTokenizer extends AreTokenizer {\n\n ATTR_PATTERN = /([$:@]?[\\w.-]+(?::[\\w.-]+)?)(?:\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)'|([^\\s>/\"'=]+)))?/g\n\n\n @A_Feature.Extend({\n name: AreNodeFeatures.onTokenize,\n scope: [AreComponentNode, AreRootNode]\n })\n tokenize(\n @A_Inject(A_Caller) node: AreNode,\n @A_Inject(AreContext) context: AreContext,\n @A_Inject(A_Logger) logger?: A_Logger\n ): void {\n\n /**\n * Static-island fast path.\n *\n * When a node's entire inner subtree is fully static — no `{{ }}`\n * interpolations, no dynamic (`$`/`:`/`@`) attributes and only standard\n * HTML tags — we skip exploding it into one child AreNode per element /\n * text run and instead capture the inner markup verbatim. The interpreter\n * later materialises it in a single pass (browser-parsed innerHTML /\n * cached `<template>` clone), which:\n * - eliminates N node + scope + scene + instruction allocations,\n * - collapses N isolated DOM mutations into one, and\n * - decodes HTML entities (e.g. ` `) for free.\n *\n * Routing outlets (AreRootNode) are intentionally excluded — they own\n * their content dynamically. The node's OWN attributes are still\n * extracted below, so a dynamic attribute on the island root itself\n * (e.g. `<div :class=\"x\"> …static… </div>`) keeps working.\n */\n const isStaticIsland =\n node instanceof AreComponentNode &&\n !!node.content &&\n isStaticMarkup(node.content);\n\n if (isStaticIsland) {\n (node as AreHTMLNode).markStatic(node.content);\n } else {\n super.tokenize(node, context, logger);\n }\n\n context.startPerformance('attributeExtraction');\n\n const attributes = this.extractAttributes(node.markup);\n\n for (const attr of attributes) {\n node.scope.register(attr);\n }\n\n context.endPerformance('attributeExtraction');\n }\n\n\n\n extractAttributes(markup: string): AreHTMLAttribute[] {\n // Strip the tag name, then remove the closing > that is NOT inside quotes\n const withoutTag = markup.replace(/^<[a-zA-Z][a-zA-Z0-9-]*\\s*/, '')\n\n // Walk the string to find the closing > that isn't inside a quoted value\n let inSingle = false\n let inDouble = false\n let endIdx = withoutTag.length\n\n for (let i = 0; i < withoutTag.length; i++) {\n const ch = withoutTag[i]\n if (ch === '\"' && !inSingle) inDouble = !inDouble\n else if (ch === \"'\" && !inDouble) inSingle = !inSingle\n else if (ch === '>' && !inSingle && !inDouble) {\n endIdx = i\n break\n }\n }\n\n const attrString = withoutTag.slice(0, endIdx).replace(/\\s*\\/?\\s*$/, '').trim()\n\n const results: AreHTMLAttribute[] = []\n\n for (const match of attrString.matchAll(this.ATTR_PATTERN)) {\n const raw = match[0]\n const full = match[1] // e.g. ':class', '@click', '$for', 'id'\n\n // skip zero-length or name-less regex matches\n if (!full) continue\n\n const value = match[2] ?? match[3] ?? match[4] ?? 'true'\n\n const prefix = full[0]\n const isSpecial = prefix === ':' || prefix === '@' || prefix === '$'\n const name = isSpecial ? full.slice(1) : full\n\n const meta: AreAttribute_Init = { name, content: value, raw, prefix: isSpecial ? prefix : '' }\n\n if (prefix === ':') results.push(new AreBindingAttribute(meta))\n else if (prefix === '@') results.push(new AreEventAttribute(meta))\n else if (prefix === '$') results.push(new AreDirectiveAttribute(meta))\n else results.push(new AreStaticAttribute(meta))\n }\n\n return results\n }\n\n}"]}
|
|
@@ -8,6 +8,7 @@ import { AreDirectiveAttribute } from '@adaas/are-html/attributes/AreDirective.a
|
|
|
8
8
|
import { AreEventAttribute } from '@adaas/are-html/attributes/AreEvent.attribute';
|
|
9
9
|
import { AreBindingAttribute } from '@adaas/are-html/attributes/AreBinding.attribute';
|
|
10
10
|
import { AreStaticAttribute } from '@adaas/are-html/attributes/AreStatic.attribute';
|
|
11
|
+
import { isStaticMarkup } from './AreHTML.constants';
|
|
11
12
|
import { A_Frame } from '@adaas/a-frame/core';
|
|
12
13
|
|
|
13
14
|
let AreHTMLTokenizer = class extends AreTokenizer {
|
|
@@ -16,7 +17,12 @@ let AreHTMLTokenizer = class extends AreTokenizer {
|
|
|
16
17
|
this.ATTR_PATTERN = /([$:@]?[\w.-]+(?::[\w.-]+)?)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>/"'=]+)))?/g;
|
|
17
18
|
}
|
|
18
19
|
tokenize(node, context, logger) {
|
|
19
|
-
|
|
20
|
+
const isStaticIsland = node instanceof AreComponentNode && !!node.content && isStaticMarkup(node.content);
|
|
21
|
+
if (isStaticIsland) {
|
|
22
|
+
node.markStatic(node.content);
|
|
23
|
+
} else {
|
|
24
|
+
super.tokenize(node, context, logger);
|
|
25
|
+
}
|
|
20
26
|
context.startPerformance("attributeExtraction");
|
|
21
27
|
const attributes = this.extractAttributes(node.markup);
|
|
22
28
|
for (const attr of attributes) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/engine/AreHTML.tokenizer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/engine/AreHTML.tokenizer.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAmBO,IAAM,gBAAA,GAAN,cAA+B,YAAA,CAAa;AAAA,EAA5C,WAAA,GAAA;AAAA,IAAA,KAAA,CAAA,GAAA,SAAA,CAAA;AAEH,IAAA,IAAA,CAAA,YAAA,GAAe,gFAAA;AAAA,EAAA;AAAA,EAOf,QAAA,CACwB,IAAA,EACE,OAAA,EACF,MAAA,EAChB;AAoBJ,IAAA,MAAM,cAAA,GACF,gBAAgB,gBAAA,IAChB,CAAC,CAAC,IAAA,CAAK,OAAA,IACP,cAAA,CAAe,IAAA,CAAK,OAAO,CAAA;AAE/B,IAAA,IAAI,cAAA,EAAgB;AAChB,MAAC,IAAA,CAAqB,UAAA,CAAW,IAAA,CAAK,OAAO,CAAA;AAAA,IACjD,CAAA,MAAO;AACH,MAAA,KAAA,CAAM,QAAA,CAAS,IAAA,EAAM,OAAA,EAAS,MAAM,CAAA;AAAA,IACxC;AAEA,IAAA,OAAA,CAAQ,iBAAiB,qB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AA;AAAA,CAAA,EAZb,gBAAA,CAST,SAAA,EAAA,UAAA,EAAA,CAAA,CAAA;AATS,gBAAA,GAAN,eAAA,CAAA;AAAA,EAJN,QAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,YAAA;AAAA,IACX,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACY,gBAAA,CAAA","file":"AreHTML.tokenizer.mjs","sourcesContent":["import { A_Caller, A_Feature, A_Inject } from \"@adaas/a-concept\";\nimport { A_Logger } from \"@adaas/a-utils/a-logger\";\nimport { AreNodeFeatures, AreNode, AreTokenizer, AreAttribute_Init, AreContext } from \"@adaas/are\";\nimport { AreComponentNode } from \"@adaas/are-html/nodes/AreComponent\";\nimport { AreRootNode } from \"@adaas/are-html/nodes/AreRoot\";\nimport { AreDirectiveAttribute } from \"@adaas/are-html/attributes/AreDirective.attribute\";\nimport { AreEventAttribute } from \"@adaas/are-html/attributes/AreEvent.attribute\";\nimport { AreBindingAttribute } from \"@adaas/are-html/attributes/AreBinding.attribute\";\nimport { AreStaticAttribute } from \"@adaas/are-html/attributes/AreStatic.attribute\";\nimport { AreHTMLAttribute } from \"../lib/AreHTMLAttribute/AreHTML.attribute\";\nimport { AreHTMLNode } from \"../lib/AreHTMLNode/AreHTMLNode\";\nimport { isStaticMarkup } from \"./AreHTML.constants\";\nimport { A_Frame } from \"@adaas/a-frame/core\";\n\n\n@A_Frame.Define({\n namespace: 'a-are-html',\n description: 'HTML-specific tokenizer extending AreTokenizer. Parses raw HTML template strings into AreHTMLNode trees by scanning element tags and resolving directive ($), event (@), binding (:), and static attributes to their typed attribute classes, constructing AreComponentNode and AreRootNode instances where required.'\n})\nexport class AreHTMLTokenizer extends AreTokenizer {\n\n ATTR_PATTERN = /([$:@]?[\\w.-]+(?::[\\w.-]+)?)(?:\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)'|([^\\s>/\"'=]+)))?/g\n\n\n @A_Feature.Extend({\n name: AreNodeFeatures.onTokenize,\n scope: [AreComponentNode, AreRootNode]\n })\n tokenize(\n @A_Inject(A_Caller) node: AreNode,\n @A_Inject(AreContext) context: AreContext,\n @A_Inject(A_Logger) logger?: A_Logger\n ): void {\n\n /**\n * Static-island fast path.\n *\n * When a node's entire inner subtree is fully static — no `{{ }}`\n * interpolations, no dynamic (`$`/`:`/`@`) attributes and only standard\n * HTML tags — we skip exploding it into one child AreNode per element /\n * text run and instead capture the inner markup verbatim. The interpreter\n * later materialises it in a single pass (browser-parsed innerHTML /\n * cached `<template>` clone), which:\n * - eliminates N node + scope + scene + instruction allocations,\n * - collapses N isolated DOM mutations into one, and\n * - decodes HTML entities (e.g. ` `) for free.\n *\n * Routing outlets (AreRootNode) are intentionally excluded — they own\n * their content dynamically. The node's OWN attributes are still\n * extracted below, so a dynamic attribute on the island root itself\n * (e.g. `<div :class=\"x\"> …static… </div>`) keeps working.\n */\n const isStaticIsland =\n node instanceof AreComponentNode &&\n !!node.content &&\n isStaticMarkup(node.content);\n\n if (isStaticIsland) {\n (node as AreHTMLNode).markStatic(node.content);\n } else {\n super.tokenize(node, context, logger);\n }\n\n context.startPerformance('attributeExtraction');\n\n const attributes = this.extractAttributes(node.markup);\n\n for (const attr of attributes) {\n node.scope.register(attr);\n }\n\n context.endPerformance('attributeExtraction');\n }\n\n\n\n extractAttributes(markup: string): AreHTMLAttribute[] {\n // Strip the tag name, then remove the closing > that is NOT inside quotes\n const withoutTag = markup.replace(/^<[a-zA-Z][a-zA-Z0-9-]*\\s*/, '')\n\n // Walk the string to find the closing > that isn't inside a quoted value\n let inSingle = false\n let inDouble = false\n let endIdx = withoutTag.length\n\n for (let i = 0; i < withoutTag.length; i++) {\n const ch = withoutTag[i]\n if (ch === '\"' && !inSingle) inDouble = !inDouble\n else if (ch === \"'\" && !inDouble) inSingle = !inSingle\n else if (ch === '>' && !inSingle && !inDouble) {\n endIdx = i\n break\n }\n }\n\n const attrString = withoutTag.slice(0, endIdx).replace(/\\s*\\/?\\s*$/, '').trim()\n\n const results: AreHTMLAttribute[] = []\n\n for (const match of attrString.matchAll(this.ATTR_PATTERN)) {\n const raw = match[0]\n const full = match[1] // e.g. ':class', '@click', '$for', 'id'\n\n // skip zero-length or name-less regex matches\n if (!full) continue\n\n const value = match[2] ?? match[3] ?? match[4] ?? 'true'\n\n const prefix = full[0]\n const isSpecial = prefix === ':' || prefix === '@' || prefix === '$'\n const name = isSpecial ? full.slice(1) : full\n\n const meta: AreAttribute_Init = { name, content: value, raw, prefix: isSpecial ? prefix : '' }\n\n if (prefix === ':') results.push(new AreBindingAttribute(meta))\n else if (prefix === '@') results.push(new AreEventAttribute(meta))\n else if (prefix === '$') results.push(new AreDirectiveAttribute(meta))\n else results.push(new AreStaticAttribute(meta))\n }\n\n return results\n }\n\n}"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A_Feature } from '@adaas/a-concept';
|
|
2
2
|
import { A_Logger } from '@adaas/a-utils/a-logger';
|
|
3
3
|
import { AreTransformer, AreStore } from '@adaas/are';
|
|
4
|
-
import { b as AreDirectiveAttribute } from '../AreBinding.attribute-
|
|
4
|
+
import { b as AreDirectiveAttribute } from '../AreBinding.attribute-BWzEIw6H.mjs';
|
|
5
5
|
import '../lib/AreStyle/AreStyle.context.mjs';
|
|
6
6
|
|
|
7
7
|
declare class AreHTMLTransformer extends AreTransformer {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A_Feature } from '@adaas/a-concept';
|
|
2
2
|
import { A_Logger } from '@adaas/a-utils/a-logger';
|
|
3
3
|
import { AreTransformer, AreStore } from '@adaas/are';
|
|
4
|
-
import { b as AreDirectiveAttribute } from '../AreBinding.attribute-
|
|
4
|
+
import { b as AreDirectiveAttribute } from '../AreBinding.attribute-GpT-5Qmf.js';
|
|
5
5
|
import '../lib/AreStyle/AreStyle.context.js';
|
|
6
6
|
|
|
7
7
|
declare class AreHTMLTransformer extends AreTransformer {
|
package/dist/node/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AreBindingAttribute, a as AreDirective, b as AreDirectiveAttribute, c as AreEventAttribute, d as AreHTMLAttribute, e as AreHTMLNode, f as AreStaticAttribute } from './AreBinding.attribute-
|
|
1
|
+
export { A as AreBindingAttribute, a as AreDirective, b as AreDirectiveAttribute, c as AreEventAttribute, d as AreHTMLAttribute, e as AreHTMLNode, f as AreStaticAttribute } from './AreBinding.attribute-BWzEIw6H.mjs';
|
|
2
2
|
export { AreDirectiveFor } from './directives/AreDirectiveFor.directive.mjs';
|
|
3
3
|
export { AreDirectiveIf } from './directives/AreDirectiveIf.directive.mjs';
|
|
4
4
|
export { AreDirectiveShow } from './directives/AreDirectiveShow.directive.mjs';
|
|
@@ -6,18 +6,19 @@ export { AddAttributeInstruction } from './instructions/AddAttribute.instruction
|
|
|
6
6
|
export { AddElementInstruction } from './instructions/AddElement.instruction.mjs';
|
|
7
7
|
export { AddInterpolationInstruction } from './instructions/AddInterpolation.instruction.mjs';
|
|
8
8
|
export { AddListenerInstruction } from './instructions/AddListener.instruction.mjs';
|
|
9
|
+
export { AddStaticHTMLInstruction } from './instructions/AddStaticHTML.instruction.mjs';
|
|
9
10
|
export { AddStyleInstruction } from './instructions/AddStyle.instruction.mjs';
|
|
10
11
|
export { AddTextInstruction } from './instructions/AddText.instruction.mjs';
|
|
11
12
|
export { HideElementInstruction } from './instructions/HideElement.instruction.mjs';
|
|
12
13
|
export { AreHTMLInstructions } from './instructions/AreHTML.instructions.constants.mjs';
|
|
13
|
-
export { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload, AreHtmlHideInstructionPayload } from './instructions/AreHTML.instructions.types.mjs';
|
|
14
|
+
export { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStaticHTMLInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload, AreHtmlHideInstructionPayload } from './instructions/AreHTML.instructions.types.mjs';
|
|
14
15
|
export { AreComment } from './nodes/AreComment.mjs';
|
|
15
16
|
export { AreComponentNode } from './nodes/AreComponent.mjs';
|
|
16
17
|
export { AreInterpolation } from './nodes/AreInterpolation.mjs';
|
|
17
18
|
export { AreRootNode } from './nodes/AreRoot.mjs';
|
|
18
19
|
export { AreText } from './nodes/AreText.mjs';
|
|
19
20
|
export { AreRoute } from './signals/AreRoute.signal.mjs';
|
|
20
|
-
export { BOOLEAN_ATTRIBUTES, IDL_FORM_PROPERTIES, LISTENER_OPTION_MODIFIERS, ParsedEventName, SVG_ATTRIBUTE_NS, SVG_NAMESPACE, VOID_ELEMENTS, isBooleanAttribute, isIDLFormProperty, isVoidElement, normalizeClassValue, normalizeStyleValue, parseEventName, toDOMString } from './engine/AreHTML.constants.mjs';
|
|
21
|
+
export { BOOLEAN_ATTRIBUTES, IDL_FORM_PROPERTIES, LISTENER_OPTION_MODIFIERS, ParsedEventName, STANDARD_HTML_TAGS, SVG_ATTRIBUTE_NS, SVG_NAMESPACE, VOID_ELEMENTS, isBooleanAttribute, isIDLFormProperty, isStaticMarkup, isVoidElement, normalizeClassValue, normalizeStyleValue, parseEventName, toDOMString } from './engine/AreHTML.constants.mjs';
|
|
21
22
|
export { AreHTMLEngineContext } from './engine/AreHTML.context.mjs';
|
|
22
23
|
export { AreHTMLContextConstructor } from './engine/AreHTML.types.mjs';
|
|
23
24
|
export { AreHTMLCompiler } from './engine/AreHTML.compiler.mjs';
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AreBindingAttribute, a as AreDirective, b as AreDirectiveAttribute, c as AreEventAttribute, d as AreHTMLAttribute, e as AreHTMLNode, f as AreStaticAttribute } from './AreBinding.attribute-
|
|
1
|
+
export { A as AreBindingAttribute, a as AreDirective, b as AreDirectiveAttribute, c as AreEventAttribute, d as AreHTMLAttribute, e as AreHTMLNode, f as AreStaticAttribute } from './AreBinding.attribute-GpT-5Qmf.js';
|
|
2
2
|
export { AreDirectiveFor } from './directives/AreDirectiveFor.directive.js';
|
|
3
3
|
export { AreDirectiveIf } from './directives/AreDirectiveIf.directive.js';
|
|
4
4
|
export { AreDirectiveShow } from './directives/AreDirectiveShow.directive.js';
|
|
@@ -6,18 +6,19 @@ export { AddAttributeInstruction } from './instructions/AddAttribute.instruction
|
|
|
6
6
|
export { AddElementInstruction } from './instructions/AddElement.instruction.js';
|
|
7
7
|
export { AddInterpolationInstruction } from './instructions/AddInterpolation.instruction.js';
|
|
8
8
|
export { AddListenerInstruction } from './instructions/AddListener.instruction.js';
|
|
9
|
+
export { AddStaticHTMLInstruction } from './instructions/AddStaticHTML.instruction.js';
|
|
9
10
|
export { AddStyleInstruction } from './instructions/AddStyle.instruction.js';
|
|
10
11
|
export { AddTextInstruction } from './instructions/AddText.instruction.js';
|
|
11
12
|
export { HideElementInstruction } from './instructions/HideElement.instruction.js';
|
|
12
13
|
export { AreHTMLInstructions } from './instructions/AreHTML.instructions.constants.js';
|
|
13
|
-
export { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload, AreHtmlHideInstructionPayload } from './instructions/AreHTML.instructions.types.js';
|
|
14
|
+
export { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStaticHTMLInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload, AreHtmlHideInstructionPayload } from './instructions/AreHTML.instructions.types.js';
|
|
14
15
|
export { AreComment } from './nodes/AreComment.js';
|
|
15
16
|
export { AreComponentNode } from './nodes/AreComponent.js';
|
|
16
17
|
export { AreInterpolation } from './nodes/AreInterpolation.js';
|
|
17
18
|
export { AreRootNode } from './nodes/AreRoot.js';
|
|
18
19
|
export { AreText } from './nodes/AreText.js';
|
|
19
20
|
export { AreRoute } from './signals/AreRoute.signal.js';
|
|
20
|
-
export { BOOLEAN_ATTRIBUTES, IDL_FORM_PROPERTIES, LISTENER_OPTION_MODIFIERS, ParsedEventName, SVG_ATTRIBUTE_NS, SVG_NAMESPACE, VOID_ELEMENTS, isBooleanAttribute, isIDLFormProperty, isVoidElement, normalizeClassValue, normalizeStyleValue, parseEventName, toDOMString } from './engine/AreHTML.constants.js';
|
|
21
|
+
export { BOOLEAN_ATTRIBUTES, IDL_FORM_PROPERTIES, LISTENER_OPTION_MODIFIERS, ParsedEventName, STANDARD_HTML_TAGS, SVG_ATTRIBUTE_NS, SVG_NAMESPACE, VOID_ELEMENTS, isBooleanAttribute, isIDLFormProperty, isStaticMarkup, isVoidElement, normalizeClassValue, normalizeStyleValue, parseEventName, toDOMString } from './engine/AreHTML.constants.js';
|
|
21
22
|
export { AreHTMLEngineContext } from './engine/AreHTML.context.js';
|
|
22
23
|
export { AreHTMLContextConstructor } from './engine/AreHTML.types.js';
|
|
23
24
|
export { AreHTMLCompiler } from './engine/AreHTML.compiler.js';
|
package/dist/node/index.js
CHANGED
|
@@ -12,6 +12,7 @@ var AddAttribute_instruction = require('./instructions/AddAttribute.instruction'
|
|
|
12
12
|
var AddElement_instruction = require('./instructions/AddElement.instruction');
|
|
13
13
|
var AddInterpolation_instruction = require('./instructions/AddInterpolation.instruction');
|
|
14
14
|
var AddListener_instruction = require('./instructions/AddListener.instruction');
|
|
15
|
+
var AddStaticHTML_instruction = require('./instructions/AddStaticHTML.instruction');
|
|
15
16
|
var AddStyle_instruction = require('./instructions/AddStyle.instruction');
|
|
16
17
|
var AddText_instruction = require('./instructions/AddText.instruction');
|
|
17
18
|
var HideElement_instruction = require('./instructions/HideElement.instruction');
|
|
@@ -119,6 +120,12 @@ Object.keys(AddListener_instruction).forEach(function (k) {
|
|
|
119
120
|
get: function () { return AddListener_instruction[k]; }
|
|
120
121
|
});
|
|
121
122
|
});
|
|
123
|
+
Object.keys(AddStaticHTML_instruction).forEach(function (k) {
|
|
124
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
125
|
+
enumerable: true,
|
|
126
|
+
get: function () { return AddStaticHTML_instruction[k]; }
|
|
127
|
+
});
|
|
128
|
+
});
|
|
122
129
|
Object.keys(AddStyle_instruction).forEach(function (k) {
|
|
123
130
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
124
131
|
enumerable: true,
|
package/dist/node/index.mjs
CHANGED
|
@@ -10,6 +10,7 @@ export * from './instructions/AddAttribute.instruction';
|
|
|
10
10
|
export * from './instructions/AddElement.instruction';
|
|
11
11
|
export * from './instructions/AddInterpolation.instruction';
|
|
12
12
|
export * from './instructions/AddListener.instruction';
|
|
13
|
+
export * from './instructions/AddStaticHTML.instruction';
|
|
13
14
|
export * from './instructions/AddStyle.instruction';
|
|
14
15
|
export * from './instructions/AddText.instruction';
|
|
15
16
|
export * from './instructions/HideElement.instruction';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AreMutation, AreDeclaration, AreInstructionSerialized } from '@adaas/are';
|
|
2
|
+
import { AreHtmlAddStaticHTMLInstructionPayload } from './AreHTML.instructions.types.mjs';
|
|
3
|
+
|
|
4
|
+
declare class AddStaticHTMLInstruction extends AreMutation<AreHtmlAddStaticHTMLInstructionPayload> {
|
|
5
|
+
constructor(parent: AreDeclaration, props: AreHtmlAddStaticHTMLInstructionPayload | AreInstructionSerialized<AreHtmlAddStaticHTMLInstructionPayload>);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export { AddStaticHTMLInstruction };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AreMutation, AreDeclaration, AreInstructionSerialized } from '@adaas/are';
|
|
2
|
+
import { AreHtmlAddStaticHTMLInstructionPayload } from './AreHTML.instructions.types.js';
|
|
3
|
+
|
|
4
|
+
declare class AddStaticHTMLInstruction extends AreMutation<AreHtmlAddStaticHTMLInstructionPayload> {
|
|
5
|
+
constructor(parent: AreDeclaration, props: AreHtmlAddStaticHTMLInstructionPayload | AreInstructionSerialized<AreHtmlAddStaticHTMLInstructionPayload>);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export { AddStaticHTMLInstruction };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@adaas/a-frame/core');
|
|
4
|
+
var are = require('@adaas/are');
|
|
5
|
+
var AreHTML_instructions_constants = require('./AreHTML.instructions.constants');
|
|
6
|
+
|
|
7
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
9
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
10
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11
|
+
if (decorator = decorators[i])
|
|
12
|
+
result = (decorator(result)) || result;
|
|
13
|
+
return result;
|
|
14
|
+
};
|
|
15
|
+
exports.AddStaticHTMLInstruction = class AddStaticHTMLInstruction extends are.AreMutation {
|
|
16
|
+
constructor(parent, props) {
|
|
17
|
+
if ("aseid" in props) {
|
|
18
|
+
super(props);
|
|
19
|
+
} else {
|
|
20
|
+
super(AreHTML_instructions_constants.AreHTMLInstructions.AddStaticHTML, parent, props);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.AddStaticHTMLInstruction = __decorateClass([
|
|
25
|
+
core.A_Frame.Define({
|
|
26
|
+
namespace: "a-are-html",
|
|
27
|
+
description: 'Materialises a fully static subtree (a "static island") onto its parent element in a single pass via browser-parsed innerHTML / a cached <template> clone. Apply injects the markup; revert clears it. Decodes HTML entities (e.g. ) for free.'
|
|
28
|
+
})
|
|
29
|
+
], exports.AddStaticHTMLInstruction);
|
|
30
|
+
//# sourceMappingURL=AddStaticHTML.instruction.js.map
|
|
31
|
+
//# sourceMappingURL=AddStaticHTML.instruction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/instructions/AddStaticHTML.instruction.ts"],"names":["AddStaticHTMLInstruction","AreMutation","AreHTMLInstructions","A_Frame"],"mappings":";;;;;;;;;;;;;;AAUaA,gCAAA,GAAN,uCAAuCC,eAAA,CAAoD;AAAA,EAE9F,WAAA,CACI,QACA,KAAA,EACF;AACE,IAAA,IAAI,WAAW,KAAA,EAAO;AAClB,MAAA,KAAA,CAAM,KAAyE,CAAA;AAAA,IACnF,CAAA,MAAO;AACH,MAAA,KAAA,CAAMC,kDAAA,CAAoB,aAAA,EAAe,MAAA,EAAQ,KAAK,CAAA;AAAA,IAC1D;AAAA,EACJ;AACJ;AAZaF,gCAAA,GAAN,eAAA,CAAA;AAAA,EAJNG,aAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,YAAA;AAAA,IACX,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACYH,gCAAA,CAAA","file":"AddStaticHTML.instruction.js","sourcesContent":["import { A_Frame } from \"@adaas/a-frame/core\"\nimport { AreDeclaration, AreMutation, AreInstructionSerialized } from \"@adaas/are\";\nimport { AreHtmlAddStaticHTMLInstructionPayload } from \"./AreHTML.instructions.types\";\nimport { AreHTMLInstructions } from \"./AreHTML.instructions.constants\";\n\n\n@A_Frame.Define({\n namespace: 'a-are-html',\n description: 'Materialises a fully static subtree (a \"static island\") onto its parent element in a single pass via browser-parsed innerHTML / a cached <template> clone. Apply injects the markup; revert clears it. Decodes HTML entities (e.g. ) for free.'\n})\nexport class AddStaticHTMLInstruction extends AreMutation<AreHtmlAddStaticHTMLInstructionPayload> {\n\n constructor(\n parent: AreDeclaration,\n props: AreHtmlAddStaticHTMLInstructionPayload | AreInstructionSerialized<AreHtmlAddStaticHTMLInstructionPayload>\n ) {\n if ('aseid' in props) {\n super(props as AreInstructionSerialized<AreHtmlAddStaticHTMLInstructionPayload>);\n } else {\n super(AreHTMLInstructions.AddStaticHTML, parent, props);\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { __decorateClass } from '../chunk-EQQGB2QZ.mjs';
|
|
2
|
+
import { A_Frame } from '@adaas/a-frame/core';
|
|
3
|
+
import { AreMutation } from '@adaas/are';
|
|
4
|
+
import { AreHTMLInstructions } from './AreHTML.instructions.constants';
|
|
5
|
+
|
|
6
|
+
let AddStaticHTMLInstruction = class extends AreMutation {
|
|
7
|
+
constructor(parent, props) {
|
|
8
|
+
if ("aseid" in props) {
|
|
9
|
+
super(props);
|
|
10
|
+
} else {
|
|
11
|
+
super(AreHTMLInstructions.AddStaticHTML, parent, props);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
AddStaticHTMLInstruction = __decorateClass([
|
|
16
|
+
A_Frame.Define({
|
|
17
|
+
namespace: "a-are-html",
|
|
18
|
+
description: 'Materialises a fully static subtree (a "static island") onto its parent element in a single pass via browser-parsed innerHTML / a cached <template> clone. Apply injects the markup; revert clears it. Decodes HTML entities (e.g. ) for free.'
|
|
19
|
+
})
|
|
20
|
+
], AddStaticHTMLInstruction);
|
|
21
|
+
|
|
22
|
+
export { AddStaticHTMLInstruction };
|
|
23
|
+
//# sourceMappingURL=AddStaticHTML.instruction.mjs.map
|
|
24
|
+
//# sourceMappingURL=AddStaticHTML.instruction.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/instructions/AddStaticHTML.instruction.ts"],"names":[],"mappings":";;;;;AAUO,IAAM,wBAAA,GAAN,cAAuC,WAAA,CAAoD;AAAA,EAE9F,WAAA,CACI,QACA,KAAA,EACF;AACE,IAAA,IAAI,WAAW,KAAA,EAAO;AAClB,MAAA,KAAA,CAAM,KAAyE,CAAA;AAAA,IACnF,CAAA,MAAO;AACH,MAAA,KAAA,CAAM,mBAAA,CAAoB,aAAA,EAAe,MAAA,EAAQ,KAAK,CAAA;AAAA,IAC1D;AAAA,EACJ;AACJ;AAZa,wBAAA,GAAN,eAAA,CAAA;AAAA,EAJN,QAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,YAAA;AAAA,IACX,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACY,wBAAA,CAAA","file":"AddStaticHTML.instruction.mjs","sourcesContent":["import { A_Frame } from \"@adaas/a-frame/core\"\nimport { AreDeclaration, AreMutation, AreInstructionSerialized } from \"@adaas/are\";\nimport { AreHtmlAddStaticHTMLInstructionPayload } from \"./AreHTML.instructions.types\";\nimport { AreHTMLInstructions } from \"./AreHTML.instructions.constants\";\n\n\n@A_Frame.Define({\n namespace: 'a-are-html',\n description: 'Materialises a fully static subtree (a \"static island\") onto its parent element in a single pass via browser-parsed innerHTML / a cached <template> clone. Apply injects the markup; revert clears it. Decodes HTML entities (e.g. ) for free.'\n})\nexport class AddStaticHTMLInstruction extends AreMutation<AreHtmlAddStaticHTMLInstructionPayload> {\n\n constructor(\n parent: AreDeclaration,\n props: AreHtmlAddStaticHTMLInstructionPayload | AreInstructionSerialized<AreHtmlAddStaticHTMLInstructionPayload>\n ) {\n if ('aseid' in props) {\n super(props as AreInstructionSerialized<AreHtmlAddStaticHTMLInstructionPayload>);\n } else {\n super(AreHTMLInstructions.AddStaticHTML, parent, props);\n }\n }\n}\n"]}
|
|
@@ -6,6 +6,7 @@ declare const AreHTMLInstructions: {
|
|
|
6
6
|
readonly AddListener: "_AreHTML_AddListener";
|
|
7
7
|
readonly AddInterpolation: "_AreHTML_AddInterpolation";
|
|
8
8
|
readonly AddComment: "_AreHTML_AddComment";
|
|
9
|
+
readonly AddStaticHTML: "_AreHTML_AddStaticHTML";
|
|
9
10
|
readonly HideElement: "_AreHTML_HideElement";
|
|
10
11
|
};
|
|
11
12
|
|
|
@@ -6,6 +6,7 @@ declare const AreHTMLInstructions: {
|
|
|
6
6
|
readonly AddListener: "_AreHTML_AddListener";
|
|
7
7
|
readonly AddInterpolation: "_AreHTML_AddInterpolation";
|
|
8
8
|
readonly AddComment: "_AreHTML_AddComment";
|
|
9
|
+
readonly AddStaticHTML: "_AreHTML_AddStaticHTML";
|
|
9
10
|
readonly HideElement: "_AreHTML_HideElement";
|
|
10
11
|
};
|
|
11
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/instructions/AreHTML.instructions.constants.ts"],"names":[],"mappings":";;AAEO,MAAM,mBAAA,GAAsB;AAAA,EAC/B,UAAA,EAAY,qBAAA;AAAA,EACZ,OAAA,EAAS,kBAAA;AAAA,EACT,YAAA,EAAc,uBAAA;AAAA,EACd,QAAA,EAAU,mBAAA;AAAA,EACV,WAAA,EAAa,sBAAA;AAAA,EACb,gBAAA,EAAkB,2BAAA;AAAA,EAClB,UAAA,EAAY,qBAAA;AAAA,EACZ,WAAA,EAAa;AACjB","file":"AreHTML.instructions.constants.js","sourcesContent":["\n\nexport const AreHTMLInstructions = {\n AddElement: '_AreHTML_AddElement',\n AddText: '_AreHTML_AddText',\n AddAttribute: '_AreHTML_AddAttribute',\n AddStyle: '_AreHTML_AddStyle',\n AddListener: '_AreHTML_AddListener',\n AddInterpolation: '_AreHTML_AddInterpolation',\n AddComment: '_AreHTML_AddComment',\n HideElement: '_AreHTML_HideElement',\n} as const"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/instructions/AreHTML.instructions.constants.ts"],"names":[],"mappings":";;AAEO,MAAM,mBAAA,GAAsB;AAAA,EAC/B,UAAA,EAAY,qBAAA;AAAA,EACZ,OAAA,EAAS,kBAAA;AAAA,EACT,YAAA,EAAc,uBAAA;AAAA,EACd,QAAA,EAAU,mBAAA;AAAA,EACV,WAAA,EAAa,sBAAA;AAAA,EACb,gBAAA,EAAkB,2BAAA;AAAA,EAClB,UAAA,EAAY,qBAAA;AAAA,EACZ,aAAA,EAAe,wBAAA;AAAA,EACf,WAAA,EAAa;AACjB","file":"AreHTML.instructions.constants.js","sourcesContent":["\n\nexport const AreHTMLInstructions = {\n AddElement: '_AreHTML_AddElement',\n AddText: '_AreHTML_AddText',\n AddAttribute: '_AreHTML_AddAttribute',\n AddStyle: '_AreHTML_AddStyle',\n AddListener: '_AreHTML_AddListener',\n AddInterpolation: '_AreHTML_AddInterpolation',\n AddComment: '_AreHTML_AddComment',\n AddStaticHTML: '_AreHTML_AddStaticHTML',\n HideElement: '_AreHTML_HideElement',\n} as const"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/instructions/AreHTML.instructions.constants.ts"],"names":[],"mappings":";;AAEO,MAAM,mBAAA,GAAsB;AAAA,EAC/B,UAAA,EAAY,qBAAA;AAAA,EACZ,OAAA,EAAS,kBAAA;AAAA,EACT,YAAA,EAAc,uBAAA;AAAA,EACd,QAAA,EAAU,mBAAA;AAAA,EACV,WAAA,EAAa,sBAAA;AAAA,EACb,gBAAA,EAAkB,2BAAA;AAAA,EAClB,UAAA,EAAY,qBAAA;AAAA,EACZ,WAAA,EAAa;AACjB","file":"AreHTML.instructions.constants.mjs","sourcesContent":["\n\nexport const AreHTMLInstructions = {\n AddElement: '_AreHTML_AddElement',\n AddText: '_AreHTML_AddText',\n AddAttribute: '_AreHTML_AddAttribute',\n AddStyle: '_AreHTML_AddStyle',\n AddListener: '_AreHTML_AddListener',\n AddInterpolation: '_AreHTML_AddInterpolation',\n AddComment: '_AreHTML_AddComment',\n HideElement: '_AreHTML_HideElement',\n} as const"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/instructions/AreHTML.instructions.constants.ts"],"names":[],"mappings":";;AAEO,MAAM,mBAAA,GAAsB;AAAA,EAC/B,UAAA,EAAY,qBAAA;AAAA,EACZ,OAAA,EAAS,kBAAA;AAAA,EACT,YAAA,EAAc,uBAAA;AAAA,EACd,QAAA,EAAU,mBAAA;AAAA,EACV,WAAA,EAAa,sBAAA;AAAA,EACb,gBAAA,EAAkB,2BAAA;AAAA,EAClB,UAAA,EAAY,qBAAA;AAAA,EACZ,aAAA,EAAe,wBAAA;AAAA,EACf,WAAA,EAAa;AACjB","file":"AreHTML.instructions.constants.mjs","sourcesContent":["\n\nexport const AreHTMLInstructions = {\n AddElement: '_AreHTML_AddElement',\n AddText: '_AreHTML_AddText',\n AddAttribute: '_AreHTML_AddAttribute',\n AddStyle: '_AreHTML_AddStyle',\n AddListener: '_AreHTML_AddListener',\n AddInterpolation: '_AreHTML_AddInterpolation',\n AddComment: '_AreHTML_AddComment',\n AddStaticHTML: '_AreHTML_AddStaticHTML',\n HideElement: '_AreHTML_HideElement',\n} as const"]}
|
|
@@ -28,6 +28,14 @@ type AreHtmlAddStyleInstructionPayload = {
|
|
|
28
28
|
/** Full CSS string to inject as a <style> block scoped to the component. Applied to the document head and reverted on unmount. */
|
|
29
29
|
styles: string;
|
|
30
30
|
};
|
|
31
|
+
type AreHtmlAddStaticHTMLInstructionPayload = {
|
|
32
|
+
/**
|
|
33
|
+
* Verbatim inner markup of a static island, materialised on the parent
|
|
34
|
+
* element in a single pass (browser-parsed `innerHTML` / cached `<template>`
|
|
35
|
+
* clone). Decodes HTML entities (e.g. ` `) for free via the parser.
|
|
36
|
+
*/
|
|
37
|
+
html: string;
|
|
38
|
+
};
|
|
31
39
|
type AreHtmlHideInstructionPayload = {
|
|
32
40
|
/**
|
|
33
41
|
* Optional explicit display value to restore when the element becomes
|
|
@@ -49,4 +57,4 @@ type AreHtmlAddInterpolationInstructionPayload = {
|
|
|
49
57
|
content: (...args: any[]) => string;
|
|
50
58
|
};
|
|
51
59
|
|
|
52
|
-
export type { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload, AreHtmlHideInstructionPayload };
|
|
60
|
+
export type { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStaticHTMLInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload, AreHtmlHideInstructionPayload };
|
|
@@ -28,6 +28,14 @@ type AreHtmlAddStyleInstructionPayload = {
|
|
|
28
28
|
/** Full CSS string to inject as a <style> block scoped to the component. Applied to the document head and reverted on unmount. */
|
|
29
29
|
styles: string;
|
|
30
30
|
};
|
|
31
|
+
type AreHtmlAddStaticHTMLInstructionPayload = {
|
|
32
|
+
/**
|
|
33
|
+
* Verbatim inner markup of a static island, materialised on the parent
|
|
34
|
+
* element in a single pass (browser-parsed `innerHTML` / cached `<template>`
|
|
35
|
+
* clone). Decodes HTML entities (e.g. ` `) for free via the parser.
|
|
36
|
+
*/
|
|
37
|
+
html: string;
|
|
38
|
+
};
|
|
31
39
|
type AreHtmlHideInstructionPayload = {
|
|
32
40
|
/**
|
|
33
41
|
* Optional explicit display value to restore when the element becomes
|
|
@@ -49,4 +57,4 @@ type AreHtmlAddInterpolationInstructionPayload = {
|
|
|
49
57
|
content: (...args: any[]) => string;
|
|
50
58
|
};
|
|
51
59
|
|
|
52
|
-
export type { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload, AreHtmlHideInstructionPayload };
|
|
60
|
+
export type { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStaticHTMLInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload, AreHtmlHideInstructionPayload };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A_TYPES__Ctor } from '@adaas/a-concept';
|
|
2
|
-
import { a as AreDirective } from '../../AreBinding.attribute-
|
|
2
|
+
import { a as AreDirective } from '../../AreBinding.attribute-BWzEIw6H.mjs';
|
|
3
3
|
import '@adaas/are';
|
|
4
4
|
import '../AreStyle/AreStyle.context.mjs';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A_TYPES__Ctor } from '@adaas/a-concept';
|
|
2
|
-
import { a as AreDirective } from '../../AreBinding.attribute-
|
|
2
|
+
import { a as AreDirective } from '../../AreBinding.attribute-GpT-5Qmf.js';
|
|
3
3
|
import '@adaas/are';
|
|
4
4
|
import '../AreStyle/AreStyle.context.js';
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AreTokenizer, AreNode, AreContext } from '@adaas/are';
|
|
2
2
|
import { A_Logger } from '@adaas/a-utils/a-logger';
|
|
3
|
-
import { d as AreHTMLAttribute } from '../../AreBinding.attribute-
|
|
3
|
+
import { d as AreHTMLAttribute } from '../../AreBinding.attribute-BWzEIw6H.mjs';
|
|
4
4
|
import '@adaas/a-concept';
|
|
5
5
|
import '../AreStyle/AreStyle.context.mjs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AreTokenizer, AreNode, AreContext } from '@adaas/are';
|
|
2
2
|
import { A_Logger } from '@adaas/a-utils/a-logger';
|
|
3
|
-
import { d as AreHTMLAttribute } from '../../AreBinding.attribute-
|
|
3
|
+
import { d as AreHTMLAttribute } from '../../AreBinding.attribute-GpT-5Qmf.js';
|
|
4
4
|
import '@adaas/a-concept';
|
|
5
5
|
import '../AreStyle/AreStyle.context.js';
|
|
6
6
|
|