@jqhtml/core 2.3.59 → 2.3.64

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 (89) hide show
  1. package/dist/boot.d.ts +0 -0
  2. package/dist/boot.d.ts.map +0 -0
  3. package/dist/cache-key-serializer.d.ts +0 -0
  4. package/dist/cache-key-serializer.d.ts.map +0 -0
  5. package/dist/component-cache.d.ts +0 -0
  6. package/dist/component-cache.d.ts.map +0 -0
  7. package/dist/component-events.d.ts +0 -0
  8. package/dist/component-events.d.ts.map +0 -0
  9. package/dist/component-name.d.ts +13 -0
  10. package/dist/component-name.d.ts.map +1 -0
  11. package/dist/component-queue.d.ts +0 -0
  12. package/dist/component-queue.d.ts.map +0 -0
  13. package/dist/component-registry.d.ts +0 -0
  14. package/dist/component-registry.d.ts.map +1 -1
  15. package/dist/component.d.ts +2 -6
  16. package/dist/component.d.ts.map +1 -1
  17. package/dist/config.d.ts +0 -0
  18. package/dist/config.d.ts.map +0 -0
  19. package/dist/data-proxy.d.ts +0 -0
  20. package/dist/data-proxy.d.ts.map +0 -0
  21. package/dist/debug-entry.d.ts +0 -0
  22. package/dist/debug-entry.d.ts.map +0 -0
  23. package/dist/debug.d.ts +0 -0
  24. package/dist/debug.d.ts.map +0 -0
  25. package/dist/index.cjs +60 -44
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.ts +1 -0
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +58 -45
  30. package/dist/index.js.map +1 -1
  31. package/dist/instruction-processor.d.ts +2 -1
  32. package/dist/instruction-processor.d.ts.map +1 -1
  33. package/dist/jqhtml-core.esm.js +59 -46
  34. package/dist/jqhtml-core.esm.js.map +1 -1
  35. package/dist/jqhtml-debug.esm.js +0 -0
  36. package/dist/jqhtml-debug.esm.js.map +0 -0
  37. package/dist/jquery-plugin.d.ts +0 -0
  38. package/dist/jquery-plugin.d.ts.map +1 -1
  39. package/dist/lifecycle-manager.d.ts +0 -0
  40. package/dist/lifecycle-manager.d.ts.map +0 -0
  41. package/dist/load-coordinator.d.ts +0 -0
  42. package/dist/load-coordinator.d.ts.map +0 -0
  43. package/dist/local-storage.d.ts +0 -0
  44. package/dist/local-storage.d.ts.map +0 -0
  45. package/dist/preload-data.d.ts +0 -0
  46. package/dist/preload-data.d.ts.map +0 -0
  47. package/dist/template-renderer.d.ts +0 -0
  48. package/dist/template-renderer.d.ts.map +0 -0
  49. package/dist/viewport.d.ts +0 -0
  50. package/dist/viewport.d.ts.map +0 -0
  51. package/package.json +1 -1
  52. package/dist/boot.js +0 -130
  53. package/dist/boot.js.map +0 -1
  54. package/dist/cache-key-serializer.js +0 -140
  55. package/dist/cache-key-serializer.js.map +0 -1
  56. package/dist/component-cache.js +0 -270
  57. package/dist/component-cache.js.map +0 -1
  58. package/dist/component-events.js +0 -141
  59. package/dist/component-events.js.map +0 -1
  60. package/dist/component-queue.js +0 -118
  61. package/dist/component-queue.js.map +0 -1
  62. package/dist/component-registry.js +0 -298
  63. package/dist/component-registry.js.map +0 -1
  64. package/dist/component.js +0 -1892
  65. package/dist/component.js.map +0 -1
  66. package/dist/config.js +0 -64
  67. package/dist/config.js.map +0 -1
  68. package/dist/data-proxy.js +0 -223
  69. package/dist/data-proxy.js.map +0 -1
  70. package/dist/debug-entry.js +0 -8
  71. package/dist/debug-entry.js.map +0 -1
  72. package/dist/debug.js +0 -203
  73. package/dist/debug.js.map +0 -1
  74. package/dist/instruction-processor.js +0 -563
  75. package/dist/instruction-processor.js.map +0 -1
  76. package/dist/jquery-plugin.js +0 -472
  77. package/dist/jquery-plugin.js.map +0 -1
  78. package/dist/lifecycle-manager.js +0 -201
  79. package/dist/lifecycle-manager.js.map +0 -1
  80. package/dist/load-coordinator.js +0 -309
  81. package/dist/load-coordinator.js.map +0 -1
  82. package/dist/local-storage.js +0 -699
  83. package/dist/local-storage.js.map +0 -1
  84. package/dist/preload-data.js +0 -136
  85. package/dist/preload-data.js.map +0 -1
  86. package/dist/template-renderer.js +0 -278
  87. package/dist/template-renderer.js.map +0 -1
  88. package/dist/viewport.js +0 -69
  89. package/dist/viewport.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ export { LifecycleManager } from './lifecycle-manager.js';
