@gramlot/gramlot 0.3.3 → 0.3.4
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/gramlot.js +9 -6
- package/dist/gramlot.min.js +13 -13
- package/package.json +1 -1
- package/src/components/border-container.js +13 -4
- package/src/view/html.js +12 -7
package/dist/gramlot.js
CHANGED
|
@@ -24976,12 +24976,7 @@ var HtmlElement = class {
|
|
|
24976
24976
|
if (meta.gramlot_component?.sourceContext) {
|
|
24977
24977
|
element.setSourceContext({
|
|
24978
24978
|
publish: (topic, payload) => node.publish(topic, payload),
|
|
24979
|
-
writeParameter: (name, value) =>
|
|
24980
|
-
const pointer = node.getAttr(name);
|
|
24981
|
-
if (node.pointerType(pointer) === "^" && !Object.is(node.getRelativeData(pointer.slice(1)), value)) {
|
|
24982
|
-
node.setRelativeData(pointer.slice(1), value);
|
|
24983
|
-
}
|
|
24984
|
-
}
|
|
24979
|
+
writeParameter: (name, value) => this.writeParameter(node, name, value)
|
|
24985
24980
|
});
|
|
24986
24981
|
}
|
|
24987
24982
|
const text = document.createTextNode(this.text(node));
|
|
@@ -24994,6 +24989,13 @@ var HtmlElement = class {
|
|
|
24994
24989
|
const { tag: tag2, namespace } = this.definition(node);
|
|
24995
24990
|
return (namespace === XHTML_NS ? record2.tag.toLowerCase() === tag2.toLowerCase() : record2.tag === tag2) && record2.element.namespaceURI === namespace;
|
|
24996
24991
|
}
|
|
24992
|
+
/** Write a component interaction through a plain reactive Source pointer. */
|
|
24993
|
+
writeParameter(node, name, value) {
|
|
24994
|
+
const pointer = node.getAttr(name);
|
|
24995
|
+
if (node.pointerType(pointer) === "^" && !pointerTransform(pointer) && !Object.is(node.getRelativeData(pointer.slice(1)), value)) {
|
|
24996
|
+
node.setRelativeData(pointer.slice(1), value);
|
|
24997
|
+
}
|
|
24998
|
+
}
|
|
24997
24999
|
compose(record2, text, children) {
|
|
24998
25000
|
record2.text.data = text ?? "";
|
|
24999
25001
|
for (const child of children) record2.element.append(child);
|
|
@@ -25022,6 +25024,7 @@ var HtmlElement = class {
|
|
|
25022
25024
|
invoke: (name, code, keywords) => this.invokeScript(node, name, code, keywords),
|
|
25023
25025
|
publish: (topic, payload) => node.publish(topic, payload),
|
|
25024
25026
|
publishParent: (topic, payload) => parent.publish(topic, payload),
|
|
25027
|
+
writeParameter: (name, value) => this.writeParameter(node, name, value),
|
|
25025
25028
|
remove: () => node.parentBag.popNode(node.label)
|
|
25026
25029
|
});
|
|
25027
25030
|
}
|