@atjson/renderer-hir
Advanced tools
Comparing version 0.23.3 to 0.24.0
@@ -6,2 +6,9 @@ # Change Log | ||
# [0.24.0](https://github.com/CondeNast/atjson/compare/@atjson/renderer-hir@0.23.3...@atjson/renderer-hir@0.24.0) (2022-09-07) | ||
### Features | ||
- add Slice component to renderer-react ([a0736d3](https://github.com/CondeNast/atjson/commit/a0736d304f797b50699eae29c7bcaa8cdf2a02a2)) | ||
- add slice function to renderer-hir ([e3133bd](https://github.com/CondeNast/atjson/commit/e3133bd42f037c67dae57640369a0dff6775d31c)) | ||
## [0.23.3](https://github.com/CondeNast/atjson/compare/@atjson/renderer-hir@0.23.2...@atjson/renderer-hir@0.23.3) (2022-08-18) | ||
@@ -8,0 +15,0 @@ |
@@ -17,4 +17,6 @@ import Document, { Annotation, AnnotationJSON } from "@atjson/document"; | ||
static render<T extends typeof Renderer>(this: T, ...params: ConstructorParameters<T>): any; | ||
constructor(_document: Document, ..._args: any[]); | ||
private slices; | ||
constructor(_document: Document | null, ..._args: any[]); | ||
renderAnnotation(annotation: Annotation<any>, context: Context): Iterator<void, any, any>; | ||
getSlice(sliceId: string): Document; | ||
root(): Iterator<void, any, any>; | ||
@@ -21,0 +23,0 @@ text(text: string, _: Context): string; |
@@ -48,3 +48,3 @@ "use strict"; | ||
} | ||
function attrs(attributes, slices, transformer) { | ||
function attrs(attributes) { | ||
if (attributes == null) { | ||
@@ -54,3 +54,3 @@ return attributes; | ||
else if (Array.isArray(attributes)) { | ||
return attributes.map((item) => attrs(item, slices, transformer)); | ||
return attributes.map((item) => attrs(item)); | ||
} | ||
@@ -60,17 +60,9 @@ else if (typeof attributes === "object") { | ||
for (let key in attributes) { | ||
props[key] = attrs(attributes[key], slices, transformer); | ||
props[key] = attrs(attributes[key]); | ||
} | ||
return props; | ||
} | ||
else if (typeof attributes === "string") { | ||
if (attributes in slices) { | ||
let slice = slices[attributes]; | ||
if (slice != null) { | ||
return transformer(slice.node, slice.document); | ||
} | ||
} | ||
} | ||
return attributes; | ||
} | ||
function compile(renderer, node, slices, context) { | ||
function compile(renderer, node, context) { | ||
let annotation = node.annotation; | ||
@@ -84,3 +76,3 @@ let childNodes = node.children(); | ||
else { | ||
annotation.attributes = attrs(annotation.attributes, slices, (sliceNode, document) => compile(renderer, sliceNode, slices, { document })); | ||
annotation.attributes = attrs(annotation.attributes); | ||
generator = renderer.renderAnnotation(annotation, Object.assign(Object.assign({}, context), { children: childAnnotations })); | ||
@@ -102,3 +94,3 @@ } | ||
} | ||
return compile(renderer, childNode, slices, childContext); | ||
return compile(renderer, childNode, childContext); | ||
}))).value; | ||
@@ -128,3 +120,3 @@ } | ||
return { | ||
id: "Any<id>", | ||
id: childNode.id, | ||
type: "-atjson-text", | ||
@@ -141,11 +133,17 @@ start: childNode.start, | ||
class Renderer { | ||
constructor(_document, ..._args) { | ||
this.slices = {}; | ||
} | ||
static render(...params) { | ||
let document = params[0]; | ||
if (document == null) { | ||
return; | ||
} | ||
let renderer = new this(document, ...params.slice(1)); | ||
let hir = new hir_1.HIR(document); | ||
return compile(renderer, hir.rootNode, hir.slices, { | ||
renderer.slices = hir.slices; | ||
return compile(renderer, hir.rootNode, { | ||
document: hir.document, | ||
}); | ||
} | ||
constructor(_document, ..._args) { } | ||
*renderAnnotation(annotation, context) { | ||
@@ -163,2 +161,6 @@ let generator = this[annotation.type] || | ||
} | ||
getSlice(sliceId) { | ||
var _a; | ||
return (_a = this.slices[sliceId]) !== null && _a !== void 0 ? _a : null; | ||
} | ||
*root() { | ||
@@ -172,2 +174,2 @@ return yield; | ||
exports.default = Renderer; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsK0NBSzBCO0FBRTFCLHFDQUEyRDtBQU0zRCxNQUFNLE1BQU0sR0FBW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ENBQUMsSUFBSSxDQUFDLElBQUksRUFBRSxVQUFVLEVBQUUsT0FBTyxDQUFDLENBQUM7U0FDekQ7YUFBTTtZQUVMLE9BQU8sQ0FBQyxJQUFJLENBQ1YsSUFBSSxJQUFJLENBQUMsV0FBVyxDQUFDLElBQUksaURBQWlELFVBQVUsQ0FBQyxJQUFJLG9EQUFvRCxDQUM5SSxDQUFDO1lBRUYsT0FBTyxDQUFDLEtBQUssQ0FBQyx5QkFBeUIsRUFBRSxVQUFVLENBQUMsQ0FBQztZQUNyRCxPQUFPLEtBQUssQ0FBQztTQUNkO0lBQ0gsQ0FBQztJQVVELFFBQVEsQ0FBQyxPQUFlOztRQUN0QixPQUFPLE1BQUEsSUFBSSxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsbUNBQUksSUFBSSxDQUFDO0lBQ3RDLENBQUM7SUFFRCxDQUFDLElBQUk7UUFDSCxPQUFPLEtBQUssQ0FBQztJQUNmLENBQUM7SUFHRCxJQUFJLENBQUMsSUFBWSxFQUFFLENBQVU7UUFDM0IsT0FBTyxJQUFJLENBQUM7SUFDZCxDQUFDO0NBQ0Y7QUFoRUQsMkJBZ0VDIn0= |
@@ -17,4 +17,6 @@ import Document, { Annotation, AnnotationJSON } from "@atjson/document"; | ||
static render<T extends typeof Renderer>(this: T, ...params: ConstructorParameters<T>): any; | ||
constructor(_document: Document, ..._args: any[]); | ||
private slices; | ||
constructor(_document: Document | null, ..._args: any[]); | ||
renderAnnotation(annotation: Annotation<any>, context: Context): Iterator<void, any, any>; | ||
getSlice(sliceId: string): Document; | ||
root(): Iterator<void, any, any>; | ||
@@ -21,0 +23,0 @@ text(text: string, _: Context): string; |
@@ -43,3 +43,3 @@ import { UnknownAnnotation, is, } from "@atjson/document"; | ||
} | ||
function attrs(attributes, slices, transformer) { | ||
function attrs(attributes) { | ||
if (attributes == null) { | ||
@@ -49,3 +49,3 @@ return attributes; | ||
else if (Array.isArray(attributes)) { | ||
return attributes.map((item) => attrs(item, slices, transformer)); | ||
return attributes.map((item) => attrs(item)); | ||
} | ||
@@ -55,17 +55,9 @@ else if (typeof attributes === "object") { | ||
for (let key in attributes) { | ||
props[key] = attrs(attributes[key], slices, transformer); | ||
props[key] = attrs(attributes[key]); | ||
} | ||
return props; | ||
} | ||
else if (typeof attributes === "string") { | ||
if (attributes in slices) { | ||
let slice = slices[attributes]; | ||
if (slice != null) { | ||
return transformer(slice.node, slice.document); | ||
} | ||
} | ||
} | ||
return attributes; | ||
} | ||
function compile(renderer, node, slices, context) { | ||
function compile(renderer, node, context) { | ||
let annotation = node.annotation; | ||
@@ -79,3 +71,3 @@ let childNodes = node.children(); | ||
else { | ||
annotation.attributes = attrs(annotation.attributes, slices, (sliceNode, document) => compile(renderer, sliceNode, slices, { document })); | ||
annotation.attributes = attrs(annotation.attributes); | ||
generator = renderer.renderAnnotation(annotation, { | ||
@@ -103,3 +95,3 @@ ...context, | ||
} | ||
return compile(renderer, childNode, slices, childContext); | ||
return compile(renderer, childNode, childContext); | ||
}))).value; | ||
@@ -129,3 +121,3 @@ } | ||
return { | ||
id: "Any<id>", | ||
id: childNode.id, | ||
type: "-atjson-text", | ||
@@ -142,11 +134,17 @@ start: childNode.start, | ||
export default class Renderer { | ||
constructor(_document, ..._args) { | ||
this.slices = {}; | ||
} | ||
static render(...params) { | ||
let document = params[0]; | ||
if (document == null) { | ||
return; | ||
} | ||
let renderer = new this(document, ...params.slice(1)); | ||
let hir = new HIR(document); | ||
return compile(renderer, hir.rootNode, hir.slices, { | ||
renderer.slices = hir.slices; | ||
return compile(renderer, hir.rootNode, { | ||
document: hir.document, | ||
}); | ||
} | ||
constructor(_document, ..._args) { } | ||
*renderAnnotation(annotation, context) { | ||
@@ -164,2 +162,6 @@ let generator = this[annotation.type] || | ||
} | ||
getSlice(sliceId) { | ||
var _a; | ||
return (_a = this.slices[sliceId]) !== null && _a !== void 0 ? _a : null; | ||
} | ||
*root() { | ||
@@ -172,2 +174,2 @@ return yield; | ||
} | ||
//# s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.24.0", | ||
"description": "Generalized tools for generating documents in a hierarchical fashion", | ||
@@ -13,6 +13,6 @@ "main": "dist/commonjs/index.js", | ||
"dependencies": { | ||
"@atjson/hir": "0.23.3" | ||
"@atjson/hir": "0.24.0" | ||
}, | ||
"devDependencies": { | ||
"@atjson/document": "0.26.0" | ||
"@atjson/document": "0.26.1" | ||
}, | ||
@@ -22,3 +22,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "c5af08d8d391643a1d2108b005b9956e7deef98b" | ||
"gitHead": "93cde389ebe325fa11707f000e18ba7d35fac6d2" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123154
384
+ Added@atjson/hir@0.24.0(transitive)
- Removed@atjson/hir@0.23.3(transitive)
Updated@atjson/hir@0.24.0