8
8
  export type { LifecyclePhase } from './lifecycle-manager.js';
9
9
  export { register, register_component, register_template, get_component_class, get_template, get_template_by_class, create_component, has_component, get_component_names, get_registered_templates, list_components } from './component-registry.js';
10
10
  export type { ComponentConstructor, TemplateFunction, TemplateDefinition } from './component-registry.js';
11
+ export { COMPONENT_NAME_PATTERN, COMPONENT_NAME_RULE, is_component_name } from './component-name.js';
11
12
  export { process_instructions, extract_slots } from './instruction-processor.js';
12
13
  export type { Instruction, TagInstruction, ComponentInstruction, SlotInstruction } from './instruction-processor.js';
13
14
  export { render_template, escape_html, escape_html_nl2br } from './template-renderer.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7D,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACZ,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,wBAAwB,EACxB,eAAe,EAChB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG1G,OAAO,EACL,oBAAoB,EACpB,aAAa,EACd,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,eAAe,EAChB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EACL,eA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AAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAGD,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;WAuCL,aAAa,GAAG;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE;+BAGhC,aAAa;4BAIjB,OAAO,GAAG,MAAM;;;;;6BAuDd,MAAM,eAAc,MAAM,GAAG,MAAM;;;;;;;;;CAsB7D,CAAC;AAgCF,eAAe,MAAM,CAAC"}
package/dist/index.js CHANGED
@@ -199,6 +199,21 @@ class LifecycleManager {
199
199
  }
200
200
  }
201
201
 
