diff --git a/docs/dist/v1/chartifact.markdown.umd.js b/docs/dist/v1/chartifact.markdown.umd.js index ef28a70b..c8fa689d 100644 --- a/docs/dist/v1/chartifact.markdown.umd.js +++ b/docs/dist/v1/chartifact.markdown.umd.js @@ -2905,7 +2905,7 @@ ${reconstitutedRules.join("\n\n")} "behavior", "-moz-binding" ]); - function getProperty(data, path, parents = [], logger) { + function getProperty(data, path, parents = [], logger, getOuterProperty) { if (path === ".") { return data; } @@ -2925,6 +2925,9 @@ ${reconstitutedRules.join("\n\n")} currentData = parents[parents.length - parentLevels]; remainingPath = tempPath.startsWith(".") ? tempPath.substring(1) : tempPath; } else { + if (getOuterProperty) { + return getOuterProperty(path, data, parents); + } return void 0; } } @@ -2933,21 +2936,25 @@ ${reconstitutedRules.join("\n\n")} logger.error(`Cannot access property "${remainingPath}" on primitive value of type "${typeof currentData}"`); return void 0; } - return remainingPath.split(".").reduce((o, k2) => o && typeof o === "object" && o !== null ? o[k2] : void 0, currentData); + const result = remainingPath.split(".").reduce((o, k2) => o && typeof o === "object" && o !== null ? o[k2] : void 0, currentData); + if (result === void 0 && getOuterProperty) { + return getOuterProperty(path, data, parents); + } + return result; } return currentData; } function escape(s) { return s.replace(/[&<>"']/g, (c) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[c] || c); } - function interpolate(tpl, data, escapeHtml = true, parents = [], logger) { + function interpolate(tpl, data, escapeHtml = true, parents = [], logger, getOuterProperty) { return tpl.replace(/\{\{\{([^{]*?)\}\}\}|\{\{([^{]*?)\}\}/g, (match, escapedExpr, normalExpr) => { if (escapedExpr !== void 0) { const trimmed2 = escapedExpr.trim(); return `{{${trimmed2}}}`; } const trimmed = normalExpr.trim(); - const val = getProperty(data, trimmed, parents, logger); + const val = getProperty(data, trimmed, parents, logger, getOuterProperty); return val == null ? "" : escapeHtml ? escape(String(val)) : String(val); }); } @@ -2987,13 +2994,13 @@ ${reconstitutedRules.join("\n\n")} } return cssDeclarations.join("; ").trim(); } - function processStyleAttribute(value, data, parents, logger) { + function processStyleAttribute(value, data, parents, logger, getOuterProperty) { if (value !== null && typeof value === "object" && !Array.isArray(value) && "$check" in value && typeof value.$check === "string") { const conditional = value; if (!validatePathExpression(conditional.$check, "$check", logger)) { return ""; } - const checkValue = getProperty(data, conditional.$check, parents); + const checkValue = getProperty(data, conditional.$check, parents, logger, getOuterProperty); const condition = evaluateCondition(checkValue, conditional); const resultValue = condition ? conditional.$then : conditional.$else; if (resultValue === void 0) { @@ -3078,11 +3085,11 @@ ${reconstitutedRules.join("\n\n")} function isConditionalValue(value) { return value !== null && typeof value === "object" && !Array.isArray(value) && "$check" in value && typeof value.$check === "string"; } - function evaluateConditionalValue(value, data, parents = [], logger) { + function evaluateConditionalValue(value, data, parents = [], logger, getOuterProperty) { if (!validatePathExpression(value.$check, "$check", logger)) { return ""; } - const checkValue = getProperty(data, value.$check, parents); + const checkValue = getProperty(data, value.$check, parents, logger, getOuterProperty); const condition = evaluateCondition(checkValue, value); if (condition) { return value.$then !== void 0 ? value.$then : ""; @@ -3110,7 +3117,7 @@ ${reconstitutedRules.join("\n\n")} const attrs = rest && typeof rest === "object" && !Array.isArray(rest) ? Object.fromEntries(Object.entries(rest).filter(([k2]) => k2 !== "$children")) : {}; return { tag, rest, children, attrs }; } - function processConditional(rest, data, parents = [], logger) { + function processConditional(rest, data, parents = [], logger, getOuterProperty) { const conditional = rest; if (!conditional.$check) { logger.error('"$if" tag requires $check attribute to specify the condition'); @@ -3119,7 +3126,7 @@ ${reconstitutedRules.join("\n\n")} if (!validatePathExpression(conditional.$check, "$check", logger)) { return { valueToRender: void 0 }; } - const checkValue = getProperty(data, conditional.$check, parents); + const checkValue = getProperty(data, conditional.$check, parents, logger, getOuterProperty); if (typeof rest === "object" && rest !== null && !Array.isArray(rest) && "$children" in rest) { logger.warn('"$if" tag does not support $children, use $then and $else instead'); } @@ -3144,8 +3151,9 @@ ${reconstitutedRules.join("\n\n")} function renderToDOM(input, options = {}) { const data = input.data; const logger = options.logger || console; + const getOuterProperty = options.propertyFallback; const fragment = document.createDocumentFragment(); - const result = render(input.template, data, { logger }); + const result = render(input.template, data, { logger, getOuterProperty }); if (Array.isArray(result)) result.forEach((n) => fragment.appendChild(n)); else @@ -3155,8 +3163,11 @@ ${reconstitutedRules.join("\n\n")} function render(template, data, context) { const parents = context.parents || []; const logger = context.logger; - if (typeof template === "string") - return document.createTextNode(interpolate(template, data, true, parents, logger)); + const getOuterProperty = context.getOuterProperty; + if (typeof template === "string") { + const shouldEscape = context.insideComment || false; + return document.createTextNode(interpolate(template, data, shouldEscape, parents, logger, getOuterProperty)); + } if (Array.isArray(template)) { const results = []; for (const t of template) { @@ -3182,7 +3193,7 @@ ${reconstitutedRules.join("\n\n")} return []; } if (tag === "$if") { - const { valueToRender } = processConditional(rest, data, parents, logger); + const { valueToRender } = processConditional(rest, data, parents, logger, getOuterProperty); if (valueToRender === void 0) { return []; } @@ -3213,9 +3224,9 @@ ${reconstitutedRules.join("\n\n")} if (!validatePathExpression(rest.$bind, "$bind", logger)) { return []; } - const bound = getProperty(data, rest.$bind, [], logger); + const bound = getProperty(data, rest.$bind, [], logger, getOuterProperty); const { $bind, $children = [], ...bindAttrs } = rest; - setAttrs(element, bindAttrs, data, tag, parents, logger); + setAttrs(element, bindAttrs, data, tag, parents, logger, getOuterProperty); if (isVoid && $children.length > 0) { logger.warn(`Tag "${tag}" is a void element and cannot have children`); } @@ -3245,7 +3256,7 @@ ${reconstitutedRules.join("\n\n")} const childNodes = render({ [tag]: { ...bindAttrs, $children } }, boundData, { ...context, parents: newParents }); return Array.isArray(childNodes) ? childNodes : [childNodes]; } - setAttrs(element, attrs, data, tag, parents, logger); + setAttrs(element, attrs, data, tag, parents, logger, getOuterProperty); if (!isVoid) { for (const c of children) { const nodes = render(c, data, context); @@ -3259,23 +3270,23 @@ ${reconstitutedRules.join("\n\n")} } return element; } - function setAttrs(element, attrs, data, tag, parents = [], logger) { + function setAttrs(element, attrs, data, tag, parents = [], logger, getOuterProperty) { Object.entries(attrs).forEach(([key, value]) => { if (!validateAttribute(key, tag, logger)) { return; } let attrValue; if (key === "style") { - attrValue = processStyleAttribute(value, data, parents, logger); + attrValue = processStyleAttribute(value, data, parents, logger, getOuterProperty); if (!attrValue) { return; } } else { if (isConditionalValue(value)) { - const evaluatedValue = evaluateConditionalValue(value, data, parents, logger); - attrValue = interpolate(String(evaluatedValue), data, false, parents, logger); + const evaluatedValue = evaluateConditionalValue(value, data, parents, logger, getOuterProperty); + attrValue = interpolate(String(evaluatedValue), data, false, parents, logger, getOuterProperty); } else { - attrValue = interpolate(String(value), data, false, parents, logger); + attrValue = interpolate(String(value), data, false, parents, logger, getOuterProperty); } } element.setAttribute(key, attrValue); diff --git a/docs/schema/idoc_v1.json b/docs/schema/idoc_v1.json index c93a9361..1132bcae 100644 --- a/docs/schema/idoc_v1.json +++ b/docs/schema/idoc_v1.json @@ -8,13 +8,13 @@ "a": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -29,13 +29,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -195,13 +195,13 @@ "article": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -216,13 +216,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -260,7 +260,7 @@ "AttributeValue": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/ConditionalValue" @@ -340,19 +340,22 @@ ], "type": "object" }, + "BindPath": { + "type": "string" + }, "BlockquoteTag": { "additionalProperties": false, "properties": { "blockquote": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -367,13 +370,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -417,13 +420,13 @@ "br": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -438,7 +441,7 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "class": { "$ref": "#/definitions/AttributeValue" @@ -529,13 +532,13 @@ "code": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -550,13 +553,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -614,13 +617,13 @@ "$comment": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -635,13 +638,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -730,7 +733,7 @@ } ] }, - "ConditionalBase<(string|TemplateObject)>": { + "ConditionalBase<(InterpolatedString|TemplateObject)>": { "additionalProperties": false, "properties": { "$<": { @@ -749,12 +752,12 @@ "type": "number" }, "$check": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$else": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -780,7 +783,7 @@ "$then": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -813,7 +816,7 @@ "type": "number" }, "$check": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$else": { "$ref": "#/definitions/CSSProperties" @@ -844,7 +847,7 @@ ], "type": "object" }, - "ConditionalBase": { + "ConditionalBase": { "additionalProperties": false, "properties": { "$<": { @@ -863,10 +866,10 @@ "type": "number" }, "$check": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$else": { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, "$in": { "items": { @@ -885,7 +888,7 @@ "type": "boolean" }, "$then": { - "type": "string" + "$ref": "#/definitions/InterpolatedString" } }, "required": [ @@ -895,10 +898,10 @@ "type": "object" }, "ConditionalValue": { - "$ref": "#/definitions/ConditionalBase%3Cstring%3E" + "$ref": "#/definitions/ConditionalBase%3CInterpolatedString%3E" }, "ConditionalValueOrTemplate": { - "$ref": "#/definitions/ConditionalBase%3C(string%7CTemplateObject)%3E" + "$ref": "#/definitions/ConditionalBase%3C(InterpolatedString%7CTemplateObject)%3E" }, "ContourTransform": { "anyOf": [ @@ -1478,13 +1481,13 @@ "div": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -1499,13 +1502,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -1658,13 +1661,13 @@ "em": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -1679,13 +1682,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -1879,13 +1882,13 @@ "footer": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -1900,13 +1903,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -2397,13 +2400,13 @@ "h1": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -2418,13 +2421,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -2465,13 +2468,13 @@ "h2": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -2486,13 +2489,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -2533,13 +2536,13 @@ "h3": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -2554,13 +2557,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -2601,13 +2604,13 @@ "h4": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -2622,13 +2625,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -2669,13 +2672,13 @@ "h5": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -2690,13 +2693,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -2737,13 +2740,13 @@ "h6": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -2758,13 +2761,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -2805,13 +2808,13 @@ "header": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -2826,13 +2829,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -2926,13 +2929,13 @@ "hr": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -2947,7 +2950,7 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "class": { "$ref": "#/definitions/AttributeValue" @@ -3037,13 +3040,13 @@ "img": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -3058,7 +3061,7 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "alt": { "type": "string" @@ -3240,6 +3243,9 @@ ], "description": "Union type for all possible interactive elements" }, + "InterpolatedString": { + "type": "string" + }, "IsocontourTransform": { "additionalProperties": false, "properties": { @@ -3594,13 +3600,13 @@ "li": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -3615,13 +3621,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -3795,13 +3801,13 @@ "main": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -3816,13 +3822,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -3970,13 +3976,13 @@ "ol": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -3991,13 +3997,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -4038,13 +4044,13 @@ "p": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -4059,13 +4065,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -4276,13 +4282,13 @@ "pre": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -4297,13 +4303,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -4669,13 +4675,13 @@ "section": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -4690,13 +4696,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -4808,13 +4814,13 @@ "span": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -4829,13 +4835,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -4936,13 +4942,13 @@ "strong": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -4957,13 +4963,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -5014,13 +5020,13 @@ "table": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -5035,13 +5041,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -5118,13 +5124,13 @@ "tbody": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -5139,13 +5145,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -5186,13 +5192,13 @@ "td": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -5207,13 +5213,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -5260,7 +5266,7 @@ "TemplateElement": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -5315,13 +5321,13 @@ "th": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -5336,13 +5342,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -5392,13 +5398,13 @@ "thead": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -5413,13 +5419,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -5521,13 +5527,13 @@ "tr": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -5542,13 +5548,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -5899,13 +5905,13 @@ "ul": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" @@ -5920,13 +5926,13 @@ }, "properties": { "$bind": { - "type": "string" + "$ref": "#/definitions/BindPath" }, "$children": { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/InterpolatedString" }, { "$ref": "#/definitions/TemplateObject" diff --git a/package-lock.json b/package-lock.json index c1521a19..0e6cc7c1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "fflate": "^0.8.2", "markdown-it": "^14.1.0", "tabulator-tables": "^6.3.1", - "treebark": "^2.0.6", + "treebark": "^2.0.12", "vega": "^6.2.0", "vega-lite": "^6.4.1" }, @@ -13714,9 +13714,9 @@ } }, "node_modules/treebark": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/treebark/-/treebark-2.0.6.tgz", - "integrity": "sha512-qSuP3aaUPSaH2DCVAvIuVZBDznTPfIGLvgr3DEFs837cpLDKmZspJ9WOSMA+s21/v5rlUyu5VnFCDIxokYvnTw==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/treebark/-/treebark-2.0.12.tgz", + "integrity": "sha512-Mg8jT6BVQtRTUSMnP9Cw3sCSkixoc9VyYaLFNAQ2ll5jPw+iLcofjV2T2m0Wmu8frQwaRk3UbL3XWi82GesZng==", "license": "MIT", "engines": { "node": ">=16.0.0" diff --git a/package.json b/package.json index 037a1d88..c9179006 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "fflate": "^0.8.2", "markdown-it": "^14.1.0", "tabulator-tables": "^6.3.1", - "treebark": "^2.0.6", + "treebark": "^2.0.12", "vega": "^6.2.0", "vega-lite": "^6.4.1" }