@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.
Files changed (191) hide show
  1. package/dist/browser/index.d.mts +194 -10
  2. package/dist/browser/index.mjs +696 -245
  3. package/dist/browser/index.mjs.map +1 -1
  4. package/dist/node/{AreBinding.attribute-doUvtOjc.d.mts → AreBinding.attribute-BWzEIw6H.d.mts} +45 -0
  5. package/dist/node/{AreBinding.attribute-Bm5LlOyE.d.ts → AreBinding.attribute-GpT-5Qmf.d.ts} +45 -0
  6. package/dist/node/attributes/AreBinding.attribute.d.mts +1 -1
  7. package/dist/node/attributes/AreBinding.attribute.d.ts +1 -1
  8. package/dist/node/attributes/AreDirective.attribute.d.mts +1 -1
  9. package/dist/node/attributes/AreDirective.attribute.d.ts +1 -1
  10. package/dist/node/attributes/AreEvent.attribute.d.mts +1 -1
  11. package/dist/node/attributes/AreEvent.attribute.d.ts +1 -1
  12. package/dist/node/attributes/AreStatic.attribute.d.mts +1 -1
  13. package/dist/node/attributes/AreStatic.attribute.d.ts +1 -1
  14. package/dist/node/directives/AreDirectiveFor.directive.d.mts +18 -1
  15. package/dist/node/directives/AreDirectiveFor.directive.d.ts +18 -1
  16. package/dist/node/directives/AreDirectiveFor.directive.js +57 -9
  17. package/dist/node/directives/AreDirectiveFor.directive.js.map +1 -1
  18. package/dist/node/directives/AreDirectiveFor.directive.mjs +57 -9
  19. package/dist/node/directives/AreDirectiveFor.directive.mjs.map +1 -1
  20. package/dist/node/directives/AreDirectiveIf.directive.d.mts +18 -2
  21. package/dist/node/directives/AreDirectiveIf.directive.d.ts +18 -2
  22. package/dist/node/directives/AreDirectiveIf.directive.js +29 -6
  23. package/dist/node/directives/AreDirectiveIf.directive.js.map +1 -1
  24. package/dist/node/directives/AreDirectiveIf.directive.mjs +29 -6
  25. package/dist/node/directives/AreDirectiveIf.directive.mjs.map +1 -1
  26. package/dist/node/directives/AreDirectiveShow.directive.d.mts +1 -1
  27. package/dist/node/directives/AreDirectiveShow.directive.d.ts +1 -1
  28. package/dist/node/engine/AreHTML.compiler.d.mts +4 -2
  29. package/dist/node/engine/AreHTML.compiler.d.ts +4 -2
  30. package/dist/node/engine/AreHTML.compiler.js +11 -4
  31. package/dist/node/engine/AreHTML.compiler.js.map +1 -1
  32. package/dist/node/engine/AreHTML.compiler.mjs +11 -4
  33. package/dist/node/engine/AreHTML.compiler.mjs.map +1 -1
  34. package/dist/node/engine/AreHTML.constants.d.mts +33 -1
  35. package/dist/node/engine/AreHTML.constants.d.ts +33 -1
  36. package/dist/node/engine/AreHTML.constants.js +166 -0
  37. package/dist/node/engine/AreHTML.constants.js.map +1 -1
  38. package/dist/node/engine/AreHTML.constants.mjs +165 -1
  39. package/dist/node/engine/AreHTML.constants.mjs.map +1 -1
  40. package/dist/node/engine/AreHTML.context.d.mts +66 -0
  41. package/dist/node/engine/AreHTML.context.d.ts +66 -0
  42. package/dist/node/engine/AreHTML.context.js +98 -0
  43. package/dist/node/engine/AreHTML.context.js.map +1 -1
  44. package/dist/node/engine/AreHTML.context.mjs +98 -0
  45. package/dist/node/engine/AreHTML.context.mjs.map +1 -1
  46. package/dist/node/engine/AreHTML.interpreter.d.mts +3 -0
  47. package/dist/node/engine/AreHTML.interpreter.d.ts +3 -0
  48. package/dist/node/engine/AreHTML.interpreter.js +66 -10
  49. package/dist/node/engine/AreHTML.interpreter.js.map +1 -1
  50. package/dist/node/engine/AreHTML.interpreter.mjs +66 -10
  51. package/dist/node/engine/AreHTML.interpreter.mjs.map +1 -1
  52. package/dist/node/engine/AreHTML.lifecycle.d.mts +1 -8
  53. package/dist/node/engine/AreHTML.lifecycle.d.ts +1 -8
  54. package/dist/node/engine/AreHTML.lifecycle.js +29 -44
  55. package/dist/node/engine/AreHTML.lifecycle.js.map +1 -1
  56. package/dist/node/engine/AreHTML.lifecycle.mjs +29 -44
  57. package/dist/node/engine/AreHTML.lifecycle.mjs.map +1 -1
  58. package/dist/node/engine/AreHTML.tokenizer.d.mts +1 -1
  59. package/dist/node/engine/AreHTML.tokenizer.d.ts +1 -1
  60. package/dist/node/engine/AreHTML.tokenizer.js +7 -1
  61. package/dist/node/engine/AreHTML.tokenizer.js.map +1 -1
  62. package/dist/node/engine/AreHTML.tokenizer.mjs +7 -1
  63. package/dist/node/engine/AreHTML.tokenizer.mjs.map +1 -1
  64. package/dist/node/engine/AreHTML.transformer.d.mts +1 -1
  65. package/dist/node/engine/AreHTML.transformer.d.ts +1 -1
  66. package/dist/node/index.d.mts +4 -3
  67. package/dist/node/index.d.ts +4 -3
  68. package/dist/node/index.js +7 -0
  69. package/dist/node/index.mjs +1 -0
  70. package/dist/node/instructions/AddStaticHTML.instruction.d.mts +8 -0
  71. package/dist/node/instructions/AddStaticHTML.instruction.d.ts +8 -0
  72. package/dist/node/instructions/AddStaticHTML.instruction.js +31 -0
  73. package/dist/node/instructions/AddStaticHTML.instruction.js.map +1 -0
  74. package/dist/node/instructions/AddStaticHTML.instruction.mjs +24 -0
  75. package/dist/node/instructions/AddStaticHTML.instruction.mjs.map +1 -0
  76. package/dist/node/instructions/AreHTML.instructions.constants.d.mts +1 -0
  77. package/dist/node/instructions/AreHTML.instructions.constants.d.ts +1 -0
  78. package/dist/node/instructions/AreHTML.instructions.constants.js +1 -0
  79. package/dist/node/instructions/AreHTML.instructions.constants.js.map +1 -1
  80. package/dist/node/instructions/AreHTML.instructions.constants.mjs +1 -0
  81. package/dist/node/instructions/AreHTML.instructions.constants.mjs.map +1 -1
  82. package/dist/node/instructions/AreHTML.instructions.types.d.mts +9 -1
  83. package/dist/node/instructions/AreHTML.instructions.types.d.ts +9 -1
  84. package/dist/node/lib/AreDirective/AreDirective.component.d.mts +1 -1
  85. package/dist/node/lib/AreDirective/AreDirective.component.d.ts +1 -1
  86. package/dist/node/lib/AreDirective/AreDirective.types.d.mts +1 -1
  87. package/dist/node/lib/AreDirective/AreDirective.types.d.ts +1 -1
  88. package/dist/node/lib/AreHTML/AreHTML.tokenizer.d.mts +1 -1
  89. package/dist/node/lib/AreHTML/AreHTML.tokenizer.d.ts +1 -1
  90. package/dist/node/lib/AreHTMLAttribute/AreHTML.attribute.d.mts +1 -1
  91. package/dist/node/lib/AreHTMLAttribute/AreHTML.attribute.d.ts +1 -1
  92. package/dist/node/lib/AreHTMLNode/AreHTMLNode.d.mts +1 -1
  93. package/dist/node/lib/AreHTMLNode/AreHTMLNode.d.ts +1 -1
  94. package/dist/node/lib/AreHTMLNode/AreHTMLNode.js +51 -0
  95. package/dist/node/lib/AreHTMLNode/AreHTMLNode.js.map +1 -1
  96. package/dist/node/lib/AreHTMLNode/AreHTMLNode.mjs +51 -0
  97. package/dist/node/lib/AreHTMLNode/AreHTMLNode.mjs.map +1 -1
  98. package/dist/node/lib/AreRoot/AreRoot.component.js.map +1 -1
  99. package/dist/node/lib/AreRoot/AreRoot.component.mjs.map +1 -1
  100. package/dist/node/nodes/AreComment.d.mts +1 -1
  101. package/dist/node/nodes/AreComment.d.ts +1 -1
  102. package/dist/node/nodes/AreComponent.d.mts +1 -1
  103. package/dist/node/nodes/AreComponent.d.ts +1 -1
  104. package/dist/node/nodes/AreInterpolation.d.mts +1 -1
  105. package/dist/node/nodes/AreInterpolation.d.ts +1 -1
  106. package/dist/node/nodes/AreRoot.d.mts +1 -1
  107. package/dist/node/nodes/AreRoot.d.ts +1 -1
  108. package/dist/node/nodes/AreText.d.mts +1 -1
  109. package/dist/node/nodes/AreText.d.ts +1 -1
  110. package/examples/dashboard/concept.ts +1 -1
  111. package/examples/dashboard/dist/index.html +1 -1
  112. package/examples/dashboard/dist/{mqh9ryml-xat335.js → mqiw5sqa-ypckmj.js} +403 -57
  113. package/examples/for-perf/dist/index.html +1 -1
  114. package/examples/for-perf/dist/{mqh9ryfo-6a8d0o.js → mqp8i2py-vltsx0.js} +3030 -2474
  115. package/examples/lazy-loading/README.md +76 -0
  116. package/examples/lazy-loading/concept.ts +55 -0
  117. package/examples/lazy-loading/containers/UI.container.ts +215 -0
  118. package/examples/lazy-loading/dist/app.js +3803 -0
  119. package/examples/{for-perf/dist/mqh9ryfq-4pf5cv.js → lazy-loading/dist/chunks/chunk-6K72IBO4.js} +2708 -5476
  120. package/examples/lazy-loading/dist/index.html +36 -0
  121. package/examples/lazy-loading/dist/lazy/about-page.js +59 -0
  122. package/examples/lazy-loading/dist/lazy/reports-page.js +65 -0
  123. package/examples/lazy-loading/dist/lazy/settings-page.js +54 -0
  124. package/examples/lazy-loading/public/index.html +36 -0
  125. package/examples/lazy-loading/src/components/AppShell.component.ts +44 -0
  126. package/examples/lazy-loading/src/components/HomePage.component.ts +59 -0
  127. package/examples/lazy-loading/src/components/LazyOutlet.component.ts +108 -0
  128. package/examples/lazy-loading/src/components/NavBar.component.ts +98 -0
  129. package/examples/lazy-loading/src/concept.ts +116 -0
  130. package/examples/lazy-loading/src/lazy/AboutPage.component.ts +54 -0
  131. package/examples/lazy-loading/src/lazy/ReportsPage.component.ts +56 -0
  132. package/examples/lazy-loading/src/lazy/SettingsPage.component.ts +45 -0
  133. package/examples/lazy-loading/src/runtime/ComponentManifest.fragment.ts +61 -0
  134. package/examples/lazy-loading/src/runtime/LazyComponentResolver.fragment.ts +77 -0
  135. package/examples/os-desktop/README.md +91 -0
  136. package/examples/os-desktop/concept.ts +54 -0
  137. package/examples/os-desktop/containers/OS.container.ts +198 -0
  138. package/examples/os-desktop/containers/apps/AppBackend.ts +29 -0
  139. package/examples/os-desktop/containers/apps/GanttApp.backend.ts +56 -0
  140. package/examples/os-desktop/containers/apps/MarketingApp.backend.ts +68 -0
  141. package/examples/os-desktop/dist/app.js +4410 -0
  142. package/examples/os-desktop/dist/apps/gantt/app.js +271 -0
  143. package/examples/os-desktop/dist/apps/marketing/app.js +346 -0
  144. package/examples/{for-perf/dist/mqh9ryde-m243t8.js → os-desktop/dist/chunks/chunk-6K72IBO4.js} +2708 -5476
  145. package/examples/os-desktop/dist/chunks/chunk-EIIGUL6N.js +30 -0
  146. package/examples/os-desktop/dist/chunks/chunk-WOH7L5UR.js +30 -0
  147. package/examples/os-desktop/dist/index.html +33 -0
  148. package/examples/os-desktop/public/index.html +33 -0
  149. package/examples/os-desktop/src/apps/gantt/GanttApp.component.ts +41 -0
  150. package/examples/os-desktop/src/apps/gantt/GanttChart.component.ts +126 -0
  151. package/examples/os-desktop/src/apps/gantt/GanttStore.ts +47 -0
  152. package/examples/os-desktop/src/apps/gantt/GanttToolbar.component.ts +73 -0
  153. package/examples/os-desktop/src/apps/gantt/index.ts +13 -0
  154. package/examples/os-desktop/src/apps/marketing/MarketingApp.component.ts +53 -0
  155. package/examples/os-desktop/src/apps/marketing/MarketingStore.ts +34 -0
  156. package/examples/os-desktop/src/apps/marketing/PostEditor.component.ts +153 -0
  157. package/examples/os-desktop/src/apps/marketing/PostPreview.component.ts +110 -0
  158. package/examples/os-desktop/src/apps/marketing/index.ts +16 -0
  159. package/examples/os-desktop/src/concept.ts +126 -0
  160. package/examples/os-desktop/src/os/AppStage.component.ts +112 -0
  161. package/examples/os-desktop/src/os/AppWindow.component.ts +102 -0
  162. package/examples/os-desktop/src/os/Desktop.component.ts +106 -0
  163. package/examples/os-desktop/src/os/Dock.component.ts +174 -0
  164. package/examples/os-desktop/src/os/Hud.component.ts +83 -0
  165. package/examples/os-desktop/src/os/Launchpad.component.ts +191 -0
  166. package/examples/os-desktop/src/os/MenuBar.component.ts +156 -0
  167. package/examples/os-desktop/src/runtime/AppComponentResolver.fragment.ts +121 -0
  168. package/examples/os-desktop/src/runtime/AppRegistry.fragment.ts +104 -0
  169. package/examples/os-desktop/src/signals/MouseState.signal.ts +34 -0
  170. package/examples/os-desktop/src/signals/OSRoute.signal.ts +37 -0
  171. package/examples/os-desktop/src/signals/SelectionState.signal.ts +34 -0
  172. package/examples/signal-routing/dist/index.html +1 -1
  173. package/examples/signal-routing/dist/{mqh9ryc9-dkcbkx.js → mqp8hgce-4d6rh0.js} +3196 -2640
  174. package/package.json +13 -9
  175. package/src/directives/AreDirectiveFor.directive.ts +99 -16
  176. package/src/directives/AreDirectiveIf.directive.ts +33 -4
  177. package/src/engine/AreHTML.compiler.ts +25 -2
  178. package/src/engine/AreHTML.constants.ts +142 -0
  179. package/src/engine/AreHTML.context.ts +112 -0
  180. package/src/engine/AreHTML.interpreter.ts +114 -13
  181. package/src/engine/AreHTML.lifecycle.ts +81 -74
  182. package/src/engine/AreHTML.tokenizer.ts +30 -1
  183. package/src/index.ts +1 -0
  184. package/src/instructions/AddStaticHTML.instruction.ts +23 -0
  185. package/src/instructions/AreHTML.instructions.constants.ts +1 -0
  186. package/src/instructions/AreHTML.instructions.types.ts +9 -0
  187. package/src/lib/AreHTMLNode/AreHTMLNode.ts +74 -0
  188. package/src/lib/AreRoot/AreRoot.component.ts +3 -3
  189. package/tests/PropPropagation.test.ts +181 -0
  190. package/tests/StaticIsland.test.ts +115 -0
  191. package/tests/jest.setup.ts +11 -0
