@coherent.js/core 1.0.0-rc.3 → 1.0.0-rc.5
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/index.cjs +11 -2
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +11 -2
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/types/index.d.ts +0 -151
package/dist/index.cjs
CHANGED
|
@@ -2190,6 +2190,16 @@ var HTMLRenderer = class extends BaseRenderer {
|
|
|
2190
2190
|
const { children, text, key: _key, html: _rawHtml, ...attributes } = element || {};
|
|
2191
2191
|
const attributeString = formatAttributes(attributes);
|
|
2192
2192
|
const openingTag = attributeString ? `<${tagName} ${attributeString}>` : `<${tagName}>`;
|
|
2193
|
+
if (isVoidElement(tagName)) {
|
|
2194
|
+
if (options.enableCache && this.cache && RendererUtils.isCacheable(element, options)) {
|
|
2195
|
+
const cacheKey = RendererUtils.generateCacheKey(tagName, element);
|
|
2196
|
+
if (cacheKey) {
|
|
2197
|
+
this.cache.set(cacheKey, openingTag);
|
|
2198
|
+
}
|
|
2199
|
+
}
|
|
2200
|
+
this.recordPerformance(tagName, startTime, false);
|
|
2201
|
+
return openingTag;
|
|
2202
|
+
}
|
|
2193
2203
|
if (_rawHtml !== void 0) {
|
|
2194
2204
|
const rawContent = typeof _rawHtml === "function" ? String(_rawHtml()) : String(_rawHtml);
|
|
2195
2205
|
const result = `${openingTag}${rawContent}</${tagName}>`;
|
|
@@ -6496,7 +6506,7 @@ function deepClone2(obj) {
|
|
|
6496
6506
|
}
|
|
6497
6507
|
return cloned;
|
|
6498
6508
|
}
|
|
6499
|
-
var VERSION = "1.0.0-
|
|
6509
|
+
var VERSION = true ? "1.0.0-rc.5" : JSON.parse((0, import_node_fs.readFileSync)(new URL("../package.json", import_meta.url), "utf8")).version;
|
|
6500
6510
|
var fp = {
|
|
6501
6511
|
/**
|
|
6502
6512
|
* Curried map: fp.map(fn)(array)
|
|
@@ -6654,7 +6664,6 @@ var index_default = coherent;
|
|
|
6654
6664
|
* Coherent.js - Object-Based Rendering Framework
|
|
6655
6665
|
* A pure JavaScript framework for server-side rendering using natural object syntax
|
|
6656
6666
|
*
|
|
6657
|
-
* @version 1.0.0-beta.8
|
|
6658
6667
|
* @author Coherent Framework Team
|
|
6659
6668
|
* @license MIT
|
|
6660
6669
|
*/
|