202
+ /**
203
+ * The one rule for "is this name a component?"
204
+ *
205
+ * An optional SINGLE leading underscore, then a capital letter, then letters,
206
+ * digits and underscores. The underscore prefix is a namespace reserved for
207
+ * framework-provided components (`_Root_Layout`) so they cannot collide with
208
+ * application components. Two or more leading underscores are not a component
209
+ * name; a lower-case first letter after the optional underscore is an HTML tag.
210
+ */
211
+ const COMPONENT_NAME_PATTERN = /^_?[A-Z][A-Za-z0-9_]*$/;
212
+ const COMPONENT_NAME_RULE = 'must start with a capital letter, optionally preceded by a single underscore';
213
+ function is_component_name(name) {
214
+ return COMPONENT_NAME_PATTERN.test(name);
215
+ }
216
+
202
217
  /**
203
218
  * JQHTML v2 Component Registry
204
219
  *
@@ -245,9 +260,9 @@ function register_component(nameOrClass, component_class, template) {
245
260
  if (!component_class) {
246
261
  throw new Error('Component class is required when registering by name');
247
262
  }
248
- // Validate component name starts with capital letter
249
- if (!/^[A-Z]/.test(name)) {
250
- throw new Error(`Component name '${name}' must start with a capital letter. Convention is First_Letter_With_Underscores.`);
263
+ // Validate component name against the shared rule
264
+ if (!is_component_name(name)) {
265
+ throw new Error(`Component name '${name}' ${COMPONENT_NAME_RULE}. Convention is First_Letter_With_Underscores.`);
251
266
  }
252
267
  component_classes.set(name, component_class);
253
268
  // If template provided, register it
@@ -316,9 +331,9 @@ function register_template(template_def) {
316
331
  if (!name) {
317
332
  throw new Error('Template must have a name property');
318
333
  }
319
- // Validate template name starts with capital letter
320
- if (!/^[A-Z]/.test(name)) {
321
- throw new Error(`Template name '${name}' must start with a capital letter. Convention is First_Letter_With_Underscores.`);
334
+ // Validate template name against the shared rule
335
+ if (!is_component_name(name)) {
336
+ throw new Error(`Template name '${name}' ${COMPONENT_NAME_RULE}. Convention is First_Letter_With_Underscores.`);
322
337
  }
323
338
  // Check for duplicate registration
324
339
  if (component_templates.has(name)) {
@@ -634,7 +649,9 @@ function process_instructions(instructions, target, context, slots) {
634
649
  if (el) {
635
650
  const element = $(el);
636
651
  el.removeAttribute('data-tid');
637
- apply_attributes(element, tagData.attrs, context);
652
+ // Bind to the component whose template wrote this element, which for
653
+ // spliced content is not the component being rendered.
654
+ apply_attributes(element, tagData.attrs, tagData.context);
638
655
  }
639
656
  }
640
657
  // Third pass: initialize and boot components in parallel
@@ -660,6 +677,16 @@ function process_instruction_to_html(instruction, html, tagElements, components,
660
677
  // Raw HTML/text - no escaping, as requested
661
678
  html.push(instruction);
662
679
  }
680
+ else if (Array.isArray(instruction)) {
681
+ if (instruction[0] !== '_content' || !Array.isArray(instruction[1])) {
682
+ return;
683
+ }
684
+ // Content written in another template renders in that template's component.
685
+ const definer = instruction[2] || context;
686
+ for (const item of instruction[1]) {
687
+ process_instruction_to_html(item, html, tagElements, components, definer, slots);
688
+ }
689
+ }
663
690
  else if ('tag' in instruction) {
664
691
  // HTML tag
665
692
  process_tag_to_html(instruction, html, tagElements, components, context);
@@ -1835,7 +1862,7 @@ Load_Coordinator._registry = new Map();
1835
1862
  const class_registry = Object.create(null);
1836
1863
  // Markers for serialized class instances (unique to avoid collisions with user data)
1837
1864
  // Replaced at build time by rollup (see rollup.config.js).
1838
- const CORE_VERSION = '2.3.59';
1865
+ const CORE_VERSION = '2.3.64';
1839
1866
  const CLASS_MARKER = '__jqhtml_class__';
1840
1867
  const PROPS_MARKER = '__jqhtml_props__';
1841
1868
  /**
@@ -3844,10 +3871,10 @@ class Jqhtml_Component {
3844
3871
  // Create a content function that invokes child slots
3845
3872
  // When parent calls content('slotName'), it invokes the child's slot function
3846
3873
  const childSlots = instructions._slots;
3847
- const contentFunction = (slotName, data) => {
3874
+ const contentFunction = (slotName, ...slotArgs) => {
3848
3875
  if (childSlots[slotName] && typeof childSlots[slotName] === 'function') {
3849
- // Invoke the slot function with data parameter
3850
- const [slotInstructions, slotContext] = childSlots[slotName](data);
3876
+ // Invoke the slot function with everything content() was given
3877
+ const [slotInstructions, slotContext] = childSlots[slotName](...slotArgs);
3851
3878
  // Return in render function format: [instructions, context]
3852
3879
  // The template expression handler expects this format
3853
3880
  return [slotInstructions, slotContext];
@@ -3872,12 +3899,11 @@ class Jqhtml_Component {
3872
3899
  instructions = [];
3873
3900
  }
3874
3901
  }
3875
- // Flatten any nested content instructions before processing
3876
- // Instructions may contain ['_content', [...]] markers from content() calls
3877
- const flattenedInstructions = this._flatten_instructions(instructions);
3878
- // Process instructions to generate DOM
3902
+ // Process instructions to generate DOM. ['_content', ...] markers from
3903
+ // content() are handled by the processor, which renders them in the
3904
+ // component that wrote them.
3879
3905
  // This kicks off child component boots but doesn't wait for them
3880
- process_instructions(flattenedInstructions, this.$, this);
3906
+ process_instructions(instructions, this.$, this);
3881
3907
  }
3882
3908
  // Don't update ready state here - let phases complete in order
3883
3909
  this._update_debug_attrs();
@@ -4971,7 +4997,8 @@ class Jqhtml_Component {
4971
4997
  * Find closest ancestor component matching selector
4972
4998
  *
4973
4999
  * A bare component name - a plain identifier starting with a capital letter,
4974
- * such as 'Parent_Dashboard' - is treated as the component-name class
5000
+ * optionally preceded by a single underscore, such as 'Parent_Dashboard' or
5001
+ * '_Root_Layout' - is treated as the component-name class
4975
5002
  * selector '.Parent_Dashboard'. Components carry a CSS class for every name
4976
5003
  * in their prototype chain, so a base class name matches its subclasses too.
4977
5004
  * Every other selector ('.Foo', '#id', '[attr]', 'div > .Component') is
@@ -5037,26 +5064,6 @@ class Jqhtml_Component {
5037
5064
  _generate_cid() {
5038
5065
  return uid();
5039
5066
  }
5040
- /**
5041
- * Flatten instruction array - converts ['_content', [...]] markers to flat array
5042
- * Recursively flattens nested content from content() calls
5043
- */
5044
- _flatten_instructions(instructions) {
5045
- const result = [];
5046
- for (const instruction of instructions) {
5047
- // Check if this is a _content marker: ['_content', [...]]
5048
- if (Array.isArray(instruction) && instruction[0] === '_content' && Array.isArray(instruction[1])) {
5049
- // Recursively flatten the content instructions
5050
- const contentInstructions = this._flatten_instructions(instruction[1]);
5051
- result.push(...contentInstructions);
5052
- }
5053
- else {
5054
- // Regular instruction - keep as is
5055
- result.push(instruction);
5056
- }
5057
- }
5058
- return result;
5059
- }
5060
5067
  _apply_css_classes() {
5061
5068
  const hierarchy = this.constructor.get_class_hierarchy();
5062
5069
  // If component name differs from class name, add component name to hierarchy
@@ -5068,14 +5075,16 @@ class Jqhtml_Component {
5068
5075
  // Add component name at the beginning (most specific)
5069
5076
  classesToAdd.unshift(this.args._component_name);
5070
5077
  }
5071
- // Filter out private classes (starting with _) and invalid class names
5078
+ // Filter out private/mangled classes (starting with _) and invalid class names.
5079
+ // A component name with the reserved single-underscore prefix (_Root_Layout)
5080
+ // is public and is kept - see component-name.ts.
5072
5081
  const publicClasses = classesToAdd.filter(className => {
5073
5082
  // Guard against undefined, null, or non-string values
5074
5083
  if (!className || typeof className !== 'string') {
5075
5084
  console.warn('[JQHTML] Filtered out invalid class name:', className);
5076
5085
  return false;
5077
5086
  }
5078
- return !className.startsWith('_');
5087
+ return !className.startsWith('_') || is_component_name(className);
5079
5088
  });
5080
5089
  if (publicClasses.length > 0) {
5081
5090
  this.$.addClass(publicClasses.join(' '));
@@ -5281,7 +5290,7 @@ class Jqhtml_Component {
5281
5290
  // Static properties
5282
5291
  Jqhtml_Component.__jqhtml_component = true; // Marker for unified register() detection
5283
5292
  // 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_]*$/;
5293
+ Jqhtml_Component.COMPONENT_NAME_PATTERN = COMPONENT_NAME_PATTERN;
5285
5294
 
5286
5295
  /**
5287
5296
  * JQHTML v2 Template Renderer
@@ -5803,16 +5812,20 @@ function init_jquery_plugin(jQuery) {
5803
5812
  catch (error) {
5804
5813
  console.warn('[JQHTML] Error stopping existing component during replacement:', error);
5805
5814
  }
5806
- // Remove component classes (any class starting with capital letter, except BEM classes)
5815
+ // Remove component classes (any class starting with a capital letter, or a
5816
+ // component name with the reserved underscore prefix - except BEM classes)
5807
5817
  const classes = element.attr('class');
5808
5818
  if (classes) {
5809
5819
  const classList = classes.split(/\s+/);
5810
5820
  const nonComponentClasses = classList.filter((cls) => {
5811
5821
  // Keep class if:
5812
5822
  // 1. It's empty
5813
- // 2. It doesn't start with a capital letter
5823
+ // 2. It is neither capital-first nor a component name (see component-name.ts)
5814
5824
  // 3. It's a BEM-style class (contains __) - these persist across reinitialization
5815
- return !cls || cls[0] !== cls[0].toUpperCase() || cls[0] === cls[0].toLowerCase() || cls.includes('__');
5825
+ if (!cls || cls.includes('__'))
5826
+ return true;
5827
+ const capital_first = cls[0] === cls[0].toUpperCase() && cls[0] !== cls[0].toLowerCase();
5828
+ return !capital_first && !is_component_name(cls);
5816
5829
  });
5817
5830
  element.attr('class', nonComponentClasses.join(' '));
5818
5831
  }
@@ -6178,7 +6191,7 @@ function init(jQuery, config) {
6178
6191
  }
6179
6192
  }
6180
6193
  // Version - will be replaced during build with actual version from package.json
6181
- const version = '2.3.59';
6194
+ const version = '2.3.64';
6182
6195
  // Default export with all functionality
6183
6196
  const jqhtml = {
6184
6197
  // Core
@@ -6314,5 +6327,5 @@ if (typeof window !== 'undefined' && !window.jqhtml) {
6314
6327
  }
6315
6328
  }
6316
6329
 
6317
- export { Jqhtml_Component, LifecycleManager as Jqhtml_LifecycleManager, Jqhtml_Local_Storage, LifecycleManager, Load_Coordinator, applyDebugDelay, boot, clear_preload_data, configure, create_component, jqhtml as default, devWarn, escape_html, escape_html_nl2br, extract_slots, get_captured_data, get_component_class, get_component_names, get_config, get_registered_templates, get_template, get_template_by_class, handleComponentError, has_component, init, init_jquery_plugin, isSequentialProcessing, list_components, logDataChange, logDispatch, logInstruction, logLifecycle, process_instructions, register, register_cache_class, register_component, register_template, render_template, set_preload_data, start_data_capture, stop_data_capture, version };
6330
+ export { COMPONENT_NAME_PATTERN, COMPONENT_NAME_RULE, Jqhtml_Component, LifecycleManager as Jqhtml_LifecycleManager, Jqhtml_Local_Storage, LifecycleManager, Load_Coordinator, applyDebugDelay, boot, clear_preload_data, configure, create_component, jqhtml as default, devWarn, escape_html, escape_html_nl2br, extract_slots, get_captured_data, get_component_class, get_component_names, get_config, get_registered_templates, get_template, get_template_by_class, handleComponentError, has_component, init, init_jquery_plugin, isSequentialProcessing, is_component_name, list_components, logDataChange, logDispatch, logInstruction, logLifecycle, process_instructions, register, register_cache_class, register_component, register_template, render_template, set_preload_data, start_data_capture, stop_data_capture, version };
6318
6331
  //# sourceMappingURL=index.js.map