Add Spa.load_detached_action, decorator identifier rule, npm updates
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1
node_modules/@jqhtml/core/dist/component.d.ts
generated
vendored
1
node_modules/@jqhtml/core/dist/component.d.ts
generated
vendored
@@ -50,6 +50,7 @@ export declare class Jqhtml_Component {
|
||||
private _should_cache_html_after_ready;
|
||||
private _is_dynamic;
|
||||
private _on_render_complete;
|
||||
private _use_cached_data_hit;
|
||||
constructor(element?: any, args?: Record<string, any>);
|
||||
/**
|
||||
* Protect lifecycle methods from manual invocation
|
||||
|
||||
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;AAcH,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,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oBlD;;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"}
|
||||
45
node_modules/@jqhtml/core/dist/index.cjs
generated
vendored
45
node_modules/@jqhtml/core/dist/index.cjs
generated
vendored
@@ -567,7 +567,14 @@ function process_tag_to_html(instruction, html, tagElements, components, context
|
||||
* Process a component instruction to HTML
|
||||
*/
|
||||
function process_component_to_html(instruction, html, components, context) {
|
||||
const [componentName, props, contentOrSlots] = instruction.comp;
|
||||
const [componentName, originalProps, contentOrSlots] = instruction.comp;
|
||||
// Propagate use_cached_data from parent to child if parent has it set
|
||||
// This allows a parent component with use_cached_data=true to automatically
|
||||
// pass this behavior to all child components rendered in its template
|
||||
let props = originalProps;
|
||||
if (context.args?.use_cached_data === true && props.use_cached_data === undefined) {
|
||||
props = { ...originalProps, use_cached_data: true };
|
||||
}
|
||||
// Determine if third parameter is a function (default content) or object (named slots)
|
||||
let contentFn;
|
||||
let slots;
|
||||
@@ -1135,6 +1142,8 @@ class Jqhtml_Component {
|
||||
this._is_dynamic = false; // True if this.data changed during on_load() (used for HTML cache sync)
|
||||
// on_render synchronization (HTML cache mode)
|
||||
this._on_render_complete = false; // True after on_render() has been called post-on_load
|
||||
// use_cached_data feature - skip on_load() when cache hit occurs
|
||||
this._use_cached_data_hit = false; // True if use_cached_data=true AND cache was used
|
||||
this._cid = this._generate_cid();
|
||||
this._lifecycle_manager = LifecycleManager.get_instance();
|
||||
// Create or wrap element
|
||||
@@ -1729,6 +1738,12 @@ class Jqhtml_Component {
|
||||
console.log(`[Cache html] Component ${this._cid} (${this.component_name()}) cache miss`, { cache_key: html_cache_key });
|
||||
}
|
||||
}
|
||||
// Warn if use_cached_data is set in html cache mode - it has no effect
|
||||
if (this.args.use_cached_data === true) {
|
||||
console.warn(`[JQHTML] Component "${this.component_name()}" has use_cached_data=true but cache mode is 'html'.\n` +
|
||||
`use_cached_data only applies to 'data' cache mode. In 'html' mode, the entire rendered HTML is cached.\n` +
|
||||
`The use_cached_data flag will be ignored.`);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Data cache mode (default) - check for cached data to hydrate this.data
|
||||
@@ -1736,8 +1751,17 @@ class Jqhtml_Component {
|
||||
if (cached_data !== null && typeof cached_data === 'object') {
|
||||
// Hydrate this.data with cached data
|
||||
this.data = cached_data;
|
||||
if (window.jqhtml?.debug?.verbose) {
|
||||
console.log(`[Cache data] Component ${this._cid} (${this.component_name()}) hydrated from cache`, { cache_key, data: cached_data });
|
||||
// If use_cached_data=true, skip on_load() entirely - use cached data as final data
|
||||
if (this.args.use_cached_data === true) {
|
||||
this._use_cached_data_hit = true;
|
||||
if (window.jqhtml?.debug?.verbose) {
|
||||
console.log(`[Cache data] Component ${this._cid} (${this.component_name()}) using cached data (use_cached_data=true, skipping on_load)`, { cache_key, data: cached_data });
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (window.jqhtml?.debug?.verbose) {
|
||||
console.log(`[Cache data] Component ${this._cid} (${this.component_name()}) hydrated from cache`, { cache_key, data: cached_data });
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -1768,6 +1792,15 @@ class Jqhtml_Component {
|
||||
if (this._stopped || this._ready_state >= 2)
|
||||
return;
|
||||
this._log_lifecycle('load', 'start');
|
||||
// use_cached_data feature: If cache hit occurred and use_cached_data=true, skip on_load() entirely
|
||||
// The cached data is already in this.data from create() phase
|
||||
if (this._use_cached_data_hit) {
|
||||
this._ready_state = 2;
|
||||
this._update_debug_attrs();
|
||||
this._log_lifecycle('load', 'complete (use_cached_data - skipped on_load)');
|
||||
this.trigger('load');
|
||||
return;
|
||||
}
|
||||
// Restore this.data to initial state from snapshot (skip on first load)
|
||||
// This ensures on_load() always starts with clean state
|
||||
const is_first_load = this._ready_state < 2;
|
||||
@@ -4451,6 +4484,10 @@ class Load_Coordinator {
|
||||
if (key.startsWith('_')) {
|
||||
continue; // Skip internal properties
|
||||
}
|
||||
// Skip framework properties that shouldn't affect cache identity
|
||||
if (key === 'use_cached_data') {
|
||||
continue;
|
||||
}
|
||||
const value = args[key];
|
||||
const value_type = typeof value;
|
||||
// Handle primitives (string, number, boolean, null, undefined)
|
||||
@@ -4667,7 +4704,7 @@ function init(jQuery) {
|
||||
}
|
||||
}
|
||||
// Version - will be replaced during build with actual version from package.json
|
||||
const version = '2.3.13';
|
||||
const version = '2.3.14';
|
||||
// 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
45
node_modules/@jqhtml/core/dist/index.js
generated
vendored
45
node_modules/@jqhtml/core/dist/index.js
generated
vendored
@@ -563,7 +563,14 @@ function process_tag_to_html(instruction, html, tagElements, components, context
|
||||
* Process a component instruction to HTML
|
||||
*/
|
||||
function process_component_to_html(instruction, html, components, context) {
|
||||
const [componentName, props, contentOrSlots] = instruction.comp;
|
||||
const [componentName, originalProps, contentOrSlots] = instruction.comp;
|
||||
// Propagate use_cached_data from parent to child if parent has it set
|
||||
// This allows a parent component with use_cached_data=true to automatically
|
||||
// pass this behavior to all child components rendered in its template
|
||||
let props = originalProps;
|
||||
if (context.args?.use_cached_data === true && props.use_cached_data === undefined) {
|
||||
props = { ...originalProps, use_cached_data: true };
|
||||
}
|
||||
// Determine if third parameter is a function (default content) or object (named slots)
|
||||
let contentFn;
|
||||
let slots;
|
||||
@@ -1131,6 +1138,8 @@ class Jqhtml_Component {
|
||||
this._is_dynamic = false; // True if this.data changed during on_load() (used for HTML cache sync)
|
||||
// on_render synchronization (HTML cache mode)
|
||||
this._on_render_complete = false; // True after on_render() has been called post-on_load
|
||||
// use_cached_data feature - skip on_load() when cache hit occurs
|
||||
this._use_cached_data_hit = false; // True if use_cached_data=true AND cache was used
|
||||
this._cid = this._generate_cid();
|
||||
this._lifecycle_manager = LifecycleManager.get_instance();
|
||||
// Create or wrap element
|
||||
@@ -1725,6 +1734,12 @@ class Jqhtml_Component {
|
||||
console.log(`[Cache html] Component ${this._cid} (${this.component_name()}) cache miss`, { cache_key: html_cache_key });
|
||||
}
|
||||
}
|
||||
// Warn if use_cached_data is set in html cache mode - it has no effect
|
||||
if (this.args.use_cached_data === true) {
|
||||
console.warn(`[JQHTML] Component "${this.component_name()}" has use_cached_data=true but cache mode is 'html'.\n` +
|
||||
`use_cached_data only applies to 'data' cache mode. In 'html' mode, the entire rendered HTML is cached.\n` +
|
||||
`The use_cached_data flag will be ignored.`);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Data cache mode (default) - check for cached data to hydrate this.data
|
||||
@@ -1732,8 +1747,17 @@ class Jqhtml_Component {
|
||||
if (cached_data !== null && typeof cached_data === 'object') {
|
||||
// Hydrate this.data with cached data
|
||||
this.data = cached_data;
|
||||
if (window.jqhtml?.debug?.verbose) {
|
||||
console.log(`[Cache data] Component ${this._cid} (${this.component_name()}) hydrated from cache`, { cache_key, data: cached_data });
|
||||
// If use_cached_data=true, skip on_load() entirely - use cached data as final data
|
||||
if (this.args.use_cached_data === true) {
|
||||
this._use_cached_data_hit = true;
|
||||
if (window.jqhtml?.debug?.verbose) {
|
||||
console.log(`[Cache data] Component ${this._cid} (${this.component_name()}) using cached data (use_cached_data=true, skipping on_load)`, { cache_key, data: cached_data });
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (window.jqhtml?.debug?.verbose) {
|
||||
console.log(`[Cache data] Component ${this._cid} (${this.component_name()}) hydrated from cache`, { cache_key, data: cached_data });
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -1764,6 +1788,15 @@ class Jqhtml_Component {
|
||||
if (this._stopped || this._ready_state >= 2)
|
||||
return;
|
||||
this._log_lifecycle('load', 'start');
|
||||
// use_cached_data feature: If cache hit occurred and use_cached_data=true, skip on_load() entirely
|
||||
// The cached data is already in this.data from create() phase
|
||||
if (this._use_cached_data_hit) {
|
||||
this._ready_state = 2;
|
||||
this._update_debug_attrs();
|
||||
this._log_lifecycle('load', 'complete (use_cached_data - skipped on_load)');
|
||||
this.trigger('load');
|
||||
return;
|
||||
}
|
||||
// Restore this.data to initial state from snapshot (skip on first load)
|
||||
// This ensures on_load() always starts with clean state
|
||||
const is_first_load = this._ready_state < 2;
|
||||
@@ -4447,6 +4480,10 @@ class Load_Coordinator {
|
||||
if (key.startsWith('_')) {
|
||||
continue; // Skip internal properties
|
||||
}
|
||||
// Skip framework properties that shouldn't affect cache identity
|
||||
if (key === 'use_cached_data') {
|
||||
continue;
|
||||
}
|
||||
const value = args[key];
|
||||
const value_type = typeof value;
|
||||
// Handle primitives (string, number, boolean, null, undefined)
|
||||
@@ -4663,7 +4700,7 @@ function init(jQuery) {
|
||||
}
|
||||
}
|
||||
// Version - will be replaced during build with actual version from package.json
|
||||
const version = '2.3.13';
|
||||
const version = '2.3.14';
|
||||
// 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
2
node_modules/@jqhtml/core/dist/instruction-processor.d.ts.map
generated
vendored
2
node_modules/@jqhtml/core/dist/instruction-processor.d.ts.map
generated
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"instruction-processor.d.ts","sourceRoot":"","sources":["../src/instruction-processor.ts"],"names":[],"mappings":"AAAA;;;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AAoB,CAClC,YAAY,EAAE,WAAW,EAAE,EAC3B,MAAM,EAAE,GAAG,EACX,OAAO,EAAE,gBAAgB,EACzB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GACtC,IAAI,CAwCN;AAsdD;;GAEG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAW1F"}
|
||||
47
node_modules/@jqhtml/core/dist/jqhtml-core.esm.js
generated
vendored
47
node_modules/@jqhtml/core/dist/jqhtml-core.esm.js
generated
vendored
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* JQHTML Core v2.3.13
|
||||
* JQHTML Core v2.3.14
|
||||
* (c) 2025 JQHTML Team
|
||||
* Released under the MIT License
|
||||
*/
|
||||
@@ -568,7 +568,14 @@ function process_tag_to_html(instruction, html, tagElements, components, context
|
||||
* Process a component instruction to HTML
|
||||
*/
|
||||
function process_component_to_html(instruction, html, components, context) {
|
||||
const [componentName, props, contentOrSlots] = instruction.comp;
|
||||
const [componentName, originalProps, contentOrSlots] = instruction.comp;
|
||||
// Propagate use_cached_data from parent to child if parent has it set
|
||||
// This allows a parent component with use_cached_data=true to automatically
|
||||
// pass this behavior to all child components rendered in its template
|
||||
let props = originalProps;
|
||||
if (context.args?.use_cached_data === true && props.use_cached_data === undefined) {
|
||||
props = { ...originalProps, use_cached_data: true };
|
||||
}
|
||||
// Determine if third parameter is a function (default content) or object (named slots)
|
||||
let contentFn;
|
||||
let slots;
|
||||
@@ -1136,6 +1143,8 @@ class Jqhtml_Component {
|
||||
this._is_dynamic = false; // True if this.data changed during on_load() (used for HTML cache sync)
|
||||
// on_render synchronization (HTML cache mode)
|
||||
this._on_render_complete = false; // True after on_render() has been called post-on_load
|
||||
// use_cached_data feature - skip on_load() when cache hit occurs
|
||||
this._use_cached_data_hit = false; // True if use_cached_data=true AND cache was used
|
||||
this._cid = this._generate_cid();
|
||||
this._lifecycle_manager = LifecycleManager.get_instance();
|
||||
// Create or wrap element
|
||||
@@ -1730,6 +1739,12 @@ class Jqhtml_Component {
|
||||
console.log(`[Cache html] Component ${this._cid} (${this.component_name()}) cache miss`, { cache_key: html_cache_key });
|
||||
}
|
||||
}
|
||||
// Warn if use_cached_data is set in html cache mode - it has no effect
|
||||
if (this.args.use_cached_data === true) {
|
||||
console.warn(`[JQHTML] Component "${this.component_name()}" has use_cached_data=true but cache mode is 'html'.\n` +
|
||||
`use_cached_data only applies to 'data' cache mode. In 'html' mode, the entire rendered HTML is cached.\n` +
|
||||
`The use_cached_data flag will be ignored.`);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Data cache mode (default) - check for cached data to hydrate this.data
|
||||
@@ -1737,8 +1752,17 @@ class Jqhtml_Component {
|
||||
if (cached_data !== null && typeof cached_data === 'object') {
|
||||
// Hydrate this.data with cached data
|
||||
this.data = cached_data;
|
||||
if (window.jqhtml?.debug?.verbose) {
|
||||
console.log(`[Cache data] Component ${this._cid} (${this.component_name()}) hydrated from cache`, { cache_key, data: cached_data });
|
||||
// If use_cached_data=true, skip on_load() entirely - use cached data as final data
|
||||
if (this.args.use_cached_data === true) {
|
||||
this._use_cached_data_hit = true;
|
||||
if (window.jqhtml?.debug?.verbose) {
|
||||
console.log(`[Cache data] Component ${this._cid} (${this.component_name()}) using cached data (use_cached_data=true, skipping on_load)`, { cache_key, data: cached_data });
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (window.jqhtml?.debug?.verbose) {
|
||||
console.log(`[Cache data] Component ${this._cid} (${this.component_name()}) hydrated from cache`, { cache_key, data: cached_data });
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -1769,6 +1793,15 @@ class Jqhtml_Component {
|
||||
if (this._stopped || this._ready_state >= 2)
|
||||
return;
|
||||
this._log_lifecycle('load', 'start');
|
||||
// use_cached_data feature: If cache hit occurred and use_cached_data=true, skip on_load() entirely
|
||||
// The cached data is already in this.data from create() phase
|
||||
if (this._use_cached_data_hit) {
|
||||
this._ready_state = 2;
|
||||
this._update_debug_attrs();
|
||||
this._log_lifecycle('load', 'complete (use_cached_data - skipped on_load)');
|
||||
this.trigger('load');
|
||||
return;
|
||||
}
|
||||
// Restore this.data to initial state from snapshot (skip on first load)
|
||||
// This ensures on_load() always starts with clean state
|
||||
const is_first_load = this._ready_state < 2;
|
||||
@@ -4452,6 +4485,10 @@ class Load_Coordinator {
|
||||
if (key.startsWith('_')) {
|
||||
continue; // Skip internal properties
|
||||
}
|
||||
// Skip framework properties that shouldn't affect cache identity
|
||||
if (key === 'use_cached_data') {
|
||||
continue;
|
||||
}
|
||||
const value = args[key];
|
||||
const value_type = typeof value;
|
||||
// Handle primitives (string, number, boolean, null, undefined)
|
||||
@@ -4668,7 +4705,7 @@ function init(jQuery) {
|
||||
}
|
||||
}
|
||||
// Version - will be replaced during build with actual version from package.json
|
||||
const version = '2.3.13';
|
||||
const version = '2.3.14';
|
||||
// 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/dist/load-coordinator.d.ts.map
generated
vendored
2
node_modules/@jqhtml/core/dist/load-coordinator.d.ts.map
generated
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"load-coordinator.d.ts","sourceRoot":"","sources":["../src/load-coordinator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAWvD,MAAM,WAAW,mBAAmB;IAChC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,qBAAa,gBAAgB;IACzB,OAAO,CAAC,MAAM,CAAC,SAAS,CAA6C;IAEr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,GAAG,OAAO;IAoBnE;;;OAGG;IACH,MAAM,CAAC,eAAe,CAClB,SAAS,EAAE,gBAAgB,EAC3B,eAAe,EAAE,OAAO,CAAC,IAAI,CAAC,GAC/B,MAAM,IAAI;IAkBb;;;OAGG;IACH,MAAM,CAAC,wBAAwB,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAWlF;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;IA8CrC;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAuC3E;;OAEG;IACH,MAAM,CAAC,kBAAkB,IAAI,GAAG;IAahC;;OAEG;IACH,MAAM,CAAC,SAAS,IAAI,IAAI;CAG3B"}
|
||||
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.13",
|
||||
"version": "2.3.14",
|
||||
"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.13',\n`; // Version will be replaced during build
|
||||
code += ` _jqhtml_version: '2.3.14',\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.13",
|
||||
"version": "2.3.14",
|
||||
"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.13
|
||||
2.3.14
|
||||
|
||||
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.13",
|
||||
"version": "2.3.14",
|
||||
"publisher": "jqhtml",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
|
||||
Reference in New Issue
Block a user