feat(canvas): register 6 missing shape types for cross-rApp interop
Gov shapes (quadratic, conviction, multisig, sankey), exchange node, and ASCII gen existed in lib/ with ports + serialization but were never imported/defined/registered in canvas.html — now wired with toolbar buttons, SHAPE_TO_MODULE gating, and click handlers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f43b02d7c5
commit
f735f2beb2
|
|
@ -2076,6 +2076,10 @@
|
|||
<button id="new-commitment-pool" title="Commitment Pool" data-requires-module="rtime">🧺 Commitments</button>
|
||||
<button id="new-task-request" title="Task Request" data-requires-module="rtime">📋 Task Request</button>
|
||||
<button id="new-multisig-email" title="Multi-Sig Email">✉️ Multi-Sig Email</button>
|
||||
<button id="new-gov-quadratic" title="Quadratic Vote" data-requires-module="rgov">📐 Quadratic</button>
|
||||
<button id="new-gov-conviction" title="Conviction Vote" data-requires-module="rgov">⏱️ Conviction Gov</button>
|
||||
<button id="new-gov-multisig" title="Multi-Sig Governance" data-requires-module="rgov">🔏 Multi-Sig</button>
|
||||
<button id="new-gov-sankey" title="Allocation Sankey" data-requires-module="rgov">🌊 Sankey Flow</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -2088,6 +2092,7 @@
|
|||
<button id="embed-flows" title="rFlows" data-requires-module="rflows">🌊 rFlows</button>
|
||||
<button id="new-tx-builder" title="Transaction Builder" data-requires-module="rwallet">🔐 Tx Builder</button>
|
||||
<button id="new-token" title="Token" data-requires-module="rwallet">🪙 Token</button>
|
||||
<button id="new-exchange-node" title="Exchange Node" data-requires-module="rexchange">📈 Exchange</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -2127,6 +2132,7 @@
|
|||
<button id="new-video-gen" title="AI Video">🎬 AI Video</button>
|
||||
<button id="new-zine-gen" title="Zine Gen">📰 Zine Gen</button>
|
||||
<button id="new-mermaid-gen" title="Mermaid Diagram">🔀 Diagrams</button>
|
||||
<button id="new-ascii-gen" title="ASCII Art">▓ ASCII Art</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -2487,6 +2493,12 @@
|
|||
FolkChoiceSpider,
|
||||
FolkSpider3D,
|
||||
FolkChoiceConviction,
|
||||
FolkGovQuadratic,
|
||||
FolkGovConviction,
|
||||
FolkGovMultisig,
|
||||
FolkGovSankey,
|
||||
FolkExchangeNode,
|
||||
FolkAsciiGen,
|
||||
FolkSocialPost,
|
||||
FolkSocialThread,
|
||||
FolkSocialCampaign,
|
||||
|
|
@ -2723,6 +2735,12 @@
|
|||
FolkChoiceSpider.define();
|
||||
FolkSpider3D.define();
|
||||
FolkChoiceConviction.define();
|
||||
FolkGovQuadratic.define();
|
||||
FolkGovConviction.define();
|
||||
FolkGovMultisig.define();
|
||||
FolkGovSankey.define();
|
||||
FolkExchangeNode.define();
|
||||
FolkAsciiGen.define();
|
||||
FolkSocialPost.define();
|
||||
FolkSocialThread.define();
|
||||
FolkSocialCampaign.define();
|
||||
|
|
@ -2785,6 +2803,12 @@
|
|||
shapeRegistry.register("folk-choice-spider", FolkChoiceSpider);
|
||||
shapeRegistry.register("folk-spider-3d", FolkSpider3D);
|
||||
shapeRegistry.register("folk-choice-conviction", FolkChoiceConviction);
|
||||
shapeRegistry.register("folk-gov-quadratic", FolkGovQuadratic);
|
||||
shapeRegistry.register("folk-gov-conviction", FolkGovConviction);
|
||||
shapeRegistry.register("folk-gov-multisig", FolkGovMultisig);
|
||||
shapeRegistry.register("folk-gov-sankey", FolkGovSankey);
|
||||
shapeRegistry.register("folk-exchange-node", FolkExchangeNode);
|
||||
shapeRegistry.register("folk-ascii-gen", FolkAsciiGen);
|
||||
shapeRegistry.register("folk-social-post", FolkSocialPost);
|
||||
shapeRegistry.register("folk-social-thread", FolkSocialThread);
|
||||
shapeRegistry.register("folk-social-campaign", FolkSocialCampaign);
|
||||
|
|
@ -3968,8 +3992,13 @@ Use real coordinates, YYYY-MM-DD dates, ISO currency codes. Ask clarifying quest
|
|||
"folk-transaction-builder": "rwallet",
|
||||
"folk-commitment-pool": "rtime",
|
||||
"folk-task-request": "rtime",
|
||||
"folk-gov-binary": "rvote",
|
||||
"folk-gov-threshold": "rvote",
|
||||
"folk-gov-binary": "rgov",
|
||||
"folk-gov-threshold": "rgov",
|
||||
"folk-gov-quadratic": "rgov",
|
||||
"folk-gov-conviction": "rgov",
|
||||
"folk-gov-multisig": "rgov",
|
||||
"folk-gov-sankey": "rgov",
|
||||
"folk-exchange-node": "rexchange",
|
||||
"folk-itinerary": "rtrips",
|
||||
"folk-destination": "rtrips",
|
||||
"folk-budget": "rtrips",
|
||||
|
|
@ -5085,6 +5114,56 @@ Use real coordinates, YYYY-MM-DD dates, ISO currency codes. Ask clarifying quest
|
|||
});
|
||||
});
|
||||
|
||||
// Governance shapes — quadratic, conviction, multisig, sankey
|
||||
document.getElementById("new-gov-quadratic").addEventListener("click", () => {
|
||||
setPendingTool("folk-gov-quadratic", {
|
||||
title: "Quadratic Vote",
|
||||
mode: "allocate",
|
||||
entries: [
|
||||
{ id: "e-1", label: "Option A", allocated: 0 },
|
||||
{ id: "e-2", label: "Option B", allocated: 0 },
|
||||
{ id: "e-3", label: "Option C", allocated: 0 },
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
document.getElementById("new-gov-conviction").addEventListener("click", () => {
|
||||
setPendingTool("folk-gov-conviction", {
|
||||
title: "Conviction Vote",
|
||||
convictionMode: "linear",
|
||||
threshold: 50,
|
||||
stakes: [],
|
||||
});
|
||||
});
|
||||
|
||||
document.getElementById("new-gov-multisig").addEventListener("click", () => {
|
||||
setPendingTool("folk-gov-multisig", {
|
||||
title: "Multi-Sig Gate",
|
||||
requiredM: 2,
|
||||
signers: [
|
||||
{ name: "Signer 1", signed: false },
|
||||
{ name: "Signer 2", signed: false },
|
||||
{ name: "Signer 3", signed: false },
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
document.getElementById("new-gov-sankey").addEventListener("click", () => {
|
||||
setPendingTool("folk-gov-sankey", {
|
||||
title: "Allocation Flow",
|
||||
});
|
||||
});
|
||||
|
||||
// Exchange node
|
||||
document.getElementById("new-exchange-node").addEventListener("click", () => {
|
||||
setPendingTool("folk-exchange-node", {});
|
||||
});
|
||||
|
||||
// ASCII art generator
|
||||
document.getElementById("new-ascii-gen").addEventListener("click", () => {
|
||||
setPendingTool("folk-ascii-gen", {});
|
||||
});
|
||||
|
||||
// Social media post
|
||||
document.getElementById("new-social-post").addEventListener("click", () => {
|
||||
setPendingTool("folk-social-post", {
|
||||
|
|
|
|||
Loading…
Reference in New Issue