|
51 | 51 | <script src="/assets/os/contracts.js"></script> |
52 | 52 | <script src="/assets/os/mcp.js"></script> |
53 | 53 | <script src="/assets/os/bridge.js"></script> |
| 54 | + <script src="/assets/os/pointer.js"></script> |
54 | 55 | <script src="/assets/js/gx-track.js"></script> |
55 | 56 |
|
56 | 57 | <!-- External Libraries --> |
@@ -909,6 +910,24 @@ <h3>Export</h3> |
909 | 910 | data-pro-feature="schema-export-mermaid" |
910 | 911 | ></div> |
911 | 912 | </div> |
| 913 | + <button |
| 914 | + class="btn export-domain-btn" |
| 915 | + data-mode="software" |
| 916 | + id="exportMermaidErdBtn" |
| 917 | + title="Export ERD as a Mermaid erDiagram" |
| 918 | + > |
| 919 | + <iconify-icon icon="material-symbols:account-tree-outline"></iconify-icon> |
| 920 | + <span class="panel-content">Mermaid ERD</span> |
| 921 | + </button> |
| 922 | + <button |
| 923 | + class="btn export-domain-btn" |
| 924 | + data-mode="software" |
| 925 | + id="importMermaidErdBtn" |
| 926 | + title="Import a Mermaid erDiagram onto the canvas" |
| 927 | + > |
| 928 | + <iconify-icon icon="material-symbols:input"></iconify-icon> |
| 929 | + <span class="panel-content">Import Mermaid</span> |
| 930 | + </button> |
912 | 931 | <button |
913 | 932 | class="btn export-domain-btn" |
914 | 933 | data-mode="software" |
@@ -936,6 +955,18 @@ <h3>Export</h3> |
936 | 955 | <iconify-icon icon="material-symbols:send-outline"></iconify-icon> |
937 | 956 | <span class="panel-content">→ TAFNE</span> |
938 | 957 | </button> |
| 958 | + <!-- Closes the loop: edits made here go back to the sheet and cell the |
| 959 | + table was promoted from. Enabled only when this schema HAS a |
| 960 | + basis, i.e. it came from TAFNE. --> |
| 961 | + <button |
| 962 | + class="btn export-domain-btn" |
| 963 | + data-mode="software" |
| 964 | + id="sendSchemaAnnotationBtn" |
| 965 | + title="Send schema edits back to TAFNE" |
| 966 | + > |
| 967 | + <iconify-icon icon="material-symbols:undo"></iconify-icon> |
| 968 | + <span class="panel-content">Back-annotate</span> |
| 969 | + </button> |
939 | 970 | </div> |
940 | 971 | </div> |
941 | 972 | <!-- /.custom-bar accordion toolbar --> |
@@ -1473,11 +1504,30 @@ <h3 class="modal-title"> |
1473 | 1504 | <script src="/assets/schema-editor/domains/softwareKit.js"></script> |
1474 | 1505 | <script src="/assets/schema-editor/domains/constructionKit.js"></script> |
1475 | 1506 |
|
| 1507 | + <!-- Deterministic Schematic Primitive Engine — software domain (SPE) --> |
| 1508 | + <script src="/assets/schema-editor/spe/grammar.js"></script> |
| 1509 | + <script src="/assets/schema-editor/spe/topology.js"></script> |
| 1510 | + <script src="/assets/schema-editor/spe/layout.js"></script> |
| 1511 | + <script src="/assets/schema-editor/spe/render.js"></script> |
| 1512 | + <script src="/assets/schema-editor/spe/catalog.js"></script> |
| 1513 | + <script src="/assets/schema-editor/spe/spe.js"></script> |
| 1514 | + |
| 1515 | + <!-- Software design model (GxSchema) — public contract --> |
| 1516 | + <script src="src/js/domain/schemaIr.js"></script> |
| 1517 | + <script src="src/js/features/srcEngine.js"></script> |
| 1518 | + |
| 1519 | + <!-- GxSchema private intelligence — portfolio-managed, not in the engine --> |
| 1520 | + <script src="/assets/schema-editor/data/type-dialects.js"></script> |
| 1521 | + <script src="/assets/schema-editor/data/serializers.js"></script> |
| 1522 | + <script src="/assets/schema-editor/domains/software/promote.js"></script> |
| 1523 | + |
1476 | 1524 | <!-- AI layout bookkeeper + apply-ops handler are NOT loaded here: they are |
1477 | 1525 | the intelligence layer, injected at runtime by the OS shell (Pro). |
1478 | 1526 | A standalone/forked copy of this tool has no AI orchestration. --> |
1479 | 1527 |
|
1480 | 1528 | <!-- Features --> |
| 1529 | + <!-- Edge routing styles — must load before drawingTools uses them --> |
| 1530 | + <script src="src/js/features/edgeRouter.js"></script> |
1481 | 1531 | <script src="src/js/features/viewTransform.js"></script> |
1482 | 1532 | <script src="src/js/features/wiringDiagram.js"></script> |
1483 | 1533 | <script src="src/js/features/wireTracing.js"></script> |
@@ -1489,7 +1539,10 @@ <h3 class="modal-title"> |
1489 | 1539 | <script src="src/js/features/uiControls.js"></script> |
1490 | 1540 | <script src="/assets/schema-editor/data/component-specs.js"></script> |
1491 | 1541 | <script src="src/js/core/ctmAdapter.js"></script> |
| 1542 | + <script src="src/js/features/units.js"></script> |
1492 | 1543 | <script src="src/js/features/ercEngine.js"></script> |
| 1544 | + <script src="src/js/features/knowledgeEngine.js"></script> |
| 1545 | + <script src="src/js/features/busEngine.js"></script> |
1493 | 1546 |
|
1494 | 1547 | <script> |
1495 | 1548 | $(document).ready(function () { |
@@ -1582,9 +1635,14 @@ <h3 class="modal-title"> |
1582 | 1635 | window.editor.exportAsFsmJson(), |
1583 | 1636 | ); |
1584 | 1637 | $("#exportXStateBtn").on("click", () => window.editor.exportAsXState()); |
| 1638 | + $("#exportMermaidErdBtn").on("click", () => window.editor.exportAsMermaidErd()); |
| 1639 | + $("#importMermaidErdBtn").on("click", () => window.editor.importMermaidErd()); |
1585 | 1640 | $("#sendFsmToTafneBtn").on("click", () => |
1586 | 1641 | window.editor.sendFsmToTafne(), |
1587 | 1642 | ); |
| 1643 | + $("#sendSchemaAnnotationBtn").on("click", () => |
| 1644 | + window.editor.sendSchemaAnnotation(), |
| 1645 | + ); |
1588 | 1646 |
|
1589 | 1647 | // Gate + star toast — fires on first export per session |
1590 | 1648 | if (window.GxGate) { |
@@ -1614,7 +1672,20 @@ <h3 class="modal-title"> |
1614 | 1672 | window.editor.receiveSvgVector(envelope); |
1615 | 1673 | return; |
1616 | 1674 | } |
1617 | | - if (envelope?.hints?.action !== "back-annotate") return; |
| 1675 | + var action = envelope?.hints?.action; |
| 1676 | + if (action === "load-vectors") { |
| 1677 | + window.editor.receiveVectorArtifacts(envelope); |
| 1678 | + return; |
| 1679 | + } |
| 1680 | + if (action === "load-pipeline") { |
| 1681 | + window.editor.receivePipelineArtifact(envelope); |
| 1682 | + return; |
| 1683 | + } |
| 1684 | + if (action === "load-tables" || action === "load-candidate-tables") { |
| 1685 | + window.editor.receiveTableArtifact(envelope); |
| 1686 | + return; |
| 1687 | + } |
| 1688 | + if (action !== "back-annotate") return; |
1618 | 1689 | window.editor.receiveBackAnnotation(envelope); |
1619 | 1690 | }); |
1620 | 1691 | // MCP pill: show when embedded in VS Code |
|