Update jqhtml packages
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2
node_modules/@jqhtml/core/dist/component.d.ts.map
generated
vendored
2
node_modules/@jqhtml/core/dist/component.d.ts.map
generated
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../src/component.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAgBH,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,YAAY,CAAC,EAAE;YACb,GAAG,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;YACjF,UAAU,EAAE,MAAM,IAAI,CAAC;SACxB,CAAC;KACH;CACF;AAED,qBAAa,gBAAgB;IAE3B,MAAM,CAAC,kBAAkB,UAAQ;IACjC,MAAM,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC;IAGtB,CAAC,EAAE,GAAG,CAAC;IACP,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAK;IAGzB,OAAO,CAAC,kBAAkB,CAAmB;IAC7C,OAAO,CAAC,aAAa,CAAiC;IACtD,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,aAAa,CAAoC;IACzD,OAAO,CAAC,iBAAiB,CAAkB;IAC3C,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,mBAAmB,CAAuB;IAClD,OAAO,CAAC,oBAAoB,CAAwE;IACpG,OAAO,CAAC,iBA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H,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAK3C;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG;IAgB3B;;;;;;;;;;;;;;;OAeG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IAgB9C;;;OAGG;IACH,YAAY,IAAI,gBAAgB,GAAG,IAAI;IAIvC;;OAEG;IACH,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,EAAE;IAa1C;;OAEG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IAoBlD;;OAEG;IACH,MAAM,CAAC,mBAAmB,IAAI,MAAM,EAAE;IA0CtC,OAAO,CAAC,aAAa;IAIrB;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAkB7B,OAAO,CAAC,kBAAkB;IA4B1B,OAAO,CAAC,yBAAyB;IAuHjC,OAAO,CAAC,eAAe;IAUvB,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,gBAAgB;IAcxB;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IA+BzB,OAAO,CAAC,cAAc;IActB,OAAO,CAAC,UAAU;IAUlB;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,0BAA0B;CAqEnC"}
|
||||
61
node_modules/@jqhtml/core/dist/index.cjs
generated
vendored
61
node_modules/@jqhtml/core/dist/index.cjs
generated
vendored
@@ -2917,19 +2917,43 @@ class Jqhtml_Component {
|
||||
const data_clone = this.__initial_data_snapshot
|
||||
? JSON.parse(JSON.stringify(this.__initial_data_snapshot))
|
||||
: {};
|
||||
// Create a read-only proxy for args that blocks all modifications
|
||||
// Can't use JSON clone because args may contain functions (_slots, callbacks)
|
||||
const create_readonly_proxy = (obj, path = 'this.args') => {
|
||||
if (obj === null || typeof obj !== 'object')
|
||||
return obj;
|
||||
return new Proxy(obj, {
|
||||
get(target, prop) {
|
||||
const value = target[prop];
|
||||
// Recursively wrap nested objects (but not functions)
|
||||
if (value !== null && typeof value === 'object' && typeof value !== 'function') {
|
||||
return create_readonly_proxy(value, `${path}.${String(prop)}`);
|
||||
}
|
||||
return value;
|
||||
},
|
||||
set(target, prop, value) {
|
||||
console.error(`[JQHTML] ERROR: Component "${component_name}" attempted to modify ${path}.${String(prop)} during on_load().\n\n` +
|
||||
`RESTRICTION: this.args is READ-ONLY during on_load().\n\n` +
|
||||
`WHY: this.args configures what data to fetch. Modifying it during on_load() creates circular dependencies.\n\n` +
|
||||
`FIX: Modify this.args BEFORE on_load() runs (in on_create() or before calling reload()):\n` +
|
||||
` ❌ Inside on_load(): ${path}.${String(prop)} = ${JSON.stringify(value)};\n` +
|
||||
` ✅ In on_create(): this.args.${String(prop)} = defaultValue;`);
|
||||
throw new Error(`[JQHTML] Cannot modify ${path}.${String(prop)} during on_load(). ` +
|
||||
`this.args is read-only in on_load().`);
|
||||
},
|
||||
deleteProperty(target, prop) {
|
||||
console.error(`[JQHTML] ERROR: Component "${component_name}" attempted to delete ${path}.${String(prop)} during on_load().\n\n` +
|
||||
`RESTRICTION: this.args is READ-ONLY during on_load().`);
|
||||
throw new Error(`[JQHTML] Cannot delete ${path}.${String(prop)} during on_load(). ` +
|
||||
`this.args is read-only in on_load().`);
|
||||
}
|
||||
});
|
||||
};
|
||||
// Create a detached context object that on_load will operate on
|
||||
const detached_context = {
|
||||
args: this.args, // Read-only reference to real args
|
||||
args: create_readonly_proxy(this.args), // Read-only proxy wrapping real args
|
||||
data: data_clone // Cloned data - modifications stay isolated
|
||||
};
|
||||
// Capture args state before on_load() for validation
|
||||
let argsBeforeLoad = null;
|
||||
try {
|
||||
argsBeforeLoad = JSON.stringify(this.args);
|
||||
}
|
||||
catch (error) {
|
||||
// Args contain circular references - skip validation
|
||||
}
|
||||
// Create restricted proxy that operates on the detached context
|
||||
const component_name = this.component_name();
|
||||
const restricted_this = new Proxy(detached_context, {
|
||||
@@ -3011,20 +3035,9 @@ class Jqhtml_Component {
|
||||
complete_coordination();
|
||||
}
|
||||
}
|
||||
// Validate that on_load() didn't somehow modify this.args (shouldn't be possible with new proxy)
|
||||
let argsAfterLoad = null;
|
||||
try {
|
||||
argsAfterLoad = JSON.stringify(this.args);
|
||||
}
|
||||
catch (error) {
|
||||
// Args contain circular references - skip validation
|
||||
}
|
||||
if (argsBeforeLoad !== null && argsAfterLoad !== null && argsBeforeLoad !== argsAfterLoad) {
|
||||
console.error(`[JQHTML] WARNING: Component "${this.component_name()}" somehow modified this.args during on_load().\n` +
|
||||
`This should not be possible with the detached proxy. Please report this bug.\n\n` +
|
||||
`Before: ${argsBeforeLoad}\n` +
|
||||
`After: ${argsAfterLoad}`);
|
||||
}
|
||||
// Note: We don't validate args changes here because external code (like parent
|
||||
// components calling reload()) is allowed to modify component.args during on_load().
|
||||
// The read-only proxy only prevents code INSIDE on_load() from modifying args.
|
||||
// Return the data from the detached context
|
||||
return detached_context.data;
|
||||
}
|
||||
@@ -4832,7 +4845,7 @@ function init(jQuery) {
|
||||
}
|
||||
}
|
||||
// Version - will be replaced during build with actual version from package.json
|
||||
const version = '2.3.22';
|
||||
const version = '2.3.23';
|
||||
// Default export with all functionality
|
||||
const jqhtml = {
|
||||
// Core
|
||||
|
||||
2
node_modules/@jqhtml/core/dist/index.cjs.map
generated
vendored
2
node_modules/@jqhtml/core/dist/index.cjs.map
generated
vendored
File diff suppressed because one or more lines are too long
61
node_modules/@jqhtml/core/dist/index.js
generated
vendored
61
node_modules/@jqhtml/core/dist/index.js
generated
vendored
@@ -2913,19 +2913,43 @@ class Jqhtml_Component {
|
||||
const data_clone = this.__initial_data_snapshot
|
||||
? JSON.parse(JSON.stringify(this.__initial_data_snapshot))
|
||||
: {};
|
||||
// Create a read-only proxy for args that blocks all modifications
|
||||
// Can't use JSON clone because args may contain functions (_slots, callbacks)
|
||||
const create_readonly_proxy = (obj, path = 'this.args') => {
|
||||
if (obj === null || typeof obj !== 'object')
|
||||
return obj;
|
||||
return new Proxy(obj, {
|
||||
get(target, prop) {
|
||||
const value = target[prop];
|
||||
// Recursively wrap nested objects (but not functions)
|
||||
if (value !== null && typeof value === 'object' && typeof value !== 'function') {
|
||||
return create_readonly_proxy(value, `${path}.${String(prop)}`);
|
||||
}
|
||||
return value;
|
||||
},
|
||||
set(target, prop, value) {
|
||||
console.error(`[JQHTML] ERROR: Component "${component_name}" attempted to modify ${path}.${String(prop)} during on_load().\n\n` +
|
||||
`RESTRICTION: this.args is READ-ONLY during on_load().\n\n` +
|
||||
`WHY: this.args configures what data to fetch. Modifying it during on_load() creates circular dependencies.\n\n` +
|
||||
`FIX: Modify this.args BEFORE on_load() runs (in on_create() or before calling reload()):\n` +
|
||||
` ❌ Inside on_load(): ${path}.${String(prop)} = ${JSON.stringify(value)};\n` +
|
||||
` ✅ In on_create(): this.args.${String(prop)} = defaultValue;`);
|
||||
throw new Error(`[JQHTML] Cannot modify ${path}.${String(prop)} during on_load(). ` +
|
||||
`this.args is read-only in on_load().`);
|
||||
},
|
||||
deleteProperty(target, prop) {
|
||||
console.error(`[JQHTML] ERROR: Component "${component_name}" attempted to delete ${path}.${String(prop)} during on_load().\n\n` +
|
||||
`RESTRICTION: this.args is READ-ONLY during on_load().`);
|
||||
throw new Error(`[JQHTML] Cannot delete ${path}.${String(prop)} during on_load(). ` +
|
||||
`this.args is read-only in on_load().`);
|
||||
}
|
||||
});
|
||||
};
|
||||
// Create a detached context object that on_load will operate on
|
||||
const detached_context = {
|
||||
args: this.args, // Read-only reference to real args
|
||||
args: create_readonly_proxy(this.args), // Read-only proxy wrapping real args
|
||||
data: data_clone // Cloned data - modifications stay isolated
|
||||
};
|
||||
// Capture args state before on_load() for validation
|
||||
let argsBeforeLoad = null;
|
||||
try {
|
||||
argsBeforeLoad = JSON.stringify(this.args);
|
||||
}
|
||||
catch (error) {
|
||||
// Args contain circular references - skip validation
|
||||
}
|
||||
// Create restricted proxy that operates on the detached context
|
||||
const component_name = this.component_name();
|
||||
const restricted_this = new Proxy(detached_context, {
|
||||
@@ -3007,20 +3031,9 @@ class Jqhtml_Component {
|
||||
complete_coordination();
|
||||
}
|
||||
}
|
||||
// Validate that on_load() didn't somehow modify this.args (shouldn't be possible with new proxy)
|
||||
let argsAfterLoad = null;
|
||||
try {
|
||||
argsAfterLoad = JSON.stringify(this.args);
|
||||
}
|
||||
catch (error) {
|
||||
// Args contain circular references - skip validation
|
||||
}
|
||||
if (argsBeforeLoad !== null && argsAfterLoad !== null && argsBeforeLoad !== argsAfterLoad) {
|
||||
console.error(`[JQHTML] WARNING: Component "${this.component_name()}" somehow modified this.args during on_load().\n` +
|
||||
`This should not be possible with the detached proxy. Please report this bug.\n\n` +
|
||||
`Before: ${argsBeforeLoad}\n` +
|
||||
`After: ${argsAfterLoad}`);
|
||||
}
|
||||
// Note: We don't validate args changes here because external code (like parent
|
||||
// components calling reload()) is allowed to modify component.args during on_load().
|
||||
// The read-only proxy only prevents code INSIDE on_load() from modifying args.
|
||||
// Return the data from the detached context
|
||||
return detached_context.data;
|
||||
}
|
||||
@@ -4828,7 +4841,7 @@ function init(jQuery) {
|
||||
}
|
||||
}
|
||||
// Version - will be replaced during build with actual version from package.json
|
||||
const version = '2.3.22';
|
||||
const version = '2.3.23';
|
||||
// Default export with all functionality
|
||||
const jqhtml = {
|
||||
// Core
|
||||
|
||||
2
node_modules/@jqhtml/core/dist/index.js.map
generated
vendored
2
node_modules/@jqhtml/core/dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
63
node_modules/@jqhtml/core/dist/jqhtml-core.esm.js
generated
vendored
63
node_modules/@jqhtml/core/dist/jqhtml-core.esm.js
generated
vendored
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* JQHTML Core v2.3.22
|
||||
* JQHTML Core v2.3.23
|
||||
* (c) 2025 JQHTML Team
|
||||
* Released under the MIT License
|
||||
*/
|
||||
@@ -2918,19 +2918,43 @@ class Jqhtml_Component {
|
||||
const data_clone = this.__initial_data_snapshot
|
||||
? JSON.parse(JSON.stringify(this.__initial_data_snapshot))
|
||||
: {};
|
||||
// Create a read-only proxy for args that blocks all modifications
|
||||
// Can't use JSON clone because args may contain functions (_slots, callbacks)
|
||||
const create_readonly_proxy = (obj, path = 'this.args') => {
|
||||
if (obj === null || typeof obj !== 'object')
|
||||
return obj;
|
||||
return new Proxy(obj, {
|
||||
get(target, prop) {
|
||||
const value = target[prop];
|
||||
// Recursively wrap nested objects (but not functions)
|
||||
if (value !== null && typeof value === 'object' && typeof value !== 'function') {
|
||||
return create_readonly_proxy(value, `${path}.${String(prop)}`);
|
||||
}
|
||||
return value;
|
||||
},
|
||||
set(target, prop, value) {
|
||||
console.error(`[JQHTML] ERROR: Component "${component_name}" attempted to modify ${path}.${String(prop)} during on_load().\n\n` +
|
||||
`RESTRICTION: this.args is READ-ONLY during on_load().\n\n` +
|
||||
`WHY: this.args configures what data to fetch. Modifying it during on_load() creates circular dependencies.\n\n` +
|
||||
`FIX: Modify this.args BEFORE on_load() runs (in on_create() or before calling reload()):\n` +
|
||||
` ❌ Inside on_load(): ${path}.${String(prop)} = ${JSON.stringify(value)};\n` +
|
||||
` ✅ In on_create(): this.args.${String(prop)} = defaultValue;`);
|
||||
throw new Error(`[JQHTML] Cannot modify ${path}.${String(prop)} during on_load(). ` +
|
||||
`this.args is read-only in on_load().`);
|
||||
},
|
||||
deleteProperty(target, prop) {
|
||||
console.error(`[JQHTML] ERROR: Component "${component_name}" attempted to delete ${path}.${String(prop)} during on_load().\n\n` +
|
||||
`RESTRICTION: this.args is READ-ONLY during on_load().`);
|
||||
throw new Error(`[JQHTML] Cannot delete ${path}.${String(prop)} during on_load(). ` +
|
||||
`this.args is read-only in on_load().`);
|
||||
}
|
||||
});
|
||||
};
|
||||
// Create a detached context object that on_load will operate on
|
||||
const detached_context = {
|
||||
args: this.args, // Read-only reference to real args
|
||||
args: create_readonly_proxy(this.args), // Read-only proxy wrapping real args
|
||||
data: data_clone // Cloned data - modifications stay isolated
|
||||
};
|
||||
// Capture args state before on_load() for validation
|
||||
let argsBeforeLoad = null;
|
||||
try {
|
||||
argsBeforeLoad = JSON.stringify(this.args);
|
||||
}
|
||||
catch (error) {
|
||||
// Args contain circular references - skip validation
|
||||
}
|
||||
// Create restricted proxy that operates on the detached context
|
||||
const component_name = this.component_name();
|
||||
const restricted_this = new Proxy(detached_context, {
|
||||
@@ -3012,20 +3036,9 @@ class Jqhtml_Component {
|
||||
complete_coordination();
|
||||
}
|
||||
}
|
||||
// Validate that on_load() didn't somehow modify this.args (shouldn't be possible with new proxy)
|
||||
let argsAfterLoad = null;
|
||||
try {
|
||||
argsAfterLoad = JSON.stringify(this.args);
|
||||
}
|
||||
catch (error) {
|
||||
// Args contain circular references - skip validation
|
||||
}
|
||||
if (argsBeforeLoad !== null && argsAfterLoad !== null && argsBeforeLoad !== argsAfterLoad) {
|
||||
console.error(`[JQHTML] WARNING: Component "${this.component_name()}" somehow modified this.args during on_load().\n` +
|
||||
`This should not be possible with the detached proxy. Please report this bug.\n\n` +
|
||||
`Before: ${argsBeforeLoad}\n` +
|
||||
`After: ${argsAfterLoad}`);
|
||||
}
|
||||
// Note: We don't validate args changes here because external code (like parent
|
||||
// components calling reload()) is allowed to modify component.args during on_load().
|
||||
// The read-only proxy only prevents code INSIDE on_load() from modifying args.
|
||||
// Return the data from the detached context
|
||||
return detached_context.data;
|
||||
}
|
||||
@@ -4833,7 +4846,7 @@ function init(jQuery) {
|
||||
}
|
||||
}
|
||||
// Version - will be replaced during build with actual version from package.json
|
||||
const version = '2.3.22';
|
||||
const version = '2.3.23';
|
||||
// Default export with all functionality
|
||||
const jqhtml = {
|
||||
// Core
|
||||
|
||||
2
node_modules/@jqhtml/core/dist/jqhtml-core.esm.js.map
generated
vendored
2
node_modules/@jqhtml/core/dist/jqhtml-core.esm.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
node_modules/@jqhtml/core/package.json
generated
vendored
2
node_modules/@jqhtml/core/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@jqhtml/core",
|
||||
"version": "2.3.22",
|
||||
"version": "2.3.23",
|
||||
"description": "Core runtime library for JQHTML",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
||||
2
node_modules/@jqhtml/parser/dist/codegen.js
generated
vendored
2
node_modules/@jqhtml/parser/dist/codegen.js
generated
vendored
@@ -1377,7 +1377,7 @@ export class CodeGenerator {
|
||||
for (const [name, component] of this.components) {
|
||||
code += `// Component: ${name}\n`;
|
||||
code += `jqhtml_components.set('${name}', {\n`;
|
||||
code += ` _jqhtml_version: '2.3.22',\n`; // Version will be replaced during build
|
||||
code += ` _jqhtml_version: '2.3.23',\n`; // Version will be replaced during build
|
||||
code += ` name: '${name}',\n`;
|
||||
code += ` tag: '${component.tagName}',\n`;
|
||||
code += ` defaultAttributes: ${this.serializeAttributeObject(component.defaultAttributes)},\n`;
|
||||
|
||||
2
node_modules/@jqhtml/parser/package.json
generated
vendored
2
node_modules/@jqhtml/parser/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@jqhtml/parser",
|
||||
"version": "2.3.22",
|
||||
"version": "2.3.23",
|
||||
"description": "JQHTML template parser - converts templates to JavaScript",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
|
||||
2
node_modules/@jqhtml/vscode-extension/.version
generated
vendored
2
node_modules/@jqhtml/vscode-extension/.version
generated
vendored
@@ -1 +1 @@
|
||||
2.3.22
|
||||
2.3.23
|
||||
|
||||
Binary file not shown.
2
node_modules/@jqhtml/vscode-extension/package.json
generated
vendored
2
node_modules/@jqhtml/vscode-extension/package.json
generated
vendored
@@ -2,7 +2,7 @@
|
||||
"name": "@jqhtml/vscode-extension",
|
||||
"displayName": "JQHTML",
|
||||
"description": "Syntax highlighting and language support for JQHTML template files",
|
||||
"version": "2.3.22",
|
||||
"version": "2.3.23",
|
||||
"publisher": "jqhtml",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
|
||||
Reference in New Issue
Block a user