@jqhtml/core 2.3.54 → 2.3.59

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 (88) hide show
  1. package/README.md +3 -1
  2. package/dist/boot.d.ts +0 -0
  3. package/dist/boot.d.ts.map +0 -0
  4. package/dist/boot.js +130 -0
  5. package/dist/boot.js.map +1 -0
  6. package/dist/cache-key-serializer.d.ts +0 -0
  7. package/dist/cache-key-serializer.d.ts.map +0 -0
  8. package/dist/cache-key-serializer.js +140 -0
  9. package/dist/cache-key-serializer.js.map +1 -0
  10. package/dist/component-cache.d.ts +0 -0
  11. package/dist/component-cache.d.ts.map +0 -0
  12. package/dist/component-cache.js +270 -0
  13. package/dist/component-cache.js.map +1 -0
  14. package/dist/component-events.d.ts +0 -0
  15. package/dist/component-events.d.ts.map +0 -0
  16. package/dist/component-events.js +141 -0
  17. package/dist/component-events.js.map +1 -0
  18. package/dist/component-queue.d.ts +0 -0
  19. package/dist/component-queue.d.ts.map +0 -0
  20. package/dist/component-queue.js +118 -0
  21. package/dist/component-queue.js.map +1 -0
  22. package/dist/component-registry.d.ts +0 -0
  23. package/dist/component-registry.d.ts.map +0 -0
  24. package/dist/component-registry.js +298 -0
  25. package/dist/component-registry.js.map +1 -0
  26. package/dist/component.d.ts +8 -0
  27. package/dist/component.d.ts.map +1 -1
  28. package/dist/component.js +1892 -0
  29. package/dist/component.js.map +1 -0
  30. package/dist/config.d.ts +0 -0
  31. package/dist/config.d.ts.map +0 -0
  32. package/dist/config.js +64 -0
  33. package/dist/config.js.map +1 -0
  34. package/dist/data-proxy.d.ts +0 -0
  35. package/dist/data-proxy.d.ts.map +0 -0
  36. package/dist/data-proxy.js +223 -0
  37. package/dist/data-proxy.js.map +1 -0
  38. package/dist/debug-entry.d.ts +0 -0
  39. package/dist/debug-entry.d.ts.map +0 -0
  40. package/dist/debug-entry.js +8 -0
  41. package/dist/debug-entry.js.map +1 -0
  42. package/dist/debug.d.ts +0 -0
  43. package/dist/debug.d.ts.map +0 -0
  44. package/dist/debug.js +203 -0
  45. package/dist/debug.js.map +1 -0
  46. package/dist/index.cjs +36 -8
  47. package/dist/index.cjs.map +1 -1
  48. package/dist/index.d.ts +0 -0
  49. package/dist/index.d.ts.map +0 -0
  50. package/dist/index.js +36 -8
  51. package/dist/index.js.map +1 -1
  52. package/dist/instruction-processor.d.ts +0 -0
  53. package/dist/instruction-processor.d.ts.map +1 -1
  54. package/dist/instruction-processor.js +563 -0
  55. package/dist/instruction-processor.js.map +1 -0
  56. package/dist/jqhtml-core.esm.js +37 -9
  57. package/dist/jqhtml-core.esm.js.map +1 -1
  58. package/dist/jqhtml-debug.esm.js +0 -0
  59. package/dist/jqhtml-debug.esm.js.map +0 -0
  60. package/dist/jquery-plugin.d.ts +0 -0
  61. package/dist/jquery-plugin.d.ts.map +0 -0
  62. package/dist/jquery-plugin.js +472 -0
  63. package/dist/jquery-plugin.js.map +1 -0
  64. package/dist/lifecycle-manager.d.ts +0 -0
  65. package/dist/lifecycle-manager.d.ts.map +0 -0
  66. package/dist/lifecycle-manager.js +201 -0
  67. package/dist/lifecycle-manager.js.map +1 -0
  68. package/dist/load-coordinator.d.ts +0 -0
  69. package/dist/load-coordinator.d.ts.map +1 -1
  70. package/dist/load-coordinator.js +309 -0
  71. package/dist/load-coordinator.js.map +1 -0
  72. package/dist/local-storage.d.ts +0 -0
  73. package/dist/local-storage.d.ts.map +0 -0
  74. package/dist/local-storage.js +699 -0
  75. package/dist/local-storage.js.map +1 -0
  76. package/dist/preload-data.d.ts +0 -0
  77. package/dist/preload-data.d.ts.map +0 -0
  78. package/dist/preload-data.js +136 -0
  79. package/dist/preload-data.js.map +1 -0
  80. package/dist/template-renderer.d.ts +0 -0
  81. package/dist/template-renderer.d.ts.map +0 -0
  82. package/dist/template-renderer.js +278 -0
  83. package/dist/template-renderer.js.map +1 -0
  84. package/dist/viewport.d.ts +0 -0
  85. package/dist/viewport.d.ts.map +0 -0
  86. package/dist/viewport.js +69 -0
  87. package/dist/viewport.js.map +1 -0
  88. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * JQHTML Core v2.3.54