@@ -2845,8 +2845,8 @@ var __decorateClass2 = /* @__PURE__ */ __name((decorators, target, key, kind) =>
2845
2845
  }, "__decorateClass");
2846
2846
  var __decorateParam2 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam");
2847
2847
 
2848
- // node_modules/@adaas/a-frame/dist/browser/chunk-UWXOV5XO.mjs
2849
- var t = "0.1.15";
2848
+ // node_modules/@adaas/a-frame/dist/browser/chunk-VBGV4GJ5.mjs
2849
+ var t = "0.1.16";
2850
2850
 
2851
2851
  // node_modules/@adaas/a-frame/dist/browser/chunk-IKIN4MJV.mjs
2852
2852
  var h2 = Object.defineProperty;
@@ -2858,7 +2858,7 @@ var k2 = /* @__PURE__ */ __name((c3, a4, e, d4) => {
2858
2858
  }, "k");
2859
2859
  var l = /* @__PURE__ */ __name((c3, a4) => (e, d4) => a4(e, d4, c3), "l");
2860
2860
 
2861
- // node_modules/@adaas/a-frame/dist/browser/chunk-PTHJM2MP.mjs
2861
+ // node_modules/@adaas/a-frame/dist/browser/chunk-6K7VISNV.mjs
2862
2862
  var _a39;
