@jqhtml/core 2.3.50 → 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 +47 -0
  7. package/dist/cache-key-serializer.d.ts.map +1 -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 +1 -0
  11. package/dist/component-cache.d.ts.map +1 -1
  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 +1 -1
  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 +26 -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 +57 -0
  31. package/dist/config.d.ts.map +1 -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 +520 -46
  47. package/dist/index.cjs.map +1 -1
  48. package/dist/index.d.ts +7 -1
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.js +519 -47
  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 +520 -48
  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 +1 -1
  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 +18 -1
  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 +2 -0
  73. package/dist/local-storage.d.ts.map +1 -1
  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 +36 -0
  85. package/dist/viewport.d.ts.map +1 -0
  86. package/dist/viewport.js +69 -0
  87. package/dist/viewport.js.map +1 -0
  88. package/package.json +7 -2
File without changes
File without changes
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"jquery-plugin.d.ts","sourceRoot":"","sources":["../src/jquery-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAQpE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd;;WAEG;QACH,SAAS,IAAI,gBAAgB,GAAG,IAAI,CAAC;QACrC,SAAS,CAAC,cAAc,EAAE,oBAAoB,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,gBAAgB,CAAC;QAC9F,SAAS,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,gBAAgB,CAAC;QAE/E;;;;;;;WAOG;QACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;KACvC;CACF;AAGD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CAogBpD"}
1
+ {"version":3,"file":"jquery-plugin.d.ts","sourceRoot":"","sources":["../src/jquery-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AASpE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd;;WAEG;QACH,SAAS,IAAI,gBAAgB,GAAG,IAAI,CAAC;QACrC,SAAS,CAAC,cAAc,EAAE,oBAAoB,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,gBAAgB,CAAC;QAC9F,SAAS,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,gBAAgB,CAAC;QAE/E;;;;;;;WAOG;QACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;KACvC;CACF;AAGD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CAwgBpD"}
@@ -0,0 +1,472 @@
1
+ /**
2
+ * JQHTML v2 jQuery Plugin
3
+ *
4
+ * Extends jQuery with component method:
5
+ * - $(el).component() - Get component instance
6
+ * - $(el).component(ComponentClass, args) - Create component
7
+ */
8
+ import { Jqhtml_Component } from './component.js';
9
+ import { get_component_class, get_template } from './component-registry.js';
10
+ import { applyDebugDelay, devWarn } from './debug.js';
11
+ import { init_viewport_resize } from './viewport.js';
12
+ // Function to initialize jQuery plugin with the correct jQuery instance
13
+ export function init_jquery_plugin(jQuery) {
14
+ if (!jQuery || !jQuery.fn) {
15
+ throw new Error('jQuery is required for JQHTML. Please ensure jQuery is loaded before initializing JQHTML.');
16
+ }
17
+ // Check if jQuery is from global scope (recommended)
18
+ if (typeof window !== 'undefined' && window.$ !== jQuery && !jQuery.__jqhtml_checked) {
19
+ devWarn('jQuery instance appears to be bundled with webpack/modules rather than loaded globally.\n' +
20
+ 'For best compatibility, it is recommended to:\n' +
21
+ '1. Include jQuery via <script> tag from a CDN (UMD format)\n' +
22
+ '2. Configure webpack with: externals: { jquery: "$" }\n' +
23
+ '3. Remove jquery from package.json dependencies\n\n' +
24
+ 'To suppress this warning, set: window.JQHTML_SUPPRESS_WARNINGS = true');
25
+ // Mark this jQuery instance as checked to avoid duplicate warnings
26
+ jQuery.__jqhtml_checked = true;
27
+ }
28
+ // Store original jQuery constructor
29
+ const _jqhtml_original_jquery = jQuery;
30
+ // Override jQuery constructor to handle component instances
31
+ const JQueryWithComponentSupport = function (selector, context) {
32
+ // Check if selector is a JQHTML component instance
33
+ if (selector &&
34
+ typeof selector === 'object' &&
35
+ selector.$ &&
36
+ typeof selector.$sid === 'function' &&
37
+ typeof selector.id === 'function') {
38
+ // Return the component's jQuery element
39
+ return selector.$;
40
+ }
41
+ // Otherwise, call original jQuery constructor
42
+ return new _jqhtml_original_jquery(selector, context);
43
+ };
44
+ // Copy all jQuery static properties/methods to the new constructor
45
+ Object.setPrototypeOf(JQueryWithComponentSupport, _jqhtml_original_jquery);
46
+ for (const key in _jqhtml_original_jquery) {
47
+ if (_jqhtml_original_jquery.hasOwnProperty(key)) {
48
+ JQueryWithComponentSupport[key] = _jqhtml_original_jquery[key];
49
+ }
50
+ }
51
+ // Copy prototype and fn
52
+ JQueryWithComponentSupport.prototype = _jqhtml_original_jquery.prototype;
53
+ JQueryWithComponentSupport.fn = _jqhtml_original_jquery.fn;
54
+ // Replace global jQuery and $ (if in browser environment)
55
+ if (typeof window !== 'undefined') {
56
+ window.jQuery = JQueryWithComponentSupport;
57
+ window.$ = JQueryWithComponentSupport;
58
+ }
59
+ // Update local reference for rest of this function
60
+ jQuery = JQueryWithComponentSupport;
61
+ // Store original jQuery.fn.val
62
+ const originalVal = jQuery.fn.val;
63
+ // Override jQuery.fn.val to support component delegation
64
+ jQuery.fn.val = function (value) {
65
+ if (arguments.length === 0) {
66
+ // Getter mode - return value from first element
67
+ const firstEl = this.first();
68
+ if (firstEl.length === 0)
69
+ return undefined;
70
+ const component = firstEl.data('_component');
71
+ const tagName = firstEl.prop('tagName');
72
+ if (component && typeof component.val === 'function' && tagName !== 'INPUT' && tagName !== 'TEXTAREA') {
73
+ // Delegate to component's val() method (but not if the component IS an input/textarea)
74
+ return component.val();
75
+ }
76
+ // Fall back to original jQuery val()
77
+ return originalVal.call(this);
78
+ }
79
+ else {
80
+ // Setter mode - set value on all elements
81
+ this.each(function () {
82
+ const $el = jQuery(this);
83
+ const component = $el.data('_component');
84
+ const tagName = $el.prop('tagName');
85
+ if (component && typeof component.val === 'function' && tagName !== 'INPUT' && tagName !== 'TEXTAREA') {
86
+ // Delegate to component's val() method (but not if the component IS an input/textarea)
87
+ component.val(value);
88
+ }
89
+ else {
90
+ // Fall back to original jQuery val()
91
+ originalVal.call($el, value);
92
+ }
93
+ });
94
+ // Return this for jQuery chaining
95
+ return this;
96
+ }
97
+ };
98
+ // Component instance method
99
+ jQuery.fn.component = function (componentOrName, args = {}) {
100
+ const element = this.first ? this.first() : this;
101
+ if (!componentOrName) {
102
+ // Getter mode - return existing component or null
103
+ // Handle empty selector (no elements matched)
104
+ if (element.length === 0) {
105
+ return null;
106
+ }
107
+ const comp = element.data('_component');
108
+ // Return null if no component found (instead of throwing)
109
+ return comp || null;
110
+ }
111
+ // Check if component already exists on this element
112
+ const existingComponent = element.data('_component');
113
+ if (existingComponent) {
114
+ // Stop existing component (with error handling to continue on failure)
115
+ try {
116
+ existingComponent.stop();
117
+ }
118
+ catch (error) {
119
+ console.warn('[JQHTML] Error stopping existing component during replacement:', error);
120
+ }
121
+ // Remove component classes (any class starting with capital letter, except BEM classes)
122
+ const classes = element.attr('class');
123
+ if (classes) {
124
+ const classList = classes.split(/\s+/);
125
+ const nonComponentClasses = classList.filter((cls) => {
126
+ // Keep class if:
127
+ // 1. It's empty
128
+ // 2. It doesn't start with a capital letter
129
+ // 3. It's a BEM-style class (contains __) - these persist across reinitialization
130
+ return !cls || cls[0] !== cls[0].toUpperCase() || cls[0] === cls[0].toLowerCase() || cls.includes('__');
131
+ });
132
+ element.attr('class', nonComponentClasses.join(' '));
133
+ }
134
+ // Remove component data
135
+ element.removeData('_component');
136
+ }
137
+ // Setter mode - create new component
138
+ let ComponentClass;
139
+ let componentName;
140
+ if (typeof componentOrName === 'string') {
141
+ // Look up by name (use default Component if not found)
142
+ componentName = componentOrName;
143
+ const found = get_component_class(componentOrName);
144
+ // Always pass _component_name when instantiating by string name
145
+ // This is critical for template resolution, especially when class is inherited via extends chain
146
+ // Example: 'Contacts_DataGrid' uses DataGrid_Abstract class but needs Contacts_DataGrid template
147
+ args = { ...args, _component_name: componentName };
148
+ if (!found) {
149
+ // Only warn if no template is defined either (truly undefined component)
150
+ // The get_template() call will handle the warning appropriately
151
+ // Use the base Jqhtml_Component class
152
+ ComponentClass = Jqhtml_Component;
153
+ }
154
+ else {
155
+ ComponentClass = found;
156
+ }
157
+ }
158
+ else {
159
+ // Direct class reference
160
+ ComponentClass = componentOrName;
161
+ }
162
+ // Check if element tag matches expected tag from template
163
+ let targetElement = element;
164
+ if (componentName) {
165
+ const template = get_template(componentName);
166
+ // Tag precedence: _tag (invocation) > tag (template) > 'div'
167
+ const expectedTag = args._tag || template.tag || 'div';
168
+ const currentTag = element.prop('tagName').toLowerCase();
169
+ if (currentTag !== expectedTag.toLowerCase()) {
170
+ // Tag mismatch
171
+ if (args._inner_html) {
172
+ // Replace element with correct tag (only when using server-rendered content)
173
+ const newElement = jQuery(`<${expectedTag}></${expectedTag}>`);
174
+ // Copy all attributes from old element to new element
175
+ const oldEl = element[0];
176
+ if (oldEl && oldEl.attributes) {
177
+ for (let i = 0; i < oldEl.attributes.length; i++) {
178
+ const attr = oldEl.attributes[i];
179
+ newElement.attr(attr.name, attr.value);
180
+ }
181
+ }
182
+ // Copy innerHTML
183
+ newElement.html(element.html());
184
+ // Replace in DOM
185
+ element.replaceWith(newElement);
186
+ targetElement = newElement;
187
+ }
188
+ else if (currentTag !== 'body') {
189
+ // Just warn - don't replace (suppress warning for <body> tags)
190
+ console.warn(`[JQHTML] Component '${componentName}' expects tag '<${expectedTag}>' but element is '<${currentTag}>'. ` +
191
+ `Element tag will not be changed. Consider using the correct tag.`);
192
+ }
193
+ }
194
+ }
195
+ // Create component instance - element first, then args
196
+ const component = new ComponentClass(targetElement, args);
197
+ // Boot the component (async, runs in background)
198
+ component._boot();
199
+ // Apply debug delay after component creation
200
+ applyDebugDelay('component');
201
+ // Return the jQuery element to enable chaining (fluent interface pattern)
202
+ return targetElement;
203
+ };
204
+ /**
205
+ * shallowFind - Find nearest descendants matching selector
206
+ *
207
+ * Opposite of closest(): searches downward instead of upward
208
+ * Stops traversal when a match is found (does not recurse into matched elements)
209
+ *
210
+ * Example:
211
+ * <div id="root">
212
+ * <div class="Widget"> <!-- MATCHED -->
213
+ * <div class="Widget"> <!-- EXCLUDED (nested inside another .Widget) -->
214
+ * </div>
215
+ * </div>
216
+ * <div class="Widget"> <!-- MATCHED -->
217
+ * </div>
218
+ * </div>
219
+ *
220
+ * $('#root').shallowFind('.Widget') returns 2 elements (excludes nested one)
221
+ */
222
+ jQuery.fn.shallowFind = function (selector) {
223
+ const results = [];
224
+ // Process each element in the jQuery collection
225
+ this.each(function () {
226
+ // Recursive traversal function
227
+ const traverse = (parent) => {
228
+ // Check direct children
229
+ for (let i = 0; i < parent.children.length; i++) {
230
+ const child = parent.children[i];
231
+ // Check if this child matches the selector
232
+ if (jQuery(child).is(selector)) {
233
+ // Match found - add to results and DON'T recurse into it
234
+ results.push(child);
235
+ }
236
+ else {
237
+ // No match - recurse into this child
238
+ traverse(child);
239
+ }
240
+ }
241
+ };
242
+ // Start traversal from this element
243
+ traverse(this);
244
+ });
245
+ // Return jQuery collection of results
246
+ return jQuery(results);
247
+ };
248
+ // Store original jQuery methods
249
+ const originalEmpty = jQuery.fn.empty;
250
+ const originalHtml = jQuery.fn.html;
251
+ const originalText = jQuery.fn.text;
252
+ // ---------------------------------------------------------------------------
253
+ // Guard against hand-creating elements with data-sid via jQuery.
254
+ //
255
+ // $sid / data-sid is provisioned ONLY by the jqhtml template renderer, which
256
+ // ALWAYS emits data-sid paired with a scoped id ("<sid>:<component_cid>").
257
+ // That scoped id is what binds the element to its component; data-sid on its
258
+ // own does nothing. So an element whose data-sid is NOT paired with such an id
259
+ // was hand-written (e.g. .html('<div data-sid="x">')) and the framework never
260
+ // provisioned it - this.$sid('x') can never find it. We detect exactly that.
261
+ //
262
+ // The framework's own rendering injects data-sid via native innerHTML, never
263
+ // through these jQuery methods, and the one internal jQuery .html() copy
264
+ // (the .component() tag-mismatch path) carries the provisioned id - so neither
265
+ // trips this guard.
266
+ // ---------------------------------------------------------------------------
267
+ // Return the offending data-sid value if `html` contains a hand-written
268
+ // data-sid element (data-sid without the scoped "<sid>:<cid>" id), else null.
269
+ const find_manual_sid = (html) => {
270
+ if (typeof html !== 'string' || html.indexOf('data-sid') === -1)
271
+ return null;
272
+ if (typeof document === 'undefined')
273
+ return null; // no DOM to parse (SSR)
274
+ const tpl = document.createElement('template');
275
+ tpl.innerHTML = html; // native parse - does not route back through jQuery
276
+ const candidates = tpl.content.querySelectorAll('[data-sid]');
277
+ for (let i = 0; i < candidates.length; i++) {
278
+ const el = candidates[i];
279
+ const sid = el.getAttribute('data-sid') || '';
280
+ const id = el.getAttribute('id') || '';
281
+ // Provisioned elements have id="<sid>:<cid>". Anything else is hand-written.
282
+ if (id.indexOf(sid + ':') !== 0)
283
+ return sid;
284
+ }
285
+ return null;
286
+ };
287
+ const assert_no_manual_sid = (value, where) => {
288
+ const sid = find_manual_sid(value);
289
+ if (sid === null)
290
+ return;
291
+ throw new Error(`[JQHTML] Manually creating an element with data-sid="${sid}" via jQuery (${where}) is not allowed.\n\n` +
292
+ `data-sid is NOT a normal attribute you can hand-write. It is provisioned by the jqhtml template\n` +
293
+ `renderer, which scopes the element to its component by pairing data-sid with a unique id\n` +
294
+ `("${sid}:<component_cid>"). An element you create yourself has no such scoped id, so\n` +
295
+ `this.$sid('${sid}') / this.sid('${sid}') can never find it - scoping to a component is the entire\n` +
296
+ `point of data-sid.\n\n` +
297
+ `CORRECT USAGE:\n` +
298
+ ` • Put the element in your component template with $sid:\n` +
299
+ ` <div $sid="${sid}"></div>\n` +
300
+ ` then access it from the component: this.$sid('${sid}')\n` +
301
+ ` • Need it created dynamically? Use a child component or a $redrawable element in the template\n` +
302
+ ` and render() it, instead of injecting raw HTML.\n\n` +
303
+ `If you only need to select or mark a plain element, use a normal attribute or class instead:\n` +
304
+ ` • <div data-role="${sid}"> → .find('[data-role="${sid}"]')\n` +
305
+ ` • <div class="MyComponent__${sid}"> → .find('.MyComponent__${sid}')`);
306
+ };
307
+ /**
308
+ * Override jQuery.fn.empty() to stop child components before clearing DOM
309
+ * This ensures component cleanup hooks fire when DOM is cleared
310
+ */
311
+ jQuery.fn.empty = function () {
312
+ return this.each(function () {
313
+ // Stop all child components before clearing DOM
314
+ jQuery(this).find('.Component').each(function () {
315
+ const component = jQuery(this).data('_component');
316
+ if (component && !component._stopped) {
317
+ component._stop(); // Stop just the component, DOM will be cleared anyway
318
+ }
319
+ });
320
+ // Call original empty
321
+ originalEmpty.call(jQuery(this));
322
+ });
323
+ };
324
+ /**
325
+ * Override jQuery.fn.html() to stop child components when setting new content
326
+ * When used as setter, calls .empty() first to properly cleanup components
327
+ */
328
+ jQuery.fn.html = function (value) {
329
+ // Getter - just pass through
330
+ if (arguments.length === 0) {
331
+ return originalHtml.call(this);
332
+ }
333
+ // Reject hand-written data-sid before mutating the DOM
334
+ assert_no_manual_sid(value, '.html()');
335
+ // Setter - empty first (which stops components), then set content
336
+ return this.each(function () {
337
+ jQuery(this).empty();
338
+ originalHtml.call(jQuery(this), value);
339
+ });
340
+ };
341
+ /**
342
+ * Override jQuery.fn.text() to stop child components when setting new content
343
+ * When used as setter, calls .empty() first to properly cleanup components
344
+ */
345
+ jQuery.fn.text = function (value) {
346
+ // Getter - just pass through
347
+ if (arguments.length === 0) {
348
+ return originalText.call(this);
349
+ }
350
+ // Setter - empty first (which stops components), then set content
351
+ return this.each(function () {
352
+ jQuery(this).empty();
353
+ originalText.call(jQuery(this), value);
354
+ });
355
+ };
356
+ // Store original jQuery.fn.on
357
+ const originalOn = jQuery.fn.on;
358
+ // Common jQuery DOM events - no warning for these
359
+ const COMMON_JQUERY_EVENTS = new Set([
360
+ 'click', 'dblclick', 'mousedown', 'mouseup', 'mousemove', 'mouseover', 'mouseout', 'mouseenter', 'mouseleave',
361
+ 'keydown', 'keyup', 'keypress',
362
+ 'focus', 'blur', 'focusin', 'focusout',
363
+ 'change', 'input', 'submit', 'reset', 'select',
364
+ 'scroll', 'resize',
365
+ 'load', 'unload', 'error',
366
+ 'touchstart', 'touchend', 'touchmove', 'touchcancel',
367
+ 'contextmenu', 'wheel',
368
+ 'copy', 'cut', 'paste',
369
+ 'drag', 'dragstart', 'dragend', 'dragenter', 'dragleave', 'dragover', 'drop'
370
+ ]);
371
+ /**
372
+ * Override jQuery.fn.on() to warn when attaching non-DOM events to component root elements
373
+ *
374
+ * JQHTML components have their own .on() method for lifecycle events (ready, create, render, etc).
375
+ * Attaching these via jQuery .on() to a component's root element usually indicates
376
+ * the developer meant to use component.on() instead.
377
+ *
378
+ * Common jQuery DOM events (click, change, focus, etc.) do not trigger a warning.
379
+ */
380
+ jQuery.fn.on = function (...args) {
381
+ // Get event name (first argument)
382
+ const eventName = typeof args[0] === 'string' ? args[0].split('.')[0] : null; // Strip namespace
383
+ // Check for incorrect [data-sid usage in delegated selector (second argument)
384
+ // Pattern: .on('click', '[data-sid="btn"]', handler)
385
+ if (typeof args[1] === 'string' && args[1].includes('[data-sid')) {
386
+ throw new Error(`[JQHTML] Incorrect use of data-sid in .on() delegated selector: "${args[1]}"\n\n` +
387
+ `data-sid is a scoped ID system - the data-sid attribute exists only for debugging in DevTools ` +
388
+ `and may be disabled in production.\n\n` +
389
+ `CORRECT USAGE:\n` +
390
+ ` • In templates: $sid="my_element"\n` +
391
+ ` • In JavaScript: this.$sid('my_element').on('${args[0]}', handler)\n\n` +
392
+ `$sid creates a unique ID scoped to the parent component, accessible only from within that component.\n\n` +
393
+ `ALTERNATIVES for event delegation:\n` +
394
+ ` • data-* attribute: <div data-role="btn"> → .on('${args[0]}', '[data-role="btn"]', handler)\n` +
395
+ ` • BEM class name: <div class="MyComponent__btn"> → .on('${args[0]}', '.MyComponent__btn', handler)\n` +
396
+ ` • Custom attribute: <div data-subelement="btn"> → .on('${args[0]}', '[data-subelement="btn"]', handler)`);
397
+ }
398
+ // Check first element for Component class and warn if needed
399
+ if (eventName && !COMMON_JQUERY_EVENTS.has(eventName) && this.length > 0) {
400
+ const firstEl = this.first();
401
+ if (firstEl.hasClass('Component')) {
402
+ const component = firstEl.data('_component');
403
+ const componentName = component?.component_name?.() || 'Component';
404
+ console.warn(`[JQHTML] jQuery .on('${args[0]}') called on <${componentName}> root element.\n` +
405
+ `You may have meant to use component.on() for lifecycle events, or attach to a child element.`);
406
+ }
407
+ }
408
+ // Call original .on() with all arguments
409
+ return originalOn.apply(this, args);
410
+ };
411
+ // Store original jQuery.fn.find
412
+ const originalFind = jQuery.fn.find;
413
+ /**
414
+ * Override jQuery.fn.find() to detect incorrect [data-sid usage
415
+ *
416
+ * data-sid is for DevTools debugging only and may be disabled in production.
417
+ * Developers should use this.$sid('name') or this.sid('name') from within components.
418
+ */
419
+ jQuery.fn.find = function (selector) {
420
+ // Check for incorrect [data-sid usage
421
+ if (typeof selector === 'string' && selector.includes('[data-sid')) {
422
+ throw new Error(`[JQHTML] Incorrect use of data-sid in selector: "${selector}"\n\n` +
423
+ `data-sid is a scoped ID system - the data-sid attribute exists only for debugging in DevTools ` +
424
+ `and may be disabled in production.\n\n` +
425
+ `CORRECT USAGE:\n` +
426
+ ` • In templates: $sid="my_element"\n` +
427
+ ` • In JavaScript: this.$sid('my_element') or this.sid('my_element')\n\n` +
428
+ `$sid creates a unique ID scoped to the parent component, accessible only from within that component.\n\n` +
429
+ `ALTERNATIVES for non-scoped element selection:\n` +
430
+ ` • data-* attribute: <div data-role="input"> → .find('[data-role="input"]')\n` +
431
+ ` • BEM class name: <div class="MyComponent__input"> → .find('.MyComponent__input')\n` +
432
+ ` • Custom attribute: <div data-subelement="input"> → .find('[data-subelement="input"]')`);
433
+ }
434
+ // Pass through to original .find()
435
+ return originalFind.call(this, selector);
436
+ };
437
+ // Guard the content-insertion methods that build elements from HTML strings,
438
+ // plus $() construction. Wrapped once so repeated init() calls don't re-wrap.
439
+ if (!jQuery.fn.__jqhtml_sid_guarded) {
440
+ jQuery.fn.__jqhtml_sid_guarded = true;
441
+ // .append('<div data-sid>'), .prepend, .before, .after, .replaceWith
442
+ for (const name of ['append', 'prepend', 'before', 'after', 'replaceWith']) {
443
+ const original = jQuery.fn[name];
444
+ if (typeof original !== 'function')
445
+ continue;
446
+ jQuery.fn[name] = function (...args) {
447
+ for (const arg of args)
448
+ assert_no_manual_sid(arg, '.' + name + '()');
449
+ return original.apply(this, args);
450
+ };
451
+ }
452
+ // $('<div data-sid="x">') - catch the element at construction time. A
453
+ // selector like $('[data-sid="x"]') parses to no data-sid element, so it is
454
+ // not flagged here (selector misuse is handled by .find()/.on()).
455
+ const originalInit = jQuery.fn.init;
456
+ const PatchedInit = function (selector, context, root) {
457
+ if (typeof selector === 'string')
458
+ assert_no_manual_sid(selector, '$()');
459
+ return new originalInit(selector, context, root);
460
+ };
461
+ PatchedInit.prototype = jQuery.fn;
462
+ jQuery.fn.init = PatchedInit;
463
+ }
464
+ // Install the single debounced window resize listener that drives
465
+ // on_viewport_resize() on every component. Idempotent.
466
+ init_viewport_resize(jQuery);
467
+ }
468
+ // Try to auto-initialize if global jQuery exists
469
+ if (typeof window !== 'undefined' && window.jQuery) {
470
+ init_jquery_plugin(window.jQuery);
471
+ }
472
+ //# sourceMappingURL=jquery-plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jquery-plugin.js","sourceRoot":"","sources":["../src/jquery-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EACL,mBAAmB,EACnB,YAAY,EACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAwBrD,wEAAwE;AACxE,MAAM,UAAU,kBAAkB,CAAC,MAAW;IAC5C,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,2FAA2F,CAAC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