@jqhtml/core 2.3.59 → 2.3.61
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.
- package/dist/boot.d.ts +0 -0
- package/dist/boot.d.ts.map +0 -0
- package/dist/cache-key-serializer.d.ts +0 -0
- package/dist/cache-key-serializer.d.ts.map +0 -0
- package/dist/component-cache.d.ts +0 -0
- package/dist/component-cache.d.ts.map +0 -0
- package/dist/component-events.d.ts +0 -0
- package/dist/component-events.d.ts.map +0 -0
- package/dist/component-queue.d.ts +0 -0
- package/dist/component-queue.d.ts.map +0 -0
- package/dist/component-registry.d.ts +0 -0
- package/dist/component-registry.d.ts.map +0 -0
- package/dist/component.d.ts +0 -5
- package/dist/component.d.ts.map +1 -1
- package/dist/config.d.ts +0 -0
- package/dist/config.d.ts.map +0 -0
- package/dist/data-proxy.d.ts +0 -0
- package/dist/data-proxy.d.ts.map +0 -0
- package/dist/debug-entry.d.ts +0 -0
- package/dist/debug-entry.d.ts.map +0 -0
- package/dist/debug.d.ts +0 -0
- package/dist/debug.d.ts.map +0 -0
- package/dist/index.cjs +22 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -0
- package/dist/index.d.ts.map +0 -0
- package/dist/index.js +22 -31
- package/dist/index.js.map +1 -1
- package/dist/instruction-processor.d.ts +2 -1
- package/dist/instruction-processor.d.ts.map +1 -1
- package/dist/jqhtml-core.esm.js +23 -32
- package/dist/jqhtml-core.esm.js.map +1 -1
- package/dist/jqhtml-debug.esm.js +0 -0
- package/dist/jqhtml-debug.esm.js.map +0 -0
- package/dist/jquery-plugin.d.ts +0 -0
- package/dist/jquery-plugin.d.ts.map +0 -0
- package/dist/lifecycle-manager.d.ts +0 -0
- package/dist/lifecycle-manager.d.ts.map +0 -0
- package/dist/load-coordinator.d.ts +0 -0
- package/dist/load-coordinator.d.ts.map +0 -0
- package/dist/local-storage.d.ts +0 -0
- package/dist/local-storage.d.ts.map +0 -0
- package/dist/preload-data.d.ts +0 -0
- package/dist/preload-data.d.ts.map +0 -0
- package/dist/template-renderer.d.ts +0 -0
- package/dist/template-renderer.d.ts.map +0 -0
- package/dist/viewport.d.ts +0 -0
- package/dist/viewport.d.ts.map +0 -0
- package/package.json +1 -1
- package/dist/boot.js +0 -130
- package/dist/boot.js.map +0 -1
- package/dist/cache-key-serializer.js +0 -140
- package/dist/cache-key-serializer.js.map +0 -1
- package/dist/component-cache.js +0 -270
- package/dist/component-cache.js.map +0 -1
- package/dist/component-events.js +0 -141
- package/dist/component-events.js.map +0 -1
- package/dist/component-queue.js +0 -118
- package/dist/component-queue.js.map +0 -1
- package/dist/component-registry.js +0 -298
- package/dist/component-registry.js.map +0 -1
- package/dist/component.js +0 -1892
- package/dist/component.js.map +0 -1
- package/dist/config.js +0 -64
- package/dist/config.js.map +0 -1
- package/dist/data-proxy.js +0 -223
- package/dist/data-proxy.js.map +0 -1
- package/dist/debug-entry.js +0 -8
- package/dist/debug-entry.js.map +0 -1
- package/dist/debug.js +0 -203
- package/dist/debug.js.map +0 -1
- package/dist/instruction-processor.js +0 -563
- package/dist/instruction-processor.js.map +0 -1
- package/dist/jquery-plugin.js +0 -472
- package/dist/jquery-plugin.js.map +0 -1
- package/dist/lifecycle-manager.js +0 -201
- package/dist/lifecycle-manager.js.map +0 -1
- package/dist/load-coordinator.js +0 -309
- package/dist/load-coordinator.js.map +0 -1
- package/dist/local-storage.js +0 -699
- package/dist/local-storage.js.map +0 -1
- package/dist/preload-data.js +0 -136
- package/dist/preload-data.js.map +0 -1
- package/dist/template-renderer.js +0 -278
- package/dist/template-renderer.js.map +0 -1
- package/dist/viewport.js +0 -69
- package/dist/viewport.js.map +0 -1
|
@@ -17,7 +17,8 @@ export interface ComponentInstruction {
|
|
|
17
17
|
export interface SlotInstruction {
|
|
18
18
|
slot: [string, Record<string, any>, (context: any) => [any[], Jqhtml_Component]];
|
|
19
19
|
}
|
|
20
|
-
export type
|
|
20
|
+
export type ContentInstruction = ['_content', Instruction[], Jqhtml_Component?];
|
|
21
|
+
export type Instruction = TagInstruction | RawTagInstruction | ComponentInstruction | SlotInstruction | ContentInstruction | string;
|
|
21
22
|
export declare function uid(): string;
|
|
22
23
|
/**
|
|
23
24
|
* Process an array of instructions and append to target
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instruction-processor.d.ts","sourceRoot":"","sources":["../src/instruction-processor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAKlD,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,GAAG,EAAE,EAAE,gBAAgB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,GAAG,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;CAClL;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,GAAG,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC;CAClF;
|
|
1
|
+
{"version":3,"file":"instruction-processor.d.ts","sourceRoot":"","sources":["../src/instruction-processor.ts"],"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AE,GAAG,EACX,OAAO,EAAE,gBAAgB,EACzB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GACtC,IAAI,CA0CN;AAyhBD;;GAEG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAW1F"}
|
package/dist/jqhtml-core.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* JQHTML Core v2.3.
|
|
2
|
+
* JQHTML Core v2.3.61
|
|
3
3
|
* (c) 2025 JQHTML Team
|
|
4
4
|
* Released under the MIT License
|
|
5
5
|
*/
|
|
@@ -639,7 +639,9 @@ function process_instructions(instructions, target, context, slots) {
|
|
|
639
639
|
if (el) {
|
|
640
640
|
const element = $(el);
|
|
641
641
|
el.removeAttribute('data-tid');
|
|
642
|
-
|
|
642
|
+
// Bind to the component whose template wrote this element, which for
|
|
643
|
+
// spliced content is not the component being rendered.
|
|
644
|
+
apply_attributes(element, tagData.attrs, tagData.context);
|
|
643
645
|
}
|
|
644
646
|
}
|
|
645
647
|
// Third pass: initialize and boot components in parallel
|
|
@@ -665,6 +667,16 @@ function process_instruction_to_html(instruction, html, tagElements, components,
|
|
|
665
667
|
// Raw HTML/text - no escaping, as requested
|
|
666
668
|
html.push(instruction);
|
|
667
669
|
}
|
|
670
|
+
else if (Array.isArray(instruction)) {
|
|
671
|
+
if (instruction[0] !== '_content' || !Array.isArray(instruction[1])) {
|
|
672
|
+
return;
|
|
673
|
+
}
|
|
674
|
+
// Content written in another template renders in that template's component.
|
|
675
|
+
const definer = instruction[2] || context;
|
|
676
|
+
for (const item of instruction[1]) {
|
|
677
|
+
process_instruction_to_html(item, html, tagElements, components, definer, slots);
|
|
678
|
+
}
|
|
679
|
+
}
|
|
668
680
|
else if ('tag' in instruction) {
|
|
669
681
|
// HTML tag
|
|
670
682
|
process_tag_to_html(instruction, html, tagElements, components, context);
|
|
@@ -1840,7 +1852,7 @@ Load_Coordinator._registry = new Map();
|
|
|
1840
1852
|
const class_registry = Object.create(null);
|
|
1841
1853
|
// Markers for serialized class instances (unique to avoid collisions with user data)
|
|
1842
1854
|
// Replaced at build time by rollup (see rollup.config.js).
|
|
1843
|
-
const CORE_VERSION = '2.3.
|
|
1855
|
+
const CORE_VERSION = '2.3.61';
|
|
1844
1856
|
const CLASS_MARKER = '__jqhtml_class__';
|
|
1845
1857
|
const PROPS_MARKER = '__jqhtml_props__';
|
|
1846
1858
|
/**
|
|
@@ -3849,10 +3861,10 @@ class Jqhtml_Component {
|
|
|
3849
3861
|
// Create a content function that invokes child slots
|
|
3850
3862
|
// When parent calls content('slotName'), it invokes the child's slot function
|
|
3851
3863
|
const childSlots = instructions._slots;
|
|
3852
|
-
const contentFunction = (slotName,
|
|
3864
|
+
const contentFunction = (slotName, ...slotArgs) => {
|
|
3853
3865
|
if (childSlots[slotName] && typeof childSlots[slotName] === 'function') {
|
|
3854
|
-
// Invoke the slot function with
|
|
3855
|
-
const [slotInstructions, slotContext] = childSlots[slotName](
|
|
3866
|
+
// Invoke the slot function with everything content() was given
|
|
3867
|
+
const [slotInstructions, slotContext] = childSlots[slotName](...slotArgs);
|
|
3856
3868
|
// Return in render function format: [instructions, context]
|
|
3857
3869
|
// The template expression handler expects this format
|
|
3858
3870
|
return [slotInstructions, slotContext];
|
|
@@ -3877,12 +3889,11 @@ class Jqhtml_Component {
|
|
|
3877
3889
|
instructions = [];
|
|
3878
3890
|
}
|
|
3879
3891
|
}
|
|
3880
|
-
//
|
|
3881
|
-
//
|
|
3882
|
-
|
|
3883
|
-
// Process instructions to generate DOM
|
|
3892
|
+
// Process instructions to generate DOM. ['_content', ...] markers from
|
|
3893
|
+
// content() are handled by the processor, which renders them in the
|
|
3894
|
+
// component that wrote them.
|
|
3884
3895
|
// This kicks off child component boots but doesn't wait for them
|
|
3885
|
-
process_instructions(
|
|
3896
|
+
process_instructions(instructions, this.$, this);
|
|
3886
3897
|
}
|
|
3887
3898
|
// Don't update ready state here - let phases complete in order
|
|
3888
3899
|
this._update_debug_attrs();
|
|
@@ -5042,26 +5053,6 @@ class Jqhtml_Component {
|
|
|
5042
5053
|
_generate_cid() {
|
|
5043
5054
|
return uid();
|
|
5044
5055
|
}
|
|
5045
|
-
/**
|
|
5046
|
-
* Flatten instruction array - converts ['_content', [...]] markers to flat array
|
|
5047
|
-
* Recursively flattens nested content from content() calls
|
|
5048
|
-
*/
|
|
5049
|
-
_flatten_instructions(instructions) {
|
|
5050
|
-
const result = [];
|
|
5051
|
-
for (const instruction of instructions) {
|
|
5052
|
-
// Check if this is a _content marker: ['_content', [...]]
|
|
5053
|
-
if (Array.isArray(instruction) && instruction[0] === '_content' && Array.isArray(instruction[1])) {
|
|
5054
|
-
// Recursively flatten the content instructions
|
|
5055
|
-
const contentInstructions = this._flatten_instructions(instruction[1]);
|
|
5056
|
-
result.push(...contentInstructions);
|
|
5057
|
-
}
|
|
5058
|
-
else {
|
|
5059
|
-
// Regular instruction - keep as is
|
|
5060
|
-
result.push(instruction);
|
|
5061
|
-
}
|
|
5062
|
-
}
|
|
5063
|
-
return result;
|
|
5064
|
-
}
|
|
5065
5056
|
_apply_css_classes() {
|
|
5066
5057
|
const hierarchy = this.constructor.get_class_hierarchy();
|
|
5067
5058
|
// If component name differs from class name, add component name to hierarchy
|
|
@@ -6183,7 +6174,7 @@ function init(jQuery, config) {
|
|
|
6183
6174
|
}
|
|
6184
6175
|
}
|
|
6185
6176
|
// Version - will be replaced during build with actual version from package.json
|
|
6186
|
-
const version = '2.3.
|
|
6177
|
+
const version = '2.3.61';
|
|
6187
6178
|
// Default export with all functionality
|
|
6188
6179
|
const jqhtml = {
|
|
6189
6180
|
// Core
|