2
+ * JQHTML Core v2.3.59
3
3
  * (c) 2025 JQHTML Team
4
4
  * Released under the MIT License
5
5
  */
@@ -861,11 +861,22 @@ function process_rawtag_to_html(instruction, html) {
861
861
  }
862
862
  }
863
863
  html.push('>');
864
- // Add raw content - escape HTML entities but preserve whitespace
865
- const escaped_content = rawContent
866
- .replace(/&/g, '&')
867
- .replace(/</g, '&lt;')
868
- .replace(/>/g, '&gt;');
864
+ // Add raw content, preserving whitespace.
865
+ //
866
+ // <textarea> holds text and nothing else, so everything is escaped.
867
+ //
868
+ // <pre> holds phrasing content - <pre><code> is the standard code-block idiom - so
869
+ // markup the author wrote is passed through. A '<' that does not begin a tag is
870
+ // still escaped, which is what the HTML tokenizer itself does with a stray '<' and
871
+ // keeps code samples such as "if (a < b)" rendering as written. Interpolated
872
+ // values are escaped by the compiler before they reach this point.
873
+ const is_raw_html_content = tagName.toLowerCase() === 'pre';
874
+ const escaped_content = is_raw_html_content
875
+ ? rawContent.replace(/<(?![a-zA-Z/!?])/g, '&lt;')
876
+ : rawContent
877
+ .replace(/&/g, '&amp;')
878
+ .replace(/</g, '&lt;')
879
+ .replace(/>/g, '&gt;');
869
880
  html.push(escaped_content);
870
881
  // Close tag
871
882
  html.push(`</${tagName}>`);
@@ -1537,6 +1548,11 @@ class Load_Coordinator {
1537
1548
  }
1538
1549
  if (!uncacheable_property) {
1539
1550
  uncacheable_property = key;
1551
+ // This package compiles with strictNullChecks off, and without it
1552
+ // TypeScript will not narrow a discriminated union by its boolean
1553
+ // discriminant - so `serialized` is still the full Serialize_Result
1554
+ // here even though `ok` has been ruled out above. The cast states
1555
+ // what the control flow already guarantees.
1540
1556
  uncacheable_reason = serialized.reason;
1541
1557
  }
1542
1558
  return { key: null, uncacheable_property, uncacheable_reason };
@@ -1824,7 +1840,7 @@ Load_Coordinator._registry = new Map();
1824
1840
  const class_registry = Object.create(null);
1825
1841
  // Markers for serialized class instances (unique to avoid collisions with user data)
1826
1842
  // Replaced at build time by rollup (see rollup.config.js).
1827
- const CORE_VERSION = '2.3.54';
1843
+ const CORE_VERSION = '2.3.59';
1828
1844
  const CLASS_MARKER = '__jqhtml_class__';
1829
1845
  const PROPS_MARKER = '__jqhtml_props__';
1830
1846
  /**
@@ -4958,11 +4974,21 @@ class Jqhtml_Component {
4958
4974
  }
4959
4975
  /**
4960
4976
  * Find closest ancestor component matching selector
4977
+ *
4978
+ * A bare component name - a plain identifier starting with a capital letter,
4979
+ * such as 'Parent_Dashboard' - is treated as the component-name class
4980
+ * selector '.Parent_Dashboard'. Components carry a CSS class for every name
4981
+ * in their prototype chain, so a base class name matches its subclasses too.
4982
+ * Every other selector ('.Foo', '#id', '[attr]', 'div > .Component') is
4983
+ * passed to jQuery unchanged.
4961
4984
  */
4962
4985
  closest(selector) {
4986
+ const search = Jqhtml_Component.COMPONENT_NAME_PATTERN.test(selector)
4987
+ ? `.${selector}`
4988
+ : selector;
4963
4989
  let current = this.$.parent();
4964
4990
  while (current.length > 0) {
4965
- if (current.is(selector)) {
4991
+ if (current.is(search)) {
4966
4992
  const comp = current.data('_component');
4967
4993
  if (comp instanceof Jqhtml_Component) {
4968
4994
  return comp;
@@ -5259,6 +5285,8 @@ class Jqhtml_Component {
5259
5285
  }
5260
5286
  // Static properties
5261
5287
  Jqhtml_Component.__jqhtml_component = true; // Marker for unified register() detection
5288
+ // A bare component name, as accepted by closest() in place of a class selector
5289
+ Jqhtml_Component.COMPONENT_NAME_PATTERN = /^[A-Z][A-Za-z0-9_]*$/;
5262
5290
 
5263
5291
  /**
5264
5292
  * JQHTML v2 Template Renderer
@@ -6155,7 +6183,7 @@ function init(jQuery, config) {
6155
6183
  }
6156
6184
  }
6157
6185
  // Version - will be replaced during build with actual version from package.json
6158
- const version = '2.3.54';
6186
+ const version = '2.3.59';
6159
6187
  // Default export with all functionality
6160
6188
  const jqhtml = {
6161
6189
  // Core