2863
2863
  var _2 = (_a39 = class extends H {
2864
2864
  get A_FRAME_TOKEN() {
@@ -3468,7 +3468,7 @@ var n3 = (_a48 = class extends D {
3468
3468
  j2(n3, "A_FrameDefinition");
3469
3469
  var h3 = n3;
3470
3470
 
3471
- // node_modules/@adaas/a-frame/dist/browser/chunk-FYZWOISU.mjs
3471
+ // node_modules/@adaas/a-frame/dist/browser/chunk-3ROGJ3YE.mjs
3472
3472
  var _a49;
3473
3473
  var z2 = (_a49 = class extends H {
3474
3474
  constructor() {
@@ -4439,7 +4439,7 @@ var a3 = (_a64 = class extends D {
4439
4439
  j2(a3, "A_FrameSchema");
4440
4440
  var s2 = a3;
4441
4441
 
4442
- // node_modules/@adaas/a-frame/dist/browser/chunk-PIH5MHMV.mjs
4442
+ // node_modules/@adaas/a-frame/dist/browser/chunk-4KUCX5R6.mjs
4443
4443
  var d3 = { Request: "_A_FRAME_REQUEST", Socket: "_A_FRAME_SOCKET", Stream: "_A_FRAME_STREAM", Send: "_A_FRAME_SEND" };
4444
4444
  var _a65;
4445
4445
  var J2 = (_a65 = class extends H {
@@ -5008,7 +5008,7 @@ var l3 = (_a76 = class extends O {
5008
5008
  j2(l3, "A_FrameChannel"), k2([N.Extend({ name: r4.Embed, scope: [h3] }), l(0, Yt(te)), l(1, Yt(f3))], l3.prototype, "embedDefinition", 1), k2([N.Extend({ name: m3.Embed, scope: [w2] }), l(0, Yt(te)), l(1, Yt(f3))], l3.prototype, "embedNamespace", 1), k2([N.Extend({ name: r5.Embed, scope: [_4] }), l(0, Yt(te)), l(1, Yt(f3))], l3.prototype, "embedSegment", 1), k2([N.Extend({ name: D3.Generate, scope: [O3] }), l(0, Yt(te)), l(1, Yt(v4))], l3.prototype, "generateDynamicStructure", 1), k2([N.Extend({ name: D3.Patch, scope: [O3] }), l(0, Yt(te)), l(1, Yt(v4))], l3.prototype, "patchDynamicStructure", 1), k2([N.Extend({ name: C4.Generate, scope: [P3] }), l(0, Yt(te)), l(1, Yt(w5))], l3.prototype, "generateDynamicFeature", 1), k2([N.Extend({ name: C4.Patch, scope: [P3] }), l(0, Yt(te)), l(1, Yt(w5))], l3.prototype, "patchDynamicFeature", 1), k2([N.Extend({ name: F3.Generate, scope: [w4] }), l(0, Yt(te)), l(1, Yt(f2))], l3.prototype, "generateDynamicContent", 1), k2([N.Extend({ name: F3.Patch, scope: [w4] }), l(0, Yt(te)), l(1, Yt(f2))], l3.prototype, "patchDynamicContent", 1), k2([N.Extend({ name: n4.Generate, scope: [m4] }), l(0, Yt(te)), l(1, Yt(f3))], l3.prototype, "generateCompletion", 1), k2([N.Extend({ name: r6.Extract, scope: [s2] }), l(0, Yt(te)), l(1, Yt(f3))], l3.prototype, "extractSchema", 1), k2([N.Extend({ name: r6.ExtractMultiple, scope: [s2] }), l(0, Yt(te)), l(1, Yt(f3))], l3.prototype, "extractSchemaMultiple", 1);
5009
5009
  var Fe2 = l3;
5010
5010
 
5011
- // node_modules/@adaas/a-frame/dist/browser/chunk-2O3HAEYW.mjs
5011
+ // node_modules/@adaas/a-frame/dist/browser/chunk-P6WICUUU.mjs
5012
5012
  var _a77;
5013
5013
  var r7 = (_a77 = class extends Fe2 {
5014
5014
  async request(e, a4) {
@@ -12879,6 +12879,7 @@ var AreHTMLInstructions = {
12879
12879
  AddListener: "_AreHTML_AddListener",
12880
12880
  AddInterpolation: "_AreHTML_AddInterpolation",
12881
12881
  AddComment: "_AreHTML_AddComment",
12882
+ AddStaticHTML: "_AreHTML_AddStaticHTML",
12882
12883
  HideElement: "_AreHTML_HideElement"
12883
12884
  };
12884
12885
 
@@ -13409,6 +13410,24 @@ AddListenerInstruction = __decorateClass([
13409
13410
  })
13410
13411
  ], AddListenerInstruction);
13411
13412
 
13413
+ // src/instructions/AddStaticHTML.instruction.ts
13414
+ var AddStaticHTMLInstruction = class extends AreMutation {
13415
+ constructor(parent, props) {
13416
+ if ("aseid" in props) {
13417
+ super(props);
13418
+ } else {
13419
+ super(AreHTMLInstructions.AddStaticHTML, parent, props);
13420
+ }
13421
+ }
13422
+ };
13423
+ __name(AddStaticHTMLInstruction, "AddStaticHTMLInstruction");
13424
+ AddStaticHTMLInstruction = __decorateClass([
13425
+ R4.Define({
13426
+ namespace: "a-are-html",
13427
+ 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. &nbsp;) for free.'
13428
+ })
13429
+ ], AddStaticHTMLInstruction);
13430
+
13412
13431
  // src/instructions/AddStyle.instruction.ts
13413
13432
  var AddStyleInstruction = class extends AreMutation {
13414
13433
  constructor(parent, props) {
@@ -13471,6 +13490,27 @@ var AreHTMLNode = class extends AreNode {
13471
13490
  get tag() {
13472
13491
  return this.aseid.entity;
13473
13492
  }
13493
+ /**
13494
+ * The verbatim inner markup captured when this node was identified as a
13495
+ * static island, or `undefined` for ordinary (per-node) nodes.
13496
+ */
13497
+ get staticInnerHTML() {
13498
+ return this._staticInnerHTML;
13499
+ }
13500
+ /**
13501
+ * Whether this node is a static-island root (see `_staticInnerHTML`).
13502
+ */
13503
+ get isStaticIsland() {
13504
+ return this._staticInnerHTML !== void 0;
13505
+ }
13506
+ /**
13507
+ * Marks this node as a static-island root, capturing the verbatim inner
13508
+ * markup to be materialised in one shot by the interpreter. Called by the
13509
+ * tokenizer when the node's inner content is detected to be fully static.
13510
+ */
13511
+ markStatic(innerHTML) {
13512
+ this._staticInnerHTML = innerHTML;
13513
+ }
13474
13514
  /**
13475
13515
  * The static attributes defined for the node, which are typically used to represent static properties or characteristics of the node that do not change based on the context or state. These attributes are usually defined in the template and are not reactive.
13476
13516
  *
@@ -13794,6 +13834,171 @@ function toDOMString(value) {
13794
13834
  }
13795
13835
  }
13796
13836
  __name(toDOMString, "toDOMString");
13837
+ var STANDARD_HTML_TAGS = /* @__PURE__ */ new Set([
13838
+ // root / sections
13839
+ "html",
13840
+ "body",
13841
+ "header",
13842
+ "footer",
13843
+ "main",
13844
+ "nav",
13845
+ "section",
13846
+ "article",
13847
+ "aside",
13848
+ "address",
13849
+ "hgroup",
13850
+ // headings
13851
+ "h1",
13852
+ "h2",
13853
+ "h3",
13854
+ "h4",
13855
+ "h5",
13856
+ "h6",
13857
+ // grouping
13858
+ "div",
13859
+ "p",
13860
+ "span",
13861
+ "pre",
13862
+ "blockquote",
13863
+ "figure",
13864
+ "figcaption",
13865
+ "hr",
13866
+ "br",
13867
+ "wbr",
13868
+ // lists
13869
+ "ul",
13870
+ "ol",
13871
+ "li",
13872
+ "dl",
13873
+ "dt",
13874
+ "dd",
13875
+ "menu",
13876
+ // text-level / phrasing
13877
+ "a",
13878
+ "b",
13879
+ "i",
13880
+ "u",
13881
+ "s",
13882
+ "em",
13883
+ "strong",
13884
+ "small",
13885
+ "mark",
13886
+ "abbr",
13887
+ "cite",
13888
+ "q",
13889
+ "code",
13890
+ "kbd",
13891
+ "samp",
13892
+ "var",
13893
+ "sub",
13894
+ "sup",
13895
+ "time",
13896
+ "data",
13897
+ "dfn",
13898
+ "bdi",
13899
+ "bdo",
13900
+ "ruby",
13901
+ "rt",
13902
+ "rp",
13903
+ "del",
13904
+ "ins",
13905
+ // media / embedded (no special namespace handling needed)
13906
+ "img",
13907
+ "picture",
13908
+ "source",
13909
+ "figure",
13910
+ "audio",
13911
+ "video",
13912
+ "track",
13913
+ // tables
13914
+ "table",
13915
+ "caption",
13916
+ "colgroup",
13917
+ "col",
13918
+ "thead",
13919
+ "tbody",
13920
+ "tfoot",
13921
+ "tr",
13922
+ "th",
13923
+ "td",
13924
+ // forms (display only — these still render fine from innerHTML)
13925
+ "label",
13926
+ "fieldset",
13927
+ "legend",
13928
+ "datalist",
13929
+ "option",
13930
+ "optgroup",
13931
+ "output",
13932
+ "progress",
13933
+ "meter",
13934
+ // interactive
13935
+ "details",
13936
+ "summary",
13937
+ "dialog"
13938
+ ]);
13939
+ function isStaticMarkup(inner) {
13940
+ if (!inner) return false;
13941
+ if (inner.indexOf("{{") !== -1) return false;
13942
+ const n6 = inner.length;
13943
+ let i6 = 0;
13944
+ while (i6 < n6) {
13945
+ const lt = inner.indexOf("<", i6);
13946
+ if (lt === -1) break;
13947
+ if (inner.startsWith("<!--", lt)) {
13948
+ const end = inner.indexOf("-->", lt + 4);
13949
+ if (end === -1) return false;
13950
+ i6 = end + 3;
13951
+ continue;
13952
+ }
13953
+ if (inner[lt + 1] === "/" || inner[lt + 1] === "!" || inner[lt + 1] === "?") {
13954
+ const gt2 = inner.indexOf(">", lt);
13955
+ if (gt2 === -1) return false;
13956
+ i6 = gt2 + 1;
13957
+ continue;
13958
+ }
13959
+ const nameMatch = /^<([a-zA-Z][a-zA-Z0-9-]*)/.exec(inner.slice(lt));
13960
+ if (!nameMatch) {
13961
+ i6 = lt + 1;
13962
+ continue;
13963
+ }
13964
+ const tag = nameMatch[1].toLowerCase();
13965
+ if (tag.indexOf("-") !== -1 || !STANDARD_HTML_TAGS.has(tag)) return false;
13966
+ let j5 = lt + nameMatch[0].length;
13967
+ let inSingle = false;
13968
+ let inDouble = false;
13969
+ let atNameBoundary = true;
13970
+ let tagEnd = -1;
13971
+ while (j5 < n6) {
13972
+ const ch = inner[j5];
13973
+ if (inDouble) {
13974
+ if (ch === '"') inDouble = false;
13975
+ } else if (inSingle) {
13976
+ if (ch === "'") inSingle = false;
13977
+ } else if (ch === '"') {
13978
+ inDouble = true;
13979
+ atNameBoundary = false;
13980
+ } else if (ch === "'") {
13981
+ inSingle = true;
13982
+ atNameBoundary = false;
13983
+ } else if (ch === ">") {
13984
+ tagEnd = j5;
13985
+ break;
13986
+ } else if (ch === " " || ch === " " || ch === "\n" || ch === "\r" || ch === "/") {
13987
+ atNameBoundary = true;
13988
+ } else {
13989
+ if (atNameBoundary && (ch === "$" || ch === ":" || ch === "@")) {
13990
+ return false;
13991
+ }
13992
+ atNameBoundary = false;
13993
+ }
13994
+ j5++;
13995
+ }
13996
+ if (tagEnd === -1) return false;
13997
+ i6 = tagEnd + 1;
13998
+ }
13999
+ return true;
14000
+ }
14001
+ __name(isStaticMarkup, "isStaticMarkup");
13797
14002
 
13798
14003
  // src/engine/AreHTML.context.ts
13799
14004
  var AreHTMLEngineContext = class extends AreContext {
@@ -13837,11 +14042,109 @@ var AreHTMLEngineContext = class extends AreContext {
13837
14042
  */
13838
14043
  elementListeners: /* @__PURE__ */ new WeakMap()
13839
14044
  };
14045
+ /**
14046
+ * Parsed-fragment cache for static islands (see AddStaticHTMLInstruction).
14047
+ *
14048
+ * Keyed by `hostTag\u0000markup`, each entry holds a `DocumentFragment` whose
14049
+ * children were parsed by the browser exactly once — in the *correct element
14050
+ * context* (the host tag), so table fragments (`<tr>`, `<td>`, …) and other
14051
+ * context-sensitive content parse correctly. Repeated static islands with
14052
+ * identical markup (e.g. list rows, reused components) clone the pre-parsed
14053
+ * fragment instead of re-parsing the HTML string on every mount — turning an
14054
+ * O(parse) operation into an O(clone) one.
14055
+ */
14056
+ this._staticFragmentCache = /* @__PURE__ */ new Map();
14057
+ /**
14058
+ * Live-DOM attachments deferred while a mount pass is batching.
14059
+ *
14060
+ * A freshly-mounted subtree is built inside a *detached* root element, so
14061
+ * every descendant `appendChild`/`insertBefore` happens off-document and
14062
+ * triggers zero layout/paint invalidation. The single mutation that actually
14063
+ * connects the built subtree to the live document is deferred and collected
14064
+ * here, then flushed once when the batch closes — collapsing O(nodes) reflows
14065
+ * into O(1) per mount root.
14066
+ */
14067
+ this._pendingAttachments = [];
14068
+ /**
14069
+ * Depth of the currently open batching scopes. Re-entrant so that nested
14070
+ * `beginBatch`/`endBatch` pairs flush exactly once, when the outermost scope
14071
+ * closes.
14072
+ */
14073
+ this._batchDepth = 0;
13840
14074
  this._container = props.container;
13841
14075
  }
13842
14076
  get container() {
13843
14077
  return this._container;
13844
14078
  }
14079
+ /**
14080
+ * `true` while a synchronous mount pass is batching live-DOM attachments.
14081
+ * Interpreter handlers consult this to decide whether to attach an element
14082
+ * immediately or hand the attachment to {@link deferAttach}.
14083
+ */
14084
+ get isBatching() {
14085
+ return this._batchDepth > 0;
14086
+ }
14087
+ /**
14088
+ * Opens a batching scope. Re-entrant: only the outermost matching
14089
+ * {@link endBatch} flushes the deferred attachments, so a single mount pass
14090
+ * connects its built subtree to the live DOM exactly once.
14091
+ */
14092
+ beginBatch() {
14093
+ this._batchDepth++;
14094
+ }
14095
+ /**
14096
+ * Registers a live-DOM attachment to run when the current batch flushes. If
14097
+ * no batch is active the attachment runs immediately, preserving the original
14098
+ * synchronous behaviour for updates that mount outside a batch.
14099
+ *
14100
+ * @param attach the DOM mutation that connects a built subtree to the document
14101
+ */
14102
+ deferAttach(attach) {
14103
+ if (this._batchDepth > 0) {
14104
+ this._pendingAttachments.push(attach);
14105
+ } else {
14106
+ attach();
14107
+ }
14108
+ }
14109
+ /**
14110
+ * Closes a batching scope. When the outermost scope closes, every deferred
14111
+ * attachment runs in registration (document) order, connecting the built
14112
+ * subtrees to the live DOM in a single pass.
14113
+ */
14114
+ endBatch() {
14115
+ if (this._batchDepth === 0) return;
14116
+ this._batchDepth--;
14117
+ if (this._batchDepth > 0) return;
14118
+ const pending = this._pendingAttachments;
14119
+ this._pendingAttachments = [];
14120
+ for (let i6 = 0; i6 < pending.length; i6++) {
14121
+ pending[i6]();
14122
+ }
14123
+ }
14124
+ /**
14125
+ * Returns a `DocumentFragment` containing the parsed form of `html`, parsed
14126
+ * once in the context of `hostTag` (so context-sensitive content such as
14127
+ * table rows/cells parses correctly) and cached thereafter. Callers should
14128
+ * `cloneNode(true)` the returned fragment rather than mutating it, so the
14129
+ * cache stays reusable.
14130
+ *
14131
+ * @param hostTag the tag name of the element the markup will be injected into
14132
+ * @param html verbatim static-island inner markup
14133
+ */
14134
+ getStaticFragment(hostTag, html) {
14135
+ const key = `${hostTag}\0${html}`;
14136
+ let fragment = this._staticFragmentCache.get(key);
14137
+ if (!fragment) {
14138
+ const container = this._container.createElement(hostTag);
14139
+ container.innerHTML = html;
14140
+ fragment = this._container.createDocumentFragment();
14141
+ while (container.firstChild) {
14142
+ fragment.appendChild(container.firstChild);
14143
+ }
14144
+ this._staticFragmentCache.set(key, fragment);
14145
+ }
14146
+ return fragment;
14147
+ }
13845
14148
  getNodeElement(node) {
13846
14149
  if (typeof node === "string") {
13847
14150
  return this.index.nodeToHostElements.get(node);
@@ -13977,6 +14280,9 @@ AreHTMLEngineContext = __decorateClass([
13977
14280
  var AreHTMLCompiler = class extends AreCompiler {
13978
14281
  compileHTMLNode(node, scene, logger, ...args) {
13979
14282
  super.compile(node, scene, logger, ...args);
14283
+ if (node.isStaticIsland && scene.host) {
14284
+ scene.plan(new AddStaticHTMLInstruction(scene.host, { html: node.staticInnerHTML }));
14285
+ }
13980
14286
  if (node.styles?.styles) {
13981
14287
  const host = scene.host;
13982
14288
  if (host) {
@@ -14174,12 +14480,15 @@ var AreHTMLInterpreter = class extends AreInterpreter {
14174
14480
  });
14175
14481
  }
14176
14482
  const element = isSVG ? context.container.createElementNS(SVG_NAMESPACE, tag) : context.container.createElement(tag);
14177
- if (mountPoint.nodeType === Node.ELEMENT_NODE) {
14178
- mountPoint.appendChild(element);
14179
- } else {
14483
+ context.setInstructionElement(declaration, element);
14484
+ const attach = mountPoint.nodeType === Node.ELEMENT_NODE ? () => mountPoint.appendChild(element) : () => {
14180
14485
  mountPoint.parentNode?.insertBefore(element, mountPoint);
14486
+ };
14487
+ if (context.isBatching && mountPoint.isConnected) {
14488
+ context.deferAttach(attach);
14489
+ } else {
14490
+ attach();
14181
14491
  }
14182
- context.setInstructionElement(declaration, element);
14183
14492
  } else {
14184
14493
  const mountPoint = context.container.getElementById(node.id);
14185
14494
  if (!mountPoint) {
@@ -14189,8 +14498,15 @@ var AreHTMLInterpreter = class extends AreInterpreter {
14189
14498
  });
14190
14499
  }
14191
14500
  const element = isSVG ? context.container.createElementNS(SVG_NAMESPACE, tag) : context.container.createElement(tag);
14192
- mountPoint.parentNode?.replaceChild(element, mountPoint);
14193
14501
  context.setInstructionElement(declaration, element);
14502
+ const attach = /* @__PURE__ */ __name(() => {
14503
+ mountPoint.parentNode?.replaceChild(element, mountPoint);
14504
+ }, "attach");
14505
+ if (context.isBatching && mountPoint.isConnected) {
14506
+ context.deferAttach(attach);
14507
+ } else {
14508
+ attach();
14509
+ }
14194
14510
  }
14195
14511
  logger?.debug("green", `Element ${node.aseid.toString()} added to Context:`);
14196
14512
  } catch (error) {
@@ -14465,6 +14781,27 @@ var AreHTMLInterpreter = class extends AreInterpreter {
14465
14781
  element.parentNode?.removeChild(element);
14466
14782
  context.removeInstructionElement(declaration);
14467
14783
  }
14784
+ addStaticHTML(mutation, context, logger) {
14785
+ const element = context.getElementByInstruction(mutation.parent);
14786
+ if (!element || element.nodeType !== Node.ELEMENT_NODE) {
14787
+ throw new AreInterpreterError({
14788
+ title: "Element Not Found",
14789
+ description: `Could not find a DOM element associated with the instruction ASEID "${mutation.parent}". Ensure the host element is rendered before materialising its static island.`
14790
+ });
14791
+ }
14792
+ const el = element;
14793
+ const { html } = mutation.payload;
14794
+ el.textContent = "";
14795
+ const fragment = context.getStaticFragment(el.tagName.toLowerCase(), html);
14796
+ el.appendChild(fragment.cloneNode(true));
14797
+ logger?.debug("green", `Static island materialised onto <${(mutation.owner.parent ?? mutation.owner)?.aseid?.toString?.()}>`);
14798
+ }
14799
+ removeStaticHTML(mutation, context) {
14800
+ const element = context.getElementByInstruction(mutation.parent);
14801
+ if (element && element.nodeType === Node.ELEMENT_NODE) {
14802
+ element.textContent = "";
14803
+ }
14804
+ }
14468
14805
  addComment(declaration, context, store, syntax, directiveContext, logger) {
14469
14806
  const node = declaration.owner.parent;
14470
14807
  const { content, evaluate } = declaration.payload;
@@ -14643,6 +14980,24 @@ __decorateClass([
14643
14980
  __decorateParam(0, Yt(te)),
14644
14981
  __decorateParam(1, Yt(AreHTMLEngineContext))
14645
14982
  ], AreHTMLInterpreter.prototype, "removeText", 1);
14983
+ __decorateClass([
14984
+ R4.Define({
14985
+ description: "Inject a static island's inner markup onto its host element in one pass via a cached, browser-parsed <template> clone. Decodes HTML entities natively."
14986
+ }),
14987
+ AreInterpreter.Apply(AreHTMLInstructions.AddStaticHTML),
14988
+ AreInterpreter.Update(AreHTMLInstructions.AddStaticHTML),
14989
+ __decorateParam(0, Yt(te)),
14990
+ __decorateParam(1, Yt(AreHTMLEngineContext)),
14991
+ __decorateParam(2, Yt(A_Logger))
14992
+ ], AreHTMLInterpreter.prototype, "addStaticHTML", 1);
14993
+ __decorateClass([
14994
+ R4.Define({
14995
+ description: "Clear a static island's injected markup from its host element on revert."
14996
+ }),
14997
+ AreInterpreter.Revert(AreHTMLInstructions.AddStaticHTML),
14998
+ __decorateParam(0, Yt(te)),
14999
+ __decorateParam(1, Yt(AreHTMLEngineContext))
15000
+ ], AreHTMLInterpreter.prototype, "removeStaticHTML", 1);
14646
15001
  __decorateClass([
14647
15002
  R4.Define({
14648
15003
  description: "Add a comment node to the DOM based on the provided declaration instruction."
@@ -14696,7 +15051,12 @@ var AreHTMLTokenizer = class extends AreTokenizer {
14696
15051
  this.ATTR_PATTERN = /([$:@]?[\w.-]+(?::[\w.-]+)?)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>/"'=]+)))?/g;
14697
15052
  }
14698
15053
  tokenize(node, context, logger) {
14699
- super.tokenize(node, context, logger);
15054
+ const isStaticIsland = node instanceof AreComponentNode && !!node.content && isStaticMarkup(node.content);
15055
+ if (isStaticIsland) {
15056
+ node.markStatic(node.content);
15057
+ } else {
15058
+ super.tokenize(node, context, logger);
15059
+ }
14700
15060
  context.startPerformance("attributeExtraction");
14701
15061
  const attributes = this.extractAttributes(node.markup);
14702
15062
  for (const attr of attributes) {
@@ -14773,49 +15133,41 @@ var AreHTMLLifecycle = class extends AreLifecycle {
14773
15133
  const scene = new AreScene(node.aseid);
14774
15134
  scope.register(scene);
14775
15135
  }
14776
- mount(node, scene, logger, ...args) {
15136
+ mount(node, scene, context, logger, ...args) {
14777
15137
  logger?.debug(`[Mount] Component Trigger for <${node.aseid.entity}> with aseid :{${node.aseid.toString()}}`);
14778
15138
  if (scene.isInactive) return;
14779
- node.interpret();
14780
- const stack = [];
14781
- for (let i6 = node.children.length - 1; i6 >= 0; i6--) {
14782
- stack.push({ node: node.children[i6], entered: false });
14783
- }
14784
- const step = /* @__PURE__ */ __name(() => {
14785
- const frame = stack[stack.length - 1];
14786
- const current = frame.node;
14787
- if (frame.entered) {
14788
- stack.pop();
14789
- current.call(AreNodeFeatures.onAfterMount, current.scope);
14790
- return;
14791
- }
14792
- frame.entered = true;
14793
- current.call(AreNodeFeatures.onBeforeMount, current.scope);
14794
- if (!current.scene.isInactive) {
14795
- current.interpret();
14796
- for (let i6 = current.children.length - 1; i6 >= 0; i6--) {
14797
- stack.push({ node: current.children[i6], entered: false });
14798
- }
15139
+ context.beginBatch();
15140
+ const afterMountQueue = [];
15141
+ try {
15142
+ node.interpret();
15143
+ const stack = [];
15144
+ for (let i6 = node.children.length - 1; i6 >= 0; i6--) {
15145
+ stack.push({ node: node.children[i6], entered: false });
14799
15146
  }
14800
- }, "step");
14801
- const drive = /* @__PURE__ */ __name(() => {
14802
- const start = AreSchedulerHelper.now();
14803
15147
  while (stack.length > 0) {
14804
- step();
14805
- if (stack.length > 0 && AreSchedulerHelper.now() - start >= AreHTMLLifecycle.MOUNT_BUDGET_MS) {
14806
- return new Promise((resolve, reject) => {
14807
- AreSchedulerHelper.scheduleMacrotask(() => {
14808
- try {
14809
- resolve(drive());
14810
- } catch (error) {
14811
- reject(error);
14812
- }
14813
- });
14814
- });
15148
+ const frame = stack[stack.length - 1];
15149
+ const current = frame.node;
15150
+ if (frame.entered) {
15151
+ stack.pop();
15152
+ afterMountQueue.push(current);
15153
+ continue;
15154
+ }
15155
+ frame.entered = true;
15156
+ current.call(AreNodeFeatures.onBeforeMount, current.scope);
15157
+ if (!current.scene.isInactive) {
15158
+ current.interpret();
15159
+ for (let i6 = current.children.length - 1; i6 >= 0; i6--) {
15160
+ stack.push({ node: current.children[i6], entered: false });
15161
+ }
14815
15162
  }
14816
15163
  }
14817
- }, "drive");
14818
- return drive();
15164
+ } finally {
15165
+ context.endBatch();
15166
+ }
15167
+ for (let i6 = 0; i6 < afterMountQueue.length; i6++) {
15168
+ const mounted = afterMountQueue[i6];
15169
+ mounted.call(AreNodeFeatures.onAfterMount, mounted.scope);
15170
+ }
14819
15171
  }
14820
15172
  updateDirectiveAttribute(directive, scope, feature, logger, ...args) {
14821
15173
  if (directive.component) {
@@ -14826,13 +15178,6 @@ var AreHTMLLifecycle = class extends AreLifecycle {
14826
15178
  }
14827
15179
  };
14828
15180
  __name(AreHTMLLifecycle, "AreHTMLLifecycle");
14829
- /**
14830
- * Per-chunk time budget (ms) for the time-sliced initial mount walk. While
14831
- * mounting a large subtree we keep applying nodes until this much wall-clock
14832
- * time has elapsed, then yield to the browser so it can paint and process
14833
- * input before the next chunk. ~16ms targets a single animation frame.
14834
- */
14835
- AreHTMLLifecycle.MOUNT_BUDGET_MS = 16;
14836
15181
  __decorateClass([
14837
15182
  AreLifecycle.Init(AreComponentNode),
14838
15183
  __decorateParam(0, Yt(te)),
@@ -14870,7 +15215,8 @@ __decorateClass([
14870
15215
  }),
14871
15216
  __decorateParam(0, Yt(te)),
14872
15217
  __decorateParam(1, Yt(AreScene)),
14873
- __decorateParam(2, Yt(A_Logger))
15218
+ __decorateParam(2, Yt(AreHTMLEngineContext)),
15219
+ __decorateParam(3, Yt(A_Logger))
14874
15220
  ], AreHTMLLifecycle.prototype, "mount", 1);
14875
15221
  __decorateClass([
14876
15222
  N.Extend({
@@ -264,7 +264,7 @@
264
264
  <perf-app></perf-app>
265
265
  </are-root>
266
266
 
267
- <script type="module" src="./mqh9ryfq-4pf5cv.js"></script>
267
+ <script type="module" src="./mqp8i2py-vltsx0.js"></script>
268
268
  </body>
269
269
 
270
270
  </html>