@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
package/dist/index.d.ts CHANGED
File without changes
File without changes
package/dist/index.js CHANGED
@@ -856,11 +856,22 @@ function process_rawtag_to_html(instruction, html) {
856
856
  }
857
857
  }
858
858
  html.push('>');
859
- // Add raw content - escape HTML entities but preserve whitespace
860
- const escaped_content = rawContent
861
- .replace(/&/g, '&')
862
- .replace(/</g, '&lt;')
863
- .replace(/>/g, '&gt;');
859
+ // Add raw content, preserving whitespace.
860
+ //
861
+ // <textarea> holds text and nothing else, so everything is escaped.
862
+ //
863
+ // <pre> holds phrasing content - <pre><code> is the standard code-block idiom - so
864
+ // markup the author wrote is passed through. A '<' that does not begin a tag is
865
+ // still escaped, which is what the HTML tokenizer itself does with a stray '<' and
866
+ // keeps code samples such as "if (a < b)" rendering as written. Interpolated
867
+ // values are escaped by the compiler before they reach this point.
868
+ const is_raw_html_content = tagName.toLowerCase() === 'pre';
869
+ const escaped_content = is_raw_html_content
870
+ ? rawContent.replace(/<(?![a-zA-Z/!?])/g, '&lt;')
871
+ : rawContent
872
+ .replace(/&/g, '&amp;')
873
+ .replace(/</g, '&lt;')
874
+ .replace(/>/g, '&gt;');
864
875
  html.push(escaped_content);
865
876
  // Close tag
866
877
  html.push(`</${tagName}>`);
@@ -1532,6 +1543,11 @@ class Load_Coordinator {
1532
1543
  }
1533
1544
  if (!uncacheable_property) {
1534
1545
  uncacheable_property = key;
1546
+ // This package compiles with strictNullChecks off, and without it
1547
+ // TypeScript will not narrow a discriminated union by its boolean
1548
+ // discriminant - so `serialized` is still the full Serialize_Result
1549
+ // here even though `ok` has been ruled out above. The cast states
1550
+ // what the control flow already guarantees.
1535
1551
  uncacheable_reason = serialized.reason;
1536
1552
  }
1537
1553
  return { key: null, uncacheable_property, uncacheable_reason };
@@ -1819,7 +1835,7 @@ Load_Coordinator._registry = new Map();
1819
1835
  const class_registry = Object.create(null);
1820
1836
  // Markers for serialized class instances (unique to avoid collisions with user data)
1821
1837
  // Replaced at build time by rollup (see rollup.config.js).
1822
- const CORE_VERSION = '2.3.54';
1838
+ const CORE_VERSION = '2.3.59';
1823
1839
  const CLASS_MARKER = '__jqhtml_class__';
1824
1840
  const PROPS_MARKER = '__jqhtml_props__';
1825
1841
  /**
@@ -4953,11 +4969,21 @@ class Jqhtml_Component {
4953
4969
  }
4954
4970
  /**
4955
4971
  * Find closest ancestor component matching selector
4972
+ *
4973
+ * A bare component name - a plain identifier starting with a capital letter,
4974
+ * such as 'Parent_Dashboard' - is treated as the component-name class
4975
+ * selector '.Parent_Dashboard'. Components carry a CSS class for every name
4976
+ * in their prototype chain, so a base class name matches its subclasses too.
4977
+ * Every other selector ('.Foo', '#id', '[attr]', 'div > .Component') is
4978
+ * passed to jQuery unchanged.
4956
4979
  */
4957
4980
  closest(selector) {
4981
+ const search = Jqhtml_Component.COMPONENT_NAME_PATTERN.test(selector)
4982
+ ? `.${selector}`
4983
+ : selector;
4958
4984
  let current = this.$.parent();
4959
4985
  while (current.length > 0) {
4960
- if (current.is(selector)) {
4986
+ if (current.is(search)) {
4961
4987
  const comp = current.data('_component');
4962
4988
  if (comp instanceof Jqhtml_Component) {
4963
4989
  return comp;
@@ -5254,6 +5280,8 @@ class Jqhtml_Component {
5254
5280
  }
5255
5281
  // Static properties
5256
5282
  Jqhtml_Component.__jqhtml_component = true; // Marker for unified register() detection
5283
+ // A bare component name, as accepted by closest() in place of a class selector
5284
+ Jqhtml_Component.COMPONENT_NAME_PATTERN = /^[A-Z][A-Za-z0-9_]*$/;
5257
5285
 
5258
5286
  /**
5259
5287
  * JQHTML v2 Template Renderer
@@ -6150,7 +6178,7 @@ function init(jQuery, config) {
6150
6178
  }
6151
6179
  }
6152
6180
  // Version - will be replaced during build with actual version from package.json
6153
- const version = '2.3.54';
6181
+ const version = '2.3.59';
6154
6182
  // Default export with all functionality
6155
6183
  const jqhtml = {
6156
6184
  // Core