@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
@@ -1,141 +0,0 @@
1
- /**
2
- * JQHTML Component Event System
3
- *
4
- * Extracted from component.ts - handles lifecycle event registration,
5
- * triggering, and state tracking.
6
- *
7
- * Events have "sticky" semantics for lifecycle events: if an event has already
8
- * occurred, new .on() handlers fire immediately with the stored data.
9
- */
10
- /**
11
- * Register a callback for an event.
12
- *
13
- * Lifecycle events (create, render, load, loaded, ready) are "sticky":
14
- * If a lifecycle event has already occurred, the callback fires immediately
15
- * AND registers for future occurrences.
16
- *
17
- * Custom events only fire when explicitly triggered via trigger().
18
- *
19
- * @param component - The component instance
20
- * @param event_name - Name of the event
21
- * @param callback - Callback: (component, data?) => void
22
- */
23
- export function event_on(component, event_name, callback) {
24
- // Initialize callback array for this event if needed
25
- if (!component._lifecycle_callbacks.has(event_name)) {
26
- component._lifecycle_callbacks.set(event_name, []);
27
- }
28
- // Add callback to queue
29
- component._lifecycle_callbacks.get(event_name).push(callback);
30
- // If this lifecycle event has already occurred, fire the callback immediately
31
- // with the stored data from when trigger() was called
32
- if (component._lifecycle_states.has(event_name)) {
33
- try {
34
- const stored_data = component._lifecycle_states.get(event_name);
35
- callback(component, stored_data);
36
- }
37
- catch (error) {
38
- console.error(`[JQHTML] Error in ${event_name} callback:`, error);
39
- }
40
- }
41
- return component;
42
- }
43
- /**
44
- * Register a callback that fires exactly once.
45
- *
46
- * - If the event already occurred (sticky), fires immediately and does NOT register.
47
- * - If the event has not occurred, registers and auto-deregisters after first fire.
48
- *
49
- * @param component - The component instance
50
- * @param event_name - Name of the event
51
- * @param callback - Callback: (component, data?) => void
52
- */
53
- export function event_once(component, event_name, callback) {
54
- // If event already occurred, fire immediately and we're done
55
- if (component._lifecycle_states.has(event_name)) {
56
- try {
57
- const stored_data = component._lifecycle_states.get(event_name);
58
- callback(component, stored_data);
59
- }
60
- catch (error) {
61
- console.error(`[JQHTML] Error in ${event_name} once callback:`, error);
62
- }
63
- return component;
64
- }
65
- // Wrap callback to auto-deregister after first fire
66
- const wrapper = (comp, data) => {
67
- // Remove ourselves from the callback list
68
- const callbacks = component._lifecycle_callbacks.get(event_name);
69
- if (callbacks) {
70
- const idx = callbacks.indexOf(wrapper);
71
- if (idx !== -1)
72
- callbacks.splice(idx, 1);
73
- }
74
- callback(comp, data);
75
- };
76
- // Initialize callback array for this event if needed
77
- if (!component._lifecycle_callbacks.has(event_name)) {
78
- component._lifecycle_callbacks.set(event_name, []);
79
- }
80
- component._lifecycle_callbacks.get(event_name).push(wrapper);
81
- return component;
82
- }
83
- /**
84
- * Trigger an event - fires all registered callbacks.
85
- * Marks event as occurred so future .on() calls fire immediately.
86
- *
87
- * @param component - The component instance
88
- * @param event_name - Name of the event to trigger
89
- * @param data - Optional data to pass to callbacks as second parameter
90
- */
91
- export function event_trigger(component, event_name, data) {
92
- // Mark this event as occurred and store the data for late subscribers
93
- component._lifecycle_states.set(event_name, data);
94
- // Fire all registered callbacks for this event.
95
- // Iterate a SNAPSHOT: handlers registered via once() splice themselves out of the
96
- // live array while it is being iterated, which would shift later handlers into
97
- // already-visited slots and skip them. The snapshot also means a handler
98
- // registered during dispatch does not fire in this dispatch (event_on's sticky
99
- // immediate-fire already delivered it).
100
- const callbacks = component._lifecycle_callbacks.get(event_name);
101
- if (callbacks) {
102
- for (const callback of [...callbacks]) {
103
- try {
104
- callback.bind(component)(component, data);
105
- }
106
- catch (error) {
107
- console.error(`[JQHTML] Error in ${event_name} callback:`, error);
108
- }
109
- }
110
- }
111
- }
112
- /**
113
- * Check if any callbacks are registered for a given event.
114
- *
115
- * @param component - The component instance
116
- * @param event_name - Name of the event to check
117
- */
118
- export function event_on_registered(component, event_name) {
119
- const callbacks = component._lifecycle_callbacks.get(event_name);
120
- return !!(callbacks && callbacks.length > 0);
121
- }
122
- /**
123
- * Invalidate a lifecycle event - removes the "already occurred" marker.
124
- *
125
- * After invalidate() is called:
126
- * - New .on() handlers will NOT fire immediately
127
- * - The ready() promise will NOT resolve immediately
128
- * - Handlers wait for the next trigger() call
129
- *
130
- * Existing registered callbacks are NOT removed - they'll fire on next trigger().
131
- *
132
- * Use case: Call invalidate('ready') at the start of reload() or render()
133
- * so that any new .on('ready') handlers wait for the reload/render to complete.
134
- *
135
- * @param component - The component instance
136
- * @param event_name - Name of the event to invalidate
137
- */
138
- export function event_invalidate(component, event_name) {
139
- component._lifecycle_states.delete(event_name);
140
- }
141
- //# sourceMappingURL=component-events.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component-events.js","sourceRoot":"","sources":["../src/component-events.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,QAAQ,CAAC,SAAc,EAAE,UAAkB,EAAE,QAAyC;IACpG,qDAAqD;IACrD,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;QACpD,SAAS,CAAC,oBAAoB,CAAC,GAAG,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IACrD,CAAC;IAED,wBAAwB;IACxB,SAAS,CAAC,oBAAoB,CAAC,GAAG,CAAC,UAAU,CAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAE/D,8EAA8E;IAC9E,sDAAsD;IACtD,IAAI,SAAS,CAAC,iBAAiB,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;QAChD,IAAI,CAAC;YACH,MAAM,WAAW,GAAG,SAAS,CAAC,iBAAiB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAChE,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;QACnC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,qBAAqB,UAAU,YAAY,EAAE,KAAK,CAAC,CAAC;QACpE,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,C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,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,SAAc,EAAE,UAAkB,EAAE,IAAU;IAC1E,sEAAsE;IACtE,SAAS,CAAC,iBAAiB,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAElD,gDAAgD;IAChD,kFAAkF;IAClF,+EAA+E;IAC/E,yEAAyE;IACzE,+EAA+E;IAC/E,wCAAwC;IACxC,MAAM,SAAS,GAAG,SAAS,CAAC,oBAAoB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACjE,IAAI,SAAS,EAAE,CAAC;QACd,KAAK,MAAM,QAAQ,IAAI,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC;YACtC,IAAI,CAAC;gBACH,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;YAC5C,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CAAC,qBAAqB,UAAU,YAAY,EAAE,KAAK,CAAC,CAAC;YACpE,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,SAAc,EAAE,UAAkB;IACpE,MAAM,SAAS,GAAG,SAAS,CAAC,oBAAoB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACjE,OAAO,CAAC,CAAC,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,gBAAgB,CAAC,SAAc,EAAE,UAAkB;IACjE,SAAS,CAAC,iBAAiB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AACjD,CAAC"}
@@ -1,118 +0,0 @@
1
- /**
2
- * JQHTML Component Lifecycle Queue
3
- *
4
- * Serializes lifecycle operations (render, reload, refresh) per component.
5
- * Replaces _create_debounced_function with a proper queue that:
6
- *
7
- * - At most one operation runs at a time per component
8
- * - At most one operation is pending (waiting for the current to finish)
9
- * - Same-type pending operations collapse (fan-in: all callers share one execution)
10
- * - Different-type pending operations: new replaces old (old callers get the new result)
11
- *
12
- * Boot bypasses this queue entirely - it runs the lifecycle directly.
13
- */
14
- export class Component_Queue {
15
- constructor() {
16
- /** Currently executing operation */
17
- this._current = null;
18
- /** Next operation waiting to execute after current completes */
19
- this._pending = null;
20
- }
21
- /**
22
- * Enqueue a lifecycle operation.
23
- *
24
- * Behavior:
25
- * - Nothing running → execute immediately
26
- * - Something running, no pending → create pending entry
27
- * - Something running, same type pending → collapse (share pending promise)
28
- * - Something running, different type pending → replace pending (all callers get new result)
29
- *
30
- * @param type - Operation type ('render', 'reload', 'refresh', 'load')
31
- * @param executor - The async function to execute
32
- * @returns Promise that resolves when the operation completes
33
- */
34
- enqueue(type, executor) {
35
- // If nothing running, execute immediately
36
- if (!this._current) {
37
- return this._execute(type, executor);
38
- }
39
- // Something is running — add to pending
40
- if (this._pending) {
41
- if (this._pending.type === type) {
42
- // Same type pending → collapse (fan-in)
43
- // All callers share the same future execution
44
- return new Promise((resolve, reject) => {
45
- this._pending.resolvers.push(resolve);
46
- this._pending.rejecters.push(reject);
47
- });
48
- }
49
- else {
50
- // Different type pending → replace
51
- // Old pending callers join the new operation
52
- // (their operation was superseded by a different type)
53
- const old_resolvers = this._pending.resolvers;
54
- const old_rejecters = this._pending.rejecters;
55
- return new Promise((resolve, reject) => {
56
- this._pending = {
57
- type,
58
- executor,
59
- resolvers: [...old_resolvers, resolve],
60
- rejecters: [...old_rejecters, reject]
61
- };
62
- });
63
- }
64
- }
65
- // No pending entry yet — create one
66
- return new Promise((resolve, reject) => {
67
- this._pending = {
68
- type,
69
- executor,
70
- resolvers: [resolve],
71
- rejecters: [reject]
72
- };
73
- });
74
- }
75
- /**
76
- * Execute an operation and handle pending queue after completion.
77
- * @private
78
- */
79
- _execute(type, executor) {
80
- const promise = (async () => {
81
- try {
82
- await executor();
83
- }
84
- finally {
85
- this._current = null;
86
- // Run pending if exists
87
- if (this._pending) {
88
- const pending = this._pending;
89
- this._pending = null;
90
- try {
91
- await this._execute(pending.type, pending.executor);
92
- for (const resolve of pending.resolvers)
93
- resolve();
94
- }
95
- catch (err) {
96
- for (const reject of pending.rejecters)
97
- reject(err);
98
- }
99
- }
100
- }
101
- })();
102
- this._current = { type, promise };
103
- return promise;
104
- }
105
- /**
106
- * Check if any operation is currently running.
107
- */
108
- get is_busy() {
109
- return this._current !== null;
110
- }
111
- /**
112
- * Check if there's a pending operation waiting.
113
- */
114
- get has_pending() {
115
- return this._pending !== null;
116
- }
117
- }
118
- //# sourceMappingURL=component-queue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component-queue.js","sourceRoot":"","sources":["../src/component-queue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AASH,MAAM,OAAO,eAAe;IAA5B;QACE,oCAAoC;QAC5B,aAAQ,GAAoD,IAAI,CAAC;QAEzE,gEAAgE;QACxD,aAAQ,GAAuB,IAAI,CAAC;IAsG9C,CAAC;IApGC;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,IAAY,EAAE,QAA6B;QACjD,0CAA0C;QAC1C,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACvC,CAAC;QAED,wCAAwC;QACxC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;gBAChC,wCAAwC;gBACxC,8CAA8C;gBAC9C,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;oBAC3C,IAAI,CAAC,QAAS,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBACvC,IAAI,CAAC,QAAS,CAAC,SAAS,CAAC,IAAI,CAA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OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;wBACpD,KAAK,MAAM,OAAO,IAAI,OAAO,CAAC,SAAS;4BAAE,OAAO,EAAE,CAAC;oBACrD,CAAC;oBAAC,OAAO,GAAG,EAAE,CAAC;wBACb,KAAK,MAAM,MAAM,IAAI,OAAO,CAAC,SAAS;4BAAE,MAAM,CAAC,GAAG,CAAC,CAAC;oBACtD,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC,CAAC,EAAE,CAAC;QAEL,IAAI,CAAC,QAAQ,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;QAClC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;OAEG;IACH,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC;IAChC,CAAC;CACF"}
@@ -1,298 +0,0 @@
1
- /**
2
- * JQHTML v2 Component Registry
3
- *
4
- * Global registry for component classes and templates
5
- * Enables dynamic component instantiation and template association
6
- */
7
- import { Jqhtml_Component } from './component.js';
8
- // Registry storage
9
- const component_classes = new Map();
10
- const component_templates = new Map();
11
- // Track warnings to only show once per component name
12
- const warned_components = new Set();
13
- // Default template for components without registered templates
14
- const DEFAULT_TEMPLATE = {
15
- name: 'Jqhtml_Component', // Default name
16
- tag: 'div',
17
- render: function (data, args, content) {
18
- const _output = [];
19
- // Check for _inner_html first (server-rendered content)
20
- if (args._inner_html) {
21
- _output.push(args._inner_html);
22
- return [_output, this];
23
- }
24
- // Just render the content/slots
25
- if (content && typeof content === 'function') {
26
- const result = content(); // Call with no args to get default content
27
- // Handle both tuple and string returns
28
- if (Array.isArray(result) && result.length === 2) {
29
- // It's a [instructions, context] tuple
30
- _output.push(...result[0]);
31
- }
32
- else if (typeof result === 'string') {
33
- // It's a plain string
34
- _output.push(result);
35
- }
36
- }
37
- return [_output, this];
38
- }
39
- };
40
- export function register_component(nameOrClass, component_class, template) {
41
- // Handle overloaded signatures
42
- if (typeof nameOrClass === 'string') {
43
- // Called with (name, class, template?)
44
- const name = nameOrClass;
45
- if (!component_class) {
46
- throw new Error('Component class is required when registering by name');
47
- }
48
- // Validate component name starts with capital letter
49
- if (!/^[A-Z]/.test(name)) {
50
- throw new Error(`Component name '${name}' must start with a capital letter. Convention is First_Letter_With_Underscores.`);
51
- }
52
- component_classes.set(name, component_class);
53
- // If template provided, register it
54
- if (template) {
55
- // Validate template name matches component name
56
- if (template.name !== name) {
57
- throw new Error(`Template name '${template.name}' must match component name '${name}'`);
58
- }
59
- register_template(template);
60
- }
61
- }
62
- else {
63
- // Called with just (class) - extract name from class
64
- const component_class = nameOrClass;
65
- const name = component_class.name;
66
- if (!name || name === 'Jqhtml_Component') {
67
- throw new Error('Component class must have a name when registering without explicit name');
68
- }
69
- component_classes.set(name, component_class);
70
- }
71
- }
72
- /**
73
- * Get a component class by name
74
- * If no class found, walks the template extends chain to find parent class
75
- */
76
- export function get_component_class(name) {
77
- // First check if class directly registered
78
- const directClass = component_classes.get(name);
79
- if (directClass) {
80
- return directClass;
81
- }
82
- // No direct class found - walk template extends chain to find parent with class
83
- const template = component_templates.get(name);
84
- if (template && template.extends) {
85
- // Recursively check parent templates
86
- const visited = new Set([name]); // Prevent infinite loops
87
- let currentTemplateName = template.extends;
88
- while (currentTemplateName && !visited.has(currentTemplateName)) {
89
- visited.add(currentTemplateName);
90
- // Check if this parent has a registered class
91
- const parentClass = component_classes.get(currentTemplateName);
92
- if (parentClass) {
93
- if (window.jqhtml?.debug?.enabled) {
94
- console.log(`[JQHTML] Component '${name}' using class from parent '${currentTemplateName}' via extends chain`);
95
- }
96
- return parentClass;
97
- }
98
- // Continue walking up the chain
99
- const parentTemplate = component_templates.get(currentTemplateName);
100
- if (parentTemplate && parentTemplate.extends) {
101
- currentTemplateName = parentTemplate.extends;
102
- }
103
- else {
104
- break;
105
- }
106
- }
107
- }
108
- return undefined;
109
- }
110
- /**
111
- * Register a template - name is extracted from template.name property
112
- * Returns true if registered, false if duplicate
113
- */
114
- export function register_template(template_def) {
115
- const name = template_def.name;
116
- if (!name) {
117
- throw new Error('Template must have a name property');
118
- }
119
- // Validate template name starts with capital letter
120
- if (!/^[A-Z]/.test(name)) {
121
- throw new Error(`Template name '${name}' must start with a capital letter. Convention is First_Letter_With_Underscores.`);
122
- }
123
- // Check for duplicate registration
124
- if (component_templates.has(name)) {
125
- console.warn(`[JQHTML] Template '${name}' already registered, skipping duplicate registration`);
126
- return false;
127
- }
128
- component_templates.set(name, template_def);
129
- if (window.jqhtml?.debug?.enabled) {
130
- console.log(`[JQHTML] Successfully registered template: ${name}`);
131
- }
132
- // Also attach metadata to the component class if it exists
133
- const component_class = component_classes.get(name);
134
- if (component_class) {
135
- component_class._jqhtml_metadata = {
136
- tag: template_def.tag,
137
- defaultAttributes: template_def.defaultAttributes || {}
138
- };
139
- }
140
- return true;
141
- }
142
- /**
143
- * Get template for a component by name
144
- */
145
- export function get_template(name) {
146
- const template = component_templates.get(name);
147
- if (!template) {
148
- // Check if we have a class but no template - walk prototype chain
149
- const component_class = component_classes.get(name);
150
- if (component_class) {
151
- // Class exists but no template - walk up prototype chain to find ancestor template
152
- const inherited_template = get_template_by_class(component_class);
153
- if (inherited_template !== DEFAULT_TEMPLATE) {
154
- if (window.jqhtml?.debug?.enabled) {
155
- console.log(`[JQHTML] Component '${name}' has no template, using template from prototype chain`);
156
- }
157
- return inherited_template;
158
- }
159
- // Class exists but no template in chain
160
- if (window.jqhtml?.debug?.enabled && !warned_components.has(name)) {
161
- warned_components.add(name);
162
- console.log(`[JQHTML] No template found for class: ${name}, using default div template`);
163
- }
164
- }
165
- else {
166
- // No class and no template
167
- // Suppress warning for _Jqhtml_Component and Redrawable (internal components)
168
- // Only warn once per component name
169
- if (name !== '_Jqhtml_Component' && name !== 'Redrawable' && !warned_components.has(name)) {
170
- warned_components.add(name);
171
- console.warn(`[JQHTML] Creating ${name} with defaults - no template or class defined`);
172
- }
173
- }
174
- if (window.jqhtml?.debug?.verbose) {
175
- const registered = Array.from(component_templates.keys());
176
- console.log(`[JQHTML] Looking for template '${name}' in: [${registered.join(', ')}]`);
177
- }
178
- return DEFAULT_TEMPLATE;
179
- }
180
- return template;
181
- }
182
- /**
183
- * Get template for a component class - walks up inheritance chain
184
- */
185
- export function get_template_by_class(component_class) {
186
- // First check if class has static template property
187
- if (component_class.template) {
188
- return component_class.template;
189
- }
190
- // Then check registered templates by class name
191
- let currentClass = component_class;
192
- while (currentClass && currentClass.name !== 'Object') {
193
- // Normalize class name - handle different import patterns
194
- let normalizedName = currentClass.name;
195
- if (normalizedName === '_Jqhtml_Component' || normalizedName === '_Base_Jqhtml_Component') {
196
- normalizedName = 'Jqhtml_Component';
197
- }
198
- const template = component_templates.get(normalizedName);
199
- if (template) {
200
- return template;
201
- }
202
- // Walk up the prototype chain
203
- currentClass = Object.getPrototypeOf(currentClass);
204
- }
205
- return DEFAULT_TEMPLATE;
206
- }
207
- /**
208
- * Create a component instance by name
209
- * If no component class is registered, uses the default Component class
210
- */
211
- export function create_component(name, element, args = {}) {
212
- const ComponentClass = get_component_class(name) || Jqhtml_Component;
213
- return new ComponentClass(element, args);
214
- }
215
- /**
216
- * Check if a component is registered
217
- */
218
- export function has_component(name) {
219
- return component_classes.has(name);
220
- }
221
- /**
222
- * Get all registered component names
223
- */
224
- export function get_component_names() {
225
- return Array.from(component_classes.keys());
226
- }
227
- /**
228
- * Get all registered template names
229
- */
230
- export function get_registered_templates() {
231
- return Array.from(component_templates.keys());
232
- }
233
- /**
234
- * List all registered components with their template status
235
- */
236
- export function list_components() {
237
- const result = {};
238
- // Add all classes
239
- for (const name of component_classes.keys()) {
240
- result[name] = {
241
- has_class: true,
242
- has_template: component_templates.has(name)
243
- };
244
- }
245
- // Add any templates without classes
246
- for (const name of component_templates.keys()) {
247
- if (!result[name]) {
248
- result[name] = {
249
- has_class: false,
250
- has_template: true
251
- };
252
- }
253
- }
254
- return result;
255
- }
256
- /**
257
- * Unified registration function - auto-detects source type and delegates
258
- *
259
- * Accepts either:
260
- * - A compiled JQHTML template (has __jqhtml_template: true)
261
- * - A component class extending Jqhtml_Component (has static __jqhtml_component: true and static component_name)
262
- *
263
- * @param source - Compiled template or component class
264
- */
265
- export function register(source) {
266
- // Check for template (compiled .jqhtml file)
267
- if (source && typeof source === 'object' && '__jqhtml_template' in source && source.__jqhtml_template === true) {
268
- register_template(source);
269
- return;
270
- }
271
- // Check for component class (extends Jqhtml_Component)
272
- if (source && typeof source === 'function' && '__jqhtml_component' in source && source.__jqhtml_component === true) {
273
- // Prefer static component_name, fall back to class name
274
- const component_name = source.component_name || source.name;
275
- if (!component_name || typeof component_name !== 'string') {
276
- throw new Error('[JQHTML] Could not determine component name from class.\n\n' +
277
- 'Either define static component_name:\n' +
278
- ' class My_Component extends Jqhtml_Component {\n' +
279
- ' static component_name = "My_Component";\n' +
280
- ' }\n\n' +
281
- 'Or use register_component() with explicit name:\n' +
282
- ' jqhtml.register_component("My_Component", My_Component);');
283
- }
284
- register_component(component_name, source);
285
- return;
286
- }
287
- // Unknown type - provide helpful error
288
- throw new Error('[JQHTML] register() requires a compiled JQHTML template or a component class.\n\n' +
289
- 'For templates:\n' +
290
- ' import My_Template from "./my_component.jqhtml";\n' +
291
- ' jqhtml.register(My_Template);\n\n' +
292
- 'For classes:\n' +
293
- ' class My_Component extends Jqhtml_Component { }\n' +
294
- ' jqhtml.register(My_Component);\n\n' +
295
- 'Note: Class name is used for registration. If using JS minification with\n' +
296
- 'class name mangling, define static component_name or use register_component().');
297
- }
298
- //# sourceMappingURL=component-registry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component-registry.js","sourceRoot":"","sources":["../src/component-registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAsBlD,mBAAmB;AACnB,MAAM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