Initial Matrix component package

This commit is contained in:
Hive Package Manager 2026-07-07 21:52:44 +00:00
commit 3848f867a2
4 changed files with 80 additions and 0 deletions

5
.npmrc Normal file
View File

@ -0,0 +1,5 @@
registry=https://registry.npmjs.org/
@open-matrix:registry=https://registry.hivecast.ai/api/packages/open-matrix/npm/
@matrix:registry=https://registry.hivecast.ai/api/packages/open-matrix/npm/
@omega:registry=https://registry.hivecast.ai/api/packages/open-matrix/npm/
@hivecast-proof-example-test:registry=https://registry.hivecast.ai/api/packages/hivecast-proof-example-test/npm/

23
index.js Normal file
View File

@ -0,0 +1,23 @@
class R3bProofComponent20260707215243Component extends MatrixActorHtmlElement {
static accepts = {
setText: {},
};
static emits = { changed: {} };
constructor() {
super();
this.state = { text: "R3b Proof Component 20260707215243" };
}
render(state = this.state) {
return `<section class="component-shell"><strong>${state.text}</strong></section>`;
}
onSetText(payload = {}) {
this.state = { ...this.state, text: String(payload.text ?? "") };
this.requestRender?.();
this.emit?.("changed", { text: this.state.text });
return { ok: true, text: this.state.text };
}
}

41
matrix.package.json Normal file
View File

@ -0,0 +1,41 @@
{
"name": "@hivecast-proof-example-test/r3b-proof-component-20260707215243",
"version": "1.0.0",
"description": "Run 3 proof component package",
"artifact": {
"kind": "component",
"lifecycle": "NAMES-PENDING(R-B): component package artifact"
},
"runtime": {
"language": "javascript",
"entry": "index.js"
},
"rendererProvider": {
"kind": "matrix-actor-html-element",
"entry": "index.js",
"export": "Component"
},
"components": [
{
"type": "R3bProofComponent20260707215243Component",
"export": "Component",
"mount": "r3b-proof-component-20260707215243",
"surface": "dom",
"accepts": [
"setText"
],
"emits": [],
"tracks": [],
"interfaces": [],
"intents": [],
"description": "Run 3 proof component package"
}
],
"busAccess": {
"imports": [],
"exports": []
},
"permissions": {
"fsPolicy": "none"
}
}

11
package.json Normal file
View File

@ -0,0 +1,11 @@
{
"name": "@hivecast-proof-example-test/r3b-proof-component-20260707215243",
"version": "1.0.0",
"type": "module",
"main": "index.js",
"files": [
"index.js",
"matrix.package.json"
],
"matrix": true
}